diff --git a/.gitignore b/.gitignore index af2e4ef6db..aee695b52a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,8 @@ /tarmak_local_build /wing_linux_amd64 /wing_linux_amd64_unversioned +/tagging_control_linux_amd64 +/tagging_control.zip /dist/ /bin/ .DS_Store diff --git a/Gopkg.lock b/Gopkg.lock index 7546dd821b..ac7d4dae46 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -206,7 +206,19 @@ version = "v9" [[projects]] - digest = "1:5101789b805ee6cad9dc0b32f9a506e9cfd8198944b0bca739d1e842ad27df0d" + digest = "1:4105793d064c026895f82f9fb76520146c012fc10980a6496d8663491c179faf" + name = "github.com/aws/aws-lambda-go" + packages = [ + "lambda", + "lambda/messages", + "lambdacontext", + ] + pruneopts = "NUT" + revision = "9e3676ee8ca83aee500682f382e10b9d03660093" + version = "v1.8.0" + +[[projects]] + digest = "1:08c87e7deb3cc01a1bb6787804f59ccaef0553c7c59735bab79f3154be62b83d" name = "github.com/aws/aws-sdk-go" packages = [ "aws", @@ -219,7 +231,9 @@ "aws/credentials", "aws/credentials/ec2rolecreds", "aws/credentials/endpointcreds", + "aws/credentials/processcreds", "aws/credentials/stscreds", + "aws/crr", "aws/csm", "aws/defaults", "aws/ec2metadata", @@ -227,6 +241,8 @@ "aws/request", "aws/session", "aws/signer/v4", + "internal/ini", + "internal/s3err", "internal/sdkio", "internal/sdkrand", "internal/sdkuri", @@ -256,6 +272,7 @@ "service/cloud9", "service/cloudformation", "service/cloudfront", + "service/cloudhsmv2", "service/cloudtrail", "service/cloudwatch", "service/cloudwatchevents", @@ -272,6 +289,7 @@ "service/devicefarm", "service/directconnect", "service/directoryservice", + "service/dlm", "service/dynamodb", "service/ec2", "service/ecr", @@ -295,6 +313,7 @@ "service/inspector", "service/iot", "service/kinesis", + "service/kinesisanalytics", "service/kms", "service/lambda", "service/lexmodelbuildingservice", @@ -305,6 +324,7 @@ "service/neptune", "service/opsworks", "service/organizations", + "service/pinpoint", "service/pricing", "service/rds", "service/redshift", @@ -324,10 +344,11 @@ "service/swf", "service/waf", "service/wafregional", + "service/workspaces", ] pruneopts = "NUT" - revision = "1186f7e6f000ce13edff71ed5ecc8b0e27ba38d7" - version = "v1.15.33" + revision = "d2d8f8c33f49af99cdd889f6897ffd525c520407" + version = "v1.16.19" [[projects]] digest = "1:f4298c81d8a94ab68d9e387eaf6e653387df5da17702f06c6d8718a7a8e549d0" @@ -439,12 +460,12 @@ version = "v1.0.8" [[projects]] - digest = "1:a2c1d0e43bd3baaa071d1b9ed72c27d78169b2b269f71c105ac4ba34b1be4a39" + digest = "1:ffe9824d294da03b391f44e1ae8281281b4afc1bdaa9588c9097785e3af10cec" name = "github.com/davecgh/go-spew" packages = ["spew"] pruneopts = "NUT" - revision = "346938d642f2ec3594ed81d874461961cd0faa76" - version = "v1.1.0" + revision = "8991bc29aa16c548c550c7ff78260e27b9ab7c73" + version = "v1.1.1" [[projects]] digest = "1:7a6852b35eb5bbc184561443762d225116ae630c26a7c4d90546619f1e7d2ad2" @@ -547,14 +568,6 @@ revision = "a720dfa8df582c51dee1b36feabb906bde1588bd" version = "v1.0" -[[projects]] - digest = "1:f59266de09e138237bf9df9deb57b9ebbdb1e33b8399bb739c3745e7d3d2787b" - name = "github.com/go-ini/ini" - packages = ["."] - pruneopts = "NUT" - revision = "358ee7663966325963d4e8b2e1fbd570c5195153" - version = "v1.38.1" - [[projects]] digest = "1:da40b9e5973892e2bd37a72c36464b8252a4034522925d920983edaabda03693" name = "github.com/go-openapi/analysis" @@ -1213,11 +1226,11 @@ version = "0.2.1" [[projects]] - digest = "1:ac6d01547ec4f7f673311b4663909269bfb8249952de3279799289467837c3cc" + digest = "1:1f2aebae7e7c856562355ec0198d8ca2fa222fb05e5b1b66632a1fce39631885" name = "github.com/jmespath/go-jmespath" packages = ["."] pruneopts = "NUT" - revision = "0b12d6b5" + revision = "c2b33e84" [[projects]] digest = "1:3e27f2d5d0734852c4b402aadc7467c2f108503598768ddd7c6f3653984dedc8" @@ -1739,12 +1752,12 @@ version = "1.0.0" [[projects]] - digest = "1:cfb72b79a2e36c9d3be0b65feb81a73f8af00f494c53d2d0e64a0e2e666f9950" + digest = "1:33a4ac0f38b497c9ae43a3215e425c2b7863372d0ef827f88094d4bf5aa80219" name = "github.com/terraform-providers/terraform-provider-aws" packages = ["aws"] pruneopts = "NUT" - revision = "7a246a13e15a1ab9a63b311129279972ef7dc273" - version = "v1.35.0" + revision = "1c33e2787b963aff9d570d4050ec3c4f6afce77e" + version = "v1.47.0" [[projects]] digest = "1:e9233f43efbc563025a92aa3b26266d4670ca579b2f5a14e37c8c50badd79d98" @@ -2628,6 +2641,7 @@ analyzer-version = 1 input-imports = [ "github.com/Masterminds/sprig", + "github.com/aws/aws-lambda-go/lambda", "github.com/aws/aws-sdk-go/aws", "github.com/aws/aws-sdk-go/aws/awserr", "github.com/aws/aws-sdk-go/aws/credentials", diff --git a/Gopkg.toml b/Gopkg.toml index 8b3ddc79c4..4dfae1aa8e 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -110,11 +110,11 @@ required = [ [[constraint]] name = "github.com/terraform-providers/terraform-provider-aws" - version = "1.35.0" + version = "1.43.2" [[override]] name = "github.com/aws/aws-sdk-go" - version = "v1.15.31" + version = "v1.15.72" [[constraint]] name = "github.com/terraform-providers/terraform-provider-random" diff --git a/Makefile b/Makefile index c434bf9527..5862cb409f 100644 --- a/Makefile +++ b/Makefile @@ -63,7 +63,7 @@ verify: generate go_verify verify_boilerplate verify_codegen verify_vendor verif test: go_test ## runs all defined tests, no puppet tests -generate: go_generate ## generates mocks and assets files +generate: go_build_tagging_control go_generate ## generates mocks and assets files build: generate go_build ## runs generate, and then go_build targets @@ -87,6 +87,9 @@ clean: go_vet: go vet $$(go list ./pkg/... ./cmd/...| grep -v pkg/wing/client/clientset/internalversion/fake | grep -v pkg/wing/client/clientset/versioned/fake) +go_build_tagging_control: + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -tags netgo -ldflags '-w -X main.version=$(CI_COMMIT_TAG) -X main.commit=$(CI_COMMIT_SHA) -X main.date=$(shell date -u +%Y-%m-%dT%H:%M:%SZ)' -o tagging_control_linux_amd64 ./cmd/tagging_control/. + go_build: # Build a wing binary CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -tags netgo -ldflags '-w -X main.version=$(CI_COMMIT_TAG) -X main.commit=$(CI_COMMIT_SHA) -X main.date=$(shell date -u +%Y-%m-%dT%H:%M:%SZ)' -o wing_linux_amd64 ./cmd/wing diff --git a/cmd/tagging_control/cmd/handle.go b/cmd/tagging_control/cmd/handle.go new file mode 100644 index 0000000000..9f7228451d --- /dev/null +++ b/cmd/tagging_control/cmd/handle.go @@ -0,0 +1,25 @@ +// Copyright Jetstack Ltd. See LICENSE for details. +package cmd + +import ( + "fmt" + + "github.com/aws/aws-lambda-go/lambda" + "github.com/spf13/cobra" + + "github.com/jetstack/tarmak/pkg/tagging_control" +) + +var handleCmd = &cobra.Command{ + Use: "handle", + Short: "Launch lambda request handler", + Run: func(cmd *cobra.Command, args []string) { + fmt.Printf("running tagging_control lambda function request handler...\n") + + lambda.Start(tagging_control.HandleRequests) + }, +} + +func init() { + RootCmd.AddCommand(handleCmd) +} diff --git a/cmd/tagging_control/cmd/root.go b/cmd/tagging_control/cmd/root.go new file mode 100644 index 0000000000..7b893e5ec5 --- /dev/null +++ b/cmd/tagging_control/cmd/root.go @@ -0,0 +1,25 @@ +// Copyright Jetstack Ltd. See LICENSE for details. +package cmd + +import ( + "fmt" + "os" + + "github.com/spf13/cobra" +) + +var RootCmd = &cobra.Command{ + Use: "tagging_control", + Short: "lambda function used to tag AWS instances with their ssh public keys", + Run: handleCmd.Run, + DisableAutoGenTag: true, +} + +// Execute adds all child commands to the root command and sets flags appropriately. +// This is called by main.main(). It only needs to happen once to the rootCmd. +func Execute() { + if err := RootCmd.Execute(); err != nil { + fmt.Println(err) + os.Exit(1) + } +} diff --git a/cmd/tagging_control/cmd/version.go b/cmd/tagging_control/cmd/version.go new file mode 100644 index 0000000000..52bc93cf66 --- /dev/null +++ b/cmd/tagging_control/cmd/version.go @@ -0,0 +1,42 @@ +// Copyright Jetstack Ltd. See LICENSE for details. +package cmd + +import ( + "fmt" + "reflect" + "strings" + + "github.com/spf13/cobra" +) + +var Version struct { + Version string + BuildDate string + Commit string +} + +var AppName string = "tarmak" + +func init() { + RootCmd.AddCommand(versionCmd) +} + +var versionCmd = &cobra.Command{ + Use: "version", + Short: fmt.Sprint("Print the version number of ", AppName), + Run: func(cmd *cobra.Command, args []string) { + fmt.Printf("%s", AppName) + + v := reflect.ValueOf(Version) + + for i := 0; i < v.NumField(); i++ { + fmt.Printf( + " %s: %s", + strings.ToLower(v.Type().Field(i).Name), + v.Field(i).Interface(), + ) + } + + fmt.Println("") + }, +} diff --git a/cmd/tagging_control/cmd/zip.go b/cmd/tagging_control/cmd/zip.go new file mode 100644 index 0000000000..5fe43d5479 --- /dev/null +++ b/cmd/tagging_control/cmd/zip.go @@ -0,0 +1,37 @@ +// Copyright Jetstack Ltd. See LICENSE for details. +package cmd + +import ( + "errors" + "fmt" + "github.com/spf13/cobra" + + "github.com/jetstack/tarmak/pkg/tarmak/utils/zip" +) + +var zipCmd = &cobra.Command{ + Use: "zip [dst] [src...]", + Short: "zip utility", + RunE: func(cmd *cobra.Command, args []string) error { + if len(args) < 2 { + return errors.New("zip expecting files: [dst] [src...]") + } + + dst := args[0] + src := args[1:] + + fmt.Printf("deflating %s into %s...\n", src, dst) + + if err := zip.Zip(src, dst, true); err != nil { + return fmt.Errorf("zip failed: %s", err) + } + + fmt.Print("done.\n") + + return nil + }, +} + +func init() { + RootCmd.AddCommand(zipCmd) +} diff --git a/cmd/tagging_control/main.go b/cmd/tagging_control/main.go new file mode 100644 index 0000000000..ba746a19e9 --- /dev/null +++ b/cmd/tagging_control/main.go @@ -0,0 +1,19 @@ +// Copyright Jetstack Ltd. See LICENSE for details. +package main + +import ( + "github.com/jetstack/tarmak/cmd/tagging_control/cmd" +) + +var ( + version string = "dev" + commit string = "unknown" + date string = "" +) + +func main() { + cmd.Version.Version = version + cmd.Version.Commit = commit + cmd.Version.BuildDate = date + cmd.Execute() +} diff --git a/cmd/tarmak/cmd/cluster.go b/cmd/tarmak/cmd/cluster.go index e237b3b788..efc4e2f55a 100644 --- a/cmd/tarmak/cmd/cluster.go +++ b/cmd/tarmak/cmd/cluster.go @@ -115,6 +115,31 @@ func clusterKubeconfigFlags(fs *flag.FlagSet) { ) } +func clusterSnapshotEtcdRestoreFlags(fs *flag.FlagSet) { + store := &globalFlags.Cluster.Snapshot.Etcd.Restore + + fs.StringVar( + &store.K8sMain, + consts.RestoreK8sMainFlagName, + "", + "location of k8s-main snapshot backup", + ) + + fs.StringVar( + &store.K8sEvents, + consts.RestoreK8sEventsFlagName, + "", + "location of k8s-events snapshot backup", + ) + + fs.StringVar( + &store.Overlay, + consts.RestoreOverlayFlagName, + "", + "location of overlay snapshot backup", + ) +} + func init() { RootCmd.AddCommand(clusterCmd) } diff --git a/cmd/tarmak/cmd/cluster_instances_ssh.go b/cmd/tarmak/cmd/cluster_instances_ssh.go index 7fee9c16a8..030a7c8536 100644 --- a/cmd/tarmak/cmd/cluster_instances_ssh.go +++ b/cmd/tarmak/cmd/cluster_instances_ssh.go @@ -1,23 +1,6 @@ // Copyright Jetstack Ltd. See LICENSE for details. package cmd -import ( - "github.com/spf13/cobra" - - "github.com/jetstack/tarmak/pkg/tarmak" -) - -var clusterInstancesSshCmd = &cobra.Command{ - Use: "ssh [instance alias] [optional ssh command]", - Short: "Log into an instance with SSH", - Run: func(cmd *cobra.Command, args []string) { - t := tarmak.New(globalFlags) - defer t.Cleanup() - t.SSHPassThrough(args) - }, - DisableFlagsInUseLine: true, -} - func init() { - clusterInstancesCmd.AddCommand(clusterInstancesSshCmd) + clusterInstancesCmd.AddCommand(clusterSshCmd) } diff --git a/cmd/tarmak/cmd/cluster_snapshot.go b/cmd/tarmak/cmd/cluster_snapshot.go new file mode 100644 index 0000000000..d1faa1aefe --- /dev/null +++ b/cmd/tarmak/cmd/cluster_snapshot.go @@ -0,0 +1,15 @@ +// Copyright Jetstack Ltd. See LICENSE for details. +package cmd + +import ( + "github.com/spf13/cobra" +) + +var clusterSnapshotCmd = &cobra.Command{ + Use: "snapshot", + Short: "Manage snapshots of remote consul and etcd clusters", +} + +func init() { + clusterCmd.AddCommand(clusterSnapshotCmd) +} diff --git a/cmd/tarmak/cmd/cluster_snapshot_consul.go b/cmd/tarmak/cmd/cluster_snapshot_consul.go new file mode 100644 index 0000000000..13b067c926 --- /dev/null +++ b/cmd/tarmak/cmd/cluster_snapshot_consul.go @@ -0,0 +1,15 @@ +// Copyright Jetstack Ltd. See LICENSE for details. +package cmd + +import ( + "github.com/spf13/cobra" +) + +var clusterSnapshotConsulCmd = &cobra.Command{ + Use: "consul", + Short: "Manage snapshots on remote consul clusters", +} + +func init() { + clusterSnapshotCmd.AddCommand(clusterSnapshotConsulCmd) +} diff --git a/cmd/tarmak/cmd/cluster_snapshot_consul_restore.go b/cmd/tarmak/cmd/cluster_snapshot_consul_restore.go new file mode 100644 index 0000000000..756d73c951 --- /dev/null +++ b/cmd/tarmak/cmd/cluster_snapshot_consul_restore.go @@ -0,0 +1,32 @@ +// Copyright Jetstack Ltd. See LICENSE for details. +package cmd + +import ( + "fmt" + + "github.com/spf13/cobra" + + "github.com/jetstack/tarmak/pkg/tarmak" + "github.com/jetstack/tarmak/pkg/tarmak/snapshot/consul" +) + +var clusterSnapshotConsulRestoreCmd = &cobra.Command{ + Use: "restore [source path]", + Short: "restore consul cluster with source snapshot", + PreRunE: func(cmd *cobra.Command, args []string) error { + if len(args) != 1 { + return fmt.Errorf("expecting single source path, got=%d", len(args)) + } + + return nil + }, + Run: func(cmd *cobra.Command, args []string) { + t := tarmak.New(globalFlags) + s := consul.New(t, args[0]) + t.CancellationContext().WaitOrCancel(t.NewCmdSnapshot(cmd.Flags(), args, s).Restore) + }, +} + +func init() { + clusterSnapshotConsulCmd.AddCommand(clusterSnapshotConsulRestoreCmd) +} diff --git a/cmd/tarmak/cmd/cluster_snapshot_consul_save.go b/cmd/tarmak/cmd/cluster_snapshot_consul_save.go new file mode 100644 index 0000000000..84c99aea75 --- /dev/null +++ b/cmd/tarmak/cmd/cluster_snapshot_consul_save.go @@ -0,0 +1,32 @@ +// Copyright Jetstack Ltd. See LICENSE for details. +package cmd + +import ( + "fmt" + + "github.com/spf13/cobra" + + "github.com/jetstack/tarmak/pkg/tarmak" + "github.com/jetstack/tarmak/pkg/tarmak/snapshot/consul" +) + +var clusterSnapshotConsulSaveCmd = &cobra.Command{ + Use: "save [target path]", + Short: "save consul cluster snapshot to target path", + PreRunE: func(cmd *cobra.Command, args []string) error { + if len(args) != 1 { + return fmt.Errorf("expecting single target path, got=%d", len(args)) + } + + return nil + }, + Run: func(cmd *cobra.Command, args []string) { + t := tarmak.New(globalFlags) + s := consul.New(t, args[0]) + t.CancellationContext().WaitOrCancel(t.NewCmdSnapshot(cmd.Flags(), args, s).Save) + }, +} + +func init() { + clusterSnapshotConsulCmd.AddCommand(clusterSnapshotConsulSaveCmd) +} diff --git a/cmd/tarmak/cmd/cluster_snapshot_etcd.go b/cmd/tarmak/cmd/cluster_snapshot_etcd.go new file mode 100644 index 0000000000..f14853cb62 --- /dev/null +++ b/cmd/tarmak/cmd/cluster_snapshot_etcd.go @@ -0,0 +1,15 @@ +// Copyright Jetstack Ltd. See LICENSE for details. +package cmd + +import ( + "github.com/spf13/cobra" +) + +var clusterSnapshotEtcdCmd = &cobra.Command{ + Use: "etcd", + Short: "Manage snapshots on remote etcd clusters", +} + +func init() { + clusterSnapshotCmd.AddCommand(clusterSnapshotEtcdCmd) +} diff --git a/cmd/tarmak/cmd/cluster_snapshot_etcd_restore.go b/cmd/tarmak/cmd/cluster_snapshot_etcd_restore.go new file mode 100644 index 0000000000..6454fca411 --- /dev/null +++ b/cmd/tarmak/cmd/cluster_snapshot_etcd_restore.go @@ -0,0 +1,42 @@ +// Copyright Jetstack Ltd. See LICENSE for details. +package cmd + +import ( + "fmt" + + "github.com/spf13/cobra" + + "github.com/jetstack/tarmak/pkg/tarmak" + "github.com/jetstack/tarmak/pkg/tarmak/snapshot/etcd" + "github.com/jetstack/tarmak/pkg/tarmak/utils/consts" +) + +var clusterSnapshotEtcdRestoreCmd = &cobra.Command{ + Use: "restore", + Short: "restore etcd cluster with source snapshots", + PreRunE: func(cmd *cobra.Command, args []string) error { + if !cmd.Flags().Changed(consts.RestoreK8sMainFlagName) && + !cmd.Flags().Changed(consts.RestoreK8sEventsFlagName) && + !cmd.Flags().Changed(consts.RestoreOverlayFlagName) { + + return fmt.Errorf("expecting at least one set flag of [%s %s %s]", + consts.RestoreK8sMainFlagName, + consts.RestoreK8sEventsFlagName, + consts.RestoreOverlayFlagName, + ) + } + return nil + }, + Run: func(cmd *cobra.Command, args []string) { + t := tarmak.New(globalFlags) + s := etcd.New(t, "") + t.CancellationContext().WaitOrCancel(t.NewCmdSnapshot(cmd.Flags(), args, s).Restore) + }, +} + +func init() { + clusterSnapshotEtcdRestoreFlags( + clusterSnapshotEtcdRestoreCmd.PersistentFlags(), + ) + clusterSnapshotEtcdCmd.AddCommand(clusterSnapshotEtcdRestoreCmd) +} diff --git a/cmd/tarmak/cmd/cluster_snapshot_etcd_save.go b/cmd/tarmak/cmd/cluster_snapshot_etcd_save.go new file mode 100644 index 0000000000..62f1ffdc79 --- /dev/null +++ b/cmd/tarmak/cmd/cluster_snapshot_etcd_save.go @@ -0,0 +1,26 @@ +// Copyright Jetstack Ltd. See LICENSE for details. +package cmd + +import ( + "github.com/spf13/cobra" + + "github.com/jetstack/tarmak/pkg/tarmak" + "github.com/jetstack/tarmak/pkg/tarmak/snapshot/etcd" +) + +var clusterSnapshotEtcdSaveCmd = &cobra.Command{ + Use: "save [target path prefix]", + Short: "save etcd snapshot to target path prefix, i.e 'backup-'", + Run: func(cmd *cobra.Command, args []string) { + if len(args) == 0 { + args = []string{""} + } + t := tarmak.New(globalFlags) + s := etcd.New(t, args[0]) + t.CancellationContext().WaitOrCancel(t.NewCmdSnapshot(cmd.Flags(), args, s).Save) + }, +} + +func init() { + clusterSnapshotEtcdCmd.AddCommand(clusterSnapshotEtcdSaveCmd) +} diff --git a/cmd/tarmak/cmd/cluster_ssh.go b/cmd/tarmak/cmd/cluster_ssh.go index a57643650c..07cea949c4 100644 --- a/cmd/tarmak/cmd/cluster_ssh.go +++ b/cmd/tarmak/cmd/cluster_ssh.go @@ -2,18 +2,25 @@ package cmd import ( + "errors" + "github.com/spf13/cobra" "github.com/jetstack/tarmak/pkg/tarmak" ) var clusterSshCmd = &cobra.Command{ - Use: "ssh [instance alias] [optional ssh command]", + Use: "ssh [instance alias] [optional ssh arguments]", Short: "Log into an instance with SSH", + PreRunE: func(cmd *cobra.Command, args []string) error { + if len(args) < 1 { + return errors.New("expecting an instance aliases argument") + } + return nil + }, Run: func(cmd *cobra.Command, args []string) { t := tarmak.New(globalFlags) - defer t.Cleanup() - t.SSHPassThrough(args) + t.Perform(t.SSHPassThrough(args[0], args[1:])) }, DisableFlagsInUseLine: true, } diff --git a/cmd/tarmak/cmd/root.go b/cmd/tarmak/cmd/root.go index 4406021d1b..193b02e966 100644 --- a/cmd/tarmak/cmd/root.go +++ b/cmd/tarmak/cmd/root.go @@ -110,6 +110,13 @@ func init() { "override the current cluster set in the config", ) + RootCmd.PersistentFlags().BoolVar( + &globalFlags.IgnoreMissingPublicKeyTags, + "ignore-missing-public-key-tags", + true, + "ignore missing public key tags on instances, by falling back to populating `ssh_known_hosts` with the first connection", + ) + if version == "dev" { RootCmd.PersistentFlags().BoolVar( &globalFlags.WingDevMode, diff --git a/cmd/tarmak/cmd/tunnel.go b/cmd/tarmak/cmd/tunnel.go new file mode 100644 index 0000000000..d0e8d5eafc --- /dev/null +++ b/cmd/tarmak/cmd/tunnel.go @@ -0,0 +1,56 @@ +// Copyright Jetstack Ltd. See LICENSE for details. +package cmd + +import ( + "fmt" + "os" + "time" + + "github.com/spf13/cobra" + + "github.com/jetstack/tarmak/pkg/tarmak" +) + +var tunnelCmd = &cobra.Command{ + Use: "tunnel [destination] [destination port] [local port]", + PreRunE: func(cmd *cobra.Command, args []string) error { + if len(args) != 3 { + return fmt.Errorf( + "expecting only a destination, destination and local port argument, got=%s", args) + } + return nil + }, + Run: func(cmd *cobra.Command, args []string) { + t := tarmak.New(globalFlags) + tunnel := t.SSH().Tunnel(args[0], args[1], args[2], false) + + retries := 5 + for { + err := tunnel.Start() + if err == nil { + t.Log().Infof("tunnel started: %s", args) + break + } + + t.Log().Errorf("failed to start tunnel: %s", err) + retries-- + if retries == 0 { + t.Log().Error("failed to start tunnel after 5 attempts") + t.Cleanup() + os.Exit(1) + } + + time.Sleep(time.Second * 2) + } + + time.Sleep(time.Minute * 10) + t.Cleanup() + os.Exit(0) + }, + Hidden: true, + DisableFlagParsing: true, +} + +func init() { + RootCmd.AddCommand(tunnelCmd) +} diff --git a/cmd/wing/cmd/agent.go b/cmd/wing/cmd/agent.go index b5d7fc3a4b..42312b0a43 100644 --- a/cmd/wing/cmd/agent.go +++ b/cmd/wing/cmd/agent.go @@ -10,7 +10,8 @@ import ( var agentFlags = &wing.Flags{} var agentCmd = &cobra.Command{ - Use: "agent", + Use: "agent", + Short: "Launch Wing agent", Run: func(cmd *cobra.Command, args []string) { w := wing.New(agentFlags) w.Must(w.Run(args)) diff --git a/cmd/wing/cmd/server.go b/cmd/wing/cmd/server.go index b4234c14c3..b4df5415b0 100644 --- a/cmd/wing/cmd/server.go +++ b/cmd/wing/cmd/server.go @@ -21,6 +21,7 @@ func init() { stopCh := genericapiserver.SetupSignalHandler() serverCmd := server.NewCommandStartWingServer(os.Stdout, os.Stderr, stopCh) + serverCmd.Flags().String("environment", "", "this specifies the environment name") serverCmd.Use = "server" RootCmd.AddCommand(serverCmd) } diff --git a/cmd/wing/cmd/tag.go b/cmd/wing/cmd/tag.go new file mode 100644 index 0000000000..2d7fe8f8f8 --- /dev/null +++ b/cmd/wing/cmd/tag.go @@ -0,0 +1,37 @@ +// Copyright Jetstack Ltd. See LICENSE for details. +package cmd + +import ( + "github.com/sirupsen/logrus" + "github.com/spf13/cobra" + + "github.com/jetstack/tarmak/pkg/wing/tags" +) + +var tagCmd = &cobra.Command{ + Use: "tag", + Short: "Ensure public key tagging of instance", + Run: func(cmd *cobra.Command, args []string) { + log := logrus.New() + log.SetLevel(logrus.DebugLevel) + + env, err := cmd.Flags().GetString("environment") + if err != nil { + log.Fatal(err) + } + + t, err := tags.New(logrus.NewEntry(log), env) + if err != nil { + log.Fatal(err) + } + + if err := t.EnsureMachineTags(); err != nil { + log.Fatal(err) + } + }, +} + +func init() { + tagCmd.Flags().String("environment", "", "this specifies the environment name") + RootCmd.AddCommand(tagCmd) +} diff --git a/docs/cmd-docs.rst b/docs/cmd-docs.rst index bd1d9ef050..426047ff3d 100644 --- a/docs/cmd-docs.rst +++ b/docs/cmd-docs.rst @@ -2,7 +2,7 @@ Command Line Documentation ========================== -Command line documentation for both tarmak and wing commands +Command line documentation for tarmak, wing and tagging_control commands .. toctree:: :maxdepth: 1 @@ -82,22 +82,52 @@ Command line documentation for both tarmak and wing commands .. toctree:: :maxdepth: 1 - generated/cmd/tarmak/tarmak_clusters_instances_ssh + generated/cmd/tarmak/tarmak_clusters_list .. toctree:: :maxdepth: 1 - generated/cmd/tarmak/tarmak_clusters_list + generated/cmd/tarmak/tarmak_clusters_plan .. toctree:: :maxdepth: 1 - generated/cmd/tarmak/tarmak_clusters_plan + generated/cmd/tarmak/tarmak_clusters_set-current .. toctree:: :maxdepth: 1 - generated/cmd/tarmak/tarmak_clusters_set-current + generated/cmd/tarmak/tarmak_clusters_snapshot + +.. toctree:: + :maxdepth: 1 + + generated/cmd/tarmak/tarmak_clusters_snapshot_consul + +.. toctree:: + :maxdepth: 1 + + generated/cmd/tarmak/tarmak_clusters_snapshot_consul_restore + +.. toctree:: + :maxdepth: 1 + + generated/cmd/tarmak/tarmak_clusters_snapshot_consul_save + +.. toctree:: + :maxdepth: 1 + + generated/cmd/tarmak/tarmak_clusters_snapshot_etcd + +.. toctree:: + :maxdepth: 1 + + generated/cmd/tarmak/tarmak_clusters_snapshot_etcd_restore + +.. toctree:: + :maxdepth: 1 + + generated/cmd/tarmak/tarmak_clusters_snapshot_etcd_save .. toctree:: :maxdepth: 1 @@ -174,8 +204,33 @@ Command line documentation for both tarmak and wing commands generated/cmd/wing/wing_server +.. toctree:: + :maxdepth: 1 + + generated/cmd/wing/wing_tag + .. toctree:: :maxdepth: 1 generated/cmd/wing/wing_version +.. toctree:: + :maxdepth: 1 + + generated/cmd/tagging_control/tagging_control + +.. toctree:: + :maxdepth: 1 + + generated/cmd/tagging_control/tagging_control_handle + +.. toctree:: + :maxdepth: 1 + + generated/cmd/tagging_control/tagging_control_version + +.. toctree:: + :maxdepth: 1 + + generated/cmd/tagging_control/tagging_control_zip + diff --git a/docs/generated/cmd/tagging_control/tagging_control.rst b/docs/generated/cmd/tagging_control/tagging_control.rst new file mode 100644 index 0000000000..9f83c9b908 --- /dev/null +++ b/docs/generated/cmd/tagging_control/tagging_control.rst @@ -0,0 +1,31 @@ +.. _tagging_control: + +tagging_control +--------------- + +lambda function used to tag AWS instances with their ssh public keys + +Synopsis +~~~~~~~~ + + +lambda function used to tag AWS instances with their ssh public keys + +:: + + tagging_control [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for tagging_control + +SEE ALSO +~~~~~~~~ + +* `tagging_control handle `_ - Launch lambda request handler +* `tagging_control version `_ - Print the version number of tarmak +* `tagging_control zip `_ - zip utility + diff --git a/docs/generated/cmd/tagging_control/tagging_control_handle.rst b/docs/generated/cmd/tagging_control/tagging_control_handle.rst new file mode 100644 index 0000000000..bc12f14367 --- /dev/null +++ b/docs/generated/cmd/tagging_control/tagging_control_handle.rst @@ -0,0 +1,29 @@ +.. _tagging_control_handle: + +tagging_control handle +---------------------- + +Launch lambda request handler + +Synopsis +~~~~~~~~ + + +Launch lambda request handler + +:: + + tagging_control handle [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for handle + +SEE ALSO +~~~~~~~~ + +* `tagging_control `_ - lambda function used to tag AWS instances with their ssh public keys + diff --git a/docs/generated/cmd/tagging_control/tagging_control_version.rst b/docs/generated/cmd/tagging_control/tagging_control_version.rst new file mode 100644 index 0000000000..dab6c01807 --- /dev/null +++ b/docs/generated/cmd/tagging_control/tagging_control_version.rst @@ -0,0 +1,29 @@ +.. _tagging_control_version: + +tagging_control version +----------------------- + +Print the version number of tarmak + +Synopsis +~~~~~~~~ + + +Print the version number of tarmak + +:: + + tagging_control version [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for version + +SEE ALSO +~~~~~~~~ + +* `tagging_control `_ - lambda function used to tag AWS instances with their ssh public keys + diff --git a/docs/generated/cmd/tagging_control/tagging_control_zip.rst b/docs/generated/cmd/tagging_control/tagging_control_zip.rst new file mode 100644 index 0000000000..658f55d4e3 --- /dev/null +++ b/docs/generated/cmd/tagging_control/tagging_control_zip.rst @@ -0,0 +1,29 @@ +.. _tagging_control_zip: + +tagging_control zip +------------------- + +zip utility + +Synopsis +~~~~~~~~ + + +zip utility + +:: + + tagging_control zip [dst] [src...] [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for zip + +SEE ALSO +~~~~~~~~ + +* `tagging_control `_ - lambda function used to tag AWS instances with their ssh public keys + diff --git a/docs/generated/cmd/tarmak/tarmak.rst b/docs/generated/cmd/tarmak/tarmak.rst index 9f6f510e9c..3c11406c7b 100644 --- a/docs/generated/cmd/tarmak/tarmak.rst +++ b/docs/generated/cmd/tarmak/tarmak.rst @@ -16,14 +16,14 @@ Options :: - -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") - --current-cluster string override the current cluster set in the config - -h, --help help for tarmak - --keep-containers do not clean-up terraform/packer containers after running them - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint - -v, --verbose enable verbose logging - --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + -h, --help help for tarmak + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub SEE ALSO ~~~~~~~~ diff --git a/docs/generated/cmd/tarmak/tarmak_clusters.rst b/docs/generated/cmd/tarmak/tarmak_clusters.rst index 3c392b100f..a2654f094c 100644 --- a/docs/generated/cmd/tarmak/tarmak_clusters.rst +++ b/docs/generated/cmd/tarmak/tarmak_clusters.rst @@ -23,13 +23,13 @@ Options inherited from parent commands :: - -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") - --current-cluster string override the current cluster set in the config - --keep-containers do not clean-up terraform/packer containers after running them - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint - -v, --verbose enable verbose logging - --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub SEE ALSO ~~~~~~~~ @@ -47,5 +47,6 @@ SEE ALSO * `tarmak clusters list `_ - Print a list of clusters * `tarmak clusters plan `_ - Plan changes on the currently configured cluster * `tarmak clusters set-current `_ - Set current cluster in config +* `tarmak clusters snapshot `_ - Manage snapshots of remote consul and etcd clusters * `tarmak clusters ssh `_ - Log into an instance with SSH diff --git a/docs/generated/cmd/tarmak/tarmak_clusters_apply.rst b/docs/generated/cmd/tarmak/tarmak_clusters_apply.rst index cf1af26ae0..da3bbb3c2f 100644 --- a/docs/generated/cmd/tarmak/tarmak_clusters_apply.rst +++ b/docs/generated/cmd/tarmak/tarmak_clusters_apply.rst @@ -34,13 +34,13 @@ Options inherited from parent commands :: - -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") - --current-cluster string override the current cluster set in the config - --keep-containers do not clean-up terraform/packer containers after running them - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint - -v, --verbose enable verbose logging - --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub SEE ALSO ~~~~~~~~ diff --git a/docs/generated/cmd/tarmak/tarmak_clusters_debug.rst b/docs/generated/cmd/tarmak/tarmak_clusters_debug.rst index 67d15e0ced..b0253d6ff7 100644 --- a/docs/generated/cmd/tarmak/tarmak_clusters_debug.rst +++ b/docs/generated/cmd/tarmak/tarmak_clusters_debug.rst @@ -23,13 +23,13 @@ Options inherited from parent commands :: - -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") - --current-cluster string override the current cluster set in the config - --keep-containers do not clean-up terraform/packer containers after running them - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint - -v, --verbose enable verbose logging - --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub SEE ALSO ~~~~~~~~ diff --git a/docs/generated/cmd/tarmak/tarmak_clusters_debug_puppet.rst b/docs/generated/cmd/tarmak/tarmak_clusters_debug_puppet.rst index d943f9e750..a461237776 100644 --- a/docs/generated/cmd/tarmak/tarmak_clusters_debug_puppet.rst +++ b/docs/generated/cmd/tarmak/tarmak_clusters_debug_puppet.rst @@ -23,13 +23,13 @@ Options inherited from parent commands :: - -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") - --current-cluster string override the current cluster set in the config - --keep-containers do not clean-up terraform/packer containers after running them - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint - -v, --verbose enable verbose logging - --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub SEE ALSO ~~~~~~~~ diff --git a/docs/generated/cmd/tarmak/tarmak_clusters_debug_puppet_build-tar.rst b/docs/generated/cmd/tarmak/tarmak_clusters_debug_puppet_build-tar.rst index 4da029cfbb..0584288e25 100644 --- a/docs/generated/cmd/tarmak/tarmak_clusters_debug_puppet_build-tar.rst +++ b/docs/generated/cmd/tarmak/tarmak_clusters_debug_puppet_build-tar.rst @@ -27,13 +27,13 @@ Options inherited from parent commands :: - -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") - --current-cluster string override the current cluster set in the config - --keep-containers do not clean-up terraform/packer containers after running them - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint - -v, --verbose enable verbose logging - --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub SEE ALSO ~~~~~~~~ diff --git a/docs/generated/cmd/tarmak/tarmak_clusters_debug_terraform.rst b/docs/generated/cmd/tarmak/tarmak_clusters_debug_terraform.rst index a4d8904112..fbd26c7b35 100644 --- a/docs/generated/cmd/tarmak/tarmak_clusters_debug_terraform.rst +++ b/docs/generated/cmd/tarmak/tarmak_clusters_debug_terraform.rst @@ -23,13 +23,13 @@ Options inherited from parent commands :: - -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") - --current-cluster string override the current cluster set in the config - --keep-containers do not clean-up terraform/packer containers after running them - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint - -v, --verbose enable verbose logging - --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub SEE ALSO ~~~~~~~~ diff --git a/docs/generated/cmd/tarmak/tarmak_clusters_debug_terraform_shell.rst b/docs/generated/cmd/tarmak/tarmak_clusters_debug_terraform_shell.rst index d667309bc5..88c6279bcb 100644 --- a/docs/generated/cmd/tarmak/tarmak_clusters_debug_terraform_shell.rst +++ b/docs/generated/cmd/tarmak/tarmak_clusters_debug_terraform_shell.rst @@ -27,13 +27,13 @@ Options inherited from parent commands :: - -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") - --current-cluster string override the current cluster set in the config - --keep-containers do not clean-up terraform/packer containers after running them - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint - -v, --verbose enable verbose logging - --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub SEE ALSO ~~~~~~~~ diff --git a/docs/generated/cmd/tarmak/tarmak_clusters_destroy.rst b/docs/generated/cmd/tarmak/tarmak_clusters_destroy.rst index afa4b90c39..489ded1531 100644 --- a/docs/generated/cmd/tarmak/tarmak_clusters_destroy.rst +++ b/docs/generated/cmd/tarmak/tarmak_clusters_destroy.rst @@ -28,13 +28,13 @@ Options inherited from parent commands :: - -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") - --current-cluster string override the current cluster set in the config - --keep-containers do not clean-up terraform/packer containers after running them - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint - -v, --verbose enable verbose logging - --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub SEE ALSO ~~~~~~~~ diff --git a/docs/generated/cmd/tarmak/tarmak_clusters_force-unlock.rst b/docs/generated/cmd/tarmak/tarmak_clusters_force-unlock.rst index 0ae98ac8a0..42cd1cc86a 100644 --- a/docs/generated/cmd/tarmak/tarmak_clusters_force-unlock.rst +++ b/docs/generated/cmd/tarmak/tarmak_clusters_force-unlock.rst @@ -27,13 +27,13 @@ Options inherited from parent commands :: - -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") - --current-cluster string override the current cluster set in the config - --keep-containers do not clean-up terraform/packer containers after running them - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint - -v, --verbose enable verbose logging - --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub SEE ALSO ~~~~~~~~ diff --git a/docs/generated/cmd/tarmak/tarmak_clusters_images.rst b/docs/generated/cmd/tarmak/tarmak_clusters_images.rst index e22d86f668..438909ef52 100644 --- a/docs/generated/cmd/tarmak/tarmak_clusters_images.rst +++ b/docs/generated/cmd/tarmak/tarmak_clusters_images.rst @@ -23,13 +23,13 @@ Options inherited from parent commands :: - -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") - --current-cluster string override the current cluster set in the config - --keep-containers do not clean-up terraform/packer containers after running them - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint - -v, --verbose enable verbose logging - --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub SEE ALSO ~~~~~~~~ diff --git a/docs/generated/cmd/tarmak/tarmak_clusters_images_build.rst b/docs/generated/cmd/tarmak/tarmak_clusters_images_build.rst index 8c892c5284..5c9a59662e 100644 --- a/docs/generated/cmd/tarmak/tarmak_clusters_images_build.rst +++ b/docs/generated/cmd/tarmak/tarmak_clusters_images_build.rst @@ -28,13 +28,13 @@ Options inherited from parent commands :: - -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") - --current-cluster string override the current cluster set in the config - --keep-containers do not clean-up terraform/packer containers after running them - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint - -v, --verbose enable verbose logging - --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub SEE ALSO ~~~~~~~~ diff --git a/docs/generated/cmd/tarmak/tarmak_clusters_images_list.rst b/docs/generated/cmd/tarmak/tarmak_clusters_images_list.rst index dd32dcb178..f0984fdc37 100644 --- a/docs/generated/cmd/tarmak/tarmak_clusters_images_list.rst +++ b/docs/generated/cmd/tarmak/tarmak_clusters_images_list.rst @@ -27,13 +27,13 @@ Options inherited from parent commands :: - -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") - --current-cluster string override the current cluster set in the config - --keep-containers do not clean-up terraform/packer containers after running them - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint - -v, --verbose enable verbose logging - --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub SEE ALSO ~~~~~~~~ diff --git a/docs/generated/cmd/tarmak/tarmak_clusters_instances.rst b/docs/generated/cmd/tarmak/tarmak_clusters_instances.rst index 479c358a5e..095610fd1a 100644 --- a/docs/generated/cmd/tarmak/tarmak_clusters_instances.rst +++ b/docs/generated/cmd/tarmak/tarmak_clusters_instances.rst @@ -23,13 +23,13 @@ Options inherited from parent commands :: - -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") - --current-cluster string override the current cluster set in the config - --keep-containers do not clean-up terraform/packer containers after running them - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint - -v, --verbose enable verbose logging - --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub SEE ALSO ~~~~~~~~ diff --git a/docs/generated/cmd/tarmak/tarmak_clusters_instances_list.rst b/docs/generated/cmd/tarmak/tarmak_clusters_instances_list.rst index b6820f639e..e82cb498b9 100644 --- a/docs/generated/cmd/tarmak/tarmak_clusters_instances_list.rst +++ b/docs/generated/cmd/tarmak/tarmak_clusters_instances_list.rst @@ -27,13 +27,13 @@ Options inherited from parent commands :: - -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") - --current-cluster string override the current cluster set in the config - --keep-containers do not clean-up terraform/packer containers after running them - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint - -v, --verbose enable verbose logging - --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub SEE ALSO ~~~~~~~~ diff --git a/docs/generated/cmd/tarmak/tarmak_clusters_instances_ssh.rst b/docs/generated/cmd/tarmak/tarmak_clusters_instances_ssh.rst deleted file mode 100644 index a46438f20f..0000000000 --- a/docs/generated/cmd/tarmak/tarmak_clusters_instances_ssh.rst +++ /dev/null @@ -1,42 +0,0 @@ -.. _tarmak_clusters_instances_ssh: - -tarmak clusters instances ssh ------------------------------ - -Log into an instance with SSH - -Synopsis -~~~~~~~~ - - -Log into an instance with SSH - -:: - - tarmak clusters instances ssh [instance alias] [optional ssh command] - -Options -~~~~~~~ - -:: - - -h, --help help for ssh - -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") - --current-cluster string override the current cluster set in the config - --keep-containers do not clean-up terraform/packer containers after running them - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint - -v, --verbose enable verbose logging - --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub - -SEE ALSO -~~~~~~~~ - -* `tarmak clusters instances `_ - Operations on instances - diff --git a/docs/generated/cmd/tarmak/tarmak_clusters_list.rst b/docs/generated/cmd/tarmak/tarmak_clusters_list.rst index 8713f65272..d0542a62f2 100644 --- a/docs/generated/cmd/tarmak/tarmak_clusters_list.rst +++ b/docs/generated/cmd/tarmak/tarmak_clusters_list.rst @@ -27,13 +27,13 @@ Options inherited from parent commands :: - -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") - --current-cluster string override the current cluster set in the config - --keep-containers do not clean-up terraform/packer containers after running them - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint - -v, --verbose enable verbose logging - --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub SEE ALSO ~~~~~~~~ diff --git a/docs/generated/cmd/tarmak/tarmak_clusters_plan.rst b/docs/generated/cmd/tarmak/tarmak_clusters_plan.rst index a51fc699b9..384f1184b5 100644 --- a/docs/generated/cmd/tarmak/tarmak_clusters_plan.rst +++ b/docs/generated/cmd/tarmak/tarmak_clusters_plan.rst @@ -28,13 +28,13 @@ Options inherited from parent commands :: - -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") - --current-cluster string override the current cluster set in the config - --keep-containers do not clean-up terraform/packer containers after running them - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint - -v, --verbose enable verbose logging - --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub SEE ALSO ~~~~~~~~ diff --git a/docs/generated/cmd/tarmak/tarmak_clusters_set-current.rst b/docs/generated/cmd/tarmak/tarmak_clusters_set-current.rst index d50937d179..349f473122 100644 --- a/docs/generated/cmd/tarmak/tarmak_clusters_set-current.rst +++ b/docs/generated/cmd/tarmak/tarmak_clusters_set-current.rst @@ -27,13 +27,13 @@ Options inherited from parent commands :: - -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") - --current-cluster string override the current cluster set in the config - --keep-containers do not clean-up terraform/packer containers after running them - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint - -v, --verbose enable verbose logging - --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub SEE ALSO ~~~~~~~~ diff --git a/docs/generated/cmd/tarmak/tarmak_clusters_snapshot.rst b/docs/generated/cmd/tarmak/tarmak_clusters_snapshot.rst new file mode 100644 index 0000000000..27530b0dfd --- /dev/null +++ b/docs/generated/cmd/tarmak/tarmak_clusters_snapshot.rst @@ -0,0 +1,40 @@ +.. _tarmak_clusters_snapshot: + +tarmak clusters snapshot +------------------------ + +Manage snapshots of remote consul and etcd clusters + +Synopsis +~~~~~~~~ + + +Manage snapshots of remote consul and etcd clusters + +Options +~~~~~~~ + +:: + + -h, --help help for snapshot + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + +SEE ALSO +~~~~~~~~ + +* `tarmak clusters `_ - Operations on clusters +* `tarmak clusters snapshot consul `_ - Manage snapshots on remote consul clusters +* `tarmak clusters snapshot etcd `_ - Manage snapshots on remote etcd clusters + diff --git a/docs/generated/cmd/tarmak/tarmak_clusters_snapshot_consul.rst b/docs/generated/cmd/tarmak/tarmak_clusters_snapshot_consul.rst new file mode 100644 index 0000000000..cc93112f30 --- /dev/null +++ b/docs/generated/cmd/tarmak/tarmak_clusters_snapshot_consul.rst @@ -0,0 +1,40 @@ +.. _tarmak_clusters_snapshot_consul: + +tarmak clusters snapshot consul +------------------------------- + +Manage snapshots on remote consul clusters + +Synopsis +~~~~~~~~ + + +Manage snapshots on remote consul clusters + +Options +~~~~~~~ + +:: + + -h, --help help for consul + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + +SEE ALSO +~~~~~~~~ + +* `tarmak clusters snapshot `_ - Manage snapshots of remote consul and etcd clusters +* `tarmak clusters snapshot consul restore `_ - restore consul cluster with source snapshot +* `tarmak clusters snapshot consul save `_ - save consul cluster snapshot to target path + diff --git a/docs/generated/cmd/tarmak/tarmak_clusters_snapshot_consul_restore.rst b/docs/generated/cmd/tarmak/tarmak_clusters_snapshot_consul_restore.rst new file mode 100644 index 0000000000..a0a06500fe --- /dev/null +++ b/docs/generated/cmd/tarmak/tarmak_clusters_snapshot_consul_restore.rst @@ -0,0 +1,42 @@ +.. _tarmak_clusters_snapshot_consul_restore: + +tarmak clusters snapshot consul restore +--------------------------------------- + +restore consul cluster with source snapshot + +Synopsis +~~~~~~~~ + + +restore consul cluster with source snapshot + +:: + + tarmak clusters snapshot consul restore [source path] [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for restore + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + +SEE ALSO +~~~~~~~~ + +* `tarmak clusters snapshot consul `_ - Manage snapshots on remote consul clusters + diff --git a/docs/generated/cmd/tarmak/tarmak_clusters_snapshot_consul_save.rst b/docs/generated/cmd/tarmak/tarmak_clusters_snapshot_consul_save.rst new file mode 100644 index 0000000000..865d7f3c67 --- /dev/null +++ b/docs/generated/cmd/tarmak/tarmak_clusters_snapshot_consul_save.rst @@ -0,0 +1,42 @@ +.. _tarmak_clusters_snapshot_consul_save: + +tarmak clusters snapshot consul save +------------------------------------ + +save consul cluster snapshot to target path + +Synopsis +~~~~~~~~ + + +save consul cluster snapshot to target path + +:: + + tarmak clusters snapshot consul save [target path] [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for save + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + +SEE ALSO +~~~~~~~~ + +* `tarmak clusters snapshot consul `_ - Manage snapshots on remote consul clusters + diff --git a/docs/generated/cmd/tarmak/tarmak_clusters_snapshot_etcd.rst b/docs/generated/cmd/tarmak/tarmak_clusters_snapshot_etcd.rst new file mode 100644 index 0000000000..edfbdc74a0 --- /dev/null +++ b/docs/generated/cmd/tarmak/tarmak_clusters_snapshot_etcd.rst @@ -0,0 +1,40 @@ +.. _tarmak_clusters_snapshot_etcd: + +tarmak clusters snapshot etcd +----------------------------- + +Manage snapshots on remote etcd clusters + +Synopsis +~~~~~~~~ + + +Manage snapshots on remote etcd clusters + +Options +~~~~~~~ + +:: + + -h, --help help for etcd + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + +SEE ALSO +~~~~~~~~ + +* `tarmak clusters snapshot `_ - Manage snapshots of remote consul and etcd clusters +* `tarmak clusters snapshot etcd restore `_ - restore etcd cluster with source snapshots +* `tarmak clusters snapshot etcd save `_ - save etcd snapshot to target path prefix, i.e 'backup-' + diff --git a/docs/generated/cmd/tarmak/tarmak_clusters_snapshot_etcd_restore.rst b/docs/generated/cmd/tarmak/tarmak_clusters_snapshot_etcd_restore.rst new file mode 100644 index 0000000000..b552a1025d --- /dev/null +++ b/docs/generated/cmd/tarmak/tarmak_clusters_snapshot_etcd_restore.rst @@ -0,0 +1,45 @@ +.. _tarmak_clusters_snapshot_etcd_restore: + +tarmak clusters snapshot etcd restore +------------------------------------- + +restore etcd cluster with source snapshots + +Synopsis +~~~~~~~~ + + +restore etcd cluster with source snapshots + +:: + + tarmak clusters snapshot etcd restore [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for restore + --k8s-events string location of k8s-events snapshot backup + --k8s-main string location of k8s-main snapshot backup + --overlay string location of overlay snapshot backup + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + +SEE ALSO +~~~~~~~~ + +* `tarmak clusters snapshot etcd `_ - Manage snapshots on remote etcd clusters + diff --git a/docs/generated/cmd/tarmak/tarmak_clusters_snapshot_etcd_save.rst b/docs/generated/cmd/tarmak/tarmak_clusters_snapshot_etcd_save.rst new file mode 100644 index 0000000000..f59490c0b9 --- /dev/null +++ b/docs/generated/cmd/tarmak/tarmak_clusters_snapshot_etcd_save.rst @@ -0,0 +1,42 @@ +.. _tarmak_clusters_snapshot_etcd_save: + +tarmak clusters snapshot etcd save +---------------------------------- + +save etcd snapshot to target path prefix, i.e 'backup-' + +Synopsis +~~~~~~~~ + + +save etcd snapshot to target path prefix, i.e 'backup-' + +:: + + tarmak clusters snapshot etcd save [target path prefix] [flags] + +Options +~~~~~~~ + +:: + + -h, --help help for save + +Options inherited from parent commands +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + +SEE ALSO +~~~~~~~~ + +* `tarmak clusters snapshot etcd `_ - Manage snapshots on remote etcd clusters + diff --git a/docs/generated/cmd/tarmak/tarmak_clusters_ssh.rst b/docs/generated/cmd/tarmak/tarmak_clusters_ssh.rst index cde928eaed..b280626211 100644 --- a/docs/generated/cmd/tarmak/tarmak_clusters_ssh.rst +++ b/docs/generated/cmd/tarmak/tarmak_clusters_ssh.rst @@ -13,7 +13,7 @@ Log into an instance with SSH :: - tarmak clusters ssh [instance alias] [optional ssh command] + tarmak clusters ssh [instance alias] [optional ssh arguments] Options ~~~~~~~ @@ -27,13 +27,13 @@ Options inherited from parent commands :: - -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") - --current-cluster string override the current cluster set in the config - --keep-containers do not clean-up terraform/packer containers after running them - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint - -v, --verbose enable verbose logging - --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub SEE ALSO ~~~~~~~~ diff --git a/docs/generated/cmd/tarmak/tarmak_environments.rst b/docs/generated/cmd/tarmak/tarmak_environments.rst index c2466c49e0..9cccba33db 100644 --- a/docs/generated/cmd/tarmak/tarmak_environments.rst +++ b/docs/generated/cmd/tarmak/tarmak_environments.rst @@ -23,13 +23,13 @@ Options inherited from parent commands :: - -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") - --current-cluster string override the current cluster set in the config - --keep-containers do not clean-up terraform/packer containers after running them - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint - -v, --verbose enable verbose logging - --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub SEE ALSO ~~~~~~~~ diff --git a/docs/generated/cmd/tarmak/tarmak_environments_init.rst b/docs/generated/cmd/tarmak/tarmak_environments_init.rst index 0cb9b2737e..df90b09e6b 100644 --- a/docs/generated/cmd/tarmak/tarmak_environments_init.rst +++ b/docs/generated/cmd/tarmak/tarmak_environments_init.rst @@ -27,13 +27,13 @@ Options inherited from parent commands :: - -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") - --current-cluster string override the current cluster set in the config - --keep-containers do not clean-up terraform/packer containers after running them - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint - -v, --verbose enable verbose logging - --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub SEE ALSO ~~~~~~~~ diff --git a/docs/generated/cmd/tarmak/tarmak_environments_list.rst b/docs/generated/cmd/tarmak/tarmak_environments_list.rst index 1d3a07b5b6..7c2c0f2094 100644 --- a/docs/generated/cmd/tarmak/tarmak_environments_list.rst +++ b/docs/generated/cmd/tarmak/tarmak_environments_list.rst @@ -27,13 +27,13 @@ Options inherited from parent commands :: - -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") - --current-cluster string override the current cluster set in the config - --keep-containers do not clean-up terraform/packer containers after running them - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint - -v, --verbose enable verbose logging - --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub SEE ALSO ~~~~~~~~ diff --git a/docs/generated/cmd/tarmak/tarmak_init.rst b/docs/generated/cmd/tarmak/tarmak_init.rst index 6b0e17f5a7..afef1b0f26 100644 --- a/docs/generated/cmd/tarmak/tarmak_init.rst +++ b/docs/generated/cmd/tarmak/tarmak_init.rst @@ -27,13 +27,13 @@ Options inherited from parent commands :: - -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") - --current-cluster string override the current cluster set in the config - --keep-containers do not clean-up terraform/packer containers after running them - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint - -v, --verbose enable verbose logging - --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub SEE ALSO ~~~~~~~~ diff --git a/docs/generated/cmd/tarmak/tarmak_kubeconfig.rst b/docs/generated/cmd/tarmak/tarmak_kubeconfig.rst index 1c562d1063..a857e3c641 100644 --- a/docs/generated/cmd/tarmak/tarmak_kubeconfig.rst +++ b/docs/generated/cmd/tarmak/tarmak_kubeconfig.rst @@ -28,13 +28,13 @@ Options inherited from parent commands :: - -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") - --current-cluster string override the current cluster set in the config - --keep-containers do not clean-up terraform/packer containers after running them - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint - -v, --verbose enable verbose logging - --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub SEE ALSO ~~~~~~~~ diff --git a/docs/generated/cmd/tarmak/tarmak_kubectl.rst b/docs/generated/cmd/tarmak/tarmak_kubectl.rst index e2a8a2ee5c..8ac2236703 100644 --- a/docs/generated/cmd/tarmak/tarmak_kubectl.rst +++ b/docs/generated/cmd/tarmak/tarmak_kubectl.rst @@ -27,13 +27,13 @@ Options inherited from parent commands :: - -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") - --current-cluster string override the current cluster set in the config - --keep-containers do not clean-up terraform/packer containers after running them - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint - -v, --verbose enable verbose logging - --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub SEE ALSO ~~~~~~~~ diff --git a/docs/generated/cmd/tarmak/tarmak_providers.rst b/docs/generated/cmd/tarmak/tarmak_providers.rst index 101b7d2f7a..47ab2c55a7 100644 --- a/docs/generated/cmd/tarmak/tarmak_providers.rst +++ b/docs/generated/cmd/tarmak/tarmak_providers.rst @@ -23,13 +23,13 @@ Options inherited from parent commands :: - -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") - --current-cluster string override the current cluster set in the config - --keep-containers do not clean-up terraform/packer containers after running them - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint - -v, --verbose enable verbose logging - --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub SEE ALSO ~~~~~~~~ diff --git a/docs/generated/cmd/tarmak/tarmak_providers_init.rst b/docs/generated/cmd/tarmak/tarmak_providers_init.rst index 5cbb04fab0..1dd2f5583d 100644 --- a/docs/generated/cmd/tarmak/tarmak_providers_init.rst +++ b/docs/generated/cmd/tarmak/tarmak_providers_init.rst @@ -27,13 +27,13 @@ Options inherited from parent commands :: - -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") - --current-cluster string override the current cluster set in the config - --keep-containers do not clean-up terraform/packer containers after running them - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint - -v, --verbose enable verbose logging - --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub SEE ALSO ~~~~~~~~ diff --git a/docs/generated/cmd/tarmak/tarmak_providers_list.rst b/docs/generated/cmd/tarmak/tarmak_providers_list.rst index 7d5e805c72..1ba8ba9baa 100644 --- a/docs/generated/cmd/tarmak/tarmak_providers_list.rst +++ b/docs/generated/cmd/tarmak/tarmak_providers_list.rst @@ -27,13 +27,13 @@ Options inherited from parent commands :: - -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") - --current-cluster string override the current cluster set in the config - --keep-containers do not clean-up terraform/packer containers after running them - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint - -v, --verbose enable verbose logging - --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub SEE ALSO ~~~~~~~~ diff --git a/docs/generated/cmd/tarmak/tarmak_providers_validate.rst b/docs/generated/cmd/tarmak/tarmak_providers_validate.rst index f05de39789..89a01c1d21 100644 --- a/docs/generated/cmd/tarmak/tarmak_providers_validate.rst +++ b/docs/generated/cmd/tarmak/tarmak_providers_validate.rst @@ -27,13 +27,13 @@ Options inherited from parent commands :: - -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") - --current-cluster string override the current cluster set in the config - --keep-containers do not clean-up terraform/packer containers after running them - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint - -v, --verbose enable verbose logging - --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub SEE ALSO ~~~~~~~~ diff --git a/docs/generated/cmd/tarmak/tarmak_version.rst b/docs/generated/cmd/tarmak/tarmak_version.rst index 564fc5ae98..25959c3941 100644 --- a/docs/generated/cmd/tarmak/tarmak_version.rst +++ b/docs/generated/cmd/tarmak/tarmak_version.rst @@ -27,13 +27,13 @@ Options inherited from parent commands :: - -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") - --current-cluster string override the current cluster set in the config - --keep-containers do not clean-up terraform/packer containers after running them - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint - -v, --verbose enable verbose logging - --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub + -c, --config-directory string config directory for tarmak's configuration (default "~/.tarmak") + --current-cluster string override the current cluster set in the config + --ignore-missing-public-key-tags ssh_known_hosts ignore missing public key tags on instances, by falling back to populating ssh_known_hosts with the first connection (default true) + --keep-containers do not clean-up terraform/packer containers after running them + --public-api-endpoint Override kubeconfig to point to cluster's public API endpoint + -v, --verbose enable verbose logging + --wing-dev-mode use a bundled wing version rather than a tagged release from GitHub SEE ALSO ~~~~~~~~ diff --git a/docs/generated/cmd/wing/wing.rst b/docs/generated/cmd/wing/wing.rst index f1f6df7819..cd1f62a536 100644 --- a/docs/generated/cmd/wing/wing.rst +++ b/docs/generated/cmd/wing/wing.rst @@ -16,13 +16,13 @@ Options :: - -h, --help help for wing - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) + -h, --help help for wing SEE ALSO ~~~~~~~~ -* `wing agent `_ - +* `wing agent `_ - Launch Wing agent * `wing server `_ - Launch a wing API server +* `wing tag `_ - Ensure public key tagging of instance * `wing version `_ - Print the version number of tarmak diff --git a/docs/generated/cmd/wing/wing_agent.rst b/docs/generated/cmd/wing/wing_agent.rst index 80c7ebc1a4..22aea9e538 100644 --- a/docs/generated/cmd/wing/wing_agent.rst +++ b/docs/generated/cmd/wing/wing_agent.rst @@ -3,13 +3,13 @@ wing agent ---------- - +Launch Wing agent Synopsis ~~~~~~~~ - +Launch Wing agent :: @@ -26,13 +26,6 @@ Options --manifest-url string this specifies the URL where the puppet.tar.gz can be found --server-url string this specifies the URL to the wing server (default "https://localhost:9443") -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - SEE ALSO ~~~~~~~~ diff --git a/docs/generated/cmd/wing/wing_server.rst b/docs/generated/cmd/wing/wing_server.rst index 9f4c4d7d97..3a56d6231a 100644 --- a/docs/generated/cmd/wing/wing_server.rst +++ b/docs/generated/cmd/wing/wing_server.rst @@ -26,6 +26,7 @@ Options --delete-collection-workers int Number of workers spawned for DeleteCollection call. These are used to speed up namespace cleanup. (default 1) --enable-garbage-collector Enables the generic garbage collector. MUST be synced with the corresponding flag of the kube-controller-manager. (default true) --encryption-provider-config string The file containing configuration for encryption providers to be used for storing secrets in etcd + --environment string this specifies the environment name --etcd-cafile string SSL Certificate Authority file used to secure etcd communication. --etcd-certfile string SSL certification file used to secure etcd communication. --etcd-compaction-interval duration The interval of compaction requests. If 0, the compaction request from apiserver is disabled. (default 5m0s) @@ -47,13 +48,6 @@ Options --watch-cache Enable watch caching in the apiserver (default true) --watch-cache-sizes strings List of watch cache sizes for every resource (pods, nodes, etc.), comma separated. The individual override format: resource[.group]#size, where resource is lowercase plural (no version), group is optional, and size is a number. It takes effect when watch-cache is enabled. Some resources (replicationcontrollers, endpoints, nodes, pods, services, apiservices.apiregistration.k8s.io) have system defaults set by heuristics, others default to default-watch-cache-size -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - SEE ALSO ~~~~~~~~ diff --git a/docs/generated/cmd/wing/wing_tag.rst b/docs/generated/cmd/wing/wing_tag.rst new file mode 100644 index 0000000000..0e522908ac --- /dev/null +++ b/docs/generated/cmd/wing/wing_tag.rst @@ -0,0 +1,30 @@ +.. _wing_tag: + +wing tag +-------- + +Ensure public key tagging of instance + +Synopsis +~~~~~~~~ + + +Ensure public key tagging of instance + +:: + + wing tag [flags] + +Options +~~~~~~~ + +:: + + --environment string this specifies the environment name + -h, --help help for tag + +SEE ALSO +~~~~~~~~ + +* `wing `_ - wing is the agent component for tarmak, it runs on every instance of tarmak + diff --git a/docs/generated/cmd/wing/wing_version.rst b/docs/generated/cmd/wing/wing_version.rst index abff5f592e..7265bd02ed 100644 --- a/docs/generated/cmd/wing/wing_version.rst +++ b/docs/generated/cmd/wing/wing_version.rst @@ -22,13 +22,6 @@ Options -h, --help help for version -Options inherited from parent commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:: - - --log-flush-frequency duration Maximum number of seconds between log flushes (default 5s) - SEE ALSO ~~~~~~~~ diff --git a/docs/generated/reference/output/api-docs.html b/docs/generated/reference/output/api-docs.html index 05ffa87c76..8c3b85269f 100644 --- a/docs/generated/reference/output/api-docs.html +++ b/docs/generated/reference/output/api-docs.html @@ -11,7 +11,7 @@ - +

    Tarmak

    @@ -172,6 +172,10 @@

    Flags v1alpha1

    +ignoreMissingPublicKeyTags
    boolean +Do not error when instances are missing their public key tags. Instead use first connection as fallback + + initialize
    boolean @@ -644,6 +648,10 @@

    ClusterFlags v1alpha1

    plan
    ClusterPlanFlags flags for handling images + +snapshot
    ClusterSnapshotFlags +flags for kubeconfig of clusters +

    ClusterImagesBuildFlags v1alpha1

    @@ -1557,6 +1565,131 @@

    ClusterPodSecurityPolicy v1alpha1

    +

    ClusterSnapshotEtcdFlags v1alpha1

    + + + + + + + + + + + + + + + +
    GroupVersionKind
    tarmakv1alpha1ClusterSnapshotEtcdFlags
    +

    Contains the cluster snapshot etcd flags

    + + + + + + + + + + + + + + + +
    FieldDescription
    restore
    ClusterSnapshotEtcdRestoreFlags
    +

    ClusterSnapshotEtcdRestoreFlags v1alpha1

    + + + + + + + + + + + + + + + +
    GroupVersionKind
    tarmakv1alpha1ClusterSnapshotEtcdRestoreFlags
    +

    Contains the cluster snapshot etcd restore flags

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldDescription
    k8sEvents
    string
    Path to k8s-main snapshot backup
    k8sMain
    string
    overlay
    string
    Path to k8s-events snapshot backup
    +

    ClusterSnapshotFlags v1alpha1

    + + + + + + + + + + + + + + + +
    GroupVersionKind
    tarmakv1alpha1ClusterSnapshotFlags
    +

    Contains the cluster snapshot flags

    + + + + + + + + + + + + + + + +
    FieldDescription
    etcd
    ClusterSnapshotEtcdFlags

    ClusterVaultHelper v1alpha1

    diff --git a/docs/generated/reference/output/navData.js b/docs/generated/reference/output/navData.js index 4a6a007661..0875d80bc0 100644 --- a/docs/generated/reference/output/navData.js +++ b/docs/generated/reference/output/navData.js @@ -1 +1 @@ -(function(){navData = {"toc":[{"section":"-strong-field-definitions-strong-","subsections":[{"section":"volume-v1alpha1"},{"section":"values-v1alpha1"},{"section":"taint-v1alpha1"},{"section":"subnet-v1alpha1"},{"section":"ssh-v1alpha1"},{"section":"providergcp-v1alpha1"},{"section":"providerazure-v1alpha1"},{"section":"provideramazon-v1alpha1"},{"section":"provider-v1alpha1"},{"section":"network-v1alpha1"},{"section":"loggingsinkelasticsearch-v1alpha1"},{"section":"loggingsink-v1alpha1"},{"section":"label-v1alpha1"},{"section":"kubernetesapi-v1alpha1"},{"section":"internetgw-v1alpha1"},{"section":"instancestatusmanifest-v1alpha1"},{"section":"instancespecmanifest-v1alpha1"},{"section":"instancepoolkubernetes-v1alpha1"},{"section":"instancepoolamazon-v1alpha1"},{"section":"instancepool-v1alpha1"},{"section":"ingressrule-v1alpha1"},{"section":"httpbasicauth-v1alpha1"},{"section":"firewall-v1alpha1"},{"section":"environment-v1alpha1"},{"section":"egressrule-v1alpha1"},{"section":"clustervaulthelper-v1alpha1"},{"section":"clusterpodsecuritypolicy-v1alpha1"},{"section":"clusterplanflags-v1alpha1"},{"section":"clusterkubernetestiller-v1alpha1"},{"section":"clusterkubernetesscheduler-v1alpha1"},{"section":"clusterkubernetesproxy-v1alpha1"},{"section":"clusterkubernetesprometheus-v1alpha1"},{"section":"clusterkuberneteskubelet-v1alpha1"},{"section":"clusterkubernetesdashboard-v1alpha1"},{"section":"clusterkubernetescontrollermanager-v1alpha1"},{"section":"clusterkubernetesclusterautoscaleroverprovisioning-v1alpha1"},{"section":"clusterkubernetesclusterautoscaler-v1alpha1"},{"section":"clusterkubernetesapiserveroidc-v1alpha1"},{"section":"clusterkubernetesapiserveramazonaccesslogs-v1alpha1"},{"section":"clusterkubernetesapiserveramazon-v1alpha1"},{"section":"clusterkubernetesapiserver-v1alpha1"},{"section":"clusterkubernetes-v1alpha1"},{"section":"clusterkubeconfigflags-v1alpha1"},{"section":"clusterimagesflags-v1alpha1"},{"section":"clusterimagesbuildflags-v1alpha1"},{"section":"clusterflags-v1alpha1"},{"section":"clusterdestroyflags-v1alpha1"},{"section":"clusterapplyflags-v1alpha1"},{"section":"clusteramazon-v1alpha1"},{"section":"amazonesproxy-v1alpha1"}]},{"section":"-strong-old-api-versions-strong-","subsections":[]},{"section":"instance-v1alpha1","subsections":[]},{"section":"cluster-v1alpha1","subsections":[]},{"section":"flags-v1alpha1","subsections":[]},{"section":"image-v1alpha1","subsections":[]},{"section":"config-v1alpha1","subsections":[]},{"section":"-strong-tarmak-strong-","subsections":[]}],"flatToc":["volume-v1alpha1","values-v1alpha1","taint-v1alpha1","subnet-v1alpha1","ssh-v1alpha1","providergcp-v1alpha1","providerazure-v1alpha1","provideramazon-v1alpha1","provider-v1alpha1","network-v1alpha1","loggingsinkelasticsearch-v1alpha1","loggingsink-v1alpha1","label-v1alpha1","kubernetesapi-v1alpha1","internetgw-v1alpha1","instancestatusmanifest-v1alpha1","instancespecmanifest-v1alpha1","instancepoolkubernetes-v1alpha1","instancepoolamazon-v1alpha1","instancepool-v1alpha1","ingressrule-v1alpha1","httpbasicauth-v1alpha1","firewall-v1alpha1","environment-v1alpha1","egressrule-v1alpha1","clustervaulthelper-v1alpha1","clusterpodsecuritypolicy-v1alpha1","clusterplanflags-v1alpha1","clusterkubernetestiller-v1alpha1","clusterkubernetesscheduler-v1alpha1","clusterkubernetesproxy-v1alpha1","clusterkubernetesprometheus-v1alpha1","clusterkuberneteskubelet-v1alpha1","clusterkubernetesdashboard-v1alpha1","clusterkubernetescontrollermanager-v1alpha1","clusterkubernetesclusterautoscaleroverprovisioning-v1alpha1","clusterkubernetesclusterautoscaler-v1alpha1","clusterkubernetesapiserveroidc-v1alpha1","clusterkubernetesapiserveramazonaccesslogs-v1alpha1","clusterkubernetesapiserveramazon-v1alpha1","clusterkubernetesapiserver-v1alpha1","clusterkubernetes-v1alpha1","clusterkubeconfigflags-v1alpha1","clusterimagesflags-v1alpha1","clusterimagesbuildflags-v1alpha1","clusterflags-v1alpha1","clusterdestroyflags-v1alpha1","clusterapplyflags-v1alpha1","clusteramazon-v1alpha1","amazonesproxy-v1alpha1","-strong-field-definitions-strong-","-strong-old-api-versions-strong-","instance-v1alpha1","cluster-v1alpha1","flags-v1alpha1","image-v1alpha1","config-v1alpha1","-strong-tarmak-strong-"]};})(); \ No newline at end of file +(function(){navData = {"toc":[{"section":"-strong-field-definitions-strong-","subsections":[{"section":"volume-v1alpha1"},{"section":"values-v1alpha1"},{"section":"taint-v1alpha1"},{"section":"subnet-v1alpha1"},{"section":"ssh-v1alpha1"},{"section":"providergcp-v1alpha1"},{"section":"providerazure-v1alpha1"},{"section":"provideramazon-v1alpha1"},{"section":"provider-v1alpha1"},{"section":"network-v1alpha1"},{"section":"loggingsinkelasticsearch-v1alpha1"},{"section":"loggingsink-v1alpha1"},{"section":"label-v1alpha1"},{"section":"kubernetesapi-v1alpha1"},{"section":"internetgw-v1alpha1"},{"section":"instancestatusmanifest-v1alpha1"},{"section":"instancespecmanifest-v1alpha1"},{"section":"instancepoolkubernetes-v1alpha1"},{"section":"instancepoolamazon-v1alpha1"},{"section":"instancepool-v1alpha1"},{"section":"ingressrule-v1alpha1"},{"section":"httpbasicauth-v1alpha1"},{"section":"firewall-v1alpha1"},{"section":"environment-v1alpha1"},{"section":"egressrule-v1alpha1"},{"section":"clustervaulthelper-v1alpha1"},{"section":"clustersnapshotflags-v1alpha1"},{"section":"clustersnapshotetcdrestoreflags-v1alpha1"},{"section":"clustersnapshotetcdflags-v1alpha1"},{"section":"clusterpodsecuritypolicy-v1alpha1"},{"section":"clusterplanflags-v1alpha1"},{"section":"clusterkubernetestiller-v1alpha1"},{"section":"clusterkubernetesscheduler-v1alpha1"},{"section":"clusterkubernetesproxy-v1alpha1"},{"section":"clusterkubernetesprometheus-v1alpha1"},{"section":"clusterkuberneteskubelet-v1alpha1"},{"section":"clusterkubernetesdashboard-v1alpha1"},{"section":"clusterkubernetescontrollermanager-v1alpha1"},{"section":"clusterkubernetesclusterautoscaleroverprovisioning-v1alpha1"},{"section":"clusterkubernetesclusterautoscaler-v1alpha1"},{"section":"clusterkubernetesapiserveroidc-v1alpha1"},{"section":"clusterkubernetesapiserveramazonaccesslogs-v1alpha1"},{"section":"clusterkubernetesapiserveramazon-v1alpha1"},{"section":"clusterkubernetesapiserver-v1alpha1"},{"section":"clusterkubernetes-v1alpha1"},{"section":"clusterkubeconfigflags-v1alpha1"},{"section":"clusterimagesflags-v1alpha1"},{"section":"clusterimagesbuildflags-v1alpha1"},{"section":"clusterflags-v1alpha1"},{"section":"clusterdestroyflags-v1alpha1"},{"section":"clusterapplyflags-v1alpha1"},{"section":"clusteramazon-v1alpha1"},{"section":"amazonesproxy-v1alpha1"}]},{"section":"-strong-old-api-versions-strong-","subsections":[]},{"section":"instance-v1alpha1","subsections":[]},{"section":"cluster-v1alpha1","subsections":[]},{"section":"flags-v1alpha1","subsections":[]},{"section":"image-v1alpha1","subsections":[]},{"section":"config-v1alpha1","subsections":[]},{"section":"-strong-tarmak-strong-","subsections":[]}],"flatToc":["volume-v1alpha1","values-v1alpha1","taint-v1alpha1","subnet-v1alpha1","ssh-v1alpha1","providergcp-v1alpha1","providerazure-v1alpha1","provideramazon-v1alpha1","provider-v1alpha1","network-v1alpha1","loggingsinkelasticsearch-v1alpha1","loggingsink-v1alpha1","label-v1alpha1","kubernetesapi-v1alpha1","internetgw-v1alpha1","instancestatusmanifest-v1alpha1","instancespecmanifest-v1alpha1","instancepoolkubernetes-v1alpha1","instancepoolamazon-v1alpha1","instancepool-v1alpha1","ingressrule-v1alpha1","httpbasicauth-v1alpha1","firewall-v1alpha1","environment-v1alpha1","egressrule-v1alpha1","clustervaulthelper-v1alpha1","clustersnapshotflags-v1alpha1","clustersnapshotetcdrestoreflags-v1alpha1","clustersnapshotetcdflags-v1alpha1","clusterpodsecuritypolicy-v1alpha1","clusterplanflags-v1alpha1","clusterkubernetestiller-v1alpha1","clusterkubernetesscheduler-v1alpha1","clusterkubernetesproxy-v1alpha1","clusterkubernetesprometheus-v1alpha1","clusterkuberneteskubelet-v1alpha1","clusterkubernetesdashboard-v1alpha1","clusterkubernetescontrollermanager-v1alpha1","clusterkubernetesclusterautoscaleroverprovisioning-v1alpha1","clusterkubernetesclusterautoscaler-v1alpha1","clusterkubernetesapiserveroidc-v1alpha1","clusterkubernetesapiserveramazonaccesslogs-v1alpha1","clusterkubernetesapiserveramazon-v1alpha1","clusterkubernetesapiserver-v1alpha1","clusterkubernetes-v1alpha1","clusterkubeconfigflags-v1alpha1","clusterimagesflags-v1alpha1","clusterimagesbuildflags-v1alpha1","clusterflags-v1alpha1","clusterdestroyflags-v1alpha1","clusterapplyflags-v1alpha1","clusteramazon-v1alpha1","amazonesproxy-v1alpha1","-strong-field-definitions-strong-","-strong-old-api-versions-strong-","instance-v1alpha1","cluster-v1alpha1","flags-v1alpha1","image-v1alpha1","config-v1alpha1","-strong-tarmak-strong-"]};})(); \ No newline at end of file diff --git a/hack/cmd-gen/main.go b/hack/cmd-gen/main.go index b0fe2a2dd2..43bfec56d3 100644 --- a/hack/cmd-gen/main.go +++ b/hack/cmd-gen/main.go @@ -10,7 +10,9 @@ import ( log "github.com/sirupsen/logrus" "github.com/spf13/cobra" "github.com/spf13/cobra/doc" + "github.com/spf13/pflag" + taggingControlCmd "github.com/jetstack/tarmak/cmd/tagging_control/cmd" tarmakCmd "github.com/jetstack/tarmak/cmd/tarmak/cmd" wingCmd "github.com/jetstack/tarmak/cmd/wing/cmd" ) @@ -21,6 +23,9 @@ func main() { log.Fatal("expecting single output directory argument") } + // remove all global flags that are imported in + pflag.CommandLine = nil + root, err := homedir.Expand(args[1]) must(err) @@ -33,6 +38,7 @@ func main() { for _, c := range []*cobra.Command{ tarmakCmd.RootCmd, + taggingControlCmd.RootCmd, wingCmd.RootCmd, } { dir := filepath.Join(root, c.Use) diff --git a/hack/update-cmd-docs.sh b/hack/update-cmd-docs.sh index e8413a2222..ad47a9c5a4 100755 --- a/hack/update-cmd-docs.sh +++ b/hack/update-cmd-docs.sh @@ -49,11 +49,11 @@ cat > "${REPO_ROOT}/docs/cmd-docs.rst" << EOF Command Line Documentation ========================== -Command line documentation for both tarmak and wing commands +Command line documentation for tarmak, wing and tagging_control commands EOF -for cmd in "tarmak" "wing"; do +for cmd in "tarmak" "wing" "tagging_control" ; do farray=$(basename -s .rst -a ${OUTPUT_DIR}/${cmd}/* | sort) for f in ${farray}; do cat >> "${REPO_ROOT}/docs/cmd-docs.rst" << EOF diff --git a/pkg/apis/tarmak/v1alpha1/types.go b/pkg/apis/tarmak/v1alpha1/types.go index 7bc0683d78..d5cc7c57b7 100644 --- a/pkg/apis/tarmak/v1alpha1/types.go +++ b/pkg/apis/tarmak/v1alpha1/types.go @@ -137,6 +137,9 @@ type Flags struct { WingDevMode bool `json:"wingDevMode,omitempty"` // use a bundled wing version rather than a tagged release from GitHub PublicAPIEndpoint bool `json:"publicAPIEndpoint,omitempty"` // Use public endpoint to point kubeconfig to + + // Do not error when instances are missing their public key tags. Instead use first connection as fallback + IgnoreMissingPublicKeyTags bool `json:"ignoreMissingPublicKeyTags"` } // This contains the cluster specifc operation flags @@ -146,6 +149,7 @@ type ClusterFlags struct { Images ClusterImagesFlags `json:"images,omitempty"` // flags for handling images Plan ClusterPlanFlags `json:"plan,omitempty"` // flags for planning clusters Kubeconfig ClusterKubeconfigFlags `json:"kubeconfig,omitempty"` // flags for kubeconfig of clusters + Snapshot ClusterSnapshotFlags `json:"snapshot,omitempty"` // flags for snapshots of clusters } // Contains the cluster plan flags @@ -187,3 +191,20 @@ type ClusterImagesBuildFlags struct { type ClusterKubeconfigFlags struct { Path string `json:"path,omitempty"` // Path to save kubeconfig to } + +// Contains the cluster snapshot flags +type ClusterSnapshotFlags struct { + Etcd ClusterSnapshotEtcdFlags `json:"etcd,omitempty"` // flags for handling etcd snapshots +} + +// Contains the cluster snapshot etcd flags +type ClusterSnapshotEtcdFlags struct { + Restore ClusterSnapshotEtcdRestoreFlags `json:"restore,omitempty"` // flags for handling etcd snapshot restore +} + +// Contains the cluster snapshot etcd restore flags +type ClusterSnapshotEtcdRestoreFlags struct { + K8sMain string `json:"k8sMain,omitempty"` // Path to k8s-main snapshot backup + K8sEvents string `json:"k8sEvents,omitempty"` // Path to k8s-events snapshot backup + Overlay string `json:"overlay,omitempty"` // Path to overlay snapshot backup +} diff --git a/pkg/apis/tarmak/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/tarmak/v1alpha1/zz_generated.deepcopy.go index e1e40e0e6c..3d23af269c 100644 --- a/pkg/apis/tarmak/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/tarmak/v1alpha1/zz_generated.deepcopy.go @@ -51,6 +51,7 @@ func (in *ClusterFlags) DeepCopyInto(out *ClusterFlags) { out.Images = in.Images out.Plan = in.Plan out.Kubeconfig = in.Kubeconfig + out.Snapshot = in.Snapshot return } @@ -129,6 +130,56 @@ func (in *ClusterPlanFlags) DeepCopy() *ClusterPlanFlags { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterSnapshotEtcdFlags) DeepCopyInto(out *ClusterSnapshotEtcdFlags) { + *out = *in + out.Restore = in.Restore + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSnapshotEtcdFlags. +func (in *ClusterSnapshotEtcdFlags) DeepCopy() *ClusterSnapshotEtcdFlags { + if in == nil { + return nil + } + out := new(ClusterSnapshotEtcdFlags) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterSnapshotEtcdRestoreFlags) DeepCopyInto(out *ClusterSnapshotEtcdRestoreFlags) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSnapshotEtcdRestoreFlags. +func (in *ClusterSnapshotEtcdRestoreFlags) DeepCopy() *ClusterSnapshotEtcdRestoreFlags { + if in == nil { + return nil + } + out := new(ClusterSnapshotEtcdRestoreFlags) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterSnapshotFlags) DeepCopyInto(out *ClusterSnapshotFlags) { + *out = *in + out.Etcd = in.Etcd + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSnapshotFlags. +func (in *ClusterSnapshotFlags) DeepCopy() *ClusterSnapshotFlags { + if in == nil { + return nil + } + out := new(ClusterSnapshotFlags) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Config) DeepCopyInto(out *Config) { *out = *in diff --git a/pkg/tagging_control/tagging_control.go b/pkg/tagging_control/tagging_control.go new file mode 100644 index 0000000000..f2f79a325b --- /dev/null +++ b/pkg/tagging_control/tagging_control.go @@ -0,0 +1,249 @@ +// Copyright Jetstack Ltd. See LICENSE for details. +package tagging_control + +import ( + "context" + "crypto/x509" + "encoding/base64" + "encoding/json" + "encoding/pem" + "errors" + "fmt" + "os" + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/ec2metadata" + "github.com/aws/aws-sdk-go/aws/session" + "github.com/aws/aws-sdk-go/service/ec2" + "golang.org/x/crypto/ssh" +) + +const ( + tagSize = 255 + tagPrefix = "tarmak.io" + + AWSCACert = `-----BEGIN CERTIFICATE----- +MIIDIjCCAougAwIBAgIJAKnL4UEDMN/FMA0GCSqGSIb3DQEBBQUAMGoxCzAJBgNV +BAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdTZWF0dGxlMRgw +FgYDVQQKEw9BbWF6b24uY29tIEluYy4xGjAYBgNVBAMTEWVjMi5hbWF6b25hd3Mu +Y29tMB4XDTE0MDYwNTE0MjgwMloXDTI0MDYwNTE0MjgwMlowajELMAkGA1UEBhMC +VVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1NlYXR0bGUxGDAWBgNV +BAoTD0FtYXpvbi5jb20gSW5jLjEaMBgGA1UEAxMRZWMyLmFtYXpvbmF3cy5jb20w +gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAIe9GN//SRK2knbjySG0ho3yqQM3 +e2TDhWO8D2e8+XZqck754gFSo99AbT2RmXClambI7xsYHZFapbELC4H91ycihvrD +jbST1ZjkLQgga0NE1q43eS68ZeTDccScXQSNivSlzJZS8HJZjgqzBlXjZftjtdJL +XeE4hwvo0sD4f3j9AgMBAAGjgc8wgcwwHQYDVR0OBBYEFCXWzAgVyrbwnFncFFIs +77VBdlE4MIGcBgNVHSMEgZQwgZGAFCXWzAgVyrbwnFncFFIs77VBdlE4oW6kbDBq +MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHU2Vh +dHRsZTEYMBYGA1UEChMPQW1hem9uLmNvbSBJbmMuMRowGAYDVQQDExFlYzIuYW1h +em9uYXdzLmNvbYIJAKnL4UEDMN/FMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEF +BQADgYEAFYcz1OgEhQBXIwIdsgCOS8vEtiJYF+j9uO6jz7VOmJqO+pRlAbRlvY8T +C1haGgSI/A1uZUKs/Zfnph0oEI0/hu1IIJ/SKBDtN5lvmZ/IzbOPIJWirlsllQIQ +7zvWbGd9c9+Rm3p04oTvhup99la7kZqevJK0QRdD/6NpCKsqP/0= +-----END CERTIFICATE-----` +) + +type TagInstanceRequest struct { + PublicKeys map[string][]byte `json:"publicKeys"` + KeySignatures map[string]*ssh.Signature `json:"keySignatures"` + + InstanceDocumentRaw []byte `json:"document"` + RSASigniture []byte `json:"rsaSigniture"` +} + +type Handler struct { + request *TagInstanceRequest + ec2 *ec2.EC2 + document *ec2metadata.EC2InstanceIdentityDocument +} + +func HandleRequests(ctx context.Context, request TagInstanceRequest) error { + h := &Handler{ + request: &request, + } + + if err := h.verify(); err != nil { + // until we verify the instance, we won't reply any meaningful error message + fmt.Printf("failed to verify instance: %s", err) + return errors.New("rejected") + } + + document := new(ec2metadata.EC2InstanceIdentityDocument) + err := json.Unmarshal(h.request.InstanceDocumentRaw, document) + if err != nil { + return err + } + h.document = document + + tags := h.createTags() + exists, err := h.checkTagsAgainstInstance(tags) + if err != nil || exists { + return err + } + + // tags do not exist on instance so create + svc, err := h.EC2() + if err != nil { + return err + } + + var ec2Tags []*ec2.Tag + for k, v := range tags { + ec2Tags = append(ec2Tags, &ec2.Tag{ + Key: aws.String(k), + Value: aws.String(v), + }) + } + + _, err = svc.CreateTags(&ec2.CreateTagsInput{ + Tags: ec2Tags, + Resources: []*string{ + aws.String(h.document.InstanceID), + }, + }) + if err != nil { + return fmt.Errorf("failed to create tags for instance %s: %s", h.document.InstanceID, err) + } + + return nil +} + +// verify the rsa signature against the instance identity content and AWS global +// cert +func (h *Handler) verify() error { + block, rest := pem.Decode([]byte(AWSCACert)) + if len(rest) != 0 { + return fmt.Errorf("expected to fully parse AWS certificate but had remainder: %s", rest) + } + + awsCaCert, err := x509.ParseCertificate(block.Bytes) + if err != nil { + return err + } + + rsaSignature, err := base64.StdEncoding.DecodeString(string(h.request.RSASigniture)) + if err != nil { + return err + } + + err = awsCaCert.CheckSignature(x509.SHA256WithRSA, h.request.InstanceDocumentRaw, rsaSignature) + if err != nil { + return fmt.Errorf("failed to verify identity document signature against AWS: %s", err) + } + + // verify ssh keys + for k, v := range h.request.PublicKeys { + pk, _, _, rest, err := ssh.ParseAuthorizedKey(v) + if err != nil { + return fmt.Errorf("failed to parse public key: %s", err) + } + + if len(rest) != 0 { + return fmt.Errorf("got rest parsing public key: %s", rest) + } + + sig, ok := h.request.KeySignatures[k] + if !ok { + return fmt.Errorf("did not receive signature for public key %s", k) + } + + err = pk.Verify(h.request.InstanceDocumentRaw, sig) + if err != nil { + return fmt.Errorf("could not verify public key %s: %s", k, err) + } + } + + return nil +} + +// check generated tags against the ec2 instance +// if existing and match exit gracefully +// if miss match, exit failure +// if not exist, we need to create +func (h *Handler) checkTagsAgainstInstance(tags map[string]string) (tagsExist bool, err error) { + svc, err := h.EC2() + if err != nil { + return false, err + } + + out, err := svc.DescribeTags(&ec2.DescribeTagsInput{ + Filters: []*ec2.Filter{ + &ec2.Filter{ + Name: aws.String("resource-id"), + Values: []*string{aws.String(h.document.InstanceID)}, + }, + &ec2.Filter{ + Name: aws.String("resource-type"), + Values: []*string{aws.String("instance")}, + }, + }, + }) + if err != nil { + return false, fmt.Errorf("failed to list tags of instance %s: %s", h.document.InstanceID, err) + } + + for _, existingTag := range out.Tags { + + // check for public key tag prefix + if strings.HasPrefix(*existingTag.Key, tagPrefix) { + + // tags exist on the instance with the matching prefix + tagsExist = true + + value, ok := tags[*existingTag.Key] + + // given tags do not include an existing tag + if !ok { + return true, errors.New("mismatch tags, rejected") + } + + // existing and given tag mismatch values + if *existingTag.Value != value { + return true, errors.New("mismatch tags, rejected") + } + } + } + + return tagsExist, nil +} + +// split up public keys into correct sizes for AWS tags +func (h *Handler) createTags() map[string]string { + tags := make(map[string]string) + + for keyName, data := range h.request.PublicKeys { + data = append(data, []byte("==EOF")...) + + for i := 0; i < len(data); i += tagSize { + end := i + tagSize + + if end > len(data) { + end = len(data) + } + + tagName := fmt.Sprintf("%s/%s-%d", tagPrefix, keyName, i/tagSize) + tags[tagName] = string(data[i:end]) + } + } + + return tags +} + +func (h *Handler) EC2() (*ec2.EC2, error) { + if h.ec2 != nil { + return h.ec2, nil + } + + region := os.Getenv("AWS_REGION") + session, err := session.NewSession(&aws.Config{ + Region: ®ion, + }) + if err != nil { + return nil, err + } + + h.ec2 = ec2.New(session) + + return h.ec2, nil +} diff --git a/pkg/tagging_control/tagging_control_test.go b/pkg/tagging_control/tagging_control_test.go new file mode 100644 index 0000000000..cece6f0282 --- /dev/null +++ b/pkg/tagging_control/tagging_control_test.go @@ -0,0 +1,181 @@ +// Copyright Jetstack Ltd. See LICENSE for details. +package tagging_control + +import ( + "crypto/rand" + "reflect" + "testing" + + "golang.org/x/crypto/ssh" +) + +var ( + RSASigniture = []byte(`L0iuTgj5IfN6XP+VMvuYzuTDRnryuCvKAMcifsECAD5SrauLsB9YF2WUGsmJjBQwVSpVDrCsamLN +TD6ztBNN676pphn3TqeEKzba1EOGo0uQD/ipbKPXjlYYyBe8BLiue3FiDgdnrxLCdwr/vlEXom20 +DoiPHfC8YsSPIJXv/ZE=`) + + DocumentRaw = []byte(`{ + "privateIp" : "10.99.32.10", + "devpayProductCodes" : null, + "marketplaceProductCodes" : [ "aw0evgkw8e5c1q413zgy5pjce" ], + "version" : "2017-09-30", + "instanceType" : "t2.nano", + "billingProducts" : null, + "instanceId" : "i-0daab936f4046f7a6", + "accountId" : "228615251467", + "availabilityZone" : "eu-west-1a", + "kernelId" : null, + "ramdiskId" : null, + "architecture" : "x86_64", + "imageId" : "ami-01a7d6d4d6074842c", + "pendingTime" : "2018-12-18T09:58:51Z", + "region" : "eu-west-1" +}`) + + RSAPublicKey = []byte(`ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCgOj0qglXYZEn6QVLMNSVnpuKUCHDqHn88ZSL80ofAqQ3V/8UG/Z2YhZorrM/6gZobPM6P2qIeX1lb2m8zGpcgSXHVVhLDv2ephHTqtX4rPuCHGFdZbWrVcR5ysLy6Jpiy9Yrj+ZuuP/LS7vbZotOXFOSNePPi4dTWDcIOJMcz6z/DMBViXxzcEmUH/8gTK9BI+any68d8SHEpLuZ1HCigYgl6DVvflJ4hW5wVSec80HW7dO5lLjgTs7SRuNejC/09/+TwJk3rWxvcOBTIT1YMG5Y1KyyPth0PEPZtoB1OeZhQoFLhDAx6jb0kzG0OpH3mEd2lIwCof/HyDCkO2XzV`) + RSAPrivateKey = []byte(`-----BEGIN RSA PRIVATE KEY----- +MIIEowIBAAKCAQEAoDo9KoJV2GRJ+kFSzDUlZ6bilAhw6h5/PGUi/NKHwKkN1f/F +Bv2dmIWaK6zP+oGaGzzOj9qiHl9ZW9pvMxqXIElx1VYSw79nqYR06rV+Kz7ghxhX +WW1q1XEecrC8uiaYsvWK4/mbrj/y0u722aLTlxTkjXjz4uHU1g3CDiTHM+s/wzAV +Yl8c3BJlB//IEyvQSPmp8uvHfEhxKS7mdRwooGIJeg1b35SeIVucFUnnPNB1u3Tu +ZS44E7O0kbjXowv9Pf/k8CZN61sb3DgUyE9WDBuWNSssj7YdDxD2baAdTnmYUKBS +4QwMeo29JMxtDqR95hHdpSMAqH/x8gwpDtl81QIDAQABAoIBACHHJU3o3CAaRF41 +lzblnVUUoX+DqAozE6+vwoh5+ZRsDzamDOtEXAzjXXUHoXC2Eb7cOs+oz7SHdVcf +3YFwgZuU4CKRWrNZjoj2G4+/YzHKt5rDTubTYkpM5pZXG/JCYL6ZdQZKgL9jS9Wb ++v42jVS0WtpYPVH/OddGXzqMFlKjWA27tD4wEA23yUVZMQ2ntkXSXvZ0yl4EPtOv +2DoEV+nBEDjhuUD9pNUm7KhMBX71OHNLPmlLezr0G1A2rCPskAl8aV4GOymQSwyT +dkWrdAUwWxbAMKGaUqGFrQA1uWJXrPBjWr7/o4aQTilezwOY3fFvgQKiL1M5L7HP +0/6M3AECgYEAzjhK0Cupd5VQC+ItuOX8Ew0hAKZwEe9bs2RD9s5k4tImCG5A850y +T3Pmpzg6hHhmAXU7sKWTEO3BwK/YMrCVp1UOieFoP3l8q/GOgFFJ/0Bz7MZmnXBc +Lh9JCEssUbibORmbFdhlO12fm8NiQfY8aa4Fg0VbKH2SESypRHPpMaECgYEAxufE +xUC1rZ5eTx70xpAxTAdcDmEEqX3UozyRLp28uLje4GYJcKiJoTEqzlZNiWaugSk/ +4VCLNUJrF4bTOPwVnRkvQ71ekmB2JKv8r7gQRuwvcGERzOcdrAMLs1MruVn2Zi5E +68IMT3EOW5r8UeNXTM04CWYYcob5FvgXVZbrprUCgYA5mH9MpOUwAQPaTdF3UsSU +jZYqGFI0sCVsdRSGWh7TOt5kfGano7/pcPV6vrmZRgc3YQbKz3PDxqPWrUY04hzq +H1dwKwRytfucCltCe3GvWNEH0GHYlwkn2JUNO/Gk4Wp5CC3IbCfZ7MwnNOq8gYld ++ryPbU+If4nMQi0EcVswAQKBgQDECMMvIWKtlcsfMcRPOufLJem9pjLhFUoQA+6W +whGxAUtwYEBnj0Pt4TZuHDLY+6F7XPs/hpFc0XQYwOHGZPSsW5jwq1/c5kMqS3OE +f+VS8Q6kNJdFmnbtBCdw+sS6Lgchl/KHZT2awjNDZ5HM50IwSIY1BTGNFqfC0oq0 +6UShjQKBgBJ8Ny7gx+8Wwc/aQxsNlMO2v5KCIbhY939uPYAYbav9QXWyWte4sC1+ +fDA5+p3yMZdqE/7C/04F2Q4OFayCaNm19MCii9UtpXx8c5Ey53VaXyhhBFXF3xl0 +c0vh3QGIdWzlL5RU9UkGIqz1V6CN8UYx4xiOuh95j9L7vv56e8Yw +-----END RSA PRIVATE KEY-----`) + + ECDSAPrivateKey = []byte(`-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIOddZrJaP9vz93byVqS6vCru3lrSgw8nDzGSRvT89BK0oAoGCCqGSM49 +AwEHoUQDQgAEjoT2Bd0QKAoVAurwa0xPNUICUnfSJn8mOW6H7F0bGdBGRoTdhvBD +B+fy6asaeXowduiTS+Llunpc6QTdC/YPdA== +-----END EC PRIVATE KEY-----`) + ECDSAPublicKey = []byte(`ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBI6E9gXdECgKFQLq8GtMTzVCAlJ30iZ/Jjluh+xdGxnQRkaE3YbwQwfn8umrGnl6MHbok0vi5bp6XOkE3Qv2D3Q=`) + + ED25519PrivateKey = []byte(`-----BEGIN OPENSSH PRIVATE KEY----- +b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW +QyNTUxOQAAACBadFVUxoD7zee95+3zdw1bTZIL5ZPmXzN4pKUNWH4kSgAAAIiWSm7Wlkpu +1gAAAAtzc2gtZWQyNTUxOQAAACBadFVUxoD7zee95+3zdw1bTZIL5ZPmXzN4pKUNWH4kSg +AAAEDfDWrBPqHSNvN31T00MEMtW4HonMlIoQhZ2q73uk4TMVp0VVTGgPvN573n7fN3DVtN +kgvlk+ZfM3ikpQ1YfiRKAAAAAAECAwQF +-----END OPENSSH PRIVATE KEY-----`) + ED25519PublicKey = []byte(`ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFp0VVTGgPvN573n7fN3DVtNkgvlk+ZfM3ikpQ1YfiRK`) +) + +func Test_verify(t *testing.T) { + h := &Handler{ + request: &TagInstanceRequest{ + RSASigniture: RSASigniture, + InstanceDocumentRaw: []byte("bad signature"), + PublicKeys: make(map[string][]byte), + KeySignatures: make(map[string]*ssh.Signature), + }, + } + + if err := h.verify(); err == nil { + t.Fatalf("expected error, got=%s", err) + } + + h.request.InstanceDocumentRaw = DocumentRaw + if err := h.verify(); err != nil { + t.Fatal(err) + } + + for i := 0; i < 2; i++ { + for _, k := range []struct { + name string + sk, pk []byte + }{ + {"rsa", RSAPrivateKey, RSAPublicKey}, + {"ecdsa", ECDSAPrivateKey, ECDSAPublicKey}, + {"ed25519", ED25519PrivateKey, ED25519PublicKey}, + } { + + signer, err := ssh.ParsePrivateKey(k.sk) + if err != nil { + t.Fatal(err) + } + + sig, err := signer.Sign(rand.Reader, DocumentRaw) + if err != nil { + t.Fatal(err) + } + + h.request.PublicKeys[k.name] = k.pk + h.request.KeySignatures[k.name] = sig + } + + err := h.verify() + if i%2 == 0 { + if err != nil { + t.Fatalf("unexpected error: %s", err) + } + } else { + if err == nil { + t.Fatalf("expecred error, got=%s", err) + } + } + + DocumentRaw = []byte("bad signature") + } +} + +func Test_createTags(t *testing.T) { + h := &Handler{ + request: &TagInstanceRequest{ + PublicKeys: make(map[string][]byte), + }, + } + + tags := h.createTags() + checkTags(t, make(map[string]string), tags) + + h.request.PublicKeys = map[string][]byte{ + "key-1": []byte("public key 1"), + "key-2": []byte("public key 2"), + } + tags = h.createTags() + checkTags(t, map[string]string{ + "tarmak.io/key-1-0": "public key 1==EOF", + "tarmak.io/key-2-0": "public key 2==EOF", + }, tags) + + longKey := make([]byte, 255) + for i := range longKey { + longKey[i] = 'a' + } + + h.request.PublicKeys = map[string][]byte{ + "key-1": append(longKey, []byte("bcd")...), + "key-2": append(longKey, []byte("bcd")...), + } + tags = h.createTags() + checkTags(t, map[string]string{ + "tarmak.io/key-1-0": string(longKey), + "tarmak.io/key-1-1": "bcd==EOF", + "tarmak.io/key-2-0": string(longKey), + "tarmak.io/key-2-1": "bcd==EOF", + }, tags) +} + +func checkTags(t *testing.T, exp, got map[string]string) { + if !reflect.DeepEqual(exp, got) { + t.Fatalf("got mismatch of tags\nexp=%s\ngot=%s", exp, got) + } +} diff --git a/pkg/tarmak/assets/assets.go b/pkg/tarmak/assets/assets.go index 4060863c76..f407d366c1 100644 --- a/pkg/tarmak/assets/assets.go +++ b/pkg/tarmak/assets/assets.go @@ -8,4 +8,5 @@ package assets -//go:generate go-bindata -prefix ../../../ -pkg $GOPACKAGE -o assets_bindata.go ../../../terraform/amazon/modules/... ../../../terraform/amazon/templates/... ../../../puppet/... ../../../packer/... +//go:generate go run ../../../cmd/tagging_control/main.go zip ../../../tagging_control.zip ../../../tagging_control_linux_amd64 +//go:generate go-bindata -prefix ../../../ -pkg $GOPACKAGE -o assets_bindata.go ../../../tagging_control.zip ../../../terraform/amazon/modules/... ../../../terraform/amazon/templates/... ../../../puppet/... ../../../packer/... diff --git a/pkg/tarmak/assets/assets_dev.go b/pkg/tarmak/assets/assets_dev.go index aa9409fc1a..f3bad445a0 100644 --- a/pkg/tarmak/assets/assets_dev.go +++ b/pkg/tarmak/assets/assets_dev.go @@ -8,4 +8,4 @@ package assets -//go:generate go-bindata -prefix ../../../ -pkg $GOPACKAGE -o assets_bindata.go ../../../wing_linux_amd64 ../../../terraform/amazon/modules/... ../../../terraform/amazon/templates/... ../../../puppet/... ../../../packer/... +//go:generate go-bindata -prefix ../../../ -pkg $GOPACKAGE -o assets_bindata.go ../../../tagging_control.zip ../../../wing_linux_amd64 ../../../terraform/amazon/modules/... ../../../terraform/amazon/templates/... ../../../puppet/... ../../../packer/... diff --git a/pkg/tarmak/cluster/cluster.go b/pkg/tarmak/cluster/cluster.go index fde0a089a0..c0e86476b0 100644 --- a/pkg/tarmak/cluster/cluster.go +++ b/pkg/tarmak/cluster/cluster.go @@ -6,6 +6,7 @@ import ( "fmt" "net" "path/filepath" + "strconv" "github.com/hashicorp/go-multierror" "github.com/hashicorp/go-version" @@ -16,6 +17,7 @@ import ( "github.com/jetstack/tarmak/pkg/tarmak/instance_pool" "github.com/jetstack/tarmak/pkg/tarmak/interfaces" "github.com/jetstack/tarmak/pkg/tarmak/role" + "github.com/jetstack/tarmak/pkg/tarmak/utils" wingclient "github.com/jetstack/tarmak/pkg/wing/client/clientset/versioned" ) @@ -35,6 +37,7 @@ type Cluster struct { environment interfaces.Environment networkCIDR *net.IPNet log *logrus.Entry + ctx interfaces.CancellationContext wingClientset *wingclient.Clientset wingTunnel interfaces.Tunnel @@ -55,6 +58,7 @@ func NewFromConfig(environment interfaces.Environment, conf *clusterv1alpha1.Clu conf: conf, environment: environment, log: environment.Log().WithField("cluster", conf.Name), + ctx: environment.Tarmak().CancellationContext(), } if err := cluster.Validate(); err != nil { @@ -360,6 +364,7 @@ func (c *Cluster) verifyHubState() error { "vault_vault_security_group_id", "vault_vault_unseal_key_name", "vault_vault_url", + "tagging_control_tagging_control_policy_arn", "bastion_bastion_wing_binary_read_policy_arn", } var result *multierror.Error @@ -661,9 +666,10 @@ func (c *Cluster) NetworkCIDR() *net.IPNet { func (c *Cluster) APITunnel() interfaces.Tunnel { return c.Environment().Tarmak().SSH().Tunnel( - "bastion", fmt.Sprintf("api.%s.%s", c.ClusterName(), c.Environment().Config().PrivateZone), - 6443, + "6443", + strconv.Itoa(utils.UnusedPort()), + true, ) } diff --git a/pkg/tarmak/cluster/cluster_test.go b/pkg/tarmak/cluster/cluster_test.go index 1d4a473b5b..0ed981cf50 100644 --- a/pkg/tarmak/cluster/cluster_test.go +++ b/pkg/tarmak/cluster/cluster_test.go @@ -21,6 +21,7 @@ type fakeCluster struct { fakeProvider *mocks.MockProvider fakeTarmak *mocks.MockTarmak fakeConfig *mocks.MockConfig + fakeCtx *mocks.MockCancellationContext } func (f *fakeCluster) Finish() { @@ -40,6 +41,7 @@ func newFakeCluster(t *testing.T, cluster *clusterv1alpha1.Cluster) *fakeCluster c.fakeConfig = mocks.NewMockConfig(c.ctrl) c.fakeEnvironment = mocks.NewMockEnvironment(c.ctrl) c.environment = c.fakeEnvironment + c.fakeCtx = mocks.NewMockCancellationContext(c.ctrl) // setup custom logger logger := logrus.New() @@ -60,6 +62,7 @@ func newFakeCluster(t *testing.T, cluster *clusterv1alpha1.Cluster) *fakeCluster c.fakeProvider.EXPECT().Name().Return("provider-name").AnyTimes() c.fakeTarmak.EXPECT().Config().AnyTimes().Return(c.fakeConfig) + c.fakeTarmak.EXPECT().CancellationContext().AnyTimes().Return(c.fakeCtx) return c } diff --git a/pkg/tarmak/cluster/configuration.go b/pkg/tarmak/cluster/configuration.go index 6460116164..ed81f21ea7 100644 --- a/pkg/tarmak/cluster/configuration.go +++ b/pkg/tarmak/cluster/configuration.go @@ -112,6 +112,12 @@ func (c *Cluster) WaitForConvergance() error { c.log.Debug(err) } + select { + case <-c.ctx.Done(): + return c.ctx.Err() + default: + } + retries-- if retries == 0 { break diff --git a/pkg/tarmak/cmd.go b/pkg/tarmak/cmd.go index 78d6399324..ddae349bbb 100644 --- a/pkg/tarmak/cmd.go +++ b/pkg/tarmak/cmd.go @@ -30,6 +30,11 @@ type CmdTarmak struct { ctx interfaces.CancellationContext } +type CmdSnapshot struct { + *CmdTarmak + snapshot interfaces.Snapshot +} + func (t *Tarmak) NewCmdTarmak(pflags *pflag.FlagSet, args []string) *CmdTarmak { return &CmdTarmak{ Tarmak: t, @@ -40,6 +45,13 @@ func (t *Tarmak) NewCmdTarmak(pflags *pflag.FlagSet, args []string) *CmdTarmak { } } +func (t *Tarmak) NewCmdSnapshot(pflags *pflag.FlagSet, args []string, sh interfaces.Snapshot) *CmdSnapshot { + return &CmdSnapshot{ + CmdTarmak: t.NewCmdTarmak(pflags, args), + snapshot: sh, + } +} + func (c *CmdTarmak) Plan() (returnCode int, err error) { if err := c.setup(); err != nil { return 1, err @@ -111,6 +123,10 @@ func (c *CmdTarmak) Destroy() error { return err } + if err := os.RemoveAll(c.cluster.SSHHostKeysPath()); err != nil { + return fmt.Errorf("failed to delete cluster known hosts file: %s", err) + } + return nil } @@ -286,6 +302,14 @@ func (c *CmdTarmak) kubePublicAPIEndpoint() bool { return publicEndpoint } +func (c *CmdSnapshot) Save() error { + return c.snapshot.Save() +} + +func (c *CmdSnapshot) Restore() error { + return c.snapshot.Restore() +} + func (c *CmdTarmak) verifyTerraformBinaryVersion() error { cmd := exec.Command("terraform", "version") cmd.Env = os.Environ() diff --git a/pkg/tarmak/config/config.go b/pkg/tarmak/config/config.go index 2b8eaee973..ce1ed88874 100644 --- a/pkg/tarmak/config/config.go +++ b/pkg/tarmak/config/config.go @@ -351,3 +351,7 @@ func (c *Config) Project() string { func (c *Config) WingDevMode() bool { return c.flags.WingDevMode } + +func (c *Config) IgnoreMissingPublicKeyTags() bool { + return c.flags.IgnoreMissingPublicKeyTags +} diff --git a/pkg/tarmak/environment/bastion.go b/pkg/tarmak/environment/bastion.go index a718d52a03..9a631988e8 100644 --- a/pkg/tarmak/environment/bastion.go +++ b/pkg/tarmak/environment/bastion.go @@ -2,8 +2,10 @@ package environment import ( + "bufio" "context" "fmt" + "io" "os" "os/signal" "sync" @@ -48,11 +50,19 @@ func (e *Environment) VerifyBastionAvailable() error { expBackoff.MaxElapsedTime = time.Minute * 2 b := backoff.WithContext(expBackoff, ctx) + stderrR, stderrW := io.Pipe() + stderrScanner := bufio.NewScanner(stderrR) + go func() { + for stderrScanner.Scan() { + e.log.WithField("std", "err").Debug(stderrScanner.Text()) + } + }() + executeSSH := func() error { retCode, err := ssh.Execute( "bastion", - "/bin/true", - []string{}, + []string{"/bin/true"}, + nil, nil, stderrW, ) msg := "error while connecting to bastion host" @@ -76,7 +86,5 @@ func (e *Environment) VerifyBastionAvailable() error { return fmt.Errorf("failed to connect to bastion host: %v", err) } - e.log.Info("connection to bastion host successful") - return nil } diff --git a/pkg/tarmak/environment/environment.go b/pkg/tarmak/environment/environment.go index 3e07a56010..54327ab6cb 100644 --- a/pkg/tarmak/environment/environment.go +++ b/pkg/tarmak/environment/environment.go @@ -10,6 +10,7 @@ import ( "io/ioutil" "os" "path/filepath" + "strconv" "github.com/hashicorp/go-multierror" "github.com/sirupsen/logrus" @@ -297,9 +298,10 @@ func (e *Environment) Verify() error { func (e *Environment) WingTunnel() interfaces.Tunnel { return e.Tarmak().SSH().Tunnel( - "bastion", "localhost", - 9443, + "9443", + strconv.Itoa(utils.UnusedPort()), + false, ) } @@ -311,7 +313,7 @@ func (e *Environment) WingClientset() (*wingclient.Clientset, interfaces.Tunnel, // TODO: Do proper TLS here restConfig := &rest.Config{ - Host: fmt.Sprintf("https://127.0.0.1:%d", tunnel.Port()), + Host: fmt.Sprintf("https://127.0.0.1:%s", tunnel.Port()), TLSClientConfig: rest.TLSClientConfig{ Insecure: true, }, diff --git a/pkg/tarmak/interfaces/interfaces.go b/pkg/tarmak/interfaces/interfaces.go index 13a9a1d370..b6be24a07d 100644 --- a/pkg/tarmak/interfaces/interfaces.go +++ b/pkg/tarmak/interfaces/interfaces.go @@ -193,6 +193,7 @@ type Config interface { Project() string WingDevMode() bool SetCurrentCluster(string) error + IgnoreMissingPublicKeyTags() bool } type Packer interface { @@ -208,17 +209,17 @@ type Terraform interface { type SSH interface { WriteConfig(Cluster) error - PassThrough([]string) - Tunnel(hostname string, destination string, destinationPort int) Tunnel - Execute(host string, cmd string, args []string) (returnCode int, err error) + PassThrough(host string, additionalArguments []string) error + Tunnel(destination, destinationPort, localPort string, daemonize bool) Tunnel + Execute(host string, cmd []string, stdin io.Reader, stdout, stderr io.Writer) (returnCode int, err error) Validate() error - Cleanup() error + Cleanup() } type Tunnel interface { Start() error - Stop() error - Port() int + Stop() + Port() string BindAddress() string } @@ -232,9 +233,10 @@ type Host interface { Hostname() string User() string Roles() []string - SSHConfig() string + SSHConfig(strictChecking string) string Parameters() map[string]string - SSHControlPath() string + SSHKnownHostConfig() (string, error) + Aliases() []string } type Puppet interface { @@ -292,3 +294,10 @@ type CancellationContext interface { WaitOrCancel(f func() error) WaitOrCancelReturnCode(f func() (int, error)) } + +type Snapshot interface { + Save() error + Restore() error + Log() *logrus.Entry + SSH() SSH +} diff --git a/pkg/tarmak/kubectl/kubectl.go b/pkg/tarmak/kubectl/kubectl.go index a314cce7d0..b50ead804d 100644 --- a/pkg/tarmak/kubectl/kubectl.go +++ b/pkg/tarmak/kubectl/kubectl.go @@ -180,7 +180,7 @@ func (k *Kubectl) ensureWorkingKubeconfig(configPath string, publicAPIEndpoint b retries := 5 for { - k.log.Debugf("trying to connect to %+v", cluster.Server) + k.log.Debugf("trying to connect to %s", cluster.Server) var version string version, err = k.verifyAPIVersion(*c) @@ -367,7 +367,7 @@ func (k *Kubectl) setupConfig(c *api.Config, publicAPIEndpoint bool) (*api.Confi return nil, nil, fmt.Errorf("failed to get tunnel information at it is nil: %v", k.tunnel) } - cluster.Server = fmt.Sprintf("https://%s:%d", + cluster.Server = fmt.Sprintf("https://%s:%s", k.tunnel.BindAddress(), k.tunnel.Port()) k.log.Warnf("ssh tunnel connecting to Kubernetes API server will close after 10 minutes: %s", cluster.Server) diff --git a/pkg/tarmak/provider/amazon/hosts.go b/pkg/tarmak/provider/amazon/hosts.go index 5391fe76e7..54fdea3a0a 100644 --- a/pkg/tarmak/provider/amazon/hosts.go +++ b/pkg/tarmak/provider/amazon/hosts.go @@ -4,7 +4,6 @@ package amazon import ( "fmt" "os" - "path/filepath" "strings" "github.com/aws/aws-sdk-go/aws" @@ -21,6 +20,7 @@ type host struct { aliases []string roles []string user string + tags []*ec2.Tag cluster interfaces.Cluster } @@ -59,15 +59,63 @@ func (h *host) Parameters() map[string]string { } } +func (h *host) SSHKnownHostConfig() (string, error) { + var entry, key string + + for _, t := range h.tags { + if strings.HasPrefix(*t.Key, "tarmak.io/") && + strings.HasSuffix(*t.Key, "key-0") { + key = *t.Key + entry = *t.Value + break + } + } + + if key == "" { + h.cluster.Log().Warnf("failed to find public key tags for host %s", h.Aliases()) + return "", nil + } + + findTag := func(name string, tags []*ec2.Tag) ([]*ec2.Tag, string) { + for i, t := range tags { + if *t.Key == name { + return append(tags[:i], tags[i+1:]...), *t.Value + } + } + + return tags, "" + } + + tags := h.tags + var n int + var value string + for !strings.HasSuffix(entry, "==EOF") { + n++ + key = fmt.Sprintf("%s%d", key[:len(key)-1], n) + + tags, value = findTag(key, tags) + if value == "" { + return "", fmt.Errorf("failed to contruct public key from host tags %s", h.Aliases()) + } + + entry = fmt.Sprintf("%s%s", entry, value) + } + + entry = strings.TrimRight(entry[:len(entry)-6], " ") + entry = fmt.Sprintf("%s %s\n", h.Hostname(), entry) + + return entry, nil +} + // TODO: this is not too provider specific and should live somewhere else -func (h *host) SSHConfig() string { +func (h *host) SSHConfig(strictChecking string) string { config := fmt.Sprintf(`host %s User %s Hostname %s # use custom host key file per cluster UserKnownHostsFile %s - StrictHostKeyChecking no + StrictHostKeyChecking %s # enable connection multiplexing ControlPath %s/ssh-control-%%r@%%h:%%p @@ -83,6 +131,7 @@ func (h *host) SSHConfig() string { h.User(), h.Hostname(), h.cluster.SSHHostKeysPath(), + strictChecking, os.TempDir(), h.cluster.Environment().SSHPrivateKeyPath(), ) @@ -133,6 +182,7 @@ func (a *Amazon) ListHosts(c interfaces.Cluster) ([]interfaces.Host, error) { hostnamePublic: false, user: "centos", cluster: a.tarmak.Cluster(), + tags: instance.Tags, } if instance.PublicIpAddress != nil { host.hostname = *instance.PublicIpAddress @@ -194,8 +244,3 @@ func (a *Amazon) ListHosts(c interfaces.Cluster) ([]interfaces.Host, error) { return hostsInterfaces, nil } - -func (h *host) SSHControlPath() string { - return filepath.Join(os.TempDir(), fmt.Sprintf( - "ssh-control-%s@%s:22", h.user, h.hostname)) -} diff --git a/pkg/tarmak/snapshot/consul/consul.go b/pkg/tarmak/snapshot/consul/consul.go new file mode 100644 index 0000000000..646b6f9319 --- /dev/null +++ b/pkg/tarmak/snapshot/consul/consul.go @@ -0,0 +1,133 @@ +// Copyright Jetstack Ltd. See LICENSE for details. +package consul + +import ( + "fmt" + "io" + "time" + + "github.com/sirupsen/logrus" + + clusterv1alpha1 "github.com/jetstack/tarmak/pkg/apis/cluster/v1alpha1" + "github.com/jetstack/tarmak/pkg/tarmak/interfaces" + "github.com/jetstack/tarmak/pkg/tarmak/snapshot" +) + +var _ interfaces.Snapshot = &Consul{} + +type Consul struct { + tarmak interfaces.Tarmak + ssh interfaces.SSH + log *logrus.Entry + + path string +} + +func New(tarmak interfaces.Tarmak, path string) *Consul { + return &Consul{ + tarmak: tarmak, + ssh: tarmak.SSH(), + log: tarmak.Log(), + path: path, + } +} + +func (c *Consul) Save() error { + aliases, err := snapshot.Prepare(c.tarmak, clusterv1alpha1.InstancePoolTypeVault) + if err != nil { + return err + } + + c.log.Infof("saving snapshot from instance %s", aliases[0]) + + hostPath := fmt.Sprintf("/tmp/consul-snapshot-%s.snap", + time.Now().Format(snapshot.TimeLayout)) + cmdArgs := fmt.Sprintf(`set -e; +export CONSUL_HTTP_TOKEN=$(sudo cat /etc/consul/consul.json | jq -r '.acl_master_token'); +export DATACENTER=$(sudo cat /etc/consul/consul.json | jq -r '.datacenter'); +/opt/bin/consul snapshot save -datacenter $DATACENTER %s; +/opt/bin/consul snapshot inspect %s`, hostPath, hostPath) + + err = snapshot.SSHCmd(c, aliases[0], cmdArgs, nil, nil, nil) + if err != nil { + return err + } + + reader, writer := io.Pipe() + sshCmd := func() error { + err := snapshot.SSHCmd(c, aliases[0], + fmt.Sprintf(snapshot.GZipCCmd, hostPath), + nil, writer, nil) + writer.Close() + + return err + } + + err = snapshot.TarFromStream(sshCmd, reader, c.path) + if err != nil { + return err + } + + err = snapshot.SSHCmd(c, aliases[0], fmt.Sprintf("sudo rm %s", hostPath), nil, nil, nil) + if err != nil { + return err + } + + c.log.Infof("consul snapshot saved to %s", c.path) + + return nil +} + +func (c *Consul) Restore() error { + aliases, err := snapshot.Prepare(c.tarmak, clusterv1alpha1.InstancePoolTypeVault) + if err != nil { + return err + } + + for _, a := range aliases { + c.log.Infof("restoring snapshot to instance %s", a) + + reader, writer := io.Pipe() + hostPath := fmt.Sprintf("/tmp/consul-snapshot-%s.snap", + time.Now().Format(snapshot.TimeLayout)) + + sshCmd := func() error { + err := snapshot.SSHCmd(c, a, + fmt.Sprintf(snapshot.GZipDCmd, hostPath), + reader, nil, nil) + + return err + } + + err = snapshot.TarToStream(sshCmd, writer, c.path) + if err != nil { + return err + } + + cmdArgs := fmt.Sprintf(`set -e; +export CONSUL_HTTP_TOKEN=$(sudo cat /etc/consul/consul.json | jq -r '.acl_master_token'); +export DATACENTER=$(sudo cat /etc/consul/consul.json | jq -r '.datacenter'); +/opt/bin/consul snapshot inspect %s; +/opt/bin/consul snapshot restore -datacenter $DATACENTER %s; +echo number of keys: $(curl --header "X-Consul-Token: $CONSUL_HTTP_TOKEN" -s 'http://127.0.0.1:8500/v1/kv/?keys' | jq '. | length'); +sudo rm %s; +`, hostPath, hostPath, hostPath) + + err = snapshot.SSHCmd(c, a, cmdArgs, nil, nil, nil) + if err != nil { + return err + } + } + + c.log.Infof("consul snapshot restored from %s", c.path) + + return nil +} + +func (c *Consul) Log() *logrus.Entry { + return c.log +} + +func (c *Consul) SSH() interfaces.SSH { + return c.ssh +} diff --git a/pkg/tarmak/snapshot/etcd/etcd.go b/pkg/tarmak/snapshot/etcd/etcd.go new file mode 100644 index 0000000000..4a7ca9de35 --- /dev/null +++ b/pkg/tarmak/snapshot/etcd/etcd.go @@ -0,0 +1,394 @@ +// Copyright Jetstack Ltd. See LICENSE for details. +package etcd + +import ( + "crypto/rand" + "encoding/base64" + "fmt" + "io" + "strings" + "sync" + "time" + + multierror "github.com/hashicorp/go-multierror" + "github.com/sirupsen/logrus" + + clusterv1alpha1 "github.com/jetstack/tarmak/pkg/apis/cluster/v1alpha1" + "github.com/jetstack/tarmak/pkg/tarmak/interfaces" + "github.com/jetstack/tarmak/pkg/tarmak/snapshot" + "github.com/jetstack/tarmak/pkg/tarmak/utils/consts" +) + +var _ interfaces.Snapshot = &Etcd{} + +const ( + etcdctlCmd = `/opt/bin/etcdctl snapshot %s %s;` +) + +var ( + stores = []map[string]string{ + {"cluster": consts.RestoreK8sMainFlagName, "file": "k8s", "client_port": "2379", "peer_port": "2380"}, + {"cluster": consts.RestoreK8sEventsFlagName, "file": "k8s", "client_port": "2369", "peer_port": "2370"}, + {"cluster": consts.RestoreOverlayFlagName, "file": "overlay", "client_port": "2359", "peer_port": "2360"}, + } + + envCmd = ` +set -e; +export ETCDCTL_CERT=/etc/etcd/ssl/etcd-{{file}}.pem; +export ETCDCTL_KEY=/etc/etcd/ssl/etcd-{{file}}-key.pem; +export ETCDCTL_CACERT=/etc/etcd/ssl/etcd-{{file}}-ca.pem; +export ETCDCTL_API=3; +export ETCDCTL_ENDPOINTS=https://127.0.0.1:{{client_port}}; +` +) + +type Etcd struct { + tarmak interfaces.Tarmak + ssh interfaces.SSH + log *logrus.Entry + ctx interfaces.CancellationContext + + path string +} + +func New(tarmak interfaces.Tarmak, path string) *Etcd { + return &Etcd{ + tarmak: tarmak, + ssh: tarmak.SSH(), + ctx: tarmak.CancellationContext(), + log: tarmak.Log(), + path: path, + } +} + +func (e *Etcd) Save() error { + aliases, err := snapshot.Prepare(e.tarmak, clusterv1alpha1.InstancePoolTypeEtcd) + if err != nil { + return err + } + + e.log.Infof("saving snapshots from instance %s", aliases[0]) + + var wg sync.WaitGroup + var result *multierror.Error + var errLock sync.Mutex + + saveFunc := func(store map[string]string) { + defer wg.Done() + + hostPath := fmt.Sprintf("/tmp/etcd-snapshot-%s-%s.db", + store["cluster"], time.Now().Format(snapshot.TimeLayout)) + + cmdArgs := fmt.Sprintf( + `sudo /bin/bash -c "%s %s %s"`, + e.template(envCmd, store), + fmt.Sprintf(etcdctlCmd, "save", hostPath), + fmt.Sprintf(etcdctlCmd, "status", hostPath), + ) + + err = snapshot.SSHCmd(e, aliases[0], cmdArgs, nil, nil, nil) + if err != nil { + + errLock.Lock() + result = multierror.Append(result, err) + errLock.Unlock() + + return + } + + targetPath := fmt.Sprintf("%s%s.db", e.path, store["cluster"]) + reader, writer := io.Pipe() + + err = snapshot.TarFromStream(func() error { + err := snapshot.SSHCmd(e, aliases[0], fmt.Sprintf(snapshot.GZipCCmd, hostPath), + nil, writer, nil) + writer.Close() + return err + + }, reader, targetPath) + + if err != nil { + + errLock.Lock() + result = multierror.Append(result, err) + errLock.Unlock() + + return + } + + err = snapshot.SSHCmd(e, aliases[0], fmt.Sprintf("sudo rm %s", hostPath), nil, nil, nil) + if err != nil { + + errLock.Lock() + result = multierror.Append(result, err) + errLock.Unlock() + + return + } + + e.log.Infof("etcd %s snapshot saved to %s", store["cluster"], targetPath) + + select { + case <-e.ctx.Done(): + return + default: + } + } + + wg.Add(len(stores)) + for _, store := range stores { + go saveFunc(store) + } + + wg.Wait() + + select { + case <-e.ctx.Done(): + return e.ctx.Err() + default: + } + + return result.ErrorOrNil() +} + +func (e *Etcd) Restore() error { + aliases, err := snapshot.Prepare(e.tarmak, clusterv1alpha1.InstancePoolTypeEtcd) + if err != nil { + return err + } + + stopEtcdFunc := func(host string, store map[string]string) error { + cmdArgs := fmt.Sprintf(`set -e; sudo systemctl stop etcd-%s `, store["cluster"]) + err = snapshot.SSHCmd(e, host, cmdArgs, nil, nil, nil) + + return err + } + + //restoreFunc := func(host, path, token string, store map[string]string) error { + // reader, writer := io.Pipe() + // hostPath := fmt.Sprintf("/tmp/etcd-snapshot-%s-%s.db", + // store["cluster"], time.Now().Format(snapshot.TimeLayout)) + + // err = snapshot.TarToStream(func() error { + // err := snapshot.SSHCmd(e, host, fmt.Sprintf(snapshot.GZipDCmd, hostPath), reader, nil, nil) + // return err + // }, writer, path) + // if err != nil { + // return err + // } + + // + // cmdArgs = e.template(`set -e; + //sudo mkdir -p /var/lib/etcd_backup; + //sudo rsync -a --delete --ignore-missing-args /var/lib/etcd/{{cluster}} /var/lib/etcd_backup/; + //sudo rm -rf /var/lib/etcd/{{cluster}}; + //`, store) + // err = snapshot.SSHCmd(e, host, cmdArgs, nil, nil, nil) + // if err != nil { + // return err + // } + // + // initialCluster := e.initialClusterString(host, store) + // for _, a := range aliases[1:] { + // initialCluster = strings.Join( + // []string{initialCluster, e.initialClusterString(a, store)}, ",", + // ) + // } + // + // cmdArgs = e.template(fmt.Sprintf(`set -e; + //sudo ETCDCTL_API=3 /opt/bin/etcdctl snapshot restore %s \ + //--name=%s.%s.%s \ + //--data-dir=/var/lib/etcd/{{cluster}} \ + //--initial-advertise-peer-urls=https://%s.%s.%s:{{peer_port}} \ + //--initial-cluster=%s \ + //--initial-cluster-token=etcd-{{cluster}}-%s + //`, + // hostPath, + // host, e.clusterName(), e.privateZone(), + // host, e.clusterName(), e.privateZone(), + // initialCluster, + // token, + // ), store) + // err = snapshot.SSHCmd(e, host, cmdArgs, nil, nil, nil) + // if err != nil { + // return err + // } + // + // cmdArgs = e.template(`set -e; + // sudo chown -R etcd:etcd /var/lib/etcd/{{cluster}} + // `, store) + // err = snapshot.SSHCmd(e, host, cmdArgs, nil, nil, nil) + // if err != nil { + // return err + // } + // + // return nil + // } + // + startEtcdFunc := func(host string, store map[string]string) error { + cmdArgs := fmt.Sprintf(`set -e; sudo systemctl start etcd-%s`, store["cluster"]) + err = snapshot.SSHCmd(e, host, cmdArgs, nil, nil, nil) + if err != nil { + return err + } + + return nil + } + + healthCheckFunc := func(host string, store map[string]string) error { + endpoints := e.endpointsString(host, store) + for _, a := range aliases[1:] { + endpoints = strings.Join( + []string{endpoints, e.endpointsString(a, store)}, ",", + ) + } + + cmdArgs := e.template(fmt.Sprint(`%s; sudo /opt/bin/etcdctl endpoint health --endpoints=%s `, + envCmd, endpoints), store) + err = snapshot.SSHCmd(e, host, cmdArgs, nil, nil, nil) + if err != nil { + return err + } + + return nil + } + + for _, store := range stores { + value := e.restoreFlagValue(store["cluster"]) + if value == "" { + continue + } + + b := make([]byte, 32) + _, err := rand.Read(b) + if err != nil { + return fmt.Errorf("failed to create random etcd initial token: %s", err) + } + token := base64.URLEncoding.EncodeToString(b) + + fmt.Printf(">%s\n", token) + + for _, a := range aliases { + e.log.Infof("stopping etcd unit %s on host %s", store["cluster"], a) + err := stopEtcdFunc(a, store) + if err != nil { + return err + } + } + + time.Sleep(5 * time.Second) + + //for _, a := range aliases { + // e.log.Infof("restoring etcd %s on host %s", store["cluster"], a) + // err := restoreFunc(a, value, token, store) + // if err != nil { + // return err + // } + //} + + var wg sync.WaitGroup + var result *multierror.Error + var errLock sync.Mutex + + wg.Add(len(aliases)) + + for _, a := range aliases { + e.log.Infof("starting etcd %s on host %s", store["cluster"], a) + + go func() { + defer wg.Done() + + err := startEtcdFunc(a, store) + if err != nil { + + errLock.Lock() + result = multierror.Append(result, err) + errLock.Unlock() + + } + + }() + } + + wg.Wait() + + if result != nil { + return result + } + + for _, a := range aliases { + e.log.Infof("checking health of etcd %s on host %s", store["cluster"], a) + err := healthCheckFunc(a, store) + if err != nil { + return err + } + } + + e.log.Infof("successfully restored etcd cluster %s with snapshot %s", store["cluster"], value) + + select { + case <-e.tarmak.CancellationContext().Done(): + return e.tarmak.CancellationContext().Err() + default: + } + } + + e.log.Info("restarting API servers on master hosts") + //masters, err := snapshot.Prepare(e.tarmak, clusterv1alpha1.InstancePoolTypeMaster) + //for _, master := range masters { + // cmdArgs := " sudo systemctl restart kube-apiserver" + // err = snapshot.SSHCmd(e, master, cmdArgs, nil, nil, nil) + // if err != nil { + // return err + // } + //} + + return nil +} + +func (e *Etcd) template(args string, vars map[string]string) string { + for k, v := range vars { + args = strings.Replace(args, fmt.Sprintf("{{%s}}", k), v, -1) + } + + return args +} + +func (e *Etcd) restoreFlagValue(flag string) string { + rf := e.tarmak.ClusterFlags().Snapshot.Etcd.Restore + for _, db := range []struct { + name, value string + }{ + {consts.RestoreK8sMainFlagName, rf.K8sMain}, + {consts.RestoreK8sEventsFlagName, rf.K8sEvents}, + {consts.RestoreOverlayFlagName, rf.Overlay}, + } { + if db.name == flag { + return db.value + } + } + + return "" +} + +func (e *Etcd) endpointsString(host string, store map[string]string) string { + return fmt.Sprintf("%s.%s.%s=https://%s.%s.%s:%s", + host, e.clusterName(), e.privateZone(), + host, e.clusterName(), e.privateZone(), store["client_port"]) +} + +func (e *Etcd) Log() *logrus.Entry { + return e.log +} + +func (e *Etcd) SSH() interfaces.SSH { + return e.ssh +} + +func (e *Etcd) clusterName() string { + return e.tarmak.Cluster().ClusterName() +} + +func (e *Etcd) privateZone() string { + return e.tarmak.Environment().Config().PrivateZone +} diff --git a/pkg/tarmak/snapshot/snapshot.go b/pkg/tarmak/snapshot/snapshot.go new file mode 100644 index 0000000000..810947c550 --- /dev/null +++ b/pkg/tarmak/snapshot/snapshot.go @@ -0,0 +1,182 @@ +// Copyright Jetstack Ltd. See LICENSE for details. +package snapshot + +import ( + "bufio" + "compress/gzip" + "fmt" + "io" + "os" + "strings" + "sync" + + "github.com/hashicorp/go-multierror" + + "github.com/jetstack/tarmak/pkg/tarmak/interfaces" + "github.com/jetstack/tarmak/pkg/tarmak/utils" +) + +const ( + TimeLayout = "2006-01-02_15-04-05" + GZipCCmd = "gzip -c %s" + GZipDCmd = "gzip -d > %s" +) + +func Prepare(tarmak interfaces.Tarmak, role string) (aliases []string, err error) { + if err := tarmak.SSH().WriteConfig(tarmak.Cluster()); err != nil { + return nil, err + } + + hosts, err := tarmak.Cluster().ListHosts() + if err != nil { + return nil, err + } + + var result *multierror.Error + for _, host := range hosts { + if utils.SliceContainsPrefix(host.Roles(), role) { + if len(host.Aliases()) == 0 { + err := fmt.Errorf( + "host with correct role '%v' found without alias: %v", + host.Roles(), + host.ID(), + ) + result = multierror.Append(result, err) + continue + } + + aliases = append(aliases, host.Aliases()[0]) + } + } + + if result != nil { + return nil, result + } + + if len(aliases) == 0 { + return nil, fmt.Errorf("no host aliases were found with role %s", role) + } + + return aliases, result.ErrorOrNil() +} + +func TarFromStream(sshCmd func() error, stream io.Reader, path string) error { + var result *multierror.Error + var errLock sync.Mutex + var wg sync.WaitGroup + + f, err := os.Create(path) + if err != nil { + return err + } + defer f.Close() + + wg.Add(1) + go func() { + defer wg.Done() + + if err := sshCmd(); err != nil { + + errLock.Lock() + result = multierror.Append(result, err) + errLock.Unlock() + + } + return + }() + + gzr, err := gzip.NewReader(stream) + if err != nil { + + errLock.Lock() + result = multierror.Append(result, err) + errLock.Unlock() + + } + defer gzr.Close() + + if _, err := io.Copy(f, gzr); err != nil { + + errLock.Lock() + result = multierror.Append(result, err) + errLock.Unlock() + + } + + wg.Wait() + + return result.ErrorOrNil() +} + +func TarToStream(sshCmd func() error, stream io.WriteCloser, src string) error { + var result *multierror.Error + var errLock sync.Mutex + var wg sync.WaitGroup + + f, err := os.Open(src) + if err != nil { + return err + } + defer f.Close() + + wg.Add(1) + go func() { + defer wg.Done() + + if err := sshCmd(); err != nil { + + errLock.Lock() + result = multierror.Append(result, err) + errLock.Unlock() + + } + return + }() + + gzw := gzip.NewWriter(stream) + defer gzw.Close() + if _, err := io.Copy(gzw, f); err != nil { + + errLock.Lock() + result = multierror.Append(result, err) + errLock.Unlock() + + } + + f.Close() + gzw.Close() + stream.Close() + wg.Wait() + + return result.ErrorOrNil() +} + +func SSHCmd(s interfaces.Snapshot, host, cmd string, stdin io.Reader, stdout, stderr io.Writer) error { + for _, w := range []struct { + writer io.Writer + std string + }{ + {stdout, "out"}, + {stderr, "err"}, + } { + + if w.writer == nil { + var reader *io.PipeReader + reader, w.writer = io.Pipe() + scanner := bufio.NewScanner(reader) + + go func() { + for scanner.Scan() { + s.Log().WithField("std", w.std).Warn(scanner.Text()) + } + }() + } + } + + ret, err := s.SSH().Execute(host, strings.Split(cmd, " "), stdin, stdout, stderr) + if ret != 0 { + return fmt.Errorf("command [%s] returned non-zero (%d): %s", cmd, ret, err) + } + + return err +} diff --git a/pkg/tarmak/ssh.go b/pkg/tarmak/ssh.go index 8711ed76b0..c9b1fedcf1 100644 --- a/pkg/tarmak/ssh.go +++ b/pkg/tarmak/ssh.go @@ -9,14 +9,18 @@ func (t *Tarmak) SSH() interfaces.SSH { return t.ssh } -func (t *Tarmak) SSHPassThrough(argsAdditional []string) { +func (t *Tarmak) SSHPassThrough(host string, argsAdditional []string) error { if err := t.ssh.WriteConfig(t.Cluster()); err != nil { - t.log.Fatal(err) + return err } if err := t.ssh.Validate(); err != nil { - t.log.Fatal(err) + return err } - t.ssh.PassThrough(argsAdditional) + if err := t.ssh.PassThrough(host, argsAdditional); err != nil { + return err + } + + return nil } diff --git a/pkg/tarmak/ssh/ssh.go b/pkg/tarmak/ssh/ssh.go index 4c82dd8618..c9cd66bcde 100644 --- a/pkg/tarmak/ssh/ssh.go +++ b/pkg/tarmak/ssh/ssh.go @@ -6,26 +6,40 @@ import ( "encoding/pem" "errors" "fmt" + "io" "io/ioutil" + "net" "os" "os/exec" "path/filepath" - "syscall" + "strings" + "sync" + "time" - "github.com/hashicorp/go-multierror" "github.com/sirupsen/logrus" + "golang.org/x/crypto/ssh" + clusterv1alpha1 "github.com/jetstack/tarmak/pkg/apis/cluster/v1alpha1" "github.com/jetstack/tarmak/pkg/tarmak/interfaces" "github.com/jetstack/tarmak/pkg/tarmak/utils" ) var _ interfaces.SSH = &SSH{} +var ( + hostKeyCallbackError = errors.New("host key callback rejected") +) + type SSH struct { tarmak interfaces.Tarmak log *logrus.Entry - controlPaths []string + hosts map[string]interfaces.Host + tunnels []interfaces.Tunnel + + bastionClientLock sync.Mutex // ensure we set up connection to bastion one at a time to keep single connection + bastionClientConn *ssh.Client + bastionConfig *ssh.ClientConfig } func New(tarmak interfaces.Tarmak) *SSH { @@ -38,22 +52,58 @@ func New(tarmak interfaces.Tarmak) *SSH { } func (s *SSH) WriteConfig(c interfaces.Cluster) error { - hosts, err := c.ListHosts() if err != nil { return err } + localKnownHosts, err := s.parseKnownHosts() + if err != nil { + return err + } + + knownHosts, err := os.OpenFile(s.tarmak.Cluster().SSHHostKeysPath(), + os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0600) + if err != nil { + return err + } + defer knownHosts.Close() + var sshConfig bytes.Buffer sshConfig.WriteString(fmt.Sprintf("# ssh config for tarmak cluster %s\n", c.ClusterName())) + s.hosts = make(map[string]interfaces.Host) for _, host := range hosts { - _, err = sshConfig.WriteString(host.SSHConfig()) + strictChecking := "yes" + + if _, ok := localKnownHosts[host.Hostname()]; !ok { + // local host key is missing, so append + entry, err := host.SSHKnownHostConfig() + if err != nil { + return err + } + + if entry == "" && s.tarmak.Config().IgnoreMissingPublicKeyTags() { + // We need to change strict 'yes' to 'ask' since entry doesn't exist + // and we have 'ignore missing instances tags' set to true + strictChecking = "ask" + } + + if _, err := knownHosts.WriteString(entry); err != nil { + return err + } + } + + _, err = sshConfig.WriteString(host.SSHConfig(strictChecking)) if err != nil { return err } - s.controlPaths = append(s.controlPaths, host.SSHControlPath()) + if len(host.Aliases()) == 0 { + return fmt.Errorf("found host with no aliases: %s", host.Hostname()) + } + + s.hosts[host.Aliases()[0]] = host } err = utils.EnsureDirectory(filepath.Dir(c.SSHConfigPath()), 0700) @@ -69,58 +119,125 @@ func (s *SSH) WriteConfig(c interfaces.Cluster) error { return nil } -func (s *SSH) args() []string { - return []string{ - "ssh", - "-F", - s.tarmak.Cluster().SSHConfigPath(), +func (s *SSH) parseKnownHosts() (map[string]string, error) { + b, err := ioutil.ReadFile(s.tarmak.Cluster().SSHHostKeysPath()) + if err != nil && !os.IsNotExist(err) { + return nil, err } + + entries := make(map[string]string) + for _, entry := range strings.Split(string(b), "\n") { + line := strings.SplitN(entry, " ", 2) + + if len(line) == 2 { + entries[line[0]] = line[1] + } + } + + return entries, nil } // Pass through a local CLI session -func (s *SSH) PassThrough(argsAdditional []string) { - args := append(s.args(), argsAdditional...) - - cmd := exec.Command(args[0], args[1:len(args)]...) +func (s *SSH) PassThrough(hostName string, argsAdditional []string) error { + args := append( + []string{ + "ssh", "-F", + s.tarmak.Cluster().SSHConfigPath(), + hostName, "--", + }, + argsAdditional..., + ) + + cmd := exec.Command(args[0], args[1:]...) cmd.Stderr = os.Stderr cmd.Stdout = os.Stdout cmd.Stdin = os.Stdin err := cmd.Start() if err != nil { - s.log.Fatal(err) + return err + } + + return cmd.Wait() +} + +func (s *SSH) Execute(host string, cmd []string, stdin io.Reader, stdout, stderr io.Writer) (int, error) { + client, err := s.client(host) + if err != nil { + return -1, err } - err = cmd.Wait() + sess, err := client.NewSession() if err != nil { - s.log.Fatal(err) + return -1, err } -} + defer sess.Close() -func (s *SSH) Execute(host string, command string, argsAdditional []string) (returnCode int, err error) { - args := append(s.args(), host, "--", command) - args = append(args, argsAdditional...) + if stderr == nil { + sess.Stderr = os.Stderr + } else { + sess.Stderr = stderr + } - cmd := exec.Command(args[0], args[1:len(args)]...) + if stdout == nil { + sess.Stdout = os.Stdout + } else { + sess.Stdout = stdout + } + + if stdin == nil { + sess.Stdin = os.Stdin + } else { + sess.Stdin = stdin + } - err = cmd.Start() + err = sess.Start(strings.Join(cmd, " ")) if err != nil { return -1, err } - err = cmd.Wait() - if err != nil { - perr, ok := err.(*exec.ExitError) - if ok { - if status, ok := perr.Sys().(syscall.WaitStatus); ok { - return status.ExitStatus(), nil - } + if err := sess.Wait(); err != nil { + if e, ok := err.(*ssh.ExitError); ok { + return e.ExitStatus(), e } return -1, err } return 0, nil +} + +func (s *SSH) client(hostName string) (*ssh.Client, error) { + bastionClient, err := s.bastionClient() + if err != nil { + return nil, err + } + + // ssh into bastion so no need to set up proxy hop + if hostName == clusterv1alpha1.InstancePoolTypeBastion { + return bastionClient, nil + } + host, err := s.host(hostName) + if err != nil { + return nil, err + } + + conn, err := bastionClient.Dial("tcp", net.JoinHostPort(host.Hostname(), "22")) + if err != nil { + return nil, fmt.Errorf("failed to set up connection to %s from basiton: %s", host.Hostname(), err) + } + + conf, err := s.config() + if err != nil { + return nil, err + } + + ncc, chans, reqs, err := ssh.NewClientConn(conn, net.JoinHostPort(host.Hostname(), "22"), conf) + if err != nil { + return nil, fmt.Errorf("failed to set up ssh client: %s", err) + } + + return ssh.NewClient(ncc, chans, reqs), nil } func (s *SSH) Validate() error { @@ -163,14 +280,146 @@ func (s *SSH) Validate() error { return nil } -func (s *SSH) Cleanup() error { - var result *multierror.Error +func (s *SSH) Cleanup() { + for _, tunnel := range s.tunnels { + tunnel.Stop() + } + + if s.bastionClientConn != nil { + s.bastionClientConn.Close() + } +} - for _, c := range utils.RemoveDuplicateStrings(s.controlPaths) { - if err := os.RemoveAll(c); err != nil { - result = multierror.Append(result, err) +func (s *SSH) bastionClient() (*ssh.Client, error) { + s.bastionClientLock.Lock() + defer s.bastionClientLock.Unlock() + + // if the current bastion client is healthy we can use this + if s.bastionClientConn != nil { + sess, err := s.bastionClientConn.NewSession() + if err == nil { + err = sess.Run("/bin/true") + if err == nil { + return s.bastionClientConn, nil + } } + s.log.Infof("current connection to bastion failed: %s", err) + } + + conf, err := s.config() + if err != nil { + return nil, err + } + + bastion, err := s.host(clusterv1alpha1.InstancePoolTypeBastion) + if err != nil { + return nil, err + } + + client, err := ssh.Dial("tcp", net.JoinHostPort(bastion.Hostname(), "22"), conf) + if err != nil { + return nil, fmt.Errorf("failed to set up connection to bastion: %s", err) + } + s.bastionClientConn = client + + s.log.Infof("new connection to bastion host successful") + + return client, nil +} + +func (s *SSH) config() (*ssh.ClientConfig, error) { + if s.bastionConfig != nil { + return s.bastionConfig, nil + } + + bastion, err := s.host(clusterv1alpha1.InstancePoolTypeBastion) + if err != nil { + return nil, err + } + + b, err := ioutil.ReadFile(s.tarmak.Environment().SSHPrivateKeyPath()) + if err != nil { + return nil, fmt.Errorf("failed to read ssh private key: %s", err) + } + + signer, err := ssh.ParsePrivateKey(b) + if err != nil { + return nil, fmt.Errorf("failed to parse ssh private key: %s", err) + } + + return &ssh.ClientConfig{ + Timeout: time.Minute * 10, + User: bastion.User(), + Auth: []ssh.AuthMethod{ssh.PublicKeys(signer)}, + HostKeyCallback: s.hostKeyCallback, + }, nil +} + +func (s *SSH) hostKeyCallback(hostname string, remote net.Addr, key ssh.PublicKey) error { + localHosts, err := s.parseKnownHosts() + if err != nil { + s.log.Warnf("host key callback failed: %s", err) + return hostKeyCallbackError + } + + // remove port from hostname + if s := strings.Split(hostname, ":"); len(s) > 0 { + hostname = s[0] + } + + localKey, ok := localHosts[hostname] + if !ok { + if s.tarmak.Config().IgnoreMissingPublicKeyTags() { + s.log.Warnf("ignoring missing local host key for hostname %s", hostname) + return nil + } + + s.log.Warnf("missing local host key for hostname %s", hostname) + return hostKeyCallbackError + } + + lk, _, _, rest, err := ssh.ParseAuthorizedKey([]byte(localKey)) + if err != nil || rest != nil { + s.log.Errorf("failed to parse local host key %s: rest=%s err=%s", hostname, rest, err) + return hostKeyCallbackError + } + + if !bytes.Equal(key.Marshal(), lk.Marshal()) { + s.log.Errorf("local hostname key mismatch callback for %s", hostname) + return hostKeyCallbackError + } + + return nil +} + +func (s *SSH) host(name string) (interfaces.Host, error) { + host, ok := s.hosts[name] + if ok { + return host, nil + } + + // we have already have all hosts, we can't find it + if len(s.hosts) > 0 { + return nil, fmt.Errorf("failed to resolve host: %s", name) + } + + err := s.WriteConfig(s.tarmak.Cluster()) + if err != nil { + return nil, err + } + + _, bok := s.hosts[clusterv1alpha1.InstancePoolTypeBastion] + err = fmt.Errorf("failed to resolve target hosts for ssh: found %s=%v", + clusterv1alpha1.InstancePoolTypeBastion, + bok) + if !bok && name == clusterv1alpha1.InstancePoolTypeBastion { + return nil, err + } + + host, hok := s.hosts[name] + if !hok { + return nil, fmt.Errorf("%s %s=%v", err, name, hok) } - return result.ErrorOrNil() + return host, nil } diff --git a/pkg/tarmak/ssh/tunnel.go b/pkg/tarmak/ssh/tunnel.go index f5bb6ab7aa..1d0a409691 100644 --- a/pkg/tarmak/ssh/tunnel.go +++ b/pkg/tarmak/ssh/tunnel.go @@ -2,124 +2,196 @@ package ssh import ( + "bufio" "fmt" "io" "net" "os/exec" + "sync" + "syscall" "time" + "github.com/kardianos/osext" "github.com/sirupsen/logrus" + "golang.org/x/crypto/ssh" "github.com/jetstack/tarmak/pkg/tarmak/interfaces" - "github.com/jetstack/tarmak/pkg/tarmak/utils" ) type Tunnel struct { - localPort int - log *logrus.Entry - stdin io.WriteCloser + log *logrus.Entry + ssh *SSH + stopCh chan struct{} - retryCount int - retryWait time.Duration + dest string + destPort string + localPort string + daemonize bool - forwardSpec string - sshCommand []string + bastionConn *ssh.Client + listener net.Listener + + closeConnsLock sync.Mutex // prevent closing the same connection multiple times at once + openedConns []net.Conn } var _ interfaces.Tunnel = &Tunnel{} // This opens a local tunnel through a SSH connection -func (s *SSH) Tunnel(hostname string, destination string, destinationPort int) interfaces.Tunnel { - t := &Tunnel{ - localPort: utils.UnusedPort(), - log: s.log.WithField("destination", destination), - retryCount: 30, - retryWait: 500 * time.Millisecond, - sshCommand: s.args(), +func (s *SSH) Tunnel(dest, destPort, localPort string, daemonize bool) interfaces.Tunnel { + tunnel := &Tunnel{ + log: s.log.WithField("destination", dest), + ssh: s, + dest: dest, + destPort: destPort, + daemonize: daemonize, + localPort: localPort, + stopCh: make(chan struct{}), } - t.forwardSpec = fmt.Sprintf("-L%s:%d:%s:%d", t.BindAddress(), t.localPort, destination, destinationPort) - return t + s.tunnels = append(s.tunnels, tunnel) + return tunnel } // Start tunnel and wait till a tcp socket is reachable func (t *Tunnel) Start() error { - var err error - // ensure there is connectivity to the bastion - args := append(t.sshCommand, "bastion", "/bin/true") - cmd := exec.Command(args[0], args[1:len(args)]...) - - t.log.Debugf("check SSH connection to bastion cmd=%s", cmd.Args) - err = cmd.Start() + bastionClient, err := t.ssh.bastionClient() if err != nil { return err } + t.bastionConn = bastionClient - // check for errors - err = cmd.Wait() - if err != nil { - return fmt.Errorf("error checking SSH connecting to bastion: %s", err) - } + if t.daemonize { + err := t.startDaemon() + if err != nil { + return err + } - args = append(t.sshCommand, "-O", "forward", t.forwardSpec, "bastion") - cmd = exec.Command(args[0], args[1:len(args)]...) + // allow for some warm up time + time.Sleep(time.Second * 2) + return nil + } - t.log.Debugf("start tunnel cmd=%s", cmd.Args) - err = cmd.Start() + listener, err := net.Listen("tcp", net.JoinHostPort(t.BindAddress(), t.Port())) if err != nil { return err } + t.listener = listener - // check for errors - err = cmd.Wait() - if err != nil { - return fmt.Errorf("error starting SSH tunnel via bastion: %s", err) - } + go t.handle() + + return nil +} - // wait for TCP socket to be reachable - tries := t.retryCount +func (t *Tunnel) handle() { + tries := 5 for { - if conn, err := net.DialTimeout("tcp", fmt.Sprintf("127.0.0.1:%d", t.Port()), t.retryWait); err != nil { - t.log.Debug("error connecting to tunnel: ", err) - } else { - conn.Close() - return nil + remoteConn, err := t.bastionConn.Dial("tcp", + net.JoinHostPort(t.dest, t.destPort)) + if err != nil { + t.log.Warnf("failed to create tunnel to remote connection: %s", err) + + tries-- + if tries == 0 { + t.log.Error("5 errors connecting to remote server through bastion") + return + } + + time.Sleep(time.Second * 3) + continue } - - tries -= 1 - if tries == 0 { - break + t.openedConns = append(t.openedConns, remoteConn) + + conn, err := t.listener.Accept() + if err != nil { + select { + case <-t.stopCh: + return + default: + } + + t.log.Warnf("error accepting ssh tunnel connection: %s", err) + continue } - time.Sleep(t.retryWait) - } + t.openedConns = append(t.openedConns, conn) + + go func() { + io.Copy(remoteConn, conn) + }() - return fmt.Errorf("could not establish a connection to destination via tunnel after %d tries", t.retryCount) + go func() { + io.Copy(conn, remoteConn) + }() + } } -func (t *Tunnel) Stop() error { - args := append(t.sshCommand, "-O", "cancel", t.forwardSpec, "bastion") - cmd := exec.Command(args[0], args[1:len(args)]...) +func (t *Tunnel) Stop() { + // prevent closing the same connection multiple times at once + t.closeConnsLock.Lock() + defer t.closeConnsLock.Unlock() - t.log.Debugf("stop tunnel cmd=%s", cmd.Args) - err := cmd.Start() - if err != nil { - return err + select { + case <-t.stopCh: + default: + close(t.stopCh) } - // check for errors - err = cmd.Wait() - if err != nil { - t.log.Warn("stopping ssh tunnel failed with error: ", err) + for _, o := range t.openedConns { + if o != nil { + o.Close() + } } - return nil + if t.listener != nil { + t.listener.Close() + } } -func (t *Tunnel) Port() int { +func (t *Tunnel) Port() string { return t.localPort } func (t *Tunnel) BindAddress() string { return "127.0.0.1" } + +func (t *Tunnel) startDaemon() error { + binaryPath, err := osext.Executable() + if err != nil { + return fmt.Errorf("error finding tarmak executable: %s", err) + } + + cmd := exec.Command(binaryPath, "tunnel", t.dest, t.destPort, t.localPort) + + outR, outW := io.Pipe() + errR, errW := io.Pipe() + outS := bufio.NewScanner(outR) + errS := bufio.NewScanner(errR) + + cmd.Stdin = nil + cmd.Stdout = outW + cmd.Stderr = errW + + go func() { + for outS.Scan() { + t.log.WithField("tunnel", t.dest).Debug(outS.Text()) + } + }() + go func() { + for errS.Scan() { + t.log.WithField("tunnel", t.dest).Debug(errS.Text()) + } + }() + + cmd.SysProcAttr = &syscall.SysProcAttr{ + Setpgid: true, + Foreground: false, + } + + if err := cmd.Start(); err != nil { + return err + } + + return nil +} diff --git a/pkg/tarmak/tarmak.go b/pkg/tarmak/tarmak.go index e0faa5585c..3a092f75dd 100644 --- a/pkg/tarmak/tarmak.go +++ b/pkg/tarmak/tarmak.go @@ -361,13 +361,11 @@ func (t *Tarmak) Cleanup() { t.rootPath = nil } - if err := t.SSH().Cleanup(); err != nil { - t.log.Warnf("error cleaning up ssh run time assets: %s", err) - } - if err := t.terraform.Cleanup(); err != nil { t.log.Warnf("error cleaning up terraform run time assets: %s", err) } + + t.ssh.Cleanup() } func (t *Tarmak) Variables() map[string]interface{} { diff --git a/pkg/tarmak/utils/consts/consts.go b/pkg/tarmak/utils/consts/consts.go index 98c07253f4..4ca16fb8d1 100644 --- a/pkg/tarmak/utils/consts/consts.go +++ b/pkg/tarmak/utils/consts/consts.go @@ -9,4 +9,8 @@ const ( DefaultKubeconfigPath = "${TARMAK_CONFIG}/${CURRENT_CLUSTER}/kubeconfig" KubeconfigFlagName = "public-api-endpoint" + + RestoreK8sMainFlagName = "k8s-main" + RestoreK8sEventsFlagName = "k8s-events" + RestoreOverlayFlagName = "overlay" ) diff --git a/pkg/tarmak/utils/slices.go b/pkg/tarmak/utils/slices.go index 726e64d6c9..9dcc46e6dd 100644 --- a/pkg/tarmak/utils/slices.go +++ b/pkg/tarmak/utils/slices.go @@ -1,6 +1,8 @@ // Copyright Jetstack Ltd. See LICENSE for details. package utils +import "strings" + func RemoveDuplicateStrings(slice []string) (result []string) { seen := make(map[string]bool) @@ -46,3 +48,12 @@ func IndexOfString(slice []string, str string) int { return -1 } + +func SliceContainsPrefix(slice []string, prefix string) bool { + for _, s := range slice { + if strings.HasPrefix(s, prefix) { + return true + } + } + return false +} diff --git a/pkg/tarmak/utils/zip/zip.go b/pkg/tarmak/utils/zip/zip.go new file mode 100644 index 0000000000..191bf5647a --- /dev/null +++ b/pkg/tarmak/utils/zip/zip.go @@ -0,0 +1,119 @@ +// Copyright Jetstack Ltd. See LICENSE for details. +package zip + +import ( + "archive/zip" + "fmt" + "io" + "os" + "path/filepath" + "strings" + + "github.com/jetstack/tarmak/pkg/tarmak/utils" +) + +var ( + overrideErr = "trying to override source file but not deleting source: %s %s" +) + +func Zip(src []string, dst string, deleteSrc bool) error { + var writer io.Writer + var tempFile *os.File + + if !strings.HasSuffix(dst, ".zip") { + dst = fmt.Sprintf("%s.zip", dst) + } + + if utils.SliceContains(src, dst) { + if !deleteSrc { + return fmt.Errorf(overrideErr, src, dst) + } + + // source contains destination file so write zip to temp file + var err error + tempFile, err = os.Create(filepath.Join(os.TempDir(), filepath.Base(dst))) + if err != nil { + return err + } + + defer os.RemoveAll(tempFile.Name()) + writer = tempFile + + } else { + + // source files doesn't contain destination so write straight to + // destination file + f, err := os.Create(dst) + if err != nil { + return err + } + + defer f.Close() + writer = f + } + + zipW := zip.NewWriter(writer) + defer zipW.Close() + + for _, f := range src { + srcF, err := os.Open(f) + if err != nil { + return err + } + defer srcF.Close() + + info, err := srcF.Stat() + if err != nil { + return err + } + + header, err := zip.FileInfoHeader(info) + if err != nil { + return err + } + + header.Name = f + header.Method = zip.Deflate + + fWriter, err := zipW.CreateHeader(header) + if err != nil { + return err + } + + if _, err = io.Copy(fWriter, srcF); err != nil { + return err + } + } + + if deleteSrc { + for _, f := range src { + if err := os.RemoveAll(f); err != nil { + return fmt.Errorf("failed to delete all src files: %s", err) + } + } + } + + zipW.Close() + + // zip is in temp so copy to destination file + if tempFile != nil { + tempFile.Close() + + tempFile, err := os.Open(tempFile.Name()) + if err != nil { + return err + } + + f, err := os.Create(dst) + if err != nil { + return err + } + defer f.Close() + + if _, err = io.Copy(f, tempFile); err != nil { + return err + } + } + + return nil +} diff --git a/pkg/tarmak/utils/zip/zip_test.go b/pkg/tarmak/utils/zip/zip_test.go new file mode 100644 index 0000000000..cd6d6c4089 --- /dev/null +++ b/pkg/tarmak/utils/zip/zip_test.go @@ -0,0 +1,120 @@ +// Copyright Jetstack Ltd. See LICENSE for details. +package zip + +import ( + "archive/zip" + "fmt" + "io/ioutil" + "math/rand" + "os" + "testing" +) + +func Test_Zip(t *testing.T) { + dir, err := ioutil.TempDir("", "tarmak_zip_test") + try(t, nil, err) + defer os.RemoveAll(dir) + + // can't override source + src := []string{"a.zip"} + dst := "a" + try(t, fmt.Errorf(overrideErr, src, src[0]), Zip(src, dst, false)) + dst = "a.zip" + try(t, fmt.Errorf(overrideErr, src, dst), Zip(src, dst, false)) + + tmpSrc := tempFile(t, dir) + b := randBytes(t) + try(t, nil, ioutil.WriteFile(tmpSrc, b, 0664)) + src = []string{tmpSrc} + dst = fmt.Sprintf("%s.zip", tempFile(t, dir)) + + // shouldn't delete source + try(t, nil, Zip(src, dst, false)) + _, err = os.Stat(tmpSrc) + try(t, nil, err) + + // should delete source + try(t, nil, Zip(src, dst, true)) + _, err = os.Stat(tmpSrc) + try(t, fmt.Errorf("stat %s: no such file or directory", tmpSrc), err) + + testUnzip(t, b, dst) + + // should still unzip correctly when destination target is source file + tmpSrc = tempFile(t, dir) + tmpDst := tempFile(t, dir) + b = randBytes(t) + try(t, nil, ioutil.WriteFile(tmpSrc, b, 0664)) + try(t, nil, ioutil.WriteFile(tmpDst, b, 0664)) + try(t, nil, Zip([]string{tmpDst}, tmpDst, true)) + + tmpDst = fmt.Sprintf("%s.zip", tmpDst) + testUnzip(t, b, tmpDst) + + src = []string{tmpSrc, tmpDst} + + // zip source into itself + try(t, nil, Zip(src, tmpDst, true)) + _, err = os.Stat(tmpDst) + try(t, nil, err) + + testUnzip(t, b, tmpDst) +} + +func testUnzip(t *testing.T, srcB []byte, dst string) { + reader, err := zip.OpenReader(dst) + try(t, nil, err) + + if len(reader.File) == 0 { + t.Fatalf("expected zip to contain at least 1 file, got=%d", len(reader.File)) + } + + f, err := reader.File[0].Open() + try(t, nil, err) + b, err := ioutil.ReadAll(f) + try(t, nil, err) + + if string(b) != string(srcB) { + t.Fatalf("final bytes don't match, exp=%s got=%s", srcB, b) + } +} + +func try(t *testing.T, exp, got error) { + err := fmt.Sprintf("unexpected result, exp=[%v] got=[%v]", + exp, got) + + if exp == got { + return + } + + if exp == nil && got != nil { + t.Fatal(err) + } + + if exp != nil && got == nil { + t.Fatal(err) + } + + if exp.Error() != got.Error() { + t.Fatal(err) + } +} + +func tempFile(t *testing.T, dir string) string { + f, err := ioutil.TempFile(dir, "") + if err != nil { + t.Fatalf("failed to create temp file: %s", err) + } + + return f.Name() +} + +func randBytes(t *testing.T) []byte { + var b [256]byte + _, err := rand.Read(b[:]) + if err != nil { + t.Fatalf("failed to generate random bytes: %s", err) + } + + return b[:] +} diff --git a/pkg/tarmak/vault/tunnel.go b/pkg/tarmak/vault/tunnel.go index 58d8c000cd..4b9ac2fc3a 100644 --- a/pkg/tarmak/vault/tunnel.go +++ b/pkg/tarmak/vault/tunnel.go @@ -38,7 +38,7 @@ func NewTunnel( } err = vaultClient.SetAddress( fmt.Sprintf( - "https://%s:%d", tunnel.BindAddress(), tunnel.Port(), + "https://%s:%s", tunnel.BindAddress(), tunnel.Port(), ), ) if err != nil { @@ -64,11 +64,11 @@ func (v *vaultTunnel) Start() error { return nil } -func (v *vaultTunnel) Stop() error { - return v.tunnel.Stop() +func (v *vaultTunnel) Stop() { + v.tunnel.Stop() } -func (v *vaultTunnel) Port() int { +func (v *vaultTunnel) Port() string { return v.tunnel.Port() } diff --git a/pkg/tarmak/vault/tunnel_test.go b/pkg/tarmak/vault/tunnel_test.go index f4a4d04721..54775f2a28 100644 --- a/pkg/tarmak/vault/tunnel_test.go +++ b/pkg/tarmak/vault/tunnel_test.go @@ -7,7 +7,6 @@ import ( "net/http" "net/http/httptest" "net/url" - "strconv" "testing" "github.com/jetstack/tarmak/pkg/tarmak/interfaces" @@ -16,10 +15,10 @@ import ( type FakeTunnel struct { bindAddress string - port int + port string } -func (ft *FakeTunnel) Port() int { +func (ft *FakeTunnel) Port() string { return ft.port } @@ -31,8 +30,8 @@ func (ft *FakeTunnel) Start() error { return nil } -func (ft *FakeTunnel) Stop() error { - return nil +func (ft *FakeTunnel) Stop() { + return } var _ interfaces.Tunnel = &FakeTunnel{} @@ -60,13 +59,9 @@ func TestVaultTunnel(t *testing.T) { if err != nil { t.Fatal(err) } - port, err := strconv.Atoi(u.Port()) - if err != nil { - t.Fatal(err) - } tunnel := &FakeTunnel{ bindAddress: u.Hostname(), - port: port, + port: u.Port(), } fqdn := "host1.example.com" vaultCA := x509.NewCertPool() diff --git a/pkg/tarmak/vault/vault.go b/pkg/tarmak/vault/vault.go index f39a8d799c..910a26a727 100644 --- a/pkg/tarmak/vault/vault.go +++ b/pkg/tarmak/vault/vault.go @@ -8,6 +8,7 @@ import ( "io/ioutil" "os" "path/filepath" + "strconv" "strings" "sync" "time" @@ -154,7 +155,7 @@ func (v *Vault) createTunnelsWithCA(instances []string, vaultCA string) ([]*vaul for pos := range instances { fqdn := instances[pos] sshTunnel := v.cluster.Environment().Tarmak().SSH().Tunnel( - "bastion", fqdn, 8200, + fqdn, "8200", strconv.Itoa(utils.UnusedPort()), false, ) vaultTunnel, err := NewTunnel( sshTunnel, @@ -198,10 +199,7 @@ func (v *Vault) VerifyInitFromFQDNs(instances []string, vaultCA, vaultKMSKeyID, wg.Add(1) go func(pos int) { defer wg.Done() - err := tunnels[pos].Stop() - if err != nil { - v.log.Warn(err) - } + tunnels[pos].Stop() }(pos) } wg.Wait() diff --git a/pkg/terraform/templating.go b/pkg/terraform/templating.go index 803bfe8441..e479b0bad0 100644 --- a/pkg/terraform/templating.go +++ b/pkg/terraform/templating.go @@ -76,6 +76,23 @@ func (t *Terraform) GenerateCode(c interfaces.Cluster) (err error) { } } + sourceTaggingControlBinary, err := os.Open(filepath.Join(rootPath, "tagging_control.zip")) + if err != nil { + return err + } + defer sourceTaggingControlBinary.Close() + + destTaggingControlBinary, err := os.Create(filepath.Join(terraformCodePath, "tagging_control.zip")) + if err != nil { + return err + } + defer destTaggingControlBinary.Close() + + _, err = io.Copy(destTaggingControlBinary, sourceTaggingControlBinary) + if err != nil { + return err + } + // create puppet.tar.gz puppetTarGzFilename := filepath.Clean( filepath.Join( @@ -128,7 +145,8 @@ func (t *terraformTemplate) Generate() error { result = multierror.Append(result, err) } - for _, module := range []string{"state", "bastion", "network", "network-existing-vpc", "jenkins", "vault", "kubernetes"} { + for _, module := range []string{"state", "bastion", "tagging_control", "network", + "network-existing-vpc", "jenkins", "vault", "kubernetes"} { if err := t.generateModuleInstanceTemplates(module); err != nil { result = multierror.Append(result, err) } @@ -167,6 +185,11 @@ func (t *terraformTemplate) Generate() error { } } + if err := t.generateTemplate("bastion_user_data", + "modules/bastion/templates/bastion_user_data", "yaml", "bastion"); err != nil { + result = multierror.Append(result, err) + } + if t.cluster.Type() != clusterv1alpha1.ClusterTypeClusterMulti { if err := t.generateTemplate("jenkins_elb", "modules/jenkins/jenkins_elb", "tf", "vault"); err != nil { result = multierror.Append(result, err) @@ -181,6 +204,10 @@ func (t *terraformTemplate) Generate() error { "modules/bastion/templates/bastion_user_data", "yaml", "bastion"); err != nil { result = multierror.Append(result, err) } + if err := t.generateTemplate("jenkins_user_data", + "modules/jenkins/templates/jenkins_user_data", "yaml", "jenkins"); err != nil { + result = multierror.Append(result, err) + } if err := t.generateTerraformVariables(); err != nil { result = multierror.Append(result, err) diff --git a/pkg/wing/server/server.go b/pkg/wing/server/server.go index 8780f257a5..574a6691c0 100644 --- a/pkg/wing/server/server.go +++ b/pkg/wing/server/server.go @@ -1,11 +1,11 @@ // Copyright Jetstack Ltd. See LICENSE for details. - package server import ( "fmt" "io" "net" + "os" "github.com/spf13/cobra" @@ -22,6 +22,7 @@ import ( "github.com/jetstack/tarmak/pkg/wing/apiserver" clientset "github.com/jetstack/tarmak/pkg/wing/client/clientset/versioned" informers "github.com/jetstack/tarmak/pkg/wing/client/informers/externalversions" + "github.com/jetstack/tarmak/pkg/wing/tags" ) const defaultEtcdPathPrefix = "/registry/wing.tarmak.io" @@ -58,6 +59,24 @@ func NewCommandStartWingServer(out, errOut io.Writer, stopCh <-chan struct{}) *c Short: "Launch a wing API server", Long: "Launch a wing API server", RunE: func(c *cobra.Command, args []string) error { + env, err := c.Flags().GetString("environment") + if err != nil { + return err + } + + if env == "" { + env = os.Getenv("WING_ENVIRONMENT") + } + + t, err := tags.New(nil, env) + if err != nil { + return err + } + + if err := t.EnsureMachineTags(); err != nil { + return err + } + if err := o.Complete(); err != nil { return err } diff --git a/pkg/wing/tags/aws/aws.go b/pkg/wing/tags/aws/aws.go new file mode 100644 index 0000000000..6b5c14c157 --- /dev/null +++ b/pkg/wing/tags/aws/aws.go @@ -0,0 +1,181 @@ +// Copyright Jetstack Ltd. See LICENSE for details. +package aws + +import ( + "crypto/rand" + "encoding/json" + "fmt" + "io/ioutil" + "net/http" + "path/filepath" + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/ec2metadata" + "github.com/aws/aws-sdk-go/aws/session" + "github.com/aws/aws-sdk-go/service/lambda" + "github.com/sirupsen/logrus" + "golang.org/x/crypto/ssh" + + tagControl "github.com/jetstack/tarmak/pkg/tagging_control" +) + +const ( + identityEndpoint = "http://169.254.169.254/latest/dynamic/instance-identity" + keyDir = "/etc/ssh" +) + +type AWSTags struct { + log *logrus.Entry + environment string +} + +func New(log *logrus.Entry, e string) *AWSTags { + return &AWSTags{ + log: log, + environment: e, + } +} + +func (a *AWSTags) EnsureMachineTags() error { + document, err := a.requestData("document") + if err != nil { + return err + } + + rsaSig, err := a.requestData("signature") + if err != nil { + return err + } + + pks, sigs, err := a.fetchLocalKeys(document) + if err != nil { + return err + } + + request := &tagControl.TagInstanceRequest{ + KeySignatures: sigs, + PublicKeys: pks, + InstanceDocumentRaw: document, + RSASigniture: rsaSig, + } + + if err := a.callLambdaFunction(request); err != nil { + return err + } + + a.log.Infof("successfully ensured instance tags") + + return nil +} + +func (a *AWSTags) callLambdaFunction(request *tagControl.TagInstanceRequest) error { + b, err := json.Marshal(request) + if err != nil { + return fmt.Errorf("failed to marshal request: %s", err) + } + + document := new(ec2metadata.EC2InstanceIdentityDocument) + err = json.Unmarshal(request.InstanceDocumentRaw, document) + if err != nil { + return fmt.Errorf("failed to unmarshal identity document: %s", err) + } + + svc := lambda.New(session.New(&aws.Config{ + Region: aws.String(document.Region), + })) + + resp, err := svc.Invoke(&lambda.InvokeInput{ + FunctionName: aws.String(fmt.Sprintf("%s_tarmak_tagging_control", a.environment)), + Payload: b, + }) + if err != nil { + return fmt.Errorf("failed to invoke lambda function: %s", err) + } + + if resp.LogResult != nil { + a.log.Debug(*resp.LogResult) + } + + if resp.FunctionError != nil { + return fmt.Errorf("tagging control function failed: %s: %s", *resp.FunctionError, resp.Payload) + } + + return nil +} + +func (a *AWSTags) fetchLocalKeys(document []byte) (map[string][]byte, map[string]*ssh.Signature, error) { + fs, err := ioutil.ReadDir(keyDir) + if err != nil { + return nil, nil, err + } + + publicKeys := make(map[string][]byte) + sigs := make(map[string]*ssh.Signature) + for _, f := range fs { + + // not a key file + if f.IsDir() || !strings.HasPrefix(f.Name(), "ssh_host") { + continue + } + + path := filepath.Join(keyDir, f.Name()) + + fileData, err := ioutil.ReadFile(path) + if err != nil { + return nil, nil, err + } + + // public key file + if strings.HasSuffix(f.Name(), ".pub") { + + // ensure we do have a public key, not private + // exit failure if not public, we have bad naming scheme so reject + _, _, _, rest, err := ssh.ParseAuthorizedKey(fileData) + if err != nil { + return nil, nil, fmt.Errorf("failed to parse local public key %s: %s", path, err) + } + + if len(rest) != 0 { + return nil, nil, fmt.Errorf("got rest parsing public key: %s", rest) + } + + name := strings.TrimSuffix(f.Name(), filepath.Ext(f.Name())) + + a.log.Debugf("using public key %s", path) + publicKeys[name] = fileData + + continue + } + + // private key + signer, err := ssh.ParsePrivateKey(fileData) + if err != nil { + return nil, nil, fmt.Errorf("failed to parse local private key %s: %s", path, err) + } + + sig, err := signer.Sign(rand.Reader, document) + if err != nil { + return nil, nil, err + } + + a.log.Debugf("using signature from private key %s", path) + sigs[f.Name()] = sig + } + + return publicKeys, sigs, nil +} + +func (a *AWSTags) requestData(file string) ([]byte, error) { + res, err := http.Get(fmt.Sprintf("%s/%s", identityEndpoint, file)) + if err != nil { + return nil, err + } + + data, err := ioutil.ReadAll(res.Body) + if err != nil { + return nil, err + } + + return data, nil +} diff --git a/pkg/wing/tags/tags.go b/pkg/wing/tags/tags.go new file mode 100644 index 0000000000..006d7b1936 --- /dev/null +++ b/pkg/wing/tags/tags.go @@ -0,0 +1,32 @@ +// Copyright Jetstack Ltd. See LICENSE for details. +package tags + +import ( + "fmt" + "os" + + "github.com/jetstack/tarmak/pkg/wing/tags/aws" + "github.com/sirupsen/logrus" +) + +type Tags interface { + EnsureMachineTags() error +} + +func New(log *logrus.Entry, environment string) (Tags, error) { + if log == nil { + log = logrus.NewEntry(logrus.New()) + log.Level = logrus.DebugLevel + } + + provider := os.Getenv("WING_CLOUD_PROVIDER") + + // default to amazon if provider not specified + switch provider { + case "amazon", "aws", "": + return aws.New(log, environment), nil + + default: + return nil, fmt.Errorf("target provider for tags not supported %s", provider) + } +} diff --git a/pkg/wing/wing.go b/pkg/wing/wing.go index 2947912baa..d63aa3d0e5 100644 --- a/pkg/wing/wing.go +++ b/pkg/wing/wing.go @@ -5,6 +5,7 @@ import ( "fmt" "os" "os/signal" + "strings" "sync" "syscall" "time" @@ -18,6 +19,7 @@ import ( "github.com/jetstack/tarmak/pkg/apis/wing/v1alpha1" client "github.com/jetstack/tarmak/pkg/wing/client/clientset/versioned" + "github.com/jetstack/tarmak/pkg/wing/tags" ) const ( @@ -65,6 +67,21 @@ func New(flags *Flags) *Wing { func (w *Wing) Run(args []string) error { var errors []error + var env string + ec := strings.Split(w.flags.ClusterName, "-") + if len(ec) > 0 { + env = ec[0] + } + + t, err := tags.New(w.log, env) + if err != nil { + return err + } + + if err := t.EnsureMachineTags(); err != nil { + return err + } + if w.flags.InstanceName == DefaultInstanceName { instanceName, err := os.Hostname() if err != nil { diff --git a/puppet/modules/etcd/manifests/init.pp b/puppet/modules/etcd/manifests/init.pp index 1dc08d0d7f..fd4b83f35a 100644 --- a/puppet/modules/etcd/manifests/init.pp +++ b/puppet/modules/etcd/manifests/init.pp @@ -13,6 +13,7 @@ $gid = $::etcd::params::gid, $user = $::etcd::params::user, $group = $::etcd::params::group, + $bin_dir = $::etcd::params::bin_dir, Boolean $backup_enabled = false, Enum['aws:kms',''] $backup_sse = '', String $backup_bucket_prefix = '', diff --git a/puppet/modules/etcd/manifests/install.pp b/puppet/modules/etcd/manifests/install.pp index ccd25240e7..871e70fca1 100644 --- a/puppet/modules/etcd/manifests/install.pp +++ b/puppet/modules/etcd/manifests/install.pp @@ -33,5 +33,8 @@ creates => "${dest_dir}/etcd", path => ['/usr/bin/', '/bin'], } - + -> file { "${::etcd::bin_dir}/etcdctl": + ensure => 'link', + target => "${dest_dir}/etcdctl", + } } diff --git a/terraform/amazon/modules/bastion/bastion.tf b/terraform/amazon/modules/bastion/bastion.tf index eab5e89e25..8d9a5ccf6c 100644 --- a/terraform/amazon/modules/bastion/bastion.tf +++ b/terraform/amazon/modules/bastion/bastion.tf @@ -2,7 +2,8 @@ data "template_file" "bastion_user_data" { template = "${file("${path.module}/templates/bastion_user_data.yaml")}" vars { - fqdn = "bastion.${var.public_zone}" + fqdn = "bastion.${var.public_zone}" + tarmak_environment = "${var.environment}" wing_binary_path = "${var.secrets_bucket}/${var.wing_binary_path}" wing_version = "${var.wing_version}" @@ -41,15 +42,31 @@ resource "aws_instance" "bastion" { volume_size = "${var.bastion_root_size}" } + lifecycle { + ignore_changes = ["tags"] + } + tags { - Name = "${data.template_file.stack_name.rendered}-bastion" Environment = "${var.environment}" Project = "${var.project}" Contact = "${var.contact}" - tarmak_role = "bastion" } user_data = "${data.template_file.bastion_user_data.rendered}" + + depends_on = ["aws_iam_role_policy_attachment.bastion_tagging_control_lambda_invoke"] +} + +resource "awstag_ec2_tag" "Name" { + ec2_id = "${aws_instance.bastion.0.id}" + key = "Name" + value = "${data.template_file.stack_name.rendered}-bastion" +} + +resource "awstag_ec2_tag" "tarmak_role" { + ec2_id = "${aws_instance.bastion.0.id}" + key = "tarmak_role" + value = "bastion" } resource "aws_eip" "bastion" { diff --git a/terraform/amazon/modules/bastion/bastion_iam.tf b/terraform/amazon/modules/bastion/bastion_iam.tf index fce2804f10..4da6b0a4a2 100644 --- a/terraform/amazon/modules/bastion/bastion_iam.tf +++ b/terraform/amazon/modules/bastion/bastion_iam.tf @@ -27,7 +27,7 @@ data "template_file" "wing_binary_read" { } resource "aws_iam_policy" "wing_binary_read" { - name = "bastion.${data.template_file.stack_name.rendered}.wing_binary_read" + name = "${data.template_file.stack_name.rendered}.wing_binary_read" path = "/" policy = "${data.template_file.wing_binary_read.rendered}" } @@ -36,3 +36,8 @@ resource "aws_iam_role_policy_attachment" "bastion_wing_binary_read" { role = "${aws_iam_role.bastion.name}" policy_arn = "${aws_iam_policy.wing_binary_read.arn}" } + +resource "aws_iam_role_policy_attachment" "bastion_tagging_control_lambda_invoke" { + role = "${aws_iam_role.bastion.name}" + policy_arn = "${var.tagging_control_policy_arn}" +} diff --git a/terraform/amazon/modules/bastion/inputs.tf b/terraform/amazon/modules/bastion/inputs.tf index 96c8897621..aa96a26f5d 100644 --- a/terraform/amazon/modules/bastion/inputs.tf +++ b/terraform/amazon/modules/bastion/inputs.tf @@ -38,3 +38,5 @@ variable "bastion_iam_additional_policy_arns" { } variable "secrets_bucket" {} + +variable "tagging_control_policy_arn" {} diff --git a/terraform/amazon/modules/jenkins/inputs.tf b/terraform/amazon/modules/jenkins/inputs.tf index 024a7c0c50..4a142c0580 100644 --- a/terraform/amazon/modules/jenkins/inputs.tf +++ b/terraform/amazon/modules/jenkins/inputs.tf @@ -46,4 +46,5 @@ variable "jenkins_admin_cidrs" { type = "list" } +variable "tagging_control_policy_arn" {} variable "wing_binary_read_policy_arn" {} diff --git a/terraform/amazon/modules/kubernetes/inputs.tf b/terraform/amazon/modules/kubernetes/inputs.tf index fa66903f0f..d9c8e7a990 100644 --- a/terraform/amazon/modules/kubernetes/inputs.tf +++ b/terraform/amazon/modules/kubernetes/inputs.tf @@ -88,4 +88,6 @@ variable "elb_access_logs_internal_bucket_prefix" {} variable "elb_access_logs_internal_bucket_interval" {} variable "backups_bucket" {} + +variable "tagging_control_policy_arn" {} variable "wing_binary_read_policy_arn" {} diff --git a/terraform/amazon/modules/network-existing-vpc/route53.tf b/terraform/amazon/modules/network-existing-vpc/route53.tf index 29b9315457..668afb229c 100644 --- a/terraform/amazon/modules/network-existing-vpc/route53.tf +++ b/terraform/amazon/modules/network-existing-vpc/route53.tf @@ -1,10 +1,13 @@ resource "aws_route53_zone" "private" { count = "${signum(length(var.private_zone))}" name = "${var.private_zone}" - vpc_id = "${var.vpc_id}" force_destroy = true comment = "Hosted zone for private kubernetes in ${var.environment}" + vpc { + vpc_id = "${aws_vpc.main.0.id}" + } + tags { Name = "${data.template_file.stack_name.rendered}" Environment = "${var.environment}" diff --git a/terraform/amazon/modules/network/outputs.tf b/terraform/amazon/modules/network/outputs.tf index 0079ad943c..bf58716008 100644 --- a/terraform/amazon/modules/network/outputs.tf +++ b/terraform/amazon/modules/network/outputs.tf @@ -42,8 +42,9 @@ output "private_zone_id" { value = "${concat(aws_route53_zone.private.*.id, list(""))}" } +# remove trailing dots from the name output "private_zone" { - value = "${concat(aws_route53_zone.private.*.name, list(""))}" + value = "${list(replace(aws_route53_zone.private.0.name, "/\\.$/", ""), "")}" } output "environment" { diff --git a/terraform/amazon/modules/network/route53.tf b/terraform/amazon/modules/network/route53.tf index f5867cc366..668afb229c 100644 --- a/terraform/amazon/modules/network/route53.tf +++ b/terraform/amazon/modules/network/route53.tf @@ -1,10 +1,13 @@ resource "aws_route53_zone" "private" { count = "${signum(length(var.private_zone))}" name = "${var.private_zone}" - vpc_id = "${aws_vpc.main.0.id}" force_destroy = true comment = "Hosted zone for private kubernetes in ${var.environment}" + vpc { + vpc_id = "${aws_vpc.main.0.id}" + } + tags { Name = "${data.template_file.stack_name.rendered}" Environment = "${var.environment}" diff --git a/terraform/amazon/modules/tagging_control/inputs.tf b/terraform/amazon/modules/tagging_control/inputs.tf new file mode 100644 index 0000000000..16a0d5e3c8 --- /dev/null +++ b/terraform/amazon/modules/tagging_control/inputs.tf @@ -0,0 +1,14 @@ +variable "stack_name_prefix" {} +variable "name" {} +variable "environment" {} +variable "vpc_id" {} +variable "project" {} +variable "contact" {} + +variable "private_subnet_ids" { + type = "list" +} + +data "template_file" "stack_name" { + template = "${var.stack_name_prefix}${var.environment}-${var.name}" +} diff --git a/terraform/amazon/modules/tagging_control/output.tf b/terraform/amazon/modules/tagging_control/output.tf new file mode 100644 index 0000000000..4e490cd52f --- /dev/null +++ b/terraform/amazon/modules/tagging_control/output.tf @@ -0,0 +1,3 @@ +output "tagging_control_policy_arn" { + value = "${aws_iam_policy.tagging_control_lambda_invoke.arn}" +} diff --git a/terraform/amazon/modules/tagging_control/tagging_control.tf b/terraform/amazon/modules/tagging_control/tagging_control.tf new file mode 100644 index 0000000000..2f432f6657 --- /dev/null +++ b/terraform/amazon/modules/tagging_control/tagging_control.tf @@ -0,0 +1,23 @@ +resource "aws_lambda_function" "tagging_control" { + filename = "tagging_control.zip" + function_name = "${var.environment}_tarmak_tagging_control" + role = "${aws_iam_role.tagging_control.arn}" + handler = "tagging_control_linux_amd64" + source_code_hash = "${base64sha256(file("tagging_control.zip"))}" + runtime = "go1.x" + timeout = "10" + + vpc_config { + subnet_ids = ["${var.private_subnet_ids}"] + security_group_ids = ["${aws_security_group.tagging_control.id}"] + } + + tags { + Name = "${data.template_file.stack_name.rendered}-tagging_control" + Environment = "${var.environment}" + Project = "${var.project}" + Contact = "${var.contact}" + } + + depends_on = ["aws_iam_role_policy.tagging_control"] +} diff --git a/terraform/amazon/modules/tagging_control/tagging_control_iam.tf b/terraform/amazon/modules/tagging_control/tagging_control_iam.tf new file mode 100644 index 0000000000..acde5acc9b --- /dev/null +++ b/terraform/amazon/modules/tagging_control/tagging_control_iam.tf @@ -0,0 +1,54 @@ +resource "aws_iam_role" "tagging_control" { + name = "${data.template_file.stack_name.rendered}-tagging_control" + path = "/tagging_control-${var.environment}/" + assume_role_policy = "${file("${path.module}/templates/role.json")}" +} + +resource "aws_iam_role_policy" "tagging_control" { + name = "${data.template_file.stack_name.rendered}-tagging_control" + role = "${aws_iam_role.tagging_control.name}" + policy = "${data.template_file.tagging_control_policy.rendered}" +} + +data "template_file" "tagging_control_policy" { + template = "${file("${path.module}/templates/tagging_control_policy.json")}" +} + +resource "aws_security_group" "tagging_control" { + name = "${data.template_file.stack_name.rendered}-tagging_control" + vpc_id = "${var.vpc_id}" + + tags { + Name = "${data.template_file.stack_name.rendered}-tagging_control" + Environment = "${var.environment}" + Project = "${var.project}" + Contact = "${var.contact}" + } +} + +resource "aws_security_group_rule" "tagging_control_allow_all_out" { + type = "egress" + from_port = 443 + to_port = 443 + protocol = "tcp" + cidr_blocks = ["0.0.0.0/0"] + security_group_id = "${aws_security_group.tagging_control.id}" +} + +resource "aws_iam_policy" "tagging_control_lambda_invoke" { + name = "${data.template_file.stack_name.rendered}.tagging_control_lambda_invoke" + path = "/" + + policy = < 0 { + if err := json.Unmarshal(req.ClientContext, &lc.ClientContext); err != nil { + response.Error = lambdaErrorResponse(err) + return nil + } + } + invokeContext = lambdacontext.NewContext(invokeContext, lc) + + invokeContext = context.WithValue(invokeContext, "x-amzn-trace-id", req.XAmznTraceId) + + payload, err := fn.handler.Invoke(invokeContext, req.Payload) + if err != nil { + response.Error = lambdaErrorResponse(err) + return nil + } + response.Payload = payload + return nil +} + +func getErrorType(err interface{}) string { + errorType := reflect.TypeOf(err) + if errorType.Kind() == reflect.Ptr { + return errorType.Elem().Name() + } + return errorType.Name() +} + +func lambdaErrorResponse(invokeError error) *messages.InvokeResponse_Error { + var errorName string + if errorType := reflect.TypeOf(invokeError); errorType.Kind() == reflect.Ptr { + errorName = errorType.Elem().Name() + } else { + errorName = errorType.Name() + } + return &messages.InvokeResponse_Error{ + Message: invokeError.Error(), + Type: errorName, + } +} diff --git a/vendor/github.com/aws/aws-lambda-go/lambda/handler.go b/vendor/github.com/aws/aws-lambda-go/lambda/handler.go new file mode 100644 index 0000000000..0923a6e14a --- /dev/null +++ b/vendor/github.com/aws/aws-lambda-go/lambda/handler.go @@ -0,0 +1,130 @@ +// Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +package lambda + +import ( + "context" + "encoding/json" + "fmt" + "reflect" +) + +type Handler interface { + Invoke(ctx context.Context, payload []byte) ([]byte, error) +} + +// lambdaHandler is the generic function type +type lambdaHandler func(context.Context, []byte) (interface{}, error) + +// Invoke calls the handler, and serializes the response. +// If the underlying handler returned an error, or an error occurs during serialization, error is returned. +func (handler lambdaHandler) Invoke(ctx context.Context, payload []byte) ([]byte, error) { + response, err := handler(ctx, payload) + if err != nil { + return nil, err + } + + responseBytes, err := json.Marshal(response) + if err != nil { + return nil, err + } + + return responseBytes, nil +} + +func errorHandler(e error) lambdaHandler { + return func(ctx context.Context, event []byte) (interface{}, error) { + return nil, e + } +} + +func validateArguments(handler reflect.Type) (bool, error) { + handlerTakesContext := false + if handler.NumIn() > 2 { + return false, fmt.Errorf("handlers may not take more than two arguments, but handler takes %d", handler.NumIn()) + } else if handler.NumIn() > 0 { + contextType := reflect.TypeOf((*context.Context)(nil)).Elem() + argumentType := handler.In(0) + handlerTakesContext = argumentType.Implements(contextType) + if handler.NumIn() > 1 && !handlerTakesContext { + return false, fmt.Errorf("handler takes two arguments, but the first is not Context. got %s", argumentType.Kind()) + } + } + + return handlerTakesContext, nil +} + +func validateReturns(handler reflect.Type) error { + errorType := reflect.TypeOf((*error)(nil)).Elem() + if handler.NumOut() > 2 { + return fmt.Errorf("handler may not return more than two values") + } else if handler.NumOut() > 1 { + if !handler.Out(1).Implements(errorType) { + return fmt.Errorf("handler returns two values, but the second does not implement error") + } + } else if handler.NumOut() == 1 { + if !handler.Out(0).Implements(errorType) { + return fmt.Errorf("handler returns a single value, but it does not implement error") + } + } + return nil +} + +// NewHandler creates a base lambda handler from the given handler function. The +// returned Handler performs JSON deserialization and deserialization, and +// delegates to the input handler function. The handler function parameter must +// satisfy the rules documented by Start. If handlerFunc is not a valid +// handler, the returned Handler simply reports the validation error. +func NewHandler(handlerFunc interface{}) Handler { + if handlerFunc == nil { + return errorHandler(fmt.Errorf("handler is nil")) + } + handler := reflect.ValueOf(handlerFunc) + handlerType := reflect.TypeOf(handlerFunc) + if handlerType.Kind() != reflect.Func { + return errorHandler(fmt.Errorf("handler kind %s is not %s", handlerType.Kind(), reflect.Func)) + } + + takesContext, err := validateArguments(handlerType) + if err != nil { + return errorHandler(err) + } + + if err := validateReturns(handlerType); err != nil { + return errorHandler(err) + } + + return lambdaHandler(func(ctx context.Context, payload []byte) (interface{}, error) { + // construct arguments + var args []reflect.Value + if takesContext { + args = append(args, reflect.ValueOf(ctx)) + } + if (handlerType.NumIn() == 1 && !takesContext) || handlerType.NumIn() == 2 { + eventType := handlerType.In(handlerType.NumIn() - 1) + event := reflect.New(eventType) + + if err := json.Unmarshal(payload, event.Interface()); err != nil { + return nil, err + } + + args = append(args, event.Elem()) + } + + response := handler.Call(args) + + // convert return values into (interface{}, error) + var err error + if len(response) > 0 { + if errVal, ok := response[len(response)-1].Interface().(error); ok { + err = errVal + } + } + var val interface{} + if len(response) > 1 { + val = response[0].Interface() + } + + return val, err + }) +} diff --git a/vendor/github.com/aws/aws-lambda-go/lambda/messages/messages.go b/vendor/github.com/aws/aws-lambda-go/lambda/messages/messages.go new file mode 100644 index 0000000000..d2ac65b76a --- /dev/null +++ b/vendor/github.com/aws/aws-lambda-go/lambda/messages/messages.go @@ -0,0 +1,43 @@ +// Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +package messages + +type PingRequest struct { +} + +type PingResponse struct { +} + +type InvokeRequest_Timestamp struct { + Seconds int64 + Nanos int64 +} + +type InvokeRequest struct { + Payload []byte + RequestId string + XAmznTraceId string + Deadline InvokeRequest_Timestamp + InvokedFunctionArn string + CognitoIdentityId string + CognitoIdentityPoolId string + ClientContext []byte +} + +type InvokeResponse struct { + Payload []byte + Error *InvokeResponse_Error +} + +type InvokeResponse_Error struct { + Message string + Type string + StackTrace []*InvokeResponse_Error_StackFrame + ShouldExit bool +} + +type InvokeResponse_Error_StackFrame struct { + Path string `json:"path"` + Line int32 `json:"line"` + Label string `json:"label"` +} diff --git a/vendor/github.com/aws/aws-lambda-go/lambda/panic.go b/vendor/github.com/aws/aws-lambda-go/lambda/panic.go new file mode 100644 index 0000000000..013d3abde5 --- /dev/null +++ b/vendor/github.com/aws/aws-lambda-go/lambda/panic.go @@ -0,0 +1,99 @@ +// Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +package lambda + +import ( + "fmt" + "runtime" + "strings" + + "github.com/aws/aws-lambda-go/lambda/messages" +) + +type panicInfo struct { + Message string // Value passed to panic call, converted to string + StackTrace []*messages.InvokeResponse_Error_StackFrame // Stack trace of the panic +} + +func getPanicInfo(value interface{}) panicInfo { + message := getPanicMessage(value) + stack := getPanicStack() + + return panicInfo{Message: message, StackTrace: stack} +} + +func getPanicMessage(value interface{}) string { + return fmt.Sprintf("%v", value) +} + +var defaultErrorFrameCount = 32 + +func getPanicStack() []*messages.InvokeResponse_Error_StackFrame { + s := make([]uintptr, defaultErrorFrameCount) + const framesToHide = 3 // this (getPanicStack) -> getPanicInfo -> handler defer func + n := runtime.Callers(framesToHide, s) + if n == 0 { + return make([]*messages.InvokeResponse_Error_StackFrame, 0) + } + + s = s[:n] + + return convertStack(s) +} + +func convertStack(s []uintptr) []*messages.InvokeResponse_Error_StackFrame { + var converted []*messages.InvokeResponse_Error_StackFrame + frames := runtime.CallersFrames(s) + + for { + frame, more := frames.Next() + + formattedFrame := formatFrame(frame) + converted = append(converted, formattedFrame) + + if !more { + break + } + } + return converted +} + +func formatFrame(inputFrame runtime.Frame) *messages.InvokeResponse_Error_StackFrame { + path := inputFrame.File + line := int32(inputFrame.Line) + label := inputFrame.Function + + // Strip GOPATH from path by counting the number of seperators in label & path + // + // For example given this: + // GOPATH = /home/user + // path = /home/user/src/pkg/sub/file.go + // label = pkg/sub.Type.Method + // + // We want to set: + // path = pkg/sub/file.go + // label = Type.Method + + i := len(path) + for n, g := 0, strings.Count(label, "/")+2; n < g; n++ { + i = strings.LastIndex(path[:i], "/") + if i == -1 { + // Something went wrong and path has less seperators than we expected + // Abort and leave i as -1 to counteract the +1 below + break + } + } + + path = path[i+1:] // Trim the initial / + + // Strip the path from the function name as it's already in the path + label = label[strings.LastIndex(label, "/")+1:] + // Likewise strip the package name + label = label[strings.Index(label, ".")+1:] + + return &messages.InvokeResponse_Error_StackFrame{ + Path: path, + Line: line, + Label: label, + } +} diff --git a/vendor/github.com/aws/aws-lambda-go/lambdacontext/context.go b/vendor/github.com/aws/aws-lambda-go/lambdacontext/context.go new file mode 100644 index 0000000000..3593c4409b --- /dev/null +++ b/vendor/github.com/aws/aws-lambda-go/lambdacontext/context.go @@ -0,0 +1,89 @@ +// Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// +// Helpers for accessing context information from an Invoke request. Context information +// is stored in a https://golang.org/pkg/context/#Context. The functions FromContext and NewContext +// are used to retrieving and inserting an isntance of LambdaContext. + +package lambdacontext + +import ( + "context" + "os" + "strconv" +) + +// LogGroupName is the name of the log group that contains the log streams of the current Lambda Function +var LogGroupName string + +// LogStreamName name of the log stream that the current Lambda Function's logs will be sent to +var LogStreamName string + +// FunctionName the name of the current Lambda Function +var FunctionName string + +// MemoryLimitInMB is the configured memory limit for the current instance of the Lambda Function +var MemoryLimitInMB int + +// FunctionVersion is the published version of the current instance of the Lambda Function +var FunctionVersion string + +func init() { + LogGroupName = os.Getenv("AWS_LAMBDA_LOG_GROUP_NAME") + LogStreamName = os.Getenv("AWS_LAMBDA_LOG_STREAM_NAME") + FunctionName = os.Getenv("AWS_LAMBDA_FUNCTION_NAME") + if limit, err := strconv.Atoi(os.Getenv("AWS_LAMBDA_FUNCTION_MEMORY_SIZE")); err != nil { + MemoryLimitInMB = 0 + } else { + MemoryLimitInMB = limit + } + FunctionVersion = os.Getenv("AWS_LAMBDA_FUNCTION_VERSION") +} + +// ClientApplication is metadata about the calling application. +type ClientApplication struct { + InstallationID string `json:"installation_id"` + AppTitle string `json:"app_title"` + AppVersionCode string `json:"app_version_code"` + AppPackageName string `json:"app_package_name"` +} + +// ClientContext is information about the client application passed by the calling application. +type ClientContext struct { + Client ClientApplication + Env map[string]string `json:"env"` + Custom map[string]string `json:"custom"` +} + +// CognitoIdentity is the cognito identity used by the calling application. +type CognitoIdentity struct { + CognitoIdentityID string + CognitoIdentityPoolID string +} + +// LambdaContext is the set of metadata that is passed for every Invoke. +type LambdaContext struct { + AwsRequestID string + InvokedFunctionArn string + Identity CognitoIdentity + ClientContext ClientContext +} + +// An unexported type to be used as the key for types in this package. +// This prevents collisions with keys defined in other packages. +type key struct{} + +// The key for a LambdaContext in Contexts. +// Users of this package must use lambdacontext.NewContext and lambdacontext.FromContext +// instead of using this key directly. +var contextKey = &key{} + +// NewContext returns a new Context that carries value lc. +func NewContext(parent context.Context, lc *LambdaContext) context.Context { + return context.WithValue(parent, contextKey, lc) +} + +// FromContext returns the LambdaContext value stored in ctx, if any. +func FromContext(ctx context.Context) (*LambdaContext, bool) { + lc, ok := ctx.Value(contextKey).(*LambdaContext) + return lc, ok +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/string_value.go b/vendor/github.com/aws/aws-sdk-go/aws/awsutil/string_value.go index b6432f1a11..645df2450f 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/string_value.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/awsutil/string_value.go @@ -23,28 +23,27 @@ func stringValue(v reflect.Value, indent int, buf *bytes.Buffer) { case reflect.Struct: buf.WriteString("{\n") - names := []string{} for i := 0; i < v.Type().NumField(); i++ { - name := v.Type().Field(i).Name - f := v.Field(i) - if name[0:1] == strings.ToLower(name[0:1]) { + ft := v.Type().Field(i) + fv := v.Field(i) + + if ft.Name[0:1] == strings.ToLower(ft.Name[0:1]) { continue // ignore unexported fields } - if (f.Kind() == reflect.Ptr || f.Kind() == reflect.Slice) && f.IsNil() { + if (fv.Kind() == reflect.Ptr || fv.Kind() == reflect.Slice) && fv.IsNil() { continue // ignore unset fields } - names = append(names, name) - } - for i, n := range names { - val := v.FieldByName(n) buf.WriteString(strings.Repeat(" ", indent+2)) - buf.WriteString(n + ": ") - stringValue(val, indent+2, buf) + buf.WriteString(ft.Name + ": ") - if i < len(names)-1 { - buf.WriteString(",\n") + if tag := ft.Tag.Get("sensitive"); tag == "true" { + buf.WriteString("") + } else { + stringValue(fv, indent+2, buf) } + + buf.WriteString(",\n") } buf.WriteString("\n" + strings.Repeat(" ", indent) + "}") 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 212fe25e71..7096053840 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 @@ -18,7 +18,7 @@ type Config struct { // States that the signing name did not come from a modeled source but // was derived based on other data. Used by service client constructors - // to determine if the signin name can be overriden based on metadata the + // to determine if the signin name can be overridden based on metadata the // service has. SigningNameDerived bool } 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 5421b5d4e9..10634d173d 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/config.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/config.go @@ -18,7 +18,7 @@ const UseServiceDefaultRetries = -1 type RequestRetryer interface{} // A Config provides service configuration for service clients. By default, -// all clients will use the defaults.DefaultConfig tructure. +// all clients will use the defaults.DefaultConfig structure. // // // Create Session with MaxRetry configuration to be shared by multiple // // service clients. @@ -45,8 +45,8 @@ type Config struct { // that overrides the default generated endpoint for a client. Set this // to `""` to use the default generated endpoint. // - // @note You must still provide a `Region` value when specifying an - // endpoint for a client. + // Note: You must still provide a `Region` value when specifying an + // endpoint for a client. Endpoint *string // The resolver to use for looking up endpoints for AWS service clients @@ -65,8 +65,8 @@ type Config struct { // noted. A full list of regions is found in the "Regions and Endpoints" // document. // - // @see http://docs.aws.amazon.com/general/latest/gr/rande.html - // AWS Regions and Endpoints + // See http://docs.aws.amazon.com/general/latest/gr/rande.html for AWS + // Regions and Endpoints. Region *string // Set this to `true` to disable SSL when sending requests. Defaults @@ -120,9 +120,10 @@ type Config struct { // will use virtual hosted bucket addressing when possible // (`http://BUCKET.s3.amazonaws.com/KEY`). // - // @note This configuration option is specific to the Amazon S3 service. - // @see http://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html - // Amazon S3: Virtual Hosting of Buckets + // Note: This configuration option is specific to the Amazon S3 service. + // + // See http://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html + // for Amazon S3: Virtual Hosting of Buckets S3ForcePathStyle *bool // Set this to `true` to disable the SDK adding the `Expect: 100-Continue` @@ -223,6 +224,28 @@ type Config struct { // Key: aws.String("//foo//bar//moo"), // }) DisableRestProtocolURICleaning *bool + + // EnableEndpointDiscovery will allow for endpoint discovery on operations that + // have the definition in its model. By default, endpoint discovery is off. + // + // Example: + // sess := session.Must(session.NewSession(&aws.Config{ + // EnableEndpointDiscovery: aws.Bool(true), + // })) + // + // svc := s3.New(sess) + // out, err := svc.GetObject(&s3.GetObjectInput { + // Bucket: aws.String("bucketname"), + // Key: aws.String("/foo/bar/moo"), + // }) + EnableEndpointDiscovery *bool + + // DisableEndpointHostPrefix will disable the SDK's behavior of prefixing + // request endpoint hosts with modeled information. + // + // Disabling this feature is useful when you want to use local endpoints + // for testing that do not support the modeled host prefix pattern. + DisableEndpointHostPrefix *bool } // NewConfig returns a new Config pointer that can be chained with builder @@ -377,6 +400,19 @@ func (c *Config) WithSleepDelay(fn func(time.Duration)) *Config { return c } +// WithEndpointDiscovery will set whether or not to use endpoint discovery. +func (c *Config) WithEndpointDiscovery(t bool) *Config { + c.EnableEndpointDiscovery = &t + return c +} + +// WithDisableEndpointHostPrefix will set whether or not to use modeled host prefix +// when making requests. +func (c *Config) WithDisableEndpointHostPrefix(t bool) *Config { + c.DisableEndpointHostPrefix = &t + return c +} + // MergeIn merges the passed in configs into the existing config object. func (c *Config) MergeIn(cfgs ...*Config) { for _, other := range cfgs { @@ -476,6 +512,14 @@ func mergeInConfig(dst *Config, other *Config) { if other.EnforceShouldRetryCheck != nil { dst.EnforceShouldRetryCheck = other.EnforceShouldRetryCheck } + + if other.EnableEndpointDiscovery != nil { + dst.EnableEndpointDiscovery = other.EnableEndpointDiscovery + } + + if other.DisableEndpointHostPrefix != nil { + dst.DisableEndpointHostPrefix = other.DisableEndpointHostPrefix + } } // 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 cfcddf3dc5..f8853d78af 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 @@ -72,9 +72,9 @@ var ValidateReqSigHandler = request.NamedHandler{ signedTime = r.LastSignedAt } - // 10 minutes to allow for some clock skew/delays in transmission. + // 5 minutes to allow for some clock skew/delays in transmission. // Would be improved with aws/aws-sdk-go#423 - if signedTime.Add(10 * time.Minute).After(time.Now()) { + if signedTime.Add(5 * time.Minute).After(time.Now()) { return } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent.go index a15f496bc0..ab69c7a6f3 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent.go @@ -17,7 +17,7 @@ var SDKVersionUserAgentHandler = request.NamedHandler{ } const execEnvVar = `AWS_EXECUTION_ENV` -const execEnvUAKey = `exec_env` +const execEnvUAKey = `exec-env` // AddHostExecEnvUserAgentHander is a request handler appending the SDK's // execution environment to the user agent. diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go index f298d65962..3ad1e798df 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go @@ -9,9 +9,7 @@ var ( // providers in the ChainProvider. // // This has been deprecated. For verbose error messaging set - // aws.Config.CredentialsChainVerboseErrors to true - // - // @readonly + // aws.Config.CredentialsChainVerboseErrors to true. ErrNoValidProvidersFoundInChain = awserr.New("NoCredentialProviders", `no valid providers in chain. Deprecated. For verbose messaging see aws.Config.CredentialsChainVerboseErrors`, diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go index a270844dfb..894bbc7f82 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go @@ -49,6 +49,8 @@ package credentials import ( + "fmt" + "github.com/aws/aws-sdk-go/aws/awserr" "sync" "time" ) @@ -64,8 +66,6 @@ import ( // Credentials: credentials.AnonymousCredentials, // }))) // // Access public S3 buckets. -// -// @readonly var AnonymousCredentials = NewStaticCredentials("", "", "") // A Value is the AWS credentials value for individual credential fields. @@ -99,6 +99,14 @@ type Provider interface { IsExpired() bool } +// An Expirer is an interface that Providers can implement to expose the expiration +// time, if known. If the Provider cannot accurately provide this info, +// it should not implement this interface. +type Expirer interface { + // The time at which the credentials are no longer valid + ExpiresAt() time.Time +} + // An ErrorProvider is a stub credentials provider that always returns an error // this is used by the SDK when construction a known provider is not possible // due to an error. @@ -165,6 +173,11 @@ func (e *Expiry) IsExpired() bool { return e.expiration.Before(curTime()) } +// ExpiresAt returns the expiration time of the credential +func (e *Expiry) ExpiresAt() time.Time { + return e.expiration +} + // A Credentials provides concurrency safe retrieval of AWS credentials Value. // Credentials will cache the credentials value until they expire. Once the value // expires the next Get will attempt to retrieve valid credentials. @@ -257,3 +270,23 @@ func (c *Credentials) IsExpired() bool { func (c *Credentials) isExpired() bool { return c.forceRefresh || c.provider.IsExpired() } + +// ExpiresAt provides access to the functionality of the Expirer interface of +// the underlying Provider, if it supports that interface. Otherwise, it returns +// an error. +func (c *Credentials) ExpiresAt() (time.Time, error) { + c.m.RLock() + defer c.m.RUnlock() + + expirer, ok := c.provider.(Expirer) + if !ok { + return time.Time{}, awserr.New("ProviderNotExpirer", + fmt.Sprintf("provider %s does not support ExpiresAt()", c.creds.ProviderName), + nil) + } + if c.forceRefresh { + // set expiration time to the distant past + return time.Time{}, nil + } + return expirer.ExpiresAt(), nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds/provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds/provider.go index a4cec5c553..ace5131382 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds/provider.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds/provider.go @@ -65,6 +65,10 @@ type Provider struct { // // If ExpiryWindow is 0 or less it will be ignored. ExpiryWindow time.Duration + + // Optional authorization token value if set will be used as the value of + // the Authorization header of the endpoint credential request. + AuthorizationToken string } // NewProviderClient returns a credentials Provider for retrieving AWS credentials @@ -152,6 +156,9 @@ func (p *Provider) getCredentials() (*getCredentialsOutput, error) { out := &getCredentialsOutput{} req := p.Client.NewRequest(op, nil, out) req.HTTPRequest.Header.Set("Accept", "application/json") + if authToken := p.AuthorizationToken; len(authToken) != 0 { + req.HTTPRequest.Header.Set("Authorization", authToken) + } return out, req.Send() } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go index c14231a16f..54c5cf7333 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go @@ -12,14 +12,10 @@ const EnvProviderName = "EnvProvider" var ( // ErrAccessKeyIDNotFound is returned when the AWS Access Key ID can't be // found in the process's environment. - // - // @readonly ErrAccessKeyIDNotFound = awserr.New("EnvAccessKeyNotFound", "AWS_ACCESS_KEY_ID or AWS_ACCESS_KEY not found in environment", nil) // ErrSecretAccessKeyNotFound is returned when the AWS Secret Access Key // can't be found in the process's environment. - // - // @readonly ErrSecretAccessKeyNotFound = awserr.New("EnvSecretNotFound", "AWS_SECRET_ACCESS_KEY or AWS_SECRET_KEY not found in environment", nil) ) diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/processcreds/provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/processcreds/provider.go new file mode 100644 index 0000000000..1980c8c140 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/processcreds/provider.go @@ -0,0 +1,425 @@ +/* +Package processcreds is a credential Provider to retrieve `credential_process` +credentials. + +WARNING: The following describes a method of sourcing credentials from an external +process. This can potentially be dangerous, so proceed with caution. Other +credential providers should be preferred if at all possible. If using this +option, you should make sure that the config file is as locked down as possible +using security best practices for your operating system. + +You can use credentials from a `credential_process` in a variety of ways. + +One way is to setup your shared config file, located in the default +location, with the `credential_process` key and the command you want to be +called. You also need to set the AWS_SDK_LOAD_CONFIG environment variable +(e.g., `export AWS_SDK_LOAD_CONFIG=1`) to use the shared config file. + + [default] + credential_process = /command/to/call + +Creating a new session will use the credential process to retrieve credentials. +NOTE: If there are credentials in the profile you are using, the credential +process will not be used. + + // Initialize a session to load credentials. + sess, _ := session.NewSession(&aws.Config{ + Region: aws.String("us-east-1")}, + ) + + // Create S3 service client to use the credentials. + svc := s3.New(sess) + +Another way to use the `credential_process` method is by using +`credentials.NewCredentials()` and providing a command to be executed to +retrieve credentials: + + // Create credentials using the ProcessProvider. + creds := processcreds.NewCredentials("/path/to/command") + + // Create service client value configured for credentials. + svc := s3.New(sess, &aws.Config{Credentials: creds}) + +You can set a non-default timeout for the `credential_process` with another +constructor, `credentials.NewCredentialsTimeout()`, providing the timeout. To +set a one minute timeout: + + // Create credentials using the ProcessProvider. + creds := processcreds.NewCredentialsTimeout( + "/path/to/command", + time.Duration(500) * time.Millisecond) + +If you need more control, you can set any configurable options in the +credentials using one or more option functions. For example, you can set a two +minute timeout, a credential duration of 60 minutes, and a maximum stdout +buffer size of 2k. + + creds := processcreds.NewCredentials( + "/path/to/command", + func(opt *ProcessProvider) { + opt.Timeout = time.Duration(2) * time.Minute + opt.Duration = time.Duration(60) * time.Minute + opt.MaxBufSize = 2048 + }) + +You can also use your own `exec.Cmd`: + + // Create an exec.Cmd + myCommand := exec.Command("/path/to/command") + + // Create credentials using your exec.Cmd and custom timeout + creds := processcreds.NewCredentialsCommand( + myCommand, + func(opt *processcreds.ProcessProvider) { + opt.Timeout = time.Duration(1) * time.Second + }) +*/ +package processcreds + +import ( + "bytes" + "encoding/json" + "fmt" + "io" + "io/ioutil" + "os" + "os/exec" + "runtime" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/credentials" +) + +const ( + // ProviderName is the name this credentials provider will label any + // returned credentials Value with. + ProviderName = `ProcessProvider` + + // ErrCodeProcessProviderParse error parsing process output + ErrCodeProcessProviderParse = "ProcessProviderParseError" + + // ErrCodeProcessProviderVersion version error in output + ErrCodeProcessProviderVersion = "ProcessProviderVersionError" + + // ErrCodeProcessProviderRequired required attribute missing in output + ErrCodeProcessProviderRequired = "ProcessProviderRequiredError" + + // ErrCodeProcessProviderExecution execution of command failed + ErrCodeProcessProviderExecution = "ProcessProviderExecutionError" + + // errMsgProcessProviderTimeout process took longer than allowed + errMsgProcessProviderTimeout = "credential process timed out" + + // errMsgProcessProviderProcess process error + errMsgProcessProviderProcess = "error in credential_process" + + // errMsgProcessProviderParse problem parsing output + errMsgProcessProviderParse = "parse failed of credential_process output" + + // errMsgProcessProviderVersion version error in output + errMsgProcessProviderVersion = "wrong version in process output (not 1)" + + // errMsgProcessProviderMissKey missing access key id in output + errMsgProcessProviderMissKey = "missing AccessKeyId in process output" + + // errMsgProcessProviderMissSecret missing secret acess key in output + errMsgProcessProviderMissSecret = "missing SecretAccessKey in process output" + + // errMsgProcessProviderPrepareCmd prepare of command failed + errMsgProcessProviderPrepareCmd = "failed to prepare command" + + // errMsgProcessProviderEmptyCmd command must not be empty + errMsgProcessProviderEmptyCmd = "command must not be empty" + + // errMsgProcessProviderPipe failed to initialize pipe + errMsgProcessProviderPipe = "failed to initialize pipe" + + // DefaultDuration is the default amount of time in minutes that the + // credentials will be valid for. + DefaultDuration = time.Duration(15) * time.Minute + + // DefaultBufSize limits buffer size from growing to an enormous + // amount due to a faulty process. + DefaultBufSize = 1024 + + // DefaultTimeout default limit on time a process can run. + DefaultTimeout = time.Duration(1) * time.Minute +) + +// ProcessProvider satisfies the credentials.Provider interface, and is a +// client to retrieve credentials from a process. +type ProcessProvider struct { + staticCreds bool + credentials.Expiry + originalCommand []string + + // Expiry duration of the credentials. Defaults to 15 minutes if not set. + Duration time.Duration + + // ExpiryWindow will allow the credentials to trigger refreshing prior to + // the credentials actually expiring. This is beneficial so race conditions + // with expiring credentials do not cause request to fail unexpectedly + // due to ExpiredTokenException exceptions. + // + // So a ExpiryWindow of 10s would cause calls to IsExpired() to return true + // 10 seconds before the credentials are actually expired. + // + // If ExpiryWindow is 0 or less it will be ignored. + ExpiryWindow time.Duration + + // A string representing an os command that should return a JSON with + // credential information. + command *exec.Cmd + + // MaxBufSize limits memory usage from growing to an enormous + // amount due to a faulty process. + MaxBufSize int + + // Timeout limits the time a process can run. + Timeout time.Duration +} + +// NewCredentials returns a pointer to a new Credentials object wrapping the +// ProcessProvider. The credentials will expire every 15 minutes by default. +func NewCredentials(command string, options ...func(*ProcessProvider)) *credentials.Credentials { + p := &ProcessProvider{ + command: exec.Command(command), + Duration: DefaultDuration, + Timeout: DefaultTimeout, + MaxBufSize: DefaultBufSize, + } + + for _, option := range options { + option(p) + } + + return credentials.NewCredentials(p) +} + +// NewCredentialsTimeout returns a pointer to a new Credentials object with +// the specified command and timeout, and default duration and max buffer size. +func NewCredentialsTimeout(command string, timeout time.Duration) *credentials.Credentials { + p := NewCredentials(command, func(opt *ProcessProvider) { + opt.Timeout = timeout + }) + + return p +} + +// NewCredentialsCommand returns a pointer to a new Credentials object with +// the specified command, and default timeout, duration and max buffer size. +func NewCredentialsCommand(command *exec.Cmd, options ...func(*ProcessProvider)) *credentials.Credentials { + p := &ProcessProvider{ + command: command, + Duration: DefaultDuration, + Timeout: DefaultTimeout, + MaxBufSize: DefaultBufSize, + } + + for _, option := range options { + option(p) + } + + return credentials.NewCredentials(p) +} + +type credentialProcessResponse struct { + Version int + AccessKeyID string `json:"AccessKeyId"` + SecretAccessKey string + SessionToken string + Expiration *time.Time +} + +// Retrieve executes the 'credential_process' and returns the credentials. +func (p *ProcessProvider) Retrieve() (credentials.Value, error) { + out, err := p.executeCredentialProcess() + if err != nil { + return credentials.Value{ProviderName: ProviderName}, err + } + + // Serialize and validate response + resp := &credentialProcessResponse{} + if err = json.Unmarshal(out, resp); err != nil { + return credentials.Value{ProviderName: ProviderName}, awserr.New( + ErrCodeProcessProviderParse, + fmt.Sprintf("%s: %s", errMsgProcessProviderParse, string(out)), + err) + } + + if resp.Version != 1 { + return credentials.Value{ProviderName: ProviderName}, awserr.New( + ErrCodeProcessProviderVersion, + errMsgProcessProviderVersion, + nil) + } + + if len(resp.AccessKeyID) == 0 { + return credentials.Value{ProviderName: ProviderName}, awserr.New( + ErrCodeProcessProviderRequired, + errMsgProcessProviderMissKey, + nil) + } + + if len(resp.SecretAccessKey) == 0 { + return credentials.Value{ProviderName: ProviderName}, awserr.New( + ErrCodeProcessProviderRequired, + errMsgProcessProviderMissSecret, + nil) + } + + // Handle expiration + p.staticCreds = resp.Expiration == nil + if resp.Expiration != nil { + p.SetExpiration(*resp.Expiration, p.ExpiryWindow) + } + + return credentials.Value{ + ProviderName: ProviderName, + AccessKeyID: resp.AccessKeyID, + SecretAccessKey: resp.SecretAccessKey, + SessionToken: resp.SessionToken, + }, nil +} + +// IsExpired returns true if the credentials retrieved are expired, or not yet +// retrieved. +func (p *ProcessProvider) IsExpired() bool { + if p.staticCreds { + return false + } + return p.Expiry.IsExpired() +} + +// prepareCommand prepares the command to be executed. +func (p *ProcessProvider) prepareCommand() error { + + var cmdArgs []string + if runtime.GOOS == "windows" { + cmdArgs = []string{"cmd.exe", "/C"} + } else { + cmdArgs = []string{"sh", "-c"} + } + + if len(p.originalCommand) == 0 { + p.originalCommand = make([]string, len(p.command.Args)) + copy(p.originalCommand, p.command.Args) + + // check for empty command because it succeeds + if len(strings.TrimSpace(p.originalCommand[0])) < 1 { + return awserr.New( + ErrCodeProcessProviderExecution, + fmt.Sprintf( + "%s: %s", + errMsgProcessProviderPrepareCmd, + errMsgProcessProviderEmptyCmd), + nil) + } + } + + cmdArgs = append(cmdArgs, p.originalCommand...) + p.command = exec.Command(cmdArgs[0], cmdArgs[1:]...) + p.command.Env = os.Environ() + + return nil +} + +// executeCredentialProcess starts the credential process on the OS and +// returns the results or an error. +func (p *ProcessProvider) executeCredentialProcess() ([]byte, error) { + + if err := p.prepareCommand(); err != nil { + return nil, err + } + + // Setup the pipes + outReadPipe, outWritePipe, err := os.Pipe() + if err != nil { + return nil, awserr.New( + ErrCodeProcessProviderExecution, + errMsgProcessProviderPipe, + err) + } + + p.command.Stderr = os.Stderr // display stderr on console for MFA + p.command.Stdout = outWritePipe // get creds json on process's stdout + p.command.Stdin = os.Stdin // enable stdin for MFA + + output := bytes.NewBuffer(make([]byte, 0, p.MaxBufSize)) + + stdoutCh := make(chan error, 1) + go readInput( + io.LimitReader(outReadPipe, int64(p.MaxBufSize)), + output, + stdoutCh) + + execCh := make(chan error, 1) + go executeCommand(*p.command, execCh) + + finished := false + var errors []error + for !finished { + select { + case readError := <-stdoutCh: + errors = appendError(errors, readError) + finished = true + case execError := <-execCh: + err := outWritePipe.Close() + errors = appendError(errors, err) + errors = appendError(errors, execError) + if errors != nil { + return output.Bytes(), awserr.NewBatchError( + ErrCodeProcessProviderExecution, + errMsgProcessProviderProcess, + errors) + } + case <-time.After(p.Timeout): + finished = true + return output.Bytes(), awserr.NewBatchError( + ErrCodeProcessProviderExecution, + errMsgProcessProviderTimeout, + errors) // errors can be nil + } + } + + out := output.Bytes() + + if runtime.GOOS == "windows" { + // windows adds slashes to quotes + out = []byte(strings.Replace(string(out), `\"`, `"`, -1)) + } + + return out, nil +} + +// appendError conveniently checks for nil before appending slice +func appendError(errors []error, err error) []error { + if err != nil { + return append(errors, err) + } + return errors +} + +func executeCommand(cmd exec.Cmd, exec chan error) { + // Start the command + err := cmd.Start() + if err == nil { + err = cmd.Wait() + } + + exec <- err +} + +func readInput(r io.Reader, w io.Writer, read chan error) { + tee := io.TeeReader(r, w) + + _, err := ioutil.ReadAll(tee) + + if err == io.EOF { + err = nil + } + + read <- err // will only arrive here when write end of pipe is closed +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go index 51e21e0f38..e155149581 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go @@ -4,9 +4,8 @@ import ( "fmt" "os" - "github.com/go-ini/ini" - "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/internal/ini" "github.com/aws/aws-sdk-go/internal/shareddefaults" ) @@ -77,36 +76,37 @@ func (p *SharedCredentialsProvider) IsExpired() bool { // The credentials retrieved from the profile will be returned or error. Error will be // returned if it fails to read from the file, or the data is invalid. func loadProfile(filename, profile string) (Value, error) { - config, err := ini.Load(filename) + config, err := ini.OpenFile(filename) if err != nil { return Value{ProviderName: SharedCredsProviderName}, awserr.New("SharedCredsLoad", "failed to load shared credentials file", err) } - iniProfile, err := config.GetSection(profile) - if err != nil { - return Value{ProviderName: SharedCredsProviderName}, awserr.New("SharedCredsLoad", "failed to get profile", err) + + iniProfile, ok := config.GetSection(profile) + if !ok { + return Value{ProviderName: SharedCredsProviderName}, awserr.New("SharedCredsLoad", "failed to get profile", nil) } - id, err := iniProfile.GetKey("aws_access_key_id") - if err != nil { + id := iniProfile.String("aws_access_key_id") + if len(id) == 0 { return Value{ProviderName: SharedCredsProviderName}, awserr.New("SharedCredsAccessKey", fmt.Sprintf("shared credentials %s in %s did not contain aws_access_key_id", profile, filename), - err) + nil) } - secret, err := iniProfile.GetKey("aws_secret_access_key") - if err != nil { + secret := iniProfile.String("aws_secret_access_key") + if len(secret) == 0 { return Value{ProviderName: SharedCredsProviderName}, awserr.New("SharedCredsSecret", fmt.Sprintf("shared credentials %s in %s did not contain aws_secret_access_key", profile, filename), nil) } // Default to empty string if not found - token := iniProfile.Key("aws_session_token") + token := iniProfile.String("aws_session_token") return Value{ - AccessKeyID: id.String(), - SecretAccessKey: secret.String(), - SessionToken: token.String(), + AccessKeyID: id, + SecretAccessKey: secret, + SessionToken: token, ProviderName: SharedCredsProviderName, }, nil } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/static_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/static_provider.go index 4f5dab3fcc..531139e397 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/static_provider.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/static_provider.go @@ -9,8 +9,6 @@ const StaticProviderName = "StaticProvider" var ( // ErrStaticCredentialsEmpty is emitted when static credentials are empty. - // - // @readonly ErrStaticCredentialsEmpty = awserr.New("EmptyStaticCreds", "static credentials are empty", nil) ) diff --git a/vendor/github.com/aws/aws-sdk-go/aws/crr/cache.go b/vendor/github.com/aws/aws-sdk-go/aws/crr/cache.go new file mode 100644 index 0000000000..a00ab6c67e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/crr/cache.go @@ -0,0 +1,119 @@ +package crr + +import ( + "sync/atomic" +) + +// EndpointCache is an LRU cache that holds a series of endpoints +// based on some key. The datastructure makes use of a read write +// mutex to enable asynchronous use. +type EndpointCache struct { + endpoints syncMap + endpointLimit int64 + // size is used to count the number elements in the cache. + // The atomic package is used to ensure this size is accurate when + // using multiple goroutines. + size int64 +} + +// NewEndpointCache will return a newly initialized cache with a limit +// of endpointLimit entries. +func NewEndpointCache(endpointLimit int64) *EndpointCache { + return &EndpointCache{ + endpointLimit: endpointLimit, + endpoints: newSyncMap(), + } +} + +// get is a concurrent safe get operation that will retrieve an endpoint +// based on endpointKey. A boolean will also be returned to illustrate whether +// or not the endpoint had been found. +func (c *EndpointCache) get(endpointKey string) (Endpoint, bool) { + endpoint, ok := c.endpoints.Load(endpointKey) + if !ok { + return Endpoint{}, false + } + + c.endpoints.Store(endpointKey, endpoint) + return endpoint.(Endpoint), true +} + +// Has returns if the enpoint cache contains a valid entry for the endpoint key +// provided. +func (c *EndpointCache) Has(endpointKey string) bool { + endpoint, ok := c.get(endpointKey) + _, found := endpoint.GetValidAddress() + + return ok && found +} + +// Get will retrieve a weighted address based off of the endpoint key. If an endpoint +// should be retrieved, due to not existing or the current endpoint has expired +// the Discoverer object that was passed in will attempt to discover a new endpoint +// and add that to the cache. +func (c *EndpointCache) Get(d Discoverer, endpointKey string, required bool) (WeightedAddress, error) { + var err error + endpoint, ok := c.get(endpointKey) + weighted, found := endpoint.GetValidAddress() + shouldGet := !ok || !found + + if required && shouldGet { + if endpoint, err = c.discover(d, endpointKey); err != nil { + return WeightedAddress{}, err + } + + weighted, _ = endpoint.GetValidAddress() + } else if shouldGet { + go c.discover(d, endpointKey) + } + + return weighted, nil +} + +// Add is a concurrent safe operation that will allow new endpoints to be added +// to the cache. If the cache is full, the number of endpoints equal endpointLimit, +// then this will remove the oldest entry before adding the new endpoint. +func (c *EndpointCache) Add(endpoint Endpoint) { + // de-dups multiple adds of an endpoint with a pre-existing key + if iface, ok := c.endpoints.Load(endpoint.Key); ok { + e := iface.(Endpoint) + if e.Len() > 0 { + return + } + } + c.endpoints.Store(endpoint.Key, endpoint) + + size := atomic.AddInt64(&c.size, 1) + if size > 0 && size > c.endpointLimit { + c.deleteRandomKey() + } +} + +// deleteRandomKey will delete a random key from the cache. If +// no key was deleted false will be returned. +func (c *EndpointCache) deleteRandomKey() bool { + atomic.AddInt64(&c.size, -1) + found := false + + c.endpoints.Range(func(key, value interface{}) bool { + found = true + c.endpoints.Delete(key) + + return false + }) + + return found +} + +// discover will get and store and endpoint using the Discoverer. +func (c *EndpointCache) discover(d Discoverer, endpointKey string) (Endpoint, error) { + endpoint, err := d.Discover() + if err != nil { + return Endpoint{}, err + } + + endpoint.Key = endpointKey + c.Add(endpoint) + + return endpoint, nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/crr/endpoint.go b/vendor/github.com/aws/aws-sdk-go/aws/crr/endpoint.go new file mode 100644 index 0000000000..d5599188e0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/crr/endpoint.go @@ -0,0 +1,99 @@ +package crr + +import ( + "net/url" + "sort" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" +) + +// Endpoint represents an endpoint used in endpoint discovery. +type Endpoint struct { + Key string + Addresses WeightedAddresses +} + +// WeightedAddresses represents a list of WeightedAddress. +type WeightedAddresses []WeightedAddress + +// WeightedAddress represents an address with a given weight. +type WeightedAddress struct { + URL *url.URL + Expired time.Time +} + +// HasExpired will return whether or not the endpoint has expired with +// the exception of a zero expiry meaning does not expire. +func (e WeightedAddress) HasExpired() bool { + return e.Expired.Before(time.Now()) +} + +// Add will add a given WeightedAddress to the address list of Endpoint. +func (e *Endpoint) Add(addr WeightedAddress) { + e.Addresses = append(e.Addresses, addr) +} + +// Len returns the number of valid endpoints where valid means the endpoint +// has not expired. +func (e *Endpoint) Len() int { + validEndpoints := 0 + for _, endpoint := range e.Addresses { + if endpoint.HasExpired() { + continue + } + + validEndpoints++ + } + return validEndpoints +} + +// GetValidAddress will return a non-expired weight endpoint +func (e *Endpoint) GetValidAddress() (WeightedAddress, bool) { + for i := 0; i < len(e.Addresses); i++ { + we := e.Addresses[i] + + if we.HasExpired() { + e.Addresses = append(e.Addresses[:i], e.Addresses[i+1:]...) + i-- + continue + } + + return we, true + } + + return WeightedAddress{}, false +} + +// Discoverer is an interface used to discovery which endpoint hit. This +// allows for specifics about what parameters need to be used to be contained +// in the Discoverer implementor. +type Discoverer interface { + Discover() (Endpoint, error) +} + +// BuildEndpointKey will sort the keys in alphabetical order and then retrieve +// the values in that order. Those values are then concatenated together to form +// the endpoint key. +func BuildEndpointKey(params map[string]*string) string { + keys := make([]string, len(params)) + i := 0 + + for k := range params { + keys[i] = k + i++ + } + sort.Strings(keys) + + values := make([]string, len(params)) + for i, k := range keys { + if params[k] == nil { + continue + } + + values[i] = aws.StringValue(params[k]) + } + + return strings.Join(values, ".") +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/crr/sync_map.go b/vendor/github.com/aws/aws-sdk-go/aws/crr/sync_map.go new file mode 100644 index 0000000000..e414eaace2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/crr/sync_map.go @@ -0,0 +1,29 @@ +// +build go1.9 + +package crr + +import ( + "sync" +) + +type syncMap sync.Map + +func newSyncMap() syncMap { + return syncMap{} +} + +func (m *syncMap) Load(key interface{}) (interface{}, bool) { + return (*sync.Map)(m).Load(key) +} + +func (m *syncMap) Store(key interface{}, value interface{}) { + (*sync.Map)(m).Store(key, value) +} + +func (m *syncMap) Delete(key interface{}) { + (*sync.Map)(m).Delete(key) +} + +func (m *syncMap) Range(f func(interface{}, interface{}) bool) { + (*sync.Map)(m).Range(f) +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/crr/sync_map_1_8.go b/vendor/github.com/aws/aws-sdk-go/aws/crr/sync_map_1_8.go new file mode 100644 index 0000000000..e0b1220085 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/crr/sync_map_1_8.go @@ -0,0 +1,48 @@ +// +build !go1.9 + +package crr + +import ( + "sync" +) + +type syncMap struct { + container map[interface{}]interface{} + lock sync.RWMutex +} + +func newSyncMap() syncMap { + return syncMap{ + container: map[interface{}]interface{}{}, + } +} + +func (m *syncMap) Load(key interface{}) (interface{}, bool) { + m.lock.RLock() + defer m.lock.RUnlock() + + v, ok := m.container[key] + return v, ok +} + +func (m *syncMap) Store(key interface{}, value interface{}) { + m.lock.Lock() + defer m.lock.Unlock() + + m.container[key] = value +} + +func (m *syncMap) Delete(key interface{}) { + m.lock.Lock() + defer m.lock.Unlock() + + delete(m.container, key) +} + +func (m *syncMap) Range(f func(interface{}, interface{}) bool) { + for k, v := range m.container { + if !f(k, v) { + return + } + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/metric.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/metric.go index 4b0d630e4c..5bacc791a1 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/csm/metric.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/metric.go @@ -3,6 +3,8 @@ package csm import ( "strconv" "time" + + "github.com/aws/aws-sdk-go/aws" ) type metricTime time.Time @@ -39,6 +41,12 @@ type metric struct { SDKException *string `json:"SdkException,omitempty"` SDKExceptionMessage *string `json:"SdkExceptionMessage,omitempty"` + FinalHTTPStatusCode *int `json:"FinalHttpStatusCode,omitempty"` + FinalAWSException *string `json:"FinalAwsException,omitempty"` + FinalAWSExceptionMessage *string `json:"FinalAwsExceptionMessage,omitempty"` + FinalSDKException *string `json:"FinalSdkException,omitempty"` + FinalSDKExceptionMessage *string `json:"FinalSdkExceptionMessage,omitempty"` + DestinationIP *string `json:"DestinationIp,omitempty"` ConnectionReused *int `json:"ConnectionReused,omitempty"` @@ -48,4 +56,54 @@ type metric struct { DNSLatency *int `json:"DnsLatency,omitempty"` TCPLatency *int `json:"TcpLatency,omitempty"` SSLLatency *int `json:"SslLatency,omitempty"` + + MaxRetriesExceeded *int `json:"MaxRetriesExceeded,omitempty"` +} + +func (m *metric) TruncateFields() { + m.ClientID = truncateString(m.ClientID, 255) + m.UserAgent = truncateString(m.UserAgent, 256) + + m.AWSException = truncateString(m.AWSException, 128) + m.AWSExceptionMessage = truncateString(m.AWSExceptionMessage, 512) + + m.SDKException = truncateString(m.SDKException, 128) + m.SDKExceptionMessage = truncateString(m.SDKExceptionMessage, 512) + + m.FinalAWSException = truncateString(m.FinalAWSException, 128) + m.FinalAWSExceptionMessage = truncateString(m.FinalAWSExceptionMessage, 512) + + m.FinalSDKException = truncateString(m.FinalSDKException, 128) + m.FinalSDKExceptionMessage = truncateString(m.FinalSDKExceptionMessage, 512) +} + +func truncateString(v *string, l int) *string { + if v != nil && len(*v) > l { + nv := (*v)[:l] + return &nv + } + + return v +} + +func (m *metric) SetException(e metricException) { + switch te := e.(type) { + case awsException: + m.AWSException = aws.String(te.exception) + m.AWSExceptionMessage = aws.String(te.message) + case sdkException: + m.SDKException = aws.String(te.exception) + m.SDKExceptionMessage = aws.String(te.message) + } +} + +func (m *metric) SetFinalException(e metricException) { + switch te := e.(type) { + case awsException: + m.FinalAWSException = aws.String(te.exception) + m.FinalAWSExceptionMessage = aws.String(te.message) + case sdkException: + m.FinalSDKException = aws.String(te.exception) + m.FinalSDKExceptionMessage = aws.String(te.message) + } } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/metric_exception.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/metric_exception.go new file mode 100644 index 0000000000..54a99280ce --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/metric_exception.go @@ -0,0 +1,26 @@ +package csm + +type metricException interface { + Exception() string + Message() string +} + +type requestException struct { + exception string + message string +} + +func (e requestException) Exception() string { + return e.exception +} +func (e requestException) Message() string { + return e.message +} + +type awsException struct { + requestException +} + +type sdkException struct { + requestException +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go index 11082e5ed6..0b5571acfb 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go @@ -82,14 +82,15 @@ func (rep *Reporter) sendAPICallAttemptMetric(r *request.Request) { if r.Error != nil { if awserr, ok := r.Error.(awserr.Error); ok { - setError(&m, awserr) + m.SetException(getMetricException(awserr)) } } + m.TruncateFields() rep.metricsCh.Push(m) } -func setError(m *metric, err awserr.Error) { +func getMetricException(err awserr.Error) metricException { msg := err.Error() code := err.Code() @@ -97,11 +98,13 @@ func setError(m *metric, err awserr.Error) { case "RequestError", "SerializationError", request.CanceledErrorCode: - m.SDKException = &code - m.SDKExceptionMessage = &msg + return sdkException{ + requestException{exception: code, message: msg}, + } default: - m.AWSException = &code - m.AWSExceptionMessage = &msg + return awsException{ + requestException{exception: code, message: msg}, + } } } @@ -112,16 +115,31 @@ func (rep *Reporter) sendAPICallMetric(r *request.Request) { now := time.Now() m := metric{ - ClientID: aws.String(rep.clientID), - API: aws.String(r.Operation.Name), - Service: aws.String(r.ClientInfo.ServiceID), - Timestamp: (*metricTime)(&now), - Type: aws.String("ApiCall"), - AttemptCount: aws.Int(r.RetryCount + 1), - Latency: aws.Int(int(time.Now().Sub(r.Time) / time.Millisecond)), - XAmzRequestID: aws.String(r.RequestID), + ClientID: aws.String(rep.clientID), + API: aws.String(r.Operation.Name), + Service: aws.String(r.ClientInfo.ServiceID), + Timestamp: (*metricTime)(&now), + UserAgent: aws.String(r.HTTPRequest.Header.Get("User-Agent")), + Type: aws.String("ApiCall"), + AttemptCount: aws.Int(r.RetryCount + 1), + Region: r.Config.Region, + Latency: aws.Int(int(time.Now().Sub(r.Time) / time.Millisecond)), + XAmzRequestID: aws.String(r.RequestID), + MaxRetriesExceeded: aws.Int(boolIntValue(r.RetryCount >= r.MaxRetries())), + } + + if r.HTTPResponse != nil { + m.FinalHTTPStatusCode = aws.Int(r.HTTPResponse.StatusCode) } + if r.Error != nil { + if awserr, ok := r.Error.(awserr.Error); ok { + m.SetFinalException(getMetricException(awserr)) + } + } + + m.TruncateFields() + // TODO: Probably want to figure something out for logging dropped // metrics rep.metricsCh.Push(m) @@ -221,11 +239,22 @@ func (rep *Reporter) InjectHandlers(handlers *request.Handlers) { return } - apiCallHandler := request.NamedHandler{Name: APICallMetricHandlerName, Fn: rep.sendAPICallMetric} - apiCallAttemptHandler := request.NamedHandler{Name: APICallAttemptMetricHandlerName, Fn: rep.sendAPICallAttemptMetric} + handlers.Complete.PushFrontNamed(request.NamedHandler{ + Name: APICallMetricHandlerName, + Fn: rep.sendAPICallMetric, + }) - handlers.Complete.PushFrontNamed(apiCallHandler) - handlers.Complete.PushFrontNamed(apiCallAttemptHandler) + handlers.CompleteAttempt.PushFrontNamed(request.NamedHandler{ + Name: APICallAttemptMetricHandlerName, + Fn: rep.sendAPICallAttemptMetric, + }) +} + +// boolIntValue return 1 for true and 0 for false. +func boolIntValue(b bool) int { + if b { + return 1 + } - handlers.AfterRetry.PushFrontNamed(apiCallAttemptHandler) + return 0 } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go index 5040a2f647..23bb639e01 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go @@ -24,6 +24,7 @@ import ( "github.com/aws/aws-sdk-go/aws/ec2metadata" "github.com/aws/aws-sdk-go/aws/endpoints" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/internal/shareddefaults" ) // A Defaults provides a collection of default values for SDK clients. @@ -112,8 +113,8 @@ func CredProviders(cfg *aws.Config, handlers request.Handlers) []credentials.Pro } const ( - httpProviderEnvVar = "AWS_CONTAINER_CREDENTIALS_FULL_URI" - ecsCredsProviderEnvVar = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI" + httpProviderAuthorizationEnvVar = "AWS_CONTAINER_AUTHORIZATION_TOKEN" + httpProviderEnvVar = "AWS_CONTAINER_CREDENTIALS_FULL_URI" ) // RemoteCredProvider returns a credentials provider for the default remote @@ -123,8 +124,8 @@ func RemoteCredProvider(cfg aws.Config, handlers request.Handlers) credentials.P return localHTTPCredProvider(cfg, handlers, u) } - if uri := os.Getenv(ecsCredsProviderEnvVar); len(uri) > 0 { - u := fmt.Sprintf("http://169.254.170.2%s", uri) + if uri := os.Getenv(shareddefaults.ECSCredsProviderEnvVar); len(uri) > 0 { + u := fmt.Sprintf("%s%s", shareddefaults.ECSContainerCredentialsURI, uri) return httpCredProvider(cfg, handlers, u) } @@ -187,6 +188,7 @@ func httpCredProvider(cfg aws.Config, handlers request.Handlers, u string) crede return endpointcreds.NewProviderClient(cfg, handlers, u, func(p *endpointcreds.Provider) { p.ExpiryWindow = 5 * time.Minute + p.AuthorizationToken = os.Getenv(httpProviderAuthorizationEnvVar) }, ) } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go index c215cd3f59..88e2fc7073 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go @@ -118,6 +118,10 @@ func (c *EC2Metadata) Region() (string, error) { return "", err } + if len(resp) == 0 { + return "", awserr.New("EC2MetadataError", "invalid Region response", nil) + } + // returns region without the suffix. Eg: us-west-2a becomes us-west-2 return resp[:len(resp)-1], nil } 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 ef5f73292b..7d1f66e4e8 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 @@ -4,7 +4,7 @@ // This package's client can be disabled completely by setting the environment // variable "AWS_EC2_METADATA_DISABLED=true". This environment variable set to // true instructs the SDK to disable the EC2 Metadata client. The client cannot -// be used while the environemnt variable is set to true, (case insensitive). +// be used while the environment variable is set to true, (case insensitive). package ec2metadata import ( @@ -72,6 +72,7 @@ func NewClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio cfg, metadata.ClientInfo{ ServiceName: ServiceName, + ServiceID: ServiceName, Endpoint: endpoint, APIVersion: "latest", }, 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 c04ba06c5f..87b9ff3ffe 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 @@ -85,6 +85,7 @@ func decodeV3Endpoints(modelDef modelDefinition, opts DecodeModelOptions) (Resol custAddS3DualStack(p) custRmIotDataService(p) custFixAppAutoscalingChina(p) + custFixAppAutoscalingUsGov(p) } return ps, nil @@ -95,7 +96,12 @@ func custAddS3DualStack(p *partition) { return } - s, ok := p.Services["s3"] + custAddDualstack(p, "s3") + custAddDualstack(p, "s3-control") +} + +func custAddDualstack(p *partition, svcName string) { + s, ok := p.Services[svcName] if !ok { return } @@ -103,7 +109,7 @@ func custAddS3DualStack(p *partition) { s.Defaults.HasDualStack = boxedTrue s.Defaults.DualStackHostname = "{service}.dualstack.{region}.{dnsSuffix}" - p.Services["s3"] = s + p.Services[svcName] = s } func custAddEC2Metadata(p *partition) { @@ -144,6 +150,33 @@ func custFixAppAutoscalingChina(p *partition) { p.Services[serviceName] = s } +func custFixAppAutoscalingUsGov(p *partition) { + if p.ID != "aws-us-gov" { + return + } + + const serviceName = "application-autoscaling" + s, ok := p.Services[serviceName] + if !ok { + return + } + + if a := s.Defaults.CredentialScope.Service; a != "" { + fmt.Printf("custFixAppAutoscalingUsGov: ignoring customization, expected empty credential scope service, got %s\n", a) + return + } + + if a := s.Defaults.Hostname; a != "" { + fmt.Printf("custFixAppAutoscalingUsGov: ignoring customization, expected empty hostname, got %s\n", a) + return + } + + s.Defaults.CredentialScope.Service = "application-autoscaling" + s.Defaults.Hostname = "autoscaling.{region}.amazonaws.com" + + p.Services[serviceName] = s +} + type decodeModelError struct { awsError } 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 005bde0daa..636f614f16 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 @@ -22,6 +22,7 @@ const ( ApSoutheast2RegionID = "ap-southeast-2" // Asia Pacific (Sydney). CaCentral1RegionID = "ca-central-1" // Canada (Central). EuCentral1RegionID = "eu-central-1" // EU (Frankfurt). + EuNorth1RegionID = "eu-north-1" // EU (Stockholm). EuWest1RegionID = "eu-west-1" // EU (Ireland). EuWest2RegionID = "eu-west-2" // EU (London). EuWest3RegionID = "eu-west-3" // EU (Paris). @@ -40,141 +41,10 @@ const ( // AWS GovCloud (US) partition's regions. const ( + UsGovEast1RegionID = "us-gov-east-1" // AWS GovCloud (US-East). UsGovWest1RegionID = "us-gov-west-1" // AWS GovCloud (US). ) -// Service identifiers -const ( - A4bServiceID = "a4b" // A4b. - AcmServiceID = "acm" // Acm. - AcmPcaServiceID = "acm-pca" // AcmPca. - ApiMediatailorServiceID = "api.mediatailor" // ApiMediatailor. - ApiPricingServiceID = "api.pricing" // ApiPricing. - ApiSagemakerServiceID = "api.sagemaker" // ApiSagemaker. - ApigatewayServiceID = "apigateway" // Apigateway. - ApplicationAutoscalingServiceID = "application-autoscaling" // ApplicationAutoscaling. - Appstream2ServiceID = "appstream2" // Appstream2. - AthenaServiceID = "athena" // Athena. - AutoscalingServiceID = "autoscaling" // Autoscaling. - AutoscalingPlansServiceID = "autoscaling-plans" // AutoscalingPlans. - BatchServiceID = "batch" // Batch. - BudgetsServiceID = "budgets" // Budgets. - CeServiceID = "ce" // Ce. - Cloud9ServiceID = "cloud9" // Cloud9. - ClouddirectoryServiceID = "clouddirectory" // Clouddirectory. - CloudformationServiceID = "cloudformation" // Cloudformation. - CloudfrontServiceID = "cloudfront" // Cloudfront. - CloudhsmServiceID = "cloudhsm" // Cloudhsm. - Cloudhsmv2ServiceID = "cloudhsmv2" // Cloudhsmv2. - CloudsearchServiceID = "cloudsearch" // Cloudsearch. - CloudtrailServiceID = "cloudtrail" // Cloudtrail. - CodebuildServiceID = "codebuild" // Codebuild. - CodecommitServiceID = "codecommit" // Codecommit. - CodedeployServiceID = "codedeploy" // Codedeploy. - CodepipelineServiceID = "codepipeline" // Codepipeline. - CodestarServiceID = "codestar" // Codestar. - CognitoIdentityServiceID = "cognito-identity" // CognitoIdentity. - CognitoIdpServiceID = "cognito-idp" // CognitoIdp. - CognitoSyncServiceID = "cognito-sync" // CognitoSync. - ComprehendServiceID = "comprehend" // Comprehend. - ConfigServiceID = "config" // Config. - CurServiceID = "cur" // Cur. - DatapipelineServiceID = "datapipeline" // Datapipeline. - DaxServiceID = "dax" // Dax. - DevicefarmServiceID = "devicefarm" // Devicefarm. - DirectconnectServiceID = "directconnect" // Directconnect. - DiscoveryServiceID = "discovery" // Discovery. - DmsServiceID = "dms" // Dms. - DsServiceID = "ds" // Ds. - DynamodbServiceID = "dynamodb" // Dynamodb. - Ec2ServiceID = "ec2" // Ec2. - Ec2metadataServiceID = "ec2metadata" // Ec2metadata. - EcrServiceID = "ecr" // Ecr. - EcsServiceID = "ecs" // Ecs. - ElasticacheServiceID = "elasticache" // Elasticache. - ElasticbeanstalkServiceID = "elasticbeanstalk" // Elasticbeanstalk. - ElasticfilesystemServiceID = "elasticfilesystem" // Elasticfilesystem. - ElasticloadbalancingServiceID = "elasticloadbalancing" // Elasticloadbalancing. - ElasticmapreduceServiceID = "elasticmapreduce" // Elasticmapreduce. - ElastictranscoderServiceID = "elastictranscoder" // Elastictranscoder. - EmailServiceID = "email" // Email. - EntitlementMarketplaceServiceID = "entitlement.marketplace" // EntitlementMarketplace. - EsServiceID = "es" // Es. - EventsServiceID = "events" // Events. - FirehoseServiceID = "firehose" // Firehose. - FmsServiceID = "fms" // Fms. - GameliftServiceID = "gamelift" // Gamelift. - GlacierServiceID = "glacier" // Glacier. - GlueServiceID = "glue" // Glue. - GreengrassServiceID = "greengrass" // Greengrass. - GuarddutyServiceID = "guardduty" // Guardduty. - HealthServiceID = "health" // Health. - IamServiceID = "iam" // Iam. - ImportexportServiceID = "importexport" // Importexport. - InspectorServiceID = "inspector" // Inspector. - IotServiceID = "iot" // Iot. - IotanalyticsServiceID = "iotanalytics" // Iotanalytics. - KinesisServiceID = "kinesis" // Kinesis. - KinesisanalyticsServiceID = "kinesisanalytics" // Kinesisanalytics. - KinesisvideoServiceID = "kinesisvideo" // Kinesisvideo. - KmsServiceID = "kms" // Kms. - LambdaServiceID = "lambda" // Lambda. - LightsailServiceID = "lightsail" // Lightsail. - LogsServiceID = "logs" // Logs. - MachinelearningServiceID = "machinelearning" // Machinelearning. - MarketplacecommerceanalyticsServiceID = "marketplacecommerceanalytics" // Marketplacecommerceanalytics. - MediaconvertServiceID = "mediaconvert" // Mediaconvert. - MedialiveServiceID = "medialive" // Medialive. - MediapackageServiceID = "mediapackage" // Mediapackage. - MediastoreServiceID = "mediastore" // Mediastore. - MeteringMarketplaceServiceID = "metering.marketplace" // MeteringMarketplace. - MghServiceID = "mgh" // Mgh. - MobileanalyticsServiceID = "mobileanalytics" // Mobileanalytics. - ModelsLexServiceID = "models.lex" // ModelsLex. - MonitoringServiceID = "monitoring" // Monitoring. - MturkRequesterServiceID = "mturk-requester" // MturkRequester. - NeptuneServiceID = "neptune" // Neptune. - OpsworksServiceID = "opsworks" // Opsworks. - OpsworksCmServiceID = "opsworks-cm" // OpsworksCm. - OrganizationsServiceID = "organizations" // Organizations. - PinpointServiceID = "pinpoint" // Pinpoint. - PollyServiceID = "polly" // Polly. - RdsServiceID = "rds" // Rds. - RedshiftServiceID = "redshift" // Redshift. - RekognitionServiceID = "rekognition" // Rekognition. - ResourceGroupsServiceID = "resource-groups" // ResourceGroups. - Route53ServiceID = "route53" // Route53. - Route53domainsServiceID = "route53domains" // Route53domains. - RuntimeLexServiceID = "runtime.lex" // RuntimeLex. - RuntimeSagemakerServiceID = "runtime.sagemaker" // RuntimeSagemaker. - S3ServiceID = "s3" // S3. - SdbServiceID = "sdb" // Sdb. - SecretsmanagerServiceID = "secretsmanager" // Secretsmanager. - ServerlessrepoServiceID = "serverlessrepo" // Serverlessrepo. - ServicecatalogServiceID = "servicecatalog" // Servicecatalog. - ServicediscoveryServiceID = "servicediscovery" // Servicediscovery. - ShieldServiceID = "shield" // Shield. - SmsServiceID = "sms" // Sms. - SnowballServiceID = "snowball" // Snowball. - SnsServiceID = "sns" // Sns. - SqsServiceID = "sqs" // Sqs. - SsmServiceID = "ssm" // Ssm. - StatesServiceID = "states" // States. - StoragegatewayServiceID = "storagegateway" // Storagegateway. - StreamsDynamodbServiceID = "streams.dynamodb" // StreamsDynamodb. - StsServiceID = "sts" // Sts. - SupportServiceID = "support" // Support. - SwfServiceID = "swf" // Swf. - TaggingServiceID = "tagging" // Tagging. - TranslateServiceID = "translate" // Translate. - WafServiceID = "waf" // Waf. - WafRegionalServiceID = "waf-regional" // WafRegional. - WorkdocsServiceID = "workdocs" // Workdocs. - WorkmailServiceID = "workmail" // Workmail. - WorkspacesServiceID = "workspaces" // Workspaces. - XrayServiceID = "xray" // Xray. -) - // DefaultResolver returns an Endpoint resolver that will be able // to resolve endpoints for: AWS Standard, AWS China, and AWS GovCloud (US). // @@ -242,6 +112,9 @@ var awsPartition = partition{ "eu-central-1": region{ Description: "EU (Frankfurt)", }, + "eu-north-1": region{ + Description: "EU (Stockholm)", + }, "eu-west-1": region{ Description: "EU (Ireland)", }, @@ -284,6 +157,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{}, @@ -337,11 +211,16 @@ 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{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -355,6 +234,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{}, @@ -381,6 +261,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{}, @@ -400,11 +281,29 @@ var awsPartition = partition{ }, Endpoints: endpoints{ "ap-northeast-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "us-east-1": endpoint{}, "us-west-2": endpoint{}, }, }, + "appsync": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "athena": service{ Endpoints: endpoints{ @@ -433,6 +332,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{}, @@ -452,10 +352,18 @@ 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{}, + "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -471,6 +379,7 @@ var awsPartition = partition{ "eu-central-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{}, @@ -504,6 +413,23 @@ var awsPartition = partition{ }, }, }, + "chime": service{ + PartitionEndpoint: "aws-global", + IsRegionalized: boxedFalse, + Defaults: endpoint{ + SSLCommonName: "service.chime.aws.amazon.com", + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "aws-global": endpoint{ + Hostname: "service.chime.aws.amazon.com", + Protocols: []string{"https"}, + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + }, + }, "cloud9": service{ Endpoints: endpoints{ @@ -519,6 +445,7 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, @@ -537,6 +464,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{}, @@ -584,13 +512,16 @@ 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{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -622,6 +553,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{}, @@ -689,11 +621,17 @@ var awsPartition = partition{ "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": endpoint{ + Hostname: "codecommit-fips.ca-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ca-central-1", + }, + }, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "codedeploy": service{ @@ -706,14 +644,39 @@ 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{}, "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: "codedeploy-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "us-east-2": endpoint{}, + "us-east-2-fips": endpoint{ + Hostname: "codedeploy-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "us-west-1": endpoint{}, + "us-west-1-fips": endpoint{ + Hostname: "codedeploy-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "us-west-2": endpoint{}, + "us-west-2-fips": endpoint{ + Hostname: "codedeploy-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, }, }, "codepipeline": service{ @@ -761,6 +724,7 @@ var awsPartition = partition{ "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{}, @@ -777,6 +741,7 @@ var awsPartition = partition{ "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{}, @@ -807,6 +772,7 @@ var awsPartition = partition{ }, Endpoints: endpoints{ "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -823,6 +789,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{}, @@ -849,6 +816,21 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "datasync": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "dax": service{ Endpoints: endpoints{ @@ -880,6 +862,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{}, @@ -916,6 +899,35 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "docdb": service{ + + Endpoints: endpoints{ + "eu-west-1": endpoint{ + Hostname: "rds.eu-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-west-1", + }, + }, + "us-east-1": endpoint{ + Hostname: "rds.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "us-east-2": endpoint{ + Hostname: "rds.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "us-west-2": endpoint{ + Hostname: "rds.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + }, + }, "ds": service{ Endpoints: endpoints{ @@ -947,6 +959,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{}, @@ -976,6 +989,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{}, @@ -1007,6 +1021,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{}, @@ -1027,6 +1042,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{}, @@ -1047,6 +1063,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{}, @@ -1073,6 +1090,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{}, @@ -1110,6 +1128,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{}, @@ -1135,10 +1154,11 @@ var awsPartition = partition{ "eu-central-1": endpoint{ SSLCommonName: "{service}.{region}.{dnsSuffix}", }, - "eu-west-1": endpoint{}, - "eu-west-2": endpoint{}, - "eu-west-3": endpoint{}, - "sa-east-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{ SSLCommonName: "{service}.{region}.{dnsSuffix}", }, @@ -1188,6 +1208,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{}, @@ -1208,6 +1229,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{}, @@ -1242,9 +1264,22 @@ var awsPartition = partition{ Defaults: endpoint{ Protocols: []string{"https"}, }, + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "fsx": service{ + Endpoints: endpoints{ "eu-west-1": endpoint{}, "us-east-1": endpoint{}, + "us-east-2": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -1279,6 +1314,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{}, @@ -1303,6 +1339,7 @@ var awsPartition = partition{ "eu-west-2": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -1415,10 +1452,12 @@ var awsPartition = partition{ "iotanalytics": service{ Endpoints: endpoints{ - "eu-west-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-2": endpoint{}, + "ap-northeast-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, }, }, "kinesis": service{ @@ -1431,6 +1470,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{}, @@ -1447,6 +1487,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "us-east-1": endpoint{}, + "us-east-2": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -1470,6 +1511,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{}, @@ -1490,6 +1532,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{}, @@ -1528,6 +1571,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{}, @@ -1590,6 +1634,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{}, "eu-central-1": endpoint{}, @@ -1597,6 +1642,7 @@ var awsPartition = partition{ "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -1626,6 +1672,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{}, @@ -1672,6 +1719,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{}, @@ -1682,6 +1730,21 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "mq": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "mturk-requester": service{ IsRegionalized: boxedFalse, @@ -1695,12 +1758,36 @@ var awsPartition = partition{ "neptune": service{ Endpoints: endpoints{ + "ap-southeast-1": endpoint{ + Hostname: "rds.ap-southeast-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-southeast-1", + }, + }, + "ap-southeast-2": endpoint{ + Hostname: "rds.ap-southeast-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-southeast-2", + }, + }, + "eu-central-1": endpoint{ + Hostname: "rds.eu-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-central-1", + }, + }, "eu-west-1": endpoint{ Hostname: "rds.eu-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-1", }, }, + "eu-west-2": endpoint{ + Hostname: "rds.eu-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-west-2", + }, + }, "us-east-1": endpoint{ Hostname: "rds.us-east-1.amazonaws.com", CredentialScope: credentialScope{ @@ -1775,7 +1862,10 @@ var awsPartition = partition{ }, }, Endpoints: endpoints{ - "us-east-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "polly": service{ @@ -1808,6 +1898,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{}, @@ -1830,6 +1921,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{}, @@ -1861,6 +1953,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{}, @@ -1871,6 +1964,14 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "robomaker": service{ + + Endpoints: endpoints{ + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "route53": service{ PartitionEndpoint: "aws-global", IsRegionalized: boxedFalse, @@ -1890,6 +1991,20 @@ var awsPartition = partition{ "us-east-1": endpoint{}, }, }, + "route53resolver": service{ + Defaults: endpoint{ + Protocols: []string{"http", "https"}, + }, + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "runtime.lex": service{ Defaults: endpoint{ CredentialScope: credentialScope{ @@ -1907,11 +2022,16 @@ 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{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, + "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, }, @@ -1942,6 +2062,7 @@ var awsPartition = partition{ }, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{ Hostname: "s3.eu-west-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, @@ -1974,6 +2095,157 @@ var awsPartition = partition{ }, }, }, + "s3-control": service{ + Defaults: endpoint{ + Protocols: []string{"https"}, + SignatureVersions: []string{"s3v4"}, + + HasDualStack: boxedTrue, + DualStackHostname: "{service}.dualstack.{region}.{dnsSuffix}", + }, + Endpoints: endpoints{ + "ap-northeast-1": endpoint{ + Hostname: "s3-control.ap-northeast-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + CredentialScope: credentialScope{ + Region: "ap-northeast-1", + }, + }, + "ap-northeast-2": endpoint{ + Hostname: "s3-control.ap-northeast-2.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + CredentialScope: credentialScope{ + Region: "ap-northeast-2", + }, + }, + "ap-south-1": endpoint{ + Hostname: "s3-control.ap-south-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + CredentialScope: credentialScope{ + Region: "ap-south-1", + }, + }, + "ap-southeast-1": endpoint{ + Hostname: "s3-control.ap-southeast-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + CredentialScope: credentialScope{ + Region: "ap-southeast-1", + }, + }, + "ap-southeast-2": endpoint{ + Hostname: "s3-control.ap-southeast-2.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + CredentialScope: credentialScope{ + Region: "ap-southeast-2", + }, + }, + "ca-central-1": endpoint{ + Hostname: "s3-control.ca-central-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + CredentialScope: credentialScope{ + Region: "ca-central-1", + }, + }, + "eu-central-1": endpoint{ + Hostname: "s3-control.eu-central-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + CredentialScope: credentialScope{ + Region: "eu-central-1", + }, + }, + "eu-north-1": endpoint{ + Hostname: "s3-control.eu-north-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + CredentialScope: credentialScope{ + Region: "eu-north-1", + }, + }, + "eu-west-1": endpoint{ + Hostname: "s3-control.eu-west-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + CredentialScope: credentialScope{ + Region: "eu-west-1", + }, + }, + "eu-west-2": endpoint{ + Hostname: "s3-control.eu-west-2.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + CredentialScope: credentialScope{ + Region: "eu-west-2", + }, + }, + "eu-west-3": endpoint{ + Hostname: "s3-control.eu-west-3.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + CredentialScope: credentialScope{ + Region: "eu-west-3", + }, + }, + "sa-east-1": endpoint{ + Hostname: "s3-control.sa-east-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + CredentialScope: credentialScope{ + Region: "sa-east-1", + }, + }, + "us-east-1": endpoint{ + Hostname: "s3-control.us-east-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "us-east-1-fips": endpoint{ + Hostname: "s3-control-fips.us-east-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "us-east-2": endpoint{ + Hostname: "s3-control.us-east-2.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "us-east-2-fips": endpoint{ + Hostname: "s3-control-fips.us-east-2.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "us-west-1": endpoint{ + Hostname: "s3-control.us-west-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "us-west-1-fips": endpoint{ + Hostname: "s3-control-fips.us-west-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "us-west-2": endpoint{ + Hostname: "s3-control.us-west-2.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "us-west-2-fips": endpoint{ + Hostname: "s3-control-fips.us-west-2.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + }, + }, "sdb": service{ Defaults: endpoint{ Protocols: []string{"http", "https"}, @@ -2100,20 +2372,49 @@ 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{}, + "us-east-1-fips": endpoint{ + Hostname: "servicecatalog-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "us-east-2": endpoint{}, + "us-east-2-fips": endpoint{ + Hostname: "servicecatalog-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "us-west-1": endpoint{}, + "us-west-1-fips": endpoint{ + Hostname: "servicecatalog-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "us-west-2": endpoint{}, + "us-west-2-fips": endpoint{ + Hostname: "servicecatalog-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, }, }, "servicediscovery": 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{}, + "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -2123,7 +2424,7 @@ var awsPartition = partition{ "shield": service{ IsRegionalized: boxedFalse, Defaults: endpoint{ - SSLCommonName: "Shield.us-east-1.amazonaws.com", + SSLCommonName: "shield.us-east-1.amazonaws.com", Protocols: []string{"https"}, }, Endpoints: endpoints{ @@ -2181,6 +2482,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{}, @@ -2204,6 +2506,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{}, @@ -2250,6 +2553,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{}, @@ -2270,8 +2574,11 @@ 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{}, + "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -2288,6 +2595,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{}, @@ -2313,6 +2621,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{}, @@ -2352,6 +2661,7 @@ var awsPartition = partition{ "aws-global": 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{}, @@ -2402,6 +2712,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{}, @@ -2422,6 +2733,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{}, @@ -2432,6 +2744,24 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "transfer": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": 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{}, + "eu-west-3": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "translate": service{ Defaults: endpoint{ Protocols: []string{"https"}, @@ -2534,8 +2864,10 @@ 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{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -2618,6 +2950,13 @@ var awscnPartition = partition{ "cn-northwest-1": endpoint{}, }, }, + "codebuild": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, "codedeploy": service{ Endpoints: endpoints{ @@ -2645,6 +2984,13 @@ var awscnPartition = partition{ "cn-northwest-1": endpoint{}, }, }, + "dms": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, "ds": service{ Endpoints: endpoints{ @@ -2730,6 +3076,7 @@ var awscnPartition = partition{ "es": service{ Endpoints: endpoints{ + "cn-north-1": endpoint{}, "cn-northwest-1": endpoint{}, }, }, @@ -2802,6 +3149,12 @@ var awscnPartition = partition{ "cn-northwest-1": endpoint{}, }, }, + "polly": service{ + + Endpoints: endpoints{ + "cn-northwest-1": endpoint{}, + }, + }, "rds": service{ Endpoints: endpoints{ @@ -2826,6 +3179,28 @@ var awscnPartition = partition{ "cn-northwest-1": endpoint{}, }, }, + "s3-control": service{ + Defaults: endpoint{ + Protocols: []string{"https"}, + SignatureVersions: []string{"s3v4"}, + }, + Endpoints: endpoints{ + "cn-north-1": endpoint{ + Hostname: "s3-control.cn-north-1.amazonaws.com.cn", + SignatureVersions: []string{"s3v4"}, + CredentialScope: credentialScope{ + Region: "cn-north-1", + }, + }, + "cn-northwest-1": endpoint{ + Hostname: "s3-control.cn-northwest-1.amazonaws.com.cn", + SignatureVersions: []string{"s3v4"}, + CredentialScope: credentialScope{ + Region: "cn-northwest-1", + }, + }, + }, + }, "sms": service{ Endpoints: endpoints{ @@ -2928,6 +3303,9 @@ var awsusgovPartition = partition{ SignatureVersions: []string{"v4"}, }, Regions: regions{ + "us-gov-east-1": region{ + Description: "AWS GovCloud (US-East)", + }, "us-gov-west-1": region{ Description: "AWS GovCloud (US)", }, @@ -2935,6 +3313,13 @@ var awsusgovPartition = partition{ Services: services{ "acm": service{ + Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, + "us-gov-west-1": endpoint{}, + }, + }, + "api.sagemaker": service{ + Endpoints: endpoints{ "us-gov-west-1": endpoint{}, }, @@ -2942,26 +3327,41 @@ var awsusgovPartition = partition{ "apigateway": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, "application-autoscaling": service{ - + Defaults: endpoint{ + Hostname: "autoscaling.{region}.amazonaws.com", + CredentialScope: credentialScope{ + Service: "application-autoscaling", + }, + }, Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, "autoscaling": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{ Protocols: []string{"http", "https"}, }, }, }, + "clouddirectory": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "cloudformation": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, @@ -2978,35 +3378,59 @@ var awsusgovPartition = partition{ }, }, Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, "cloudtrail": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, "codedeploy": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, + "us-gov-east-1-fips": endpoint{ + Hostname: "codedeploy-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: "codedeploy-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, }, }, "config": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, "directconnect": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, "dms": service{ + Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, + "us-gov-west-1": endpoint{}, + }, + }, + "ds": service{ + Endpoints: endpoints{ "us-gov-west-1": endpoint{}, }, @@ -3014,6 +3438,7 @@ var awsusgovPartition = partition{ "dynamodb": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, "us-gov-west-1-fips": endpoint{ Hostname: "dynamodb.us-gov-west-1.amazonaws.com", @@ -3026,6 +3451,7 @@ var awsusgovPartition = partition{ "ec2": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, @@ -3043,12 +3469,14 @@ var awsusgovPartition = partition{ "ecr": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, "ecs": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, @@ -3061,11 +3489,19 @@ var awsusgovPartition = partition{ Region: "us-gov-west-1", }, }, + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, "elasticbeanstalk": service{ + Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, + "us-gov-west-1": endpoint{}, + }, + }, + "elasticfilesystem": service{ + Endpoints: endpoints{ "us-gov-west-1": endpoint{}, }, @@ -3073,6 +3509,7 @@ var awsusgovPartition = partition{ "elasticloadbalancing": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{ Protocols: []string{"http", "https"}, }, @@ -3081,6 +3518,7 @@ var awsusgovPartition = partition{ "elasticmapreduce": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{ Protocols: []string{"https"}, }, @@ -3089,23 +3527,35 @@ var awsusgovPartition = partition{ "es": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, "events": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, "glacier": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{ Protocols: []string{"http", "https"}, }, }, }, + "guardduty": service{ + IsRegionalized: boxedTrue, + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "iam": service{ PartitionEndpoint: "aws-us-gov-global", IsRegionalized: boxedFalse, @@ -3122,6 +3572,7 @@ var awsusgovPartition = partition{ "inspector": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, @@ -3138,23 +3589,33 @@ var awsusgovPartition = partition{ "kinesis": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, "kms": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, "lambda": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, "logs": service{ + Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, + "us-gov-west-1": endpoint{}, + }, + }, + "mediaconvert": service{ + Endpoints: endpoints{ "us-gov-west-1": endpoint{}, }, @@ -3172,6 +3633,7 @@ var awsusgovPartition = partition{ "monitoring": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, @@ -3184,12 +3646,14 @@ var awsusgovPartition = partition{ "rds": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, "redshift": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, @@ -3199,6 +3663,12 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "runtime.sagemaker": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "s3": service{ Defaults: endpoint{ SignatureVersions: []string{"s3", "s3v4"}, @@ -3210,27 +3680,70 @@ var awsusgovPartition = partition{ Region: "us-gov-west-1", }, }, + "us-gov-east-1": endpoint{ + Hostname: "s3.us-gov-east-1.amazonaws.com", + Protocols: []string{"http", "https"}, + }, "us-gov-west-1": endpoint{ Hostname: "s3.us-gov-west-1.amazonaws.com", Protocols: []string{"http", "https"}, }, }, }, + "s3-control": service{ + Defaults: endpoint{ + Protocols: []string{"https"}, + SignatureVersions: []string{"s3v4"}, + }, + Endpoints: endpoints{ + "us-gov-east-1": endpoint{ + Hostname: "s3-control.us-gov-east-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "us-gov-east-1-fips": endpoint{ + Hostname: "s3-control-fips.us-gov-east-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "us-gov-west-1": endpoint{ + Hostname: "s3-control.us-gov-west-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, + "us-gov-west-1-fips": endpoint{ + Hostname: "s3-control-fips.us-gov-west-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, + }, + }, "sms": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, "snowball": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, "sns": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{ Protocols: []string{"http", "https"}, }, @@ -3239,6 +3752,7 @@ var awsusgovPartition = partition{ "sqs": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{ SSLCommonName: "{region}.queue.{dnsSuffix}", Protocols: []string{"http", "https"}, @@ -3248,12 +3762,14 @@ var awsusgovPartition = partition{ "ssm": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, "states": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, @@ -3270,6 +3786,7 @@ var awsusgovPartition = partition{ }, }, Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, "us-gov-west-1-fips": endpoint{ Hostname: "dynamodb.us-gov-west-1.amazonaws.com", @@ -3282,18 +3799,21 @@ var awsusgovPartition = partition{ "sts": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, "swf": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, "tagging": service{ Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, }, diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/dep_service_ids.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/dep_service_ids.go new file mode 100644 index 0000000000..000dd79eec --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/dep_service_ids.go @@ -0,0 +1,141 @@ +package endpoints + +// Service identifiers +// +// Deprecated: Use client package's EndpointID value instead of these +// ServiceIDs. These IDs are not maintained, and are out of date. +const ( + A4bServiceID = "a4b" // A4b. + AcmServiceID = "acm" // Acm. + AcmPcaServiceID = "acm-pca" // AcmPca. + ApiMediatailorServiceID = "api.mediatailor" // ApiMediatailor. + ApiPricingServiceID = "api.pricing" // ApiPricing. + ApiSagemakerServiceID = "api.sagemaker" // ApiSagemaker. + ApigatewayServiceID = "apigateway" // Apigateway. + ApplicationAutoscalingServiceID = "application-autoscaling" // ApplicationAutoscaling. + Appstream2ServiceID = "appstream2" // Appstream2. + AppsyncServiceID = "appsync" // Appsync. + AthenaServiceID = "athena" // Athena. + AutoscalingServiceID = "autoscaling" // Autoscaling. + AutoscalingPlansServiceID = "autoscaling-plans" // AutoscalingPlans. + BatchServiceID = "batch" // Batch. + BudgetsServiceID = "budgets" // Budgets. + CeServiceID = "ce" // Ce. + ChimeServiceID = "chime" // Chime. + Cloud9ServiceID = "cloud9" // Cloud9. + ClouddirectoryServiceID = "clouddirectory" // Clouddirectory. + CloudformationServiceID = "cloudformation" // Cloudformation. + CloudfrontServiceID = "cloudfront" // Cloudfront. + CloudhsmServiceID = "cloudhsm" // Cloudhsm. + Cloudhsmv2ServiceID = "cloudhsmv2" // Cloudhsmv2. + CloudsearchServiceID = "cloudsearch" // Cloudsearch. + CloudtrailServiceID = "cloudtrail" // Cloudtrail. + CodebuildServiceID = "codebuild" // Codebuild. + CodecommitServiceID = "codecommit" // Codecommit. + CodedeployServiceID = "codedeploy" // Codedeploy. + CodepipelineServiceID = "codepipeline" // Codepipeline. + CodestarServiceID = "codestar" // Codestar. + CognitoIdentityServiceID = "cognito-identity" // CognitoIdentity. + CognitoIdpServiceID = "cognito-idp" // CognitoIdp. + CognitoSyncServiceID = "cognito-sync" // CognitoSync. + ComprehendServiceID = "comprehend" // Comprehend. + ConfigServiceID = "config" // Config. + CurServiceID = "cur" // Cur. + DatapipelineServiceID = "datapipeline" // Datapipeline. + DaxServiceID = "dax" // Dax. + DevicefarmServiceID = "devicefarm" // Devicefarm. + DirectconnectServiceID = "directconnect" // Directconnect. + DiscoveryServiceID = "discovery" // Discovery. + DmsServiceID = "dms" // Dms. + DsServiceID = "ds" // Ds. + DynamodbServiceID = "dynamodb" // Dynamodb. + Ec2ServiceID = "ec2" // Ec2. + Ec2metadataServiceID = "ec2metadata" // Ec2metadata. + EcrServiceID = "ecr" // Ecr. + EcsServiceID = "ecs" // Ecs. + ElasticacheServiceID = "elasticache" // Elasticache. + ElasticbeanstalkServiceID = "elasticbeanstalk" // Elasticbeanstalk. + ElasticfilesystemServiceID = "elasticfilesystem" // Elasticfilesystem. + ElasticloadbalancingServiceID = "elasticloadbalancing" // Elasticloadbalancing. + ElasticmapreduceServiceID = "elasticmapreduce" // Elasticmapreduce. + ElastictranscoderServiceID = "elastictranscoder" // Elastictranscoder. + EmailServiceID = "email" // Email. + EntitlementMarketplaceServiceID = "entitlement.marketplace" // EntitlementMarketplace. + EsServiceID = "es" // Es. + EventsServiceID = "events" // Events. + FirehoseServiceID = "firehose" // Firehose. + FmsServiceID = "fms" // Fms. + GameliftServiceID = "gamelift" // Gamelift. + GlacierServiceID = "glacier" // Glacier. + GlueServiceID = "glue" // Glue. + GreengrassServiceID = "greengrass" // Greengrass. + GuarddutyServiceID = "guardduty" // Guardduty. + HealthServiceID = "health" // Health. + IamServiceID = "iam" // Iam. + ImportexportServiceID = "importexport" // Importexport. + InspectorServiceID = "inspector" // Inspector. + IotServiceID = "iot" // Iot. + IotanalyticsServiceID = "iotanalytics" // Iotanalytics. + KinesisServiceID = "kinesis" // Kinesis. + KinesisanalyticsServiceID = "kinesisanalytics" // Kinesisanalytics. + KinesisvideoServiceID = "kinesisvideo" // Kinesisvideo. + KmsServiceID = "kms" // Kms. + LambdaServiceID = "lambda" // Lambda. + LightsailServiceID = "lightsail" // Lightsail. + LogsServiceID = "logs" // Logs. + MachinelearningServiceID = "machinelearning" // Machinelearning. + MarketplacecommerceanalyticsServiceID = "marketplacecommerceanalytics" // Marketplacecommerceanalytics. + MediaconvertServiceID = "mediaconvert" // Mediaconvert. + MedialiveServiceID = "medialive" // Medialive. + MediapackageServiceID = "mediapackage" // Mediapackage. + MediastoreServiceID = "mediastore" // Mediastore. + MeteringMarketplaceServiceID = "metering.marketplace" // MeteringMarketplace. + MghServiceID = "mgh" // Mgh. + MobileanalyticsServiceID = "mobileanalytics" // Mobileanalytics. + ModelsLexServiceID = "models.lex" // ModelsLex. + MonitoringServiceID = "monitoring" // Monitoring. + MturkRequesterServiceID = "mturk-requester" // MturkRequester. + NeptuneServiceID = "neptune" // Neptune. + OpsworksServiceID = "opsworks" // Opsworks. + OpsworksCmServiceID = "opsworks-cm" // OpsworksCm. + OrganizationsServiceID = "organizations" // Organizations. + PinpointServiceID = "pinpoint" // Pinpoint. + PollyServiceID = "polly" // Polly. + RdsServiceID = "rds" // Rds. + RedshiftServiceID = "redshift" // Redshift. + RekognitionServiceID = "rekognition" // Rekognition. + ResourceGroupsServiceID = "resource-groups" // ResourceGroups. + Route53ServiceID = "route53" // Route53. + Route53domainsServiceID = "route53domains" // Route53domains. + RuntimeLexServiceID = "runtime.lex" // RuntimeLex. + RuntimeSagemakerServiceID = "runtime.sagemaker" // RuntimeSagemaker. + S3ServiceID = "s3" // S3. + S3ControlServiceID = "s3-control" // S3Control. + SagemakerServiceID = "api.sagemaker" // Sagemaker. + SdbServiceID = "sdb" // Sdb. + SecretsmanagerServiceID = "secretsmanager" // Secretsmanager. + ServerlessrepoServiceID = "serverlessrepo" // Serverlessrepo. + ServicecatalogServiceID = "servicecatalog" // Servicecatalog. + ServicediscoveryServiceID = "servicediscovery" // Servicediscovery. + ShieldServiceID = "shield" // Shield. + SmsServiceID = "sms" // Sms. + SnowballServiceID = "snowball" // Snowball. + SnsServiceID = "sns" // Sns. + SqsServiceID = "sqs" // Sqs. + SsmServiceID = "ssm" // Ssm. + StatesServiceID = "states" // States. + StoragegatewayServiceID = "storagegateway" // Storagegateway. + StreamsDynamodbServiceID = "streams.dynamodb" // StreamsDynamodb. + StsServiceID = "sts" // Sts. + SupportServiceID = "support" // Support. + SwfServiceID = "swf" // Swf. + TaggingServiceID = "tagging" // Tagging. + TransferServiceID = "transfer" // Transfer. + TranslateServiceID = "translate" // Translate. + WafServiceID = "waf" // Waf. + WafRegionalServiceID = "waf-regional" // WafRegional. + WorkdocsServiceID = "workdocs" // Workdocs. + WorkmailServiceID = "workmail" // Workmail. + WorkspacesServiceID = "workspaces" // Workspaces. + XrayServiceID = "xray" // Xray. +) 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 e29c095121..f82babf6f9 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 @@ -35,7 +35,7 @@ type Options struct { // // If resolving an endpoint on the partition list the provided region will // be used to determine which partition's domain name pattern to the service - // endpoint ID with. If both the service and region are unkonwn and resolving + // endpoint ID with. If both the service and region are unknown and resolving // the endpoint on partition list an UnknownEndpointError error will be returned. // // If resolving and endpoint on a partition specific resolver that partition's diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_codegen.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_codegen.go index 05e92df22a..0fdfcc56e0 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_codegen.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_codegen.go @@ -16,6 +16,10 @@ import ( type CodeGenOptions struct { // Options for how the model will be decoded. DecodeModelOptions DecodeModelOptions + + // Disables code generation of the service endpoint prefix IDs defined in + // the model. + DisableGenerateServiceIDs bool } // Set combines all of the option functions together @@ -39,8 +43,16 @@ func CodeGenModel(modelFile io.Reader, outFile io.Writer, optFns ...func(*CodeGe return err } + v := struct { + Resolver + CodeGenOptions + }{ + Resolver: resolver, + CodeGenOptions: opts, + } + tmpl := template.Must(template.New("tmpl").Funcs(funcMap).Parse(v3Tmpl)) - if err := tmpl.ExecuteTemplate(outFile, "defaults", resolver); err != nil { + if err := tmpl.ExecuteTemplate(outFile, "defaults", v); err != nil { return fmt.Errorf("failed to execute template, %v", err) } @@ -166,15 +178,17 @@ import ( "regexp" ) - {{ template "partition consts" . }} + {{ template "partition consts" $.Resolver }} - {{ range $_, $partition := . }} + {{ range $_, $partition := $.Resolver }} {{ template "partition region consts" $partition }} {{ end }} - {{ template "service consts" . }} + {{ if not $.DisableGenerateServiceIDs -}} + {{ template "service consts" $.Resolver }} + {{- end }} - {{ template "endpoint resolvers" . }} + {{ template "endpoint resolvers" $.Resolver }} {{- end }} {{ define "partition consts" }} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/errors.go b/vendor/github.com/aws/aws-sdk-go/aws/errors.go index 5766361686..fa06f7a8f8 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/errors.go @@ -5,13 +5,9 @@ import "github.com/aws/aws-sdk-go/aws/awserr" var ( // ErrMissingRegion is an error that is returned if region configuration is // not found. - // - // @readonly ErrMissingRegion = awserr.New("MissingRegion", "could not find region configuration", nil) // ErrMissingEndpoint is an error that is returned if an endpoint cannot be // resolved for a service. - // - // @readonly ErrMissingEndpoint = awserr.New("MissingEndpoint", "'Endpoint' configuration is required for this service", nil) ) diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go b/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go index 605a72d3c9..8ef8548a96 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go @@ -19,6 +19,7 @@ type Handlers struct { UnmarshalError HandlerList Retry HandlerList AfterRetry HandlerList + CompleteAttempt HandlerList Complete HandlerList } @@ -36,6 +37,7 @@ func (h *Handlers) Copy() Handlers { UnmarshalMeta: h.UnmarshalMeta.copy(), Retry: h.Retry.copy(), AfterRetry: h.AfterRetry.copy(), + CompleteAttempt: h.CompleteAttempt.copy(), Complete: h.Complete.copy(), } } @@ -53,6 +55,7 @@ func (h *Handlers) Clear() { h.ValidateResponse.Clear() h.Retry.Clear() h.AfterRetry.Clear() + h.CompleteAttempt.Clear() h.Complete.Clear() } 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 75f0fe0778..b716684650 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 @@ -122,7 +122,6 @@ func New(cfg aws.Config, clientInfo metadata.ClientInfo, handlers Handlers, Handlers: handlers.Copy(), Retryer: retryer, - AttemptTime: time.Now(), Time: time.Now(), ExpireTime: 0, Operation: operation, @@ -266,7 +265,9 @@ func (r *Request) SetReaderBody(reader io.ReadSeeker) { } // Presign returns the request's signed URL. Error will be returned -// if the signing fails. +// if the signing fails. The expire parameter is only used for presigned Amazon +// S3 API requests. All other AWS services will use a fixed expiration +// time of 15 minutes. // // It is invalid to create a presigned URL with a expire duration 0 or less. An // error is returned if expire duration is 0 or less. @@ -283,7 +284,9 @@ func (r *Request) Presign(expire time.Duration) (string, error) { } // PresignRequest behaves just like presign, with the addition of returning a -// set of headers that were signed. +// set of headers that were signed. The expire parameter is only used for +// presigned Amazon S3 API requests. All other AWS services will use a fixed +// expiration time of 15 minutes. // // It is invalid to create a presigned URL with a expire duration 0 or less. An // error is returned if expire duration is 0 or less. @@ -462,80 +465,78 @@ func (r *Request) Send() error { r.Handlers.Complete.Run(r) }() + if err := r.Error; err != nil { + return err + } + for { + r.Error = nil r.AttemptTime = time.Now() - if aws.BoolValue(r.Retryable) { - if r.Config.LogLevel.Matches(aws.LogDebugWithRequestRetries) { - r.Config.Logger.Log(fmt.Sprintf("DEBUG: Retrying Request %s/%s, attempt %d", - r.ClientInfo.ServiceName, r.Operation.Name, r.RetryCount)) - } - - // The previous http.Request will have a reference to the r.Body - // and the HTTP Client's Transport may still be reading from - // the request's body even though the Client's Do returned. - r.HTTPRequest = copyHTTPRequest(r.HTTPRequest, nil) - r.ResetBody() - - // Closing response body to ensure that no response body is leaked - // between retry attempts. - if r.HTTPResponse != nil && r.HTTPResponse.Body != nil { - r.HTTPResponse.Body.Close() - } - } - r.Sign() - if r.Error != nil { - return r.Error + if err := r.Sign(); err != nil { + debugLogReqError(r, "Sign Request", false, err) + return err } - r.Retryable = nil - - r.Handlers.Send.Run(r) - if r.Error != nil { - if !shouldRetryCancel(r) { - return r.Error - } - - err := r.Error + if err := r.sendRequest(); err == nil { + return nil + } else if !shouldRetryCancel(r) { + return err + } else { r.Handlers.Retry.Run(r) r.Handlers.AfterRetry.Run(r) - if r.Error != nil { - debugLogReqError(r, "Send Request", false, err) - return r.Error - } - debugLogReqError(r, "Send Request", true, err) - continue - } - r.Handlers.UnmarshalMeta.Run(r) - r.Handlers.ValidateResponse.Run(r) - if r.Error != nil { - r.Handlers.UnmarshalError.Run(r) - err := r.Error - r.Handlers.Retry.Run(r) - r.Handlers.AfterRetry.Run(r) - if r.Error != nil { - debugLogReqError(r, "Validate Response", false, err) + if r.Error != nil || !aws.BoolValue(r.Retryable) { return r.Error } - debugLogReqError(r, "Validate Response", true, err) - continue - } - r.Handlers.Unmarshal.Run(r) - if r.Error != nil { - err := r.Error - r.Handlers.Retry.Run(r) - r.Handlers.AfterRetry.Run(r) - if r.Error != nil { - debugLogReqError(r, "Unmarshal Response", false, err) - return r.Error - } - debugLogReqError(r, "Unmarshal Response", true, err) + r.prepareRetry() continue } + } +} + +func (r *Request) prepareRetry() { + if r.Config.LogLevel.Matches(aws.LogDebugWithRequestRetries) { + r.Config.Logger.Log(fmt.Sprintf("DEBUG: Retrying Request %s/%s, attempt %d", + r.ClientInfo.ServiceName, r.Operation.Name, r.RetryCount)) + } + + // The previous http.Request will have a reference to the r.Body + // and the HTTP Client's Transport may still be reading from + // the request's body even though the Client's Do returned. + r.HTTPRequest = copyHTTPRequest(r.HTTPRequest, nil) + r.ResetBody() + + // Closing response body to ensure that no response body is leaked + // between retry attempts. + if r.HTTPResponse != nil && r.HTTPResponse.Body != nil { + r.HTTPResponse.Body.Close() + } +} + +func (r *Request) sendRequest() (sendErr error) { + defer r.Handlers.CompleteAttempt.Run(r) + + r.Retryable = nil + r.Handlers.Send.Run(r) + if r.Error != nil { + debugLogReqError(r, "Send Request", r.WillRetry(), r.Error) + return r.Error + } - break + r.Handlers.UnmarshalMeta.Run(r) + r.Handlers.ValidateResponse.Run(r) + if r.Error != nil { + r.Handlers.UnmarshalError.Run(r) + debugLogReqError(r, "Validate Response", r.WillRetry(), r.Error) + return r.Error + } + + r.Handlers.Unmarshal.Run(r) + if r.Error != nil { + debugLogReqError(r, "Unmarshal Response", r.WillRetry(), r.Error) + return r.Error } return nil diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go b/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go index 7d52702988..7bc5da7826 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go @@ -40,6 +40,7 @@ var throttleCodes = map[string]struct{}{ "RequestThrottled": {}, "TooManyRequestsException": {}, // Lambda functions "PriorRequestNotComplete": {}, // Route53 + "TransactionInProgressException": {}, } // credsExpiredCodes is a collection of error codes which signify the credentials diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go b/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go index 4012462282..8630683f31 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go @@ -17,6 +17,12 @@ const ( ParamMinValueErrCode = "ParamMinValueError" // ParamMinLenErrCode is the error code for fields without enough elements. ParamMinLenErrCode = "ParamMinLenError" + // ParamMaxLenErrCode is the error code for value being too long. + ParamMaxLenErrCode = "ParamMaxLenError" + + // ParamFormatErrCode is the error code for a field with invalid + // format or characters. + ParamFormatErrCode = "ParamFormatInvalidError" ) // Validator provides a way for types to perform validation logic on their @@ -232,3 +238,49 @@ func NewErrParamMinLen(field string, min int) *ErrParamMinLen { func (e *ErrParamMinLen) MinLen() int { return e.min } + +// An ErrParamMaxLen represents a maximum length parameter error. +type ErrParamMaxLen struct { + errInvalidParam + max int +} + +// NewErrParamMaxLen creates a new maximum length parameter error. +func NewErrParamMaxLen(field string, max int, value string) *ErrParamMaxLen { + return &ErrParamMaxLen{ + errInvalidParam: errInvalidParam{ + code: ParamMaxLenErrCode, + field: field, + msg: fmt.Sprintf("maximum size of %v, %v", max, value), + }, + max: max, + } +} + +// MaxLen returns the field's required minimum length. +func (e *ErrParamMaxLen) MaxLen() int { + return e.max +} + +// An ErrParamFormat represents a invalid format parameter error. +type ErrParamFormat struct { + errInvalidParam + format string +} + +// NewErrParamFormat creates a new invalid format parameter error. +func NewErrParamFormat(field string, format, value string) *ErrParamFormat { + return &ErrParamFormat{ + errInvalidParam: errInvalidParam{ + code: ParamFormatErrCode, + field: field, + msg: fmt.Sprintf("format %v, %v", format, value), + }, + format: format, + } +} + +// Format returns the field's required format. +func (e *ErrParamFormat) Format() string { + return e.format +} 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 98d420fd64..38a7b05a62 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 @@ -99,7 +99,7 @@ handler logs every request and its payload made by a service client: sess.Handlers.Send.PushFront(func(r *request.Request) { // Log every request made and its payload - logger.Println("Request: %s/%s, Payload: %s", + logger.Printf("Request: %s/%s, Payload: %s", r.ClientInfo.ServiceName, r.Operation, r.Params) }) @@ -183,7 +183,7 @@ be returned when creating the session. // from assumed role. svc := s3.New(sess) -To setup assume role outside of a session see the stscrds.AssumeRoleProvider +To setup assume role outside of a session see the stscreds.AssumeRoleProvider documentation. Environment Variables 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 82e04d76cd..e3959b959e 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 @@ -4,6 +4,7 @@ import ( "os" "strconv" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/defaults" ) @@ -79,7 +80,7 @@ type envConfig struct { // AWS_CONFIG_FILE=$HOME/my_shared_config SharedConfigFile string - // Sets the path to a custom Credentials Authroity (CA) Bundle PEM file + // Sets the path to a custom Credentials Authority (CA) Bundle PEM file // that the SDK will use instead of the system's root CA bundle. // Only use this if you want to configure the SDK to use a custom set // of CAs. @@ -101,6 +102,12 @@ type envConfig struct { CSMEnabled bool CSMPort string CSMClientID string + + enableEndpointDiscovery string + // Enables endpoint discovery via environment variables. + // + // AWS_ENABLE_ENDPOINT_DISCOVERY=true + EnableEndpointDiscovery *bool } var ( @@ -125,6 +132,10 @@ var ( "AWS_SESSION_TOKEN", } + enableEndpointDiscoveryEnvKey = []string{ + "AWS_ENABLE_ENDPOINT_DISCOVERY", + } + regionEnvKeys = []string{ "AWS_REGION", "AWS_DEFAULT_REGION", // Only read if AWS_SDK_LOAD_CONFIG is also set @@ -194,6 +205,12 @@ func envConfigLoad(enableSharedConfig bool) envConfig { setFromEnvVal(&cfg.Region, regionKeys) setFromEnvVal(&cfg.Profile, profileKeys) + // endpoint discovery is in reference to it being enabled. + setFromEnvVal(&cfg.enableEndpointDiscovery, enableEndpointDiscoveryEnvKey) + if len(cfg.enableEndpointDiscovery) > 0 { + cfg.EnableEndpointDiscovery = aws.Bool(cfg.enableEndpointDiscovery != "false") + } + setFromEnvVal(&cfg.SharedCredentialsFile, sharedCredsFileEnvKey) setFromEnvVal(&cfg.SharedConfigFile, sharedConfigFileEnvKey) 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 51f3055630..9bdbafd65c 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 @@ -14,13 +14,32 @@ import ( "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/corehandlers" "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/stscreds" "github.com/aws/aws-sdk-go/aws/csm" "github.com/aws/aws-sdk-go/aws/defaults" "github.com/aws/aws-sdk-go/aws/endpoints" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/internal/shareddefaults" ) +const ( + // ErrCodeSharedConfig represents an error that occurs in the shared + // configuration logic + ErrCodeSharedConfig = "SharedConfigErr" +) + +// 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) + +// ErrSharedConfigECSContainerEnvVarEmpty will be returned if the environment +// variables are empty and Environment was set as the credential source +var ErrSharedConfigECSContainerEnvVarEmpty = awserr.New(ErrCodeSharedConfig, "EcsContainer was specified as the credential_source, but 'AWS_CONTAINER_CREDENTIALS_RELATIVE_URI' was not set", nil) + +// ErrSharedConfigInvalidCredSource will be returned if an invalid credential source was provided +var ErrSharedConfigInvalidCredSource = awserr.New(ErrCodeSharedConfig, "credential source values must be EcsContainer, Ec2InstanceMetadata, or Environment", nil) + // A Session provides a central location to create service clients from and // store configurations and request handlers for those services. // @@ -434,8 +453,67 @@ func mergeConfigSrcs(cfg, userCfg *aws.Config, envCfg envConfig, sharedCfg share } } + if cfg.EnableEndpointDiscovery == nil { + if envCfg.EnableEndpointDiscovery != nil { + cfg.WithEndpointDiscovery(*envCfg.EnableEndpointDiscovery) + } else if envCfg.EnableSharedConfig && sharedCfg.EnableEndpointDiscovery != nil { + cfg.WithEndpointDiscovery(*sharedCfg.EnableEndpointDiscovery) + } + } + // Configure credentials if not already set if cfg.Credentials == credentials.AnonymousCredentials && userCfg.Credentials == nil { + + // inspect the profile to see if a credential source has been specified. + if envCfg.EnableSharedConfig && len(sharedCfg.AssumeRole.CredentialSource) > 0 { + + // if both credential_source and source_profile have been set, return an error + // as this is undefined behavior. + if len(sharedCfg.AssumeRole.SourceProfile) > 0 { + return ErrSharedConfigSourceCollision + } + + // valid credential source values + const ( + credSourceEc2Metadata = "Ec2InstanceMetadata" + credSourceEnvironment = "Environment" + credSourceECSContainer = "EcsContainer" + ) + + switch sharedCfg.AssumeRole.CredentialSource { + case credSourceEc2Metadata: + cfgCp := *cfg + p := defaults.RemoteCredProvider(cfgCp, handlers) + cfgCp.Credentials = credentials.NewCredentials(p) + + if len(sharedCfg.AssumeRole.MFASerial) > 0 && sessOpts.AssumeRoleTokenProvider == nil { + // AssumeRole Token provider is required if doing Assume Role + // with MFA. + return AssumeRoleTokenProviderNotSetError{} + } + + cfg.Credentials = assumeRoleCredentials(cfgCp, handlers, sharedCfg, sessOpts) + case credSourceEnvironment: + cfg.Credentials = credentials.NewStaticCredentialsFromCreds( + envCfg.Creds, + ) + case credSourceECSContainer: + if len(os.Getenv(shareddefaults.ECSCredsProviderEnvVar)) == 0 { + return ErrSharedConfigECSContainerEnvVarEmpty + } + + cfgCp := *cfg + p := defaults.RemoteCredProvider(cfgCp, handlers) + creds := credentials.NewCredentials(p) + + cfg.Credentials = creds + default: + return ErrSharedConfigInvalidCredSource + } + + return nil + } + if len(envCfg.Creds.AccessKeyID) > 0 { cfg.Credentials = credentials.NewStaticCredentialsFromCreds( envCfg.Creds, @@ -445,36 +523,22 @@ func mergeConfigSrcs(cfg, userCfg *aws.Config, envCfg envConfig, sharedCfg share cfgCp.Credentials = credentials.NewStaticCredentialsFromCreds( sharedCfg.AssumeRoleSource.Creds, ) + if len(sharedCfg.AssumeRole.MFASerial) > 0 && sessOpts.AssumeRoleTokenProvider == nil { // AssumeRole Token provider is required if doing Assume Role // with MFA. return AssumeRoleTokenProviderNotSetError{} } - cfg.Credentials = stscreds.NewCredentials( - &Session{ - Config: &cfgCp, - Handlers: handlers.Copy(), - }, - sharedCfg.AssumeRole.RoleARN, - func(opt *stscreds.AssumeRoleProvider) { - opt.RoleSessionName = sharedCfg.AssumeRole.RoleSessionName - - // Assume role with external ID - if len(sharedCfg.AssumeRole.ExternalID) > 0 { - opt.ExternalID = aws.String(sharedCfg.AssumeRole.ExternalID) - } - - // Assume role with MFA - if len(sharedCfg.AssumeRole.MFASerial) > 0 { - opt.SerialNumber = aws.String(sharedCfg.AssumeRole.MFASerial) - opt.TokenProvider = sessOpts.AssumeRoleTokenProvider - } - }, - ) + + cfg.Credentials = assumeRoleCredentials(cfgCp, handlers, sharedCfg, sessOpts) } else if len(sharedCfg.Creds.AccessKeyID) > 0 { cfg.Credentials = credentials.NewStaticCredentialsFromCreds( sharedCfg.Creds, ) + } else if len(sharedCfg.CredentialProcess) > 0 { + cfg.Credentials = processcreds.NewCredentials( + sharedCfg.CredentialProcess, + ) } else { // Fallback to default credentials provider, include mock errors // for the credential chain so user can identify why credentials @@ -493,6 +557,30 @@ func mergeConfigSrcs(cfg, userCfg *aws.Config, envCfg envConfig, sharedCfg share return nil } +func assumeRoleCredentials(cfg aws.Config, handlers request.Handlers, sharedCfg sharedConfig, sessOpts Options) *credentials.Credentials { + return stscreds.NewCredentials( + &Session{ + Config: &cfg, + Handlers: handlers.Copy(), + }, + sharedCfg.AssumeRole.RoleARN, + func(opt *stscreds.AssumeRoleProvider) { + opt.RoleSessionName = sharedCfg.AssumeRole.RoleSessionName + + // Assume role with external ID + if len(sharedCfg.AssumeRole.ExternalID) > 0 { + opt.ExternalID = aws.String(sharedCfg.AssumeRole.ExternalID) + } + + // Assume role with MFA + if len(sharedCfg.AssumeRole.MFASerial) > 0 { + opt.SerialNumber = aws.String(sharedCfg.AssumeRole.MFASerial) + opt.TokenProvider = sessOpts.AssumeRoleTokenProvider + } + }, + ) +} + // AssumeRoleTokenProviderNotSetError is an error returned when creating a session when the // MFAToken option is not set when shared config is configured load assume a // role with an MFA token. 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 09c8e5bc7a..7cb44021b3 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,11 +2,11 @@ package session import ( "fmt" - "io/ioutil" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/credentials" - "github.com/go-ini/ini" + + "github.com/aws/aws-sdk-go/internal/ini" ) const ( @@ -16,15 +16,21 @@ const ( sessionTokenKey = `aws_session_token` // optional // Assume Role Credentials group - roleArnKey = `role_arn` // group required - sourceProfileKey = `source_profile` // group required - externalIDKey = `external_id` // optional - mfaSerialKey = `mfa_serial` // optional - roleSessionNameKey = `role_session_name` // optional + roleArnKey = `role_arn` // group required + sourceProfileKey = `source_profile` // group required (or credential_source) + credentialSourceKey = `credential_source` // group required (or source_profile) + externalIDKey = `external_id` // optional + mfaSerialKey = `mfa_serial` // optional + roleSessionNameKey = `role_session_name` // optional // Additional Config fields regionKey = `region` + // endpoint discovery group + enableEndpointDiscoveryKey = `endpoint_discovery_enabled` // optional + // External Credential Process + credentialProcessKey = `credential_process` + // DefaultSharedConfigProfile is the default profile to be used when // loading configuration from the config files if another profile name // is not provided. @@ -32,11 +38,12 @@ const ( ) type assumeRoleConfig struct { - RoleARN string - SourceProfile string - ExternalID string - MFASerial string - RoleSessionName string + RoleARN string + SourceProfile string + CredentialSource string + ExternalID string + MFASerial string + RoleSessionName string } // sharedConfig represents the configuration fields of the SDK config files. @@ -55,16 +62,25 @@ type sharedConfig struct { AssumeRole assumeRoleConfig AssumeRoleSource *sharedConfig + // An external process to request credentials + CredentialProcess string + // Region is the region the SDK should use for looking up AWS service endpoints // and signing requests. // // region Region string + + // EnableEndpointDiscovery can be enabled in the shared config by setting + // endpoint_discovery_enabled to true + // + // endpoint_discovery_enabled = true + EnableEndpointDiscovery *bool } type sharedConfigFile struct { Filename string - IniData *ini.File + IniData ini.Sections } // loadSharedConfig retrieves the configuration from the list of files @@ -105,19 +121,16 @@ func loadSharedConfigIniFiles(filenames []string) ([]sharedConfigFile, error) { files := make([]sharedConfigFile, 0, len(filenames)) for _, filename := range filenames { - b, err := ioutil.ReadFile(filename) - if err != nil { + sections, err := ini.OpenFile(filename) + if aerr, ok := err.(awserr.Error); ok && aerr.Code() == ini.ErrCodeUnableToReadFile { // Skip files which can't be opened and read for whatever reason continue - } - - f, err := ini.Load(b) - if err != nil { + } else if err != nil { return nil, SharedConfigLoadError{Filename: filename, Err: err} } files = append(files, sharedConfigFile{ - Filename: filename, IniData: f, + Filename: filename, IniData: sections, }) } @@ -127,6 +140,13 @@ func loadSharedConfigIniFiles(filenames []string) ([]sharedConfigFile, error) { func (cfg *sharedConfig) setAssumeRoleSource(origProfile string, files []sharedConfigFile) error { var assumeRoleSrc sharedConfig + if len(cfg.AssumeRole.CredentialSource) > 0 { + // setAssumeRoleSource is only called when source_profile is found. + // If both source_profile and credential_source are set, then + // ErrSharedConfigSourceCollision will be returned + return ErrSharedConfigSourceCollision + } + // Multiple level assume role chains are not support if cfg.AssumeRole.SourceProfile == origProfile { assumeRoleSrc = *cfg @@ -171,45 +191,59 @@ func (cfg *sharedConfig) setFromIniFiles(profile string, files []sharedConfigFil // if a config file only includes aws_access_key_id but no aws_secret_access_key // the aws_access_key_id will be ignored. func (cfg *sharedConfig) setFromIniFile(profile string, file sharedConfigFile) error { - section, err := file.IniData.GetSection(profile) - if err != nil { + section, ok := file.IniData.GetSection(profile) + if !ok { // Fallback to to alternate profile name: profile - section, err = file.IniData.GetSection(fmt.Sprintf("profile %s", profile)) - if err != nil { - return SharedConfigProfileNotExistsError{Profile: profile, Err: err} + section, ok = file.IniData.GetSection(fmt.Sprintf("profile %s", profile)) + if !ok { + return SharedConfigProfileNotExistsError{Profile: profile, Err: nil} } } // Shared Credentials - akid := section.Key(accessKeyIDKey).String() - secret := section.Key(secretAccessKey).String() + akid := section.String(accessKeyIDKey) + secret := section.String(secretAccessKey) if len(akid) > 0 && len(secret) > 0 { cfg.Creds = credentials.Value{ AccessKeyID: akid, SecretAccessKey: secret, - SessionToken: section.Key(sessionTokenKey).String(), + SessionToken: section.String(sessionTokenKey), ProviderName: fmt.Sprintf("SharedConfigCredentials: %s", file.Filename), } } // Assume Role - roleArn := section.Key(roleArnKey).String() - srcProfile := section.Key(sourceProfileKey).String() - if len(roleArn) > 0 && len(srcProfile) > 0 { + roleArn := section.String(roleArnKey) + srcProfile := section.String(sourceProfileKey) + credentialSource := section.String(credentialSourceKey) + hasSource := len(srcProfile) > 0 || len(credentialSource) > 0 + if len(roleArn) > 0 && hasSource { cfg.AssumeRole = assumeRoleConfig{ - RoleARN: roleArn, - SourceProfile: srcProfile, - ExternalID: section.Key(externalIDKey).String(), - MFASerial: section.Key(mfaSerialKey).String(), - RoleSessionName: section.Key(roleSessionNameKey).String(), + RoleARN: roleArn, + SourceProfile: srcProfile, + CredentialSource: credentialSource, + ExternalID: section.String(externalIDKey), + MFASerial: section.String(mfaSerialKey), + RoleSessionName: section.String(roleSessionNameKey), } } + // `credential_process` + if credProc := section.String(credentialProcessKey); len(credProc) > 0 { + cfg.CredentialProcess = credProc + } + // Region - if v := section.Key(regionKey).String(); len(v) > 0 { + if v := section.String(regionKey); len(v) > 0 { cfg.Region = v } + // Endpoint discovery + if section.Has(enableEndpointDiscoveryKey) { + v := section.Bool(enableEndpointDiscoveryKey) + cfg.EnableEndpointDiscovery = &v + } + return nil } 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 5b52ab2215..523db79f8d 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 @@ -98,25 +98,25 @@ var ignoredHeaders = rules{ var requiredSignedHeaders = rules{ whitelist{ mapRule{ - "Cache-Control": struct{}{}, - "Content-Disposition": struct{}{}, - "Content-Encoding": struct{}{}, - "Content-Language": struct{}{}, - "Content-Md5": struct{}{}, - "Content-Type": struct{}{}, - "Expires": struct{}{}, - "If-Match": struct{}{}, - "If-Modified-Since": struct{}{}, - "If-None-Match": struct{}{}, - "If-Unmodified-Since": struct{}{}, - "Range": struct{}{}, - "X-Amz-Acl": struct{}{}, - "X-Amz-Copy-Source": struct{}{}, - "X-Amz-Copy-Source-If-Match": struct{}{}, - "X-Amz-Copy-Source-If-Modified-Since": struct{}{}, - "X-Amz-Copy-Source-If-None-Match": struct{}{}, - "X-Amz-Copy-Source-If-Unmodified-Since": struct{}{}, - "X-Amz-Copy-Source-Range": struct{}{}, + "Cache-Control": struct{}{}, + "Content-Disposition": struct{}{}, + "Content-Encoding": struct{}{}, + "Content-Language": struct{}{}, + "Content-Md5": struct{}{}, + "Content-Type": struct{}{}, + "Expires": struct{}{}, + "If-Match": struct{}{}, + "If-Modified-Since": struct{}{}, + "If-None-Match": struct{}{}, + "If-Unmodified-Since": struct{}{}, + "Range": struct{}{}, + "X-Amz-Acl": struct{}{}, + "X-Amz-Copy-Source": struct{}{}, + "X-Amz-Copy-Source-If-Match": struct{}{}, + "X-Amz-Copy-Source-If-Modified-Since": struct{}{}, + "X-Amz-Copy-Source-If-None-Match": struct{}{}, + "X-Amz-Copy-Source-If-Unmodified-Since": struct{}{}, + "X-Amz-Copy-Source-Range": struct{}{}, "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Algorithm": struct{}{}, "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key": struct{}{}, "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key-Md5": struct{}{}, @@ -134,6 +134,7 @@ var requiredSignedHeaders = rules{ "X-Amz-Server-Side-Encryption-Customer-Key": struct{}{}, "X-Amz-Server-Side-Encryption-Customer-Key-Md5": struct{}{}, "X-Amz-Storage-Class": struct{}{}, + "X-Amz-Tagging": struct{}{}, "X-Amz-Website-Redirect-Location": struct{}{}, "X-Amz-Content-Sha256": struct{}{}, }, @@ -181,7 +182,7 @@ type Signer struct { // http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html DisableURIPathEscaping bool - // Disales the automatical setting of the HTTP request's Body field with the + // Disables the automatical setting of the HTTP request's Body field with the // io.ReadSeeker passed in to the signer. This is useful if you're using a // custom wrapper around the body for the io.ReadSeeker and want to preserve // the Body value on the Request.Body. @@ -421,7 +422,7 @@ var SignRequestHandler = request.NamedHandler{ // If the credentials of the request's config are set to // credentials.AnonymousCredentials the request will not be signed. func SignSDKRequest(req *request.Request) { - signSDKRequestWithCurrTime(req, time.Now) + SignSDKRequestWithCurrentTime(req, time.Now) } // BuildNamedHandler will build a generic handler for signing. @@ -429,12 +430,15 @@ func BuildNamedHandler(name string, opts ...func(*Signer)) request.NamedHandler return request.NamedHandler{ Name: name, Fn: func(req *request.Request) { - signSDKRequestWithCurrTime(req, time.Now, opts...) + SignSDKRequestWithCurrentTime(req, time.Now, opts...) }, } } -func signSDKRequestWithCurrTime(req *request.Request, curTimeFn func() time.Time, opts ...func(*Signer)) { +// SignSDKRequestWithCurrentTime will sign the SDK's request using the time +// function passed in. Behaves the same as SignSDKRequest with the exception +// the request is signed with the value returned by the current time function. +func SignSDKRequestWithCurrentTime(req *request.Request, curTimeFn func() time.Time, opts ...func(*Signer)) { // If the request does not need to be signed ignore the signing of the // request if the AnonymousCredentials object is used. if req.Config.Credentials == credentials.AnonymousCredentials { @@ -470,13 +474,9 @@ func signSDKRequestWithCurrTime(req *request.Request, curTimeFn func() time.Time opt(v4) } - signingTime := req.Time - if !req.LastSignedAt.IsZero() { - signingTime = req.LastSignedAt - } - + curTime := curTimeFn() signedHeaders, err := v4.signWithBody(req.HTTPRequest, req.GetBody(), - name, region, req.ExpireTime, req.ExpireTime > 0, signingTime, + name, region, req.ExpireTime, req.ExpireTime > 0, curTime, ) if err != nil { req.Error = err @@ -485,7 +485,7 @@ func signSDKRequestWithCurrTime(req *request.Request, curTimeFn func() time.Time } req.SignedHeaderVals = signedHeaders - req.LastSignedAt = curTimeFn() + req.LastSignedAt = curTime } const logSignInfoMsg = `DEBUG: Request Signature: @@ -754,7 +754,7 @@ func makeSha256Reader(reader io.ReadSeeker) []byte { const doubleSpace = " " // stripExcessSpaces will rewrite the passed in slice's string values to not -// contain muliple side-by-side spaces. +// contain multiple side-by-side spaces. func stripExcessSpaces(vals []string) { var j, k, l, m, spaces int for i, str := range vals { 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 f98a90c797..f8869e4378 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.15.33" +const SDKVersion = "1.16.19" diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/ast.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/ast.go new file mode 100644 index 0000000000..e83a99886b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/ast.go @@ -0,0 +1,120 @@ +package ini + +// ASTKind represents different states in the parse table +// and the type of AST that is being constructed +type ASTKind int + +// ASTKind* is used in the parse table to transition between +// the different states +const ( + ASTKindNone = ASTKind(iota) + ASTKindStart + ASTKindExpr + ASTKindEqualExpr + ASTKindStatement + ASTKindSkipStatement + ASTKindExprStatement + ASTKindSectionStatement + ASTKindNestedSectionStatement + ASTKindCompletedNestedSectionStatement + ASTKindCommentStatement + ASTKindCompletedSectionStatement +) + +func (k ASTKind) String() string { + switch k { + case ASTKindNone: + return "none" + case ASTKindStart: + return "start" + case ASTKindExpr: + return "expr" + case ASTKindStatement: + return "stmt" + case ASTKindSectionStatement: + return "section_stmt" + case ASTKindExprStatement: + return "expr_stmt" + case ASTKindCommentStatement: + return "comment" + case ASTKindNestedSectionStatement: + return "nested_section_stmt" + case ASTKindCompletedSectionStatement: + return "completed_stmt" + case ASTKindSkipStatement: + return "skip" + default: + return "" + } +} + +// AST interface allows us to determine what kind of node we +// are on and casting may not need to be necessary. +// +// The root is always the first node in Children +type AST struct { + Kind ASTKind + Root Token + RootToken bool + Children []AST +} + +func newAST(kind ASTKind, root AST, children ...AST) AST { + return AST{ + Kind: kind, + Children: append([]AST{root}, children...), + } +} + +func newASTWithRootToken(kind ASTKind, root Token, children ...AST) AST { + return AST{ + Kind: kind, + Root: root, + RootToken: true, + Children: children, + } +} + +// AppendChild will append to the list of children an AST has. +func (a *AST) AppendChild(child AST) { + a.Children = append(a.Children, child) +} + +// GetRoot will return the root AST which can be the first entry +// in the children list or a token. +func (a *AST) GetRoot() AST { + if a.RootToken { + return *a + } + + if len(a.Children) == 0 { + return AST{} + } + + return a.Children[0] +} + +// GetChildren will return the current AST's list of children +func (a *AST) GetChildren() []AST { + if len(a.Children) == 0 { + return []AST{} + } + + if a.RootToken { + return a.Children + } + + return a.Children[1:] +} + +// SetChildren will set and override all children of the AST. +func (a *AST) SetChildren(children []AST) { + if a.RootToken { + a.Children = children + } else { + a.Children = append(a.Children[:1], children...) + } +} + +// Start is used to indicate the starting state of the parse table. +var Start = newAST(ASTKindStart, AST{}) diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/comma_token.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/comma_token.go new file mode 100644 index 0000000000..0895d53cbe --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/comma_token.go @@ -0,0 +1,11 @@ +package ini + +var commaRunes = []rune(",") + +func isComma(b rune) bool { + return b == ',' +} + +func newCommaToken() Token { + return newToken(TokenComma, commaRunes, NoneType) +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/comment_token.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/comment_token.go new file mode 100644 index 0000000000..0b76999ba1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/comment_token.go @@ -0,0 +1,35 @@ +package ini + +// isComment will return whether or not the next byte(s) is a +// comment. +func isComment(b []rune) bool { + if len(b) == 0 { + return false + } + + switch b[0] { + case ';': + return true + case '#': + return true + } + + return false +} + +// newCommentToken will create a comment token and +// return how many bytes were read. +func newCommentToken(b []rune) (Token, int, error) { + i := 0 + for ; i < len(b); i++ { + if b[i] == '\n' { + break + } + + if len(b)-i > 2 && b[i] == '\r' && b[i+1] == '\n' { + break + } + } + + return newToken(TokenComment, b[:i], NoneType), i, nil +} 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 new file mode 100644 index 0000000000..25ce0fe134 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/doc.go @@ -0,0 +1,29 @@ +// Package ini is an LL(1) parser for configuration files. +// +// Example: +// sections, err := ini.OpenFile("/path/to/file") +// if err != nil { +// panic(err) +// } +// +// profile := "foo" +// section, ok := sections.GetSection(profile) +// if !ok { +// fmt.Printf("section %q could not be found", profile) +// } +// +// Below is the BNF that describes this parser +// Grammar: +// stmt -> value stmt' +// stmt' -> epsilon | op stmt +// value -> number | string | boolean | quoted_string +// +// section -> [ section' +// section' -> value section_close +// section_close -> ] +// +// 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/empty_token.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/empty_token.go new file mode 100644 index 0000000000..04345a54c2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/empty_token.go @@ -0,0 +1,4 @@ +package ini + +// emptyToken is used to satisfy the Token interface +var emptyToken = newToken(TokenNone, []rune{}, NoneType) diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/expression.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/expression.go new file mode 100644 index 0000000000..91ba2a59dd --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/expression.go @@ -0,0 +1,24 @@ +package ini + +// newExpression will return an expression AST. +// Expr represents an expression +// +// grammar: +// expr -> string | number +func newExpression(tok Token) AST { + return newASTWithRootToken(ASTKindExpr, tok) +} + +func newEqualExpr(left AST, tok Token) AST { + return newASTWithRootToken(ASTKindEqualExpr, tok, left) +} + +// EqualExprKey will return a LHS value in the equal expr +func EqualExprKey(ast AST) string { + children := ast.GetChildren() + if len(children) == 0 || ast.Kind != ASTKindEqualExpr { + return "" + } + + return string(children[0].Root.Raw()) +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/fuzz.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/fuzz.go new file mode 100644 index 0000000000..8d462f77e2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/fuzz.go @@ -0,0 +1,17 @@ +// +build gofuzz + +package ini + +import ( + "bytes" +) + +func Fuzz(data []byte) int { + b := bytes.NewReader(data) + + if _, err := Parse(b); err != nil { + return 0 + } + + return 1 +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/ini.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/ini.go new file mode 100644 index 0000000000..3b0ca7afe3 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/ini.go @@ -0,0 +1,51 @@ +package ini + +import ( + "io" + "os" + + "github.com/aws/aws-sdk-go/aws/awserr" +) + +// OpenFile takes a path to a given file, and will open and parse +// that file. +func OpenFile(path string) (Sections, error) { + f, err := os.Open(path) + if err != nil { + return Sections{}, awserr.New(ErrCodeUnableToReadFile, "unable to open file", err) + } + defer f.Close() + + return Parse(f) +} + +// Parse will parse the given file using the shared config +// visitor. +func Parse(f io.Reader) (Sections, error) { + tree, err := ParseAST(f) + if err != nil { + return Sections{}, err + } + + v := NewDefaultVisitor() + if err = Walk(tree, v); err != nil { + return Sections{}, err + } + + return v.Sections, nil +} + +// ParseBytes will parse the given bytes and return the parsed sections. +func ParseBytes(b []byte) (Sections, error) { + tree, err := ParseASTBytes(b) + if err != nil { + return Sections{}, err + } + + v := NewDefaultVisitor() + if err = Walk(tree, v); err != nil { + return Sections{}, err + } + + return v.Sections, nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_lexer.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_lexer.go new file mode 100644 index 0000000000..582c024ad1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_lexer.go @@ -0,0 +1,165 @@ +package ini + +import ( + "bytes" + "io" + "io/ioutil" + + "github.com/aws/aws-sdk-go/aws/awserr" +) + +const ( + // ErrCodeUnableToReadFile is used when a file is failed to be + // opened or read from. + ErrCodeUnableToReadFile = "FailedRead" +) + +// TokenType represents the various different tokens types +type TokenType int + +func (t TokenType) String() string { + switch t { + case TokenNone: + return "none" + case TokenLit: + return "literal" + case TokenSep: + return "sep" + case TokenOp: + return "op" + case TokenWS: + return "ws" + case TokenNL: + return "newline" + case TokenComment: + return "comment" + case TokenComma: + return "comma" + default: + return "" + } +} + +// TokenType enums +const ( + TokenNone = TokenType(iota) + TokenLit + TokenSep + TokenComma + TokenOp + TokenWS + TokenNL + TokenComment +) + +type iniLexer struct{} + +// Tokenize will return a list of tokens during lexical analysis of the +// io.Reader. +func (l *iniLexer) Tokenize(r io.Reader) ([]Token, error) { + b, err := ioutil.ReadAll(r) + if err != nil { + return nil, awserr.New(ErrCodeUnableToReadFile, "unable to read file", err) + } + + return l.tokenize(b) +} + +func (l *iniLexer) tokenize(b []byte) ([]Token, error) { + runes := bytes.Runes(b) + var err error + n := 0 + tokenAmount := countTokens(runes) + tokens := make([]Token, tokenAmount) + count := 0 + + for len(runes) > 0 && count < tokenAmount { + switch { + case isWhitespace(runes[0]): + tokens[count], n, err = newWSToken(runes) + case isComma(runes[0]): + tokens[count], n = newCommaToken(), 1 + case isComment(runes): + tokens[count], n, err = newCommentToken(runes) + case isNewline(runes): + tokens[count], n, err = newNewlineToken(runes) + case isSep(runes): + tokens[count], n, err = newSepToken(runes) + case isOp(runes): + tokens[count], n, err = newOpToken(runes) + default: + tokens[count], n, err = newLitToken(runes) + } + + if err != nil { + return nil, err + } + + count++ + + runes = runes[n:] + } + + return tokens[:count], nil +} + +func countTokens(runes []rune) int { + count, n := 0, 0 + var err error + + for len(runes) > 0 { + switch { + case isWhitespace(runes[0]): + _, n, err = newWSToken(runes) + case isComma(runes[0]): + _, n = newCommaToken(), 1 + case isComment(runes): + _, n, err = newCommentToken(runes) + case isNewline(runes): + _, n, err = newNewlineToken(runes) + case isSep(runes): + _, n, err = newSepToken(runes) + case isOp(runes): + _, n, err = newOpToken(runes) + default: + _, n, err = newLitToken(runes) + } + + if err != nil { + return 0 + } + + count++ + runes = runes[n:] + } + + return count + 1 +} + +// Token indicates a metadata about a given value. +type Token struct { + t TokenType + ValueType ValueType + base int + raw []rune +} + +var emptyValue = Value{} + +func newToken(t TokenType, raw []rune, v ValueType) Token { + return Token{ + t: t, + raw: raw, + ValueType: v, + } +} + +// Raw return the raw runes that were consumed +func (tok Token) Raw() []rune { + return tok.raw +} + +// Type returns the token type +func (tok Token) Type() TokenType { + return tok.t +} 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 new file mode 100644 index 0000000000..f99703372c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_parser.go @@ -0,0 +1,347 @@ +package ini + +import ( + "fmt" + "io" +) + +// State enums for the parse table +const ( + InvalidState = iota + // stmt -> value stmt' + StatementState + // stmt' -> MarkComplete | op stmt + StatementPrimeState + // value -> number | string | boolean | quoted_string + ValueState + // section -> [ section' + OpenScopeState + // section' -> value section_close + SectionState + // section_close -> ] + CloseScopeState + // SkipState will skip (NL WS)+ + SkipState + // SkipTokenState will skip any token and push the previous + // state onto the stack. + SkipTokenState + // comment -> # comment' | ; comment' + // comment' -> MarkComplete | value + CommentState + // MarkComplete state will complete statements and move that + // to the completed AST list + MarkCompleteState + // TerminalState signifies that the tokens have been fully parsed + TerminalState +) + +// parseTable is a state machine to dictate the grammar above. +var parseTable = map[ASTKind]map[TokenType]int{ + ASTKindStart: map[TokenType]int{ + TokenLit: StatementState, + TokenSep: OpenScopeState, + TokenWS: SkipTokenState, + TokenNL: SkipTokenState, + TokenComment: CommentState, + TokenNone: TerminalState, + }, + ASTKindCommentStatement: map[TokenType]int{ + TokenLit: StatementState, + TokenSep: OpenScopeState, + TokenWS: SkipTokenState, + TokenNL: SkipTokenState, + TokenComment: CommentState, + TokenNone: MarkCompleteState, + }, + ASTKindExpr: map[TokenType]int{ + TokenOp: StatementPrimeState, + TokenLit: ValueState, + TokenSep: OpenScopeState, + TokenWS: ValueState, + TokenNL: SkipState, + TokenComment: CommentState, + TokenNone: MarkCompleteState, + }, + ASTKindEqualExpr: map[TokenType]int{ + TokenLit: ValueState, + TokenWS: SkipTokenState, + TokenNL: SkipState, + }, + ASTKindStatement: map[TokenType]int{ + TokenLit: SectionState, + TokenSep: CloseScopeState, + TokenWS: SkipTokenState, + TokenNL: SkipTokenState, + TokenComment: CommentState, + TokenNone: MarkCompleteState, + }, + ASTKindExprStatement: map[TokenType]int{ + TokenLit: ValueState, + TokenSep: OpenScopeState, + TokenOp: ValueState, + TokenWS: ValueState, + TokenNL: MarkCompleteState, + TokenComment: CommentState, + TokenNone: TerminalState, + TokenComma: SkipState, + }, + ASTKindSectionStatement: map[TokenType]int{ + TokenLit: SectionState, + TokenOp: SectionState, + TokenSep: CloseScopeState, + TokenWS: SectionState, + TokenNL: SkipTokenState, + }, + ASTKindCompletedSectionStatement: map[TokenType]int{ + TokenWS: SkipTokenState, + TokenNL: SkipTokenState, + TokenLit: StatementState, + TokenSep: OpenScopeState, + TokenComment: CommentState, + TokenNone: MarkCompleteState, + }, + ASTKindSkipStatement: map[TokenType]int{ + TokenLit: StatementState, + TokenSep: OpenScopeState, + TokenWS: SkipTokenState, + TokenNL: SkipTokenState, + TokenComment: CommentState, + TokenNone: TerminalState, + }, +} + +// ParseAST will parse input from an io.Reader using +// an LL(1) parser. +func ParseAST(r io.Reader) ([]AST, error) { + lexer := iniLexer{} + tokens, err := lexer.Tokenize(r) + if err != nil { + return []AST{}, err + } + + return parse(tokens) +} + +// ParseASTBytes will parse input from a byte slice using +// an LL(1) parser. +func ParseASTBytes(b []byte) ([]AST, error) { + lexer := iniLexer{} + tokens, err := lexer.tokenize(b) + if err != nil { + return []AST{}, err + } + + return parse(tokens) +} + +func parse(tokens []Token) ([]AST, error) { + start := Start + stack := newParseStack(3, len(tokens)) + + stack.Push(start) + s := newSkipper() + +loop: + for stack.Len() > 0 { + k := stack.Pop() + + var tok Token + if len(tokens) == 0 { + // this occurs when all the tokens have been processed + // but reduction of what's left on the stack needs to + // occur. + tok = emptyToken + } else { + tok = tokens[0] + } + + step := parseTable[k.Kind][tok.Type()] + if s.ShouldSkip(tok) { + // being in a skip state with no tokens will break out of + // the parse loop since there is nothing left to process. + if len(tokens) == 0 { + break loop + } + + step = SkipTokenState + } + + switch step { + case TerminalState: + // Finished parsing. Push what should be the last + // statement to the stack. If there is anything left + // on the stack, an error in parsing has occurred. + if k.Kind != ASTKindStart { + stack.MarkComplete(k) + } + break loop + case SkipTokenState: + // When skipping a token, the previous state was popped off the stack. + // To maintain the correct state, the previous state will be pushed + // onto the stack. + stack.Push(k) + case StatementState: + if k.Kind != ASTKindStart { + stack.MarkComplete(k) + } + expr := newExpression(tok) + stack.Push(expr) + case StatementPrimeState: + if tok.Type() != TokenOp { + stack.MarkComplete(k) + continue + } + + if k.Kind != ASTKindExpr { + return nil, NewParseError( + fmt.Sprintf("invalid expression: expected Expr type, but found %T type", k), + ) + } + + k = trimSpaces(k) + expr := newEqualExpr(k, tok) + stack.Push(expr) + 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: + // assiging a value to some key + k.AppendChild(newExpression(tok)) + stack.Push(newExprStatement(k)) + case ASTKindExpr: + k.Root.raw = append(k.Root.raw, tok.Raw()...) + stack.Push(k) + case ASTKindExprStatement: + root := k.GetRoot() + children := root.GetChildren() + if len(children) == 0 { + return nil, NewParseError( + fmt.Sprintf("invalid expression: AST contains no children %s", k.Kind), + ) + } + + rhs := children[len(children)-1] + + if rhs.Root.ValueType != QuotedStringType { + rhs.Root.ValueType = StringType + rhs.Root.raw = append(rhs.Root.raw, tok.Raw()...) + + } + + children[len(children)-1] = rhs + k.SetChildren(children) + + stack.Push(k) + } + case OpenScopeState: + if !runeCompare(tok.Raw(), openBrace) { + return nil, NewParseError("expected '['") + } + + stmt := newStatement() + stack.Push(stmt) + case CloseScopeState: + if !runeCompare(tok.Raw(), closeBrace) { + return nil, NewParseError("expected ']'") + } + + k = trimSpaces(k) + stack.Push(newCompletedSectionStatement(k)) + case SectionState: + var stmt AST + + switch k.Kind { + case ASTKindStatement: + // If there are multiple literals inside of a scope declaration, + // then the current token's raw value will be appended to the Name. + // + // This handles cases like [ profile default ] + // + // k will represent a SectionStatement with the children representing + // the label of the section + stmt = newSectionStatement(tok) + case ASTKindSectionStatement: + k.Root.raw = append(k.Root.raw, tok.Raw()...) + stmt = k + default: + return nil, NewParseError( + fmt.Sprintf("invalid statement: expected statement: %v", k.Kind), + ) + } + + stack.Push(stmt) + case MarkCompleteState: + if k.Kind != ASTKindStart { + stack.MarkComplete(k) + } + + if stack.Len() == 0 { + stack.Push(start) + } + case SkipState: + stack.Push(newSkipStatement(k)) + s.Skip() + case CommentState: + if k.Kind == ASTKindStart { + stack.Push(k) + } else { + stack.MarkComplete(k) + } + + stmt := newCommentStatement(tok) + stack.Push(stmt) + default: + return nil, NewParseError(fmt.Sprintf("invalid state with ASTKind %v and TokenType %v", k, tok)) + } + + if len(tokens) > 0 { + tokens = tokens[1:] + } + } + + // this occurs when a statement has not been completed + if stack.top > 1 { + return nil, NewParseError(fmt.Sprintf("incomplete expression: %v", stack.container)) + } + + // returns a sublist which excludes the start symbol + return stack.List(), nil +} + +// trimSpaces will trim spaces on the left and right hand side of +// the literal. +func trimSpaces(k AST) AST { + // trim left hand side of spaces + for i := 0; i < len(k.Root.raw); i++ { + if !isWhitespace(k.Root.raw[i]) { + break + } + + k.Root.raw = k.Root.raw[1:] + i-- + } + + // trim right hand side of spaces + for i := len(k.Root.raw) - 1; i >= 0; i-- { + if !isWhitespace(k.Root.raw[i]) { + break + } + + k.Root.raw = k.Root.raw[:len(k.Root.raw)-1] + } + + return k +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/literal_tokens.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/literal_tokens.go new file mode 100644 index 0000000000..24df543d38 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/literal_tokens.go @@ -0,0 +1,324 @@ +package ini + +import ( + "fmt" + "strconv" + "strings" +) + +var ( + runesTrue = []rune("true") + runesFalse = []rune("false") +) + +var literalValues = [][]rune{ + runesTrue, + runesFalse, +} + +func isBoolValue(b []rune) bool { + for _, lv := range literalValues { + if isLitValue(lv, b) { + return true + } + } + return false +} + +func isLitValue(want, have []rune) bool { + if len(have) < len(want) { + return false + } + + for i := 0; i < len(want); i++ { + if want[i] != have[i] { + return false + } + } + + return true +} + +// isNumberValue will return whether not the leading characters in +// a byte slice is a number. A number is delimited by whitespace or +// the newline token. +// +// A number is defined to be in a binary, octal, decimal (int | float), hex format, +// or in scientific notation. +func isNumberValue(b []rune) bool { + negativeIndex := 0 + helper := numberHelper{} + needDigit := false + + for i := 0; i < len(b); i++ { + negativeIndex++ + + switch b[i] { + case '-': + if helper.IsNegative() || negativeIndex != 1 { + return false + } + helper.Determine(b[i]) + needDigit = true + continue + case 'e', 'E': + if err := helper.Determine(b[i]); err != nil { + return false + } + negativeIndex = 0 + needDigit = true + continue + case 'b': + if helper.numberFormat == hex { + break + } + fallthrough + case 'o', 'x': + needDigit = true + if i == 0 { + return false + } + + fallthrough + case '.': + if err := helper.Determine(b[i]); err != nil { + return false + } + needDigit = true + continue + } + + if i > 0 && (isNewline(b[i:]) || isWhitespace(b[i])) { + return !needDigit + } + + if !helper.CorrectByte(b[i]) { + return false + } + needDigit = false + } + + return !needDigit +} + +func isValid(b []rune) (bool, int, error) { + if len(b) == 0 { + // TODO: should probably return an error + return false, 0, nil + } + + return isValidRune(b[0]), 1, nil +} + +func isValidRune(r rune) bool { + return r != ':' && r != '=' && r != '[' && r != ']' && r != ' ' && r != '\n' +} + +// ValueType is an enum that will signify what type +// the Value is +type ValueType int + +func (v ValueType) String() string { + switch v { + case NoneType: + return "NONE" + case DecimalType: + return "FLOAT" + case IntegerType: + return "INT" + case StringType: + return "STRING" + case BoolType: + return "BOOL" + } + + return "" +} + +// ValueType enums +const ( + NoneType = ValueType(iota) + DecimalType + IntegerType + StringType + QuotedStringType + BoolType +) + +// Value is a union container +type Value struct { + Type ValueType + raw []rune + + integer int64 + decimal float64 + boolean bool + str string +} + +func newValue(t ValueType, base int, raw []rune) (Value, error) { + v := Value{ + Type: t, + raw: raw, + } + var err error + + switch t { + case DecimalType: + v.decimal, err = strconv.ParseFloat(string(raw), 64) + case IntegerType: + if base != 10 { + raw = raw[2:] + } + + v.integer, err = strconv.ParseInt(string(raw), base, 64) + case StringType: + v.str = string(raw) + case QuotedStringType: + v.str = string(raw[1 : len(raw)-1]) + case BoolType: + v.boolean = runeCompare(v.raw, runesTrue) + } + + // issue 2253 + // + // if the value trying to be parsed is too large, then we will use + // the 'StringType' and raw value instead. + if nerr, ok := err.(*strconv.NumError); ok && nerr.Err == strconv.ErrRange { + v.Type = StringType + v.str = string(raw) + err = nil + } + + return v, err +} + +// Append will append values and change the type to a string +// type. +func (v *Value) Append(tok Token) { + r := tok.Raw() + if v.Type != QuotedStringType { + v.Type = StringType + r = tok.raw[1 : len(tok.raw)-1] + } + if tok.Type() != TokenLit { + v.raw = append(v.raw, tok.Raw()...) + } else { + v.raw = append(v.raw, r...) + } +} + +func (v Value) String() string { + switch v.Type { + case DecimalType: + return fmt.Sprintf("decimal: %f", v.decimal) + case IntegerType: + return fmt.Sprintf("integer: %d", v.integer) + case StringType: + return fmt.Sprintf("string: %s", string(v.raw)) + case QuotedStringType: + return fmt.Sprintf("quoted string: %s", string(v.raw)) + case BoolType: + return fmt.Sprintf("bool: %t", v.boolean) + default: + return "union not set" + } +} + +func newLitToken(b []rune) (Token, int, error) { + n := 0 + var err error + + token := Token{} + if b[0] == '"' { + n, err = getStringValue(b) + if err != nil { + return token, n, err + } + + token = newToken(TokenLit, b[:n], QuotedStringType) + } else if isNumberValue(b) { + var base int + base, n, err = getNumericalValue(b) + if err != nil { + return token, 0, err + } + + value := b[:n] + vType := IntegerType + if contains(value, '.') || hasExponent(value) { + vType = DecimalType + } + token = newToken(TokenLit, value, vType) + token.base = base + } else if isBoolValue(b) { + n, err = getBoolValue(b) + + token = newToken(TokenLit, b[:n], BoolType) + } else { + n, err = getValue(b) + token = newToken(TokenLit, b[:n], StringType) + } + + return token, n, err +} + +// IntValue returns an integer value +func (v Value) IntValue() int64 { + return v.integer +} + +// FloatValue returns a float value +func (v Value) FloatValue() float64 { + return v.decimal +} + +// BoolValue returns a bool value +func (v Value) BoolValue() bool { + return v.boolean +} + +func isTrimmable(r rune) bool { + switch r { + case '\n', ' ': + return true + } + return false +} + +// StringValue returns the string value +func (v Value) StringValue() string { + switch v.Type { + case StringType: + return strings.TrimFunc(string(v.raw), isTrimmable) + case QuotedStringType: + // preserve all characters in the quotes + return string(removeEscapedCharacters(v.raw[1 : len(v.raw)-1])) + default: + return strings.TrimFunc(string(v.raw), isTrimmable) + } +} + +func contains(runes []rune, c rune) bool { + for i := 0; i < len(runes); i++ { + if runes[i] == c { + return true + } + } + + return false +} + +func runeCompare(v1 []rune, v2 []rune) bool { + if len(v1) != len(v2) { + return false + } + + for i := 0; i < len(v1); i++ { + if v1[i] != v2[i] { + return false + } + } + + return true +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/newline_token.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/newline_token.go new file mode 100644 index 0000000000..e52ac399f1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/newline_token.go @@ -0,0 +1,30 @@ +package ini + +func isNewline(b []rune) bool { + if len(b) == 0 { + return false + } + + if b[0] == '\n' { + return true + } + + if len(b) < 2 { + return false + } + + return b[0] == '\r' && b[1] == '\n' +} + +func newNewlineToken(b []rune) (Token, int, error) { + i := 1 + if b[0] == '\r' && isNewline(b[1:]) { + i++ + } + + if !isNewline([]rune(b[:i])) { + return emptyToken, 0, NewParseError("invalid new line token") + } + + return newToken(TokenNL, b[:i], NoneType), i, nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/number_helper.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/number_helper.go new file mode 100644 index 0000000000..a45c0bc566 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/number_helper.go @@ -0,0 +1,152 @@ +package ini + +import ( + "bytes" + "fmt" + "strconv" +) + +const ( + none = numberFormat(iota) + binary + octal + decimal + hex + exponent +) + +type numberFormat int + +// numberHelper is used to dictate what format a number is in +// and what to do for negative values. Since -1e-4 is a valid +// number, we cannot just simply check for duplicate negatives. +type numberHelper struct { + numberFormat numberFormat + + negative bool + negativeExponent bool +} + +func (b numberHelper) Exists() bool { + return b.numberFormat != none +} + +func (b numberHelper) IsNegative() bool { + return b.negative || b.negativeExponent +} + +func (b *numberHelper) Determine(c rune) error { + if b.Exists() { + return NewParseError(fmt.Sprintf("multiple number formats: 0%v", string(c))) + } + + switch c { + case 'b': + b.numberFormat = binary + case 'o': + b.numberFormat = octal + case 'x': + b.numberFormat = hex + case 'e', 'E': + b.numberFormat = exponent + case '-': + if b.numberFormat != exponent { + b.negative = true + } else { + b.negativeExponent = true + } + case '.': + b.numberFormat = decimal + default: + return NewParseError(fmt.Sprintf("invalid number character: %v", string(c))) + } + + return nil +} + +func (b numberHelper) CorrectByte(c rune) bool { + switch { + case b.numberFormat == binary: + if !isBinaryByte(c) { + return false + } + case b.numberFormat == octal: + if !isOctalByte(c) { + return false + } + case b.numberFormat == hex: + if !isHexByte(c) { + return false + } + case b.numberFormat == decimal: + if !isDigit(c) { + return false + } + case b.numberFormat == exponent: + if !isDigit(c) { + return false + } + case b.negativeExponent: + if !isDigit(c) { + return false + } + case b.negative: + if !isDigit(c) { + return false + } + default: + if !isDigit(c) { + return false + } + } + + return true +} + +func (b numberHelper) Base() int { + switch b.numberFormat { + case binary: + return 2 + case octal: + return 8 + case hex: + return 16 + default: + return 10 + } +} + +func (b numberHelper) String() string { + buf := bytes.Buffer{} + i := 0 + + switch b.numberFormat { + case binary: + i++ + buf.WriteString(strconv.Itoa(i) + ": binary format\n") + case octal: + i++ + buf.WriteString(strconv.Itoa(i) + ": octal format\n") + case hex: + i++ + buf.WriteString(strconv.Itoa(i) + ": hex format\n") + case exponent: + i++ + buf.WriteString(strconv.Itoa(i) + ": exponent format\n") + default: + i++ + buf.WriteString(strconv.Itoa(i) + ": integer format\n") + } + + if b.negative { + i++ + buf.WriteString(strconv.Itoa(i) + ": negative format\n") + } + + if b.negativeExponent { + i++ + buf.WriteString(strconv.Itoa(i) + ": negative exponent format\n") + } + + return buf.String() +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/op_tokens.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/op_tokens.go new file mode 100644 index 0000000000..8a84c7cbe0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/op_tokens.go @@ -0,0 +1,39 @@ +package ini + +import ( + "fmt" +) + +var ( + equalOp = []rune("=") + equalColonOp = []rune(":") +) + +func isOp(b []rune) bool { + if len(b) == 0 { + return false + } + + switch b[0] { + case '=': + return true + case ':': + return true + default: + return false + } +} + +func newOpToken(b []rune) (Token, int, error) { + tok := Token{} + + switch b[0] { + case '=': + tok = newToken(TokenOp, equalOp, NoneType) + case ':': + tok = newToken(TokenOp, equalColonOp, NoneType) + default: + return tok, 0, NewParseError(fmt.Sprintf("unexpected op type, %v", b[0])) + } + return tok, 1, nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/parse_error.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/parse_error.go new file mode 100644 index 0000000000..4572870193 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/parse_error.go @@ -0,0 +1,43 @@ +package ini + +import "fmt" + +const ( + // ErrCodeParseError is returned when a parsing error + // has occurred. + ErrCodeParseError = "INIParseError" +) + +// ParseError is an error which is returned during any part of +// the parsing process. +type ParseError struct { + msg string +} + +// NewParseError will return a new ParseError where message +// is the description of the error. +func NewParseError(message string) *ParseError { + return &ParseError{ + msg: message, + } +} + +// Code will return the ErrCodeParseError +func (err *ParseError) Code() string { + return ErrCodeParseError +} + +// Message returns the error's message +func (err *ParseError) Message() string { + return err.msg +} + +// OrigError return nothing since there will never be any +// original error. +func (err *ParseError) OrigError() error { + return nil +} + +func (err *ParseError) Error() string { + return fmt.Sprintf("%s: %s", err.Code(), err.Message()) +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/parse_stack.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/parse_stack.go new file mode 100644 index 0000000000..7f01cf7c70 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/parse_stack.go @@ -0,0 +1,60 @@ +package ini + +import ( + "bytes" + "fmt" +) + +// ParseStack is a stack that contains a container, the stack portion, +// and the list which is the list of ASTs that have been successfully +// parsed. +type ParseStack struct { + top int + container []AST + list []AST + index int +} + +func newParseStack(sizeContainer, sizeList int) ParseStack { + return ParseStack{ + container: make([]AST, sizeContainer), + list: make([]AST, sizeList), + } +} + +// Pop will return and truncate the last container element. +func (s *ParseStack) Pop() AST { + s.top-- + return s.container[s.top] +} + +// Push will add the new AST to the container +func (s *ParseStack) Push(ast AST) { + s.container[s.top] = ast + s.top++ +} + +// MarkComplete will append the AST to the list of completed statements +func (s *ParseStack) MarkComplete(ast AST) { + s.list[s.index] = ast + s.index++ +} + +// List will return the completed statements +func (s ParseStack) List() []AST { + return s.list[:s.index] +} + +// Len will return the length of the container +func (s *ParseStack) Len() int { + return s.top +} + +func (s ParseStack) String() string { + buf := bytes.Buffer{} + for i, node := range s.list { + buf.WriteString(fmt.Sprintf("%d: %v\n", i+1, node)) + } + + return buf.String() +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/sep_tokens.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/sep_tokens.go new file mode 100644 index 0000000000..f82095ba25 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/sep_tokens.go @@ -0,0 +1,41 @@ +package ini + +import ( + "fmt" +) + +var ( + emptyRunes = []rune{} +) + +func isSep(b []rune) bool { + if len(b) == 0 { + return false + } + + switch b[0] { + case '[', ']': + return true + default: + return false + } +} + +var ( + openBrace = []rune("[") + closeBrace = []rune("]") +) + +func newSepToken(b []rune) (Token, int, error) { + tok := Token{} + + switch b[0] { + case '[': + tok = newToken(TokenSep, openBrace, NoneType) + case ']': + tok = newToken(TokenSep, closeBrace, NoneType) + default: + return tok, 0, NewParseError(fmt.Sprintf("unexpected sep type, %v", b[0])) + } + return tok, 1, nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/skipper.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/skipper.go new file mode 100644 index 0000000000..6bb6964475 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/skipper.go @@ -0,0 +1,45 @@ +package ini + +// skipper is used to skip certain blocks of an ini file. +// Currently skipper is used to skip nested blocks of ini +// files. See example below +// +// [ foo ] +// nested = ; this section will be skipped +// a=b +// c=d +// bar=baz ; this will be included +type skipper struct { + shouldSkip bool + TokenSet bool + prevTok Token +} + +func newSkipper() skipper { + return skipper{ + prevTok: emptyToken, + } +} + +func (s *skipper) ShouldSkip(tok Token) bool { + if s.shouldSkip && + s.prevTok.Type() == TokenNL && + tok.Type() != TokenWS { + + s.Continue() + return false + } + s.prevTok = tok + + return s.shouldSkip +} + +func (s *skipper) Skip() { + s.shouldSkip = true + s.prevTok = emptyToken +} + +func (s *skipper) Continue() { + s.shouldSkip = false + s.prevTok = emptyToken +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/statement.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/statement.go new file mode 100644 index 0000000000..18f3fe8931 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/statement.go @@ -0,0 +1,35 @@ +package ini + +// Statement is an empty AST mostly used for transitioning states. +func newStatement() AST { + return newAST(ASTKindStatement, AST{}) +} + +// SectionStatement represents a section AST +func newSectionStatement(tok Token) AST { + return newASTWithRootToken(ASTKindSectionStatement, tok) +} + +// ExprStatement represents a completed expression AST +func newExprStatement(ast AST) AST { + return newAST(ASTKindExprStatement, ast) +} + +// CommentStatement represents a comment in the ini definition. +// +// grammar: +// comment -> #comment' | ;comment' +// comment' -> epsilon | value +func newCommentStatement(tok Token) AST { + return newAST(ASTKindCommentStatement, newExpression(tok)) +} + +// CompletedSectionStatement represents a completed section +func newCompletedSectionStatement(ast AST) AST { + return newAST(ASTKindCompletedSectionStatement, ast) +} + +// SkipStatement is used to skip whole statements +func newSkipStatement(ast AST) AST { + return newAST(ASTKindSkipStatement, ast) +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/value_util.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/value_util.go new file mode 100644 index 0000000000..305999d29b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/value_util.go @@ -0,0 +1,284 @@ +package ini + +import ( + "fmt" +) + +// getStringValue will return a quoted string and the amount +// of bytes read +// +// an error will be returned if the string is not properly formatted +func getStringValue(b []rune) (int, error) { + if b[0] != '"' { + return 0, NewParseError("strings must start with '\"'") + } + + endQuote := false + i := 1 + + for ; i < len(b) && !endQuote; i++ { + if escaped := isEscaped(b[:i], b[i]); b[i] == '"' && !escaped { + endQuote = true + break + } else if escaped { + /*c, err := getEscapedByte(b[i]) + if err != nil { + return 0, err + } + + b[i-1] = c + b = append(b[:i], b[i+1:]...) + i--*/ + + continue + } + } + + if !endQuote { + return 0, NewParseError("missing '\"' in string value") + } + + return i + 1, nil +} + +// getBoolValue will return a boolean and the amount +// of bytes read +// +// an error will be returned if the boolean is not of a correct +// value +func getBoolValue(b []rune) (int, error) { + if len(b) < 4 { + return 0, NewParseError("invalid boolean value") + } + + n := 0 + for _, lv := range literalValues { + if len(lv) > len(b) { + continue + } + + if isLitValue(lv, b) { + n = len(lv) + } + } + + if n == 0 { + return 0, NewParseError("invalid boolean value") + } + + return n, nil +} + +// getNumericalValue will return a numerical string, the amount +// of bytes read, and the base of the number +// +// an error will be returned if the number is not of a correct +// value +func getNumericalValue(b []rune) (int, int, error) { + if !isDigit(b[0]) { + return 0, 0, NewParseError("invalid digit value") + } + + i := 0 + helper := numberHelper{} + +loop: + for negativeIndex := 0; i < len(b); i++ { + negativeIndex++ + + if !isDigit(b[i]) { + switch b[i] { + case '-': + if helper.IsNegative() || negativeIndex != 1 { + return 0, 0, NewParseError("parse error '-'") + } + + n := getNegativeNumber(b[i:]) + i += (n - 1) + helper.Determine(b[i]) + continue + case '.': + if err := helper.Determine(b[i]); err != nil { + return 0, 0, err + } + case 'e', 'E': + if err := helper.Determine(b[i]); err != nil { + return 0, 0, err + } + + negativeIndex = 0 + case 'b': + if helper.numberFormat == hex { + break + } + fallthrough + case 'o', 'x': + if i == 0 && b[i] != '0' { + return 0, 0, NewParseError("incorrect base format, expected leading '0'") + } + + if i != 1 { + return 0, 0, NewParseError(fmt.Sprintf("incorrect base format found %s at %d index", string(b[i]), i)) + } + + if err := helper.Determine(b[i]); err != nil { + return 0, 0, err + } + default: + if isWhitespace(b[i]) { + break loop + } + + if isNewline(b[i:]) { + break loop + } + + if !(helper.numberFormat == hex && isHexByte(b[i])) { + if i+2 < len(b) && !isNewline(b[i:i+2]) { + return 0, 0, NewParseError("invalid numerical character") + } else if !isNewline([]rune{b[i]}) { + return 0, 0, NewParseError("invalid numerical character") + } + + break loop + } + } + } + } + + return helper.Base(), i, nil +} + +// isDigit will return whether or not something is an integer +func isDigit(b rune) bool { + return b >= '0' && b <= '9' +} + +func hasExponent(v []rune) bool { + return contains(v, 'e') || contains(v, 'E') +} + +func isBinaryByte(b rune) bool { + switch b { + case '0', '1': + return true + default: + return false + } +} + +func isOctalByte(b rune) bool { + switch b { + case '0', '1', '2', '3', '4', '5', '6', '7': + return true + default: + return false + } +} + +func isHexByte(b rune) bool { + if isDigit(b) { + return true + } + return (b >= 'A' && b <= 'F') || + (b >= 'a' && b <= 'f') +} + +func getValue(b []rune) (int, error) { + i := 0 + + for i < len(b) { + if isNewline(b[i:]) { + break + } + + if isOp(b[i:]) { + break + } + + valid, n, err := isValid(b[i:]) + if err != nil { + return 0, err + } + + if !valid { + break + } + + i += n + } + + return i, nil +} + +// getNegativeNumber will return a negative number from a +// byte slice. This will iterate through all characters until +// a non-digit has been found. +func getNegativeNumber(b []rune) int { + if b[0] != '-' { + return 0 + } + + i := 1 + for ; i < len(b); i++ { + if !isDigit(b[i]) { + return i + } + } + + return i +} + +// isEscaped will return whether or not the character is an escaped +// character. +func isEscaped(value []rune, b rune) bool { + if len(value) == 0 { + return false + } + + switch b { + case '\'': // single quote + case '"': // quote + case 'n': // newline + case 't': // tab + case '\\': // backslash + default: + return false + } + + return value[len(value)-1] == '\\' +} + +func getEscapedByte(b rune) (rune, error) { + switch b { + case '\'': // single quote + return '\'', nil + case '"': // quote + return '"', nil + case 'n': // newline + return '\n', nil + case 't': // table + return '\t', nil + case '\\': // backslash + return '\\', nil + default: + return b, NewParseError(fmt.Sprintf("invalid escaped character %c", b)) + } +} + +func removeEscapedCharacters(b []rune) []rune { + for i := 0; i < len(b); i++ { + if isEscaped(b[:i], b[i]) { + c, err := getEscapedByte(b[i]) + if err != nil { + return b + } + + b[i-1] = c + b = append(b[:i], b[i+1:]...) + i-- + } + } + + return b +} 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 new file mode 100644 index 0000000000..94841c3244 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/visitor.go @@ -0,0 +1,166 @@ +package ini + +import ( + "fmt" + "sort" +) + +// Visitor is an interface used by walkers that will +// traverse an array of ASTs. +type Visitor interface { + VisitExpr(AST) error + VisitStatement(AST) error +} + +// DefaultVisitor is used to visit statements and expressions +// and ensure that they are both of the correct format. +// In addition, upon visiting this will build sections and populate +// the Sections field which can be used to retrieve profile +// configuration. +type DefaultVisitor struct { + scope string + Sections Sections +} + +// NewDefaultVisitor return a DefaultVisitor +func NewDefaultVisitor() *DefaultVisitor { + return &DefaultVisitor{ + Sections: Sections{ + container: map[string]Section{}, + }, + } +} + +// VisitExpr visits expressions... +func (v *DefaultVisitor) VisitExpr(expr AST) error { + t := v.Sections.container[v.scope] + if t.values == nil { + t.values = values{} + } + + switch expr.Kind { + case ASTKindExprStatement: + opExpr := expr.GetRoot() + switch opExpr.Kind { + case ASTKindEqualExpr: + children := opExpr.GetChildren() + if len(children) <= 1 { + return NewParseError("unexpected token type") + } + + rhs := children[1] + + if rhs.Root.Type() != TokenLit { + return NewParseError("unexpected token type") + } + + key := EqualExprKey(opExpr) + v, err := newValue(rhs.Root.ValueType, rhs.Root.base, rhs.Root.Raw()) + if err != nil { + return err + } + + t.values[key] = v + default: + return NewParseError(fmt.Sprintf("unsupported expression %v", expr)) + } + default: + return NewParseError(fmt.Sprintf("unsupported expression %v", expr)) + } + + v.Sections.container[v.scope] = t + return nil +} + +// VisitStatement visits statements... +func (v *DefaultVisitor) VisitStatement(stmt AST) error { + switch stmt.Kind { + case ASTKindCompletedSectionStatement: + child := stmt.GetRoot() + if child.Kind != ASTKindSectionStatement { + return NewParseError(fmt.Sprintf("unsupported child statement: %T", child)) + } + + name := string(child.Root.Raw()) + v.Sections.container[name] = Section{} + v.scope = name + default: + return NewParseError(fmt.Sprintf("unsupported statement: %s", stmt.Kind)) + } + + return nil +} + +// Sections is a map of Section structures that represent +// a configuration. +type Sections struct { + container map[string]Section +} + +// GetSection will return section p. If section p does not exist, +// false will be returned in the second parameter. +func (t Sections) GetSection(p string) (Section, bool) { + v, ok := t.container[p] + return v, ok +} + +// values represents a map of union values. +type values map[string]Value + +// List will return a list of all sections that were successfully +// parsed. +func (t Sections) List() []string { + keys := make([]string, len(t.container)) + i := 0 + for k := range t.container { + keys[i] = k + i++ + } + + sort.Strings(keys) + return keys +} + +// Section contains a name and values. This represent +// a sectioned entry in a configuration file. +type Section struct { + Name string + values values +} + +// Has will return whether or not an entry exists in a given section +func (t Section) Has(k string) bool { + _, ok := t.values[k] + return ok +} + +// ValueType will returned what type the union is set to. If +// k was not found, the NoneType will be returned. +func (t Section) ValueType(k string) (ValueType, bool) { + v, ok := t.values[k] + return v.Type, ok +} + +// Bool returns a bool value at k +func (t Section) Bool(k string) bool { + return t.values[k].BoolValue() +} + +// Int returns an integer value at k +func (t Section) Int(k string) int64 { + return t.values[k].IntValue() +} + +// Float64 returns a float value at k +func (t Section) Float64(k string) float64 { + return t.values[k].FloatValue() +} + +// String returns the string value at k +func (t Section) String(k string) string { + _, ok := t.values[k] + if !ok { + return "" + } + return t.values[k].StringValue() +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/walker.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/walker.go new file mode 100644 index 0000000000..99915f7f77 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/walker.go @@ -0,0 +1,25 @@ +package ini + +// Walk will traverse the AST using the v, the Visitor. +func Walk(tree []AST, v Visitor) error { + for _, node := range tree { + switch node.Kind { + case ASTKindExpr, + ASTKindExprStatement: + + if err := v.VisitExpr(node); err != nil { + return err + } + case ASTKindStatement, + ASTKindCompletedSectionStatement, + ASTKindNestedSectionStatement, + ASTKindCompletedNestedSectionStatement: + + if err := v.VisitStatement(node); err != nil { + return err + } + } + } + + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/ws_token.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/ws_token.go new file mode 100644 index 0000000000..7ffb4ae06f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/ws_token.go @@ -0,0 +1,24 @@ +package ini + +import ( + "unicode" +) + +// isWhitespace will return whether or not the character is +// a whitespace character. +// +// Whitespace is defined as a space or tab. +func isWhitespace(c rune) bool { + return unicode.IsSpace(c) && c != '\n' && c != '\r' +} + +func newWSToken(b []rune) (Token, int, error) { + i := 0 + for ; i < len(b); i++ { + if !isWhitespace(b[i]) { + break + } + } + + return newToken(TokenWS, b[:i], NoneType), i, nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/s3err/error.go b/vendor/github.com/aws/aws-sdk-go/internal/s3err/error.go new file mode 100644 index 0000000000..0b9b0dfce0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/s3err/error.go @@ -0,0 +1,57 @@ +package s3err + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/request" +) + +// RequestFailure provides additional S3 specific metadata for the request +// failure. +type RequestFailure struct { + awserr.RequestFailure + + hostID string +} + +// NewRequestFailure returns a request failure error decordated with S3 +// specific metadata. +func NewRequestFailure(err awserr.RequestFailure, hostID string) *RequestFailure { + return &RequestFailure{RequestFailure: err, hostID: hostID} +} + +func (r RequestFailure) Error() string { + extra := fmt.Sprintf("status code: %d, request id: %s, host id: %s", + r.StatusCode(), r.RequestID(), r.hostID) + return awserr.SprintError(r.Code(), r.Message(), extra, r.OrigErr()) +} +func (r RequestFailure) String() string { + return r.Error() +} + +// HostID returns the HostID request response value. +func (r RequestFailure) HostID() string { + return r.hostID +} + +// RequestFailureWrapperHandler returns a handler to rap an +// awserr.RequestFailure with the S3 request ID 2 from the response. +func RequestFailureWrapperHandler() request.NamedHandler { + return request.NamedHandler{ + Name: "awssdk.s3.errorHandler", + Fn: func(req *request.Request) { + reqErr, ok := req.Error.(awserr.RequestFailure) + if !ok || reqErr == nil { + return + } + + hostID := req.HTTPResponse.Header.Get("X-Amz-Id-2") + if req.Error == nil { + return + } + + req.Error = NewRequestFailure(reqErr, hostID) + }, + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/ecs_container.go b/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/ecs_container.go new file mode 100644 index 0000000000..7da8a49ce5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/ecs_container.go @@ -0,0 +1,12 @@ +package shareddefaults + +const ( + // ECSCredsProviderEnvVar is an environmental variable key used to + // determine which path needs to be hit. + ECSCredsProviderEnvVar = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI" +) + +// ECSContainerCredentialsURI is the endpoint to retrieve container +// credentials. This can be overridden to test to ensure the credential process +// is behaving correctly. +var ECSContainerCredentialsURI = "http://169.254.170.2" 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 new file mode 100644 index 0000000000..d7d42db0a6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/host.go @@ -0,0 +1,68 @@ +package protocol + +import ( + "strings" + + "github.com/aws/aws-sdk-go/aws/request" +) + +// ValidateEndpointHostHandler is a request handler that will validate the +// request endpoint's hosts is a valid RFC 3986 host. +var ValidateEndpointHostHandler = request.NamedHandler{ + Name: "awssdk.protocol.ValidateEndpointHostHandler", + Fn: func(r *request.Request) { + err := ValidateEndpointHost(r.Operation.Name, r.HTTPRequest.URL.Host) + if err != nil { + r.Error = err + } + }, +} + +// ValidateEndpointHost validates that the host string passed in is a valid RFC +// 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, ".") + + for i, label := range labels { + if i == len(labels)-1 && len(label) == 0 { + // Allow trailing dot for FQDN hosts. + continue + } + + if !ValidHostLabel(label) { + paramErrs.Add(request.NewErrParamFormat( + "endpoint host label", "[a-zA-Z0-9-]{1,63}", label)) + } + } + + if len(host) > 255 { + paramErrs.Add(request.NewErrParamMaxLen( + "endpoint host", 255, host, + )) + } + + if paramErrs.Len() > 0 { + return paramErrs + } + return nil +} + +// ValidHostLabel returns if the label is a valid RFC 3986 host label. +func ValidHostLabel(label string) bool { + if l := len(label); l == 0 || l > 63 { + return false + } + for _, r := range label { + switch { + case r >= '0' && r <= '9': + case r >= 'A' && r <= 'Z': + case r >= 'a' && r <= 'z': + case r == '-': + default: + return false + } + } + + return true +} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/host_prefix.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/host_prefix.go new file mode 100644 index 0000000000..915b0fcafd --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/host_prefix.go @@ -0,0 +1,54 @@ +package protocol + +import ( + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" +) + +// HostPrefixHandlerName is the handler name for the host prefix request +// handler. +const HostPrefixHandlerName = "awssdk.endpoint.HostPrefixHandler" + +// NewHostPrefixHandler constructs a build handler +func NewHostPrefixHandler(prefix string, labelsFn func() map[string]string) request.NamedHandler { + builder := HostPrefixBuilder{ + Prefix: prefix, + LabelsFn: labelsFn, + } + + return request.NamedHandler{ + Name: HostPrefixHandlerName, + Fn: builder.Build, + } +} + +// HostPrefixBuilder provides the request handler to expand and prepend +// the host prefix into the operation's request endpoint host. +type HostPrefixBuilder struct { + Prefix string + LabelsFn func() map[string]string +} + +// Build updates the passed in Request with the HostPrefix template expanded. +func (h HostPrefixBuilder) Build(r *request.Request) { + if aws.BoolValue(r.Config.DisableEndpointHostPrefix) { + return + } + + var labels map[string]string + if h.LabelsFn != nil { + labels = h.LabelsFn() + } + + prefix := h.Prefix + for name, value := range labels { + prefix = strings.Replace(prefix, "{"+name+"}", value, -1) + } + + r.HTTPRequest.URL.Host = prefix + r.HTTPRequest.URL.Host + if len(r.HTTPRequest.Host) > 0 { + r.HTTPRequest.Host = prefix + r.HTTPRequest.Host + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/jsonrpc.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/jsonrpc.go index 95155f6c1b..9a7ba27ad5 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/jsonrpc.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/jsonrpc.go @@ -7,7 +7,7 @@ package jsonrpc import ( "encoding/json" - "io/ioutil" + "io" "strings" "github.com/aws/aws-sdk-go/aws/awserr" @@ -82,25 +82,17 @@ func UnmarshalMeta(req *request.Request) { // UnmarshalError unmarshals an error response for a JSON RPC service. func UnmarshalError(req *request.Request) { defer req.HTTPResponse.Body.Close() - bodyBytes, err := ioutil.ReadAll(req.HTTPResponse.Body) - if err != nil { - req.Error = awserr.NewRequestFailure( - awserr.New("SerializationError", "failed reading JSON RPC error response", err), - req.HTTPResponse.StatusCode, - req.RequestID, - ) - return - } - if len(bodyBytes) == 0 { + + var jsonErr jsonErrorResponse + err := json.NewDecoder(req.HTTPResponse.Body).Decode(&jsonErr) + if err == io.EOF { req.Error = awserr.NewRequestFailure( awserr.New("SerializationError", req.HTTPResponse.Status, nil), req.HTTPResponse.StatusCode, req.RequestID, ) return - } - var jsonErr jsonErrorResponse - if err := json.Unmarshal(bodyBytes, &jsonErr); err != nil { + } else if err != nil { req.Error = awserr.NewRequestFailure( awserr.New("SerializationError", "failed decoding JSON RPC error response", err), req.HTTPResponse.StatusCode, 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 index d61044e2c6..de8adce636 100644 --- 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 @@ -7,7 +7,7 @@ package restjson import ( "encoding/json" - "io/ioutil" + "io" "strings" "github.com/aws/aws-sdk-go/aws/awserr" @@ -54,26 +54,17 @@ func UnmarshalMeta(r *request.Request) { // UnmarshalError unmarshals a response error for the REST JSON protocol. func UnmarshalError(r *request.Request) { defer r.HTTPResponse.Body.Close() - code := r.HTTPResponse.Header.Get("X-Amzn-Errortype") - bodyBytes, err := ioutil.ReadAll(r.HTTPResponse.Body) - if err != nil { - r.Error = awserr.NewRequestFailure( - awserr.New("SerializationError", "failed reading REST JSON error response", err), - r.HTTPResponse.StatusCode, - r.RequestID, - ) - return - } - if len(bodyBytes) == 0 { + + var jsonErr jsonErrorResponse + err := json.NewDecoder(r.HTTPResponse.Body).Decode(&jsonErr) + if err == io.EOF { r.Error = awserr.NewRequestFailure( awserr.New("SerializationError", r.HTTPResponse.Status, nil), r.HTTPResponse.StatusCode, r.RequestID, ) return - } - var jsonErr jsonErrorResponse - if err := json.Unmarshal(bodyBytes, &jsonErr); err != nil { + } else if err != nil { r.Error = awserr.NewRequestFailure( awserr.New("SerializationError", "failed decoding REST JSON error response", err), r.HTTPResponse.StatusCode, @@ -82,6 +73,7 @@ func UnmarshalError(r *request.Request) { return } + code := r.HTTPResponse.Header.Get("X-Amzn-Errortype") if code == "" { code = jsonErr.Code } 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 1bfe45f659..cf981fe951 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 @@ -87,7 +87,7 @@ func (b *xmlBuilder) buildValue(value reflect.Value, current *XMLNode, tag refle } } -// buildStruct adds a struct and its fields to the current XMLNode. All fields any any nested +// buildStruct adds a struct and its fields to the current XMLNode. All fields and any nested // types are converted to XMLNodes also. func (b *xmlBuilder) buildStruct(value reflect.Value, current *XMLNode, tag reflect.StructTag) error { if !value.IsValid() { diff --git a/vendor/github.com/aws/aws-sdk-go/service/acm/api.go b/vendor/github.com/aws/aws-sdk-go/service/acm/api.go index 07fa10c944..e9c70c7716 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/acm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/acm/api.go @@ -18,7 +18,7 @@ const opAddTagsToCertificate = "AddTagsToCertificate" // AddTagsToCertificateRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -52,8 +52,7 @@ func (c *ACM) AddTagsToCertificateRequest(input *AddTagsToCertificateInput) (req output = &AddTagsToCertificateOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -126,7 +125,7 @@ const opDeleteCertificate = "DeleteCertificate" // DeleteCertificateRequest generates a "aws/request.Request" representing the // client's request for the DeleteCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -160,8 +159,7 @@ func (c *ACM) DeleteCertificateRequest(input *DeleteCertificateInput) (req *requ output = &DeleteCertificateOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -223,7 +221,7 @@ const opDescribeCertificate = "DescribeCertificate" // DescribeCertificateRequest generates a "aws/request.Request" representing the // client's request for the DescribeCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -306,7 +304,7 @@ const opExportCertificate = "ExportCertificate" // ExportCertificateRequest generates a "aws/request.Request" representing the // client's request for the ExportCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -401,7 +399,7 @@ const opGetCertificate = "GetCertificate" // GetCertificateRequest generates a "aws/request.Request" representing the // client's request for the GetCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -493,7 +491,7 @@ const opImportCertificate = "ImportCertificate" // ImportCertificateRequest generates a "aws/request.Request" representing the // client's request for the ImportCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -626,7 +624,7 @@ const opListCertificates = "ListCertificates" // ListCertificatesRequest generates a "aws/request.Request" representing the // client's request for the ListCertificates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -758,7 +756,7 @@ const opListTagsForCertificate = "ListTagsForCertificate" // ListTagsForCertificateRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -844,7 +842,7 @@ const opRemoveTagsFromCertificate = "RemoveTagsFromCertificate" // RemoveTagsFromCertificateRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -878,8 +876,7 @@ func (c *ACM) RemoveTagsFromCertificateRequest(input *RemoveTagsFromCertificateI output = &RemoveTagsFromCertificateOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -940,7 +937,7 @@ const opRequestCertificate = "RequestCertificate" // RequestCertificateRequest generates a "aws/request.Request" representing the // client's request for the RequestCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1036,7 +1033,7 @@ const opResendValidationEmail = "ResendValidationEmail" // ResendValidationEmailRequest generates a "aws/request.Request" representing the // client's request for the ResendValidationEmail operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1070,8 +1067,7 @@ func (c *ACM) ResendValidationEmailRequest(input *ResendValidationEmailInput) (r output = &ResendValidationEmailOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1137,7 +1133,7 @@ const opUpdateCertificateOptions = "UpdateCertificateOptions" // UpdateCertificateOptionsRequest generates a "aws/request.Request" representing the // client's request for the UpdateCertificateOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1171,8 +1167,7 @@ func (c *ACM) UpdateCertificateOptionsRequest(input *UpdateCertificateOptionsInp output = &UpdateCertificateOptionsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1979,7 +1974,7 @@ type ExportCertificateInput struct { // Passphrase is automatically base64 encoded/decoded by the SDK. // // Passphrase is a required field - Passphrase []byte `min:"4" type:"blob" required:"true"` + Passphrase []byte `min:"4" type:"blob" required:"true" sensitive:"true"` } // String returns the string representation @@ -2037,7 +2032,7 @@ type ExportCertificateOutput struct { CertificateChain *string `min:"1" type:"string"` // The PEM-encoded private key associated with the public key in the certificate. - PrivateKey *string `min:"1" type:"string"` + PrivateKey *string `min:"1" type:"string" sensitive:"true"` } // String returns the string representation @@ -2271,7 +2266,7 @@ type ImportCertificateInput struct { // PrivateKey is automatically base64 encoded/decoded by the SDK. // // PrivateKey is a required field - PrivateKey []byte `min:"1" type:"blob" required:"true"` + PrivateKey []byte `min:"1" type:"blob" required:"true" sensitive:"true"` } // String returns the string representation diff --git a/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go b/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go index 113c0a3ad4..f8d9b6c1aa 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/acmpca/api.go @@ -18,7 +18,7 @@ const opCreateCertificateAuthority = "CreateCertificateAuthority" // CreateCertificateAuthorityRequest generates a "aws/request.Request" representing the // client's request for the CreateCertificateAuthority operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -114,7 +114,7 @@ const opCreateCertificateAuthorityAuditReport = "CreateCertificateAuthorityAudit // CreateCertificateAuthorityAuditReportRequest generates a "aws/request.Request" representing the // client's request for the CreateCertificateAuthorityAuditReport operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -183,7 +183,8 @@ func (c *ACMPCA) CreateCertificateAuthorityAuditReportRequest(input *CreateCerti // One or more of the specified arguments was not valid. // // * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report cannot be generated. +// The private CA is in a state during which a report or certificate cannot +// be generated. // // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/CreateCertificateAuthorityAuditReport func (c *ACMPCA) CreateCertificateAuthorityAuditReport(input *CreateCertificateAuthorityAuditReportInput) (*CreateCertificateAuthorityAuditReportOutput, error) { @@ -212,7 +213,7 @@ const opDeleteCertificateAuthority = "DeleteCertificateAuthority" // DeleteCertificateAuthorityRequest generates a "aws/request.Request" representing the // client's request for the DeleteCertificateAuthority operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -246,8 +247,7 @@ func (c *ACMPCA) DeleteCertificateAuthorityRequest(input *DeleteCertificateAutho output = &DeleteCertificateAuthorityOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -292,7 +292,8 @@ func (c *ACMPCA) DeleteCertificateAuthorityRequest(input *DeleteCertificateAutho // The requested Amazon Resource Name (ARN) does not refer to an existing resource. // // * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report cannot be generated. +// The private CA is in a state during which a report or certificate cannot +// be generated. // // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/DeleteCertificateAuthority func (c *ACMPCA) DeleteCertificateAuthority(input *DeleteCertificateAuthorityInput) (*DeleteCertificateAuthorityOutput, error) { @@ -321,7 +322,7 @@ const opDescribeCertificateAuthority = "DescribeCertificateAuthority" // DescribeCertificateAuthorityRequest generates a "aws/request.Request" representing the // client's request for the DescribeCertificateAuthority operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -381,8 +382,8 @@ func (c *ACMPCA) DescribeCertificateAuthorityRequest(input *DescribeCertificateA // CA can never return to the pending state. You must create a new CA. // // * DELETED - Your private CA is within the restoration period, after which -// it will be permanently deleted. The length of time remaining in the CA's -// restoration period will also be included in this operation's output. +// it is permanently deleted. The length of time remaining in the CA's restoration +// period is also included in this operation's output. // // 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 @@ -426,7 +427,7 @@ const opDescribeCertificateAuthorityAuditReport = "DescribeCertificateAuthorityA // DescribeCertificateAuthorityAuditReportRequest generates a "aws/request.Request" representing the // client's request for the DescribeCertificateAuthorityAuditReport operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -515,7 +516,7 @@ const opGetCertificate = "GetCertificate" // GetCertificateRequest generates a "aws/request.Request" representing the // client's request for the GetCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -584,7 +585,8 @@ func (c *ACMPCA) GetCertificateRequest(input *GetCertificateInput) (req *request // The requested Amazon Resource Name (ARN) does not refer to an existing resource. // // * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report cannot be generated. +// The private CA is in a state during which a report or certificate cannot +// be generated. // // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificate func (c *ACMPCA) GetCertificate(input *GetCertificateInput) (*GetCertificateOutput, error) { @@ -613,7 +615,7 @@ const opGetCertificateAuthorityCertificate = "GetCertificateAuthorityCertificate // GetCertificateAuthorityCertificateRequest generates a "aws/request.Request" representing the // client's request for the GetCertificateAuthorityCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -670,7 +672,8 @@ func (c *ACMPCA) GetCertificateAuthorityCertificateRequest(input *GetCertificate // cannot be found. // // * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report cannot be generated. +// The private CA is in a state during which a report or certificate cannot +// be generated. // // * ErrCodeInvalidArnException "InvalidArnException" // The requested Amazon Resource Name (ARN) does not refer to an existing resource. @@ -702,7 +705,7 @@ const opGetCertificateAuthorityCsr = "GetCertificateAuthorityCsr" // GetCertificateAuthorityCsrRequest generates a "aws/request.Request" representing the // client's request for the GetCertificateAuthorityCsr operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -770,7 +773,8 @@ func (c *ACMPCA) GetCertificateAuthorityCsrRequest(input *GetCertificateAuthorit // The requested Amazon Resource Name (ARN) does not refer to an existing resource. // // * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report cannot be generated. +// The private CA is in a state during which a report or certificate cannot +// be generated. // // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificateAuthorityCsr func (c *ACMPCA) GetCertificateAuthorityCsr(input *GetCertificateAuthorityCsrInput) (*GetCertificateAuthorityCsrOutput, error) { @@ -799,7 +803,7 @@ const opImportCertificateAuthorityCertificate = "ImportCertificateAuthorityCerti // ImportCertificateAuthorityCertificateRequest generates a "aws/request.Request" representing the // client's request for the ImportCertificateAuthorityCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -833,8 +837,7 @@ func (c *ACMPCA) ImportCertificateAuthorityCertificateRequest(input *ImportCerti output = &ImportCertificateAuthorityCertificateOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -883,7 +886,8 @@ func (c *ACMPCA) ImportCertificateAuthorityCertificateRequest(input *ImportCerti // The requested Amazon Resource Name (ARN) does not refer to an existing resource. // // * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report cannot be generated. +// The private CA is in a state during which a report or certificate cannot +// be generated. // // * ErrCodeMalformedCertificateException "MalformedCertificateException" // One or more fields in the certificate are invalid. @@ -919,7 +923,7 @@ const opIssueCertificate = "IssueCertificate" // IssueCertificateRequest generates a "aws/request.Request" representing the // client's request for the IssueCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -983,7 +987,8 @@ func (c *ACMPCA) IssueCertificateRequest(input *IssueCertificateInput) (req *req // cannot be found. // // * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report cannot be generated. +// The private CA is in a state during which a report or certificate cannot +// be generated. // // * ErrCodeInvalidArnException "InvalidArnException" // The requested Amazon Resource Name (ARN) does not refer to an existing resource. @@ -1021,7 +1026,7 @@ const opListCertificateAuthorities = "ListCertificateAuthorities" // ListCertificateAuthoritiesRequest generates a "aws/request.Request" representing the // client's request for the ListCertificateAuthorities operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1047,6 +1052,12 @@ func (c *ACMPCA) ListCertificateAuthoritiesRequest(input *ListCertificateAuthori Name: opListCertificateAuthorities, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -1097,12 +1108,62 @@ func (c *ACMPCA) ListCertificateAuthoritiesWithContext(ctx aws.Context, input *L return out, req.Send() } +// ListCertificateAuthoritiesPages iterates over the pages of a ListCertificateAuthorities operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListCertificateAuthorities 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 ListCertificateAuthorities operation. +// pageNum := 0 +// err := client.ListCertificateAuthoritiesPages(params, +// func(page *ListCertificateAuthoritiesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ACMPCA) ListCertificateAuthoritiesPages(input *ListCertificateAuthoritiesInput, fn func(*ListCertificateAuthoritiesOutput, bool) bool) error { + return c.ListCertificateAuthoritiesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListCertificateAuthoritiesPagesWithContext same as ListCertificateAuthoritiesPages 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 *ACMPCA) ListCertificateAuthoritiesPagesWithContext(ctx aws.Context, input *ListCertificateAuthoritiesInput, fn func(*ListCertificateAuthoritiesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListCertificateAuthoritiesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListCertificateAuthoritiesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListCertificateAuthoritiesOutput), !p.HasNextPage()) + } + return p.Err() +} + const opListTags = "ListTags" // ListTagsRequest generates a "aws/request.Request" representing the // client's request for the ListTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1189,7 +1250,7 @@ const opRestoreCertificateAuthority = "RestoreCertificateAuthority" // RestoreCertificateAuthorityRequest generates a "aws/request.Request" representing the // client's request for the RestoreCertificateAuthority operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1223,8 +1284,7 @@ func (c *ACMPCA) RestoreCertificateAuthorityRequest(input *RestoreCertificateAut output = &RestoreCertificateAuthorityOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1258,7 +1318,8 @@ func (c *ACMPCA) RestoreCertificateAuthorityRequest(input *RestoreCertificateAut // cannot be found. // // * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report cannot be generated. +// The private CA is in a state during which a report or certificate cannot +// be generated. // // * ErrCodeInvalidArnException "InvalidArnException" // The requested Amazon Resource Name (ARN) does not refer to an existing resource. @@ -1290,7 +1351,7 @@ const opRevokeCertificate = "RevokeCertificate" // RevokeCertificateRequest generates a "aws/request.Request" representing the // client's request for the RevokeCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1324,8 +1385,7 @@ func (c *ACMPCA) RevokeCertificateRequest(input *RevokeCertificateInput) (req *r output = &RevokeCertificateOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1354,7 +1414,8 @@ func (c *ACMPCA) RevokeCertificateRequest(input *RevokeCertificateInput) (req *r // The requested Amazon Resource Name (ARN) does not refer to an existing resource. // // * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report cannot be generated. +// The private CA is in a state during which a report or certificate cannot +// be generated. // // * ErrCodeResourceNotFoundException "ResourceNotFoundException" // A resource such as a private CA, S3 bucket, certificate, or audit report @@ -1396,7 +1457,7 @@ const opTagCertificateAuthority = "TagCertificateAuthority" // TagCertificateAuthorityRequest generates a "aws/request.Request" representing the // client's request for the TagCertificateAuthority operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1430,8 +1491,7 @@ func (c *ACMPCA) TagCertificateAuthorityRequest(input *TagCertificateAuthorityIn output = &TagCertificateAuthorityOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1463,7 +1523,8 @@ func (c *ACMPCA) TagCertificateAuthorityRequest(input *TagCertificateAuthorityIn // The requested Amazon Resource Name (ARN) does not refer to an existing resource. // // * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report cannot be generated. +// The private CA is in a state during which a report or certificate cannot +// be generated. // // * ErrCodeInvalidTagException "InvalidTagException" // The tag associated with the CA is not valid. The invalid argument is contained @@ -1500,7 +1561,7 @@ const opUntagCertificateAuthority = "UntagCertificateAuthority" // UntagCertificateAuthorityRequest generates a "aws/request.Request" representing the // client's request for the UntagCertificateAuthority operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1534,8 +1595,7 @@ func (c *ACMPCA) UntagCertificateAuthorityRequest(input *UntagCertificateAuthori output = &UntagCertificateAuthorityOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1564,7 +1624,8 @@ func (c *ACMPCA) UntagCertificateAuthorityRequest(input *UntagCertificateAuthori // The requested Amazon Resource Name (ARN) does not refer to an existing resource. // // * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report cannot be generated. +// The private CA is in a state during which a report or certificate cannot +// be generated. // // * ErrCodeInvalidTagException "InvalidTagException" // The tag associated with the CA is not valid. The invalid argument is contained @@ -1597,7 +1658,7 @@ const opUpdateCertificateAuthority = "UpdateCertificateAuthority" // UpdateCertificateAuthorityRequest generates a "aws/request.Request" representing the // client's request for the UpdateCertificateAuthority operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1631,8 +1692,7 @@ func (c *ACMPCA) UpdateCertificateAuthorityRequest(input *UpdateCertificateAutho output = &UpdateCertificateAuthorityOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1665,7 +1725,8 @@ func (c *ACMPCA) UpdateCertificateAuthorityRequest(input *UpdateCertificateAutho // The requested Amazon Resource Name (ARN) does not refer to an existing resource. // // * ErrCodeInvalidStateException "InvalidStateException" -// The private CA is in a state during which a report cannot be generated. +// The private CA is in a state during which a report or certificate cannot +// be generated. // // * ErrCodeInvalidPolicyException "InvalidPolicyException" // The S3 bucket policy is not valid. The policy must give ACM PCA rights to diff --git a/vendor/github.com/aws/aws-sdk-go/service/acmpca/errors.go b/vendor/github.com/aws/aws-sdk-go/service/acmpca/errors.go index 2614b5a42f..5ce2781c2c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/acmpca/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/acmpca/errors.go @@ -46,7 +46,8 @@ const ( // ErrCodeInvalidStateException for service response error code // "InvalidStateException". // - // The private CA is in a state during which a report cannot be generated. + // The private CA is in a state during which a report or certificate cannot + // be generated. ErrCodeInvalidStateException = "InvalidStateException" // ErrCodeInvalidTagException for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/acmpca/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/acmpca/waiters.go new file mode 100644 index 0000000000..ce36d5b95d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/acmpca/waiters.go @@ -0,0 +1,158 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package acmpca + +import ( + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" +) + +// WaitUntilAuditReportCreated uses the ACM-PCA API operation +// DescribeCertificateAuthorityAuditReport to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *ACMPCA) WaitUntilAuditReportCreated(input *DescribeCertificateAuthorityAuditReportInput) error { + return c.WaitUntilAuditReportCreatedWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilAuditReportCreatedWithContext is an extended version of WaitUntilAuditReportCreated. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// 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 *ACMPCA) WaitUntilAuditReportCreatedWithContext(ctx aws.Context, input *DescribeCertificateAuthorityAuditReportInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilAuditReportCreated", + MaxAttempts: 60, + Delay: request.ConstantWaiterDelay(3 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.PathWaiterMatch, Argument: "AuditReportStatus", + Expected: "SUCCESS", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeCertificateAuthorityAuditReportInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeCertificateAuthorityAuditReportRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} + +// WaitUntilCertificateAuthorityCSRCreated uses the ACM-PCA API operation +// GetCertificateAuthorityCsr to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *ACMPCA) WaitUntilCertificateAuthorityCSRCreated(input *GetCertificateAuthorityCsrInput) error { + return c.WaitUntilCertificateAuthorityCSRCreatedWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilCertificateAuthorityCSRCreatedWithContext is an extended version of WaitUntilCertificateAuthorityCSRCreated. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// 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 *ACMPCA) WaitUntilCertificateAuthorityCSRCreatedWithContext(ctx aws.Context, input *GetCertificateAuthorityCsrInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilCertificateAuthorityCSRCreated", + MaxAttempts: 60, + Delay: request.ConstantWaiterDelay(3 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.StatusWaiterMatch, + Expected: 200, + }, + { + State: request.RetryWaiterState, + Matcher: request.ErrorWaiterMatch, + Expected: "RequestInProgressException", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *GetCertificateAuthorityCsrInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.GetCertificateAuthorityCsrRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} + +// WaitUntilCertificateIssued uses the ACM-PCA API operation +// GetCertificate to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *ACMPCA) WaitUntilCertificateIssued(input *GetCertificateInput) error { + return c.WaitUntilCertificateIssuedWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilCertificateIssuedWithContext is an extended version of WaitUntilCertificateIssued. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// 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 *ACMPCA) WaitUntilCertificateIssuedWithContext(ctx aws.Context, input *GetCertificateInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilCertificateIssued", + MaxAttempts: 60, + Delay: request.ConstantWaiterDelay(3 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.StatusWaiterMatch, + Expected: 200, + }, + { + State: request.RetryWaiterState, + Matcher: request.ErrorWaiterMatch, + Expected: "RequestInProgressException", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *GetCertificateInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.GetCertificateRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go b/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go index ab6d17b639..e2bb14128e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go @@ -17,7 +17,7 @@ const opCreateApiKey = "CreateApiKey" // CreateApiKeyRequest generates a "aws/request.Request" representing the // client's request for the CreateApiKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -56,7 +56,7 @@ func (c *APIGateway) CreateApiKeyRequest(input *CreateApiKeyInput) (req *request // // Create an ApiKey resource. // -// AWS CLI (http://docs.aws.amazon.com/cli/latest/reference/apigateway/create-api-key.html) +// AWS CLI (https://docs.aws.amazon.com/cli/latest/reference/apigateway/create-api-key.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 @@ -113,7 +113,7 @@ const opCreateAuthorizer = "CreateAuthorizer" // CreateAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the CreateAuthorizer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -152,7 +152,7 @@ func (c *APIGateway) CreateAuthorizerRequest(input *CreateAuthorizerInput) (req // // Adds a new Authorizer resource to an existing RestApi resource. // -// AWS CLI (http://docs.aws.amazon.com/cli/latest/reference/apigateway/create-authorizer.html) +// AWS CLI (https://docs.aws.amazon.com/cli/latest/reference/apigateway/create-authorizer.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 @@ -205,7 +205,7 @@ const opCreateBasePathMapping = "CreateBasePathMapping" // CreateBasePathMappingRequest generates a "aws/request.Request" representing the // client's request for the CreateBasePathMapping operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -296,7 +296,7 @@ const opCreateDeployment = "CreateDeployment" // CreateDeploymentRequest generates a "aws/request.Request" representing the // client's request for the CreateDeployment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -395,7 +395,7 @@ const opCreateDocumentationPart = "CreateDocumentationPart" // CreateDocumentationPartRequest generates a "aws/request.Request" representing the // client's request for the CreateDocumentationPart operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -487,7 +487,7 @@ const opCreateDocumentationVersion = "CreateDocumentationVersion" // CreateDocumentationVersionRequest generates a "aws/request.Request" representing the // client's request for the CreateDocumentationVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -579,7 +579,7 @@ const opCreateDomainName = "CreateDomainName" // CreateDomainNameRequest generates a "aws/request.Request" representing the // client's request for the CreateDomainName operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -667,7 +667,7 @@ const opCreateModel = "CreateModel" // CreateModelRequest generates a "aws/request.Request" representing the // client's request for the CreateModel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -761,7 +761,7 @@ const opCreateRequestValidator = "CreateRequestValidator" // CreateRequestValidatorRequest generates a "aws/request.Request" representing the // client's request for the CreateRequestValidator operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -851,7 +851,7 @@ const opCreateResource = "CreateResource" // CreateResourceRequest generates a "aws/request.Request" representing the // client's request for the CreateResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -945,7 +945,7 @@ const opCreateRestApi = "CreateRestApi" // CreateRestApiRequest generates a "aws/request.Request" representing the // client's request for the CreateRestApi operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1032,7 +1032,7 @@ const opCreateStage = "CreateStage" // CreateStageRequest generates a "aws/request.Request" representing the // client's request for the CreateStage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1127,7 +1127,7 @@ const opCreateUsagePlan = "CreateUsagePlan" // CreateUsagePlanRequest generates a "aws/request.Request" representing the // client's request for the CreateUsagePlan operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1222,7 +1222,7 @@ const opCreateUsagePlanKey = "CreateUsagePlanKey" // CreateUsagePlanKeyRequest generates a "aws/request.Request" representing the // client's request for the CreateUsagePlanKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1313,7 +1313,7 @@ const opCreateVpcLink = "CreateVpcLink" // CreateVpcLinkRequest generates a "aws/request.Request" representing the // client's request for the CreateVpcLink operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1400,7 +1400,7 @@ const opDeleteApiKey = "DeleteApiKey" // DeleteApiKeyRequest generates a "aws/request.Request" representing the // client's request for the DeleteApiKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1432,8 +1432,7 @@ func (c *APIGateway) DeleteApiKeyRequest(input *DeleteApiKeyInput) (req *request output = &DeleteApiKeyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1485,7 +1484,7 @@ const opDeleteAuthorizer = "DeleteAuthorizer" // DeleteAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the DeleteAuthorizer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1517,8 +1516,7 @@ func (c *APIGateway) DeleteAuthorizerRequest(input *DeleteAuthorizerInput) (req output = &DeleteAuthorizerOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1526,7 +1524,7 @@ func (c *APIGateway) DeleteAuthorizerRequest(input *DeleteAuthorizerInput) (req // // Deletes an existing Authorizer resource. // -// AWS CLI (http://docs.aws.amazon.com/cli/latest/reference/apigateway/delete-authorizer.html) +// AWS CLI (https://docs.aws.amazon.com/cli/latest/reference/apigateway/delete-authorizer.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 @@ -1580,7 +1578,7 @@ const opDeleteBasePathMapping = "DeleteBasePathMapping" // DeleteBasePathMappingRequest generates a "aws/request.Request" representing the // client's request for the DeleteBasePathMapping operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1612,8 +1610,7 @@ func (c *APIGateway) DeleteBasePathMappingRequest(input *DeleteBasePathMappingIn output = &DeleteBasePathMappingOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1673,7 +1670,7 @@ const opDeleteClientCertificate = "DeleteClientCertificate" // DeleteClientCertificateRequest generates a "aws/request.Request" representing the // client's request for the DeleteClientCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1705,8 +1702,7 @@ func (c *APIGateway) DeleteClientCertificateRequest(input *DeleteClientCertifica output = &DeleteClientCertificateOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1762,7 +1758,7 @@ const opDeleteDeployment = "DeleteDeployment" // DeleteDeploymentRequest generates a "aws/request.Request" representing the // client's request for the DeleteDeployment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1794,8 +1790,7 @@ func (c *APIGateway) DeleteDeploymentRequest(input *DeleteDeploymentInput) (req output = &DeleteDeploymentOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1852,7 +1847,7 @@ const opDeleteDocumentationPart = "DeleteDocumentationPart" // DeleteDocumentationPartRequest generates a "aws/request.Request" representing the // client's request for the DeleteDocumentationPart operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1884,8 +1879,7 @@ func (c *APIGateway) DeleteDocumentationPartRequest(input *DeleteDocumentationPa output = &DeleteDocumentationPartOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1943,7 +1937,7 @@ const opDeleteDocumentationVersion = "DeleteDocumentationVersion" // DeleteDocumentationVersionRequest generates a "aws/request.Request" representing the // client's request for the DeleteDocumentationVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1975,8 +1969,7 @@ func (c *APIGateway) DeleteDocumentationVersionRequest(input *DeleteDocumentatio output = &DeleteDocumentationVersionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2034,7 +2027,7 @@ const opDeleteDomainName = "DeleteDomainName" // DeleteDomainNameRequest generates a "aws/request.Request" representing the // client's request for the DeleteDomainName operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2066,8 +2059,7 @@ func (c *APIGateway) DeleteDomainNameRequest(input *DeleteDomainNameInput) (req output = &DeleteDomainNameOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2119,7 +2111,7 @@ const opDeleteGatewayResponse = "DeleteGatewayResponse" // DeleteGatewayResponseRequest generates a "aws/request.Request" representing the // client's request for the DeleteGatewayResponse operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2151,8 +2143,7 @@ func (c *APIGateway) DeleteGatewayResponseRequest(input *DeleteGatewayResponseIn output = &DeleteGatewayResponseOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2213,7 +2204,7 @@ const opDeleteIntegration = "DeleteIntegration" // DeleteIntegrationRequest generates a "aws/request.Request" representing the // client's request for the DeleteIntegration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2245,8 +2236,7 @@ func (c *APIGateway) DeleteIntegrationRequest(input *DeleteIntegrationInput) (re output = &DeleteIntegrationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2302,7 +2292,7 @@ const opDeleteIntegrationResponse = "DeleteIntegrationResponse" // DeleteIntegrationResponseRequest generates a "aws/request.Request" representing the // client's request for the DeleteIntegrationResponse operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2334,8 +2324,7 @@ func (c *APIGateway) DeleteIntegrationResponseRequest(input *DeleteIntegrationRe output = &DeleteIntegrationResponseOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2395,7 +2384,7 @@ const opDeleteMethod = "DeleteMethod" // DeleteMethodRequest generates a "aws/request.Request" representing the // client's request for the DeleteMethod operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2427,8 +2416,7 @@ func (c *APIGateway) DeleteMethodRequest(input *DeleteMethodInput) (req *request output = &DeleteMethodOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2484,7 +2472,7 @@ const opDeleteMethodResponse = "DeleteMethodResponse" // DeleteMethodResponseRequest generates a "aws/request.Request" representing the // client's request for the DeleteMethodResponse operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2516,8 +2504,7 @@ func (c *APIGateway) DeleteMethodResponseRequest(input *DeleteMethodResponseInpu output = &DeleteMethodResponseOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2577,7 +2564,7 @@ const opDeleteModel = "DeleteModel" // DeleteModelRequest generates a "aws/request.Request" representing the // client's request for the DeleteModel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2609,8 +2596,7 @@ func (c *APIGateway) DeleteModelRequest(input *DeleteModelInput) (req *request.R output = &DeleteModelOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2670,7 +2656,7 @@ const opDeleteRequestValidator = "DeleteRequestValidator" // DeleteRequestValidatorRequest generates a "aws/request.Request" representing the // client's request for the DeleteRequestValidator operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2702,8 +2688,7 @@ func (c *APIGateway) DeleteRequestValidatorRequest(input *DeleteRequestValidator output = &DeleteRequestValidatorOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2763,7 +2748,7 @@ const opDeleteResource = "DeleteResource" // DeleteResourceRequest generates a "aws/request.Request" representing the // client's request for the DeleteResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2795,8 +2780,7 @@ func (c *APIGateway) DeleteResourceRequest(input *DeleteResourceInput) (req *req output = &DeleteResourceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2856,7 +2840,7 @@ const opDeleteRestApi = "DeleteRestApi" // DeleteRestApiRequest generates a "aws/request.Request" representing the // client's request for the DeleteRestApi operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2888,8 +2872,7 @@ func (c *APIGateway) DeleteRestApiRequest(input *DeleteRestApiInput) (req *reque output = &DeleteRestApiOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2945,7 +2928,7 @@ const opDeleteStage = "DeleteStage" // DeleteStageRequest generates a "aws/request.Request" representing the // client's request for the DeleteStage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2977,8 +2960,7 @@ func (c *APIGateway) DeleteStageRequest(input *DeleteStageInput) (req *request.R output = &DeleteStageOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3034,7 +3016,7 @@ const opDeleteUsagePlan = "DeleteUsagePlan" // DeleteUsagePlanRequest generates a "aws/request.Request" representing the // client's request for the DeleteUsagePlan operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3066,8 +3048,7 @@ func (c *APIGateway) DeleteUsagePlanRequest(input *DeleteUsagePlanInput) (req *r output = &DeleteUsagePlanOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3123,7 +3104,7 @@ const opDeleteUsagePlanKey = "DeleteUsagePlanKey" // DeleteUsagePlanKeyRequest generates a "aws/request.Request" representing the // client's request for the DeleteUsagePlanKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3155,8 +3136,7 @@ func (c *APIGateway) DeleteUsagePlanKeyRequest(input *DeleteUsagePlanKeyInput) ( output = &DeleteUsagePlanKeyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3217,7 +3197,7 @@ const opDeleteVpcLink = "DeleteVpcLink" // DeleteVpcLinkRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpcLink operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3249,8 +3229,7 @@ func (c *APIGateway) DeleteVpcLinkRequest(input *DeleteVpcLinkInput) (req *reque output = &DeleteVpcLinkOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3306,7 +3285,7 @@ const opFlushStageAuthorizersCache = "FlushStageAuthorizersCache" // FlushStageAuthorizersCacheRequest generates a "aws/request.Request" representing the // client's request for the FlushStageAuthorizersCache operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3338,8 +3317,7 @@ func (c *APIGateway) FlushStageAuthorizersCacheRequest(input *FlushStageAuthoriz output = &FlushStageAuthorizersCacheOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3395,7 +3373,7 @@ const opFlushStageCache = "FlushStageCache" // FlushStageCacheRequest generates a "aws/request.Request" representing the // client's request for the FlushStageCache operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3427,8 +3405,7 @@ func (c *APIGateway) FlushStageCacheRequest(input *FlushStageCacheInput) (req *r output = &FlushStageCacheOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3484,7 +3461,7 @@ const opGenerateClientCertificate = "GenerateClientCertificate" // GenerateClientCertificateRequest generates a "aws/request.Request" representing the // client's request for the GenerateClientCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3567,7 +3544,7 @@ const opGetAccount = "GetAccount" // GetAccountRequest generates a "aws/request.Request" representing the // client's request for the GetAccount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3650,7 +3627,7 @@ const opGetApiKey = "GetApiKey" // GetApiKeyRequest generates a "aws/request.Request" representing the // client's request for the GetApiKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3733,7 +3710,7 @@ const opGetApiKeys = "GetApiKeys" // GetApiKeysRequest generates a "aws/request.Request" representing the // client's request for the GetApiKeys operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3873,7 +3850,7 @@ const opGetAuthorizer = "GetAuthorizer" // GetAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the GetAuthorizer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3912,7 +3889,7 @@ func (c *APIGateway) GetAuthorizerRequest(input *GetAuthorizerInput) (req *reque // // Describe an existing Authorizer resource. // -// AWS CLI (http://docs.aws.amazon.com/cli/latest/reference/apigateway/get-authorizer.html) +// AWS CLI (https://docs.aws.amazon.com/cli/latest/reference/apigateway/get-authorizer.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 @@ -3958,7 +3935,7 @@ const opGetAuthorizers = "GetAuthorizers" // GetAuthorizersRequest generates a "aws/request.Request" representing the // client's request for the GetAuthorizers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3997,7 +3974,7 @@ func (c *APIGateway) GetAuthorizersRequest(input *GetAuthorizersInput) (req *req // // Describe an existing Authorizers resource. // -// AWS CLI (http://docs.aws.amazon.com/cli/latest/reference/apigateway/get-authorizers.html) +// AWS CLI (https://docs.aws.amazon.com/cli/latest/reference/apigateway/get-authorizers.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 @@ -4047,7 +4024,7 @@ const opGetBasePathMapping = "GetBasePathMapping" // GetBasePathMappingRequest generates a "aws/request.Request" representing the // client's request for the GetBasePathMapping operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4130,7 +4107,7 @@ const opGetBasePathMappings = "GetBasePathMappings" // GetBasePathMappingsRequest generates a "aws/request.Request" representing the // client's request for the GetBasePathMappings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4269,7 +4246,7 @@ const opGetClientCertificate = "GetClientCertificate" // GetClientCertificateRequest generates a "aws/request.Request" representing the // client's request for the GetClientCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4352,7 +4329,7 @@ const opGetClientCertificates = "GetClientCertificates" // GetClientCertificatesRequest generates a "aws/request.Request" representing the // client's request for the GetClientCertificates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4492,7 +4469,7 @@ const opGetDeployment = "GetDeployment" // GetDeploymentRequest generates a "aws/request.Request" representing the // client's request for the GetDeployment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4579,7 +4556,7 @@ const opGetDeployments = "GetDeployments" // GetDeploymentsRequest generates a "aws/request.Request" representing the // client's request for the GetDeployments operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4723,7 +4700,7 @@ const opGetDocumentationPart = "GetDocumentationPart" // GetDocumentationPartRequest generates a "aws/request.Request" representing the // client's request for the GetDocumentationPart operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4804,7 +4781,7 @@ const opGetDocumentationParts = "GetDocumentationParts" // GetDocumentationPartsRequest generates a "aws/request.Request" representing the // client's request for the GetDocumentationParts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4889,7 +4866,7 @@ const opGetDocumentationVersion = "GetDocumentationVersion" // GetDocumentationVersionRequest generates a "aws/request.Request" representing the // client's request for the GetDocumentationVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4970,7 +4947,7 @@ const opGetDocumentationVersions = "GetDocumentationVersions" // GetDocumentationVersionsRequest generates a "aws/request.Request" representing the // client's request for the GetDocumentationVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5055,7 +5032,7 @@ const opGetDomainName = "GetDomainName" // GetDomainNameRequest generates a "aws/request.Request" representing the // client's request for the GetDomainName operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5143,7 +5120,7 @@ const opGetDomainNames = "GetDomainNames" // GetDomainNamesRequest generates a "aws/request.Request" representing the // client's request for the GetDomainNames operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5283,7 +5260,7 @@ const opGetExport = "GetExport" // GetExportRequest generates a "aws/request.Request" representing the // client's request for the GetExport operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5374,7 +5351,7 @@ const opGetGatewayResponse = "GetGatewayResponse" // GetGatewayResponseRequest generates a "aws/request.Request" representing the // client's request for the GetGatewayResponse operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5457,7 +5434,7 @@ const opGetGatewayResponses = "GetGatewayResponses" // GetGatewayResponsesRequest generates a "aws/request.Request" representing the // client's request for the GetGatewayResponses operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5547,7 +5524,7 @@ const opGetIntegration = "GetIntegration" // GetIntegrationRequest generates a "aws/request.Request" representing the // client's request for the GetIntegration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5630,7 +5607,7 @@ const opGetIntegrationResponse = "GetIntegrationResponse" // GetIntegrationResponseRequest generates a "aws/request.Request" representing the // client's request for the GetIntegrationResponse operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5713,7 +5690,7 @@ const opGetMethod = "GetMethod" // GetMethodRequest generates a "aws/request.Request" representing the // client's request for the GetMethod operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5796,7 +5773,7 @@ const opGetMethodResponse = "GetMethodResponse" // GetMethodResponseRequest generates a "aws/request.Request" representing the // client's request for the GetMethodResponse operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5879,7 +5856,7 @@ const opGetModel = "GetModel" // GetModelRequest generates a "aws/request.Request" representing the // client's request for the GetModel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5962,7 +5939,7 @@ const opGetModelTemplate = "GetModelTemplate" // GetModelTemplateRequest generates a "aws/request.Request" representing the // client's request for the GetModelTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6050,7 +6027,7 @@ const opGetModels = "GetModels" // GetModelsRequest generates a "aws/request.Request" representing the // client's request for the GetModels operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6193,7 +6170,7 @@ const opGetRequestValidator = "GetRequestValidator" // GetRequestValidatorRequest generates a "aws/request.Request" representing the // client's request for the GetRequestValidator operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6276,7 +6253,7 @@ const opGetRequestValidators = "GetRequestValidators" // GetRequestValidatorsRequest generates a "aws/request.Request" representing the // client's request for the GetRequestValidators operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6363,7 +6340,7 @@ const opGetResource = "GetResource" // GetResourceRequest generates a "aws/request.Request" representing the // client's request for the GetResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6446,7 +6423,7 @@ const opGetResources = "GetResources" // GetResourcesRequest generates a "aws/request.Request" representing the // client's request for the GetResources operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6589,7 +6566,7 @@ const opGetRestApi = "GetRestApi" // GetRestApiRequest generates a "aws/request.Request" representing the // client's request for the GetRestApi operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6672,7 +6649,7 @@ const opGetRestApis = "GetRestApis" // GetRestApisRequest generates a "aws/request.Request" representing the // client's request for the GetRestApis operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6812,7 +6789,7 @@ const opGetSdk = "GetSdk" // GetSdkRequest generates a "aws/request.Request" representing the // client's request for the GetSdk operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6903,7 +6880,7 @@ const opGetSdkType = "GetSdkType" // GetSdkTypeRequest generates a "aws/request.Request" representing the // client's request for the GetSdkType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6984,7 +6961,7 @@ const opGetSdkTypes = "GetSdkTypes" // GetSdkTypesRequest generates a "aws/request.Request" representing the // client's request for the GetSdkTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7062,7 +7039,7 @@ const opGetStage = "GetStage" // GetStageRequest generates a "aws/request.Request" representing the // client's request for the GetStage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7145,7 +7122,7 @@ const opGetStages = "GetStages" // GetStagesRequest generates a "aws/request.Request" representing the // client's request for the GetStages operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7228,7 +7205,7 @@ const opGetTags = "GetTags" // GetTagsRequest generates a "aws/request.Request" representing the // client's request for the GetTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7318,7 +7295,7 @@ const opGetUsage = "GetUsage" // GetUsageRequest generates a "aws/request.Request" representing the // client's request for the GetUsage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7461,7 +7438,7 @@ const opGetUsagePlan = "GetUsagePlan" // GetUsagePlanRequest generates a "aws/request.Request" representing the // client's request for the GetUsagePlan operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7548,7 +7525,7 @@ const opGetUsagePlanKey = "GetUsagePlanKey" // GetUsagePlanKeyRequest generates a "aws/request.Request" representing the // client's request for the GetUsagePlanKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7635,7 +7612,7 @@ const opGetUsagePlanKeys = "GetUsagePlanKeys" // GetUsagePlanKeysRequest generates a "aws/request.Request" representing the // client's request for the GetUsagePlanKeys operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7779,7 +7756,7 @@ const opGetUsagePlans = "GetUsagePlans" // GetUsagePlansRequest generates a "aws/request.Request" representing the // client's request for the GetUsagePlans operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7926,7 +7903,7 @@ const opGetVpcLink = "GetVpcLink" // GetVpcLinkRequest generates a "aws/request.Request" representing the // client's request for the GetVpcLink operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8009,7 +7986,7 @@ const opGetVpcLinks = "GetVpcLinks" // GetVpcLinksRequest generates a "aws/request.Request" representing the // client's request for the GetVpcLinks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8149,7 +8126,7 @@ const opImportApiKeys = "ImportApiKeys" // ImportApiKeysRequest generates a "aws/request.Request" representing the // client's request for the ImportApiKeys operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8243,7 +8220,7 @@ const opImportDocumentationParts = "ImportDocumentationParts" // ImportDocumentationPartsRequest generates a "aws/request.Request" representing the // client's request for the ImportDocumentationParts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8331,7 +8308,7 @@ const opImportRestApi = "ImportRestApi" // ImportRestApiRequest generates a "aws/request.Request" representing the // client's request for the ImportRestApi operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8423,7 +8400,7 @@ const opPutGatewayResponse = "PutGatewayResponse" // PutGatewayResponseRequest generates a "aws/request.Request" representing the // client's request for the PutGatewayResponse operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8514,7 +8491,7 @@ const opPutIntegration = "PutIntegration" // PutIntegrationRequest generates a "aws/request.Request" representing the // client's request for the PutIntegration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8605,7 +8582,7 @@ const opPutIntegrationResponse = "PutIntegrationResponse" // PutIntegrationResponseRequest generates a "aws/request.Request" representing the // client's request for the PutIntegrationResponse operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8699,7 +8676,7 @@ const opPutMethod = "PutMethod" // PutMethodRequest generates a "aws/request.Request" representing the // client's request for the PutMethod operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8793,7 +8770,7 @@ const opPutMethodResponse = "PutMethodResponse" // PutMethodResponseRequest generates a "aws/request.Request" representing the // client's request for the PutMethodResponse operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8887,7 +8864,7 @@ const opPutRestApi = "PutRestApi" // PutRestApiRequest generates a "aws/request.Request" representing the // client's request for the PutRestApi operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8984,7 +8961,7 @@ const opTagResource = "TagResource" // TagResourceRequest generates a "aws/request.Request" representing the // client's request for the TagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9016,8 +8993,7 @@ func (c *APIGateway) TagResourceRequest(input *TagResourceInput) (req *request.R output = &TagResourceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -9080,7 +9056,7 @@ const opTestInvokeAuthorizer = "TestInvokeAuthorizer" // TestInvokeAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the TestInvokeAuthorizer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9120,7 +9096,7 @@ func (c *APIGateway) TestInvokeAuthorizerRequest(input *TestInvokeAuthorizerInpu // Simulate the execution of an Authorizer in your RestApi with headers, parameters, // and an incoming request body. // -// Enable custom authorizers (http://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html) +// Enable custom authorizers (https://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.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 @@ -9170,7 +9146,7 @@ const opTestInvokeMethod = "TestInvokeMethod" // TestInvokeMethodRequest generates a "aws/request.Request" representing the // client's request for the TestInvokeMethod operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9258,7 +9234,7 @@ const opUntagResource = "UntagResource" // UntagResourceRequest generates a "aws/request.Request" representing the // client's request for the UntagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9290,8 +9266,7 @@ func (c *APIGateway) UntagResourceRequest(input *UntagResourceInput) (req *reque output = &UntagResourceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -9351,7 +9326,7 @@ const opUpdateAccount = "UpdateAccount" // UpdateAccountRequest generates a "aws/request.Request" representing the // client's request for the UpdateAccount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9438,7 +9413,7 @@ const opUpdateApiKey = "UpdateApiKey" // UpdateApiKeyRequest generates a "aws/request.Request" representing the // client's request for the UpdateApiKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9529,7 +9504,7 @@ const opUpdateAuthorizer = "UpdateAuthorizer" // UpdateAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the UpdateAuthorizer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9568,7 +9543,7 @@ func (c *APIGateway) UpdateAuthorizerRequest(input *UpdateAuthorizerInput) (req // // Updates an existing Authorizer resource. // -// AWS CLI (http://docs.aws.amazon.com/cli/latest/reference/apigateway/update-authorizer.html) +// AWS CLI (https://docs.aws.amazon.com/cli/latest/reference/apigateway/update-authorizer.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 @@ -9618,7 +9593,7 @@ const opUpdateBasePathMapping = "UpdateBasePathMapping" // UpdateBasePathMappingRequest generates a "aws/request.Request" representing the // client's request for the UpdateBasePathMapping operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9709,7 +9684,7 @@ const opUpdateClientCertificate = "UpdateClientCertificate" // UpdateClientCertificateRequest generates a "aws/request.Request" representing the // client's request for the UpdateClientCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9796,7 +9771,7 @@ const opUpdateDeployment = "UpdateDeployment" // UpdateDeploymentRequest generates a "aws/request.Request" representing the // client's request for the UpdateDeployment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9887,7 +9862,7 @@ const opUpdateDocumentationPart = "UpdateDocumentationPart" // UpdateDocumentationPartRequest generates a "aws/request.Request" representing the // client's request for the UpdateDocumentationPart operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9979,7 +9954,7 @@ const opUpdateDocumentationVersion = "UpdateDocumentationVersion" // UpdateDocumentationVersionRequest generates a "aws/request.Request" representing the // client's request for the UpdateDocumentationVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10068,7 +10043,7 @@ const opUpdateDomainName = "UpdateDomainName" // UpdateDomainNameRequest generates a "aws/request.Request" representing the // client's request for the UpdateDomainName operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10159,7 +10134,7 @@ const opUpdateGatewayResponse = "UpdateGatewayResponse" // UpdateGatewayResponseRequest generates a "aws/request.Request" representing the // client's request for the UpdateGatewayResponse operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10246,7 +10221,7 @@ const opUpdateIntegration = "UpdateIntegration" // UpdateIntegrationRequest generates a "aws/request.Request" representing the // client's request for the UpdateIntegration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10337,7 +10312,7 @@ const opUpdateIntegrationResponse = "UpdateIntegrationResponse" // UpdateIntegrationResponseRequest generates a "aws/request.Request" representing the // client's request for the UpdateIntegrationResponse operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10428,7 +10403,7 @@ const opUpdateMethod = "UpdateMethod" // UpdateMethodRequest generates a "aws/request.Request" representing the // client's request for the UpdateMethod operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10519,7 +10494,7 @@ const opUpdateMethodResponse = "UpdateMethodResponse" // UpdateMethodResponseRequest generates a "aws/request.Request" representing the // client's request for the UpdateMethodResponse operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10613,7 +10588,7 @@ const opUpdateModel = "UpdateModel" // UpdateModelRequest generates a "aws/request.Request" representing the // client's request for the UpdateModel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10704,7 +10679,7 @@ const opUpdateRequestValidator = "UpdateRequestValidator" // UpdateRequestValidatorRequest generates a "aws/request.Request" representing the // client's request for the UpdateRequestValidator operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10791,7 +10766,7 @@ const opUpdateResource = "UpdateResource" // UpdateResourceRequest generates a "aws/request.Request" representing the // client's request for the UpdateResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10882,7 +10857,7 @@ const opUpdateRestApi = "UpdateRestApi" // UpdateRestApiRequest generates a "aws/request.Request" representing the // client's request for the UpdateRestApi operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10973,7 +10948,7 @@ const opUpdateStage = "UpdateStage" // UpdateStageRequest generates a "aws/request.Request" representing the // client's request for the UpdateStage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11064,7 +11039,7 @@ const opUpdateUsage = "UpdateUsage" // UpdateUsageRequest generates a "aws/request.Request" representing the // client's request for the UpdateUsage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11152,7 +11127,7 @@ const opUpdateUsagePlan = "UpdateUsagePlan" // UpdateUsagePlanRequest generates a "aws/request.Request" representing the // client's request for the UpdateUsagePlan operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11243,7 +11218,7 @@ const opUpdateVpcLink = "UpdateVpcLink" // UpdateVpcLinkRequest generates a "aws/request.Request" representing the // client's request for the UpdateVpcLink operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11338,7 +11313,7 @@ type AccessLogSettings struct { DestinationArn *string `locationName:"destinationArn" type:"string"` // A single line format of the access logs of data, as specified by selected - // $context variables (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#context-variable-reference). + // $context variables (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#context-variable-reference). // The format must include at least $context.requestId. Format *string `locationName:"format" type:"string"` } @@ -11377,7 +11352,7 @@ func (s *AccessLogSettings) SetFormat(v string) *AccessLogSettings { // NotFoundException // TooManyRequestsException // For detailed error code information, including the corresponding HTTP Status -// Codes, see API Gateway Error Codes (http://docs.aws.amazon.com/apigateway/api-reference/handling-errors/#api-error-codes) +// Codes, see API Gateway Error Codes (https://docs.aws.amazon.com/apigateway/api-reference/handling-errors/#api-error-codes) // // Example: Get the information about an account. // @@ -11391,16 +11366,16 @@ func (s *AccessLogSettings) SetFormat(v string) *AccessLogSettings { // The successful response returns a 200 OK status code and a payload similar // to the following: // -// { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/account-apigateway-{rel}.html", +// { "_links": { "curies": { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/account-apigateway-{rel}.html", // "name": "account", "templated": true }, "self": { "href": "/account" }, "account:update": // { "href": "/account" } }, "cloudwatchRoleArn": "arn:aws:iam::123456789012:role/apigAwsProxyRole", // "throttleSettings": { "rateLimit": 500, "burstLimit": 1000 } } // In addition to making the REST API call directly, you can use the AWS CLI // and an AWS SDK to access this resource. // -// API Gateway Limits (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-limits.html)Developer -// Guide (http://docs.aws.amazon.com/apigateway/latest/developerguide/welcome.html), -// AWS CLI (http://docs.aws.amazon.com/cli/latest/reference/apigateway/get-account.html) +// API Gateway Limits (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-limits.html)Developer +// Guide (https://docs.aws.amazon.com/apigateway/latest/developerguide/welcome.html), +// AWS CLI (https://docs.aws.amazon.com/cli/latest/reference/apigateway/get-account.html) type Account struct { _ struct{} `type:"structure"` @@ -11457,7 +11432,7 @@ func (s *Account) SetThrottleSettings(v *ThrottleSettings) *Account { // which indicates that the callers with the API key can make requests to that // stage. // -// Use API Keys (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-api-keys.html) +// Use API Keys (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-api-keys.html) type ApiKey struct { _ struct{} `type:"structure"` @@ -11600,11 +11575,11 @@ func (s *ApiStage) SetThrottle(v map[string]*ThrottleSettings) *ApiStage { // Represents an authorization layer for methods. If enabled on a method, API // Gateway will activate the authorizer when a client calls the method. // -// Enable custom authorization (http://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html) +// Enable custom authorization (https://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html) type Authorizer struct { _ struct{} `type:"structure"` - // Optional customer-defined field, used in Swagger imports and exports without + // Optional customer-defined field, used in OpenAPI imports and exports without // functional impact. AuthType *string `locationName:"authType" type:"string"` @@ -11750,7 +11725,7 @@ func (s *Authorizer) SetType(v string) *Authorizer { // // A custom domain name plus a BasePathMapping specification identifies a deployed // RestApi in a given stage of the owner Account. -// Use Custom Domain Names (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) +// Use Custom Domain Names (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) type BasePathMapping struct { _ struct{} `type:"structure"` @@ -11853,7 +11828,7 @@ func (s *CanarySettings) SetUseStageCache(v bool) *CanarySettings { // Client certificates are used to authenticate an API by the backend server. // To authenticate an API client (or user), use IAM roles and policies, a custom // Authorizer or an Amazon Cognito user pool. -// Use Client-Side Certificate (http://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started-client-side-ssl-authentication.html) +// Use Client-Side Certificate (https://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started-client-side-ssl-authentication.html) type ClientCertificate struct { _ struct{} `type:"structure"` @@ -11998,7 +11973,7 @@ func (s *CreateApiKeyInput) SetValue(v string) *CreateApiKeyInput { type CreateAuthorizerInput struct { _ struct{} `type:"structure"` - // Optional customer-defined field, used in Swagger imports and exports without + // Optional customer-defined field, used in OpenAPI imports and exports without // functional impact. AuthType *string `locationName:"authType" type:"string"` @@ -12094,6 +12069,9 @@ func (s *CreateAuthorizerInput) Validate() error { if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if s.Type == nil { invalidParams.Add(request.NewErrParamRequired("Type")) } @@ -12206,6 +12184,9 @@ func (s *CreateBasePathMappingInput) Validate() error { if s.DomainName == nil { invalidParams.Add(request.NewErrParamRequired("DomainName")) } + if s.DomainName != nil && len(*s.DomainName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } @@ -12294,6 +12275,9 @@ func (s *CreateDeploymentInput) Validate() error { if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -12366,7 +12350,7 @@ type CreateDocumentationPartInput struct { Location *DocumentationPartLocation `locationName:"location" type:"structure" required:"true"` // [Required] The new documentation content map of the targeted API entity. - // Enclosed key-value pairs are API-specific, but only Swagger-compliant key-value + // Enclosed key-value pairs are API-specific, but only OpenAPI-compliant key-value // pairs can be exported and, hence, published. // // Properties is a required field @@ -12400,6 +12384,9 @@ func (s *CreateDocumentationPartInput) Validate() error { if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if s.Location != nil { if err := s.Location.Validate(); err != nil { invalidParams.AddNested("Location", err.(request.ErrInvalidParams)) @@ -12470,6 +12457,9 @@ func (s *CreateDocumentationVersionInput) Validate() error { if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -12676,6 +12666,9 @@ func (s *CreateModelInput) Validate() error { if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -12750,6 +12743,9 @@ func (s *CreateRequestValidatorInput) Validate() error { if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -12817,12 +12813,18 @@ func (s *CreateResourceInput) Validate() error { if s.ParentId == nil { invalidParams.Add(request.NewErrParamRequired("ParentId")) } + if s.ParentId != nil && len(*s.ParentId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ParentId", 1)) + } if s.PathPart == nil { invalidParams.Add(request.NewErrParamRequired("PathPart")) } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -13037,6 +13039,9 @@ func (s *CreateStageInput) Validate() error { if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if s.StageName == nil { invalidParams.Add(request.NewErrParamRequired("StageName")) } @@ -13234,6 +13239,9 @@ func (s *CreateUsagePlanKeyInput) Validate() error { if s.UsagePlanId == nil { invalidParams.Add(request.NewErrParamRequired("UsagePlanId")) } + if s.UsagePlanId != nil && len(*s.UsagePlanId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UsagePlanId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -13352,6 +13360,9 @@ func (s *DeleteApiKeyInput) Validate() error { if s.ApiKey == nil { invalidParams.Add(request.NewErrParamRequired("ApiKey")) } + if s.ApiKey != nil && len(*s.ApiKey) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiKey", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -13410,9 +13421,15 @@ func (s *DeleteAuthorizerInput) Validate() error { if s.AuthorizerId == nil { invalidParams.Add(request.NewErrParamRequired("AuthorizerId")) } + if s.AuthorizerId != nil && len(*s.AuthorizerId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AuthorizerId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -13477,9 +13494,15 @@ func (s *DeleteBasePathMappingInput) Validate() error { if s.BasePath == nil { invalidParams.Add(request.NewErrParamRequired("BasePath")) } + if s.BasePath != nil && len(*s.BasePath) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BasePath", 1)) + } if s.DomainName == nil { invalidParams.Add(request.NewErrParamRequired("DomainName")) } + if s.DomainName != nil && len(*s.DomainName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -13539,6 +13562,9 @@ func (s *DeleteClientCertificateInput) Validate() error { if s.ClientCertificateId == nil { invalidParams.Add(request.NewErrParamRequired("ClientCertificateId")) } + if s.ClientCertificateId != nil && len(*s.ClientCertificateId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClientCertificateId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -13597,9 +13623,15 @@ func (s *DeleteDeploymentInput) Validate() error { if s.DeploymentId == nil { invalidParams.Add(request.NewErrParamRequired("DeploymentId")) } + if s.DeploymentId != nil && len(*s.DeploymentId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeploymentId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -13664,9 +13696,15 @@ func (s *DeleteDocumentationPartInput) Validate() error { if s.DocumentationPartId == nil { invalidParams.Add(request.NewErrParamRequired("DocumentationPartId")) } + if s.DocumentationPartId != nil && len(*s.DocumentationPartId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DocumentationPartId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -13731,9 +13769,15 @@ func (s *DeleteDocumentationVersionInput) Validate() error { if s.DocumentationVersion == nil { invalidParams.Add(request.NewErrParamRequired("DocumentationVersion")) } + if s.DocumentationVersion != nil && len(*s.DocumentationVersion) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DocumentationVersion", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -13793,6 +13837,9 @@ func (s *DeleteDomainNameInput) Validate() error { if s.DomainName == nil { invalidParams.Add(request.NewErrParamRequired("DomainName")) } + if s.DomainName != nil && len(*s.DomainName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -13872,9 +13919,15 @@ func (s *DeleteGatewayResponseInput) Validate() error { if s.ResponseType == nil { invalidParams.Add(request.NewErrParamRequired("ResponseType")) } + if s.ResponseType != nil && len(*s.ResponseType) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResponseType", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -13944,12 +13997,21 @@ func (s *DeleteIntegrationInput) Validate() error { if s.HttpMethod == nil { invalidParams.Add(request.NewErrParamRequired("HttpMethod")) } + if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) + } if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -14030,15 +14092,27 @@ func (s *DeleteIntegrationResponseInput) Validate() error { if s.HttpMethod == nil { invalidParams.Add(request.NewErrParamRequired("HttpMethod")) } + if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) + } if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if s.StatusCode == nil { invalidParams.Add(request.NewErrParamRequired("StatusCode")) } + if s.StatusCode != nil && len(*s.StatusCode) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StatusCode", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -14120,12 +14194,21 @@ func (s *DeleteMethodInput) Validate() error { if s.HttpMethod == nil { invalidParams.Add(request.NewErrParamRequired("HttpMethod")) } + if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) + } if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -14206,15 +14289,27 @@ func (s *DeleteMethodResponseInput) Validate() error { if s.HttpMethod == nil { invalidParams.Add(request.NewErrParamRequired("HttpMethod")) } + if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) + } if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if s.StatusCode == nil { invalidParams.Add(request.NewErrParamRequired("StatusCode")) } + if s.StatusCode != nil && len(*s.StatusCode) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StatusCode", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -14291,9 +14386,15 @@ func (s *DeleteModelInput) Validate() error { if s.ModelName == nil { invalidParams.Add(request.NewErrParamRequired("ModelName")) } + if s.ModelName != nil && len(*s.ModelName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ModelName", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -14358,9 +14459,15 @@ func (s *DeleteRequestValidatorInput) Validate() error { if s.RequestValidatorId == nil { invalidParams.Add(request.NewErrParamRequired("RequestValidatorId")) } + if s.RequestValidatorId != nil && len(*s.RequestValidatorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RequestValidatorId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -14425,9 +14532,15 @@ func (s *DeleteResourceInput) Validate() error { if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -14487,6 +14600,9 @@ func (s *DeleteRestApiInput) Validate() error { if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -14545,9 +14661,15 @@ func (s *DeleteStageInput) Validate() error { if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if s.StageName == nil { invalidParams.Add(request.NewErrParamRequired("StageName")) } + if s.StageName != nil && len(*s.StageName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -14607,6 +14729,9 @@ func (s *DeleteUsagePlanInput) Validate() error { if s.UsagePlanId == nil { invalidParams.Add(request.NewErrParamRequired("UsagePlanId")) } + if s.UsagePlanId != nil && len(*s.UsagePlanId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UsagePlanId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -14653,9 +14778,15 @@ func (s *DeleteUsagePlanKeyInput) Validate() error { 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.UsagePlanId == nil { invalidParams.Add(request.NewErrParamRequired("UsagePlanId")) } + if s.UsagePlanId != nil && len(*s.UsagePlanId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UsagePlanId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -14730,6 +14861,9 @@ func (s *DeleteVpcLinkInput) Validate() error { if s.VpcLinkId == nil { invalidParams.Add(request.NewErrParamRequired("VpcLinkId")) } + if s.VpcLinkId != nil && len(*s.VpcLinkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VpcLinkId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -14765,7 +14899,7 @@ func (s DeleteVpcLinkOutput) GoString() string { // To view, update, or delete a deployment, call GET, PATCH, or DELETE on the // specified deployment resource (/restapis/{restapi_id}/deployments/{deployment_id}). // -// RestApi, Deployments, Stage, AWS CLI (http://docs.aws.amazon.com/cli/latest/reference/apigateway/get-deployment.html), +// RestApi, Deployments, Stage, AWS CLI (https://docs.aws.amazon.com/cli/latest/reference/apigateway/get-deployment.html), // AWS SDKs (https://aws.amazon.com/tools/) type Deployment struct { _ struct{} `type:"structure"` @@ -14874,11 +15008,11 @@ func (s *DeploymentCanarySettings) SetUseStageCache(v bool) *DeploymentCanarySet // on the API entity type. All valid fields are not required. // // The content map is a JSON string of API-specific key-value pairs. Although -// an API can use any shape for the content map, only the Swagger-compliant +// an API can use any shape for the content map, only the OpenAPI-compliant // documentation fields will be injected into the associated API entity definition -// in the exported Swagger definition file. +// in the exported OpenAPI definition file. // -// Documenting an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api.html), +// Documenting an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api.html), // DocumentationParts type DocumentationPart struct { _ struct{} `type:"structure"` @@ -14896,10 +15030,10 @@ type DocumentationPart struct { // A content map of API-specific key-value pairs describing the targeted API // entity. The map must be encoded as a JSON string, e.g., "{ \"description\": - // \"The API does ...\" }". Only Swagger-compliant documentation-related fields + // \"The API does ...\" }". Only OpenAPI-compliant documentation-related fields // from the properties map are exported and, hence, published as part of the // API entity definitions, while the original documentation parts are exported - // in a Swagger extension of x-amazon-apigateway-documentation. + // in a OpenAPI extension of x-amazon-apigateway-documentation. Properties *string `locationName:"properties" type:"string"` } @@ -15034,9 +15168,9 @@ func (s *DocumentationPartLocation) SetType(v string) *DocumentationPartLocation // // Publishing API documentation involves creating a documentation version associated // with an API stage and exporting the versioned documentation to an external -// (e.g., Swagger) file. +// (e.g., OpenAPI) file. // -// Documenting an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api.html), +// Documenting an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api.html), // DocumentationPart, DocumentationVersions type DocumentationVersion struct { _ struct{} `type:"structure"` @@ -15090,7 +15224,7 @@ func (s *DocumentationVersion) SetVersion(v string) *DocumentationVersion { // where myApi is the base path mapping (BasePathMapping) of your API under // the custom domain name. // -// Set a Custom Host Name for an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) +// Set a Custom Host Name for an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) type DomainName struct { _ struct{} `type:"structure"` @@ -15111,13 +15245,13 @@ type DomainName struct { // custom domain name for an edge-optimized endpoint. You set up this association // when adding a DNS record pointing the custom domain name to this distribution // name. For more information about CloudFront distributions, see the Amazon - // CloudFront documentation (http://aws.amazon.com/documentation/cloudfront/). + // CloudFront documentation (https://aws.amazon.com/documentation/cloudfront/). DistributionDomainName *string `locationName:"distributionDomainName" type:"string"` // The region-agnostic Amazon Route 53 Hosted Zone ID of the edge-optimized // endpoint. The valid value is Z2FDTNDATAQYW2 for all the regions. For more // information, see Set up a Regional Custom Domain Name (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-regional-api-custom-domain-create.html) - // and AWS Regions and Endpoints for API Gateway (http://docs.aws.amazon.com/general/latest/gr/rande.html#apigateway_region). + // and AWS Regions and Endpoints for API Gateway (https://docs.aws.amazon.com/general/latest/gr/rande.html#apigateway_region). DistributionHostedZoneId *string `locationName:"distributionHostedZoneId" type:"string"` // The custom domain name as an API host name, for example, my-api.example.com. @@ -15143,7 +15277,7 @@ type DomainName struct { // The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint. // For more information, see Set up a Regional Custom Domain Name (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-regional-api-custom-domain-create.html) - // and AWS Regions and Endpoints for API Gateway (http://docs.aws.amazon.com/general/latest/gr/rande.html#apigateway_region). + // and AWS Regions and Endpoints for API Gateway (https://docs.aws.amazon.com/general/latest/gr/rande.html#apigateway_region). RegionalHostedZoneId *string `locationName:"regionalHostedZoneId" type:"string"` } @@ -15282,9 +15416,15 @@ func (s *FlushStageAuthorizersCacheInput) Validate() error { if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if s.StageName == nil { invalidParams.Add(request.NewErrParamRequired("StageName")) } + if s.StageName != nil && len(*s.StageName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -15349,9 +15489,15 @@ func (s *FlushStageCacheInput) Validate() error { if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if s.StageName == nil { invalidParams.Add(request.NewErrParamRequired("StageName")) } + if s.StageName != nil && len(*s.StageName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -15454,6 +15600,9 @@ func (s *GetApiKeyInput) Validate() error { if s.ApiKey == nil { invalidParams.Add(request.NewErrParamRequired("ApiKey")) } + if s.ApiKey != nil && len(*s.ApiKey) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiKey", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -15538,7 +15687,7 @@ func (s *GetApiKeysInput) SetPosition(v string) *GetApiKeysInput { // Represents a collection of API keys as represented by an ApiKeys resource. // -// Use API Keys (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-api-keys.html) +// Use API Keys (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-api-keys.html) type GetApiKeysOutput struct { _ struct{} `type:"structure"` @@ -15611,9 +15760,15 @@ func (s *GetAuthorizerInput) Validate() error { if s.AuthorizerId == nil { invalidParams.Add(request.NewErrParamRequired("AuthorizerId")) } + if s.AuthorizerId != nil && len(*s.AuthorizerId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AuthorizerId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -15666,6 +15821,9 @@ func (s *GetAuthorizersInput) Validate() error { if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -15693,7 +15851,7 @@ func (s *GetAuthorizersInput) SetRestApiId(v string) *GetAuthorizersInput { // Represents a collection of Authorizer resources. // -// Enable custom authorization (http://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html) +// Enable custom authorization (https://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html) type GetAuthorizersOutput struct { _ struct{} `type:"structure"` @@ -15759,9 +15917,15 @@ func (s *GetBasePathMappingInput) Validate() error { if s.BasePath == nil { invalidParams.Add(request.NewErrParamRequired("BasePath")) } + if s.BasePath != nil && len(*s.BasePath) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BasePath", 1)) + } if s.DomainName == nil { invalidParams.Add(request.NewErrParamRequired("DomainName")) } + if s.DomainName != nil && len(*s.DomainName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -15814,6 +15978,9 @@ func (s *GetBasePathMappingsInput) Validate() error { if s.DomainName == nil { invalidParams.Add(request.NewErrParamRequired("DomainName")) } + if s.DomainName != nil && len(*s.DomainName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -15841,7 +16008,7 @@ func (s *GetBasePathMappingsInput) SetPosition(v string) *GetBasePathMappingsInp // Represents a collection of BasePathMapping resources. // -// Use Custom Domain Names (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) +// Use Custom Domain Names (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) type GetBasePathMappingsOutput struct { _ struct{} `type:"structure"` @@ -15899,6 +16066,9 @@ func (s *GetClientCertificateInput) Validate() error { if s.ClientCertificateId == nil { invalidParams.Add(request.NewErrParamRequired("ClientCertificateId")) } + if s.ClientCertificateId != nil && len(*s.ClientCertificateId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClientCertificateId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -15948,7 +16118,7 @@ func (s *GetClientCertificatesInput) SetPosition(v string) *GetClientCertificate // Represents a collection of ClientCertificate resources. // -// Use Client-Side Certificate (http://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started-client-side-ssl-authentication.html) +// Use Client-Side Certificate (https://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started-client-side-ssl-authentication.html) type GetClientCertificatesOutput struct { _ struct{} `type:"structure"` @@ -16020,9 +16190,15 @@ func (s *GetDeploymentInput) Validate() error { if s.DeploymentId == nil { invalidParams.Add(request.NewErrParamRequired("DeploymentId")) } + if s.DeploymentId != nil && len(*s.DeploymentId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeploymentId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -16081,6 +16257,9 @@ func (s *GetDeploymentsInput) Validate() error { if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -16115,8 +16294,8 @@ func (s *GetDeploymentsInput) SetRestApiId(v string) *GetDeploymentsInput { // resource. To view, update, or delete an existing deployment, make a GET, // PATCH, or DELETE request, respectively, on a specified Deployment resource. // -// Deploying an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-deploy-api.html), -// AWS CLI (http://docs.aws.amazon.com/cli/latest/reference/apigateway/get-deployment.html), +// Deploying an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-deploy-api.html), +// AWS CLI (https://docs.aws.amazon.com/cli/latest/reference/apigateway/get-deployment.html), // AWS SDKs (https://aws.amazon.com/tools/) type GetDeploymentsOutput struct { _ struct{} `type:"structure"` @@ -16180,9 +16359,15 @@ func (s *GetDocumentationPartInput) Validate() error { if s.DocumentationPartId == nil { invalidParams.Add(request.NewErrParamRequired("DocumentationPartId")) } + if s.DocumentationPartId != nil && len(*s.DocumentationPartId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DocumentationPartId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -16250,6 +16435,9 @@ func (s *GetDocumentationPartsInput) Validate() error { if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -16301,7 +16489,7 @@ func (s *GetDocumentationPartsInput) SetType(v string) *GetDocumentationPartsInp // The collection of documentation parts of an API. // -// Documenting an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api.html), DocumentationPart +// Documenting an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api.html), DocumentationPart type GetDocumentationPartsOutput struct { _ struct{} `type:"structure"` @@ -16364,9 +16552,15 @@ func (s *GetDocumentationVersionInput) Validate() error { if s.DocumentationVersion == nil { invalidParams.Add(request.NewErrParamRequired("DocumentationVersion")) } + if s.DocumentationVersion != nil && len(*s.DocumentationVersion) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DocumentationVersion", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -16419,6 +16613,9 @@ func (s *GetDocumentationVersionsInput) Validate() error { if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -16449,7 +16646,7 @@ func (s *GetDocumentationVersionsInput) SetRestApiId(v string) *GetDocumentation // Use the DocumentationVersions to manage documentation snapshots associated // with various API stages. // -// Documenting an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api.html), +// Documenting an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api.html), // DocumentationPart, DocumentationVersion type GetDocumentationVersionsOutput struct { _ struct{} `type:"structure"` @@ -16508,6 +16705,9 @@ func (s *GetDomainNameInput) Validate() error { if s.DomainName == nil { invalidParams.Add(request.NewErrParamRequired("DomainName")) } + if s.DomainName != nil && len(*s.DomainName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -16557,7 +16757,7 @@ func (s *GetDomainNamesInput) SetPosition(v string) *GetDomainNamesInput { // Represents a collection of DomainName resources. // -// Use Client-Side Certificate (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) +// Use Client-Side Certificate (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) type GetDomainNamesOutput struct { _ struct{} `type:"structure"` @@ -16594,18 +16794,19 @@ type GetExportInput struct { _ struct{} `type:"structure"` // The content-type of the export, for example application/json. Currently application/json - // and application/yaml are supported for exportType of swagger. This should - // be specified in the Accept header for direct API requests. + // and application/yaml are supported for exportType ofoas30 and swagger. This + // should be specified in the Accept header for direct API requests. Accepts *string `location:"header" locationName:"Accept" type:"string"` - // [Required] The type of export. Currently only 'swagger' is supported. + // [Required] The type of export. Acceptable values are 'oas30' for OpenAPI + // 3.0.x and 'swagger' for Swagger/OpenAPI 2.0. // // ExportType is a required field ExportType *string `location:"uri" locationName:"export_type" type:"string" required:"true"` // A key-value map of query string parameters that specify properties of the - // export, depending on the requested exportType. For exportTypeswagger, any - // combination of the following parameters are supported: extensions='integrations' + // export, depending on the requested exportType. For exportTypeoas30 and swagger, + // any combination of the following parameters are supported: extensions='integrations' // or extensions='apigateway' will export the API with x-amazon-apigateway-integration // extensions. extensions='authorizers' will export the API with x-amazon-apigateway-authorizer // extensions. postman will export the API with Postman extensions, allowing @@ -16639,12 +16840,21 @@ func (s *GetExportInput) Validate() error { if s.ExportType == nil { invalidParams.Add(request.NewErrParamRequired("ExportType")) } + if s.ExportType != nil && len(*s.ExportType) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ExportType", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if s.StageName == nil { invalidParams.Add(request.NewErrParamRequired("StageName")) } + if s.StageName != nil && len(*s.StageName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -16776,9 +16986,15 @@ func (s *GetGatewayResponseInput) Validate() error { if s.ResponseType == nil { invalidParams.Add(request.NewErrParamRequired("ResponseType")) } + if s.ResponseType != nil && len(*s.ResponseType) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResponseType", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -16836,6 +17052,9 @@ func (s *GetGatewayResponsesInput) Validate() error { if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -16866,7 +17085,7 @@ func (s *GetGatewayResponsesInput) SetRestApiId(v string) *GetGatewayResponsesIn // this collection. // // For more information about valid gateway response types, see Gateway Response -// Types Supported by API Gateway (http://docs.aws.amazon.com/apigateway/latest/developerguide/supported-gateway-response-types.html)Example: +// Types Supported by API Gateway (https://docs.aws.amazon.com/apigateway/latest/developerguide/supported-gateway-response-types.html)Example: // Get the collection of gateway responses of an API // // Request @@ -17020,7 +17239,7 @@ func (s *GetGatewayResponsesInput) SetRestApiId(v string) *GetGatewayResponsesIn // { "application/json": "{\"message\":$context.error.messageString}" }, "responseType": // "AUTHORIZER_FAILURE", "statusCode": "500" } ] } } // -// Customize Gateway Responses (http://docs.aws.amazon.com/apigateway/latest/developerguide/customize-gateway-responses.html) +// Customize Gateway Responses (https://docs.aws.amazon.com/apigateway/latest/developerguide/customize-gateway-responses.html) type GetGatewayResponsesOutput struct { _ struct{} `type:"structure"` @@ -17088,12 +17307,21 @@ func (s *GetIntegrationInput) Validate() error { if s.HttpMethod == nil { invalidParams.Add(request.NewErrParamRequired("HttpMethod")) } + if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) + } if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -17160,15 +17388,27 @@ func (s *GetIntegrationResponseInput) Validate() error { if s.HttpMethod == nil { invalidParams.Add(request.NewErrParamRequired("HttpMethod")) } + if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) + } if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if s.StatusCode == nil { invalidParams.Add(request.NewErrParamRequired("StatusCode")) } + if s.StatusCode != nil && len(*s.StatusCode) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StatusCode", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -17236,12 +17476,21 @@ func (s *GetMethodInput) Validate() error { if s.HttpMethod == nil { invalidParams.Add(request.NewErrParamRequired("HttpMethod")) } + if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) + } if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -17308,15 +17557,27 @@ func (s *GetMethodResponseInput) Validate() error { if s.HttpMethod == nil { invalidParams.Add(request.NewErrParamRequired("HttpMethod")) } + if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) + } if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if s.StatusCode == nil { invalidParams.Add(request.NewErrParamRequired("StatusCode")) } + if s.StatusCode != nil && len(*s.StatusCode) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StatusCode", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -17384,9 +17645,15 @@ func (s *GetModelInput) Validate() error { if s.ModelName == nil { invalidParams.Add(request.NewErrParamRequired("ModelName")) } + if s.ModelName != nil && len(*s.ModelName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ModelName", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -17443,9 +17710,15 @@ func (s *GetModelTemplateInput) Validate() error { if s.ModelName == nil { invalidParams.Add(request.NewErrParamRequired("ModelName")) } + if s.ModelName != nil && len(*s.ModelName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ModelName", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -17467,11 +17740,11 @@ func (s *GetModelTemplateInput) SetRestApiId(v string) *GetModelTemplateInput { // Represents a mapping template used to transform a payload. // -// Mapping Templates (http://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html#models-mappings-mappings) +// Mapping Templates (https://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html#models-mappings-mappings) type GetModelTemplateOutput struct { _ struct{} `type:"structure"` - // The Apache Velocity Template Language (VTL) (http://velocity.apache.org/engine/devel/vtl-reference-guide.html) + // The Apache Velocity Template Language (VTL) (https://velocity.apache.org/engine/devel/vtl-reference-guide.html) // template content used for the template resource. Value *string `locationName:"value" type:"string"` } @@ -17525,6 +17798,9 @@ func (s *GetModelsInput) Validate() error { if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -17552,7 +17828,7 @@ func (s *GetModelsInput) SetRestApiId(v string) *GetModelsInput { // Represents a collection of Model resources. // -// Method, MethodResponse, Models and Mappings (http://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html) +// Method, MethodResponse, Models and Mappings (https://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html) type GetModelsOutput struct { _ struct{} `type:"structure"` @@ -17615,9 +17891,15 @@ func (s *GetRequestValidatorInput) Validate() error { if s.RequestValidatorId == nil { invalidParams.Add(request.NewErrParamRequired("RequestValidatorId")) } + if s.RequestValidatorId != nil && len(*s.RequestValidatorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RequestValidatorId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -17670,6 +17952,9 @@ func (s *GetRequestValidatorsInput) Validate() error { if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -17697,11 +17982,11 @@ func (s *GetRequestValidatorsInput) SetRestApiId(v string) *GetRequestValidators // A collection of RequestValidator resources of a given RestApi. // -// In Swagger, the RequestValidators of an API is defined by the x-amazon-apigateway-request-validators -// (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-swagger-extensions.html#api-gateway-swagger-extensions-request-validators.html) +// In OpenAPI, the RequestValidators of an API is defined by the x-amazon-apigateway-request-validators +// (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-swagger-extensions.html#api-gateway-swagger-extensions-request-validators.html) // extension. // -// Enable Basic Request Validation in API Gateway (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-method-request-validation.html) +// Enable Basic Request Validation in API Gateway (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-method-request-validation.html) type GetRequestValidatorsOutput struct { _ struct{} `type:"structure"` @@ -17772,9 +18057,15 @@ func (s *GetResourceInput) Validate() error { if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -17841,6 +18132,9 @@ func (s *GetResourcesInput) Validate() error { if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -17874,7 +18168,7 @@ func (s *GetResourcesInput) SetRestApiId(v string) *GetResourcesInput { // Represents a collection of Resource resources. // -// Create an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) +// Create an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) type GetResourcesOutput struct { _ struct{} `type:"structure"` @@ -17932,6 +18226,9 @@ func (s *GetRestApiInput) Validate() error { if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -17982,7 +18279,7 @@ func (s *GetRestApisInput) SetPosition(v string) *GetRestApisInput { // Contains references to your APIs and links that guide you in how to interact // with your collection. A collection offers a paginated view of your APIs. // -// Create an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) +// Create an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) type GetRestApisOutput struct { _ struct{} `type:"structure"` @@ -18058,12 +18355,21 @@ func (s *GetSdkInput) Validate() error { if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if s.SdkType == nil { invalidParams.Add(request.NewErrParamRequired("SdkType")) } + if s.SdkType != nil && len(*s.SdkType) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SdkType", 1)) + } if s.StageName == nil { invalidParams.Add(request.NewErrParamRequired("StageName")) } + if s.StageName != nil && len(*s.StageName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -18163,6 +18469,9 @@ func (s *GetSdkTypeInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -18273,9 +18582,15 @@ func (s *GetStageInput) Validate() error { if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if s.StageName == nil { invalidParams.Add(request.NewErrParamRequired("StageName")) } + if s.StageName != nil && len(*s.StageName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -18324,6 +18639,9 @@ func (s *GetStagesInput) Validate() error { if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -18345,7 +18663,7 @@ func (s *GetStagesInput) SetRestApiId(v string) *GetStagesInput { // A list of Stage resources that are associated with the ApiKey resource. // -// Deploying API in Stages (http://docs.aws.amazon.com/apigateway/latest/developerguide/stages.html) +// Deploying API in Stages (https://docs.aws.amazon.com/apigateway/latest/developerguide/stages.html) type GetStagesOutput struct { _ struct{} `type:"structure"` @@ -18404,6 +18722,9 @@ func (s *GetTagsInput) Validate() error { if s.ResourceArn == nil { invalidParams.Add(request.NewErrParamRequired("ResourceArn")) } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -18506,6 +18827,9 @@ func (s *GetUsageInput) Validate() error { if s.UsagePlanId == nil { invalidParams.Add(request.NewErrParamRequired("UsagePlanId")) } + if s.UsagePlanId != nil && len(*s.UsagePlanId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UsagePlanId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -18575,6 +18899,9 @@ func (s *GetUsagePlanInput) Validate() error { if s.UsagePlanId == nil { invalidParams.Add(request.NewErrParamRequired("UsagePlanId")) } + if s.UsagePlanId != nil && len(*s.UsagePlanId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UsagePlanId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -18621,9 +18948,15 @@ func (s *GetUsagePlanKeyInput) Validate() error { 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.UsagePlanId == nil { invalidParams.Add(request.NewErrParamRequired("UsagePlanId")) } + if s.UsagePlanId != nil && len(*s.UsagePlanId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UsagePlanId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -18681,6 +19014,9 @@ func (s *GetUsagePlanKeysInput) Validate() error { if s.UsagePlanId == nil { invalidParams.Add(request.NewErrParamRequired("UsagePlanId")) } + if s.UsagePlanId != nil && len(*s.UsagePlanId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UsagePlanId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -18715,7 +19051,7 @@ func (s *GetUsagePlanKeysInput) SetUsagePlanId(v string) *GetUsagePlanKeysInput // Represents the collection of usage plan keys added to usage plans for the // associated API keys and, possibly, other types of keys. // -// Create and Use Usage Plans (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) +// Create and Use Usage Plans (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) type GetUsagePlanKeysOutput struct { _ struct{} `type:"structure"` @@ -18792,7 +19128,7 @@ func (s *GetUsagePlansInput) SetPosition(v string) *GetUsagePlansInput { // Represents a collection of usage plans for an AWS account. // -// Create and Use Usage Plans (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) +// Create and Use Usage Plans (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) type GetUsagePlansOutput struct { _ struct{} `type:"structure"` @@ -18851,6 +19187,9 @@ func (s *GetVpcLinkInput) Validate() error { if s.VpcLinkId == nil { invalidParams.Add(request.NewErrParamRequired("VpcLinkId")) } + if s.VpcLinkId != nil && len(*s.VpcLinkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VpcLinkId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -18900,8 +19239,8 @@ func (s *GetVpcLinksInput) SetPosition(v string) *GetVpcLinksInput { // The collection of VPC links under the caller's account in a region. // -// Getting Started with Private Integrations (http://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started-with-private-integration.html), -// Set up Private Integrations (http://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-private-integration.html) +// Getting Started with Private Integrations (https://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started-with-private-integration.html), +// Set up Private Integrations (https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-private-integration.html) type GetVpcLinksOutput struct { _ struct{} `type:"structure"` @@ -18939,7 +19278,7 @@ type ImportApiKeysInput struct { _ struct{} `type:"structure" payload:"Body"` // The payload of the POST request to import API keys. For the payload format, - // see API Key File Format (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-key-file-format.html). + // see API Key File Format (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-key-file-format.html). // // Body is a required field Body []byte `locationName:"body" type:"blob" required:"true"` @@ -19032,12 +19371,12 @@ func (s *ImportApiKeysOutput) SetWarnings(v []*string) *ImportApiKeysOutput { return s } -// Import documentation parts from an external (e.g., Swagger) definition file. +// Import documentation parts from an external (e.g., OpenAPI) definition file. type ImportDocumentationPartsInput struct { _ struct{} `type:"structure" payload:"Body"` // [Required] Raw byte array representing the to-be-imported documentation parts. - // To import from a Swagger file, this is a JSON object. + // To import from an OpenAPI file, this is a JSON object. // // Body is a required field Body []byte `locationName:"body" type:"blob" required:"true"` @@ -19077,6 +19416,9 @@ func (s *ImportDocumentationPartsInput) Validate() error { if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -19111,9 +19453,9 @@ func (s *ImportDocumentationPartsInput) SetRestApiId(v string) *ImportDocumentat // A collection of the imported DocumentationPart identifiers. // // This is used to return the result when documentation parts in an external -// (e.g., Swagger) file are imported into API Gateway -// Documenting an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api.html), -// documentationpart:import (http://docs.aws.amazon.com/apigateway/api-reference/link-relation/documentationpart-import/), +// (e.g., OpenAPI) file are imported into API Gateway +// Documenting an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-documenting-api.html), +// documentationpart:import (https://docs.aws.amazon.com/apigateway/api-reference/link-relation/documentationpart-import/), // DocumentationPart type ImportDocumentationPartsOutput struct { _ struct{} `type:"structure"` @@ -19153,8 +19495,8 @@ type ImportRestApiInput struct { _ struct{} `type:"structure" payload:"Body"` // [Required] The POST request body containing external API definitions. Currently, - // only Swagger definition JSON files are supported. The maximum size of the - // API definition file is 2MB. + // only OpenAPI definition JSON/YAML files are supported. The maximum size of + // the API definition file is 2MB. // // Body is a required field Body []byte `locationName:"body" type:"blob" required:"true"` @@ -19233,7 +19575,7 @@ func (s *ImportRestApiInput) SetParameters(v map[string]*string) *ImportRestApiI // // In the API Gateway console, the built-in Lambda integration is an AWS integration. // -// Creating an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) +// Creating an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) type Integration struct { _ struct{} `type:"structure"` @@ -19243,7 +19585,7 @@ type Integration struct { // Specifies the integration's cache namespace. CacheNamespace *string `locationName:"cacheNamespace" type:"string"` - // The (id (http://docs.aws.amazon.com/apigateway/api-reference/resource/vpc-link/#id)) + // The (id (https://docs.aws.amazon.com/apigateway/api-reference/resource/vpc-link/#id)) // of the VpcLink used for the integration when connectionType=VPC_LINK and // undefined, otherwise. ConnectionId *string `locationName:"connectionId" type:"string"` @@ -19292,7 +19634,7 @@ type Integration struct { // // The successful response returns 200 OKstatus and a payload as follows: // - // { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", + // { "_links": { "curies": { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", // "name": "integrationresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200", // "title": "200" }, "integrationresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" // }, "integrationresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration/responses/200" @@ -19385,7 +19727,7 @@ type Integration struct { // Alternatively, path can be used for an AWS service path-based API. The // ensuing service_api refers to the path to an AWS service resource, including // the region of the integrated AWS service, if applicable. For example, - // for integration with the S3 API of GetObject (http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectGET.html), + // for integration with the S3 API of GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectGET.html), // the uri can be either arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key} // or arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key} Uri *string `locationName:"uri" type:"string"` @@ -19489,7 +19831,7 @@ func (s *Integration) SetUri(v string) *Integration { // MethodResponse, and parameters and templates can be used to transform the // back-end response. // -// Creating an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) +// Creating an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) type IntegrationResponse struct { _ struct{} `type:"structure"` @@ -19605,10 +19947,10 @@ func (s *IntegrationResponse) SetStatusCode(v string) *IntegrationResponse { // The successful response returns a 200 OK status code and a payload similar // to the following: // -// { "_links": { "curies": [ { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", -// "name": "integration", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", -// "name": "integrationresponse", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-{rel}.html", -// "name": "method", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", +// { "_links": { "curies": [ { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", +// "name": "integration", "templated": true }, { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", +// "name": "integrationresponse", "templated": true }, { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-{rel}.html", +// "name": "method", "templated": true }, { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", // "name": "methodresponse", "templated": true } ], "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET", // "name": "GET", "title": "GET" }, "integration:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" // }, "method:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET" @@ -19645,10 +19987,10 @@ func (s *IntegrationResponse) SetStatusCode(v string) *IntegrationResponse { // In the example above, the response template for the 200 OK response maps // the JSON output from the ListStreams action in the back end to an XML output. // The mapping template is URL-encoded as %3CkinesisStreams%3E%23foreach(%24stream%20in%20%24input.path(%27%24.StreamNames%27))%3Cstream%3E%3Cname%3E%24stream%3C%2Fname%3E%3C%2Fstream%3E%23end%3C%2FkinesisStreams%3E -// and the output is decoded using the $util.urlDecode() (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#util-templat-reference) +// and the output is decoded using the $util.urlDecode() (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#util-templat-reference) // helper function. // -// MethodResponse, Integration, IntegrationResponse, Resource, Set up an API's method (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-method-settings.html) +// MethodResponse, Integration, IntegrationResponse, Resource, Set up an API's method (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-method-settings.html) type Method struct { _ struct{} `type:"structure"` @@ -19694,8 +20036,8 @@ type Method struct { // // The successful response returns a 200 OKstatus code and a payload similar to the following: // - // { "_links": { "curies": [ { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", - // "name": "integration", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", + // { "_links": { "curies": [ { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", + // "name": "integration", "templated": true }, { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", // "name": "integrationresponse", "templated": true } ], "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" // }, "integration:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" // }, "integration:responses": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200", @@ -19740,7 +20082,7 @@ type Method struct { // The successful response returns a 200 OK status code and a payload similar // to the following: // - // { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", + // { "_links": { "curies": { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", // "name": "methodresponse", "templated": true }, "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200", // "title": "200" }, "methodresponse:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" // }, "methodresponse:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" @@ -19752,7 +20094,7 @@ type Method struct { // A human-friendly operation identifier for the method. For example, you can // assign the operationName of ListPets for the GET /pets method in PetStore - // (http://petstore-demo-endpoint.execute-api.com/petstore/pets) example. + // (https://petstore-demo-endpoint.execute-api.com/petstore/pets) example. OperationName *string `locationName:"operationName" type:"string"` // A key-value map specifying data schemas, represented by Model resources, @@ -19868,7 +20210,7 @@ func (s *Method) SetRequestValidatorId(v string) *Method { // // The successful response returns 200 OK status and a payload as follows: // -// { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", +// { "_links": { "curies": { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", // "name": "methodresponse", "templated": true }, "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200", // "title": "200" }, "methodresponse:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200" // }, "methodresponse:update": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/responses/200" @@ -20100,7 +20442,7 @@ func (s *MethodSnapshot) SetAuthorizationType(v string) *MethodSnapshot { // A model is used for generating an API's SDK, validating the input request // body, and creating a skeletal mapping template. // -// Method, MethodResponse, Models and Mappings (http://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html) +// Method, MethodResponse, Models and Mappings (https://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html) type Model struct { _ struct{} `type:"structure"` @@ -20198,7 +20540,7 @@ type PatchOperation struct { // The new target value of the update operation. It is applicable for the add // or replace operation. When using AWS CLI to update a property of a JSON value, // enclose the JSON object with a pair of single quotes in a Linux shell, e.g., - // '{"a": ...}'. In a Windows shell, see Using JSON for Parameters (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json). + // '{"a": ...}'. In a Windows shell, see Using JSON for Parameters (https://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json). Value *string `locationName:"value" type:"string"` } @@ -20299,9 +20641,15 @@ func (s *PutGatewayResponseInput) Validate() error { if s.ResponseType == nil { invalidParams.Add(request.NewErrParamRequired("ResponseType")) } + if s.ResponseType != nil && len(*s.ResponseType) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResponseType", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -20349,7 +20697,7 @@ type PutIntegrationInput struct { // Specifies a put integration input's cache namespace. CacheNamespace *string `locationName:"cacheNamespace" type:"string"` - // The (id (http://docs.aws.amazon.com/apigateway/api-reference/resource/vpc-link/#id)) + // The (id (https://docs.aws.amazon.com/apigateway/api-reference/resource/vpc-link/#id)) // of the VpcLink used for the integration when connectionType=VPC_LINK and // undefined, otherwise. ConnectionId *string `locationName:"connectionId" type:"string"` @@ -20454,7 +20802,7 @@ type PutIntegrationInput struct { // Alternatively, path can be used for an AWS service path-based API. The // ensuing service_api refers to the path to an AWS service resource, including // the region of the integrated AWS service, if applicable. For example, - // for integration with the S3 API of GetObject (http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectGET.html), + // for integration with the S3 API of GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectGET.html), // the uri can be either arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key} // or arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key} Uri *string `locationName:"uri" type:"string"` @@ -20476,12 +20824,21 @@ func (s *PutIntegrationInput) Validate() error { if s.HttpMethod == nil { invalidParams.Add(request.NewErrParamRequired("HttpMethod")) } + if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) + } if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if s.Type == nil { invalidParams.Add(request.NewErrParamRequired("Type")) } @@ -20661,15 +21018,27 @@ func (s *PutIntegrationResponseInput) Validate() error { if s.HttpMethod == nil { invalidParams.Add(request.NewErrParamRequired("HttpMethod")) } + if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) + } if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if s.StatusCode == nil { invalidParams.Add(request.NewErrParamRequired("StatusCode")) } + if s.StatusCode != nil && len(*s.StatusCode) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StatusCode", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -20761,7 +21130,7 @@ type PutMethodInput struct { // A human-friendly operation identifier for the method. For example, you can // assign the operationName of ListPets for the GET /pets method in PetStore - // (http://petstore-demo-endpoint.execute-api.com/petstore/pets) example. + // (https://petstore-demo-endpoint.execute-api.com/petstore/pets) example. OperationName *string `locationName:"operationName" type:"string"` // Specifies the Model resources used for the request's content type. Request @@ -20812,12 +21181,21 @@ func (s *PutMethodInput) Validate() error { if s.HttpMethod == nil { invalidParams.Add(request.NewErrParamRequired("HttpMethod")) } + if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) + } if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -20950,15 +21328,27 @@ func (s *PutMethodResponseInput) Validate() error { if s.HttpMethod == nil { invalidParams.Add(request.NewErrParamRequired("HttpMethod")) } + if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) + } if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if s.StatusCode == nil { invalidParams.Add(request.NewErrParamRequired("StatusCode")) } + if s.StatusCode != nil && len(*s.StatusCode) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StatusCode", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -21008,8 +21398,8 @@ type PutRestApiInput struct { _ struct{} `type:"structure" payload:"Body"` // [Required] The PUT request body containing external API definitions. Currently, - // only Swagger definition JSON files are supported. The maximum size of the - // API definition file is 2MB. + // only OpenAPI definition JSON/YAML files are supported. The maximum size of + // the API definition file is 2MB. // // Body is a required field Body []byte `locationName:"body" type:"blob" required:"true"` @@ -21053,6 +21443,9 @@ func (s *PutRestApiInput) Validate() error { if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -21136,7 +21529,7 @@ func (s *QuotaSettings) SetPeriod(v string) *QuotaSettings { // Represents an API resource. // -// Create an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) +// Create an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) type Resource struct { _ struct{} `type:"structure"` @@ -21169,10 +21562,10 @@ type Resource struct { // SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} // Response // - // { "_links": { "curies": [ { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", - // "name": "integration", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", - // "name": "integrationresponse", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-{rel}.html", - // "name": "method", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", + // { "_links": { "curies": [ { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", + // "name": "integration", "templated": true }, { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", + // "name": "integrationresponse", "templated": true }, { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-{rel}.html", + // "name": "method", "templated": true }, { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", // "name": "methodresponse", "templated": true } ], "self": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET", // "name": "GET", "title": "GET" }, "integration:put": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET/integration" // }, "method:delete": { "href": "/restapis/fugvjdxtri/resources/3kzxbg5sa2/methods/GET" @@ -21254,7 +21647,7 @@ func (s *Resource) SetResourceMethods(v map[string]*Method) *Resource { // Represents a REST API. // -// Create an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) +// Create an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html) type RestApi struct { _ struct{} `type:"structure"` @@ -21496,7 +21889,7 @@ func (s *SdkType) SetId(v string) *SdkType { // Represents a unique identifier for a version of a deployed RestApi that is // callable by users. // -// Deploy an API (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-deploy-api.html) +// Deploy an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-deploy-api.html) type Stage struct { _ struct{} `type:"structure"` @@ -21553,6 +21946,9 @@ type Stage struct { // can have alphanumeric and underscore characters, and the values must match // [A-Za-z0-9-._~:/?#&=,]+. Variables map[string]*string `locationName:"variables" type:"map"` + + // The ARN of the WebAcl associated with the Stage. + WebAclArn *string `locationName:"webAclArn" type:"string"` } // String returns the string representation @@ -21661,6 +22057,12 @@ func (s *Stage) SetVariables(v map[string]*string) *Stage { return s } +// SetWebAclArn sets the WebAclArn field's value. +func (s *Stage) SetWebAclArn(v string) *Stage { + s.WebAclArn = &v + return s +} + // A reference to a unique stage identified in the format {restApiId}/{stage}. type StageKey struct { _ struct{} `type:"structure"` @@ -21728,6 +22130,9 @@ func (s *TagResourceInput) Validate() error { if s.ResourceArn == nil { invalidParams.Add(request.NewErrParamRequired("ResourceArn")) } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } if s.Tags == nil { invalidParams.Add(request.NewErrParamRequired("Tags")) } @@ -21784,6 +22189,11 @@ type TestInvokeAuthorizerInput struct { // should be specified. Headers map[string]*string `locationName:"headers" type:"map"` + // [Optional] The headers as a map from string to list of values to simulate + // an incoming invocation request. This is where the incoming authorization + // token, or identity source, may be specified. + MultiValueHeaders map[string][]*string `locationName:"multiValueHeaders" type:"map"` + // [Optional] The URI path, including query string, of the simulated invocation // request. Use this to specify path parameters and query string parameters. PathWithQueryString *string `locationName:"pathWithQueryString" type:"string"` @@ -21814,9 +22224,15 @@ func (s *TestInvokeAuthorizerInput) Validate() error { if s.AuthorizerId == nil { invalidParams.Add(request.NewErrParamRequired("AuthorizerId")) } + if s.AuthorizerId != nil && len(*s.AuthorizerId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AuthorizerId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -21848,6 +22264,12 @@ func (s *TestInvokeAuthorizerInput) SetHeaders(v map[string]*string) *TestInvoke return s } +// SetMultiValueHeaders sets the MultiValueHeaders field's value. +func (s *TestInvokeAuthorizerInput) SetMultiValueHeaders(v map[string][]*string) *TestInvokeAuthorizerInput { + s.MultiValueHeaders = v + return s +} + // SetPathWithQueryString sets the PathWithQueryString field's value. func (s *TestInvokeAuthorizerInput) SetPathWithQueryString(v string) *TestInvokeAuthorizerInput { s.PathWithQueryString = &v @@ -21872,7 +22294,7 @@ type TestInvokeAuthorizerOutput struct { Authorization map[string][]*string `locationName:"authorization" type:"map"` - // The open identity claims (http://openid.net/specs/openid-connect-core-1_0.html#StandardClaims), + // The open identity claims (https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims), // with any supported custom attributes, returned from the Cognito Your User // Pool configured for the API. Claims map[string]*string `locationName:"claims" type:"map"` @@ -21966,6 +22388,10 @@ type TestInvokeMethodInput struct { // HttpMethod is a required field HttpMethod *string `location:"uri" locationName:"http_method" type:"string" required:"true"` + // The headers as a map from string to list of values to simulate an incoming + // invocation request. + MultiValueHeaders map[string][]*string `locationName:"multiValueHeaders" type:"map"` + // The URI path, including query string, of the simulated invocation request. // Use this to specify path parameters and query string parameters. PathWithQueryString *string `locationName:"pathWithQueryString" type:"string"` @@ -22001,12 +22427,21 @@ func (s *TestInvokeMethodInput) Validate() error { if s.HttpMethod == nil { invalidParams.Add(request.NewErrParamRequired("HttpMethod")) } + if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) + } if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -22038,6 +22473,12 @@ func (s *TestInvokeMethodInput) SetHttpMethod(v string) *TestInvokeMethodInput { return s } +// SetMultiValueHeaders sets the MultiValueHeaders field's value. +func (s *TestInvokeMethodInput) SetMultiValueHeaders(v map[string][]*string) *TestInvokeMethodInput { + s.MultiValueHeaders = v + return s +} + // SetPathWithQueryString sets the PathWithQueryString field's value. func (s *TestInvokeMethodInput) SetPathWithQueryString(v string) *TestInvokeMethodInput { s.PathWithQueryString = &v @@ -22064,7 +22505,7 @@ func (s *TestInvokeMethodInput) SetStageVariables(v map[string]*string) *TestInv // Represents the response of the test invoke request in the HTTP method. // -// Test API using the API Gateway console (http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-test-method.html#how-to-test-method-console) +// Test API using the API Gateway console (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-test-method.html#how-to-test-method-console) type TestInvokeMethodOutput struct { _ struct{} `type:"structure"` @@ -22080,6 +22521,9 @@ type TestInvokeMethodOutput struct { // The API Gateway execution log for the test invoke request. Log *string `locationName:"log" type:"string"` + // The headers of the HTTP response as a map from string to list of values. + MultiValueHeaders map[string][]*string `locationName:"multiValueHeaders" type:"map"` + // The HTTP status code. Status *int64 `locationName:"status" type:"integer"` } @@ -22118,6 +22562,12 @@ func (s *TestInvokeMethodOutput) SetLog(v string) *TestInvokeMethodOutput { return s } +// SetMultiValueHeaders sets the MultiValueHeaders field's value. +func (s *TestInvokeMethodOutput) SetMultiValueHeaders(v map[string][]*string) *TestInvokeMethodOutput { + s.MultiValueHeaders = v + return s +} + // SetStatus sets the Status field's value. func (s *TestInvokeMethodOutput) SetStatus(v int64) *TestInvokeMethodOutput { s.Status = &v @@ -22191,6 +22641,9 @@ func (s *UntagResourceInput) Validate() error { if s.ResourceArn == nil { invalidParams.Add(request.NewErrParamRequired("ResourceArn")) } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } if s.TagKeys == nil { invalidParams.Add(request.NewErrParamRequired("TagKeys")) } @@ -22282,6 +22735,9 @@ func (s *UpdateApiKeyInput) Validate() error { if s.ApiKey == nil { invalidParams.Add(request.NewErrParamRequired("ApiKey")) } + if s.ApiKey != nil && len(*s.ApiKey) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiKey", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -22336,9 +22792,15 @@ func (s *UpdateAuthorizerInput) Validate() error { if s.AuthorizerId == nil { invalidParams.Add(request.NewErrParamRequired("AuthorizerId")) } + if s.AuthorizerId != nil && len(*s.AuthorizerId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AuthorizerId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -22399,9 +22861,15 @@ func (s *UpdateBasePathMappingInput) Validate() error { if s.BasePath == nil { invalidParams.Add(request.NewErrParamRequired("BasePath")) } + if s.BasePath != nil && len(*s.BasePath) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BasePath", 1)) + } if s.DomainName == nil { invalidParams.Add(request.NewErrParamRequired("DomainName")) } + if s.DomainName != nil && len(*s.DomainName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -22457,6 +22925,9 @@ func (s *UpdateClientCertificateInput) Validate() error { if s.ClientCertificateId == nil { invalidParams.Add(request.NewErrParamRequired("ClientCertificateId")) } + if s.ClientCertificateId != nil && len(*s.ClientCertificateId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClientCertificateId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -22512,9 +22983,15 @@ func (s *UpdateDeploymentInput) Validate() error { if s.DeploymentId == nil { invalidParams.Add(request.NewErrParamRequired("DeploymentId")) } + if s.DeploymentId != nil && len(*s.DeploymentId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeploymentId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -22575,9 +23052,15 @@ func (s *UpdateDocumentationPartInput) Validate() error { if s.DocumentationPartId == nil { invalidParams.Add(request.NewErrParamRequired("DocumentationPartId")) } + if s.DocumentationPartId != nil && len(*s.DocumentationPartId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DocumentationPartId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -22638,9 +23121,15 @@ func (s *UpdateDocumentationVersionInput) Validate() error { if s.DocumentationVersion == nil { invalidParams.Add(request.NewErrParamRequired("DocumentationVersion")) } + if s.DocumentationVersion != nil && len(*s.DocumentationVersion) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DocumentationVersion", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -22696,6 +23185,9 @@ func (s *UpdateDomainNameInput) Validate() error { if s.DomainName == nil { invalidParams.Add(request.NewErrParamRequired("DomainName")) } + if s.DomainName != nil && len(*s.DomainName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -22770,9 +23262,15 @@ func (s *UpdateGatewayResponseInput) Validate() error { if s.ResponseType == nil { invalidParams.Add(request.NewErrParamRequired("ResponseType")) } + if s.ResponseType != nil && len(*s.ResponseType) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResponseType", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -22802,7 +23300,7 @@ func (s *UpdateGatewayResponseInput) SetRestApiId(v string) *UpdateGatewayRespon // response parameters and mapping templates. // // For more information about valid gateway response types, see Gateway Response -// Types Supported by API Gateway (http://docs.aws.amazon.com/apigateway/latest/developerguide/supported-gateway-response-types.html)Example: +// Types Supported by API Gateway (https://docs.aws.amazon.com/apigateway/latest/developerguide/supported-gateway-response-types.html)Example: // Get a Gateway Response of a given response type // // Request @@ -22838,7 +23336,7 @@ func (s *UpdateGatewayResponseInput) SetRestApiId(v string) *UpdateGatewayRespon // \"statusCode\": \"'404'\"\n}" }, "responseType": "MISSING_AUTHENTICATION_TOKEN", // "statusCode": "404" } // -// Customize Gateway Responses (http://docs.aws.amazon.com/apigateway/latest/developerguide/customize-gateway-responses.html) +// Customize Gateway Responses (https://docs.aws.amazon.com/apigateway/latest/developerguide/customize-gateway-responses.html) type UpdateGatewayResponseOutput struct { _ struct{} `type:"structure"` @@ -22962,12 +23460,21 @@ func (s *UpdateIntegrationInput) Validate() error { if s.HttpMethod == nil { invalidParams.Add(request.NewErrParamRequired("HttpMethod")) } + if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) + } if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -23044,15 +23551,27 @@ func (s *UpdateIntegrationResponseInput) Validate() error { if s.HttpMethod == nil { invalidParams.Add(request.NewErrParamRequired("HttpMethod")) } + if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) + } if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if s.StatusCode == nil { invalidParams.Add(request.NewErrParamRequired("StatusCode")) } + if s.StatusCode != nil && len(*s.StatusCode) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StatusCode", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -23130,12 +23649,21 @@ func (s *UpdateMethodInput) Validate() error { if s.HttpMethod == nil { invalidParams.Add(request.NewErrParamRequired("HttpMethod")) } + if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) + } if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -23212,15 +23740,27 @@ func (s *UpdateMethodResponseInput) Validate() error { if s.HttpMethod == nil { invalidParams.Add(request.NewErrParamRequired("HttpMethod")) } + if s.HttpMethod != nil && len(*s.HttpMethod) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HttpMethod", 1)) + } if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if s.StatusCode == nil { invalidParams.Add(request.NewErrParamRequired("StatusCode")) } + if s.StatusCode != nil && len(*s.StatusCode) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StatusCode", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -23293,9 +23833,15 @@ func (s *UpdateModelInput) Validate() error { if s.ModelName == nil { invalidParams.Add(request.NewErrParamRequired("ModelName")) } + if s.ModelName != nil && len(*s.ModelName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ModelName", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -23356,9 +23902,15 @@ func (s *UpdateRequestValidatorInput) Validate() error { if s.RequestValidatorId == nil { invalidParams.Add(request.NewErrParamRequired("RequestValidatorId")) } + if s.RequestValidatorId != nil && len(*s.RequestValidatorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RequestValidatorId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -23386,13 +23938,13 @@ func (s *UpdateRequestValidatorInput) SetRestApiId(v string) *UpdateRequestValid // A set of validation rules for incoming Method requests. // -// In Swagger, a RequestValidator of an API is defined by the x-amazon-apigateway-request-validators.requestValidator -// (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-swagger-extensions.html#api-gateway-swagger-extensions-request-validators.requestValidator.html) +// In OpenAPI, a RequestValidator of an API is defined by the x-amazon-apigateway-request-validators.requestValidator +// (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-swagger-extensions.html#api-gateway-swagger-extensions-request-validators.requestValidator.html) // object. It the referenced using the x-amazon-apigateway-request-validator -// (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-swagger-extensions.html#api-gateway-swagger-extensions-request-validator) +// (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-swagger-extensions.html#api-gateway-swagger-extensions-request-validator) // property. // -// Enable Basic Request Validation in API Gateway (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-method-request-validation.html) +// Enable Basic Request Validation in API Gateway (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-method-request-validation.html) type UpdateRequestValidatorOutput struct { _ struct{} `type:"structure"` @@ -23480,9 +24032,15 @@ func (s *UpdateResourceInput) Validate() error { if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -23538,6 +24096,9 @@ func (s *UpdateRestApiInput) Validate() error { if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -23592,9 +24153,15 @@ func (s *UpdateStageInput) Validate() error { if s.RestApiId == nil { invalidParams.Add(request.NewErrParamRequired("RestApiId")) } + if s.RestApiId != nil && len(*s.RestApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RestApiId", 1)) + } if s.StageName == nil { invalidParams.Add(request.NewErrParamRequired("StageName")) } + if s.StageName != nil && len(*s.StageName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StageName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -23657,9 +24224,15 @@ func (s *UpdateUsageInput) Validate() error { 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.UsagePlanId == nil { invalidParams.Add(request.NewErrParamRequired("UsagePlanId")) } + if s.UsagePlanId != nil && len(*s.UsagePlanId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UsagePlanId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -23715,6 +24288,9 @@ func (s *UpdateUsagePlanInput) Validate() error { if s.UsagePlanId == nil { invalidParams.Add(request.NewErrParamRequired("UsagePlanId")) } + if s.UsagePlanId != nil && len(*s.UsagePlanId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UsagePlanId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -23765,6 +24341,9 @@ func (s *UpdateVpcLinkInput) Validate() error { if s.VpcLinkId == nil { invalidParams.Add(request.NewErrParamRequired("VpcLinkId")) } + if s.VpcLinkId != nil && len(*s.VpcLinkId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VpcLinkId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -23868,7 +24447,7 @@ func (s *UpdateVpcLinkOutput) SetTargetArns(v []*string) *UpdateVpcLinkOutput { // Represents the usage data of a usage plan. // -// Create and Use Usage Plans (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html), Manage Usage in a Usage Plan (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-create-usage-plans-with-console.html#api-gateway-usage-plan-manage-usage) +// Create and Use Usage Plans (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html), Manage Usage in a Usage Plan (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-create-usage-plans-with-console.html#api-gateway-usage-plan-manage-usage) type Usage struct { _ struct{} `type:"structure"` @@ -23938,7 +24517,7 @@ func (s *Usage) SetUsagePlanId(v string) *Usage { // name of the specified API. You add plan customers by adding API keys to the // plan. // -// Create and Use Usage Plans (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) +// Create and Use Usage Plans (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) type UsagePlan struct { _ struct{} `type:"structure"` @@ -24022,7 +24601,7 @@ func (s *UsagePlan) SetThrottle(v *ThrottleSettings) *UsagePlan { // To associate an API stage with a selected API key in a usage plan, you must // create a UsagePlanKey resource to represent the selected ApiKey. // -// " Create and Use Usage Plans (http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) +// " Create and Use Usage Plans (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) type UsagePlanKey struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go index e2cbccd4b8..5fa02a90d1 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go @@ -9,6 +9,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) const opDeleteScalingPolicy = "DeleteScalingPolicy" @@ -16,7 +18,7 @@ const opDeleteScalingPolicy = "DeleteScalingPolicy" // DeleteScalingPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteScalingPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -50,6 +52,7 @@ func (c *ApplicationAutoScaling) DeleteScalingPolicyRequest(input *DeleteScaling output = &DeleteScalingPolicyOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -116,7 +119,7 @@ const opDeleteScheduledAction = "DeleteScheduledAction" // DeleteScheduledActionRequest generates a "aws/request.Request" representing the // client's request for the DeleteScheduledAction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -150,6 +153,7 @@ func (c *ApplicationAutoScaling) DeleteScheduledActionRequest(input *DeleteSched output = &DeleteScheduledActionOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -210,7 +214,7 @@ const opDeregisterScalableTarget = "DeregisterScalableTarget" // DeregisterScalableTargetRequest generates a "aws/request.Request" representing the // client's request for the DeregisterScalableTarget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -244,6 +248,7 @@ func (c *ApplicationAutoScaling) DeregisterScalableTargetRequest(input *Deregist output = &DeregisterScalableTargetOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -309,7 +314,7 @@ const opDescribeScalableTargets = "DescribeScalableTargets" // DescribeScalableTargetsRequest generates a "aws/request.Request" representing the // client's request for the DescribeScalableTargets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -461,7 +466,7 @@ const opDescribeScalingActivities = "DescribeScalingActivities" // DescribeScalingActivitiesRequest generates a "aws/request.Request" representing the // client's request for the DescribeScalingActivities operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -615,7 +620,7 @@ const opDescribeScalingPolicies = "DescribeScalingPolicies" // DescribeScalingPoliciesRequest generates a "aws/request.Request" representing the // client's request for the DescribeScalingPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -775,7 +780,7 @@ const opDescribeScheduledActions = "DescribeScheduledActions" // DescribeScheduledActionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeScheduledActions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -871,7 +876,7 @@ const opPutScalingPolicy = "PutScalingPolicy" // PutScalingPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutScalingPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -989,7 +994,7 @@ const opPutScheduledAction = "PutScheduledAction" // PutScheduledActionRequest generates a "aws/request.Request" representing the // client's request for the PutScheduledAction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1023,6 +1028,7 @@ func (c *ApplicationAutoScaling) PutScheduledActionRequest(input *PutScheduledAc output = &PutScheduledActionOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1101,7 +1107,7 @@ const opRegisterScalableTarget = "RegisterScalableTarget" // RegisterScalableTargetRequest generates a "aws/request.Request" representing the // client's request for the RegisterScalableTarget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1135,6 +1141,7 @@ func (c *ApplicationAutoScaling) RegisterScalableTargetRequest(input *RegisterSc output = &RegisterScalableTargetOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } diff --git a/vendor/github.com/aws/aws-sdk-go/service/appsync/api.go b/vendor/github.com/aws/aws-sdk-go/service/appsync/api.go index bd42011dd4..92f9197e2c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/appsync/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/appsync/api.go @@ -6,6 +6,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "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 opCreateApiKey = "CreateApiKey" @@ -13,7 +15,7 @@ const opCreateApiKey = "CreateApiKey" // CreateApiKeyRequest generates a "aws/request.Request" representing the // client's request for the CreateApiKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -65,11 +67,11 @@ func (c *AppSync) CreateApiKeyRequest(input *CreateApiKeyInput) (req *request.Re // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" // The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. +// field is missing. Check the field values, and then try again. // // * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. +// The resource specified in the request was not found. Check the resource, +// and then try again. // // * ErrCodeLimitExceededException "LimitExceededException" // The request exceeded a limit. Try your request again. @@ -117,7 +119,7 @@ const opCreateDataSource = "CreateDataSource" // CreateDataSourceRequest generates a "aws/request.Request" representing the // client's request for the CreateDataSource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -168,15 +170,15 @@ func (c *AppSync) CreateDataSourceRequest(input *CreateDataSourceInput) (req *re // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" // The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. +// field is missing. Check the field values, and then try again. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is being made. That modification must complete before +// Another modification is in progress at this time and it must complete before // you can make your change. // // * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. +// The resource specified in the request was not found. Check the resource, +// and then try again. // // * ErrCodeUnauthorizedException "UnauthorizedException" // You are not authorized to perform this operation. @@ -206,12 +208,105 @@ func (c *AppSync) CreateDataSourceWithContext(ctx aws.Context, input *CreateData return out, req.Send() } +const opCreateFunction = "CreateFunction" + +// CreateFunctionRequest generates a "aws/request.Request" representing the +// client's request for the CreateFunction 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 CreateFunction for more information on using the CreateFunction +// 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 CreateFunctionRequest method. +// req, resp := client.CreateFunctionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateFunction +func (c *AppSync) CreateFunctionRequest(input *CreateFunctionInput) (req *request.Request, output *CreateFunctionOutput) { + op := &request.Operation{ + Name: opCreateFunction, + HTTPMethod: "POST", + HTTPPath: "/v1/apis/{apiId}/functions", + } + + if input == nil { + input = &CreateFunctionInput{} + } + + output = &CreateFunctionOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateFunction API operation for AWS AppSync. +// +// Creates a Function object. +// +// A function is a reusable entity. Multiple functions can be used to compose +// the resolver logic. +// +// 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 AppSync's +// API operation CreateFunction for usage and error information. +// +// Returned Error Codes: +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Another modification is in progress at this time and it must complete before +// you can make your change. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. Check the resource, +// and then try again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An internal AWS AppSync error occurred. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/CreateFunction +func (c *AppSync) CreateFunction(input *CreateFunctionInput) (*CreateFunctionOutput, error) { + req, out := c.CreateFunctionRequest(input) + return out, req.Send() +} + +// CreateFunctionWithContext is the same as CreateFunction with the addition of +// the ability to pass a context and additional request options. +// +// See CreateFunction 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 *AppSync) CreateFunctionWithContext(ctx aws.Context, input *CreateFunctionInput, opts ...request.Option) (*CreateFunctionOutput, error) { + req, out := c.CreateFunctionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateGraphqlApi = "CreateGraphqlApi" // CreateGraphqlApiRequest generates a "aws/request.Request" representing the // client's request for the CreateGraphqlApi operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -262,13 +357,13 @@ func (c *AppSync) CreateGraphqlApiRequest(input *CreateGraphqlApiInput) (req *re // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" // The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. +// field is missing. Check the field values, and then try again. // // * ErrCodeLimitExceededException "LimitExceededException" // The request exceeded a limit. Try your request again. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is being made. That modification must complete before +// Another modification is in progress at this time and it must complete before // you can make your change. // // * ErrCodeUnauthorizedException "UnauthorizedException" @@ -307,7 +402,7 @@ const opCreateResolver = "CreateResolver" // CreateResolverRequest generates a "aws/request.Request" representing the // client's request for the CreateResolver operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -360,12 +455,12 @@ func (c *AppSync) CreateResolverRequest(input *CreateResolverInput) (req *reques // // Returned Error Codes: // * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is being made. That modification must complete before +// Another modification is in progress at this time and it must complete before // you can make your change. // // * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. +// The resource specified in the request was not found. Check the resource, +// and then try again. // // * ErrCodeUnauthorizedException "UnauthorizedException" // You are not authorized to perform this operation. @@ -400,7 +495,7 @@ const opCreateType = "CreateType" // CreateTypeRequest generates a "aws/request.Request" representing the // client's request for the CreateType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -451,15 +546,15 @@ func (c *AppSync) CreateTypeRequest(input *CreateTypeInput) (req *request.Reques // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" // The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. +// field is missing. Check the field values, and then try again. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is being made. That modification must complete before +// Another modification is in progress at this time and it must complete before // you can make your change. // // * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. +// The resource specified in the request was not found. Check the resource, +// and then try again. // // * ErrCodeUnauthorizedException "UnauthorizedException" // You are not authorized to perform this operation. @@ -494,7 +589,7 @@ const opDeleteApiKey = "DeleteApiKey" // DeleteApiKeyRequest generates a "aws/request.Request" representing the // client's request for the DeleteApiKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -528,6 +623,7 @@ func (c *AppSync) DeleteApiKeyRequest(input *DeleteApiKeyInput) (req *request.Re output = &DeleteApiKeyOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -545,11 +641,11 @@ func (c *AppSync) DeleteApiKeyRequest(input *DeleteApiKeyInput) (req *request.Re // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" // The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. +// field is missing. Check the field values, and then try again. // // * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. +// The resource specified in the request was not found. Check the resource, +// and then try again. // // * ErrCodeUnauthorizedException "UnauthorizedException" // You are not authorized to perform this operation. @@ -584,7 +680,7 @@ const opDeleteDataSource = "DeleteDataSource" // DeleteDataSourceRequest generates a "aws/request.Request" representing the // client's request for the DeleteDataSource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -618,6 +714,7 @@ func (c *AppSync) DeleteDataSourceRequest(input *DeleteDataSourceInput) (req *re output = &DeleteDataSourceOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -635,15 +732,15 @@ func (c *AppSync) DeleteDataSourceRequest(input *DeleteDataSourceInput) (req *re // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" // The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. +// field is missing. Check the field values, and then try again. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is being made. That modification must complete before +// Another modification is in progress at this time and it must complete before // you can make your change. // // * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. +// The resource specified in the request was not found. Check the resource, +// and then try again. // // * ErrCodeUnauthorizedException "UnauthorizedException" // You are not authorized to perform this operation. @@ -673,12 +770,103 @@ func (c *AppSync) DeleteDataSourceWithContext(ctx aws.Context, input *DeleteData return out, req.Send() } +const opDeleteFunction = "DeleteFunction" + +// DeleteFunctionRequest generates a "aws/request.Request" representing the +// client's request for the DeleteFunction 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 DeleteFunction for more information on using the DeleteFunction +// 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 DeleteFunctionRequest method. +// req, resp := client.DeleteFunctionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteFunction +func (c *AppSync) DeleteFunctionRequest(input *DeleteFunctionInput) (req *request.Request, output *DeleteFunctionOutput) { + op := &request.Operation{ + Name: opDeleteFunction, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apis/{apiId}/functions/{functionId}", + } + + if input == nil { + input = &DeleteFunctionInput{} + } + + output = &DeleteFunctionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteFunction API operation for AWS AppSync. +// +// Deletes a Function. +// +// 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 AppSync's +// API operation DeleteFunction for usage and error information. +// +// Returned Error Codes: +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Another modification is in progress at this time and it must complete before +// you can make your change. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. Check the resource, +// and then try again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An internal AWS AppSync error occurred. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/DeleteFunction +func (c *AppSync) DeleteFunction(input *DeleteFunctionInput) (*DeleteFunctionOutput, error) { + req, out := c.DeleteFunctionRequest(input) + return out, req.Send() +} + +// DeleteFunctionWithContext is the same as DeleteFunction with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteFunction 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 *AppSync) DeleteFunctionWithContext(ctx aws.Context, input *DeleteFunctionInput, opts ...request.Option) (*DeleteFunctionOutput, error) { + req, out := c.DeleteFunctionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteGraphqlApi = "DeleteGraphqlApi" // DeleteGraphqlApiRequest generates a "aws/request.Request" representing the // client's request for the DeleteGraphqlApi operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -712,6 +900,7 @@ func (c *AppSync) DeleteGraphqlApiRequest(input *DeleteGraphqlApiInput) (req *re output = &DeleteGraphqlApiOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -729,15 +918,15 @@ func (c *AppSync) DeleteGraphqlApiRequest(input *DeleteGraphqlApiInput) (req *re // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" // The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. +// field is missing. Check the field values, and then try again. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is being made. That modification must complete before +// Another modification is in progress at this time and it must complete before // you can make your change. // // * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. +// The resource specified in the request was not found. Check the resource, +// and then try again. // // * ErrCodeUnauthorizedException "UnauthorizedException" // You are not authorized to perform this operation. @@ -772,7 +961,7 @@ const opDeleteResolver = "DeleteResolver" // DeleteResolverRequest generates a "aws/request.Request" representing the // client's request for the DeleteResolver operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -806,6 +995,7 @@ func (c *AppSync) DeleteResolverRequest(input *DeleteResolverInput) (req *reques output = &DeleteResolverOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -822,12 +1012,12 @@ func (c *AppSync) DeleteResolverRequest(input *DeleteResolverInput) (req *reques // // Returned Error Codes: // * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is being made. That modification must complete before +// Another modification is in progress at this time and it must complete before // you can make your change. // // * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. +// The resource specified in the request was not found. Check the resource, +// and then try again. // // * ErrCodeUnauthorizedException "UnauthorizedException" // You are not authorized to perform this operation. @@ -862,7 +1052,7 @@ const opDeleteType = "DeleteType" // DeleteTypeRequest generates a "aws/request.Request" representing the // client's request for the DeleteType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -896,6 +1086,7 @@ func (c *AppSync) DeleteTypeRequest(input *DeleteTypeInput) (req *request.Reques output = &DeleteTypeOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -913,15 +1104,15 @@ func (c *AppSync) DeleteTypeRequest(input *DeleteTypeInput) (req *request.Reques // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" // The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. +// field is missing. Check the field values, and then try again. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is being made. That modification must complete before +// Another modification is in progress at this time and it must complete before // you can make your change. // // * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. +// The resource specified in the request was not found. Check the resource, +// and then try again. // // * ErrCodeUnauthorizedException "UnauthorizedException" // You are not authorized to perform this operation. @@ -956,7 +1147,7 @@ const opGetDataSource = "GetDataSource" // GetDataSourceRequest generates a "aws/request.Request" representing the // client's request for the GetDataSource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1007,15 +1198,15 @@ func (c *AppSync) GetDataSourceRequest(input *GetDataSourceInput) (req *request. // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" // The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. +// field is missing. Check the field values, and then try again. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is being made. That modification must complete before +// Another modification is in progress at this time and it must complete before // you can make your change. // // * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. +// The resource specified in the request was not found. Check the resource, +// and then try again. // // * ErrCodeUnauthorizedException "UnauthorizedException" // You are not authorized to perform this operation. @@ -1045,12 +1236,99 @@ func (c *AppSync) GetDataSourceWithContext(ctx aws.Context, input *GetDataSource return out, req.Send() } +const opGetFunction = "GetFunction" + +// GetFunctionRequest generates a "aws/request.Request" representing the +// client's request for the GetFunction 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 GetFunction for more information on using the GetFunction +// 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 GetFunctionRequest method. +// req, resp := client.GetFunctionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetFunction +func (c *AppSync) GetFunctionRequest(input *GetFunctionInput) (req *request.Request, output *GetFunctionOutput) { + op := &request.Operation{ + Name: opGetFunction, + HTTPMethod: "GET", + HTTPPath: "/v1/apis/{apiId}/functions/{functionId}", + } + + if input == nil { + input = &GetFunctionInput{} + } + + output = &GetFunctionOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetFunction API operation for AWS AppSync. +// +// Get a Function. +// +// 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 AppSync's +// API operation GetFunction for usage and error information. +// +// Returned Error Codes: +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Another modification is in progress at this time and it must complete before +// you can make your change. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. Check the resource, +// and then try again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/GetFunction +func (c *AppSync) GetFunction(input *GetFunctionInput) (*GetFunctionOutput, error) { + req, out := c.GetFunctionRequest(input) + return out, req.Send() +} + +// GetFunctionWithContext is the same as GetFunction with the addition of +// the ability to pass a context and additional request options. +// +// See GetFunction 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 *AppSync) GetFunctionWithContext(ctx aws.Context, input *GetFunctionInput, opts ...request.Option) (*GetFunctionOutput, error) { + req, out := c.GetFunctionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetGraphqlApi = "GetGraphqlApi" // GetGraphqlApiRequest generates a "aws/request.Request" representing the // client's request for the GetGraphqlApi operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1101,11 +1379,11 @@ func (c *AppSync) GetGraphqlApiRequest(input *GetGraphqlApiInput) (req *request. // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" // The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. +// field is missing. Check the field values, and then try again. // // * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. +// The resource specified in the request was not found. Check the resource, +// and then try again. // // * ErrCodeUnauthorizedException "UnauthorizedException" // You are not authorized to perform this operation. @@ -1140,7 +1418,7 @@ const opGetIntrospectionSchema = "GetIntrospectionSchema" // GetIntrospectionSchemaRequest generates a "aws/request.Request" representing the // client's request for the GetIntrospectionSchema operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1193,8 +1471,8 @@ func (c *AppSync) GetIntrospectionSchemaRequest(input *GetIntrospectionSchemaInp // The GraphQL schema is not valid. // // * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. +// The resource specified in the request was not found. Check the resource, +// and then try again. // // * ErrCodeUnauthorizedException "UnauthorizedException" // You are not authorized to perform this operation. @@ -1229,7 +1507,7 @@ const opGetResolver = "GetResolver" // GetResolverRequest generates a "aws/request.Request" representing the // client's request for the GetResolver operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1279,12 +1557,12 @@ func (c *AppSync) GetResolverRequest(input *GetResolverInput) (req *request.Requ // // Returned Error Codes: // * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is being made. That modification must complete before +// Another modification is in progress at this time and it must complete before // you can make your change. // // * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. +// The resource specified in the request was not found. Check the resource, +// and then try again. // // * ErrCodeUnauthorizedException "UnauthorizedException" // You are not authorized to perform this operation. @@ -1316,7 +1594,7 @@ const opGetSchemaCreationStatus = "GetSchemaCreationStatus" // GetSchemaCreationStatusRequest generates a "aws/request.Request" representing the // client's request for the GetSchemaCreationStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1367,11 +1645,11 @@ func (c *AppSync) GetSchemaCreationStatusRequest(input *GetSchemaCreationStatusI // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" // The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. +// field is missing. Check the field values, and then try again. // // * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. +// The resource specified in the request was not found. Check the resource, +// and then try again. // // * ErrCodeUnauthorizedException "UnauthorizedException" // You are not authorized to perform this operation. @@ -1406,7 +1684,7 @@ const opGetType = "GetType" // GetTypeRequest generates a "aws/request.Request" representing the // client's request for the GetType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1457,15 +1735,15 @@ func (c *AppSync) GetTypeRequest(input *GetTypeInput) (req *request.Request, out // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" // The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. +// field is missing. Check the field values, and then try again. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is being made. That modification must complete before +// Another modification is in progress at this time and it must complete before // you can make your change. // // * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. +// The resource specified in the request was not found. Check the resource, +// and then try again. // // * ErrCodeUnauthorizedException "UnauthorizedException" // You are not authorized to perform this operation. @@ -1500,7 +1778,7 @@ const opListApiKeys = "ListApiKeys" // ListApiKeysRequest generates a "aws/request.Request" representing the // client's request for the ListApiKeys operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1556,11 +1834,11 @@ func (c *AppSync) ListApiKeysRequest(input *ListApiKeysInput) (req *request.Requ // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" // The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. +// field is missing. Check the field values, and then try again. // // * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. +// The resource specified in the request was not found. Check the resource, +// and then try again. // // * ErrCodeUnauthorizedException "UnauthorizedException" // You are not authorized to perform this operation. @@ -1595,7 +1873,7 @@ const opListDataSources = "ListDataSources" // ListDataSourcesRequest generates a "aws/request.Request" representing the // client's request for the ListDataSources operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1646,11 +1924,11 @@ func (c *AppSync) ListDataSourcesRequest(input *ListDataSourcesInput) (req *requ // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" // The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. +// field is missing. Check the field values, and then try again. // // * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. +// The resource specified in the request was not found. Check the resource, +// and then try again. // // * ErrCodeUnauthorizedException "UnauthorizedException" // You are not authorized to perform this operation. @@ -1680,12 +1958,102 @@ func (c *AppSync) ListDataSourcesWithContext(ctx aws.Context, input *ListDataSou return out, req.Send() } +const opListFunctions = "ListFunctions" + +// ListFunctionsRequest generates a "aws/request.Request" representing the +// client's request for the ListFunctions 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 ListFunctions for more information on using the ListFunctions +// 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 ListFunctionsRequest method. +// req, resp := client.ListFunctionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListFunctions +func (c *AppSync) ListFunctionsRequest(input *ListFunctionsInput) (req *request.Request, output *ListFunctionsOutput) { + op := &request.Operation{ + Name: opListFunctions, + HTTPMethod: "GET", + HTTPPath: "/v1/apis/{apiId}/functions", + } + + if input == nil { + input = &ListFunctionsInput{} + } + + output = &ListFunctionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListFunctions API operation for AWS AppSync. +// +// List multiple functions. +// +// 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 AppSync's +// API operation ListFunctions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request is not well formed. For example, a value is invalid or a required +// field is missing. Check the field values, and then try again. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. Check the resource, +// and then try again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An internal AWS AppSync error occurred. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListFunctions +func (c *AppSync) ListFunctions(input *ListFunctionsInput) (*ListFunctionsOutput, error) { + req, out := c.ListFunctionsRequest(input) + return out, req.Send() +} + +// ListFunctionsWithContext is the same as ListFunctions with the addition of +// the ability to pass a context and additional request options. +// +// See ListFunctions 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 *AppSync) ListFunctionsWithContext(ctx aws.Context, input *ListFunctionsInput, opts ...request.Option) (*ListFunctionsOutput, error) { + req, out := c.ListFunctionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListGraphqlApis = "ListGraphqlApis" // ListGraphqlApisRequest generates a "aws/request.Request" representing the // client's request for the ListGraphqlApis operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1736,7 +2104,7 @@ func (c *AppSync) ListGraphqlApisRequest(input *ListGraphqlApisInput) (req *requ // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" // The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. +// field is missing. Check the field values, and then try again. // // * ErrCodeUnauthorizedException "UnauthorizedException" // You are not authorized to perform this operation. @@ -1771,7 +2139,7 @@ const opListResolvers = "ListResolvers" // ListResolversRequest generates a "aws/request.Request" representing the // client's request for the ListResolvers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1822,11 +2190,11 @@ func (c *AppSync) ListResolversRequest(input *ListResolversInput) (req *request. // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" // The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. +// field is missing. Check the field values, and then try again. // // * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. +// The resource specified in the request was not found. Check the resource, +// and then try again. // // * ErrCodeUnauthorizedException "UnauthorizedException" // You are not authorized to perform this operation. @@ -1856,12 +2224,102 @@ func (c *AppSync) ListResolversWithContext(ctx aws.Context, input *ListResolvers return out, req.Send() } -const opListTypes = "ListTypes" +const opListResolversByFunction = "ListResolversByFunction" -// ListTypesRequest generates a "aws/request.Request" representing the +// ListResolversByFunctionRequest generates a "aws/request.Request" representing the +// client's request for the ListResolversByFunction 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 ListResolversByFunction for more information on using the ListResolversByFunction +// 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 ListResolversByFunctionRequest method. +// req, resp := client.ListResolversByFunctionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListResolversByFunction +func (c *AppSync) ListResolversByFunctionRequest(input *ListResolversByFunctionInput) (req *request.Request, output *ListResolversByFunctionOutput) { + op := &request.Operation{ + Name: opListResolversByFunction, + HTTPMethod: "GET", + HTTPPath: "/v1/apis/{apiId}/functions/{functionId}/resolvers", + } + + if input == nil { + input = &ListResolversByFunctionInput{} + } + + output = &ListResolversByFunctionOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListResolversByFunction API operation for AWS AppSync. +// +// List the resolvers that are associated with a specific function. +// +// 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 AppSync's +// API operation ListResolversByFunction for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// The request is not well formed. For example, a value is invalid or a required +// field is missing. Check the field values, and then try again. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. Check the resource, +// and then try again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An internal AWS AppSync error occurred. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/ListResolversByFunction +func (c *AppSync) ListResolversByFunction(input *ListResolversByFunctionInput) (*ListResolversByFunctionOutput, error) { + req, out := c.ListResolversByFunctionRequest(input) + return out, req.Send() +} + +// ListResolversByFunctionWithContext is the same as ListResolversByFunction with the addition of +// the ability to pass a context and additional request options. +// +// See ListResolversByFunction 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 *AppSync) ListResolversByFunctionWithContext(ctx aws.Context, input *ListResolversByFunctionInput, opts ...request.Option) (*ListResolversByFunctionOutput, error) { + req, out := c.ListResolversByFunctionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListTypes = "ListTypes" + +// ListTypesRequest generates a "aws/request.Request" representing the // client's request for the ListTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1912,15 +2370,15 @@ func (c *AppSync) ListTypesRequest(input *ListTypesInput) (req *request.Request, // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" // The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. +// field is missing. Check the field values, and then try again. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is being made. That modification must complete before +// Another modification is in progress at this time and it must complete before // you can make your change. // // * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. +// The resource specified in the request was not found. Check the resource, +// and then try again. // // * ErrCodeUnauthorizedException "UnauthorizedException" // You are not authorized to perform this operation. @@ -1955,7 +2413,7 @@ const opStartSchemaCreation = "StartSchemaCreation" // StartSchemaCreationRequest generates a "aws/request.Request" representing the // client's request for the StartSchemaCreation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2008,15 +2466,15 @@ func (c *AppSync) StartSchemaCreationRequest(input *StartSchemaCreationInput) (r // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" // The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. +// field is missing. Check the field values, and then try again. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is being made. That modification must complete before +// Another modification is in progress at this time and it must complete before // you can make your change. // // * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. +// The resource specified in the request was not found. Check the resource, +// and then try again. // // * ErrCodeUnauthorizedException "UnauthorizedException" // You are not authorized to perform this operation. @@ -2051,7 +2509,7 @@ const opUpdateApiKey = "UpdateApiKey" // UpdateApiKeyRequest generates a "aws/request.Request" representing the // client's request for the UpdateApiKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2102,11 +2560,11 @@ func (c *AppSync) UpdateApiKeyRequest(input *UpdateApiKeyInput) (req *request.Re // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" // The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. +// field is missing. Check the field values, and then try again. // // * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. +// The resource specified in the request was not found. Check the resource, +// and then try again. // // * ErrCodeUnauthorizedException "UnauthorizedException" // You are not authorized to perform this operation. @@ -2148,7 +2606,7 @@ const opUpdateDataSource = "UpdateDataSource" // UpdateDataSourceRequest generates a "aws/request.Request" representing the // client's request for the UpdateDataSource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2199,15 +2657,15 @@ func (c *AppSync) UpdateDataSourceRequest(input *UpdateDataSourceInput) (req *re // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" // The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. +// field is missing. Check the field values, and then try again. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is being made. That modification must complete before +// Another modification is in progress at this time and it must complete before // you can make your change. // // * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. +// The resource specified in the request was not found. Check the resource, +// and then try again. // // * ErrCodeUnauthorizedException "UnauthorizedException" // You are not authorized to perform this operation. @@ -2237,12 +2695,102 @@ func (c *AppSync) UpdateDataSourceWithContext(ctx aws.Context, input *UpdateData return out, req.Send() } +const opUpdateFunction = "UpdateFunction" + +// UpdateFunctionRequest generates a "aws/request.Request" representing the +// client's request for the UpdateFunction 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 UpdateFunction for more information on using the UpdateFunction +// 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 UpdateFunctionRequest method. +// req, resp := client.UpdateFunctionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateFunction +func (c *AppSync) UpdateFunctionRequest(input *UpdateFunctionInput) (req *request.Request, output *UpdateFunctionOutput) { + op := &request.Operation{ + Name: opUpdateFunction, + HTTPMethod: "POST", + HTTPPath: "/v1/apis/{apiId}/functions/{functionId}", + } + + if input == nil { + input = &UpdateFunctionInput{} + } + + output = &UpdateFunctionOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateFunction API operation for AWS AppSync. +// +// Updates a Function object. +// +// 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 AppSync's +// API operation UpdateFunction for usage and error information. +// +// Returned Error Codes: +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Another modification is in progress at this time and it must complete before +// you can make your change. +// +// * ErrCodeNotFoundException "NotFoundException" +// The resource specified in the request was not found. Check the resource, +// and then try again. +// +// * ErrCodeUnauthorizedException "UnauthorizedException" +// You are not authorized to perform this operation. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An internal AWS AppSync error occurred. Try your request again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/appsync-2017-07-25/UpdateFunction +func (c *AppSync) UpdateFunction(input *UpdateFunctionInput) (*UpdateFunctionOutput, error) { + req, out := c.UpdateFunctionRequest(input) + return out, req.Send() +} + +// UpdateFunctionWithContext is the same as UpdateFunction with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateFunction 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 *AppSync) UpdateFunctionWithContext(ctx aws.Context, input *UpdateFunctionInput, opts ...request.Option) (*UpdateFunctionOutput, error) { + req, out := c.UpdateFunctionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateGraphqlApi = "UpdateGraphqlApi" // UpdateGraphqlApiRequest generates a "aws/request.Request" representing the // client's request for the UpdateGraphqlApi operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2293,15 +2841,15 @@ func (c *AppSync) UpdateGraphqlApiRequest(input *UpdateGraphqlApiInput) (req *re // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" // The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. +// field is missing. Check the field values, and then try again. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is being made. That modification must complete before +// Another modification is in progress at this time and it must complete before // you can make your change. // // * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. +// The resource specified in the request was not found. Check the resource, +// and then try again. // // * ErrCodeUnauthorizedException "UnauthorizedException" // You are not authorized to perform this operation. @@ -2336,7 +2884,7 @@ const opUpdateResolver = "UpdateResolver" // UpdateResolverRequest generates a "aws/request.Request" representing the // client's request for the UpdateResolver operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2386,12 +2934,12 @@ func (c *AppSync) UpdateResolverRequest(input *UpdateResolverInput) (req *reques // // Returned Error Codes: // * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is being made. That modification must complete before +// Another modification is in progress at this time and it must complete before // you can make your change. // // * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. +// The resource specified in the request was not found. Check the resource, +// and then try again. // // * ErrCodeUnauthorizedException "UnauthorizedException" // You are not authorized to perform this operation. @@ -2426,7 +2974,7 @@ const opUpdateType = "UpdateType" // UpdateTypeRequest generates a "aws/request.Request" representing the // client's request for the UpdateType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2477,15 +3025,15 @@ func (c *AppSync) UpdateTypeRequest(input *UpdateTypeInput) (req *request.Reques // Returned Error Codes: // * ErrCodeBadRequestException "BadRequestException" // The request is not well formed. For example, a value is invalid or a required -// field is missing. Check the field values, and try again. +// field is missing. Check the field values, and then try again. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" -// Another modification is being made. That modification must complete before +// Another modification is in progress at this time and it must complete before // you can make your change. // // * ErrCodeNotFoundException "NotFoundException" -// The resource specified in the request was not found. Check the resource and -// try again. +// The resource specified in the request was not found. Check the resource, +// and then try again. // // * ErrCodeUnauthorizedException "UnauthorizedException" // You are not authorized to perform this operation. @@ -2517,13 +3065,13 @@ func (c *AppSync) UpdateTypeWithContext(ctx aws.Context, input *UpdateTypeInput, // Describes an API key. // -// Customers invoke AWS AppSync GraphQL APIs with API keys as an identity mechanism. -// There are two key versions: +// Customers invoke AWS AppSync GraphQL API operations with API keys as an identity +// mechanism. There are two key versions: // // da1: This version was introduced at launch in November 2017. These keys always -// expire after 7 days. Key expiration is managed by DynamoDB TTL. The keys -// will cease to be valid after Feb 21, 2018 and should not be used after that -// date. +// expire after 7 days. Key expiration is managed by Amazon DynamoDB TTL. The +// keys ceased to be valid after February 21, 2018 and should not be used after +// that date. // // * ListApiKeys returns the expiration time in milliseconds. // @@ -2533,10 +3081,10 @@ func (c *AppSync) UpdateTypeWithContext(ctx aws.Context, input *UpdateTypeInput, // // * DeleteApiKey deletes the item from the table. // -// * Expiration is stored in DynamoDB as milliseconds. This results in a -// bug where keys are not automatically deleted because DynamoDB expects +// * Expiration is stored in Amazon DynamoDB as milliseconds. This results +// in a bug where keys are not automatically deleted because DynamoDB expects // the TTL to be stored in seconds. As a one-time action, we will delete -// these keys from the table after Feb 21, 2018. +// these keys from the table after February 21, 2018. // // da2: This version was introduced in February 2018 when AppSync added support // to extend key expiration. @@ -2552,7 +3100,7 @@ func (c *AppSync) UpdateTypeWithContext(ctx aws.Context, input *UpdateTypeInput, // // * DeleteApiKey deletes the item from the table. // -// * Expiration is stored in DynamoDB as seconds. +// * Expiration is stored in Amazon DynamoDB as seconds. type ApiKey struct { _ struct{} `type:"structure"` @@ -2595,6 +3143,89 @@ func (s *ApiKey) SetId(v string) *ApiKey { return s } +// The authorization config in case the HTTP endpoint requires authorization. +type AuthorizationConfig struct { + _ struct{} `type:"structure"` + + // The authorization type required by the HTTP endpoint. + // + // * AWS_IAM: The authorization type is Sigv4. + // + // AuthorizationType is a required field + AuthorizationType *string `locationName:"authorizationType" type:"string" required:"true" enum:"AuthorizationType"` + + // The AWS IAM settings. + AwsIamConfig *AwsIamConfig `locationName:"awsIamConfig" type:"structure"` +} + +// String returns the string representation +func (s AuthorizationConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AuthorizationConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AuthorizationConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AuthorizationConfig"} + if s.AuthorizationType == nil { + invalidParams.Add(request.NewErrParamRequired("AuthorizationType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAuthorizationType sets the AuthorizationType field's value. +func (s *AuthorizationConfig) SetAuthorizationType(v string) *AuthorizationConfig { + s.AuthorizationType = &v + return s +} + +// SetAwsIamConfig sets the AwsIamConfig field's value. +func (s *AuthorizationConfig) SetAwsIamConfig(v *AwsIamConfig) *AuthorizationConfig { + s.AwsIamConfig = v + return s +} + +// The AWS IAM configuration. +type AwsIamConfig struct { + _ struct{} `type:"structure"` + + // The signing region for AWS IAM authorization. + SigningRegion *string `locationName:"signingRegion" type:"string"` + + // The signing service name for AWS IAM authorization. + SigningServiceName *string `locationName:"signingServiceName" type:"string"` +} + +// String returns the string representation +func (s AwsIamConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AwsIamConfig) GoString() string { + return s.String() +} + +// SetSigningRegion sets the SigningRegion field's value. +func (s *AwsIamConfig) SetSigningRegion(v string) *AwsIamConfig { + s.SigningRegion = &v + return s +} + +// SetSigningServiceName sets the SigningServiceName field's value. +func (s *AwsIamConfig) SetSigningServiceName(v string) *AwsIamConfig { + s.SigningServiceName = &v + return s +} + type CreateApiKeyInput struct { _ struct{} `type:"structure"` @@ -2629,6 +3260,9 @@ func (s *CreateApiKeyInput) Validate() error { if s.ApiId == nil { invalidParams.Add(request.NewErrParamRequired("ApiId")) } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -2688,13 +3322,13 @@ type CreateDataSourceInput struct { // A description of the DataSource. Description *string `locationName:"description" type:"string"` - // DynamoDB settings. + // Amazon DynamoDB settings. DynamodbConfig *DynamodbDataSourceConfig `locationName:"dynamodbConfig" type:"structure"` - // Amazon Elasticsearch settings. + // Amazon Elasticsearch Service settings. ElasticsearchConfig *ElasticsearchDataSourceConfig `locationName:"elasticsearchConfig" type:"structure"` - // Http endpoint settings. + // HTTP endpoint settings. HttpConfig *HttpDataSourceConfig `locationName:"httpConfig" type:"structure"` // AWS Lambda settings. @@ -2705,8 +3339,11 @@ type CreateDataSourceInput struct { // Name is a required field Name *string `locationName:"name" type:"string" required:"true"` - // The IAM service role ARN for the data source. The system assumes this role - // when accessing the data source. + // Relational database settings. + RelationalDatabaseConfig *RelationalDatabaseDataSourceConfig `locationName:"relationalDatabaseConfig" type:"structure"` + + // The AWS IAM service role ARN for the data source. The system assumes this + // role when accessing the data source. ServiceRoleArn *string `locationName:"serviceRoleArn" type:"string"` // The type of the DataSource. @@ -2731,6 +3368,9 @@ func (s *CreateDataSourceInput) Validate() error { if s.ApiId == nil { invalidParams.Add(request.NewErrParamRequired("ApiId")) } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } @@ -2747,6 +3387,11 @@ func (s *CreateDataSourceInput) Validate() error { invalidParams.AddNested("ElasticsearchConfig", err.(request.ErrInvalidParams)) } } + if s.HttpConfig != nil { + if err := s.HttpConfig.Validate(); err != nil { + invalidParams.AddNested("HttpConfig", err.(request.ErrInvalidParams)) + } + } if s.LambdaConfig != nil { if err := s.LambdaConfig.Validate(); err != nil { invalidParams.AddNested("LambdaConfig", err.(request.ErrInvalidParams)) @@ -2801,6 +3446,12 @@ func (s *CreateDataSourceInput) SetName(v string) *CreateDataSourceInput { return s } +// SetRelationalDatabaseConfig sets the RelationalDatabaseConfig field's value. +func (s *CreateDataSourceInput) SetRelationalDatabaseConfig(v *RelationalDatabaseDataSourceConfig) *CreateDataSourceInput { + s.RelationalDatabaseConfig = v + return s +} + // SetServiceRoleArn sets the ServiceRoleArn field's value. func (s *CreateDataSourceInput) SetServiceRoleArn(v string) *CreateDataSourceInput { s.ServiceRoleArn = &v @@ -2836,62 +3487,79 @@ func (s *CreateDataSourceOutput) SetDataSource(v *DataSource) *CreateDataSourceO return s } -type CreateGraphqlApiInput struct { +type CreateFunctionInput struct { _ struct{} `type:"structure"` - // The authentication type: API key, IAM, or Amazon Cognito User Pools. + // The GraphQL API ID. // - // AuthenticationType is a required field - AuthenticationType *string `locationName:"authenticationType" type:"string" required:"true" enum:"AuthenticationType"` + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` - // The Amazon CloudWatch logs configuration. - LogConfig *LogConfig `locationName:"logConfig" type:"structure"` + // The FunctionDataSource name. + // + // DataSourceName is a required field + DataSourceName *string `locationName:"dataSourceName" type:"string" required:"true"` - // A user-supplied name for the GraphqlApi. + // The Function description. + Description *string `locationName:"description" type:"string"` + + // The version of the request mapping template. Currently the supported value + // is 2018-05-29. + // + // FunctionVersion is a required field + FunctionVersion *string `locationName:"functionVersion" type:"string" required:"true"` + + // The Function name. The function name does not have to be unique. // // Name is a required field Name *string `locationName:"name" type:"string" required:"true"` - // The Open Id Connect configuration configuration. - OpenIDConnectConfig *OpenIDConnectConfig `locationName:"openIDConnectConfig" type:"structure"` + // The Function request mapping template. Functions support only the 2018-05-29 + // version of the request mapping template. + // + // RequestMappingTemplate is a required field + RequestMappingTemplate *string `locationName:"requestMappingTemplate" min:"1" type:"string" required:"true"` - // The Amazon Cognito User Pool configuration. - UserPoolConfig *UserPoolConfig `locationName:"userPoolConfig" type:"structure"` + // The Function response mapping template. + ResponseMappingTemplate *string `locationName:"responseMappingTemplate" min:"1" type:"string"` } // String returns the string representation -func (s CreateGraphqlApiInput) String() string { +func (s CreateFunctionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateGraphqlApiInput) GoString() string { +func (s CreateFunctionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateGraphqlApiInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateGraphqlApiInput"} - if s.AuthenticationType == nil { - invalidParams.Add(request.NewErrParamRequired("AuthenticationType")) +func (s *CreateFunctionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateFunctionInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.DataSourceName == nil { + invalidParams.Add(request.NewErrParamRequired("DataSourceName")) + } + if s.FunctionVersion == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionVersion")) } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } - if s.LogConfig != nil { - if err := s.LogConfig.Validate(); err != nil { - invalidParams.AddNested("LogConfig", err.(request.ErrInvalidParams)) - } + if s.RequestMappingTemplate == nil { + invalidParams.Add(request.NewErrParamRequired("RequestMappingTemplate")) } - if s.OpenIDConnectConfig != nil { - if err := s.OpenIDConnectConfig.Validate(); err != nil { - invalidParams.AddNested("OpenIDConnectConfig", err.(request.ErrInvalidParams)) - } + if s.RequestMappingTemplate != nil && len(*s.RequestMappingTemplate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RequestMappingTemplate", 1)) } - if s.UserPoolConfig != nil { - if err := s.UserPoolConfig.Validate(); err != nil { - invalidParams.AddNested("UserPoolConfig", err.(request.ErrInvalidParams)) - } + if s.ResponseMappingTemplate != nil && len(*s.ResponseMappingTemplate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResponseMappingTemplate", 1)) } if invalidParams.Len() > 0 { @@ -2900,27 +3568,156 @@ func (s *CreateGraphqlApiInput) Validate() error { return nil } -// SetAuthenticationType sets the AuthenticationType field's value. -func (s *CreateGraphqlApiInput) SetAuthenticationType(v string) *CreateGraphqlApiInput { - s.AuthenticationType = &v +// SetApiId sets the ApiId field's value. +func (s *CreateFunctionInput) SetApiId(v string) *CreateFunctionInput { + s.ApiId = &v return s } -// SetLogConfig sets the LogConfig field's value. -func (s *CreateGraphqlApiInput) SetLogConfig(v *LogConfig) *CreateGraphqlApiInput { - s.LogConfig = v +// SetDataSourceName sets the DataSourceName field's value. +func (s *CreateFunctionInput) SetDataSourceName(v string) *CreateFunctionInput { + s.DataSourceName = &v return s } -// SetName sets the Name field's value. -func (s *CreateGraphqlApiInput) SetName(v string) *CreateGraphqlApiInput { - s.Name = &v +// SetDescription sets the Description field's value. +func (s *CreateFunctionInput) SetDescription(v string) *CreateFunctionInput { + s.Description = &v return s } -// SetOpenIDConnectConfig sets the OpenIDConnectConfig field's value. -func (s *CreateGraphqlApiInput) SetOpenIDConnectConfig(v *OpenIDConnectConfig) *CreateGraphqlApiInput { - s.OpenIDConnectConfig = v +// SetFunctionVersion sets the FunctionVersion field's value. +func (s *CreateFunctionInput) SetFunctionVersion(v string) *CreateFunctionInput { + s.FunctionVersion = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateFunctionInput) SetName(v string) *CreateFunctionInput { + s.Name = &v + return s +} + +// SetRequestMappingTemplate sets the RequestMappingTemplate field's value. +func (s *CreateFunctionInput) SetRequestMappingTemplate(v string) *CreateFunctionInput { + s.RequestMappingTemplate = &v + return s +} + +// SetResponseMappingTemplate sets the ResponseMappingTemplate field's value. +func (s *CreateFunctionInput) SetResponseMappingTemplate(v string) *CreateFunctionInput { + s.ResponseMappingTemplate = &v + return s +} + +type CreateFunctionOutput struct { + _ struct{} `type:"structure"` + + // The Function object. + FunctionConfiguration *FunctionConfiguration `locationName:"functionConfiguration" type:"structure"` +} + +// String returns the string representation +func (s CreateFunctionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFunctionOutput) GoString() string { + return s.String() +} + +// SetFunctionConfiguration sets the FunctionConfiguration field's value. +func (s *CreateFunctionOutput) SetFunctionConfiguration(v *FunctionConfiguration) *CreateFunctionOutput { + s.FunctionConfiguration = v + return s +} + +type CreateGraphqlApiInput struct { + _ struct{} `type:"structure"` + + // The authentication type: API key, AWS IAM, or Amazon Cognito user pools. + // + // AuthenticationType is a required field + AuthenticationType *string `locationName:"authenticationType" type:"string" required:"true" enum:"AuthenticationType"` + + // The Amazon CloudWatch Logs configuration. + LogConfig *LogConfig `locationName:"logConfig" type:"structure"` + + // A user-supplied name for the GraphqlApi. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // The OpenID Connect configuration. + OpenIDConnectConfig *OpenIDConnectConfig `locationName:"openIDConnectConfig" type:"structure"` + + // The Amazon Cognito user pool configuration. + UserPoolConfig *UserPoolConfig `locationName:"userPoolConfig" type:"structure"` +} + +// String returns the string representation +func (s CreateGraphqlApiInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateGraphqlApiInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateGraphqlApiInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateGraphqlApiInput"} + if s.AuthenticationType == nil { + invalidParams.Add(request.NewErrParamRequired("AuthenticationType")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.LogConfig != nil { + if err := s.LogConfig.Validate(); err != nil { + invalidParams.AddNested("LogConfig", err.(request.ErrInvalidParams)) + } + } + if s.OpenIDConnectConfig != nil { + if err := s.OpenIDConnectConfig.Validate(); err != nil { + invalidParams.AddNested("OpenIDConnectConfig", err.(request.ErrInvalidParams)) + } + } + if s.UserPoolConfig != nil { + if err := s.UserPoolConfig.Validate(); err != nil { + invalidParams.AddNested("UserPoolConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAuthenticationType sets the AuthenticationType field's value. +func (s *CreateGraphqlApiInput) SetAuthenticationType(v string) *CreateGraphqlApiInput { + s.AuthenticationType = &v + return s +} + +// SetLogConfig sets the LogConfig field's value. +func (s *CreateGraphqlApiInput) SetLogConfig(v *LogConfig) *CreateGraphqlApiInput { + s.LogConfig = v + return s +} + +// SetName sets the Name field's value. +func (s *CreateGraphqlApiInput) SetName(v string) *CreateGraphqlApiInput { + s.Name = &v + return s +} + +// SetOpenIDConnectConfig sets the OpenIDConnectConfig field's value. +func (s *CreateGraphqlApiInput) SetOpenIDConnectConfig(v *OpenIDConnectConfig) *CreateGraphqlApiInput { + s.OpenIDConnectConfig = v return s } @@ -2962,15 +3759,27 @@ type CreateResolverInput struct { ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` // The name of the data source for which the resolver is being created. - // - // DataSourceName is a required field - DataSourceName *string `locationName:"dataSourceName" type:"string" required:"true"` + DataSourceName *string `locationName:"dataSourceName" type:"string"` // The name of the field to attach the resolver to. // // FieldName is a required field FieldName *string `locationName:"fieldName" type:"string" required:"true"` + // The resolver type. + // + // * UNIT: A UNIT resolver type. A UNIT resolver is the default resolver + // type. A UNIT resolver enables you to execute a GraphQL query against a + // single data source. + // + // * PIPELINE: A PIPELINE resolver type. A PIPELINE resolver enables you + // to execute a series of Function in a serial manner. You can use a pipeline + // resolver to execute a GraphQL query against multiple data sources. + Kind *string `locationName:"kind" type:"string" enum:"ResolverKind"` + + // The PipelineConfig. + PipelineConfig *PipelineConfig `locationName:"pipelineConfig" type:"structure"` + // The mapping template to be used for requests. // // A resolver uses a request mapping template to convert a GraphQL expression @@ -3005,8 +3814,8 @@ func (s *CreateResolverInput) Validate() error { if s.ApiId == nil { invalidParams.Add(request.NewErrParamRequired("ApiId")) } - if s.DataSourceName == nil { - invalidParams.Add(request.NewErrParamRequired("DataSourceName")) + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) } if s.FieldName == nil { invalidParams.Add(request.NewErrParamRequired("FieldName")) @@ -3023,6 +3832,9 @@ func (s *CreateResolverInput) Validate() error { if s.TypeName == nil { invalidParams.Add(request.NewErrParamRequired("TypeName")) } + if s.TypeName != nil && len(*s.TypeName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TypeName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -3048,6 +3860,18 @@ func (s *CreateResolverInput) SetFieldName(v string) *CreateResolverInput { return s } +// SetKind sets the Kind field's value. +func (s *CreateResolverInput) SetKind(v string) *CreateResolverInput { + s.Kind = &v + return s +} + +// SetPipelineConfig sets the PipelineConfig field's value. +func (s *CreateResolverInput) SetPipelineConfig(v *PipelineConfig) *CreateResolverInput { + s.PipelineConfig = v + return s +} + // SetRequestMappingTemplate sets the RequestMappingTemplate field's value. func (s *CreateResolverInput) SetRequestMappingTemplate(v string) *CreateResolverInput { s.RequestMappingTemplate = &v @@ -3126,6 +3950,9 @@ func (s *CreateTypeInput) Validate() error { if s.ApiId == nil { invalidParams.Add(request.NewErrParamRequired("ApiId")) } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } if s.Definition == nil { invalidParams.Add(request.NewErrParamRequired("Definition")) } @@ -3190,23 +4017,26 @@ type DataSource struct { // The description of the data source. Description *string `locationName:"description" type:"string"` - // DynamoDB settings. + // Amazon DynamoDB settings. DynamodbConfig *DynamodbDataSourceConfig `locationName:"dynamodbConfig" type:"structure"` - // Amazon Elasticsearch settings. + // Amazon Elasticsearch Service settings. ElasticsearchConfig *ElasticsearchDataSourceConfig `locationName:"elasticsearchConfig" type:"structure"` - // Http endpoint settings. + // HTTP endpoint settings. HttpConfig *HttpDataSourceConfig `locationName:"httpConfig" type:"structure"` - // Lambda settings. + // AWS Lambda settings. LambdaConfig *LambdaDataSourceConfig `locationName:"lambdaConfig" type:"structure"` // The name of the data source. Name *string `locationName:"name" type:"string"` - // The IAM service role ARN for the data source. The system assumes this role - // when accessing the data source. + // Relational database settings. + RelationalDatabaseConfig *RelationalDatabaseDataSourceConfig `locationName:"relationalDatabaseConfig" type:"structure"` + + // The AWS IAM service role ARN for the data source. The system assumes this + // role when accessing the data source. ServiceRoleArn *string `locationName:"serviceRoleArn" type:"string"` // The type of the data source. @@ -3218,12 +4048,14 @@ type DataSource struct { // // * AWS_LAMBDA: The data source is an AWS Lambda function. // - // * NONE: There is no data source. This type is used when when you wish - // to invoke a GraphQL operation without connecting to a data source, such - // as performing data transformation with resolvers or triggering a subscription - // to be invoked from a mutation. + // * NONE: There is no data source. This type is used when you wish to invoke + // a GraphQL operation without connecting to a data source, such as performing + // data transformation with resolvers or triggering a subscription to be + // invoked from a mutation. // // * HTTP: The data source is an HTTP endpoint. + // + // * RELATIONAL_DATABASE: The data source is a relational database. Type *string `locationName:"type" type:"string" enum:"DataSourceType"` } @@ -3279,6 +4111,12 @@ func (s *DataSource) SetName(v string) *DataSource { return s } +// SetRelationalDatabaseConfig sets the RelationalDatabaseConfig field's value. +func (s *DataSource) SetRelationalDatabaseConfig(v *RelationalDatabaseDataSourceConfig) *DataSource { + s.RelationalDatabaseConfig = v + return s +} + // SetServiceRoleArn sets the ServiceRoleArn field's value. func (s *DataSource) SetServiceRoleArn(v string) *DataSource { s.ServiceRoleArn = &v @@ -3321,9 +4159,15 @@ func (s *DeleteApiKeyInput) Validate() error { if s.ApiId == nil { invalidParams.Add(request.NewErrParamRequired("ApiId")) } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -3387,9 +4231,15 @@ func (s *DeleteDataSourceInput) Validate() error { if s.ApiId == nil { invalidParams.Add(request.NewErrParamRequired("ApiId")) } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -3423,6 +4273,78 @@ func (s DeleteDataSourceOutput) GoString() string { return s.String() } +type DeleteFunctionInput struct { + _ struct{} `type:"structure"` + + // The GraphQL API ID. + // + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // The Function ID. + // + // FunctionId is a required field + FunctionId *string `location:"uri" locationName:"functionId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteFunctionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFunctionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteFunctionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteFunctionInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.FunctionId == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionId")) + } + if s.FunctionId != nil && len(*s.FunctionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *DeleteFunctionInput) SetApiId(v string) *DeleteFunctionInput { + s.ApiId = &v + return s +} + +// SetFunctionId sets the FunctionId field's value. +func (s *DeleteFunctionInput) SetFunctionId(v string) *DeleteFunctionInput { + s.FunctionId = &v + return s +} + +type DeleteFunctionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteFunctionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFunctionOutput) GoString() string { + return s.String() +} + type DeleteGraphqlApiInput struct { _ struct{} `type:"structure"` @@ -3448,6 +4370,9 @@ func (s *DeleteGraphqlApiInput) Validate() error { if s.ApiId == nil { invalidParams.Add(request.NewErrParamRequired("ApiId")) } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -3510,12 +4435,21 @@ func (s *DeleteResolverInput) Validate() error { if s.ApiId == nil { invalidParams.Add(request.NewErrParamRequired("ApiId")) } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } if s.FieldName == nil { invalidParams.Add(request.NewErrParamRequired("FieldName")) } + if s.FieldName != nil && len(*s.FieldName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FieldName", 1)) + } if s.TypeName == nil { invalidParams.Add(request.NewErrParamRequired("TypeName")) } + if s.TypeName != nil && len(*s.TypeName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TypeName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -3585,9 +4519,15 @@ func (s *DeleteTypeInput) Validate() error { if s.ApiId == nil { invalidParams.Add(request.NewErrParamRequired("ApiId")) } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } if s.TypeName == nil { invalidParams.Add(request.NewErrParamRequired("TypeName")) } + if s.TypeName != nil && len(*s.TypeName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TypeName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -3621,11 +4561,11 @@ func (s DeleteTypeOutput) GoString() string { return s.String() } -// Describes a DynamoDB data source configuration. +// Describes an Amazon DynamoDB data source configuration. type DynamodbDataSourceConfig struct { _ struct{} `type:"structure"` - // The AWS region. + // The AWS Region. // // AwsRegion is a required field AwsRegion *string `locationName:"awsRegion" type:"string" required:"true"` @@ -3687,7 +4627,7 @@ func (s *DynamodbDataSourceConfig) SetUseCallerCredentials(v bool) *DynamodbData type ElasticsearchDataSourceConfig struct { _ struct{} `type:"structure"` - // The AWS region. + // The AWS Region. // // AwsRegion is a required field AwsRegion *string `locationName:"awsRegion" type:"string" required:"true"` @@ -3736,6 +4676,96 @@ func (s *ElasticsearchDataSourceConfig) SetEndpoint(v string) *ElasticsearchData return s } +// A function is a reusable entity. Multiple functions can be used to compose +// the resolver logic. +type FunctionConfiguration struct { + _ struct{} `type:"structure"` + + // The name of the DataSource. + DataSourceName *string `locationName:"dataSourceName" type:"string"` + + // The Function description. + Description *string `locationName:"description" type:"string"` + + // The ARN of the Function object. + FunctionArn *string `locationName:"functionArn" type:"string"` + + // A unique ID representing the Function object. + FunctionId *string `locationName:"functionId" type:"string"` + + // The version of the request mapping template. Currently only the 2018-05-29 + // version of the template is supported. + FunctionVersion *string `locationName:"functionVersion" type:"string"` + + // The name of the Function object. + Name *string `locationName:"name" type:"string"` + + // The Function request mapping template. Functions support only the 2018-05-29 + // version of the request mapping template. + RequestMappingTemplate *string `locationName:"requestMappingTemplate" min:"1" type:"string"` + + // The Function response mapping template. + ResponseMappingTemplate *string `locationName:"responseMappingTemplate" min:"1" type:"string"` +} + +// String returns the string representation +func (s FunctionConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FunctionConfiguration) GoString() string { + return s.String() +} + +// SetDataSourceName sets the DataSourceName field's value. +func (s *FunctionConfiguration) SetDataSourceName(v string) *FunctionConfiguration { + s.DataSourceName = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *FunctionConfiguration) SetDescription(v string) *FunctionConfiguration { + s.Description = &v + return s +} + +// SetFunctionArn sets the FunctionArn field's value. +func (s *FunctionConfiguration) SetFunctionArn(v string) *FunctionConfiguration { + s.FunctionArn = &v + return s +} + +// SetFunctionId sets the FunctionId field's value. +func (s *FunctionConfiguration) SetFunctionId(v string) *FunctionConfiguration { + s.FunctionId = &v + return s +} + +// SetFunctionVersion sets the FunctionVersion field's value. +func (s *FunctionConfiguration) SetFunctionVersion(v string) *FunctionConfiguration { + s.FunctionVersion = &v + return s +} + +// SetName sets the Name field's value. +func (s *FunctionConfiguration) SetName(v string) *FunctionConfiguration { + s.Name = &v + return s +} + +// SetRequestMappingTemplate sets the RequestMappingTemplate field's value. +func (s *FunctionConfiguration) SetRequestMappingTemplate(v string) *FunctionConfiguration { + s.RequestMappingTemplate = &v + return s +} + +// SetResponseMappingTemplate sets the ResponseMappingTemplate field's value. +func (s *FunctionConfiguration) SetResponseMappingTemplate(v string) *FunctionConfiguration { + s.ResponseMappingTemplate = &v + return s +} + type GetDataSourceInput struct { _ struct{} `type:"structure"` @@ -3766,9 +4796,15 @@ func (s *GetDataSourceInput) Validate() error { if s.ApiId == nil { invalidParams.Add(request.NewErrParamRequired("ApiId")) } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -3811,6 +4847,87 @@ func (s *GetDataSourceOutput) SetDataSource(v *DataSource) *GetDataSourceOutput return s } +type GetFunctionInput struct { + _ struct{} `type:"structure"` + + // The GraphQL API ID. + // + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // The Function ID. + // + // FunctionId is a required field + FunctionId *string `location:"uri" locationName:"functionId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetFunctionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetFunctionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetFunctionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetFunctionInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.FunctionId == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionId")) + } + if s.FunctionId != nil && len(*s.FunctionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *GetFunctionInput) SetApiId(v string) *GetFunctionInput { + s.ApiId = &v + return s +} + +// SetFunctionId sets the FunctionId field's value. +func (s *GetFunctionInput) SetFunctionId(v string) *GetFunctionInput { + s.FunctionId = &v + return s +} + +type GetFunctionOutput struct { + _ struct{} `type:"structure"` + + // The Function object. + FunctionConfiguration *FunctionConfiguration `locationName:"functionConfiguration" type:"structure"` +} + +// String returns the string representation +func (s GetFunctionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetFunctionOutput) GoString() string { + return s.String() +} + +// SetFunctionConfiguration sets the FunctionConfiguration field's value. +func (s *GetFunctionOutput) SetFunctionConfiguration(v *FunctionConfiguration) *GetFunctionOutput { + s.FunctionConfiguration = v + return s +} + type GetGraphqlApiInput struct { _ struct{} `type:"structure"` @@ -3836,6 +4953,9 @@ func (s *GetGraphqlApiInput) Validate() error { if s.ApiId == nil { invalidParams.Add(request.NewErrParamRequired("ApiId")) } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -3902,6 +5022,9 @@ func (s *GetIntrospectionSchemaInput) Validate() error { if s.ApiId == nil { invalidParams.Add(request.NewErrParamRequired("ApiId")) } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } if s.Format == nil { invalidParams.Add(request.NewErrParamRequired("Format")) } @@ -3984,12 +5107,21 @@ func (s *GetResolverInput) Validate() error { if s.ApiId == nil { invalidParams.Add(request.NewErrParamRequired("ApiId")) } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } if s.FieldName == nil { invalidParams.Add(request.NewErrParamRequired("FieldName")) } + if s.FieldName != nil && len(*s.FieldName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FieldName", 1)) + } if s.TypeName == nil { invalidParams.Add(request.NewErrParamRequired("TypeName")) } + if s.TypeName != nil && len(*s.TypeName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TypeName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -4063,6 +5195,9 @@ func (s *GetSchemaCreationStatusInput) Validate() error { if s.ApiId == nil { invalidParams.Add(request.NewErrParamRequired("ApiId")) } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -4144,12 +5279,18 @@ func (s *GetTypeInput) Validate() error { if s.ApiId == nil { invalidParams.Add(request.NewErrParamRequired("ApiId")) } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } if s.Format == nil { invalidParams.Add(request.NewErrParamRequired("Format")) } if s.TypeName == nil { invalidParams.Add(request.NewErrParamRequired("TypeName")) } + if s.TypeName != nil && len(*s.TypeName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TypeName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -4217,13 +5358,13 @@ type GraphqlApi struct { // The API name. Name *string `locationName:"name" type:"string"` - // The Open Id Connect configuration. + // The OpenID Connect configuration. OpenIDConnectConfig *OpenIDConnectConfig `locationName:"openIDConnectConfig" type:"structure"` // The URIs. Uris map[string]*string `locationName:"uris" type:"map"` - // The Amazon Cognito User Pool configuration. + // The Amazon Cognito user pool configuration. UserPoolConfig *UserPoolConfig `locationName:"userPoolConfig" type:"structure"` } @@ -4285,14 +5426,17 @@ func (s *GraphqlApi) SetUserPoolConfig(v *UserPoolConfig) *GraphqlApi { return s } -// Describes a Http data source configuration. +// Describes an HTTP data source configuration. type HttpDataSourceConfig struct { _ struct{} `type:"structure"` - // The Http url endpoint. You can either specify the domain name or ip and port - // combination and the url scheme must be http(s). If the port is not specified, - // AWS AppSync will use the default port 80 for http endpoint and port 443 for - // https endpoints. + // The authorization config in case the HTTP endpoint requires authorization. + AuthorizationConfig *AuthorizationConfig `locationName:"authorizationConfig" type:"structure"` + + // The HTTP URL endpoint. You can either specify the domain name or IP, and + // port combination, and the URL scheme must be HTTP or HTTPS. If the port is + // not specified, AWS AppSync uses the default port 80 for the HTTP endpoint + // and port 443 for HTTPS endpoints. Endpoint *string `locationName:"endpoint" type:"string"` } @@ -4306,13 +5450,34 @@ func (s HttpDataSourceConfig) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *HttpDataSourceConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "HttpDataSourceConfig"} + if s.AuthorizationConfig != nil { + if err := s.AuthorizationConfig.Validate(); err != nil { + invalidParams.AddNested("AuthorizationConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAuthorizationConfig sets the AuthorizationConfig field's value. +func (s *HttpDataSourceConfig) SetAuthorizationConfig(v *AuthorizationConfig) *HttpDataSourceConfig { + s.AuthorizationConfig = v + return s +} + // SetEndpoint sets the Endpoint field's value. func (s *HttpDataSourceConfig) SetEndpoint(v string) *HttpDataSourceConfig { s.Endpoint = &v return s } -// Describes a Lambda data source configuration. +// Describes an AWS Lambda data source configuration. type LambdaDataSourceConfig struct { _ struct{} `type:"structure"` @@ -4383,6 +5548,9 @@ func (s *ListApiKeysInput) Validate() error { if s.ApiId == nil { invalidParams.Add(request.NewErrParamRequired("ApiId")) } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -4473,6 +5641,9 @@ func (s *ListDataSourcesInput) Validate() error { if s.ApiId == nil { invalidParams.Add(request.NewErrParamRequired("ApiId")) } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -4531,6 +5702,99 @@ func (s *ListDataSourcesOutput) SetNextToken(v string) *ListDataSourcesOutput { return s } +type ListFunctionsInput struct { + _ struct{} `type:"structure"` + + // The GraphQL API ID. + // + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // The maximum number of results you want the request to return. + MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` + + // An identifier that was returned from the previous call to this operation, + // which can be used to return the next set of items in the list. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListFunctionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListFunctionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListFunctionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListFunctionsInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *ListFunctionsInput) SetApiId(v string) *ListFunctionsInput { + s.ApiId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListFunctionsInput) SetMaxResults(v int64) *ListFunctionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListFunctionsInput) SetNextToken(v string) *ListFunctionsInput { + s.NextToken = &v + return s +} + +type ListFunctionsOutput struct { + _ struct{} `type:"structure"` + + // A list of Function objects. + Functions []*FunctionConfiguration `locationName:"functions" type:"list"` + + // An identifier that was returned from the previous call to this operation, + // which can be used to return the next set of items in the list. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListFunctionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListFunctionsOutput) GoString() string { + return s.String() +} + +// SetFunctions sets the Functions field's value. +func (s *ListFunctionsOutput) SetFunctions(v []*FunctionConfiguration) *ListFunctionsOutput { + s.Functions = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListFunctionsOutput) SetNextToken(v string) *ListFunctionsOutput { + s.NextToken = &v + return s +} + type ListGraphqlApisInput struct { _ struct{} `type:"structure"` @@ -4576,24 +5840,133 @@ type ListGraphqlApisOutput struct { } // String returns the string representation -func (s ListGraphqlApisOutput) String() string { +func (s ListGraphqlApisOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListGraphqlApisOutput) GoString() string { + return s.String() +} + +// SetGraphqlApis sets the GraphqlApis field's value. +func (s *ListGraphqlApisOutput) SetGraphqlApis(v []*GraphqlApi) *ListGraphqlApisOutput { + s.GraphqlApis = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListGraphqlApisOutput) SetNextToken(v string) *ListGraphqlApisOutput { + s.NextToken = &v + return s +} + +type ListResolversByFunctionInput struct { + _ struct{} `type:"structure"` + + // The API ID. + // + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // The Function ID. + // + // FunctionId is a required field + FunctionId *string `location:"uri" locationName:"functionId" type:"string" required:"true"` + + // The maximum number of results you want the request to return. + MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` + + // An identifier that was returned from the previous call to this operation, + // which you can use to return the next set of items in the list. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListResolversByFunctionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListResolversByFunctionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListResolversByFunctionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListResolversByFunctionInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.FunctionId == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionId")) + } + if s.FunctionId != nil && len(*s.FunctionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *ListResolversByFunctionInput) SetApiId(v string) *ListResolversByFunctionInput { + s.ApiId = &v + return s +} + +// SetFunctionId sets the FunctionId field's value. +func (s *ListResolversByFunctionInput) SetFunctionId(v string) *ListResolversByFunctionInput { + s.FunctionId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListResolversByFunctionInput) SetMaxResults(v int64) *ListResolversByFunctionInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListResolversByFunctionInput) SetNextToken(v string) *ListResolversByFunctionInput { + s.NextToken = &v + return s +} + +type ListResolversByFunctionOutput struct { + _ struct{} `type:"structure"` + + // An identifier that can be used to return the next set of items in the list. + NextToken *string `locationName:"nextToken" type:"string"` + + // The list of resolvers. + Resolvers []*Resolver `locationName:"resolvers" type:"list"` +} + +// String returns the string representation +func (s ListResolversByFunctionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListGraphqlApisOutput) GoString() string { +func (s ListResolversByFunctionOutput) GoString() string { return s.String() } -// SetGraphqlApis sets the GraphqlApis field's value. -func (s *ListGraphqlApisOutput) SetGraphqlApis(v []*GraphqlApi) *ListGraphqlApisOutput { - s.GraphqlApis = v +// SetNextToken sets the NextToken field's value. +func (s *ListResolversByFunctionOutput) SetNextToken(v string) *ListResolversByFunctionOutput { + s.NextToken = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *ListGraphqlApisOutput) SetNextToken(v string) *ListGraphqlApisOutput { - s.NextToken = &v +// SetResolvers sets the Resolvers field's value. +func (s *ListResolversByFunctionOutput) SetResolvers(v []*Resolver) *ListResolversByFunctionOutput { + s.Resolvers = v return s } @@ -4634,9 +6007,15 @@ func (s *ListResolversInput) Validate() error { if s.ApiId == nil { invalidParams.Add(request.NewErrParamRequired("ApiId")) } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } if s.TypeName == nil { invalidParams.Add(request.NewErrParamRequired("TypeName")) } + if s.TypeName != nil && len(*s.TypeName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TypeName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -4738,6 +6117,9 @@ func (s *ListTypesInput) Validate() error { if s.ApiId == nil { invalidParams.Add(request.NewErrParamRequired("ApiId")) } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } if s.Format == nil { invalidParams.Add(request.NewErrParamRequired("Format")) } @@ -4815,7 +6197,7 @@ type LogConfig struct { // CloudWatchLogsRoleArn is a required field CloudWatchLogsRoleArn *string `locationName:"cloudWatchLogsRoleArn" type:"string" required:"true"` - // The field logging level. Values can be NONE, ERROR, ALL. + // The field logging level. Values can be NONE, ERROR, or ALL. // // * NONE: No field-level logs are captured. // @@ -4876,24 +6258,24 @@ func (s *LogConfig) SetFieldLogLevel(v string) *LogConfig { return s } -// Describes an Open Id Connect configuration. +// Describes an OpenID Connect configuration. type OpenIDConnectConfig struct { _ struct{} `type:"structure"` // The number of milliseconds a token is valid after being authenticated. AuthTTL *int64 `locationName:"authTTL" type:"long"` - // The client identifier of the Relying party at the OpenID Provider. This identifier - // is typically obtained when the Relying party is registered with the OpenID - // Provider. You can specify a regular expression so the AWS AppSync can validate - // against multiple client identifiers at a time + // The client identifier of the Relying party at the OpenID identity provider. + // This identifier is typically obtained when the Relying party is registered + // with the OpenID identity provider. You can specify a regular expression so + // the AWS AppSync can validate against multiple client identifiers at a time. ClientId *string `locationName:"clientId" type:"string"` // The number of milliseconds a token is valid after being issued to a user. IatTTL *int64 `locationName:"iatTTL" type:"long"` - // The issuer for the open id connect configuration. The issuer returned by - // discovery MUST exactly match the value of iss in the ID Token. + // The issuer for the OpenID Connect configuration. The issuer returned by discovery + // must exactly match the value of iss in the ID token. // // Issuer is a required field Issuer *string `locationName:"issuer" type:"string" required:"true"` @@ -4946,6 +6328,126 @@ func (s *OpenIDConnectConfig) SetIssuer(v string) *OpenIDConnectConfig { return s } +// The pipeline configuration for a resolver of kind PIPELINE. +type PipelineConfig struct { + _ struct{} `type:"structure"` + + // A list of Function objects. + Functions []*string `locationName:"functions" type:"list"` +} + +// String returns the string representation +func (s PipelineConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PipelineConfig) GoString() string { + return s.String() +} + +// SetFunctions sets the Functions field's value. +func (s *PipelineConfig) SetFunctions(v []*string) *PipelineConfig { + s.Functions = v + return s +} + +// The Amazon RDS HTTP endpoint configuration. +type RdsHttpEndpointConfig struct { + _ struct{} `type:"structure"` + + // AWS Region for RDS HTTP endpoint. + AwsRegion *string `locationName:"awsRegion" type:"string"` + + // AWS secret store ARN for database credentials. + AwsSecretStoreArn *string `locationName:"awsSecretStoreArn" type:"string"` + + // Logical database name. + DatabaseName *string `locationName:"databaseName" type:"string"` + + // Amazon RDS cluster identifier. + DbClusterIdentifier *string `locationName:"dbClusterIdentifier" type:"string"` + + // Logical schema name. + Schema *string `locationName:"schema" type:"string"` +} + +// String returns the string representation +func (s RdsHttpEndpointConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RdsHttpEndpointConfig) GoString() string { + return s.String() +} + +// SetAwsRegion sets the AwsRegion field's value. +func (s *RdsHttpEndpointConfig) SetAwsRegion(v string) *RdsHttpEndpointConfig { + s.AwsRegion = &v + return s +} + +// SetAwsSecretStoreArn sets the AwsSecretStoreArn field's value. +func (s *RdsHttpEndpointConfig) SetAwsSecretStoreArn(v string) *RdsHttpEndpointConfig { + s.AwsSecretStoreArn = &v + return s +} + +// SetDatabaseName sets the DatabaseName field's value. +func (s *RdsHttpEndpointConfig) SetDatabaseName(v string) *RdsHttpEndpointConfig { + s.DatabaseName = &v + return s +} + +// SetDbClusterIdentifier sets the DbClusterIdentifier field's value. +func (s *RdsHttpEndpointConfig) SetDbClusterIdentifier(v string) *RdsHttpEndpointConfig { + s.DbClusterIdentifier = &v + return s +} + +// SetSchema sets the Schema field's value. +func (s *RdsHttpEndpointConfig) SetSchema(v string) *RdsHttpEndpointConfig { + s.Schema = &v + return s +} + +// Describes a relational database data source configuration. +type RelationalDatabaseDataSourceConfig struct { + _ struct{} `type:"structure"` + + // Amazon RDS HTTP endpoint settings. + RdsHttpEndpointConfig *RdsHttpEndpointConfig `locationName:"rdsHttpEndpointConfig" type:"structure"` + + // Source type for the relational database. + // + // * RDS_HTTP_ENDPOINT: The relational database source type is an Amazon + // RDS HTTP endpoint. + RelationalDatabaseSourceType *string `locationName:"relationalDatabaseSourceType" type:"string" enum:"RelationalDatabaseSourceType"` +} + +// String returns the string representation +func (s RelationalDatabaseDataSourceConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RelationalDatabaseDataSourceConfig) GoString() string { + return s.String() +} + +// SetRdsHttpEndpointConfig sets the RdsHttpEndpointConfig field's value. +func (s *RelationalDatabaseDataSourceConfig) SetRdsHttpEndpointConfig(v *RdsHttpEndpointConfig) *RelationalDatabaseDataSourceConfig { + s.RdsHttpEndpointConfig = v + return s +} + +// SetRelationalDatabaseSourceType sets the RelationalDatabaseSourceType field's value. +func (s *RelationalDatabaseDataSourceConfig) SetRelationalDatabaseSourceType(v string) *RelationalDatabaseDataSourceConfig { + s.RelationalDatabaseSourceType = &v + return s +} + // Describes a resolver. type Resolver struct { _ struct{} `type:"structure"` @@ -4956,6 +6458,20 @@ type Resolver struct { // The resolver field name. FieldName *string `locationName:"fieldName" type:"string"` + // The resolver type. + // + // * UNIT: A UNIT resolver type. A UNIT resolver is the default resolver + // type. A UNIT resolver enables you to execute a GraphQL query against a + // single data source. + // + // * PIPELINE: A PIPELINE resolver type. A PIPELINE resolver enables you + // to execute a series of Function in a serial manner. You can use a pipeline + // resolver to execute a GraphQL query against multiple data sources. + Kind *string `locationName:"kind" type:"string" enum:"ResolverKind"` + + // The PipelineConfig. + PipelineConfig *PipelineConfig `locationName:"pipelineConfig" type:"structure"` + // The request mapping template. RequestMappingTemplate *string `locationName:"requestMappingTemplate" min:"1" type:"string"` @@ -4991,6 +6507,18 @@ func (s *Resolver) SetFieldName(v string) *Resolver { return s } +// SetKind sets the Kind field's value. +func (s *Resolver) SetKind(v string) *Resolver { + s.Kind = &v + return s +} + +// SetPipelineConfig sets the PipelineConfig field's value. +func (s *Resolver) SetPipelineConfig(v *PipelineConfig) *Resolver { + s.PipelineConfig = v + return s +} + // SetRequestMappingTemplate sets the RequestMappingTemplate field's value. func (s *Resolver) SetRequestMappingTemplate(v string) *Resolver { s.RequestMappingTemplate = &v @@ -5047,6 +6575,9 @@ func (s *StartSchemaCreationInput) Validate() error { if s.ApiId == nil { invalidParams.Add(request.NewErrParamRequired("ApiId")) } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } if s.Definition == nil { invalidParams.Add(request.NewErrParamRequired("Definition")) } @@ -5072,7 +6603,7 @@ func (s *StartSchemaCreationInput) SetDefinition(v []byte) *StartSchemaCreationI type StartSchemaCreationOutput struct { _ struct{} `type:"structure"` - // The current state of the schema (PROCESSING, ACTIVE, or DELETING). Once the + // The current state of the schema (PROCESSING, ACTIVE, or DELETING). When the // schema is in the ACTIVE state, you can add data. Status *string `locationName:"status" type:"string" enum:"SchemaStatus"` } @@ -5156,7 +6687,7 @@ func (s *Type) SetName(v string) *Type { type UpdateApiKeyInput struct { _ struct{} `type:"structure"` - // The ID for the GraphQL API + // The ID for the GraphQL API. // // ApiId is a required field ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` @@ -5190,9 +6721,15 @@ func (s *UpdateApiKeyInput) Validate() error { if s.ApiId == nil { invalidParams.Add(request.NewErrParamRequired("ApiId")) } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -5258,16 +6795,16 @@ type UpdateDataSourceInput struct { // The new description for the data source. Description *string `locationName:"description" type:"string"` - // The new DynamoDB configuration. + // The new Amazon DynamoDB configuration. DynamodbConfig *DynamodbDataSourceConfig `locationName:"dynamodbConfig" type:"structure"` - // The new Elasticsearch configuration. + // The new Elasticsearch Service configuration. ElasticsearchConfig *ElasticsearchDataSourceConfig `locationName:"elasticsearchConfig" type:"structure"` - // The new http endpoint configuration + // The new HTTP endpoint configuration. HttpConfig *HttpDataSourceConfig `locationName:"httpConfig" type:"structure"` - // The new Lambda configuration. + // The new AWS Lambda configuration. LambdaConfig *LambdaDataSourceConfig `locationName:"lambdaConfig" type:"structure"` // The new name for the data source. @@ -5275,6 +6812,9 @@ type UpdateDataSourceInput struct { // Name is a required field Name *string `location:"uri" locationName:"name" type:"string" required:"true"` + // The new relational database configuration. + RelationalDatabaseConfig *RelationalDatabaseDataSourceConfig `locationName:"relationalDatabaseConfig" type:"structure"` + // The new service role ARN for the data source. ServiceRoleArn *string `locationName:"serviceRoleArn" type:"string"` @@ -5300,9 +6840,15 @@ func (s *UpdateDataSourceInput) Validate() error { if s.ApiId == nil { invalidParams.Add(request.NewErrParamRequired("ApiId")) } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } if s.Type == nil { invalidParams.Add(request.NewErrParamRequired("Type")) } @@ -5316,6 +6862,11 @@ func (s *UpdateDataSourceInput) Validate() error { invalidParams.AddNested("ElasticsearchConfig", err.(request.ErrInvalidParams)) } } + if s.HttpConfig != nil { + if err := s.HttpConfig.Validate(); err != nil { + invalidParams.AddNested("HttpConfig", err.(request.ErrInvalidParams)) + } + } if s.LambdaConfig != nil { if err := s.LambdaConfig.Validate(); err != nil { invalidParams.AddNested("LambdaConfig", err.(request.ErrInvalidParams)) @@ -5370,6 +6921,12 @@ func (s *UpdateDataSourceInput) SetName(v string) *UpdateDataSourceInput { return s } +// SetRelationalDatabaseConfig sets the RelationalDatabaseConfig field's value. +func (s *UpdateDataSourceInput) SetRelationalDatabaseConfig(v *RelationalDatabaseDataSourceConfig) *UpdateDataSourceInput { + s.RelationalDatabaseConfig = v + return s +} + // SetServiceRoleArn sets the ServiceRoleArn field's value. func (s *UpdateDataSourceInput) SetServiceRoleArn(v string) *UpdateDataSourceInput { s.ServiceRoleArn = &v @@ -5405,6 +6962,169 @@ func (s *UpdateDataSourceOutput) SetDataSource(v *DataSource) *UpdateDataSourceO return s } +type UpdateFunctionInput struct { + _ struct{} `type:"structure"` + + // The GraphQL API ID. + // + // ApiId is a required field + ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` + + // The FunctionDataSource name. + // + // DataSourceName is a required field + DataSourceName *string `locationName:"dataSourceName" type:"string" required:"true"` + + // The Function description. + Description *string `locationName:"description" type:"string"` + + // The function ID. + // + // FunctionId is a required field + FunctionId *string `location:"uri" locationName:"functionId" type:"string" required:"true"` + + // The version of the request mapping template. Currently the supported value + // is 2018-05-29. + // + // FunctionVersion is a required field + FunctionVersion *string `locationName:"functionVersion" type:"string" required:"true"` + + // The Function name. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // The Function request mapping template. Functions support only the 2018-05-29 + // version of the request mapping template. + // + // RequestMappingTemplate is a required field + RequestMappingTemplate *string `locationName:"requestMappingTemplate" min:"1" type:"string" required:"true"` + + // The Function request mapping template. + ResponseMappingTemplate *string `locationName:"responseMappingTemplate" min:"1" type:"string"` +} + +// String returns the string representation +func (s UpdateFunctionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFunctionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateFunctionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateFunctionInput"} + if s.ApiId == nil { + invalidParams.Add(request.NewErrParamRequired("ApiId")) + } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } + if s.DataSourceName == nil { + invalidParams.Add(request.NewErrParamRequired("DataSourceName")) + } + if s.FunctionId == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionId")) + } + if s.FunctionId != nil && len(*s.FunctionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FunctionId", 1)) + } + if s.FunctionVersion == nil { + invalidParams.Add(request.NewErrParamRequired("FunctionVersion")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.RequestMappingTemplate == nil { + invalidParams.Add(request.NewErrParamRequired("RequestMappingTemplate")) + } + if s.RequestMappingTemplate != nil && len(*s.RequestMappingTemplate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RequestMappingTemplate", 1)) + } + if s.ResponseMappingTemplate != nil && len(*s.ResponseMappingTemplate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResponseMappingTemplate", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApiId sets the ApiId field's value. +func (s *UpdateFunctionInput) SetApiId(v string) *UpdateFunctionInput { + s.ApiId = &v + return s +} + +// SetDataSourceName sets the DataSourceName field's value. +func (s *UpdateFunctionInput) SetDataSourceName(v string) *UpdateFunctionInput { + s.DataSourceName = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateFunctionInput) SetDescription(v string) *UpdateFunctionInput { + s.Description = &v + return s +} + +// SetFunctionId sets the FunctionId field's value. +func (s *UpdateFunctionInput) SetFunctionId(v string) *UpdateFunctionInput { + s.FunctionId = &v + return s +} + +// SetFunctionVersion sets the FunctionVersion field's value. +func (s *UpdateFunctionInput) SetFunctionVersion(v string) *UpdateFunctionInput { + s.FunctionVersion = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateFunctionInput) SetName(v string) *UpdateFunctionInput { + s.Name = &v + return s +} + +// SetRequestMappingTemplate sets the RequestMappingTemplate field's value. +func (s *UpdateFunctionInput) SetRequestMappingTemplate(v string) *UpdateFunctionInput { + s.RequestMappingTemplate = &v + return s +} + +// SetResponseMappingTemplate sets the ResponseMappingTemplate field's value. +func (s *UpdateFunctionInput) SetResponseMappingTemplate(v string) *UpdateFunctionInput { + s.ResponseMappingTemplate = &v + return s +} + +type UpdateFunctionOutput struct { + _ struct{} `type:"structure"` + + // The Function object. + FunctionConfiguration *FunctionConfiguration `locationName:"functionConfiguration" type:"structure"` +} + +// String returns the string representation +func (s UpdateFunctionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateFunctionOutput) GoString() string { + return s.String() +} + +// SetFunctionConfiguration sets the FunctionConfiguration field's value. +func (s *UpdateFunctionOutput) SetFunctionConfiguration(v *FunctionConfiguration) *UpdateFunctionOutput { + s.FunctionConfiguration = v + return s +} + type UpdateGraphqlApiInput struct { _ struct{} `type:"structure"` @@ -5416,7 +7136,7 @@ type UpdateGraphqlApiInput struct { // The new authentication type for the GraphqlApi object. AuthenticationType *string `locationName:"authenticationType" type:"string" enum:"AuthenticationType"` - // The Amazon CloudWatch logs configuration for the GraphqlApi object. + // The Amazon CloudWatch Logs configuration for the GraphqlApi object. LogConfig *LogConfig `locationName:"logConfig" type:"structure"` // The new name for the GraphqlApi object. @@ -5424,10 +7144,10 @@ type UpdateGraphqlApiInput struct { // Name is a required field Name *string `locationName:"name" type:"string" required:"true"` - // The Open Id Connect configuration configuration for the GraphqlApi object. + // The OpenID Connect configuration for the GraphqlApi object. OpenIDConnectConfig *OpenIDConnectConfig `locationName:"openIDConnectConfig" type:"structure"` - // The new Amazon Cognito User Pool configuration for the GraphqlApi object. + // The new Amazon Cognito user pool configuration for the GraphqlApi object. UserPoolConfig *UserPoolConfig `locationName:"userPoolConfig" type:"structure"` } @@ -5447,6 +7167,9 @@ func (s *UpdateGraphqlApiInput) Validate() error { if s.ApiId == nil { invalidParams.Add(request.NewErrParamRequired("ApiId")) } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } @@ -5540,15 +7263,27 @@ type UpdateResolverInput struct { ApiId *string `location:"uri" locationName:"apiId" type:"string" required:"true"` // The new data source name. - // - // DataSourceName is a required field - DataSourceName *string `locationName:"dataSourceName" type:"string" required:"true"` + DataSourceName *string `locationName:"dataSourceName" type:"string"` // The new field name. // // FieldName is a required field FieldName *string `location:"uri" locationName:"fieldName" type:"string" required:"true"` + // The resolver type. + // + // * UNIT: A UNIT resolver type. A UNIT resolver is the default resolver + // type. A UNIT resolver enables you to execute a GraphQL query against a + // single data source. + // + // * PIPELINE: A PIPELINE resolver type. A PIPELINE resolver enables you + // to execute a series of Function in a serial manner. You can use a pipeline + // resolver to execute a GraphQL query against multiple data sources. + Kind *string `locationName:"kind" type:"string" enum:"ResolverKind"` + + // The PipelineConfig. + PipelineConfig *PipelineConfig `locationName:"pipelineConfig" type:"structure"` + // The new request mapping template. // // RequestMappingTemplate is a required field @@ -5579,12 +7314,15 @@ func (s *UpdateResolverInput) Validate() error { if s.ApiId == nil { invalidParams.Add(request.NewErrParamRequired("ApiId")) } - if s.DataSourceName == nil { - invalidParams.Add(request.NewErrParamRequired("DataSourceName")) + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) } if s.FieldName == nil { invalidParams.Add(request.NewErrParamRequired("FieldName")) } + if s.FieldName != nil && len(*s.FieldName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FieldName", 1)) + } if s.RequestMappingTemplate == nil { invalidParams.Add(request.NewErrParamRequired("RequestMappingTemplate")) } @@ -5597,6 +7335,9 @@ func (s *UpdateResolverInput) Validate() error { if s.TypeName == nil { invalidParams.Add(request.NewErrParamRequired("TypeName")) } + if s.TypeName != nil && len(*s.TypeName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TypeName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -5622,6 +7363,18 @@ func (s *UpdateResolverInput) SetFieldName(v string) *UpdateResolverInput { return s } +// SetKind sets the Kind field's value. +func (s *UpdateResolverInput) SetKind(v string) *UpdateResolverInput { + s.Kind = &v + return s +} + +// SetPipelineConfig sets the PipelineConfig field's value. +func (s *UpdateResolverInput) SetPipelineConfig(v *PipelineConfig) *UpdateResolverInput { + s.PipelineConfig = v + return s +} + // SetRequestMappingTemplate sets the RequestMappingTemplate field's value. func (s *UpdateResolverInput) SetRequestMappingTemplate(v string) *UpdateResolverInput { s.RequestMappingTemplate = &v @@ -5701,12 +7454,18 @@ func (s *UpdateTypeInput) Validate() error { if s.ApiId == nil { invalidParams.Add(request.NewErrParamRequired("ApiId")) } + if s.ApiId != nil && len(*s.ApiId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApiId", 1)) + } if s.Format == nil { invalidParams.Add(request.NewErrParamRequired("Format")) } if s.TypeName == nil { invalidParams.Add(request.NewErrParamRequired("TypeName")) } + if s.TypeName != nil && len(*s.TypeName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TypeName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -5761,22 +7520,22 @@ func (s *UpdateTypeOutput) SetType(v *Type) *UpdateTypeOutput { return s } -// Describes an Amazon Cognito User Pool configuration. +// Describes an Amazon Cognito user pool configuration. type UserPoolConfig struct { _ struct{} `type:"structure"` - // A regular expression for validating the incoming Amazon Cognito User Pool + // A regular expression for validating the incoming Amazon Cognito user pool // app client ID. AppIdClientRegex *string `locationName:"appIdClientRegex" type:"string"` - // The AWS region in which the user pool was created. + // The AWS Region in which the user pool was created. // // AwsRegion is a required field AwsRegion *string `locationName:"awsRegion" type:"string" required:"true"` // The action that you want your GraphQL API to take when a request that uses - // Amazon Cognito User Pool authentication doesn't match the Amazon Cognito - // User Pool configuration. + // Amazon Cognito user pool authentication doesn't match the Amazon Cognito + // user pool configuration. // // DefaultAction is a required field DefaultAction *string `locationName:"defaultAction" type:"string" required:"true" enum:"DefaultAction"` @@ -5854,6 +7613,11 @@ const ( AuthenticationTypeOpenidConnect = "OPENID_CONNECT" ) +const ( + // AuthorizationTypeAwsIam is a AuthorizationType enum value + AuthorizationTypeAwsIam = "AWS_IAM" +) + const ( // DataSourceTypeAwsLambda is a DataSourceType enum value DataSourceTypeAwsLambda = "AWS_LAMBDA" @@ -5869,6 +7633,9 @@ const ( // DataSourceTypeHttp is a DataSourceType enum value DataSourceTypeHttp = "HTTP" + + // DataSourceTypeRelationalDatabase is a DataSourceType enum value + DataSourceTypeRelationalDatabase = "RELATIONAL_DATABASE" ) const ( @@ -5898,6 +7665,19 @@ const ( OutputTypeJson = "JSON" ) +const ( + // RelationalDatabaseSourceTypeRdsHttpEndpoint is a RelationalDatabaseSourceType enum value + RelationalDatabaseSourceTypeRdsHttpEndpoint = "RDS_HTTP_ENDPOINT" +) + +const ( + // ResolverKindUnit is a ResolverKind enum value + ResolverKindUnit = "UNIT" + + // ResolverKindPipeline is a ResolverKind enum value + ResolverKindPipeline = "PIPELINE" +) + const ( // SchemaStatusProcessing is a SchemaStatus enum value SchemaStatusProcessing = "PROCESSING" diff --git a/vendor/github.com/aws/aws-sdk-go/service/appsync/errors.go b/vendor/github.com/aws/aws-sdk-go/service/appsync/errors.go index 5c109eaba9..ac32f85d41 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/appsync/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/appsync/errors.go @@ -27,13 +27,13 @@ const ( // "BadRequestException". // // The request is not well formed. For example, a value is invalid or a required - // field is missing. Check the field values, and try again. + // field is missing. Check the field values, and then try again. ErrCodeBadRequestException = "BadRequestException" // ErrCodeConcurrentModificationException for service response error code // "ConcurrentModificationException". // - // Another modification is being made. That modification must complete before + // Another modification is in progress at this time and it must complete before // you can make your change. ErrCodeConcurrentModificationException = "ConcurrentModificationException" @@ -58,8 +58,8 @@ const ( // ErrCodeNotFoundException for service response error code // "NotFoundException". // - // The resource specified in the request was not found. Check the resource and - // try again. + // The resource specified in the request was not found. Check the resource, + // and then try again. ErrCodeNotFoundException = "NotFoundException" // ErrCodeUnauthorizedException for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/athena/api.go b/vendor/github.com/aws/aws-sdk-go/service/athena/api.go index d79704d293..77ba49c811 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/athena/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/athena/api.go @@ -8,6 +8,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) const opBatchGetNamedQuery = "BatchGetNamedQuery" @@ -15,7 +17,7 @@ const opBatchGetNamedQuery = "BatchGetNamedQuery" // BatchGetNamedQueryRequest generates a "aws/request.Request" representing the // client's request for the BatchGetNamedQuery operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -105,7 +107,7 @@ const opBatchGetQueryExecution = "BatchGetQueryExecution" // BatchGetQueryExecutionRequest generates a "aws/request.Request" representing the // client's request for the BatchGetQueryExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -193,7 +195,7 @@ const opCreateNamedQuery = "CreateNamedQuery" // CreateNamedQueryRequest generates a "aws/request.Request" representing the // client's request for the CreateNamedQuery operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -281,7 +283,7 @@ const opDeleteNamedQuery = "DeleteNamedQuery" // DeleteNamedQueryRequest generates a "aws/request.Request" representing the // client's request for the DeleteNamedQuery operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -315,6 +317,7 @@ func (c *Athena) DeleteNamedQueryRequest(input *DeleteNamedQueryInput) (req *req output = &DeleteNamedQueryOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -369,7 +372,7 @@ const opGetNamedQuery = "GetNamedQuery" // GetNamedQueryRequest generates a "aws/request.Request" representing the // client's request for the GetNamedQuery operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -453,7 +456,7 @@ const opGetQueryExecution = "GetQueryExecution" // GetQueryExecutionRequest generates a "aws/request.Request" representing the // client's request for the GetQueryExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -538,7 +541,7 @@ const opGetQueryResults = "GetQueryResults" // GetQueryResultsRequest generates a "aws/request.Request" representing the // client's request for the GetQueryResults operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -680,7 +683,7 @@ const opListNamedQueries = "ListNamedQueries" // ListNamedQueriesRequest generates a "aws/request.Request" representing the // client's request for the ListNamedQueries operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -824,7 +827,7 @@ const opListQueryExecutions = "ListQueryExecutions" // ListQueryExecutionsRequest generates a "aws/request.Request" representing the // client's request for the ListQueryExecutions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -968,7 +971,7 @@ const opStartQueryExecution = "StartQueryExecution" // StartQueryExecutionRequest generates a "aws/request.Request" representing the // client's request for the StartQueryExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1030,7 +1033,8 @@ func (c *Athena) StartQueryExecutionRequest(input *StartQueryExecutionInput) (re // a required parameter may be missing or out of range. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" -// Indicates that the request was throttled. +// Indicates that the request was throttled and includes the reason for throttling, +// for example, the limit of concurrent queries has been exceeded. // // See also, https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/StartQueryExecution func (c *Athena) StartQueryExecution(input *StartQueryExecutionInput) (*StartQueryExecutionOutput, error) { @@ -1059,7 +1063,7 @@ const opStopQueryExecution = "StopQueryExecution" // StopQueryExecutionRequest generates a "aws/request.Request" representing the // client's request for the StopQueryExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1093,6 +1097,7 @@ func (c *Athena) StopQueryExecutionRequest(input *StopQueryExecutionInput) (req output = &StopQueryExecutionOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1556,9 +1561,7 @@ type DeleteNamedQueryInput struct { _ struct{} `type:"structure"` // The unique ID of the query to delete. - // - // NamedQueryId is a required field - NamedQueryId *string `type:"string" required:"true" idempotencyToken:"true"` + NamedQueryId *string `type:"string" idempotencyToken:"true"` } // String returns the string representation @@ -1571,19 +1574,6 @@ func (s DeleteNamedQueryInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteNamedQueryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteNamedQueryInput"} - if s.NamedQueryId == nil { - invalidParams.Add(request.NewErrParamRequired("NamedQueryId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - // SetNamedQueryId sets the NamedQueryId field's value. func (s *DeleteNamedQueryInput) SetNamedQueryId(v string) *DeleteNamedQueryInput { s.NamedQueryId = &v @@ -1604,8 +1594,8 @@ func (s DeleteNamedQueryOutput) GoString() string { return s.String() } -// If query results are encrypted in Amazon S3, indicates the Amazon S3 encryption -// option used. +// If query results are encrypted in Amazon S3, indicates the encryption option +// used (for example, SSE-KMS or CSE-KMS) and key information. type EncryptionConfiguration struct { _ struct{} `type:"structure"` @@ -1842,6 +1832,9 @@ type GetQueryResultsOutput struct { // The results of the query execution. ResultSet *ResultSet `type:"structure"` + + // The number of rows inserted with a CREATE TABLE AS SELECT statement. + UpdateCount *int64 `type:"long"` } // String returns the string representation @@ -1866,6 +1859,12 @@ func (s *GetQueryResultsOutput) SetResultSet(v *ResultSet) *GetQueryResultsOutpu return s } +// SetUpdateCount sets the UpdateCount field's value. +func (s *GetQueryResultsOutput) SetUpdateCount(v int64) *GetQueryResultsOutput { + s.UpdateCount = &v + return s +} + type ListNamedQueriesInput struct { _ struct{} `type:"structure"` @@ -2080,8 +2079,14 @@ type QueryExecution struct { // option, if any, used for query results. ResultConfiguration *ResultConfiguration `type:"structure"` + // The type of query statement that was run. DDL indicates DDL query statements. + // DML indicates DML (Data Manipulation Language) query statements, such as + // CREATE TABLE AS SELECT. UTILITY indicates query statements other than DDL + // and DML, such as SHOW CREATE TABLE, or DESCRIBE
    . + StatementType *string `type:"string" enum:"StatementType"` + // The amount of data scanned during the query execution and the amount of time - // that it took to execute. + // that it took to execute, and the type of statement that was run. Statistics *QueryExecutionStatistics `type:"structure"` // The completion date, current state, submission time, and state change reason @@ -2123,6 +2128,12 @@ func (s *QueryExecution) SetResultConfiguration(v *ResultConfiguration) *QueryEx return s } +// SetStatementType sets the StatementType field's value. +func (s *QueryExecution) SetStatementType(v string) *QueryExecution { + s.StatementType = &v + return s +} + // SetStatistics sets the Statistics field's value. func (s *QueryExecution) SetStatistics(v *QueryExecutionStatistics) *QueryExecution { s.Statistics = v @@ -2173,7 +2184,7 @@ func (s *QueryExecutionContext) SetDatabase(v string) *QueryExecutionContext { } // The amount of data scanned during the query execution and the amount of time -// that it took to execute. +// that it took to execute, and the type of statement that was run. type QueryExecutionStatistics struct { _ struct{} `type:"structure"` @@ -2214,11 +2225,12 @@ type QueryExecutionStatus struct { // The date and time that the query completed. CompletionDateTime *time.Time `type:"timestamp"` - // The state of query execution. SUBMITTED indicates that the query is queued - // for execution. RUNNING indicates that the query is scanning data and returning - // results. SUCCEEDED indicates that the query completed without error. FAILED - // indicates that the query experienced an error and did not complete processing. - // CANCELLED indicates that user input interrupted query execution. + // The state of query execution. QUEUED state is listed but is not used by Athena + // and is reserved for future use. RUNNING indicates that the query has been + // submitted to the service, and Athena will execute the query as soon as resources + // are available. SUCCEEDED indicates that the query completed without error. + // FAILED indicates that the query experienced an error and did not complete + // processing.CANCELLED indicates that user input interrupted query execution. State *string `type:"string" enum:"QueryExecutionState"` // Further detail about the status of the query. @@ -2267,11 +2279,12 @@ func (s *QueryExecutionStatus) SetSubmissionDateTime(v time.Time) *QueryExecutio type ResultConfiguration struct { _ struct{} `type:"structure"` - // If query results are encrypted in S3, indicates the S3 encryption option - // used (for example, SSE-KMS or CSE-KMS and key information. + // If query results are encrypted in Amazon S3, indicates the encryption option + // used (for example, SSE-KMS or CSE-KMS) and key information. EncryptionConfiguration *EncryptionConfiguration `type:"structure"` - // The location in S3 where query results are stored. + // The location in Amazon S3 where your query results are stored, such as s3://path/to/query/bucket/. + // For more information, see Queries and Query Result Files. (http://docs.aws.amazon.com/athena/latest/ug/querying.html) // // OutputLocation is a required field OutputLocation *string `type:"string" required:"true"` @@ -2357,7 +2370,7 @@ func (s *ResultSet) SetRows(v []*Row) *ResultSet { type ResultSetMetadata struct { _ struct{} `type:"structure"` - // Information about the columns in a query execution result. + // Information about the columns returned in a query result metadata. ColumnInfo []*ColumnInfo `type:"list"` } @@ -2522,9 +2535,7 @@ type StopQueryExecutionInput struct { _ struct{} `type:"structure"` // The unique ID of the query execution to stop. - // - // QueryExecutionId is a required field - QueryExecutionId *string `type:"string" required:"true" idempotencyToken:"true"` + QueryExecutionId *string `type:"string" idempotencyToken:"true"` } // String returns the string representation @@ -2537,19 +2548,6 @@ func (s StopQueryExecutionInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *StopQueryExecutionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopQueryExecutionInput"} - if s.QueryExecutionId == nil { - invalidParams.Add(request.NewErrParamRequired("QueryExecutionId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - // SetQueryExecutionId sets the QueryExecutionId field's value. func (s *StopQueryExecutionInput) SetQueryExecutionId(v string) *StopQueryExecutionInput { s.QueryExecutionId = &v @@ -2696,6 +2694,19 @@ const ( QueryExecutionStateCancelled = "CANCELLED" ) +const ( + // StatementTypeDdl is a StatementType enum value + StatementTypeDdl = "DDL" + + // StatementTypeDml is a StatementType enum value + StatementTypeDml = "DML" + + // StatementTypeUtility is a StatementType enum value + StatementTypeUtility = "UTILITY" +) + +// The reason for the query throttling, for example, when it exceeds the concurrent +// query limit. const ( // ThrottleReasonConcurrentQueryLimitExceeded is a ThrottleReason enum value ThrottleReasonConcurrentQueryLimitExceeded = "CONCURRENT_QUERY_LIMIT_EXCEEDED" diff --git a/vendor/github.com/aws/aws-sdk-go/service/athena/doc.go b/vendor/github.com/aws/aws-sdk-go/service/athena/doc.go index 920fafc0c7..76b6b8989b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/athena/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/athena/doc.go @@ -12,8 +12,13 @@ // For more information, see What is Amazon Athena (http://docs.aws.amazon.com/athena/latest/ug/what-is.html) // in the Amazon Athena User Guide. // +// If you connect to Athena using the JDBC driver, use version 1.1.0 of the +// driver or later with the Amazon Athena API. Earlier version drivers do not +// support the API. For more information and to download the driver, see Accessing +// Amazon Athena with JDBC (https://docs.aws.amazon.com/athena/latest/ug/connect-with-jdbc.html). +// // For code samples using the AWS SDK for Java, see Examples and Code Samples -// (http://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon +// (https://docs.aws.amazon.com/athena/latest/ug/code-samples.html) in the Amazon // Athena User Guide. // // See https://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18 for more information on this service. diff --git a/vendor/github.com/aws/aws-sdk-go/service/athena/errors.go b/vendor/github.com/aws/aws-sdk-go/service/athena/errors.go index 4060e744e3..abfa4fac39 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/athena/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/athena/errors.go @@ -21,6 +21,7 @@ const ( // ErrCodeTooManyRequestsException for service response error code // "TooManyRequestsException". // - // Indicates that the request was throttled. + // Indicates that the request was throttled and includes the reason for throttling, + // for example, the limit of concurrent queries has been exceeded. ErrCodeTooManyRequestsException = "TooManyRequestsException" ) 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 b883a33189..2a822a5fb8 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 @@ -18,7 +18,7 @@ const opAttachInstances = "AttachInstances" // AttachInstancesRequest generates a "aws/request.Request" representing the // client's request for the AttachInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -52,8 +52,7 @@ func (c *AutoScaling) AttachInstancesRequest(input *AttachInstancesInput) (req * output = &AttachInstancesOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -117,7 +116,7 @@ const opAttachLoadBalancerTargetGroups = "AttachLoadBalancerTargetGroups" // AttachLoadBalancerTargetGroupsRequest generates a "aws/request.Request" representing the // client's request for the AttachLoadBalancerTargetGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -151,6 +150,7 @@ func (c *AutoScaling) AttachLoadBalancerTargetGroupsRequest(input *AttachLoadBal output = &AttachLoadBalancerTargetGroupsOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -207,7 +207,7 @@ const opAttachLoadBalancers = "AttachLoadBalancers" // AttachLoadBalancersRequest generates a "aws/request.Request" representing the // client's request for the AttachLoadBalancers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -241,6 +241,7 @@ func (c *AutoScaling) AttachLoadBalancersRequest(input *AttachLoadBalancersInput output = &AttachLoadBalancersOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -300,7 +301,7 @@ const opBatchDeleteScheduledAction = "BatchDeleteScheduledAction" // BatchDeleteScheduledActionRequest generates a "aws/request.Request" representing the // client's request for the BatchDeleteScheduledAction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -380,7 +381,7 @@ const opBatchPutScheduledUpdateGroupAction = "BatchPutScheduledUpdateGroupAction // BatchPutScheduledUpdateGroupActionRequest generates a "aws/request.Request" representing the // client's request for the BatchPutScheduledUpdateGroupAction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -420,8 +421,8 @@ 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. When updating a scheduled scaling action, if you leave a parameter -// unspecified, the corresponding value remains unchanged. +// group. If you leave a parameter unspecified when updating a scheduled scaling +// action, the corresponding value remains unchanged. // // 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 @@ -471,7 +472,7 @@ const opCompleteLifecycleAction = "CompleteLifecycleAction" // CompleteLifecycleActionRequest generates a "aws/request.Request" representing the // client's request for the CompleteLifecycleAction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -505,6 +506,7 @@ func (c *AutoScaling) CompleteLifecycleActionRequest(input *CompleteLifecycleAct output = &CompleteLifecycleActionOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -574,7 +576,7 @@ const opCreateAutoScalingGroup = "CreateAutoScalingGroup" // CreateAutoScalingGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateAutoScalingGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -608,8 +610,7 @@ func (c *AutoScaling) CreateAutoScalingGroupRequest(input *CreateAutoScalingGrou output = &CreateAutoScalingGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -676,7 +677,7 @@ const opCreateLaunchConfiguration = "CreateLaunchConfiguration" // CreateLaunchConfigurationRequest generates a "aws/request.Request" representing the // client's request for the CreateLaunchConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -710,8 +711,7 @@ func (c *AutoScaling) CreateLaunchConfigurationRequest(input *CreateLaunchConfig output = &CreateLaunchConfigurationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -775,7 +775,7 @@ const opCreateOrUpdateTags = "CreateOrUpdateTags" // CreateOrUpdateTagsRequest generates a "aws/request.Request" representing the // client's request for the CreateOrUpdateTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -809,8 +809,7 @@ func (c *AutoScaling) CreateOrUpdateTagsRequest(input *CreateOrUpdateTagsInput) output = &CreateOrUpdateTagsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -875,7 +874,7 @@ const opDeleteAutoScalingGroup = "DeleteAutoScalingGroup" // DeleteAutoScalingGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteAutoScalingGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -909,8 +908,7 @@ func (c *AutoScaling) DeleteAutoScalingGroupRequest(input *DeleteAutoScalingGrou output = &DeleteAutoScalingGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -926,8 +924,8 @@ func (c *AutoScaling) DeleteAutoScalingGroupRequest(input *DeleteAutoScalingGrou // // To remove instances from the Auto Scaling group before deleting it, call // DetachInstances with the list of instances and the option to decrement the -// desired capacity so that Amazon EC2 Auto Scaling does not launch replacement -// instances. +// desired capacity. This ensures that Amazon EC2 Auto Scaling does not launch +// replacement instances. // // To terminate all instances before deleting the Auto Scaling group, call UpdateAutoScalingGroup // and set the minimum size and desired capacity of the Auto Scaling group to @@ -979,7 +977,7 @@ const opDeleteLaunchConfiguration = "DeleteLaunchConfiguration" // DeleteLaunchConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteLaunchConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1013,8 +1011,7 @@ func (c *AutoScaling) DeleteLaunchConfigurationRequest(input *DeleteLaunchConfig output = &DeleteLaunchConfigurationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1068,7 +1065,7 @@ const opDeleteLifecycleHook = "DeleteLifecycleHook" // DeleteLifecycleHookRequest generates a "aws/request.Request" representing the // client's request for the DeleteLifecycleHook operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1102,6 +1099,7 @@ func (c *AutoScaling) DeleteLifecycleHookRequest(input *DeleteLifecycleHookInput output = &DeleteLifecycleHookOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1151,7 +1149,7 @@ const opDeleteNotificationConfiguration = "DeleteNotificationConfiguration" // DeleteNotificationConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteNotificationConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1185,8 +1183,7 @@ func (c *AutoScaling) DeleteNotificationConfigurationRequest(input *DeleteNotifi output = &DeleteNotificationConfigurationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1233,7 +1230,7 @@ const opDeletePolicy = "DeletePolicy" // DeletePolicyRequest generates a "aws/request.Request" representing the // client's request for the DeletePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1267,8 +1264,7 @@ func (c *AutoScaling) DeletePolicyRequest(input *DeletePolicyInput) (req *reques output = &DeletePolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1321,7 +1317,7 @@ const opDeleteScheduledAction = "DeleteScheduledAction" // DeleteScheduledActionRequest generates a "aws/request.Request" representing the // client's request for the DeleteScheduledAction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1355,8 +1351,7 @@ func (c *AutoScaling) DeleteScheduledActionRequest(input *DeleteScheduledActionI output = &DeleteScheduledActionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1403,7 +1398,7 @@ const opDeleteTags = "DeleteTags" // DeleteTagsRequest generates a "aws/request.Request" representing the // client's request for the DeleteTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1437,8 +1432,7 @@ func (c *AutoScaling) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Re output = &DeleteTagsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1488,7 +1482,7 @@ const opDescribeAccountLimits = "DescribeAccountLimits" // DescribeAccountLimitsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAccountLimits operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1572,7 +1566,7 @@ const opDescribeAdjustmentTypes = "DescribeAdjustmentTypes" // DescribeAdjustmentTypesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAdjustmentTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1652,7 +1646,7 @@ const opDescribeAutoScalingGroups = "DescribeAutoScalingGroups" // DescribeAutoScalingGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAutoScalingGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1791,7 +1785,7 @@ const opDescribeAutoScalingInstances = "DescribeAutoScalingInstances" // DescribeAutoScalingInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAutoScalingInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1930,7 +1924,7 @@ const opDescribeAutoScalingNotificationTypes = "DescribeAutoScalingNotificationT // DescribeAutoScalingNotificationTypesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAutoScalingNotificationTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2010,7 +2004,7 @@ const opDescribeLaunchConfigurations = "DescribeLaunchConfigurations" // DescribeLaunchConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeLaunchConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2149,7 +2143,7 @@ const opDescribeLifecycleHookTypes = "DescribeLifecycleHookTypes" // DescribeLifecycleHookTypesRequest generates a "aws/request.Request" representing the // client's request for the DescribeLifecycleHookTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2235,7 +2229,7 @@ const opDescribeLifecycleHooks = "DescribeLifecycleHooks" // DescribeLifecycleHooksRequest generates a "aws/request.Request" representing the // client's request for the DescribeLifecycleHooks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2315,7 +2309,7 @@ const opDescribeLoadBalancerTargetGroups = "DescribeLoadBalancerTargetGroups" // DescribeLoadBalancerTargetGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoadBalancerTargetGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2395,7 +2389,7 @@ const opDescribeLoadBalancers = "DescribeLoadBalancers" // DescribeLoadBalancersRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoadBalancers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2436,8 +2430,8 @@ func (c *AutoScaling) DescribeLoadBalancersRequest(input *DescribeLoadBalancersI // // Describes the load balancers for the specified Auto Scaling group. // -// Note that this operation describes only Classic Load Balancers. If you have -// Application Load Balancers, use DescribeLoadBalancerTargetGroups instead. +// This operation describes only Classic Load Balancers. If you have Application +// Load Balancers, use DescribeLoadBalancerTargetGroups instead. // // 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 @@ -2478,7 +2472,7 @@ const opDescribeMetricCollectionTypes = "DescribeMetricCollectionTypes" // DescribeMetricCollectionTypesRequest generates a "aws/request.Request" representing the // client's request for the DescribeMetricCollectionTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2519,8 +2513,8 @@ func (c *AutoScaling) DescribeMetricCollectionTypesRequest(input *DescribeMetric // // Describes the available CloudWatch metrics for Amazon EC2 Auto Scaling. // -// Note that the GroupStandbyInstances metric is not returned by default. You -// must explicitly request this metric when calling EnableMetricsCollection. +// The GroupStandbyInstances metric is not returned by default. You must explicitly +// request this metric when calling EnableMetricsCollection. // // 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 @@ -2561,7 +2555,7 @@ const opDescribeNotificationConfigurations = "DescribeNotificationConfigurations // DescribeNotificationConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeNotificationConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2701,7 +2695,7 @@ const opDescribePolicies = "DescribePolicies" // DescribePoliciesRequest generates a "aws/request.Request" representing the // client's request for the DescribePolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2843,7 +2837,7 @@ const opDescribeScalingActivities = "DescribeScalingActivities" // DescribeScalingActivitiesRequest generates a "aws/request.Request" representing the // client's request for the DescribeScalingActivities operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2982,7 +2976,7 @@ const opDescribeScalingProcessTypes = "DescribeScalingProcessTypes" // DescribeScalingProcessTypesRequest generates a "aws/request.Request" representing the // client's request for the DescribeScalingProcessTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3062,7 +3056,7 @@ const opDescribeScheduledActions = "DescribeScheduledActions" // DescribeScheduledActionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeScheduledActions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3202,7 +3196,7 @@ const opDescribeTags = "DescribeTags" // DescribeTagsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3350,7 +3344,7 @@ const opDescribeTerminationPolicyTypes = "DescribeTerminationPolicyTypes" // DescribeTerminationPolicyTypesRequest generates a "aws/request.Request" representing the // client's request for the DescribeTerminationPolicyTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3391,6 +3385,10 @@ func (c *AutoScaling) DescribeTerminationPolicyTypesRequest(input *DescribeTermi // // Describes the termination policies supported by Amazon EC2 Auto Scaling. // +// For more information, see Controlling Which Auto Scaling Instances Terminate +// During Scale In (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.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. @@ -3430,7 +3428,7 @@ const opDetachInstances = "DetachInstances" // DetachInstancesRequest generates a "aws/request.Request" representing the // client's request for the DetachInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3525,7 +3523,7 @@ const opDetachLoadBalancerTargetGroups = "DetachLoadBalancerTargetGroups" // DetachLoadBalancerTargetGroupsRequest generates a "aws/request.Request" representing the // client's request for the DetachLoadBalancerTargetGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3559,6 +3557,7 @@ func (c *AutoScaling) DetachLoadBalancerTargetGroupsRequest(input *DetachLoadBal output = &DetachLoadBalancerTargetGroupsOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3605,7 +3604,7 @@ const opDetachLoadBalancers = "DetachLoadBalancers" // DetachLoadBalancersRequest generates a "aws/request.Request" representing the // client's request for the DetachLoadBalancers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3639,6 +3638,7 @@ func (c *AutoScaling) DetachLoadBalancersRequest(input *DetachLoadBalancersInput output = &DetachLoadBalancersOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3647,13 +3647,13 @@ func (c *AutoScaling) DetachLoadBalancersRequest(input *DetachLoadBalancersInput // Detaches one or more Classic Load Balancers from the specified Auto Scaling // group. // -// Note that this operation detaches only Classic Load Balancers. If you have -// Application Load Balancers, use DetachLoadBalancerTargetGroups instead. +// This operation detaches only Classic Load Balancers. If you have Application +// Load Balancers, use DetachLoadBalancerTargetGroups instead. // // When you detach a load balancer, it enters the Removing state while deregistering // the instances in the group. When all instances are deregistered, then you -// can no longer describe the load balancer using DescribeLoadBalancers. Note -// that the instances remain running. +// can no longer describe the load balancer using DescribeLoadBalancers. The +// instances remain running. // // 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 @@ -3694,7 +3694,7 @@ const opDisableMetricsCollection = "DisableMetricsCollection" // DisableMetricsCollectionRequest generates a "aws/request.Request" representing the // client's request for the DisableMetricsCollection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3728,8 +3728,7 @@ func (c *AutoScaling) DisableMetricsCollectionRequest(input *DisableMetricsColle output = &DisableMetricsCollectionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3776,7 +3775,7 @@ const opEnableMetricsCollection = "EnableMetricsCollection" // EnableMetricsCollectionRequest generates a "aws/request.Request" representing the // client's request for the EnableMetricsCollection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3810,8 +3809,7 @@ func (c *AutoScaling) EnableMetricsCollectionRequest(input *EnableMetricsCollect output = &EnableMetricsCollectionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3860,7 +3858,7 @@ const opEnterStandby = "EnterStandby" // EnterStandbyRequest generates a "aws/request.Request" representing the // client's request for the EnterStandby operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3944,7 +3942,7 @@ const opExecutePolicy = "ExecutePolicy" // ExecutePolicyRequest generates a "aws/request.Request" representing the // client's request for the ExecutePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3978,8 +3976,7 @@ func (c *AutoScaling) ExecutePolicyRequest(input *ExecutePolicyInput) (req *requ output = &ExecutePolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4030,7 +4027,7 @@ const opExitStandby = "ExitStandby" // ExitStandbyRequest generates a "aws/request.Request" representing the // client's request for the ExitStandby operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4114,7 +4111,7 @@ const opPutLifecycleHook = "PutLifecycleHook" // PutLifecycleHookRequest generates a "aws/request.Request" representing the // client's request for the PutLifecycleHook operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4148,16 +4145,17 @@ func (c *AutoScaling) PutLifecycleHookRequest(input *PutLifecycleHookInput) (req output = &PutLifecycleHookOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // PutLifecycleHook API operation for Auto Scaling. // -// Creates or updates a lifecycle hook for the specified Auto Scaling Group. +// Creates or updates a lifecycle hook for the specified Auto Scaling group. // -// A lifecycle hook tells Amazon EC2 Auto Scaling that you want to perform an -// action on an instance that is not actively in service; for example, either -// when the instance launches or before the instance terminates. +// A lifecycle hook tells Amazon EC2 Auto Scaling to perform an action on an +// instance that is not actively in service; for example, either when the instance +// launches or before the instance terminates. // // This step is a part of the procedure for adding a lifecycle hook to an Auto // Scaling group: @@ -4230,7 +4228,7 @@ const opPutNotificationConfiguration = "PutNotificationConfiguration" // PutNotificationConfigurationRequest generates a "aws/request.Request" representing the // client's request for the PutNotificationConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4264,8 +4262,7 @@ func (c *AutoScaling) PutNotificationConfigurationRequest(input *PutNotification output = &PutNotificationConfigurationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4277,7 +4274,7 @@ func (c *AutoScaling) PutNotificationConfigurationRequest(input *PutNotification // // This configuration overwrites any existing configuration. // -// For more information see Getting SNS Notifications When Your Auto Scaling +// For more information, see Getting SNS Notifications When Your Auto Scaling // Group Scales (http://docs.aws.amazon.com/autoscaling/ec2/userguide/ASGettingNotifications.html) // in the Auto Scaling User Guide. // @@ -4328,7 +4325,7 @@ const opPutScalingPolicy = "PutScalingPolicy" // PutScalingPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutScalingPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4368,9 +4365,9 @@ func (c *AutoScaling) PutScalingPolicyRequest(input *PutScalingPolicyInput) (req // PutScalingPolicy API operation for Auto Scaling. // // Creates or updates a policy for an Auto Scaling group. To update an existing -// policy, use the existing policy name and set the parameters you want to change. -// Any existing parameter not changed in an update to an existing policy is -// not changed in this update request. +// policy, use the existing policy name and set the parameters to change. Any +// existing parameter not changed in an update to an existing policy is not +// changed in this update request. // // If you exceed your maximum limit of step adjustments, which by default is // 20 per region, the call fails. For information about updating this limit, @@ -4424,7 +4421,7 @@ const opPutScheduledUpdateGroupAction = "PutScheduledUpdateGroupAction" // PutScheduledUpdateGroupActionRequest generates a "aws/request.Request" representing the // client's request for the PutScheduledUpdateGroupAction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4458,15 +4455,14 @@ func (c *AutoScaling) PutScheduledUpdateGroupActionRequest(input *PutScheduledUp output = &PutScheduledUpdateGroupActionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // PutScheduledUpdateGroupAction API operation for Auto Scaling. // // Creates or updates a scheduled scaling action for an Auto Scaling group. -// When updating a scheduled scaling action, if you leave a parameter unspecified, +// If you leave a parameter unspecified when updating a scheduled scaling action, // the corresponding value remains unchanged. // // For more information, see Scheduled Scaling (http://docs.aws.amazon.com/autoscaling/ec2/userguide/schedule_time.html) @@ -4520,7 +4516,7 @@ 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 -// successfuly. +// 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. @@ -4554,6 +4550,7 @@ func (c *AutoScaling) RecordLifecycleActionHeartbeatRequest(input *RecordLifecyc output = &RecordLifecycleActionHeartbeatOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4624,7 +4621,7 @@ const opResumeProcesses = "ResumeProcesses" // ResumeProcessesRequest generates a "aws/request.Request" representing the // client's request for the ResumeProcesses operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4658,8 +4655,7 @@ func (c *AutoScaling) ResumeProcessesRequest(input *ScalingProcessQuery) (req *r output = &ResumeProcessesOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4713,7 +4709,7 @@ const opSetDesiredCapacity = "SetDesiredCapacity" // SetDesiredCapacityRequest generates a "aws/request.Request" representing the // client's request for the SetDesiredCapacity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4747,8 +4743,7 @@ func (c *AutoScaling) SetDesiredCapacityRequest(input *SetDesiredCapacityInput) output = &SetDesiredCapacityOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4803,7 +4798,7 @@ const opSetInstanceHealth = "SetInstanceHealth" // SetInstanceHealthRequest generates a "aws/request.Request" representing the // client's request for the SetInstanceHealth operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4837,8 +4832,7 @@ func (c *AutoScaling) SetInstanceHealthRequest(input *SetInstanceHealthInput) (r output = &SetInstanceHealthOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4888,7 +4882,7 @@ const opSetInstanceProtection = "SetInstanceProtection" // SetInstanceProtectionRequest generates a "aws/request.Request" representing the // client's request for the SetInstanceProtection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4922,6 +4916,7 @@ func (c *AutoScaling) SetInstanceProtectionRequest(input *SetInstanceProtectionI output = &SetInstanceProtectionOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4976,7 +4971,7 @@ const opSuspendProcesses = "SuspendProcesses" // SuspendProcessesRequest generates a "aws/request.Request" representing the // client's request for the SuspendProcesses operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5010,8 +5005,7 @@ func (c *AutoScaling) SuspendProcessesRequest(input *ScalingProcessQuery) (req * output = &SuspendProcessesOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5020,8 +5014,8 @@ func (c *AutoScaling) SuspendProcessesRequest(input *ScalingProcessQuery) (req * // Suspends the specified automatic scaling processes, or all processes, for // the specified Auto Scaling group. // -// Note that if you suspend either the Launch or Terminate process types, it -// can prevent other process types from functioning properly. +// If you suspend either the Launch or Terminate process types, it can prevent +// other process types from functioning properly. // // To resume processes that have been suspended, use ResumeProcesses. // @@ -5070,7 +5064,7 @@ const opTerminateInstanceInAutoScalingGroup = "TerminateInstanceInAutoScalingGro // TerminateInstanceInAutoScalingGroupRequest generates a "aws/request.Request" representing the // client's request for the TerminateInstanceInAutoScalingGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5158,7 +5152,7 @@ const opUpdateAutoScalingGroup = "UpdateAutoScalingGroup" // UpdateAutoScalingGroupRequest generates a "aws/request.Request" representing the // client's request for the UpdateAutoScalingGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5192,8 +5186,7 @@ func (c *AutoScaling) UpdateAutoScalingGroupRequest(input *UpdateAutoScalingGrou output = &UpdateAutoScalingGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5206,7 +5199,7 @@ func (c *AutoScaling) UpdateAutoScalingGroupRequest(input *UpdateAutoScalingGrou // // To update an Auto Scaling group with a launch configuration with InstanceMonitoring // set to false, you must first disable the collection of group metrics. Otherwise, -// you will get an error. If you have previously enabled the collection of group +// you get an error. If you have previously enabled the collection of group // metrics, you can disable it using DisableMetricsCollection. // // Note the following: @@ -5383,7 +5376,7 @@ func (s *Activity) SetStatusMessage(v string) *Activity { // Describes a policy adjustment type. // -// For more information, see Dynamic Scaling (http://docs.aws.amazon.com/autoscaling/ec2/DeveloperGuide/as-scale-based-on-demand.html) +// For more information, see Dynamic Scaling (http://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scale-based-on-demand.html) // in the Amazon EC2 Auto Scaling User Guide. type AdjustmentType struct { _ struct{} `type:"structure"` @@ -5829,8 +5822,8 @@ type BlockDeviceMapping struct { // Suppresses a device mapping. // // If this parameter is true for the root device, the instance might fail the - // EC2 health check. Amazon EC2 Auto Scaling launches a replacement instance - // if the instance fails the health check. + // EC2 health check. In that case, Amazon EC2 Auto Scaling launches a replacement + // instance. NoDevice *bool `type:"boolean"` // The name of the virtual device (for example, ephemeral0). @@ -6053,25 +6046,25 @@ type CreateAutoScalingGroupInput struct { HealthCheckType *string `min:"1" type:"string"` // The ID of the instance used to create a launch configuration for the group. - // You must specify one of the following: an EC2 instance, a launch configuration, - // or a launch template. + // This parameter, a launch configuration, a launch template, or a mixed instances + // policy must be specified. // // When you specify an ID of an instance, Amazon EC2 Auto Scaling creates a // new launch configuration and associates it with the group. This launch configuration - // derives its attributes from the specified instance, with the exception of - // the block device mapping. + // derives its attributes from the specified instance, except for the block + // device mapping. // // For more information, see Create an Auto Scaling Group Using an EC2 Instance // (http://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg-from-instance.html) // in the Amazon EC2 Auto Scaling User Guide. InstanceId *string `min:"1" type:"string"` - // The name of the launch configuration. You must specify one of the following: - // a launch configuration, a launch template, or an EC2 instance. + // The name of the launch configuration. This parameter, a launch template, + // a mixed instances policy, or an EC2 instance must be specified. LaunchConfigurationName *string `min:"1" type:"string"` - // The launch template to use to launch instances. You must specify one of the - // following: a launch template, a launch configuration, or an EC2 instance. + // The launch template to use to launch instances. This parameter, a launch + // configuration, a mixed instances policy, or an EC2 instance must be specified. LaunchTemplate *LaunchTemplateSpecification `type:"structure"` // One or more lifecycle hooks. @@ -6095,12 +6088,16 @@ type CreateAutoScalingGroupInput struct { // MinSize is a required field MinSize *int64 `type:"integer" required:"true"` + // The mixed instances policy to use to launch instances. This parameter, a + // launch template, a launch configuration, or an EC2 instance must be specified. + MixedInstancesPolicy *MixedInstancesPolicy `type:"structure"` + // Indicates whether newly launched instances are protected from termination // by Auto Scaling when scaling in. NewInstancesProtectedFromScaleIn *bool `type:"boolean"` - // The name of the placement group into which you'll launch your instances, - // if any. For more information, see Placement Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) + // The name of the placement group into which to launch your instances, if any. + // For more information, see Placement Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) // in the Amazon Elastic Compute Cloud User Guide. PlacementGroup *string `min:"1" type:"string"` @@ -6199,6 +6196,11 @@ func (s *CreateAutoScalingGroupInput) Validate() error { } } } + if s.MixedInstancesPolicy != nil { + if err := s.MixedInstancesPolicy.Validate(); err != nil { + invalidParams.AddNested("MixedInstancesPolicy", err.(request.ErrInvalidParams)) + } + } if s.Tags != nil { for i, v := range s.Tags { if v == nil { @@ -6294,6 +6296,12 @@ func (s *CreateAutoScalingGroupInput) SetMinSize(v int64) *CreateAutoScalingGrou return s } +// SetMixedInstancesPolicy sets the MixedInstancesPolicy field's value. +func (s *CreateAutoScalingGroupInput) SetMixedInstancesPolicy(v *MixedInstancesPolicy) *CreateAutoScalingGroupInput { + s.MixedInstancesPolicy = v + return s +} + // SetNewInstancesProtectedFromScaleIn sets the NewInstancesProtectedFromScaleIn field's value. func (s *CreateAutoScalingGroupInput) SetNewInstancesProtectedFromScaleIn(v bool) *CreateAutoScalingGroupInput { s.NewInstancesProtectedFromScaleIn = &v @@ -6395,11 +6403,11 @@ type CreateLaunchConfigurationInput struct { // The name or the Amazon Resource Name (ARN) of the instance profile associated // with the IAM role for the instance. // - // EC2 instances launched with an IAM role will automatically have AWS security - // credentials available. You can use IAM roles with Amazon EC2 Auto Scaling - // to automatically enable applications running on your EC2 instances to securely - // access other AWS resources. For more information, see Launch Auto Scaling - // Instances with an IAM Role (http://docs.aws.amazon.com/autoscaling/ec2/userguide/us-iam-role.html) + // EC2 instances launched with an IAM role automatically have AWS security credentials + // available. You can use IAM roles with Amazon EC2 Auto Scaling to automatically + // enable applications running on your EC2 instances to securely access other + // AWS resources. For more information, see Launch Auto Scaling Instances with + // an IAM Role (http://docs.aws.amazon.com/autoscaling/ec2/userguide/us-iam-role.html) // in the Amazon EC2 Auto Scaling User Guide. IamInstanceProfile *string `min:"1" type:"string"` @@ -6412,8 +6420,8 @@ type CreateLaunchConfigurationInput struct { ImageId *string `min:"1" type:"string"` // The ID of the instance to use to create the launch configuration. The new - // launch configuration derives attributes from the instance, with the exception - // of the block device mapping. + // launch configuration derives attributes from the instance, except for the + // block device mapping. // // If you do not specify InstanceId, you must specify both ImageId and InstanceType. // @@ -6455,9 +6463,9 @@ type CreateLaunchConfigurationInput struct { // The tenancy of the instance. An instance with a tenancy of dedicated runs // on single-tenant hardware and can only be launched into a VPC. // - // You must set the value of this parameter to dedicated if want to launch Dedicated - // Instances into a shared tenancy VPC (VPC with instance placement tenancy - // attribute set to default). + // To launch Dedicated Instances into a shared tenancy VPC (a VPC with the instance + // placement tenancy attribute set to default), you must set the value of this + // parameter to dedicated. // // If you specify this parameter, be sure to specify at least one subnet when // you create your group. @@ -6474,8 +6482,8 @@ type CreateLaunchConfigurationInput struct { // One or more security groups with which to associate the instances. // // If your instances are launched in EC2-Classic, you can either specify security - // group names or the security group IDs. For more information about security - // groups for EC2-Classic, see Amazon EC2 Security Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html) + // group names or the security group IDs. For more information, see Amazon EC2 + // Security Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html) // in the Amazon Elastic Compute Cloud User Guide. // // If your instances are launched into a VPC, specify security group IDs. For @@ -6849,7 +6857,7 @@ type DeleteAutoScalingGroupInput struct { // AutoScalingGroupName is a required field AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - // Specifies that the group will be deleted along with all instances associated + // 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. ForceDelete *bool `type:"boolean"` @@ -7043,7 +7051,7 @@ type DeleteNotificationConfigurationInput struct { AutoScalingGroupName *string `min:"1" type:"string" required:"true"` // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service - // (SNS) topic. + // (Amazon SNS) topic. // // TopicARN is a required field TopicARN *string `min:"1" type:"string" required:"true"` @@ -8122,7 +8130,7 @@ type DescribePoliciesInput struct { NextToken *string `type:"string"` // The names of one or more policies. If you omit this parameter, all policies - // are described. If an group name is provided, the results are limited to that + // 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. PolicyNames []*string `type:"list"` @@ -8482,7 +8490,8 @@ func (s *DescribeScheduledActionsOutput) SetScheduledUpdateGroupActions(v []*Sch type DescribeTagsInput struct { _ struct{} `type:"structure"` - // A filter used to scope the tags to return. + // One or more filters to scope the tags to return. The maximum number of filters + // per filter type (for example, auto-scaling-group) is 1000. Filters []*Filter `type:"list"` // The maximum number of items to return with this call. The default value is @@ -8572,9 +8581,11 @@ func (s DescribeTerminationPolicyTypesInput) GoString() string { type DescribeTerminationPolicyTypesOutput struct { _ struct{} `type:"structure"` - // The termination policies supported by Amazon EC2 Auto Scaling (OldestInstance, - // OldestLaunchConfiguration, NewestInstance, ClosestToNextInstanceHour, and - // Default). + // The termination policies supported by Amazon EC2 Auto Scaling: OldestInstance, + // OldestLaunchConfiguration, NewestInstance, ClosestToNextInstanceHour, Default, + // OldestLaunchTemplate, and AllocationStrategy. Currently, the OldestLaunchTemplate + // and AllocationStrategy policies are only supported for Auto Scaling groups + // with MixedInstancesPolicy. TerminationPolicyTypes []*string `type:"list"` } @@ -9578,12 +9589,15 @@ type Group struct { // MinSize is a required field MinSize *int64 `type:"integer" required:"true"` + // The mixed instances policy for the group. + MixedInstancesPolicy *MixedInstancesPolicy `type:"structure"` + // Indicates whether newly launched instances are protected from termination // by Auto Scaling when scaling in. NewInstancesProtectedFromScaleIn *bool `type:"boolean"` - // The name of the placement group into which you'll launch your instances, - // if any. For more information, see Placement Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) + // The name of the placement group into which to launch your instances, if any. + // For more information, see Placement Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) // in the Amazon Elastic Compute Cloud User Guide. PlacementGroup *string `min:"1" type:"string"` @@ -9713,6 +9727,12 @@ func (s *Group) SetMinSize(v int64) *Group { return s } +// SetMixedInstancesPolicy sets the MixedInstancesPolicy field's value. +func (s *Group) SetMixedInstancesPolicy(v *MixedInstancesPolicy) *Group { + s.MixedInstancesPolicy = v + return s +} + // SetNewInstancesProtectedFromScaleIn sets the NewInstancesProtectedFromScaleIn field's value. func (s *Group) SetNewInstancesProtectedFromScaleIn(v bool) *Group { s.NewInstancesProtectedFromScaleIn = &v @@ -9778,8 +9798,8 @@ type Instance struct { // The last reported health status of the instance. "Healthy" means that the // instance is healthy and should remain in service. "Unhealthy" means that - // the instance is unhealthy and Amazon EC2 Auto Scaling should terminate and - // replace it. + // the instance is unhealthy and that Amazon EC2 Auto Scaling should terminate + // and replace it. // // HealthStatus is a required field HealthStatus *string `min:"1" type:"string" required:"true"` @@ -9795,8 +9815,8 @@ type Instance struct { // The launch template for the instance. LaunchTemplate *LaunchTemplateSpecification `type:"structure"` - // A description of the current lifecycle state. Note that the Quarantined state - // is not used. + // A description of the current lifecycle state. The Quarantined state is not + // used. // // LifecycleState is a required field LifecycleState *string `type:"string" required:"true" enum:"LifecycleState"` @@ -9990,6 +10010,121 @@ func (s *InstanceMonitoring) SetEnabled(v bool) *InstanceMonitoring { return s } +// Describes an instances distribution for an Auto Scaling group with 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. +type InstancesDistribution struct { + _ struct{} `type:"structure"` + + // 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 array of LaunchTemplate + // 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 + // by On-Demand Instances. This base portion is provisioned first as your group + // scales. + // + // The default value is 0. If you leave this parameter set to 0, On-Demand Instances + // are launched as a percentage of the Auto Scaling group's desired capacity, + // per the OnDemandPercentageAboveBaseCapacity setting. + OnDemandBaseCapacity *int64 `type:"integer"` + + // Controls the percentages of On-Demand Instances and Spot Instances for your + // additional capacity beyond OnDemandBaseCapacity. + // + // The range is 0–100. The default value is 100. If you leave this parameter + // set to 100, the percentages are 100% for On-Demand Instances and 0% for Spot + // Instances. + OnDemandPercentageAboveBaseCapacity *int64 `type:"integer"` + + // Indicates how to allocate Spot capacity across Spot pools. + // + // The only valid value is lowest-price, which is also the default value. The + // Auto Scaling group selects the cheapest Spot pools and evenly allocates your + // Spot capacity across the number of Spot pools that you specify. + SpotAllocationStrategy *string `type:"string"` + + // The number of Spot pools to use to allocate your Spot capacity. The Spot + // pools are determined from the different instance types in the Overrides array + // of LaunchTemplate. + // + // The range is 1–20 and the default is 2. + SpotInstancePools *int64 `type:"integer"` + + // The maximum price per unit hour that you are willing to pay for a Spot Instance. + // If you leave this value blank (which is the default), the maximum Spot price + // is set at the On-Demand price. + SpotMaxPrice *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s InstancesDistribution) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstancesDistribution) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InstancesDistribution) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InstancesDistribution"} + if s.SpotMaxPrice != nil && len(*s.SpotMaxPrice) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SpotMaxPrice", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetOnDemandAllocationStrategy sets the OnDemandAllocationStrategy field's value. +func (s *InstancesDistribution) SetOnDemandAllocationStrategy(v string) *InstancesDistribution { + s.OnDemandAllocationStrategy = &v + return s +} + +// SetOnDemandBaseCapacity sets the OnDemandBaseCapacity field's value. +func (s *InstancesDistribution) SetOnDemandBaseCapacity(v int64) *InstancesDistribution { + s.OnDemandBaseCapacity = &v + return s +} + +// SetOnDemandPercentageAboveBaseCapacity sets the OnDemandPercentageAboveBaseCapacity field's value. +func (s *InstancesDistribution) SetOnDemandPercentageAboveBaseCapacity(v int64) *InstancesDistribution { + s.OnDemandPercentageAboveBaseCapacity = &v + return s +} + +// SetSpotAllocationStrategy sets the SpotAllocationStrategy field's value. +func (s *InstancesDistribution) SetSpotAllocationStrategy(v string) *InstancesDistribution { + s.SpotAllocationStrategy = &v + return s +} + +// SetSpotInstancePools sets the SpotInstancePools field's value. +func (s *InstancesDistribution) SetSpotInstancePools(v int64) *InstancesDistribution { + s.SpotInstancePools = &v + return s +} + +// SetSpotMaxPrice sets the SpotMaxPrice field's value. +func (s *InstancesDistribution) SetSpotMaxPrice(v string) *InstancesDistribution { + s.SpotMaxPrice = &v + return s +} + // Describes a launch configuration. type LaunchConfiguration struct { _ struct{} `type:"structure"` @@ -10194,7 +10329,119 @@ func (s *LaunchConfiguration) SetUserData(v string) *LaunchConfiguration { return s } -// Describes a launch template. +// Describes a launch template and overrides. +// +// The overrides are used to override the instance type specified by the launch +// template with multiple instance types that can be used to launch On-Demand +// Instances and Spot Instances. +type LaunchTemplate struct { + _ struct{} `type:"structure"` + + // The launch template to use. You must specify either the launch template ID + // or launch template name in the request. + LaunchTemplateSpecification *LaunchTemplateSpecification `type:"structure"` + + // Any parameters that you specify override the same parameters in the launch + // template. Currently, the only supported override is instance type. + // + // You must specify between 2 and 20 overrides. + Overrides []*LaunchTemplateOverrides `type:"list"` +} + +// String returns the string representation +func (s LaunchTemplate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LaunchTemplate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *LaunchTemplate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LaunchTemplate"} + if s.LaunchTemplateSpecification != nil { + if err := s.LaunchTemplateSpecification.Validate(); err != nil { + invalidParams.AddNested("LaunchTemplateSpecification", err.(request.ErrInvalidParams)) + } + } + if s.Overrides != nil { + for i, v := range s.Overrides { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Overrides", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLaunchTemplateSpecification sets the LaunchTemplateSpecification field's value. +func (s *LaunchTemplate) SetLaunchTemplateSpecification(v *LaunchTemplateSpecification) *LaunchTemplate { + s.LaunchTemplateSpecification = v + return s +} + +// SetOverrides sets the Overrides field's value. +func (s *LaunchTemplate) SetOverrides(v []*LaunchTemplateOverrides) *LaunchTemplate { + s.Overrides = v + return s +} + +// Describes an override for a launch template. +type LaunchTemplateOverrides struct { + _ struct{} `type:"structure"` + + // The instance type. + // + // For information about available instance types, see Available Instance Types + // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#AvailableInstanceTypes) + // in the Amazon Elastic Compute Cloud User Guide. + InstanceType *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s LaunchTemplateOverrides) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LaunchTemplateOverrides) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *LaunchTemplateOverrides) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LaunchTemplateOverrides"} + if s.InstanceType != nil && len(*s.InstanceType) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InstanceType", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInstanceType sets the InstanceType field's value. +func (s *LaunchTemplateOverrides) SetInstanceType(v string) *LaunchTemplateOverrides { + s.InstanceType = &v + return s +} + +// Describes a launch template and the launch template version. +// +// The launch template that is specified must be configured for use with an +// Auto Scaling group. For more information, see Creating a Launch Template +// for an Auto Scaling group (http://docs.aws.amazon.com/autoscaling/ec2/userguide/create-launch-template.html) +// in the Amazon EC2 Auto Scaling User Guide. type LaunchTemplateSpecification struct { _ struct{} `type:"structure"` @@ -10292,8 +10539,8 @@ type LifecycleHook struct { // The name of the lifecycle hook. LifecycleHookName *string `min:"1" type:"string"` - // The state of the EC2 instance to which you want to attach the lifecycle hook. - // The following are possible values: + // The state of the EC2 instance to which to attach the lifecycle hook. The + // following are possible values: // // * autoscaling:EC2_INSTANCE_LAUNCHING // @@ -10511,10 +10758,11 @@ func (s *LifecycleHookSpecification) SetRoleARN(v string) *LifecycleHookSpecific // // 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 ELB 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. +// 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"` @@ -10566,10 +10814,10 @@ func (s *LoadBalancerState) SetState(v string) *LoadBalancerState { // // 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 ELB 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. +// 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"` @@ -10734,6 +10982,73 @@ func (s *MetricGranularityType) SetGranularity(v string) *MetricGranularityType return s } +// Describes a mixed instances policy for an Auto Scaling group. With mixed +// instances, your Auto Scaling group can provision a combination of On-Demand +// Instances and Spot Instances across multiple instance types. For more information, +// see Using Multiple Instance Types and Purchase Options (http://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroup.html#asg-purchase-options) +// in the Amazon EC2 Auto Scaling User Guide. +// +// When you create your Auto Scaling group, you can specify a launch configuration +// or template as a parameter for the top-level object, or you can specify a +// mixed instances policy, but not both at the same time. +type MixedInstancesPolicy struct { + _ struct{} `type:"structure"` + + // The instances distribution to use. + // + // If you leave this parameter unspecified when creating the group, the default + // values are used. + InstancesDistribution *InstancesDistribution `type:"structure"` + + // The launch template and overrides. + // + // This parameter is required when creating an Auto Scaling group with a mixed + // instances policy, but is not required when updating the group. + LaunchTemplate *LaunchTemplate `type:"structure"` +} + +// String returns the string representation +func (s MixedInstancesPolicy) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MixedInstancesPolicy) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *MixedInstancesPolicy) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "MixedInstancesPolicy"} + if s.InstancesDistribution != nil { + if err := s.InstancesDistribution.Validate(); err != nil { + invalidParams.AddNested("InstancesDistribution", err.(request.ErrInvalidParams)) + } + } + if s.LaunchTemplate != nil { + if err := s.LaunchTemplate.Validate(); err != nil { + invalidParams.AddNested("LaunchTemplate", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInstancesDistribution sets the InstancesDistribution field's value. +func (s *MixedInstancesPolicy) SetInstancesDistribution(v *InstancesDistribution) *MixedInstancesPolicy { + s.InstancesDistribution = v + return s +} + +// SetLaunchTemplate sets the LaunchTemplate field's value. +func (s *MixedInstancesPolicy) SetLaunchTemplate(v *LaunchTemplate) *MixedInstancesPolicy { + s.LaunchTemplate = v + return s +} + // Describes a notification. type NotificationConfiguration struct { _ struct{} `type:"structure"` @@ -10755,7 +11070,7 @@ type NotificationConfiguration struct { NotificationType *string `min:"1" type:"string"` // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service - // (SNS) topic. + // (Amazon SNS) topic. TopicARN *string `min:"1" type:"string"` } @@ -10799,17 +11114,17 @@ type PredefinedMetricSpecification struct { // Identifies the resource associated with the metric type. The following predefined // metrics are available: // - // * ASGAverageCPUUtilization - average CPU utilization of the Auto Scaling - // group + // * ASGAverageCPUUtilization - Average CPU utilization of the Auto Scaling + // group. // - // * ASGAverageNetworkIn - average number of bytes received on all network - // interfaces by 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 + // * 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 + // * ALBRequestCountPerTarget - Number of requests completed per target in + // an Application Load Balancer target group. // // For predefined metric types ASGAverageCPUUtilization, ASGAverageNetworkIn, // and ASGAverageNetworkOut, the parameter must not be specified as the resource @@ -10947,17 +11262,17 @@ type PutLifecycleHookInput struct { // EC2 Auto Scaling sends a message to the notification target. NotificationMetadata *string `min:"1" type:"string"` - // The ARN of the notification target that Amazon EC2 Auto Scaling will use - // to notify you when an instance is in the transition state for the lifecycle - // hook. This target can be either an SQS queue or an SNS topic. If you specify - // an empty string, this overrides the current ARN. + // The ARN of the notification target that Amazon EC2 Auto Scaling uses to notify + // you when an instance is in the transition state for the lifecycle hook. This + // target can be either an SQS queue or an SNS topic. If you specify an empty + // string, this overrides the current ARN. // // This operation uses the JSON format when sending notifications to an Amazon - // SQS queue, and an email key/value pair format when sending notifications + // SQS queue, and an email key-value pair format when sending notifications // to an Amazon SNS topic. // // When you specify a notification target, Amazon EC2 Auto Scaling sends it - // a test message. Test messages contains the following additional key/value + // a test message. Test messages contain the following additional key-value // pair: "Event": "autoscaling:TEST_NOTIFICATION". NotificationTargetARN *string `type:"string"` @@ -11077,14 +11392,14 @@ type PutNotificationConfigurationInput struct { // AutoScalingGroupName is a required field AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - // The type of event that will cause the notification to be sent. For details + // The type of event that causes the notification to be sent. For more information // about notification types supported by Amazon EC2 Auto Scaling, see DescribeAutoScalingNotificationTypes. // // NotificationTypes is a required field NotificationTypes []*string `type:"list" required:"true"` // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service - // (SNS) topic. + // (Amazon SNS) topic. // // TopicARN is a required field TopicARN *string `min:"1" type:"string" required:"true"` @@ -11562,7 +11877,7 @@ type RecordLifecycleActionHeartbeatInput struct { // A token that uniquely identifies a specific lifecycle action associated with // an instance. Amazon EC2 Auto Scaling sends this token to the notification - // target you specified when you created the lifecycle hook. + // target that you specified when you created the lifecycle hook. LifecycleActionToken *string `min:"36" type:"string"` // The name of the lifecycle hook. @@ -11912,7 +12227,7 @@ type ScheduledUpdateGroupAction struct { // can be up to one month in the future. // // When StartTime and EndTime are specified with Recurrence, they form the boundaries - // of when the recurring action will start and stop. + // of when the recurring action starts and stops. StartTime *time.Time `type:"timestamp"` // This parameter is deprecated. @@ -12186,10 +12501,9 @@ func (s SetDesiredCapacityOutput) GoString() string { type SetInstanceHealthInput struct { _ struct{} `type:"structure"` - // The health status of the instance. Set to Healthy if you want the instance - // to remain in service. Set to Unhealthy if you want the instance to be out - // of service. Amazon EC2 Auto Scaling will terminate and replace the unhealthy - // instance. + // The health status of the instance. Set to Healthy to have the instance remain + // in service. Set to Unhealthy to have the instance be out of service. Amazon + // EC2 Auto Scaling terminates and replaces the unhealthy instance. // // HealthStatus is a required field HealthStatus *string `min:"1" type:"string" required:"true"` @@ -12200,12 +12514,11 @@ type SetInstanceHealthInput struct { InstanceId *string `min:"1" type:"string" required:"true"` // If the Auto Scaling group of the specified instance has a HealthCheckGracePeriod - // specified for the group, by default, this call will respect the grace period. - // Set this to False, if you do not want the call to respect the grace period - // associated with the group. + // specified for the group, by default, this call respects the grace period. + // Set this to False, to have the call not respect the grace period associated + // with the group. // - // For more information, see the description of the health check grace period - // for CreateAutoScalingGroup. + // For more information about the health check grace period, see CreateAutoScalingGroup. ShouldRespectGracePeriod *bool `type:"boolean"` } @@ -12364,23 +12677,23 @@ func (s SetInstanceProtectionOutput) GoString() string { // For the following examples, suppose that you have an alarm with a breach // threshold of 50: // -// * If you want the adjustment to be triggered when the metric is greater -// than or equal to 50 and less than 60, specify a lower bound of 0 and an -// upper bound of 10. +// * To trigger the adjustment when the metric is greater than or equal to +// 50 and less than 60, specify a lower bound of 0 and an upper bound of +// 10. // -// * If you want the adjustment to be triggered when the metric is greater -// than 40 and less than or equal to 50, specify a lower bound of -10 and -// an upper bound of 0. +// * To trigger the adjustment when the metric is greater than 40 and less +// than or equal to 50, specify a lower bound of -10 and an upper bound of +// 0. // // There are a few rules for the step adjustments for your step policy: // // * The ranges of your step adjustments can't overlap or have a gap. // -// * At most one step adjustment can have a null lower bound. If one step +// * At most, one step adjustment can have a null lower bound. If one step // adjustment has a negative lower bound, then there must be a step adjustment // with a null lower bound. // -// * At most one step adjustment can have a null upper bound. If one step +// * At most, one step adjustment can have a null upper bound. If one step // adjustment has a positive upper bound, then there must be a step adjustment // with a null upper bound. // @@ -12649,9 +12962,9 @@ type TargetTrackingConfiguration struct { // A customized metric. CustomizedMetricSpecification *CustomizedMetricSpecification `type:"structure"` - // Indicates whether scale in by the target tracking policy is disabled. If - // scale in is disabled, the target tracking policy won't remove instances from - // the Auto Scaling group. Otherwise, the target tracking policy can remove + // Indicates whether scaling in by the target tracking policy is disabled. If + // scaling in is disabled, the target tracking policy doesn't remove instances + // from the Auto Scaling group. Otherwise, the target tracking policy can remove // instances from the Auto Scaling group. The default is disabled. DisableScaleIn *bool `type:"boolean"` @@ -12835,12 +13148,13 @@ type UpdateAutoScalingGroupInput struct { // The service to use for the health checks. The valid values are EC2 and ELB. HealthCheckType *string `min:"1" type:"string"` - // The name of the launch configuration. If you specify a launch configuration, - // you can't specify a launch template. + // The name of the launch configuration. If you specify this parameter, you + // can't specify a launch template or a mixed instances policy. LaunchConfigurationName *string `min:"1" type:"string"` - // The launch template to use to specify the updates. If you specify a launch - // template, you can't specify a launch configuration. + // The launch template and version to use to specify the updates. If you specify + // this parameter, you can't specify a launch configuration or a mixed instances + // policy. LaunchTemplate *LaunchTemplateSpecification `type:"structure"` // The maximum size of the Auto Scaling group. @@ -12849,12 +13163,16 @@ type UpdateAutoScalingGroupInput struct { // The minimum size of the Auto Scaling group. MinSize *int64 `type:"integer"` + // The mixed instances policy to use to specify the updates. If you specify + // this parameter, you can't specify a launch configuration or a launch template. + MixedInstancesPolicy *MixedInstancesPolicy `type:"structure"` + // Indicates whether newly launched instances are protected from termination // by Auto Scaling when scaling in. NewInstancesProtectedFromScaleIn *bool `type:"boolean"` - // The name of the placement group into which you'll launch your instances, - // if any. For more information, see Placement Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) + // The name of the placement group into which to launch your instances, if any. + // For more information, see Placement Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) // in the Amazon Elastic Compute Cloud User Guide. PlacementGroup *string `min:"1" type:"string"` @@ -12924,6 +13242,11 @@ func (s *UpdateAutoScalingGroupInput) Validate() error { invalidParams.AddNested("LaunchTemplate", err.(request.ErrInvalidParams)) } } + if s.MixedInstancesPolicy != nil { + if err := s.MixedInstancesPolicy.Validate(); err != nil { + invalidParams.AddNested("MixedInstancesPolicy", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -12991,6 +13314,12 @@ func (s *UpdateAutoScalingGroupInput) SetMinSize(v int64) *UpdateAutoScalingGrou return s } +// SetMixedInstancesPolicy sets the MixedInstancesPolicy field's value. +func (s *UpdateAutoScalingGroupInput) SetMixedInstancesPolicy(v *MixedInstancesPolicy) *UpdateAutoScalingGroupInput { + s.MixedInstancesPolicy = v + return s +} + // SetNewInstancesProtectedFromScaleIn sets the NewInstancesProtectedFromScaleIn field's value. func (s *UpdateAutoScalingGroupInput) SetNewInstancesProtectedFromScaleIn(v bool) *UpdateAutoScalingGroupInput { s.NewInstancesProtectedFromScaleIn = &v 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 f431b8aa39..32d9594c7a 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,8 +5,10 @@ // // Amazon EC2 Auto Scaling is designed to automatically launch or terminate // EC2 instances based on user-defined policies, schedules, and health checks. -// Use this service in conjunction with the AWS Auto Scaling, Amazon CloudWatch, -// and Elastic Load Balancing services. +// Use this service with AWS Auto Scaling, Amazon CloudWatch, and Elastic Load +// Balancing. +// +// For more information, see the Amazon EC2 Auto Scaling User Guide (http://docs.aws.amazon.com/autoscaling/ec2/userguide/what-is-amazon-ec2-auto-scaling.html). // // 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/batch/api.go b/vendor/github.com/aws/aws-sdk-go/service/batch/api.go index 194cbe82e5..6a8daca4ae 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/batch/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/batch/api.go @@ -8,6 +8,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "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 opCancelJob = "CancelJob" @@ -15,7 +17,7 @@ const opCancelJob = "CancelJob" // CancelJobRequest generates a "aws/request.Request" representing the // client's request for the CancelJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -49,6 +51,7 @@ func (c *Batch) CancelJobRequest(input *CancelJobInput) (req *request.Request, o output = &CancelJobOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -103,7 +106,7 @@ const opCreateComputeEnvironment = "CreateComputeEnvironment" // CreateComputeEnvironmentRequest generates a "aws/request.Request" representing the // client's request for the CreateComputeEnvironment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -145,13 +148,16 @@ func (c *Batch) CreateComputeEnvironmentRequest(input *CreateComputeEnvironmentI // Creates an AWS Batch compute environment. You can create MANAGED or UNMANAGED // compute environments. // -// In a managed compute environment, AWS Batch manages the compute resources -// within the environment, based on the compute resources that you specify. -// Instances launched into a managed compute environment use a recent, approved -// version of the Amazon ECS-optimized AMI. You can choose to use Amazon EC2 -// On-Demand Instances in your managed compute environment, or you can use Amazon -// EC2 Spot Instances that only launch when the Spot bid price is below a specified -// percentage of the On-Demand price. +// In a managed compute environment, AWS Batch manages the capacity and instance +// types of the compute resources within the environment. This is based on the +// compute resource specification that you define or the launch template (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html) +// that you specify when you create the compute environment. You can choose +// to use Amazon EC2 On-Demand Instances or Spot Instances in your managed compute +// environment. You can optionally set a maximum price so that Spot Instances +// only launch when the Spot Instance price is below a specified percentage +// of the On-Demand price. +// +// Multi-node parallel jobs are not supported on Spot Instances. // // In an unmanaged compute environment, you can manage your own compute resources. // This provides more compute resource configuration options, such as using @@ -160,11 +166,26 @@ func (c *Batch) CreateComputeEnvironmentRequest(input *CreateComputeEnvironmentI // AMIs (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/container_instance_AMIs.html) // in the Amazon Elastic Container Service Developer Guide. After you have created // your unmanaged compute environment, you can use the DescribeComputeEnvironments -// operation to find the Amazon ECS cluster that is associated with it and then +// operation to find the Amazon ECS cluster that is associated with it. Then, // manually launch your container instances into that Amazon ECS cluster. For // more information, see Launching an Amazon ECS Container Instance (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_container_instance.html) // in the Amazon Elastic Container Service Developer Guide. // +// AWS Batch does not upgrade the AMIs in a compute environment after it is +// created (for example, when a newer version of the Amazon ECS-optimized AMI +// is available). You are responsible for the management of the guest operating +// system (including updates and security patches) and any additional application +// software or utilities that you install on the compute resources. To use a +// new AMI for your AWS Batch jobs: +// +// Create a new compute environment with the new AMI. +// +// Add the compute environment to an existing job queue. +// +// Remove the old compute environment from your job queue. +// +// Delete the old compute environment. +// // 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,7 +229,7 @@ const opCreateJobQueue = "CreateJobQueue" // CreateJobQueueRequest generates a "aws/request.Request" representing the // client's request for the CreateJobQueue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -300,7 +321,7 @@ const opDeleteComputeEnvironment = "DeleteComputeEnvironment" // DeleteComputeEnvironmentRequest generates a "aws/request.Request" representing the // client's request for the DeleteComputeEnvironment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -334,6 +355,7 @@ func (c *Batch) DeleteComputeEnvironmentRequest(input *DeleteComputeEnvironmentI output = &DeleteComputeEnvironmentOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -388,7 +410,7 @@ const opDeleteJobQueue = "DeleteJobQueue" // DeleteJobQueueRequest generates a "aws/request.Request" representing the // client's request for the DeleteJobQueue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -422,6 +444,7 @@ func (c *Batch) DeleteJobQueueRequest(input *DeleteJobQueueInput) (req *request. output = &DeleteJobQueueOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -477,7 +500,7 @@ const opDeregisterJobDefinition = "DeregisterJobDefinition" // DeregisterJobDefinitionRequest generates a "aws/request.Request" representing the // client's request for the DeregisterJobDefinition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -511,6 +534,7 @@ func (c *Batch) DeregisterJobDefinitionRequest(input *DeregisterJobDefinitionInp output = &DeregisterJobDefinitionOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -561,7 +585,7 @@ const opDescribeComputeEnvironments = "DescribeComputeEnvironments" // DescribeComputeEnvironmentsRequest generates a "aws/request.Request" representing the // client's request for the DescribeComputeEnvironments operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -649,7 +673,7 @@ const opDescribeJobDefinitions = "DescribeJobDefinitions" // DescribeJobDefinitionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeJobDefinitions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -734,7 +758,7 @@ const opDescribeJobQueues = "DescribeJobQueues" // DescribeJobQueuesRequest generates a "aws/request.Request" representing the // client's request for the DescribeJobQueues operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -818,7 +842,7 @@ const opDescribeJobs = "DescribeJobs" // DescribeJobsRequest generates a "aws/request.Request" representing the // client's request for the DescribeJobs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -902,7 +926,7 @@ const opListJobs = "ListJobs" // ListJobsRequest generates a "aws/request.Request" representing the // client's request for the ListJobs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -941,9 +965,18 @@ func (c *Batch) ListJobsRequest(input *ListJobsInput) (req *request.Request, out // ListJobs API operation for AWS Batch. // -// Returns a list of task jobs for a specified job queue. You can filter the -// results by job status with the jobStatus parameter. If you do not specify -// a status, only RUNNING jobs are returned. +// Returns a list of AWS Batch jobs. +// +// You must specify only one of the following: +// +// * a job queue ID to return a list of jobs in that job queue +// +// * a multi-node parallel job ID to return a list of that job's nodes +// +// * an array job ID to return a list of that job's children +// +// You can filter the results by job status with the jobStatus parameter. If +// you do not specify a status, only RUNNING jobs are returned. // // 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 @@ -988,7 +1021,7 @@ const opRegisterJobDefinition = "RegisterJobDefinition" // RegisterJobDefinitionRequest generates a "aws/request.Request" representing the // client's request for the RegisterJobDefinition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1072,7 +1105,7 @@ const opSubmitJob = "SubmitJob" // SubmitJobRequest generates a "aws/request.Request" representing the // client's request for the SubmitJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1157,7 +1190,7 @@ const opTerminateJob = "TerminateJob" // TerminateJobRequest generates a "aws/request.Request" representing the // client's request for the TerminateJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1191,6 +1224,7 @@ func (c *Batch) TerminateJobRequest(input *TerminateJobInput) (req *request.Requ output = &TerminateJobOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1243,7 +1277,7 @@ const opUpdateComputeEnvironment = "UpdateComputeEnvironment" // UpdateComputeEnvironmentRequest generates a "aws/request.Request" representing the // client's request for the UpdateComputeEnvironment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1327,7 +1361,7 @@ const opUpdateJobQueue = "UpdateJobQueue" // UpdateJobQueueRequest generates a "aws/request.Request" representing the // client's request for the UpdateJobQueue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1524,6 +1558,9 @@ type AttemptContainerDetail struct { // receives a log stream name when they reach the RUNNING status. LogStreamName *string `locationName:"logStreamName" type:"string"` + // The network interfaces associated with the job attempt. + NetworkInterfaces []*NetworkInterface `locationName:"networkInterfaces" type:"list"` + // A short (255 max characters) human-readable string to provide additional // details about a running or stopped container. Reason *string `locationName:"reason" type:"string"` @@ -1562,6 +1599,12 @@ func (s *AttemptContainerDetail) SetLogStreamName(v string) *AttemptContainerDet return s } +// SetNetworkInterfaces sets the NetworkInterfaces field's value. +func (s *AttemptContainerDetail) SetNetworkInterfaces(v []*NetworkInterface) *AttemptContainerDetail { + s.NetworkInterfaces = v + return s +} + // SetReason sets the Reason field's value. func (s *AttemptContainerDetail) SetReason(v string) *AttemptContainerDetail { s.Reason = &v @@ -1581,7 +1624,7 @@ type AttemptDetail struct { // Details about the container in this job attempt. Container *AttemptContainerDetail `locationName:"container" type:"structure"` - // The Unix time stamp (in seconds and milliseconds) for when the attempt was + // The Unix timestamp (in seconds and milliseconds) for when the attempt was // started (when the attempt transitioned from the STARTING state to the RUNNING // state). StartedAt *int64 `locationName:"startedAt" type:"long"` @@ -1590,7 +1633,7 @@ type AttemptDetail struct { // status of the job attempt. StatusReason *string `locationName:"statusReason" type:"string"` - // The Unix time stamp (in seconds and milliseconds) for when the attempt was + // The Unix timestamp (in seconds and milliseconds) for when the attempt was // stopped (when the attempt transitioned from the RUNNING state to a terminal // state, such as SUCCEEDED or FAILED). StoppedAt *int64 `locationName:"stoppedAt" type:"long"` @@ -1726,8 +1769,17 @@ type ComputeEnvironmentDetail struct { ServiceRole *string `locationName:"serviceRole" type:"string"` // The state of the compute environment. The valid values are ENABLED or DISABLED. - // An ENABLED state indicates that you can register instances with the compute - // environment and that the associated instances can accept jobs. + // + // If the state is ENABLED, then the AWS Batch scheduler can attempt to place + // jobs from an associated job queue on the compute resources within the environment. + // If the compute environment is managed, then it can scale its instances out + // or in automatically, based on the job queue demand. + // + // If the state is DISABLED, then the AWS Batch scheduler does not attempt to + // place jobs within the environment. Jobs in a STARTING or RUNNING state continue + // to progress normally. Managed compute environments in the DISABLED state + // do not scale out. However, they scale in to minvCpus value after instances + // become idle. State *string `locationName:"state" type:"string" enum:"CEState"` // The current status of the compute environment (for example, CREATING or VALID). @@ -1865,10 +1917,13 @@ func (s *ComputeEnvironmentOrder) SetOrder(v int64) *ComputeEnvironmentOrder { type ComputeResource struct { _ struct{} `type:"structure"` - // The minimum percentage that a Spot Instance price must be when compared with + // The maximum percentage that a Spot Instance price can be when compared with // the On-Demand price for that instance type before instances are launched. - // For example, if your bid percentage is 20%, then the Spot price must be below - // 20% of the current On-Demand price for that EC2 instance. + // For example, if your maximum percentage is 20%, then the Spot price must + // be below 20% of the current On-Demand price for that EC2 instance. You always + // pay the lowest (market) price and never more than your maximum percentage. + // If you leave this field empty, the default value is 100% of the On-Demand + // price. BidPercentage *int64 `locationName:"bidPercentage" type:"integer"` // The desired number of EC2 vCPUS in the compute environment. @@ -1899,21 +1954,35 @@ type ComputeResource struct { // InstanceTypes is a required field InstanceTypes []*string `locationName:"instanceTypes" type:"list" required:"true"` + // The launch template to use for your compute resources. Any other compute + // resource parameters that you specify in a CreateComputeEnvironment API operation + // override the same parameters in the launch template. You must specify either + // the launch template ID or launch template name in the request, but not both. + LaunchTemplate *LaunchTemplateSpecification `locationName:"launchTemplate" type:"structure"` + // The maximum number of EC2 vCPUs that an environment can reach. // // MaxvCpus is a required field MaxvCpus *int64 `locationName:"maxvCpus" type:"integer" required:"true"` - // The minimum number of EC2 vCPUs that an environment should maintain. + // The minimum number of EC2 vCPUs that an environment should maintain (even + // if the compute environment is DISABLED). // // MinvCpus is a required field MinvCpus *int64 `locationName:"minvCpus" type:"integer" required:"true"` + // The Amazon EC2 placement group to associate with your compute resources. + // If you intend to submit multi-node parallel jobs to your compute environment, + // you should consider creating a cluster placement group and associate it with + // your compute resources. This keeps your multi-node parallel job on a logical + // grouping of instances within a single Availability Zone with high network + // flow potential. For more information, see Placement Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) + // in the Amazon EC2 User Guide for Linux Instances. + PlacementGroup *string `locationName:"placementGroup" type:"string"` + // The EC2 security group that is associated with instances launched in the // compute environment. - // - // SecurityGroupIds is a required field - SecurityGroupIds []*string `locationName:"securityGroupIds" type:"list" required:"true"` + SecurityGroupIds []*string `locationName:"securityGroupIds" type:"list"` // The Amazon Resource Name (ARN) of the Amazon EC2 Spot Fleet IAM role applied // to a SPOT compute environment. @@ -1959,9 +2028,6 @@ func (s *ComputeResource) Validate() error { if s.MinvCpus == nil { invalidParams.Add(request.NewErrParamRequired("MinvCpus")) } - if s.SecurityGroupIds == nil { - invalidParams.Add(request.NewErrParamRequired("SecurityGroupIds")) - } if s.Subnets == nil { invalidParams.Add(request.NewErrParamRequired("Subnets")) } @@ -2011,6 +2077,12 @@ func (s *ComputeResource) SetInstanceTypes(v []*string) *ComputeResource { return s } +// SetLaunchTemplate sets the LaunchTemplate field's value. +func (s *ComputeResource) SetLaunchTemplate(v *LaunchTemplateSpecification) *ComputeResource { + s.LaunchTemplate = v + return s +} + // SetMaxvCpus sets the MaxvCpus field's value. func (s *ComputeResource) SetMaxvCpus(v int64) *ComputeResource { s.MaxvCpus = &v @@ -2023,6 +2095,12 @@ func (s *ComputeResource) SetMinvCpus(v int64) *ComputeResource { return s } +// SetPlacementGroup sets the PlacementGroup field's value. +func (s *ComputeResource) SetPlacementGroup(v string) *ComputeResource { + s.PlacementGroup = &v + return s +} + // SetSecurityGroupIds sets the SecurityGroupIds field's value. func (s *ComputeResource) SetSecurityGroupIds(v []*string) *ComputeResource { s.SecurityGroupIds = v @@ -2119,6 +2197,10 @@ type ContainerDetail struct { // The image used to start the container. Image *string `locationName:"image" type:"string"` + // The instance type of the underlying host infrastructure of a multi-node parallel + // job. + InstanceType *string `locationName:"instanceType" type:"string"` + // The Amazon Resource Name (ARN) associated with the job upon execution. JobRoleArn *string `locationName:"jobRoleArn" type:"string"` @@ -2133,6 +2215,9 @@ type ContainerDetail struct { // The mount points for data volumes in your container. MountPoints []*MountPoint `locationName:"mountPoints" type:"list"` + // The network interfaces associated with the job. + NetworkInterfaces []*NetworkInterface `locationName:"networkInterfaces" type:"list"` + // When this parameter is true, the container is given elevated privileges on // the host container instance (similar to the root user). Privileged *bool `locationName:"privileged" type:"boolean"` @@ -2203,6 +2288,12 @@ func (s *ContainerDetail) SetImage(v string) *ContainerDetail { return s } +// SetInstanceType sets the InstanceType field's value. +func (s *ContainerDetail) SetInstanceType(v string) *ContainerDetail { + s.InstanceType = &v + return s +} + // SetJobRoleArn sets the JobRoleArn field's value. func (s *ContainerDetail) SetJobRoleArn(v string) *ContainerDetail { s.JobRoleArn = &v @@ -2227,6 +2318,12 @@ func (s *ContainerDetail) SetMountPoints(v []*MountPoint) *ContainerDetail { return s } +// SetNetworkInterfaces sets the NetworkInterfaces field's value. +func (s *ContainerDetail) SetNetworkInterfaces(v []*NetworkInterface) *ContainerDetail { + s.NetworkInterfaces = v + return s +} + // SetPrivileged sets the Privileged field's value. func (s *ContainerDetail) SetPrivileged(v bool) *ContainerDetail { s.Privileged = &v @@ -2291,6 +2388,10 @@ type ContainerOverrides struct { // is reserved for variables that are set by the AWS Batch service. Environment []*KeyValuePair `locationName:"environment" type:"list"` + // The instance type to use for a multi-node parallel job. This parameter is + // not valid for single-node container jobs. + InstanceType *string `locationName:"instanceType" type:"string"` + // The number of MiB of memory reserved for the job. This value overrides the // value set in the job definition. Memory *int64 `locationName:"memory" type:"integer"` @@ -2322,6 +2423,12 @@ func (s *ContainerOverrides) SetEnvironment(v []*KeyValuePair) *ContainerOverrid return s } +// SetInstanceType sets the InstanceType field's value. +func (s *ContainerOverrides) SetInstanceType(v string) *ContainerOverrides { + s.InstanceType = &v + return s +} + // SetMemory sets the Memory field's value. func (s *ContainerOverrides) SetMemory(v int64) *ContainerOverrides { s.Memory = &v @@ -2380,9 +2487,12 @@ type ContainerProperties struct { // // * Images in other online repositories are qualified further by a domain // name (for example, quay.io/assemblyline/ubuntu). - // - // Image is a required field - Image *string `locationName:"image" type:"string" required:"true"` + Image *string `locationName:"image" type:"string"` + + // The instance type to use for a multi-node parallel job. Currently all node + // groups in a multi-node parallel job must use the same instance type. This + // parameter is not valid for single-node container jobs. + InstanceType *string `locationName:"instanceType" type:"string"` // The Amazon Resource Name (ARN) of the IAM role that the container can assume // for AWS permissions. @@ -2399,9 +2509,7 @@ type ContainerProperties struct { // jobs as much memory as possible for a particular instance type, see Memory // Management (http://docs.aws.amazon.com/batch/latest/userguide/memory-management.html) // in the AWS Batch User Guide. - // - // Memory is a required field - Memory *int64 `locationName:"memory" type:"integer" required:"true"` + Memory *int64 `locationName:"memory" type:"integer"` // The mount points for data volumes in your container. This parameter maps // to Volumes in the Create a container (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-container) @@ -2441,9 +2549,7 @@ type ContainerProperties struct { // and the --cpu-shares option to docker run (https://docs.docker.com/engine/reference/run/). // Each vCPU is equivalent to 1,024 CPU shares. You must specify at least one // vCPU. - // - // Vcpus is a required field - Vcpus *int64 `locationName:"vcpus" type:"integer" required:"true"` + Vcpus *int64 `locationName:"vcpus" type:"integer"` // A list of data volumes used in a job. Volumes []*Volume `locationName:"volumes" type:"list"` @@ -2462,15 +2568,6 @@ func (s ContainerProperties) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *ContainerProperties) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ContainerProperties"} - if s.Image == nil { - invalidParams.Add(request.NewErrParamRequired("Image")) - } - if s.Memory == nil { - invalidParams.Add(request.NewErrParamRequired("Memory")) - } - if s.Vcpus == nil { - invalidParams.Add(request.NewErrParamRequired("Vcpus")) - } if s.Ulimits != nil { for i, v := range s.Ulimits { if v == nil { @@ -2506,6 +2603,12 @@ func (s *ContainerProperties) SetImage(v string) *ContainerProperties { return s } +// SetInstanceType sets the InstanceType field's value. +func (s *ContainerProperties) SetInstanceType(v string) *ContainerProperties { + s.InstanceType = &v + return s +} + // SetJobRoleArn sets the JobRoleArn field's value. func (s *ContainerProperties) SetJobRoleArn(v string) *ContainerProperties { s.JobRoleArn = &v @@ -2628,7 +2731,9 @@ type CreateComputeEnvironmentInput struct { // on queues. State *string `locationName:"state" type:"string" enum:"CEState"` - // The type of the compute environment. + // The type of the compute environment. For more information, see Compute Environments + // (http://docs.aws.amazon.com/batch/latest/userguide/compute_environments.html) + // in the AWS Batch User Guide. // // Type is a required field Type *string `locationName:"type" type:"string" required:"true" enum:"CEType"` @@ -2749,7 +2854,7 @@ type CreateJobQueueInput struct { // The priority of the job queue. Job queues with a higher priority (or a higher // integer value for the priority parameter) are evaluated first when associated - // with same compute environment. Priority is determined in descending order, + // with the same compute environment. Priority is determined in descending order, // for example, a job queue with a priority value of 10 is given scheduling // preference over a job queue with a priority value of 1. // @@ -3418,6 +3523,9 @@ type JobDefinition struct { // JobDefinitionName is a required field JobDefinitionName *string `locationName:"jobDefinitionName" type:"string" required:"true"` + // An object with various properties specific to multi-node parallel jobs. + NodeProperties *NodeProperties `locationName:"nodeProperties" type:"structure"` + // Default parameters or parameter substitution placeholders that are set in // the job definition. Parameters are specified as a key-value pair mapping. // Parameters in a SubmitJob request override any corresponding parameter defaults @@ -3475,6 +3583,12 @@ func (s *JobDefinition) SetJobDefinitionName(v string) *JobDefinition { return s } +// SetNodeProperties sets the NodeProperties field's value. +func (s *JobDefinition) SetNodeProperties(v *NodeProperties) *JobDefinition { + s.NodeProperties = v + return s +} + // SetParameters sets the Parameters field's value. func (s *JobDefinition) SetParameters(v map[string]*string) *JobDefinition { s.Parameters = v @@ -3558,7 +3672,7 @@ type JobDetail struct { // the job. Container *ContainerDetail `locationName:"container" type:"structure"` - // The Unix time stamp (in seconds and milliseconds) for when the job was created. + // The Unix timestamp (in seconds and milliseconds) for when the job was created. // For non-array jobs and parent array jobs, this is when the job entered the // SUBMITTED state (at the time SubmitJob was called). For array child jobs, // this is when the child job was spawned by its parent and entered the PENDING @@ -3588,6 +3702,13 @@ type JobDetail struct { // JobQueue is a required field JobQueue *string `locationName:"jobQueue" type:"string" required:"true"` + // An object representing the details of a node that is associated with a multi-node + // parallel job. + NodeDetails *NodeDetails `locationName:"nodeDetails" type:"structure"` + + // An object representing the node properties of a multi-node parallel job. + NodeProperties *NodeProperties `locationName:"nodeProperties" type:"structure"` + // Additional parameters passed to the job that replace parameter substitution // placeholders or override any corresponding parameter defaults from the job // definition. @@ -3596,7 +3717,7 @@ type JobDetail struct { // The retry strategy to use for this job if an attempt fails. RetryStrategy *RetryStrategy `locationName:"retryStrategy" type:"structure"` - // The Unix time stamp (in seconds and milliseconds) for when the job was started + // The Unix timestamp (in seconds and milliseconds) for when the job was started // (when the job transitioned from the STARTING state to the RUNNING state). // // StartedAt is a required field @@ -3604,6 +3725,9 @@ type JobDetail struct { // The current status for the job. // + // If your jobs do not progress to STARTING, see Jobs Stuck in (http://docs.aws.amazon.com/batch/latest/userguide/troubleshooting.html#job_stuck_in_runnable)RUNNABLE + // Status in the troubleshooting section of the AWS Batch User Guide. + // // Status is a required field Status *string `locationName:"status" type:"string" required:"true" enum:"JobStatus"` @@ -3611,7 +3735,7 @@ type JobDetail struct { // status of the job. StatusReason *string `locationName:"statusReason" type:"string"` - // The Unix time stamp (in seconds and milliseconds) for when the job was stopped + // The Unix timestamp (in seconds and milliseconds) for when the job was stopped // (when the job transitioned from the RUNNING state to a terminal state, such // as SUCCEEDED or FAILED). StoppedAt *int64 `locationName:"stoppedAt" type:"long"` @@ -3684,6 +3808,18 @@ func (s *JobDetail) SetJobQueue(v string) *JobDetail { return s } +// SetNodeDetails sets the NodeDetails field's value. +func (s *JobDetail) SetNodeDetails(v *NodeDetails) *JobDetail { + s.NodeDetails = v + return s +} + +// SetNodeProperties sets the NodeProperties field's value. +func (s *JobDetail) SetNodeProperties(v *NodeProperties) *JobDetail { + s.NodeProperties = v + return s +} + // SetParameters sets the Parameters field's value. func (s *JobDetail) SetParameters(v map[string]*string) *JobDetail { s.Parameters = v @@ -3828,10 +3964,10 @@ type JobSummary struct { // the job. Container *ContainerSummary `locationName:"container" type:"structure"` - // The Unix time stamp for when the job was created. For non-array jobs and - // parent array jobs, this is when the job entered the SUBMITTED state (at the - // time SubmitJob was called). For array child jobs, this is when the child - // job was spawned by its parent and entered the PENDING state. + // The Unix timestamp for when the job was created. For non-array jobs and parent + // array jobs, this is when the job entered the SUBMITTED state (at the time + // SubmitJob was called). For array child jobs, this is when the child job was + // spawned by its parent and entered the PENDING state. CreatedAt *int64 `locationName:"createdAt" type:"long"` // The ID of the job. @@ -3844,7 +3980,10 @@ type JobSummary struct { // JobName is a required field JobName *string `locationName:"jobName" type:"string" required:"true"` - // The Unix time stamp for when the job was started (when the job transitioned + // The node properties for a single node in a job summary list. + NodeProperties *NodePropertiesSummary `locationName:"nodeProperties" type:"structure"` + + // The Unix timestamp for when the job was started (when the job transitioned // from the STARTING state to the RUNNING state). StartedAt *int64 `locationName:"startedAt" type:"long"` @@ -3855,7 +3994,7 @@ type JobSummary struct { // status of the job. StatusReason *string `locationName:"statusReason" type:"string"` - // The Unix time stamp for when the job was stopped (when the job transitioned + // The Unix timestamp for when the job was stopped (when the job transitioned // from the RUNNING state to a terminal state, such as SUCCEEDED or FAILED). StoppedAt *int64 `locationName:"stoppedAt" type:"long"` } @@ -3900,6 +4039,12 @@ func (s *JobSummary) SetJobName(v string) *JobSummary { return s } +// SetNodeProperties sets the NodeProperties field's value. +func (s *JobSummary) SetNodeProperties(v *NodePropertiesSummary) *JobSummary { + s.NodeProperties = v + return s +} + // SetStartedAt sets the StartedAt field's value. func (s *JobSummary) SetStartedAt(v int64) *JobSummary { s.StartedAt = &v @@ -3984,6 +4129,52 @@ func (s *KeyValuePair) SetValue(v string) *KeyValuePair { return s } +// An object representing a launch template associated with a compute resource. +// You must specify either the launch template ID or launch template name in +// the request, but not both. +type LaunchTemplateSpecification struct { + _ struct{} `type:"structure"` + + // The ID of the launch template. + LaunchTemplateId *string `locationName:"launchTemplateId" type:"string"` + + // The name of the launch template. + LaunchTemplateName *string `locationName:"launchTemplateName" type:"string"` + + // The version number of the launch template. + // + // Default: The default version of the launch template. + Version *string `locationName:"version" type:"string"` +} + +// String returns the string representation +func (s LaunchTemplateSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LaunchTemplateSpecification) GoString() string { + return s.String() +} + +// SetLaunchTemplateId sets the LaunchTemplateId field's value. +func (s *LaunchTemplateSpecification) SetLaunchTemplateId(v string) *LaunchTemplateSpecification { + s.LaunchTemplateId = &v + return s +} + +// SetLaunchTemplateName sets the LaunchTemplateName field's value. +func (s *LaunchTemplateSpecification) SetLaunchTemplateName(v string) *LaunchTemplateSpecification { + s.LaunchTemplateName = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *LaunchTemplateSpecification) SetVersion(v string) *LaunchTemplateSpecification { + s.Version = &v + return s +} + type ListJobsInput struct { _ struct{} `type:"structure"` @@ -4008,6 +4199,11 @@ type ListJobsInput struct { // if applicable. MaxResults *int64 `locationName:"maxResults" type:"integer"` + // The job ID for a multi-node parallel job. Specifying a multi-node parallel + // job ID with this parameter lists all nodes that are associated with the specified + // job. + MultiNodeJobId *string `locationName:"multiNodeJobId" type:"string"` + // The nextToken value returned from a previous paginated ListJobs request where // maxResults was used and the results exceeded the value of that parameter. // Pagination continues from the end of the previous results that returned the @@ -4052,6 +4248,12 @@ func (s *ListJobsInput) SetMaxResults(v int64) *ListJobsInput { return s } +// SetMultiNodeJobId sets the MultiNodeJobId field's value. +func (s *ListJobsInput) SetMultiNodeJobId(v string) *ListJobsInput { + s.MultiNodeJobId = &v + return s +} + // SetNextToken sets the NextToken field's value. func (s *ListJobsInput) SetNextToken(v string) *ListJobsInput { s.NextToken = &v @@ -4139,11 +4341,373 @@ func (s *MountPoint) SetSourceVolume(v string) *MountPoint { return s } +// An object representing the elastic network interface for a multi-node parallel +// job node. +type NetworkInterface struct { + _ struct{} `type:"structure"` + + // The attachment ID for the network interface. + AttachmentId *string `locationName:"attachmentId" type:"string"` + + // The private IPv6 address for the network interface. + Ipv6Address *string `locationName:"ipv6Address" type:"string"` + + // The private IPv4 address for the network interface. + PrivateIpv4Address *string `locationName:"privateIpv4Address" type:"string"` +} + +// String returns the string representation +func (s NetworkInterface) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NetworkInterface) GoString() string { + return s.String() +} + +// SetAttachmentId sets the AttachmentId field's value. +func (s *NetworkInterface) SetAttachmentId(v string) *NetworkInterface { + s.AttachmentId = &v + return s +} + +// SetIpv6Address sets the Ipv6Address field's value. +func (s *NetworkInterface) SetIpv6Address(v string) *NetworkInterface { + s.Ipv6Address = &v + return s +} + +// SetPrivateIpv4Address sets the PrivateIpv4Address field's value. +func (s *NetworkInterface) SetPrivateIpv4Address(v string) *NetworkInterface { + s.PrivateIpv4Address = &v + return s +} + +// An object representing the details of a multi-node parallel job node. +type NodeDetails struct { + _ struct{} `type:"structure"` + + // Specifies whether the current node is the main node for a multi-node parallel + // job. + IsMainNode *bool `locationName:"isMainNode" type:"boolean"` + + // The node index for the node. Node index numbering begins at zero. This index + // is also available on the node with the AWS_BATCH_JOB_NODE_INDEX environment + // variable. + NodeIndex *int64 `locationName:"nodeIndex" type:"integer"` +} + +// String returns the string representation +func (s NodeDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NodeDetails) GoString() string { + return s.String() +} + +// SetIsMainNode sets the IsMainNode field's value. +func (s *NodeDetails) SetIsMainNode(v bool) *NodeDetails { + s.IsMainNode = &v + return s +} + +// SetNodeIndex sets the NodeIndex field's value. +func (s *NodeDetails) SetNodeIndex(v int64) *NodeDetails { + s.NodeIndex = &v + return s +} + +// Object representing any node overrides to a job definition that is used in +// a SubmitJob API operation. +type NodeOverrides struct { + _ struct{} `type:"structure"` + + // The node property overrides for the job. + NodePropertyOverrides []*NodePropertyOverride `locationName:"nodePropertyOverrides" type:"list"` +} + +// String returns the string representation +func (s NodeOverrides) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NodeOverrides) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *NodeOverrides) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "NodeOverrides"} + if s.NodePropertyOverrides != nil { + for i, v := range s.NodePropertyOverrides { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "NodePropertyOverrides", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNodePropertyOverrides sets the NodePropertyOverrides field's value. +func (s *NodeOverrides) SetNodePropertyOverrides(v []*NodePropertyOverride) *NodeOverrides { + s.NodePropertyOverrides = v + return s +} + +// An object representing the node properties of a multi-node parallel job. +type NodeProperties struct { + _ struct{} `type:"structure"` + + // Specifies the node index for the main node of a multi-node parallel job. + // + // MainNode is a required field + MainNode *int64 `locationName:"mainNode" type:"integer" required:"true"` + + // A list of node ranges and their properties associated with a multi-node parallel + // job. + // + // NodeRangeProperties is a required field + NodeRangeProperties []*NodeRangeProperty `locationName:"nodeRangeProperties" type:"list" required:"true"` + + // The number of nodes associated with a multi-node parallel job. + // + // NumNodes is a required field + NumNodes *int64 `locationName:"numNodes" type:"integer" required:"true"` +} + +// String returns the string representation +func (s NodeProperties) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NodeProperties) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *NodeProperties) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "NodeProperties"} + if s.MainNode == nil { + invalidParams.Add(request.NewErrParamRequired("MainNode")) + } + if s.NodeRangeProperties == nil { + invalidParams.Add(request.NewErrParamRequired("NodeRangeProperties")) + } + if s.NumNodes == nil { + invalidParams.Add(request.NewErrParamRequired("NumNodes")) + } + if s.NodeRangeProperties != nil { + for i, v := range s.NodeRangeProperties { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "NodeRangeProperties", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMainNode sets the MainNode field's value. +func (s *NodeProperties) SetMainNode(v int64) *NodeProperties { + s.MainNode = &v + return s +} + +// SetNodeRangeProperties sets the NodeRangeProperties field's value. +func (s *NodeProperties) SetNodeRangeProperties(v []*NodeRangeProperty) *NodeProperties { + s.NodeRangeProperties = v + return s +} + +// SetNumNodes sets the NumNodes field's value. +func (s *NodeProperties) SetNumNodes(v int64) *NodeProperties { + s.NumNodes = &v + return s +} + +// An object representing the properties of a node that is associated with a +// multi-node parallel job. +type NodePropertiesSummary struct { + _ struct{} `type:"structure"` + + // Specifies whether the current node is the main node for a multi-node parallel + // job. + IsMainNode *bool `locationName:"isMainNode" type:"boolean"` + + // The node index for the node. Node index numbering begins at zero. This index + // is also available on the node with the AWS_BATCH_JOB_NODE_INDEX environment + // variable. + NodeIndex *int64 `locationName:"nodeIndex" type:"integer"` + + // The number of nodes associated with a multi-node parallel job. + NumNodes *int64 `locationName:"numNodes" type:"integer"` +} + +// String returns the string representation +func (s NodePropertiesSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NodePropertiesSummary) GoString() string { + return s.String() +} + +// SetIsMainNode sets the IsMainNode field's value. +func (s *NodePropertiesSummary) SetIsMainNode(v bool) *NodePropertiesSummary { + s.IsMainNode = &v + return s +} + +// SetNodeIndex sets the NodeIndex field's value. +func (s *NodePropertiesSummary) SetNodeIndex(v int64) *NodePropertiesSummary { + s.NodeIndex = &v + return s +} + +// SetNumNodes sets the NumNodes field's value. +func (s *NodePropertiesSummary) SetNumNodes(v int64) *NodePropertiesSummary { + s.NumNodes = &v + return s +} + +// Object representing any node overrides to a job definition that is used in +// a SubmitJob API operation. +type NodePropertyOverride struct { + _ struct{} `type:"structure"` + + // The overrides that should be sent to a node range. + ContainerOverrides *ContainerOverrides `locationName:"containerOverrides" type:"structure"` + + // The range of nodes, using node index values, with which to override. A range + // of 0:3 indicates nodes with index values of 0 through 3. If the starting + // range value is omitted (:n), then 0 is used to start the range. If the ending + // range value is omitted (n:), then the highest possible node index is used + // to end the range. + // + // TargetNodes is a required field + TargetNodes *string `locationName:"targetNodes" type:"string" required:"true"` +} + +// String returns the string representation +func (s NodePropertyOverride) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NodePropertyOverride) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *NodePropertyOverride) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "NodePropertyOverride"} + if s.TargetNodes == nil { + invalidParams.Add(request.NewErrParamRequired("TargetNodes")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetContainerOverrides sets the ContainerOverrides field's value. +func (s *NodePropertyOverride) SetContainerOverrides(v *ContainerOverrides) *NodePropertyOverride { + s.ContainerOverrides = v + return s +} + +// SetTargetNodes sets the TargetNodes field's value. +func (s *NodePropertyOverride) SetTargetNodes(v string) *NodePropertyOverride { + s.TargetNodes = &v + return s +} + +// An object representing the properties of the node range for a multi-node +// parallel job. +type NodeRangeProperty struct { + _ struct{} `type:"structure"` + + // The container details for the node range. + Container *ContainerProperties `locationName:"container" type:"structure"` + + // The range of nodes, using node index values. A range of 0:3 indicates nodes + // with index values of 0 through 3. If the starting range value is omitted + // (:n), then 0 is used to start the range. If the ending range value is omitted + // (n:), then the highest possible node index is used to end the range. Your + // accumulative node ranges must account for all nodes (0:n). You may nest node + // ranges, for example 0:10 and 4:5, in which case the 4:5 range properties + // override the 0:10 properties. + // + // TargetNodes is a required field + TargetNodes *string `locationName:"targetNodes" type:"string" required:"true"` +} + +// String returns the string representation +func (s NodeRangeProperty) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NodeRangeProperty) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *NodeRangeProperty) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "NodeRangeProperty"} + if s.TargetNodes == nil { + invalidParams.Add(request.NewErrParamRequired("TargetNodes")) + } + if s.Container != nil { + if err := s.Container.Validate(); err != nil { + invalidParams.AddNested("Container", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetContainer sets the Container field's value. +func (s *NodeRangeProperty) SetContainer(v *ContainerProperties) *NodeRangeProperty { + s.Container = v + return s +} + +// SetTargetNodes sets the TargetNodes field's value. +func (s *NodeRangeProperty) SetTargetNodes(v string) *NodeRangeProperty { + s.TargetNodes = &v + return s +} + type RegisterJobDefinitionInput struct { _ struct{} `type:"structure"` - // An object with various properties specific for container-based jobs. This - // parameter is required if the type parameter is container. + // An object with various properties specific to single-node container-based + // jobs. If the job definition's type parameter is container, then you must + // specify either containerProperties or nodeProperties. ContainerProperties *ContainerProperties `locationName:"containerProperties" type:"structure"` // The name of the job definition to register. Up to 128 letters (uppercase @@ -4152,6 +4716,13 @@ type RegisterJobDefinitionInput struct { // JobDefinitionName is a required field JobDefinitionName *string `locationName:"jobDefinitionName" type:"string" required:"true"` + // An object with various properties specific to multi-node parallel jobs. If + // you specify node properties for a job, it becomes a multi-node parallel job. + // For more information, see Multi-node Parallel Jobs (http://docs.aws.amazon.com/batch/latest/userguide/multi-node-parallel-jobs.html) + // in the AWS Batch User Guide. If the job definition's type parameter is container, + // then you must specify either containerProperties or nodeProperties. + NodeProperties *NodeProperties `locationName:"nodeProperties" type:"structure"` + // Default parameter substitution placeholders to set in the job definition. // Parameters are specified as a key-value pair mapping. Parameters in a SubmitJob // request override any corresponding parameter defaults from the job definition. @@ -4202,6 +4773,11 @@ func (s *RegisterJobDefinitionInput) Validate() error { invalidParams.AddNested("ContainerProperties", err.(request.ErrInvalidParams)) } } + if s.NodeProperties != nil { + if err := s.NodeProperties.Validate(); err != nil { + invalidParams.AddNested("NodeProperties", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -4221,6 +4797,12 @@ func (s *RegisterJobDefinitionInput) SetJobDefinitionName(v string) *RegisterJob return s } +// SetNodeProperties sets the NodeProperties field's value. +func (s *RegisterJobDefinitionInput) SetNodeProperties(v *NodeProperties) *RegisterJobDefinitionInput { + s.NodeProperties = v + return s +} + // SetParameters sets the Parameters field's value. func (s *RegisterJobDefinitionInput) SetParameters(v map[string]*string) *RegisterJobDefinitionInput { s.Parameters = v @@ -4298,7 +4880,7 @@ type RetryStrategy struct { // The number of times to move a job to the RUNNABLE status. You may specify // between 1 and 10 attempts. If the value of attempts is greater than one, - // the job is retried if it fails until it has moved to RUNNABLE that many times. + // the job is retried on failure the same number of attempts as the value. Attempts *int64 `locationName:"attempts" type:"integer"` } @@ -4341,8 +4923,9 @@ type SubmitJobInput struct { // jobs. You can specify a SEQUENTIAL type dependency without specifying a job // ID for array jobs so that each child array job completes sequentially, starting // at index 0. You can also specify an N_TO_N type dependency with a job ID - // for array jobs so that each index child of this job must wait for the corresponding - // index child of each dependency to complete before it can begin. + // for array jobs. In that case, each index child of this job must wait for + // the corresponding index child of each dependency to complete before it can + // begin. DependsOn []*JobDependency `locationName:"dependsOn" type:"list"` // The job definition used by this job. This value can be either a name:revision @@ -4364,6 +4947,10 @@ type SubmitJobInput struct { // JobQueue is a required field JobQueue *string `locationName:"jobQueue" type:"string" required:"true"` + // A list of node overrides in JSON format that specify the node range to target + // and the container overrides for that node range. + NodeOverrides *NodeOverrides `locationName:"nodeOverrides" type:"structure"` + // Additional parameters passed to the job that replace parameter substitution // placeholders that are set in the job definition. Parameters are specified // as a key and value pair mapping. Parameters in a SubmitJob request override @@ -4408,6 +4995,11 @@ func (s *SubmitJobInput) Validate() error { if s.JobQueue == nil { invalidParams.Add(request.NewErrParamRequired("JobQueue")) } + if s.NodeOverrides != nil { + if err := s.NodeOverrides.Validate(); err != nil { + invalidParams.AddNested("NodeOverrides", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -4451,6 +5043,12 @@ func (s *SubmitJobInput) SetJobQueue(v string) *SubmitJobInput { return s } +// SetNodeOverrides sets the NodeOverrides field's value. +func (s *SubmitJobInput) SetNodeOverrides(v *NodeOverrides) *SubmitJobInput { + s.NodeOverrides = v + return s +} + // SetParameters sets the Parameters field's value. func (s *SubmitJobInput) SetParameters(v map[string]*string) *SubmitJobInput { s.Parameters = v @@ -4726,7 +5324,7 @@ type UpdateComputeEnvironmentOutput struct { // The Amazon Resource Name (ARN) of the compute environment. ComputeEnvironmentArn *string `locationName:"computeEnvironmentArn" type:"string"` - // The name of compute environment. + // The name of the compute environment. ComputeEnvironmentName *string `locationName:"computeEnvironmentName" type:"string"` } @@ -4767,7 +5365,7 @@ type UpdateJobQueueInput struct { // The priority of the job queue. Job queues with a higher priority (or a higher // integer value for the priority parameter) are evaluated first when associated - // with same compute environment. Priority is determined in descending order, + // with the same compute environment. Priority is determined in descending order, // for example, a job queue with a priority value of 10 is given scheduling // preference over a job queue with a priority value of 1. Priority *int64 `locationName:"priority" type:"integer"` @@ -4987,6 +5585,9 @@ const ( const ( // JobDefinitionTypeContainer is a JobDefinitionType enum value JobDefinitionTypeContainer = "container" + + // JobDefinitionTypeMultinode is a JobDefinitionType enum value + JobDefinitionTypeMultinode = "multinode" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/budgets/api.go b/vendor/github.com/aws/aws-sdk-go/service/budgets/api.go index cfa8f0a62c..7bff348f40 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/budgets/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/budgets/api.go @@ -9,6 +9,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) const opCreateBudget = "CreateBudget" @@ -16,7 +18,7 @@ const opCreateBudget = "CreateBudget" // CreateBudgetRequest generates a "aws/request.Request" representing the // client's request for the CreateBudget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -48,6 +50,7 @@ func (c *Budgets) CreateBudgetRequest(input *CreateBudgetInput) (req *request.Re output = &CreateBudgetOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -103,7 +106,7 @@ const opCreateNotification = "CreateNotification" // CreateNotificationRequest generates a "aws/request.Request" representing the // client's request for the CreateNotification operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -135,6 +138,7 @@ func (c *Budgets) CreateNotificationRequest(input *CreateNotificationInput) (req output = &CreateNotificationOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -194,7 +198,7 @@ const opCreateSubscriber = "CreateSubscriber" // CreateSubscriberRequest generates a "aws/request.Request" representing the // client's request for the CreateSubscriber operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -226,6 +230,7 @@ func (c *Budgets) CreateSubscriberRequest(input *CreateSubscriberInput) (req *re output = &CreateSubscriberOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -285,7 +290,7 @@ const opDeleteBudget = "DeleteBudget" // DeleteBudgetRequest generates a "aws/request.Request" representing the // client's request for the DeleteBudget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -317,6 +322,7 @@ func (c *Budgets) DeleteBudgetRequest(input *DeleteBudgetInput) (req *request.Re output = &DeleteBudgetOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -324,8 +330,8 @@ func (c *Budgets) DeleteBudgetRequest(input *DeleteBudgetInput) (req *request.Re // // Deletes a budget. You can delete your budget at any time. // -// Deleting a budget also deletes the notifications and subscribers associated -// with that budget. +// Deleting a budget also deletes the notifications and subscribers that are +// associated with that budget. // // 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 @@ -372,7 +378,7 @@ const opDeleteNotification = "DeleteNotification" // DeleteNotificationRequest generates a "aws/request.Request" representing the // client's request for the DeleteNotification operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -404,6 +410,7 @@ func (c *Budgets) DeleteNotificationRequest(input *DeleteNotificationInput) (req output = &DeleteNotificationOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -411,8 +418,8 @@ func (c *Budgets) DeleteNotificationRequest(input *DeleteNotificationInput) (req // // Deletes a notification. // -// Deleting a notification also deletes the subscribers associated with the -// notification. +// Deleting a notification also deletes the subscribers that are associated +// with the notification. // // 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 @@ -459,7 +466,7 @@ const opDeleteSubscriber = "DeleteSubscriber" // DeleteSubscriberRequest generates a "aws/request.Request" representing the // client's request for the DeleteSubscriber operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -491,6 +498,7 @@ func (c *Budgets) DeleteSubscriberRequest(input *DeleteSubscriberInput) (req *re output = &DeleteSubscriberOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -545,7 +553,7 @@ const opDescribeBudget = "DescribeBudget" // DescribeBudgetRequest generates a "aws/request.Request" representing the // client's request for the DescribeBudget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -624,12 +632,103 @@ func (c *Budgets) DescribeBudgetWithContext(ctx aws.Context, input *DescribeBudg return out, req.Send() } +const opDescribeBudgetPerformanceHistory = "DescribeBudgetPerformanceHistory" + +// DescribeBudgetPerformanceHistoryRequest generates a "aws/request.Request" representing the +// client's request for the DescribeBudgetPerformanceHistory 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 DescribeBudgetPerformanceHistory for more information on using the DescribeBudgetPerformanceHistory +// 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 DescribeBudgetPerformanceHistoryRequest method. +// req, resp := client.DescribeBudgetPerformanceHistoryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *Budgets) DescribeBudgetPerformanceHistoryRequest(input *DescribeBudgetPerformanceHistoryInput) (req *request.Request, output *DescribeBudgetPerformanceHistoryOutput) { + op := &request.Operation{ + Name: opDescribeBudgetPerformanceHistory, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeBudgetPerformanceHistoryInput{} + } + + output = &DescribeBudgetPerformanceHistoryOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeBudgetPerformanceHistory API operation for AWS Budgets. +// +// Describes the history for DAILY, MONTHLY, and QUARTERLY budgets. Budget history +// isn't available for ANNUAL budgets. +// +// 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 Budgets's +// API operation DescribeBudgetPerformanceHistory for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalErrorException "InternalErrorException" +// An error on the server occurred during the processing of your request. Try +// again later. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// An error on the client occurred. Typically, the cause is an invalid input +// value. +// +// * ErrCodeNotFoundException "NotFoundException" +// We can’t locate the resource that you specified. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The pagination token is invalid. +// +// * ErrCodeExpiredNextTokenException "ExpiredNextTokenException" +// The pagination token expired. +// +func (c *Budgets) DescribeBudgetPerformanceHistory(input *DescribeBudgetPerformanceHistoryInput) (*DescribeBudgetPerformanceHistoryOutput, error) { + req, out := c.DescribeBudgetPerformanceHistoryRequest(input) + return out, req.Send() +} + +// DescribeBudgetPerformanceHistoryWithContext is the same as DescribeBudgetPerformanceHistory with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeBudgetPerformanceHistory 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 *Budgets) DescribeBudgetPerformanceHistoryWithContext(ctx aws.Context, input *DescribeBudgetPerformanceHistoryInput, opts ...request.Option) (*DescribeBudgetPerformanceHistoryOutput, error) { + req, out := c.DescribeBudgetPerformanceHistoryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeBudgets = "DescribeBudgets" // DescribeBudgetsRequest generates a "aws/request.Request" representing the // client's request for the DescribeBudgets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -666,7 +765,7 @@ func (c *Budgets) DescribeBudgetsRequest(input *DescribeBudgetsInput) (req *requ // DescribeBudgets API operation for AWS Budgets. // -// Lists the budgets associated with an account. +// Lists the budgets that are associated with an 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 @@ -719,7 +818,7 @@ const opDescribeNotificationsForBudget = "DescribeNotificationsForBudget" // DescribeNotificationsForBudgetRequest generates a "aws/request.Request" representing the // client's request for the DescribeNotificationsForBudget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -756,7 +855,7 @@ func (c *Budgets) DescribeNotificationsForBudgetRequest(input *DescribeNotificat // DescribeNotificationsForBudget API operation for AWS Budgets. // -// Lists the notifications associated with a budget. +// Lists the notifications that are associated with a budget. // // 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 @@ -809,7 +908,7 @@ const opDescribeSubscribersForNotification = "DescribeSubscribersForNotification // DescribeSubscribersForNotificationRequest generates a "aws/request.Request" representing the // client's request for the DescribeSubscribersForNotification operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -846,7 +945,7 @@ func (c *Budgets) DescribeSubscribersForNotificationRequest(input *DescribeSubsc // DescribeSubscribersForNotification API operation for AWS Budgets. // -// Lists the subscribers associated with a notification. +// Lists the subscribers that are associated with a notification. // // 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 @@ -899,7 +998,7 @@ const opUpdateBudget = "UpdateBudget" // UpdateBudgetRequest generates a "aws/request.Request" representing the // client's request for the UpdateBudget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -931,13 +1030,14 @@ func (c *Budgets) UpdateBudgetRequest(input *UpdateBudgetInput) (req *request.Re output = &UpdateBudgetOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // UpdateBudget API operation for AWS Budgets. // // Updates a budget. You can change every part of a budget except for the budgetName -// and the calculatedSpend. When a budget is modified, the calculatedSpend drops +// and the calculatedSpend. When you modify a budget, the calculatedSpend drops // to zero until AWS has new usage data to use for forecasting. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -985,7 +1085,7 @@ const opUpdateNotification = "UpdateNotification" // UpdateNotificationRequest generates a "aws/request.Request" representing the // client's request for the UpdateNotification operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1017,6 +1117,7 @@ func (c *Budgets) UpdateNotificationRequest(input *UpdateNotificationInput) (req output = &UpdateNotificationOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1072,7 +1173,7 @@ const opUpdateSubscriber = "UpdateSubscriber" // UpdateSubscriberRequest generates a "aws/request.Request" representing the // client's request for the UpdateSubscriber operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1104,6 +1205,7 @@ func (c *Budgets) UpdateSubscriberRequest(input *UpdateSubscriberInput) (req *re output = &UpdateSubscriberOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1156,52 +1258,71 @@ func (c *Budgets) UpdateSubscriberWithContext(ctx aws.Context, input *UpdateSubs // Represents the output of the CreateBudget operation. The content consists // of the detailed metadata and data file information, and the current status -// of the budget. +// of the budget object. +// +// This is the ARN pattern for a budget: // -// The ARN pattern for a budget is: arn:aws:budgetservice::AccountId:budget/budgetName +// arn:aws:budgetservice::AccountId:budget/budgetName type Budget struct { _ struct{} `type:"structure"` - // The total amount of cost, usage, or RI utilization that you want to track - // with your budget. + // The total amount of cost, usage, RI utilization, or RI coverage that you + // want to track with your budget. // // BudgetLimit is required for cost or usage budgets, but optional for RI utilization - // budgets. RI utilization budgets default to the only valid value for RI utilization - // budgets, which is 100. + // or coverage budgets. RI utilization or coverage budgets default to 100, which + // is the only valid value for RI utilization or coverage budgets. BudgetLimit *Spend `type:"structure"` - // The name of a budget. Unique within accounts. : and \ characters are not - // allowed in the BudgetName. + // The name of a budget. The name must be unique within accounts. The : and + // \ characters aren't allowed in BudgetName. // // BudgetName is a required field - BudgetName *string `type:"string" required:"true"` + BudgetName *string `min:"1" type:"string" required:"true"` - // Whether this budget tracks monetary costs, usage, or RI utilization. + // Whether this budget tracks monetary costs, usage, RI utilization, or RI coverage. // // BudgetType is a required field BudgetType *string `type:"string" required:"true" enum:"BudgetType"` - // The actual and forecasted cost or usage being tracked by a budget. + // The actual and forecasted cost or usage that the budget tracks. CalculatedSpend *CalculatedSpend `type:"structure"` - // The cost filters applied to a budget, such as service or region. + // The cost filters, such as service or region, that are applied to a budget. + // + // AWS Budgets supports the following services as a filter for RI budgets: + // + // * Amazon Elastic Compute Cloud - Compute + // + // * Amazon Redshift + // + // * Amazon Relational Database Service + // + // * Amazon ElastiCache + // + // * Amazon Elasticsearch Service CostFilters map[string][]*string `type:"map"` - // The types of costs included in this budget. + // The types of costs that are included in this COST budget. + // + // USAGE, RI_UTILIZATION, and RI_COVERAGE budgets do not have CostTypes. CostTypes *CostTypes `type:"structure"` - // The period of time covered by a budget. Has a start date and an end date. - // The start date must come before the end date. There are no restrictions on - // the end date. + // The last time that you updated this budget. + LastUpdatedTime *time.Time `type:"timestamp"` + + // The period of time that is covered by a budget. The period has a start date + // and an end date. The start date must come before the end date. The end date + // must come before 06/15/87 00:00 UTC. // - // If you created your budget and didn't specify a start date, AWS defaults - // to the start of your chosen time period (i.e. DAILY, MONTHLY, QUARTERLY, - // ANNUALLY). For example, if you created your budget on January 24th 2018, - // chose DAILY, and didn't set a start date, AWS set your start date to 01/24/18 - // 00:00 UTC. If you chose MONTHLY, AWS set your start date to 01/01/18 00:00 - // UTC. If you didn't specify an end date, AWS set your end date to 06/15/87 - // 00:00 UTC. The defaults are the same for the AWS Billing and Cost Management - // console and the API. + // If you create your budget and don't specify a start date, AWS defaults to + // the start of your chosen time period (DAILY, MONTHLY, QUARTERLY, or ANNUALLY). + // For example, if you created your budget on January 24, 2018, chose DAILY, + // and didn't set a start date, AWS set your start date to 01/24/18 00:00 UTC. + // If you chose MONTHLY, AWS set your start date to 01/01/18 00:00 UTC. If you + // didn't specify an end date, AWS set your end date to 06/15/87 00:00 UTC. + // The defaults are the same for the AWS Billing and Cost Management console + // and the API. // // You can change either date with the UpdateBudget operation. // @@ -1210,6 +1331,7 @@ type Budget struct { TimePeriod *TimePeriod `type:"structure"` // The length of time until a budget resets the actual and forecasted spend. + // DAILY is available only for RI_UTILIZATION and RI_COVERAGE budgets. // // TimeUnit is a required field TimeUnit *string `type:"string" required:"true" enum:"TimeUnit"` @@ -1231,6 +1353,9 @@ func (s *Budget) Validate() error { if s.BudgetName == nil { invalidParams.Add(request.NewErrParamRequired("BudgetName")) } + if s.BudgetName != nil && len(*s.BudgetName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BudgetName", 1)) + } if s.BudgetType == nil { invalidParams.Add(request.NewErrParamRequired("BudgetType")) } @@ -1290,6 +1415,12 @@ func (s *Budget) SetCostTypes(v *CostTypes) *Budget { return s } +// SetLastUpdatedTime sets the LastUpdatedTime field's value. +func (s *Budget) SetLastUpdatedTime(v time.Time) *Budget { + s.LastUpdatedTime = &v + return s +} + // SetTimePeriod sets the TimePeriod field's value. func (s *Budget) SetTimePeriod(v *TimePeriod) *Budget { s.TimePeriod = v @@ -1302,8 +1433,125 @@ func (s *Budget) SetTimeUnit(v string) *Budget { return s } -// The spend objects associated with this budget. The actualSpend tracks how -// much you've used, cost, usage, or RI units, and the forecastedSpend tracks +// A history of the state of a budget at the end of the budget's specified time +// period. +type BudgetPerformanceHistory struct { + _ struct{} `type:"structure"` + + // A string that represents the budget name. The ":" and "\" characters aren't + // allowed. + BudgetName *string `min:"1" type:"string"` + + // The type of a budget. It must be one of the following types: + // + // COST, USAGE, RI_UTILIZATION, or RI_COVERAGE. + BudgetType *string `type:"string" enum:"BudgetType"` + + // A list of amounts of cost or usage that you created budgets for, compared + // to your actual costs or usage. + BudgetedAndActualAmountsList []*BudgetedAndActualAmounts `type:"list"` + + // The history of the cost filters for a budget during the specified time period. + CostFilters map[string][]*string `type:"map"` + + // The history of the cost types for a budget during the specified time period. + CostTypes *CostTypes `type:"structure"` + + // The time unit of the budget, such as MONTHLY or QUARTERLY. + TimeUnit *string `type:"string" enum:"TimeUnit"` +} + +// String returns the string representation +func (s BudgetPerformanceHistory) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BudgetPerformanceHistory) GoString() string { + return s.String() +} + +// SetBudgetName sets the BudgetName field's value. +func (s *BudgetPerformanceHistory) SetBudgetName(v string) *BudgetPerformanceHistory { + s.BudgetName = &v + return s +} + +// SetBudgetType sets the BudgetType field's value. +func (s *BudgetPerformanceHistory) SetBudgetType(v string) *BudgetPerformanceHistory { + s.BudgetType = &v + return s +} + +// SetBudgetedAndActualAmountsList sets the BudgetedAndActualAmountsList field's value. +func (s *BudgetPerformanceHistory) SetBudgetedAndActualAmountsList(v []*BudgetedAndActualAmounts) *BudgetPerformanceHistory { + s.BudgetedAndActualAmountsList = v + return s +} + +// SetCostFilters sets the CostFilters field's value. +func (s *BudgetPerformanceHistory) SetCostFilters(v map[string][]*string) *BudgetPerformanceHistory { + s.CostFilters = v + return s +} + +// SetCostTypes sets the CostTypes field's value. +func (s *BudgetPerformanceHistory) SetCostTypes(v *CostTypes) *BudgetPerformanceHistory { + s.CostTypes = v + return s +} + +// SetTimeUnit sets the TimeUnit field's value. +func (s *BudgetPerformanceHistory) SetTimeUnit(v string) *BudgetPerformanceHistory { + s.TimeUnit = &v + return s +} + +// The amount of cost or usage that you created the budget for, compared to +// your actual costs or usage. +type BudgetedAndActualAmounts struct { + _ struct{} `type:"structure"` + + // Your actual costs or usage for a budget period. + ActualAmount *Spend `type:"structure"` + + // The amount of cost or usage that you created the budget for. + BudgetedAmount *Spend `type:"structure"` + + // The time period covered by this budget comparison. + TimePeriod *TimePeriod `type:"structure"` +} + +// String returns the string representation +func (s BudgetedAndActualAmounts) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BudgetedAndActualAmounts) GoString() string { + return s.String() +} + +// SetActualAmount sets the ActualAmount field's value. +func (s *BudgetedAndActualAmounts) SetActualAmount(v *Spend) *BudgetedAndActualAmounts { + s.ActualAmount = v + return s +} + +// SetBudgetedAmount sets the BudgetedAmount field's value. +func (s *BudgetedAndActualAmounts) SetBudgetedAmount(v *Spend) *BudgetedAndActualAmounts { + s.BudgetedAmount = v + return s +} + +// SetTimePeriod sets the TimePeriod field's value. +func (s *BudgetedAndActualAmounts) SetTimePeriod(v *TimePeriod) *BudgetedAndActualAmounts { + s.TimePeriod = v + return s +} + +// The spend objects that are associated with this budget. The actualSpend tracks +// how much you've used, cost, usage, or RI units, and the forecastedSpend tracks // how much you are predicted to spend if your current usage remains steady. // // For example, if it is the 20th of the month and you have spent 50 dollars @@ -1366,7 +1614,9 @@ func (s *CalculatedSpend) SetForecastedSpend(v *Spend) *CalculatedSpend { return s } -// The types of cost included in a budget, such as tax and subscriptions. +// The types of cost that are included in a COST budget, such as tax and subscriptions. +// +// USAGE, RI_UTILIZATION, and RI_COVERAGE budgets do not have CostTypes. type CostTypes struct { _ struct{} `type:"structure"` @@ -1420,7 +1670,7 @@ type CostTypes struct { // The default value is false. UseAmortized *bool `type:"boolean"` - // Specifies whether a budget uses blended rate. + // Specifies whether a budget uses a blended rate. // // The default value is false. UseBlended *bool `type:"boolean"` @@ -1518,7 +1768,7 @@ type CreateBudgetInput struct { // A notification that you want to associate with a budget. A budget can have // up to five notifications, and each notification can have one SNS subscriber - // and up to ten email subscribers. If you include notifications and subscribers + // and up to 10 email subscribers. If you include notifications and subscribers // in your CreateBudget call, AWS creates the notifications and subscribers // for you. NotificationsWithSubscribers []*NotificationWithSubscribers `type:"list"` @@ -1611,11 +1861,11 @@ type CreateNotificationInput struct { // AccountId is a required field AccountId *string `min:"12" type:"string" required:"true"` - // The name of the budget that you want AWS to notified you about. Budget names + // The name of the budget that you want AWS to notify you about. Budget names // must be unique within an account. // // BudgetName is a required field - BudgetName *string `type:"string" required:"true"` + BudgetName *string `min:"1" type:"string" required:"true"` // The notification that you want to create. // @@ -1623,7 +1873,7 @@ type CreateNotificationInput struct { Notification *Notification `type:"structure" required:"true"` // A list of subscribers that you want to associate with the notification. Each - // notification can have one SNS subscriber and up to ten email subscribers. + // notification can have one SNS subscriber and up to 10 email subscribers. // // Subscribers is a required field Subscribers []*Subscriber `min:"1" type:"list" required:"true"` @@ -1651,6 +1901,9 @@ func (s *CreateNotificationInput) Validate() error { if s.BudgetName == nil { invalidParams.Add(request.NewErrParamRequired("BudgetName")) } + if s.BudgetName != nil && len(*s.BudgetName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BudgetName", 1)) + } if s.Notification == nil { invalidParams.Add(request.NewErrParamRequired("Notification")) } @@ -1725,8 +1978,8 @@ func (s CreateNotificationOutput) GoString() string { type CreateSubscriberInput struct { _ struct{} `type:"structure"` - // The accountId associated with the budget that you want to create a subscriber - // for. + // The accountId that is associated with the budget that you want to create + // a subscriber for. // // AccountId is a required field AccountId *string `min:"12" type:"string" required:"true"` @@ -1735,7 +1988,7 @@ type CreateSubscriberInput struct { // unique within an account. // // BudgetName is a required field - BudgetName *string `type:"string" required:"true"` + BudgetName *string `min:"1" type:"string" required:"true"` // The notification that you want to create a subscriber for. // @@ -1770,6 +2023,9 @@ func (s *CreateSubscriberInput) Validate() error { if s.BudgetName == nil { invalidParams.Add(request.NewErrParamRequired("BudgetName")) } + if s.BudgetName != nil && len(*s.BudgetName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BudgetName", 1)) + } if s.Notification == nil { invalidParams.Add(request.NewErrParamRequired("Notification")) } @@ -1844,7 +2100,7 @@ type DeleteBudgetInput struct { // The name of the budget that you want to delete. // // BudgetName is a required field - BudgetName *string `type:"string" required:"true"` + BudgetName *string `min:"1" type:"string" required:"true"` } // String returns the string representation @@ -1869,6 +2125,9 @@ func (s *DeleteBudgetInput) Validate() error { if s.BudgetName == nil { invalidParams.Add(request.NewErrParamRequired("BudgetName")) } + if s.BudgetName != nil && len(*s.BudgetName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BudgetName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -1916,7 +2175,7 @@ type DeleteNotificationInput struct { // The name of the budget whose notification you want to delete. // // BudgetName is a required field - BudgetName *string `type:"string" required:"true"` + BudgetName *string `min:"1" type:"string" required:"true"` // The notification that you want to delete. // @@ -1946,6 +2205,9 @@ func (s *DeleteNotificationInput) Validate() error { if s.BudgetName == nil { invalidParams.Add(request.NewErrParamRequired("BudgetName")) } + if s.BudgetName != nil && len(*s.BudgetName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BudgetName", 1)) + } if s.Notification == nil { invalidParams.Add(request.NewErrParamRequired("Notification")) } @@ -2007,7 +2269,7 @@ type DeleteSubscriberInput struct { // The name of the budget whose subscriber you want to delete. // // BudgetName is a required field - BudgetName *string `type:"string" required:"true"` + BudgetName *string `min:"1" type:"string" required:"true"` // The notification whose subscriber you want to delete. // @@ -2042,6 +2304,9 @@ func (s *DeleteSubscriberInput) Validate() error { if s.BudgetName == nil { invalidParams.Add(request.NewErrParamRequired("BudgetName")) } + if s.BudgetName != nil && len(*s.BudgetName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BudgetName", 1)) + } if s.Notification == nil { invalidParams.Add(request.NewErrParamRequired("Notification")) } @@ -2117,7 +2382,7 @@ type DescribeBudgetInput struct { // The name of the budget that you want a description of. // // BudgetName is a required field - BudgetName *string `type:"string" required:"true"` + BudgetName *string `min:"1" type:"string" required:"true"` } // String returns the string representation @@ -2142,6 +2407,9 @@ func (s *DescribeBudgetInput) Validate() error { if s.BudgetName == nil { invalidParams.Add(request.NewErrParamRequired("BudgetName")) } + if s.BudgetName != nil && len(*s.BudgetName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BudgetName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -2185,6 +2453,134 @@ func (s *DescribeBudgetOutput) SetBudget(v *Budget) *DescribeBudgetOutput { return s } +type DescribeBudgetPerformanceHistoryInput struct { + _ struct{} `type:"structure"` + + // The account ID of the user. It should be a 12-digit number. + // + // AccountId is a required field + AccountId *string `min:"12" type:"string" required:"true"` + + // A string that represents the budget name. The ":" and "\" characters aren't + // allowed. + // + // BudgetName is a required field + BudgetName *string `min:"1" type:"string" required:"true"` + + // An integer that represents how many entries a paginated response contains. + // The maximum is 100. + MaxResults *int64 `min:"1" type:"integer"` + + // A generic string. + NextToken *string `type:"string"` + + // Retrieves how often the budget went into an ALARM state for the specified + // time period. + TimePeriod *TimePeriod `type:"structure"` +} + +// String returns the string representation +func (s DescribeBudgetPerformanceHistoryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeBudgetPerformanceHistoryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeBudgetPerformanceHistoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeBudgetPerformanceHistoryInput"} + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.AccountId != nil && len(*s.AccountId) < 12 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 12)) + } + if s.BudgetName == nil { + invalidParams.Add(request.NewErrParamRequired("BudgetName")) + } + if s.BudgetName != nil && len(*s.BudgetName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BudgetName", 1)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccountId sets the AccountId field's value. +func (s *DescribeBudgetPerformanceHistoryInput) SetAccountId(v string) *DescribeBudgetPerformanceHistoryInput { + s.AccountId = &v + return s +} + +// SetBudgetName sets the BudgetName field's value. +func (s *DescribeBudgetPerformanceHistoryInput) SetBudgetName(v string) *DescribeBudgetPerformanceHistoryInput { + s.BudgetName = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeBudgetPerformanceHistoryInput) SetMaxResults(v int64) *DescribeBudgetPerformanceHistoryInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeBudgetPerformanceHistoryInput) SetNextToken(v string) *DescribeBudgetPerformanceHistoryInput { + s.NextToken = &v + return s +} + +// SetTimePeriod sets the TimePeriod field's value. +func (s *DescribeBudgetPerformanceHistoryInput) SetTimePeriod(v *TimePeriod) *DescribeBudgetPerformanceHistoryInput { + s.TimePeriod = v + return s +} + +type DescribeBudgetPerformanceHistoryOutput struct { + _ struct{} `type:"structure"` + + // The history of how often the budget has gone into an ALARM state. + // + // For DAILY budgets, the history saves the state of the budget for the last + // 60 days. For MONTHLY budgets, the history saves the state of the budget for + // the current month plus the last 12 months. For QUARTERLY budgets, the history + // saves the state of the budget for the last four quarters. + BudgetPerformanceHistory *BudgetPerformanceHistory `type:"structure"` + + // A generic string. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeBudgetPerformanceHistoryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeBudgetPerformanceHistoryOutput) GoString() string { + return s.String() +} + +// SetBudgetPerformanceHistory sets the BudgetPerformanceHistory field's value. +func (s *DescribeBudgetPerformanceHistoryOutput) SetBudgetPerformanceHistory(v *BudgetPerformanceHistory) *DescribeBudgetPerformanceHistoryOutput { + s.BudgetPerformanceHistory = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeBudgetPerformanceHistoryOutput) SetNextToken(v string) *DescribeBudgetPerformanceHistoryOutput { + s.NextToken = &v + return s +} + // Request of DescribeBudgets type DescribeBudgetsInput struct { _ struct{} `type:"structure"` @@ -2195,10 +2591,12 @@ type DescribeBudgetsInput struct { // AccountId is a required field AccountId *string `min:"12" type:"string" required:"true"` - // Optional integer. Specifies the maximum number of results to return in response. + // An optional integer that represents how many entries a paginated response + // contains. The maximum is 100. MaxResults *int64 `min:"1" type:"integer"` - // The pagination token that indicates the next set of results to retrieve. + // The pagination token that you include in your request to indicate the next + // set of results that you want to retrieve. NextToken *string `type:"string"` } @@ -2256,8 +2654,8 @@ type DescribeBudgetsOutput struct { // A list of budgets. Budgets []*Budget `type:"list"` - // The pagination token that indicates the next set of results that you can - // retrieve. + // The pagination token in the service response that indicates the next set + // of results that you can retrieve. NextToken *string `type:"string"` } @@ -2296,12 +2694,14 @@ type DescribeNotificationsForBudgetInput struct { // The name of the budget whose notifications you want descriptions of. // // BudgetName is a required field - BudgetName *string `type:"string" required:"true"` + BudgetName *string `min:"1" type:"string" required:"true"` - // Optional integer. Specifies the maximum number of results to return in response. + // An optional integer that represents how many entries a paginated response + // contains. The maximum is 100. MaxResults *int64 `min:"1" type:"integer"` - // The pagination token that indicates the next set of results to retrieve. + // The pagination token that you include in your request to indicate the next + // set of results that you want to retrieve. NextToken *string `type:"string"` } @@ -2327,6 +2727,9 @@ func (s *DescribeNotificationsForBudgetInput) Validate() error { if s.BudgetName == nil { invalidParams.Add(request.NewErrParamRequired("BudgetName")) } + if s.BudgetName != nil && len(*s.BudgetName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BudgetName", 1)) + } if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } @@ -2365,11 +2768,11 @@ func (s *DescribeNotificationsForBudgetInput) SetNextToken(v string) *DescribeNo type DescribeNotificationsForBudgetOutput struct { _ struct{} `type:"structure"` - // The pagination token that indicates the next set of results that you can - // retrieve. + // The pagination token in the service response that indicates the next set + // of results that you can retrieve. NextToken *string `type:"string"` - // A list of notifications associated with a budget. + // A list of notifications that are associated with a budget. Notifications []*Notification `type:"list"` } @@ -2408,12 +2811,14 @@ type DescribeSubscribersForNotificationInput struct { // The name of the budget whose subscribers you want descriptions of. // // BudgetName is a required field - BudgetName *string `type:"string" required:"true"` + BudgetName *string `min:"1" type:"string" required:"true"` - // Optional integer. Specifies the maximum number of results to return in response. + // An optional integer that represents how many entries a paginated response + // contains. The maximum is 100. MaxResults *int64 `min:"1" type:"integer"` - // The pagination token that indicates the next set of results to retrieve. + // The pagination token that you include in your request to indicate the next + // set of results that you want to retrieve. NextToken *string `type:"string"` // The notification whose subscribers you want to list. @@ -2444,6 +2849,9 @@ func (s *DescribeSubscribersForNotificationInput) Validate() error { if s.BudgetName == nil { invalidParams.Add(request.NewErrParamRequired("BudgetName")) } + if s.BudgetName != nil && len(*s.BudgetName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BudgetName", 1)) + } if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } @@ -2496,11 +2904,11 @@ func (s *DescribeSubscribersForNotificationInput) SetNotification(v *Notificatio type DescribeSubscribersForNotificationOutput struct { _ struct{} `type:"structure"` - // The pagination token that indicates the next set of results that you can - // retrieve. + // The pagination token in the service response that indicates the next set + // of results that you can retrieve. NextToken *string `type:"string"` - // A list of subscribers associated with a notification. + // A list of subscribers that are associated with a notification. Subscribers []*Subscriber `min:"1" type:"list"` } @@ -2526,41 +2934,52 @@ func (s *DescribeSubscribersForNotificationOutput) SetSubscribers(v []*Subscribe return s } -// A notification associated with a budget. A budget can have up to five notifications. +// A notification that is associated with a budget. A budget can have up to +// five notifications. // // Each notification must have at least one subscriber. A notification can have -// one SNS subscriber and up to ten email subscribers, for a total of 11 subscribers. +// one SNS subscriber and up to 10 email subscribers, for a total of 11 subscribers. // // For example, if you have a budget for 200 dollars and you want to be notified // when you go over 160 dollars, create a notification with the following parameters: // // * A notificationType of ACTUAL // +// * A thresholdType of PERCENTAGE +// // * A comparisonOperator of GREATER_THAN // // * A notification threshold of 80 type Notification struct { _ struct{} `type:"structure"` - // The comparison used for this notification. + // The comparison that is used for this notification. // // ComparisonOperator is a required field ComparisonOperator *string `type:"string" required:"true" enum:"ComparisonOperator"` + // Whether this notification is in alarm. If a budget notification is in the + // ALARM state, you have passed the set threshold for the budget. + NotificationState *string `type:"string" enum:"NotificationState"` + // Whether the notification is for how much you have spent (ACTUAL) or for how - // much you are forecasted to spend (FORECASTED). + // much you're forecasted to spend (FORECASTED). // // NotificationType is a required field NotificationType *string `type:"string" required:"true" enum:"NotificationType"` - // The threshold associated with a notification. Thresholds are always a percentage. + // The threshold that is associated with a notification. Thresholds are always + // a percentage. // // Threshold is a required field - Threshold *float64 `min:"0.1" type:"double" required:"true"` - - // The type of threshold for a notification. For ACTUAL thresholds, AWS notifies - // you when you go over the threshold, and for FORECASTED thresholds AWS notifies - // you when you are forecasted to go over the threshold. + Threshold *float64 `type:"double" required:"true"` + + // The type of threshold for a notification. For ABSOLUTE_VALUE thresholds, + // AWS notifies you when you go over or are forecasted to go over your total + // cost threshold. For PERCENTAGE thresholds, AWS notifies you when you go over + // or are forecasted to go over a certain percentage of your forecasted spend. + // For example, if you have a budget for 200 dollars and you have a PERCENTAGE + // threshold of 80%, AWS notifies you when you go over 160 dollars. ThresholdType *string `type:"string" enum:"ThresholdType"` } @@ -2586,9 +3005,6 @@ func (s *Notification) Validate() error { if s.Threshold == nil { invalidParams.Add(request.NewErrParamRequired("Threshold")) } - if s.Threshold != nil && *s.Threshold < 0.1 { - invalidParams.Add(request.NewErrParamMinValue("Threshold", 0.1)) - } if invalidParams.Len() > 0 { return invalidParams @@ -2602,6 +3018,12 @@ func (s *Notification) SetComparisonOperator(v string) *Notification { return s } +// SetNotificationState sets the NotificationState field's value. +func (s *Notification) SetNotificationState(v string) *Notification { + s.NotificationState = &v + return s +} + // SetNotificationType sets the NotificationType field's value. func (s *Notification) SetNotificationType(v string) *Notification { s.NotificationType = &v @@ -2621,11 +3043,11 @@ func (s *Notification) SetThresholdType(v string) *Notification { } // A notification with subscribers. A notification can have one SNS subscriber -// and up to ten email subscribers, for a total of 11 subscribers. +// and up to 10 email subscribers, for a total of 11 subscribers. type NotificationWithSubscribers struct { _ struct{} `type:"structure"` - // The notification associated with a budget. + // The notification that is associated with a budget. // // Notification is a required field Notification *Notification `type:"structure" required:"true"` @@ -2692,7 +3114,7 @@ func (s *NotificationWithSubscribers) SetSubscribers(v []*Subscriber) *Notificat return s } -// The amount of cost or usage being measured for a budget. +// The amount of cost or usage that is measured for a budget. // // For example, a Spend for 3 GB of S3 usage would have the following parameters: // @@ -2702,14 +3124,14 @@ func (s *NotificationWithSubscribers) SetSubscribers(v []*Subscriber) *Notificat type Spend struct { _ struct{} `type:"structure"` - // The cost or usage amount associated with a budget forecast, actual spend, - // or budget threshold. + // The cost or usage amount that is associated with a budget forecast, actual + // spend, or budget threshold. // // Amount is a required field - Amount *string `type:"string" required:"true"` + Amount *string `min:"1" type:"string" required:"true"` - // The unit of measurement used for the budget forecast, actual spend, or budget - // threshold, such as dollars or GB. + // The unit of measurement that is used for the budget forecast, actual spend, + // or budget threshold, such as dollars or GB. // // Unit is a required field Unit *string `min:"1" type:"string" required:"true"` @@ -2731,6 +3153,9 @@ func (s *Spend) Validate() error { if s.Amount == nil { invalidParams.Add(request.NewErrParamRequired("Amount")) } + if s.Amount != nil && len(*s.Amount) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Amount", 1)) + } if s.Unit == nil { invalidParams.Add(request.NewErrParamRequired("Unit")) } @@ -2757,7 +3182,7 @@ func (s *Spend) SetUnit(v string) *Spend { } // The subscriber to a budget notification. The subscriber consists of a subscription -// type and either an Amazon Simple Notification Service topic or an email address. +// type and either an Amazon SNS topic or an email address. // // For example, an email subscriber would have the following parameters: // @@ -2771,7 +3196,7 @@ type Subscriber struct { // an email. // // Address is a required field - Address *string `min:"1" type:"string" required:"true"` + Address *string `min:"1" type:"string" required:"true" sensitive:"true"` // The type of notification that AWS sends to a subscriber. // @@ -2820,9 +3245,9 @@ func (s *Subscriber) SetSubscriptionType(v string) *Subscriber { return s } -// The period of time covered by a budget. Has a start date and an end date. -// The start date must come before the end date. There are no restrictions on -// the end date. +// The period of time that is covered by a budget. The period has a start date +// and an end date. The start date must come before the end date. There are +// no restrictions on the end date. type TimePeriod struct { _ struct{} `type:"structure"` @@ -2835,9 +3260,9 @@ type TimePeriod struct { End *time.Time `type:"timestamp"` // The start date for a budget. If you created your budget and didn't specify - // a start date, AWS defaults to the start of your chosen time period (i.e. - // DAILY, MONTHLY, QUARTERLY, ANNUALLY). For example, if you created your budget - // on January 24th 2018, chose DAILY, and didn't set a start date, AWS set your + // a start date, AWS defaults to the start of your chosen time period (DAILY, + // MONTHLY, QUARTERLY, or ANNUALLY). For example, if you created your budget + // on January 24, 2018, chose DAILY, and didn't set a start date, AWS set your // start date to 01/24/18 00:00 UTC. If you chose MONTHLY, AWS set your start // date to 01/01/18 00:00 UTC. The defaults are the same for the AWS Billing // and Cost Management console and the API. @@ -2957,14 +3382,14 @@ type UpdateNotificationInput struct { // The name of the budget whose notification you want to update. // // BudgetName is a required field - BudgetName *string `type:"string" required:"true"` + BudgetName *string `min:"1" type:"string" required:"true"` // The updated notification to be associated with a budget. // // NewNotification is a required field NewNotification *Notification `type:"structure" required:"true"` - // The previous notification associated with a budget. + // The previous notification that is associated with a budget. // // OldNotification is a required field OldNotification *Notification `type:"structure" required:"true"` @@ -2992,6 +3417,9 @@ func (s *UpdateNotificationInput) Validate() error { if s.BudgetName == nil { invalidParams.Add(request.NewErrParamRequired("BudgetName")) } + if s.BudgetName != nil && len(*s.BudgetName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BudgetName", 1)) + } if s.NewNotification == nil { invalidParams.Add(request.NewErrParamRequired("NewNotification")) } @@ -3067,9 +3495,9 @@ type UpdateSubscriberInput struct { // The name of the budget whose subscriber you want to update. // // BudgetName is a required field - BudgetName *string `type:"string" required:"true"` + BudgetName *string `min:"1" type:"string" required:"true"` - // The updated subscriber associated with a budget notification. + // The updated subscriber that is associated with a budget notification. // // NewSubscriber is a required field NewSubscriber *Subscriber `type:"structure" required:"true"` @@ -3079,7 +3507,7 @@ type UpdateSubscriberInput struct { // Notification is a required field Notification *Notification `type:"structure" required:"true"` - // The previous subscriber associated with a budget notification. + // The previous subscriber that is associated with a budget notification. // // OldSubscriber is a required field OldSubscriber *Subscriber `type:"structure" required:"true"` @@ -3107,6 +3535,9 @@ func (s *UpdateSubscriberInput) Validate() error { if s.BudgetName == nil { invalidParams.Add(request.NewErrParamRequired("BudgetName")) } + if s.BudgetName != nil && len(*s.BudgetName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BudgetName", 1)) + } if s.NewSubscriber == nil { invalidParams.Add(request.NewErrParamRequired("NewSubscriber")) } @@ -3183,7 +3614,9 @@ func (s UpdateSubscriberOutput) GoString() string { return s.String() } -// The type of a budget. It should be COST, USAGE, or RI_UTILIZATION. +// The type of a budget. It must be one of the following types: +// +// COST, USAGE, RI_UTILIZATION, or RI_COVERAGE. const ( // BudgetTypeUsage is a BudgetType enum value BudgetTypeUsage = "USAGE" @@ -3198,8 +3631,10 @@ const ( BudgetTypeRiCoverage = "RI_COVERAGE" ) -// The comparison operator of a notification. Currently we support less than, -// equal to and greater than. +// The comparison operator of a notification. Currently the service supports +// the following operators: +// +// GREATER_THAN, LESS_THAN, EQUAL_TO const ( // ComparisonOperatorGreaterThan is a ComparisonOperator enum value ComparisonOperatorGreaterThan = "GREATER_THAN" @@ -3211,7 +3646,15 @@ const ( ComparisonOperatorEqualTo = "EQUAL_TO" ) -// The type of a notification. It should be ACTUAL or FORECASTED. +const ( + // NotificationStateOk is a NotificationState enum value + NotificationStateOk = "OK" + + // NotificationStateAlarm is a NotificationState enum value + NotificationStateAlarm = "ALARM" +) + +// The type of a notification. It must be ACTUAL or FORECASTED. const ( // NotificationTypeActual is a NotificationType enum value NotificationTypeActual = "ACTUAL" @@ -3238,7 +3681,7 @@ const ( ThresholdTypeAbsoluteValue = "ABSOLUTE_VALUE" ) -// The time unit of the budget. e.g. MONTHLY, QUARTERLY, etc. +// The time unit of the budget, such as MONTHLY or QUARTERLY. const ( // TimeUnitDaily is a TimeUnit enum value TimeUnitDaily = "DAILY" diff --git a/vendor/github.com/aws/aws-sdk-go/service/budgets/doc.go b/vendor/github.com/aws/aws-sdk-go/service/budgets/doc.go index a4c64c2cb3..918baf6684 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/budgets/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/budgets/doc.go @@ -3,33 +3,39 @@ // Package budgets provides the client and types for making API // requests to AWS Budgets. // -// Budgets enable you to plan your service usage, service costs, and your RI -// utilization. You can also track how close your plan is to your budgeted amount -// or to the free tier limits. Budgets provide you with a quick way to see your -// usage-to-date and current estimated charges from AWS and to see how much -// your predicted usage accrues in charges by the end of the month. Budgets -// also compare current estimates and charges to the amount that you indicated -// you want to use or spend and lets you see how much of your budget has been -// used. AWS updates your budget status several times a day. Budgets track your -// unblended costs, subscriptions, and refunds. You can create the following -// types of budgets: -// -// * Cost budgets allow you to say how much you want to spend on a service. -// -// * Usage budgets allow you to say how many hours you want to use for one -// or more services. -// -// * RI utilization budgets allow you to define a utilization threshold and -// receive alerts when RIs are tracking below that threshold. -// -// You can create up to 20,000 budgets per AWS master account. Your first two -// budgets are free of charge. Each additional budget costs $0.02 per day. You -// can set up optional notifications that warn you if you exceed, or are forecasted -// to exceed, your budgeted amount. You can have notifications sent to an Amazon -// SNS topic, to an email address, or to both. For more information, see Creating -// an Amazon SNS Topic for Budget Notifications (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/budgets-sns-policy.html). -// AWS Free Tier usage alerts via AWS Budgets are provided for you, and do not -// count toward your budget limits. +// The AWS Budgets API enables you to use AWS Budgets to plan your service usage, +// service costs, and instance reservations. The API reference provides descriptions, +// syntax, and usage examples for each of the actions and data types for AWS +// Budgets. +// +// Budgets provide you with a way to see the following information: +// +// * How close your plan is to your budgeted amount or to the free tier limits +// +// * Your usage-to-date, including how much you've used of your Reserved +// Instances (RIs) +// +// * Your current estimated charges from AWS, and how much your predicted +// usage will accrue in charges by the end of the month +// +// * How much of your budget has been used +// +// AWS updates your budget status several times a day. Budgets track your unblended +// costs, subscriptions, refunds, and RIs. You can create the following types +// of budgets: +// +// * Cost budgets - Plan how much you want to spend on a service. +// +// * Usage budgets - Plan how much you want to use one or more services. +// +// * RI utilization budgets - Define a utilization threshold, and receive +// alerts when your RI usage falls below that threshold. This lets you see +// if your RIs are unused or under-utilized. +// +// * RI coverage budgets - Define a coverage threshold, and receive alerts +// when the number of your instance hours that are covered by RIs fall below +// that threshold. This lets you see how much of your instance usage is covered +// by a reservation. // // Service Endpoint // @@ -37,8 +43,8 @@ // // * https://budgets.amazonaws.com // -// For information about costs associated with the AWS Budgets API, see AWS -// Cost Management Pricing (https://aws.amazon.com/aws-cost-management/pricing/). +// For information about costs that are associated with the AWS Budgets API, +// see AWS Cost Management Pricing (https://aws.amazon.com/aws-cost-management/pricing/). // // See budgets package documentation for more information. // https://docs.aws.amazon.com/sdk-for-go/api/service/budgets/ diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloud9/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloud9/api.go index 581b2f0b97..abc4ea4153 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloud9/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloud9/api.go @@ -8,6 +8,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) const opCreateEnvironmentEC2 = "CreateEnvironmentEC2" @@ -15,7 +17,7 @@ const opCreateEnvironmentEC2 = "CreateEnvironmentEC2" // CreateEnvironmentEC2Request generates a "aws/request.Request" representing the // client's request for the CreateEnvironmentEC2 operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -114,7 +116,7 @@ const opCreateEnvironmentMembership = "CreateEnvironmentMembership" // CreateEnvironmentMembershipRequest generates a "aws/request.Request" representing the // client's request for the CreateEnvironmentMembership operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -211,7 +213,7 @@ const opDeleteEnvironment = "DeleteEnvironment" // DeleteEnvironmentRequest generates a "aws/request.Request" representing the // client's request for the DeleteEnvironment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -245,6 +247,7 @@ func (c *Cloud9) DeleteEnvironmentRequest(input *DeleteEnvironmentInput) (req *r output = &DeleteEnvironmentOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -309,7 +312,7 @@ const opDeleteEnvironmentMembership = "DeleteEnvironmentMembership" // DeleteEnvironmentMembershipRequest generates a "aws/request.Request" representing the // client's request for the DeleteEnvironmentMembership operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -343,6 +346,7 @@ func (c *Cloud9) DeleteEnvironmentMembershipRequest(input *DeleteEnvironmentMemb output = &DeleteEnvironmentMembershipOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -406,7 +410,7 @@ const opDescribeEnvironmentMemberships = "DescribeEnvironmentMemberships" // DescribeEnvironmentMembershipsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEnvironmentMemberships operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -560,7 +564,7 @@ const opDescribeEnvironmentStatus = "DescribeEnvironmentStatus" // DescribeEnvironmentStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeEnvironmentStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -657,7 +661,7 @@ const opDescribeEnvironments = "DescribeEnvironments" // DescribeEnvironmentsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEnvironments operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -754,7 +758,7 @@ const opListEnvironments = "ListEnvironments" // ListEnvironmentsRequest generates a "aws/request.Request" representing the // client's request for the ListEnvironments operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -907,7 +911,7 @@ const opUpdateEnvironment = "UpdateEnvironment" // UpdateEnvironmentRequest generates a "aws/request.Request" representing the // client's request for the UpdateEnvironment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -941,6 +945,7 @@ func (c *Cloud9) UpdateEnvironmentRequest(input *UpdateEnvironmentInput) (req *r output = &UpdateEnvironmentOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1004,7 +1009,7 @@ const opUpdateEnvironmentMembership = "UpdateEnvironmentMembership" // UpdateEnvironmentMembershipRequest generates a "aws/request.Request" representing the // client's request for the UpdateEnvironmentMembership operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go index 9d55afb7ba..b033dc8c5f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go @@ -18,7 +18,7 @@ const opCancelUpdateStack = "CancelUpdateStack" // CancelUpdateStackRequest generates a "aws/request.Request" representing the // client's request for the CancelUpdateStack operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -52,8 +52,7 @@ func (c *CloudFormation) CancelUpdateStackRequest(input *CancelUpdateStackInput) output = &CancelUpdateStackOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -102,7 +101,7 @@ const opContinueUpdateRollback = "ContinueUpdateRollback" // ContinueUpdateRollbackRequest generates a "aws/request.Request" representing the // client's request for the ContinueUpdateRollback operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -136,6 +135,7 @@ func (c *CloudFormation) ContinueUpdateRollbackRequest(input *ContinueUpdateRoll output = &ContinueUpdateRollbackOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -193,7 +193,7 @@ const opCreateChangeSet = "CreateChangeSet" // CreateChangeSetRequest generates a "aws/request.Request" representing the // client's request for the CreateChangeSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -301,7 +301,7 @@ const opCreateStack = "CreateStack" // CreateStackRequest generates a "aws/request.Request" representing the // client's request for the CreateStack operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -394,7 +394,7 @@ const opCreateStackInstances = "CreateStackInstances" // CreateStackInstancesRequest generates a "aws/request.Request" representing the // client's request for the CreateStackInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -495,7 +495,7 @@ const opCreateStackSet = "CreateStackSet" // CreateStackSetRequest generates a "aws/request.Request" representing the // client's request for the CreateStackSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -582,7 +582,7 @@ const opDeleteChangeSet = "DeleteChangeSet" // DeleteChangeSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteChangeSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -616,6 +616,7 @@ func (c *CloudFormation) DeleteChangeSetRequest(input *DeleteChangeSetInput) (re output = &DeleteChangeSetOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -667,7 +668,7 @@ const opDeleteStack = "DeleteStack" // DeleteStackRequest generates a "aws/request.Request" representing the // client's request for the DeleteStack operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -701,8 +702,7 @@ func (c *CloudFormation) DeleteStackRequest(input *DeleteStackInput) (req *reque output = &DeleteStackOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -750,7 +750,7 @@ const opDeleteStackInstances = "DeleteStackInstances" // DeleteStackInstancesRequest generates a "aws/request.Request" representing the // client's request for the DeleteStackInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -843,7 +843,7 @@ const opDeleteStackSet = "DeleteStackSet" // DeleteStackSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteStackSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -877,6 +877,7 @@ func (c *CloudFormation) DeleteStackSetRequest(input *DeleteStackSetInput) (req output = &DeleteStackSetOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -930,7 +931,7 @@ const opDescribeAccountLimits = "DescribeAccountLimits" // DescribeAccountLimitsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAccountLimits operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1005,7 +1006,7 @@ const opDescribeChangeSet = "DescribeChangeSet" // DescribeChangeSetRequest generates a "aws/request.Request" representing the // client's request for the DescribeChangeSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1083,12 +1084,98 @@ func (c *CloudFormation) DescribeChangeSetWithContext(ctx aws.Context, input *De return out, req.Send() } +const opDescribeStackDriftDetectionStatus = "DescribeStackDriftDetectionStatus" + +// DescribeStackDriftDetectionStatusRequest generates a "aws/request.Request" representing the +// client's request for the DescribeStackDriftDetectionStatus 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 DescribeStackDriftDetectionStatus for more information on using the DescribeStackDriftDetectionStatus +// 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 DescribeStackDriftDetectionStatusRequest method. +// req, resp := client.DescribeStackDriftDetectionStatusRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DescribeStackDriftDetectionStatus +func (c *CloudFormation) DescribeStackDriftDetectionStatusRequest(input *DescribeStackDriftDetectionStatusInput) (req *request.Request, output *DescribeStackDriftDetectionStatusOutput) { + op := &request.Operation{ + Name: opDescribeStackDriftDetectionStatus, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeStackDriftDetectionStatusInput{} + } + + output = &DescribeStackDriftDetectionStatusOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeStackDriftDetectionStatus API operation for AWS CloudFormation. +// +// Returns information about a stack drift detection operation. A stack drift +// detection operation detects whether a stack's actual configuration differs, +// or has drifted, from it's expected configuration, as defined in the stack +// template and any values specified as template parameters. A stack is considered +// to have drifted if one or more of its resources have drifted. For more information +// on stack and resource drift, see Detecting Unregulated Configuration Changes +// to Stacks and Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html). +// +// Use DetectStackDrift to initiate a stack drift detection operation. DetectStackDrift +// returns a StackDriftDetectionId you can use to monitor the progress of the +// operation using DescribeStackDriftDetectionStatus. Once the drift detection +// operation has completed, use DescribeStackResourceDrifts to return drift +// information about the stack and its resources. +// +// 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 CloudFormation's +// API operation DescribeStackDriftDetectionStatus for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DescribeStackDriftDetectionStatus +func (c *CloudFormation) DescribeStackDriftDetectionStatus(input *DescribeStackDriftDetectionStatusInput) (*DescribeStackDriftDetectionStatusOutput, error) { + req, out := c.DescribeStackDriftDetectionStatusRequest(input) + return out, req.Send() +} + +// DescribeStackDriftDetectionStatusWithContext is the same as DescribeStackDriftDetectionStatus with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeStackDriftDetectionStatus 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 *CloudFormation) DescribeStackDriftDetectionStatusWithContext(ctx aws.Context, input *DescribeStackDriftDetectionStatusInput, opts ...request.Option) (*DescribeStackDriftDetectionStatusOutput, error) { + req, out := c.DescribeStackDriftDetectionStatusRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeStackEvents = "DescribeStackEvents" // DescribeStackEventsRequest generates a "aws/request.Request" representing the // client's request for the DescribeStackEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1223,7 +1310,7 @@ const opDescribeStackInstance = "DescribeStackInstance" // DescribeStackInstanceRequest generates a "aws/request.Request" representing the // client's request for the DescribeStackInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1309,7 +1396,7 @@ const opDescribeStackResource = "DescribeStackResource" // DescribeStackResourceRequest generates a "aws/request.Request" representing the // client's request for the DescribeStackResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1381,12 +1468,153 @@ func (c *CloudFormation) DescribeStackResourceWithContext(ctx aws.Context, input return out, req.Send() } +const opDescribeStackResourceDrifts = "DescribeStackResourceDrifts" + +// DescribeStackResourceDriftsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeStackResourceDrifts 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 DescribeStackResourceDrifts for more information on using the DescribeStackResourceDrifts +// 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 DescribeStackResourceDriftsRequest method. +// req, resp := client.DescribeStackResourceDriftsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DescribeStackResourceDrifts +func (c *CloudFormation) DescribeStackResourceDriftsRequest(input *DescribeStackResourceDriftsInput) (req *request.Request, output *DescribeStackResourceDriftsOutput) { + op := &request.Operation{ + Name: opDescribeStackResourceDrifts, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeStackResourceDriftsInput{} + } + + output = &DescribeStackResourceDriftsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeStackResourceDrifts API operation for AWS CloudFormation. +// +// Returns drift information for the resources that have been checked for drift +// in the specified stack. This includes actual and expected configuration values +// for resources where AWS CloudFormation detects configuration drift. +// +// For a given stack, there will be one StackResourceDrift for each stack resource +// that has been checked for drift. Resources that have not yet been checked +// for drift are not included. Resources that do not currently support drift +// detection are not checked, and so not included. For a list of resources that +// support drift detection, see Resources that Support Drift Detection (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift-resource-list.html). +// +// Use DetectStackResourceDrift to detect drift on individual resources, or +// DetectStackDrift to detect drift on all supported resources for a given stack. +// +// 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 CloudFormation's +// API operation DescribeStackResourceDrifts for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DescribeStackResourceDrifts +func (c *CloudFormation) DescribeStackResourceDrifts(input *DescribeStackResourceDriftsInput) (*DescribeStackResourceDriftsOutput, error) { + req, out := c.DescribeStackResourceDriftsRequest(input) + return out, req.Send() +} + +// DescribeStackResourceDriftsWithContext is the same as DescribeStackResourceDrifts with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeStackResourceDrifts 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 *CloudFormation) DescribeStackResourceDriftsWithContext(ctx aws.Context, input *DescribeStackResourceDriftsInput, opts ...request.Option) (*DescribeStackResourceDriftsOutput, error) { + req, out := c.DescribeStackResourceDriftsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeStackResourceDriftsPages iterates over the pages of a DescribeStackResourceDrifts operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeStackResourceDrifts 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 DescribeStackResourceDrifts operation. +// pageNum := 0 +// err := client.DescribeStackResourceDriftsPages(params, +// func(page *DescribeStackResourceDriftsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *CloudFormation) DescribeStackResourceDriftsPages(input *DescribeStackResourceDriftsInput, fn func(*DescribeStackResourceDriftsOutput, bool) bool) error { + return c.DescribeStackResourceDriftsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeStackResourceDriftsPagesWithContext same as DescribeStackResourceDriftsPages 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 *CloudFormation) DescribeStackResourceDriftsPagesWithContext(ctx aws.Context, input *DescribeStackResourceDriftsInput, fn func(*DescribeStackResourceDriftsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeStackResourceDriftsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeStackResourceDriftsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeStackResourceDriftsOutput), !p.HasNextPage()) + } + return p.Err() +} + const opDescribeStackResources = "DescribeStackResources" // DescribeStackResourcesRequest generates a "aws/request.Request" representing the // client's request for the DescribeStackResources operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1477,7 +1705,7 @@ const opDescribeStackSet = "DescribeStackSet" // DescribeStackSetRequest generates a "aws/request.Request" representing the // client's request for the DescribeStackSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1556,7 +1784,7 @@ const opDescribeStackSetOperation = "DescribeStackSetOperation" // DescribeStackSetOperationRequest generates a "aws/request.Request" representing the // client's request for the DescribeStackSetOperation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1638,7 +1866,7 @@ const opDescribeStacks = "DescribeStacks" // DescribeStacksRequest generates a "aws/request.Request" representing the // client's request for the DescribeStacks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1766,12 +1994,198 @@ func (c *CloudFormation) DescribeStacksPagesWithContext(ctx aws.Context, input * return p.Err() } +const opDetectStackDrift = "DetectStackDrift" + +// DetectStackDriftRequest generates a "aws/request.Request" representing the +// client's request for the DetectStackDrift 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 DetectStackDrift for more information on using the DetectStackDrift +// 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 DetectStackDriftRequest method. +// req, resp := client.DetectStackDriftRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DetectStackDrift +func (c *CloudFormation) DetectStackDriftRequest(input *DetectStackDriftInput) (req *request.Request, output *DetectStackDriftOutput) { + op := &request.Operation{ + Name: opDetectStackDrift, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DetectStackDriftInput{} + } + + output = &DetectStackDriftOutput{} + req = c.newRequest(op, input, output) + return +} + +// DetectStackDrift API operation for AWS CloudFormation. +// +// Detects whether a stack's actual configuration differs, or has drifted, from +// it's expected configuration, as defined in the stack template and any values +// specified as template parameters. For each resource in the stack that supports +// drift detection, AWS CloudFormation compares the actual configuration of +// the resource with its expected template configuration. Only resource properties +// explicitly defined in the stack template are checked for drift. A stack is +// considered to have drifted if one or more of its resources differ from their +// expected template configurations. For more information, see Detecting Unregulated +// Configuration Changes to Stacks and Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html). +// +// Use DetectStackDrift to detect drift on all supported resources for a given +// stack, or DetectStackResourceDrift to detect drift on individual resources. +// +// For a list of stack resources that currently support drift detection, see +// Resources that Support Drift Detection (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift-resource-list.html). +// +// DetectStackDrift can take up to several minutes, depending on the number +// of resources contained within the stack. Use DescribeStackDriftDetectionStatus +// to monitor the progress of a detect stack drift operation. Once the drift +// detection operation has completed, use DescribeStackResourceDrifts to return +// drift information about the stack and its resources. +// +// When detecting drift on a stack, AWS CloudFormation does not detect drift +// on any nested stacks belonging to that stack. Perform DetectStackDrift directly +// on the nested stack itself. +// +// 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 CloudFormation's +// API operation DetectStackDrift for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DetectStackDrift +func (c *CloudFormation) DetectStackDrift(input *DetectStackDriftInput) (*DetectStackDriftOutput, error) { + req, out := c.DetectStackDriftRequest(input) + return out, req.Send() +} + +// DetectStackDriftWithContext is the same as DetectStackDrift with the addition of +// the ability to pass a context and additional request options. +// +// See DetectStackDrift 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 *CloudFormation) DetectStackDriftWithContext(ctx aws.Context, input *DetectStackDriftInput, opts ...request.Option) (*DetectStackDriftOutput, error) { + req, out := c.DetectStackDriftRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDetectStackResourceDrift = "DetectStackResourceDrift" + +// DetectStackResourceDriftRequest generates a "aws/request.Request" representing the +// client's request for the DetectStackResourceDrift 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 DetectStackResourceDrift for more information on using the DetectStackResourceDrift +// 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 DetectStackResourceDriftRequest method. +// req, resp := client.DetectStackResourceDriftRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DetectStackResourceDrift +func (c *CloudFormation) DetectStackResourceDriftRequest(input *DetectStackResourceDriftInput) (req *request.Request, output *DetectStackResourceDriftOutput) { + op := &request.Operation{ + Name: opDetectStackResourceDrift, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DetectStackResourceDriftInput{} + } + + output = &DetectStackResourceDriftOutput{} + req = c.newRequest(op, input, output) + return +} + +// DetectStackResourceDrift API operation for AWS CloudFormation. +// +// Returns information about whether a resource's actual configuration differs, +// or has drifted, from it's expected configuration, as defined in the stack +// template and any values specified as template parameters. This information +// includes actual and expected property values for resources in which AWS CloudFormation +// detects drift. Only resource properties explicitly defined in the stack template +// are checked for drift. For more information about stack and resource drift, +// see Detecting Unregulated Configuration Changes to Stacks and Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html). +// +// Use DetectStackResourceDrift to detect drift on individual resources, or +// DetectStackDrift to detect drift on all resources in a given stack that support +// drift detection. +// +// Resources that do not currently support drift detection cannot be checked. +// For a list of resources that support drift detection, see Resources that +// Support Drift Detection (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift-resource-list.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. +// +// See the AWS API reference guide for AWS CloudFormation's +// API operation DetectStackResourceDrift for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/DetectStackResourceDrift +func (c *CloudFormation) DetectStackResourceDrift(input *DetectStackResourceDriftInput) (*DetectStackResourceDriftOutput, error) { + req, out := c.DetectStackResourceDriftRequest(input) + return out, req.Send() +} + +// DetectStackResourceDriftWithContext is the same as DetectStackResourceDrift with the addition of +// the ability to pass a context and additional request options. +// +// See DetectStackResourceDrift 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 *CloudFormation) DetectStackResourceDriftWithContext(ctx aws.Context, input *DetectStackResourceDriftInput, opts ...request.Option) (*DetectStackResourceDriftOutput, error) { + req, out := c.DetectStackResourceDriftRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opEstimateTemplateCost = "EstimateTemplateCost" // EstimateTemplateCostRequest generates a "aws/request.Request" representing the // client's request for the EstimateTemplateCost operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1847,7 +2261,7 @@ const opExecuteChangeSet = "ExecuteChangeSet" // ExecuteChangeSetRequest generates a "aws/request.Request" representing the // client's request for the ExecuteChangeSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1881,6 +2295,7 @@ func (c *CloudFormation) ExecuteChangeSetRequest(input *ExecuteChangeSetInput) ( output = &ExecuteChangeSetOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1950,7 +2365,7 @@ const opGetStackPolicy = "GetStackPolicy" // GetStackPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetStackPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2025,7 +2440,7 @@ const opGetTemplate = "GetTemplate" // GetTemplateRequest generates a "aws/request.Request" representing the // client's request for the GetTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2111,7 +2526,7 @@ const opGetTemplateSummary = "GetTemplateSummary" // GetTemplateSummaryRequest generates a "aws/request.Request" representing the // client's request for the GetTemplateSummary operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2201,7 +2616,7 @@ const opListChangeSets = "ListChangeSets" // ListChangeSetsRequest generates a "aws/request.Request" representing the // client's request for the ListChangeSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2277,7 +2692,7 @@ const opListExports = "ListExports" // ListExportsRequest generates a "aws/request.Request" representing the // client's request for the ListExports operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2413,7 +2828,7 @@ const opListImports = "ListImports" // ListImportsRequest generates a "aws/request.Request" representing the // client's request for the ListImports operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2549,7 +2964,7 @@ const opListStackInstances = "ListStackInstances" // ListStackInstancesRequest generates a "aws/request.Request" representing the // client's request for the ListStackInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2630,7 +3045,7 @@ const opListStackResources = "ListStackResources" // ListStackResourcesRequest generates a "aws/request.Request" representing the // client's request for the ListStackResources operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2763,7 +3178,7 @@ const opListStackSetOperationResults = "ListStackSetOperationResults" // ListStackSetOperationResultsRequest generates a "aws/request.Request" representing the // client's request for the ListStackSetOperationResults operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2845,7 +3260,7 @@ const opListStackSetOperations = "ListStackSetOperations" // ListStackSetOperationsRequest generates a "aws/request.Request" representing the // client's request for the ListStackSetOperations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2924,7 +3339,7 @@ const opListStackSets = "ListStackSets" // ListStackSetsRequest generates a "aws/request.Request" representing the // client's request for the ListStackSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2999,7 +3414,7 @@ const opListStacks = "ListStacks" // ListStacksRequest generates a "aws/request.Request" representing the // client's request for the ListStacks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3133,7 +3548,7 @@ const opSetStackPolicy = "SetStackPolicy" // SetStackPolicyRequest generates a "aws/request.Request" representing the // client's request for the SetStackPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3167,8 +3582,7 @@ func (c *CloudFormation) SetStackPolicyRequest(input *SetStackPolicyInput) (req output = &SetStackPolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3209,7 +3623,7 @@ const opSignalResource = "SignalResource" // SignalResourceRequest generates a "aws/request.Request" representing the // client's request for the SignalResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3243,8 +3657,7 @@ func (c *CloudFormation) SignalResourceRequest(input *SignalResourceInput) (req output = &SignalResourceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3290,7 +3703,7 @@ const opStopStackSetOperation = "StopStackSetOperation" // StopStackSetOperationRequest generates a "aws/request.Request" representing the // client's request for the StopStackSetOperation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3324,6 +3737,7 @@ func (c *CloudFormation) StopStackSetOperationRequest(input *StopStackSetOperati output = &StopStackSetOperationOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3375,7 +3789,7 @@ const opUpdateStack = "UpdateStack" // UpdateStackRequest generates a "aws/request.Request" representing the // client's request for the UpdateStack operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3466,7 +3880,7 @@ const opUpdateStackInstances = "UpdateStackInstances" // UpdateStackInstancesRequest generates a "aws/request.Request" representing the // client's request for the UpdateStackInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3579,7 +3993,7 @@ const opUpdateStackSet = "UpdateStackSet" // UpdateStackSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateStackSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3681,7 +4095,7 @@ const opUpdateTerminationProtection = "UpdateTerminationProtection" // UpdateTerminationProtectionRequest generates a "aws/request.Request" representing the // client's request for the UpdateTerminationProtection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3723,10 +4137,10 @@ func (c *CloudFormation) UpdateTerminationProtectionRequest(input *UpdateTermina // Updates termination protection for the specified stack. If a user attempts // to delete a stack with termination protection enabled, the operation fails // and the stack remains unchanged. For more information, see Protecting a Stack -// From Being Deleted (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html) +// From Being Deleted (AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html) // in the AWS CloudFormation User Guide. // -// For nested stacks (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html), +// For nested stacks (AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html), // termination protection is set on the root stack and cannot be changed directly // on the nested stack. // @@ -3763,7 +4177,7 @@ const opValidateTemplate = "ValidateTemplate" // ValidateTemplateRequest generates a "aws/request.Request" representing the // client's request for the ValidateTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4292,30 +4706,71 @@ func (s ContinueUpdateRollbackOutput) GoString() string { type CreateChangeSetInput struct { _ struct{} `type:"structure"` - // A list of values that you must specify before AWS CloudFormation can update - // certain stacks. Some stack templates might include resources that can affect - // permissions in your AWS account, for example, by creating new AWS Identity - // and Access Management (IAM) users. For those stacks, you must explicitly - // acknowledge their capabilities by specifying this parameter. - // - // The only valid values are CAPABILITY_IAM and CAPABILITY_NAMED_IAM. The following - // resources require you to specify this parameter: AWS::IAM::AccessKey (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html), - // AWS::IAM::Group (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html), - // AWS::IAM::InstanceProfile (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html), - // AWS::IAM::Policy (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html), - // AWS::IAM::Role (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html), - // AWS::IAM::User (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html), - // and AWS::IAM::UserToGroupAddition (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html). + // In some cases, you must explicity acknowledge that your stack template contains + // certain capabilities in order for AWS CloudFormation to create the stack. + // + // * CAPABILITY_IAM and CAPABILITY_NAMED_IAM + // + // Some stack templates might include resources that can affect permissions + // in your AWS account; for example, by creating new AWS Identity and Access + // Management (IAM) users. For those stacks, you must explicitly acknowledge + // this by specifying one of these capabilities. + // + // The following IAM resources require you to specify either the CAPABILITY_IAM + // or CAPABILITY_NAMED_IAM capability. + // + // If you have IAM resources, you can specify either capability. + // + // If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM. + // + // + // If you don't specify either of these capabilities, AWS CloudFormation returns + // an InsufficientCapabilities error. + // // If your stack template contains these resources, we recommend that you review - // all permissions associated with them and edit their permissions if necessary. + // all permissions associated with them and edit their permissions if necessary. // - // If you have IAM resources, you can specify either capability. If you have - // IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM. If - // you don't specify this parameter, this action returns an InsufficientCapabilities - // error. + // AWS::IAM::AccessKey (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html) + // + // AWS::IAM::Group (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html) + // + // AWS::IAM::InstanceProfile (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html) + // + // AWS::IAM::Policy (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html) + // + // AWS::IAM::Role (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html) + // + // AWS::IAM::User (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html) + // + // AWS::IAM::UserToGroupAddition (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html) // // For more information, see Acknowledging IAM Resources in AWS CloudFormation - // Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities). + // Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities). + // + // * CAPABILITY_AUTO_EXPAND + // + // Some template contain macros. Macros perform custom processing on templates; + // this can include simple actions like find-and-replace operations, all + // the way to extensive transformations of entire templates. Because of this, + // users typically create a change set from the processed template, so that + // they can review the changes resulting from the macros before actually + // creating the stack. If your stack template contains one or more macros, + // and you choose to create a stack directly from the processed template, + // without first reviewing the resulting changes in a change set, you must + // acknowledge this capability. This includes the AWS::Include (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html) + // and AWS::Serverless (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html) + // transforms, which are macros hosted by AWS CloudFormation. + // + // This capacity does not apply to creating change sets, and specifying it when + // creating change sets has no effect. + // + // Also, change sets do not currently support nested stacks. If you want to + // create a stack from a stack template that contains macros and nested stacks, + // you must create or update the stack directly from the template using the + // CreateStack or UpdateStack action, and specifying this capability. + // + // For more information on macros, see Using AWS CloudFormation Macros to Perform + // Custom Processing on Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html). Capabilities []*string `type:"list"` // The name of the change set. The name must be unique among all change sets @@ -4357,8 +4812,7 @@ type CreateChangeSetInput struct { NotificationARNs []*string `type:"list"` // A list of Parameter structures that specify input parameters for the change - // set. For more information, see the Parameter (http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_Parameter.html) - // data type. + // set. For more information, see the Parameter data type. Parameters []*Parameter `type:"list"` // The template resource types that you have permissions to work with if you @@ -4612,30 +5066,74 @@ func (s *CreateChangeSetOutput) SetStackId(v string) *CreateChangeSetOutput { type CreateStackInput struct { _ struct{} `type:"structure"` - // A list of values that you must specify before AWS CloudFormation can create - // certain stacks. Some stack templates might include resources that can affect - // permissions in your AWS account, for example, by creating new AWS Identity - // and Access Management (IAM) users. For those stacks, you must explicitly - // acknowledge their capabilities by specifying this parameter. - // - // The only valid values are CAPABILITY_IAM and CAPABILITY_NAMED_IAM. The following - // resources require you to specify this parameter: AWS::IAM::AccessKey (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html), - // AWS::IAM::Group (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html), - // AWS::IAM::InstanceProfile (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html), - // AWS::IAM::Policy (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html), - // AWS::IAM::Role (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html), - // AWS::IAM::User (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html), - // and AWS::IAM::UserToGroupAddition (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html). + // In some cases, you must explicity acknowledge that your stack template contains + // certain capabilities in order for AWS CloudFormation to create the stack. + // + // * CAPABILITY_IAM and CAPABILITY_NAMED_IAM + // + // Some stack templates might include resources that can affect permissions + // in your AWS account; for example, by creating new AWS Identity and Access + // Management (IAM) users. For those stacks, you must explicitly acknowledge + // this by specifying one of these capabilities. + // + // The following IAM resources require you to specify either the CAPABILITY_IAM + // or CAPABILITY_NAMED_IAM capability. + // + // If you have IAM resources, you can specify either capability. + // + // If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM. + // + // + // If you don't specify either of these capabilities, AWS CloudFormation returns + // an InsufficientCapabilities error. + // // If your stack template contains these resources, we recommend that you review - // all permissions associated with them and edit their permissions if necessary. + // all permissions associated with them and edit their permissions if necessary. // - // If you have IAM resources, you can specify either capability. If you have - // IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM. If - // you don't specify this parameter, this action returns an InsufficientCapabilities - // error. + // AWS::IAM::AccessKey (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html) + // + // AWS::IAM::Group (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html) + // + // AWS::IAM::InstanceProfile (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html) + // + // AWS::IAM::Policy (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html) + // + // AWS::IAM::Role (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html) + // + // AWS::IAM::User (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html) + // + // AWS::IAM::UserToGroupAddition (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html) // // For more information, see Acknowledging IAM Resources in AWS CloudFormation - // Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities). + // Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities). + // + // * CAPABILITY_AUTO_EXPAND + // + // Some template contain macros. Macros perform custom processing on templates; + // this can include simple actions like find-and-replace operations, all + // the way to extensive transformations of entire templates. Because of this, + // users typically create a change set from the processed template, so that + // they can review the changes resulting from the macros before actually + // creating the stack. If your stack template contains one or more macros, + // and you choose to create a stack directly from the processed template, + // without first reviewing the resulting changes in a change set, you must + // acknowledge this capability. This includes the AWS::Include (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html) + // and AWS::Serverless (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html) + // transforms, which are macros hosted by AWS CloudFormation. + // + // Change sets do not currently support nested stacks. If you want to create + // a stack from a stack template that contains macros and nested stacks, + // you must create the stack directly from the template using this capability. + // + // You should only create stacks directly from a stack template that contains + // macros if you know what processing the macro performs. + // + // Each macro relies on an underlying Lambda service function for processing + // stack templates. Be aware that the Lambda function owner can update the + // function operation without AWS CloudFormation being notified. + // + // For more information, see Using AWS CloudFormation Macros to Perform Custom + // Processing on Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html). Capabilities []*string `type:"list"` // A unique identifier for this CreateStack request. Specify this token if you @@ -5139,40 +5637,62 @@ type CreateStackSetInput struct { // in the AWS CloudFormation User Guide. AdministrationRoleARN *string `min:"20" type:"string"` - // A list of values that you must specify before AWS CloudFormation can create - // certain stack sets. Some stack set templates might include resources that - // can affect permissions in your AWS account—for example, by creating new AWS - // Identity and Access Management (IAM) users. For those stack sets, you must - // explicitly acknowledge their capabilities by specifying this parameter. + // In some cases, you must explicity acknowledge that your stack set template + // contains certain capabilities in order for AWS CloudFormation to create the + // stack set and related stack instances. // - // The only valid values are CAPABILITY_IAM and CAPABILITY_NAMED_IAM. The following - // resources require you to specify this parameter: + // * CAPABILITY_IAM and CAPABILITY_NAMED_IAM // - // * AWS::IAM::AccessKey + // Some stack templates might include resources that can affect permissions + // in your AWS account; for example, by creating new AWS Identity and Access + // Management (IAM) users. For those stack sets, you must explicitly acknowledge + // this by specifying one of these capabilities. // - // * AWS::IAM::Group + // The following IAM resources require you to specify either the CAPABILITY_IAM + // or CAPABILITY_NAMED_IAM capability. // - // * AWS::IAM::InstanceProfile + // If you have IAM resources, you can specify either capability. // - // * AWS::IAM::Policy + // If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM. // - // * AWS::IAM::Role // - // * AWS::IAM::User - // - // * AWS::IAM::UserToGroupAddition + // If you don't specify either of these capabilities, AWS CloudFormation returns + // an InsufficientCapabilities error. // // If your stack template contains these resources, we recommend that you review - // all permissions that are associated with them and edit their permissions - // if necessary. + // all permissions associated with them and edit their permissions if necessary. // - // If you have IAM resources, you can specify either capability. If you have - // IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM. If - // you don't specify this parameter, this action returns an InsufficientCapabilities - // error. + // AWS::IAM::AccessKey (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html) + // + // AWS::IAM::Group (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html) + // + // AWS::IAM::InstanceProfile (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html) + // + // AWS::IAM::Policy (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html) + // + // AWS::IAM::Role (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html) + // + // AWS::IAM::User (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html) + // + // AWS::IAM::UserToGroupAddition (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html) // // For more information, see Acknowledging IAM Resources in AWS CloudFormation - // Templates. (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities) + // Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities). + // + // * CAPABILITY_AUTO_EXPAND + // + // Some templates contain macros. If your stack template contains one or more + // macros, and you choose to create a stack directly from the processed template, + // without first reviewing the resulting changes in a change set, you must + // acknowledge this capability. For more information, see Using AWS CloudFormation + // Macros to Perform Custom Processing on Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html). + // + // Stack sets do not currently support macros in stack templates. (This includes + // the AWS::Include (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html) + // and AWS::Serverless (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html) + // transforms, which are macros hosted by AWS CloudFormation.) Even if you + // specify this capability, if you include a macro in your template the stack + // set operation will fail. Capabilities []*string `type:"list"` // A unique identifier for this CreateStackSet request. Specify this token if @@ -6066,6 +6586,169 @@ func (s *DescribeChangeSetOutput) SetTags(v []*Tag) *DescribeChangeSetOutput { return s } +type DescribeStackDriftDetectionStatusInput struct { + _ struct{} `type:"structure"` + + // The ID of the drift detection results of this operation. + // + // AWS CloudFormation generates new results, with a new drift detection ID, + // each time this operation is run. However, the number of drift results AWS + // CloudFormation retains for any given stack, and for how long, may vary. + // + // StackDriftDetectionId is a required field + StackDriftDetectionId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeStackDriftDetectionStatusInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeStackDriftDetectionStatusInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeStackDriftDetectionStatusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeStackDriftDetectionStatusInput"} + if s.StackDriftDetectionId == nil { + invalidParams.Add(request.NewErrParamRequired("StackDriftDetectionId")) + } + if s.StackDriftDetectionId != nil && len(*s.StackDriftDetectionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StackDriftDetectionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetStackDriftDetectionId sets the StackDriftDetectionId field's value. +func (s *DescribeStackDriftDetectionStatusInput) SetStackDriftDetectionId(v string) *DescribeStackDriftDetectionStatusInput { + s.StackDriftDetectionId = &v + return s +} + +type DescribeStackDriftDetectionStatusOutput struct { + _ struct{} `type:"structure"` + + // The status of the stack drift detection operation. + // + // * DETECTION_COMPLETE: The stack drift detection operation has successfully + // completed for all resources in the stack that support drift detection. + // (Resources that do not currently support stack detection remain unchecked.) + // + // If you specified logical resource IDs for AWS CloudFormation to use as a + // filter for the stack drift detection operation, only the resources with + // those logical IDs are checked for drift. + // + // * DETECTION_FAILED: The stack drift detection operation has failed for + // at least one resource in the stack. Results will be available for resources + // on which AWS CloudFormation successfully completed drift detection. + // + // * DETECTION_IN_PROGRESS: The stack drift detection operation is currently + // in progress. + // + // DetectionStatus is a required field + DetectionStatus *string `type:"string" required:"true" enum:"StackDriftDetectionStatus"` + + // The reason the stack drift detection operation has its current status. + DetectionStatusReason *string `type:"string"` + + // Total number of stack resources that have drifted. This is NULL until the + // drift detection operation reaches a status of DETECTION_COMPLETE. This value + // will be 0 for stacks whose drift status is IN_SYNC. + DriftedStackResourceCount *int64 `type:"integer"` + + // The ID of the drift detection results of this operation. + // + // AWS CloudFormation generates new results, with a new drift detection ID, + // each time this operation is run. However, the number of reports AWS CloudFormation + // retains for any given stack, and for how long, may vary. + // + // StackDriftDetectionId is a required field + StackDriftDetectionId *string `min:"1" type:"string" required:"true"` + + // Status of the stack's actual configuration compared to its expected configuration. + // + // * DRIFTED: The stack differs from its expected template configuration. + // A stack is considered to have drifted if one or more of its resources + // have drifted. + // + // * NOT_CHECKED: AWS CloudFormation has not checked if the stack differs + // from its expected template configuration. + // + // * IN_SYNC: The stack's actual configuration matches its expected template + // configuration. + // + // * UNKNOWN: This value is reserved for future use. + StackDriftStatus *string `type:"string" enum:"StackDriftStatus"` + + // The ID of the stack. + // + // StackId is a required field + StackId *string `type:"string" required:"true"` + + // Time at which the stack drift detection operation was initiated. + // + // Timestamp is a required field + Timestamp *time.Time `type:"timestamp" required:"true"` +} + +// String returns the string representation +func (s DescribeStackDriftDetectionStatusOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeStackDriftDetectionStatusOutput) GoString() string { + return s.String() +} + +// SetDetectionStatus sets the DetectionStatus field's value. +func (s *DescribeStackDriftDetectionStatusOutput) SetDetectionStatus(v string) *DescribeStackDriftDetectionStatusOutput { + s.DetectionStatus = &v + return s +} + +// SetDetectionStatusReason sets the DetectionStatusReason field's value. +func (s *DescribeStackDriftDetectionStatusOutput) SetDetectionStatusReason(v string) *DescribeStackDriftDetectionStatusOutput { + s.DetectionStatusReason = &v + return s +} + +// SetDriftedStackResourceCount sets the DriftedStackResourceCount field's value. +func (s *DescribeStackDriftDetectionStatusOutput) SetDriftedStackResourceCount(v int64) *DescribeStackDriftDetectionStatusOutput { + s.DriftedStackResourceCount = &v + return s +} + +// SetStackDriftDetectionId sets the StackDriftDetectionId field's value. +func (s *DescribeStackDriftDetectionStatusOutput) SetStackDriftDetectionId(v string) *DescribeStackDriftDetectionStatusOutput { + s.StackDriftDetectionId = &v + return s +} + +// SetStackDriftStatus sets the StackDriftStatus field's value. +func (s *DescribeStackDriftDetectionStatusOutput) SetStackDriftStatus(v string) *DescribeStackDriftDetectionStatusOutput { + s.StackDriftStatus = &v + return s +} + +// SetStackId sets the StackId field's value. +func (s *DescribeStackDriftDetectionStatusOutput) SetStackId(v string) *DescribeStackDriftDetectionStatusOutput { + s.StackId = &v + return s +} + +// SetTimestamp sets the Timestamp field's value. +func (s *DescribeStackDriftDetectionStatusOutput) SetTimestamp(v time.Time) *DescribeStackDriftDetectionStatusOutput { + s.Timestamp = &v + return s +} + // The input for DescribeStackEvents action. type DescribeStackEventsInput struct { _ struct{} `type:"structure"` @@ -6157,44 +6840,153 @@ func (s *DescribeStackEventsOutput) SetStackEvents(v []*StackEvent) *DescribeSta type DescribeStackInstanceInput struct { _ struct{} `type:"structure"` - // The ID of an AWS account that's associated with this stack instance. + // The ID of an AWS account that's associated with this stack instance. + // + // StackInstanceAccount is a required field + StackInstanceAccount *string `type:"string" required:"true"` + + // The name of a region that's associated with this stack instance. + // + // StackInstanceRegion is a required field + StackInstanceRegion *string `type:"string" required:"true"` + + // The name or the unique stack ID of the stack set that you want to get stack + // instance information for. + // + // StackSetName is a required field + StackSetName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeStackInstanceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeStackInstanceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeStackInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeStackInstanceInput"} + if s.StackInstanceAccount == nil { + invalidParams.Add(request.NewErrParamRequired("StackInstanceAccount")) + } + if s.StackInstanceRegion == nil { + invalidParams.Add(request.NewErrParamRequired("StackInstanceRegion")) + } + if s.StackSetName == nil { + invalidParams.Add(request.NewErrParamRequired("StackSetName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetStackInstanceAccount sets the StackInstanceAccount field's value. +func (s *DescribeStackInstanceInput) SetStackInstanceAccount(v string) *DescribeStackInstanceInput { + s.StackInstanceAccount = &v + return s +} + +// SetStackInstanceRegion sets the StackInstanceRegion field's value. +func (s *DescribeStackInstanceInput) SetStackInstanceRegion(v string) *DescribeStackInstanceInput { + s.StackInstanceRegion = &v + return s +} + +// SetStackSetName sets the StackSetName field's value. +func (s *DescribeStackInstanceInput) SetStackSetName(v string) *DescribeStackInstanceInput { + s.StackSetName = &v + return s +} + +type DescribeStackInstanceOutput struct { + _ struct{} `type:"structure"` + + // The stack instance that matches the specified request parameters. + StackInstance *StackInstance `type:"structure"` +} + +// String returns the string representation +func (s DescribeStackInstanceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeStackInstanceOutput) GoString() string { + return s.String() +} + +// SetStackInstance sets the StackInstance field's value. +func (s *DescribeStackInstanceOutput) SetStackInstance(v *StackInstance) *DescribeStackInstanceOutput { + s.StackInstance = v + return s +} + +type DescribeStackResourceDriftsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of results to be returned with a single call. If the number + // of available results exceeds this maximum, the response includes a NextToken + // value that you can assign to the NextToken request parameter to get the next + // set of results. + MaxResults *int64 `min:"1" type:"integer"` + + // A string that identifies the next page of stack resource drift results. + NextToken *string `min:"1" type:"string"` + + // The name of the stack for which you want drift information. // - // StackInstanceAccount is a required field - StackInstanceAccount *string `type:"string" required:"true"` + // StackName is a required field + StackName *string `min:"1" type:"string" required:"true"` - // The name of a region that's associated with this stack instance. + // The resource drift status values to use as filters for the resource drift + // results returned. // - // StackInstanceRegion is a required field - StackInstanceRegion *string `type:"string" required:"true"` - - // The name or the unique stack ID of the stack set that you want to get stack - // instance information for. + // * DELETED: The resource differs from its expected template configuration + // in that the resource has been deleted. // - // StackSetName is a required field - StackSetName *string `type:"string" required:"true"` + // * MODIFIED: One or more resource properties differ from their expected + // template values. + // + // * IN_SYNC: The resources's actual configuration matches its expected template + // configuration. + // + // * NOT_CHECKED: AWS CloudFormation does not currently return this value. + StackResourceDriftStatusFilters []*string `min:"1" type:"list"` } // String returns the string representation -func (s DescribeStackInstanceInput) String() string { +func (s DescribeStackResourceDriftsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeStackInstanceInput) GoString() string { +func (s DescribeStackResourceDriftsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeStackInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeStackInstanceInput"} - if s.StackInstanceAccount == nil { - invalidParams.Add(request.NewErrParamRequired("StackInstanceAccount")) +func (s *DescribeStackResourceDriftsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeStackResourceDriftsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } - if s.StackInstanceRegion == nil { - invalidParams.Add(request.NewErrParamRequired("StackInstanceRegion")) + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) } - if s.StackSetName == nil { - invalidParams.Add(request.NewErrParamRequired("StackSetName")) + if s.StackName == nil { + invalidParams.Add(request.NewErrParamRequired("StackName")) + } + if s.StackName != nil && len(*s.StackName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StackName", 1)) + } + if s.StackResourceDriftStatusFilters != nil && len(s.StackResourceDriftStatusFilters) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StackResourceDriftStatusFilters", 1)) } if invalidParams.Len() > 0 { @@ -6203,44 +6995,72 @@ func (s *DescribeStackInstanceInput) Validate() error { return nil } -// SetStackInstanceAccount sets the StackInstanceAccount field's value. -func (s *DescribeStackInstanceInput) SetStackInstanceAccount(v string) *DescribeStackInstanceInput { - s.StackInstanceAccount = &v +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeStackResourceDriftsInput) SetMaxResults(v int64) *DescribeStackResourceDriftsInput { + s.MaxResults = &v return s } -// SetStackInstanceRegion sets the StackInstanceRegion field's value. -func (s *DescribeStackInstanceInput) SetStackInstanceRegion(v string) *DescribeStackInstanceInput { - s.StackInstanceRegion = &v +// SetNextToken sets the NextToken field's value. +func (s *DescribeStackResourceDriftsInput) SetNextToken(v string) *DescribeStackResourceDriftsInput { + s.NextToken = &v return s } -// SetStackSetName sets the StackSetName field's value. -func (s *DescribeStackInstanceInput) SetStackSetName(v string) *DescribeStackInstanceInput { - s.StackSetName = &v +// SetStackName sets the StackName field's value. +func (s *DescribeStackResourceDriftsInput) SetStackName(v string) *DescribeStackResourceDriftsInput { + s.StackName = &v return s } -type DescribeStackInstanceOutput struct { +// SetStackResourceDriftStatusFilters sets the StackResourceDriftStatusFilters field's value. +func (s *DescribeStackResourceDriftsInput) SetStackResourceDriftStatusFilters(v []*string) *DescribeStackResourceDriftsInput { + s.StackResourceDriftStatusFilters = v + return s +} + +type DescribeStackResourceDriftsOutput struct { _ struct{} `type:"structure"` - // The stack instance that matches the specified request parameters. - StackInstance *StackInstance `type:"structure"` + // If the request doesn't return all of the remaining results, NextToken is + // set to a token. To retrieve the next set of results, call DescribeStackResourceDrifts + // again and assign that token to the request object's NextToken parameter. + // If the request returns all results, NextToken is set to null. + NextToken *string `min:"1" type:"string"` + + // Drift information for the resources that have been checked for drift in the + // specified stack. This includes actual and expected configuration values for + // resources where AWS CloudFormation detects drift. + // + // For a given stack, there will be one StackResourceDrift for each stack resource + // that has been checked for drift. Resources that have not yet been checked + // for drift are not included. Resources that do not currently support drift + // detection are not checked, and so not included. For a list of resources that + // support drift detection, see Resources that Support Drift Detection (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift-resource-list.html). + // + // StackResourceDrifts is a required field + StackResourceDrifts []*StackResourceDrift `type:"list" required:"true"` } // String returns the string representation -func (s DescribeStackInstanceOutput) String() string { +func (s DescribeStackResourceDriftsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeStackInstanceOutput) GoString() string { +func (s DescribeStackResourceDriftsOutput) GoString() string { return s.String() } -// SetStackInstance sets the StackInstance field's value. -func (s *DescribeStackInstanceOutput) SetStackInstance(v *StackInstance) *DescribeStackInstanceOutput { - s.StackInstance = v +// SetNextToken sets the NextToken field's value. +func (s *DescribeStackResourceDriftsOutput) SetNextToken(v string) *DescribeStackResourceDriftsOutput { + s.NextToken = &v + return s +} + +// SetStackResourceDrifts sets the StackResourceDrifts field's value. +func (s *DescribeStackResourceDriftsOutput) SetStackResourceDrifts(v []*StackResourceDrift) *DescribeStackResourceDriftsOutput { + s.StackResourceDrifts = v return s } @@ -6649,6 +7469,170 @@ func (s *DescribeStacksOutput) SetStacks(v []*Stack) *DescribeStacksOutput { return s } +type DetectStackDriftInput struct { + _ struct{} `type:"structure"` + + // The logical names of any resources you want to use as filters. + LogicalResourceIds []*string `min:"1" type:"list"` + + // The name of the stack for which you want to detect drift. + // + // StackName is a required field + StackName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DetectStackDriftInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetectStackDriftInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DetectStackDriftInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DetectStackDriftInput"} + if s.LogicalResourceIds != nil && len(s.LogicalResourceIds) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogicalResourceIds", 1)) + } + if s.StackName == nil { + invalidParams.Add(request.NewErrParamRequired("StackName")) + } + if s.StackName != nil && len(*s.StackName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StackName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLogicalResourceIds sets the LogicalResourceIds field's value. +func (s *DetectStackDriftInput) SetLogicalResourceIds(v []*string) *DetectStackDriftInput { + s.LogicalResourceIds = v + return s +} + +// SetStackName sets the StackName field's value. +func (s *DetectStackDriftInput) SetStackName(v string) *DetectStackDriftInput { + s.StackName = &v + return s +} + +type DetectStackDriftOutput struct { + _ struct{} `type:"structure"` + + // The ID of the drift detection results of this operation. + // + // AWS CloudFormation generates new results, with a new drift detection ID, + // each time this operation is run. However, the number of drift results AWS + // CloudFormation retains for any given stack, and for how long, may vary. + // + // StackDriftDetectionId is a required field + StackDriftDetectionId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DetectStackDriftOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetectStackDriftOutput) GoString() string { + return s.String() +} + +// SetStackDriftDetectionId sets the StackDriftDetectionId field's value. +func (s *DetectStackDriftOutput) SetStackDriftDetectionId(v string) *DetectStackDriftOutput { + s.StackDriftDetectionId = &v + return s +} + +type DetectStackResourceDriftInput struct { + _ struct{} `type:"structure"` + + // The logical name of the resource for which to return drift information. + // + // LogicalResourceId is a required field + LogicalResourceId *string `type:"string" required:"true"` + + // The name of the stack to which the resource belongs. + // + // StackName is a required field + StackName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DetectStackResourceDriftInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetectStackResourceDriftInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DetectStackResourceDriftInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DetectStackResourceDriftInput"} + if s.LogicalResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("LogicalResourceId")) + } + if s.StackName == nil { + invalidParams.Add(request.NewErrParamRequired("StackName")) + } + if s.StackName != nil && len(*s.StackName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StackName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLogicalResourceId sets the LogicalResourceId field's value. +func (s *DetectStackResourceDriftInput) SetLogicalResourceId(v string) *DetectStackResourceDriftInput { + s.LogicalResourceId = &v + return s +} + +// SetStackName sets the StackName field's value. +func (s *DetectStackResourceDriftInput) SetStackName(v string) *DetectStackResourceDriftInput { + s.StackName = &v + return s +} + +type DetectStackResourceDriftOutput struct { + _ struct{} `type:"structure"` + + // Information about whether the resource's actual configuration has drifted + // from its expected template configuration, including actual and expected property + // values and any differences detected. + // + // StackResourceDrift is a required field + StackResourceDrift *StackResourceDrift `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DetectStackResourceDriftOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetectStackResourceDriftOutput) GoString() string { + return s.String() +} + +// SetStackResourceDrift sets the StackResourceDrift field's value. +func (s *DetectStackResourceDriftOutput) SetStackResourceDrift(v *StackResourceDrift) *DetectStackResourceDriftOutput { + s.StackResourceDrift = v + return s +} + // The input for an EstimateTemplateCost action. type EstimateTemplateCostInput struct { _ struct{} `type:"structure"` @@ -8318,9 +9302,123 @@ func (s *ParameterDeclaration) SetParameterKey(v string) *ParameterDeclaration { return s } -// SetParameterType sets the ParameterType field's value. -func (s *ParameterDeclaration) SetParameterType(v string) *ParameterDeclaration { - s.ParameterType = &v +// SetParameterType sets the ParameterType field's value. +func (s *ParameterDeclaration) SetParameterType(v string) *ParameterDeclaration { + s.ParameterType = &v + return s +} + +// Context information that enables AWS CloudFormation to uniquely identify +// a resource. AWS CloudFormation uses context key-value pairs in cases where +// a resource's logical and physical IDs are not enough to uniquely identify +// that resource. Each context key-value pair specifies a resource that contains +// the targeted resource. +type PhysicalResourceIdContextKeyValuePair struct { + _ struct{} `type:"structure"` + + // The resource context key. + // + // Key is a required field + Key *string `type:"string" required:"true"` + + // The resource context value. + // + // Value is a required field + Value *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s PhysicalResourceIdContextKeyValuePair) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PhysicalResourceIdContextKeyValuePair) GoString() string { + return s.String() +} + +// SetKey sets the Key field's value. +func (s *PhysicalResourceIdContextKeyValuePair) SetKey(v string) *PhysicalResourceIdContextKeyValuePair { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *PhysicalResourceIdContextKeyValuePair) SetValue(v string) *PhysicalResourceIdContextKeyValuePair { + s.Value = &v + return s +} + +// Information about a resource property whose actual value differs from its +// expected value, as defined in the stack template and any values specified +// as template parameters. These will be present only for resources whose StackResourceDriftStatus +// is MODIFIED. For more information, see Detecting Unregulated Configuration +// Changes to Stacks and Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html). +type PropertyDifference struct { + _ struct{} `type:"structure"` + + // The actual property value of the resource property. + // + // ActualValue is a required field + ActualValue *string `type:"string" required:"true"` + + // The type of property difference. + // + // * ADD: A value has been added to a resource property that is an array + // or list data type. + // + // * REMOVE: The property has been removed from the current resource configuration. + // + // * NOT_EQUAL: The current property value differs from its expected value + // (as defined in the stack template and any values specified as template + // parameters). + // + // DifferenceType is a required field + DifferenceType *string `type:"string" required:"true" enum:"DifferenceType"` + + // The expected property value of the resource property, as defined in the stack + // template and any values specified as template parameters. + // + // ExpectedValue is a required field + ExpectedValue *string `type:"string" required:"true"` + + // The fully-qualified path to the resource property. + // + // PropertyPath is a required field + PropertyPath *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s PropertyDifference) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PropertyDifference) GoString() string { + return s.String() +} + +// SetActualValue sets the ActualValue field's value. +func (s *PropertyDifference) SetActualValue(v string) *PropertyDifference { + s.ActualValue = &v + return s +} + +// SetDifferenceType sets the DifferenceType field's value. +func (s *PropertyDifference) SetDifferenceType(v string) *PropertyDifference { + s.DifferenceType = &v + return s +} + +// SetExpectedValue sets the ExpectedValue field's value. +func (s *PropertyDifference) SetExpectedValue(v string) *PropertyDifference { + s.ExpectedValue = &v + return s +} + +// SetPropertyPath sets the PropertyPath field's value. +func (s *PropertyDifference) SetPropertyPath(v string) *PropertyDifference { + s.PropertyPath = &v return s } @@ -8937,6 +10035,12 @@ type Stack struct { // * false: enable rollback DisableRollback *bool `type:"boolean"` + // Information on whether a stack's actual configuration differs, or has drifted, + // from it's expected configuration, as defined in the stack template and any + // values specified as template parameters. For more information, see Detecting + // Unregulated Configuration Changes to Stacks and Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html). + DriftInformation *StackDriftInformation `type:"structure"` + // Whether termination protection is enabled for the stack. // // For nested stacks (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html), @@ -9052,6 +10156,12 @@ func (s *Stack) SetDisableRollback(v bool) *Stack { return s } +// SetDriftInformation sets the DriftInformation field's value. +func (s *Stack) SetDriftInformation(v *StackDriftInformation) *Stack { + s.DriftInformation = v + return s +} + // SetEnableTerminationProtection sets the EnableTerminationProtection field's value. func (s *Stack) SetEnableTerminationProtection(v bool) *Stack { s.EnableTerminationProtection = &v @@ -9142,6 +10252,110 @@ func (s *Stack) SetTimeoutInMinutes(v int64) *Stack { return s } +// Contains information about whether the stack's actual configuration differs, +// or has drifted, from its expected configuration, as defined in the stack +// template and any values specified as template parameters. A stack is considered +// to have drifted if one or more of its resources have drifted. +type StackDriftInformation struct { + _ struct{} `type:"structure"` + + // Most recent time when a drift detection operation was initiated on the stack, + // or any of its individual resources that support drift detection. + LastCheckTimestamp *time.Time `type:"timestamp"` + + // Status of the stack's actual configuration compared to its expected template + // configuration. + // + // * DRIFTED: The stack differs from its expected template configuration. + // A stack is considered to have drifted if one or more of its resources + // have drifted. + // + // * NOT_CHECKED: AWS CloudFormation has not checked if the stack differs + // from its expected template configuration. + // + // * IN_SYNC: The stack's actual configuration matches its expected template + // configuration. + // + // * UNKNOWN: This value is reserved for future use. + // + // StackDriftStatus is a required field + StackDriftStatus *string `type:"string" required:"true" enum:"StackDriftStatus"` +} + +// String returns the string representation +func (s StackDriftInformation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StackDriftInformation) GoString() string { + return s.String() +} + +// SetLastCheckTimestamp sets the LastCheckTimestamp field's value. +func (s *StackDriftInformation) SetLastCheckTimestamp(v time.Time) *StackDriftInformation { + s.LastCheckTimestamp = &v + return s +} + +// SetStackDriftStatus sets the StackDriftStatus field's value. +func (s *StackDriftInformation) SetStackDriftStatus(v string) *StackDriftInformation { + s.StackDriftStatus = &v + return s +} + +// Contains information about whether the stack's actual configuration differs, +// or has drifted, from its expected configuration, as defined in the stack +// template and any values specified as template parameters. A stack is considered +// to have drifted if one or more of its resources have drifted. +type StackDriftInformationSummary struct { + _ struct{} `type:"structure"` + + // Most recent time when a drift detection operation was initiated on the stack, + // or any of its individual resources that support drift detection. + LastCheckTimestamp *time.Time `type:"timestamp"` + + // Status of the stack's actual configuration compared to its expected template + // configuration. + // + // * DRIFTED: The stack differs from its expected template configuration. + // A stack is considered to have drifted if one or more of its resources + // have drifted. + // + // * NOT_CHECKED: AWS CloudFormation has not checked if the stack differs + // from its expected template configuration. + // + // * IN_SYNC: The stack's actual configuration matches its expected template + // configuration. + // + // * UNKNOWN: This value is reserved for future use. + // + // StackDriftStatus is a required field + StackDriftStatus *string `type:"string" required:"true" enum:"StackDriftStatus"` +} + +// String returns the string representation +func (s StackDriftInformationSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StackDriftInformationSummary) GoString() string { + return s.String() +} + +// SetLastCheckTimestamp sets the LastCheckTimestamp field's value. +func (s *StackDriftInformationSummary) SetLastCheckTimestamp(v time.Time) *StackDriftInformationSummary { + s.LastCheckTimestamp = &v + return s +} + +// SetStackDriftStatus sets the StackDriftStatus field's value. +func (s *StackDriftInformationSummary) SetStackDriftStatus(v string) *StackDriftInformationSummary { + s.StackDriftStatus = &v + return s +} + // The StackEvent data type. type StackEvent struct { _ struct{} `type:"structure"` @@ -9476,6 +10690,12 @@ type StackResource struct { // User defined description associated with the resource. Description *string `min:"1" type:"string"` + // Information about whether the resource's actual configuration differs, or + // has drifted, from its expected configuration, as defined in the stack template + // and any values specified as template parameters. For more information, see + // Detecting Unregulated Configuration Changes to Stacks and Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html). + DriftInformation *StackResourceDriftInformation `type:"structure"` + // The logical name of the resource specified in the template. // // LogicalResourceId is a required field @@ -9528,6 +10748,12 @@ func (s *StackResource) SetDescription(v string) *StackResource { return s } +// SetDriftInformation sets the DriftInformation field's value. +func (s *StackResource) SetDriftInformation(v *StackResourceDriftInformation) *StackResource { + s.DriftInformation = v + return s +} + // SetLogicalResourceId sets the LogicalResourceId field's value. func (s *StackResource) SetLogicalResourceId(v string) *StackResource { s.LogicalResourceId = &v @@ -9583,6 +10809,12 @@ type StackResourceDetail struct { // User defined description associated with the resource. Description *string `min:"1" type:"string"` + // Information about whether the resource's actual configuration differs, or + // has drifted, from its expected configuration, as defined in the stack template + // and any values specified as template parameters. For more information, see + // Detecting Unregulated Configuration Changes to Stacks and Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html). + DriftInformation *StackResourceDriftInformation `type:"structure"` + // Time the status was updated. // // LastUpdatedTimestamp is a required field @@ -9640,6 +10872,12 @@ func (s *StackResourceDetail) SetDescription(v string) *StackResourceDetail { return s } +// SetDriftInformation sets the DriftInformation field's value. +func (s *StackResourceDetail) SetDriftInformation(v *StackResourceDriftInformation) *StackResourceDetail { + s.DriftInformation = v + return s +} + // SetLastUpdatedTimestamp sets the LastUpdatedTimestamp field's value. func (s *StackResourceDetail) SetLastUpdatedTimestamp(v time.Time) *StackResourceDetail { s.LastUpdatedTimestamp = &v @@ -9694,10 +10932,277 @@ func (s *StackResourceDetail) SetStackName(v string) *StackResourceDetail { return s } +// Contains the drift information for a resource that has been checked for drift. +// This includes actual and expected property values for resources in which +// AWS CloudFormation has detected drift. Only resource properties explicitly +// defined in the stack template are checked for drift. For more information, +// see Detecting Unregulated Configuration Changes to Stacks and Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html). +// +// Resources that do not currently support drift detection cannot be checked. +// For a list of resources that support drift detection, see Resources that +// Support Drift Detection (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift-resource-list.html). +// +// Use DetectStackResourceDrift to detect drift on individual resources, or +// DetectStackDrift to detect drift on all resources in a given stack that support +// drift detection. +type StackResourceDrift struct { + _ struct{} `type:"structure"` + + // A JSON structure containing the actual property values of the stack resource. + // + // For resources whose StackResourceDriftStatus is DELETED, this structure will + // not be present. + ActualProperties *string `type:"string"` + + // A JSON structure containing the expected property values of the stack resource, + // as defined in the stack template and any values specified as template parameters. + // + // For resources whose StackResourceDriftStatus is DELETED, this structure will + // not be present. + ExpectedProperties *string `type:"string"` + + // The logical name of the resource specified in the template. + // + // LogicalResourceId is a required field + LogicalResourceId *string `type:"string" required:"true"` + + // The name or unique identifier that corresponds to a physical instance ID + // of a resource supported by AWS CloudFormation. + PhysicalResourceId *string `type:"string"` + + // Context information that enables AWS CloudFormation to uniquely identify + // a resource. AWS CloudFormation uses context key-value pairs in cases where + // a resource's logical and physical IDs are not enough to uniquely identify + // that resource. Each context key-value pair specifies a unique resource that + // contains the targeted resource. + PhysicalResourceIdContext []*PhysicalResourceIdContextKeyValuePair `type:"list"` + + // A collection of the resource properties whose actual values differ from their + // expected values. These will be present only for resources whose StackResourceDriftStatus + // is MODIFIED. + PropertyDifferences []*PropertyDifference `type:"list"` + + // The type of the resource. + // + // ResourceType is a required field + ResourceType *string `min:"1" type:"string" required:"true"` + + // The ID of the stack. + // + // StackId is a required field + StackId *string `type:"string" required:"true"` + + // Status of the resource's actual configuration compared to its expected configuration + // + // * DELETED: The resource differs from its expected template configuration + // because the resource has been deleted. + // + // * MODIFIED: One or more resource properties differ from their expected + // values (as defined in the stack template and any values specified as template + // parameters). + // + // * IN_SYNC: The resources's actual configuration matches its expected template + // configuration. + // + // * NOT_CHECKED: AWS CloudFormation does not currently return this value. + // + // StackResourceDriftStatus is a required field + StackResourceDriftStatus *string `type:"string" required:"true" enum:"StackResourceDriftStatus"` + + // Time at which AWS CloudFormation performed drift detection on the stack resource. + // + // Timestamp is a required field + Timestamp *time.Time `type:"timestamp" required:"true"` +} + +// String returns the string representation +func (s StackResourceDrift) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StackResourceDrift) GoString() string { + return s.String() +} + +// SetActualProperties sets the ActualProperties field's value. +func (s *StackResourceDrift) SetActualProperties(v string) *StackResourceDrift { + s.ActualProperties = &v + return s +} + +// SetExpectedProperties sets the ExpectedProperties field's value. +func (s *StackResourceDrift) SetExpectedProperties(v string) *StackResourceDrift { + s.ExpectedProperties = &v + return s +} + +// SetLogicalResourceId sets the LogicalResourceId field's value. +func (s *StackResourceDrift) SetLogicalResourceId(v string) *StackResourceDrift { + s.LogicalResourceId = &v + return s +} + +// SetPhysicalResourceId sets the PhysicalResourceId field's value. +func (s *StackResourceDrift) SetPhysicalResourceId(v string) *StackResourceDrift { + s.PhysicalResourceId = &v + return s +} + +// SetPhysicalResourceIdContext sets the PhysicalResourceIdContext field's value. +func (s *StackResourceDrift) SetPhysicalResourceIdContext(v []*PhysicalResourceIdContextKeyValuePair) *StackResourceDrift { + s.PhysicalResourceIdContext = v + return s +} + +// SetPropertyDifferences sets the PropertyDifferences field's value. +func (s *StackResourceDrift) SetPropertyDifferences(v []*PropertyDifference) *StackResourceDrift { + s.PropertyDifferences = v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *StackResourceDrift) SetResourceType(v string) *StackResourceDrift { + s.ResourceType = &v + return s +} + +// SetStackId sets the StackId field's value. +func (s *StackResourceDrift) SetStackId(v string) *StackResourceDrift { + s.StackId = &v + return s +} + +// SetStackResourceDriftStatus sets the StackResourceDriftStatus field's value. +func (s *StackResourceDrift) SetStackResourceDriftStatus(v string) *StackResourceDrift { + s.StackResourceDriftStatus = &v + return s +} + +// SetTimestamp sets the Timestamp field's value. +func (s *StackResourceDrift) SetTimestamp(v time.Time) *StackResourceDrift { + s.Timestamp = &v + return s +} + +// Contains information about whether the resource's actual configuration differs, +// or has drifted, from its expected configuration. +type StackResourceDriftInformation struct { + _ struct{} `type:"structure"` + + // When AWS CloudFormation last checked if the resource had drifted from its + // expected configuration. + LastCheckTimestamp *time.Time `type:"timestamp"` + + // Status of the resource's actual configuration compared to its expected configuration + // + // * DELETED: The resource differs from its expected configuration in that + // it has been deleted. + // + // * MODIFIED: The resource differs from its expected configuration. + // + // * NOT_CHECKED: AWS CloudFormation has not checked if the resource differs + // from its expected configuration. + // + // Any resources that do not currently support drift detection have a status + // of NOT_CHECKED. For more information, see Resources that Support Drift + // Detection (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift-resource-list.html). + // + // + // * IN_SYNC: The resources's actual configuration matches its expected configuration. + // + // StackResourceDriftStatus is a required field + StackResourceDriftStatus *string `type:"string" required:"true" enum:"StackResourceDriftStatus"` +} + +// String returns the string representation +func (s StackResourceDriftInformation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StackResourceDriftInformation) GoString() string { + return s.String() +} + +// SetLastCheckTimestamp sets the LastCheckTimestamp field's value. +func (s *StackResourceDriftInformation) SetLastCheckTimestamp(v time.Time) *StackResourceDriftInformation { + s.LastCheckTimestamp = &v + return s +} + +// SetStackResourceDriftStatus sets the StackResourceDriftStatus field's value. +func (s *StackResourceDriftInformation) SetStackResourceDriftStatus(v string) *StackResourceDriftInformation { + s.StackResourceDriftStatus = &v + return s +} + +// Summarizes information about whether the resource's actual configuration +// differs, or has drifted, from its expected configuration. +type StackResourceDriftInformationSummary struct { + _ struct{} `type:"structure"` + + // When AWS CloudFormation last checked if the resource had drifted from its + // expected configuration. + LastCheckTimestamp *time.Time `type:"timestamp"` + + // Status of the resource's actual configuration compared to its expected configuration + // + // * DELETED: The resource differs from its expected configuration in that + // it has been deleted. + // + // * MODIFIED: The resource differs from its expected configuration. + // + // * NOT_CHECKED: AWS CloudFormation has not checked if the resource differs + // from its expected configuration. + // + // Any resources that do not currently support drift detection have a status + // of NOT_CHECKED. For more information, see Resources that Support Drift + // Detection (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift-resource-list.html). + // If you performed an ContinueUpdateRollback operation on a stack, any resources + // included in ResourcesToSkip will also have a status of NOT_CHECKED. For + // more information on skipping resources during rollback operations, see + // Continue Rolling Back an Update (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-continueupdaterollback.html) + // in the AWS CloudFormation User Guide. + // + // * IN_SYNC: The resources's actual configuration matches its expected configuration. + // + // StackResourceDriftStatus is a required field + StackResourceDriftStatus *string `type:"string" required:"true" enum:"StackResourceDriftStatus"` +} + +// String returns the string representation +func (s StackResourceDriftInformationSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StackResourceDriftInformationSummary) GoString() string { + return s.String() +} + +// SetLastCheckTimestamp sets the LastCheckTimestamp field's value. +func (s *StackResourceDriftInformationSummary) SetLastCheckTimestamp(v time.Time) *StackResourceDriftInformationSummary { + s.LastCheckTimestamp = &v + return s +} + +// SetStackResourceDriftStatus sets the StackResourceDriftStatus field's value. +func (s *StackResourceDriftInformationSummary) SetStackResourceDriftStatus(v string) *StackResourceDriftInformationSummary { + s.StackResourceDriftStatus = &v + return s +} + // Contains high-level information about the specified stack resource. type StackResourceSummary struct { _ struct{} `type:"structure"` + // Information about whether the resource's actual configuration differs, or + // has drifted, from its expected configuration, as defined in the stack template + // and any values specified as template parameters. For more information, see + // Detecting Unregulated Configuration Changes to Stacks and Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html). + DriftInformation *StackResourceDriftInformationSummary `type:"structure"` + // Time the status was updated. // // LastUpdatedTimestamp is a required field @@ -9738,6 +11243,12 @@ func (s StackResourceSummary) GoString() string { return s.String() } +// SetDriftInformation sets the DriftInformation field's value. +func (s *StackResourceSummary) SetDriftInformation(v *StackResourceDriftInformationSummary) *StackResourceSummary { + s.DriftInformation = v + return s +} + // SetLastUpdatedTimestamp sets the LastUpdatedTimestamp field's value. func (s *StackResourceSummary) SetLastUpdatedTimestamp(v time.Time) *StackResourceSummary { s.LastUpdatedTimestamp = &v @@ -10402,6 +11913,12 @@ type StackSummary struct { // The time the stack was deleted. DeletionTime *time.Time `type:"timestamp"` + // Summarizes information on whether a stack's actual configuration differs, + // or has drifted, from it's expected configuration, as defined in the stack + // template and any values specified as template parameters. For more information, + // see Detecting Unregulated Configuration Changes to Stacks and Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html). + DriftInformation *StackDriftInformationSummary `type:"structure"` + // The time the stack was last updated. This field will only be returned if // the stack has been updated at least once. LastUpdatedTime *time.Time `type:"timestamp"` @@ -10463,6 +11980,12 @@ func (s *StackSummary) SetDeletionTime(v time.Time) *StackSummary { return s } +// SetDriftInformation sets the DriftInformation field's value. +func (s *StackSummary) SetDriftInformation(v *StackDriftInformationSummary) *StackSummary { + s.DriftInformation = v + return s +} + // SetLastUpdatedTime sets the LastUpdatedTime field's value. func (s *StackSummary) SetLastUpdatedTime(v time.Time) *StackSummary { s.LastUpdatedTime = &v @@ -10700,30 +12223,74 @@ func (s *TemplateParameter) SetParameterKey(v string) *TemplateParameter { type UpdateStackInput struct { _ struct{} `type:"structure"` - // A list of values that you must specify before AWS CloudFormation can update - // certain stacks. Some stack templates might include resources that can affect - // permissions in your AWS account, for example, by creating new AWS Identity - // and Access Management (IAM) users. For those stacks, you must explicitly - // acknowledge their capabilities by specifying this parameter. - // - // The only valid values are CAPABILITY_IAM and CAPABILITY_NAMED_IAM. The following - // resources require you to specify this parameter: AWS::IAM::AccessKey (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html), - // AWS::IAM::Group (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html), - // AWS::IAM::InstanceProfile (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html), - // AWS::IAM::Policy (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html), - // AWS::IAM::Role (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html), - // AWS::IAM::User (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html), - // and AWS::IAM::UserToGroupAddition (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html). + // In some cases, you must explicity acknowledge that your stack template contains + // certain capabilities in order for AWS CloudFormation to update the stack. + // + // * CAPABILITY_IAM and CAPABILITY_NAMED_IAM + // + // Some stack templates might include resources that can affect permissions + // in your AWS account; for example, by creating new AWS Identity and Access + // Management (IAM) users. For those stacks, you must explicitly acknowledge + // this by specifying one of these capabilities. + // + // The following IAM resources require you to specify either the CAPABILITY_IAM + // or CAPABILITY_NAMED_IAM capability. + // + // If you have IAM resources, you can specify either capability. + // + // If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM. + // + // + // If you don't specify either of these capabilities, AWS CloudFormation returns + // an InsufficientCapabilities error. + // // If your stack template contains these resources, we recommend that you review - // all permissions associated with them and edit their permissions if necessary. + // all permissions associated with them and edit their permissions if necessary. // - // If you have IAM resources, you can specify either capability. If you have - // IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM. If - // you don't specify this parameter, this action returns an InsufficientCapabilities - // error. + // AWS::IAM::AccessKey (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html) + // + // AWS::IAM::Group (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html) + // + // AWS::IAM::InstanceProfile (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html) + // + // AWS::IAM::Policy (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html) + // + // AWS::IAM::Role (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html) + // + // AWS::IAM::User (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html) + // + // AWS::IAM::UserToGroupAddition (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html) // // For more information, see Acknowledging IAM Resources in AWS CloudFormation - // Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities). + // Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities). + // + // * CAPABILITY_AUTO_EXPAND + // + // Some template contain macros. Macros perform custom processing on templates; + // this can include simple actions like find-and-replace operations, all + // the way to extensive transformations of entire templates. Because of this, + // users typically create a change set from the processed template, so that + // they can review the changes resulting from the macros before actually + // updating the stack. If your stack template contains one or more macros, + // and you choose to update a stack directly from the processed template, + // without first reviewing the resulting changes in a change set, you must + // acknowledge this capability. This includes the AWS::Include (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html) + // and AWS::Serverless (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html) + // transforms, which are macros hosted by AWS CloudFormation. + // + // Change sets do not currently support nested stacks. If you want to update + // a stack from a stack template that contains macros and nested stacks, + // you must update the stack directly from the template using this capability. + // + // You should only update stacks directly from a stack template that contains + // macros if you know what processing the macro performs. + // + // Each macro relies on an underlying Lambda service function for processing + // stack templates. Be aware that the Lambda function owner can update the + // function operation without AWS CloudFormation being notified. + // + // For more information, see Using AWS CloudFormation Macros to Perform Custom + // Processing on Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html). Capabilities []*string `type:"list"` // A unique identifier for this UpdateStack request. Specify this token if you @@ -11246,40 +12813,62 @@ type UpdateStackSetInput struct { // on the stack set. AdministrationRoleARN *string `min:"20" type:"string"` - // A list of values that you must specify before AWS CloudFormation can create - // certain stack sets. Some stack set templates might include resources that - // can affect permissions in your AWS account—for example, by creating new AWS - // Identity and Access Management (IAM) users. For those stack sets, you must - // explicitly acknowledge their capabilities by specifying this parameter. + // In some cases, you must explicity acknowledge that your stack template contains + // certain capabilities in order for AWS CloudFormation to update the stack + // set and its associated stack instances. // - // The only valid values are CAPABILITY_IAM and CAPABILITY_NAMED_IAM. The following - // resources require you to specify this parameter: + // * CAPABILITY_IAM and CAPABILITY_NAMED_IAM // - // * AWS::IAM::AccessKey + // Some stack templates might include resources that can affect permissions + // in your AWS account; for example, by creating new AWS Identity and Access + // Management (IAM) users. For those stacks sets, you must explicitly acknowledge + // this by specifying one of these capabilities. // - // * AWS::IAM::Group + // The following IAM resources require you to specify either the CAPABILITY_IAM + // or CAPABILITY_NAMED_IAM capability. // - // * AWS::IAM::InstanceProfile + // If you have IAM resources, you can specify either capability. // - // * AWS::IAM::Policy + // If you have IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM. // - // * AWS::IAM::Role // - // * AWS::IAM::User - // - // * AWS::IAM::UserToGroupAddition + // If you don't specify either of these capabilities, AWS CloudFormation returns + // an InsufficientCapabilities error. // // If your stack template contains these resources, we recommend that you review - // all permissions that are associated with them and edit their permissions - // if necessary. + // all permissions associated with them and edit their permissions if necessary. // - // If you have IAM resources, you can specify either capability. If you have - // IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM. If - // you don't specify this parameter, this action returns an InsufficientCapabilities - // error. + // AWS::IAM::AccessKey (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html) + // + // AWS::IAM::Group (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html) + // + // AWS::IAM::InstanceProfile (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html) + // + // AWS::IAM::Policy (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html) + // + // AWS::IAM::Role (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html) + // + // AWS::IAM::User (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html) + // + // AWS::IAM::UserToGroupAddition (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html) // // For more information, see Acknowledging IAM Resources in AWS CloudFormation - // Templates. (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities) + // Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities). + // + // * CAPABILITY_AUTO_EXPAND + // + // Some templates contain macros. If your stack template contains one or more + // macros, and you choose to update a stack directly from the processed template, + // without first reviewing the resulting changes in a change set, you must + // acknowledge this capability. For more information, see Using AWS CloudFormation + // Macros to Perform Custom Processing on Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html). + // + // Stack sets do not currently support macros in stack templates. (This includes + // the AWS::Include (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html) + // and AWS::Serverless (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html) + // transforms, which are macros hosted by AWS CloudFormation.) Even if you + // specify this capability, if you include a macro in your template the stack + // set operation will fail. Capabilities []*string `type:"list"` // A brief description of updates that you are making. @@ -11782,6 +13371,9 @@ const ( // CapabilityCapabilityNamedIam is a Capability enum value CapabilityCapabilityNamedIam = "CAPABILITY_NAMED_IAM" + + // CapabilityCapabilityAutoExpand is a Capability enum value + CapabilityCapabilityAutoExpand = "CAPABILITY_AUTO_EXPAND" ) const ( @@ -11842,6 +13434,17 @@ const ( ChangeTypeResource = "Resource" ) +const ( + // DifferenceTypeAdd is a DifferenceType enum value + DifferenceTypeAdd = "ADD" + + // DifferenceTypeRemove is a DifferenceType enum value + DifferenceTypeRemove = "REMOVE" + + // DifferenceTypeNotEqual is a DifferenceType enum value + DifferenceTypeNotEqual = "NOT_EQUAL" +) + const ( // EvaluationTypeStatic is a EvaluationType enum value EvaluationTypeStatic = "Static" @@ -11963,6 +13566,31 @@ const ( ResourceStatusUpdateComplete = "UPDATE_COMPLETE" ) +const ( + // StackDriftDetectionStatusDetectionInProgress is a StackDriftDetectionStatus enum value + StackDriftDetectionStatusDetectionInProgress = "DETECTION_IN_PROGRESS" + + // StackDriftDetectionStatusDetectionFailed is a StackDriftDetectionStatus enum value + StackDriftDetectionStatusDetectionFailed = "DETECTION_FAILED" + + // StackDriftDetectionStatusDetectionComplete is a StackDriftDetectionStatus enum value + StackDriftDetectionStatusDetectionComplete = "DETECTION_COMPLETE" +) + +const ( + // StackDriftStatusDrifted is a StackDriftStatus enum value + StackDriftStatusDrifted = "DRIFTED" + + // StackDriftStatusInSync is a StackDriftStatus enum value + StackDriftStatusInSync = "IN_SYNC" + + // StackDriftStatusUnknown is a StackDriftStatus enum value + StackDriftStatusUnknown = "UNKNOWN" + + // StackDriftStatusNotChecked is a StackDriftStatus enum value + StackDriftStatusNotChecked = "NOT_CHECKED" +) + const ( // StackInstanceStatusCurrent is a StackInstanceStatus enum value StackInstanceStatusCurrent = "CURRENT" @@ -11974,6 +13602,20 @@ const ( StackInstanceStatusInoperable = "INOPERABLE" ) +const ( + // StackResourceDriftStatusInSync is a StackResourceDriftStatus enum value + StackResourceDriftStatusInSync = "IN_SYNC" + + // StackResourceDriftStatusModified is a StackResourceDriftStatus enum value + StackResourceDriftStatusModified = "MODIFIED" + + // StackResourceDriftStatusDeleted is a StackResourceDriftStatus enum value + StackResourceDriftStatusDeleted = "DELETED" + + // StackResourceDriftStatusNotChecked is a StackResourceDriftStatus enum value + StackResourceDriftStatusNotChecked = "NOT_CHECKED" +) + const ( // StackSetOperationActionCreate is a StackSetOperationAction enum value StackSetOperationActionCreate = "CREATE" diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go index f81df39843..e7808318f7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go @@ -13,12 +13,12 @@ import ( "github.com/aws/aws-sdk-go/private/protocol/restxml" ) -const opCreateCloudFrontOriginAccessIdentity = "CreateCloudFrontOriginAccessIdentity2018_06_18" +const opCreateCloudFrontOriginAccessIdentity = "CreateCloudFrontOriginAccessIdentity2018_11_05" // CreateCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the // client's request for the CreateCloudFrontOriginAccessIdentity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -38,12 +38,12 @@ const opCreateCloudFrontOriginAccessIdentity = "CreateCloudFrontOriginAccessIden // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateCloudFrontOriginAccessIdentity +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateCloudFrontOriginAccessIdentity func (c *CloudFront) CreateCloudFrontOriginAccessIdentityRequest(input *CreateCloudFrontOriginAccessIdentityInput) (req *request.Request, output *CreateCloudFrontOriginAccessIdentityOutput) { op := &request.Operation{ Name: opCreateCloudFrontOriginAccessIdentity, HTTPMethod: "POST", - HTTPPath: "/2018-06-18/origin-access-identity/cloudfront", + HTTPPath: "/2018-11-05/origin-access-identity/cloudfront", } if input == nil { @@ -92,7 +92,7 @@ func (c *CloudFront) CreateCloudFrontOriginAccessIdentityRequest(input *CreateCl // * ErrCodeInconsistentQuantities "InconsistentQuantities" // The value of Quantity and the size of Items don't match. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateCloudFrontOriginAccessIdentity +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateCloudFrontOriginAccessIdentity func (c *CloudFront) CreateCloudFrontOriginAccessIdentity(input *CreateCloudFrontOriginAccessIdentityInput) (*CreateCloudFrontOriginAccessIdentityOutput, error) { req, out := c.CreateCloudFrontOriginAccessIdentityRequest(input) return out, req.Send() @@ -114,12 +114,12 @@ func (c *CloudFront) CreateCloudFrontOriginAccessIdentityWithContext(ctx aws.Con return out, req.Send() } -const opCreateDistribution = "CreateDistribution2018_06_18" +const opCreateDistribution = "CreateDistribution2018_11_05" // CreateDistributionRequest generates a "aws/request.Request" representing the // client's request for the CreateDistribution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -139,12 +139,12 @@ const opCreateDistribution = "CreateDistribution2018_06_18" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateDistribution func (c *CloudFront) CreateDistributionRequest(input *CreateDistributionInput) (req *request.Request, output *CreateDistributionOutput) { op := &request.Operation{ Name: opCreateDistribution, HTTPMethod: "POST", - HTTPPath: "/2018-06-18/distribution", + HTTPPath: "/2018-11-05/distribution", } if input == nil { @@ -158,8 +158,21 @@ func (c *CloudFront) CreateDistributionRequest(input *CreateDistributionInput) ( // CreateDistribution API operation for Amazon CloudFront. // -// Creates a new web distribution. Send a POST request to the /CloudFront API -// version/distribution/distribution ID resource. +// Creates a new web distribution. You create a CloudFront distribution to tell +// CloudFront where you want content to be delivered from, and the details about +// how to track and manage content delivery. Send a POST request to the /CloudFront +// API version/distribution/distribution ID resource. +// +// When you update a distribution, there are more required fields than when +// you create a distribution. When you update your distribution by using UpdateDistribution, +// follow the steps included in the documentation to get the current configuration +// and then make your updates. This helps to make sure that you include all +// of the required fields. To view a summary, see Required Fields for Create +// Distribution and Update Distribution (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-overview-required-fields.html) +// in the Amazon CloudFront Developer Guide. +// +// If you are using Adobe Flash Media Server's RTMP protocol, you set up a different +// kind of CloudFront distribution. For more information, see CreateStreamingDistribution. // // 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 @@ -231,6 +244,10 @@ func (c *CloudFront) CreateDistributionRequest(input *CreateDistributionInput) ( // * ErrCodeTooManyOrigins "TooManyOrigins" // You cannot create more origins for the distribution. // +// * ErrCodeTooManyOriginGroupsPerDistribution "TooManyOriginGroupsPerDistribution" +// Processing your request would cause you to exceed the maximum number of origin +// groups allowed. +// // * ErrCodeTooManyCacheBehaviors "TooManyCacheBehaviors" // You cannot create more cache behaviors for the distribution. // @@ -298,7 +315,7 @@ func (c *CloudFront) CreateDistributionRequest(input *CreateDistributionInput) ( // The maximum number of distributions have been associated with the specified // configuration for field-level encryption. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateDistribution func (c *CloudFront) CreateDistribution(input *CreateDistributionInput) (*CreateDistributionOutput, error) { req, out := c.CreateDistributionRequest(input) return out, req.Send() @@ -320,12 +337,12 @@ func (c *CloudFront) CreateDistributionWithContext(ctx aws.Context, input *Creat return out, req.Send() } -const opCreateDistributionWithTags = "CreateDistributionWithTags2018_06_18" +const opCreateDistributionWithTags = "CreateDistributionWithTags2018_11_05" // CreateDistributionWithTagsRequest generates a "aws/request.Request" representing the // client's request for the CreateDistributionWithTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -345,12 +362,12 @@ const opCreateDistributionWithTags = "CreateDistributionWithTags2018_06_18" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateDistributionWithTags +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateDistributionWithTags func (c *CloudFront) CreateDistributionWithTagsRequest(input *CreateDistributionWithTagsInput) (req *request.Request, output *CreateDistributionWithTagsOutput) { op := &request.Operation{ Name: opCreateDistributionWithTags, HTTPMethod: "POST", - HTTPPath: "/2018-06-18/distribution?WithTags", + HTTPPath: "/2018-11-05/distribution?WithTags", } if input == nil { @@ -436,6 +453,10 @@ func (c *CloudFront) CreateDistributionWithTagsRequest(input *CreateDistribution // * ErrCodeTooManyOrigins "TooManyOrigins" // You cannot create more origins for the distribution. // +// * ErrCodeTooManyOriginGroupsPerDistribution "TooManyOriginGroupsPerDistribution" +// Processing your request would cause you to exceed the maximum number of origin +// groups allowed. +// // * ErrCodeTooManyCacheBehaviors "TooManyCacheBehaviors" // You cannot create more cache behaviors for the distribution. // @@ -505,7 +526,7 @@ func (c *CloudFront) CreateDistributionWithTagsRequest(input *CreateDistribution // The maximum number of distributions have been associated with the specified // configuration for field-level encryption. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateDistributionWithTags +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateDistributionWithTags func (c *CloudFront) CreateDistributionWithTags(input *CreateDistributionWithTagsInput) (*CreateDistributionWithTagsOutput, error) { req, out := c.CreateDistributionWithTagsRequest(input) return out, req.Send() @@ -527,12 +548,12 @@ func (c *CloudFront) CreateDistributionWithTagsWithContext(ctx aws.Context, inpu return out, req.Send() } -const opCreateFieldLevelEncryptionConfig = "CreateFieldLevelEncryptionConfig2018_06_18" +const opCreateFieldLevelEncryptionConfig = "CreateFieldLevelEncryptionConfig2018_11_05" // CreateFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the // client's request for the CreateFieldLevelEncryptionConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -552,12 +573,12 @@ const opCreateFieldLevelEncryptionConfig = "CreateFieldLevelEncryptionConfig2018 // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateFieldLevelEncryptionConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateFieldLevelEncryptionConfig func (c *CloudFront) CreateFieldLevelEncryptionConfigRequest(input *CreateFieldLevelEncryptionConfigInput) (req *request.Request, output *CreateFieldLevelEncryptionConfigOutput) { op := &request.Operation{ Name: opCreateFieldLevelEncryptionConfig, HTTPMethod: "POST", - HTTPPath: "/2018-06-18/field-level-encryption", + HTTPPath: "/2018-11-05/field-level-encryption", } if input == nil { @@ -608,7 +629,7 @@ func (c *CloudFront) CreateFieldLevelEncryptionConfigRequest(input *CreateFieldL // * ErrCodeQueryArgProfileEmpty "QueryArgProfileEmpty" // No profile specified for the field-level encryption query argument. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateFieldLevelEncryptionConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateFieldLevelEncryptionConfig func (c *CloudFront) CreateFieldLevelEncryptionConfig(input *CreateFieldLevelEncryptionConfigInput) (*CreateFieldLevelEncryptionConfigOutput, error) { req, out := c.CreateFieldLevelEncryptionConfigRequest(input) return out, req.Send() @@ -630,12 +651,12 @@ func (c *CloudFront) CreateFieldLevelEncryptionConfigWithContext(ctx aws.Context return out, req.Send() } -const opCreateFieldLevelEncryptionProfile = "CreateFieldLevelEncryptionProfile2018_06_18" +const opCreateFieldLevelEncryptionProfile = "CreateFieldLevelEncryptionProfile2018_11_05" // CreateFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the // client's request for the CreateFieldLevelEncryptionProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -655,12 +676,12 @@ const opCreateFieldLevelEncryptionProfile = "CreateFieldLevelEncryptionProfile20 // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateFieldLevelEncryptionProfile +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateFieldLevelEncryptionProfile func (c *CloudFront) CreateFieldLevelEncryptionProfileRequest(input *CreateFieldLevelEncryptionProfileInput) (req *request.Request, output *CreateFieldLevelEncryptionProfileOutput) { op := &request.Operation{ Name: opCreateFieldLevelEncryptionProfile, HTTPMethod: "POST", - HTTPPath: "/2018-06-18/field-level-encryption-profile", + HTTPPath: "/2018-11-05/field-level-encryption-profile", } if input == nil { @@ -710,7 +731,7 @@ func (c *CloudFront) CreateFieldLevelEncryptionProfileRequest(input *CreateField // The maximum number of field patterns for field-level encryption have been // created. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateFieldLevelEncryptionProfile +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateFieldLevelEncryptionProfile func (c *CloudFront) CreateFieldLevelEncryptionProfile(input *CreateFieldLevelEncryptionProfileInput) (*CreateFieldLevelEncryptionProfileOutput, error) { req, out := c.CreateFieldLevelEncryptionProfileRequest(input) return out, req.Send() @@ -732,12 +753,12 @@ func (c *CloudFront) CreateFieldLevelEncryptionProfileWithContext(ctx aws.Contex return out, req.Send() } -const opCreateInvalidation = "CreateInvalidation2018_06_18" +const opCreateInvalidation = "CreateInvalidation2018_11_05" // CreateInvalidationRequest generates a "aws/request.Request" representing the // client's request for the CreateInvalidation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -757,12 +778,12 @@ const opCreateInvalidation = "CreateInvalidation2018_06_18" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateInvalidation +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateInvalidation func (c *CloudFront) CreateInvalidationRequest(input *CreateInvalidationInput) (req *request.Request, output *CreateInvalidationOutput) { op := &request.Operation{ Name: opCreateInvalidation, HTTPMethod: "POST", - HTTPPath: "/2018-06-18/distribution/{DistributionId}/invalidation", + HTTPPath: "/2018-11-05/distribution/{DistributionId}/invalidation", } if input == nil { @@ -808,7 +829,7 @@ func (c *CloudFront) CreateInvalidationRequest(input *CreateInvalidationInput) ( // * ErrCodeInconsistentQuantities "InconsistentQuantities" // The value of Quantity and the size of Items don't match. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateInvalidation +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateInvalidation func (c *CloudFront) CreateInvalidation(input *CreateInvalidationInput) (*CreateInvalidationOutput, error) { req, out := c.CreateInvalidationRequest(input) return out, req.Send() @@ -830,12 +851,12 @@ func (c *CloudFront) CreateInvalidationWithContext(ctx aws.Context, input *Creat return out, req.Send() } -const opCreatePublicKey = "CreatePublicKey2018_06_18" +const opCreatePublicKey = "CreatePublicKey2018_11_05" // CreatePublicKeyRequest generates a "aws/request.Request" representing the // client's request for the CreatePublicKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -855,12 +876,12 @@ const opCreatePublicKey = "CreatePublicKey2018_06_18" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreatePublicKey +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreatePublicKey func (c *CloudFront) CreatePublicKeyRequest(input *CreatePublicKeyInput) (req *request.Request, output *CreatePublicKeyOutput) { op := &request.Operation{ Name: opCreatePublicKey, HTTPMethod: "POST", - HTTPPath: "/2018-06-18/public-key", + HTTPPath: "/2018-11-05/public-key", } if input == nil { @@ -895,7 +916,7 @@ func (c *CloudFront) CreatePublicKeyRequest(input *CreatePublicKeyInput) (req *r // The maximum number of public keys for field-level encryption have been created. // To create a new public key, delete one of the existing keys. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreatePublicKey +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreatePublicKey func (c *CloudFront) CreatePublicKey(input *CreatePublicKeyInput) (*CreatePublicKeyOutput, error) { req, out := c.CreatePublicKeyRequest(input) return out, req.Send() @@ -917,12 +938,12 @@ func (c *CloudFront) CreatePublicKeyWithContext(ctx aws.Context, input *CreatePu return out, req.Send() } -const opCreateStreamingDistribution = "CreateStreamingDistribution2018_06_18" +const opCreateStreamingDistribution = "CreateStreamingDistribution2018_11_05" // CreateStreamingDistributionRequest generates a "aws/request.Request" representing the // client's request for the CreateStreamingDistribution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -942,12 +963,12 @@ const opCreateStreamingDistribution = "CreateStreamingDistribution2018_06_18" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateStreamingDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateStreamingDistribution func (c *CloudFront) CreateStreamingDistributionRequest(input *CreateStreamingDistributionInput) (req *request.Request, output *CreateStreamingDistributionOutput) { op := &request.Operation{ Name: opCreateStreamingDistribution, HTTPMethod: "POST", - HTTPPath: "/2018-06-18/streaming-distribution", + HTTPPath: "/2018-11-05/streaming-distribution", } if input == nil { @@ -1034,7 +1055,7 @@ func (c *CloudFront) CreateStreamingDistributionRequest(input *CreateStreamingDi // * ErrCodeInconsistentQuantities "InconsistentQuantities" // The value of Quantity and the size of Items don't match. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateStreamingDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateStreamingDistribution func (c *CloudFront) CreateStreamingDistribution(input *CreateStreamingDistributionInput) (*CreateStreamingDistributionOutput, error) { req, out := c.CreateStreamingDistributionRequest(input) return out, req.Send() @@ -1056,12 +1077,12 @@ func (c *CloudFront) CreateStreamingDistributionWithContext(ctx aws.Context, inp return out, req.Send() } -const opCreateStreamingDistributionWithTags = "CreateStreamingDistributionWithTags2018_06_18" +const opCreateStreamingDistributionWithTags = "CreateStreamingDistributionWithTags2018_11_05" // CreateStreamingDistributionWithTagsRequest generates a "aws/request.Request" representing the // client's request for the CreateStreamingDistributionWithTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1081,12 +1102,12 @@ const opCreateStreamingDistributionWithTags = "CreateStreamingDistributionWithTa // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateStreamingDistributionWithTags +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateStreamingDistributionWithTags func (c *CloudFront) CreateStreamingDistributionWithTagsRequest(input *CreateStreamingDistributionWithTagsInput) (req *request.Request, output *CreateStreamingDistributionWithTagsOutput) { op := &request.Operation{ Name: opCreateStreamingDistributionWithTags, HTTPMethod: "POST", - HTTPPath: "/2018-06-18/streaming-distribution?WithTags", + HTTPPath: "/2018-11-05/streaming-distribution?WithTags", } if input == nil { @@ -1148,7 +1169,7 @@ func (c *CloudFront) CreateStreamingDistributionWithTagsRequest(input *CreateStr // // * ErrCodeInvalidTagging "InvalidTagging" // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/CreateStreamingDistributionWithTags +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/CreateStreamingDistributionWithTags func (c *CloudFront) CreateStreamingDistributionWithTags(input *CreateStreamingDistributionWithTagsInput) (*CreateStreamingDistributionWithTagsOutput, error) { req, out := c.CreateStreamingDistributionWithTagsRequest(input) return out, req.Send() @@ -1170,12 +1191,12 @@ func (c *CloudFront) CreateStreamingDistributionWithTagsWithContext(ctx aws.Cont return out, req.Send() } -const opDeleteCloudFrontOriginAccessIdentity = "DeleteCloudFrontOriginAccessIdentity2018_06_18" +const opDeleteCloudFrontOriginAccessIdentity = "DeleteCloudFrontOriginAccessIdentity2018_11_05" // DeleteCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the // client's request for the DeleteCloudFrontOriginAccessIdentity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1195,12 +1216,12 @@ const opDeleteCloudFrontOriginAccessIdentity = "DeleteCloudFrontOriginAccessIden // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/DeleteCloudFrontOriginAccessIdentity +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteCloudFrontOriginAccessIdentity func (c *CloudFront) DeleteCloudFrontOriginAccessIdentityRequest(input *DeleteCloudFrontOriginAccessIdentityInput) (req *request.Request, output *DeleteCloudFrontOriginAccessIdentityOutput) { op := &request.Operation{ Name: opDeleteCloudFrontOriginAccessIdentity, HTTPMethod: "DELETE", - HTTPPath: "/2018-06-18/origin-access-identity/cloudfront/{Id}", + HTTPPath: "/2018-11-05/origin-access-identity/cloudfront/{Id}", } if input == nil { @@ -1209,8 +1230,7 @@ func (c *CloudFront) DeleteCloudFrontOriginAccessIdentityRequest(input *DeleteCl output = &DeleteCloudFrontOriginAccessIdentityOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1241,7 +1261,7 @@ func (c *CloudFront) DeleteCloudFrontOriginAccessIdentityRequest(input *DeleteCl // // * ErrCodeOriginAccessIdentityInUse "CloudFrontOriginAccessIdentityInUse" // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/DeleteCloudFrontOriginAccessIdentity +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteCloudFrontOriginAccessIdentity func (c *CloudFront) DeleteCloudFrontOriginAccessIdentity(input *DeleteCloudFrontOriginAccessIdentityInput) (*DeleteCloudFrontOriginAccessIdentityOutput, error) { req, out := c.DeleteCloudFrontOriginAccessIdentityRequest(input) return out, req.Send() @@ -1263,12 +1283,12 @@ func (c *CloudFront) DeleteCloudFrontOriginAccessIdentityWithContext(ctx aws.Con return out, req.Send() } -const opDeleteDistribution = "DeleteDistribution2018_06_18" +const opDeleteDistribution = "DeleteDistribution2018_11_05" // DeleteDistributionRequest generates a "aws/request.Request" representing the // client's request for the DeleteDistribution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1288,12 +1308,12 @@ const opDeleteDistribution = "DeleteDistribution2018_06_18" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/DeleteDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteDistribution func (c *CloudFront) DeleteDistributionRequest(input *DeleteDistributionInput) (req *request.Request, output *DeleteDistributionOutput) { op := &request.Operation{ Name: opDeleteDistribution, HTTPMethod: "DELETE", - HTTPPath: "/2018-06-18/distribution/{Id}", + HTTPPath: "/2018-11-05/distribution/{Id}", } if input == nil { @@ -1302,8 +1322,7 @@ func (c *CloudFront) DeleteDistributionRequest(input *DeleteDistributionInput) ( output = &DeleteDistributionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1334,7 +1353,7 @@ func (c *CloudFront) DeleteDistributionRequest(input *DeleteDistributionInput) ( // The precondition given in one or more of the request-header fields evaluated // to false. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/DeleteDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteDistribution func (c *CloudFront) DeleteDistribution(input *DeleteDistributionInput) (*DeleteDistributionOutput, error) { req, out := c.DeleteDistributionRequest(input) return out, req.Send() @@ -1356,12 +1375,12 @@ func (c *CloudFront) DeleteDistributionWithContext(ctx aws.Context, input *Delet return out, req.Send() } -const opDeleteFieldLevelEncryptionConfig = "DeleteFieldLevelEncryptionConfig2018_06_18" +const opDeleteFieldLevelEncryptionConfig = "DeleteFieldLevelEncryptionConfig2018_11_05" // DeleteFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the // client's request for the DeleteFieldLevelEncryptionConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1381,12 +1400,12 @@ const opDeleteFieldLevelEncryptionConfig = "DeleteFieldLevelEncryptionConfig2018 // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/DeleteFieldLevelEncryptionConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteFieldLevelEncryptionConfig func (c *CloudFront) DeleteFieldLevelEncryptionConfigRequest(input *DeleteFieldLevelEncryptionConfigInput) (req *request.Request, output *DeleteFieldLevelEncryptionConfigOutput) { op := &request.Operation{ Name: opDeleteFieldLevelEncryptionConfig, HTTPMethod: "DELETE", - HTTPPath: "/2018-06-18/field-level-encryption/{Id}", + HTTPPath: "/2018-11-05/field-level-encryption/{Id}", } if input == nil { @@ -1395,8 +1414,7 @@ func (c *CloudFront) DeleteFieldLevelEncryptionConfigRequest(input *DeleteFieldL output = &DeleteFieldLevelEncryptionConfigOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1428,7 +1446,7 @@ func (c *CloudFront) DeleteFieldLevelEncryptionConfigRequest(input *DeleteFieldL // * ErrCodeFieldLevelEncryptionConfigInUse "FieldLevelEncryptionConfigInUse" // The specified configuration for field-level encryption is in use. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/DeleteFieldLevelEncryptionConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteFieldLevelEncryptionConfig func (c *CloudFront) DeleteFieldLevelEncryptionConfig(input *DeleteFieldLevelEncryptionConfigInput) (*DeleteFieldLevelEncryptionConfigOutput, error) { req, out := c.DeleteFieldLevelEncryptionConfigRequest(input) return out, req.Send() @@ -1450,12 +1468,12 @@ func (c *CloudFront) DeleteFieldLevelEncryptionConfigWithContext(ctx aws.Context return out, req.Send() } -const opDeleteFieldLevelEncryptionProfile = "DeleteFieldLevelEncryptionProfile2018_06_18" +const opDeleteFieldLevelEncryptionProfile = "DeleteFieldLevelEncryptionProfile2018_11_05" // DeleteFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the // client's request for the DeleteFieldLevelEncryptionProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1475,12 +1493,12 @@ const opDeleteFieldLevelEncryptionProfile = "DeleteFieldLevelEncryptionProfile20 // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/DeleteFieldLevelEncryptionProfile +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteFieldLevelEncryptionProfile func (c *CloudFront) DeleteFieldLevelEncryptionProfileRequest(input *DeleteFieldLevelEncryptionProfileInput) (req *request.Request, output *DeleteFieldLevelEncryptionProfileOutput) { op := &request.Operation{ Name: opDeleteFieldLevelEncryptionProfile, HTTPMethod: "DELETE", - HTTPPath: "/2018-06-18/field-level-encryption-profile/{Id}", + HTTPPath: "/2018-11-05/field-level-encryption-profile/{Id}", } if input == nil { @@ -1489,8 +1507,7 @@ func (c *CloudFront) DeleteFieldLevelEncryptionProfileRequest(input *DeleteField output = &DeleteFieldLevelEncryptionProfileOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1522,7 +1539,7 @@ func (c *CloudFront) DeleteFieldLevelEncryptionProfileRequest(input *DeleteField // * ErrCodeFieldLevelEncryptionProfileInUse "FieldLevelEncryptionProfileInUse" // The specified profile for field-level encryption is in use. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/DeleteFieldLevelEncryptionProfile +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteFieldLevelEncryptionProfile func (c *CloudFront) DeleteFieldLevelEncryptionProfile(input *DeleteFieldLevelEncryptionProfileInput) (*DeleteFieldLevelEncryptionProfileOutput, error) { req, out := c.DeleteFieldLevelEncryptionProfileRequest(input) return out, req.Send() @@ -1544,12 +1561,12 @@ func (c *CloudFront) DeleteFieldLevelEncryptionProfileWithContext(ctx aws.Contex return out, req.Send() } -const opDeletePublicKey = "DeletePublicKey2018_06_18" +const opDeletePublicKey = "DeletePublicKey2018_11_05" // DeletePublicKeyRequest generates a "aws/request.Request" representing the // client's request for the DeletePublicKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1569,12 +1586,12 @@ const opDeletePublicKey = "DeletePublicKey2018_06_18" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/DeletePublicKey +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeletePublicKey func (c *CloudFront) DeletePublicKeyRequest(input *DeletePublicKeyInput) (req *request.Request, output *DeletePublicKeyOutput) { op := &request.Operation{ Name: opDeletePublicKey, HTTPMethod: "DELETE", - HTTPPath: "/2018-06-18/public-key/{Id}", + HTTPPath: "/2018-11-05/public-key/{Id}", } if input == nil { @@ -1583,8 +1600,7 @@ func (c *CloudFront) DeletePublicKeyRequest(input *DeletePublicKeyInput) (req *r output = &DeletePublicKeyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1616,7 +1632,7 @@ func (c *CloudFront) DeletePublicKeyRequest(input *DeletePublicKeyInput) (req *r // The precondition given in one or more of the request-header fields evaluated // to false. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/DeletePublicKey +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeletePublicKey func (c *CloudFront) DeletePublicKey(input *DeletePublicKeyInput) (*DeletePublicKeyOutput, error) { req, out := c.DeletePublicKeyRequest(input) return out, req.Send() @@ -1638,12 +1654,12 @@ func (c *CloudFront) DeletePublicKeyWithContext(ctx aws.Context, input *DeletePu return out, req.Send() } -const opDeleteStreamingDistribution = "DeleteStreamingDistribution2018_06_18" +const opDeleteStreamingDistribution = "DeleteStreamingDistribution2018_11_05" // DeleteStreamingDistributionRequest generates a "aws/request.Request" representing the // client's request for the DeleteStreamingDistribution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1663,12 +1679,12 @@ const opDeleteStreamingDistribution = "DeleteStreamingDistribution2018_06_18" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/DeleteStreamingDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteStreamingDistribution func (c *CloudFront) DeleteStreamingDistributionRequest(input *DeleteStreamingDistributionInput) (req *request.Request, output *DeleteStreamingDistributionOutput) { op := &request.Operation{ Name: opDeleteStreamingDistribution, HTTPMethod: "DELETE", - HTTPPath: "/2018-06-18/streaming-distribution/{Id}", + HTTPPath: "/2018-11-05/streaming-distribution/{Id}", } if input == nil { @@ -1677,8 +1693,7 @@ func (c *CloudFront) DeleteStreamingDistributionRequest(input *DeleteStreamingDi output = &DeleteStreamingDistributionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1744,7 +1759,7 @@ func (c *CloudFront) DeleteStreamingDistributionRequest(input *DeleteStreamingDi // The precondition given in one or more of the request-header fields evaluated // to false. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/DeleteStreamingDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/DeleteStreamingDistribution func (c *CloudFront) DeleteStreamingDistribution(input *DeleteStreamingDistributionInput) (*DeleteStreamingDistributionOutput, error) { req, out := c.DeleteStreamingDistributionRequest(input) return out, req.Send() @@ -1766,12 +1781,12 @@ func (c *CloudFront) DeleteStreamingDistributionWithContext(ctx aws.Context, inp return out, req.Send() } -const opGetCloudFrontOriginAccessIdentity = "GetCloudFrontOriginAccessIdentity2018_06_18" +const opGetCloudFrontOriginAccessIdentity = "GetCloudFrontOriginAccessIdentity2018_11_05" // GetCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the // client's request for the GetCloudFrontOriginAccessIdentity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1791,12 +1806,12 @@ const opGetCloudFrontOriginAccessIdentity = "GetCloudFrontOriginAccessIdentity20 // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetCloudFrontOriginAccessIdentity +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetCloudFrontOriginAccessIdentity func (c *CloudFront) GetCloudFrontOriginAccessIdentityRequest(input *GetCloudFrontOriginAccessIdentityInput) (req *request.Request, output *GetCloudFrontOriginAccessIdentityOutput) { op := &request.Operation{ Name: opGetCloudFrontOriginAccessIdentity, HTTPMethod: "GET", - HTTPPath: "/2018-06-18/origin-access-identity/cloudfront/{Id}", + HTTPPath: "/2018-11-05/origin-access-identity/cloudfront/{Id}", } if input == nil { @@ -1826,7 +1841,7 @@ func (c *CloudFront) GetCloudFrontOriginAccessIdentityRequest(input *GetCloudFro // * ErrCodeAccessDenied "AccessDenied" // Access denied. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetCloudFrontOriginAccessIdentity +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetCloudFrontOriginAccessIdentity func (c *CloudFront) GetCloudFrontOriginAccessIdentity(input *GetCloudFrontOriginAccessIdentityInput) (*GetCloudFrontOriginAccessIdentityOutput, error) { req, out := c.GetCloudFrontOriginAccessIdentityRequest(input) return out, req.Send() @@ -1848,12 +1863,12 @@ func (c *CloudFront) GetCloudFrontOriginAccessIdentityWithContext(ctx aws.Contex return out, req.Send() } -const opGetCloudFrontOriginAccessIdentityConfig = "GetCloudFrontOriginAccessIdentityConfig2018_06_18" +const opGetCloudFrontOriginAccessIdentityConfig = "GetCloudFrontOriginAccessIdentityConfig2018_11_05" // GetCloudFrontOriginAccessIdentityConfigRequest generates a "aws/request.Request" representing the // client's request for the GetCloudFrontOriginAccessIdentityConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1873,12 +1888,12 @@ const opGetCloudFrontOriginAccessIdentityConfig = "GetCloudFrontOriginAccessIden // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetCloudFrontOriginAccessIdentityConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetCloudFrontOriginAccessIdentityConfig func (c *CloudFront) GetCloudFrontOriginAccessIdentityConfigRequest(input *GetCloudFrontOriginAccessIdentityConfigInput) (req *request.Request, output *GetCloudFrontOriginAccessIdentityConfigOutput) { op := &request.Operation{ Name: opGetCloudFrontOriginAccessIdentityConfig, HTTPMethod: "GET", - HTTPPath: "/2018-06-18/origin-access-identity/cloudfront/{Id}/config", + HTTPPath: "/2018-11-05/origin-access-identity/cloudfront/{Id}/config", } if input == nil { @@ -1908,7 +1923,7 @@ func (c *CloudFront) GetCloudFrontOriginAccessIdentityConfigRequest(input *GetCl // * ErrCodeAccessDenied "AccessDenied" // Access denied. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetCloudFrontOriginAccessIdentityConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetCloudFrontOriginAccessIdentityConfig func (c *CloudFront) GetCloudFrontOriginAccessIdentityConfig(input *GetCloudFrontOriginAccessIdentityConfigInput) (*GetCloudFrontOriginAccessIdentityConfigOutput, error) { req, out := c.GetCloudFrontOriginAccessIdentityConfigRequest(input) return out, req.Send() @@ -1930,12 +1945,12 @@ func (c *CloudFront) GetCloudFrontOriginAccessIdentityConfigWithContext(ctx aws. return out, req.Send() } -const opGetDistribution = "GetDistribution2018_06_18" +const opGetDistribution = "GetDistribution2018_11_05" // GetDistributionRequest generates a "aws/request.Request" representing the // client's request for the GetDistribution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1955,12 +1970,12 @@ const opGetDistribution = "GetDistribution2018_06_18" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetDistribution func (c *CloudFront) GetDistributionRequest(input *GetDistributionInput) (req *request.Request, output *GetDistributionOutput) { op := &request.Operation{ Name: opGetDistribution, HTTPMethod: "GET", - HTTPPath: "/2018-06-18/distribution/{Id}", + HTTPPath: "/2018-11-05/distribution/{Id}", } if input == nil { @@ -1990,7 +2005,7 @@ func (c *CloudFront) GetDistributionRequest(input *GetDistributionInput) (req *r // * ErrCodeAccessDenied "AccessDenied" // Access denied. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetDistribution func (c *CloudFront) GetDistribution(input *GetDistributionInput) (*GetDistributionOutput, error) { req, out := c.GetDistributionRequest(input) return out, req.Send() @@ -2012,12 +2027,12 @@ func (c *CloudFront) GetDistributionWithContext(ctx aws.Context, input *GetDistr return out, req.Send() } -const opGetDistributionConfig = "GetDistributionConfig2018_06_18" +const opGetDistributionConfig = "GetDistributionConfig2018_11_05" // GetDistributionConfigRequest generates a "aws/request.Request" representing the // client's request for the GetDistributionConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2037,12 +2052,12 @@ const opGetDistributionConfig = "GetDistributionConfig2018_06_18" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetDistributionConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetDistributionConfig func (c *CloudFront) GetDistributionConfigRequest(input *GetDistributionConfigInput) (req *request.Request, output *GetDistributionConfigOutput) { op := &request.Operation{ Name: opGetDistributionConfig, HTTPMethod: "GET", - HTTPPath: "/2018-06-18/distribution/{Id}/config", + HTTPPath: "/2018-11-05/distribution/{Id}/config", } if input == nil { @@ -2072,7 +2087,7 @@ func (c *CloudFront) GetDistributionConfigRequest(input *GetDistributionConfigIn // * ErrCodeAccessDenied "AccessDenied" // Access denied. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetDistributionConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetDistributionConfig func (c *CloudFront) GetDistributionConfig(input *GetDistributionConfigInput) (*GetDistributionConfigOutput, error) { req, out := c.GetDistributionConfigRequest(input) return out, req.Send() @@ -2094,12 +2109,12 @@ func (c *CloudFront) GetDistributionConfigWithContext(ctx aws.Context, input *Ge return out, req.Send() } -const opGetFieldLevelEncryption = "GetFieldLevelEncryption2018_06_18" +const opGetFieldLevelEncryption = "GetFieldLevelEncryption2018_11_05" // GetFieldLevelEncryptionRequest generates a "aws/request.Request" representing the // client's request for the GetFieldLevelEncryption operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2119,12 +2134,12 @@ const opGetFieldLevelEncryption = "GetFieldLevelEncryption2018_06_18" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetFieldLevelEncryption +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryption func (c *CloudFront) GetFieldLevelEncryptionRequest(input *GetFieldLevelEncryptionInput) (req *request.Request, output *GetFieldLevelEncryptionOutput) { op := &request.Operation{ Name: opGetFieldLevelEncryption, HTTPMethod: "GET", - HTTPPath: "/2018-06-18/field-level-encryption/{Id}", + HTTPPath: "/2018-11-05/field-level-encryption/{Id}", } if input == nil { @@ -2154,7 +2169,7 @@ func (c *CloudFront) GetFieldLevelEncryptionRequest(input *GetFieldLevelEncrypti // * ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" // The specified configuration for field-level encryption doesn't exist. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetFieldLevelEncryption +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryption func (c *CloudFront) GetFieldLevelEncryption(input *GetFieldLevelEncryptionInput) (*GetFieldLevelEncryptionOutput, error) { req, out := c.GetFieldLevelEncryptionRequest(input) return out, req.Send() @@ -2176,12 +2191,12 @@ func (c *CloudFront) GetFieldLevelEncryptionWithContext(ctx aws.Context, input * return out, req.Send() } -const opGetFieldLevelEncryptionConfig = "GetFieldLevelEncryptionConfig2018_06_18" +const opGetFieldLevelEncryptionConfig = "GetFieldLevelEncryptionConfig2018_11_05" // GetFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the // client's request for the GetFieldLevelEncryptionConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2201,12 +2216,12 @@ const opGetFieldLevelEncryptionConfig = "GetFieldLevelEncryptionConfig2018_06_18 // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetFieldLevelEncryptionConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryptionConfig func (c *CloudFront) GetFieldLevelEncryptionConfigRequest(input *GetFieldLevelEncryptionConfigInput) (req *request.Request, output *GetFieldLevelEncryptionConfigOutput) { op := &request.Operation{ Name: opGetFieldLevelEncryptionConfig, HTTPMethod: "GET", - HTTPPath: "/2018-06-18/field-level-encryption/{Id}/config", + HTTPPath: "/2018-11-05/field-level-encryption/{Id}/config", } if input == nil { @@ -2236,7 +2251,7 @@ func (c *CloudFront) GetFieldLevelEncryptionConfigRequest(input *GetFieldLevelEn // * ErrCodeNoSuchFieldLevelEncryptionConfig "NoSuchFieldLevelEncryptionConfig" // The specified configuration for field-level encryption doesn't exist. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetFieldLevelEncryptionConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryptionConfig func (c *CloudFront) GetFieldLevelEncryptionConfig(input *GetFieldLevelEncryptionConfigInput) (*GetFieldLevelEncryptionConfigOutput, error) { req, out := c.GetFieldLevelEncryptionConfigRequest(input) return out, req.Send() @@ -2258,12 +2273,12 @@ func (c *CloudFront) GetFieldLevelEncryptionConfigWithContext(ctx aws.Context, i return out, req.Send() } -const opGetFieldLevelEncryptionProfile = "GetFieldLevelEncryptionProfile2018_06_18" +const opGetFieldLevelEncryptionProfile = "GetFieldLevelEncryptionProfile2018_11_05" // GetFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the // client's request for the GetFieldLevelEncryptionProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2283,12 +2298,12 @@ const opGetFieldLevelEncryptionProfile = "GetFieldLevelEncryptionProfile2018_06_ // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetFieldLevelEncryptionProfile +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryptionProfile func (c *CloudFront) GetFieldLevelEncryptionProfileRequest(input *GetFieldLevelEncryptionProfileInput) (req *request.Request, output *GetFieldLevelEncryptionProfileOutput) { op := &request.Operation{ Name: opGetFieldLevelEncryptionProfile, HTTPMethod: "GET", - HTTPPath: "/2018-06-18/field-level-encryption-profile/{Id}", + HTTPPath: "/2018-11-05/field-level-encryption-profile/{Id}", } if input == nil { @@ -2318,7 +2333,7 @@ func (c *CloudFront) GetFieldLevelEncryptionProfileRequest(input *GetFieldLevelE // * ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile" // The specified profile for field-level encryption doesn't exist. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetFieldLevelEncryptionProfile +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryptionProfile func (c *CloudFront) GetFieldLevelEncryptionProfile(input *GetFieldLevelEncryptionProfileInput) (*GetFieldLevelEncryptionProfileOutput, error) { req, out := c.GetFieldLevelEncryptionProfileRequest(input) return out, req.Send() @@ -2340,12 +2355,12 @@ func (c *CloudFront) GetFieldLevelEncryptionProfileWithContext(ctx aws.Context, return out, req.Send() } -const opGetFieldLevelEncryptionProfileConfig = "GetFieldLevelEncryptionProfileConfig2018_06_18" +const opGetFieldLevelEncryptionProfileConfig = "GetFieldLevelEncryptionProfileConfig2018_11_05" // GetFieldLevelEncryptionProfileConfigRequest generates a "aws/request.Request" representing the // client's request for the GetFieldLevelEncryptionProfileConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2365,12 +2380,12 @@ const opGetFieldLevelEncryptionProfileConfig = "GetFieldLevelEncryptionProfileCo // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetFieldLevelEncryptionProfileConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryptionProfileConfig func (c *CloudFront) GetFieldLevelEncryptionProfileConfigRequest(input *GetFieldLevelEncryptionProfileConfigInput) (req *request.Request, output *GetFieldLevelEncryptionProfileConfigOutput) { op := &request.Operation{ Name: opGetFieldLevelEncryptionProfileConfig, HTTPMethod: "GET", - HTTPPath: "/2018-06-18/field-level-encryption-profile/{Id}/config", + HTTPPath: "/2018-11-05/field-level-encryption-profile/{Id}/config", } if input == nil { @@ -2400,7 +2415,7 @@ func (c *CloudFront) GetFieldLevelEncryptionProfileConfigRequest(input *GetField // * ErrCodeNoSuchFieldLevelEncryptionProfile "NoSuchFieldLevelEncryptionProfile" // The specified profile for field-level encryption doesn't exist. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetFieldLevelEncryptionProfileConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetFieldLevelEncryptionProfileConfig func (c *CloudFront) GetFieldLevelEncryptionProfileConfig(input *GetFieldLevelEncryptionProfileConfigInput) (*GetFieldLevelEncryptionProfileConfigOutput, error) { req, out := c.GetFieldLevelEncryptionProfileConfigRequest(input) return out, req.Send() @@ -2422,12 +2437,12 @@ func (c *CloudFront) GetFieldLevelEncryptionProfileConfigWithContext(ctx aws.Con return out, req.Send() } -const opGetInvalidation = "GetInvalidation2018_06_18" +const opGetInvalidation = "GetInvalidation2018_11_05" // GetInvalidationRequest generates a "aws/request.Request" representing the // client's request for the GetInvalidation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2447,12 +2462,12 @@ const opGetInvalidation = "GetInvalidation2018_06_18" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetInvalidation +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetInvalidation func (c *CloudFront) GetInvalidationRequest(input *GetInvalidationInput) (req *request.Request, output *GetInvalidationOutput) { op := &request.Operation{ Name: opGetInvalidation, HTTPMethod: "GET", - HTTPPath: "/2018-06-18/distribution/{DistributionId}/invalidation/{Id}", + HTTPPath: "/2018-11-05/distribution/{DistributionId}/invalidation/{Id}", } if input == nil { @@ -2485,7 +2500,7 @@ func (c *CloudFront) GetInvalidationRequest(input *GetInvalidationInput) (req *r // * ErrCodeAccessDenied "AccessDenied" // Access denied. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetInvalidation +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetInvalidation func (c *CloudFront) GetInvalidation(input *GetInvalidationInput) (*GetInvalidationOutput, error) { req, out := c.GetInvalidationRequest(input) return out, req.Send() @@ -2507,12 +2522,12 @@ func (c *CloudFront) GetInvalidationWithContext(ctx aws.Context, input *GetInval return out, req.Send() } -const opGetPublicKey = "GetPublicKey2018_06_18" +const opGetPublicKey = "GetPublicKey2018_11_05" // GetPublicKeyRequest generates a "aws/request.Request" representing the // client's request for the GetPublicKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2532,12 +2547,12 @@ const opGetPublicKey = "GetPublicKey2018_06_18" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetPublicKey +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetPublicKey func (c *CloudFront) GetPublicKeyRequest(input *GetPublicKeyInput) (req *request.Request, output *GetPublicKeyOutput) { op := &request.Operation{ Name: opGetPublicKey, HTTPMethod: "GET", - HTTPPath: "/2018-06-18/public-key/{Id}", + HTTPPath: "/2018-11-05/public-key/{Id}", } if input == nil { @@ -2567,7 +2582,7 @@ func (c *CloudFront) GetPublicKeyRequest(input *GetPublicKeyInput) (req *request // * ErrCodeNoSuchPublicKey "NoSuchPublicKey" // The specified public key doesn't exist. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetPublicKey +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetPublicKey func (c *CloudFront) GetPublicKey(input *GetPublicKeyInput) (*GetPublicKeyOutput, error) { req, out := c.GetPublicKeyRequest(input) return out, req.Send() @@ -2589,12 +2604,12 @@ func (c *CloudFront) GetPublicKeyWithContext(ctx aws.Context, input *GetPublicKe return out, req.Send() } -const opGetPublicKeyConfig = "GetPublicKeyConfig2018_06_18" +const opGetPublicKeyConfig = "GetPublicKeyConfig2018_11_05" // GetPublicKeyConfigRequest generates a "aws/request.Request" representing the // client's request for the GetPublicKeyConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2614,12 +2629,12 @@ const opGetPublicKeyConfig = "GetPublicKeyConfig2018_06_18" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetPublicKeyConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetPublicKeyConfig func (c *CloudFront) GetPublicKeyConfigRequest(input *GetPublicKeyConfigInput) (req *request.Request, output *GetPublicKeyConfigOutput) { op := &request.Operation{ Name: opGetPublicKeyConfig, HTTPMethod: "GET", - HTTPPath: "/2018-06-18/public-key/{Id}/config", + HTTPPath: "/2018-11-05/public-key/{Id}/config", } if input == nil { @@ -2649,7 +2664,7 @@ func (c *CloudFront) GetPublicKeyConfigRequest(input *GetPublicKeyConfigInput) ( // * ErrCodeNoSuchPublicKey "NoSuchPublicKey" // The specified public key doesn't exist. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetPublicKeyConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetPublicKeyConfig func (c *CloudFront) GetPublicKeyConfig(input *GetPublicKeyConfigInput) (*GetPublicKeyConfigOutput, error) { req, out := c.GetPublicKeyConfigRequest(input) return out, req.Send() @@ -2671,12 +2686,12 @@ func (c *CloudFront) GetPublicKeyConfigWithContext(ctx aws.Context, input *GetPu return out, req.Send() } -const opGetStreamingDistribution = "GetStreamingDistribution2018_06_18" +const opGetStreamingDistribution = "GetStreamingDistribution2018_11_05" // GetStreamingDistributionRequest generates a "aws/request.Request" representing the // client's request for the GetStreamingDistribution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2696,12 +2711,12 @@ const opGetStreamingDistribution = "GetStreamingDistribution2018_06_18" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetStreamingDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetStreamingDistribution func (c *CloudFront) GetStreamingDistributionRequest(input *GetStreamingDistributionInput) (req *request.Request, output *GetStreamingDistributionOutput) { op := &request.Operation{ Name: opGetStreamingDistribution, HTTPMethod: "GET", - HTTPPath: "/2018-06-18/streaming-distribution/{Id}", + HTTPPath: "/2018-11-05/streaming-distribution/{Id}", } if input == nil { @@ -2732,7 +2747,7 @@ func (c *CloudFront) GetStreamingDistributionRequest(input *GetStreamingDistribu // * ErrCodeAccessDenied "AccessDenied" // Access denied. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetStreamingDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetStreamingDistribution func (c *CloudFront) GetStreamingDistribution(input *GetStreamingDistributionInput) (*GetStreamingDistributionOutput, error) { req, out := c.GetStreamingDistributionRequest(input) return out, req.Send() @@ -2754,12 +2769,12 @@ func (c *CloudFront) GetStreamingDistributionWithContext(ctx aws.Context, input return out, req.Send() } -const opGetStreamingDistributionConfig = "GetStreamingDistributionConfig2018_06_18" +const opGetStreamingDistributionConfig = "GetStreamingDistributionConfig2018_11_05" // GetStreamingDistributionConfigRequest generates a "aws/request.Request" representing the // client's request for the GetStreamingDistributionConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2779,12 +2794,12 @@ const opGetStreamingDistributionConfig = "GetStreamingDistributionConfig2018_06_ // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetStreamingDistributionConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetStreamingDistributionConfig func (c *CloudFront) GetStreamingDistributionConfigRequest(input *GetStreamingDistributionConfigInput) (req *request.Request, output *GetStreamingDistributionConfigOutput) { op := &request.Operation{ Name: opGetStreamingDistributionConfig, HTTPMethod: "GET", - HTTPPath: "/2018-06-18/streaming-distribution/{Id}/config", + HTTPPath: "/2018-11-05/streaming-distribution/{Id}/config", } if input == nil { @@ -2814,7 +2829,7 @@ func (c *CloudFront) GetStreamingDistributionConfigRequest(input *GetStreamingDi // * ErrCodeAccessDenied "AccessDenied" // Access denied. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/GetStreamingDistributionConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/GetStreamingDistributionConfig func (c *CloudFront) GetStreamingDistributionConfig(input *GetStreamingDistributionConfigInput) (*GetStreamingDistributionConfigOutput, error) { req, out := c.GetStreamingDistributionConfigRequest(input) return out, req.Send() @@ -2836,12 +2851,12 @@ func (c *CloudFront) GetStreamingDistributionConfigWithContext(ctx aws.Context, return out, req.Send() } -const opListCloudFrontOriginAccessIdentities = "ListCloudFrontOriginAccessIdentities2018_06_18" +const opListCloudFrontOriginAccessIdentities = "ListCloudFrontOriginAccessIdentities2018_11_05" // ListCloudFrontOriginAccessIdentitiesRequest generates a "aws/request.Request" representing the // client's request for the ListCloudFrontOriginAccessIdentities operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2861,12 +2876,12 @@ const opListCloudFrontOriginAccessIdentities = "ListCloudFrontOriginAccessIdenti // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListCloudFrontOriginAccessIdentities +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListCloudFrontOriginAccessIdentities func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesRequest(input *ListCloudFrontOriginAccessIdentitiesInput) (req *request.Request, output *ListCloudFrontOriginAccessIdentitiesOutput) { op := &request.Operation{ Name: opListCloudFrontOriginAccessIdentities, HTTPMethod: "GET", - HTTPPath: "/2018-06-18/origin-access-identity/cloudfront", + HTTPPath: "/2018-11-05/origin-access-identity/cloudfront", Paginator: &request.Paginator{ InputTokens: []string{"Marker"}, OutputTokens: []string{"CloudFrontOriginAccessIdentityList.NextMarker"}, @@ -2899,7 +2914,7 @@ func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesRequest(input *ListClou // * ErrCodeInvalidArgument "InvalidArgument" // The argument is invalid. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListCloudFrontOriginAccessIdentities +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListCloudFrontOriginAccessIdentities func (c *CloudFront) ListCloudFrontOriginAccessIdentities(input *ListCloudFrontOriginAccessIdentitiesInput) (*ListCloudFrontOriginAccessIdentitiesOutput, error) { req, out := c.ListCloudFrontOriginAccessIdentitiesRequest(input) return out, req.Send() @@ -2971,12 +2986,12 @@ func (c *CloudFront) ListCloudFrontOriginAccessIdentitiesPagesWithContext(ctx aw return p.Err() } -const opListDistributions = "ListDistributions2018_06_18" +const opListDistributions = "ListDistributions2018_11_05" // ListDistributionsRequest generates a "aws/request.Request" representing the // client's request for the ListDistributions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2996,12 +3011,12 @@ const opListDistributions = "ListDistributions2018_06_18" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListDistributions +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListDistributions func (c *CloudFront) ListDistributionsRequest(input *ListDistributionsInput) (req *request.Request, output *ListDistributionsOutput) { op := &request.Operation{ Name: opListDistributions, HTTPMethod: "GET", - HTTPPath: "/2018-06-18/distribution", + HTTPPath: "/2018-11-05/distribution", Paginator: &request.Paginator{ InputTokens: []string{"Marker"}, OutputTokens: []string{"DistributionList.NextMarker"}, @@ -3034,7 +3049,7 @@ func (c *CloudFront) ListDistributionsRequest(input *ListDistributionsInput) (re // * ErrCodeInvalidArgument "InvalidArgument" // The argument is invalid. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListDistributions +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListDistributions func (c *CloudFront) ListDistributions(input *ListDistributionsInput) (*ListDistributionsOutput, error) { req, out := c.ListDistributionsRequest(input) return out, req.Send() @@ -3106,12 +3121,12 @@ func (c *CloudFront) ListDistributionsPagesWithContext(ctx aws.Context, input *L return p.Err() } -const opListDistributionsByWebACLId = "ListDistributionsByWebACLId2018_06_18" +const opListDistributionsByWebACLId = "ListDistributionsByWebACLId2018_11_05" // ListDistributionsByWebACLIdRequest generates a "aws/request.Request" representing the // client's request for the ListDistributionsByWebACLId operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3131,12 +3146,12 @@ const opListDistributionsByWebACLId = "ListDistributionsByWebACLId2018_06_18" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListDistributionsByWebACLId +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListDistributionsByWebACLId func (c *CloudFront) ListDistributionsByWebACLIdRequest(input *ListDistributionsByWebACLIdInput) (req *request.Request, output *ListDistributionsByWebACLIdOutput) { op := &request.Operation{ Name: opListDistributionsByWebACLId, HTTPMethod: "GET", - HTTPPath: "/2018-06-18/distributionsByWebACLId/{WebACLId}", + HTTPPath: "/2018-11-05/distributionsByWebACLId/{WebACLId}", } if input == nil { @@ -3165,7 +3180,7 @@ func (c *CloudFront) ListDistributionsByWebACLIdRequest(input *ListDistributions // // * ErrCodeInvalidWebACLId "InvalidWebACLId" // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListDistributionsByWebACLId +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListDistributionsByWebACLId func (c *CloudFront) ListDistributionsByWebACLId(input *ListDistributionsByWebACLIdInput) (*ListDistributionsByWebACLIdOutput, error) { req, out := c.ListDistributionsByWebACLIdRequest(input) return out, req.Send() @@ -3187,12 +3202,12 @@ func (c *CloudFront) ListDistributionsByWebACLIdWithContext(ctx aws.Context, inp return out, req.Send() } -const opListFieldLevelEncryptionConfigs = "ListFieldLevelEncryptionConfigs2018_06_18" +const opListFieldLevelEncryptionConfigs = "ListFieldLevelEncryptionConfigs2018_11_05" // ListFieldLevelEncryptionConfigsRequest generates a "aws/request.Request" representing the // client's request for the ListFieldLevelEncryptionConfigs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3212,12 +3227,12 @@ const opListFieldLevelEncryptionConfigs = "ListFieldLevelEncryptionConfigs2018_0 // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListFieldLevelEncryptionConfigs +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListFieldLevelEncryptionConfigs func (c *CloudFront) ListFieldLevelEncryptionConfigsRequest(input *ListFieldLevelEncryptionConfigsInput) (req *request.Request, output *ListFieldLevelEncryptionConfigsOutput) { op := &request.Operation{ Name: opListFieldLevelEncryptionConfigs, HTTPMethod: "GET", - HTTPPath: "/2018-06-18/field-level-encryption", + HTTPPath: "/2018-11-05/field-level-encryption", } if input == nil { @@ -3245,7 +3260,7 @@ func (c *CloudFront) ListFieldLevelEncryptionConfigsRequest(input *ListFieldLeve // * ErrCodeInvalidArgument "InvalidArgument" // The argument is invalid. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListFieldLevelEncryptionConfigs +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListFieldLevelEncryptionConfigs func (c *CloudFront) ListFieldLevelEncryptionConfigs(input *ListFieldLevelEncryptionConfigsInput) (*ListFieldLevelEncryptionConfigsOutput, error) { req, out := c.ListFieldLevelEncryptionConfigsRequest(input) return out, req.Send() @@ -3267,12 +3282,12 @@ func (c *CloudFront) ListFieldLevelEncryptionConfigsWithContext(ctx aws.Context, return out, req.Send() } -const opListFieldLevelEncryptionProfiles = "ListFieldLevelEncryptionProfiles2018_06_18" +const opListFieldLevelEncryptionProfiles = "ListFieldLevelEncryptionProfiles2018_11_05" // ListFieldLevelEncryptionProfilesRequest generates a "aws/request.Request" representing the // client's request for the ListFieldLevelEncryptionProfiles operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3292,12 +3307,12 @@ const opListFieldLevelEncryptionProfiles = "ListFieldLevelEncryptionProfiles2018 // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListFieldLevelEncryptionProfiles +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListFieldLevelEncryptionProfiles func (c *CloudFront) ListFieldLevelEncryptionProfilesRequest(input *ListFieldLevelEncryptionProfilesInput) (req *request.Request, output *ListFieldLevelEncryptionProfilesOutput) { op := &request.Operation{ Name: opListFieldLevelEncryptionProfiles, HTTPMethod: "GET", - HTTPPath: "/2018-06-18/field-level-encryption-profile", + HTTPPath: "/2018-11-05/field-level-encryption-profile", } if input == nil { @@ -3325,7 +3340,7 @@ func (c *CloudFront) ListFieldLevelEncryptionProfilesRequest(input *ListFieldLev // * ErrCodeInvalidArgument "InvalidArgument" // The argument is invalid. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListFieldLevelEncryptionProfiles +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListFieldLevelEncryptionProfiles func (c *CloudFront) ListFieldLevelEncryptionProfiles(input *ListFieldLevelEncryptionProfilesInput) (*ListFieldLevelEncryptionProfilesOutput, error) { req, out := c.ListFieldLevelEncryptionProfilesRequest(input) return out, req.Send() @@ -3347,12 +3362,12 @@ func (c *CloudFront) ListFieldLevelEncryptionProfilesWithContext(ctx aws.Context return out, req.Send() } -const opListInvalidations = "ListInvalidations2018_06_18" +const opListInvalidations = "ListInvalidations2018_11_05" // ListInvalidationsRequest generates a "aws/request.Request" representing the // client's request for the ListInvalidations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3372,12 +3387,12 @@ const opListInvalidations = "ListInvalidations2018_06_18" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListInvalidations +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListInvalidations func (c *CloudFront) ListInvalidationsRequest(input *ListInvalidationsInput) (req *request.Request, output *ListInvalidationsOutput) { op := &request.Operation{ Name: opListInvalidations, HTTPMethod: "GET", - HTTPPath: "/2018-06-18/distribution/{DistributionId}/invalidation", + HTTPPath: "/2018-11-05/distribution/{DistributionId}/invalidation", Paginator: &request.Paginator{ InputTokens: []string{"Marker"}, OutputTokens: []string{"InvalidationList.NextMarker"}, @@ -3416,7 +3431,7 @@ func (c *CloudFront) ListInvalidationsRequest(input *ListInvalidationsInput) (re // * ErrCodeAccessDenied "AccessDenied" // Access denied. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListInvalidations +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListInvalidations func (c *CloudFront) ListInvalidations(input *ListInvalidationsInput) (*ListInvalidationsOutput, error) { req, out := c.ListInvalidationsRequest(input) return out, req.Send() @@ -3488,12 +3503,12 @@ func (c *CloudFront) ListInvalidationsPagesWithContext(ctx aws.Context, input *L return p.Err() } -const opListPublicKeys = "ListPublicKeys2018_06_18" +const opListPublicKeys = "ListPublicKeys2018_11_05" // ListPublicKeysRequest generates a "aws/request.Request" representing the // client's request for the ListPublicKeys operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3513,12 +3528,12 @@ const opListPublicKeys = "ListPublicKeys2018_06_18" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListPublicKeys +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListPublicKeys func (c *CloudFront) ListPublicKeysRequest(input *ListPublicKeysInput) (req *request.Request, output *ListPublicKeysOutput) { op := &request.Operation{ Name: opListPublicKeys, HTTPMethod: "GET", - HTTPPath: "/2018-06-18/public-key", + HTTPPath: "/2018-11-05/public-key", } if input == nil { @@ -3545,7 +3560,7 @@ func (c *CloudFront) ListPublicKeysRequest(input *ListPublicKeysInput) (req *req // * ErrCodeInvalidArgument "InvalidArgument" // The argument is invalid. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListPublicKeys +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListPublicKeys func (c *CloudFront) ListPublicKeys(input *ListPublicKeysInput) (*ListPublicKeysOutput, error) { req, out := c.ListPublicKeysRequest(input) return out, req.Send() @@ -3567,12 +3582,12 @@ func (c *CloudFront) ListPublicKeysWithContext(ctx aws.Context, input *ListPubli return out, req.Send() } -const opListStreamingDistributions = "ListStreamingDistributions2018_06_18" +const opListStreamingDistributions = "ListStreamingDistributions2018_11_05" // ListStreamingDistributionsRequest generates a "aws/request.Request" representing the // client's request for the ListStreamingDistributions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3592,12 +3607,12 @@ const opListStreamingDistributions = "ListStreamingDistributions2018_06_18" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListStreamingDistributions +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListStreamingDistributions func (c *CloudFront) ListStreamingDistributionsRequest(input *ListStreamingDistributionsInput) (req *request.Request, output *ListStreamingDistributionsOutput) { op := &request.Operation{ Name: opListStreamingDistributions, HTTPMethod: "GET", - HTTPPath: "/2018-06-18/streaming-distribution", + HTTPPath: "/2018-11-05/streaming-distribution", Paginator: &request.Paginator{ InputTokens: []string{"Marker"}, OutputTokens: []string{"StreamingDistributionList.NextMarker"}, @@ -3630,7 +3645,7 @@ func (c *CloudFront) ListStreamingDistributionsRequest(input *ListStreamingDistr // * ErrCodeInvalidArgument "InvalidArgument" // The argument is invalid. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListStreamingDistributions +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListStreamingDistributions func (c *CloudFront) ListStreamingDistributions(input *ListStreamingDistributionsInput) (*ListStreamingDistributionsOutput, error) { req, out := c.ListStreamingDistributionsRequest(input) return out, req.Send() @@ -3702,12 +3717,12 @@ func (c *CloudFront) ListStreamingDistributionsPagesWithContext(ctx aws.Context, return p.Err() } -const opListTagsForResource = "ListTagsForResource2018_06_18" +const opListTagsForResource = "ListTagsForResource2018_11_05" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3727,12 +3742,12 @@ const opListTagsForResource = "ListTagsForResource2018_06_18" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListTagsForResource +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListTagsForResource func (c *CloudFront) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { op := &request.Operation{ Name: opListTagsForResource, HTTPMethod: "GET", - HTTPPath: "/2018-06-18/tagging", + HTTPPath: "/2018-11-05/tagging", } if input == nil { @@ -3766,7 +3781,7 @@ func (c *CloudFront) ListTagsForResourceRequest(input *ListTagsForResourceInput) // // * ErrCodeNoSuchResource "NoSuchResource" // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/ListTagsForResource +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/ListTagsForResource func (c *CloudFront) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { req, out := c.ListTagsForResourceRequest(input) return out, req.Send() @@ -3788,12 +3803,12 @@ func (c *CloudFront) ListTagsForResourceWithContext(ctx aws.Context, input *List return out, req.Send() } -const opTagResource = "TagResource2018_06_18" +const opTagResource = "TagResource2018_11_05" // TagResourceRequest generates a "aws/request.Request" representing the // client's request for the TagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3813,12 +3828,12 @@ const opTagResource = "TagResource2018_06_18" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/TagResource +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/TagResource func (c *CloudFront) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { op := &request.Operation{ Name: opTagResource, HTTPMethod: "POST", - HTTPPath: "/2018-06-18/tagging?Operation=Tag", + HTTPPath: "/2018-11-05/tagging?Operation=Tag", } if input == nil { @@ -3827,8 +3842,7 @@ func (c *CloudFront) TagResourceRequest(input *TagResourceInput) (req *request.R output = &TagResourceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3854,7 +3868,7 @@ func (c *CloudFront) TagResourceRequest(input *TagResourceInput) (req *request.R // // * ErrCodeNoSuchResource "NoSuchResource" // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/TagResource +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/TagResource func (c *CloudFront) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { req, out := c.TagResourceRequest(input) return out, req.Send() @@ -3876,12 +3890,12 @@ func (c *CloudFront) TagResourceWithContext(ctx aws.Context, input *TagResourceI return out, req.Send() } -const opUntagResource = "UntagResource2018_06_18" +const opUntagResource = "UntagResource2018_11_05" // UntagResourceRequest generates a "aws/request.Request" representing the // client's request for the UntagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3901,12 +3915,12 @@ const opUntagResource = "UntagResource2018_06_18" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/UntagResource +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UntagResource func (c *CloudFront) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { op := &request.Operation{ Name: opUntagResource, HTTPMethod: "POST", - HTTPPath: "/2018-06-18/tagging?Operation=Untag", + HTTPPath: "/2018-11-05/tagging?Operation=Untag", } if input == nil { @@ -3915,8 +3929,7 @@ func (c *CloudFront) UntagResourceRequest(input *UntagResourceInput) (req *reque output = &UntagResourceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3942,7 +3955,7 @@ func (c *CloudFront) UntagResourceRequest(input *UntagResourceInput) (req *reque // // * ErrCodeNoSuchResource "NoSuchResource" // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/UntagResource +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UntagResource func (c *CloudFront) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { req, out := c.UntagResourceRequest(input) return out, req.Send() @@ -3964,12 +3977,12 @@ func (c *CloudFront) UntagResourceWithContext(ctx aws.Context, input *UntagResou return out, req.Send() } -const opUpdateCloudFrontOriginAccessIdentity = "UpdateCloudFrontOriginAccessIdentity2018_06_18" +const opUpdateCloudFrontOriginAccessIdentity = "UpdateCloudFrontOriginAccessIdentity2018_11_05" // UpdateCloudFrontOriginAccessIdentityRequest generates a "aws/request.Request" representing the // client's request for the UpdateCloudFrontOriginAccessIdentity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3989,12 +4002,12 @@ const opUpdateCloudFrontOriginAccessIdentity = "UpdateCloudFrontOriginAccessIden // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/UpdateCloudFrontOriginAccessIdentity +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateCloudFrontOriginAccessIdentity func (c *CloudFront) UpdateCloudFrontOriginAccessIdentityRequest(input *UpdateCloudFrontOriginAccessIdentityInput) (req *request.Request, output *UpdateCloudFrontOriginAccessIdentityOutput) { op := &request.Operation{ Name: opUpdateCloudFrontOriginAccessIdentity, HTTPMethod: "PUT", - HTTPPath: "/2018-06-18/origin-access-identity/cloudfront/{Id}/config", + HTTPPath: "/2018-11-05/origin-access-identity/cloudfront/{Id}/config", } if input == nil { @@ -4044,7 +4057,7 @@ func (c *CloudFront) UpdateCloudFrontOriginAccessIdentityRequest(input *UpdateCl // * ErrCodeInconsistentQuantities "InconsistentQuantities" // The value of Quantity and the size of Items don't match. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/UpdateCloudFrontOriginAccessIdentity +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateCloudFrontOriginAccessIdentity func (c *CloudFront) UpdateCloudFrontOriginAccessIdentity(input *UpdateCloudFrontOriginAccessIdentityInput) (*UpdateCloudFrontOriginAccessIdentityOutput, error) { req, out := c.UpdateCloudFrontOriginAccessIdentityRequest(input) return out, req.Send() @@ -4066,12 +4079,12 @@ func (c *CloudFront) UpdateCloudFrontOriginAccessIdentityWithContext(ctx aws.Con return out, req.Send() } -const opUpdateDistribution = "UpdateDistribution2018_06_18" +const opUpdateDistribution = "UpdateDistribution2018_11_05" // UpdateDistributionRequest generates a "aws/request.Request" representing the // client's request for the UpdateDistribution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4091,12 +4104,12 @@ const opUpdateDistribution = "UpdateDistribution2018_06_18" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/UpdateDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateDistribution func (c *CloudFront) UpdateDistributionRequest(input *UpdateDistributionInput) (req *request.Request, output *UpdateDistributionOutput) { op := &request.Operation{ Name: opUpdateDistribution, HTTPMethod: "PUT", - HTTPPath: "/2018-06-18/distribution/{Id}/config", + HTTPPath: "/2018-11-05/distribution/{Id}/config", } if input == nil { @@ -4110,11 +4123,22 @@ func (c *CloudFront) UpdateDistributionRequest(input *UpdateDistributionInput) ( // UpdateDistribution API operation for Amazon CloudFront. // -// Updates the configuration for a web distribution. Perform the following steps. +// Updates the configuration for a web distribution. // -// For information about updating a distribution using the CloudFront console, -// see Creating or Updating a Web Distribution Using the CloudFront Console -// (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-creating-console.html) +// When you update a distribution, there are more required fields than when +// you create a distribution. When you update your distribution by using this +// API action, follow the steps here to get the current configuration and then +// make your updates, to make sure that you include all of the required fields. +// To view a summary, see Required Fields for Create Distribution and Update +// Distribution (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-overview-required-fields.html) +// in the Amazon CloudFront Developer Guide. +// +// The update process includes getting the current distribution configuration, +// updating the XML document that is returned to make your changes, and then +// submitting an UpdateDistribution request to make the updates. +// +// For information about updating a distribution using the CloudFront console +// instead, see Creating a Distribution (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-creating-console.html) // in the Amazon CloudFront Developer Guide. // // To update a web distribution using the CloudFront API @@ -4122,15 +4146,25 @@ func (c *CloudFront) UpdateDistributionRequest(input *UpdateDistributionInput) ( // Submit a GetDistributionConfig request to get the current configuration and // an Etag header for the distribution. // -// If you update the distribution again, you need to get a new Etag header. +// If you update the distribution again, you must get a new Etag header. // // Update the XML document that was returned in the response to your GetDistributionConfig -// request to include the desired changes. You can't change the value of CallerReference. -// If you try to change this value, CloudFront returns an IllegalUpdate error. -// Note that you must strip out the ETag parameter that is returned. +// request to include your changes. +// +// When you edit the XML file, be aware of the following: +// +// You must strip out the ETag parameter that is returned. +// +// Additional fields are required when you update a distribution. There may +// be fields included in the XML file for features that you haven't configured +// for your distribution. This is expected and required to successfully update +// the distribution. +// +// You can't change the value of CallerReference. If you try to change this +// value, CloudFront returns an IllegalUpdate error. // // The new configuration replaces the existing configuration; the values that -// you specify in an UpdateDistribution request are not merged into the existing +// you specify in an UpdateDistribution request are not merged into your existing // configuration. When you add, delete, or replace values in an element that // allows multiple values (for example, CNAME), you must specify all of the // values that you want to appear in the updated distribution. In addition, @@ -4152,16 +4186,6 @@ func (c *CloudFront) UpdateDistributionRequest(input *UpdateDistributionInput) ( // Optional: Submit a GetDistribution request to confirm that your changes have // propagated. When propagation is complete, the value of Status is Deployed. // -// Beginning with the 2012-05-05 version of the CloudFront API, we made substantial -// changes to the format of the XML document that you include in the request -// body when you create or update a distribution. With previous versions of -// the API, we discovered that it was too easy to accidentally delete one or -// more values for an element that accepts multiple values, for example, CNAMEs -// and trusted signers. Our changes for the 2012-05-05 release are intended -// to prevent these accidental deletions and to notify you when there's a mismatch -// between the number of values you say you're specifying in the Quantity element -// and the number of values you're actually specifying. -// // 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. @@ -4233,6 +4257,10 @@ func (c *CloudFront) UpdateDistributionRequest(input *UpdateDistributionInput) ( // * ErrCodeTooManyOrigins "TooManyOrigins" // You cannot create more origins for the distribution. // +// * ErrCodeTooManyOriginGroupsPerDistribution "TooManyOriginGroupsPerDistribution" +// Processing your request would cause you to exceed the maximum number of origin +// groups allowed. +// // * ErrCodeTooManyCacheBehaviors "TooManyCacheBehaviors" // You cannot create more cache behaviors for the distribution. // @@ -4296,7 +4324,7 @@ func (c *CloudFront) UpdateDistributionRequest(input *UpdateDistributionInput) ( // The maximum number of distributions have been associated with the specified // configuration for field-level encryption. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/UpdateDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateDistribution func (c *CloudFront) UpdateDistribution(input *UpdateDistributionInput) (*UpdateDistributionOutput, error) { req, out := c.UpdateDistributionRequest(input) return out, req.Send() @@ -4318,12 +4346,12 @@ func (c *CloudFront) UpdateDistributionWithContext(ctx aws.Context, input *Updat return out, req.Send() } -const opUpdateFieldLevelEncryptionConfig = "UpdateFieldLevelEncryptionConfig2018_06_18" +const opUpdateFieldLevelEncryptionConfig = "UpdateFieldLevelEncryptionConfig2018_11_05" // UpdateFieldLevelEncryptionConfigRequest generates a "aws/request.Request" representing the // client's request for the UpdateFieldLevelEncryptionConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4343,12 +4371,12 @@ const opUpdateFieldLevelEncryptionConfig = "UpdateFieldLevelEncryptionConfig2018 // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/UpdateFieldLevelEncryptionConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateFieldLevelEncryptionConfig func (c *CloudFront) UpdateFieldLevelEncryptionConfigRequest(input *UpdateFieldLevelEncryptionConfigInput) (req *request.Request, output *UpdateFieldLevelEncryptionConfigOutput) { op := &request.Operation{ Name: opUpdateFieldLevelEncryptionConfig, HTTPMethod: "PUT", - HTTPPath: "/2018-06-18/field-level-encryption/{Id}/config", + HTTPPath: "/2018-11-05/field-level-encryption/{Id}/config", } if input == nil { @@ -4408,7 +4436,7 @@ func (c *CloudFront) UpdateFieldLevelEncryptionConfigRequest(input *UpdateFieldL // * ErrCodeQueryArgProfileEmpty "QueryArgProfileEmpty" // No profile specified for the field-level encryption query argument. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/UpdateFieldLevelEncryptionConfig +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateFieldLevelEncryptionConfig func (c *CloudFront) UpdateFieldLevelEncryptionConfig(input *UpdateFieldLevelEncryptionConfigInput) (*UpdateFieldLevelEncryptionConfigOutput, error) { req, out := c.UpdateFieldLevelEncryptionConfigRequest(input) return out, req.Send() @@ -4430,12 +4458,12 @@ func (c *CloudFront) UpdateFieldLevelEncryptionConfigWithContext(ctx aws.Context return out, req.Send() } -const opUpdateFieldLevelEncryptionProfile = "UpdateFieldLevelEncryptionProfile2018_06_18" +const opUpdateFieldLevelEncryptionProfile = "UpdateFieldLevelEncryptionProfile2018_11_05" // UpdateFieldLevelEncryptionProfileRequest generates a "aws/request.Request" representing the // client's request for the UpdateFieldLevelEncryptionProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4455,12 +4483,12 @@ const opUpdateFieldLevelEncryptionProfile = "UpdateFieldLevelEncryptionProfile20 // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/UpdateFieldLevelEncryptionProfile +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateFieldLevelEncryptionProfile func (c *CloudFront) UpdateFieldLevelEncryptionProfileRequest(input *UpdateFieldLevelEncryptionProfileInput) (req *request.Request, output *UpdateFieldLevelEncryptionProfileOutput) { op := &request.Operation{ Name: opUpdateFieldLevelEncryptionProfile, HTTPMethod: "PUT", - HTTPPath: "/2018-06-18/field-level-encryption-profile/{Id}/config", + HTTPPath: "/2018-11-05/field-level-encryption-profile/{Id}/config", } if input == nil { @@ -4523,7 +4551,7 @@ func (c *CloudFront) UpdateFieldLevelEncryptionProfileRequest(input *UpdateField // The maximum number of field patterns for field-level encryption have been // created. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/UpdateFieldLevelEncryptionProfile +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateFieldLevelEncryptionProfile func (c *CloudFront) UpdateFieldLevelEncryptionProfile(input *UpdateFieldLevelEncryptionProfileInput) (*UpdateFieldLevelEncryptionProfileOutput, error) { req, out := c.UpdateFieldLevelEncryptionProfileRequest(input) return out, req.Send() @@ -4545,12 +4573,12 @@ func (c *CloudFront) UpdateFieldLevelEncryptionProfileWithContext(ctx aws.Contex return out, req.Send() } -const opUpdatePublicKey = "UpdatePublicKey2018_06_18" +const opUpdatePublicKey = "UpdatePublicKey2018_11_05" // UpdatePublicKeyRequest generates a "aws/request.Request" representing the // client's request for the UpdatePublicKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4570,12 +4598,12 @@ const opUpdatePublicKey = "UpdatePublicKey2018_06_18" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/UpdatePublicKey +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdatePublicKey func (c *CloudFront) UpdatePublicKeyRequest(input *UpdatePublicKeyInput) (req *request.Request, output *UpdatePublicKeyOutput) { op := &request.Operation{ Name: opUpdatePublicKey, HTTPMethod: "PUT", - HTTPPath: "/2018-06-18/public-key/{Id}/config", + HTTPPath: "/2018-11-05/public-key/{Id}/config", } if input == nil { @@ -4622,7 +4650,7 @@ func (c *CloudFront) UpdatePublicKeyRequest(input *UpdatePublicKeyInput) (req *r // The precondition given in one or more of the request-header fields evaluated // to false. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/UpdatePublicKey +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdatePublicKey func (c *CloudFront) UpdatePublicKey(input *UpdatePublicKeyInput) (*UpdatePublicKeyOutput, error) { req, out := c.UpdatePublicKeyRequest(input) return out, req.Send() @@ -4644,12 +4672,12 @@ func (c *CloudFront) UpdatePublicKeyWithContext(ctx aws.Context, input *UpdatePu return out, req.Send() } -const opUpdateStreamingDistribution = "UpdateStreamingDistribution2018_06_18" +const opUpdateStreamingDistribution = "UpdateStreamingDistribution2018_11_05" // UpdateStreamingDistributionRequest generates a "aws/request.Request" representing the // client's request for the UpdateStreamingDistribution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4669,12 +4697,12 @@ const opUpdateStreamingDistribution = "UpdateStreamingDistribution2018_06_18" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/UpdateStreamingDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateStreamingDistribution func (c *CloudFront) UpdateStreamingDistributionRequest(input *UpdateStreamingDistributionInput) (req *request.Request, output *UpdateStreamingDistributionOutput) { op := &request.Operation{ Name: opUpdateStreamingDistribution, HTTPMethod: "PUT", - HTTPPath: "/2018-06-18/streaming-distribution/{Id}/config", + HTTPPath: "/2018-11-05/streaming-distribution/{Id}/config", } if input == nil { @@ -4737,7 +4765,7 @@ func (c *CloudFront) UpdateStreamingDistributionRequest(input *UpdateStreamingDi // * ErrCodeInconsistentQuantities "InconsistentQuantities" // The value of Quantity and the size of Items don't match. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18/UpdateStreamingDistribution +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05/UpdateStreamingDistribution func (c *CloudFront) UpdateStreamingDistribution(input *UpdateStreamingDistributionInput) (*UpdateStreamingDistributionOutput, error) { req, out := c.UpdateStreamingDistributionRequest(input) return out, req.Send() @@ -5723,7 +5751,7 @@ type CreateCloudFrontOriginAccessIdentityInput struct { // The current configuration information for the identity. // // CloudFrontOriginAccessIdentityConfig is a required field - CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `locationName:"CloudFrontOriginAccessIdentityConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` + CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `locationName:"CloudFrontOriginAccessIdentityConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` } // String returns the string representation @@ -5810,7 +5838,7 @@ type CreateDistributionInput struct { // The distribution's configuration information. // // DistributionConfig is a required field - DistributionConfig *DistributionConfig `locationName:"DistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` + DistributionConfig *DistributionConfig `locationName:"DistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` } // String returns the string representation @@ -5897,7 +5925,7 @@ type CreateDistributionWithTagsInput struct { // The distribution's configuration information. // // DistributionConfigWithTags is a required field - DistributionConfigWithTags *DistributionConfigWithTags `locationName:"DistributionConfigWithTags" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` + DistributionConfigWithTags *DistributionConfigWithTags `locationName:"DistributionConfigWithTags" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` } // String returns the string representation @@ -5983,7 +6011,7 @@ type CreateFieldLevelEncryptionConfigInput struct { // The request to create a new field-level encryption configuration. // // FieldLevelEncryptionConfig is a required field - FieldLevelEncryptionConfig *FieldLevelEncryptionConfig `locationName:"FieldLevelEncryptionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` + FieldLevelEncryptionConfig *FieldLevelEncryptionConfig `locationName:"FieldLevelEncryptionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` } // String returns the string representation @@ -6069,7 +6097,7 @@ type CreateFieldLevelEncryptionProfileInput struct { // The request to create a field-level encryption profile. // // FieldLevelEncryptionProfileConfig is a required field - FieldLevelEncryptionProfileConfig *FieldLevelEncryptionProfileConfig `locationName:"FieldLevelEncryptionProfileConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` + FieldLevelEncryptionProfileConfig *FieldLevelEncryptionProfileConfig `locationName:"FieldLevelEncryptionProfileConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` } // String returns the string representation @@ -6160,7 +6188,7 @@ type CreateInvalidationInput struct { // The batch information for the invalidation. // // InvalidationBatch is a required field - InvalidationBatch *InvalidationBatch `locationName:"InvalidationBatch" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` + InvalidationBatch *InvalidationBatch `locationName:"InvalidationBatch" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` } // String returns the string representation @@ -6179,6 +6207,9 @@ func (s *CreateInvalidationInput) Validate() error { if s.DistributionId == nil { invalidParams.Add(request.NewErrParamRequired("DistributionId")) } + if s.DistributionId != nil && len(*s.DistributionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DistributionId", 1)) + } if s.InvalidationBatch == nil { invalidParams.Add(request.NewErrParamRequired("InvalidationBatch")) } @@ -6246,7 +6277,7 @@ type CreatePublicKeyInput struct { // The request to add a public key to CloudFront. // // PublicKeyConfig is a required field - PublicKeyConfig *PublicKeyConfig `locationName:"PublicKeyConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` + PublicKeyConfig *PublicKeyConfig `locationName:"PublicKeyConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` } // String returns the string representation @@ -6332,7 +6363,7 @@ type CreateStreamingDistributionInput struct { // The streaming distribution's configuration information. // // StreamingDistributionConfig is a required field - StreamingDistributionConfig *StreamingDistributionConfig `locationName:"StreamingDistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` + StreamingDistributionConfig *StreamingDistributionConfig `locationName:"StreamingDistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` } // String returns the string representation @@ -6419,7 +6450,7 @@ type CreateStreamingDistributionWithTagsInput struct { // The streaming distribution's configuration information. // // StreamingDistributionConfigWithTags is a required field - StreamingDistributionConfigWithTags *StreamingDistributionConfigWithTags `locationName:"StreamingDistributionConfigWithTags" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` + StreamingDistributionConfigWithTags *StreamingDistributionConfigWithTags `locationName:"StreamingDistributionConfigWithTags" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` } // String returns the string representation @@ -6460,6 +6491,7 @@ func (s *CreateStreamingDistributionWithTagsInput) SetStreamingDistributionConfi type CreateStreamingDistributionWithTagsOutput struct { _ struct{} `type:"structure" payload:"StreamingDistribution"` + // The current version of the distribution created. ETag *string `location:"header" locationName:"ETag" type:"string"` // The fully qualified URI of the new streaming distribution resource just created. @@ -7156,6 +7188,9 @@ func (s *DeleteCloudFrontOriginAccessIdentityInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -7253,6 +7288,9 @@ func (s *DeleteDistributionInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -7315,6 +7353,9 @@ func (s *DeleteFieldLevelEncryptionConfigInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -7377,6 +7418,9 @@ func (s *DeleteFieldLevelEncryptionProfileInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -7439,6 +7483,9 @@ func (s *DeletePublicKeyInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -7502,6 +7549,9 @@ func (s *DeleteStreamingDistributionInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -7666,14 +7716,9 @@ type DistributionConfig struct { // If the value of CallerReference is new (regardless of the content of the // DistributionConfig object), CloudFront creates a new distribution. // - // If CallerReference is a value you already sent in a previous request to create - // a distribution, and if the content of the DistributionConfig is identical - // to the original request (ignoring white space), CloudFront returns the same - // the response that it returned to the original request. - // - // If CallerReference is a value you already sent in a previous request to create - // a distribution but the content of the DistributionConfig is different from - // the original request, CloudFront returns a DistributionAlreadyExists error. + // If CallerReference is a value that you already sent in a previous request + // to create a distribution, CloudFront returns a DistributionAlreadyExists + // error. // // CallerReference is a required field CallerReference *string `type:"string" required:"true"` @@ -7790,6 +7835,9 @@ type DistributionConfig struct { // in the Amazon CloudFront Developer Guide. Logging *LoggingConfig `type:"structure"` + // A complex type that contains information about origin groups for this distribution. + OriginGroups *OriginGroups `type:"structure"` + // A complex type that contains information about origins for this distribution. // // Origins is a required field @@ -7973,6 +8021,11 @@ func (s *DistributionConfig) Validate() error { invalidParams.AddNested("Logging", err.(request.ErrInvalidParams)) } } + if s.OriginGroups != nil { + if err := s.OriginGroups.Validate(); err != nil { + invalidParams.AddNested("OriginGroups", err.(request.ErrInvalidParams)) + } + } if s.Origins != nil { if err := s.Origins.Validate(); err != nil { invalidParams.AddNested("Origins", err.(request.ErrInvalidParams)) @@ -8056,6 +8109,12 @@ func (s *DistributionConfig) SetLogging(v *LoggingConfig) *DistributionConfig { return s } +// SetOriginGroups sets the OriginGroups field's value. +func (s *DistributionConfig) SetOriginGroups(v *OriginGroups) *DistributionConfig { + s.OriginGroups = v + return s +} + // SetOrigins sets the Origins field's value. func (s *DistributionConfig) SetOrigins(v *Origins) *DistributionConfig { s.Origins = v @@ -8304,11 +8363,17 @@ type DistributionSummary struct { // LastModifiedTime is a required field LastModifiedTime *time.Time `type:"timestamp" required:"true"` + // A complex type that contains information about origin groups for this distribution. + OriginGroups *OriginGroups `type:"structure"` + // A complex type that contains information about origins for this distribution. // // Origins is a required field Origins *Origins `type:"structure" required:"true"` + // A complex type that contains information about price class for this streaming + // distribution. + // // PriceClass is a required field PriceClass *string `type:"string" required:"true" enum:"PriceClass"` @@ -8502,6 +8567,12 @@ func (s *DistributionSummary) SetLastModifiedTime(v time.Time) *DistributionSumm return s } +// SetOriginGroups sets the OriginGroups field's value. +func (s *DistributionSummary) SetOriginGroups(v *OriginGroups) *DistributionSummary { + s.OriginGroups = v + return s +} + // SetOrigins sets the Origins field's value. func (s *DistributionSummary) SetOrigins(v *Origins) *DistributionSummary { s.Origins = v @@ -8923,7 +8994,7 @@ func (s *FieldLevelEncryptionProfile) SetLastModifiedTime(v time.Time) *FieldLev type FieldLevelEncryptionProfileConfig struct { _ struct{} `type:"structure"` - // A unique number that ensures the request can't be replayed. + // A unique number that ensures that the request can't be replayed. // // CallerReference is a required field CallerReference *string `type:"string" required:"true"` @@ -9471,6 +9542,9 @@ func (s *GetCloudFrontOriginAccessIdentityConfigInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -9543,6 +9617,9 @@ func (s *GetCloudFrontOriginAccessIdentityInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -9616,6 +9693,9 @@ func (s *GetDistributionConfigInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -9688,6 +9768,9 @@ func (s *GetDistributionInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -9759,6 +9842,9 @@ func (s *GetFieldLevelEncryptionConfigInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -9830,6 +9916,9 @@ func (s *GetFieldLevelEncryptionInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -9901,6 +9990,9 @@ func (s *GetFieldLevelEncryptionProfileConfigInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -9972,6 +10064,9 @@ func (s *GetFieldLevelEncryptionProfileInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -10048,9 +10143,15 @@ func (s *GetInvalidationInput) Validate() error { if s.DistributionId == nil { invalidParams.Add(request.NewErrParamRequired("DistributionId")) } + if s.DistributionId != nil && len(*s.DistributionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DistributionId", 1)) + } if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -10120,6 +10221,9 @@ func (s *GetPublicKeyConfigInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -10190,6 +10294,9 @@ func (s *GetPublicKeyInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -10261,6 +10368,9 @@ func (s *GetStreamingDistributionConfigInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -10333,6 +10443,9 @@ func (s *GetStreamingDistributionInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -10691,6 +10804,8 @@ func (s *InvalidationList) SetQuantity(v int64) *InvalidationList { type InvalidationSummary struct { _ struct{} `type:"structure"` + // The time that an invalidation request was created. + // // CreateTime is a required field CreateTime *time.Time `type:"timestamp" required:"true"` @@ -10795,9 +10910,6 @@ type LambdaFunctionAssociation struct { // from the origin and before it caches the object in the response. When // the requested object is in the edge cache, the function doesn't execute. // - // If the origin returns an HTTP status code other than HTTP 200 (OK), the function - // doesn't execute. - // // * viewer-response: The function executes before CloudFront returns the // requested object to the viewer. The function executes regardless of whether // the object was already in the edge cache. @@ -10809,7 +10921,8 @@ type LambdaFunctionAssociation struct { EventType *string `type:"string" required:"true" enum:"EventType"` // A flag that allows a Lambda function to have read access to the body content. - // For more information, see Accessing Body Content (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/) + // For more information, see Accessing the Request Body by Choosing the Include + // Body Option (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-include-body-access.html) // in the Amazon CloudFront Developer Guide. IncludeBody *bool `type:"boolean"` @@ -11034,6 +11147,9 @@ func (s *ListDistributionsByWebACLIdInput) Validate() error { if s.WebACLId == nil { invalidParams.Add(request.NewErrParamRequired("WebACLId")) } + if s.WebACLId != nil && len(*s.WebACLId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("WebACLId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -11306,6 +11422,9 @@ func (s *ListInvalidationsInput) Validate() error { if s.DistributionId == nil { invalidParams.Add(request.NewErrParamRequired("DistributionId")) } + if s.DistributionId != nil && len(*s.DistributionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DistributionId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -11631,12 +11750,13 @@ func (s *LoggingConfig) SetPrefix(v string) *LoggingConfig { return s } -// A complex type that describes the Amazon S3 bucket or the HTTP server (for -// example, a web server) from which CloudFront gets your files. You must create -// at least one origin. +// A complex type that describes the Amazon S3 bucket, HTTP server (for example, +// a web server), Amazon MediaStore, or other server from which CloudFront gets +// your files. This can also be an origin group, if you've created an origin +// group. You must specify at least one origin or origin group. // -// For the current limit on the number of origins that you can create for a -// distribution, see Amazon CloudFront Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_cloudfront) +// For the current limit on the number of origins or origin groups that you +// can specify for a distribution, see Amazon CloudFront Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_cloudfront) // in the AWS General Reference. type Origin struct { _ struct{} `type:"structure"` @@ -11654,6 +11774,10 @@ type Origin struct { // If you set up your bucket to be configured as a website endpoint, enter the // Amazon S3 static website hosting endpoint for the bucket. // + // For more information about specifying this value for different types of origins, + // see Origin Domain Name (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesDomainName) + // in the Amazon CloudFront Developer Guide. + // // Constraints for Amazon S3 origins: // // * If you configured Amazon S3 Transfer Acceleration for your bucket, don't @@ -11679,8 +11803,8 @@ type Origin struct { // DomainName is a required field DomainName *string `type:"string" required:"true"` - // A unique identifier for the origin. The value of Id must be unique within - // the distribution. + // A unique identifier for the origin or origin group. The value of Id must + // be unique within the distribution. // // When you specify the value of TargetOriginId for the default cache behavior // or for another cache behavior, you indicate the origin to which you want @@ -11849,10 +11973,12 @@ func (s *OriginAccessIdentity) SetS3CanonicalUserId(v string) *OriginAccessIdent type OriginAccessIdentityConfig struct { _ struct{} `type:"structure"` - // A unique number that ensures the request can't be replayed. + // A unique value (for example, a date-time stamp) that ensures that the request + // can't be replayed. // - // If the CallerReference is new (no matter the content of the CloudFrontOriginAccessIdentityConfig - // object), a new origin access identity is created. + // If the value of CallerReference is new (regardless of the content of the + // CloudFrontOriginAccessIdentityConfig object), a new origin access identity + // is created. // // If the CallerReference is a value already sent in a previous identity request, // and the content of the CloudFrontOriginAccessIdentityConfig is identical @@ -12112,6 +12238,299 @@ func (s *OriginCustomHeader) SetHeaderValue(v string) *OriginCustomHeader { return s } +// An origin group includes two origins (a primary origin and a second origin +// to failover to) and a failover criteria that you specify. You create an origin +// group to support origin failover in CloudFront. When you create or update +// a distribution, you can specifiy the origin group instead of a single origin, +// and CloudFront will failover from the primary origin to the second origin +// under the failover conditions that you've chosen. +type OriginGroup struct { + _ struct{} `type:"structure"` + + // A complex type that contains information about the failover criteria for + // an origin group. + // + // FailoverCriteria is a required field + FailoverCriteria *OriginGroupFailoverCriteria `type:"structure" required:"true"` + + // The origin group's ID. + // + // Id is a required field + Id *string `type:"string" required:"true"` + + // A complex type that contains information about the origins in an origin group. + // + // Members is a required field + Members *OriginGroupMembers `type:"structure" required:"true"` +} + +// String returns the string representation +func (s OriginGroup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OriginGroup) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *OriginGroup) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OriginGroup"} + if s.FailoverCriteria == nil { + invalidParams.Add(request.NewErrParamRequired("FailoverCriteria")) + } + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Members == nil { + invalidParams.Add(request.NewErrParamRequired("Members")) + } + if s.FailoverCriteria != nil { + if err := s.FailoverCriteria.Validate(); err != nil { + invalidParams.AddNested("FailoverCriteria", err.(request.ErrInvalidParams)) + } + } + if s.Members != nil { + if err := s.Members.Validate(); err != nil { + invalidParams.AddNested("Members", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFailoverCriteria sets the FailoverCriteria field's value. +func (s *OriginGroup) SetFailoverCriteria(v *OriginGroupFailoverCriteria) *OriginGroup { + s.FailoverCriteria = v + return s +} + +// SetId sets the Id field's value. +func (s *OriginGroup) SetId(v string) *OriginGroup { + s.Id = &v + return s +} + +// SetMembers sets the Members field's value. +func (s *OriginGroup) SetMembers(v *OriginGroupMembers) *OriginGroup { + s.Members = v + return s +} + +// A complex data type that includes information about the failover criteria +// for an origin group, including the status codes for which CloudFront will +// failover from the primary origin to the second origin. +type OriginGroupFailoverCriteria struct { + _ struct{} `type:"structure"` + + // The status codes that, when returned from the primary origin, will trigger + // CloudFront to failover to the second origin. + // + // StatusCodes is a required field + StatusCodes *StatusCodes `type:"structure" required:"true"` +} + +// String returns the string representation +func (s OriginGroupFailoverCriteria) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OriginGroupFailoverCriteria) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *OriginGroupFailoverCriteria) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OriginGroupFailoverCriteria"} + if s.StatusCodes == nil { + invalidParams.Add(request.NewErrParamRequired("StatusCodes")) + } + if s.StatusCodes != nil { + if err := s.StatusCodes.Validate(); err != nil { + invalidParams.AddNested("StatusCodes", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetStatusCodes sets the StatusCodes field's value. +func (s *OriginGroupFailoverCriteria) SetStatusCodes(v *StatusCodes) *OriginGroupFailoverCriteria { + s.StatusCodes = v + return s +} + +// An origin in an origin group. +type OriginGroupMember struct { + _ struct{} `type:"structure"` + + // The ID for an origin in an origin group. + // + // OriginId is a required field + OriginId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s OriginGroupMember) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OriginGroupMember) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *OriginGroupMember) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OriginGroupMember"} + if s.OriginId == nil { + invalidParams.Add(request.NewErrParamRequired("OriginId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetOriginId sets the OriginId field's value. +func (s *OriginGroupMember) SetOriginId(v string) *OriginGroupMember { + s.OriginId = &v + return s +} + +// A complex data type for the origins included in an origin group. +type OriginGroupMembers struct { + _ struct{} `type:"structure"` + + // Items (origins) in an origin group. + // + // Items is a required field + Items []*OriginGroupMember `locationNameList:"OriginGroupMember" min:"2" type:"list" required:"true"` + + // The number of origins in an origin group. + // + // Quantity is a required field + Quantity *int64 `type:"integer" required:"true"` +} + +// String returns the string representation +func (s OriginGroupMembers) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OriginGroupMembers) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *OriginGroupMembers) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OriginGroupMembers"} + if s.Items == nil { + invalidParams.Add(request.NewErrParamRequired("Items")) + } + if s.Items != nil && len(s.Items) < 2 { + invalidParams.Add(request.NewErrParamMinLen("Items", 2)) + } + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) + } + if s.Items != nil { + for i, v := range s.Items { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetItems sets the Items field's value. +func (s *OriginGroupMembers) SetItems(v []*OriginGroupMember) *OriginGroupMembers { + s.Items = v + return s +} + +// SetQuantity sets the Quantity field's value. +func (s *OriginGroupMembers) SetQuantity(v int64) *OriginGroupMembers { + s.Quantity = &v + return s +} + +// A complex data type for the origin groups specified for a distribution. +type OriginGroups struct { + _ struct{} `type:"structure"` + + // The items (origin groups) in a distribution. + Items []*OriginGroup `locationNameList:"OriginGroup" type:"list"` + + // The number of origin groups. + // + // Quantity is a required field + Quantity *int64 `type:"integer" required:"true"` +} + +// String returns the string representation +func (s OriginGroups) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OriginGroups) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *OriginGroups) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OriginGroups"} + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) + } + if s.Items != nil { + for i, v := range s.Items { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Items", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetItems sets the Items field's value. +func (s *OriginGroups) SetItems(v []*OriginGroup) *OriginGroups { + s.Items = v + return s +} + +// SetQuantity sets the Quantity field's value. +func (s *OriginGroups) SetQuantity(v int64) *OriginGroups { + s.Quantity = &v + return s +} + // A complex type that contains information about the SSL/TLS protocols that // CloudFront can use when establishing an HTTPS connection with your origin. type OriginSslProtocols struct { @@ -12167,14 +12586,17 @@ func (s *OriginSslProtocols) SetQuantity(v int64) *OriginSslProtocols { return s } -// A complex type that contains information about origins for this distribution. +// A complex type that contains information about origins and origin groups +// for this distribution. type Origins struct { _ struct{} `type:"structure"` - // A complex type that contains origins for this distribution. - Items []*Origin `locationNameList:"Origin" min:"1" type:"list"` + // A complex type that contains origins or origin groups for this distribution. + // + // Items is a required field + Items []*Origin `locationNameList:"Origin" min:"1" type:"list" required:"true"` - // The number of origins for this distribution. + // The number of origins or origin groups for this distribution. // // Quantity is a required field Quantity *int64 `type:"integer" required:"true"` @@ -12193,6 +12615,9 @@ func (s Origins) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *Origins) Validate() error { invalidParams := request.ErrInvalidParams{Context: "Origins"} + if s.Items == nil { + invalidParams.Add(request.NewErrParamRequired("Items")) + } if s.Items != nil && len(s.Items) < 1 { invalidParams.Add(request.NewErrParamMinLen("Items", 1)) } @@ -12334,7 +12759,7 @@ func (s *PublicKey) SetPublicKeyConfig(v *PublicKeyConfig) *PublicKey { type PublicKeyConfig struct { _ struct{} `type:"structure"` - // A unique number that ensures the request can't be replayed. + // A unique number that ensures that the request can't be replayed. // // CallerReference is a required field CallerReference *string `type:"string" required:"true"` @@ -12468,7 +12893,7 @@ func (s *PublicKeyList) SetQuantity(v int64) *PublicKeyList { return s } -// Public key information summary. +// A complex data type for public key information. type PublicKeySummary struct { _ struct{} `type:"structure"` @@ -12969,10 +13394,70 @@ func (s *Signer) SetKeyPairIds(v *KeyPairIds) *Signer { return s } +// A complex data type for the status codes that you specify that, when returned +// by a primary origin, trigger CloudFront to failover to a second origin. +type StatusCodes struct { + _ struct{} `type:"structure"` + + // The items (status codes) for an origin group. + // + // Items is a required field + Items []*int64 `locationNameList:"StatusCode" min:"1" type:"list" required:"true"` + + // The number of status codes. + // + // Quantity is a required field + Quantity *int64 `type:"integer" required:"true"` +} + +// String returns the string representation +func (s StatusCodes) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StatusCodes) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StatusCodes) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StatusCodes"} + if s.Items == nil { + invalidParams.Add(request.NewErrParamRequired("Items")) + } + if s.Items != nil && len(s.Items) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Items", 1)) + } + if s.Quantity == nil { + invalidParams.Add(request.NewErrParamRequired("Quantity")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetItems sets the Items field's value. +func (s *StatusCodes) SetItems(v []*int64) *StatusCodes { + s.Items = v + return s +} + +// SetQuantity sets the Quantity field's value. +func (s *StatusCodes) SetQuantity(v int64) *StatusCodes { + s.Quantity = &v + return s +} + // A streaming distribution. type StreamingDistribution struct { _ struct{} `type:"structure"` + // The ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, + // where 123456789012 is your AWS account ID. + // // ARN is a required field ARN *string `type:"string" required:"true"` @@ -13078,16 +13563,15 @@ type StreamingDistributionConfig struct { // if any, for this streaming distribution. Aliases *Aliases `type:"structure"` - // A unique number that ensures that the request can't be replayed. If the CallerReference - // is new (no matter the content of the StreamingDistributionConfig object), - // a new streaming distribution is created. If the CallerReference is a value - // that you already sent in a previous request to create a streaming distribution, - // and the content of the StreamingDistributionConfig is identical to the original - // request (ignoring white space), the response includes the same information - // returned to the original request. If the CallerReference is a value that - // you already sent in a previous request to create a streaming distribution - // but the content of the StreamingDistributionConfig is different from the - // original request, CloudFront returns a DistributionAlreadyExists error. + // A unique value (for example, a date-time stamp) that ensures that the request + // can't be replayed. + // + // If the value of CallerReference is new (regardless of the content of the + // StreamingDistributionConfig object), CloudFront creates a new distribution. + // + // If CallerReference is a value that you already sent in a previous request + // to create a distribution, CloudFront returns a DistributionAlreadyExists + // error. // // CallerReference is a required field CallerReference *string `type:"string" required:"true"` @@ -13697,7 +14181,7 @@ type TagResourceInput struct { // A complex type that contains zero or more Tag elements. // // Tags is a required field - Tags *Tags `locationName:"Tags" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` + Tags *Tags `locationName:"Tags" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` } // String returns the string representation @@ -13894,7 +14378,7 @@ type UntagResourceInput struct { // A complex type that contains zero or more Tag key elements. // // TagKeys is a required field - TagKeys *TagKeys `locationName:"TagKeys" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` + TagKeys *TagKeys `locationName:"TagKeys" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` } // String returns the string representation @@ -13956,7 +14440,7 @@ type UpdateCloudFrontOriginAccessIdentityInput struct { // The identity's configuration information. // // CloudFrontOriginAccessIdentityConfig is a required field - CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `locationName:"CloudFrontOriginAccessIdentityConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` + CloudFrontOriginAccessIdentityConfig *OriginAccessIdentityConfig `locationName:"CloudFrontOriginAccessIdentityConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` // The identity's id. // @@ -13987,6 +14471,9 @@ func (s *UpdateCloudFrontOriginAccessIdentityInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if s.CloudFrontOriginAccessIdentityConfig != nil { if err := s.CloudFrontOriginAccessIdentityConfig.Validate(); err != nil { invalidParams.AddNested("CloudFrontOriginAccessIdentityConfig", err.(request.ErrInvalidParams)) @@ -14057,7 +14544,7 @@ type UpdateDistributionInput struct { // The distribution's configuration information. // // DistributionConfig is a required field - DistributionConfig *DistributionConfig `locationName:"DistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` + DistributionConfig *DistributionConfig `locationName:"DistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` // The distribution's id. // @@ -14088,6 +14575,9 @@ func (s *UpdateDistributionInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if s.DistributionConfig != nil { if err := s.DistributionConfig.Validate(); err != nil { invalidParams.AddNested("DistributionConfig", err.(request.ErrInvalidParams)) @@ -14157,7 +14647,7 @@ type UpdateFieldLevelEncryptionConfigInput struct { // Request to update a field-level encryption configuration. // // FieldLevelEncryptionConfig is a required field - FieldLevelEncryptionConfig *FieldLevelEncryptionConfig `locationName:"FieldLevelEncryptionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` + FieldLevelEncryptionConfig *FieldLevelEncryptionConfig `locationName:"FieldLevelEncryptionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` // The ID of the configuration you want to update. // @@ -14188,6 +14678,9 @@ func (s *UpdateFieldLevelEncryptionConfigInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if s.FieldLevelEncryptionConfig != nil { if err := s.FieldLevelEncryptionConfig.Validate(); err != nil { invalidParams.AddNested("FieldLevelEncryptionConfig", err.(request.ErrInvalidParams)) @@ -14257,7 +14750,7 @@ type UpdateFieldLevelEncryptionProfileInput struct { // Request to update a field-level encryption profile. // // FieldLevelEncryptionProfileConfig is a required field - FieldLevelEncryptionProfileConfig *FieldLevelEncryptionProfileConfig `locationName:"FieldLevelEncryptionProfileConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` + FieldLevelEncryptionProfileConfig *FieldLevelEncryptionProfileConfig `locationName:"FieldLevelEncryptionProfileConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` // The ID of the field-level encryption profile request. // @@ -14288,6 +14781,9 @@ func (s *UpdateFieldLevelEncryptionProfileInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if s.FieldLevelEncryptionProfileConfig != nil { if err := s.FieldLevelEncryptionProfileConfig.Validate(); err != nil { invalidParams.AddNested("FieldLevelEncryptionProfileConfig", err.(request.ErrInvalidParams)) @@ -14365,7 +14861,7 @@ type UpdatePublicKeyInput struct { // Request to update public key information. // // PublicKeyConfig is a required field - PublicKeyConfig *PublicKeyConfig `locationName:"PublicKeyConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` + PublicKeyConfig *PublicKeyConfig `locationName:"PublicKeyConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` } // String returns the string representation @@ -14384,6 +14880,9 @@ func (s *UpdatePublicKeyInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if s.PublicKeyConfig == nil { invalidParams.Add(request.NewErrParamRequired("PublicKeyConfig")) } @@ -14465,7 +14964,7 @@ type UpdateStreamingDistributionInput struct { // The streaming distribution's configuration information. // // StreamingDistributionConfig is a required field - StreamingDistributionConfig *StreamingDistributionConfig `locationName:"StreamingDistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-06-18/"` + StreamingDistributionConfig *StreamingDistributionConfig `locationName:"StreamingDistributionConfig" type:"structure" required:"true" xmlURI:"http://cloudfront.amazonaws.com/doc/2018-11-05/"` } // String returns the string representation @@ -14484,6 +14983,9 @@ func (s *UpdateStreamingDistributionInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if s.StreamingDistributionConfig == nil { invalidParams.Add(request.NewErrParamRequired("StreamingDistributionConfig")) } diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/doc.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/doc.go index 0a43196210..27960eab4d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/doc.go @@ -8,7 +8,7 @@ // errors. For detailed information about CloudFront features, see the Amazon // CloudFront Developer Guide. // -// See https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-06-18 for more information on this service. +// See https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2018-11-05 for more information on this service. // // See cloudfront package documentation for more information. // https://docs.aws.amazon.com/sdk-for-go/api/service/cloudfront/ diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/errors.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/errors.go index ede41494f3..7cedc1e46b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/errors.go @@ -425,6 +425,13 @@ const ( // "TooManyOriginCustomHeaders". ErrCodeTooManyOriginCustomHeaders = "TooManyOriginCustomHeaders" + // ErrCodeTooManyOriginGroupsPerDistribution for service response error code + // "TooManyOriginGroupsPerDistribution". + // + // Processing your request would cause you to exceed the maximum number of origin + // groups allowed. + ErrCodeTooManyOriginGroupsPerDistribution = "TooManyOriginGroupsPerDistribution" + // ErrCodeTooManyOrigins for service response error code // "TooManyOrigins". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/service.go index 24b06e0a0f..7fe4399ded 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudfront/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudfront/service.go @@ -60,7 +60,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio SigningName: signingName, SigningRegion: signingRegion, Endpoint: endpoint, - APIVersion: "2018-06-18", + APIVersion: "2018-11-05", }, handlers, ), diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/api.go new file mode 100644 index 0000000000..30dcd7da91 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/api.go @@ -0,0 +1,3073 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package cloudhsmv2 + +import ( + "fmt" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" +) + +const opCopyBackupToRegion = "CopyBackupToRegion" + +// CopyBackupToRegionRequest generates a "aws/request.Request" representing the +// client's request for the CopyBackupToRegion 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 CopyBackupToRegion for more information on using the CopyBackupToRegion +// 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 CopyBackupToRegionRequest method. +// req, resp := client.CopyBackupToRegionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CopyBackupToRegion +func (c *CloudHSMV2) CopyBackupToRegionRequest(input *CopyBackupToRegionInput) (req *request.Request, output *CopyBackupToRegionOutput) { + op := &request.Operation{ + Name: opCopyBackupToRegion, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CopyBackupToRegionInput{} + } + + output = &CopyBackupToRegionOutput{} + req = c.newRequest(op, input, output) + return +} + +// CopyBackupToRegion API operation for AWS CloudHSM V2. +// +// Copy an AWS CloudHSM cluster backup to a different 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. +// +// See the AWS API reference guide for AWS CloudHSM V2's +// API operation CopyBackupToRegion for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" +// The request was rejected because of an AWS CloudHSM internal failure. The +// request can be retried. +// +// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" +// The request was rejected because an error occurred. +// +// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" +// The request was rejected because it refers to a resource that cannot be found. +// +// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" +// The request was rejected because it is not a valid request. +// +// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" +// The request was rejected because the requester does not have permission to +// perform the requested operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CopyBackupToRegion +func (c *CloudHSMV2) CopyBackupToRegion(input *CopyBackupToRegionInput) (*CopyBackupToRegionOutput, error) { + req, out := c.CopyBackupToRegionRequest(input) + return out, req.Send() +} + +// CopyBackupToRegionWithContext is the same as CopyBackupToRegion with the addition of +// the ability to pass a context and additional request options. +// +// See CopyBackupToRegion 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 *CloudHSMV2) CopyBackupToRegionWithContext(ctx aws.Context, input *CopyBackupToRegionInput, opts ...request.Option) (*CopyBackupToRegionOutput, error) { + req, out := c.CopyBackupToRegionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateCluster = "CreateCluster" + +// CreateClusterRequest generates a "aws/request.Request" representing the +// client's request for the CreateCluster 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 CreateCluster for more information on using the CreateCluster +// 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 CreateClusterRequest method. +// req, resp := client.CreateClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CreateCluster +func (c *CloudHSMV2) CreateClusterRequest(input *CreateClusterInput) (req *request.Request, output *CreateClusterOutput) { + op := &request.Operation{ + Name: opCreateCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateClusterInput{} + } + + output = &CreateClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateCluster API operation for AWS CloudHSM V2. +// +// Creates a new AWS CloudHSM cluster. +// +// 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 CloudHSM V2's +// API operation CreateCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" +// The request was rejected because of an AWS CloudHSM internal failure. The +// request can be retried. +// +// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" +// The request was rejected because an error occurred. +// +// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" +// The request was rejected because it refers to a resource that cannot be found. +// +// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" +// The request was rejected because it is not a valid request. +// +// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" +// The request was rejected because the requester does not have permission to +// perform the requested operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CreateCluster +func (c *CloudHSMV2) CreateCluster(input *CreateClusterInput) (*CreateClusterOutput, error) { + req, out := c.CreateClusterRequest(input) + return out, req.Send() +} + +// CreateClusterWithContext is the same as CreateCluster with the addition of +// the ability to pass a context and additional request options. +// +// See CreateCluster 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 *CloudHSMV2) CreateClusterWithContext(ctx aws.Context, input *CreateClusterInput, opts ...request.Option) (*CreateClusterOutput, error) { + req, out := c.CreateClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateHsm = "CreateHsm" + +// CreateHsmRequest generates a "aws/request.Request" representing the +// client's request for the CreateHsm 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 CreateHsm for more information on using the CreateHsm +// 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 CreateHsmRequest method. +// req, resp := client.CreateHsmRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CreateHsm +func (c *CloudHSMV2) CreateHsmRequest(input *CreateHsmInput) (req *request.Request, output *CreateHsmOutput) { + op := &request.Operation{ + Name: opCreateHsm, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateHsmInput{} + } + + output = &CreateHsmOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateHsm API operation for AWS CloudHSM V2. +// +// Creates a new hardware security module (HSM) in the specified AWS CloudHSM +// cluster. +// +// 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 CloudHSM V2's +// API operation CreateHsm for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" +// The request was rejected because of an AWS CloudHSM internal failure. The +// request can be retried. +// +// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" +// The request was rejected because an error occurred. +// +// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" +// The request was rejected because it is not a valid request. +// +// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" +// The request was rejected because it refers to a resource that cannot be found. +// +// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" +// The request was rejected because the requester does not have permission to +// perform the requested operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CreateHsm +func (c *CloudHSMV2) CreateHsm(input *CreateHsmInput) (*CreateHsmOutput, error) { + req, out := c.CreateHsmRequest(input) + return out, req.Send() +} + +// CreateHsmWithContext is the same as CreateHsm with the addition of +// the ability to pass a context and additional request options. +// +// See CreateHsm 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 *CloudHSMV2) CreateHsmWithContext(ctx aws.Context, input *CreateHsmInput, opts ...request.Option) (*CreateHsmOutput, error) { + req, out := c.CreateHsmRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteBackup = "DeleteBackup" + +// DeleteBackupRequest generates a "aws/request.Request" representing the +// client's request for the DeleteBackup 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 DeleteBackup for more information on using the DeleteBackup +// 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 DeleteBackupRequest method. +// req, resp := client.DeleteBackupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteBackup +func (c *CloudHSMV2) DeleteBackupRequest(input *DeleteBackupInput) (req *request.Request, output *DeleteBackupOutput) { + op := &request.Operation{ + Name: opDeleteBackup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteBackupInput{} + } + + output = &DeleteBackupOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteBackup API operation for AWS CloudHSM V2. +// +// Deletes a specified AWS CloudHSM backup. A backup can be restored up to 7 +// days after the DeleteBackup request. For more information on restoring a +// backup, see RestoreBackup +// +// 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 CloudHSM V2's +// API operation DeleteBackup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" +// The request was rejected because of an AWS CloudHSM internal failure. The +// request can be retried. +// +// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" +// The request was rejected because an error occurred. +// +// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" +// The request was rejected because it refers to a resource that cannot be found. +// +// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" +// The request was rejected because it is not a valid request. +// +// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" +// The request was rejected because the requester does not have permission to +// perform the requested operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteBackup +func (c *CloudHSMV2) DeleteBackup(input *DeleteBackupInput) (*DeleteBackupOutput, error) { + req, out := c.DeleteBackupRequest(input) + return out, req.Send() +} + +// DeleteBackupWithContext is the same as DeleteBackup with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteBackup 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 *CloudHSMV2) DeleteBackupWithContext(ctx aws.Context, input *DeleteBackupInput, opts ...request.Option) (*DeleteBackupOutput, error) { + req, out := c.DeleteBackupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteCluster = "DeleteCluster" + +// DeleteClusterRequest generates a "aws/request.Request" representing the +// client's request for the DeleteCluster 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 DeleteCluster for more information on using the DeleteCluster +// 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 DeleteClusterRequest method. +// req, resp := client.DeleteClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteCluster +func (c *CloudHSMV2) DeleteClusterRequest(input *DeleteClusterInput) (req *request.Request, output *DeleteClusterOutput) { + op := &request.Operation{ + Name: opDeleteCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteClusterInput{} + } + + output = &DeleteClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteCluster API operation for AWS CloudHSM V2. +// +// Deletes the specified AWS CloudHSM cluster. Before you can delete a cluster, +// you must delete all HSMs in the cluster. To see if the cluster contains any +// HSMs, use DescribeClusters. To delete an HSM, use DeleteHsm. +// +// 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 CloudHSM V2's +// API operation DeleteCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" +// The request was rejected because of an AWS CloudHSM internal failure. The +// request can be retried. +// +// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" +// The request was rejected because an error occurred. +// +// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" +// The request was rejected because it refers to a resource that cannot be found. +// +// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" +// The request was rejected because it is not a valid request. +// +// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" +// The request was rejected because the requester does not have permission to +// perform the requested operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteCluster +func (c *CloudHSMV2) DeleteCluster(input *DeleteClusterInput) (*DeleteClusterOutput, error) { + req, out := c.DeleteClusterRequest(input) + return out, req.Send() +} + +// DeleteClusterWithContext is the same as DeleteCluster with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteCluster 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 *CloudHSMV2) DeleteClusterWithContext(ctx aws.Context, input *DeleteClusterInput, opts ...request.Option) (*DeleteClusterOutput, error) { + req, out := c.DeleteClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteHsm = "DeleteHsm" + +// DeleteHsmRequest generates a "aws/request.Request" representing the +// client's request for the DeleteHsm 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 DeleteHsm for more information on using the DeleteHsm +// 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 DeleteHsmRequest method. +// req, resp := client.DeleteHsmRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteHsm +func (c *CloudHSMV2) DeleteHsmRequest(input *DeleteHsmInput) (req *request.Request, output *DeleteHsmOutput) { + op := &request.Operation{ + Name: opDeleteHsm, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteHsmInput{} + } + + output = &DeleteHsmOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteHsm API operation for AWS CloudHSM V2. +// +// Deletes the specified HSM. To specify an HSM, you can use its identifier +// (ID), the IP address of the HSM's elastic network interface (ENI), or the +// ID of the HSM's ENI. You need to specify only one of these values. To find +// these values, use DescribeClusters. +// +// 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 CloudHSM V2's +// API operation DeleteHsm for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" +// The request was rejected because of an AWS CloudHSM internal failure. The +// request can be retried. +// +// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" +// The request was rejected because an error occurred. +// +// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" +// The request was rejected because it refers to a resource that cannot be found. +// +// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" +// The request was rejected because it is not a valid request. +// +// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" +// The request was rejected because the requester does not have permission to +// perform the requested operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteHsm +func (c *CloudHSMV2) DeleteHsm(input *DeleteHsmInput) (*DeleteHsmOutput, error) { + req, out := c.DeleteHsmRequest(input) + return out, req.Send() +} + +// DeleteHsmWithContext is the same as DeleteHsm with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteHsm 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 *CloudHSMV2) DeleteHsmWithContext(ctx aws.Context, input *DeleteHsmInput, opts ...request.Option) (*DeleteHsmOutput, error) { + req, out := c.DeleteHsmRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeBackups = "DescribeBackups" + +// DescribeBackupsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeBackups 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 DescribeBackups for more information on using the DescribeBackups +// 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 DescribeBackupsRequest method. +// req, resp := client.DescribeBackupsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DescribeBackups +func (c *CloudHSMV2) DescribeBackupsRequest(input *DescribeBackupsInput) (req *request.Request, output *DescribeBackupsOutput) { + op := &request.Operation{ + Name: opDescribeBackups, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeBackupsInput{} + } + + output = &DescribeBackupsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeBackups API operation for AWS CloudHSM V2. +// +// Gets information about backups of AWS CloudHSM clusters. +// +// This is a paginated operation, which means that each response might contain +// only a subset of all the backups. When the response contains only a subset +// of backups, it includes a NextToken value. Use this value in a subsequent +// DescribeBackups request to get more backups. When you receive a response +// with no NextToken (or an empty or null value), that means there are no more +// backups to get. +// +// 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 CloudHSM V2's +// API operation DescribeBackups for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" +// The request was rejected because of an AWS CloudHSM internal failure. The +// request can be retried. +// +// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" +// The request was rejected because an error occurred. +// +// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" +// The request was rejected because it refers to a resource that cannot be found. +// +// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" +// The request was rejected because it is not a valid request. +// +// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" +// The request was rejected because the requester does not have permission to +// perform the requested operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DescribeBackups +func (c *CloudHSMV2) DescribeBackups(input *DescribeBackupsInput) (*DescribeBackupsOutput, error) { + req, out := c.DescribeBackupsRequest(input) + return out, req.Send() +} + +// DescribeBackupsWithContext is the same as DescribeBackups with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeBackups 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 *CloudHSMV2) DescribeBackupsWithContext(ctx aws.Context, input *DescribeBackupsInput, opts ...request.Option) (*DescribeBackupsOutput, error) { + req, out := c.DescribeBackupsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeBackupsPages iterates over the pages of a DescribeBackups operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeBackups 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 DescribeBackups operation. +// pageNum := 0 +// err := client.DescribeBackupsPages(params, +// func(page *DescribeBackupsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *CloudHSMV2) DescribeBackupsPages(input *DescribeBackupsInput, fn func(*DescribeBackupsOutput, bool) bool) error { + return c.DescribeBackupsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeBackupsPagesWithContext same as DescribeBackupsPages 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 *CloudHSMV2) DescribeBackupsPagesWithContext(ctx aws.Context, input *DescribeBackupsInput, fn func(*DescribeBackupsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeBackupsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeBackupsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeBackupsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeClusters = "DescribeClusters" + +// DescribeClustersRequest generates a "aws/request.Request" representing the +// client's request for the DescribeClusters 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 DescribeClusters for more information on using the DescribeClusters +// 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 DescribeClustersRequest method. +// req, resp := client.DescribeClustersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DescribeClusters +func (c *CloudHSMV2) DescribeClustersRequest(input *DescribeClustersInput) (req *request.Request, output *DescribeClustersOutput) { + op := &request.Operation{ + Name: opDescribeClusters, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeClustersInput{} + } + + output = &DescribeClustersOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeClusters API operation for AWS CloudHSM V2. +// +// Gets information about AWS CloudHSM clusters. +// +// This is a paginated operation, which means that each response might contain +// only a subset of all the clusters. When the response contains only a subset +// of clusters, it includes a NextToken value. Use this value in a subsequent +// DescribeClusters request to get more clusters. When you receive a response +// with no NextToken (or an empty or null value), that means there are no more +// clusters to get. +// +// 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 CloudHSM V2's +// API operation DescribeClusters for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" +// The request was rejected because of an AWS CloudHSM internal failure. The +// request can be retried. +// +// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" +// The request was rejected because an error occurred. +// +// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" +// The request was rejected because it is not a valid request. +// +// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" +// The request was rejected because the requester does not have permission to +// perform the requested operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DescribeClusters +func (c *CloudHSMV2) DescribeClusters(input *DescribeClustersInput) (*DescribeClustersOutput, error) { + req, out := c.DescribeClustersRequest(input) + return out, req.Send() +} + +// DescribeClustersWithContext is the same as DescribeClusters with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeClusters 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 *CloudHSMV2) DescribeClustersWithContext(ctx aws.Context, input *DescribeClustersInput, opts ...request.Option) (*DescribeClustersOutput, error) { + req, out := c.DescribeClustersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeClustersPages iterates over the pages of a DescribeClusters operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeClusters 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 DescribeClusters operation. +// pageNum := 0 +// err := client.DescribeClustersPages(params, +// func(page *DescribeClustersOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *CloudHSMV2) DescribeClustersPages(input *DescribeClustersInput, fn func(*DescribeClustersOutput, bool) bool) error { + return c.DescribeClustersPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeClustersPagesWithContext same as DescribeClustersPages 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 *CloudHSMV2) DescribeClustersPagesWithContext(ctx aws.Context, input *DescribeClustersInput, fn func(*DescribeClustersOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeClustersInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeClustersRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeClustersOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opInitializeCluster = "InitializeCluster" + +// InitializeClusterRequest generates a "aws/request.Request" representing the +// client's request for the InitializeCluster 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 InitializeCluster for more information on using the InitializeCluster +// 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 InitializeClusterRequest method. +// req, resp := client.InitializeClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/InitializeCluster +func (c *CloudHSMV2) InitializeClusterRequest(input *InitializeClusterInput) (req *request.Request, output *InitializeClusterOutput) { + op := &request.Operation{ + Name: opInitializeCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &InitializeClusterInput{} + } + + output = &InitializeClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// InitializeCluster API operation for AWS CloudHSM V2. +// +// Claims an AWS CloudHSM cluster by submitting the cluster certificate issued +// by your issuing certificate authority (CA) and the CA's root certificate. +// Before you can claim a cluster, you must sign the cluster's certificate signing +// request (CSR) with your issuing CA. To get the cluster's CSR, use DescribeClusters. +// +// 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 CloudHSM V2's +// API operation InitializeCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" +// The request was rejected because of an AWS CloudHSM internal failure. The +// request can be retried. +// +// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" +// The request was rejected because an error occurred. +// +// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" +// The request was rejected because it refers to a resource that cannot be found. +// +// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" +// The request was rejected because it is not a valid request. +// +// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" +// The request was rejected because the requester does not have permission to +// perform the requested operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/InitializeCluster +func (c *CloudHSMV2) InitializeCluster(input *InitializeClusterInput) (*InitializeClusterOutput, error) { + req, out := c.InitializeClusterRequest(input) + return out, req.Send() +} + +// InitializeClusterWithContext is the same as InitializeCluster with the addition of +// the ability to pass a context and additional request options. +// +// See InitializeCluster 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 *CloudHSMV2) InitializeClusterWithContext(ctx aws.Context, input *InitializeClusterInput, opts ...request.Option) (*InitializeClusterOutput, error) { + req, out := c.InitializeClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListTags = "ListTags" + +// ListTagsRequest generates a "aws/request.Request" representing the +// client's request for the ListTags 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 ListTags for more information on using the ListTags +// 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 ListTagsRequest method. +// req, resp := client.ListTagsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/ListTags +func (c *CloudHSMV2) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) { + op := &request.Operation{ + Name: opListTags, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListTagsInput{} + } + + output = &ListTagsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTags API operation for AWS CloudHSM V2. +// +// Gets a list of tags for the specified AWS CloudHSM cluster. +// +// This is a paginated operation, which means that each response might contain +// only a subset of all the tags. When the response contains only a subset of +// tags, it includes a NextToken value. Use this value in a subsequent ListTags +// request to get more tags. When you receive a response with no NextToken (or +// an empty or null value), that means there are no more tags to get. +// +// 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 CloudHSM V2's +// API operation ListTags for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" +// The request was rejected because of an AWS CloudHSM internal failure. The +// request can be retried. +// +// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" +// The request was rejected because an error occurred. +// +// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" +// The request was rejected because it refers to a resource that cannot be found. +// +// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" +// The request was rejected because it is not a valid request. +// +// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" +// The request was rejected because the requester does not have permission to +// perform the requested operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/ListTags +func (c *CloudHSMV2) ListTags(input *ListTagsInput) (*ListTagsOutput, error) { + req, out := c.ListTagsRequest(input) + return out, req.Send() +} + +// ListTagsWithContext is the same as ListTags with the addition of +// the ability to pass a context and additional request options. +// +// See ListTags 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 *CloudHSMV2) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) { + req, out := c.ListTagsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListTagsPages iterates over the pages of a ListTags operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListTags 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 ListTags operation. +// pageNum := 0 +// err := client.ListTagsPages(params, +// func(page *ListTagsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *CloudHSMV2) ListTagsPages(input *ListTagsInput, fn func(*ListTagsOutput, bool) bool) error { + return c.ListTagsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListTagsPagesWithContext same as ListTagsPages 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 *CloudHSMV2) ListTagsPagesWithContext(ctx aws.Context, input *ListTagsInput, fn func(*ListTagsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListTagsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListTagsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListTagsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opRestoreBackup = "RestoreBackup" + +// RestoreBackupRequest generates a "aws/request.Request" representing the +// client's request for the RestoreBackup 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 RestoreBackup for more information on using the RestoreBackup +// 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 RestoreBackupRequest method. +// req, resp := client.RestoreBackupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/RestoreBackup +func (c *CloudHSMV2) RestoreBackupRequest(input *RestoreBackupInput) (req *request.Request, output *RestoreBackupOutput) { + op := &request.Operation{ + Name: opRestoreBackup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RestoreBackupInput{} + } + + output = &RestoreBackupOutput{} + req = c.newRequest(op, input, output) + return +} + +// RestoreBackup API operation for AWS CloudHSM V2. +// +// Restores a specified AWS CloudHSM backup that is in the PENDING_DELETION +// state. For more information on deleting a backup, see DeleteBackup. +// +// 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 CloudHSM V2's +// API operation RestoreBackup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" +// The request was rejected because of an AWS CloudHSM internal failure. The +// request can be retried. +// +// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" +// The request was rejected because an error occurred. +// +// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" +// The request was rejected because it refers to a resource that cannot be found. +// +// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" +// The request was rejected because it is not a valid request. +// +// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" +// The request was rejected because the requester does not have permission to +// perform the requested operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/RestoreBackup +func (c *CloudHSMV2) RestoreBackup(input *RestoreBackupInput) (*RestoreBackupOutput, error) { + req, out := c.RestoreBackupRequest(input) + return out, req.Send() +} + +// RestoreBackupWithContext is the same as RestoreBackup with the addition of +// the ability to pass a context and additional request options. +// +// See RestoreBackup 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 *CloudHSMV2) RestoreBackupWithContext(ctx aws.Context, input *RestoreBackupInput, opts ...request.Option) (*RestoreBackupOutput, error) { + req, out := c.RestoreBackupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTagResource = "TagResource" + +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return +// 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 TagResource for more information on using the TagResource +// 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 TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/TagResource +func (c *CloudHSMV2) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagResource API operation for AWS CloudHSM V2. +// +// Adds or overwrites one or more tags for the specified AWS CloudHSM cluster. +// +// 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 CloudHSM V2's +// API operation TagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" +// The request was rejected because of an AWS CloudHSM internal failure. The +// request can be retried. +// +// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" +// The request was rejected because an error occurred. +// +// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" +// The request was rejected because it refers to a resource that cannot be found. +// +// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" +// The request was rejected because it is not a valid request. +// +// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" +// The request was rejected because the requester does not have permission to +// perform the requested operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/TagResource +func (c *CloudHSMV2) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + return out, req.Send() +} + +// TagResourceWithContext is the same as TagResource with the addition of +// the ability to pass a context and additional request options. +// +// See TagResource 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 *CloudHSMV2) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagResource = "UntagResource" + +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource 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 UntagResource for more information on using the UntagResource +// 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 UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/UntagResource +func (c *CloudHSMV2) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagResource API operation for AWS CloudHSM V2. +// +// Removes the specified tag or tags from the specified AWS CloudHSM cluster. +// +// 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 CloudHSM V2's +// API operation UntagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" +// The request was rejected because of an AWS CloudHSM internal failure. The +// request can be retried. +// +// * ErrCodeCloudHsmServiceException "CloudHsmServiceException" +// The request was rejected because an error occurred. +// +// * ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" +// The request was rejected because it refers to a resource that cannot be found. +// +// * ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" +// The request was rejected because it is not a valid request. +// +// * ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" +// The request was rejected because the requester does not have permission to +// perform the requested operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/UntagResource +func (c *CloudHSMV2) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + return out, req.Send() +} + +// UntagResourceWithContext is the same as UntagResource with the addition of +// the ability to pass a context and additional request options. +// +// See UntagResource 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 *CloudHSMV2) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// Contains information about a backup of an AWS CloudHSM cluster. +type Backup struct { + _ struct{} `type:"structure"` + + // The identifier (ID) of the backup. + // + // BackupId is a required field + BackupId *string `type:"string" required:"true"` + + // The state of the backup. + BackupState *string `type:"string" enum:"BackupState"` + + // The identifier (ID) of the cluster that was backed up. + ClusterId *string `type:"string"` + + CopyTimestamp *time.Time `type:"timestamp"` + + // The date and time when the backup was created. + CreateTimestamp *time.Time `type:"timestamp"` + + // The date and time when the backup will be permanently deleted. + DeleteTimestamp *time.Time `type:"timestamp"` + + SourceBackup *string `type:"string"` + + SourceCluster *string `type:"string"` + + SourceRegion *string `type:"string"` +} + +// String returns the string representation +func (s Backup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Backup) GoString() string { + return s.String() +} + +// SetBackupId sets the BackupId field's value. +func (s *Backup) SetBackupId(v string) *Backup { + s.BackupId = &v + return s +} + +// SetBackupState sets the BackupState field's value. +func (s *Backup) SetBackupState(v string) *Backup { + s.BackupState = &v + return s +} + +// SetClusterId sets the ClusterId field's value. +func (s *Backup) SetClusterId(v string) *Backup { + s.ClusterId = &v + return s +} + +// SetCopyTimestamp sets the CopyTimestamp field's value. +func (s *Backup) SetCopyTimestamp(v time.Time) *Backup { + s.CopyTimestamp = &v + return s +} + +// SetCreateTimestamp sets the CreateTimestamp field's value. +func (s *Backup) SetCreateTimestamp(v time.Time) *Backup { + s.CreateTimestamp = &v + return s +} + +// SetDeleteTimestamp sets the DeleteTimestamp field's value. +func (s *Backup) SetDeleteTimestamp(v time.Time) *Backup { + s.DeleteTimestamp = &v + return s +} + +// SetSourceBackup sets the SourceBackup field's value. +func (s *Backup) SetSourceBackup(v string) *Backup { + s.SourceBackup = &v + return s +} + +// SetSourceCluster sets the SourceCluster field's value. +func (s *Backup) SetSourceCluster(v string) *Backup { + s.SourceCluster = &v + return s +} + +// SetSourceRegion sets the SourceRegion field's value. +func (s *Backup) SetSourceRegion(v string) *Backup { + s.SourceRegion = &v + return s +} + +// Contains one or more certificates or a certificate signing request (CSR). +type Certificates struct { + _ struct{} `type:"structure"` + + // The HSM hardware certificate issued (signed) by AWS CloudHSM. + AwsHardwareCertificate *string `type:"string"` + + // The cluster certificate issued (signed) by the issuing certificate authority + // (CA) of the cluster's owner. + ClusterCertificate *string `type:"string"` + + // The cluster's certificate signing request (CSR). The CSR exists only when + // the cluster's state is UNINITIALIZED. + ClusterCsr *string `type:"string"` + + // The HSM certificate issued (signed) by the HSM hardware. + HsmCertificate *string `type:"string"` + + // The HSM hardware certificate issued (signed) by the hardware manufacturer. + ManufacturerHardwareCertificate *string `type:"string"` +} + +// String returns the string representation +func (s Certificates) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Certificates) GoString() string { + return s.String() +} + +// SetAwsHardwareCertificate sets the AwsHardwareCertificate field's value. +func (s *Certificates) SetAwsHardwareCertificate(v string) *Certificates { + s.AwsHardwareCertificate = &v + return s +} + +// SetClusterCertificate sets the ClusterCertificate field's value. +func (s *Certificates) SetClusterCertificate(v string) *Certificates { + s.ClusterCertificate = &v + return s +} + +// SetClusterCsr sets the ClusterCsr field's value. +func (s *Certificates) SetClusterCsr(v string) *Certificates { + s.ClusterCsr = &v + return s +} + +// SetHsmCertificate sets the HsmCertificate field's value. +func (s *Certificates) SetHsmCertificate(v string) *Certificates { + s.HsmCertificate = &v + return s +} + +// SetManufacturerHardwareCertificate sets the ManufacturerHardwareCertificate field's value. +func (s *Certificates) SetManufacturerHardwareCertificate(v string) *Certificates { + s.ManufacturerHardwareCertificate = &v + return s +} + +// Contains information about an AWS CloudHSM cluster. +type Cluster struct { + _ struct{} `type:"structure"` + + // The cluster's backup policy. + BackupPolicy *string `type:"string" enum:"BackupPolicy"` + + // Contains one or more certificates or a certificate signing request (CSR). + Certificates *Certificates `type:"structure"` + + // The cluster's identifier (ID). + ClusterId *string `type:"string"` + + // The date and time when the cluster was created. + CreateTimestamp *time.Time `type:"timestamp"` + + // The type of HSM that the cluster contains. + HsmType *string `type:"string"` + + // Contains information about the HSMs in the cluster. + Hsms []*Hsm `type:"list"` + + // The default password for the cluster's Pre-Crypto Officer (PRECO) user. + PreCoPassword *string `min:"7" type:"string"` + + // The identifier (ID) of the cluster's security group. + SecurityGroup *string `type:"string"` + + // The identifier (ID) of the backup used to create the cluster. This value + // exists only when the cluster was created from a backup. + SourceBackupId *string `type:"string"` + + // The cluster's state. + State *string `type:"string" enum:"ClusterState"` + + // A description of the cluster's state. + StateMessage *string `type:"string"` + + // A map of the cluster's subnets and their corresponding Availability Zones. + SubnetMapping map[string]*string `type:"map"` + + // The identifier (ID) of the virtual private cloud (VPC) that contains the + // cluster. + VpcId *string `type:"string"` +} + +// String returns the string representation +func (s Cluster) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Cluster) GoString() string { + return s.String() +} + +// SetBackupPolicy sets the BackupPolicy field's value. +func (s *Cluster) SetBackupPolicy(v string) *Cluster { + s.BackupPolicy = &v + return s +} + +// SetCertificates sets the Certificates field's value. +func (s *Cluster) SetCertificates(v *Certificates) *Cluster { + s.Certificates = v + return s +} + +// SetClusterId sets the ClusterId field's value. +func (s *Cluster) SetClusterId(v string) *Cluster { + s.ClusterId = &v + return s +} + +// SetCreateTimestamp sets the CreateTimestamp field's value. +func (s *Cluster) SetCreateTimestamp(v time.Time) *Cluster { + s.CreateTimestamp = &v + return s +} + +// SetHsmType sets the HsmType field's value. +func (s *Cluster) SetHsmType(v string) *Cluster { + s.HsmType = &v + return s +} + +// SetHsms sets the Hsms field's value. +func (s *Cluster) SetHsms(v []*Hsm) *Cluster { + s.Hsms = v + return s +} + +// SetPreCoPassword sets the PreCoPassword field's value. +func (s *Cluster) SetPreCoPassword(v string) *Cluster { + s.PreCoPassword = &v + return s +} + +// SetSecurityGroup sets the SecurityGroup field's value. +func (s *Cluster) SetSecurityGroup(v string) *Cluster { + s.SecurityGroup = &v + return s +} + +// SetSourceBackupId sets the SourceBackupId field's value. +func (s *Cluster) SetSourceBackupId(v string) *Cluster { + s.SourceBackupId = &v + return s +} + +// SetState sets the State field's value. +func (s *Cluster) SetState(v string) *Cluster { + s.State = &v + return s +} + +// SetStateMessage sets the StateMessage field's value. +func (s *Cluster) SetStateMessage(v string) *Cluster { + s.StateMessage = &v + return s +} + +// SetSubnetMapping sets the SubnetMapping field's value. +func (s *Cluster) SetSubnetMapping(v map[string]*string) *Cluster { + s.SubnetMapping = v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *Cluster) SetVpcId(v string) *Cluster { + s.VpcId = &v + return s +} + +type CopyBackupToRegionInput struct { + _ struct{} `type:"structure"` + + // The ID of the backup that will be copied to the destination region. + // + // BackupId is a required field + BackupId *string `type:"string" required:"true"` + + // The AWS region that will contain your copied CloudHSM cluster backup. + // + // DestinationRegion is a required field + DestinationRegion *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CopyBackupToRegionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CopyBackupToRegionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CopyBackupToRegionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CopyBackupToRegionInput"} + if s.BackupId == nil { + invalidParams.Add(request.NewErrParamRequired("BackupId")) + } + if s.DestinationRegion == nil { + invalidParams.Add(request.NewErrParamRequired("DestinationRegion")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupId sets the BackupId field's value. +func (s *CopyBackupToRegionInput) SetBackupId(v string) *CopyBackupToRegionInput { + s.BackupId = &v + return s +} + +// SetDestinationRegion sets the DestinationRegion field's value. +func (s *CopyBackupToRegionInput) SetDestinationRegion(v string) *CopyBackupToRegionInput { + s.DestinationRegion = &v + return s +} + +type CopyBackupToRegionOutput struct { + _ struct{} `type:"structure"` + + // Information on the backup that will be copied to the destination region, + // including CreateTimestamp, SourceBackup, SourceCluster, and Source Region. + // CreateTimestamp of the destination backup will be the same as that of the + // source backup. + // + // You will need to use the sourceBackupID returned in this operation to use + // the DescribeBackups operation on the backup that will be copied to the destination + // region. + DestinationBackup *DestinationBackup `type:"structure"` +} + +// String returns the string representation +func (s CopyBackupToRegionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CopyBackupToRegionOutput) GoString() string { + return s.String() +} + +// SetDestinationBackup sets the DestinationBackup field's value. +func (s *CopyBackupToRegionOutput) SetDestinationBackup(v *DestinationBackup) *CopyBackupToRegionOutput { + s.DestinationBackup = v + return s +} + +type CreateClusterInput struct { + _ struct{} `type:"structure"` + + // The type of HSM to use in the cluster. Currently the only allowed value is + // hsm1.medium. + // + // HsmType is a required field + HsmType *string `type:"string" required:"true"` + + // The identifier (ID) of the cluster backup to restore. Use this value to restore + // the cluster from a backup instead of creating a new cluster. To find the + // backup ID, use DescribeBackups. + SourceBackupId *string `type:"string"` + + // The identifiers (IDs) of the subnets where you are creating the cluster. + // You must specify at least one subnet. If you specify multiple subnets, they + // must meet the following criteria: + // + // * All subnets must be in the same virtual private cloud (VPC). + // + // * You can specify only one subnet per Availability Zone. + // + // SubnetIds is a required field + SubnetIds []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s CreateClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateClusterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateClusterInput"} + if s.HsmType == nil { + invalidParams.Add(request.NewErrParamRequired("HsmType")) + } + if s.SubnetIds == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetIds")) + } + if s.SubnetIds != nil && len(s.SubnetIds) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SubnetIds", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetHsmType sets the HsmType field's value. +func (s *CreateClusterInput) SetHsmType(v string) *CreateClusterInput { + s.HsmType = &v + return s +} + +// SetSourceBackupId sets the SourceBackupId field's value. +func (s *CreateClusterInput) SetSourceBackupId(v string) *CreateClusterInput { + s.SourceBackupId = &v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *CreateClusterInput) SetSubnetIds(v []*string) *CreateClusterInput { + s.SubnetIds = v + return s +} + +type CreateClusterOutput struct { + _ struct{} `type:"structure"` + + // Information about the cluster that was created. + Cluster *Cluster `type:"structure"` +} + +// String returns the string representation +func (s CreateClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateClusterOutput) GoString() string { + return s.String() +} + +// SetCluster sets the Cluster field's value. +func (s *CreateClusterOutput) SetCluster(v *Cluster) *CreateClusterOutput { + s.Cluster = v + return s +} + +type CreateHsmInput struct { + _ struct{} `type:"structure"` + + // The Availability Zone where you are creating the HSM. To find the cluster's + // Availability Zones, use DescribeClusters. + // + // AvailabilityZone is a required field + AvailabilityZone *string `type:"string" required:"true"` + + // The identifier (ID) of the HSM's cluster. To find the cluster ID, use DescribeClusters. + // + // ClusterId is a required field + ClusterId *string `type:"string" required:"true"` + + // The HSM's IP address. If you specify an IP address, use an available address + // from the subnet that maps to the Availability Zone where you are creating + // the HSM. If you don't specify an IP address, one is chosen for you from that + // subnet. + IpAddress *string `type:"string"` +} + +// String returns the string representation +func (s CreateHsmInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateHsmInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateHsmInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateHsmInput"} + if s.AvailabilityZone == nil { + invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) + } + if s.ClusterId == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *CreateHsmInput) SetAvailabilityZone(v string) *CreateHsmInput { + s.AvailabilityZone = &v + return s +} + +// SetClusterId sets the ClusterId field's value. +func (s *CreateHsmInput) SetClusterId(v string) *CreateHsmInput { + s.ClusterId = &v + return s +} + +// SetIpAddress sets the IpAddress field's value. +func (s *CreateHsmInput) SetIpAddress(v string) *CreateHsmInput { + s.IpAddress = &v + return s +} + +type CreateHsmOutput struct { + _ struct{} `type:"structure"` + + // Information about the HSM that was created. + Hsm *Hsm `type:"structure"` +} + +// String returns the string representation +func (s CreateHsmOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateHsmOutput) GoString() string { + return s.String() +} + +// SetHsm sets the Hsm field's value. +func (s *CreateHsmOutput) SetHsm(v *Hsm) *CreateHsmOutput { + s.Hsm = v + return s +} + +type DeleteBackupInput struct { + _ struct{} `type:"structure"` + + // The ID of the backup to be deleted. To find the ID of a backup, use the DescribeBackups + // operation. + // + // BackupId is a required field + BackupId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteBackupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBackupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteBackupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteBackupInput"} + if s.BackupId == nil { + invalidParams.Add(request.NewErrParamRequired("BackupId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupId sets the BackupId field's value. +func (s *DeleteBackupInput) SetBackupId(v string) *DeleteBackupInput { + s.BackupId = &v + return s +} + +type DeleteBackupOutput struct { + _ struct{} `type:"structure"` + + // Information on the Backup object deleted. + Backup *Backup `type:"structure"` +} + +// String returns the string representation +func (s DeleteBackupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBackupOutput) GoString() string { + return s.String() +} + +// SetBackup sets the Backup field's value. +func (s *DeleteBackupOutput) SetBackup(v *Backup) *DeleteBackupOutput { + s.Backup = v + return s +} + +type DeleteClusterInput struct { + _ struct{} `type:"structure"` + + // The identifier (ID) of the cluster that you are deleting. To find the cluster + // ID, use DescribeClusters. + // + // ClusterId is a required field + ClusterId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteClusterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteClusterInput"} + if s.ClusterId == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClusterId sets the ClusterId field's value. +func (s *DeleteClusterInput) SetClusterId(v string) *DeleteClusterInput { + s.ClusterId = &v + return s +} + +type DeleteClusterOutput struct { + _ struct{} `type:"structure"` + + // Information about the cluster that was deleted. + Cluster *Cluster `type:"structure"` +} + +// String returns the string representation +func (s DeleteClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteClusterOutput) GoString() string { + return s.String() +} + +// SetCluster sets the Cluster field's value. +func (s *DeleteClusterOutput) SetCluster(v *Cluster) *DeleteClusterOutput { + s.Cluster = v + return s +} + +type DeleteHsmInput struct { + _ struct{} `type:"structure"` + + // The identifier (ID) of the cluster that contains the HSM that you are deleting. + // + // ClusterId is a required field + ClusterId *string `type:"string" required:"true"` + + // The identifier (ID) of the elastic network interface (ENI) of the HSM that + // you are deleting. + EniId *string `type:"string"` + + // The IP address of the elastic network interface (ENI) of the HSM that you + // are deleting. + EniIp *string `type:"string"` + + // The identifier (ID) of the HSM that you are deleting. + HsmId *string `type:"string"` +} + +// String returns the string representation +func (s DeleteHsmInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteHsmInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteHsmInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteHsmInput"} + if s.ClusterId == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClusterId sets the ClusterId field's value. +func (s *DeleteHsmInput) SetClusterId(v string) *DeleteHsmInput { + s.ClusterId = &v + return s +} + +// SetEniId sets the EniId field's value. +func (s *DeleteHsmInput) SetEniId(v string) *DeleteHsmInput { + s.EniId = &v + return s +} + +// SetEniIp sets the EniIp field's value. +func (s *DeleteHsmInput) SetEniIp(v string) *DeleteHsmInput { + s.EniIp = &v + return s +} + +// SetHsmId sets the HsmId field's value. +func (s *DeleteHsmInput) SetHsmId(v string) *DeleteHsmInput { + s.HsmId = &v + return s +} + +type DeleteHsmOutput struct { + _ struct{} `type:"structure"` + + // The identifier (ID) of the HSM that was deleted. + HsmId *string `type:"string"` +} + +// String returns the string representation +func (s DeleteHsmOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteHsmOutput) GoString() string { + return s.String() +} + +// SetHsmId sets the HsmId field's value. +func (s *DeleteHsmOutput) SetHsmId(v string) *DeleteHsmOutput { + s.HsmId = &v + return s +} + +type DescribeBackupsInput struct { + _ struct{} `type:"structure"` + + // One or more filters to limit the items returned in the response. + // + // Use the backupIds filter to return only the specified backups. Specify backups + // by their backup identifier (ID). + // + // Use the sourceBackupIds filter to return only the backups created from a + // source backup. The sourceBackupID of a source backup is returned by the CopyBackupToRegion + // operation. + // + // Use the clusterIds filter to return only the backups for the specified clusters. + // Specify clusters by their cluster identifier (ID). + // + // Use the states filter to return only backups that match the specified state. + Filters map[string][]*string `type:"map"` + + // The maximum number of backups to return in the response. When there are more + // backups than the number you specify, the response contains a NextToken value. + MaxResults *int64 `min:"1" type:"integer"` + + // The NextToken value that you received in the previous response. Use this + // value to get more backups. + NextToken *string `type:"string"` + + SortAscending *bool `type:"boolean"` +} + +// String returns the string representation +func (s DescribeBackupsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeBackupsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeBackupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeBackupsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *DescribeBackupsInput) SetFilters(v map[string][]*string) *DescribeBackupsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeBackupsInput) SetMaxResults(v int64) *DescribeBackupsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeBackupsInput) SetNextToken(v string) *DescribeBackupsInput { + s.NextToken = &v + return s +} + +// SetSortAscending sets the SortAscending field's value. +func (s *DescribeBackupsInput) SetSortAscending(v bool) *DescribeBackupsInput { + s.SortAscending = &v + return s +} + +type DescribeBackupsOutput struct { + _ struct{} `type:"structure"` + + // A list of backups. + Backups []*Backup `type:"list"` + + // An opaque string that indicates that the response contains only a subset + // of backups. Use this value in a subsequent DescribeBackups request to get + // more backups. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeBackupsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeBackupsOutput) GoString() string { + return s.String() +} + +// SetBackups sets the Backups field's value. +func (s *DescribeBackupsOutput) SetBackups(v []*Backup) *DescribeBackupsOutput { + s.Backups = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeBackupsOutput) SetNextToken(v string) *DescribeBackupsOutput { + s.NextToken = &v + return s +} + +type DescribeClustersInput struct { + _ struct{} `type:"structure"` + + // One or more filters to limit the items returned in the response. + // + // Use the clusterIds filter to return only the specified clusters. Specify + // clusters by their cluster identifier (ID). + // + // Use the vpcIds filter to return only the clusters in the specified virtual + // private clouds (VPCs). Specify VPCs by their VPC identifier (ID). + // + // Use the states filter to return only clusters that match the specified state. + Filters map[string][]*string `type:"map"` + + // The maximum number of clusters to return in the response. When there are + // more clusters than the number you specify, the response contains a NextToken + // value. + MaxResults *int64 `min:"1" type:"integer"` + + // The NextToken value that you received in the previous response. Use this + // value to get more clusters. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeClustersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClustersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeClustersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeClustersInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *DescribeClustersInput) SetFilters(v map[string][]*string) *DescribeClustersInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeClustersInput) SetMaxResults(v int64) *DescribeClustersInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeClustersInput) SetNextToken(v string) *DescribeClustersInput { + s.NextToken = &v + return s +} + +type DescribeClustersOutput struct { + _ struct{} `type:"structure"` + + // A list of clusters. + Clusters []*Cluster `type:"list"` + + // An opaque string that indicates that the response contains only a subset + // of clusters. Use this value in a subsequent DescribeClusters request to get + // more clusters. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeClustersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClustersOutput) GoString() string { + return s.String() +} + +// SetClusters sets the Clusters field's value. +func (s *DescribeClustersOutput) SetClusters(v []*Cluster) *DescribeClustersOutput { + s.Clusters = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeClustersOutput) SetNextToken(v string) *DescribeClustersOutput { + s.NextToken = &v + return s +} + +type DestinationBackup struct { + _ struct{} `type:"structure"` + + CreateTimestamp *time.Time `type:"timestamp"` + + SourceBackup *string `type:"string"` + + SourceCluster *string `type:"string"` + + SourceRegion *string `type:"string"` +} + +// String returns the string representation +func (s DestinationBackup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DestinationBackup) GoString() string { + return s.String() +} + +// SetCreateTimestamp sets the CreateTimestamp field's value. +func (s *DestinationBackup) SetCreateTimestamp(v time.Time) *DestinationBackup { + s.CreateTimestamp = &v + return s +} + +// SetSourceBackup sets the SourceBackup field's value. +func (s *DestinationBackup) SetSourceBackup(v string) *DestinationBackup { + s.SourceBackup = &v + return s +} + +// SetSourceCluster sets the SourceCluster field's value. +func (s *DestinationBackup) SetSourceCluster(v string) *DestinationBackup { + s.SourceCluster = &v + return s +} + +// SetSourceRegion sets the SourceRegion field's value. +func (s *DestinationBackup) SetSourceRegion(v string) *DestinationBackup { + s.SourceRegion = &v + return s +} + +// Contains information about a hardware security module (HSM) in an AWS CloudHSM +// cluster. +type Hsm struct { + _ struct{} `type:"structure"` + + // The Availability Zone that contains the HSM. + AvailabilityZone *string `type:"string"` + + // The identifier (ID) of the cluster that contains the HSM. + ClusterId *string `type:"string"` + + // The identifier (ID) of the HSM's elastic network interface (ENI). + EniId *string `type:"string"` + + // The IP address of the HSM's elastic network interface (ENI). + EniIp *string `type:"string"` + + // The HSM's identifier (ID). + // + // HsmId is a required field + HsmId *string `type:"string" required:"true"` + + // The HSM's state. + State *string `type:"string" enum:"HsmState"` + + // A description of the HSM's state. + StateMessage *string `type:"string"` + + // The subnet that contains the HSM's elastic network interface (ENI). + SubnetId *string `type:"string"` +} + +// String returns the string representation +func (s Hsm) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Hsm) GoString() string { + return s.String() +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *Hsm) SetAvailabilityZone(v string) *Hsm { + s.AvailabilityZone = &v + return s +} + +// SetClusterId sets the ClusterId field's value. +func (s *Hsm) SetClusterId(v string) *Hsm { + s.ClusterId = &v + return s +} + +// SetEniId sets the EniId field's value. +func (s *Hsm) SetEniId(v string) *Hsm { + s.EniId = &v + return s +} + +// SetEniIp sets the EniIp field's value. +func (s *Hsm) SetEniIp(v string) *Hsm { + s.EniIp = &v + return s +} + +// SetHsmId sets the HsmId field's value. +func (s *Hsm) SetHsmId(v string) *Hsm { + s.HsmId = &v + return s +} + +// SetState sets the State field's value. +func (s *Hsm) SetState(v string) *Hsm { + s.State = &v + return s +} + +// SetStateMessage sets the StateMessage field's value. +func (s *Hsm) SetStateMessage(v string) *Hsm { + s.StateMessage = &v + return s +} + +// SetSubnetId sets the SubnetId field's value. +func (s *Hsm) SetSubnetId(v string) *Hsm { + s.SubnetId = &v + return s +} + +type InitializeClusterInput struct { + _ struct{} `type:"structure"` + + // The identifier (ID) of the cluster that you are claiming. To find the cluster + // ID, use DescribeClusters. + // + // ClusterId is a required field + ClusterId *string `type:"string" required:"true"` + + // The cluster certificate issued (signed) by your issuing certificate authority + // (CA). The certificate must be in PEM format and can contain a maximum of + // 5000 characters. + // + // SignedCert is a required field + SignedCert *string `type:"string" required:"true"` + + // The issuing certificate of the issuing certificate authority (CA) that issued + // (signed) the cluster certificate. This can be a root (self-signed) certificate + // or a certificate chain that begins with the certificate that issued the cluster + // certificate and ends with a root certificate. The certificate or certificate + // chain must be in PEM format and can contain a maximum of 5000 characters. + // + // TrustAnchor is a required field + TrustAnchor *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s InitializeClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InitializeClusterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InitializeClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InitializeClusterInput"} + if s.ClusterId == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterId")) + } + if s.SignedCert == nil { + invalidParams.Add(request.NewErrParamRequired("SignedCert")) + } + if s.TrustAnchor == nil { + invalidParams.Add(request.NewErrParamRequired("TrustAnchor")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClusterId sets the ClusterId field's value. +func (s *InitializeClusterInput) SetClusterId(v string) *InitializeClusterInput { + s.ClusterId = &v + return s +} + +// SetSignedCert sets the SignedCert field's value. +func (s *InitializeClusterInput) SetSignedCert(v string) *InitializeClusterInput { + s.SignedCert = &v + return s +} + +// SetTrustAnchor sets the TrustAnchor field's value. +func (s *InitializeClusterInput) SetTrustAnchor(v string) *InitializeClusterInput { + s.TrustAnchor = &v + return s +} + +type InitializeClusterOutput struct { + _ struct{} `type:"structure"` + + // The cluster's state. + State *string `type:"string" enum:"ClusterState"` + + // A description of the cluster's state. + StateMessage *string `type:"string"` +} + +// String returns the string representation +func (s InitializeClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InitializeClusterOutput) GoString() string { + return s.String() +} + +// SetState sets the State field's value. +func (s *InitializeClusterOutput) SetState(v string) *InitializeClusterOutput { + s.State = &v + return s +} + +// SetStateMessage sets the StateMessage field's value. +func (s *InitializeClusterOutput) SetStateMessage(v string) *InitializeClusterOutput { + s.StateMessage = &v + return s +} + +type ListTagsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of tags to return in the response. When there are more + // tags than the number you specify, the response contains a NextToken value. + MaxResults *int64 `min:"1" type:"integer"` + + // The NextToken value that you received in the previous response. Use this + // value to get more tags. + NextToken *string `type:"string"` + + // The cluster identifier (ID) for the cluster whose tags you are getting. To + // find the cluster ID, use DescribeClusters. + // + // ResourceId is a required field + ResourceId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListTagsInput) SetMaxResults(v int64) *ListTagsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTagsInput) SetNextToken(v string) *ListTagsInput { + s.NextToken = &v + return s +} + +// SetResourceId sets the ResourceId field's value. +func (s *ListTagsInput) SetResourceId(v string) *ListTagsInput { + s.ResourceId = &v + return s +} + +type ListTagsOutput struct { + _ struct{} `type:"structure"` + + // An opaque string that indicates that the response contains only a subset + // of tags. Use this value in a subsequent ListTags request to get more tags. + NextToken *string `type:"string"` + + // A list of tags. + // + // TagList is a required field + TagList []*Tag `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s ListTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTagsOutput) SetNextToken(v string) *ListTagsOutput { + s.NextToken = &v + return s +} + +// SetTagList sets the TagList field's value. +func (s *ListTagsOutput) SetTagList(v []*Tag) *ListTagsOutput { + s.TagList = v + return s +} + +type RestoreBackupInput struct { + _ struct{} `type:"structure"` + + // The ID of the backup to be restored. To find the ID of a backup, use the + // DescribeBackups operation. + // + // BackupId is a required field + BackupId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s RestoreBackupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RestoreBackupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RestoreBackupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RestoreBackupInput"} + if s.BackupId == nil { + invalidParams.Add(request.NewErrParamRequired("BackupId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBackupId sets the BackupId field's value. +func (s *RestoreBackupInput) SetBackupId(v string) *RestoreBackupInput { + s.BackupId = &v + return s +} + +type RestoreBackupOutput struct { + _ struct{} `type:"structure"` + + // Information on the Backup object created. + Backup *Backup `type:"structure"` +} + +// String returns the string representation +func (s RestoreBackupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RestoreBackupOutput) GoString() string { + return s.String() +} + +// SetBackup sets the Backup field's value. +func (s *RestoreBackupOutput) SetBackup(v *Backup) *RestoreBackupOutput { + s.Backup = v + return s +} + +// Contains a tag. A tag is a key-value pair. +type Tag struct { + _ struct{} `type:"structure"` + + // The key of the tag. + // + // Key is a required field + Key *string `min:"1" type:"string" required:"true"` + + // The value of the tag. + // + // Value is a required field + Value *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Tag) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Tag"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // The cluster identifier (ID) for the cluster that you are tagging. To find + // the cluster ID, use DescribeClusters. + // + // ResourceId is a required field + ResourceId *string `type:"string" required:"true"` + + // A list of one or more tags. + // + // TagList is a required field + TagList []*Tag `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s TagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.TagList == nil { + invalidParams.Add(request.NewErrParamRequired("TagList")) + } + if s.TagList != nil && len(s.TagList) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TagList", 1)) + } + if s.TagList != nil { + for i, v := range s.TagList { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagList", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceId sets the ResourceId field's value. +func (s *TagResourceInput) SetResourceId(v string) *TagResourceInput { + s.ResourceId = &v + return s +} + +// SetTagList sets the TagList field's value. +func (s *TagResourceInput) SetTagList(v []*Tag) *TagResourceInput { + s.TagList = v + return s +} + +type TagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceOutput) GoString() string { + return s.String() +} + +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // The cluster identifier (ID) for the cluster whose tags you are removing. + // To find the cluster ID, use DescribeClusters. + // + // ResourceId is a required field + ResourceId *string `type:"string" required:"true"` + + // A list of one or more tag keys for the tags that you are removing. Specify + // only the tag keys, not the tag values. + // + // TagKeyList is a required field + TagKeyList []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s UntagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.TagKeyList == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeyList")) + } + if s.TagKeyList != nil && len(s.TagKeyList) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TagKeyList", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceId sets the ResourceId field's value. +func (s *UntagResourceInput) SetResourceId(v string) *UntagResourceInput { + s.ResourceId = &v + return s +} + +// SetTagKeyList sets the TagKeyList field's value. +func (s *UntagResourceInput) SetTagKeyList(v []*string) *UntagResourceInput { + s.TagKeyList = v + return s +} + +type UntagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UntagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceOutput) GoString() string { + return s.String() +} + +const ( + // BackupPolicyDefault is a BackupPolicy enum value + BackupPolicyDefault = "DEFAULT" +) + +const ( + // BackupStateCreateInProgress is a BackupState enum value + BackupStateCreateInProgress = "CREATE_IN_PROGRESS" + + // BackupStateReady is a BackupState enum value + BackupStateReady = "READY" + + // BackupStateDeleted is a BackupState enum value + BackupStateDeleted = "DELETED" + + // BackupStatePendingDeletion is a BackupState enum value + BackupStatePendingDeletion = "PENDING_DELETION" +) + +const ( + // ClusterStateCreateInProgress is a ClusterState enum value + ClusterStateCreateInProgress = "CREATE_IN_PROGRESS" + + // ClusterStateUninitialized is a ClusterState enum value + ClusterStateUninitialized = "UNINITIALIZED" + + // ClusterStateInitializeInProgress is a ClusterState enum value + ClusterStateInitializeInProgress = "INITIALIZE_IN_PROGRESS" + + // ClusterStateInitialized is a ClusterState enum value + ClusterStateInitialized = "INITIALIZED" + + // ClusterStateActive is a ClusterState enum value + ClusterStateActive = "ACTIVE" + + // ClusterStateUpdateInProgress is a ClusterState enum value + ClusterStateUpdateInProgress = "UPDATE_IN_PROGRESS" + + // ClusterStateDeleteInProgress is a ClusterState enum value + ClusterStateDeleteInProgress = "DELETE_IN_PROGRESS" + + // ClusterStateDeleted is a ClusterState enum value + ClusterStateDeleted = "DELETED" + + // ClusterStateDegraded is a ClusterState enum value + ClusterStateDegraded = "DEGRADED" +) + +const ( + // HsmStateCreateInProgress is a HsmState enum value + HsmStateCreateInProgress = "CREATE_IN_PROGRESS" + + // HsmStateActive is a HsmState enum value + HsmStateActive = "ACTIVE" + + // HsmStateDegraded is a HsmState enum value + HsmStateDegraded = "DEGRADED" + + // HsmStateDeleteInProgress is a HsmState enum value + HsmStateDeleteInProgress = "DELETE_IN_PROGRESS" + + // HsmStateDeleted is a HsmState enum value + HsmStateDeleted = "DELETED" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/doc.go b/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/doc.go new file mode 100644 index 0000000000..fd7b0ef8e8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/doc.go @@ -0,0 +1,29 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package cloudhsmv2 provides the client and types for making API +// requests to AWS CloudHSM V2. +// +// For more information about AWS CloudHSM, see AWS CloudHSM (http://aws.amazon.com/cloudhsm/) +// and the AWS CloudHSM User Guide (http://docs.aws.amazon.com/cloudhsm/latest/userguide/). +// +// See https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28 for more information on this service. +// +// See cloudhsmv2 package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudhsmv2/ +// +// Using the Client +// +// To contact AWS CloudHSM V2 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 CloudHSM V2 client CloudHSMV2 for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudhsmv2/#New +package cloudhsmv2 diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/errors.go b/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/errors.go new file mode 100644 index 0000000000..542f2f4048 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/errors.go @@ -0,0 +1,38 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package cloudhsmv2 + +const ( + + // ErrCodeCloudHsmAccessDeniedException for service response error code + // "CloudHsmAccessDeniedException". + // + // The request was rejected because the requester does not have permission to + // perform the requested operation. + ErrCodeCloudHsmAccessDeniedException = "CloudHsmAccessDeniedException" + + // ErrCodeCloudHsmInternalFailureException for service response error code + // "CloudHsmInternalFailureException". + // + // The request was rejected because of an AWS CloudHSM internal failure. The + // request can be retried. + ErrCodeCloudHsmInternalFailureException = "CloudHsmInternalFailureException" + + // ErrCodeCloudHsmInvalidRequestException for service response error code + // "CloudHsmInvalidRequestException". + // + // The request was rejected because it is not a valid request. + ErrCodeCloudHsmInvalidRequestException = "CloudHsmInvalidRequestException" + + // ErrCodeCloudHsmResourceNotFoundException for service response error code + // "CloudHsmResourceNotFoundException". + // + // The request was rejected because it refers to a resource that cannot be found. + ErrCodeCloudHsmResourceNotFoundException = "CloudHsmResourceNotFoundException" + + // ErrCodeCloudHsmServiceException for service response error code + // "CloudHsmServiceException". + // + // The request was rejected because an error occurred. + ErrCodeCloudHsmServiceException = "CloudHsmServiceException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/service.go new file mode 100644 index 0000000000..c86db6ae7b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudhsmv2/service.go @@ -0,0 +1,100 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package cloudhsmv2 + +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/jsonrpc" +) + +// CloudHSMV2 provides the API operation methods for making requests to +// AWS CloudHSM V2. See this package's package overview docs +// for details on the service. +// +// CloudHSMV2 methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type CloudHSMV2 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 = "cloudhsmv2" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "CloudHSM V2" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the CloudHSMV2 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: +// // Create a CloudHSMV2 client from just a session. +// svc := cloudhsmv2.New(mySession) +// +// // Create a CloudHSMV2 client with additional configuration +// svc := cloudhsmv2.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudHSMV2 { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "cloudhsm" + } + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *CloudHSMV2 { + svc := &CloudHSMV2{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2017-04-28", + JSONVersion: "1.1", + TargetPrefix: "BaldrApiService", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a CloudHSMV2 operation and runs any +// custom request initialization. +func (c *CloudHSMV2) 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/cloudtrail/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go index db7a6d2ebe..dccb979a45 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go @@ -9,6 +9,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) const opAddTags = "AddTags" @@ -16,7 +18,7 @@ const opAddTags = "AddTags" // AddTagsRequest generates a "aws/request.Request" representing the // client's request for the AddTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -50,6 +52,7 @@ func (c *CloudTrail) AddTagsRequest(input *AddTagsInput) (req *request.Request, output = &AddTagsOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -77,7 +80,7 @@ func (c *CloudTrail) AddTagsRequest(input *AddTagsInput) (req *request.Request, // This exception is thrown when an operation is called with an invalid trail // ARN. The format of a trail ARN is: // -// arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail +// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail // // * ErrCodeResourceTypeNotSupportedException "ResourceTypeNotSupportedException" // This exception is thrown when the specified resource type is not supported @@ -113,6 +116,12 @@ func (c *CloudTrail) AddTagsRequest(input *AddTagsInput) (req *request.Request, // * ErrCodeOperationNotPermittedException "OperationNotPermittedException" // This exception is thrown when the requested operation is not permitted. // +// * ErrCodeNotOrganizationMasterAccountException "NotOrganizationMasterAccountException" +// This exception is thrown when the AWS account making the request to create +// or update an organization trail is not the master account for an organization +// in AWS Organizations. For more information, see Prepare For Creating a Trail +// For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). +// // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/AddTags func (c *CloudTrail) AddTags(input *AddTagsInput) (*AddTagsOutput, error) { req, out := c.AddTagsRequest(input) @@ -140,7 +149,7 @@ const opCreateTrail = "CreateTrail" // CreateTrailRequest generates a "aws/request.Request" representing the // client's request for the CreateTrail operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -271,6 +280,35 @@ func (c *CloudTrail) CreateTrailRequest(input *CreateTrailInput) (req *request.R // * ErrCodeOperationNotPermittedException "OperationNotPermittedException" // This exception is thrown when the requested operation is not permitted. // +// * ErrCodeAccessNotEnabledException "CloudTrailAccessNotEnabledException" +// This exception is thrown when trusted access has not been enabled between +// AWS CloudTrail and AWS Organizations. For more information, see Enabling +// Trusted Access with Other AWS Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html) +// and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). +// +// * ErrCodeInsufficientDependencyServiceAccessPermissionException "InsufficientDependencyServiceAccessPermissionException" +// This exception is thrown when the IAM user or role that is used to create +// the organization trail is lacking one or more required permissions for creating +// an organization trail in a required service. For more information, see Prepare +// For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). +// +// * ErrCodeNotOrganizationMasterAccountException "NotOrganizationMasterAccountException" +// This exception is thrown when the AWS account making the request to create +// or update an organization trail is not the master account for an organization +// in AWS Organizations. For more information, see Prepare For Creating a Trail +// For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). +// +// * ErrCodeOrganizationsNotInUseException "OrganizationsNotInUseException" +// This exception is thrown when the request is made from an AWS account that +// is not a member of an organization. To make this request, sign in using the +// credentials of an account that belongs to an organization. +// +// * ErrCodeOrganizationNotInAllFeaturesModeException "OrganizationNotInAllFeaturesModeException" +// This exception is thrown when AWS Organizations is not configured to support +// all features. All features must be enabled in AWS Organization to support +// creating an organization trail. For more information, see Prepare For Creating +// a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). +// // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrail func (c *CloudTrail) CreateTrail(input *CreateTrailInput) (*CreateTrailOutput, error) { req, out := c.CreateTrailRequest(input) @@ -298,7 +336,7 @@ const opDeleteTrail = "DeleteTrail" // DeleteTrailRequest generates a "aws/request.Request" representing the // client's request for the DeleteTrail operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -332,6 +370,7 @@ func (c *CloudTrail) DeleteTrailRequest(input *DeleteTrailInput) (req *request.R output = &DeleteTrailOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -372,6 +411,24 @@ func (c *CloudTrail) DeleteTrailRequest(input *DeleteTrailInput) (req *request.R // This exception is thrown when an operation is called on a trail from a region // other than the region in which the trail was created. // +// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" +// This exception is thrown when the requested operation is not supported. +// +// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" +// This exception is thrown when the requested operation is not permitted. +// +// * ErrCodeNotOrganizationMasterAccountException "NotOrganizationMasterAccountException" +// This exception is thrown when the AWS account making the request to create +// or update an organization trail is not the master account for an organization +// in AWS Organizations. For more information, see Prepare For Creating a Trail +// For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). +// +// * ErrCodeInsufficientDependencyServiceAccessPermissionException "InsufficientDependencyServiceAccessPermissionException" +// This exception is thrown when the IAM user or role that is used to create +// the organization trail is lacking one or more required permissions for creating +// an organization trail in a required service. For more information, see Prepare +// For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). +// // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteTrail func (c *CloudTrail) DeleteTrail(input *DeleteTrailInput) (*DeleteTrailOutput, error) { req, out := c.DeleteTrailRequest(input) @@ -399,7 +456,7 @@ const opDescribeTrails = "DescribeTrails" // DescribeTrailsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTrails operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -482,7 +539,7 @@ const opGetEventSelectors = "GetEventSelectors" // GetEventSelectorsRequest generates a "aws/request.Request" representing the // client's request for the GetEventSelectors operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -524,12 +581,13 @@ func (c *CloudTrail) GetEventSelectorsRequest(input *GetEventSelectorsInput) (re // Describes the settings for the event selectors that you configured for your // trail. The information returned for your event selectors includes the following: // -// * The S3 objects that you are logging for data events. +// * If your event selector includes read-only events, write-only events, +// or all events. This applies to both management events and data events. // // * If your event selector includes management events. // -// * If your event selector includes read-only events, write-only events, -// or all. +// * If your event selector includes data events, the Amazon S3 objects or +// AWS Lambda functions that you are logging for data events. // // For more information, see Logging Data and Management Events for Trails // (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html) @@ -595,7 +653,7 @@ const opGetTrailStatus = "GetTrailStatus" // GetTrailStatusRequest generates a "aws/request.Request" representing the // client's request for the GetTrailStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -694,7 +752,7 @@ const opListPublicKeys = "ListPublicKeys" // ListPublicKeysRequest generates a "aws/request.Request" representing the // client's request for the ListPublicKeys operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -790,7 +848,7 @@ const opListTags = "ListTags" // ListTagsRequest generates a "aws/request.Request" representing the // client's request for the ListTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -846,7 +904,7 @@ func (c *CloudTrail) ListTagsRequest(input *ListTagsInput) (req *request.Request // This exception is thrown when an operation is called with an invalid trail // ARN. The format of a trail ARN is: // -// arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail +// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail // // * ErrCodeResourceTypeNotSupportedException "ResourceTypeNotSupportedException" // This exception is thrown when the specified resource type is not supported @@ -904,7 +962,7 @@ const opLookupEvents = "LookupEvents" // LookupEventsRequest generates a "aws/request.Request" representing the // client's request for the LookupEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -949,10 +1007,11 @@ func (c *CloudTrail) LookupEventsRequest(input *LookupEventsInput) (req *request // LookupEvents API operation for AWS CloudTrail. // -// Looks up API activity events captured by CloudTrail that create, update, -// or delete resources in your account. Events for a region can be looked up -// for the times in which you had CloudTrail turned on in that region during -// the last seven days. Lookup supports the following attributes: +// Looks up management events (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-management-events) +// captured by CloudTrail. Events for a region can be looked up in that region +// during the last 90 days. Lookup supports the following attributes: +// +// * AWS access key // // * Event ID // @@ -960,13 +1019,15 @@ func (c *CloudTrail) LookupEventsRequest(input *LookupEventsInput) (req *request // // * Event source // +// * Read only +// // * Resource name // // * Resource type // // * User name // -// All attributes are optional. The default number of results returned is 10, +// All attributes are optional. The default number of results returned is 50, // with a maximum of 50 possible. The response includes a token that you can // use to get the next page of results. // @@ -1075,7 +1136,7 @@ const opPutEventSelectors = "PutEventSelectors" // PutEventSelectorsRequest generates a "aws/request.Request" representing the // client's request for the PutEventSelectors operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1114,10 +1175,13 @@ func (c *CloudTrail) PutEventSelectorsRequest(input *PutEventSelectorsInput) (re // PutEventSelectors API operation for AWS CloudTrail. // -// Configures an event selector for your trail. Use event selectors to specify -// whether you want your trail to log management and/or data events. When an -// event occurs in your account, CloudTrail evaluates the event selectors in -// all trails. For each trail, if the event matches any event selector, the +// Configures an event selector for your trail. Use event selectors to further +// specify the management and data event settings for your trail. By default, +// trails created without specific event selectors will be configured to log +// all read and write management events, and no data events. +// +// When an event occurs in your account, CloudTrail evaluates the event selectors +// in all trails. For each trail, if the event matches any event selector, the // trail processes and logs the event. If the event doesn't match any event // selector, the trail doesn't log the event. // @@ -1141,6 +1205,7 @@ func (c *CloudTrail) PutEventSelectorsRequest(input *PutEventSelectorsInput) (re // // You can configure up to five event selectors for each trail. For more information, // see Logging Data and Management Events for Trails (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html) +// and Limits in AWS CloudTrail (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html) // in the AWS CloudTrail User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -1176,12 +1241,21 @@ func (c *CloudTrail) PutEventSelectorsRequest(input *PutEventSelectorsInput) (re // // * ErrCodeInvalidEventSelectorsException "InvalidEventSelectorsException" // This exception is thrown when the PutEventSelectors operation is called with -// an invalid number of event selectors, data resources, or an invalid value -// for a parameter: +// a number of event selectors or data resources that is not valid. The combination +// of event selectors and data resources is not valid. A trail can have up to +// 5 event selectors. A trail is limited to 250 data resources. These data resources +// can be distributed across event selectors, but the overall total cannot exceed +// 250. +// +// You can: // // * Specify a valid number of event selectors (1 to 5) for a trail. // // * Specify a valid number of data resources (1 to 250) for an event selector. +// The limit of number of resources on an individual event selector is configurable +// up to 250. However, this upper limit is allowed only if the total number +// of data resources does not exceed 250 across all event selectors for a +// trail. // // * Specify a valid value for a parameter. For example, specifying the ReadWriteType // parameter with a value of read-only is invalid. @@ -1192,6 +1266,18 @@ func (c *CloudTrail) PutEventSelectorsRequest(input *PutEventSelectorsInput) (re // * ErrCodeOperationNotPermittedException "OperationNotPermittedException" // This exception is thrown when the requested operation is not permitted. // +// * ErrCodeNotOrganizationMasterAccountException "NotOrganizationMasterAccountException" +// This exception is thrown when the AWS account making the request to create +// or update an organization trail is not the master account for an organization +// in AWS Organizations. For more information, see Prepare For Creating a Trail +// For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). +// +// * ErrCodeInsufficientDependencyServiceAccessPermissionException "InsufficientDependencyServiceAccessPermissionException" +// This exception is thrown when the IAM user or role that is used to create +// the organization trail is lacking one or more required permissions for creating +// an organization trail in a required service. For more information, see Prepare +// For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). +// // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors func (c *CloudTrail) PutEventSelectors(input *PutEventSelectorsInput) (*PutEventSelectorsOutput, error) { req, out := c.PutEventSelectorsRequest(input) @@ -1219,7 +1305,7 @@ const opRemoveTags = "RemoveTags" // RemoveTagsRequest generates a "aws/request.Request" representing the // client's request for the RemoveTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1253,6 +1339,7 @@ func (c *CloudTrail) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Req output = &RemoveTagsOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1275,7 +1362,7 @@ func (c *CloudTrail) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Req // This exception is thrown when an operation is called with an invalid trail // ARN. The format of a trail ARN is: // -// arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail +// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail // // * ErrCodeResourceTypeNotSupportedException "ResourceTypeNotSupportedException" // This exception is thrown when the specified resource type is not supported @@ -1307,6 +1394,12 @@ func (c *CloudTrail) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Req // * ErrCodeOperationNotPermittedException "OperationNotPermittedException" // This exception is thrown when the requested operation is not permitted. // +// * ErrCodeNotOrganizationMasterAccountException "NotOrganizationMasterAccountException" +// This exception is thrown when the AWS account making the request to create +// or update an organization trail is not the master account for an organization +// in AWS Organizations. For more information, see Prepare For Creating a Trail +// For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). +// // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RemoveTags func (c *CloudTrail) RemoveTags(input *RemoveTagsInput) (*RemoveTagsOutput, error) { req, out := c.RemoveTagsRequest(input) @@ -1334,7 +1427,7 @@ const opStartLogging = "StartLogging" // StartLoggingRequest generates a "aws/request.Request" representing the // client's request for the StartLogging operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1368,6 +1461,7 @@ func (c *CloudTrail) StartLoggingRequest(input *StartLoggingInput) (req *request output = &StartLoggingOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1410,6 +1504,24 @@ func (c *CloudTrail) StartLoggingRequest(input *StartLoggingInput) (req *request // This exception is thrown when an operation is called on a trail from a region // other than the region in which the trail was created. // +// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" +// This exception is thrown when the requested operation is not supported. +// +// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" +// This exception is thrown when the requested operation is not permitted. +// +// * ErrCodeNotOrganizationMasterAccountException "NotOrganizationMasterAccountException" +// This exception is thrown when the AWS account making the request to create +// or update an organization trail is not the master account for an organization +// in AWS Organizations. For more information, see Prepare For Creating a Trail +// For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). +// +// * ErrCodeInsufficientDependencyServiceAccessPermissionException "InsufficientDependencyServiceAccessPermissionException" +// This exception is thrown when the IAM user or role that is used to create +// the organization trail is lacking one or more required permissions for creating +// an organization trail in a required service. For more information, see Prepare +// For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). +// // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartLogging func (c *CloudTrail) StartLogging(input *StartLoggingInput) (*StartLoggingOutput, error) { req, out := c.StartLoggingRequest(input) @@ -1437,7 +1549,7 @@ const opStopLogging = "StopLogging" // StopLoggingRequest generates a "aws/request.Request" representing the // client's request for the StopLogging operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1471,6 +1583,7 @@ func (c *CloudTrail) StopLoggingRequest(input *StopLoggingInput) (req *request.R output = &StopLoggingOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1515,6 +1628,24 @@ func (c *CloudTrail) StopLoggingRequest(input *StopLoggingInput) (req *request.R // This exception is thrown when an operation is called on a trail from a region // other than the region in which the trail was created. // +// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" +// This exception is thrown when the requested operation is not supported. +// +// * ErrCodeOperationNotPermittedException "OperationNotPermittedException" +// This exception is thrown when the requested operation is not permitted. +// +// * ErrCodeNotOrganizationMasterAccountException "NotOrganizationMasterAccountException" +// This exception is thrown when the AWS account making the request to create +// or update an organization trail is not the master account for an organization +// in AWS Organizations. For more information, see Prepare For Creating a Trail +// For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). +// +// * ErrCodeInsufficientDependencyServiceAccessPermissionException "InsufficientDependencyServiceAccessPermissionException" +// This exception is thrown when the IAM user or role that is used to create +// the organization trail is lacking one or more required permissions for creating +// an organization trail in a required service. For more information, see Prepare +// For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). +// // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopLogging func (c *CloudTrail) StopLogging(input *StopLoggingInput) (*StopLoggingOutput, error) { req, out := c.StopLoggingRequest(input) @@ -1542,7 +1673,7 @@ const opUpdateTrail = "UpdateTrail" // UpdateTrailRequest generates a "aws/request.Request" representing the // client's request for the UpdateTrail operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1677,6 +1808,35 @@ func (c *CloudTrail) UpdateTrailRequest(input *UpdateTrailInput) (req *request.R // * ErrCodeOperationNotPermittedException "OperationNotPermittedException" // This exception is thrown when the requested operation is not permitted. // +// * ErrCodeAccessNotEnabledException "CloudTrailAccessNotEnabledException" +// This exception is thrown when trusted access has not been enabled between +// AWS CloudTrail and AWS Organizations. For more information, see Enabling +// Trusted Access with Other AWS Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html) +// and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). +// +// * ErrCodeInsufficientDependencyServiceAccessPermissionException "InsufficientDependencyServiceAccessPermissionException" +// This exception is thrown when the IAM user or role that is used to create +// the organization trail is lacking one or more required permissions for creating +// an organization trail in a required service. For more information, see Prepare +// For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). +// +// * ErrCodeOrganizationsNotInUseException "OrganizationsNotInUseException" +// This exception is thrown when the request is made from an AWS account that +// is not a member of an organization. To make this request, sign in using the +// credentials of an account that belongs to an organization. +// +// * ErrCodeNotOrganizationMasterAccountException "NotOrganizationMasterAccountException" +// This exception is thrown when the AWS account making the request to create +// or update an organization trail is not the master account for an organization +// in AWS Organizations. For more information, see Prepare For Creating a Trail +// For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). +// +// * ErrCodeOrganizationNotInAllFeaturesModeException "OrganizationNotInAllFeaturesModeException" +// This exception is thrown when AWS Organizations is not configured to support +// all features. All features must be enabled in AWS Organization to support +// creating an organization trail. For more information, see Prepare For Creating +// a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). +// // See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateTrail func (c *CloudTrail) UpdateTrail(input *UpdateTrailInput) (*UpdateTrailOutput, error) { req, out := c.UpdateTrailRequest(input) @@ -1706,7 +1866,7 @@ type AddTagsInput struct { // Specifies the ARN of the trail to which one or more tags will be added. The // format of a trail ARN is: // - // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail // // ResourceId is a required field ResourceId *string `type:"string" required:"true"` @@ -1810,6 +1970,12 @@ type CreateTrailInput struct { // The default is false. IsMultiRegionTrail *bool `type:"boolean"` + // Specifies whether the trail is created for all accounts in an organization + // in AWS Organizations, or only for the current AWS account. The default is + // false, and cannot be true unless the call is made on behalf of an AWS account + // that is the master account for an organization in AWS Organizations. + IsOrganizationTrail *bool `type:"boolean"` + // Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. // The value can be an alias name prefixed by "alias/", a fully specified ARN // to an alias, a fully specified ARN to a key, or a globally unique identifier. @@ -1818,9 +1984,9 @@ type CreateTrailInput struct { // // * alias/MyAliasName // - // * arn:aws:kms:us-east-1:123456789012:alias/MyAliasName + // * arn:aws:kms:us-east-2:123456789012:alias/MyAliasName // - // * arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 + // * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 // // * 12345678-1234-1234-1234-123456789012 KmsKeyId *string `type:"string"` @@ -1915,6 +2081,12 @@ func (s *CreateTrailInput) SetIsMultiRegionTrail(v bool) *CreateTrailInput { return s } +// SetIsOrganizationTrail sets the IsOrganizationTrail field's value. +func (s *CreateTrailInput) SetIsOrganizationTrail(v bool) *CreateTrailInput { + s.IsOrganizationTrail = &v + return s +} + // SetKmsKeyId sets the KmsKeyId field's value. func (s *CreateTrailInput) SetKmsKeyId(v string) *CreateTrailInput { s.KmsKeyId = &v @@ -1965,10 +2137,13 @@ type CreateTrailOutput struct { // Specifies whether the trail exists in one region or in all regions. IsMultiRegionTrail *bool `type:"boolean"` + // Specifies whether the trail is an organization trail. + IsOrganizationTrail *bool `type:"boolean"` + // Specifies the KMS key ID that encrypts the logs delivered by CloudTrail. // The value is a fully specified ARN to a KMS key in the format: // - // arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 + // arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 KmsKeyId *string `type:"string"` // Specifies whether log file integrity validation is enabled. @@ -1989,7 +2164,7 @@ type CreateTrailOutput struct { // Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications // when log files are delivered. The format of a topic ARN is: // - // arn:aws:sns:us-east-1:123456789012:MyTopic + // arn:aws:sns:us-east-2:123456789012:MyTopic SnsTopicARN *string `type:"string"` // This field is deprecated. Use SnsTopicARN. @@ -2000,7 +2175,7 @@ type CreateTrailOutput struct { // Specifies the ARN of the trail that was created. The format of a trail ARN // is: // - // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail TrailARN *string `type:"string"` } @@ -2038,6 +2213,12 @@ func (s *CreateTrailOutput) SetIsMultiRegionTrail(v bool) *CreateTrailOutput { return s } +// SetIsOrganizationTrail sets the IsOrganizationTrail field's value. +func (s *CreateTrailOutput) SetIsOrganizationTrail(v bool) *CreateTrailOutput { + s.IsOrganizationTrail = &v + return s +} + // SetKmsKeyId sets the KmsKeyId field's value. func (s *CreateTrailOutput) SetKmsKeyId(v string) *CreateTrailOutput { s.KmsKeyId = &v @@ -2086,41 +2267,93 @@ func (s *CreateTrailOutput) SetTrailARN(v string) *CreateTrailOutput { return s } -// The Amazon S3 objects that you specify in your event selectors for your trail -// to log data events. Data events are object-level API operations that access -// S3 objects, such as GetObject, DeleteObject, and PutObject. You can specify -// up to 250 S3 buckets and object prefixes for a trail. +// The Amazon S3 buckets or AWS Lambda functions that you specify in your event +// selectors for your trail to log data events. Data events provide insight +// into the resource operations performed on or within a resource itself. These +// are also known as data plane operations. You can specify up to 250 data resources +// for a trail. // -// Example +// The total number of allowed data resources is 250. This number can be distributed +// between 1 and 5 event selectors, but the total cannot exceed 250 across all +// selectors. // -// You create an event selector for a trail and specify an S3 bucket and an -// empty prefix, such as arn:aws:s3:::bucket-1/. +// The following example demonstrates how logging works when you configure logging +// of all data events for an S3 bucket named bucket-1. In this example, the +// CloudTrail user spcified an empty prefix, and the option to log both Read +// and Write data events. // -// You upload an image file to bucket-1. +// A user uploads an image file to bucket-1. // -// The PutObject API operation occurs on an object in the S3 bucket that you -// specified in the event selector. The trail processes and logs the event. +// The PutObject API operation is an Amazon S3 object-level API. It is recorded +// as a data event in CloudTrail. Because the CloudTrail user specified an S3 +// bucket with an empty prefix, events that occur on any object in that bucket +// are logged. The trail processes and logs the event. // -// You upload another image file to a different S3 bucket named arn:aws:s3:::bucket-2. +// A user uploads an object to an Amazon S3 bucket named arn:aws:s3:::bucket-2. // -// The event occurs on an object in an S3 bucket that you didn't specify in -// the event selector. The trail doesn’t log the event. +// The PutObject API operation occurred for an object in an S3 bucket that the +// CloudTrail user didn't specify for the trail. The trail doesn’t log the event. +// +// The following example demonstrates how logging works when you configure logging +// of AWS Lambda data events for a Lambda function named MyLambdaFunction, but +// not for all AWS Lambda functions. +// +// A user runs a script that includes a call to the MyLambdaFunction function +// and the MyOtherLambdaFunction function. +// +// The Invoke API operation on MyLambdaFunction is an AWS Lambda API. It is +// recorded as a data event in CloudTrail. Because the CloudTrail user specified +// logging data events for MyLambdaFunction, any invocations of that function +// are logged. The trail processes and logs the event. +// +// The Invoke API operation on MyOtherLambdaFunction is an AWS Lambda API. Because +// the CloudTrail user did not specify logging data events for all Lambda functions, +// the Invoke operation for MyOtherLambdaFunction does not match the function +// specified for the trail. The trail doesn’t log the event. type DataResource struct { _ struct{} `type:"structure"` - // The resource type in which you want to log data events. You can specify only - // the following value: AWS::S3::Object. + // The resource type in which you want to log data events. You can specify AWS::S3::Object + // or AWS::Lambda::Function resources. Type *string `type:"string"` - // A list of ARN-like strings for the specified S3 objects. + // An array of Amazon Resource Name (ARN) strings or partial ARN strings for + // the specified objects. + // + // * To log data events for all objects in all S3 buckets in your AWS account, + // specify the prefix as arn:aws:s3:::. // - // To log data events for all objects in an S3 bucket, specify the bucket and - // an empty object prefix such as arn:aws:s3:::bucket-1/. The trail logs data - // events for all objects in this S3 bucket. + // This will also enable logging of data event activity performed by any user + // or role in your AWS account, even if that activity is performed on a bucket + // that belongs to another AWS account. // - // To log data events for specific objects, specify the S3 bucket and object - // prefix such as arn:aws:s3:::bucket-1/example-images. The trail logs data - // events for objects in this S3 bucket that match the prefix. + // * To log data events for all objects in all S3 buckets that include my-bucket + // in their names, specify the prefix as aws:s3:::my-bucket. The trail logs + // data events for all objects in all buckets whose name contains a match + // for my-bucket. + // + // * To log data events for all objects in an S3 bucket, specify the bucket + // and an empty object prefix such as arn:aws:s3:::bucket-1/. The trail logs + // data events for all objects in this S3 bucket. + // + // * To log data events for specific objects, specify the S3 bucket and object + // prefix such as arn:aws:s3:::bucket-1/example-images. The trail logs data + // events for objects in this S3 bucket that match the prefix. + // + // * To log data events for all functions in your AWS account, specify the + // prefix as arn:aws:lambda. + // + // This will also enable logging of Invoke activity performed by any user or + // role in your AWS account, even if that activity is performed on a function + // that belongs to another AWS account. + // + // * To log data eents for a specific Lambda function, specify the function + // ARN. + // + // Lambda function ARNs are exact. Unlike S3, you cannot use matching. For example, + // if you specify a function ARN arn:aws:lambda:us-west-2:111111111111:function:helloworld, + // data events will only be logged for arn:aws:lambda:us-west-2:111111111111:function:helloworld. + // They will not be logged for arn:aws:lambda:us-west-2:111111111111:function:helloworld2. Values []*string `type:"list"` } @@ -2151,7 +2384,7 @@ type DeleteTrailInput struct { _ struct{} `type:"structure"` // Specifies the name or the CloudTrail ARN of the trail to be deleted. The - // format of a trail ARN is: arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // format of a trail ARN is: arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail // // Name is a required field Name *string `type:"string" required:"true"` @@ -2208,13 +2441,16 @@ type DescribeTrailsInput struct { // Specifies whether to include shadow trails in the response. A shadow trail // is the replication in a region of a trail that was created in a different - // region. The default is true. + // region, or in the case of an organization trail, the replication of an organization + // trail in member accounts. If you do not include shadow trails, organization + // trails in a member account and region replication trails will not be returned. + // The default is true. IncludeShadowTrails *bool `locationName:"includeShadowTrails" type:"boolean"` // Specifies a list of trail names, trail ARNs, or both, of the trails to describe. // The format of a trail ARN is: // - // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail // // If an empty list is specified, information for the trail in the current region // is returned. @@ -2285,6 +2521,11 @@ func (s *DescribeTrailsOutput) SetTrailList(v []*Trail) *DescribeTrailsOutput { type Event struct { _ struct{} `type:"structure"` + // The AWS access key ID that was used to sign the request. If the request was + // made with temporary security credentials, this is the access key ID of the + // temporary credentials. + AccessKeyId *string `type:"string"` + // A JSON string that contains a representation of the event returned. CloudTrailEvent *string `type:"string"` @@ -2300,6 +2541,9 @@ type Event struct { // The date and time of the event returned. EventTime *time.Time `type:"timestamp"` + // Information about whether the event is a write event or a read event. + ReadOnly *string `type:"string"` + // A list of resources referenced by the event returned. Resources []*Resource `type:"list"` @@ -2318,6 +2562,12 @@ func (s Event) GoString() string { return s.String() } +// SetAccessKeyId sets the AccessKeyId field's value. +func (s *Event) SetAccessKeyId(v string) *Event { + s.AccessKeyId = &v + return s +} + // SetCloudTrailEvent sets the CloudTrailEvent field's value. func (s *Event) SetCloudTrailEvent(v string) *Event { s.CloudTrailEvent = &v @@ -2348,6 +2598,12 @@ func (s *Event) SetEventTime(v time.Time) *Event { return s } +// SetReadOnly sets the ReadOnly field's value. +func (s *Event) SetReadOnly(v string) *Event { + s.ReadOnly = &v + return s +} + // SetResources sets the Resources field's value. func (s *Event) SetResources(v []*Resource) *Event { s.Resources = v @@ -2360,20 +2616,26 @@ func (s *Event) SetUsername(v string) *Event { return s } -// Use event selectors to specify whether you want your trail to log management -// and/or data events. When an event occurs in your account, CloudTrail evaluates -// the event selector for all trails. For each trail, if the event matches any -// event selector, the trail processes and logs the event. If the event doesn't -// match any event selector, the trail doesn't log the event. +// Use event selectors to further specify the management and data event settings +// for your trail. By default, trails created without specific event selectors +// will be configured to log all read and write management events, and no data +// events. When an event occurs in your account, CloudTrail evaluates the event +// selector for all trails. For each trail, if the event matches any event selector, +// the trail processes and logs the event. If the event doesn't match any event +// selector, the trail doesn't log the event. // // You can configure up to five event selectors for a trail. type EventSelector struct { _ struct{} `type:"structure"` - // CloudTrail supports logging only data events for S3 objects. You can specify - // up to 250 S3 buckets and object prefixes for a trail. + // CloudTrail supports data event logging for Amazon S3 objects and AWS Lambda + // functions. You can specify up to 250 resources for an individual event selector, + // but the total number of data resources cannot exceed 250 across all event + // selectors in a trail. This limit does not apply if you configure resource + // logging for all data events. // // For more information, see Data Events (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html#logging-data-events) + // and Limits in AWS CloudTrail (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html) // in the AWS CloudTrail User Guide. DataResources []*DataResource `type:"list"` @@ -2436,13 +2698,13 @@ type GetEventSelectorsInput struct { // * Be between 3 and 128 characters // // * Have no adjacent periods, underscores or dashes. Names like my-_namespace - // and my--namespace are invalid. + // and my--namespace are not valid. // // * Not be in IP address format (for example, 192.168.5.4) // // If you specify a trail ARN, it must be in the format: // - // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail // // TrailName is a required field TrailName *string `type:"string" required:"true"` @@ -2517,7 +2779,7 @@ type GetTrailStatusInput struct { // status. To get the status of a shadow trail (a replication of the trail in // another region), you must specify its ARN. The format of a trail ARN is: // - // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail // // Name is a required field Name *string `type:"string" required:"true"` @@ -2837,7 +3099,7 @@ type ListTagsInput struct { // Specifies a list of trail ARNs whose tags will be listed. The list has a // limit of 20 ARNs. The format of a trail ARN is: // - // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail // // ResourceIdList is a required field ResourceIdList []*string `type:"list" required:"true"` @@ -2979,7 +3241,7 @@ type LookupEventsInput struct { LookupAttributes []*LookupAttribute `type:"list"` // The number of events to return. Possible values are 1 through 50. The default - // is 10. + // is 50. MaxResults *int64 `min:"1" type:"integer"` // The token to use to get the next page of results after a previous API call. @@ -3176,7 +3438,7 @@ type PutEventSelectorsInput struct { // // If you specify a trail ARN, it must be in the format: // - // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail // // TrailName is a required field TrailName *string `type:"string" required:"true"` @@ -3229,7 +3491,7 @@ type PutEventSelectorsOutput struct { // Specifies the ARN of the trail that was updated with event selectors. The // format of a trail ARN is: // - // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail TrailARN *string `type:"string"` } @@ -3262,7 +3524,7 @@ type RemoveTagsInput struct { // Specifies the ARN of the trail from which tags should be removed. The format // of a trail ARN is: // - // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail // // ResourceId is a required field ResourceId *string `type:"string" required:"true"` @@ -3412,7 +3674,7 @@ type StartLoggingInput struct { // Specifies the name or the CloudTrail ARN of the trail for which CloudTrail // logs AWS API calls. The format of a trail ARN is: // - // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail // // Name is a required field Name *string `type:"string" required:"true"` @@ -3471,7 +3733,7 @@ type StopLoggingInput struct { // Specifies the name or the CloudTrail ARN of the trail for which CloudTrail // will stop logging AWS API calls. The format of a trail ARN is: // - // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail // // Name is a required field Name *string `type:"string" required:"true"` @@ -3597,10 +3859,13 @@ type Trail struct { // Specifies whether the trail belongs only to one region or exists in all regions. IsMultiRegionTrail *bool `type:"boolean"` + // Specifies whether the trail is an organization trail. + IsOrganizationTrail *bool `type:"boolean"` + // Specifies the KMS key ID that encrypts the logs delivered by CloudTrail. // The value is a fully specified ARN to a KMS key in the format: // - // arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 + // arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 KmsKeyId *string `type:"string"` // Specifies whether log file validation is enabled. @@ -3622,7 +3887,7 @@ type Trail struct { // Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications // when log files are delivered. The format of a topic ARN is: // - // arn:aws:sns:us-east-1:123456789012:MyTopic + // arn:aws:sns:us-east-2:123456789012:MyTopic SnsTopicARN *string `type:"string"` // This field is deprecated. Use SnsTopicARN. @@ -3632,7 +3897,7 @@ type Trail struct { // Specifies the ARN of the trail. The format of a trail ARN is: // - // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail TrailARN *string `type:"string"` } @@ -3682,6 +3947,12 @@ func (s *Trail) SetIsMultiRegionTrail(v bool) *Trail { return s } +// SetIsOrganizationTrail sets the IsOrganizationTrail field's value. +func (s *Trail) SetIsOrganizationTrail(v bool) *Trail { + s.IsOrganizationTrail = &v + return s +} + // SetKmsKeyId sets the KmsKeyId field's value. func (s *Trail) SetKmsKeyId(v string) *Trail { s.KmsKeyId = &v @@ -3767,6 +4038,17 @@ type UpdateTrailInput struct { // it was created, and its shadow trails in other regions will be deleted. IsMultiRegionTrail *bool `type:"boolean"` + // Specifies whether the trail is applied to all accounts in an organization + // in AWS Organizations, or only for the current AWS account. The default is + // false, and cannot be true unless the call is made on behalf of an AWS account + // that is the master account for an organization in AWS Organizations. If the + // trail is not an organization trail and this is set to true, the trail will + // be created in all AWS accounts that belong to the organization. If the trail + // is an organization trail and this is set to false, the trail will remain + // in the current AWS account but be deleted from all member accounts in the + // organization. + IsOrganizationTrail *bool `type:"boolean"` + // Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. // The value can be an alias name prefixed by "alias/", a fully specified ARN // to an alias, a fully specified ARN to a key, or a globally unique identifier. @@ -3775,9 +4057,9 @@ type UpdateTrailInput struct { // // * alias/MyAliasName // - // * arn:aws:kms:us-east-1:123456789012:alias/MyAliasName + // * arn:aws:kms:us-east-2:123456789012:alias/MyAliasName // - // * arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 + // * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 // // * 12345678-1234-1234-1234-123456789012 KmsKeyId *string `type:"string"` @@ -3799,7 +4081,7 @@ type UpdateTrailInput struct { // // If Name is a trail ARN, it must be in the format: // - // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail // // Name is a required field Name *string `type:"string" required:"true"` @@ -3872,6 +4154,12 @@ func (s *UpdateTrailInput) SetIsMultiRegionTrail(v bool) *UpdateTrailInput { return s } +// SetIsOrganizationTrail sets the IsOrganizationTrail field's value. +func (s *UpdateTrailInput) SetIsOrganizationTrail(v bool) *UpdateTrailInput { + s.IsOrganizationTrail = &v + return s +} + // SetKmsKeyId sets the KmsKeyId field's value. func (s *UpdateTrailInput) SetKmsKeyId(v string) *UpdateTrailInput { s.KmsKeyId = &v @@ -3922,10 +4210,13 @@ type UpdateTrailOutput struct { // Specifies whether the trail exists in one region or in all regions. IsMultiRegionTrail *bool `type:"boolean"` + // Specifies whether the trail is an organization trail. + IsOrganizationTrail *bool `type:"boolean"` + // Specifies the KMS key ID that encrypts the logs delivered by CloudTrail. // The value is a fully specified ARN to a KMS key in the format: // - // arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012 + // arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 KmsKeyId *string `type:"string"` // Specifies whether log file integrity validation is enabled. @@ -3946,7 +4237,7 @@ type UpdateTrailOutput struct { // Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications // when log files are delivered. The format of a topic ARN is: // - // arn:aws:sns:us-east-1:123456789012:MyTopic + // arn:aws:sns:us-east-2:123456789012:MyTopic SnsTopicARN *string `type:"string"` // This field is deprecated. Use SnsTopicARN. @@ -3957,7 +4248,7 @@ type UpdateTrailOutput struct { // Specifies the ARN of the trail that was updated. The format of a trail ARN // is: // - // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail TrailARN *string `type:"string"` } @@ -3995,6 +4286,12 @@ func (s *UpdateTrailOutput) SetIsMultiRegionTrail(v bool) *UpdateTrailOutput { return s } +// SetIsOrganizationTrail sets the IsOrganizationTrail field's value. +func (s *UpdateTrailOutput) SetIsOrganizationTrail(v bool) *UpdateTrailOutput { + s.IsOrganizationTrail = &v + return s +} + // SetKmsKeyId sets the KmsKeyId field's value. func (s *UpdateTrailOutput) SetKmsKeyId(v string) *UpdateTrailOutput { s.KmsKeyId = &v @@ -4050,6 +4347,9 @@ const ( // LookupAttributeKeyEventName is a LookupAttributeKey enum value LookupAttributeKeyEventName = "EventName" + // LookupAttributeKeyReadOnly is a LookupAttributeKey enum value + LookupAttributeKeyReadOnly = "ReadOnly" + // LookupAttributeKeyUsername is a LookupAttributeKey enum value LookupAttributeKeyUsername = "Username" @@ -4061,6 +4361,9 @@ const ( // LookupAttributeKeyEventSource is a LookupAttributeKey enum value LookupAttributeKeyEventSource = "EventSource" + + // LookupAttributeKeyAccessKeyId is a LookupAttributeKey enum value + LookupAttributeKeyAccessKeyId = "AccessKeyId" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/errors.go b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/errors.go index 0ee616cbe2..4fdd9a37b5 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/errors.go @@ -10,15 +10,33 @@ const ( // This exception is thrown when an operation is called with an invalid trail // ARN. The format of a trail ARN is: // - // arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail + // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail ErrCodeARNInvalidException = "CloudTrailARNInvalidException" + // ErrCodeAccessNotEnabledException for service response error code + // "CloudTrailAccessNotEnabledException". + // + // This exception is thrown when trusted access has not been enabled between + // AWS CloudTrail and AWS Organizations. For more information, see Enabling + // Trusted Access with Other AWS Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html) + // and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). + ErrCodeAccessNotEnabledException = "CloudTrailAccessNotEnabledException" + // ErrCodeCloudWatchLogsDeliveryUnavailableException for service response error code // "CloudWatchLogsDeliveryUnavailableException". // // Cannot set a CloudWatch Logs delivery for this region. ErrCodeCloudWatchLogsDeliveryUnavailableException = "CloudWatchLogsDeliveryUnavailableException" + // ErrCodeInsufficientDependencyServiceAccessPermissionException for service response error code + // "InsufficientDependencyServiceAccessPermissionException". + // + // This exception is thrown when the IAM user or role that is used to create + // the organization trail is lacking one or more required permissions for creating + // an organization trail in a required service. For more information, see Prepare + // For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). + ErrCodeInsufficientDependencyServiceAccessPermissionException = "InsufficientDependencyServiceAccessPermissionException" + // ErrCodeInsufficientEncryptionPolicyException for service response error code // "InsufficientEncryptionPolicyException". // @@ -54,12 +72,21 @@ const ( // "InvalidEventSelectorsException". // // This exception is thrown when the PutEventSelectors operation is called with - // an invalid number of event selectors, data resources, or an invalid value - // for a parameter: + // a number of event selectors or data resources that is not valid. The combination + // of event selectors and data resources is not valid. A trail can have up to + // 5 event selectors. A trail is limited to 250 data resources. These data resources + // can be distributed across event selectors, but the overall total cannot exceed + // 250. + // + // You can: // // * Specify a valid number of event selectors (1 to 5) for a trail. // // * Specify a valid number of data resources (1 to 250) for an event selector. + // The limit of number of resources on an individual event selector is configurable + // up to 250. However, this upper limit is allowed only if the total number + // of data resources does not exceed 250 across all event selectors for a + // trail. // // * Specify a valid value for a parameter. For example, specifying the ReadWriteType // parameter with a value of read-only is invalid. @@ -187,12 +214,38 @@ const ( // This exception is thrown when the maximum number of trails is reached. ErrCodeMaximumNumberOfTrailsExceededException = "MaximumNumberOfTrailsExceededException" + // ErrCodeNotOrganizationMasterAccountException for service response error code + // "NotOrganizationMasterAccountException". + // + // This exception is thrown when the AWS account making the request to create + // or update an organization trail is not the master account for an organization + // in AWS Organizations. For more information, see Prepare For Creating a Trail + // For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). + ErrCodeNotOrganizationMasterAccountException = "NotOrganizationMasterAccountException" + // ErrCodeOperationNotPermittedException for service response error code // "OperationNotPermittedException". // // This exception is thrown when the requested operation is not permitted. ErrCodeOperationNotPermittedException = "OperationNotPermittedException" + // ErrCodeOrganizationNotInAllFeaturesModeException for service response error code + // "OrganizationNotInAllFeaturesModeException". + // + // This exception is thrown when AWS Organizations is not configured to support + // all features. All features must be enabled in AWS Organization to support + // creating an organization trail. For more information, see Prepare For Creating + // a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html). + ErrCodeOrganizationNotInAllFeaturesModeException = "OrganizationNotInAllFeaturesModeException" + + // ErrCodeOrganizationsNotInUseException for service response error code + // "OrganizationsNotInUseException". + // + // This exception is thrown when the request is made from an AWS account that + // is not a member of an organization. To make this request, sign in using the + // credentials of an account that belongs to an organization. + ErrCodeOrganizationsNotInUseException = "OrganizationsNotInUseException" + // ErrCodeResourceNotFoundException for service response error code // "ResourceNotFoundException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go index 135c56d897..b7be8d6a16 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatch/api.go @@ -18,7 +18,7 @@ const opDeleteAlarms = "DeleteAlarms" // DeleteAlarmsRequest generates a "aws/request.Request" representing the // client's request for the DeleteAlarms operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -52,8 +52,7 @@ func (c *CloudWatch) DeleteAlarmsRequest(input *DeleteAlarmsInput) (req *request output = &DeleteAlarmsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -99,7 +98,7 @@ const opDeleteDashboards = "DeleteDashboards" // DeleteDashboardsRequest generates a "aws/request.Request" representing the // client's request for the DeleteDashboards operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -133,6 +132,7 @@ func (c *CloudWatch) DeleteDashboardsRequest(input *DeleteDashboardsInput) (req output = &DeleteDashboardsOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -185,7 +185,7 @@ const opDescribeAlarmHistory = "DescribeAlarmHistory" // DescribeAlarmHistoryRequest generates a "aws/request.Request" representing the // client's request for the DescribeAlarmHistory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -324,7 +324,7 @@ const opDescribeAlarms = "DescribeAlarms" // DescribeAlarmsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAlarms operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -461,7 +461,7 @@ const opDescribeAlarmsForMetric = "DescribeAlarmsForMetric" // DescribeAlarmsForMetricRequest generates a "aws/request.Request" representing the // client's request for the DescribeAlarmsForMetric operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -536,7 +536,7 @@ const opDisableAlarmActions = "DisableAlarmActions" // DisableAlarmActionsRequest generates a "aws/request.Request" representing the // client's request for the DisableAlarmActions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -570,8 +570,7 @@ func (c *CloudWatch) DisableAlarmActionsRequest(input *DisableAlarmActionsInput) output = &DisableAlarmActionsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -613,7 +612,7 @@ const opEnableAlarmActions = "EnableAlarmActions" // EnableAlarmActionsRequest generates a "aws/request.Request" representing the // client's request for the EnableAlarmActions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -647,8 +646,7 @@ func (c *CloudWatch) EnableAlarmActionsRequest(input *EnableAlarmActionsInput) ( output = &EnableAlarmActionsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -689,7 +687,7 @@ const opGetDashboard = "GetDashboard" // GetDashboardRequest generates a "aws/request.Request" representing the // client's request for the GetDashboard operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -778,7 +776,7 @@ const opGetMetricData = "GetMetricData" // GetMetricDataRequest generates a "aws/request.Request" representing the // client's request for the GetMetricData operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -830,6 +828,29 @@ func (c *CloudWatch) GetMetricDataRequest(input *GetMetricDataInput) (req *reque // to GetMetricStatistics. For more information about pricing, see Amazon CloudWatch // Pricing (https://aws.amazon.com/cloudwatch/pricing/). // +// Amazon CloudWatch retains metric data as follows: +// +// * Data points with a period of less than 60 seconds are available for +// 3 hours. These data points are high-resolution metrics and are available +// only for custom metrics that have been defined with a StorageResolution +// of 1. +// +// * Data points with a period of 60 seconds (1-minute) are available for +// 15 days. +// +// * Data points with a period of 300 seconds (5-minute) are available for +// 63 days. +// +// * Data points with a period of 3600 seconds (1 hour) are available for +// 455 days (15 months). +// +// Data points that are initially published with a shorter period are aggregated +// together for long-term storage. For example, if you collect data using a +// period of 1 minute, the data remains available for 15 days with 1-minute +// resolution. After 15 days, this data is still available, but is aggregated +// and retrievable only with a resolution of 5 minutes. After 63 days, the data +// is further aggregated and is available with a resolution of 1 hour. +// // 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. @@ -868,7 +889,7 @@ const opGetMetricStatistics = "GetMetricStatistics" // GetMetricStatisticsRequest generates a "aws/request.Request" representing the // client's request for the GetMetricStatistics operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -929,6 +950,9 @@ func (c *CloudWatch) GetMetricStatisticsRequest(input *GetMetricStatisticsInput) // // * The Min and the Max values of the statistic set are equal. // +// Percentile statistics are not available for metrics when any of the metric +// values are negative numbers. +// // Amazon CloudWatch retains metric data as follows: // // * Data points with a period of less than 60 seconds are available for @@ -1001,12 +1025,100 @@ func (c *CloudWatch) GetMetricStatisticsWithContext(ctx aws.Context, input *GetM return out, req.Send() } +const opGetMetricWidgetImage = "GetMetricWidgetImage" + +// GetMetricWidgetImageRequest generates a "aws/request.Request" representing the +// client's request for the GetMetricWidgetImage 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 GetMetricWidgetImage for more information on using the GetMetricWidgetImage +// 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 GetMetricWidgetImageRequest method. +// req, resp := client.GetMetricWidgetImageRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricWidgetImage +func (c *CloudWatch) GetMetricWidgetImageRequest(input *GetMetricWidgetImageInput) (req *request.Request, output *GetMetricWidgetImageOutput) { + op := &request.Operation{ + Name: opGetMetricWidgetImage, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetMetricWidgetImageInput{} + } + + output = &GetMetricWidgetImageOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetMetricWidgetImage API operation for Amazon CloudWatch. +// +// You can use the GetMetricWidgetImage API to retrieve a snapshot graph of +// one or more Amazon CloudWatch metrics as a bitmap image. You can then embed +// this image into your services and products, such as wiki pages, reports, +// and documents. You could also retrieve images regularly, such as every minute, +// and create your own custom live dashboard. +// +// The graph you retrieve can include all CloudWatch metric graph features, +// including metric math and horizontal and vertical annotations. +// +// There is a limit of 20 transactions per second for this API. Each GetMetricWidgetImage +// action has the following limits: +// +// * As many as 100 metrics in the graph. +// +// * Up to 100 KB uncompressed payload. +// +// 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 CloudWatch's +// API operation GetMetricWidgetImage for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/monitoring-2010-08-01/GetMetricWidgetImage +func (c *CloudWatch) GetMetricWidgetImage(input *GetMetricWidgetImageInput) (*GetMetricWidgetImageOutput, error) { + req, out := c.GetMetricWidgetImageRequest(input) + return out, req.Send() +} + +// GetMetricWidgetImageWithContext is the same as GetMetricWidgetImage with the addition of +// the ability to pass a context and additional request options. +// +// See GetMetricWidgetImage 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 *CloudWatch) GetMetricWidgetImageWithContext(ctx aws.Context, input *GetMetricWidgetImageInput, opts ...request.Option) (*GetMetricWidgetImageOutput, error) { + req, out := c.GetMetricWidgetImageRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListDashboards = "ListDashboards" // ListDashboardsRequest generates a "aws/request.Request" representing the // client's request for the ListDashboards operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1049,6 +1161,10 @@ func (c *CloudWatch) ListDashboardsRequest(input *ListDashboardsInput) (req *req // only those dashboards with names starting with the prefix are listed. Otherwise, // all dashboards in your account are listed. // +// ListDashboards returns up to 1000 results on one page. If there are more +// than 1000 dashboards, you can call ListDashboards again and include the value +// you received for NextToken in the first call, to receive the next 1000 results. +// // 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. @@ -1090,7 +1206,7 @@ const opListMetrics = "ListMetrics" // ListMetricsRequest generates a "aws/request.Request" representing the // client's request for the ListMetrics operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1135,15 +1251,15 @@ func (c *CloudWatch) ListMetricsRequest(input *ListMetricsInput) (req *request.R // ListMetrics API operation for Amazon CloudWatch. // -// List the specified metrics. You can use the returned metrics with GetMetricStatistics -// to obtain statistical data. +// List the specified metrics. You can use the returned metrics with GetMetricData +// or GetMetricStatistics to obtain statistical data. // // Up to 500 results are returned for any one call. To retrieve additional results, // use the returned token with subsequent calls. // // After you create a metric, allow up to fifteen minutes before the metric // appears. Statistics about the metric, however, are available sooner using -// GetMetricStatistics. +// GetMetricData or GetMetricStatistics. // // 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 @@ -1236,7 +1352,7 @@ const opPutDashboard = "PutDashboard" // PutDashboardRequest generates a "aws/request.Request" representing the // client's request for the PutDashboard operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1279,8 +1395,8 @@ func (c *CloudWatch) PutDashboardRequest(input *PutDashboardInput) (req *request // dashboard. If you update a dashboard, the entire contents are replaced with // what you specify here. // -// You can have up to 500 dashboards per account. All dashboards in your account -// are global, not region-specific. +// There is no limit to the number of dashboards in your account. All dashboards +// in your account are global, not region-specific. // // A simple way to create a dashboard using PutDashboard is to copy an existing // dashboard. To copy an existing dashboard using the console, you can load @@ -1336,7 +1452,7 @@ const opPutMetricAlarm = "PutMetricAlarm" // PutMetricAlarmRequest generates a "aws/request.Request" representing the // client's request for the PutMetricAlarm operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1370,25 +1486,24 @@ func (c *CloudWatch) PutMetricAlarmRequest(input *PutMetricAlarmInput) (req *req output = &PutMetricAlarmOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // PutMetricAlarm API operation for Amazon CloudWatch. // -// Creates or updates an alarm and associates it with the specified metric. -// Optionally, this operation can associate one or more Amazon SNS resources -// with the alarm. +// Creates or updates an alarm and associates it with the specified metric or +// metric math expression. // // When this operation creates an alarm, the alarm state is immediately set -// to INSUFFICIENT_DATA. The alarm is evaluated and its state is set appropriately. -// Any actions associated with the state are then executed. +// to INSUFFICIENT_DATA. The alarm is then evaluated and its state is set appropriately. +// Any actions associated with the new state are then executed. // // When you update an existing alarm, its state is left unchanged, but the update // completely overwrites the previous configuration of the alarm. // -// If you are an IAM user, you must have Amazon EC2 permissions for some operations: +// If you are an IAM user, you must have Amazon EC2 permissions for some alarm +// operations: // // * iam:CreateServiceLinkedRole for all alarms with EC2 actions // @@ -1415,10 +1530,10 @@ func (c *CloudWatch) PutMetricAlarmRequest(input *PutMetricAlarmInput) (req *req // If you are using temporary security credentials granted using AWS STS, you // cannot stop or terminate an EC2 instance using alarm actions. // -// You must create at least one stop, terminate, or reboot alarm using either -// the Amazon EC2 or CloudWatch consoles to create the EC2ActionsAccess IAM -// role. After this IAM role is created, you can create stop, terminate, or -// reboot alarms using a command-line interface or API. +// The first time you create an alarm in the AWS Management Console, the CLI, +// or by using the PutMetricAlarm API, CloudWatch creates the necessary service-linked +// role for you. The service-linked role is called AWSServiceRoleForCloudWatchEvents. +// For more information, see AWS service-linked role (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-service-linked-role). // // 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 @@ -1458,7 +1573,7 @@ const opPutMetricData = "PutMetricData" // PutMetricDataRequest generates a "aws/request.Request" representing the // client's request for the PutMetricData operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1492,8 +1607,7 @@ func (c *CloudWatch) PutMetricDataRequest(input *PutMetricDataInput) (req *reque output = &PutMetricDataOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1504,7 +1618,16 @@ func (c *CloudWatch) PutMetricDataRequest(input *PutMetricDataInput) (req *reque // exist, CloudWatch creates the metric. When CloudWatch creates a metric, it // can take up to fifteen minutes for the metric to appear in calls to ListMetrics. // +// You can publish either individual data points in the Value field, or arrays +// of values and the number of times each value occurred during the period by +// using the Values and Counts fields in the MetricDatum structure. Using the +// Values and Counts method enables you to publish up to 150 values per metric +// with one PutMetricData request, and supports retrieving percentile statistics +// on this data. +// // Each PutMetricData request is limited to 40 KB in size for HTTP POST requests. +// You can send a payload compressed by gzip. Each request is also limited to +// no more than 20 different metrics. // // Although the Value parameter accepts numbers of type Double, CloudWatch rejects // values that are either too small or too large. Values must be in the range @@ -1518,16 +1641,17 @@ func (c *CloudWatch) PutMetricDataRequest(input *PutMetricDataInput) (req *reque // in the Amazon CloudWatch User Guide. // // Data points with time stamps from 24 hours ago or longer can take at least -// 48 hours to become available for GetMetricStatistics from the time they are -// submitted. +// 48 hours to become available for GetMetricData or GetMetricStatistics from +// the time they are submitted. // // CloudWatch needs raw data points to calculate percentile statistics. If you // publish data using a statistic set instead, you can only retrieve percentile // statistics for this data if one of the following conditions is true: // -// * The SampleCount value of the statistic set is 1 +// * The SampleCount value of the statistic set is 1 and Min, Max, and Sum +// are all equal. // -// * The Min and the Max values of the statistic set are equal +// * The Min and Max are equal, and Sum is equal to Min multiplied by SampleCount. // // 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 @@ -1576,7 +1700,7 @@ const opSetAlarmState = "SetAlarmState" // SetAlarmStateRequest generates a "aws/request.Request" representing the // client's request for the SetAlarmState operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1610,8 +1734,7 @@ func (c *CloudWatch) SetAlarmStateRequest(input *SetAlarmStateInput) (req *reque output = &SetAlarmStateOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2683,6 +2806,12 @@ type GetMetricDataInput struct { // The time stamp indicating the latest data to be returned. // + // For better performance, specify StartTime and EndTime values that align with + // the value of the metric's Period and sync up with the beginning and end of + // an hour. For example, if the Period of a metric is 5 minutes, specifying + // 12:05 or 12:30 as EndTime can get a faster response from CloudWatch then + // setting 12:07 or 12:29 as the EndTime. + // // EndTime is a required field EndTime *time.Time `type:"timestamp" required:"true"` @@ -2710,6 +2839,12 @@ type GetMetricDataInput struct { // The time stamp indicating the earliest data to be returned. // + // For better performance, specify StartTime and EndTime values that align with + // the value of the metric's Period and sync up with the beginning and end of + // an hour. For example, if the Period of a metric is 5 minutes, specifying + // 12:05 or 12:30 as StartTime can get a faster response from CloudWatch then + // setting 12:07 or 12:29 as the StartTime. + // // StartTime is a required field StartTime *time.Time `type:"timestamp" required:"true"` } @@ -2846,7 +2981,8 @@ type GetMetricStatisticsInput struct { // The percentile statistics. Specify values between p0.0 and p100. When calling // GetMetricStatistics, you must specify either Statistics or ExtendedStatistics, - // but not both. + // but not both. Percentile statistics are not available for metrics when any + // of the metric values are negative numbers. ExtendedStatistics []*string `min:"1" type:"list"` // The name of the metric, with or without spaces. @@ -3067,6 +3203,115 @@ func (s *GetMetricStatisticsOutput) SetLabel(v string) *GetMetricStatisticsOutpu return s } +type GetMetricWidgetImageInput struct { + _ struct{} `type:"structure"` + + // A JSON string that defines the bitmap graph to be retrieved. The string includes + // the metrics to include in the graph, statistics, annotations, title, axis + // limits, and so on. You can include only one MetricWidget parameter in each + // GetMetricWidgetImage call. + // + // For more information about the syntax of MetricWidget see CloudWatch-Metric-Widget-Structure. + // + // If any metric on the graph could not load all the requested data points, + // an orange triangle with an exclamation point appears next to the graph legend. + // + // MetricWidget is a required field + MetricWidget *string `type:"string" required:"true"` + + // The format of the resulting image. Only PNG images are supported. + // + // The default is png. If you specify png, the API returns an HTTP response + // with the content-type set to text/xml. The image data is in a MetricWidgetImage + // field. For example: + // + // + // + // + // + // + // + // iVBORw0KGgoAAAANSUhEUgAAAlgAAAGQEAYAAAAip... + // + // + // + // + // + // + // + // 6f0d4192-4d42-11e8-82c1-f539a07e0e3b + // + // + // + // + // + // The image/png setting is intended only for custom HTTP requests. For most + // use cases, and all actions using an AWS SDK, you should use png. If you specify + // image/png, the HTTP response has a content-type set to image/png, and the + // body of the response is a PNG image. + OutputFormat *string `type:"string"` +} + +// String returns the string representation +func (s GetMetricWidgetImageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetMetricWidgetImageInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetMetricWidgetImageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetMetricWidgetImageInput"} + if s.MetricWidget == nil { + invalidParams.Add(request.NewErrParamRequired("MetricWidget")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMetricWidget sets the MetricWidget field's value. +func (s *GetMetricWidgetImageInput) SetMetricWidget(v string) *GetMetricWidgetImageInput { + s.MetricWidget = &v + return s +} + +// SetOutputFormat sets the OutputFormat field's value. +func (s *GetMetricWidgetImageInput) SetOutputFormat(v string) *GetMetricWidgetImageInput { + s.OutputFormat = &v + return s +} + +type GetMetricWidgetImageOutput struct { + _ struct{} `type:"structure"` + + // The image of the graph, in the output format specified. + // + // MetricWidgetImage is automatically base64 encoded/decoded by the SDK. + MetricWidgetImage []byte `type:"blob"` +} + +// String returns the string representation +func (s GetMetricWidgetImageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetMetricWidgetImageOutput) GoString() string { + return s.String() +} + +// SetMetricWidgetImage sets the MetricWidgetImage field's value. +func (s *GetMetricWidgetImageOutput) SetMetricWidgetImage(v []byte) *GetMetricWidgetImageOutput { + s.MetricWidgetImage = v + return s +} + type ListDashboardsInput struct { _ struct{} `type:"structure"` @@ -3283,7 +3528,7 @@ type Metric struct { // The dimensions for the metric. Dimensions []*Dimension `type:"list"` - // The name of the metric. + // The name of the metric. This is a required field. MetricName *string `min:"1" type:"string"` // The namespace of the metric. @@ -3399,6 +3644,8 @@ type MetricAlarm struct { // The name of the metric associated with the alarm. MetricName *string `min:"1" type:"string"` + Metrics []*MetricDataQuery `type:"list"` + // The namespace of the metric associated with the alarm. Namespace *string `min:"1" type:"string"` @@ -3530,6 +3777,12 @@ func (s *MetricAlarm) SetMetricName(v string) *MetricAlarm { return s } +// SetMetrics sets the Metrics field's value. +func (s *MetricAlarm) SetMetrics(v []*MetricDataQuery) *MetricAlarm { + s.Metrics = v + return s +} + // SetNamespace sets the Namespace field's value. func (s *MetricAlarm) SetNamespace(v string) *MetricAlarm { s.Namespace = &v @@ -3596,23 +3849,43 @@ func (s *MetricAlarm) SetUnit(v string) *MetricAlarm { return s } -// This structure indicates the metric data to return, and whether this call -// is just retrieving a batch set of data for one metric, or is performing a -// math expression on metric data. A single GetMetricData call can include up -// to 100 MetricDataQuery structures. +// This structure is used in both GetMetricData and PutMetricAlarm. The supported +// use of this structure is different for those two operations. +// +// When used in GetMetricData, it indicates the metric data to return, and whether +// this call is just retrieving a batch set of data for one metric, or is performing +// a math expression on metric data. A single GetMetricData call can include +// up to 100 MetricDataQuery structures. +// +// When used in PutMetricAlarm, it enables you to create an alarm based on a +// metric math expression. Each MetricDataQuery in the array specifies either +// a metric to retrieve, or a math expression to be performed on retrieved metrics. +// A single PutMetricAlarm call can include up to 20 MetricDataQuery structures +// in the array. The 20 structures can include as many as 10 structures that +// contain a MetricStat parameter to retrieve a metric, and as many as 10 structures +// that contain the Expression parameter to perform a math expression. Any expression +// used in a PutMetricAlarm operation must return a single time series. For +// more information, see Metric Math Syntax and Functions (http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html#metric-math-syntax) +// in the Amazon CloudWatch User Guide. +// +// Some of the parameters of this structure also have different uses whether +// you are using this structure in a GetMetricData operation or a PutMetricAlarm +// operation. These differences are explained in the following parameter list. type MetricDataQuery struct { _ struct{} `type:"structure"` - // The math expression to be performed on the returned data, if this structure - // is performing a math expression. For more information about metric math expressions, - // see Metric Math Syntax and Functions (http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html#metric-math-syntax) + // The math expression to be performed on the returned data, if this object + // is performing a math expression. This expression can use the Id of the other + // metrics to refer to those metrics, and can also use the Id of other expressions + // to use the result of those expressions. For more information about metric + // math expressions, see Metric Math Syntax and Functions (http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html#metric-math-syntax) // in the Amazon CloudWatch User Guide. // - // Within one MetricDataQuery structure, you must specify either Expression - // or MetricStat but not both. + // Within each MetricDataQuery object, you must specify either Expression or + // MetricStat but not both. Expression *string `min:"1" type:"string"` - // A short name used to tie this structure to the results in the response. This + // A short name used to tie this object to the results in the response. This // name must be unique within a single call to GetMetricData. If you are performing // math expressions on this set of data, this name represents that data and // can serve as a variable in the mathematical expression. The valid characters @@ -3629,17 +3902,21 @@ type MetricDataQuery struct { Label *string `type:"string"` // The metric to be returned, along with statistics, period, and units. Use - // this parameter only if this structure is performing a data retrieval and - // not performing a math expression on the returned data. + // this parameter only if this object is retrieving a metric and not performing + // a math expression on returned data. // - // Within one MetricDataQuery structure, you must specify either Expression - // or MetricStat but not both. + // Within one MetricDataQuery object, you must specify either Expression or + // MetricStat but not both. MetricStat *MetricStat `type:"structure"` - // Indicates whether to return the time stamps and raw data values of this metric. - // If you are performing this call just to do math expressions and do not also - // need the raw data returned, you can specify False. If you omit this, the - // default of True is used. + // When used in GetMetricData, this option indicates whether to return the timestamps + // and raw data values of this metric. If you are performing this call just + // to do math expressions and do not also need the raw data returned, you can + // specify False. If you omit this, the default of True is used. + // + // When used in PutMetricAlarm, specify True for the one expression result to + // use as the alarm. For all other metrics and expressions in the same PutMetricAlarm + // operation, specify ReturnData as False. ReturnData *bool `type:"boolean"` } @@ -3709,7 +3986,7 @@ func (s *MetricDataQuery) SetReturnData(v bool) *MetricDataQuery { // A GetMetricData call returns an array of MetricDataResult structures. Each // of these structures includes the data points for that metric, along with -// the time stamps of those data points and other identifying information. +// the timestamps of those data points and other identifying information. type MetricDataResult struct { _ struct{} `type:"structure"` @@ -3730,13 +4007,13 @@ type MetricDataResult struct { // that an error occurred. Retry your request using NextToken, if present. StatusCode *string `type:"string" enum:"StatusCode"` - // The time stamps for the data points, formatted in Unix timestamp format. - // The number of time stamps always matches the number of values and the value - // for Timestamps[x] is Values[x]. + // The timestamps for the data points, formatted in Unix timestamp format. The + // number of timestamps always matches the number of values and the value for + // Timestamps[x] is Values[x]. Timestamps []*time.Time `type:"list"` // The data points for the metric corresponding to Timestamps. The number of - // values always matches the number of time stamps and the time stamp for Values[x] + // values always matches the number of timestamps and the timestamp for Values[x] // is Timestamps[x]. Values []*float64 `type:"list"` } @@ -3792,6 +4069,15 @@ func (s *MetricDataResult) SetValues(v []*float64) *MetricDataResult { type MetricDatum struct { _ struct{} `type:"structure"` + // Array of numbers that is used along with the Values array. Each number in + // the Count array is the number of times the corresponding value in the Values + // array occurred during the period. + // + // If you omit the Counts array, the default of 1 is used as the value for each + // count. If you include a Counts array, it must include the same amount of + // values as the Values array. + Counts []*float64 `type:"list"` + // The dimensions associated with the metric. Dimensions []*Dimension `type:"list"` @@ -3829,6 +4115,19 @@ type MetricDatum struct { // In addition, special values (for example, NaN, +Infinity, -Infinity) are // not supported. Value *float64 `type:"double"` + + // Array of numbers representing the values for the metric during the period. + // Each unique value is listed just once in this array, and the corresponding + // number in the Counts array specifies the number of times that value occurred + // during the period. You can include up to 150 unique values in each PutMetricData + // action that specifies a Values array. + // + // Although the Values array accepts numbers of type Double, CloudWatch rejects + // values that are either too small or too large. Values must be in the range + // of 8.515920e-109 to 1.174271e+108 (Base 10) or 2e-360 to 2e360 (Base 2). + // In addition, special values (for example, NaN, +Infinity, -Infinity) are + // not supported. + Values []*float64 `type:"list"` } // String returns the string representation @@ -3875,6 +4174,12 @@ func (s *MetricDatum) Validate() error { return nil } +// SetCounts sets the Counts field's value. +func (s *MetricDatum) SetCounts(v []*float64) *MetricDatum { + s.Counts = v + return s +} + // SetDimensions sets the Dimensions field's value. func (s *MetricDatum) SetDimensions(v []*Dimension) *MetricDatum { s.Dimensions = v @@ -3917,6 +4222,12 @@ func (s *MetricDatum) SetValue(v float64) *MetricDatum { return s } +// SetValues sets the Values field's value. +func (s *MetricDatum) SetValues(v []*float64) *MetricDatum { + s.Values = v + return s +} + // This structure defines the metric to be returned, along with the statistics, // period, and units. type MetricStat struct { @@ -3927,7 +4238,7 @@ type MetricStat struct { // Metric is a required field Metric *Metric `type:"structure" required:"true"` - // The period to use when retrieving the metric. + // The period, in seconds, to use when retrieving the metric. // // Period is a required field Period *int64 `min:"1" type:"integer" required:"true"` @@ -4097,7 +4408,7 @@ type PutMetricAlarmInput struct { _ struct{} `type:"structure"` // Indicates whether actions should be executed during any changes to the alarm - // state. + // state. The default is TRUE. ActionsEnabled *bool `type:"boolean"` // The actions to execute when this alarm transitions to the ALARM state from @@ -4105,17 +4416,17 @@ type PutMetricAlarmInput struct { // // Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate // | arn:aws:automate:region:ec2:recover | arn:aws:sns:region:account-id:sns-topic-name - // | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name + // | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-idautoScalingGroupName/group-friendly-name:policyName/policy-friendly-name // - // Valid Values (for use with IAM roles): arn:aws:swf:region:{account-id}:action/actions/AWS_EC2.InstanceId.Stop/1.0 - // | arn:aws:swf:region:{account-id}:action/actions/AWS_EC2.InstanceId.Terminate/1.0 - // | arn:aws:swf:region:{account-id}:action/actions/AWS_EC2.InstanceId.Reboot/1.0 + // Valid Values (for use with IAM roles): arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 + // | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 + // | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0 AlarmActions []*string `type:"list"` // The description for the alarm. AlarmDescription *string `type:"string"` - // The name for the alarm. This name must be unique within the AWS account. + // The name for the alarm. This name must be unique within your AWS account. // // AlarmName is a required field AlarmName *string `min:"1" type:"string" required:"true"` @@ -4132,7 +4443,7 @@ type PutMetricAlarmInput struct { // in the Amazon CloudWatch User Guide. DatapointsToAlarm *int64 `min:"1" type:"integer"` - // The dimensions for the metric associated with the alarm. + // The dimensions for the metric specified in MetricName. Dimensions []*Dimension `type:"list"` // Used only for alarms based on percentiles. If you specify ignore, the alarm @@ -4146,7 +4457,7 @@ type PutMetricAlarmInput struct { EvaluateLowSampleCountPercentile *string `min:"1" type:"string"` // The number of periods over which data is compared to the specified threshold. - // If you are setting an alarm which requires that a number of consecutive data + // If you are setting an alarm that requires that a number of consecutive data // points be breaching to trigger the alarm, this value specifies that number. // If you are setting an "M out of N" alarm, this value is the N. // @@ -4156,9 +4467,10 @@ type PutMetricAlarmInput struct { // EvaluationPeriods is a required field EvaluationPeriods *int64 `min:"1" type:"integer" required:"true"` - // The percentile statistic for the metric associated with the alarm. Specify - // a value between p0.0 and p100. When you call PutMetricAlarm, you must specify - // either Statistic or ExtendedStatistic, but not both. + // The percentile statistic for the metric specified in MetricName. Specify + // a value between p0.0 and p100. When you call PutMetricAlarm and specify a + // MetricName, you must specify either Statistic or ExtendedStatistic, but not + // both. ExtendedStatistic *string `type:"string"` // The actions to execute when this alarm transitions to the INSUFFICIENT_DATA @@ -4167,37 +4479,48 @@ type PutMetricAlarmInput struct { // // Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate // | arn:aws:automate:region:ec2:recover | arn:aws:sns:region:account-id:sns-topic-name - // | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name + // | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-idautoScalingGroupName/group-friendly-name:policyName/policy-friendly-name // - // Valid Values (for use with IAM roles): arn:aws:swf:region:{account-id}:action/actions/AWS_EC2.InstanceId.Stop/1.0 - // | arn:aws:swf:region:{account-id}:action/actions/AWS_EC2.InstanceId.Terminate/1.0 - // | arn:aws:swf:region:{account-id}:action/actions/AWS_EC2.InstanceId.Reboot/1.0 + // Valid Values (for use with IAM roles): >arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 + // | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 + // | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0 InsufficientDataActions []*string `type:"list"` // The name for the metric associated with the alarm. // - // MetricName is a required field - MetricName *string `min:"1" type:"string" required:"true"` + // If you are creating an alarm based on a math expression, you cannot specify + // this parameter, or any of the Dimensions, Period, Namespace, Statistic, or + // ExtendedStatistic parameters. Instead, you specify all this information in + // the Metrics array. + MetricName *string `min:"1" type:"string"` - // The namespace for the metric associated with the alarm. + // An array of MetricDataQuery structures that enable you to create an alarm + // based on the result of a metric math expression. Each item in the Metrics + // array either retrieves a metric or performs a math expression. // - // Namespace is a required field - Namespace *string `min:"1" type:"string" required:"true"` + // If you use the Metrics parameter, you cannot include the MetricName, Dimensions, + // Period, Namespace, Statistic, or ExtendedStatistic parameters of PutMetricAlarm + // in the same operation. Instead, you retrieve the metrics you are using in + // your math expression as part of the Metrics array. + Metrics []*MetricDataQuery `type:"list"` + + // The namespace for the metric associated specified in MetricName. + Namespace *string `min:"1" type:"string"` // The actions to execute when this alarm transitions to an OK state from any // other state. Each action is specified as an Amazon Resource Name (ARN). // // Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate - // | arn:aws:automate:region:ec2:recover | arn:aws:sns:region:account-id:sns-topic-name - // | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name + // | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot + // | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-idautoScalingGroupName/group-friendly-name:policyName/policy-friendly-name // - // Valid Values (for use with IAM roles): arn:aws:swf:region:{account-id}:action/actions/AWS_EC2.InstanceId.Stop/1.0 - // | arn:aws:swf:region:{account-id}:action/actions/AWS_EC2.InstanceId.Terminate/1.0 - // | arn:aws:swf:region:{account-id}:action/actions/AWS_EC2.InstanceId.Reboot/1.0 + // Valid Values (for use with IAM roles): arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 + // | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 + // | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0 OKActions []*string `type:"list"` - // The period, in seconds, over which the specified statistic is applied. Valid - // values are 10, 30, and any multiple of 60. + // The length, in seconds, used each time the metric specified in MetricName + // is evaluated. Valid values are 10, 30, and any multiple of 60. // // Be sure to specify 10 or 30 only for metrics that are stored by a PutMetricData // call with a StorageResolution of 1. If you specify a period of 10 or 30 for @@ -4211,13 +4534,12 @@ type PutMetricAlarmInput struct { // // An alarm's total current evaluation period can be no longer than one day, // so Period multiplied by EvaluationPeriods cannot be more than 86,400 seconds. - // - // Period is a required field - Period *int64 `min:"1" type:"integer" required:"true"` + Period *int64 `min:"1" type:"integer"` - // The statistic for the metric associated with the alarm, other than percentile. - // For percentile statistics, use ExtendedStatistic. When you call PutMetricAlarm, - // you must specify either Statistic or ExtendedStatistic, but not both. + // The statistic for the metric specified in MetricName, other than percentile. + // For percentile statistics, use ExtendedStatistic. When you call PutMetricAlarm + // and specify a MetricName, you must specify either Statistic or ExtendedStatistic, + // but not both. Statistic *string `type:"string" enum:"Statistic"` // The value against which the specified statistic is compared. @@ -4278,21 +4600,12 @@ func (s *PutMetricAlarmInput) Validate() error { if s.EvaluationPeriods != nil && *s.EvaluationPeriods < 1 { invalidParams.Add(request.NewErrParamMinValue("EvaluationPeriods", 1)) } - if s.MetricName == nil { - invalidParams.Add(request.NewErrParamRequired("MetricName")) - } if s.MetricName != nil && len(*s.MetricName) < 1 { invalidParams.Add(request.NewErrParamMinLen("MetricName", 1)) } - if s.Namespace == nil { - invalidParams.Add(request.NewErrParamRequired("Namespace")) - } if s.Namespace != nil && len(*s.Namespace) < 1 { invalidParams.Add(request.NewErrParamMinLen("Namespace", 1)) } - if s.Period == nil { - invalidParams.Add(request.NewErrParamRequired("Period")) - } if s.Period != nil && *s.Period < 1 { invalidParams.Add(request.NewErrParamMinValue("Period", 1)) } @@ -4312,6 +4625,16 @@ func (s *PutMetricAlarmInput) Validate() error { } } } + if s.Metrics != nil { + for i, v := range s.Metrics { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Metrics", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -4391,6 +4714,12 @@ func (s *PutMetricAlarmInput) SetMetricName(v string) *PutMetricAlarmInput { return s } +// SetMetrics sets the Metrics field's value. +func (s *PutMetricAlarmInput) SetMetrics(v []*MetricDataQuery) *PutMetricAlarmInput { + s.Metrics = v + return s +} + // SetNamespace sets the Namespace field's value. func (s *PutMetricAlarmInput) SetNamespace(v string) *PutMetricAlarmInput { s.Namespace = &v @@ -4450,7 +4779,8 @@ func (s PutMetricAlarmOutput) GoString() string { type PutMetricDataInput struct { _ struct{} `type:"structure"` - // The data for the metric. + // The data for the metric. The array can include no more than 20 metrics per + // call. // // MetricData is a required field MetricData []*MetricDatum `type:"list" required:"true"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go index 18bea0fa1f..69c41c660c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/api.go @@ -18,7 +18,7 @@ const opDeleteRule = "DeleteRule" // DeleteRuleRequest generates a "aws/request.Request" representing the // client's request for the DeleteRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -52,8 +52,7 @@ func (c *CloudWatchEvents) DeleteRuleRequest(input *DeleteRuleInput) (req *reque output = &DeleteRuleOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -66,6 +65,12 @@ func (c *CloudWatchEvents) DeleteRuleRequest(input *DeleteRuleInput) (req *reque // When you delete a rule, incoming events might continue to match to the deleted // rule. Allow a short period of time for changes to take effect. // +// Managed rules are rules created and managed by another AWS service on your +// behalf. These rules are created by those other AWS services to support functionality +// in those services. You can delete these rules using the Force option, but +// you should do so only if you are sure the other service is not still using +// that rule. +// // 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. @@ -77,6 +82,13 @@ func (c *CloudWatchEvents) DeleteRuleRequest(input *DeleteRuleInput) (req *reque // * ErrCodeConcurrentModificationException "ConcurrentModificationException" // There is concurrent modification on a rule or target. // +// * ErrCodeManagedRuleException "ManagedRuleException" +// This rule was created by an AWS service on behalf of your account. It is +// managed by that service. If you see this error in response to DeleteRule +// or RemoveTargets, you can use the Force parameter in those calls to delete +// the rule or remove targets from the rule. You cannot modify these managed +// rules by using DisableRule, EnableRule, PutTargets, or PutRule. +// // * ErrCodeInternalException "InternalException" // This exception occurs due to unexpected causes. // @@ -107,7 +119,7 @@ const opDescribeEventBus = "DescribeEventBus" // DescribeEventBusRequest generates a "aws/request.Request" representing the // client's request for the DescribeEventBus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -191,7 +203,7 @@ const opDescribeRule = "DescribeRule" // DescribeRuleRequest generates a "aws/request.Request" representing the // client's request for the DescribeRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -276,7 +288,7 @@ const opDisableRule = "DisableRule" // DisableRuleRequest generates a "aws/request.Request" representing the // client's request for the DisableRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -310,8 +322,7 @@ func (c *CloudWatchEvents) DisableRuleRequest(input *DisableRuleInput) (req *req output = &DisableRuleOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -337,6 +348,13 @@ func (c *CloudWatchEvents) DisableRuleRequest(input *DisableRuleInput) (req *req // * ErrCodeConcurrentModificationException "ConcurrentModificationException" // There is concurrent modification on a rule or target. // +// * ErrCodeManagedRuleException "ManagedRuleException" +// This rule was created by an AWS service on behalf of your account. It is +// managed by that service. If you see this error in response to DeleteRule +// or RemoveTargets, you can use the Force parameter in those calls to delete +// the rule or remove targets from the rule. You cannot modify these managed +// rules by using DisableRule, EnableRule, PutTargets, or PutRule. +// // * ErrCodeInternalException "InternalException" // This exception occurs due to unexpected causes. // @@ -367,7 +385,7 @@ const opEnableRule = "EnableRule" // EnableRuleRequest generates a "aws/request.Request" representing the // client's request for the EnableRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -401,8 +419,7 @@ func (c *CloudWatchEvents) EnableRuleRequest(input *EnableRuleInput) (req *reque output = &EnableRuleOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -428,6 +445,13 @@ func (c *CloudWatchEvents) EnableRuleRequest(input *EnableRuleInput) (req *reque // * ErrCodeConcurrentModificationException "ConcurrentModificationException" // There is concurrent modification on a rule or target. // +// * ErrCodeManagedRuleException "ManagedRuleException" +// This rule was created by an AWS service on behalf of your account. It is +// managed by that service. If you see this error in response to DeleteRule +// or RemoveTargets, you can use the Force parameter in those calls to delete +// the rule or remove targets from the rule. You cannot modify these managed +// rules by using DisableRule, EnableRule, PutTargets, or PutRule. +// // * ErrCodeInternalException "InternalException" // This exception occurs due to unexpected causes. // @@ -458,7 +482,7 @@ const opListRuleNamesByTarget = "ListRuleNamesByTarget" // ListRuleNamesByTargetRequest generates a "aws/request.Request" representing the // client's request for the ListRuleNamesByTarget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -538,7 +562,7 @@ const opListRules = "ListRules" // ListRulesRequest generates a "aws/request.Request" representing the // client's request for the ListRules operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -621,7 +645,7 @@ const opListTargetsByRule = "ListTargetsByRule" // ListTargetsByRuleRequest generates a "aws/request.Request" representing the // client's request for the ListTargetsByRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -703,7 +727,7 @@ const opPutEvents = "PutEvents" // PutEventsRequest generates a "aws/request.Request" representing the // client's request for the PutEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -783,7 +807,7 @@ const opPutPermission = "PutPermission" // PutPermissionRequest generates a "aws/request.Request" representing the // client's request for the PutPermission operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -817,23 +841,32 @@ func (c *CloudWatchEvents) PutPermissionRequest(input *PutPermissionInput) (req output = &PutPermissionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // PutPermission API operation for Amazon CloudWatch Events. // -// Running PutPermission permits the specified AWS account to put events to -// your account's default event bus. CloudWatch Events rules in your account -// are triggered by these events arriving to your default event bus. +// Running PutPermission permits the specified AWS account or AWS organization +// to put events to your account's default event bus. CloudWatch Events rules +// in your account are triggered by these events arriving to your default event +// bus. // // For another account to send events to your account, that external account // must have a CloudWatch Events rule with your account's default event bus // as a target. // // To enable multiple AWS accounts to put events to your default event bus, -// run PutPermission once for each of these accounts. +// run PutPermission once for each of these accounts. Or, if all the accounts +// are members of the same AWS organization, you can run PutPermission once +// specifying Principal as "*" and specifying the AWS organization ID in Condition, +// to grant permissions to all accounts in that organization. +// +// If you grant permissions using an organization, then accounts in that organization +// must specify a RoleArn with proper permissions when they use PutTarget to +// add your account's event bus as a target. For more information, see Sending +// and Receiving Events Between AWS Accounts (http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEvents-CrossAccountEventDelivery.html) +// in the Amazon CloudWatch Events User Guide. // // The permission policy on the default event bus cannot exceed 10 KB in size. // @@ -884,7 +917,7 @@ const opPutRule = "PutRule" // PutRuleRequest generates a "aws/request.Request" representing the // client's request for the PutRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -946,6 +979,20 @@ func (c *CloudWatchEvents) PutRuleRequest(input *PutRuleInput) (req *request.Req // and rules. Be sure to use the correct ARN characters when creating event // patterns so that they match the ARN syntax in the event you want to match. // +// In CloudWatch Events, it is possible to create rules that lead to infinite +// loops, where a rule is fired repeatedly. For example, a rule might detect +// that ACLs have changed on an S3 bucket, and trigger software to change them +// to the desired state. If the rule is not written carefully, the subsequent +// change to the ACLs fires the rule again, creating an infinite loop. +// +// To prevent this, write the rules so that the triggered actions do not re-fire +// the same rule. For example, your rule could fire only if ACLs are found to +// be in a bad state, instead of after any change. +// +// An infinite loop can quickly cause higher than expected charges. We recommend +// that you use budgeting, which alerts you when charges exceed your specified +// limit. For more information, see Managing Your Costs with Budgets (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/budgets-managing-costs.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. @@ -963,6 +1010,13 @@ func (c *CloudWatchEvents) PutRuleRequest(input *PutRuleInput) (req *request.Req // * ErrCodeConcurrentModificationException "ConcurrentModificationException" // There is concurrent modification on a rule or target. // +// * ErrCodeManagedRuleException "ManagedRuleException" +// This rule was created by an AWS service on behalf of your account. It is +// managed by that service. If you see this error in response to DeleteRule +// or RemoveTargets, you can use the Force parameter in those calls to delete +// the rule or remove targets from the rule. You cannot modify these managed +// rules by using DisableRule, EnableRule, PutTargets, or PutRule. +// // * ErrCodeInternalException "InternalException" // This exception occurs due to unexpected causes. // @@ -993,7 +1047,7 @@ const opPutTargets = "PutTargets" // PutTargetsRequest generates a "aws/request.Request" representing the // client's request for the PutTargets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1096,6 +1150,13 @@ func (c *CloudWatchEvents) PutTargetsRequest(input *PutTargetsInput) (req *reque // is charged as a custom event. The account receiving the event is not charged. // For more information, see Amazon CloudWatch Pricing (https://aws.amazon.com/cloudwatch/pricing/). // +// If you are setting the event bus of another account as the target, and that +// account granted permission to your account through an organization instead +// of directly by the account ID, then you must specify a RoleArn with proper +// permissions in the Target structure. For more information, see Sending and +// Receiving Events Between AWS Accounts (http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEvents-CrossAccountEventDelivery.html) +// in the Amazon CloudWatch Events User Guide. +// // For more information about enabling cross-account events, see PutPermission. // // Input, InputPath, and InputTransformer are mutually exclusive and optional @@ -1146,6 +1207,13 @@ func (c *CloudWatchEvents) PutTargetsRequest(input *PutTargetsInput) (req *reque // * ErrCodeLimitExceededException "LimitExceededException" // You tried to create more rules or add more targets to a rule than is allowed. // +// * ErrCodeManagedRuleException "ManagedRuleException" +// This rule was created by an AWS service on behalf of your account. It is +// managed by that service. If you see this error in response to DeleteRule +// or RemoveTargets, you can use the Force parameter in those calls to delete +// the rule or remove targets from the rule. You cannot modify these managed +// rules by using DisableRule, EnableRule, PutTargets, or PutRule. +// // * ErrCodeInternalException "InternalException" // This exception occurs due to unexpected causes. // @@ -1176,7 +1244,7 @@ const opRemovePermission = "RemovePermission" // RemovePermissionRequest generates a "aws/request.Request" representing the // client's request for the RemovePermission operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1210,8 +1278,7 @@ func (c *CloudWatchEvents) RemovePermissionRequest(input *RemovePermissionInput) output = &RemovePermissionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1266,7 +1333,7 @@ const opRemoveTargets = "RemoveTargets" // RemoveTargetsRequest generates a "aws/request.Request" representing the // client's request for the RemoveTargets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1331,6 +1398,13 @@ func (c *CloudWatchEvents) RemoveTargetsRequest(input *RemoveTargetsInput) (req // * ErrCodeConcurrentModificationException "ConcurrentModificationException" // There is concurrent modification on a rule or target. // +// * ErrCodeManagedRuleException "ManagedRuleException" +// This rule was created by an AWS service on behalf of your account. It is +// managed by that service. If you see this error in response to DeleteRule +// or RemoveTargets, you can use the Force parameter in those calls to delete +// the rule or remove targets from the rule. You cannot modify these managed +// rules by using DisableRule, EnableRule, PutTargets, or PutRule. +// // * ErrCodeInternalException "InternalException" // This exception occurs due to unexpected causes. // @@ -1361,7 +1435,7 @@ const opTestEventPattern = "TestEventPattern" // TestEventPatternRequest generates a "aws/request.Request" representing the // client's request for the TestEventPattern operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1642,9 +1716,90 @@ func (s *BatchRetryStrategy) SetAttempts(v int64) *BatchRetryStrategy { return s } +// A JSON string which you can use to limit the event bus permissions you are +// granting to only accounts that fulfill the condition. Currently, the only +// supported condition is membership in a certain AWS organization. The string +// must contain Type, Key, and Value fields. The Value field specifies the ID +// of the AWS organization. Following is an example value for Condition: +// +// '{"Type" : "StringEquals", "Key": "aws:PrincipalOrgID", "Value": "o-1234567890"}' +type Condition struct { + _ struct{} `type:"structure"` + + // Specifies the key for the condition. Currently the only supported key is + // aws:PrincipalOrgID. + // + // Key is a required field + Key *string `type:"string" required:"true"` + + // Specifies the type of condition. Currently the only supported value is StringEquals. + // + // Type is a required field + Type *string `type:"string" required:"true"` + + // Specifies the value for the key. Currently, this must be the ID of the organization. + // + // Value is a required field + Value *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s Condition) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Condition) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Condition) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Condition"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *Condition) SetKey(v string) *Condition { + s.Key = &v + return s +} + +// SetType sets the Type field's value. +func (s *Condition) SetType(v string) *Condition { + s.Type = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Condition) SetValue(v string) *Condition { + s.Value = &v + return s +} + type DeleteRuleInput struct { _ struct{} `type:"structure"` + // If this is a managed rule, created by an AWS service on your behalf, you + // must specify Force as True to delete the rule. This parameter is ignored + // for rules that are not managed rules. You can check whether a rule is a managed + // rule by using DescribeRule or ListRules and checking the ManagedBy field + // of the response. + Force *bool `type:"boolean"` + // The name of the rule. // // Name is a required field @@ -1677,6 +1832,12 @@ func (s *DeleteRuleInput) Validate() error { return nil } +// SetForce sets the Force field's value. +func (s *DeleteRuleInput) SetForce(v bool) *DeleteRuleInput { + s.Force = &v + return s +} + // SetName sets the Name field's value. func (s *DeleteRuleInput) SetName(v string) *DeleteRuleInput { s.Name = &v @@ -1807,6 +1968,10 @@ type DescribeRuleOutput struct { // in the Amazon CloudWatch Events User Guide. EventPattern *string `type:"string"` + // If this is a managed rule, created by an AWS service on your behalf, this + // field displays the principal name of the AWS service that created the rule. + ManagedBy *string `min:"1" type:"string"` + // The name of the rule. Name *string `min:"1" type:"string"` @@ -1848,6 +2013,12 @@ func (s *DescribeRuleOutput) SetEventPattern(v string) *DescribeRuleOutput { return s } +// SetManagedBy sets the ManagedBy field's value. +func (s *DescribeRuleOutput) SetManagedBy(v string) *DescribeRuleOutput { + s.ManagedBy = &v + return s +} + // SetName sets the Name field's value. func (s *DescribeRuleOutput) SetName(v string) *DescribeRuleOutput { s.Name = &v @@ -2754,15 +2925,28 @@ type PutPermissionInput struct { // Action is a required field Action *string `min:"1" type:"string" required:"true"` + // This parameter enables you to limit the permission to accounts that fulfill + // a certain condition, such as being a member of a certain AWS organization. + // For more information about AWS Organizations, see What Is AWS Organizations + // (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_introduction.html) + // in the AWS Organizations User Guide. + // + // If you specify Condition with an AWS organization ID, and specify "*" as + // the value for Principal, you grant permission to all the accounts in the + // named organization. + // + // The Condition is a JSON string which must contain Type, Key, and Value fields. + Condition *Condition `type:"structure"` + // The 12-digit AWS account ID that you are permitting to put events to your // default event bus. Specify "*" to permit any account to put events to your // default event bus. // - // If you specify "*", avoid creating rules that may match undesirable events. - // To create more secure rules, make sure that the event pattern for each rule - // contains an account field with a specific account ID from which to receive - // events. Rules with an account field do not match any events sent from other - // accounts. + // If you specify "*" without specifying Condition, avoid creating rules that + // may match undesirable events. To create more secure rules, make sure that + // the event pattern for each rule contains an account field with a specific + // account ID from which to receive events. Rules with an account field do not + // match any events sent from other accounts. // // Principal is a required field Principal *string `min:"1" type:"string" required:"true"` @@ -2806,6 +2990,11 @@ func (s *PutPermissionInput) Validate() error { if s.StatementId != nil && len(*s.StatementId) < 1 { invalidParams.Add(request.NewErrParamMinLen("StatementId", 1)) } + if s.Condition != nil { + if err := s.Condition.Validate(); err != nil { + invalidParams.AddNested("Condition", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -2819,6 +3008,12 @@ func (s *PutPermissionInput) SetAction(v string) *PutPermissionInput { return s } +// SetCondition sets the Condition field's value. +func (s *PutPermissionInput) SetCondition(v *Condition) *PutPermissionInput { + s.Condition = v + return s +} + // SetPrincipal sets the Principal field's value. func (s *PutPermissionInput) SetPrincipal(v string) *PutPermissionInput { s.Principal = &v @@ -3161,6 +3356,13 @@ func (s RemovePermissionOutput) GoString() string { type RemoveTargetsInput struct { _ struct{} `type:"structure"` + // If this is a managed rule, created by an AWS service on your behalf, you + // must specify Force as True to remove targets. This parameter is ignored for + // rules that are not managed rules. You can check whether a rule is a managed + // rule by using DescribeRule or ListRules and checking the ManagedBy field + // of the response. + Force *bool `type:"boolean"` + // The IDs of the targets to remove from the rule. // // Ids is a required field @@ -3204,6 +3406,12 @@ func (s *RemoveTargetsInput) Validate() error { return nil } +// SetForce sets the Force field's value. +func (s *RemoveTargetsInput) SetForce(v bool) *RemoveTargetsInput { + s.Force = &v + return s +} + // SetIds sets the Ids field's value. func (s *RemoveTargetsInput) SetIds(v []*string) *RemoveTargetsInput { s.Ids = v @@ -3307,6 +3515,10 @@ type Rule struct { // in the Amazon CloudWatch Events User Guide. EventPattern *string `type:"string"` + // If the rule was created on behalf of your account by an AWS service, this + // field displays the principal name of the service that created the rule. + ManagedBy *string `min:"1" type:"string"` + // The name of the rule. Name *string `min:"1" type:"string"` @@ -3348,6 +3560,12 @@ func (s *Rule) SetEventPattern(v string) *Rule { return s } +// SetManagedBy sets the ManagedBy field's value. +func (s *Rule) SetManagedBy(v string) *Rule { + s.ManagedBy = &v + return s +} + // SetName sets the Name field's value. func (s *Rule) SetName(v string) *Rule { s.Name = &v @@ -3515,6 +3733,13 @@ func (s *SqsParameters) SetMessageGroupId(v string) *SqsParameters { // Targets are the resources to be invoked when a rule is triggered. For a complete // list of services and resources that can be set as a target, see PutTargets. +// +// If you are setting the event bus of another account as the target, and that +// account granted permission to your account through an organization instead +// of directly by the account ID, then you must specify a RoleArn with proper +// permissions in the Target structure. For more information, see Sending and +// Receiving Events Between AWS Accounts (http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEvents-CrossAccountEventDelivery.html) +// in the Amazon CloudWatch Events User Guide. type Target struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/doc.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/doc.go index 16976e0d1f..553efdee2b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/doc.go @@ -7,7 +7,7 @@ // resources. When your resources change state, they automatically send events // into an event stream. You can create rules that match selected events in // the stream and route them to targets to take action. You can also use rules -// to take action on a pre-determined schedule. For example, you can configure +// to take action on a predetermined schedule. For example, you can configure // rules to: // // * Automatically invoke an AWS Lambda function to update DNS entries when diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/errors.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/errors.go index 50712e294d..30b9de6d95 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchevents/errors.go @@ -28,6 +28,16 @@ const ( // You tried to create more rules or add more targets to a rule than is allowed. ErrCodeLimitExceededException = "LimitExceededException" + // ErrCodeManagedRuleException for service response error code + // "ManagedRuleException". + // + // This rule was created by an AWS service on behalf of your account. It is + // managed by that service. If you see this error in response to DeleteRule + // or RemoveTargets, you can use the Force parameter in those calls to delete + // the rule or remove targets from the rule. You cannot modify these managed + // rules by using DisableRule, EnableRule, PutTargets, or PutRule. + ErrCodeManagedRuleException = "ManagedRuleException" + // ErrCodePolicyLengthExceededException for service response error code // "PolicyLengthExceededException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go index d93b9c4188..49c997cb7e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/api.go @@ -17,7 +17,7 @@ const opAssociateKmsKey = "AssociateKmsKey" // AssociateKmsKeyRequest generates a "aws/request.Request" representing the // client's request for the AssociateKmsKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -51,8 +51,7 @@ func (c *CloudWatchLogs) AssociateKmsKeyRequest(input *AssociateKmsKeyInput) (re output = &AssociateKmsKeyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -120,7 +119,7 @@ const opCancelExportTask = "CancelExportTask" // CancelExportTaskRequest generates a "aws/request.Request" representing the // client's request for the CancelExportTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -154,8 +153,7 @@ func (c *CloudWatchLogs) CancelExportTaskRequest(input *CancelExportTaskInput) ( output = &CancelExportTaskOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -212,7 +210,7 @@ const opCreateExportTask = "CreateExportTask" // CreateExportTaskRequest generates a "aws/request.Request" representing the // client's request for the CreateExportTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -317,7 +315,7 @@ const opCreateLogGroup = "CreateLogGroup" // CreateLogGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateLogGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -351,8 +349,7 @@ func (c *CloudWatchLogs) CreateLogGroupRequest(input *CreateLogGroupInput) (req output = &CreateLogGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -431,7 +428,7 @@ const opCreateLogStream = "CreateLogStream" // CreateLogStreamRequest generates a "aws/request.Request" representing the // client's request for the CreateLogStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -465,8 +462,7 @@ func (c *CloudWatchLogs) CreateLogStreamRequest(input *CreateLogStreamInput) (re output = &CreateLogStreamOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -532,7 +528,7 @@ const opDeleteDestination = "DeleteDestination" // DeleteDestinationRequest generates a "aws/request.Request" representing the // client's request for the DeleteDestination operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -566,8 +562,7 @@ func (c *CloudWatchLogs) DeleteDestinationRequest(input *DeleteDestinationInput) output = &DeleteDestinationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -624,7 +619,7 @@ const opDeleteLogGroup = "DeleteLogGroup" // DeleteLogGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteLogGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -658,8 +653,7 @@ func (c *CloudWatchLogs) DeleteLogGroupRequest(input *DeleteLogGroupInput) (req output = &DeleteLogGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -715,7 +709,7 @@ const opDeleteLogStream = "DeleteLogStream" // DeleteLogStreamRequest generates a "aws/request.Request" representing the // client's request for the DeleteLogStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -749,8 +743,7 @@ func (c *CloudWatchLogs) DeleteLogStreamRequest(input *DeleteLogStreamInput) (re output = &DeleteLogStreamOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -806,7 +799,7 @@ const opDeleteMetricFilter = "DeleteMetricFilter" // DeleteMetricFilterRequest generates a "aws/request.Request" representing the // client's request for the DeleteMetricFilter operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -840,8 +833,7 @@ func (c *CloudWatchLogs) DeleteMetricFilterRequest(input *DeleteMetricFilterInpu output = &DeleteMetricFilterOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -896,7 +888,7 @@ const opDeleteResourcePolicy = "DeleteResourcePolicy" // DeleteResourcePolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteResourcePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -930,8 +922,7 @@ func (c *CloudWatchLogs) DeleteResourcePolicyRequest(input *DeleteResourcePolicy output = &DeleteResourcePolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -984,7 +975,7 @@ const opDeleteRetentionPolicy = "DeleteRetentionPolicy" // DeleteRetentionPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteRetentionPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1018,8 +1009,7 @@ func (c *CloudWatchLogs) DeleteRetentionPolicyRequest(input *DeleteRetentionPoli output = &DeleteRetentionPolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1077,7 +1067,7 @@ const opDeleteSubscriptionFilter = "DeleteSubscriptionFilter" // DeleteSubscriptionFilterRequest generates a "aws/request.Request" representing the // client's request for the DeleteSubscriptionFilter operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1111,8 +1101,7 @@ func (c *CloudWatchLogs) DeleteSubscriptionFilterRequest(input *DeleteSubscripti output = &DeleteSubscriptionFilterOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1167,7 +1156,7 @@ const opDescribeDestinations = "DescribeDestinations" // DescribeDestinationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDestinations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1307,7 +1296,7 @@ const opDescribeExportTasks = "DescribeExportTasks" // DescribeExportTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeExportTasks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1390,7 +1379,7 @@ const opDescribeLogGroups = "DescribeLogGroups" // DescribeLogGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeLogGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1530,7 +1519,7 @@ const opDescribeLogStreams = "DescribeLogStreams" // DescribeLogStreamsRequest generates a "aws/request.Request" representing the // client's request for the DescribeLogStreams operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1677,7 +1666,7 @@ const opDescribeMetricFilters = "DescribeMetricFilters" // DescribeMetricFiltersRequest generates a "aws/request.Request" representing the // client's request for the DescribeMetricFilters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1816,12 +1805,100 @@ func (c *CloudWatchLogs) DescribeMetricFiltersPagesWithContext(ctx aws.Context, return p.Err() } +const opDescribeQueries = "DescribeQueries" + +// DescribeQueriesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeQueries 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 DescribeQueries for more information on using the DescribeQueries +// 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 DescribeQueriesRequest method. +// req, resp := client.DescribeQueriesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueries +func (c *CloudWatchLogs) DescribeQueriesRequest(input *DescribeQueriesInput) (req *request.Request, output *DescribeQueriesOutput) { + op := &request.Operation{ + Name: opDescribeQueries, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeQueriesInput{} + } + + output = &DescribeQueriesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeQueries API operation for Amazon CloudWatch Logs. +// +// Returns a list of CloudWatch Logs Insights queries that are scheduled, executing, +// or have been executed recently in this account. You can request all queries, +// or limit it to queries of a specific log group or queries with a certain +// status. +// +// 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 CloudWatch Logs's +// API operation DescribeQueries for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// A parameter is specified incorrectly. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service cannot complete the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeQueries +func (c *CloudWatchLogs) DescribeQueries(input *DescribeQueriesInput) (*DescribeQueriesOutput, error) { + req, out := c.DescribeQueriesRequest(input) + return out, req.Send() +} + +// DescribeQueriesWithContext is the same as DescribeQueries with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeQueries 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 *CloudWatchLogs) DescribeQueriesWithContext(ctx aws.Context, input *DescribeQueriesInput, opts ...request.Option) (*DescribeQueriesOutput, error) { + req, out := c.DescribeQueriesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeResourcePolicies = "DescribeResourcePolicies" // DescribeResourcePoliciesRequest generates a "aws/request.Request" representing the // client's request for the DescribeResourcePolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1903,7 +1980,7 @@ const opDescribeSubscriptionFilters = "DescribeSubscriptionFilters" // DescribeSubscriptionFiltersRequest generates a "aws/request.Request" representing the // client's request for the DescribeSubscriptionFilters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2047,7 +2124,7 @@ const opDisassociateKmsKey = "DisassociateKmsKey" // DisassociateKmsKeyRequest generates a "aws/request.Request" representing the // client's request for the DisassociateKmsKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2081,8 +2158,7 @@ func (c *CloudWatchLogs) DisassociateKmsKeyRequest(input *DisassociateKmsKeyInpu output = &DisassociateKmsKeyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2145,7 +2221,7 @@ const opFilterLogEvents = "FilterLogEvents" // FilterLogEventsRequest generates a "aws/request.Request" representing the // client's request for the FilterLogEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2295,7 +2371,7 @@ const opGetLogEvents = "GetLogEvents" // GetLogEventsRequest generates a "aws/request.Request" representing the // client's request for the GetLogEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2437,12 +2513,290 @@ func (c *CloudWatchLogs) GetLogEventsPagesWithContext(ctx aws.Context, input *Ge return p.Err() } +const opGetLogGroupFields = "GetLogGroupFields" + +// GetLogGroupFieldsRequest generates a "aws/request.Request" representing the +// client's request for the GetLogGroupFields 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 GetLogGroupFields for more information on using the GetLogGroupFields +// 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 GetLogGroupFieldsRequest method. +// req, resp := client.GetLogGroupFieldsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogGroupFields +func (c *CloudWatchLogs) GetLogGroupFieldsRequest(input *GetLogGroupFieldsInput) (req *request.Request, output *GetLogGroupFieldsOutput) { + op := &request.Operation{ + Name: opGetLogGroupFields, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetLogGroupFieldsInput{} + } + + output = &GetLogGroupFieldsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetLogGroupFields API operation for Amazon CloudWatch Logs. +// +// Returns a list of the fields that are included in log events in the specified +// log group, along with the percentage of log events that contain each field. +// The search is limited to a time period that you specify. +// +// In the results, fields that start with @ are fields generated by CloudWatch +// Logs. For example, @timestamp is the timestamp of each log event. +// +// The response results are sorted by the frequency percentage, starting with +// the highest percentage. +// +// 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 CloudWatch Logs's +// API operation GetLogGroupFields for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// A parameter is specified incorrectly. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// You have reached the maximum number of resources that can be created. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service cannot complete the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogGroupFields +func (c *CloudWatchLogs) GetLogGroupFields(input *GetLogGroupFieldsInput) (*GetLogGroupFieldsOutput, error) { + req, out := c.GetLogGroupFieldsRequest(input) + return out, req.Send() +} + +// GetLogGroupFieldsWithContext is the same as GetLogGroupFields with the addition of +// the ability to pass a context and additional request options. +// +// See GetLogGroupFields 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 *CloudWatchLogs) GetLogGroupFieldsWithContext(ctx aws.Context, input *GetLogGroupFieldsInput, opts ...request.Option) (*GetLogGroupFieldsOutput, error) { + req, out := c.GetLogGroupFieldsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetLogRecord = "GetLogRecord" + +// GetLogRecordRequest generates a "aws/request.Request" representing the +// client's request for the GetLogRecord 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 GetLogRecord for more information on using the GetLogRecord +// 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 GetLogRecordRequest method. +// req, resp := client.GetLogRecordRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogRecord +func (c *CloudWatchLogs) GetLogRecordRequest(input *GetLogRecordInput) (req *request.Request, output *GetLogRecordOutput) { + op := &request.Operation{ + Name: opGetLogRecord, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetLogRecordInput{} + } + + output = &GetLogRecordOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetLogRecord API operation for Amazon CloudWatch Logs. +// +// Retrieves all the fields and values of a single log event. All fields are +// retrieved, even if the original query that produced the logRecordPointer +// retrieved only a subset of fields. Fields are returned as field name/field +// value pairs. +// +// Additionally, the entire unparsed log event is returned within @message. +// +// 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 CloudWatch Logs's +// API operation GetLogRecord for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// A parameter is specified incorrectly. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// You have reached the maximum number of resources that can be created. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service cannot complete the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetLogRecord +func (c *CloudWatchLogs) GetLogRecord(input *GetLogRecordInput) (*GetLogRecordOutput, error) { + req, out := c.GetLogRecordRequest(input) + return out, req.Send() +} + +// GetLogRecordWithContext is the same as GetLogRecord with the addition of +// the ability to pass a context and additional request options. +// +// See GetLogRecord 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 *CloudWatchLogs) GetLogRecordWithContext(ctx aws.Context, input *GetLogRecordInput, opts ...request.Option) (*GetLogRecordOutput, error) { + req, out := c.GetLogRecordRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetQueryResults = "GetQueryResults" + +// GetQueryResultsRequest generates a "aws/request.Request" representing the +// client's request for the GetQueryResults 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 GetQueryResults for more information on using the GetQueryResults +// 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 GetQueryResultsRequest method. +// req, resp := client.GetQueryResultsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetQueryResults +func (c *CloudWatchLogs) GetQueryResultsRequest(input *GetQueryResultsInput) (req *request.Request, output *GetQueryResultsOutput) { + op := &request.Operation{ + Name: opGetQueryResults, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetQueryResultsInput{} + } + + output = &GetQueryResultsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetQueryResults API operation for Amazon CloudWatch Logs. +// +// Returns the results from the specified query. If the query is in progress, +// partial results of that current execution are returned. Only the fields requested +// in the query are returned. +// +// GetQueryResults does not start a query execution. To run a query, use . +// +// 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 CloudWatch Logs's +// API operation GetQueryResults for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// A parameter is specified incorrectly. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service cannot complete the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/GetQueryResults +func (c *CloudWatchLogs) GetQueryResults(input *GetQueryResultsInput) (*GetQueryResultsOutput, error) { + req, out := c.GetQueryResultsRequest(input) + return out, req.Send() +} + +// GetQueryResultsWithContext is the same as GetQueryResults with the addition of +// the ability to pass a context and additional request options. +// +// See GetQueryResults 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 *CloudWatchLogs) GetQueryResultsWithContext(ctx aws.Context, input *GetQueryResultsInput, opts ...request.Option) (*GetQueryResultsOutput, error) { + req, out := c.GetQueryResultsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListTagsLogGroup = "ListTagsLogGroup" // ListTagsLogGroupRequest generates a "aws/request.Request" representing the // client's request for the ListTagsLogGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2524,7 +2878,7 @@ const opPutDestination = "PutDestination" // PutDestinationRequest generates a "aws/request.Request" representing the // client's request for the PutDestination operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2619,7 +2973,7 @@ const opPutDestinationPolicy = "PutDestinationPolicy" // PutDestinationPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutDestinationPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2653,8 +3007,7 @@ func (c *CloudWatchLogs) PutDestinationPolicyRequest(input *PutDestinationPolicy output = &PutDestinationPolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2709,7 +3062,7 @@ const opPutLogEvents = "PutLogEvents" // PutLogEventsRequest generates a "aws/request.Request" representing the // client's request for the PutLogEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2769,7 +3122,7 @@ func (c *CloudWatchLogs) PutLogEventsRequest(input *PutLogEventsInput) (req *req // retention period of the log group. // // * The log events in the batch must be in chronological ordered by their -// time stamp. The time stamp is the time the event occurred, expressed as +// timestamp. The timestamp is the time the event occurred, expressed as // the number of milliseconds after Jan 1, 1970 00:00:00 UTC. (In AWS Tools // for PowerShell and the AWS SDK for .NET, the timestamp is specified in // .NET format: yyyy-mm-ddThh:mm:ss. For example, 2017-09-15T13:45:30.) @@ -2835,7 +3188,7 @@ const opPutMetricFilter = "PutMetricFilter" // PutMetricFilterRequest generates a "aws/request.Request" representing the // client's request for the PutMetricFilter operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2869,8 +3222,7 @@ func (c *CloudWatchLogs) PutMetricFilterRequest(input *PutMetricFilterInput) (re output = &PutMetricFilterOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2933,7 +3285,7 @@ const opPutResourcePolicy = "PutResourcePolicy" // PutResourcePolicyRequest generates a "aws/request.Request" representing the // client's request for the PutResourcePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3020,7 +3372,7 @@ const opPutRetentionPolicy = "PutRetentionPolicy" // PutRetentionPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutRetentionPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3054,8 +3406,7 @@ func (c *CloudWatchLogs) PutRetentionPolicyRequest(input *PutRetentionPolicyInpu output = &PutRetentionPolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3112,7 +3463,7 @@ const opPutSubscriptionFilter = "PutSubscriptionFilter" // PutSubscriptionFilterRequest generates a "aws/request.Request" representing the // client's request for the PutSubscriptionFilter operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3146,8 +3497,7 @@ func (c *CloudWatchLogs) PutSubscriptionFilterRequest(input *PutSubscriptionFilt output = &PutSubscriptionFilterOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3198,23 +3548,208 @@ func (c *CloudWatchLogs) PutSubscriptionFilterRequest(input *PutSubscriptionFilt // * ErrCodeServiceUnavailableException "ServiceUnavailableException" // The service cannot complete the request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutSubscriptionFilter -func (c *CloudWatchLogs) PutSubscriptionFilter(input *PutSubscriptionFilterInput) (*PutSubscriptionFilterOutput, error) { - req, out := c.PutSubscriptionFilterRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/PutSubscriptionFilter +func (c *CloudWatchLogs) PutSubscriptionFilter(input *PutSubscriptionFilterInput) (*PutSubscriptionFilterOutput, error) { + req, out := c.PutSubscriptionFilterRequest(input) + return out, req.Send() +} + +// PutSubscriptionFilterWithContext is the same as PutSubscriptionFilter with the addition of +// the ability to pass a context and additional request options. +// +// See PutSubscriptionFilter 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 *CloudWatchLogs) PutSubscriptionFilterWithContext(ctx aws.Context, input *PutSubscriptionFilterInput, opts ...request.Option) (*PutSubscriptionFilterOutput, error) { + req, out := c.PutSubscriptionFilterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStartQuery = "StartQuery" + +// StartQueryRequest generates a "aws/request.Request" representing the +// client's request for the StartQuery 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 StartQuery for more information on using the StartQuery +// 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 StartQueryRequest method. +// req, resp := client.StartQueryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StartQuery +func (c *CloudWatchLogs) StartQueryRequest(input *StartQueryInput) (req *request.Request, output *StartQueryOutput) { + op := &request.Operation{ + Name: opStartQuery, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartQueryInput{} + } + + output = &StartQueryOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartQuery API operation for Amazon CloudWatch Logs. +// +// Schedules a query of a log group using CloudWatch Logs Insights. You specify +// the log group to query, the query string to use, and the time to query. +// +// For more information, see CloudWatch Logs Insights Query Syntax (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.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. +// +// See the AWS API reference guide for Amazon CloudWatch Logs's +// API operation StartQuery for usage and error information. +// +// Returned Error Codes: +// * ErrCodeMalformedQueryException "MalformedQueryException" +// The query string is not valid. Details about this error are displayed in +// a QueryCompileError object. For more information, see . +// +// For more information about valid query syntax, see CloudWatch Logs Insights +// Query Syntax (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// A parameter is specified incorrectly. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// You have reached the maximum number of resources that can be created. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service cannot complete the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StartQuery +func (c *CloudWatchLogs) StartQuery(input *StartQueryInput) (*StartQueryOutput, error) { + req, out := c.StartQueryRequest(input) + return out, req.Send() +} + +// StartQueryWithContext is the same as StartQuery with the addition of +// the ability to pass a context and additional request options. +// +// See StartQuery 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 *CloudWatchLogs) StartQueryWithContext(ctx aws.Context, input *StartQueryInput, opts ...request.Option) (*StartQueryOutput, error) { + req, out := c.StartQueryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStopQuery = "StopQuery" + +// StopQueryRequest generates a "aws/request.Request" representing the +// client's request for the StopQuery 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 StopQuery for more information on using the StopQuery +// 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 StopQueryRequest method. +// req, resp := client.StopQueryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StopQuery +func (c *CloudWatchLogs) StopQueryRequest(input *StopQueryInput) (req *request.Request, output *StopQueryOutput) { + op := &request.Operation{ + Name: opStopQuery, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StopQueryInput{} + } + + output = &StopQueryOutput{} + req = c.newRequest(op, input, output) + return +} + +// StopQuery API operation for Amazon CloudWatch Logs. +// +// Stops a CloudWatch Logs Insights query that is in progress. If the query +// has already ended, the operation returns an error indicating that the specified +// query is not running. +// +// 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 CloudWatch Logs's +// API operation StopQuery for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// A parameter is specified incorrectly. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service cannot complete the request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/StopQuery +func (c *CloudWatchLogs) StopQuery(input *StopQueryInput) (*StopQueryOutput, error) { + req, out := c.StopQueryRequest(input) return out, req.Send() } -// PutSubscriptionFilterWithContext is the same as PutSubscriptionFilter with the addition of +// StopQueryWithContext is the same as StopQuery with the addition of // the ability to pass a context and additional request options. // -// See PutSubscriptionFilter for details on how to use this API operation. +// See StopQuery 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 *CloudWatchLogs) PutSubscriptionFilterWithContext(ctx aws.Context, input *PutSubscriptionFilterInput, opts ...request.Option) (*PutSubscriptionFilterOutput, error) { - req, out := c.PutSubscriptionFilterRequest(input) +func (c *CloudWatchLogs) StopQueryWithContext(ctx aws.Context, input *StopQueryInput, opts ...request.Option) (*StopQueryOutput, error) { + req, out := c.StopQueryRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() @@ -3225,7 +3760,7 @@ const opTagLogGroup = "TagLogGroup" // TagLogGroupRequest generates a "aws/request.Request" representing the // client's request for the TagLogGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3259,8 +3794,7 @@ func (c *CloudWatchLogs) TagLogGroupRequest(input *TagLogGroupInput) (req *reque output = &TagLogGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3316,7 +3850,7 @@ const opTestMetricFilter = "TestMetricFilter" // TestMetricFilterRequest generates a "aws/request.Request" representing the // client's request for the TestMetricFilter operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3400,7 +3934,7 @@ const opUntagLogGroup = "UntagLogGroup" // UntagLogGroupRequest generates a "aws/request.Request" representing the // client's request for the UntagLogGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3434,8 +3968,7 @@ func (c *CloudWatchLogs) UntagLogGroupRequest(input *UntagLogGroupInput) (req *r output = &UntagLogGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3619,7 +4152,7 @@ type CreateExportTaskInput struct { DestinationPrefix *string `locationName:"destinationPrefix" type:"string"` // The start time of the range for the request, expressed as the number of milliseconds - // after Jan 1, 1970 00:00:00 UTC. Events with a time stamp earlier than this + // after Jan 1, 1970 00:00:00 UTC. Events with a timestamp earlier than this // time are not exported. // // From is a required field @@ -3638,8 +4171,8 @@ type CreateExportTaskInput struct { TaskName *string `locationName:"taskName" min:"1" type:"string"` // The end time of the range for the request, expressed as the number of milliseconds - // after Jan 1, 1970 00:00:00 UTC. Events with a time stamp later than this - // time are not exported. + // after Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time + // are not exported. // // To is a required field To *int64 `locationName:"to" type:"long" required:"true"` @@ -4892,6 +5425,110 @@ func (s *DescribeMetricFiltersOutput) SetNextToken(v string) *DescribeMetricFilt return s } +type DescribeQueriesInput struct { + _ struct{} `type:"structure"` + + // Limits the returned queries to only those for the specified log group. + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` + + // Limits the number of returned queries to the specified number. + MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` + + // The token for the next set of items to return. The token expires after 24 + // hours. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` + + // Limits the returned queries to only those that have the specified status. + // Valid values are Cancelled, Complete, Failed, Running, and Scheduled. + Status *string `locationName:"status" type:"string" enum:"QueryStatus"` +} + +// String returns the string representation +func (s DescribeQueriesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeQueriesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeQueriesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeQueriesInput"} + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLogGroupName sets the LogGroupName field's value. +func (s *DescribeQueriesInput) SetLogGroupName(v string) *DescribeQueriesInput { + s.LogGroupName = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeQueriesInput) SetMaxResults(v int64) *DescribeQueriesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeQueriesInput) SetNextToken(v string) *DescribeQueriesInput { + s.NextToken = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *DescribeQueriesInput) SetStatus(v string) *DescribeQueriesInput { + s.Status = &v + return s +} + +type DescribeQueriesOutput struct { + _ struct{} `type:"structure"` + + // The token for the next set of items to return. The token expires after 24 + // hours. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` + + // The list of queries that match the request. + Queries []*QueryInfo `locationName:"queries" type:"list"` +} + +// String returns the string representation +func (s DescribeQueriesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeQueriesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeQueriesOutput) SetNextToken(v string) *DescribeQueriesOutput { + s.NextToken = &v + return s +} + +// SetQueries sets the Queries field's value. +func (s *DescribeQueriesOutput) SetQueries(v []*QueryInfo) *DescribeQueriesOutput { + s.Queries = v + return s +} + type DescribeResourcePoliciesInput struct { _ struct{} `type:"structure"` @@ -5228,7 +5865,7 @@ type ExportTask struct { ExecutionInfo *ExportTaskExecutionInfo `locationName:"executionInfo" type:"structure"` // The start time, expressed as the number of milliseconds after Jan 1, 1970 - // 00:00:00 UTC. Events with a time stamp before this time are not exported. + // 00:00:00 UTC. Events with a timestamp before this time are not exported. From *int64 `locationName:"from" type:"long"` // The name of the log group from which logs data was exported. @@ -5244,7 +5881,7 @@ type ExportTask struct { TaskName *string `locationName:"taskName" min:"1" type:"string"` // The end time, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 - // UTC. Events with a time stamp later than this time are not exported. + // UTC. Events with a timestamp later than this time are not exported. To *int64 `locationName:"to" type:"long"` } @@ -5384,7 +6021,7 @@ type FilterLogEventsInput struct { _ struct{} `type:"structure"` // The end of the time range, expressed as the number of milliseconds after - // Jan 1, 1970 00:00:00 UTC. Events with a time stamp later than this time are + // Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time are // not returned. EndTime *int64 `locationName:"endTime" type:"long"` @@ -5419,9 +6056,8 @@ type FilterLogEventsInput struct { // Filters the results to only logs from the log streams in this list. // - // If you specify a value for both logStreamNamePrefix and logStreamNames, but - // the value for logStreamNamePrefix does not match any log stream names specified - // in logStreamNames, the action returns an InvalidParameterException error. + // If you specify a value for both logStreamNamePrefix and logStreamNames, the + // action returns an InvalidParameterException error. LogStreamNames []*string `locationName:"logStreamNames" min:"1" type:"list"` // The token for the next set of events to return. (You received this token @@ -5429,7 +6065,7 @@ type FilterLogEventsInput struct { NextToken *string `locationName:"nextToken" min:"1" type:"string"` // The start of the time range, expressed as the number of milliseconds after - // Jan 1, 1970 00:00:00 UTC. Events with a time stamp before this time are not + // Jan 1, 1970 00:00:00 UTC. Events with a timestamp before this time are not // returned. StartTime *int64 `locationName:"startTime" type:"long"` } @@ -5580,7 +6216,7 @@ type FilteredLogEvent struct { // after Jan 1, 1970 00:00:00 UTC. IngestionTime *int64 `locationName:"ingestionTime" type:"long"` - // The name of the log stream this event belongs to. + // The name of the log stream to which this event belongs. LogStreamName *string `locationName:"logStreamName" min:"1" type:"string"` // The data contained in the log event. @@ -5635,7 +6271,7 @@ type GetLogEventsInput struct { _ struct{} `type:"structure"` // The end of the time range, expressed as the number of milliseconds after - // Jan 1, 1970 00:00:00 UTC. Events with a time stamp equal to or later than + // Jan 1, 1970 00:00:00 UTC. Events with a timestamp equal to or later than // this time are not included. EndTime *int64 `locationName:"endTime" type:"long"` @@ -5664,9 +6300,9 @@ type GetLogEventsInput struct { StartFromHead *bool `locationName:"startFromHead" type:"boolean"` // The start of the time range, expressed as the number of milliseconds after - // Jan 1, 1970 00:00:00 UTC. Events with a time stamp equal to this time or - // later than this time are included. Events with a time stamp earlier than - // this time are not included. + // Jan 1, 1970 00:00:00 UTC. Events with a timestamp equal to this time or later + // than this time are included. Events with a timestamp earlier than this time + // are not included. StartTime *int64 `locationName:"startTime" type:"long"` } @@ -5795,6 +6431,237 @@ func (s *GetLogEventsOutput) SetNextForwardToken(v string) *GetLogEventsOutput { return s } +type GetLogGroupFieldsInput struct { + _ struct{} `type:"structure"` + + // The name of the log group to search. + // + // LogGroupName is a required field + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` + + // The time to set as the center of the query. If you specify time, the 8 minutes + // before and 8 minutes after this time are searched. If you omit time, the + // past 15 minutes are queried. + // + // The time value is specified as epoch time, the number of seconds since January + // 1, 1970, 00:00:00 UTC. + Time *int64 `locationName:"time" type:"long"` +} + +// String returns the string representation +func (s GetLogGroupFieldsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLogGroupFieldsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetLogGroupFieldsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetLogGroupFieldsInput"} + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLogGroupName sets the LogGroupName field's value. +func (s *GetLogGroupFieldsInput) SetLogGroupName(v string) *GetLogGroupFieldsInput { + s.LogGroupName = &v + return s +} + +// SetTime sets the Time field's value. +func (s *GetLogGroupFieldsInput) SetTime(v int64) *GetLogGroupFieldsInput { + s.Time = &v + return s +} + +type GetLogGroupFieldsOutput struct { + _ struct{} `type:"structure"` + + // The array of fields found in the query. Each object in the array contains + // the name of the field, along with the percentage of time it appeared in the + // log events that were queried. + LogGroupFields []*LogGroupField `locationName:"logGroupFields" type:"list"` +} + +// String returns the string representation +func (s GetLogGroupFieldsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLogGroupFieldsOutput) GoString() string { + return s.String() +} + +// SetLogGroupFields sets the LogGroupFields field's value. +func (s *GetLogGroupFieldsOutput) SetLogGroupFields(v []*LogGroupField) *GetLogGroupFieldsOutput { + s.LogGroupFields = v + return s +} + +type GetLogRecordInput struct { + _ struct{} `type:"structure"` + + // The pointer corresponding to the log event record you want to retrieve. You + // get this from the response of a GetQueryResults operation. In that response, + // the value of the @ptr field for a log event is the value to use as logRecordPointer + // to retrieve that complete log event record. + // + // LogRecordPointer is a required field + LogRecordPointer *string `locationName:"logRecordPointer" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetLogRecordInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLogRecordInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetLogRecordInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetLogRecordInput"} + if s.LogRecordPointer == nil { + invalidParams.Add(request.NewErrParamRequired("LogRecordPointer")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLogRecordPointer sets the LogRecordPointer field's value. +func (s *GetLogRecordInput) SetLogRecordPointer(v string) *GetLogRecordInput { + s.LogRecordPointer = &v + return s +} + +type GetLogRecordOutput struct { + _ struct{} `type:"structure"` + + // The requested log event, as a JSON string. + LogRecord map[string]*string `locationName:"logRecord" type:"map"` +} + +// String returns the string representation +func (s GetLogRecordOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLogRecordOutput) GoString() string { + return s.String() +} + +// SetLogRecord sets the LogRecord field's value. +func (s *GetLogRecordOutput) SetLogRecord(v map[string]*string) *GetLogRecordOutput { + s.LogRecord = v + return s +} + +type GetQueryResultsInput struct { + _ struct{} `type:"structure"` + + // The ID number of the query. + // + // QueryId is a required field + QueryId *string `locationName:"queryId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetQueryResultsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetQueryResultsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetQueryResultsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetQueryResultsInput"} + if s.QueryId == nil { + invalidParams.Add(request.NewErrParamRequired("QueryId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetQueryId sets the QueryId field's value. +func (s *GetQueryResultsInput) SetQueryId(v string) *GetQueryResultsInput { + s.QueryId = &v + return s +} + +type GetQueryResultsOutput struct { + _ struct{} `type:"structure"` + + // The log events that matched the query criteria during the most recent time + // it ran. + // + // The results value is an array of arrays. Each log event is one object in + // the top-level array. Each of these log event objects is an array of field/value + // pairs. + Results [][]*ResultField `locationName:"results" type:"list"` + + // Includes the number of log events scanned by the query, the number of log + // events that matched the query criteria, and the total number of bytes in + // the log events that were scanned. + Statistics *QueryStatistics `locationName:"statistics" type:"structure"` + + // The status of the most recent running of the query. Possible values are Cancelled, + // Complete, Failed, Running, Scheduled, and Unknown. + Status *string `locationName:"status" type:"string" enum:"QueryStatus"` +} + +// String returns the string representation +func (s GetQueryResultsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetQueryResultsOutput) GoString() string { + return s.String() +} + +// SetResults sets the Results field's value. +func (s *GetQueryResultsOutput) SetResults(v [][]*ResultField) *GetQueryResultsOutput { + s.Results = v + return s +} + +// SetStatistics sets the Statistics field's value. +func (s *GetQueryResultsOutput) SetStatistics(v *QueryStatistics) *GetQueryResultsOutput { + s.Statistics = v + return s +} + +// SetStatus sets the Status field's value. +func (s *GetQueryResultsOutput) SetStatus(v string) *GetQueryResultsOutput { + s.Status = &v + return s +} + // Represents a log event, which is a record of activity that was recorded by // the application or resource being monitored. type InputLogEvent struct { @@ -5986,15 +6853,49 @@ func (s *LogGroup) SetMetricFilterCount(v int64) *LogGroup { return s } -// SetRetentionInDays sets the RetentionInDays field's value. -func (s *LogGroup) SetRetentionInDays(v int64) *LogGroup { - s.RetentionInDays = &v +// SetRetentionInDays sets the RetentionInDays field's value. +func (s *LogGroup) SetRetentionInDays(v int64) *LogGroup { + s.RetentionInDays = &v + return s +} + +// SetStoredBytes sets the StoredBytes field's value. +func (s *LogGroup) SetStoredBytes(v int64) *LogGroup { + s.StoredBytes = &v + return s +} + +// The fields contained in log events found by a GetLogGroupFields operation, +// along with the percentage of queried log events in which each field appears. +type LogGroupField struct { + _ struct{} `type:"structure"` + + // The name of a log field. + Name *string `locationName:"name" type:"string"` + + // The percentage of log events queried that contained the field. + Percent *int64 `locationName:"percent" type:"integer"` +} + +// String returns the string representation +func (s LogGroupField) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LogGroupField) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *LogGroupField) SetName(v string) *LogGroupField { + s.Name = &v return s } -// SetStoredBytes sets the StoredBytes field's value. -func (s *LogGroup) SetStoredBytes(v int64) *LogGroup { - s.StoredBytes = &v +// SetPercent sets the Percent field's value. +func (s *LogGroupField) SetPercent(v int64) *LogGroupField { + s.Percent = &v return s } @@ -6014,11 +6915,11 @@ type LogStream struct { // Jan 1, 1970 00:00:00 UTC. FirstEventTimestamp *int64 `locationName:"firstEventTimestamp" type:"long"` - // the time of the most recent log event in the log stream in CloudWatch Logs. + // The time of the most recent log event in the log stream in CloudWatch Logs. // This number is expressed as the number of milliseconds after Jan 1, 1970 - // 00:00:00 UTC. lastEventTime updates on an eventual consistency basis. It - // typically updates in less than an hour from ingestion, but may take longer - // in some rare situations. + // 00:00:00 UTC. The lastEventTime value updates on an eventual consistency + // basis. It typically updates in less than an hour from ingestion, but may + // take longer in some rare situations. LastEventTimestamp *int64 `locationName:"lastEventTimestamp" type:"long"` // The ingestion time, expressed as the number of milliseconds after Jan 1, @@ -6107,7 +7008,7 @@ type MetricFilter struct { FilterName *string `locationName:"filterName" min:"1" type:"string"` // A symbolic description of how CloudWatch Logs should interpret the data in - // each log event. For example, a log event may contain time stamps, IP addresses, + // each log event. For example, a log event may contain timestamps, IP addresses, // strings, and so on. You use the filter pattern to specify what to look for // in the log event message. FilterPattern *string `locationName:"filterPattern" type:"string"` @@ -6201,7 +7102,7 @@ func (s *MetricFilterMatchRecord) SetExtractedValues(v map[string]*string) *Metr return s } -// Indicates how to transform ingested log events in to metric data in a CloudWatch +// Indicates how to transform ingested log eventsto metric data in a CloudWatch // metric. type MetricTransformation struct { _ struct{} `type:"structure"` @@ -7036,6 +7937,178 @@ func (s PutSubscriptionFilterOutput) GoString() string { return s.String() } +// Reserved. +type QueryCompileError struct { + _ struct{} `type:"structure"` + + // Reserved. + Location *QueryCompileErrorLocation `locationName:"location" type:"structure"` + + // Reserved. + Message *string `locationName:"message" type:"string"` +} + +// String returns the string representation +func (s QueryCompileError) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s QueryCompileError) GoString() string { + return s.String() +} + +// SetLocation sets the Location field's value. +func (s *QueryCompileError) SetLocation(v *QueryCompileErrorLocation) *QueryCompileError { + s.Location = v + return s +} + +// SetMessage sets the Message field's value. +func (s *QueryCompileError) SetMessage(v string) *QueryCompileError { + s.Message = &v + return s +} + +// Reserved. +type QueryCompileErrorLocation struct { + _ struct{} `type:"structure"` + + // Reserved. + EndCharOffset *int64 `locationName:"endCharOffset" type:"integer"` + + // Reserved. + StartCharOffset *int64 `locationName:"startCharOffset" type:"integer"` +} + +// String returns the string representation +func (s QueryCompileErrorLocation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s QueryCompileErrorLocation) GoString() string { + return s.String() +} + +// SetEndCharOffset sets the EndCharOffset field's value. +func (s *QueryCompileErrorLocation) SetEndCharOffset(v int64) *QueryCompileErrorLocation { + s.EndCharOffset = &v + return s +} + +// SetStartCharOffset sets the StartCharOffset field's value. +func (s *QueryCompileErrorLocation) SetStartCharOffset(v int64) *QueryCompileErrorLocation { + s.StartCharOffset = &v + return s +} + +// Information about one CloudWatch Logs Insights query that matches the request +// in a DescribeQueries operation. +type QueryInfo struct { + _ struct{} `type:"structure"` + + // The date and time that this query was created. + CreateTime *int64 `locationName:"createTime" type:"long"` + + // The name of the log group scanned by this query. + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"` + + // The unique ID number of this query. + QueryId *string `locationName:"queryId" type:"string"` + + // The query string used in this query. + QueryString *string `locationName:"queryString" type:"string"` + + // The status of this query. Possible values are Cancelled, Complete, Failed, + // Running, Scheduled, and Unknown. + Status *string `locationName:"status" type:"string" enum:"QueryStatus"` +} + +// String returns the string representation +func (s QueryInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s QueryInfo) GoString() string { + return s.String() +} + +// SetCreateTime sets the CreateTime field's value. +func (s *QueryInfo) SetCreateTime(v int64) *QueryInfo { + s.CreateTime = &v + return s +} + +// SetLogGroupName sets the LogGroupName field's value. +func (s *QueryInfo) SetLogGroupName(v string) *QueryInfo { + s.LogGroupName = &v + return s +} + +// SetQueryId sets the QueryId field's value. +func (s *QueryInfo) SetQueryId(v string) *QueryInfo { + s.QueryId = &v + return s +} + +// SetQueryString sets the QueryString field's value. +func (s *QueryInfo) SetQueryString(v string) *QueryInfo { + s.QueryString = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *QueryInfo) SetStatus(v string) *QueryInfo { + s.Status = &v + return s +} + +// Contains the number of log events scanned by the query, the number of log +// events that matched the query criteria, and the total number of bytes in +// the log events that were scanned. +type QueryStatistics struct { + _ struct{} `type:"structure"` + + // The total number of bytes in the log events scanned during the query. + BytesScanned *float64 `locationName:"bytesScanned" type:"double"` + + // The number of log events that matched the query string. + RecordsMatched *float64 `locationName:"recordsMatched" type:"double"` + + // The total number of log events scanned during the query. + RecordsScanned *float64 `locationName:"recordsScanned" type:"double"` +} + +// String returns the string representation +func (s QueryStatistics) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s QueryStatistics) GoString() string { + return s.String() +} + +// SetBytesScanned sets the BytesScanned field's value. +func (s *QueryStatistics) SetBytesScanned(v float64) *QueryStatistics { + s.BytesScanned = &v + return s +} + +// SetRecordsMatched sets the RecordsMatched field's value. +func (s *QueryStatistics) SetRecordsMatched(v float64) *QueryStatistics { + s.RecordsMatched = &v + return s +} + +// SetRecordsScanned sets the RecordsScanned field's value. +func (s *QueryStatistics) SetRecordsScanned(v float64) *QueryStatistics { + s.RecordsScanned = &v + return s +} + // Represents the rejected events. type RejectedLogEventsInfo struct { _ struct{} `type:"structure"` @@ -7083,7 +8156,7 @@ func (s *RejectedLogEventsInfo) SetTooOldLogEventEndIndex(v int64) *RejectedLogE type ResourcePolicy struct { _ struct{} `type:"structure"` - // Time stamp showing when this policy was last updated, expressed as the number + // Timestamp showing when this policy was last updated, expressed as the number // of milliseconds after Jan 1, 1970 00:00:00 UTC. LastUpdatedTime *int64 `locationName:"lastUpdatedTime" type:"long"` @@ -7122,6 +8195,40 @@ func (s *ResourcePolicy) SetPolicyName(v string) *ResourcePolicy { return s } +// Contains one field from one log event returned by a CloudWatch Logs Insights +// query, along with the value of that field. +type ResultField struct { + _ struct{} `type:"structure"` + + // The log event field. + Field *string `locationName:"field" type:"string"` + + // The value of this field. + Value *string `locationName:"value" type:"string"` +} + +// String returns the string representation +func (s ResultField) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResultField) GoString() string { + return s.String() +} + +// SetField sets the Field field's value. +func (s *ResultField) SetField(v string) *ResultField { + s.Field = &v + return s +} + +// SetValue sets the Value field's value. +func (s *ResultField) SetValue(v string) *ResultField { + s.Value = &v + return s +} + // Represents the search status of a log stream. type SearchedLogStream struct { _ struct{} `type:"structure"` @@ -7155,6 +8262,190 @@ func (s *SearchedLogStream) SetSearchedCompletely(v bool) *SearchedLogStream { return s } +type StartQueryInput struct { + _ struct{} `type:"structure"` + + // The time to end this query, if it is still running. Specified as epoch time, + // the number of seconds since January 1, 1970, 00:00:00 UTC. + // + // EndTime is a required field + EndTime *int64 `locationName:"endTime" type:"long" required:"true"` + + // The maximum number of log events to return in the query. If the query string + // uses the fields command, only the specified fields and their values are returned. + Limit *int64 `locationName:"limit" min:"1" type:"integer"` + + // The log group on which to perform the query. + // + // LogGroupName is a required field + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` + + // The query string to use. For more information, see CloudWatch Logs Insights + // Query Syntax (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). + // + // QueryString is a required field + QueryString *string `locationName:"queryString" type:"string" required:"true"` + + // The time to start the query. Specified as epoch time, the number of seconds + // since January 1, 1970, 00:00:00 UTC. + // + // StartTime is a required field + StartTime *int64 `locationName:"startTime" type:"long" required:"true"` +} + +// String returns the string representation +func (s StartQueryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartQueryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartQueryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartQueryInput"} + if s.EndTime == nil { + invalidParams.Add(request.NewErrParamRequired("EndTime")) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + if s.QueryString == nil { + invalidParams.Add(request.NewErrParamRequired("QueryString")) + } + if s.StartTime == nil { + invalidParams.Add(request.NewErrParamRequired("StartTime")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEndTime sets the EndTime field's value. +func (s *StartQueryInput) SetEndTime(v int64) *StartQueryInput { + s.EndTime = &v + return s +} + +// SetLimit sets the Limit field's value. +func (s *StartQueryInput) SetLimit(v int64) *StartQueryInput { + s.Limit = &v + return s +} + +// SetLogGroupName sets the LogGroupName field's value. +func (s *StartQueryInput) SetLogGroupName(v string) *StartQueryInput { + s.LogGroupName = &v + return s +} + +// SetQueryString sets the QueryString field's value. +func (s *StartQueryInput) SetQueryString(v string) *StartQueryInput { + s.QueryString = &v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *StartQueryInput) SetStartTime(v int64) *StartQueryInput { + s.StartTime = &v + return s +} + +type StartQueryOutput struct { + _ struct{} `type:"structure"` + + // The unique ID of the query. + QueryId *string `locationName:"queryId" type:"string"` +} + +// String returns the string representation +func (s StartQueryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartQueryOutput) GoString() string { + return s.String() +} + +// SetQueryId sets the QueryId field's value. +func (s *StartQueryOutput) SetQueryId(v string) *StartQueryOutput { + s.QueryId = &v + return s +} + +type StopQueryInput struct { + _ struct{} `type:"structure"` + + // The ID number of the query to stop. If necessary, you can use DescribeQueries + // to find this ID number. + // + // QueryId is a required field + QueryId *string `locationName:"queryId" type:"string" required:"true"` +} + +// String returns the string representation +func (s StopQueryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopQueryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopQueryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopQueryInput"} + if s.QueryId == nil { + invalidParams.Add(request.NewErrParamRequired("QueryId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetQueryId sets the QueryId field's value. +func (s *StopQueryInput) SetQueryId(v string) *StopQueryInput { + s.QueryId = &v + return s +} + +type StopQueryOutput struct { + _ struct{} `type:"structure"` + + // This is true if the query was stopped by the StopQuery operation. + Success *bool `locationName:"success" type:"boolean"` +} + +// String returns the string representation +func (s StopQueryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopQueryOutput) GoString() string { + return s.String() +} + +// SetSuccess sets the Success field's value. +func (s *StopQueryOutput) SetSuccess(v bool) *StopQueryOutput { + s.Success = &v + return s +} + // Represents a subscription filter. type SubscriptionFilter struct { _ struct{} `type:"structure"` @@ -7174,7 +8465,7 @@ type SubscriptionFilter struct { FilterName *string `locationName:"filterName" min:"1" type:"string"` // A symbolic description of how CloudWatch Logs should interpret the data in - // each log event. For example, a log event may contain time stamps, IP addresses, + // each log event. For example, a log event may contain timestamps, IP addresses, // strings, and so on. You use the filter pattern to specify what to look for // in the log event message. FilterPattern *string `locationName:"filterPattern" type:"string"` @@ -7313,7 +8604,7 @@ type TestMetricFilterInput struct { _ struct{} `type:"structure"` // A symbolic description of how CloudWatch Logs should interpret the data in - // each log event. For example, a log event may contain time stamps, IP addresses, + // each log event. For example, a log event may contain timestamps, IP addresses, // strings, and so on. You use the filter pattern to specify what to look for // in the log event message. // @@ -7499,3 +8790,20 @@ const ( // OrderByLastEventTime is a OrderBy enum value OrderByLastEventTime = "LastEventTime" ) + +const ( + // QueryStatusScheduled is a QueryStatus enum value + QueryStatusScheduled = "Scheduled" + + // QueryStatusRunning is a QueryStatus enum value + QueryStatusRunning = "Running" + + // QueryStatusComplete is a QueryStatus enum value + QueryStatusComplete = "Complete" + + // QueryStatusFailed is a QueryStatus enum value + QueryStatusFailed = "Failed" + + // QueryStatusCancelled is a QueryStatus enum value + QueryStatusCancelled = "Cancelled" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/errors.go b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/errors.go index d8f3338b35..fb8754b55c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cloudwatchlogs/errors.go @@ -34,6 +34,16 @@ const ( // You have reached the maximum number of resources that can be created. ErrCodeLimitExceededException = "LimitExceededException" + // ErrCodeMalformedQueryException for service response error code + // "MalformedQueryException". + // + // The query string is not valid. Details about this error are displayed in + // a QueryCompileError object. For more information, see . + // + // For more information about valid query syntax, see CloudWatch Logs Insights + // Query Syntax (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html). + ErrCodeMalformedQueryException = "MalformedQueryException" + // ErrCodeOperationAbortedException for service response error code // "OperationAbortedException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go b/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go index 41ad39eeb7..35ba8422c2 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codebuild/api.go @@ -9,6 +9,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) const opBatchDeleteBuilds = "BatchDeleteBuilds" @@ -16,7 +18,7 @@ const opBatchDeleteBuilds = "BatchDeleteBuilds" // BatchDeleteBuildsRequest generates a "aws/request.Request" representing the // client's request for the BatchDeleteBuilds operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -95,7 +97,7 @@ const opBatchGetBuilds = "BatchGetBuilds" // BatchGetBuildsRequest generates a "aws/request.Request" representing the // client's request for the BatchGetBuilds operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -174,7 +176,7 @@ const opBatchGetProjects = "BatchGetProjects" // BatchGetProjectsRequest generates a "aws/request.Request" representing the // client's request for the BatchGetProjects operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -253,7 +255,7 @@ const opCreateProject = "CreateProject" // CreateProjectRequest generates a "aws/request.Request" representing the // client's request for the CreateProject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -339,7 +341,7 @@ const opCreateWebhook = "CreateWebhook" // CreateWebhookRequest generates a "aws/request.Request" representing the // client's request for the CreateWebhook operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -379,17 +381,17 @@ func (c *CodeBuild) CreateWebhookRequest(input *CreateWebhookInput) (req *reques // CreateWebhook API operation for AWS CodeBuild. // // For an existing AWS CodeBuild build project that has its source code stored -// in a GitHub repository, enables AWS CodeBuild to begin automatically rebuilding +// in a GitHub or Bitbucket repository, enables AWS CodeBuild to start rebuilding // the source code every time a code change is pushed to the repository. // // If you enable webhooks for an AWS CodeBuild project, and the project is used -// as a build step in AWS CodePipeline, then two identical builds will be created +// as a build step in AWS CodePipeline, then two identical builds are created // for each commit. One build is triggered through webhooks, and one through -// AWS CodePipeline. Because billing is on a per-build basis, you will be billed +// AWS CodePipeline. Because billing is on a per-build basis, you are billed // for both builds. Therefore, if you are using AWS CodePipeline, we recommend -// that you disable webhooks in CodeBuild. In the AWS CodeBuild console, clear -// the Webhook box. For more information, see step 5 in Change a Build Project's -// Settings (http://docs.aws.amazon.com/codebuild/latest/userguide/change-project.html#change-project-console). +// that you disable webhooks in AWS CodeBuild. In the AWS CodeBuild console, +// clear the Webhook box. For more information, see step 5 in Change a Build +// Project's Settings (http://docs.aws.amazon.com/codebuild/latest/userguide/change-project.html#change-project-console). // // 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 @@ -439,7 +441,7 @@ const opDeleteProject = "DeleteProject" // DeleteProjectRequest generates a "aws/request.Request" representing the // client's request for the DeleteProject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -473,6 +475,7 @@ func (c *CodeBuild) DeleteProjectRequest(input *DeleteProjectInput) (req *reques output = &DeleteProjectOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -513,12 +516,94 @@ func (c *CodeBuild) DeleteProjectWithContext(ctx aws.Context, input *DeleteProje return out, req.Send() } +const opDeleteSourceCredentials = "DeleteSourceCredentials" + +// DeleteSourceCredentialsRequest generates a "aws/request.Request" representing the +// client's request for the DeleteSourceCredentials 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 DeleteSourceCredentials for more information on using the DeleteSourceCredentials +// 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 DeleteSourceCredentialsRequest method. +// req, resp := client.DeleteSourceCredentialsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/DeleteSourceCredentials +func (c *CodeBuild) DeleteSourceCredentialsRequest(input *DeleteSourceCredentialsInput) (req *request.Request, output *DeleteSourceCredentialsOutput) { + op := &request.Operation{ + Name: opDeleteSourceCredentials, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteSourceCredentialsInput{} + } + + output = &DeleteSourceCredentialsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteSourceCredentials API operation for AWS CodeBuild. +// +// Deletes a set of GitHub, GitHub Enterprise, or Bitbucket source credentials. +// +// 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 CodeBuild's +// API operation DeleteSourceCredentials for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidInputException "InvalidInputException" +// The input value that was provided is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified AWS resource cannot be found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/DeleteSourceCredentials +func (c *CodeBuild) DeleteSourceCredentials(input *DeleteSourceCredentialsInput) (*DeleteSourceCredentialsOutput, error) { + req, out := c.DeleteSourceCredentialsRequest(input) + return out, req.Send() +} + +// DeleteSourceCredentialsWithContext is the same as DeleteSourceCredentials with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteSourceCredentials 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 *CodeBuild) DeleteSourceCredentialsWithContext(ctx aws.Context, input *DeleteSourceCredentialsInput, opts ...request.Option) (*DeleteSourceCredentialsOutput, error) { + req, out := c.DeleteSourceCredentialsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteWebhook = "DeleteWebhook" // DeleteWebhookRequest generates a "aws/request.Request" representing the // client's request for the DeleteWebhook operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -552,13 +637,14 @@ func (c *CodeBuild) DeleteWebhookRequest(input *DeleteWebhookInput) (req *reques output = &DeleteWebhookOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteWebhook API operation for AWS CodeBuild. // // For an existing AWS CodeBuild build project that has its source code stored -// in a GitHub repository, stops AWS CodeBuild from automatically rebuilding +// in a GitHub or Bitbucket repository, stops AWS CodeBuild from rebuilding // the source code every time a code change is pushed to the repository. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -600,12 +686,95 @@ func (c *CodeBuild) DeleteWebhookWithContext(ctx aws.Context, input *DeleteWebho return out, req.Send() } +const opImportSourceCredentials = "ImportSourceCredentials" + +// ImportSourceCredentialsRequest generates a "aws/request.Request" representing the +// client's request for the ImportSourceCredentials 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 ImportSourceCredentials for more information on using the ImportSourceCredentials +// 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 ImportSourceCredentialsRequest method. +// req, resp := client.ImportSourceCredentialsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/ImportSourceCredentials +func (c *CodeBuild) ImportSourceCredentialsRequest(input *ImportSourceCredentialsInput) (req *request.Request, output *ImportSourceCredentialsOutput) { + op := &request.Operation{ + Name: opImportSourceCredentials, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ImportSourceCredentialsInput{} + } + + output = &ImportSourceCredentialsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ImportSourceCredentials API operation for AWS CodeBuild. +// +// Imports the source repository credentials for an AWS CodeBuild project that +// has its source code stored in a GitHub, GitHub Enterprise, or Bitbucket repository. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS CodeBuild's +// API operation ImportSourceCredentials for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidInputException "InvalidInputException" +// The input value that was provided is not valid. +// +// * ErrCodeAccountLimitExceededException "AccountLimitExceededException" +// An AWS service limit was exceeded for the calling AWS account. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/ImportSourceCredentials +func (c *CodeBuild) ImportSourceCredentials(input *ImportSourceCredentialsInput) (*ImportSourceCredentialsOutput, error) { + req, out := c.ImportSourceCredentialsRequest(input) + return out, req.Send() +} + +// ImportSourceCredentialsWithContext is the same as ImportSourceCredentials with the addition of +// the ability to pass a context and additional request options. +// +// See ImportSourceCredentials 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 *CodeBuild) ImportSourceCredentialsWithContext(ctx aws.Context, input *ImportSourceCredentialsInput, opts ...request.Option) (*ImportSourceCredentialsOutput, error) { + req, out := c.ImportSourceCredentialsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opInvalidateProjectCache = "InvalidateProjectCache" // InvalidateProjectCacheRequest generates a "aws/request.Request" representing the // client's request for the InvalidateProjectCache operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -639,6 +808,7 @@ func (c *CodeBuild) InvalidateProjectCacheRequest(input *InvalidateProjectCacheI output = &InvalidateProjectCacheOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -687,7 +857,7 @@ const opListBuilds = "ListBuilds" // ListBuildsRequest generates a "aws/request.Request" representing the // client's request for the ListBuilds operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -766,7 +936,7 @@ const opListBuildsForProject = "ListBuildsForProject" // ListBuildsForProjectRequest generates a "aws/request.Request" representing the // client's request for the ListBuildsForProject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -849,7 +1019,7 @@ const opListCuratedEnvironmentImages = "ListCuratedEnvironmentImages" // ListCuratedEnvironmentImagesRequest generates a "aws/request.Request" representing the // client's request for the ListCuratedEnvironmentImages operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -923,7 +1093,7 @@ const opListProjects = "ListProjects" // ListProjectsRequest generates a "aws/request.Request" representing the // client's request for the ListProjects operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -998,12 +1168,86 @@ func (c *CodeBuild) ListProjectsWithContext(ctx aws.Context, input *ListProjects return out, req.Send() } +const opListSourceCredentials = "ListSourceCredentials" + +// ListSourceCredentialsRequest generates a "aws/request.Request" representing the +// client's request for the ListSourceCredentials 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 ListSourceCredentials for more information on using the ListSourceCredentials +// 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 ListSourceCredentialsRequest method. +// req, resp := client.ListSourceCredentialsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/ListSourceCredentials +func (c *CodeBuild) ListSourceCredentialsRequest(input *ListSourceCredentialsInput) (req *request.Request, output *ListSourceCredentialsOutput) { + op := &request.Operation{ + Name: opListSourceCredentials, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListSourceCredentialsInput{} + } + + output = &ListSourceCredentialsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListSourceCredentials API operation for AWS CodeBuild. +// +// Returns a list of SourceCredentialsInfo objects. +// +// 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 CodeBuild's +// API operation ListSourceCredentials for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06/ListSourceCredentials +func (c *CodeBuild) ListSourceCredentials(input *ListSourceCredentialsInput) (*ListSourceCredentialsOutput, error) { + req, out := c.ListSourceCredentialsRequest(input) + return out, req.Send() +} + +// ListSourceCredentialsWithContext is the same as ListSourceCredentials with the addition of +// the ability to pass a context and additional request options. +// +// See ListSourceCredentials 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 *CodeBuild) ListSourceCredentialsWithContext(ctx aws.Context, input *ListSourceCredentialsInput, opts ...request.Option) (*ListSourceCredentialsOutput, error) { + req, out := c.ListSourceCredentialsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opStartBuild = "StartBuild" // StartBuildRequest generates a "aws/request.Request" representing the // client's request for the StartBuild operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1088,7 +1332,7 @@ const opStopBuild = "StopBuild" // StopBuildRequest generates a "aws/request.Request" representing the // client's request for the StopBuild operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1170,7 +1414,7 @@ const opUpdateProject = "UpdateProject" // UpdateProjectRequest generates a "aws/request.Request" representing the // client's request for the UpdateProject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1252,7 +1496,7 @@ const opUpdateWebhook = "UpdateWebhook" // UpdateWebhookRequest generates a "aws/request.Request" representing the // client's request for the UpdateWebhook operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1293,6 +1537,8 @@ func (c *CodeBuild) UpdateWebhookRequest(input *UpdateWebhookInput) (req *reques // // Updates the webhook associated with an AWS CodeBuild build project. // +// If you use Bitbucket for your repository, rotateSecret is ignored. +// // 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. @@ -1561,7 +1807,7 @@ type Build struct { // Information about the output artifacts for the build. Artifacts *BuildArtifacts `locationName:"artifacts" type:"structure"` - // Whether the build has finished. True if completed; otherwise, false. + // Whether the build is complete. True if complete; otherwise, false. BuildComplete *bool `locationName:"buildComplete" type:"boolean"` // The current status of the build. Valid values include: @@ -1588,8 +1834,8 @@ type Build struct { // The AWS Key Management Service (AWS KMS) customer master key (CMK) to be // used for encrypting the build output artifacts. // - // This is expressed either as the CMK's Amazon Resource Name (ARN) or, if specified, - // the CMK's alias (using the format alias/alias-name). + // This is expressed either as the Amazon Resource Name (ARN) of the CMK or, + // if specified, the CMK's alias (using the format alias/alias-name). EncryptionKey *string `locationName:"encryptionKey" min:"1" type:"string"` // When the build process ended, expressed in Unix time format. @@ -1607,7 +1853,7 @@ type Build struct { // codepipeline/my-demo-pipeline). // // * If an AWS Identity and Access Management (IAM) user started the build, - // the user's name (for example MyUserName). + // the user's name (for example, MyUserName). // // * If the Jenkins plugin for AWS CodeBuild started the build, the string // CodeBuild-Jenkins-Plugin. @@ -1619,13 +1865,27 @@ type Build struct { // Describes a network interface. NetworkInterface *NetworkInterface `locationName:"networkInterface" type:"structure"` - // Information about all previous build phases that are completed and information + // Information about all previous build phases that are complete and information // about any current build phase that is not yet complete. Phases []*BuildPhase `locationName:"phases" type:"list"` // The name of the AWS CodeBuild project. ProjectName *string `locationName:"projectName" min:"1" type:"string"` + // The number of minutes a build is allowed to be queued before it times out. + QueuedTimeoutInMinutes *int64 `locationName:"queuedTimeoutInMinutes" type:"integer"` + + // An identifier for the version of this build's source code. + // + // * For AWS CodeCommit, GitHub, GitHub Enterprise, and BitBucket, the commit + // ID. + // + // * For AWS CodePipeline, the source revision provided by AWS CodePipeline. + // + // + // * For Amazon Simple Storage Service (Amazon S3), this does not apply. + ResolvedSourceVersion *string `locationName:"resolvedSourceVersion" min:"1" type:"string"` + // An array of ProjectArtifacts objects. SecondaryArtifacts []*BuildArtifacts `locationName:"secondaryArtifacts" type:"list"` @@ -1637,17 +1897,17 @@ type Build struct { // * For GitHub: the commit ID, pull request ID, branch name, or tag name // that corresponds to the version of the source code you want to build. // If a pull request ID is specified, it must use the format pr/pull-request-ID - // (for example pr/25). If a branch name is specified, the branch's HEAD - // commit ID will be used. If not specified, the default branch's HEAD commit - // ID will be used. + // (for example, pr/25). If a branch name is specified, the branch's HEAD + // commit ID is used. If not specified, the default branch's HEAD commit + // ID is used. // // * For Bitbucket: the commit ID, branch name, or tag name that corresponds // to the version of the source code you want to build. If a branch name - // is specified, the branch's HEAD commit ID will be used. If not specified, - // the default branch's HEAD commit ID will be used. + // is specified, the branch's HEAD commit ID is used. If not specified, the + // default branch's HEAD commit ID is used. // // * For Amazon Simple Storage Service (Amazon S3): the version ID of the - // object representing the build input ZIP file to use. + // object that represents the build input ZIP file to use. SecondarySourceVersions []*ProjectSourceVersion `locationName:"secondarySourceVersions" type:"list"` // An array of ProjectSource objects. @@ -1776,6 +2036,18 @@ func (s *Build) SetProjectName(v string) *Build { return s } +// SetQueuedTimeoutInMinutes sets the QueuedTimeoutInMinutes field's value. +func (s *Build) SetQueuedTimeoutInMinutes(v int64) *Build { + s.QueuedTimeoutInMinutes = &v + return s +} + +// SetResolvedSourceVersion sets the ResolvedSourceVersion field's value. +func (s *Build) SetResolvedSourceVersion(v string) *Build { + s.ResolvedSourceVersion = &v + return s +} + // SetSecondaryArtifacts sets the SecondaryArtifacts field's value. func (s *Build) SetSecondaryArtifacts(v []*BuildArtifacts) *Build { s.SecondaryArtifacts = v @@ -1845,22 +2117,22 @@ type BuildArtifacts struct { // The MD5 hash of the build artifact. // - // You can use this hash along with a checksum tool to confirm both file integrity + // You can use this hash along with a checksum tool to confirm file integrity // and authenticity. // // This value is available only if the build project's packaging value is set // to ZIP. Md5sum *string `locationName:"md5sum" type:"string"` - // If this flag is set, a name specified in the buildspec file overrides the - // artifact name. The name specified in a buildspec file is calculated at build + // If this flag is set, a name specified in the build spec file overrides the + // artifact name. The name specified in a build spec file is calculated at build // time and uses the Shell Command Language. For example, you can append a date // and time to your artifact name so that it is always unique. OverrideArtifactName *bool `locationName:"overrideArtifactName" type:"boolean"` // The SHA-256 hash of the build artifact. // - // You can use this hash along with a checksum tool to confirm both file integrity + // You can use this hash along with a checksum tool to confirm file integrity // and authenticity. // // This value is available only if the build project's packaging value is set @@ -1970,6 +2242,9 @@ type BuildPhase struct { // // * IN_PROGRESS: The build phase is still in progress. // + // * QUEUED: The build has been submitted and is queued behind other submitted + // builds. + // // * STOPPED: The build phase stopped. // // * SUCCEEDED: The build phase succeeded. @@ -1995,6 +2270,9 @@ type BuildPhase struct { // // * PROVISIONING: The build environment is being set up. // + // * QUEUED: The build has been submitted and is queued behind other submitted + // builds. + // // * SUBMITTED: The build has been submitted. // // * UPLOAD_ARTIFACTS: Build output artifacts are being uploaded to the output @@ -2051,6 +2329,70 @@ func (s *BuildPhase) SetStartTime(v time.Time) *BuildPhase { return s } +// Information about Amazon CloudWatch Logs for a build project. +type CloudWatchLogsConfig struct { + _ struct{} `type:"structure"` + + // The group name of the logs in Amazon CloudWatch Logs. For more information, + // see Working with Log Groups and Log Streams (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html). + GroupName *string `locationName:"groupName" type:"string"` + + // The current status of the logs in Amazon CloudWatch Logs for a build project. + // Valid values are: + // + // * ENABLED: Amazon CloudWatch Logs are enabled for this build project. + // + // * DISABLED: Amazon CloudWatch Logs are not enabled for this build project. + // + // Status is a required field + Status *string `locationName:"status" type:"string" required:"true" enum:"LogsConfigStatusType"` + + // The prefix of the stream name of the Amazon CloudWatch Logs. For more information, + // see Working with Log Groups and Log Streams (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html). + StreamName *string `locationName:"streamName" type:"string"` +} + +// String returns the string representation +func (s CloudWatchLogsConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CloudWatchLogsConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CloudWatchLogsConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CloudWatchLogsConfig"} + if s.Status == nil { + invalidParams.Add(request.NewErrParamRequired("Status")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroupName sets the GroupName field's value. +func (s *CloudWatchLogsConfig) SetGroupName(v string) *CloudWatchLogsConfig { + s.GroupName = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *CloudWatchLogsConfig) SetStatus(v string) *CloudWatchLogsConfig { + s.Status = &v + return s +} + +// SetStreamName sets the StreamName field's value. +func (s *CloudWatchLogsConfig) SetStreamName(v string) *CloudWatchLogsConfig { + s.StreamName = &v + return s +} + type CreateProjectInput struct { _ struct{} `type:"structure"` @@ -2059,7 +2401,7 @@ type CreateProjectInput struct { // Artifacts is a required field Artifacts *ProjectArtifacts `locationName:"artifacts" type:"structure" required:"true"` - // Set this to true to generate a publicly-accessible URL for your project's + // Set this to true to generate a publicly accessible URL for your project's // build badge. BadgeEnabled *bool `locationName:"badgeEnabled" type:"boolean"` @@ -2073,7 +2415,7 @@ type CreateProjectInput struct { // The AWS Key Management Service (AWS KMS) customer master key (CMK) to be // used for encrypting the build output artifacts. // - // You can specify either the CMK's Amazon Resource Name (ARN) or, if available, + // You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, // the CMK's alias (using the format alias/alias-name). EncryptionKey *string `locationName:"encryptionKey" min:"1" type:"string"` @@ -2082,11 +2424,18 @@ type CreateProjectInput struct { // Environment is a required field Environment *ProjectEnvironment `locationName:"environment" type:"structure" required:"true"` + // Information about logs for the build project. These can be logs in Amazon + // CloudWatch Logs, logs uploaded to a specified S3 bucket, or both. + LogsConfig *LogsConfig `locationName:"logsConfig" type:"structure"` + // The name of the build project. // // Name is a required field Name *string `locationName:"name" min:"2" type:"string" required:"true"` + // The number of minutes a build is allowed to be queued before it times out. + QueuedTimeoutInMinutes *int64 `locationName:"queuedTimeoutInMinutes" min:"5" type:"integer"` + // An array of ProjectArtifacts objects. SecondaryArtifacts []*ProjectArtifacts `locationName:"secondaryArtifacts" type:"list"` @@ -2112,8 +2461,8 @@ type CreateProjectInput struct { Tags []*Tag `locationName:"tags" type:"list"` // How long, in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait - // until timing out any build that has not been marked as completed. The default - // is 60 minutes. + // before it times out any build that has not been marked as completed. The + // default is 60 minutes. TimeoutInMinutes *int64 `locationName:"timeoutInMinutes" min:"5" type:"integer"` // VpcConfig enables AWS CodeBuild to access resources in an Amazon VPC. @@ -2148,6 +2497,9 @@ func (s *CreateProjectInput) Validate() error { if s.Name != nil && len(*s.Name) < 2 { invalidParams.Add(request.NewErrParamMinLen("Name", 2)) } + if s.QueuedTimeoutInMinutes != nil && *s.QueuedTimeoutInMinutes < 5 { + invalidParams.Add(request.NewErrParamMinValue("QueuedTimeoutInMinutes", 5)) + } if s.ServiceRole == nil { invalidParams.Add(request.NewErrParamRequired("ServiceRole")) } @@ -2175,6 +2527,11 @@ func (s *CreateProjectInput) Validate() error { invalidParams.AddNested("Environment", err.(request.ErrInvalidParams)) } } + if s.LogsConfig != nil { + if err := s.LogsConfig.Validate(); err != nil { + invalidParams.AddNested("LogsConfig", err.(request.ErrInvalidParams)) + } + } if s.SecondaryArtifacts != nil { for i, v := range s.SecondaryArtifacts { if v == nil { @@ -2258,12 +2615,24 @@ func (s *CreateProjectInput) SetEnvironment(v *ProjectEnvironment) *CreateProjec return s } +// SetLogsConfig sets the LogsConfig field's value. +func (s *CreateProjectInput) SetLogsConfig(v *LogsConfig) *CreateProjectInput { + s.LogsConfig = v + return s +} + // SetName sets the Name field's value. func (s *CreateProjectInput) SetName(v string) *CreateProjectInput { s.Name = &v return s } +// SetQueuedTimeoutInMinutes sets the QueuedTimeoutInMinutes field's value. +func (s *CreateProjectInput) SetQueuedTimeoutInMinutes(v int64) *CreateProjectInput { + s.QueuedTimeoutInMinutes = &v + return s +} + // SetSecondaryArtifacts sets the SecondaryArtifacts field's value. func (s *CreateProjectInput) SetSecondaryArtifacts(v []*ProjectArtifacts) *CreateProjectInput { s.SecondaryArtifacts = v @@ -2332,10 +2701,10 @@ func (s *CreateProjectOutput) SetProject(v *Project) *CreateProjectOutput { type CreateWebhookInput struct { _ struct{} `type:"structure"` - // A regular expression used to determine which branches in a repository are - // built when a webhook is triggered. If the name of a branch matches the regular - // expression, then it is built. If it doesn't match, then it is not. If branchFilter - // is empty, then all branches are built. + // A regular expression used to determine which repository branches are built + // when a webhook is triggered. If the name of a branch matches the regular + // expression, then it is built. If branchFilter is empty, then all branches + // are built. BranchFilter *string `locationName:"branchFilter" type:"string"` // The name of the AWS CodeBuild project. @@ -2385,8 +2754,8 @@ func (s *CreateWebhookInput) SetProjectName(v string) *CreateWebhookInput { type CreateWebhookOutput struct { _ struct{} `type:"structure"` - // Information about a webhook in GitHub that connects repository events to - // a build project in AWS CodeBuild. + // Information about a webhook that connects repository events to a build project + // in AWS CodeBuild. Webhook *Webhook `locationName:"webhook" type:"structure"` } @@ -2461,6 +2830,70 @@ func (s DeleteProjectOutput) GoString() string { return s.String() } +type DeleteSourceCredentialsInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the token. + // + // Arn is a required field + Arn *string `locationName:"arn" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteSourceCredentialsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSourceCredentialsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteSourceCredentialsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSourceCredentialsInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *DeleteSourceCredentialsInput) SetArn(v string) *DeleteSourceCredentialsInput { + s.Arn = &v + return s +} + +type DeleteSourceCredentialsOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the token. + Arn *string `locationName:"arn" min:"1" type:"string"` +} + +// String returns the string representation +func (s DeleteSourceCredentialsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSourceCredentialsOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *DeleteSourceCredentialsOutput) SetArn(v string) *DeleteSourceCredentialsOutput { + s.Arn = &v + return s +} + type DeleteWebhookInput struct { _ struct{} `type:"structure"` @@ -2645,9 +3078,9 @@ type EnvironmentVariable struct { // The value of the environment variable. // - // We strongly discourage using environment variables to store sensitive values, - // especially AWS secret key IDs and secret access keys. Environment variables - // can be displayed in plain text using tools such as the AWS CodeBuild console + // We strongly discourage the use of environment variables to store sensitive + // values, especially AWS secret key IDs and secret access keys. Environment + // variables can be displayed in plain text using the AWS CodeBuild console // and the AWS Command Line Interface (AWS CLI). // // Value is a required field @@ -2701,11 +3134,118 @@ func (s *EnvironmentVariable) SetValue(v string) *EnvironmentVariable { return s } +type ImportSourceCredentialsInput struct { + _ struct{} `type:"structure"` + + // The type of authentication used to connect to a GitHub, GitHub Enterprise, + // or Bitbucket repository. An OAUTH connection is not supported by the API + // and must be created using the AWS CodeBuild console. + // + // AuthType is a required field + AuthType *string `locationName:"authType" type:"string" required:"true" enum:"AuthType"` + + // The source provider used for this project. + // + // ServerType is a required field + ServerType *string `locationName:"serverType" type:"string" required:"true" enum:"ServerType"` + + // For GitHub or GitHub Enterprise, this is the personal access token. For Bitbucket, + // this is the app password. + // + // Token is a required field + Token *string `locationName:"token" min:"1" type:"string" required:"true" sensitive:"true"` + + // The Bitbucket username when the authType is BASIC_AUTH. This parameter is + // not valid for other types of source providers or connections. + Username *string `locationName:"username" min:"1" type:"string"` +} + +// String returns the string representation +func (s ImportSourceCredentialsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportSourceCredentialsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ImportSourceCredentialsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ImportSourceCredentialsInput"} + if s.AuthType == nil { + invalidParams.Add(request.NewErrParamRequired("AuthType")) + } + if s.ServerType == nil { + invalidParams.Add(request.NewErrParamRequired("ServerType")) + } + if s.Token == nil { + invalidParams.Add(request.NewErrParamRequired("Token")) + } + if s.Token != nil && len(*s.Token) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Token", 1)) + } + if s.Username != nil && len(*s.Username) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Username", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAuthType sets the AuthType field's value. +func (s *ImportSourceCredentialsInput) SetAuthType(v string) *ImportSourceCredentialsInput { + s.AuthType = &v + return s +} + +// SetServerType sets the ServerType field's value. +func (s *ImportSourceCredentialsInput) SetServerType(v string) *ImportSourceCredentialsInput { + s.ServerType = &v + return s +} + +// SetToken sets the Token field's value. +func (s *ImportSourceCredentialsInput) SetToken(v string) *ImportSourceCredentialsInput { + s.Token = &v + return s +} + +// SetUsername sets the Username field's value. +func (s *ImportSourceCredentialsInput) SetUsername(v string) *ImportSourceCredentialsInput { + s.Username = &v + return s +} + +type ImportSourceCredentialsOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the token. + Arn *string `locationName:"arn" min:"1" type:"string"` +} + +// String returns the string representation +func (s ImportSourceCredentialsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportSourceCredentialsOutput) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *ImportSourceCredentialsOutput) SetArn(v string) *ImportSourceCredentialsOutput { + s.Arn = &v + return s +} + type InvalidateProjectCacheInput struct { _ struct{} `type:"structure"` - // The name of the AWS CodeBuild build project that the cache will be reset - // for. + // The name of the AWS CodeBuild build project that the cache is reset for. // // ProjectName is a required field ProjectName *string `locationName:"projectName" min:"1" type:"string" required:"true"` @@ -2988,13 +3528,12 @@ type ListProjectsInput struct { // The criterion to be used to list build project names. Valid values include: // - // * CREATED_TIME: List the build project names based on when each build - // project was created. + // * CREATED_TIME: List based on when each build project was created. // - // * LAST_MODIFIED_TIME: List the build project names based on when information - // about each build project was last changed. + // * LAST_MODIFIED_TIME: List based on when information about each build + // project was last changed. // - // * NAME: List the build project names based on each build project's name. + // * NAME: List based on each build project's name. // // Use sortOrder to specify in what order to list the build project names based // on the preceding criteria. @@ -3002,9 +3541,9 @@ type ListProjectsInput struct { // The order in which to list build projects. Valid values include: // - // * ASCENDING: List the build project names in ascending order. + // * ASCENDING: List in ascending order. // - // * DESCENDING: List the build project names in descending order. + // * DESCENDING: List in descending order. // // Use sortBy to specify the criterion to be used to list build project names. SortOrder *string `locationName:"sortOrder" type:"string" enum:"SortOrderType"` @@ -3087,16 +3626,120 @@ func (s *ListProjectsOutput) SetProjects(v []*string) *ListProjectsOutput { return s } +type ListSourceCredentialsInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s ListSourceCredentialsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListSourceCredentialsInput) GoString() string { + return s.String() +} + +type ListSourceCredentialsOutput struct { + _ struct{} `type:"structure"` + + // A list of SourceCredentialsInfo objects. Each SourceCredentialsInfo object + // includes the authentication type, token ARN, and type of source provider + // for one set of credentials. + SourceCredentialsInfos []*SourceCredentialsInfo `locationName:"sourceCredentialsInfos" type:"list"` +} + +// String returns the string representation +func (s ListSourceCredentialsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListSourceCredentialsOutput) GoString() string { + return s.String() +} + +// SetSourceCredentialsInfos sets the SourceCredentialsInfos field's value. +func (s *ListSourceCredentialsOutput) SetSourceCredentialsInfos(v []*SourceCredentialsInfo) *ListSourceCredentialsOutput { + s.SourceCredentialsInfos = v + return s +} + +// Information about logs for a build project. These can be logs in Amazon CloudWatch +// Logs, built in a specified S3 bucket, or both. +type LogsConfig struct { + _ struct{} `type:"structure"` + + // Information about Amazon CloudWatch Logs for a build project. Amazon CloudWatch + // Logs are enabled by default. + CloudWatchLogs *CloudWatchLogsConfig `locationName:"cloudWatchLogs" type:"structure"` + + // Information about logs built to an S3 bucket for a build project. S3 logs + // are not enabled by default. + S3Logs *S3LogsConfig `locationName:"s3Logs" type:"structure"` +} + +// String returns the string representation +func (s LogsConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LogsConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *LogsConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LogsConfig"} + if s.CloudWatchLogs != nil { + if err := s.CloudWatchLogs.Validate(); err != nil { + invalidParams.AddNested("CloudWatchLogs", err.(request.ErrInvalidParams)) + } + } + if s.S3Logs != nil { + if err := s.S3Logs.Validate(); err != nil { + invalidParams.AddNested("S3Logs", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCloudWatchLogs sets the CloudWatchLogs field's value. +func (s *LogsConfig) SetCloudWatchLogs(v *CloudWatchLogsConfig) *LogsConfig { + s.CloudWatchLogs = v + return s +} + +// SetS3Logs sets the S3Logs field's value. +func (s *LogsConfig) SetS3Logs(v *S3LogsConfig) *LogsConfig { + s.S3Logs = v + return s +} + // Information about build logs in Amazon CloudWatch Logs. type LogsLocation struct { _ struct{} `type:"structure"` + // Information about Amazon CloudWatch Logs for a build project. + CloudWatchLogs *CloudWatchLogsConfig `locationName:"cloudWatchLogs" type:"structure"` + // The URL to an individual build log in Amazon CloudWatch Logs. DeepLink *string `locationName:"deepLink" type:"string"` // The name of the Amazon CloudWatch Logs group for the build logs. GroupName *string `locationName:"groupName" type:"string"` + // The URL to a build log in an S3 bucket. + S3DeepLink *string `locationName:"s3DeepLink" type:"string"` + + // Information about S3 logs for a build project. + S3Logs *S3LogsConfig `locationName:"s3Logs" type:"structure"` + // The name of the Amazon CloudWatch Logs stream for the build logs. StreamName *string `locationName:"streamName" type:"string"` } @@ -3111,6 +3754,12 @@ func (s LogsLocation) GoString() string { return s.String() } +// SetCloudWatchLogs sets the CloudWatchLogs field's value. +func (s *LogsLocation) SetCloudWatchLogs(v *CloudWatchLogsConfig) *LogsLocation { + s.CloudWatchLogs = v + return s +} + // SetDeepLink sets the DeepLink field's value. func (s *LogsLocation) SetDeepLink(v string) *LogsLocation { s.DeepLink = &v @@ -3123,6 +3772,18 @@ func (s *LogsLocation) SetGroupName(v string) *LogsLocation { return s } +// SetS3DeepLink sets the S3DeepLink field's value. +func (s *LogsLocation) SetS3DeepLink(v string) *LogsLocation { + s.S3DeepLink = &v + return s +} + +// SetS3Logs sets the S3Logs field's value. +func (s *LogsLocation) SetS3Logs(v *S3LogsConfig) *LogsLocation { + s.S3Logs = v + return s +} + // SetStreamName sets the StreamName field's value. func (s *LogsLocation) SetStreamName(v string) *LogsLocation { s.StreamName = &v @@ -3163,12 +3824,12 @@ func (s *NetworkInterface) SetSubnetId(v string) *NetworkInterface { } // Additional information about a build phase that has an error. You can use -// this information to help troubleshoot a failed build. +// this information for troubleshooting. type PhaseContext struct { _ struct{} `type:"structure"` - // An explanation of the build phase's context. This explanation might include - // a command ID and an exit code. + // An explanation of the build phase's context. This might include a command + // ID and an exit code. Message *string `locationName:"message" type:"string"` // The status code for the context of the build phase. @@ -3222,8 +3883,8 @@ type Project struct { // The AWS Key Management Service (AWS KMS) customer master key (CMK) to be // used for encrypting the build output artifacts. // - // This is expressed either as the CMK's Amazon Resource Name (ARN) or, if specified, - // the CMK's alias (using the format alias/alias-name). + // This is expressed either as the Amazon Resource Name (ARN) of the CMK or, + // if specified, the CMK's alias (using the format alias/alias-name). EncryptionKey *string `locationName:"encryptionKey" min:"1" type:"string"` // Information about the build environment for this build project. @@ -3233,9 +3894,16 @@ type Project struct { // format. LastModified *time.Time `locationName:"lastModified" type:"timestamp"` + // Information about logs for the build project. A project can create logs in + // Amazon CloudWatch Logs, an S3 bucket, or both. + LogsConfig *LogsConfig `locationName:"logsConfig" type:"structure"` + // The name of the build project. Name *string `locationName:"name" min:"2" type:"string"` + // The number of minutes a build is allowed to be queued before it times out. + QueuedTimeoutInMinutes *int64 `locationName:"queuedTimeoutInMinutes" min:"5" type:"integer"` + // An array of ProjectArtifacts objects. SecondaryArtifacts []*ProjectArtifacts `locationName:"secondaryArtifacts" type:"list"` @@ -3261,11 +3929,11 @@ type Project struct { // The default is 60 minutes. TimeoutInMinutes *int64 `locationName:"timeoutInMinutes" min:"5" type:"integer"` - // Information about the VPC configuration that AWS CodeBuild will access. + // Information about the VPC configuration that AWS CodeBuild accesses. VpcConfig *VpcConfig `locationName:"vpcConfig" type:"structure"` - // Information about a webhook in GitHub that connects repository events to - // a build project in AWS CodeBuild. + // Information about a webhook that connects repository events to a build project + // in AWS CodeBuild. Webhook *Webhook `locationName:"webhook" type:"structure"` } @@ -3333,12 +4001,24 @@ func (s *Project) SetLastModified(v time.Time) *Project { return s } +// SetLogsConfig sets the LogsConfig field's value. +func (s *Project) SetLogsConfig(v *LogsConfig) *Project { + s.LogsConfig = v + return s +} + // SetName sets the Name field's value. func (s *Project) SetName(v string) *Project { s.Name = &v return s } +// SetQueuedTimeoutInMinutes sets the QueuedTimeoutInMinutes field's value. +func (s *Project) SetQueuedTimeoutInMinutes(v int64) *Project { + s.QueuedTimeoutInMinutes = &v + return s +} + // SetSecondaryArtifacts sets the SecondaryArtifacts field's value. func (s *Project) SetSecondaryArtifacts(v []*ProjectArtifacts) *Project { s.SecondaryArtifacts = v @@ -3395,61 +4075,61 @@ type ProjectArtifacts struct { ArtifactIdentifier *string `locationName:"artifactIdentifier" type:"string"` // Set to true if you do not want your output artifacts encrypted. This option - // is only valid if your artifacts type is Amazon S3. If this is set with another - // artifacts type, an invalidInputException will be thrown. + // is valid only if your artifacts type is Amazon Simple Storage Service (Amazon + // S3). If this is set with another artifacts type, an invalidInputException + // is thrown. EncryptionDisabled *bool `locationName:"encryptionDisabled" type:"boolean"` - // Information about the build output artifact location, as follows: + // Information about the build output artifact location: // - // * If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this - // value if specified. This is because AWS CodePipeline manages its build - // output locations instead of AWS CodeBuild. + // * If type is set to CODEPIPELINE, AWS CodePipeline ignores this value + // if specified. This is because AWS CodePipeline manages its build output + // locations instead of AWS CodeBuild. // - // * If type is set to NO_ARTIFACTS, then this value will be ignored if specified, - // because no build output will be produced. + // * If type is set to NO_ARTIFACTS, this value is ignored if specified, + // because no build output is produced. // // * If type is set to S3, this is the name of the output bucket. Location *string `locationName:"location" type:"string"` - // Along with path and namespaceType, the pattern that AWS CodeBuild will use - // to name and store the output artifact, as follows: + // Along with path and namespaceType, the pattern that AWS CodeBuild uses to + // name and store the output artifact: // - // * If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this - // value if specified. This is because AWS CodePipeline manages its build - // output names instead of AWS CodeBuild. + // * If type is set to CODEPIPELINE, AWS CodePipeline ignores this value + // if specified. This is because AWS CodePipeline manages its build output + // names instead of AWS CodeBuild. // - // * If type is set to NO_ARTIFACTS, then this value will be ignored if specified, - // because no build output will be produced. + // * If type is set to NO_ARTIFACTS, this value is ignored if specified, + // because no build output is produced. // // * If type is set to S3, this is the name of the output artifact object. - // If you set the name to be a forward slash ("/"), then the artifact is - // stored in the root of the output bucket. + // If you set the name to be a forward slash ("/"), the artifact is stored + // in the root of the output bucket. // // For example: // // * If path is set to MyArtifacts, namespaceType is set to BUILD_ID, and - // name is set to MyArtifact.zip, then the output artifact would be stored - // in MyArtifacts/build-ID/MyArtifact.zip. + // name is set to MyArtifact.zip, then the output artifact is stored in MyArtifacts/build-ID/MyArtifact.zip. + // // // * If path is empty, namespaceType is set to NONE, and name is set to - // "/", then the output artifact would be stored in the root of the output - // bucket. + // "/", the output artifact is stored in the root of the output bucket. // // * If path is set to MyArtifacts, namespaceType is set to BUILD_ID, and - // name is set to "/", then the output artifact would be stored in MyArtifacts/build-ID. + // name is set to "/", the output artifact is stored in MyArtifacts/build-ID. Name *string `locationName:"name" type:"string"` - // Along with path and name, the pattern that AWS CodeBuild will use to determine - // the name and location to store the output artifact, as follows: + // Along with path and name, the pattern that AWS CodeBuild uses to determine + // the name and location to store the output artifact: // - // * If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this - // value if specified. This is because AWS CodePipeline manages its build - // output names instead of AWS CodeBuild. + // * If type is set to CODEPIPELINE, AWS CodePipeline ignores this value + // if specified. This is because AWS CodePipeline manages its build output + // names instead of AWS CodeBuild. // - // * If type is set to NO_ARTIFACTS, then this value will be ignored if specified, - // because no build output will be produced. + // * If type is set to NO_ARTIFACTS, this value is ignored if specified, + // because no build output is produced. // - // * If type is set to S3, then valid values include: + // * If type is set to S3, valid values include: // // BUILD_ID: Include the build ID in the location of the build output artifact. // @@ -3457,61 +4137,60 @@ type ProjectArtifacts struct { // not specified. // // For example, if path is set to MyArtifacts, namespaceType is set to BUILD_ID, - // and name is set to MyArtifact.zip, then the output artifact would be stored - // in MyArtifacts/build-ID/MyArtifact.zip. + // and name is set to MyArtifact.zip, the output artifact is stored in MyArtifacts/build-ID/MyArtifact.zip. NamespaceType *string `locationName:"namespaceType" type:"string" enum:"ArtifactNamespace"` - // If this flag is set, a name specified in the buildspec file overrides the - // artifact name. The name specified in a buildspec file is calculated at build + // If this flag is set, a name specified in the build spec file overrides the + // artifact name. The name specified in a build spec file is calculated at build // time and uses the Shell Command Language. For example, you can append a date // and time to your artifact name so that it is always unique. OverrideArtifactName *bool `locationName:"overrideArtifactName" type:"boolean"` - // The type of build output artifact to create, as follows: + // The type of build output artifact to create: // - // * If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this - // value if specified. This is because AWS CodePipeline manages its build - // output artifacts instead of AWS CodeBuild. + // * If type is set to CODEPIPELINE, AWS CodePipeline ignores this value + // if specified. This is because AWS CodePipeline manages its build output + // artifacts instead of AWS CodeBuild. // - // * If type is set to NO_ARTIFACTS, then this value will be ignored if specified, - // because no build output will be produced. + // * If type is set to NO_ARTIFACTS, this value is ignored if specified, + // because no build output is produced. // // * If type is set to S3, valid values include: // - // NONE: AWS CodeBuild will create in the output bucket a folder containing - // the build output. This is the default if packaging is not specified. + // NONE: AWS CodeBuild creates in the output bucket a folder that contains the + // build output. This is the default if packaging is not specified. // - // ZIP: AWS CodeBuild will create in the output bucket a ZIP file containing + // ZIP: AWS CodeBuild creates in the output bucket a ZIP file that contains // the build output. Packaging *string `locationName:"packaging" type:"string" enum:"ArtifactPackaging"` - // Along with namespaceType and name, the pattern that AWS CodeBuild will use - // to name and store the output artifact, as follows: + // Along with namespaceType and name, the pattern that AWS CodeBuild uses to + // name and store the output artifact: // - // * If type is set to CODEPIPELINE, then AWS CodePipeline will ignore this - // value if specified. This is because AWS CodePipeline manages its build - // output names instead of AWS CodeBuild. + // * If type is set to CODEPIPELINE, AWS CodePipeline ignores this value + // if specified. This is because AWS CodePipeline manages its build output + // names instead of AWS CodeBuild. // - // * If type is set to NO_ARTIFACTS, then this value will be ignored if specified, - // because no build output will be produced. + // * If type is set to NO_ARTIFACTS, this value is ignored if specified, + // because no build output is produced. // // * If type is set to S3, this is the path to the output artifact. If path - // is not specified, then path will not be used. + // is not specified, path is not used. // // For example, if path is set to MyArtifacts, namespaceType is set to NONE, - // and name is set to MyArtifact.zip, then the output artifact would be stored - // in the output bucket at MyArtifacts/MyArtifact.zip. + // and name is set to MyArtifact.zip, the output artifact is stored in the output + // bucket at MyArtifacts/MyArtifact.zip. Path *string `locationName:"path" type:"string"` // The type of build output artifact. Valid values include: // - // * CODEPIPELINE: The build project will have build output generated through - // AWS CodePipeline. + // * CODEPIPELINE: The build project has build output generated through AWS + // CodePipeline. // - // * NO_ARTIFACTS: The build project will not produce any build output. + // * NO_ARTIFACTS: The build project does not produce any build output. // - // * S3: The build project will store build output in Amazon Simple Storage - // Service (Amazon S3). + // * S3: The build project stores build output in Amazon Simple Storage Service + // (Amazon S3). // // Type is a required field Type *string `locationName:"type" type:"string" required:"true" enum:"ArtifactsType"` @@ -3598,12 +4277,15 @@ func (s *ProjectArtifacts) SetType(v string) *ProjectArtifacts { type ProjectBadge struct { _ struct{} `type:"structure"` - // Set this to true to generate a publicly-accessible URL for your project's + // Set this to true to generate a publicly accessible URL for your project's // build badge. BadgeEnabled *bool `locationName:"badgeEnabled" type:"boolean"` // The publicly-accessible URL through which you can access the build badge // for your project. + // + // The publicly accessible URL through which you can access the build badge + // for your project. BadgeRequestUrl *string `locationName:"badgeRequestUrl" type:"string"` } @@ -3633,18 +4315,18 @@ func (s *ProjectBadge) SetBadgeRequestUrl(v string) *ProjectBadge { type ProjectCache struct { _ struct{} `type:"structure"` - // Information about the cache location, as follows: + // Information about the cache location: // - // * NO_CACHE: This value will be ignored. + // * NO_CACHE: This value is ignored. // // * S3: This is the S3 bucket name/prefix. Location *string `locationName:"location" type:"string"` // The type of cache used by the build project. Valid values include: // - // * NO_CACHE: The build project will not use any cache. + // * NO_CACHE: The build project does not use any cache. // - // * S3: The build project will read and write from/to S3. + // * S3: The build project reads and writes from and to S3. // // Type is a required field Type *string `locationName:"type" type:"string" required:"true" enum:"CacheType"` @@ -3692,7 +4374,7 @@ type ProjectEnvironment struct { // The certificate to use with this build project. Certificate *string `locationName:"certificate" type:"string"` - // Information about the compute resources the build project will use. Available + // Information about the compute resources the build project uses. Available // values include: // // * BUILD_GENERAL1_SMALL: Use up to 3 GB memory and 2 vCPUs for builds. @@ -3717,11 +4399,11 @@ type ProjectEnvironment struct { // only if the build project is be used to build Docker images, and the specified // build environment image is not provided by AWS CodeBuild with Docker support. // Otherwise, all associated builds that attempt to interact with the Docker - // daemon will fail. Note that you must also start the Docker daemon so that - // builds can interact with it. One way to do this is to initialize the Docker - // daemon during the install phase of your build spec by running the following - // build commands. (Do not run the following build commands if the specified - // build environment image is provided by AWS CodeBuild with Docker support.) + // daemon fail. You must also start the Docker daemon so that builds can interact + // with it. One way to do this is to initialize the Docker daemon during the + // install phase of your build spec by running the following build commands. + // (Do not run these commands if the specified build environment image is provided + // by AWS CodeBuild with Docker support.) // // If the operating system's base image is Ubuntu Linux: // @@ -3829,8 +4511,7 @@ type ProjectSource struct { // the source code to be built. // // This information is for the AWS CodeBuild console's use only. Your code should - // not get or set this information directly (unless the build project's source - // type value is BITBUCKET or GITHUB). + // not get or set this information directly. Auth *SourceAuth `locationName:"auth" type:"structure"` // The build spec declaration to use for the builds in this build project. @@ -3851,7 +4532,7 @@ type ProjectSource struct { // // * For source code settings that are specified in the source action of // a pipeline in AWS CodePipeline, location should not be specified. If it - // is specified, AWS CodePipeline will ignore it. This is because AWS CodePipeline + // is specified, AWS CodePipeline ignores it. This is because AWS CodePipeline // uses the settings in a pipeline's source action instead of this value. // // * For source code in an AWS CodeCommit repository, the HTTPS clone URL @@ -3859,38 +4540,42 @@ type ProjectSource struct { // example, https://git-codecommit.region-ID.amazonaws.com/v1/repos/repo-name). // // * For source code in an Amazon Simple Storage Service (Amazon S3) input - // bucket, the path to the ZIP file that contains the source code (for example, - // bucket-name/path/to/object-name.zip) + // bucket, one of the following. + // + // The path to the ZIP file that contains the source code (for example, bucket-name/path/to/object-name.zip). + // + // + // The path to the folder that contains the source code (for example, bucket-name/path/to/source-code/folder/). + // // // * For source code in a GitHub repository, the HTTPS clone URL to the repository - // that contains the source and the build spec. Also, you must connect your - // AWS account to your GitHub account. To do this, use the AWS CodeBuild - // console to begin creating a build project. When you use the console to - // connect (or reconnect) with GitHub, on the GitHub Authorize application - // page that displays, for Organization access, choose Request access next - // to each repository you want to allow AWS CodeBuild to have access to. - // Then choose Authorize application. (After you have connected to your GitHub - // account, you do not need to finish creating the build project, and you - // may then leave the AWS CodeBuild console.) To instruct AWS CodeBuild to - // then use this connection, in the source object, set the auth object's - // type value to OAUTH. + // that contains the source and the build spec. You must connect your AWS + // account to your GitHub account. Use the AWS CodeBuild console to start + // creating a build project. When you use the console to connect (or reconnect) + // with GitHub, on the GitHub Authorize application page, for Organization + // access, choose Request access next to each repository you want to allow + // AWS CodeBuild to have access to, and then choose Authorize application. + // (After you have connected to your GitHub account, you do not need to finish + // creating the build project. You can leave the AWS CodeBuild console.) + // To instruct AWS CodeBuild to use this connection, in the source object, + // set the auth object's type value to OAUTH. // // * For source code in a Bitbucket repository, the HTTPS clone URL to the - // repository that contains the source and the build spec. Also, you must - // connect your AWS account to your Bitbucket account. To do this, use the - // AWS CodeBuild console to begin creating a build project. When you use - // the console to connect (or reconnect) with Bitbucket, on the Bitbucket - // Confirm access to your account page that displays, choose Grant access. - // (After you have connected to your Bitbucket account, you do not need to - // finish creating the build project, and you may then leave the AWS CodeBuild - // console.) To instruct AWS CodeBuild to then use this connection, in the - // source object, set the auth object's type value to OAUTH. + // repository that contains the source and the build spec. You must connect + // your AWS account to your Bitbucket account. Use the AWS CodeBuild console + // to start creating a build project. When you use the console to connect + // (or reconnect) with Bitbucket, on the Bitbucket Confirm access to your + // account page, choose Grant access. (After you have connected to your Bitbucket + // account, you do not need to finish creating the build project. You can + // leave the AWS CodeBuild console.) To instruct AWS CodeBuild to use this + // connection, in the source object, set the auth object's type value to + // OAUTH. Location *string `locationName:"location" type:"string"` // Set to true to report the status of a build's start and finish to your source - // provider. This option is only valid when your source provider is GitHub. - // If this is set and you use a different source provider, an invalidInputException - // is thrown. + // provider. This option is valid only when your source provider is GitHub, + // GitHub Enterprise, or Bitbucket. If this is set and you use a different source + // provider, an invalidInputException is thrown. ReportBuildStatus *bool `locationName:"reportBuildStatus" type:"boolean"` // An identifier for this project source. @@ -3908,6 +4593,8 @@ type ProjectSource struct { // // * GITHUB: The source code is in a GitHub repository. // + // * NO_SOURCE: The project does not have input source code. + // // * S3: The source code is in an Amazon Simple Storage Service (Amazon S3) // input bucket. // @@ -4008,17 +4695,17 @@ type ProjectSourceVersion struct { // * For GitHub: the commit ID, pull request ID, branch name, or tag name // that corresponds to the version of the source code you want to build. // If a pull request ID is specified, it must use the format pr/pull-request-ID - // (for example pr/25). If a branch name is specified, the branch's HEAD - // commit ID will be used. If not specified, the default branch's HEAD commit - // ID will be used. + // (for example, pr/25). If a branch name is specified, the branch's HEAD + // commit ID is used. If not specified, the default branch's HEAD commit + // ID is used. // // * For Bitbucket: the commit ID, branch name, or tag name that corresponds // to the version of the source code you want to build. If a branch name - // is specified, the branch's HEAD commit ID will be used. If not specified, - // the default branch's HEAD commit ID will be used. + // is specified, the branch's HEAD commit ID is used. If not specified, the + // default branch's HEAD commit ID is used. // // * For Amazon Simple Storage Service (Amazon S3): the version ID of the - // object representing the build input ZIP file to use. + // object that represents the build input ZIP file to use. // // SourceVersion is a required field SourceVersion *string `locationName:"sourceVersion" type:"string" required:"true"` @@ -4062,18 +4749,73 @@ func (s *ProjectSourceVersion) SetSourceVersion(v string) *ProjectSourceVersion return s } +// Information about S3 logs for a build project. +type S3LogsConfig struct { + _ struct{} `type:"structure"` + + // The ARN of an S3 bucket and the path prefix for S3 logs. If your Amazon S3 + // bucket name is my-bucket, and your path prefix is build-log, then acceptable + // formats are my-bucket/build-log or arn:aws:s3:::my-bucket/build-log. + Location *string `locationName:"location" type:"string"` + + // The current status of the S3 build logs. Valid values are: + // + // * ENABLED: S3 build logs are enabled for this build project. + // + // * DISABLED: S3 build logs are not enabled for this build project. + // + // Status is a required field + Status *string `locationName:"status" type:"string" required:"true" enum:"LogsConfigStatusType"` +} + +// String returns the string representation +func (s S3LogsConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s S3LogsConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *S3LogsConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "S3LogsConfig"} + if s.Status == nil { + invalidParams.Add(request.NewErrParamRequired("Status")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLocation sets the Location field's value. +func (s *S3LogsConfig) SetLocation(v string) *S3LogsConfig { + s.Location = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *S3LogsConfig) SetStatus(v string) *S3LogsConfig { + s.Status = &v + return s +} + // Information about the authorization settings for AWS CodeBuild to access // the source code to be built. // // This information is for the AWS CodeBuild console's use only. Your code should -// not get or set this information directly (unless the build project's source -// type value is BITBUCKET or GITHUB). +// not get or set this information directly. type SourceAuth struct { _ struct{} `type:"structure"` // The resource value that applies to the specified authorization type. Resource *string `locationName:"resource" type:"string"` + // This data type is deprecated and is no longer accurate or used. + // // The authorization type to use. The only valid value is OAUTH, which represents // the OAuth authorization type. // @@ -4116,6 +4858,51 @@ func (s *SourceAuth) SetType(v string) *SourceAuth { return s } +// Information about the credentials for a GitHub, GitHub Enterprise, or Bitbucket +// repository. +type SourceCredentialsInfo struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the token. + Arn *string `locationName:"arn" min:"1" type:"string"` + + // The type of authentication used by the credentials. Valid options are OAUTH, + // BASIC_AUTH, or PERSONAL_ACCESS_TOKEN. + AuthType *string `locationName:"authType" type:"string" enum:"AuthType"` + + // The type of source provider. The valid options are GITHUB, GITHUB_ENTERPRISE, + // or BITBUCKET. + ServerType *string `locationName:"serverType" type:"string" enum:"ServerType"` +} + +// String returns the string representation +func (s SourceCredentialsInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SourceCredentialsInfo) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *SourceCredentialsInfo) SetArn(v string) *SourceCredentialsInfo { + s.Arn = &v + return s +} + +// SetAuthType sets the AuthType field's value. +func (s *SourceCredentialsInfo) SetAuthType(v string) *SourceCredentialsInfo { + s.AuthType = &v + return s +} + +// SetServerType sets the ServerType field's value. +func (s *SourceCredentialsInfo) SetServerType(v string) *SourceCredentialsInfo { + s.ServerType = &v + return s +} + type StartBuildInput struct { _ struct{} `type:"structure"` @@ -4168,6 +4955,10 @@ type StartBuildInput struct { // only if the build's source is GitHub Enterprise. InsecureSslOverride *bool `locationName:"insecureSslOverride" type:"boolean"` + // Log settings for this build that override the log settings defined in the + // build project. + LogsConfigOverride *LogsConfig `locationName:"logsConfigOverride" type:"structure"` + // Enable this flag to override privileged mode in the build project. PrivilegedModeOverride *bool `locationName:"privilegedModeOverride" type:"boolean"` @@ -4176,9 +4967,12 @@ type StartBuildInput struct { // ProjectName is a required field ProjectName *string `locationName:"projectName" min:"1" type:"string" required:"true"` + // The number of minutes a build is allowed to be queued before it times out. + QueuedTimeoutInMinutesOverride *int64 `locationName:"queuedTimeoutInMinutesOverride" min:"5" type:"integer"` + // Set to true to report to your source provider the status of a build's start // and completion. If you use this option with a source provider other than - // GitHub, an invalidInputException is thrown. + // GitHub, GitHub Enterprise, or Bitbucket, an invalidInputException is thrown. ReportBuildStatusOverride *bool `locationName:"reportBuildStatusOverride" type:"boolean"` // An array of ProjectArtifacts objects. @@ -4200,16 +4994,16 @@ type StartBuildInput struct { // BitBucket or GitHub. SourceAuthOverride *SourceAuth `locationName:"sourceAuthOverride" type:"structure"` - // A location that overrides for this build the source location for the one + // A location that overrides, for this build, the source location for the one // defined in the build project. SourceLocationOverride *string `locationName:"sourceLocationOverride" type:"string"` - // A source input type for this build that overrides the source input defined - // in the build project + // A source input type, for this build, that overrides the source input defined + // in the build project. SourceTypeOverride *string `locationName:"sourceTypeOverride" type:"string" enum:"SourceType"` // A version of the build input to be built, for this build only. If not specified, - // the latest version will be used. If specified, must be one of: + // the latest version is used. If specified, must be one of: // // * For AWS CodeCommit: the commit ID to use. // @@ -4217,16 +5011,16 @@ type StartBuildInput struct { // that corresponds to the version of the source code you want to build. // If a pull request ID is specified, it must use the format pr/pull-request-ID // (for example pr/25). If a branch name is specified, the branch's HEAD - // commit ID will be used. If not specified, the default branch's HEAD commit - // ID will be used. + // commit ID is used. If not specified, the default branch's HEAD commit + // ID is used. // // * For Bitbucket: the commit ID, branch name, or tag name that corresponds // to the version of the source code you want to build. If a branch name - // is specified, the branch's HEAD commit ID will be used. If not specified, - // the default branch's HEAD commit ID will be used. + // is specified, the branch's HEAD commit ID is used. If not specified, the + // default branch's HEAD commit ID is used. // // * For Amazon Simple Storage Service (Amazon S3): the version ID of the - // object representing the build input ZIP file to use. + // object that represents the build input ZIP file to use. SourceVersion *string `locationName:"sourceVersion" type:"string"` // The number of build timeout minutes, from 5 to 480 (8 hours), that overrides, @@ -4256,6 +5050,9 @@ func (s *StartBuildInput) Validate() error { if s.ProjectName != nil && len(*s.ProjectName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ProjectName", 1)) } + if s.QueuedTimeoutInMinutesOverride != nil && *s.QueuedTimeoutInMinutesOverride < 5 { + invalidParams.Add(request.NewErrParamMinValue("QueuedTimeoutInMinutesOverride", 5)) + } if s.ServiceRoleOverride != nil && len(*s.ServiceRoleOverride) < 1 { invalidParams.Add(request.NewErrParamMinLen("ServiceRoleOverride", 1)) } @@ -4282,6 +5079,11 @@ func (s *StartBuildInput) Validate() error { } } } + if s.LogsConfigOverride != nil { + if err := s.LogsConfigOverride.Validate(); err != nil { + invalidParams.AddNested("LogsConfigOverride", err.(request.ErrInvalidParams)) + } + } if s.SecondaryArtifactsOverride != nil { for i, v := range s.SecondaryArtifactsOverride { if v == nil { @@ -4390,6 +5192,12 @@ func (s *StartBuildInput) SetInsecureSslOverride(v bool) *StartBuildInput { return s } +// SetLogsConfigOverride sets the LogsConfigOverride field's value. +func (s *StartBuildInput) SetLogsConfigOverride(v *LogsConfig) *StartBuildInput { + s.LogsConfigOverride = v + return s +} + // SetPrivilegedModeOverride sets the PrivilegedModeOverride field's value. func (s *StartBuildInput) SetPrivilegedModeOverride(v bool) *StartBuildInput { s.PrivilegedModeOverride = &v @@ -4402,6 +5210,12 @@ func (s *StartBuildInput) SetProjectName(v string) *StartBuildInput { return s } +// SetQueuedTimeoutInMinutesOverride sets the QueuedTimeoutInMinutesOverride field's value. +func (s *StartBuildInput) SetQueuedTimeoutInMinutesOverride(v int64) *StartBuildInput { + s.QueuedTimeoutInMinutesOverride = &v + return s +} + // SetReportBuildStatusOverride sets the ReportBuildStatusOverride field's value. func (s *StartBuildInput) SetReportBuildStatusOverride(v bool) *StartBuildInput { s.ReportBuildStatusOverride = &v @@ -4607,7 +5421,7 @@ type UpdateProjectInput struct { // project. Artifacts *ProjectArtifacts `locationName:"artifacts" type:"structure"` - // Set this to true to generate a publicly-accessible URL for your project's + // Set this to true to generate a publicly accessible URL for your project's // build badge. BadgeEnabled *bool `locationName:"badgeEnabled" type:"boolean"` @@ -4621,13 +5435,17 @@ type UpdateProjectInput struct { // The replacement AWS Key Management Service (AWS KMS) customer master key // (CMK) to be used for encrypting the build output artifacts. // - // You can specify either the CMK's Amazon Resource Name (ARN) or, if available, + // You can specify either the Amazon Resource Name (ARN)of the CMK or, if available, // the CMK's alias (using the format alias/alias-name). EncryptionKey *string `locationName:"encryptionKey" min:"1" type:"string"` // Information to be changed about the build environment for the build project. Environment *ProjectEnvironment `locationName:"environment" type:"structure"` + // Information about logs for the build project. A project can create logs in + // Amazon CloudWatch Logs, logs in an S3 bucket, or both. + LogsConfig *LogsConfig `locationName:"logsConfig" type:"structure"` + // The name of the build project. // // You cannot change a build project's name. @@ -4635,6 +5453,9 @@ type UpdateProjectInput struct { // Name is a required field Name *string `locationName:"name" min:"1" type:"string" required:"true"` + // The number of minutes a build is allowed to be queued before it times out. + QueuedTimeoutInMinutes *int64 `locationName:"queuedTimeoutInMinutes" min:"5" type:"integer"` + // An array of ProjectSource objects. SecondaryArtifacts []*ProjectArtifacts `locationName:"secondaryArtifacts" type:"list"` @@ -4686,6 +5507,9 @@ func (s *UpdateProjectInput) Validate() error { if s.Name != nil && len(*s.Name) < 1 { invalidParams.Add(request.NewErrParamMinLen("Name", 1)) } + if s.QueuedTimeoutInMinutes != nil && *s.QueuedTimeoutInMinutes < 5 { + invalidParams.Add(request.NewErrParamMinValue("QueuedTimeoutInMinutes", 5)) + } if s.ServiceRole != nil && len(*s.ServiceRole) < 1 { invalidParams.Add(request.NewErrParamMinLen("ServiceRole", 1)) } @@ -4707,6 +5531,11 @@ func (s *UpdateProjectInput) Validate() error { invalidParams.AddNested("Environment", err.(request.ErrInvalidParams)) } } + if s.LogsConfig != nil { + if err := s.LogsConfig.Validate(); err != nil { + invalidParams.AddNested("LogsConfig", err.(request.ErrInvalidParams)) + } + } if s.SecondaryArtifacts != nil { for i, v := range s.SecondaryArtifacts { if v == nil { @@ -4790,12 +5619,24 @@ func (s *UpdateProjectInput) SetEnvironment(v *ProjectEnvironment) *UpdateProjec return s } +// SetLogsConfig sets the LogsConfig field's value. +func (s *UpdateProjectInput) SetLogsConfig(v *LogsConfig) *UpdateProjectInput { + s.LogsConfig = v + return s +} + // SetName sets the Name field's value. func (s *UpdateProjectInput) SetName(v string) *UpdateProjectInput { s.Name = &v return s } +// SetQueuedTimeoutInMinutes sets the QueuedTimeoutInMinutes field's value. +func (s *UpdateProjectInput) SetQueuedTimeoutInMinutes(v int64) *UpdateProjectInput { + s.QueuedTimeoutInMinutes = &v + return s +} + // SetSecondaryArtifacts sets the SecondaryArtifacts field's value. func (s *UpdateProjectInput) SetSecondaryArtifacts(v []*ProjectArtifacts) *UpdateProjectInput { s.SecondaryArtifacts = v @@ -4864,10 +5705,10 @@ func (s *UpdateProjectOutput) SetProject(v *Project) *UpdateProjectOutput { type UpdateWebhookInput struct { _ struct{} `type:"structure"` - // A regular expression used to determine which branches in a repository are - // built when a webhook is triggered. If the name of a branch matches the regular - // expression, then it is built. If it doesn't match, then it is not. If branchFilter - // is empty, then all branches are built. + // A regular expression used to determine which repository branches are built + // when a webhook is triggered. If the name of a branch matches the regular + // expression, then it is built. If branchFilter is empty, then all branches + // are built. BranchFilter *string `locationName:"branchFilter" type:"string"` // The name of the AWS CodeBuild project. @@ -4875,8 +5716,9 @@ type UpdateWebhookInput struct { // ProjectName is a required field ProjectName *string `locationName:"projectName" min:"2" type:"string" required:"true"` - // A boolean value that specifies whether the associated repository's secret - // token should be updated. + // A boolean value that specifies whether the associated GitHub repository's + // secret token should be updated. If you use Bitbucket for your repository, + // rotateSecret is ignored. RotateSecret *bool `locationName:"rotateSecret" type:"boolean"` } @@ -4948,7 +5790,7 @@ func (s *UpdateWebhookOutput) SetWebhook(v *Webhook) *UpdateWebhookOutput { return s } -// Information about the VPC configuration that AWS CodeBuild will access. +// Information about the VPC configuration that AWS CodeBuild accesses. type VpcConfig struct { _ struct{} `type:"structure"` @@ -5003,24 +5845,27 @@ func (s *VpcConfig) SetVpcId(v string) *VpcConfig { return s } -// Information about a webhook in GitHub that connects repository events to -// a build project in AWS CodeBuild. +// Information about a webhook that connects repository events to a build project +// in AWS CodeBuild. type Webhook struct { _ struct{} `type:"structure"` - // A regular expression used to determine which branches in a repository are - // built when a webhook is triggered. If the name of a branch matches the regular - // expression, then it is built. If it doesn't match, then it is not. If branchFilter - // is empty, then all branches are built. + // A regular expression used to determine which repository branches are built + // when a webhook is triggered. If the name of a branch matches the regular + // expression, then it is built. If branchFilter is empty, then all branches + // are built. BranchFilter *string `locationName:"branchFilter" type:"string"` - // A timestamp indicating the last time a repository's secret token was modified. + // A timestamp that indicates the last time a repository's secret token was + // modified. LastModifiedSecret *time.Time `locationName:"lastModifiedSecret" type:"timestamp"` - // The CodeBuild endpoint where webhook events are sent. + // The AWS CodeBuild endpoint where webhook events are sent. PayloadUrl *string `locationName:"payloadUrl" min:"1" type:"string"` // The secret token of the associated repository. + // + // A Bitbucket webhook does not support secret. Secret *string `locationName:"secret" min:"1" type:"string"` // The URL to the webhook. @@ -5094,10 +5939,24 @@ const ( ArtifactsTypeNoArtifacts = "NO_ARTIFACTS" ) +const ( + // AuthTypeOauth is a AuthType enum value + AuthTypeOauth = "OAUTH" + + // AuthTypeBasicAuth is a AuthType enum value + AuthTypeBasicAuth = "BASIC_AUTH" + + // AuthTypePersonalAccessToken is a AuthType enum value + AuthTypePersonalAccessToken = "PERSONAL_ACCESS_TOKEN" +) + const ( // BuildPhaseTypeSubmitted is a BuildPhaseType enum value BuildPhaseTypeSubmitted = "SUBMITTED" + // BuildPhaseTypeQueued is a BuildPhaseType enum value + BuildPhaseTypeQueued = "QUEUED" + // BuildPhaseTypeProvisioning is a BuildPhaseType enum value BuildPhaseTypeProvisioning = "PROVISIONING" @@ -5188,6 +6047,17 @@ const ( // LanguageTypeBase is a LanguageType enum value LanguageTypeBase = "BASE" + + // LanguageTypePhp is a LanguageType enum value + LanguageTypePhp = "PHP" +) + +const ( + // LogsConfigStatusTypeEnabled is a LogsConfigStatusType enum value + LogsConfigStatusTypeEnabled = "ENABLED" + + // LogsConfigStatusTypeDisabled is a LogsConfigStatusType enum value + LogsConfigStatusTypeDisabled = "DISABLED" ) const ( @@ -5215,6 +6085,17 @@ const ( ProjectSortByTypeLastModifiedTime = "LAST_MODIFIED_TIME" ) +const ( + // ServerTypeGithub is a ServerType enum value + ServerTypeGithub = "GITHUB" + + // ServerTypeBitbucket is a ServerType enum value + ServerTypeBitbucket = "BITBUCKET" + + // ServerTypeGithubEnterprise is a ServerType enum value + ServerTypeGithubEnterprise = "GITHUB_ENTERPRISE" +) + const ( // SortOrderTypeAscending is a SortOrderType enum value SortOrderTypeAscending = "ASCENDING" diff --git a/vendor/github.com/aws/aws-sdk-go/service/codebuild/doc.go b/vendor/github.com/aws/aws-sdk-go/service/codebuild/doc.go index 91c473e1df..ac6bf62871 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codebuild/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codebuild/doc.go @@ -10,7 +10,7 @@ // for the most popular programming languages and build tools, such as Apache // Maven, Gradle, and more. You can also fully customize build environments // in AWS CodeBuild to use your own build tools. AWS CodeBuild scales automatically -// to meet peak build requests, and you pay only for the build time you consume. +// to meet peak build requests. You pay only for the build time you consume. // For more information about AWS CodeBuild, see the AWS CodeBuild User Guide. // // AWS CodeBuild supports these operations: @@ -18,19 +18,18 @@ // * BatchDeleteBuilds: Deletes one or more builds. // // * BatchGetProjects: Gets information about one or more build projects. -// A build project defines how AWS CodeBuild will run a build. This includes +// A build project defines how AWS CodeBuild runs a build. This includes // information such as where to get the source code to build, the build environment // to use, the build commands to run, and where to store the build output. -// A build environment represents a combination of operating system, programming -// language runtime, and tools that AWS CodeBuild will use to run a build. -// Also, you can add tags to build projects to help manage your resources -// and costs. +// A build environment is a representation of operating system, programming +// language runtime, and tools that AWS CodeBuild uses to run a build. You +// can add tags to build projects to help manage your resources and costs. // // * CreateProject: Creates a build project. // // * CreateWebhook: For an existing AWS CodeBuild build project that has -// its source code stored in a GitHub repository, enables AWS CodeBuild to -// begin automatically rebuilding the source code every time a code change +// its source code stored in a GitHub or Bitbucket repository, enables AWS +// CodeBuild to start rebuilding the source code every time a code change // is pushed to the repository. // // * UpdateWebhook: Changes the settings of an existing webhook. @@ -38,9 +37,9 @@ // * DeleteProject: Deletes a build project. // // * DeleteWebhook: For an existing AWS CodeBuild build project that has -// its source code stored in a GitHub repository, stops AWS CodeBuild from -// automatically rebuilding the source code every time a code change is pushed -// to the repository. +// its source code stored in a GitHub or Bitbucket repository, stops AWS +// CodeBuild from rebuilding the source code every time a code change is +// pushed to the repository. // // * ListProjects: Gets a list of build project names, with each build project // name representing a single build project. @@ -62,6 +61,17 @@ // * ListCuratedEnvironmentImages: Gets information about Docker images that // are managed by AWS CodeBuild. // +// * DeleteSourceCredentials: Deletes a set of GitHub, GitHub Enterprise, +// or Bitbucket source credentials. +// +// * ImportSourceCredentials: Imports the source repository credentials for +// an AWS CodeBuild project that has its source code stored in a GitHub, +// GitHub Enterprise, or Bitbucket repository. +// +// * ListSourceCredentials: Returns a list of SourceCredentialsInfo objects. +// Each SourceCredentialsInfo object includes the authentication type, token +// ARN, and type of source provider for one set of credentials. +// // See https://docs.aws.amazon.com/goto/WebAPI/codebuild-2016-10-06 for more information on this service. // // See codebuild package documentation for more information. diff --git a/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go b/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go index fbddd18d67..2f8d260bd0 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codecommit/api.go @@ -18,7 +18,7 @@ const opBatchGetRepositories = "BatchGetRepositories" // BatchGetRepositoriesRequest generates a "aws/request.Request" representing the // client's request for the BatchGetRepositories operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -129,7 +129,7 @@ const opCreateBranch = "CreateBranch" // CreateBranchRequest generates a "aws/request.Request" representing the // client's request for the CreateBranch operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -163,8 +163,7 @@ func (c *CodeCommit) CreateBranchRequest(input *CreateBranchInput) (req *request output = &CreateBranchOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -257,7 +256,7 @@ const opCreatePullRequest = "CreatePullRequest" // CreatePullRequestRequest generates a "aws/request.Request" representing the // client's request for the CreatePullRequest operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -434,7 +433,7 @@ const opCreateRepository = "CreateRepository" // CreateRepositoryRequest generates a "aws/request.Request" representing the // client's request for the CreateRepository operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -544,7 +543,7 @@ const opDeleteBranch = "DeleteBranch" // DeleteBranchRequest generates a "aws/request.Request" representing the // client's request for the DeleteBranch operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -660,7 +659,7 @@ const opDeleteCommentContent = "DeleteCommentContent" // DeleteCommentContentRequest generates a "aws/request.Request" representing the // client's request for the DeleteCommentContent operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -746,12 +745,174 @@ func (c *CodeCommit) DeleteCommentContentWithContext(ctx aws.Context, input *Del return out, req.Send() } +const opDeleteFile = "DeleteFile" + +// DeleteFileRequest generates a "aws/request.Request" representing the +// client's request for the DeleteFile 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 DeleteFile for more information on using the DeleteFile +// 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 DeleteFileRequest method. +// req, resp := client.DeleteFileRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/DeleteFile +func (c *CodeCommit) DeleteFileRequest(input *DeleteFileInput) (req *request.Request, output *DeleteFileOutput) { + op := &request.Operation{ + Name: opDeleteFile, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteFileInput{} + } + + output = &DeleteFileOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteFile API operation for AWS CodeCommit. +// +// Deletes a specified file from a specified branch. A commit is created on +// the branch that contains the revision. The file will still exist in the commits +// prior to the commit that contains the deletion. +// +// 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 CodeCommit's +// API operation DeleteFile for usage and error information. +// +// Returned Error Codes: +// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" +// A repository name is required but was not specified. +// +// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" +// At least one specified repository name is not valid. +// +// This exception only occurs when a specified repository name is not valid. +// Other exceptions occur when a required repository parameter is missing, or +// when a specified repository does not exist. +// +// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" +// The specified repository does not exist. +// +// * ErrCodeParentCommitIdRequiredException "ParentCommitIdRequiredException" +// A parent commit ID is required. To view the full commit ID of a branch in +// a repository, use GetBranch or a Git command (for example, git pull or git +// log). +// +// * ErrCodeInvalidParentCommitIdException "InvalidParentCommitIdException" +// The parent commit ID is not valid. The commit ID cannot be empty, and must +// match the head commit ID for the branch of the repository where you want +// to add or update a file. +// +// * ErrCodeParentCommitDoesNotExistException "ParentCommitDoesNotExistException" +// The parent commit ID is not valid because it does not exist. The specified +// parent commit ID does not exist in the specified branch of the repository. +// +// * ErrCodeParentCommitIdOutdatedException "ParentCommitIdOutdatedException" +// The file could not be added because the provided parent commit ID is not +// the current tip of the specified branch. To view the full commit ID of the +// current head of the branch, use GetBranch. +// +// * ErrCodePathRequiredException "PathRequiredException" +// The folderPath for a location cannot be null. +// +// * ErrCodeInvalidPathException "InvalidPathException" +// The specified path is not valid. +// +// * ErrCodeFileDoesNotExistException "FileDoesNotExistException" +// The specified file does not exist. Verify that you have provided the correct +// name of the file, including its full path and extension. +// +// * ErrCodeBranchNameRequiredException "BranchNameRequiredException" +// A branch name is required but was not specified. +// +// * ErrCodeInvalidBranchNameException "InvalidBranchNameException" +// The specified reference name is not valid. +// +// * ErrCodeBranchDoesNotExistException "BranchDoesNotExistException" +// The specified branch does not exist. +// +// * ErrCodeBranchNameIsTagNameException "BranchNameIsTagNameException" +// The specified branch name is not valid because it is a tag name. Type the +// name of a current branch in the repository. For a list of valid branch names, +// use ListBranches. +// +// * ErrCodeNameLengthExceededException "NameLengthExceededException" +// The user name is not valid because it has exceeded the character limit for +// file names. File names, including the path to the file, cannot exceed the +// character limit. +// +// * ErrCodeInvalidEmailException "InvalidEmailException" +// The specified email address either contains one or more characters that are +// not allowed, or it exceeds the maximum number of characters allowed for an +// email address. +// +// * ErrCodeCommitMessageLengthExceededException "CommitMessageLengthExceededException" +// The commit message is too long. Provide a shorter string. +// +// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" +// An encryption integrity check failed. +// +// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" +// An encryption key could not be accessed. +// +// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" +// The encryption key is disabled. +// +// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" +// No encryption key was found. +// +// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" +// The encryption key is not available. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/DeleteFile +func (c *CodeCommit) DeleteFile(input *DeleteFileInput) (*DeleteFileOutput, error) { + req, out := c.DeleteFileRequest(input) + return out, req.Send() +} + +// DeleteFileWithContext is the same as DeleteFile with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteFile 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 *CodeCommit) DeleteFileWithContext(ctx aws.Context, input *DeleteFileInput, opts ...request.Option) (*DeleteFileOutput, error) { + req, out := c.DeleteFileRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteRepository = "DeleteRepository" // DeleteRepositoryRequest generates a "aws/request.Request" representing the // client's request for the DeleteRepository operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -857,7 +1018,7 @@ const opDescribePullRequestEvents = "DescribePullRequestEvents" // DescribePullRequestEventsRequest generates a "aws/request.Request" representing the // client's request for the DescribePullRequestEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1033,7 +1194,7 @@ const opGetBlob = "GetBlob" // GetBlobRequest generates a "aws/request.Request" representing the // client's request for the GetBlob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1151,7 +1312,7 @@ const opGetBranch = "GetBranch" // GetBranchRequest generates a "aws/request.Request" representing the // client's request for the GetBranch operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1265,7 +1426,7 @@ const opGetComment = "GetComment" // GetCommentRequest generates a "aws/request.Request" representing the // client's request for the GetComment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1356,7 +1517,7 @@ const opGetCommentsForComparedCommit = "GetCommentsForComparedCommit" // GetCommentsForComparedCommitRequest generates a "aws/request.Request" representing the // client's request for the GetCommentsForComparedCommit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1532,7 +1693,7 @@ const opGetCommentsForPullRequest = "GetCommentsForPullRequest" // GetCommentsForPullRequestRequest generates a "aws/request.Request" representing the // client's request for the GetCommentsForPullRequest operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1725,7 +1886,7 @@ const opGetCommit = "GetCommit" // GetCommitRequest generates a "aws/request.Request" representing the // client's request for the GetCommit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1839,7 +2000,7 @@ const opGetDifferences = "GetDifferences" // GetDifferencesRequest generates a "aws/request.Request" representing the // client's request for the GetDifferences operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2021,59 +2182,58 @@ func (c *CodeCommit) GetDifferencesPagesWithContext(ctx aws.Context, input *GetD return p.Err() } -const opGetMergeConflicts = "GetMergeConflicts" +const opGetFile = "GetFile" -// GetMergeConflictsRequest generates a "aws/request.Request" representing the -// client's request for the GetMergeConflicts operation. The "output" return +// GetFileRequest generates a "aws/request.Request" representing the +// client's request for the GetFile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetMergeConflicts for more information on using the GetMergeConflicts +// See GetFile for more information on using the GetFile // 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 GetMergeConflictsRequest method. -// req, resp := client.GetMergeConflictsRequest(params) +// // Example sending a request using the GetFileRequest method. +// req, resp := client.GetFileRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetMergeConflicts -func (c *CodeCommit) GetMergeConflictsRequest(input *GetMergeConflictsInput) (req *request.Request, output *GetMergeConflictsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetFile +func (c *CodeCommit) GetFileRequest(input *GetFileInput) (req *request.Request, output *GetFileOutput) { op := &request.Operation{ - Name: opGetMergeConflicts, + Name: opGetFile, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetMergeConflictsInput{} + input = &GetFileInput{} } - output = &GetMergeConflictsOutput{} + output = &GetFileOutput{} req = c.newRequest(op, input, output) return } -// GetMergeConflicts API operation for AWS CodeCommit. +// GetFile API operation for AWS CodeCommit. // -// Returns information about merge conflicts between the before and after commit -// IDs for a pull request in a repository. +// Returns the base-64 encoded contents of a specified file and its metadata. // // 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 CodeCommit's -// API operation GetMergeConflicts for usage and error information. +// API operation GetFile for usage and error information. // // Returned Error Codes: // * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" @@ -2089,34 +2249,22 @@ func (c *CodeCommit) GetMergeConflictsRequest(input *GetMergeConflictsInput) (re // * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" // The specified repository does not exist. // -// * ErrCodeMergeOptionRequiredException "MergeOptionRequiredException" -// A merge option or stategy is required, and none was provided. -// -// * ErrCodeInvalidMergeOptionException "InvalidMergeOptionException" -// The specified merge option is not valid. The only valid value is FAST_FORWARD_MERGE. -// -// * ErrCodeInvalidDestinationCommitSpecifierException "InvalidDestinationCommitSpecifierException" -// The destination commit specifier is not valid. You must provide a valid branch -// name, tag, or full commit ID. -// -// * ErrCodeInvalidSourceCommitSpecifierException "InvalidSourceCommitSpecifierException" -// The source commit specifier is not valid. You must provide a valid branch -// name, tag, or full commit ID. -// -// * ErrCodeCommitRequiredException "CommitRequiredException" -// A commit was not specified. +// * ErrCodeInvalidCommitException "InvalidCommitException" +// The specified commit is not valid. // // * ErrCodeCommitDoesNotExistException "CommitDoesNotExistException" // The specified commit does not exist or no commit was specified, and the specified // repository has no default branch. // -// * ErrCodeInvalidCommitException "InvalidCommitException" -// The specified commit is not valid. +// * ErrCodePathRequiredException "PathRequiredException" +// The folderPath for a location cannot be null. // -// * ErrCodeTipsDivergenceExceededException "TipsDivergenceExceededException" -// The divergence between the tips of the provided commit specifiers is too -// great to determine whether there might be any merge conflicts. Locally compare -// the specifiers using git diff or a diff tool. +// * ErrCodeInvalidPathException "InvalidPathException" +// The specified path is not valid. +// +// * ErrCodeFileDoesNotExistException "FileDoesNotExistException" +// The specified file does not exist. Verify that you have provided the correct +// name of the file, including its full path and extension. // // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" // An encryption integrity check failed. @@ -2133,93 +2281,116 @@ func (c *CodeCommit) GetMergeConflictsRequest(input *GetMergeConflictsInput) (re // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" // The encryption key is not available. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetMergeConflicts -func (c *CodeCommit) GetMergeConflicts(input *GetMergeConflictsInput) (*GetMergeConflictsOutput, error) { - req, out := c.GetMergeConflictsRequest(input) +// * ErrCodeFileTooLargeException "FileTooLargeException" +// The specified file exceeds the file size limit for AWS CodeCommit. For more +// information about limits in AWS CodeCommit, see AWS CodeCommit User Guide +// (http://docs.aws.amazon.com/codecommit/latest/userguide/limits.html). +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetFile +func (c *CodeCommit) GetFile(input *GetFileInput) (*GetFileOutput, error) { + req, out := c.GetFileRequest(input) return out, req.Send() } -// GetMergeConflictsWithContext is the same as GetMergeConflicts with the addition of +// GetFileWithContext is the same as GetFile with the addition of // the ability to pass a context and additional request options. // -// See GetMergeConflicts for details on how to use this API operation. +// See GetFile 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 *CodeCommit) GetMergeConflictsWithContext(ctx aws.Context, input *GetMergeConflictsInput, opts ...request.Option) (*GetMergeConflictsOutput, error) { - req, out := c.GetMergeConflictsRequest(input) +func (c *CodeCommit) GetFileWithContext(ctx aws.Context, input *GetFileInput, opts ...request.Option) (*GetFileOutput, error) { + req, out := c.GetFileRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetPullRequest = "GetPullRequest" +const opGetFolder = "GetFolder" -// GetPullRequestRequest generates a "aws/request.Request" representing the -// client's request for the GetPullRequest operation. The "output" return +// GetFolderRequest generates a "aws/request.Request" representing the +// client's request for the GetFolder operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetPullRequest for more information on using the GetPullRequest +// See GetFolder for more information on using the GetFolder // 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 GetPullRequestRequest method. -// req, resp := client.GetPullRequestRequest(params) +// // Example sending a request using the GetFolderRequest method. +// req, resp := client.GetFolderRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetPullRequest -func (c *CodeCommit) GetPullRequestRequest(input *GetPullRequestInput) (req *request.Request, output *GetPullRequestOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetFolder +func (c *CodeCommit) GetFolderRequest(input *GetFolderInput) (req *request.Request, output *GetFolderOutput) { op := &request.Operation{ - Name: opGetPullRequest, + Name: opGetFolder, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetPullRequestInput{} + input = &GetFolderInput{} } - output = &GetPullRequestOutput{} + output = &GetFolderOutput{} req = c.newRequest(op, input, output) return } -// GetPullRequest API operation for AWS CodeCommit. +// GetFolder API operation for AWS CodeCommit. // -// Gets information about a pull request in a specified repository. +// Returns the contents of a specified folder in a repository. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for AWS CodeCommit's -// API operation GetPullRequest for usage and error information. +// API operation GetFolder for usage and error information. // // Returned Error Codes: -// * ErrCodePullRequestDoesNotExistException "PullRequestDoesNotExistException" -// The pull request ID could not be found. Make sure that you have specified -// the correct repository name and pull request ID, and then try again. +// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" +// A repository name is required but was not specified. // -// * ErrCodeInvalidPullRequestIdException "InvalidPullRequestIdException" -// The pull request ID is not valid. Make sure that you have provided the full -// ID and that the pull request is in the specified repository, and then try -// again. +// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" +// At least one specified repository name is not valid. // -// * ErrCodePullRequestIdRequiredException "PullRequestIdRequiredException" -// A pull request ID is required, but none was provided. +// This exception only occurs when a specified repository name is not valid. +// Other exceptions occur when a required repository parameter is missing, or +// when a specified repository does not exist. +// +// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" +// The specified repository does not exist. +// +// * ErrCodeInvalidCommitException "InvalidCommitException" +// The specified commit is not valid. +// +// * ErrCodeCommitDoesNotExistException "CommitDoesNotExistException" +// The specified commit does not exist or no commit was specified, and the specified +// repository has no default branch. +// +// * ErrCodePathRequiredException "PathRequiredException" +// The folderPath for a location cannot be null. +// +// * ErrCodeInvalidPathException "InvalidPathException" +// The specified path is not valid. +// +// * ErrCodeFolderDoesNotExistException "FolderDoesNotExistException" +// The specified folder does not exist. Either the folder name is not correct, +// or you did not provide the full path to the folder. // // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" // An encryption integrity check failed. @@ -2236,57 +2407,294 @@ func (c *CodeCommit) GetPullRequestRequest(input *GetPullRequestInput) (req *req // * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" // The encryption key is not available. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetPullRequest -func (c *CodeCommit) GetPullRequest(input *GetPullRequestInput) (*GetPullRequestOutput, error) { - req, out := c.GetPullRequestRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetFolder +func (c *CodeCommit) GetFolder(input *GetFolderInput) (*GetFolderOutput, error) { + req, out := c.GetFolderRequest(input) return out, req.Send() } -// GetPullRequestWithContext is the same as GetPullRequest with the addition of +// GetFolderWithContext is the same as GetFolder with the addition of // the ability to pass a context and additional request options. // -// See GetPullRequest for details on how to use this API operation. +// See GetFolder 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 *CodeCommit) GetPullRequestWithContext(ctx aws.Context, input *GetPullRequestInput, opts ...request.Option) (*GetPullRequestOutput, error) { - req, out := c.GetPullRequestRequest(input) +func (c *CodeCommit) GetFolderWithContext(ctx aws.Context, input *GetFolderInput, opts ...request.Option) (*GetFolderOutput, error) { + req, out := c.GetFolderRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetRepository = "GetRepository" +const opGetMergeConflicts = "GetMergeConflicts" -// GetRepositoryRequest generates a "aws/request.Request" representing the -// client's request for the GetRepository operation. The "output" return +// GetMergeConflictsRequest generates a "aws/request.Request" representing the +// client's request for the GetMergeConflicts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetRepository for more information on using the GetRepository +// See GetMergeConflicts for more information on using the GetMergeConflicts // 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 GetRepositoryRequest method. -// req, resp := client.GetRepositoryRequest(params) +// // Example sending a request using the GetMergeConflictsRequest method. +// req, resp := client.GetMergeConflictsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetRepository -func (c *CodeCommit) GetRepositoryRequest(input *GetRepositoryInput) (req *request.Request, output *GetRepositoryOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetMergeConflicts +func (c *CodeCommit) GetMergeConflictsRequest(input *GetMergeConflictsInput) (req *request.Request, output *GetMergeConflictsOutput) { op := &request.Operation{ - Name: opGetRepository, + Name: opGetMergeConflicts, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetMergeConflictsInput{} + } + + output = &GetMergeConflictsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetMergeConflicts API operation for AWS CodeCommit. +// +// Returns information about merge conflicts between the before and after commit +// IDs for a pull request in a repository. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS CodeCommit's +// API operation GetMergeConflicts for usage and error information. +// +// Returned Error Codes: +// * ErrCodeRepositoryNameRequiredException "RepositoryNameRequiredException" +// A repository name is required but was not specified. +// +// * ErrCodeInvalidRepositoryNameException "InvalidRepositoryNameException" +// At least one specified repository name is not valid. +// +// This exception only occurs when a specified repository name is not valid. +// Other exceptions occur when a required repository parameter is missing, or +// when a specified repository does not exist. +// +// * ErrCodeRepositoryDoesNotExistException "RepositoryDoesNotExistException" +// The specified repository does not exist. +// +// * ErrCodeMergeOptionRequiredException "MergeOptionRequiredException" +// A merge option or stategy is required, and none was provided. +// +// * ErrCodeInvalidMergeOptionException "InvalidMergeOptionException" +// The specified merge option is not valid. The only valid value is FAST_FORWARD_MERGE. +// +// * ErrCodeInvalidDestinationCommitSpecifierException "InvalidDestinationCommitSpecifierException" +// The destination commit specifier is not valid. You must provide a valid branch +// name, tag, or full commit ID. +// +// * ErrCodeInvalidSourceCommitSpecifierException "InvalidSourceCommitSpecifierException" +// The source commit specifier is not valid. You must provide a valid branch +// name, tag, or full commit ID. +// +// * ErrCodeCommitRequiredException "CommitRequiredException" +// A commit was not specified. +// +// * ErrCodeCommitDoesNotExistException "CommitDoesNotExistException" +// The specified commit does not exist or no commit was specified, and the specified +// repository has no default branch. +// +// * ErrCodeInvalidCommitException "InvalidCommitException" +// The specified commit is not valid. +// +// * ErrCodeTipsDivergenceExceededException "TipsDivergenceExceededException" +// The divergence between the tips of the provided commit specifiers is too +// great to determine whether there might be any merge conflicts. Locally compare +// the specifiers using git diff or a diff tool. +// +// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" +// An encryption integrity check failed. +// +// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" +// An encryption key could not be accessed. +// +// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" +// The encryption key is disabled. +// +// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" +// No encryption key was found. +// +// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" +// The encryption key is not available. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetMergeConflicts +func (c *CodeCommit) GetMergeConflicts(input *GetMergeConflictsInput) (*GetMergeConflictsOutput, error) { + req, out := c.GetMergeConflictsRequest(input) + return out, req.Send() +} + +// GetMergeConflictsWithContext is the same as GetMergeConflicts with the addition of +// the ability to pass a context and additional request options. +// +// See GetMergeConflicts 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 *CodeCommit) GetMergeConflictsWithContext(ctx aws.Context, input *GetMergeConflictsInput, opts ...request.Option) (*GetMergeConflictsOutput, error) { + req, out := c.GetMergeConflictsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetPullRequest = "GetPullRequest" + +// GetPullRequestRequest generates a "aws/request.Request" representing the +// client's request for the GetPullRequest 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 GetPullRequest for more information on using the GetPullRequest +// 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 GetPullRequestRequest method. +// req, resp := client.GetPullRequestRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetPullRequest +func (c *CodeCommit) GetPullRequestRequest(input *GetPullRequestInput) (req *request.Request, output *GetPullRequestOutput) { + op := &request.Operation{ + Name: opGetPullRequest, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetPullRequestInput{} + } + + output = &GetPullRequestOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetPullRequest API operation for AWS CodeCommit. +// +// Gets information about a pull request in a specified repository. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS CodeCommit's +// API operation GetPullRequest for usage and error information. +// +// Returned Error Codes: +// * ErrCodePullRequestDoesNotExistException "PullRequestDoesNotExistException" +// The pull request ID could not be found. Make sure that you have specified +// the correct repository name and pull request ID, and then try again. +// +// * ErrCodeInvalidPullRequestIdException "InvalidPullRequestIdException" +// The pull request ID is not valid. Make sure that you have provided the full +// ID and that the pull request is in the specified repository, and then try +// again. +// +// * ErrCodePullRequestIdRequiredException "PullRequestIdRequiredException" +// A pull request ID is required, but none was provided. +// +// * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" +// An encryption integrity check failed. +// +// * ErrCodeEncryptionKeyAccessDeniedException "EncryptionKeyAccessDeniedException" +// An encryption key could not be accessed. +// +// * ErrCodeEncryptionKeyDisabledException "EncryptionKeyDisabledException" +// The encryption key is disabled. +// +// * ErrCodeEncryptionKeyNotFoundException "EncryptionKeyNotFoundException" +// No encryption key was found. +// +// * ErrCodeEncryptionKeyUnavailableException "EncryptionKeyUnavailableException" +// The encryption key is not available. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetPullRequest +func (c *CodeCommit) GetPullRequest(input *GetPullRequestInput) (*GetPullRequestOutput, error) { + req, out := c.GetPullRequestRequest(input) + return out, req.Send() +} + +// GetPullRequestWithContext is the same as GetPullRequest with the addition of +// the ability to pass a context and additional request options. +// +// See GetPullRequest 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 *CodeCommit) GetPullRequestWithContext(ctx aws.Context, input *GetPullRequestInput, opts ...request.Option) (*GetPullRequestOutput, error) { + req, out := c.GetPullRequestRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetRepository = "GetRepository" + +// GetRepositoryRequest generates a "aws/request.Request" representing the +// client's request for the GetRepository 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 GetRepository for more information on using the GetRepository +// 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 GetRepositoryRequest method. +// req, resp := client.GetRepositoryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/GetRepository +func (c *CodeCommit) GetRepositoryRequest(input *GetRepositoryInput) (req *request.Request, output *GetRepositoryOutput) { + op := &request.Operation{ + Name: opGetRepository, HTTPMethod: "POST", HTTPPath: "/", } @@ -2373,7 +2781,7 @@ const opGetRepositoryTriggers = "GetRepositoryTriggers" // GetRepositoryTriggersRequest generates a "aws/request.Request" representing the // client's request for the GetRepositoryTriggers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2477,7 +2885,7 @@ const opListBranches = "ListBranches" // ListBranchesRequest generates a "aws/request.Request" representing the // client's request for the ListBranches operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2640,7 +3048,7 @@ const opListPullRequests = "ListPullRequests" // ListPullRequestsRequest generates a "aws/request.Request" representing the // client's request for the ListPullRequests operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2818,7 +3226,7 @@ const opListRepositories = "ListRepositories" // ListRepositoriesRequest generates a "aws/request.Request" representing the // client's request for the ListRepositories operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2959,7 +3367,7 @@ const opMergePullRequestByFastForward = "MergePullRequestByFastForward" // MergePullRequestByFastForwardRequest generates a "aws/request.Request" representing the // client's request for the MergePullRequestByFastForward operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3095,7 +3503,7 @@ const opPostCommentForComparedCommit = "PostCommentForComparedCommit" // PostCommentForComparedCommitRequest generates a "aws/request.Request" representing the // client's request for the PostCommentForComparedCommit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3187,7 +3595,7 @@ func (c *CodeCommit) PostCommentForComparedCommitRequest(input *PostCommentForCo // is not valid in respect to the current file version. // // * ErrCodePathRequiredException "PathRequiredException" -// The filePath for a location cannot be empty or null. +// The folderPath for a location cannot be null. // // * ErrCodeInvalidFilePositionException "InvalidFilePositionException" // The position is not valid. Make sure that the line number exists in the version @@ -3255,7 +3663,7 @@ const opPostCommentForPullRequest = "PostCommentForPullRequest" // PostCommentForPullRequestRequest generates a "aws/request.Request" representing the // client's request for the PostCommentForPullRequest operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3364,7 +3772,7 @@ func (c *CodeCommit) PostCommentForPullRequestRequest(input *PostCommentForPullR // is not valid in respect to the current file version. // // * ErrCodePathRequiredException "PathRequiredException" -// The filePath for a location cannot be empty or null. +// The folderPath for a location cannot be null. // // * ErrCodeInvalidFilePositionException "InvalidFilePositionException" // The position is not valid. Make sure that the line number exists in the version @@ -3402,7 +3810,7 @@ func (c *CodeCommit) PostCommentForPullRequestRequest(input *PostCommentForPullR // The specified path does not exist. // // * ErrCodePathRequiredException "PathRequiredException" -// The filePath for a location cannot be empty or null. +// The folderPath for a location cannot be null. // // * ErrCodeBeforeCommitIdAndAfterCommitIdAreSameException "BeforeCommitIdAndAfterCommitIdAreSameException" // The before commit ID and the after commit ID are the same, which is not valid. @@ -3435,7 +3843,7 @@ const opPostCommentReply = "PostCommentReply" // PostCommentReplyRequest generates a "aws/request.Request" representing the // client's request for the PostCommentReply operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3544,7 +3952,7 @@ const opPutFile = "PutFile" // PutFileRequest generates a "aws/request.Request" representing the // client's request for the PutFile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3618,8 +4026,8 @@ func (c *CodeCommit) PutFileRequest(input *PutFileInput) (req *request.Request, // to add or update a file. // // * ErrCodeParentCommitDoesNotExistException "ParentCommitDoesNotExistException" -// The parent commit ID is not valid. The specified parent commit ID does not -// exist in the specified branch of the repository. +// The parent commit ID is not valid because it does not exist. The specified +// parent commit ID does not exist in the specified branch of the repository. // // * ErrCodeParentCommitIdOutdatedException "ParentCommitIdOutdatedException" // The file could not be added because the provided parent commit ID is not @@ -3636,7 +4044,7 @@ func (c *CodeCommit) PutFileRequest(input *PutFileInput) (req *request.Request, // than 2 GB, add them using a Git client. // // * ErrCodePathRequiredException "PathRequiredException" -// The filePath for a location cannot be empty or null. +// The folderPath for a location cannot be null. // // * ErrCodeInvalidPathException "InvalidPathException" // The specified path is not valid. @@ -3660,7 +4068,7 @@ func (c *CodeCommit) PutFileRequest(input *PutFileInput) (req *request.Request, // mode permissions, see PutFile. // // * ErrCodeNameLengthExceededException "NameLengthExceededException" -// The file name is not valid because it has exceeded the character limit for +// The user name is not valid because it has exceeded the character limit for // file names. File names, including the path to the file, cannot exceed the // character limit. // @@ -3672,6 +4080,9 @@ func (c *CodeCommit) PutFileRequest(input *PutFileInput) (req *request.Request, // * ErrCodeCommitMessageLengthExceededException "CommitMessageLengthExceededException" // The commit message is too long. Provide a shorter string. // +// * ErrCodeInvalidDeletionParameterException "InvalidDeletionParameterException" +// The specified deletion parameter is not valid. +// // * ErrCodeEncryptionIntegrityChecksFailedException "EncryptionIntegrityChecksFailedException" // An encryption integrity check failed. // @@ -3731,7 +4142,7 @@ const opPutRepositoryTriggers = "PutRepositoryTriggers" // PutRepositoryTriggersRequest generates a "aws/request.Request" representing the // client's request for the PutRepositoryTriggers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3881,7 +4292,7 @@ const opTestRepositoryTriggers = "TestRepositoryTriggers" // TestRepositoryTriggersRequest generates a "aws/request.Request" representing the // client's request for the TestRepositoryTriggers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4033,7 +4444,7 @@ const opUpdateComment = "UpdateComment" // UpdateCommentRequest generates a "aws/request.Request" representing the // client's request for the UpdateComment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4135,7 +4546,7 @@ const opUpdateDefaultBranch = "UpdateDefaultBranch" // UpdateDefaultBranchRequest generates a "aws/request.Request" representing the // client's request for the UpdateDefaultBranch operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4169,8 +4580,7 @@ func (c *CodeCommit) UpdateDefaultBranchRequest(input *UpdateDefaultBranchInput) output = &UpdateDefaultBranchOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4254,7 +4664,7 @@ const opUpdatePullRequestDescription = "UpdatePullRequestDescription" // UpdatePullRequestDescriptionRequest generates a "aws/request.Request" representing the // client's request for the UpdatePullRequestDescription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4349,7 +4759,7 @@ const opUpdatePullRequestStatus = "UpdatePullRequestStatus" // UpdatePullRequestStatusRequest generates a "aws/request.Request" representing the // client's request for the UpdatePullRequestStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4463,7 +4873,7 @@ const opUpdatePullRequestTitle = "UpdatePullRequestTitle" // UpdatePullRequestTitleRequest generates a "aws/request.Request" representing the // client's request for the UpdatePullRequestTitle operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4561,7 +4971,7 @@ const opUpdateRepositoryDescription = "UpdateRepositoryDescription" // UpdateRepositoryDescriptionRequest generates a "aws/request.Request" representing the // client's request for the UpdateRepositoryDescription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4595,8 +5005,7 @@ func (c *CodeCommit) UpdateRepositoryDescriptionRequest(input *UpdateRepositoryD output = &UpdateRepositoryDescriptionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4676,7 +5085,7 @@ const opUpdateRepositoryName = "UpdateRepositoryName" // UpdateRepositoryNameRequest generates a "aws/request.Request" representing the // client's request for the UpdateRepositoryName operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4710,8 +5119,7 @@ func (c *CodeCommit) UpdateRepositoryNameRequest(input *UpdateRepositoryNameInpu output = &UpdateRepositoryNameOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5714,27 +6122,224 @@ func (s *DeleteCommentContentOutput) SetComment(v *Comment) *DeleteCommentConten return s } -// Represents the input of a delete repository operation. -type DeleteRepositoryInput struct { +type DeleteFileInput struct { _ struct{} `type:"structure"` - // The name of the repository to delete. + // The name of the branch where the commit will be made deleting the file. // - // RepositoryName is a required field - RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` -} + // BranchName is a required field + BranchName *string `locationName:"branchName" min:"1" type:"string" required:"true"` -// String returns the string representation -func (s DeleteRepositoryInput) String() string { - return awsutil.Prettify(s) -} + // The commit message you want to include as part of deleting the file. Commit + // messages are limited to 256 KB. If no message is specified, a default message + // will be used. + CommitMessage *string `locationName:"commitMessage" type:"string"` -// GoString returns the string representation -func (s DeleteRepositoryInput) GoString() string { - return s.String() -} + // The email address for the commit that deletes the file. If no email address + // is specified, the email address will be left blank. + Email *string `locationName:"email" type:"string"` -// Validate inspects the fields of the type to determine if they are valid. + // The fully-qualified path to the file that will be deleted, including the + // full name and extension of that file. For example, /examples/file.md is a + // fully qualified path to a file named file.md in a folder named examples. + // + // FilePath is a required field + FilePath *string `locationName:"filePath" type:"string" required:"true"` + + // Specifies whether to delete the folder or directory that contains the file + // you want to delete if that file is the only object in the folder or directory. + // By default, empty folders will be deleted. This includes empty folders that + // are part of the directory structure. For example, if the path to a file is + // dir1/dir2/dir3/dir4, and dir2 and dir3 are empty, deleting the last file + // in dir4 will also delete the empty folders dir4, dir3, and dir2. + KeepEmptyFolders *bool `locationName:"keepEmptyFolders" type:"boolean"` + + // The name of the author of the commit that deletes the file. If no name is + // specified, the user's ARN will be used as the author name and committer name. + Name *string `locationName:"name" type:"string"` + + // The ID of the commit that is the tip of the branch where you want to create + // the commit that will delete the file. This must be the HEAD commit for the + // branch. The commit that deletes the file will be created from this commit + // ID. + // + // ParentCommitId is a required field + ParentCommitId *string `locationName:"parentCommitId" type:"string" required:"true"` + + // The name of the repository that contains the file to delete. + // + // RepositoryName is a required field + RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteFileInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFileInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteFileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteFileInput"} + if s.BranchName == nil { + invalidParams.Add(request.NewErrParamRequired("BranchName")) + } + if s.BranchName != nil && len(*s.BranchName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BranchName", 1)) + } + if s.FilePath == nil { + invalidParams.Add(request.NewErrParamRequired("FilePath")) + } + if s.ParentCommitId == nil { + invalidParams.Add(request.NewErrParamRequired("ParentCommitId")) + } + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBranchName sets the BranchName field's value. +func (s *DeleteFileInput) SetBranchName(v string) *DeleteFileInput { + s.BranchName = &v + return s +} + +// SetCommitMessage sets the CommitMessage field's value. +func (s *DeleteFileInput) SetCommitMessage(v string) *DeleteFileInput { + s.CommitMessage = &v + return s +} + +// SetEmail sets the Email field's value. +func (s *DeleteFileInput) SetEmail(v string) *DeleteFileInput { + s.Email = &v + return s +} + +// SetFilePath sets the FilePath field's value. +func (s *DeleteFileInput) SetFilePath(v string) *DeleteFileInput { + s.FilePath = &v + return s +} + +// SetKeepEmptyFolders sets the KeepEmptyFolders field's value. +func (s *DeleteFileInput) SetKeepEmptyFolders(v bool) *DeleteFileInput { + s.KeepEmptyFolders = &v + return s +} + +// SetName sets the Name field's value. +func (s *DeleteFileInput) SetName(v string) *DeleteFileInput { + s.Name = &v + return s +} + +// SetParentCommitId sets the ParentCommitId field's value. +func (s *DeleteFileInput) SetParentCommitId(v string) *DeleteFileInput { + s.ParentCommitId = &v + return s +} + +// SetRepositoryName sets the RepositoryName field's value. +func (s *DeleteFileInput) SetRepositoryName(v string) *DeleteFileInput { + s.RepositoryName = &v + return s +} + +type DeleteFileOutput struct { + _ struct{} `type:"structure"` + + // The blob ID removed from the tree as part of deleting the file. + // + // BlobId is a required field + BlobId *string `locationName:"blobId" type:"string" required:"true"` + + // The full commit ID of the commit that contains the change that deletes the + // file. + // + // CommitId is a required field + CommitId *string `locationName:"commitId" type:"string" required:"true"` + + // The fully-qualified path to the file that will be deleted, including the + // full name and extension of that file. + // + // FilePath is a required field + FilePath *string `locationName:"filePath" type:"string" required:"true"` + + // The full SHA-1 pointer of the tree information for the commit that contains + // the delete file change. + // + // TreeId is a required field + TreeId *string `locationName:"treeId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteFileOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFileOutput) GoString() string { + return s.String() +} + +// SetBlobId sets the BlobId field's value. +func (s *DeleteFileOutput) SetBlobId(v string) *DeleteFileOutput { + s.BlobId = &v + return s +} + +// SetCommitId sets the CommitId field's value. +func (s *DeleteFileOutput) SetCommitId(v string) *DeleteFileOutput { + s.CommitId = &v + return s +} + +// SetFilePath sets the FilePath field's value. +func (s *DeleteFileOutput) SetFilePath(v string) *DeleteFileOutput { + s.FilePath = &v + return s +} + +// SetTreeId sets the TreeId field's value. +func (s *DeleteFileOutput) SetTreeId(v string) *DeleteFileOutput { + s.TreeId = &v + return s +} + +// Represents the input of a delete repository operation. +type DeleteRepositoryInput struct { + _ struct{} `type:"structure"` + + // The name of the repository to delete. + // + // RepositoryName is a required field + RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteRepositoryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteRepositoryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. func (s *DeleteRepositoryInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteRepositoryInput"} if s.RepositoryName == nil { @@ -5939,6 +6544,102 @@ func (s *Difference) SetChangeType(v string) *Difference { return s } +// Returns information about a file in a repository. +type File struct { + _ struct{} `type:"structure"` + + // The fully-qualified path to the file in the repository. + AbsolutePath *string `locationName:"absolutePath" type:"string"` + + // The blob ID that contains the file information. + BlobId *string `locationName:"blobId" type:"string"` + + // The extrapolated file mode permissions for the file. Valid values include + // EXECUTABLE and NORMAL. + FileMode *string `locationName:"fileMode" type:"string" enum:"FileModeTypeEnum"` + + // The relative path of the file from the folder where the query originated. + RelativePath *string `locationName:"relativePath" type:"string"` +} + +// String returns the string representation +func (s File) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s File) GoString() string { + return s.String() +} + +// SetAbsolutePath sets the AbsolutePath field's value. +func (s *File) SetAbsolutePath(v string) *File { + s.AbsolutePath = &v + return s +} + +// SetBlobId sets the BlobId field's value. +func (s *File) SetBlobId(v string) *File { + s.BlobId = &v + return s +} + +// SetFileMode sets the FileMode field's value. +func (s *File) SetFileMode(v string) *File { + s.FileMode = &v + return s +} + +// SetRelativePath sets the RelativePath field's value. +func (s *File) SetRelativePath(v string) *File { + s.RelativePath = &v + return s +} + +// Returns information about a folder in a repository. +type Folder struct { + _ struct{} `type:"structure"` + + // The fully-qualified path of the folder in the repository. + AbsolutePath *string `locationName:"absolutePath" type:"string"` + + // The relative path of the specified folder from the folder where the query + // originated. + RelativePath *string `locationName:"relativePath" type:"string"` + + // The full SHA-1 pointer of the tree information for the commit that contains + // the folder. + TreeId *string `locationName:"treeId" type:"string"` +} + +// String returns the string representation +func (s Folder) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Folder) GoString() string { + return s.String() +} + +// SetAbsolutePath sets the AbsolutePath field's value. +func (s *Folder) SetAbsolutePath(v string) *Folder { + s.AbsolutePath = &v + return s +} + +// SetRelativePath sets the RelativePath field's value. +func (s *Folder) SetRelativePath(v string) *Folder { + s.RelativePath = &v + return s +} + +// SetTreeId sets the TreeId field's value. +func (s *Folder) SetTreeId(v string) *Folder { + s.TreeId = &v + return s +} + // Represents the input of a get blob operation. type GetBlobInput struct { _ struct{} `type:"structure"` @@ -6390,48 +7091,282 @@ func (s GetCommentsForPullRequestOutput) GoString() string { return s.String() } -// SetCommentsForPullRequestData sets the CommentsForPullRequestData field's value. -func (s *GetCommentsForPullRequestOutput) SetCommentsForPullRequestData(v []*CommentsForPullRequest) *GetCommentsForPullRequestOutput { - s.CommentsForPullRequestData = v +// SetCommentsForPullRequestData sets the CommentsForPullRequestData field's value. +func (s *GetCommentsForPullRequestOutput) SetCommentsForPullRequestData(v []*CommentsForPullRequest) *GetCommentsForPullRequestOutput { + s.CommentsForPullRequestData = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetCommentsForPullRequestOutput) SetNextToken(v string) *GetCommentsForPullRequestOutput { + s.NextToken = &v + return s +} + +// Represents the input of a get commit operation. +type GetCommitInput struct { + _ struct{} `type:"structure"` + + // The commit ID. Commit IDs are the full SHA of the commit. + // + // CommitId is a required field + CommitId *string `locationName:"commitId" type:"string" required:"true"` + + // The name of the repository to which the commit was made. + // + // RepositoryName is a required field + RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetCommitInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCommitInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCommitInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCommitInput"} + if s.CommitId == nil { + invalidParams.Add(request.NewErrParamRequired("CommitId")) + } + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCommitId sets the CommitId field's value. +func (s *GetCommitInput) SetCommitId(v string) *GetCommitInput { + s.CommitId = &v + return s +} + +// SetRepositoryName sets the RepositoryName field's value. +func (s *GetCommitInput) SetRepositoryName(v string) *GetCommitInput { + s.RepositoryName = &v + return s +} + +// Represents the output of a get commit operation. +type GetCommitOutput struct { + _ struct{} `type:"structure"` + + // A commit data type object that contains information about the specified commit. + // + // Commit is a required field + Commit *Commit `locationName:"commit" type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetCommitOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCommitOutput) GoString() string { + return s.String() +} + +// SetCommit sets the Commit field's value. +func (s *GetCommitOutput) SetCommit(v *Commit) *GetCommitOutput { + s.Commit = v + return s +} + +type GetDifferencesInput struct { + _ struct{} `type:"structure"` + + // The branch, tag, HEAD, or other fully qualified reference used to identify + // a commit. + // + // AfterCommitSpecifier is a required field + AfterCommitSpecifier *string `locationName:"afterCommitSpecifier" type:"string" required:"true"` + + // The file path in which to check differences. Limits the results to this path. + // Can also be used to specify the changed name of a directory or folder, if + // it has changed. If not specified, differences will be shown for all paths. + AfterPath *string `locationName:"afterPath" type:"string"` + + // The branch, tag, HEAD, or other fully qualified reference used to identify + // a commit. For example, the full commit ID. Optional. If not specified, all + // changes prior to the afterCommitSpecifier value will be shown. If you do + // not use beforeCommitSpecifier in your request, consider limiting the results + // with maxResults. + BeforeCommitSpecifier *string `locationName:"beforeCommitSpecifier" type:"string"` + + // The file path in which to check for differences. Limits the results to this + // path. Can also be used to specify the previous name of a directory or folder. + // If beforePath and afterPath are not specified, differences will be shown + // for all paths. + BeforePath *string `locationName:"beforePath" type:"string"` + + // A non-negative integer used to limit the number of returned results. + MaxResults *int64 `type:"integer"` + + // An enumeration token that when provided in a request, returns the next batch + // of the results. + NextToken *string `type:"string"` + + // The name of the repository where you want to get differences. + // + // RepositoryName is a required field + RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetDifferencesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDifferencesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDifferencesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDifferencesInput"} + if s.AfterCommitSpecifier == nil { + invalidParams.Add(request.NewErrParamRequired("AfterCommitSpecifier")) + } + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAfterCommitSpecifier sets the AfterCommitSpecifier field's value. +func (s *GetDifferencesInput) SetAfterCommitSpecifier(v string) *GetDifferencesInput { + s.AfterCommitSpecifier = &v + return s +} + +// SetAfterPath sets the AfterPath field's value. +func (s *GetDifferencesInput) SetAfterPath(v string) *GetDifferencesInput { + s.AfterPath = &v + return s +} + +// SetBeforeCommitSpecifier sets the BeforeCommitSpecifier field's value. +func (s *GetDifferencesInput) SetBeforeCommitSpecifier(v string) *GetDifferencesInput { + s.BeforeCommitSpecifier = &v + return s +} + +// SetBeforePath sets the BeforePath field's value. +func (s *GetDifferencesInput) SetBeforePath(v string) *GetDifferencesInput { + s.BeforePath = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *GetDifferencesInput) SetMaxResults(v int64) *GetDifferencesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetDifferencesInput) SetNextToken(v string) *GetDifferencesInput { + s.NextToken = &v + return s +} + +// SetRepositoryName sets the RepositoryName field's value. +func (s *GetDifferencesInput) SetRepositoryName(v string) *GetDifferencesInput { + s.RepositoryName = &v + return s +} + +type GetDifferencesOutput struct { + _ struct{} `type:"structure"` + + // A differences data type object that contains information about the differences, + // including whether the difference is added, modified, or deleted (A, D, M). + Differences []*Difference `locationName:"differences" type:"list"` + + // An enumeration token that can be used in a request to return the next batch + // of the results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s GetDifferencesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDifferencesOutput) GoString() string { + return s.String() +} + +// SetDifferences sets the Differences field's value. +func (s *GetDifferencesOutput) SetDifferences(v []*Difference) *GetDifferencesOutput { + s.Differences = v return s } // SetNextToken sets the NextToken field's value. -func (s *GetCommentsForPullRequestOutput) SetNextToken(v string) *GetCommentsForPullRequestOutput { +func (s *GetDifferencesOutput) SetNextToken(v string) *GetDifferencesOutput { s.NextToken = &v return s } -// Represents the input of a get commit operation. -type GetCommitInput struct { +type GetFileInput struct { _ struct{} `type:"structure"` - // The commit ID. Commit IDs are the full SHA of the commit. + // The fully-quaified reference that identifies the commit that contains the + // file. For example, you could specify a full commit ID, a tag, a branch name, + // or a reference such as refs/heads/master. If none is provided, then the head + // commit will be used. + CommitSpecifier *string `locationName:"commitSpecifier" type:"string"` + + // The fully-qualified path to the file, including the full name and extension + // of the file. For example, /examples/file.md is the fully-qualified path to + // a file named file.md in a folder named examples. // - // CommitId is a required field - CommitId *string `locationName:"commitId" type:"string" required:"true"` + // FilePath is a required field + FilePath *string `locationName:"filePath" type:"string" required:"true"` - // The name of the repository to which the commit was made. + // The name of the repository that contains the file. // // RepositoryName is a required field RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` } // String returns the string representation -func (s GetCommitInput) String() string { +func (s GetFileInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetCommitInput) GoString() string { +func (s GetFileInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetCommitInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetCommitInput"} - if s.CommitId == nil { - invalidParams.Add(request.NewErrParamRequired("CommitId")) +func (s *GetFileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetFileInput"} + if s.FilePath == nil { + invalidParams.Add(request.NewErrParamRequired("FilePath")) } if s.RepositoryName == nil { invalidParams.Add(request.NewErrParamRequired("RepositoryName")) @@ -6446,99 +7381,150 @@ func (s *GetCommitInput) Validate() error { return nil } -// SetCommitId sets the CommitId field's value. -func (s *GetCommitInput) SetCommitId(v string) *GetCommitInput { - s.CommitId = &v +// SetCommitSpecifier sets the CommitSpecifier field's value. +func (s *GetFileInput) SetCommitSpecifier(v string) *GetFileInput { + s.CommitSpecifier = &v + return s +} + +// SetFilePath sets the FilePath field's value. +func (s *GetFileInput) SetFilePath(v string) *GetFileInput { + s.FilePath = &v return s } // SetRepositoryName sets the RepositoryName field's value. -func (s *GetCommitInput) SetRepositoryName(v string) *GetCommitInput { +func (s *GetFileInput) SetRepositoryName(v string) *GetFileInput { s.RepositoryName = &v return s } -// Represents the output of a get commit operation. -type GetCommitOutput struct { +type GetFileOutput struct { _ struct{} `type:"structure"` - // A commit data type object that contains information about the specified commit. + // The blob ID of the object that represents the file content. // - // Commit is a required field - Commit *Commit `locationName:"commit" type:"structure" required:"true"` + // BlobId is a required field + BlobId *string `locationName:"blobId" type:"string" required:"true"` + + // The full commit ID of the commit that contains the content returned by GetFile. + // + // CommitId is a required field + CommitId *string `locationName:"commitId" type:"string" required:"true"` + + // The base-64 encoded binary data object that represents the content of the + // file. + // + // FileContent is automatically base64 encoded/decoded by the SDK. + // + // FileContent is a required field + FileContent []byte `locationName:"fileContent" type:"blob" required:"true"` + + // The extrapolated file mode permissions of the blob. Valid values include + // strings such as EXECUTABLE and not numeric values. + // + // The file mode permissions returned by this API are not the standard file + // mode permission values, such as 100644, but rather extrapolated values. See + // below for a full list of supported return values. + // + // FileMode is a required field + FileMode *string `locationName:"fileMode" type:"string" required:"true" enum:"FileModeTypeEnum"` + + // The fully qualified path to the specified file. This returns the name and + // extension of the file. + // + // FilePath is a required field + FilePath *string `locationName:"filePath" type:"string" required:"true"` + + // The size of the contents of the file, in bytes. + // + // FileSize is a required field + FileSize *int64 `locationName:"fileSize" type:"long" required:"true"` } // String returns the string representation -func (s GetCommitOutput) String() string { +func (s GetFileOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetCommitOutput) GoString() string { +func (s GetFileOutput) GoString() string { return s.String() } -// SetCommit sets the Commit field's value. -func (s *GetCommitOutput) SetCommit(v *Commit) *GetCommitOutput { - s.Commit = v +// SetBlobId sets the BlobId field's value. +func (s *GetFileOutput) SetBlobId(v string) *GetFileOutput { + s.BlobId = &v return s } -type GetDifferencesInput struct { - _ struct{} `type:"structure"` +// SetCommitId sets the CommitId field's value. +func (s *GetFileOutput) SetCommitId(v string) *GetFileOutput { + s.CommitId = &v + return s +} - // The branch, tag, HEAD, or other fully qualified reference used to identify - // a commit. - // - // AfterCommitSpecifier is a required field - AfterCommitSpecifier *string `locationName:"afterCommitSpecifier" type:"string" required:"true"` +// SetFileContent sets the FileContent field's value. +func (s *GetFileOutput) SetFileContent(v []byte) *GetFileOutput { + s.FileContent = v + return s +} - // The file path in which to check differences. Limits the results to this path. - // Can also be used to specify the changed name of a directory or folder, if - // it has changed. If not specified, differences will be shown for all paths. - AfterPath *string `locationName:"afterPath" type:"string"` +// SetFileMode sets the FileMode field's value. +func (s *GetFileOutput) SetFileMode(v string) *GetFileOutput { + s.FileMode = &v + return s +} - // The branch, tag, HEAD, or other fully qualified reference used to identify - // a commit. For example, the full commit ID. Optional. If not specified, all - // changes prior to the afterCommitSpecifier value will be shown. If you do - // not use beforeCommitSpecifier in your request, consider limiting the results - // with maxResults. - BeforeCommitSpecifier *string `locationName:"beforeCommitSpecifier" type:"string"` +// SetFilePath sets the FilePath field's value. +func (s *GetFileOutput) SetFilePath(v string) *GetFileOutput { + s.FilePath = &v + return s +} - // The file path in which to check for differences. Limits the results to this - // path. Can also be used to specify the previous name of a directory or folder. - // If beforePath and afterPath are not specified, differences will be shown - // for all paths. - BeforePath *string `locationName:"beforePath" type:"string"` +// SetFileSize sets the FileSize field's value. +func (s *GetFileOutput) SetFileSize(v int64) *GetFileOutput { + s.FileSize = &v + return s +} - // A non-negative integer used to limit the number of returned results. - MaxResults *int64 `type:"integer"` +type GetFolderInput struct { + _ struct{} `type:"structure"` - // An enumeration token that when provided in a request, returns the next batch - // of the results. - NextToken *string `type:"string"` + // A fully-qualified reference used to identify a commit that contains the version + // of the folder's content to return. A fully-qualified reference can be a commit + // ID, branch name, tag, or reference such as HEAD. If no specifier is provided, + // the folder content will be returned as it exists in the HEAD commit. + CommitSpecifier *string `locationName:"commitSpecifier" type:"string"` - // The name of the repository where you want to get differences. + // The fully-qualified path to the folder whose contents will be returned, including + // the folder name. For example, /examples is a fully-qualified path to a folder + // named examples that was created off of the root directory (/) of a repository. + // + // FolderPath is a required field + FolderPath *string `locationName:"folderPath" type:"string" required:"true"` + + // The name of the repository. // // RepositoryName is a required field RepositoryName *string `locationName:"repositoryName" min:"1" type:"string" required:"true"` } // String returns the string representation -func (s GetDifferencesInput) String() string { +func (s GetFolderInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDifferencesInput) GoString() string { +func (s GetFolderInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetDifferencesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDifferencesInput"} - if s.AfterCommitSpecifier == nil { - invalidParams.Add(request.NewErrParamRequired("AfterCommitSpecifier")) +func (s *GetFolderInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetFolderInput"} + if s.FolderPath == nil { + invalidParams.Add(request.NewErrParamRequired("FolderPath")) } if s.RepositoryName == nil { invalidParams.Add(request.NewErrParamRequired("RepositoryName")) @@ -6553,79 +7539,105 @@ func (s *GetDifferencesInput) Validate() error { return nil } -// SetAfterCommitSpecifier sets the AfterCommitSpecifier field's value. -func (s *GetDifferencesInput) SetAfterCommitSpecifier(v string) *GetDifferencesInput { - s.AfterCommitSpecifier = &v +// SetCommitSpecifier sets the CommitSpecifier field's value. +func (s *GetFolderInput) SetCommitSpecifier(v string) *GetFolderInput { + s.CommitSpecifier = &v return s } -// SetAfterPath sets the AfterPath field's value. -func (s *GetDifferencesInput) SetAfterPath(v string) *GetDifferencesInput { - s.AfterPath = &v +// SetFolderPath sets the FolderPath field's value. +func (s *GetFolderInput) SetFolderPath(v string) *GetFolderInput { + s.FolderPath = &v return s } -// SetBeforeCommitSpecifier sets the BeforeCommitSpecifier field's value. -func (s *GetDifferencesInput) SetBeforeCommitSpecifier(v string) *GetDifferencesInput { - s.BeforeCommitSpecifier = &v +// SetRepositoryName sets the RepositoryName field's value. +func (s *GetFolderInput) SetRepositoryName(v string) *GetFolderInput { + s.RepositoryName = &v return s } -// SetBeforePath sets the BeforePath field's value. -func (s *GetDifferencesInput) SetBeforePath(v string) *GetDifferencesInput { - s.BeforePath = &v - return s -} +type GetFolderOutput struct { + _ struct{} `type:"structure"` -// SetMaxResults sets the MaxResults field's value. -func (s *GetDifferencesInput) SetMaxResults(v int64) *GetDifferencesInput { - s.MaxResults = &v - return s -} + // The full commit ID used as a reference for which version of the folder content + // is returned. + // + // CommitId is a required field + CommitId *string `locationName:"commitId" type:"string" required:"true"` -// SetNextToken sets the NextToken field's value. -func (s *GetDifferencesInput) SetNextToken(v string) *GetDifferencesInput { - s.NextToken = &v - return s -} + // The list of files that exist in the specified folder, if any. + Files []*File `locationName:"files" type:"list"` -// SetRepositoryName sets the RepositoryName field's value. -func (s *GetDifferencesInput) SetRepositoryName(v string) *GetDifferencesInput { - s.RepositoryName = &v - return s -} + // The fully-qualified path of the folder whose contents are returned. + // + // FolderPath is a required field + FolderPath *string `locationName:"folderPath" type:"string" required:"true"` -type GetDifferencesOutput struct { - _ struct{} `type:"structure"` + // The list of folders that exist beneath the specified folder, if any. + SubFolders []*Folder `locationName:"subFolders" type:"list"` - // A differences data type object that contains information about the differences, - // including whether the difference is added, modified, or deleted (A, D, M). - Differences []*Difference `locationName:"differences" type:"list"` + // The list of submodules that exist in the specified folder, if any. + SubModules []*SubModule `locationName:"subModules" type:"list"` - // An enumeration token that can be used in a request to return the next batch - // of the results. - NextToken *string `type:"string"` + // The list of symbolic links to other files and folders that exist in the specified + // folder, if any. + SymbolicLinks []*SymbolicLink `locationName:"symbolicLinks" type:"list"` + + // The full SHA-1 pointer of the tree information for the commit that contains + // the folder. + TreeId *string `locationName:"treeId" type:"string"` } // String returns the string representation -func (s GetDifferencesOutput) String() string { +func (s GetFolderOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDifferencesOutput) GoString() string { +func (s GetFolderOutput) GoString() string { return s.String() } -// SetDifferences sets the Differences field's value. -func (s *GetDifferencesOutput) SetDifferences(v []*Difference) *GetDifferencesOutput { - s.Differences = v +// SetCommitId sets the CommitId field's value. +func (s *GetFolderOutput) SetCommitId(v string) *GetFolderOutput { + s.CommitId = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *GetDifferencesOutput) SetNextToken(v string) *GetDifferencesOutput { - s.NextToken = &v +// SetFiles sets the Files field's value. +func (s *GetFolderOutput) SetFiles(v []*File) *GetFolderOutput { + s.Files = v + return s +} + +// SetFolderPath sets the FolderPath field's value. +func (s *GetFolderOutput) SetFolderPath(v string) *GetFolderOutput { + s.FolderPath = &v + return s +} + +// SetSubFolders sets the SubFolders field's value. +func (s *GetFolderOutput) SetSubFolders(v []*Folder) *GetFolderOutput { + s.SubFolders = v + return s +} + +// SetSubModules sets the SubModules field's value. +func (s *GetFolderOutput) SetSubModules(v []*SubModule) *GetFolderOutput { + s.SubModules = v + return s +} + +// SetSymbolicLinks sets the SymbolicLinks field's value. +func (s *GetFolderOutput) SetSymbolicLinks(v []*SymbolicLink) *GetFolderOutput { + s.SymbolicLinks = v + return s +} + +// SetTreeId sets the TreeId field's value. +func (s *GetFolderOutput) SetTreeId(v string) *GetFolderOutput { + s.TreeId = &v return s } @@ -8905,6 +9917,101 @@ func (s *RepositoryTriggerExecutionFailure) SetTrigger(v string) *RepositoryTrig return s } +// Returns information about a submodule reference in a repository folder. +type SubModule struct { + _ struct{} `type:"structure"` + + // The fully qualified path to the folder that contains the reference to the + // submodule. + AbsolutePath *string `locationName:"absolutePath" type:"string"` + + // The commit ID that contains the reference to the submodule. + CommitId *string `locationName:"commitId" type:"string"` + + // The relative path of the submodule from the folder where the query originated. + RelativePath *string `locationName:"relativePath" type:"string"` +} + +// String returns the string representation +func (s SubModule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SubModule) GoString() string { + return s.String() +} + +// SetAbsolutePath sets the AbsolutePath field's value. +func (s *SubModule) SetAbsolutePath(v string) *SubModule { + s.AbsolutePath = &v + return s +} + +// SetCommitId sets the CommitId field's value. +func (s *SubModule) SetCommitId(v string) *SubModule { + s.CommitId = &v + return s +} + +// SetRelativePath sets the RelativePath field's value. +func (s *SubModule) SetRelativePath(v string) *SubModule { + s.RelativePath = &v + return s +} + +// Returns information about a symbolic link in a repository folder. +type SymbolicLink struct { + _ struct{} `type:"structure"` + + // The fully-qualified path to the folder that contains the symbolic link. + AbsolutePath *string `locationName:"absolutePath" type:"string"` + + // The blob ID that contains the information about the symbolic link. + BlobId *string `locationName:"blobId" type:"string"` + + // The file mode permissions of the blob that cotains information about the + // symbolic link. + FileMode *string `locationName:"fileMode" type:"string" enum:"FileModeTypeEnum"` + + // The relative path of the symbolic link from the folder where the query originated. + RelativePath *string `locationName:"relativePath" type:"string"` +} + +// String returns the string representation +func (s SymbolicLink) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SymbolicLink) GoString() string { + return s.String() +} + +// SetAbsolutePath sets the AbsolutePath field's value. +func (s *SymbolicLink) SetAbsolutePath(v string) *SymbolicLink { + s.AbsolutePath = &v + return s +} + +// SetBlobId sets the BlobId field's value. +func (s *SymbolicLink) SetBlobId(v string) *SymbolicLink { + s.BlobId = &v + return s +} + +// SetFileMode sets the FileMode field's value. +func (s *SymbolicLink) SetFileMode(v string) *SymbolicLink { + s.FileMode = &v + return s +} + +// SetRelativePath sets the RelativePath field's value. +func (s *SymbolicLink) SetRelativePath(v string) *SymbolicLink { + s.RelativePath = &v + return s +} + // Returns information about a target for a pull request. type Target struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/codecommit/doc.go b/vendor/github.com/aws/aws-sdk-go/service/codecommit/doc.go index 39c77b1f90..604881e744 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codecommit/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codecommit/doc.go @@ -45,6 +45,13 @@ // // Files, by calling the following: // +// * DeleteFile, which deletes the content of a specified file from a specified +// branch. +// +// * GetFile, which returns the base-64 encoded content of a specified file. +// +// * GetFolder, which returns the contents of a specified folder or directory. +// // * PutFile, which adds or modifies a file in a specified repository and // branch. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/codecommit/errors.go b/vendor/github.com/aws/aws-sdk-go/service/codecommit/errors.go index 60c433ac55..2301b41f55 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codecommit/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codecommit/errors.go @@ -204,6 +204,13 @@ const ( // than 2 GB, add them using a Git client. ErrCodeFileContentSizeLimitExceededException = "FileContentSizeLimitExceededException" + // ErrCodeFileDoesNotExistException for service response error code + // "FileDoesNotExistException". + // + // The specified file does not exist. Verify that you have provided the correct + // name of the file, including its full path and extension. + ErrCodeFileDoesNotExistException = "FileDoesNotExistException" + // ErrCodeFileNameConflictsWithDirectoryNameException for service response error code // "FileNameConflictsWithDirectoryNameException". // @@ -221,6 +228,13 @@ const ( // (http://docs.aws.amazon.com/codecommit/latest/userguide/limits.html). ErrCodeFileTooLargeException = "FileTooLargeException" + // ErrCodeFolderDoesNotExistException for service response error code + // "FolderDoesNotExistException". + // + // The specified folder does not exist. Either the folder name is not correct, + // or you did not provide the full path to the folder. + ErrCodeFolderDoesNotExistException = "FolderDoesNotExistException" + // ErrCodeIdempotencyParameterMismatchException for service response error code // "IdempotencyParameterMismatchException". // @@ -286,6 +300,12 @@ const ( // The specified continuation token is not valid. ErrCodeInvalidContinuationTokenException = "InvalidContinuationTokenException" + // ErrCodeInvalidDeletionParameterException for service response error code + // "InvalidDeletionParameterException". + // + // The specified deletion parameter is not valid. + ErrCodeInvalidDeletionParameterException = "InvalidDeletionParameterException" + // ErrCodeInvalidDescriptionException for service response error code // "InvalidDescriptionException". // @@ -549,7 +569,7 @@ const ( // ErrCodeNameLengthExceededException for service response error code // "NameLengthExceededException". // - // The file name is not valid because it has exceeded the character limit for + // The user name is not valid because it has exceeded the character limit for // file names. File names, including the path to the file, cannot exceed the // character limit. ErrCodeNameLengthExceededException = "NameLengthExceededException" @@ -557,8 +577,8 @@ const ( // ErrCodeParentCommitDoesNotExistException for service response error code // "ParentCommitDoesNotExistException". // - // The parent commit ID is not valid. The specified parent commit ID does not - // exist in the specified branch of the repository. + // The parent commit ID is not valid because it does not exist. The specified + // parent commit ID does not exist in the specified branch of the repository. ErrCodeParentCommitDoesNotExistException = "ParentCommitDoesNotExistException" // ErrCodeParentCommitIdOutdatedException for service response error code @@ -586,7 +606,7 @@ const ( // ErrCodePathRequiredException for service response error code // "PathRequiredException". // - // The filePath for a location cannot be empty or null. + // The folderPath for a location cannot be null. ErrCodePathRequiredException = "PathRequiredException" // ErrCodePullRequestAlreadyClosedException for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go index bc68dcfd70..8c469f5afa 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/api.go @@ -17,7 +17,7 @@ const opAddTagsToOnPremisesInstances = "AddTagsToOnPremisesInstances" // AddTagsToOnPremisesInstancesRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToOnPremisesInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -51,8 +51,7 @@ func (c *CodeDeploy) AddTagsToOnPremisesInstancesRequest(input *AddTagsToOnPremi output = &AddTagsToOnPremisesInstancesOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -72,13 +71,13 @@ func (c *CodeDeploy) AddTagsToOnPremisesInstancesRequest(input *AddTagsToOnPremi // An on-premises instance name was not specified. // // * ErrCodeInvalidInstanceNameException "InvalidInstanceNameException" -// The specified on-premises instance name was specified in an invalid format. +// The on-premises instance name was specified in an invalid format. // // * ErrCodeTagRequiredException "TagRequiredException" // A tag was not specified. // // * ErrCodeInvalidTagException "InvalidTagException" -// The specified tag was specified in an invalid format. +// The tag was specified in an invalid format. // // * ErrCodeTagLimitExceededException "TagLimitExceededException" // The maximum allowed number of tags was exceeded. @@ -117,7 +116,7 @@ const opBatchGetApplicationRevisions = "BatchGetApplicationRevisions" // BatchGetApplicationRevisionsRequest generates a "aws/request.Request" representing the // client's request for the BatchGetApplicationRevisions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -167,7 +166,7 @@ func (c *CodeDeploy) BatchGetApplicationRevisionsRequest(input *BatchGetApplicat // // Returned Error Codes: // * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the applicable IAM user or AWS account. +// The application does not exist with the IAM user or AWS account. // // * ErrCodeApplicationNameRequiredException "ApplicationNameRequiredException" // The minimum number of required application names was not specified. @@ -211,7 +210,7 @@ const opBatchGetApplications = "BatchGetApplications" // BatchGetApplicationsRequest generates a "aws/request.Request" representing the // client's request for the BatchGetApplications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -267,7 +266,7 @@ func (c *CodeDeploy) BatchGetApplicationsRequest(input *BatchGetApplicationsInpu // The application name was specified in an invalid format. // // * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the applicable IAM user or AWS account. +// The application does not exist with the IAM user or AWS account. // // * ErrCodeBatchLimitExceededException "BatchLimitExceededException" // The maximum number of names or IDs allowed for this request (100) was exceeded. @@ -299,7 +298,7 @@ const opBatchGetDeploymentGroups = "BatchGetDeploymentGroups" // BatchGetDeploymentGroupsRequest generates a "aws/request.Request" representing the // client's request for the BatchGetDeploymentGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -355,7 +354,7 @@ func (c *CodeDeploy) BatchGetDeploymentGroupsRequest(input *BatchGetDeploymentGr // The application name was specified in an invalid format. // // * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the applicable IAM user or AWS account. +// The application does not exist with the IAM user or AWS account. // // * ErrCodeDeploymentGroupNameRequiredException "DeploymentGroupNameRequiredException" // The deployment group name was not specified. @@ -366,6 +365,9 @@ func (c *CodeDeploy) BatchGetDeploymentGroupsRequest(input *BatchGetDeploymentGr // * ErrCodeBatchLimitExceededException "BatchLimitExceededException" // The maximum number of names or IDs allowed for this request (100) was exceeded. // +// * ErrCodeDeploymentConfigDoesNotExistException "DeploymentConfigDoesNotExistException" +// The deployment configuration does not exist with the IAM user or AWS account. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/BatchGetDeploymentGroups func (c *CodeDeploy) BatchGetDeploymentGroups(input *BatchGetDeploymentGroupsInput) (*BatchGetDeploymentGroupsOutput, error) { req, out := c.BatchGetDeploymentGroupsRequest(input) @@ -393,7 +395,7 @@ const opBatchGetDeploymentInstances = "BatchGetDeploymentInstances" // BatchGetDeploymentInstancesRequest generates a "aws/request.Request" representing the // client's request for the BatchGetDeploymentInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -414,7 +416,12 @@ const opBatchGetDeploymentInstances = "BatchGetDeploymentInstances" // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/BatchGetDeploymentInstances +// +// Deprecated: This operation is deprecated, use BatchGetDeploymentTargets instead. func (c *CodeDeploy) BatchGetDeploymentInstancesRequest(input *BatchGetDeploymentInstancesInput) (req *request.Request, output *BatchGetDeploymentInstancesOutput) { + if c.Client.Config.Logger != nil { + c.Client.Config.Logger.Log("This operation, BatchGetDeploymentInstances, has been deprecated") + } op := &request.Operation{ Name: opBatchGetDeploymentInstances, HTTPMethod: "POST", @@ -432,8 +439,11 @@ func (c *CodeDeploy) BatchGetDeploymentInstancesRequest(input *BatchGetDeploymen // BatchGetDeploymentInstances API operation for AWS CodeDeploy. // -// Gets information about one or more instance that are part of a deployment -// group. +// This method works, but is deprecated. Use BatchGetDeploymentTargets instead. +// +// Returns an array of instances associated with a deployment. This method works +// with EC2/On-premises and AWS Lambda compute platforms. The newer BatchGetDeploymentTargets +// works with all compute platforms. // // 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 @@ -447,7 +457,7 @@ func (c *CodeDeploy) BatchGetDeploymentInstancesRequest(input *BatchGetDeploymen // At least one deployment ID must be specified. // // * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" -// The deployment does not exist with the applicable IAM user or AWS account. +// The deployment with the IAM user or AWS account does not exist. // // * ErrCodeInstanceIdRequiredException "InstanceIdRequiredException" // The instance ID was not specified. @@ -456,12 +466,17 @@ func (c *CodeDeploy) BatchGetDeploymentInstancesRequest(input *BatchGetDeploymen // At least one of the deployment IDs was specified in an invalid format. // // * ErrCodeInvalidInstanceNameException "InvalidInstanceNameException" -// The specified on-premises instance name was specified in an invalid format. +// The on-premises instance name was specified in an invalid format. // // * ErrCodeBatchLimitExceededException "BatchLimitExceededException" // The maximum number of names or IDs allowed for this request (100) was exceeded. // +// * ErrCodeInvalidComputePlatformException "InvalidComputePlatformException" +// The computePlatform is invalid. The computePlatform should be Lambda or Server. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/BatchGetDeploymentInstances +// +// Deprecated: This operation is deprecated, use BatchGetDeploymentTargets instead. func (c *CodeDeploy) BatchGetDeploymentInstances(input *BatchGetDeploymentInstancesInput) (*BatchGetDeploymentInstancesOutput, error) { req, out := c.BatchGetDeploymentInstancesRequest(input) return out, req.Send() @@ -476,6 +491,8 @@ func (c *CodeDeploy) BatchGetDeploymentInstances(input *BatchGetDeploymentInstan // 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. +// +// Deprecated: This operation is deprecated, use BatchGetDeploymentTargets instead. func (c *CodeDeploy) BatchGetDeploymentInstancesWithContext(ctx aws.Context, input *BatchGetDeploymentInstancesInput, opts ...request.Option) (*BatchGetDeploymentInstancesOutput, error) { req, out := c.BatchGetDeploymentInstancesRequest(input) req.SetContext(ctx) @@ -483,12 +500,121 @@ func (c *CodeDeploy) BatchGetDeploymentInstancesWithContext(ctx aws.Context, inp return out, req.Send() } +const opBatchGetDeploymentTargets = "BatchGetDeploymentTargets" + +// BatchGetDeploymentTargetsRequest generates a "aws/request.Request" representing the +// client's request for the BatchGetDeploymentTargets 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 BatchGetDeploymentTargets for more information on using the BatchGetDeploymentTargets +// 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 BatchGetDeploymentTargetsRequest method. +// req, resp := client.BatchGetDeploymentTargetsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/BatchGetDeploymentTargets +func (c *CodeDeploy) BatchGetDeploymentTargetsRequest(input *BatchGetDeploymentTargetsInput) (req *request.Request, output *BatchGetDeploymentTargetsOutput) { + op := &request.Operation{ + Name: opBatchGetDeploymentTargets, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &BatchGetDeploymentTargetsInput{} + } + + output = &BatchGetDeploymentTargetsOutput{} + req = c.newRequest(op, input, output) + return +} + +// BatchGetDeploymentTargets API operation for AWS CodeDeploy. +// +// Returns an array of targets associated with a deployment. This method works +// with all compute types and should be used instead of the deprecated BatchGetDeploymentInstances. +// +// The type of targets returned depends on the deployment's compute platform: +// +// * EC2/On-premises: Information about EC2 instance targets. +// +// * AWS Lambda: Information about Lambda functions targets. +// +// * Amazon ECS: Information about Amazon ECS service targets. +// +// 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 CodeDeploy's +// API operation BatchGetDeploymentTargets for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidDeploymentIdException "InvalidDeploymentIdException" +// At least one of the deployment IDs was specified in an invalid format. +// +// * ErrCodeDeploymentIdRequiredException "DeploymentIdRequiredException" +// At least one deployment ID must be specified. +// +// * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" +// The deployment with the IAM user or AWS account does not exist. +// +// * ErrCodeDeploymentTargetIdRequiredException "DeploymentTargetIdRequiredException" +// A deployment target ID was not provided. +// +// * ErrCodeInvalidDeploymentTargetIdException "InvalidDeploymentTargetIdException" +// The target ID provided was not valid. +// +// * ErrCodeDeploymentTargetDoesNotExistException "DeploymentTargetDoesNotExistException" +// The provided target ID does not belong to the attempted deployment. +// +// * ErrCodeDeploymentTargetListSizeExceededException "DeploymentTargetListSizeExceededException" +// The maximum number of targets that can be associated with an Amazon ECS or +// AWS Lambda deployment was exceeded. The target list of both types of deployments +// must have exactly one item. This exception does not apply to EC2/On-premises +// deployments. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/BatchGetDeploymentTargets +func (c *CodeDeploy) BatchGetDeploymentTargets(input *BatchGetDeploymentTargetsInput) (*BatchGetDeploymentTargetsOutput, error) { + req, out := c.BatchGetDeploymentTargetsRequest(input) + return out, req.Send() +} + +// BatchGetDeploymentTargetsWithContext is the same as BatchGetDeploymentTargets with the addition of +// the ability to pass a context and additional request options. +// +// See BatchGetDeploymentTargets 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 *CodeDeploy) BatchGetDeploymentTargetsWithContext(ctx aws.Context, input *BatchGetDeploymentTargetsInput, opts ...request.Option) (*BatchGetDeploymentTargetsOutput, error) { + req, out := c.BatchGetDeploymentTargetsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opBatchGetDeployments = "BatchGetDeployments" // BatchGetDeploymentsRequest generates a "aws/request.Request" representing the // client's request for the BatchGetDeployments operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -573,7 +699,7 @@ const opBatchGetOnPremisesInstances = "BatchGetOnPremisesInstances" // BatchGetOnPremisesInstancesRequest generates a "aws/request.Request" representing the // client's request for the BatchGetOnPremisesInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -626,7 +752,7 @@ func (c *CodeDeploy) BatchGetOnPremisesInstancesRequest(input *BatchGetOnPremise // An on-premises instance name was not specified. // // * ErrCodeInvalidInstanceNameException "InvalidInstanceNameException" -// The specified on-premises instance name was specified in an invalid format. +// The on-premises instance name was specified in an invalid format. // // * ErrCodeBatchLimitExceededException "BatchLimitExceededException" // The maximum number of names or IDs allowed for this request (100) was exceeded. @@ -658,7 +784,7 @@ const opContinueDeployment = "ContinueDeployment" // ContinueDeploymentRequest generates a "aws/request.Request" representing the // client's request for the ContinueDeployment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -692,8 +818,7 @@ func (c *CodeDeploy) ContinueDeploymentRequest(input *ContinueDeploymentInput) ( output = &ContinueDeploymentOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -718,7 +843,7 @@ func (c *CodeDeploy) ContinueDeploymentRequest(input *ContinueDeploymentInput) ( // At least one deployment ID must be specified. // // * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" -// The deployment does not exist with the applicable IAM user or AWS account. +// The deployment with the IAM user or AWS account does not exist. // // * ErrCodeDeploymentAlreadyCompletedException "DeploymentAlreadyCompletedException" // The deployment is already complete. @@ -732,6 +857,12 @@ func (c *CodeDeploy) ContinueDeploymentRequest(input *ContinueDeploymentInput) ( // * ErrCodeUnsupportedActionForDeploymentTypeException "UnsupportedActionForDeploymentTypeException" // A call was submitted that is not supported for the specified deployment type. // +// * ErrCodeInvalidDeploymentWaitTypeException "InvalidDeploymentWaitTypeException" +// The wait type is invalid. +// +// * ErrCodeInvalidDeploymentStatusException "InvalidDeploymentStatusException" +// The specified deployment status doesn't exist or cannot be determined. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ContinueDeployment func (c *CodeDeploy) ContinueDeployment(input *ContinueDeploymentInput) (*ContinueDeploymentOutput, error) { req, out := c.ContinueDeploymentRequest(input) @@ -759,7 +890,7 @@ const opCreateApplication = "CreateApplication" // CreateApplicationRequest generates a "aws/request.Request" representing the // client's request for the CreateApplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -815,8 +946,8 @@ func (c *CodeDeploy) CreateApplicationRequest(input *CreateApplicationInput) (re // The application name was specified in an invalid format. // // * ErrCodeApplicationAlreadyExistsException "ApplicationAlreadyExistsException" -// An application with the specified name already exists with the applicable -// IAM user or AWS account. +// An application with the specified name with the IAM user or AWS account already +// exists. // // * ErrCodeApplicationLimitExceededException "ApplicationLimitExceededException" // More applications were attempted to be created than are allowed. @@ -851,7 +982,7 @@ const opCreateDeployment = "CreateDeployment" // CreateDeploymentRequest generates a "aws/request.Request" representing the // client's request for the CreateDeployment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -907,7 +1038,7 @@ func (c *CodeDeploy) CreateDeploymentRequest(input *CreateDeploymentInput) (req // The application name was specified in an invalid format. // // * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the applicable IAM user or AWS account. +// The application does not exist with the IAM user or AWS account. // // * ErrCodeDeploymentGroupNameRequiredException "DeploymentGroupNameRequiredException" // The deployment group name was not specified. @@ -916,14 +1047,13 @@ func (c *CodeDeploy) CreateDeploymentRequest(input *CreateDeploymentInput) (req // The deployment group name was specified in an invalid format. // // * ErrCodeDeploymentGroupDoesNotExistException "DeploymentGroupDoesNotExistException" -// The named deployment group does not exist with the applicable IAM user or -// AWS account. +// The named deployment group with the IAM user or AWS account does not exist. // // * ErrCodeRevisionRequiredException "RevisionRequiredException" // The revision ID was not specified. // // * ErrCodeRevisionDoesNotExistException "RevisionDoesNotExistException" -// The named revision does not exist with the applicable IAM user or AWS account. +// The named revision does not exist with the IAM user or AWS account. // // * ErrCodeInvalidRevisionException "InvalidRevisionException" // The revision was specified in an invalid format. @@ -932,8 +1062,7 @@ func (c *CodeDeploy) CreateDeploymentRequest(input *CreateDeploymentInput) (req // The deployment configuration name was specified in an invalid format. // // * ErrCodeDeploymentConfigDoesNotExistException "DeploymentConfigDoesNotExistException" -// The deployment configuration does not exist with the applicable IAM user -// or AWS account. +// The deployment configuration does not exist with the IAM user or AWS account. // // * ErrCodeDescriptionTooLongException "DescriptionTooLongException" // The description is too long. @@ -955,7 +1084,7 @@ func (c *CodeDeploy) CreateDeploymentRequest(input *CreateDeploymentInput) (req // // * ErrCodeInvalidAutoRollbackConfigException "InvalidAutoRollbackConfigException" // The automatic rollback configuration was specified in an invalid format. -// For example, automatic rollback is enabled but an invalid triggering event +// For example, automatic rollback is enabled, but an invalid triggering event // type or no event types were listed. // // * ErrCodeInvalidLoadBalancerInfoException "InvalidLoadBalancerInfoException" @@ -963,14 +1092,14 @@ func (c *CodeDeploy) CreateDeploymentRequest(input *CreateDeploymentInput) (req // // * ErrCodeInvalidFileExistsBehaviorException "InvalidFileExistsBehaviorException" // An invalid fileExistsBehavior option was specified to determine how AWS CodeDeploy -// handles files or directories that already exist in a deployment target location +// handles files or directories that already exist in a deployment target location, // but weren't part of the previous successful deployment. Valid values include -// "DISALLOW", "OVERWRITE", and "RETAIN". +// "DISALLOW," "OVERWRITE," and "RETAIN." // // * ErrCodeInvalidRoleException "InvalidRoleException" // The service role ARN was specified in an invalid format. Or, if an Auto Scaling // group was specified, the specified service role does not grant the appropriate -// permissions to Auto Scaling. +// permissions to Amazon EC2 Auto Scaling. // // * ErrCodeInvalidAutoScalingGroupException "InvalidAutoScalingGroupException" // The Auto Scaling group was specified in an invalid format or does not exist. @@ -1016,7 +1145,7 @@ const opCreateDeploymentConfig = "CreateDeploymentConfig" // CreateDeploymentConfigRequest generates a "aws/request.Request" representing the // client's request for the CreateDeploymentConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1072,8 +1201,8 @@ func (c *CodeDeploy) CreateDeploymentConfigRequest(input *CreateDeploymentConfig // The deployment configuration name was not specified. // // * ErrCodeDeploymentConfigAlreadyExistsException "DeploymentConfigAlreadyExistsException" -// A deployment configuration with the specified name already exists with the -// applicable IAM user or AWS account. +// A deployment configuration with the specified name with the IAM user or AWS +// account already exists . // // * ErrCodeInvalidMinimumHealthyHostValueException "InvalidMinimumHealthyHostValueException" // The minimum healthy instance value was specified in an invalid format. @@ -1115,7 +1244,7 @@ const opCreateDeploymentGroup = "CreateDeploymentGroup" // CreateDeploymentGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateDeploymentGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1154,7 +1283,7 @@ func (c *CodeDeploy) CreateDeploymentGroupRequest(input *CreateDeploymentGroupIn // CreateDeploymentGroup API operation for AWS CodeDeploy. // -// Creates a deployment group to which application revisions will be deployed. +// Creates a deployment group to which application revisions are deployed. // // 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 @@ -1171,7 +1300,7 @@ func (c *CodeDeploy) CreateDeploymentGroupRequest(input *CreateDeploymentGroupIn // The application name was specified in an invalid format. // // * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the applicable IAM user or AWS account. +// The application does not exist with the IAM user or AWS account. // // * ErrCodeDeploymentGroupNameRequiredException "DeploymentGroupNameRequiredException" // The deployment group name was not specified. @@ -1180,14 +1309,14 @@ func (c *CodeDeploy) CreateDeploymentGroupRequest(input *CreateDeploymentGroupIn // The deployment group name was specified in an invalid format. // // * ErrCodeDeploymentGroupAlreadyExistsException "DeploymentGroupAlreadyExistsException" -// A deployment group with the specified name already exists with the applicable -// IAM user or AWS account. +// A deployment group with the specified name with the IAM user or AWS account +// already exists. // // * ErrCodeInvalidEC2TagException "InvalidEC2TagException" // The tag was specified in an invalid format. // // * ErrCodeInvalidTagException "InvalidTagException" -// The specified tag was specified in an invalid format. +// The tag was specified in an invalid format. // // * ErrCodeInvalidAutoScalingGroupException "InvalidAutoScalingGroupException" // The Auto Scaling group was specified in an invalid format or does not exist. @@ -1196,8 +1325,7 @@ func (c *CodeDeploy) CreateDeploymentGroupRequest(input *CreateDeploymentGroupIn // The deployment configuration name was specified in an invalid format. // // * ErrCodeDeploymentConfigDoesNotExistException "DeploymentConfigDoesNotExistException" -// The deployment configuration does not exist with the applicable IAM user -// or AWS account. +// The deployment configuration does not exist with the IAM user or AWS account. // // * ErrCodeRoleRequiredException "RoleRequiredException" // The role ID was not specified. @@ -1205,7 +1333,7 @@ func (c *CodeDeploy) CreateDeploymentGroupRequest(input *CreateDeploymentGroupIn // * ErrCodeInvalidRoleException "InvalidRoleException" // The service role ARN was specified in an invalid format. Or, if an Auto Scaling // group was specified, the specified service role does not grant the appropriate -// permissions to Auto Scaling. +// permissions to Amazon EC2 Auto Scaling. // // * ErrCodeDeploymentGroupLimitExceededException "DeploymentGroupLimitExceededException" // The deployment groups limit was exceeded. @@ -1226,18 +1354,18 @@ func (c *CodeDeploy) CreateDeploymentGroupRequest(input *CreateDeploymentGroupIn // // * The alarm object is null. // -// * The alarm name is empty or null or exceeds the 255 character limit. +// * The alarm name is empty or null or exceeds the limit of 255 characters. // // * Two alarms with the same name have been specified. // -// * The alarm configuration is enabled but the alarm list is empty. +// * The alarm configuration is enabled, but the alarm list is empty. // // * ErrCodeAlarmsLimitExceededException "AlarmsLimitExceededException" // The maximum number of alarms for a deployment group (10) was exceeded. // // * ErrCodeInvalidAutoRollbackConfigException "InvalidAutoRollbackConfigException" // The automatic rollback configuration was specified in an invalid format. -// For example, automatic rollback is enabled but an invalid triggering event +// For example, automatic rollback is enabled, but an invalid triggering event // type or no event types were listed. // // * ErrCodeInvalidLoadBalancerInfoException "InvalidLoadBalancerInfoException" @@ -1245,8 +1373,8 @@ func (c *CodeDeploy) CreateDeploymentGroupRequest(input *CreateDeploymentGroupIn // // * ErrCodeInvalidDeploymentStyleException "InvalidDeploymentStyleException" // An invalid deployment style was specified. Valid deployment types include -// "IN_PLACE" and "BLUE_GREEN". Valid deployment options include "WITH_TRAFFIC_CONTROL" -// and "WITHOUT_TRAFFIC_CONTROL". +// "IN_PLACE" and "BLUE_GREEN." Valid deployment options include "WITH_TRAFFIC_CONTROL" +// and "WITHOUT_TRAFFIC_CONTROL." // // * ErrCodeInvalidBlueGreenDeploymentConfigurationException "InvalidBlueGreenDeploymentConfigurationException" // The configuration for the blue/green deployment group was provided in an @@ -1266,7 +1394,20 @@ func (c *CodeDeploy) CreateDeploymentGroupRequest(input *CreateDeploymentGroupIn // allowed limit of 3. // // * ErrCodeInvalidInputException "InvalidInputException" -// The specified input was specified in an invalid format. +// The input was specified in an invalid format. +// +// * ErrCodeThrottlingException "ThrottlingException" +// An API function was called too frequently. +// +// * ErrCodeInvalidECSServiceException "InvalidECSServiceException" +// The Amazon ECS service identifier is not valid. +// +// * ErrCodeInvalidTargetGroupPairException "InvalidTargetGroupPairException" +// A target group pair associated with this deployment is not valid. +// +// * ErrCodeECSServiceMappingLimitExceededException "ECSServiceMappingLimitExceededException" +// The Amazon ECS service is associated with more than one deployment groups. +// An Amazon ECS service can be associated with only one deployment group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/CreateDeploymentGroup func (c *CodeDeploy) CreateDeploymentGroup(input *CreateDeploymentGroupInput) (*CreateDeploymentGroupOutput, error) { @@ -1295,7 +1436,7 @@ const opDeleteApplication = "DeleteApplication" // DeleteApplicationRequest generates a "aws/request.Request" representing the // client's request for the DeleteApplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1329,8 +1470,7 @@ func (c *CodeDeploy) DeleteApplicationRequest(input *DeleteApplicationInput) (re output = &DeleteApplicationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1379,7 +1519,7 @@ const opDeleteDeploymentConfig = "DeleteDeploymentConfig" // DeleteDeploymentConfigRequest generates a "aws/request.Request" representing the // client's request for the DeleteDeploymentConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1413,8 +1553,7 @@ func (c *CodeDeploy) DeleteDeploymentConfigRequest(input *DeleteDeploymentConfig output = &DeleteDeploymentConfigOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1472,7 +1611,7 @@ const opDeleteDeploymentGroup = "DeleteDeploymentGroup" // DeleteDeploymentGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteDeploymentGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1536,7 +1675,7 @@ func (c *CodeDeploy) DeleteDeploymentGroupRequest(input *DeleteDeploymentGroupIn // * ErrCodeInvalidRoleException "InvalidRoleException" // The service role ARN was specified in an invalid format. Or, if an Auto Scaling // group was specified, the specified service role does not grant the appropriate -// permissions to Auto Scaling. +// permissions to Amazon EC2 Auto Scaling. // // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/DeleteDeploymentGroup func (c *CodeDeploy) DeleteDeploymentGroup(input *DeleteDeploymentGroupInput) (*DeleteDeploymentGroupOutput, error) { @@ -1565,7 +1704,7 @@ const opDeleteGitHubAccountToken = "DeleteGitHubAccountToken" // DeleteGitHubAccountTokenRequest generates a "aws/request.Request" representing the // client's request for the DeleteGitHubAccountToken operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1656,7 +1795,7 @@ const opDeregisterOnPremisesInstance = "DeregisterOnPremisesInstance" // DeregisterOnPremisesInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeregisterOnPremisesInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1690,8 +1829,7 @@ func (c *CodeDeploy) DeregisterOnPremisesInstanceRequest(input *DeregisterOnPrem output = &DeregisterOnPremisesInstanceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1711,7 +1849,7 @@ func (c *CodeDeploy) DeregisterOnPremisesInstanceRequest(input *DeregisterOnPrem // An on-premises instance name was not specified. // // * ErrCodeInvalidInstanceNameException "InvalidInstanceNameException" -// The specified on-premises instance name was specified in an invalid format. +// The on-premises instance name was specified in an invalid format. // // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/DeregisterOnPremisesInstance func (c *CodeDeploy) DeregisterOnPremisesInstance(input *DeregisterOnPremisesInstanceInput) (*DeregisterOnPremisesInstanceOutput, error) { @@ -1740,7 +1878,7 @@ const opGetApplication = "GetApplication" // GetApplicationRequest generates a "aws/request.Request" representing the // client's request for the GetApplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1796,7 +1934,7 @@ func (c *CodeDeploy) GetApplicationRequest(input *GetApplicationInput) (req *req // The application name was specified in an invalid format. // // * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the applicable IAM user or AWS account. +// The application does not exist with the IAM user or AWS account. // // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetApplication func (c *CodeDeploy) GetApplication(input *GetApplicationInput) (*GetApplicationOutput, error) { @@ -1825,7 +1963,7 @@ const opGetApplicationRevision = "GetApplicationRevision" // GetApplicationRevisionRequest generates a "aws/request.Request" representing the // client's request for the GetApplicationRevision operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1875,7 +2013,7 @@ func (c *CodeDeploy) GetApplicationRevisionRequest(input *GetApplicationRevision // // Returned Error Codes: // * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the applicable IAM user or AWS account. +// The application does not exist with the IAM user or AWS account. // // * ErrCodeApplicationNameRequiredException "ApplicationNameRequiredException" // The minimum number of required application names was not specified. @@ -1884,7 +2022,7 @@ func (c *CodeDeploy) GetApplicationRevisionRequest(input *GetApplicationRevision // The application name was specified in an invalid format. // // * ErrCodeRevisionDoesNotExistException "RevisionDoesNotExistException" -// The named revision does not exist with the applicable IAM user or AWS account. +// The named revision does not exist with the IAM user or AWS account. // // * ErrCodeRevisionRequiredException "RevisionRequiredException" // The revision ID was not specified. @@ -1919,7 +2057,7 @@ const opGetDeployment = "GetDeployment" // GetDeploymentRequest generates a "aws/request.Request" representing the // client's request for the GetDeployment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1975,7 +2113,7 @@ func (c *CodeDeploy) GetDeploymentRequest(input *GetDeploymentInput) (req *reque // At least one of the deployment IDs was specified in an invalid format. // // * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" -// The deployment does not exist with the applicable IAM user or AWS account. +// The deployment with the IAM user or AWS account does not exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetDeployment func (c *CodeDeploy) GetDeployment(input *GetDeploymentInput) (*GetDeploymentOutput, error) { @@ -2004,7 +2142,7 @@ const opGetDeploymentConfig = "GetDeploymentConfig" // GetDeploymentConfigRequest generates a "aws/request.Request" representing the // client's request for the GetDeploymentConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2060,8 +2198,10 @@ func (c *CodeDeploy) GetDeploymentConfigRequest(input *GetDeploymentConfigInput) // The deployment configuration name was not specified. // // * ErrCodeDeploymentConfigDoesNotExistException "DeploymentConfigDoesNotExistException" -// The deployment configuration does not exist with the applicable IAM user -// or AWS account. +// The deployment configuration does not exist with the IAM user or AWS account. +// +// * ErrCodeInvalidComputePlatformException "InvalidComputePlatformException" +// The computePlatform is invalid. The computePlatform should be Lambda or Server. // // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetDeploymentConfig func (c *CodeDeploy) GetDeploymentConfig(input *GetDeploymentConfigInput) (*GetDeploymentConfigOutput, error) { @@ -2090,7 +2230,7 @@ const opGetDeploymentGroup = "GetDeploymentGroup" // GetDeploymentGroupRequest generates a "aws/request.Request" representing the // client's request for the GetDeploymentGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2146,7 +2286,7 @@ func (c *CodeDeploy) GetDeploymentGroupRequest(input *GetDeploymentGroupInput) ( // The application name was specified in an invalid format. // // * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the applicable IAM user or AWS account. +// The application does not exist with the IAM user or AWS account. // // * ErrCodeDeploymentGroupNameRequiredException "DeploymentGroupNameRequiredException" // The deployment group name was not specified. @@ -2155,8 +2295,10 @@ func (c *CodeDeploy) GetDeploymentGroupRequest(input *GetDeploymentGroupInput) ( // The deployment group name was specified in an invalid format. // // * ErrCodeDeploymentGroupDoesNotExistException "DeploymentGroupDoesNotExistException" -// The named deployment group does not exist with the applicable IAM user or -// AWS account. +// The named deployment group with the IAM user or AWS account does not exist. +// +// * ErrCodeDeploymentConfigDoesNotExistException "DeploymentConfigDoesNotExistException" +// The deployment configuration does not exist with the IAM user or AWS account. // // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetDeploymentGroup func (c *CodeDeploy) GetDeploymentGroup(input *GetDeploymentGroupInput) (*GetDeploymentGroupOutput, error) { @@ -2185,7 +2327,7 @@ const opGetDeploymentInstance = "GetDeploymentInstance" // GetDeploymentInstanceRequest generates a "aws/request.Request" representing the // client's request for the GetDeploymentInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2206,7 +2348,12 @@ const opGetDeploymentInstance = "GetDeploymentInstance" // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetDeploymentInstance +// +// Deprecated: This operation is deprecated, use GetDeploymentTarget instead. func (c *CodeDeploy) GetDeploymentInstanceRequest(input *GetDeploymentInstanceInput) (req *request.Request, output *GetDeploymentInstanceOutput) { + if c.Client.Config.Logger != nil { + c.Client.Config.Logger.Log("This operation, GetDeploymentInstance, has been deprecated") + } op := &request.Operation{ Name: opGetDeploymentInstance, HTTPMethod: "POST", @@ -2238,7 +2385,7 @@ func (c *CodeDeploy) GetDeploymentInstanceRequest(input *GetDeploymentInstanceIn // At least one deployment ID must be specified. // // * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" -// The deployment does not exist with the applicable IAM user or AWS account. +// The deployment with the IAM user or AWS account does not exist. // // * ErrCodeInstanceIdRequiredException "InstanceIdRequiredException" // The instance ID was not specified. @@ -2250,9 +2397,14 @@ func (c *CodeDeploy) GetDeploymentInstanceRequest(input *GetDeploymentInstanceIn // The specified instance does not exist in the deployment group. // // * ErrCodeInvalidInstanceNameException "InvalidInstanceNameException" -// The specified on-premises instance name was specified in an invalid format. +// The on-premises instance name was specified in an invalid format. +// +// * ErrCodeInvalidComputePlatformException "InvalidComputePlatformException" +// The computePlatform is invalid. The computePlatform should be Lambda or Server. // // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetDeploymentInstance +// +// Deprecated: This operation is deprecated, use GetDeploymentTarget instead. func (c *CodeDeploy) GetDeploymentInstance(input *GetDeploymentInstanceInput) (*GetDeploymentInstanceOutput, error) { req, out := c.GetDeploymentInstanceRequest(input) return out, req.Send() @@ -2267,6 +2419,8 @@ func (c *CodeDeploy) GetDeploymentInstance(input *GetDeploymentInstanceInput) (* // 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. +// +// Deprecated: This operation is deprecated, use GetDeploymentTarget instead. func (c *CodeDeploy) GetDeploymentInstanceWithContext(ctx aws.Context, input *GetDeploymentInstanceInput, opts ...request.Option) (*GetDeploymentInstanceOutput, error) { req, out := c.GetDeploymentInstanceRequest(input) req.SetContext(ctx) @@ -2274,12 +2428,109 @@ func (c *CodeDeploy) GetDeploymentInstanceWithContext(ctx aws.Context, input *Ge return out, req.Send() } +const opGetDeploymentTarget = "GetDeploymentTarget" + +// GetDeploymentTargetRequest generates a "aws/request.Request" representing the +// client's request for the GetDeploymentTarget 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 GetDeploymentTarget for more information on using the GetDeploymentTarget +// 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 GetDeploymentTargetRequest method. +// req, resp := client.GetDeploymentTargetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetDeploymentTarget +func (c *CodeDeploy) GetDeploymentTargetRequest(input *GetDeploymentTargetInput) (req *request.Request, output *GetDeploymentTargetOutput) { + op := &request.Operation{ + Name: opGetDeploymentTarget, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetDeploymentTargetInput{} + } + + output = &GetDeploymentTargetOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetDeploymentTarget API operation for AWS CodeDeploy. +// +// Returns information about a deployment 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 AWS CodeDeploy's +// API operation GetDeploymentTarget for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidDeploymentIdException "InvalidDeploymentIdException" +// At least one of the deployment IDs was specified in an invalid format. +// +// * ErrCodeDeploymentIdRequiredException "DeploymentIdRequiredException" +// At least one deployment ID must be specified. +// +// * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" +// The deployment with the IAM user or AWS account does not exist. +// +// * ErrCodeDeploymentTargetIdRequiredException "DeploymentTargetIdRequiredException" +// A deployment target ID was not provided. +// +// * ErrCodeInvalidDeploymentTargetIdException "InvalidDeploymentTargetIdException" +// The target ID provided was not valid. +// +// * ErrCodeDeploymentTargetDoesNotExistException "DeploymentTargetDoesNotExistException" +// The provided target ID does not belong to the attempted deployment. +// +// * ErrCodeInvalidInstanceNameException "InvalidInstanceNameException" +// The on-premises instance name was specified in an invalid format. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetDeploymentTarget +func (c *CodeDeploy) GetDeploymentTarget(input *GetDeploymentTargetInput) (*GetDeploymentTargetOutput, error) { + req, out := c.GetDeploymentTargetRequest(input) + return out, req.Send() +} + +// GetDeploymentTargetWithContext is the same as GetDeploymentTarget with the addition of +// the ability to pass a context and additional request options. +// +// See GetDeploymentTarget 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 *CodeDeploy) GetDeploymentTargetWithContext(ctx aws.Context, input *GetDeploymentTargetInput, opts ...request.Option) (*GetDeploymentTargetOutput, error) { + req, out := c.GetDeploymentTargetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetOnPremisesInstance = "GetOnPremisesInstance" // GetOnPremisesInstanceRequest generates a "aws/request.Request" representing the // client's request for the GetOnPremisesInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2335,7 +2586,7 @@ func (c *CodeDeploy) GetOnPremisesInstanceRequest(input *GetOnPremisesInstanceIn // The specified on-premises instance is not registered. // // * ErrCodeInvalidInstanceNameException "InvalidInstanceNameException" -// The specified on-premises instance name was specified in an invalid format. +// The on-premises instance name was specified in an invalid format. // // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/GetOnPremisesInstance func (c *CodeDeploy) GetOnPremisesInstance(input *GetOnPremisesInstanceInput) (*GetOnPremisesInstanceOutput, error) { @@ -2364,7 +2615,7 @@ const opListApplicationRevisions = "ListApplicationRevisions" // ListApplicationRevisionsRequest generates a "aws/request.Request" representing the // client's request for the ListApplicationRevisions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2420,7 +2671,7 @@ func (c *CodeDeploy) ListApplicationRevisionsRequest(input *ListApplicationRevis // // Returned Error Codes: // * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the applicable IAM user or AWS account. +// The application does not exist with the IAM user or AWS account. // // * ErrCodeApplicationNameRequiredException "ApplicationNameRequiredException" // The minimum number of required application names was not specified. @@ -2527,7 +2778,7 @@ const opListApplications = "ListApplications" // ListApplicationsRequest generates a "aws/request.Request" representing the // client's request for the ListApplications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2572,7 +2823,7 @@ func (c *CodeDeploy) ListApplicationsRequest(input *ListApplicationsInput) (req // ListApplications API operation for AWS CodeDeploy. // -// Lists the applications registered with the applicable IAM user or AWS account. +// Lists the applications registered with the IAM user or 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 @@ -2662,7 +2913,7 @@ const opListDeploymentConfigs = "ListDeploymentConfigs" // ListDeploymentConfigsRequest generates a "aws/request.Request" representing the // client's request for the ListDeploymentConfigs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2707,7 +2958,7 @@ func (c *CodeDeploy) ListDeploymentConfigsRequest(input *ListDeploymentConfigsIn // ListDeploymentConfigs API operation for AWS CodeDeploy. // -// Lists the deployment configurations with the applicable IAM user or AWS account. +// Lists the deployment configurations with the IAM user or 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 @@ -2797,7 +3048,7 @@ const opListDeploymentGroups = "ListDeploymentGroups" // ListDeploymentGroupsRequest generates a "aws/request.Request" representing the // client's request for the ListDeploymentGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2842,8 +3093,8 @@ func (c *CodeDeploy) ListDeploymentGroupsRequest(input *ListDeploymentGroupsInpu // ListDeploymentGroups API operation for AWS CodeDeploy. // -// Lists the deployment groups for an application registered with the applicable -// IAM user or AWS account. +// Lists the deployment groups for an application registered with the IAM user +// or 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 @@ -2860,7 +3111,7 @@ func (c *CodeDeploy) ListDeploymentGroupsRequest(input *ListDeploymentGroupsInpu // The application name was specified in an invalid format. // // * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the applicable IAM user or AWS account. +// The application does not exist with the IAM user or AWS account. // // * ErrCodeInvalidNextTokenException "InvalidNextTokenException" // The next token was specified in an invalid format. @@ -2942,7 +3193,7 @@ const opListDeploymentInstances = "ListDeploymentInstances" // ListDeploymentInstancesRequest generates a "aws/request.Request" representing the // client's request for the ListDeploymentInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2963,7 +3214,12 @@ const opListDeploymentInstances = "ListDeploymentInstances" // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ListDeploymentInstances +// +// Deprecated: This operation is deprecated, use ListDeploymentTargets instead. func (c *CodeDeploy) ListDeploymentInstancesRequest(input *ListDeploymentInstancesInput) (req *request.Request, output *ListDeploymentInstancesOutput) { + if c.Client.Config.Logger != nil { + c.Client.Config.Logger.Log("This operation, ListDeploymentInstances, has been deprecated") + } op := &request.Operation{ Name: opListDeploymentInstances, HTTPMethod: "POST", @@ -2987,8 +3243,11 @@ func (c *CodeDeploy) ListDeploymentInstancesRequest(input *ListDeploymentInstanc // ListDeploymentInstances API operation for AWS CodeDeploy. // -// Lists the instance for a deployment associated with the applicable IAM user -// or AWS account. +// The newer BatchGetDeploymentTargets should be used instead because it works +// with all compute types. ListDeploymentInstances throws an exception if it +// is used with a compute platform other than EC2/On-premises or AWS Lambda. +// +// Lists the instance for a deployment associated with the IAM user or 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 @@ -3002,7 +3261,7 @@ func (c *CodeDeploy) ListDeploymentInstancesRequest(input *ListDeploymentInstanc // At least one deployment ID must be specified. // // * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" -// The deployment does not exist with the applicable IAM user or AWS account. +// The deployment with the IAM user or AWS account does not exist. // // * ErrCodeDeploymentNotStartedException "DeploymentNotStartedException" // The specified deployment has not started. @@ -3025,7 +3284,15 @@ func (c *CodeDeploy) ListDeploymentInstancesRequest(input *ListDeploymentInstanc // An instance type was specified for an in-place deployment. Instance types // are supported for blue/green deployments only. // +// * ErrCodeInvalidTargetFilterNameException "InvalidTargetFilterNameException" +// The target filter name is invalid. +// +// * ErrCodeInvalidComputePlatformException "InvalidComputePlatformException" +// The computePlatform is invalid. The computePlatform should be Lambda or Server. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ListDeploymentInstances +// +// Deprecated: This operation is deprecated, use ListDeploymentTargets instead. func (c *CodeDeploy) ListDeploymentInstances(input *ListDeploymentInstancesInput) (*ListDeploymentInstancesOutput, error) { req, out := c.ListDeploymentInstancesRequest(input) return out, req.Send() @@ -3040,6 +3307,8 @@ func (c *CodeDeploy) ListDeploymentInstances(input *ListDeploymentInstancesInput // 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. +// +// Deprecated: This operation is deprecated, use ListDeploymentTargets instead. func (c *CodeDeploy) ListDeploymentInstancesWithContext(ctx aws.Context, input *ListDeploymentInstancesInput, opts ...request.Option) (*ListDeploymentInstancesOutput, error) { req, out := c.ListDeploymentInstancesRequest(input) req.SetContext(ctx) @@ -3064,6 +3333,8 @@ func (c *CodeDeploy) ListDeploymentInstancesWithContext(ctx aws.Context, input * // return pageNum <= 3 // }) // +// +// Deprecated: This operation is deprecated, use ListDeploymentTargets instead. func (c *CodeDeploy) ListDeploymentInstancesPages(input *ListDeploymentInstancesInput, fn func(*ListDeploymentInstancesOutput, bool) bool) error { return c.ListDeploymentInstancesPagesWithContext(aws.BackgroundContext(), input, fn) } @@ -3075,6 +3346,8 @@ func (c *CodeDeploy) ListDeploymentInstancesPages(input *ListDeploymentInstances // 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. +// +// Deprecated: This operation is deprecated, use ListDeploymentTargets instead. func (c *CodeDeploy) ListDeploymentInstancesPagesWithContext(ctx aws.Context, input *ListDeploymentInstancesInput, fn func(*ListDeploymentInstancesOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { @@ -3097,122 +3370,224 @@ func (c *CodeDeploy) ListDeploymentInstancesPagesWithContext(ctx aws.Context, in return p.Err() } -const opListDeployments = "ListDeployments" +const opListDeploymentTargets = "ListDeploymentTargets" -// ListDeploymentsRequest generates a "aws/request.Request" representing the -// client's request for the ListDeployments operation. The "output" return +// ListDeploymentTargetsRequest generates a "aws/request.Request" representing the +// client's request for the ListDeploymentTargets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 ListDeployments for more information on using the ListDeployments +// See ListDeploymentTargets for more information on using the ListDeploymentTargets // 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 ListDeploymentsRequest method. -// req, resp := client.ListDeploymentsRequest(params) +// // Example sending a request using the ListDeploymentTargetsRequest method. +// req, resp := client.ListDeploymentTargetsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ListDeployments -func (c *CodeDeploy) ListDeploymentsRequest(input *ListDeploymentsInput) (req *request.Request, output *ListDeploymentsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ListDeploymentTargets +func (c *CodeDeploy) ListDeploymentTargetsRequest(input *ListDeploymentTargetsInput) (req *request.Request, output *ListDeploymentTargetsOutput) { op := &request.Operation{ - Name: opListDeployments, + Name: opListDeploymentTargets, HTTPMethod: "POST", HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"nextToken"}, - OutputTokens: []string{"nextToken"}, - LimitToken: "", - TruncationToken: "", - }, } if input == nil { - input = &ListDeploymentsInput{} + input = &ListDeploymentTargetsInput{} } - output = &ListDeploymentsOutput{} + output = &ListDeploymentTargetsOutput{} req = c.newRequest(op, input, output) return } -// ListDeployments API operation for AWS CodeDeploy. +// ListDeploymentTargets API operation for AWS CodeDeploy. // -// Lists the deployments in a deployment group for an application registered -// with the applicable IAM user or AWS account. +// Returns an array of target IDs that are associated a deployment. // // 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 CodeDeploy's -// API operation ListDeployments for usage and error information. +// API operation ListDeploymentTargets for usage and error information. // // Returned Error Codes: -// * ErrCodeApplicationNameRequiredException "ApplicationNameRequiredException" -// The minimum number of required application names was not specified. -// -// * ErrCodeInvalidApplicationNameException "InvalidApplicationNameException" -// The application name was specified in an invalid format. +// * ErrCodeDeploymentIdRequiredException "DeploymentIdRequiredException" +// At least one deployment ID must be specified. // -// * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the applicable IAM user or AWS account. +// * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" +// The deployment with the IAM user or AWS account does not exist. // -// * ErrCodeInvalidDeploymentGroupNameException "InvalidDeploymentGroupNameException" -// The deployment group name was specified in an invalid format. +// * ErrCodeDeploymentNotStartedException "DeploymentNotStartedException" +// The specified deployment has not started. // -// * ErrCodeDeploymentGroupDoesNotExistException "DeploymentGroupDoesNotExistException" -// The named deployment group does not exist with the applicable IAM user or -// AWS account. +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The next token was specified in an invalid format. // -// * ErrCodeDeploymentGroupNameRequiredException "DeploymentGroupNameRequiredException" -// The deployment group name was not specified. +// * ErrCodeInvalidDeploymentIdException "InvalidDeploymentIdException" +// At least one of the deployment IDs was specified in an invalid format. // -// * ErrCodeInvalidTimeRangeException "InvalidTimeRangeException" -// The specified time range was specified in an invalid format. +// * ErrCodeInvalidInstanceStatusException "InvalidInstanceStatusException" +// The specified instance status does not exist. // -// * ErrCodeInvalidDeploymentStatusException "InvalidDeploymentStatusException" -// The specified deployment status doesn't exist or cannot be determined. +// * ErrCodeInvalidInstanceTypeException "InvalidInstanceTypeException" +// An invalid instance type was specified for instances in a blue/green deployment. +// Valid values include "Blue" for an original environment and "Green" for a +// replacement environment. // -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The next token was specified in an invalid format. +// * ErrCodeInvalidDeploymentInstanceTypeException "InvalidDeploymentInstanceTypeException" +// An instance type was specified for an in-place deployment. Instance types +// are supported for blue/green deployments only. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ListDeployments -func (c *CodeDeploy) ListDeployments(input *ListDeploymentsInput) (*ListDeploymentsOutput, error) { - req, out := c.ListDeploymentsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ListDeploymentTargets +func (c *CodeDeploy) ListDeploymentTargets(input *ListDeploymentTargetsInput) (*ListDeploymentTargetsOutput, error) { + req, out := c.ListDeploymentTargetsRequest(input) return out, req.Send() } -// ListDeploymentsWithContext is the same as ListDeployments with the addition of +// ListDeploymentTargetsWithContext is the same as ListDeploymentTargets with the addition of // the ability to pass a context and additional request options. // -// See ListDeployments for details on how to use this API operation. +// See ListDeploymentTargets 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 *CodeDeploy) ListDeploymentsWithContext(ctx aws.Context, input *ListDeploymentsInput, opts ...request.Option) (*ListDeploymentsOutput, error) { - req, out := c.ListDeploymentsRequest(input) +func (c *CodeDeploy) ListDeploymentTargetsWithContext(ctx aws.Context, input *ListDeploymentTargetsInput, opts ...request.Option) (*ListDeploymentTargetsOutput, error) { + req, out := c.ListDeploymentTargetsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// ListDeploymentsPages iterates over the pages of a ListDeployments operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListDeployments method for more information on how to use this operation. +const opListDeployments = "ListDeployments" + +// ListDeploymentsRequest generates a "aws/request.Request" representing the +// client's request for the ListDeployments 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 ListDeployments for more information on using the ListDeployments +// 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 ListDeploymentsRequest method. +// req, resp := client.ListDeploymentsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ListDeployments +func (c *CodeDeploy) ListDeploymentsRequest(input *ListDeploymentsInput) (req *request.Request, output *ListDeploymentsOutput) { + op := &request.Operation{ + Name: opListDeployments, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListDeploymentsInput{} + } + + output = &ListDeploymentsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListDeployments API operation for AWS CodeDeploy. +// +// Lists the deployments in a deployment group for an application registered +// with the IAM user or 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 CodeDeploy's +// API operation ListDeployments for usage and error information. +// +// Returned Error Codes: +// * ErrCodeApplicationNameRequiredException "ApplicationNameRequiredException" +// The minimum number of required application names was not specified. +// +// * ErrCodeInvalidApplicationNameException "InvalidApplicationNameException" +// The application name was specified in an invalid format. +// +// * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" +// The application does not exist with the IAM user or AWS account. +// +// * ErrCodeInvalidDeploymentGroupNameException "InvalidDeploymentGroupNameException" +// The deployment group name was specified in an invalid format. +// +// * ErrCodeDeploymentGroupDoesNotExistException "DeploymentGroupDoesNotExistException" +// The named deployment group with the IAM user or AWS account does not exist. +// +// * ErrCodeDeploymentGroupNameRequiredException "DeploymentGroupNameRequiredException" +// The deployment group name was not specified. +// +// * ErrCodeInvalidTimeRangeException "InvalidTimeRangeException" +// The specified time range was specified in an invalid format. +// +// * ErrCodeInvalidDeploymentStatusException "InvalidDeploymentStatusException" +// The specified deployment status doesn't exist or cannot be determined. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The next token was specified in an invalid format. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/ListDeployments +func (c *CodeDeploy) ListDeployments(input *ListDeploymentsInput) (*ListDeploymentsOutput, error) { + req, out := c.ListDeploymentsRequest(input) + return out, req.Send() +} + +// ListDeploymentsWithContext is the same as ListDeployments with the addition of +// the ability to pass a context and additional request options. +// +// See ListDeployments 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 *CodeDeploy) ListDeploymentsWithContext(ctx aws.Context, input *ListDeploymentsInput, opts ...request.Option) (*ListDeploymentsOutput, error) { + req, out := c.ListDeploymentsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListDeploymentsPages iterates over the pages of a ListDeployments operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListDeployments method for more information on how to use this operation. // // Note: This operation can generate multiple requests to a service. // @@ -3263,7 +3638,7 @@ const opListGitHubAccountTokenNames = "ListGitHubAccountTokenNames" // ListGitHubAccountTokenNamesRequest generates a "aws/request.Request" representing the // client's request for the ListGitHubAccountTokenNames operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3348,7 +3723,7 @@ const opListOnPremisesInstances = "ListOnPremisesInstances" // ListOnPremisesInstancesRequest generates a "aws/request.Request" representing the // client's request for the ListOnPremisesInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3390,7 +3765,7 @@ func (c *CodeDeploy) ListOnPremisesInstancesRequest(input *ListOnPremisesInstanc // Gets a list of names for one or more on-premises instances. // // Unless otherwise specified, both registered and deregistered on-premises -// instance names will be listed. To list only registered or deregistered on-premises +// instance names are listed. To list only registered or deregistered on-premises // instance names, use the registration status parameter. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3405,7 +3780,7 @@ func (c *CodeDeploy) ListOnPremisesInstancesRequest(input *ListOnPremisesInstanc // The registration status was specified in an invalid format. // // * ErrCodeInvalidTagFilterException "InvalidTagFilterException" -// The specified tag filter was specified in an invalid format. +// The tag filter was specified in an invalid format. // // * ErrCodeInvalidNextTokenException "InvalidNextTokenException" // The next token was specified in an invalid format. @@ -3437,7 +3812,7 @@ const opPutLifecycleEventHookExecutionStatus = "PutLifecycleEventHookExecutionSt // PutLifecycleEventHookExecutionStatusRequest generates a "aws/request.Request" representing the // client's request for the PutLifecycleEventHookExecutionStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3503,7 +3878,7 @@ func (c *CodeDeploy) PutLifecycleEventHookExecutionStatusRequest(input *PutLifec // At least one deployment ID must be specified. // // * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" -// The deployment does not exist with the applicable IAM user or AWS account. +// The deployment with the IAM user or AWS account does not exist. // // * ErrCodeInvalidDeploymentIdException "InvalidDeploymentIdException" // At least one of the deployment IDs was specified in an invalid format. @@ -3538,7 +3913,7 @@ const opRegisterApplicationRevision = "RegisterApplicationRevision" // RegisterApplicationRevisionRequest generates a "aws/request.Request" representing the // client's request for the RegisterApplicationRevision operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3572,8 +3947,7 @@ func (c *CodeDeploy) RegisterApplicationRevisionRequest(input *RegisterApplicati output = &RegisterApplicationRevisionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3590,7 +3964,7 @@ func (c *CodeDeploy) RegisterApplicationRevisionRequest(input *RegisterApplicati // // Returned Error Codes: // * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the applicable IAM user or AWS account. +// The application does not exist with the IAM user or AWS account. // // * ErrCodeApplicationNameRequiredException "ApplicationNameRequiredException" // The minimum number of required application names was not specified. @@ -3634,7 +4008,7 @@ const opRegisterOnPremisesInstance = "RegisterOnPremisesInstance" // RegisterOnPremisesInstanceRequest generates a "aws/request.Request" representing the // client's request for the RegisterOnPremisesInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3668,8 +4042,7 @@ func (c *CodeDeploy) RegisterOnPremisesInstanceRequest(input *RegisterOnPremises output = &RegisterOnPremisesInstanceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3709,7 +4082,7 @@ func (c *CodeDeploy) RegisterOnPremisesInstanceRequest(input *RegisterOnPremises // An IAM user ARN was not specified. // // * ErrCodeInvalidInstanceNameException "InvalidInstanceNameException" -// The specified on-premises instance name was specified in an invalid format. +// The on-premises instance name was specified in an invalid format. // // * ErrCodeInvalidIamSessionArnException "InvalidIamSessionArnException" // The IAM session ARN was specified in an invalid format. @@ -3748,7 +4121,7 @@ const opRemoveTagsFromOnPremisesInstances = "RemoveTagsFromOnPremisesInstances" // RemoveTagsFromOnPremisesInstancesRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromOnPremisesInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3782,8 +4155,7 @@ func (c *CodeDeploy) RemoveTagsFromOnPremisesInstancesRequest(input *RemoveTagsF output = &RemoveTagsFromOnPremisesInstancesOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3803,13 +4175,13 @@ func (c *CodeDeploy) RemoveTagsFromOnPremisesInstancesRequest(input *RemoveTagsF // An on-premises instance name was not specified. // // * ErrCodeInvalidInstanceNameException "InvalidInstanceNameException" -// The specified on-premises instance name was specified in an invalid format. +// The on-premises instance name was specified in an invalid format. // // * ErrCodeTagRequiredException "TagRequiredException" // A tag was not specified. // // * ErrCodeInvalidTagException "InvalidTagException" -// The specified tag was specified in an invalid format. +// The tag was specified in an invalid format. // // * ErrCodeTagLimitExceededException "TagLimitExceededException" // The maximum allowed number of tags was exceeded. @@ -3848,7 +4220,7 @@ const opSkipWaitTimeForInstanceTermination = "SkipWaitTimeForInstanceTermination // SkipWaitTimeForInstanceTerminationRequest generates a "aws/request.Request" representing the // client's request for the SkipWaitTimeForInstanceTermination operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3869,7 +4241,12 @@ const opSkipWaitTimeForInstanceTermination = "SkipWaitTimeForInstanceTermination // } // // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/SkipWaitTimeForInstanceTermination +// +// Deprecated: This operation is deprecated, use ContinueDeployment with DeploymentWaitType instead. func (c *CodeDeploy) SkipWaitTimeForInstanceTerminationRequest(input *SkipWaitTimeForInstanceTerminationInput) (req *request.Request, output *SkipWaitTimeForInstanceTerminationOutput) { + if c.Client.Config.Logger != nil { + c.Client.Config.Logger.Log("This operation, SkipWaitTimeForInstanceTermination, has been deprecated") + } op := &request.Operation{ Name: opSkipWaitTimeForInstanceTermination, HTTPMethod: "POST", @@ -3882,15 +4259,14 @@ func (c *CodeDeploy) SkipWaitTimeForInstanceTerminationRequest(input *SkipWaitTi output = &SkipWaitTimeForInstanceTerminationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // SkipWaitTimeForInstanceTermination API operation for AWS CodeDeploy. // // In a blue/green deployment, overrides any specified wait time and starts -// terminating instances immediately after the traffic routing is completed. +// terminating instances immediately after the traffic routing is complete. // // 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 @@ -3904,7 +4280,7 @@ func (c *CodeDeploy) SkipWaitTimeForInstanceTerminationRequest(input *SkipWaitTi // At least one deployment ID must be specified. // // * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" -// The deployment does not exist with the applicable IAM user or AWS account. +// The deployment with the IAM user or AWS account does not exist. // // * ErrCodeDeploymentAlreadyCompletedException "DeploymentAlreadyCompletedException" // The deployment is already complete. @@ -3919,6 +4295,8 @@ func (c *CodeDeploy) SkipWaitTimeForInstanceTerminationRequest(input *SkipWaitTi // A call was submitted that is not supported for the specified deployment type. // // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/SkipWaitTimeForInstanceTermination +// +// Deprecated: This operation is deprecated, use ContinueDeployment with DeploymentWaitType instead. func (c *CodeDeploy) SkipWaitTimeForInstanceTermination(input *SkipWaitTimeForInstanceTerminationInput) (*SkipWaitTimeForInstanceTerminationOutput, error) { req, out := c.SkipWaitTimeForInstanceTerminationRequest(input) return out, req.Send() @@ -3933,6 +4311,8 @@ func (c *CodeDeploy) SkipWaitTimeForInstanceTermination(input *SkipWaitTimeForIn // 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. +// +// Deprecated: This operation is deprecated, use ContinueDeployment with DeploymentWaitType instead. func (c *CodeDeploy) SkipWaitTimeForInstanceTerminationWithContext(ctx aws.Context, input *SkipWaitTimeForInstanceTerminationInput, opts ...request.Option) (*SkipWaitTimeForInstanceTerminationOutput, error) { req, out := c.SkipWaitTimeForInstanceTerminationRequest(input) req.SetContext(ctx) @@ -3945,7 +4325,7 @@ const opStopDeployment = "StopDeployment" // StopDeploymentRequest generates a "aws/request.Request" representing the // client's request for the StopDeployment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3998,7 +4378,10 @@ func (c *CodeDeploy) StopDeploymentRequest(input *StopDeploymentInput) (req *req // At least one deployment ID must be specified. // // * ErrCodeDeploymentDoesNotExistException "DeploymentDoesNotExistException" -// The deployment does not exist with the applicable IAM user or AWS account. +// The deployment with the IAM user or AWS account does not exist. +// +// * ErrCodeDeploymentGroupDoesNotExistException "DeploymentGroupDoesNotExistException" +// The named deployment group with the IAM user or AWS account does not exist. // // * ErrCodeDeploymentAlreadyCompletedException "DeploymentAlreadyCompletedException" // The deployment is already complete. @@ -4033,7 +4416,7 @@ const opUpdateApplication = "UpdateApplication" // UpdateApplicationRequest generates a "aws/request.Request" representing the // client's request for the UpdateApplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4067,8 +4450,7 @@ func (c *CodeDeploy) UpdateApplicationRequest(input *UpdateApplicationInput) (re output = &UpdateApplicationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4091,11 +4473,11 @@ func (c *CodeDeploy) UpdateApplicationRequest(input *UpdateApplicationInput) (re // The application name was specified in an invalid format. // // * ErrCodeApplicationAlreadyExistsException "ApplicationAlreadyExistsException" -// An application with the specified name already exists with the applicable -// IAM user or AWS account. +// An application with the specified name with the IAM user or AWS account already +// exists. // // * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the applicable IAM user or AWS account. +// The application does not exist with the IAM user or AWS account. // // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/UpdateApplication func (c *CodeDeploy) UpdateApplication(input *UpdateApplicationInput) (*UpdateApplicationOutput, error) { @@ -4124,7 +4506,7 @@ const opUpdateDeploymentGroup = "UpdateDeploymentGroup" // UpdateDeploymentGroupRequest generates a "aws/request.Request" representing the // client's request for the UpdateDeploymentGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4180,27 +4562,26 @@ func (c *CodeDeploy) UpdateDeploymentGroupRequest(input *UpdateDeploymentGroupIn // The application name was specified in an invalid format. // // * ErrCodeApplicationDoesNotExistException "ApplicationDoesNotExistException" -// The application does not exist with the applicable IAM user or AWS account. +// The application does not exist with the IAM user or AWS account. // // * ErrCodeInvalidDeploymentGroupNameException "InvalidDeploymentGroupNameException" // The deployment group name was specified in an invalid format. // // * ErrCodeDeploymentGroupAlreadyExistsException "DeploymentGroupAlreadyExistsException" -// A deployment group with the specified name already exists with the applicable -// IAM user or AWS account. +// A deployment group with the specified name with the IAM user or AWS account +// already exists. // // * ErrCodeDeploymentGroupNameRequiredException "DeploymentGroupNameRequiredException" // The deployment group name was not specified. // // * ErrCodeDeploymentGroupDoesNotExistException "DeploymentGroupDoesNotExistException" -// The named deployment group does not exist with the applicable IAM user or -// AWS account. +// The named deployment group with the IAM user or AWS account does not exist. // // * ErrCodeInvalidEC2TagException "InvalidEC2TagException" // The tag was specified in an invalid format. // // * ErrCodeInvalidTagException "InvalidTagException" -// The specified tag was specified in an invalid format. +// The tag was specified in an invalid format. // // * ErrCodeInvalidAutoScalingGroupException "InvalidAutoScalingGroupException" // The Auto Scaling group was specified in an invalid format or does not exist. @@ -4209,13 +4590,12 @@ func (c *CodeDeploy) UpdateDeploymentGroupRequest(input *UpdateDeploymentGroupIn // The deployment configuration name was specified in an invalid format. // // * ErrCodeDeploymentConfigDoesNotExistException "DeploymentConfigDoesNotExistException" -// The deployment configuration does not exist with the applicable IAM user -// or AWS account. +// The deployment configuration does not exist with the IAM user or AWS account. // // * ErrCodeInvalidRoleException "InvalidRoleException" // The service role ARN was specified in an invalid format. Or, if an Auto Scaling // group was specified, the specified service role does not grant the appropriate -// permissions to Auto Scaling. +// permissions to Amazon EC2 Auto Scaling. // // * ErrCodeLifecycleHookLimitExceededException "LifecycleHookLimitExceededException" // The limit for lifecycle hooks was exceeded. @@ -4233,18 +4613,18 @@ func (c *CodeDeploy) UpdateDeploymentGroupRequest(input *UpdateDeploymentGroupIn // // * The alarm object is null. // -// * The alarm name is empty or null or exceeds the 255 character limit. +// * The alarm name is empty or null or exceeds the limit of 255 characters. // // * Two alarms with the same name have been specified. // -// * The alarm configuration is enabled but the alarm list is empty. +// * The alarm configuration is enabled, but the alarm list is empty. // // * ErrCodeAlarmsLimitExceededException "AlarmsLimitExceededException" // The maximum number of alarms for a deployment group (10) was exceeded. // // * ErrCodeInvalidAutoRollbackConfigException "InvalidAutoRollbackConfigException" // The automatic rollback configuration was specified in an invalid format. -// For example, automatic rollback is enabled but an invalid triggering event +// For example, automatic rollback is enabled, but an invalid triggering event // type or no event types were listed. // // * ErrCodeInvalidLoadBalancerInfoException "InvalidLoadBalancerInfoException" @@ -4252,8 +4632,8 @@ func (c *CodeDeploy) UpdateDeploymentGroupRequest(input *UpdateDeploymentGroupIn // // * ErrCodeInvalidDeploymentStyleException "InvalidDeploymentStyleException" // An invalid deployment style was specified. Valid deployment types include -// "IN_PLACE" and "BLUE_GREEN". Valid deployment options include "WITH_TRAFFIC_CONTROL" -// and "WITHOUT_TRAFFIC_CONTROL". +// "IN_PLACE" and "BLUE_GREEN." Valid deployment options include "WITH_TRAFFIC_CONTROL" +// and "WITHOUT_TRAFFIC_CONTROL." // // * ErrCodeInvalidBlueGreenDeploymentConfigurationException "InvalidBlueGreenDeploymentConfigurationException" // The configuration for the blue/green deployment group was provided in an @@ -4273,7 +4653,20 @@ func (c *CodeDeploy) UpdateDeploymentGroupRequest(input *UpdateDeploymentGroupIn // allowed limit of 3. // // * ErrCodeInvalidInputException "InvalidInputException" -// The specified input was specified in an invalid format. +// The input was specified in an invalid format. +// +// * ErrCodeThrottlingException "ThrottlingException" +// An API function was called too frequently. +// +// * ErrCodeInvalidECSServiceException "InvalidECSServiceException" +// The Amazon ECS service identifier is not valid. +// +// * ErrCodeInvalidTargetGroupPairException "InvalidTargetGroupPairException" +// A target group pair associated with this deployment is not valid. +// +// * ErrCodeECSServiceMappingLimitExceededException "ECSServiceMappingLimitExceededException" +// The Amazon ECS service is associated with more than one deployment groups. +// An Amazon ECS service can be associated with only one deployment group. // // See also, https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/UpdateDeploymentGroup func (c *CodeDeploy) UpdateDeploymentGroup(input *UpdateDeploymentGroupInput) (*UpdateDeploymentGroupOutput, error) { @@ -4407,11 +4800,11 @@ type AlarmConfiguration struct { // state of alarms cannot be retrieved from Amazon CloudWatch. The default value // is false. // - // * true: The deployment will proceed even if alarm status information can't + // * true: The deployment proceeds even if alarm status information can't // be retrieved from Amazon CloudWatch. // - // * false: The deployment will stop if alarm status information can't be - // retrieved from Amazon CloudWatch. + // * false: The deployment stops if alarm status information can't be retrieved + // from Amazon CloudWatch. IgnorePollAlarmFailure *bool `locationName:"ignorePollAlarmFailure" type:"boolean"` } @@ -4443,6 +4836,53 @@ func (s *AlarmConfiguration) SetIgnorePollAlarmFailure(v bool) *AlarmConfigurati return s } +// A revision for an AWS Lambda or Amazon ECS deployment that is a YAML-formatted +// or JSON-formatted string. For AWS Lambda and Amazon ECS deployments, the +// revision is the same as the AppSpec file. This method replaces the deprecated +// RawString data type. +type AppSpecContent struct { + _ struct{} `type:"structure"` + + // The YAML-formatted or JSON-formatted revision string. + // + // For an AWS Lambda deployment, the content includes a Lambda function name, + // the alias for its original version, and the alias for its replacement version. + // The deployment shifts traffic from the original version of the Lambda function + // to the replacement version. + // + // For an Amazon ECS deployment, the content includes the task name, information + // about the load balancer that serves traffic to the container, and more. + // + // For both types of deployments, the content can specify Lambda functions that + // run at specified hooks, such as BeforeInstall, during a deployment. + Content *string `locationName:"content" type:"string"` + + // The SHA256 hash value of the revision content. + Sha256 *string `locationName:"sha256" type:"string"` +} + +// String returns the string representation +func (s AppSpecContent) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AppSpecContent) GoString() string { + return s.String() +} + +// SetContent sets the Content field's value. +func (s *AppSpecContent) SetContent(v string) *AppSpecContent { + s.Content = &v + return s +} + +// SetSha256 sets the Sha256 field's value. +func (s *AppSpecContent) SetSha256(v string) *AppSpecContent { + s.Sha256 = &v + return s +} + // Information about an application. type ApplicationInfo struct { _ struct{} `type:"structure"` @@ -4463,8 +4903,8 @@ type ApplicationInfo struct { // The name for a connection to a GitHub account. GitHubAccountName *string `locationName:"gitHubAccountName" type:"string"` - // True if the user has authenticated with GitHub for the specified application; - // otherwise, false. + // True if the user has authenticated with GitHub for the specified application. + // Otherwise, false. LinkedToGitHub *bool `locationName:"linkedToGitHub" type:"boolean"` } @@ -4515,7 +4955,7 @@ func (s *ApplicationInfo) SetLinkedToGitHub(v bool) *ApplicationInfo { } // Information about a configuration for automatically rolling back to a previous -// version of an application revision when a deployment doesn't complete successfully. +// version of an application revision when a deployment is not completed successfully. type AutoRollbackConfiguration struct { _ struct{} `type:"structure"` @@ -4645,7 +5085,7 @@ type BatchGetApplicationRevisionsOutput struct { // The name of the application that corresponds to the revisions. ApplicationName *string `locationName:"applicationName" min:"1" type:"string"` - // Information about errors that may have occurred during the API call. + // Information about errors that might have occurred during the API call. ErrorMessage *string `locationName:"errorMessage" type:"string"` // Additional information about the revisions, including the type and location. @@ -4753,7 +5193,7 @@ type BatchGetDeploymentGroupsInput struct { // ApplicationName is a required field ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` - // The deployment groups' names. + // The names of the deployment groups. // // DeploymentGroupNames is a required field DeploymentGroupNames []*string `locationName:"deploymentGroupNames" type:"list" required:"true"` @@ -4807,7 +5247,7 @@ type BatchGetDeploymentGroupsOutput struct { // Information about the deployment groups. DeploymentGroupsInfo []*DeploymentGroupInfo `locationName:"deploymentGroupsInfo" type:"list"` - // Information about errors that may have occurred during the API call. + // Information about errors that might have occurred during the API call. ErrorMessage *string `locationName:"errorMessage" type:"string"` } @@ -4842,7 +5282,7 @@ type BatchGetDeploymentInstancesInput struct { // DeploymentId is a required field DeploymentId *string `locationName:"deploymentId" type:"string" required:"true"` - // The unique IDs of instances in the deployment group. + // The unique IDs of instances used in the deployment. // // InstanceIds is a required field InstanceIds []*string `locationName:"instanceIds" type:"list" required:"true"` @@ -4890,7 +5330,7 @@ func (s *BatchGetDeploymentInstancesInput) SetInstanceIds(v []*string) *BatchGet type BatchGetDeploymentInstancesOutput struct { _ struct{} `type:"structure"` - // Information about errors that may have occurred during the API call. + // Information about errors that might have occurred during the API call. ErrorMessage *string `locationName:"errorMessage" type:"string"` // Information about the instance. @@ -4919,6 +5359,84 @@ func (s *BatchGetDeploymentInstancesOutput) SetInstancesSummary(v []*InstanceSum return s } +type BatchGetDeploymentTargetsInput struct { + _ struct{} `type:"structure"` + + // The unique ID of a deployment. + DeploymentId *string `locationName:"deploymentId" type:"string"` + + // The unique IDs of the deployment targets. The compute platform of the deployment + // determines the type of the targets and their formats. + // + // * For deployments that use the EC2/On-premises compute platform, the + // target IDs are EC2 or on-premises instances IDs, and their target type + // is instanceTarget. + // + // * For deployments that use the AWS Lambda compute platform, the target + // IDs are the names of Lambda functions, and their target type is instanceTarget. + // + // + // * For deployments that use the Amazon ECS compute platform, the target + // IDs are pairs of Amazon ECS clusters and services specified using the + // format :. Their target type is ecsTarget. + TargetIds []*string `locationName:"targetIds" type:"list"` +} + +// String returns the string representation +func (s BatchGetDeploymentTargetsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchGetDeploymentTargetsInput) GoString() string { + return s.String() +} + +// SetDeploymentId sets the DeploymentId field's value. +func (s *BatchGetDeploymentTargetsInput) SetDeploymentId(v string) *BatchGetDeploymentTargetsInput { + s.DeploymentId = &v + return s +} + +// SetTargetIds sets the TargetIds field's value. +func (s *BatchGetDeploymentTargetsInput) SetTargetIds(v []*string) *BatchGetDeploymentTargetsInput { + s.TargetIds = v + return s +} + +type BatchGetDeploymentTargetsOutput struct { + _ struct{} `type:"structure"` + + // A list of target objects for a deployment. Each target object contains details + // about the target, such as its status and lifecycle events. The type of the + // target objects depends on the deployment' compute platform. + // + // * EC2/On-premises: Each target object is an EC2 or on-premises instance. + // + // + // * AWS Lambda: The target object is a specific version of an AWS Lambda + // function. + // + // * Amazon ECS: The target object is an Amazon ECS service. + DeploymentTargets []*DeploymentTarget `locationName:"deploymentTargets" type:"list"` +} + +// String returns the string representation +func (s BatchGetDeploymentTargetsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchGetDeploymentTargetsOutput) GoString() string { + return s.String() +} + +// SetDeploymentTargets sets the DeploymentTargets field's value. +func (s *BatchGetDeploymentTargetsOutput) SetDeploymentTargets(v []*DeploymentTarget) *BatchGetDeploymentTargetsOutput { + s.DeploymentTargets = v + return s +} + // Represents the input of a BatchGetDeployments operation. type BatchGetDeploymentsInput struct { _ struct{} `type:"structure"` @@ -5135,9 +5653,14 @@ func (s *BlueInstanceTerminationOption) SetTerminationWaitTimeInMinutes(v int64) type ContinueDeploymentInput struct { _ struct{} `type:"structure"` - // The deployment ID of the blue/green deployment for which you want to start - // rerouting traffic to the replacement environment. + // The unique ID of a blue/green deployment for which you want to start rerouting + // traffic to the replacement environment. DeploymentId *string `locationName:"deploymentId" type:"string"` + + // The status of the deployment's waiting period. READY_WAIT indicates the deployment + // is ready to start shifting traffic. TERMINATION_WAIT indicates the traffic + // is shifted, but the original target is not terminated. + DeploymentWaitType *string `locationName:"deploymentWaitType" type:"string" enum:"DeploymentWaitType"` } // String returns the string representation @@ -5156,6 +5679,12 @@ func (s *ContinueDeploymentInput) SetDeploymentId(v string) *ContinueDeploymentI return s } +// SetDeploymentWaitType sets the DeploymentWaitType field's value. +func (s *ContinueDeploymentInput) SetDeploymentWaitType(v string) *ContinueDeploymentInput { + s.DeploymentWaitType = &v + return s +} + type ContinueDeploymentOutput struct { _ struct{} `type:"structure"` } @@ -5279,7 +5808,7 @@ type CreateDeploymentConfigInput struct { // FLEET_PERCENT and a value of 95. MinimumHealthyHosts *MinimumHealthyHosts `locationName:"minimumHealthyHosts" type:"structure"` - // The configuration that specifies how the deployment traffic will be routed. + // The configuration that specifies how the deployment traffic is routed. TrafficRoutingConfig *TrafficRoutingConfig `locationName:"trafficRoutingConfig" type:"structure"` } @@ -5365,8 +5894,8 @@ type CreateDeploymentGroupInput struct { // is created. AlarmConfiguration *AlarmConfiguration `locationName:"alarmConfiguration" type:"structure"` - // The name of an AWS CodeDeploy application associated with the applicable - // IAM user or AWS account. + // The name of an AWS CodeDeploy application associated with the IAM user or + // AWS account. // // ApplicationName is a required field ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` @@ -5375,7 +5904,7 @@ type CreateDeploymentGroupInput struct { // deployment group is created. AutoRollbackConfiguration *AutoRollbackConfiguration `locationName:"autoRollbackConfiguration" type:"structure"` - // A list of associated Auto Scaling groups. + // A list of associated Amazon EC2 Auto Scaling groups. AutoScalingGroups []*string `locationName:"autoScalingGroups" type:"list"` // Information about blue/green deployment options for a deployment group. @@ -5387,7 +5916,7 @@ type CreateDeploymentGroupInput struct { // operation. // // CodeDeployDefault.OneAtATime is the default deployment configuration. It - // is used if a configuration isn't specified for the deployment or the deployment + // is used if a configuration isn't specified for the deployment or deployment // group. // // For more information about the predefined deployment configurations in AWS @@ -5404,26 +5933,32 @@ type CreateDeploymentGroupInput struct { // want to run and whether to route deployment traffic behind a load balancer. DeploymentStyle *DeploymentStyle `locationName:"deploymentStyle" type:"structure"` - // The Amazon EC2 tags on which to filter. The deployment group will include - // EC2 instances with any of the specified tags. Cannot be used in the same - // call as ec2TagSet. + // The Amazon EC2 tags on which to filter. The deployment group includes EC2 + // instances with any of the specified tags. Cannot be used in the same call + // as ec2TagSet. Ec2TagFilters []*EC2TagFilter `locationName:"ec2TagFilters" type:"list"` // Information about groups of tags applied to EC2 instances. The deployment - // group will include only EC2 instances identified by all the tag groups. Cannot + // group includes only EC2 instances identified by all the tag groups. Cannot // be used in the same call as ec2TagFilters. Ec2TagSet *EC2TagSet `locationName:"ec2TagSet" type:"structure"` + // The target Amazon ECS services in the deployment group. This applies only + // to deployment groups that use the Amazon ECS compute platform. A target Amazon + // ECS service is specified as an Amazon ECS cluster and service name pair using + // the format :. + EcsServices []*ECSService `locationName:"ecsServices" type:"list"` + // Information about the load balancer used in a deployment. LoadBalancerInfo *LoadBalancerInfo `locationName:"loadBalancerInfo" type:"structure"` - // The on-premises instance tags on which to filter. The deployment group will - // include on-premises instances with any of the specified tags. Cannot be used - // in the same call as OnPremisesTagSet. + // The on-premises instance tags on which to filter. The deployment group includes + // on-premises instances with any of the specified tags. Cannot be used in the + // same call as OnPremisesTagSet. OnPremisesInstanceTagFilters []*TagFilter `locationName:"onPremisesInstanceTagFilters" type:"list"` // Information about groups of tags applied to on-premises instances. The deployment - // group will include only on-premises instances identified by all the tag groups. + // group includes only on-premises instances identified by all of the tag groups. // Cannot be used in the same call as onPremisesInstanceTagFilters. OnPremisesTagSet *OnPremisesTagSet `locationName:"onPremisesTagSet" type:"structure"` @@ -5537,6 +6072,12 @@ func (s *CreateDeploymentGroupInput) SetEc2TagSet(v *EC2TagSet) *CreateDeploymen return s } +// SetEcsServices sets the EcsServices field's value. +func (s *CreateDeploymentGroupInput) SetEcsServices(v []*ECSService) *CreateDeploymentGroupInput { + s.EcsServices = v + return s +} + // SetLoadBalancerInfo sets the LoadBalancerInfo field's value. func (s *CreateDeploymentGroupInput) SetLoadBalancerInfo(v *LoadBalancerInfo) *CreateDeploymentGroupInput { s.LoadBalancerInfo = v @@ -5595,8 +6136,8 @@ func (s *CreateDeploymentGroupOutput) SetDeploymentGroupId(v string) *CreateDepl type CreateDeploymentInput struct { _ struct{} `type:"structure"` - // The name of an AWS CodeDeploy application associated with the applicable - // IAM user or AWS account. + // The name of an AWS CodeDeploy application associated with the IAM user or + // AWS account. // // ApplicationName is a required field ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` @@ -5605,12 +6146,12 @@ type CreateDeploymentInput struct { // deployment is created. AutoRollbackConfiguration *AutoRollbackConfiguration `locationName:"autoRollbackConfiguration" type:"structure"` - // The name of a deployment configuration associated with the applicable IAM - // user or AWS account. + // The name of a deployment configuration associated with the IAM user or AWS + // account. // - // If not specified, the value configured in the deployment group will be used - // as the default. If the deployment group does not have a deployment configuration - // associated with it, then CodeDeployDefault.OneAtATime will be used by default. + // If not specified, the value configured in the deployment group is used as + // the default. If the deployment group does not have a deployment configuration + // associated with it, CodeDeployDefault.OneAtATime is used by default. DeploymentConfigName *string `locationName:"deploymentConfigName" min:"1" type:"string"` // The name of the deployment group. @@ -5636,20 +6177,20 @@ type CreateDeploymentInput struct { FileExistsBehavior *string `locationName:"fileExistsBehavior" type:"string" enum:"FileExistsBehavior"` // If set to true, then if the deployment causes the ApplicationStop deployment - // lifecycle event to an instance to fail, the deployment to that instance will - // not be considered to have failed at that point and will continue on to the - // BeforeInstall deployment lifecycle event. + // lifecycle event to an instance to fail, the deployment to that instance is + // considered to have failed at that point and continues on to the BeforeInstall + // deployment lifecycle event. // // If set to false or not specified, then if the deployment causes the ApplicationStop // deployment lifecycle event to fail to an instance, the deployment to that - // instance will stop, and the deployment to that instance will be considered - // to have failed. + // instance stops, and the deployment to that instance is considered to have + // failed. IgnoreApplicationStopFailures *bool `locationName:"ignoreApplicationStopFailures" type:"boolean"` // The type and location of the revision to deploy. Revision *RevisionLocation `locationName:"revision" type:"structure"` - // Information about the instances that will belong to the replacement environment + // Information about the instances that belong to the replacement environment // in a blue/green deployment. TargetInstances *TargetInstances `locationName:"targetInstances" type:"structure"` @@ -5754,7 +6295,7 @@ func (s *CreateDeploymentInput) SetUpdateOutdatedInstancesOnly(v bool) *CreateDe type CreateDeploymentOutput struct { _ struct{} `type:"structure"` - // A unique deployment ID. + // The unique ID of a deployment. DeploymentId *string `locationName:"deploymentId" type:"string"` } @@ -5778,8 +6319,8 @@ func (s *CreateDeploymentOutput) SetDeploymentId(v string) *CreateDeploymentOutp type DeleteApplicationInput struct { _ struct{} `type:"structure"` - // The name of an AWS CodeDeploy application associated with the applicable - // IAM user or AWS account. + // The name of an AWS CodeDeploy application associated with the IAM user or + // AWS account. // // ApplicationName is a required field ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` @@ -5835,8 +6376,8 @@ func (s DeleteApplicationOutput) GoString() string { type DeleteDeploymentConfigInput struct { _ struct{} `type:"structure"` - // The name of a deployment configuration associated with the applicable IAM - // user or AWS account. + // The name of a deployment configuration associated with the IAM user or AWS + // account. // // DeploymentConfigName is a required field DeploymentConfigName *string `locationName:"deploymentConfigName" min:"1" type:"string" required:"true"` @@ -5892,13 +6433,13 @@ func (s DeleteDeploymentConfigOutput) GoString() string { type DeleteDeploymentGroupInput struct { _ struct{} `type:"structure"` - // The name of an AWS CodeDeploy application associated with the applicable - // IAM user or AWS account. + // The name of an AWS CodeDeploy application associated with the IAM user or + // AWS account. // // ApplicationName is a required field ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` - // The name of an existing deployment group for the specified application. + // The name of a deployment group for the specified application. // // DeploymentGroupName is a required field DeploymentGroupName *string `locationName:"deploymentGroupName" min:"1" type:"string" required:"true"` @@ -6044,7 +6585,7 @@ type DeploymentConfigInfo struct { // Information about the number or percentage of minimum healthy instance. MinimumHealthyHosts *MinimumHealthyHosts `locationName:"minimumHealthyHosts" type:"structure"` - // The configuration specifying how the deployment traffic will be routed. Only + // The configuration that specifies how the deployment traffic is routed. Only // deployments with a Lambda compute platform can specify this. TrafficRoutingConfig *TrafficRoutingConfig `locationName:"trafficRoutingConfig" type:"structure"` } @@ -6136,10 +6677,16 @@ type DeploymentGroupInfo struct { Ec2TagFilters []*EC2TagFilter `locationName:"ec2TagFilters" type:"list"` // Information about groups of tags applied to an EC2 instance. The deployment - // group includes only EC2 instances identified by all the tag groups. Cannot + // group includes only EC2 instances identified by all of the tag groups. Cannot // be used in the same call as ec2TagFilters. Ec2TagSet *EC2TagSet `locationName:"ec2TagSet" type:"structure"` + // The target Amazon ECS services in the deployment group. This applies only + // to deployment groups that use the Amazon ECS compute platform. A target Amazon + // ECS service is specified as an Amazon ECS cluster and service name pair using + // the format :. + EcsServices []*ECSService `locationName:"ecsServices" type:"list"` + // Information about the most recent attempted deployment to the deployment // group. LastAttemptedDeployment *LastDeploymentInfo `locationName:"lastAttemptedDeployment" type:"structure"` @@ -6253,6 +6800,12 @@ func (s *DeploymentGroupInfo) SetEc2TagSet(v *EC2TagSet) *DeploymentGroupInfo { return s } +// SetEcsServices sets the EcsServices field's value. +func (s *DeploymentGroupInfo) SetEcsServices(v []*ECSService) *DeploymentGroupInfo { + s.EcsServices = v + return s +} + // SetLastAttemptedDeployment sets the LastAttemptedDeployment field's value. func (s *DeploymentGroupInfo) SetLastAttemptedDeployment(v *LastDeploymentInfo) *DeploymentGroupInfo { s.LastAttemptedDeployment = v @@ -6319,20 +6872,20 @@ type DeploymentInfo struct { // Information about blue/green deployment options for this deployment. BlueGreenDeploymentConfiguration *BlueGreenDeploymentConfiguration `locationName:"blueGreenDeploymentConfiguration" type:"structure"` - // A timestamp indicating when the deployment was complete. + // A timestamp that indicates when the deployment was complete. CompleteTime *time.Time `locationName:"completeTime" type:"timestamp"` // The destination platform type for the deployment (Lambda or Server). ComputePlatform *string `locationName:"computePlatform" type:"string" enum:"ComputePlatform"` - // A timestamp indicating when the deployment was created. + // A timestamp that indicates when the deployment was created. CreateTime *time.Time `locationName:"createTime" type:"timestamp"` // The means by which the deployment was created: // // * user: A user created the deployment. // - // * autoscaling: Auto Scaling created the deployment. + // * autoscaling: Amazon EC2 Auto Scaling created the deployment. // // * codeDeployRollback: A rollback process created the deployment. Creator *string `locationName:"creator" type:"string" enum:"DeploymentCreator"` @@ -6343,7 +6896,7 @@ type DeploymentInfo struct { // The deployment group name. DeploymentGroupName *string `locationName:"deploymentGroupName" min:"1" type:"string"` - // The deployment ID. + // The unique ID of a deployment. DeploymentId *string `locationName:"deploymentId" type:"string"` // A summary of the deployment status of the instances in the deployment. @@ -6377,19 +6930,19 @@ type DeploymentInfo struct { FileExistsBehavior *string `locationName:"fileExistsBehavior" type:"string" enum:"FileExistsBehavior"` // If true, then if the deployment causes the ApplicationStop deployment lifecycle - // event to an instance to fail, the deployment to that instance will not be - // considered to have failed at that point and will continue on to the BeforeInstall - // deployment lifecycle event. + // event to an instance to fail, the deployment to that instance is not considered + // to have failed at that point and continues on to the BeforeInstall deployment + // lifecycle event. // // If false or not specified, then if the deployment causes the ApplicationStop // deployment lifecycle event to an instance to fail, the deployment to that - // instance will stop, and the deployment to that instance will be considered - // to have failed. + // instance stops, and the deployment to that instance is considered to have + // failed. IgnoreApplicationStopFailures *bool `locationName:"ignoreApplicationStopFailures" type:"boolean"` // Indicates whether the wait period set for the termination of instances in // the original environment has started. Status is 'false' if the KEEP_ALIVE - // option is specified; otherwise, 'true' as soon as the termination wait period + // option is specified. Otherwise, 'true' as soon as the termination wait period // starts. InstanceTerminationWaitTimeStarted *bool `locationName:"instanceTerminationWaitTimeStarted" type:"boolean"` @@ -6407,11 +6960,11 @@ type DeploymentInfo struct { // Information about a deployment rollback. RollbackInfo *RollbackInfo `locationName:"rollbackInfo" type:"structure"` - // A timestamp indicating when the deployment was deployed to the deployment + // A timestamp that indicates when the deployment was deployed to the deployment // group. // - // In some cases, the reported value of the start time may be later than the - // complete time. This is due to differences in the clock settings of back-end + // In some cases, the reported value of the start time might be later than the + // complete time. This is due to differences in the clock settings of backend // servers that participate in the deployment process. StartTime *time.Time `locationName:"startTime" type:"timestamp"` @@ -6689,8 +7242,8 @@ type DeploymentReadyOption struct { ActionOnTimeout *string `locationName:"actionOnTimeout" type:"string" enum:"DeploymentReadyAction"` // The number of minutes to wait before the status of a blue/green deployment - // changed to Stopped if rerouting is not started manually. Applies only to - // the STOP_DEPLOYMENT option for actionOnTimeout + // is changed to Stopped if rerouting is not started manually. Applies only + // to the STOP_DEPLOYMENT option for actionOnTimeout WaitTimeInMinutes *int64 `locationName:"waitTimeInMinutes" type:"integer"` } @@ -6750,6 +7303,60 @@ func (s *DeploymentStyle) SetDeploymentType(v string) *DeploymentStyle { return s } +// Information about the deployment target. +type DeploymentTarget struct { + _ struct{} `type:"structure"` + + // The deployment type that is specific to the deployment's compute platform. + DeploymentTargetType *string `locationName:"deploymentTargetType" type:"string" enum:"DeploymentTargetType"` + + // Information about the target for a deployment that uses the Amazon ECS compute + // platform. + EcsTarget *ECSTarget `locationName:"ecsTarget" type:"structure"` + + // Information about the target for a deployment that uses the EC2/On-premises + // compute platform. + InstanceTarget *InstanceTarget `locationName:"instanceTarget" type:"structure"` + + // Information about the target for a deployment that uses the AWS Lambda compute + // platform. + LambdaTarget *LambdaTarget `locationName:"lambdaTarget" type:"structure"` +} + +// String returns the string representation +func (s DeploymentTarget) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeploymentTarget) GoString() string { + return s.String() +} + +// SetDeploymentTargetType sets the DeploymentTargetType field's value. +func (s *DeploymentTarget) SetDeploymentTargetType(v string) *DeploymentTarget { + s.DeploymentTargetType = &v + return s +} + +// SetEcsTarget sets the EcsTarget field's value. +func (s *DeploymentTarget) SetEcsTarget(v *ECSTarget) *DeploymentTarget { + s.EcsTarget = v + return s +} + +// SetInstanceTarget sets the InstanceTarget field's value. +func (s *DeploymentTarget) SetInstanceTarget(v *InstanceTarget) *DeploymentTarget { + s.InstanceTarget = v + return s +} + +// SetLambdaTarget sets the LambdaTarget field's value. +func (s *DeploymentTarget) SetLambdaTarget(v *LambdaTarget) *DeploymentTarget { + s.LambdaTarget = v + return s +} + // Represents the input of a DeregisterOnPremisesInstance operation. type DeregisterOnPremisesInstanceInput struct { _ struct{} `type:"structure"` @@ -6923,9 +7530,9 @@ func (s *EC2TagFilter) SetValue(v string) *EC2TagFilter { type EC2TagSet struct { _ struct{} `type:"structure"` - // A list containing other lists of EC2 instance tag groups. In order for an - // instance to be included in the deployment group, it must be identified by - // all the tag groups in the list. + // A list that contains other lists of EC2 instance tag groups. For an instance + // to be included in the deployment group, it must be identified by all of the + // tag groups in the list. Ec2TagSetList [][]*EC2TagFilter `locationName:"ec2TagSetList" type:"list"` } @@ -6945,17 +7552,238 @@ func (s *EC2TagSet) SetEc2TagSetList(v [][]*EC2TagFilter) *EC2TagSet { return s } -// Information about a load balancer in Elastic Load Balancing to use in a deployment. -// Instances are registered directly with a load balancer, and traffic is routed -// to the load balancer. -type ELBInfo struct { +// Contains the service and cluster names used to identify an Amazon ECS deployment's +// target. +type ECSService struct { _ struct{} `type:"structure"` - // For blue/green deployments, the name of the load balancer that will be used - // to route traffic from original instances to replacement instances in a blue/green - // deployment. For in-place deployments, the name of the load balancer that + // The name of the cluster that the Amazon ECS service is associated with. + ClusterName *string `locationName:"clusterName" type:"string"` + + // The name of the target Amazon ECS service. + ServiceName *string `locationName:"serviceName" type:"string"` +} + +// String returns the string representation +func (s ECSService) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ECSService) GoString() string { + return s.String() +} + +// SetClusterName sets the ClusterName field's value. +func (s *ECSService) SetClusterName(v string) *ECSService { + s.ClusterName = &v + return s +} + +// SetServiceName sets the ServiceName field's value. +func (s *ECSService) SetServiceName(v string) *ECSService { + s.ServiceName = &v + return s +} + +// Information about the target of an Amazon ECS deployment. +type ECSTarget struct { + _ struct{} `type:"structure"` + + // The unique ID of a deployment. + DeploymentId *string `locationName:"deploymentId" type:"string"` + + // The date and time when the target Amazon ECS application was updated by a + // deployment. + LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` + + // The lifecycle events of the deployment to this target Amazon ECS application. + LifecycleEvents []*LifecycleEvent `locationName:"lifecycleEvents" type:"list"` + + // The status an Amazon ECS deployment's target ECS application. + Status *string `locationName:"status" type:"string" enum:"TargetStatus"` + + // The ARN of the target. + TargetArn *string `locationName:"targetArn" type:"string"` + + // The unique ID of a deployment target that has a type of ecsTarget. + TargetId *string `locationName:"targetId" type:"string"` + + // The ECSTaskSet objects associated with the ECS target. + TaskSetsInfo []*ECSTaskSet `locationName:"taskSetsInfo" type:"list"` +} + +// String returns the string representation +func (s ECSTarget) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ECSTarget) GoString() string { + return s.String() +} + +// SetDeploymentId sets the DeploymentId field's value. +func (s *ECSTarget) SetDeploymentId(v string) *ECSTarget { + s.DeploymentId = &v + return s +} + +// SetLastUpdatedAt sets the LastUpdatedAt field's value. +func (s *ECSTarget) SetLastUpdatedAt(v time.Time) *ECSTarget { + s.LastUpdatedAt = &v + return s +} + +// SetLifecycleEvents sets the LifecycleEvents field's value. +func (s *ECSTarget) SetLifecycleEvents(v []*LifecycleEvent) *ECSTarget { + s.LifecycleEvents = v + return s +} + +// SetStatus sets the Status field's value. +func (s *ECSTarget) SetStatus(v string) *ECSTarget { + s.Status = &v + return s +} + +// SetTargetArn sets the TargetArn field's value. +func (s *ECSTarget) SetTargetArn(v string) *ECSTarget { + s.TargetArn = &v + return s +} + +// SetTargetId sets the TargetId field's value. +func (s *ECSTarget) SetTargetId(v string) *ECSTarget { + s.TargetId = &v + return s +} + +// SetTaskSetsInfo sets the TaskSetsInfo field's value. +func (s *ECSTarget) SetTaskSetsInfo(v []*ECSTaskSet) *ECSTarget { + s.TaskSetsInfo = v + return s +} + +// Information about a set of Amazon ECS tasks in an AWS CodeDeploy deployment. +// An Amazon ECS task set includes details such as the desired number of tasks, +// how many tasks are running, and whether the task set serves production traffic. +// An AWS CodeDeploy application that uses the Amazon ECS compute platform deploys +// a containerized application in an Amazon ECS service as a task set. +type ECSTaskSet struct { + _ struct{} `type:"structure"` + + // The number of tasks in a task set. During a deployment that uses the Amazon + // ECS compute type, CodeDeploy instructs Amazon ECS to create a new task set + // and uses this value to determine how many tasks to create. After the updated + // task set is created, CodeDeploy shifts traffic to the new task set. + DesiredCount *int64 `locationName:"desiredCount" type:"long"` + + // A unique ID of an ECSTaskSet. + Identifer *string `locationName:"identifer" type:"string"` + + // The number of tasks in the task set that are in the PENDING status during + // an Amazon ECS deployment. A task in the PENDING state is preparing to enter + // the RUNNING state. A task set enters the PENDING status when it launches + // for the first time, or when it is restarted after being in the STOPPED state. + PendingCount *int64 `locationName:"pendingCount" type:"long"` + + // The number of tasks in the task set that are in the RUNNING status during + // an Amazon ECS deployment. A task in the RUNNING state is running and ready + // for use. + RunningCount *int64 `locationName:"runningCount" type:"long"` + + // The status of the task set. There are three valid task set statuses: + // + // * PRIMARY: Indicates the task set is serving production traffic. + // + // * ACTIVE: Indicates the task set is not serving production traffic. + // + // * DRAINING: Indicates the tasks in the task set are being stopped and + // their corresponding targets are being deregistered from their target group. + Status *string `locationName:"status" type:"string"` + + // The target group associated with the task set. The target group is used by + // AWS CodeDeploy to manage traffic to a task set. + TargetGroup *TargetGroupInfo `locationName:"targetGroup" type:"structure"` + + // A label that identifies whether the ECS task set is an original target (BLUE) + // or a replacement target (GREEN). + TaskSetLabel *string `locationName:"taskSetLabel" type:"string" enum:"TargetLabel"` + + // The percentage of traffic served by this task set. + TrafficWeight *float64 `locationName:"trafficWeight" type:"double"` +} + +// String returns the string representation +func (s ECSTaskSet) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ECSTaskSet) GoString() string { + return s.String() +} + +// SetDesiredCount sets the DesiredCount field's value. +func (s *ECSTaskSet) SetDesiredCount(v int64) *ECSTaskSet { + s.DesiredCount = &v + return s +} + +// SetIdentifer sets the Identifer field's value. +func (s *ECSTaskSet) SetIdentifer(v string) *ECSTaskSet { + s.Identifer = &v + return s +} + +// SetPendingCount sets the PendingCount field's value. +func (s *ECSTaskSet) SetPendingCount(v int64) *ECSTaskSet { + s.PendingCount = &v + return s +} + +// SetRunningCount sets the RunningCount field's value. +func (s *ECSTaskSet) SetRunningCount(v int64) *ECSTaskSet { + s.RunningCount = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *ECSTaskSet) SetStatus(v string) *ECSTaskSet { + s.Status = &v + return s +} + +// SetTargetGroup sets the TargetGroup field's value. +func (s *ECSTaskSet) SetTargetGroup(v *TargetGroupInfo) *ECSTaskSet { + s.TargetGroup = v + return s +} + +// SetTaskSetLabel sets the TaskSetLabel field's value. +func (s *ECSTaskSet) SetTaskSetLabel(v string) *ECSTaskSet { + s.TaskSetLabel = &v + return s +} + +// SetTrafficWeight sets the TrafficWeight field's value. +func (s *ECSTaskSet) SetTrafficWeight(v float64) *ECSTaskSet { + s.TrafficWeight = &v + return s +} + +// Information about a load balancer in Elastic Load Balancing to use in a deployment. +// Instances are registered directly with a load balancer, and traffic is routed +// to the load balancer. +type ELBInfo struct { + _ struct{} `type:"structure"` + + // For blue/green deployments, the name of the load balancer that is used to + // route traffic from original instances to replacement instances in a blue/green + // deployment. For in-place deployments, the name of the load balancer that // instances are deregistered from so they are not serving traffic during a - // deployment, and then re-registered with after the deployment completes. + // deployment, and then re-registered with after the deployment is complete. Name *string `locationName:"name" type:"string"` } @@ -6979,19 +7807,18 @@ func (s *ELBInfo) SetName(v string) *ELBInfo { type ErrorInformation struct { _ struct{} `type:"structure"` - // For information about additional error codes, see Error Codes for AWS CodeDeploy - // (http://docs.aws.amazon.com/codedeploy/latest/userguide/error-codes.html) + // For more information, see Error Codes for AWS CodeDeploy (http://docs.aws.amazon.com/codedeploy/latest/userguide/error-codes.html) // in the AWS CodeDeploy User Guide (http://docs.aws.amazon.com/codedeploy/latest/userguide). // // The error code: // - // * APPLICATION_MISSING: The application was missing. This error code will - // most likely be raised if the application is deleted after the deployment - // is created but before it is started. + // * APPLICATION_MISSING: The application was missing. This error code is + // most likely raised if the application is deleted after the deployment + // is created, but before it is started. // // * DEPLOYMENT_GROUP_MISSING: The deployment group was missing. This error - // code will most likely be raised if the deployment group is deleted after - // the deployment is created but before it is started. + // code is most likely raised if the deployment group is deleted after the + // deployment is created, but before it is started. // // * HEALTH_CONSTRAINTS: The deployment failed on too many instances to be // successfully deployed within the instance health constraints specified. @@ -7005,21 +7832,21 @@ type ErrorInformation struct { // // * INTERNAL_ERROR: There was an internal error. // - // * NO_EC2_SUBSCRIPTION: The calling account is not subscribed to the Amazon - // EC2 service. + // * NO_EC2_SUBSCRIPTION: The calling account is not subscribed to Amazon + // EC2. // - // * NO_INSTANCES: No instance were specified, or no instance can be found. + // * NO_INSTANCES: No instances were specified, or no instances can be found. // - // * OVER_MAX_INSTANCES: The maximum number of instance was exceeded. + // * OVER_MAX_INSTANCES: The maximum number of instances was exceeded. // // * THROTTLED: The operation was throttled because the calling account exceeded // the throttling limits of one or more AWS services. // // * TIMEOUT: The deployment has timed out. // - // * REVISION_MISSING: The revision ID was missing. This error code will - // most likely be raised if the revision is deleted after the deployment - // is created but before it is started. + // * REVISION_MISSING: The revision ID was missing. This error code is most + // likely raised if the revision is deleted after the deployment is created, + // but before it is started. Code *string `locationName:"code" type:"string" enum:"ErrorCode"` // An accompanying error message. @@ -7112,8 +7939,8 @@ func (s *GenericRevisionInfo) SetRegisterTime(v time.Time) *GenericRevisionInfo type GetApplicationInput struct { _ struct{} `type:"structure"` - // The name of an AWS CodeDeploy application associated with the applicable - // IAM user or AWS account. + // The name of an AWS CodeDeploy application associated with the IAM user or + // AWS account. // // ApplicationName is a required field ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` @@ -7277,8 +8104,8 @@ func (s *GetApplicationRevisionOutput) SetRevisionInfo(v *GenericRevisionInfo) * type GetDeploymentConfigInput struct { _ struct{} `type:"structure"` - // The name of a deployment configuration associated with the applicable IAM - // user or AWS account. + // The name of a deployment configuration associated with the IAM user or AWS + // account. // // DeploymentConfigName is a required field DeploymentConfigName *string `locationName:"deploymentConfigName" min:"1" type:"string" required:"true"` @@ -7344,13 +8171,13 @@ func (s *GetDeploymentConfigOutput) SetDeploymentConfigInfo(v *DeploymentConfigI type GetDeploymentGroupInput struct { _ struct{} `type:"structure"` - // The name of an AWS CodeDeploy application associated with the applicable - // IAM user or AWS account. + // The name of an AWS CodeDeploy application associated with the IAM user or + // AWS account. // // ApplicationName is a required field ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` - // The name of an existing deployment group for the specified application. + // The name of a deployment group for the specified application. // // DeploymentGroupName is a required field DeploymentGroupName *string `locationName:"deploymentGroupName" min:"1" type:"string" required:"true"` @@ -7428,7 +8255,7 @@ func (s *GetDeploymentGroupOutput) SetDeploymentGroupInfo(v *DeploymentGroupInfo type GetDeploymentInput struct { _ struct{} `type:"structure"` - // A deployment ID associated with the applicable IAM user or AWS account. + // The unique ID of a deployment associated with the IAM user or AWS account. // // DeploymentId is a required field DeploymentId *string `locationName:"deploymentId" type:"string" required:"true"` @@ -7521,7 +8348,7 @@ type GetDeploymentInstanceOutput struct { _ struct{} `type:"structure"` // Information about the instance. - InstanceSummary *InstanceSummary `locationName:"instanceSummary" type:"structure"` + InstanceSummary *InstanceSummary `locationName:"instanceSummary" deprecated:"true" type:"structure"` } // String returns the string representation @@ -7564,6 +8391,64 @@ func (s *GetDeploymentOutput) SetDeploymentInfo(v *DeploymentInfo) *GetDeploymen return s } +type GetDeploymentTargetInput struct { + _ struct{} `type:"structure"` + + // The unique ID of a deployment. + DeploymentId *string `locationName:"deploymentId" type:"string"` + + // The unique ID of a deployment target. + TargetId *string `locationName:"targetId" type:"string"` +} + +// String returns the string representation +func (s GetDeploymentTargetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDeploymentTargetInput) GoString() string { + return s.String() +} + +// SetDeploymentId sets the DeploymentId field's value. +func (s *GetDeploymentTargetInput) SetDeploymentId(v string) *GetDeploymentTargetInput { + s.DeploymentId = &v + return s +} + +// SetTargetId sets the TargetId field's value. +func (s *GetDeploymentTargetInput) SetTargetId(v string) *GetDeploymentTargetInput { + s.TargetId = &v + return s +} + +type GetDeploymentTargetOutput struct { + _ struct{} `type:"structure"` + + // A deployment target that contains information about a deployment such as + // its status, lifecyle events, and when it was last updated. It also contains + // metadata about the deployment target. The deployment target metadata depends + // on the deployment target's type (instanceTarget, lambdaTarget, or ecsTarget). + DeploymentTarget *DeploymentTarget `locationName:"deploymentTarget" type:"structure"` +} + +// String returns the string representation +func (s GetDeploymentTargetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDeploymentTargetOutput) GoString() string { + return s.String() +} + +// SetDeploymentTarget sets the DeploymentTarget field's value. +func (s *GetDeploymentTargetOutput) SetDeploymentTarget(v *DeploymentTarget) *GetDeploymentTargetOutput { + s.DeploymentTarget = v + return s +} + // Represents the input of a GetOnPremisesInstance operation. type GetOnPremisesInstanceInput struct { _ struct{} `type:"structure"` @@ -7775,10 +8660,12 @@ func (s *InstanceInfo) SetTags(v []*Tag) *InstanceInfo { } // Information about an instance in a deployment. +// +// Deprecated: InstanceSummary is deprecated, use DeploymentTarget instead. type InstanceSummary struct { - _ struct{} `type:"structure"` + _ struct{} `deprecated:"true" type:"structure"` - // The deployment ID. + // The unique ID of a deployment. DeploymentId *string `locationName:"deploymentId" type:"string"` // The instance ID. @@ -7792,7 +8679,7 @@ type InstanceSummary struct { // * GREEN: The instance is part of the replacement environment. InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` - // A timestamp indicating when the instance information was last updated. + // A timestamp that indicaties when the instance information was last updated. LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` // A list of lifecycle events for this instance. @@ -7811,7 +8698,7 @@ type InstanceSummary struct { // * Skipped: The deployment has been skipped for this instance. // // * Unknown: The deployment status is unknown for this instance. - Status *string `locationName:"status" type:"string" enum:"InstanceStatus"` + Status *string `locationName:"status" deprecated:"true" type:"string" enum:"InstanceStatus"` } // String returns the string representation @@ -7860,20 +8747,169 @@ func (s *InstanceSummary) SetStatus(v string) *InstanceSummary { return s } +// A target Amazon EC2 or on-premises instance during a deployment that uses +// the EC2/On-premises compute platform. +type InstanceTarget struct { + _ struct{} `type:"structure"` + + // The unique ID of a deployment. + DeploymentId *string `locationName:"deploymentId" type:"string"` + + // A label that identifies whether the instance is an original target (BLUE) + // or a replacement target (GREEN). + InstanceLabel *string `locationName:"instanceLabel" type:"string" enum:"TargetLabel"` + + // The date and time when the target instance was updated by a deployment. + LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` + + // The lifecycle events of the deployment to this target instance. + LifecycleEvents []*LifecycleEvent `locationName:"lifecycleEvents" type:"list"` + + // The status an EC2/On-premises deployment's target instance. + Status *string `locationName:"status" type:"string" enum:"TargetStatus"` + + // The ARN of the target. + TargetArn *string `locationName:"targetArn" type:"string"` + + // The unique ID of a deployment target that has a type of instanceTarget. + TargetId *string `locationName:"targetId" type:"string"` +} + +// String returns the string representation +func (s InstanceTarget) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceTarget) GoString() string { + return s.String() +} + +// SetDeploymentId sets the DeploymentId field's value. +func (s *InstanceTarget) SetDeploymentId(v string) *InstanceTarget { + s.DeploymentId = &v + return s +} + +// SetInstanceLabel sets the InstanceLabel field's value. +func (s *InstanceTarget) SetInstanceLabel(v string) *InstanceTarget { + s.InstanceLabel = &v + return s +} + +// SetLastUpdatedAt sets the LastUpdatedAt field's value. +func (s *InstanceTarget) SetLastUpdatedAt(v time.Time) *InstanceTarget { + s.LastUpdatedAt = &v + return s +} + +// SetLifecycleEvents sets the LifecycleEvents field's value. +func (s *InstanceTarget) SetLifecycleEvents(v []*LifecycleEvent) *InstanceTarget { + s.LifecycleEvents = v + return s +} + +// SetStatus sets the Status field's value. +func (s *InstanceTarget) SetStatus(v string) *InstanceTarget { + s.Status = &v + return s +} + +// SetTargetArn sets the TargetArn field's value. +func (s *InstanceTarget) SetTargetArn(v string) *InstanceTarget { + s.TargetArn = &v + return s +} + +// SetTargetId sets the TargetId field's value. +func (s *InstanceTarget) SetTargetId(v string) *InstanceTarget { + s.TargetId = &v + return s +} + +// Information about the target AWS Lambda function during an AWS Lambda deployment. +type LambdaTarget struct { + _ struct{} `type:"structure"` + + // The unique ID of a deployment. + DeploymentId *string `locationName:"deploymentId" type:"string"` + + // The date and time when the target Lambda function was updated by a deployment. + LastUpdatedAt *time.Time `locationName:"lastUpdatedAt" type:"timestamp"` + + // The lifecycle events of the deployment to this target Lambda function. + LifecycleEvents []*LifecycleEvent `locationName:"lifecycleEvents" type:"list"` + + // The status an AWS Lambda deployment's target Lambda function. + Status *string `locationName:"status" type:"string" enum:"TargetStatus"` + + // The ARN of the target. + TargetArn *string `locationName:"targetArn" type:"string"` + + // The unique ID of a deployment target that has a type of lambdaTarget. + TargetId *string `locationName:"targetId" type:"string"` +} + +// String returns the string representation +func (s LambdaTarget) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LambdaTarget) GoString() string { + return s.String() +} + +// SetDeploymentId sets the DeploymentId field's value. +func (s *LambdaTarget) SetDeploymentId(v string) *LambdaTarget { + s.DeploymentId = &v + return s +} + +// SetLastUpdatedAt sets the LastUpdatedAt field's value. +func (s *LambdaTarget) SetLastUpdatedAt(v time.Time) *LambdaTarget { + s.LastUpdatedAt = &v + return s +} + +// SetLifecycleEvents sets the LifecycleEvents field's value. +func (s *LambdaTarget) SetLifecycleEvents(v []*LifecycleEvent) *LambdaTarget { + s.LifecycleEvents = v + return s +} + +// SetStatus sets the Status field's value. +func (s *LambdaTarget) SetStatus(v string) *LambdaTarget { + s.Status = &v + return s +} + +// SetTargetArn sets the TargetArn field's value. +func (s *LambdaTarget) SetTargetArn(v string) *LambdaTarget { + s.TargetArn = &v + return s +} + +// SetTargetId sets the TargetId field's value. +func (s *LambdaTarget) SetTargetId(v string) *LambdaTarget { + s.TargetId = &v + return s +} + // Information about the most recent attempted or successful deployment to a // deployment group. type LastDeploymentInfo struct { _ struct{} `type:"structure"` - // A timestamp indicating when the most recent deployment to the deployment + // A timestamp that indicates when the most recent deployment to the deployment // group started. CreateTime *time.Time `locationName:"createTime" type:"timestamp"` - // The deployment ID. + // The unique ID of a deployment. DeploymentId *string `locationName:"deploymentId" type:"string"` - // A timestamp indicating when the most recent deployment to the deployment - // group completed. + // A timestamp that indicates when the most recent deployment to the deployment + // group was complete. EndTime *time.Time `locationName:"endTime" type:"timestamp"` // The status of the most recent deployment. @@ -7921,14 +8957,14 @@ type LifecycleEvent struct { // Diagnostic information about the deployment lifecycle event. Diagnostics *Diagnostics `locationName:"diagnostics" type:"structure"` - // A timestamp indicating when the deployment lifecycle event ended. + // A timestamp that indicates when the deployment lifecycle event ended. EndTime *time.Time `locationName:"endTime" type:"timestamp"` // The deployment lifecycle event name, such as ApplicationStop, BeforeInstall, // AfterInstall, ApplicationStart, or ValidateService. LifecycleEventName *string `locationName:"lifecycleEventName" type:"string"` - // A timestamp indicating when the deployment lifecycle event started. + // A timestamp that indicates when the deployment lifecycle event started. StartTime *time.Time `locationName:"startTime" type:"timestamp"` // The deployment lifecycle event status: @@ -7991,8 +9027,8 @@ func (s *LifecycleEvent) SetStatus(v string) *LifecycleEvent { type ListApplicationRevisionsInput struct { _ struct{} `type:"structure"` - // The name of an AWS CodeDeploy application associated with the applicable - // IAM user or AWS account. + // The name of an AWS CodeDeploy application associated with the IAM user or + // AWS account. // // ApplicationName is a required field ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` @@ -8008,13 +9044,13 @@ type ListApplicationRevisionsInput struct { // * ignore: List all revisions. Deployed *string `locationName:"deployed" type:"string" enum:"ListStateFilterAction"` - // An identifier returned from the previous list application revisions call. - // It can be used to return the next set of applications in the list. + // An identifier returned from the previous ListApplicationRevisions call. It + // can be used to return the next set of applications in the list. NextToken *string `locationName:"nextToken" type:"string"` // An Amazon S3 bucket name to limit the search for revisions. // - // If set to null, all of the user's buckets will be searched. + // If set to null, all of the user's buckets are searched. S3Bucket *string `locationName:"s3Bucket" type:"string"` // A key prefix for the set of Amazon S3 objects to limit the search for revisions. @@ -8029,7 +9065,7 @@ type ListApplicationRevisionsInput struct { // // * lastUsedTime: Sort by the time the revisions were last used in a deployment. // - // If not specified or set to null, the results will be returned in an arbitrary + // If not specified or set to null, the results are returned in an arbitrary // order. SortBy *string `locationName:"sortBy" type:"string" enum:"ApplicationRevisionSortBy"` @@ -8039,9 +9075,9 @@ type ListApplicationRevisionsInput struct { // // * descending: descending order. // - // If not specified, the results will be sorted in ascending order. + // If not specified, the results are sorted in ascending order. // - // If set to null, the results will be sorted in an arbitrary order. + // If set to null, the results are sorted in an arbitrary order. SortOrder *string `locationName:"sortOrder" type:"string" enum:"SortOrder"` } @@ -8117,9 +9153,9 @@ func (s *ListApplicationRevisionsInput) SetSortOrder(v string) *ListApplicationR type ListApplicationRevisionsOutput struct { _ struct{} `type:"structure"` - // If a large amount of information is returned, an identifier will also be - // returned. It can be used in a subsequent list application revisions call - // to return the next set of application revisions in the list. + // If a large amount of information is returned, an identifier is also returned. + // It can be used in a subsequent list application revisions call to return + // the next set of application revisions in the list. NextToken *string `locationName:"nextToken" type:"string"` // A list of locations that contain the matching revisions. @@ -8182,7 +9218,7 @@ type ListApplicationsOutput struct { // If a large amount of information is returned, an identifier is also returned. // It can be used in a subsequent list applications call to return the next - // set of applications, will also be returned. in the list. + // set of applications in the list. NextToken *string `locationName:"nextToken" type:"string"` } @@ -8212,9 +9248,8 @@ func (s *ListApplicationsOutput) SetNextToken(v string) *ListApplicationsOutput type ListDeploymentConfigsInput struct { _ struct{} `type:"structure"` - // An identifier returned from the previous list deployment configurations call. - // It can be used to return the next set of deployment configurations in the - // list. + // An identifier returned from the previous ListDeploymentConfigs call. It can + // be used to return the next set of deployment configurations in the list. NextToken *string `locationName:"nextToken" type:"string"` } @@ -8274,8 +9309,8 @@ func (s *ListDeploymentConfigsOutput) SetNextToken(v string) *ListDeploymentConf type ListDeploymentGroupsInput struct { _ struct{} `type:"structure"` - // The name of an AWS CodeDeploy application associated with the applicable - // IAM user or AWS account. + // The name of an AWS CodeDeploy application associated with the IAM user or + // AWS account. // // ApplicationName is a required field ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` @@ -8330,7 +9365,7 @@ type ListDeploymentGroupsOutput struct { // The application name. ApplicationName *string `locationName:"applicationName" min:"1" type:"string"` - // A list of corresponding deployment group names. + // A list of deployment group names. DeploymentGroups []*string `locationName:"deploymentGroups" type:"list"` // If a large amount of information is returned, an identifier is also returned. @@ -8378,17 +9413,17 @@ type ListDeploymentInstancesInput struct { // A subset of instances to list by status: // - // * Pending: Include those instance with pending deployments. + // * Pending: Include those instances with pending deployments. // - // * InProgress: Include those instance where deployments are still in progress. + // * InProgress: Include those instances where deployments are still in progress. // // * Succeeded: Include those instances with successful deployments. // - // * Failed: Include those instance with failed deployments. + // * Failed: Include those instances with failed deployments. // - // * Skipped: Include those instance with skipped deployments. + // * Skipped: Include those instances with skipped deployments. // - // * Unknown: Include those instance with deployments in an unknown state. + // * Unknown: Include those instances with deployments in an unknown state. InstanceStatusFilter []*string `locationName:"instanceStatusFilter" type:"list"` // The set of instances in a blue/green deployment, either those in the original @@ -8483,18 +9518,94 @@ func (s *ListDeploymentInstancesOutput) SetNextToken(v string) *ListDeploymentIn return s } +type ListDeploymentTargetsInput struct { + _ struct{} `type:"structure"` + + // The unique ID of a deployment. + DeploymentId *string `locationName:"deploymentId" type:"string"` + + // A token identifier returned from the previous ListDeploymentTargets call. + // It can be used to return the next set of deployment targets in the list. + NextToken *string `locationName:"nextToken" type:"string"` + + // A key used to filter the returned targets. + TargetFilters map[string][]*string `locationName:"targetFilters" type:"map"` +} + +// String returns the string representation +func (s ListDeploymentTargetsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDeploymentTargetsInput) GoString() string { + return s.String() +} + +// SetDeploymentId sets the DeploymentId field's value. +func (s *ListDeploymentTargetsInput) SetDeploymentId(v string) *ListDeploymentTargetsInput { + s.DeploymentId = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListDeploymentTargetsInput) SetNextToken(v string) *ListDeploymentTargetsInput { + s.NextToken = &v + return s +} + +// SetTargetFilters sets the TargetFilters field's value. +func (s *ListDeploymentTargetsInput) SetTargetFilters(v map[string][]*string) *ListDeploymentTargetsInput { + s.TargetFilters = v + return s +} + +type ListDeploymentTargetsOutput struct { + _ struct{} `type:"structure"` + + // If a large amount of information is returned, a token identifier is also + // returned. It can be used in a subsequent ListDeploymentTargets call to return + // the next set of deployment targets in the list. + NextToken *string `locationName:"nextToken" type:"string"` + + // The unique IDs of deployment targets. + TargetIds []*string `locationName:"targetIds" type:"list"` +} + +// String returns the string representation +func (s ListDeploymentTargetsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListDeploymentTargetsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListDeploymentTargetsOutput) SetNextToken(v string) *ListDeploymentTargetsOutput { + s.NextToken = &v + return s +} + +// SetTargetIds sets the TargetIds field's value. +func (s *ListDeploymentTargetsOutput) SetTargetIds(v []*string) *ListDeploymentTargetsOutput { + s.TargetIds = v + return s +} + // Represents the input of a ListDeployments operation. type ListDeploymentsInput struct { _ struct{} `type:"structure"` - // The name of an AWS CodeDeploy application associated with the applicable - // IAM user or AWS account. + // The name of an AWS CodeDeploy application associated with the IAM user or + // AWS account. ApplicationName *string `locationName:"applicationName" min:"1" type:"string"` // A time range (start and end) for returning a subset of the list of deployments. CreateTimeRange *TimeRange `locationName:"createTimeRange" type:"structure"` - // The name of an existing deployment group for the specified application. + // The name of a deployment group for the specified application. DeploymentGroupName *string `locationName:"deploymentGroupName" min:"1" type:"string"` // A subset of deployments to list by status: @@ -8685,8 +9796,8 @@ type ListOnPremisesInstancesInput struct { // list. RegistrationStatus *string `locationName:"registrationStatus" type:"string" enum:"RegistrationStatus"` - // The on-premises instance tags that will be used to restrict the corresponding - // on-premises instance names returned. + // The on-premises instance tags that are used to restrict the on-premises instance + // names returned. TagFilters []*TagFilter `locationName:"tagFilters" type:"list"` } @@ -8718,7 +9829,7 @@ func (s *ListOnPremisesInstancesInput) SetTagFilters(v []*TagFilter) *ListOnPrem return s } -// Represents the output of list on-premises instances operation. +// Represents the output of the list on-premises instances operation. type ListOnPremisesInstancesOutput struct { _ struct{} `type:"structure"` @@ -8758,19 +9869,23 @@ func (s *ListOnPremisesInstancesOutput) SetNextToken(v string) *ListOnPremisesIn type LoadBalancerInfo struct { _ struct{} `type:"structure"` - // An array containing information about the load balancer to use for load balancing - // in a deployment. In Elastic Load Balancing, load balancers are used with - // Classic Load Balancers. + // An array that contains information about the load balancer to use for load + // balancing in a deployment. In Elastic Load Balancing, load balancers are + // used with Classic Load Balancers. // // Adding more than one load balancer to the array is not supported. ElbInfoList []*ELBInfo `locationName:"elbInfoList" type:"list"` - // An array containing information about the target group to use for load balancing - // in a deployment. In Elastic Load Balancing, target groups are used with Application - // Load Balancers. + // An array that contains information about the target group to use for load + // balancing in a deployment. In Elastic Load Balancing, target groups are used + // with Application Load Balancers. // // Adding more than one target group to the array is not supported. TargetGroupInfoList []*TargetGroupInfo `locationName:"targetGroupInfoList" type:"list"` + + // The target group pair information. This is an array of TargeGroupPairInfo + // objects with a maximum size of one. + TargetGroupPairInfoList []*TargetGroupPairInfo `locationName:"targetGroupPairInfoList" type:"list"` } // String returns the string representation @@ -8795,6 +9910,12 @@ func (s *LoadBalancerInfo) SetTargetGroupInfoList(v []*TargetGroupInfo) *LoadBal return s } +// SetTargetGroupPairInfoList sets the TargetGroupPairInfoList field's value. +func (s *LoadBalancerInfo) SetTargetGroupPairInfoList(v []*TargetGroupPairInfo) *LoadBalancerInfo { + s.TargetGroupPairInfoList = v + return s +} + // Information about minimum healthy instance. type MinimumHealthyHosts struct { _ struct{} `type:"structure"` @@ -8807,21 +9928,21 @@ type MinimumHealthyHosts struct { // of the total number of instance in the deployment. // // In an example of nine instance, if a HOST_COUNT of six is specified, deploy - // to up to three instances at a time. The deployment will be successful if - // six or more instances are deployed to successfully; otherwise, the deployment - // fails. If a FLEET_PERCENT of 40 is specified, deploy to up to five instance - // at a time. The deployment will be successful if four or more instance are - // deployed to successfully; otherwise, the deployment fails. + // to up to three instances at a time. The deployment is successful if six or + // more instances are deployed to successfully. Otherwise, the deployment fails. + // If a FLEET_PERCENT of 40 is specified, deploy to up to five instance at a + // time. The deployment is successful if four or more instance are deployed + // to successfully. Otherwise, the deployment fails. // // In a call to the get deployment configuration operation, CodeDeployDefault.OneAtATime - // will return a minimum healthy instance type of MOST_CONCURRENCY and a value - // of 1. This means a deployment to only one instance at a time. (You cannot - // set the type to MOST_CONCURRENCY, only to HOST_COUNT or FLEET_PERCENT.) In - // addition, with CodeDeployDefault.OneAtATime, AWS CodeDeploy will try to ensure - // that all instances but one are kept in a healthy state during the deployment. + // returns a minimum healthy instance type of MOST_CONCURRENCY and a value of + // 1. This means a deployment to only one instance at a time. (You cannot set + // the type to MOST_CONCURRENCY, only to HOST_COUNT or FLEET_PERCENT.) In addition, + // with CodeDeployDefault.OneAtATime, AWS CodeDeploy attempts to ensure that + // all instances but one are kept in a healthy state during the deployment. // Although this allows one instance at a time to be taken offline for a new // deployment, it also means that if the deployment to the last instance fails, - // the overall deployment still succeeds. + // the overall deployment is still successful. // // For more information, see AWS CodeDeploy Instance Health (http://docs.aws.amazon.com/codedeploy/latest/userguide/instances-health.html) // in the AWS CodeDeploy User Guide. @@ -8857,9 +9978,9 @@ func (s *MinimumHealthyHosts) SetValue(v int64) *MinimumHealthyHosts { type OnPremisesTagSet struct { _ struct{} `type:"structure"` - // A list containing other lists of on-premises instance tag groups. In order - // for an instance to be included in the deployment group, it must be identified - // by all the tag groups in the list. + // A list that contains other lists of on-premises instance tag groups. For + // an instance to be included in the deployment group, it must be identified + // by all of the tag groups in the list. OnPremisesTagSetList [][]*TagFilter `locationName:"onPremisesTagSetList" type:"list"` } @@ -8882,7 +10003,7 @@ func (s *OnPremisesTagSet) SetOnPremisesTagSetList(v [][]*TagFilter) *OnPremises type PutLifecycleEventHookExecutionStatusInput struct { _ struct{} `type:"structure"` - // The ID of the deployment. Pass this ID to a Lambda function that validates + // The unique ID of a deployment. Pass this ID to a Lambda function that validates // a deployment lifecycle event. DeploymentId *string `locationName:"deploymentId" type:"string"` @@ -8950,15 +10071,17 @@ func (s *PutLifecycleEventHookExecutionStatusOutput) SetLifecycleEventHookExecut // A revision for an AWS Lambda deployment that is a YAML-formatted or JSON-formatted // string. For AWS Lambda deployments, the revision is the same as the AppSpec // file. +// +// Deprecated: RawString and String revision type are deprecated, use AppSpecContent type instead. type RawString struct { - _ struct{} `type:"structure"` + _ struct{} `deprecated:"true" type:"structure"` // The YAML-formatted or JSON-formatted revision string. It includes information // about which Lambda function to update and optional Lambda functions that // validate deployment lifecycle events. Content *string `locationName:"content" type:"string"` - // The SHA256 hash value of the revision that is specified as a RawString. + // The SHA256 hash value of the revision content. Sha256 *string `locationName:"sha256" type:"string"` } @@ -8988,8 +10111,8 @@ func (s *RawString) SetSha256(v string) *RawString { type RegisterApplicationRevisionInput struct { _ struct{} `type:"structure"` - // The name of an AWS CodeDeploy application associated with the applicable - // IAM user or AWS account. + // The name of an AWS CodeDeploy application associated with the IAM user or + // AWS account. // // ApplicationName is a required field ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` @@ -9241,6 +10364,10 @@ func (s *RevisionInfo) SetRevisionLocation(v *RevisionLocation) *RevisionInfo { type RevisionLocation struct { _ struct{} `type:"structure"` + // The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. + // The content is formatted as JSON or YAML and stored as a RawString. + AppSpecContent *AppSpecContent `locationName:"appSpecContent" type:"structure"` + // Information about the location of application artifacts stored in GitHub. GitHubLocation *GitHubLocation `locationName:"gitHubLocation" type:"structure"` @@ -9249,10 +10376,10 @@ type RevisionLocation struct { // * S3: An application revision stored in Amazon S3. // // * GitHub: An application revision stored in GitHub (EC2/On-premises deployments - // only) + // only). // // * String: A YAML-formatted or JSON-formatted string (AWS Lambda deployments - // only) + // only). RevisionType *string `locationName:"revisionType" type:"string" enum:"RevisionLocationType"` // Information about the location of a revision stored in Amazon S3. @@ -9260,7 +10387,7 @@ type RevisionLocation struct { // Information about the location of an AWS Lambda deployment revision stored // as a RawString. - String_ *RawString `locationName:"string" type:"structure"` + String_ *RawString `locationName:"string" deprecated:"true" type:"structure"` } // String returns the string representation @@ -9273,6 +10400,12 @@ func (s RevisionLocation) GoString() string { return s.String() } +// SetAppSpecContent sets the AppSpecContent field's value. +func (s *RevisionLocation) SetAppSpecContent(v *AppSpecContent) *RevisionLocation { + s.AppSpecContent = v + return s +} + // SetGitHubLocation sets the GitHubLocation field's value. func (s *RevisionLocation) SetGitHubLocation(v *GitHubLocation) *RevisionLocation { s.GitHubLocation = v @@ -9304,8 +10437,8 @@ type RollbackInfo struct { // The ID of the deployment rollback. RollbackDeploymentId *string `locationName:"rollbackDeploymentId" type:"string"` - // Information describing the status of a deployment rollback; for example, - // whether the deployment can't be rolled back, is in progress, failed, or succeeded. + // Information that describes the status of a deployment rollback (for example, + // whether the deployment can't be rolled back, is in progress, failed, or succeeded). RollbackMessage *string `locationName:"rollbackMessage" type:"string"` // The deployment ID of the deployment that was underway and triggered a rollback @@ -9362,7 +10495,7 @@ type S3Location struct { // the application revision. // // If the ETag is not specified as an input parameter, ETag validation of the - // object will be skipped. + // object is skipped. ETag *string `locationName:"eTag" type:"string"` // The name of the Amazon S3 object that represents the bundled artifacts for @@ -9372,7 +10505,7 @@ type S3Location struct { // A specific version of the Amazon S3 object that represents the bundled artifacts // for the application revision. // - // If the version is not specified, the system will use the most recent version + // If the version is not specified, the system uses the most recent version // by default. Version *string `locationName:"version" type:"string"` } @@ -9420,7 +10553,7 @@ func (s *S3Location) SetVersion(v string) *S3Location { type SkipWaitTimeForInstanceTerminationInput struct { _ struct{} `type:"structure"` - // The ID of the blue/green deployment for which you want to skip the instance + // The unique ID of a blue/green deployment for which you want to skip the instance // termination wait time. DeploymentId *string `locationName:"deploymentId" type:"string"` } @@ -9631,9 +10764,10 @@ type TargetGroupInfo struct { // For blue/green deployments, the name of the target group that instances in // the original environment are deregistered from, and instances in the replacement - // environment registered with. For in-place deployments, the name of the target - // group that instances are deregistered from, so they are not serving traffic - // during a deployment, and then re-registered with after the deployment completes. + // environment are registered with. For in-place deployments, the name of the + // target group that instances are deregistered from, so they are not serving + // traffic during a deployment, and then re-registered with after the deployment + // is complete. Name *string `locationName:"name" type:"string"` } @@ -9653,6 +10787,54 @@ func (s *TargetGroupInfo) SetName(v string) *TargetGroupInfo { return s } +// Information about two target groups and how traffic is routed during an Amazon +// ECS deployment. An optional test traffic route can be specified. +type TargetGroupPairInfo struct { + _ struct{} `type:"structure"` + + // The path used by a load balancer to route production traffic when an Amazon + // ECS deployment is complete. + ProdTrafficRoute *TrafficRoute `locationName:"prodTrafficRoute" type:"structure"` + + // One pair of target groups. One is associated with the original task set. + // The second is associated with the task set that serves traffic after the + // deployment is complete. + TargetGroups []*TargetGroupInfo `locationName:"targetGroups" type:"list"` + + // An optional path used by a load balancer to route test traffic after an Amazon + // ECS deployment. Validation can occur while test traffic is served during + // a deployment. + TestTrafficRoute *TrafficRoute `locationName:"testTrafficRoute" type:"structure"` +} + +// String returns the string representation +func (s TargetGroupPairInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TargetGroupPairInfo) GoString() string { + return s.String() +} + +// SetProdTrafficRoute sets the ProdTrafficRoute field's value. +func (s *TargetGroupPairInfo) SetProdTrafficRoute(v *TrafficRoute) *TargetGroupPairInfo { + s.ProdTrafficRoute = v + return s +} + +// SetTargetGroups sets the TargetGroups field's value. +func (s *TargetGroupPairInfo) SetTargetGroups(v []*TargetGroupInfo) *TargetGroupPairInfo { + s.TargetGroups = v + return s +} + +// SetTestTrafficRoute sets the TestTrafficRoute field's value. +func (s *TargetGroupPairInfo) SetTestTrafficRoute(v *TrafficRoute) *TargetGroupPairInfo { + s.TestTrafficRoute = v + return s +} + // Information about the instances to be used in the replacement environment // in a blue/green deployment. type TargetInstances struct { @@ -9813,6 +10995,33 @@ func (s *TimeRange) SetStart(v time.Time) *TimeRange { return s } +// Information about a listener. The listener contains the path used to route +// traffic that is received from the load balancer to a target group. +type TrafficRoute struct { + _ struct{} `type:"structure"` + + // The ARN of one listener. The listener identifies the route between a target + // group and a load balancer. This is an array of strings with a maximum size + // of one. + ListenerArns []*string `locationName:"listenerArns" type:"list"` +} + +// String returns the string representation +func (s TrafficRoute) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TrafficRoute) GoString() string { + return s.String() +} + +// SetListenerArns sets the ListenerArns field's value. +func (s *TrafficRoute) SetListenerArns(v []*string) *TrafficRoute { + s.ListenerArns = v + return s +} + // The configuration that specifies how traffic is shifted from one version // of a Lambda function to another version during an AWS Lambda deployment. type TrafficRoutingConfig struct { @@ -9976,7 +11185,7 @@ type UpdateDeploymentGroupInput struct { // group is updated. AlarmConfiguration *AlarmConfiguration `locationName:"alarmConfiguration" type:"structure"` - // The application name corresponding to the deployment group to update. + // The application name that corresponds to the deployment group to update. // // ApplicationName is a required field ApplicationName *string `locationName:"applicationName" min:"1" type:"string" required:"true"` @@ -10013,9 +11222,15 @@ type UpdateDeploymentGroupInput struct { Ec2TagFilters []*EC2TagFilter `locationName:"ec2TagFilters" type:"list"` // Information about groups of tags applied to on-premises instances. The deployment - // group will include only EC2 instances identified by all the tag groups. + // group includes only EC2 instances identified by all the tag groups. Ec2TagSet *EC2TagSet `locationName:"ec2TagSet" type:"structure"` + // The target Amazon ECS services in the deployment group. This applies only + // to deployment groups that use the Amazon ECS compute platform. A target Amazon + // ECS service is specified as an Amazon ECS cluster and service name pair using + // the format :. + EcsServices []*ECSService `locationName:"ecsServices" type:"list"` + // Information about the load balancer used in a deployment. LoadBalancerInfo *LoadBalancerInfo `locationName:"loadBalancerInfo" type:"structure"` @@ -10027,8 +11242,8 @@ type UpdateDeploymentGroupInput struct { // tags, do not enter any tag names. OnPremisesInstanceTagFilters []*TagFilter `locationName:"onPremisesInstanceTagFilters" type:"list"` - // Information about an on-premises instance tag set. The deployment group will - // include only on-premises instances identified by all the tag groups. + // Information about an on-premises instance tag set. The deployment group includes + // only on-premises instances identified by all the tag groups. OnPremisesTagSet *OnPremisesTagSet `locationName:"onPremisesTagSet" type:"structure"` // A replacement ARN for the service role, if you want to change it. @@ -10138,6 +11353,12 @@ func (s *UpdateDeploymentGroupInput) SetEc2TagSet(v *EC2TagSet) *UpdateDeploymen return s } +// SetEcsServices sets the EcsServices field's value. +func (s *UpdateDeploymentGroupInput) SetEcsServices(v []*ECSService) *UpdateDeploymentGroupInput { + s.EcsServices = v + return s +} + // SetLoadBalancerInfo sets the LoadBalancerInfo field's value. func (s *UpdateDeploymentGroupInput) SetLoadBalancerInfo(v *LoadBalancerInfo) *UpdateDeploymentGroupInput { s.LoadBalancerInfo = v @@ -10247,6 +11468,9 @@ const ( // ComputePlatformLambda is a ComputePlatform enum value ComputePlatformLambda = "Lambda" + + // ComputePlatformEcs is a ComputePlatform enum value + ComputePlatformEcs = "ECS" ) const ( @@ -10299,6 +11523,17 @@ const ( DeploymentStatusReady = "Ready" ) +const ( + // DeploymentTargetTypeInstanceTarget is a DeploymentTargetType enum value + DeploymentTargetTypeInstanceTarget = "InstanceTarget" + + // DeploymentTargetTypeLambdaTarget is a DeploymentTargetType enum value + DeploymentTargetTypeLambdaTarget = "LambdaTarget" + + // DeploymentTargetTypeEcstarget is a DeploymentTargetType enum value + DeploymentTargetTypeEcstarget = "ECSTarget" +) + const ( // DeploymentTypeInPlace is a DeploymentType enum value DeploymentTypeInPlace = "IN_PLACE" @@ -10307,6 +11542,14 @@ const ( DeploymentTypeBlueGreen = "BLUE_GREEN" ) +const ( + // DeploymentWaitTypeReadyWait is a DeploymentWaitType enum value + DeploymentWaitTypeReadyWait = "READY_WAIT" + + // DeploymentWaitTypeTerminationWait is a DeploymentWaitType enum value + DeploymentWaitTypeTerminationWait = "TERMINATION_WAIT" +) + const ( // EC2TagFilterTypeKeyOnly is a EC2TagFilterType enum value EC2TagFilterTypeKeyOnly = "KEY_ONLY" @@ -10396,6 +11639,18 @@ const ( // ErrorCodeHookExecutionFailure is a ErrorCode enum value ErrorCodeHookExecutionFailure = "HOOK_EXECUTION_FAILURE" + + // ErrorCodeAutoscalingValidationError is a ErrorCode enum value + ErrorCodeAutoscalingValidationError = "AUTOSCALING_VALIDATION_ERROR" + + // ErrorCodeInvalidEcsService is a ErrorCode enum value + ErrorCodeInvalidEcsService = "INVALID_ECS_SERVICE" + + // ErrorCodeEcsUpdateError is a ErrorCode enum value + ErrorCodeEcsUpdateError = "ECS_UPDATE_ERROR" + + // ErrorCodeInvalidRevision is a ErrorCode enum value + ErrorCodeInvalidRevision = "INVALID_REVISION" ) const ( @@ -10532,6 +11787,9 @@ const ( // RevisionLocationTypeString is a RevisionLocationType enum value RevisionLocationTypeString = "String" + + // RevisionLocationTypeAppSpecContent is a RevisionLocationType enum value + RevisionLocationTypeAppSpecContent = "AppSpecContent" ) const ( @@ -10561,6 +11819,45 @@ const ( TagFilterTypeKeyAndValue = "KEY_AND_VALUE" ) +const ( + // TargetFilterNameTargetStatus is a TargetFilterName enum value + TargetFilterNameTargetStatus = "TargetStatus" + + // TargetFilterNameServerInstanceLabel is a TargetFilterName enum value + TargetFilterNameServerInstanceLabel = "ServerInstanceLabel" +) + +const ( + // TargetLabelBlue is a TargetLabel enum value + TargetLabelBlue = "Blue" + + // TargetLabelGreen is a TargetLabel enum value + TargetLabelGreen = "Green" +) + +const ( + // TargetStatusPending is a TargetStatus enum value + TargetStatusPending = "Pending" + + // TargetStatusInProgress is a TargetStatus enum value + TargetStatusInProgress = "InProgress" + + // TargetStatusSucceeded is a TargetStatus enum value + TargetStatusSucceeded = "Succeeded" + + // TargetStatusFailed is a TargetStatus enum value + TargetStatusFailed = "Failed" + + // TargetStatusSkipped is a TargetStatus enum value + TargetStatusSkipped = "Skipped" + + // TargetStatusUnknown is a TargetStatus enum value + TargetStatusUnknown = "Unknown" + + // TargetStatusReady is a TargetStatus enum value + TargetStatusReady = "Ready" +) + const ( // TrafficRoutingTypeTimeBasedCanary is a TrafficRoutingType enum value TrafficRoutingTypeTimeBasedCanary = "TimeBasedCanary" diff --git a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/doc.go b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/doc.go index 48544140be..472970920c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/doc.go @@ -5,14 +5,14 @@ // // AWS CodeDeploy is a deployment service that automates application deployments // to Amazon EC2 instances, on-premises instances running in your own facility, -// or serverless AWS Lambda functions. +// serverless AWS Lambda functions, or applications in an Amazon ECS service. // // You can deploy a nearly unlimited variety of application content, such as -// an updated Lambda function, code, web and configuration files, executables, -// packages, scripts, multimedia files, and so on. AWS CodeDeploy can deploy -// application content stored in Amazon S3 buckets, GitHub repositories, or -// Bitbucket repositories. You do not need to make changes to your existing -// code before you can use AWS CodeDeploy. +// an updated Lambda function, updated applications in an Amazon ECS service, +// code, web and configuration files, executables, packages, scripts, multimedia +// files, and so on. AWS CodeDeploy can deploy application content stored in +// Amazon S3 buckets, GitHub repositories, or Bitbucket repositories. You do +// not need to make changes to your existing code before you can use AWS CodeDeploy. // // AWS CodeDeploy makes it easier for you to rapidly release new features, helps // you avoid downtime during application deployment, and handles the complexity @@ -29,30 +29,39 @@ // to ensure the correct combination of revision, deployment configuration, // and deployment group are referenced during a deployment. // -// * Deployment group: A set of individual instances or CodeDeploy Lambda -// applications. A Lambda deployment group contains a group of applications. -// An EC2/On-premises deployment group contains individually tagged instances, -// Amazon EC2 instances in Auto Scaling groups, or both. +// * Deployment group: A set of individual instances, CodeDeploy Lambda deployment +// configuration settings, or an Amazon ECS service and network details. +// A Lambda deployment group specifies how to route traffic to a new version +// of a Lambda function. An Amazon ECS deployment group specifies the service +// created in Amazon ECS to deploy, a load balancer, and a listener to reroute +// production traffic to an updated containerized application. An EC2/On-premises +// deployment group contains individually tagged instances, Amazon EC2 instances +// in Amazon EC2 Auto Scaling groups, or both. All deployment groups can +// specify optional trigger, alarm, and rollback settings. // // * Deployment configuration: A set of deployment rules and deployment success // and failure conditions used by AWS CodeDeploy during a deployment. // -// * Deployment: The process and the components used in the process of updating -// a Lambda function or of installing content on one or more instances. +// * Deployment: The process and the components used when updating a Lambda +// function, a containerized application in an Amazon ECS service, or of +// installing content on one or more instances. // // * Application revisions: For an AWS Lambda deployment, this is an AppSpec -// file that specifies the Lambda function to update and one or more functions -// to validate deployment lifecycle events. For an EC2/On-premises deployment, -// this is an archive file containing source content—source code, web pages, -// executable files, and deployment scripts—along with an AppSpec file. Revisions -// are stored in Amazon S3 buckets or GitHub repositories. For Amazon S3, -// a revision is uniquely identified by its Amazon S3 object key and its -// ETag, version, or both. For GitHub, a revision is uniquely identified -// by its commit ID. +// file that specifies the Lambda function to be updated and one or more +// functions to validate deployment lifecycle events. For an Amazon ECS deployment, +// this is an AppSpec file that specifies the Amazon ECS task definition, +// container, and port where production traffic is rerouted. For an EC2/On-premises +// deployment, this is an archive file that contains source content—source +// code, webpages, executable files, and deployment scripts—along with an +// AppSpec file. Revisions are stored in Amazon S3 buckets or GitHub repositories. +// For Amazon S3, a revision is uniquely identified by its Amazon S3 object +// key and its ETag, version, or both. For GitHub, a revision is uniquely +// identified by its commit ID. // // This guide also contains information to help you get details about the instances // in your deployments, to make on-premises instances available for AWS CodeDeploy -// deployments, and to get details about a Lambda function deployment. +// deployments, to get details about a Lambda function deployment, and to get +// details about Amazon ECS service deployments. // // AWS CodeDeploy Information Resources // diff --git a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/errors.go b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/errors.go index c3af4b0ddb..50cfb414f7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codedeploy/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codedeploy/errors.go @@ -13,14 +13,14 @@ const ( // ErrCodeApplicationAlreadyExistsException for service response error code // "ApplicationAlreadyExistsException". // - // An application with the specified name already exists with the applicable - // IAM user or AWS account. + // An application with the specified name with the IAM user or AWS account already + // exists. ErrCodeApplicationAlreadyExistsException = "ApplicationAlreadyExistsException" // ErrCodeApplicationDoesNotExistException for service response error code // "ApplicationDoesNotExistException". // - // The application does not exist with the applicable IAM user or AWS account. + // The application does not exist with the IAM user or AWS account. ErrCodeApplicationDoesNotExistException = "ApplicationDoesNotExistException" // ErrCodeApplicationLimitExceededException for service response error code @@ -56,15 +56,14 @@ const ( // ErrCodeDeploymentConfigAlreadyExistsException for service response error code // "DeploymentConfigAlreadyExistsException". // - // A deployment configuration with the specified name already exists with the - // applicable IAM user or AWS account. + // A deployment configuration with the specified name with the IAM user or AWS + // account already exists . ErrCodeDeploymentConfigAlreadyExistsException = "DeploymentConfigAlreadyExistsException" // ErrCodeDeploymentConfigDoesNotExistException for service response error code // "DeploymentConfigDoesNotExistException". // - // The deployment configuration does not exist with the applicable IAM user - // or AWS account. + // The deployment configuration does not exist with the IAM user or AWS account. ErrCodeDeploymentConfigDoesNotExistException = "DeploymentConfigDoesNotExistException" // ErrCodeDeploymentConfigInUseException for service response error code @@ -88,21 +87,20 @@ const ( // ErrCodeDeploymentDoesNotExistException for service response error code // "DeploymentDoesNotExistException". // - // The deployment does not exist with the applicable IAM user or AWS account. + // The deployment with the IAM user or AWS account does not exist. ErrCodeDeploymentDoesNotExistException = "DeploymentDoesNotExistException" // ErrCodeDeploymentGroupAlreadyExistsException for service response error code // "DeploymentGroupAlreadyExistsException". // - // A deployment group with the specified name already exists with the applicable - // IAM user or AWS account. + // A deployment group with the specified name with the IAM user or AWS account + // already exists. ErrCodeDeploymentGroupAlreadyExistsException = "DeploymentGroupAlreadyExistsException" // ErrCodeDeploymentGroupDoesNotExistException for service response error code // "DeploymentGroupDoesNotExistException". // - // The named deployment group does not exist with the applicable IAM user or - // AWS account. + // The named deployment group with the IAM user or AWS account does not exist. ErrCodeDeploymentGroupDoesNotExistException = "DeploymentGroupDoesNotExistException" // ErrCodeDeploymentGroupLimitExceededException for service response error code @@ -141,12 +139,40 @@ const ( // The specified deployment has not started. ErrCodeDeploymentNotStartedException = "DeploymentNotStartedException" + // ErrCodeDeploymentTargetDoesNotExistException for service response error code + // "DeploymentTargetDoesNotExistException". + // + // The provided target ID does not belong to the attempted deployment. + ErrCodeDeploymentTargetDoesNotExistException = "DeploymentTargetDoesNotExistException" + + // ErrCodeDeploymentTargetIdRequiredException for service response error code + // "DeploymentTargetIdRequiredException". + // + // A deployment target ID was not provided. + ErrCodeDeploymentTargetIdRequiredException = "DeploymentTargetIdRequiredException" + + // ErrCodeDeploymentTargetListSizeExceededException for service response error code + // "DeploymentTargetListSizeExceededException". + // + // The maximum number of targets that can be associated with an Amazon ECS or + // AWS Lambda deployment was exceeded. The target list of both types of deployments + // must have exactly one item. This exception does not apply to EC2/On-premises + // deployments. + ErrCodeDeploymentTargetListSizeExceededException = "DeploymentTargetListSizeExceededException" + // ErrCodeDescriptionTooLongException for service response error code // "DescriptionTooLongException". // // The description is too long. ErrCodeDescriptionTooLongException = "DescriptionTooLongException" + // ErrCodeECSServiceMappingLimitExceededException for service response error code + // "ECSServiceMappingLimitExceededException". + // + // The Amazon ECS service is associated with more than one deployment groups. + // An Amazon ECS service can be associated with only one deployment group. + ErrCodeECSServiceMappingLimitExceededException = "ECSServiceMappingLimitExceededException" + // ErrCodeGitHubAccountTokenDoesNotExistException for service response error code // "GitHubAccountTokenDoesNotExistException". // @@ -231,11 +257,11 @@ const ( // // * The alarm object is null. // - // * The alarm name is empty or null or exceeds the 255 character limit. + // * The alarm name is empty or null or exceeds the limit of 255 characters. // // * Two alarms with the same name have been specified. // - // * The alarm configuration is enabled but the alarm list is empty. + // * The alarm configuration is enabled, but the alarm list is empty. ErrCodeInvalidAlarmConfigException = "InvalidAlarmConfigException" // ErrCodeInvalidApplicationNameException for service response error code @@ -248,7 +274,7 @@ const ( // "InvalidAutoRollbackConfigException". // // The automatic rollback configuration was specified in an invalid format. - // For example, automatic rollback is enabled but an invalid triggering event + // For example, automatic rollback is enabled, but an invalid triggering event // type or no event types were listed. ErrCodeInvalidAutoRollbackConfigException = "InvalidAutoRollbackConfigException" @@ -319,10 +345,22 @@ const ( // "InvalidDeploymentStyleException". // // An invalid deployment style was specified. Valid deployment types include - // "IN_PLACE" and "BLUE_GREEN". Valid deployment options include "WITH_TRAFFIC_CONTROL" - // and "WITHOUT_TRAFFIC_CONTROL". + // "IN_PLACE" and "BLUE_GREEN." Valid deployment options include "WITH_TRAFFIC_CONTROL" + // and "WITHOUT_TRAFFIC_CONTROL." ErrCodeInvalidDeploymentStyleException = "InvalidDeploymentStyleException" + // ErrCodeInvalidDeploymentTargetIdException for service response error code + // "InvalidDeploymentTargetIdException". + // + // The target ID provided was not valid. + ErrCodeInvalidDeploymentTargetIdException = "InvalidDeploymentTargetIdException" + + // ErrCodeInvalidDeploymentWaitTypeException for service response error code + // "InvalidDeploymentWaitTypeException". + // + // The wait type is invalid. + ErrCodeInvalidDeploymentWaitTypeException = "InvalidDeploymentWaitTypeException" + // ErrCodeInvalidEC2TagCombinationException for service response error code // "InvalidEC2TagCombinationException". // @@ -336,13 +374,19 @@ const ( // The tag was specified in an invalid format. ErrCodeInvalidEC2TagException = "InvalidEC2TagException" + // ErrCodeInvalidECSServiceException for service response error code + // "InvalidECSServiceException". + // + // The Amazon ECS service identifier is not valid. + ErrCodeInvalidECSServiceException = "InvalidECSServiceException" + // ErrCodeInvalidFileExistsBehaviorException for service response error code // "InvalidFileExistsBehaviorException". // // An invalid fileExistsBehavior option was specified to determine how AWS CodeDeploy - // handles files or directories that already exist in a deployment target location + // handles files or directories that already exist in a deployment target location, // but weren't part of the previous successful deployment. Valid values include - // "DISALLOW", "OVERWRITE", and "RETAIN". + // "DISALLOW," "OVERWRITE," and "RETAIN." ErrCodeInvalidFileExistsBehaviorException = "InvalidFileExistsBehaviorException" // ErrCodeInvalidGitHubAccountTokenException for service response error code @@ -379,13 +423,13 @@ const ( // ErrCodeInvalidInputException for service response error code // "InvalidInputException". // - // The specified input was specified in an invalid format. + // The input was specified in an invalid format. ErrCodeInvalidInputException = "InvalidInputException" // ErrCodeInvalidInstanceNameException for service response error code // "InvalidInstanceNameException". // - // The specified on-premises instance name was specified in an invalid format. + // The on-premises instance name was specified in an invalid format. ErrCodeInvalidInstanceNameException = "InvalidInstanceNameException" // ErrCodeInvalidInstanceStatusException for service response error code @@ -470,7 +514,7 @@ const ( // // The service role ARN was specified in an invalid format. Or, if an Auto Scaling // group was specified, the specified service role does not grant the appropriate - // permissions to Auto Scaling. + // permissions to Amazon EC2 Auto Scaling. ErrCodeInvalidRoleException = "InvalidRoleException" // ErrCodeInvalidSortByException for service response error code @@ -489,15 +533,27 @@ const ( // ErrCodeInvalidTagException for service response error code // "InvalidTagException". // - // The specified tag was specified in an invalid format. + // The tag was specified in an invalid format. ErrCodeInvalidTagException = "InvalidTagException" // ErrCodeInvalidTagFilterException for service response error code // "InvalidTagFilterException". // - // The specified tag filter was specified in an invalid format. + // The tag filter was specified in an invalid format. ErrCodeInvalidTagFilterException = "InvalidTagFilterException" + // ErrCodeInvalidTargetFilterNameException for service response error code + // "InvalidTargetFilterNameException". + // + // The target filter name is invalid. + ErrCodeInvalidTargetFilterNameException = "InvalidTargetFilterNameException" + + // ErrCodeInvalidTargetGroupPairException for service response error code + // "InvalidTargetGroupPairException". + // + // A target group pair associated with this deployment is not valid. + ErrCodeInvalidTargetGroupPairException = "InvalidTargetGroupPairException" + // ErrCodeInvalidTargetInstancesException for service response error code // "InvalidTargetInstancesException". // @@ -573,7 +629,7 @@ const ( // ErrCodeRevisionDoesNotExistException for service response error code // "RevisionDoesNotExistException". // - // The named revision does not exist with the applicable IAM user or AWS account. + // The named revision does not exist with the IAM user or AWS account. ErrCodeRevisionDoesNotExistException = "RevisionDoesNotExistException" // ErrCodeRevisionRequiredException for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go index 95f1724f1d..0d1d4f22ec 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/codepipeline/api.go @@ -18,7 +18,7 @@ const opAcknowledgeJob = "AcknowledgeJob" // AcknowledgeJobRequest generates a "aws/request.Request" representing the // client's request for the AcknowledgeJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -104,7 +104,7 @@ const opAcknowledgeThirdPartyJob = "AcknowledgeThirdPartyJob" // AcknowledgeThirdPartyJobRequest generates a "aws/request.Request" representing the // client's request for the AcknowledgeThirdPartyJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -193,7 +193,7 @@ const opCreateCustomActionType = "CreateCustomActionType" // CreateCustomActionTypeRequest generates a "aws/request.Request" representing the // client's request for the CreateCustomActionType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -277,7 +277,7 @@ const opCreatePipeline = "CreatePipeline" // CreatePipelineRequest generates a "aws/request.Request" representing the // client's request for the CreatePipeline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -375,7 +375,7 @@ const opDeleteCustomActionType = "DeleteCustomActionType" // DeleteCustomActionTypeRequest generates a "aws/request.Request" representing the // client's request for the DeleteCustomActionType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -409,8 +409,7 @@ func (c *CodePipeline) DeleteCustomActionTypeRequest(input *DeleteCustomActionTy output = &DeleteCustomActionTypeOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -463,7 +462,7 @@ const opDeletePipeline = "DeletePipeline" // DeletePipelineRequest generates a "aws/request.Request" representing the // client's request for the DeletePipeline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -497,8 +496,7 @@ func (c *CodePipeline) DeletePipelineRequest(input *DeletePipelineInput) (req *r output = &DeletePipelineOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -544,7 +542,7 @@ const opDeleteWebhook = "DeleteWebhook" // DeleteWebhookRequest generates a "aws/request.Request" representing the // client's request for the DeleteWebhook operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -578,6 +576,7 @@ func (c *CodePipeline) DeleteWebhookRequest(input *DeleteWebhookInput) (req *req output = &DeleteWebhookOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -627,7 +626,7 @@ const opDeregisterWebhookWithThirdParty = "DeregisterWebhookWithThirdParty" // DeregisterWebhookWithThirdPartyRequest generates a "aws/request.Request" representing the // client's request for the DeregisterWebhookWithThirdParty operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -661,6 +660,7 @@ func (c *CodePipeline) DeregisterWebhookWithThirdPartyRequest(input *DeregisterW output = &DeregisterWebhookWithThirdPartyOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -711,7 +711,7 @@ const opDisableStageTransition = "DisableStageTransition" // DisableStageTransitionRequest generates a "aws/request.Request" representing the // client's request for the DisableStageTransition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -745,8 +745,7 @@ func (c *CodePipeline) DisableStageTransitionRequest(input *DisableStageTransiti output = &DisableStageTransitionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -799,7 +798,7 @@ const opEnableStageTransition = "EnableStageTransition" // EnableStageTransitionRequest generates a "aws/request.Request" representing the // client's request for the EnableStageTransition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -833,8 +832,7 @@ func (c *CodePipeline) EnableStageTransitionRequest(input *EnableStageTransition output = &EnableStageTransitionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -886,7 +884,7 @@ const opGetJobDetails = "GetJobDetails" // GetJobDetailsRequest generates a "aws/request.Request" representing the // client's request for the GetJobDetails operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -973,7 +971,7 @@ const opGetPipeline = "GetPipeline" // GetPipelineRequest generates a "aws/request.Request" representing the // client's request for the GetPipeline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1061,7 +1059,7 @@ const opGetPipelineExecution = "GetPipelineExecution" // GetPipelineExecutionRequest generates a "aws/request.Request" representing the // client's request for the GetPipelineExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1149,7 +1147,7 @@ const opGetPipelineState = "GetPipelineState" // GetPipelineStateRequest generates a "aws/request.Request" representing the // client's request for the GetPipelineState operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1232,7 +1230,7 @@ const opGetThirdPartyJobDetails = "GetThirdPartyJobDetails" // GetThirdPartyJobDetailsRequest generates a "aws/request.Request" representing the // client's request for the GetThirdPartyJobDetails operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1326,7 +1324,7 @@ const opListActionTypes = "ListActionTypes" // ListActionTypesRequest generates a "aws/request.Request" representing the // client's request for the ListActionTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1410,7 +1408,7 @@ const opListPipelineExecutions = "ListPipelineExecutions" // ListPipelineExecutionsRequest generates a "aws/request.Request" representing the // client's request for the ListPipelineExecutions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1496,7 +1494,7 @@ const opListPipelines = "ListPipelines" // ListPipelinesRequest generates a "aws/request.Request" representing the // client's request for the ListPipelines operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1579,7 +1577,7 @@ const opListWebhooks = "ListWebhooks" // ListWebhooksRequest generates a "aws/request.Request" representing the // client's request for the ListWebhooks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1664,7 +1662,7 @@ const opPollForJobs = "PollForJobs" // PollForJobsRequest generates a "aws/request.Request" representing the // client's request for the PollForJobs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1754,7 +1752,7 @@ const opPollForThirdPartyJobs = "PollForThirdPartyJobs" // PollForThirdPartyJobsRequest generates a "aws/request.Request" representing the // client's request for the PollForThirdPartyJobs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1841,7 +1839,7 @@ const opPutActionRevision = "PutActionRevision" // PutActionRevisionRequest generates a "aws/request.Request" representing the // client's request for the PutActionRevision operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1929,7 +1927,7 @@ const opPutApprovalResult = "PutApprovalResult" // PutApprovalResultRequest generates a "aws/request.Request" representing the // client's request for the PutApprovalResult operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2024,7 +2022,7 @@ const opPutJobFailureResult = "PutJobFailureResult" // PutJobFailureResultRequest generates a "aws/request.Request" representing the // client's request for the PutJobFailureResult operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2058,8 +2056,7 @@ func (c *CodePipeline) PutJobFailureResultRequest(input *PutJobFailureResultInpu output = &PutJobFailureResultOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2112,7 +2109,7 @@ const opPutJobSuccessResult = "PutJobSuccessResult" // PutJobSuccessResultRequest generates a "aws/request.Request" representing the // client's request for the PutJobSuccessResult operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2146,8 +2143,7 @@ func (c *CodePipeline) PutJobSuccessResultRequest(input *PutJobSuccessResultInpu output = &PutJobSuccessResultOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2200,7 +2196,7 @@ const opPutThirdPartyJobFailureResult = "PutThirdPartyJobFailureResult" // PutThirdPartyJobFailureResultRequest generates a "aws/request.Request" representing the // client's request for the PutThirdPartyJobFailureResult operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2234,8 +2230,7 @@ func (c *CodePipeline) PutThirdPartyJobFailureResultRequest(input *PutThirdParty output = &PutThirdPartyJobFailureResultOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2291,7 +2286,7 @@ const opPutThirdPartyJobSuccessResult = "PutThirdPartyJobSuccessResult" // PutThirdPartyJobSuccessResultRequest generates a "aws/request.Request" representing the // client's request for the PutThirdPartyJobSuccessResult operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2325,8 +2320,7 @@ func (c *CodePipeline) PutThirdPartyJobSuccessResultRequest(input *PutThirdParty output = &PutThirdPartyJobSuccessResultOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2382,7 +2376,7 @@ const opPutWebhook = "PutWebhook" // PutWebhookRequest generates a "aws/request.Request" representing the // client's request for the PutWebhook operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2481,7 +2475,7 @@ const opRegisterWebhookWithThirdParty = "RegisterWebhookWithThirdParty" // RegisterWebhookWithThirdPartyRequest generates a "aws/request.Request" representing the // client's request for the RegisterWebhookWithThirdParty operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2515,6 +2509,7 @@ func (c *CodePipeline) RegisterWebhookWithThirdPartyRequest(input *RegisterWebho output = &RegisterWebhookWithThirdPartyOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2564,7 +2559,7 @@ const opRetryStageExecution = "RetryStageExecution" // RetryStageExecutionRequest generates a "aws/request.Request" representing the // client's request for the RetryStageExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2659,7 +2654,7 @@ const opStartPipelineExecution = "StartPipelineExecution" // StartPipelineExecutionRequest generates a "aws/request.Request" representing the // client's request for the StartPipelineExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2742,7 +2737,7 @@ const opUpdatePipeline = "UpdatePipeline" // UpdatePipelineRequest generates a "aws/request.Request" representing the // client's request for the UpdatePipeline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2840,7 +2835,7 @@ func (c *CodePipeline) UpdatePipelineWithContext(ctx aws.Context, input *UpdateP // used to access input and output artifacts in the Amazon S3 bucket used to // store artifact for the pipeline in AWS CodePipeline. type AWSSessionCredentials struct { - _ struct{} `type:"structure"` + _ struct{} `type:"structure" sensitive:"true"` // The access key for the session. // @@ -3273,6 +3268,9 @@ type ActionDeclaration struct { // build artifact. OutputArtifacts []*OutputArtifact `locationName:"outputArtifacts" type:"list"` + // The action declaration's AWS Region, such as us-east-1. + Region *string `locationName:"region" min:"4" type:"string"` + // The ARN of the IAM service role that will perform the declared action. This // is assumed through the roleArn for the pipeline. RoleArn *string `locationName:"roleArn" type:"string"` @@ -3303,6 +3301,9 @@ func (s *ActionDeclaration) Validate() error { if s.Name != nil && len(*s.Name) < 1 { invalidParams.Add(request.NewErrParamMinLen("Name", 1)) } + if s.Region != nil && len(*s.Region) < 4 { + invalidParams.Add(request.NewErrParamMinLen("Region", 4)) + } if s.RunOrder != nil && *s.RunOrder < 1 { invalidParams.Add(request.NewErrParamMinValue("RunOrder", 1)) } @@ -3368,6 +3369,12 @@ func (s *ActionDeclaration) SetOutputArtifacts(v []*OutputArtifact) *ActionDecla return s } +// SetRegion sets the Region field's value. +func (s *ActionDeclaration) SetRegion(v string) *ActionDeclaration { + s.Region = &v + return s +} + // SetRoleArn sets the RoleArn field's value. func (s *ActionDeclaration) SetRoleArn(v string) *ActionDeclaration { s.RoleArn = &v @@ -5794,7 +5801,7 @@ type JobData struct { // credentials that are issued by AWS Secure Token Service (STS). They can be // used to access input and output artifacts in the Amazon S3 bucket used to // store artifact for the pipeline in AWS CodePipeline. - ArtifactCredentials *AWSSessionCredentials `locationName:"artifactCredentials" type:"structure"` + ArtifactCredentials *AWSSessionCredentials `locationName:"artifactCredentials" type:"structure" sensitive:"true"` // A system-generated token, such as a AWS CodeDeploy deployment ID, that a // job requires in order to continue the job asynchronously. @@ -6440,9 +6447,15 @@ type PipelineDeclaration struct { // Represents information about the Amazon S3 bucket where artifacts are stored // for the pipeline. + ArtifactStore *ArtifactStore `locationName:"artifactStore" type:"structure"` + + // A mapping of artifactStore objects and their corresponding regions. There + // must be an artifact store for the pipeline region and for each cross-region + // action within the pipeline. You can only use either artifactStore or artifactStores, + // not both. // - // ArtifactStore is a required field - ArtifactStore *ArtifactStore `locationName:"artifactStore" type:"structure" required:"true"` + // If you create a cross-region action in your pipeline, you must use artifactStores. + ArtifactStores map[string]*ArtifactStore `locationName:"artifactStores" type:"map"` // The name of the action to be performed. // @@ -6479,9 +6492,6 @@ func (s PipelineDeclaration) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *PipelineDeclaration) Validate() error { invalidParams := request.ErrInvalidParams{Context: "PipelineDeclaration"} - if s.ArtifactStore == nil { - invalidParams.Add(request.NewErrParamRequired("ArtifactStore")) - } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } @@ -6502,6 +6512,16 @@ func (s *PipelineDeclaration) Validate() error { invalidParams.AddNested("ArtifactStore", err.(request.ErrInvalidParams)) } } + if s.ArtifactStores != nil { + for i, v := range s.ArtifactStores { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ArtifactStores", i), err.(request.ErrInvalidParams)) + } + } + } if s.Stages != nil { for i, v := range s.Stages { if v == nil { @@ -6525,6 +6545,12 @@ func (s *PipelineDeclaration) SetArtifactStore(v *ArtifactStore) *PipelineDeclar return s } +// SetArtifactStores sets the ArtifactStores field's value. +func (s *PipelineDeclaration) SetArtifactStores(v map[string]*ArtifactStore) *PipelineDeclaration { + s.ArtifactStores = v + return s +} + // SetName sets the Name field's value. func (s *PipelineDeclaration) SetName(v string) *PipelineDeclaration { s.Name = &v @@ -6630,6 +6656,7 @@ type PipelineExecutionSummary struct { // The ID of the pipeline execution. PipelineExecutionId *string `locationName:"pipelineExecutionId" type:"string"` + // A list of the source artifact revisions that initiated a pipeline execution. SourceRevisions []*SourceRevision `locationName:"sourceRevisions" type:"list"` // The date and time when the pipeline execution began, in timestamp format. @@ -7880,16 +7907,29 @@ func (s *S3ArtifactLocation) SetObjectKey(v string) *S3ArtifactLocation { return s } +// Information about the version (or revision) of a source artifact that initiated +// a pipeline execution. type SourceRevision struct { _ struct{} `type:"structure"` + // The name of the action that processed the revision to the source artifact. + // // ActionName is a required field ActionName *string `locationName:"actionName" min:"1" type:"string" required:"true"` + // The system-generated unique ID that identifies the revision number of the + // artifact. RevisionId *string `locationName:"revisionId" min:"1" type:"string"` + // Summary information about the most recent revision of the artifact. For GitHub + // and AWS CodeCommit repositories, the commit message. For Amazon S3 buckets + // or actions, the user-provided content of a codepipeline-artifact-revision-summary + // key specified in the object metadata. RevisionSummary *string `locationName:"revisionSummary" min:"1" type:"string"` + // The commit ID for the artifact revision. For artifacts stored in GitHub or + // AWS CodeCommit repositories, the commit ID is linked to a commit details + // page. RevisionUrl *string `locationName:"revisionUrl" min:"1" type:"string"` } @@ -8130,6 +8170,9 @@ func (s *StageState) SetStageName(v string) *StageState { type StartPipelineExecutionInput struct { _ struct{} `type:"structure"` + // The system-generated unique ID used to identify a unique execution request. + ClientRequestToken *string `locationName:"clientRequestToken" min:"1" type:"string" idempotencyToken:"true"` + // The name of the pipeline to start. // // Name is a required field @@ -8149,6 +8192,9 @@ func (s StartPipelineExecutionInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *StartPipelineExecutionInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "StartPipelineExecutionInput"} + if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) + } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } @@ -8162,6 +8208,12 @@ func (s *StartPipelineExecutionInput) Validate() error { return nil } +// SetClientRequestToken sets the ClientRequestToken field's value. +func (s *StartPipelineExecutionInput) SetClientRequestToken(v string) *StartPipelineExecutionInput { + s.ClientRequestToken = &v + return s +} + // SetName sets the Name field's value. func (s *StartPipelineExecutionInput) SetName(v string) *StartPipelineExecutionInput { s.Name = &v @@ -8241,7 +8293,7 @@ type ThirdPartyJobData struct { // credentials that are issued by AWS Secure Token Service (STS). They can be // used to access input and output artifacts in the Amazon S3 bucket used to // store artifact for the pipeline in AWS CodePipeline. - ArtifactCredentials *AWSSessionCredentials `locationName:"artifactCredentials" type:"structure"` + ArtifactCredentials *AWSSessionCredentials `locationName:"artifactCredentials" type:"structure" sensitive:"true"` // A system-generated token, such as a AWS CodeDeploy deployment ID, that a // job requires in order to continue the job asynchronously. @@ -8491,11 +8543,17 @@ func (s *UpdatePipelineOutput) SetPipeline(v *PipelineDeclaration) *UpdatePipeli return s } +// The authentication applied to incoming webhook trigger requests. type WebhookAuthConfiguration struct { _ struct{} `type:"structure"` + // The property used to configure acceptance of webhooks within a specific IP + // range. For IP, only the AllowedIPRange property must be set, and this property + // must be set to a valid CIDR range. AllowedIPRange *string `min:"1" type:"string"` + // The property used to configure GitHub authentication. For GITHUB_HMAC, only + // the SecretToken property must be set. SecretToken *string `min:"1" type:"string"` } diff --git a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/api.go b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/api.go index e666f73288..782226a7f4 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentity/api.go @@ -18,7 +18,7 @@ const opCreateIdentityPool = "CreateIdentityPool" // CreateIdentityPoolRequest generates a "aws/request.Request" representing the // client's request for the CreateIdentityPool operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -127,7 +127,7 @@ const opDeleteIdentities = "DeleteIdentities" // DeleteIdentitiesRequest generates a "aws/request.Request" representing the // client's request for the DeleteIdentities operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -215,7 +215,7 @@ const opDeleteIdentityPool = "DeleteIdentityPool" // DeleteIdentityPoolRequest generates a "aws/request.Request" representing the // client's request for the DeleteIdentityPool operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -249,8 +249,7 @@ func (c *CognitoIdentity) DeleteIdentityPoolRequest(input *DeleteIdentityPoolInp output = &DeleteIdentityPoolOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -312,7 +311,7 @@ const opDescribeIdentity = "DescribeIdentity" // DescribeIdentityRequest generates a "aws/request.Request" representing the // client's request for the DescribeIdentity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -407,7 +406,7 @@ const opDescribeIdentityPool = "DescribeIdentityPool" // DescribeIdentityPoolRequest generates a "aws/request.Request" representing the // client's request for the DescribeIdentityPool operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -502,7 +501,7 @@ const opGetCredentialsForIdentity = "GetCredentialsForIdentity" // GetCredentialsForIdentityRequest generates a "aws/request.Request" representing the // client's request for the GetCredentialsForIdentity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -611,7 +610,7 @@ const opGetId = "GetId" // GetIdRequest generates a "aws/request.Request" representing the // client's request for the GetId operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -717,7 +716,7 @@ const opGetIdentityPoolRoles = "GetIdentityPoolRoles" // GetIdentityPoolRolesRequest generates a "aws/request.Request" representing the // client's request for the GetIdentityPoolRoles operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -815,7 +814,7 @@ const opGetOpenIdToken = "GetOpenIdToken" // GetOpenIdTokenRequest generates a "aws/request.Request" representing the // client's request for the GetOpenIdToken operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -921,7 +920,7 @@ const opGetOpenIdTokenForDeveloperIdentity = "GetOpenIdTokenForDeveloperIdentity // GetOpenIdTokenForDeveloperIdentityRequest generates a "aws/request.Request" representing the // client's request for the GetOpenIdTokenForDeveloperIdentity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1036,7 +1035,7 @@ const opListIdentities = "ListIdentities" // ListIdentitiesRequest generates a "aws/request.Request" representing the // client's request for the ListIdentities operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1130,7 +1129,7 @@ const opListIdentityPools = "ListIdentityPools" // ListIdentityPoolsRequest generates a "aws/request.Request" representing the // client's request for the ListIdentityPools operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1220,7 +1219,7 @@ const opLookupDeveloperIdentity = "LookupDeveloperIdentity" // LookupDeveloperIdentityRequest generates a "aws/request.Request" representing the // client's request for the LookupDeveloperIdentity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1325,7 +1324,7 @@ const opMergeDeveloperIdentities = "MergeDeveloperIdentities" // MergeDeveloperIdentitiesRequest generates a "aws/request.Request" representing the // client's request for the MergeDeveloperIdentities operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1429,7 +1428,7 @@ const opSetIdentityPoolRoles = "SetIdentityPoolRoles" // SetIdentityPoolRolesRequest generates a "aws/request.Request" representing the // client's request for the SetIdentityPoolRoles operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1463,8 +1462,7 @@ func (c *CognitoIdentity) SetIdentityPoolRolesRequest(input *SetIdentityPoolRole output = &SetIdentityPoolRolesOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1533,7 +1531,7 @@ const opUnlinkDeveloperIdentity = "UnlinkDeveloperIdentity" // UnlinkDeveloperIdentityRequest generates a "aws/request.Request" representing the // client's request for the UnlinkDeveloperIdentity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1567,8 +1565,7 @@ func (c *CognitoIdentity) UnlinkDeveloperIdentityRequest(input *UnlinkDeveloperI output = &UnlinkDeveloperIdentityOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1636,7 +1633,7 @@ const opUnlinkIdentity = "UnlinkIdentity" // UnlinkIdentityRequest generates a "aws/request.Request" representing the // client's request for the UnlinkIdentity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1670,8 +1667,7 @@ func (c *CognitoIdentity) UnlinkIdentityRequest(input *UnlinkIdentityInput) (req output = &UnlinkIdentityOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1742,7 +1738,7 @@ const opUpdateIdentityPool = "UpdateIdentityPool" // UpdateIdentityPoolRequest generates a "aws/request.Request" representing the // client's request for the UpdateIdentityPool operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. diff --git a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go index 74c49c15b2..61c48ee219 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/cognitoidentityprovider/api.go @@ -19,7 +19,7 @@ const opAddCustomAttributes = "AddCustomAttributes" // AddCustomAttributesRequest generates a "aws/request.Request" representing the // client's request for the AddCustomAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -53,6 +53,7 @@ func (c *CognitoIdentityProvider) AddCustomAttributesRequest(input *AddCustomAtt output = &AddCustomAttributesOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -117,7 +118,7 @@ const opAdminAddUserToGroup = "AdminAddUserToGroup" // AdminAddUserToGroupRequest generates a "aws/request.Request" representing the // client's request for the AdminAddUserToGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -151,8 +152,7 @@ func (c *CognitoIdentityProvider) AdminAddUserToGroupRequest(input *AdminAddUser output = &AdminAddUserToGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -218,7 +218,7 @@ const opAdminConfirmSignUp = "AdminConfirmSignUp" // AdminConfirmSignUpRequest generates a "aws/request.Request" representing the // client's request for the AdminConfirmSignUp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -252,6 +252,7 @@ func (c *CognitoIdentityProvider) AdminConfirmSignUpRequest(input *AdminConfirmS output = &AdminConfirmSignUpOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -338,7 +339,7 @@ const opAdminCreateUser = "AdminCreateUser" // AdminCreateUserRequest generates a "aws/request.Request" representing the // client's request for the AdminCreateUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -489,7 +490,7 @@ const opAdminDeleteUser = "AdminDeleteUser" // AdminDeleteUserRequest generates a "aws/request.Request" representing the // client's request for the AdminDeleteUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -523,8 +524,7 @@ func (c *CognitoIdentityProvider) AdminDeleteUserRequest(input *AdminDeleteUserI output = &AdminDeleteUserOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -590,7 +590,7 @@ const opAdminDeleteUserAttributes = "AdminDeleteUserAttributes" // AdminDeleteUserAttributesRequest generates a "aws/request.Request" representing the // client's request for the AdminDeleteUserAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -624,6 +624,7 @@ func (c *CognitoIdentityProvider) AdminDeleteUserAttributesRequest(input *AdminD output = &AdminDeleteUserAttributesOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -690,7 +691,7 @@ const opAdminDisableProviderForUser = "AdminDisableProviderForUser" // AdminDisableProviderForUserRequest generates a "aws/request.Request" representing the // client's request for the AdminDisableProviderForUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -724,6 +725,7 @@ func (c *CognitoIdentityProvider) AdminDisableProviderForUserRequest(input *Admi output = &AdminDisableProviderForUserOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -821,7 +823,7 @@ const opAdminDisableUser = "AdminDisableUser" // AdminDisableUserRequest generates a "aws/request.Request" representing the // client's request for the AdminDisableUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -855,6 +857,7 @@ func (c *CognitoIdentityProvider) AdminDisableUserRequest(input *AdminDisableUse output = &AdminDisableUserOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -920,7 +923,7 @@ const opAdminEnableUser = "AdminEnableUser" // AdminEnableUserRequest generates a "aws/request.Request" representing the // client's request for the AdminEnableUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -954,6 +957,7 @@ func (c *CognitoIdentityProvider) AdminEnableUserRequest(input *AdminEnableUserI output = &AdminEnableUserOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1019,7 +1023,7 @@ const opAdminForgetDevice = "AdminForgetDevice" // AdminForgetDeviceRequest generates a "aws/request.Request" representing the // client's request for the AdminForgetDevice operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1053,8 +1057,7 @@ func (c *CognitoIdentityProvider) AdminForgetDeviceRequest(input *AdminForgetDev output = &AdminForgetDeviceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1123,7 +1126,7 @@ const opAdminGetDevice = "AdminGetDevice" // AdminGetDeviceRequest generates a "aws/request.Request" representing the // client's request for the AdminGetDevice operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1222,7 +1225,7 @@ const opAdminGetUser = "AdminGetUser" // AdminGetUserRequest generates a "aws/request.Request" representing the // client's request for the AdminGetUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1322,7 +1325,7 @@ const opAdminInitiateAuth = "AdminInitiateAuth" // AdminInitiateAuthRequest generates a "aws/request.Request" representing the // client's request for the AdminInitiateAuth operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1456,7 +1459,7 @@ const opAdminLinkProviderForUser = "AdminLinkProviderForUser" // AdminLinkProviderForUserRequest generates a "aws/request.Request" representing the // client's request for the AdminLinkProviderForUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1490,6 +1493,7 @@ func (c *CognitoIdentityProvider) AdminLinkProviderForUserRequest(input *AdminLi output = &AdminLinkProviderForUserOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1577,7 +1581,7 @@ const opAdminListDevices = "AdminListDevices" // AdminListDevicesRequest generates a "aws/request.Request" representing the // client's request for the AdminListDevices operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1676,7 +1680,7 @@ const opAdminListGroupsForUser = "AdminListGroupsForUser" // AdminListGroupsForUserRequest generates a "aws/request.Request" representing the // client's request for the AdminListGroupsForUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1775,7 +1779,7 @@ const opAdminListUserAuthEvents = "AdminListUserAuthEvents" // AdminListUserAuthEventsRequest generates a "aws/request.Request" representing the // client's request for the AdminListUserAuthEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1876,7 +1880,7 @@ const opAdminRemoveUserFromGroup = "AdminRemoveUserFromGroup" // AdminRemoveUserFromGroupRequest generates a "aws/request.Request" representing the // client's request for the AdminRemoveUserFromGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1910,8 +1914,7 @@ func (c *CognitoIdentityProvider) AdminRemoveUserFromGroupRequest(input *AdminRe output = &AdminRemoveUserFromGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1977,7 +1980,7 @@ const opAdminResetUserPassword = "AdminResetUserPassword" // AdminResetUserPasswordRequest generates a "aws/request.Request" representing the // client's request for the AdminResetUserPassword operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2011,6 +2014,7 @@ func (c *CognitoIdentityProvider) AdminResetUserPasswordRequest(input *AdminRese output = &AdminResetUserPasswordOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2117,7 +2121,7 @@ const opAdminRespondToAuthChallenge = "AdminRespondToAuthChallenge" // AdminRespondToAuthChallengeRequest generates a "aws/request.Request" representing the // client's request for the AdminRespondToAuthChallenge operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2272,7 +2276,7 @@ const opAdminSetUserMFAPreference = "AdminSetUserMFAPreference" // AdminSetUserMFAPreferenceRequest generates a "aws/request.Request" representing the // client's request for the AdminSetUserMFAPreference operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2306,6 +2310,7 @@ func (c *CognitoIdentityProvider) AdminSetUserMFAPreferenceRequest(input *AdminS output = &AdminSetUserMFAPreferenceOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2371,7 +2376,7 @@ const opAdminSetUserSettings = "AdminSetUserSettings" // AdminSetUserSettingsRequest generates a "aws/request.Request" representing the // client's request for the AdminSetUserSettings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2405,6 +2410,7 @@ func (c *CognitoIdentityProvider) AdminSetUserSettingsRequest(input *AdminSetUse output = &AdminSetUserSettingsOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2466,7 +2472,7 @@ const opAdminUpdateAuthEventFeedback = "AdminUpdateAuthEventFeedback" // AdminUpdateAuthEventFeedbackRequest generates a "aws/request.Request" representing the // client's request for the AdminUpdateAuthEventFeedback operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2500,6 +2506,7 @@ func (c *CognitoIdentityProvider) AdminUpdateAuthEventFeedbackRequest(input *Adm output = &AdminUpdateAuthEventFeedbackOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2568,7 +2575,7 @@ const opAdminUpdateDeviceStatus = "AdminUpdateDeviceStatus" // AdminUpdateDeviceStatusRequest generates a "aws/request.Request" representing the // client's request for the AdminUpdateDeviceStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2602,6 +2609,7 @@ func (c *CognitoIdentityProvider) AdminUpdateDeviceStatusRequest(input *AdminUpd output = &AdminUpdateDeviceStatusOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2670,7 +2678,7 @@ const opAdminUpdateUserAttributes = "AdminUpdateUserAttributes" // AdminUpdateUserAttributesRequest generates a "aws/request.Request" representing the // client's request for the AdminUpdateUserAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2704,6 +2712,7 @@ func (c *CognitoIdentityProvider) AdminUpdateUserAttributesRequest(input *AdminU output = &AdminUpdateUserAttributesOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2794,7 +2803,7 @@ const opAdminUserGlobalSignOut = "AdminUserGlobalSignOut" // AdminUserGlobalSignOutRequest generates a "aws/request.Request" representing the // client's request for the AdminUserGlobalSignOut operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2828,6 +2837,7 @@ func (c *CognitoIdentityProvider) AdminUserGlobalSignOutRequest(input *AdminUser output = &AdminUserGlobalSignOutOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2893,7 +2903,7 @@ const opAssociateSoftwareToken = "AssociateSoftwareToken" // AssociateSoftwareTokenRequest generates a "aws/request.Request" representing the // client's request for the AssociateSoftwareToken operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2988,7 +2998,7 @@ const opChangePassword = "ChangePassword" // ChangePasswordRequest generates a "aws/request.Request" representing the // client's request for the ChangePassword operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3023,6 +3033,7 @@ func (c *CognitoIdentityProvider) ChangePasswordRequest(input *ChangePasswordInp output = &ChangePasswordOutput{} req = c.newRequest(op, input, output) req.Config.Credentials = credentials.AnonymousCredentials + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3100,7 +3111,7 @@ const opConfirmDevice = "ConfirmDevice" // ConfirmDeviceRequest generates a "aws/request.Request" representing the // client's request for the ConfirmDevice operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3219,7 +3230,7 @@ const opConfirmForgotPassword = "ConfirmForgotPassword" // ConfirmForgotPasswordRequest generates a "aws/request.Request" representing the // client's request for the ConfirmForgotPassword operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3254,6 +3265,7 @@ func (c *CognitoIdentityProvider) ConfirmForgotPasswordRequest(input *ConfirmFor output = &ConfirmForgotPasswordOutput{} req = c.newRequest(op, input, output) req.Config.Credentials = credentials.AnonymousCredentials + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3351,7 +3363,7 @@ const opConfirmSignUp = "ConfirmSignUp" // ConfirmSignUpRequest generates a "aws/request.Request" representing the // client's request for the ConfirmSignUp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3386,6 +3398,7 @@ func (c *CognitoIdentityProvider) ConfirmSignUpRequest(input *ConfirmSignUpInput output = &ConfirmSignUpOutput{} req = c.newRequest(op, input, output) req.Config.Credentials = credentials.AnonymousCredentials + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3483,7 +3496,7 @@ const opCreateGroup = "CreateGroup" // CreateGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3587,7 +3600,7 @@ const opCreateIdentityProvider = "CreateIdentityProvider" // CreateIdentityProviderRequest generates a "aws/request.Request" representing the // client's request for the CreateIdentityProvider operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3689,7 +3702,7 @@ const opCreateResourceServer = "CreateResourceServer" // CreateResourceServerRequest generates a "aws/request.Request" representing the // client's request for the CreateResourceServer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3787,7 +3800,7 @@ const opCreateUserImportJob = "CreateUserImportJob" // CreateUserImportJobRequest generates a "aws/request.Request" representing the // client's request for the CreateUserImportJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3888,7 +3901,7 @@ const opCreateUserPool = "CreateUserPool" // CreateUserPoolRequest generates a "aws/request.Request" representing the // client's request for the CreateUserPool operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4000,7 +4013,7 @@ const opCreateUserPoolClient = "CreateUserPoolClient" // CreateUserPoolClientRequest generates a "aws/request.Request" representing the // client's request for the CreateUserPoolClient operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4104,7 +4117,7 @@ const opCreateUserPoolDomain = "CreateUserPoolDomain" // CreateUserPoolDomainRequest generates a "aws/request.Request" representing the // client's request for the CreateUserPoolDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4198,7 +4211,7 @@ const opDeleteGroup = "DeleteGroup" // DeleteGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4232,8 +4245,7 @@ func (c *CognitoIdentityProvider) DeleteGroupRequest(input *DeleteGroupInput) (r output = &DeleteGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4296,7 +4308,7 @@ const opDeleteIdentityProvider = "DeleteIdentityProvider" // DeleteIdentityProviderRequest generates a "aws/request.Request" representing the // client's request for the DeleteIdentityProvider operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4330,8 +4342,7 @@ func (c *CognitoIdentityProvider) DeleteIdentityProviderRequest(input *DeleteIde output = &DeleteIdentityProviderOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4395,7 +4406,7 @@ const opDeleteResourceServer = "DeleteResourceServer" // DeleteResourceServerRequest generates a "aws/request.Request" representing the // client's request for the DeleteResourceServer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4429,8 +4440,7 @@ func (c *CognitoIdentityProvider) DeleteResourceServerRequest(input *DeleteResou output = &DeleteResourceServerOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4491,7 +4501,7 @@ const opDeleteUser = "DeleteUser" // DeleteUserRequest generates a "aws/request.Request" representing the // client's request for the DeleteUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4525,9 +4535,8 @@ func (c *CognitoIdentityProvider) DeleteUserRequest(input *DeleteUserInput) (req output = &DeleteUserOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) req.Config.Credentials = credentials.AnonymousCredentials + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4597,7 +4606,7 @@ const opDeleteUserAttributes = "DeleteUserAttributes" // DeleteUserAttributesRequest generates a "aws/request.Request" representing the // client's request for the DeleteUserAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4632,6 +4641,7 @@ func (c *CognitoIdentityProvider) DeleteUserAttributesRequest(input *DeleteUserA output = &DeleteUserAttributesOutput{} req = c.newRequest(op, input, output) req.Config.Credentials = credentials.AnonymousCredentials + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4701,7 +4711,7 @@ const opDeleteUserPool = "DeleteUserPool" // DeleteUserPoolRequest generates a "aws/request.Request" representing the // client's request for the DeleteUserPool operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4735,8 +4745,7 @@ func (c *CognitoIdentityProvider) DeleteUserPoolRequest(input *DeleteUserPoolInp output = &DeleteUserPoolOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4801,7 +4810,7 @@ const opDeleteUserPoolClient = "DeleteUserPoolClient" // DeleteUserPoolClientRequest generates a "aws/request.Request" representing the // client's request for the DeleteUserPoolClient operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4835,8 +4844,7 @@ func (c *CognitoIdentityProvider) DeleteUserPoolClientRequest(input *DeleteUserP output = &DeleteUserPoolClientOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4897,7 +4905,7 @@ const opDeleteUserPoolDomain = "DeleteUserPoolDomain" // DeleteUserPoolDomainRequest generates a "aws/request.Request" representing the // client's request for the DeleteUserPoolDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4931,6 +4939,7 @@ func (c *CognitoIdentityProvider) DeleteUserPoolDomainRequest(input *DeleteUserP output = &DeleteUserPoolDomainOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4987,7 +4996,7 @@ const opDescribeIdentityProvider = "DescribeIdentityProvider" // DescribeIdentityProviderRequest generates a "aws/request.Request" representing the // client's request for the DescribeIdentityProvider operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5081,7 +5090,7 @@ const opDescribeResourceServer = "DescribeResourceServer" // DescribeResourceServerRequest generates a "aws/request.Request" representing the // client's request for the DescribeResourceServer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5175,7 +5184,7 @@ const opDescribeRiskConfiguration = "DescribeRiskConfiguration" // DescribeRiskConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DescribeRiskConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5272,7 +5281,7 @@ const opDescribeUserImportJob = "DescribeUserImportJob" // DescribeUserImportJobRequest generates a "aws/request.Request" representing the // client's request for the DescribeUserImportJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5366,7 +5375,7 @@ const opDescribeUserPool = "DescribeUserPool" // DescribeUserPoolRequest generates a "aws/request.Request" representing the // client's request for the DescribeUserPool operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5464,7 +5473,7 @@ const opDescribeUserPoolClient = "DescribeUserPoolClient" // DescribeUserPoolClientRequest generates a "aws/request.Request" representing the // client's request for the DescribeUserPoolClient operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5559,7 +5568,7 @@ const opDescribeUserPoolDomain = "DescribeUserPoolDomain" // DescribeUserPoolDomainRequest generates a "aws/request.Request" representing the // client's request for the DescribeUserPoolDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5649,7 +5658,7 @@ const opForgetDevice = "ForgetDevice" // ForgetDeviceRequest generates a "aws/request.Request" representing the // client's request for the ForgetDevice operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5683,8 +5692,7 @@ func (c *CognitoIdentityProvider) ForgetDeviceRequest(input *ForgetDeviceInput) output = &ForgetDeviceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5757,7 +5765,7 @@ const opForgotPassword = "ForgotPassword" // ForgotPasswordRequest generates a "aws/request.Request" representing the // client's request for the ForgotPassword operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5898,7 +5906,7 @@ const opGetCSVHeader = "GetCSVHeader" // GetCSVHeaderRequest generates a "aws/request.Request" representing the // client's request for the GetCSVHeader operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5993,7 +6001,7 @@ const opGetDevice = "GetDevice" // GetDeviceRequest generates a "aws/request.Request" representing the // client's request for the GetDevice operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6099,7 +6107,7 @@ const opGetGroup = "GetGroup" // GetGroupRequest generates a "aws/request.Request" representing the // client's request for the GetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6195,7 +6203,7 @@ const opGetIdentityProviderByIdentifier = "GetIdentityProviderByIdentifier" // GetIdentityProviderByIdentifierRequest generates a "aws/request.Request" representing the // client's request for the GetIdentityProviderByIdentifier operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6289,7 +6297,7 @@ const opGetSigningCertificate = "GetSigningCertificate" // GetSigningCertificateRequest generates a "aws/request.Request" representing the // client's request for the GetSigningCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6372,7 +6380,7 @@ const opGetUICustomization = "GetUICustomization" // GetUICustomizationRequest generates a "aws/request.Request" representing the // client's request for the GetUICustomization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6469,7 +6477,7 @@ const opGetUser = "GetUser" // GetUserRequest generates a "aws/request.Request" representing the // client's request for the GetUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6573,7 +6581,7 @@ const opGetUserAttributeVerificationCode = "GetUserAttributeVerificationCode" // GetUserAttributeVerificationCodeRequest generates a "aws/request.Request" representing the // client's request for the GetUserAttributeVerificationCode operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6710,7 +6718,7 @@ const opGetUserPoolMfaConfig = "GetUserPoolMfaConfig" // GetUserPoolMfaConfigRequest generates a "aws/request.Request" representing the // client's request for the GetUserPoolMfaConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6804,7 +6812,7 @@ const opGlobalSignOut = "GlobalSignOut" // GlobalSignOutRequest generates a "aws/request.Request" representing the // client's request for the GlobalSignOut operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6838,6 +6846,7 @@ func (c *CognitoIdentityProvider) GlobalSignOutRequest(input *GlobalSignOutInput output = &GlobalSignOutOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -6904,7 +6913,7 @@ const opInitiateAuth = "InitiateAuth" // InitiateAuthRequest generates a "aws/request.Request" representing the // client's request for the InitiateAuth operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7022,7 +7031,7 @@ const opListDevices = "ListDevices" // ListDevicesRequest generates a "aws/request.Request" representing the // client's request for the ListDevices operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7128,7 +7137,7 @@ const opListGroups = "ListGroups" // ListGroupsRequest generates a "aws/request.Request" representing the // client's request for the ListGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7224,7 +7233,7 @@ const opListIdentityProviders = "ListIdentityProviders" // ListIdentityProvidersRequest generates a "aws/request.Request" representing the // client's request for the ListIdentityProviders operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7318,7 +7327,7 @@ const opListResourceServers = "ListResourceServers" // ListResourceServersRequest generates a "aws/request.Request" representing the // client's request for the ListResourceServers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7412,7 +7421,7 @@ const opListUserImportJobs = "ListUserImportJobs" // ListUserImportJobsRequest generates a "aws/request.Request" representing the // client's request for the ListUserImportJobs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7506,7 +7515,7 @@ const opListUserPoolClients = "ListUserPoolClients" // ListUserPoolClientsRequest generates a "aws/request.Request" representing the // client's request for the ListUserPoolClients operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7600,7 +7609,7 @@ const opListUserPools = "ListUserPools" // ListUserPoolsRequest generates a "aws/request.Request" representing the // client's request for the ListUserPools operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7690,7 +7699,7 @@ const opListUsers = "ListUsers" // ListUsersRequest generates a "aws/request.Request" representing the // client's request for the ListUsers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7784,7 +7793,7 @@ const opListUsersInGroup = "ListUsersInGroup" // ListUsersInGroupRequest generates a "aws/request.Request" representing the // client's request for the ListUsersInGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7880,7 +7889,7 @@ const opResendConfirmationCode = "ResendConfirmationCode" // ResendConfirmationCodeRequest generates a "aws/request.Request" representing the // client's request for the ResendConfirmationCode operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8012,7 +8021,7 @@ const opRespondToAuthChallenge = "RespondToAuthChallenge" // RespondToAuthChallengeRequest generates a "aws/request.Request" representing the // client's request for the RespondToAuthChallenge operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8165,7 +8174,7 @@ const opSetRiskConfiguration = "SetRiskConfiguration" // SetRiskConfigurationRequest generates a "aws/request.Request" representing the // client's request for the SetRiskConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8275,7 +8284,7 @@ const opSetUICustomization = "SetUICustomization" // SetUICustomizationRequest generates a "aws/request.Request" representing the // client's request for the SetUICustomization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8380,7 +8389,7 @@ const opSetUserMFAPreference = "SetUserMFAPreference" // SetUserMFAPreferenceRequest generates a "aws/request.Request" representing the // client's request for the SetUserMFAPreference operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8414,6 +8423,7 @@ func (c *CognitoIdentityProvider) SetUserMFAPreferenceRequest(input *SetUserMFAP output = &SetUserMFAPreferenceOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -8479,7 +8489,7 @@ const opSetUserPoolMfaConfig = "SetUserPoolMfaConfig" // SetUserPoolMfaConfigRequest generates a "aws/request.Request" representing the // client's request for the SetUserPoolMfaConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8583,7 +8593,7 @@ const opSetUserSettings = "SetUserSettings" // SetUserSettingsRequest generates a "aws/request.Request" representing the // client's request for the SetUserSettings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8618,6 +8628,7 @@ func (c *CognitoIdentityProvider) SetUserSettingsRequest(input *SetUserSettingsI output = &SetUserSettingsOutput{} req = c.newRequest(op, input, output) req.Config.Credentials = credentials.AnonymousCredentials + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -8685,7 +8696,7 @@ const opSignUp = "SignUp" // SignUpRequest generates a "aws/request.Request" representing the // client's request for the SignUp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8818,7 +8829,7 @@ const opStartUserImportJob = "StartUserImportJob" // StartUserImportJobRequest generates a "aws/request.Request" representing the // client's request for the StartUserImportJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8915,7 +8926,7 @@ const opStopUserImportJob = "StopUserImportJob" // StopUserImportJobRequest generates a "aws/request.Request" representing the // client's request for the StopUserImportJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9012,7 +9023,7 @@ const opUpdateAuthEventFeedback = "UpdateAuthEventFeedback" // UpdateAuthEventFeedbackRequest generates a "aws/request.Request" representing the // client's request for the UpdateAuthEventFeedback operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9046,6 +9057,7 @@ func (c *CognitoIdentityProvider) UpdateAuthEventFeedbackRequest(input *UpdateAu output = &UpdateAuthEventFeedbackOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -9114,7 +9126,7 @@ const opUpdateDeviceStatus = "UpdateDeviceStatus" // UpdateDeviceStatusRequest generates a "aws/request.Request" representing the // client's request for the UpdateDeviceStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9148,6 +9160,7 @@ func (c *CognitoIdentityProvider) UpdateDeviceStatusRequest(input *UpdateDeviceS output = &UpdateDeviceStatusOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -9220,7 +9233,7 @@ const opUpdateGroup = "UpdateGroup" // UpdateGroupRequest generates a "aws/request.Request" representing the // client's request for the UpdateGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9316,7 +9329,7 @@ const opUpdateIdentityProvider = "UpdateIdentityProvider" // UpdateIdentityProviderRequest generates a "aws/request.Request" representing the // client's request for the UpdateIdentityProvider operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9413,7 +9426,7 @@ const opUpdateResourceServer = "UpdateResourceServer" // UpdateResourceServerRequest generates a "aws/request.Request" representing the // client's request for the UpdateResourceServer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9507,7 +9520,7 @@ const opUpdateUserAttributes = "UpdateUserAttributes" // UpdateUserAttributesRequest generates a "aws/request.Request" representing the // client's request for the UpdateUserAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9653,7 +9666,7 @@ const opUpdateUserPool = "UpdateUserPool" // UpdateUserPoolRequest generates a "aws/request.Request" representing the // client's request for the UpdateUserPool operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9687,6 +9700,7 @@ func (c *CognitoIdentityProvider) UpdateUserPoolRequest(input *UpdateUserPoolInp output = &UpdateUserPoolOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -9773,7 +9787,7 @@ const opUpdateUserPoolClient = "UpdateUserPoolClient" // UpdateUserPoolClientRequest generates a "aws/request.Request" representing the // client's request for the UpdateUserPoolClient operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9874,12 +9888,134 @@ func (c *CognitoIdentityProvider) UpdateUserPoolClientWithContext(ctx aws.Contex return out, req.Send() } +const opUpdateUserPoolDomain = "UpdateUserPoolDomain" + +// UpdateUserPoolDomainRequest generates a "aws/request.Request" representing the +// client's request for the UpdateUserPoolDomain 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 UpdateUserPoolDomain for more information on using the UpdateUserPoolDomain +// 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 UpdateUserPoolDomainRequest method. +// req, resp := client.UpdateUserPoolDomainRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/UpdateUserPoolDomain +func (c *CognitoIdentityProvider) UpdateUserPoolDomainRequest(input *UpdateUserPoolDomainInput) (req *request.Request, output *UpdateUserPoolDomainOutput) { + op := &request.Operation{ + Name: opUpdateUserPoolDomain, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateUserPoolDomainInput{} + } + + output = &UpdateUserPoolDomainOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateUserPoolDomain API operation for Amazon Cognito Identity Provider. +// +// Updates the Secure Sockets Layer (SSL) certificate for the custom domain +// for your user pool. +// +// You can use this operation to provide the Amazon Resource Name (ARN) of a +// new certificate to Amazon Cognito. You cannot use it to change the domain +// for a user pool. +// +// A custom domain is used to host the Amazon Cognito hosted UI, which provides +// sign-up and sign-in pages for your application. When you set up a custom +// domain, you provide a certificate that you manage with AWS Certificate Manager +// (ACM). When necessary, you can use this operation to change the certificate +// that you applied to your custom domain. +// +// Usually, this is unnecessary following routine certificate renewal with ACM. +// When you renew your existing certificate in ACM, the ARN for your certificate +// remains the same, and your custom domain uses the new certificate automatically. +// +// However, if you replace your existing certificate with a new one, ACM gives +// the new certificate a new ARN. To apply the new certificate to your custom +// domain, you must provide this ARN to Amazon Cognito. +// +// When you add your new certificate in ACM, you must choose US East (N. Virginia) +// as the AWS Region. +// +// After you submit your request, Amazon Cognito requires up to 1 hour to distribute +// your new certificate to your custom domain. +// +// For more information about adding a custom domain to your user pool, see +// Using Your Own Domain for the Hosted UI (http://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-add-custom-domain.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. +// +// See the AWS API reference guide for Amazon Cognito Identity Provider's +// API operation UpdateUserPoolDomain for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// This exception is thrown when the Amazon Cognito service encounters an invalid +// parameter. +// +// * ErrCodeNotAuthorizedException "NotAuthorizedException" +// This exception is thrown when a user is not authorized. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// This exception is thrown when the Amazon Cognito service cannot find the +// requested resource. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// This exception is thrown when the user has made too many requests for a given +// operation. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// This exception is thrown when Amazon Cognito encounters an internal error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-idp-2016-04-18/UpdateUserPoolDomain +func (c *CognitoIdentityProvider) UpdateUserPoolDomain(input *UpdateUserPoolDomainInput) (*UpdateUserPoolDomainOutput, error) { + req, out := c.UpdateUserPoolDomainRequest(input) + return out, req.Send() +} + +// UpdateUserPoolDomainWithContext is the same as UpdateUserPoolDomain with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateUserPoolDomain 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 *CognitoIdentityProvider) UpdateUserPoolDomainWithContext(ctx aws.Context, input *UpdateUserPoolDomainInput, opts ...request.Option) (*UpdateUserPoolDomainOutput, error) { + req, out := c.UpdateUserPoolDomainRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opVerifySoftwareToken = "VerifySoftwareToken" // VerifySoftwareTokenRequest generates a "aws/request.Request" representing the // client's request for the VerifySoftwareToken operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10002,7 +10138,7 @@ const opVerifyUserAttribute = "VerifyUserAttribute" // VerifyUserAttributeRequest generates a "aws/request.Request" representing the // client's request for the VerifyUserAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10037,6 +10173,7 @@ func (c *CognitoIdentityProvider) VerifyUserAttributeRequest(input *VerifyUserAt output = &VerifyUserAttributeOutput{} req = c.newRequest(op, input, output) req.Config.Credentials = credentials.AnonymousCredentials + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -10401,7 +10538,7 @@ type AdminAddUserToGroupInput struct { // The username for the user. // // Username is a required field - Username *string `min:"1" type:"string" required:"true"` + Username *string `min:"1" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -10486,7 +10623,7 @@ type AdminConfirmSignUpInput struct { // The user name for which you want to confirm user registration. // // Username is a required field - Username *string `min:"1" type:"string" required:"true"` + Username *string `min:"1" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -10652,7 +10789,7 @@ type AdminCreateUserInput struct { // limit that you specified when you created the user pool. To reset the account // after that time limit, you must call AdminCreateUser again, specifying "RESEND" // for the MessageAction parameter. - TemporaryPassword *string `min:"6" type:"string"` + TemporaryPassword *string `min:"6" type:"string" sensitive:"true"` // An array of name-value pairs that contain user attributes and attribute values // to be set for the user to be created. You can create a user without specifying @@ -10694,7 +10831,7 @@ type AdminCreateUserInput struct { // username cannot be changed. // // Username is a required field - Username *string `min:"1" type:"string" required:"true"` + Username *string `min:"1" type:"string" required:"true" sensitive:"true"` // The user's validation data. This is an array of name-value pairs that contain // user attributes and attribute values that you can use for custom validation, @@ -10858,7 +10995,7 @@ type AdminDeleteUserAttributesInput struct { // The user name of the user from which you would like to delete attributes. // // Username is a required field - Username *string `min:"1" type:"string" required:"true"` + Username *string `min:"1" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -10942,7 +11079,7 @@ type AdminDeleteUserInput struct { // The user name of the user you wish to delete. // // Username is a required field - Username *string `min:"1" type:"string" required:"true"` + Username *string `min:"1" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -11086,7 +11223,7 @@ type AdminDisableUserInput struct { // The user name of the user you wish to disable. // // Username is a required field - Username *string `min:"1" type:"string" required:"true"` + Username *string `min:"1" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -11161,7 +11298,7 @@ type AdminEnableUserInput struct { // The user name of the user you wish to enable. // // Username is a required field - Username *string `min:"1" type:"string" required:"true"` + Username *string `min:"1" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -11241,7 +11378,7 @@ type AdminForgetDeviceInput struct { // The user name. // // Username is a required field - Username *string `min:"1" type:"string" required:"true"` + Username *string `min:"1" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -11331,7 +11468,7 @@ type AdminGetDeviceInput struct { // The user name. // // Username is a required field - Username *string `min:"1" type:"string" required:"true"` + Username *string `min:"1" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -11429,7 +11566,7 @@ type AdminGetUserInput struct { // The user name of the user you wish to retrieve. // // Username is a required field - Username *string `min:"1" type:"string" required:"true"` + Username *string `min:"1" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -11518,7 +11655,7 @@ type AdminGetUserOutput struct { // The user name of the user about whom you are receiving information. // // Username is a required field - Username *string `min:"1" type:"string" required:"true"` + Username *string `min:"1" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -11646,7 +11783,7 @@ type AdminInitiateAuthInput struct { // The app client ID. // // ClientId is a required field - ClientId *string `min:"1" type:"string" required:"true"` + ClientId *string `min:"1" type:"string" required:"true" sensitive:"true"` // This is a random key-value pair map which can contain any key and will be // passed to your PreAuthentication Lambda trigger as-is. It can be used to @@ -11983,7 +12120,7 @@ type AdminListDevicesInput struct { // The user name. // // Username is a required field - Username *string `min:"1" type:"string" required:"true"` + Username *string `min:"1" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -12096,7 +12233,7 @@ type AdminListGroupsForUserInput struct { // The username for the user. // // Username is a required field - Username *string `min:"1" type:"string" required:"true"` + Username *string `min:"1" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -12208,7 +12345,7 @@ type AdminListUserAuthEventsInput struct { // The user pool username or an alias. // // Username is a required field - Username *string `min:"1" type:"string" required:"true"` + Username *string `min:"1" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -12319,7 +12456,7 @@ type AdminRemoveUserFromGroupInput struct { // The username for the user. // // Username is a required field - Username *string `min:"1" type:"string" required:"true"` + Username *string `min:"1" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -12404,7 +12541,7 @@ type AdminResetUserPasswordInput struct { // The user name of the user whose password you wish to reset. // // Username is a required field - Username *string `min:"1" type:"string" required:"true"` + Username *string `min:"1" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -12505,7 +12642,7 @@ type AdminRespondToAuthChallengeInput struct { // The app client ID. // // ClientId is a required field - ClientId *string `min:"1" type:"string" required:"true"` + ClientId *string `min:"1" type:"string" required:"true" sensitive:"true"` // Contextual data such as the user's device fingerprint, IP address, or location // used for evaluating the risk of an unexpected event by Amazon Cognito advanced @@ -12682,7 +12819,7 @@ type AdminSetUserMFAPreferenceInput struct { // The user pool username or alias. // // Username is a required field - Username *string `min:"1" type:"string" required:"true"` + Username *string `min:"1" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -12773,7 +12910,7 @@ type AdminSetUserSettingsInput struct { // The user name of the user for whom you wish to set user settings. // // Username is a required field - Username *string `min:"1" type:"string" required:"true"` + Username *string `min:"1" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -12875,7 +13012,7 @@ type AdminUpdateAuthEventFeedbackInput struct { // The user pool username. // // Username is a required field - Username *string `min:"1" type:"string" required:"true"` + Username *string `min:"1" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -12977,7 +13114,7 @@ type AdminUpdateDeviceStatusInput struct { // The user name. // // Username is a required field - Username *string `min:"1" type:"string" required:"true"` + Username *string `min:"1" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -13077,7 +13214,7 @@ type AdminUpdateUserAttributesInput struct { // The user name of the user for whom you want to update user attributes. // // Username is a required field - Username *string `min:"1" type:"string" required:"true"` + Username *string `min:"1" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -13171,7 +13308,7 @@ type AdminUserGlobalSignOutInput struct { // The user name. // // Username is a required field - Username *string `min:"1" type:"string" required:"true"` + Username *string `min:"1" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -13346,7 +13483,7 @@ type AssociateSoftwareTokenInput struct { _ struct{} `type:"structure"` // The access token. - AccessToken *string `type:"string"` + AccessToken *string `type:"string" sensitive:"true"` // The session which should be passed both ways in challenge-response calls // to the service. This allows authentication of the user as part of the MFA @@ -13394,7 +13531,7 @@ type AssociateSoftwareTokenOutput struct { // A unique generated shared secret code that is used in the TOTP algorithm // to generate a one time code. - SecretCode *string `min:"16" type:"string"` + SecretCode *string `min:"16" type:"string" sensitive:"true"` // The session which should be passed both ways in challenge-response calls // to the service. This allows authentication of the user as part of the MFA @@ -13434,7 +13571,7 @@ type AttributeType struct { Name *string `min:"1" type:"string" required:"true"` // The value of the attribute. - Value *string `type:"string"` + Value *string `type:"string" sensitive:"true"` } // String returns the string representation @@ -13569,19 +13706,19 @@ type AuthenticationResultType struct { _ struct{} `type:"structure"` // The access token. - AccessToken *string `type:"string"` + AccessToken *string `type:"string" sensitive:"true"` // The expiration period of the authentication result in seconds. ExpiresIn *int64 `type:"integer"` // The ID token. - IdToken *string `type:"string"` + IdToken *string `type:"string" sensitive:"true"` // The new device metadata from an authentication result. NewDeviceMetadata *NewDeviceMetadataType `type:"structure"` // The refresh token. - RefreshToken *string `type:"string"` + RefreshToken *string `type:"string" sensitive:"true"` // The token type. TokenType *string `type:"string"` @@ -13673,17 +13810,17 @@ type ChangePasswordInput struct { // The access token. // // AccessToken is a required field - AccessToken *string `type:"string" required:"true"` + AccessToken *string `type:"string" required:"true" sensitive:"true"` // The old password. // // PreviousPassword is a required field - PreviousPassword *string `min:"6" type:"string" required:"true"` + PreviousPassword *string `min:"6" type:"string" required:"true" sensitive:"true"` // The new password. // // ProposedPassword is a required field - ProposedPassword *string `min:"6" type:"string" required:"true"` + ProposedPassword *string `min:"6" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -13896,7 +14033,7 @@ type ConfirmDeviceInput struct { // The access token. // // AccessToken is a required field - AccessToken *string `type:"string" required:"true"` + AccessToken *string `type:"string" required:"true" sensitive:"true"` // The device key. // @@ -14002,7 +14139,7 @@ type ConfirmForgotPasswordInput struct { // The app client ID of the app associated with the user pool. // // ClientId is a required field - ClientId *string `min:"1" type:"string" required:"true"` + ClientId *string `min:"1" type:"string" required:"true" sensitive:"true"` // The confirmation code sent by a user's request to retrieve a forgotten password. // For more information, see @@ -14013,11 +14150,11 @@ type ConfirmForgotPasswordInput struct { // The password sent by a user's request to retrieve a forgotten password. // // Password is a required field - Password *string `min:"6" type:"string" required:"true"` + Password *string `min:"6" type:"string" required:"true" sensitive:"true"` // A keyed-hash message authentication code (HMAC) calculated using the secret // key of a user pool client and username plus the client ID in the message. - SecretHash *string `min:"1" type:"string"` + SecretHash *string `min:"1" type:"string" sensitive:"true"` // Contextual data such as the user's device fingerprint, IP address, or location // used for evaluating the risk of an unexpected event by Amazon Cognito advanced @@ -14028,7 +14165,7 @@ type ConfirmForgotPasswordInput struct { // forgotten password. // // Username is a required field - Username *string `min:"1" type:"string" required:"true"` + Username *string `min:"1" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -14147,7 +14284,7 @@ type ConfirmSignUpInput struct { // The ID of the app client associated with the user pool. // // ClientId is a required field - ClientId *string `min:"1" type:"string" required:"true"` + ClientId *string `min:"1" type:"string" required:"true" sensitive:"true"` // The confirmation code sent by a user's request to confirm registration. // @@ -14164,7 +14301,7 @@ type ConfirmSignUpInput struct { // A keyed-hash message authentication code (HMAC) calculated using the secret // key of a user pool client and username plus the client ID in the message. - SecretHash *string `min:"1" type:"string"` + SecretHash *string `min:"1" type:"string" sensitive:"true"` // Contextual data such as the user's device fingerprint, IP address, or location // used for evaluating the risk of an unexpected event by Amazon Cognito advanced @@ -14174,7 +14311,7 @@ type ConfirmSignUpInput struct { // The user name of the user whose registration you wish to confirm. // // Username is a required field - Username *string `min:"1" type:"string" required:"true"` + Username *string `min:"1" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -14934,7 +15071,15 @@ type CreateUserPoolClientInput struct { // UserPoolId is a required field UserPoolId *string `min:"1" type:"string" required:"true"` - // The write attributes. + // The user pool attributes that the app client can write to. + // + // If your app client allows users to sign in through an identity provider, + // this array must include all attributes that are mapped to identity provider + // attributes. Amazon Cognito updates mapped attributes when users sign in to + // your application through an identity provider. If your app client lacks write + // access to a mapped attribute, Amazon Cognito throws an error when it attempts + // to update the attribute. For more information, see Specifying Identity Provider + // Attribute Mappings for Your User Pool (http://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-specifying-attribute-mapping.html). WriteAttributes []*string `type:"list"` } @@ -15098,8 +15243,8 @@ type CreateUserPoolDomainInput struct { // The configuration for a custom domain that hosts the sign-up and sign-in // webpages for your application. // - // Provide this parameter only if you want to use own custom domain for your - // user pool. Otherwise, you can exclude this parameter and use the Amazon Cognito + // Provide this parameter only if you want to use a custom domain for your user + // pool. Otherwise, you can exclude this parameter and use the Amazon Cognito // hosted domain instead. // // For more information about the hosted domain and custom domains, see Configuring @@ -15767,7 +15912,7 @@ type DeleteUserAttributesInput struct { // The access token used in the request to delete user attributes. // // AccessToken is a required field - AccessToken *string `type:"string" required:"true"` + AccessToken *string `type:"string" required:"true" sensitive:"true"` // An array of strings representing the user attribute names you wish to delete. // @@ -15838,7 +15983,7 @@ type DeleteUserInput struct { // The access token from a request to delete a user. // // AccessToken is a required field - AccessToken *string `type:"string" required:"true"` + AccessToken *string `type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -15891,7 +16036,7 @@ type DeleteUserPoolClientInput struct { // The app client ID of the app associated with the user pool. // // ClientId is a required field - ClientId *string `min:"1" type:"string" required:"true"` + ClientId *string `min:"1" type:"string" required:"true" sensitive:"true"` // The user pool ID for the user pool where you want to delete the client. // @@ -16255,7 +16400,7 @@ type DescribeRiskConfigurationInput struct { _ struct{} `type:"structure"` // The app client ID. - ClientId *string `min:"1" type:"string"` + ClientId *string `min:"1" type:"string" sensitive:"true"` // The user pool ID. // @@ -16420,7 +16565,7 @@ type DescribeUserPoolClientInput struct { // The app client ID of the app associated with the user pool. // // ClientId is a required field - ClientId *string `min:"1" type:"string" required:"true"` + ClientId *string `min:"1" type:"string" required:"true" sensitive:"true"` // The user pool ID for the user pool you want to describe. // @@ -17032,7 +17177,7 @@ type ForgetDeviceInput struct { _ struct{} `type:"structure"` // The access token for the forgotten device request. - AccessToken *string `type:"string"` + AccessToken *string `type:"string" sensitive:"true"` // The device key. // @@ -17103,11 +17248,11 @@ type ForgotPasswordInput struct { // The ID of the client associated with the user pool. // // ClientId is a required field - ClientId *string `min:"1" type:"string" required:"true"` + ClientId *string `min:"1" type:"string" required:"true" sensitive:"true"` // A keyed-hash message authentication code (HMAC) calculated using the secret // key of a user pool client and username plus the client ID in the message. - SecretHash *string `min:"1" type:"string"` + SecretHash *string `min:"1" type:"string" sensitive:"true"` // Contextual data such as the user's device fingerprint, IP address, or location // used for evaluating the risk of an unexpected event by Amazon Cognito advanced @@ -17118,7 +17263,7 @@ type ForgotPasswordInput struct { // password. // // Username is a required field - Username *string `min:"1" type:"string" required:"true"` + Username *string `min:"1" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -17294,7 +17439,7 @@ type GetDeviceInput struct { _ struct{} `type:"structure"` // The access token. - AccessToken *string `type:"string"` + AccessToken *string `type:"string" sensitive:"true"` // The device key. // @@ -17600,7 +17745,7 @@ type GetUICustomizationInput struct { _ struct{} `type:"structure"` // The client ID for the client app. - ClientId *string `min:"1" type:"string"` + ClientId *string `min:"1" type:"string" sensitive:"true"` // The user pool ID for the user pool. // @@ -17682,7 +17827,7 @@ type GetUserAttributeVerificationCodeInput struct { // verification code. // // AccessToken is a required field - AccessToken *string `type:"string" required:"true"` + AccessToken *string `type:"string" required:"true" sensitive:"true"` // The attribute name returned by the server response to get the user attribute // verification code. @@ -17766,7 +17911,7 @@ type GetUserInput struct { // the user. // // AccessToken is a required field - AccessToken *string `type:"string" required:"true"` + AccessToken *string `type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -17823,7 +17968,7 @@ type GetUserOutput struct { // The user name of the user you wish to retrieve from the get user request. // // Username is a required field - Username *string `min:"1" type:"string" required:"true"` + Username *string `min:"1" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -17955,7 +18100,7 @@ type GlobalSignOutInput struct { // The access token. // // AccessToken is a required field - AccessToken *string `type:"string" required:"true"` + AccessToken *string `type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -18270,7 +18415,7 @@ type InitiateAuthInput struct { // The app client ID. // // ClientId is a required field - ClientId *string `min:"1" type:"string" required:"true"` + ClientId *string `min:"1" type:"string" required:"true" sensitive:"true"` // This is a random key-value pair map which can contain any key and will be // passed to your PreAuthentication Lambda trigger as-is. It can be used to @@ -18588,7 +18733,7 @@ type ListDevicesInput struct { // The access tokens for the request to list devices. // // AccessToken is a required field - AccessToken *string `type:"string" required:"true"` + AccessToken *string `type:"string" required:"true" sensitive:"true"` // The limit of the device request. Limit *int64 `type:"integer"` @@ -20081,11 +20226,11 @@ type ResendConfirmationCodeInput struct { // The ID of the client associated with the user pool. // // ClientId is a required field - ClientId *string `min:"1" type:"string" required:"true"` + ClientId *string `min:"1" type:"string" required:"true" sensitive:"true"` // A keyed-hash message authentication code (HMAC) calculated using the secret // key of a user pool client and username plus the client ID in the message. - SecretHash *string `min:"1" type:"string"` + SecretHash *string `min:"1" type:"string" sensitive:"true"` // Contextual data such as the user's device fingerprint, IP address, or location // used for evaluating the risk of an unexpected event by Amazon Cognito advanced @@ -20095,7 +20240,7 @@ type ResendConfirmationCodeInput struct { // The user name of the user to whom you wish to resend a confirmation code. // // Username is a required field - Username *string `min:"1" type:"string" required:"true"` + Username *string `min:"1" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -20331,7 +20476,7 @@ type RespondToAuthChallengeInput struct { // The app client ID. // // ClientId is a required field - ClientId *string `min:"1" type:"string" required:"true"` + ClientId *string `min:"1" type:"string" required:"true" sensitive:"true"` // The session which should be passed both ways in challenge-response calls // to the service. If InitiateAuth or RespondToAuthChallenge API call determines @@ -20479,7 +20624,7 @@ type RiskConfigurationType struct { AccountTakeoverRiskConfiguration *AccountTakeoverRiskConfigurationType `type:"structure"` // The app client ID. - ClientId *string `min:"1" type:"string"` + ClientId *string `min:"1" type:"string" sensitive:"true"` // The compromised credentials risk configuration object including the EventFilter // and the EventAction @@ -20621,6 +20766,13 @@ type SchemaAttributeType struct { DeveloperOnlyAttribute *bool `type:"boolean"` // Specifies whether the value of the attribute can be changed. + // + // For any user pool attribute that's mapped to an identity provider attribute, + // you must set this parameter to true. Amazon Cognito updates mapped attributes + // when users sign in to your application through an identity provider. If an + // attribute is immutable, Amazon Cognito throws an error when it attempts to + // update the attribute. For more information, see Specifying Identity Provider + // Attribute Mappings for Your User Pool (http://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-specifying-attribute-mapping.html). Mutable *bool `type:"boolean"` // A schema attribute of the name type. @@ -20716,7 +20868,7 @@ type SetRiskConfigurationInput struct { // Otherwise, ClientId is mapped to the client. When the client ID is not null, // the user pool configuration is overridden and the risk configuration for // the client is used instead. - ClientId *string `min:"1" type:"string"` + ClientId *string `min:"1" type:"string" sensitive:"true"` // The compromised credentials risk configuration. CompromisedCredentialsRiskConfiguration *CompromisedCredentialsRiskConfigurationType `type:"structure"` @@ -20831,7 +20983,7 @@ type SetUICustomizationInput struct { CSS *string `type:"string"` // The client ID for the client app. - ClientId *string `min:"1" type:"string"` + ClientId *string `min:"1" type:"string" sensitive:"true"` // The uploaded logo image for the UI customization. // @@ -20928,7 +21080,7 @@ type SetUserMFAPreferenceInput struct { // The access token. // // AccessToken is a required field - AccessToken *string `type:"string" required:"true"` + AccessToken *string `type:"string" required:"true" sensitive:"true"` // The SMS text message multi-factor authentication (MFA) settings. SMSMfaSettings *SMSMfaSettingsType `type:"structure"` @@ -21113,7 +21265,7 @@ type SetUserSettingsInput struct { // The access token for the set user settings request. // // AccessToken is a required field - AccessToken *string `type:"string" required:"true"` + AccessToken *string `type:"string" required:"true" sensitive:"true"` // Specifies the options for MFA (e.g., email or phone number). // @@ -21195,16 +21347,16 @@ type SignUpInput struct { // The ID of the client associated with the user pool. // // ClientId is a required field - ClientId *string `min:"1" type:"string" required:"true"` + ClientId *string `min:"1" type:"string" required:"true" sensitive:"true"` // The password of the user you wish to register. // // Password is a required field - Password *string `min:"6" type:"string" required:"true"` + Password *string `min:"6" type:"string" required:"true" sensitive:"true"` // A keyed-hash message authentication code (HMAC) calculated using the secret // key of a user pool client and username plus the client ID in the message. - SecretHash *string `min:"1" type:"string"` + SecretHash *string `min:"1" type:"string" sensitive:"true"` // An array of name-value pairs representing user attributes. // @@ -21220,7 +21372,7 @@ type SignUpInput struct { // The user name of the user you wish to register. // // Username is a required field - Username *string `min:"1" type:"string" required:"true"` + Username *string `min:"1" type:"string" required:"true" sensitive:"true"` // The validation data in the request to register a user. ValidationData []*AttributeType `type:"list"` @@ -21755,7 +21907,7 @@ type UICustomizationType struct { CSSVersion *string `type:"string"` // The client ID for the client app. - ClientId *string `min:"1" type:"string"` + ClientId *string `min:"1" type:"string" sensitive:"true"` // The creation date for the UI customization. CreationDate *time.Time `type:"timestamp"` @@ -21833,7 +21985,7 @@ type UpdateAuthEventFeedbackInput struct { // The feedback token. // // FeedbackToken is a required field - FeedbackToken *string `type:"string" required:"true"` + FeedbackToken *string `type:"string" required:"true" sensitive:"true"` // The authentication event feedback value. // @@ -21848,7 +22000,7 @@ type UpdateAuthEventFeedbackInput struct { // The user pool username. // // Username is a required field - Username *string `min:"1" type:"string" required:"true"` + Username *string `min:"1" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -21946,7 +22098,7 @@ type UpdateDeviceStatusInput struct { // The access token. // // AccessToken is a required field - AccessToken *string `type:"string" required:"true"` + AccessToken *string `type:"string" required:"true" sensitive:"true"` // The device key. // @@ -22368,7 +22520,7 @@ type UpdateUserAttributesInput struct { // The access token for the request to update user attributes. // // AccessToken is a required field - AccessToken *string `type:"string" required:"true"` + AccessToken *string `type:"string" required:"true" sensitive:"true"` // An array of name-value pairs representing user attributes. // @@ -22497,7 +22649,7 @@ type UpdateUserPoolClientInput struct { // The ID of the client associated with the user pool. // // ClientId is a required field - ClientId *string `min:"1" type:"string" required:"true"` + ClientId *string `min:"1" type:"string" required:"true" sensitive:"true"` // The client name from the update user pool client request. ClientName *string `min:"1" type:"string"` @@ -22706,6 +22858,117 @@ func (s *UpdateUserPoolClientOutput) SetUserPoolClient(v *UserPoolClientType) *U return s } +// The UpdateUserPoolDomain request input. +type UpdateUserPoolDomainInput struct { + _ struct{} `type:"structure"` + + // The configuration for a custom domain that hosts the sign-up and sign-in + // pages for your application. Use this object to specify an SSL certificate + // that is managed by ACM. + // + // CustomDomainConfig is a required field + CustomDomainConfig *CustomDomainConfigType `type:"structure" required:"true"` + + // The domain name for the custom domain that hosts the sign-up and sign-in + // pages for your application. For example: auth.example.com. + // + // This string can include only lowercase letters, numbers, and hyphens. Do + // not use a hyphen for the first or last character. Use periods to separate + // subdomain names. + // + // Domain is a required field + Domain *string `min:"1" type:"string" required:"true"` + + // The ID of the user pool that is associated with the custom domain that you + // are updating the certificate for. + // + // UserPoolId is a required field + UserPoolId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateUserPoolDomainInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateUserPoolDomainInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateUserPoolDomainInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateUserPoolDomainInput"} + if s.CustomDomainConfig == nil { + invalidParams.Add(request.NewErrParamRequired("CustomDomainConfig")) + } + if s.Domain == nil { + invalidParams.Add(request.NewErrParamRequired("Domain")) + } + if s.Domain != nil && len(*s.Domain) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Domain", 1)) + } + if s.UserPoolId == nil { + invalidParams.Add(request.NewErrParamRequired("UserPoolId")) + } + if s.UserPoolId != nil && len(*s.UserPoolId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserPoolId", 1)) + } + if s.CustomDomainConfig != nil { + if err := s.CustomDomainConfig.Validate(); err != nil { + invalidParams.AddNested("CustomDomainConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCustomDomainConfig sets the CustomDomainConfig field's value. +func (s *UpdateUserPoolDomainInput) SetCustomDomainConfig(v *CustomDomainConfigType) *UpdateUserPoolDomainInput { + s.CustomDomainConfig = v + return s +} + +// SetDomain sets the Domain field's value. +func (s *UpdateUserPoolDomainInput) SetDomain(v string) *UpdateUserPoolDomainInput { + s.Domain = &v + return s +} + +// SetUserPoolId sets the UserPoolId field's value. +func (s *UpdateUserPoolDomainInput) SetUserPoolId(v string) *UpdateUserPoolDomainInput { + s.UserPoolId = &v + return s +} + +// The UpdateUserPoolDomain response output. +type UpdateUserPoolDomainOutput struct { + _ struct{} `type:"structure"` + + // The Amazon CloudFront endpoint that Amazon Cognito set up when you added + // the custom domain to your user pool. + CloudFrontDomain *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s UpdateUserPoolDomainOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateUserPoolDomainOutput) GoString() string { + return s.String() +} + +// SetCloudFrontDomain sets the CloudFrontDomain field's value. +func (s *UpdateUserPoolDomainOutput) SetCloudFrontDomain(v string) *UpdateUserPoolDomainOutput { + s.CloudFrontDomain = &v + return s +} + // Represents the request to update the user pool. type UpdateUserPoolInput struct { _ struct{} `type:"structure"` @@ -23185,7 +23448,7 @@ type UserPoolClientDescription struct { _ struct{} `type:"structure"` // The ID of the client associated with the user pool. - ClientId *string `min:"1" type:"string"` + ClientId *string `min:"1" type:"string" sensitive:"true"` // The client name from the user pool client description. ClientName *string `min:"1" type:"string"` @@ -23265,13 +23528,13 @@ type UserPoolClientType struct { CallbackURLs []*string `type:"list"` // The ID of the client associated with the user pool. - ClientId *string `min:"1" type:"string"` + ClientId *string `min:"1" type:"string" sensitive:"true"` // The client name from the user pool request of the client type. ClientName *string `min:"1" type:"string"` // The client secret from the user pool request of the client type. - ClientSecret *string `min:"1" type:"string"` + ClientSecret *string `min:"1" type:"string" sensitive:"true"` // The date the user pool client was created. CreationDate *time.Time `type:"timestamp"` @@ -23865,7 +24128,7 @@ type UserType struct { UserStatus *string `type:"string" enum:"UserStatusType"` // The user name of the user you wish to describe. - Username *string `min:"1" type:"string"` + Username *string `min:"1" type:"string" sensitive:"true"` } // String returns the string representation @@ -24019,7 +24282,7 @@ type VerifySoftwareTokenInput struct { _ struct{} `type:"structure"` // The access token. - AccessToken *string `type:"string"` + AccessToken *string `type:"string" sensitive:"true"` // The friendly device name. FriendlyDeviceName *string `type:"string"` @@ -24127,7 +24390,7 @@ type VerifyUserAttributeInput struct { // Represents the access token of the request to verify user attributes. // // AccessToken is a required field - AccessToken *string `type:"string" required:"true"` + AccessToken *string `type:"string" required:"true" sensitive:"true"` // The attribute name in the request to verify user attributes. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go index c77fdfb82b..bf62e4031d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/configservice/api.go @@ -13,12 +13,102 @@ import ( "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) +const opBatchGetAggregateResourceConfig = "BatchGetAggregateResourceConfig" + +// BatchGetAggregateResourceConfigRequest generates a "aws/request.Request" representing the +// client's request for the BatchGetAggregateResourceConfig 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 BatchGetAggregateResourceConfig for more information on using the BatchGetAggregateResourceConfig +// 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 BatchGetAggregateResourceConfigRequest method. +// req, resp := client.BatchGetAggregateResourceConfigRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/BatchGetAggregateResourceConfig +func (c *ConfigService) BatchGetAggregateResourceConfigRequest(input *BatchGetAggregateResourceConfigInput) (req *request.Request, output *BatchGetAggregateResourceConfigOutput) { + op := &request.Operation{ + Name: opBatchGetAggregateResourceConfig, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &BatchGetAggregateResourceConfigInput{} + } + + output = &BatchGetAggregateResourceConfigOutput{} + req = c.newRequest(op, input, output) + return +} + +// BatchGetAggregateResourceConfig API operation for AWS Config. +// +// Returns the current configuration items for resources that are present in +// your AWS Config aggregator. The operation also returns a list of resources +// that are not processed in the current request. If there are no unprocessed +// resources, the operation returns an empty unprocessedResourceIdentifiers +// list. +// +// The API does not return results for deleted resources. +// +// The API does not return tags and relationships. +// +// 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 Config's +// API operation BatchGetAggregateResourceConfig for usage and error information. +// +// Returned Error Codes: +// * ErrCodeValidationException "ValidationException" +// The requested action is not valid. +// +// * ErrCodeNoSuchConfigurationAggregatorException "NoSuchConfigurationAggregatorException" +// You have specified a configuration aggregator that does not exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/BatchGetAggregateResourceConfig +func (c *ConfigService) BatchGetAggregateResourceConfig(input *BatchGetAggregateResourceConfigInput) (*BatchGetAggregateResourceConfigOutput, error) { + req, out := c.BatchGetAggregateResourceConfigRequest(input) + return out, req.Send() +} + +// BatchGetAggregateResourceConfigWithContext is the same as BatchGetAggregateResourceConfig with the addition of +// the ability to pass a context and additional request options. +// +// See BatchGetAggregateResourceConfig 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 *ConfigService) BatchGetAggregateResourceConfigWithContext(ctx aws.Context, input *BatchGetAggregateResourceConfigInput, opts ...request.Option) (*BatchGetAggregateResourceConfigOutput, error) { + req, out := c.BatchGetAggregateResourceConfigRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opBatchGetResourceConfig = "BatchGetResourceConfig" // BatchGetResourceConfigRequest generates a "aws/request.Request" representing the // client's request for the BatchGetResourceConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -109,7 +199,7 @@ const opDeleteAggregationAuthorization = "DeleteAggregationAuthorization" // DeleteAggregationAuthorizationRequest generates a "aws/request.Request" representing the // client's request for the DeleteAggregationAuthorization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -143,8 +233,7 @@ func (c *ConfigService) DeleteAggregationAuthorizationRequest(input *DeleteAggre output = &DeleteAggregationAuthorizationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -192,7 +281,7 @@ const opDeleteConfigRule = "DeleteConfigRule" // DeleteConfigRuleRequest generates a "aws/request.Request" representing the // client's request for the DeleteConfigRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -226,8 +315,7 @@ func (c *ConfigService) DeleteConfigRuleRequest(input *DeleteConfigRuleInput) (r output = &DeleteConfigRuleOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -284,7 +372,7 @@ const opDeleteConfigurationAggregator = "DeleteConfigurationAggregator" // DeleteConfigurationAggregatorRequest generates a "aws/request.Request" representing the // client's request for the DeleteConfigurationAggregator operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -318,8 +406,7 @@ func (c *ConfigService) DeleteConfigurationAggregatorRequest(input *DeleteConfig output = &DeleteConfigurationAggregatorOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -366,7 +453,7 @@ const opDeleteConfigurationRecorder = "DeleteConfigurationRecorder" // DeleteConfigurationRecorderRequest generates a "aws/request.Request" representing the // client's request for the DeleteConfigurationRecorder operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -400,8 +487,7 @@ func (c *ConfigService) DeleteConfigurationRecorderRequest(input *DeleteConfigur output = &DeleteConfigurationRecorderOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -456,7 +542,7 @@ const opDeleteDeliveryChannel = "DeleteDeliveryChannel" // DeleteDeliveryChannelRequest generates a "aws/request.Request" representing the // client's request for the DeleteDeliveryChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -490,8 +576,7 @@ func (c *ConfigService) DeleteDeliveryChannelRequest(input *DeleteDeliveryChanne output = &DeleteDeliveryChannelOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -544,7 +629,7 @@ const opDeleteEvaluationResults = "DeleteEvaluationResults" // DeleteEvaluationResultsRequest generates a "aws/request.Request" representing the // client's request for the DeleteEvaluationResults operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -578,6 +663,7 @@ func (c *ConfigService) DeleteEvaluationResultsRequest(input *DeleteEvaluationRe output = &DeleteEvaluationResultsOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -631,7 +717,7 @@ const opDeletePendingAggregationRequest = "DeletePendingAggregationRequest" // DeletePendingAggregationRequestRequest generates a "aws/request.Request" representing the // client's request for the DeletePendingAggregationRequest operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -665,8 +751,7 @@ func (c *ConfigService) DeletePendingAggregationRequestRequest(input *DeletePend output = &DeletePendingAggregationRequestOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -714,7 +799,7 @@ const opDeleteRetentionConfiguration = "DeleteRetentionConfiguration" // DeleteRetentionConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteRetentionConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -748,8 +833,7 @@ func (c *ConfigService) DeleteRetentionConfigurationRequest(input *DeleteRetenti output = &DeleteRetentionConfigurationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -799,7 +883,7 @@ const opDeliverConfigSnapshot = "DeliverConfigSnapshot" // DeliverConfigSnapshotRequest generates a "aws/request.Request" representing the // client's request for the DeliverConfigSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -895,7 +979,7 @@ const opDescribeAggregateComplianceByConfigRules = "DescribeAggregateComplianceB // DescribeAggregateComplianceByConfigRulesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAggregateComplianceByConfigRules operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -988,7 +1072,7 @@ const opDescribeAggregationAuthorizations = "DescribeAggregationAuthorizations" // DescribeAggregationAuthorizationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAggregationAuthorizations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1076,7 +1160,7 @@ const opDescribeComplianceByConfigRule = "DescribeComplianceByConfigRule" // DescribeComplianceByConfigRuleRequest generates a "aws/request.Request" representing the // client's request for the DescribeComplianceByConfigRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1186,7 +1270,7 @@ const opDescribeComplianceByResource = "DescribeComplianceByResource" // DescribeComplianceByResourceRequest generates a "aws/request.Request" representing the // client's request for the DescribeComplianceByResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1294,7 +1378,7 @@ const opDescribeConfigRuleEvaluationStatus = "DescribeConfigRuleEvaluationStatus // DescribeConfigRuleEvaluationStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigRuleEvaluationStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1385,7 +1469,7 @@ const opDescribeConfigRules = "DescribeConfigRules" // DescribeConfigRulesRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigRules operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1469,7 +1553,7 @@ const opDescribeConfigurationAggregatorSourcesStatus = "DescribeConfigurationAgg // DescribeConfigurationAggregatorSourcesStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigurationAggregatorSourcesStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1562,7 +1646,7 @@ const opDescribeConfigurationAggregators = "DescribeConfigurationAggregators" // DescribeConfigurationAggregatorsRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigurationAggregators operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1654,7 +1738,7 @@ const opDescribeConfigurationRecorderStatus = "DescribeConfigurationRecorderStat // DescribeConfigurationRecorderStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigurationRecorderStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1738,7 +1822,7 @@ const opDescribeConfigurationRecorders = "DescribeConfigurationRecorders" // DescribeConfigurationRecordersRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigurationRecorders operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1822,7 +1906,7 @@ const opDescribeDeliveryChannelStatus = "DescribeDeliveryChannelStatus" // DescribeDeliveryChannelStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeDeliveryChannelStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1905,7 +1989,7 @@ const opDescribeDeliveryChannels = "DescribeDeliveryChannels" // DescribeDeliveryChannelsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDeliveryChannels operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1988,7 +2072,7 @@ const opDescribePendingAggregationRequests = "DescribePendingAggregationRequests // DescribePendingAggregationRequestsRequest generates a "aws/request.Request" representing the // client's request for the DescribePendingAggregationRequests operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2075,7 +2159,7 @@ const opDescribeRetentionConfigurations = "DescribeRetentionConfigurations" // DescribeRetentionConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeRetentionConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2167,7 +2251,7 @@ const opGetAggregateComplianceDetailsByConfigRule = "GetAggregateComplianceDetai // GetAggregateComplianceDetailsByConfigRuleRequest generates a "aws/request.Request" representing the // client's request for the GetAggregateComplianceDetailsByConfigRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2262,7 +2346,7 @@ const opGetAggregateConfigRuleComplianceSummary = "GetAggregateConfigRuleComplia // GetAggregateConfigRuleComplianceSummaryRequest generates a "aws/request.Request" representing the // client's request for the GetAggregateConfigRuleComplianceSummary operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2350,12 +2434,198 @@ func (c *ConfigService) GetAggregateConfigRuleComplianceSummaryWithContext(ctx a return out, req.Send() } +const opGetAggregateDiscoveredResourceCounts = "GetAggregateDiscoveredResourceCounts" + +// GetAggregateDiscoveredResourceCountsRequest generates a "aws/request.Request" representing the +// client's request for the GetAggregateDiscoveredResourceCounts 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 GetAggregateDiscoveredResourceCounts for more information on using the GetAggregateDiscoveredResourceCounts +// 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 GetAggregateDiscoveredResourceCountsRequest method. +// req, resp := client.GetAggregateDiscoveredResourceCountsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetAggregateDiscoveredResourceCounts +func (c *ConfigService) GetAggregateDiscoveredResourceCountsRequest(input *GetAggregateDiscoveredResourceCountsInput) (req *request.Request, output *GetAggregateDiscoveredResourceCountsOutput) { + op := &request.Operation{ + Name: opGetAggregateDiscoveredResourceCounts, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetAggregateDiscoveredResourceCountsInput{} + } + + output = &GetAggregateDiscoveredResourceCountsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetAggregateDiscoveredResourceCounts API operation for AWS Config. +// +// Returns the resource counts across accounts and regions that are present +// in your AWS Config aggregator. You can request the resource counts by providing +// filters and GroupByKey. +// +// For example, if the input contains accountID 12345678910 and region us-east-1 +// in filters, the API returns the count of resources in account ID 12345678910 +// and region us-east-1. If the input contains ACCOUNT_ID as a GroupByKey, the +// API returns resource counts for all source accounts that are present in your +// aggregator. +// +// 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 Config's +// API operation GetAggregateDiscoveredResourceCounts for usage and error information. +// +// Returned Error Codes: +// * ErrCodeValidationException "ValidationException" +// The requested action is not valid. +// +// * ErrCodeInvalidLimitException "InvalidLimitException" +// The specified limit is outside the allowable range. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The specified next token is invalid. Specify the nextToken string that was +// returned in the previous response to get the next page of results. +// +// * ErrCodeNoSuchConfigurationAggregatorException "NoSuchConfigurationAggregatorException" +// You have specified a configuration aggregator that does not exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetAggregateDiscoveredResourceCounts +func (c *ConfigService) GetAggregateDiscoveredResourceCounts(input *GetAggregateDiscoveredResourceCountsInput) (*GetAggregateDiscoveredResourceCountsOutput, error) { + req, out := c.GetAggregateDiscoveredResourceCountsRequest(input) + return out, req.Send() +} + +// GetAggregateDiscoveredResourceCountsWithContext is the same as GetAggregateDiscoveredResourceCounts with the addition of +// the ability to pass a context and additional request options. +// +// See GetAggregateDiscoveredResourceCounts 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 *ConfigService) GetAggregateDiscoveredResourceCountsWithContext(ctx aws.Context, input *GetAggregateDiscoveredResourceCountsInput, opts ...request.Option) (*GetAggregateDiscoveredResourceCountsOutput, error) { + req, out := c.GetAggregateDiscoveredResourceCountsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetAggregateResourceConfig = "GetAggregateResourceConfig" + +// GetAggregateResourceConfigRequest generates a "aws/request.Request" representing the +// client's request for the GetAggregateResourceConfig 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 GetAggregateResourceConfig for more information on using the GetAggregateResourceConfig +// 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 GetAggregateResourceConfigRequest method. +// req, resp := client.GetAggregateResourceConfigRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetAggregateResourceConfig +func (c *ConfigService) GetAggregateResourceConfigRequest(input *GetAggregateResourceConfigInput) (req *request.Request, output *GetAggregateResourceConfigOutput) { + op := &request.Operation{ + Name: opGetAggregateResourceConfig, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetAggregateResourceConfigInput{} + } + + output = &GetAggregateResourceConfigOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetAggregateResourceConfig API operation for AWS Config. +// +// Returns configuration item that is aggregated for your specific resource +// in a specific source 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. +// +// See the AWS API reference guide for AWS Config's +// API operation GetAggregateResourceConfig for usage and error information. +// +// Returned Error Codes: +// * ErrCodeValidationException "ValidationException" +// The requested action is not valid. +// +// * ErrCodeNoSuchConfigurationAggregatorException "NoSuchConfigurationAggregatorException" +// You have specified a configuration aggregator that does not exist. +// +// * ErrCodeOversizedConfigurationItemException "OversizedConfigurationItemException" +// The configuration item size is outside the allowable range. +// +// * ErrCodeResourceNotDiscoveredException "ResourceNotDiscoveredException" +// You have specified a resource that is either unknown or has not been discovered. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/GetAggregateResourceConfig +func (c *ConfigService) GetAggregateResourceConfig(input *GetAggregateResourceConfigInput) (*GetAggregateResourceConfigOutput, error) { + req, out := c.GetAggregateResourceConfigRequest(input) + return out, req.Send() +} + +// GetAggregateResourceConfigWithContext is the same as GetAggregateResourceConfig with the addition of +// the ability to pass a context and additional request options. +// +// See GetAggregateResourceConfig 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 *ConfigService) GetAggregateResourceConfigWithContext(ctx aws.Context, input *GetAggregateResourceConfigInput, opts ...request.Option) (*GetAggregateResourceConfigOutput, error) { + req, out := c.GetAggregateResourceConfigRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetComplianceDetailsByConfigRule = "GetComplianceDetailsByConfigRule" // GetComplianceDetailsByConfigRuleRequest generates a "aws/request.Request" representing the // client's request for the GetComplianceDetailsByConfigRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2445,7 +2715,7 @@ const opGetComplianceDetailsByResource = "GetComplianceDetailsByResource" // GetComplianceDetailsByResourceRequest generates a "aws/request.Request" representing the // client's request for the GetComplianceDetailsByResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2527,7 +2797,7 @@ const opGetComplianceSummaryByConfigRule = "GetComplianceSummaryByConfigRule" // GetComplianceSummaryByConfigRuleRequest generates a "aws/request.Request" representing the // client's request for the GetComplianceSummaryByConfigRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2602,7 +2872,7 @@ const opGetComplianceSummaryByResourceType = "GetComplianceSummaryByResourceType // GetComplianceSummaryByResourceTypeRequest generates a "aws/request.Request" representing the // client's request for the GetComplianceSummaryByResourceType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2684,7 +2954,7 @@ const opGetDiscoveredResourceCounts = "GetDiscoveredResourceCounts" // GetDiscoveredResourceCountsRequest generates a "aws/request.Request" representing the // client's request for the GetDiscoveredResourceCounts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2803,7 +3073,7 @@ const opGetResourceConfigHistory = "GetResourceConfigHistory" // GetResourceConfigHistoryRequest generates a "aws/request.Request" representing the // client's request for the GetResourceConfigHistory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2964,71 +3234,67 @@ func (c *ConfigService) GetResourceConfigHistoryPagesWithContext(ctx aws.Context return p.Err() } -const opListDiscoveredResources = "ListDiscoveredResources" +const opListAggregateDiscoveredResources = "ListAggregateDiscoveredResources" -// ListDiscoveredResourcesRequest generates a "aws/request.Request" representing the -// client's request for the ListDiscoveredResources operation. The "output" return +// ListAggregateDiscoveredResourcesRequest generates a "aws/request.Request" representing the +// client's request for the ListAggregateDiscoveredResources operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 ListDiscoveredResources for more information on using the ListDiscoveredResources +// See ListAggregateDiscoveredResources for more information on using the ListAggregateDiscoveredResources // 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 ListDiscoveredResourcesRequest method. -// req, resp := client.ListDiscoveredResourcesRequest(params) +// // Example sending a request using the ListAggregateDiscoveredResourcesRequest method. +// req, resp := client.ListAggregateDiscoveredResourcesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/ListDiscoveredResources -func (c *ConfigService) ListDiscoveredResourcesRequest(input *ListDiscoveredResourcesInput) (req *request.Request, output *ListDiscoveredResourcesOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/ListAggregateDiscoveredResources +func (c *ConfigService) ListAggregateDiscoveredResourcesRequest(input *ListAggregateDiscoveredResourcesInput) (req *request.Request, output *ListAggregateDiscoveredResourcesOutput) { op := &request.Operation{ - Name: opListDiscoveredResources, + Name: opListAggregateDiscoveredResources, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &ListDiscoveredResourcesInput{} + input = &ListAggregateDiscoveredResourcesInput{} } - output = &ListDiscoveredResourcesOutput{} + output = &ListAggregateDiscoveredResourcesOutput{} req = c.newRequest(op, input, output) return } -// ListDiscoveredResources API operation for AWS Config. -// -// Accepts a resource type and returns a list of resource identifiers for the -// resources of that type. A resource identifier includes the resource type, -// ID, and (if available) the custom resource name. The results consist of resources -// that AWS Config has discovered, including those that AWS Config is not currently -// recording. You can narrow the results to include only resources that have -// specific resource IDs or a resource name. +// ListAggregateDiscoveredResources API operation for AWS Config. // -// You can specify either resource IDs or a resource name, but not both, in -// the same request. +// Accepts a resource type and returns a list of resource identifiers that are +// aggregated for a specific resource type across accounts and regions. A resource +// identifier includes the resource type, ID, (if available) the custom resource +// name, source account, and source region. You can narrow the results to include +// only resources that have specific resource IDs, or a resource name, or source +// account ID, or source region. // -// The response is paginated. By default, AWS Config lists 100 resource identifiers -// on each page. You can customize this number with the limit parameter. The -// response includes a nextToken string. To get the next page of results, run -// the request again and specify the string for the nextToken parameter. +// For example, if the input consists of accountID 12345678910 and the region +// is us-east-1 for resource type AWS::EC2::Instance then the API returns all +// the EC2 instance identifiers of accountID 12345678910 and region us-east-1. // // 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 Config's -// API operation ListDiscoveredResources for usage and error information. +// API operation ListAggregateDiscoveredResources for usage and error information. // // Returned Error Codes: // * ErrCodeValidationException "ValidationException" @@ -3041,75 +3307,177 @@ func (c *ConfigService) ListDiscoveredResourcesRequest(input *ListDiscoveredReso // The specified next token is invalid. Specify the nextToken string that was // returned in the previous response to get the next page of results. // -// * ErrCodeNoAvailableConfigurationRecorderException "NoAvailableConfigurationRecorderException" -// There are no configuration recorders available to provide the role needed -// to describe your resources. Create a configuration recorder. +// * ErrCodeNoSuchConfigurationAggregatorException "NoSuchConfigurationAggregatorException" +// You have specified a configuration aggregator that does not exist. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/ListDiscoveredResources -func (c *ConfigService) ListDiscoveredResources(input *ListDiscoveredResourcesInput) (*ListDiscoveredResourcesOutput, error) { - req, out := c.ListDiscoveredResourcesRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/ListAggregateDiscoveredResources +func (c *ConfigService) ListAggregateDiscoveredResources(input *ListAggregateDiscoveredResourcesInput) (*ListAggregateDiscoveredResourcesOutput, error) { + req, out := c.ListAggregateDiscoveredResourcesRequest(input) return out, req.Send() } -// ListDiscoveredResourcesWithContext is the same as ListDiscoveredResources with the addition of +// ListAggregateDiscoveredResourcesWithContext is the same as ListAggregateDiscoveredResources with the addition of // the ability to pass a context and additional request options. // -// See ListDiscoveredResources for details on how to use this API operation. +// See ListAggregateDiscoveredResources 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 *ConfigService) ListDiscoveredResourcesWithContext(ctx aws.Context, input *ListDiscoveredResourcesInput, opts ...request.Option) (*ListDiscoveredResourcesOutput, error) { - req, out := c.ListDiscoveredResourcesRequest(input) +func (c *ConfigService) ListAggregateDiscoveredResourcesWithContext(ctx aws.Context, input *ListAggregateDiscoveredResourcesInput, opts ...request.Option) (*ListAggregateDiscoveredResourcesOutput, error) { + req, out := c.ListAggregateDiscoveredResourcesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opPutAggregationAuthorization = "PutAggregationAuthorization" +const opListDiscoveredResources = "ListDiscoveredResources" -// PutAggregationAuthorizationRequest generates a "aws/request.Request" representing the -// client's request for the PutAggregationAuthorization operation. The "output" return +// ListDiscoveredResourcesRequest generates a "aws/request.Request" representing the +// client's request for the ListDiscoveredResources operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 PutAggregationAuthorization for more information on using the PutAggregationAuthorization +// See ListDiscoveredResources for more information on using the ListDiscoveredResources // 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 PutAggregationAuthorizationRequest method. -// req, resp := client.PutAggregationAuthorizationRequest(params) +// // Example sending a request using the ListDiscoveredResourcesRequest method. +// req, resp := client.ListDiscoveredResourcesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutAggregationAuthorization -func (c *ConfigService) PutAggregationAuthorizationRequest(input *PutAggregationAuthorizationInput) (req *request.Request, output *PutAggregationAuthorizationOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/ListDiscoveredResources +func (c *ConfigService) ListDiscoveredResourcesRequest(input *ListDiscoveredResourcesInput) (req *request.Request, output *ListDiscoveredResourcesOutput) { op := &request.Operation{ - Name: opPutAggregationAuthorization, + Name: opListDiscoveredResources, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &PutAggregationAuthorizationInput{} + input = &ListDiscoveredResourcesInput{} } - output = &PutAggregationAuthorizationOutput{} + output = &ListDiscoveredResourcesOutput{} req = c.newRequest(op, input, output) return } -// PutAggregationAuthorization API operation for AWS Config. +// ListDiscoveredResources API operation for AWS Config. +// +// Accepts a resource type and returns a list of resource identifiers for the +// resources of that type. A resource identifier includes the resource type, +// ID, and (if available) the custom resource name. The results consist of resources +// that AWS Config has discovered, including those that AWS Config is not currently +// recording. You can narrow the results to include only resources that have +// specific resource IDs or a resource name. +// +// You can specify either resource IDs or a resource name, but not both, in +// the same request. +// +// The response is paginated. By default, AWS Config lists 100 resource identifiers +// on each page. You can customize this number with the limit parameter. The +// response includes a nextToken string. To get the next page of results, run +// the request again and specify the string for the nextToken parameter. +// +// 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 Config's +// API operation ListDiscoveredResources for usage and error information. +// +// Returned Error Codes: +// * ErrCodeValidationException "ValidationException" +// The requested action is not valid. +// +// * ErrCodeInvalidLimitException "InvalidLimitException" +// The specified limit is outside the allowable range. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The specified next token is invalid. Specify the nextToken string that was +// returned in the previous response to get the next page of results. +// +// * ErrCodeNoAvailableConfigurationRecorderException "NoAvailableConfigurationRecorderException" +// There are no configuration recorders available to provide the role needed +// to describe your resources. Create a configuration recorder. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/ListDiscoveredResources +func (c *ConfigService) ListDiscoveredResources(input *ListDiscoveredResourcesInput) (*ListDiscoveredResourcesOutput, error) { + req, out := c.ListDiscoveredResourcesRequest(input) + return out, req.Send() +} + +// ListDiscoveredResourcesWithContext is the same as ListDiscoveredResources with the addition of +// the ability to pass a context and additional request options. +// +// See ListDiscoveredResources 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 *ConfigService) ListDiscoveredResourcesWithContext(ctx aws.Context, input *ListDiscoveredResourcesInput, opts ...request.Option) (*ListDiscoveredResourcesOutput, error) { + req, out := c.ListDiscoveredResourcesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutAggregationAuthorization = "PutAggregationAuthorization" + +// PutAggregationAuthorizationRequest generates a "aws/request.Request" representing the +// client's request for the PutAggregationAuthorization 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 PutAggregationAuthorization for more information on using the PutAggregationAuthorization +// 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 PutAggregationAuthorizationRequest method. +// req, resp := client.PutAggregationAuthorizationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12/PutAggregationAuthorization +func (c *ConfigService) PutAggregationAuthorizationRequest(input *PutAggregationAuthorizationInput) (req *request.Request, output *PutAggregationAuthorizationOutput) { + op := &request.Operation{ + Name: opPutAggregationAuthorization, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutAggregationAuthorizationInput{} + } + + output = &PutAggregationAuthorizationOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutAggregationAuthorization API operation for AWS Config. // // Authorizes the aggregator account and region to collect data from the source // account and region. @@ -3153,7 +3521,7 @@ const opPutConfigRule = "PutConfigRule" // PutConfigRuleRequest generates a "aws/request.Request" representing the // client's request for the PutConfigRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3187,8 +3555,7 @@ func (c *ConfigService) PutConfigRuleRequest(input *PutConfigRuleInput) (req *re output = &PutConfigRuleOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3292,7 +3659,7 @@ const opPutConfigurationAggregator = "PutConfigurationAggregator" // PutConfigurationAggregatorRequest generates a "aws/request.Request" representing the // client's request for the PutConfigurationAggregator operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3402,7 +3769,7 @@ const opPutConfigurationRecorder = "PutConfigurationRecorder" // PutConfigurationRecorderRequest generates a "aws/request.Request" representing the // client's request for the PutConfigurationRecorder operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3436,8 +3803,7 @@ func (c *ConfigService) PutConfigurationRecorderRequest(input *PutConfigurationR output = &PutConfigurationRecorderOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3503,7 +3869,7 @@ const opPutDeliveryChannel = "PutDeliveryChannel" // PutDeliveryChannelRequest generates a "aws/request.Request" representing the // client's request for the PutDeliveryChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3537,8 +3903,7 @@ func (c *ConfigService) PutDeliveryChannelRequest(input *PutDeliveryChannelInput output = &PutDeliveryChannelOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3616,7 +3981,7 @@ const opPutEvaluations = "PutEvaluations" // PutEvaluationsRequest generates a "aws/request.Request" representing the // client's request for the PutEvaluations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3705,7 +4070,7 @@ const opPutRetentionConfiguration = "PutRetentionConfiguration" // PutRetentionConfigurationRequest generates a "aws/request.Request" representing the // client's request for the PutRetentionConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3796,7 +4161,7 @@ const opStartConfigRulesEvaluation = "StartConfigRulesEvaluation" // StartConfigRulesEvaluationRequest generates a "aws/request.Request" representing the // client's request for the StartConfigRulesEvaluation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3830,6 +4195,7 @@ func (c *ConfigService) StartConfigRulesEvaluationRequest(input *StartConfigRule output = &StartConfigRulesEvaluationOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3921,7 +4287,7 @@ const opStartConfigurationRecorder = "StartConfigurationRecorder" // StartConfigurationRecorderRequest generates a "aws/request.Request" representing the // client's request for the StartConfigurationRecorder operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3955,8 +4321,7 @@ func (c *ConfigService) StartConfigurationRecorderRequest(input *StartConfigurat output = &StartConfigurationRecorderOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4009,7 +4374,7 @@ const opStopConfigurationRecorder = "StopConfigurationRecorder" // StopConfigurationRecorderRequest generates a "aws/request.Request" representing the // client's request for the StopConfigurationRecorder operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4043,8 +4408,7 @@ func (c *ConfigService) StopConfigurationRecorderRequest(input *StopConfiguratio output = &StopConfigurationRecorderOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4324,6 +4688,104 @@ func (s *AggregateEvaluationResult) SetResultRecordedTime(v time.Time) *Aggregat return s } +// The details that identify a resource that is collected by AWS Config aggregator, +// including the resource type, ID, (if available) the custom resource name, +// the source account, and source region. +type AggregateResourceIdentifier struct { + _ struct{} `type:"structure"` + + // The ID of the AWS resource. + // + // ResourceId is a required field + ResourceId *string `min:"1" type:"string" required:"true"` + + // The name of the AWS resource. + ResourceName *string `type:"string"` + + // The type of the AWS resource. + // + // ResourceType is a required field + ResourceType *string `type:"string" required:"true" enum:"ResourceType"` + + // The 12-digit account ID of the source account. + // + // SourceAccountId is a required field + SourceAccountId *string `type:"string" required:"true"` + + // The source region where data is aggregated. + // + // SourceRegion is a required field + SourceRegion *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s AggregateResourceIdentifier) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AggregateResourceIdentifier) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AggregateResourceIdentifier) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AggregateResourceIdentifier"} + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } + if s.ResourceType == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceType")) + } + if s.SourceAccountId == nil { + invalidParams.Add(request.NewErrParamRequired("SourceAccountId")) + } + if s.SourceRegion == nil { + invalidParams.Add(request.NewErrParamRequired("SourceRegion")) + } + if s.SourceRegion != nil && len(*s.SourceRegion) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SourceRegion", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceId sets the ResourceId field's value. +func (s *AggregateResourceIdentifier) SetResourceId(v string) *AggregateResourceIdentifier { + s.ResourceId = &v + return s +} + +// SetResourceName sets the ResourceName field's value. +func (s *AggregateResourceIdentifier) SetResourceName(v string) *AggregateResourceIdentifier { + s.ResourceName = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *AggregateResourceIdentifier) SetResourceType(v string) *AggregateResourceIdentifier { + s.ResourceType = &v + return s +} + +// SetSourceAccountId sets the SourceAccountId field's value. +func (s *AggregateResourceIdentifier) SetSourceAccountId(v string) *AggregateResourceIdentifier { + s.SourceAccountId = &v + return s +} + +// SetSourceRegion sets the SourceRegion field's value. +func (s *AggregateResourceIdentifier) SetSourceRegion(v string) *AggregateResourceIdentifier { + s.SourceRegion = &v + return s +} + // The current sync status between the source and the aggregator account. type AggregatedSourceStatus struct { _ struct{} `type:"structure"` @@ -4466,7 +4928,7 @@ func (s *AggregationAuthorization) SetCreationTime(v time.Time) *AggregationAuth type BaseConfigurationItem struct { _ struct{} `type:"structure"` - // The 12 digit AWS account ID associated with the resource. + // The 12-digit AWS account ID associated with the resource. AccountId *string `locationName:"accountId" type:"string"` // The Amazon Resource Name (ARN) of the resource. @@ -4605,6 +5067,107 @@ func (s *BaseConfigurationItem) SetVersion(v string) *BaseConfigurationItem { return s } +type BatchGetAggregateResourceConfigInput struct { + _ struct{} `type:"structure"` + + // The name of the configuration aggregator. + // + // ConfigurationAggregatorName is a required field + ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` + + // A list of aggregate ResourceIdentifiers objects. + // + // ResourceIdentifiers is a required field + ResourceIdentifiers []*AggregateResourceIdentifier `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s BatchGetAggregateResourceConfigInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchGetAggregateResourceConfigInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchGetAggregateResourceConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchGetAggregateResourceConfigInput"} + if s.ConfigurationAggregatorName == nil { + invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) + } + if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) + } + if s.ResourceIdentifiers == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceIdentifiers")) + } + if s.ResourceIdentifiers != nil && len(s.ResourceIdentifiers) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceIdentifiers", 1)) + } + if s.ResourceIdentifiers != nil { + for i, v := range s.ResourceIdentifiers { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ResourceIdentifiers", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. +func (s *BatchGetAggregateResourceConfigInput) SetConfigurationAggregatorName(v string) *BatchGetAggregateResourceConfigInput { + s.ConfigurationAggregatorName = &v + return s +} + +// SetResourceIdentifiers sets the ResourceIdentifiers field's value. +func (s *BatchGetAggregateResourceConfigInput) SetResourceIdentifiers(v []*AggregateResourceIdentifier) *BatchGetAggregateResourceConfigInput { + s.ResourceIdentifiers = v + return s +} + +type BatchGetAggregateResourceConfigOutput struct { + _ struct{} `type:"structure"` + + // A list that contains the current configuration of one or more resources. + BaseConfigurationItems []*BaseConfigurationItem `type:"list"` + + // A list of resource identifiers that were not processed with current scope. + // The list is empty if all the resources are processed. + UnprocessedResourceIdentifiers []*AggregateResourceIdentifier `type:"list"` +} + +// String returns the string representation +func (s BatchGetAggregateResourceConfigOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchGetAggregateResourceConfigOutput) GoString() string { + return s.String() +} + +// SetBaseConfigurationItems sets the BaseConfigurationItems field's value. +func (s *BatchGetAggregateResourceConfigOutput) SetBaseConfigurationItems(v []*BaseConfigurationItem) *BatchGetAggregateResourceConfigOutput { + s.BaseConfigurationItems = v + return s +} + +// SetUnprocessedResourceIdentifiers sets the UnprocessedResourceIdentifiers field's value. +func (s *BatchGetAggregateResourceConfigOutput) SetUnprocessedResourceIdentifiers(v []*AggregateResourceIdentifier) *BatchGetAggregateResourceConfigOutput { + s.UnprocessedResourceIdentifiers = v + return s +} + type BatchGetResourceConfigInput struct { _ struct{} `type:"structure"` @@ -8252,22 +8815,245 @@ func (s *GetAggregateConfigRuleComplianceSummaryOutput) SetNextToken(v string) * return s } -type GetComplianceDetailsByConfigRuleInput struct { +type GetAggregateDiscoveredResourceCountsInput struct { _ struct{} `type:"structure"` - // Filters the results by compliance. + // The name of the configuration aggregator. // - // The allowed values are COMPLIANT, NON_COMPLIANT, and NOT_APPLICABLE. - ComplianceTypes []*string `type:"list"` + // ConfigurationAggregatorName is a required field + ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` - // The name of the AWS Config rule for which you want compliance information. - // - // ConfigRuleName is a required field - ConfigRuleName *string `min:"1" type:"string" required:"true"` + // Filters the results based on the ResourceCountFilters object. + Filters *ResourceCountFilters `type:"structure"` - // The maximum number of evaluation results returned on each page. The default - // is 10. You cannot specify a number greater than 100. If you specify 0, AWS - // Config uses the default. + // The key to group the resource counts. + GroupByKey *string `type:"string" enum:"ResourceCountGroupKey"` + + // The maximum number of GroupedResourceCount objects returned on each page. + // The default is 1000. You cannot specify a number greater than 1000. If you + // specify 0, AWS Config uses the default. + Limit *int64 `type:"integer"` + + // The nextToken string returned on a previous page that you use to get the + // next page of results in a paginated response. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s GetAggregateDiscoveredResourceCountsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAggregateDiscoveredResourceCountsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetAggregateDiscoveredResourceCountsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetAggregateDiscoveredResourceCountsInput"} + if s.ConfigurationAggregatorName == nil { + invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) + } + if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) + } + if s.Filters != nil { + if err := s.Filters.Validate(); err != nil { + invalidParams.AddNested("Filters", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. +func (s *GetAggregateDiscoveredResourceCountsInput) SetConfigurationAggregatorName(v string) *GetAggregateDiscoveredResourceCountsInput { + s.ConfigurationAggregatorName = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *GetAggregateDiscoveredResourceCountsInput) SetFilters(v *ResourceCountFilters) *GetAggregateDiscoveredResourceCountsInput { + s.Filters = v + return s +} + +// SetGroupByKey sets the GroupByKey field's value. +func (s *GetAggregateDiscoveredResourceCountsInput) SetGroupByKey(v string) *GetAggregateDiscoveredResourceCountsInput { + s.GroupByKey = &v + return s +} + +// SetLimit sets the Limit field's value. +func (s *GetAggregateDiscoveredResourceCountsInput) SetLimit(v int64) *GetAggregateDiscoveredResourceCountsInput { + s.Limit = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetAggregateDiscoveredResourceCountsInput) SetNextToken(v string) *GetAggregateDiscoveredResourceCountsInput { + s.NextToken = &v + return s +} + +type GetAggregateDiscoveredResourceCountsOutput struct { + _ struct{} `type:"structure"` + + // The key passed into the request object. If GroupByKey is not provided, the + // result will be empty. + GroupByKey *string `min:"1" type:"string"` + + // Returns a list of GroupedResourceCount objects. + GroupedResourceCounts []*GroupedResourceCount `type:"list"` + + // The nextToken string returned on a previous page that you use to get the + // next page of results in a paginated response. + NextToken *string `type:"string"` + + // The total number of resources that are present in an aggregator with the + // filters that you provide. + // + // TotalDiscoveredResources is a required field + TotalDiscoveredResources *int64 `type:"long" required:"true"` +} + +// String returns the string representation +func (s GetAggregateDiscoveredResourceCountsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAggregateDiscoveredResourceCountsOutput) GoString() string { + return s.String() +} + +// SetGroupByKey sets the GroupByKey field's value. +func (s *GetAggregateDiscoveredResourceCountsOutput) SetGroupByKey(v string) *GetAggregateDiscoveredResourceCountsOutput { + s.GroupByKey = &v + return s +} + +// SetGroupedResourceCounts sets the GroupedResourceCounts field's value. +func (s *GetAggregateDiscoveredResourceCountsOutput) SetGroupedResourceCounts(v []*GroupedResourceCount) *GetAggregateDiscoveredResourceCountsOutput { + s.GroupedResourceCounts = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *GetAggregateDiscoveredResourceCountsOutput) SetNextToken(v string) *GetAggregateDiscoveredResourceCountsOutput { + s.NextToken = &v + return s +} + +// SetTotalDiscoveredResources sets the TotalDiscoveredResources field's value. +func (s *GetAggregateDiscoveredResourceCountsOutput) SetTotalDiscoveredResources(v int64) *GetAggregateDiscoveredResourceCountsOutput { + s.TotalDiscoveredResources = &v + return s +} + +type GetAggregateResourceConfigInput struct { + _ struct{} `type:"structure"` + + // The name of the configuration aggregator. + // + // ConfigurationAggregatorName is a required field + ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` + + // An object that identifies aggregate resource. + // + // ResourceIdentifier is a required field + ResourceIdentifier *AggregateResourceIdentifier `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetAggregateResourceConfigInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAggregateResourceConfigInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetAggregateResourceConfigInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetAggregateResourceConfigInput"} + if s.ConfigurationAggregatorName == nil { + invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) + } + if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) + } + if s.ResourceIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceIdentifier")) + } + if s.ResourceIdentifier != nil { + if err := s.ResourceIdentifier.Validate(); err != nil { + invalidParams.AddNested("ResourceIdentifier", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. +func (s *GetAggregateResourceConfigInput) SetConfigurationAggregatorName(v string) *GetAggregateResourceConfigInput { + s.ConfigurationAggregatorName = &v + return s +} + +// SetResourceIdentifier sets the ResourceIdentifier field's value. +func (s *GetAggregateResourceConfigInput) SetResourceIdentifier(v *AggregateResourceIdentifier) *GetAggregateResourceConfigInput { + s.ResourceIdentifier = v + return s +} + +type GetAggregateResourceConfigOutput struct { + _ struct{} `type:"structure"` + + // Returns a ConfigurationItem object. + ConfigurationItem *ConfigurationItem `type:"structure"` +} + +// String returns the string representation +func (s GetAggregateResourceConfigOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAggregateResourceConfigOutput) GoString() string { + return s.String() +} + +// SetConfigurationItem sets the ConfigurationItem field's value. +func (s *GetAggregateResourceConfigOutput) SetConfigurationItem(v *ConfigurationItem) *GetAggregateResourceConfigOutput { + s.ConfigurationItem = v + return s +} + +type GetComplianceDetailsByConfigRuleInput struct { + _ struct{} `type:"structure"` + + // Filters the results by compliance. + // + // The allowed values are COMPLIANT, NON_COMPLIANT, and NOT_APPLICABLE. + ComplianceTypes []*string `type:"list"` + + // The name of the AWS Config rule for which you want compliance information. + // + // ConfigRuleName is a required field + ConfigRuleName *string `min:"1" type:"string" required:"true"` + + // The maximum number of evaluation results returned on each page. The default + // is 10. You cannot specify a number greater than 100. If you specify 0, AWS + // Config uses the default. Limit *int64 `type:"integer"` // The nextToken string returned on a previous page that you use to get the @@ -8812,6 +9598,167 @@ func (s *GetResourceConfigHistoryOutput) SetNextToken(v string) *GetResourceConf return s } +// The count of resources that are grouped by the group name. +type GroupedResourceCount struct { + _ struct{} `type:"structure"` + + // The name of the group that can be region, account ID, or resource type. For + // example, region1, region2 if the region was chosen as GroupByKey. + // + // GroupName is a required field + GroupName *string `min:"1" type:"string" required:"true"` + + // The number of resources in the group. + // + // ResourceCount is a required field + ResourceCount *int64 `type:"long" required:"true"` +} + +// String returns the string representation +func (s GroupedResourceCount) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GroupedResourceCount) GoString() string { + return s.String() +} + +// SetGroupName sets the GroupName field's value. +func (s *GroupedResourceCount) SetGroupName(v string) *GroupedResourceCount { + s.GroupName = &v + return s +} + +// SetResourceCount sets the ResourceCount field's value. +func (s *GroupedResourceCount) SetResourceCount(v int64) *GroupedResourceCount { + s.ResourceCount = &v + return s +} + +type ListAggregateDiscoveredResourcesInput struct { + _ struct{} `type:"structure"` + + // The name of the configuration aggregator. + // + // ConfigurationAggregatorName is a required field + ConfigurationAggregatorName *string `min:"1" type:"string" required:"true"` + + // Filters the results based on the ResourceFilters object. + Filters *ResourceFilters `type:"structure"` + + // The maximum number of resource identifiers returned on each page. The default + // is 100. You cannot specify a number greater than 100. If you specify 0, AWS + // Config uses the default. + Limit *int64 `type:"integer"` + + // The nextToken string returned on a previous page that you use to get the + // next page of results in a paginated response. + NextToken *string `type:"string"` + + // The type of resources that you want AWS Config to list in the response. + // + // ResourceType is a required field + ResourceType *string `type:"string" required:"true" enum:"ResourceType"` +} + +// String returns the string representation +func (s ListAggregateDiscoveredResourcesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListAggregateDiscoveredResourcesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListAggregateDiscoveredResourcesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListAggregateDiscoveredResourcesInput"} + if s.ConfigurationAggregatorName == nil { + invalidParams.Add(request.NewErrParamRequired("ConfigurationAggregatorName")) + } + if s.ConfigurationAggregatorName != nil && len(*s.ConfigurationAggregatorName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConfigurationAggregatorName", 1)) + } + if s.ResourceType == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceType")) + } + if s.Filters != nil { + if err := s.Filters.Validate(); err != nil { + invalidParams.AddNested("Filters", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConfigurationAggregatorName sets the ConfigurationAggregatorName field's value. +func (s *ListAggregateDiscoveredResourcesInput) SetConfigurationAggregatorName(v string) *ListAggregateDiscoveredResourcesInput { + s.ConfigurationAggregatorName = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *ListAggregateDiscoveredResourcesInput) SetFilters(v *ResourceFilters) *ListAggregateDiscoveredResourcesInput { + s.Filters = v + return s +} + +// SetLimit sets the Limit field's value. +func (s *ListAggregateDiscoveredResourcesInput) SetLimit(v int64) *ListAggregateDiscoveredResourcesInput { + s.Limit = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListAggregateDiscoveredResourcesInput) SetNextToken(v string) *ListAggregateDiscoveredResourcesInput { + s.NextToken = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *ListAggregateDiscoveredResourcesInput) SetResourceType(v string) *ListAggregateDiscoveredResourcesInput { + s.ResourceType = &v + return s +} + +type ListAggregateDiscoveredResourcesOutput struct { + _ struct{} `type:"structure"` + + // The nextToken string returned on a previous page that you use to get the + // next page of results in a paginated response. + NextToken *string `type:"string"` + + // Returns a list of ResourceIdentifiers objects. + ResourceIdentifiers []*AggregateResourceIdentifier `type:"list"` +} + +// String returns the string representation +func (s ListAggregateDiscoveredResourcesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListAggregateDiscoveredResourcesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListAggregateDiscoveredResourcesOutput) SetNextToken(v string) *ListAggregateDiscoveredResourcesOutput { + s.NextToken = &v + return s +} + +// SetResourceIdentifiers sets the ResourceIdentifiers field's value. +func (s *ListAggregateDiscoveredResourcesOutput) SetResourceIdentifiers(v []*AggregateResourceIdentifier) *ListAggregateDiscoveredResourcesOutput { + s.ResourceIdentifiers = v + return s +} + type ListDiscoveredResourcesInput struct { _ struct{} `type:"structure"` @@ -9731,6 +10678,129 @@ func (s *ResourceCount) SetResourceType(v string) *ResourceCount { return s } +// Filters the resource count based on account ID, region, and resource type. +type ResourceCountFilters struct { + _ struct{} `type:"structure"` + + // The 12-digit ID of the account. + AccountId *string `type:"string"` + + // The region where the account is located. + Region *string `min:"1" type:"string"` + + // The type of the AWS resource. + ResourceType *string `type:"string" enum:"ResourceType"` +} + +// String returns the string representation +func (s ResourceCountFilters) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceCountFilters) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResourceCountFilters) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResourceCountFilters"} + if s.Region != nil && len(*s.Region) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Region", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccountId sets the AccountId field's value. +func (s *ResourceCountFilters) SetAccountId(v string) *ResourceCountFilters { + s.AccountId = &v + return s +} + +// SetRegion sets the Region field's value. +func (s *ResourceCountFilters) SetRegion(v string) *ResourceCountFilters { + s.Region = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *ResourceCountFilters) SetResourceType(v string) *ResourceCountFilters { + s.ResourceType = &v + return s +} + +// Filters the results by resource account ID, region, resource ID, and resource +// name. +type ResourceFilters struct { + _ struct{} `type:"structure"` + + // The 12-digit source account ID. + AccountId *string `type:"string"` + + // The source region. + Region *string `min:"1" type:"string"` + + // The ID of the resource. + ResourceId *string `min:"1" type:"string"` + + // The name of the resource. + ResourceName *string `type:"string"` +} + +// String returns the string representation +func (s ResourceFilters) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceFilters) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResourceFilters) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResourceFilters"} + if s.Region != nil && len(*s.Region) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Region", 1)) + } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccountId sets the AccountId field's value. +func (s *ResourceFilters) SetAccountId(v string) *ResourceFilters { + s.AccountId = &v + return s +} + +// SetRegion sets the Region field's value. +func (s *ResourceFilters) SetRegion(v string) *ResourceFilters { + s.Region = &v + return s +} + +// SetResourceId sets the ResourceId field's value. +func (s *ResourceFilters) SetResourceId(v string) *ResourceFilters { + s.ResourceId = &v + return s +} + +// SetResourceName sets the ResourceName field's value. +func (s *ResourceFilters) SetResourceName(v string) *ResourceFilters { + s.ResourceName = &v + return s +} + // The details that identify a resource that is discovered by AWS Config, including // the resource type, ID, and (if available) the custom resource name. type ResourceIdentifier struct { @@ -10423,6 +11493,17 @@ const ( RecorderStatusFailure = "Failure" ) +const ( + // ResourceCountGroupKeyResourceType is a ResourceCountGroupKey enum value + ResourceCountGroupKeyResourceType = "RESOURCE_TYPE" + + // ResourceCountGroupKeyAccountId is a ResourceCountGroupKey enum value + ResourceCountGroupKeyAccountId = "ACCOUNT_ID" + + // ResourceCountGroupKeyAwsRegion is a ResourceCountGroupKey enum value + ResourceCountGroupKeyAwsRegion = "AWS_REGION" +) + const ( // ResourceTypeAwsEc2CustomerGateway is a ResourceType enum value ResourceTypeAwsEc2CustomerGateway = "AWS::EC2::CustomerGateway" @@ -10597,4 +11678,22 @@ const ( // ResourceTypeAwsXrayEncryptionConfig is a ResourceType enum value ResourceTypeAwsXrayEncryptionConfig = "AWS::XRay::EncryptionConfig" + + // ResourceTypeAwsSsmAssociationCompliance is a ResourceType enum value + ResourceTypeAwsSsmAssociationCompliance = "AWS::SSM::AssociationCompliance" + + // ResourceTypeAwsSsmPatchCompliance is a ResourceType enum value + ResourceTypeAwsSsmPatchCompliance = "AWS::SSM::PatchCompliance" + + // ResourceTypeAwsShieldProtection is a ResourceType enum value + ResourceTypeAwsShieldProtection = "AWS::Shield::Protection" + + // ResourceTypeAwsShieldRegionalProtection is a ResourceType enum value + ResourceTypeAwsShieldRegionalProtection = "AWS::ShieldRegional::Protection" + + // ResourceTypeAwsConfigResourceCompliance is a ResourceType enum value + ResourceTypeAwsConfigResourceCompliance = "AWS::Config::ResourceCompliance" + + // ResourceTypeAwsCodePipelinePipeline is a ResourceType enum value + ResourceTypeAwsCodePipelinePipeline = "AWS::CodePipeline::Pipeline" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/configservice/errors.go b/vendor/github.com/aws/aws-sdk-go/service/configservice/errors.go index 02ce16d3a4..4ffa6dbdc2 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/configservice/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/configservice/errors.go @@ -212,6 +212,12 @@ const ( // not have all features enabled. ErrCodeOrganizationAllFeaturesNotEnabledException = "OrganizationAllFeaturesNotEnabledException" + // ErrCodeOversizedConfigurationItemException for service response error code + // "OversizedConfigurationItemException". + // + // The configuration item size is outside the allowable range. + ErrCodeOversizedConfigurationItemException = "OversizedConfigurationItemException" + // ErrCodeResourceInUseException for service response error code // "ResourceInUseException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go index 6020100f99..831d8d4bd2 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/api.go @@ -9,6 +9,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) const opAddTagsToResource = "AddTagsToResource" @@ -16,7 +18,7 @@ const opAddTagsToResource = "AddTagsToResource" // AddTagsToResourceRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -50,6 +52,7 @@ func (c *DatabaseMigrationService) AddTagsToResourceRequest(input *AddTagsToReso output = &AddTagsToResourceOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -98,7 +101,7 @@ const opCreateEndpoint = "CreateEndpoint" // CreateEndpointRequest generates a "aws/request.Request" representing the // client's request for the CreateEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -193,7 +196,7 @@ const opCreateEventSubscription = "CreateEventSubscription" // CreateEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the CreateEventSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -246,9 +249,9 @@ func (c *DatabaseMigrationService) CreateEventSubscriptionRequest(input *CreateE // will be notified of events generated from all AWS DMS sources belonging to // your customer account. // -// For more information about AWS DMS events, see Working with Events and Notifications -// (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Events.html) in the -// AWS Database MIgration Service User Guide. +// For more information about AWS DMS events, see Working with Events and Notifications +// (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Events.html) in the +// AWS Database Migration Service 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 @@ -300,7 +303,7 @@ const opCreateReplicationInstance = "CreateReplicationInstance" // CreateReplicationInstanceRequest generates a "aws/request.Request" representing the // client's request for the CreateReplicationInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -408,7 +411,7 @@ const opCreateReplicationSubnetGroup = "CreateReplicationSubnetGroup" // CreateReplicationSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateReplicationSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -503,7 +506,7 @@ const opCreateReplicationTask = "CreateReplicationTask" // CreateReplicationTaskRequest generates a "aws/request.Request" representing the // client's request for the CreateReplicationTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -598,7 +601,7 @@ const opDeleteCertificate = "DeleteCertificate" // DeleteCertificateRequest generates a "aws/request.Request" representing the // client's request for the DeleteCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -681,7 +684,7 @@ const opDeleteEndpoint = "DeleteEndpoint" // DeleteEndpointRequest generates a "aws/request.Request" representing the // client's request for the DeleteEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -767,7 +770,7 @@ const opDeleteEventSubscription = "DeleteEventSubscription" // DeleteEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the DeleteEventSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -850,7 +853,7 @@ const opDeleteReplicationInstance = "DeleteReplicationInstance" // DeleteReplicationInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeleteReplicationInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -936,7 +939,7 @@ const opDeleteReplicationSubnetGroup = "DeleteReplicationSubnetGroup" // DeleteReplicationSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteReplicationSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -970,6 +973,7 @@ func (c *DatabaseMigrationService) DeleteReplicationSubnetGroupRequest(input *De output = &DeleteReplicationSubnetGroupOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1019,7 +1023,7 @@ const opDeleteReplicationTask = "DeleteReplicationTask" // DeleteReplicationTaskRequest generates a "aws/request.Request" representing the // client's request for the DeleteReplicationTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1102,7 +1106,7 @@ const opDescribeAccountAttributes = "DescribeAccountAttributes" // DescribeAccountAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAccountAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1181,7 +1185,7 @@ const opDescribeCertificates = "DescribeCertificates" // DescribeCertificatesRequest generates a "aws/request.Request" representing the // client's request for the DescribeCertificates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1316,7 +1320,7 @@ const opDescribeConnections = "DescribeConnections" // DescribeConnectionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeConnections operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1452,7 +1456,7 @@ const opDescribeEndpointTypes = "DescribeEndpointTypes" // DescribeEndpointTypesRequest generates a "aws/request.Request" representing the // client's request for the DescribeEndpointTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1582,7 +1586,7 @@ const opDescribeEndpoints = "DescribeEndpoints" // DescribeEndpointsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEndpoints operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1717,7 +1721,7 @@ const opDescribeEventCategories = "DescribeEventCategories" // DescribeEventCategoriesRequest generates a "aws/request.Request" representing the // client's request for the DescribeEventCategories operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1758,7 +1762,7 @@ func (c *DatabaseMigrationService) DescribeEventCategoriesRequest(input *Describ // // Lists categories for all event source types, or, if specified, for a specified // source type. You can see a list of the event categories and source types -// in Working with Events and Notifications (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Events.html) +// in Working with Events and Notifications (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Events.html) // in the AWS Database Migration Service User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -1794,7 +1798,7 @@ const opDescribeEventSubscriptions = "DescribeEventSubscriptions" // DescribeEventSubscriptionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEventSubscriptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1934,7 +1938,7 @@ const opDescribeEvents = "DescribeEvents" // DescribeEventsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1981,7 +1985,8 @@ func (c *DatabaseMigrationService) DescribeEventsRequest(input *DescribeEventsIn // // Lists events for a given source identifier and source type. You can also // specify a start and end time. For more information on AWS DMS events, see -// Working with Events and Notifications (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Events.html). +// Working with Events and Notifications (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Events.html) +// in the AWS Database Migration 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 @@ -2066,7 +2071,7 @@ const opDescribeOrderableReplicationInstances = "DescribeOrderableReplicationIns // DescribeOrderableReplicationInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeOrderableReplicationInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2197,7 +2202,7 @@ const opDescribeRefreshSchemasStatus = "DescribeRefreshSchemasStatus" // DescribeRefreshSchemasStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeRefreshSchemasStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2280,7 +2285,7 @@ const opDescribeReplicationInstanceTaskLogs = "DescribeReplicationInstanceTaskLo // DescribeReplicationInstanceTaskLogsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReplicationInstanceTaskLogs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2419,7 +2424,7 @@ const opDescribeReplicationInstances = "DescribeReplicationInstances" // DescribeReplicationInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeReplicationInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2555,7 +2560,7 @@ const opDescribeReplicationSubnetGroups = "DescribeReplicationSubnetGroups" // DescribeReplicationSubnetGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReplicationSubnetGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2690,7 +2695,7 @@ const opDescribeReplicationTaskAssessmentResults = "DescribeReplicationTaskAsses // DescribeReplicationTaskAssessmentResultsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReplicationTaskAssessmentResults operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2826,7 +2831,7 @@ const opDescribeReplicationTasks = "DescribeReplicationTasks" // DescribeReplicationTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeReplicationTasks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2962,7 +2967,7 @@ const opDescribeSchemas = "DescribeSchemas" // DescribeSchemasRequest generates a "aws/request.Request" representing the // client's request for the DescribeSchemas operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3101,7 +3106,7 @@ const opDescribeTableStatistics = "DescribeTableStatistics" // DescribeTableStatisticsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTableStatistics operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3245,7 +3250,7 @@ const opImportCertificate = "ImportCertificate" // ImportCertificateRequest generates a "aws/request.Request" representing the // client's request for the ImportCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3330,7 +3335,7 @@ const opListTagsForResource = "ListTagsForResource" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3409,7 +3414,7 @@ const opModifyEndpoint = "ModifyEndpoint" // ModifyEndpointRequest generates a "aws/request.Request" representing the // client's request for the ModifyEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3501,7 +3506,7 @@ const opModifyEventSubscription = "ModifyEventSubscription" // ModifyEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the ModifyEventSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3589,7 +3594,7 @@ const opModifyReplicationInstance = "ModifyReplicationInstance" // ModifyReplicationInstanceRequest generates a "aws/request.Request" representing the // client's request for the ModifyReplicationInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3688,7 +3693,7 @@ const opModifyReplicationSubnetGroup = "ModifyReplicationSubnetGroup" // ModifyReplicationSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyReplicationSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3783,7 +3788,7 @@ const opModifyReplicationTask = "ModifyReplicationTask" // ModifyReplicationTaskRequest generates a "aws/request.Request" representing the // client's request for the ModifyReplicationTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3827,8 +3832,9 @@ func (c *DatabaseMigrationService) ModifyReplicationTaskRequest(input *ModifyRep // You can't modify the task endpoints. The task must be stopped before you // can modify it. // -// For more information about AWS DMS tasks, see the AWS DMS user guide at -// Working with Migration Tasks (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.html) +// For more information about AWS DMS tasks, see Working with Migration Tasks +// (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.html) in the +// AWS Database Migration Service 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 @@ -3878,7 +3884,7 @@ const opRebootReplicationInstance = "RebootReplicationInstance" // RebootReplicationInstanceRequest generates a "aws/request.Request" representing the // client's request for the RebootReplicationInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3962,7 +3968,7 @@ const opRefreshSchemas = "RefreshSchemas" // RefreshSchemasRequest generates a "aws/request.Request" representing the // client's request for the RefreshSchemas operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4053,7 +4059,7 @@ const opReloadTables = "ReloadTables" // ReloadTablesRequest generates a "aws/request.Request" representing the // client's request for the ReloadTables operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4136,7 +4142,7 @@ const opRemoveTagsFromResource = "RemoveTagsFromResource" // RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4170,6 +4176,7 @@ func (c *DatabaseMigrationService) RemoveTagsFromResourceRequest(input *RemoveTa output = &RemoveTagsFromResourceOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4215,7 +4222,7 @@ const opStartReplicationTask = "StartReplicationTask" // StartReplicationTaskRequest generates a "aws/request.Request" representing the // client's request for the StartReplicationTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4256,8 +4263,9 @@ func (c *DatabaseMigrationService) StartReplicationTaskRequest(input *StartRepli // // Starts the replication task. // -// For more information about AWS DMS tasks, see the AWS DMS user guide at -// Working with Migration Tasks (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.html) +// For more information about AWS DMS tasks, see Working with Migration Tasks +// (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.html) in the +// AWS Database Migration Service 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 @@ -4304,7 +4312,7 @@ const opStartReplicationTaskAssessment = "StartReplicationTaskAssessment" // StartReplicationTaskAssessmentRequest generates a "aws/request.Request" representing the // client's request for the StartReplicationTaskAssessment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4388,7 +4396,7 @@ const opStopReplicationTask = "StopReplicationTask" // StopReplicationTaskRequest generates a "aws/request.Request" representing the // client's request for the StopReplicationTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4471,7 +4479,7 @@ const opTestConnection = "TestConnection" // TestConnectionRequest generates a "aws/request.Request" representing the // client's request for the TestConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4878,9 +4886,9 @@ type CreateEndpointInput struct { // The name of the endpoint database. DatabaseName *string `type:"string"` - // The settings in JSON format for the DMS Transfer type source endpoint. + // The settings in JSON format for the DMS transfer type of source endpoint. // - // Attributes include: + // Possible attributes include the following: // // * serviceAccessRoleArn - The IAM role that has permission to access the // Amazon S3 bucket. @@ -4888,23 +4896,27 @@ type CreateEndpointInput struct { // * bucketName - The name of the S3 bucket to use. // // * compressionType - An optional parameter to use GZIP to compress the - // target files. Set to NONE (the default) or do not use to leave the files - // uncompressed. + // target files. To use GZIP, set this value to NONE (the default). To keep + // the files uncompressed, don't use this value. // - // Shorthand syntax: ServiceAccessRoleArn=string ,BucketName=string,CompressionType=string - // - // JSON syntax: + // Shorthand syntax for these attributes is as follows: ServiceAccessRoleArn=string,BucketName=string,CompressionType=string // - // { "ServiceAccessRoleArn": "string", "BucketName": "string", "CompressionType": - // "none"|"gzip" } + // JSON syntax for these attributes is as follows: { "ServiceAccessRoleArn": + // "string", "BucketName": "string", "CompressionType": "none"|"gzip" } DmsTransferSettings *DmsTransferSettings `type:"structure"` // Settings in JSON format for the target Amazon DynamoDB endpoint. For more - // information about the available settings, see the Using Object Mapping to - // Migrate Data to DynamoDB section at Using an Amazon DynamoDB Database as - // a Target for AWS Database Migration Service (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.DynamoDB.html). + // information about the available settings, see Using Object Mapping to Migrate + // Data to DynamoDB (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.DynamoDB.html) + // in the AWS Database Migration Service User Guide. DynamoDbSettings *DynamoDbSettings `type:"structure"` + // Settings in JSON format for the target Elasticsearch endpoint. For more information + // about the available settings, see Extra Connection Attributes When Using + // Elasticsearch as a Target for AWS DMS (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Elasticsearch.html#CHAP_Target.Elasticsearch.Configuration) + // in the AWS Database Migration User Guide. + ElasticsearchSettings *ElasticsearchSettings `type:"structure"` + // The database endpoint identifier. Identifiers must begin with a letter; must // contain only ASCII letters, digits, and hyphens; and must not end with a // hyphen or contain two consecutive hyphens. @@ -4917,9 +4929,9 @@ type CreateEndpointInput struct { // EndpointType is a required field EndpointType *string `type:"string" required:"true" enum:"ReplicationEndpointTypeValue"` - // The type of engine for the endpoint. Valid values, depending on the EndPointType, - // include mysql, oracle, postgres, mariadb, aurora, aurora-postgresql, redshift, - // s3, db2, azuredb, sybase, dynamodb, mongodb, and sqlserver. + // The type of engine for the endpoint. Valid values, depending on the EndPointType + // value, include mysql, oracle, postgres, mariadb, aurora, aurora-postgresql, + // redshift, s3, db2, azuredb, sybase, dynamodb, mongodb, and sqlserver. // // EngineName is a required field EngineName *string `type:"string" required:"true"` @@ -4930,48 +4942,53 @@ type CreateEndpointInput struct { // Additional attributes associated with the connection. ExtraConnectionAttributes *string `type:"string"` - // The KMS key identifier that will be used to encrypt the connection parameters. - // If you do not specify a value for the KmsKeyId parameter, then AWS DMS will - // use your default encryption key. AWS KMS creates the default encryption key - // for your AWS account. Your AWS account has a different default encryption - // key for each AWS region. + // Settings in JSON format for the target Amazon Kinesis Data Streams endpoint. + // For more information about the available settings, see Using Object Mapping + // to Migrate Data to a Kinesis Data Stream (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Kinesis.html#CHAP_Target.Kinesis.ObjectMapping + // ) in the AWS Database Migration User Guide. + KinesisSettings *KinesisSettings `type:"structure"` + + // The AWS KMS key identifier to use to encrypt the connection parameters. If + // you don't specify a value for the KmsKeyId parameter, then AWS DMS uses your + // default encryption key. AWS KMS creates the default encryption key for your + // AWS account. Your AWS account has a different default encryption key for + // each AWS Region. KmsKeyId *string `type:"string"` // Settings in JSON format for the source MongoDB endpoint. For more information - // about the available settings, see the Configuration Properties When Using - // MongoDB as a Source for AWS Database Migration Service section at Using - // MongoDB as a Target for AWS Database Migration Service (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MongoDB.html). + // about the available settings, see the configuration properties section in + // Using MongoDB as a Target for AWS Database Migration Service (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MongoDB.html) + // in the AWS Database Migration Service User Guide. MongoDbSettings *MongoDbSettings `type:"structure"` - // The password to be used to login to the endpoint database. - Password *string `type:"string"` + // The password to be used to log in to the endpoint database. + Password *string `type:"string" sensitive:"true"` // The port used by the endpoint database. Port *int64 `type:"integer"` // Settings in JSON format for the target Amazon S3 endpoint. For more information - // about the available settings, see the Extra Connection Attributes section - // at Using Amazon S3 as a Target for AWS Database Migration Service (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.S3.html). + // about the available settings, see Extra Connection Attributes When Using + // Amazon S3 as a Target for AWS DMS (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.S3.html#CHAP_Target.S3.Configuring) + // in the AWS Database Migration Service User Guide. S3Settings *S3Settings `type:"structure"` // The name of the server where the endpoint database resides. ServerName *string `type:"string"` - // The Amazon Resource Name (ARN) for the service access role you want to use - // to create the endpoint. + // The Amazon Resource Name (ARN) for the service access role that you want + // to use to create the endpoint. ServiceAccessRoleArn *string `type:"string"` - // The SSL mode to use for the SSL connection. - // - // SSL mode can be one of four values: none, require, verify-ca, verify-full. - // - // The default value is none. + // The Secure Sockets Layer (SSL) mode to use for the SSL connection. The SSL + // mode can be one of four values: none, require, verify-ca, verify-full. The + // default value is none. SslMode *string `type:"string" enum:"DmsSslModeValue"` // Tags to be added to the endpoint. Tags []*Tag `type:"list"` - // The user name to be used to login to the endpoint database. + // The user name to be used to log in to the endpoint database. Username *string `type:"string"` } @@ -5002,6 +5019,11 @@ func (s *CreateEndpointInput) Validate() error { invalidParams.AddNested("DynamoDbSettings", err.(request.ErrInvalidParams)) } } + if s.ElasticsearchSettings != nil { + if err := s.ElasticsearchSettings.Validate(); err != nil { + invalidParams.AddNested("ElasticsearchSettings", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -5033,6 +5055,12 @@ func (s *CreateEndpointInput) SetDynamoDbSettings(v *DynamoDbSettings) *CreateEn return s } +// SetElasticsearchSettings sets the ElasticsearchSettings field's value. +func (s *CreateEndpointInput) SetElasticsearchSettings(v *ElasticsearchSettings) *CreateEndpointInput { + s.ElasticsearchSettings = v + return s +} + // SetEndpointIdentifier sets the EndpointIdentifier field's value. func (s *CreateEndpointInput) SetEndpointIdentifier(v string) *CreateEndpointInput { s.EndpointIdentifier = &v @@ -5063,6 +5091,12 @@ func (s *CreateEndpointInput) SetExtraConnectionAttributes(v string) *CreateEndp return s } +// SetKinesisSettings sets the KinesisSettings field's value. +func (s *CreateEndpointInput) SetKinesisSettings(v *KinesisSettings) *CreateEndpointInput { + s.KinesisSettings = v + return s +} + // SetKmsKeyId sets the KmsKeyId field's value. func (s *CreateEndpointInput) SetKmsKeyId(v string) *CreateEndpointInput { s.KmsKeyId = &v @@ -5155,7 +5189,7 @@ type CreateEventSubscriptionInput struct { // A list of event categories for a source type that you want to subscribe to. // You can see a list of the categories for a given source type by calling the - // DescribeEventCategories action or in the topic Working with Events and Notifications + // DescribeEventCategories action or in the topic Working with Events and Notifications // (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Events.html) in the // AWS Database Migration Service User Guide. EventCategories []*string `type:"list"` @@ -5303,14 +5337,17 @@ type CreateReplicationInstanceInput struct { // Example: us-east-1d AvailabilityZone *string `type:"string"` + // A list of DNS name servers supported for the replication instance. + DnsNameServers *string `type:"string"` + // The engine version number of the replication instance. EngineVersion *string `type:"string"` - // The KMS key identifier that will be used to encrypt the content on the replication - // instance. If you do not specify a value for the KmsKeyId parameter, then - // AWS DMS will use your default encryption key. AWS KMS creates the default - // encryption key for your AWS account. Your AWS account has a different default - // encryption key for each AWS region. + // The AWS KMS key identifier that is used to encrypt the content on the replication + // instance. If you don't specify a value for the KmsKeyId parameter, then AWS + // DMS uses your default encryption key. AWS KMS creates the default encryption + // key for your AWS account. Your AWS account has a different default encryption + // key for each AWS Region. KmsKeyId *string `type:"string"` // Specifies if the replication instance is a Multi-AZ deployment. You cannot @@ -5416,6 +5453,12 @@ func (s *CreateReplicationInstanceInput) SetAvailabilityZone(v string) *CreateRe return s } +// SetDnsNameServers sets the DnsNameServers field's value. +func (s *CreateReplicationInstanceInput) SetDnsNameServers(v string) *CreateReplicationInstanceInput { + s.DnsNameServers = &v + return s +} + // SetEngineVersion sets the EngineVersion field's value. func (s *CreateReplicationInstanceInput) SetEngineVersion(v string) *CreateReplicationInstanceInput { s.EngineVersion = &v @@ -5660,7 +5703,8 @@ type CreateReplicationTaskInput struct { // Settings for the task, such as target metadata settings. For a complete list // of task settings, see Task Settings for AWS Database Migration Service Tasks - // (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TaskSettings.html). + // (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TaskSettings.html) + // in the AWS Database Migration User Guide. ReplicationTaskSettings *string `type:"string"` // The Amazon Resource Name (ARN) string that uniquely identifies the endpoint. @@ -7924,6 +7968,78 @@ func (s *DynamoDbSettings) SetServiceAccessRoleArn(v string) *DynamoDbSettings { return s } +type ElasticsearchSettings struct { + _ struct{} `type:"structure"` + + // The endpoint for the ElasticSearch cluster. + // + // EndpointUri is a required field + EndpointUri *string `type:"string" required:"true"` + + // The maximum number of seconds that DMS retries failed API requests to the + // Elasticsearch cluster. + ErrorRetryDuration *int64 `type:"integer"` + + // The maximum percentage of records that can fail to be written before a full + // load operation stops. + FullLoadErrorPercentage *int64 `type:"integer"` + + // The Amazon Resource Name (ARN) used by service to access the IAM role. + // + // ServiceAccessRoleArn is a required field + ServiceAccessRoleArn *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ElasticsearchSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ElasticsearchSettings) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ElasticsearchSettings) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ElasticsearchSettings"} + if s.EndpointUri == nil { + invalidParams.Add(request.NewErrParamRequired("EndpointUri")) + } + if s.ServiceAccessRoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceAccessRoleArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEndpointUri sets the EndpointUri field's value. +func (s *ElasticsearchSettings) SetEndpointUri(v string) *ElasticsearchSettings { + s.EndpointUri = &v + return s +} + +// SetErrorRetryDuration sets the ErrorRetryDuration field's value. +func (s *ElasticsearchSettings) SetErrorRetryDuration(v int64) *ElasticsearchSettings { + s.ErrorRetryDuration = &v + return s +} + +// SetFullLoadErrorPercentage sets the FullLoadErrorPercentage field's value. +func (s *ElasticsearchSettings) SetFullLoadErrorPercentage(v int64) *ElasticsearchSettings { + s.FullLoadErrorPercentage = &v + return s +} + +// SetServiceAccessRoleArn sets the ServiceAccessRoleArn field's value. +func (s *ElasticsearchSettings) SetServiceAccessRoleArn(v string) *ElasticsearchSettings { + s.ServiceAccessRoleArn = &v + return s +} + type Endpoint struct { _ struct{} `type:"structure"` @@ -7933,9 +8049,9 @@ type Endpoint struct { // The name of the database at the endpoint. DatabaseName *string `type:"string"` - // The settings in JSON format for the DMS Transfer type source endpoint. + // The settings in JSON format for the DMS transfer type of source endpoint. // - // Attributes include: + // Possible attributes include the following: // // * serviceAccessRoleArn - The IAM role that has permission to access the // Amazon S3 bucket. @@ -7943,21 +8059,23 @@ type Endpoint struct { // * bucketName - The name of the S3 bucket to use. // // * compressionType - An optional parameter to use GZIP to compress the - // target files. Set to NONE (the default) or do not use to leave the files - // uncompressed. + // target files. To use GZIP, set this value to NONE (the default). To keep + // the files uncompressed, don't use this value. // - // Shorthand syntax: ServiceAccessRoleArn=string ,BucketName=string,CompressionType=string - // - // JSON syntax: + // Shorthand syntax for these attributes is as follows: ServiceAccessRoleArn=string,BucketName=string,CompressionType=string // - // { "ServiceAccessRoleArn": "string", "BucketName": "string", "CompressionType": - // "none"|"gzip" } + // JSON syntax for these attributes is as follows: { "ServiceAccessRoleArn": + // "string", "BucketName": "string", "CompressionType": "none"|"gzip" } DmsTransferSettings *DmsTransferSettings `type:"structure"` // The settings for the target DynamoDB database. For more information, see // the DynamoDBSettings structure. DynamoDbSettings *DynamoDbSettings `type:"structure"` + // The settings for the Elasticsearch source endpoint. For more information, + // see the ElasticsearchSettings structure. + ElasticsearchSettings *ElasticsearchSettings `type:"structure"` + // The Amazon Resource Name (ARN) string that uniquely identifies the endpoint. EndpointArn *string `type:"string"` @@ -7989,11 +8107,15 @@ type Endpoint struct { // Additional connection attributes used to connect to the endpoint. ExtraConnectionAttributes *string `type:"string"` - // The KMS key identifier that will be used to encrypt the connection parameters. - // If you do not specify a value for the KmsKeyId parameter, then AWS DMS will - // use your default encryption key. AWS KMS creates the default encryption key - // for your AWS account. Your AWS account has a different default encryption - // key for each AWS region. + // The settings for the Amazon Kinesis source endpoint. For more information, + // see the KinesisSettings structure. + KinesisSettings *KinesisSettings `type:"structure"` + + // The AWS KMS key identifier that is used to encrypt the content on the replication + // instance. If you don't specify a value for the KmsKeyId parameter, then AWS + // DMS uses your default encryption key. AWS KMS creates the default encryption + // key for your AWS account. Your AWS account has a different default encryption + // key for each AWS Region. KmsKeyId *string `type:"string"` // The settings for the MongoDB source endpoint. For more information, see the @@ -8061,6 +8183,12 @@ func (s *Endpoint) SetDynamoDbSettings(v *DynamoDbSettings) *Endpoint { return s } +// SetElasticsearchSettings sets the ElasticsearchSettings field's value. +func (s *Endpoint) SetElasticsearchSettings(v *ElasticsearchSettings) *Endpoint { + s.ElasticsearchSettings = v + return s +} + // SetEndpointArn sets the EndpointArn field's value. func (s *Endpoint) SetEndpointArn(v string) *Endpoint { s.EndpointArn = &v @@ -8109,6 +8237,12 @@ func (s *Endpoint) SetExtraConnectionAttributes(v string) *Endpoint { return s } +// SetKinesisSettings sets the KinesisSettings field's value. +func (s *Endpoint) SetKinesisSettings(v *KinesisSettings) *Endpoint { + s.KinesisSettings = v + return s +} + // SetKmsKeyId sets the KmsKeyId field's value. func (s *Endpoint) SetKmsKeyId(v string) *Endpoint { s.KmsKeyId = &v @@ -8513,6 +8647,49 @@ func (s *ImportCertificateOutput) SetCertificate(v *Certificate) *ImportCertific return s } +type KinesisSettings struct { + _ struct{} `type:"structure"` + + // The output format for the records created on the endpoint. The message format + // is JSON. + MessageFormat *string `type:"string" enum:"MessageFormatValue"` + + // The Amazon Resource Name (ARN) for the IAM role that DMS uses to write to + // the Amazon Kinesis data stream. + ServiceAccessRoleArn *string `type:"string"` + + // The Amazon Resource Name (ARN) for the Amazon Kinesis Data Streams endpoint. + StreamArn *string `type:"string"` +} + +// String returns the string representation +func (s KinesisSettings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s KinesisSettings) GoString() string { + return s.String() +} + +// SetMessageFormat sets the MessageFormat field's value. +func (s *KinesisSettings) SetMessageFormat(v string) *KinesisSettings { + s.MessageFormat = &v + return s +} + +// SetServiceAccessRoleArn sets the ServiceAccessRoleArn field's value. +func (s *KinesisSettings) SetServiceAccessRoleArn(v string) *KinesisSettings { + s.ServiceAccessRoleArn = &v + return s +} + +// SetStreamArn sets the StreamArn field's value. +func (s *KinesisSettings) SetStreamArn(v string) *KinesisSettings { + s.StreamArn = &v + return s +} + type ListTagsForResourceInput struct { _ struct{} `type:"structure"` @@ -8584,9 +8761,9 @@ type ModifyEndpointInput struct { // The name of the endpoint database. DatabaseName *string `type:"string"` - // The settings in JSON format for the DMS Transfer type source endpoint. + // The settings in JSON format for the DMS transfer type of source endpoint. // - // Attributes include: + // Attributes include the following: // // * serviceAccessRoleArn - The IAM role that has permission to access the // Amazon S3 bucket. @@ -8606,11 +8783,17 @@ type ModifyEndpointInput struct { DmsTransferSettings *DmsTransferSettings `type:"structure"` // Settings in JSON format for the target Amazon DynamoDB endpoint. For more - // information about the available settings, see the Using Object Mapping to - // Migrate Data to DynamoDB section at Using an Amazon DynamoDB Database as - // a Target for AWS Database Migration Service (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.DynamoDB.html). + // information about the available settings, see Using Object Mapping to Migrate + // Data to DynamoDB (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.DynamoDB.html) + // in the AWS Database Migration Service User Guide. DynamoDbSettings *DynamoDbSettings `type:"structure"` + // Settings in JSON format for the target Elasticsearch endpoint. For more information + // about the available settings, see Extra Connection Attributes When Using + // Elasticsearch as a Target for AWS DMS (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Elasticsearch.html#CHAP_Target.Elasticsearch.Configuration) + // in the AWS Database Migration User Guide. + ElasticsearchSettings *ElasticsearchSettings `type:"structure"` + // The Amazon Resource Name (ARN) string that uniquely identifies the endpoint. // // EndpointArn is a required field @@ -8636,21 +8819,28 @@ type ModifyEndpointInput struct { // pass the empty string ("") as an argument. ExtraConnectionAttributes *string `type:"string"` + // Settings in JSON format for the target Amazon Kinesis Data Streams endpoint. + // For more information about the available settings, see Using Object Mapping + // to Migrate Data to a Kinesis Data Stream (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Kinesis.html#CHAP_Target.Kinesis.ObjectMapping + // ) in the AWS Database Migration User Guide. + KinesisSettings *KinesisSettings `type:"structure"` + // Settings in JSON format for the source MongoDB endpoint. For more information - // about the available settings, see the Configuration Properties When Using - // MongoDB as a Source for AWS Database Migration Service section at Using - // Amazon S3 as a Target for AWS Database Migration Service (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MongoDB.html). + // about the available settings, see the configuration properties section in + // Using MongoDB as a Target for AWS Database Migration Service (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.MongoDB.html) + // in the AWS Database Migration Service User Guide. MongoDbSettings *MongoDbSettings `type:"structure"` // The password to be used to login to the endpoint database. - Password *string `type:"string"` + Password *string `type:"string" sensitive:"true"` // The port used by the endpoint database. Port *int64 `type:"integer"` - // Settings in JSON format for the target S3 endpoint. For more information - // about the available settings, see the Extra Connection Attributes section - // at Using Amazon S3 as a Target for AWS Database Migration Service (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.S3.html). + // Settings in JSON format for the target Amazon S3 endpoint. For more information + // about the available settings, see Extra Connection Attributes When Using + // Amazon S3 as a Target for AWS DMS (http://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.S3.html#CHAP_Target.S3.Configuring) + // in the AWS Database Migration Service User Guide. S3Settings *S3Settings `type:"structure"` // The name of the server where the endpoint database resides. @@ -8692,6 +8882,11 @@ func (s *ModifyEndpointInput) Validate() error { invalidParams.AddNested("DynamoDbSettings", err.(request.ErrInvalidParams)) } } + if s.ElasticsearchSettings != nil { + if err := s.ElasticsearchSettings.Validate(); err != nil { + invalidParams.AddNested("ElasticsearchSettings", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -8723,6 +8918,12 @@ func (s *ModifyEndpointInput) SetDynamoDbSettings(v *DynamoDbSettings) *ModifyEn return s } +// SetElasticsearchSettings sets the ElasticsearchSettings field's value. +func (s *ModifyEndpointInput) SetElasticsearchSettings(v *ElasticsearchSettings) *ModifyEndpointInput { + s.ElasticsearchSettings = v + return s +} + // SetEndpointArn sets the EndpointArn field's value. func (s *ModifyEndpointInput) SetEndpointArn(v string) *ModifyEndpointInput { s.EndpointArn = &v @@ -8759,6 +8960,12 @@ func (s *ModifyEndpointInput) SetExtraConnectionAttributes(v string) *ModifyEndp return s } +// SetKinesisSettings sets the KinesisSettings field's value. +func (s *ModifyEndpointInput) SetKinesisSettings(v *KinesisSettings) *ModifyEndpointInput { + s.KinesisSettings = v + return s +} + // SetMongoDbSettings sets the MongoDbSettings field's value. func (s *ModifyEndpointInput) SetMongoDbSettings(v *MongoDbSettings) *ModifyEndpointInput { s.MongoDbSettings = v @@ -9399,11 +9606,11 @@ type MongoDbSettings struct { // Default value is false. ExtractDocId *string `type:"string"` - // The KMS key identifier that will be used to encrypt the connection parameters. - // If you do not specify a value for the KmsKeyId parameter, then AWS DMS will - // use your default encryption key. AWS KMS creates the default encryption key - // for your AWS account. Your AWS account has a different default encryption - // key for each AWS region. + // The AWS KMS key identifier that is used to encrypt the content on the replication + // instance. If you don't specify a value for the KmsKeyId parameter, then AWS + // DMS uses your default encryption key. AWS KMS creates the default encryption + // key for your AWS account. Your AWS account has a different default encryption + // key for each AWS Region. KmsKeyId *string `type:"string"` // Specifies either document or table mode. @@ -9415,7 +9622,7 @@ type MongoDbSettings struct { NestingLevel *string `type:"string" enum:"NestingLevelValue"` // The password for the user account you use to access the MongoDB source endpoint. - Password *string `type:"string"` + Password *string `type:"string" sensitive:"true"` // The port value for the MongoDB source endpoint. Port *int64 `type:"integer"` @@ -9969,6 +10176,9 @@ type ReplicationInstance struct { // The Availability Zone for the instance. AvailabilityZone *string `type:"string"` + // The DNS name servers for the replication instance. + DnsNameServers *string `type:"string"` + // The engine version number of the replication instance. EngineVersion *string `type:"string"` @@ -9979,11 +10189,11 @@ type ReplicationInstance struct { // The time the replication instance was created. InstanceCreateTime *time.Time `type:"timestamp"` - // The KMS key identifier that is used to encrypt the content on the replication - // instance. If you do not specify a value for the KmsKeyId parameter, then - // AWS DMS will use your default encryption key. AWS KMS creates the default - // encryption key for your AWS account. Your AWS account has a different default - // encryption key for each AWS region. + // The AWS KMS key identifier that is used to encrypt the content on the replication + // instance. If you don't specify a value for the KmsKeyId parameter, then AWS + // DMS uses your default encryption key. AWS KMS creates the default encryption + // key for your AWS account. Your AWS account has a different default encryption + // key for each AWS Region. KmsKeyId *string `type:"string"` // Specifies if the replication instance is a Multi-AZ deployment. You cannot @@ -10081,6 +10291,12 @@ func (s *ReplicationInstance) SetAvailabilityZone(v string) *ReplicationInstance return s } +// SetDnsNameServers sets the DnsNameServers field's value. +func (s *ReplicationInstance) SetDnsNameServers(v string) *ReplicationInstance { + s.DnsNameServers = &v + return s +} + // SetEngineVersion sets the EngineVersion field's value. func (s *ReplicationInstance) SetEngineVersion(v string) *ReplicationInstance { s.EngineVersion = &v @@ -11519,6 +11735,11 @@ const ( DmsSslModeValueVerifyFull = "verify-full" ) +const ( + // MessageFormatValueJson is a MessageFormatValue enum value + MessageFormatValueJson = "json" +) + const ( // MigrationTypeValueFullLoad is a MigrationTypeValue enum value MigrationTypeValueFullLoad = "full-load" diff --git a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/doc.go b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/doc.go index ed8b2a3366..9820993c6c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/doc.go @@ -11,8 +11,9 @@ // between different database platforms, such as Oracle to MySQL or SQL Server // to PostgreSQL. // -// For more information about AWS DMS, see the AWS DMS user guide at What Is -// AWS Database Migration Service? (http://docs.aws.amazon.com/dms/latest/userguide/Welcome.html) +// For more information about AWS DMS, see What Is AWS Database Migration Service? +// (http://docs.aws.amazon.com/dms/latest/userguide/Welcome.html) in the AWS +// Database Migration User Guide. // // See https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01 for more information on this service. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/waiters.go new file mode 100644 index 0000000000..225f2d58cc --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/databasemigrationservice/waiters.go @@ -0,0 +1,563 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package databasemigrationservice + +import ( + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" +) + +// WaitUntilEndpointDeleted uses the AWS Database Migration Service API operation +// DescribeEndpoints to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *DatabaseMigrationService) WaitUntilEndpointDeleted(input *DescribeEndpointsInput) error { + return c.WaitUntilEndpointDeletedWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilEndpointDeletedWithContext is an extended version of WaitUntilEndpointDeleted. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// 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 *DatabaseMigrationService) WaitUntilEndpointDeletedWithContext(ctx aws.Context, input *DescribeEndpointsInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilEndpointDeleted", + MaxAttempts: 60, + Delay: request.ConstantWaiterDelay(5 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.ErrorWaiterMatch, + Expected: "ResourceNotFoundFault", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "Endpoints[].Status", + Expected: "active", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "Endpoints[].Status", + Expected: "creating", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeEndpointsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeEndpointsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} + +// WaitUntilReplicationInstanceAvailable uses the AWS Database Migration Service API operation +// DescribeReplicationInstances to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *DatabaseMigrationService) WaitUntilReplicationInstanceAvailable(input *DescribeReplicationInstancesInput) error { + return c.WaitUntilReplicationInstanceAvailableWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilReplicationInstanceAvailableWithContext is an extended version of WaitUntilReplicationInstanceAvailable. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// 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 *DatabaseMigrationService) WaitUntilReplicationInstanceAvailableWithContext(ctx aws.Context, input *DescribeReplicationInstancesInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilReplicationInstanceAvailable", + MaxAttempts: 60, + Delay: request.ConstantWaiterDelay(60 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.PathAllWaiterMatch, Argument: "ReplicationInstances[].ReplicationInstanceStatus", + Expected: "available", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationInstances[].ReplicationInstanceStatus", + Expected: "deleting", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationInstances[].ReplicationInstanceStatus", + Expected: "incompatible-credentials", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationInstances[].ReplicationInstanceStatus", + Expected: "incompatible-network", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationInstances[].ReplicationInstanceStatus", + Expected: "inaccessible-encryption-credentials", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeReplicationInstancesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeReplicationInstancesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} + +// WaitUntilReplicationInstanceDeleted uses the AWS Database Migration Service API operation +// DescribeReplicationInstances to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *DatabaseMigrationService) WaitUntilReplicationInstanceDeleted(input *DescribeReplicationInstancesInput) error { + return c.WaitUntilReplicationInstanceDeletedWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilReplicationInstanceDeletedWithContext is an extended version of WaitUntilReplicationInstanceDeleted. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// 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 *DatabaseMigrationService) WaitUntilReplicationInstanceDeletedWithContext(ctx aws.Context, input *DescribeReplicationInstancesInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilReplicationInstanceDeleted", + MaxAttempts: 60, + Delay: request.ConstantWaiterDelay(15 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationInstances[].ReplicationInstanceStatus", + Expected: "available", + }, + { + State: request.SuccessWaiterState, + Matcher: request.ErrorWaiterMatch, + Expected: "ResourceNotFoundFault", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeReplicationInstancesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeReplicationInstancesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} + +// WaitUntilReplicationTaskDeleted uses the AWS Database Migration Service API operation +// DescribeReplicationTasks to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *DatabaseMigrationService) WaitUntilReplicationTaskDeleted(input *DescribeReplicationTasksInput) error { + return c.WaitUntilReplicationTaskDeletedWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilReplicationTaskDeletedWithContext is an extended version of WaitUntilReplicationTaskDeleted. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// 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 *DatabaseMigrationService) WaitUntilReplicationTaskDeletedWithContext(ctx aws.Context, input *DescribeReplicationTasksInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilReplicationTaskDeleted", + MaxAttempts: 60, + Delay: request.ConstantWaiterDelay(15 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "ready", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "creating", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "stopped", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "running", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "failed", + }, + { + State: request.SuccessWaiterState, + Matcher: request.ErrorWaiterMatch, + Expected: "ResourceNotFoundFault", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeReplicationTasksInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeReplicationTasksRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} + +// WaitUntilReplicationTaskReady uses the AWS Database Migration Service API operation +// DescribeReplicationTasks to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *DatabaseMigrationService) WaitUntilReplicationTaskReady(input *DescribeReplicationTasksInput) error { + return c.WaitUntilReplicationTaskReadyWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilReplicationTaskReadyWithContext is an extended version of WaitUntilReplicationTaskReady. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// 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 *DatabaseMigrationService) WaitUntilReplicationTaskReadyWithContext(ctx aws.Context, input *DescribeReplicationTasksInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilReplicationTaskReady", + MaxAttempts: 60, + Delay: request.ConstantWaiterDelay(15 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.PathAllWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "ready", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "starting", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "running", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "stopping", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "stopped", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "failed", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "modifying", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "testing", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "deleting", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeReplicationTasksInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeReplicationTasksRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} + +// WaitUntilReplicationTaskRunning uses the AWS Database Migration Service API operation +// DescribeReplicationTasks to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *DatabaseMigrationService) WaitUntilReplicationTaskRunning(input *DescribeReplicationTasksInput) error { + return c.WaitUntilReplicationTaskRunningWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilReplicationTaskRunningWithContext is an extended version of WaitUntilReplicationTaskRunning. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// 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 *DatabaseMigrationService) WaitUntilReplicationTaskRunningWithContext(ctx aws.Context, input *DescribeReplicationTasksInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilReplicationTaskRunning", + MaxAttempts: 60, + Delay: request.ConstantWaiterDelay(15 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.PathAllWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "running", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "ready", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "creating", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "stopping", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "stopped", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "failed", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "modifying", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "testing", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "deleting", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeReplicationTasksInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeReplicationTasksRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} + +// WaitUntilReplicationTaskStopped uses the AWS Database Migration Service API operation +// DescribeReplicationTasks to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *DatabaseMigrationService) WaitUntilReplicationTaskStopped(input *DescribeReplicationTasksInput) error { + return c.WaitUntilReplicationTaskStoppedWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilReplicationTaskStoppedWithContext is an extended version of WaitUntilReplicationTaskStopped. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// 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 *DatabaseMigrationService) WaitUntilReplicationTaskStoppedWithContext(ctx aws.Context, input *DescribeReplicationTasksInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilReplicationTaskStopped", + MaxAttempts: 60, + Delay: request.ConstantWaiterDelay(15 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.PathAllWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "stopped", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "ready", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "creating", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "starting", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "running", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "failed", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "modifying", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "testing", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status", + Expected: "deleting", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeReplicationTasksInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeReplicationTasksRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} + +// WaitUntilTestConnectionSucceeds uses the AWS Database Migration Service API operation +// TestConnection to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *DatabaseMigrationService) WaitUntilTestConnectionSucceeds(input *TestConnectionInput) error { + return c.WaitUntilTestConnectionSucceedsWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilTestConnectionSucceedsWithContext is an extended version of WaitUntilTestConnectionSucceeds. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// 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 *DatabaseMigrationService) WaitUntilTestConnectionSucceedsWithContext(ctx aws.Context, input *TestConnectionInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilTestConnectionSucceeds", + MaxAttempts: 60, + Delay: request.ConstantWaiterDelay(5 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.SuccessWaiterState, + Matcher: request.PathWaiterMatch, Argument: "Connection.Status", + Expected: "successful", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathWaiterMatch, Argument: "Connection.Status", + Expected: "failed", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *TestConnectionInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.TestConnectionRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/dax/api.go b/vendor/github.com/aws/aws-sdk-go/service/dax/api.go index 73ae665e4f..4b836d462b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dax/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dax/api.go @@ -15,7 +15,7 @@ const opCreateCluster = "CreateCluster" // CreateClusterRequest generates a "aws/request.Request" representing the // client's request for the CreateCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -135,7 +135,7 @@ const opCreateParameterGroup = "CreateParameterGroup" // CreateParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -229,7 +229,7 @@ const opCreateSubnetGroup = "CreateSubnetGroup" // CreateSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -321,7 +321,7 @@ const opDecreaseReplicationFactor = "DecreaseReplicationFactor" // DecreaseReplicationFactorRequest generates a "aws/request.Request" representing the // client's request for the DecreaseReplicationFactor operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -417,7 +417,7 @@ const opDeleteCluster = "DeleteCluster" // DeleteClusterRequest generates a "aws/request.Request" representing the // client's request for the DeleteCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -510,7 +510,7 @@ const opDeleteParameterGroup = "DeleteParameterGroup" // DeleteParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -601,7 +601,7 @@ const opDeleteSubnetGroup = "DeleteSubnetGroup" // DeleteSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -687,7 +687,7 @@ const opDescribeClusters = "DescribeClusters" // DescribeClustersRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -790,7 +790,7 @@ const opDescribeDefaultParameters = "DescribeDefaultParameters" // DescribeDefaultParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeDefaultParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -874,7 +874,7 @@ const opDescribeEvents = "DescribeEvents" // DescribeEventsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -963,7 +963,7 @@ const opDescribeParameterGroups = "DescribeParameterGroups" // DescribeParameterGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeParameterGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1051,7 +1051,7 @@ const opDescribeParameters = "DescribeParameters" // DescribeParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1138,7 +1138,7 @@ const opDescribeSubnetGroups = "DescribeSubnetGroups" // DescribeSubnetGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSubnetGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1220,7 +1220,7 @@ const opIncreaseReplicationFactor = "IncreaseReplicationFactor" // IncreaseReplicationFactorRequest generates a "aws/request.Request" representing the // client's request for the IncreaseReplicationFactor operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1323,7 +1323,7 @@ const opListTags = "ListTags" // ListTagsRequest generates a "aws/request.Request" representing the // client's request for the ListTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1417,7 +1417,7 @@ const opRebootNode = "RebootNode" // RebootNodeRequest generates a "aws/request.Request" representing the // client's request for the RebootNode operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1511,7 +1511,7 @@ const opTagResource = "TagResource" // TagResourceRequest generates a "aws/request.Request" representing the // client's request for the TagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1608,7 +1608,7 @@ const opUntagResource = "UntagResource" // UntagResourceRequest generates a "aws/request.Request" representing the // client's request for the UntagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1705,7 +1705,7 @@ const opUpdateCluster = "UpdateCluster" // UpdateClusterRequest generates a "aws/request.Request" representing the // client's request for the UpdateCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1803,7 +1803,7 @@ const opUpdateParameterGroup = "UpdateParameterGroup" // UpdateParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the UpdateParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1894,7 +1894,7 @@ const opUpdateSubnetGroup = "UpdateSubnetGroup" // UpdateSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the UpdateSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. diff --git a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go index 4d945c971b..5f65456c39 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/devicefarm/api.go @@ -8,6 +8,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) const opCreateDevicePool = "CreateDevicePool" @@ -15,7 +17,7 @@ const opCreateDevicePool = "CreateDevicePool" // CreateDevicePoolRequest generates a "aws/request.Request" representing the // client's request for the CreateDevicePool operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -103,7 +105,7 @@ const opCreateInstanceProfile = "CreateInstanceProfile" // CreateInstanceProfileRequest generates a "aws/request.Request" representing the // client's request for the CreateInstanceProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -192,7 +194,7 @@ const opCreateNetworkProfile = "CreateNetworkProfile" // CreateNetworkProfileRequest generates a "aws/request.Request" representing the // client's request for the CreateNetworkProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -280,7 +282,7 @@ const opCreateProject = "CreateProject" // CreateProjectRequest generates a "aws/request.Request" representing the // client's request for the CreateProject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -368,7 +370,7 @@ const opCreateRemoteAccessSession = "CreateRemoteAccessSession" // CreateRemoteAccessSessionRequest generates a "aws/request.Request" representing the // client's request for the CreateRemoteAccessSession operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -456,7 +458,7 @@ const opCreateUpload = "CreateUpload" // CreateUploadRequest generates a "aws/request.Request" representing the // client's request for the CreateUpload operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -544,7 +546,7 @@ const opCreateVPCEConfiguration = "CreateVPCEConfiguration" // CreateVPCEConfigurationRequest generates a "aws/request.Request" representing the // client's request for the CreateVPCEConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -630,7 +632,7 @@ const opDeleteDevicePool = "DeleteDevicePool" // DeleteDevicePoolRequest generates a "aws/request.Request" representing the // client's request for the DeleteDevicePool operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -664,6 +666,7 @@ func (c *DeviceFarm) DeleteDevicePoolRequest(input *DeleteDevicePoolInput) (req output = &DeleteDevicePoolOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -719,7 +722,7 @@ const opDeleteInstanceProfile = "DeleteInstanceProfile" // DeleteInstanceProfileRequest generates a "aws/request.Request" representing the // client's request for the DeleteInstanceProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -753,6 +756,7 @@ func (c *DeviceFarm) DeleteInstanceProfileRequest(input *DeleteInstanceProfileIn output = &DeleteInstanceProfileOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -807,7 +811,7 @@ const opDeleteNetworkProfile = "DeleteNetworkProfile" // DeleteNetworkProfileRequest generates a "aws/request.Request" representing the // client's request for the DeleteNetworkProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -841,6 +845,7 @@ func (c *DeviceFarm) DeleteNetworkProfileRequest(input *DeleteNetworkProfileInpu output = &DeleteNetworkProfileOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -895,7 +900,7 @@ const opDeleteProject = "DeleteProject" // DeleteProjectRequest generates a "aws/request.Request" representing the // client's request for the DeleteProject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -929,6 +934,7 @@ func (c *DeviceFarm) DeleteProjectRequest(input *DeleteProjectInput) (req *reque output = &DeleteProjectOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -985,7 +991,7 @@ const opDeleteRemoteAccessSession = "DeleteRemoteAccessSession" // DeleteRemoteAccessSessionRequest generates a "aws/request.Request" representing the // client's request for the DeleteRemoteAccessSession operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1019,6 +1025,7 @@ func (c *DeviceFarm) DeleteRemoteAccessSessionRequest(input *DeleteRemoteAccessS output = &DeleteRemoteAccessSessionOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1073,7 +1080,7 @@ const opDeleteRun = "DeleteRun" // DeleteRunRequest generates a "aws/request.Request" representing the // client's request for the DeleteRun operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1107,6 +1114,7 @@ func (c *DeviceFarm) DeleteRunRequest(input *DeleteRunInput) (req *request.Reque output = &DeleteRunOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1163,7 +1171,7 @@ const opDeleteUpload = "DeleteUpload" // DeleteUploadRequest generates a "aws/request.Request" representing the // client's request for the DeleteUpload operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1197,6 +1205,7 @@ func (c *DeviceFarm) DeleteUploadRequest(input *DeleteUploadInput) (req *request output = &DeleteUploadOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1251,7 +1260,7 @@ const opDeleteVPCEConfiguration = "DeleteVPCEConfiguration" // DeleteVPCEConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteVPCEConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1285,6 +1294,7 @@ func (c *DeviceFarm) DeleteVPCEConfigurationRequest(input *DeleteVPCEConfigurati output = &DeleteVPCEConfigurationOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1340,7 +1350,7 @@ const opGetAccountSettings = "GetAccountSettings" // GetAccountSettingsRequest generates a "aws/request.Request" representing the // client's request for the GetAccountSettings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1429,7 +1439,7 @@ const opGetDevice = "GetDevice" // GetDeviceRequest generates a "aws/request.Request" representing the // client's request for the GetDevice operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1517,7 +1527,7 @@ const opGetDeviceInstance = "GetDeviceInstance" // GetDeviceInstanceRequest generates a "aws/request.Request" representing the // client's request for the GetDeviceInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1606,7 +1616,7 @@ const opGetDevicePool = "GetDevicePool" // GetDevicePoolRequest generates a "aws/request.Request" representing the // client's request for the GetDevicePool operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1694,7 +1704,7 @@ const opGetDevicePoolCompatibility = "GetDevicePoolCompatibility" // GetDevicePoolCompatibilityRequest generates a "aws/request.Request" representing the // client's request for the GetDevicePoolCompatibility operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1782,7 +1792,7 @@ const opGetInstanceProfile = "GetInstanceProfile" // GetInstanceProfileRequest generates a "aws/request.Request" representing the // client's request for the GetInstanceProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1870,7 +1880,7 @@ const opGetJob = "GetJob" // GetJobRequest generates a "aws/request.Request" representing the // client's request for the GetJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1958,7 +1968,7 @@ const opGetNetworkProfile = "GetNetworkProfile" // GetNetworkProfileRequest generates a "aws/request.Request" representing the // client's request for the GetNetworkProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2046,7 +2056,7 @@ const opGetOfferingStatus = "GetOfferingStatus" // GetOfferingStatusRequest generates a "aws/request.Request" representing the // client's request for the GetOfferingStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2199,7 +2209,7 @@ const opGetProject = "GetProject" // GetProjectRequest generates a "aws/request.Request" representing the // client's request for the GetProject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2287,7 +2297,7 @@ const opGetRemoteAccessSession = "GetRemoteAccessSession" // GetRemoteAccessSessionRequest generates a "aws/request.Request" representing the // client's request for the GetRemoteAccessSession operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2375,7 +2385,7 @@ const opGetRun = "GetRun" // GetRunRequest generates a "aws/request.Request" representing the // client's request for the GetRun operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2463,7 +2473,7 @@ const opGetSuite = "GetSuite" // GetSuiteRequest generates a "aws/request.Request" representing the // client's request for the GetSuite operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2551,7 +2561,7 @@ const opGetTest = "GetTest" // GetTestRequest generates a "aws/request.Request" representing the // client's request for the GetTest operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2639,7 +2649,7 @@ const opGetUpload = "GetUpload" // GetUploadRequest generates a "aws/request.Request" representing the // client's request for the GetUpload operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2727,7 +2737,7 @@ const opGetVPCEConfiguration = "GetVPCEConfiguration" // GetVPCEConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetVPCEConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2813,7 +2823,7 @@ const opInstallToRemoteAccessSession = "InstallToRemoteAccessSession" // InstallToRemoteAccessSessionRequest generates a "aws/request.Request" representing the // client's request for the InstallToRemoteAccessSession operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2903,7 +2913,7 @@ const opListArtifacts = "ListArtifacts" // ListArtifactsRequest generates a "aws/request.Request" representing the // client's request for the ListArtifacts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3047,7 +3057,7 @@ const opListDeviceInstances = "ListDeviceInstances" // ListDeviceInstancesRequest generates a "aws/request.Request" representing the // client's request for the ListDeviceInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3136,7 +3146,7 @@ const opListDevicePools = "ListDevicePools" // ListDevicePoolsRequest generates a "aws/request.Request" representing the // client's request for the ListDevicePools operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3280,7 +3290,7 @@ const opListDevices = "ListDevices" // ListDevicesRequest generates a "aws/request.Request" representing the // client's request for the ListDevices operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3424,7 +3434,7 @@ const opListInstanceProfiles = "ListInstanceProfiles" // ListInstanceProfilesRequest generates a "aws/request.Request" representing the // client's request for the ListInstanceProfiles operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3512,7 +3522,7 @@ const opListJobs = "ListJobs" // ListJobsRequest generates a "aws/request.Request" representing the // client's request for the ListJobs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3656,7 +3666,7 @@ const opListNetworkProfiles = "ListNetworkProfiles" // ListNetworkProfilesRequest generates a "aws/request.Request" representing the // client's request for the ListNetworkProfiles operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3744,7 +3754,7 @@ const opListOfferingPromotions = "ListOfferingPromotions" // ListOfferingPromotionsRequest generates a "aws/request.Request" representing the // client's request for the ListOfferingPromotions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3840,7 +3850,7 @@ const opListOfferingTransactions = "ListOfferingTransactions" // ListOfferingTransactionsRequest generates a "aws/request.Request" representing the // client's request for the ListOfferingTransactions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3993,7 +4003,7 @@ const opListOfferings = "ListOfferings" // ListOfferingsRequest generates a "aws/request.Request" representing the // client's request for the ListOfferings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4146,7 +4156,7 @@ const opListProjects = "ListProjects" // ListProjectsRequest generates a "aws/request.Request" representing the // client's request for the ListProjects operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4290,7 +4300,7 @@ const opListRemoteAccessSessions = "ListRemoteAccessSessions" // ListRemoteAccessSessionsRequest generates a "aws/request.Request" representing the // client's request for the ListRemoteAccessSessions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4378,7 +4388,7 @@ const opListRuns = "ListRuns" // ListRunsRequest generates a "aws/request.Request" representing the // client's request for the ListRuns operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4522,7 +4532,7 @@ const opListSamples = "ListSamples" // ListSamplesRequest generates a "aws/request.Request" representing the // client's request for the ListSamples operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4567,7 +4577,7 @@ func (c *DeviceFarm) ListSamplesRequest(input *ListSamplesInput) (req *request.R // ListSamples API operation for AWS Device Farm. // -// Gets information about samples, given an AWS Device Farm project ARN +// Gets information about samples, given an AWS Device Farm job ARN. // // 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 @@ -4666,7 +4676,7 @@ const opListSuites = "ListSuites" // ListSuitesRequest generates a "aws/request.Request" representing the // client's request for the ListSuites operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4810,7 +4820,7 @@ const opListTests = "ListTests" // ListTestsRequest generates a "aws/request.Request" representing the // client's request for the ListTests operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4954,7 +4964,7 @@ const opListUniqueProblems = "ListUniqueProblems" // ListUniqueProblemsRequest generates a "aws/request.Request" representing the // client's request for the ListUniqueProblems operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5098,7 +5108,7 @@ const opListUploads = "ListUploads" // ListUploadsRequest generates a "aws/request.Request" representing the // client's request for the ListUploads operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5242,7 +5252,7 @@ const opListVPCEConfigurations = "ListVPCEConfigurations" // ListVPCEConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the ListVPCEConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5325,7 +5335,7 @@ const opPurchaseOffering = "PurchaseOffering" // PurchaseOfferingRequest generates a "aws/request.Request" representing the // client's request for the PurchaseOffering operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5422,7 +5432,7 @@ const opRenewOffering = "RenewOffering" // RenewOfferingRequest generates a "aws/request.Request" representing the // client's request for the RenewOffering operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5518,7 +5528,7 @@ const opScheduleRun = "ScheduleRun" // ScheduleRunRequest generates a "aws/request.Request" representing the // client's request for the ScheduleRun operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5609,7 +5619,7 @@ const opStopJob = "StopJob" // StopJobRequest generates a "aws/request.Request" representing the // client's request for the StopJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5702,7 +5712,7 @@ const opStopRemoteAccessSession = "StopRemoteAccessSession" // StopRemoteAccessSessionRequest generates a "aws/request.Request" representing the // client's request for the StopRemoteAccessSession operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5790,7 +5800,7 @@ const opStopRun = "StopRun" // StopRunRequest generates a "aws/request.Request" representing the // client's request for the StopRun operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5883,7 +5893,7 @@ const opUpdateDeviceInstance = "UpdateDeviceInstance" // UpdateDeviceInstanceRequest generates a "aws/request.Request" representing the // client's request for the UpdateDeviceInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5971,7 +5981,7 @@ const opUpdateDevicePool = "UpdateDevicePool" // UpdateDevicePoolRequest generates a "aws/request.Request" representing the // client's request for the UpdateDevicePool operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6061,7 +6071,7 @@ const opUpdateInstanceProfile = "UpdateInstanceProfile" // UpdateInstanceProfileRequest generates a "aws/request.Request" representing the // client's request for the UpdateInstanceProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6149,7 +6159,7 @@ const opUpdateNetworkProfile = "UpdateNetworkProfile" // UpdateNetworkProfileRequest generates a "aws/request.Request" representing the // client's request for the UpdateNetworkProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6237,7 +6247,7 @@ const opUpdateProject = "UpdateProject" // UpdateProjectRequest generates a "aws/request.Request" representing the // client's request for the UpdateProject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6325,7 +6335,7 @@ const opUpdateUpload = "UpdateUpload" // UpdateUploadRequest generates a "aws/request.Request" representing the // client's request for the UpdateUpload operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6413,7 +6423,7 @@ const opUpdateVPCEConfiguration = "UpdateVPCEConfiguration" // UpdateVPCEConfigurationRequest generates a "aws/request.Request" representing the // client's request for the UpdateVPCEConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6620,6 +6630,8 @@ type Artifact struct { // // * MESSAGE_LOG: The message log type. // + // * VIDEO_LOG: The video log type. + // // * RESULT_LOG: The result log type. // // * SERVICE_LOG: The service log type. @@ -6658,6 +6670,14 @@ type Artifact struct { // * APPLICATION_CRASH_REPORT: The application crash report output type. // // * XCTEST_LOG: The XCode test output type. + // + // * VIDEO: The Video output type. + // + // * CUSTOMER_ARTIFACT:The Customer Artifact output type. + // + // * CUSTOMER_ARTIFACT_LOG: The Customer Artifact Log output type. + // + // * TESTSPEC_OUTPUT: The Test Spec Output type. Type *string `locationName:"type" type:"string" enum:"ArtifactType"` // The pre-signed Amazon S3 URL that can be used with a corresponding GET request @@ -7559,13 +7579,24 @@ type CreateUploadInput struct { // // * APPIUM_PYTHON_TEST_PACKAGE: An Appium Python test package upload. // + // * APPIUM_NODE_TEST_PACKAGE: An Appium Node.js test package upload. + // + // * APPIUM_RUBY_TEST_PACKAGE: An Appium Ruby test package upload. + // // * APPIUM_WEB_JAVA_JUNIT_TEST_PACKAGE: An Appium Java JUnit test package - // upload. + // upload for a web app. // // * APPIUM_WEB_JAVA_TESTNG_TEST_PACKAGE: An Appium Java TestNG test package - // upload. + // upload for a web app. + // + // * APPIUM_WEB_PYTHON_TEST_PACKAGE: An Appium Python test package upload + // for a web app. + // + // * APPIUM_WEB_NODE_TEST_PACKAGE: An Appium Node.js test package upload + // for a web app. // - // * APPIUM_WEB_PYTHON_TEST_PACKAGE: An Appium Python test package upload. + // * APPIUM_WEB_RUBY_TEST_PACKAGE: An Appium Ruby test package upload for + // a web app. // // * CALABASH_TEST_PACKAGE: A Calabash test package upload. // @@ -7579,6 +7610,35 @@ type CreateUploadInput struct { // // * XCTEST_UI_TEST_PACKAGE: An XCode UI test package upload. // + // * APPIUM_JAVA_JUNIT_TEST_SPEC: An Appium Java JUnit test spec upload. + // + // * APPIUM_JAVA_TESTNG_TEST_SPEC: An Appium Java TestNG test spec upload. + // + // * APPIUM_PYTHON_TEST_SPEC: An Appium Python test spec upload. + // + // * APPIUM_NODE_TEST_SPEC: An Appium Node.js test spec upload. + // + // * APPIUM_RUBY_TEST_SPEC: An Appium Ruby test spec upload. + // + // * APPIUM_WEB_JAVA_JUNIT_TEST_SPEC: An Appium Java JUnit test spec upload + // for a web app. + // + // * APPIUM_WEB_JAVA_TESTNG_TEST_SPEC: An Appium Java TestNG test spec upload + // for a web app. + // + // * APPIUM_WEB_PYTHON_TEST_SPEC: An Appium Python test spec upload for a + // web app. + // + // * APPIUM_WEB_NODE_TEST_SPEC: An Appium Node.js test spec upload for a + // web app. + // + // * APPIUM_WEB_RUBY_TEST_SPEC: An Appium Ruby test spec upload for a web + // app. + // + // * INSTRUMENTATION_TEST_SPEC: An instrumentation test spec upload. + // + // * XCTEST_UI_TEST_SPEC: An XCode UI test spec upload. + // // Note If you call CreateUpload with WEB_APP specified, AWS Device Farm throws // an ArgumentException error. // @@ -8281,6 +8341,10 @@ type Device struct { // The device's ARN. Arn *string `locationName:"arn" min:"32" type:"string"` + // Reflects how likely a device will be available for a test run. It is currently + // available in the ListDevices and GetDevice API methods. + Availability *string `locationName:"availability" type:"string" enum:"DeviceAvailability"` + // The device's carrier. Carrier *string `locationName:"carrier" type:"string"` @@ -8368,6 +8432,12 @@ func (s *Device) SetArn(v string) *Device { return s } +// SetAvailability sets the Availability field's value. +func (s *Device) SetAvailability(v string) *Device { + s.Availability = &v + return s +} + // SetCarrier sets the Carrier field's value. func (s *Device) SetCarrier(v string) *Device { s.Carrier = &v @@ -8482,6 +8552,113 @@ func (s *Device) SetResolution(v *Resolution) *Device { return s } +// Represents a device filter used to select a set of devices to be included +// in a test run. This data structure is passed in as the deviceSelectionConfiguration +// parameter to ScheduleRun. For an example of the JSON request syntax, see +// ScheduleRun. +// +// It is also passed in as the filters parameter to ListDevices. For an example +// of the JSON request syntax, see ListDevices. +type DeviceFilter struct { + _ struct{} `type:"structure"` + + // The aspect of a device such as platform or model used as the selection criteria + // in a device filter. + // + // Allowed values include: + // + // * ARN: The Amazon Resource Name (ARN) of the device. For example, "arn:aws:devicefarm:us-west-2::device:12345Example". + // + // * PLATFORM: The device platform. Valid values are "ANDROID" or "IOS". + // + // * OS_VERSION: The operating system version. For example, "10.3.2". + // + // * MODEL: The device model. For example, "iPad 5th Gen". + // + // * AVAILABILITY: The current availability of the device. Valid values are + // "AVAILABLE", "HIGHLY_AVAILABLE", "BUSY", or "TEMPORARY_NOT_AVAILABLE". + // + // * FORM_FACTOR: The device form factor. Valid values are "PHONE" or "TABLET". + // + // * MANUFACTURER: The device manufacturer. For example, "Apple". + // + // * REMOTE_ACCESS_ENABLED: Whether the device is enabled for remote access. + // Valid values are "TRUE" or "FALSE". + // + // * REMOTE_DEBUG_ENABLED: Whether the device is enabled for remote debugging. + // Valid values are "TRUE" or "FALSE". + // + // * INSTANCE_ARN: The Amazon Resource Name (ARN) of the device instance. + // + // * INSTANCE_LABELS: The label of the device instance. + // + // * FLEET_TYPE: The fleet type. Valid values are "PUBLIC" or "PRIVATE". + Attribute *string `locationName:"attribute" type:"string" enum:"DeviceFilterAttribute"` + + // The filter operator. + // + // * The EQUALS operator is available for every attribute except INSTANCE_LABELS. + // + // * The CONTAINS operator is available for the INSTANCE_LABELS and MODEL + // attributes. + // + // * The IN and NOT_IN operators are available for the ARN, OS_VERSION, MODEL, + // MANUFACTURER, and INSTANCE_ARN attributes. + // + // * The LESS_THAN, GREATER_THAN, LESS_THAN_OR_EQUALS, and GREATER_THAN_OR_EQUALS + // operators are also available for the OS_VERSION attribute. + Operator *string `locationName:"operator" type:"string" enum:"DeviceFilterOperator"` + + // An array of one or more filter values used in a device filter. + // + // Operator Values + // + // * The IN and NOT_IN operators can take a values array that has more than + // one element. + // + // * The other operators require an array with a single element. + // + // Attribute Values + // + // * The PLATFORM attribute can be set to "ANDROID" or "IOS". + // + // * The AVAILABILITY attribute can be set to "AVAILABLE", "HIGHLY_AVAILABLE", + // "BUSY", or "TEMPORARY_NOT_AVAILABLE". + // + // * The FORM_FACTOR attribute can be set to "PHONE" or "TABLET". + // + // * The FLEET_TYPE attribute can be set to "PUBLIC" or "PRIVATE". + Values []*string `locationName:"values" type:"list"` +} + +// String returns the string representation +func (s DeviceFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeviceFilter) GoString() string { + return s.String() +} + +// SetAttribute sets the Attribute field's value. +func (s *DeviceFilter) SetAttribute(v string) *DeviceFilter { + s.Attribute = &v + return s +} + +// SetOperator sets the Operator field's value. +func (s *DeviceFilter) SetOperator(v string) *DeviceFilter { + s.Operator = &v + return s +} + +// SetValues sets the Values field's value. +func (s *DeviceFilter) SetValues(v []*string) *DeviceFilter { + s.Values = v + return s +} + // Represents the device instance. type DeviceInstance struct { _ struct{} `type:"structure"` @@ -8706,6 +8883,177 @@ func (s *DevicePoolCompatibilityResult) SetIncompatibilityMessages(v []*Incompat return s } +// Represents the device filters used in a test run as well as the maximum number +// of devices to be included in the run. It is passed in as the deviceSelectionConfiguration +// request parameter in ScheduleRun. +type DeviceSelectionConfiguration struct { + _ struct{} `type:"structure"` + + // Used to dynamically select a set of devices for a test run. A filter is made + // up of an attribute, an operator, and one or more values. + // + // * Attribute + // + // The aspect of a device such as platform or model used as the selection criteria + // in a device filter. + // + // Allowed values include: + // + // ARN: The Amazon Resource Name (ARN) of the device. For example, "arn:aws:devicefarm:us-west-2::device:12345Example". + // + // PLATFORM: The device platform. Valid values are "ANDROID" or "IOS". + // + // OS_VERSION: The operating system version. For example, "10.3.2". + // + // MODEL: The device model. For example, "iPad 5th Gen". + // + // AVAILABILITY: The current availability of the device. Valid values are "AVAILABLE", + // "HIGHLY_AVAILABLE", "BUSY", or "TEMPORARY_NOT_AVAILABLE". + // + // FORM_FACTOR: The device form factor. Valid values are "PHONE" or "TABLET". + // + // MANUFACTURER: The device manufacturer. For example, "Apple". + // + // REMOTE_ACCESS_ENABLED: Whether the device is enabled for remote access. Valid + // values are "TRUE" or "FALSE". + // + // REMOTE_DEBUG_ENABLED: Whether the device is enabled for remote debugging. + // Valid values are "TRUE" or "FALSE". + // + // INSTANCE_ARN: The Amazon Resource Name (ARN) of the device instance. + // + // INSTANCE_LABELS: The label of the device instance. + // + // FLEET_TYPE: The fleet type. Valid values are "PUBLIC" or "PRIVATE". + // + // * Operator + // + // The filter operator. + // + // The EQUALS operator is available for every attribute except INSTANCE_LABELS. + // + // The CONTAINS operator is available for the INSTANCE_LABELS and MODEL attributes. + // + // The IN and NOT_IN operators are available for the ARN, OS_VERSION, MODEL, + // MANUFACTURER, and INSTANCE_ARN attributes. + // + // The LESS_THAN, GREATER_THAN, LESS_THAN_OR_EQUALS, and GREATER_THAN_OR_EQUALS + // operators are also available for the OS_VERSION attribute. + // + // * Values + // + // An array of one or more filter values. + // + // Operator Values + // + // The IN and NOT_IN operators can take a values array that has more than one + // element. + // + // The other operators require an array with a single element. + // + // Attribute Values + // + // The PLATFORM attribute can be set to "ANDROID" or "IOS". + // + // The AVAILABILITY attribute can be set to "AVAILABLE", "HIGHLY_AVAILABLE", + // "BUSY", or "TEMPORARY_NOT_AVAILABLE". + // + // The FORM_FACTOR attribute can be set to "PHONE" or "TABLET". + // + // The FLEET_TYPE attribute can be set to "PUBLIC" or "PRIVATE". + // + // Filters is a required field + Filters []*DeviceFilter `locationName:"filters" type:"list" required:"true"` + + // The maximum number of devices to be included in a test run. + // + // MaxDevices is a required field + MaxDevices *int64 `locationName:"maxDevices" type:"integer" required:"true"` +} + +// String returns the string representation +func (s DeviceSelectionConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeviceSelectionConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeviceSelectionConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeviceSelectionConfiguration"} + if s.Filters == nil { + invalidParams.Add(request.NewErrParamRequired("Filters")) + } + if s.MaxDevices == nil { + invalidParams.Add(request.NewErrParamRequired("MaxDevices")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *DeviceSelectionConfiguration) SetFilters(v []*DeviceFilter) *DeviceSelectionConfiguration { + s.Filters = v + return s +} + +// SetMaxDevices sets the MaxDevices field's value. +func (s *DeviceSelectionConfiguration) SetMaxDevices(v int64) *DeviceSelectionConfiguration { + s.MaxDevices = &v + return s +} + +// Contains the run results requested by the device selection configuration +// as well as how many devices were returned. For an example of the JSON response +// syntax, see ScheduleRun. +type DeviceSelectionResult struct { + _ struct{} `type:"structure"` + + // The filters in a device selection result. + Filters []*DeviceFilter `locationName:"filters" type:"list"` + + // The number of devices that matched the device filter selection criteria. + MatchedDevicesCount *int64 `locationName:"matchedDevicesCount" type:"integer"` + + // The maximum number of devices to be selected by a device filter and included + // in a test run. + MaxDevices *int64 `locationName:"maxDevices" type:"integer"` +} + +// String returns the string representation +func (s DeviceSelectionResult) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeviceSelectionResult) GoString() string { + return s.String() +} + +// SetFilters sets the Filters field's value. +func (s *DeviceSelectionResult) SetFilters(v []*DeviceFilter) *DeviceSelectionResult { + s.Filters = v + return s +} + +// SetMatchedDevicesCount sets the MatchedDevicesCount field's value. +func (s *DeviceSelectionResult) SetMatchedDevicesCount(v int64) *DeviceSelectionResult { + s.MatchedDevicesCount = &v + return s +} + +// SetMaxDevices sets the MaxDevices field's value. +func (s *DeviceSelectionResult) SetMaxDevices(v int64) *DeviceSelectionResult { + s.MaxDevices = &v + return s +} + // Represents configuration information about a test run, such as the execution // timeout (in minutes). type ExecutionConfiguration struct { @@ -8981,11 +9329,19 @@ type GetDevicePoolCompatibilityInput struct { // // * APPIUM_PYTHON: The Appium Python type. // - // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for Web apps. + // * APPIUM_NODE: The Appium Node.js type. + // + // * APPIUM_RUBY: The Appium Ruby type. + // + // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for web apps. // - // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for Web apps. + // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for web apps. // - // * APPIUM_WEB_PYTHON: The Appium Python type for Web apps. + // * APPIUM_WEB_PYTHON: The Appium Python type for web apps. + // + // * APPIUM_WEB_NODE: The Appium Node.js type for web apps. + // + // * APPIUM_WEB_RUBY: The Appium Ruby type for web apps. // // * CALABASH: The Calabash type. // @@ -10210,11 +10566,19 @@ type Job struct { // // * APPIUM_PYTHON: The Appium Python type. // - // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for Web apps. + // * APPIUM_NODE: The Appium Node.js type. + // + // * APPIUM_RUBY: The Appium Ruby type. + // + // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for web apps. + // + // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for web apps. // - // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for Web apps. + // * APPIUM_WEB_PYTHON: The Appium Python type for web apps. // - // * APPIUM_WEB_PYTHON: The Appium Python type for Web apps. + // * APPIUM_WEB_NODE: The Appium Node.js type for web apps. + // + // * APPIUM_WEB_RUBY: The Appium Ruby test type for web apps. // // * CALABASH: The Calabash type. // @@ -10642,6 +11006,63 @@ type ListDevicesInput struct { // The Amazon Resource Name (ARN) of the project. Arn *string `locationName:"arn" min:"32" type:"string"` + // Used to select a set of devices. A filter is made up of an attribute, an + // operator, and one or more values. + // + // * Attribute: The aspect of a device such as platform or model used as + // the selction criteria in a device filter. + // + // Allowed values include: + // + // ARN: The Amazon Resource Name (ARN) of the device. For example, "arn:aws:devicefarm:us-west-2::device:12345Example". + // + // PLATFORM: The device platform. Valid values are "ANDROID" or "IOS". + // + // OS_VERSION: The operating system version. For example, "10.3.2". + // + // MODEL: The device model. For example, "iPad 5th Gen". + // + // AVAILABILITY: The current availability of the device. Valid values are "AVAILABLE", + // "HIGHLY_AVAILABLE", "BUSY", or "TEMPORARY_NOT_AVAILABLE". + // + // FORM_FACTOR: The device form factor. Valid values are "PHONE" or "TABLET". + // + // MANUFACTURER: The device manufacturer. For example, "Apple". + // + // REMOTE_ACCESS_ENABLED: Whether the device is enabled for remote access. Valid + // values are "TRUE" or "FALSE". + // + // REMOTE_DEBUG_ENABLED: Whether the device is enabled for remote debugging. + // Valid values are "TRUE" or "FALSE". + // + // INSTANCE_ARN: The Amazon Resource Name (ARN) of the device instance. + // + // INSTANCE_LABELS: The label of the device instance. + // + // FLEET_TYPE: The fleet type. Valid values are "PUBLIC" or "PRIVATE". + // + // * Operator: The filter operator. + // + // The EQUALS operator is available for every attribute except INSTANCE_LABELS. + // + // The CONTAINS operator is available for the INSTANCE_LABELS and MODEL attributes. + // + // The IN and NOT_IN operators are available for the ARN, OS_VERSION, MODEL, + // MANUFACTURER, and INSTANCE_ARN attributes. + // + // The LESS_THAN, GREATER_THAN, LESS_THAN_OR_EQUALS, and GREATER_THAN_OR_EQUALS + // operators are also available for the OS_VERSION attribute. + // + // * Values: An array of one or more filter values. + // + // The IN and NOT_IN operators take a values array that has one or more elements. + // + // The other operators require an array with a single element. + // + // In a request, the AVAILABILITY attribute takes "AVAILABLE", "HIGHLY_AVAILABLE", + // "BUSY", or "TEMPORARY_NOT_AVAILABLE" as values. + Filters []*DeviceFilter `locationName:"filters" type:"list"` + // An identifier that was returned from the previous call to this operation, // which can be used to return the next set of items in the list. NextToken *string `locationName:"nextToken" min:"4" type:"string"` @@ -10679,6 +11100,12 @@ func (s *ListDevicesInput) SetArn(v string) *ListDevicesInput { return s } +// SetFilters sets the Filters field's value. +func (s *ListDevicesInput) SetFilters(v []*DeviceFilter) *ListDevicesInput { + s.Filters = v + return s +} + // SetNextToken sets the NextToken field's value. func (s *ListDevicesInput) SetNextToken(v string) *ListDevicesInput { s.NextToken = &v @@ -11477,8 +11904,7 @@ func (s *ListRunsOutput) SetRuns(v []*Run) *ListRunsOutput { type ListSamplesInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the project for which you want to list - // samples. + // The Amazon Resource Name (ARN) of the job used to list samples. // // Arn is a required field Arn *string `locationName:"arn" min:"32" type:"string" required:"true"` @@ -11883,13 +12309,24 @@ type ListUploadsInput struct { // // * APPIUM_PYTHON_TEST_PACKAGE: An Appium Python test package upload. // + // * APPIUM_NODE_TEST_PACKAGE: An Appium Node.js test package upload. + // + // * APPIUM_RUBY_TEST_PACKAGE: An Appium Ruby test package upload. + // // * APPIUM_WEB_JAVA_JUNIT_TEST_PACKAGE: An Appium Java JUnit test package - // upload. + // upload for a web app. // // * APPIUM_WEB_JAVA_TESTNG_TEST_PACKAGE: An Appium Java TestNG test package - // upload. + // upload for a web app. + // + // * APPIUM_WEB_PYTHON_TEST_PACKAGE: An Appium Python test package upload + // for a web app. // - // * APPIUM_WEB_PYTHON_TEST_PACKAGE: An Appium Python test package upload. + // * APPIUM_WEB_NODE_TEST_PACKAGE: An Appium Node.js test package upload + // for a web app. + // + // * APPIUM_WEB_RUBY_TEST_PACKAGE: An Appium Ruby test package upload for + // a web app. // // * CALABASH_TEST_PACKAGE: A Calabash test package upload. // @@ -11909,11 +12346,24 @@ type ListUploadsInput struct { // // * APPIUM_PYTHON_TEST_SPEC: An Appium Python test spec upload. // - // * APPIUM_WEB_JAVA_JUNIT_TEST_SPEC: An Appium Java JUnit test spec upload. + // * APPIUM_NODE_TEST_SPEC: An Appium Node.js test spec upload. + // + // * APPIUM_RUBY_TEST_SPEC: An Appium Ruby test spec upload. // - // * APPIUM_WEB_JAVA_TESTNG_TEST_SPEC: An Appium Java TestNG test spec upload. + // * APPIUM_WEB_JAVA_JUNIT_TEST_SPEC: An Appium Java JUnit test spec upload + // for a web app. // - // * APPIUM_WEB_PYTHON_TEST_SPEC: An Appium Python test spec upload. + // * APPIUM_WEB_JAVA_TESTNG_TEST_SPEC: An Appium Java TestNG test spec upload + // for a web app. + // + // * APPIUM_WEB_PYTHON_TEST_SPEC: An Appium Python test spec upload for a + // web app. + // + // * APPIUM_WEB_NODE_TEST_SPEC: An Appium Node.js test spec upload for a + // web app. + // + // * APPIUM_WEB_RUBY_TEST_SPEC: An Appium Ruby test spec upload for a web + // app. // // * INSTRUMENTATION_TEST_SPEC: An instrumentation test spec upload. // @@ -13217,29 +13667,37 @@ func (s *Resolution) SetWidth(v int64) *Resolution { return s } -// Represents a condition for a device pool. +// Represents a condition for a device pool. It is passed in as the rules parameter +// to CreateDevicePool and UpdateDevicePool. type Rule struct { _ struct{} `type:"structure"` - // The rule's stringified attribute. For example, specify the value as "\"abc\"". + // The rule's attribute. It is the aspect of a device such as platform or model + // used as selection criteria to create or update a device pool. // // Allowed values include: // - // * ARN: The ARN. + // * ARN: The Amazon Resource Name (ARN) of a device. For example, "arn:aws:devicefarm:us-west-2::device:12345Example". // - // * FORM_FACTOR: The form factor (for example, phone or tablet). + // * PLATFORM: The device platform. Valid values are "ANDROID" or "IOS". // - // * MANUFACTURER: The manufacturer. + // * FORM_FACTOR: The device form factor. Valid values are "PHONE" or "TABLET". // - // * PLATFORM: The platform (for example, Android or iOS). + // * MANUFACTURER: The device manufacturer. For example, "Apple". // // * REMOTE_ACCESS_ENABLED: Whether the device is enabled for remote access. + // Valid values are "TRUE" or "FALSE". + // + // * REMOTE_DEBUG_ENABLED: Whether the device is enabled for remote debugging. + // Valid values are "TRUE" or "FALSE". // // * APPIUM_VERSION: The Appium version for the test. // // * INSTANCE_ARN: The Amazon Resource Name (ARN) of the device instance. // // * INSTANCE_LABELS: The label of the device instance. + // + // * FLEET_TYPE: The fleet type. Valid values are "PUBLIC" or "PRIVATE". Attribute *string `locationName:"attribute" type:"string" enum:"DeviceAttribute"` // The rule's operator. @@ -13258,6 +13716,12 @@ type Rule struct { Operator *string `locationName:"operator" type:"string" enum:"RuleOperator"` // The rule's value. + // + // The value must be passed in as a string using escaped quotes. + // + // For example: + // + // "value": "\"ANDROID\"" Value *string `locationName:"value" type:"string"` } @@ -13322,6 +13786,9 @@ type Run struct { // The ARN of the device pool for the run. DevicePoolArn *string `locationName:"devicePoolArn" min:"32" type:"string"` + // The results of a device filter used to select the devices for a test run. + DeviceSelectionResult *DeviceSelectionResult `locationName:"deviceSelectionResult" type:"structure"` + // For fuzz tests, this is the number of events, between 1 and 10000, that the // UI fuzz test should perform. EventCount *int64 `locationName:"eventCount" type:"integer"` @@ -13448,11 +13915,19 @@ type Run struct { // // * APPIUM_PYTHON: The Appium Python type. // - // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for Web apps. + // * APPIUM_NODE: The Appium Node.js type. + // + // * APPIUM_RUBY: The Appium Ruby type. + // + // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for web apps. // - // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for Web apps. + // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for web apps. // - // * APPIUM_WEB_PYTHON: The Appium Python type for Web apps. + // * APPIUM_WEB_PYTHON: The Appium Python type for web apps. + // + // * APPIUM_WEB_NODE: The Appium Node.js type for web apps. + // + // * APPIUM_WEB_RUBY: The Appium Ruby type for web apps. // // * CALABASH: The Calabash type. // @@ -13535,6 +14010,12 @@ func (s *Run) SetDevicePoolArn(v string) *Run { return s } +// SetDeviceSelectionResult sets the DeviceSelectionResult field's value. +func (s *Run) SetDeviceSelectionResult(v *DeviceSelectionResult) *Run { + s.DeviceSelectionResult = v + return s +} + // SetEventCount sets the EventCount field's value. func (s *Run) SetEventCount(v int64) *Run { s.EventCount = &v @@ -13878,8 +14359,14 @@ type ScheduleRunInput struct { // The ARN of the device pool for the run to be scheduled. // - // DevicePoolArn is a required field - DevicePoolArn *string `locationName:"devicePoolArn" min:"32" type:"string" required:"true"` + // Either devicePoolArn or deviceSelectionConfiguration is required in a request. + DevicePoolArn *string `locationName:"devicePoolArn" min:"32" type:"string"` + + // The filter criteria used to dynamically select a set of devices for a test + // run, as well as the maximum number of devices to be included in the run. + // + // Either devicePoolArn or deviceSelectionConfiguration is required in a request. + DeviceSelectionConfiguration *DeviceSelectionConfiguration `locationName:"deviceSelectionConfiguration" type:"structure"` // Specifies configuration information about a test run, such as the execution // timeout (in minutes). @@ -13915,9 +14402,6 @@ func (s *ScheduleRunInput) Validate() error { if s.AppArn != nil && len(*s.AppArn) < 32 { invalidParams.Add(request.NewErrParamMinLen("AppArn", 32)) } - if s.DevicePoolArn == nil { - invalidParams.Add(request.NewErrParamRequired("DevicePoolArn")) - } if s.DevicePoolArn != nil && len(*s.DevicePoolArn) < 32 { invalidParams.Add(request.NewErrParamMinLen("DevicePoolArn", 32)) } @@ -13935,6 +14419,11 @@ func (s *ScheduleRunInput) Validate() error { invalidParams.AddNested("Configuration", err.(request.ErrInvalidParams)) } } + if s.DeviceSelectionConfiguration != nil { + if err := s.DeviceSelectionConfiguration.Validate(); err != nil { + invalidParams.AddNested("DeviceSelectionConfiguration", err.(request.ErrInvalidParams)) + } + } if s.Test != nil { if err := s.Test.Validate(); err != nil { invalidParams.AddNested("Test", err.(request.ErrInvalidParams)) @@ -13965,6 +14454,12 @@ func (s *ScheduleRunInput) SetDevicePoolArn(v string) *ScheduleRunInput { return s } +// SetDeviceSelectionConfiguration sets the DeviceSelectionConfiguration field's value. +func (s *ScheduleRunInput) SetDeviceSelectionConfiguration(v *DeviceSelectionConfiguration) *ScheduleRunInput { + s.DeviceSelectionConfiguration = v + return s +} + // SetExecutionConfiguration sets the ExecutionConfiguration field's value. func (s *ScheduleRunInput) SetExecutionConfiguration(v *ExecutionConfiguration) *ScheduleRunInput { s.ExecutionConfiguration = v @@ -14013,15 +14508,21 @@ func (s *ScheduleRunOutput) SetRun(v *Run) *ScheduleRunOutput { return s } -// Represents additional test settings. +// Represents test settings. This data structure is passed in as the test parameter +// to ScheduleRun. For an example of the JSON request syntax, see ScheduleRun. type ScheduleRunTest struct { _ struct{} `type:"structure"` // The test's filter. Filter *string `locationName:"filter" type:"string"` - // The test's parameters, such as the following test framework parameters and - // fixture settings: + // The test's parameters, such as test framework parameters and fixture settings. + // Parameters are represented by name-value pairs of strings. + // + // For all tests: + // + // * app_performance_monitoring: Performance monitoring is enabled by default. + // Set this parameter to "false" to disable it. // // For Calabash tests: // @@ -14032,14 +14533,14 @@ type ScheduleRunTest struct { // // For Appium tests (all types): // - // * appium_version: The Appium version. Currently supported values are "1.4.16", - // "1.6.3", "latest", and "default". + // * appium_version: The Appium version. Currently supported values are "1.6.5" + // (and higher), "latest", and "default". // - // “latest” will run the latest Appium version supported by Device Farm (1.6.3). + // “latest” will run the latest Appium version supported by Device Farm (1.9.1). // // For “default”, Device Farm will choose a compatible version of Appium for - // the device. The current behavior is to run 1.4.16 on Android devices and - // iOS 9 and earlier, 1.6.3 for iOS 10 and later. + // the device. The current behavior is to run 1.7.2 on Android devices and + // iOS 9 and earlier, 1.7.2 for iOS 10 and later. // // This behavior is subject to change. // @@ -14117,11 +14618,19 @@ type ScheduleRunTest struct { // // * APPIUM_PYTHON: The Appium Python type. // - // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for Web apps. + // * APPIUM_NODE: The Appium Node.js type. + // + // * APPIUM_RUBY: The Appium Ruby type. // - // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for Web apps. + // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for web apps. // - // * APPIUM_WEB_PYTHON: The Appium Python type for Web apps. + // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for web apps. + // + // * APPIUM_WEB_PYTHON: The Appium Python type for web apps. + // + // * APPIUM_WEB_NODE: The Appium Node.js type for web apps. + // + // * APPIUM_WEB_RUBY: The Appium Ruby type for web apps. // // * CALABASH: The Calabash type. // @@ -14484,11 +14993,19 @@ type Suite struct { // // * APPIUM_PYTHON: The Appium Python type. // - // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for Web apps. + // * APPIUM_NODE: The Appium Node.js type. + // + // * APPIUM_RUBY: The Appium Ruby type. + // + // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for web apps. // - // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for Web apps. + // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for web apps. // - // * APPIUM_WEB_PYTHON: The Appium Python type for Web apps. + // * APPIUM_WEB_PYTHON: The Appium Python type for web apps. + // + // * APPIUM_WEB_NODE: The Appium Node.js type for web apps. + // + // * APPIUM_WEB_RUBY: The Appium Ruby type for web apps. // // * CALABASH: The Calabash type. // @@ -14666,11 +15183,19 @@ type Test struct { // // * APPIUM_PYTHON: The Appium Python type. // - // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for Web apps. + // * APPIUM_NODE: The Appium Node.js type. + // + // * APPIUM_RUBY: The Appium Ruby type. + // + // * APPIUM_WEB_JAVA_JUNIT: The Appium Java JUnit type for web apps. + // + // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for web apps. // - // * APPIUM_WEB_JAVA_TESTNG: The Appium Java TestNG type for Web apps. + // * APPIUM_WEB_PYTHON: The Appium Python type for web apps. // - // * APPIUM_WEB_PYTHON: The Appium Python type for Web apps. + // * APPIUM_WEB_NODE: The Appium Node.js type for web apps. + // + // * APPIUM_WEB_RUBY: The Appium Ruby type for web apps. // // * CALABASH: The Calabash type. // @@ -15638,13 +16163,24 @@ type Upload struct { // // * APPIUM_PYTHON_TEST_PACKAGE: An Appium Python test package upload. // + // * APPIUM_NODE_TEST_PACKAGE: An Appium Node.js test package upload. + // + // * APPIUM_RUBY_TEST_PACKAGE: An Appium Ruby test package upload. + // // * APPIUM_WEB_JAVA_JUNIT_TEST_PACKAGE: An Appium Java JUnit test package - // upload. + // upload for web apps. // // * APPIUM_WEB_JAVA_TESTNG_TEST_PACKAGE: An Appium Java TestNG test package - // upload. + // upload for web apps. // - // * APPIUM_WEB_PYTHON_TEST_PACKAGE: An Appium Python test package upload. + // * APPIUM_WEB_PYTHON_TEST_PACKAGE: An Appium Python test package upload + // for web apps. + // + // * APPIUM_WEB_NODE_TEST_PACKAGE: An Appium Node.js test package upload + // for web apps. + // + // * APPIUM_WEB_RUBY_TEST_PACKAGE: An Appium Ruby test package upload for + // web apps. // // * CALABASH_TEST_PACKAGE: A Calabash test package upload. // @@ -15657,6 +16193,35 @@ type Upload struct { // * XCTEST_TEST_PACKAGE: An XCode test package upload. // // * XCTEST_UI_TEST_PACKAGE: An XCode UI test package upload. + // + // * APPIUM_JAVA_JUNIT_TEST_SPEC: An Appium Java JUnit test spec upload. + // + // * APPIUM_JAVA_TESTNG_TEST_SPEC: An Appium Java TestNG test spec upload. + // + // * APPIUM_PYTHON_TEST_SPEC: An Appium Python test spec upload. + // + // * APPIUM_NODE_TEST_SPEC: An Appium Node.js test spec upload. + // + // * APPIUM_RUBY_TEST_SPEC: An Appium Ruby test spec upload. + // + // * APPIUM_WEB_JAVA_JUNIT_TEST_SPEC: An Appium Java JUnit test spec upload + // for a web app. + // + // * APPIUM_WEB_JAVA_TESTNG_TEST_SPEC: An Appium Java TestNG test spec upload + // for a web app. + // + // * APPIUM_WEB_PYTHON_TEST_SPEC: An Appium Python test spec upload for a + // web app. + // + // * APPIUM_WEB_NODE_TEST_SPEC: An Appium Node.js test spec upload for a + // web app. + // + // * APPIUM_WEB_RUBY_TEST_SPEC: An Appium Ruby test spec upload for a web + // app. + // + // * INSTRUMENTATION_TEST_SPEC: An instrumentation test spec upload. + // + // * XCTEST_UI_TEST_SPEC: An XCode UI test spec upload. Type *string `locationName:"type" type:"string" enum:"UploadType"` // The pre-signed Amazon S3 URL that was used to store a file through a corresponding @@ -15939,6 +16504,84 @@ const ( DeviceAttributeFleetType = "FLEET_TYPE" ) +const ( + // DeviceAvailabilityTemporaryNotAvailable is a DeviceAvailability enum value + DeviceAvailabilityTemporaryNotAvailable = "TEMPORARY_NOT_AVAILABLE" + + // DeviceAvailabilityBusy is a DeviceAvailability enum value + DeviceAvailabilityBusy = "BUSY" + + // DeviceAvailabilityAvailable is a DeviceAvailability enum value + DeviceAvailabilityAvailable = "AVAILABLE" + + // DeviceAvailabilityHighlyAvailable is a DeviceAvailability enum value + DeviceAvailabilityHighlyAvailable = "HIGHLY_AVAILABLE" +) + +const ( + // DeviceFilterAttributeArn is a DeviceFilterAttribute enum value + DeviceFilterAttributeArn = "ARN" + + // DeviceFilterAttributePlatform is a DeviceFilterAttribute enum value + DeviceFilterAttributePlatform = "PLATFORM" + + // DeviceFilterAttributeOsVersion is a DeviceFilterAttribute enum value + DeviceFilterAttributeOsVersion = "OS_VERSION" + + // DeviceFilterAttributeModel is a DeviceFilterAttribute enum value + DeviceFilterAttributeModel = "MODEL" + + // DeviceFilterAttributeAvailability is a DeviceFilterAttribute enum value + DeviceFilterAttributeAvailability = "AVAILABILITY" + + // DeviceFilterAttributeFormFactor is a DeviceFilterAttribute enum value + DeviceFilterAttributeFormFactor = "FORM_FACTOR" + + // DeviceFilterAttributeManufacturer is a DeviceFilterAttribute enum value + DeviceFilterAttributeManufacturer = "MANUFACTURER" + + // DeviceFilterAttributeRemoteAccessEnabled is a DeviceFilterAttribute enum value + DeviceFilterAttributeRemoteAccessEnabled = "REMOTE_ACCESS_ENABLED" + + // DeviceFilterAttributeRemoteDebugEnabled is a DeviceFilterAttribute enum value + DeviceFilterAttributeRemoteDebugEnabled = "REMOTE_DEBUG_ENABLED" + + // DeviceFilterAttributeInstanceArn is a DeviceFilterAttribute enum value + DeviceFilterAttributeInstanceArn = "INSTANCE_ARN" + + // DeviceFilterAttributeInstanceLabels is a DeviceFilterAttribute enum value + DeviceFilterAttributeInstanceLabels = "INSTANCE_LABELS" + + // DeviceFilterAttributeFleetType is a DeviceFilterAttribute enum value + DeviceFilterAttributeFleetType = "FLEET_TYPE" +) + +const ( + // DeviceFilterOperatorEquals is a DeviceFilterOperator enum value + DeviceFilterOperatorEquals = "EQUALS" + + // DeviceFilterOperatorLessThan is a DeviceFilterOperator enum value + DeviceFilterOperatorLessThan = "LESS_THAN" + + // DeviceFilterOperatorLessThanOrEquals is a DeviceFilterOperator enum value + DeviceFilterOperatorLessThanOrEquals = "LESS_THAN_OR_EQUALS" + + // DeviceFilterOperatorGreaterThan is a DeviceFilterOperator enum value + DeviceFilterOperatorGreaterThan = "GREATER_THAN" + + // DeviceFilterOperatorGreaterThanOrEquals is a DeviceFilterOperator enum value + DeviceFilterOperatorGreaterThanOrEquals = "GREATER_THAN_OR_EQUALS" + + // DeviceFilterOperatorIn is a DeviceFilterOperator enum value + DeviceFilterOperatorIn = "IN" + + // DeviceFilterOperatorNotIn is a DeviceFilterOperator enum value + DeviceFilterOperatorNotIn = "NOT_IN" + + // DeviceFilterOperatorContains is a DeviceFilterOperator enum value + DeviceFilterOperatorContains = "CONTAINS" +) + const ( // DeviceFormFactorPhone is a DeviceFormFactor enum value DeviceFormFactorPhone = "PHONE" @@ -16169,6 +16812,12 @@ const ( // TestTypeAppiumPython is a TestType enum value TestTypeAppiumPython = "APPIUM_PYTHON" + // TestTypeAppiumNode is a TestType enum value + TestTypeAppiumNode = "APPIUM_NODE" + + // TestTypeAppiumRuby is a TestType enum value + TestTypeAppiumRuby = "APPIUM_RUBY" + // TestTypeAppiumWebJavaJunit is a TestType enum value TestTypeAppiumWebJavaJunit = "APPIUM_WEB_JAVA_JUNIT" @@ -16178,6 +16827,12 @@ const ( // TestTypeAppiumWebPython is a TestType enum value TestTypeAppiumWebPython = "APPIUM_WEB_PYTHON" + // TestTypeAppiumWebNode is a TestType enum value + TestTypeAppiumWebNode = "APPIUM_WEB_NODE" + + // TestTypeAppiumWebRuby is a TestType enum value + TestTypeAppiumWebRuby = "APPIUM_WEB_RUBY" + // TestTypeCalabash is a TestType enum value TestTypeCalabash = "CALABASH" @@ -16247,6 +16902,12 @@ const ( // UploadTypeAppiumPythonTestPackage is a UploadType enum value UploadTypeAppiumPythonTestPackage = "APPIUM_PYTHON_TEST_PACKAGE" + // UploadTypeAppiumNodeTestPackage is a UploadType enum value + UploadTypeAppiumNodeTestPackage = "APPIUM_NODE_TEST_PACKAGE" + + // UploadTypeAppiumRubyTestPackage is a UploadType enum value + UploadTypeAppiumRubyTestPackage = "APPIUM_RUBY_TEST_PACKAGE" + // UploadTypeAppiumWebJavaJunitTestPackage is a UploadType enum value UploadTypeAppiumWebJavaJunitTestPackage = "APPIUM_WEB_JAVA_JUNIT_TEST_PACKAGE" @@ -16256,6 +16917,12 @@ const ( // UploadTypeAppiumWebPythonTestPackage is a UploadType enum value UploadTypeAppiumWebPythonTestPackage = "APPIUM_WEB_PYTHON_TEST_PACKAGE" + // UploadTypeAppiumWebNodeTestPackage is a UploadType enum value + UploadTypeAppiumWebNodeTestPackage = "APPIUM_WEB_NODE_TEST_PACKAGE" + + // UploadTypeAppiumWebRubyTestPackage is a UploadType enum value + UploadTypeAppiumWebRubyTestPackage = "APPIUM_WEB_RUBY_TEST_PACKAGE" + // UploadTypeCalabashTestPackage is a UploadType enum value UploadTypeCalabashTestPackage = "CALABASH_TEST_PACKAGE" @@ -16283,6 +16950,12 @@ const ( // UploadTypeAppiumPythonTestSpec is a UploadType enum value UploadTypeAppiumPythonTestSpec = "APPIUM_PYTHON_TEST_SPEC" + // UploadTypeAppiumNodeTestSpec is a UploadType enum value + UploadTypeAppiumNodeTestSpec = "APPIUM_NODE_TEST_SPEC" + + // UploadTypeAppiumRubyTestSpec is a UploadType enum value + UploadTypeAppiumRubyTestSpec = "APPIUM_RUBY_TEST_SPEC" + // UploadTypeAppiumWebJavaJunitTestSpec is a UploadType enum value UploadTypeAppiumWebJavaJunitTestSpec = "APPIUM_WEB_JAVA_JUNIT_TEST_SPEC" @@ -16292,6 +16965,12 @@ const ( // UploadTypeAppiumWebPythonTestSpec is a UploadType enum value UploadTypeAppiumWebPythonTestSpec = "APPIUM_WEB_PYTHON_TEST_SPEC" + // UploadTypeAppiumWebNodeTestSpec is a UploadType enum value + UploadTypeAppiumWebNodeTestSpec = "APPIUM_WEB_NODE_TEST_SPEC" + + // UploadTypeAppiumWebRubyTestSpec is a UploadType enum value + UploadTypeAppiumWebRubyTestSpec = "APPIUM_WEB_RUBY_TEST_SPEC" + // UploadTypeInstrumentationTestSpec is a UploadType enum value UploadTypeInstrumentationTestSpec = "INSTRUMENTATION_TEST_SPEC" diff --git a/vendor/github.com/aws/aws-sdk-go/service/directconnect/api.go b/vendor/github.com/aws/aws-sdk-go/service/directconnect/api.go index 779e140921..244425bd46 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/directconnect/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/directconnect/api.go @@ -9,6 +9,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) const opAllocateConnectionOnInterconnect = "AllocateConnectionOnInterconnect" @@ -16,7 +18,7 @@ const opAllocateConnectionOnInterconnect = "AllocateConnectionOnInterconnect" // AllocateConnectionOnInterconnectRequest generates a "aws/request.Request" representing the // client's request for the AllocateConnectionOnInterconnect operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -60,14 +62,14 @@ func (c *DirectConnect) AllocateConnectionOnInterconnectRequest(input *AllocateC // AllocateConnectionOnInterconnect API operation for AWS Direct Connect. // -// Deprecated in favor of AllocateHostedConnection. +// Deprecated. Use AllocateHostedConnection instead. // // Creates a hosted connection on an interconnect. // // Allocates a VLAN number and a specified amount of bandwidth for use by a -// hosted connection on the given interconnect. +// hosted connection on the specified interconnect. // -// This is intended for use by AWS Direct Connect partners only. +// Intended for use by AWS Direct Connect partners only. // // 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 @@ -78,12 +80,10 @@ func (c *DirectConnect) AllocateConnectionOnInterconnectRequest(input *AllocateC // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AllocateConnectionOnInterconnect // @@ -116,7 +116,7 @@ const opAllocateHostedConnection = "AllocateHostedConnection" // AllocateHostedConnectionRequest generates a "aws/request.Request" representing the // client's request for the AllocateHostedConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -155,13 +155,13 @@ func (c *DirectConnect) AllocateHostedConnectionRequest(input *AllocateHostedCon // AllocateHostedConnection API operation for AWS Direct Connect. // -// Creates a hosted connection on an interconnect or a link aggregation group -// (LAG). +// Creates a hosted connection on the specified interconnect or a link aggregation +// group (LAG). // // Allocates a VLAN number and a specified amount of bandwidth for use by a -// hosted connection on the given interconnect or LAG. +// hosted connection on the specified interconnect or LAG. // -// This is intended for use by AWS Direct Connect partners only. +// Intended for use by AWS Direct Connect partners only. // // 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 @@ -172,12 +172,10 @@ func (c *DirectConnect) AllocateHostedConnectionRequest(input *AllocateHostedCon // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AllocateHostedConnection func (c *DirectConnect) AllocateHostedConnection(input *AllocateHostedConnectionInput) (*Connection, error) { @@ -206,7 +204,7 @@ const opAllocatePrivateVirtualInterface = "AllocatePrivateVirtualInterface" // AllocatePrivateVirtualInterfaceRequest generates a "aws/request.Request" representing the // client's request for the AllocatePrivateVirtualInterface operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -245,12 +243,11 @@ func (c *DirectConnect) AllocatePrivateVirtualInterfaceRequest(input *AllocatePr // AllocatePrivateVirtualInterface API operation for AWS Direct Connect. // -// Provisions a private virtual interface to be owned by another AWS customer. +// Provisions a private virtual interface to be owned by the specified AWS account. // -// Virtual interfaces created using this action must be confirmed by the virtual -// interface owner by using the ConfirmPrivateVirtualInterface action. Until -// then, the virtual interface will be in 'Confirming' state, and will not be -// available for handling traffic. +// Virtual interfaces created using this action must be confirmed by the owner +// using ConfirmPrivateVirtualInterface. Until then, the virtual interface is +// in the Confirming state and is not available to handle traffic. // // 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 @@ -261,12 +258,10 @@ func (c *DirectConnect) AllocatePrivateVirtualInterfaceRequest(input *AllocatePr // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AllocatePrivateVirtualInterface func (c *DirectConnect) AllocatePrivateVirtualInterface(input *AllocatePrivateVirtualInterfaceInput) (*VirtualInterface, error) { @@ -295,7 +290,7 @@ const opAllocatePublicVirtualInterface = "AllocatePublicVirtualInterface" // AllocatePublicVirtualInterfaceRequest generates a "aws/request.Request" representing the // client's request for the AllocatePublicVirtualInterface operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -334,19 +329,19 @@ func (c *DirectConnect) AllocatePublicVirtualInterfaceRequest(input *AllocatePub // AllocatePublicVirtualInterface API operation for AWS Direct Connect. // -// Provisions a public virtual interface to be owned by a different customer. +// Provisions a public virtual interface to be owned by the specified AWS account. // // The owner of a connection calls this function to provision a public virtual -// interface which will be owned by another AWS customer. +// interface to be owned by the specified AWS account. // -// Virtual interfaces created using this function must be confirmed by the virtual -// interface owner by calling ConfirmPublicVirtualInterface. Until this step -// has been completed, the virtual interface will be in 'Confirming' state, -// and will not be available for handling traffic. +// Virtual interfaces created using this function must be confirmed by the owner +// using ConfirmPublicVirtualInterface. Until this step has been completed, +// the virtual interface is in the confirming state and is not available to +// handle traffic. // -// When creating an IPv6 public virtual interface (addressFamily is 'ipv6'), -// the customer and amazon address fields should be left blank to use auto-assigned -// IPv6 space. Custom IPv6 Addresses are currently not supported. +// When creating an IPv6 public virtual interface, omit the Amazon address and +// customer address. IPv6 addresses are automatically assigned from the Amazon +// pool of IPv6 addresses; you cannot specify custom IPv6 addresses. // // 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 @@ -357,12 +352,10 @@ func (c *DirectConnect) AllocatePublicVirtualInterfaceRequest(input *AllocatePub // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AllocatePublicVirtualInterface func (c *DirectConnect) AllocatePublicVirtualInterface(input *AllocatePublicVirtualInterfaceInput) (*VirtualInterface, error) { @@ -391,7 +384,7 @@ const opAssociateConnectionWithLag = "AssociateConnectionWithLag" // AssociateConnectionWithLagRequest generates a "aws/request.Request" representing the // client's request for the AssociateConnectionWithLag operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -432,12 +425,12 @@ func (c *DirectConnect) AssociateConnectionWithLagRequest(input *AssociateConnec // // Associates an existing connection with a link aggregation group (LAG). The // connection is interrupted and re-established as a member of the LAG (connectivity -// to AWS will be interrupted). The connection must be hosted on the same AWS -// Direct Connect endpoint as the LAG, and its bandwidth must match the bandwidth -// for the LAG. You can reassociate a connection that's currently associated -// with a different LAG; however, if removing the connection will cause the -// original LAG to fall below its setting for minimum number of operational -// connections, the request fails. +// to AWS is interrupted). The connection must be hosted on the same AWS Direct +// Connect endpoint as the LAG, and its bandwidth must match the bandwidth for +// the LAG. You can re-associate a connection that's currently associated with +// a different LAG; however, if removing the connection would cause the original +// LAG to fall below its setting for minimum number of operational connections, +// the request fails. // // Any virtual interfaces that are directly associated with the connection are // automatically re-associated with the LAG. If the connection was originally @@ -457,12 +450,10 @@ func (c *DirectConnect) AssociateConnectionWithLagRequest(input *AssociateConnec // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AssociateConnectionWithLag func (c *DirectConnect) AssociateConnectionWithLag(input *AssociateConnectionWithLagInput) (*Connection, error) { @@ -491,7 +482,7 @@ const opAssociateHostedConnection = "AssociateHostedConnection" // AssociateHostedConnectionRequest generates a "aws/request.Request" representing the // client's request for the AssociateHostedConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -536,7 +527,7 @@ func (c *DirectConnect) AssociateHostedConnectionRequest(input *AssociateHostedC // fails. This action temporarily interrupts the hosted connection's connectivity // to AWS as it is being migrated. // -// This is intended for use by AWS Direct Connect partners only. +// Intended for use by AWS Direct Connect partners only. // // 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 @@ -547,12 +538,10 @@ func (c *DirectConnect) AssociateHostedConnectionRequest(input *AssociateHostedC // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AssociateHostedConnection func (c *DirectConnect) AssociateHostedConnection(input *AssociateHostedConnectionInput) (*Connection, error) { @@ -581,7 +570,7 @@ const opAssociateVirtualInterface = "AssociateVirtualInterface" // AssociateVirtualInterfaceRequest generates a "aws/request.Request" representing the // client's request for the AssociateVirtualInterface operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -630,11 +619,10 @@ func (c *DirectConnect) AssociateVirtualInterfaceRequest(input *AssociateVirtual // with a LAG; hosted connections must be migrated along with their virtual // interfaces using AssociateHostedConnection. // -// In order to reassociate a virtual interface to a new connection or LAG, the -// requester must own either the virtual interface itself or the connection -// to which the virtual interface is currently associated. Additionally, the -// requester must own the connection or LAG to which the virtual interface will -// be newly associated. +// To reassociate a virtual interface to a new connection or LAG, the requester +// must own either the virtual interface itself or the connection to which the +// virtual interface is currently associated. Additionally, the requester must +// own the connection or LAG for the association. // // 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 @@ -645,12 +633,10 @@ func (c *DirectConnect) AssociateVirtualInterfaceRequest(input *AssociateVirtual // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/AssociateVirtualInterface func (c *DirectConnect) AssociateVirtualInterface(input *AssociateVirtualInterfaceInput) (*VirtualInterface, error) { @@ -679,7 +665,7 @@ const opConfirmConnection = "ConfirmConnection" // ConfirmConnectionRequest generates a "aws/request.Request" representing the // client's request for the ConfirmConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -718,11 +704,11 @@ func (c *DirectConnect) ConfirmConnectionRequest(input *ConfirmConnectionInput) // ConfirmConnection API operation for AWS Direct Connect. // -// Confirm the creation of a hosted connection on an interconnect. +// Confirms the creation of the specified hosted connection on an interconnect. // -// Upon creation, the hosted connection is initially in the 'Ordering' state, -// and will remain in this state until the owner calls ConfirmConnection to -// confirm creation of the hosted connection. +// Upon creation, the hosted connection is initially in the Ordering state, +// and remains in this state until the owner confirms creation of the hosted +// connection. // // 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 @@ -733,12 +719,10 @@ func (c *DirectConnect) ConfirmConnectionRequest(input *ConfirmConnectionInput) // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/ConfirmConnection func (c *DirectConnect) ConfirmConnection(input *ConfirmConnectionInput) (*ConfirmConnectionOutput, error) { @@ -767,7 +751,7 @@ const opConfirmPrivateVirtualInterface = "ConfirmPrivateVirtualInterface" // ConfirmPrivateVirtualInterfaceRequest generates a "aws/request.Request" representing the // client's request for the ConfirmPrivateVirtualInterface operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -806,11 +790,11 @@ func (c *DirectConnect) ConfirmPrivateVirtualInterfaceRequest(input *ConfirmPriv // ConfirmPrivateVirtualInterface API operation for AWS Direct Connect. // -// Accept ownership of a private virtual interface created by another customer. +// Accepts ownership of a private virtual interface created by another AWS account. // -// After the virtual interface owner calls this function, the virtual interface -// will be created and attached to the given virtual private gateway or direct -// connect gateway, and will be available for handling traffic. +// After the virtual interface owner makes this call, the virtual interface +// is created and attached to the specified virtual private gateway or Direct +// Connect gateway, and is made available to handle traffic. // // 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 @@ -821,12 +805,10 @@ func (c *DirectConnect) ConfirmPrivateVirtualInterfaceRequest(input *ConfirmPriv // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/ConfirmPrivateVirtualInterface func (c *DirectConnect) ConfirmPrivateVirtualInterface(input *ConfirmPrivateVirtualInterfaceInput) (*ConfirmPrivateVirtualInterfaceOutput, error) { @@ -855,7 +837,7 @@ const opConfirmPublicVirtualInterface = "ConfirmPublicVirtualInterface" // ConfirmPublicVirtualInterfaceRequest generates a "aws/request.Request" representing the // client's request for the ConfirmPublicVirtualInterface operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -894,10 +876,10 @@ func (c *DirectConnect) ConfirmPublicVirtualInterfaceRequest(input *ConfirmPubli // ConfirmPublicVirtualInterface API operation for AWS Direct Connect. // -// Accept ownership of a public virtual interface created by another customer. +// Accepts ownership of a public virtual interface created by another AWS account. // -// After the virtual interface owner calls this function, the specified virtual -// interface will be created and made available for handling traffic. +// After the virtual interface owner makes this call, the specified virtual +// interface is created and made available to handle traffic. // // 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 @@ -908,12 +890,10 @@ func (c *DirectConnect) ConfirmPublicVirtualInterfaceRequest(input *ConfirmPubli // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/ConfirmPublicVirtualInterface func (c *DirectConnect) ConfirmPublicVirtualInterface(input *ConfirmPublicVirtualInterfaceInput) (*ConfirmPublicVirtualInterfaceOutput, error) { @@ -942,7 +922,7 @@ const opCreateBGPPeer = "CreateBGPPeer" // CreateBGPPeerRequest generates a "aws/request.Request" representing the // client's request for the CreateBGPPeer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -981,16 +961,18 @@ func (c *DirectConnect) CreateBGPPeerRequest(input *CreateBGPPeerInput) (req *re // CreateBGPPeer API operation for AWS Direct Connect. // -// Creates a new BGP peer on a specified virtual interface. The BGP peer cannot -// be in the same address family (IPv4/IPv6) of an existing BGP peer on the -// virtual interface. +// Creates a BGP peer on the specified virtual interface. // -// You must create a BGP peer for the corresponding address family in order -// to access AWS resources that also use that address family. +// You must create a BGP peer for the corresponding address family (IPv4/IPv6) +// in order to access AWS resources that also use that address family. // -// When creating a IPv6 BGP peer, the Amazon address and customer address fields -// must be left blank. IPv6 addresses are automatically assigned from Amazon's -// pool of IPv6 addresses; you cannot specify custom IPv6 addresses. +// If logical redundancy is not supported by the connection, interconnect, or +// LAG, the BGP peer cannot be in the same address family as an existing BGP +// peer on the virtual interface. +// +// When creating a IPv6 BGP peer, omit the Amazon address and customer address. +// IPv6 addresses are automatically assigned from the Amazon pool of IPv6 addresses; +// you cannot specify custom IPv6 addresses. // // For a public virtual interface, the Autonomous System Number (ASN) must be // private or already whitelisted for the virtual interface. @@ -1004,12 +986,10 @@ func (c *DirectConnect) CreateBGPPeerRequest(input *CreateBGPPeerInput) (req *re // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateBGPPeer func (c *DirectConnect) CreateBGPPeer(input *CreateBGPPeerInput) (*CreateBGPPeerOutput, error) { @@ -1038,7 +1018,7 @@ const opCreateConnection = "CreateConnection" // CreateConnectionRequest generates a "aws/request.Request" representing the // client's request for the CreateConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1077,24 +1057,20 @@ func (c *DirectConnect) CreateConnectionRequest(input *CreateConnectionInput) (r // CreateConnection API operation for AWS Direct Connect. // -// Creates a new connection between the customer network and a specific AWS -// Direct Connect location. +// Creates a connection between a customer network and a specific AWS Direct +// Connect location. // // A connection links your internal network to an AWS Direct Connect location -// over a standard 1 gigabit or 10 gigabit Ethernet fiber-optic cable. One end -// of the cable is connected to your router, the other to an AWS Direct Connect -// router. An AWS Direct Connect location provides access to Amazon Web Services -// in the region it is associated with. You can establish connections with AWS -// Direct Connect locations in multiple regions, but a connection in one region -// does not provide connectivity to other regions. +// over a standard Ethernet fiber-optic cable. One end of the cable is connected +// to your router, the other to an AWS Direct Connect router. // -// To find the locations for your region, use DescribeLocations. +// To find the locations for your Region, use DescribeLocations. // // You can automatically add the new connection to a link aggregation group // (LAG) by specifying a LAG ID in the request. This ensures that the new connection // is allocated on the same AWS Direct Connect endpoint that hosts the specified // LAG. If there are no available ports on the endpoint, the request fails and -// no connection will be created. +// no connection is created. // // 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 @@ -1105,12 +1081,10 @@ func (c *DirectConnect) CreateConnectionRequest(input *CreateConnectionInput) (r // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateConnection func (c *DirectConnect) CreateConnection(input *CreateConnectionInput) (*Connection, error) { @@ -1139,7 +1113,7 @@ const opCreateDirectConnectGateway = "CreateDirectConnectGateway" // CreateDirectConnectGatewayRequest generates a "aws/request.Request" representing the // client's request for the CreateDirectConnectGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1178,14 +1152,13 @@ func (c *DirectConnect) CreateDirectConnectGatewayRequest(input *CreateDirectCon // CreateDirectConnectGateway API operation for AWS Direct Connect. // -// Creates a new direct connect gateway. A direct connect gateway is an intermediate -// object that enables you to connect a set of virtual interfaces and virtual -// private gateways. direct connect gateways are global and visible in any AWS -// region after they are created. The virtual interfaces and virtual private -// gateways that are connected through a direct connect gateway can be in different -// regions. This enables you to connect to a VPC in any region, regardless of -// the region in which the virtual interfaces are located, and pass traffic -// between them. +// Creates a Direct Connect gateway, which is an intermediate object that enables +// you to connect a set of virtual interfaces and virtual private gateways. +// A Direct Connect gateway is global and visible in any AWS Region after it +// is created. The virtual interfaces and virtual private gateways that are +// connected through a Direct Connect gateway can be in different AWS Regions. +// This enables you to connect to a VPC in any Region, regardless of the Region +// in which the virtual interfaces are located, and pass traffic between them. // // 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 @@ -1196,12 +1169,10 @@ func (c *DirectConnect) CreateDirectConnectGatewayRequest(input *CreateDirectCon // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateDirectConnectGateway func (c *DirectConnect) CreateDirectConnectGateway(input *CreateDirectConnectGatewayInput) (*CreateDirectConnectGatewayOutput, error) { @@ -1230,7 +1201,7 @@ const opCreateDirectConnectGatewayAssociation = "CreateDirectConnectGatewayAssoc // CreateDirectConnectGatewayAssociationRequest generates a "aws/request.Request" representing the // client's request for the CreateDirectConnectGatewayAssociation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1269,9 +1240,9 @@ func (c *DirectConnect) CreateDirectConnectGatewayAssociationRequest(input *Crea // CreateDirectConnectGatewayAssociation API operation for AWS Direct Connect. // -// Creates an association between a direct connect gateway and a virtual private -// gateway (VGW). The VGW must be attached to a VPC and must not be associated -// with another direct connect gateway. +// Creates an association between a Direct Connect gateway and a virtual private +// gateway. The virtual private gateway must be attached to a VPC and must not +// be associated with another Direct Connect gateway. // // 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 @@ -1282,12 +1253,10 @@ func (c *DirectConnect) CreateDirectConnectGatewayAssociationRequest(input *Crea // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateDirectConnectGatewayAssociation func (c *DirectConnect) CreateDirectConnectGatewayAssociation(input *CreateDirectConnectGatewayAssociationInput) (*CreateDirectConnectGatewayAssociationOutput, error) { @@ -1316,7 +1285,7 @@ const opCreateInterconnect = "CreateInterconnect" // CreateInterconnectRequest generates a "aws/request.Request" representing the // client's request for the CreateInterconnect operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1355,30 +1324,29 @@ func (c *DirectConnect) CreateInterconnectRequest(input *CreateInterconnectInput // CreateInterconnect API operation for AWS Direct Connect. // -// Creates a new interconnect between a AWS Direct Connect partner's network -// and a specific AWS Direct Connect location. +// Creates an interconnect between an AWS Direct Connect partner's network and +// a specific AWS Direct Connect location. // // An interconnect is a connection which is capable of hosting other connections. -// The AWS Direct Connect partner can use an interconnect to provide sub-1Gbps -// AWS Direct Connect service to tier 2 customers who do not have their own -// connections. Like a standard connection, an interconnect links the AWS Direct -// Connect partner's network to an AWS Direct Connect location over a standard -// 1 Gbps or 10 Gbps Ethernet fiber-optic cable. One end is connected to the -// partner's router, the other to an AWS Direct Connect router. +// The partner can use an interconnect to provide sub-1Gbps AWS Direct Connect +// service to tier 2 customers who do not have their own connections. Like a +// standard connection, an interconnect links the partner's network to an AWS +// Direct Connect location over a standard Ethernet fiber-optic cable. One end +// is connected to the partner's router, the other to an AWS Direct Connect +// router. // // You can automatically add the new interconnect to a link aggregation group // (LAG) by specifying a LAG ID in the request. This ensures that the new interconnect // is allocated on the same AWS Direct Connect endpoint that hosts the specified // LAG. If there are no available ports on the endpoint, the request fails and -// no interconnect will be created. +// no interconnect is created. // // For each end customer, the AWS Direct Connect partner provisions a connection // on their interconnect by calling AllocateConnectionOnInterconnect. The end // customer can then connect to AWS resources by creating a virtual interface -// on their connection, using the VLAN assigned to them by the AWS Direct Connect -// partner. +// on their connection, using the VLAN assigned to them by the partner. // -// This is intended for use by AWS Direct Connect partners only. +// Intended for use by AWS Direct Connect partners only. // // 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 @@ -1389,12 +1357,10 @@ func (c *DirectConnect) CreateInterconnectRequest(input *CreateInterconnectInput // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateInterconnect func (c *DirectConnect) CreateInterconnect(input *CreateInterconnectInput) (*Interconnect, error) { @@ -1423,7 +1389,7 @@ const opCreateLag = "CreateLag" // CreateLagRequest generates a "aws/request.Request" representing the // client's request for the CreateLag operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1462,14 +1428,14 @@ func (c *DirectConnect) CreateLagRequest(input *CreateLagInput) (req *request.Re // CreateLag API operation for AWS Direct Connect. // -// Creates a new link aggregation group (LAG) with the specified number of bundled +// Creates a link aggregation group (LAG) with the specified number of bundled // physical connections between the customer network and a specific AWS Direct // Connect location. A LAG is a logical interface that uses the Link Aggregation -// Control Protocol (LACP) to aggregate multiple 1 gigabit or 10 gigabit interfaces, -// allowing you to treat them as a single interface. +// Control Protocol (LACP) to aggregate multiple interfaces, enabling you to +// treat them as a single interface. // -// All connections in a LAG must use the same bandwidth (for example, 10 Gbps), -// and must terminate at the same AWS Direct Connect endpoint. +// All connections in a LAG must use the same bandwidth and must terminate at +// the same AWS Direct Connect endpoint. // // You can have up to 10 connections per LAG. Regardless of this limit, if you // request more connections for the LAG than AWS Direct Connect can allocate @@ -1497,12 +1463,10 @@ func (c *DirectConnect) CreateLagRequest(input *CreateLagInput) (req *request.Re // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreateLag func (c *DirectConnect) CreateLag(input *CreateLagInput) (*Lag, error) { @@ -1531,7 +1495,7 @@ const opCreatePrivateVirtualInterface = "CreatePrivateVirtualInterface" // CreatePrivateVirtualInterfaceRequest generates a "aws/request.Request" representing the // client's request for the CreatePrivateVirtualInterface operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1570,9 +1534,13 @@ func (c *DirectConnect) CreatePrivateVirtualInterfaceRequest(input *CreatePrivat // CreatePrivateVirtualInterface API operation for AWS Direct Connect. // -// Creates a new private virtual interface. A virtual interface is the VLAN -// that transports AWS Direct Connect traffic. A private virtual interface supports -// sending traffic to a single virtual private cloud (VPC). +// Creates a private virtual interface. A virtual interface is the VLAN that +// transports AWS Direct Connect traffic. A private virtual interface can be +// connected to either a Direct Connect gateway or a Virtual Private Gateway +// (VGW). Connecting the private virtual interface to a Direct Connect gateway +// enables the possibility for connecting to multiple VPCs, including VPCs in +// different AWS Regions. Connecting the private virtual interface to a VGW +// only provides access to a single VPC within the same 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 @@ -1583,12 +1551,10 @@ func (c *DirectConnect) CreatePrivateVirtualInterfaceRequest(input *CreatePrivat // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreatePrivateVirtualInterface func (c *DirectConnect) CreatePrivateVirtualInterface(input *CreatePrivateVirtualInterfaceInput) (*VirtualInterface, error) { @@ -1617,7 +1583,7 @@ const opCreatePublicVirtualInterface = "CreatePublicVirtualInterface" // CreatePublicVirtualInterfaceRequest generates a "aws/request.Request" representing the // client's request for the CreatePublicVirtualInterface operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1656,14 +1622,13 @@ func (c *DirectConnect) CreatePublicVirtualInterfaceRequest(input *CreatePublicV // CreatePublicVirtualInterface API operation for AWS Direct Connect. // -// Creates a new public virtual interface. A virtual interface is the VLAN that +// Creates a public virtual interface. A virtual interface is the VLAN that // transports AWS Direct Connect traffic. A public virtual interface supports -// sending traffic to public services of AWS such as Amazon Simple Storage Service -// (Amazon S3). +// sending traffic to public services of AWS such as Amazon S3. // -// When creating an IPv6 public virtual interface (addressFamily is 'ipv6'), -// the customer and amazon address fields should be left blank to use auto-assigned -// IPv6 space. Custom IPv6 Addresses are currently not supported. +// When creating an IPv6 public virtual interface (addressFamily is ipv6), leave +// the customer and amazon address fields blank to use auto-assigned IPv6 space. +// Custom IPv6 addresses are not supported. // // 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 @@ -1674,12 +1639,10 @@ func (c *DirectConnect) CreatePublicVirtualInterfaceRequest(input *CreatePublicV // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/CreatePublicVirtualInterface func (c *DirectConnect) CreatePublicVirtualInterface(input *CreatePublicVirtualInterfaceInput) (*VirtualInterface, error) { @@ -1708,7 +1671,7 @@ const opDeleteBGPPeer = "DeleteBGPPeer" // DeleteBGPPeerRequest generates a "aws/request.Request" representing the // client's request for the DeleteBGPPeer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1747,9 +1710,10 @@ func (c *DirectConnect) DeleteBGPPeerRequest(input *DeleteBGPPeerInput) (req *re // DeleteBGPPeer API operation for AWS Direct Connect. // -// Deletes a BGP peer on the specified virtual interface that matches the specified -// customer address and ASN. You cannot delete the last BGP peer from a virtual -// interface. +// Deletes the specified BGP peer on the specified virtual interface with the +// specified customer address and ASN. +// +// You cannot delete the last BGP peer from a virtual 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 @@ -1760,12 +1724,10 @@ func (c *DirectConnect) DeleteBGPPeerRequest(input *DeleteBGPPeerInput) (req *re // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteBGPPeer func (c *DirectConnect) DeleteBGPPeer(input *DeleteBGPPeerInput) (*DeleteBGPPeerOutput, error) { @@ -1794,7 +1756,7 @@ const opDeleteConnection = "DeleteConnection" // DeleteConnectionRequest generates a "aws/request.Request" representing the // client's request for the DeleteConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1833,12 +1795,12 @@ func (c *DirectConnect) DeleteConnectionRequest(input *DeleteConnectionInput) (r // DeleteConnection API operation for AWS Direct Connect. // -// Deletes the connection. +// Deletes the specified connection. // // Deleting a connection only stops the AWS Direct Connect port hour and data -// transfer charges. You need to cancel separately with the providers any services -// or charges for cross-connects or network circuits that connect you to the -// AWS Direct Connect location. +// transfer charges. If you are partnering with any third parties to connect +// with the AWS Direct Connect location, you must cancel your service with them +// separately. // // 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 @@ -1849,12 +1811,10 @@ func (c *DirectConnect) DeleteConnectionRequest(input *DeleteConnectionInput) (r // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteConnection func (c *DirectConnect) DeleteConnection(input *DeleteConnectionInput) (*Connection, error) { @@ -1883,7 +1843,7 @@ const opDeleteDirectConnectGateway = "DeleteDirectConnectGateway" // DeleteDirectConnectGatewayRequest generates a "aws/request.Request" representing the // client's request for the DeleteDirectConnectGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1922,9 +1882,10 @@ func (c *DirectConnect) DeleteDirectConnectGatewayRequest(input *DeleteDirectCon // DeleteDirectConnectGateway API operation for AWS Direct Connect. // -// Deletes a direct connect gateway. You must first delete all virtual interfaces -// that are attached to the direct connect gateway and disassociate all virtual -// private gateways that are associated with the direct connect gateway. +// Deletes the specified Direct Connect gateway. You must first delete all virtual +// interfaces that are attached to the Direct Connect gateway and disassociate +// all virtual private gateways that are associated with the Direct Connect +// gateway. // // 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 @@ -1935,12 +1896,10 @@ func (c *DirectConnect) DeleteDirectConnectGatewayRequest(input *DeleteDirectCon // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteDirectConnectGateway func (c *DirectConnect) DeleteDirectConnectGateway(input *DeleteDirectConnectGatewayInput) (*DeleteDirectConnectGatewayOutput, error) { @@ -1969,7 +1928,7 @@ const opDeleteDirectConnectGatewayAssociation = "DeleteDirectConnectGatewayAssoc // DeleteDirectConnectGatewayAssociationRequest generates a "aws/request.Request" representing the // client's request for the DeleteDirectConnectGatewayAssociation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2008,8 +1967,8 @@ func (c *DirectConnect) DeleteDirectConnectGatewayAssociationRequest(input *Dele // DeleteDirectConnectGatewayAssociation API operation for AWS Direct Connect. // -// Deletes the association between a direct connect gateway and a virtual private -// gateway. +// Deletes the association between the specified Direct Connect gateway and +// virtual private gateway. // // 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 @@ -2020,12 +1979,10 @@ func (c *DirectConnect) DeleteDirectConnectGatewayAssociationRequest(input *Dele // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteDirectConnectGatewayAssociation func (c *DirectConnect) DeleteDirectConnectGatewayAssociation(input *DeleteDirectConnectGatewayAssociationInput) (*DeleteDirectConnectGatewayAssociationOutput, error) { @@ -2054,7 +2011,7 @@ const opDeleteInterconnect = "DeleteInterconnect" // DeleteInterconnectRequest generates a "aws/request.Request" representing the // client's request for the DeleteInterconnect operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2095,7 +2052,7 @@ func (c *DirectConnect) DeleteInterconnectRequest(input *DeleteInterconnectInput // // Deletes the specified interconnect. // -// This is intended for use by AWS Direct Connect partners only. +// Intended for use by AWS Direct Connect partners only. // // 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 @@ -2106,12 +2063,10 @@ func (c *DirectConnect) DeleteInterconnectRequest(input *DeleteInterconnectInput // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteInterconnect func (c *DirectConnect) DeleteInterconnect(input *DeleteInterconnectInput) (*DeleteInterconnectOutput, error) { @@ -2140,7 +2095,7 @@ const opDeleteLag = "DeleteLag" // DeleteLagRequest generates a "aws/request.Request" representing the // client's request for the DeleteLag operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2179,8 +2134,8 @@ func (c *DirectConnect) DeleteLagRequest(input *DeleteLagInput) (req *request.Re // DeleteLag API operation for AWS Direct Connect. // -// Deletes a link aggregation group (LAG). You cannot delete a LAG if it has -// active virtual interfaces or hosted connections. +// Deletes the specified link aggregation group (LAG). You cannot delete a LAG +// if it has active virtual interfaces or hosted connections. // // 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 @@ -2191,12 +2146,10 @@ func (c *DirectConnect) DeleteLagRequest(input *DeleteLagInput) (req *request.Re // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteLag func (c *DirectConnect) DeleteLag(input *DeleteLagInput) (*Lag, error) { @@ -2225,7 +2178,7 @@ const opDeleteVirtualInterface = "DeleteVirtualInterface" // DeleteVirtualInterfaceRequest generates a "aws/request.Request" representing the // client's request for the DeleteVirtualInterface operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2275,12 +2228,10 @@ func (c *DirectConnect) DeleteVirtualInterfaceRequest(input *DeleteVirtualInterf // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DeleteVirtualInterface func (c *DirectConnect) DeleteVirtualInterface(input *DeleteVirtualInterfaceInput) (*DeleteVirtualInterfaceOutput, error) { @@ -2309,7 +2260,7 @@ const opDescribeConnectionLoa = "DescribeConnectionLoa" // DescribeConnectionLoaRequest generates a "aws/request.Request" representing the // client's request for the DescribeConnectionLoa operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2353,15 +2304,15 @@ func (c *DirectConnect) DescribeConnectionLoaRequest(input *DescribeConnectionLo // DescribeConnectionLoa API operation for AWS Direct Connect. // -// Deprecated in favor of DescribeLoa. +// Deprecated. Use DescribeLoa instead. // -// Returns the LOA-CFA for a Connection. +// Gets the LOA-CFA for a connection. // // The Letter of Authorization - Connecting Facility Assignment (LOA-CFA) is // a document that your APN partner or service provider uses when establishing // your cross connect to AWS at the colocation facility. For more information, // see Requesting Cross Connects at AWS Direct Connect Locations (http://docs.aws.amazon.com/directconnect/latest/UserGuide/Colocation.html) -// in the AWS Direct Connect user guide. +// in the AWS Direct Connect 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 @@ -2372,12 +2323,10 @@ func (c *DirectConnect) DescribeConnectionLoaRequest(input *DescribeConnectionLo // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeConnectionLoa // @@ -2410,7 +2359,7 @@ const opDescribeConnections = "DescribeConnections" // DescribeConnectionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeConnections operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2449,9 +2398,7 @@ func (c *DirectConnect) DescribeConnectionsRequest(input *DescribeConnectionsInp // DescribeConnections API operation for AWS Direct Connect. // -// Displays all connections in this region. -// -// If a connection ID is provided, the call returns only that particular connection. +// Displays the specified connection or all connections in this 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 @@ -2462,12 +2409,10 @@ func (c *DirectConnect) DescribeConnectionsRequest(input *DescribeConnectionsInp // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeConnections func (c *DirectConnect) DescribeConnections(input *DescribeConnectionsInput) (*Connections, error) { @@ -2496,7 +2441,7 @@ const opDescribeConnectionsOnInterconnect = "DescribeConnectionsOnInterconnect" // DescribeConnectionsOnInterconnectRequest generates a "aws/request.Request" representing the // client's request for the DescribeConnectionsOnInterconnect operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2540,11 +2485,11 @@ func (c *DirectConnect) DescribeConnectionsOnInterconnectRequest(input *Describe // DescribeConnectionsOnInterconnect API operation for AWS Direct Connect. // -// Deprecated in favor of DescribeHostedConnections. +// Deprecated. Use DescribeHostedConnections instead. // -// Returns a list of connections that have been provisioned on the given interconnect. +// Lists the connections that have been provisioned on the specified interconnect. // -// This is intended for use by AWS Direct Connect partners only. +// Intended for use by AWS Direct Connect partners only. // // 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 @@ -2555,12 +2500,10 @@ func (c *DirectConnect) DescribeConnectionsOnInterconnectRequest(input *Describe // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeConnectionsOnInterconnect // @@ -2593,7 +2536,7 @@ const opDescribeDirectConnectGatewayAssociations = "DescribeDirectConnectGateway // DescribeDirectConnectGatewayAssociationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDirectConnectGatewayAssociations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2632,13 +2575,14 @@ func (c *DirectConnect) DescribeDirectConnectGatewayAssociationsRequest(input *D // DescribeDirectConnectGatewayAssociations API operation for AWS Direct Connect. // -// Returns a list of all direct connect gateway and virtual private gateway -// (VGW) associations. Either a direct connect gateway ID or a VGW ID must be -// provided in the request. If a direct connect gateway ID is provided, the -// response returns all VGWs associated with the direct connect gateway. If -// a VGW ID is provided, the response returns all direct connect gateways associated -// with the VGW. If both are provided, the response only returns the association -// that matches both the direct connect gateway and the VGW. +// Lists the associations between your Direct Connect gateways and virtual private +// gateways. You must specify a Direct Connect gateway, a virtual private gateway, +// or both. If you specify a Direct Connect gateway, the response contains all +// virtual private gateways associated with the Direct Connect gateway. If you +// specify a virtual private gateway, the response contains all Direct Connect +// gateways associated with the virtual private gateway. If you specify both, +// the response contains the association between the Direct Connect gateway +// and the virtual private gateway. // // 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 @@ -2649,12 +2593,10 @@ func (c *DirectConnect) DescribeDirectConnectGatewayAssociationsRequest(input *D // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeDirectConnectGatewayAssociations func (c *DirectConnect) DescribeDirectConnectGatewayAssociations(input *DescribeDirectConnectGatewayAssociationsInput) (*DescribeDirectConnectGatewayAssociationsOutput, error) { @@ -2683,7 +2625,7 @@ const opDescribeDirectConnectGatewayAttachments = "DescribeDirectConnectGatewayA // DescribeDirectConnectGatewayAttachmentsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDirectConnectGatewayAttachments operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2722,13 +2664,13 @@ func (c *DirectConnect) DescribeDirectConnectGatewayAttachmentsRequest(input *De // DescribeDirectConnectGatewayAttachments API operation for AWS Direct Connect. // -// Returns a list of all direct connect gateway and virtual interface (VIF) -// attachments. Either a direct connect gateway ID or a VIF ID must be provided -// in the request. If a direct connect gateway ID is provided, the response -// returns all VIFs attached to the direct connect gateway. If a VIF ID is provided, -// the response returns all direct connect gateways attached to the VIF. If -// both are provided, the response only returns the attachment that matches -// both the direct connect gateway and the VIF. +// Lists the attachments between your Direct Connect gateways and virtual interfaces. +// You must specify a Direct Connect gateway, a virtual interface, or both. +// If you specify a Direct Connect gateway, the response contains all virtual +// interfaces attached to the Direct Connect gateway. If you specify a virtual +// interface, the response contains all Direct Connect gateways attached to +// the virtual interface. If you specify both, the response contains the attachment +// between the Direct Connect gateway and the virtual 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 @@ -2739,12 +2681,10 @@ func (c *DirectConnect) DescribeDirectConnectGatewayAttachmentsRequest(input *De // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeDirectConnectGatewayAttachments func (c *DirectConnect) DescribeDirectConnectGatewayAttachments(input *DescribeDirectConnectGatewayAttachmentsInput) (*DescribeDirectConnectGatewayAttachmentsOutput, error) { @@ -2773,7 +2713,7 @@ const opDescribeDirectConnectGateways = "DescribeDirectConnectGateways" // DescribeDirectConnectGatewaysRequest generates a "aws/request.Request" representing the // client's request for the DescribeDirectConnectGateways operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2812,11 +2752,8 @@ func (c *DirectConnect) DescribeDirectConnectGatewaysRequest(input *DescribeDire // DescribeDirectConnectGateways API operation for AWS Direct Connect. // -// Returns a list of direct connect gateways in your account. Deleted direct -// connect gateways are not returned. You can provide a direct connect gateway -// ID in the request to return information about the specific direct connect -// gateway only. Otherwise, if a direct connect gateway ID is not provided, -// information about all of your direct connect gateways is returned. +// Lists all your Direct Connect gateways or only the specified Direct Connect +// gateway. Deleted Direct Connect gateways are not returned. // // 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 @@ -2827,12 +2764,10 @@ func (c *DirectConnect) DescribeDirectConnectGatewaysRequest(input *DescribeDire // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeDirectConnectGateways func (c *DirectConnect) DescribeDirectConnectGateways(input *DescribeDirectConnectGatewaysInput) (*DescribeDirectConnectGatewaysOutput, error) { @@ -2861,7 +2796,7 @@ const opDescribeHostedConnections = "DescribeHostedConnections" // DescribeHostedConnectionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeHostedConnections operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2900,10 +2835,10 @@ func (c *DirectConnect) DescribeHostedConnectionsRequest(input *DescribeHostedCo // DescribeHostedConnections API operation for AWS Direct Connect. // -// Returns a list of hosted connections that have been provisioned on the given +// Lists the hosted connections that have been provisioned on the specified // interconnect or link aggregation group (LAG). // -// This is intended for use by AWS Direct Connect partners only. +// Intended for use by AWS Direct Connect partners only. // // 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 @@ -2914,12 +2849,10 @@ func (c *DirectConnect) DescribeHostedConnectionsRequest(input *DescribeHostedCo // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeHostedConnections func (c *DirectConnect) DescribeHostedConnections(input *DescribeHostedConnectionsInput) (*Connections, error) { @@ -2948,7 +2881,7 @@ const opDescribeInterconnectLoa = "DescribeInterconnectLoa" // DescribeInterconnectLoaRequest generates a "aws/request.Request" representing the // client's request for the DescribeInterconnectLoa operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2992,15 +2925,15 @@ func (c *DirectConnect) DescribeInterconnectLoaRequest(input *DescribeInterconne // DescribeInterconnectLoa API operation for AWS Direct Connect. // -// Deprecated in favor of DescribeLoa. +// Deprecated. Use DescribeLoa instead. // -// Returns the LOA-CFA for an Interconnect. +// Gets the LOA-CFA for the specified interconnect. // // The Letter of Authorization - Connecting Facility Assignment (LOA-CFA) is // a document that is used when establishing your cross connect to AWS at the // colocation facility. For more information, see Requesting Cross Connects // at AWS Direct Connect Locations (http://docs.aws.amazon.com/directconnect/latest/UserGuide/Colocation.html) -// in the AWS Direct Connect user guide. +// in the AWS Direct Connect 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 @@ -3011,12 +2944,10 @@ func (c *DirectConnect) DescribeInterconnectLoaRequest(input *DescribeInterconne // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeInterconnectLoa // @@ -3049,7 +2980,7 @@ const opDescribeInterconnects = "DescribeInterconnects" // DescribeInterconnectsRequest generates a "aws/request.Request" representing the // client's request for the DescribeInterconnects operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3088,9 +3019,7 @@ func (c *DirectConnect) DescribeInterconnectsRequest(input *DescribeInterconnect // DescribeInterconnects API operation for AWS Direct Connect. // -// Returns a list of interconnects owned by the AWS account. -// -// If an interconnect ID is provided, it will only return this particular interconnect. +// Lists the interconnects owned by the AWS account or only the specified interconnect. // // 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 @@ -3101,12 +3030,10 @@ func (c *DirectConnect) DescribeInterconnectsRequest(input *DescribeInterconnect // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeInterconnects func (c *DirectConnect) DescribeInterconnects(input *DescribeInterconnectsInput) (*DescribeInterconnectsOutput, error) { @@ -3135,7 +3062,7 @@ const opDescribeLags = "DescribeLags" // DescribeLagsRequest generates a "aws/request.Request" representing the // client's request for the DescribeLags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3174,9 +3101,7 @@ func (c *DirectConnect) DescribeLagsRequest(input *DescribeLagsInput) (req *requ // DescribeLags API operation for AWS Direct Connect. // -// Describes the link aggregation groups (LAGs) in your account. -// -// If a LAG ID is provided, only information about the specified LAG is returned. +// Describes all your link aggregation groups (LAG) or the specified LAG. // // 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 @@ -3187,12 +3112,10 @@ func (c *DirectConnect) DescribeLagsRequest(input *DescribeLagsInput) (req *requ // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeLags func (c *DirectConnect) DescribeLags(input *DescribeLagsInput) (*DescribeLagsOutput, error) { @@ -3221,7 +3144,7 @@ const opDescribeLoa = "DescribeLoa" // DescribeLoaRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoa operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3260,14 +3183,14 @@ func (c *DirectConnect) DescribeLoaRequest(input *DescribeLoaInput) (req *reques // DescribeLoa API operation for AWS Direct Connect. // -// Returns the LOA-CFA for a connection, interconnect, or link aggregation group +// Gets the LOA-CFA for a connection, interconnect, or link aggregation group // (LAG). // // The Letter of Authorization - Connecting Facility Assignment (LOA-CFA) is // a document that is used when establishing your cross connect to AWS at the // colocation facility. For more information, see Requesting Cross Connects // at AWS Direct Connect Locations (http://docs.aws.amazon.com/directconnect/latest/UserGuide/Colocation.html) -// in the AWS Direct Connect user guide. +// in the AWS Direct Connect 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 @@ -3278,12 +3201,10 @@ func (c *DirectConnect) DescribeLoaRequest(input *DescribeLoaInput) (req *reques // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeLoa func (c *DirectConnect) DescribeLoa(input *DescribeLoaInput) (*Loa, error) { @@ -3312,7 +3233,7 @@ const opDescribeLocations = "DescribeLocations" // DescribeLocationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeLocations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3351,9 +3272,8 @@ func (c *DirectConnect) DescribeLocationsRequest(input *DescribeLocationsInput) // DescribeLocations API operation for AWS Direct Connect. // -// Returns the list of AWS Direct Connect locations in the current AWS region. -// These are the locations that may be selected when calling CreateConnection -// or CreateInterconnect. +// Lists the AWS Direct Connect locations in the current AWS Region. These are +// the locations that can be selected when calling CreateConnection or CreateInterconnect. // // 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 @@ -3364,12 +3284,10 @@ func (c *DirectConnect) DescribeLocationsRequest(input *DescribeLocationsInput) // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeLocations func (c *DirectConnect) DescribeLocations(input *DescribeLocationsInput) (*DescribeLocationsOutput, error) { @@ -3398,7 +3316,7 @@ const opDescribeTags = "DescribeTags" // DescribeTagsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3437,7 +3355,7 @@ func (c *DirectConnect) DescribeTagsRequest(input *DescribeTagsInput) (req *requ // DescribeTags API operation for AWS Direct Connect. // -// Describes the tags associated with the specified Direct Connect resources. +// Describes the tags associated with the specified AWS Direct Connect resources. // // 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 @@ -3448,12 +3366,10 @@ func (c *DirectConnect) DescribeTagsRequest(input *DescribeTagsInput) (req *requ // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeTags func (c *DirectConnect) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) { @@ -3482,7 +3398,7 @@ const opDescribeVirtualGateways = "DescribeVirtualGateways" // DescribeVirtualGatewaysRequest generates a "aws/request.Request" representing the // client's request for the DescribeVirtualGateways operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3521,13 +3437,10 @@ func (c *DirectConnect) DescribeVirtualGatewaysRequest(input *DescribeVirtualGat // DescribeVirtualGateways API operation for AWS Direct Connect. // -// Returns a list of virtual private gateways owned by the AWS account. +// Lists the virtual private gateways owned by the AWS account. // // You can create one or more AWS Direct Connect private virtual interfaces -// linking to a virtual private gateway. A virtual private gateway can be managed -// via Amazon Virtual Private Cloud (VPC) console or the EC2 CreateVpnGateway -// (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-CreateVpnGateway.html) -// action. +// linked to a virtual private gateway. // // 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 @@ -3538,12 +3451,10 @@ func (c *DirectConnect) DescribeVirtualGatewaysRequest(input *DescribeVirtualGat // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeVirtualGateways func (c *DirectConnect) DescribeVirtualGateways(input *DescribeVirtualGatewaysInput) (*DescribeVirtualGatewaysOutput, error) { @@ -3572,7 +3483,7 @@ const opDescribeVirtualInterfaces = "DescribeVirtualInterfaces" // DescribeVirtualInterfacesRequest generates a "aws/request.Request" representing the // client's request for the DescribeVirtualInterfaces operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3618,7 +3529,7 @@ func (c *DirectConnect) DescribeVirtualInterfacesRequest(input *DescribeVirtualI // a single virtual interface is returned. // // A virtual interface (VLAN) transmits the traffic between the AWS Direct Connect -// location and the customer. +// location and the customer network. // // 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 @@ -3629,12 +3540,10 @@ func (c *DirectConnect) DescribeVirtualInterfacesRequest(input *DescribeVirtualI // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DescribeVirtualInterfaces func (c *DirectConnect) DescribeVirtualInterfaces(input *DescribeVirtualInterfacesInput) (*DescribeVirtualInterfacesOutput, error) { @@ -3663,7 +3572,7 @@ const opDisassociateConnectionFromLag = "DisassociateConnectionFromLag" // DisassociateConnectionFromLagRequest generates a "aws/request.Request" representing the // client's request for the DisassociateConnectionFromLag operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3709,7 +3618,7 @@ func (c *DirectConnect) DisassociateConnectionFromLagRequest(input *Disassociate // remain associated with the LAG. A disassociated connection owned by an AWS // Direct Connect partner is automatically converted to an interconnect. // -// If disassociating the connection will cause the LAG to fall below its setting +// If disassociating the connection would cause the LAG to fall below its setting // for minimum number of operational connections, the request fails, except // when it's the last member of the LAG. If all connections are disassociated, // the LAG continues to exist as an empty LAG with no physical connections. @@ -3723,12 +3632,10 @@ func (c *DirectConnect) DisassociateConnectionFromLagRequest(input *Disassociate // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/DisassociateConnectionFromLag func (c *DirectConnect) DisassociateConnectionFromLag(input *DisassociateConnectionFromLagInput) (*Connection, error) { @@ -3757,7 +3664,7 @@ const opTagResource = "TagResource" // TagResourceRequest generates a "aws/request.Request" representing the // client's request for the TagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3791,17 +3698,17 @@ func (c *DirectConnect) TagResourceRequest(input *TagResourceInput) (req *reques output = &TagResourceOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // TagResource API operation for AWS Direct Connect. // -// Adds the specified tags to the specified Direct Connect resource. Each Direct -// Connect resource can have a maximum of 50 tags. +// Adds the specified tags to the specified AWS Direct Connect resource. Each +// resource can have a maximum of 50 tags. // // Each tag consists of a key and an optional value. If a tag with the same -// key is already associated with the Direct Connect resource, this action updates -// its value. +// key is already associated with the resource, this action updates its value. // // 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 @@ -3815,16 +3722,13 @@ func (c *DirectConnect) TagResourceRequest(input *TagResourceInput) (req *reques // A tag key was specified more than once. // // * ErrCodeTooManyTagsException "TooManyTagsException" -// You have reached the limit on the number of tags that can be assigned to -// a Direct Connect resource. +// You have reached the limit on the number of tags that can be assigned. // // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/TagResource func (c *DirectConnect) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { @@ -3853,7 +3757,7 @@ const opUntagResource = "UntagResource" // UntagResourceRequest generates a "aws/request.Request" representing the // client's request for the UntagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3887,12 +3791,13 @@ func (c *DirectConnect) UntagResourceRequest(input *UntagResourceInput) (req *re output = &UntagResourceOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // UntagResource API operation for AWS Direct Connect. // -// Removes one or more tags from the specified Direct Connect resource. +// Removes one or more tags from the specified AWS Direct Connect resource. // // 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 @@ -3903,12 +3808,10 @@ func (c *DirectConnect) UntagResourceRequest(input *UntagResourceInput) (req *re // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/UntagResource func (c *DirectConnect) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { @@ -3937,7 +3840,7 @@ const opUpdateLag = "UpdateLag" // UpdateLagRequest generates a "aws/request.Request" representing the // client's request for the UpdateLag operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3976,7 +3879,7 @@ func (c *DirectConnect) UpdateLagRequest(input *UpdateLagInput) (req *request.Re // UpdateLag API operation for AWS Direct Connect. // -// Updates the attributes of a link aggregation group (LAG). +// Updates the attributes of the specified link aggregation group (LAG). // // You can update the following attributes: // @@ -3986,11 +3889,11 @@ func (c *DirectConnect) UpdateLagRequest(input *UpdateLagInput) (req *request.Re // for the LAG itself to be operational. // // When you create a LAG, the default value for the minimum number of operational -// connections is zero (0). If you update this value, and the number of operational -// connections falls below the specified value, the LAG will automatically go -// down to avoid overutilization of the remaining connections. Adjusting this -// value should be done with care as it could force the LAG down if the value -// is set higher than the current number of operational connections. +// connections is zero (0). If you update this value and the number of operational +// connections falls below the specified value, the LAG automatically goes down +// to avoid over-utilization of the remaining connections. Adjust this value +// with care, as it could force the LAG down if it is set higher than the current +// number of operational connections. // // 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 @@ -4001,12 +3904,10 @@ func (c *DirectConnect) UpdateLagRequest(input *UpdateLagInput) (req *request.Re // // Returned Error Codes: // * ErrCodeServerException "DirectConnectServerException" -// A server-side error occurred during the API call. The error message will -// contain additional details about the cause. +// A server-side error occurred. // // * ErrCodeClientException "DirectConnectClientException" -// The API was called with invalid parameters. The error message will contain -// additional details about the cause. +// One or more parameters are not valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/UpdateLag func (c *DirectConnect) UpdateLag(input *UpdateLagInput) (*Lag, error) { @@ -4030,54 +3931,123 @@ func (c *DirectConnect) UpdateLagWithContext(ctx aws.Context, input *UpdateLagIn return out, req.Send() } -// Container for the parameters to the AllocateConnectionOnInterconnect operation. +const opUpdateVirtualInterfaceAttributes = "UpdateVirtualInterfaceAttributes" + +// UpdateVirtualInterfaceAttributesRequest generates a "aws/request.Request" representing the +// client's request for the UpdateVirtualInterfaceAttributes 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 UpdateVirtualInterfaceAttributes for more information on using the UpdateVirtualInterfaceAttributes +// 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 UpdateVirtualInterfaceAttributesRequest method. +// req, resp := client.UpdateVirtualInterfaceAttributesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/UpdateVirtualInterfaceAttributes +func (c *DirectConnect) UpdateVirtualInterfaceAttributesRequest(input *UpdateVirtualInterfaceAttributesInput) (req *request.Request, output *UpdateVirtualInterfaceAttributesOutput) { + op := &request.Operation{ + Name: opUpdateVirtualInterfaceAttributes, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateVirtualInterfaceAttributesInput{} + } + + output = &UpdateVirtualInterfaceAttributesOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateVirtualInterfaceAttributes API operation for AWS Direct Connect. +// +// Updates the specified attributes of the specified virtual private interface. +// +// Setting the MTU of a virtual interface to 9001 (jumbo frames) can cause an +// update to the underlying physical connection if it wasn't updated to support +// jumbo frames. Updating the connection disrupts network connectivity for all +// virtual interfaces associated with the connection for up to 30 seconds. To +// check whether your connection supports jumbo frames, call DescribeConnections. +// To check whether your virtual interface supports jumbo frames, call DescribeVirtualInterfaces. +// +// 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 Direct Connect's +// API operation UpdateVirtualInterfaceAttributes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "DirectConnectServerException" +// A server-side error occurred. +// +// * ErrCodeClientException "DirectConnectClientException" +// One or more parameters are not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25/UpdateVirtualInterfaceAttributes +func (c *DirectConnect) UpdateVirtualInterfaceAttributes(input *UpdateVirtualInterfaceAttributesInput) (*UpdateVirtualInterfaceAttributesOutput, error) { + req, out := c.UpdateVirtualInterfaceAttributesRequest(input) + return out, req.Send() +} + +// UpdateVirtualInterfaceAttributesWithContext is the same as UpdateVirtualInterfaceAttributes with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateVirtualInterfaceAttributes 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 *DirectConnect) UpdateVirtualInterfaceAttributesWithContext(ctx aws.Context, input *UpdateVirtualInterfaceAttributesInput, opts ...request.Option) (*UpdateVirtualInterfaceAttributesOutput, error) { + req, out := c.UpdateVirtualInterfaceAttributesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + type AllocateConnectionOnInterconnectInput struct { _ struct{} `type:"structure"` - // Bandwidth of the connection. - // - // Example: "500Mbps" - // - // Default: None - // - // Values: 50Mbps, 100Mbps, 200Mbps, 300Mbps, 400Mbps, or 500Mbps + // The bandwidth of the connection, in Mbps. The possible values are 50Mbps, + // 100Mbps, 200Mbps, 300Mbps, 400Mbps, and 500Mbps. // // Bandwidth is a required field Bandwidth *string `locationName:"bandwidth" type:"string" required:"true"` - // Name of the provisioned connection. - // - // Example: "500M Connection to AWS" - // - // Default: None + // The name of the provisioned connection. // // ConnectionName is a required field ConnectionName *string `locationName:"connectionName" type:"string" required:"true"` - // ID of the interconnect on which the connection will be provisioned. - // - // Example: dxcon-456abc78 - // - // Default: None + // The ID of the interconnect on which the connection will be provisioned. For + // example, dxcon-456abc78. // // InterconnectId is a required field InterconnectId *string `locationName:"interconnectId" type:"string" required:"true"` - // Numeric account Id of the customer for whom the connection will be provisioned. - // - // Example: 123443215678 - // - // Default: None + // The ID of the AWS account of the customer for whom the connection will be + // provisioned. // // OwnerAccount is a required field OwnerAccount *string `locationName:"ownerAccount" type:"string" required:"true"` // The dedicated VLAN provisioned to the connection. // - // Example: 101 - // - // Default: None - // // Vlan is a required field Vlan *int64 `locationName:"vlan" type:"integer" required:"true"` } @@ -4147,54 +4117,32 @@ func (s *AllocateConnectionOnInterconnectInput) SetVlan(v int64) *AllocateConnec return s } -// Container for the parameters to theHostedConnection operation. type AllocateHostedConnectionInput struct { _ struct{} `type:"structure"` - // The bandwidth of the connection. - // - // Example: 500Mbps - // - // Default: None - // - // Values: 50Mbps, 100Mbps, 200Mbps, 300Mbps, 400Mbps, or 500Mbps + // The bandwidth of the hosted connection, in Mbps. The possible values are + // 50Mbps, 100Mbps, 200Mbps, 300Mbps, 400Mbps, and 500Mbps. // // Bandwidth is a required field Bandwidth *string `locationName:"bandwidth" type:"string" required:"true"` - // The ID of the interconnect or LAG on which the connection will be provisioned. - // - // Example: dxcon-456abc78 or dxlag-abc123 - // - // Default: None + // The ID of the interconnect or LAG. // // ConnectionId is a required field ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` - // The name of the provisioned connection. - // - // Example: "500M Connection to AWS" - // - // Default: None + // The name of the hosted connection. // // ConnectionName is a required field ConnectionName *string `locationName:"connectionName" type:"string" required:"true"` - // The numeric account ID of the customer for whom the connection will be provisioned. - // - // Example: 123443215678 - // - // Default: None + // The ID of the AWS account ID of the customer for the connection. // // OwnerAccount is a required field OwnerAccount *string `locationName:"ownerAccount" type:"string" required:"true"` // The dedicated VLAN provisioned to the hosted connection. // - // Example: 101 - // - // Default: None - // // Vlan is a required field Vlan *int64 `locationName:"vlan" type:"integer" required:"true"` } @@ -4264,27 +4212,20 @@ func (s *AllocateHostedConnectionInput) SetVlan(v int64) *AllocateHostedConnecti return s } -// Container for the parameters to the AllocatePrivateVirtualInterface operation. type AllocatePrivateVirtualInterfaceInput struct { _ struct{} `type:"structure"` - // The connection ID on which the private virtual interface is provisioned. - // - // Default: None + // The ID of the connection on which the private virtual interface is provisioned. // // ConnectionId is a required field ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` - // Detailed information for the private virtual interface to be provisioned. - // - // Default: None + // Information about the private virtual interface. // // NewPrivateVirtualInterfaceAllocation is a required field NewPrivateVirtualInterfaceAllocation *NewPrivateVirtualInterfaceAllocation `locationName:"newPrivateVirtualInterfaceAllocation" type:"structure" required:"true"` - // The AWS account that will own the new private virtual interface. - // - // Default: None + // The ID of the AWS account that owns the virtual private interface. // // OwnerAccount is a required field OwnerAccount *string `locationName:"ownerAccount" type:"string" required:"true"` @@ -4342,27 +4283,20 @@ func (s *AllocatePrivateVirtualInterfaceInput) SetOwnerAccount(v string) *Alloca return s } -// Container for the parameters to the AllocatePublicVirtualInterface operation. type AllocatePublicVirtualInterfaceInput struct { _ struct{} `type:"structure"` - // The connection ID on which the public virtual interface is provisioned. - // - // Default: None + // The ID of the connection on which the public virtual interface is provisioned. // // ConnectionId is a required field ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` - // Detailed information for the public virtual interface to be provisioned. - // - // Default: None + // Information about the public virtual interface. // // NewPublicVirtualInterfaceAllocation is a required field NewPublicVirtualInterfaceAllocation *NewPublicVirtualInterfaceAllocation `locationName:"newPublicVirtualInterfaceAllocation" type:"structure" required:"true"` - // The AWS account that will own the new public virtual interface. - // - // Default: None + // The ID of the AWS account that owns the public virtual interface. // // OwnerAccount is a required field OwnerAccount *string `locationName:"ownerAccount" type:"string" required:"true"` @@ -4420,24 +4354,15 @@ func (s *AllocatePublicVirtualInterfaceInput) SetOwnerAccount(v string) *Allocat return s } -// Container for the parameters to the AssociateConnectionWithLag operation. type AssociateConnectionWithLagInput struct { _ struct{} `type:"structure"` - // The ID of the connection. - // - // Example: dxcon-abc123 - // - // Default: None + // The ID of the connection. For example, dxcon-abc123. // // ConnectionId is a required field ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` - // The ID of the LAG with which to associate the connection. - // - // Example: dxlag-abc123 - // - // Default: None + // The ID of the LAG with which to associate the connection. For example, dxlag-abc123. // // LagId is a required field LagId *string `locationName:"lagId" type:"string" required:"true"` @@ -4481,25 +4406,16 @@ func (s *AssociateConnectionWithLagInput) SetLagId(v string) *AssociateConnectio return s } -// Container for the parameters to the AssociateHostedConnection operation. type AssociateHostedConnectionInput struct { _ struct{} `type:"structure"` // The ID of the hosted connection. // - // Example: dxcon-abc123 - // - // Default: None - // // ConnectionId is a required field ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` // The ID of the interconnect or the LAG. // - // Example: dxcon-abc123 or dxlag-abc123 - // - // Default: None - // // ParentConnectionId is a required field ParentConnectionId *string `locationName:"parentConnectionId" type:"string" required:"true"` } @@ -4542,25 +4458,16 @@ func (s *AssociateHostedConnectionInput) SetParentConnectionId(v string) *Associ return s } -// Container for the parameters to the AssociateVirtualInterface operation. type AssociateVirtualInterfaceInput struct { _ struct{} `type:"structure"` - // The ID of the LAG or connection with which to associate the virtual interface. - // - // Example: dxlag-abc123 or dxcon-abc123 - // - // Default: None + // The ID of the LAG or connection. // // ConnectionId is a required field ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` // The ID of the virtual interface. // - // Example: dxvif-123dfg56 - // - // Default: None - // // VirtualInterfaceId is a required field VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string" required:"true"` } @@ -4603,64 +4510,56 @@ func (s *AssociateVirtualInterfaceInput) SetVirtualInterfaceId(v string) *Associ return s } -// A structure containing information about a BGP peer. +// Information about a BGP peer. type BGPPeer struct { _ struct{} `type:"structure"` - // Indicates the address family for the BGP peer. - // - // * ipv4: IPv4 address family - // - // * ipv6: IPv6 address family + // The address family for the BGP peer. AddressFamily *string `locationName:"addressFamily" type:"string" enum:"AddressFamily"` - // IP address assigned to the Amazon interface. - // - // Example: 192.168.1.1/30 or 2001:db8::1/125 + // The IP address assigned to the Amazon interface. AmazonAddress *string `locationName:"amazonAddress" type:"string"` // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. - // - // Example: 65000 Asn *int64 `locationName:"asn" type:"integer"` // The authentication key for BGP configuration. - // - // Example: asdf34example AuthKey *string `locationName:"authKey" type:"string"` - // The Direct Connection endpoint which the BGP peer terminates on. + // The Direct Connect endpoint on which the BGP peer terminates. AwsDeviceV2 *string `locationName:"awsDeviceV2" type:"string"` - // The state of the BGP peer. + // The ID of the BGP peer. + BgpPeerId *string `locationName:"bgpPeerId" type:"string"` + + // The state of the BGP peer. The following are the possible values: // - // * Verifying: The BGP peering addresses or ASN require validation before - // the BGP peer can be created. This state only applies to BGP peers on a - // public virtual interface. + // * verifying: The BGP peering addresses or ASN require validation before + // the BGP peer can be created. This state applies only to public virtual + // interfaces. // - // * Pending: The BGP peer has been created, and is in this state until it + // * pending: The BGP peer is created, and remains in this state until it // is ready to be established. // - // * Available: The BGP peer can be established. + // * available: The BGP peer is ready to be established. // - // * Deleting: The BGP peer is in the process of being deleted. + // * deleting: The BGP peer is being deleted. // - // * Deleted: The BGP peer has been deleted and cannot be established. + // * deleted: The BGP peer is deleted and cannot be established. BgpPeerState *string `locationName:"bgpPeerState" type:"string" enum:"BGPPeerState"` - // The Up/Down state of the BGP peer. + // The status of the BGP peer. The following are the possible values: // - // * Up: The BGP peer is established. + // * up: The BGP peer is established. This state does not indicate the state + // of the routing function. Ensure that you are receiving routes over the + // BGP session. // - // A state of up does not indicate the state of the routing function. Ensure - // that you are receiving routes over the BGP session. + // * down: The BGP peer is down. // - // * Down: The BGP peer is down. + // * unknown: The BGP peer status is unknown. BgpStatus *string `locationName:"bgpStatus" type:"string" enum:"BGPStatus"` - // IP address assigned to the customer interface. - // - // Example: 192.168.1.2/30 or 2001:db8::2/125 + // The IP address assigned to the customer interface. CustomerAddress *string `locationName:"customerAddress" type:"string"` } @@ -4704,6 +4603,12 @@ func (s *BGPPeer) SetAwsDeviceV2(v string) *BGPPeer { return s } +// SetBgpPeerId sets the BgpPeerId field's value. +func (s *BGPPeer) SetBgpPeerId(v string) *BGPPeer { + s.BgpPeerId = &v + return s +} + // SetBgpPeerState sets the BgpPeerState field's value. func (s *BGPPeer) SetBgpPeerState(v string) *BGPPeer { s.BgpPeerState = &v @@ -4722,16 +4627,10 @@ func (s *BGPPeer) SetCustomerAddress(v string) *BGPPeer { return s } -// Container for the parameters to the ConfirmConnection operation. type ConfirmConnectionInput struct { _ struct{} `type:"structure"` - // The ID of the connection. This field is also used as the ID type for operations - // that use multiple connection types (LAG, interconnect, and/or connection). - // - // Example: dxcon-fg5678gh - // - // Default: None + // The ID of the hosted connection. // // ConnectionId is a required field ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` @@ -4766,32 +4665,31 @@ func (s *ConfirmConnectionInput) SetConnectionId(v string) *ConfirmConnectionInp return s } -// The response received when ConfirmConnection is called. type ConfirmConnectionOutput struct { _ struct{} `type:"structure"` - // State of the connection. + // The state of the connection. The following are the possible values: // - // * Ordering: The initial state of a hosted connection provisioned on an + // * ordering: The initial state of a hosted connection provisioned on an // interconnect. The connection stays in the ordering state until the owner // of the hosted connection confirms or declines the connection order. // - // * Requested: The initial state of a standard connection. The connection + // * requested: The initial state of a standard connection. The connection // stays in the requested state until the Letter of Authorization (LOA) is // sent to the customer. // - // * Pending: The connection has been approved, and is being initialized. + // * pending: The connection has been approved and is being initialized. // - // * Available: The network link is up, and the connection is ready for use. + // * available: The network link is up and the connection is ready for use. // - // * Down: The network link is down. + // * down: The network link is down. // - // * Deleting: The connection is in the process of being deleted. + // * deleting: The connection is being deleted. // - // * Deleted: The connection has been deleted. + // * deleted: The connection has been deleted. // - // * Rejected: A hosted connection in the 'Ordering' state will enter the - // 'Rejected' state if it is deleted by the end customer. + // * rejected: A hosted connection in the ordering state enters the rejected + // state if it is deleted by the customer. ConnectionState *string `locationName:"connectionState" type:"string" enum:"ConnectionState"` } @@ -4811,33 +4709,17 @@ func (s *ConfirmConnectionOutput) SetConnectionState(v string) *ConfirmConnectio return s } -// Container for the parameters to the ConfirmPrivateVirtualInterface operation. type ConfirmPrivateVirtualInterfaceInput struct { _ struct{} `type:"structure"` - // ID of the direct connect gateway that will be attached to the virtual interface. - // - // A direct connect gateway can be managed via the AWS Direct Connect console - // or the CreateDirectConnectGateway action. - // - // Default: None + // The ID of the Direct Connect gateway. DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` - // ID of the virtual private gateway that will be attached to the virtual interface. - // - // A virtual private gateway can be managed via the Amazon Virtual Private Cloud - // (VPC) console or the EC2 CreateVpnGateway (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-CreateVpnGateway.html) - // action. - // - // Default: None + // The ID of the virtual private gateway. VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string"` // The ID of the virtual interface. // - // Example: dxvif-123dfg56 - // - // Default: None - // // VirtualInterfaceId is a required field VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string" required:"true"` } @@ -4883,37 +4765,36 @@ func (s *ConfirmPrivateVirtualInterfaceInput) SetVirtualInterfaceId(v string) *C return s } -// The response received when ConfirmPrivateVirtualInterface is called. type ConfirmPrivateVirtualInterfaceOutput struct { _ struct{} `type:"structure"` - // State of the virtual interface. + // The state of the virtual interface. The following are the possible values: // - // * Confirming: The creation of the virtual interface is pending confirmation + // * confirming: The creation of the virtual interface is pending confirmation // from the virtual interface owner. If the owner of the virtual interface // is different from the owner of the connection on which it is provisioned, // then the virtual interface will remain in this state until it is confirmed // by the virtual interface owner. // - // * Verifying: This state only applies to public virtual interfaces. Each + // * verifying: This state only applies to public virtual interfaces. Each // public virtual interface needs validation before the virtual interface // can be created. // - // * Pending: A virtual interface is in this state from the time that it + // * pending: A virtual interface is in this state from the time that it // is created until the virtual interface is ready to forward traffic. // - // * Available: A virtual interface that is able to forward traffic. + // * available: A virtual interface that is able to forward traffic. // - // * Down: A virtual interface that is BGP down. + // * down: A virtual interface that is BGP down. // - // * Deleting: A virtual interface is in this state immediately after calling + // * deleting: A virtual interface is in this state immediately after calling // DeleteVirtualInterface until it can no longer forward traffic. // - // * Deleted: A virtual interface that cannot forward traffic. + // * deleted: A virtual interface that cannot forward traffic. // - // * Rejected: The virtual interface owner has declined creation of the virtual - // interface. If a virtual interface in the 'Confirming' state is deleted - // by the virtual interface owner, the virtual interface will enter the 'Rejected' + // * rejected: The virtual interface owner has declined creation of the virtual + // interface. If a virtual interface in the Confirming state is deleted by + // the virtual interface owner, the virtual interface enters the Rejected // state. VirtualInterfaceState *string `locationName:"virtualInterfaceState" type:"string" enum:"VirtualInterfaceState"` } @@ -4934,16 +4815,11 @@ func (s *ConfirmPrivateVirtualInterfaceOutput) SetVirtualInterfaceState(v string return s } -// Container for the parameters to the ConfirmPublicVirtualInterface operation. type ConfirmPublicVirtualInterfaceInput struct { _ struct{} `type:"structure"` // The ID of the virtual interface. // - // Example: dxvif-123dfg56 - // - // Default: None - // // VirtualInterfaceId is a required field VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string" required:"true"` } @@ -4977,37 +4853,36 @@ func (s *ConfirmPublicVirtualInterfaceInput) SetVirtualInterfaceId(v string) *Co return s } -// The response received when ConfirmPublicVirtualInterface is called. type ConfirmPublicVirtualInterfaceOutput struct { _ struct{} `type:"structure"` - // State of the virtual interface. + // The state of the virtual interface. The following are the possible values: // - // * Confirming: The creation of the virtual interface is pending confirmation + // * confirming: The creation of the virtual interface is pending confirmation // from the virtual interface owner. If the owner of the virtual interface // is different from the owner of the connection on which it is provisioned, // then the virtual interface will remain in this state until it is confirmed // by the virtual interface owner. // - // * Verifying: This state only applies to public virtual interfaces. Each + // * verifying: This state only applies to public virtual interfaces. Each // public virtual interface needs validation before the virtual interface // can be created. // - // * Pending: A virtual interface is in this state from the time that it + // * pending: A virtual interface is in this state from the time that it // is created until the virtual interface is ready to forward traffic. // - // * Available: A virtual interface that is able to forward traffic. + // * available: A virtual interface that is able to forward traffic. // - // * Down: A virtual interface that is BGP down. + // * down: A virtual interface that is BGP down. // - // * Deleting: A virtual interface is in this state immediately after calling + // * deleting: A virtual interface is in this state immediately after calling // DeleteVirtualInterface until it can no longer forward traffic. // - // * Deleted: A virtual interface that cannot forward traffic. + // * deleted: A virtual interface that cannot forward traffic. // - // * Rejected: The virtual interface owner has declined creation of the virtual - // interface. If a virtual interface in the 'Confirming' state is deleted - // by the virtual interface owner, the virtual interface will enter the 'Rejected' + // * rejected: The virtual interface owner has declined creation of the virtual + // interface. If a virtual interface in the Confirming state is deleted by + // the virtual interface owner, the virtual interface enters the Rejected // state. VirtualInterfaceState *string `locationName:"virtualInterfaceState" type:"string" enum:"VirtualInterfaceState"` } @@ -5028,96 +4903,75 @@ func (s *ConfirmPublicVirtualInterfaceOutput) SetVirtualInterfaceState(v string) return s } -// A connection represents the physical network connection between the AWS Direct -// Connect location and the customer. +// Information about an AWS Direct Connect connection. type Connection struct { _ struct{} `type:"structure"` - // Deprecated in favor of awsDeviceV2. - // - // The Direct Connection endpoint which the physical connection terminates on. + // The Direct Connect endpoint on which the physical connection terminates. AwsDevice *string `locationName:"awsDevice" deprecated:"true" type:"string"` - // The Direct Connection endpoint which the physical connection terminates on. + // The Direct Connect endpoint on which the physical connection terminates. AwsDeviceV2 *string `locationName:"awsDeviceV2" type:"string"` - // Bandwidth of the connection. - // - // Example: 1Gbps (for regular connections), or 500Mbps (for hosted connections) - // - // Default: None + // The bandwidth of the connection. Bandwidth *string `locationName:"bandwidth" type:"string"` - // The ID of the connection. This field is also used as the ID type for operations - // that use multiple connection types (LAG, interconnect, and/or connection). - // - // Example: dxcon-fg5678gh - // - // Default: None + // The ID of the connection. ConnectionId *string `locationName:"connectionId" type:"string"` // The name of the connection. - // - // Example: "My Connection to AWS" - // - // Default: None ConnectionName *string `locationName:"connectionName" type:"string"` - // State of the connection. + // The state of the connection. The following are the possible values: // - // * Ordering: The initial state of a hosted connection provisioned on an + // * ordering: The initial state of a hosted connection provisioned on an // interconnect. The connection stays in the ordering state until the owner // of the hosted connection confirms or declines the connection order. // - // * Requested: The initial state of a standard connection. The connection + // * requested: The initial state of a standard connection. The connection // stays in the requested state until the Letter of Authorization (LOA) is // sent to the customer. // - // * Pending: The connection has been approved, and is being initialized. + // * pending: The connection has been approved and is being initialized. // - // * Available: The network link is up, and the connection is ready for use. + // * available: The network link is up and the connection is ready for use. // - // * Down: The network link is down. + // * down: The network link is down. // - // * Deleting: The connection is in the process of being deleted. + // * deleting: The connection is being deleted. // - // * Deleted: The connection has been deleted. + // * deleted: The connection has been deleted. // - // * Rejected: A hosted connection in the 'Ordering' state will enter the - // 'Rejected' state if it is deleted by the end customer. + // * rejected: A hosted connection in the ordering state enters the rejected + // state if it is deleted by the customer. ConnectionState *string `locationName:"connectionState" type:"string" enum:"ConnectionState"` + // Indicates whether the connection supports a secondary BGP peer in the same + // address family (IPv4/IPv6). + HasLogicalRedundancy *string `locationName:"hasLogicalRedundancy" type:"string" enum:"HasLogicalRedundancy"` + + // Indicates whether jumbo frames (9001 MTU) are supported. + JumboFrameCapable *bool `locationName:"jumboFrameCapable" type:"boolean"` + // The ID of the LAG. - // - // Example: dxlag-fg5678gh LagId *string `locationName:"lagId" type:"string"` // The time of the most recent call to DescribeLoa for this connection. LoaIssueTime *time.Time `locationName:"loaIssueTime" type:"timestamp"` - // Where the connection is located. - // - // Example: EqSV5 - // - // Default: None + // The location of the connection. Location *string `locationName:"location" type:"string"` - // The AWS account that will own the new connection. + // The ID of the AWS account that owns the connection. OwnerAccount *string `locationName:"ownerAccount" type:"string"` // The name of the AWS Direct Connect service provider associated with the connection. PartnerName *string `locationName:"partnerName" type:"string"` - // The AWS region where the connection is located. - // - // Example: us-east-1 - // - // Default: None + // The AWS Region where the connection is located. Region *string `locationName:"region" type:"string"` - // The VLAN ID. - // - // Example: 101 + // The ID of the VLAN. Vlan *int64 `locationName:"vlan" type:"integer"` } @@ -5167,6 +5021,18 @@ func (s *Connection) SetConnectionState(v string) *Connection { return s } +// SetHasLogicalRedundancy sets the HasLogicalRedundancy field's value. +func (s *Connection) SetHasLogicalRedundancy(v string) *Connection { + s.HasLogicalRedundancy = &v + return s +} + +// SetJumboFrameCapable sets the JumboFrameCapable field's value. +func (s *Connection) SetJumboFrameCapable(v bool) *Connection { + s.JumboFrameCapable = &v + return s +} + // SetLagId sets the LagId field's value. func (s *Connection) SetLagId(v string) *Connection { s.LagId = &v @@ -5209,11 +5075,10 @@ func (s *Connection) SetVlan(v int64) *Connection { return s } -// A structure containing a list of connections. type Connections struct { _ struct{} `type:"structure"` - // A list of connections. + // The connections. Connections []*Connection `locationName:"connections" type:"list"` } @@ -5233,20 +5098,13 @@ func (s *Connections) SetConnections(v []*Connection) *Connections { return s } -// Container for the parameters to the CreateBGPPeer operation. type CreateBGPPeerInput struct { _ struct{} `type:"structure"` - // Detailed information for the BGP peer to be created. - // - // Default: None + // Information about the BGP peer. NewBGPPeer *NewBGPPeer `locationName:"newBGPPeer" type:"structure"` - // The ID of the virtual interface on which the BGP peer will be provisioned. - // - // Example: dxvif-456abc78 - // - // Default: None + // The ID of the virtual interface. VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string"` } @@ -5272,12 +5130,10 @@ func (s *CreateBGPPeerInput) SetVirtualInterfaceId(v string) *CreateBGPPeerInput return s } -// The response received when CreateBGPPeer is called. type CreateBGPPeerOutput struct { _ struct{} `type:"structure"` - // A virtual interface (VLAN) transmits the traffic between the AWS Direct Connect - // location and the customer. + // The virtual interface. VirtualInterface *VirtualInterface `locationName:"virtualInterface" type:"structure"` } @@ -5297,38 +5153,23 @@ func (s *CreateBGPPeerOutput) SetVirtualInterface(v *VirtualInterface) *CreateBG return s } -// Container for the parameters to the CreateConnection operation. type CreateConnectionInput struct { _ struct{} `type:"structure"` - // Bandwidth of the connection. - // - // Example: 1Gbps - // - // Default: None + // The bandwidth of the connection. // // Bandwidth is a required field Bandwidth *string `locationName:"bandwidth" type:"string" required:"true"` // The name of the connection. // - // Example: "My Connection to AWS" - // - // Default: None - // // ConnectionName is a required field ConnectionName *string `locationName:"connectionName" type:"string" required:"true"` // The ID of the LAG. - // - // Example: dxlag-fg5678gh LagId *string `locationName:"lagId" type:"string"` - // Where the connection is located. - // - // Example: EqSV5 - // - // Default: None + // The location of the connection. // // Location is a required field Location *string `locationName:"location" type:"string" required:"true"` @@ -5387,26 +5228,16 @@ func (s *CreateConnectionInput) SetLocation(v string) *CreateConnectionInput { return s } -// Container for the parameters to the CreateDirectConnectGatewayAssociation -// operation. type CreateDirectConnectGatewayAssociationInput struct { _ struct{} `type:"structure"` - // The ID of the direct connect gateway. - // - // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" - // - // Default: None + // The ID of the Direct Connect gateway. // // DirectConnectGatewayId is a required field DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string" required:"true"` // The ID of the virtual private gateway. // - // Example: "vgw-abc123ef" - // - // Default: None - // // VirtualGatewayId is a required field VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string" required:"true"` } @@ -5449,12 +5280,10 @@ func (s *CreateDirectConnectGatewayAssociationInput) SetVirtualGatewayId(v strin return s } -// Container for the response from the CreateDirectConnectGatewayAssociation -// API call type CreateDirectConnectGatewayAssociationOutput struct { _ struct{} `type:"structure"` - // The direct connect gateway association to be created. + // The association to be created. DirectConnectGatewayAssociation *GatewayAssociation `locationName:"directConnectGatewayAssociation" type:"structure"` } @@ -5474,24 +5303,16 @@ func (s *CreateDirectConnectGatewayAssociationOutput) SetDirectConnectGatewayAss return s } -// Container for the parameters to the CreateDirectConnectGateway operation. type CreateDirectConnectGatewayInput struct { _ struct{} `type:"structure"` // The autonomous system number (ASN) for Border Gateway Protocol (BGP) to be // configured on the Amazon side of the connection. The ASN must be in the private - // range of 64,512 to 65,534 or 4,200,000,000 to 4,294,967,294 - // - // Example: 65200 - // - // Default: 64512 + // range of 64,512 to 65,534 or 4,200,000,000 to 4,294,967,294. The default + // is 64512. AmazonSideAsn *int64 `locationName:"amazonSideAsn" type:"long"` - // The name of the direct connect gateway. - // - // Example: "My direct connect gateway" - // - // Default: None + // The name of the Direct Connect gateway. // // DirectConnectGatewayName is a required field DirectConnectGatewayName *string `locationName:"directConnectGatewayName" type:"string" required:"true"` @@ -5532,11 +5353,10 @@ func (s *CreateDirectConnectGatewayInput) SetDirectConnectGatewayName(v string) return s } -// Container for the response from the CreateDirectConnectGateway API call type CreateDirectConnectGatewayOutput struct { _ struct{} `type:"structure"` - // The direct connect gateway to be created. + // The Direct Connect gateway. DirectConnectGateway *Gateway `locationName:"directConnectGateway" type:"structure"` } @@ -5556,40 +5376,23 @@ func (s *CreateDirectConnectGatewayOutput) SetDirectConnectGateway(v *Gateway) * return s } -// Container for the parameters to the CreateInterconnect operation. type CreateInterconnectInput struct { _ struct{} `type:"structure"` - // The port bandwidth - // - // Example: 1Gbps - // - // Default: None - // - // Available values: 1Gbps,10Gbps + // The port bandwidth, in Gbps. The possible values are 1 and 10. // // Bandwidth is a required field Bandwidth *string `locationName:"bandwidth" type:"string" required:"true"` // The name of the interconnect. // - // Example: "1G Interconnect to AWS" - // - // Default: None - // // InterconnectName is a required field InterconnectName *string `locationName:"interconnectName" type:"string" required:"true"` // The ID of the LAG. - // - // Example: dxlag-fg5678gh LagId *string `locationName:"lagId" type:"string"` - // Where the interconnect is located - // - // Example: EqSV5 - // - // Default: None + // The location of the interconnect. // // Location is a required field Location *string `locationName:"location" type:"string" required:"true"` @@ -5648,38 +5451,24 @@ func (s *CreateInterconnectInput) SetLocation(v string) *CreateInterconnectInput return s } -// Container for the parameters to the CreateLag operation. type CreateLagInput struct { _ struct{} `type:"structure"` // The ID of an existing connection to migrate to the LAG. - // - // Default: None ConnectionId *string `locationName:"connectionId" type:"string"` // The bandwidth of the individual physical connections bundled by the LAG. - // - // Default: None - // - // Available values: 1Gbps, 10Gbps + // The possible values are 1Gbps and 10Gbps. // // ConnectionsBandwidth is a required field ConnectionsBandwidth *string `locationName:"connectionsBandwidth" type:"string" required:"true"` // The name of the LAG. // - // Example: "3x10G LAG to AWS" - // - // Default: None - // // LagName is a required field LagName *string `locationName:"lagName" type:"string" required:"true"` - // The AWS Direct Connect location in which the LAG should be allocated. - // - // Example: EqSV5 - // - // Default: None + // The location for the LAG. // // Location is a required field Location *string `locationName:"location" type:"string" required:"true"` @@ -5687,8 +5476,6 @@ type CreateLagInput struct { // The number of physical connections initially provisioned and bundled by the // LAG. // - // Default: None - // // NumberOfConnections is a required field NumberOfConnections *int64 `locationName:"numberOfConnections" type:"integer" required:"true"` } @@ -5755,23 +5542,15 @@ func (s *CreateLagInput) SetNumberOfConnections(v int64) *CreateLagInput { return s } -// Container for the parameters to the CreatePrivateVirtualInterface operation. type CreatePrivateVirtualInterfaceInput struct { _ struct{} `type:"structure"` - // The ID of the connection. This field is also used as the ID type for operations - // that use multiple connection types (LAG, interconnect, and/or connection). - // - // Example: dxcon-fg5678gh - // - // Default: None + // The ID of the connection. // // ConnectionId is a required field ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` - // Detailed information for the private virtual interface to be created. - // - // Default: None + // Information about the private virtual interface. // // NewPrivateVirtualInterface is a required field NewPrivateVirtualInterface *NewPrivateVirtualInterface `locationName:"newPrivateVirtualInterface" type:"structure" required:"true"` @@ -5820,23 +5599,15 @@ func (s *CreatePrivateVirtualInterfaceInput) SetNewPrivateVirtualInterface(v *Ne return s } -// Container for the parameters to the CreatePublicVirtualInterface operation. type CreatePublicVirtualInterfaceInput struct { _ struct{} `type:"structure"` - // The ID of the connection. This field is also used as the ID type for operations - // that use multiple connection types (LAG, interconnect, and/or connection). - // - // Example: dxcon-fg5678gh - // - // Default: None + // The ID of the connection. // // ConnectionId is a required field ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` - // Detailed information for the public virtual interface to be created. - // - // Default: None + // Information about the public virtual interface. // // NewPublicVirtualInterface is a required field NewPublicVirtualInterface *NewPublicVirtualInterface `locationName:"newPublicVirtualInterface" type:"structure" required:"true"` @@ -5885,25 +5656,19 @@ func (s *CreatePublicVirtualInterfaceInput) SetNewPublicVirtualInterface(v *NewP return s } -// Container for the parameters to the DeleteBGPPeer operation. type DeleteBGPPeerInput struct { _ struct{} `type:"structure"` // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. - // - // Example: 65000 Asn *int64 `locationName:"asn" type:"integer"` - // IP address assigned to the customer interface. - // - // Example: 192.168.1.2/30 or 2001:db8::2/125 + // The ID of the BGP peer. + BgpPeerId *string `locationName:"bgpPeerId" type:"string"` + + // The IP address assigned to the customer interface. CustomerAddress *string `locationName:"customerAddress" type:"string"` - // The ID of the virtual interface from which the BGP peer will be deleted. - // - // Example: dxvif-456abc78 - // - // Default: None + // The ID of the virtual interface. VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string"` } @@ -5923,6 +5688,12 @@ func (s *DeleteBGPPeerInput) SetAsn(v int64) *DeleteBGPPeerInput { return s } +// SetBgpPeerId sets the BgpPeerId field's value. +func (s *DeleteBGPPeerInput) SetBgpPeerId(v string) *DeleteBGPPeerInput { + s.BgpPeerId = &v + return s +} + // SetCustomerAddress sets the CustomerAddress field's value. func (s *DeleteBGPPeerInput) SetCustomerAddress(v string) *DeleteBGPPeerInput { s.CustomerAddress = &v @@ -5935,12 +5706,10 @@ func (s *DeleteBGPPeerInput) SetVirtualInterfaceId(v string) *DeleteBGPPeerInput return s } -// The response received when DeleteBGPPeer is called. type DeleteBGPPeerOutput struct { _ struct{} `type:"structure"` - // A virtual interface (VLAN) transmits the traffic between the AWS Direct Connect - // location and the customer. + // The virtual interface. VirtualInterface *VirtualInterface `locationName:"virtualInterface" type:"structure"` } @@ -5960,16 +5729,10 @@ func (s *DeleteBGPPeerOutput) SetVirtualInterface(v *VirtualInterface) *DeleteBG return s } -// Container for the parameters to the DeleteConnection operation. type DeleteConnectionInput struct { _ struct{} `type:"structure"` - // The ID of the connection. This field is also used as the ID type for operations - // that use multiple connection types (LAG, interconnect, and/or connection). - // - // Example: dxcon-fg5678gh - // - // Default: None + // The ID of the connection. // // ConnectionId is a required field ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` @@ -6004,26 +5767,16 @@ func (s *DeleteConnectionInput) SetConnectionId(v string) *DeleteConnectionInput return s } -// Container for the parameters to the DeleteDirectConnectGatewayAssociation -// operation. type DeleteDirectConnectGatewayAssociationInput struct { _ struct{} `type:"structure"` - // The ID of the direct connect gateway. - // - // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" - // - // Default: None + // The ID of the Direct Connect gateway. // // DirectConnectGatewayId is a required field DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string" required:"true"` // The ID of the virtual private gateway. // - // Example: "vgw-abc123ef" - // - // Default: None - // // VirtualGatewayId is a required field VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string" required:"true"` } @@ -6066,12 +5819,10 @@ func (s *DeleteDirectConnectGatewayAssociationInput) SetVirtualGatewayId(v strin return s } -// Container for the response from the DeleteDirectConnectGatewayAssociation -// API call type DeleteDirectConnectGatewayAssociationOutput struct { _ struct{} `type:"structure"` - // The direct connect gateway association to be deleted. + // The association to be deleted. DirectConnectGatewayAssociation *GatewayAssociation `locationName:"directConnectGatewayAssociation" type:"structure"` } @@ -6091,15 +5842,10 @@ func (s *DeleteDirectConnectGatewayAssociationOutput) SetDirectConnectGatewayAss return s } -// Container for the parameters to the DeleteDirectConnectGateway operation. type DeleteDirectConnectGatewayInput struct { _ struct{} `type:"structure"` - // The ID of the direct connect gateway. - // - // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" - // - // Default: None + // The ID of the Direct Connect gateway. // // DirectConnectGatewayId is a required field DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string" required:"true"` @@ -6134,11 +5880,10 @@ func (s *DeleteDirectConnectGatewayInput) SetDirectConnectGatewayId(v string) *D return s } -// Container for the response from the DeleteDirectConnectGateway API call type DeleteDirectConnectGatewayOutput struct { _ struct{} `type:"structure"` - // The direct connect gateway to be deleted. + // The Direct Connect gateway. DirectConnectGateway *Gateway `locationName:"directConnectGateway" type:"structure"` } @@ -6158,14 +5903,11 @@ func (s *DeleteDirectConnectGatewayOutput) SetDirectConnectGateway(v *Gateway) * return s } -// Container for the parameters to the DeleteInterconnect operation. type DeleteInterconnectInput struct { _ struct{} `type:"structure"` // The ID of the interconnect. // - // Example: dxcon-abc123 - // // InterconnectId is a required field InterconnectId *string `locationName:"interconnectId" type:"string" required:"true"` } @@ -6199,26 +5941,25 @@ func (s *DeleteInterconnectInput) SetInterconnectId(v string) *DeleteInterconnec return s } -// The response received when DeleteInterconnect is called. type DeleteInterconnectOutput struct { _ struct{} `type:"structure"` - // State of the interconnect. + // The state of the interconnect. The following are the possible values: // - // * Requested: The initial state of an interconnect. The interconnect stays + // * requested: The initial state of an interconnect. The interconnect stays // in the requested state until the Letter of Authorization (LOA) is sent // to the customer. // - // * Pending: The interconnect has been approved, and is being initialized. + // * pending: The interconnect is approved, and is being initialized. // - // * Available: The network link is up, and the interconnect is ready for + // * available: The network link is up, and the interconnect is ready for // use. // - // * Down: The network link is down. + // * down: The network link is down. // - // * Deleting: The interconnect is in the process of being deleted. + // * deleting: The interconnect is being deleted. // - // * Deleted: The interconnect has been deleted. + // * deleted: The interconnect is deleted. InterconnectState *string `locationName:"interconnectState" type:"string" enum:"InterconnectState"` } @@ -6238,15 +5979,10 @@ func (s *DeleteInterconnectOutput) SetInterconnectState(v string) *DeleteInterco return s } -// Container for the parameters to the DeleteLag operation. type DeleteLagInput struct { _ struct{} `type:"structure"` - // The ID of the LAG to delete. - // - // Example: dxlag-abc123 - // - // Default: None + // The ID of the LAG. // // LagId is a required field LagId *string `locationName:"lagId" type:"string" required:"true"` @@ -6281,16 +6017,11 @@ func (s *DeleteLagInput) SetLagId(v string) *DeleteLagInput { return s } -// Container for the parameters to the DeleteVirtualInterface operation. type DeleteVirtualInterfaceInput struct { _ struct{} `type:"structure"` // The ID of the virtual interface. // - // Example: dxvif-123dfg56 - // - // Default: None - // // VirtualInterfaceId is a required field VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string" required:"true"` } @@ -6324,37 +6055,36 @@ func (s *DeleteVirtualInterfaceInput) SetVirtualInterfaceId(v string) *DeleteVir return s } -// The response received when DeleteVirtualInterface is called. type DeleteVirtualInterfaceOutput struct { _ struct{} `type:"structure"` - // State of the virtual interface. + // The state of the virtual interface. The following are the possible values: // - // * Confirming: The creation of the virtual interface is pending confirmation + // * confirming: The creation of the virtual interface is pending confirmation // from the virtual interface owner. If the owner of the virtual interface // is different from the owner of the connection on which it is provisioned, // then the virtual interface will remain in this state until it is confirmed // by the virtual interface owner. // - // * Verifying: This state only applies to public virtual interfaces. Each + // * verifying: This state only applies to public virtual interfaces. Each // public virtual interface needs validation before the virtual interface // can be created. // - // * Pending: A virtual interface is in this state from the time that it + // * pending: A virtual interface is in this state from the time that it // is created until the virtual interface is ready to forward traffic. // - // * Available: A virtual interface that is able to forward traffic. + // * available: A virtual interface that is able to forward traffic. // - // * Down: A virtual interface that is BGP down. + // * down: A virtual interface that is BGP down. // - // * Deleting: A virtual interface is in this state immediately after calling + // * deleting: A virtual interface is in this state immediately after calling // DeleteVirtualInterface until it can no longer forward traffic. // - // * Deleted: A virtual interface that cannot forward traffic. + // * deleted: A virtual interface that cannot forward traffic. // - // * Rejected: The virtual interface owner has declined creation of the virtual - // interface. If a virtual interface in the 'Confirming' state is deleted - // by the virtual interface owner, the virtual interface will enter the 'Rejected' + // * rejected: The virtual interface owner has declined creation of the virtual + // interface. If a virtual interface in the Confirming state is deleted by + // the virtual interface owner, the virtual interface enters the Rejected // state. VirtualInterfaceState *string `locationName:"virtualInterfaceState" type:"string" enum:"VirtualInterfaceState"` } @@ -6375,31 +6105,21 @@ func (s *DeleteVirtualInterfaceOutput) SetVirtualInterfaceState(v string) *Delet return s } -// Container for the parameters to the DescribeConnectionLoa operation. type DescribeConnectionLoaInput struct { _ struct{} `type:"structure"` - // The ID of the connection. This field is also used as the ID type for operations - // that use multiple connection types (LAG, interconnect, and/or connection). - // - // Example: dxcon-fg5678gh - // - // Default: None + // The ID of the connection. // // ConnectionId is a required field ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` - // A standard media type indicating the content type of the LOA-CFA document. - // Currently, the only supported value is "application/pdf". - // - // Default: application/pdf + // The standard media type for the LOA-CFA document. The only supported value + // is application/pdf. LoaContentType *string `locationName:"loaContentType" type:"string" enum:"LoaContentType"` // The name of the APN partner or service provider who establishes connectivity - // on your behalf. If you supply this parameter, the LOA-CFA lists the provider + // on your behalf. If you specify this parameter, the LOA-CFA lists the provider // name alongside your company name as the requester of the cross connect. - // - // Default: None ProviderName *string `locationName:"providerName" type:"string"` } @@ -6444,12 +6164,10 @@ func (s *DescribeConnectionLoaInput) SetProviderName(v string) *DescribeConnecti return s } -// The response received when DescribeConnectionLoa is called. type DescribeConnectionLoaOutput struct { _ struct{} `type:"structure"` - // A structure containing the Letter of Authorization - Connecting Facility - // Assignment (LOA-CFA) for a connection. + // The Letter of Authorization - Connecting Facility Assignment (LOA-CFA). Loa *Loa `locationName:"loa" type:"structure"` } @@ -6469,16 +6187,10 @@ func (s *DescribeConnectionLoaOutput) SetLoa(v *Loa) *DescribeConnectionLoaOutpu return s } -// Container for the parameters to the DescribeConnections operation. type DescribeConnectionsInput struct { _ struct{} `type:"structure"` - // The ID of the connection. This field is also used as the ID type for operations - // that use multiple connection types (LAG, interconnect, and/or connection). - // - // Example: dxcon-fg5678gh - // - // Default: None + // The ID of the connection. ConnectionId *string `locationName:"connectionId" type:"string"` } @@ -6498,15 +6210,10 @@ func (s *DescribeConnectionsInput) SetConnectionId(v string) *DescribeConnection return s } -// Container for the parameters to the DescribeConnectionsOnInterconnect operation. type DescribeConnectionsOnInterconnectInput struct { _ struct{} `type:"structure"` - // ID of the interconnect on which a list of connection is provisioned. - // - // Example: dxcon-abc123 - // - // Default: None + // The ID of the interconnect. // // InterconnectId is a required field InterconnectId *string `locationName:"interconnectId" type:"string" required:"true"` @@ -6541,36 +6248,19 @@ func (s *DescribeConnectionsOnInterconnectInput) SetInterconnectId(v string) *De return s } -// Container for the parameters to the DescribeDirectConnectGatewayAssociations -// operation. type DescribeDirectConnectGatewayAssociationsInput struct { _ struct{} `type:"structure"` - // The ID of the direct connect gateway. - // - // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" - // - // Default: None + // The ID of the Direct Connect gateway. DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` - // The maximum number of direct connect gateway associations to return per page. - // - // Example: 15 - // - // Default: None + // The maximum number of associations to return per page. MaxResults *int64 `locationName:"maxResults" type:"integer"` - // The token provided in the previous describe result to retrieve the next page - // of the result. - // - // Default: None + // The token provided in the previous call to retrieve the next page. NextToken *string `locationName:"nextToken" type:"string"` // The ID of the virtual private gateway. - // - // Example: "vgw-abc123ef" - // - // Default: None VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string"` } @@ -6608,15 +6298,13 @@ func (s *DescribeDirectConnectGatewayAssociationsInput) SetVirtualGatewayId(v st return s } -// Container for the response from the DescribeDirectConnectGatewayAssociations -// API call type DescribeDirectConnectGatewayAssociationsOutput struct { _ struct{} `type:"structure"` - // Information about the direct connect gateway associations. + // The associations. DirectConnectGatewayAssociations []*GatewayAssociation `locationName:"directConnectGatewayAssociations" type:"list"` - // Token to retrieve the next page of the result. + // The token to retrieve the next page. NextToken *string `locationName:"nextToken" type:"string"` } @@ -6642,36 +6330,19 @@ func (s *DescribeDirectConnectGatewayAssociationsOutput) SetNextToken(v string) return s } -// Container for the parameters to the DescribeDirectConnectGatewayAttachments -// operation. type DescribeDirectConnectGatewayAttachmentsInput struct { _ struct{} `type:"structure"` - // The ID of the direct connect gateway. - // - // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" - // - // Default: None + // The ID of the Direct Connect gateway. DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` - // The maximum number of direct connect gateway attachments to return per page. - // - // Example: 15 - // - // Default: None + // The maximum number of attachments to return per page. MaxResults *int64 `locationName:"maxResults" type:"integer"` - // The token provided in the previous describe result to retrieve the next page - // of the result. - // - // Default: None + // The token provided in the previous call to retrieve the next page. NextToken *string `locationName:"nextToken" type:"string"` // The ID of the virtual interface. - // - // Example: "dxvif-abc123ef" - // - // Default: None VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string"` } @@ -6709,15 +6380,13 @@ func (s *DescribeDirectConnectGatewayAttachmentsInput) SetVirtualInterfaceId(v s return s } -// Container for the response from the DescribeDirectConnectGatewayAttachments -// API call type DescribeDirectConnectGatewayAttachmentsOutput struct { _ struct{} `type:"structure"` - // Information about the direct connect gateway attachments. + // The attachments. DirectConnectGatewayAttachments []*GatewayAttachment `locationName:"directConnectGatewayAttachments" type:"list"` - // Token to retrieve the next page of the result. + // The token to retrieve the next page. NextToken *string `locationName:"nextToken" type:"string"` } @@ -6743,28 +6412,16 @@ func (s *DescribeDirectConnectGatewayAttachmentsOutput) SetNextToken(v string) * return s } -// Container for the parameters to the DescribeDirectConnectGateways operation. type DescribeDirectConnectGatewaysInput struct { _ struct{} `type:"structure"` - // The ID of the direct connect gateway. - // - // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" - // - // Default: None + // The ID of the Direct Connect gateway. DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` - // The maximum number of direct connect gateways to return per page. - // - // Example: 15 - // - // Default: None + // The maximum number of Direct Connect gateways to return per page. MaxResults *int64 `locationName:"maxResults" type:"integer"` - // The token provided in the previous describe result to retrieve the next page - // of the result. - // - // Default: None + // The token provided in the previous call to retrieve the next page. NextToken *string `locationName:"nextToken" type:"string"` } @@ -6796,14 +6453,13 @@ func (s *DescribeDirectConnectGatewaysInput) SetNextToken(v string) *DescribeDir return s } -// Container for the response from the DescribeDirectConnectGateways API call type DescribeDirectConnectGatewaysOutput struct { _ struct{} `type:"structure"` - // Information about the direct connect gateways. + // The Direct Connect gateways. DirectConnectGateways []*Gateway `locationName:"directConnectGateways" type:"list"` - // Token to retrieve the next page of the result. + // The token to retrieve the next page. NextToken *string `locationName:"nextToken" type:"string"` } @@ -6829,15 +6485,10 @@ func (s *DescribeDirectConnectGatewaysOutput) SetNextToken(v string) *DescribeDi return s } -// Container for the parameters to the DescribeHostedConnections operation. type DescribeHostedConnectionsInput struct { _ struct{} `type:"structure"` - // The ID of the interconnect or LAG on which the hosted connections are provisioned. - // - // Example: dxcon-abc123 or dxlag-abc123 - // - // Default: None + // The ID of the interconnect or LAG. // // ConnectionId is a required field ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` @@ -6872,28 +6523,21 @@ func (s *DescribeHostedConnectionsInput) SetConnectionId(v string) *DescribeHost return s } -// Container for the parameters to the DescribeInterconnectLoa operation. type DescribeInterconnectLoaInput struct { _ struct{} `type:"structure"` // The ID of the interconnect. // - // Example: dxcon-abc123 - // // InterconnectId is a required field InterconnectId *string `locationName:"interconnectId" type:"string" required:"true"` - // A standard media type indicating the content type of the LOA-CFA document. - // Currently, the only supported value is "application/pdf". - // - // Default: application/pdf + // The standard media type for the LOA-CFA document. The only supported value + // is application/pdf. LoaContentType *string `locationName:"loaContentType" type:"string" enum:"LoaContentType"` // The name of the service provider who establishes connectivity on your behalf. // If you supply this parameter, the LOA-CFA lists the provider name alongside // your company name as the requester of the cross connect. - // - // Default: None ProviderName *string `locationName:"providerName" type:"string"` } @@ -6938,12 +6582,10 @@ func (s *DescribeInterconnectLoaInput) SetProviderName(v string) *DescribeInterc return s } -// The response received when DescribeInterconnectLoa is called. type DescribeInterconnectLoaOutput struct { _ struct{} `type:"structure"` - // A structure containing the Letter of Authorization - Connecting Facility - // Assignment (LOA-CFA) for a connection. + // The Letter of Authorization - Connecting Facility Assignment (LOA-CFA). Loa *Loa `locationName:"loa" type:"structure"` } @@ -6963,13 +6605,10 @@ func (s *DescribeInterconnectLoaOutput) SetLoa(v *Loa) *DescribeInterconnectLoaO return s } -// Container for the parameters to the DescribeInterconnects operation. type DescribeInterconnectsInput struct { _ struct{} `type:"structure"` // The ID of the interconnect. - // - // Example: dxcon-abc123 InterconnectId *string `locationName:"interconnectId" type:"string"` } @@ -6989,11 +6628,10 @@ func (s *DescribeInterconnectsInput) SetInterconnectId(v string) *DescribeInterc return s } -// A structure containing a list of interconnects. type DescribeInterconnectsOutput struct { _ struct{} `type:"structure"` - // A list of interconnects. + // The interconnects. Interconnects []*Interconnect `locationName:"interconnects" type:"list"` } @@ -7013,15 +6651,10 @@ func (s *DescribeInterconnectsOutput) SetInterconnects(v []*Interconnect) *Descr return s } -// Container for the parameters to the DescribeLags operation. type DescribeLagsInput struct { _ struct{} `type:"structure"` // The ID of the LAG. - // - // Example: dxlag-abc123 - // - // Default: None LagId *string `locationName:"lagId" type:"string"` } @@ -7041,11 +6674,10 @@ func (s *DescribeLagsInput) SetLagId(v string) *DescribeLagsInput { return s } -// A structure containing a list of LAGs. type DescribeLagsOutput struct { _ struct{} `type:"structure"` - // A list of LAGs. + // The LAGs. Lags []*Lag `locationName:"lags" type:"list"` } @@ -7065,31 +6697,21 @@ func (s *DescribeLagsOutput) SetLags(v []*Lag) *DescribeLagsOutput { return s } -// Container for the parameters to the DescribeLoa operation. type DescribeLoaInput struct { _ struct{} `type:"structure"` - // The ID of a connection, LAG, or interconnect for which to get the LOA-CFA - // information. - // - // Example: dxcon-abc123 or dxlag-abc123 - // - // Default: None + // The ID of a connection, LAG, or interconnect. // // ConnectionId is a required field ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` - // A standard media type indicating the content type of the LOA-CFA document. - // Currently, the only supported value is "application/pdf". - // - // Default: application/pdf + // The standard media type for the LOA-CFA document. The only supported value + // is application/pdf. LoaContentType *string `locationName:"loaContentType" type:"string" enum:"LoaContentType"` // The name of the service provider who establishes connectivity on your behalf. - // If you supply this parameter, the LOA-CFA lists the provider name alongside + // If you specify this parameter, the LOA-CFA lists the provider name alongside // your company name as the requester of the cross connect. - // - // Default: None ProviderName *string `locationName:"providerName" type:"string"` } @@ -7148,15 +6770,10 @@ func (s DescribeLocationsInput) GoString() string { return s.String() } -// A location is a network facility where AWS Direct Connect routers are available -// to be connected. Generally, these are colocation hubs where many network -// providers have equipment, and where cross connects can be delivered. Locations -// include a name and facility code, and must be provided when creating a connection. type DescribeLocationsOutput struct { _ struct{} `type:"structure"` - // A list of colocation hubs where network providers have equipment. Most regions - // have multiple locations available. + // The locations. Locations []*Location `locationName:"locations" type:"list"` } @@ -7176,11 +6793,10 @@ func (s *DescribeLocationsOutput) SetLocations(v []*Location) *DescribeLocations return s } -// Container for the parameters to the DescribeTags operation. type DescribeTagsInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Names (ARNs) of the Direct Connect resources. + // The Amazon Resource Names (ARNs) of the resources. // // ResourceArns is a required field ResourceArns []*string `locationName:"resourceArns" type:"list" required:"true"` @@ -7215,7 +6831,6 @@ func (s *DescribeTagsInput) SetResourceArns(v []*string) *DescribeTagsInput { return s } -// The response received when DescribeTags is called. type DescribeTagsOutput struct { _ struct{} `type:"structure"` @@ -7253,11 +6868,10 @@ func (s DescribeVirtualGatewaysInput) GoString() string { return s.String() } -// A structure containing a list of virtual private gateways. type DescribeVirtualGatewaysOutput struct { _ struct{} `type:"structure"` - // A list of virtual private gateways. + // The virtual private gateways. VirtualGateways []*VirtualGateway `locationName:"virtualGateways" type:"list"` } @@ -7277,23 +6891,13 @@ func (s *DescribeVirtualGatewaysOutput) SetVirtualGateways(v []*VirtualGateway) return s } -// Container for the parameters to the DescribeVirtualInterfaces operation. type DescribeVirtualInterfacesInput struct { _ struct{} `type:"structure"` - // The ID of the connection. This field is also used as the ID type for operations - // that use multiple connection types (LAG, interconnect, and/or connection). - // - // Example: dxcon-fg5678gh - // - // Default: None + // The ID of the connection. ConnectionId *string `locationName:"connectionId" type:"string"` // The ID of the virtual interface. - // - // Example: dxvif-123dfg56 - // - // Default: None VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string"` } @@ -7319,11 +6923,10 @@ func (s *DescribeVirtualInterfacesInput) SetVirtualInterfaceId(v string) *Descri return s } -// A structure containing a list of virtual interfaces. type DescribeVirtualInterfacesOutput struct { _ struct{} `type:"structure"` - // A list of virtual interfaces. + // The virtual interfaces VirtualInterfaces []*VirtualInterface `locationName:"virtualInterfaces" type:"list"` } @@ -7343,24 +6946,15 @@ func (s *DescribeVirtualInterfacesOutput) SetVirtualInterfaces(v []*VirtualInter return s } -// Container for the parameters to the DisassociateConnectionFromLag operation. type DisassociateConnectionFromLagInput struct { _ struct{} `type:"structure"` - // The ID of the connection to disassociate from the LAG. - // - // Example: dxcon-abc123 - // - // Default: None + // The ID of the connection. For example, dxcon-abc123. // // ConnectionId is a required field ConnectionId *string `locationName:"connectionId" type:"string" required:"true"` - // The ID of the LAG. - // - // Example: dxlag-abc123 - // - // Default: None + // The ID of the LAG. For example, dxlag-abc123. // // LagId is a required field LagId *string `locationName:"lagId" type:"string" required:"true"` @@ -7404,7 +6998,7 @@ func (s *DisassociateConnectionFromLagInput) SetLagId(v string) *DisassociateCon return s } -// A direct connect gateway is an intermediate object that enables you to connect +// Information about a Direct Connect gateway, which enables you to connect // virtual interfaces and virtual private gateways. type Gateway struct { _ struct{} `type:"structure"` @@ -7412,33 +7006,27 @@ type Gateway struct { // The autonomous system number (ASN) for the Amazon side of the connection. AmazonSideAsn *int64 `locationName:"amazonSideAsn" type:"long"` - // The ID of the direct connect gateway. - // - // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" + // The ID of the Direct Connect gateway. DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` - // The name of the direct connect gateway. - // - // Example: "My direct connect gateway" - // - // Default: None + // The name of the Direct Connect gateway. DirectConnectGatewayName *string `locationName:"directConnectGatewayName" type:"string"` - // State of the direct connect gateway. + // The state of the Direct Connect gateway. The following are the possible values: // - // * Pending: The initial state after calling CreateDirectConnectGateway. + // * pending: The initial state after calling CreateDirectConnectGateway. // - // * Available: The direct connect gateway is ready for use. + // * available: The Direct Connect gateway is ready for use. // - // * Deleting: The initial state after calling DeleteDirectConnectGateway. + // * deleting: The initial state after calling DeleteDirectConnectGateway. // - // * Deleted: The direct connect gateway is deleted and cannot pass traffic. + // * deleted: The Direct Connect gateway is deleted and cannot pass traffic. DirectConnectGatewayState *string `locationName:"directConnectGatewayState" type:"string" enum:"GatewayState"` - // The AWS account ID of the owner of the direct connect gateway. + // The ID of the AWS account that owns the Direct Connect gateway. OwnerAccount *string `locationName:"ownerAccount" type:"string"` - // Error message when the state of an object fails to advance. + // The error message if the state of an object failed to advance. StateChangeError *string `locationName:"stateChangeError" type:"string"` } @@ -7488,44 +7076,38 @@ func (s *Gateway) SetStateChangeError(v string) *Gateway { return s } -// The association between a direct connect gateway and virtual private gateway. +// Information about an association between a Direct Connect gateway and a virtual +// private gateway. type GatewayAssociation struct { _ struct{} `type:"structure"` - // State of the direct connect gateway association. + // The state of the association. The following are the possible values: // - // * Associating: The initial state after calling CreateDirectConnectGatewayAssociation. + // * associating: The initial state after calling CreateDirectConnectGatewayAssociation. // - // * Associated: The direct connect gateway and virtual private gateway are + // * associated: The Direct Connect gateway and virtual private gateway are // successfully associated and ready to pass traffic. // - // * Disassociating: The initial state after calling DeleteDirectConnectGatewayAssociation. + // * disassociating: The initial state after calling DeleteDirectConnectGatewayAssociation. // - // * Disassociated: The virtual private gateway is successfully disassociated - // from the direct connect gateway. Traffic flow between the direct connect - // gateway and virtual private gateway stops. + // * disassociated: The virtual private gateway is disassociated from the + // Direct Connect gateway. Traffic flow between the Direct Connect gateway + // and virtual private gateway is stopped. AssociationState *string `locationName:"associationState" type:"string" enum:"GatewayAssociationState"` - // The ID of the direct connect gateway. - // - // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" + // The ID of the Direct Connect gateway. DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` - // Error message when the state of an object fails to advance. + // The error message if the state of an object failed to advance. StateChangeError *string `locationName:"stateChangeError" type:"string"` - // The ID of the virtual private gateway to a VPC. This only applies to private - // virtual interfaces. - // - // Example: vgw-123er56 + // The ID of the virtual private gateway. Applies only to private virtual interfaces. VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string"` - // The AWS account ID of the owner of the virtual private gateway. + // The ID of the AWS account that owns the virtual private gateway. VirtualGatewayOwnerAccount *string `locationName:"virtualGatewayOwnerAccount" type:"string"` - // The region in which the virtual private gateway is located. - // - // Example: us-east-1 + // The AWS Region where the virtual private gateway is located. VirtualGatewayRegion *string `locationName:"virtualGatewayRegion" type:"string"` } @@ -7575,47 +7157,39 @@ func (s *GatewayAssociation) SetVirtualGatewayRegion(v string) *GatewayAssociati return s } -// The association between a direct connect gateway and virtual interface. +// Information about an attachment between a Direct Connect gateway and a virtual +// interface. type GatewayAttachment struct { _ struct{} `type:"structure"` - // State of the direct connect gateway attachment. + // The state of the attachment. The following are the possible values: // - // * Attaching: The initial state after a virtual interface is created using - // the direct connect gateway. + // * attaching: The initial state after a virtual interface is created using + // the Direct Connect gateway. // - // * Attached: The direct connect gateway and virtual interface are successfully - // attached and ready to pass traffic. + // * attached: The Direct Connect gateway and virtual interface are attached + // and ready to pass traffic. // - // * Detaching: The initial state after calling DeleteVirtualInterface on - // a virtual interface that is attached to a direct connect gateway. + // * detaching: The initial state after calling DeleteVirtualInterface. // - // * Detached: The virtual interface is successfully detached from the direct - // connect gateway. Traffic flow between the direct connect gateway and virtual - // interface stops. + // * detached: The virtual interface is detached from the Direct Connect + // gateway. Traffic flow between the Direct Connect gateway and virtual interface + // is stopped. AttachmentState *string `locationName:"attachmentState" type:"string" enum:"GatewayAttachmentState"` - // The ID of the direct connect gateway. - // - // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" + // The ID of the Direct Connect gateway. DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` - // Error message when the state of an object fails to advance. + // The error message if the state of an object failed to advance. StateChangeError *string `locationName:"stateChangeError" type:"string"` // The ID of the virtual interface. - // - // Example: dxvif-123dfg56 - // - // Default: None VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string"` - // The AWS account ID of the owner of the virtual interface. + // The ID of the AWS account that owns the virtual interface. VirtualInterfaceOwnerAccount *string `locationName:"virtualInterfaceOwnerAccount" type:"string"` - // The region in which the virtual interface is located. - // - // Example: us-east-1 + // The AWS Region where the virtual interface is located. VirtualInterfaceRegion *string `locationName:"virtualInterfaceRegion" type:"string"` } @@ -7665,84 +7239,60 @@ func (s *GatewayAttachment) SetVirtualInterfaceRegion(v string) *GatewayAttachme return s } -// An interconnect is a connection that can host other connections. -// -// Like a standard AWS Direct Connect connection, an interconnect represents -// the physical connection between an AWS Direct Connect partner's network and -// a specific Direct Connect location. An AWS Direct Connect partner who owns -// an interconnect can provision hosted connections on the interconnect for -// their end customers, thereby providing the end customers with connectivity -// to AWS services. -// -// The resources of the interconnect, including bandwidth and VLAN numbers, -// are shared by all of the hosted connections on the interconnect, and the -// owner of the interconnect determines how these resources are assigned. +// Information about an interconnect. type Interconnect struct { _ struct{} `type:"structure"` - // Deprecated in favor of awsDeviceV2. - // - // The Direct Connection endpoint which the physical connection terminates on. + // The Direct Connect endpoint on which the physical connection terminates. AwsDevice *string `locationName:"awsDevice" deprecated:"true" type:"string"` - // The Direct Connection endpoint which the physical connection terminates on. + // The Direct Connect endpoint on which the physical connection terminates. AwsDeviceV2 *string `locationName:"awsDeviceV2" type:"string"` - // Bandwidth of the connection. - // - // Example: 1Gbps - // - // Default: None + // The bandwidth of the connection. Bandwidth *string `locationName:"bandwidth" type:"string"` + // Indicates whether the interconnect supports a secondary BGP in the same address + // family (IPv4/IPv6). + HasLogicalRedundancy *string `locationName:"hasLogicalRedundancy" type:"string" enum:"HasLogicalRedundancy"` + // The ID of the interconnect. - // - // Example: dxcon-abc123 InterconnectId *string `locationName:"interconnectId" type:"string"` // The name of the interconnect. - // - // Example: "1G Interconnect to AWS" InterconnectName *string `locationName:"interconnectName" type:"string"` - // State of the interconnect. + // The state of the interconnect. The following are the possible values: // - // * Requested: The initial state of an interconnect. The interconnect stays + // * requested: The initial state of an interconnect. The interconnect stays // in the requested state until the Letter of Authorization (LOA) is sent // to the customer. // - // * Pending: The interconnect has been approved, and is being initialized. + // * pending: The interconnect is approved, and is being initialized. // - // * Available: The network link is up, and the interconnect is ready for + // * available: The network link is up, and the interconnect is ready for // use. // - // * Down: The network link is down. + // * down: The network link is down. // - // * Deleting: The interconnect is in the process of being deleted. + // * deleting: The interconnect is being deleted. // - // * Deleted: The interconnect has been deleted. + // * deleted: The interconnect is deleted. InterconnectState *string `locationName:"interconnectState" type:"string" enum:"InterconnectState"` + // Indicates whether jumbo frames (9001 MTU) are supported. + JumboFrameCapable *bool `locationName:"jumboFrameCapable" type:"boolean"` + // The ID of the LAG. - // - // Example: dxlag-fg5678gh LagId *string `locationName:"lagId" type:"string"` - // The time of the most recent call to DescribeInterconnectLoa for this Interconnect. + // The time of the most recent call to DescribeLoa for this connection. LoaIssueTime *time.Time `locationName:"loaIssueTime" type:"timestamp"` - // Where the connection is located. - // - // Example: EqSV5 - // - // Default: None + // The location of the connection. Location *string `locationName:"location" type:"string"` - // The AWS region where the connection is located. - // - // Example: us-east-1 - // - // Default: None + // The AWS Region where the connection is located. Region *string `locationName:"region" type:"string"` } @@ -7774,6 +7324,12 @@ func (s *Interconnect) SetBandwidth(v string) *Interconnect { return s } +// SetHasLogicalRedundancy sets the HasLogicalRedundancy field's value. +func (s *Interconnect) SetHasLogicalRedundancy(v string) *Interconnect { + s.HasLogicalRedundancy = &v + return s +} + // SetInterconnectId sets the InterconnectId field's value. func (s *Interconnect) SetInterconnectId(v string) *Interconnect { s.InterconnectId = &v @@ -7792,6 +7348,12 @@ func (s *Interconnect) SetInterconnectState(v string) *Interconnect { return s } +// SetJumboFrameCapable sets the JumboFrameCapable field's value. +func (s *Interconnect) SetJumboFrameCapable(v bool) *Interconnect { + s.JumboFrameCapable = &v + return s +} + // SetLagId sets the LagId field's value. func (s *Interconnect) SetLagId(v string) *Interconnect { s.LagId = &v @@ -7816,86 +7378,71 @@ func (s *Interconnect) SetRegion(v string) *Interconnect { return s } -// Describes a link aggregation group (LAG). A LAG is a connection that uses -// the Link Aggregation Control Protocol (LACP) to logically aggregate a bundle -// of physical connections. Like an interconnect, it can host other connections. -// All connections in a LAG must terminate on the same physical AWS Direct Connect -// endpoint, and must be the same bandwidth. +// Information about a link aggregation group (LAG). type Lag struct { _ struct{} `type:"structure"` // Indicates whether the LAG can host other connections. - // - // This is intended for use by AWS Direct Connect partners only. AllowsHostedConnections *bool `locationName:"allowsHostedConnections" type:"boolean"` - // Deprecated in favor of awsDeviceV2. - // - // The AWS Direct Connection endpoint that hosts the LAG. + // The Direct Connect endpoint that hosts the LAG. AwsDevice *string `locationName:"awsDevice" deprecated:"true" type:"string"` - // The AWS Direct Connection endpoint that hosts the LAG. + // The Direct Connect endpoint that hosts the LAG. AwsDeviceV2 *string `locationName:"awsDeviceV2" type:"string"` - // A list of connections bundled by this LAG. + // The connections bundled by the LAG. Connections []*Connection `locationName:"connections" type:"list"` // The individual bandwidth of the physical connections bundled by the LAG. - // - // Available values: 1Gbps, 10Gbps + // The possible values are 1Gbps and 10Gbps. ConnectionsBandwidth *string `locationName:"connectionsBandwidth" type:"string"` + // Indicates whether the LAG supports a secondary BGP peer in the same address + // family (IPv4/IPv6). + HasLogicalRedundancy *string `locationName:"hasLogicalRedundancy" type:"string" enum:"HasLogicalRedundancy"` + + // Indicates whether jumbo frames (9001 MTU) are supported. + JumboFrameCapable *bool `locationName:"jumboFrameCapable" type:"boolean"` + // The ID of the LAG. - // - // Example: dxlag-fg5678gh LagId *string `locationName:"lagId" type:"string"` // The name of the LAG. LagName *string `locationName:"lagName" type:"string"` - // The state of the LAG. + // The state of the LAG. The following are the possible values: // - // * Requested: The initial state of a LAG. The LAG stays in the requested + // * requested: The initial state of a LAG. The LAG stays in the requested // state until the Letter of Authorization (LOA) is available. // - // * Pending: The LAG has been approved, and is being initialized. + // * pending: The LAG has been approved and is being initialized. // - // * Available: The network link is established, and the LAG is ready for + // * available: The network link is established and the LAG is ready for // use. // - // * Down: The network link is down. + // * down: The network link is down. // - // * Deleting: The LAG is in the process of being deleted. + // * deleting: The LAG is being deleted. // - // * Deleted: The LAG has been deleted. + // * deleted: The LAG is deleted. LagState *string `locationName:"lagState" type:"string" enum:"LagState"` - // Where the connection is located. - // - // Example: EqSV5 - // - // Default: None + // The location of the LAG. Location *string `locationName:"location" type:"string"` // The minimum number of physical connections that must be operational for the - // LAG itself to be operational. If the number of operational connections drops - // below this setting, the LAG state changes to down. This value can help to - // ensure that a LAG is not overutilized if a significant number of its bundled - // connections go down. + // LAG itself to be operational. MinimumLinks *int64 `locationName:"minimumLinks" type:"integer"` // The number of physical connections bundled by the LAG, up to a maximum of // 10. NumberOfConnections *int64 `locationName:"numberOfConnections" type:"integer"` - // The owner of the LAG. + // The ID of the AWS account that owns the LAG. OwnerAccount *string `locationName:"ownerAccount" type:"string"` - // The AWS region where the connection is located. - // - // Example: us-east-1 - // - // Default: None + // The AWS Region where the connection is located. Region *string `locationName:"region" type:"string"` } @@ -7939,6 +7486,18 @@ func (s *Lag) SetConnectionsBandwidth(v string) *Lag { return s } +// SetHasLogicalRedundancy sets the HasLogicalRedundancy field's value. +func (s *Lag) SetHasLogicalRedundancy(v string) *Lag { + s.HasLogicalRedundancy = &v + return s +} + +// SetJumboFrameCapable sets the JumboFrameCapable field's value. +func (s *Lag) SetJumboFrameCapable(v bool) *Lag { + s.JumboFrameCapable = &v + return s +} + // SetLagId sets the LagId field's value. func (s *Lag) SetLagId(v string) *Lag { s.LagId = &v @@ -7987,8 +7546,8 @@ func (s *Lag) SetRegion(v string) *Lag { return s } -// A structure containing the Letter of Authorization - Connecting Facility -// Assignment (LOA-CFA) for a connection. +// Information about a Letter of Authorization - Connecting Facility Assignment +// (LOA-CFA) for a connection. type Loa struct { _ struct{} `type:"structure"` @@ -7997,10 +7556,8 @@ type Loa struct { // LoaContent is automatically base64 encoded/decoded by the SDK. LoaContent []byte `locationName:"loaContent" type:"blob"` - // A standard media type indicating the content type of the LOA-CFA document. - // Currently, the only supported value is "application/pdf". - // - // Default: application/pdf + // The standard media type for the LOA-CFA document. The only supported value + // is application/pdf. LoaContentType *string `locationName:"loaContentType" type:"string" enum:"LoaContentType"` } @@ -8026,23 +7583,18 @@ func (s *Loa) SetLoaContentType(v string) *Loa { return s } -// An AWS Direct Connect location where connections and interconnects can be -// requested. +// Information about an AWS Direct Connect location. type Location struct { _ struct{} `type:"structure"` - // The code used to indicate the AWS Direct Connect location. + // The code for the location. LocationCode *string `locationName:"locationCode" type:"string"` - // The name of the AWS Direct Connect location. The name includes the colocation - // partner name and the physical site of the lit building. + // The name of the location. This includes the name of the colocation partner + // and the physical site of the building. LocationName *string `locationName:"locationName" type:"string"` - // The AWS region where the AWS Direct connect location is located. - // - // Example: us-east-1 - // - // Default: None + // The AWS Region for the location. Region *string `locationName:"region" type:"string"` } @@ -8074,35 +7626,23 @@ func (s *Location) SetRegion(v string) *Location { return s } -// A structure containing information about a new BGP peer. +// Information about a new BGP peer. type NewBGPPeer struct { _ struct{} `type:"structure"` - // Indicates the address family for the BGP peer. - // - // * ipv4: IPv4 address family - // - // * ipv6: IPv6 address family + // The address family for the BGP peer. AddressFamily *string `locationName:"addressFamily" type:"string" enum:"AddressFamily"` - // IP address assigned to the Amazon interface. - // - // Example: 192.168.1.1/30 or 2001:db8::1/125 + // The IP address assigned to the Amazon interface. AmazonAddress *string `locationName:"amazonAddress" type:"string"` // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. - // - // Example: 65000 Asn *int64 `locationName:"asn" type:"integer"` // The authentication key for BGP configuration. - // - // Example: asdf34example AuthKey *string `locationName:"authKey" type:"string"` - // IP address assigned to the customer interface. - // - // Example: 192.168.1.2/30 or 2001:db8::2/125 + // The IP address assigned to the customer interface. CustomerAddress *string `locationName:"customerAddress" type:"string"` } @@ -8146,60 +7686,43 @@ func (s *NewBGPPeer) SetCustomerAddress(v string) *NewBGPPeer { return s } -// A structure containing information about a new private virtual interface. +// Information about a private virtual interface. type NewPrivateVirtualInterface struct { _ struct{} `type:"structure"` - // Indicates the address family for the BGP peer. - // - // * ipv4: IPv4 address family - // - // * ipv6: IPv6 address family + // The address family for the BGP peer. AddressFamily *string `locationName:"addressFamily" type:"string" enum:"AddressFamily"` - // IP address assigned to the Amazon interface. - // - // Example: 192.168.1.1/30 or 2001:db8::1/125 + // The IP address assigned to the Amazon interface. AmazonAddress *string `locationName:"amazonAddress" type:"string"` // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. // - // Example: 65000 - // // Asn is a required field Asn *int64 `locationName:"asn" type:"integer" required:"true"` // The authentication key for BGP configuration. - // - // Example: asdf34example AuthKey *string `locationName:"authKey" type:"string"` - // IP address assigned to the customer interface. - // - // Example: 192.168.1.2/30 or 2001:db8::2/125 + // The IP address assigned to the customer interface. CustomerAddress *string `locationName:"customerAddress" type:"string"` - // The ID of the direct connect gateway. - // - // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" + // The ID of the Direct Connect gateway. DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` - // The ID of the virtual private gateway to a VPC. This only applies to private - // virtual interfaces. - // - // Example: vgw-123er56 + // The maximum transmission unit (MTU), in bytes. The supported values are 1500 + // and 9001. The default value is 1500. + Mtu *int64 `locationName:"mtu" type:"integer"` + + // The ID of the virtual private gateway. VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string"` - // The name of the virtual interface assigned by the customer. - // - // Example: "My VPC" + // The name of the virtual interface assigned by the customer network. // // VirtualInterfaceName is a required field VirtualInterfaceName *string `locationName:"virtualInterfaceName" type:"string" required:"true"` - // The VLAN ID. - // - // Example: 101 + // The ID of the VLAN. // // Vlan is a required field Vlan *int64 `locationName:"vlan" type:"integer" required:"true"` @@ -8270,6 +7793,12 @@ func (s *NewPrivateVirtualInterface) SetDirectConnectGatewayId(v string) *NewPri return s } +// SetMtu sets the Mtu field's value. +func (s *NewPrivateVirtualInterface) SetMtu(v int64) *NewPrivateVirtualInterface { + s.Mtu = &v + return s +} + // SetVirtualGatewayId sets the VirtualGatewayId field's value. func (s *NewPrivateVirtualInterface) SetVirtualGatewayId(v string) *NewPrivateVirtualInterface { s.VirtualGatewayId = &v @@ -8288,50 +7817,37 @@ func (s *NewPrivateVirtualInterface) SetVlan(v int64) *NewPrivateVirtualInterfac return s } -// A structure containing information about a private virtual interface that -// will be provisioned on a connection. +// Information about a private virtual interface to be provisioned on a connection. type NewPrivateVirtualInterfaceAllocation struct { _ struct{} `type:"structure"` - // Indicates the address family for the BGP peer. - // - // * ipv4: IPv4 address family - // - // * ipv6: IPv6 address family + // The address family for the BGP peer. AddressFamily *string `locationName:"addressFamily" type:"string" enum:"AddressFamily"` - // IP address assigned to the Amazon interface. - // - // Example: 192.168.1.1/30 or 2001:db8::1/125 + // The IP address assigned to the Amazon interface. AmazonAddress *string `locationName:"amazonAddress" type:"string"` // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. // - // Example: 65000 - // // Asn is a required field Asn *int64 `locationName:"asn" type:"integer" required:"true"` // The authentication key for BGP configuration. - // - // Example: asdf34example AuthKey *string `locationName:"authKey" type:"string"` - // IP address assigned to the customer interface. - // - // Example: 192.168.1.2/30 or 2001:db8::2/125 + // The IP address assigned to the customer interface. CustomerAddress *string `locationName:"customerAddress" type:"string"` - // The name of the virtual interface assigned by the customer. - // - // Example: "My VPC" + // The maximum transmission unit (MTU), in bytes. The supported values are 1500 + // and 9001. The default value is 1500. + Mtu *int64 `locationName:"mtu" type:"integer"` + + // The name of the virtual interface assigned by the customer network. // // VirtualInterfaceName is a required field VirtualInterfaceName *string `locationName:"virtualInterfaceName" type:"string" required:"true"` - // The VLAN ID. - // - // Example: 101 + // The ID of the VLAN. // // Vlan is a required field Vlan *int64 `locationName:"vlan" type:"integer" required:"true"` @@ -8396,6 +7912,12 @@ func (s *NewPrivateVirtualInterfaceAllocation) SetCustomerAddress(v string) *New return s } +// SetMtu sets the Mtu field's value. +func (s *NewPrivateVirtualInterfaceAllocation) SetMtu(v int64) *NewPrivateVirtualInterfaceAllocation { + s.Mtu = &v + return s +} + // SetVirtualInterfaceName sets the VirtualInterfaceName field's value. func (s *NewPrivateVirtualInterfaceAllocation) SetVirtualInterfaceName(v string) *NewPrivateVirtualInterfaceAllocation { s.VirtualInterfaceName = &v @@ -8408,53 +7930,37 @@ func (s *NewPrivateVirtualInterfaceAllocation) SetVlan(v int64) *NewPrivateVirtu return s } -// A structure containing information about a new public virtual interface. +// Information about a public virtual interface. type NewPublicVirtualInterface struct { _ struct{} `type:"structure"` - // Indicates the address family for the BGP peer. - // - // * ipv4: IPv4 address family - // - // * ipv6: IPv6 address family + // The address family for the BGP peer. AddressFamily *string `locationName:"addressFamily" type:"string" enum:"AddressFamily"` - // IP address assigned to the Amazon interface. - // - // Example: 192.168.1.1/30 or 2001:db8::1/125 + // The IP address assigned to the Amazon interface. AmazonAddress *string `locationName:"amazonAddress" type:"string"` // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. // - // Example: 65000 - // // Asn is a required field Asn *int64 `locationName:"asn" type:"integer" required:"true"` // The authentication key for BGP configuration. - // - // Example: asdf34example AuthKey *string `locationName:"authKey" type:"string"` - // IP address assigned to the customer interface. - // - // Example: 192.168.1.2/30 or 2001:db8::2/125 + // The IP address assigned to the customer interface. CustomerAddress *string `locationName:"customerAddress" type:"string"` - // A list of routes to be advertised to the AWS network in this region (public - // virtual interface). + // The routes to be advertised to the AWS network in this Region. Applies to + // public virtual interfaces. RouteFilterPrefixes []*RouteFilterPrefix `locationName:"routeFilterPrefixes" type:"list"` - // The name of the virtual interface assigned by the customer. - // - // Example: "My VPC" + // The name of the virtual interface assigned by the customer network. // // VirtualInterfaceName is a required field VirtualInterfaceName *string `locationName:"virtualInterfaceName" type:"string" required:"true"` - // The VLAN ID. - // - // Example: 101 + // The ID of the VLAN. // // Vlan is a required field Vlan *int64 `locationName:"vlan" type:"integer" required:"true"` @@ -8537,54 +8043,37 @@ func (s *NewPublicVirtualInterface) SetVlan(v int64) *NewPublicVirtualInterface return s } -// A structure containing information about a public virtual interface that -// will be provisioned on a connection. +// Information about a public virtual interface to be provisioned on a connection. type NewPublicVirtualInterfaceAllocation struct { _ struct{} `type:"structure"` - // Indicates the address family for the BGP peer. - // - // * ipv4: IPv4 address family - // - // * ipv6: IPv6 address family + // The address family for the BGP peer. AddressFamily *string `locationName:"addressFamily" type:"string" enum:"AddressFamily"` - // IP address assigned to the Amazon interface. - // - // Example: 192.168.1.1/30 or 2001:db8::1/125 + // The IP address assigned to the Amazon interface. AmazonAddress *string `locationName:"amazonAddress" type:"string"` // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. // - // Example: 65000 - // // Asn is a required field Asn *int64 `locationName:"asn" type:"integer" required:"true"` // The authentication key for BGP configuration. - // - // Example: asdf34example AuthKey *string `locationName:"authKey" type:"string"` - // IP address assigned to the customer interface. - // - // Example: 192.168.1.2/30 or 2001:db8::2/125 + // The IP address assigned to the customer interface. CustomerAddress *string `locationName:"customerAddress" type:"string"` - // A list of routes to be advertised to the AWS network in this region (public - // virtual interface). + // The routes to be advertised to the AWS network in this Region. Applies to + // public virtual interfaces. RouteFilterPrefixes []*RouteFilterPrefix `locationName:"routeFilterPrefixes" type:"list"` - // The name of the virtual interface assigned by the customer. - // - // Example: "My VPC" + // The name of the virtual interface assigned by the customer network. // // VirtualInterfaceName is a required field VirtualInterfaceName *string `locationName:"virtualInterfaceName" type:"string" required:"true"` - // The VLAN ID. - // - // Example: 101 + // The ID of the VLAN. // // Vlan is a required field Vlan *int64 `locationName:"vlan" type:"integer" required:"true"` @@ -8667,11 +8156,11 @@ func (s *NewPublicVirtualInterfaceAllocation) SetVlan(v int64) *NewPublicVirtual return s } -// The tags associated with a Direct Connect resource. +// Information about a tag associated with an AWS Direct Connect resource. type ResourceTag struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the Direct Connect resource. + // The Amazon Resource Name (ARN) of the resource. ResourceArn *string `locationName:"resourceArn" type:"string"` // The tags. @@ -8700,17 +8189,13 @@ func (s *ResourceTag) SetTags(v []*Tag) *ResourceTag { return s } -// A route filter prefix that the customer can advertise through Border Gateway -// Protocol (BGP) over a public virtual interface. +// Information about a route filter prefix that a customer can advertise through +// Border Gateway Protocol (BGP) over a public virtual interface. type RouteFilterPrefix struct { _ struct{} `type:"structure"` - // CIDR notation for the advertised route. Multiple routes are separated by - // commas. - // - // IPv6 CIDRs must be at least a /64 or shorter - // - // Example: 10.10.10.0/24,10.10.11.0/24,2001:db8::/64 + // The CIDR block for the advertised route. Separate multiple routes using commas. + // An IPv6 CIDR must use /64 or shorter. Cidr *string `locationName:"cidr" type:"string"` } @@ -8734,12 +8219,12 @@ func (s *RouteFilterPrefix) SetCidr(v string) *RouteFilterPrefix { type Tag struct { _ struct{} `type:"structure"` - // The key of the tag. + // The key. // // Key is a required field Key *string `locationName:"key" min:"1" type:"string" required:"true"` - // The value of the tag. + // The value. Value *string `locationName:"value" type:"string"` } @@ -8781,18 +8266,15 @@ func (s *Tag) SetValue(v string) *Tag { return s } -// Container for the parameters to the TagResource operation. type TagResourceInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the Direct Connect resource. - // - // Example: arn:aws:directconnect:us-east-1:123456789012:dxcon/dxcon-fg5678gh + // The Amazon Resource Name (ARN) of the resource. // // ResourceArn is a required field ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` - // The list of tags to add. + // The tags to add. // // Tags is a required field Tags []*Tag `locationName:"tags" min:"1" type:"list" required:"true"` @@ -8849,7 +8331,6 @@ func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { return s } -// The response received when TagResource is called. type TagResourceOutput struct { _ struct{} `type:"structure"` } @@ -8864,16 +8345,15 @@ func (s TagResourceOutput) GoString() string { return s.String() } -// Container for the parameters to the UntagResource operation. type UntagResourceInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the Direct Connect resource. + // The Amazon Resource Name (ARN) of the resource. // // ResourceArn is a required field ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` - // The list of tag keys to remove. + // The tag keys of the tags to remove. // // TagKeys is a required field TagKeys []*string `locationName:"tagKeys" type:"list" required:"true"` @@ -8917,7 +8397,6 @@ func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { return s } -// The response received when UntagResource is called. type UntagResourceOutput struct { _ struct{} `type:"structure"` } @@ -8932,30 +8411,19 @@ func (s UntagResourceOutput) GoString() string { return s.String() } -// Container for the parameters to the UpdateLag operation. type UpdateLagInput struct { _ struct{} `type:"structure"` - // The ID of the LAG to update. - // - // Example: dxlag-abc123 - // - // Default: None + // The ID of the LAG. // // LagId is a required field LagId *string `locationName:"lagId" type:"string" required:"true"` - // The name for the LAG. - // - // Example: "3x10G LAG to AWS" - // - // Default: None + // The name of the LAG. LagName *string `locationName:"lagName" type:"string"` // The minimum number of physical connections that must be operational for the // LAG itself to be operational. - // - // Default: None MinimumLinks *int64 `locationName:"minimumLinks" type:"integer"` } @@ -9000,30 +8468,323 @@ func (s *UpdateLagInput) SetMinimumLinks(v int64) *UpdateLagInput { return s } -// You can create one or more AWS Direct Connect private virtual interfaces -// linking to your virtual private gateway. -// -// Virtual private gateways can be managed using the Amazon Virtual Private -// Cloud (Amazon VPC) console or the Amazon EC2 CreateVpnGateway action (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-CreateVpnGateway.html). -type VirtualGateway struct { +type UpdateVirtualInterfaceAttributesInput struct { + _ struct{} `type:"structure"` + + // The maximum transmission unit (MTU), in bytes. The supported values are 1500 + // and 9001. The default value is 1500. + Mtu *int64 `locationName:"mtu" type:"integer"` + + // The ID of the virtual private interface. + // + // VirtualInterfaceId is a required field + VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateVirtualInterfaceAttributesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateVirtualInterfaceAttributesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateVirtualInterfaceAttributesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateVirtualInterfaceAttributesInput"} + if s.VirtualInterfaceId == nil { + invalidParams.Add(request.NewErrParamRequired("VirtualInterfaceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMtu sets the Mtu field's value. +func (s *UpdateVirtualInterfaceAttributesInput) SetMtu(v int64) *UpdateVirtualInterfaceAttributesInput { + s.Mtu = &v + return s +} + +// SetVirtualInterfaceId sets the VirtualInterfaceId field's value. +func (s *UpdateVirtualInterfaceAttributesInput) SetVirtualInterfaceId(v string) *UpdateVirtualInterfaceAttributesInput { + s.VirtualInterfaceId = &v + return s +} + +// Information about a virtual interface. +type UpdateVirtualInterfaceAttributesOutput struct { _ struct{} `type:"structure"` - // The ID of the virtual private gateway to a VPC. This only applies to private - // virtual interfaces. + // The address family for the BGP peer. + AddressFamily *string `locationName:"addressFamily" type:"string" enum:"AddressFamily"` + + // The IP address assigned to the Amazon interface. + AmazonAddress *string `locationName:"amazonAddress" type:"string"` + + // The autonomous system number (ASN) for the Amazon side of the connection. + AmazonSideAsn *int64 `locationName:"amazonSideAsn" type:"long"` + + // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. + Asn *int64 `locationName:"asn" type:"integer"` + + // The authentication key for BGP configuration. + AuthKey *string `locationName:"authKey" type:"string"` + + // The Direct Connect endpoint on which the virtual interface terminates. + AwsDeviceV2 *string `locationName:"awsDeviceV2" type:"string"` + + // The BGP peers configured on this virtual interface. + BgpPeers []*BGPPeer `locationName:"bgpPeers" type:"list"` + + // The ID of the connection. + ConnectionId *string `locationName:"connectionId" type:"string"` + + // The IP address assigned to the customer interface. + CustomerAddress *string `locationName:"customerAddress" type:"string"` + + // The customer router configuration. + CustomerRouterConfig *string `locationName:"customerRouterConfig" type:"string"` + + // The ID of the Direct Connect gateway. + DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` + + // Indicates whether jumbo frames (9001 MTU) are supported. + JumboFrameCapable *bool `locationName:"jumboFrameCapable" type:"boolean"` + + // The location of the connection. + Location *string `locationName:"location" type:"string"` + + // The maximum transmission unit (MTU), in bytes. The supported values are 1500 + // and 9001. The default value is 1500. + Mtu *int64 `locationName:"mtu" type:"integer"` + + // The ID of the AWS account that owns the virtual interface. + OwnerAccount *string `locationName:"ownerAccount" type:"string"` + + // The AWS Region where the virtual interface is located. + Region *string `locationName:"region" type:"string"` + + // The routes to be advertised to the AWS network in this Region. Applies to + // public virtual interfaces. + RouteFilterPrefixes []*RouteFilterPrefix `locationName:"routeFilterPrefixes" type:"list"` + + // The ID of the virtual private gateway. Applies only to private virtual interfaces. + VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string"` + + // The ID of the virtual interface. + VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string"` + + // The name of the virtual interface assigned by the customer network. + VirtualInterfaceName *string `locationName:"virtualInterfaceName" type:"string"` + + // The state of the virtual interface. The following are the possible values: + // + // * confirming: The creation of the virtual interface is pending confirmation + // from the virtual interface owner. If the owner of the virtual interface + // is different from the owner of the connection on which it is provisioned, + // then the virtual interface will remain in this state until it is confirmed + // by the virtual interface owner. + // + // * verifying: This state only applies to public virtual interfaces. Each + // public virtual interface needs validation before the virtual interface + // can be created. + // + // * pending: A virtual interface is in this state from the time that it + // is created until the virtual interface is ready to forward traffic. + // + // * available: A virtual interface that is able to forward traffic. + // + // * down: A virtual interface that is BGP down. + // + // * deleting: A virtual interface is in this state immediately after calling + // DeleteVirtualInterface until it can no longer forward traffic. // - // Example: vgw-123er56 + // * deleted: A virtual interface that cannot forward traffic. + // + // * rejected: The virtual interface owner has declined creation of the virtual + // interface. If a virtual interface in the Confirming state is deleted by + // the virtual interface owner, the virtual interface enters the Rejected + // state. + VirtualInterfaceState *string `locationName:"virtualInterfaceState" type:"string" enum:"VirtualInterfaceState"` + + // The type of virtual interface. The possible values are private and public. + VirtualInterfaceType *string `locationName:"virtualInterfaceType" type:"string"` + + // The ID of the VLAN. + Vlan *int64 `locationName:"vlan" type:"integer"` +} + +// String returns the string representation +func (s UpdateVirtualInterfaceAttributesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateVirtualInterfaceAttributesOutput) GoString() string { + return s.String() +} + +// SetAddressFamily sets the AddressFamily field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetAddressFamily(v string) *UpdateVirtualInterfaceAttributesOutput { + s.AddressFamily = &v + return s +} + +// SetAmazonAddress sets the AmazonAddress field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetAmazonAddress(v string) *UpdateVirtualInterfaceAttributesOutput { + s.AmazonAddress = &v + return s +} + +// SetAmazonSideAsn sets the AmazonSideAsn field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetAmazonSideAsn(v int64) *UpdateVirtualInterfaceAttributesOutput { + s.AmazonSideAsn = &v + return s +} + +// SetAsn sets the Asn field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetAsn(v int64) *UpdateVirtualInterfaceAttributesOutput { + s.Asn = &v + return s +} + +// SetAuthKey sets the AuthKey field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetAuthKey(v string) *UpdateVirtualInterfaceAttributesOutput { + s.AuthKey = &v + return s +} + +// SetAwsDeviceV2 sets the AwsDeviceV2 field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetAwsDeviceV2(v string) *UpdateVirtualInterfaceAttributesOutput { + s.AwsDeviceV2 = &v + return s +} + +// SetBgpPeers sets the BgpPeers field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetBgpPeers(v []*BGPPeer) *UpdateVirtualInterfaceAttributesOutput { + s.BgpPeers = v + return s +} + +// SetConnectionId sets the ConnectionId field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetConnectionId(v string) *UpdateVirtualInterfaceAttributesOutput { + s.ConnectionId = &v + return s +} + +// SetCustomerAddress sets the CustomerAddress field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetCustomerAddress(v string) *UpdateVirtualInterfaceAttributesOutput { + s.CustomerAddress = &v + return s +} + +// SetCustomerRouterConfig sets the CustomerRouterConfig field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetCustomerRouterConfig(v string) *UpdateVirtualInterfaceAttributesOutput { + s.CustomerRouterConfig = &v + return s +} + +// SetDirectConnectGatewayId sets the DirectConnectGatewayId field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetDirectConnectGatewayId(v string) *UpdateVirtualInterfaceAttributesOutput { + s.DirectConnectGatewayId = &v + return s +} + +// SetJumboFrameCapable sets the JumboFrameCapable field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetJumboFrameCapable(v bool) *UpdateVirtualInterfaceAttributesOutput { + s.JumboFrameCapable = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetLocation(v string) *UpdateVirtualInterfaceAttributesOutput { + s.Location = &v + return s +} + +// SetMtu sets the Mtu field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetMtu(v int64) *UpdateVirtualInterfaceAttributesOutput { + s.Mtu = &v + return s +} + +// SetOwnerAccount sets the OwnerAccount field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetOwnerAccount(v string) *UpdateVirtualInterfaceAttributesOutput { + s.OwnerAccount = &v + return s +} + +// SetRegion sets the Region field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetRegion(v string) *UpdateVirtualInterfaceAttributesOutput { + s.Region = &v + return s +} + +// SetRouteFilterPrefixes sets the RouteFilterPrefixes field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetRouteFilterPrefixes(v []*RouteFilterPrefix) *UpdateVirtualInterfaceAttributesOutput { + s.RouteFilterPrefixes = v + return s +} + +// SetVirtualGatewayId sets the VirtualGatewayId field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetVirtualGatewayId(v string) *UpdateVirtualInterfaceAttributesOutput { + s.VirtualGatewayId = &v + return s +} + +// SetVirtualInterfaceId sets the VirtualInterfaceId field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetVirtualInterfaceId(v string) *UpdateVirtualInterfaceAttributesOutput { + s.VirtualInterfaceId = &v + return s +} + +// SetVirtualInterfaceName sets the VirtualInterfaceName field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetVirtualInterfaceName(v string) *UpdateVirtualInterfaceAttributesOutput { + s.VirtualInterfaceName = &v + return s +} + +// SetVirtualInterfaceState sets the VirtualInterfaceState field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetVirtualInterfaceState(v string) *UpdateVirtualInterfaceAttributesOutput { + s.VirtualInterfaceState = &v + return s +} + +// SetVirtualInterfaceType sets the VirtualInterfaceType field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetVirtualInterfaceType(v string) *UpdateVirtualInterfaceAttributesOutput { + s.VirtualInterfaceType = &v + return s +} + +// SetVlan sets the Vlan field's value. +func (s *UpdateVirtualInterfaceAttributesOutput) SetVlan(v int64) *UpdateVirtualInterfaceAttributesOutput { + s.Vlan = &v + return s +} + +// Information about a virtual private gateway for a private virtual interface. +type VirtualGateway struct { + _ struct{} `type:"structure"` + + // The ID of the virtual private gateway. VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string"` - // State of the virtual private gateway. + // The state of the virtual private gateway. The following are the possible + // values: // - // * Pending: This is the initial state after calling CreateVpnGateway. + // * pending: Initial state after creating the virtual private gateway. // - // * Available: Ready for use by a private virtual interface. + // * available: Ready for use by a private virtual interface. // - // * Deleting: This is the initial state after calling DeleteVpnGateway. + // * deleting: Initial state after deleting the virtual private gateway. // - // * Deleted: In this state, a private virtual interface is unable to send - // traffic over this gateway. + // * deleted: The virtual private gateway is deleted. The private virtual + // interface is unable to send traffic over this gateway. VirtualGatewayState *string `locationName:"virtualGatewayState" type:"string"` } @@ -9049,141 +8810,106 @@ func (s *VirtualGateway) SetVirtualGatewayState(v string) *VirtualGateway { return s } -// A virtual interface (VLAN) transmits the traffic between the AWS Direct Connect -// location and the customer. +// Information about a virtual interface. type VirtualInterface struct { _ struct{} `type:"structure"` - // Indicates the address family for the BGP peer. - // - // * ipv4: IPv4 address family - // - // * ipv6: IPv6 address family + // The address family for the BGP peer. AddressFamily *string `locationName:"addressFamily" type:"string" enum:"AddressFamily"` - // IP address assigned to the Amazon interface. - // - // Example: 192.168.1.1/30 or 2001:db8::1/125 + // The IP address assigned to the Amazon interface. AmazonAddress *string `locationName:"amazonAddress" type:"string"` // The autonomous system number (ASN) for the Amazon side of the connection. AmazonSideAsn *int64 `locationName:"amazonSideAsn" type:"long"` // The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration. - // - // Example: 65000 Asn *int64 `locationName:"asn" type:"integer"` // The authentication key for BGP configuration. - // - // Example: asdf34example AuthKey *string `locationName:"authKey" type:"string"` - // The Direct Connection endpoint which the virtual interface terminates on. + // The Direct Connect endpoint on which the virtual interface terminates. AwsDeviceV2 *string `locationName:"awsDeviceV2" type:"string"` - // A list of the BGP peers configured on this virtual interface. + // The BGP peers configured on this virtual interface. BgpPeers []*BGPPeer `locationName:"bgpPeers" type:"list"` - // The ID of the connection. This field is also used as the ID type for operations - // that use multiple connection types (LAG, interconnect, and/or connection). - // - // Example: dxcon-fg5678gh - // - // Default: None + // The ID of the connection. ConnectionId *string `locationName:"connectionId" type:"string"` - // IP address assigned to the customer interface. - // - // Example: 192.168.1.2/30 or 2001:db8::2/125 + // The IP address assigned to the customer interface. CustomerAddress *string `locationName:"customerAddress" type:"string"` - // Information for generating the customer router configuration. + // The customer router configuration. CustomerRouterConfig *string `locationName:"customerRouterConfig" type:"string"` - // The ID of the direct connect gateway. - // - // Example: "abcd1234-dcba-5678-be23-cdef9876ab45" + // The ID of the Direct Connect gateway. DirectConnectGatewayId *string `locationName:"directConnectGatewayId" type:"string"` - // Where the connection is located. - // - // Example: EqSV5 - // - // Default: None + // Indicates whether jumbo frames (9001 MTU) are supported. + JumboFrameCapable *bool `locationName:"jumboFrameCapable" type:"boolean"` + + // The location of the connection. Location *string `locationName:"location" type:"string"` - // The AWS account that will own the new virtual interface. + // The maximum transmission unit (MTU), in bytes. The supported values are 1500 + // and 9001. The default value is 1500. + Mtu *int64 `locationName:"mtu" type:"integer"` + + // The ID of the AWS account that owns the virtual interface. OwnerAccount *string `locationName:"ownerAccount" type:"string"` - // The AWS region where the virtual interface is located. - // - // Example: us-east-1 - // - // Default: None + // The AWS Region where the virtual interface is located. Region *string `locationName:"region" type:"string"` - // A list of routes to be advertised to the AWS network in this region (public - // virtual interface). + // The routes to be advertised to the AWS network in this Region. Applies to + // public virtual interfaces. RouteFilterPrefixes []*RouteFilterPrefix `locationName:"routeFilterPrefixes" type:"list"` - // The ID of the virtual private gateway to a VPC. This only applies to private - // virtual interfaces. - // - // Example: vgw-123er56 + // The ID of the virtual private gateway. Applies only to private virtual interfaces. VirtualGatewayId *string `locationName:"virtualGatewayId" type:"string"` // The ID of the virtual interface. - // - // Example: dxvif-123dfg56 - // - // Default: None VirtualInterfaceId *string `locationName:"virtualInterfaceId" type:"string"` - // The name of the virtual interface assigned by the customer. - // - // Example: "My VPC" + // The name of the virtual interface assigned by the customer network. VirtualInterfaceName *string `locationName:"virtualInterfaceName" type:"string"` - // State of the virtual interface. + // The state of the virtual interface. The following are the possible values: // - // * Confirming: The creation of the virtual interface is pending confirmation + // * confirming: The creation of the virtual interface is pending confirmation // from the virtual interface owner. If the owner of the virtual interface // is different from the owner of the connection on which it is provisioned, // then the virtual interface will remain in this state until it is confirmed // by the virtual interface owner. // - // * Verifying: This state only applies to public virtual interfaces. Each + // * verifying: This state only applies to public virtual interfaces. Each // public virtual interface needs validation before the virtual interface // can be created. // - // * Pending: A virtual interface is in this state from the time that it + // * pending: A virtual interface is in this state from the time that it // is created until the virtual interface is ready to forward traffic. // - // * Available: A virtual interface that is able to forward traffic. + // * available: A virtual interface that is able to forward traffic. // - // * Down: A virtual interface that is BGP down. + // * down: A virtual interface that is BGP down. // - // * Deleting: A virtual interface is in this state immediately after calling + // * deleting: A virtual interface is in this state immediately after calling // DeleteVirtualInterface until it can no longer forward traffic. // - // * Deleted: A virtual interface that cannot forward traffic. + // * deleted: A virtual interface that cannot forward traffic. // - // * Rejected: The virtual interface owner has declined creation of the virtual - // interface. If a virtual interface in the 'Confirming' state is deleted - // by the virtual interface owner, the virtual interface will enter the 'Rejected' + // * rejected: The virtual interface owner has declined creation of the virtual + // interface. If a virtual interface in the Confirming state is deleted by + // the virtual interface owner, the virtual interface enters the Rejected // state. VirtualInterfaceState *string `locationName:"virtualInterfaceState" type:"string" enum:"VirtualInterfaceState"` - // The type of virtual interface. - // - // Example: private (Amazon VPC) or public (Amazon S3, Amazon DynamoDB, and - // so on.) + // The type of virtual interface. The possible values are private and public. VirtualInterfaceType *string `locationName:"virtualInterfaceType" type:"string"` - // The VLAN ID. - // - // Example: 101 + // The ID of the VLAN. Vlan *int64 `locationName:"vlan" type:"integer"` } @@ -9263,12 +8989,24 @@ func (s *VirtualInterface) SetDirectConnectGatewayId(v string) *VirtualInterface return s } +// SetJumboFrameCapable sets the JumboFrameCapable field's value. +func (s *VirtualInterface) SetJumboFrameCapable(v bool) *VirtualInterface { + s.JumboFrameCapable = &v + return s +} + // SetLocation sets the Location field's value. func (s *VirtualInterface) SetLocation(v string) *VirtualInterface { s.Location = &v return s } +// SetMtu sets the Mtu field's value. +func (s *VirtualInterface) SetMtu(v int64) *VirtualInterface { + s.Mtu = &v + return s +} + // SetOwnerAccount sets the OwnerAccount field's value. func (s *VirtualInterface) SetOwnerAccount(v string) *VirtualInterface { s.OwnerAccount = &v @@ -9323,11 +9061,6 @@ func (s *VirtualInterface) SetVlan(v int64) *VirtualInterface { return s } -// Indicates the address family for the BGP peer. -// -// * ipv4: IPv4 address family -// -// * ipv6: IPv6 address family const ( // AddressFamilyIpv4 is a AddressFamily enum value AddressFamilyIpv4 = "ipv4" @@ -9336,20 +9069,6 @@ const ( AddressFamilyIpv6 = "ipv6" ) -// The state of the BGP peer. -// -// * Verifying: The BGP peering addresses or ASN require validation before -// the BGP peer can be created. This state only applies to BGP peers on a -// public virtual interface. -// -// * Pending: The BGP peer has been created, and is in this state until it -// is ready to be established. -// -// * Available: The BGP peer can be established. -// -// * Deleting: The BGP peer is in the process of being deleted. -// -// * Deleted: The BGP peer has been deleted and cannot be established. const ( // BGPPeerStateVerifying is a BGPPeerState enum value BGPPeerStateVerifying = "verifying" @@ -9367,14 +9086,6 @@ const ( BGPPeerStateDeleted = "deleted" ) -// The Up/Down state of the BGP peer. -// -// * Up: The BGP peer is established. -// -// A state of up does not indicate the state of the routing function. Ensure -// that you are receiving routes over the BGP session. -// -// * Down: The BGP peer is down. const ( // BGPStatusUp is a BGPStatus enum value BGPStatusUp = "up" @@ -9383,28 +9094,6 @@ const ( BGPStatusDown = "down" ) -// State of the connection. -// -// * Ordering: The initial state of a hosted connection provisioned on an -// interconnect. The connection stays in the ordering state until the owner -// of the hosted connection confirms or declines the connection order. -// -// * Requested: The initial state of a standard connection. The connection -// stays in the requested state until the Letter of Authorization (LOA) is -// sent to the customer. -// -// * Pending: The connection has been approved, and is being initialized. -// -// * Available: The network link is up, and the connection is ready for use. -// -// * Down: The network link is down. -// -// * Deleting: The connection is in the process of being deleted. -// -// * Deleted: The connection has been deleted. -// -// * Rejected: A hosted connection in the 'Ordering' state will enter the -// 'Rejected' state if it is deleted by the end customer. const ( // ConnectionStateOrdering is a ConnectionState enum value ConnectionStateOrdering = "ordering" @@ -9431,18 +9120,6 @@ const ( ConnectionStateRejected = "rejected" ) -// State of the direct connect gateway association. -// -// * Associating: The initial state after calling CreateDirectConnectGatewayAssociation. -// -// * Associated: The direct connect gateway and virtual private gateway are -// successfully associated and ready to pass traffic. -// -// * Disassociating: The initial state after calling DeleteDirectConnectGatewayAssociation. -// -// * Disassociated: The virtual private gateway is successfully disassociated -// from the direct connect gateway. Traffic flow between the direct connect -// gateway and virtual private gateway stops. const ( // GatewayAssociationStateAssociating is a GatewayAssociationState enum value GatewayAssociationStateAssociating = "associating" @@ -9457,20 +9134,6 @@ const ( GatewayAssociationStateDisassociated = "disassociated" ) -// State of the direct connect gateway attachment. -// -// * Attaching: The initial state after a virtual interface is created using -// the direct connect gateway. -// -// * Attached: The direct connect gateway and virtual interface are successfully -// attached and ready to pass traffic. -// -// * Detaching: The initial state after calling DeleteVirtualInterface on -// a virtual interface that is attached to a direct connect gateway. -// -// * Detached: The virtual interface is successfully detached from the direct -// connect gateway. Traffic flow between the direct connect gateway and virtual -// interface stops. const ( // GatewayAttachmentStateAttaching is a GatewayAttachmentState enum value GatewayAttachmentStateAttaching = "attaching" @@ -9485,15 +9148,6 @@ const ( GatewayAttachmentStateDetached = "detached" ) -// State of the direct connect gateway. -// -// * Pending: The initial state after calling CreateDirectConnectGateway. -// -// * Available: The direct connect gateway is ready for use. -// -// * Deleting: The initial state after calling DeleteDirectConnectGateway. -// -// * Deleted: The direct connect gateway is deleted and cannot pass traffic. const ( // GatewayStatePending is a GatewayState enum value GatewayStatePending = "pending" @@ -9508,22 +9162,17 @@ const ( GatewayStateDeleted = "deleted" ) -// State of the interconnect. -// -// * Requested: The initial state of an interconnect. The interconnect stays -// in the requested state until the Letter of Authorization (LOA) is sent -// to the customer. -// -// * Pending: The interconnect has been approved, and is being initialized. -// -// * Available: The network link is up, and the interconnect is ready for -// use. -// -// * Down: The network link is down. -// -// * Deleting: The interconnect is in the process of being deleted. -// -// * Deleted: The interconnect has been deleted. +const ( + // HasLogicalRedundancyUnknown is a HasLogicalRedundancy enum value + HasLogicalRedundancyUnknown = "unknown" + + // HasLogicalRedundancyYes is a HasLogicalRedundancy enum value + HasLogicalRedundancyYes = "yes" + + // HasLogicalRedundancyNo is a HasLogicalRedundancy enum value + HasLogicalRedundancyNo = "no" +) + const ( // InterconnectStateRequested is a InterconnectState enum value InterconnectStateRequested = "requested" @@ -9544,21 +9193,6 @@ const ( InterconnectStateDeleted = "deleted" ) -// The state of the LAG. -// -// * Requested: The initial state of a LAG. The LAG stays in the requested -// state until the Letter of Authorization (LOA) is available. -// -// * Pending: The LAG has been approved, and is being initialized. -// -// * Available: The network link is established, and the LAG is ready for -// use. -// -// * Down: The network link is down. -// -// * Deleting: The LAG is in the process of being deleted. -// -// * Deleted: The LAG has been deleted. const ( // LagStateRequested is a LagState enum value LagStateRequested = "requested" @@ -9579,43 +9213,11 @@ const ( LagStateDeleted = "deleted" ) -// A standard media type indicating the content type of the LOA-CFA document. -// Currently, the only supported value is "application/pdf". -// -// Default: application/pdf const ( // LoaContentTypeApplicationPdf is a LoaContentType enum value LoaContentTypeApplicationPdf = "application/pdf" ) -// State of the virtual interface. -// -// * Confirming: The creation of the virtual interface is pending confirmation -// from the virtual interface owner. If the owner of the virtual interface -// is different from the owner of the connection on which it is provisioned, -// then the virtual interface will remain in this state until it is confirmed -// by the virtual interface owner. -// -// * Verifying: This state only applies to public virtual interfaces. Each -// public virtual interface needs validation before the virtual interface -// can be created. -// -// * Pending: A virtual interface is in this state from the time that it -// is created until the virtual interface is ready to forward traffic. -// -// * Available: A virtual interface that is able to forward traffic. -// -// * Down: A virtual interface that is BGP down. -// -// * Deleting: A virtual interface is in this state immediately after calling -// DeleteVirtualInterface until it can no longer forward traffic. -// -// * Deleted: A virtual interface that cannot forward traffic. -// -// * Rejected: The virtual interface owner has declined creation of the virtual -// interface. If a virtual interface in the 'Confirming' state is deleted -// by the virtual interface owner, the virtual interface will enter the 'Rejected' -// state. const ( // VirtualInterfaceStateConfirming is a VirtualInterfaceState enum value VirtualInterfaceStateConfirming = "confirming" diff --git a/vendor/github.com/aws/aws-sdk-go/service/directconnect/doc.go b/vendor/github.com/aws/aws-sdk-go/service/directconnect/doc.go index 277fbe626f..de61cdbfa7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/directconnect/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/directconnect/doc.go @@ -4,17 +4,14 @@ // requests to AWS Direct Connect. // // AWS Direct Connect links your internal network to an AWS Direct Connect location -// over a standard 1 gigabit or 10 gigabit Ethernet fiber-optic cable. One end -// of the cable is connected to your router, the other to an AWS Direct Connect -// router. With this connection in place, you can create virtual interfaces -// directly to the AWS cloud (for example, to Amazon Elastic Compute Cloud (Amazon -// EC2) and Amazon Simple Storage Service (Amazon S3)) and to Amazon Virtual -// Private Cloud (Amazon VPC), bypassing Internet service providers in your -// network path. An AWS Direct Connect location provides access to AWS in the -// region it is associated with, as well as access to other US regions. For -// example, you can provision a single connection to any AWS Direct Connect -// location in the US and use it to access public AWS services in all US Regions -// and AWS GovCloud (US). +// over a standard Ethernet fiber-optic cable. One end of the cable is connected +// to your router, the other to an AWS Direct Connect router. With this connection +// in place, you can create virtual interfaces directly to the AWS cloud (for +// example, to Amazon EC2 and Amazon S3) and to Amazon VPC, bypassing Internet +// service providers in your network path. A connection provides access to all +// AWS Regions except the China (Beijing) and (China) Ningxia Regions. AWS resources +// in the China Regions can only be accessed through locations associated with +// those Regions. // // See https://docs.aws.amazon.com/goto/WebAPI/directconnect-2012-10-25 for more information on this service. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/directconnect/errors.go b/vendor/github.com/aws/aws-sdk-go/service/directconnect/errors.go index 454cfe5ae5..9d6f810311 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/directconnect/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/directconnect/errors.go @@ -7,8 +7,7 @@ const ( // ErrCodeClientException for service response error code // "DirectConnectClientException". // - // The API was called with invalid parameters. The error message will contain - // additional details about the cause. + // One or more parameters are not valid. ErrCodeClientException = "DirectConnectClientException" // ErrCodeDuplicateTagKeysException for service response error code @@ -20,14 +19,12 @@ const ( // ErrCodeServerException for service response error code // "DirectConnectServerException". // - // A server-side error occurred during the API call. The error message will - // contain additional details about the cause. + // A server-side error occurred. ErrCodeServerException = "DirectConnectServerException" // ErrCodeTooManyTagsException for service response error code // "TooManyTagsException". // - // You have reached the limit on the number of tags that can be assigned to - // a Direct Connect resource. + // You have reached the limit on the number of tags that can be assigned. ErrCodeTooManyTagsException = "TooManyTagsException" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/directoryservice/api.go index 77c69861bb..c14ce177c0 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/directoryservice/api.go @@ -9,14 +9,108 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) +const opAcceptSharedDirectory = "AcceptSharedDirectory" + +// AcceptSharedDirectoryRequest generates a "aws/request.Request" representing the +// client's request for the AcceptSharedDirectory 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 AcceptSharedDirectory for more information on using the AcceptSharedDirectory +// 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 AcceptSharedDirectoryRequest method. +// req, resp := client.AcceptSharedDirectoryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/AcceptSharedDirectory +func (c *DirectoryService) AcceptSharedDirectoryRequest(input *AcceptSharedDirectoryInput) (req *request.Request, output *AcceptSharedDirectoryOutput) { + op := &request.Operation{ + Name: opAcceptSharedDirectory, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AcceptSharedDirectoryInput{} + } + + output = &AcceptSharedDirectoryOutput{} + req = c.newRequest(op, input, output) + return +} + +// AcceptSharedDirectory API operation for AWS Directory Service. +// +// Accepts a directory sharing request that was sent from the directory owner +// 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 Directory Service's +// API operation AcceptSharedDirectory for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters are not valid. +// +// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" +// The specified entity could not be found. +// +// * ErrCodeDirectoryAlreadySharedException "DirectoryAlreadySharedException" +// The specified directory has already been shared with this AWS account. +// +// * ErrCodeClientException "ClientException" +// A client exception has occurred. +// +// * ErrCodeServiceException "ServiceException" +// An exception has occurred in AWS Directory Service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/AcceptSharedDirectory +func (c *DirectoryService) AcceptSharedDirectory(input *AcceptSharedDirectoryInput) (*AcceptSharedDirectoryOutput, error) { + req, out := c.AcceptSharedDirectoryRequest(input) + return out, req.Send() +} + +// AcceptSharedDirectoryWithContext is the same as AcceptSharedDirectory with the addition of +// the ability to pass a context and additional request options. +// +// See AcceptSharedDirectory 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 *DirectoryService) AcceptSharedDirectoryWithContext(ctx aws.Context, input *AcceptSharedDirectoryInput, opts ...request.Option) (*AcceptSharedDirectoryOutput, error) { + req, out := c.AcceptSharedDirectoryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opAddIpRoutes = "AddIpRoutes" // AddIpRoutesRequest generates a "aws/request.Request" representing the // client's request for the AddIpRoutes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -50,6 +144,7 @@ func (c *DirectoryService) AddIpRoutesRequest(input *AddIpRoutesInput) (req *req output = &AddIpRoutesOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -123,7 +218,7 @@ const opAddTagsToResource = "AddTagsToResource" // AddTagsToResourceRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -157,6 +252,7 @@ func (c *DirectoryService) AddTagsToResourceRequest(input *AddTagsToResourceInpu output = &AddTagsToResourceOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -216,7 +312,7 @@ const opCancelSchemaExtension = "CancelSchemaExtension" // CancelSchemaExtensionRequest generates a "aws/request.Request" representing the // client's request for the CancelSchemaExtension operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -250,6 +346,7 @@ func (c *DirectoryService) CancelSchemaExtensionRequest(input *CancelSchemaExten output = &CancelSchemaExtensionOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -304,7 +401,7 @@ const opConnectDirectory = "ConnectDirectory" // ConnectDirectoryRequest generates a "aws/request.Request" representing the // client's request for the ConnectDirectory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -399,7 +496,7 @@ const opCreateAlias = "CreateAlias" // CreateAliasRequest generates a "aws/request.Request" representing the // client's request for the CreateAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -495,7 +592,7 @@ const opCreateComputer = "CreateComputer" // CreateComputerRequest generates a "aws/request.Request" representing the // client's request for the CreateComputer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -596,7 +693,7 @@ const opCreateConditionalForwarder = "CreateConditionalForwarder" // CreateConditionalForwarderRequest generates a "aws/request.Request" representing the // client's request for the CreateConditionalForwarder operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -630,6 +727,7 @@ func (c *DirectoryService) CreateConditionalForwarderRequest(input *CreateCondit output = &CreateConditionalForwarderOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -695,7 +793,7 @@ const opCreateDirectory = "CreateDirectory" // CreateDirectoryRequest generates a "aws/request.Request" representing the // client's request for the CreateDirectory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -785,12 +883,108 @@ func (c *DirectoryService) CreateDirectoryWithContext(ctx aws.Context, input *Cr return out, req.Send() } +const opCreateLogSubscription = "CreateLogSubscription" + +// CreateLogSubscriptionRequest generates a "aws/request.Request" representing the +// client's request for the CreateLogSubscription 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 CreateLogSubscription for more information on using the CreateLogSubscription +// 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 CreateLogSubscriptionRequest method. +// req, resp := client.CreateLogSubscriptionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/CreateLogSubscription +func (c *DirectoryService) CreateLogSubscriptionRequest(input *CreateLogSubscriptionInput) (req *request.Request, output *CreateLogSubscriptionOutput) { + op := &request.Operation{ + Name: opCreateLogSubscription, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateLogSubscriptionInput{} + } + + output = &CreateLogSubscriptionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// CreateLogSubscription API operation for AWS Directory Service. +// +// Creates a subscription to forward real time Directory Service domain controller +// security logs to the specified CloudWatch log group in your 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 Directory Service's +// API operation CreateLogSubscription for usage and error information. +// +// Returned Error Codes: +// * ErrCodeEntityAlreadyExistsException "EntityAlreadyExistsException" +// The specified entity already exists. +// +// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" +// The specified entity could not be found. +// +// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" +// The operation is not supported. +// +// * ErrCodeInsufficientPermissionsException "InsufficientPermissionsException" +// The account does not have sufficient permission to perform the operation. +// +// * ErrCodeClientException "ClientException" +// A client exception has occurred. +// +// * ErrCodeServiceException "ServiceException" +// An exception has occurred in AWS Directory Service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/CreateLogSubscription +func (c *DirectoryService) CreateLogSubscription(input *CreateLogSubscriptionInput) (*CreateLogSubscriptionOutput, error) { + req, out := c.CreateLogSubscriptionRequest(input) + return out, req.Send() +} + +// CreateLogSubscriptionWithContext is the same as CreateLogSubscription with the addition of +// the ability to pass a context and additional request options. +// +// See CreateLogSubscription 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 *DirectoryService) CreateLogSubscriptionWithContext(ctx aws.Context, input *CreateLogSubscriptionInput, opts ...request.Option) (*CreateLogSubscriptionOutput, error) { + req, out := c.CreateLogSubscriptionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateMicrosoftAD = "CreateMicrosoftAD" // CreateMicrosoftADRequest generates a "aws/request.Request" representing the // client's request for the CreateMicrosoftAD operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -829,7 +1023,7 @@ func (c *DirectoryService) CreateMicrosoftADRequest(input *CreateMicrosoftADInpu // CreateMicrosoftAD API operation for AWS Directory Service. // -// Creates a Microsoft AD in the AWS cloud. +// Creates an AWS Managed Microsoft AD directory. // // Before you call CreateMicrosoftAD, ensure that all of the required permissions // have been explicitly granted through a policy. For details about what permissions @@ -888,7 +1082,7 @@ const opCreateSnapshot = "CreateSnapshot" // CreateSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -983,7 +1177,7 @@ const opCreateTrust = "CreateTrust" // CreateTrustRequest generates a "aws/request.Request" representing the // client's request for the CreateTrust operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1024,12 +1218,13 @@ func (c *DirectoryService) CreateTrustRequest(input *CreateTrustInput) (req *req // // AWS Directory Service for Microsoft Active Directory allows you to configure // trust relationships. For example, you can establish a trust between your -// Microsoft AD in the AWS cloud, and your existing on-premises Microsoft Active -// Directory. This would allow you to provide users and groups access to resources -// in either domain, with a single set of credentials. +// AWS Managed Microsoft AD directory, and your existing on-premises Microsoft +// Active Directory. This would allow you to provide users and groups access +// to resources in either domain, with a single set of credentials. // // This action initiates the creation of the AWS side of a trust relationship -// between a Microsoft AD in the AWS cloud and an external domain. +// between an AWS Managed Microsoft AD directory and an external domain. You +// can create either a forest trust or an external trust. // // 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 @@ -1084,7 +1279,7 @@ const opDeleteConditionalForwarder = "DeleteConditionalForwarder" // DeleteConditionalForwarderRequest generates a "aws/request.Request" representing the // client's request for the DeleteConditionalForwarder operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1118,6 +1313,7 @@ func (c *DirectoryService) DeleteConditionalForwarderRequest(input *DeleteCondit output = &DeleteConditionalForwarderOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1178,7 +1374,7 @@ const opDeleteDirectory = "DeleteDirectory" // DeleteDirectoryRequest generates a "aws/request.Request" representing the // client's request for the DeleteDirectory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1263,12 +1459,101 @@ func (c *DirectoryService) DeleteDirectoryWithContext(ctx aws.Context, input *De return out, req.Send() } +const opDeleteLogSubscription = "DeleteLogSubscription" + +// DeleteLogSubscriptionRequest generates a "aws/request.Request" representing the +// client's request for the DeleteLogSubscription 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 DeleteLogSubscription for more information on using the DeleteLogSubscription +// 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 DeleteLogSubscriptionRequest method. +// req, resp := client.DeleteLogSubscriptionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DeleteLogSubscription +func (c *DirectoryService) DeleteLogSubscriptionRequest(input *DeleteLogSubscriptionInput) (req *request.Request, output *DeleteLogSubscriptionOutput) { + op := &request.Operation{ + Name: opDeleteLogSubscription, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteLogSubscriptionInput{} + } + + output = &DeleteLogSubscriptionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteLogSubscription API operation for AWS Directory Service. +// +// Deletes the specified log subscription. +// +// 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 Directory Service's +// API operation DeleteLogSubscription for usage and error information. +// +// Returned Error Codes: +// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" +// The specified entity could not be found. +// +// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" +// The operation is not supported. +// +// * ErrCodeClientException "ClientException" +// A client exception has occurred. +// +// * ErrCodeServiceException "ServiceException" +// An exception has occurred in AWS Directory Service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DeleteLogSubscription +func (c *DirectoryService) DeleteLogSubscription(input *DeleteLogSubscriptionInput) (*DeleteLogSubscriptionOutput, error) { + req, out := c.DeleteLogSubscriptionRequest(input) + return out, req.Send() +} + +// DeleteLogSubscriptionWithContext is the same as DeleteLogSubscription with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteLogSubscription 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 *DirectoryService) DeleteLogSubscriptionWithContext(ctx aws.Context, input *DeleteLogSubscriptionInput, opts ...request.Option) (*DeleteLogSubscriptionOutput, error) { + req, out := c.DeleteLogSubscriptionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteSnapshot = "DeleteSnapshot" // DeleteSnapshotRequest generates a "aws/request.Request" representing the // client's request for the DeleteSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1356,7 +1641,7 @@ const opDeleteTrust = "DeleteTrust" // DeleteTrustRequest generates a "aws/request.Request" representing the // client's request for the DeleteTrust operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1395,8 +1680,8 @@ func (c *DirectoryService) DeleteTrustRequest(input *DeleteTrustInput) (req *req // DeleteTrust API operation for AWS Directory Service. // -// Deletes an existing trust relationship between your Microsoft AD in the AWS -// cloud and an external domain. +// Deletes an existing trust relationship between your AWS Managed Microsoft +// AD directory and an external 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 @@ -1448,7 +1733,7 @@ const opDeregisterEventTopic = "DeregisterEventTopic" // DeregisterEventTopicRequest generates a "aws/request.Request" representing the // client's request for the DeregisterEventTopic operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1482,6 +1767,7 @@ func (c *DirectoryService) DeregisterEventTopicRequest(input *DeregisterEventTop output = &DeregisterEventTopicOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1536,7 +1822,7 @@ const opDescribeConditionalForwarders = "DescribeConditionalForwarders" // DescribeConditionalForwardersRequest generates a "aws/request.Request" representing the // client's request for the DescribeConditionalForwarders operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1633,7 +1919,7 @@ const opDescribeDirectories = "DescribeDirectories" // DescribeDirectoriesRequest generates a "aws/request.Request" representing the // client's request for the DescribeDirectories operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1735,7 +2021,7 @@ const opDescribeDomainControllers = "DescribeDomainControllers" // DescribeDomainControllersRequest generates a "aws/request.Request" representing the // client's request for the DescribeDomainControllers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1885,7 +2171,7 @@ const opDescribeEventTopics = "DescribeEventTopics" // DescribeEventTopicsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEventTopics operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1972,75 +2258,71 @@ func (c *DirectoryService) DescribeEventTopicsWithContext(ctx aws.Context, input return out, req.Send() } -const opDescribeSnapshots = "DescribeSnapshots" +const opDescribeSharedDirectories = "DescribeSharedDirectories" -// DescribeSnapshotsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSnapshots operation. The "output" return +// DescribeSharedDirectoriesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeSharedDirectories operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 DescribeSnapshots for more information on using the DescribeSnapshots +// See DescribeSharedDirectories for more information on using the DescribeSharedDirectories // 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 DescribeSnapshotsRequest method. -// req, resp := client.DescribeSnapshotsRequest(params) +// // Example sending a request using the DescribeSharedDirectoriesRequest method. +// req, resp := client.DescribeSharedDirectoriesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DescribeSnapshots -func (c *DirectoryService) DescribeSnapshotsRequest(input *DescribeSnapshotsInput) (req *request.Request, output *DescribeSnapshotsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DescribeSharedDirectories +func (c *DirectoryService) DescribeSharedDirectoriesRequest(input *DescribeSharedDirectoriesInput) (req *request.Request, output *DescribeSharedDirectoriesOutput) { op := &request.Operation{ - Name: opDescribeSnapshots, + Name: opDescribeSharedDirectories, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DescribeSnapshotsInput{} + input = &DescribeSharedDirectoriesInput{} } - output = &DescribeSnapshotsOutput{} + output = &DescribeSharedDirectoriesOutput{} req = c.newRequest(op, input, output) return } -// DescribeSnapshots API operation for AWS Directory Service. -// -// Obtains information about the directory snapshots that belong to this account. -// -// This operation supports pagination with the use of the NextToken request -// and response parameters. If more results are available, the DescribeSnapshots.NextToken -// member contains a token that you pass in the next call to DescribeSnapshots -// to retrieve the next set of items. +// DescribeSharedDirectories API operation for AWS Directory Service. // -// You can also specify a maximum number of return results with the Limit parameter. +// Returns the shared directories in your 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 Directory Service's -// API operation DescribeSnapshots for usage and error information. +// API operation DescribeSharedDirectories for usage and error information. // // Returned Error Codes: // * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" // The specified entity could not be found. // +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The NextToken value is not valid. +// // * ErrCodeInvalidParameterException "InvalidParameterException" // One or more parameters are not valid. // -// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" -// The NextToken value is not valid. +// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" +// The operation is not supported. // // * ErrCodeClientException "ClientException" // A client exception has occurred. @@ -2048,55 +2330,153 @@ func (c *DirectoryService) DescribeSnapshotsRequest(input *DescribeSnapshotsInpu // * ErrCodeServiceException "ServiceException" // An exception has occurred in AWS Directory Service. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DescribeSnapshots -func (c *DirectoryService) DescribeSnapshots(input *DescribeSnapshotsInput) (*DescribeSnapshotsOutput, error) { - req, out := c.DescribeSnapshotsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DescribeSharedDirectories +func (c *DirectoryService) DescribeSharedDirectories(input *DescribeSharedDirectoriesInput) (*DescribeSharedDirectoriesOutput, error) { + req, out := c.DescribeSharedDirectoriesRequest(input) return out, req.Send() } -// DescribeSnapshotsWithContext is the same as DescribeSnapshots with the addition of +// DescribeSharedDirectoriesWithContext is the same as DescribeSharedDirectories with the addition of // the ability to pass a context and additional request options. // -// See DescribeSnapshots for details on how to use this API operation. +// See DescribeSharedDirectories 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 *DirectoryService) DescribeSnapshotsWithContext(ctx aws.Context, input *DescribeSnapshotsInput, opts ...request.Option) (*DescribeSnapshotsOutput, error) { - req, out := c.DescribeSnapshotsRequest(input) +func (c *DirectoryService) DescribeSharedDirectoriesWithContext(ctx aws.Context, input *DescribeSharedDirectoriesInput, opts ...request.Option) (*DescribeSharedDirectoriesOutput, error) { + req, out := c.DescribeSharedDirectoriesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDescribeTrusts = "DescribeTrusts" +const opDescribeSnapshots = "DescribeSnapshots" -// DescribeTrustsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTrusts operation. The "output" return +// DescribeSnapshotsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeSnapshots operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 DescribeTrusts for more information on using the DescribeTrusts +// See DescribeSnapshots for more information on using the DescribeSnapshots // 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 DescribeTrustsRequest method. -// req, resp := client.DescribeTrustsRequest(params) +// // Example sending a request using the DescribeSnapshotsRequest method. +// req, resp := client.DescribeSnapshotsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DescribeTrusts -func (c *DirectoryService) DescribeTrustsRequest(input *DescribeTrustsInput) (req *request.Request, output *DescribeTrustsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DescribeSnapshots +func (c *DirectoryService) DescribeSnapshotsRequest(input *DescribeSnapshotsInput) (req *request.Request, output *DescribeSnapshotsOutput) { + op := &request.Operation{ + Name: opDescribeSnapshots, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeSnapshotsInput{} + } + + output = &DescribeSnapshotsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeSnapshots API operation for AWS Directory Service. +// +// Obtains information about the directory snapshots that belong to this account. +// +// This operation supports pagination with the use of the NextToken request +// and response parameters. If more results are available, the DescribeSnapshots.NextToken +// member contains a token that you pass in the next call to DescribeSnapshots +// to retrieve the next set of items. +// +// You can also specify a maximum number of return results with the Limit parameter. +// +// 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 Directory Service's +// API operation DescribeSnapshots for usage and error information. +// +// Returned Error Codes: +// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" +// The specified entity could not be found. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters are not valid. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The NextToken value is not valid. +// +// * ErrCodeClientException "ClientException" +// A client exception has occurred. +// +// * ErrCodeServiceException "ServiceException" +// An exception has occurred in AWS Directory Service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DescribeSnapshots +func (c *DirectoryService) DescribeSnapshots(input *DescribeSnapshotsInput) (*DescribeSnapshotsOutput, error) { + req, out := c.DescribeSnapshotsRequest(input) + return out, req.Send() +} + +// DescribeSnapshotsWithContext is the same as DescribeSnapshots with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeSnapshots 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 *DirectoryService) DescribeSnapshotsWithContext(ctx aws.Context, input *DescribeSnapshotsInput, opts ...request.Option) (*DescribeSnapshotsOutput, error) { + req, out := c.DescribeSnapshotsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeTrusts = "DescribeTrusts" + +// DescribeTrustsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeTrusts 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 DescribeTrusts for more information on using the DescribeTrusts +// 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 DescribeTrustsRequest method. +// req, resp := client.DescribeTrustsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DescribeTrusts +func (c *DirectoryService) DescribeTrustsRequest(input *DescribeTrustsInput) (req *request.Request, output *DescribeTrustsOutput) { op := &request.Operation{ Name: opDescribeTrusts, HTTPMethod: "POST", @@ -2172,7 +2552,7 @@ const opDisableRadius = "DisableRadius" // DisableRadiusRequest generates a "aws/request.Request" representing the // client's request for the DisableRadius operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2206,13 +2586,15 @@ func (c *DirectoryService) DisableRadiusRequest(input *DisableRadiusInput) (req output = &DisableRadiusOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DisableRadius API operation for AWS Directory Service. // // Disables multi-factor authentication (MFA) with the Remote Authentication -// Dial In User Service (RADIUS) server for an AD Connector directory. +// Dial In User Service (RADIUS) server for an AD Connector or Microsoft AD +// directory. // // 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 @@ -2258,7 +2640,7 @@ const opDisableSso = "DisableSso" // DisableSsoRequest generates a "aws/request.Request" representing the // client's request for the DisableSso operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2292,6 +2674,7 @@ func (c *DirectoryService) DisableSsoRequest(input *DisableSsoInput) (req *reque output = &DisableSsoOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2349,7 +2732,7 @@ const opEnableRadius = "EnableRadius" // EnableRadiusRequest generates a "aws/request.Request" representing the // client's request for the EnableRadius operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2383,13 +2766,15 @@ func (c *DirectoryService) EnableRadiusRequest(input *EnableRadiusInput) (req *r output = &EnableRadiusOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // EnableRadius API operation for AWS Directory Service. // // Enables multi-factor authentication (MFA) with the Remote Authentication -// Dial In User Service (RADIUS) server for an AD Connector directory. +// Dial In User Service (RADIUS) server for an AD Connector or Microsoft AD +// directory. // // 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 @@ -2441,7 +2826,7 @@ const opEnableSso = "EnableSso" // EnableSsoRequest generates a "aws/request.Request" representing the // client's request for the EnableSso operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2475,6 +2860,7 @@ func (c *DirectoryService) EnableSsoRequest(input *EnableSsoInput) (req *request output = &EnableSsoOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2532,7 +2918,7 @@ const opGetDirectoryLimits = "GetDirectoryLimits" // GetDirectoryLimitsRequest generates a "aws/request.Request" representing the // client's request for the GetDirectoryLimits operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2617,7 +3003,7 @@ const opGetSnapshotLimits = "GetSnapshotLimits" // GetSnapshotLimitsRequest generates a "aws/request.Request" representing the // client's request for the GetSnapshotLimits operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2702,7 +3088,7 @@ const opListIpRoutes = "ListIpRoutes" // ListIpRoutesRequest generates a "aws/request.Request" representing the // client's request for the ListIpRoutes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2788,12 +3174,100 @@ func (c *DirectoryService) ListIpRoutesWithContext(ctx aws.Context, input *ListI return out, req.Send() } +const opListLogSubscriptions = "ListLogSubscriptions" + +// ListLogSubscriptionsRequest generates a "aws/request.Request" representing the +// client's request for the ListLogSubscriptions 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 ListLogSubscriptions for more information on using the ListLogSubscriptions +// 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 ListLogSubscriptionsRequest method. +// req, resp := client.ListLogSubscriptionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/ListLogSubscriptions +func (c *DirectoryService) ListLogSubscriptionsRequest(input *ListLogSubscriptionsInput) (req *request.Request, output *ListLogSubscriptionsOutput) { + op := &request.Operation{ + Name: opListLogSubscriptions, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListLogSubscriptionsInput{} + } + + output = &ListLogSubscriptionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListLogSubscriptions API operation for AWS Directory Service. +// +// Lists the active log subscriptions for the 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 Directory Service's +// API operation ListLogSubscriptions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" +// The specified entity could not be found. +// +// * ErrCodeInvalidNextTokenException "InvalidNextTokenException" +// The NextToken value is not valid. +// +// * ErrCodeClientException "ClientException" +// A client exception has occurred. +// +// * ErrCodeServiceException "ServiceException" +// An exception has occurred in AWS Directory Service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/ListLogSubscriptions +func (c *DirectoryService) ListLogSubscriptions(input *ListLogSubscriptionsInput) (*ListLogSubscriptionsOutput, error) { + req, out := c.ListLogSubscriptionsRequest(input) + return out, req.Send() +} + +// ListLogSubscriptionsWithContext is the same as ListLogSubscriptions with the addition of +// the ability to pass a context and additional request options. +// +// See ListLogSubscriptions 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 *DirectoryService) ListLogSubscriptionsWithContext(ctx aws.Context, input *ListLogSubscriptionsInput, opts ...request.Option) (*ListLogSubscriptionsOutput, error) { + req, out := c.ListLogSubscriptionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListSchemaExtensions = "ListSchemaExtensions" // ListSchemaExtensionsRequest generates a "aws/request.Request" representing the // client's request for the ListSchemaExtensions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2881,7 +3355,7 @@ const opListTagsForResource = "ListTagsForResource" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2972,7 +3446,7 @@ const opRegisterEventTopic = "RegisterEventTopic" // RegisterEventTopicRequest generates a "aws/request.Request" representing the // client's request for the RegisterEventTopic operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3006,6 +3480,7 @@ func (c *DirectoryService) RegisterEventTopicRequest(input *RegisterEventTopicIn output = &RegisterEventTopicOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3060,12 +3535,104 @@ func (c *DirectoryService) RegisterEventTopicWithContext(ctx aws.Context, input return out, req.Send() } +const opRejectSharedDirectory = "RejectSharedDirectory" + +// RejectSharedDirectoryRequest generates a "aws/request.Request" representing the +// client's request for the RejectSharedDirectory 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 RejectSharedDirectory for more information on using the RejectSharedDirectory +// 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 RejectSharedDirectoryRequest method. +// req, resp := client.RejectSharedDirectoryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/RejectSharedDirectory +func (c *DirectoryService) RejectSharedDirectoryRequest(input *RejectSharedDirectoryInput) (req *request.Request, output *RejectSharedDirectoryOutput) { + op := &request.Operation{ + Name: opRejectSharedDirectory, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RejectSharedDirectoryInput{} + } + + output = &RejectSharedDirectoryOutput{} + req = c.newRequest(op, input, output) + return +} + +// RejectSharedDirectory API operation for AWS Directory Service. +// +// Rejects a directory sharing request that was sent from the directory owner +// 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 Directory Service's +// API operation RejectSharedDirectory for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters are not valid. +// +// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" +// The specified entity could not be found. +// +// * ErrCodeDirectoryAlreadySharedException "DirectoryAlreadySharedException" +// The specified directory has already been shared with this AWS account. +// +// * ErrCodeClientException "ClientException" +// A client exception has occurred. +// +// * ErrCodeServiceException "ServiceException" +// An exception has occurred in AWS Directory Service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/RejectSharedDirectory +func (c *DirectoryService) RejectSharedDirectory(input *RejectSharedDirectoryInput) (*RejectSharedDirectoryOutput, error) { + req, out := c.RejectSharedDirectoryRequest(input) + return out, req.Send() +} + +// RejectSharedDirectoryWithContext is the same as RejectSharedDirectory with the addition of +// the ability to pass a context and additional request options. +// +// See RejectSharedDirectory 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 *DirectoryService) RejectSharedDirectoryWithContext(ctx aws.Context, input *RejectSharedDirectoryInput, opts ...request.Option) (*RejectSharedDirectoryOutput, error) { + req, out := c.RejectSharedDirectoryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opRemoveIpRoutes = "RemoveIpRoutes" // RemoveIpRoutesRequest generates a "aws/request.Request" representing the // client's request for the RemoveIpRoutes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3099,6 +3666,7 @@ func (c *DirectoryService) RemoveIpRoutesRequest(input *RemoveIpRoutesInput) (re output = &RemoveIpRoutesOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3156,7 +3724,7 @@ const opRemoveTagsFromResource = "RemoveTagsFromResource" // RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3190,6 +3758,7 @@ func (c *DirectoryService) RemoveTagsFromResourceRequest(input *RemoveTagsFromRe output = &RemoveTagsFromResourceOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3244,7 +3813,7 @@ const opResetUserPassword = "ResetUserPassword" // ResetUserPasswordRequest generates a "aws/request.Request" representing the // client's request for the ResetUserPassword operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3278,6 +3847,7 @@ func (c *DirectoryService) ResetUserPasswordRequest(input *ResetUserPasswordInpu output = &ResetUserPasswordOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3343,7 +3913,7 @@ const opRestoreFromSnapshot = "RestoreFromSnapshot" // RestoreFromSnapshotRequest generates a "aws/request.Request" representing the // client's request for the RestoreFromSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3377,6 +3947,7 @@ func (c *DirectoryService) RestoreFromSnapshotRequest(input *RestoreFromSnapshot output = &RestoreFromSnapshotOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3434,78 +4005,202 @@ func (c *DirectoryService) RestoreFromSnapshotWithContext(ctx aws.Context, input return out, req.Send() } -const opStartSchemaExtension = "StartSchemaExtension" +const opShareDirectory = "ShareDirectory" -// StartSchemaExtensionRequest generates a "aws/request.Request" representing the -// client's request for the StartSchemaExtension operation. The "output" return +// ShareDirectoryRequest generates a "aws/request.Request" representing the +// client's request for the ShareDirectory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 StartSchemaExtension for more information on using the StartSchemaExtension +// See ShareDirectory for more information on using the ShareDirectory // 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 StartSchemaExtensionRequest method. -// req, resp := client.StartSchemaExtensionRequest(params) +// // Example sending a request using the ShareDirectoryRequest method. +// req, resp := client.ShareDirectoryRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/StartSchemaExtension -func (c *DirectoryService) StartSchemaExtensionRequest(input *StartSchemaExtensionInput) (req *request.Request, output *StartSchemaExtensionOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/ShareDirectory +func (c *DirectoryService) ShareDirectoryRequest(input *ShareDirectoryInput) (req *request.Request, output *ShareDirectoryOutput) { op := &request.Operation{ - Name: opStartSchemaExtension, + Name: opShareDirectory, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &StartSchemaExtensionInput{} + input = &ShareDirectoryInput{} } - output = &StartSchemaExtensionOutput{} + output = &ShareDirectoryOutput{} req = c.newRequest(op, input, output) return } -// StartSchemaExtension API operation for AWS Directory Service. +// ShareDirectory API operation for AWS Directory Service. // -// Applies a schema extension to a Microsoft AD directory. +// Shares a specified directory (DirectoryId) in your AWS account (directory +// owner) with another AWS account (directory consumer). With this operation +// you can use your directory from any AWS account and from any Amazon VPC within +// an AWS Region. +// +// When you share your AWS Managed Microsoft AD directory, AWS Directory Service +// creates a shared directory in the directory consumer account. This shared +// directory contains the metadata to provide access to the directory within +// the directory owner account. The shared directory is visible in all VPCs +// in the directory consumer account. +// +// The ShareMethod parameter determines whether the specified directory can +// be shared between AWS accounts inside the same AWS organization (ORGANIZATIONS). +// It also determines whether you can share the directory with any other AWS +// account either inside or outside of the organization (HANDSHAKE). +// +// The ShareNotes parameter is only used when HANDSHAKE is called, which sends +// a directory sharing request to the directory consumer. // // 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 Directory Service's -// API operation StartSchemaExtension for usage and error information. +// API operation ShareDirectory for usage and error information. // // Returned Error Codes: -// * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException" -// The specified directory is unavailable or could not be found. +// * ErrCodeDirectoryAlreadySharedException "DirectoryAlreadySharedException" +// The specified directory has already been shared with this AWS account. // // * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" // The specified entity could not be found. // +// * ErrCodeInvalidTargetException "InvalidTargetException" +// The specified shared target is not valid. +// // * ErrCodeInvalidParameterException "InvalidParameterException" // One or more parameters are not valid. // -// * ErrCodeSnapshotLimitExceededException "SnapshotLimitExceededException" -// The maximum number of manual snapshots for the directory has been reached. -// You can use the GetSnapshotLimits operation to determine the snapshot limits -// for a directory. -// // * ErrCodeClientException "ClientException" // A client exception has occurred. // -// * ErrCodeServiceException "ServiceException" +// * ErrCodeShareLimitExceededException "ShareLimitExceededException" +// The maximum number of AWS accounts that you can share with this directory +// has been reached. +// +// * ErrCodeOrganizationsException "OrganizationsException" +// Exception encountered while trying to access your AWS organization. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// You do not have sufficient access to perform this action. +// +// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" +// The operation is not supported. +// +// * ErrCodeServiceException "ServiceException" +// An exception has occurred in AWS Directory Service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/ShareDirectory +func (c *DirectoryService) ShareDirectory(input *ShareDirectoryInput) (*ShareDirectoryOutput, error) { + req, out := c.ShareDirectoryRequest(input) + return out, req.Send() +} + +// ShareDirectoryWithContext is the same as ShareDirectory with the addition of +// the ability to pass a context and additional request options. +// +// See ShareDirectory 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 *DirectoryService) ShareDirectoryWithContext(ctx aws.Context, input *ShareDirectoryInput, opts ...request.Option) (*ShareDirectoryOutput, error) { + req, out := c.ShareDirectoryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStartSchemaExtension = "StartSchemaExtension" + +// StartSchemaExtensionRequest generates a "aws/request.Request" representing the +// client's request for the StartSchemaExtension 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 StartSchemaExtension for more information on using the StartSchemaExtension +// 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 StartSchemaExtensionRequest method. +// req, resp := client.StartSchemaExtensionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/StartSchemaExtension +func (c *DirectoryService) StartSchemaExtensionRequest(input *StartSchemaExtensionInput) (req *request.Request, output *StartSchemaExtensionOutput) { + op := &request.Operation{ + Name: opStartSchemaExtension, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartSchemaExtensionInput{} + } + + output = &StartSchemaExtensionOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartSchemaExtension API operation for AWS Directory Service. +// +// Applies a schema extension to a Microsoft AD directory. +// +// 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 Directory Service's +// API operation StartSchemaExtension for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDirectoryUnavailableException "DirectoryUnavailableException" +// The specified directory is unavailable or could not be found. +// +// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" +// The specified entity could not be found. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters are not valid. +// +// * ErrCodeSnapshotLimitExceededException "SnapshotLimitExceededException" +// The maximum number of manual snapshots for the directory has been reached. +// You can use the GetSnapshotLimits operation to determine the snapshot limits +// for a directory. +// +// * ErrCodeClientException "ClientException" +// A client exception has occurred. +// +// * ErrCodeServiceException "ServiceException" // An exception has occurred in AWS Directory Service. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/StartSchemaExtension @@ -3530,12 +4225,103 @@ func (c *DirectoryService) StartSchemaExtensionWithContext(ctx aws.Context, inpu return out, req.Send() } +const opUnshareDirectory = "UnshareDirectory" + +// UnshareDirectoryRequest generates a "aws/request.Request" representing the +// client's request for the UnshareDirectory 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 UnshareDirectory for more information on using the UnshareDirectory +// 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 UnshareDirectoryRequest method. +// req, resp := client.UnshareDirectoryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/UnshareDirectory +func (c *DirectoryService) UnshareDirectoryRequest(input *UnshareDirectoryInput) (req *request.Request, output *UnshareDirectoryOutput) { + op := &request.Operation{ + Name: opUnshareDirectory, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UnshareDirectoryInput{} + } + + output = &UnshareDirectoryOutput{} + req = c.newRequest(op, input, output) + return +} + +// UnshareDirectory API operation for AWS Directory Service. +// +// Stops the directory sharing between the directory owner and consumer accounts. +// +// 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 Directory Service's +// API operation UnshareDirectory for usage and error information. +// +// Returned Error Codes: +// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" +// The specified entity could not be found. +// +// * ErrCodeInvalidTargetException "InvalidTargetException" +// The specified shared target is not valid. +// +// * ErrCodeDirectoryNotSharedException "DirectoryNotSharedException" +// The specified directory has not been shared with this AWS account. +// +// * ErrCodeClientException "ClientException" +// A client exception has occurred. +// +// * ErrCodeServiceException "ServiceException" +// An exception has occurred in AWS Directory Service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/UnshareDirectory +func (c *DirectoryService) UnshareDirectory(input *UnshareDirectoryInput) (*UnshareDirectoryOutput, error) { + req, out := c.UnshareDirectoryRequest(input) + return out, req.Send() +} + +// UnshareDirectoryWithContext is the same as UnshareDirectory with the addition of +// the ability to pass a context and additional request options. +// +// See UnshareDirectory 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 *DirectoryService) UnshareDirectoryWithContext(ctx aws.Context, input *UnshareDirectoryInput, opts ...request.Option) (*UnshareDirectoryOutput, error) { + req, out := c.UnshareDirectoryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateConditionalForwarder = "UpdateConditionalForwarder" // UpdateConditionalForwarderRequest generates a "aws/request.Request" representing the // client's request for the UpdateConditionalForwarder operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3569,6 +4355,7 @@ func (c *DirectoryService) UpdateConditionalForwarderRequest(input *UpdateCondit output = &UpdateConditionalForwarderOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3629,7 +4416,7 @@ const opUpdateNumberOfDomainControllers = "UpdateNumberOfDomainControllers" // UpdateNumberOfDomainControllersRequest generates a "aws/request.Request" representing the // client's request for the UpdateNumberOfDomainControllers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3663,6 +4450,7 @@ func (c *DirectoryService) UpdateNumberOfDomainControllersRequest(input *UpdateN output = &UpdateNumberOfDomainControllersOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3732,7 +4520,7 @@ const opUpdateRadius = "UpdateRadius" // UpdateRadiusRequest generates a "aws/request.Request" representing the // client's request for the UpdateRadius operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3766,13 +4554,14 @@ func (c *DirectoryService) UpdateRadiusRequest(input *UpdateRadiusInput) (req *r output = &UpdateRadiusOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // UpdateRadius API operation for AWS Directory Service. // // Updates the Remote Authentication Dial In User Service (RADIUS) server information -// for an AD Connector directory. +// for an AD Connector or Microsoft AD directory. // // 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 @@ -3816,12 +4605,101 @@ func (c *DirectoryService) UpdateRadiusWithContext(ctx aws.Context, input *Updat return out, req.Send() } +const opUpdateTrust = "UpdateTrust" + +// UpdateTrustRequest generates a "aws/request.Request" representing the +// client's request for the UpdateTrust 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 UpdateTrust for more information on using the UpdateTrust +// 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 UpdateTrustRequest method. +// req, resp := client.UpdateTrustRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/UpdateTrust +func (c *DirectoryService) UpdateTrustRequest(input *UpdateTrustInput) (req *request.Request, output *UpdateTrustOutput) { + op := &request.Operation{ + Name: opUpdateTrust, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateTrustInput{} + } + + output = &UpdateTrustOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateTrust API operation for AWS Directory Service. +// +// Updates the trust that has been set up between your AWS Managed Microsoft +// AD directory and an on-premises Active Directory. +// +// 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 Directory Service's +// API operation UpdateTrust for usage and error information. +// +// Returned Error Codes: +// * ErrCodeEntityDoesNotExistException "EntityDoesNotExistException" +// The specified entity could not be found. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// One or more parameters are not valid. +// +// * ErrCodeClientException "ClientException" +// A client exception has occurred. +// +// * ErrCodeServiceException "ServiceException" +// An exception has occurred in AWS Directory Service. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/UpdateTrust +func (c *DirectoryService) UpdateTrust(input *UpdateTrustInput) (*UpdateTrustOutput, error) { + req, out := c.UpdateTrustRequest(input) + return out, req.Send() +} + +// UpdateTrustWithContext is the same as UpdateTrust with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateTrust 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 *DirectoryService) UpdateTrustWithContext(ctx aws.Context, input *UpdateTrustInput, opts ...request.Option) (*UpdateTrustOutput, error) { + req, out := c.UpdateTrustRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opVerifyTrust = "VerifyTrust" // VerifyTrustRequest generates a "aws/request.Request" representing the // client's request for the VerifyTrust operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3863,8 +4741,8 @@ func (c *DirectoryService) VerifyTrustRequest(input *VerifyTrustInput) (req *req // AWS Directory Service for Microsoft Active Directory allows you to configure // and verify trust relationships. // -// This action verifies a trust relationship between your Microsoft AD in the -// AWS cloud and an external domain. +// This action verifies a trust relationship between your AWS Managed Microsoft +// AD directory and an external 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 @@ -3911,6 +4789,68 @@ func (c *DirectoryService) VerifyTrustWithContext(ctx aws.Context, input *Verify return out, req.Send() } +type AcceptSharedDirectoryInput struct { + _ struct{} `type:"structure"` + + // Identifier of the shared directory in the directory consumer account. This + // identifier is different for each directory owner account. + // + // SharedDirectoryId is a required field + SharedDirectoryId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s AcceptSharedDirectoryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AcceptSharedDirectoryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AcceptSharedDirectoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AcceptSharedDirectoryInput"} + if s.SharedDirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("SharedDirectoryId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSharedDirectoryId sets the SharedDirectoryId field's value. +func (s *AcceptSharedDirectoryInput) SetSharedDirectoryId(v string) *AcceptSharedDirectoryInput { + s.SharedDirectoryId = &v + return s +} + +type AcceptSharedDirectoryOutput struct { + _ struct{} `type:"structure"` + + // The shared directory in the directory consumer account. + SharedDirectory *SharedDirectory `type:"structure"` +} + +// String returns the string representation +func (s AcceptSharedDirectoryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AcceptSharedDirectoryOutput) GoString() string { + return s.String() +} + +// SetSharedDirectory sets the SharedDirectory field's value. +func (s *AcceptSharedDirectoryOutput) SetSharedDirectory(v *SharedDirectory) *AcceptSharedDirectoryOutput { + s.SharedDirectory = v + return s +} + type AddIpRoutesInput struct { _ struct{} `type:"structure"` @@ -4322,7 +5262,7 @@ type ConnectDirectoryInput struct { // A textual description for the directory. Description *string `type:"string"` - // The fully-qualified name of the on-premises directory, such as corp.example.com. + // The fully qualified name of the on-premises directory, such as corp.example.com. // // Name is a required field Name *string `type:"string" required:"true"` @@ -4330,7 +5270,7 @@ type ConnectDirectoryInput struct { // The password for the on-premises user account. // // Password is a required field - Password *string `min:"1" type:"string" required:"true"` + Password *string `min:"1" type:"string" required:"true" sensitive:"true"` // The NetBIOS name of the on-premises directory, such as CORP. ShortName *string `type:"string"` @@ -4559,7 +5499,7 @@ type CreateComputerInput struct { // should generate a random, strong password to use for this parameter. // // Password is a required field - Password *string `min:"8" type:"string" required:"true"` + Password *string `min:"8" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -4763,11 +5703,11 @@ type CreateDirectoryInput struct { Name *string `type:"string" required:"true"` // The password for the directory administrator. The directory creation process - // creates a directory administrator account with the username Administrator + // creates a directory administrator account with the user name Administrator // and this password. // // Password is a required field - Password *string `type:"string" required:"true"` + Password *string `type:"string" required:"true" sensitive:"true"` // The short name of the directory, such as CORP. ShortName *string `type:"string"` @@ -4876,7 +5816,78 @@ func (s *CreateDirectoryOutput) SetDirectoryId(v string) *CreateDirectoryOutput return s } -// Creates a Microsoft AD in the AWS cloud. +type CreateLogSubscriptionInput struct { + _ struct{} `type:"structure"` + + // Identifier (ID) of the directory to which you want to subscribe and receive + // real-time logs to your specified CloudWatch log group. + // + // DirectoryId is a required field + DirectoryId *string `type:"string" required:"true"` + + // The name of the CloudWatch log group where the real-time domain controller + // logs are forwarded. + // + // LogGroupName is a required field + LogGroupName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateLogSubscriptionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLogSubscriptionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateLogSubscriptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateLogSubscriptionInput"} + if s.DirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectoryId")) + } + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDirectoryId sets the DirectoryId field's value. +func (s *CreateLogSubscriptionInput) SetDirectoryId(v string) *CreateLogSubscriptionInput { + s.DirectoryId = &v + return s +} + +// SetLogGroupName sets the LogGroupName field's value. +func (s *CreateLogSubscriptionInput) SetLogGroupName(v string) *CreateLogSubscriptionInput { + s.LogGroupName = &v + return s +} + +type CreateLogSubscriptionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s CreateLogSubscriptionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLogSubscriptionOutput) GoString() string { + return s.String() +} + +// Creates an AWS Managed Microsoft AD directory. type CreateMicrosoftADInput struct { _ struct{} `type:"structure"` @@ -4884,8 +5895,8 @@ type CreateMicrosoftADInput struct { // console Directory Details page after the directory is created. Description *string `type:"string"` - // AWS Microsoft AD is available in two editions: Standard and Enterprise. Enterprise - // is the default. + // AWS Managed Microsoft AD is available in two editions: Standard and Enterprise. + // Enterprise is the default. Edition *string `type:"string" enum:"DirectoryEdition"` // The fully qualified domain name for the directory, such as corp.example.com. @@ -4898,7 +5909,7 @@ type CreateMicrosoftADInput struct { // The password for the default administrative user named Admin. // // Password is a required field - Password *string `type:"string" required:"true"` + Password *string `type:"string" required:"true" sensitive:"true"` // The NetBIOS name for your domain. A short identifier for your domain, such // as CORP. If you don't specify a NetBIOS name, it will default to the first @@ -5079,19 +6090,19 @@ func (s *CreateSnapshotOutput) SetSnapshotId(v string) *CreateSnapshotOutput { // AWS Directory Service for Microsoft Active Directory allows you to configure // trust relationships. For example, you can establish a trust between your -// Microsoft AD in the AWS cloud, and your existing on-premises Microsoft Active -// Directory. This would allow you to provide users and groups access to resources -// in either domain, with a single set of credentials. +// AWS Managed Microsoft AD directory, and your existing on-premises Microsoft +// Active Directory. This would allow you to provide users and groups access +// to resources in either domain, with a single set of credentials. // // This action initiates the creation of the AWS side of a trust relationship -// between a Microsoft AD in the AWS cloud and an external domain. +// between an AWS Managed Microsoft AD directory and an external domain. type CreateTrustInput struct { _ struct{} `type:"structure"` // The IP addresses of the remote DNS server associated with RemoteDomainName. ConditionalForwarderIpAddrs []*string `type:"list"` - // The Directory ID of the Microsoft AD in the AWS cloud for which to establish + // The Directory ID of the AWS Managed Microsoft AD directory for which to establish // the trust relationship. // // DirectoryId is a required field @@ -5103,6 +6114,9 @@ type CreateTrustInput struct { // RemoteDomainName is a required field RemoteDomainName *string `type:"string" required:"true"` + // Optional parameter to enable selective authentication for the trust. + SelectiveAuth *string `type:"string" enum:"SelectiveAuth"` + // The direction of the trust relationship. // // TrustDirection is a required field @@ -5112,9 +6126,9 @@ type CreateTrustInput struct { // the trust relationship on the external domain. // // TrustPassword is a required field - TrustPassword *string `min:"1" type:"string" required:"true"` + TrustPassword *string `min:"1" type:"string" required:"true" sensitive:"true"` - // The trust relationship type. + // The trust relationship type. Forest is the default. TrustType *string `type:"string" enum:"TrustType"` } @@ -5171,6 +6185,12 @@ func (s *CreateTrustInput) SetRemoteDomainName(v string) *CreateTrustInput { return s } +// SetSelectiveAuth sets the SelectiveAuth field's value. +func (s *CreateTrustInput) SetSelectiveAuth(v string) *CreateTrustInput { + s.SelectiveAuth = &v + return s +} + // SetTrustDirection sets the TrustDirection field's value. func (s *CreateTrustInput) SetTrustDirection(v string) *CreateTrustInput { s.TrustDirection = &v @@ -5267,44 +6287,106 @@ func (s *DeleteConditionalForwarderInput) SetRemoteDomainName(v string) *DeleteC return s } -// The result of a DeleteConditionalForwarder request. -type DeleteConditionalForwarderOutput struct { +// The result of a DeleteConditionalForwarder request. +type DeleteConditionalForwarderOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteConditionalForwarderOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteConditionalForwarderOutput) GoString() string { + return s.String() +} + +// Contains the inputs for the DeleteDirectory operation. +type DeleteDirectoryInput struct { + _ struct{} `type:"structure"` + + // The identifier of the directory to delete. + // + // DirectoryId is a required field + DirectoryId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDirectoryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDirectoryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDirectoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDirectoryInput"} + if s.DirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectoryId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDirectoryId sets the DirectoryId field's value. +func (s *DeleteDirectoryInput) SetDirectoryId(v string) *DeleteDirectoryInput { + s.DirectoryId = &v + return s +} + +// Contains the results of the DeleteDirectory operation. +type DeleteDirectoryOutput struct { _ struct{} `type:"structure"` + + // The directory identifier. + DirectoryId *string `type:"string"` } // String returns the string representation -func (s DeleteConditionalForwarderOutput) String() string { +func (s DeleteDirectoryOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteConditionalForwarderOutput) GoString() string { +func (s DeleteDirectoryOutput) GoString() string { return s.String() } -// Contains the inputs for the DeleteDirectory operation. -type DeleteDirectoryInput struct { +// SetDirectoryId sets the DirectoryId field's value. +func (s *DeleteDirectoryOutput) SetDirectoryId(v string) *DeleteDirectoryOutput { + s.DirectoryId = &v + return s +} + +type DeleteLogSubscriptionInput struct { _ struct{} `type:"structure"` - // The identifier of the directory to delete. + // Identifier (ID) of the directory whose log subscription you want to delete. // // DirectoryId is a required field DirectoryId *string `type:"string" required:"true"` } // String returns the string representation -func (s DeleteDirectoryInput) String() string { +func (s DeleteLogSubscriptionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteDirectoryInput) GoString() string { +func (s DeleteLogSubscriptionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDirectoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDirectoryInput"} +func (s *DeleteLogSubscriptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLogSubscriptionInput"} if s.DirectoryId == nil { invalidParams.Add(request.NewErrParamRequired("DirectoryId")) } @@ -5316,35 +6398,25 @@ func (s *DeleteDirectoryInput) Validate() error { } // SetDirectoryId sets the DirectoryId field's value. -func (s *DeleteDirectoryInput) SetDirectoryId(v string) *DeleteDirectoryInput { +func (s *DeleteLogSubscriptionInput) SetDirectoryId(v string) *DeleteLogSubscriptionInput { s.DirectoryId = &v return s } -// Contains the results of the DeleteDirectory operation. -type DeleteDirectoryOutput struct { +type DeleteLogSubscriptionOutput struct { _ struct{} `type:"structure"` - - // The directory identifier. - DirectoryId *string `type:"string"` } // String returns the string representation -func (s DeleteDirectoryOutput) String() string { +func (s DeleteLogSubscriptionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteDirectoryOutput) GoString() string { +func (s DeleteLogSubscriptionOutput) GoString() string { return s.String() } -// SetDirectoryId sets the DirectoryId field's value. -func (s *DeleteDirectoryOutput) SetDirectoryId(v string) *DeleteDirectoryOutput { - s.DirectoryId = &v - return s -} - // Contains the inputs for the DeleteSnapshot operation. type DeleteSnapshotInput struct { _ struct{} `type:"structure"` @@ -5408,8 +6480,8 @@ func (s *DeleteSnapshotOutput) SetSnapshotId(v string) *DeleteSnapshotOutput { return s } -// Deletes the local side of an existing trust relationship between the Microsoft -// AD in the AWS cloud and the external domain. +// Deletes the local side of an existing trust relationship between the AWS +// Managed Microsoft AD directory and the external domain. type DeleteTrustInput struct { _ struct{} `type:"structure"` @@ -5878,6 +6950,106 @@ func (s *DescribeEventTopicsOutput) SetEventTopics(v []*EventTopic) *DescribeEve return s } +type DescribeSharedDirectoriesInput struct { + _ struct{} `type:"structure"` + + // The number of shared directories to return in the response object. + Limit *int64 `type:"integer"` + + // The DescribeSharedDirectoriesResult.NextToken value from a previous call + // to DescribeSharedDirectories. Pass null if this is the first call. + NextToken *string `type:"string"` + + // Returns the identifier of the directory in the directory owner account. + // + // OwnerDirectoryId is a required field + OwnerDirectoryId *string `type:"string" required:"true"` + + // A list of identifiers of all shared directories in your account. + SharedDirectoryIds []*string `type:"list"` +} + +// String returns the string representation +func (s DescribeSharedDirectoriesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSharedDirectoriesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeSharedDirectoriesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeSharedDirectoriesInput"} + if s.OwnerDirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("OwnerDirectoryId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLimit sets the Limit field's value. +func (s *DescribeSharedDirectoriesInput) SetLimit(v int64) *DescribeSharedDirectoriesInput { + s.Limit = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeSharedDirectoriesInput) SetNextToken(v string) *DescribeSharedDirectoriesInput { + s.NextToken = &v + return s +} + +// SetOwnerDirectoryId sets the OwnerDirectoryId field's value. +func (s *DescribeSharedDirectoriesInput) SetOwnerDirectoryId(v string) *DescribeSharedDirectoriesInput { + s.OwnerDirectoryId = &v + return s +} + +// SetSharedDirectoryIds sets the SharedDirectoryIds field's value. +func (s *DescribeSharedDirectoriesInput) SetSharedDirectoryIds(v []*string) *DescribeSharedDirectoriesInput { + s.SharedDirectoryIds = v + return s +} + +type DescribeSharedDirectoriesOutput struct { + _ struct{} `type:"structure"` + + // If not null, token that indicates that more results are available. Pass this + // value for the NextToken parameter in a subsequent call to DescribeSharedDirectories + // to retrieve the next set of items. + NextToken *string `type:"string"` + + // A list of all shared directories in your account. + SharedDirectories []*SharedDirectory `type:"list"` +} + +// String returns the string representation +func (s DescribeSharedDirectoriesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSharedDirectoriesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeSharedDirectoriesOutput) SetNextToken(v string) *DescribeSharedDirectoriesOutput { + s.NextToken = &v + return s +} + +// SetSharedDirectories sets the SharedDirectories field's value. +func (s *DescribeSharedDirectoriesOutput) SetSharedDirectories(v []*SharedDirectory) *DescribeSharedDirectoriesOutput { + s.SharedDirectories = v + return s +} + // Contains the inputs for the DescribeSnapshots operation. type DescribeSnapshotsInput struct { _ struct{} `type:"structure"` @@ -5971,9 +7143,9 @@ func (s *DescribeSnapshotsOutput) SetSnapshots(v []*Snapshot) *DescribeSnapshots return s } -// Describes the trust relationships for a particular Microsoft AD in the AWS -// cloud. If no input parameters are are provided, such as directory ID or trust -// ID, this request describes all the trust relationships. +// Describes the trust relationships for a particular AWS Managed Microsoft +// AD directory. If no input parameters are are provided, such as directory +// ID or trust ID, this request describes all the trust relationships. type DescribeTrustsInput struct { _ struct{} `type:"structure"` @@ -6081,8 +7253,8 @@ type DirectoryConnectSettings struct { // CustomerDnsIps is a required field CustomerDnsIps []*string `type:"list" required:"true"` - // The username of an account in the on-premises directory that is used to connect - // to the directory. This account must have the following privileges: + // The user name of an account in the on-premises directory that is used to + // connect to the directory. This account must have the following permissions: // // * Read users and groups // @@ -6173,7 +7345,7 @@ type DirectoryConnectSettingsDescription struct { // The IP addresses of the AD Connector servers. ConnectIps []*string `type:"list"` - // The username of the service account in the on-premises directory. + // The user name of the service account in the on-premises directory. CustomerUserName *string `min:"1" type:"string"` // The security group identifier for the AD Connector directory. @@ -6273,9 +7445,12 @@ type DirectoryDescription struct { // Specifies when the directory was created. LaunchTime *time.Time `type:"timestamp"` - // The fully-qualified name of the directory. + // The fully qualified name of the directory. Name *string `type:"string"` + // Describes the AWS Managed Microsoft AD directory in the directory owner account. + OwnerDirectoryDescription *OwnerDirectoryDescription `type:"structure"` + // A RadiusSettings object that contains information about the RADIUS server // configured for this directory. RadiusSettings *RadiusSettings `type:"structure"` @@ -6283,13 +7458,26 @@ type DirectoryDescription struct { // The status of the RADIUS MFA server connection. RadiusStatus *string `type:"string" enum:"RadiusStatus"` + // The method used when sharing a directory to determine whether the directory + // should be shared within your AWS organization (ORGANIZATIONS) or with any + // AWS account by sending a shared directory request (HANDSHAKE). + ShareMethod *string `type:"string" enum:"ShareMethod"` + + // A directory share request that is sent by the directory owner to the directory + // consumer. The request includes a typed message to help the directory consumer + // administrator determine whether to approve or reject the share invitation. + ShareNotes *string `type:"string" sensitive:"true"` + + // Current directory status of the shared AWS Managed Microsoft AD directory. + ShareStatus *string `type:"string" enum:"ShareStatus"` + // The short name of the directory. ShortName *string `type:"string"` // The directory size. Size *string `type:"string" enum:"DirectorySize"` - // Indicates if single-sign on is enabled for the directory. For more information, + // Indicates if single sign-on is enabled for the directory. For more information, // see EnableSso and DisableSso. SsoEnabled *bool `type:"boolean"` @@ -6381,6 +7569,12 @@ func (s *DirectoryDescription) SetName(v string) *DirectoryDescription { return s } +// SetOwnerDirectoryDescription sets the OwnerDirectoryDescription field's value. +func (s *DirectoryDescription) SetOwnerDirectoryDescription(v *OwnerDirectoryDescription) *DirectoryDescription { + s.OwnerDirectoryDescription = v + return s +} + // SetRadiusSettings sets the RadiusSettings field's value. func (s *DirectoryDescription) SetRadiusSettings(v *RadiusSettings) *DirectoryDescription { s.RadiusSettings = v @@ -6393,6 +7587,24 @@ func (s *DirectoryDescription) SetRadiusStatus(v string) *DirectoryDescription { return s } +// SetShareMethod sets the ShareMethod field's value. +func (s *DirectoryDescription) SetShareMethod(v string) *DirectoryDescription { + s.ShareMethod = &v + return s +} + +// SetShareNotes sets the ShareNotes field's value. +func (s *DirectoryDescription) SetShareNotes(v string) *DirectoryDescription { + s.ShareNotes = &v + return s +} + +// SetShareStatus sets the ShareStatus field's value. +func (s *DirectoryDescription) SetShareStatus(v string) *DirectoryDescription { + s.ShareStatus = &v + return s +} + // SetShortName sets the ShortName field's value. func (s *DirectoryDescription) SetShortName(v string) *DirectoryDescription { s.ShortName = &v @@ -6454,13 +7666,14 @@ type DirectoryLimits struct { // Indicates if the cloud directory limit has been reached. CloudOnlyDirectoriesLimitReached *bool `type:"boolean"` - // The current number of Microsoft AD directories in the region. + // The current number of AWS Managed Microsoft AD directories in the region. CloudOnlyMicrosoftADCurrentCount *int64 `type:"integer"` - // The maximum number of Microsoft AD directories allowed in the region. + // The maximum number of AWS Managed Microsoft AD directories allowed in the + // region. CloudOnlyMicrosoftADLimit *int64 `type:"integer"` - // Indicates if the Microsoft AD directory limit has been reached. + // Indicates if the AWS Managed Microsoft AD directory limit has been reached. CloudOnlyMicrosoftADLimitReached *bool `type:"boolean"` // The current number of connected directories in the region. @@ -6709,7 +7922,7 @@ type DisableSsoInput struct { // The password of an alternate account to use to disable single-sign on. This // is only used for AD Connector directories. For more information, see the // UserName parameter. - Password *string `min:"1" type:"string"` + Password *string `min:"1" type:"string" sensitive:"true"` // The username of an alternate account to use to disable single-sign on. This // is only used for AD Connector directories. This account must have privileges @@ -6975,7 +8188,7 @@ type EnableSsoInput struct { // The password of an alternate account to use to enable single-sign on. This // is only used for AD Connector directories. For more information, see the // UserName parameter. - Password *string `min:"1" type:"string"` + Password *string `min:"1" type:"string" sensitive:"true"` // The username of an alternate account to use to enable single-sign on. This // is only used for AD Connector directories. This account must have privileges @@ -7413,6 +8626,82 @@ func (s *ListIpRoutesOutput) SetNextToken(v string) *ListIpRoutesOutput { return s } +type ListLogSubscriptionsInput struct { + _ struct{} `type:"structure"` + + // If a DirectoryID is provided, lists only the log subscription associated + // with that directory. If no DirectoryId is provided, lists all log subscriptions + // associated with your AWS account. If there are no log subscriptions for the + // AWS account or the directory, an empty list will be returned. + DirectoryId *string `type:"string"` + + // The maximum number of items returned. + Limit *int64 `type:"integer"` + + // The token for the next set of items to return. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListLogSubscriptionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLogSubscriptionsInput) GoString() string { + return s.String() +} + +// SetDirectoryId sets the DirectoryId field's value. +func (s *ListLogSubscriptionsInput) SetDirectoryId(v string) *ListLogSubscriptionsInput { + s.DirectoryId = &v + return s +} + +// SetLimit sets the Limit field's value. +func (s *ListLogSubscriptionsInput) SetLimit(v int64) *ListLogSubscriptionsInput { + s.Limit = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListLogSubscriptionsInput) SetNextToken(v string) *ListLogSubscriptionsInput { + s.NextToken = &v + return s +} + +type ListLogSubscriptionsOutput struct { + _ struct{} `type:"structure"` + + // A list of active LogSubscription objects for calling the AWS account. + LogSubscriptions []*LogSubscription `type:"list"` + + // The token for the next set of items to return. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListLogSubscriptionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLogSubscriptionsOutput) GoString() string { + return s.String() +} + +// SetLogSubscriptions sets the LogSubscriptions field's value. +func (s *ListLogSubscriptionsOutput) SetLogSubscriptions(v []*LogSubscription) *ListLogSubscriptionsOutput { + s.LogSubscriptions = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListLogSubscriptionsOutput) SetNextToken(v string) *ListLogSubscriptionsOutput { + s.NextToken = &v + return s +} + type ListSchemaExtensionsInput struct { _ struct{} `type:"structure"` @@ -7571,25 +8860,140 @@ type ListTagsForResourceOutput struct { Tags []*Tag `type:"list"` } -// String returns the string representation -func (s ListTagsForResourceOutput) String() string { - return awsutil.Prettify(s) +// String returns the string representation +func (s ListTagsForResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTagsForResourceOutput) SetNextToken(v string) *ListTagsForResourceOutput { + s.NextToken = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { + s.Tags = v + return s +} + +// Represents a log subscription, which tracks real-time data from a chosen +// log group to a specified destination. +type LogSubscription struct { + _ struct{} `type:"structure"` + + // Identifier (ID) of the directory that you want to associate with the log + // subscription. + DirectoryId *string `type:"string"` + + // The name of the log group. + LogGroupName *string `min:"1" type:"string"` + + // The date and time that the log subscription was created. + SubscriptionCreatedDateTime *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s LogSubscription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LogSubscription) GoString() string { + return s.String() +} + +// SetDirectoryId sets the DirectoryId field's value. +func (s *LogSubscription) SetDirectoryId(v string) *LogSubscription { + s.DirectoryId = &v + return s +} + +// SetLogGroupName sets the LogGroupName field's value. +func (s *LogSubscription) SetLogGroupName(v string) *LogSubscription { + s.LogGroupName = &v + return s +} + +// SetSubscriptionCreatedDateTime sets the SubscriptionCreatedDateTime field's value. +func (s *LogSubscription) SetSubscriptionCreatedDateTime(v time.Time) *LogSubscription { + s.SubscriptionCreatedDateTime = &v + return s +} + +// Describes the directory owner account details that have been shared to the +// directory consumer account. +type OwnerDirectoryDescription struct { + _ struct{} `type:"structure"` + + // Identifier of the directory owner account. + AccountId *string `type:"string"` + + // Identifier of the AWS Managed Microsoft AD directory in the directory owner + // account. + DirectoryId *string `type:"string"` + + // IP address of the directory’s domain controllers. + DnsIpAddrs []*string `type:"list"` + + // A RadiusSettings object that contains information about the RADIUS server. + RadiusSettings *RadiusSettings `type:"structure"` + + // Information about the status of the RADIUS server. + RadiusStatus *string `type:"string" enum:"RadiusStatus"` + + // Information about the VPC settings for the directory. + VpcSettings *DirectoryVpcSettingsDescription `type:"structure"` +} + +// String returns the string representation +func (s OwnerDirectoryDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OwnerDirectoryDescription) GoString() string { + return s.String() +} + +// SetAccountId sets the AccountId field's value. +func (s *OwnerDirectoryDescription) SetAccountId(v string) *OwnerDirectoryDescription { + s.AccountId = &v + return s +} + +// SetDirectoryId sets the DirectoryId field's value. +func (s *OwnerDirectoryDescription) SetDirectoryId(v string) *OwnerDirectoryDescription { + s.DirectoryId = &v + return s +} + +// SetDnsIpAddrs sets the DnsIpAddrs field's value. +func (s *OwnerDirectoryDescription) SetDnsIpAddrs(v []*string) *OwnerDirectoryDescription { + s.DnsIpAddrs = v + return s } -// GoString returns the string representation -func (s ListTagsForResourceOutput) GoString() string { - return s.String() +// SetRadiusSettings sets the RadiusSettings field's value. +func (s *OwnerDirectoryDescription) SetRadiusSettings(v *RadiusSettings) *OwnerDirectoryDescription { + s.RadiusSettings = v + return s } -// SetNextToken sets the NextToken field's value. -func (s *ListTagsForResourceOutput) SetNextToken(v string) *ListTagsForResourceOutput { - s.NextToken = &v +// SetRadiusStatus sets the RadiusStatus field's value. +func (s *OwnerDirectoryDescription) SetRadiusStatus(v string) *OwnerDirectoryDescription { + s.RadiusStatus = &v return s } -// SetTags sets the Tags field's value. -func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { - s.Tags = v +// SetVpcSettings sets the VpcSettings field's value. +func (s *OwnerDirectoryDescription) SetVpcSettings(v *DirectoryVpcSettingsDescription) *OwnerDirectoryDescription { + s.VpcSettings = v return s } @@ -7620,8 +9024,8 @@ type RadiusSettings struct { // The amount of time, in seconds, to wait for the RADIUS server to respond. RadiusTimeout *int64 `min:"1" type:"integer"` - // Not currently used. - SharedSecret *string `min:"8" type:"string"` + // Required for enabling RADIUS on the directory. + SharedSecret *string `min:"8" type:"string" sensitive:"true"` // Not currently used. UseSameUsername *bool `type:"boolean"` @@ -7779,6 +9183,68 @@ func (s RegisterEventTopicOutput) GoString() string { return s.String() } +type RejectSharedDirectoryInput struct { + _ struct{} `type:"structure"` + + // Identifier of the shared directory in the directory consumer account. This + // identifier is different for each directory owner account. + // + // SharedDirectoryId is a required field + SharedDirectoryId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s RejectSharedDirectoryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RejectSharedDirectoryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RejectSharedDirectoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RejectSharedDirectoryInput"} + if s.SharedDirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("SharedDirectoryId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSharedDirectoryId sets the SharedDirectoryId field's value. +func (s *RejectSharedDirectoryInput) SetSharedDirectoryId(v string) *RejectSharedDirectoryInput { + s.SharedDirectoryId = &v + return s +} + +type RejectSharedDirectoryOutput struct { + _ struct{} `type:"structure"` + + // Identifier of the shared directory in the directory consumer account. + SharedDirectoryId *string `type:"string"` +} + +// String returns the string representation +func (s RejectSharedDirectoryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RejectSharedDirectoryOutput) GoString() string { + return s.String() +} + +// SetSharedDirectoryId sets the SharedDirectoryId field's value. +func (s *RejectSharedDirectoryOutput) SetSharedDirectoryId(v string) *RejectSharedDirectoryOutput { + s.SharedDirectoryId = &v + return s +} + type RemoveIpRoutesInput struct { _ struct{} `type:"structure"` @@ -7923,9 +9389,9 @@ type ResetUserPasswordInput struct { // The new password that will be reset. // // NewPassword is a required field - NewPassword *string `min:"1" type:"string" required:"true"` + NewPassword *string `min:"1" type:"string" required:"true" sensitive:"true"` - // The username of the user whose password will be reset. + // The user name of the user whose password will be reset. // // UserName is a required field UserName *string `min:"1" type:"string" required:"true"` @@ -8009,20 +9475,274 @@ type RestoreFromSnapshotInput struct { } // String returns the string representation -func (s RestoreFromSnapshotInput) String() string { +func (s RestoreFromSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RestoreFromSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RestoreFromSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RestoreFromSnapshotInput"} + if s.SnapshotId == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSnapshotId sets the SnapshotId field's value. +func (s *RestoreFromSnapshotInput) SetSnapshotId(v string) *RestoreFromSnapshotInput { + s.SnapshotId = &v + return s +} + +// Contains the results of the RestoreFromSnapshot operation. +type RestoreFromSnapshotOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s RestoreFromSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RestoreFromSnapshotOutput) GoString() string { + return s.String() +} + +// Information about a schema extension. +type SchemaExtensionInfo struct { + _ struct{} `type:"structure"` + + // A description of the schema extension. + Description *string `type:"string"` + + // The identifier of the directory to which the schema extension is applied. + DirectoryId *string `type:"string"` + + // The date and time that the schema extension was completed. + EndDateTime *time.Time `type:"timestamp"` + + // The identifier of the schema extension. + SchemaExtensionId *string `type:"string"` + + // The current status of the schema extension. + SchemaExtensionStatus *string `type:"string" enum:"SchemaExtensionStatus"` + + // The reason for the SchemaExtensionStatus. + SchemaExtensionStatusReason *string `type:"string"` + + // The date and time that the schema extension started being applied to the + // directory. + StartDateTime *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s SchemaExtensionInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SchemaExtensionInfo) GoString() string { + return s.String() +} + +// SetDescription sets the Description field's value. +func (s *SchemaExtensionInfo) SetDescription(v string) *SchemaExtensionInfo { + s.Description = &v + return s +} + +// SetDirectoryId sets the DirectoryId field's value. +func (s *SchemaExtensionInfo) SetDirectoryId(v string) *SchemaExtensionInfo { + s.DirectoryId = &v + return s +} + +// SetEndDateTime sets the EndDateTime field's value. +func (s *SchemaExtensionInfo) SetEndDateTime(v time.Time) *SchemaExtensionInfo { + s.EndDateTime = &v + return s +} + +// SetSchemaExtensionId sets the SchemaExtensionId field's value. +func (s *SchemaExtensionInfo) SetSchemaExtensionId(v string) *SchemaExtensionInfo { + s.SchemaExtensionId = &v + return s +} + +// SetSchemaExtensionStatus sets the SchemaExtensionStatus field's value. +func (s *SchemaExtensionInfo) SetSchemaExtensionStatus(v string) *SchemaExtensionInfo { + s.SchemaExtensionStatus = &v + return s +} + +// SetSchemaExtensionStatusReason sets the SchemaExtensionStatusReason field's value. +func (s *SchemaExtensionInfo) SetSchemaExtensionStatusReason(v string) *SchemaExtensionInfo { + s.SchemaExtensionStatusReason = &v + return s +} + +// SetStartDateTime sets the StartDateTime field's value. +func (s *SchemaExtensionInfo) SetStartDateTime(v time.Time) *SchemaExtensionInfo { + s.StartDateTime = &v + return s +} + +type ShareDirectoryInput struct { + _ struct{} `type:"structure"` + + // Identifier of the AWS Managed Microsoft AD directory that you want to share + // with other AWS accounts. + // + // DirectoryId is a required field + DirectoryId *string `type:"string" required:"true"` + + // The method used when sharing a directory to determine whether the directory + // should be shared within your AWS organization (ORGANIZATIONS) or with any + // AWS account by sending a directory sharing request (HANDSHAKE). + // + // ShareMethod is a required field + ShareMethod *string `type:"string" required:"true" enum:"ShareMethod"` + + // A directory share request that is sent by the directory owner to the directory + // consumer. The request includes a typed message to help the directory consumer + // administrator determine whether to approve or reject the share invitation. + ShareNotes *string `type:"string" sensitive:"true"` + + // Identifier for the directory consumer account with whom the directory is + // to be shared. + // + // ShareTarget is a required field + ShareTarget *ShareTarget `type:"structure" required:"true"` +} + +// String returns the string representation +func (s ShareDirectoryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ShareDirectoryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ShareDirectoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ShareDirectoryInput"} + if s.DirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectoryId")) + } + if s.ShareMethod == nil { + invalidParams.Add(request.NewErrParamRequired("ShareMethod")) + } + if s.ShareTarget == nil { + invalidParams.Add(request.NewErrParamRequired("ShareTarget")) + } + if s.ShareTarget != nil { + if err := s.ShareTarget.Validate(); err != nil { + invalidParams.AddNested("ShareTarget", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDirectoryId sets the DirectoryId field's value. +func (s *ShareDirectoryInput) SetDirectoryId(v string) *ShareDirectoryInput { + s.DirectoryId = &v + return s +} + +// SetShareMethod sets the ShareMethod field's value. +func (s *ShareDirectoryInput) SetShareMethod(v string) *ShareDirectoryInput { + s.ShareMethod = &v + return s +} + +// SetShareNotes sets the ShareNotes field's value. +func (s *ShareDirectoryInput) SetShareNotes(v string) *ShareDirectoryInput { + s.ShareNotes = &v + return s +} + +// SetShareTarget sets the ShareTarget field's value. +func (s *ShareDirectoryInput) SetShareTarget(v *ShareTarget) *ShareDirectoryInput { + s.ShareTarget = v + return s +} + +type ShareDirectoryOutput struct { + _ struct{} `type:"structure"` + + // Identifier of the directory that is stored in the directory consumer account + // that is shared from the specified directory (DirectoryId). + SharedDirectoryId *string `type:"string"` +} + +// String returns the string representation +func (s ShareDirectoryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ShareDirectoryOutput) GoString() string { + return s.String() +} + +// SetSharedDirectoryId sets the SharedDirectoryId field's value. +func (s *ShareDirectoryOutput) SetSharedDirectoryId(v string) *ShareDirectoryOutput { + s.SharedDirectoryId = &v + return s +} + +// Identifier that contains details about the directory consumer account. +type ShareTarget struct { + _ struct{} `type:"structure"` + + // Identifier of the directory consumer account. + // + // Id is a required field + Id *string `min:"1" type:"string" required:"true"` + + // Type of identifier to be used in the Id field. + // + // Type is a required field + Type *string `type:"string" required:"true" enum:"TargetType"` +} + +// String returns the string representation +func (s ShareTarget) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s RestoreFromSnapshotInput) GoString() string { +func (s ShareTarget) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *RestoreFromSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RestoreFromSnapshotInput"} - if s.SnapshotId == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotId")) +func (s *ShareTarget) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ShareTarget"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) } if invalidParams.Len() > 0 { @@ -8031,103 +9751,119 @@ func (s *RestoreFromSnapshotInput) Validate() error { return nil } -// SetSnapshotId sets the SnapshotId field's value. -func (s *RestoreFromSnapshotInput) SetSnapshotId(v string) *RestoreFromSnapshotInput { - s.SnapshotId = &v +// SetId sets the Id field's value. +func (s *ShareTarget) SetId(v string) *ShareTarget { + s.Id = &v return s } -// Contains the results of the RestoreFromSnapshot operation. -type RestoreFromSnapshotOutput struct { - _ struct{} `type:"structure"` +// SetType sets the Type field's value. +func (s *ShareTarget) SetType(v string) *ShareTarget { + s.Type = &v + return s } -// String returns the string representation -func (s RestoreFromSnapshotOutput) String() string { - return awsutil.Prettify(s) -} +// Details about the shared directory in the directory owner account for which +// the share request in the directory consumer account has been accepted. +type SharedDirectory struct { + _ struct{} `type:"structure"` -// GoString returns the string representation -func (s RestoreFromSnapshotOutput) GoString() string { - return s.String() -} + // The date and time that the shared directory was created. + CreatedDateTime *time.Time `type:"timestamp"` -// Information about a schema extension. -type SchemaExtensionInfo struct { - _ struct{} `type:"structure"` + // The date and time that the shared directory was last updated. + LastUpdatedDateTime *time.Time `type:"timestamp"` - // A description of the schema extension. - Description *string `type:"string"` + // Identifier of the directory owner account, which contains the directory that + // has been shared to the consumer account. + OwnerAccountId *string `type:"string"` - // The identifier of the directory to which the schema extension is applied. - DirectoryId *string `type:"string"` + // Identifier of the directory in the directory owner account. + OwnerDirectoryId *string `type:"string"` - // The date and time that the schema extension was completed. - EndDateTime *time.Time `type:"timestamp"` + // The method used when sharing a directory to determine whether the directory + // should be shared within your AWS organization (ORGANIZATIONS) or with any + // AWS account by sending a shared directory request (HANDSHAKE). + ShareMethod *string `type:"string" enum:"ShareMethod"` - // The identifier of the schema extension. - SchemaExtensionId *string `type:"string"` + // A directory share request that is sent by the directory owner to the directory + // consumer. The request includes a typed message to help the directory consumer + // administrator determine whether to approve or reject the share invitation. + ShareNotes *string `type:"string" sensitive:"true"` - // The current status of the schema extension. - SchemaExtensionStatus *string `type:"string" enum:"SchemaExtensionStatus"` + // Current directory status of the shared AWS Managed Microsoft AD directory. + ShareStatus *string `type:"string" enum:"ShareStatus"` - // The reason for the SchemaExtensionStatus. - SchemaExtensionStatusReason *string `type:"string"` + // Identifier of the directory consumer account that has access to the shared + // directory (OwnerDirectoryId) in the directory owner account. + SharedAccountId *string `type:"string"` - // The date and time that the schema extension started being applied to the - // directory. - StartDateTime *time.Time `type:"timestamp"` + // Identifier of the shared directory in the directory consumer account. This + // identifier is different for each directory owner account. + SharedDirectoryId *string `type:"string"` } // String returns the string representation -func (s SchemaExtensionInfo) String() string { +func (s SharedDirectory) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s SchemaExtensionInfo) GoString() string { +func (s SharedDirectory) GoString() string { return s.String() } -// SetDescription sets the Description field's value. -func (s *SchemaExtensionInfo) SetDescription(v string) *SchemaExtensionInfo { - s.Description = &v +// SetCreatedDateTime sets the CreatedDateTime field's value. +func (s *SharedDirectory) SetCreatedDateTime(v time.Time) *SharedDirectory { + s.CreatedDateTime = &v return s } -// SetDirectoryId sets the DirectoryId field's value. -func (s *SchemaExtensionInfo) SetDirectoryId(v string) *SchemaExtensionInfo { - s.DirectoryId = &v +// SetLastUpdatedDateTime sets the LastUpdatedDateTime field's value. +func (s *SharedDirectory) SetLastUpdatedDateTime(v time.Time) *SharedDirectory { + s.LastUpdatedDateTime = &v return s } -// SetEndDateTime sets the EndDateTime field's value. -func (s *SchemaExtensionInfo) SetEndDateTime(v time.Time) *SchemaExtensionInfo { - s.EndDateTime = &v +// SetOwnerAccountId sets the OwnerAccountId field's value. +func (s *SharedDirectory) SetOwnerAccountId(v string) *SharedDirectory { + s.OwnerAccountId = &v return s } -// SetSchemaExtensionId sets the SchemaExtensionId field's value. -func (s *SchemaExtensionInfo) SetSchemaExtensionId(v string) *SchemaExtensionInfo { - s.SchemaExtensionId = &v +// SetOwnerDirectoryId sets the OwnerDirectoryId field's value. +func (s *SharedDirectory) SetOwnerDirectoryId(v string) *SharedDirectory { + s.OwnerDirectoryId = &v return s } -// SetSchemaExtensionStatus sets the SchemaExtensionStatus field's value. -func (s *SchemaExtensionInfo) SetSchemaExtensionStatus(v string) *SchemaExtensionInfo { - s.SchemaExtensionStatus = &v +// SetShareMethod sets the ShareMethod field's value. +func (s *SharedDirectory) SetShareMethod(v string) *SharedDirectory { + s.ShareMethod = &v return s } -// SetSchemaExtensionStatusReason sets the SchemaExtensionStatusReason field's value. -func (s *SchemaExtensionInfo) SetSchemaExtensionStatusReason(v string) *SchemaExtensionInfo { - s.SchemaExtensionStatusReason = &v +// SetShareNotes sets the ShareNotes field's value. +func (s *SharedDirectory) SetShareNotes(v string) *SharedDirectory { + s.ShareNotes = &v return s } -// SetStartDateTime sets the StartDateTime field's value. -func (s *SchemaExtensionInfo) SetStartDateTime(v time.Time) *SchemaExtensionInfo { - s.StartDateTime = &v +// SetShareStatus sets the ShareStatus field's value. +func (s *SharedDirectory) SetShareStatus(v string) *SharedDirectory { + s.ShareStatus = &v + return s +} + +// SetSharedAccountId sets the SharedAccountId field's value. +func (s *SharedDirectory) SetSharedAccountId(v string) *SharedDirectory { + s.SharedAccountId = &v + return s +} + +// SetSharedDirectoryId sets the SharedDirectoryId field's value. +func (s *SharedDirectory) SetSharedDirectoryId(v string) *SharedDirectory { + s.SharedDirectoryId = &v return s } @@ -8412,8 +10148,8 @@ func (s *Tag) SetValue(v string) *Tag { return s } -// Describes a trust relationship between an Microsoft AD in the AWS cloud and -// an external domain. +// Describes a trust relationship between an AWS Managed Microsoft AD directory +// and an external domain. type Trust struct { _ struct{} `type:"structure"` @@ -8430,6 +10166,9 @@ type Trust struct { // the trust relationship. RemoteDomainName *string `type:"string"` + // Current state of selective authentication for the trust. + SelectiveAuth *string `type:"string" enum:"SelectiveAuth"` + // The date and time that the TrustState was last updated. StateLastUpdatedDateTime *time.Time `type:"timestamp"` @@ -8445,7 +10184,7 @@ type Trust struct { // The reason for the TrustState. TrustStateReason *string `type:"string"` - // The trust relationship type. + // The trust relationship type. Forest is the default. TrustType *string `type:"string" enum:"TrustType"` } @@ -8483,6 +10222,12 @@ func (s *Trust) SetRemoteDomainName(v string) *Trust { return s } +// SetSelectiveAuth sets the SelectiveAuth field's value. +func (s *Trust) SetSelectiveAuth(v string) *Trust { + s.SelectiveAuth = &v + return s +} + // SetStateLastUpdatedDateTime sets the StateLastUpdatedDateTime field's value. func (s *Trust) SetStateLastUpdatedDateTime(v time.Time) *Trust { s.StateLastUpdatedDateTime = &v @@ -8519,6 +10264,146 @@ func (s *Trust) SetTrustType(v string) *Trust { return s } +type UnshareDirectoryInput struct { + _ struct{} `type:"structure"` + + // The identifier of the AWS Managed Microsoft AD directory that you want to + // stop sharing. + // + // DirectoryId is a required field + DirectoryId *string `type:"string" required:"true"` + + // Identifier for the directory consumer account with whom the directory has + // to be unshared. + // + // UnshareTarget is a required field + UnshareTarget *UnshareTarget `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UnshareDirectoryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UnshareDirectoryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UnshareDirectoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UnshareDirectoryInput"} + if s.DirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectoryId")) + } + if s.UnshareTarget == nil { + invalidParams.Add(request.NewErrParamRequired("UnshareTarget")) + } + if s.UnshareTarget != nil { + if err := s.UnshareTarget.Validate(); err != nil { + invalidParams.AddNested("UnshareTarget", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDirectoryId sets the DirectoryId field's value. +func (s *UnshareDirectoryInput) SetDirectoryId(v string) *UnshareDirectoryInput { + s.DirectoryId = &v + return s +} + +// SetUnshareTarget sets the UnshareTarget field's value. +func (s *UnshareDirectoryInput) SetUnshareTarget(v *UnshareTarget) *UnshareDirectoryInput { + s.UnshareTarget = v + return s +} + +type UnshareDirectoryOutput struct { + _ struct{} `type:"structure"` + + // Identifier of the directory stored in the directory consumer account that + // is to be unshared from the specified directory (DirectoryId). + SharedDirectoryId *string `type:"string"` +} + +// String returns the string representation +func (s UnshareDirectoryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UnshareDirectoryOutput) GoString() string { + return s.String() +} + +// SetSharedDirectoryId sets the SharedDirectoryId field's value. +func (s *UnshareDirectoryOutput) SetSharedDirectoryId(v string) *UnshareDirectoryOutput { + s.SharedDirectoryId = &v + return s +} + +// Identifier that contains details about the directory consumer account with +// whom the directory is being unshared. +type UnshareTarget struct { + _ struct{} `type:"structure"` + + // Identifier of the directory consumer account. + // + // Id is a required field + Id *string `min:"1" type:"string" required:"true"` + + // Type of identifier to be used in the Id field. + // + // Type is a required field + Type *string `type:"string" required:"true" enum:"TargetType"` +} + +// String returns the string representation +func (s UnshareTarget) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UnshareTarget) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UnshareTarget) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UnshareTarget"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetId sets the Id field's value. +func (s *UnshareTarget) SetId(v string) *UnshareTarget { + s.Id = &v + return s +} + +// SetType sets the Type field's value. +func (s *UnshareTarget) SetType(v string) *UnshareTarget { + s.Type = &v + return s +} + // Updates a conditional forwarder. type UpdateConditionalForwarderInput struct { _ struct{} `type:"structure"` @@ -8747,8 +10632,87 @@ func (s UpdateRadiusOutput) GoString() string { return s.String() } -// Initiates the verification of an existing trust relationship between a Microsoft -// AD in the AWS cloud and an external domain. +type UpdateTrustInput struct { + _ struct{} `type:"structure"` + + // Updates selective authentication for the trust. + SelectiveAuth *string `type:"string" enum:"SelectiveAuth"` + + // Identifier of the trust relationship. + // + // TrustId is a required field + TrustId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateTrustInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateTrustInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateTrustInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateTrustInput"} + if s.TrustId == nil { + invalidParams.Add(request.NewErrParamRequired("TrustId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSelectiveAuth sets the SelectiveAuth field's value. +func (s *UpdateTrustInput) SetSelectiveAuth(v string) *UpdateTrustInput { + s.SelectiveAuth = &v + return s +} + +// SetTrustId sets the TrustId field's value. +func (s *UpdateTrustInput) SetTrustId(v string) *UpdateTrustInput { + s.TrustId = &v + return s +} + +type UpdateTrustOutput struct { + _ struct{} `type:"structure"` + + // The AWS request identifier. + RequestId *string `type:"string"` + + // Identifier of the trust relationship. + TrustId *string `type:"string"` +} + +// String returns the string representation +func (s UpdateTrustOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateTrustOutput) GoString() string { + return s.String() +} + +// SetRequestId sets the RequestId field's value. +func (s *UpdateTrustOutput) SetRequestId(v string) *UpdateTrustOutput { + s.RequestId = &v + return s +} + +// SetTrustId sets the TrustId field's value. +func (s *UpdateTrustOutput) SetTrustId(v string) *UpdateTrustOutput { + s.TrustId = &v + return s +} + +// Initiates the verification of an existing trust relationship between an AWS +// Managed Microsoft AD directory and an external domain. type VerifyTrustInput struct { _ struct{} `type:"structure"` @@ -8871,6 +10835,9 @@ const ( // DirectoryTypeMicrosoftAd is a DirectoryType enum value DirectoryTypeMicrosoftAd = "MicrosoftAD" + + // DirectoryTypeSharedMicrosoftAd is a DirectoryType enum value + DirectoryTypeSharedMicrosoftAd = "SharedMicrosoftAD" ) const ( @@ -8975,6 +10942,51 @@ const ( SchemaExtensionStatusCompleted = "Completed" ) +const ( + // SelectiveAuthEnabled is a SelectiveAuth enum value + SelectiveAuthEnabled = "Enabled" + + // SelectiveAuthDisabled is a SelectiveAuth enum value + SelectiveAuthDisabled = "Disabled" +) + +const ( + // ShareMethodOrganizations is a ShareMethod enum value + ShareMethodOrganizations = "ORGANIZATIONS" + + // ShareMethodHandshake is a ShareMethod enum value + ShareMethodHandshake = "HANDSHAKE" +) + +const ( + // ShareStatusShared is a ShareStatus enum value + ShareStatusShared = "Shared" + + // ShareStatusPendingAcceptance is a ShareStatus enum value + ShareStatusPendingAcceptance = "PendingAcceptance" + + // ShareStatusRejected is a ShareStatus enum value + ShareStatusRejected = "Rejected" + + // ShareStatusRejecting is a ShareStatus enum value + ShareStatusRejecting = "Rejecting" + + // ShareStatusRejectFailed is a ShareStatus enum value + ShareStatusRejectFailed = "RejectFailed" + + // ShareStatusSharing is a ShareStatus enum value + ShareStatusSharing = "Sharing" + + // ShareStatusShareFailed is a ShareStatus enum value + ShareStatusShareFailed = "ShareFailed" + + // ShareStatusDeleted is a ShareStatus enum value + ShareStatusDeleted = "Deleted" + + // ShareStatusDeleting is a ShareStatus enum value + ShareStatusDeleting = "Deleting" +) + const ( // SnapshotStatusCreating is a SnapshotStatus enum value SnapshotStatusCreating = "Creating" @@ -8994,6 +11006,11 @@ const ( SnapshotTypeManual = "Manual" ) +const ( + // TargetTypeAccount is a TargetType enum value + TargetTypeAccount = "ACCOUNT" +) + const ( // TopicStatusRegistered is a TopicStatus enum value TopicStatusRegistered = "Registered" @@ -9035,6 +11052,15 @@ const ( // TrustStateVerified is a TrustState enum value TrustStateVerified = "Verified" + // TrustStateUpdating is a TrustState enum value + TrustStateUpdating = "Updating" + + // TrustStateUpdateFailed is a TrustState enum value + TrustStateUpdateFailed = "UpdateFailed" + + // TrustStateUpdated is a TrustState enum value + TrustStateUpdated = "Updated" + // TrustStateDeleting is a TrustState enum value TrustStateDeleting = "Deleting" @@ -9048,4 +11074,7 @@ const ( const ( // TrustTypeForest is a TrustType enum value TrustTypeForest = "Forest" + + // TrustTypeExternal is a TrustType enum value + TrustTypeExternal = "External" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/errors.go b/vendor/github.com/aws/aws-sdk-go/service/directoryservice/errors.go index 85d8313642..b5bdd25a10 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/directoryservice/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/directoryservice/errors.go @@ -4,6 +4,12 @@ package directoryservice const ( + // ErrCodeAccessDeniedException for service response error code + // "AccessDeniedException". + // + // You do not have sufficient access to perform this action. + ErrCodeAccessDeniedException = "AccessDeniedException" + // ErrCodeAuthenticationFailedException for service response error code // "AuthenticationFailedException". // @@ -16,6 +22,12 @@ const ( // A client exception has occurred. ErrCodeClientException = "ClientException" + // ErrCodeDirectoryAlreadySharedException for service response error code + // "DirectoryAlreadySharedException". + // + // The specified directory has already been shared with this AWS account. + ErrCodeDirectoryAlreadySharedException = "DirectoryAlreadySharedException" + // ErrCodeDirectoryLimitExceededException for service response error code // "DirectoryLimitExceededException". // @@ -24,6 +36,12 @@ const ( // the region. ErrCodeDirectoryLimitExceededException = "DirectoryLimitExceededException" + // ErrCodeDirectoryNotSharedException for service response error code + // "DirectoryNotSharedException". + // + // The specified directory has not been shared with this AWS account. + ErrCodeDirectoryNotSharedException = "DirectoryNotSharedException" + // ErrCodeDirectoryUnavailableException for service response error code // "DirectoryUnavailableException". // @@ -74,6 +92,12 @@ const ( // requirements defined in your directory. ErrCodeInvalidPasswordException = "InvalidPasswordException" + // ErrCodeInvalidTargetException for service response error code + // "InvalidTargetException". + // + // The specified shared target is not valid. + ErrCodeInvalidTargetException = "InvalidTargetException" + // ErrCodeIpRouteLimitExceededException for service response error code // "IpRouteLimitExceededException". // @@ -81,12 +105,25 @@ const ( // is 100 IP address blocks. ErrCodeIpRouteLimitExceededException = "IpRouteLimitExceededException" + // ErrCodeOrganizationsException for service response error code + // "OrganizationsException". + // + // Exception encountered while trying to access your AWS organization. + ErrCodeOrganizationsException = "OrganizationsException" + // ErrCodeServiceException for service response error code // "ServiceException". // // An exception has occurred in AWS Directory Service. ErrCodeServiceException = "ServiceException" + // ErrCodeShareLimitExceededException for service response error code + // "ShareLimitExceededException". + // + // The maximum number of AWS accounts that you can share with this directory + // has been reached. + ErrCodeShareLimitExceededException = "ShareLimitExceededException" + // ErrCodeSnapshotLimitExceededException for service response error code // "SnapshotLimitExceededException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/dlm/api.go b/vendor/github.com/aws/aws-sdk-go/service/dlm/api.go new file mode 100644 index 0000000000..82d7778f11 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/dlm/api.go @@ -0,0 +1,1369 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package dlm + +import ( + "fmt" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "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 opCreateLifecyclePolicy = "CreateLifecyclePolicy" + +// CreateLifecyclePolicyRequest generates a "aws/request.Request" representing the +// client's request for the CreateLifecyclePolicy 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 CreateLifecyclePolicy for more information on using the CreateLifecyclePolicy +// 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 CreateLifecyclePolicyRequest method. +// req, resp := client.CreateLifecyclePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/CreateLifecyclePolicy +func (c *DLM) CreateLifecyclePolicyRequest(input *CreateLifecyclePolicyInput) (req *request.Request, output *CreateLifecyclePolicyOutput) { + op := &request.Operation{ + Name: opCreateLifecyclePolicy, + HTTPMethod: "POST", + HTTPPath: "/policies", + } + + if input == nil { + input = &CreateLifecyclePolicyInput{} + } + + output = &CreateLifecyclePolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateLifecyclePolicy API operation for Amazon Data Lifecycle Manager. +// +// Creates a policy to manage the lifecycle of the specified AWS resources. +// You can create up to 100 lifecycle policies. +// +// 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 Data Lifecycle Manager's +// API operation CreateLifecyclePolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// Bad request. The request is missing required parameters or has invalid parameters. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request failed because a limit was exceeded. +// +// * ErrCodeInternalServerException "InternalServerException" +// The service failed in an unexpected way. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/CreateLifecyclePolicy +func (c *DLM) CreateLifecyclePolicy(input *CreateLifecyclePolicyInput) (*CreateLifecyclePolicyOutput, error) { + req, out := c.CreateLifecyclePolicyRequest(input) + return out, req.Send() +} + +// CreateLifecyclePolicyWithContext is the same as CreateLifecyclePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See CreateLifecyclePolicy 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 *DLM) CreateLifecyclePolicyWithContext(ctx aws.Context, input *CreateLifecyclePolicyInput, opts ...request.Option) (*CreateLifecyclePolicyOutput, error) { + req, out := c.CreateLifecyclePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteLifecyclePolicy = "DeleteLifecyclePolicy" + +// DeleteLifecyclePolicyRequest generates a "aws/request.Request" representing the +// client's request for the DeleteLifecyclePolicy 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 DeleteLifecyclePolicy for more information on using the DeleteLifecyclePolicy +// 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 DeleteLifecyclePolicyRequest method. +// req, resp := client.DeleteLifecyclePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/DeleteLifecyclePolicy +func (c *DLM) DeleteLifecyclePolicyRequest(input *DeleteLifecyclePolicyInput) (req *request.Request, output *DeleteLifecyclePolicyOutput) { + op := &request.Operation{ + Name: opDeleteLifecyclePolicy, + HTTPMethod: "DELETE", + HTTPPath: "/policies/{policyId}/", + } + + if input == nil { + input = &DeleteLifecyclePolicyInput{} + } + + output = &DeleteLifecyclePolicyOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteLifecyclePolicy API operation for Amazon Data Lifecycle Manager. +// +// Deletes the specified lifecycle policy and halts the automated operations +// that the policy specified. +// +// 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 Data Lifecycle Manager's +// API operation DeleteLifecyclePolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A requested resource was not found. +// +// * ErrCodeInternalServerException "InternalServerException" +// The service failed in an unexpected way. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request failed because a limit was exceeded. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/DeleteLifecyclePolicy +func (c *DLM) DeleteLifecyclePolicy(input *DeleteLifecyclePolicyInput) (*DeleteLifecyclePolicyOutput, error) { + req, out := c.DeleteLifecyclePolicyRequest(input) + return out, req.Send() +} + +// DeleteLifecyclePolicyWithContext is the same as DeleteLifecyclePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteLifecyclePolicy 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 *DLM) DeleteLifecyclePolicyWithContext(ctx aws.Context, input *DeleteLifecyclePolicyInput, opts ...request.Option) (*DeleteLifecyclePolicyOutput, error) { + req, out := c.DeleteLifecyclePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetLifecyclePolicies = "GetLifecyclePolicies" + +// GetLifecyclePoliciesRequest generates a "aws/request.Request" representing the +// client's request for the GetLifecyclePolicies 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 GetLifecyclePolicies for more information on using the GetLifecyclePolicies +// 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 GetLifecyclePoliciesRequest method. +// req, resp := client.GetLifecyclePoliciesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/GetLifecyclePolicies +func (c *DLM) GetLifecyclePoliciesRequest(input *GetLifecyclePoliciesInput) (req *request.Request, output *GetLifecyclePoliciesOutput) { + op := &request.Operation{ + Name: opGetLifecyclePolicies, + HTTPMethod: "GET", + HTTPPath: "/policies", + } + + if input == nil { + input = &GetLifecyclePoliciesInput{} + } + + output = &GetLifecyclePoliciesOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetLifecyclePolicies API operation for Amazon Data Lifecycle Manager. +// +// Gets summary information about all or the specified data lifecycle policies. +// +// To get complete information about a policy, use GetLifecyclePolicy. +// +// 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 Data Lifecycle Manager's +// API operation GetLifecyclePolicies for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A requested resource was not found. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// Bad request. The request is missing required parameters or has invalid parameters. +// +// * ErrCodeInternalServerException "InternalServerException" +// The service failed in an unexpected way. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request failed because a limit was exceeded. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/GetLifecyclePolicies +func (c *DLM) GetLifecyclePolicies(input *GetLifecyclePoliciesInput) (*GetLifecyclePoliciesOutput, error) { + req, out := c.GetLifecyclePoliciesRequest(input) + return out, req.Send() +} + +// GetLifecyclePoliciesWithContext is the same as GetLifecyclePolicies with the addition of +// the ability to pass a context and additional request options. +// +// See GetLifecyclePolicies 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 *DLM) GetLifecyclePoliciesWithContext(ctx aws.Context, input *GetLifecyclePoliciesInput, opts ...request.Option) (*GetLifecyclePoliciesOutput, error) { + req, out := c.GetLifecyclePoliciesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetLifecyclePolicy = "GetLifecyclePolicy" + +// GetLifecyclePolicyRequest generates a "aws/request.Request" representing the +// client's request for the GetLifecyclePolicy 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 GetLifecyclePolicy for more information on using the GetLifecyclePolicy +// 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 GetLifecyclePolicyRequest method. +// req, resp := client.GetLifecyclePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/GetLifecyclePolicy +func (c *DLM) GetLifecyclePolicyRequest(input *GetLifecyclePolicyInput) (req *request.Request, output *GetLifecyclePolicyOutput) { + op := &request.Operation{ + Name: opGetLifecyclePolicy, + HTTPMethod: "GET", + HTTPPath: "/policies/{policyId}/", + } + + if input == nil { + input = &GetLifecyclePolicyInput{} + } + + output = &GetLifecyclePolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetLifecyclePolicy API operation for Amazon Data Lifecycle Manager. +// +// Gets detailed information about the specified lifecycle policy. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Data Lifecycle Manager's +// API operation GetLifecyclePolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A requested resource was not found. +// +// * ErrCodeInternalServerException "InternalServerException" +// The service failed in an unexpected way. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request failed because a limit was exceeded. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/GetLifecyclePolicy +func (c *DLM) GetLifecyclePolicy(input *GetLifecyclePolicyInput) (*GetLifecyclePolicyOutput, error) { + req, out := c.GetLifecyclePolicyRequest(input) + return out, req.Send() +} + +// GetLifecyclePolicyWithContext is the same as GetLifecyclePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See GetLifecyclePolicy 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 *DLM) GetLifecyclePolicyWithContext(ctx aws.Context, input *GetLifecyclePolicyInput, opts ...request.Option) (*GetLifecyclePolicyOutput, error) { + req, out := c.GetLifecyclePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateLifecyclePolicy = "UpdateLifecyclePolicy" + +// UpdateLifecyclePolicyRequest generates a "aws/request.Request" representing the +// client's request for the UpdateLifecyclePolicy 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 UpdateLifecyclePolicy for more information on using the UpdateLifecyclePolicy +// 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 UpdateLifecyclePolicyRequest method. +// req, resp := client.UpdateLifecyclePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/UpdateLifecyclePolicy +func (c *DLM) UpdateLifecyclePolicyRequest(input *UpdateLifecyclePolicyInput) (req *request.Request, output *UpdateLifecyclePolicyOutput) { + op := &request.Operation{ + Name: opUpdateLifecyclePolicy, + HTTPMethod: "PATCH", + HTTPPath: "/policies/{policyId}", + } + + if input == nil { + input = &UpdateLifecyclePolicyInput{} + } + + output = &UpdateLifecyclePolicyOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateLifecyclePolicy API operation for Amazon Data Lifecycle Manager. +// +// Updates the specified lifecycle policy. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Data Lifecycle Manager's +// API operation UpdateLifecyclePolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// A requested resource was not found. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// Bad request. The request is missing required parameters or has invalid parameters. +// +// * ErrCodeInternalServerException "InternalServerException" +// The service failed in an unexpected way. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The request failed because a limit was exceeded. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12/UpdateLifecyclePolicy +func (c *DLM) UpdateLifecyclePolicy(input *UpdateLifecyclePolicyInput) (*UpdateLifecyclePolicyOutput, error) { + req, out := c.UpdateLifecyclePolicyRequest(input) + return out, req.Send() +} + +// UpdateLifecyclePolicyWithContext is the same as UpdateLifecyclePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateLifecyclePolicy 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 *DLM) UpdateLifecyclePolicyWithContext(ctx aws.Context, input *UpdateLifecyclePolicyInput, opts ...request.Option) (*UpdateLifecyclePolicyOutput, error) { + req, out := c.UpdateLifecyclePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type CreateLifecyclePolicyInput struct { + _ struct{} `type:"structure"` + + // A description of the lifecycle policy. The characters ^[0-9A-Za-z _-]+$ are + // supported. + // + // Description is a required field + Description *string `type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the IAM role used to run the operations + // specified by the lifecycle policy. + // + // ExecutionRoleArn is a required field + ExecutionRoleArn *string `type:"string" required:"true"` + + // The configuration details of the lifecycle policy. + // + // Target tags cannot be re-used across lifecycle policies. + // + // PolicyDetails is a required field + PolicyDetails *PolicyDetails `type:"structure" required:"true"` + + // The desired activation state of the lifecycle policy after creation. + // + // State is a required field + State *string `type:"string" required:"true" enum:"SettablePolicyStateValues"` +} + +// String returns the string representation +func (s CreateLifecyclePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLifecyclePolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateLifecyclePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateLifecyclePolicyInput"} + if s.Description == nil { + invalidParams.Add(request.NewErrParamRequired("Description")) + } + if s.ExecutionRoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("ExecutionRoleArn")) + } + if s.PolicyDetails == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyDetails")) + } + if s.State == nil { + invalidParams.Add(request.NewErrParamRequired("State")) + } + if s.PolicyDetails != nil { + if err := s.PolicyDetails.Validate(); err != nil { + invalidParams.AddNested("PolicyDetails", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *CreateLifecyclePolicyInput) SetDescription(v string) *CreateLifecyclePolicyInput { + s.Description = &v + return s +} + +// SetExecutionRoleArn sets the ExecutionRoleArn field's value. +func (s *CreateLifecyclePolicyInput) SetExecutionRoleArn(v string) *CreateLifecyclePolicyInput { + s.ExecutionRoleArn = &v + return s +} + +// SetPolicyDetails sets the PolicyDetails field's value. +func (s *CreateLifecyclePolicyInput) SetPolicyDetails(v *PolicyDetails) *CreateLifecyclePolicyInput { + s.PolicyDetails = v + return s +} + +// SetState sets the State field's value. +func (s *CreateLifecyclePolicyInput) SetState(v string) *CreateLifecyclePolicyInput { + s.State = &v + return s +} + +type CreateLifecyclePolicyOutput struct { + _ struct{} `type:"structure"` + + // The identifier of the lifecycle policy. + PolicyId *string `type:"string"` +} + +// String returns the string representation +func (s CreateLifecyclePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLifecyclePolicyOutput) GoString() string { + return s.String() +} + +// SetPolicyId sets the PolicyId field's value. +func (s *CreateLifecyclePolicyOutput) SetPolicyId(v string) *CreateLifecyclePolicyOutput { + s.PolicyId = &v + return s +} + +// Specifies when to create snapshots of EBS volumes. +type CreateRule struct { + _ struct{} `type:"structure"` + + // The interval. The supported values are 12 and 24. + // + // Interval is a required field + Interval *int64 `min:"1" type:"integer" required:"true"` + + // The interval unit. + // + // IntervalUnit is a required field + IntervalUnit *string `type:"string" required:"true" enum:"IntervalUnitValues"` + + // The time, in UTC, to start the operation. + // + // The operation occurs within a one-hour window following the specified time. + Times []*string `type:"list"` +} + +// String returns the string representation +func (s CreateRule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateRule) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateRule) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateRule"} + if s.Interval == nil { + invalidParams.Add(request.NewErrParamRequired("Interval")) + } + if s.Interval != nil && *s.Interval < 1 { + invalidParams.Add(request.NewErrParamMinValue("Interval", 1)) + } + if s.IntervalUnit == nil { + invalidParams.Add(request.NewErrParamRequired("IntervalUnit")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInterval sets the Interval field's value. +func (s *CreateRule) SetInterval(v int64) *CreateRule { + s.Interval = &v + return s +} + +// SetIntervalUnit sets the IntervalUnit field's value. +func (s *CreateRule) SetIntervalUnit(v string) *CreateRule { + s.IntervalUnit = &v + return s +} + +// SetTimes sets the Times field's value. +func (s *CreateRule) SetTimes(v []*string) *CreateRule { + s.Times = v + return s +} + +type DeleteLifecyclePolicyInput struct { + _ struct{} `type:"structure"` + + // The identifier of the lifecycle policy. + // + // PolicyId is a required field + PolicyId *string `location:"uri" locationName:"policyId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteLifecyclePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLifecyclePolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteLifecyclePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLifecyclePolicyInput"} + if s.PolicyId == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyId")) + } + if s.PolicyId != nil && len(*s.PolicyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPolicyId sets the PolicyId field's value. +func (s *DeleteLifecyclePolicyInput) SetPolicyId(v string) *DeleteLifecyclePolicyInput { + s.PolicyId = &v + return s +} + +type DeleteLifecyclePolicyOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteLifecyclePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLifecyclePolicyOutput) GoString() string { + return s.String() +} + +type GetLifecyclePoliciesInput struct { + _ struct{} `type:"structure"` + + // The identifiers of the data lifecycle policies. + PolicyIds []*string `location:"querystring" locationName:"policyIds" type:"list"` + + // The resource type. + ResourceTypes []*string `location:"querystring" locationName:"resourceTypes" min:"1" type:"list"` + + // The activation state. + State *string `location:"querystring" locationName:"state" type:"string" enum:"GettablePolicyStateValues"` + + // The tags to add to objects created by the policy. + // + // Tags are strings in the format key=value. + // + // These user-defined tags are added in addition to the AWS-added lifecycle + // tags. + TagsToAdd []*string `location:"querystring" locationName:"tagsToAdd" type:"list"` + + // The target tag for a policy. + // + // Tags are strings in the format key=value. + TargetTags []*string `location:"querystring" locationName:"targetTags" min:"1" type:"list"` +} + +// String returns the string representation +func (s GetLifecyclePoliciesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLifecyclePoliciesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetLifecyclePoliciesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetLifecyclePoliciesInput"} + if s.ResourceTypes != nil && len(s.ResourceTypes) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceTypes", 1)) + } + if s.TargetTags != nil && len(s.TargetTags) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TargetTags", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPolicyIds sets the PolicyIds field's value. +func (s *GetLifecyclePoliciesInput) SetPolicyIds(v []*string) *GetLifecyclePoliciesInput { + s.PolicyIds = v + return s +} + +// SetResourceTypes sets the ResourceTypes field's value. +func (s *GetLifecyclePoliciesInput) SetResourceTypes(v []*string) *GetLifecyclePoliciesInput { + s.ResourceTypes = v + return s +} + +// SetState sets the State field's value. +func (s *GetLifecyclePoliciesInput) SetState(v string) *GetLifecyclePoliciesInput { + s.State = &v + return s +} + +// SetTagsToAdd sets the TagsToAdd field's value. +func (s *GetLifecyclePoliciesInput) SetTagsToAdd(v []*string) *GetLifecyclePoliciesInput { + s.TagsToAdd = v + return s +} + +// SetTargetTags sets the TargetTags field's value. +func (s *GetLifecyclePoliciesInput) SetTargetTags(v []*string) *GetLifecyclePoliciesInput { + s.TargetTags = v + return s +} + +type GetLifecyclePoliciesOutput struct { + _ struct{} `type:"structure"` + + // Summary information about the lifecycle policies. + Policies []*LifecyclePolicySummary `type:"list"` +} + +// String returns the string representation +func (s GetLifecyclePoliciesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLifecyclePoliciesOutput) GoString() string { + return s.String() +} + +// SetPolicies sets the Policies field's value. +func (s *GetLifecyclePoliciesOutput) SetPolicies(v []*LifecyclePolicySummary) *GetLifecyclePoliciesOutput { + s.Policies = v + return s +} + +type GetLifecyclePolicyInput struct { + _ struct{} `type:"structure"` + + // The identifier of the lifecycle policy. + // + // PolicyId is a required field + PolicyId *string `location:"uri" locationName:"policyId" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetLifecyclePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLifecyclePolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetLifecyclePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetLifecyclePolicyInput"} + if s.PolicyId == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyId")) + } + if s.PolicyId != nil && len(*s.PolicyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPolicyId sets the PolicyId field's value. +func (s *GetLifecyclePolicyInput) SetPolicyId(v string) *GetLifecyclePolicyInput { + s.PolicyId = &v + return s +} + +type GetLifecyclePolicyOutput struct { + _ struct{} `type:"structure"` + + // Detailed information about the lifecycle policy. + Policy *LifecyclePolicy `type:"structure"` +} + +// String returns the string representation +func (s GetLifecyclePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLifecyclePolicyOutput) GoString() string { + return s.String() +} + +// SetPolicy sets the Policy field's value. +func (s *GetLifecyclePolicyOutput) SetPolicy(v *LifecyclePolicy) *GetLifecyclePolicyOutput { + s.Policy = v + return s +} + +// Detailed information about a lifecycle policy. +type LifecyclePolicy struct { + _ struct{} `type:"structure"` + + // The local date and time when the lifecycle policy was created. + DateCreated *time.Time `type:"timestamp"` + + // The local date and time when the lifecycle policy was last modified. + DateModified *time.Time `type:"timestamp"` + + // The description of the lifecycle policy. + Description *string `type:"string"` + + // The Amazon Resource Name (ARN) of the IAM role used to run the operations + // specified by the lifecycle policy. + ExecutionRoleArn *string `type:"string"` + + // The configuration of the lifecycle policy + PolicyDetails *PolicyDetails `type:"structure"` + + // The identifier of the lifecycle policy. + PolicyId *string `type:"string"` + + // The activation state of the lifecycle policy. + State *string `type:"string" enum:"GettablePolicyStateValues"` +} + +// String returns the string representation +func (s LifecyclePolicy) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LifecyclePolicy) GoString() string { + return s.String() +} + +// SetDateCreated sets the DateCreated field's value. +func (s *LifecyclePolicy) SetDateCreated(v time.Time) *LifecyclePolicy { + s.DateCreated = &v + return s +} + +// SetDateModified sets the DateModified field's value. +func (s *LifecyclePolicy) SetDateModified(v time.Time) *LifecyclePolicy { + s.DateModified = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *LifecyclePolicy) SetDescription(v string) *LifecyclePolicy { + s.Description = &v + return s +} + +// SetExecutionRoleArn sets the ExecutionRoleArn field's value. +func (s *LifecyclePolicy) SetExecutionRoleArn(v string) *LifecyclePolicy { + s.ExecutionRoleArn = &v + return s +} + +// SetPolicyDetails sets the PolicyDetails field's value. +func (s *LifecyclePolicy) SetPolicyDetails(v *PolicyDetails) *LifecyclePolicy { + s.PolicyDetails = v + return s +} + +// SetPolicyId sets the PolicyId field's value. +func (s *LifecyclePolicy) SetPolicyId(v string) *LifecyclePolicy { + s.PolicyId = &v + return s +} + +// SetState sets the State field's value. +func (s *LifecyclePolicy) SetState(v string) *LifecyclePolicy { + s.State = &v + return s +} + +// Summary information about a lifecycle policy. +type LifecyclePolicySummary struct { + _ struct{} `type:"structure"` + + // The description of the lifecycle policy. + Description *string `type:"string"` + + // The identifier of the lifecycle policy. + PolicyId *string `type:"string"` + + // The activation state of the lifecycle policy. + State *string `type:"string" enum:"GettablePolicyStateValues"` +} + +// String returns the string representation +func (s LifecyclePolicySummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LifecyclePolicySummary) GoString() string { + return s.String() +} + +// SetDescription sets the Description field's value. +func (s *LifecyclePolicySummary) SetDescription(v string) *LifecyclePolicySummary { + s.Description = &v + return s +} + +// SetPolicyId sets the PolicyId field's value. +func (s *LifecyclePolicySummary) SetPolicyId(v string) *LifecyclePolicySummary { + s.PolicyId = &v + return s +} + +// SetState sets the State field's value. +func (s *LifecyclePolicySummary) SetState(v string) *LifecyclePolicySummary { + s.State = &v + return s +} + +// Specifies the configuration of a lifecycle policy. +type PolicyDetails struct { + _ struct{} `type:"structure"` + + // The resource type. + ResourceTypes []*string `min:"1" type:"list"` + + // The schedule of policy-defined actions. + Schedules []*Schedule `min:"1" type:"list"` + + // The single tag that identifies targeted resources for this policy. + TargetTags []*Tag `min:"1" type:"list"` +} + +// String returns the string representation +func (s PolicyDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PolicyDetails) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PolicyDetails) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PolicyDetails"} + if s.ResourceTypes != nil && len(s.ResourceTypes) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceTypes", 1)) + } + if s.Schedules != nil && len(s.Schedules) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Schedules", 1)) + } + if s.TargetTags != nil && len(s.TargetTags) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TargetTags", 1)) + } + if s.Schedules != nil { + for i, v := range s.Schedules { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Schedules", i), err.(request.ErrInvalidParams)) + } + } + } + if s.TargetTags != nil { + for i, v := range s.TargetTags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetTags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceTypes sets the ResourceTypes field's value. +func (s *PolicyDetails) SetResourceTypes(v []*string) *PolicyDetails { + s.ResourceTypes = v + return s +} + +// SetSchedules sets the Schedules field's value. +func (s *PolicyDetails) SetSchedules(v []*Schedule) *PolicyDetails { + s.Schedules = v + return s +} + +// SetTargetTags sets the TargetTags field's value. +func (s *PolicyDetails) SetTargetTags(v []*Tag) *PolicyDetails { + s.TargetTags = v + return s +} + +// Specifies the number of snapshots to keep for each EBS volume. +type RetainRule struct { + _ struct{} `type:"structure"` + + // The number of snapshots to keep for each volume, up to a maximum of 1000. + // + // Count is a required field + Count *int64 `min:"1" type:"integer" required:"true"` +} + +// String returns the string representation +func (s RetainRule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RetainRule) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RetainRule) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RetainRule"} + if s.Count == nil { + invalidParams.Add(request.NewErrParamRequired("Count")) + } + if s.Count != nil && *s.Count < 1 { + invalidParams.Add(request.NewErrParamMinValue("Count", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCount sets the Count field's value. +func (s *RetainRule) SetCount(v int64) *RetainRule { + s.Count = &v + return s +} + +// Specifies a schedule. +type Schedule struct { + _ struct{} `type:"structure"` + + CopyTags *bool `type:"boolean"` + + // The create rule. + CreateRule *CreateRule `type:"structure"` + + // The name of the schedule. + Name *string `type:"string"` + + // The retain rule. + RetainRule *RetainRule `type:"structure"` + + // The tags to apply to policy-created resources. These user-defined tags are + // in addition to the AWS-added lifecycle tags. + TagsToAdd []*Tag `type:"list"` +} + +// String returns the string representation +func (s Schedule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Schedule) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Schedule) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Schedule"} + if s.CreateRule != nil { + if err := s.CreateRule.Validate(); err != nil { + invalidParams.AddNested("CreateRule", err.(request.ErrInvalidParams)) + } + } + if s.RetainRule != nil { + if err := s.RetainRule.Validate(); err != nil { + invalidParams.AddNested("RetainRule", err.(request.ErrInvalidParams)) + } + } + if s.TagsToAdd != nil { + for i, v := range s.TagsToAdd { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagsToAdd", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCopyTags sets the CopyTags field's value. +func (s *Schedule) SetCopyTags(v bool) *Schedule { + s.CopyTags = &v + return s +} + +// SetCreateRule sets the CreateRule field's value. +func (s *Schedule) SetCreateRule(v *CreateRule) *Schedule { + s.CreateRule = v + return s +} + +// SetName sets the Name field's value. +func (s *Schedule) SetName(v string) *Schedule { + s.Name = &v + return s +} + +// SetRetainRule sets the RetainRule field's value. +func (s *Schedule) SetRetainRule(v *RetainRule) *Schedule { + s.RetainRule = v + return s +} + +// SetTagsToAdd sets the TagsToAdd field's value. +func (s *Schedule) SetTagsToAdd(v []*Tag) *Schedule { + s.TagsToAdd = v + return s +} + +// Specifies a tag for a resource. +type Tag struct { + _ struct{} `type:"structure"` + + // The tag key. + // + // Key is a required field + Key *string `type:"string" required:"true"` + + // The tag value. + // + // Value is a required field + Value *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Tag) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Tag"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +type UpdateLifecyclePolicyInput struct { + _ struct{} `type:"structure"` + + // A description of the lifecycle policy. + Description *string `type:"string"` + + // The Amazon Resource Name (ARN) of the IAM role used to run the operations + // specified by the lifecycle policy. + ExecutionRoleArn *string `type:"string"` + + // The configuration of the lifecycle policy. + // + // Target tags cannot be re-used across policies. + PolicyDetails *PolicyDetails `type:"structure"` + + // The identifier of the lifecycle policy. + // + // PolicyId is a required field + PolicyId *string `location:"uri" locationName:"policyId" type:"string" required:"true"` + + // The desired activation state of the lifecycle policy after creation. + State *string `type:"string" enum:"SettablePolicyStateValues"` +} + +// String returns the string representation +func (s UpdateLifecyclePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateLifecyclePolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateLifecyclePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateLifecyclePolicyInput"} + if s.PolicyId == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyId")) + } + if s.PolicyId != nil && len(*s.PolicyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyId", 1)) + } + if s.PolicyDetails != nil { + if err := s.PolicyDetails.Validate(); err != nil { + invalidParams.AddNested("PolicyDetails", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *UpdateLifecyclePolicyInput) SetDescription(v string) *UpdateLifecyclePolicyInput { + s.Description = &v + return s +} + +// SetExecutionRoleArn sets the ExecutionRoleArn field's value. +func (s *UpdateLifecyclePolicyInput) SetExecutionRoleArn(v string) *UpdateLifecyclePolicyInput { + s.ExecutionRoleArn = &v + return s +} + +// SetPolicyDetails sets the PolicyDetails field's value. +func (s *UpdateLifecyclePolicyInput) SetPolicyDetails(v *PolicyDetails) *UpdateLifecyclePolicyInput { + s.PolicyDetails = v + return s +} + +// SetPolicyId sets the PolicyId field's value. +func (s *UpdateLifecyclePolicyInput) SetPolicyId(v string) *UpdateLifecyclePolicyInput { + s.PolicyId = &v + return s +} + +// SetState sets the State field's value. +func (s *UpdateLifecyclePolicyInput) SetState(v string) *UpdateLifecyclePolicyInput { + s.State = &v + return s +} + +type UpdateLifecyclePolicyOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateLifecyclePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateLifecyclePolicyOutput) GoString() string { + return s.String() +} + +const ( + // GettablePolicyStateValuesEnabled is a GettablePolicyStateValues enum value + GettablePolicyStateValuesEnabled = "ENABLED" + + // GettablePolicyStateValuesDisabled is a GettablePolicyStateValues enum value + GettablePolicyStateValuesDisabled = "DISABLED" + + // GettablePolicyStateValuesError is a GettablePolicyStateValues enum value + GettablePolicyStateValuesError = "ERROR" +) + +const ( + // IntervalUnitValuesHours is a IntervalUnitValues enum value + IntervalUnitValuesHours = "HOURS" +) + +const ( + // ResourceTypeValuesVolume is a ResourceTypeValues enum value + ResourceTypeValuesVolume = "VOLUME" +) + +const ( + // SettablePolicyStateValuesEnabled is a SettablePolicyStateValues enum value + SettablePolicyStateValuesEnabled = "ENABLED" + + // SettablePolicyStateValuesDisabled is a SettablePolicyStateValues enum value + SettablePolicyStateValuesDisabled = "DISABLED" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/dlm/doc.go b/vendor/github.com/aws/aws-sdk-go/service/dlm/doc.go new file mode 100644 index 0000000000..52f3edd731 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/dlm/doc.go @@ -0,0 +1,35 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package dlm provides the client and types for making API +// requests to Amazon Data Lifecycle Manager. +// +// With Amazon Data Lifecycle Manager, you can manage the lifecycle of your +// AWS resources. You create lifecycle policies, which are used to automate +// operations on the specified resources. +// +// Amazon DLM supports Amazon EBS volumes and snapshots. For information about +// using Amazon DLM with Amazon EBS, see Automating the Amazon EBS Snapshot +// Lifecycle (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-lifecycle.html) +// in the Amazon EC2 User Guide. +// +// See https://docs.aws.amazon.com/goto/WebAPI/dlm-2018-01-12 for more information on this service. +// +// See dlm package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/dlm/ +// +// Using the Client +// +// To contact Amazon Data Lifecycle Manager 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 Amazon Data Lifecycle Manager client DLM for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/dlm/#New +package dlm diff --git a/vendor/github.com/aws/aws-sdk-go/service/dlm/errors.go b/vendor/github.com/aws/aws-sdk-go/service/dlm/errors.go new file mode 100644 index 0000000000..f2f7e4b92b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/dlm/errors.go @@ -0,0 +1,30 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package dlm + +const ( + + // ErrCodeInternalServerException for service response error code + // "InternalServerException". + // + // The service failed in an unexpected way. + ErrCodeInternalServerException = "InternalServerException" + + // ErrCodeInvalidRequestException for service response error code + // "InvalidRequestException". + // + // Bad request. The request is missing required parameters or has invalid parameters. + ErrCodeInvalidRequestException = "InvalidRequestException" + + // ErrCodeLimitExceededException for service response error code + // "LimitExceededException". + // + // The request failed because a limit was exceeded. + ErrCodeLimitExceededException = "LimitExceededException" + + // ErrCodeResourceNotFoundException for service response error code + // "ResourceNotFoundException". + // + // A requested resource was not found. + ErrCodeResourceNotFoundException = "ResourceNotFoundException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/dlm/service.go b/vendor/github.com/aws/aws-sdk-go/service/dlm/service.go new file mode 100644 index 0000000000..63b2a803ed --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/dlm/service.go @@ -0,0 +1,99 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package dlm + +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/restjson" +) + +// DLM provides the API operation methods for making requests to +// Amazon Data Lifecycle Manager. See this package's package overview docs +// for details on the service. +// +// DLM methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type DLM 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 = "DLM" // Name of service. + EndpointsID = "dlm" // ID to lookup a service endpoint with. + ServiceID = "DLM" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the DLM 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: +// // Create a DLM client from just a session. +// svc := dlm.New(mySession) +// +// // Create a DLM client with additional configuration +// svc := dlm.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *DLM { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "dlm" + } + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *DLM { + svc := &DLM{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2018-01-12", + JSONVersion: "1.1", + }, + 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(restjson.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a DLM operation and runs any +// custom request initialization. +func (c *DLM) 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/dynamodb/api.go b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go index 332b76dd47..4777301951 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/api.go @@ -4,10 +4,12 @@ package dynamodb import ( "fmt" + "net/url" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/crr" "github.com/aws/aws-sdk-go/aws/request" "github.com/aws/aws-sdk-go/private/protocol" "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" @@ -18,7 +20,7 @@ const opBatchGetItem = "BatchGetItem" // BatchGetItemRequest generates a "aws/request.Request" representing the // client's request for the BatchGetItem operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -58,6 +60,27 @@ func (c *DynamoDB) BatchGetItemRequest(input *BatchGetItemInput) (req *request.R output = &BatchGetItemOutput{} req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -133,6 +156,11 @@ func (c *DynamoDB) BatchGetItemRequest(input *BatchGetItemInput) (req *request.R // The operation tried to access a nonexistent table or index. The resource // might not be specified correctly, or its status might not be ACTIVE. // +// * ErrCodeRequestLimitExceeded "RequestLimitExceeded" +// Throughput exceeds the current throughput limit for your account. Please +// contact AWS Support at AWS Support (http://docs.aws.amazon.com/https:/aws.amazon.com/support) +// to request a limit increase. +// // * ErrCodeInternalServerError "InternalServerError" // An error occurred on the server side. // @@ -213,7 +241,7 @@ const opBatchWriteItem = "BatchWriteItem" // BatchWriteItemRequest generates a "aws/request.Request" representing the // client's request for the BatchWriteItem operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -247,6 +275,27 @@ func (c *DynamoDB) BatchWriteItemRequest(input *BatchWriteItemInput) (req *reque output = &BatchWriteItemOutput{} req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -349,6 +398,11 @@ func (c *DynamoDB) BatchWriteItemRequest(input *BatchWriteItemInput) (req *reque // An item collection is too large. This exception is only returned for tables // that have one or more local secondary indexes. // +// * ErrCodeRequestLimitExceeded "RequestLimitExceeded" +// Throughput exceeds the current throughput limit for your account. Please +// contact AWS Support at AWS Support (http://docs.aws.amazon.com/https:/aws.amazon.com/support) +// to request a limit increase. +// // * ErrCodeInternalServerError "InternalServerError" // An error occurred on the server side. // @@ -379,7 +433,7 @@ const opCreateBackup = "CreateBackup" // CreateBackupRequest generates a "aws/request.Request" representing the // client's request for the CreateBackup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -413,6 +467,27 @@ func (c *DynamoDB) CreateBackupRequest(input *CreateBackupInput) (req *request.R output = &CreateBackupOutput{} req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -469,7 +544,7 @@ func (c *DynamoDB) CreateBackupRequest(input *CreateBackupInput) (req *request.R // // * ErrCodeBackupInUseException "BackupInUseException" // There is another ongoing conflicting backup control plane operation on the -// table. The backups is either being created, deleted or restored to a table. +// table. The backup is either being created, deleted or restored to a table. // // * ErrCodeLimitExceededException "LimitExceededException" // There is no limit to the number of daily on-demand backups that can be taken. @@ -514,7 +589,7 @@ const opCreateGlobalTable = "CreateGlobalTable" // CreateGlobalTableRequest generates a "aws/request.Request" representing the // client's request for the CreateGlobalTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -548,6 +623,27 @@ func (c *DynamoDB) CreateGlobalTableRequest(input *CreateGlobalTableInput) (req output = &CreateGlobalTableOutput{} req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -645,7 +741,7 @@ const opCreateTable = "CreateTable" // CreateTableRequest generates a "aws/request.Request" representing the // client's request for the CreateTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -679,6 +775,27 @@ func (c *DynamoDB) CreateTableRequest(input *CreateTableInput) (req *request.Req output = &CreateTableOutput{} req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -756,7 +873,7 @@ const opDeleteBackup = "DeleteBackup" // DeleteBackupRequest generates a "aws/request.Request" representing the // client's request for the DeleteBackup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -790,6 +907,27 @@ func (c *DynamoDB) DeleteBackupRequest(input *DeleteBackupInput) (req *request.R output = &DeleteBackupOutput{} req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -812,7 +950,7 @@ func (c *DynamoDB) DeleteBackupRequest(input *DeleteBackupInput) (req *request.R // // * ErrCodeBackupInUseException "BackupInUseException" // There is another ongoing conflicting backup control plane operation on the -// table. The backups is either being created, deleted or restored to a table. +// table. The backup is either being created, deleted or restored to a table. // // * ErrCodeLimitExceededException "LimitExceededException" // There is no limit to the number of daily on-demand backups that can be taken. @@ -857,7 +995,7 @@ const opDeleteItem = "DeleteItem" // DeleteItemRequest generates a "aws/request.Request" representing the // client's request for the DeleteItem operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -891,6 +1029,27 @@ func (c *DynamoDB) DeleteItemRequest(input *DeleteItemInput) (req *request.Reque output = &DeleteItemOutput{} req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -938,6 +1097,14 @@ func (c *DynamoDB) DeleteItemRequest(input *DeleteItemInput) (req *request.Reque // An item collection is too large. This exception is only returned for tables // that have one or more local secondary indexes. // +// * ErrCodeTransactionConflictException "TransactionConflictException" +// Operation was rejected because there is an ongoing transaction for the item. +// +// * ErrCodeRequestLimitExceeded "RequestLimitExceeded" +// Throughput exceeds the current throughput limit for your account. Please +// contact AWS Support at AWS Support (http://docs.aws.amazon.com/https:/aws.amazon.com/support) +// to request a limit increase. +// // * ErrCodeInternalServerError "InternalServerError" // An error occurred on the server side. // @@ -968,7 +1135,7 @@ const opDeleteTable = "DeleteTable" // DeleteTableRequest generates a "aws/request.Request" representing the // client's request for the DeleteTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1002,6 +1169,27 @@ func (c *DynamoDB) DeleteTableRequest(input *DeleteTableInput) (req *request.Req output = &DeleteTableOutput{} req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -1086,7 +1274,7 @@ const opDescribeBackup = "DescribeBackup" // DescribeBackupRequest generates a "aws/request.Request" representing the // client's request for the DescribeBackup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1120,6 +1308,27 @@ func (c *DynamoDB) DescribeBackupRequest(input *DescribeBackupInput) (req *reque output = &DescribeBackupOutput{} req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -1170,7 +1379,7 @@ const opDescribeContinuousBackups = "DescribeContinuousBackups" // DescribeContinuousBackupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeContinuousBackups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1204,6 +1413,27 @@ func (c *DynamoDB) DescribeContinuousBackupsRequest(input *DescribeContinuousBac output = &DescribeContinuousBackupsOutput{} req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -1265,7 +1495,7 @@ const opDescribeEndpoints = "DescribeEndpoints" // DescribeEndpointsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEndpoints operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1332,12 +1562,71 @@ func (c *DynamoDB) DescribeEndpointsWithContext(ctx aws.Context, input *Describe return out, req.Send() } +type discovererDescribeEndpoints struct { + Client *DynamoDB + Required bool + EndpointCache *crr.EndpointCache + Params map[string]*string + Key string +} + +func (d *discovererDescribeEndpoints) Discover() (crr.Endpoint, error) { + input := &DescribeEndpointsInput{} + + resp, err := d.Client.DescribeEndpoints(input) + if err != nil { + return crr.Endpoint{}, err + } + + endpoint := crr.Endpoint{ + Key: d.Key, + } + + for _, e := range resp.Endpoints { + if e.Address == nil { + continue + } + + cachedInMinutes := aws.Int64Value(e.CachePeriodInMinutes) + u, err := url.Parse(*e.Address) + if err != nil { + continue + } + + addr := crr.WeightedAddress{ + URL: u, + Expired: time.Now().Add(time.Duration(cachedInMinutes) * time.Minute), + } + + endpoint.Add(addr) + } + + d.EndpointCache.Add(endpoint) + + return endpoint, nil +} + +func (d *discovererDescribeEndpoints) Handler(r *request.Request) { + endpointKey := crr.BuildEndpointKey(d.Params) + d.Key = endpointKey + + endpoint, err := d.EndpointCache.Get(d, endpointKey, d.Required) + if err != nil { + r.Error = err + return + } + + if endpoint.URL != nil && len(endpoint.URL.String()) > 0 { + r.HTTPRequest.URL = endpoint.URL + } +} + const opDescribeGlobalTable = "DescribeGlobalTable" // DescribeGlobalTableRequest generates a "aws/request.Request" representing the // client's request for the DescribeGlobalTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1371,6 +1660,27 @@ func (c *DynamoDB) DescribeGlobalTableRequest(input *DescribeGlobalTableInput) ( output = &DescribeGlobalTableOutput{} req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -1419,7 +1729,7 @@ const opDescribeGlobalTableSettings = "DescribeGlobalTableSettings" // DescribeGlobalTableSettingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeGlobalTableSettings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1453,6 +1763,27 @@ func (c *DynamoDB) DescribeGlobalTableSettingsRequest(input *DescribeGlobalTable output = &DescribeGlobalTableSettingsOutput{} req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -1501,7 +1832,7 @@ const opDescribeLimits = "DescribeLimits" // DescribeLimitsRequest generates a "aws/request.Request" representing the // client's request for the DescribeLimits operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1535,6 +1866,27 @@ func (c *DynamoDB) DescribeLimitsRequest(input *DescribeLimitsInput) (req *reque output = &DescribeLimitsOutput{} req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -1636,7 +1988,7 @@ const opDescribeTable = "DescribeTable" // DescribeTableRequest generates a "aws/request.Request" representing the // client's request for the DescribeTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1670,6 +2022,27 @@ func (c *DynamoDB) DescribeTableRequest(input *DescribeTableInput) (req *request output = &DescribeTableOutput{} req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -1727,7 +2100,7 @@ const opDescribeTimeToLive = "DescribeTimeToLive" // DescribeTimeToLiveRequest generates a "aws/request.Request" representing the // client's request for the DescribeTimeToLive operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1761,6 +2134,27 @@ func (c *DynamoDB) DescribeTimeToLiveRequest(input *DescribeTimeToLiveInput) (re output = &DescribeTimeToLiveOutput{} req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -1810,7 +2204,7 @@ const opGetItem = "GetItem" // GetItemRequest generates a "aws/request.Request" representing the // client's request for the GetItem operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1844,6 +2238,27 @@ func (c *DynamoDB) GetItemRequest(input *GetItemInput) (req *request.Request, ou output = &GetItemOutput{} req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -1878,6 +2293,11 @@ func (c *DynamoDB) GetItemRequest(input *GetItemInput) (req *request.Request, ou // The operation tried to access a nonexistent table or index. The resource // might not be specified correctly, or its status might not be ACTIVE. // +// * ErrCodeRequestLimitExceeded "RequestLimitExceeded" +// Throughput exceeds the current throughput limit for your account. Please +// contact AWS Support at AWS Support (http://docs.aws.amazon.com/https:/aws.amazon.com/support) +// to request a limit increase. +// // * ErrCodeInternalServerError "InternalServerError" // An error occurred on the server side. // @@ -1908,7 +2328,7 @@ const opListBackups = "ListBackups" // ListBackupsRequest generates a "aws/request.Request" representing the // client's request for the ListBackups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1942,6 +2362,27 @@ func (c *DynamoDB) ListBackupsRequest(input *ListBackupsInput) (req *request.Req output = &ListBackupsOutput{} req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -1995,7 +2436,7 @@ const opListGlobalTables = "ListGlobalTables" // ListGlobalTablesRequest generates a "aws/request.Request" representing the // client's request for the ListGlobalTables operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2029,6 +2470,27 @@ func (c *DynamoDB) ListGlobalTablesRequest(input *ListGlobalTablesInput) (req *r output = &ListGlobalTablesOutput{} req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -2074,7 +2536,7 @@ const opListTables = "ListTables" // ListTablesRequest generates a "aws/request.Request" representing the // client's request for the ListTables operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2114,6 +2576,27 @@ func (c *DynamoDB) ListTablesRequest(input *ListTablesInput) (req *request.Reque output = &ListTablesOutput{} req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -2211,7 +2694,7 @@ const opListTagsOfResource = "ListTagsOfResource" // ListTagsOfResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsOfResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2245,6 +2728,27 @@ func (c *DynamoDB) ListTagsOfResourceRequest(input *ListTagsOfResourceInput) (re output = &ListTagsOfResourceOutput{} req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -2298,7 +2802,7 @@ const opPutItem = "PutItem" // PutItemRequest generates a "aws/request.Request" representing the // client's request for the PutItem operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2332,6 +2836,27 @@ func (c *DynamoDB) PutItemRequest(input *PutItemInput) (req *request.Request, ou output = &PutItemOutput{} req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -2409,6 +2934,14 @@ func (c *DynamoDB) PutItemRequest(input *PutItemInput) (req *request.Request, ou // An item collection is too large. This exception is only returned for tables // that have one or more local secondary indexes. // +// * ErrCodeTransactionConflictException "TransactionConflictException" +// Operation was rejected because there is an ongoing transaction for the item. +// +// * ErrCodeRequestLimitExceeded "RequestLimitExceeded" +// Throughput exceeds the current throughput limit for your account. Please +// contact AWS Support at AWS Support (http://docs.aws.amazon.com/https:/aws.amazon.com/support) +// to request a limit increase. +// // * ErrCodeInternalServerError "InternalServerError" // An error occurred on the server side. // @@ -2439,7 +2972,7 @@ const opQuery = "Query" // QueryRequest generates a "aws/request.Request" representing the // client's request for the Query operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2479,6 +3012,27 @@ func (c *DynamoDB) QueryRequest(input *QueryInput) (req *request.Request, output output = &QueryOutput{} req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -2553,6 +3107,11 @@ func (c *DynamoDB) QueryRequest(input *QueryInput) (req *request.Request, output // The operation tried to access a nonexistent table or index. The resource // might not be specified correctly, or its status might not be ACTIVE. // +// * ErrCodeRequestLimitExceeded "RequestLimitExceeded" +// Throughput exceeds the current throughput limit for your account. Please +// contact AWS Support at AWS Support (http://docs.aws.amazon.com/https:/aws.amazon.com/support) +// to request a limit increase. +// // * ErrCodeInternalServerError "InternalServerError" // An error occurred on the server side. // @@ -2633,7 +3192,7 @@ const opRestoreTableFromBackup = "RestoreTableFromBackup" // RestoreTableFromBackupRequest generates a "aws/request.Request" representing the // client's request for the RestoreTableFromBackup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2667,6 +3226,27 @@ func (c *DynamoDB) RestoreTableFromBackupRequest(input *RestoreTableFromBackupIn output = &RestoreTableFromBackupOutput{} req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -2710,7 +3290,7 @@ func (c *DynamoDB) RestoreTableFromBackupRequest(input *RestoreTableFromBackupIn // // * ErrCodeBackupInUseException "BackupInUseException" // There is another ongoing conflicting backup control plane operation on the -// table. The backups is either being created, deleted or restored to a table. +// table. The backup is either being created, deleted or restored to a table. // // * ErrCodeLimitExceededException "LimitExceededException" // There is no limit to the number of daily on-demand backups that can be taken. @@ -2755,7 +3335,7 @@ const opRestoreTableToPointInTime = "RestoreTableToPointInTime" // RestoreTableToPointInTimeRequest generates a "aws/request.Request" representing the // client's request for the RestoreTableToPointInTime operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2789,6 +3369,27 @@ func (c *DynamoDB) RestoreTableToPointInTimeRequest(input *RestoreTableToPointIn output = &RestoreTableToPointInTimeOutput{} req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -2901,7 +3502,7 @@ const opScan = "Scan" // ScanRequest generates a "aws/request.Request" representing the // client's request for the Scan operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2941,6 +3542,27 @@ func (c *DynamoDB) ScanRequest(input *ScanInput) (req *request.Request, output * output = &ScanOutput{} req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -2995,6 +3617,11 @@ func (c *DynamoDB) ScanRequest(input *ScanInput) (req *request.Request, output * // The operation tried to access a nonexistent table or index. The resource // might not be specified correctly, or its status might not be ACTIVE. // +// * ErrCodeRequestLimitExceeded "RequestLimitExceeded" +// Throughput exceeds the current throughput limit for your account. Please +// contact AWS Support at AWS Support (http://docs.aws.amazon.com/https:/aws.amazon.com/support) +// to request a limit increase. +// // * ErrCodeInternalServerError "InternalServerError" // An error occurred on the server side. // @@ -3075,7 +3702,7 @@ const opTagResource = "TagResource" // TagResourceRequest generates a "aws/request.Request" representing the // client's request for the TagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3109,8 +3736,28 @@ func (c *DynamoDB) TagResourceRequest(input *TagResourceInput) (req *request.Req output = &TagResourceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -3179,84 +3826,456 @@ func (c *DynamoDB) TagResourceWithContext(ctx aws.Context, input *TagResourceInp return out, req.Send() } -const opUntagResource = "UntagResource" +const opTransactGetItems = "TransactGetItems" -// UntagResourceRequest generates a "aws/request.Request" representing the -// client's request for the UntagResource operation. The "output" return +// TransactGetItemsRequest generates a "aws/request.Request" representing the +// client's request for the TransactGetItems operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 UntagResource for more information on using the UntagResource +// See TransactGetItems for more information on using the TransactGetItems // 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 UntagResourceRequest method. -// req, resp := client.UntagResourceRequest(params) +// // Example sending a request using the TransactGetItemsRequest method. +// req, resp := client.TransactGetItemsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UntagResource -func (c *DynamoDB) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/TransactGetItems +func (c *DynamoDB) TransactGetItemsRequest(input *TransactGetItemsInput) (req *request.Request, output *TransactGetItemsOutput) { op := &request.Operation{ - Name: opUntagResource, + Name: opTransactGetItems, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &UntagResourceInput{} + input = &TransactGetItemsInput{} } - output = &UntagResourceOutput{} + output = &TransactGetItemsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } -// UntagResource API operation for Amazon DynamoDB. +// TransactGetItems API operation for Amazon DynamoDB. // -// Removes the association of tags from an Amazon DynamoDB resource. You can -// call UntagResource up to 5 times per second, per account. +// TransactGetItems is a synchronous operation that atomically retrieves multiple +// items from one or more tables (but not from indexes) in a single account +// and region. A TransactGetItems call can contain up to 10 TransactGetItem +// objects, each of which contains a Get structure that specifies an item to +// retrieve from a table in the account and region. A call to TransactGetItems +// cannot retrieve items from tables in more than one AWS account or region. // -// For an overview on tagging DynamoDB resources, see Tagging for DynamoDB (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html) -// in the Amazon DynamoDB Developer Guide. +// DynamoDB rejects the entire TransactGetItems request if any of the following +// is true: +// +// * A conflicting operation is in the process of updating an item to be +// read. +// +// * There is insufficient provisioned capacity for the transaction to be +// completed. +// +// * There is a user error, such as an invalid data format. // // 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 DynamoDB's -// API operation UntagResource for usage and error information. +// API operation TransactGetItems for usage and error information. // // Returned Error Codes: -// * ErrCodeLimitExceededException "LimitExceededException" -// There is no limit to the number of daily on-demand backups that can be taken. -// -// Up to 10 simultaneous table operations are allowed per account. These operations -// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, -// and RestoreTableToPointInTime. -// -// For tables with secondary indexes, only one of those tables can be in the -// CREATING state at any point in time. Do not attempt to create more than one -// such table simultaneously. -// -// The total limit of tables in the ACTIVE state is 250. -// // * ErrCodeResourceNotFoundException "ResourceNotFoundException" // The operation tried to access a nonexistent table or index. The resource // might not be specified correctly, or its status might not be ACTIVE. // -// * ErrCodeInternalServerError "InternalServerError" +// * ErrCodeTransactionCanceledException "TransactionCanceledException" +// The entire transaction request was rejected. +// +// DynamoDB will reject the entire TransactWriteItems request if any of the +// following is true: +// +// * A table in the TransactWriteItems request does not exist. +// +// * A table in the TransactWriteItems request is on a different account +// or region. +// +// * Operations contain item schema violations. +// +// * More than one write operation (UpdateItem, PutItem, DeleteItem) operates +// on the same item. +// +// * More than one check operation operates on the same item. +// +// * The number of operations sent in the TransactWriteItems request is +// 0 or greater than 10. +// +// * A TransactWriteItems request exceeds the maximum 4 MB request size. +// +// +// * Any operation in the TransactWriteItems request would cause an item +// to become larger than 400KB. +// +// * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException" +// Your request rate is too high. The AWS SDKs for DynamoDB automatically retry +// requests that receive this exception. Your request is eventually successful, +// unless your retry queue is too large to finish. Reduce the frequency of requests +// and use exponential backoff. For more information, go to Error Retries and +// Exponential Backoff (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff) +// in the Amazon DynamoDB Developer Guide. +// +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/TransactGetItems +func (c *DynamoDB) TransactGetItems(input *TransactGetItemsInput) (*TransactGetItemsOutput, error) { + req, out := c.TransactGetItemsRequest(input) + return out, req.Send() +} + +// TransactGetItemsWithContext is the same as TransactGetItems with the addition of +// the ability to pass a context and additional request options. +// +// See TransactGetItems 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 *DynamoDB) TransactGetItemsWithContext(ctx aws.Context, input *TransactGetItemsInput, opts ...request.Option) (*TransactGetItemsOutput, error) { + req, out := c.TransactGetItemsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTransactWriteItems = "TransactWriteItems" + +// TransactWriteItemsRequest generates a "aws/request.Request" representing the +// client's request for the TransactWriteItems 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 TransactWriteItems for more information on using the TransactWriteItems +// 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 TransactWriteItemsRequest method. +// req, resp := client.TransactWriteItemsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/TransactWriteItems +func (c *DynamoDB) TransactWriteItemsRequest(input *TransactWriteItemsInput) (req *request.Request, output *TransactWriteItemsOutput) { + op := &request.Operation{ + Name: opTransactWriteItems, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TransactWriteItemsInput{} + } + + output = &TransactWriteItemsOutput{} + req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } + return +} + +// TransactWriteItems API operation for Amazon DynamoDB. +// +// TransactWriteItems is a synchronous write operation that groups up to 10 +// action requests. These actions can target items in different tables, but +// not in different AWS accounts or regions, and no two actions can target the +// same item. For example, you cannot both ConditionCheck and Update the same +// item. +// +// The actions are completed atomically so that either all of them succeed, +// or all of them fail. They are defined by the following objects: +// +// * Put  —   Initiates a PutItem operation to write a new item. This structure +// specifies the primary key of the item to be written, the name of the table +// to write it in, an optional condition expression that must be satisfied +// for the write to succeed, a list of the item's attributes, and a field +// indicating whether or not to retrieve the item's attributes if the condition +// is not met. +// +// * Update  —   Initiates an UpdateItem operation to update an existing +// item. This structure specifies the primary key of the item to be updated, +// the name of the table where it resides, an optional condition expression +// that must be satisfied for the update to succeed, an expression that defines +// one or more attributes to be updated, and a field indicating whether or +// not to retrieve the item's attributes if the condition is not met. +// +// * Delete  —   Initiates a DeleteItem operation to delete an existing item. +// This structure specifies the primary key of the item to be deleted, the +// name of the table where it resides, an optional condition expression that +// must be satisfied for the deletion to succeed, and a field indicating +// whether or not to retrieve the item's attributes if the condition is not +// met. +// +// * ConditionCheck  —   Applies a condition to an item that is not being +// modified by the transaction. This structure specifies the primary key +// of the item to be checked, the name of the table where it resides, a condition +// expression that must be satisfied for the transaction to succeed, and +// a field indicating whether or not to retrieve the item's attributes if +// the condition is not met. +// +// DynamoDB rejects the entire TransactWriteItems request if any of the following +// is true: +// +// * A condition in one of the condition expressions is not met. +// +// * A conflicting operation is in the process of updating the same item. +// +// * There is insufficient provisioned capacity for the transaction to be +// completed. +// +// * An item size becomes too large (bigger than 400 KB), a Local Secondary +// Index (LSI) becomes too large, or a similar validation error occurs because +// of changes made by the transaction. +// +// * There is a user error, such as an invalid data format. +// +// 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 DynamoDB's +// API operation TransactWriteItems for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The operation tried to access a nonexistent table or index. The resource +// might not be specified correctly, or its status might not be ACTIVE. +// +// * ErrCodeTransactionCanceledException "TransactionCanceledException" +// The entire transaction request was rejected. +// +// DynamoDB will reject the entire TransactWriteItems request if any of the +// following is true: +// +// * A table in the TransactWriteItems request does not exist. +// +// * A table in the TransactWriteItems request is on a different account +// or region. +// +// * Operations contain item schema violations. +// +// * More than one write operation (UpdateItem, PutItem, DeleteItem) operates +// on the same item. +// +// * More than one check operation operates on the same item. +// +// * The number of operations sent in the TransactWriteItems request is +// 0 or greater than 10. +// +// * A TransactWriteItems request exceeds the maximum 4 MB request size. +// +// +// * Any operation in the TransactWriteItems request would cause an item +// to become larger than 400KB. +// +// * ErrCodeTransactionInProgressException "TransactionInProgressException" +// The transaction with the given request token is already in progress. +// +// * ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException" +// DynamoDB rejected the request because you retried a request with a different +// payload but with an idempotent token that was already used. +// +// * ErrCodeProvisionedThroughputExceededException "ProvisionedThroughputExceededException" +// Your request rate is too high. The AWS SDKs for DynamoDB automatically retry +// requests that receive this exception. Your request is eventually successful, +// unless your retry queue is too large to finish. Reduce the frequency of requests +// and use exponential backoff. For more information, go to Error Retries and +// Exponential Backoff (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html#Programming.Errors.RetryAndBackoff) +// in the Amazon DynamoDB Developer Guide. +// +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/TransactWriteItems +func (c *DynamoDB) TransactWriteItems(input *TransactWriteItemsInput) (*TransactWriteItemsOutput, error) { + req, out := c.TransactWriteItemsRequest(input) + return out, req.Send() +} + +// TransactWriteItemsWithContext is the same as TransactWriteItems with the addition of +// the ability to pass a context and additional request options. +// +// See TransactWriteItems 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 *DynamoDB) TransactWriteItemsWithContext(ctx aws.Context, input *TransactWriteItemsInput, opts ...request.Option) (*TransactWriteItemsOutput, error) { + req, out := c.TransactWriteItemsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagResource = "UntagResource" + +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource 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 UntagResource for more information on using the UntagResource +// 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 UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UntagResource +func (c *DynamoDB) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } + return +} + +// UntagResource API operation for Amazon DynamoDB. +// +// Removes the association of tags from an Amazon DynamoDB resource. You can +// call UntagResource up to 5 times per second, per account. +// +// For an overview on tagging DynamoDB resources, see Tagging for DynamoDB (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html) +// in the Amazon DynamoDB Developer 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 DynamoDB's +// API operation UntagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeLimitExceededException "LimitExceededException" +// There is no limit to the number of daily on-demand backups that can be taken. +// +// Up to 10 simultaneous table operations are allowed per account. These operations +// include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, +// and RestoreTableToPointInTime. +// +// For tables with secondary indexes, only one of those tables can be in the +// CREATING state at any point in time. Do not attempt to create more than one +// such table simultaneously. +// +// The total limit of tables in the ACTIVE state is 250. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The operation tried to access a nonexistent table or index. The resource +// might not be specified correctly, or its status might not be ACTIVE. +// +// * ErrCodeInternalServerError "InternalServerError" // An error occurred on the server side. // // * ErrCodeResourceInUseException "ResourceInUseException" @@ -3291,7 +4310,7 @@ const opUpdateContinuousBackups = "UpdateContinuousBackups" // UpdateContinuousBackupsRequest generates a "aws/request.Request" representing the // client's request for the UpdateContinuousBackups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3325,6 +4344,27 @@ func (c *DynamoDB) UpdateContinuousBackupsRequest(input *UpdateContinuousBackups output = &UpdateContinuousBackupsOutput{} req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -3387,7 +4427,7 @@ const opUpdateGlobalTable = "UpdateGlobalTable" // UpdateGlobalTableRequest generates a "aws/request.Request" representing the // client's request for the UpdateGlobalTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3421,6 +4461,27 @@ func (c *DynamoDB) UpdateGlobalTableRequest(input *UpdateGlobalTableInput) (req output = &UpdateGlobalTableOutput{} req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -3498,7 +4559,7 @@ const opUpdateGlobalTableSettings = "UpdateGlobalTableSettings" // UpdateGlobalTableSettingsRequest generates a "aws/request.Request" representing the // client's request for the UpdateGlobalTableSettings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3532,6 +4593,27 @@ func (c *DynamoDB) UpdateGlobalTableSettingsRequest(input *UpdateGlobalTableSett output = &UpdateGlobalTableSettingsOutput{} req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -3604,7 +4686,7 @@ const opUpdateItem = "UpdateItem" // UpdateItemRequest generates a "aws/request.Request" representing the // client's request for the UpdateItem operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3638,6 +4720,27 @@ func (c *DynamoDB) UpdateItemRequest(input *UpdateItemInput) (req *request.Reque output = &UpdateItemOutput{} req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -3679,6 +4782,14 @@ func (c *DynamoDB) UpdateItemRequest(input *UpdateItemInput) (req *request.Reque // An item collection is too large. This exception is only returned for tables // that have one or more local secondary indexes. // +// * ErrCodeTransactionConflictException "TransactionConflictException" +// Operation was rejected because there is an ongoing transaction for the item. +// +// * ErrCodeRequestLimitExceeded "RequestLimitExceeded" +// Throughput exceeds the current throughput limit for your account. Please +// contact AWS Support at AWS Support (http://docs.aws.amazon.com/https:/aws.amazon.com/support) +// to request a limit increase. +// // * ErrCodeInternalServerError "InternalServerError" // An error occurred on the server side. // @@ -3709,7 +4820,7 @@ const opUpdateTable = "UpdateTable" // UpdateTableRequest generates a "aws/request.Request" representing the // client's request for the UpdateTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3743,6 +4854,27 @@ func (c *DynamoDB) UpdateTableRequest(input *UpdateTableInput) (req *request.Req output = &UpdateTableOutput{} req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -3827,7 +4959,7 @@ const opUpdateTimeToLive = "UpdateTimeToLive" // UpdateTimeToLiveRequest generates a "aws/request.Request" representing the // client's request for the UpdateTimeToLive operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3861,6 +4993,27 @@ func (c *DynamoDB) UpdateTimeToLiveRequest(input *UpdateTimeToLiveInput) (req *r output = &UpdateTimeToLiveOutput{} req = c.newRequest(op, input, output) + if aws.BoolValue(req.Config.EnableEndpointDiscovery) { + de := discovererDescribeEndpoints{ + Required: false, + EndpointCache: c.endpointCache, + Params: map[string]*string{ + "op": aws.String(req.Operation.Name), + }, + Client: c, + } + + for k, v := range de.Params { + if v == nil { + delete(de.Params, k) + } + } + + req.Handlers.Build.PushFrontNamed(request.NamedHandler{ + Name: "crr.endpointdiscovery", + Fn: de.Handler, + }) + } return } @@ -4727,9 +5880,12 @@ type BackupDetails struct { // BackupType: // - // * USER - On-demand backup created by you. + // * USER - You create and manage these using the on-demand backup feature. // - // * SYSTEM - On-demand backup automatically created by DynamoDB. + // * SYSTEM - If you delete a table with point-in-time recovery enabled, + // a SYSTEM backup is automatically created and is retained for 35 days (at + // no additional cost). System backups allow you to restore the deleted table + // to the state it was in just before the point of deletion. // // BackupType is a required field BackupType *string `type:"string" required:"true" enum:"BackupType"` @@ -4812,9 +5968,12 @@ type BackupSummary struct { // BackupType: // - // * USER - On-demand backup created by you. + // * USER - You create and manage these using the on-demand backup feature. // - // * SYSTEM - On-demand backup automatically created by DynamoDB. + // * SYSTEM - If you delete a table with point-in-time recovery enabled, + // a SYSTEM backup is automatically created and is retained for 35 days (at + // no additional cost). System backups allow you to restore the deleted table + // to the state it was in just before the point of deletion. BackupType *string `type:"string" enum:"BackupType"` // ARN associated with the table. @@ -5302,6 +6461,92 @@ func (s *BatchWriteItemOutput) SetUnprocessedItems(v map[string][]*WriteRequest) return s } +// Contains the details for the read/write capacity mode. +type BillingModeSummary struct { + _ struct{} `type:"structure"` + + // Controls how you are charged for read and write throughput and how you manage + // capacity. This setting can be changed later. + // + // * PROVISIONED - Sets the read/write capacity mode to PROVISIONED. We recommend + // using PROVISIONED for predictable workloads. + // + // * PAY_PER_REQUEST - Sets the read/write capacity mode to PAY_PER_REQUEST. + // We recommend using PAY_PER_REQUEST for unpredictable workloads. + BillingMode *string `type:"string" enum:"BillingMode"` + + // Represents the time when PAY_PER_REQUEST was last set as the read/write capacity + // mode. + LastUpdateToPayPerRequestDateTime *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s BillingModeSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BillingModeSummary) GoString() string { + return s.String() +} + +// SetBillingMode sets the BillingMode field's value. +func (s *BillingModeSummary) SetBillingMode(v string) *BillingModeSummary { + s.BillingMode = &v + return s +} + +// SetLastUpdateToPayPerRequestDateTime sets the LastUpdateToPayPerRequestDateTime field's value. +func (s *BillingModeSummary) SetLastUpdateToPayPerRequestDateTime(v time.Time) *BillingModeSummary { + s.LastUpdateToPayPerRequestDateTime = &v + return s +} + +// An ordered list of errors for each item in the request which caused the transaction +// to get cancelled. The values of the list are ordered according to the ordering +// of the TransactWriteItems request parameter. If no error occurred for the +// associated item an error with a Null code and Null message will be present. +type CancellationReason struct { + _ struct{} `type:"structure"` + + // Status code for the result of the cancelled transaction. + Code *string `type:"string"` + + // Item in the request which caused the transaction to get cancelled. + Item map[string]*AttributeValue `type:"map"` + + // Cancellation reason message description. + Message *string `type:"string"` +} + +// String returns the string representation +func (s CancellationReason) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancellationReason) GoString() string { + return s.String() +} + +// SetCode sets the Code field's value. +func (s *CancellationReason) SetCode(v string) *CancellationReason { + s.Code = &v + return s +} + +// SetItem sets the Item field's value. +func (s *CancellationReason) SetItem(v map[string]*AttributeValue) *CancellationReason { + s.Item = v + return s +} + +// SetMessage sets the Message field's value. +func (s *CancellationReason) SetMessage(v string) *CancellationReason { + s.Message = &v + return s +} + // Represents the amount of provisioned throughput capacity consumed on a table // or an index. type Capacity struct { @@ -5309,6 +6554,12 @@ type Capacity struct { // The total number of capacity units consumed on a table or an index. CapacityUnits *float64 `type:"double"` + + // The total number of read capacity units consumed on a table or an index. + ReadCapacityUnits *float64 `type:"double"` + + // The total number of write capacity units consumed on a table or an index. + WriteCapacityUnits *float64 `type:"double"` } // String returns the string representation @@ -5327,6 +6578,18 @@ func (s *Capacity) SetCapacityUnits(v float64) *Capacity { return s } +// SetReadCapacityUnits sets the ReadCapacityUnits field's value. +func (s *Capacity) SetReadCapacityUnits(v float64) *Capacity { + s.ReadCapacityUnits = &v + return s +} + +// SetWriteCapacityUnits sets the WriteCapacityUnits field's value. +func (s *Capacity) SetWriteCapacityUnits(v float64) *Capacity { + s.WriteCapacityUnits = &v + return s +} + // Represents the selection criteria for a Query or Scan operation: // // * For a Query operation, Condition is used for specifying the KeyConditions @@ -5438,6 +6701,107 @@ func (s *Condition) SetComparisonOperator(v string) *Condition { return s } +// Represents a request to perform a check that an item exists or to check the +// condition of specific attributes of the item.. +type ConditionCheck struct { + _ struct{} `type:"structure"` + + // A condition that must be satisfied in order for a conditional update to succeed. + // + // ConditionExpression is a required field + ConditionExpression *string `type:"string" required:"true"` + + // One or more substitution tokens for attribute names in an expression. + ExpressionAttributeNames map[string]*string `type:"map"` + + // One or more values that can be substituted in an expression. + ExpressionAttributeValues map[string]*AttributeValue `type:"map"` + + // The primary key of the item to be checked. Each element consists of an attribute + // name and a value for that attribute. + // + // Key is a required field + Key map[string]*AttributeValue `type:"map" required:"true"` + + // Use ReturnValuesOnConditionCheckFailure to get the item attributes if the + // ConditionCheck condition fails. For ReturnValuesOnConditionCheckFailure, + // the valid values are: NONE and ALL_OLD. + ReturnValuesOnConditionCheckFailure *string `type:"string" enum:"ReturnValuesOnConditionCheckFailure"` + + // Name of the table for the check item request. + // + // TableName is a required field + TableName *string `min:"3" type:"string" required:"true"` +} + +// String returns the string representation +func (s ConditionCheck) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConditionCheck) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ConditionCheck) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ConditionCheck"} + if s.ConditionExpression == nil { + invalidParams.Add(request.NewErrParamRequired("ConditionExpression")) + } + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.TableName == nil { + invalidParams.Add(request.NewErrParamRequired("TableName")) + } + if s.TableName != nil && len(*s.TableName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("TableName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConditionExpression sets the ConditionExpression field's value. +func (s *ConditionCheck) SetConditionExpression(v string) *ConditionCheck { + s.ConditionExpression = &v + return s +} + +// SetExpressionAttributeNames sets the ExpressionAttributeNames field's value. +func (s *ConditionCheck) SetExpressionAttributeNames(v map[string]*string) *ConditionCheck { + s.ExpressionAttributeNames = v + return s +} + +// SetExpressionAttributeValues sets the ExpressionAttributeValues field's value. +func (s *ConditionCheck) SetExpressionAttributeValues(v map[string]*AttributeValue) *ConditionCheck { + s.ExpressionAttributeValues = v + return s +} + +// SetKey sets the Key field's value. +func (s *ConditionCheck) SetKey(v map[string]*AttributeValue) *ConditionCheck { + s.Key = v + return s +} + +// SetReturnValuesOnConditionCheckFailure sets the ReturnValuesOnConditionCheckFailure field's value. +func (s *ConditionCheck) SetReturnValuesOnConditionCheckFailure(v string) *ConditionCheck { + s.ReturnValuesOnConditionCheckFailure = &v + return s +} + +// SetTableName sets the TableName field's value. +func (s *ConditionCheck) SetTableName(v string) *ConditionCheck { + s.TableName = &v + return s +} + // The capacity units consumed by an operation. The data returned includes the // total provisioned throughput consumed, along with statistics for the table // and any indexes involved in the operation. ConsumedCapacity is only returned @@ -5456,11 +6820,17 @@ type ConsumedCapacity struct { // The amount of throughput consumed on each local index affected by the operation. LocalSecondaryIndexes map[string]*Capacity `type:"map"` + // The total number of read capacity units consumed by the operation. + ReadCapacityUnits *float64 `type:"double"` + // The amount of throughput consumed on the table affected by the operation. Table *Capacity `type:"structure"` // The name of the table that was affected by the operation. TableName *string `min:"3" type:"string"` + + // The total number of write capacity units consumed by the operation. + WriteCapacityUnits *float64 `type:"double"` } // String returns the string representation @@ -5491,6 +6861,12 @@ func (s *ConsumedCapacity) SetLocalSecondaryIndexes(v map[string]*Capacity) *Con return s } +// SetReadCapacityUnits sets the ReadCapacityUnits field's value. +func (s *ConsumedCapacity) SetReadCapacityUnits(v float64) *ConsumedCapacity { + s.ReadCapacityUnits = &v + return s +} + // SetTable sets the Table field's value. func (s *ConsumedCapacity) SetTable(v *Capacity) *ConsumedCapacity { s.Table = v @@ -5503,6 +6879,12 @@ func (s *ConsumedCapacity) SetTableName(v string) *ConsumedCapacity { return s } +// SetWriteCapacityUnits sets the WriteCapacityUnits field's value. +func (s *ConsumedCapacity) SetWriteCapacityUnits(v float64) *ConsumedCapacity { + s.WriteCapacityUnits = &v + return s +} + // Represents the continuous backups and point in time recovery settings on // the table. type ContinuousBackupsDescription struct { @@ -5647,9 +7029,7 @@ type CreateGlobalSecondaryIndexAction struct { // For current minimum and maximum provisioned throughput values, see Limits // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html) // in the Amazon DynamoDB Developer Guide. - // - // ProvisionedThroughput is a required field - ProvisionedThroughput *ProvisionedThroughput `type:"structure" required:"true"` + ProvisionedThroughput *ProvisionedThroughput `type:"structure"` } // String returns the string representation @@ -5680,9 +7060,6 @@ func (s *CreateGlobalSecondaryIndexAction) Validate() error { if s.Projection == nil { invalidParams.Add(request.NewErrParamRequired("Projection")) } - if s.ProvisionedThroughput == nil { - invalidParams.Add(request.NewErrParamRequired("ProvisionedThroughput")) - } if s.KeySchema != nil { for i, v := range s.KeySchema { if v == nil { @@ -5860,6 +7237,16 @@ type CreateTableInput struct { // AttributeDefinitions is a required field AttributeDefinitions []*AttributeDefinition `type:"list" required:"true"` + // Controls how you are charged for read and write throughput and how you manage + // capacity. This setting can be changed later. + // + // * PROVISIONED - Sets the billing mode to PROVISIONED. We recommend using + // PROVISIONED for predictable workloads. + // + // * PAY_PER_REQUEST - Sets the billing mode to PAY_PER_REQUEST. We recommend + // using PAY_PER_REQUEST for unpredictable workloads. + BillingMode *string `type:"string" enum:"BillingMode"` + // One or more global secondary indexes (the maximum is five) to be created // on the table. Each global secondary index in the array includes the following: // @@ -5966,12 +7353,13 @@ type CreateTableInput struct { // Represents the provisioned throughput settings for a specified table or index. // The settings can be modified using the UpdateTable operation. // + // If you set BillingMode as PROVISIONED, you must specify this property. If + // you set BillingMode as PAY_PER_REQUEST, you cannot specify this property. + // // For current minimum and maximum provisioned throughput values, see Limits // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html) // in the Amazon DynamoDB Developer Guide. - // - // ProvisionedThroughput is a required field - ProvisionedThroughput *ProvisionedThroughput `type:"structure" required:"true"` + ProvisionedThroughput *ProvisionedThroughput `type:"structure"` // Represents the settings used to enable server-side encryption. SSESpecification *SSESpecification `type:"structure"` @@ -6026,9 +7414,6 @@ func (s *CreateTableInput) Validate() error { if s.KeySchema != nil && len(s.KeySchema) < 1 { invalidParams.Add(request.NewErrParamMinLen("KeySchema", 1)) } - if s.ProvisionedThroughput == nil { - invalidParams.Add(request.NewErrParamRequired("ProvisionedThroughput")) - } if s.TableName == nil { invalidParams.Add(request.NewErrParamRequired("TableName")) } @@ -6093,6 +7478,12 @@ func (s *CreateTableInput) SetAttributeDefinitions(v []*AttributeDefinition) *Cr return s } +// SetBillingMode sets the BillingMode field's value. +func (s *CreateTableInput) SetBillingMode(v string) *CreateTableInput { + s.BillingMode = &v + return s +} + // SetGlobalSecondaryIndexes sets the GlobalSecondaryIndexes field's value. func (s *CreateTableInput) SetGlobalSecondaryIndexes(v []*GlobalSecondaryIndex) *CreateTableInput { s.GlobalSecondaryIndexes = v @@ -6159,6 +7550,101 @@ func (s *CreateTableOutput) SetTableDescription(v *TableDescription) *CreateTabl return s } +// Represents a request to perform a DeleteItem operation. +type Delete struct { + _ struct{} `type:"structure"` + + // A condition that must be satisfied in order for a conditional delete to succeed. + ConditionExpression *string `type:"string"` + + // One or more substitution tokens for attribute names in an expression. + ExpressionAttributeNames map[string]*string `type:"map"` + + // One or more values that can be substituted in an expression. + ExpressionAttributeValues map[string]*AttributeValue `type:"map"` + + // The primary key of the item to be deleted. Each element consists of an attribute + // name and a value for that attribute. + // + // Key is a required field + Key map[string]*AttributeValue `type:"map" required:"true"` + + // Use ReturnValuesOnConditionCheckFailure to get the item attributes if the + // Delete condition fails. For ReturnValuesOnConditionCheckFailure, the valid + // values are: NONE and ALL_OLD. + ReturnValuesOnConditionCheckFailure *string `type:"string" enum:"ReturnValuesOnConditionCheckFailure"` + + // Name of the table in which the item to be deleted resides. + // + // TableName is a required field + TableName *string `min:"3" type:"string" required:"true"` +} + +// String returns the string representation +func (s Delete) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Delete) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Delete) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Delete"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.TableName == nil { + invalidParams.Add(request.NewErrParamRequired("TableName")) + } + if s.TableName != nil && len(*s.TableName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("TableName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConditionExpression sets the ConditionExpression field's value. +func (s *Delete) SetConditionExpression(v string) *Delete { + s.ConditionExpression = &v + return s +} + +// SetExpressionAttributeNames sets the ExpressionAttributeNames field's value. +func (s *Delete) SetExpressionAttributeNames(v map[string]*string) *Delete { + s.ExpressionAttributeNames = v + return s +} + +// SetExpressionAttributeValues sets the ExpressionAttributeValues field's value. +func (s *Delete) SetExpressionAttributeValues(v map[string]*AttributeValue) *Delete { + s.ExpressionAttributeValues = v + return s +} + +// SetKey sets the Key field's value. +func (s *Delete) SetKey(v map[string]*AttributeValue) *Delete { + s.Key = v + return s +} + +// SetReturnValuesOnConditionCheckFailure sets the ReturnValuesOnConditionCheckFailure field's value. +func (s *Delete) SetReturnValuesOnConditionCheckFailure(v string) *Delete { + s.ReturnValuesOnConditionCheckFailure = &v + return s +} + +// SetTableName sets the TableName field's value. +func (s *Delete) SetTableName(v string) *Delete { + s.TableName = &v + return s +} + type DeleteBackupInput struct { _ struct{} `type:"structure"` @@ -7323,12 +8809,12 @@ type ExpectedAttributeValue struct { // // * If Exists is true, DynamoDB will check to see if that attribute value // already exists in the table. If it is found, then the operation succeeds. - // If it is not found, the operation fails with a ConditionalCheckFailedException. + // If it is not found, the operation fails with a ConditionCheckFailedException. // // * If Exists is false, DynamoDB assumes that the attribute value does not // exist in the table. If in fact the value does not exist, then the assumption // is valid and the operation succeeds. If the value is found, despite the - // assumption that it does not exist, the operation fails with a ConditionalCheckFailedException. + // assumption that it does not exist, the operation fails with a ConditionCheckFailedException. // // The default setting for Exists is true. If you supply a Value all by itself, // DynamoDB assumes the attribute exists: You don't have to set Exists to true, @@ -7387,13 +8873,94 @@ func (s *ExpectedAttributeValue) SetValue(v *AttributeValue) *ExpectedAttributeV return s } -// Represents the input of a GetItem operation. -type GetItemInput struct { +// Specifies an item and related attribute values to retrieve in a TransactGetItem +// object. +type Get struct { _ struct{} `type:"structure"` - // This is a legacy parameter. Use ProjectionExpression instead. For more information, - // see AttributesToGet (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html) - // in the Amazon DynamoDB Developer Guide. + // One or more substitution tokens for attribute names in the ProjectionExpression + // parameter. + ExpressionAttributeNames map[string]*string `type:"map"` + + // A map of attribute names to AttributeValue objects that specifies the primary + // key of the item to retrieve. + // + // Key is a required field + Key map[string]*AttributeValue `type:"map" required:"true"` + + // A string that identifies one or more attributes of the specified item to + // retrieve from the table. The attributes in the expression must be separated + // by commas. If no attribute names are specified, then all attributes of the + // specified item are returned. If any of the requested attributes are not found, + // they do not appear in the result. + ProjectionExpression *string `type:"string"` + + // The name of the table from which to retrieve the specified item. + // + // TableName is a required field + TableName *string `min:"3" type:"string" required:"true"` +} + +// String returns the string representation +func (s Get) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Get) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Get) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Get"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.TableName == nil { + invalidParams.Add(request.NewErrParamRequired("TableName")) + } + if s.TableName != nil && len(*s.TableName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("TableName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetExpressionAttributeNames sets the ExpressionAttributeNames field's value. +func (s *Get) SetExpressionAttributeNames(v map[string]*string) *Get { + s.ExpressionAttributeNames = v + return s +} + +// SetKey sets the Key field's value. +func (s *Get) SetKey(v map[string]*AttributeValue) *Get { + s.Key = v + return s +} + +// SetProjectionExpression sets the ProjectionExpression field's value. +func (s *Get) SetProjectionExpression(v string) *Get { + s.ProjectionExpression = &v + return s +} + +// SetTableName sets the TableName field's value. +func (s *Get) SetTableName(v string) *Get { + s.TableName = &v + return s +} + +// Represents the input of a GetItem operation. +type GetItemInput struct { + _ struct{} `type:"structure"` + + // This is a legacy parameter. Use ProjectionExpression instead. For more information, + // see AttributesToGet (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html) + // in the Amazon DynamoDB Developer Guide. AttributesToGet []*string `min:"1" type:"list"` // Determines the read consistency model: If set to true, then the operation @@ -7638,9 +9205,7 @@ type GlobalSecondaryIndex struct { // For current minimum and maximum provisioned throughput values, see Limits // (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html) // in the Amazon DynamoDB Developer Guide. - // - // ProvisionedThroughput is a required field - ProvisionedThroughput *ProvisionedThroughput `type:"structure" required:"true"` + ProvisionedThroughput *ProvisionedThroughput `type:"structure"` } // String returns the string representation @@ -7671,9 +9236,6 @@ func (s *GlobalSecondaryIndex) Validate() error { if s.Projection == nil { invalidParams.Add(request.NewErrParamRequired("Projection")) } - if s.ProvisionedThroughput == nil { - invalidParams.Add(request.NewErrParamRequired("ProvisionedThroughput")) - } if s.KeySchema != nil { for i, v := range s.KeySchema { if v == nil { @@ -8234,6 +9796,30 @@ func (s *ItemCollectionMetrics) SetSizeEstimateRangeGB(v []*float64) *ItemCollec return s } +// Details for the requested item. +type ItemResponse struct { + _ struct{} `type:"structure"` + + // Map of attribute data consisting of the data type and attribute value. + Item map[string]*AttributeValue `type:"map"` +} + +// String returns the string representation +func (s ItemResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ItemResponse) GoString() string { + return s.String() +} + +// SetItem sets the Item field's value. +func (s *ItemResponse) SetItem(v map[string]*AttributeValue) *ItemResponse { + s.Item = v + return s +} + // Represents a single element of a key schema. A key schema specifies the attributes // that make up the primary key of a table, or the key attributes of an index. // @@ -9274,6 +10860,8 @@ type ProvisionedThroughput struct { // Read and Write Requirements (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput) // in the Amazon DynamoDB Developer Guide. // + // If read/write capacity mode is PAY_PER_REQUEST the value is set to 0. + // // ReadCapacityUnits is a required field ReadCapacityUnits *int64 `min:"1" type:"long" required:"true"` @@ -9282,6 +10870,8 @@ type ProvisionedThroughput struct { // Requirements (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput) // in the Amazon DynamoDB Developer Guide. // + // If read/write capacity mode is PAY_PER_REQUEST the value is set to 0. + // // WriteCapacityUnits is a required field WriteCapacityUnits *int64 `min:"1" type:"long" required:"true"` } @@ -9351,11 +10941,11 @@ type ProvisionedThroughputDescription struct { // DynamoDB returns a ThrottlingException. Eventually consistent reads require // less effort than strongly consistent reads, so a setting of 50 ReadCapacityUnits // per second provides 100 eventually consistent ReadCapacityUnits per second. - ReadCapacityUnits *int64 `min:"1" type:"long"` + ReadCapacityUnits *int64 `type:"long"` // The maximum number of writes consumed per second before DynamoDB returns // a ThrottlingException. - WriteCapacityUnits *int64 `min:"1" type:"long"` + WriteCapacityUnits *int64 `type:"long"` } // String returns the string representation @@ -9398,6 +10988,104 @@ func (s *ProvisionedThroughputDescription) SetWriteCapacityUnits(v int64) *Provi return s } +// Represents a request to perform a PutItem operation. +type Put struct { + _ struct{} `type:"structure"` + + // A condition that must be satisfied in order for a conditional update to succeed. + ConditionExpression *string `type:"string"` + + // One or more substitution tokens for attribute names in an expression. + ExpressionAttributeNames map[string]*string `type:"map"` + + // One or more values that can be substituted in an expression. + ExpressionAttributeValues map[string]*AttributeValue `type:"map"` + + // A map of attribute name to attribute values, representing the primary key + // of the item to be written by PutItem. All of the table's primary key attributes + // must be specified, and their data types must match those of the table's key + // schema. If any attributes are present in the item that are part of an index + // key schema for the table, their types must match the index key schema. + // + // Item is a required field + Item map[string]*AttributeValue `type:"map" required:"true"` + + // Use ReturnValuesOnConditionCheckFailure to get the item attributes if the + // Put condition fails. For ReturnValuesOnConditionCheckFailure, the valid values + // are: NONE and ALL_OLD. + ReturnValuesOnConditionCheckFailure *string `type:"string" enum:"ReturnValuesOnConditionCheckFailure"` + + // Name of the table in which to write the item. + // + // TableName is a required field + TableName *string `min:"3" type:"string" required:"true"` +} + +// String returns the string representation +func (s Put) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Put) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Put) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Put"} + if s.Item == nil { + invalidParams.Add(request.NewErrParamRequired("Item")) + } + if s.TableName == nil { + invalidParams.Add(request.NewErrParamRequired("TableName")) + } + if s.TableName != nil && len(*s.TableName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("TableName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConditionExpression sets the ConditionExpression field's value. +func (s *Put) SetConditionExpression(v string) *Put { + s.ConditionExpression = &v + return s +} + +// SetExpressionAttributeNames sets the ExpressionAttributeNames field's value. +func (s *Put) SetExpressionAttributeNames(v map[string]*string) *Put { + s.ExpressionAttributeNames = v + return s +} + +// SetExpressionAttributeValues sets the ExpressionAttributeValues field's value. +func (s *Put) SetExpressionAttributeValues(v map[string]*AttributeValue) *Put { + s.ExpressionAttributeValues = v + return s +} + +// SetItem sets the Item field's value. +func (s *Put) SetItem(v map[string]*AttributeValue) *Put { + s.Item = v + return s +} + +// SetReturnValuesOnConditionCheckFailure sets the ReturnValuesOnConditionCheckFailure field's value. +func (s *Put) SetReturnValuesOnConditionCheckFailure(v string) *Put { + s.ReturnValuesOnConditionCheckFailure = &v + return s +} + +// SetTableName sets the TableName field's value. +func (s *Put) SetTableName(v string) *Put { + s.TableName = &v + return s +} + // Represents the input of a PutItem operation. type PutItemInput struct { _ struct{} `type:"structure"` @@ -10493,6 +12181,9 @@ type ReplicaSettingsDescription struct { // RegionName is a required field RegionName *string `type:"string" required:"true"` + // The read/write capacity mode of the replica. + ReplicaBillingModeSummary *BillingModeSummary `type:"structure"` + // Replica global secondary index settings for the global table. ReplicaGlobalSecondaryIndexSettings []*ReplicaGlobalSecondaryIndexSettingsDescription `type:"list"` @@ -10503,7 +12194,7 @@ type ReplicaSettingsDescription struct { // DynamoDB returns a ThrottlingException. For more information, see Specifying // Read and Write Requirements (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput) // in the Amazon DynamoDB Developer Guide. - ReplicaProvisionedReadCapacityUnits *int64 `min:"1" type:"long"` + ReplicaProvisionedReadCapacityUnits *int64 `type:"long"` // AutoScaling settings for a global table replica's write capacity units. ReplicaProvisionedWriteCapacityAutoScalingSettings *AutoScalingSettingsDescription `type:"structure"` @@ -10512,7 +12203,7 @@ type ReplicaSettingsDescription struct { // a ThrottlingException. For more information, see Specifying Read and Write // Requirements (http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#ProvisionedThroughput) // in the Amazon DynamoDB Developer Guide. - ReplicaProvisionedWriteCapacityUnits *int64 `min:"1" type:"long"` + ReplicaProvisionedWriteCapacityUnits *int64 `type:"long"` // The current state of the region: // @@ -10542,6 +12233,12 @@ func (s *ReplicaSettingsDescription) SetRegionName(v string) *ReplicaSettingsDes return s } +// SetReplicaBillingModeSummary sets the ReplicaBillingModeSummary field's value. +func (s *ReplicaSettingsDescription) SetReplicaBillingModeSummary(v *BillingModeSummary) *ReplicaSettingsDescription { + s.ReplicaBillingModeSummary = v + return s +} + // SetReplicaGlobalSecondaryIndexSettings sets the ReplicaGlobalSecondaryIndexSettings field's value. func (s *ReplicaSettingsDescription) SetReplicaGlobalSecondaryIndexSettings(v []*ReplicaGlobalSecondaryIndexSettingsDescription) *ReplicaSettingsDescription { s.ReplicaGlobalSecondaryIndexSettings = v @@ -10974,9 +12671,11 @@ type SSEDescription struct { // Server-side encryption type: // - // * AES256 - Server-side encryption which uses the AES256 algorithm. + // * AES256 - Server-side encryption which uses the AES256 algorithm (not + // applicable). // // * KMS - Server-side encryption which uses AWS Key Management Service. + // Key is stored in your account and is managed by AWS KMS (KMS charges apply). SSEType *string `type:"string" enum:"SSEType"` // The current state of server-side encryption: @@ -11026,7 +12725,9 @@ type SSESpecification struct { _ struct{} `type:"structure"` // Indicates whether server-side encryption is enabled (true) or disabled (false) - // on the table. + // on the table. If enabled (true), server-side encryption type is set to KMS. + // If disabled (false) or not specified, server-side encryption is set to AWS + // owned CMK. Enabled *bool `type:"boolean"` // The KMS Master Key (CMK) which should be used for the KMS encryption. To @@ -11037,10 +12738,11 @@ type SSESpecification struct { // Server-side encryption type: // - // * AES256 - Server-side encryption which uses the AES256 algorithm. + // * AES256 - Server-side encryption which uses the AES256 algorithm (not + // applicable). // // * KMS - Server-side encryption which uses AWS Key Management Service. - // (default) + // Key is stored in your account and is managed by AWS KMS (KMS charges apply). SSEType *string `type:"string" enum:"SSEType"` } @@ -11553,6 +13255,16 @@ func (s *ScanOutput) SetScannedCount(v int64) *ScanOutput { type SourceTableDetails struct { _ struct{} `type:"structure"` + // Controls how you are charged for read and write throughput and how you manage + // capacity. This setting can be changed later. + // + // * PROVISIONED - Sets the read/write capacity mode to PROVISIONED. We recommend + // using PROVISIONED for predictable workloads. + // + // * PAY_PER_REQUEST - Sets the read/write capacity mode to PAY_PER_REQUEST. + // We recommend using PAY_PER_REQUEST for unpredictable workloads. + BillingMode *string `type:"string" enum:"BillingMode"` + // Number of items in the table. Please note this is an approximate value. ItemCount *int64 `type:"long"` @@ -11598,6 +13310,12 @@ func (s SourceTableDetails) GoString() string { return s.String() } +// SetBillingMode sets the BillingMode field's value. +func (s *SourceTableDetails) SetBillingMode(v string) *SourceTableDetails { + s.BillingMode = &v + return s +} + // SetItemCount sets the ItemCount field's value. func (s *SourceTableDetails) SetItemCount(v int64) *SourceTableDetails { s.ItemCount = &v @@ -11774,6 +13492,9 @@ type TableDescription struct { // * AttributeType - The data type for the attribute. AttributeDefinitions []*AttributeDefinition `type:"list"` + // Contains the details for the read/write capacity mode. + BillingModeSummary *BillingModeSummary `type:"structure"` + // The date and time when the table was created, in UNIX epoch time (http://www.epochconverter.com/) // format. CreationDateTime *time.Time `type:"timestamp"` @@ -11983,6 +13704,12 @@ func (s *TableDescription) SetAttributeDefinitions(v []*AttributeDefinition) *Ta return s } +// SetBillingModeSummary sets the BillingModeSummary field's value. +func (s *TableDescription) SetBillingModeSummary(v *BillingModeSummary) *TableDescription { + s.BillingModeSummary = v + return s +} + // SetCreationDateTime sets the CreationDateTime field's value. func (s *TableDescription) SetCreationDateTime(v time.Time) *TableDescription { s.CreationDateTime = &v @@ -12134,62 +13861,509 @@ func (s *Tag) Validate() error { return nil } -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // Identifies the Amazon DynamoDB resource to which tags should be added. This + // value is an Amazon Resource Name (ARN). + // + // ResourceArn is a required field + ResourceArn *string `min:"1" type:"string" required:"true"` + + // The tags to be assigned to the Amazon DynamoDB resource. + // + // Tags is a required field + Tags []*Tag `type:"list" required:"true"` +} + +// String returns the string representation +func (s TagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + 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 +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { + s.ResourceArn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { + s.Tags = v + return s +} + +type TagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceOutput) GoString() string { + return s.String() +} + +// The description of the Time to Live (TTL) status on the specified table. +type TimeToLiveDescription struct { + _ struct{} `type:"structure"` + + // The name of the Time to Live attribute for items in the table. + AttributeName *string `min:"1" type:"string"` + + // The Time to Live status for the table. + TimeToLiveStatus *string `type:"string" enum:"TimeToLiveStatus"` +} + +// String returns the string representation +func (s TimeToLiveDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TimeToLiveDescription) GoString() string { + return s.String() +} + +// SetAttributeName sets the AttributeName field's value. +func (s *TimeToLiveDescription) SetAttributeName(v string) *TimeToLiveDescription { + s.AttributeName = &v + return s +} + +// SetTimeToLiveStatus sets the TimeToLiveStatus field's value. +func (s *TimeToLiveDescription) SetTimeToLiveStatus(v string) *TimeToLiveDescription { + s.TimeToLiveStatus = &v + return s +} + +// Represents the settings used to enable or disable Time to Live for the specified +// table. +type TimeToLiveSpecification struct { + _ struct{} `type:"structure"` + + // The name of the Time to Live attribute used to store the expiration time + // for items in the table. + // + // AttributeName is a required field + AttributeName *string `min:"1" type:"string" required:"true"` + + // Indicates whether Time To Live is to be enabled (true) or disabled (false) + // on the table. + // + // Enabled is a required field + Enabled *bool `type:"boolean" required:"true"` +} + +// String returns the string representation +func (s TimeToLiveSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TimeToLiveSpecification) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TimeToLiveSpecification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TimeToLiveSpecification"} + if s.AttributeName == nil { + invalidParams.Add(request.NewErrParamRequired("AttributeName")) + } + if s.AttributeName != nil && len(*s.AttributeName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AttributeName", 1)) + } + if s.Enabled == nil { + invalidParams.Add(request.NewErrParamRequired("Enabled")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAttributeName sets the AttributeName field's value. +func (s *TimeToLiveSpecification) SetAttributeName(v string) *TimeToLiveSpecification { + s.AttributeName = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *TimeToLiveSpecification) SetEnabled(v bool) *TimeToLiveSpecification { + s.Enabled = &v + return s +} + +// Specifies an item to be retrieved as part of the transaction. +type TransactGetItem struct { + _ struct{} `type:"structure"` + + // Contains the primary key that identifies the item to get, together with the + // name of the table that contains the item, and optionally the specific attributes + // of the item to retrieve. + // + // Get is a required field + Get *Get `type:"structure" required:"true"` +} + +// String returns the string representation +func (s TransactGetItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransactGetItem) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TransactGetItem) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TransactGetItem"} + if s.Get == nil { + invalidParams.Add(request.NewErrParamRequired("Get")) + } + if s.Get != nil { + if err := s.Get.Validate(); err != nil { + invalidParams.AddNested("Get", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGet sets the Get field's value. +func (s *TransactGetItem) SetGet(v *Get) *TransactGetItem { + s.Get = v + return s +} + +type TransactGetItemsInput struct { + _ struct{} `type:"structure"` + + // A value of TOTAL causes consumed capacity information to be returned, and + // a value of NONE prevents that information from being returned. No other value + // is valid. + ReturnConsumedCapacity *string `type:"string" enum:"ReturnConsumedCapacity"` + + // An ordered array of up to 10 TransactGetItem objects, each of which contains + // a Get structure. + // + // TransactItems is a required field + TransactItems []*TransactGetItem `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s TransactGetItemsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransactGetItemsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TransactGetItemsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TransactGetItemsInput"} + if s.TransactItems == nil { + invalidParams.Add(request.NewErrParamRequired("TransactItems")) + } + if s.TransactItems != nil && len(s.TransactItems) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TransactItems", 1)) + } + if s.TransactItems != nil { + for i, v := range s.TransactItems { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TransactItems", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetReturnConsumedCapacity sets the ReturnConsumedCapacity field's value. +func (s *TransactGetItemsInput) SetReturnConsumedCapacity(v string) *TransactGetItemsInput { + s.ReturnConsumedCapacity = &v + return s +} + +// SetTransactItems sets the TransactItems field's value. +func (s *TransactGetItemsInput) SetTransactItems(v []*TransactGetItem) *TransactGetItemsInput { + s.TransactItems = v + return s +} + +type TransactGetItemsOutput struct { + _ struct{} `type:"structure"` + + // If the ReturnConsumedCapacity value was TOTAL, this is an array of ConsumedCapacity + // objects, one for each table addressed by TransactGetItem objects in the TransactItems + // parameter. These ConsumedCapacity objects report the read-capacity units + // consumed by the TransactGetItems call in that table. + ConsumedCapacity []*ConsumedCapacity `type:"list"` + + // An ordered array of up to 10 ItemResponse objects, each of which corresponds + // to the TransactGetItem object in the same position in the TransactItems array. + // Each ItemResponse object contains a Map of the name-value pairs that are + // the projected attributes of the requested item. + // + // If a requested item could not be retrieved, the corresponding ItemResponse + // object is Null, or if the requested item has no projected attributes, the + // corresponding ItemResponse object is an empty Map. + Responses []*ItemResponse `min:"1" type:"list"` +} + +// String returns the string representation +func (s TransactGetItemsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransactGetItemsOutput) GoString() string { + return s.String() +} + +// SetConsumedCapacity sets the ConsumedCapacity field's value. +func (s *TransactGetItemsOutput) SetConsumedCapacity(v []*ConsumedCapacity) *TransactGetItemsOutput { + s.ConsumedCapacity = v + return s +} + +// SetResponses sets the Responses field's value. +func (s *TransactGetItemsOutput) SetResponses(v []*ItemResponse) *TransactGetItemsOutput { + s.Responses = v + return s +} + +// A list of requests that can perform update, put, delete, or check operations +// on multiple items in one or more tables atomically. +type TransactWriteItem struct { + _ struct{} `type:"structure"` + + // A request to perform a check item operation. + ConditionCheck *ConditionCheck `type:"structure"` + + // A request to perform a DeleteItem operation. + Delete *Delete `type:"structure"` + + // A request to perform a PutItem operation. + Put *Put `type:"structure"` + + // A request to perform an UpdateItem operation. + Update *Update `type:"structure"` +} + +// String returns the string representation +func (s TransactWriteItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransactWriteItem) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TransactWriteItem) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TransactWriteItem"} + if s.ConditionCheck != nil { + if err := s.ConditionCheck.Validate(); err != nil { + invalidParams.AddNested("ConditionCheck", err.(request.ErrInvalidParams)) + } + } + if s.Delete != nil { + if err := s.Delete.Validate(); err != nil { + invalidParams.AddNested("Delete", err.(request.ErrInvalidParams)) + } + } + if s.Put != nil { + if err := s.Put.Validate(); err != nil { + invalidParams.AddNested("Put", err.(request.ErrInvalidParams)) + } + } + if s.Update != nil { + if err := s.Update.Validate(); err != nil { + invalidParams.AddNested("Update", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConditionCheck sets the ConditionCheck field's value. +func (s *TransactWriteItem) SetConditionCheck(v *ConditionCheck) *TransactWriteItem { + s.ConditionCheck = v + return s +} + +// SetDelete sets the Delete field's value. +func (s *TransactWriteItem) SetDelete(v *Delete) *TransactWriteItem { + s.Delete = v return s } -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v +// SetPut sets the Put field's value. +func (s *TransactWriteItem) SetPut(v *Put) *TransactWriteItem { + s.Put = v return s } -type TagResourceInput struct { +// SetUpdate sets the Update field's value. +func (s *TransactWriteItem) SetUpdate(v *Update) *TransactWriteItem { + s.Update = v + return s +} + +type TransactWriteItemsInput struct { _ struct{} `type:"structure"` - // Identifies the Amazon DynamoDB resource to which tags should be added. This - // value is an Amazon Resource Name (ARN). + // Providing a ClientRequestToken makes the call to TransactWriteItems idempotent, + // meaning that multiple identical calls have the same effect as one single + // call. // - // ResourceArn is a required field - ResourceArn *string `min:"1" type:"string" required:"true"` + // Although multiple identical calls using the same client request token produce + // the same result on the server (no side effects), the responses to the calls + // may not be the same. If the ReturnConsumedCapacity> parameter is set, then + // the initial TransactWriteItems call returns the amount of write capacity + // units consumed in making the changes, and subsequent TransactWriteItems calls + // with the same client token return the amount of read capacity units consumed + // in reading the item. + // + // A client request token is valid for 10 minutes after the first request that + // uses it completes. After 10 minutes, any request with the same client token + // is treated as a new request. Do not resubmit the same request with the same + // client token for more than 10 minutes or the result may not be idempotent. + // + // If you submit a request with the same client token but a change in other + // parameters within the 10 minute idempotency window, DynamoDB returns an IdempotentParameterMismatch + // exception. + ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` - // The tags to be assigned to the Amazon DynamoDB resource. + // Determines the level of detail about provisioned throughput consumption that + // is returned in the response: // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` + // * INDEXES - The response includes the aggregate ConsumedCapacity for the + // operation, together with ConsumedCapacity for each table and secondary + // index that was accessed. + // + // Note that some operations, such as GetItem and BatchGetItem, do not access + // any indexes at all. In these cases, specifying INDEXES will only return + // ConsumedCapacity information for table(s). + // + // * TOTAL - The response includes only the aggregate ConsumedCapacity for + // the operation. + // + // * NONE - No ConsumedCapacity details are included in the response. + ReturnConsumedCapacity *string `type:"string" enum:"ReturnConsumedCapacity"` + + // Determines whether item collection metrics are returned. If set to SIZE, + // the response includes statistics about item collections (if any), that were + // modified during the operation and are returned in the response. If set to + // NONE (the default), no statistics are returned. + ReturnItemCollectionMetrics *string `type:"string" enum:"ReturnItemCollectionMetrics"` + + // An ordered array of up to 10 TransactWriteItem objects, each of which contains + // a ConditionCheck, Put, Update, or Delete object. These can operate on items + // in different tables, but the tables must reside in the same AWS account and + // region, and no two of them can operate on the same item. + // + // TransactItems is a required field + TransactItems []*TransactWriteItem `min:"1" type:"list" required:"true"` } // String returns the string representation -func (s TagResourceInput) String() string { +func (s TransactWriteItemsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s TagResourceInput) GoString() string { +func (s TransactWriteItemsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *TagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) +func (s *TransactWriteItemsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TransactWriteItemsInput"} + if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) } - if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + if s.TransactItems == nil { + invalidParams.Add(request.NewErrParamRequired("TransactItems")) } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) + if s.TransactItems != nil && len(s.TransactItems) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TransactItems", 1)) } - if s.Tags != nil { - for i, v := range s.Tags { + if s.TransactItems != nil { + for i, v := range s.TransactItems { if v == nil { continue } if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TransactItems", i), err.(request.ErrInvalidParams)) } } } @@ -12200,121 +14374,63 @@ func (s *TagResourceInput) Validate() error { return nil } -// SetResourceArn sets the ResourceArn field's value. -func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { - s.ResourceArn = &v +// SetClientRequestToken sets the ClientRequestToken field's value. +func (s *TransactWriteItemsInput) SetClientRequestToken(v string) *TransactWriteItemsInput { + s.ClientRequestToken = &v return s } -// SetTags sets the Tags field's value. -func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { - s.Tags = v +// SetReturnConsumedCapacity sets the ReturnConsumedCapacity field's value. +func (s *TransactWriteItemsInput) SetReturnConsumedCapacity(v string) *TransactWriteItemsInput { + s.ReturnConsumedCapacity = &v return s } -type TagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s TagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagResourceOutput) GoString() string { - return s.String() -} - -// The description of the Time to Live (TTL) status on the specified table. -type TimeToLiveDescription struct { - _ struct{} `type:"structure"` - - // The name of the Time to Live attribute for items in the table. - AttributeName *string `min:"1" type:"string"` - - // The Time to Live status for the table. - TimeToLiveStatus *string `type:"string" enum:"TimeToLiveStatus"` -} - -// String returns the string representation -func (s TimeToLiveDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TimeToLiveDescription) GoString() string { - return s.String() -} - -// SetAttributeName sets the AttributeName field's value. -func (s *TimeToLiveDescription) SetAttributeName(v string) *TimeToLiveDescription { - s.AttributeName = &v +// SetReturnItemCollectionMetrics sets the ReturnItemCollectionMetrics field's value. +func (s *TransactWriteItemsInput) SetReturnItemCollectionMetrics(v string) *TransactWriteItemsInput { + s.ReturnItemCollectionMetrics = &v return s } -// SetTimeToLiveStatus sets the TimeToLiveStatus field's value. -func (s *TimeToLiveDescription) SetTimeToLiveStatus(v string) *TimeToLiveDescription { - s.TimeToLiveStatus = &v +// SetTransactItems sets the TransactItems field's value. +func (s *TransactWriteItemsInput) SetTransactItems(v []*TransactWriteItem) *TransactWriteItemsInput { + s.TransactItems = v return s } -// Represents the settings used to enable or disable Time to Live for the specified -// table. -type TimeToLiveSpecification struct { +type TransactWriteItemsOutput struct { _ struct{} `type:"structure"` - // The name of the Time to Live attribute used to store the expiration time - // for items in the table. - // - // AttributeName is a required field - AttributeName *string `min:"1" type:"string" required:"true"` + // The capacity units consumed by the entire TransactWriteItems operation. The + // values of the list are ordered according to the ordering of the TransactItems + // request parameter. + ConsumedCapacity []*ConsumedCapacity `type:"list"` - // Indicates whether Time To Live is to be enabled (true) or disabled (false) - // on the table. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` + // A list of tables that were processed by TransactWriteItems and, for each + // table, information about any item collections that were affected by individual + // UpdateItem, PutItem or DeleteItem operations. + ItemCollectionMetrics map[string][]*ItemCollectionMetrics `type:"map"` } // String returns the string representation -func (s TimeToLiveSpecification) String() string { +func (s TransactWriteItemsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s TimeToLiveSpecification) GoString() string { +func (s TransactWriteItemsOutput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *TimeToLiveSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TimeToLiveSpecification"} - if s.AttributeName == nil { - invalidParams.Add(request.NewErrParamRequired("AttributeName")) - } - if s.AttributeName != nil && len(*s.AttributeName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AttributeName", 1)) - } - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributeName sets the AttributeName field's value. -func (s *TimeToLiveSpecification) SetAttributeName(v string) *TimeToLiveSpecification { - s.AttributeName = &v +// SetConsumedCapacity sets the ConsumedCapacity field's value. +func (s *TransactWriteItemsOutput) SetConsumedCapacity(v []*ConsumedCapacity) *TransactWriteItemsOutput { + s.ConsumedCapacity = v return s } -// SetEnabled sets the Enabled field's value. -func (s *TimeToLiveSpecification) SetEnabled(v bool) *TimeToLiveSpecification { - s.Enabled = &v +// SetItemCollectionMetrics sets the ItemCollectionMetrics field's value. +func (s *TransactWriteItemsOutput) SetItemCollectionMetrics(v map[string][]*ItemCollectionMetrics) *TransactWriteItemsOutput { + s.ItemCollectionMetrics = v return s } @@ -12389,6 +14505,116 @@ func (s UntagResourceOutput) GoString() string { return s.String() } +// Represents a request to perform an UpdateItem operation. +type Update struct { + _ struct{} `type:"structure"` + + // A condition that must be satisfied in order for a conditional update to succeed. + ConditionExpression *string `type:"string"` + + // One or more substitution tokens for attribute names in an expression. + ExpressionAttributeNames map[string]*string `type:"map"` + + // One or more values that can be substituted in an expression. + ExpressionAttributeValues map[string]*AttributeValue `type:"map"` + + // The primary key of the item to be updated. Each element consists of an attribute + // name and a value for that attribute. + // + // Key is a required field + Key map[string]*AttributeValue `type:"map" required:"true"` + + // Use ReturnValuesOnConditionCheckFailure to get the item attributes if the + // Update condition fails. For ReturnValuesOnConditionCheckFailure, the valid + // values are: NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW. + ReturnValuesOnConditionCheckFailure *string `type:"string" enum:"ReturnValuesOnConditionCheckFailure"` + + // Name of the table for the UpdateItem request. + // + // TableName is a required field + TableName *string `min:"3" type:"string" required:"true"` + + // An expression that defines one or more attributes to be updated, the action + // to be performed on them, and new value(s) for them. + // + // UpdateExpression is a required field + UpdateExpression *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s Update) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Update) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Update) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Update"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.TableName == nil { + invalidParams.Add(request.NewErrParamRequired("TableName")) + } + if s.TableName != nil && len(*s.TableName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("TableName", 3)) + } + if s.UpdateExpression == nil { + invalidParams.Add(request.NewErrParamRequired("UpdateExpression")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConditionExpression sets the ConditionExpression field's value. +func (s *Update) SetConditionExpression(v string) *Update { + s.ConditionExpression = &v + return s +} + +// SetExpressionAttributeNames sets the ExpressionAttributeNames field's value. +func (s *Update) SetExpressionAttributeNames(v map[string]*string) *Update { + s.ExpressionAttributeNames = v + return s +} + +// SetExpressionAttributeValues sets the ExpressionAttributeValues field's value. +func (s *Update) SetExpressionAttributeValues(v map[string]*AttributeValue) *Update { + s.ExpressionAttributeValues = v + return s +} + +// SetKey sets the Key field's value. +func (s *Update) SetKey(v map[string]*AttributeValue) *Update { + s.Key = v + return s +} + +// SetReturnValuesOnConditionCheckFailure sets the ReturnValuesOnConditionCheckFailure field's value. +func (s *Update) SetReturnValuesOnConditionCheckFailure(v string) *Update { + s.ReturnValuesOnConditionCheckFailure = &v + return s +} + +// SetTableName sets the TableName field's value. +func (s *Update) SetTableName(v string) *Update { + s.TableName = &v + return s +} + +// SetUpdateExpression sets the UpdateExpression field's value. +func (s *Update) SetUpdateExpression(v string) *Update { + s.UpdateExpression = &v + return s +} + type UpdateContinuousBackupsInput struct { _ struct{} `type:"structure"` @@ -12631,6 +14857,10 @@ func (s *UpdateGlobalTableOutput) SetGlobalTableDescription(v *GlobalTableDescri type UpdateGlobalTableSettingsInput struct { _ struct{} `type:"structure"` + // The billing mode of the global table. If GlobalTableBillingMode is not specified, + // the global table defaults to PROVISIONED capacity billing mode. + GlobalTableBillingMode *string `type:"string" enum:"BillingMode"` + // Represents the settings of a global secondary index for a global table that // will be modified. GlobalTableGlobalSecondaryIndexSettingsUpdate []*GlobalTableGlobalSecondaryIndexSettingsUpdate `min:"1" type:"list"` @@ -12712,6 +14942,12 @@ func (s *UpdateGlobalTableSettingsInput) Validate() error { return nil } +// SetGlobalTableBillingMode sets the GlobalTableBillingMode field's value. +func (s *UpdateGlobalTableSettingsInput) SetGlobalTableBillingMode(v string) *UpdateGlobalTableSettingsInput { + s.GlobalTableBillingMode = &v + return s +} + // SetGlobalTableGlobalSecondaryIndexSettingsUpdate sets the GlobalTableGlobalSecondaryIndexSettingsUpdate field's value. func (s *UpdateGlobalTableSettingsInput) SetGlobalTableGlobalSecondaryIndexSettingsUpdate(v []*GlobalTableGlobalSecondaryIndexSettingsUpdate) *UpdateGlobalTableSettingsInput { s.GlobalTableGlobalSecondaryIndexSettingsUpdate = v @@ -13189,6 +15425,19 @@ type UpdateTableInput struct { // must include the key element(s) of the new index. AttributeDefinitions []*AttributeDefinition `type:"list"` + // Controls how you are charged for read and write throughput and how you manage + // capacity. When switching from pay-per-request to provisioned capacity, initial + // provisioned capacity values must be set. The initial provisioned capacity + // values are estimated based on the consumed read and write capacity of your + // table and global secondary indexes over the past 30 minutes. + // + // * PROVISIONED - Sets the billing mode to PROVISIONED. We recommend using + // PROVISIONED for predictable workloads. + // + // * PAY_PER_REQUEST - Sets the billing mode to PAY_PER_REQUEST. We recommend + // using PAY_PER_REQUEST for unpredictable workloads. + BillingMode *string `type:"string" enum:"BillingMode"` + // An array of one or more global secondary indexes for the table. For each // index in the array, you can request one action: // @@ -13279,6 +15528,12 @@ func (s *UpdateTableInput) SetAttributeDefinitions(v []*AttributeDefinition) *Up return s } +// SetBillingMode sets the BillingMode field's value. +func (s *UpdateTableInput) SetBillingMode(v string) *UpdateTableInput { + s.BillingMode = &v + return s +} + // SetGlobalSecondaryIndexUpdates sets the GlobalSecondaryIndexUpdates field's value. func (s *UpdateTableInput) SetGlobalSecondaryIndexUpdates(v []*GlobalSecondaryIndexUpdate) *UpdateTableInput { s.GlobalSecondaryIndexUpdates = v @@ -13495,6 +15750,14 @@ const ( BackupTypeFilterAll = "ALL" ) +const ( + // BillingModeProvisioned is a BillingMode enum value + BillingModeProvisioned = "PROVISIONED" + + // BillingModePayPerRequest is a BillingMode enum value + BillingModePayPerRequest = "PAY_PER_REQUEST" +) + const ( // ComparisonOperatorEq is a ComparisonOperator enum value ComparisonOperatorEq = "EQ" @@ -13672,6 +15935,14 @@ const ( ReturnValueUpdatedNew = "UPDATED_NEW" ) +const ( + // ReturnValuesOnConditionCheckFailureAllOld is a ReturnValuesOnConditionCheckFailure enum value + ReturnValuesOnConditionCheckFailureAllOld = "ALL_OLD" + + // ReturnValuesOnConditionCheckFailureNone is a ReturnValuesOnConditionCheckFailure enum value + ReturnValuesOnConditionCheckFailureNone = "NONE" +) + const ( // SSEStatusEnabling is a SSEStatus enum value SSEStatusEnabling = "ENABLING" diff --git a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/errors.go b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/errors.go index 4abbbe6632..175647742f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/errors.go @@ -8,7 +8,7 @@ const ( // "BackupInUseException". // // There is another ongoing conflicting backup control plane operation on the - // table. The backups is either being created, deleted or restored to a table. + // table. The backup is either being created, deleted or restored to a table. ErrCodeBackupInUseException = "BackupInUseException" // ErrCodeBackupNotFoundException for service response error code @@ -41,6 +41,13 @@ const ( // The specified global table does not exist. ErrCodeGlobalTableNotFoundException = "GlobalTableNotFoundException" + // ErrCodeIdempotentParameterMismatchException for service response error code + // "IdempotentParameterMismatchException". + // + // DynamoDB rejected the request because you retried a request with a different + // payload but with an idempotent token that was already used. + ErrCodeIdempotentParameterMismatchException = "IdempotentParameterMismatchException" + // ErrCodeIndexNotFoundException for service response error code // "IndexNotFoundException". // @@ -112,6 +119,14 @@ const ( // The specified replica is no longer part of the global table. ErrCodeReplicaNotFoundException = "ReplicaNotFoundException" + // ErrCodeRequestLimitExceeded for service response error code + // "RequestLimitExceeded". + // + // Throughput exceeds the current throughput limit for your account. Please + // contact AWS Support at AWS Support (http://docs.aws.amazon.com/https:/aws.amazon.com/support) + // to request a limit increase. + ErrCodeRequestLimitExceeded = "RequestLimitExceeded" + // ErrCodeResourceInUseException for service response error code // "ResourceInUseException". // @@ -145,4 +160,46 @@ const ( // A source table with the name TableName does not currently exist within the // subscriber's account. ErrCodeTableNotFoundException = "TableNotFoundException" + + // ErrCodeTransactionCanceledException for service response error code + // "TransactionCanceledException". + // + // The entire transaction request was rejected. + // + // DynamoDB will reject the entire TransactWriteItems request if any of the + // following is true: + // + // * A table in the TransactWriteItems request does not exist. + // + // * A table in the TransactWriteItems request is on a different account + // or region. + // + // * Operations contain item schema violations. + // + // * More than one write operation (UpdateItem, PutItem, DeleteItem) operates + // on the same item. + // + // * More than one check operation operates on the same item. + // + // * The number of operations sent in the TransactWriteItems request is + // 0 or greater than 10. + // + // * A TransactWriteItems request exceeds the maximum 4 MB request size. + // + // + // * Any operation in the TransactWriteItems request would cause an item + // to become larger than 400KB. + ErrCodeTransactionCanceledException = "TransactionCanceledException" + + // ErrCodeTransactionConflictException for service response error code + // "TransactionConflictException". + // + // Operation was rejected because there is an ongoing transaction for the item. + ErrCodeTransactionConflictException = "TransactionConflictException" + + // ErrCodeTransactionInProgressException for service response error code + // "TransactionInProgressException". + // + // The transaction with the given request token is already in progress. + ErrCodeTransactionInProgressException = "TransactionInProgressException" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/service.go b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/service.go index 346f52ce4a..edcb5b8598 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/dynamodb/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/dynamodb/service.go @@ -6,6 +6,7 @@ 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/crr" "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/jsonrpc" @@ -19,6 +20,7 @@ import ( // modify mutate any of the struct's properties though. type DynamoDB struct { *client.Client + endpointCache *crr.EndpointCache } // Used for custom client initialization logic @@ -67,6 +69,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio handlers, ), } + svc.endpointCache = crr.NewEndpointCache(10) // Handlers svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) 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 292fd5c50e..25952680ac 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 @@ -18,7 +18,7 @@ const opAcceptReservedInstancesExchangeQuote = "AcceptReservedInstancesExchangeQ // AcceptReservedInstancesExchangeQuoteRequest generates a "aws/request.Request" representing the // client's request for the AcceptReservedInstancesExchangeQuote operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -88,12 +88,90 @@ func (c *EC2) AcceptReservedInstancesExchangeQuoteWithContext(ctx aws.Context, i return out, req.Send() } +const opAcceptTransitGatewayVpcAttachment = "AcceptTransitGatewayVpcAttachment" + +// AcceptTransitGatewayVpcAttachmentRequest generates a "aws/request.Request" representing the +// client's request for the AcceptTransitGatewayVpcAttachment 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 AcceptTransitGatewayVpcAttachment for more information on using the AcceptTransitGatewayVpcAttachment +// 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 AcceptTransitGatewayVpcAttachmentRequest method. +// req, resp := client.AcceptTransitGatewayVpcAttachmentRequest(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/AcceptTransitGatewayVpcAttachment +func (c *EC2) AcceptTransitGatewayVpcAttachmentRequest(input *AcceptTransitGatewayVpcAttachmentInput) (req *request.Request, output *AcceptTransitGatewayVpcAttachmentOutput) { + op := &request.Operation{ + Name: opAcceptTransitGatewayVpcAttachment, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AcceptTransitGatewayVpcAttachmentInput{} + } + + output = &AcceptTransitGatewayVpcAttachmentOutput{} + req = c.newRequest(op, input, output) + return +} + +// AcceptTransitGatewayVpcAttachment API operation for Amazon Elastic Compute Cloud. +// +// Accepts a request to attach a VPC to a transit gateway. +// +// The VPC attachment must be in the pendingAcceptance state. Use DescribeTransitGatewayVpcAttachments +// to view your pending VPC attachment requests. Use RejectTransitGatewayVpcAttachment +// to reject a VPC attachment 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 +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation AcceptTransitGatewayVpcAttachment for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptTransitGatewayVpcAttachment +func (c *EC2) AcceptTransitGatewayVpcAttachment(input *AcceptTransitGatewayVpcAttachmentInput) (*AcceptTransitGatewayVpcAttachmentOutput, error) { + req, out := c.AcceptTransitGatewayVpcAttachmentRequest(input) + return out, req.Send() +} + +// AcceptTransitGatewayVpcAttachmentWithContext is the same as AcceptTransitGatewayVpcAttachment with the addition of +// the ability to pass a context and additional request options. +// +// See AcceptTransitGatewayVpcAttachment 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) AcceptTransitGatewayVpcAttachmentWithContext(ctx aws.Context, input *AcceptTransitGatewayVpcAttachmentInput, opts ...request.Option) (*AcceptTransitGatewayVpcAttachmentOutput, error) { + req, out := c.AcceptTransitGatewayVpcAttachmentRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opAcceptVpcEndpointConnections = "AcceptVpcEndpointConnections" // AcceptVpcEndpointConnectionsRequest generates a "aws/request.Request" representing the // client's request for the AcceptVpcEndpointConnections operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -168,7 +246,7 @@ const opAcceptVpcPeeringConnection = "AcceptVpcPeeringConnection" // AcceptVpcPeeringConnectionRequest generates a "aws/request.Request" representing the // client's request for the AcceptVpcPeeringConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -243,12 +321,101 @@ func (c *EC2) AcceptVpcPeeringConnectionWithContext(ctx aws.Context, input *Acce return out, req.Send() } +const opAdvertiseByoipCidr = "AdvertiseByoipCidr" + +// AdvertiseByoipCidrRequest generates a "aws/request.Request" representing the +// client's request for the AdvertiseByoipCidr 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 AdvertiseByoipCidr for more information on using the AdvertiseByoipCidr +// 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 AdvertiseByoipCidrRequest method. +// req, resp := client.AdvertiseByoipCidrRequest(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/AdvertiseByoipCidr +func (c *EC2) AdvertiseByoipCidrRequest(input *AdvertiseByoipCidrInput) (req *request.Request, output *AdvertiseByoipCidrOutput) { + op := &request.Operation{ + Name: opAdvertiseByoipCidr, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AdvertiseByoipCidrInput{} + } + + output = &AdvertiseByoipCidrOutput{} + req = c.newRequest(op, input, output) + return +} + +// AdvertiseByoipCidr API operation for Amazon Elastic Compute Cloud. +// +// Advertises an IPv4 address range that is provisioned for use with your AWS +// 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. +// +// It can take a few minutes before traffic to the specified addresses starts +// routing to AWS because of BGP propagation delays. +// +// To stop advertising the BYOIP CIDR, use WithdrawByoipCidr. +// +// 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 AdvertiseByoipCidr for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AdvertiseByoipCidr +func (c *EC2) AdvertiseByoipCidr(input *AdvertiseByoipCidrInput) (*AdvertiseByoipCidrOutput, error) { + req, out := c.AdvertiseByoipCidrRequest(input) + return out, req.Send() +} + +// AdvertiseByoipCidrWithContext is the same as AdvertiseByoipCidr with the addition of +// the ability to pass a context and additional request options. +// +// See AdvertiseByoipCidr 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) AdvertiseByoipCidrWithContext(ctx aws.Context, input *AdvertiseByoipCidrInput, opts ...request.Option) (*AdvertiseByoipCidrOutput, error) { + req, out := c.AdvertiseByoipCidrRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opAllocateAddress = "AllocateAddress" // AllocateAddressRequest generates a "aws/request.Request" representing the // client's request for the AllocateAddress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -292,6 +459,13 @@ func (c *EC2) AllocateAddressRequest(input *AllocateAddressInput) (req *request. // After you release an Elastic IP address, it is released to the IP address // pool and can be allocated to a different AWS 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) (http://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 @@ -338,7 +512,7 @@ const opAllocateHosts = "AllocateHosts" // AllocateHostsRequest generates a "aws/request.Request" representing the // client's request for the AllocateHosts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -408,12 +582,88 @@ func (c *EC2) AllocateHostsWithContext(ctx aws.Context, input *AllocateHostsInpu return out, req.Send() } +const opApplySecurityGroupsToClientVpnTargetNetwork = "ApplySecurityGroupsToClientVpnTargetNetwork" + +// ApplySecurityGroupsToClientVpnTargetNetworkRequest generates a "aws/request.Request" representing the +// client's request for the ApplySecurityGroupsToClientVpnTargetNetwork 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 ApplySecurityGroupsToClientVpnTargetNetwork for more information on using the ApplySecurityGroupsToClientVpnTargetNetwork +// 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 ApplySecurityGroupsToClientVpnTargetNetworkRequest method. +// req, resp := client.ApplySecurityGroupsToClientVpnTargetNetworkRequest(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/ApplySecurityGroupsToClientVpnTargetNetwork +func (c *EC2) ApplySecurityGroupsToClientVpnTargetNetworkRequest(input *ApplySecurityGroupsToClientVpnTargetNetworkInput) (req *request.Request, output *ApplySecurityGroupsToClientVpnTargetNetworkOutput) { + op := &request.Operation{ + Name: opApplySecurityGroupsToClientVpnTargetNetwork, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ApplySecurityGroupsToClientVpnTargetNetworkInput{} + } + + output = &ApplySecurityGroupsToClientVpnTargetNetworkOutput{} + req = c.newRequest(op, input, output) + return +} + +// ApplySecurityGroupsToClientVpnTargetNetwork API operation for Amazon Elastic Compute Cloud. +// +// Applies a security group to the association between the target network and +// the Client VPN endpoint. This action replaces the existing security groups +// with the specified security 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 +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation ApplySecurityGroupsToClientVpnTargetNetwork for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ApplySecurityGroupsToClientVpnTargetNetwork +func (c *EC2) ApplySecurityGroupsToClientVpnTargetNetwork(input *ApplySecurityGroupsToClientVpnTargetNetworkInput) (*ApplySecurityGroupsToClientVpnTargetNetworkOutput, error) { + req, out := c.ApplySecurityGroupsToClientVpnTargetNetworkRequest(input) + return out, req.Send() +} + +// ApplySecurityGroupsToClientVpnTargetNetworkWithContext is the same as ApplySecurityGroupsToClientVpnTargetNetwork with the addition of +// the ability to pass a context and additional request options. +// +// See ApplySecurityGroupsToClientVpnTargetNetwork 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) ApplySecurityGroupsToClientVpnTargetNetworkWithContext(ctx aws.Context, input *ApplySecurityGroupsToClientVpnTargetNetworkInput, opts ...request.Option) (*ApplySecurityGroupsToClientVpnTargetNetworkOutput, error) { + req, out := c.ApplySecurityGroupsToClientVpnTargetNetworkRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opAssignIpv6Addresses = "AssignIpv6Addresses" // AssignIpv6AddressesRequest generates a "aws/request.Request" representing the // client's request for the AssignIpv6Addresses operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -494,7 +744,7 @@ const opAssignPrivateIpAddresses = "AssignPrivateIpAddresses" // AssignPrivateIpAddressesRequest generates a "aws/request.Request" representing the // client's request for the AssignPrivateIpAddresses operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -528,24 +778,30 @@ func (c *EC2) AssignPrivateIpAddressesRequest(input *AssignPrivateIpAddressesInp output = &AssignPrivateIpAddressesOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // AssignPrivateIpAddresses API operation for Amazon Elastic Compute Cloud. // // Assigns one or more secondary private IP addresses to the specified network -// interface. You can specify one or more specific secondary IP addresses, or -// you can specify the number of secondary IP addresses to be automatically -// assigned within the subnet's CIDR block range. The number of secondary IP -// addresses that you can assign to an instance varies by instance type. For -// information about instance types, see Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) +// interface. +// +// You can specify one or more specific secondary IP addresses, or you can specify +// the number of secondary IP addresses to be automatically assigned within +// the subnet's CIDR block range. The number of secondary IP addresses that +// you can assign to an instance varies by instance type. For information about +// instance types, see Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) // in the Amazon Elastic Compute Cloud User Guide. For more information about // Elastic IP addresses, see Elastic IP Addresses (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html) // in the Amazon Elastic Compute Cloud User Guide. // -// AssignPrivateIpAddresses is available only in EC2-VPC. +// When you move a secondary private IP address to another network interface, +// any Elastic IP address that is associated with the IP address is also moved. +// +// Remapping an IP address is an asynchronous operation. When you move an IP +// address from one network interface to another, check network/interfaces/macs/mac/local-ipv4s +// in the instance metadata to confirm that the remapping is complete. // // 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 @@ -580,7 +836,7 @@ const opAssociateAddress = "AssociateAddress" // AssociateAddressRequest generates a "aws/request.Request" representing the // client's request for the AssociateAddress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -673,12 +929,90 @@ func (c *EC2) AssociateAddressWithContext(ctx aws.Context, input *AssociateAddre return out, req.Send() } +const opAssociateClientVpnTargetNetwork = "AssociateClientVpnTargetNetwork" + +// AssociateClientVpnTargetNetworkRequest generates a "aws/request.Request" representing the +// client's request for the AssociateClientVpnTargetNetwork 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 AssociateClientVpnTargetNetwork for more information on using the AssociateClientVpnTargetNetwork +// 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 AssociateClientVpnTargetNetworkRequest method. +// req, resp := client.AssociateClientVpnTargetNetworkRequest(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/AssociateClientVpnTargetNetwork +func (c *EC2) AssociateClientVpnTargetNetworkRequest(input *AssociateClientVpnTargetNetworkInput) (req *request.Request, output *AssociateClientVpnTargetNetworkOutput) { + op := &request.Operation{ + Name: opAssociateClientVpnTargetNetwork, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AssociateClientVpnTargetNetworkInput{} + } + + output = &AssociateClientVpnTargetNetworkOutput{} + req = c.newRequest(op, input, output) + return +} + +// AssociateClientVpnTargetNetwork API operation for Amazon Elastic Compute Cloud. +// +// Associates a target network with a Client VPN endpoint. A target network +// is a subnet in a VPC. You can associate multiple subnets from the same VPC +// with a Client VPN endpoint. You can associate only one subnet in each Availability +// Zone. We recommend that you associate at least two subnets to provide Availability +// Zone redundancy. +// +// 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 AssociateClientVpnTargetNetwork for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateClientVpnTargetNetwork +func (c *EC2) AssociateClientVpnTargetNetwork(input *AssociateClientVpnTargetNetworkInput) (*AssociateClientVpnTargetNetworkOutput, error) { + req, out := c.AssociateClientVpnTargetNetworkRequest(input) + return out, req.Send() +} + +// AssociateClientVpnTargetNetworkWithContext is the same as AssociateClientVpnTargetNetwork with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateClientVpnTargetNetwork 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) AssociateClientVpnTargetNetworkWithContext(ctx aws.Context, input *AssociateClientVpnTargetNetworkInput, opts ...request.Option) (*AssociateClientVpnTargetNetworkOutput, error) { + req, out := c.AssociateClientVpnTargetNetworkRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opAssociateDhcpOptions = "AssociateDhcpOptions" // AssociateDhcpOptionsRequest generates a "aws/request.Request" representing the // client's request for the AssociateDhcpOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -712,8 +1046,7 @@ func (c *EC2) AssociateDhcpOptionsRequest(input *AssociateDhcpOptionsInput) (req output = &AssociateDhcpOptionsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -765,7 +1098,7 @@ const opAssociateIamInstanceProfile = "AssociateIamInstanceProfile" // AssociateIamInstanceProfileRequest generates a "aws/request.Request" representing the // client's request for the AssociateIamInstanceProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -840,7 +1173,7 @@ const opAssociateRouteTable = "AssociateRouteTable" // AssociateRouteTableRequest generates a "aws/request.Request" representing the // client's request for the AssociateRouteTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -921,7 +1254,7 @@ const opAssociateSubnetCidrBlock = "AssociateSubnetCidrBlock" // AssociateSubnetCidrBlockRequest generates a "aws/request.Request" representing the // client's request for the AssociateSubnetCidrBlock operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -992,12 +1325,87 @@ func (c *EC2) AssociateSubnetCidrBlockWithContext(ctx aws.Context, input *Associ return out, req.Send() } +const opAssociateTransitGatewayRouteTable = "AssociateTransitGatewayRouteTable" + +// AssociateTransitGatewayRouteTableRequest generates a "aws/request.Request" representing the +// client's request for the AssociateTransitGatewayRouteTable 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 AssociateTransitGatewayRouteTable for more information on using the AssociateTransitGatewayRouteTable +// 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 AssociateTransitGatewayRouteTableRequest method. +// req, resp := client.AssociateTransitGatewayRouteTableRequest(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/AssociateTransitGatewayRouteTable +func (c *EC2) AssociateTransitGatewayRouteTableRequest(input *AssociateTransitGatewayRouteTableInput) (req *request.Request, output *AssociateTransitGatewayRouteTableOutput) { + op := &request.Operation{ + Name: opAssociateTransitGatewayRouteTable, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AssociateTransitGatewayRouteTableInput{} + } + + output = &AssociateTransitGatewayRouteTableOutput{} + req = c.newRequest(op, input, output) + return +} + +// AssociateTransitGatewayRouteTable API operation for Amazon Elastic Compute Cloud. +// +// Associates the specified attachment with the specified transit gateway route +// table. You can associate only one route table with an 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 AssociateTransitGatewayRouteTable for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateTransitGatewayRouteTable +func (c *EC2) AssociateTransitGatewayRouteTable(input *AssociateTransitGatewayRouteTableInput) (*AssociateTransitGatewayRouteTableOutput, error) { + req, out := c.AssociateTransitGatewayRouteTableRequest(input) + return out, req.Send() +} + +// AssociateTransitGatewayRouteTableWithContext is the same as AssociateTransitGatewayRouteTable with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateTransitGatewayRouteTable 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) AssociateTransitGatewayRouteTableWithContext(ctx aws.Context, input *AssociateTransitGatewayRouteTableInput, opts ...request.Option) (*AssociateTransitGatewayRouteTableOutput, error) { + req, out := c.AssociateTransitGatewayRouteTableRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opAssociateVpcCidrBlock = "AssociateVpcCidrBlock" // AssociateVpcCidrBlockRequest generates a "aws/request.Request" representing the // client's request for the AssociateVpcCidrBlock operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1077,7 +1485,7 @@ const opAttachClassicLinkVpc = "AttachClassicLinkVpc" // AttachClassicLinkVpcRequest generates a "aws/request.Request" representing the // client's request for the AttachClassicLinkVpc operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1162,7 +1570,7 @@ const opAttachInternetGateway = "AttachInternetGateway" // AttachInternetGatewayRequest generates a "aws/request.Request" representing the // client's request for the AttachInternetGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1196,8 +1604,7 @@ func (c *EC2) AttachInternetGatewayRequest(input *AttachInternetGatewayInput) (r output = &AttachInternetGatewayOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1240,7 +1647,7 @@ const opAttachNetworkInterface = "AttachNetworkInterface" // AttachNetworkInterfaceRequest generates a "aws/request.Request" representing the // client's request for the AttachNetworkInterface operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1314,7 +1721,7 @@ const opAttachVolume = "AttachVolume" // AttachVolumeRequest generates a "aws/request.Request" representing the // client's request for the AttachVolume operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1415,7 +1822,7 @@ const opAttachVpnGateway = "AttachVpnGateway" // AttachVpnGatewayRequest generates a "aws/request.Request" representing the // client's request for the AttachVpnGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1488,12 +1895,89 @@ func (c *EC2) AttachVpnGatewayWithContext(ctx aws.Context, input *AttachVpnGatew return out, req.Send() } +const opAuthorizeClientVpnIngress = "AuthorizeClientVpnIngress" + +// AuthorizeClientVpnIngressRequest generates a "aws/request.Request" representing the +// client's request for the AuthorizeClientVpnIngress 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 AuthorizeClientVpnIngress for more information on using the AuthorizeClientVpnIngress +// 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 AuthorizeClientVpnIngressRequest method. +// req, resp := client.AuthorizeClientVpnIngressRequest(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/AuthorizeClientVpnIngress +func (c *EC2) AuthorizeClientVpnIngressRequest(input *AuthorizeClientVpnIngressInput) (req *request.Request, output *AuthorizeClientVpnIngressOutput) { + op := &request.Operation{ + Name: opAuthorizeClientVpnIngress, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AuthorizeClientVpnIngressInput{} + } + + output = &AuthorizeClientVpnIngressOutput{} + req = c.newRequest(op, input, output) + return +} + +// AuthorizeClientVpnIngress API operation for Amazon Elastic Compute Cloud. +// +// Adds an ingress authorization rule to a Client VPN endpoint. Ingress authorization +// rules act as firewall rules that grant access to networks. You must configure +// ingress authorization rules to enable clients to access resources in AWS +// or on-premises networks. +// +// 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 AuthorizeClientVpnIngress for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AuthorizeClientVpnIngress +func (c *EC2) AuthorizeClientVpnIngress(input *AuthorizeClientVpnIngressInput) (*AuthorizeClientVpnIngressOutput, error) { + req, out := c.AuthorizeClientVpnIngressRequest(input) + return out, req.Send() +} + +// AuthorizeClientVpnIngressWithContext is the same as AuthorizeClientVpnIngress with the addition of +// the ability to pass a context and additional request options. +// +// See AuthorizeClientVpnIngress 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) AuthorizeClientVpnIngressWithContext(ctx aws.Context, input *AuthorizeClientVpnIngressInput, opts ...request.Option) (*AuthorizeClientVpnIngressOutput, error) { + req, out := c.AuthorizeClientVpnIngressRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opAuthorizeSecurityGroupEgress = "AuthorizeSecurityGroupEgress" // AuthorizeSecurityGroupEgressRequest generates a "aws/request.Request" representing the // client's request for the AuthorizeSecurityGroupEgress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1527,8 +2011,7 @@ func (c *EC2) AuthorizeSecurityGroupEgressRequest(input *AuthorizeSecurityGroupE output = &AuthorizeSecurityGroupEgressOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1586,7 +2069,7 @@ const opAuthorizeSecurityGroupIngress = "AuthorizeSecurityGroupIngress" // AuthorizeSecurityGroupIngressRequest generates a "aws/request.Request" representing the // client's request for the AuthorizeSecurityGroupIngress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1620,8 +2103,7 @@ func (c *EC2) AuthorizeSecurityGroupIngressRequest(input *AuthorizeSecurityGroup output = &AuthorizeSecurityGroupIngressOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1680,7 +2162,7 @@ const opBundleInstance = "BundleInstance" // BundleInstanceRequest generates a "aws/request.Request" representing the // client's request for the BundleInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1760,7 +2242,7 @@ const opCancelBundleTask = "CancelBundleTask" // CancelBundleTaskRequest generates a "aws/request.Request" representing the // client's request for the CancelBundleTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1829,12 +2311,93 @@ func (c *EC2) CancelBundleTaskWithContext(ctx aws.Context, input *CancelBundleTa return out, req.Send() } +const opCancelCapacityReservation = "CancelCapacityReservation" + +// CancelCapacityReservationRequest generates a "aws/request.Request" representing the +// client's request for the CancelCapacityReservation 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 CancelCapacityReservation for more information on using the CancelCapacityReservation +// 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 CancelCapacityReservationRequest method. +// req, resp := client.CancelCapacityReservationRequest(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/CancelCapacityReservation +func (c *EC2) CancelCapacityReservationRequest(input *CancelCapacityReservationInput) (req *request.Request, output *CancelCapacityReservationOutput) { + op := &request.Operation{ + Name: opCancelCapacityReservation, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CancelCapacityReservationInput{} + } + + output = &CancelCapacityReservationOutput{} + req = c.newRequest(op, input, output) + return +} + +// CancelCapacityReservation API operation for Amazon Elastic Compute Cloud. +// +// Cancels the specified Capacity Reservation, releases the reserved capacity, +// and changes the Capacity Reservation's state to cancelled. +// +// Instances running in the reserved capacity continue running until you stop +// them. Stopped instances that target the Capacity Reservation can no longer +// launch. Modify these instances to either target a different Capacity Reservation, +// launch On-Demand Instance capacity, or run in any open Capacity Reservation +// that has matching attributes and sufficient capacity. +// +// 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 CancelCapacityReservation for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CancelCapacityReservation +func (c *EC2) CancelCapacityReservation(input *CancelCapacityReservationInput) (*CancelCapacityReservationOutput, error) { + req, out := c.CancelCapacityReservationRequest(input) + return out, req.Send() +} + +// CancelCapacityReservationWithContext is the same as CancelCapacityReservation with the addition of +// the ability to pass a context and additional request options. +// +// See CancelCapacityReservation 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) CancelCapacityReservationWithContext(ctx aws.Context, input *CancelCapacityReservationInput, opts ...request.Option) (*CancelCapacityReservationOutput, error) { + req, out := c.CancelCapacityReservationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCancelConversionTask = "CancelConversionTask" // CancelConversionTaskRequest generates a "aws/request.Request" representing the // client's request for the CancelConversionTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1868,8 +2431,7 @@ func (c *EC2) CancelConversionTaskRequest(input *CancelConversionTaskInput) (req output = &CancelConversionTaskOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1917,7 +2479,7 @@ const opCancelExportTask = "CancelExportTask" // CancelExportTaskRequest generates a "aws/request.Request" representing the // client's request for the CancelExportTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1951,8 +2513,7 @@ func (c *EC2) CancelExportTaskRequest(input *CancelExportTaskInput) (req *reques output = &CancelExportTaskOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1996,7 +2557,7 @@ const opCancelImportTask = "CancelImportTask" // CancelImportTaskRequest generates a "aws/request.Request" representing the // client's request for the CancelImportTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2070,7 +2631,7 @@ const opCancelReservedInstancesListing = "CancelReservedInstancesListing" // CancelReservedInstancesListingRequest generates a "aws/request.Request" representing the // client's request for the CancelReservedInstancesListing operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2148,7 +2709,7 @@ const opCancelSpotFleetRequests = "CancelSpotFleetRequests" // CancelSpotFleetRequestsRequest generates a "aws/request.Request" representing the // client's request for the CancelSpotFleetRequests operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2229,7 +2790,7 @@ const opCancelSpotInstanceRequests = "CancelSpotInstanceRequests" // CancelSpotInstanceRequestsRequest generates a "aws/request.Request" representing the // client's request for the CancelSpotInstanceRequests operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2306,7 +2867,7 @@ const opConfirmProductInstance = "ConfirmProductInstance" // ConfirmProductInstanceRequest generates a "aws/request.Request" representing the // client's request for the ConfirmProductInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2382,7 +2943,7 @@ const opCopyFpgaImage = "CopyFpgaImage" // CopyFpgaImageRequest generates a "aws/request.Request" representing the // client's request for the CopyFpgaImage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2456,7 +3017,7 @@ const opCopyImage = "CopyImage" // CopyImageRequest generates a "aws/request.Request" representing the // client's request for the CopyImage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2499,6 +3060,11 @@ func (c *EC2) CopyImageRequest(input *CopyImageInput) (req *request.Request, out // 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. +// // For more information about the prerequisites and limits when copying an AMI, // see Copying an AMI (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/CopyingAMIs.html) // in the Amazon Elastic Compute Cloud User Guide. @@ -2536,7 +3102,7 @@ const opCopySnapshot = "CopySnapshot" // CopySnapshotRequest generates a "aws/request.Request" representing the // client's request for the CopySnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2624,12 +3190,262 @@ func (c *EC2) CopySnapshotWithContext(ctx aws.Context, input *CopySnapshotInput, return out, req.Send() } +const opCreateCapacityReservation = "CreateCapacityReservation" + +// CreateCapacityReservationRequest generates a "aws/request.Request" representing the +// client's request for the CreateCapacityReservation 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 CreateCapacityReservation for more information on using the CreateCapacityReservation +// 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 CreateCapacityReservationRequest method. +// req, resp := client.CreateCapacityReservationRequest(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/CreateCapacityReservation +func (c *EC2) CreateCapacityReservationRequest(input *CreateCapacityReservationInput) (req *request.Request, output *CreateCapacityReservationOutput) { + op := &request.Operation{ + Name: opCreateCapacityReservation, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateCapacityReservationInput{} + } + + output = &CreateCapacityReservationOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateCapacityReservation API operation for Amazon Elastic Compute Cloud. +// +// Creates a new Capacity Reservation with the specified attributes. +// +// Capacity Reservations enable you to reserve capacity for your Amazon EC2 +// instances in a specific Availability Zone for any duration. This gives you +// the flexibility to selectively add capacity reservations and still get the +// Regional RI discounts for that usage. By creating Capacity Reservations, +// 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 +// (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-capacity-reservations.html) +// in the Amazon Elastic Compute Cloud 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 +// due to Amazon EC2 capacity constraints, either try again at a later time, +// try in a different Availability Zone, or request a smaller capacity reservation. +// If your application is flexible across instance types and sizes, try to create +// a Capacity Reservation with different instance attributes. +// +// Your request could also fail if the requested quantity exceeds your On-Demand +// 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 (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-resource-limits.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 CreateCapacityReservation for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateCapacityReservation +func (c *EC2) CreateCapacityReservation(input *CreateCapacityReservationInput) (*CreateCapacityReservationOutput, error) { + req, out := c.CreateCapacityReservationRequest(input) + return out, req.Send() +} + +// CreateCapacityReservationWithContext is the same as CreateCapacityReservation with the addition of +// the ability to pass a context and additional request options. +// +// See CreateCapacityReservation 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) CreateCapacityReservationWithContext(ctx aws.Context, input *CreateCapacityReservationInput, opts ...request.Option) (*CreateCapacityReservationOutput, error) { + req, out := c.CreateCapacityReservationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateClientVpnEndpoint = "CreateClientVpnEndpoint" + +// CreateClientVpnEndpointRequest generates a "aws/request.Request" representing the +// client's request for the CreateClientVpnEndpoint 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 CreateClientVpnEndpoint for more information on using the CreateClientVpnEndpoint +// 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 CreateClientVpnEndpointRequest method. +// req, resp := client.CreateClientVpnEndpointRequest(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/CreateClientVpnEndpoint +func (c *EC2) CreateClientVpnEndpointRequest(input *CreateClientVpnEndpointInput) (req *request.Request, output *CreateClientVpnEndpointOutput) { + op := &request.Operation{ + Name: opCreateClientVpnEndpoint, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateClientVpnEndpointInput{} + } + + output = &CreateClientVpnEndpointOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateClientVpnEndpoint API operation for Amazon Elastic Compute Cloud. +// +// Creates a Client VPN endpoint. A Client VPN endpoint is the resource you +// create and configure to enable and manage client VPN sessions. It is the +// destination endpoint at which all client VPN sessions are terminated. +// +// 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 CreateClientVpnEndpoint for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateClientVpnEndpoint +func (c *EC2) CreateClientVpnEndpoint(input *CreateClientVpnEndpointInput) (*CreateClientVpnEndpointOutput, error) { + req, out := c.CreateClientVpnEndpointRequest(input) + return out, req.Send() +} + +// CreateClientVpnEndpointWithContext is the same as CreateClientVpnEndpoint with the addition of +// the ability to pass a context and additional request options. +// +// See CreateClientVpnEndpoint 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) CreateClientVpnEndpointWithContext(ctx aws.Context, input *CreateClientVpnEndpointInput, opts ...request.Option) (*CreateClientVpnEndpointOutput, error) { + req, out := c.CreateClientVpnEndpointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateClientVpnRoute = "CreateClientVpnRoute" + +// CreateClientVpnRouteRequest generates a "aws/request.Request" representing the +// client's request for the CreateClientVpnRoute 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 CreateClientVpnRoute for more information on using the CreateClientVpnRoute +// 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 CreateClientVpnRouteRequest method. +// req, resp := client.CreateClientVpnRouteRequest(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/CreateClientVpnRoute +func (c *EC2) CreateClientVpnRouteRequest(input *CreateClientVpnRouteInput) (req *request.Request, output *CreateClientVpnRouteOutput) { + op := &request.Operation{ + Name: opCreateClientVpnRoute, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateClientVpnRouteInput{} + } + + output = &CreateClientVpnRouteOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateClientVpnRoute API operation for Amazon Elastic Compute Cloud. +// +// Adds a route to a network to a Client VPN endpoint. Each Client VPN endpoint +// has a route table that describes the available destination network routes. +// Each route in the route table specifies the path for traffic to specific resources +// or networks. +// +// 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 CreateClientVpnRoute for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateClientVpnRoute +func (c *EC2) CreateClientVpnRoute(input *CreateClientVpnRouteInput) (*CreateClientVpnRouteOutput, error) { + req, out := c.CreateClientVpnRouteRequest(input) + return out, req.Send() +} + +// CreateClientVpnRouteWithContext is the same as CreateClientVpnRoute with the addition of +// the ability to pass a context and additional request options. +// +// See CreateClientVpnRoute 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) CreateClientVpnRouteWithContext(ctx aws.Context, input *CreateClientVpnRouteInput, opts ...request.Option) (*CreateClientVpnRouteOutput, error) { + req, out := c.CreateClientVpnRouteRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateCustomerGateway = "CreateCustomerGateway" // CreateCustomerGatewayRequest generates a "aws/request.Request" representing the // client's request for the CreateCustomerGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2727,7 +3543,7 @@ const opCreateDefaultSubnet = "CreateDefaultSubnet" // CreateDefaultSubnetRequest generates a "aws/request.Request" representing the // client's request for the CreateDefaultSubnet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2805,7 +3621,7 @@ const opCreateDefaultVpc = "CreateDefaultVpc" // CreateDefaultVpcRequest generates a "aws/request.Request" representing the // client's request for the CreateDefaultVpc operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2850,8 +3666,8 @@ func (c *EC2) CreateDefaultVpcRequest(input *CreateDefaultVpcInput) (req *reques // in the Amazon Virtual Private Cloud User Guide. You cannot specify the components // of the default VPC yourself. // -// iIf you deleted your previous default VPC, you can create a default VPC. -// You cannot have more than one default VPC per Region. +// If you deleted your previous default VPC, you can create a default VPC. You +// cannot have more than one default VPC per Region. // // If your account supports EC2-Classic, you cannot use this action to create // a default VPC in a Region that supports EC2-Classic. If you want a default @@ -2891,7 +3707,7 @@ const opCreateDhcpOptions = "CreateDhcpOptions" // CreateDhcpOptionsRequest generates a "aws/request.Request" representing the // client's request for the CreateDhcpOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3003,7 +3819,7 @@ const opCreateEgressOnlyInternetGateway = "CreateEgressOnlyInternetGateway" // CreateEgressOnlyInternetGatewayRequest generates a "aws/request.Request" representing the // client's request for the CreateEgressOnlyInternetGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3080,7 +3896,7 @@ const opCreateFleet = "CreateFleet" // CreateFleetRequest generates a "aws/request.Request" representing the // client's request for the CreateFleet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3160,7 +3976,7 @@ const opCreateFlowLogs = "CreateFlowLogs" // CreateFlowLogsRequest generates a "aws/request.Request" representing the // client's request for the CreateFlowLogs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3249,7 +4065,7 @@ const opCreateFpgaImage = "CreateFpgaImage" // CreateFpgaImageRequest generates a "aws/request.Request" representing the // client's request for the CreateFpgaImage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3330,7 +4146,7 @@ const opCreateImage = "CreateImage" // CreateImageRequest generates a "aws/request.Request" representing the // client's request for the CreateImage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3413,7 +4229,7 @@ const opCreateInstanceExportTask = "CreateInstanceExportTask" // CreateInstanceExportTaskRequest generates a "aws/request.Request" representing the // client's request for the CreateInstanceExportTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3492,7 +4308,7 @@ const opCreateInternetGateway = "CreateInternetGateway" // CreateInternetGatewayRequest generates a "aws/request.Request" representing the // client's request for the CreateInternetGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3570,7 +4386,7 @@ const opCreateKeyPair = "CreateKeyPair" // CreateKeyPairRequest generates a "aws/request.Request" representing the // client's request for the CreateKeyPair operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3656,7 +4472,7 @@ const opCreateLaunchTemplate = "CreateLaunchTemplate" // CreateLaunchTemplateRequest generates a "aws/request.Request" representing the // client's request for the CreateLaunchTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3732,7 +4548,7 @@ const opCreateLaunchTemplateVersion = "CreateLaunchTemplateVersion" // CreateLaunchTemplateVersionRequest generates a "aws/request.Request" representing the // client's request for the CreateLaunchTemplateVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3810,7 +4626,7 @@ const opCreateNatGateway = "CreateNatGateway" // CreateNatGatewayRequest generates a "aws/request.Request" representing the // client's request for the CreateNatGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3890,7 +4706,7 @@ const opCreateNetworkAcl = "CreateNetworkAcl" // CreateNetworkAclRequest generates a "aws/request.Request" representing the // client's request for the CreateNetworkAcl operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3968,7 +4784,7 @@ const opCreateNetworkAclEntry = "CreateNetworkAclEntry" // CreateNetworkAclEntryRequest generates a "aws/request.Request" representing the // client's request for the CreateNetworkAclEntry operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4002,8 +4818,7 @@ func (c *EC2) CreateNetworkAclEntryRequest(input *CreateNetworkAclEntryInput) (r output = &CreateNetworkAclEntryOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4060,7 +4875,7 @@ const opCreateNetworkInterface = "CreateNetworkInterface" // CreateNetworkInterfaceRequest generates a "aws/request.Request" representing the // client's request for the CreateNetworkInterface operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4138,7 +4953,7 @@ const opCreateNetworkInterfacePermission = "CreateNetworkInterfacePermission" // CreateNetworkInterfacePermissionRequest generates a "aws/request.Request" representing the // client's request for the CreateNetworkInterfacePermission operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4216,7 +5031,7 @@ const opCreatePlacementGroup = "CreatePlacementGroup" // CreatePlacementGroupRequest generates a "aws/request.Request" representing the // client's request for the CreatePlacementGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4250,8 +5065,7 @@ func (c *EC2) CreatePlacementGroupRequest(input *CreatePlacementGroupInput) (req output = &CreatePlacementGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4262,7 +5076,10 @@ func (c *EC2) CreatePlacementGroupRequest(input *CreatePlacementGroupInput) (req // // A cluster placement group is a logical grouping of instances within a single // Availability Zone that benefit from low network latency, high network throughput. -// A spread placement group places instances on distinct hardware. +// A spread placement group places instances on distinct hardware. A partition +// placement group places groups of instances in different partitions, where +// instances in one partition do not share the same hardware with instances +// in another partition. // // For more information, see Placement Groups (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) // in the Amazon Elastic Compute Cloud User Guide. @@ -4300,7 +5117,7 @@ const opCreateReservedInstancesListing = "CreateReservedInstancesListing" // CreateReservedInstancesListingRequest generates a "aws/request.Request" representing the // client's request for the CreateReservedInstancesListing operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4397,7 +5214,7 @@ const opCreateRoute = "CreateRoute" // CreateRouteRequest generates a "aws/request.Request" representing the // client's request for the CreateRoute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4490,7 +5307,7 @@ const opCreateRouteTable = "CreateRouteTable" // CreateRouteTableRequest generates a "aws/request.Request" representing the // client's request for the CreateRouteTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4568,7 +5385,7 @@ const opCreateSecurityGroup = "CreateSecurityGroup" // CreateSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateSecurityGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4668,7 +5485,7 @@ const opCreateSnapshot = "CreateSnapshot" // CreateSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4773,7 +5590,7 @@ const opCreateSpotDatafeedSubscription = "CreateSpotDatafeedSubscription" // CreateSpotDatafeedSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the CreateSpotDatafeedSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4850,7 +5667,7 @@ const opCreateSubnet = "CreateSubnet" // CreateSubnetRequest generates a "aws/request.Request" representing the // client's request for the CreateSubnet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4950,7 +5767,7 @@ const opCreateTags = "CreateTags" // CreateTagsRequest generates a "aws/request.Request" representing the // client's request for the CreateTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4984,8 +5801,7 @@ func (c *EC2) CreateTagsRequest(input *CreateTagsInput) (req *request.Request, o output = &CreateTagsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5029,12 +5845,334 @@ func (c *EC2) CreateTagsWithContext(ctx aws.Context, input *CreateTagsInput, opt return out, req.Send() } +const opCreateTransitGateway = "CreateTransitGateway" + +// CreateTransitGatewayRequest generates a "aws/request.Request" representing the +// client's request for the CreateTransitGateway 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 CreateTransitGateway for more information on using the CreateTransitGateway +// 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 CreateTransitGatewayRequest method. +// req, resp := client.CreateTransitGatewayRequest(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/CreateTransitGateway +func (c *EC2) CreateTransitGatewayRequest(input *CreateTransitGatewayInput) (req *request.Request, output *CreateTransitGatewayOutput) { + op := &request.Operation{ + Name: opCreateTransitGateway, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateTransitGatewayInput{} + } + + output = &CreateTransitGatewayOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateTransitGateway API operation for Amazon Elastic Compute Cloud. +// +// Creates a transit gateway. +// +// You can use a transit gateway to interconnect your virtual private clouds +// (VPC) and on-premises networks. After the transit gateway enters the available +// state, you can attach your VPCs and VPN connections to the transit gateway. +// +// To attach your VPCs, use CreateTransitGatewayVpcAttachment. +// +// To attach a VPN connection, use CreateCustomerGateway to create a customer +// gateway and specify the ID of the customer gateway and the ID of the transit +// gateway in a call to CreateVpnConnection. +// +// When you create a transit gateway, we create a default transit gateway route +// table and use it as the default association route table and the default propagation +// route table. You can use CreateTransitGatewayRouteTable to create additional +// transit gateway route tables. If you disable automatic route propagation, +// we do not create a default transit gateway route table. You can use EnableTransitGatewayRouteTablePropagation +// to propagate routes from a resource attachment to a transit gateway route +// table. If you disable automatic associations, you can use AssociateTransitGatewayRouteTable +// to associate a resource attachment with a transit gateway route table. +// +// 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 CreateTransitGateway for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTransitGateway +func (c *EC2) CreateTransitGateway(input *CreateTransitGatewayInput) (*CreateTransitGatewayOutput, error) { + req, out := c.CreateTransitGatewayRequest(input) + return out, req.Send() +} + +// CreateTransitGatewayWithContext is the same as CreateTransitGateway with the addition of +// the ability to pass a context and additional request options. +// +// See CreateTransitGateway 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) CreateTransitGatewayWithContext(ctx aws.Context, input *CreateTransitGatewayInput, opts ...request.Option) (*CreateTransitGatewayOutput, error) { + req, out := c.CreateTransitGatewayRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateTransitGatewayRoute = "CreateTransitGatewayRoute" + +// CreateTransitGatewayRouteRequest generates a "aws/request.Request" representing the +// client's request for the CreateTransitGatewayRoute 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 CreateTransitGatewayRoute for more information on using the CreateTransitGatewayRoute +// 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 CreateTransitGatewayRouteRequest method. +// req, resp := client.CreateTransitGatewayRouteRequest(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/CreateTransitGatewayRoute +func (c *EC2) CreateTransitGatewayRouteRequest(input *CreateTransitGatewayRouteInput) (req *request.Request, output *CreateTransitGatewayRouteOutput) { + op := &request.Operation{ + Name: opCreateTransitGatewayRoute, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateTransitGatewayRouteInput{} + } + + output = &CreateTransitGatewayRouteOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateTransitGatewayRoute API operation for Amazon Elastic Compute Cloud. +// +// Creates a static route for the specified transit gateway route table. +// +// 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 CreateTransitGatewayRoute for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTransitGatewayRoute +func (c *EC2) CreateTransitGatewayRoute(input *CreateTransitGatewayRouteInput) (*CreateTransitGatewayRouteOutput, error) { + req, out := c.CreateTransitGatewayRouteRequest(input) + return out, req.Send() +} + +// CreateTransitGatewayRouteWithContext is the same as CreateTransitGatewayRoute with the addition of +// the ability to pass a context and additional request options. +// +// See CreateTransitGatewayRoute 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) CreateTransitGatewayRouteWithContext(ctx aws.Context, input *CreateTransitGatewayRouteInput, opts ...request.Option) (*CreateTransitGatewayRouteOutput, error) { + req, out := c.CreateTransitGatewayRouteRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateTransitGatewayRouteTable = "CreateTransitGatewayRouteTable" + +// CreateTransitGatewayRouteTableRequest generates a "aws/request.Request" representing the +// client's request for the CreateTransitGatewayRouteTable 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 CreateTransitGatewayRouteTable for more information on using the CreateTransitGatewayRouteTable +// 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 CreateTransitGatewayRouteTableRequest method. +// req, resp := client.CreateTransitGatewayRouteTableRequest(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/CreateTransitGatewayRouteTable +func (c *EC2) CreateTransitGatewayRouteTableRequest(input *CreateTransitGatewayRouteTableInput) (req *request.Request, output *CreateTransitGatewayRouteTableOutput) { + op := &request.Operation{ + Name: opCreateTransitGatewayRouteTable, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateTransitGatewayRouteTableInput{} + } + + output = &CreateTransitGatewayRouteTableOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateTransitGatewayRouteTable API operation for Amazon Elastic Compute Cloud. +// +// Creates a route table for the specified transit gateway. +// +// 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 CreateTransitGatewayRouteTable for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTransitGatewayRouteTable +func (c *EC2) CreateTransitGatewayRouteTable(input *CreateTransitGatewayRouteTableInput) (*CreateTransitGatewayRouteTableOutput, error) { + req, out := c.CreateTransitGatewayRouteTableRequest(input) + return out, req.Send() +} + +// CreateTransitGatewayRouteTableWithContext is the same as CreateTransitGatewayRouteTable with the addition of +// the ability to pass a context and additional request options. +// +// See CreateTransitGatewayRouteTable 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) CreateTransitGatewayRouteTableWithContext(ctx aws.Context, input *CreateTransitGatewayRouteTableInput, opts ...request.Option) (*CreateTransitGatewayRouteTableOutput, error) { + req, out := c.CreateTransitGatewayRouteTableRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateTransitGatewayVpcAttachment = "CreateTransitGatewayVpcAttachment" + +// CreateTransitGatewayVpcAttachmentRequest generates a "aws/request.Request" representing the +// client's request for the CreateTransitGatewayVpcAttachment 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 CreateTransitGatewayVpcAttachment for more information on using the CreateTransitGatewayVpcAttachment +// 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 CreateTransitGatewayVpcAttachmentRequest method. +// req, resp := client.CreateTransitGatewayVpcAttachmentRequest(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/CreateTransitGatewayVpcAttachment +func (c *EC2) CreateTransitGatewayVpcAttachmentRequest(input *CreateTransitGatewayVpcAttachmentInput) (req *request.Request, output *CreateTransitGatewayVpcAttachmentOutput) { + op := &request.Operation{ + Name: opCreateTransitGatewayVpcAttachment, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateTransitGatewayVpcAttachmentInput{} + } + + output = &CreateTransitGatewayVpcAttachmentOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateTransitGatewayVpcAttachment API operation for Amazon Elastic Compute Cloud. +// +// Attaches the specified VPC to the specified transit gateway. +// +// If you attach a VPC with a CIDR range that overlaps the CIDR range of a VPC +// that is already attached, the new VPC CIDR range is not propagated to the +// default propagation route table. +// +// To send VPC traffic to an attached transit gateway, add a route to the VPC +// route table using CreateRoute. +// +// 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 CreateTransitGatewayVpcAttachment for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTransitGatewayVpcAttachment +func (c *EC2) CreateTransitGatewayVpcAttachment(input *CreateTransitGatewayVpcAttachmentInput) (*CreateTransitGatewayVpcAttachmentOutput, error) { + req, out := c.CreateTransitGatewayVpcAttachmentRequest(input) + return out, req.Send() +} + +// CreateTransitGatewayVpcAttachmentWithContext is the same as CreateTransitGatewayVpcAttachment with the addition of +// the ability to pass a context and additional request options. +// +// See CreateTransitGatewayVpcAttachment 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) CreateTransitGatewayVpcAttachmentWithContext(ctx aws.Context, input *CreateTransitGatewayVpcAttachmentInput, opts ...request.Option) (*CreateTransitGatewayVpcAttachmentOutput, error) { + req, out := c.CreateTransitGatewayVpcAttachmentRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateVolume = "CreateVolume" // CreateVolumeRequest generates a "aws/request.Request" representing the // client's request for the CreateVolume operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5127,7 +6265,7 @@ const opCreateVpc = "CreateVpc" // CreateVpcRequest generates a "aws/request.Request" representing the // client's request for the CreateVpc operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5219,7 +6357,7 @@ const opCreateVpcEndpoint = "CreateVpcEndpoint" // CreateVpcEndpointRequest generates a "aws/request.Request" representing the // client's request for the CreateVpcEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5309,7 +6447,7 @@ const opCreateVpcEndpointConnectionNotification = "CreateVpcEndpointConnectionNo // CreateVpcEndpointConnectionNotificationRequest generates a "aws/request.Request" representing the // client's request for the CreateVpcEndpointConnectionNotification operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5389,7 +6527,7 @@ const opCreateVpcEndpointServiceConfiguration = "CreateVpcEndpointServiceConfigu // CreateVpcEndpointServiceConfigurationRequest generates a "aws/request.Request" representing the // client's request for the CreateVpcEndpointServiceConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5470,7 +6608,7 @@ const opCreateVpcPeeringConnection = "CreateVpcPeeringConnection" // CreateVpcPeeringConnectionRequest generates a "aws/request.Request" representing the // client's request for the CreateVpcPeeringConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5559,7 +6697,7 @@ const opCreateVpnConnection = "CreateVpnConnection" // CreateVpnConnectionRequest generates a "aws/request.Request" representing the // client's request for the CreateVpnConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5651,7 +6789,7 @@ const opCreateVpnConnectionRoute = "CreateVpnConnectionRoute" // CreateVpnConnectionRouteRequest generates a "aws/request.Request" representing the // client's request for the CreateVpnConnectionRoute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5685,8 +6823,7 @@ func (c *EC2) CreateVpnConnectionRouteRequest(input *CreateVpnConnectionRouteInp output = &CreateVpnConnectionRouteOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5734,7 +6871,7 @@ const opCreateVpnGateway = "CreateVpnGateway" // CreateVpnGatewayRequest generates a "aws/request.Request" representing the // client's request for the CreateVpnGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5809,12 +6946,165 @@ func (c *EC2) CreateVpnGatewayWithContext(ctx aws.Context, input *CreateVpnGatew return out, req.Send() } +const opDeleteClientVpnEndpoint = "DeleteClientVpnEndpoint" + +// DeleteClientVpnEndpointRequest generates a "aws/request.Request" representing the +// client's request for the DeleteClientVpnEndpoint 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 DeleteClientVpnEndpoint for more information on using the DeleteClientVpnEndpoint +// 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 DeleteClientVpnEndpointRequest method. +// req, resp := client.DeleteClientVpnEndpointRequest(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/DeleteClientVpnEndpoint +func (c *EC2) DeleteClientVpnEndpointRequest(input *DeleteClientVpnEndpointInput) (req *request.Request, output *DeleteClientVpnEndpointOutput) { + op := &request.Operation{ + Name: opDeleteClientVpnEndpoint, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteClientVpnEndpointInput{} + } + + output = &DeleteClientVpnEndpointOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteClientVpnEndpoint API operation for Amazon Elastic Compute Cloud. +// +// Deletes the specified Client VPN endpoint. You must disassociate all target +// networks before you can delete a Client VPN endpoint. +// +// 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 DeleteClientVpnEndpoint for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteClientVpnEndpoint +func (c *EC2) DeleteClientVpnEndpoint(input *DeleteClientVpnEndpointInput) (*DeleteClientVpnEndpointOutput, error) { + req, out := c.DeleteClientVpnEndpointRequest(input) + return out, req.Send() +} + +// DeleteClientVpnEndpointWithContext is the same as DeleteClientVpnEndpoint with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteClientVpnEndpoint 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) DeleteClientVpnEndpointWithContext(ctx aws.Context, input *DeleteClientVpnEndpointInput, opts ...request.Option) (*DeleteClientVpnEndpointOutput, error) { + req, out := c.DeleteClientVpnEndpointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteClientVpnRoute = "DeleteClientVpnRoute" + +// DeleteClientVpnRouteRequest generates a "aws/request.Request" representing the +// client's request for the DeleteClientVpnRoute 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 DeleteClientVpnRoute for more information on using the DeleteClientVpnRoute +// 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 DeleteClientVpnRouteRequest method. +// req, resp := client.DeleteClientVpnRouteRequest(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/DeleteClientVpnRoute +func (c *EC2) DeleteClientVpnRouteRequest(input *DeleteClientVpnRouteInput) (req *request.Request, output *DeleteClientVpnRouteOutput) { + op := &request.Operation{ + Name: opDeleteClientVpnRoute, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteClientVpnRouteInput{} + } + + output = &DeleteClientVpnRouteOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteClientVpnRoute API operation for Amazon Elastic Compute Cloud. +// +// Deletes a route from a Client VPN endpoint. You can only delete routes that +// you manually added using the CreateClientVpnRoute action. You cannot delete +// routes that were automatically added when associating a subnet. To remove +// routes that have been automatically added, disassociate the target subnet +// from the Client VPN endpoint. +// +// 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 DeleteClientVpnRoute for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteClientVpnRoute +func (c *EC2) DeleteClientVpnRoute(input *DeleteClientVpnRouteInput) (*DeleteClientVpnRouteOutput, error) { + req, out := c.DeleteClientVpnRouteRequest(input) + return out, req.Send() +} + +// DeleteClientVpnRouteWithContext is the same as DeleteClientVpnRoute with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteClientVpnRoute 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) DeleteClientVpnRouteWithContext(ctx aws.Context, input *DeleteClientVpnRouteInput, opts ...request.Option) (*DeleteClientVpnRouteOutput, error) { + req, out := c.DeleteClientVpnRouteRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteCustomerGateway = "DeleteCustomerGateway" // DeleteCustomerGatewayRequest generates a "aws/request.Request" representing the // client's request for the DeleteCustomerGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5848,8 +7138,7 @@ func (c *EC2) DeleteCustomerGatewayRequest(input *DeleteCustomerGatewayInput) (r output = &DeleteCustomerGatewayOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5891,7 +7180,7 @@ const opDeleteDhcpOptions = "DeleteDhcpOptions" // DeleteDhcpOptionsRequest generates a "aws/request.Request" representing the // client's request for the DeleteDhcpOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5925,8 +7214,7 @@ func (c *EC2) DeleteDhcpOptionsRequest(input *DeleteDhcpOptionsInput) (req *requ output = &DeleteDhcpOptionsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5970,7 +7258,7 @@ const opDeleteEgressOnlyInternetGateway = "DeleteEgressOnlyInternetGateway" // DeleteEgressOnlyInternetGatewayRequest generates a "aws/request.Request" representing the // client's request for the DeleteEgressOnlyInternetGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6044,7 +7332,7 @@ const opDeleteFleets = "DeleteFleets" // DeleteFleetsRequest generates a "aws/request.Request" representing the // client's request for the DeleteFleets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6124,7 +7412,7 @@ const opDeleteFlowLogs = "DeleteFlowLogs" // DeleteFlowLogsRequest generates a "aws/request.Request" representing the // client's request for the DeleteFlowLogs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6198,7 +7486,7 @@ const opDeleteFpgaImage = "DeleteFpgaImage" // DeleteFpgaImageRequest generates a "aws/request.Request" representing the // client's request for the DeleteFpgaImage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6272,7 +7560,7 @@ const opDeleteInternetGateway = "DeleteInternetGateway" // DeleteInternetGatewayRequest generates a "aws/request.Request" representing the // client's request for the DeleteInternetGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6306,8 +7594,7 @@ func (c *EC2) DeleteInternetGatewayRequest(input *DeleteInternetGatewayInput) (r output = &DeleteInternetGatewayOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -6349,7 +7636,7 @@ const opDeleteKeyPair = "DeleteKeyPair" // DeleteKeyPairRequest generates a "aws/request.Request" representing the // client's request for the DeleteKeyPair operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6383,8 +7670,7 @@ func (c *EC2) DeleteKeyPairRequest(input *DeleteKeyPairInput) (req *request.Requ output = &DeleteKeyPairOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -6425,7 +7711,7 @@ const opDeleteLaunchTemplate = "DeleteLaunchTemplate" // DeleteLaunchTemplateRequest generates a "aws/request.Request" representing the // client's request for the DeleteLaunchTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6500,7 +7786,7 @@ const opDeleteLaunchTemplateVersions = "DeleteLaunchTemplateVersions" // DeleteLaunchTemplateVersionsRequest generates a "aws/request.Request" representing the // client's request for the DeleteLaunchTemplateVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6577,7 +7863,7 @@ const opDeleteNatGateway = "DeleteNatGateway" // DeleteNatGatewayRequest generates a "aws/request.Request" representing the // client's request for the DeleteNatGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6653,7 +7939,7 @@ const opDeleteNetworkAcl = "DeleteNetworkAcl" // DeleteNetworkAclRequest generates a "aws/request.Request" representing the // client's request for the DeleteNetworkAcl operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6687,8 +7973,7 @@ func (c *EC2) DeleteNetworkAclRequest(input *DeleteNetworkAclInput) (req *reques output = &DeleteNetworkAclOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -6730,7 +8015,7 @@ const opDeleteNetworkAclEntry = "DeleteNetworkAclEntry" // DeleteNetworkAclEntryRequest generates a "aws/request.Request" representing the // client's request for the DeleteNetworkAclEntry operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6764,8 +8049,7 @@ func (c *EC2) DeleteNetworkAclEntryRequest(input *DeleteNetworkAclEntryInput) (r output = &DeleteNetworkAclEntryOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -6807,7 +8091,7 @@ const opDeleteNetworkInterface = "DeleteNetworkInterface" // DeleteNetworkInterfaceRequest generates a "aws/request.Request" representing the // client's request for the DeleteNetworkInterface operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6841,8 +8125,7 @@ func (c *EC2) DeleteNetworkInterfaceRequest(input *DeleteNetworkInterfaceInput) output = &DeleteNetworkInterfaceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -6884,7 +8167,7 @@ const opDeleteNetworkInterfacePermission = "DeleteNetworkInterfacePermission" // DeleteNetworkInterfacePermissionRequest generates a "aws/request.Request" representing the // client's request for the DeleteNetworkInterfacePermission operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6961,7 +8244,7 @@ const opDeletePlacementGroup = "DeletePlacementGroup" // DeletePlacementGroupRequest generates a "aws/request.Request" representing the // client's request for the DeletePlacementGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6995,8 +8278,7 @@ func (c *EC2) DeletePlacementGroupRequest(input *DeletePlacementGroupInput) (req output = &DeletePlacementGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -7040,7 +8322,7 @@ const opDeleteRoute = "DeleteRoute" // DeleteRouteRequest generates a "aws/request.Request" representing the // client's request for the DeleteRoute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7074,8 +8356,7 @@ func (c *EC2) DeleteRouteRequest(input *DeleteRouteInput) (req *request.Request, output = &DeleteRouteOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -7116,7 +8397,7 @@ const opDeleteRouteTable = "DeleteRouteTable" // DeleteRouteTableRequest generates a "aws/request.Request" representing the // client's request for the DeleteRouteTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7150,8 +8431,7 @@ func (c *EC2) DeleteRouteTableRequest(input *DeleteRouteTableInput) (req *reques output = &DeleteRouteTableOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -7194,7 +8474,7 @@ const opDeleteSecurityGroup = "DeleteSecurityGroup" // DeleteSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteSecurityGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7228,8 +8508,7 @@ func (c *EC2) DeleteSecurityGroupRequest(input *DeleteSecurityGroupInput) (req * output = &DeleteSecurityGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -7274,7 +8553,7 @@ const opDeleteSnapshot = "DeleteSnapshot" // DeleteSnapshotRequest generates a "aws/request.Request" representing the // client's request for the DeleteSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7308,8 +8587,7 @@ func (c *EC2) DeleteSnapshotRequest(input *DeleteSnapshotInput) (req *request.Re output = &DeleteSnapshotOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -7364,7 +8642,7 @@ const opDeleteSpotDatafeedSubscription = "DeleteSpotDatafeedSubscription" // DeleteSpotDatafeedSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the DeleteSpotDatafeedSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7398,8 +8676,7 @@ func (c *EC2) DeleteSpotDatafeedSubscriptionRequest(input *DeleteSpotDatafeedSub output = &DeleteSpotDatafeedSubscriptionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -7440,7 +8717,7 @@ const opDeleteSubnet = "DeleteSubnet" // DeleteSubnetRequest generates a "aws/request.Request" representing the // client's request for the DeleteSubnet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7474,8 +8751,7 @@ func (c *EC2) DeleteSubnetRequest(input *DeleteSubnetInput) (req *request.Reques output = &DeleteSubnetOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -7517,7 +8793,7 @@ const opDeleteTags = "DeleteTags" // DeleteTagsRequest generates a "aws/request.Request" representing the // client's request for the DeleteTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7551,8 +8827,7 @@ func (c *EC2) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, o output = &DeleteTagsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -7592,12 +8867,310 @@ func (c *EC2) DeleteTagsWithContext(ctx aws.Context, input *DeleteTagsInput, opt return out, req.Send() } +const opDeleteTransitGateway = "DeleteTransitGateway" + +// DeleteTransitGatewayRequest generates a "aws/request.Request" representing the +// client's request for the DeleteTransitGateway 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 DeleteTransitGateway for more information on using the DeleteTransitGateway +// 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 DeleteTransitGatewayRequest method. +// req, resp := client.DeleteTransitGatewayRequest(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/DeleteTransitGateway +func (c *EC2) DeleteTransitGatewayRequest(input *DeleteTransitGatewayInput) (req *request.Request, output *DeleteTransitGatewayOutput) { + op := &request.Operation{ + Name: opDeleteTransitGateway, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteTransitGatewayInput{} + } + + output = &DeleteTransitGatewayOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteTransitGateway API operation for Amazon Elastic Compute Cloud. +// +// Deletes the specified transit gateway. +// +// 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 DeleteTransitGateway for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTransitGateway +func (c *EC2) DeleteTransitGateway(input *DeleteTransitGatewayInput) (*DeleteTransitGatewayOutput, error) { + req, out := c.DeleteTransitGatewayRequest(input) + return out, req.Send() +} + +// DeleteTransitGatewayWithContext is the same as DeleteTransitGateway with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteTransitGateway 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) DeleteTransitGatewayWithContext(ctx aws.Context, input *DeleteTransitGatewayInput, opts ...request.Option) (*DeleteTransitGatewayOutput, error) { + req, out := c.DeleteTransitGatewayRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteTransitGatewayRoute = "DeleteTransitGatewayRoute" + +// DeleteTransitGatewayRouteRequest generates a "aws/request.Request" representing the +// client's request for the DeleteTransitGatewayRoute 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 DeleteTransitGatewayRoute for more information on using the DeleteTransitGatewayRoute +// 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 DeleteTransitGatewayRouteRequest method. +// req, resp := client.DeleteTransitGatewayRouteRequest(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/DeleteTransitGatewayRoute +func (c *EC2) DeleteTransitGatewayRouteRequest(input *DeleteTransitGatewayRouteInput) (req *request.Request, output *DeleteTransitGatewayRouteOutput) { + op := &request.Operation{ + Name: opDeleteTransitGatewayRoute, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteTransitGatewayRouteInput{} + } + + output = &DeleteTransitGatewayRouteOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteTransitGatewayRoute API operation for Amazon Elastic Compute Cloud. +// +// Deletes the specified route from the specified transit gateway route table. +// +// 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 DeleteTransitGatewayRoute for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTransitGatewayRoute +func (c *EC2) DeleteTransitGatewayRoute(input *DeleteTransitGatewayRouteInput) (*DeleteTransitGatewayRouteOutput, error) { + req, out := c.DeleteTransitGatewayRouteRequest(input) + return out, req.Send() +} + +// DeleteTransitGatewayRouteWithContext is the same as DeleteTransitGatewayRoute with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteTransitGatewayRoute 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) DeleteTransitGatewayRouteWithContext(ctx aws.Context, input *DeleteTransitGatewayRouteInput, opts ...request.Option) (*DeleteTransitGatewayRouteOutput, error) { + req, out := c.DeleteTransitGatewayRouteRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteTransitGatewayRouteTable = "DeleteTransitGatewayRouteTable" + +// DeleteTransitGatewayRouteTableRequest generates a "aws/request.Request" representing the +// client's request for the DeleteTransitGatewayRouteTable 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 DeleteTransitGatewayRouteTable for more information on using the DeleteTransitGatewayRouteTable +// 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 DeleteTransitGatewayRouteTableRequest method. +// req, resp := client.DeleteTransitGatewayRouteTableRequest(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/DeleteTransitGatewayRouteTable +func (c *EC2) DeleteTransitGatewayRouteTableRequest(input *DeleteTransitGatewayRouteTableInput) (req *request.Request, output *DeleteTransitGatewayRouteTableOutput) { + op := &request.Operation{ + Name: opDeleteTransitGatewayRouteTable, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteTransitGatewayRouteTableInput{} + } + + output = &DeleteTransitGatewayRouteTableOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteTransitGatewayRouteTable API operation for Amazon Elastic Compute Cloud. +// +// Deletes the specified transit gateway route table. You must disassociate +// the route table from any transit gateway route tables before you can delete +// it. +// +// 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 DeleteTransitGatewayRouteTable for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTransitGatewayRouteTable +func (c *EC2) DeleteTransitGatewayRouteTable(input *DeleteTransitGatewayRouteTableInput) (*DeleteTransitGatewayRouteTableOutput, error) { + req, out := c.DeleteTransitGatewayRouteTableRequest(input) + return out, req.Send() +} + +// DeleteTransitGatewayRouteTableWithContext is the same as DeleteTransitGatewayRouteTable with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteTransitGatewayRouteTable 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) DeleteTransitGatewayRouteTableWithContext(ctx aws.Context, input *DeleteTransitGatewayRouteTableInput, opts ...request.Option) (*DeleteTransitGatewayRouteTableOutput, error) { + req, out := c.DeleteTransitGatewayRouteTableRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteTransitGatewayVpcAttachment = "DeleteTransitGatewayVpcAttachment" + +// DeleteTransitGatewayVpcAttachmentRequest generates a "aws/request.Request" representing the +// client's request for the DeleteTransitGatewayVpcAttachment 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 DeleteTransitGatewayVpcAttachment for more information on using the DeleteTransitGatewayVpcAttachment +// 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 DeleteTransitGatewayVpcAttachmentRequest method. +// req, resp := client.DeleteTransitGatewayVpcAttachmentRequest(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/DeleteTransitGatewayVpcAttachment +func (c *EC2) DeleteTransitGatewayVpcAttachmentRequest(input *DeleteTransitGatewayVpcAttachmentInput) (req *request.Request, output *DeleteTransitGatewayVpcAttachmentOutput) { + op := &request.Operation{ + Name: opDeleteTransitGatewayVpcAttachment, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteTransitGatewayVpcAttachmentInput{} + } + + output = &DeleteTransitGatewayVpcAttachmentOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteTransitGatewayVpcAttachment API operation for Amazon Elastic Compute Cloud. +// +// Deletes the specified VPC 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 DeleteTransitGatewayVpcAttachment for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTransitGatewayVpcAttachment +func (c *EC2) DeleteTransitGatewayVpcAttachment(input *DeleteTransitGatewayVpcAttachmentInput) (*DeleteTransitGatewayVpcAttachmentOutput, error) { + req, out := c.DeleteTransitGatewayVpcAttachmentRequest(input) + return out, req.Send() +} + +// DeleteTransitGatewayVpcAttachmentWithContext is the same as DeleteTransitGatewayVpcAttachment with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteTransitGatewayVpcAttachment 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) DeleteTransitGatewayVpcAttachmentWithContext(ctx aws.Context, input *DeleteTransitGatewayVpcAttachmentInput, opts ...request.Option) (*DeleteTransitGatewayVpcAttachmentOutput, error) { + req, out := c.DeleteTransitGatewayVpcAttachmentRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteVolume = "DeleteVolume" // DeleteVolumeRequest generates a "aws/request.Request" representing the // client's request for the DeleteVolume operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7631,8 +9204,7 @@ func (c *EC2) DeleteVolumeRequest(input *DeleteVolumeInput) (req *request.Reques output = &DeleteVolumeOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -7679,7 +9251,7 @@ const opDeleteVpc = "DeleteVpc" // DeleteVpcRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpc operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7713,8 +9285,7 @@ func (c *EC2) DeleteVpcRequest(input *DeleteVpcInput) (req *request.Request, out output = &DeleteVpcOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -7759,7 +9330,7 @@ const opDeleteVpcEndpointConnectionNotifications = "DeleteVpcEndpointConnectionN // DeleteVpcEndpointConnectionNotificationsRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpcEndpointConnectionNotifications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7833,7 +9404,7 @@ const opDeleteVpcEndpointServiceConfigurations = "DeleteVpcEndpointServiceConfig // DeleteVpcEndpointServiceConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpcEndpointServiceConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7910,7 +9481,7 @@ const opDeleteVpcEndpoints = "DeleteVpcEndpoints" // DeleteVpcEndpointsRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpcEndpoints operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7987,7 +9558,7 @@ const opDeleteVpcPeeringConnection = "DeleteVpcPeeringConnection" // DeleteVpcPeeringConnectionRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpcPeeringConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8065,7 +9636,7 @@ const opDeleteVpnConnection = "DeleteVpnConnection" // DeleteVpnConnectionRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpnConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8099,8 +9670,7 @@ func (c *EC2) DeleteVpnConnectionRequest(input *DeleteVpnConnectionInput) (req * output = &DeleteVpnConnectionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -8150,7 +9720,7 @@ const opDeleteVpnConnectionRoute = "DeleteVpnConnectionRoute" // DeleteVpnConnectionRouteRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpnConnectionRoute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8184,8 +9754,7 @@ func (c *EC2) DeleteVpnConnectionRouteRequest(input *DeleteVpnConnectionRouteInp output = &DeleteVpnConnectionRouteOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -8229,7 +9798,7 @@ const opDeleteVpnGateway = "DeleteVpnGateway" // DeleteVpnGatewayRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpnGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8263,8 +9832,7 @@ func (c *EC2) DeleteVpnGatewayRequest(input *DeleteVpnGatewayInput) (req *reques output = &DeleteVpnGatewayOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -8304,12 +9872,92 @@ func (c *EC2) DeleteVpnGatewayWithContext(ctx aws.Context, input *DeleteVpnGatew return out, req.Send() } +const opDeprovisionByoipCidr = "DeprovisionByoipCidr" + +// DeprovisionByoipCidrRequest generates a "aws/request.Request" representing the +// client's request for the DeprovisionByoipCidr 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 DeprovisionByoipCidr for more information on using the DeprovisionByoipCidr +// 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 DeprovisionByoipCidrRequest method. +// req, resp := client.DeprovisionByoipCidrRequest(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/DeprovisionByoipCidr +func (c *EC2) DeprovisionByoipCidrRequest(input *DeprovisionByoipCidrInput) (req *request.Request, output *DeprovisionByoipCidrOutput) { + op := &request.Operation{ + Name: opDeprovisionByoipCidr, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeprovisionByoipCidrInput{} + } + + output = &DeprovisionByoipCidrOutput{} + req = c.newRequest(op, input, output) + return +} + +// 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. +// +// 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 +// address range. +// +// 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 DeprovisionByoipCidr for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeprovisionByoipCidr +func (c *EC2) DeprovisionByoipCidr(input *DeprovisionByoipCidrInput) (*DeprovisionByoipCidrOutput, error) { + req, out := c.DeprovisionByoipCidrRequest(input) + return out, req.Send() +} + +// DeprovisionByoipCidrWithContext is the same as DeprovisionByoipCidr with the addition of +// the ability to pass a context and additional request options. +// +// See DeprovisionByoipCidr 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) DeprovisionByoipCidrWithContext(ctx aws.Context, input *DeprovisionByoipCidrInput, opts ...request.Option) (*DeprovisionByoipCidrOutput, error) { + req, out := c.DeprovisionByoipCidrRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeregisterImage = "DeregisterImage" // DeregisterImageRequest generates a "aws/request.Request" representing the // client's request for the DeregisterImage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8343,8 +9991,7 @@ func (c *EC2) DeregisterImageRequest(input *DeregisterImageInput) (req *request. output = &DeregisterImageOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -8393,7 +10040,7 @@ const opDescribeAccountAttributes = "DescribeAccountAttributes" // DescribeAccountAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAccountAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8485,7 +10132,7 @@ const opDescribeAddresses = "DescribeAddresses" // DescribeAddressesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAddresses operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8563,7 +10210,7 @@ const opDescribeAggregateIdFormat = "DescribeAggregateIdFormat" // DescribeAggregateIdFormatRequest generates a "aws/request.Request" representing the // client's request for the DescribeAggregateIdFormat operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8651,7 +10298,7 @@ const opDescribeAvailabilityZones = "DescribeAvailabilityZones" // DescribeAvailabilityZonesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAvailabilityZones operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8731,7 +10378,7 @@ const opDescribeBundleTasks = "DescribeBundleTasks" // DescribeBundleTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeBundleTasks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8805,12 +10452,164 @@ func (c *EC2) DescribeBundleTasksWithContext(ctx aws.Context, input *DescribeBun return out, req.Send() } +const opDescribeByoipCidrs = "DescribeByoipCidrs" + +// DescribeByoipCidrsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeByoipCidrs 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 DescribeByoipCidrs for more information on using the DescribeByoipCidrs +// 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 DescribeByoipCidrsRequest method. +// req, resp := client.DescribeByoipCidrsRequest(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/DescribeByoipCidrs +func (c *EC2) DescribeByoipCidrsRequest(input *DescribeByoipCidrsInput) (req *request.Request, output *DescribeByoipCidrsOutput) { + op := &request.Operation{ + Name: opDescribeByoipCidrs, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeByoipCidrsInput{} + } + + output = &DescribeByoipCidrsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeByoipCidrs API operation for Amazon Elastic Compute Cloud. +// +// Describes the IP address ranges that were specified in calls to ProvisionByoipCidr. +// +// To describe the address pools that were created when you provisioned the +// address ranges, use DescribePublicIpv4Pools. +// +// 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 DescribeByoipCidrs for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeByoipCidrs +func (c *EC2) DescribeByoipCidrs(input *DescribeByoipCidrsInput) (*DescribeByoipCidrsOutput, error) { + req, out := c.DescribeByoipCidrsRequest(input) + return out, req.Send() +} + +// DescribeByoipCidrsWithContext is the same as DescribeByoipCidrs with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeByoipCidrs 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) DescribeByoipCidrsWithContext(ctx aws.Context, input *DescribeByoipCidrsInput, opts ...request.Option) (*DescribeByoipCidrsOutput, error) { + req, out := c.DescribeByoipCidrsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeCapacityReservations = "DescribeCapacityReservations" + +// DescribeCapacityReservationsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeCapacityReservations 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 DescribeCapacityReservations for more information on using the DescribeCapacityReservations +// 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 DescribeCapacityReservationsRequest method. +// req, resp := client.DescribeCapacityReservationsRequest(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/DescribeCapacityReservations +func (c *EC2) DescribeCapacityReservationsRequest(input *DescribeCapacityReservationsInput) (req *request.Request, output *DescribeCapacityReservationsOutput) { + op := &request.Operation{ + Name: opDescribeCapacityReservations, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeCapacityReservationsInput{} + } + + output = &DescribeCapacityReservationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// 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. +// +// 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 DescribeCapacityReservations for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeCapacityReservations +func (c *EC2) DescribeCapacityReservations(input *DescribeCapacityReservationsInput) (*DescribeCapacityReservationsOutput, error) { + req, out := c.DescribeCapacityReservationsRequest(input) + return out, req.Send() +} + +// DescribeCapacityReservationsWithContext is the same as DescribeCapacityReservations with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeCapacityReservations 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) DescribeCapacityReservationsWithContext(ctx aws.Context, input *DescribeCapacityReservationsInput, opts ...request.Option) (*DescribeCapacityReservationsOutput, error) { + req, out := c.DescribeCapacityReservationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeClassicLinkInstances = "DescribeClassicLinkInstances" // DescribeClassicLinkInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeClassicLinkInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8882,12 +10681,383 @@ func (c *EC2) DescribeClassicLinkInstancesWithContext(ctx aws.Context, input *De return out, req.Send() } +const opDescribeClientVpnAuthorizationRules = "DescribeClientVpnAuthorizationRules" + +// DescribeClientVpnAuthorizationRulesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeClientVpnAuthorizationRules 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 DescribeClientVpnAuthorizationRules for more information on using the DescribeClientVpnAuthorizationRules +// 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 DescribeClientVpnAuthorizationRulesRequest method. +// req, resp := client.DescribeClientVpnAuthorizationRulesRequest(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/DescribeClientVpnAuthorizationRules +func (c *EC2) DescribeClientVpnAuthorizationRulesRequest(input *DescribeClientVpnAuthorizationRulesInput) (req *request.Request, output *DescribeClientVpnAuthorizationRulesOutput) { + op := &request.Operation{ + Name: opDescribeClientVpnAuthorizationRules, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeClientVpnAuthorizationRulesInput{} + } + + output = &DescribeClientVpnAuthorizationRulesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeClientVpnAuthorizationRules API operation for Amazon Elastic Compute Cloud. +// +// Describes the authorization rules for a specified Client VPN endpoint. +// +// 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 DescribeClientVpnAuthorizationRules for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClientVpnAuthorizationRules +func (c *EC2) DescribeClientVpnAuthorizationRules(input *DescribeClientVpnAuthorizationRulesInput) (*DescribeClientVpnAuthorizationRulesOutput, error) { + req, out := c.DescribeClientVpnAuthorizationRulesRequest(input) + return out, req.Send() +} + +// DescribeClientVpnAuthorizationRulesWithContext is the same as DescribeClientVpnAuthorizationRules with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeClientVpnAuthorizationRules 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) DescribeClientVpnAuthorizationRulesWithContext(ctx aws.Context, input *DescribeClientVpnAuthorizationRulesInput, opts ...request.Option) (*DescribeClientVpnAuthorizationRulesOutput, error) { + req, out := c.DescribeClientVpnAuthorizationRulesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeClientVpnConnections = "DescribeClientVpnConnections" + +// DescribeClientVpnConnectionsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeClientVpnConnections 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 DescribeClientVpnConnections for more information on using the DescribeClientVpnConnections +// 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 DescribeClientVpnConnectionsRequest method. +// req, resp := client.DescribeClientVpnConnectionsRequest(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/DescribeClientVpnConnections +func (c *EC2) DescribeClientVpnConnectionsRequest(input *DescribeClientVpnConnectionsInput) (req *request.Request, output *DescribeClientVpnConnectionsOutput) { + op := &request.Operation{ + Name: opDescribeClientVpnConnections, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeClientVpnConnectionsInput{} + } + + output = &DescribeClientVpnConnectionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeClientVpnConnections API operation for Amazon Elastic Compute Cloud. +// +// Describes active client connections and connections that have been terminated +// within the last 60 minutes for the specified Client VPN endpoint. +// +// 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 DescribeClientVpnConnections for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClientVpnConnections +func (c *EC2) DescribeClientVpnConnections(input *DescribeClientVpnConnectionsInput) (*DescribeClientVpnConnectionsOutput, error) { + req, out := c.DescribeClientVpnConnectionsRequest(input) + return out, req.Send() +} + +// DescribeClientVpnConnectionsWithContext is the same as DescribeClientVpnConnections with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeClientVpnConnections 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) DescribeClientVpnConnectionsWithContext(ctx aws.Context, input *DescribeClientVpnConnectionsInput, opts ...request.Option) (*DescribeClientVpnConnectionsOutput, error) { + req, out := c.DescribeClientVpnConnectionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeClientVpnEndpoints = "DescribeClientVpnEndpoints" + +// DescribeClientVpnEndpointsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeClientVpnEndpoints 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 DescribeClientVpnEndpoints for more information on using the DescribeClientVpnEndpoints +// 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 DescribeClientVpnEndpointsRequest method. +// req, resp := client.DescribeClientVpnEndpointsRequest(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/DescribeClientVpnEndpoints +func (c *EC2) DescribeClientVpnEndpointsRequest(input *DescribeClientVpnEndpointsInput) (req *request.Request, output *DescribeClientVpnEndpointsOutput) { + op := &request.Operation{ + Name: opDescribeClientVpnEndpoints, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeClientVpnEndpointsInput{} + } + + output = &DescribeClientVpnEndpointsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeClientVpnEndpoints API operation for Amazon Elastic Compute Cloud. +// +// Describes one or more Client VPN endpoints in the 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 Amazon Elastic Compute Cloud's +// API operation DescribeClientVpnEndpoints for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClientVpnEndpoints +func (c *EC2) DescribeClientVpnEndpoints(input *DescribeClientVpnEndpointsInput) (*DescribeClientVpnEndpointsOutput, error) { + req, out := c.DescribeClientVpnEndpointsRequest(input) + return out, req.Send() +} + +// DescribeClientVpnEndpointsWithContext is the same as DescribeClientVpnEndpoints with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeClientVpnEndpoints 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) DescribeClientVpnEndpointsWithContext(ctx aws.Context, input *DescribeClientVpnEndpointsInput, opts ...request.Option) (*DescribeClientVpnEndpointsOutput, error) { + req, out := c.DescribeClientVpnEndpointsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeClientVpnRoutes = "DescribeClientVpnRoutes" + +// DescribeClientVpnRoutesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeClientVpnRoutes 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 DescribeClientVpnRoutes for more information on using the DescribeClientVpnRoutes +// 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 DescribeClientVpnRoutesRequest method. +// req, resp := client.DescribeClientVpnRoutesRequest(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/DescribeClientVpnRoutes +func (c *EC2) DescribeClientVpnRoutesRequest(input *DescribeClientVpnRoutesInput) (req *request.Request, output *DescribeClientVpnRoutesOutput) { + op := &request.Operation{ + Name: opDescribeClientVpnRoutes, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeClientVpnRoutesInput{} + } + + output = &DescribeClientVpnRoutesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeClientVpnRoutes API operation for Amazon Elastic Compute Cloud. +// +// Describes the routes for the specified Client VPN endpoint. +// +// 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 DescribeClientVpnRoutes for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClientVpnRoutes +func (c *EC2) DescribeClientVpnRoutes(input *DescribeClientVpnRoutesInput) (*DescribeClientVpnRoutesOutput, error) { + req, out := c.DescribeClientVpnRoutesRequest(input) + return out, req.Send() +} + +// DescribeClientVpnRoutesWithContext is the same as DescribeClientVpnRoutes with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeClientVpnRoutes 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) DescribeClientVpnRoutesWithContext(ctx aws.Context, input *DescribeClientVpnRoutesInput, opts ...request.Option) (*DescribeClientVpnRoutesOutput, error) { + req, out := c.DescribeClientVpnRoutesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeClientVpnTargetNetworks = "DescribeClientVpnTargetNetworks" + +// DescribeClientVpnTargetNetworksRequest generates a "aws/request.Request" representing the +// client's request for the DescribeClientVpnTargetNetworks 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 DescribeClientVpnTargetNetworks for more information on using the DescribeClientVpnTargetNetworks +// 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 DescribeClientVpnTargetNetworksRequest method. +// req, resp := client.DescribeClientVpnTargetNetworksRequest(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/DescribeClientVpnTargetNetworks +func (c *EC2) DescribeClientVpnTargetNetworksRequest(input *DescribeClientVpnTargetNetworksInput) (req *request.Request, output *DescribeClientVpnTargetNetworksOutput) { + op := &request.Operation{ + Name: opDescribeClientVpnTargetNetworks, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeClientVpnTargetNetworksInput{} + } + + output = &DescribeClientVpnTargetNetworksOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeClientVpnTargetNetworks API operation for Amazon Elastic Compute Cloud. +// +// Describes the target networks associated with the specified Client VPN endpoint. +// +// 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 DescribeClientVpnTargetNetworks for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeClientVpnTargetNetworks +func (c *EC2) DescribeClientVpnTargetNetworks(input *DescribeClientVpnTargetNetworksInput) (*DescribeClientVpnTargetNetworksOutput, error) { + req, out := c.DescribeClientVpnTargetNetworksRequest(input) + return out, req.Send() +} + +// DescribeClientVpnTargetNetworksWithContext is the same as DescribeClientVpnTargetNetworks with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeClientVpnTargetNetworks 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) DescribeClientVpnTargetNetworksWithContext(ctx aws.Context, input *DescribeClientVpnTargetNetworksInput, opts ...request.Option) (*DescribeClientVpnTargetNetworksOutput, error) { + req, out := c.DescribeClientVpnTargetNetworksRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeConversionTasks = "DescribeConversionTasks" // DescribeConversionTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeConversionTasks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8965,7 +11135,7 @@ const opDescribeCustomerGateways = "DescribeCustomerGateways" // DescribeCustomerGatewaysRequest generates a "aws/request.Request" representing the // client's request for the DescribeCustomerGateways operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9043,7 +11213,7 @@ const opDescribeDhcpOptions = "DescribeDhcpOptions" // DescribeDhcpOptionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDhcpOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9120,7 +11290,7 @@ const opDescribeEgressOnlyInternetGateways = "DescribeEgressOnlyInternetGateways // DescribeEgressOnlyInternetGatewaysRequest generates a "aws/request.Request" representing the // client's request for the DescribeEgressOnlyInternetGateways operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9194,7 +11364,7 @@ const opDescribeElasticGpus = "DescribeElasticGpus" // DescribeElasticGpusRequest generates a "aws/request.Request" representing the // client's request for the DescribeElasticGpus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9233,8 +11403,9 @@ func (c *EC2) DescribeElasticGpusRequest(input *DescribeElasticGpusInput) (req * // DescribeElasticGpus API operation for Amazon Elastic Compute Cloud. // -// Describes the Elastic GPUs associated with your instances. For more information -// about Elastic GPUs, see Amazon EC2 Elastic GPUs (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-gpus.html). +// Describes the Elastic Graphics accelerator associated with your instances. +// For more information about Elastic Graphics, see Amazon Elastic Graphics +// (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-graphics.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 @@ -9269,7 +11440,7 @@ const opDescribeExportTasks = "DescribeExportTasks" // DescribeExportTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeExportTasks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9343,7 +11514,7 @@ const opDescribeFleetHistory = "DescribeFleetHistory" // DescribeFleetHistoryRequest generates a "aws/request.Request" representing the // client's request for the DescribeFleetHistory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9417,7 +11588,7 @@ const opDescribeFleetInstances = "DescribeFleetInstances" // DescribeFleetInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeFleetInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9491,7 +11662,7 @@ const opDescribeFleets = "DescribeFleets" // DescribeFleetsRequest generates a "aws/request.Request" representing the // client's request for the DescribeFleets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9530,7 +11701,7 @@ func (c *EC2) DescribeFleetsRequest(input *DescribeFleetsInput) (req *request.Re // DescribeFleets API operation for Amazon Elastic Compute Cloud. // -// Describes one or more of your EC2 Fleet. +// Describes one or more of your EC2 Fleets. // // 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 @@ -9565,7 +11736,7 @@ const opDescribeFlowLogs = "DescribeFlowLogs" // DescribeFlowLogsRequest generates a "aws/request.Request" representing the // client's request for the DescribeFlowLogs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9641,7 +11812,7 @@ const opDescribeFpgaImageAttribute = "DescribeFpgaImageAttribute" // DescribeFpgaImageAttributeRequest generates a "aws/request.Request" representing the // client's request for the DescribeFpgaImageAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9715,7 +11886,7 @@ const opDescribeFpgaImages = "DescribeFpgaImages" // DescribeFpgaImagesRequest generates a "aws/request.Request" representing the // client's request for the DescribeFpgaImages operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9791,7 +11962,7 @@ const opDescribeHostReservationOfferings = "DescribeHostReservationOfferings" // DescribeHostReservationOfferingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeHostReservationOfferings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9833,10 +12004,10 @@ func (c *EC2) DescribeHostReservationOfferingsRequest(input *DescribeHostReserva // Describes the Dedicated Host reservations that are available to purchase. // // The results describe all the Dedicated Host reservation offerings, including -// offerings that may not match the instance family and region of your Dedicated +// offerings that may not match the instance family and Region of your Dedicated // 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 +// associated. For more information about supported instance types, see Dedicated // Hosts Overview (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-overview.html) // in the Amazon Elastic Compute Cloud User Guide. // @@ -9873,7 +12044,7 @@ const opDescribeHostReservations = "DescribeHostReservations" // DescribeHostReservationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeHostReservations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9947,7 +12118,7 @@ const opDescribeHosts = "DescribeHosts" // DescribeHostsRequest generates a "aws/request.Request" representing the // client's request for the DescribeHosts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9988,7 +12159,7 @@ func (c *EC2) DescribeHostsRequest(input *DescribeHostsInput) (req *request.Requ // // Describes one or more of your Dedicated Hosts. // -// The results describe only the Dedicated Hosts in the region you're currently +// The results describe only the Dedicated Hosts in the Region you're currently // using. All listed instances consume capacity on your Dedicated Host. Dedicated // Hosts that have recently been released are listed with the state released. // @@ -10025,7 +12196,7 @@ const opDescribeIamInstanceProfileAssociations = "DescribeIamInstanceProfileAsso // DescribeIamInstanceProfileAssociationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeIamInstanceProfileAssociations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10099,7 +12270,7 @@ const opDescribeIdFormat = "DescribeIdFormat" // DescribeIdFormatRequest generates a "aws/request.Request" representing the // client's request for the DescribeIdFormat operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10191,7 +12362,7 @@ const opDescribeIdentityIdFormat = "DescribeIdentityIdFormat" // DescribeIdentityIdFormatRequest generates a "aws/request.Request" representing the // client's request for the DescribeIdentityIdFormat operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10281,7 +12452,7 @@ const opDescribeImageAttribute = "DescribeImageAttribute" // DescribeImageAttributeRequest generates a "aws/request.Request" representing the // client's request for the DescribeImageAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10356,7 +12527,7 @@ const opDescribeImages = "DescribeImages" // DescribeImagesRequest generates a "aws/request.Request" representing the // client's request for the DescribeImages operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10436,7 +12607,7 @@ const opDescribeImportImageTasks = "DescribeImportImageTasks" // DescribeImportImageTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeImportImageTasks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10511,7 +12682,7 @@ const opDescribeImportSnapshotTasks = "DescribeImportSnapshotTasks" // DescribeImportSnapshotTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeImportSnapshotTasks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10585,7 +12756,7 @@ const opDescribeInstanceAttribute = "DescribeInstanceAttribute" // DescribeInstanceAttributeRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstanceAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10663,7 +12834,7 @@ const opDescribeInstanceCreditSpecifications = "DescribeInstanceCreditSpecificat // DescribeInstanceCreditSpecificationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstanceCreditSpecifications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10702,14 +12873,19 @@ func (c *EC2) DescribeInstanceCreditSpecificationsRequest(input *DescribeInstanc // DescribeInstanceCreditSpecifications API operation for Amazon Elastic Compute Cloud. // -// Describes the credit option for CPU usage of one or more of your T2 instances. -// The credit options are standard and unlimited. +// Describes the credit option for CPU usage of one or more of your T2 or T3 +// instances. The credit options are standard and unlimited. // -// If you do not specify an instance ID, Amazon EC2 returns only the T2 instances -// with the unlimited credit option. If you specify one or more instance IDs, -// Amazon EC2 returns the credit option (standard or unlimited) of those instances. -// If you specify an instance ID that is not valid, such as an instance that -// is not a T2 instance, an error is returned. +// If you do not specify an instance ID, Amazon EC2 returns T2 and T3 instances +// with the unlimited credit option, as well as instances that were previously +// configured as T2 or T3 with the unlimited credit option. For example, if +// you resize a T2 instance, while it is configured as unlimited, to an M4 instance, +// Amazon EC2 returns the M4 instance. +// +// If you specify one or more instance IDs, Amazon EC2 returns the credit option +// (standard or unlimited) of those instances. If you specify an instance ID +// that is not valid, such as an instance that is not a T2 or T3 instance, an +// error is returned. // // Recently terminated instances might appear in the returned results. This // interval is usually less than one hour. @@ -10719,7 +12895,7 @@ func (c *EC2) DescribeInstanceCreditSpecificationsRequest(input *DescribeInstanc // all, the call fails. If you specify only instance IDs in an unaffected zone, // the call works normally. // -// For more information, see T2 Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-instances.html) +// For more information, see Burstable Performance Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html) // in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -10755,7 +12931,7 @@ const opDescribeInstanceStatus = "DescribeInstanceStatus" // DescribeInstanceStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstanceStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10906,7 +13082,7 @@ const opDescribeInstances = "DescribeInstances" // DescribeInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11051,7 +13227,7 @@ const opDescribeInternetGateways = "DescribeInternetGateways" // DescribeInternetGatewaysRequest generates a "aws/request.Request" representing the // client's request for the DescribeInternetGateways operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11125,7 +13301,7 @@ const opDescribeKeyPairs = "DescribeKeyPairs" // DescribeKeyPairsRequest generates a "aws/request.Request" representing the // client's request for the DescribeKeyPairs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11202,7 +13378,7 @@ const opDescribeLaunchTemplateVersions = "DescribeLaunchTemplateVersions" // DescribeLaunchTemplateVersionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeLaunchTemplateVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11277,7 +13453,7 @@ const opDescribeLaunchTemplates = "DescribeLaunchTemplates" // DescribeLaunchTemplatesRequest generates a "aws/request.Request" representing the // client's request for the DescribeLaunchTemplates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11351,7 +13527,7 @@ const opDescribeMovingAddresses = "DescribeMovingAddresses" // DescribeMovingAddressesRequest generates a "aws/request.Request" representing the // client's request for the DescribeMovingAddresses operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11427,7 +13603,7 @@ const opDescribeNatGateways = "DescribeNatGateways" // DescribeNatGatewaysRequest generates a "aws/request.Request" representing the // client's request for the DescribeNatGateways operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11557,7 +13733,7 @@ const opDescribeNetworkAcls = "DescribeNetworkAcls" // DescribeNetworkAclsRequest generates a "aws/request.Request" representing the // client's request for the DescribeNetworkAcls operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11634,7 +13810,7 @@ const opDescribeNetworkInterfaceAttribute = "DescribeNetworkInterfaceAttribute" // DescribeNetworkInterfaceAttributeRequest generates a "aws/request.Request" representing the // client's request for the DescribeNetworkInterfaceAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11709,7 +13885,7 @@ const opDescribeNetworkInterfacePermissions = "DescribeNetworkInterfacePermissio // DescribeNetworkInterfacePermissionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeNetworkInterfacePermissions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11783,7 +13959,7 @@ const opDescribeNetworkInterfaces = "DescribeNetworkInterfaces" // DescribeNetworkInterfacesRequest generates a "aws/request.Request" representing the // client's request for the DescribeNetworkInterfaces operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11809,6 +13985,12 @@ func (c *EC2) DescribeNetworkInterfacesRequest(input *DescribeNetworkInterfacesI Name: opDescribeNetworkInterfaces, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -11852,12 +14034,62 @@ func (c *EC2) DescribeNetworkInterfacesWithContext(ctx aws.Context, input *Descr return out, req.Send() } +// DescribeNetworkInterfacesPages iterates over the pages of a DescribeNetworkInterfaces operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeNetworkInterfaces 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 DescribeNetworkInterfaces operation. +// pageNum := 0 +// err := client.DescribeNetworkInterfacesPages(params, +// func(page *DescribeNetworkInterfacesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *EC2) DescribeNetworkInterfacesPages(input *DescribeNetworkInterfacesInput, fn func(*DescribeNetworkInterfacesOutput, bool) bool) error { + return c.DescribeNetworkInterfacesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeNetworkInterfacesPagesWithContext same as DescribeNetworkInterfacesPages 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) DescribeNetworkInterfacesPagesWithContext(ctx aws.Context, input *DescribeNetworkInterfacesInput, fn func(*DescribeNetworkInterfacesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeNetworkInterfacesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeNetworkInterfacesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeNetworkInterfacesOutput), !p.HasNextPage()) + } + return p.Err() +} + const opDescribePlacementGroups = "DescribePlacementGroups" // DescribePlacementGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribePlacementGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11933,7 +14165,7 @@ const opDescribePrefixLists = "DescribePrefixLists" // DescribePrefixListsRequest generates a "aws/request.Request" representing the // client's request for the DescribePrefixLists operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12012,7 +14244,7 @@ const opDescribePrincipalIdFormat = "DescribePrincipalIdFormat" // DescribePrincipalIdFormatRequest generates a "aws/request.Request" representing the // client's request for the DescribePrincipalIdFormat operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12095,12 +14327,86 @@ func (c *EC2) DescribePrincipalIdFormatWithContext(ctx aws.Context, input *Descr return out, req.Send() } +const opDescribePublicIpv4Pools = "DescribePublicIpv4Pools" + +// DescribePublicIpv4PoolsRequest generates a "aws/request.Request" representing the +// client's request for the DescribePublicIpv4Pools 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 DescribePublicIpv4Pools for more information on using the DescribePublicIpv4Pools +// 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 DescribePublicIpv4PoolsRequest method. +// req, resp := client.DescribePublicIpv4PoolsRequest(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/DescribePublicIpv4Pools +func (c *EC2) DescribePublicIpv4PoolsRequest(input *DescribePublicIpv4PoolsInput) (req *request.Request, output *DescribePublicIpv4PoolsOutput) { + op := &request.Operation{ + Name: opDescribePublicIpv4Pools, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribePublicIpv4PoolsInput{} + } + + output = &DescribePublicIpv4PoolsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribePublicIpv4Pools API operation for Amazon Elastic Compute Cloud. +// +// Describes the specified IPv4 address pools. +// +// 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 DescribePublicIpv4Pools for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribePublicIpv4Pools +func (c *EC2) DescribePublicIpv4Pools(input *DescribePublicIpv4PoolsInput) (*DescribePublicIpv4PoolsOutput, error) { + req, out := c.DescribePublicIpv4PoolsRequest(input) + return out, req.Send() +} + +// DescribePublicIpv4PoolsWithContext is the same as DescribePublicIpv4Pools with the addition of +// the ability to pass a context and additional request options. +// +// See DescribePublicIpv4Pools 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) DescribePublicIpv4PoolsWithContext(ctx aws.Context, input *DescribePublicIpv4PoolsInput, opts ...request.Option) (*DescribePublicIpv4PoolsOutput, error) { + req, out := c.DescribePublicIpv4PoolsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeRegions = "DescribeRegions" // DescribeRegionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeRegions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12177,7 +14483,7 @@ const opDescribeReservedInstances = "DescribeReservedInstances" // DescribeReservedInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12254,7 +14560,7 @@ const opDescribeReservedInstancesListings = "DescribeReservedInstancesListings" // DescribeReservedInstancesListingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedInstancesListings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12349,7 +14655,7 @@ const opDescribeReservedInstancesModifications = "DescribeReservedInstancesModif // DescribeReservedInstancesModificationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedInstancesModifications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12485,7 +14791,7 @@ const opDescribeReservedInstancesOfferings = "DescribeReservedInstancesOfferings // DescribeReservedInstancesOfferingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedInstancesOfferings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12626,7 +14932,7 @@ const opDescribeRouteTables = "DescribeRouteTables" // DescribeRouteTablesRequest generates a "aws/request.Request" representing the // client's request for the DescribeRouteTables operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12652,6 +14958,12 @@ func (c *EC2) DescribeRouteTablesRequest(input *DescribeRouteTablesInput) (req * Name: opDescribeRouteTables, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -12703,12 +15015,62 @@ func (c *EC2) DescribeRouteTablesWithContext(ctx aws.Context, input *DescribeRou return out, req.Send() } +// DescribeRouteTablesPages iterates over the pages of a DescribeRouteTables operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeRouteTables 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 DescribeRouteTables operation. +// pageNum := 0 +// err := client.DescribeRouteTablesPages(params, +// func(page *DescribeRouteTablesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *EC2) DescribeRouteTablesPages(input *DescribeRouteTablesInput, fn func(*DescribeRouteTablesOutput, bool) bool) error { + return c.DescribeRouteTablesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeRouteTablesPagesWithContext same as DescribeRouteTablesPages 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) DescribeRouteTablesPagesWithContext(ctx aws.Context, input *DescribeRouteTablesInput, fn func(*DescribeRouteTablesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeRouteTablesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeRouteTablesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeRouteTablesOutput), !p.HasNextPage()) + } + return p.Err() +} + const opDescribeScheduledInstanceAvailability = "DescribeScheduledInstanceAvailability" // DescribeScheduledInstanceAvailabilityRequest generates a "aws/request.Request" representing the // client's request for the DescribeScheduledInstanceAvailability operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12790,7 +15152,7 @@ const opDescribeScheduledInstances = "DescribeScheduledInstances" // DescribeScheduledInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeScheduledInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12864,7 +15226,7 @@ const opDescribeSecurityGroupReferences = "DescribeSecurityGroupReferences" // DescribeSecurityGroupReferencesRequest generates a "aws/request.Request" representing the // client's request for the DescribeSecurityGroupReferences operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12939,7 +15301,7 @@ const opDescribeSecurityGroups = "DescribeSecurityGroups" // DescribeSecurityGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSecurityGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12965,6 +15327,12 @@ func (c *EC2) DescribeSecurityGroupsRequest(input *DescribeSecurityGroupsInput) Name: opDescribeSecurityGroups, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -13015,12 +15383,62 @@ func (c *EC2) DescribeSecurityGroupsWithContext(ctx aws.Context, input *Describe return out, req.Send() } +// DescribeSecurityGroupsPages iterates over the pages of a DescribeSecurityGroups operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeSecurityGroups 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 DescribeSecurityGroups operation. +// pageNum := 0 +// err := client.DescribeSecurityGroupsPages(params, +// func(page *DescribeSecurityGroupsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *EC2) DescribeSecurityGroupsPages(input *DescribeSecurityGroupsInput, fn func(*DescribeSecurityGroupsOutput, bool) bool) error { + return c.DescribeSecurityGroupsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeSecurityGroupsPagesWithContext same as DescribeSecurityGroupsPages 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) DescribeSecurityGroupsPagesWithContext(ctx aws.Context, input *DescribeSecurityGroupsInput, fn func(*DescribeSecurityGroupsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeSecurityGroupsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeSecurityGroupsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeSecurityGroupsOutput), !p.HasNextPage()) + } + return p.Err() +} + const opDescribeSnapshotAttribute = "DescribeSnapshotAttribute" // DescribeSnapshotAttributeRequest generates a "aws/request.Request" representing the // client's request for the DescribeSnapshotAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -13098,7 +15516,7 @@ const opDescribeSnapshots = "DescribeSnapshots" // DescribeSnapshotsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSnapshots operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -13273,7 +15691,7 @@ const opDescribeSpotDatafeedSubscription = "DescribeSpotDatafeedSubscription" // DescribeSpotDatafeedSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the DescribeSpotDatafeedSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -13349,7 +15767,7 @@ const opDescribeSpotFleetInstances = "DescribeSpotFleetInstances" // DescribeSpotFleetInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeSpotFleetInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -13423,7 +15841,7 @@ const opDescribeSpotFleetRequestHistory = "DescribeSpotFleetRequestHistory" // DescribeSpotFleetRequestHistoryRequest generates a "aws/request.Request" representing the // client's request for the DescribeSpotFleetRequestHistory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -13467,7 +15885,7 @@ func (c *EC2) DescribeSpotFleetRequestHistoryRequest(input *DescribeSpotFleetReq // // Spot Fleet events are delayed by up to 30 seconds before they can be described. // This ensures that you can query by the last evaluated time and not miss a -// recorded event. +// recorded event. Spot Fleet events are available for 48 hours. // // 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 @@ -13502,7 +15920,7 @@ const opDescribeSpotFleetRequests = "DescribeSpotFleetRequests" // DescribeSpotFleetRequestsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSpotFleetRequests operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -13635,7 +16053,7 @@ const opDescribeSpotInstanceRequests = "DescribeSpotInstanceRequests" // DescribeSpotInstanceRequestsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSpotInstanceRequests operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -13682,6 +16100,13 @@ func (c *EC2) DescribeSpotInstanceRequestsRequest(input *DescribeSpotInstanceReq // instance. Alternatively, you can use DescribeInstances with a filter to look // for instances where the instance lifecycle is spot. // +// We recommend that you set MaxResults to a value between 5 and 1000 to limit +// the number of results returned. This paginates the output, which makes the +// list more manageable and returns the results faster. If the list of results +// exceeds your MaxResults value, then that number of results is returned along +// with a NextToken value that can be passed to a subsequent DescribeSpotInstanceRequests +// request to retrieve the remaining results. +// // Spot Instance requests are deleted four hours after they are canceled and // their instances are terminated. // @@ -13718,7 +16143,7 @@ const opDescribeSpotPriceHistory = "DescribeSpotPriceHistory" // DescribeSpotPriceHistoryRequest generates a "aws/request.Request" representing the // client's request for the DescribeSpotPriceHistory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -13855,7 +16280,7 @@ const opDescribeStaleSecurityGroups = "DescribeStaleSecurityGroups" // DescribeStaleSecurityGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeStaleSecurityGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -13932,7 +16357,7 @@ const opDescribeSubnets = "DescribeSubnets" // DescribeSubnetsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSubnets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -14009,7 +16434,7 @@ const opDescribeTags = "DescribeTags" // DescribeTagsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -14137,12 +16562,314 @@ func (c *EC2) DescribeTagsPagesWithContext(ctx aws.Context, input *DescribeTagsI return p.Err() } +const opDescribeTransitGatewayAttachments = "DescribeTransitGatewayAttachments" + +// DescribeTransitGatewayAttachmentsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeTransitGatewayAttachments 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 DescribeTransitGatewayAttachments for more information on using the DescribeTransitGatewayAttachments +// 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 DescribeTransitGatewayAttachmentsRequest method. +// req, resp := client.DescribeTransitGatewayAttachmentsRequest(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/DescribeTransitGatewayAttachments +func (c *EC2) DescribeTransitGatewayAttachmentsRequest(input *DescribeTransitGatewayAttachmentsInput) (req *request.Request, output *DescribeTransitGatewayAttachmentsOutput) { + op := &request.Operation{ + Name: opDescribeTransitGatewayAttachments, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeTransitGatewayAttachmentsInput{} + } + + output = &DescribeTransitGatewayAttachmentsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeTransitGatewayAttachments API operation for Amazon Elastic Compute Cloud. +// +// Describes one or more attachments between resources and transit gateways. +// By default, all attachments are described. Alternatively, you can filter +// the results by attachment ID, attachment state, resource ID, or resource +// owner. +// +// 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 DescribeTransitGatewayAttachments for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTransitGatewayAttachments +func (c *EC2) DescribeTransitGatewayAttachments(input *DescribeTransitGatewayAttachmentsInput) (*DescribeTransitGatewayAttachmentsOutput, error) { + req, out := c.DescribeTransitGatewayAttachmentsRequest(input) + return out, req.Send() +} + +// DescribeTransitGatewayAttachmentsWithContext is the same as DescribeTransitGatewayAttachments with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeTransitGatewayAttachments 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) DescribeTransitGatewayAttachmentsWithContext(ctx aws.Context, input *DescribeTransitGatewayAttachmentsInput, opts ...request.Option) (*DescribeTransitGatewayAttachmentsOutput, error) { + req, out := c.DescribeTransitGatewayAttachmentsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeTransitGatewayRouteTables = "DescribeTransitGatewayRouteTables" + +// DescribeTransitGatewayRouteTablesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeTransitGatewayRouteTables 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 DescribeTransitGatewayRouteTables for more information on using the DescribeTransitGatewayRouteTables +// 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 DescribeTransitGatewayRouteTablesRequest method. +// req, resp := client.DescribeTransitGatewayRouteTablesRequest(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/DescribeTransitGatewayRouteTables +func (c *EC2) DescribeTransitGatewayRouteTablesRequest(input *DescribeTransitGatewayRouteTablesInput) (req *request.Request, output *DescribeTransitGatewayRouteTablesOutput) { + op := &request.Operation{ + Name: opDescribeTransitGatewayRouteTables, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeTransitGatewayRouteTablesInput{} + } + + output = &DescribeTransitGatewayRouteTablesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeTransitGatewayRouteTables API operation for Amazon Elastic Compute Cloud. +// +// Describes one or more transit gateway route tables. By default, all transit +// gateway route tables are described. Alternatively, you can filter the results. +// +// 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 DescribeTransitGatewayRouteTables for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTransitGatewayRouteTables +func (c *EC2) DescribeTransitGatewayRouteTables(input *DescribeTransitGatewayRouteTablesInput) (*DescribeTransitGatewayRouteTablesOutput, error) { + req, out := c.DescribeTransitGatewayRouteTablesRequest(input) + return out, req.Send() +} + +// DescribeTransitGatewayRouteTablesWithContext is the same as DescribeTransitGatewayRouteTables with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeTransitGatewayRouteTables 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) DescribeTransitGatewayRouteTablesWithContext(ctx aws.Context, input *DescribeTransitGatewayRouteTablesInput, opts ...request.Option) (*DescribeTransitGatewayRouteTablesOutput, error) { + req, out := c.DescribeTransitGatewayRouteTablesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeTransitGatewayVpcAttachments = "DescribeTransitGatewayVpcAttachments" + +// DescribeTransitGatewayVpcAttachmentsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeTransitGatewayVpcAttachments 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 DescribeTransitGatewayVpcAttachments for more information on using the DescribeTransitGatewayVpcAttachments +// 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 DescribeTransitGatewayVpcAttachmentsRequest method. +// req, resp := client.DescribeTransitGatewayVpcAttachmentsRequest(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/DescribeTransitGatewayVpcAttachments +func (c *EC2) DescribeTransitGatewayVpcAttachmentsRequest(input *DescribeTransitGatewayVpcAttachmentsInput) (req *request.Request, output *DescribeTransitGatewayVpcAttachmentsOutput) { + op := &request.Operation{ + Name: opDescribeTransitGatewayVpcAttachments, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeTransitGatewayVpcAttachmentsInput{} + } + + output = &DescribeTransitGatewayVpcAttachmentsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeTransitGatewayVpcAttachments API operation for Amazon Elastic Compute Cloud. +// +// Describes one or more VPC attachments. By default, all VPC attachments are +// described. Alternatively, you can filter the results. +// +// 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 DescribeTransitGatewayVpcAttachments for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTransitGatewayVpcAttachments +func (c *EC2) DescribeTransitGatewayVpcAttachments(input *DescribeTransitGatewayVpcAttachmentsInput) (*DescribeTransitGatewayVpcAttachmentsOutput, error) { + req, out := c.DescribeTransitGatewayVpcAttachmentsRequest(input) + return out, req.Send() +} + +// DescribeTransitGatewayVpcAttachmentsWithContext is the same as DescribeTransitGatewayVpcAttachments with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeTransitGatewayVpcAttachments 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) DescribeTransitGatewayVpcAttachmentsWithContext(ctx aws.Context, input *DescribeTransitGatewayVpcAttachmentsInput, opts ...request.Option) (*DescribeTransitGatewayVpcAttachmentsOutput, error) { + req, out := c.DescribeTransitGatewayVpcAttachmentsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeTransitGateways = "DescribeTransitGateways" + +// DescribeTransitGatewaysRequest generates a "aws/request.Request" representing the +// client's request for the DescribeTransitGateways 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 DescribeTransitGateways for more information on using the DescribeTransitGateways +// 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 DescribeTransitGatewaysRequest method. +// req, resp := client.DescribeTransitGatewaysRequest(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/DescribeTransitGateways +func (c *EC2) DescribeTransitGatewaysRequest(input *DescribeTransitGatewaysInput) (req *request.Request, output *DescribeTransitGatewaysOutput) { + op := &request.Operation{ + Name: opDescribeTransitGateways, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeTransitGatewaysInput{} + } + + output = &DescribeTransitGatewaysOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeTransitGateways API operation for Amazon Elastic Compute Cloud. +// +// Describes one or more transit gateways. By default, all transit gateways +// are described. Alternatively, you can filter the results. +// +// 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 DescribeTransitGateways for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTransitGateways +func (c *EC2) DescribeTransitGateways(input *DescribeTransitGatewaysInput) (*DescribeTransitGatewaysOutput, error) { + req, out := c.DescribeTransitGatewaysRequest(input) + return out, req.Send() +} + +// DescribeTransitGatewaysWithContext is the same as DescribeTransitGateways with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeTransitGateways 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) DescribeTransitGatewaysWithContext(ctx aws.Context, input *DescribeTransitGatewaysInput, opts ...request.Option) (*DescribeTransitGatewaysOutput, error) { + req, out := c.DescribeTransitGatewaysRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeVolumeAttribute = "DescribeVolumeAttribute" // DescribeVolumeAttributeRequest generates a "aws/request.Request" representing the // client's request for the DescribeVolumeAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -14220,7 +16947,7 @@ const opDescribeVolumeStatus = "DescribeVolumeStatus" // DescribeVolumeStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeVolumeStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -14385,7 +17112,7 @@ const opDescribeVolumes = "DescribeVolumes" // DescribeVolumesRequest generates a "aws/request.Request" representing the // client's request for the DescribeVolumes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -14525,7 +17252,7 @@ const opDescribeVolumesModifications = "DescribeVolumesModifications" // DescribeVolumesModificationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVolumesModifications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -14612,7 +17339,7 @@ const opDescribeVpcAttribute = "DescribeVpcAttribute" // DescribeVpcAttributeRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -14687,7 +17414,7 @@ const opDescribeVpcClassicLink = "DescribeVpcClassicLink" // DescribeVpcClassicLinkRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcClassicLink operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -14761,7 +17488,7 @@ const opDescribeVpcClassicLinkDnsSupport = "DescribeVpcClassicLinkDnsSupport" // DescribeVpcClassicLinkDnsSupportRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcClassicLinkDnsSupport operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -14841,7 +17568,7 @@ const opDescribeVpcEndpointConnectionNotifications = "DescribeVpcEndpointConnect // DescribeVpcEndpointConnectionNotificationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcEndpointConnectionNotifications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -14916,7 +17643,7 @@ const opDescribeVpcEndpointConnections = "DescribeVpcEndpointConnections" // DescribeVpcEndpointConnectionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcEndpointConnections operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -14991,7 +17718,7 @@ const opDescribeVpcEndpointServiceConfigurations = "DescribeVpcEndpointServiceCo // DescribeVpcEndpointServiceConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcEndpointServiceConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -15065,7 +17792,7 @@ const opDescribeVpcEndpointServicePermissions = "DescribeVpcEndpointServicePermi // DescribeVpcEndpointServicePermissionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcEndpointServicePermissions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -15140,7 +17867,7 @@ const opDescribeVpcEndpointServices = "DescribeVpcEndpointServices" // DescribeVpcEndpointServicesRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcEndpointServices operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -15214,7 +17941,7 @@ const opDescribeVpcEndpoints = "DescribeVpcEndpoints" // DescribeVpcEndpointsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcEndpoints operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -15288,7 +18015,7 @@ const opDescribeVpcPeeringConnections = "DescribeVpcPeeringConnections" // DescribeVpcPeeringConnectionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcPeeringConnections operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -15362,7 +18089,7 @@ const opDescribeVpcs = "DescribeVpcs" // DescribeVpcsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -15436,7 +18163,7 @@ const opDescribeVpnConnections = "DescribeVpnConnections" // DescribeVpnConnectionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpnConnections operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -15514,7 +18241,7 @@ const opDescribeVpnGateways = "DescribeVpnGateways" // DescribeVpnGatewaysRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpnGateways operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -15592,7 +18319,7 @@ const opDetachClassicLinkVpc = "DetachClassicLinkVpc" // DetachClassicLinkVpcRequest generates a "aws/request.Request" representing the // client's request for the DetachClassicLinkVpc operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -15668,7 +18395,7 @@ const opDetachInternetGateway = "DetachInternetGateway" // DetachInternetGatewayRequest generates a "aws/request.Request" representing the // client's request for the DetachInternetGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -15702,8 +18429,7 @@ func (c *EC2) DetachInternetGatewayRequest(input *DetachInternetGatewayInput) (r output = &DetachInternetGatewayOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -15746,7 +18472,7 @@ const opDetachNetworkInterface = "DetachNetworkInterface" // DetachNetworkInterfaceRequest generates a "aws/request.Request" representing the // client's request for the DetachNetworkInterface operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -15780,8 +18506,7 @@ func (c *EC2) DetachNetworkInterfaceRequest(input *DetachNetworkInterfaceInput) output = &DetachNetworkInterfaceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -15822,7 +18547,7 @@ const opDetachVolume = "DetachVolume" // DetachVolumeRequest generates a "aws/request.Request" representing the // client's request for the DetachVolume operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -15909,7 +18634,7 @@ const opDetachVpnGateway = "DetachVpnGateway" // DetachVpnGatewayRequest generates a "aws/request.Request" representing the // client's request for the DetachVpnGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -15943,8 +18668,7 @@ func (c *EC2) DetachVpnGatewayRequest(input *DetachVpnGatewayInput) (req *reques output = &DetachVpnGatewayOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -15987,12 +18711,87 @@ func (c *EC2) DetachVpnGatewayWithContext(ctx aws.Context, input *DetachVpnGatew return out, req.Send() } +const opDisableTransitGatewayRouteTablePropagation = "DisableTransitGatewayRouteTablePropagation" + +// DisableTransitGatewayRouteTablePropagationRequest generates a "aws/request.Request" representing the +// client's request for the DisableTransitGatewayRouteTablePropagation 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 DisableTransitGatewayRouteTablePropagation for more information on using the DisableTransitGatewayRouteTablePropagation +// 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 DisableTransitGatewayRouteTablePropagationRequest method. +// req, resp := client.DisableTransitGatewayRouteTablePropagationRequest(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/DisableTransitGatewayRouteTablePropagation +func (c *EC2) DisableTransitGatewayRouteTablePropagationRequest(input *DisableTransitGatewayRouteTablePropagationInput) (req *request.Request, output *DisableTransitGatewayRouteTablePropagationOutput) { + op := &request.Operation{ + Name: opDisableTransitGatewayRouteTablePropagation, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisableTransitGatewayRouteTablePropagationInput{} + } + + output = &DisableTransitGatewayRouteTablePropagationOutput{} + req = c.newRequest(op, input, output) + return +} + +// DisableTransitGatewayRouteTablePropagation API operation for Amazon Elastic Compute Cloud. +// +// Disables the specified resource attachment from propagating routes to the +// specified propagation route table. +// +// 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 DisableTransitGatewayRouteTablePropagation for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableTransitGatewayRouteTablePropagation +func (c *EC2) DisableTransitGatewayRouteTablePropagation(input *DisableTransitGatewayRouteTablePropagationInput) (*DisableTransitGatewayRouteTablePropagationOutput, error) { + req, out := c.DisableTransitGatewayRouteTablePropagationRequest(input) + return out, req.Send() +} + +// DisableTransitGatewayRouteTablePropagationWithContext is the same as DisableTransitGatewayRouteTablePropagation with the addition of +// the ability to pass a context and additional request options. +// +// See DisableTransitGatewayRouteTablePropagation 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) DisableTransitGatewayRouteTablePropagationWithContext(ctx aws.Context, input *DisableTransitGatewayRouteTablePropagationInput, opts ...request.Option) (*DisableTransitGatewayRouteTablePropagationOutput, error) { + req, out := c.DisableTransitGatewayRouteTablePropagationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDisableVgwRoutePropagation = "DisableVgwRoutePropagation" // DisableVgwRoutePropagationRequest generates a "aws/request.Request" representing the // client's request for the DisableVgwRoutePropagation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -16026,8 +18825,7 @@ func (c *EC2) DisableVgwRoutePropagationRequest(input *DisableVgwRoutePropagatio output = &DisableVgwRoutePropagationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -16069,7 +18867,7 @@ const opDisableVpcClassicLink = "DisableVpcClassicLink" // DisableVpcClassicLinkRequest generates a "aws/request.Request" representing the // client's request for the DisableVpcClassicLink operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -16144,7 +18942,7 @@ const opDisableVpcClassicLinkDnsSupport = "DisableVpcClassicLinkDnsSupport" // DisableVpcClassicLinkDnsSupportRequest generates a "aws/request.Request" representing the // client's request for the DisableVpcClassicLinkDnsSupport operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -16222,7 +19020,7 @@ const opDisassociateAddress = "DisassociateAddress" // DisassociateAddressRequest generates a "aws/request.Request" representing the // client's request for the DisassociateAddress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -16256,8 +19054,7 @@ func (c *EC2) DisassociateAddressRequest(input *DisassociateAddressInput) (req * output = &DisassociateAddressOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -16301,12 +19098,96 @@ func (c *EC2) DisassociateAddressWithContext(ctx aws.Context, input *Disassociat return out, req.Send() } +const opDisassociateClientVpnTargetNetwork = "DisassociateClientVpnTargetNetwork" + +// DisassociateClientVpnTargetNetworkRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateClientVpnTargetNetwork 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 DisassociateClientVpnTargetNetwork for more information on using the DisassociateClientVpnTargetNetwork +// 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 DisassociateClientVpnTargetNetworkRequest method. +// req, resp := client.DisassociateClientVpnTargetNetworkRequest(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/DisassociateClientVpnTargetNetwork +func (c *EC2) DisassociateClientVpnTargetNetworkRequest(input *DisassociateClientVpnTargetNetworkInput) (req *request.Request, output *DisassociateClientVpnTargetNetworkOutput) { + op := &request.Operation{ + Name: opDisassociateClientVpnTargetNetwork, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisassociateClientVpnTargetNetworkInput{} + } + + output = &DisassociateClientVpnTargetNetworkOutput{} + req = c.newRequest(op, input, output) + return +} + +// DisassociateClientVpnTargetNetwork API operation for Amazon Elastic Compute Cloud. +// +// Disassociates a target network from the specified Client VPN endpoint. When +// you disassociate the last target network from a Client VPN, the following +// happens: +// +// * The route that was automatically added for the VPC is deleted +// +// * All active client connections are terminated +// +// * New client connections are disallowed +// +// * The Client VPN endpoint's status changes to pending-associate +// +// 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 DisassociateClientVpnTargetNetwork for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateClientVpnTargetNetwork +func (c *EC2) DisassociateClientVpnTargetNetwork(input *DisassociateClientVpnTargetNetworkInput) (*DisassociateClientVpnTargetNetworkOutput, error) { + req, out := c.DisassociateClientVpnTargetNetworkRequest(input) + return out, req.Send() +} + +// DisassociateClientVpnTargetNetworkWithContext is the same as DisassociateClientVpnTargetNetwork with the addition of +// the ability to pass a context and additional request options. +// +// See DisassociateClientVpnTargetNetwork 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) DisassociateClientVpnTargetNetworkWithContext(ctx aws.Context, input *DisassociateClientVpnTargetNetworkInput, opts ...request.Option) (*DisassociateClientVpnTargetNetworkOutput, error) { + req, out := c.DisassociateClientVpnTargetNetworkRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDisassociateIamInstanceProfile = "DisassociateIamInstanceProfile" // DisassociateIamInstanceProfileRequest generates a "aws/request.Request" representing the // client's request for the DisassociateIamInstanceProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -16382,7 +19263,7 @@ const opDisassociateRouteTable = "DisassociateRouteTable" // DisassociateRouteTableRequest generates a "aws/request.Request" representing the // client's request for the DisassociateRouteTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -16416,8 +19297,7 @@ func (c *EC2) DisassociateRouteTableRequest(input *DisassociateRouteTableInput) output = &DisassociateRouteTableOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -16463,7 +19343,7 @@ const opDisassociateSubnetCidrBlock = "DisassociateSubnetCidrBlock" // DisassociateSubnetCidrBlockRequest generates a "aws/request.Request" representing the // client's request for the DisassociateSubnetCidrBlock operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -16534,12 +19414,86 @@ func (c *EC2) DisassociateSubnetCidrBlockWithContext(ctx aws.Context, input *Dis return out, req.Send() } +const opDisassociateTransitGatewayRouteTable = "DisassociateTransitGatewayRouteTable" + +// DisassociateTransitGatewayRouteTableRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateTransitGatewayRouteTable 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 DisassociateTransitGatewayRouteTable for more information on using the DisassociateTransitGatewayRouteTable +// 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 DisassociateTransitGatewayRouteTableRequest method. +// req, resp := client.DisassociateTransitGatewayRouteTableRequest(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/DisassociateTransitGatewayRouteTable +func (c *EC2) DisassociateTransitGatewayRouteTableRequest(input *DisassociateTransitGatewayRouteTableInput) (req *request.Request, output *DisassociateTransitGatewayRouteTableOutput) { + op := &request.Operation{ + Name: opDisassociateTransitGatewayRouteTable, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisassociateTransitGatewayRouteTableInput{} + } + + output = &DisassociateTransitGatewayRouteTableOutput{} + req = c.newRequest(op, input, output) + return +} + +// DisassociateTransitGatewayRouteTable API operation for Amazon Elastic Compute Cloud. +// +// Disassociates a resource attachment from a transit gateway route table. +// +// 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 DisassociateTransitGatewayRouteTable for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateTransitGatewayRouteTable +func (c *EC2) DisassociateTransitGatewayRouteTable(input *DisassociateTransitGatewayRouteTableInput) (*DisassociateTransitGatewayRouteTableOutput, error) { + req, out := c.DisassociateTransitGatewayRouteTableRequest(input) + return out, req.Send() +} + +// DisassociateTransitGatewayRouteTableWithContext is the same as DisassociateTransitGatewayRouteTable with the addition of +// the ability to pass a context and additional request options. +// +// See DisassociateTransitGatewayRouteTable 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) DisassociateTransitGatewayRouteTableWithContext(ctx aws.Context, input *DisassociateTransitGatewayRouteTableInput, opts ...request.Option) (*DisassociateTransitGatewayRouteTableOutput, error) { + req, out := c.DisassociateTransitGatewayRouteTableRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDisassociateVpcCidrBlock = "DisassociateVpcCidrBlock" // DisassociateVpcCidrBlockRequest generates a "aws/request.Request" representing the // client's request for the DisassociateVpcCidrBlock operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -16614,12 +19568,87 @@ func (c *EC2) DisassociateVpcCidrBlockWithContext(ctx aws.Context, input *Disass return out, req.Send() } +const opEnableTransitGatewayRouteTablePropagation = "EnableTransitGatewayRouteTablePropagation" + +// EnableTransitGatewayRouteTablePropagationRequest generates a "aws/request.Request" representing the +// client's request for the EnableTransitGatewayRouteTablePropagation 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 EnableTransitGatewayRouteTablePropagation for more information on using the EnableTransitGatewayRouteTablePropagation +// 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 EnableTransitGatewayRouteTablePropagationRequest method. +// req, resp := client.EnableTransitGatewayRouteTablePropagationRequest(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/EnableTransitGatewayRouteTablePropagation +func (c *EC2) EnableTransitGatewayRouteTablePropagationRequest(input *EnableTransitGatewayRouteTablePropagationInput) (req *request.Request, output *EnableTransitGatewayRouteTablePropagationOutput) { + op := &request.Operation{ + Name: opEnableTransitGatewayRouteTablePropagation, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &EnableTransitGatewayRouteTablePropagationInput{} + } + + output = &EnableTransitGatewayRouteTablePropagationOutput{} + req = c.newRequest(op, input, output) + return +} + +// EnableTransitGatewayRouteTablePropagation API operation for Amazon Elastic Compute Cloud. +// +// Enables the specified attachment to propagate routes to the specified propagation +// route table. +// +// 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 EnableTransitGatewayRouteTablePropagation for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableTransitGatewayRouteTablePropagation +func (c *EC2) EnableTransitGatewayRouteTablePropagation(input *EnableTransitGatewayRouteTablePropagationInput) (*EnableTransitGatewayRouteTablePropagationOutput, error) { + req, out := c.EnableTransitGatewayRouteTablePropagationRequest(input) + return out, req.Send() +} + +// EnableTransitGatewayRouteTablePropagationWithContext is the same as EnableTransitGatewayRouteTablePropagation with the addition of +// the ability to pass a context and additional request options. +// +// See EnableTransitGatewayRouteTablePropagation 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) EnableTransitGatewayRouteTablePropagationWithContext(ctx aws.Context, input *EnableTransitGatewayRouteTablePropagationInput, opts ...request.Option) (*EnableTransitGatewayRouteTablePropagationOutput, error) { + req, out := c.EnableTransitGatewayRouteTablePropagationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opEnableVgwRoutePropagation = "EnableVgwRoutePropagation" // EnableVgwRoutePropagationRequest generates a "aws/request.Request" representing the // client's request for the EnableVgwRoutePropagation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -16653,8 +19682,7 @@ func (c *EC2) EnableVgwRoutePropagationRequest(input *EnableVgwRoutePropagationI output = &EnableVgwRoutePropagationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -16696,7 +19724,7 @@ const opEnableVolumeIO = "EnableVolumeIO" // EnableVolumeIORequest generates a "aws/request.Request" representing the // client's request for the EnableVolumeIO operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -16730,8 +19758,7 @@ func (c *EC2) EnableVolumeIORequest(input *EnableVolumeIOInput) (req *request.Re output = &EnableVolumeIOOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -16773,7 +19800,7 @@ const opEnableVpcClassicLink = "EnableVpcClassicLink" // EnableVpcClassicLinkRequest generates a "aws/request.Request" representing the // client's request for the EnableVpcClassicLink operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -16853,7 +19880,7 @@ const opEnableVpcClassicLinkDnsSupport = "EnableVpcClassicLinkDnsSupport" // EnableVpcClassicLinkDnsSupportRequest generates a "aws/request.Request" representing the // client's request for the EnableVpcClassicLinkDnsSupport operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -16928,12 +19955,240 @@ func (c *EC2) EnableVpcClassicLinkDnsSupportWithContext(ctx aws.Context, input * return out, req.Send() } +const opExportClientVpnClientCertificateRevocationList = "ExportClientVpnClientCertificateRevocationList" + +// ExportClientVpnClientCertificateRevocationListRequest generates a "aws/request.Request" representing the +// client's request for the ExportClientVpnClientCertificateRevocationList 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 ExportClientVpnClientCertificateRevocationList for more information on using the ExportClientVpnClientCertificateRevocationList +// 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 ExportClientVpnClientCertificateRevocationListRequest method. +// req, resp := client.ExportClientVpnClientCertificateRevocationListRequest(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/ExportClientVpnClientCertificateRevocationList +func (c *EC2) ExportClientVpnClientCertificateRevocationListRequest(input *ExportClientVpnClientCertificateRevocationListInput) (req *request.Request, output *ExportClientVpnClientCertificateRevocationListOutput) { + op := &request.Operation{ + Name: opExportClientVpnClientCertificateRevocationList, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ExportClientVpnClientCertificateRevocationListInput{} + } + + output = &ExportClientVpnClientCertificateRevocationListOutput{} + req = c.newRequest(op, input, output) + return +} + +// ExportClientVpnClientCertificateRevocationList API operation for Amazon Elastic Compute Cloud. +// +// Downloads the client certificate revocation list for the specified Client +// VPN endpoint. +// +// 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 ExportClientVpnClientCertificateRevocationList for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ExportClientVpnClientCertificateRevocationList +func (c *EC2) ExportClientVpnClientCertificateRevocationList(input *ExportClientVpnClientCertificateRevocationListInput) (*ExportClientVpnClientCertificateRevocationListOutput, error) { + req, out := c.ExportClientVpnClientCertificateRevocationListRequest(input) + return out, req.Send() +} + +// ExportClientVpnClientCertificateRevocationListWithContext is the same as ExportClientVpnClientCertificateRevocationList with the addition of +// the ability to pass a context and additional request options. +// +// See ExportClientVpnClientCertificateRevocationList 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) ExportClientVpnClientCertificateRevocationListWithContext(ctx aws.Context, input *ExportClientVpnClientCertificateRevocationListInput, opts ...request.Option) (*ExportClientVpnClientCertificateRevocationListOutput, error) { + req, out := c.ExportClientVpnClientCertificateRevocationListRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opExportClientVpnClientConfiguration = "ExportClientVpnClientConfiguration" + +// ExportClientVpnClientConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the ExportClientVpnClientConfiguration 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 ExportClientVpnClientConfiguration for more information on using the ExportClientVpnClientConfiguration +// 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 ExportClientVpnClientConfigurationRequest method. +// req, resp := client.ExportClientVpnClientConfigurationRequest(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/ExportClientVpnClientConfiguration +func (c *EC2) ExportClientVpnClientConfigurationRequest(input *ExportClientVpnClientConfigurationInput) (req *request.Request, output *ExportClientVpnClientConfigurationOutput) { + op := &request.Operation{ + Name: opExportClientVpnClientConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ExportClientVpnClientConfigurationInput{} + } + + output = &ExportClientVpnClientConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// ExportClientVpnClientConfiguration API operation for Amazon Elastic Compute Cloud. +// +// Downloads the contents of the Client VPN endpoint configuration file for +// the specified Client VPN endpoint. The Client VPN endpoint configuration +// file includes the Client VPN endpoint and certificate information clients +// need to establish a connection with the Client VPN endpoint. +// +// 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 ExportClientVpnClientConfiguration for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ExportClientVpnClientConfiguration +func (c *EC2) ExportClientVpnClientConfiguration(input *ExportClientVpnClientConfigurationInput) (*ExportClientVpnClientConfigurationOutput, error) { + req, out := c.ExportClientVpnClientConfigurationRequest(input) + return out, req.Send() +} + +// ExportClientVpnClientConfigurationWithContext is the same as ExportClientVpnClientConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See ExportClientVpnClientConfiguration 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) ExportClientVpnClientConfigurationWithContext(ctx aws.Context, input *ExportClientVpnClientConfigurationInput, opts ...request.Option) (*ExportClientVpnClientConfigurationOutput, error) { + req, out := c.ExportClientVpnClientConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opExportTransitGatewayRoutes = "ExportTransitGatewayRoutes" + +// ExportTransitGatewayRoutesRequest generates a "aws/request.Request" representing the +// client's request for the ExportTransitGatewayRoutes 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 ExportTransitGatewayRoutes for more information on using the ExportTransitGatewayRoutes +// 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 ExportTransitGatewayRoutesRequest method. +// req, resp := client.ExportTransitGatewayRoutesRequest(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/ExportTransitGatewayRoutes +func (c *EC2) ExportTransitGatewayRoutesRequest(input *ExportTransitGatewayRoutesInput) (req *request.Request, output *ExportTransitGatewayRoutesOutput) { + op := &request.Operation{ + Name: opExportTransitGatewayRoutes, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ExportTransitGatewayRoutesInput{} + } + + output = &ExportTransitGatewayRoutesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ExportTransitGatewayRoutes API operation for Amazon Elastic Compute Cloud. +// +// Exports routes from the specified transit gateway route table to the specified +// S3 bucket. By default, all routes are exported. Alternatively, you can filter +// by CIDR range. +// +// 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 ExportTransitGatewayRoutes for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ExportTransitGatewayRoutes +func (c *EC2) ExportTransitGatewayRoutes(input *ExportTransitGatewayRoutesInput) (*ExportTransitGatewayRoutesOutput, error) { + req, out := c.ExportTransitGatewayRoutesRequest(input) + return out, req.Send() +} + +// ExportTransitGatewayRoutesWithContext is the same as ExportTransitGatewayRoutes with the addition of +// the ability to pass a context and additional request options. +// +// See ExportTransitGatewayRoutes 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) ExportTransitGatewayRoutesWithContext(ctx aws.Context, input *ExportTransitGatewayRoutesInput, opts ...request.Option) (*ExportTransitGatewayRoutesOutput, error) { + req, out := c.ExportTransitGatewayRoutesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetConsoleOutput = "GetConsoleOutput" // GetConsoleOutputRequest generates a "aws/request.Request" representing the // client's request for the GetConsoleOutput operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -17023,7 +20278,7 @@ const opGetConsoleScreenshot = "GetConsoleScreenshot" // GetConsoleScreenshotRequest generates a "aws/request.Request" representing the // client's request for the GetConsoleScreenshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -17099,7 +20354,7 @@ const opGetHostReservationPurchasePreview = "GetHostReservationPurchasePreview" // GetHostReservationPurchasePreviewRequest generates a "aws/request.Request" representing the // client's request for the GetHostReservationPurchasePreview operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -17178,7 +20433,7 @@ const opGetLaunchTemplateData = "GetLaunchTemplateData" // GetLaunchTemplateDataRequest generates a "aws/request.Request" representing the // client's request for the GetLaunchTemplateData operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -17253,7 +20508,7 @@ const opGetPasswordData = "GetPasswordData" // GetPasswordDataRequest generates a "aws/request.Request" representing the // client's request for the GetPasswordData operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -17344,7 +20599,7 @@ const opGetReservedInstancesExchangeQuote = "GetReservedInstancesExchangeQuote" // GetReservedInstancesExchangeQuoteRequest generates a "aws/request.Request" representing the // client's request for the GetReservedInstancesExchangeQuote operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -17416,12 +20671,315 @@ func (c *EC2) GetReservedInstancesExchangeQuoteWithContext(ctx aws.Context, inpu return out, req.Send() } +const opGetTransitGatewayAttachmentPropagations = "GetTransitGatewayAttachmentPropagations" + +// GetTransitGatewayAttachmentPropagationsRequest generates a "aws/request.Request" representing the +// client's request for the GetTransitGatewayAttachmentPropagations 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 GetTransitGatewayAttachmentPropagations for more information on using the GetTransitGatewayAttachmentPropagations +// 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 GetTransitGatewayAttachmentPropagationsRequest method. +// req, resp := client.GetTransitGatewayAttachmentPropagationsRequest(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/GetTransitGatewayAttachmentPropagations +func (c *EC2) GetTransitGatewayAttachmentPropagationsRequest(input *GetTransitGatewayAttachmentPropagationsInput) (req *request.Request, output *GetTransitGatewayAttachmentPropagationsOutput) { + op := &request.Operation{ + Name: opGetTransitGatewayAttachmentPropagations, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetTransitGatewayAttachmentPropagationsInput{} + } + + output = &GetTransitGatewayAttachmentPropagationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetTransitGatewayAttachmentPropagations API operation for Amazon Elastic Compute Cloud. +// +// Lists the route tables to which the specified resource attachment propagates +// routes. +// +// 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 GetTransitGatewayAttachmentPropagations for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetTransitGatewayAttachmentPropagations +func (c *EC2) GetTransitGatewayAttachmentPropagations(input *GetTransitGatewayAttachmentPropagationsInput) (*GetTransitGatewayAttachmentPropagationsOutput, error) { + req, out := c.GetTransitGatewayAttachmentPropagationsRequest(input) + return out, req.Send() +} + +// GetTransitGatewayAttachmentPropagationsWithContext is the same as GetTransitGatewayAttachmentPropagations with the addition of +// the ability to pass a context and additional request options. +// +// See GetTransitGatewayAttachmentPropagations 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) GetTransitGatewayAttachmentPropagationsWithContext(ctx aws.Context, input *GetTransitGatewayAttachmentPropagationsInput, opts ...request.Option) (*GetTransitGatewayAttachmentPropagationsOutput, error) { + req, out := c.GetTransitGatewayAttachmentPropagationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetTransitGatewayRouteTableAssociations = "GetTransitGatewayRouteTableAssociations" + +// GetTransitGatewayRouteTableAssociationsRequest generates a "aws/request.Request" representing the +// client's request for the GetTransitGatewayRouteTableAssociations 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 GetTransitGatewayRouteTableAssociations for more information on using the GetTransitGatewayRouteTableAssociations +// 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 GetTransitGatewayRouteTableAssociationsRequest method. +// req, resp := client.GetTransitGatewayRouteTableAssociationsRequest(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/GetTransitGatewayRouteTableAssociations +func (c *EC2) GetTransitGatewayRouteTableAssociationsRequest(input *GetTransitGatewayRouteTableAssociationsInput) (req *request.Request, output *GetTransitGatewayRouteTableAssociationsOutput) { + op := &request.Operation{ + Name: opGetTransitGatewayRouteTableAssociations, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetTransitGatewayRouteTableAssociationsInput{} + } + + output = &GetTransitGatewayRouteTableAssociationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetTransitGatewayRouteTableAssociations API operation for Amazon Elastic Compute Cloud. +// +// Gets information about the associations for the specified transit gateway +// route table. +// +// 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 GetTransitGatewayRouteTableAssociations for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetTransitGatewayRouteTableAssociations +func (c *EC2) GetTransitGatewayRouteTableAssociations(input *GetTransitGatewayRouteTableAssociationsInput) (*GetTransitGatewayRouteTableAssociationsOutput, error) { + req, out := c.GetTransitGatewayRouteTableAssociationsRequest(input) + return out, req.Send() +} + +// GetTransitGatewayRouteTableAssociationsWithContext is the same as GetTransitGatewayRouteTableAssociations with the addition of +// the ability to pass a context and additional request options. +// +// See GetTransitGatewayRouteTableAssociations 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) GetTransitGatewayRouteTableAssociationsWithContext(ctx aws.Context, input *GetTransitGatewayRouteTableAssociationsInput, opts ...request.Option) (*GetTransitGatewayRouteTableAssociationsOutput, error) { + req, out := c.GetTransitGatewayRouteTableAssociationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetTransitGatewayRouteTablePropagations = "GetTransitGatewayRouteTablePropagations" + +// GetTransitGatewayRouteTablePropagationsRequest generates a "aws/request.Request" representing the +// client's request for the GetTransitGatewayRouteTablePropagations 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 GetTransitGatewayRouteTablePropagations for more information on using the GetTransitGatewayRouteTablePropagations +// 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 GetTransitGatewayRouteTablePropagationsRequest method. +// req, resp := client.GetTransitGatewayRouteTablePropagationsRequest(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/GetTransitGatewayRouteTablePropagations +func (c *EC2) GetTransitGatewayRouteTablePropagationsRequest(input *GetTransitGatewayRouteTablePropagationsInput) (req *request.Request, output *GetTransitGatewayRouteTablePropagationsOutput) { + op := &request.Operation{ + Name: opGetTransitGatewayRouteTablePropagations, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetTransitGatewayRouteTablePropagationsInput{} + } + + output = &GetTransitGatewayRouteTablePropagationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetTransitGatewayRouteTablePropagations API operation for Amazon Elastic Compute Cloud. +// +// Gets information about the route table propagations for the specified transit +// gateway route table. +// +// 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 GetTransitGatewayRouteTablePropagations for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetTransitGatewayRouteTablePropagations +func (c *EC2) GetTransitGatewayRouteTablePropagations(input *GetTransitGatewayRouteTablePropagationsInput) (*GetTransitGatewayRouteTablePropagationsOutput, error) { + req, out := c.GetTransitGatewayRouteTablePropagationsRequest(input) + return out, req.Send() +} + +// GetTransitGatewayRouteTablePropagationsWithContext is the same as GetTransitGatewayRouteTablePropagations with the addition of +// the ability to pass a context and additional request options. +// +// See GetTransitGatewayRouteTablePropagations 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) GetTransitGatewayRouteTablePropagationsWithContext(ctx aws.Context, input *GetTransitGatewayRouteTablePropagationsInput, opts ...request.Option) (*GetTransitGatewayRouteTablePropagationsOutput, error) { + req, out := c.GetTransitGatewayRouteTablePropagationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opImportClientVpnClientCertificateRevocationList = "ImportClientVpnClientCertificateRevocationList" + +// ImportClientVpnClientCertificateRevocationListRequest generates a "aws/request.Request" representing the +// client's request for the ImportClientVpnClientCertificateRevocationList 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 ImportClientVpnClientCertificateRevocationList for more information on using the ImportClientVpnClientCertificateRevocationList +// 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 ImportClientVpnClientCertificateRevocationListRequest method. +// req, resp := client.ImportClientVpnClientCertificateRevocationListRequest(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/ImportClientVpnClientCertificateRevocationList +func (c *EC2) ImportClientVpnClientCertificateRevocationListRequest(input *ImportClientVpnClientCertificateRevocationListInput) (req *request.Request, output *ImportClientVpnClientCertificateRevocationListOutput) { + op := &request.Operation{ + Name: opImportClientVpnClientCertificateRevocationList, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ImportClientVpnClientCertificateRevocationListInput{} + } + + output = &ImportClientVpnClientCertificateRevocationListOutput{} + req = c.newRequest(op, input, output) + return +} + +// ImportClientVpnClientCertificateRevocationList API operation for Amazon Elastic Compute Cloud. +// +// Uploads a client certificate revocation list to the specified Client VPN +// endpoint. Uploading a client certificate revocation list overwrites the existing +// client certificate revocation list. +// +// Uploading a client certificate revocation list resets existing client connections. +// +// 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 ImportClientVpnClientCertificateRevocationList for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ImportClientVpnClientCertificateRevocationList +func (c *EC2) ImportClientVpnClientCertificateRevocationList(input *ImportClientVpnClientCertificateRevocationListInput) (*ImportClientVpnClientCertificateRevocationListOutput, error) { + req, out := c.ImportClientVpnClientCertificateRevocationListRequest(input) + return out, req.Send() +} + +// ImportClientVpnClientCertificateRevocationListWithContext is the same as ImportClientVpnClientCertificateRevocationList with the addition of +// the ability to pass a context and additional request options. +// +// See ImportClientVpnClientCertificateRevocationList 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) ImportClientVpnClientCertificateRevocationListWithContext(ctx aws.Context, input *ImportClientVpnClientCertificateRevocationListInput, opts ...request.Option) (*ImportClientVpnClientCertificateRevocationListOutput, error) { + req, out := c.ImportClientVpnClientCertificateRevocationListRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opImportImage = "ImportImage" // ImportImageRequest generates a "aws/request.Request" representing the // client's request for the ImportImage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -17498,7 +21056,7 @@ const opImportInstance = "ImportInstance" // ImportInstanceRequest generates a "aws/request.Request" representing the // client's request for the ImportInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -17578,7 +21136,7 @@ const opImportKeyPair = "ImportKeyPair" // ImportKeyPairRequest generates a "aws/request.Request" representing the // client's request for the ImportKeyPair operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -17659,7 +21217,7 @@ const opImportSnapshot = "ImportSnapshot" // ImportSnapshotRequest generates a "aws/request.Request" representing the // client's request for the ImportSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -17733,7 +21291,7 @@ const opImportVolume = "ImportVolume" // ImportVolumeRequest generates a "aws/request.Request" representing the // client's request for the ImportVolume operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -17806,12 +21364,168 @@ func (c *EC2) ImportVolumeWithContext(ctx aws.Context, input *ImportVolumeInput, return out, req.Send() } +const opModifyCapacityReservation = "ModifyCapacityReservation" + +// ModifyCapacityReservationRequest generates a "aws/request.Request" representing the +// client's request for the ModifyCapacityReservation 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 ModifyCapacityReservation for more information on using the ModifyCapacityReservation +// 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 ModifyCapacityReservationRequest method. +// req, resp := client.ModifyCapacityReservationRequest(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/ModifyCapacityReservation +func (c *EC2) ModifyCapacityReservationRequest(input *ModifyCapacityReservationInput) (req *request.Request, output *ModifyCapacityReservationOutput) { + op := &request.Operation{ + Name: opModifyCapacityReservation, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyCapacityReservationInput{} + } + + output = &ModifyCapacityReservationOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyCapacityReservation API operation for Amazon Elastic Compute Cloud. +// +// Modifies a Capacity Reservation's capacity and the conditions under which +// it is to be released. You cannot change a Capacity Reservation's instance +// type, EBS optimization, instance store settings, platform, Availability Zone, +// or instance eligibility. If you need to modify any of these attributes, we +// recommend that you cancel the Capacity Reservation, and then create a new +// one with the required attributes. +// +// 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 ModifyCapacityReservation for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyCapacityReservation +func (c *EC2) ModifyCapacityReservation(input *ModifyCapacityReservationInput) (*ModifyCapacityReservationOutput, error) { + req, out := c.ModifyCapacityReservationRequest(input) + return out, req.Send() +} + +// ModifyCapacityReservationWithContext is the same as ModifyCapacityReservation with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyCapacityReservation 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) ModifyCapacityReservationWithContext(ctx aws.Context, input *ModifyCapacityReservationInput, opts ...request.Option) (*ModifyCapacityReservationOutput, error) { + req, out := c.ModifyCapacityReservationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opModifyClientVpnEndpoint = "ModifyClientVpnEndpoint" + +// ModifyClientVpnEndpointRequest generates a "aws/request.Request" representing the +// client's request for the ModifyClientVpnEndpoint 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 ModifyClientVpnEndpoint for more information on using the ModifyClientVpnEndpoint +// 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 ModifyClientVpnEndpointRequest method. +// req, resp := client.ModifyClientVpnEndpointRequest(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/ModifyClientVpnEndpoint +func (c *EC2) ModifyClientVpnEndpointRequest(input *ModifyClientVpnEndpointInput) (req *request.Request, output *ModifyClientVpnEndpointOutput) { + op := &request.Operation{ + Name: opModifyClientVpnEndpoint, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyClientVpnEndpointInput{} + } + + output = &ModifyClientVpnEndpointOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyClientVpnEndpoint API operation for Amazon Elastic Compute Cloud. +// +// Modifies the specified Client VPN endpoint. You can only modify an endpoint's +// server certificate information, client connection logging information, DNS +// server, and description. Modifying the DNS server resets existing client +// connections. +// +// 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 ModifyClientVpnEndpoint for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyClientVpnEndpoint +func (c *EC2) ModifyClientVpnEndpoint(input *ModifyClientVpnEndpointInput) (*ModifyClientVpnEndpointOutput, error) { + req, out := c.ModifyClientVpnEndpointRequest(input) + return out, req.Send() +} + +// ModifyClientVpnEndpointWithContext is the same as ModifyClientVpnEndpoint with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyClientVpnEndpoint 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) ModifyClientVpnEndpointWithContext(ctx aws.Context, input *ModifyClientVpnEndpointInput, opts ...request.Option) (*ModifyClientVpnEndpointOutput, error) { + req, out := c.ModifyClientVpnEndpointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opModifyFleet = "ModifyFleet" // ModifyFleetRequest generates a "aws/request.Request" representing the // client's request for the ModifyFleet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -17887,7 +21601,7 @@ const opModifyFpgaImageAttribute = "ModifyFpgaImageAttribute" // ModifyFpgaImageAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifyFpgaImageAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -17961,7 +21675,7 @@ const opModifyHosts = "ModifyHosts" // ModifyHostsRequest generates a "aws/request.Request" representing the // client's request for the ModifyHosts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -18004,7 +21718,7 @@ func (c *EC2) ModifyHostsRequest(input *ModifyHostsInput) (req *request.Request, // is enabled, any instances that you launch with a tenancy of host but without // a specific host ID are placed onto any available Dedicated Host in your account // that has auto-placement enabled. When auto-placement is disabled, you need -// to provide a host ID ito have the instance launch onto a specific host. If +// to provide a host ID to have the instance launch onto a specific host. If // no host ID is provided, the instance is launched onto a suitable host with // auto-placement enabled. // @@ -18041,7 +21755,7 @@ const opModifyIdFormat = "ModifyIdFormat" // ModifyIdFormatRequest generates a "aws/request.Request" representing the // client's request for the ModifyIdFormat operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -18075,8 +21789,7 @@ func (c *EC2) ModifyIdFormatRequest(input *ModifyIdFormatInput) (req *request.Re output = &ModifyIdFormatOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -18139,7 +21852,7 @@ const opModifyIdentityIdFormat = "ModifyIdentityIdFormat" // ModifyIdentityIdFormatRequest generates a "aws/request.Request" representing the // client's request for the ModifyIdentityIdFormat operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -18173,8 +21886,7 @@ func (c *EC2) ModifyIdentityIdFormatRequest(input *ModifyIdentityIdFormatInput) output = &ModifyIdentityIdFormatOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -18237,7 +21949,7 @@ const opModifyImageAttribute = "ModifyImageAttribute" // ModifyImageAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifyImageAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -18271,8 +21983,7 @@ func (c *EC2) ModifyImageAttributeRequest(input *ModifyImageAttributeInput) (req output = &ModifyImageAttributeOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -18322,7 +22033,7 @@ const opModifyInstanceAttribute = "ModifyInstanceAttribute" // ModifyInstanceAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifyInstanceAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -18356,8 +22067,7 @@ func (c *EC2) ModifyInstanceAttributeRequest(input *ModifyInstanceAttributeInput output = &ModifyInstanceAttributeOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -18404,12 +22114,89 @@ func (c *EC2) ModifyInstanceAttributeWithContext(ctx aws.Context, input *ModifyI return out, req.Send() } +const opModifyInstanceCapacityReservationAttributes = "ModifyInstanceCapacityReservationAttributes" + +// ModifyInstanceCapacityReservationAttributesRequest generates a "aws/request.Request" representing the +// client's request for the ModifyInstanceCapacityReservationAttributes 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 ModifyInstanceCapacityReservationAttributes for more information on using the ModifyInstanceCapacityReservationAttributes +// 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 ModifyInstanceCapacityReservationAttributesRequest method. +// req, resp := client.ModifyInstanceCapacityReservationAttributesRequest(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/ModifyInstanceCapacityReservationAttributes +func (c *EC2) ModifyInstanceCapacityReservationAttributesRequest(input *ModifyInstanceCapacityReservationAttributesInput) (req *request.Request, output *ModifyInstanceCapacityReservationAttributesOutput) { + op := &request.Operation{ + Name: opModifyInstanceCapacityReservationAttributes, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyInstanceCapacityReservationAttributesInput{} + } + + output = &ModifyInstanceCapacityReservationAttributesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyInstanceCapacityReservationAttributes API operation for Amazon Elastic Compute Cloud. +// +// Modifies the Capacity Reservation settings for a stopped instance. Use this +// action to configure an instance to target a specific Capacity Reservation, +// run in any open Capacity Reservation with matching attributes, or run On-Demand +// Instance capacity. +// +// 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 ModifyInstanceCapacityReservationAttributes for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceCapacityReservationAttributes +func (c *EC2) ModifyInstanceCapacityReservationAttributes(input *ModifyInstanceCapacityReservationAttributesInput) (*ModifyInstanceCapacityReservationAttributesOutput, error) { + req, out := c.ModifyInstanceCapacityReservationAttributesRequest(input) + return out, req.Send() +} + +// ModifyInstanceCapacityReservationAttributesWithContext is the same as ModifyInstanceCapacityReservationAttributes with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyInstanceCapacityReservationAttributes 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) ModifyInstanceCapacityReservationAttributesWithContext(ctx aws.Context, input *ModifyInstanceCapacityReservationAttributesInput, opts ...request.Option) (*ModifyInstanceCapacityReservationAttributesOutput, error) { + req, out := c.ModifyInstanceCapacityReservationAttributesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opModifyInstanceCreditSpecification = "ModifyInstanceCreditSpecification" // ModifyInstanceCreditSpecificationRequest generates a "aws/request.Request" representing the // client's request for the ModifyInstanceCreditSpecification operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -18448,10 +22235,10 @@ func (c *EC2) ModifyInstanceCreditSpecificationRequest(input *ModifyInstanceCred // ModifyInstanceCreditSpecification API operation for Amazon Elastic Compute Cloud. // -// Modifies the credit option for CPU usage on a running or stopped T2 instance. -// The credit options are standard and unlimited. +// Modifies the credit option for CPU usage on a running or stopped T2 or T3 +// instance. The credit options are standard and unlimited. // -// For more information, see T2 Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-instances.html) +// For more information, see Burstable Performance Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html) // in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -18487,7 +22274,7 @@ const opModifyInstancePlacement = "ModifyInstancePlacement" // ModifyInstancePlacementRequest generates a "aws/request.Request" representing the // client's request for the ModifyInstancePlacement operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -18546,8 +22333,8 @@ func (c *EC2) ModifyInstancePlacementRequest(input *ModifyInstancePlacementInput // name must be specified in the request. Affinity and tenancy can be modified // in the same request. // -// To modify the host ID, tenancy, or placement group for an instance, the instance -// must be in the stopped state. +// To modify the host ID, tenancy, placement group, or partition for an instance, +// the instance must be in the stopped state. // // 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 @@ -18582,7 +22369,7 @@ const opModifyLaunchTemplate = "ModifyLaunchTemplate" // ModifyLaunchTemplateRequest generates a "aws/request.Request" representing the // client's request for the ModifyLaunchTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -18658,7 +22445,7 @@ const opModifyNetworkInterfaceAttribute = "ModifyNetworkInterfaceAttribute" // ModifyNetworkInterfaceAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifyNetworkInterfaceAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -18692,8 +22479,7 @@ func (c *EC2) ModifyNetworkInterfaceAttributeRequest(input *ModifyNetworkInterfa output = &ModifyNetworkInterfaceAttributeOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -18735,7 +22521,7 @@ const opModifyReservedInstances = "ModifyReservedInstances" // ModifyReservedInstancesRequest generates a "aws/request.Request" representing the // client's request for the ModifyReservedInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -18815,7 +22601,7 @@ const opModifySnapshotAttribute = "ModifySnapshotAttribute" // ModifySnapshotAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifySnapshotAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -18849,8 +22635,7 @@ func (c *EC2) ModifySnapshotAttributeRequest(input *ModifySnapshotAttributeInput output = &ModifySnapshotAttributeOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -18903,7 +22688,7 @@ const opModifySpotFleetRequest = "ModifySpotFleetRequest" // ModifySpotFleetRequestRequest generates a "aws/request.Request" representing the // client's request for the ModifySpotFleetRequest operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -18999,7 +22784,7 @@ const opModifySubnetAttribute = "ModifySubnetAttribute" // ModifySubnetAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifySubnetAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -19033,8 +22818,7 @@ func (c *EC2) ModifySubnetAttributeRequest(input *ModifySubnetAttributeInput) (r output = &ModifySubnetAttributeOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -19070,12 +22854,86 @@ func (c *EC2) ModifySubnetAttributeWithContext(ctx aws.Context, input *ModifySub return out, req.Send() } +const opModifyTransitGatewayVpcAttachment = "ModifyTransitGatewayVpcAttachment" + +// ModifyTransitGatewayVpcAttachmentRequest generates a "aws/request.Request" representing the +// client's request for the ModifyTransitGatewayVpcAttachment 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 ModifyTransitGatewayVpcAttachment for more information on using the ModifyTransitGatewayVpcAttachment +// 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 ModifyTransitGatewayVpcAttachmentRequest method. +// req, resp := client.ModifyTransitGatewayVpcAttachmentRequest(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/ModifyTransitGatewayVpcAttachment +func (c *EC2) ModifyTransitGatewayVpcAttachmentRequest(input *ModifyTransitGatewayVpcAttachmentInput) (req *request.Request, output *ModifyTransitGatewayVpcAttachmentOutput) { + op := &request.Operation{ + Name: opModifyTransitGatewayVpcAttachment, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyTransitGatewayVpcAttachmentInput{} + } + + output = &ModifyTransitGatewayVpcAttachmentOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyTransitGatewayVpcAttachment API operation for Amazon Elastic Compute Cloud. +// +// Modifies the specified VPC 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 ModifyTransitGatewayVpcAttachment for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyTransitGatewayVpcAttachment +func (c *EC2) ModifyTransitGatewayVpcAttachment(input *ModifyTransitGatewayVpcAttachmentInput) (*ModifyTransitGatewayVpcAttachmentOutput, error) { + req, out := c.ModifyTransitGatewayVpcAttachmentRequest(input) + return out, req.Send() +} + +// ModifyTransitGatewayVpcAttachmentWithContext is the same as ModifyTransitGatewayVpcAttachment with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyTransitGatewayVpcAttachment 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) ModifyTransitGatewayVpcAttachmentWithContext(ctx aws.Context, input *ModifyTransitGatewayVpcAttachmentInput, opts ...request.Option) (*ModifyTransitGatewayVpcAttachmentOutput, error) { + req, out := c.ModifyTransitGatewayVpcAttachmentRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opModifyVolume = "ModifyVolume" // ModifyVolumeRequest generates a "aws/request.Request" representing the // client's request for the ModifyVolume operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -19180,7 +23038,7 @@ const opModifyVolumeAttribute = "ModifyVolumeAttribute" // ModifyVolumeAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifyVolumeAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -19214,8 +23072,7 @@ func (c *EC2) ModifyVolumeAttributeRequest(input *ModifyVolumeAttributeInput) (r output = &ModifyVolumeAttributeOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -19265,7 +23122,7 @@ const opModifyVpcAttribute = "ModifyVpcAttribute" // ModifyVpcAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifyVpcAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -19299,8 +23156,7 @@ func (c *EC2) ModifyVpcAttributeRequest(input *ModifyVpcAttributeInput) (req *re output = &ModifyVpcAttributeOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -19341,7 +23197,7 @@ const opModifyVpcEndpoint = "ModifyVpcEndpoint" // ModifyVpcEndpointRequest generates a "aws/request.Request" representing the // client's request for the ModifyVpcEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -19418,7 +23274,7 @@ const opModifyVpcEndpointConnectionNotification = "ModifyVpcEndpointConnectionNo // ModifyVpcEndpointConnectionNotificationRequest generates a "aws/request.Request" representing the // client's request for the ModifyVpcEndpointConnectionNotification operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -19494,7 +23350,7 @@ const opModifyVpcEndpointServiceConfiguration = "ModifyVpcEndpointServiceConfigu // ModifyVpcEndpointServiceConfigurationRequest generates a "aws/request.Request" representing the // client's request for the ModifyVpcEndpointServiceConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -19571,7 +23427,7 @@ const opModifyVpcEndpointServicePermissions = "ModifyVpcEndpointServicePermissio // ModifyVpcEndpointServicePermissionsRequest generates a "aws/request.Request" representing the // client's request for the ModifyVpcEndpointServicePermissions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -19652,7 +23508,7 @@ const opModifyVpcPeeringConnectionOptions = "ModifyVpcPeeringConnectionOptions" // ModifyVpcPeeringConnectionOptionsRequest generates a "aws/request.Request" representing the // client's request for the ModifyVpcPeeringConnectionOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -19704,12 +23560,16 @@ func (c *EC2) ModifyVpcPeeringConnectionOptionsRequest(input *ModifyVpcPeeringCo // * Enable/disable the ability to resolve public DNS hostnames to private // IP addresses when queried from instances in the peer VPC. // -// If the peered VPCs are in different accounts, each owner must initiate a -// separate request to modify the peering connection options, depending on whether -// their VPC was the requester or accepter for the VPC peering connection. If -// the peered VPCs are in the same account, you can modify the requester and -// accepter options in the same request. To confirm which VPC is the accepter -// and requester for a VPC peering connection, use the DescribeVpcPeeringConnections +// If the peered VPCs are in the same AWS account, you can enable DNS resolution +// for queries from the local VPC. This ensures that queries from the local +// VPC resolve to private IP addresses in the peer VPC. This option is not available +// if the peered VPCs are in different AWS accounts or different regions. For +// peered VPCs in different AWS accounts, each AWS account owner must initiate +// a separate request to modify the peering connection options. For inter-region +// peering connections, you must use the region for the requester VPC to modify +// the requester VPC peering options and the region for the accepter VPC to +// modify the accepter VPC peering options. To verify which VPCs are the accepter +// and the requester for a VPC peering connection, use the DescribeVpcPeeringConnections // command. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -19745,7 +23605,7 @@ const opModifyVpcTenancy = "ModifyVpcTenancy" // ModifyVpcTenancyRequest generates a "aws/request.Request" representing the // client's request for the ModifyVpcTenancy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -19828,7 +23688,7 @@ const opMonitorInstances = "MonitorInstances" // MonitorInstancesRequest generates a "aws/request.Request" representing the // client's request for the MonitorInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -19907,7 +23767,7 @@ const opMoveAddressToVpc = "MoveAddressToVpc" // MoveAddressToVpcRequest generates a "aws/request.Request" representing the // client's request for the MoveAddressToVpc operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -19982,12 +23842,102 @@ func (c *EC2) MoveAddressToVpcWithContext(ctx aws.Context, input *MoveAddressToV return out, req.Send() } +const opProvisionByoipCidr = "ProvisionByoipCidr" + +// ProvisionByoipCidrRequest generates a "aws/request.Request" representing the +// client's request for the ProvisionByoipCidr 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 ProvisionByoipCidr for more information on using the ProvisionByoipCidr +// 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 ProvisionByoipCidrRequest method. +// req, resp := client.ProvisionByoipCidrRequest(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/ProvisionByoipCidr +func (c *EC2) ProvisionByoipCidrRequest(input *ProvisionByoipCidrInput) (req *request.Request, output *ProvisionByoipCidrOutput) { + op := &request.Operation{ + Name: opProvisionByoipCidr, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ProvisionByoipCidrInput{} + } + + output = &ProvisionByoipCidrOutput{} + req = c.newRequest(op, input, output) + return +} + +// ProvisionByoipCidr API operation for Amazon Elastic Compute Cloud. +// +// Provisions an 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 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) (http://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 +// immediately, but the address range is not ready to use until its status changes +// from pending-provision to provisioned. To monitor the status of an address +// range, use DescribeByoipCidrs. To allocate an Elastic IP address from your +// address pool, use AllocateAddress with either the specific address from the +// address pool or the ID of the address pool. +// +// 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 ProvisionByoipCidr for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ProvisionByoipCidr +func (c *EC2) ProvisionByoipCidr(input *ProvisionByoipCidrInput) (*ProvisionByoipCidrOutput, error) { + req, out := c.ProvisionByoipCidrRequest(input) + return out, req.Send() +} + +// ProvisionByoipCidrWithContext is the same as ProvisionByoipCidr with the addition of +// the ability to pass a context and additional request options. +// +// See ProvisionByoipCidr 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) ProvisionByoipCidrWithContext(ctx aws.Context, input *ProvisionByoipCidrInput, opts ...request.Option) (*ProvisionByoipCidrOutput, error) { + req, out := c.ProvisionByoipCidrRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPurchaseHostReservation = "PurchaseHostReservation" // PurchaseHostReservationRequest generates a "aws/request.Request" representing the // client's request for the PurchaseHostReservation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -20064,7 +24014,7 @@ const opPurchaseReservedInstancesOffering = "PurchaseReservedInstancesOffering" // PurchaseReservedInstancesOfferingRequest generates a "aws/request.Request" representing the // client's request for the PurchaseReservedInstancesOffering operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -20147,7 +24097,7 @@ const opPurchaseScheduledInstances = "PurchaseScheduledInstances" // PurchaseScheduledInstancesRequest generates a "aws/request.Request" representing the // client's request for the PurchaseScheduledInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -20230,7 +24180,7 @@ const opRebootInstances = "RebootInstances" // RebootInstancesRequest generates a "aws/request.Request" representing the // client's request for the RebootInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -20264,8 +24214,7 @@ func (c *EC2) RebootInstancesRequest(input *RebootInstancesInput) (req *request. output = &RebootInstancesOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -20316,7 +24265,7 @@ const opRegisterImage = "RegisterImage" // RegisterImageRequest generates a "aws/request.Request" representing the // client's request for the RegisterImage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -20416,12 +24365,90 @@ func (c *EC2) RegisterImageWithContext(ctx aws.Context, input *RegisterImageInpu return out, req.Send() } +const opRejectTransitGatewayVpcAttachment = "RejectTransitGatewayVpcAttachment" + +// RejectTransitGatewayVpcAttachmentRequest generates a "aws/request.Request" representing the +// client's request for the RejectTransitGatewayVpcAttachment 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 RejectTransitGatewayVpcAttachment for more information on using the RejectTransitGatewayVpcAttachment +// 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 RejectTransitGatewayVpcAttachmentRequest method. +// req, resp := client.RejectTransitGatewayVpcAttachmentRequest(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/RejectTransitGatewayVpcAttachment +func (c *EC2) RejectTransitGatewayVpcAttachmentRequest(input *RejectTransitGatewayVpcAttachmentInput) (req *request.Request, output *RejectTransitGatewayVpcAttachmentOutput) { + op := &request.Operation{ + Name: opRejectTransitGatewayVpcAttachment, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RejectTransitGatewayVpcAttachmentInput{} + } + + output = &RejectTransitGatewayVpcAttachmentOutput{} + req = c.newRequest(op, input, output) + return +} + +// RejectTransitGatewayVpcAttachment API operation for Amazon Elastic Compute Cloud. +// +// Rejects a request to attach a VPC to a transit gateway. +// +// The VPC attachment must be in the pendingAcceptance state. Use DescribeTransitGatewayVpcAttachments +// to view your pending VPC attachment requests. Use AcceptTransitGatewayVpcAttachment +// to accept a VPC attachment 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 +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation RejectTransitGatewayVpcAttachment for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RejectTransitGatewayVpcAttachment +func (c *EC2) RejectTransitGatewayVpcAttachment(input *RejectTransitGatewayVpcAttachmentInput) (*RejectTransitGatewayVpcAttachmentOutput, error) { + req, out := c.RejectTransitGatewayVpcAttachmentRequest(input) + return out, req.Send() +} + +// RejectTransitGatewayVpcAttachmentWithContext is the same as RejectTransitGatewayVpcAttachment with the addition of +// the ability to pass a context and additional request options. +// +// See RejectTransitGatewayVpcAttachment 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) RejectTransitGatewayVpcAttachmentWithContext(ctx aws.Context, input *RejectTransitGatewayVpcAttachmentInput, opts ...request.Option) (*RejectTransitGatewayVpcAttachmentOutput, error) { + req, out := c.RejectTransitGatewayVpcAttachmentRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opRejectVpcEndpointConnections = "RejectVpcEndpointConnections" // RejectVpcEndpointConnectionsRequest generates a "aws/request.Request" representing the // client's request for the RejectVpcEndpointConnections operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -20496,7 +24523,7 @@ const opRejectVpcPeeringConnection = "RejectVpcPeeringConnection" // RejectVpcPeeringConnectionRequest generates a "aws/request.Request" representing the // client's request for the RejectVpcPeeringConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -20574,7 +24601,7 @@ const opReleaseAddress = "ReleaseAddress" // ReleaseAddressRequest generates a "aws/request.Request" representing the // client's request for the ReleaseAddress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -20608,8 +24635,7 @@ func (c *EC2) ReleaseAddressRequest(input *ReleaseAddressInput) (req *request.Re output = &ReleaseAddressOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -20667,7 +24693,7 @@ const opReleaseHosts = "ReleaseHosts" // ReleaseHostsRequest generates a "aws/request.Request" representing the // client's request for the ReleaseHosts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -20709,7 +24735,7 @@ func (c *EC2) ReleaseHostsRequest(input *ReleaseHostsInput) (req *request.Reques // When you no longer want to use an On-Demand Dedicated Host it can be released. // On-Demand billing is stopped and the host goes into released state. The host // ID of Dedicated Hosts that have been released can no longer be specified -// in another request, for example, ModifyHosts. You must stop or terminate +// in another request, for example, to modify the host. You must stop or terminate // all instances on a host before it can be released. // // When Dedicated Hosts are released, it may take some time for them to stop @@ -20751,7 +24777,7 @@ const opReplaceIamInstanceProfileAssociation = "ReplaceIamInstanceProfileAssocia // ReplaceIamInstanceProfileAssociationRequest generates a "aws/request.Request" representing the // client's request for the ReplaceIamInstanceProfileAssociation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -20830,7 +24856,7 @@ const opReplaceNetworkAclAssociation = "ReplaceNetworkAclAssociation" // ReplaceNetworkAclAssociationRequest generates a "aws/request.Request" representing the // client's request for the ReplaceNetworkAclAssociation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -20909,7 +24935,7 @@ const opReplaceNetworkAclEntry = "ReplaceNetworkAclEntry" // ReplaceNetworkAclEntryRequest generates a "aws/request.Request" representing the // client's request for the ReplaceNetworkAclEntry operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -20943,8 +24969,7 @@ func (c *EC2) ReplaceNetworkAclEntryRequest(input *ReplaceNetworkAclEntryInput) output = &ReplaceNetworkAclEntryOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -20987,7 +25012,7 @@ const opReplaceRoute = "ReplaceRoute" // ReplaceRouteRequest generates a "aws/request.Request" representing the // client's request for the ReplaceRoute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -21021,8 +25046,7 @@ func (c *EC2) ReplaceRouteRequest(input *ReplaceRouteInput) (req *request.Reques output = &ReplaceRouteOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -21069,7 +25093,7 @@ const opReplaceRouteTableAssociation = "ReplaceRouteTableAssociation" // ReplaceRouteTableAssociationRequest generates a "aws/request.Request" representing the // client's request for the ReplaceRouteTableAssociation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -21146,12 +25170,86 @@ func (c *EC2) ReplaceRouteTableAssociationWithContext(ctx aws.Context, input *Re return out, req.Send() } +const opReplaceTransitGatewayRoute = "ReplaceTransitGatewayRoute" + +// ReplaceTransitGatewayRouteRequest generates a "aws/request.Request" representing the +// client's request for the ReplaceTransitGatewayRoute 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 ReplaceTransitGatewayRoute for more information on using the ReplaceTransitGatewayRoute +// 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 ReplaceTransitGatewayRouteRequest method. +// req, resp := client.ReplaceTransitGatewayRouteRequest(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/ReplaceTransitGatewayRoute +func (c *EC2) ReplaceTransitGatewayRouteRequest(input *ReplaceTransitGatewayRouteInput) (req *request.Request, output *ReplaceTransitGatewayRouteOutput) { + op := &request.Operation{ + Name: opReplaceTransitGatewayRoute, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ReplaceTransitGatewayRouteInput{} + } + + output = &ReplaceTransitGatewayRouteOutput{} + req = c.newRequest(op, input, output) + return +} + +// ReplaceTransitGatewayRoute API operation for Amazon Elastic Compute Cloud. +// +// Replaces the specified route in the specified transit gateway route table. +// +// 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 ReplaceTransitGatewayRoute for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ReplaceTransitGatewayRoute +func (c *EC2) ReplaceTransitGatewayRoute(input *ReplaceTransitGatewayRouteInput) (*ReplaceTransitGatewayRouteOutput, error) { + req, out := c.ReplaceTransitGatewayRouteRequest(input) + return out, req.Send() +} + +// ReplaceTransitGatewayRouteWithContext is the same as ReplaceTransitGatewayRoute with the addition of +// the ability to pass a context and additional request options. +// +// See ReplaceTransitGatewayRoute 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) ReplaceTransitGatewayRouteWithContext(ctx aws.Context, input *ReplaceTransitGatewayRouteInput, opts ...request.Option) (*ReplaceTransitGatewayRouteOutput, error) { + req, out := c.ReplaceTransitGatewayRouteRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opReportInstanceStatus = "ReportInstanceStatus" // ReportInstanceStatusRequest generates a "aws/request.Request" representing the // client's request for the ReportInstanceStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -21185,8 +25283,7 @@ func (c *EC2) ReportInstanceStatusRequest(input *ReportInstanceStatusInput) (req output = &ReportInstanceStatusOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -21233,7 +25330,7 @@ const opRequestSpotFleet = "RequestSpotFleet" // RequestSpotFleetRequest generates a "aws/request.Request" representing the // client's request for the RequestSpotFleet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -21331,7 +25428,7 @@ const opRequestSpotInstances = "RequestSpotInstances" // RequestSpotInstancesRequest generates a "aws/request.Request" representing the // client's request for the RequestSpotInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -21408,7 +25505,7 @@ const opResetFpgaImageAttribute = "ResetFpgaImageAttribute" // ResetFpgaImageAttributeRequest generates a "aws/request.Request" representing the // client's request for the ResetFpgaImageAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -21483,7 +25580,7 @@ const opResetImageAttribute = "ResetImageAttribute" // ResetImageAttributeRequest generates a "aws/request.Request" representing the // client's request for the ResetImageAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -21517,8 +25614,7 @@ func (c *EC2) ResetImageAttributeRequest(input *ResetImageAttributeInput) (req * output = &ResetImageAttributeOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -21561,7 +25657,7 @@ const opResetInstanceAttribute = "ResetInstanceAttribute" // ResetInstanceAttributeRequest generates a "aws/request.Request" representing the // client's request for the ResetInstanceAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -21595,8 +25691,7 @@ func (c *EC2) ResetInstanceAttributeRequest(input *ResetInstanceAttributeInput) output = &ResetInstanceAttributeOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -21645,7 +25740,7 @@ const opResetNetworkInterfaceAttribute = "ResetNetworkInterfaceAttribute" // ResetNetworkInterfaceAttributeRequest generates a "aws/request.Request" representing the // client's request for the ResetNetworkInterfaceAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -21679,8 +25774,7 @@ func (c *EC2) ResetNetworkInterfaceAttributeRequest(input *ResetNetworkInterface output = &ResetNetworkInterfaceAttributeOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -21722,7 +25816,7 @@ const opResetSnapshotAttribute = "ResetSnapshotAttribute" // ResetSnapshotAttributeRequest generates a "aws/request.Request" representing the // client's request for the ResetSnapshotAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -21756,8 +25850,7 @@ func (c *EC2) ResetSnapshotAttributeRequest(input *ResetSnapshotAttributeInput) output = &ResetSnapshotAttributeOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -21802,7 +25895,7 @@ const opRestoreAddressToClassic = "RestoreAddressToClassic" // RestoreAddressToClassicRequest generates a "aws/request.Request" representing the // client's request for the RestoreAddressToClassic operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -21874,12 +25967,86 @@ func (c *EC2) RestoreAddressToClassicWithContext(ctx aws.Context, input *Restore return out, req.Send() } +const opRevokeClientVpnIngress = "RevokeClientVpnIngress" + +// RevokeClientVpnIngressRequest generates a "aws/request.Request" representing the +// client's request for the RevokeClientVpnIngress 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 RevokeClientVpnIngress for more information on using the RevokeClientVpnIngress +// 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 RevokeClientVpnIngressRequest method. +// req, resp := client.RevokeClientVpnIngressRequest(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/RevokeClientVpnIngress +func (c *EC2) RevokeClientVpnIngressRequest(input *RevokeClientVpnIngressInput) (req *request.Request, output *RevokeClientVpnIngressOutput) { + op := &request.Operation{ + Name: opRevokeClientVpnIngress, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RevokeClientVpnIngressInput{} + } + + output = &RevokeClientVpnIngressOutput{} + req = c.newRequest(op, input, output) + return +} + +// RevokeClientVpnIngress API operation for Amazon Elastic Compute Cloud. +// +// Removes an ingress authorization rule from a Client VPN endpoint. +// +// 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 RevokeClientVpnIngress for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RevokeClientVpnIngress +func (c *EC2) RevokeClientVpnIngress(input *RevokeClientVpnIngressInput) (*RevokeClientVpnIngressOutput, error) { + req, out := c.RevokeClientVpnIngressRequest(input) + return out, req.Send() +} + +// RevokeClientVpnIngressWithContext is the same as RevokeClientVpnIngress with the addition of +// the ability to pass a context and additional request options. +// +// See RevokeClientVpnIngress 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) RevokeClientVpnIngressWithContext(ctx aws.Context, input *RevokeClientVpnIngressInput, opts ...request.Option) (*RevokeClientVpnIngressOutput, error) { + req, out := c.RevokeClientVpnIngressRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opRevokeSecurityGroupEgress = "RevokeSecurityGroupEgress" // RevokeSecurityGroupEgressRequest generates a "aws/request.Request" representing the // client's request for the RevokeSecurityGroupEgress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -21913,8 +26080,7 @@ func (c *EC2) RevokeSecurityGroupEgressRequest(input *RevokeSecurityGroupEgressI output = &RevokeSecurityGroupEgressOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -21967,7 +26133,7 @@ const opRevokeSecurityGroupIngress = "RevokeSecurityGroupIngress" // RevokeSecurityGroupIngressRequest generates a "aws/request.Request" representing the // client's request for the RevokeSecurityGroupIngress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -22001,8 +26167,7 @@ func (c *EC2) RevokeSecurityGroupIngressRequest(input *RevokeSecurityGroupIngres output = &RevokeSecurityGroupIngressOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -22058,7 +26223,7 @@ const opRunInstances = "RunInstances" // RunInstancesRequest generates a "aws/request.Request" representing the // client's request for the RunInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -22185,7 +26350,7 @@ const opRunScheduledInstances = "RunScheduledInstances" // RunScheduledInstancesRequest generates a "aws/request.Request" representing the // client's request for the RunScheduledInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -22264,12 +26429,86 @@ func (c *EC2) RunScheduledInstancesWithContext(ctx aws.Context, input *RunSchedu return out, req.Send() } +const opSearchTransitGatewayRoutes = "SearchTransitGatewayRoutes" + +// SearchTransitGatewayRoutesRequest generates a "aws/request.Request" representing the +// client's request for the SearchTransitGatewayRoutes 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 SearchTransitGatewayRoutes for more information on using the SearchTransitGatewayRoutes +// 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 SearchTransitGatewayRoutesRequest method. +// req, resp := client.SearchTransitGatewayRoutesRequest(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/SearchTransitGatewayRoutes +func (c *EC2) SearchTransitGatewayRoutesRequest(input *SearchTransitGatewayRoutesInput) (req *request.Request, output *SearchTransitGatewayRoutesOutput) { + op := &request.Operation{ + Name: opSearchTransitGatewayRoutes, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &SearchTransitGatewayRoutesInput{} + } + + output = &SearchTransitGatewayRoutesOutput{} + req = c.newRequest(op, input, output) + return +} + +// SearchTransitGatewayRoutes API operation for Amazon Elastic Compute Cloud. +// +// Searches for routes in the specified transit gateway route table. +// +// 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 SearchTransitGatewayRoutes for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/SearchTransitGatewayRoutes +func (c *EC2) SearchTransitGatewayRoutes(input *SearchTransitGatewayRoutesInput) (*SearchTransitGatewayRoutesOutput, error) { + req, out := c.SearchTransitGatewayRoutesRequest(input) + return out, req.Send() +} + +// SearchTransitGatewayRoutesWithContext is the same as SearchTransitGatewayRoutes with the addition of +// the ability to pass a context and additional request options. +// +// See SearchTransitGatewayRoutes 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) SearchTransitGatewayRoutesWithContext(ctx aws.Context, input *SearchTransitGatewayRoutesInput, opts ...request.Option) (*SearchTransitGatewayRoutesOutput, error) { + req, out := c.SearchTransitGatewayRoutesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opStartInstances = "StartInstances" // StartInstancesRequest generates a "aws/request.Request" representing the // client's request for the StartInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -22365,7 +26604,7 @@ const opStopInstances = "StopInstances" // StopInstancesRequest generates a "aws/request.Request" representing the // client's request for the StopInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -22406,6 +26645,12 @@ func (c *EC2) StopInstancesRequest(input *StopInstancesInput) (req *request.Requ // // Stops an Amazon EBS-backed instance. // +// You can use the Stop action to hibernate an instance if the instance is enabled +// for hibernation (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#enabling-hibernation) +// and it meets the hibernation prerequisites (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#hibernating-prerequisites). +// For more information, see Hibernate Your Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) +// in the Amazon Elastic Compute Cloud 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 @@ -22416,20 +26661,25 @@ func (c *EC2) StopInstancesRequest(input *StopInstancesInput) (req *request.Requ // your Linux instance, Amazon EC2 charges a one-minute minimum for instance // usage, and thereafter charges per second for instance usage. // -// You can't start or stop Spot Instances, and you can't stop instance store-backed -// instances. +// You can't start, stop, or hibernate Spot Instances, and you can't stop or +// hibernate instance store-backed instances. For information about using hibernation +// for Spot Instances, see Hibernating Interrupted Spot Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-interruptions.html#hibernate-spot-instances) +// in the Amazon Elastic Compute Cloud User Guide. // -// When you stop an instance, we shut it down. You can restart your instance -// at any time. Before stopping an instance, make sure it is in a state from -// which it can be restarted. Stopping an instance does not preserve data stored -// in RAM. -// -// Stopping an instance is different to rebooting or terminating it. For example, -// when you stop an instance, the root device and any other devices attached -// to the instance persist. When you terminate an instance, the root device -// and any other devices attached during the instance launch are automatically -// deleted. For more information about the differences between rebooting, stopping, -// and terminating instances, see Instance Lifecycle (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html) +// 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 +// sure it is in a state from which it can be restarted. Stopping an instance +// does not preserve data stored in RAM, but hibernating an instance does preserve +// data stored in RAM. If an instance cannot hibernate successfully, a normal +// shutdown occurs. +// +// Stopping and hibernating an instance is different to rebooting or terminating +// it. For example, when you stop or hibernate an instance, the root device +// and any other devices attached to the instance persist. When you terminate +// an instance, the root device and any other devices attached during the instance +// launch are automatically deleted. For more information about the differences +// between rebooting, stopping, hibernating, and terminating instances, see +// Instance Lifecycle (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html) // in the Amazon Elastic Compute Cloud User Guide. // // When you stop an instance, we attempt to shut it down forcibly after a short @@ -22466,12 +26716,88 @@ func (c *EC2) StopInstancesWithContext(ctx aws.Context, input *StopInstancesInpu return out, req.Send() } +const opTerminateClientVpnConnections = "TerminateClientVpnConnections" + +// TerminateClientVpnConnectionsRequest generates a "aws/request.Request" representing the +// client's request for the TerminateClientVpnConnections 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 TerminateClientVpnConnections for more information on using the TerminateClientVpnConnections +// 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 TerminateClientVpnConnectionsRequest method. +// req, resp := client.TerminateClientVpnConnectionsRequest(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/TerminateClientVpnConnections +func (c *EC2) TerminateClientVpnConnectionsRequest(input *TerminateClientVpnConnectionsInput) (req *request.Request, output *TerminateClientVpnConnectionsOutput) { + op := &request.Operation{ + Name: opTerminateClientVpnConnections, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TerminateClientVpnConnectionsInput{} + } + + output = &TerminateClientVpnConnectionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// TerminateClientVpnConnections API operation for Amazon Elastic Compute Cloud. +// +// Terminates active Client VPN endpoint connections. This action can be used +// to terminate a specific client connection, or up to five connections established +// by a specific 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 Amazon Elastic Compute Cloud's +// API operation TerminateClientVpnConnections for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/TerminateClientVpnConnections +func (c *EC2) TerminateClientVpnConnections(input *TerminateClientVpnConnectionsInput) (*TerminateClientVpnConnectionsOutput, error) { + req, out := c.TerminateClientVpnConnectionsRequest(input) + return out, req.Send() +} + +// TerminateClientVpnConnectionsWithContext is the same as TerminateClientVpnConnections with the addition of +// the ability to pass a context and additional request options. +// +// See TerminateClientVpnConnections 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) TerminateClientVpnConnectionsWithContext(ctx aws.Context, input *TerminateClientVpnConnectionsInput, opts ...request.Option) (*TerminateClientVpnConnectionsOutput, error) { + req, out := c.TerminateClientVpnConnectionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opTerminateInstances = "TerminateInstances" // TerminateInstancesRequest generates a "aws/request.Request" representing the // client's request for the TerminateInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -22569,7 +26895,7 @@ const opUnassignIpv6Addresses = "UnassignIpv6Addresses" // UnassignIpv6AddressesRequest generates a "aws/request.Request" representing the // client's request for the UnassignIpv6Addresses operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -22643,7 +26969,7 @@ const opUnassignPrivateIpAddresses = "UnassignPrivateIpAddresses" // UnassignPrivateIpAddressesRequest generates a "aws/request.Request" representing the // client's request for the UnassignPrivateIpAddresses operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -22677,8 +27003,7 @@ func (c *EC2) UnassignPrivateIpAddressesRequest(input *UnassignPrivateIpAddresse output = &UnassignPrivateIpAddressesOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(ec2query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -22719,7 +27044,7 @@ const opUnmonitorInstances = "UnmonitorInstances" // UnmonitorInstancesRequest generates a "aws/request.Request" representing the // client's request for the UnmonitorInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -22795,7 +27120,7 @@ const opUpdateSecurityGroupRuleDescriptionsEgress = "UpdateSecurityGroupRuleDesc // UpdateSecurityGroupRuleDescriptionsEgressRequest generates a "aws/request.Request" representing the // client's request for the UpdateSecurityGroupRuleDescriptionsEgress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -22875,7 +27200,7 @@ const opUpdateSecurityGroupRuleDescriptionsIngress = "UpdateSecurityGroupRuleDes // UpdateSecurityGroupRuleDescriptionsIngressRequest generates a "aws/request.Request" representing the // client's request for the UpdateSecurityGroupRuleDescriptionsIngress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -22950,6 +27275,87 @@ func (c *EC2) UpdateSecurityGroupRuleDescriptionsIngressWithContext(ctx aws.Cont return out, req.Send() } +const opWithdrawByoipCidr = "WithdrawByoipCidr" + +// WithdrawByoipCidrRequest generates a "aws/request.Request" representing the +// client's request for the WithdrawByoipCidr 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 WithdrawByoipCidr for more information on using the WithdrawByoipCidr +// 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 WithdrawByoipCidrRequest method. +// req, resp := client.WithdrawByoipCidrRequest(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/WithdrawByoipCidr +func (c *EC2) WithdrawByoipCidrRequest(input *WithdrawByoipCidrInput) (req *request.Request, output *WithdrawByoipCidrOutput) { + op := &request.Operation{ + Name: opWithdrawByoipCidr, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &WithdrawByoipCidrInput{} + } + + output = &WithdrawByoipCidrOutput{} + req = c.newRequest(op, input, output) + return +} + +// WithdrawByoipCidr API operation for Amazon Elastic Compute Cloud. +// +// Stops advertising an IPv4 address range that is provisioned as an address +// pool. +// +// You can perform this operation at most once every 10 seconds, even if you +// 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. +// +// 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 WithdrawByoipCidr for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/WithdrawByoipCidr +func (c *EC2) WithdrawByoipCidr(input *WithdrawByoipCidrInput) (*WithdrawByoipCidrOutput, error) { + req, out := c.WithdrawByoipCidrRequest(input) + return out, req.Send() +} + +// WithdrawByoipCidrWithContext is the same as WithdrawByoipCidr with the addition of +// the ability to pass a context and additional request options. +// +// See WithdrawByoipCidr 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) WithdrawByoipCidrWithContext(ctx aws.Context, input *WithdrawByoipCidrInput, opts ...request.Option) (*WithdrawByoipCidrOutput, error) { + req, out := c.WithdrawByoipCidrRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + // Contains the parameters for accepting the quote. type AcceptReservedInstancesExchangeQuoteInput struct { _ struct{} `type:"structure"` @@ -23046,6 +27452,79 @@ func (s *AcceptReservedInstancesExchangeQuoteOutput) SetExchangeId(v string) *Ac return s } +type AcceptTransitGatewayVpcAttachmentInput 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 attachment. + // + // TransitGatewayAttachmentId is a required field + TransitGatewayAttachmentId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s AcceptTransitGatewayVpcAttachmentInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AcceptTransitGatewayVpcAttachmentInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AcceptTransitGatewayVpcAttachmentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AcceptTransitGatewayVpcAttachmentInput"} + 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 *AcceptTransitGatewayVpcAttachmentInput) SetDryRun(v bool) *AcceptTransitGatewayVpcAttachmentInput { + s.DryRun = &v + return s +} + +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *AcceptTransitGatewayVpcAttachmentInput) SetTransitGatewayAttachmentId(v string) *AcceptTransitGatewayVpcAttachmentInput { + s.TransitGatewayAttachmentId = &v + return s +} + +type AcceptTransitGatewayVpcAttachmentOutput struct { + _ struct{} `type:"structure"` + + // The VPC attachment. + TransitGatewayVpcAttachment *TransitGatewayVpcAttachment `locationName:"transitGatewayVpcAttachment" type:"structure"` +} + +// String returns the string representation +func (s AcceptTransitGatewayVpcAttachmentOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AcceptTransitGatewayVpcAttachmentOutput) GoString() string { + return s.String() +} + +// SetTransitGatewayVpcAttachment sets the TransitGatewayVpcAttachment field's value. +func (s *AcceptTransitGatewayVpcAttachmentOutput) SetTransitGatewayVpcAttachment(v *TransitGatewayVpcAttachment) *AcceptTransitGatewayVpcAttachmentOutput { + s.TransitGatewayVpcAttachment = v + return s +} + type AcceptVpcEndpointConnectionsInput struct { _ struct{} `type:"structure"` @@ -23133,7 +27612,6 @@ func (s *AcceptVpcEndpointConnectionsOutput) SetUnsuccessful(v []*UnsuccessfulIt return s } -// Contains the parameters for AcceptVpcPeeringConnection. type AcceptVpcPeeringConnectionInput struct { _ struct{} `type:"structure"` @@ -23170,7 +27648,6 @@ func (s *AcceptVpcPeeringConnectionInput) SetVpcPeeringConnectionId(v string) *A return s } -// Contains the output of AcceptVpcPeeringConnection. type AcceptVpcPeeringConnectionOutput struct { _ struct{} `type:"structure"` @@ -23334,6 +27811,9 @@ type Address struct { // The Elastic IP address. PublicIp *string `locationName:"publicIp" type:"string"` + // The ID of an address pool. + PublicIpv4Pool *string `locationName:"publicIpv4Pool" type:"string"` + // Any tags assigned to the Elastic IP address. Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` } @@ -23396,17 +27876,96 @@ func (s *Address) SetPublicIp(v string) *Address { return s } +// SetPublicIpv4Pool sets the PublicIpv4Pool field's value. +func (s *Address) SetPublicIpv4Pool(v string) *Address { + s.PublicIpv4Pool = &v + return s +} + // SetTags sets the Tags field's value. func (s *Address) SetTags(v []*Tag) *Address { s.Tags = v return s } -// Contains the parameters for AllocateAddress. +type AdvertiseByoipCidrInput struct { + _ struct{} `type:"structure"` + + // The IPv4 address range, in CIDR notation. + // + // Cidr is a required field + Cidr *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"` +} + +// String returns the string representation +func (s AdvertiseByoipCidrInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AdvertiseByoipCidrInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AdvertiseByoipCidrInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AdvertiseByoipCidrInput"} + if s.Cidr == nil { + invalidParams.Add(request.NewErrParamRequired("Cidr")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCidr sets the Cidr field's value. +func (s *AdvertiseByoipCidrInput) SetCidr(v string) *AdvertiseByoipCidrInput { + s.Cidr = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *AdvertiseByoipCidrInput) SetDryRun(v bool) *AdvertiseByoipCidrInput { + s.DryRun = &v + return s +} + +type AdvertiseByoipCidrOutput struct { + _ struct{} `type:"structure"` + + // Information about the address range. + ByoipCidr *ByoipCidr `locationName:"byoipCidr" type:"structure"` +} + +// String returns the string representation +func (s AdvertiseByoipCidrOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AdvertiseByoipCidrOutput) GoString() string { + return s.String() +} + +// SetByoipCidr sets the ByoipCidr field's value. +func (s *AdvertiseByoipCidrOutput) SetByoipCidr(v *ByoipCidr) *AdvertiseByoipCidrOutput { + s.ByoipCidr = v + return s +} + type AllocateAddressInput struct { _ struct{} `type:"structure"` - // [EC2-VPC] The Elastic IP address to recover. + // [EC2-VPC] The Elastic IP address to recover or an IPv4 address from an address + // pool. Address *string `type:"string"` // Set to vpc to allocate the address for use with instances in a VPC. @@ -23419,6 +27978,11 @@ type AllocateAddressInput struct { // the required permissions, the error response is DryRunOperation. Otherwise, // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` + + // The ID of an address pool that you own. Use this parameter to let Amazon + // 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"` } // String returns the string representation @@ -23449,7 +28013,12 @@ func (s *AllocateAddressInput) SetDryRun(v bool) *AllocateAddressInput { return s } -// Contains the output of AllocateAddress. +// SetPublicIpv4Pool sets the PublicIpv4Pool field's value. +func (s *AllocateAddressInput) SetPublicIpv4Pool(v string) *AllocateAddressInput { + s.PublicIpv4Pool = &v + return s +} + type AllocateAddressOutput struct { _ struct{} `type:"structure"` @@ -23463,6 +28032,9 @@ type AllocateAddressOutput struct { // The Elastic IP address. PublicIp *string `locationName:"publicIp" type:"string"` + + // The ID of an address pool. + PublicIpv4Pool *string `locationName:"publicIpv4Pool" type:"string"` } // String returns the string representation @@ -23493,7 +28065,12 @@ func (s *AllocateAddressOutput) SetPublicIp(v string) *AllocateAddressOutput { return s } -// Contains the parameters for AllocateHosts. +// SetPublicIpv4Pool sets the PublicIpv4Pool field's value. +func (s *AllocateAddressOutput) SetPublicIpv4Pool(v string) *AllocateAddressOutput { + s.PublicIpv4Pool = &v + return s +} + type AllocateHostsInput struct { _ struct{} `type:"structure"` @@ -23525,6 +28102,9 @@ type AllocateHostsInput struct { // // Quantity is a required field Quantity *int64 `locationName:"quantity" type:"integer" required:"true"` + + // The tags to apply to the Dedicated Host during creation. + TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` } // String returns the string representation @@ -23586,6 +28166,12 @@ func (s *AllocateHostsInput) SetQuantity(v int64) *AllocateHostsInput { return s } +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *AllocateHostsInput) SetTagSpecifications(v []*TagSpecification) *AllocateHostsInput { + s.TagSpecifications = v + return s +} + // Contains the output of AllocateHosts. type AllocateHostsOutput struct { _ struct{} `type:"structure"` @@ -23644,6 +28230,108 @@ func (s *AllowedPrincipal) SetPrincipalType(v string) *AllowedPrincipal { return s } +type ApplySecurityGroupsToClientVpnTargetNetworkInput struct { + _ struct{} `type:"structure"` + + // The ID of the Client VPN endpoint. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *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 IDs of the security groups to apply to the associated target network. + // Up to 5 security groups can be applied to an associated target network. + // + // SecurityGroupIds is a required field + SecurityGroupIds []*string `locationName:"SecurityGroupId" locationNameList:"item" type:"list" required:"true"` + + // The ID of the VPC in which the associated target network is located. + // + // VpcId is a required field + VpcId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ApplySecurityGroupsToClientVpnTargetNetworkInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ApplySecurityGroupsToClientVpnTargetNetworkInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ApplySecurityGroupsToClientVpnTargetNetworkInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ApplySecurityGroupsToClientVpnTargetNetworkInput"} + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } + if s.SecurityGroupIds == nil { + invalidParams.Add(request.NewErrParamRequired("SecurityGroupIds")) + } + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *ApplySecurityGroupsToClientVpnTargetNetworkInput) SetClientVpnEndpointId(v string) *ApplySecurityGroupsToClientVpnTargetNetworkInput { + s.ClientVpnEndpointId = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *ApplySecurityGroupsToClientVpnTargetNetworkInput) SetDryRun(v bool) *ApplySecurityGroupsToClientVpnTargetNetworkInput { + s.DryRun = &v + return s +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *ApplySecurityGroupsToClientVpnTargetNetworkInput) SetSecurityGroupIds(v []*string) *ApplySecurityGroupsToClientVpnTargetNetworkInput { + s.SecurityGroupIds = v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *ApplySecurityGroupsToClientVpnTargetNetworkInput) SetVpcId(v string) *ApplySecurityGroupsToClientVpnTargetNetworkInput { + s.VpcId = &v + return s +} + +type ApplySecurityGroupsToClientVpnTargetNetworkOutput struct { + _ struct{} `type:"structure"` + + // The IDs of the applied security groups. + SecurityGroupIds []*string `locationName:"securityGroupIds" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s ApplySecurityGroupsToClientVpnTargetNetworkOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ApplySecurityGroupsToClientVpnTargetNetworkOutput) GoString() string { + return s.String() +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *ApplySecurityGroupsToClientVpnTargetNetworkOutput) SetSecurityGroupIds(v []*string) *ApplySecurityGroupsToClientVpnTargetNetworkOutput { + s.SecurityGroupIds = v + return s +} + type AssignIpv6AddressesInput struct { _ struct{} `type:"structure"` @@ -23822,7 +28510,6 @@ func (s AssignPrivateIpAddressesOutput) GoString() string { return s.String() } -// Contains the parameters for AssociateAddress. type AssociateAddressInput struct { _ struct{} `type:"structure"` @@ -23914,7 +28601,6 @@ func (s *AssociateAddressInput) SetPublicIp(v string) *AssociateAddressInput { return s } -// Contains the output of AssociateAddress. type AssociateAddressOutput struct { _ struct{} `type:"structure"` @@ -23939,7 +28625,102 @@ func (s *AssociateAddressOutput) SetAssociationId(v string) *AssociateAddressOut return s } -// Contains the parameters for AssociateDhcpOptions. +type AssociateClientVpnTargetNetworkInput struct { + _ struct{} `type:"structure"` + + // The ID of the Client VPN endpoint. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *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 subnet to associate with the Client VPN endpoint. + // + // SubnetId is a required field + SubnetId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s AssociateClientVpnTargetNetworkInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateClientVpnTargetNetworkInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateClientVpnTargetNetworkInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateClientVpnTargetNetworkInput"} + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } + if s.SubnetId == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *AssociateClientVpnTargetNetworkInput) SetClientVpnEndpointId(v string) *AssociateClientVpnTargetNetworkInput { + s.ClientVpnEndpointId = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *AssociateClientVpnTargetNetworkInput) SetDryRun(v bool) *AssociateClientVpnTargetNetworkInput { + s.DryRun = &v + return s +} + +// SetSubnetId sets the SubnetId field's value. +func (s *AssociateClientVpnTargetNetworkInput) SetSubnetId(v string) *AssociateClientVpnTargetNetworkInput { + s.SubnetId = &v + return s +} + +type AssociateClientVpnTargetNetworkOutput struct { + _ struct{} `type:"structure"` + + // The unique ID of the target network association. + AssociationId *string `locationName:"associationId" type:"string"` + + // The current state of the target network association. + Status *AssociationStatus `locationName:"status" type:"structure"` +} + +// String returns the string representation +func (s AssociateClientVpnTargetNetworkOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateClientVpnTargetNetworkOutput) GoString() string { + return s.String() +} + +// SetAssociationId sets the AssociationId field's value. +func (s *AssociateClientVpnTargetNetworkOutput) SetAssociationId(v string) *AssociateClientVpnTargetNetworkOutput { + s.AssociationId = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *AssociateClientVpnTargetNetworkOutput) SetStatus(v *AssociationStatus) *AssociateClientVpnTargetNetworkOutput { + s.Status = v + return s +} + type AssociateDhcpOptionsInput struct { _ struct{} `type:"structure"` @@ -24094,7 +28875,6 @@ func (s *AssociateIamInstanceProfileOutput) SetIamInstanceProfileAssociation(v * return s } -// Contains the parameters for AssociateRouteTable. type AssociateRouteTableInput struct { _ struct{} `type:"structure"` @@ -24159,7 +28939,6 @@ func (s *AssociateRouteTableInput) SetSubnetId(v string) *AssociateRouteTableInp return s } -// Contains the output of AssociateRouteTable. type AssociateRouteTableOutput struct { _ struct{} `type:"structure"` @@ -24268,6 +29047,93 @@ func (s *AssociateSubnetCidrBlockOutput) SetSubnetId(v string) *AssociateSubnetC return s } +type AssociateTransitGatewayRouteTableInput 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 attachment. + // + // TransitGatewayAttachmentId is a required field + TransitGatewayAttachmentId *string `type:"string" required:"true"` + + // The ID of the transit gateway route table. + // + // TransitGatewayRouteTableId is a required field + TransitGatewayRouteTableId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s AssociateTransitGatewayRouteTableInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateTransitGatewayRouteTableInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateTransitGatewayRouteTableInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateTransitGatewayRouteTableInput"} + if s.TransitGatewayAttachmentId == nil { + invalidParams.Add(request.NewErrParamRequired("TransitGatewayAttachmentId")) + } + if s.TransitGatewayRouteTableId == nil { + invalidParams.Add(request.NewErrParamRequired("TransitGatewayRouteTableId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *AssociateTransitGatewayRouteTableInput) SetDryRun(v bool) *AssociateTransitGatewayRouteTableInput { + s.DryRun = &v + return s +} + +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *AssociateTransitGatewayRouteTableInput) SetTransitGatewayAttachmentId(v string) *AssociateTransitGatewayRouteTableInput { + s.TransitGatewayAttachmentId = &v + return s +} + +// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. +func (s *AssociateTransitGatewayRouteTableInput) SetTransitGatewayRouteTableId(v string) *AssociateTransitGatewayRouteTableInput { + s.TransitGatewayRouteTableId = &v + return s +} + +type AssociateTransitGatewayRouteTableOutput struct { + _ struct{} `type:"structure"` + + // The ID of the association. + Association *TransitGatewayAssociation `locationName:"association" type:"structure"` +} + +// String returns the string representation +func (s AssociateTransitGatewayRouteTableOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateTransitGatewayRouteTableOutput) GoString() string { + return s.String() +} + +// SetAssociation sets the Association field's value. +func (s *AssociateTransitGatewayRouteTableOutput) SetAssociation(v *TransitGatewayAssociation) *AssociateTransitGatewayRouteTableOutput { + s.Association = v + return s +} + type AssociateVpcCidrBlockInput struct { _ struct{} `type:"structure"` @@ -24367,7 +29233,73 @@ func (s *AssociateVpcCidrBlockOutput) SetVpcId(v string) *AssociateVpcCidrBlockO return s } -// Contains the parameters for AttachClassicLinkVpc. +// Describes a target network that is associated with a Client VPN endpoint. +// A target network is a subnet in a VPC. +type AssociatedTargetNetwork struct { + _ struct{} `type:"structure"` + + // The ID of the subnet. + NetworkId *string `locationName:"networkId" type:"string"` + + // The target network type. + NetworkType *string `locationName:"networkType" type:"string" enum:"AssociatedNetworkType"` +} + +// String returns the string representation +func (s AssociatedTargetNetwork) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociatedTargetNetwork) GoString() string { + return s.String() +} + +// SetNetworkId sets the NetworkId field's value. +func (s *AssociatedTargetNetwork) SetNetworkId(v string) *AssociatedTargetNetwork { + s.NetworkId = &v + return s +} + +// SetNetworkType sets the NetworkType field's value. +func (s *AssociatedTargetNetwork) SetNetworkType(v string) *AssociatedTargetNetwork { + s.NetworkType = &v + return s +} + +// Describes the state of a target network association. +type AssociationStatus struct { + _ struct{} `type:"structure"` + + // The state of the target network association. + Code *string `locationName:"code" type:"string" enum:"AssociationStatusCode"` + + // A message about the status of the target network association, if applicable. + Message *string `locationName:"message" type:"string"` +} + +// String returns the string representation +func (s AssociationStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociationStatus) GoString() string { + return s.String() +} + +// SetCode sets the Code field's value. +func (s *AssociationStatus) SetCode(v string) *AssociationStatus { + s.Code = &v + return s +} + +// SetMessage sets the Message field's value. +func (s *AssociationStatus) SetMessage(v string) *AssociationStatus { + s.Message = &v + return s +} + type AttachClassicLinkVpcInput struct { _ struct{} `type:"structure"` @@ -24447,7 +29379,6 @@ func (s *AttachClassicLinkVpcInput) SetVpcId(v string) *AttachClassicLinkVpcInpu return s } -// Contains the output of AttachClassicLinkVpc. type AttachClassicLinkVpcOutput struct { _ struct{} `type:"structure"` @@ -24471,7 +29402,6 @@ func (s *AttachClassicLinkVpcOutput) SetReturn(v bool) *AttachClassicLinkVpcOutp return s } -// Contains the parameters for AttachInternetGateway. type AttachInternetGatewayInput struct { _ struct{} `type:"structure"` @@ -24870,7 +29800,193 @@ func (s *AttributeValue) SetValue(v string) *AttributeValue { return s } -// Contains the parameters for AuthorizeSecurityGroupEgress. +// Information about an authorization rule. +type AuthorizationRule struct { + _ struct{} `type:"structure"` + + // Indicates whether the authorization rule grants access to all clients. + AccessAll *bool `locationName:"accessAll" type:"boolean"` + + // The ID of the Client VPN endpoint with which the authorization rule is associated. + ClientVpnEndpointId *string `locationName:"clientVpnEndpointId" type:"string"` + + // A brief description of the authorization rule. + Description *string `locationName:"description" type:"string"` + + // The IPv4 address range, in CIDR notation, of the network to which the authorization + // rule applies. + DestinationCidr *string `locationName:"destinationCidr" type:"string"` + + // The ID of the Active Directory group to which the authorization rule grants + // access. + GroupId *string `locationName:"groupId" type:"string"` + + // The current state of the authorization rule. + Status *ClientVpnAuthorizationRuleStatus `locationName:"status" type:"structure"` +} + +// String returns the string representation +func (s AuthorizationRule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AuthorizationRule) GoString() string { + return s.String() +} + +// SetAccessAll sets the AccessAll field's value. +func (s *AuthorizationRule) SetAccessAll(v bool) *AuthorizationRule { + s.AccessAll = &v + return s +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *AuthorizationRule) SetClientVpnEndpointId(v string) *AuthorizationRule { + s.ClientVpnEndpointId = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *AuthorizationRule) SetDescription(v string) *AuthorizationRule { + s.Description = &v + return s +} + +// SetDestinationCidr sets the DestinationCidr field's value. +func (s *AuthorizationRule) SetDestinationCidr(v string) *AuthorizationRule { + s.DestinationCidr = &v + return s +} + +// SetGroupId sets the GroupId field's value. +func (s *AuthorizationRule) SetGroupId(v string) *AuthorizationRule { + s.GroupId = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *AuthorizationRule) SetStatus(v *ClientVpnAuthorizationRuleStatus) *AuthorizationRule { + s.Status = v + return s +} + +type AuthorizeClientVpnIngressInput struct { + _ struct{} `type:"structure"` + + // The ID of the Active Directory group to grant access. + AccessGroupId *string `type:"string"` + + // Indicates whether to grant access to all clients. Use true to grant all clients + // who successfully establish a VPN connection access to the network. + AuthorizeAllGroups *bool `type:"boolean"` + + // The ID of the Client VPN endpoint. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *string `type:"string" required:"true"` + + // A brief description of the authorization rule. + Description *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 IPv4 address range, in CIDR notation, of the network for which access + // is being authorized. + // + // TargetNetworkCidr is a required field + TargetNetworkCidr *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s AuthorizeClientVpnIngressInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AuthorizeClientVpnIngressInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AuthorizeClientVpnIngressInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AuthorizeClientVpnIngressInput"} + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } + if s.TargetNetworkCidr == nil { + invalidParams.Add(request.NewErrParamRequired("TargetNetworkCidr")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccessGroupId sets the AccessGroupId field's value. +func (s *AuthorizeClientVpnIngressInput) SetAccessGroupId(v string) *AuthorizeClientVpnIngressInput { + s.AccessGroupId = &v + return s +} + +// SetAuthorizeAllGroups sets the AuthorizeAllGroups field's value. +func (s *AuthorizeClientVpnIngressInput) SetAuthorizeAllGroups(v bool) *AuthorizeClientVpnIngressInput { + s.AuthorizeAllGroups = &v + return s +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *AuthorizeClientVpnIngressInput) SetClientVpnEndpointId(v string) *AuthorizeClientVpnIngressInput { + s.ClientVpnEndpointId = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *AuthorizeClientVpnIngressInput) SetDescription(v string) *AuthorizeClientVpnIngressInput { + s.Description = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *AuthorizeClientVpnIngressInput) SetDryRun(v bool) *AuthorizeClientVpnIngressInput { + s.DryRun = &v + return s +} + +// SetTargetNetworkCidr sets the TargetNetworkCidr field's value. +func (s *AuthorizeClientVpnIngressInput) SetTargetNetworkCidr(v string) *AuthorizeClientVpnIngressInput { + s.TargetNetworkCidr = &v + return s +} + +type AuthorizeClientVpnIngressOutput struct { + _ struct{} `type:"structure"` + + // The current state of the authorization rule. + Status *ClientVpnAuthorizationRuleStatus `locationName:"status" type:"structure"` +} + +// String returns the string representation +func (s AuthorizeClientVpnIngressOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AuthorizeClientVpnIngressOutput) GoString() string { + return s.String() +} + +// SetStatus sets the Status field's value. +func (s *AuthorizeClientVpnIngressOutput) SetStatus(v *ClientVpnAuthorizationRuleStatus) *AuthorizeClientVpnIngressOutput { + s.Status = v + return s +} + type AuthorizeSecurityGroupEgressInput struct { _ struct{} `type:"structure"` @@ -25002,7 +30118,6 @@ func (s AuthorizeSecurityGroupEgressOutput) GoString() string { return s.String() } -// Contains the parameters for AuthorizeSecurityGroupIngress. type AuthorizeSecurityGroupIngressInput struct { _ struct{} `type:"structure"` @@ -25162,6 +30277,9 @@ type AvailabilityZone struct { // The state of the Availability Zone. State *string `locationName:"zoneState" type:"string" enum:"AvailabilityZoneState"` + // The ID of the Availability Zone. + ZoneId *string `locationName:"zoneId" type:"string"` + // The name of the Availability Zone. ZoneName *string `locationName:"zoneName" type:"string"` } @@ -25194,6 +30312,12 @@ func (s *AvailabilityZone) SetState(v string) *AvailabilityZone { return s } +// SetZoneId sets the ZoneId field's value. +func (s *AvailabilityZone) SetZoneId(v string) *AvailabilityZone { + s.ZoneId = &v + return s +} + // SetZoneName sets the ZoneName field's value. func (s *AvailabilityZone) SetZoneName(v string) *AvailabilityZone { s.ZoneName = &v @@ -25562,6 +30686,59 @@ func (s *BundleTaskError) SetMessage(v string) *BundleTaskError { return s } +// Information about an address range that is provisioned for use with your +// AWS resources through bring your own IP addresses (BYOIP). +type ByoipCidr struct { + _ struct{} `type:"structure"` + + // The public IPv4 address range, in CIDR notation. + Cidr *string `locationName:"cidr" type:"string"` + + // The description of the address range. + Description *string `locationName:"description" type:"string"` + + // The state of the address pool. + State *string `locationName:"state" type:"string" enum:"ByoipCidrState"` + + // Upon success, contains the ID of the address pool. Otherwise, contains an + // error message. + StatusMessage *string `locationName:"statusMessage" type:"string"` +} + +// String returns the string representation +func (s ByoipCidr) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ByoipCidr) GoString() string { + return s.String() +} + +// SetCidr sets the Cidr field's value. +func (s *ByoipCidr) SetCidr(v string) *ByoipCidr { + s.Cidr = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *ByoipCidr) SetDescription(v string) *ByoipCidr { + s.Description = &v + return s +} + +// SetState sets the State field's value. +func (s *ByoipCidr) SetState(v string) *ByoipCidr { + s.State = &v + return s +} + +// SetStatusMessage sets the StatusMessage field's value. +func (s *ByoipCidr) SetStatusMessage(v string) *ByoipCidr { + s.StatusMessage = &v + return s +} + // Contains the parameters for CancelBundleTask. type CancelBundleTaskInput struct { _ struct{} `type:"structure"` @@ -25637,6 +30814,79 @@ func (s *CancelBundleTaskOutput) SetBundleTask(v *BundleTask) *CancelBundleTaskO return s } +type CancelCapacityReservationInput struct { + _ struct{} `type:"structure"` + + // The ID of the Capacity Reservation to be cancelled. + // + // CapacityReservationId is a required field + CapacityReservationId *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"` +} + +// String returns the string representation +func (s CancelCapacityReservationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelCapacityReservationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelCapacityReservationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelCapacityReservationInput"} + if s.CapacityReservationId == nil { + invalidParams.Add(request.NewErrParamRequired("CapacityReservationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCapacityReservationId sets the CapacityReservationId field's value. +func (s *CancelCapacityReservationInput) SetCapacityReservationId(v string) *CancelCapacityReservationInput { + s.CapacityReservationId = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *CancelCapacityReservationInput) SetDryRun(v bool) *CancelCapacityReservationInput { + s.DryRun = &v + return s +} + +type CancelCapacityReservationOutput 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 CancelCapacityReservationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelCapacityReservationOutput) GoString() string { + return s.String() +} + +// SetReturn sets the Return field's value. +func (s *CancelCapacityReservationOutput) SetReturn(v bool) *CancelCapacityReservationOutput { + s.Return = &v + return s +} + // Contains the parameters for CancelConversionTask. type CancelConversionTaskInput struct { _ struct{} `type:"structure"` @@ -25919,14 +31169,10 @@ type CancelSpotFleetRequestsError struct { _ struct{} `type:"structure"` // The error code. - // - // Code is a required field - Code *string `locationName:"code" type:"string" required:"true" enum:"CancelBatchErrorCode"` + Code *string `locationName:"code" type:"string" enum:"CancelBatchErrorCode"` // The description for the error code. - // - // Message is a required field - Message *string `locationName:"message" type:"string" required:"true"` + Message *string `locationName:"message" type:"string"` } // String returns the string representation @@ -25956,14 +31202,10 @@ type CancelSpotFleetRequestsErrorItem struct { _ struct{} `type:"structure"` // The error. - // - // Error is a required field - Error *CancelSpotFleetRequestsError `locationName:"error" type:"structure" required:"true"` + Error *CancelSpotFleetRequestsError `locationName:"error" type:"structure"` // The ID of the Spot Fleet request. - // - // SpotFleetRequestId is a required field - SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"` + SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string"` } // String returns the string representation @@ -26092,19 +31334,13 @@ type CancelSpotFleetRequestsSuccessItem struct { _ struct{} `type:"structure"` // The current state of the Spot Fleet request. - // - // CurrentSpotFleetRequestState is a required field - CurrentSpotFleetRequestState *string `locationName:"currentSpotFleetRequestState" type:"string" required:"true" enum:"BatchState"` + CurrentSpotFleetRequestState *string `locationName:"currentSpotFleetRequestState" type:"string" enum:"BatchState"` // The previous state of the Spot Fleet request. - // - // PreviousSpotFleetRequestState is a required field - PreviousSpotFleetRequestState *string `locationName:"previousSpotFleetRequestState" type:"string" required:"true" enum:"BatchState"` + PreviousSpotFleetRequestState *string `locationName:"previousSpotFleetRequestState" type:"string" enum:"BatchState"` // The ID of the Spot Fleet request. - // - // SpotFleetRequestId is a required field - SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"` + SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string"` } // String returns the string representation @@ -26243,6 +31479,450 @@ func (s *CancelledSpotInstanceRequest) SetState(v string) *CancelledSpotInstance return s } +// Describes a Capacity Reservation. +type CapacityReservation struct { + _ struct{} `type:"structure"` + + // The Availability Zone in which the capacity is reserved. + AvailabilityZone *string `locationName:"availabilityZone" type:"string"` + + // The remaining capacity. Indicates the number of instances that can be launched + // in the Capacity Reservation. + AvailableInstanceCount *int64 `locationName:"availableInstanceCount" type:"integer"` + + // The ID of the Capacity Reservation. + CapacityReservationId *string `locationName:"capacityReservationId" type:"string"` + + // The date and time at which the Capacity Reservation was created. + CreateDate *time.Time `locationName:"createDate" type:"timestamp"` + + // Indicates whether the Capacity Reservation supports EBS-optimized instances. + // This optimization provides dedicated throughput to Amazon EBS and an optimized + // configuration stack to provide optimal I/O performance. This optimization + // isn't available with all instance types. Additional usage charges apply when + // using an EBS- optimized instance. + EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"` + + // The date and time at which the Capacity Reservation expires. When a Capacity + // Reservation expires, the reserved capacity is released and you can no longer + // launch instances into it. The Capacity Reservation's state changes to expired + // when it reaches its end date and time. + EndDate *time.Time `locationName:"endDate" type:"timestamp"` + + // Indicates the way in which the Capacity Reservation ends. A Capacity Reservation + // can have one of the following end types: + // + // * unlimited - The Capacity Reservation remains active until you explicitly + // cancel it. + // + // * limited - The Capacity Reservation expires automatically at a specified + // date and time. + EndDateType *string `locationName:"endDateType" type:"string" enum:"EndDateType"` + + // Indicates whether the Capacity Reservation supports instances with temporary, + // block-level storage. + EphemeralStorage *bool `locationName:"ephemeralStorage" type:"boolean"` + + // Indicates the type of instance launches that the Capacity Reservation accepts. + // The options include: + // + // * open - The Capacity Reservation accepts all instances that have matching + // attributes (instance type, platform, and Availability Zone). Instances + // that have matching attributes launch into the Capacity Reservation automatically + // without specifying any additional parameters. + // + // * targeted - The Capacity Reservation only accepts instances that have + // matching attributes (instance type, platform, and Availability Zone), + // and explicitly target the Capacity Reservation. This ensures that only + // permitted instances can use the reserved capacity. + InstanceMatchCriteria *string `locationName:"instanceMatchCriteria" type:"string" enum:"InstanceMatchCriteria"` + + // The type of operating system for which the Capacity Reservation reserves + // capacity. + InstancePlatform *string `locationName:"instancePlatform" type:"string" enum:"CapacityReservationInstancePlatform"` + + // The type of instance for which the Capacity Reservation reserves capacity. + InstanceType *string `locationName:"instanceType" type:"string"` + + // 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. + // + // * cancelled - The Capacity Reservation expired automatically at the date + // and time specified in your request. The reserved capacity is no longer + // available for your use. + // + // * expired - 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. + State *string `locationName:"state" type:"string" enum:"CapacityReservationState"` + + // Any tags assigned to the Capacity Reservation. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + + // 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. + Tenancy *string `locationName:"tenancy" type:"string" enum:"CapacityReservationTenancy"` + + // The number of instances for which the Capacity Reservation reserves capacity. + TotalInstanceCount *int64 `locationName:"totalInstanceCount" type:"integer"` +} + +// String returns the string representation +func (s CapacityReservation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CapacityReservation) GoString() string { + return s.String() +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *CapacityReservation) SetAvailabilityZone(v string) *CapacityReservation { + s.AvailabilityZone = &v + return s +} + +// SetAvailableInstanceCount sets the AvailableInstanceCount field's value. +func (s *CapacityReservation) SetAvailableInstanceCount(v int64) *CapacityReservation { + s.AvailableInstanceCount = &v + return s +} + +// SetCapacityReservationId sets the CapacityReservationId field's value. +func (s *CapacityReservation) SetCapacityReservationId(v string) *CapacityReservation { + s.CapacityReservationId = &v + return s +} + +// SetCreateDate sets the CreateDate field's value. +func (s *CapacityReservation) SetCreateDate(v time.Time) *CapacityReservation { + s.CreateDate = &v + return s +} + +// SetEbsOptimized sets the EbsOptimized field's value. +func (s *CapacityReservation) SetEbsOptimized(v bool) *CapacityReservation { + s.EbsOptimized = &v + return s +} + +// SetEndDate sets the EndDate field's value. +func (s *CapacityReservation) SetEndDate(v time.Time) *CapacityReservation { + s.EndDate = &v + return s +} + +// SetEndDateType sets the EndDateType field's value. +func (s *CapacityReservation) SetEndDateType(v string) *CapacityReservation { + s.EndDateType = &v + return s +} + +// SetEphemeralStorage sets the EphemeralStorage field's value. +func (s *CapacityReservation) SetEphemeralStorage(v bool) *CapacityReservation { + s.EphemeralStorage = &v + return s +} + +// SetInstanceMatchCriteria sets the InstanceMatchCriteria field's value. +func (s *CapacityReservation) SetInstanceMatchCriteria(v string) *CapacityReservation { + s.InstanceMatchCriteria = &v + return s +} + +// SetInstancePlatform sets the InstancePlatform field's value. +func (s *CapacityReservation) SetInstancePlatform(v string) *CapacityReservation { + s.InstancePlatform = &v + return s +} + +// SetInstanceType sets the InstanceType field's value. +func (s *CapacityReservation) SetInstanceType(v string) *CapacityReservation { + s.InstanceType = &v + return s +} + +// SetState sets the State field's value. +func (s *CapacityReservation) SetState(v string) *CapacityReservation { + s.State = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CapacityReservation) SetTags(v []*Tag) *CapacityReservation { + s.Tags = v + return s +} + +// SetTenancy sets the Tenancy field's value. +func (s *CapacityReservation) SetTenancy(v string) *CapacityReservation { + s.Tenancy = &v + return s +} + +// SetTotalInstanceCount sets the TotalInstanceCount field's value. +func (s *CapacityReservation) SetTotalInstanceCount(v int64) *CapacityReservation { + s.TotalInstanceCount = &v + return s +} + +// Describes an instance's Capacity Reservation targeting option. You can specify +// only one option at a time. Use the CapacityReservationPreference parameter +// to configure the instance to run as an On-Demand Instance or to run in any +// open Capacity Reservation that has matching attributes (instance type, platform, +// Availability Zone). Use the CapacityReservationTarget parameter to explicitly +// target a specific Capacity Reservation. +type CapacityReservationSpecification struct { + _ struct{} `type:"structure"` + + // Indicates the instance's Capacity Reservation preferences. Possible preferences + // include: + // + // * open - The instance can run in any open Capacity Reservation that has + // matching attributes (instance type, platform, Availability Zone). + // + // * none - The instance avoids running in a Capacity Reservation even if + // one is available. The instance runs as an On-Demand Instance. + CapacityReservationPreference *string `type:"string" enum:"CapacityReservationPreference"` + + // Information about the target Capacity Reservation. + CapacityReservationTarget *CapacityReservationTarget `type:"structure"` +} + +// String returns the string representation +func (s CapacityReservationSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CapacityReservationSpecification) GoString() string { + return s.String() +} + +// SetCapacityReservationPreference sets the CapacityReservationPreference field's value. +func (s *CapacityReservationSpecification) SetCapacityReservationPreference(v string) *CapacityReservationSpecification { + s.CapacityReservationPreference = &v + return s +} + +// SetCapacityReservationTarget sets the CapacityReservationTarget field's value. +func (s *CapacityReservationSpecification) SetCapacityReservationTarget(v *CapacityReservationTarget) *CapacityReservationSpecification { + s.CapacityReservationTarget = v + return s +} + +// Describes the instance's Capacity Reservation targeting preferences. The +// action returns the capacityReservationPreference response element if the +// instance is configured to run in On-Demand capacity, or if it is configured +// in run in any open Capacity Reservation that has matching attributes (instance +// type, platform, Availability Zone). The action returns the capacityReservationTarget +// response element if the instance explicily targets a specific Capacity Reservation. +type CapacityReservationSpecificationResponse struct { + _ struct{} `type:"structure"` + + // Describes the instance's Capacity Reservation preferences. Possible preferences + // include: + // + // * open - The instance can run in any open Capacity Reservation that has + // matching attributes (instance type, platform, Availability Zone). + // + // * none - The instance avoids running in a Capacity Reservation even if + // one is available. The instance runs in On-Demand capacity. + CapacityReservationPreference *string `locationName:"capacityReservationPreference" type:"string" enum:"CapacityReservationPreference"` + + // Information about the targeted Capacity Reservation. + CapacityReservationTarget *CapacityReservationTargetResponse `locationName:"capacityReservationTarget" type:"structure"` +} + +// String returns the string representation +func (s CapacityReservationSpecificationResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CapacityReservationSpecificationResponse) GoString() string { + return s.String() +} + +// SetCapacityReservationPreference sets the CapacityReservationPreference field's value. +func (s *CapacityReservationSpecificationResponse) SetCapacityReservationPreference(v string) *CapacityReservationSpecificationResponse { + s.CapacityReservationPreference = &v + return s +} + +// SetCapacityReservationTarget sets the CapacityReservationTarget field's value. +func (s *CapacityReservationSpecificationResponse) SetCapacityReservationTarget(v *CapacityReservationTargetResponse) *CapacityReservationSpecificationResponse { + s.CapacityReservationTarget = v + return s +} + +// Describes a target Capacity Reservation. +type CapacityReservationTarget struct { + _ struct{} `type:"structure"` + + // The ID of the Capacity Reservation. + CapacityReservationId *string `type:"string"` +} + +// String returns the string representation +func (s CapacityReservationTarget) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CapacityReservationTarget) GoString() string { + return s.String() +} + +// SetCapacityReservationId sets the CapacityReservationId field's value. +func (s *CapacityReservationTarget) SetCapacityReservationId(v string) *CapacityReservationTarget { + s.CapacityReservationId = &v + return s +} + +// Describes a target Capacity Reservation. +type CapacityReservationTargetResponse struct { + _ struct{} `type:"structure"` + + // The ID of the Capacity Reservation. + CapacityReservationId *string `locationName:"capacityReservationId" type:"string"` +} + +// String returns the string representation +func (s CapacityReservationTargetResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CapacityReservationTargetResponse) GoString() string { + return s.String() +} + +// SetCapacityReservationId sets the CapacityReservationId field's value. +func (s *CapacityReservationTargetResponse) SetCapacityReservationId(v string) *CapacityReservationTargetResponse { + s.CapacityReservationId = &v + return s +} + +// Information about the client certificate used for authentication. +type CertificateAuthentication struct { + _ struct{} `type:"structure"` + + // The ARN of the client certificate. + ClientRootCertificateChain *string `locationName:"clientRootCertificateChain" type:"string"` +} + +// String returns the string representation +func (s CertificateAuthentication) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CertificateAuthentication) GoString() string { + return s.String() +} + +// SetClientRootCertificateChain sets the ClientRootCertificateChain field's value. +func (s *CertificateAuthentication) SetClientRootCertificateChain(v string) *CertificateAuthentication { + s.ClientRootCertificateChain = &v + return s +} + +// Information about the client certificate to be used for authentication. +type CertificateAuthenticationRequest struct { + _ struct{} `type:"structure"` + + // The ARN of the client certificate. The certificate must be signed by a certificate + // authority (CA) and it must be provisioned in AWS Certificate Manager (ACM). + ClientRootCertificateChainArn *string `type:"string"` +} + +// String returns the string representation +func (s CertificateAuthenticationRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CertificateAuthenticationRequest) GoString() string { + return s.String() +} + +// SetClientRootCertificateChainArn sets the ClientRootCertificateChainArn field's value. +func (s *CertificateAuthenticationRequest) SetClientRootCertificateChainArn(v string) *CertificateAuthenticationRequest { + s.ClientRootCertificateChainArn = &v + return s +} + +// Provides authorization for Amazon to bring a specific IP address range to +// a specific AWS account using bring your own IP addresses (BYOIP). +type CidrAuthorizationContext struct { + _ struct{} `type:"structure"` + + // The plain-text authorization message for the prefix and account. + // + // Message is a required field + Message *string `type:"string" required:"true"` + + // The signed authorization message for the prefix and account. + // + // Signature is a required field + Signature *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CidrAuthorizationContext) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CidrAuthorizationContext) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CidrAuthorizationContext) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CidrAuthorizationContext"} + if s.Message == nil { + invalidParams.Add(request.NewErrParamRequired("Message")) + } + if s.Signature == nil { + invalidParams.Add(request.NewErrParamRequired("Signature")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMessage sets the Message field's value. +func (s *CidrAuthorizationContext) SetMessage(v string) *CidrAuthorizationContext { + s.Message = &v + return s +} + +// SetSignature sets the Signature field's value. +func (s *CidrAuthorizationContext) SetSignature(v string) *CidrAuthorizationContext { + s.Signature = &v + return s +} + // Describes an IPv4 CIDR block. type CidrBlock struct { _ struct{} `type:"structure"` @@ -26356,9 +32036,7 @@ type ClassicLoadBalancer struct { _ struct{} `type:"structure"` // The name of the load balancer. - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` + Name *string `locationName:"name" type:"string"` } // String returns the string representation @@ -26371,19 +32049,6 @@ func (s ClassicLoadBalancer) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *ClassicLoadBalancer) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ClassicLoadBalancer"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - // SetName sets the Name field's value. func (s *ClassicLoadBalancer) SetName(v string) *ClassicLoadBalancer { s.Name = &v @@ -26396,9 +32061,7 @@ type ClassicLoadBalancersConfig struct { _ struct{} `type:"structure"` // One or more Classic Load Balancers. - // - // ClassicLoadBalancers is a required field - ClassicLoadBalancers []*ClassicLoadBalancer `locationName:"classicLoadBalancers" locationNameList:"item" min:"1" type:"list" required:"true"` + ClassicLoadBalancers []*ClassicLoadBalancer `locationName:"classicLoadBalancers" locationNameList:"item" min:"1" type:"list"` } // String returns the string representation @@ -26414,22 +32077,9 @@ func (s ClassicLoadBalancersConfig) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *ClassicLoadBalancersConfig) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ClassicLoadBalancersConfig"} - if s.ClassicLoadBalancers == nil { - invalidParams.Add(request.NewErrParamRequired("ClassicLoadBalancers")) - } if s.ClassicLoadBalancers != nil && len(s.ClassicLoadBalancers) < 1 { invalidParams.Add(request.NewErrParamMinLen("ClassicLoadBalancers", 1)) } - if s.ClassicLoadBalancers != nil { - for i, v := range s.ClassicLoadBalancers { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ClassicLoadBalancers", i), err.(request.ErrInvalidParams)) - } - } - } if invalidParams.Len() > 0 { return invalidParams @@ -26443,6 +32093,40 @@ func (s *ClassicLoadBalancersConfig) SetClassicLoadBalancers(v []*ClassicLoadBal return s } +// Describes the state of a client certificate revocation list. +type ClientCertificateRevocationListStatus struct { + _ struct{} `type:"structure"` + + // The state of the client certificate revocation list. + Code *string `locationName:"code" type:"string" enum:"ClientCertificateRevocationListStatusCode"` + + // A message about the status of the client certificate revocation list, if + // applicable. + Message *string `locationName:"message" type:"string"` +} + +// String returns the string representation +func (s ClientCertificateRevocationListStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ClientCertificateRevocationListStatus) GoString() string { + return s.String() +} + +// SetCode sets the Code field's value. +func (s *ClientCertificateRevocationListStatus) SetCode(v string) *ClientCertificateRevocationListStatus { + s.Code = &v + return s +} + +// SetMessage sets the Message field's value. +func (s *ClientCertificateRevocationListStatus) SetMessage(v string) *ClientCertificateRevocationListStatus { + s.Message = &v + return s +} + // Describes the client-specific data. type ClientData struct { _ struct{} `type:"structure"` @@ -26494,855 +32178,644 @@ func (s *ClientData) SetUploadStart(v time.Time) *ClientData { return s } -// Contains the parameters for ConfirmProductInstance. -type ConfirmProductInstanceInput struct { +// Describes the authentication methods used by a Client VPN endpoint. Client +// VPN supports Active Directory and mutual authentication. For more information, +// see Authentication (vpn/latest/clientvpn-admin/authentication-authrization.html#client-authentication) +// in the AWS Client VPN Admin Guide. +type ClientVpnAuthentication 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 `locationName:"dryRun" type:"boolean"` + // Information about the Active Directory, if applicable. + ActiveDirectory *DirectoryServiceAuthentication `locationName:"activeDirectory" type:"structure"` - // The ID of the instance. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` + // Information about the authentication certificates, if applicable. + MutualAuthentication *CertificateAuthentication `locationName:"mutualAuthentication" type:"structure"` - // The product code. This must be a product code that you own. - // - // ProductCode is a required field - ProductCode *string `type:"string" required:"true"` + // The authentication type used. + Type *string `locationName:"type" type:"string" enum:"ClientVpnAuthenticationType"` } // String returns the string representation -func (s ConfirmProductInstanceInput) String() string { +func (s ClientVpnAuthentication) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ConfirmProductInstanceInput) GoString() string { +func (s ClientVpnAuthentication) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *ConfirmProductInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ConfirmProductInstanceInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - if s.ProductCode == nil { - invalidParams.Add(request.NewErrParamRequired("ProductCode")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *ConfirmProductInstanceInput) SetDryRun(v bool) *ConfirmProductInstanceInput { - s.DryRun = &v +// SetActiveDirectory sets the ActiveDirectory field's value. +func (s *ClientVpnAuthentication) SetActiveDirectory(v *DirectoryServiceAuthentication) *ClientVpnAuthentication { + s.ActiveDirectory = v return s } -// SetInstanceId sets the InstanceId field's value. -func (s *ConfirmProductInstanceInput) SetInstanceId(v string) *ConfirmProductInstanceInput { - s.InstanceId = &v +// SetMutualAuthentication sets the MutualAuthentication field's value. +func (s *ClientVpnAuthentication) SetMutualAuthentication(v *CertificateAuthentication) *ClientVpnAuthentication { + s.MutualAuthentication = v return s } -// SetProductCode sets the ProductCode field's value. -func (s *ConfirmProductInstanceInput) SetProductCode(v string) *ConfirmProductInstanceInput { - s.ProductCode = &v +// SetType sets the Type field's value. +func (s *ClientVpnAuthentication) SetType(v string) *ClientVpnAuthentication { + s.Type = &v return s } -// Contains the output of ConfirmProductInstance. -type ConfirmProductInstanceOutput struct { +// Describes the authentication method to be used by a Client VPN endpoint. +// Client VPN supports Active Directory and mutual authentication. For more +// information, see Authentication (vpn/latest/clientvpn-admin/authentication-authrization.html#client-authentication) +// in the AWS Client VPN Admin Guide. +type ClientVpnAuthenticationRequest struct { _ struct{} `type:"structure"` - // The AWS 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"` + // Information about the Active Directory to be used, if applicable. You must + // provide this information if Type is directory-service-authentication. + ActiveDirectory *DirectoryServiceAuthenticationRequest `type:"structure"` - // The return value of the request. Returns true if the specified product code - // is owned by the requester and associated with the specified instance. - Return *bool `locationName:"return" type:"boolean"` + // Information about the authentication certificates to be used, if applicable. + // You must provide this information if Type is certificate-authentication. + MutualAuthentication *CertificateAuthenticationRequest `type:"structure"` + + // The type of client authentication to be used. Specify certificate-authentication + // to use certificate-based authentication, or directory-service-authentication + // to use Active Directory authentication. + Type *string `type:"string" enum:"ClientVpnAuthenticationType"` } // String returns the string representation -func (s ConfirmProductInstanceOutput) String() string { +func (s ClientVpnAuthenticationRequest) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ConfirmProductInstanceOutput) GoString() string { +func (s ClientVpnAuthenticationRequest) GoString() string { return s.String() } -// SetOwnerId sets the OwnerId field's value. -func (s *ConfirmProductInstanceOutput) SetOwnerId(v string) *ConfirmProductInstanceOutput { - s.OwnerId = &v +// SetActiveDirectory sets the ActiveDirectory field's value. +func (s *ClientVpnAuthenticationRequest) SetActiveDirectory(v *DirectoryServiceAuthenticationRequest) *ClientVpnAuthenticationRequest { + s.ActiveDirectory = v return s } -// SetReturn sets the Return field's value. -func (s *ConfirmProductInstanceOutput) SetReturn(v bool) *ConfirmProductInstanceOutput { - s.Return = &v +// SetMutualAuthentication sets the MutualAuthentication field's value. +func (s *ClientVpnAuthenticationRequest) SetMutualAuthentication(v *CertificateAuthenticationRequest) *ClientVpnAuthenticationRequest { + s.MutualAuthentication = v return s } -// Describes a connection notification for a VPC endpoint or VPC endpoint service. -type ConnectionNotification struct { - _ struct{} `type:"structure"` - - // The events for the notification. Valid values are Accept, Connect, Delete, - // and Reject. - ConnectionEvents []*string `locationName:"connectionEvents" locationNameList:"item" type:"list"` - - // The ARN of the SNS topic for the notification. - ConnectionNotificationArn *string `locationName:"connectionNotificationArn" type:"string"` - - // The ID of the notification. - ConnectionNotificationId *string `locationName:"connectionNotificationId" type:"string"` - - // The state of the notification. - ConnectionNotificationState *string `locationName:"connectionNotificationState" type:"string" enum:"ConnectionNotificationState"` +// SetType sets the Type field's value. +func (s *ClientVpnAuthenticationRequest) SetType(v string) *ClientVpnAuthenticationRequest { + s.Type = &v + return s +} - // The type of notification. - ConnectionNotificationType *string `locationName:"connectionNotificationType" type:"string" enum:"ConnectionNotificationType"` +// Describes the state of an authorization rule. +type ClientVpnAuthorizationRuleStatus struct { + _ struct{} `type:"structure"` - // The ID of the endpoint service. - ServiceId *string `locationName:"serviceId" type:"string"` + // The state of the authorization rule. + Code *string `locationName:"code" type:"string" enum:"ClientVpnAuthorizationRuleStatusCode"` - // The ID of the VPC endpoint. - VpcEndpointId *string `locationName:"vpcEndpointId" type:"string"` + // A message about the status of the authorization rule, if applicable. + Message *string `locationName:"message" type:"string"` } // String returns the string representation -func (s ConnectionNotification) String() string { +func (s ClientVpnAuthorizationRuleStatus) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ConnectionNotification) GoString() string { +func (s ClientVpnAuthorizationRuleStatus) GoString() string { return s.String() } -// SetConnectionEvents sets the ConnectionEvents field's value. -func (s *ConnectionNotification) SetConnectionEvents(v []*string) *ConnectionNotification { - s.ConnectionEvents = v +// SetCode sets the Code field's value. +func (s *ClientVpnAuthorizationRuleStatus) SetCode(v string) *ClientVpnAuthorizationRuleStatus { + s.Code = &v return s } -// SetConnectionNotificationArn sets the ConnectionNotificationArn field's value. -func (s *ConnectionNotification) SetConnectionNotificationArn(v string) *ConnectionNotification { - s.ConnectionNotificationArn = &v +// SetMessage sets the Message field's value. +func (s *ClientVpnAuthorizationRuleStatus) SetMessage(v string) *ClientVpnAuthorizationRuleStatus { + s.Message = &v return s } -// SetConnectionNotificationId sets the ConnectionNotificationId field's value. -func (s *ConnectionNotification) SetConnectionNotificationId(v string) *ConnectionNotification { - s.ConnectionNotificationId = &v - return s -} +// Describes a client connection. +type ClientVpnConnection struct { + _ struct{} `type:"structure"` -// SetConnectionNotificationState sets the ConnectionNotificationState field's value. -func (s *ConnectionNotification) SetConnectionNotificationState(v string) *ConnectionNotification { - s.ConnectionNotificationState = &v - return s -} + // The IP address of the client. + ClientIp *string `locationName:"clientIp" type:"string"` -// SetConnectionNotificationType sets the ConnectionNotificationType field's value. -func (s *ConnectionNotification) SetConnectionNotificationType(v string) *ConnectionNotification { - s.ConnectionNotificationType = &v - return s -} + // The ID of the Client VPN endpoint to which the client is connected. + ClientVpnEndpointId *string `locationName:"clientVpnEndpointId" type:"string"` -// SetServiceId sets the ServiceId field's value. -func (s *ConnectionNotification) SetServiceId(v string) *ConnectionNotification { - s.ServiceId = &v - return s -} + // The common name associated with the client. This is either the name of the + // client certificate, or the Active Directory user name. + CommonName *string `locationName:"commonName" type:"string"` -// SetVpcEndpointId sets the VpcEndpointId field's value. -func (s *ConnectionNotification) SetVpcEndpointId(v string) *ConnectionNotification { - s.VpcEndpointId = &v - return s -} + // The date and time the client connection was terminated. + ConnectionEndTime *string `locationName:"connectionEndTime" type:"string"` -// Describes a conversion task. -type ConversionTask struct { - _ struct{} `type:"structure"` + // The date and time the client connection was established. + ConnectionEstablishedTime *string `locationName:"connectionEstablishedTime" type:"string"` - // The ID of the conversion task. - ConversionTaskId *string `locationName:"conversionTaskId" type:"string"` + // The ID of the client connection. + ConnectionId *string `locationName:"connectionId" type:"string"` - // The time when the task expires. If the upload isn't complete before the expiration - // time, we automatically cancel the task. - ExpirationTime *string `locationName:"expirationTime" type:"string"` + // The number of bytes received by the client. + EgressBytes *string `locationName:"egressBytes" type:"string"` - // If the task is for importing an instance, this contains information about - // the import instance task. - ImportInstance *ImportInstanceTaskDetails `locationName:"importInstance" type:"structure"` + // The number of packets received by the client. + EgressPackets *string `locationName:"egressPackets" type:"string"` - // If the task is for importing a volume, this contains information about the - // import volume task. - ImportVolume *ImportVolumeTaskDetails `locationName:"importVolume" type:"structure"` + // The number of bytes sent by the client. + IngressBytes *string `locationName:"ingressBytes" type:"string"` - // The state of the conversion task. - State *string `locationName:"state" type:"string" enum:"ConversionTaskState"` + // The number of packets sent by the client. + IngressPackets *string `locationName:"ingressPackets" type:"string"` - // The status message related to the conversion task. - StatusMessage *string `locationName:"statusMessage" type:"string"` + // The current state of the client connection. + Status *ClientVpnConnectionStatus `locationName:"status" type:"structure"` - // Any tags assigned to the task. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + // The current date and time. + Timestamp *string `locationName:"timestamp" type:"string"` + + // The username of the client who established the client connection. This information + // is only provided if Active Directory client authentication is used. + Username *string `locationName:"username" type:"string"` } // String returns the string representation -func (s ConversionTask) String() string { +func (s ClientVpnConnection) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ConversionTask) GoString() string { +func (s ClientVpnConnection) GoString() string { return s.String() } -// SetConversionTaskId sets the ConversionTaskId field's value. -func (s *ConversionTask) SetConversionTaskId(v string) *ConversionTask { - s.ConversionTaskId = &v +// SetClientIp sets the ClientIp field's value. +func (s *ClientVpnConnection) SetClientIp(v string) *ClientVpnConnection { + s.ClientIp = &v return s } -// SetExpirationTime sets the ExpirationTime field's value. -func (s *ConversionTask) SetExpirationTime(v string) *ConversionTask { - s.ExpirationTime = &v +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *ClientVpnConnection) SetClientVpnEndpointId(v string) *ClientVpnConnection { + s.ClientVpnEndpointId = &v return s } -// SetImportInstance sets the ImportInstance field's value. -func (s *ConversionTask) SetImportInstance(v *ImportInstanceTaskDetails) *ConversionTask { - s.ImportInstance = v +// SetCommonName sets the CommonName field's value. +func (s *ClientVpnConnection) SetCommonName(v string) *ClientVpnConnection { + s.CommonName = &v return s } -// SetImportVolume sets the ImportVolume field's value. -func (s *ConversionTask) SetImportVolume(v *ImportVolumeTaskDetails) *ConversionTask { - s.ImportVolume = v +// SetConnectionEndTime sets the ConnectionEndTime field's value. +func (s *ClientVpnConnection) SetConnectionEndTime(v string) *ClientVpnConnection { + s.ConnectionEndTime = &v return s } -// SetState sets the State field's value. -func (s *ConversionTask) SetState(v string) *ConversionTask { - s.State = &v +// SetConnectionEstablishedTime sets the ConnectionEstablishedTime field's value. +func (s *ClientVpnConnection) SetConnectionEstablishedTime(v string) *ClientVpnConnection { + s.ConnectionEstablishedTime = &v return s } -// SetStatusMessage sets the StatusMessage field's value. -func (s *ConversionTask) SetStatusMessage(v string) *ConversionTask { - s.StatusMessage = &v +// SetConnectionId sets the ConnectionId field's value. +func (s *ClientVpnConnection) SetConnectionId(v string) *ClientVpnConnection { + s.ConnectionId = &v return s } -// SetTags sets the Tags field's value. -func (s *ConversionTask) SetTags(v []*Tag) *ConversionTask { - s.Tags = v +// SetEgressBytes sets the EgressBytes field's value. +func (s *ClientVpnConnection) SetEgressBytes(v string) *ClientVpnConnection { + s.EgressBytes = &v return s } -type CopyFpgaImageInput struct { - _ struct{} `type:"structure"` +// SetEgressPackets sets the EgressPackets field's value. +func (s *ClientVpnConnection) SetEgressPackets(v string) *ClientVpnConnection { + s.EgressPackets = &v + return s +} - // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). - ClientToken *string `type:"string"` +// SetIngressBytes sets the IngressBytes field's value. +func (s *ClientVpnConnection) SetIngressBytes(v string) *ClientVpnConnection { + s.IngressBytes = &v + return s +} - // The description for the new AFI. - Description *string `type:"string"` +// SetIngressPackets sets the IngressPackets field's value. +func (s *ClientVpnConnection) SetIngressPackets(v string) *ClientVpnConnection { + s.IngressPackets = &v + return s +} - // 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"` +// SetStatus sets the Status field's value. +func (s *ClientVpnConnection) SetStatus(v *ClientVpnConnectionStatus) *ClientVpnConnection { + s.Status = v + return s +} - // The name for the new AFI. The default is the name of the source AFI. - Name *string `type:"string"` +// SetTimestamp sets the Timestamp field's value. +func (s *ClientVpnConnection) SetTimestamp(v string) *ClientVpnConnection { + s.Timestamp = &v + return s +} - // The ID of the source AFI. - // - // SourceFpgaImageId is a required field - SourceFpgaImageId *string `type:"string" required:"true"` +// SetUsername sets the Username field's value. +func (s *ClientVpnConnection) SetUsername(v string) *ClientVpnConnection { + s.Username = &v + return s +} - // The region that contains the source AFI. - // - // SourceRegion is a required field - SourceRegion *string `type:"string" required:"true"` +// Describes the status of a client connection. +type ClientVpnConnectionStatus struct { + _ struct{} `type:"structure"` + + // The state of the client connection. + Code *string `locationName:"code" type:"string" enum:"ClientVpnConnectionStatusCode"` + + // A message about the status of the client connection, if applicable. + Message *string `locationName:"message" type:"string"` } // String returns the string representation -func (s CopyFpgaImageInput) String() string { +func (s ClientVpnConnectionStatus) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CopyFpgaImageInput) GoString() string { +func (s ClientVpnConnectionStatus) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CopyFpgaImageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CopyFpgaImageInput"} - if s.SourceFpgaImageId == nil { - invalidParams.Add(request.NewErrParamRequired("SourceFpgaImageId")) - } - if s.SourceRegion == nil { - invalidParams.Add(request.NewErrParamRequired("SourceRegion")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *CopyFpgaImageInput) SetClientToken(v string) *CopyFpgaImageInput { - s.ClientToken = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *CopyFpgaImageInput) SetDescription(v string) *CopyFpgaImageInput { - s.Description = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *CopyFpgaImageInput) SetDryRun(v bool) *CopyFpgaImageInput { - s.DryRun = &v - return s -} - -// SetName sets the Name field's value. -func (s *CopyFpgaImageInput) SetName(v string) *CopyFpgaImageInput { - s.Name = &v - return s -} - -// SetSourceFpgaImageId sets the SourceFpgaImageId field's value. -func (s *CopyFpgaImageInput) SetSourceFpgaImageId(v string) *CopyFpgaImageInput { - s.SourceFpgaImageId = &v +// SetCode sets the Code field's value. +func (s *ClientVpnConnectionStatus) SetCode(v string) *ClientVpnConnectionStatus { + s.Code = &v return s } -// SetSourceRegion sets the SourceRegion field's value. -func (s *CopyFpgaImageInput) SetSourceRegion(v string) *CopyFpgaImageInput { - s.SourceRegion = &v +// SetMessage sets the Message field's value. +func (s *ClientVpnConnectionStatus) SetMessage(v string) *ClientVpnConnectionStatus { + s.Message = &v return s } -type CopyFpgaImageOutput struct { +// Describes a Client VPN endpoint. +type ClientVpnEndpoint struct { _ struct{} `type:"structure"` - // The ID of the new AFI. - FpgaImageId *string `locationName:"fpgaImageId" type:"string"` -} + // Information about the associated target networks. A target network is a subnet + // in a VPC. + AssociatedTargetNetworks []*AssociatedTargetNetwork `locationName:"associatedTargetNetwork" locationNameList:"item" type:"list"` -// String returns the string representation -func (s CopyFpgaImageOutput) String() string { - return awsutil.Prettify(s) -} + // Information about the authentication method used by the Client VPN endpoint. + AuthenticationOptions []*ClientVpnAuthentication `locationName:"authenticationOptions" locationNameList:"item" type:"list"` -// GoString returns the string representation -func (s CopyFpgaImageOutput) GoString() string { - return s.String() -} + // The IPv4 address range, in CIDR notation, from which client IP addresses + // are assigned. + ClientCidrBlock *string `locationName:"clientCidrBlock" type:"string"` -// SetFpgaImageId sets the FpgaImageId field's value. -func (s *CopyFpgaImageOutput) SetFpgaImageId(v string) *CopyFpgaImageOutput { - s.FpgaImageId = &v - return s -} + // The ID of the Client VPN endpoint. + ClientVpnEndpointId *string `locationName:"clientVpnEndpointId" type:"string"` -// Contains the parameters for CopyImage. -type CopyImageInput struct { - _ struct{} `type:"structure"` + // Information about the client connection logging options for the Client VPN + // endpoint. + ConnectionLogOptions *ConnectionLogResponseOptions `locationName:"connectionLogOptions" type:"structure"` - // Unique, case-sensitive identifier you provide to ensure idempotency of the - // request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // in the Amazon Elastic Compute Cloud User Guide. - ClientToken *string `type:"string"` + // The date and time the Client VPN endpoint was created. + CreationTime *string `locationName:"creationTime" type:"string"` - // A description for the new AMI in the destination region. - Description *string `type:"string"` + // The date and time the Client VPN endpoint was deleted, if applicable. Information + // about deleted Client VPN endpoints is retained for 24 hours, unless a new + // Client VPN is created with the same name. + DeletionTime *string `locationName:"deletionTime" 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 `locationName:"dryRun" type:"boolean"` + // A brief description of the endpoint. + Description *string `locationName:"description" type:"string"` - // Specifies whether the destination snapshots of the copied image should be - // encrypted. The default CMK for EBS is used unless a non-default AWS Key Management - // Service (AWS KMS) CMK is specified with KmsKeyId. For more information, see - // Amazon EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) - // in the Amazon Elastic Compute Cloud User Guide. - Encrypted *bool `locationName:"encrypted" type:"boolean"` + // The DNS name to be used by clients when establishing a connection. + DnsName *string `locationName:"dnsName" type:"string"` - // An identifier for the AWS Key Management Service (AWS KMS) customer master - // key (CMK) to use when creating the encrypted volume. This parameter is only - // required if you want to use a non-default CMK; if this parameter is not specified, - // the default CMK for EBS is used. If a KmsKeyId is specified, the Encrypted - // flag must also be set. - // - // The CMK identifier may be provided in any of the following formats: - // - // * Key ID - // - // * Key alias, in the form alias/ExampleAlias - // - // * ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed - // by the region of the CMK, the AWS account ID of the CMK owner, the key - // namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. - // - // - // * ARN using key alias. The alias ARN contains the arn:aws:kms namespace, - // followed by the region of the CMK, the AWS account ID of the CMK owner, - // the alias namespace, and then the CMK alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. - // - // - // AWS parses KmsKeyId asynchronously, meaning that the action you call may - // appear to complete even though you provided an invalid identifier. This action - // will eventually report failure. - // - // The specified CMK must exist in the region that the snapshot is being copied - // to. - KmsKeyId *string `locationName:"kmsKeyId" type:"string"` + // The ARN of the server certificate. + ServerCertificateArn *string `locationName:"serverCertificateArn" type:"string"` - // The name of the new AMI in the destination region. - // - // Name is a required field - Name *string `type:"string" required:"true"` + // Indicates whether VPN split tunneling is supported. + SplitTunnel *bool `locationName:"splitTunnel" type:"boolean"` - // The ID of the AMI to copy. - // - // SourceImageId is a required field - SourceImageId *string `type:"string" required:"true"` + // The current state of the Client VPN endpoint. + Status *ClientVpnEndpointStatus `locationName:"status" type:"structure"` - // The name of the region that contains the AMI to copy. - // - // SourceRegion is a required field - SourceRegion *string `type:"string" required:"true"` + // The transport protocol used by the Client VPN endpoint. + TransportProtocol *string `locationName:"transportProtocol" type:"string" enum:"TransportProtocol"` + + // The protocol used by the VPN session. + VpnProtocol *string `locationName:"vpnProtocol" type:"string" enum:"VpnProtocol"` } // String returns the string representation -func (s CopyImageInput) String() string { +func (s ClientVpnEndpoint) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CopyImageInput) GoString() string { +func (s ClientVpnEndpoint) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CopyImageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CopyImageInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.SourceImageId == nil { - invalidParams.Add(request.NewErrParamRequired("SourceImageId")) - } - if s.SourceRegion == nil { - invalidParams.Add(request.NewErrParamRequired("SourceRegion")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetAssociatedTargetNetworks sets the AssociatedTargetNetworks field's value. +func (s *ClientVpnEndpoint) SetAssociatedTargetNetworks(v []*AssociatedTargetNetwork) *ClientVpnEndpoint { + s.AssociatedTargetNetworks = v + return s } -// SetClientToken sets the ClientToken field's value. -func (s *CopyImageInput) SetClientToken(v string) *CopyImageInput { - s.ClientToken = &v +// SetAuthenticationOptions sets the AuthenticationOptions field's value. +func (s *ClientVpnEndpoint) SetAuthenticationOptions(v []*ClientVpnAuthentication) *ClientVpnEndpoint { + s.AuthenticationOptions = v return s } -// SetDescription sets the Description field's value. -func (s *CopyImageInput) SetDescription(v string) *CopyImageInput { - s.Description = &v +// SetClientCidrBlock sets the ClientCidrBlock field's value. +func (s *ClientVpnEndpoint) SetClientCidrBlock(v string) *ClientVpnEndpoint { + s.ClientCidrBlock = &v return s } -// SetDryRun sets the DryRun field's value. -func (s *CopyImageInput) SetDryRun(v bool) *CopyImageInput { - s.DryRun = &v +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *ClientVpnEndpoint) SetClientVpnEndpointId(v string) *ClientVpnEndpoint { + s.ClientVpnEndpointId = &v return s } -// SetEncrypted sets the Encrypted field's value. -func (s *CopyImageInput) SetEncrypted(v bool) *CopyImageInput { - s.Encrypted = &v +// SetConnectionLogOptions sets the ConnectionLogOptions field's value. +func (s *ClientVpnEndpoint) SetConnectionLogOptions(v *ConnectionLogResponseOptions) *ClientVpnEndpoint { + s.ConnectionLogOptions = v return s } -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CopyImageInput) SetKmsKeyId(v string) *CopyImageInput { - s.KmsKeyId = &v +// SetCreationTime sets the CreationTime field's value. +func (s *ClientVpnEndpoint) SetCreationTime(v string) *ClientVpnEndpoint { + s.CreationTime = &v return s } -// SetName sets the Name field's value. -func (s *CopyImageInput) SetName(v string) *CopyImageInput { - s.Name = &v +// SetDeletionTime sets the DeletionTime field's value. +func (s *ClientVpnEndpoint) SetDeletionTime(v string) *ClientVpnEndpoint { + s.DeletionTime = &v return s } -// SetSourceImageId sets the SourceImageId field's value. -func (s *CopyImageInput) SetSourceImageId(v string) *CopyImageInput { - s.SourceImageId = &v +// SetDescription sets the Description field's value. +func (s *ClientVpnEndpoint) SetDescription(v string) *ClientVpnEndpoint { + s.Description = &v return s } -// SetSourceRegion sets the SourceRegion field's value. -func (s *CopyImageInput) SetSourceRegion(v string) *CopyImageInput { - s.SourceRegion = &v +// SetDnsName sets the DnsName field's value. +func (s *ClientVpnEndpoint) SetDnsName(v string) *ClientVpnEndpoint { + s.DnsName = &v return s } -// Contains the output of CopyImage. -type CopyImageOutput struct { - _ struct{} `type:"structure"` +// SetServerCertificateArn sets the ServerCertificateArn field's value. +func (s *ClientVpnEndpoint) SetServerCertificateArn(v string) *ClientVpnEndpoint { + s.ServerCertificateArn = &v + return s +} - // The ID of the new AMI. - ImageId *string `locationName:"imageId" type:"string"` +// SetSplitTunnel sets the SplitTunnel field's value. +func (s *ClientVpnEndpoint) SetSplitTunnel(v bool) *ClientVpnEndpoint { + s.SplitTunnel = &v + return s } -// String returns the string representation -func (s CopyImageOutput) String() string { - return awsutil.Prettify(s) +// SetStatus sets the Status field's value. +func (s *ClientVpnEndpoint) SetStatus(v *ClientVpnEndpointStatus) *ClientVpnEndpoint { + s.Status = v + return s } -// GoString returns the string representation -func (s CopyImageOutput) GoString() string { - return s.String() +// SetTransportProtocol sets the TransportProtocol field's value. +func (s *ClientVpnEndpoint) SetTransportProtocol(v string) *ClientVpnEndpoint { + s.TransportProtocol = &v + return s } -// SetImageId sets the ImageId field's value. -func (s *CopyImageOutput) SetImageId(v string) *CopyImageOutput { - s.ImageId = &v +// SetVpnProtocol sets the VpnProtocol field's value. +func (s *ClientVpnEndpoint) SetVpnProtocol(v string) *ClientVpnEndpoint { + s.VpnProtocol = &v return s } -// Contains the parameters for CopySnapshot. -type CopySnapshotInput struct { +// Describes the state of a Client VPN endpoint. +type ClientVpnEndpointStatus struct { _ struct{} `type:"structure"` - // A description for the EBS snapshot. - Description *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. - DestinationRegion *string `locationName:"destinationRegion" 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 `locationName:"dryRun" type:"boolean"` - - // Specifies whether the destination snapshot should be encrypted. You can encrypt - // a copy of an unencrypted snapshot using this flag, but you cannot use it - // to create an unencrypted copy from an encrypted snapshot. Your default CMK - // for EBS is used unless a non-default AWS Key Management Service (AWS KMS) - // CMK is specified with KmsKeyId. For more information, see Amazon EBS Encryption - // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) in - // the Amazon Elastic Compute Cloud User Guide. - Encrypted *bool `locationName:"encrypted" type:"boolean"` - - // An identifier for the AWS Key Management Service (AWS KMS) customer master - // key (CMK) to use when creating the encrypted volume. This parameter is only - // required if you want to use a non-default CMK; if this parameter is not specified, - // the default CMK for EBS is used. If a KmsKeyId is specified, the Encrypted - // flag must also be set. - // - // The CMK identifier may be provided in any of the following formats: - // - // * Key ID - // - // * Key alias - // - // * ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed - // by the region of the CMK, the AWS account ID of the CMK owner, the key - // namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. + // The state of the Client VPN endpoint. Possible states include: // + // * pending-associate - The Client VPN endpoint has been created but no + // target networks have been associated. The Client VPN endpoint cannot accept + // connections. // - // * ARN using key alias. The alias ARN contains the arn:aws:kms namespace, - // followed by the region of the CMK, the AWS account ID of the CMK owner, - // the alias namespace, and then the CMK alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. - // - // - // AWS parses KmsKeyId asynchronously, meaning that the action you call may - // appear to complete even though you provided an invalid identifier. The action - // will eventually fail. - KmsKeyId *string `locationName:"kmsKeyId" type:"string"` - - // When you copy an encrypted source snapshot using the Amazon EC2 Query API, - // you must supply a pre-signed URL. This parameter is optional for unencrypted - // snapshots. For more information, see Query Requests (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html). + // * available - The Client VPN endpoint has been created and a target network + // has been associated. The Client VPN endpoint can accept connections. // - // 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 - // by Using Query Parameters (AWS Signature Version 4) (http://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. - PresignedUrl *string `locationName:"presignedUrl" type:"string"` - - // The ID of the region that contains the snapshot to be copied. + // * deleting - The Client VPN endpoint is being deleted. The Client VPN + // endpoint cannot accept connections. // - // SourceRegion is a required field - SourceRegion *string `type:"string" required:"true"` + // * deleted - The Client VPN endpoint has been deleted. The Client VPN endpoint + // cannot accept connections. + Code *string `locationName:"code" type:"string" enum:"ClientVpnEndpointStatusCode"` - // The ID of the EBS snapshot to copy. - // - // SourceSnapshotId is a required field - SourceSnapshotId *string `type:"string" required:"true"` + // A message about the status of the Client VPN endpoint. + Message *string `locationName:"message" type:"string"` } // String returns the string representation -func (s CopySnapshotInput) String() string { +func (s ClientVpnEndpointStatus) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CopySnapshotInput) GoString() string { +func (s ClientVpnEndpointStatus) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CopySnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CopySnapshotInput"} - if s.SourceRegion == nil { - invalidParams.Add(request.NewErrParamRequired("SourceRegion")) - } - if s.SourceSnapshotId == nil { - invalidParams.Add(request.NewErrParamRequired("SourceSnapshotId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *CopySnapshotInput) SetDescription(v string) *CopySnapshotInput { - s.Description = &v +// SetCode sets the Code field's value. +func (s *ClientVpnEndpointStatus) SetCode(v string) *ClientVpnEndpointStatus { + s.Code = &v return s } -// SetDestinationRegion sets the DestinationRegion field's value. -func (s *CopySnapshotInput) SetDestinationRegion(v string) *CopySnapshotInput { - s.DestinationRegion = &v +// SetMessage sets the Message field's value. +func (s *ClientVpnEndpointStatus) SetMessage(v string) *ClientVpnEndpointStatus { + s.Message = &v return s } -// SetDryRun sets the DryRun field's value. -func (s *CopySnapshotInput) SetDryRun(v bool) *CopySnapshotInput { - s.DryRun = &v - return s -} +// Information about a Client VPN endpoint route. +type ClientVpnRoute struct { + _ struct{} `type:"structure"` -// SetEncrypted sets the Encrypted field's value. -func (s *CopySnapshotInput) SetEncrypted(v bool) *CopySnapshotInput { - s.Encrypted = &v - return s -} + // The ID of the Client VPN endpoint with which the route is associated. + ClientVpnEndpointId *string `locationName:"clientVpnEndpointId" type:"string"` -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CopySnapshotInput) SetKmsKeyId(v string) *CopySnapshotInput { - s.KmsKeyId = &v - return s -} + // A brief description of the route. + Description *string `locationName:"description" type:"string"` -// SetPresignedUrl sets the PresignedUrl field's value. -func (s *CopySnapshotInput) SetPresignedUrl(v string) *CopySnapshotInput { - s.PresignedUrl = &v - return s -} + // The IPv4 address range, in CIDR notation, of the route destination. + DestinationCidr *string `locationName:"destinationCidr" type:"string"` -// SetSourceRegion sets the SourceRegion field's value. -func (s *CopySnapshotInput) SetSourceRegion(v string) *CopySnapshotInput { - s.SourceRegion = &v - return s -} + // Indicates how the route was associated with the Client VPN endpoint. associate + // indicates that the route was automatically added when the target network + // was associated with the Client VPN endpoint. add-route indicates that the + // route was manually added using the CreateClientVpnRoute action. + Origin *string `locationName:"origin" type:"string"` -// SetSourceSnapshotId sets the SourceSnapshotId field's value. -func (s *CopySnapshotInput) SetSourceSnapshotId(v string) *CopySnapshotInput { - s.SourceSnapshotId = &v - return s -} + // The current state of the route. + Status *ClientVpnRouteStatus `locationName:"status" type:"structure"` -// Contains the output of CopySnapshot. -type CopySnapshotOutput struct { - _ struct{} `type:"structure"` + // The ID of the subnet through which traffic is routed. + TargetSubnet *string `locationName:"targetSubnet" type:"string"` - // The ID of the new snapshot. - SnapshotId *string `locationName:"snapshotId" type:"string"` + // The route type. + Type *string `locationName:"type" type:"string"` } // String returns the string representation -func (s CopySnapshotOutput) String() string { +func (s ClientVpnRoute) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CopySnapshotOutput) GoString() string { +func (s ClientVpnRoute) GoString() string { return s.String() } -// SetSnapshotId sets the SnapshotId field's value. -func (s *CopySnapshotOutput) SetSnapshotId(v string) *CopySnapshotOutput { - s.SnapshotId = &v +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *ClientVpnRoute) SetClientVpnEndpointId(v string) *ClientVpnRoute { + s.ClientVpnEndpointId = &v return s } -// The CPU options for the instance. -type CpuOptions struct { - _ struct{} `type:"structure"` - - // The number of CPU cores for the instance. - CoreCount *int64 `locationName:"coreCount" type:"integer"` +// SetDescription sets the Description field's value. +func (s *ClientVpnRoute) SetDescription(v string) *ClientVpnRoute { + s.Description = &v + return s +} - // The number of threads per CPU core. - ThreadsPerCore *int64 `locationName:"threadsPerCore" type:"integer"` +// SetDestinationCidr sets the DestinationCidr field's value. +func (s *ClientVpnRoute) SetDestinationCidr(v string) *ClientVpnRoute { + s.DestinationCidr = &v + return s } -// String returns the string representation -func (s CpuOptions) String() string { - return awsutil.Prettify(s) +// SetOrigin sets the Origin field's value. +func (s *ClientVpnRoute) SetOrigin(v string) *ClientVpnRoute { + s.Origin = &v + return s } -// GoString returns the string representation -func (s CpuOptions) GoString() string { - return s.String() +// SetStatus sets the Status field's value. +func (s *ClientVpnRoute) SetStatus(v *ClientVpnRouteStatus) *ClientVpnRoute { + s.Status = v + return s } -// SetCoreCount sets the CoreCount field's value. -func (s *CpuOptions) SetCoreCount(v int64) *CpuOptions { - s.CoreCount = &v +// SetTargetSubnet sets the TargetSubnet field's value. +func (s *ClientVpnRoute) SetTargetSubnet(v string) *ClientVpnRoute { + s.TargetSubnet = &v return s } -// SetThreadsPerCore sets the ThreadsPerCore field's value. -func (s *CpuOptions) SetThreadsPerCore(v int64) *CpuOptions { - s.ThreadsPerCore = &v +// SetType sets the Type field's value. +func (s *ClientVpnRoute) SetType(v string) *ClientVpnRoute { + s.Type = &v return s } -// The CPU options for the instance. Both the core count and threads per core -// must be specified in the request. -type CpuOptionsRequest struct { +// Describes the state of a Client VPN endpoint route. +type ClientVpnRouteStatus struct { _ struct{} `type:"structure"` - // The number of CPU cores for the instance. - CoreCount *int64 `type:"integer"` + // The state of the Client VPN endpoint route. + Code *string `locationName:"code" type:"string" enum:"ClientVpnRouteStatusCode"` - // The number of threads per CPU core. To disable Intel Hyper-Threading Technology - // for the instance, specify a value of 1. Otherwise, specify the default value - // of 2. - ThreadsPerCore *int64 `type:"integer"` + // A message about the status of the Client VPN endpoint route, if applicable. + Message *string `locationName:"message" type:"string"` } // String returns the string representation -func (s CpuOptionsRequest) String() string { +func (s ClientVpnRouteStatus) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CpuOptionsRequest) GoString() string { +func (s ClientVpnRouteStatus) GoString() string { return s.String() } -// SetCoreCount sets the CoreCount field's value. -func (s *CpuOptionsRequest) SetCoreCount(v int64) *CpuOptionsRequest { - s.CoreCount = &v +// SetCode sets the Code field's value. +func (s *ClientVpnRouteStatus) SetCode(v string) *ClientVpnRouteStatus { + s.Code = &v return s } -// SetThreadsPerCore sets the ThreadsPerCore field's value. -func (s *CpuOptionsRequest) SetThreadsPerCore(v int64) *CpuOptionsRequest { - s.ThreadsPerCore = &v +// SetMessage sets the Message field's value. +func (s *ClientVpnRouteStatus) SetMessage(v string) *ClientVpnRouteStatus { + s.Message = &v return s } -// Contains the parameters for CreateCustomerGateway. -type CreateCustomerGatewayInput struct { +type ConfirmProductInstanceInput struct { _ struct{} `type:"structure"` - // For devices that support BGP, the customer gateway's BGP ASN. - // - // Default: 65000 - // - // BgpAsn is a required field - BgpAsn *int64 `type:"integer" 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 `locationName:"dryRun" type:"boolean"` - // The Internet-routable IP address for the customer gateway's outside interface. - // The address must be static. + // The ID of the instance. // - // PublicIp is a required field - PublicIp *string `locationName:"IpAddress" type:"string" required:"true"` + // InstanceId is a required field + InstanceId *string `type:"string" required:"true"` - // The type of VPN connection that this customer gateway supports (ipsec.1). + // The product code. This must be a product code that you own. // - // Type is a required field - Type *string `type:"string" required:"true" enum:"GatewayType"` + // ProductCode is a required field + ProductCode *string `type:"string" required:"true"` } // String returns the string representation -func (s CreateCustomerGatewayInput) String() string { +func (s ConfirmProductInstanceInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateCustomerGatewayInput) GoString() string { +func (s ConfirmProductInstanceInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateCustomerGatewayInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateCustomerGatewayInput"} - if s.BgpAsn == nil { - invalidParams.Add(request.NewErrParamRequired("BgpAsn")) - } - if s.PublicIp == nil { - invalidParams.Add(request.NewErrParamRequired("PublicIp")) +func (s *ConfirmProductInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ConfirmProductInstanceInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) + if s.ProductCode == nil { + invalidParams.Add(request.NewErrParamRequired("ProductCode")) } if invalidParams.Len() > 0 { @@ -27351,287 +32824,355 @@ func (s *CreateCustomerGatewayInput) Validate() error { return nil } -// SetBgpAsn sets the BgpAsn field's value. -func (s *CreateCustomerGatewayInput) SetBgpAsn(v int64) *CreateCustomerGatewayInput { - s.BgpAsn = &v - return s -} - // SetDryRun sets the DryRun field's value. -func (s *CreateCustomerGatewayInput) SetDryRun(v bool) *CreateCustomerGatewayInput { +func (s *ConfirmProductInstanceInput) SetDryRun(v bool) *ConfirmProductInstanceInput { s.DryRun = &v return s } -// SetPublicIp sets the PublicIp field's value. -func (s *CreateCustomerGatewayInput) SetPublicIp(v string) *CreateCustomerGatewayInput { - s.PublicIp = &v +// SetInstanceId sets the InstanceId field's value. +func (s *ConfirmProductInstanceInput) SetInstanceId(v string) *ConfirmProductInstanceInput { + s.InstanceId = &v return s } -// SetType sets the Type field's value. -func (s *CreateCustomerGatewayInput) SetType(v string) *CreateCustomerGatewayInput { - s.Type = &v +// SetProductCode sets the ProductCode field's value. +func (s *ConfirmProductInstanceInput) SetProductCode(v string) *ConfirmProductInstanceInput { + s.ProductCode = &v return s } -// Contains the output of CreateCustomerGateway. -type CreateCustomerGatewayOutput struct { +type ConfirmProductInstanceOutput struct { _ struct{} `type:"structure"` - // Information about the customer gateway. - CustomerGateway *CustomerGateway `locationName:"customerGateway" type:"structure"` + // The AWS 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"` + + // The return value of the request. Returns true if the specified product code + // is owned by the requester and associated with the specified instance. + Return *bool `locationName:"return" type:"boolean"` } // String returns the string representation -func (s CreateCustomerGatewayOutput) String() string { +func (s ConfirmProductInstanceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateCustomerGatewayOutput) GoString() string { +func (s ConfirmProductInstanceOutput) GoString() string { return s.String() } -// SetCustomerGateway sets the CustomerGateway field's value. -func (s *CreateCustomerGatewayOutput) SetCustomerGateway(v *CustomerGateway) *CreateCustomerGatewayOutput { - s.CustomerGateway = v +// SetOwnerId sets the OwnerId field's value. +func (s *ConfirmProductInstanceOutput) SetOwnerId(v string) *ConfirmProductInstanceOutput { + s.OwnerId = &v return s } -type CreateDefaultSubnetInput struct { +// SetReturn sets the Return field's value. +func (s *ConfirmProductInstanceOutput) SetReturn(v bool) *ConfirmProductInstanceOutput { + s.Return = &v + return s +} + +// Describes the client connection logging options for the Client VPN endpoint. +type ConnectionLogOptions struct { _ struct{} `type:"structure"` - // The Availability Zone in which to create the default subnet. - // - // AvailabilityZone is a required field - AvailabilityZone *string `type:"string" required:"true"` + // The name of the CloudWatch Logs log group. + CloudwatchLogGroup *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 CloudWatch Logs log stream to which the connection data is + // published. + CloudwatchLogStream *string `type:"string"` + + // Indicates whether connection logging is enabled. + Enabled *bool `type:"boolean"` } // String returns the string representation -func (s CreateDefaultSubnetInput) String() string { +func (s ConnectionLogOptions) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateDefaultSubnetInput) GoString() string { +func (s ConnectionLogOptions) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDefaultSubnetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDefaultSubnetInput"} - if s.AvailabilityZone == nil { - invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) - } +// SetCloudwatchLogGroup sets the CloudwatchLogGroup field's value. +func (s *ConnectionLogOptions) SetCloudwatchLogGroup(v string) *ConnectionLogOptions { + s.CloudwatchLogGroup = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateDefaultSubnetInput) SetAvailabilityZone(v string) *CreateDefaultSubnetInput { - s.AvailabilityZone = &v +// SetCloudwatchLogStream sets the CloudwatchLogStream field's value. +func (s *ConnectionLogOptions) SetCloudwatchLogStream(v string) *ConnectionLogOptions { + s.CloudwatchLogStream = &v return s } -// SetDryRun sets the DryRun field's value. -func (s *CreateDefaultSubnetInput) SetDryRun(v bool) *CreateDefaultSubnetInput { - s.DryRun = &v +// SetEnabled sets the Enabled field's value. +func (s *ConnectionLogOptions) SetEnabled(v bool) *ConnectionLogOptions { + s.Enabled = &v return s } -type CreateDefaultSubnetOutput struct { +// Information about the client connection logging options for a Client VPN +// endpoint. +type ConnectionLogResponseOptions struct { _ struct{} `type:"structure"` - // Information about the subnet. - Subnet *Subnet `locationName:"subnet" type:"structure"` + // The name of the Amazon CloudWatch Logs log group to which connection logging + // data is published. + CloudwatchLogGroup *string `type:"string"` + + // The name of the Amazon CloudWatch Logs log stream to which connection logging + // data is published. + CloudwatchLogStream *string `type:"string"` + + // Indicates whether client connection logging is enabled for the Client VPN + // endpoint. + Enabled *bool `type:"boolean"` } // String returns the string representation -func (s CreateDefaultSubnetOutput) String() string { +func (s ConnectionLogResponseOptions) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateDefaultSubnetOutput) GoString() string { +func (s ConnectionLogResponseOptions) GoString() string { return s.String() } -// SetSubnet sets the Subnet field's value. -func (s *CreateDefaultSubnetOutput) SetSubnet(v *Subnet) *CreateDefaultSubnetOutput { - s.Subnet = v +// SetCloudwatchLogGroup sets the CloudwatchLogGroup field's value. +func (s *ConnectionLogResponseOptions) SetCloudwatchLogGroup(v string) *ConnectionLogResponseOptions { + s.CloudwatchLogGroup = &v return s } -// Contains the parameters for CreateDefaultVpc. -type CreateDefaultVpcInput struct { +// SetCloudwatchLogStream sets the CloudwatchLogStream field's value. +func (s *ConnectionLogResponseOptions) SetCloudwatchLogStream(v string) *ConnectionLogResponseOptions { + s.CloudwatchLogStream = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *ConnectionLogResponseOptions) SetEnabled(v bool) *ConnectionLogResponseOptions { + s.Enabled = &v + return s +} + +// Describes a connection notification for a VPC endpoint or VPC endpoint service. +type ConnectionNotification 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 events for the notification. Valid values are Accept, Connect, Delete, + // and Reject. + ConnectionEvents []*string `locationName:"connectionEvents" locationNameList:"item" type:"list"` + + // The ARN of the SNS topic for the notification. + ConnectionNotificationArn *string `locationName:"connectionNotificationArn" type:"string"` + + // The ID of the notification. + ConnectionNotificationId *string `locationName:"connectionNotificationId" type:"string"` + + // The state of the notification. + ConnectionNotificationState *string `locationName:"connectionNotificationState" type:"string" enum:"ConnectionNotificationState"` + + // The type of notification. + ConnectionNotificationType *string `locationName:"connectionNotificationType" type:"string" enum:"ConnectionNotificationType"` + + // The ID of the endpoint service. + ServiceId *string `locationName:"serviceId" type:"string"` + + // The ID of the VPC endpoint. + VpcEndpointId *string `locationName:"vpcEndpointId" type:"string"` } // String returns the string representation -func (s CreateDefaultVpcInput) String() string { +func (s ConnectionNotification) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateDefaultVpcInput) GoString() string { +func (s ConnectionNotification) GoString() string { return s.String() } -// SetDryRun sets the DryRun field's value. -func (s *CreateDefaultVpcInput) SetDryRun(v bool) *CreateDefaultVpcInput { - s.DryRun = &v +// SetConnectionEvents sets the ConnectionEvents field's value. +func (s *ConnectionNotification) SetConnectionEvents(v []*string) *ConnectionNotification { + s.ConnectionEvents = v return s } -// Contains the output of CreateDefaultVpc. -type CreateDefaultVpcOutput struct { - _ struct{} `type:"structure"` +// SetConnectionNotificationArn sets the ConnectionNotificationArn field's value. +func (s *ConnectionNotification) SetConnectionNotificationArn(v string) *ConnectionNotification { + s.ConnectionNotificationArn = &v + return s +} - // Information about the VPC. - Vpc *Vpc `locationName:"vpc" type:"structure"` +// SetConnectionNotificationId sets the ConnectionNotificationId field's value. +func (s *ConnectionNotification) SetConnectionNotificationId(v string) *ConnectionNotification { + s.ConnectionNotificationId = &v + return s } -// String returns the string representation -func (s CreateDefaultVpcOutput) String() string { - return awsutil.Prettify(s) +// SetConnectionNotificationState sets the ConnectionNotificationState field's value. +func (s *ConnectionNotification) SetConnectionNotificationState(v string) *ConnectionNotification { + s.ConnectionNotificationState = &v + return s } -// GoString returns the string representation -func (s CreateDefaultVpcOutput) GoString() string { - return s.String() +// SetConnectionNotificationType sets the ConnectionNotificationType field's value. +func (s *ConnectionNotification) SetConnectionNotificationType(v string) *ConnectionNotification { + s.ConnectionNotificationType = &v + return s } -// SetVpc sets the Vpc field's value. -func (s *CreateDefaultVpcOutput) SetVpc(v *Vpc) *CreateDefaultVpcOutput { - s.Vpc = v +// SetServiceId sets the ServiceId field's value. +func (s *ConnectionNotification) SetServiceId(v string) *ConnectionNotification { + s.ServiceId = &v return s } -// Contains the parameters for CreateDhcpOptions. -type CreateDhcpOptionsInput struct { +// SetVpcEndpointId sets the VpcEndpointId field's value. +func (s *ConnectionNotification) SetVpcEndpointId(v string) *ConnectionNotification { + s.VpcEndpointId = &v + return s +} + +// Describes a conversion task. +type ConversionTask struct { _ struct{} `type:"structure"` - // A DHCP configuration option. - // - // DhcpConfigurations is a required field - DhcpConfigurations []*NewDhcpConfiguration `locationName:"dhcpConfiguration" locationNameList:"item" type:"list" required:"true"` + // The ID of the conversion task. + ConversionTaskId *string `locationName:"conversionTaskId" 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 `locationName:"dryRun" type:"boolean"` + // The time when the task expires. If the upload isn't complete before the expiration + // time, we automatically cancel the task. + ExpirationTime *string `locationName:"expirationTime" type:"string"` + + // If the task is for importing an instance, this contains information about + // the import instance task. + ImportInstance *ImportInstanceTaskDetails `locationName:"importInstance" type:"structure"` + + // If the task is for importing a volume, this contains information about the + // import volume task. + ImportVolume *ImportVolumeTaskDetails `locationName:"importVolume" type:"structure"` + + // The state of the conversion task. + State *string `locationName:"state" type:"string" enum:"ConversionTaskState"` + + // The status message related to the conversion task. + StatusMessage *string `locationName:"statusMessage" type:"string"` + + // Any tags assigned to the task. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` } // String returns the string representation -func (s CreateDhcpOptionsInput) String() string { +func (s ConversionTask) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateDhcpOptionsInput) GoString() string { +func (s ConversionTask) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDhcpOptionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDhcpOptionsInput"} - if s.DhcpConfigurations == nil { - invalidParams.Add(request.NewErrParamRequired("DhcpConfigurations")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetConversionTaskId sets the ConversionTaskId field's value. +func (s *ConversionTask) SetConversionTaskId(v string) *ConversionTask { + s.ConversionTaskId = &v + return s } -// SetDhcpConfigurations sets the DhcpConfigurations field's value. -func (s *CreateDhcpOptionsInput) SetDhcpConfigurations(v []*NewDhcpConfiguration) *CreateDhcpOptionsInput { - s.DhcpConfigurations = v +// SetExpirationTime sets the ExpirationTime field's value. +func (s *ConversionTask) SetExpirationTime(v string) *ConversionTask { + s.ExpirationTime = &v return s } -// SetDryRun sets the DryRun field's value. -func (s *CreateDhcpOptionsInput) SetDryRun(v bool) *CreateDhcpOptionsInput { - s.DryRun = &v +// SetImportInstance sets the ImportInstance field's value. +func (s *ConversionTask) SetImportInstance(v *ImportInstanceTaskDetails) *ConversionTask { + s.ImportInstance = v return s } -// Contains the output of CreateDhcpOptions. -type CreateDhcpOptionsOutput struct { - _ struct{} `type:"structure"` - - // A set of DHCP options. - DhcpOptions *DhcpOptions `locationName:"dhcpOptions" type:"structure"` +// SetImportVolume sets the ImportVolume field's value. +func (s *ConversionTask) SetImportVolume(v *ImportVolumeTaskDetails) *ConversionTask { + s.ImportVolume = v + return s } -// String returns the string representation -func (s CreateDhcpOptionsOutput) String() string { - return awsutil.Prettify(s) +// SetState sets the State field's value. +func (s *ConversionTask) SetState(v string) *ConversionTask { + s.State = &v + return s } -// GoString returns the string representation -func (s CreateDhcpOptionsOutput) GoString() string { - return s.String() +// SetStatusMessage sets the StatusMessage field's value. +func (s *ConversionTask) SetStatusMessage(v string) *ConversionTask { + s.StatusMessage = &v + return s } -// SetDhcpOptions sets the DhcpOptions field's value. -func (s *CreateDhcpOptionsOutput) SetDhcpOptions(v *DhcpOptions) *CreateDhcpOptionsOutput { - s.DhcpOptions = v +// SetTags sets the Tags field's value. +func (s *ConversionTask) SetTags(v []*Tag) *ConversionTask { + s.Tags = v return s } -type CreateEgressOnlyInternetGatewayInput struct { +type CopyFpgaImageInput 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 (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). + // of the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). ClientToken *string `type:"string"` + // The description for the new AFI. + Description *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 VPC for which to create the egress-only internet gateway. + // The name for the new AFI. The default is the name of the source AFI. + Name *string `type:"string"` + + // The ID of the source AFI. // - // VpcId is a required field - VpcId *string `type:"string" required:"true"` + // SourceFpgaImageId is a required field + SourceFpgaImageId *string `type:"string" required:"true"` + + // The region that contains the source AFI. + // + // SourceRegion is a required field + SourceRegion *string `type:"string" required:"true"` } // String returns the string representation -func (s CreateEgressOnlyInternetGatewayInput) String() string { +func (s CopyFpgaImageInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateEgressOnlyInternetGatewayInput) GoString() string { +func (s CopyFpgaImageInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateEgressOnlyInternetGatewayInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateEgressOnlyInternetGatewayInput"} - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) +func (s *CopyFpgaImageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CopyFpgaImageInput"} + if s.SourceFpgaImageId == nil { + invalidParams.Add(request.NewErrParamRequired("SourceFpgaImageId")) + } + if s.SourceRegion == nil { + invalidParams.Add(request.NewErrParamRequired("SourceRegion")) } if invalidParams.Len() > 0 { @@ -27641,157 +33182,158 @@ func (s *CreateEgressOnlyInternetGatewayInput) Validate() error { } // SetClientToken sets the ClientToken field's value. -func (s *CreateEgressOnlyInternetGatewayInput) SetClientToken(v string) *CreateEgressOnlyInternetGatewayInput { +func (s *CopyFpgaImageInput) SetClientToken(v string) *CopyFpgaImageInput { s.ClientToken = &v return s } +// SetDescription sets the Description field's value. +func (s *CopyFpgaImageInput) SetDescription(v string) *CopyFpgaImageInput { + s.Description = &v + return s +} + // SetDryRun sets the DryRun field's value. -func (s *CreateEgressOnlyInternetGatewayInput) SetDryRun(v bool) *CreateEgressOnlyInternetGatewayInput { +func (s *CopyFpgaImageInput) SetDryRun(v bool) *CopyFpgaImageInput { s.DryRun = &v return s } -// SetVpcId sets the VpcId field's value. -func (s *CreateEgressOnlyInternetGatewayInput) SetVpcId(v string) *CreateEgressOnlyInternetGatewayInput { - s.VpcId = &v +// SetName sets the Name field's value. +func (s *CopyFpgaImageInput) SetName(v string) *CopyFpgaImageInput { + s.Name = &v return s } -type CreateEgressOnlyInternetGatewayOutput struct { - _ struct{} `type:"structure"` +// SetSourceFpgaImageId sets the SourceFpgaImageId field's value. +func (s *CopyFpgaImageInput) SetSourceFpgaImageId(v string) *CopyFpgaImageInput { + s.SourceFpgaImageId = &v + return s +} - // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. - ClientToken *string `locationName:"clientToken" type:"string"` +// SetSourceRegion sets the SourceRegion field's value. +func (s *CopyFpgaImageInput) SetSourceRegion(v string) *CopyFpgaImageInput { + s.SourceRegion = &v + return s +} - // Information about the egress-only internet gateway. - EgressOnlyInternetGateway *EgressOnlyInternetGateway `locationName:"egressOnlyInternetGateway" type:"structure"` +type CopyFpgaImageOutput struct { + _ struct{} `type:"structure"` + + // The ID of the new AFI. + FpgaImageId *string `locationName:"fpgaImageId" type:"string"` } // String returns the string representation -func (s CreateEgressOnlyInternetGatewayOutput) String() string { +func (s CopyFpgaImageOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateEgressOnlyInternetGatewayOutput) GoString() string { +func (s CopyFpgaImageOutput) GoString() string { return s.String() } -// SetClientToken sets the ClientToken field's value. -func (s *CreateEgressOnlyInternetGatewayOutput) SetClientToken(v string) *CreateEgressOnlyInternetGatewayOutput { - s.ClientToken = &v - return s -} - -// SetEgressOnlyInternetGateway sets the EgressOnlyInternetGateway field's value. -func (s *CreateEgressOnlyInternetGatewayOutput) SetEgressOnlyInternetGateway(v *EgressOnlyInternetGateway) *CreateEgressOnlyInternetGatewayOutput { - s.EgressOnlyInternetGateway = v +// SetFpgaImageId sets the FpgaImageId field's value. +func (s *CopyFpgaImageOutput) SetFpgaImageId(v string) *CopyFpgaImageOutput { + s.FpgaImageId = &v return s } -type CreateFleetInput struct { +// Contains the parameters for CopyImage. +type CopyImageInput struct { _ struct{} `type:"structure"` - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + // Unique, case-sensitive identifier you provide to ensure idempotency of the + // request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) + // in the Amazon Elastic Compute Cloud User Guide. ClientToken *string `type:"string"` + // A description for the new AMI in the destination region. + Description *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"` + DryRun *bool `locationName:"dryRun" type:"boolean"` - // Indicates whether running instances should be terminated if the total target - // capacity of the EC2 Fleet is decreased below the current size of the EC2 - // Fleet. - ExcessCapacityTerminationPolicy *string `type:"string" enum:"FleetExcessCapacityTerminationPolicy"` + // Specifies whether the destination snapshots of the copied image should be + // encrypted. You can encrypt a copy of an unencrypted snapshot, but you cannot + // create an unencrypted copy of an encrypted snapshot. The default CMK for + // EBS is used unless you specify a non-default AWS Key Management Service (AWS + // KMS) CMK using KmsKeyId. For more information, see Amazon EBS Encryption + // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) in + // the Amazon Elastic Compute Cloud User Guide. + Encrypted *bool `locationName:"encrypted" type:"boolean"` - // The configuration for the EC2 Fleet. + // An identifier for the AWS Key Management Service (AWS KMS) customer master + // key (CMK) to use when creating the encrypted volume. This parameter is only + // required if you want to use a non-default CMK; if this parameter is not specified, + // the default CMK for EBS is used. If a KmsKeyId is specified, the Encrypted + // flag must also be set. // - // LaunchTemplateConfigs is a required field - LaunchTemplateConfigs []*FleetLaunchTemplateConfigRequest `locationNameList:"item" type:"list" required:"true"` - - // The allocation strategy of On-Demand Instances in an EC2 Fleet. - OnDemandOptions *OnDemandOptionsRequest `type:"structure"` - - // Indicates whether EC2 Fleet should replace unhealthy instances. - 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 (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template). - // For information about tagging after launch, see Tagging Your Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources). - TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` - - // The TotalTargetCapacity, OnDemandTargetCapacity, SpotTargetCapacity, and - // DefaultCapacityType structure. + // The CMK identifier may be provided in any of the following formats: // - // TargetCapacitySpecification is a required field - TargetCapacitySpecification *TargetCapacitySpecificationRequest `type:"structure" required:"true"` - - // Indicates whether running instances should be terminated when the EC2 Fleet - // expires. - TerminateInstancesWithExpiration *bool `type:"boolean"` + // * Key ID + // + // * Key alias, in the form alias/ExampleAlias + // + // * ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed + // by the region of the CMK, the AWS account ID of the CMK owner, the key + // namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. + // + // + // * ARN using key alias. The alias ARN contains the arn:aws:kms namespace, + // followed by the region of the CMK, the AWS account ID of the CMK owner, + // the alias namespace, and then the CMK alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. + // + // + // AWS parses KmsKeyId asynchronously, meaning that the action you call may + // appear to complete even though you provided an invalid identifier. This action + // will eventually report failure. + // + // The specified CMK must exist in the region that the snapshot is being copied + // to. + KmsKeyId *string `locationName:"kmsKeyId" type:"string"` - // The type of request. Indicates whether the EC2 Fleet only requests the target - // capacity, or also attempts to maintain it. If you request a certain target - // capacity, EC2 Fleet only places the required requests. It does not attempt - // to replenish instances if capacity is diminished, and does not submit requests - // in alternative capacity pools if capacity is unavailable. To maintain a certain - // target capacity, EC2 Fleet places the required requests to meet this target - // capacity. It also automatically replenishes any interrupted Spot Instances. - // Default: maintain. - Type *string `type:"string" enum:"FleetType"` + // The name of the new AMI in the destination region. + // + // Name is a required field + Name *string `type:"string" required:"true"` - // The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - // The default is to start fulfilling the request immediately. - ValidFrom *time.Time `type:"timestamp"` + // The ID of the AMI to copy. + // + // SourceImageId is a required field + SourceImageId *string `type:"string" required:"true"` - // The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - // At this point, no new EC2 Fleet requests are placed or able to fulfill the - // request. The default end date is 7 days from the current date. - ValidUntil *time.Time `type:"timestamp"` + // The name of the region that contains the AMI to copy. + // + // SourceRegion is a required field + SourceRegion *string `type:"string" required:"true"` } // String returns the string representation -func (s CreateFleetInput) String() string { +func (s CopyImageInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateFleetInput) GoString() string { +func (s CopyImageInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateFleetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateFleetInput"} - if s.LaunchTemplateConfigs == nil { - invalidParams.Add(request.NewErrParamRequired("LaunchTemplateConfigs")) - } - if s.TargetCapacitySpecification == nil { - invalidParams.Add(request.NewErrParamRequired("TargetCapacitySpecification")) +func (s *CopyImageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CopyImageInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) } - if s.LaunchTemplateConfigs != nil { - for i, v := range s.LaunchTemplateConfigs { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LaunchTemplateConfigs", i), err.(request.ErrInvalidParams)) - } - } + if s.SourceImageId == nil { + invalidParams.Add(request.NewErrParamRequired("SourceImageId")) } - if s.TargetCapacitySpecification != nil { - if err := s.TargetCapacitySpecification.Validate(); err != nil { - invalidParams.AddNested("TargetCapacitySpecification", err.(request.ErrInvalidParams)) - } + if s.SourceRegion == nil { + invalidParams.Add(request.NewErrParamRequired("SourceRegion")) } if invalidParams.Len() > 0 { @@ -27801,188 +33343,179 @@ func (s *CreateFleetInput) Validate() error { } // SetClientToken sets the ClientToken field's value. -func (s *CreateFleetInput) SetClientToken(v string) *CreateFleetInput { +func (s *CopyImageInput) SetClientToken(v string) *CopyImageInput { s.ClientToken = &v return s } -// SetDryRun sets the DryRun field's value. -func (s *CreateFleetInput) SetDryRun(v bool) *CreateFleetInput { - s.DryRun = &v - return s -} - -// SetExcessCapacityTerminationPolicy sets the ExcessCapacityTerminationPolicy field's value. -func (s *CreateFleetInput) SetExcessCapacityTerminationPolicy(v string) *CreateFleetInput { - s.ExcessCapacityTerminationPolicy = &v - return s -} - -// SetLaunchTemplateConfigs sets the LaunchTemplateConfigs field's value. -func (s *CreateFleetInput) SetLaunchTemplateConfigs(v []*FleetLaunchTemplateConfigRequest) *CreateFleetInput { - s.LaunchTemplateConfigs = v - return s -} - -// SetOnDemandOptions sets the OnDemandOptions field's value. -func (s *CreateFleetInput) SetOnDemandOptions(v *OnDemandOptionsRequest) *CreateFleetInput { - s.OnDemandOptions = v - return s -} - -// SetReplaceUnhealthyInstances sets the ReplaceUnhealthyInstances field's value. -func (s *CreateFleetInput) SetReplaceUnhealthyInstances(v bool) *CreateFleetInput { - s.ReplaceUnhealthyInstances = &v - return s -} - -// SetSpotOptions sets the SpotOptions field's value. -func (s *CreateFleetInput) SetSpotOptions(v *SpotOptionsRequest) *CreateFleetInput { - s.SpotOptions = v +// SetDescription sets the Description field's value. +func (s *CopyImageInput) SetDescription(v string) *CopyImageInput { + s.Description = &v return s } -// SetTagSpecifications sets the TagSpecifications field's value. -func (s *CreateFleetInput) SetTagSpecifications(v []*TagSpecification) *CreateFleetInput { - s.TagSpecifications = v +// SetDryRun sets the DryRun field's value. +func (s *CopyImageInput) SetDryRun(v bool) *CopyImageInput { + s.DryRun = &v return s } -// SetTargetCapacitySpecification sets the TargetCapacitySpecification field's value. -func (s *CreateFleetInput) SetTargetCapacitySpecification(v *TargetCapacitySpecificationRequest) *CreateFleetInput { - s.TargetCapacitySpecification = v +// SetEncrypted sets the Encrypted field's value. +func (s *CopyImageInput) SetEncrypted(v bool) *CopyImageInput { + s.Encrypted = &v return s } -// SetTerminateInstancesWithExpiration sets the TerminateInstancesWithExpiration field's value. -func (s *CreateFleetInput) SetTerminateInstancesWithExpiration(v bool) *CreateFleetInput { - s.TerminateInstancesWithExpiration = &v +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *CopyImageInput) SetKmsKeyId(v string) *CopyImageInput { + s.KmsKeyId = &v return s } -// SetType sets the Type field's value. -func (s *CreateFleetInput) SetType(v string) *CreateFleetInput { - s.Type = &v +// SetName sets the Name field's value. +func (s *CopyImageInput) SetName(v string) *CopyImageInput { + s.Name = &v return s } -// SetValidFrom sets the ValidFrom field's value. -func (s *CreateFleetInput) SetValidFrom(v time.Time) *CreateFleetInput { - s.ValidFrom = &v +// SetSourceImageId sets the SourceImageId field's value. +func (s *CopyImageInput) SetSourceImageId(v string) *CopyImageInput { + s.SourceImageId = &v return s } -// SetValidUntil sets the ValidUntil field's value. -func (s *CreateFleetInput) SetValidUntil(v time.Time) *CreateFleetInput { - s.ValidUntil = &v +// SetSourceRegion sets the SourceRegion field's value. +func (s *CopyImageInput) SetSourceRegion(v string) *CopyImageInput { + s.SourceRegion = &v return s } -type CreateFleetOutput struct { +// Contains the output of CopyImage. +type CopyImageOutput struct { _ struct{} `type:"structure"` - // The ID of the EC2 Fleet. - FleetId *string `locationName:"fleetId" type:"string"` + // The ID of the new AMI. + ImageId *string `locationName:"imageId" type:"string"` } // String returns the string representation -func (s CreateFleetOutput) String() string { +func (s CopyImageOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateFleetOutput) GoString() string { +func (s CopyImageOutput) GoString() string { return s.String() } -// SetFleetId sets the FleetId field's value. -func (s *CreateFleetOutput) SetFleetId(v string) *CreateFleetOutput { - s.FleetId = &v +// SetImageId sets the ImageId field's value. +func (s *CopyImageOutput) SetImageId(v string) *CopyImageOutput { + s.ImageId = &v return s } -// Contains the parameters for CreateFlowLogs. -type CreateFlowLogsInput struct { +// Contains the parameters for CopySnapshot. +type CopySnapshotInput 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 (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). - ClientToken *string `type:"string"` + // A description for the EBS snapshot. + Description *string `type:"string"` - // The ARN for the IAM role that's used to post flow logs to a log group. - DeliverLogsPermissionArn *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. + DestinationRegion *string `locationName:"destinationRegion" 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"` + DryRun *bool `locationName:"dryRun" type:"boolean"` - // Specifies the destination to which the flow log data is to be published. - // Flow log data can be published to an CloudWatch Logs log group or an Amazon - // S3 bucket. The value specified for this parameter depends on the value specified - // for LogDestinationType. + // Specifies whether the destination snapshot should be encrypted. You can encrypt + // a copy of an unencrypted snapshot, but you cannot use it to create an unencrypted + // copy of an encrypted snapshot. Your default CMK for EBS is used unless you + // specify a non-default AWS Key Management Service (AWS KMS) CMK using KmsKeyId. + // For more information, see Amazon EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) + // in the Amazon Elastic Compute Cloud User Guide. + Encrypted *bool `locationName:"encrypted" type:"boolean"` + + // An identifier for the AWS Key Management Service (AWS KMS) customer master + // key (CMK) to use when creating the encrypted volume. This parameter is only + // required if you want to use a non-default CMK; if this parameter is not specified, + // the default CMK for EBS is used. If a KmsKeyId is specified, the Encrypted + // flag must also be set. // - // If LogDestinationType is not specified or cloud-watch-logs, specify the Amazon - // Resource Name (ARN) of the CloudWatch Logs log group. + // The CMK identifier may be provided in any of the following formats: // - // If LogDestinationType is s3, specify the ARN of the Amazon S3 bucket. You - // can also specify a subfolder in the bucket. To specify a subfolder in the - // bucket, use the following ARN format: bucket_ARN/subfolder_name/. For example, - // to specify a subfolder named my-logs in a bucket named my-bucket, use the - // following ARN: arn:aws:s3:::my-bucket/my-logs/. - LogDestination *string `type:"string"` - - // Specifies the type of destination to which the flow log data is to be published. - // Flow log data can be published to CloudWatch Logs or Amazon S3. To publish - // flow log data to CloudWatch Logs, specify cloud-watch-logs. To publish flow - // log data to Amazon S3, specify s3. + // * Key ID // - // Default: cloud-watch-logs - LogDestinationType *string `type:"string" enum:"LogDestinationType"` - - // The name of the log group. - LogGroupName *string `type:"string"` - - // One or more subnet, network interface, or VPC IDs. + // * Key alias // - // Constraints: Maximum of 1000 resources + // * ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed + // by the region of the CMK, the AWS account ID of the CMK owner, the key + // namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. // - // ResourceIds is a required field - ResourceIds []*string `locationName:"ResourceId" locationNameList:"item" type:"list" required:"true"` + // + // * ARN using key alias. The alias ARN contains the arn:aws:kms namespace, + // followed by the region of the CMK, the AWS account ID of the CMK owner, + // the alias namespace, and then the CMK alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. + // + // + // AWS parses KmsKeyId asynchronously, meaning that the action you call may + // appear to complete even though you provided an invalid identifier. The action + // will eventually fail. + KmsKeyId *string `locationName:"kmsKeyId" type:"string"` - // The type of resource on which to create the flow log. + // When you copy an encrypted source snapshot using the Amazon EC2 Query API, + // you must supply a pre-signed URL. This parameter is optional for unencrypted + // snapshots. For more information, see Query Requests (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html). // - // ResourceType is a required field - ResourceType *string `type:"string" required:"true" enum:"FlowLogsResourceType"` + // 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 + // by Using Query Parameters (AWS Signature Version 4) (http://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. + PresignedUrl *string `locationName:"presignedUrl" type:"string"` - // The type of traffic to log. + // The ID of the region that contains the snapshot to be copied. // - // TrafficType is a required field - TrafficType *string `type:"string" required:"true" enum:"TrafficType"` + // SourceRegion is a required field + SourceRegion *string `type:"string" required:"true"` + + // The ID of the EBS snapshot to copy. + // + // SourceSnapshotId is a required field + SourceSnapshotId *string `type:"string" required:"true"` } // String returns the string representation -func (s CreateFlowLogsInput) String() string { +func (s CopySnapshotInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateFlowLogsInput) GoString() string { +func (s CopySnapshotInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateFlowLogsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateFlowLogsInput"} - if s.ResourceIds == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceIds")) - } - if s.ResourceType == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceType")) +func (s *CopySnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CopySnapshotInput"} + if s.SourceRegion == nil { + invalidParams.Add(request.NewErrParamRequired("SourceRegion")) } - if s.TrafficType == nil { - invalidParams.Add(request.NewErrParamRequired("TrafficType")) + if s.SourceSnapshotId == nil { + invalidParams.Add(request.NewErrParamRequired("SourceSnapshotId")) } if invalidParams.Len() > 0 { @@ -27991,147 +33524,274 @@ func (s *CreateFlowLogsInput) Validate() error { return nil } -// SetClientToken sets the ClientToken field's value. -func (s *CreateFlowLogsInput) SetClientToken(v string) *CreateFlowLogsInput { - s.ClientToken = &v +// SetDescription sets the Description field's value. +func (s *CopySnapshotInput) SetDescription(v string) *CopySnapshotInput { + s.Description = &v return s } -// SetDeliverLogsPermissionArn sets the DeliverLogsPermissionArn field's value. -func (s *CreateFlowLogsInput) SetDeliverLogsPermissionArn(v string) *CreateFlowLogsInput { - s.DeliverLogsPermissionArn = &v +// SetDestinationRegion sets the DestinationRegion field's value. +func (s *CopySnapshotInput) SetDestinationRegion(v string) *CopySnapshotInput { + s.DestinationRegion = &v return s } // SetDryRun sets the DryRun field's value. -func (s *CreateFlowLogsInput) SetDryRun(v bool) *CreateFlowLogsInput { +func (s *CopySnapshotInput) SetDryRun(v bool) *CopySnapshotInput { s.DryRun = &v return s } -// SetLogDestination sets the LogDestination field's value. -func (s *CreateFlowLogsInput) SetLogDestination(v string) *CreateFlowLogsInput { - s.LogDestination = &v +// SetEncrypted sets the Encrypted field's value. +func (s *CopySnapshotInput) SetEncrypted(v bool) *CopySnapshotInput { + s.Encrypted = &v return s } -// SetLogDestinationType sets the LogDestinationType field's value. -func (s *CreateFlowLogsInput) SetLogDestinationType(v string) *CreateFlowLogsInput { - s.LogDestinationType = &v +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *CopySnapshotInput) SetKmsKeyId(v string) *CopySnapshotInput { + s.KmsKeyId = &v return s } -// SetLogGroupName sets the LogGroupName field's value. -func (s *CreateFlowLogsInput) SetLogGroupName(v string) *CreateFlowLogsInput { - s.LogGroupName = &v +// SetPresignedUrl sets the PresignedUrl field's value. +func (s *CopySnapshotInput) SetPresignedUrl(v string) *CopySnapshotInput { + s.PresignedUrl = &v return s } -// SetResourceIds sets the ResourceIds field's value. -func (s *CreateFlowLogsInput) SetResourceIds(v []*string) *CreateFlowLogsInput { - s.ResourceIds = v +// SetSourceRegion sets the SourceRegion field's value. +func (s *CopySnapshotInput) SetSourceRegion(v string) *CopySnapshotInput { + s.SourceRegion = &v return s } -// SetResourceType sets the ResourceType field's value. -func (s *CreateFlowLogsInput) SetResourceType(v string) *CreateFlowLogsInput { - s.ResourceType = &v +// SetSourceSnapshotId sets the SourceSnapshotId field's value. +func (s *CopySnapshotInput) SetSourceSnapshotId(v string) *CopySnapshotInput { + s.SourceSnapshotId = &v return s } -// SetTrafficType sets the TrafficType field's value. -func (s *CreateFlowLogsInput) SetTrafficType(v string) *CreateFlowLogsInput { - s.TrafficType = &v +// Contains the output of CopySnapshot. +type CopySnapshotOutput struct { + _ struct{} `type:"structure"` + + // The ID of the new snapshot. + SnapshotId *string `locationName:"snapshotId" type:"string"` +} + +// String returns the string representation +func (s CopySnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CopySnapshotOutput) GoString() string { + return s.String() +} + +// SetSnapshotId sets the SnapshotId field's value. +func (s *CopySnapshotOutput) SetSnapshotId(v string) *CopySnapshotOutput { + s.SnapshotId = &v return s } -// Contains the output of CreateFlowLogs. -type CreateFlowLogsOutput struct { +// The CPU options for the instance. +type CpuOptions struct { _ struct{} `type:"structure"` - // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. - ClientToken *string `locationName:"clientToken" type:"string"` - - // The IDs of the flow logs. - FlowLogIds []*string `locationName:"flowLogIdSet" locationNameList:"item" type:"list"` + // The number of CPU cores for the instance. + CoreCount *int64 `locationName:"coreCount" type:"integer"` - // Information about the flow logs that could not be created successfully. - Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"` + // The number of threads per CPU core. + ThreadsPerCore *int64 `locationName:"threadsPerCore" type:"integer"` } // String returns the string representation -func (s CreateFlowLogsOutput) String() string { +func (s CpuOptions) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateFlowLogsOutput) GoString() string { +func (s CpuOptions) GoString() string { return s.String() } -// SetClientToken sets the ClientToken field's value. -func (s *CreateFlowLogsOutput) SetClientToken(v string) *CreateFlowLogsOutput { - s.ClientToken = &v +// SetCoreCount sets the CoreCount field's value. +func (s *CpuOptions) SetCoreCount(v int64) *CpuOptions { + s.CoreCount = &v return s } -// SetFlowLogIds sets the FlowLogIds field's value. -func (s *CreateFlowLogsOutput) SetFlowLogIds(v []*string) *CreateFlowLogsOutput { - s.FlowLogIds = v +// SetThreadsPerCore sets the ThreadsPerCore field's value. +func (s *CpuOptions) SetThreadsPerCore(v int64) *CpuOptions { + s.ThreadsPerCore = &v return s } -// SetUnsuccessful sets the Unsuccessful field's value. -func (s *CreateFlowLogsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *CreateFlowLogsOutput { - s.Unsuccessful = v +// The CPU options for the instance. Both the core count and threads per core +// must be specified in the request. +type CpuOptionsRequest struct { + _ struct{} `type:"structure"` + + // The number of CPU cores for the instance. + CoreCount *int64 `type:"integer"` + + // The number of threads per CPU core. To disable Intel Hyper-Threading Technology + // for the instance, specify a value of 1. Otherwise, specify the default value + // of 2. + ThreadsPerCore *int64 `type:"integer"` +} + +// String returns the string representation +func (s CpuOptionsRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CpuOptionsRequest) GoString() string { + return s.String() +} + +// SetCoreCount sets the CoreCount field's value. +func (s *CpuOptionsRequest) SetCoreCount(v int64) *CpuOptionsRequest { + s.CoreCount = &v return s } -type CreateFpgaImageInput struct { +// SetThreadsPerCore sets the ThreadsPerCore field's value. +func (s *CpuOptionsRequest) SetThreadsPerCore(v int64) *CpuOptionsRequest { + s.ThreadsPerCore = &v + return s +} + +type CreateCapacityReservationInput struct { _ struct{} `type:"structure"` + // The Availability Zone in which to create the Capacity Reservation. + // + // 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 Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). + // of the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + // + // Constraint: Maximum 64 ASCII characters. ClientToken *string `type:"string"` - // A description for the AFI. - Description *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 location of the encrypted design checkpoint in Amazon S3. The input must - // be a tarball. + // Indicates whether the Capacity Reservation supports EBS-optimized instances. + // This optimization provides dedicated throughput to Amazon EBS and an optimized + // configuration stack to provide optimal I/O performance. This optimization + // isn't available with all instance types. Additional usage charges apply when + // using an EBS- optimized instance. + EbsOptimized *bool `type:"boolean"` + + // The date and time at which the Capacity Reservation expires. When a Capacity + // Reservation expires, the reserved capacity is released and you can no longer + // launch instances into it. The Capacity Reservation's state changes to expired + // when it reaches its end date and time. // - // InputStorageLocation is a required field - InputStorageLocation *StorageLocation `type:"structure" required:"true"` + // You must provide an EndDate value if EndDateType is limited. Omit EndDate + // if EndDateType is unlimited. + // + // If the EndDateType is limited, the Capacity Reservation is cancelled within + // an hour from the specified time. For example, if you specify 5/31/2019, 13:30:55, + // the Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 + // on 5/31/2019. + EndDate *time.Time `type:"timestamp"` - // The location in Amazon S3 for the output logs. - LogsStorageLocation *StorageLocation `type:"structure"` + // Indicates the way in which the Capacity Reservation ends. A Capacity Reservation + // can have one of the following end types: + // + // * unlimited - The Capacity Reservation remains active until you explicitly + // cancel it. Do not provide an EndDate if the EndDateType is unlimited. + // + // * limited - The Capacity Reservation expires automatically at a specified + // date and time. You must provide an EndDate value if the EndDateType value + // is limited. + EndDateType *string `type:"string" enum:"EndDateType"` - // A name for the AFI. - Name *string `type:"string"` + // Indicates whether the Capacity Reservation supports instances with temporary, + // block-level storage. + EphemeralStorage *bool `type:"boolean"` + + // The number of instances for which to reserve capacity. + // + // InstanceCount is a required field + InstanceCount *int64 `type:"integer" required:"true"` + + // Indicates the type of instance launches that the Capacity Reservation accepts. + // The options include: + // + // * open - The Capacity Reservation automatically matches all instances + // that have matching attributes (instance type, platform, and Availability + // Zone). Instances that have matching attributes run in the Capacity Reservation + // automatically without specifying any additional parameters. + // + // * targeted - The Capacity Reservation only accepts instances that have + // matching attributes (instance type, platform, and Availability Zone), + // and explicitly target the Capacity Reservation. This ensures that only + // permitted instances can use the reserved capacity. + // + // Default: open + InstanceMatchCriteria *string `type:"string" enum:"InstanceMatchCriteria"` + + // The type of operating system for which to reserve capacity. + // + // InstancePlatform is a required field + InstancePlatform *string `type:"string" required:"true" enum:"CapacityReservationInstancePlatform"` + + // The instance type for which to reserve capacity. For more information, see + // Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) + // in the Amazon Elastic Compute Cloud User Guide. + // + // InstanceType is a required field + InstanceType *string `type:"string" required:"true"` + + // The tags to apply to the Capacity Reservation during launch. + TagSpecifications []*TagSpecification `locationNameList:"item" type:"list"` + + // 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. + Tenancy *string `type:"string" enum:"CapacityReservationTenancy"` } // String returns the string representation -func (s CreateFpgaImageInput) String() string { +func (s CreateCapacityReservationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateFpgaImageInput) GoString() string { +func (s CreateCapacityReservationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateFpgaImageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateFpgaImageInput"} - if s.InputStorageLocation == nil { - invalidParams.Add(request.NewErrParamRequired("InputStorageLocation")) +func (s *CreateCapacityReservationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCapacityReservationInput"} + if s.AvailabilityZone == nil { + invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) + } + if s.InstanceCount == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceCount")) + } + if s.InstancePlatform == nil { + invalidParams.Add(request.NewErrParamRequired("InstancePlatform")) + } + if s.InstanceType == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceType")) } if invalidParams.Len() > 0 { @@ -28140,129 +33800,195 @@ func (s *CreateFpgaImageInput) Validate() error { return nil } -// SetClientToken sets the ClientToken field's value. -func (s *CreateFpgaImageInput) SetClientToken(v string) *CreateFpgaImageInput { - s.ClientToken = &v +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *CreateCapacityReservationInput) SetAvailabilityZone(v string) *CreateCapacityReservationInput { + s.AvailabilityZone = &v return s } -// SetDescription sets the Description field's value. -func (s *CreateFpgaImageInput) SetDescription(v string) *CreateFpgaImageInput { - s.Description = &v +// SetClientToken sets the ClientToken field's value. +func (s *CreateCapacityReservationInput) SetClientToken(v string) *CreateCapacityReservationInput { + s.ClientToken = &v return s } // SetDryRun sets the DryRun field's value. -func (s *CreateFpgaImageInput) SetDryRun(v bool) *CreateFpgaImageInput { +func (s *CreateCapacityReservationInput) SetDryRun(v bool) *CreateCapacityReservationInput { s.DryRun = &v return s } -// SetInputStorageLocation sets the InputStorageLocation field's value. -func (s *CreateFpgaImageInput) SetInputStorageLocation(v *StorageLocation) *CreateFpgaImageInput { - s.InputStorageLocation = v +// SetEbsOptimized sets the EbsOptimized field's value. +func (s *CreateCapacityReservationInput) SetEbsOptimized(v bool) *CreateCapacityReservationInput { + s.EbsOptimized = &v return s } -// SetLogsStorageLocation sets the LogsStorageLocation field's value. -func (s *CreateFpgaImageInput) SetLogsStorageLocation(v *StorageLocation) *CreateFpgaImageInput { - s.LogsStorageLocation = v +// SetEndDate sets the EndDate field's value. +func (s *CreateCapacityReservationInput) SetEndDate(v time.Time) *CreateCapacityReservationInput { + s.EndDate = &v return s } -// SetName sets the Name field's value. -func (s *CreateFpgaImageInput) SetName(v string) *CreateFpgaImageInput { - s.Name = &v +// SetEndDateType sets the EndDateType field's value. +func (s *CreateCapacityReservationInput) SetEndDateType(v string) *CreateCapacityReservationInput { + s.EndDateType = &v return s } -type CreateFpgaImageOutput struct { - _ struct{} `type:"structure"` +// SetEphemeralStorage sets the EphemeralStorage field's value. +func (s *CreateCapacityReservationInput) SetEphemeralStorage(v bool) *CreateCapacityReservationInput { + s.EphemeralStorage = &v + return s +} - // The global FPGA image identifier (AGFI ID). - FpgaImageGlobalId *string `locationName:"fpgaImageGlobalId" type:"string"` +// SetInstanceCount sets the InstanceCount field's value. +func (s *CreateCapacityReservationInput) SetInstanceCount(v int64) *CreateCapacityReservationInput { + s.InstanceCount = &v + return s +} - // The FPGA image identifier (AFI ID). - FpgaImageId *string `locationName:"fpgaImageId" type:"string"` +// SetInstanceMatchCriteria sets the InstanceMatchCriteria field's value. +func (s *CreateCapacityReservationInput) SetInstanceMatchCriteria(v string) *CreateCapacityReservationInput { + s.InstanceMatchCriteria = &v + return s +} + +// SetInstancePlatform sets the InstancePlatform field's value. +func (s *CreateCapacityReservationInput) SetInstancePlatform(v string) *CreateCapacityReservationInput { + s.InstancePlatform = &v + return s +} + +// SetInstanceType sets the InstanceType field's value. +func (s *CreateCapacityReservationInput) SetInstanceType(v string) *CreateCapacityReservationInput { + s.InstanceType = &v + return s +} + +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *CreateCapacityReservationInput) SetTagSpecifications(v []*TagSpecification) *CreateCapacityReservationInput { + s.TagSpecifications = v + return s +} + +// SetTenancy sets the Tenancy field's value. +func (s *CreateCapacityReservationInput) SetTenancy(v string) *CreateCapacityReservationInput { + s.Tenancy = &v + return s +} + +type CreateCapacityReservationOutput struct { + _ struct{} `type:"structure"` + + // Information about the Capacity Reservation. + CapacityReservation *CapacityReservation `locationName:"capacityReservation" type:"structure"` } // String returns the string representation -func (s CreateFpgaImageOutput) String() string { +func (s CreateCapacityReservationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateFpgaImageOutput) GoString() string { +func (s CreateCapacityReservationOutput) GoString() string { return s.String() } -// SetFpgaImageGlobalId sets the FpgaImageGlobalId field's value. -func (s *CreateFpgaImageOutput) SetFpgaImageGlobalId(v string) *CreateFpgaImageOutput { - s.FpgaImageGlobalId = &v - return s -} - -// SetFpgaImageId sets the FpgaImageId field's value. -func (s *CreateFpgaImageOutput) SetFpgaImageId(v string) *CreateFpgaImageOutput { - s.FpgaImageId = &v +// SetCapacityReservation sets the CapacityReservation field's value. +func (s *CreateCapacityReservationOutput) SetCapacityReservation(v *CapacityReservation) *CreateCapacityReservationOutput { + s.CapacityReservation = v return s } -// Contains the parameters for CreateImage. -type CreateImageInput struct { +type CreateClientVpnEndpointInput struct { _ struct{} `type:"structure"` - // Information about one or more block device mappings. - BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"` + // Information about the authentication method to be used to authenticate clients. + // + // AuthenticationOptions is a required field + AuthenticationOptions []*ClientVpnAuthenticationRequest `locationName:"Authentication" type:"list" required:"true"` - // A description for the new image. - Description *string `locationName:"description" type:"string"` + // The IPv4 address range, in CIDR notation, from which to assign client IP + // addresses. The address range cannot overlap with the local CIDR of the VPC + // in which the associated subnet is located, or the routes that you add manually. + // The address range cannot be changed after the Client VPN endpoint has been + // created. The CIDR block should be /22 or greater. + // + // ClientCidrBlock is a required field + ClientCidrBlock *string `type:"string" required:"true"` + + // Unique, case-sensitive identifier you provide to ensure the idempotency of + // the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). + ClientToken *string `type:"string" idempotencyToken:"true"` + + // Information about the client connection logging options. + // + // If you enable client connection logging, data about client connections is + // sent to a Cloudwatch Logs log stream. The following information is logged: + // + // * Client connection requests + // + // * Client connection results (successful and unsuccessful) + // + // * Reasons for unsuccessful client connection requests + // + // * Client connection termination time + // + // ConnectionLogOptions is a required field + ConnectionLogOptions *ConnectionLogOptions `type:"structure" required:"true"` + + // A brief description of the Client VPN endpoint. + Description *string `type:"string"` + + // Information about the DNS servers to be used for DNS resolution. A Client + // VPN endpoint can have up to two DNS servers. If no DNS server is specified, + // the DNS address of the VPC that is to be associated with Client VPN endpoint + // is used as the DNS server. + DnsServers []*string `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 `locationName:"dryRun" type:"boolean"` + DryRun *bool `type:"boolean"` - // The ID of the instance. + // The ARN of the server certificate. For more information, see the AWS Certificate + // Manager User Guide (acm/latest/userguide/acm-overview.html) . // - // InstanceId is a required field - InstanceId *string `locationName:"instanceId" type:"string" required:"true"` + // ServerCertificateArn is a required field + ServerCertificateArn *string `type:"string" required:"true"` - // A name for the new image. - // - // Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets - // ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), - // at-signs (@), or underscores(_) + // The transport protocol to be used by the VPN session. // - // Name is a required field - 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. - NoReboot *bool `locationName:"noReboot" type:"boolean"` + // Default value: udp + TransportProtocol *string `type:"string" enum:"TransportProtocol"` } // String returns the string representation -func (s CreateImageInput) String() string { +func (s CreateClientVpnEndpointInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateImageInput) GoString() string { +func (s CreateClientVpnEndpointInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateImageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateImageInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) +func (s *CreateClientVpnEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateClientVpnEndpointInput"} + if s.AuthenticationOptions == nil { + invalidParams.Add(request.NewErrParamRequired("AuthenticationOptions")) } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) + if s.ClientCidrBlock == nil { + invalidParams.Add(request.NewErrParamRequired("ClientCidrBlock")) + } + if s.ConnectionLogOptions == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectionLogOptions")) + } + if s.ServerCertificateArn == nil { + invalidParams.Add(request.NewErrParamRequired("ServerCertificateArn")) } if invalidParams.Len() > 0 { @@ -28271,101 +33997,161 @@ func (s *CreateImageInput) Validate() error { return nil } -// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *CreateImageInput) SetBlockDeviceMappings(v []*BlockDeviceMapping) *CreateImageInput { - s.BlockDeviceMappings = v +// SetAuthenticationOptions sets the AuthenticationOptions field's value. +func (s *CreateClientVpnEndpointInput) SetAuthenticationOptions(v []*ClientVpnAuthenticationRequest) *CreateClientVpnEndpointInput { + s.AuthenticationOptions = v + return s +} + +// SetClientCidrBlock sets the ClientCidrBlock field's value. +func (s *CreateClientVpnEndpointInput) SetClientCidrBlock(v string) *CreateClientVpnEndpointInput { + s.ClientCidrBlock = &v + return s +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateClientVpnEndpointInput) SetClientToken(v string) *CreateClientVpnEndpointInput { + s.ClientToken = &v + return s +} + +// SetConnectionLogOptions sets the ConnectionLogOptions field's value. +func (s *CreateClientVpnEndpointInput) SetConnectionLogOptions(v *ConnectionLogOptions) *CreateClientVpnEndpointInput { + s.ConnectionLogOptions = v return s } // SetDescription sets the Description field's value. -func (s *CreateImageInput) SetDescription(v string) *CreateImageInput { +func (s *CreateClientVpnEndpointInput) SetDescription(v string) *CreateClientVpnEndpointInput { s.Description = &v return s } -// SetDryRun sets the DryRun field's value. -func (s *CreateImageInput) SetDryRun(v bool) *CreateImageInput { - s.DryRun = &v +// SetDnsServers sets the DnsServers field's value. +func (s *CreateClientVpnEndpointInput) SetDnsServers(v []*string) *CreateClientVpnEndpointInput { + s.DnsServers = v return s } -// SetInstanceId sets the InstanceId field's value. -func (s *CreateImageInput) SetInstanceId(v string) *CreateImageInput { - s.InstanceId = &v +// SetDryRun sets the DryRun field's value. +func (s *CreateClientVpnEndpointInput) SetDryRun(v bool) *CreateClientVpnEndpointInput { + s.DryRun = &v return s } -// SetName sets the Name field's value. -func (s *CreateImageInput) SetName(v string) *CreateImageInput { - s.Name = &v +// SetServerCertificateArn sets the ServerCertificateArn field's value. +func (s *CreateClientVpnEndpointInput) SetServerCertificateArn(v string) *CreateClientVpnEndpointInput { + s.ServerCertificateArn = &v return s } -// SetNoReboot sets the NoReboot field's value. -func (s *CreateImageInput) SetNoReboot(v bool) *CreateImageInput { - s.NoReboot = &v +// SetTransportProtocol sets the TransportProtocol field's value. +func (s *CreateClientVpnEndpointInput) SetTransportProtocol(v string) *CreateClientVpnEndpointInput { + s.TransportProtocol = &v return s } -// Contains the output of CreateImage. -type CreateImageOutput struct { +type CreateClientVpnEndpointOutput struct { _ struct{} `type:"structure"` - // The ID of the new AMI. - ImageId *string `locationName:"imageId" type:"string"` + // The ID of the Client VPN endpoint. + ClientVpnEndpointId *string `locationName:"clientVpnEndpointId" type:"string"` + + // The DNS name to be used by clients when establishing their VPN session. + DnsName *string `locationName:"dnsName" type:"string"` + + // The current state of the Client VPN endpoint. + Status *ClientVpnEndpointStatus `locationName:"status" type:"structure"` } // String returns the string representation -func (s CreateImageOutput) String() string { +func (s CreateClientVpnEndpointOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateImageOutput) GoString() string { +func (s CreateClientVpnEndpointOutput) GoString() string { return s.String() } -// SetImageId sets the ImageId field's value. -func (s *CreateImageOutput) SetImageId(v string) *CreateImageOutput { - s.ImageId = &v +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *CreateClientVpnEndpointOutput) SetClientVpnEndpointId(v string) *CreateClientVpnEndpointOutput { + s.ClientVpnEndpointId = &v return s } -// Contains the parameters for CreateInstanceExportTask. -type CreateInstanceExportTaskInput struct { +// SetDnsName sets the DnsName field's value. +func (s *CreateClientVpnEndpointOutput) SetDnsName(v string) *CreateClientVpnEndpointOutput { + s.DnsName = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *CreateClientVpnEndpointOutput) SetStatus(v *ClientVpnEndpointStatus) *CreateClientVpnEndpointOutput { + s.Status = v + return s +} + +type CreateClientVpnRouteInput struct { _ struct{} `type:"structure"` - // A description for the conversion task or the resource being exported. The - // maximum length is 255 bytes. - Description *string `locationName:"description" type:"string"` + // The ID of the Client VPN endpoint to which to add the route. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *string `type:"string" required:"true"` - // The format and location for an instance export task. - ExportToS3Task *ExportToS3TaskSpecification `locationName:"exportToS3" type:"structure"` + // A brief description of the route. + Description *string `type:"string"` - // The ID of the instance. + // The IPv4 address range, in CIDR notation, of the route destination. For example: // - // InstanceId is a required field - InstanceId *string `locationName:"instanceId" type:"string" required:"true"` + // * To add a route for Internet access, enter 0.0.0.0/0 + // + // * To add a route for a peered VPC, enter the peered VPC's IPv4 CIDR range + // + // * To add a route for an on-premises network, enter the AWS Site-to-Site + // VPN connection's IPv4 CIDR range + // + // Route address ranges cannot overlap with the CIDR range specified for client + // allocation. + // + // DestinationCidrBlock is a required field + DestinationCidrBlock *string `type:"string" required:"true"` - // The target virtualization environment. - TargetEnvironment *string `locationName:"targetEnvironment" type:"string" enum:"ExportEnvironment"` + // 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 subnet through which you want to route traffic. The specified + // subnet must be an existing target network of the Client VPN endpoint. + // + // TargetVpcSubnetId is a required field + TargetVpcSubnetId *string `type:"string" required:"true"` } // String returns the string representation -func (s CreateInstanceExportTaskInput) String() string { +func (s CreateClientVpnRouteInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateInstanceExportTaskInput) GoString() string { +func (s CreateClientVpnRouteInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateInstanceExportTaskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateInstanceExportTaskInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) +func (s *CreateClientVpnRouteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateClientVpnRouteInput"} + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } + if s.DestinationCidrBlock == nil { + invalidParams.Add(request.NewErrParamRequired("DestinationCidrBlock")) + } + if s.TargetVpcSubnetId == nil { + invalidParams.Add(request.NewErrParamRequired("TargetVpcSubnetId")) } if invalidParams.Len() > 0 { @@ -28374,138 +34160,195 @@ func (s *CreateInstanceExportTaskInput) Validate() error { return nil } +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *CreateClientVpnRouteInput) SetClientVpnEndpointId(v string) *CreateClientVpnRouteInput { + s.ClientVpnEndpointId = &v + return s +} + // SetDescription sets the Description field's value. -func (s *CreateInstanceExportTaskInput) SetDescription(v string) *CreateInstanceExportTaskInput { +func (s *CreateClientVpnRouteInput) SetDescription(v string) *CreateClientVpnRouteInput { s.Description = &v return s } -// SetExportToS3Task sets the ExportToS3Task field's value. -func (s *CreateInstanceExportTaskInput) SetExportToS3Task(v *ExportToS3TaskSpecification) *CreateInstanceExportTaskInput { - s.ExportToS3Task = v +// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. +func (s *CreateClientVpnRouteInput) SetDestinationCidrBlock(v string) *CreateClientVpnRouteInput { + s.DestinationCidrBlock = &v return s } -// SetInstanceId sets the InstanceId field's value. -func (s *CreateInstanceExportTaskInput) SetInstanceId(v string) *CreateInstanceExportTaskInput { - s.InstanceId = &v +// SetDryRun sets the DryRun field's value. +func (s *CreateClientVpnRouteInput) SetDryRun(v bool) *CreateClientVpnRouteInput { + s.DryRun = &v return s } -// SetTargetEnvironment sets the TargetEnvironment field's value. -func (s *CreateInstanceExportTaskInput) SetTargetEnvironment(v string) *CreateInstanceExportTaskInput { - s.TargetEnvironment = &v +// SetTargetVpcSubnetId sets the TargetVpcSubnetId field's value. +func (s *CreateClientVpnRouteInput) SetTargetVpcSubnetId(v string) *CreateClientVpnRouteInput { + s.TargetVpcSubnetId = &v return s } -// Contains the output for CreateInstanceExportTask. -type CreateInstanceExportTaskOutput struct { +type CreateClientVpnRouteOutput struct { _ struct{} `type:"structure"` - // Information about the instance export task. - ExportTask *ExportTask `locationName:"exportTask" type:"structure"` + // The current state of the route. + Status *ClientVpnRouteStatus `locationName:"status" type:"structure"` } // String returns the string representation -func (s CreateInstanceExportTaskOutput) String() string { +func (s CreateClientVpnRouteOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateInstanceExportTaskOutput) GoString() string { +func (s CreateClientVpnRouteOutput) GoString() string { return s.String() } -// SetExportTask sets the ExportTask field's value. -func (s *CreateInstanceExportTaskOutput) SetExportTask(v *ExportTask) *CreateInstanceExportTaskOutput { - s.ExportTask = v +// SetStatus sets the Status field's value. +func (s *CreateClientVpnRouteOutput) SetStatus(v *ClientVpnRouteStatus) *CreateClientVpnRouteOutput { + s.Status = v return s } -// Contains the parameters for CreateInternetGateway. -type CreateInternetGatewayInput struct { +// Contains the parameters for CreateCustomerGateway. +type CreateCustomerGatewayInput struct { _ struct{} `type:"structure"` + // For devices that support BGP, the customer gateway's BGP ASN. + // + // Default: 65000 + // + // BgpAsn is a required field + BgpAsn *int64 `type:"integer" 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 `locationName:"dryRun" type:"boolean"` + + // The Internet-routable IP address for the customer gateway's outside interface. + // The address must be static. + // + // PublicIp is a required field + PublicIp *string `locationName:"IpAddress" type:"string" required:"true"` + + // The type of VPN connection that this customer gateway supports (ipsec.1). + // + // Type is a required field + Type *string `type:"string" required:"true" enum:"GatewayType"` } // String returns the string representation -func (s CreateInternetGatewayInput) String() string { +func (s CreateCustomerGatewayInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateInternetGatewayInput) GoString() string { +func (s CreateCustomerGatewayInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateCustomerGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCustomerGatewayInput"} + if s.BgpAsn == nil { + invalidParams.Add(request.NewErrParamRequired("BgpAsn")) + } + if s.PublicIp == nil { + invalidParams.Add(request.NewErrParamRequired("PublicIp")) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBgpAsn sets the BgpAsn field's value. +func (s *CreateCustomerGatewayInput) SetBgpAsn(v int64) *CreateCustomerGatewayInput { + s.BgpAsn = &v + return s +} + // SetDryRun sets the DryRun field's value. -func (s *CreateInternetGatewayInput) SetDryRun(v bool) *CreateInternetGatewayInput { +func (s *CreateCustomerGatewayInput) SetDryRun(v bool) *CreateCustomerGatewayInput { s.DryRun = &v return s } -// Contains the output of CreateInternetGateway. -type CreateInternetGatewayOutput struct { +// SetPublicIp sets the PublicIp field's value. +func (s *CreateCustomerGatewayInput) SetPublicIp(v string) *CreateCustomerGatewayInput { + s.PublicIp = &v + return s +} + +// SetType sets the Type field's value. +func (s *CreateCustomerGatewayInput) SetType(v string) *CreateCustomerGatewayInput { + s.Type = &v + return s +} + +// Contains the output of CreateCustomerGateway. +type CreateCustomerGatewayOutput struct { _ struct{} `type:"structure"` - // Information about the internet gateway. - InternetGateway *InternetGateway `locationName:"internetGateway" type:"structure"` + // Information about the customer gateway. + CustomerGateway *CustomerGateway `locationName:"customerGateway" type:"structure"` } // String returns the string representation -func (s CreateInternetGatewayOutput) String() string { +func (s CreateCustomerGatewayOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateInternetGatewayOutput) GoString() string { +func (s CreateCustomerGatewayOutput) GoString() string { return s.String() } -// SetInternetGateway sets the InternetGateway field's value. -func (s *CreateInternetGatewayOutput) SetInternetGateway(v *InternetGateway) *CreateInternetGatewayOutput { - s.InternetGateway = v +// SetCustomerGateway sets the CustomerGateway field's value. +func (s *CreateCustomerGatewayOutput) SetCustomerGateway(v *CustomerGateway) *CreateCustomerGatewayOutput { + s.CustomerGateway = v return s } -// Contains the parameters for CreateKeyPair. -type CreateKeyPairInput struct { +type CreateDefaultSubnetInput struct { _ struct{} `type:"structure"` + // The Availability Zone in which to create the default subnet. + // + // AvailabilityZone is a required field + AvailabilityZone *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 `locationName:"dryRun" type:"boolean"` - - // A unique name for the key pair. - // - // Constraints: Up to 255 ASCII characters - // - // KeyName is a required field - KeyName *string `type:"string" required:"true"` + DryRun *bool `type:"boolean"` } // String returns the string representation -func (s CreateKeyPairInput) String() string { +func (s CreateDefaultSubnetInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateKeyPairInput) GoString() string { +func (s CreateDefaultSubnetInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateKeyPairInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateKeyPairInput"} - if s.KeyName == nil { - invalidParams.Add(request.NewErrParamRequired("KeyName")) +func (s *CreateDefaultSubnetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDefaultSubnetInput"} + if s.AvailabilityZone == nil { + invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) } if invalidParams.Len() > 0 { @@ -28514,232 +34357,120 @@ func (s *CreateKeyPairInput) Validate() error { return nil } -// SetDryRun sets the DryRun field's value. -func (s *CreateKeyPairInput) SetDryRun(v bool) *CreateKeyPairInput { - s.DryRun = &v +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *CreateDefaultSubnetInput) SetAvailabilityZone(v string) *CreateDefaultSubnetInput { + s.AvailabilityZone = &v return s } -// SetKeyName sets the KeyName field's value. -func (s *CreateKeyPairInput) SetKeyName(v string) *CreateKeyPairInput { - s.KeyName = &v +// SetDryRun sets the DryRun field's value. +func (s *CreateDefaultSubnetInput) SetDryRun(v bool) *CreateDefaultSubnetInput { + s.DryRun = &v return s } -// Describes a key pair. -type CreateKeyPairOutput struct { +type CreateDefaultSubnetOutput struct { _ struct{} `type:"structure"` - // The SHA-1 digest of the DER encoded private key. - KeyFingerprint *string `locationName:"keyFingerprint" type:"string"` - - // An unencrypted PEM encoded RSA private key. - KeyMaterial *string `locationName:"keyMaterial" type:"string"` - - // The name of the key pair. - KeyName *string `locationName:"keyName" type:"string"` + // Information about the subnet. + Subnet *Subnet `locationName:"subnet" type:"structure"` } // String returns the string representation -func (s CreateKeyPairOutput) String() string { +func (s CreateDefaultSubnetOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateKeyPairOutput) GoString() string { +func (s CreateDefaultSubnetOutput) GoString() string { return s.String() } -// SetKeyFingerprint sets the KeyFingerprint field's value. -func (s *CreateKeyPairOutput) SetKeyFingerprint(v string) *CreateKeyPairOutput { - s.KeyFingerprint = &v - return s -} - -// SetKeyMaterial sets the KeyMaterial field's value. -func (s *CreateKeyPairOutput) SetKeyMaterial(v string) *CreateKeyPairOutput { - s.KeyMaterial = &v - return s -} - -// SetKeyName sets the KeyName field's value. -func (s *CreateKeyPairOutput) SetKeyName(v string) *CreateKeyPairOutput { - s.KeyName = &v +// SetSubnet sets the Subnet field's value. +func (s *CreateDefaultSubnetOutput) SetSubnet(v *Subnet) *CreateDefaultSubnetOutput { + s.Subnet = v return s } -type CreateLaunchTemplateInput struct { +type CreateDefaultVpcInput struct { _ struct{} `type:"structure"` - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. For more information, see Ensuring Idempotency (http://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 // 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 information for the launch template. - // - // LaunchTemplateData is a required field - LaunchTemplateData *RequestLaunchTemplateData `type:"structure" required:"true"` - - // A name for the launch template. - // - // LaunchTemplateName is a required field - LaunchTemplateName *string `min:"3" type:"string" required:"true"` - - // A description for the first version of the launch template. - VersionDescription *string `type:"string"` } // String returns the string representation -func (s CreateLaunchTemplateInput) String() string { +func (s CreateDefaultVpcInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateLaunchTemplateInput) GoString() string { +func (s CreateDefaultVpcInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLaunchTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLaunchTemplateInput"} - if s.LaunchTemplateData == nil { - invalidParams.Add(request.NewErrParamRequired("LaunchTemplateData")) - } - if s.LaunchTemplateName == nil { - invalidParams.Add(request.NewErrParamRequired("LaunchTemplateName")) - } - if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3)) - } - if s.LaunchTemplateData != nil { - if err := s.LaunchTemplateData.Validate(); err != nil { - invalidParams.AddNested("LaunchTemplateData", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateLaunchTemplateInput) SetClientToken(v string) *CreateLaunchTemplateInput { - s.ClientToken = &v - return s -} - // SetDryRun sets the DryRun field's value. -func (s *CreateLaunchTemplateInput) SetDryRun(v bool) *CreateLaunchTemplateInput { +func (s *CreateDefaultVpcInput) SetDryRun(v bool) *CreateDefaultVpcInput { s.DryRun = &v return s } -// SetLaunchTemplateData sets the LaunchTemplateData field's value. -func (s *CreateLaunchTemplateInput) SetLaunchTemplateData(v *RequestLaunchTemplateData) *CreateLaunchTemplateInput { - s.LaunchTemplateData = v - return s -} - -// SetLaunchTemplateName sets the LaunchTemplateName field's value. -func (s *CreateLaunchTemplateInput) SetLaunchTemplateName(v string) *CreateLaunchTemplateInput { - s.LaunchTemplateName = &v - return s -} - -// SetVersionDescription sets the VersionDescription field's value. -func (s *CreateLaunchTemplateInput) SetVersionDescription(v string) *CreateLaunchTemplateInput { - s.VersionDescription = &v - return s -} - -type CreateLaunchTemplateOutput struct { +type CreateDefaultVpcOutput struct { _ struct{} `type:"structure"` - // Information about the launch template. - LaunchTemplate *LaunchTemplate `locationName:"launchTemplate" type:"structure"` + // Information about the VPC. + Vpc *Vpc `locationName:"vpc" type:"structure"` } // String returns the string representation -func (s CreateLaunchTemplateOutput) String() string { +func (s CreateDefaultVpcOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateLaunchTemplateOutput) GoString() string { +func (s CreateDefaultVpcOutput) GoString() string { return s.String() } -// SetLaunchTemplate sets the LaunchTemplate field's value. -func (s *CreateLaunchTemplateOutput) SetLaunchTemplate(v *LaunchTemplate) *CreateLaunchTemplateOutput { - s.LaunchTemplate = v +// SetVpc sets the Vpc field's value. +func (s *CreateDefaultVpcOutput) SetVpc(v *Vpc) *CreateDefaultVpcOutput { + s.Vpc = v return s } -type CreateLaunchTemplateVersionInput struct { +type CreateDhcpOptionsInput struct { _ struct{} `type:"structure"` - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - ClientToken *string `type:"string"` + // A DHCP configuration option. + // + // DhcpConfigurations is a required field + DhcpConfigurations []*NewDhcpConfiguration `locationName:"dhcpConfiguration" locationNameList:"item" type:"list" 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 information for the launch template. - // - // LaunchTemplateData is a required field - LaunchTemplateData *RequestLaunchTemplateData `type:"structure" required:"true"` - - // The ID of the launch template. You must specify either the launch template - // ID or launch template name in the request. - LaunchTemplateId *string `type:"string"` - - // The name of the launch template. You must specify either the launch template - // ID or launch template name in the request. - LaunchTemplateName *string `min:"3" type:"string"` - - // The version number of the launch template version on which to base the new - // version. The new version inherits the same launch parameters as the source - // version, except for parameters that you specify in LaunchTemplateData. - SourceVersion *string `type:"string"` - - // A description for the version of the launch template. - VersionDescription *string `type:"string"` + DryRun *bool `locationName:"dryRun" type:"boolean"` } // String returns the string representation -func (s CreateLaunchTemplateVersionInput) String() string { +func (s CreateDhcpOptionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateLaunchTemplateVersionInput) GoString() string { +func (s CreateDhcpOptionsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLaunchTemplateVersionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLaunchTemplateVersionInput"} - if s.LaunchTemplateData == nil { - invalidParams.Add(request.NewErrParamRequired("LaunchTemplateData")) - } - if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3)) - } - if s.LaunchTemplateData != nil { - if err := s.LaunchTemplateData.Validate(); err != nil { - invalidParams.AddNested("LaunchTemplateData", err.(request.ErrInvalidParams)) - } +func (s *CreateDhcpOptionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDhcpOptionsInput"} + if s.DhcpConfigurations == nil { + invalidParams.Add(request.NewErrParamRequired("DhcpConfigurations")) } if invalidParams.Len() > 0 { @@ -28748,112 +34479,75 @@ func (s *CreateLaunchTemplateVersionInput) Validate() error { return nil } -// SetClientToken sets the ClientToken field's value. -func (s *CreateLaunchTemplateVersionInput) SetClientToken(v string) *CreateLaunchTemplateVersionInput { - s.ClientToken = &v +// SetDhcpConfigurations sets the DhcpConfigurations field's value. +func (s *CreateDhcpOptionsInput) SetDhcpConfigurations(v []*NewDhcpConfiguration) *CreateDhcpOptionsInput { + s.DhcpConfigurations = v return s } // SetDryRun sets the DryRun field's value. -func (s *CreateLaunchTemplateVersionInput) SetDryRun(v bool) *CreateLaunchTemplateVersionInput { +func (s *CreateDhcpOptionsInput) SetDryRun(v bool) *CreateDhcpOptionsInput { s.DryRun = &v return s } -// SetLaunchTemplateData sets the LaunchTemplateData field's value. -func (s *CreateLaunchTemplateVersionInput) SetLaunchTemplateData(v *RequestLaunchTemplateData) *CreateLaunchTemplateVersionInput { - s.LaunchTemplateData = v - return s -} - -// SetLaunchTemplateId sets the LaunchTemplateId field's value. -func (s *CreateLaunchTemplateVersionInput) SetLaunchTemplateId(v string) *CreateLaunchTemplateVersionInput { - s.LaunchTemplateId = &v - return s -} - -// SetLaunchTemplateName sets the LaunchTemplateName field's value. -func (s *CreateLaunchTemplateVersionInput) SetLaunchTemplateName(v string) *CreateLaunchTemplateVersionInput { - s.LaunchTemplateName = &v - return s -} - -// SetSourceVersion sets the SourceVersion field's value. -func (s *CreateLaunchTemplateVersionInput) SetSourceVersion(v string) *CreateLaunchTemplateVersionInput { - s.SourceVersion = &v - return s -} - -// SetVersionDescription sets the VersionDescription field's value. -func (s *CreateLaunchTemplateVersionInput) SetVersionDescription(v string) *CreateLaunchTemplateVersionInput { - s.VersionDescription = &v - return s -} - -type CreateLaunchTemplateVersionOutput struct { +type CreateDhcpOptionsOutput struct { _ struct{} `type:"structure"` - // Information about the launch template version. - LaunchTemplateVersion *LaunchTemplateVersion `locationName:"launchTemplateVersion" type:"structure"` + // A set of DHCP options. + DhcpOptions *DhcpOptions `locationName:"dhcpOptions" type:"structure"` } // String returns the string representation -func (s CreateLaunchTemplateVersionOutput) String() string { +func (s CreateDhcpOptionsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateLaunchTemplateVersionOutput) GoString() string { +func (s CreateDhcpOptionsOutput) GoString() string { return s.String() } -// SetLaunchTemplateVersion sets the LaunchTemplateVersion field's value. -func (s *CreateLaunchTemplateVersionOutput) SetLaunchTemplateVersion(v *LaunchTemplateVersion) *CreateLaunchTemplateVersionOutput { - s.LaunchTemplateVersion = v +// SetDhcpOptions sets the DhcpOptions field's value. +func (s *CreateDhcpOptionsOutput) SetDhcpOptions(v *DhcpOptions) *CreateDhcpOptionsOutput { + s.DhcpOptions = v return s } -// Contains the parameters for CreateNatGateway. -type CreateNatGatewayInput struct { +type CreateEgressOnlyInternetGatewayInput 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"` - // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - // - // Constraint: Maximum 64 ASCII characters. + // of the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). ClientToken *string `type:"string"` - // The subnet in which to create the NAT gateway. + // 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 VPC for which to create the egress-only internet gateway. // - // SubnetId is a required field - SubnetId *string `type:"string" required:"true"` + // VpcId is a required field + VpcId *string `type:"string" required:"true"` } // String returns the string representation -func (s CreateNatGatewayInput) String() string { +func (s CreateEgressOnlyInternetGatewayInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateNatGatewayInput) GoString() string { +func (s CreateEgressOnlyInternetGatewayInput) GoString() string { return s.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")) +func (s *CreateEgressOnlyInternetGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateEgressOnlyInternetGatewayInput"} + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) } if invalidParams.Len() > 0 { @@ -28862,145 +34556,214 @@ func (s *CreateNatGatewayInput) Validate() error { return nil } -// SetAllocationId sets the AllocationId field's value. -func (s *CreateNatGatewayInput) SetAllocationId(v string) *CreateNatGatewayInput { - s.AllocationId = &v +// SetClientToken sets the ClientToken field's value. +func (s *CreateEgressOnlyInternetGatewayInput) SetClientToken(v string) *CreateEgressOnlyInternetGatewayInput { + s.ClientToken = &v return s } -// SetClientToken sets the ClientToken field's value. -func (s *CreateNatGatewayInput) SetClientToken(v string) *CreateNatGatewayInput { - s.ClientToken = &v +// SetDryRun sets the DryRun field's value. +func (s *CreateEgressOnlyInternetGatewayInput) SetDryRun(v bool) *CreateEgressOnlyInternetGatewayInput { + s.DryRun = &v return s } -// SetSubnetId sets the SubnetId field's value. -func (s *CreateNatGatewayInput) SetSubnetId(v string) *CreateNatGatewayInput { - s.SubnetId = &v +// SetVpcId sets the VpcId field's value. +func (s *CreateEgressOnlyInternetGatewayInput) SetVpcId(v string) *CreateEgressOnlyInternetGatewayInput { + s.VpcId = &v return s } -// Contains the output of CreateNatGateway. -type CreateNatGatewayOutput struct { +type CreateEgressOnlyInternetGatewayOutput struct { _ struct{} `type:"structure"` - // Unique, case-sensitive identifier to ensure the idempotency of the request. - // Only returned if a client token was provided in the request. + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. ClientToken *string `locationName:"clientToken" type:"string"` - // Information about the NAT gateway. - NatGateway *NatGateway `locationName:"natGateway" type:"structure"` + // Information about the egress-only internet gateway. + EgressOnlyInternetGateway *EgressOnlyInternetGateway `locationName:"egressOnlyInternetGateway" type:"structure"` } // String returns the string representation -func (s CreateNatGatewayOutput) String() string { +func (s CreateEgressOnlyInternetGatewayOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateNatGatewayOutput) GoString() string { +func (s CreateEgressOnlyInternetGatewayOutput) GoString() string { return s.String() } // SetClientToken sets the ClientToken field's value. -func (s *CreateNatGatewayOutput) SetClientToken(v string) *CreateNatGatewayOutput { +func (s *CreateEgressOnlyInternetGatewayOutput) SetClientToken(v string) *CreateEgressOnlyInternetGatewayOutput { s.ClientToken = &v return s } -// SetNatGateway sets the NatGateway field's value. -func (s *CreateNatGatewayOutput) SetNatGateway(v *NatGateway) *CreateNatGatewayOutput { - s.NatGateway = v +// SetEgressOnlyInternetGateway sets the EgressOnlyInternetGateway field's value. +func (s *CreateEgressOnlyInternetGatewayOutput) SetEgressOnlyInternetGateway(v *EgressOnlyInternetGateway) *CreateEgressOnlyInternetGatewayOutput { + s.EgressOnlyInternetGateway = v return s } -// Contains the parameters for CreateNetworkAclEntry. -type CreateNetworkAclEntryInput struct { +// Describes the instances that could not be launched by the fleet. +type CreateFleetError struct { _ struct{} `type:"structure"` - // The IPv4 network range to allow or deny, in CIDR notation (for example 172.16.0.0/24). - CidrBlock *string `locationName:"cidrBlock" 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 `locationName:"dryRun" type:"boolean"` - - // Indicates whether this is an egress rule (rule is applied to traffic leaving - // the subnet). - // - // Egress is a required field - Egress *bool `locationName:"egress" type:"boolean" required:"true"` - - // ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying the - // ICMP protocol, or protocol 58 (ICMPv6) with an IPv6 CIDR block. - IcmpTypeCode *IcmpTypeCode `locationName:"Icmp" type:"structure"` - - // The IPv6 network range to allow or deny, in CIDR notation (for example 2001:db8:1234:1a00::/64). - Ipv6CidrBlock *string `locationName:"ipv6CidrBlock" type:"string"` - - // The ID of the network ACL. - // - // NetworkAclId is a required field - NetworkAclId *string `locationName:"networkAclId" type:"string" required:"true"` - - // TCP or UDP protocols: The range of ports the rule applies to. - PortRange *PortRange `locationName:"portRange" type:"structure"` + // The error code that indicates why the instance could not be launched. For + // more information about error codes, see Error Codes (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html). + ErrorCode *string `locationName:"errorCode" type:"string"` - // The protocol. A value of -1 or all means all protocols. If you specify all, - // -1, or a protocol number other than 6 (tcp), 17 (udp), or 1 (icmp), traffic - // on all ports is allowed, regardless of any ports or ICMP types or codes that - // you specify. If you specify protocol 58 (ICMPv6) and specify an IPv4 CIDR - // block, traffic for all ICMP types and codes allowed, regardless of any that - // you specify. If you specify protocol 58 (ICMPv6) and specify an IPv6 CIDR - // block, you must specify an ICMP type and code. - // - // Protocol is a required field - Protocol *string `locationName:"protocol" type:"string" required:"true"` + // The error message that describes why the instance could not be launched. + // For more information about error messages, see ee Error Codes (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html). + ErrorMessage *string `locationName:"errorMessage" type:"string"` - // Indicates whether to allow or deny the traffic that matches the rule. - // - // RuleAction is a required field - RuleAction *string `locationName:"ruleAction" type:"string" required:"true" enum:"RuleAction"` + // The launch templates and overrides that were used for launching the instances. + // Any parameters that you specify in the Overrides override the same parameters + // in the launch template. + LaunchTemplateAndOverrides *LaunchTemplateAndOverridesResponse `locationName:"launchTemplateAndOverrides" type:"structure"` - // The rule number for the entry (for example, 100). ACL entries are processed - // in ascending order by rule number. - // - // Constraints: Positive integer from 1 to 32766. The range 32767 to 65535 is - // reserved for internal use. - // - // RuleNumber is a required field - RuleNumber *int64 `locationName:"ruleNumber" type:"integer" required:"true"` + // Indicates if the instance that could not be launched was a Spot Instance + // or On-Demand Instance. + Lifecycle *string `locationName:"lifecycle" type:"string" enum:"InstanceLifecycle"` } // String returns the string representation -func (s CreateNetworkAclEntryInput) String() string { +func (s CreateFleetError) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateNetworkAclEntryInput) GoString() string { +func (s CreateFleetError) GoString() string { + return s.String() +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *CreateFleetError) SetErrorCode(v string) *CreateFleetError { + s.ErrorCode = &v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *CreateFleetError) SetErrorMessage(v string) *CreateFleetError { + s.ErrorMessage = &v + return s +} + +// SetLaunchTemplateAndOverrides sets the LaunchTemplateAndOverrides field's value. +func (s *CreateFleetError) SetLaunchTemplateAndOverrides(v *LaunchTemplateAndOverridesResponse) *CreateFleetError { + s.LaunchTemplateAndOverrides = v + return s +} + +// SetLifecycle sets the Lifecycle field's value. +func (s *CreateFleetError) SetLifecycle(v string) *CreateFleetError { + s.Lifecycle = &v + return s +} + +type CreateFleetInput struct { + _ struct{} `type:"structure"` + + // Unique, case-sensitive identifier you provide to ensure the idempotency of + // the request. For more information, see Ensuring Idempotency (http://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 + // 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"` + + // Indicates whether running instances should be terminated if the total target + // capacity of the EC2 Fleet is decreased below the current size of the EC2 + // Fleet. + ExcessCapacityTerminationPolicy *string `type:"string" enum:"FleetExcessCapacityTerminationPolicy"` + + // The configuration for the EC2 Fleet. + // + // LaunchTemplateConfigs is a required field + LaunchTemplateConfigs []*FleetLaunchTemplateConfigRequest `locationNameList:"item" type:"list" required:"true"` + + // The allocation strategy of On-Demand Instances in an EC2 Fleet. + OnDemandOptions *OnDemandOptionsRequest `type:"structure"` + + // Indicates whether EC2 Fleet should replace unhealthy instances. + 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 (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template). + // For information about tagging after launch, see Tagging Your Resources (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources). + TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` + + // The TotalTargetCapacity, OnDemandTargetCapacity, SpotTargetCapacity, and + // DefaultCapacityType structure. + // + // TargetCapacitySpecification is a required field + TargetCapacitySpecification *TargetCapacitySpecificationRequest `type:"structure" required:"true"` + + // Indicates whether running instances should be terminated when the EC2 Fleet + // expires. + TerminateInstancesWithExpiration *bool `type:"boolean"` + + // The type of the request. By default, the EC2 Fleet places an asynchronous + // request for your desired capacity, and maintains it by replenishing interrupted + // Spot Instances (maintain). A value of instant places a synchronous one-time + // request, and returns errors for any instances that could not be launched. + // A value of request places an asynchronous one-time request without maintaining + // capacity or submitting requests in alternative capacity pools if capacity + // is unavailable. For more information, see EC2 Fleet Request Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-configuration-strategies.html#ec2-fleet-request-type) + // in the Amazon Elastic Compute Cloud 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). + // The default is to start fulfilling the request immediately. + ValidFrom *time.Time `type:"timestamp"` + + // The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + // At this point, no new EC2 Fleet requests are placed or able to fulfill the + // request. The default end date is 7 days from the current date. + ValidUntil *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s CreateFleetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateFleetInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateNetworkAclEntryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateNetworkAclEntryInput"} - if s.Egress == nil { - invalidParams.Add(request.NewErrParamRequired("Egress")) - } - if s.NetworkAclId == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkAclId")) +func (s *CreateFleetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateFleetInput"} + if s.LaunchTemplateConfigs == nil { + invalidParams.Add(request.NewErrParamRequired("LaunchTemplateConfigs")) } - if s.Protocol == nil { - invalidParams.Add(request.NewErrParamRequired("Protocol")) + if s.TargetCapacitySpecification == nil { + invalidParams.Add(request.NewErrParamRequired("TargetCapacitySpecification")) } - if s.RuleAction == nil { - invalidParams.Add(request.NewErrParamRequired("RuleAction")) + if s.LaunchTemplateConfigs != nil { + for i, v := range s.LaunchTemplateConfigs { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LaunchTemplateConfigs", i), err.(request.ErrInvalidParams)) + } + } } - if s.RuleNumber == nil { - invalidParams.Add(request.NewErrParamRequired("RuleNumber")) + if s.TargetCapacitySpecification != nil { + if err := s.TargetCapacitySpecification.Validate(); err != nil { + invalidParams.AddNested("TargetCapacitySpecification", err.(request.ErrInvalidParams)) + } } if invalidParams.Len() > 0 { @@ -29009,224 +34772,272 @@ func (s *CreateNetworkAclEntryInput) Validate() error { return nil } -// SetCidrBlock sets the CidrBlock field's value. -func (s *CreateNetworkAclEntryInput) SetCidrBlock(v string) *CreateNetworkAclEntryInput { - s.CidrBlock = &v +// SetClientToken sets the ClientToken field's value. +func (s *CreateFleetInput) SetClientToken(v string) *CreateFleetInput { + s.ClientToken = &v return s } // SetDryRun sets the DryRun field's value. -func (s *CreateNetworkAclEntryInput) SetDryRun(v bool) *CreateNetworkAclEntryInput { +func (s *CreateFleetInput) SetDryRun(v bool) *CreateFleetInput { s.DryRun = &v return s } -// SetEgress sets the Egress field's value. -func (s *CreateNetworkAclEntryInput) SetEgress(v bool) *CreateNetworkAclEntryInput { - s.Egress = &v +// SetExcessCapacityTerminationPolicy sets the ExcessCapacityTerminationPolicy field's value. +func (s *CreateFleetInput) SetExcessCapacityTerminationPolicy(v string) *CreateFleetInput { + s.ExcessCapacityTerminationPolicy = &v return s } -// SetIcmpTypeCode sets the IcmpTypeCode field's value. -func (s *CreateNetworkAclEntryInput) SetIcmpTypeCode(v *IcmpTypeCode) *CreateNetworkAclEntryInput { - s.IcmpTypeCode = v +// SetLaunchTemplateConfigs sets the LaunchTemplateConfigs field's value. +func (s *CreateFleetInput) SetLaunchTemplateConfigs(v []*FleetLaunchTemplateConfigRequest) *CreateFleetInput { + s.LaunchTemplateConfigs = v return s } -// SetIpv6CidrBlock sets the Ipv6CidrBlock field's value. -func (s *CreateNetworkAclEntryInput) SetIpv6CidrBlock(v string) *CreateNetworkAclEntryInput { - s.Ipv6CidrBlock = &v +// SetOnDemandOptions sets the OnDemandOptions field's value. +func (s *CreateFleetInput) SetOnDemandOptions(v *OnDemandOptionsRequest) *CreateFleetInput { + s.OnDemandOptions = v return s } -// SetNetworkAclId sets the NetworkAclId field's value. -func (s *CreateNetworkAclEntryInput) SetNetworkAclId(v string) *CreateNetworkAclEntryInput { - s.NetworkAclId = &v +// SetReplaceUnhealthyInstances sets the ReplaceUnhealthyInstances field's value. +func (s *CreateFleetInput) SetReplaceUnhealthyInstances(v bool) *CreateFleetInput { + s.ReplaceUnhealthyInstances = &v return s } -// SetPortRange sets the PortRange field's value. -func (s *CreateNetworkAclEntryInput) SetPortRange(v *PortRange) *CreateNetworkAclEntryInput { - s.PortRange = v +// SetSpotOptions sets the SpotOptions field's value. +func (s *CreateFleetInput) SetSpotOptions(v *SpotOptionsRequest) *CreateFleetInput { + s.SpotOptions = v return s } -// SetProtocol sets the Protocol field's value. -func (s *CreateNetworkAclEntryInput) SetProtocol(v string) *CreateNetworkAclEntryInput { - s.Protocol = &v +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *CreateFleetInput) SetTagSpecifications(v []*TagSpecification) *CreateFleetInput { + s.TagSpecifications = v return s } -// SetRuleAction sets the RuleAction field's value. -func (s *CreateNetworkAclEntryInput) SetRuleAction(v string) *CreateNetworkAclEntryInput { - s.RuleAction = &v +// SetTargetCapacitySpecification sets the TargetCapacitySpecification field's value. +func (s *CreateFleetInput) SetTargetCapacitySpecification(v *TargetCapacitySpecificationRequest) *CreateFleetInput { + s.TargetCapacitySpecification = v return s } -// SetRuleNumber sets the RuleNumber field's value. -func (s *CreateNetworkAclEntryInput) SetRuleNumber(v int64) *CreateNetworkAclEntryInput { - s.RuleNumber = &v +// SetTerminateInstancesWithExpiration sets the TerminateInstancesWithExpiration field's value. +func (s *CreateFleetInput) SetTerminateInstancesWithExpiration(v bool) *CreateFleetInput { + s.TerminateInstancesWithExpiration = &v return s } -type CreateNetworkAclEntryOutput struct { - _ struct{} `type:"structure"` +// SetType sets the Type field's value. +func (s *CreateFleetInput) SetType(v string) *CreateFleetInput { + s.Type = &v + return s } -// String returns the string representation -func (s CreateNetworkAclEntryOutput) String() string { - return awsutil.Prettify(s) +// SetValidFrom sets the ValidFrom field's value. +func (s *CreateFleetInput) SetValidFrom(v time.Time) *CreateFleetInput { + s.ValidFrom = &v + return s } -// GoString returns the string representation -func (s CreateNetworkAclEntryOutput) GoString() string { - return s.String() +// SetValidUntil sets the ValidUntil field's value. +func (s *CreateFleetInput) SetValidUntil(v time.Time) *CreateFleetInput { + s.ValidUntil = &v + return s } -// Contains the parameters for CreateNetworkAcl. -type CreateNetworkAclInput struct { +// Describes the instances that were launched by the fleet. +type CreateFleetInstance 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 `locationName:"dryRun" type:"boolean"` + // The IDs of the instances. + InstanceIds []*string `locationName:"instanceIds" locationNameList:"item" type:"list"` - // The ID of the VPC. - // - // VpcId is a required field - VpcId *string `locationName:"vpcId" type:"string" required:"true"` + // The instance type. + InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` + + // The launch templates and overrides that were used for launching the instances. + // Any parameters that you specify in the Overrides override the same parameters + // in the launch template. + LaunchTemplateAndOverrides *LaunchTemplateAndOverridesResponse `locationName:"launchTemplateAndOverrides" type:"structure"` + + // Indicates if the instance that was launched is a Spot Instance or On-Demand + // Instance. + Lifecycle *string `locationName:"lifecycle" type:"string" enum:"InstanceLifecycle"` + + // The value is Windows for Windows instances; otherwise blank. + Platform *string `locationName:"platform" type:"string" enum:"PlatformValues"` } // String returns the string representation -func (s CreateNetworkAclInput) String() string { +func (s CreateFleetInstance) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateNetworkAclInput) GoString() string { +func (s CreateFleetInstance) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateNetworkAclInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateNetworkAclInput"} - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } +// SetInstanceIds sets the InstanceIds field's value. +func (s *CreateFleetInstance) SetInstanceIds(v []*string) *CreateFleetInstance { + s.InstanceIds = v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetInstanceType sets the InstanceType field's value. +func (s *CreateFleetInstance) SetInstanceType(v string) *CreateFleetInstance { + s.InstanceType = &v + return s } -// SetDryRun sets the DryRun field's value. -func (s *CreateNetworkAclInput) SetDryRun(v bool) *CreateNetworkAclInput { - s.DryRun = &v +// SetLaunchTemplateAndOverrides sets the LaunchTemplateAndOverrides field's value. +func (s *CreateFleetInstance) SetLaunchTemplateAndOverrides(v *LaunchTemplateAndOverridesResponse) *CreateFleetInstance { + s.LaunchTemplateAndOverrides = v return s } -// SetVpcId sets the VpcId field's value. -func (s *CreateNetworkAclInput) SetVpcId(v string) *CreateNetworkAclInput { - s.VpcId = &v +// SetLifecycle sets the Lifecycle field's value. +func (s *CreateFleetInstance) SetLifecycle(v string) *CreateFleetInstance { + s.Lifecycle = &v return s } -// Contains the output of CreateNetworkAcl. -type CreateNetworkAclOutput struct { +// SetPlatform sets the Platform field's value. +func (s *CreateFleetInstance) SetPlatform(v string) *CreateFleetInstance { + s.Platform = &v + return s +} + +type CreateFleetOutput struct { _ struct{} `type:"structure"` - // Information about the network ACL. - NetworkAcl *NetworkAcl `locationName:"networkAcl" type:"structure"` + // Information about the instances that could not be launched by the fleet. + // Valid only when Type is set to 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. + Instances []*CreateFleetInstance `locationName:"fleetInstanceSet" locationNameList:"item" type:"list"` } // String returns the string representation -func (s CreateNetworkAclOutput) String() string { +func (s CreateFleetOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateNetworkAclOutput) GoString() string { +func (s CreateFleetOutput) GoString() string { return s.String() } -// SetNetworkAcl sets the NetworkAcl field's value. -func (s *CreateNetworkAclOutput) SetNetworkAcl(v *NetworkAcl) *CreateNetworkAclOutput { - s.NetworkAcl = v +// SetErrors sets the Errors field's value. +func (s *CreateFleetOutput) SetErrors(v []*CreateFleetError) *CreateFleetOutput { + s.Errors = v return s } -// Contains the parameters for CreateNetworkInterface. -type CreateNetworkInterfaceInput struct { +// SetFleetId sets the FleetId field's value. +func (s *CreateFleetOutput) SetFleetId(v string) *CreateFleetOutput { + s.FleetId = &v + return s +} + +// SetInstances sets the Instances field's value. +func (s *CreateFleetOutput) SetInstances(v []*CreateFleetInstance) *CreateFleetOutput { + s.Instances = v + return s +} + +type CreateFlowLogsInput struct { _ struct{} `type:"structure"` - // A description for the network interface. - Description *string `locationName:"description" type:"string"` + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). + ClientToken *string `type:"string"` + + // The ARN for the IAM role that's used to post flow logs to a log group. + DeliverLogsPermissionArn *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 `locationName:"dryRun" type:"boolean"` - - // The IDs of one or more security groups. - Groups []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"` + DryRun *bool `type:"boolean"` - // The number of IPv6 addresses to assign to a network interface. Amazon EC2 - // automatically selects the IPv6 addresses from the subnet range. You can't - // use this option if specifying specific IPv6 addresses. If your subnet has - // the AssignIpv6AddressOnCreation attribute set to true, you can specify 0 - // to override this setting. - Ipv6AddressCount *int64 `locationName:"ipv6AddressCount" type:"integer"` + // Specifies the destination to which the flow log data is to be published. + // Flow log data can be published to an CloudWatch Logs log group or an Amazon + // S3 bucket. The value specified for this parameter depends on the value specified + // for LogDestinationType. + // + // If LogDestinationType is not specified or cloud-watch-logs, specify the Amazon + // Resource Name (ARN) of the CloudWatch Logs log group. + // + // If LogDestinationType is s3, specify the ARN of the Amazon S3 bucket. You + // can also specify a subfolder in the bucket. To specify a subfolder in the + // bucket, use the following ARN format: bucket_ARN/subfolder_name/. For example, + // to specify a subfolder named my-logs in a bucket named my-bucket, use the + // following ARN: arn:aws:s3:::my-bucket/my-logs/. You cannot use AWSLogs as + // a subfolder name. This is a reserved term. + LogDestination *string `type:"string"` - // One or more specific IPv6 addresses from the IPv6 CIDR block range of your - // subnet. You can't use this option if you're specifying a number of IPv6 addresses. - Ipv6Addresses []*InstanceIpv6Address `locationName:"ipv6Addresses" locationNameList:"item" type:"list"` + // Specifies the type of destination to which the flow log data is to be published. + // Flow log data can be published to CloudWatch Logs or Amazon S3. To publish + // flow log data to CloudWatch Logs, specify cloud-watch-logs. To publish flow + // log data to Amazon S3, specify s3. + // + // Default: cloud-watch-logs + LogDestinationType *string `type:"string" enum:"LogDestinationType"` - // The primary private IPv4 address of the network interface. If you don't specify - // an IPv4 address, Amazon EC2 selects one for you from the subnet's IPv4 CIDR - // range. If you specify an IP address, you cannot indicate any IP addresses - // specified in privateIpAddresses as primary (only one IP address can be designated - // as primary). - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` + // The name of the log group. + LogGroupName *string `type:"string"` - // One or more private IPv4 addresses. - PrivateIpAddresses []*PrivateIpAddressSpecification `locationName:"privateIpAddresses" locationNameList:"item" type:"list"` + // One or more subnet, network interface, or VPC IDs. + // + // Constraints: Maximum of 1000 resources + // + // ResourceIds is a required field + ResourceIds []*string `locationName:"ResourceId" locationNameList:"item" type:"list" required:"true"` - // The number of secondary private IPv4 addresses to assign to a network interface. - // When you specify a number of secondary IPv4 addresses, Amazon EC2 selects - // these IP addresses within the subnet's IPv4 CIDR range. You can't specify - // this option and specify more than one private IP address using privateIpAddresses. + // The type of resource on which to create the flow log. // - // The number of IP addresses you can assign to a network interface varies by - // instance type. For more information, see IP Addresses Per ENI Per Instance - // Type (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI) - // in the Amazon Virtual Private Cloud User Guide. - SecondaryPrivateIpAddressCount *int64 `locationName:"secondaryPrivateIpAddressCount" type:"integer"` + // ResourceType is a required field + ResourceType *string `type:"string" required:"true" enum:"FlowLogsResourceType"` - // The ID of the subnet to associate with the network interface. + // The type of traffic to log. // - // SubnetId is a required field - SubnetId *string `locationName:"subnetId" type:"string" required:"true"` + // TrafficType is a required field + TrafficType *string `type:"string" required:"true" enum:"TrafficType"` } // String returns the string representation -func (s CreateNetworkInterfaceInput) String() string { +func (s CreateFlowLogsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateNetworkInterfaceInput) GoString() string { +func (s CreateFlowLogsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateNetworkInterfaceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateNetworkInterfaceInput"} - if s.SubnetId == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetId")) +func (s *CreateFlowLogsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateFlowLogsInput"} + if s.ResourceIds == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceIds")) + } + if s.ResourceType == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceType")) + } + if s.TrafficType == nil { + invalidParams.Add(request.NewErrParamRequired("TrafficType")) } if invalidParams.Len() > 0 { @@ -29235,93 +35046,111 @@ func (s *CreateNetworkInterfaceInput) Validate() error { return nil } -// SetDescription sets the Description field's value. -func (s *CreateNetworkInterfaceInput) SetDescription(v string) *CreateNetworkInterfaceInput { - s.Description = &v +// SetClientToken sets the ClientToken field's value. +func (s *CreateFlowLogsInput) SetClientToken(v string) *CreateFlowLogsInput { + s.ClientToken = &v return s } -// SetDryRun sets the DryRun field's value. -func (s *CreateNetworkInterfaceInput) SetDryRun(v bool) *CreateNetworkInterfaceInput { - s.DryRun = &v +// SetDeliverLogsPermissionArn sets the DeliverLogsPermissionArn field's value. +func (s *CreateFlowLogsInput) SetDeliverLogsPermissionArn(v string) *CreateFlowLogsInput { + s.DeliverLogsPermissionArn = &v return s } -// SetGroups sets the Groups field's value. -func (s *CreateNetworkInterfaceInput) SetGroups(v []*string) *CreateNetworkInterfaceInput { - s.Groups = v +// SetDryRun sets the DryRun field's value. +func (s *CreateFlowLogsInput) SetDryRun(v bool) *CreateFlowLogsInput { + s.DryRun = &v return s } -// SetIpv6AddressCount sets the Ipv6AddressCount field's value. -func (s *CreateNetworkInterfaceInput) SetIpv6AddressCount(v int64) *CreateNetworkInterfaceInput { - s.Ipv6AddressCount = &v +// SetLogDestination sets the LogDestination field's value. +func (s *CreateFlowLogsInput) SetLogDestination(v string) *CreateFlowLogsInput { + s.LogDestination = &v return s } -// SetIpv6Addresses sets the Ipv6Addresses field's value. -func (s *CreateNetworkInterfaceInput) SetIpv6Addresses(v []*InstanceIpv6Address) *CreateNetworkInterfaceInput { - s.Ipv6Addresses = v +// SetLogDestinationType sets the LogDestinationType field's value. +func (s *CreateFlowLogsInput) SetLogDestinationType(v string) *CreateFlowLogsInput { + s.LogDestinationType = &v return s } -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *CreateNetworkInterfaceInput) SetPrivateIpAddress(v string) *CreateNetworkInterfaceInput { - s.PrivateIpAddress = &v +// SetLogGroupName sets the LogGroupName field's value. +func (s *CreateFlowLogsInput) SetLogGroupName(v string) *CreateFlowLogsInput { + s.LogGroupName = &v return s } -// SetPrivateIpAddresses sets the PrivateIpAddresses field's value. -func (s *CreateNetworkInterfaceInput) SetPrivateIpAddresses(v []*PrivateIpAddressSpecification) *CreateNetworkInterfaceInput { - s.PrivateIpAddresses = v +// SetResourceIds sets the ResourceIds field's value. +func (s *CreateFlowLogsInput) SetResourceIds(v []*string) *CreateFlowLogsInput { + s.ResourceIds = v return s } -// SetSecondaryPrivateIpAddressCount sets the SecondaryPrivateIpAddressCount field's value. -func (s *CreateNetworkInterfaceInput) SetSecondaryPrivateIpAddressCount(v int64) *CreateNetworkInterfaceInput { - s.SecondaryPrivateIpAddressCount = &v +// SetResourceType sets the ResourceType field's value. +func (s *CreateFlowLogsInput) SetResourceType(v string) *CreateFlowLogsInput { + s.ResourceType = &v return s } -// SetSubnetId sets the SubnetId field's value. -func (s *CreateNetworkInterfaceInput) SetSubnetId(v string) *CreateNetworkInterfaceInput { - s.SubnetId = &v +// SetTrafficType sets the TrafficType field's value. +func (s *CreateFlowLogsInput) SetTrafficType(v string) *CreateFlowLogsInput { + s.TrafficType = &v return s } -// Contains the output of CreateNetworkInterface. -type CreateNetworkInterfaceOutput struct { +type CreateFlowLogsOutput struct { _ struct{} `type:"structure"` - // Information about the network interface. - NetworkInterface *NetworkInterface `locationName:"networkInterface" type:"structure"` + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. + ClientToken *string `locationName:"clientToken" type:"string"` + + // The IDs of the flow logs. + FlowLogIds []*string `locationName:"flowLogIdSet" locationNameList:"item" type:"list"` + + // Information about the flow logs that could not be created successfully. + Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"` } // String returns the string representation -func (s CreateNetworkInterfaceOutput) String() string { +func (s CreateFlowLogsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateNetworkInterfaceOutput) GoString() string { +func (s CreateFlowLogsOutput) GoString() string { return s.String() } -// SetNetworkInterface sets the NetworkInterface field's value. -func (s *CreateNetworkInterfaceOutput) SetNetworkInterface(v *NetworkInterface) *CreateNetworkInterfaceOutput { - s.NetworkInterface = v +// SetClientToken sets the ClientToken field's value. +func (s *CreateFlowLogsOutput) SetClientToken(v string) *CreateFlowLogsOutput { + s.ClientToken = &v return s } -// Contains the parameters for CreateNetworkInterfacePermission. -type CreateNetworkInterfacePermissionInput struct { +// SetFlowLogIds sets the FlowLogIds field's value. +func (s *CreateFlowLogsOutput) SetFlowLogIds(v []*string) *CreateFlowLogsOutput { + s.FlowLogIds = v + return s +} + +// SetUnsuccessful sets the Unsuccessful field's value. +func (s *CreateFlowLogsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *CreateFlowLogsOutput { + s.Unsuccessful = v + return s +} + +type CreateFpgaImageInput struct { _ struct{} `type:"structure"` - // The AWS account ID. - AwsAccountId *string `type:"string"` + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). + ClientToken *string `type:"string"` - // The AWS service. Currently not supported. - AwsService *string `type:"string"` + // A description for the AFI. + Description *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 @@ -29329,35 +35158,34 @@ type CreateNetworkInterfacePermissionInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // The ID of the network interface. + // The location of the encrypted design checkpoint in Amazon S3. The input must + // be a tarball. // - // NetworkInterfaceId is a required field - NetworkInterfaceId *string `type:"string" required:"true"` + // InputStorageLocation is a required field + InputStorageLocation *StorageLocation `type:"structure" required:"true"` - // The type of permission to grant. - // - // Permission is a required field - Permission *string `type:"string" required:"true" enum:"InterfacePermissionType"` + // The location in Amazon S3 for the output logs. + LogsStorageLocation *StorageLocation `type:"structure"` + + // A name for the AFI. + Name *string `type:"string"` } // String returns the string representation -func (s CreateNetworkInterfacePermissionInput) String() string { +func (s CreateFpgaImageInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateNetworkInterfacePermissionInput) GoString() string { +func (s CreateFpgaImageInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateNetworkInterfacePermissionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateNetworkInterfacePermissionInput"} - if s.NetworkInterfaceId == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) - } - if s.Permission == nil { - invalidParams.Add(request.NewErrParamRequired("Permission")) +func (s *CreateFpgaImageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateFpgaImageInput"} + if s.InputStorageLocation == nil { + invalidParams.Add(request.NewErrParamRequired("InputStorageLocation")) } if invalidParams.Len() > 0 { @@ -29366,102 +35194,131 @@ func (s *CreateNetworkInterfacePermissionInput) Validate() error { return nil } -// SetAwsAccountId sets the AwsAccountId field's value. -func (s *CreateNetworkInterfacePermissionInput) SetAwsAccountId(v string) *CreateNetworkInterfacePermissionInput { - s.AwsAccountId = &v +// SetClientToken sets the ClientToken field's value. +func (s *CreateFpgaImageInput) SetClientToken(v string) *CreateFpgaImageInput { + s.ClientToken = &v return s } -// SetAwsService sets the AwsService field's value. -func (s *CreateNetworkInterfacePermissionInput) SetAwsService(v string) *CreateNetworkInterfacePermissionInput { - s.AwsService = &v +// SetDescription sets the Description field's value. +func (s *CreateFpgaImageInput) SetDescription(v string) *CreateFpgaImageInput { + s.Description = &v return s } // SetDryRun sets the DryRun field's value. -func (s *CreateNetworkInterfacePermissionInput) SetDryRun(v bool) *CreateNetworkInterfacePermissionInput { +func (s *CreateFpgaImageInput) SetDryRun(v bool) *CreateFpgaImageInput { s.DryRun = &v return s } -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *CreateNetworkInterfacePermissionInput) SetNetworkInterfaceId(v string) *CreateNetworkInterfacePermissionInput { - s.NetworkInterfaceId = &v +// SetInputStorageLocation sets the InputStorageLocation field's value. +func (s *CreateFpgaImageInput) SetInputStorageLocation(v *StorageLocation) *CreateFpgaImageInput { + s.InputStorageLocation = v return s } -// SetPermission sets the Permission field's value. -func (s *CreateNetworkInterfacePermissionInput) SetPermission(v string) *CreateNetworkInterfacePermissionInput { - s.Permission = &v +// SetLogsStorageLocation sets the LogsStorageLocation field's value. +func (s *CreateFpgaImageInput) SetLogsStorageLocation(v *StorageLocation) *CreateFpgaImageInput { + s.LogsStorageLocation = v return s } -// Contains the output of CreateNetworkInterfacePermission. -type CreateNetworkInterfacePermissionOutput struct { +// SetName sets the Name field's value. +func (s *CreateFpgaImageInput) SetName(v string) *CreateFpgaImageInput { + s.Name = &v + return s +} + +type CreateFpgaImageOutput struct { _ struct{} `type:"structure"` - // Information about the permission for the network interface. - InterfacePermission *NetworkInterfacePermission `locationName:"interfacePermission" type:"structure"` + // The global FPGA image identifier (AGFI ID). + FpgaImageGlobalId *string `locationName:"fpgaImageGlobalId" type:"string"` + + // The FPGA image identifier (AFI ID). + FpgaImageId *string `locationName:"fpgaImageId" type:"string"` } // String returns the string representation -func (s CreateNetworkInterfacePermissionOutput) String() string { +func (s CreateFpgaImageOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateNetworkInterfacePermissionOutput) GoString() string { +func (s CreateFpgaImageOutput) GoString() string { return s.String() } -// SetInterfacePermission sets the InterfacePermission field's value. -func (s *CreateNetworkInterfacePermissionOutput) SetInterfacePermission(v *NetworkInterfacePermission) *CreateNetworkInterfacePermissionOutput { - s.InterfacePermission = v +// SetFpgaImageGlobalId sets the FpgaImageGlobalId field's value. +func (s *CreateFpgaImageOutput) SetFpgaImageGlobalId(v string) *CreateFpgaImageOutput { + s.FpgaImageGlobalId = &v return s } -// Contains the parameters for CreatePlacementGroup. -type CreatePlacementGroupInput struct { +// SetFpgaImageId sets the FpgaImageId field's value. +func (s *CreateFpgaImageOutput) SetFpgaImageId(v string) *CreateFpgaImageOutput { + s.FpgaImageId = &v + return s +} + +// Contains the parameters for CreateImage. +type CreateImageInput struct { _ struct{} `type:"structure"` + // Information about one or more block device mappings. This parameter cannot + // be used to modify the encryption status of existing volumes or snapshots. + // To create an AMI with encrypted snapshots, use the CopyImage action. + BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"` + + // A description for the new image. + Description *string `locationName:"description" 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 `locationName:"dryRun" type:"boolean"` - // A name for the placement group. Must be unique within the scope of your account - // for the region. - // - // Constraints: Up to 255 ASCII characters + // The ID of the instance. // - // GroupName is a required field - GroupName *string `locationName:"groupName" type:"string" required:"true"` + // InstanceId is a required field + InstanceId *string `locationName:"instanceId" type:"string" required:"true"` - // The placement strategy. + // A name for the new image. + // + // Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets + // ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), + // at-signs (@), or underscores(_) // - // Strategy is a required field - Strategy *string `locationName:"strategy" type:"string" required:"true" enum:"PlacementStrategy"` + // Name is a required field + 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. + NoReboot *bool `locationName:"noReboot" type:"boolean"` } // String returns the string representation -func (s CreatePlacementGroupInput) String() string { +func (s CreateImageInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreatePlacementGroupInput) GoString() string { +func (s CreateImageInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreatePlacementGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreatePlacementGroupInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) +func (s *CreateImageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateImageInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) } - if s.Strategy == nil { - invalidParams.Add(request.NewErrParamRequired("Strategy")) + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) } if invalidParams.Len() > 0 { @@ -29470,93 +35327,101 @@ func (s *CreatePlacementGroupInput) Validate() error { return nil } +// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. +func (s *CreateImageInput) SetBlockDeviceMappings(v []*BlockDeviceMapping) *CreateImageInput { + s.BlockDeviceMappings = v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateImageInput) SetDescription(v string) *CreateImageInput { + s.Description = &v + return s +} + // SetDryRun sets the DryRun field's value. -func (s *CreatePlacementGroupInput) SetDryRun(v bool) *CreatePlacementGroupInput { +func (s *CreateImageInput) SetDryRun(v bool) *CreateImageInput { s.DryRun = &v return s } -// SetGroupName sets the GroupName field's value. -func (s *CreatePlacementGroupInput) SetGroupName(v string) *CreatePlacementGroupInput { - s.GroupName = &v +// SetInstanceId sets the InstanceId field's value. +func (s *CreateImageInput) SetInstanceId(v string) *CreateImageInput { + s.InstanceId = &v return s } -// SetStrategy sets the Strategy field's value. -func (s *CreatePlacementGroupInput) SetStrategy(v string) *CreatePlacementGroupInput { - s.Strategy = &v +// SetName sets the Name field's value. +func (s *CreateImageInput) SetName(v string) *CreateImageInput { + s.Name = &v return s } -type CreatePlacementGroupOutput struct { +// SetNoReboot sets the NoReboot field's value. +func (s *CreateImageInput) SetNoReboot(v bool) *CreateImageInput { + s.NoReboot = &v + return s +} + +// Contains the output of CreateImage. +type CreateImageOutput struct { _ struct{} `type:"structure"` + + // The ID of the new AMI. + ImageId *string `locationName:"imageId" type:"string"` } // String returns the string representation -func (s CreatePlacementGroupOutput) String() string { +func (s CreateImageOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreatePlacementGroupOutput) GoString() string { +func (s CreateImageOutput) GoString() string { return s.String() } -// Contains the parameters for CreateReservedInstancesListing. -type CreateReservedInstancesListingInput struct { +// SetImageId sets the ImageId field's value. +func (s *CreateImageOutput) SetImageId(v string) *CreateImageOutput { + s.ImageId = &v + return s +} + +// Contains the parameters for CreateInstanceExportTask. +type CreateInstanceExportTaskInput struct { _ struct{} `type:"structure"` - // Unique, case-sensitive identifier you provide to ensure idempotency of your - // listings. This helps avoid duplicate listings. For more information, see - // Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - // - // ClientToken is a required field - ClientToken *string `locationName:"clientToken" type:"string" required:"true"` + // A description for the conversion task or the resource being exported. The + // maximum length is 255 bytes. + Description *string `locationName:"description" type:"string"` - // The number of instances that are a part of a Reserved Instance account to - // be listed in the Reserved Instance Marketplace. This number should be less - // than or equal to the instance count associated with the Reserved Instance - // ID specified in this call. - // - // InstanceCount is a required field - InstanceCount *int64 `locationName:"instanceCount" type:"integer" required:"true"` + // The format and location for an instance export task. + ExportToS3Task *ExportToS3TaskSpecification `locationName:"exportToS3" type:"structure"` - // A list specifying the price of the Standard Reserved Instance for each month - // remaining in the Reserved Instance term. + // The ID of the instance. // - // PriceSchedules is a required field - PriceSchedules []*PriceScheduleSpecification `locationName:"priceSchedules" locationNameList:"item" type:"list" required:"true"` + // InstanceId is a required field + InstanceId *string `locationName:"instanceId" type:"string" required:"true"` - // The ID of the active Standard Reserved Instance. - // - // ReservedInstancesId is a required field - ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string" required:"true"` + // The target virtualization environment. + TargetEnvironment *string `locationName:"targetEnvironment" type:"string" enum:"ExportEnvironment"` } // String returns the string representation -func (s CreateReservedInstancesListingInput) String() string { +func (s CreateInstanceExportTaskInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateReservedInstancesListingInput) GoString() string { +func (s CreateInstanceExportTaskInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateReservedInstancesListingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateReservedInstancesListingInput"} - if s.ClientToken == nil { - invalidParams.Add(request.NewErrParamRequired("ClientToken")) - } - if s.InstanceCount == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceCount")) - } - if s.PriceSchedules == nil { - invalidParams.Add(request.NewErrParamRequired("PriceSchedules")) - } - if s.ReservedInstancesId == nil { - invalidParams.Add(request.NewErrParamRequired("ReservedInstancesId")) +func (s *CreateInstanceExportTaskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateInstanceExportTaskInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) } if invalidParams.Len() > 0 { @@ -29565,207 +35430,104 @@ func (s *CreateReservedInstancesListingInput) Validate() error { return nil } -// SetClientToken sets the ClientToken field's value. -func (s *CreateReservedInstancesListingInput) SetClientToken(v string) *CreateReservedInstancesListingInput { - s.ClientToken = &v +// SetDescription sets the Description field's value. +func (s *CreateInstanceExportTaskInput) SetDescription(v string) *CreateInstanceExportTaskInput { + s.Description = &v return s } -// SetInstanceCount sets the InstanceCount field's value. -func (s *CreateReservedInstancesListingInput) SetInstanceCount(v int64) *CreateReservedInstancesListingInput { - s.InstanceCount = &v +// SetExportToS3Task sets the ExportToS3Task field's value. +func (s *CreateInstanceExportTaskInput) SetExportToS3Task(v *ExportToS3TaskSpecification) *CreateInstanceExportTaskInput { + s.ExportToS3Task = v return s } -// SetPriceSchedules sets the PriceSchedules field's value. -func (s *CreateReservedInstancesListingInput) SetPriceSchedules(v []*PriceScheduleSpecification) *CreateReservedInstancesListingInput { - s.PriceSchedules = v +// SetInstanceId sets the InstanceId field's value. +func (s *CreateInstanceExportTaskInput) SetInstanceId(v string) *CreateInstanceExportTaskInput { + s.InstanceId = &v return s } -// SetReservedInstancesId sets the ReservedInstancesId field's value. -func (s *CreateReservedInstancesListingInput) SetReservedInstancesId(v string) *CreateReservedInstancesListingInput { - s.ReservedInstancesId = &v +// SetTargetEnvironment sets the TargetEnvironment field's value. +func (s *CreateInstanceExportTaskInput) SetTargetEnvironment(v string) *CreateInstanceExportTaskInput { + s.TargetEnvironment = &v return s } -// Contains the output of CreateReservedInstancesListing. -type CreateReservedInstancesListingOutput struct { +// Contains the output for CreateInstanceExportTask. +type CreateInstanceExportTaskOutput struct { _ struct{} `type:"structure"` - // Information about the Standard Reserved Instance listing. - ReservedInstancesListings []*ReservedInstancesListing `locationName:"reservedInstancesListingsSet" locationNameList:"item" type:"list"` + // Information about the instance export task. + ExportTask *ExportTask `locationName:"exportTask" type:"structure"` } // String returns the string representation -func (s CreateReservedInstancesListingOutput) String() string { +func (s CreateInstanceExportTaskOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateReservedInstancesListingOutput) GoString() string { +func (s CreateInstanceExportTaskOutput) GoString() string { return s.String() } -// SetReservedInstancesListings sets the ReservedInstancesListings field's value. -func (s *CreateReservedInstancesListingOutput) SetReservedInstancesListings(v []*ReservedInstancesListing) *CreateReservedInstancesListingOutput { - s.ReservedInstancesListings = v +// SetExportTask sets the ExportTask field's value. +func (s *CreateInstanceExportTaskOutput) SetExportTask(v *ExportTask) *CreateInstanceExportTaskOutput { + s.ExportTask = v return s } -// Contains the parameters for CreateRoute. -type CreateRouteInput struct { +type CreateInternetGatewayInput struct { _ struct{} `type:"structure"` - // The IPv4 CIDR address block used for the destination match. Routing decisions - // are based on the most specific match. - DestinationCidrBlock *string `locationName:"destinationCidrBlock" type:"string"` - - // The IPv6 CIDR block used for the destination match. Routing decisions are - // based on the most specific match. - DestinationIpv6CidrBlock *string `locationName:"destinationIpv6CidrBlock" 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 `locationName:"dryRun" type:"boolean"` - - // [IPv6 traffic only] The ID of an egress-only internet gateway. - EgressOnlyInternetGatewayId *string `locationName:"egressOnlyInternetGatewayId" type:"string"` - - // The ID of an internet gateway or virtual private gateway attached to your - // VPC. - GatewayId *string `locationName:"gatewayId" type:"string"` - - // The ID of a NAT instance in your VPC. The operation fails if you specify - // an instance ID unless exactly one network interface is attached. - InstanceId *string `locationName:"instanceId" type:"string"` - - // [IPv4 traffic only] The ID of a NAT gateway. - NatGatewayId *string `locationName:"natGatewayId" type:"string"` - - // The ID of a network interface. - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` - - // The ID of the route table for the route. - // - // RouteTableId is a required field - RouteTableId *string `locationName:"routeTableId" type:"string" required:"true"` - - // The ID of a VPC peering connection. - VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string"` } // String returns the string representation -func (s CreateRouteInput) String() string { +func (s CreateInternetGatewayInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateRouteInput) GoString() string { +func (s CreateInternetGatewayInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateRouteInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateRouteInput"} - if s.RouteTableId == nil { - invalidParams.Add(request.NewErrParamRequired("RouteTableId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. -func (s *CreateRouteInput) SetDestinationCidrBlock(v string) *CreateRouteInput { - s.DestinationCidrBlock = &v - return s -} - -// SetDestinationIpv6CidrBlock sets the DestinationIpv6CidrBlock field's value. -func (s *CreateRouteInput) SetDestinationIpv6CidrBlock(v string) *CreateRouteInput { - s.DestinationIpv6CidrBlock = &v - return s -} - // SetDryRun sets the DryRun field's value. -func (s *CreateRouteInput) SetDryRun(v bool) *CreateRouteInput { +func (s *CreateInternetGatewayInput) SetDryRun(v bool) *CreateInternetGatewayInput { s.DryRun = &v return s } -// SetEgressOnlyInternetGatewayId sets the EgressOnlyInternetGatewayId field's value. -func (s *CreateRouteInput) SetEgressOnlyInternetGatewayId(v string) *CreateRouteInput { - s.EgressOnlyInternetGatewayId = &v - return s -} - -// SetGatewayId sets the GatewayId field's value. -func (s *CreateRouteInput) SetGatewayId(v string) *CreateRouteInput { - s.GatewayId = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *CreateRouteInput) SetInstanceId(v string) *CreateRouteInput { - s.InstanceId = &v - return s -} - -// SetNatGatewayId sets the NatGatewayId field's value. -func (s *CreateRouteInput) SetNatGatewayId(v string) *CreateRouteInput { - s.NatGatewayId = &v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *CreateRouteInput) SetNetworkInterfaceId(v string) *CreateRouteInput { - s.NetworkInterfaceId = &v - return s -} - -// SetRouteTableId sets the RouteTableId field's value. -func (s *CreateRouteInput) SetRouteTableId(v string) *CreateRouteInput { - s.RouteTableId = &v - return s -} - -// SetVpcPeeringConnectionId sets the VpcPeeringConnectionId field's value. -func (s *CreateRouteInput) SetVpcPeeringConnectionId(v string) *CreateRouteInput { - s.VpcPeeringConnectionId = &v - return s -} - -// Contains the output of CreateRoute. -type CreateRouteOutput struct { +type CreateInternetGatewayOutput struct { _ struct{} `type:"structure"` - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool `locationName:"return" type:"boolean"` + // Information about the internet gateway. + InternetGateway *InternetGateway `locationName:"internetGateway" type:"structure"` } // String returns the string representation -func (s CreateRouteOutput) String() string { +func (s CreateInternetGatewayOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateRouteOutput) GoString() string { +func (s CreateInternetGatewayOutput) GoString() string { return s.String() } -// SetReturn sets the Return field's value. -func (s *CreateRouteOutput) SetReturn(v bool) *CreateRouteOutput { - s.Return = &v +// SetInternetGateway sets the InternetGateway field's value. +func (s *CreateInternetGatewayOutput) SetInternetGateway(v *InternetGateway) *CreateInternetGatewayOutput { + s.InternetGateway = v return s } -// Contains the parameters for CreateRouteTable. -type CreateRouteTableInput struct { +type CreateKeyPairInput struct { _ struct{} `type:"structure"` // Checks whether you have the required permissions for the action, without @@ -29774,27 +35536,29 @@ type CreateRouteTableInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // The ID of the VPC. + // A unique name for the key pair. // - // VpcId is a required field - VpcId *string `locationName:"vpcId" type:"string" required:"true"` + // Constraints: Up to 255 ASCII characters + // + // KeyName is a required field + KeyName *string `type:"string" required:"true"` } // String returns the string representation -func (s CreateRouteTableInput) String() string { +func (s CreateKeyPairInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateRouteTableInput) GoString() string { +func (s CreateKeyPairInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateRouteTableInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateRouteTableInput"} - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) +func (s *CreateKeyPairInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateKeyPairInput"} + if s.KeyName == nil { + invalidParams.Add(request.NewErrParamRequired("KeyName")) } if invalidParams.Len() > 0 { @@ -29804,95 +35568,112 @@ func (s *CreateRouteTableInput) Validate() error { } // SetDryRun sets the DryRun field's value. -func (s *CreateRouteTableInput) SetDryRun(v bool) *CreateRouteTableInput { +func (s *CreateKeyPairInput) SetDryRun(v bool) *CreateKeyPairInput { s.DryRun = &v return s } -// SetVpcId sets the VpcId field's value. -func (s *CreateRouteTableInput) SetVpcId(v string) *CreateRouteTableInput { - s.VpcId = &v +// SetKeyName sets the KeyName field's value. +func (s *CreateKeyPairInput) SetKeyName(v string) *CreateKeyPairInput { + s.KeyName = &v return s } -// Contains the output of CreateRouteTable. -type CreateRouteTableOutput struct { +// Describes a key pair. +type CreateKeyPairOutput struct { _ struct{} `type:"structure"` - // Information about the route table. - RouteTable *RouteTable `locationName:"routeTable" type:"structure"` + // The SHA-1 digest of the DER encoded private key. + KeyFingerprint *string `locationName:"keyFingerprint" type:"string"` + + // An unencrypted PEM encoded RSA private key. + KeyMaterial *string `locationName:"keyMaterial" type:"string"` + + // The name of the key pair. + KeyName *string `locationName:"keyName" type:"string"` } // String returns the string representation -func (s CreateRouteTableOutput) String() string { +func (s CreateKeyPairOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateRouteTableOutput) GoString() string { +func (s CreateKeyPairOutput) GoString() string { return s.String() } -// SetRouteTable sets the RouteTable field's value. -func (s *CreateRouteTableOutput) SetRouteTable(v *RouteTable) *CreateRouteTableOutput { - s.RouteTable = v +// SetKeyFingerprint sets the KeyFingerprint field's value. +func (s *CreateKeyPairOutput) SetKeyFingerprint(v string) *CreateKeyPairOutput { + s.KeyFingerprint = &v return s } -// Contains the parameters for CreateSecurityGroup. -type CreateSecurityGroupInput struct { +// SetKeyMaterial sets the KeyMaterial field's value. +func (s *CreateKeyPairOutput) SetKeyMaterial(v string) *CreateKeyPairOutput { + s.KeyMaterial = &v + return s +} + +// SetKeyName sets the KeyName field's value. +func (s *CreateKeyPairOutput) SetKeyName(v string) *CreateKeyPairOutput { + s.KeyName = &v + return s +} + +type CreateLaunchTemplateInput struct { _ struct{} `type:"structure"` - // A description for the security group. This is informational only. - // - // Constraints: Up to 255 characters in length - // - // Constraints for EC2-Classic: ASCII characters - // - // Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$* - // - // Description is a required field - Description *string `locationName:"GroupDescription" type:"string" required:"true"` + // Unique, case-sensitive identifier you provide to ensure the idempotency of + // the request. For more information, see Ensuring Idempotency (http://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 // 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 `locationName:"dryRun" type:"boolean"` + DryRun *bool `type:"boolean"` - // The name of the security group. - // - // Constraints: Up to 255 characters in length. Cannot start with sg-. - // - // Constraints for EC2-Classic: ASCII characters + // The information for the launch template. // - // Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$* + // LaunchTemplateData is a required field + LaunchTemplateData *RequestLaunchTemplateData `type:"structure" required:"true"` + + // A name for the launch template. // - // GroupName is a required field - GroupName *string `type:"string" required:"true"` + // LaunchTemplateName is a required field + LaunchTemplateName *string `min:"3" type:"string" required:"true"` - // [EC2-VPC] The ID of the VPC. Required for EC2-VPC. - VpcId *string `type:"string"` + // A description for the first version of the launch template. + VersionDescription *string `type:"string"` } // String returns the string representation -func (s CreateSecurityGroupInput) String() string { +func (s CreateLaunchTemplateInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateSecurityGroupInput) GoString() string { +func (s CreateLaunchTemplateInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateSecurityGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateSecurityGroupInput"} - if s.Description == nil { - invalidParams.Add(request.NewErrParamRequired("Description")) +func (s *CreateLaunchTemplateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateLaunchTemplateInput"} + if s.LaunchTemplateData == nil { + invalidParams.Add(request.NewErrParamRequired("LaunchTemplateData")) } - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) + if s.LaunchTemplateName == nil { + invalidParams.Add(request.NewErrParamRequired("LaunchTemplateName")) + } + if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3)) + } + if s.LaunchTemplateData != nil { + if err := s.LaunchTemplateData.Validate(); err != nil { + invalidParams.AddNested("LaunchTemplateData", err.(request.ErrInvalidParams)) + } } if invalidParams.Len() > 0 { @@ -29901,91 +35682,117 @@ func (s *CreateSecurityGroupInput) Validate() error { return nil } -// SetDescription sets the Description field's value. -func (s *CreateSecurityGroupInput) SetDescription(v string) *CreateSecurityGroupInput { - s.Description = &v +// SetClientToken sets the ClientToken field's value. +func (s *CreateLaunchTemplateInput) SetClientToken(v string) *CreateLaunchTemplateInput { + s.ClientToken = &v return s } // SetDryRun sets the DryRun field's value. -func (s *CreateSecurityGroupInput) SetDryRun(v bool) *CreateSecurityGroupInput { +func (s *CreateLaunchTemplateInput) SetDryRun(v bool) *CreateLaunchTemplateInput { s.DryRun = &v return s } -// SetGroupName sets the GroupName field's value. -func (s *CreateSecurityGroupInput) SetGroupName(v string) *CreateSecurityGroupInput { - s.GroupName = &v +// SetLaunchTemplateData sets the LaunchTemplateData field's value. +func (s *CreateLaunchTemplateInput) SetLaunchTemplateData(v *RequestLaunchTemplateData) *CreateLaunchTemplateInput { + s.LaunchTemplateData = v return s } -// SetVpcId sets the VpcId field's value. -func (s *CreateSecurityGroupInput) SetVpcId(v string) *CreateSecurityGroupInput { - s.VpcId = &v +// SetLaunchTemplateName sets the LaunchTemplateName field's value. +func (s *CreateLaunchTemplateInput) SetLaunchTemplateName(v string) *CreateLaunchTemplateInput { + s.LaunchTemplateName = &v return s } -// Contains the output of CreateSecurityGroup. -type CreateSecurityGroupOutput struct { +// SetVersionDescription sets the VersionDescription field's value. +func (s *CreateLaunchTemplateInput) SetVersionDescription(v string) *CreateLaunchTemplateInput { + s.VersionDescription = &v + return s +} + +type CreateLaunchTemplateOutput struct { _ struct{} `type:"structure"` - // The ID of the security group. - GroupId *string `locationName:"groupId" type:"string"` + // Information about the launch template. + LaunchTemplate *LaunchTemplate `locationName:"launchTemplate" type:"structure"` } // String returns the string representation -func (s CreateSecurityGroupOutput) String() string { +func (s CreateLaunchTemplateOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateSecurityGroupOutput) GoString() string { +func (s CreateLaunchTemplateOutput) GoString() string { return s.String() } -// SetGroupId sets the GroupId field's value. -func (s *CreateSecurityGroupOutput) SetGroupId(v string) *CreateSecurityGroupOutput { - s.GroupId = &v +// SetLaunchTemplate sets the LaunchTemplate field's value. +func (s *CreateLaunchTemplateOutput) SetLaunchTemplate(v *LaunchTemplate) *CreateLaunchTemplateOutput { + s.LaunchTemplate = v return s } -// Contains the parameters for CreateSnapshot. -type CreateSnapshotInput struct { +type CreateLaunchTemplateVersionInput struct { _ struct{} `type:"structure"` - // A description for the snapshot. - Description *string `type:"string"` + // Unique, case-sensitive identifier you provide to ensure the idempotency of + // the request. For more information, see Ensuring Idempotency (http://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 // 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 `locationName:"dryRun" type:"boolean"` - - // The tags to apply to the snapshot during creation. - TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` + DryRun *bool `type:"boolean"` - // The ID of the EBS volume. + // The information for the launch template. // - // VolumeId is a required field - VolumeId *string `type:"string" required:"true"` + // LaunchTemplateData is a required field + LaunchTemplateData *RequestLaunchTemplateData `type:"structure" required:"true"` + + // The ID of the launch template. You must specify either the launch template + // ID or launch template name in the request. + LaunchTemplateId *string `type:"string"` + + // The name of the launch template. You must specify either the launch template + // ID or launch template name in the request. + LaunchTemplateName *string `min:"3" type:"string"` + + // The version number of the launch template version on which to base the new + // version. The new version inherits the same launch parameters as the source + // version, except for parameters that you specify in LaunchTemplateData. + SourceVersion *string `type:"string"` + + // A description for the version of the launch template. + VersionDescription *string `type:"string"` } // String returns the string representation -func (s CreateSnapshotInput) String() string { +func (s CreateLaunchTemplateVersionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateSnapshotInput) GoString() string { +func (s CreateLaunchTemplateVersionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateSnapshotInput"} - if s.VolumeId == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeId")) +func (s *CreateLaunchTemplateVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateLaunchTemplateVersionInput"} + if s.LaunchTemplateData == nil { + invalidParams.Add(request.NewErrParamRequired("LaunchTemplateData")) + } + if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3)) + } + if s.LaunchTemplateData != nil { + if err := s.LaunchTemplateData.Validate(); err != nil { + invalidParams.AddNested("LaunchTemplateData", err.(request.ErrInvalidParams)) + } } if invalidParams.Len() > 0 { @@ -29994,64 +35801,111 @@ func (s *CreateSnapshotInput) Validate() error { return nil } -// SetDescription sets the Description field's value. -func (s *CreateSnapshotInput) SetDescription(v string) *CreateSnapshotInput { - s.Description = &v +// SetClientToken sets the ClientToken field's value. +func (s *CreateLaunchTemplateVersionInput) SetClientToken(v string) *CreateLaunchTemplateVersionInput { + s.ClientToken = &v return s } // SetDryRun sets the DryRun field's value. -func (s *CreateSnapshotInput) SetDryRun(v bool) *CreateSnapshotInput { +func (s *CreateLaunchTemplateVersionInput) SetDryRun(v bool) *CreateLaunchTemplateVersionInput { s.DryRun = &v return s } -// SetTagSpecifications sets the TagSpecifications field's value. -func (s *CreateSnapshotInput) SetTagSpecifications(v []*TagSpecification) *CreateSnapshotInput { - s.TagSpecifications = v +// SetLaunchTemplateData sets the LaunchTemplateData field's value. +func (s *CreateLaunchTemplateVersionInput) SetLaunchTemplateData(v *RequestLaunchTemplateData) *CreateLaunchTemplateVersionInput { + s.LaunchTemplateData = v return s } -// SetVolumeId sets the VolumeId field's value. -func (s *CreateSnapshotInput) SetVolumeId(v string) *CreateSnapshotInput { - s.VolumeId = &v +// SetLaunchTemplateId sets the LaunchTemplateId field's value. +func (s *CreateLaunchTemplateVersionInput) SetLaunchTemplateId(v string) *CreateLaunchTemplateVersionInput { + s.LaunchTemplateId = &v return s } -// Contains the parameters for CreateSpotDatafeedSubscription. -type CreateSpotDatafeedSubscriptionInput struct { +// SetLaunchTemplateName sets the LaunchTemplateName field's value. +func (s *CreateLaunchTemplateVersionInput) SetLaunchTemplateName(v string) *CreateLaunchTemplateVersionInput { + s.LaunchTemplateName = &v + return s +} + +// SetSourceVersion sets the SourceVersion field's value. +func (s *CreateLaunchTemplateVersionInput) SetSourceVersion(v string) *CreateLaunchTemplateVersionInput { + s.SourceVersion = &v + return s +} + +// SetVersionDescription sets the VersionDescription field's value. +func (s *CreateLaunchTemplateVersionInput) SetVersionDescription(v string) *CreateLaunchTemplateVersionInput { + s.VersionDescription = &v + return s +} + +type CreateLaunchTemplateVersionOutput struct { _ struct{} `type:"structure"` - // The Amazon S3 bucket in which to store the Spot Instance data feed. + // Information about the launch template version. + LaunchTemplateVersion *LaunchTemplateVersion `locationName:"launchTemplateVersion" type:"structure"` +} + +// String returns the string representation +func (s CreateLaunchTemplateVersionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLaunchTemplateVersionOutput) GoString() string { + return s.String() +} + +// SetLaunchTemplateVersion sets the LaunchTemplateVersion field's value. +func (s *CreateLaunchTemplateVersionOutput) SetLaunchTemplateVersion(v *LaunchTemplateVersion) *CreateLaunchTemplateVersionOutput { + s.LaunchTemplateVersion = v + return s +} + +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. // - // Bucket is a required field - Bucket *string `locationName:"bucket" type:"string" required:"true"` + // AllocationId is a required field + AllocationId *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 `locationName:"dryRun" type:"boolean"` + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + // + // Constraint: Maximum 64 ASCII characters. + ClientToken *string `type:"string"` - // A prefix for the data feed file names. - Prefix *string `locationName:"prefix" type:"string"` + // The subnet in which to create the NAT gateway. + // + // SubnetId is a required field + SubnetId *string `type:"string" required:"true"` } // String returns the string representation -func (s CreateSpotDatafeedSubscriptionInput) String() string { +func (s CreateNatGatewayInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateSpotDatafeedSubscriptionInput) GoString() string { +func (s CreateNatGatewayInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateSpotDatafeedSubscriptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateSpotDatafeedSubscriptionInput"} - if s.Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("Bucket")) +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")) } if invalidParams.Len() > 0 { @@ -30060,62 +35914,62 @@ func (s *CreateSpotDatafeedSubscriptionInput) Validate() error { return nil } -// SetBucket sets the Bucket field's value. -func (s *CreateSpotDatafeedSubscriptionInput) SetBucket(v string) *CreateSpotDatafeedSubscriptionInput { - s.Bucket = &v +// SetAllocationId sets the AllocationId field's value. +func (s *CreateNatGatewayInput) SetAllocationId(v string) *CreateNatGatewayInput { + s.AllocationId = &v return s } -// SetDryRun sets the DryRun field's value. -func (s *CreateSpotDatafeedSubscriptionInput) SetDryRun(v bool) *CreateSpotDatafeedSubscriptionInput { - s.DryRun = &v +// SetClientToken sets the ClientToken field's value. +func (s *CreateNatGatewayInput) SetClientToken(v string) *CreateNatGatewayInput { + s.ClientToken = &v return s } -// SetPrefix sets the Prefix field's value. -func (s *CreateSpotDatafeedSubscriptionInput) SetPrefix(v string) *CreateSpotDatafeedSubscriptionInput { - s.Prefix = &v +// SetSubnetId sets the SubnetId field's value. +func (s *CreateNatGatewayInput) SetSubnetId(v string) *CreateNatGatewayInput { + s.SubnetId = &v return s } -// Contains the output of CreateSpotDatafeedSubscription. -type CreateSpotDatafeedSubscriptionOutput struct { +type CreateNatGatewayOutput struct { _ struct{} `type:"structure"` - // The Spot Instance data feed subscription. - SpotDatafeedSubscription *SpotDatafeedSubscription `locationName:"spotDatafeedSubscription" type:"structure"` + // Unique, case-sensitive identifier to ensure the idempotency of the request. + // Only returned if a client token was provided in the request. + ClientToken *string `locationName:"clientToken" type:"string"` + + // Information about the NAT gateway. + NatGateway *NatGateway `locationName:"natGateway" type:"structure"` } // String returns the string representation -func (s CreateSpotDatafeedSubscriptionOutput) String() string { +func (s CreateNatGatewayOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateSpotDatafeedSubscriptionOutput) GoString() string { +func (s CreateNatGatewayOutput) GoString() string { return s.String() } -// SetSpotDatafeedSubscription sets the SpotDatafeedSubscription field's value. -func (s *CreateSpotDatafeedSubscriptionOutput) SetSpotDatafeedSubscription(v *SpotDatafeedSubscription) *CreateSpotDatafeedSubscriptionOutput { - s.SpotDatafeedSubscription = v +// SetClientToken sets the ClientToken field's value. +func (s *CreateNatGatewayOutput) SetClientToken(v string) *CreateNatGatewayOutput { + s.ClientToken = &v return s } -// Contains the parameters for CreateSubnet. -type CreateSubnetInput struct { - _ struct{} `type:"structure"` +// SetNatGateway sets the NatGateway field's value. +func (s *CreateNatGatewayOutput) SetNatGateway(v *NatGateway) *CreateNatGatewayOutput { + s.NatGateway = v + return s +} - // The Availability Zone for the subnet. - // - // Default: AWS selects one for you. If you create more than one subnet in your - // VPC, we may not necessarily select a different zone for each subnet. - AvailabilityZone *string `type:"string"` +type CreateNetworkAclEntryInput struct { + _ struct{} `type:"structure"` - // The IPv4 network range for the subnet, in CIDR notation. For example, 10.0.0.0/24. - // - // CidrBlock is a required field - CidrBlock *string `type:"string" required:"true"` + // The IPv4 network range to allow or deny, in CIDR notation (for example 172.16.0.0/24). + CidrBlock *string `locationName:"cidrBlock" 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 @@ -30123,34 +35977,81 @@ type CreateSubnetInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // The IPv6 network range for the subnet, in CIDR notation. The subnet size - // must use a /64 prefix length. - Ipv6CidrBlock *string `type:"string"` + // Indicates whether this is an egress rule (rule is applied to traffic leaving + // the subnet). + // + // Egress is a required field + Egress *bool `locationName:"egress" type:"boolean" required:"true"` - // The ID of the VPC. + // ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying protocol + // 1 (ICMP) or protocol 58 (ICMPv6) with an IPv6 CIDR block. + IcmpTypeCode *IcmpTypeCode `locationName:"Icmp" type:"structure"` + + // The IPv6 network range to allow or deny, in CIDR notation (for example 2001:db8:1234:1a00::/64). + Ipv6CidrBlock *string `locationName:"ipv6CidrBlock" type:"string"` + + // The ID of the network ACL. // - // VpcId is a required field - VpcId *string `type:"string" required:"true"` + // NetworkAclId is a required field + NetworkAclId *string `locationName:"networkAclId" type:"string" required:"true"` + + // TCP or UDP protocols: The range of ports the rule applies to. Required if + // specifying protocol 6 (TCP) or 17 (UDP). + PortRange *PortRange `locationName:"portRange" type:"structure"` + + // The protocol number. A value of "-1" means all protocols. If you specify + // "-1" or a protocol number other than "6" (TCP), "17" (UDP), or "1" (ICMP), + // traffic on all ports is allowed, regardless of any ports or ICMP types or + // codes that you specify. If you specify protocol "58" (ICMPv6) and specify + // an IPv4 CIDR block, traffic for all ICMP types and codes allowed, regardless + // of any that you specify. If you specify protocol "58" (ICMPv6) and specify + // an IPv6 CIDR block, you must specify an ICMP type and code. + // + // Protocol is a required field + Protocol *string `locationName:"protocol" type:"string" required:"true"` + + // Indicates whether to allow or deny the traffic that matches the rule. + // + // RuleAction is a required field + RuleAction *string `locationName:"ruleAction" type:"string" required:"true" enum:"RuleAction"` + + // The rule number for the entry (for example, 100). ACL entries are processed + // in ascending order by rule number. + // + // Constraints: Positive integer from 1 to 32766. The range 32767 to 65535 is + // reserved for internal use. + // + // RuleNumber is a required field + RuleNumber *int64 `locationName:"ruleNumber" type:"integer" required:"true"` } // String returns the string representation -func (s CreateSubnetInput) String() string { +func (s CreateNetworkAclEntryInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateSubnetInput) GoString() string { +func (s CreateNetworkAclEntryInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateSubnetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateSubnetInput"} - if s.CidrBlock == nil { - invalidParams.Add(request.NewErrParamRequired("CidrBlock")) +func (s *CreateNetworkAclEntryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateNetworkAclEntryInput"} + if s.Egress == nil { + invalidParams.Add(request.NewErrParamRequired("Egress")) } - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) + if s.NetworkAclId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkAclId")) + } + if s.Protocol == nil { + invalidParams.Add(request.NewErrParamRequired("Protocol")) + } + if s.RuleAction == nil { + invalidParams.Add(request.NewErrParamRequired("RuleAction")) + } + if s.RuleNumber == nil { + invalidParams.Add(request.NewErrParamRequired("RuleNumber")) } if invalidParams.Len() > 0 { @@ -30159,62 +36060,81 @@ func (s *CreateSubnetInput) Validate() error { return nil } -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateSubnetInput) SetAvailabilityZone(v string) *CreateSubnetInput { - s.AvailabilityZone = &v - return s -} - // SetCidrBlock sets the CidrBlock field's value. -func (s *CreateSubnetInput) SetCidrBlock(v string) *CreateSubnetInput { +func (s *CreateNetworkAclEntryInput) SetCidrBlock(v string) *CreateNetworkAclEntryInput { s.CidrBlock = &v return s } // SetDryRun sets the DryRun field's value. -func (s *CreateSubnetInput) SetDryRun(v bool) *CreateSubnetInput { +func (s *CreateNetworkAclEntryInput) SetDryRun(v bool) *CreateNetworkAclEntryInput { s.DryRun = &v return s } +// SetEgress sets the Egress field's value. +func (s *CreateNetworkAclEntryInput) SetEgress(v bool) *CreateNetworkAclEntryInput { + s.Egress = &v + return s +} + +// SetIcmpTypeCode sets the IcmpTypeCode field's value. +func (s *CreateNetworkAclEntryInput) SetIcmpTypeCode(v *IcmpTypeCode) *CreateNetworkAclEntryInput { + s.IcmpTypeCode = v + return s +} + // SetIpv6CidrBlock sets the Ipv6CidrBlock field's value. -func (s *CreateSubnetInput) SetIpv6CidrBlock(v string) *CreateSubnetInput { +func (s *CreateNetworkAclEntryInput) SetIpv6CidrBlock(v string) *CreateNetworkAclEntryInput { s.Ipv6CidrBlock = &v return s } -// SetVpcId sets the VpcId field's value. -func (s *CreateSubnetInput) SetVpcId(v string) *CreateSubnetInput { - s.VpcId = &v +// SetNetworkAclId sets the NetworkAclId field's value. +func (s *CreateNetworkAclEntryInput) SetNetworkAclId(v string) *CreateNetworkAclEntryInput { + s.NetworkAclId = &v return s } -// Contains the output of CreateSubnet. -type CreateSubnetOutput struct { - _ struct{} `type:"structure"` +// SetPortRange sets the PortRange field's value. +func (s *CreateNetworkAclEntryInput) SetPortRange(v *PortRange) *CreateNetworkAclEntryInput { + s.PortRange = v + return s +} - // Information about the subnet. - Subnet *Subnet `locationName:"subnet" type:"structure"` +// SetProtocol sets the Protocol field's value. +func (s *CreateNetworkAclEntryInput) SetProtocol(v string) *CreateNetworkAclEntryInput { + s.Protocol = &v + return s +} + +// SetRuleAction sets the RuleAction field's value. +func (s *CreateNetworkAclEntryInput) SetRuleAction(v string) *CreateNetworkAclEntryInput { + s.RuleAction = &v + return s +} + +// SetRuleNumber sets the RuleNumber field's value. +func (s *CreateNetworkAclEntryInput) SetRuleNumber(v int64) *CreateNetworkAclEntryInput { + s.RuleNumber = &v + return s +} + +type CreateNetworkAclEntryOutput struct { + _ struct{} `type:"structure"` } // String returns the string representation -func (s CreateSubnetOutput) String() string { +func (s CreateNetworkAclEntryOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateSubnetOutput) GoString() string { +func (s CreateNetworkAclEntryOutput) GoString() string { return s.String() } -// SetSubnet sets the Subnet field's value. -func (s *CreateSubnetOutput) SetSubnet(v *Subnet) *CreateSubnetOutput { - s.Subnet = v - return s -} - -// Contains the parameters for CreateTags. -type CreateTagsInput struct { +type CreateNetworkAclInput struct { _ struct{} `type:"structure"` // Checks whether you have the required permissions for the action, without @@ -30223,37 +36143,27 @@ type CreateTagsInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // The IDs of one or more resources to tag. For example, ami-1a2b3c4d. - // - // Resources is a required field - Resources []*string `locationName:"ResourceId" type:"list" required:"true"` - - // One or more tags. The value parameter is required, but if you don't want - // the tag to have a value, specify the parameter with no value, and we set - // the value to an empty string. + // The ID of the VPC. // - // Tags is a required field - Tags []*Tag `locationName:"Tag" locationNameList:"item" type:"list" required:"true"` + // VpcId is a required field + VpcId *string `locationName:"vpcId" type:"string" required:"true"` } // String returns the string representation -func (s CreateTagsInput) String() string { +func (s CreateNetworkAclInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateTagsInput) GoString() string { +func (s CreateNetworkAclInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateTagsInput"} - if s.Resources == nil { - invalidParams.Add(request.NewErrParamRequired("Resources")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) +func (s *CreateNetworkAclInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateNetworkAclInput"} + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) } if invalidParams.Len() > 0 { @@ -30263,46 +36173,46 @@ func (s *CreateTagsInput) Validate() error { } // SetDryRun sets the DryRun field's value. -func (s *CreateTagsInput) SetDryRun(v bool) *CreateTagsInput { +func (s *CreateNetworkAclInput) SetDryRun(v bool) *CreateNetworkAclInput { s.DryRun = &v return s } -// SetResources sets the Resources field's value. -func (s *CreateTagsInput) SetResources(v []*string) *CreateTagsInput { - s.Resources = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateTagsInput) SetTags(v []*Tag) *CreateTagsInput { - s.Tags = v +// SetVpcId sets the VpcId field's value. +func (s *CreateNetworkAclInput) SetVpcId(v string) *CreateNetworkAclInput { + s.VpcId = &v return s } -type CreateTagsOutput struct { +type CreateNetworkAclOutput struct { _ struct{} `type:"structure"` + + // Information about the network ACL. + NetworkAcl *NetworkAcl `locationName:"networkAcl" type:"structure"` } // String returns the string representation -func (s CreateTagsOutput) String() string { +func (s CreateNetworkAclOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateTagsOutput) GoString() string { +func (s CreateNetworkAclOutput) GoString() string { return s.String() } -// Contains the parameters for CreateVolume. -type CreateVolumeInput struct { +// SetNetworkAcl sets the NetworkAcl field's value. +func (s *CreateNetworkAclOutput) SetNetworkAcl(v *NetworkAcl) *CreateNetworkAclOutput { + s.NetworkAcl = v + return s +} + +// Contains the parameters for CreateNetworkInterface. +type CreateNetworkInterfaceInput struct { _ struct{} `type:"structure"` - // The Availability Zone in which to create the volume. Use DescribeAvailabilityZones - // to list the Availability Zones that are currently available to you. - // - // AvailabilityZone is a required field - AvailabilityZone *string `type:"string" required:"true"` + // A description for the network interface. + Description *string `locationName:"description" 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 @@ -30310,92 +36220,62 @@ type CreateVolumeInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // Specifies whether the volume should be encrypted. Encrypted Amazon EBS volumes - // may only be attached to instances that support Amazon EBS encryption. Volumes - // that are created from encrypted snapshots are automatically encrypted. There - // is no way to create an encrypted volume from an unencrypted snapshot or vice - // versa. If your AMI uses encrypted volumes, you can only launch it on supported - // instance types. For more information, see Amazon EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) - // in the Amazon Elastic Compute Cloud User Guide. - Encrypted *bool `locationName:"encrypted" type:"boolean"` + // The IDs of one or more security groups. + Groups []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"` - // The number of I/O operations per second (IOPS) to provision for the volume, - // with a maximum ratio of 50 IOPS/GiB. Range is 100 to 32000 IOPS for volumes - // in most regions. For exceptions, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) - // in the Amazon Elastic Compute Cloud User Guide. - // - // This parameter is valid only for Provisioned IOPS SSD (io1) volumes. - Iops *int64 `type:"integer"` + // The number of IPv6 addresses to assign to a network interface. Amazon EC2 + // automatically selects the IPv6 addresses from the subnet range. You can't + // use this option if specifying specific IPv6 addresses. If your subnet has + // the AssignIpv6AddressOnCreation attribute set to true, you can specify 0 + // to override this setting. + Ipv6AddressCount *int64 `locationName:"ipv6AddressCount" type:"integer"` - // An identifier for the AWS Key Management Service (AWS KMS) customer master - // key (CMK) to use when creating the encrypted volume. This parameter is only - // required if you want to use a non-default CMK; if this parameter is not specified, - // the default CMK for EBS is used. If a KmsKeyId is specified, the Encrypted - // flag must also be set. - // - // The CMK identifier may be provided in any of the following formats: - // - // * Key ID - // - // * Key alias - // - // * ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed - // by the region of the CMK, the AWS account ID of the CMK owner, the key - // namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. - // - // - // * ARN using key alias. The alias ARN contains the arn:aws:kms namespace, - // followed by the region of the CMK, the AWS account ID of the CMK owner, - // the alias namespace, and then the CMK alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. - // - // - // AWS parses KmsKeyId asynchronously, meaning that the action you call may - // appear to complete even though you provided an invalid identifier. The action - // will eventually fail. - KmsKeyId *string `type:"string"` + // One or more specific IPv6 addresses from the IPv6 CIDR block range of your + // subnet. You can't use this option if you're specifying a number of IPv6 addresses. + Ipv6Addresses []*InstanceIpv6Address `locationName:"ipv6Addresses" locationNameList:"item" type:"list"` - // The size of the volume, in GiBs. - // - // Constraints: 1-16384 for gp2, 4-16384 for io1, 500-16384 for st1, 500-16384 - // for sc1, and 1-1024 for standard. If you specify a snapshot, the volume size - // must be equal to or larger than the snapshot size. - // - // Default: If you're creating the volume from a snapshot and don't specify - // a volume size, the default is the snapshot size. - Size *int64 `type:"integer"` + // The primary private IPv4 address of the network interface. If you don't specify + // an IPv4 address, Amazon EC2 selects one for you from the subnet's IPv4 CIDR + // range. If you specify an IP address, you cannot indicate any IP addresses + // specified in privateIpAddresses as primary (only one IP address can be designated + // as primary). + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` - // The snapshot from which to create the volume. - SnapshotId *string `type:"string"` + // One or more private IPv4 addresses. + PrivateIpAddresses []*PrivateIpAddressSpecification `locationName:"privateIpAddresses" locationNameList:"item" type:"list"` - // The tags to apply to the volume during creation. - TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` + // The number of secondary private IPv4 addresses to assign to a network interface. + // When you specify a number of secondary IPv4 addresses, Amazon EC2 selects + // these IP addresses within the subnet's IPv4 CIDR range. You can't specify + // this option and specify more than one private IP address using privateIpAddresses. + // + // The number of IP addresses you can assign to a network interface varies by + // instance type. For more information, see IP Addresses Per ENI Per Instance + // Type (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI) + // in the Amazon Virtual Private Cloud User Guide. + SecondaryPrivateIpAddressCount *int64 `locationName:"secondaryPrivateIpAddressCount" type:"integer"` - // The volume type. This can be gp2 for General Purpose SSD, io1 for Provisioned - // IOPS SSD, st1 for Throughput Optimized HDD, sc1 for Cold HDD, or standard - // for Magnetic volumes. + // The ID of the subnet to associate with the network interface. // - // Defaults: If no volume type is specified, the default is standard in us-east-1, - // eu-west-1, eu-central-1, us-west-2, us-west-1, sa-east-1, ap-northeast-1, - // ap-northeast-2, ap-southeast-1, ap-southeast-2, ap-south-1, us-gov-west-1, - // and cn-north-1. In all other regions, EBS defaults to gp2. - VolumeType *string `type:"string" enum:"VolumeType"` + // SubnetId is a required field + SubnetId *string `locationName:"subnetId" type:"string" required:"true"` } // String returns the string representation -func (s CreateVolumeInput) String() string { +func (s CreateNetworkInterfaceInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateVolumeInput) GoString() string { +func (s CreateNetworkInterfaceInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateVolumeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateVolumeInput"} - if s.AvailabilityZone == nil { - invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) +func (s *CreateNetworkInterfaceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateNetworkInterfaceInput"} + if s.SubnetId == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetId")) } if invalidParams.Len() > 0 { @@ -30404,148 +36284,93 @@ func (s *CreateVolumeInput) Validate() error { return nil } -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateVolumeInput) SetAvailabilityZone(v string) *CreateVolumeInput { - s.AvailabilityZone = &v +// SetDescription sets the Description field's value. +func (s *CreateNetworkInterfaceInput) SetDescription(v string) *CreateNetworkInterfaceInput { + s.Description = &v return s } // SetDryRun sets the DryRun field's value. -func (s *CreateVolumeInput) SetDryRun(v bool) *CreateVolumeInput { +func (s *CreateNetworkInterfaceInput) SetDryRun(v bool) *CreateNetworkInterfaceInput { s.DryRun = &v return s } -// SetEncrypted sets the Encrypted field's value. -func (s *CreateVolumeInput) SetEncrypted(v bool) *CreateVolumeInput { - s.Encrypted = &v - return s -} - -// SetIops sets the Iops field's value. -func (s *CreateVolumeInput) SetIops(v int64) *CreateVolumeInput { - s.Iops = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CreateVolumeInput) SetKmsKeyId(v string) *CreateVolumeInput { - s.KmsKeyId = &v +// SetGroups sets the Groups field's value. +func (s *CreateNetworkInterfaceInput) SetGroups(v []*string) *CreateNetworkInterfaceInput { + s.Groups = v return s } -// SetSize sets the Size field's value. -func (s *CreateVolumeInput) SetSize(v int64) *CreateVolumeInput { - s.Size = &v +// SetIpv6AddressCount sets the Ipv6AddressCount field's value. +func (s *CreateNetworkInterfaceInput) SetIpv6AddressCount(v int64) *CreateNetworkInterfaceInput { + s.Ipv6AddressCount = &v return s } -// SetSnapshotId sets the SnapshotId field's value. -func (s *CreateVolumeInput) SetSnapshotId(v string) *CreateVolumeInput { - s.SnapshotId = &v +// SetIpv6Addresses sets the Ipv6Addresses field's value. +func (s *CreateNetworkInterfaceInput) SetIpv6Addresses(v []*InstanceIpv6Address) *CreateNetworkInterfaceInput { + s.Ipv6Addresses = v return s } -// SetTagSpecifications sets the TagSpecifications field's value. -func (s *CreateVolumeInput) SetTagSpecifications(v []*TagSpecification) *CreateVolumeInput { - s.TagSpecifications = v +// SetPrivateIpAddress sets the PrivateIpAddress field's value. +func (s *CreateNetworkInterfaceInput) SetPrivateIpAddress(v string) *CreateNetworkInterfaceInput { + s.PrivateIpAddress = &v return s } -// SetVolumeType sets the VolumeType field's value. -func (s *CreateVolumeInput) SetVolumeType(v string) *CreateVolumeInput { - s.VolumeType = &v +// SetPrivateIpAddresses sets the PrivateIpAddresses field's value. +func (s *CreateNetworkInterfaceInput) SetPrivateIpAddresses(v []*PrivateIpAddressSpecification) *CreateNetworkInterfaceInput { + s.PrivateIpAddresses = v return s } -// Describes the user or group to be added or removed from the permissions for -// a volume. -type CreateVolumePermission struct { - _ struct{} `type:"structure"` - - // The specific group that is to be added or removed from a volume's list of - // create volume permissions. - Group *string `locationName:"group" type:"string" enum:"PermissionGroup"` - - // The specific AWS account ID that is to be added or removed from a volume's - // list of create volume permissions. - UserId *string `locationName:"userId" type:"string"` -} - -// String returns the string representation -func (s CreateVolumePermission) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CreateVolumePermission) GoString() string { - return s.String() -} - -// SetGroup sets the Group field's value. -func (s *CreateVolumePermission) SetGroup(v string) *CreateVolumePermission { - s.Group = &v +// SetSecondaryPrivateIpAddressCount sets the SecondaryPrivateIpAddressCount field's value. +func (s *CreateNetworkInterfaceInput) SetSecondaryPrivateIpAddressCount(v int64) *CreateNetworkInterfaceInput { + s.SecondaryPrivateIpAddressCount = &v return s } -// SetUserId sets the UserId field's value. -func (s *CreateVolumePermission) SetUserId(v string) *CreateVolumePermission { - s.UserId = &v +// SetSubnetId sets the SubnetId field's value. +func (s *CreateNetworkInterfaceInput) SetSubnetId(v string) *CreateNetworkInterfaceInput { + s.SubnetId = &v return s } -// Describes modifications to the permissions for a volume. -type CreateVolumePermissionModifications struct { +// Contains the output of CreateNetworkInterface. +type CreateNetworkInterfaceOutput struct { _ struct{} `type:"structure"` - // Adds a specific AWS account ID or group to a volume's list of create volume - // permissions. - Add []*CreateVolumePermission `locationNameList:"item" type:"list"` - - // Removes a specific AWS account ID or group from a volume's list of create - // volume permissions. - Remove []*CreateVolumePermission `locationNameList:"item" type:"list"` + // Information about the network interface. + NetworkInterface *NetworkInterface `locationName:"networkInterface" type:"structure"` } // String returns the string representation -func (s CreateVolumePermissionModifications) String() string { +func (s CreateNetworkInterfaceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateVolumePermissionModifications) GoString() string { +func (s CreateNetworkInterfaceOutput) GoString() string { return s.String() } -// SetAdd sets the Add field's value. -func (s *CreateVolumePermissionModifications) SetAdd(v []*CreateVolumePermission) *CreateVolumePermissionModifications { - s.Add = v - return s -} - -// SetRemove sets the Remove field's value. -func (s *CreateVolumePermissionModifications) SetRemove(v []*CreateVolumePermission) *CreateVolumePermissionModifications { - s.Remove = v +// SetNetworkInterface sets the NetworkInterface field's value. +func (s *CreateNetworkInterfaceOutput) SetNetworkInterface(v *NetworkInterface) *CreateNetworkInterfaceOutput { + s.NetworkInterface = v return s } -type CreateVpcEndpointConnectionNotificationInput struct { +// Contains the parameters for CreateNetworkInterfacePermission. +type CreateNetworkInterfacePermissionInput struct { _ struct{} `type:"structure"` - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - ClientToken *string `type:"string"` - - // One or more endpoint events for which to receive notifications. Valid values - // are Accept, Connect, Delete, and Reject. - // - // ConnectionEvents is a required field - ConnectionEvents []*string `locationNameList:"item" type:"list" required:"true"` + // The AWS account ID. + AwsAccountId *string `type:"string"` - // The ARN of the SNS topic for the notifications. - // - // ConnectionNotificationArn is a required field - ConnectionNotificationArn *string `type:"string" required:"true"` + // The AWS service. Currently not supported. + AwsService *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 @@ -30553,31 +36378,35 @@ type CreateVpcEndpointConnectionNotificationInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // The ID of the endpoint service. - ServiceId *string `type:"string"` + // The ID of the network interface. + // + // NetworkInterfaceId is a required field + NetworkInterfaceId *string `type:"string" required:"true"` - // The ID of the endpoint. - VpcEndpointId *string `type:"string"` + // The type of permission to grant. + // + // Permission is a required field + Permission *string `type:"string" required:"true" enum:"InterfacePermissionType"` } // String returns the string representation -func (s CreateVpcEndpointConnectionNotificationInput) String() string { +func (s CreateNetworkInterfacePermissionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateVpcEndpointConnectionNotificationInput) GoString() string { +func (s CreateNetworkInterfacePermissionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateVpcEndpointConnectionNotificationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateVpcEndpointConnectionNotificationInput"} - if s.ConnectionEvents == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionEvents")) +func (s *CreateNetworkInterfacePermissionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateNetworkInterfacePermissionInput"} + if s.NetworkInterfaceId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) } - if s.ConnectionNotificationArn == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionNotificationArn")) + if s.Permission == nil { + invalidParams.Add(request.NewErrParamRequired("Permission")) } if invalidParams.Len() > 0 { @@ -30586,297 +36415,185 @@ func (s *CreateVpcEndpointConnectionNotificationInput) Validate() error { return nil } -// SetClientToken sets the ClientToken field's value. -func (s *CreateVpcEndpointConnectionNotificationInput) SetClientToken(v string) *CreateVpcEndpointConnectionNotificationInput { - s.ClientToken = &v - return s -} - -// SetConnectionEvents sets the ConnectionEvents field's value. -func (s *CreateVpcEndpointConnectionNotificationInput) SetConnectionEvents(v []*string) *CreateVpcEndpointConnectionNotificationInput { - s.ConnectionEvents = v +// SetAwsAccountId sets the AwsAccountId field's value. +func (s *CreateNetworkInterfacePermissionInput) SetAwsAccountId(v string) *CreateNetworkInterfacePermissionInput { + s.AwsAccountId = &v return s } -// SetConnectionNotificationArn sets the ConnectionNotificationArn field's value. -func (s *CreateVpcEndpointConnectionNotificationInput) SetConnectionNotificationArn(v string) *CreateVpcEndpointConnectionNotificationInput { - s.ConnectionNotificationArn = &v +// SetAwsService sets the AwsService field's value. +func (s *CreateNetworkInterfacePermissionInput) SetAwsService(v string) *CreateNetworkInterfacePermissionInput { + s.AwsService = &v return s } // SetDryRun sets the DryRun field's value. -func (s *CreateVpcEndpointConnectionNotificationInput) SetDryRun(v bool) *CreateVpcEndpointConnectionNotificationInput { +func (s *CreateNetworkInterfacePermissionInput) SetDryRun(v bool) *CreateNetworkInterfacePermissionInput { s.DryRun = &v return s } -// SetServiceId sets the ServiceId field's value. -func (s *CreateVpcEndpointConnectionNotificationInput) SetServiceId(v string) *CreateVpcEndpointConnectionNotificationInput { - s.ServiceId = &v +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *CreateNetworkInterfacePermissionInput) SetNetworkInterfaceId(v string) *CreateNetworkInterfacePermissionInput { + s.NetworkInterfaceId = &v return s } -// SetVpcEndpointId sets the VpcEndpointId field's value. -func (s *CreateVpcEndpointConnectionNotificationInput) SetVpcEndpointId(v string) *CreateVpcEndpointConnectionNotificationInput { - s.VpcEndpointId = &v +// SetPermission sets the Permission field's value. +func (s *CreateNetworkInterfacePermissionInput) SetPermission(v string) *CreateNetworkInterfacePermissionInput { + s.Permission = &v return s } -type CreateVpcEndpointConnectionNotificationOutput struct { +// Contains the output of CreateNetworkInterfacePermission. +type CreateNetworkInterfacePermissionOutput struct { _ struct{} `type:"structure"` - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. - ClientToken *string `locationName:"clientToken" type:"string"` - - // Information about the notification. - ConnectionNotification *ConnectionNotification `locationName:"connectionNotification" type:"structure"` + // Information about the permission for the network interface. + InterfacePermission *NetworkInterfacePermission `locationName:"interfacePermission" type:"structure"` } // String returns the string representation -func (s CreateVpcEndpointConnectionNotificationOutput) String() string { +func (s CreateNetworkInterfacePermissionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateVpcEndpointConnectionNotificationOutput) GoString() string { +func (s CreateNetworkInterfacePermissionOutput) GoString() string { return s.String() } -// SetClientToken sets the ClientToken field's value. -func (s *CreateVpcEndpointConnectionNotificationOutput) SetClientToken(v string) *CreateVpcEndpointConnectionNotificationOutput { - s.ClientToken = &v - return s -} - -// SetConnectionNotification sets the ConnectionNotification field's value. -func (s *CreateVpcEndpointConnectionNotificationOutput) SetConnectionNotification(v *ConnectionNotification) *CreateVpcEndpointConnectionNotificationOutput { - s.ConnectionNotification = v +// SetInterfacePermission sets the InterfacePermission field's value. +func (s *CreateNetworkInterfacePermissionOutput) SetInterfacePermission(v *NetworkInterfacePermission) *CreateNetworkInterfacePermissionOutput { + s.InterfacePermission = v return s } -// Contains the parameters for CreateVpcEndpoint. -type CreateVpcEndpointInput struct { +type CreatePlacementGroupInput struct { _ struct{} `type:"structure"` - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. For more information, see How to Ensure Idempotency (http://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 // 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"` - - // (Gateway endpoint) A policy to attach to the endpoint that controls access - // to the service. The policy must be in valid JSON format. If this parameter - // is not specified, we attach a default policy that allows full access to the - // service. - PolicyDocument *string `type:"string"` - - // (Interface endpoint) Indicate whether to associate a private hosted zone - // with the specified VPC. The private hosted zone contains a record set for - // the default public DNS name for the service for the region (for example, - // kinesis.us-east-1.amazonaws.com) which resolves to the private IP addresses - // of the endpoint network interfaces in the VPC. This enables you to make requests - // to the default public DNS name for the service instead of the public DNS - // names that are automatically generated by the VPC endpoint service. - // - // To use a private hosted zone, you must set the following VPC attributes to - // true: enableDnsHostnames and enableDnsSupport. Use ModifyVpcAttribute to - // set the VPC attributes. - // - // Default: true - PrivateDnsEnabled *bool `type:"boolean"` - - // (Gateway endpoint) One or more route table IDs. - RouteTableIds []*string `locationName:"RouteTableId" locationNameList:"item" type:"list"` - - // (Interface endpoint) The ID of one or more security groups to associate with - // the endpoint network interface. - SecurityGroupIds []*string `locationName:"SecurityGroupId" locationNameList:"item" type:"list"` + DryRun *bool `locationName:"dryRun" type:"boolean"` - // The service name. To get a list of available services, use the DescribeVpcEndpointServices - // request, or get the name from the service provider. + // A name for the placement group. Must be unique within the scope of your account + // for the Region. // - // ServiceName is a required field - ServiceName *string `type:"string" required:"true"` - - // (Interface endpoint) The ID of one or more subnets in which to create an - // endpoint network interface. - SubnetIds []*string `locationName:"SubnetId" locationNameList:"item" type:"list"` + // Constraints: Up to 255 ASCII characters + GroupName *string `locationName:"groupName" type:"string"` - // The type of endpoint. - // - // Default: Gateway - VpcEndpointType *string `type:"string" enum:"VpcEndpointType"` + // The number of partitions. Valid only when Strategy is set to partition. + PartitionCount *int64 `type:"integer"` - // The ID of the VPC in which the endpoint will be used. - // - // VpcId is a required field - VpcId *string `type:"string" required:"true"` + // The placement strategy. + Strategy *string `locationName:"strategy" type:"string" enum:"PlacementStrategy"` } // String returns the string representation -func (s CreateVpcEndpointInput) String() string { +func (s CreatePlacementGroupInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateVpcEndpointInput) GoString() string { +func (s CreatePlacementGroupInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateVpcEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateVpcEndpointInput"} - if s.ServiceName == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceName")) - } - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateVpcEndpointInput) SetClientToken(v string) *CreateVpcEndpointInput { - s.ClientToken = &v - return s -} - // SetDryRun sets the DryRun field's value. -func (s *CreateVpcEndpointInput) SetDryRun(v bool) *CreateVpcEndpointInput { +func (s *CreatePlacementGroupInput) SetDryRun(v bool) *CreatePlacementGroupInput { s.DryRun = &v return s } -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *CreateVpcEndpointInput) SetPolicyDocument(v string) *CreateVpcEndpointInput { - s.PolicyDocument = &v - return s -} - -// SetPrivateDnsEnabled sets the PrivateDnsEnabled field's value. -func (s *CreateVpcEndpointInput) SetPrivateDnsEnabled(v bool) *CreateVpcEndpointInput { - s.PrivateDnsEnabled = &v - return s -} - -// SetRouteTableIds sets the RouteTableIds field's value. -func (s *CreateVpcEndpointInput) SetRouteTableIds(v []*string) *CreateVpcEndpointInput { - s.RouteTableIds = v - return s -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *CreateVpcEndpointInput) SetSecurityGroupIds(v []*string) *CreateVpcEndpointInput { - s.SecurityGroupIds = v - return s -} - -// SetServiceName sets the ServiceName field's value. -func (s *CreateVpcEndpointInput) SetServiceName(v string) *CreateVpcEndpointInput { - s.ServiceName = &v - return s -} - -// SetSubnetIds sets the SubnetIds field's value. -func (s *CreateVpcEndpointInput) SetSubnetIds(v []*string) *CreateVpcEndpointInput { - s.SubnetIds = v +// SetGroupName sets the GroupName field's value. +func (s *CreatePlacementGroupInput) SetGroupName(v string) *CreatePlacementGroupInput { + s.GroupName = &v return s } -// SetVpcEndpointType sets the VpcEndpointType field's value. -func (s *CreateVpcEndpointInput) SetVpcEndpointType(v string) *CreateVpcEndpointInput { - s.VpcEndpointType = &v +// SetPartitionCount sets the PartitionCount field's value. +func (s *CreatePlacementGroupInput) SetPartitionCount(v int64) *CreatePlacementGroupInput { + s.PartitionCount = &v return s } -// SetVpcId sets the VpcId field's value. -func (s *CreateVpcEndpointInput) SetVpcId(v string) *CreateVpcEndpointInput { - s.VpcId = &v +// SetStrategy sets the Strategy field's value. +func (s *CreatePlacementGroupInput) SetStrategy(v string) *CreatePlacementGroupInput { + s.Strategy = &v return s } -// Contains the output of CreateVpcEndpoint. -type CreateVpcEndpointOutput struct { +type CreatePlacementGroupOutput struct { _ struct{} `type:"structure"` - - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. - ClientToken *string `locationName:"clientToken" type:"string"` - - // Information about the endpoint. - VpcEndpoint *VpcEndpoint `locationName:"vpcEndpoint" type:"structure"` } // String returns the string representation -func (s CreateVpcEndpointOutput) String() string { +func (s CreatePlacementGroupOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateVpcEndpointOutput) GoString() string { +func (s CreatePlacementGroupOutput) GoString() string { return s.String() } -// SetClientToken sets the ClientToken field's value. -func (s *CreateVpcEndpointOutput) SetClientToken(v string) *CreateVpcEndpointOutput { - s.ClientToken = &v - return s -} - -// SetVpcEndpoint sets the VpcEndpoint field's value. -func (s *CreateVpcEndpointOutput) SetVpcEndpoint(v *VpcEndpoint) *CreateVpcEndpointOutput { - s.VpcEndpoint = v - return s -} - -type CreateVpcEndpointServiceConfigurationInput struct { +// Contains the parameters for CreateReservedInstancesListing. +type CreateReservedInstancesListingInput struct { _ struct{} `type:"structure"` - // Indicate whether requests from service consumers to create an endpoint to - // your service must be accepted. To accept a request, use AcceptVpcEndpointConnections. - AcceptanceRequired *bool `type:"boolean"` + // Unique, case-sensitive identifier you provide to ensure idempotency of your + // listings. This helps avoid duplicate listings. For more information, see + // Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + // + // ClientToken is a required field + ClientToken *string `locationName:"clientToken" type:"string" required:"true"` - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). - ClientToken *string `type:"string"` + // The number of instances that are a part of a Reserved Instance account to + // be listed in the Reserved Instance Marketplace. This number should be less + // than or equal to the instance count associated with the Reserved Instance + // ID specified in this call. + // + // InstanceCount is a required field + InstanceCount *int64 `locationName:"instanceCount" type:"integer" 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"` + // A list specifying the price of the Standard Reserved Instance for each month + // remaining in the Reserved Instance term. + // + // PriceSchedules is a required field + PriceSchedules []*PriceScheduleSpecification `locationName:"priceSchedules" locationNameList:"item" type:"list" required:"true"` - // The Amazon Resource Names (ARNs) of one or more Network Load Balancers for - // your service. + // The ID of the active Standard Reserved Instance. // - // NetworkLoadBalancerArns is a required field - NetworkLoadBalancerArns []*string `locationName:"NetworkLoadBalancerArn" locationNameList:"item" type:"list" required:"true"` + // ReservedInstancesId is a required field + ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string" required:"true"` } // String returns the string representation -func (s CreateVpcEndpointServiceConfigurationInput) String() string { +func (s CreateReservedInstancesListingInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateVpcEndpointServiceConfigurationInput) GoString() string { +func (s CreateReservedInstancesListingInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateVpcEndpointServiceConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateVpcEndpointServiceConfigurationInput"} - if s.NetworkLoadBalancerArns == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkLoadBalancerArns")) +func (s *CreateReservedInstancesListingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateReservedInstancesListingInput"} + if s.ClientToken == nil { + invalidParams.Add(request.NewErrParamRequired("ClientToken")) + } + if s.InstanceCount == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceCount")) + } + if s.PriceSchedules == nil { + invalidParams.Add(request.NewErrParamRequired("PriceSchedules")) + } + if s.ReservedInstancesId == nil { + invalidParams.Add(request.NewErrParamRequired("ReservedInstancesId")) } if invalidParams.Len() > 0 { @@ -30885,76 +36602,64 @@ func (s *CreateVpcEndpointServiceConfigurationInput) Validate() error { return nil } -// SetAcceptanceRequired sets the AcceptanceRequired field's value. -func (s *CreateVpcEndpointServiceConfigurationInput) SetAcceptanceRequired(v bool) *CreateVpcEndpointServiceConfigurationInput { - s.AcceptanceRequired = &v +// SetClientToken sets the ClientToken field's value. +func (s *CreateReservedInstancesListingInput) SetClientToken(v string) *CreateReservedInstancesListingInput { + s.ClientToken = &v return s } -// SetClientToken sets the ClientToken field's value. -func (s *CreateVpcEndpointServiceConfigurationInput) SetClientToken(v string) *CreateVpcEndpointServiceConfigurationInput { - s.ClientToken = &v +// SetInstanceCount sets the InstanceCount field's value. +func (s *CreateReservedInstancesListingInput) SetInstanceCount(v int64) *CreateReservedInstancesListingInput { + s.InstanceCount = &v return s } -// SetDryRun sets the DryRun field's value. -func (s *CreateVpcEndpointServiceConfigurationInput) SetDryRun(v bool) *CreateVpcEndpointServiceConfigurationInput { - s.DryRun = &v +// SetPriceSchedules sets the PriceSchedules field's value. +func (s *CreateReservedInstancesListingInput) SetPriceSchedules(v []*PriceScheduleSpecification) *CreateReservedInstancesListingInput { + s.PriceSchedules = v return s } -// SetNetworkLoadBalancerArns sets the NetworkLoadBalancerArns field's value. -func (s *CreateVpcEndpointServiceConfigurationInput) SetNetworkLoadBalancerArns(v []*string) *CreateVpcEndpointServiceConfigurationInput { - s.NetworkLoadBalancerArns = v +// SetReservedInstancesId sets the ReservedInstancesId field's value. +func (s *CreateReservedInstancesListingInput) SetReservedInstancesId(v string) *CreateReservedInstancesListingInput { + s.ReservedInstancesId = &v return s } -type CreateVpcEndpointServiceConfigurationOutput struct { +// Contains the output of CreateReservedInstancesListing. +type CreateReservedInstancesListingOutput struct { _ struct{} `type:"structure"` - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. - ClientToken *string `locationName:"clientToken" type:"string"` - - // Information about the service configuration. - ServiceConfiguration *ServiceConfiguration `locationName:"serviceConfiguration" type:"structure"` + // Information about the Standard Reserved Instance listing. + ReservedInstancesListings []*ReservedInstancesListing `locationName:"reservedInstancesListingsSet" locationNameList:"item" type:"list"` } // String returns the string representation -func (s CreateVpcEndpointServiceConfigurationOutput) String() string { +func (s CreateReservedInstancesListingOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateVpcEndpointServiceConfigurationOutput) GoString() string { +func (s CreateReservedInstancesListingOutput) GoString() string { return s.String() } -// SetClientToken sets the ClientToken field's value. -func (s *CreateVpcEndpointServiceConfigurationOutput) SetClientToken(v string) *CreateVpcEndpointServiceConfigurationOutput { - s.ClientToken = &v - return s -} - -// SetServiceConfiguration sets the ServiceConfiguration field's value. -func (s *CreateVpcEndpointServiceConfigurationOutput) SetServiceConfiguration(v *ServiceConfiguration) *CreateVpcEndpointServiceConfigurationOutput { - s.ServiceConfiguration = v +// SetReservedInstancesListings sets the ReservedInstancesListings field's value. +func (s *CreateReservedInstancesListingOutput) SetReservedInstancesListings(v []*ReservedInstancesListing) *CreateReservedInstancesListingOutput { + s.ReservedInstancesListings = v return s } -// Contains the parameters for CreateVpc. -type CreateVpcInput struct { +type CreateRouteInput struct { _ struct{} `type:"structure"` - // Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for - // the VPC. You cannot specify the range of IP addresses, or the size of the - // CIDR block. - AmazonProvidedIpv6CidrBlock *bool `locationName:"amazonProvidedIpv6CidrBlock" type:"boolean"` + // The IPv4 CIDR address block used for the destination match. Routing decisions + // are based on the most specific match. + DestinationCidrBlock *string `locationName:"destinationCidrBlock" type:"string"` - // The IPv4 network range for the VPC, in CIDR notation. For example, 10.0.0.0/16. - // - // CidrBlock is a required field - CidrBlock *string `type:"string" required:"true"` + // The IPv6 CIDR block used for the destination match. Routing decisions are + // based on the most specific match. + DestinationIpv6CidrBlock *string `locationName:"destinationIpv6CidrBlock" 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 @@ -30962,34 +36667,50 @@ type CreateVpcInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // The tenancy options for instances launched into the VPC. For default, instances - // are launched with shared tenancy by default. You can launch instances with - // any tenancy into a shared tenancy VPC. For dedicated, instances are launched - // as dedicated tenancy instances by default. You can only launch instances - // with a tenancy of dedicated or host into a dedicated tenancy VPC. - // - // Important: The host value cannot be used with this parameter. Use the default - // or dedicated values only. + // [IPv6 traffic only] The ID of an egress-only internet gateway. + EgressOnlyInternetGatewayId *string `locationName:"egressOnlyInternetGatewayId" type:"string"` + + // The ID of an internet gateway or virtual private gateway attached to your + // VPC. + GatewayId *string `locationName:"gatewayId" type:"string"` + + // The ID of a NAT instance in your VPC. The operation fails if you specify + // an instance ID unless exactly one network interface is attached. + InstanceId *string `locationName:"instanceId" type:"string"` + + // [IPv4 traffic only] The ID of a NAT gateway. + NatGatewayId *string `locationName:"natGatewayId" type:"string"` + + // The ID of a network interface. + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` + + // The ID of the route table for the route. // - // Default: default - InstanceTenancy *string `locationName:"instanceTenancy" type:"string" enum:"Tenancy"` + // RouteTableId is a required field + RouteTableId *string `locationName:"routeTableId" type:"string" required:"true"` + + // The ID of a transit gateway. + TransitGatewayId *string `type:"string"` + + // The ID of a VPC peering connection. + VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string"` } // String returns the string representation -func (s CreateVpcInput) String() string { +func (s CreateRouteInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateVpcInput) GoString() string { +func (s CreateRouteInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateVpcInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateVpcInput"} - if s.CidrBlock == nil { - invalidParams.Add(request.NewErrParamRequired("CidrBlock")) +func (s *CreateRouteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateRouteInput"} + if s.RouteTableId == nil { + invalidParams.Add(request.NewErrParamRequired("RouteTableId")) } if invalidParams.Len() > 0 { @@ -30998,56 +36719,96 @@ func (s *CreateVpcInput) Validate() error { return nil } -// SetAmazonProvidedIpv6CidrBlock sets the AmazonProvidedIpv6CidrBlock field's value. -func (s *CreateVpcInput) SetAmazonProvidedIpv6CidrBlock(v bool) *CreateVpcInput { - s.AmazonProvidedIpv6CidrBlock = &v +// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. +func (s *CreateRouteInput) SetDestinationCidrBlock(v string) *CreateRouteInput { + s.DestinationCidrBlock = &v return s } -// SetCidrBlock sets the CidrBlock field's value. -func (s *CreateVpcInput) SetCidrBlock(v string) *CreateVpcInput { - s.CidrBlock = &v +// SetDestinationIpv6CidrBlock sets the DestinationIpv6CidrBlock field's value. +func (s *CreateRouteInput) SetDestinationIpv6CidrBlock(v string) *CreateRouteInput { + s.DestinationIpv6CidrBlock = &v return s } // SetDryRun sets the DryRun field's value. -func (s *CreateVpcInput) SetDryRun(v bool) *CreateVpcInput { +func (s *CreateRouteInput) SetDryRun(v bool) *CreateRouteInput { s.DryRun = &v return s } -// SetInstanceTenancy sets the InstanceTenancy field's value. -func (s *CreateVpcInput) SetInstanceTenancy(v string) *CreateVpcInput { - s.InstanceTenancy = &v +// SetEgressOnlyInternetGatewayId sets the EgressOnlyInternetGatewayId field's value. +func (s *CreateRouteInput) SetEgressOnlyInternetGatewayId(v string) *CreateRouteInput { + s.EgressOnlyInternetGatewayId = &v return s } -// Contains the output of CreateVpc. -type CreateVpcOutput struct { +// SetGatewayId sets the GatewayId field's value. +func (s *CreateRouteInput) SetGatewayId(v string) *CreateRouteInput { + s.GatewayId = &v + return s +} + +// SetInstanceId sets the InstanceId field's value. +func (s *CreateRouteInput) SetInstanceId(v string) *CreateRouteInput { + s.InstanceId = &v + return s +} + +// SetNatGatewayId sets the NatGatewayId field's value. +func (s *CreateRouteInput) SetNatGatewayId(v string) *CreateRouteInput { + s.NatGatewayId = &v + return s +} + +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *CreateRouteInput) SetNetworkInterfaceId(v string) *CreateRouteInput { + s.NetworkInterfaceId = &v + return s +} + +// SetRouteTableId sets the RouteTableId field's value. +func (s *CreateRouteInput) SetRouteTableId(v string) *CreateRouteInput { + s.RouteTableId = &v + return s +} + +// SetTransitGatewayId sets the TransitGatewayId field's value. +func (s *CreateRouteInput) SetTransitGatewayId(v string) *CreateRouteInput { + s.TransitGatewayId = &v + return s +} + +// SetVpcPeeringConnectionId sets the VpcPeeringConnectionId field's value. +func (s *CreateRouteInput) SetVpcPeeringConnectionId(v string) *CreateRouteInput { + s.VpcPeeringConnectionId = &v + return s +} + +type CreateRouteOutput struct { _ struct{} `type:"structure"` - // Information about the VPC. - Vpc *Vpc `locationName:"vpc" 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 CreateVpcOutput) String() string { +func (s CreateRouteOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateVpcOutput) GoString() string { +func (s CreateRouteOutput) GoString() string { return s.String() } -// SetVpc sets the Vpc field's value. -func (s *CreateVpcOutput) SetVpc(v *Vpc) *CreateVpcOutput { - s.Vpc = v +// SetReturn sets the Return field's value. +func (s *CreateRouteOutput) SetReturn(v bool) *CreateRouteOutput { + s.Return = &v return s } -// Contains the parameters for CreateVpcPeeringConnection. -type CreateVpcPeeringConnectionInput struct { +type CreateRouteTableInput struct { _ struct{} `type:"structure"` // Checks whether you have the required permissions for the action, without @@ -31056,97 +36817,83 @@ type CreateVpcPeeringConnectionInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // The AWS account ID of the owner of the accepter VPC. - // - // Default: Your AWS account ID - PeerOwnerId *string `locationName:"peerOwnerId" type:"string"` - - // The region code for the accepter VPC, if the accepter VPC is located in a - // region other than the region in which you make the request. + // The ID of the VPC. // - // Default: The region in which you make the request. - PeerRegion *string `type:"string"` - - // The ID of the VPC with which you are creating the VPC peering connection. - // You must specify this parameter in the request. - PeerVpcId *string `locationName:"peerVpcId" type:"string"` - - // The ID of the requester VPC. You must specify this parameter in the request. - VpcId *string `locationName:"vpcId" type:"string"` + // VpcId is a required field + VpcId *string `locationName:"vpcId" type:"string" required:"true"` } // String returns the string representation -func (s CreateVpcPeeringConnectionInput) String() string { +func (s CreateRouteTableInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateVpcPeeringConnectionInput) GoString() string { +func (s CreateRouteTableInput) GoString() string { return s.String() } -// SetDryRun sets the DryRun field's value. -func (s *CreateVpcPeeringConnectionInput) SetDryRun(v bool) *CreateVpcPeeringConnectionInput { - s.DryRun = &v - return s -} - -// SetPeerOwnerId sets the PeerOwnerId field's value. -func (s *CreateVpcPeeringConnectionInput) SetPeerOwnerId(v string) *CreateVpcPeeringConnectionInput { - s.PeerOwnerId = &v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateRouteTableInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateRouteTableInput"} + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) + } -// SetPeerRegion sets the PeerRegion field's value. -func (s *CreateVpcPeeringConnectionInput) SetPeerRegion(v string) *CreateVpcPeeringConnectionInput { - s.PeerRegion = &v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetPeerVpcId sets the PeerVpcId field's value. -func (s *CreateVpcPeeringConnectionInput) SetPeerVpcId(v string) *CreateVpcPeeringConnectionInput { - s.PeerVpcId = &v +// SetDryRun sets the DryRun field's value. +func (s *CreateRouteTableInput) SetDryRun(v bool) *CreateRouteTableInput { + s.DryRun = &v return s } // SetVpcId sets the VpcId field's value. -func (s *CreateVpcPeeringConnectionInput) SetVpcId(v string) *CreateVpcPeeringConnectionInput { +func (s *CreateRouteTableInput) SetVpcId(v string) *CreateRouteTableInput { s.VpcId = &v return s } -// Contains the output of CreateVpcPeeringConnection. -type CreateVpcPeeringConnectionOutput struct { +type CreateRouteTableOutput struct { _ struct{} `type:"structure"` - // Information about the VPC peering connection. - VpcPeeringConnection *VpcPeeringConnection `locationName:"vpcPeeringConnection" type:"structure"` + // Information about the route table. + RouteTable *RouteTable `locationName:"routeTable" type:"structure"` } // String returns the string representation -func (s CreateVpcPeeringConnectionOutput) String() string { +func (s CreateRouteTableOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateVpcPeeringConnectionOutput) GoString() string { +func (s CreateRouteTableOutput) GoString() string { return s.String() } -// SetVpcPeeringConnection sets the VpcPeeringConnection field's value. -func (s *CreateVpcPeeringConnectionOutput) SetVpcPeeringConnection(v *VpcPeeringConnection) *CreateVpcPeeringConnectionOutput { - s.VpcPeeringConnection = v +// SetRouteTable sets the RouteTable field's value. +func (s *CreateRouteTableOutput) SetRouteTable(v *RouteTable) *CreateRouteTableOutput { + s.RouteTable = v return s } -// Contains the parameters for CreateVpnConnection. -type CreateVpnConnectionInput struct { +type CreateSecurityGroupInput struct { _ struct{} `type:"structure"` - // The ID of the customer gateway. + // A description for the security group. This is informational only. // - // CustomerGatewayId is a required field - CustomerGatewayId *string `type:"string" required:"true"` + // Constraints: Up to 255 characters in length + // + // Constraints for EC2-Classic: ASCII characters + // + // Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$* + // + // Description is a required field + Description *string `locationName:"GroupDescription" 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 @@ -31154,41 +36901,39 @@ type CreateVpnConnectionInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // The options for the VPN connection. - Options *VpnConnectionOptionsSpecification `locationName:"options" type:"structure"` - - // The type of VPN connection (ipsec.1). + // The name of the security group. // - // Type is a required field - Type *string `type:"string" required:"true"` - - // The ID of the virtual private gateway. + // Constraints: Up to 255 characters in length. Cannot start with sg-. // - // VpnGatewayId is a required field - VpnGatewayId *string `type:"string" required:"true"` + // Constraints for EC2-Classic: ASCII characters + // + // Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$* + // + // GroupName is a required field + GroupName *string `type:"string" required:"true"` + + // [EC2-VPC] The ID of the VPC. Required for EC2-VPC. + VpcId *string `type:"string"` } // String returns the string representation -func (s CreateVpnConnectionInput) String() string { +func (s CreateSecurityGroupInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateVpnConnectionInput) GoString() string { +func (s CreateSecurityGroupInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateVpnConnectionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateVpnConnectionInput"} - if s.CustomerGatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("CustomerGatewayId")) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) +func (s *CreateSecurityGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateSecurityGroupInput"} + if s.Description == nil { + invalidParams.Add(request.NewErrParamRequired("Description")) } - if s.VpnGatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("VpnGatewayId")) + if s.GroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GroupName")) } if invalidParams.Len() > 0 { @@ -31197,93 +36942,90 @@ func (s *CreateVpnConnectionInput) Validate() error { return nil } -// SetCustomerGatewayId sets the CustomerGatewayId field's value. -func (s *CreateVpnConnectionInput) SetCustomerGatewayId(v string) *CreateVpnConnectionInput { - s.CustomerGatewayId = &v +// SetDescription sets the Description field's value. +func (s *CreateSecurityGroupInput) SetDescription(v string) *CreateSecurityGroupInput { + s.Description = &v return s } // SetDryRun sets the DryRun field's value. -func (s *CreateVpnConnectionInput) SetDryRun(v bool) *CreateVpnConnectionInput { +func (s *CreateSecurityGroupInput) SetDryRun(v bool) *CreateSecurityGroupInput { s.DryRun = &v return s } -// SetOptions sets the Options field's value. -func (s *CreateVpnConnectionInput) SetOptions(v *VpnConnectionOptionsSpecification) *CreateVpnConnectionInput { - s.Options = v - return s -} - -// SetType sets the Type field's value. -func (s *CreateVpnConnectionInput) SetType(v string) *CreateVpnConnectionInput { - s.Type = &v +// SetGroupName sets the GroupName field's value. +func (s *CreateSecurityGroupInput) SetGroupName(v string) *CreateSecurityGroupInput { + s.GroupName = &v return s } -// SetVpnGatewayId sets the VpnGatewayId field's value. -func (s *CreateVpnConnectionInput) SetVpnGatewayId(v string) *CreateVpnConnectionInput { - s.VpnGatewayId = &v +// SetVpcId sets the VpcId field's value. +func (s *CreateSecurityGroupInput) SetVpcId(v string) *CreateSecurityGroupInput { + s.VpcId = &v return s } -// Contains the output of CreateVpnConnection. -type CreateVpnConnectionOutput struct { +type CreateSecurityGroupOutput struct { _ struct{} `type:"structure"` - // Information about the VPN connection. - VpnConnection *VpnConnection `locationName:"vpnConnection" type:"structure"` + // The ID of the security group. + GroupId *string `locationName:"groupId" type:"string"` } // String returns the string representation -func (s CreateVpnConnectionOutput) String() string { +func (s CreateSecurityGroupOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateVpnConnectionOutput) GoString() string { +func (s CreateSecurityGroupOutput) GoString() string { return s.String() } -// SetVpnConnection sets the VpnConnection field's value. -func (s *CreateVpnConnectionOutput) SetVpnConnection(v *VpnConnection) *CreateVpnConnectionOutput { - s.VpnConnection = v +// SetGroupId sets the GroupId field's value. +func (s *CreateSecurityGroupOutput) SetGroupId(v string) *CreateSecurityGroupOutput { + s.GroupId = &v return s } -// Contains the parameters for CreateVpnConnectionRoute. -type CreateVpnConnectionRouteInput struct { +// Contains the parameters for CreateSnapshot. +type CreateSnapshotInput struct { _ struct{} `type:"structure"` - // The CIDR block associated with the local subnet of the customer network. - // - // DestinationCidrBlock is a required field - DestinationCidrBlock *string `type:"string" required:"true"` + // A description for the snapshot. + Description *string `type:"string"` - // The ID of the VPN connection. + // 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 `locationName:"dryRun" type:"boolean"` + + // The tags to apply to the snapshot during creation. + TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` + + // The ID of the EBS volume. // - // VpnConnectionId is a required field - VpnConnectionId *string `type:"string" required:"true"` + // VolumeId is a required field + VolumeId *string `type:"string" required:"true"` } // String returns the string representation -func (s CreateVpnConnectionRouteInput) String() string { +func (s CreateSnapshotInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateVpnConnectionRouteInput) GoString() string { +func (s CreateSnapshotInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateVpnConnectionRouteInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateVpnConnectionRouteInput"} - if s.DestinationCidrBlock == nil { - invalidParams.Add(request.NewErrParamRequired("DestinationCidrBlock")) - } - if s.VpnConnectionId == nil { - invalidParams.Add(request.NewErrParamRequired("VpnConnectionId")) +func (s *CreateSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateSnapshotInput"} + if s.VolumeId == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeId")) } if invalidParams.Len() > 0 { @@ -31292,45 +37034,38 @@ func (s *CreateVpnConnectionRouteInput) Validate() error { return nil } -// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. -func (s *CreateVpnConnectionRouteInput) SetDestinationCidrBlock(v string) *CreateVpnConnectionRouteInput { - s.DestinationCidrBlock = &v +// SetDescription sets the Description field's value. +func (s *CreateSnapshotInput) SetDescription(v string) *CreateSnapshotInput { + s.Description = &v return s } -// SetVpnConnectionId sets the VpnConnectionId field's value. -func (s *CreateVpnConnectionRouteInput) SetVpnConnectionId(v string) *CreateVpnConnectionRouteInput { - s.VpnConnectionId = &v +// SetDryRun sets the DryRun field's value. +func (s *CreateSnapshotInput) SetDryRun(v bool) *CreateSnapshotInput { + s.DryRun = &v return s } -type CreateVpnConnectionRouteOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s CreateVpnConnectionRouteOutput) String() string { - return awsutil.Prettify(s) +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *CreateSnapshotInput) SetTagSpecifications(v []*TagSpecification) *CreateSnapshotInput { + s.TagSpecifications = v + return s } -// GoString returns the string representation -func (s CreateVpnConnectionRouteOutput) GoString() string { - return s.String() +// SetVolumeId sets the VolumeId field's value. +func (s *CreateSnapshotInput) SetVolumeId(v string) *CreateSnapshotInput { + s.VolumeId = &v + return s } -// Contains the parameters for CreateVpnGateway. -type CreateVpnGatewayInput struct { +// Contains the parameters for CreateSpotDatafeedSubscription. +type CreateSpotDatafeedSubscriptionInput struct { _ struct{} `type:"structure"` - // A private Autonomous System Number (ASN) for the Amazon side of a BGP session. - // If you're using a 16-bit ASN, it must be in the 64512 to 65534 range. If - // you're using a 32-bit ASN, it must be in the 4200000000 to 4294967294 range. + // The Amazon S3 bucket in which to store the Spot Instance data feed. // - // Default: 64512 - AmazonSideAsn *int64 `type:"long"` - - // The Availability Zone for the virtual private gateway. - AvailabilityZone *string `type:"string"` + // Bucket is a required field + Bucket *string `locationName:"bucket" 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 @@ -31338,27 +37073,25 @@ type CreateVpnGatewayInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // The type of VPN connection this virtual private gateway supports. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"GatewayType"` + // A prefix for the data feed file names. + Prefix *string `locationName:"prefix" type:"string"` } // String returns the string representation -func (s CreateVpnGatewayInput) String() string { +func (s CreateSpotDatafeedSubscriptionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateVpnGatewayInput) GoString() string { +func (s CreateSpotDatafeedSubscriptionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateVpnGatewayInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateVpnGatewayInput"} - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) +func (s *CreateSpotDatafeedSubscriptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateSpotDatafeedSubscriptionInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) } if invalidParams.Len() > 0 { @@ -31367,105 +37100,99 @@ func (s *CreateVpnGatewayInput) Validate() error { return nil } -// SetAmazonSideAsn sets the AmazonSideAsn field's value. -func (s *CreateVpnGatewayInput) SetAmazonSideAsn(v int64) *CreateVpnGatewayInput { - s.AmazonSideAsn = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateVpnGatewayInput) SetAvailabilityZone(v string) *CreateVpnGatewayInput { - s.AvailabilityZone = &v +// SetBucket sets the Bucket field's value. +func (s *CreateSpotDatafeedSubscriptionInput) SetBucket(v string) *CreateSpotDatafeedSubscriptionInput { + s.Bucket = &v return s } // SetDryRun sets the DryRun field's value. -func (s *CreateVpnGatewayInput) SetDryRun(v bool) *CreateVpnGatewayInput { +func (s *CreateSpotDatafeedSubscriptionInput) SetDryRun(v bool) *CreateSpotDatafeedSubscriptionInput { s.DryRun = &v return s } -// SetType sets the Type field's value. -func (s *CreateVpnGatewayInput) SetType(v string) *CreateVpnGatewayInput { - s.Type = &v +// SetPrefix sets the Prefix field's value. +func (s *CreateSpotDatafeedSubscriptionInput) SetPrefix(v string) *CreateSpotDatafeedSubscriptionInput { + s.Prefix = &v return s } -// Contains the output of CreateVpnGateway. -type CreateVpnGatewayOutput struct { +// Contains the output of CreateSpotDatafeedSubscription. +type CreateSpotDatafeedSubscriptionOutput struct { _ struct{} `type:"structure"` - // Information about the virtual private gateway. - VpnGateway *VpnGateway `locationName:"vpnGateway" type:"structure"` + // The Spot Instance data feed subscription. + SpotDatafeedSubscription *SpotDatafeedSubscription `locationName:"spotDatafeedSubscription" type:"structure"` } // String returns the string representation -func (s CreateVpnGatewayOutput) String() string { +func (s CreateSpotDatafeedSubscriptionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateVpnGatewayOutput) GoString() string { +func (s CreateSpotDatafeedSubscriptionOutput) GoString() string { return s.String() } -// SetVpnGateway sets the VpnGateway field's value. -func (s *CreateVpnGatewayOutput) SetVpnGateway(v *VpnGateway) *CreateVpnGatewayOutput { - s.VpnGateway = v +// SetSpotDatafeedSubscription sets the SpotDatafeedSubscription field's value. +func (s *CreateSpotDatafeedSubscriptionOutput) SetSpotDatafeedSubscription(v *SpotDatafeedSubscription) *CreateSpotDatafeedSubscriptionOutput { + s.SpotDatafeedSubscription = v return s } -// Describes the credit option for CPU usage of a T2 instance. -type CreditSpecification struct { +type CreateSubnetInput struct { _ struct{} `type:"structure"` - // The credit option for CPU usage of a T2 instance. Valid values are standard - // and unlimited. - CpuCredits *string `locationName:"cpuCredits" type:"string"` -} + // The Availability Zone for the subnet. + // + // Default: AWS selects one for you. If you create more than one subnet in your + // VPC, we may not necessarily select a different zone for each subnet. + AvailabilityZone *string `type:"string"` -// String returns the string representation -func (s CreditSpecification) String() string { - return awsutil.Prettify(s) -} + // The AZ ID of the subnet. + AvailabilityZoneId *string `type:"string"` -// GoString returns the string representation -func (s CreditSpecification) GoString() string { - return s.String() -} + // The IPv4 network range for the subnet, in CIDR notation. For example, 10.0.0.0/24. + // + // CidrBlock is a required field + CidrBlock *string `type:"string" required:"true"` -// SetCpuCredits sets the CpuCredits field's value. -func (s *CreditSpecification) SetCpuCredits(v string) *CreditSpecification { - s.CpuCredits = &v - return s -} + // 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 `locationName:"dryRun" type:"boolean"` -// The credit option for CPU usage of a T2 instance. -type CreditSpecificationRequest struct { - _ struct{} `type:"structure"` + // The IPv6 network range for the subnet, in CIDR notation. The subnet size + // must use a /64 prefix length. + Ipv6CidrBlock *string `type:"string"` - // The credit option for CPU usage of a T2 instance. Valid values are standard - // and unlimited. + // The ID of the VPC. // - // CpuCredits is a required field - CpuCredits *string `type:"string" required:"true"` + // VpcId is a required field + VpcId *string `type:"string" required:"true"` } // String returns the string representation -func (s CreditSpecificationRequest) String() string { +func (s CreateSubnetInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreditSpecificationRequest) GoString() string { +func (s CreateSubnetInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreditSpecificationRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreditSpecificationRequest"} - if s.CpuCredits == nil { - invalidParams.Add(request.NewErrParamRequired("CpuCredits")) +func (s *CreateSubnetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateSubnetInput"} + if s.CidrBlock == nil { + invalidParams.Add(request.NewErrParamRequired("CidrBlock")) + } + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) } if invalidParams.Len() > 0 { @@ -31474,179 +37201,108 @@ func (s *CreditSpecificationRequest) Validate() error { return nil } -// SetCpuCredits sets the CpuCredits field's value. -func (s *CreditSpecificationRequest) SetCpuCredits(v string) *CreditSpecificationRequest { - s.CpuCredits = &v +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *CreateSubnetInput) SetAvailabilityZone(v string) *CreateSubnetInput { + s.AvailabilityZone = &v return s } -// Describes a customer gateway. -type CustomerGateway struct { - _ struct{} `type:"structure"` - - // The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number - // (ASN). - BgpAsn *string `locationName:"bgpAsn" type:"string"` - - // The ID of the customer gateway. - CustomerGatewayId *string `locationName:"customerGatewayId" type:"string"` - - // The Internet-routable IP address of the customer gateway's outside interface. - IpAddress *string `locationName:"ipAddress" type:"string"` - - // The current state of the customer gateway (pending | available | deleting - // | deleted). - State *string `locationName:"state" type:"string"` - - // Any tags assigned to the customer gateway. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // The type of VPN connection the customer gateway supports (ipsec.1). - Type *string `locationName:"type" type:"string"` -} - -// String returns the string representation -func (s CustomerGateway) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s CustomerGateway) GoString() string { - return s.String() -} - -// SetBgpAsn sets the BgpAsn field's value. -func (s *CustomerGateway) SetBgpAsn(v string) *CustomerGateway { - s.BgpAsn = &v - return s -} - -// SetCustomerGatewayId sets the CustomerGatewayId field's value. -func (s *CustomerGateway) SetCustomerGatewayId(v string) *CustomerGateway { - s.CustomerGatewayId = &v +// SetAvailabilityZoneId sets the AvailabilityZoneId field's value. +func (s *CreateSubnetInput) SetAvailabilityZoneId(v string) *CreateSubnetInput { + s.AvailabilityZoneId = &v return s } -// SetIpAddress sets the IpAddress field's value. -func (s *CustomerGateway) SetIpAddress(v string) *CustomerGateway { - s.IpAddress = &v +// SetCidrBlock sets the CidrBlock field's value. +func (s *CreateSubnetInput) SetCidrBlock(v string) *CreateSubnetInput { + s.CidrBlock = &v return s } -// SetState sets the State field's value. -func (s *CustomerGateway) SetState(v string) *CustomerGateway { - s.State = &v +// SetDryRun sets the DryRun field's value. +func (s *CreateSubnetInput) SetDryRun(v bool) *CreateSubnetInput { + s.DryRun = &v return s } -// SetTags sets the Tags field's value. -func (s *CustomerGateway) SetTags(v []*Tag) *CustomerGateway { - s.Tags = v +// SetIpv6CidrBlock sets the Ipv6CidrBlock field's value. +func (s *CreateSubnetInput) SetIpv6CidrBlock(v string) *CreateSubnetInput { + s.Ipv6CidrBlock = &v return s } -// SetType sets the Type field's value. -func (s *CustomerGateway) SetType(v string) *CustomerGateway { - s.Type = &v +// SetVpcId sets the VpcId field's value. +func (s *CreateSubnetInput) SetVpcId(v string) *CreateSubnetInput { + s.VpcId = &v return s } -// Contains the parameters for DeleteCustomerGateway. -type DeleteCustomerGatewayInput struct { +type CreateSubnetOutput struct { _ struct{} `type:"structure"` - // The ID of the customer gateway. - // - // CustomerGatewayId is a required field - CustomerGatewayId *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 `locationName:"dryRun" type:"boolean"` + // Information about the subnet. + Subnet *Subnet `locationName:"subnet" type:"structure"` } // String returns the string representation -func (s DeleteCustomerGatewayInput) String() string { +func (s CreateSubnetOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteCustomerGatewayInput) GoString() string { +func (s CreateSubnetOutput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteCustomerGatewayInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteCustomerGatewayInput"} - if s.CustomerGatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("CustomerGatewayId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCustomerGatewayId sets the CustomerGatewayId field's value. -func (s *DeleteCustomerGatewayInput) SetCustomerGatewayId(v string) *DeleteCustomerGatewayInput { - s.CustomerGatewayId = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteCustomerGatewayInput) SetDryRun(v bool) *DeleteCustomerGatewayInput { - s.DryRun = &v +// SetSubnet sets the Subnet field's value. +func (s *CreateSubnetOutput) SetSubnet(v *Subnet) *CreateSubnetOutput { + s.Subnet = v return s } -type DeleteCustomerGatewayOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DeleteCustomerGatewayOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteCustomerGatewayOutput) GoString() string { - return s.String() -} - -// Contains the parameters for DeleteDhcpOptions. -type DeleteDhcpOptionsInput struct { +type CreateTagsInput struct { _ struct{} `type:"structure"` - // The ID of the DHCP options set. - // - // DhcpOptionsId is a required field - DhcpOptionsId *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 `locationName:"dryRun" type:"boolean"` + + // The IDs of one or more resources, separated by spaces. + // + // Constraints: Up to 1000 resource IDs. We recommend breaking up this request + // into smaller batches. + // + // Resources is a required field + Resources []*string `locationName:"ResourceId" type:"list" required:"true"` + + // One or more tags. The value parameter is required, but if you don't want + // the tag to have a value, specify the parameter with no value, and we set + // the value to an empty string. + // + // Tags is a required field + Tags []*Tag `locationName:"Tag" locationNameList:"item" type:"list" required:"true"` } // String returns the string representation -func (s DeleteDhcpOptionsInput) String() string { +func (s CreateTagsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteDhcpOptionsInput) GoString() string { +func (s CreateTagsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDhcpOptionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDhcpOptionsInput"} - if s.DhcpOptionsId == nil { - invalidParams.Add(request.NewErrParamRequired("DhcpOptionsId")) +func (s *CreateTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTagsInput"} + if s.Resources == nil { + invalidParams.Add(request.NewErrParamRequired("Resources")) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) } if invalidParams.Len() > 0 { @@ -31655,215 +37311,125 @@ func (s *DeleteDhcpOptionsInput) Validate() error { return nil } -// SetDhcpOptionsId sets the DhcpOptionsId field's value. -func (s *DeleteDhcpOptionsInput) SetDhcpOptionsId(v string) *DeleteDhcpOptionsInput { - s.DhcpOptionsId = &v +// SetDryRun sets the DryRun field's value. +func (s *CreateTagsInput) SetDryRun(v bool) *CreateTagsInput { + s.DryRun = &v return s } -// SetDryRun sets the DryRun field's value. -func (s *DeleteDhcpOptionsInput) SetDryRun(v bool) *DeleteDhcpOptionsInput { - s.DryRun = &v +// SetResources sets the Resources field's value. +func (s *CreateTagsInput) SetResources(v []*string) *CreateTagsInput { + s.Resources = v return s } -type DeleteDhcpOptionsOutput struct { +// SetTags sets the Tags field's value. +func (s *CreateTagsInput) SetTags(v []*Tag) *CreateTagsInput { + s.Tags = v + return s +} + +type CreateTagsOutput struct { _ struct{} `type:"structure"` } // String returns the string representation -func (s DeleteDhcpOptionsOutput) String() string { +func (s CreateTagsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteDhcpOptionsOutput) GoString() string { +func (s CreateTagsOutput) GoString() string { return s.String() } -type DeleteEgressOnlyInternetGatewayInput struct { +type CreateTransitGatewayInput struct { _ struct{} `type:"structure"` + // A description of the transit gateway. + Description *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 egress-only internet gateway. - // - // EgressOnlyInternetGatewayId is a required field - EgressOnlyInternetGatewayId *string `type:"string" required:"true"` + // The transit gateway options. + Options *TransitGatewayRequestOptions `type:"structure"` + + // The tags to apply to the transit gateway. + TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` } // String returns the string representation -func (s DeleteEgressOnlyInternetGatewayInput) String() string { +func (s CreateTransitGatewayInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteEgressOnlyInternetGatewayInput) GoString() string { +func (s CreateTransitGatewayInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteEgressOnlyInternetGatewayInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteEgressOnlyInternetGatewayInput"} - if s.EgressOnlyInternetGatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("EgressOnlyInternetGatewayId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetDescription sets the Description field's value. +func (s *CreateTransitGatewayInput) SetDescription(v string) *CreateTransitGatewayInput { + s.Description = &v + return s } // SetDryRun sets the DryRun field's value. -func (s *DeleteEgressOnlyInternetGatewayInput) SetDryRun(v bool) *DeleteEgressOnlyInternetGatewayInput { +func (s *CreateTransitGatewayInput) SetDryRun(v bool) *CreateTransitGatewayInput { s.DryRun = &v return s } -// SetEgressOnlyInternetGatewayId sets the EgressOnlyInternetGatewayId field's value. -func (s *DeleteEgressOnlyInternetGatewayInput) SetEgressOnlyInternetGatewayId(v string) *DeleteEgressOnlyInternetGatewayInput { - s.EgressOnlyInternetGatewayId = &v - return s -} - -type DeleteEgressOnlyInternetGatewayOutput struct { - _ struct{} `type:"structure"` - - // Returns true if the request succeeds; otherwise, it returns an error. - ReturnCode *bool `locationName:"returnCode" type:"boolean"` -} - -// String returns the string representation -func (s DeleteEgressOnlyInternetGatewayOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteEgressOnlyInternetGatewayOutput) GoString() string { - return s.String() -} - -// SetReturnCode sets the ReturnCode field's value. -func (s *DeleteEgressOnlyInternetGatewayOutput) SetReturnCode(v bool) *DeleteEgressOnlyInternetGatewayOutput { - s.ReturnCode = &v - return s -} - -// Describes an EC2 Fleet error. -type DeleteFleetError struct { - _ struct{} `type:"structure"` - - // The error code. - Code *string `locationName:"code" type:"string" enum:"DeleteFleetErrorCode"` - - // The description for the error code. - Message *string `locationName:"message" type:"string"` -} - -// String returns the string representation -func (s DeleteFleetError) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFleetError) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *DeleteFleetError) SetCode(v string) *DeleteFleetError { - s.Code = &v +// SetOptions sets the Options field's value. +func (s *CreateTransitGatewayInput) SetOptions(v *TransitGatewayRequestOptions) *CreateTransitGatewayInput { + s.Options = v return s } -// SetMessage sets the Message field's value. -func (s *DeleteFleetError) SetMessage(v string) *DeleteFleetError { - s.Message = &v +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *CreateTransitGatewayInput) SetTagSpecifications(v []*TagSpecification) *CreateTransitGatewayInput { + s.TagSpecifications = v return s } -// Describes an EC2 Fleet that was not successfully deleted. -type DeleteFleetErrorItem struct { +type CreateTransitGatewayOutput struct { _ struct{} `type:"structure"` - // The error. - Error *DeleteFleetError `locationName:"error" type:"structure"` - - // The ID of the EC2 Fleet. - FleetId *string `locationName:"fleetId" type:"string"` + // Information about the transit gateway. + TransitGateway *TransitGateway `locationName:"transitGateway" type:"structure"` } // String returns the string representation -func (s DeleteFleetErrorItem) String() string { +func (s CreateTransitGatewayOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteFleetErrorItem) GoString() string { +func (s CreateTransitGatewayOutput) GoString() string { return s.String() } -// SetError sets the Error field's value. -func (s *DeleteFleetErrorItem) SetError(v *DeleteFleetError) *DeleteFleetErrorItem { - s.Error = v - return s -} - -// SetFleetId sets the FleetId field's value. -func (s *DeleteFleetErrorItem) SetFleetId(v string) *DeleteFleetErrorItem { - s.FleetId = &v +// SetTransitGateway sets the TransitGateway field's value. +func (s *CreateTransitGatewayOutput) SetTransitGateway(v *TransitGateway) *CreateTransitGatewayOutput { + s.TransitGateway = v return s } -// Describes an EC2 Fleet that was successfully deleted. -type DeleteFleetSuccessItem struct { +type CreateTransitGatewayRouteInput struct { _ struct{} `type:"structure"` - // The current state of the EC2 Fleet. - CurrentFleetState *string `locationName:"currentFleetState" type:"string" enum:"FleetStateCode"` - - // The ID of the EC2 Fleet. - FleetId *string `locationName:"fleetId" type:"string"` - - // The previous state of the EC2 Fleet. - PreviousFleetState *string `locationName:"previousFleetState" type:"string" enum:"FleetStateCode"` -} - -// String returns the string representation -func (s DeleteFleetSuccessItem) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteFleetSuccessItem) GoString() string { - return s.String() -} - -// SetCurrentFleetState sets the CurrentFleetState field's value. -func (s *DeleteFleetSuccessItem) SetCurrentFleetState(v string) *DeleteFleetSuccessItem { - s.CurrentFleetState = &v - return s -} - -// SetFleetId sets the FleetId field's value. -func (s *DeleteFleetSuccessItem) SetFleetId(v string) *DeleteFleetSuccessItem { - s.FleetId = &v - return s -} - -// SetPreviousFleetState sets the PreviousFleetState field's value. -func (s *DeleteFleetSuccessItem) SetPreviousFleetState(v string) *DeleteFleetSuccessItem { - s.PreviousFleetState = &v - return s -} + // Indicates whether traffic matching this route is to be dropped. + Blackhole *bool `type:"boolean"` -type DeleteFleetsInput struct { - _ struct{} `type:"structure"` + // The CIDR range used for destination matches. Routing decisions are based + // on the most specific match. + // + // DestinationCidrBlock is a required field + DestinationCidrBlock *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 @@ -31871,36 +37437,33 @@ type DeleteFleetsInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // The IDs of the EC2 Fleets. - // - // FleetIds is a required field - FleetIds []*string `locationName:"FleetId" type:"list" required:"true"` + // The ID of the attachment. + TransitGatewayAttachmentId *string `type:"string"` - // Indicates whether to terminate instances for an EC2 Fleet if it is deleted - // successfully. + // The ID of the transit gateway route table. // - // TerminateInstances is a required field - TerminateInstances *bool `type:"boolean" required:"true"` + // TransitGatewayRouteTableId is a required field + TransitGatewayRouteTableId *string `type:"string" required:"true"` } // String returns the string representation -func (s DeleteFleetsInput) String() string { +func (s CreateTransitGatewayRouteInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteFleetsInput) GoString() string { +func (s CreateTransitGatewayRouteInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteFleetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteFleetsInput"} - if s.FleetIds == nil { - invalidParams.Add(request.NewErrParamRequired("FleetIds")) +func (s *CreateTransitGatewayRouteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTransitGatewayRouteInput"} + if s.DestinationCidrBlock == nil { + invalidParams.Add(request.NewErrParamRequired("DestinationCidrBlock")) } - if s.TerminateInstances == nil { - invalidParams.Add(request.NewErrParamRequired("TerminateInstances")) + if s.TransitGatewayRouteTableId == nil { + invalidParams.Add(request.NewErrParamRequired("TransitGatewayRouteTableId")) } if invalidParams.Len() > 0 { @@ -31909,58 +37472,60 @@ func (s *DeleteFleetsInput) Validate() error { return nil } +// SetBlackhole sets the Blackhole field's value. +func (s *CreateTransitGatewayRouteInput) SetBlackhole(v bool) *CreateTransitGatewayRouteInput { + s.Blackhole = &v + return s +} + +// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. +func (s *CreateTransitGatewayRouteInput) SetDestinationCidrBlock(v string) *CreateTransitGatewayRouteInput { + s.DestinationCidrBlock = &v + return s +} + // SetDryRun sets the DryRun field's value. -func (s *DeleteFleetsInput) SetDryRun(v bool) *DeleteFleetsInput { +func (s *CreateTransitGatewayRouteInput) SetDryRun(v bool) *CreateTransitGatewayRouteInput { s.DryRun = &v return s } -// SetFleetIds sets the FleetIds field's value. -func (s *DeleteFleetsInput) SetFleetIds(v []*string) *DeleteFleetsInput { - s.FleetIds = v +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *CreateTransitGatewayRouteInput) SetTransitGatewayAttachmentId(v string) *CreateTransitGatewayRouteInput { + s.TransitGatewayAttachmentId = &v return s } -// SetTerminateInstances sets the TerminateInstances field's value. -func (s *DeleteFleetsInput) SetTerminateInstances(v bool) *DeleteFleetsInput { - s.TerminateInstances = &v +// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. +func (s *CreateTransitGatewayRouteInput) SetTransitGatewayRouteTableId(v string) *CreateTransitGatewayRouteInput { + s.TransitGatewayRouteTableId = &v return s } -type DeleteFleetsOutput struct { +type CreateTransitGatewayRouteOutput struct { _ struct{} `type:"structure"` - // Information about the EC2 Fleets that are successfully deleted. - SuccessfulFleetDeletions []*DeleteFleetSuccessItem `locationName:"successfulFleetDeletionSet" locationNameList:"item" type:"list"` - - // Information about the EC2 Fleets that are not successfully deleted. - UnsuccessfulFleetDeletions []*DeleteFleetErrorItem `locationName:"unsuccessfulFleetDeletionSet" locationNameList:"item" type:"list"` + // Information about the route. + Route *TransitGatewayRoute `locationName:"route" type:"structure"` } // String returns the string representation -func (s DeleteFleetsOutput) String() string { +func (s CreateTransitGatewayRouteOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteFleetsOutput) GoString() string { +func (s CreateTransitGatewayRouteOutput) GoString() string { return s.String() } -// SetSuccessfulFleetDeletions sets the SuccessfulFleetDeletions field's value. -func (s *DeleteFleetsOutput) SetSuccessfulFleetDeletions(v []*DeleteFleetSuccessItem) *DeleteFleetsOutput { - s.SuccessfulFleetDeletions = v - return s -} - -// SetUnsuccessfulFleetDeletions sets the UnsuccessfulFleetDeletions field's value. -func (s *DeleteFleetsOutput) SetUnsuccessfulFleetDeletions(v []*DeleteFleetErrorItem) *DeleteFleetsOutput { - s.UnsuccessfulFleetDeletions = v +// SetRoute sets the Route field's value. +func (s *CreateTransitGatewayRouteOutput) SetRoute(v *TransitGatewayRoute) *CreateTransitGatewayRouteOutput { + s.Route = v return s } -// Contains the parameters for DeleteFlowLogs. -type DeleteFlowLogsInput struct { +type CreateTransitGatewayRouteTableInput struct { _ struct{} `type:"structure"` // Checks whether you have the required permissions for the action, without @@ -31969,27 +37534,30 @@ type DeleteFlowLogsInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // One or more flow log IDs. + // The tags to apply to the transit gateway route table. + TagSpecifications []*TagSpecification `locationNameList:"item" type:"list"` + + // The ID of the transit gateway. // - // FlowLogIds is a required field - FlowLogIds []*string `locationName:"FlowLogId" locationNameList:"item" type:"list" required:"true"` + // TransitGatewayId is a required field + TransitGatewayId *string `type:"string" required:"true"` } // String returns the string representation -func (s DeleteFlowLogsInput) String() string { +func (s CreateTransitGatewayRouteTableInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteFlowLogsInput) GoString() string { +func (s CreateTransitGatewayRouteTableInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteFlowLogsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteFlowLogsInput"} - if s.FlowLogIds == nil { - invalidParams.Add(request.NewErrParamRequired("FlowLogIds")) +func (s *CreateTransitGatewayRouteTableInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTransitGatewayRouteTableInput"} + if s.TransitGatewayId == nil { + invalidParams.Add(request.NewErrParamRequired("TransitGatewayId")) } if invalidParams.Len() > 0 { @@ -31999,42 +37567,47 @@ func (s *DeleteFlowLogsInput) Validate() error { } // SetDryRun sets the DryRun field's value. -func (s *DeleteFlowLogsInput) SetDryRun(v bool) *DeleteFlowLogsInput { +func (s *CreateTransitGatewayRouteTableInput) SetDryRun(v bool) *CreateTransitGatewayRouteTableInput { s.DryRun = &v return s } -// SetFlowLogIds sets the FlowLogIds field's value. -func (s *DeleteFlowLogsInput) SetFlowLogIds(v []*string) *DeleteFlowLogsInput { - s.FlowLogIds = v +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *CreateTransitGatewayRouteTableInput) SetTagSpecifications(v []*TagSpecification) *CreateTransitGatewayRouteTableInput { + s.TagSpecifications = v return s } -// Contains the output of DeleteFlowLogs. -type DeleteFlowLogsOutput struct { +// SetTransitGatewayId sets the TransitGatewayId field's value. +func (s *CreateTransitGatewayRouteTableInput) SetTransitGatewayId(v string) *CreateTransitGatewayRouteTableInput { + s.TransitGatewayId = &v + return s +} + +type CreateTransitGatewayRouteTableOutput struct { _ struct{} `type:"structure"` - // Information about the flow logs that could not be deleted successfully. - Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"` + // Information about the transit gateway route table. + TransitGatewayRouteTable *TransitGatewayRouteTable `locationName:"transitGatewayRouteTable" type:"structure"` } // String returns the string representation -func (s DeleteFlowLogsOutput) String() string { +func (s CreateTransitGatewayRouteTableOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteFlowLogsOutput) GoString() string { +func (s CreateTransitGatewayRouteTableOutput) GoString() string { return s.String() } -// SetUnsuccessful sets the Unsuccessful field's value. -func (s *DeleteFlowLogsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *DeleteFlowLogsOutput { - s.Unsuccessful = v +// SetTransitGatewayRouteTable sets the TransitGatewayRouteTable field's value. +func (s *CreateTransitGatewayRouteTableOutput) SetTransitGatewayRouteTable(v *TransitGatewayRouteTable) *CreateTransitGatewayRouteTableOutput { + s.TransitGatewayRouteTable = v return s } -type DeleteFpgaImageInput struct { +type CreateTransitGatewayVpcAttachmentInput struct { _ struct{} `type:"structure"` // Checks whether you have the required permissions for the action, without @@ -32043,27 +37616,52 @@ type DeleteFpgaImageInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // The ID of the AFI. + // The VPC attachment options. + Options *CreateTransitGatewayVpcAttachmentRequestOptions `type:"structure"` + + // The IDs of one or more subnets. You can specify only one subnet per Availability + // Zone. You must specify at least one subnet, but we recommend that you specify + // two subnets for better availability. The transit gateway uses one IP address + // from each specified subnet. // - // FpgaImageId is a required field - FpgaImageId *string `type:"string" required:"true"` + // SubnetIds is a required field + SubnetIds []*string `locationNameList:"item" type:"list" required:"true"` + + // The tags to apply to the VPC attachment. + TagSpecifications []*TagSpecification `locationNameList:"item" type:"list"` + + // The ID of the transit gateway. + // + // TransitGatewayId is a required field + TransitGatewayId *string `type:"string" required:"true"` + + // The ID of the VPC. + // + // VpcId is a required field + VpcId *string `type:"string" required:"true"` } // String returns the string representation -func (s DeleteFpgaImageInput) String() string { +func (s CreateTransitGatewayVpcAttachmentInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteFpgaImageInput) GoString() string { +func (s CreateTransitGatewayVpcAttachmentInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteFpgaImageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteFpgaImageInput"} - if s.FpgaImageId == nil { - invalidParams.Add(request.NewErrParamRequired("FpgaImageId")) +func (s *CreateTransitGatewayVpcAttachmentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTransitGatewayVpcAttachmentInput"} + if s.SubnetIds == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetIds")) + } + if s.TransitGatewayId == nil { + invalidParams.Add(request.NewErrParamRequired("TransitGatewayId")) + } + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) } if invalidParams.Len() > 0 { @@ -32073,136 +37671,202 @@ func (s *DeleteFpgaImageInput) Validate() error { } // SetDryRun sets the DryRun field's value. -func (s *DeleteFpgaImageInput) SetDryRun(v bool) *DeleteFpgaImageInput { +func (s *CreateTransitGatewayVpcAttachmentInput) SetDryRun(v bool) *CreateTransitGatewayVpcAttachmentInput { s.DryRun = &v return s } -// SetFpgaImageId sets the FpgaImageId field's value. -func (s *DeleteFpgaImageInput) SetFpgaImageId(v string) *DeleteFpgaImageInput { - s.FpgaImageId = &v +// SetOptions sets the Options field's value. +func (s *CreateTransitGatewayVpcAttachmentInput) SetOptions(v *CreateTransitGatewayVpcAttachmentRequestOptions) *CreateTransitGatewayVpcAttachmentInput { + s.Options = v return s } -type DeleteFpgaImageOutput struct { - _ struct{} `type:"structure"` - - // Is true if the request succeeds, and an error otherwise. - Return *bool `locationName:"return" type:"boolean"` +// SetSubnetIds sets the SubnetIds field's value. +func (s *CreateTransitGatewayVpcAttachmentInput) SetSubnetIds(v []*string) *CreateTransitGatewayVpcAttachmentInput { + s.SubnetIds = v + return s } -// String returns the string representation -func (s DeleteFpgaImageOutput) String() string { - return awsutil.Prettify(s) +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *CreateTransitGatewayVpcAttachmentInput) SetTagSpecifications(v []*TagSpecification) *CreateTransitGatewayVpcAttachmentInput { + s.TagSpecifications = v + return s } -// GoString returns the string representation -func (s DeleteFpgaImageOutput) GoString() string { - return s.String() +// SetTransitGatewayId sets the TransitGatewayId field's value. +func (s *CreateTransitGatewayVpcAttachmentInput) SetTransitGatewayId(v string) *CreateTransitGatewayVpcAttachmentInput { + s.TransitGatewayId = &v + return s } -// SetReturn sets the Return field's value. -func (s *DeleteFpgaImageOutput) SetReturn(v bool) *DeleteFpgaImageOutput { - s.Return = &v +// SetVpcId sets the VpcId field's value. +func (s *CreateTransitGatewayVpcAttachmentInput) SetVpcId(v string) *CreateTransitGatewayVpcAttachmentInput { + s.VpcId = &v return s } -// Contains the parameters for DeleteInternetGateway. -type DeleteInternetGatewayInput struct { +type CreateTransitGatewayVpcAttachmentOutput 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 `locationName:"dryRun" type:"boolean"` - - // The ID of the internet gateway. - // - // InternetGatewayId is a required field - InternetGatewayId *string `locationName:"internetGatewayId" type:"string" required:"true"` + // Information about the VPC attachment. + TransitGatewayVpcAttachment *TransitGatewayVpcAttachment `locationName:"transitGatewayVpcAttachment" type:"structure"` } // String returns the string representation -func (s DeleteInternetGatewayInput) String() string { +func (s CreateTransitGatewayVpcAttachmentOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteInternetGatewayInput) GoString() string { +func (s CreateTransitGatewayVpcAttachmentOutput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteInternetGatewayInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteInternetGatewayInput"} - if s.InternetGatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("InternetGatewayId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteInternetGatewayInput) SetDryRun(v bool) *DeleteInternetGatewayInput { - s.DryRun = &v - return s -} - -// SetInternetGatewayId sets the InternetGatewayId field's value. -func (s *DeleteInternetGatewayInput) SetInternetGatewayId(v string) *DeleteInternetGatewayInput { - s.InternetGatewayId = &v +// SetTransitGatewayVpcAttachment sets the TransitGatewayVpcAttachment field's value. +func (s *CreateTransitGatewayVpcAttachmentOutput) SetTransitGatewayVpcAttachment(v *TransitGatewayVpcAttachment) *CreateTransitGatewayVpcAttachmentOutput { + s.TransitGatewayVpcAttachment = v return s } -type DeleteInternetGatewayOutput struct { +// Describes the options for a VPC attachment. +type CreateTransitGatewayVpcAttachmentRequestOptions struct { _ struct{} `type:"structure"` + + // Enable or disable DNS support. The default is enable. + DnsSupport *string `type:"string" enum:"DnsSupportValue"` + + // Enable or disable IPv6 support. The default is enable. + Ipv6Support *string `type:"string" enum:"Ipv6SupportValue"` } // String returns the string representation -func (s DeleteInternetGatewayOutput) String() string { +func (s CreateTransitGatewayVpcAttachmentRequestOptions) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteInternetGatewayOutput) GoString() string { +func (s CreateTransitGatewayVpcAttachmentRequestOptions) GoString() string { return s.String() } -// Contains the parameters for DeleteKeyPair. -type DeleteKeyPairInput struct { - _ struct{} `type:"structure"` +// SetDnsSupport sets the DnsSupport field's value. +func (s *CreateTransitGatewayVpcAttachmentRequestOptions) SetDnsSupport(v string) *CreateTransitGatewayVpcAttachmentRequestOptions { + s.DnsSupport = &v + return s +} - // 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 `locationName:"dryRun" type:"boolean"` +// SetIpv6Support sets the Ipv6Support field's value. +func (s *CreateTransitGatewayVpcAttachmentRequestOptions) SetIpv6Support(v string) *CreateTransitGatewayVpcAttachmentRequestOptions { + s.Ipv6Support = &v + return s +} - // The name of the key pair. +// Contains the parameters for CreateVolume. +type CreateVolumeInput struct { + _ struct{} `type:"structure"` + + // The Availability Zone in which to create the volume. Use DescribeAvailabilityZones + // to list the Availability Zones that are currently available to you. // - // KeyName is a required field - KeyName *string `type:"string" required:"true"` + // AvailabilityZone is a required field + AvailabilityZone *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 `locationName:"dryRun" type:"boolean"` + + // Specifies whether the volume should be encrypted. Encrypted Amazon EBS volumes + // may only be attached to instances that support Amazon EBS encryption. Volumes + // that are created from encrypted snapshots are automatically encrypted. There + // is no way to create an encrypted volume from an unencrypted snapshot or vice + // versa. If your AMI uses encrypted volumes, you can only launch it on supported + // instance types. For more information, see Amazon EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) + // in the Amazon Elastic Compute Cloud User Guide. + Encrypted *bool `locationName:"encrypted" type:"boolean"` + + // The number of I/O operations per second (IOPS) to provision for the volume, + // with a maximum ratio of 50 IOPS/GiB. Range is 100 to 64,000 IOPS for volumes + // in most regions. Maximum IOPS of 64,000 is guaranteed only on Nitro-based + // instances (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 (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) + // in the Amazon Elastic Compute Cloud User Guide. + // + // This parameter is valid only for Provisioned IOPS SSD (io1) volumes. + Iops *int64 `type:"integer"` + + // An identifier for the AWS Key Management Service (AWS KMS) customer master + // key (CMK) to use when creating the encrypted volume. This parameter is only + // required if you want to use a non-default CMK; if this parameter is not specified, + // the default CMK for EBS is used. If a KmsKeyId is specified, the Encrypted + // flag must also be set. + // + // The CMK identifier may be provided in any of the following formats: + // + // * Key ID + // + // * Key alias + // + // * ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed + // by the region of the CMK, the AWS account ID of the CMK owner, the key + // namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. + // + // + // * ARN using key alias. The alias ARN contains the arn:aws:kms namespace, + // followed by the region of the CMK, the AWS account ID of the CMK owner, + // the alias namespace, and then the CMK alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. + // + // + // AWS parses KmsKeyId asynchronously, meaning that the action you call may + // appear to complete even though you provided an invalid identifier. The action + // will eventually fail. + KmsKeyId *string `type:"string"` + + // The size of the volume, in GiBs. + // + // Constraints: 1-16,384 for gp2, 4-16,384 for io1, 500-16,384 for st1, 500-16,384 + // for sc1, and 1-1,024 for standard. If you specify a snapshot, the volume + // size must be equal to or larger than the snapshot size. + // + // Default: If you're creating the volume from a snapshot and don't specify + // a volume size, the default is the snapshot size. + Size *int64 `type:"integer"` + + // The snapshot from which to create the volume. + SnapshotId *string `type:"string"` + + // The tags to apply to the volume during creation. + TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` + + // The volume type. This can be gp2 for General Purpose SSD, io1 for Provisioned + // IOPS SSD, st1 for Throughput Optimized HDD, sc1 for Cold HDD, or standard + // for Magnetic volumes. + // + // Defaults: If no volume type is specified, the default is standard in us-east-1, + // eu-west-1, eu-central-1, us-west-2, us-west-1, sa-east-1, ap-northeast-1, + // ap-northeast-2, ap-southeast-1, ap-southeast-2, ap-south-1, us-gov-west-1, + // and cn-north-1. In all other regions, EBS defaults to gp2. + VolumeType *string `type:"string" enum:"VolumeType"` } // String returns the string representation -func (s DeleteKeyPairInput) String() string { +func (s CreateVolumeInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteKeyPairInput) GoString() string { +func (s CreateVolumeInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteKeyPairInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteKeyPairInput"} - if s.KeyName == nil { - invalidParams.Add(request.NewErrParamRequired("KeyName")) +func (s *CreateVolumeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateVolumeInput"} + if s.AvailabilityZone == nil { + invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) } if invalidParams.Len() > 0 { @@ -32211,155 +37875,180 @@ func (s *DeleteKeyPairInput) Validate() error { return nil } +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *CreateVolumeInput) SetAvailabilityZone(v string) *CreateVolumeInput { + s.AvailabilityZone = &v + return s +} + // SetDryRun sets the DryRun field's value. -func (s *DeleteKeyPairInput) SetDryRun(v bool) *DeleteKeyPairInput { +func (s *CreateVolumeInput) SetDryRun(v bool) *CreateVolumeInput { s.DryRun = &v return s } -// SetKeyName sets the KeyName field's value. -func (s *DeleteKeyPairInput) SetKeyName(v string) *DeleteKeyPairInput { - s.KeyName = &v +// SetEncrypted sets the Encrypted field's value. +func (s *CreateVolumeInput) SetEncrypted(v bool) *CreateVolumeInput { + s.Encrypted = &v return s } -type DeleteKeyPairOutput struct { - _ struct{} `type:"structure"` +// SetIops sets the Iops field's value. +func (s *CreateVolumeInput) SetIops(v int64) *CreateVolumeInput { + s.Iops = &v + return s } -// String returns the string representation -func (s DeleteKeyPairOutput) String() string { - return awsutil.Prettify(s) +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *CreateVolumeInput) SetKmsKeyId(v string) *CreateVolumeInput { + s.KmsKeyId = &v + return s } -// GoString returns the string representation -func (s DeleteKeyPairOutput) GoString() string { - return s.String() +// SetSize sets the Size field's value. +func (s *CreateVolumeInput) SetSize(v int64) *CreateVolumeInput { + s.Size = &v + return s } -type DeleteLaunchTemplateInput struct { - _ struct{} `type:"structure"` +// SetSnapshotId sets the SnapshotId field's value. +func (s *CreateVolumeInput) SetSnapshotId(v string) *CreateVolumeInput { + s.SnapshotId = &v + return s +} - // 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"` +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *CreateVolumeInput) SetTagSpecifications(v []*TagSpecification) *CreateVolumeInput { + s.TagSpecifications = v + return s +} - // The ID of the launch template. You must specify either the launch template - // ID or launch template name in the request. - LaunchTemplateId *string `type:"string"` +// SetVolumeType sets the VolumeType field's value. +func (s *CreateVolumeInput) SetVolumeType(v string) *CreateVolumeInput { + s.VolumeType = &v + return s +} - // The name of the launch template. You must specify either the launch template - // ID or launch template name in the request. - LaunchTemplateName *string `min:"3" type:"string"` +// Describes the user or group to be added or removed from the permissions for +// a volume. +type CreateVolumePermission struct { + _ struct{} `type:"structure"` + + // The specific group that is to be added or removed from a volume's list of + // create volume permissions. + Group *string `locationName:"group" type:"string" enum:"PermissionGroup"` + + // The specific AWS account ID that is to be added or removed from a volume's + // list of create volume permissions. + UserId *string `locationName:"userId" type:"string"` } // String returns the string representation -func (s DeleteLaunchTemplateInput) String() string { +func (s CreateVolumePermission) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteLaunchTemplateInput) GoString() string { +func (s CreateVolumePermission) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLaunchTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLaunchTemplateInput"} - if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DeleteLaunchTemplateInput) SetDryRun(v bool) *DeleteLaunchTemplateInput { - s.DryRun = &v - return s -} - -// SetLaunchTemplateId sets the LaunchTemplateId field's value. -func (s *DeleteLaunchTemplateInput) SetLaunchTemplateId(v string) *DeleteLaunchTemplateInput { - s.LaunchTemplateId = &v +// SetGroup sets the Group field's value. +func (s *CreateVolumePermission) SetGroup(v string) *CreateVolumePermission { + s.Group = &v return s } -// SetLaunchTemplateName sets the LaunchTemplateName field's value. -func (s *DeleteLaunchTemplateInput) SetLaunchTemplateName(v string) *DeleteLaunchTemplateInput { - s.LaunchTemplateName = &v +// SetUserId sets the UserId field's value. +func (s *CreateVolumePermission) SetUserId(v string) *CreateVolumePermission { + s.UserId = &v return s } -type DeleteLaunchTemplateOutput struct { +// Describes modifications to the permissions for a volume. +type CreateVolumePermissionModifications struct { _ struct{} `type:"structure"` - // Information about the launch template. - LaunchTemplate *LaunchTemplate `locationName:"launchTemplate" type:"structure"` + // Adds a specific AWS account ID or group to a volume's list of create volume + // permissions. + Add []*CreateVolumePermission `locationNameList:"item" type:"list"` + + // Removes a specific AWS account ID or group from a volume's list of create + // volume permissions. + Remove []*CreateVolumePermission `locationNameList:"item" type:"list"` } // String returns the string representation -func (s DeleteLaunchTemplateOutput) String() string { +func (s CreateVolumePermissionModifications) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteLaunchTemplateOutput) GoString() string { +func (s CreateVolumePermissionModifications) GoString() string { return s.String() } -// SetLaunchTemplate sets the LaunchTemplate field's value. -func (s *DeleteLaunchTemplateOutput) SetLaunchTemplate(v *LaunchTemplate) *DeleteLaunchTemplateOutput { - s.LaunchTemplate = v +// SetAdd sets the Add field's value. +func (s *CreateVolumePermissionModifications) SetAdd(v []*CreateVolumePermission) *CreateVolumePermissionModifications { + s.Add = v return s } -type DeleteLaunchTemplateVersionsInput struct { +// SetRemove sets the Remove field's value. +func (s *CreateVolumePermissionModifications) SetRemove(v []*CreateVolumePermission) *CreateVolumePermissionModifications { + s.Remove = v + return s +} + +type CreateVpcEndpointConnectionNotificationInput struct { _ struct{} `type:"structure"` + // Unique, case-sensitive identifier you provide to ensure the idempotency of + // the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + ClientToken *string `type:"string"` + + // One or more endpoint events for which to receive notifications. Valid values + // are Accept, Connect, Delete, and Reject. + // + // ConnectionEvents is a required field + ConnectionEvents []*string `locationNameList:"item" type:"list" required:"true"` + + // The ARN of the SNS topic for the notifications. + // + // ConnectionNotificationArn is a required field + ConnectionNotificationArn *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 launch template. You must specify either the launch template - // ID or launch template name in the request. - LaunchTemplateId *string `type:"string"` - - // The name of the launch template. You must specify either the launch template - // ID or launch template name in the request. - LaunchTemplateName *string `min:"3" type:"string"` + // The ID of the endpoint service. + ServiceId *string `type:"string"` - // The version numbers of one or more launch template versions to delete. - // - // Versions is a required field - Versions []*string `locationName:"LaunchTemplateVersion" locationNameList:"item" type:"list" required:"true"` + // The ID of the endpoint. + VpcEndpointId *string `type:"string"` } // String returns the string representation -func (s DeleteLaunchTemplateVersionsInput) String() string { +func (s CreateVpcEndpointConnectionNotificationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteLaunchTemplateVersionsInput) GoString() string { +func (s CreateVpcEndpointConnectionNotificationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLaunchTemplateVersionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLaunchTemplateVersionsInput"} - if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3)) +func (s *CreateVpcEndpointConnectionNotificationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateVpcEndpointConnectionNotificationInput"} + if s.ConnectionEvents == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectionEvents")) } - if s.Versions == nil { - invalidParams.Add(request.NewErrParamRequired("Versions")) + if s.ConnectionNotificationArn == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectionNotificationArn")) } if invalidParams.Len() > 0 { @@ -32368,265 +38057,297 @@ func (s *DeleteLaunchTemplateVersionsInput) Validate() error { return nil } -// SetDryRun sets the DryRun field's value. -func (s *DeleteLaunchTemplateVersionsInput) SetDryRun(v bool) *DeleteLaunchTemplateVersionsInput { - s.DryRun = &v +// SetClientToken sets the ClientToken field's value. +func (s *CreateVpcEndpointConnectionNotificationInput) SetClientToken(v string) *CreateVpcEndpointConnectionNotificationInput { + s.ClientToken = &v return s } -// SetLaunchTemplateId sets the LaunchTemplateId field's value. -func (s *DeleteLaunchTemplateVersionsInput) SetLaunchTemplateId(v string) *DeleteLaunchTemplateVersionsInput { - s.LaunchTemplateId = &v +// SetConnectionEvents sets the ConnectionEvents field's value. +func (s *CreateVpcEndpointConnectionNotificationInput) SetConnectionEvents(v []*string) *CreateVpcEndpointConnectionNotificationInput { + s.ConnectionEvents = v return s } -// SetLaunchTemplateName sets the LaunchTemplateName field's value. -func (s *DeleteLaunchTemplateVersionsInput) SetLaunchTemplateName(v string) *DeleteLaunchTemplateVersionsInput { - s.LaunchTemplateName = &v +// SetConnectionNotificationArn sets the ConnectionNotificationArn field's value. +func (s *CreateVpcEndpointConnectionNotificationInput) SetConnectionNotificationArn(v string) *CreateVpcEndpointConnectionNotificationInput { + s.ConnectionNotificationArn = &v return s } -// SetVersions sets the Versions field's value. -func (s *DeleteLaunchTemplateVersionsInput) SetVersions(v []*string) *DeleteLaunchTemplateVersionsInput { - s.Versions = v +// SetDryRun sets the DryRun field's value. +func (s *CreateVpcEndpointConnectionNotificationInput) SetDryRun(v bool) *CreateVpcEndpointConnectionNotificationInput { + s.DryRun = &v return s } -type DeleteLaunchTemplateVersionsOutput struct { +// SetServiceId sets the ServiceId field's value. +func (s *CreateVpcEndpointConnectionNotificationInput) SetServiceId(v string) *CreateVpcEndpointConnectionNotificationInput { + s.ServiceId = &v + return s +} + +// SetVpcEndpointId sets the VpcEndpointId field's value. +func (s *CreateVpcEndpointConnectionNotificationInput) SetVpcEndpointId(v string) *CreateVpcEndpointConnectionNotificationInput { + s.VpcEndpointId = &v + return s +} + +type CreateVpcEndpointConnectionNotificationOutput struct { _ struct{} `type:"structure"` - // Information about the launch template versions that were successfully deleted. - SuccessfullyDeletedLaunchTemplateVersions []*DeleteLaunchTemplateVersionsResponseSuccessItem `locationName:"successfullyDeletedLaunchTemplateVersionSet" locationNameList:"item" type:"list"` + // Unique, case-sensitive identifier you provide to ensure the idempotency of + // the request. + ClientToken *string `locationName:"clientToken" type:"string"` - // Information about the launch template versions that could not be deleted. - UnsuccessfullyDeletedLaunchTemplateVersions []*DeleteLaunchTemplateVersionsResponseErrorItem `locationName:"unsuccessfullyDeletedLaunchTemplateVersionSet" locationNameList:"item" type:"list"` + // Information about the notification. + ConnectionNotification *ConnectionNotification `locationName:"connectionNotification" type:"structure"` } // String returns the string representation -func (s DeleteLaunchTemplateVersionsOutput) String() string { +func (s CreateVpcEndpointConnectionNotificationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteLaunchTemplateVersionsOutput) GoString() string { +func (s CreateVpcEndpointConnectionNotificationOutput) GoString() string { return s.String() } -// SetSuccessfullyDeletedLaunchTemplateVersions sets the SuccessfullyDeletedLaunchTemplateVersions field's value. -func (s *DeleteLaunchTemplateVersionsOutput) SetSuccessfullyDeletedLaunchTemplateVersions(v []*DeleteLaunchTemplateVersionsResponseSuccessItem) *DeleteLaunchTemplateVersionsOutput { - s.SuccessfullyDeletedLaunchTemplateVersions = v +// SetClientToken sets the ClientToken field's value. +func (s *CreateVpcEndpointConnectionNotificationOutput) SetClientToken(v string) *CreateVpcEndpointConnectionNotificationOutput { + s.ClientToken = &v return s } -// SetUnsuccessfullyDeletedLaunchTemplateVersions sets the UnsuccessfullyDeletedLaunchTemplateVersions field's value. -func (s *DeleteLaunchTemplateVersionsOutput) SetUnsuccessfullyDeletedLaunchTemplateVersions(v []*DeleteLaunchTemplateVersionsResponseErrorItem) *DeleteLaunchTemplateVersionsOutput { - s.UnsuccessfullyDeletedLaunchTemplateVersions = v +// SetConnectionNotification sets the ConnectionNotification field's value. +func (s *CreateVpcEndpointConnectionNotificationOutput) SetConnectionNotification(v *ConnectionNotification) *CreateVpcEndpointConnectionNotificationOutput { + s.ConnectionNotification = v return s } -// Describes a launch template version that could not be deleted. -type DeleteLaunchTemplateVersionsResponseErrorItem struct { +// Contains the parameters for CreateVpcEndpoint. +type CreateVpcEndpointInput struct { _ struct{} `type:"structure"` - // The ID of the launch template. - LaunchTemplateId *string `locationName:"launchTemplateId" type:"string"` + // Unique, case-sensitive identifier you provide to ensure the idempotency of + // the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + ClientToken *string `type:"string"` - // The name of the launch template. - LaunchTemplateName *string `locationName:"launchTemplateName" 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"` - // Information about the error. - ResponseError *ResponseError `locationName:"responseError" type:"structure"` + // (Gateway endpoint) A policy to attach to the endpoint that controls access + // to the service. The policy must be in valid JSON format. If this parameter + // is not specified, we attach a default policy that allows full access to the + // service. + PolicyDocument *string `type:"string"` - // The version number of the launch template. - VersionNumber *int64 `locationName:"versionNumber" type:"long"` + // (Interface endpoint) Indicate whether to associate a private hosted zone + // with the specified VPC. The private hosted zone contains a record set for + // the default public DNS name for the service for the region (for example, + // kinesis.us-east-1.amazonaws.com) which resolves to the private IP addresses + // of the endpoint network interfaces in the VPC. This enables you to make requests + // to the default public DNS name for the service instead of the public DNS + // names that are automatically generated by the VPC endpoint service. + // + // To use a private hosted zone, you must set the following VPC attributes to + // true: enableDnsHostnames and enableDnsSupport. Use ModifyVpcAttribute to + // set the VPC attributes. + // + // Default: false + PrivateDnsEnabled *bool `type:"boolean"` + + // (Gateway endpoint) One or more route table IDs. + RouteTableIds []*string `locationName:"RouteTableId" locationNameList:"item" type:"list"` + + // (Interface endpoint) The ID of one or more security groups to associate with + // the endpoint network interface. + SecurityGroupIds []*string `locationName:"SecurityGroupId" locationNameList:"item" type:"list"` + + // The service name. To get a list of available services, use the DescribeVpcEndpointServices + // request, or get the name from the service provider. + // + // ServiceName is a required field + ServiceName *string `type:"string" required:"true"` + + // (Interface endpoint) The ID of one or more subnets in which to create an + // endpoint network interface. + SubnetIds []*string `locationName:"SubnetId" locationNameList:"item" type:"list"` + + // The type of endpoint. + // + // Default: Gateway + VpcEndpointType *string `type:"string" enum:"VpcEndpointType"` + + // The ID of the VPC in which the endpoint will be used. + // + // VpcId is a required field + VpcId *string `type:"string" required:"true"` } // String returns the string representation -func (s DeleteLaunchTemplateVersionsResponseErrorItem) String() string { +func (s CreateVpcEndpointInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteLaunchTemplateVersionsResponseErrorItem) GoString() string { +func (s CreateVpcEndpointInput) GoString() string { return s.String() } -// SetLaunchTemplateId sets the LaunchTemplateId field's value. -func (s *DeleteLaunchTemplateVersionsResponseErrorItem) SetLaunchTemplateId(v string) *DeleteLaunchTemplateVersionsResponseErrorItem { - s.LaunchTemplateId = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateVpcEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateVpcEndpointInput"} + if s.ServiceName == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceName")) + } + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetLaunchTemplateName sets the LaunchTemplateName field's value. -func (s *DeleteLaunchTemplateVersionsResponseErrorItem) SetLaunchTemplateName(v string) *DeleteLaunchTemplateVersionsResponseErrorItem { - s.LaunchTemplateName = &v +// SetClientToken sets the ClientToken field's value. +func (s *CreateVpcEndpointInput) SetClientToken(v string) *CreateVpcEndpointInput { + s.ClientToken = &v return s } -// SetResponseError sets the ResponseError field's value. -func (s *DeleteLaunchTemplateVersionsResponseErrorItem) SetResponseError(v *ResponseError) *DeleteLaunchTemplateVersionsResponseErrorItem { - s.ResponseError = v +// SetDryRun sets the DryRun field's value. +func (s *CreateVpcEndpointInput) SetDryRun(v bool) *CreateVpcEndpointInput { + s.DryRun = &v return s } -// SetVersionNumber sets the VersionNumber field's value. -func (s *DeleteLaunchTemplateVersionsResponseErrorItem) SetVersionNumber(v int64) *DeleteLaunchTemplateVersionsResponseErrorItem { - s.VersionNumber = &v +// SetPolicyDocument sets the PolicyDocument field's value. +func (s *CreateVpcEndpointInput) SetPolicyDocument(v string) *CreateVpcEndpointInput { + s.PolicyDocument = &v return s } -// Describes a launch template version that was successfully deleted. -type DeleteLaunchTemplateVersionsResponseSuccessItem struct { - _ struct{} `type:"structure"` - - // The ID of the launch template. - LaunchTemplateId *string `locationName:"launchTemplateId" type:"string"` - - // The name of the launch template. - LaunchTemplateName *string `locationName:"launchTemplateName" type:"string"` +// SetPrivateDnsEnabled sets the PrivateDnsEnabled field's value. +func (s *CreateVpcEndpointInput) SetPrivateDnsEnabled(v bool) *CreateVpcEndpointInput { + s.PrivateDnsEnabled = &v + return s +} - // The version number of the launch template. - VersionNumber *int64 `locationName:"versionNumber" type:"long"` +// SetRouteTableIds sets the RouteTableIds field's value. +func (s *CreateVpcEndpointInput) SetRouteTableIds(v []*string) *CreateVpcEndpointInput { + s.RouteTableIds = v + return s } -// String returns the string representation -func (s DeleteLaunchTemplateVersionsResponseSuccessItem) String() string { - return awsutil.Prettify(s) +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *CreateVpcEndpointInput) SetSecurityGroupIds(v []*string) *CreateVpcEndpointInput { + s.SecurityGroupIds = v + return s } -// GoString returns the string representation -func (s DeleteLaunchTemplateVersionsResponseSuccessItem) GoString() string { - return s.String() +// SetServiceName sets the ServiceName field's value. +func (s *CreateVpcEndpointInput) SetServiceName(v string) *CreateVpcEndpointInput { + s.ServiceName = &v + return s } -// SetLaunchTemplateId sets the LaunchTemplateId field's value. -func (s *DeleteLaunchTemplateVersionsResponseSuccessItem) SetLaunchTemplateId(v string) *DeleteLaunchTemplateVersionsResponseSuccessItem { - s.LaunchTemplateId = &v +// SetSubnetIds sets the SubnetIds field's value. +func (s *CreateVpcEndpointInput) SetSubnetIds(v []*string) *CreateVpcEndpointInput { + s.SubnetIds = v return s } -// SetLaunchTemplateName sets the LaunchTemplateName field's value. -func (s *DeleteLaunchTemplateVersionsResponseSuccessItem) SetLaunchTemplateName(v string) *DeleteLaunchTemplateVersionsResponseSuccessItem { - s.LaunchTemplateName = &v +// SetVpcEndpointType sets the VpcEndpointType field's value. +func (s *CreateVpcEndpointInput) SetVpcEndpointType(v string) *CreateVpcEndpointInput { + s.VpcEndpointType = &v return s } -// SetVersionNumber sets the VersionNumber field's value. -func (s *DeleteLaunchTemplateVersionsResponseSuccessItem) SetVersionNumber(v int64) *DeleteLaunchTemplateVersionsResponseSuccessItem { - s.VersionNumber = &v +// SetVpcId sets the VpcId field's value. +func (s *CreateVpcEndpointInput) SetVpcId(v string) *CreateVpcEndpointInput { + s.VpcId = &v return s } -// Contains the parameters for DeleteNatGateway. -type DeleteNatGatewayInput struct { +// Contains the output of CreateVpcEndpoint. +type CreateVpcEndpointOutput struct { _ struct{} `type:"structure"` - // The ID of the NAT gateway. - // - // NatGatewayId is a required field - NatGatewayId *string `type:"string" required:"true"` + // Unique, case-sensitive identifier you provide to ensure the idempotency of + // the request. + ClientToken *string `locationName:"clientToken" type:"string"` + + // Information about the endpoint. + VpcEndpoint *VpcEndpoint `locationName:"vpcEndpoint" type:"structure"` } // String returns the string representation -func (s DeleteNatGatewayInput) String() string { +func (s CreateVpcEndpointOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteNatGatewayInput) GoString() string { +func (s CreateVpcEndpointOutput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteNatGatewayInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteNatGatewayInput"} - if s.NatGatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("NatGatewayId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetClientToken sets the ClientToken field's value. +func (s *CreateVpcEndpointOutput) SetClientToken(v string) *CreateVpcEndpointOutput { + s.ClientToken = &v + return s } -// SetNatGatewayId sets the NatGatewayId field's value. -func (s *DeleteNatGatewayInput) SetNatGatewayId(v string) *DeleteNatGatewayInput { - s.NatGatewayId = &v +// SetVpcEndpoint sets the VpcEndpoint field's value. +func (s *CreateVpcEndpointOutput) SetVpcEndpoint(v *VpcEndpoint) *CreateVpcEndpointOutput { + s.VpcEndpoint = v return s } -// Contains the output of DeleteNatGateway. -type DeleteNatGatewayOutput struct { +type CreateVpcEndpointServiceConfigurationInput struct { _ struct{} `type:"structure"` - // The ID of the NAT gateway. - NatGatewayId *string `locationName:"natGatewayId" type:"string"` -} - -// String returns the string representation -func (s DeleteNatGatewayOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DeleteNatGatewayOutput) GoString() string { - return s.String() -} - -// SetNatGatewayId sets the NatGatewayId field's value. -func (s *DeleteNatGatewayOutput) SetNatGatewayId(v string) *DeleteNatGatewayOutput { - s.NatGatewayId = &v - return s -} + // Indicate whether requests from service consumers to create an endpoint to + // your service must be accepted. To accept a request, use AcceptVpcEndpointConnections. + AcceptanceRequired *bool `type:"boolean"` -// Contains the parameters for DeleteNetworkAclEntry. -type DeleteNetworkAclEntryInput struct { - _ struct{} `type:"structure"` + // Unique, case-sensitive identifier you provide to ensure the idempotency of + // the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). + ClientToken *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 `locationName:"dryRun" type:"boolean"` - - // Indicates whether the rule is an egress rule. - // - // Egress is a required field - Egress *bool `locationName:"egress" type:"boolean" required:"true"` - - // The ID of the network ACL. - // - // NetworkAclId is a required field - NetworkAclId *string `locationName:"networkAclId" type:"string" required:"true"` + DryRun *bool `type:"boolean"` - // The rule number of the entry to delete. + // The Amazon Resource Names (ARNs) of one or more Network Load Balancers for + // your service. // - // RuleNumber is a required field - RuleNumber *int64 `locationName:"ruleNumber" type:"integer" required:"true"` + // NetworkLoadBalancerArns is a required field + NetworkLoadBalancerArns []*string `locationName:"NetworkLoadBalancerArn" locationNameList:"item" type:"list" required:"true"` } // String returns the string representation -func (s DeleteNetworkAclEntryInput) String() string { +func (s CreateVpcEndpointServiceConfigurationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteNetworkAclEntryInput) GoString() string { +func (s CreateVpcEndpointServiceConfigurationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteNetworkAclEntryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteNetworkAclEntryInput"} - if s.Egress == nil { - invalidParams.Add(request.NewErrParamRequired("Egress")) - } - if s.NetworkAclId == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkAclId")) - } - if s.RuleNumber == nil { - invalidParams.Add(request.NewErrParamRequired("RuleNumber")) +func (s *CreateVpcEndpointServiceConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateVpcEndpointServiceConfigurationInput"} + if s.NetworkLoadBalancerArns == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkLoadBalancerArns")) } if invalidParams.Len() > 0 { @@ -32635,75 +38356,110 @@ func (s *DeleteNetworkAclEntryInput) Validate() error { return nil } -// SetDryRun sets the DryRun field's value. -func (s *DeleteNetworkAclEntryInput) SetDryRun(v bool) *DeleteNetworkAclEntryInput { - s.DryRun = &v +// SetAcceptanceRequired sets the AcceptanceRequired field's value. +func (s *CreateVpcEndpointServiceConfigurationInput) SetAcceptanceRequired(v bool) *CreateVpcEndpointServiceConfigurationInput { + s.AcceptanceRequired = &v return s } -// SetEgress sets the Egress field's value. -func (s *DeleteNetworkAclEntryInput) SetEgress(v bool) *DeleteNetworkAclEntryInput { - s.Egress = &v +// SetClientToken sets the ClientToken field's value. +func (s *CreateVpcEndpointServiceConfigurationInput) SetClientToken(v string) *CreateVpcEndpointServiceConfigurationInput { + s.ClientToken = &v return s } -// SetNetworkAclId sets the NetworkAclId field's value. -func (s *DeleteNetworkAclEntryInput) SetNetworkAclId(v string) *DeleteNetworkAclEntryInput { - s.NetworkAclId = &v +// SetDryRun sets the DryRun field's value. +func (s *CreateVpcEndpointServiceConfigurationInput) SetDryRun(v bool) *CreateVpcEndpointServiceConfigurationInput { + s.DryRun = &v return s } -// SetRuleNumber sets the RuleNumber field's value. -func (s *DeleteNetworkAclEntryInput) SetRuleNumber(v int64) *DeleteNetworkAclEntryInput { - s.RuleNumber = &v +// SetNetworkLoadBalancerArns sets the NetworkLoadBalancerArns field's value. +func (s *CreateVpcEndpointServiceConfigurationInput) SetNetworkLoadBalancerArns(v []*string) *CreateVpcEndpointServiceConfigurationInput { + s.NetworkLoadBalancerArns = v return s } -type DeleteNetworkAclEntryOutput struct { +type CreateVpcEndpointServiceConfigurationOutput struct { _ struct{} `type:"structure"` + + // Unique, case-sensitive identifier you provide to ensure the idempotency of + // the request. + ClientToken *string `locationName:"clientToken" type:"string"` + + // Information about the service configuration. + ServiceConfiguration *ServiceConfiguration `locationName:"serviceConfiguration" type:"structure"` } // String returns the string representation -func (s DeleteNetworkAclEntryOutput) String() string { +func (s CreateVpcEndpointServiceConfigurationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteNetworkAclEntryOutput) GoString() string { +func (s CreateVpcEndpointServiceConfigurationOutput) GoString() string { return s.String() } -// Contains the parameters for DeleteNetworkAcl. -type DeleteNetworkAclInput struct { +// SetClientToken sets the ClientToken field's value. +func (s *CreateVpcEndpointServiceConfigurationOutput) SetClientToken(v string) *CreateVpcEndpointServiceConfigurationOutput { + s.ClientToken = &v + return s +} + +// SetServiceConfiguration sets the ServiceConfiguration field's value. +func (s *CreateVpcEndpointServiceConfigurationOutput) SetServiceConfiguration(v *ServiceConfiguration) *CreateVpcEndpointServiceConfigurationOutput { + s.ServiceConfiguration = v + return s +} + +type CreateVpcInput struct { _ struct{} `type:"structure"` + // Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for + // the VPC. You cannot specify the range of IP addresses, or the size of the + // CIDR block. + AmazonProvidedIpv6CidrBlock *bool `locationName:"amazonProvidedIpv6CidrBlock" type:"boolean"` + + // The IPv4 network range for the VPC, in CIDR notation. For example, 10.0.0.0/16. + // + // CidrBlock is a required field + CidrBlock *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 `locationName:"dryRun" type:"boolean"` - // The ID of the network ACL. + // The tenancy options for instances launched into the VPC. For default, instances + // are launched with shared tenancy by default. You can launch instances with + // any tenancy into a shared tenancy VPC. For dedicated, instances are launched + // as dedicated tenancy instances by default. You can only launch instances + // with a tenancy of dedicated or host into a dedicated tenancy VPC. // - // NetworkAclId is a required field - NetworkAclId *string `locationName:"networkAclId" type:"string" required:"true"` + // Important: The host value cannot be used with this parameter. Use the default + // or dedicated values only. + // + // Default: default + InstanceTenancy *string `locationName:"instanceTenancy" type:"string" enum:"Tenancy"` } // String returns the string representation -func (s DeleteNetworkAclInput) String() string { +func (s CreateVpcInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteNetworkAclInput) GoString() string { +func (s CreateVpcInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteNetworkAclInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteNetworkAclInput"} - if s.NetworkAclId == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkAclId")) +func (s *CreateVpcInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateVpcInput"} + if s.CidrBlock == nil { + invalidParams.Add(request.NewErrParamRequired("CidrBlock")) } if invalidParams.Len() > 0 { @@ -32712,34 +38468,54 @@ func (s *DeleteNetworkAclInput) Validate() error { return nil } +// SetAmazonProvidedIpv6CidrBlock sets the AmazonProvidedIpv6CidrBlock field's value. +func (s *CreateVpcInput) SetAmazonProvidedIpv6CidrBlock(v bool) *CreateVpcInput { + s.AmazonProvidedIpv6CidrBlock = &v + return s +} + +// SetCidrBlock sets the CidrBlock field's value. +func (s *CreateVpcInput) SetCidrBlock(v string) *CreateVpcInput { + s.CidrBlock = &v + return s +} + // SetDryRun sets the DryRun field's value. -func (s *DeleteNetworkAclInput) SetDryRun(v bool) *DeleteNetworkAclInput { +func (s *CreateVpcInput) SetDryRun(v bool) *CreateVpcInput { s.DryRun = &v return s } -// SetNetworkAclId sets the NetworkAclId field's value. -func (s *DeleteNetworkAclInput) SetNetworkAclId(v string) *DeleteNetworkAclInput { - s.NetworkAclId = &v +// SetInstanceTenancy sets the InstanceTenancy field's value. +func (s *CreateVpcInput) SetInstanceTenancy(v string) *CreateVpcInput { + s.InstanceTenancy = &v return s } -type DeleteNetworkAclOutput struct { +type CreateVpcOutput struct { _ struct{} `type:"structure"` + + // Information about the VPC. + Vpc *Vpc `locationName:"vpc" type:"structure"` } // String returns the string representation -func (s DeleteNetworkAclOutput) String() string { +func (s CreateVpcOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteNetworkAclOutput) GoString() string { +func (s CreateVpcOutput) GoString() string { return s.String() } -// Contains the parameters for DeleteNetworkInterface. -type DeleteNetworkInterfaceInput struct { +// SetVpc sets the Vpc field's value. +func (s *CreateVpcOutput) SetVpc(v *Vpc) *CreateVpcOutput { + s.Vpc = v + return s +} + +type CreateVpcPeeringConnectionInput struct { _ struct{} `type:"structure"` // Checks whether you have the required permissions for the action, without @@ -32748,96 +38524,138 @@ type DeleteNetworkInterfaceInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // The ID of the network interface. + // The AWS account ID of the owner of the accepter VPC. // - // NetworkInterfaceId is a required field - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"` + // Default: Your AWS account ID + PeerOwnerId *string `locationName:"peerOwnerId" type:"string"` + + // The region code for the accepter VPC, if the accepter VPC is located in a + // region other than the region in which you make the request. + // + // Default: The region in which you make the request. + PeerRegion *string `type:"string"` + + // The ID of the VPC with which you are creating the VPC peering connection. + // You must specify this parameter in the request. + PeerVpcId *string `locationName:"peerVpcId" type:"string"` + + // The ID of the requester VPC. You must specify this parameter in the request. + VpcId *string `locationName:"vpcId" type:"string"` } // String returns the string representation -func (s DeleteNetworkInterfaceInput) String() string { +func (s CreateVpcPeeringConnectionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteNetworkInterfaceInput) GoString() string { +func (s CreateVpcPeeringConnectionInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteNetworkInterfaceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteNetworkInterfaceInput"} - if s.NetworkInterfaceId == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) - } +// SetDryRun sets the DryRun field's value. +func (s *CreateVpcPeeringConnectionInput) SetDryRun(v bool) *CreateVpcPeeringConnectionInput { + s.DryRun = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetPeerOwnerId sets the PeerOwnerId field's value. +func (s *CreateVpcPeeringConnectionInput) SetPeerOwnerId(v string) *CreateVpcPeeringConnectionInput { + s.PeerOwnerId = &v + return s } -// SetDryRun sets the DryRun field's value. -func (s *DeleteNetworkInterfaceInput) SetDryRun(v bool) *DeleteNetworkInterfaceInput { - s.DryRun = &v +// SetPeerRegion sets the PeerRegion field's value. +func (s *CreateVpcPeeringConnectionInput) SetPeerRegion(v string) *CreateVpcPeeringConnectionInput { + s.PeerRegion = &v return s } -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *DeleteNetworkInterfaceInput) SetNetworkInterfaceId(v string) *DeleteNetworkInterfaceInput { - s.NetworkInterfaceId = &v +// SetPeerVpcId sets the PeerVpcId field's value. +func (s *CreateVpcPeeringConnectionInput) SetPeerVpcId(v string) *CreateVpcPeeringConnectionInput { + s.PeerVpcId = &v return s } -type DeleteNetworkInterfaceOutput struct { +// SetVpcId sets the VpcId field's value. +func (s *CreateVpcPeeringConnectionInput) SetVpcId(v string) *CreateVpcPeeringConnectionInput { + s.VpcId = &v + return s +} + +type CreateVpcPeeringConnectionOutput struct { _ struct{} `type:"structure"` + + // Information about the VPC peering connection. + VpcPeeringConnection *VpcPeeringConnection `locationName:"vpcPeeringConnection" type:"structure"` } // String returns the string representation -func (s DeleteNetworkInterfaceOutput) String() string { +func (s CreateVpcPeeringConnectionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteNetworkInterfaceOutput) GoString() string { +func (s CreateVpcPeeringConnectionOutput) GoString() string { return s.String() } -// Contains the parameters for DeleteNetworkInterfacePermission. -type DeleteNetworkInterfacePermissionInput struct { +// SetVpcPeeringConnection sets the VpcPeeringConnection field's value. +func (s *CreateVpcPeeringConnectionOutput) SetVpcPeeringConnection(v *VpcPeeringConnection) *CreateVpcPeeringConnectionOutput { + s.VpcPeeringConnection = v + return s +} + +// Contains the parameters for CreateVpnConnection. +type CreateVpnConnectionInput struct { _ struct{} `type:"structure"` + // The ID of the customer gateway. + // + // CustomerGatewayId is a required field + CustomerGatewayId *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"` + DryRun *bool `locationName:"dryRun" type:"boolean"` - // Specify true to remove the permission even if the network interface is attached - // to an instance. - Force *bool `type:"boolean"` + // The options for the VPN connection. + Options *VpnConnectionOptionsSpecification `locationName:"options" type:"structure"` - // The ID of the network interface permission. + // The ID of the transit gateway. If you specify a transit gateway, you cannot + // specify a virtual private gateway. + TransitGatewayId *string `type:"string"` + + // The type of VPN connection (ipsec.1). // - // NetworkInterfacePermissionId is a required field - NetworkInterfacePermissionId *string `type:"string" required:"true"` + // Type is a required field + Type *string `type:"string" required:"true"` + + // The ID of the virtual private gateway. If you specify a virtual private gateway, + // you cannot specify a transit gateway. + VpnGatewayId *string `type:"string"` } // String returns the string representation -func (s DeleteNetworkInterfacePermissionInput) String() string { +func (s CreateVpnConnectionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteNetworkInterfacePermissionInput) GoString() string { +func (s CreateVpnConnectionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteNetworkInterfacePermissionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteNetworkInterfacePermissionInput"} - if s.NetworkInterfacePermissionId == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkInterfacePermissionId")) +func (s *CreateVpnConnectionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateVpnConnectionInput"} + if s.CustomerGatewayId == nil { + invalidParams.Add(request.NewErrParamRequired("CustomerGatewayId")) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) } if invalidParams.Len() > 0 { @@ -32846,79 +38664,99 @@ func (s *DeleteNetworkInterfacePermissionInput) Validate() error { return nil } +// SetCustomerGatewayId sets the CustomerGatewayId field's value. +func (s *CreateVpnConnectionInput) SetCustomerGatewayId(v string) *CreateVpnConnectionInput { + s.CustomerGatewayId = &v + return s +} + // SetDryRun sets the DryRun field's value. -func (s *DeleteNetworkInterfacePermissionInput) SetDryRun(v bool) *DeleteNetworkInterfacePermissionInput { +func (s *CreateVpnConnectionInput) SetDryRun(v bool) *CreateVpnConnectionInput { s.DryRun = &v return s } -// SetForce sets the Force field's value. -func (s *DeleteNetworkInterfacePermissionInput) SetForce(v bool) *DeleteNetworkInterfacePermissionInput { - s.Force = &v +// SetOptions sets the Options field's value. +func (s *CreateVpnConnectionInput) SetOptions(v *VpnConnectionOptionsSpecification) *CreateVpnConnectionInput { + s.Options = v return s } -// SetNetworkInterfacePermissionId sets the NetworkInterfacePermissionId field's value. -func (s *DeleteNetworkInterfacePermissionInput) SetNetworkInterfacePermissionId(v string) *DeleteNetworkInterfacePermissionInput { - s.NetworkInterfacePermissionId = &v +// SetTransitGatewayId sets the TransitGatewayId field's value. +func (s *CreateVpnConnectionInput) SetTransitGatewayId(v string) *CreateVpnConnectionInput { + s.TransitGatewayId = &v return s } -// Contains the output for DeleteNetworkInterfacePermission. -type DeleteNetworkInterfacePermissionOutput struct { +// SetType sets the Type field's value. +func (s *CreateVpnConnectionInput) SetType(v string) *CreateVpnConnectionInput { + s.Type = &v + return s +} + +// SetVpnGatewayId sets the VpnGatewayId field's value. +func (s *CreateVpnConnectionInput) SetVpnGatewayId(v string) *CreateVpnConnectionInput { + s.VpnGatewayId = &v + return s +} + +// Contains the output of CreateVpnConnection. +type CreateVpnConnectionOutput struct { _ struct{} `type:"structure"` - // Returns true if the request succeeds, otherwise returns an error. - Return *bool `locationName:"return" type:"boolean"` + // Information about the VPN connection. + VpnConnection *VpnConnection `locationName:"vpnConnection" type:"structure"` } // String returns the string representation -func (s DeleteNetworkInterfacePermissionOutput) String() string { +func (s CreateVpnConnectionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteNetworkInterfacePermissionOutput) GoString() string { +func (s CreateVpnConnectionOutput) GoString() string { return s.String() } -// SetReturn sets the Return field's value. -func (s *DeleteNetworkInterfacePermissionOutput) SetReturn(v bool) *DeleteNetworkInterfacePermissionOutput { - s.Return = &v +// SetVpnConnection sets the VpnConnection field's value. +func (s *CreateVpnConnectionOutput) SetVpnConnection(v *VpnConnection) *CreateVpnConnectionOutput { + s.VpnConnection = v return s } -// Contains the parameters for DeletePlacementGroup. -type DeletePlacementGroupInput struct { +// Contains the parameters for CreateVpnConnectionRoute. +type CreateVpnConnectionRouteInput 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 `locationName:"dryRun" type:"boolean"` + // The CIDR block associated with the local subnet of the customer network. + // + // DestinationCidrBlock is a required field + DestinationCidrBlock *string `type:"string" required:"true"` - // The name of the placement group. + // The ID of the VPN connection. // - // GroupName is a required field - GroupName *string `locationName:"groupName" type:"string" required:"true"` + // VpnConnectionId is a required field + VpnConnectionId *string `type:"string" required:"true"` } // String returns the string representation -func (s DeletePlacementGroupInput) String() string { +func (s CreateVpnConnectionRouteInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeletePlacementGroupInput) GoString() string { +func (s CreateVpnConnectionRouteInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeletePlacementGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeletePlacementGroupInput"} - if s.GroupName == nil { - invalidParams.Add(request.NewErrParamRequired("GroupName")) +func (s *CreateVpnConnectionRouteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateVpnConnectionRouteInput"} + if s.DestinationCidrBlock == nil { + invalidParams.Add(request.NewErrParamRequired("DestinationCidrBlock")) + } + if s.VpnConnectionId == nil { + invalidParams.Add(request.NewErrParamRequired("VpnConnectionId")) } if invalidParams.Len() > 0 { @@ -32927,43 +38765,45 @@ func (s *DeletePlacementGroupInput) Validate() error { return nil } -// SetDryRun sets the DryRun field's value. -func (s *DeletePlacementGroupInput) SetDryRun(v bool) *DeletePlacementGroupInput { - s.DryRun = &v +// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. +func (s *CreateVpnConnectionRouteInput) SetDestinationCidrBlock(v string) *CreateVpnConnectionRouteInput { + s.DestinationCidrBlock = &v return s } -// SetGroupName sets the GroupName field's value. -func (s *DeletePlacementGroupInput) SetGroupName(v string) *DeletePlacementGroupInput { - s.GroupName = &v +// SetVpnConnectionId sets the VpnConnectionId field's value. +func (s *CreateVpnConnectionRouteInput) SetVpnConnectionId(v string) *CreateVpnConnectionRouteInput { + s.VpnConnectionId = &v return s } -type DeletePlacementGroupOutput struct { +type CreateVpnConnectionRouteOutput struct { _ struct{} `type:"structure"` } // String returns the string representation -func (s DeletePlacementGroupOutput) String() string { +func (s CreateVpnConnectionRouteOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeletePlacementGroupOutput) GoString() string { +func (s CreateVpnConnectionRouteOutput) GoString() string { return s.String() } -// Contains the parameters for DeleteRoute. -type DeleteRouteInput struct { +// Contains the parameters for CreateVpnGateway. +type CreateVpnGatewayInput struct { _ struct{} `type:"structure"` - // The IPv4 CIDR range for the route. The value you specify must match the CIDR - // for the route exactly. - DestinationCidrBlock *string `locationName:"destinationCidrBlock" type:"string"` + // A private Autonomous System Number (ASN) for the Amazon side of a BGP session. + // If you're using a 16-bit ASN, it must be in the 64512 to 65534 range. If + // you're using a 32-bit ASN, it must be in the 4200000000 to 4294967294 range. + // + // Default: 64512 + AmazonSideAsn *int64 `type:"long"` - // The IPv6 CIDR range for the route. The value you specify must match the CIDR - // for the route exactly. - DestinationIpv6CidrBlock *string `locationName:"destinationIpv6CidrBlock" type:"string"` + // The Availability Zone for the virtual private gateway. + AvailabilityZone *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 @@ -32971,27 +38811,27 @@ type DeleteRouteInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // The ID of the route table. + // The type of VPN connection this virtual private gateway supports. // - // RouteTableId is a required field - RouteTableId *string `locationName:"routeTableId" type:"string" required:"true"` + // Type is a required field + Type *string `type:"string" required:"true" enum:"GatewayType"` } // String returns the string representation -func (s DeleteRouteInput) String() string { +func (s CreateVpnGatewayInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteRouteInput) GoString() string { +func (s CreateVpnGatewayInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRouteInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRouteInput"} - if s.RouteTableId == nil { - invalidParams.Add(request.NewErrParamRequired("RouteTableId")) +func (s *CreateVpnGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateVpnGatewayInput"} + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) } if invalidParams.Len() > 0 { @@ -33000,75 +38840,105 @@ func (s *DeleteRouteInput) Validate() error { return nil } -// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. -func (s *DeleteRouteInput) SetDestinationCidrBlock(v string) *DeleteRouteInput { - s.DestinationCidrBlock = &v +// SetAmazonSideAsn sets the AmazonSideAsn field's value. +func (s *CreateVpnGatewayInput) SetAmazonSideAsn(v int64) *CreateVpnGatewayInput { + s.AmazonSideAsn = &v return s } -// SetDestinationIpv6CidrBlock sets the DestinationIpv6CidrBlock field's value. -func (s *DeleteRouteInput) SetDestinationIpv6CidrBlock(v string) *DeleteRouteInput { - s.DestinationIpv6CidrBlock = &v +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *CreateVpnGatewayInput) SetAvailabilityZone(v string) *CreateVpnGatewayInput { + s.AvailabilityZone = &v return s } // SetDryRun sets the DryRun field's value. -func (s *DeleteRouteInput) SetDryRun(v bool) *DeleteRouteInput { +func (s *CreateVpnGatewayInput) SetDryRun(v bool) *CreateVpnGatewayInput { s.DryRun = &v return s } -// SetRouteTableId sets the RouteTableId field's value. -func (s *DeleteRouteInput) SetRouteTableId(v string) *DeleteRouteInput { - s.RouteTableId = &v +// SetType sets the Type field's value. +func (s *CreateVpnGatewayInput) SetType(v string) *CreateVpnGatewayInput { + s.Type = &v return s } -type DeleteRouteOutput struct { +// Contains the output of CreateVpnGateway. +type CreateVpnGatewayOutput struct { _ struct{} `type:"structure"` + + // Information about the virtual private gateway. + VpnGateway *VpnGateway `locationName:"vpnGateway" type:"structure"` } // String returns the string representation -func (s DeleteRouteOutput) String() string { +func (s CreateVpnGatewayOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteRouteOutput) GoString() string { +func (s CreateVpnGatewayOutput) GoString() string { return s.String() } -// Contains the parameters for DeleteRouteTable. -type DeleteRouteTableInput struct { - _ struct{} `type:"structure"` +// SetVpnGateway sets the VpnGateway field's value. +func (s *CreateVpnGatewayOutput) SetVpnGateway(v *VpnGateway) *CreateVpnGatewayOutput { + s.VpnGateway = v + return s +} - // 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 `locationName:"dryRun" type:"boolean"` +// Describes the credit option for CPU usage of a T2 or T3 instance. +type CreditSpecification struct { + _ struct{} `type:"structure"` - // The ID of the route table. - // - // RouteTableId is a required field - RouteTableId *string `locationName:"routeTableId" type:"string" required:"true"` + // The credit option for CPU usage of a T2 or T3 instance. Valid values are + // standard and unlimited. + CpuCredits *string `locationName:"cpuCredits" type:"string"` } // String returns the string representation -func (s DeleteRouteTableInput) String() string { +func (s CreditSpecification) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteRouteTableInput) GoString() string { +func (s CreditSpecification) GoString() string { + return s.String() +} + +// SetCpuCredits sets the CpuCredits field's value. +func (s *CreditSpecification) SetCpuCredits(v string) *CreditSpecification { + s.CpuCredits = &v + return s +} + +// The credit option for CPU usage of a T2 or T3 instance. +type CreditSpecificationRequest struct { + _ struct{} `type:"structure"` + + // The credit option for CPU usage of a T2 or T3 instance. Valid values are + // standard and unlimited. + // + // CpuCredits is a required field + CpuCredits *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CreditSpecificationRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreditSpecificationRequest) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRouteTableInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRouteTableInput"} - if s.RouteTableId == nil { - invalidParams.Add(request.NewErrParamRequired("RouteTableId")) +func (s *CreditSpecificationRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreditSpecificationRequest"} + if s.CpuCredits == nil { + invalidParams.Add(request.NewErrParamRequired("CpuCredits")) } if invalidParams.Len() > 0 { @@ -33077,123 +38947,113 @@ func (s *DeleteRouteTableInput) Validate() error { return nil } -// SetDryRun sets the DryRun field's value. -func (s *DeleteRouteTableInput) SetDryRun(v bool) *DeleteRouteTableInput { - s.DryRun = &v - return s -} - -// SetRouteTableId sets the RouteTableId field's value. -func (s *DeleteRouteTableInput) SetRouteTableId(v string) *DeleteRouteTableInput { - s.RouteTableId = &v +// SetCpuCredits sets the CpuCredits field's value. +func (s *CreditSpecificationRequest) SetCpuCredits(v string) *CreditSpecificationRequest { + s.CpuCredits = &v return s } -type DeleteRouteTableOutput struct { +// Describes a customer gateway. +type CustomerGateway struct { _ struct{} `type:"structure"` -} -// String returns the string representation -func (s DeleteRouteTableOutput) String() string { - return awsutil.Prettify(s) -} + // The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number + // (ASN). + BgpAsn *string `locationName:"bgpAsn" type:"string"` -// GoString returns the string representation -func (s DeleteRouteTableOutput) GoString() string { - return s.String() -} + // The ID of the customer gateway. + CustomerGatewayId *string `locationName:"customerGatewayId" type:"string"` -// Contains the parameters for DeleteSecurityGroup. -type DeleteSecurityGroupInput struct { - _ struct{} `type:"structure"` + // The Internet-routable IP address of the customer gateway's outside interface. + IpAddress *string `locationName:"ipAddress" 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 `locationName:"dryRun" type:"boolean"` + // The current state of the customer gateway (pending | available | deleting + // | deleted). + State *string `locationName:"state" type:"string"` - // The ID of the security group. Required for a nondefault VPC. - GroupId *string `type:"string"` + // Any tags assigned to the customer gateway. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - // [EC2-Classic, default VPC] The name of the security group. You can specify - // either the security group name or the security group ID. - GroupName *string `type:"string"` + // The type of VPN connection the customer gateway supports (ipsec.1). + Type *string `locationName:"type" type:"string"` } // String returns the string representation -func (s DeleteSecurityGroupInput) String() string { +func (s CustomerGateway) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteSecurityGroupInput) GoString() string { +func (s CustomerGateway) GoString() string { return s.String() } -// SetDryRun sets the DryRun field's value. -func (s *DeleteSecurityGroupInput) SetDryRun(v bool) *DeleteSecurityGroupInput { - s.DryRun = &v +// SetBgpAsn sets the BgpAsn field's value. +func (s *CustomerGateway) SetBgpAsn(v string) *CustomerGateway { + s.BgpAsn = &v return s } -// SetGroupId sets the GroupId field's value. -func (s *DeleteSecurityGroupInput) SetGroupId(v string) *DeleteSecurityGroupInput { - s.GroupId = &v +// SetCustomerGatewayId sets the CustomerGatewayId field's value. +func (s *CustomerGateway) SetCustomerGatewayId(v string) *CustomerGateway { + s.CustomerGatewayId = &v return s } -// SetGroupName sets the GroupName field's value. -func (s *DeleteSecurityGroupInput) SetGroupName(v string) *DeleteSecurityGroupInput { - s.GroupName = &v +// SetIpAddress sets the IpAddress field's value. +func (s *CustomerGateway) SetIpAddress(v string) *CustomerGateway { + s.IpAddress = &v return s } -type DeleteSecurityGroupOutput struct { - _ struct{} `type:"structure"` +// SetState sets the State field's value. +func (s *CustomerGateway) SetState(v string) *CustomerGateway { + s.State = &v + return s } -// String returns the string representation -func (s DeleteSecurityGroupOutput) String() string { - return awsutil.Prettify(s) +// SetTags sets the Tags field's value. +func (s *CustomerGateway) SetTags(v []*Tag) *CustomerGateway { + s.Tags = v + return s } -// GoString returns the string representation -func (s DeleteSecurityGroupOutput) GoString() string { - return s.String() +// SetType sets the Type field's value. +func (s *CustomerGateway) SetType(v string) *CustomerGateway { + s.Type = &v + return s } -// Contains the parameters for DeleteSnapshot. -type DeleteSnapshotInput struct { +type DeleteClientVpnEndpointInput struct { _ struct{} `type:"structure"` + // The ID of the Client VPN to be deleted. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *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 `locationName:"dryRun" type:"boolean"` - - // The ID of the EBS snapshot. - // - // SnapshotId is a required field - SnapshotId *string `type:"string" required:"true"` + DryRun *bool `type:"boolean"` } // String returns the string representation -func (s DeleteSnapshotInput) String() string { +func (s DeleteClientVpnEndpointInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteSnapshotInput) GoString() string { +func (s DeleteClientVpnEndpointInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSnapshotInput"} - if s.SnapshotId == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotId")) +func (s *DeleteClientVpnEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteClientVpnEndpointInput"} + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) } if invalidParams.Len() > 0 { @@ -33202,104 +39062,168 @@ func (s *DeleteSnapshotInput) Validate() error { return nil } -// SetDryRun sets the DryRun field's value. -func (s *DeleteSnapshotInput) SetDryRun(v bool) *DeleteSnapshotInput { - s.DryRun = &v +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *DeleteClientVpnEndpointInput) SetClientVpnEndpointId(v string) *DeleteClientVpnEndpointInput { + s.ClientVpnEndpointId = &v return s } -// SetSnapshotId sets the SnapshotId field's value. -func (s *DeleteSnapshotInput) SetSnapshotId(v string) *DeleteSnapshotInput { - s.SnapshotId = &v +// SetDryRun sets the DryRun field's value. +func (s *DeleteClientVpnEndpointInput) SetDryRun(v bool) *DeleteClientVpnEndpointInput { + s.DryRun = &v return s } -type DeleteSnapshotOutput struct { +type DeleteClientVpnEndpointOutput struct { _ struct{} `type:"structure"` + + // The current state of the Client VPN endpoint. + Status *ClientVpnEndpointStatus `locationName:"status" type:"structure"` } // String returns the string representation -func (s DeleteSnapshotOutput) String() string { +func (s DeleteClientVpnEndpointOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteSnapshotOutput) GoString() string { +func (s DeleteClientVpnEndpointOutput) GoString() string { return s.String() } -// Contains the parameters for DeleteSpotDatafeedSubscription. -type DeleteSpotDatafeedSubscriptionInput struct { +// SetStatus sets the Status field's value. +func (s *DeleteClientVpnEndpointOutput) SetStatus(v *ClientVpnEndpointStatus) *DeleteClientVpnEndpointOutput { + s.Status = v + return s +} + +type DeleteClientVpnRouteInput struct { _ struct{} `type:"structure"` + // The ID of the Client VPN endpoint from which the route is to be deleted. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *string `type:"string" required:"true"` + + // The IPv4 address range, in CIDR notation, of the route to be deleted. + // + // DestinationCidrBlock is a required field + DestinationCidrBlock *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 `locationName:"dryRun" type:"boolean"` + DryRun *bool `type:"boolean"` + + // The ID of the target subnet used by the route. + TargetVpcSubnetId *string `type:"string"` } // String returns the string representation -func (s DeleteSpotDatafeedSubscriptionInput) String() string { +func (s DeleteClientVpnRouteInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteSpotDatafeedSubscriptionInput) GoString() string { +func (s DeleteClientVpnRouteInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteClientVpnRouteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteClientVpnRouteInput"} + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } + if s.DestinationCidrBlock == nil { + invalidParams.Add(request.NewErrParamRequired("DestinationCidrBlock")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *DeleteClientVpnRouteInput) SetClientVpnEndpointId(v string) *DeleteClientVpnRouteInput { + s.ClientVpnEndpointId = &v + return s +} + +// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. +func (s *DeleteClientVpnRouteInput) SetDestinationCidrBlock(v string) *DeleteClientVpnRouteInput { + s.DestinationCidrBlock = &v + return s +} + // SetDryRun sets the DryRun field's value. -func (s *DeleteSpotDatafeedSubscriptionInput) SetDryRun(v bool) *DeleteSpotDatafeedSubscriptionInput { +func (s *DeleteClientVpnRouteInput) SetDryRun(v bool) *DeleteClientVpnRouteInput { s.DryRun = &v return s } -type DeleteSpotDatafeedSubscriptionOutput struct { +// SetTargetVpcSubnetId sets the TargetVpcSubnetId field's value. +func (s *DeleteClientVpnRouteInput) SetTargetVpcSubnetId(v string) *DeleteClientVpnRouteInput { + s.TargetVpcSubnetId = &v + return s +} + +type DeleteClientVpnRouteOutput struct { _ struct{} `type:"structure"` + + // The current state of the route. + Status *ClientVpnRouteStatus `locationName:"status" type:"structure"` } // String returns the string representation -func (s DeleteSpotDatafeedSubscriptionOutput) String() string { +func (s DeleteClientVpnRouteOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteSpotDatafeedSubscriptionOutput) GoString() string { +func (s DeleteClientVpnRouteOutput) GoString() string { return s.String() } -// Contains the parameters for DeleteSubnet. -type DeleteSubnetInput struct { +// SetStatus sets the Status field's value. +func (s *DeleteClientVpnRouteOutput) SetStatus(v *ClientVpnRouteStatus) *DeleteClientVpnRouteOutput { + s.Status = v + return s +} + +// Contains the parameters for DeleteCustomerGateway. +type DeleteCustomerGatewayInput struct { _ struct{} `type:"structure"` + // The ID of the customer gateway. + // + // CustomerGatewayId is a required field + CustomerGatewayId *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 `locationName:"dryRun" type:"boolean"` - - // The ID of the subnet. - // - // SubnetId is a required field - SubnetId *string `type:"string" required:"true"` } // String returns the string representation -func (s DeleteSubnetInput) String() string { +func (s DeleteCustomerGatewayInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteSubnetInput) GoString() string { +func (s DeleteCustomerGatewayInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSubnetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSubnetInput"} - if s.SubnetId == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetId")) +func (s *DeleteCustomerGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteCustomerGatewayInput"} + if s.CustomerGatewayId == nil { + invalidParams.Add(request.NewErrParamRequired("CustomerGatewayId")) } if invalidParams.Len() > 0 { @@ -33308,73 +39232,62 @@ func (s *DeleteSubnetInput) Validate() error { return nil } -// SetDryRun sets the DryRun field's value. -func (s *DeleteSubnetInput) SetDryRun(v bool) *DeleteSubnetInput { - s.DryRun = &v +// SetCustomerGatewayId sets the CustomerGatewayId field's value. +func (s *DeleteCustomerGatewayInput) SetCustomerGatewayId(v string) *DeleteCustomerGatewayInput { + s.CustomerGatewayId = &v return s } -// SetSubnetId sets the SubnetId field's value. -func (s *DeleteSubnetInput) SetSubnetId(v string) *DeleteSubnetInput { - s.SubnetId = &v +// SetDryRun sets the DryRun field's value. +func (s *DeleteCustomerGatewayInput) SetDryRun(v bool) *DeleteCustomerGatewayInput { + s.DryRun = &v return s } -type DeleteSubnetOutput struct { +type DeleteCustomerGatewayOutput struct { _ struct{} `type:"structure"` } // String returns the string representation -func (s DeleteSubnetOutput) String() string { +func (s DeleteCustomerGatewayOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteSubnetOutput) GoString() string { +func (s DeleteCustomerGatewayOutput) GoString() string { return s.String() } -// Contains the parameters for DeleteTags. -type DeleteTagsInput struct { +type DeleteDhcpOptionsInput struct { _ struct{} `type:"structure"` + // The ID of the DHCP options set. + // + // DhcpOptionsId is a required field + DhcpOptionsId *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 `locationName:"dryRun" type:"boolean"` - - // The IDs of one or more resources. - // - // Resources is a required field - Resources []*string `locationName:"resourceId" type:"list" required:"true"` - - // One or more tags to delete. Specify a tag key and an optional tag value to - // delete specific tags. If you specify a tag key without a tag value, we delete - // any tag with this key regardless of its value. If you specify a tag key with - // an empty string as the tag value, we delete the tag only if its value is - // 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). - Tags []*Tag `locationName:"tag" locationNameList:"item" type:"list"` } // String returns the string representation -func (s DeleteTagsInput) String() string { +func (s DeleteDhcpOptionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteTagsInput) GoString() string { +func (s DeleteDhcpOptionsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteTagsInput"} - if s.Resources == nil { - invalidParams.Add(request.NewErrParamRequired("Resources")) +func (s *DeleteDhcpOptionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDhcpOptionsInput"} + if s.DhcpOptionsId == nil { + invalidParams.Add(request.NewErrParamRequired("DhcpOptionsId")) } if invalidParams.Len() > 0 { @@ -33383,69 +39296,62 @@ func (s *DeleteTagsInput) Validate() error { return nil } -// SetDryRun sets the DryRun field's value. -func (s *DeleteTagsInput) SetDryRun(v bool) *DeleteTagsInput { - s.DryRun = &v - return s -} - -// SetResources sets the Resources field's value. -func (s *DeleteTagsInput) SetResources(v []*string) *DeleteTagsInput { - s.Resources = v +// SetDhcpOptionsId sets the DhcpOptionsId field's value. +func (s *DeleteDhcpOptionsInput) SetDhcpOptionsId(v string) *DeleteDhcpOptionsInput { + s.DhcpOptionsId = &v return s } -// SetTags sets the Tags field's value. -func (s *DeleteTagsInput) SetTags(v []*Tag) *DeleteTagsInput { - s.Tags = v +// SetDryRun sets the DryRun field's value. +func (s *DeleteDhcpOptionsInput) SetDryRun(v bool) *DeleteDhcpOptionsInput { + s.DryRun = &v return s } -type DeleteTagsOutput struct { +type DeleteDhcpOptionsOutput struct { _ struct{} `type:"structure"` } // String returns the string representation -func (s DeleteTagsOutput) String() string { +func (s DeleteDhcpOptionsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteTagsOutput) GoString() string { +func (s DeleteDhcpOptionsOutput) GoString() string { return s.String() } -// Contains the parameters for DeleteVolume. -type DeleteVolumeInput struct { +type DeleteEgressOnlyInternetGatewayInput 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 `locationName:"dryRun" type:"boolean"` + DryRun *bool `type:"boolean"` - // The ID of the volume. + // The ID of the egress-only internet gateway. // - // VolumeId is a required field - VolumeId *string `type:"string" required:"true"` + // EgressOnlyInternetGatewayId is a required field + EgressOnlyInternetGatewayId *string `type:"string" required:"true"` } // String returns the string representation -func (s DeleteVolumeInput) String() string { +func (s DeleteEgressOnlyInternetGatewayInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteVolumeInput) GoString() string { +func (s DeleteEgressOnlyInternetGatewayInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVolumeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVolumeInput"} - if s.VolumeId == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeId")) +func (s *DeleteEgressOnlyInternetGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteEgressOnlyInternetGatewayInput"} + if s.EgressOnlyInternetGatewayId == nil { + invalidParams.Add(request.NewErrParamRequired("EgressOnlyInternetGatewayId")) } if invalidParams.Len() > 0 { @@ -33455,105 +39361,149 @@ func (s *DeleteVolumeInput) Validate() error { } // SetDryRun sets the DryRun field's value. -func (s *DeleteVolumeInput) SetDryRun(v bool) *DeleteVolumeInput { +func (s *DeleteEgressOnlyInternetGatewayInput) SetDryRun(v bool) *DeleteEgressOnlyInternetGatewayInput { s.DryRun = &v return s } -// SetVolumeId sets the VolumeId field's value. -func (s *DeleteVolumeInput) SetVolumeId(v string) *DeleteVolumeInput { - s.VolumeId = &v +// SetEgressOnlyInternetGatewayId sets the EgressOnlyInternetGatewayId field's value. +func (s *DeleteEgressOnlyInternetGatewayInput) SetEgressOnlyInternetGatewayId(v string) *DeleteEgressOnlyInternetGatewayInput { + s.EgressOnlyInternetGatewayId = &v return s } -type DeleteVolumeOutput struct { +type DeleteEgressOnlyInternetGatewayOutput struct { _ struct{} `type:"structure"` + + // Returns true if the request succeeds; otherwise, it returns an error. + ReturnCode *bool `locationName:"returnCode" type:"boolean"` } // String returns the string representation -func (s DeleteVolumeOutput) String() string { +func (s DeleteEgressOnlyInternetGatewayOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteVolumeOutput) GoString() string { +func (s DeleteEgressOnlyInternetGatewayOutput) GoString() string { return s.String() } -type DeleteVpcEndpointConnectionNotificationsInput struct { +// SetReturnCode sets the ReturnCode field's value. +func (s *DeleteEgressOnlyInternetGatewayOutput) SetReturnCode(v bool) *DeleteEgressOnlyInternetGatewayOutput { + s.ReturnCode = &v + return s +} + +// Describes an EC2 Fleet error. +type DeleteFleetError struct { _ struct{} `type:"structure"` - // One or more notification IDs. - // - // ConnectionNotificationIds is a required field - ConnectionNotificationIds []*string `locationName:"ConnectionNotificationId" locationNameList:"item" type:"list" required:"true"` + // The error code. + Code *string `locationName:"code" type:"string" enum:"DeleteFleetErrorCode"` - // 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 description for the error code. + Message *string `locationName:"message" type:"string"` } // String returns the string representation -func (s DeleteVpcEndpointConnectionNotificationsInput) String() string { +func (s DeleteFleetError) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteVpcEndpointConnectionNotificationsInput) GoString() string { +func (s DeleteFleetError) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVpcEndpointConnectionNotificationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVpcEndpointConnectionNotificationsInput"} - if s.ConnectionNotificationIds == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionNotificationIds")) - } +// SetCode sets the Code field's value. +func (s *DeleteFleetError) SetCode(v string) *DeleteFleetError { + s.Code = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetMessage sets the Message field's value. +func (s *DeleteFleetError) SetMessage(v string) *DeleteFleetError { + s.Message = &v + return s } -// SetConnectionNotificationIds sets the ConnectionNotificationIds field's value. -func (s *DeleteVpcEndpointConnectionNotificationsInput) SetConnectionNotificationIds(v []*string) *DeleteVpcEndpointConnectionNotificationsInput { - s.ConnectionNotificationIds = v +// Describes an EC2 Fleet that was not successfully deleted. +type DeleteFleetErrorItem struct { + _ struct{} `type:"structure"` + + // The error. + Error *DeleteFleetError `locationName:"error" type:"structure"` + + // The ID of the EC2 Fleet. + FleetId *string `locationName:"fleetId" type:"string"` +} + +// String returns the string representation +func (s DeleteFleetErrorItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteFleetErrorItem) GoString() string { + return s.String() +} + +// SetError sets the Error field's value. +func (s *DeleteFleetErrorItem) SetError(v *DeleteFleetError) *DeleteFleetErrorItem { + s.Error = v return s } -// SetDryRun sets the DryRun field's value. -func (s *DeleteVpcEndpointConnectionNotificationsInput) SetDryRun(v bool) *DeleteVpcEndpointConnectionNotificationsInput { - s.DryRun = &v +// SetFleetId sets the FleetId field's value. +func (s *DeleteFleetErrorItem) SetFleetId(v string) *DeleteFleetErrorItem { + s.FleetId = &v return s } -type DeleteVpcEndpointConnectionNotificationsOutput struct { +// Describes an EC2 Fleet that was successfully deleted. +type DeleteFleetSuccessItem struct { _ struct{} `type:"structure"` - // Information about the notifications that could not be deleted successfully. - Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"` + // The current state of the EC2 Fleet. + CurrentFleetState *string `locationName:"currentFleetState" type:"string" enum:"FleetStateCode"` + + // The ID of the EC2 Fleet. + FleetId *string `locationName:"fleetId" type:"string"` + + // The previous state of the EC2 Fleet. + PreviousFleetState *string `locationName:"previousFleetState" type:"string" enum:"FleetStateCode"` } // String returns the string representation -func (s DeleteVpcEndpointConnectionNotificationsOutput) String() string { +func (s DeleteFleetSuccessItem) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteVpcEndpointConnectionNotificationsOutput) GoString() string { +func (s DeleteFleetSuccessItem) GoString() string { return s.String() } -// SetUnsuccessful sets the Unsuccessful field's value. -func (s *DeleteVpcEndpointConnectionNotificationsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *DeleteVpcEndpointConnectionNotificationsOutput { - s.Unsuccessful = v +// SetCurrentFleetState sets the CurrentFleetState field's value. +func (s *DeleteFleetSuccessItem) SetCurrentFleetState(v string) *DeleteFleetSuccessItem { + s.CurrentFleetState = &v return s } -type DeleteVpcEndpointServiceConfigurationsInput struct { +// SetFleetId sets the FleetId field's value. +func (s *DeleteFleetSuccessItem) SetFleetId(v string) *DeleteFleetSuccessItem { + s.FleetId = &v + return s +} + +// SetPreviousFleetState sets the PreviousFleetState field's value. +func (s *DeleteFleetSuccessItem) SetPreviousFleetState(v string) *DeleteFleetSuccessItem { + s.PreviousFleetState = &v + return s +} + +type DeleteFleetsInput struct { _ struct{} `type:"structure"` // Checks whether you have the required permissions for the action, without @@ -33562,27 +39512,36 @@ type DeleteVpcEndpointServiceConfigurationsInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // The IDs of one or more services. + // The IDs of the EC2 Fleets. // - // ServiceIds is a required field - ServiceIds []*string `locationName:"ServiceId" locationNameList:"item" type:"list" required:"true"` + // FleetIds is a required field + FleetIds []*string `locationName:"FleetId" type:"list" required:"true"` + + // Indicates whether to terminate instances for an EC2 Fleet if it is deleted + // successfully. + // + // TerminateInstances is a required field + TerminateInstances *bool `type:"boolean" required:"true"` } // String returns the string representation -func (s DeleteVpcEndpointServiceConfigurationsInput) String() string { +func (s DeleteFleetsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteVpcEndpointServiceConfigurationsInput) GoString() string { +func (s DeleteFleetsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVpcEndpointServiceConfigurationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVpcEndpointServiceConfigurationsInput"} - if s.ServiceIds == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceIds")) +func (s *DeleteFleetsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteFleetsInput"} + if s.FleetIds == nil { + invalidParams.Add(request.NewErrParamRequired("FleetIds")) + } + if s.TerminateInstances == nil { + invalidParams.Add(request.NewErrParamRequired("TerminateInstances")) } if invalidParams.Len() > 0 { @@ -33592,42 +39551,56 @@ func (s *DeleteVpcEndpointServiceConfigurationsInput) Validate() error { } // SetDryRun sets the DryRun field's value. -func (s *DeleteVpcEndpointServiceConfigurationsInput) SetDryRun(v bool) *DeleteVpcEndpointServiceConfigurationsInput { +func (s *DeleteFleetsInput) SetDryRun(v bool) *DeleteFleetsInput { s.DryRun = &v return s } -// SetServiceIds sets the ServiceIds field's value. -func (s *DeleteVpcEndpointServiceConfigurationsInput) SetServiceIds(v []*string) *DeleteVpcEndpointServiceConfigurationsInput { - s.ServiceIds = v +// SetFleetIds sets the FleetIds field's value. +func (s *DeleteFleetsInput) SetFleetIds(v []*string) *DeleteFleetsInput { + s.FleetIds = v return s } -type DeleteVpcEndpointServiceConfigurationsOutput struct { +// SetTerminateInstances sets the TerminateInstances field's value. +func (s *DeleteFleetsInput) SetTerminateInstances(v bool) *DeleteFleetsInput { + s.TerminateInstances = &v + return s +} + +type DeleteFleetsOutput struct { _ struct{} `type:"structure"` - // Information about the service configurations that were not deleted, if applicable. - Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"` + // Information about the EC2 Fleets that are successfully deleted. + SuccessfulFleetDeletions []*DeleteFleetSuccessItem `locationName:"successfulFleetDeletionSet" locationNameList:"item" type:"list"` + + // Information about the EC2 Fleets that are not successfully deleted. + UnsuccessfulFleetDeletions []*DeleteFleetErrorItem `locationName:"unsuccessfulFleetDeletionSet" locationNameList:"item" type:"list"` } // String returns the string representation -func (s DeleteVpcEndpointServiceConfigurationsOutput) String() string { +func (s DeleteFleetsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteVpcEndpointServiceConfigurationsOutput) GoString() string { +func (s DeleteFleetsOutput) GoString() string { return s.String() } -// SetUnsuccessful sets the Unsuccessful field's value. -func (s *DeleteVpcEndpointServiceConfigurationsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *DeleteVpcEndpointServiceConfigurationsOutput { - s.Unsuccessful = v +// SetSuccessfulFleetDeletions sets the SuccessfulFleetDeletions field's value. +func (s *DeleteFleetsOutput) SetSuccessfulFleetDeletions(v []*DeleteFleetSuccessItem) *DeleteFleetsOutput { + s.SuccessfulFleetDeletions = v return s } -// Contains the parameters for DeleteVpcEndpoints. -type DeleteVpcEndpointsInput struct { +// SetUnsuccessfulFleetDeletions sets the UnsuccessfulFleetDeletions field's value. +func (s *DeleteFleetsOutput) SetUnsuccessfulFleetDeletions(v []*DeleteFleetErrorItem) *DeleteFleetsOutput { + s.UnsuccessfulFleetDeletions = v + return s +} + +type DeleteFlowLogsInput struct { _ struct{} `type:"structure"` // Checks whether you have the required permissions for the action, without @@ -33636,27 +39609,27 @@ type DeleteVpcEndpointsInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // One or more VPC endpoint IDs. + // One or more flow log IDs. // - // VpcEndpointIds is a required field - VpcEndpointIds []*string `locationName:"VpcEndpointId" locationNameList:"item" type:"list" required:"true"` + // FlowLogIds is a required field + FlowLogIds []*string `locationName:"FlowLogId" locationNameList:"item" type:"list" required:"true"` } // String returns the string representation -func (s DeleteVpcEndpointsInput) String() string { +func (s DeleteFlowLogsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteVpcEndpointsInput) GoString() string { +func (s DeleteFlowLogsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVpcEndpointsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVpcEndpointsInput"} - if s.VpcEndpointIds == nil { - invalidParams.Add(request.NewErrParamRequired("VpcEndpointIds")) +func (s *DeleteFlowLogsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteFlowLogsInput"} + if s.FlowLogIds == nil { + invalidParams.Add(request.NewErrParamRequired("FlowLogIds")) } if invalidParams.Len() > 0 { @@ -33666,72 +39639,70 @@ func (s *DeleteVpcEndpointsInput) Validate() error { } // SetDryRun sets the DryRun field's value. -func (s *DeleteVpcEndpointsInput) SetDryRun(v bool) *DeleteVpcEndpointsInput { +func (s *DeleteFlowLogsInput) SetDryRun(v bool) *DeleteFlowLogsInput { s.DryRun = &v return s } -// SetVpcEndpointIds sets the VpcEndpointIds field's value. -func (s *DeleteVpcEndpointsInput) SetVpcEndpointIds(v []*string) *DeleteVpcEndpointsInput { - s.VpcEndpointIds = v +// SetFlowLogIds sets the FlowLogIds field's value. +func (s *DeleteFlowLogsInput) SetFlowLogIds(v []*string) *DeleteFlowLogsInput { + s.FlowLogIds = v return s } -// Contains the output of DeleteVpcEndpoints. -type DeleteVpcEndpointsOutput struct { +type DeleteFlowLogsOutput struct { _ struct{} `type:"structure"` - // Information about the VPC endpoints that were not successfully deleted. + // Information about the flow logs that could not be deleted successfully. Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"` } // String returns the string representation -func (s DeleteVpcEndpointsOutput) String() string { +func (s DeleteFlowLogsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteVpcEndpointsOutput) GoString() string { +func (s DeleteFlowLogsOutput) GoString() string { return s.String() } // SetUnsuccessful sets the Unsuccessful field's value. -func (s *DeleteVpcEndpointsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *DeleteVpcEndpointsOutput { +func (s *DeleteFlowLogsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *DeleteFlowLogsOutput { s.Unsuccessful = v return s } -// Contains the parameters for DeleteVpc. -type DeleteVpcInput struct { +type DeleteFpgaImageInput 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 `locationName:"dryRun" type:"boolean"` + DryRun *bool `type:"boolean"` - // The ID of the VPC. + // The ID of the AFI. // - // VpcId is a required field - VpcId *string `type:"string" required:"true"` + // FpgaImageId is a required field + FpgaImageId *string `type:"string" required:"true"` } // String returns the string representation -func (s DeleteVpcInput) String() string { +func (s DeleteFpgaImageInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteVpcInput) GoString() string { +func (s DeleteFpgaImageInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVpcInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVpcInput"} - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) +func (s *DeleteFpgaImageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteFpgaImageInput"} + if s.FpgaImageId == nil { + invalidParams.Add(request.NewErrParamRequired("FpgaImageId")) } if invalidParams.Len() > 0 { @@ -33741,33 +39712,41 @@ func (s *DeleteVpcInput) Validate() error { } // SetDryRun sets the DryRun field's value. -func (s *DeleteVpcInput) SetDryRun(v bool) *DeleteVpcInput { +func (s *DeleteFpgaImageInput) SetDryRun(v bool) *DeleteFpgaImageInput { s.DryRun = &v return s } -// SetVpcId sets the VpcId field's value. -func (s *DeleteVpcInput) SetVpcId(v string) *DeleteVpcInput { - s.VpcId = &v +// SetFpgaImageId sets the FpgaImageId field's value. +func (s *DeleteFpgaImageInput) SetFpgaImageId(v string) *DeleteFpgaImageInput { + s.FpgaImageId = &v return s } -type DeleteVpcOutput struct { +type DeleteFpgaImageOutput struct { _ struct{} `type:"structure"` + + // Is true if the request succeeds, and an error otherwise. + Return *bool `locationName:"return" type:"boolean"` } // String returns the string representation -func (s DeleteVpcOutput) String() string { +func (s DeleteFpgaImageOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteVpcOutput) GoString() string { +func (s DeleteFpgaImageOutput) GoString() string { return s.String() } -// Contains the parameters for DeleteVpcPeeringConnection. -type DeleteVpcPeeringConnectionInput struct { +// SetReturn sets the Return field's value. +func (s *DeleteFpgaImageOutput) SetReturn(v bool) *DeleteFpgaImageOutput { + s.Return = &v + return s +} + +type DeleteInternetGatewayInput struct { _ struct{} `type:"structure"` // Checks whether you have the required permissions for the action, without @@ -33776,27 +39755,27 @@ type DeleteVpcPeeringConnectionInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // The ID of the VPC peering connection. + // The ID of the internet gateway. // - // VpcPeeringConnectionId is a required field - VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string" required:"true"` + // InternetGatewayId is a required field + InternetGatewayId *string `locationName:"internetGatewayId" type:"string" required:"true"` } // String returns the string representation -func (s DeleteVpcPeeringConnectionInput) String() string { +func (s DeleteInternetGatewayInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteVpcPeeringConnectionInput) GoString() string { +func (s DeleteInternetGatewayInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVpcPeeringConnectionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVpcPeeringConnectionInput"} - if s.VpcPeeringConnectionId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcPeeringConnectionId")) +func (s *DeleteInternetGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteInternetGatewayInput"} + if s.InternetGatewayId == nil { + invalidParams.Add(request.NewErrParamRequired("InternetGatewayId")) } if invalidParams.Len() > 0 { @@ -33806,43 +39785,32 @@ func (s *DeleteVpcPeeringConnectionInput) Validate() error { } // SetDryRun sets the DryRun field's value. -func (s *DeleteVpcPeeringConnectionInput) SetDryRun(v bool) *DeleteVpcPeeringConnectionInput { +func (s *DeleteInternetGatewayInput) SetDryRun(v bool) *DeleteInternetGatewayInput { s.DryRun = &v return s } -// SetVpcPeeringConnectionId sets the VpcPeeringConnectionId field's value. -func (s *DeleteVpcPeeringConnectionInput) SetVpcPeeringConnectionId(v string) *DeleteVpcPeeringConnectionInput { - s.VpcPeeringConnectionId = &v +// SetInternetGatewayId sets the InternetGatewayId field's value. +func (s *DeleteInternetGatewayInput) SetInternetGatewayId(v string) *DeleteInternetGatewayInput { + s.InternetGatewayId = &v return s } -// Contains the output of DeleteVpcPeeringConnection. -type DeleteVpcPeeringConnectionOutput struct { +type DeleteInternetGatewayOutput 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 DeleteVpcPeeringConnectionOutput) String() string { +func (s DeleteInternetGatewayOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteVpcPeeringConnectionOutput) GoString() string { +func (s DeleteInternetGatewayOutput) GoString() string { return s.String() } -// SetReturn sets the Return field's value. -func (s *DeleteVpcPeeringConnectionOutput) SetReturn(v bool) *DeleteVpcPeeringConnectionOutput { - s.Return = &v - return s -} - -// Contains the parameters for DeleteVpnConnection. -type DeleteVpnConnectionInput struct { +type DeleteKeyPairInput struct { _ struct{} `type:"structure"` // Checks whether you have the required permissions for the action, without @@ -33851,27 +39819,27 @@ type DeleteVpnConnectionInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // The ID of the VPN connection. + // The name of the key pair. // - // VpnConnectionId is a required field - VpnConnectionId *string `type:"string" required:"true"` + // KeyName is a required field + KeyName *string `type:"string" required:"true"` } // String returns the string representation -func (s DeleteVpnConnectionInput) String() string { +func (s DeleteKeyPairInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteVpnConnectionInput) GoString() string { +func (s DeleteKeyPairInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVpnConnectionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVpnConnectionInput"} - if s.VpnConnectionId == nil { - invalidParams.Add(request.NewErrParamRequired("VpnConnectionId")) +func (s *DeleteKeyPairInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteKeyPairInput"} + if s.KeyName == nil { + invalidParams.Add(request.NewErrParamRequired("KeyName")) } if invalidParams.Len() > 0 { @@ -33881,64 +39849,64 @@ func (s *DeleteVpnConnectionInput) Validate() error { } // SetDryRun sets the DryRun field's value. -func (s *DeleteVpnConnectionInput) SetDryRun(v bool) *DeleteVpnConnectionInput { +func (s *DeleteKeyPairInput) SetDryRun(v bool) *DeleteKeyPairInput { s.DryRun = &v return s } -// SetVpnConnectionId sets the VpnConnectionId field's value. -func (s *DeleteVpnConnectionInput) SetVpnConnectionId(v string) *DeleteVpnConnectionInput { - s.VpnConnectionId = &v +// SetKeyName sets the KeyName field's value. +func (s *DeleteKeyPairInput) SetKeyName(v string) *DeleteKeyPairInput { + s.KeyName = &v return s } -type DeleteVpnConnectionOutput struct { +type DeleteKeyPairOutput struct { _ struct{} `type:"structure"` } // String returns the string representation -func (s DeleteVpnConnectionOutput) String() string { +func (s DeleteKeyPairOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteVpnConnectionOutput) GoString() string { +func (s DeleteKeyPairOutput) GoString() string { return s.String() } -// Contains the parameters for DeleteVpnConnectionRoute. -type DeleteVpnConnectionRouteInput struct { +type DeleteLaunchTemplateInput struct { _ struct{} `type:"structure"` - // The CIDR block associated with the local subnet of the customer network. - // - // DestinationCidrBlock is a required field - DestinationCidrBlock *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 VPN connection. - // - // VpnConnectionId is a required field - VpnConnectionId *string `type:"string" required:"true"` + // The ID of the launch template. You must specify either the launch template + // ID or launch template name in the request. + LaunchTemplateId *string `type:"string"` + + // The name of the launch template. You must specify either the launch template + // ID or launch template name in the request. + LaunchTemplateName *string `min:"3" type:"string"` } // String returns the string representation -func (s DeleteVpnConnectionRouteInput) String() string { +func (s DeleteLaunchTemplateInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteVpnConnectionRouteInput) GoString() string { +func (s DeleteLaunchTemplateInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVpnConnectionRouteInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVpnConnectionRouteInput"} - if s.DestinationCidrBlock == nil { - invalidParams.Add(request.NewErrParamRequired("DestinationCidrBlock")) - } - if s.VpnConnectionId == nil { - invalidParams.Add(request.NewErrParamRequired("VpnConnectionId")) +func (s *DeleteLaunchTemplateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLaunchTemplateInput"} + if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3)) } if invalidParams.Len() > 0 { @@ -33947,63 +39915,88 @@ func (s *DeleteVpnConnectionRouteInput) Validate() error { return nil } -// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. -func (s *DeleteVpnConnectionRouteInput) SetDestinationCidrBlock(v string) *DeleteVpnConnectionRouteInput { - s.DestinationCidrBlock = &v +// SetDryRun sets the DryRun field's value. +func (s *DeleteLaunchTemplateInput) SetDryRun(v bool) *DeleteLaunchTemplateInput { + s.DryRun = &v return s } -// SetVpnConnectionId sets the VpnConnectionId field's value. -func (s *DeleteVpnConnectionRouteInput) SetVpnConnectionId(v string) *DeleteVpnConnectionRouteInput { - s.VpnConnectionId = &v +// SetLaunchTemplateId sets the LaunchTemplateId field's value. +func (s *DeleteLaunchTemplateInput) SetLaunchTemplateId(v string) *DeleteLaunchTemplateInput { + s.LaunchTemplateId = &v return s } -type DeleteVpnConnectionRouteOutput struct { +// SetLaunchTemplateName sets the LaunchTemplateName field's value. +func (s *DeleteLaunchTemplateInput) SetLaunchTemplateName(v string) *DeleteLaunchTemplateInput { + s.LaunchTemplateName = &v + return s +} + +type DeleteLaunchTemplateOutput struct { _ struct{} `type:"structure"` + + // Information about the launch template. + LaunchTemplate *LaunchTemplate `locationName:"launchTemplate" type:"structure"` } // String returns the string representation -func (s DeleteVpnConnectionRouteOutput) String() string { +func (s DeleteLaunchTemplateOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteVpnConnectionRouteOutput) GoString() string { +func (s DeleteLaunchTemplateOutput) GoString() string { return s.String() } -// Contains the parameters for DeleteVpnGateway. -type DeleteVpnGatewayInput struct { +// SetLaunchTemplate sets the LaunchTemplate field's value. +func (s *DeleteLaunchTemplateOutput) SetLaunchTemplate(v *LaunchTemplate) *DeleteLaunchTemplateOutput { + s.LaunchTemplate = v + return s +} + +type DeleteLaunchTemplateVersionsInput 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 `locationName:"dryRun" type:"boolean"` + DryRun *bool `type:"boolean"` - // The ID of the virtual private gateway. + // The ID of the launch template. You must specify either the launch template + // ID or launch template name in the request. + LaunchTemplateId *string `type:"string"` + + // The name of the launch template. You must specify either the launch template + // ID or launch template name in the request. + LaunchTemplateName *string `min:"3" type:"string"` + + // The version numbers of one or more launch template versions to delete. // - // VpnGatewayId is a required field - VpnGatewayId *string `type:"string" required:"true"` + // Versions is a required field + Versions []*string `locationName:"LaunchTemplateVersion" locationNameList:"item" type:"list" required:"true"` } // String returns the string representation -func (s DeleteVpnGatewayInput) String() string { +func (s DeleteLaunchTemplateVersionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteVpnGatewayInput) GoString() string { +func (s DeleteLaunchTemplateVersionsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteVpnGatewayInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteVpnGatewayInput"} - if s.VpnGatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("VpnGatewayId")) +func (s *DeleteLaunchTemplateVersionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLaunchTemplateVersionsInput"} + if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3)) + } + if s.Versions == nil { + invalidParams.Add(request.NewErrParamRequired("Versions")) } if invalidParams.Len() > 0 { @@ -34013,330 +40006,373 @@ func (s *DeleteVpnGatewayInput) Validate() error { } // SetDryRun sets the DryRun field's value. -func (s *DeleteVpnGatewayInput) SetDryRun(v bool) *DeleteVpnGatewayInput { +func (s *DeleteLaunchTemplateVersionsInput) SetDryRun(v bool) *DeleteLaunchTemplateVersionsInput { s.DryRun = &v return s } -// SetVpnGatewayId sets the VpnGatewayId field's value. -func (s *DeleteVpnGatewayInput) SetVpnGatewayId(v string) *DeleteVpnGatewayInput { - s.VpnGatewayId = &v +// SetLaunchTemplateId sets the LaunchTemplateId field's value. +func (s *DeleteLaunchTemplateVersionsInput) SetLaunchTemplateId(v string) *DeleteLaunchTemplateVersionsInput { + s.LaunchTemplateId = &v return s } -type DeleteVpnGatewayOutput struct { +// SetLaunchTemplateName sets the LaunchTemplateName field's value. +func (s *DeleteLaunchTemplateVersionsInput) SetLaunchTemplateName(v string) *DeleteLaunchTemplateVersionsInput { + s.LaunchTemplateName = &v + return s +} + +// SetVersions sets the Versions field's value. +func (s *DeleteLaunchTemplateVersionsInput) SetVersions(v []*string) *DeleteLaunchTemplateVersionsInput { + s.Versions = v + return s +} + +type DeleteLaunchTemplateVersionsOutput struct { _ struct{} `type:"structure"` + + // Information about the launch template versions that were successfully deleted. + SuccessfullyDeletedLaunchTemplateVersions []*DeleteLaunchTemplateVersionsResponseSuccessItem `locationName:"successfullyDeletedLaunchTemplateVersionSet" locationNameList:"item" type:"list"` + + // Information about the launch template versions that could not be deleted. + UnsuccessfullyDeletedLaunchTemplateVersions []*DeleteLaunchTemplateVersionsResponseErrorItem `locationName:"unsuccessfullyDeletedLaunchTemplateVersionSet" locationNameList:"item" type:"list"` } // String returns the string representation -func (s DeleteVpnGatewayOutput) String() string { +func (s DeleteLaunchTemplateVersionsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteVpnGatewayOutput) GoString() string { +func (s DeleteLaunchTemplateVersionsOutput) GoString() string { return s.String() } -// Contains the parameters for DeregisterImage. -type DeregisterImageInput struct { +// SetSuccessfullyDeletedLaunchTemplateVersions sets the SuccessfullyDeletedLaunchTemplateVersions field's value. +func (s *DeleteLaunchTemplateVersionsOutput) SetSuccessfullyDeletedLaunchTemplateVersions(v []*DeleteLaunchTemplateVersionsResponseSuccessItem) *DeleteLaunchTemplateVersionsOutput { + s.SuccessfullyDeletedLaunchTemplateVersions = v + return s +} + +// SetUnsuccessfullyDeletedLaunchTemplateVersions sets the UnsuccessfullyDeletedLaunchTemplateVersions field's value. +func (s *DeleteLaunchTemplateVersionsOutput) SetUnsuccessfullyDeletedLaunchTemplateVersions(v []*DeleteLaunchTemplateVersionsResponseErrorItem) *DeleteLaunchTemplateVersionsOutput { + s.UnsuccessfullyDeletedLaunchTemplateVersions = v + return s +} + +// Describes a launch template version that could not be deleted. +type DeleteLaunchTemplateVersionsResponseErrorItem 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 `locationName:"dryRun" type:"boolean"` + // The ID of the launch template. + LaunchTemplateId *string `locationName:"launchTemplateId" type:"string"` - // The ID of the AMI. - // - // ImageId is a required field - ImageId *string `type:"string" required:"true"` + // The name of the launch template. + LaunchTemplateName *string `locationName:"launchTemplateName" type:"string"` + + // Information about the error. + ResponseError *ResponseError `locationName:"responseError" type:"structure"` + + // The version number of the launch template. + VersionNumber *int64 `locationName:"versionNumber" type:"long"` } // String returns the string representation -func (s DeregisterImageInput) String() string { +func (s DeleteLaunchTemplateVersionsResponseErrorItem) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeregisterImageInput) GoString() string { +func (s DeleteLaunchTemplateVersionsResponseErrorItem) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeregisterImageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeregisterImageInput"} - if s.ImageId == nil { - invalidParams.Add(request.NewErrParamRequired("ImageId")) - } +// SetLaunchTemplateId sets the LaunchTemplateId field's value. +func (s *DeleteLaunchTemplateVersionsResponseErrorItem) SetLaunchTemplateId(v string) *DeleteLaunchTemplateVersionsResponseErrorItem { + s.LaunchTemplateId = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetLaunchTemplateName sets the LaunchTemplateName field's value. +func (s *DeleteLaunchTemplateVersionsResponseErrorItem) SetLaunchTemplateName(v string) *DeleteLaunchTemplateVersionsResponseErrorItem { + s.LaunchTemplateName = &v + return s } -// SetDryRun sets the DryRun field's value. -func (s *DeregisterImageInput) SetDryRun(v bool) *DeregisterImageInput { - s.DryRun = &v +// SetResponseError sets the ResponseError field's value. +func (s *DeleteLaunchTemplateVersionsResponseErrorItem) SetResponseError(v *ResponseError) *DeleteLaunchTemplateVersionsResponseErrorItem { + s.ResponseError = v return s } -// SetImageId sets the ImageId field's value. -func (s *DeregisterImageInput) SetImageId(v string) *DeregisterImageInput { - s.ImageId = &v +// SetVersionNumber sets the VersionNumber field's value. +func (s *DeleteLaunchTemplateVersionsResponseErrorItem) SetVersionNumber(v int64) *DeleteLaunchTemplateVersionsResponseErrorItem { + s.VersionNumber = &v return s } -type DeregisterImageOutput struct { +// Describes a launch template version that was successfully deleted. +type DeleteLaunchTemplateVersionsResponseSuccessItem struct { _ struct{} `type:"structure"` + + // The ID of the launch template. + LaunchTemplateId *string `locationName:"launchTemplateId" type:"string"` + + // The name of the launch template. + LaunchTemplateName *string `locationName:"launchTemplateName" type:"string"` + + // The version number of the launch template. + VersionNumber *int64 `locationName:"versionNumber" type:"long"` } // String returns the string representation -func (s DeregisterImageOutput) String() string { +func (s DeleteLaunchTemplateVersionsResponseSuccessItem) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeregisterImageOutput) GoString() string { +func (s DeleteLaunchTemplateVersionsResponseSuccessItem) GoString() string { return s.String() } -// Contains the parameters for DescribeAccountAttributes. -type DescribeAccountAttributesInput struct { - _ struct{} `type:"structure"` +// SetLaunchTemplateId sets the LaunchTemplateId field's value. +func (s *DeleteLaunchTemplateVersionsResponseSuccessItem) SetLaunchTemplateId(v string) *DeleteLaunchTemplateVersionsResponseSuccessItem { + s.LaunchTemplateId = &v + return s +} - // One or more account attribute names. - AttributeNames []*string `locationName:"attributeName" locationNameList:"attributeName" type:"list"` +// SetLaunchTemplateName sets the LaunchTemplateName field's value. +func (s *DeleteLaunchTemplateVersionsResponseSuccessItem) SetLaunchTemplateName(v string) *DeleteLaunchTemplateVersionsResponseSuccessItem { + s.LaunchTemplateName = &v + return s +} - // 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 `locationName:"dryRun" type:"boolean"` +// SetVersionNumber sets the VersionNumber field's value. +func (s *DeleteLaunchTemplateVersionsResponseSuccessItem) SetVersionNumber(v int64) *DeleteLaunchTemplateVersionsResponseSuccessItem { + s.VersionNumber = &v + return s +} + +type DeleteNatGatewayInput struct { + _ struct{} `type:"structure"` + + // The ID of the NAT gateway. + // + // NatGatewayId is a required field + NatGatewayId *string `type:"string" required:"true"` } // String returns the string representation -func (s DescribeAccountAttributesInput) String() string { +func (s DeleteNatGatewayInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeAccountAttributesInput) GoString() string { +func (s DeleteNatGatewayInput) GoString() string { return s.String() } -// SetAttributeNames sets the AttributeNames field's value. -func (s *DescribeAccountAttributesInput) SetAttributeNames(v []*string) *DescribeAccountAttributesInput { - s.AttributeNames = v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteNatGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteNatGatewayInput"} + if s.NatGatewayId == nil { + invalidParams.Add(request.NewErrParamRequired("NatGatewayId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetDryRun sets the DryRun field's value. -func (s *DescribeAccountAttributesInput) SetDryRun(v bool) *DescribeAccountAttributesInput { - s.DryRun = &v +// SetNatGatewayId sets the NatGatewayId field's value. +func (s *DeleteNatGatewayInput) SetNatGatewayId(v string) *DeleteNatGatewayInput { + s.NatGatewayId = &v return s } -// Contains the output of DescribeAccountAttributes. -type DescribeAccountAttributesOutput struct { +type DeleteNatGatewayOutput struct { _ struct{} `type:"structure"` - // Information about one or more account attributes. - AccountAttributes []*AccountAttribute `locationName:"accountAttributeSet" locationNameList:"item" type:"list"` + // The ID of the NAT gateway. + NatGatewayId *string `locationName:"natGatewayId" type:"string"` } // String returns the string representation -func (s DescribeAccountAttributesOutput) String() string { +func (s DeleteNatGatewayOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeAccountAttributesOutput) GoString() string { +func (s DeleteNatGatewayOutput) GoString() string { return s.String() } -// SetAccountAttributes sets the AccountAttributes field's value. -func (s *DescribeAccountAttributesOutput) SetAccountAttributes(v []*AccountAttribute) *DescribeAccountAttributesOutput { - s.AccountAttributes = v +// SetNatGatewayId sets the NatGatewayId field's value. +func (s *DeleteNatGatewayOutput) SetNatGatewayId(v string) *DeleteNatGatewayOutput { + s.NatGatewayId = &v return s } -// Contains the parameters for DescribeAddresses. -type DescribeAddressesInput struct { +type DeleteNetworkAclEntryInput struct { _ struct{} `type:"structure"` - // [EC2-VPC] One or more allocation IDs. - // - // Default: Describes all your Elastic IP addresses. - AllocationIds []*string `locationName:"AllocationId" locationNameList:"AllocationId" 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 `locationName:"dryRun" type:"boolean"` - // One or more filters. Filter names and values are case-sensitive. - // - // * allocation-id - [EC2-VPC] The allocation ID for the address. - // - // * association-id - [EC2-VPC] The association ID for the address. - // - // * domain - Indicates whether the address is for use in EC2-Classic (standard) - // or in a VPC (vpc). - // - // * instance-id - The ID of the instance the address is associated with, - // if any. - // - // * 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. + // Indicates whether the rule is an egress rule. // - // * private-ip-address - [EC2-VPC] The private IP address associated with - // the Elastic IP address. + // Egress is a required field + Egress *bool `locationName:"egress" type:"boolean" required:"true"` + + // The ID of the network ACL. // - // * public-ip - The Elastic IP address. + // NetworkAclId is a required field + NetworkAclId *string `locationName:"networkAclId" type:"string" required:"true"` + + // The rule number of the entry to delete. // - // * 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. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // [EC2-Classic] One or more Elastic IP addresses. - // - // Default: Describes all your Elastic IP addresses. - PublicIps []*string `locationName:"PublicIp" locationNameList:"PublicIp" type:"list"` + // RuleNumber is a required field + RuleNumber *int64 `locationName:"ruleNumber" type:"integer" required:"true"` } // String returns the string representation -func (s DescribeAddressesInput) String() string { +func (s DeleteNetworkAclEntryInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeAddressesInput) GoString() string { +func (s DeleteNetworkAclEntryInput) GoString() string { return s.String() } -// SetAllocationIds sets the AllocationIds field's value. -func (s *DescribeAddressesInput) SetAllocationIds(v []*string) *DescribeAddressesInput { - s.AllocationIds = v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteNetworkAclEntryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteNetworkAclEntryInput"} + if s.Egress == nil { + invalidParams.Add(request.NewErrParamRequired("Egress")) + } + if s.NetworkAclId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkAclId")) + } + if s.RuleNumber == nil { + invalidParams.Add(request.NewErrParamRequired("RuleNumber")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } // SetDryRun sets the DryRun field's value. -func (s *DescribeAddressesInput) SetDryRun(v bool) *DescribeAddressesInput { +func (s *DeleteNetworkAclEntryInput) SetDryRun(v bool) *DeleteNetworkAclEntryInput { s.DryRun = &v return s } -// SetFilters sets the Filters field's value. -func (s *DescribeAddressesInput) SetFilters(v []*Filter) *DescribeAddressesInput { - s.Filters = v +// SetEgress sets the Egress field's value. +func (s *DeleteNetworkAclEntryInput) SetEgress(v bool) *DeleteNetworkAclEntryInput { + s.Egress = &v return s } -// SetPublicIps sets the PublicIps field's value. -func (s *DescribeAddressesInput) SetPublicIps(v []*string) *DescribeAddressesInput { - s.PublicIps = v +// SetNetworkAclId sets the NetworkAclId field's value. +func (s *DeleteNetworkAclEntryInput) SetNetworkAclId(v string) *DeleteNetworkAclEntryInput { + s.NetworkAclId = &v return s } -// Contains the output of DescribeAddresses. -type DescribeAddressesOutput struct { - _ struct{} `type:"structure"` +// SetRuleNumber sets the RuleNumber field's value. +func (s *DeleteNetworkAclEntryInput) SetRuleNumber(v int64) *DeleteNetworkAclEntryInput { + s.RuleNumber = &v + return s +} - // Information about one or more Elastic IP addresses. - Addresses []*Address `locationName:"addressesSet" locationNameList:"item" type:"list"` +type DeleteNetworkAclEntryOutput struct { + _ struct{} `type:"structure"` } // String returns the string representation -func (s DescribeAddressesOutput) String() string { +func (s DeleteNetworkAclEntryOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeAddressesOutput) GoString() string { +func (s DeleteNetworkAclEntryOutput) GoString() string { return s.String() } -// SetAddresses sets the Addresses field's value. -func (s *DescribeAddressesOutput) SetAddresses(v []*Address) *DescribeAddressesOutput { - s.Addresses = v - return s -} - -type DescribeAggregateIdFormatInput struct { +type DeleteNetworkAclInput 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"` + DryRun *bool `locationName:"dryRun" type:"boolean"` + + // The ID of the network ACL. + // + // NetworkAclId is a required field + NetworkAclId *string `locationName:"networkAclId" type:"string" required:"true"` } // String returns the string representation -func (s DescribeAggregateIdFormatInput) String() string { +func (s DeleteNetworkAclInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeAggregateIdFormatInput) GoString() string { +func (s DeleteNetworkAclInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteNetworkAclInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteNetworkAclInput"} + if s.NetworkAclId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkAclId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetDryRun sets the DryRun field's value. -func (s *DescribeAggregateIdFormatInput) SetDryRun(v bool) *DescribeAggregateIdFormatInput { +func (s *DeleteNetworkAclInput) SetDryRun(v bool) *DeleteNetworkAclInput { s.DryRun = &v return s } -type DescribeAggregateIdFormatOutput struct { - _ struct{} `type:"structure"` - - // Information about each resource's ID format. - Statuses []*IdFormat `locationName:"statusSet" locationNameList:"item" type:"list"` +// SetNetworkAclId sets the NetworkAclId field's value. +func (s *DeleteNetworkAclInput) SetNetworkAclId(v string) *DeleteNetworkAclInput { + s.NetworkAclId = &v + return s +} - // Indicates whether all resource types in the region are configured to use - // longer IDs. This value is only true if all users are configured to use longer - // IDs for all resources types in the region. - UseLongIdsAggregated *bool `locationName:"useLongIdsAggregated" type:"boolean"` +type DeleteNetworkAclOutput struct { + _ struct{} `type:"structure"` } // String returns the string representation -func (s DescribeAggregateIdFormatOutput) String() string { +func (s DeleteNetworkAclOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeAggregateIdFormatOutput) GoString() string { +func (s DeleteNetworkAclOutput) GoString() string { return s.String() } -// SetStatuses sets the Statuses field's value. -func (s *DescribeAggregateIdFormatOutput) SetStatuses(v []*IdFormat) *DescribeAggregateIdFormatOutput { - s.Statuses = v - return s -} - -// SetUseLongIdsAggregated sets the UseLongIdsAggregated field's value. -func (s *DescribeAggregateIdFormatOutput) SetUseLongIdsAggregated(v bool) *DescribeAggregateIdFormatOutput { - s.UseLongIdsAggregated = &v - return s -} - -// Contains the parameters for DescribeAvailabilityZones. -type DescribeAvailabilityZonesInput struct { +// Contains the parameters for DeleteNetworkInterface. +type DeleteNetworkInterfaceInput struct { _ struct{} `type:"structure"` // Checks whether you have the required permissions for the action, without @@ -34345,170 +40381,147 @@ type DescribeAvailabilityZonesInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // One or more filters. - // - // * message - Information about the Availability Zone. - // - // * region-name - The name of the region for the Availability Zone (for - // example, us-east-1). - // - // * state - The state of the Availability Zone (available | information - // | impaired | unavailable). + // The ID of the network interface. // - // * zone-name - The name of the Availability Zone (for example, us-east-1a). - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The names of one or more Availability Zones. - ZoneNames []*string `locationName:"ZoneName" locationNameList:"ZoneName" type:"list"` + // NetworkInterfaceId is a required field + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"` } // String returns the string representation -func (s DescribeAvailabilityZonesInput) String() string { +func (s DeleteNetworkInterfaceInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeAvailabilityZonesInput) GoString() string { +func (s DeleteNetworkInterfaceInput) GoString() string { return s.String() } -// SetDryRun sets the DryRun field's value. -func (s *DescribeAvailabilityZonesInput) SetDryRun(v bool) *DescribeAvailabilityZonesInput { - s.DryRun = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteNetworkInterfaceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteNetworkInterfaceInput"} + if s.NetworkInterfaceId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetFilters sets the Filters field's value. -func (s *DescribeAvailabilityZonesInput) SetFilters(v []*Filter) *DescribeAvailabilityZonesInput { - s.Filters = v +// SetDryRun sets the DryRun field's value. +func (s *DeleteNetworkInterfaceInput) SetDryRun(v bool) *DeleteNetworkInterfaceInput { + s.DryRun = &v return s } -// SetZoneNames sets the ZoneNames field's value. -func (s *DescribeAvailabilityZonesInput) SetZoneNames(v []*string) *DescribeAvailabilityZonesInput { - s.ZoneNames = v +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *DeleteNetworkInterfaceInput) SetNetworkInterfaceId(v string) *DeleteNetworkInterfaceInput { + s.NetworkInterfaceId = &v return s } -// Contains the output of DescribeAvailabiltyZones. -type DescribeAvailabilityZonesOutput struct { +type DeleteNetworkInterfaceOutput struct { _ struct{} `type:"structure"` - - // Information about one or more Availability Zones. - AvailabilityZones []*AvailabilityZone `locationName:"availabilityZoneInfo" locationNameList:"item" type:"list"` } // String returns the string representation -func (s DescribeAvailabilityZonesOutput) String() string { +func (s DeleteNetworkInterfaceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeAvailabilityZonesOutput) GoString() string { +func (s DeleteNetworkInterfaceOutput) GoString() string { return s.String() } -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *DescribeAvailabilityZonesOutput) SetAvailabilityZones(v []*AvailabilityZone) *DescribeAvailabilityZonesOutput { - s.AvailabilityZones = v - return s -} - -// Contains the parameters for DescribeBundleTasks. -type DescribeBundleTasksInput struct { +// Contains the parameters for DeleteNetworkInterfacePermission. +type DeleteNetworkInterfacePermissionInput struct { _ struct{} `type:"structure"` - // One or more bundle task IDs. - // - // Default: Describes all your bundle tasks. - BundleIds []*string `locationName:"BundleId" locationNameList:"BundleId" 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 `locationName:"dryRun" type:"boolean"` + DryRun *bool `type:"boolean"` - // One or more filters. - // - // * bundle-id - The ID of the bundle task. - // - // * error-code - If the task failed, the error code returned. - // - // * error-message - If the task failed, the error message returned. - // - // * instance-id - The ID of the instance. - // - // * progress - The level of task completion, as a percentage (for example, - // 20%). - // - // * s3-bucket - The Amazon S3 bucket to store the AMI. - // - // * s3-prefix - The beginning of the AMI name. - // - // * start-time - The time the task started (for example, 2013-09-15T17:15:20.000Z). - // - // * state - The state of the task (pending | waiting-for-shutdown | bundling - // | storing | cancelling | complete | failed). + // Specify true to remove the permission even if the network interface is attached + // to an instance. + Force *bool `type:"boolean"` + + // The ID of the network interface permission. // - // * update-time - The time of the most recent update for the task. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + // NetworkInterfacePermissionId is a required field + NetworkInterfacePermissionId *string `type:"string" required:"true"` } // String returns the string representation -func (s DescribeBundleTasksInput) String() string { +func (s DeleteNetworkInterfacePermissionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeBundleTasksInput) GoString() string { +func (s DeleteNetworkInterfacePermissionInput) GoString() string { return s.String() } -// SetBundleIds sets the BundleIds field's value. -func (s *DescribeBundleTasksInput) SetBundleIds(v []*string) *DescribeBundleTasksInput { - s.BundleIds = v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteNetworkInterfacePermissionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteNetworkInterfacePermissionInput"} + if s.NetworkInterfacePermissionId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkInterfacePermissionId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } // SetDryRun sets the DryRun field's value. -func (s *DescribeBundleTasksInput) SetDryRun(v bool) *DescribeBundleTasksInput { +func (s *DeleteNetworkInterfacePermissionInput) SetDryRun(v bool) *DeleteNetworkInterfacePermissionInput { s.DryRun = &v return s } -// SetFilters sets the Filters field's value. -func (s *DescribeBundleTasksInput) SetFilters(v []*Filter) *DescribeBundleTasksInput { - s.Filters = v +// SetForce sets the Force field's value. +func (s *DeleteNetworkInterfacePermissionInput) SetForce(v bool) *DeleteNetworkInterfacePermissionInput { + s.Force = &v return s } -// Contains the output of DescribeBundleTasks. -type DescribeBundleTasksOutput struct { +// SetNetworkInterfacePermissionId sets the NetworkInterfacePermissionId field's value. +func (s *DeleteNetworkInterfacePermissionInput) SetNetworkInterfacePermissionId(v string) *DeleteNetworkInterfacePermissionInput { + s.NetworkInterfacePermissionId = &v + return s +} + +// Contains the output for DeleteNetworkInterfacePermission. +type DeleteNetworkInterfacePermissionOutput struct { _ struct{} `type:"structure"` - // Information about one or more bundle tasks. - BundleTasks []*BundleTask `locationName:"bundleInstanceTasksSet" locationNameList:"item" type:"list"` + // Returns true if the request succeeds, otherwise returns an error. + Return *bool `locationName:"return" type:"boolean"` } // String returns the string representation -func (s DescribeBundleTasksOutput) String() string { +func (s DeleteNetworkInterfacePermissionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeBundleTasksOutput) GoString() string { +func (s DeleteNetworkInterfacePermissionOutput) GoString() string { return s.String() } -// SetBundleTasks sets the BundleTasks field's value. -func (s *DescribeBundleTasksOutput) SetBundleTasks(v []*BundleTask) *DescribeBundleTasksOutput { - s.BundleTasks = v +// SetReturn sets the Return field's value. +func (s *DeleteNetworkInterfacePermissionOutput) SetReturn(v bool) *DeleteNetworkInterfacePermissionOutput { + s.Return = &v return s } -// Contains the parameters for DescribeClassicLinkInstances. -type DescribeClassicLinkInstancesInput struct { +type DeletePlacementGroupInput struct { _ struct{} `type:"structure"` // Checks whether you have the required permissions for the action, without @@ -34517,664 +40530,481 @@ type DescribeClassicLinkInstancesInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // One or more filters. - // - // * group-id - The ID of a VPC security group that's associated with the - // instance. - // - // * instance-id - The ID of the instance. - // - // * 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. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - // - // * vpc-id - The ID of the VPC to which the instance is linked. - // - // vpc-id - The ID of the VPC that the instance is linked to. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // One or more instance IDs. Must be instances linked to a VPC through ClassicLink. - InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list"` - - // The maximum number of results to return for the request in a single page. - // The remaining results of the initial request can be seen by sending another - // request with the returned NextToken value. This value can be between 5 and - // 1000. If MaxResults is given a value larger than 1000, only 1000 results - // are returned. You cannot specify this parameter and the instance IDs parameter - // in the same request. + // The name of the placement group. // - // Constraint: If the value is greater than 1000, we return only 1000 items. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The token to retrieve the next page of results. - NextToken *string `locationName:"nextToken" type:"string"` + // GroupName is a required field + GroupName *string `locationName:"groupName" type:"string" required:"true"` } // String returns the string representation -func (s DescribeClassicLinkInstancesInput) String() string { +func (s DeletePlacementGroupInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeClassicLinkInstancesInput) GoString() string { +func (s DeletePlacementGroupInput) GoString() string { return s.String() } -// SetDryRun sets the DryRun field's value. -func (s *DescribeClassicLinkInstancesInput) SetDryRun(v bool) *DescribeClassicLinkInstancesInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeClassicLinkInstancesInput) SetFilters(v []*Filter) *DescribeClassicLinkInstancesInput { - s.Filters = v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeletePlacementGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeletePlacementGroupInput"} + if s.GroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GroupName")) + } -// SetInstanceIds sets the InstanceIds field's value. -func (s *DescribeClassicLinkInstancesInput) SetInstanceIds(v []*string) *DescribeClassicLinkInstancesInput { - s.InstanceIds = v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeClassicLinkInstancesInput) SetMaxResults(v int64) *DescribeClassicLinkInstancesInput { - s.MaxResults = &v +// SetDryRun sets the DryRun field's value. +func (s *DeletePlacementGroupInput) SetDryRun(v bool) *DeletePlacementGroupInput { + s.DryRun = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeClassicLinkInstancesInput) SetNextToken(v string) *DescribeClassicLinkInstancesInput { - s.NextToken = &v +// SetGroupName sets the GroupName field's value. +func (s *DeletePlacementGroupInput) SetGroupName(v string) *DeletePlacementGroupInput { + s.GroupName = &v return s } -// Contains the output of DescribeClassicLinkInstances. -type DescribeClassicLinkInstancesOutput struct { +type DeletePlacementGroupOutput struct { _ struct{} `type:"structure"` - - // Information about one or more linked EC2-Classic instances. - Instances []*ClassicLinkInstance `locationName:"instancesSet" 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 DescribeClassicLinkInstancesOutput) String() string { +func (s DeletePlacementGroupOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeClassicLinkInstancesOutput) GoString() string { +func (s DeletePlacementGroupOutput) GoString() string { return s.String() } -// SetInstances sets the Instances field's value. -func (s *DescribeClassicLinkInstancesOutput) SetInstances(v []*ClassicLinkInstance) *DescribeClassicLinkInstancesOutput { - s.Instances = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeClassicLinkInstancesOutput) SetNextToken(v string) *DescribeClassicLinkInstancesOutput { - s.NextToken = &v - return s -} - -// Contains the parameters for DescribeConversionTasks. -type DescribeConversionTasksInput struct { +type DeleteRouteInput struct { _ struct{} `type:"structure"` - // One or more conversion task IDs. - ConversionTaskIds []*string `locationName:"conversionTaskId" locationNameList:"item" type:"list"` + // The IPv4 CIDR range for the route. The value you specify must match the CIDR + // for the route exactly. + DestinationCidrBlock *string `locationName:"destinationCidrBlock" type:"string"` + + // The IPv6 CIDR range for the route. The value you specify must match the CIDR + // for the route exactly. + DestinationIpv6CidrBlock *string `locationName:"destinationIpv6CidrBlock" 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 `locationName:"dryRun" type:"boolean"` + + // The ID of the route table. + // + // RouteTableId is a required field + RouteTableId *string `locationName:"routeTableId" type:"string" required:"true"` } // String returns the string representation -func (s DescribeConversionTasksInput) String() string { +func (s DeleteRouteInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeConversionTasksInput) GoString() string { +func (s DeleteRouteInput) GoString() string { return s.String() } -// SetConversionTaskIds sets the ConversionTaskIds field's value. -func (s *DescribeConversionTasksInput) SetConversionTaskIds(v []*string) *DescribeConversionTasksInput { - s.ConversionTaskIds = v +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteRouteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRouteInput"} + if s.RouteTableId == nil { + invalidParams.Add(request.NewErrParamRequired("RouteTableId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. +func (s *DeleteRouteInput) SetDestinationCidrBlock(v string) *DeleteRouteInput { + s.DestinationCidrBlock = &v + return s +} + +// SetDestinationIpv6CidrBlock sets the DestinationIpv6CidrBlock field's value. +func (s *DeleteRouteInput) SetDestinationIpv6CidrBlock(v string) *DeleteRouteInput { + s.DestinationIpv6CidrBlock = &v return s } // SetDryRun sets the DryRun field's value. -func (s *DescribeConversionTasksInput) SetDryRun(v bool) *DescribeConversionTasksInput { +func (s *DeleteRouteInput) SetDryRun(v bool) *DeleteRouteInput { s.DryRun = &v return s } -// Contains the output for DescribeConversionTasks. -type DescribeConversionTasksOutput struct { - _ struct{} `type:"structure"` +// SetRouteTableId sets the RouteTableId field's value. +func (s *DeleteRouteInput) SetRouteTableId(v string) *DeleteRouteInput { + s.RouteTableId = &v + return s +} - // Information about the conversion tasks. - ConversionTasks []*ConversionTask `locationName:"conversionTasks" locationNameList:"item" type:"list"` +type DeleteRouteOutput struct { + _ struct{} `type:"structure"` } // String returns the string representation -func (s DescribeConversionTasksOutput) String() string { +func (s DeleteRouteOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeConversionTasksOutput) GoString() string { +func (s DeleteRouteOutput) GoString() string { return s.String() } -// SetConversionTasks sets the ConversionTasks field's value. -func (s *DescribeConversionTasksOutput) SetConversionTasks(v []*ConversionTask) *DescribeConversionTasksOutput { - s.ConversionTasks = v - return s -} - -// Contains the parameters for DescribeCustomerGateways. -type DescribeCustomerGatewaysInput struct { +type DeleteRouteTableInput struct { _ struct{} `type:"structure"` - // One or more customer gateway IDs. - // - // Default: Describes all your customer gateways. - CustomerGatewayIds []*string `locationName:"CustomerGatewayId" locationNameList:"CustomerGatewayId" 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 `locationName:"dryRun" type:"boolean"` - // One or more filters. - // - // * bgp-asn - The customer gateway's Border Gateway Protocol (BGP) Autonomous - // System Number (ASN). - // - // * customer-gateway-id - The ID of the customer gateway. - // - // * ip-address - The IP address of the customer gateway's Internet-routable - // external interface. - // - // * state - The state of the customer gateway (pending | available | deleting - // | deleted). - // - // * type - The type of customer gateway. Currently, the only supported type - // is ipsec.1. - // - // * 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. + // The ID of the route table. // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + // RouteTableId is a required field + RouteTableId *string `locationName:"routeTableId" type:"string" required:"true"` } // String returns the string representation -func (s DescribeCustomerGatewaysInput) String() string { +func (s DeleteRouteTableInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeCustomerGatewaysInput) GoString() string { +func (s DeleteRouteTableInput) GoString() string { return s.String() } -// SetCustomerGatewayIds sets the CustomerGatewayIds field's value. -func (s *DescribeCustomerGatewaysInput) SetCustomerGatewayIds(v []*string) *DescribeCustomerGatewaysInput { - s.CustomerGatewayIds = v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteRouteTableInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRouteTableInput"} + if s.RouteTableId == nil { + invalidParams.Add(request.NewErrParamRequired("RouteTableId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } // SetDryRun sets the DryRun field's value. -func (s *DescribeCustomerGatewaysInput) SetDryRun(v bool) *DescribeCustomerGatewaysInput { +func (s *DeleteRouteTableInput) SetDryRun(v bool) *DeleteRouteTableInput { s.DryRun = &v return s } -// SetFilters sets the Filters field's value. -func (s *DescribeCustomerGatewaysInput) SetFilters(v []*Filter) *DescribeCustomerGatewaysInput { - s.Filters = v +// SetRouteTableId sets the RouteTableId field's value. +func (s *DeleteRouteTableInput) SetRouteTableId(v string) *DeleteRouteTableInput { + s.RouteTableId = &v return s } -// Contains the output of DescribeCustomerGateways. -type DescribeCustomerGatewaysOutput struct { +type DeleteRouteTableOutput struct { _ struct{} `type:"structure"` - - // Information about one or more customer gateways. - CustomerGateways []*CustomerGateway `locationName:"customerGatewaySet" locationNameList:"item" type:"list"` } // String returns the string representation -func (s DescribeCustomerGatewaysOutput) String() string { +func (s DeleteRouteTableOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeCustomerGatewaysOutput) GoString() string { +func (s DeleteRouteTableOutput) GoString() string { return s.String() } -// SetCustomerGateways sets the CustomerGateways field's value. -func (s *DescribeCustomerGatewaysOutput) SetCustomerGateways(v []*CustomerGateway) *DescribeCustomerGatewaysOutput { - s.CustomerGateways = v - return s -} - -// Contains the parameters for DescribeDhcpOptions. -type DescribeDhcpOptionsInput struct { +type DeleteSecurityGroupInput struct { _ struct{} `type:"structure"` - // The IDs of one or more DHCP options sets. - // - // Default: Describes all your DHCP options sets. - DhcpOptionsIds []*string `locationName:"DhcpOptionsId" locationNameList:"DhcpOptionsId" 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 `locationName:"dryRun" type:"boolean"` - // One or more filters. - // - // * dhcp-options-id - The ID of a set of DHCP options. - // - // * key - The key for one of the options (for example, domain-name). - // - // * value - The value for one of the options. - // - // * 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. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + // The ID of the security group. Required for a nondefault VPC. + GroupId *string `type:"string"` + + // [EC2-Classic, default VPC] The name of the security group. You can specify + // either the security group name or the security group ID. + GroupName *string `type:"string"` } // String returns the string representation -func (s DescribeDhcpOptionsInput) String() string { +func (s DeleteSecurityGroupInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeDhcpOptionsInput) GoString() string { +func (s DeleteSecurityGroupInput) GoString() string { return s.String() } -// SetDhcpOptionsIds sets the DhcpOptionsIds field's value. -func (s *DescribeDhcpOptionsInput) SetDhcpOptionsIds(v []*string) *DescribeDhcpOptionsInput { - s.DhcpOptionsIds = v +// SetDryRun sets the DryRun field's value. +func (s *DeleteSecurityGroupInput) SetDryRun(v bool) *DeleteSecurityGroupInput { + s.DryRun = &v return s } -// SetDryRun sets the DryRun field's value. -func (s *DescribeDhcpOptionsInput) SetDryRun(v bool) *DescribeDhcpOptionsInput { - s.DryRun = &v +// SetGroupId sets the GroupId field's value. +func (s *DeleteSecurityGroupInput) SetGroupId(v string) *DeleteSecurityGroupInput { + s.GroupId = &v return s } -// SetFilters sets the Filters field's value. -func (s *DescribeDhcpOptionsInput) SetFilters(v []*Filter) *DescribeDhcpOptionsInput { - s.Filters = v +// SetGroupName sets the GroupName field's value. +func (s *DeleteSecurityGroupInput) SetGroupName(v string) *DeleteSecurityGroupInput { + s.GroupName = &v return s } -// Contains the output of DescribeDhcpOptions. -type DescribeDhcpOptionsOutput struct { +type DeleteSecurityGroupOutput struct { _ struct{} `type:"structure"` - - // Information about one or more DHCP options sets. - DhcpOptions []*DhcpOptions `locationName:"dhcpOptionsSet" locationNameList:"item" type:"list"` } // String returns the string representation -func (s DescribeDhcpOptionsOutput) String() string { +func (s DeleteSecurityGroupOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeDhcpOptionsOutput) GoString() string { +func (s DeleteSecurityGroupOutput) GoString() string { return s.String() } -// SetDhcpOptions sets the DhcpOptions field's value. -func (s *DescribeDhcpOptionsOutput) SetDhcpOptions(v []*DhcpOptions) *DescribeDhcpOptionsOutput { - s.DhcpOptions = v - return s -} - -type DescribeEgressOnlyInternetGatewaysInput struct { +// Contains the parameters for DeleteSnapshot. +type DeleteSnapshotInput 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 egress-only internet gateway IDs. - EgressOnlyInternetGatewayIds []*string `locationName:"EgressOnlyInternetGatewayId" locationNameList:"item" type:"list"` - - // The maximum number of results to return for the request in a single page. - // The remaining results can be seen by sending another request with the returned - // NextToken value. This value can be between 5 and 1000. If MaxResults is given - // a value larger than 1000, only 1000 results are returned. - MaxResults *int64 `type:"integer"` + DryRun *bool `locationName:"dryRun" type:"boolean"` - // The token to retrieve the next page of results. - NextToken *string `type:"string"` + // The ID of the EBS snapshot. + // + // SnapshotId is a required field + SnapshotId *string `type:"string" required:"true"` } // String returns the string representation -func (s DescribeEgressOnlyInternetGatewaysInput) String() string { +func (s DeleteSnapshotInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeEgressOnlyInternetGatewaysInput) GoString() string { +func (s DeleteSnapshotInput) GoString() string { return s.String() } -// SetDryRun sets the DryRun field's value. -func (s *DescribeEgressOnlyInternetGatewaysInput) SetDryRun(v bool) *DescribeEgressOnlyInternetGatewaysInput { - s.DryRun = &v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSnapshotInput"} + if s.SnapshotId == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotId")) + } -// SetEgressOnlyInternetGatewayIds sets the EgressOnlyInternetGatewayIds field's value. -func (s *DescribeEgressOnlyInternetGatewaysInput) SetEgressOnlyInternetGatewayIds(v []*string) *DescribeEgressOnlyInternetGatewaysInput { - s.EgressOnlyInternetGatewayIds = v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeEgressOnlyInternetGatewaysInput) SetMaxResults(v int64) *DescribeEgressOnlyInternetGatewaysInput { - s.MaxResults = &v +// SetDryRun sets the DryRun field's value. +func (s *DeleteSnapshotInput) SetDryRun(v bool) *DeleteSnapshotInput { + s.DryRun = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeEgressOnlyInternetGatewaysInput) SetNextToken(v string) *DescribeEgressOnlyInternetGatewaysInput { - s.NextToken = &v +// SetSnapshotId sets the SnapshotId field's value. +func (s *DeleteSnapshotInput) SetSnapshotId(v string) *DeleteSnapshotInput { + s.SnapshotId = &v return s } -type DescribeEgressOnlyInternetGatewaysOutput struct { +type DeleteSnapshotOutput struct { _ struct{} `type:"structure"` - - // Information about the egress-only internet gateways. - EgressOnlyInternetGateways []*EgressOnlyInternetGateway `locationName:"egressOnlyInternetGatewaySet" locationNameList:"item" type:"list"` - - // The token to use to retrieve the next page of results. - NextToken *string `locationName:"nextToken" type:"string"` } // String returns the string representation -func (s DescribeEgressOnlyInternetGatewaysOutput) String() string { +func (s DeleteSnapshotOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeEgressOnlyInternetGatewaysOutput) GoString() string { +func (s DeleteSnapshotOutput) GoString() string { return s.String() } -// SetEgressOnlyInternetGateways sets the EgressOnlyInternetGateways field's value. -func (s *DescribeEgressOnlyInternetGatewaysOutput) SetEgressOnlyInternetGateways(v []*EgressOnlyInternetGateway) *DescribeEgressOnlyInternetGatewaysOutput { - s.EgressOnlyInternetGateways = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeEgressOnlyInternetGatewaysOutput) SetNextToken(v string) *DescribeEgressOnlyInternetGatewaysOutput { - s.NextToken = &v - return s -} - -type DescribeElasticGpusInput struct { +// Contains the parameters for DeleteSpotDatafeedSubscription. +type DeleteSpotDatafeedSubscriptionInput 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 Elastic GPU IDs. - ElasticGpuIds []*string `locationName:"ElasticGpuId" locationNameList:"item" type:"list"` - - // One or more filters. - // - // * availability-zone - The Availability Zone in which the Elastic GPU resides. - // - // * elastic-gpu-health - The status of the Elastic GPU (OK | IMPAIRED). - // - // * elastic-gpu-state - The state of the Elastic GPU (ATTACHED). - // - // * elastic-gpu-type - The type of Elastic GPU; for example, eg1.medium. - // - // * instance-id - The ID of the instance to which the Elastic GPU is associated. - 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 call with the returned NextToken value. This - // value can be between 5 and 1000. - MaxResults *int64 `type:"integer"` - - // The token to request the next page of results. - NextToken *string `type:"string"` + DryRun *bool `locationName:"dryRun" type:"boolean"` } // String returns the string representation -func (s DescribeElasticGpusInput) String() string { +func (s DeleteSpotDatafeedSubscriptionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeElasticGpusInput) GoString() string { +func (s DeleteSpotDatafeedSubscriptionInput) GoString() string { return s.String() } // SetDryRun sets the DryRun field's value. -func (s *DescribeElasticGpusInput) SetDryRun(v bool) *DescribeElasticGpusInput { +func (s *DeleteSpotDatafeedSubscriptionInput) SetDryRun(v bool) *DeleteSpotDatafeedSubscriptionInput { s.DryRun = &v return s } -// SetElasticGpuIds sets the ElasticGpuIds field's value. -func (s *DescribeElasticGpusInput) SetElasticGpuIds(v []*string) *DescribeElasticGpusInput { - s.ElasticGpuIds = v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeElasticGpusInput) SetFilters(v []*Filter) *DescribeElasticGpusInput { - s.Filters = v - return s +type DeleteSpotDatafeedSubscriptionOutput struct { + _ struct{} `type:"structure"` } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeElasticGpusInput) SetMaxResults(v int64) *DescribeElasticGpusInput { - s.MaxResults = &v - return s +// String returns the string representation +func (s DeleteSpotDatafeedSubscriptionOutput) String() string { + return awsutil.Prettify(s) } -// SetNextToken sets the NextToken field's value. -func (s *DescribeElasticGpusInput) SetNextToken(v string) *DescribeElasticGpusInput { - s.NextToken = &v - return s +// GoString returns the string representation +func (s DeleteSpotDatafeedSubscriptionOutput) GoString() string { + return s.String() } -type DescribeElasticGpusOutput struct { +type DeleteSubnetInput struct { _ struct{} `type:"structure"` - // Information about the Elastic GPUs. - ElasticGpuSet []*ElasticGpus `locationName:"elasticGpuSet" locationNameList:"item" type:"list"` - - // The total number of items to return. If the total number of items available - // is more than the value specified in max-items then a Next-Token will be provided - // in the output that you can use to resume pagination. - MaxResults *int64 `locationName:"maxResults" 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 `locationName:"dryRun" type:"boolean"` - // 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 ID of the subnet. + // + // SubnetId is a required field + SubnetId *string `type:"string" required:"true"` } // String returns the string representation -func (s DescribeElasticGpusOutput) String() string { +func (s DeleteSubnetInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeElasticGpusOutput) GoString() string { +func (s DeleteSubnetInput) GoString() string { return s.String() } -// SetElasticGpuSet sets the ElasticGpuSet field's value. -func (s *DescribeElasticGpusOutput) SetElasticGpuSet(v []*ElasticGpus) *DescribeElasticGpusOutput { - s.ElasticGpuSet = v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteSubnetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSubnetInput"} + if s.SubnetId == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetId")) + } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeElasticGpusOutput) SetMaxResults(v int64) *DescribeElasticGpusOutput { - s.MaxResults = &v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetNextToken sets the NextToken field's value. -func (s *DescribeElasticGpusOutput) SetNextToken(v string) *DescribeElasticGpusOutput { - s.NextToken = &v +// SetDryRun sets the DryRun field's value. +func (s *DeleteSubnetInput) SetDryRun(v bool) *DeleteSubnetInput { + s.DryRun = &v return s } -// Contains the parameters for DescribeExportTasks. -type DescribeExportTasksInput struct { - _ struct{} `type:"structure"` - - // One or more export task IDs. - ExportTaskIds []*string `locationName:"exportTaskId" locationNameList:"ExportTaskId" type:"list"` -} - -// String returns the string representation -func (s DescribeExportTasksInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeExportTasksInput) GoString() string { - return s.String() -} - -// SetExportTaskIds sets the ExportTaskIds field's value. -func (s *DescribeExportTasksInput) SetExportTaskIds(v []*string) *DescribeExportTasksInput { - s.ExportTaskIds = v +// SetSubnetId sets the SubnetId field's value. +func (s *DeleteSubnetInput) SetSubnetId(v string) *DeleteSubnetInput { + s.SubnetId = &v return s } -// Contains the output for DescribeExportTasks. -type DescribeExportTasksOutput struct { +type DeleteSubnetOutput struct { _ struct{} `type:"structure"` - - // Information about the export tasks. - ExportTasks []*ExportTask `locationName:"exportTaskSet" locationNameList:"item" type:"list"` } // String returns the string representation -func (s DescribeExportTasksOutput) String() string { +func (s DeleteSubnetOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeExportTasksOutput) GoString() string { +func (s DeleteSubnetOutput) GoString() string { return s.String() } -// SetExportTasks sets the ExportTasks field's value. -func (s *DescribeExportTasksOutput) SetExportTasks(v []*ExportTask) *DescribeExportTasksOutput { - s.ExportTasks = v - return s -} - -type DescribeFleetHistoryInput struct { +type DeleteTagsInput 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 type of events to describe. By default, all events are described. - EventType *string `type:"string" enum:"FleetEventType"` + DryRun *bool `locationName:"dryRun" type:"boolean"` - // The ID of the EC2 Fleet. + // The IDs of one or more resources, separated by spaces. // - // FleetId is a required field - FleetId *string `type:"string" required:"true"` - - // The maximum number of results to return in a single call. Specify a value - // between 1 and 1000. The default value is 1000. To retrieve the remaining - // results, make another call with the returned NextToken value. - MaxResults *int64 `type:"integer"` - - // The token for the next set of results. - NextToken *string `type:"string"` + // Constraints: Up to 1000 resource IDs. We recommend breaking up this request + // into smaller batches. + // + // Resources is a required field + Resources []*string `locationName:"resourceId" type:"list" required:"true"` - // The start date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + // One or more tags to delete. Specify a tag key and an optional tag value to + // delete specific tags. If you specify a tag key without a tag value, we delete + // any tag with this key regardless of its value. If you specify a tag key with + // an empty string as the tag value, we delete the tag only if its value is + // an empty string. // - // StartTime is a required field - StartTime *time.Time `type:"timestamp" required:"true"` + // 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). + Tags []*Tag `locationName:"tag" locationNameList:"item" type:"list"` } // String returns the string representation -func (s DescribeFleetHistoryInput) String() string { +func (s DeleteTagsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeFleetHistoryInput) GoString() string { +func (s DeleteTagsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeFleetHistoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeFleetHistoryInput"} - if s.FleetId == nil { - invalidParams.Add(request.NewErrParamRequired("FleetId")) - } - if s.StartTime == nil { - invalidParams.Add(request.NewErrParamRequired("StartTime")) +func (s *DeleteTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTagsInput"} + if s.Resources == nil { + invalidParams.Add(request.NewErrParamRequired("Resources")) } if invalidParams.Len() > 0 { @@ -35184,146 +41014,148 @@ func (s *DescribeFleetHistoryInput) Validate() error { } // SetDryRun sets the DryRun field's value. -func (s *DescribeFleetHistoryInput) SetDryRun(v bool) *DescribeFleetHistoryInput { +func (s *DeleteTagsInput) SetDryRun(v bool) *DeleteTagsInput { s.DryRun = &v return s } -// SetEventType sets the EventType field's value. -func (s *DescribeFleetHistoryInput) SetEventType(v string) *DescribeFleetHistoryInput { - s.EventType = &v +// SetResources sets the Resources field's value. +func (s *DeleteTagsInput) SetResources(v []*string) *DeleteTagsInput { + s.Resources = v return s } -// SetFleetId sets the FleetId field's value. -func (s *DescribeFleetHistoryInput) SetFleetId(v string) *DescribeFleetHistoryInput { - s.FleetId = &v +// SetTags sets the Tags field's value. +func (s *DeleteTagsInput) SetTags(v []*Tag) *DeleteTagsInput { + s.Tags = v return s } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeFleetHistoryInput) SetMaxResults(v int64) *DescribeFleetHistoryInput { - s.MaxResults = &v - return s +type DeleteTagsOutput struct { + _ struct{} `type:"structure"` } -// SetNextToken sets the NextToken field's value. -func (s *DescribeFleetHistoryInput) SetNextToken(v string) *DescribeFleetHistoryInput { - s.NextToken = &v - return s +// String returns the string representation +func (s DeleteTagsOutput) String() string { + return awsutil.Prettify(s) } -// SetStartTime sets the StartTime field's value. -func (s *DescribeFleetHistoryInput) SetStartTime(v time.Time) *DescribeFleetHistoryInput { - s.StartTime = &v - return s +// GoString returns the string representation +func (s DeleteTagsOutput) GoString() string { + return s.String() } -type DescribeFleetHistoryOutput struct { +type DeleteTransitGatewayInput struct { _ struct{} `type:"structure"` - // The ID of the EC Fleet. - FleetId *string `locationName:"fleetId" type:"string"` - - // Information about the events in the history of the EC2 Fleet. - HistoryRecords []*HistoryRecordEntry `locationName:"historyRecordSet" 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"` - // The last date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - // All records up to this time were retrieved. + // The ID of the transit gateway. // - // If nextToken indicates that there are more results, this value is not present. - LastEvaluatedTime *time.Time `locationName:"lastEvaluatedTime" type:"timestamp"` - - // The token for the next set of results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The start date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - StartTime *time.Time `locationName:"startTime" type:"timestamp"` + // TransitGatewayId is a required field + TransitGatewayId *string `type:"string" required:"true"` } // String returns the string representation -func (s DescribeFleetHistoryOutput) String() string { +func (s DeleteTransitGatewayInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeFleetHistoryOutput) GoString() string { +func (s DeleteTransitGatewayInput) GoString() string { return s.String() } -// SetFleetId sets the FleetId field's value. -func (s *DescribeFleetHistoryOutput) SetFleetId(v string) *DescribeFleetHistoryOutput { - s.FleetId = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTransitGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTransitGatewayInput"} + if s.TransitGatewayId == nil { + invalidParams.Add(request.NewErrParamRequired("TransitGatewayId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetHistoryRecords sets the HistoryRecords field's value. -func (s *DescribeFleetHistoryOutput) SetHistoryRecords(v []*HistoryRecordEntry) *DescribeFleetHistoryOutput { - s.HistoryRecords = v +// SetDryRun sets the DryRun field's value. +func (s *DeleteTransitGatewayInput) SetDryRun(v bool) *DeleteTransitGatewayInput { + s.DryRun = &v return s } -// SetLastEvaluatedTime sets the LastEvaluatedTime field's value. -func (s *DescribeFleetHistoryOutput) SetLastEvaluatedTime(v time.Time) *DescribeFleetHistoryOutput { - s.LastEvaluatedTime = &v +// SetTransitGatewayId sets the TransitGatewayId field's value. +func (s *DeleteTransitGatewayInput) SetTransitGatewayId(v string) *DeleteTransitGatewayInput { + s.TransitGatewayId = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeFleetHistoryOutput) SetNextToken(v string) *DescribeFleetHistoryOutput { - s.NextToken = &v - return s +type DeleteTransitGatewayOutput struct { + _ struct{} `type:"structure"` + + // Information about the deleted transit gateway. + TransitGateway *TransitGateway `locationName:"transitGateway" type:"structure"` } -// SetStartTime sets the StartTime field's value. -func (s *DescribeFleetHistoryOutput) SetStartTime(v time.Time) *DescribeFleetHistoryOutput { - s.StartTime = &v +// String returns the string representation +func (s DeleteTransitGatewayOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTransitGatewayOutput) GoString() string { + return s.String() +} + +// SetTransitGateway sets the TransitGateway field's value. +func (s *DeleteTransitGatewayOutput) SetTransitGateway(v *TransitGateway) *DeleteTransitGatewayOutput { + s.TransitGateway = v return s } -type DescribeFleetInstancesInput struct { +type DeleteTransitGatewayRouteInput struct { _ struct{} `type:"structure"` + // The CIDR range for the route. This must match the CIDR for the route exactly. + // + // DestinationCidrBlock is a required field + DestinationCidrBlock *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"` - // One or more filters. - // - // * instance-type - The instance type. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The ID of the EC2 Fleet. + // The ID of the transit gateway route table. // - // FleetId is a required field - FleetId *string `type:"string" required:"true"` - - // The maximum number of results to return in a single call. Specify a value - // between 1 and 1000. The default value is 1000. To retrieve the remaining - // results, make another call with the returned NextToken value. - MaxResults *int64 `type:"integer"` - - // The token for the next set of results. - NextToken *string `type:"string"` + // TransitGatewayRouteTableId is a required field + TransitGatewayRouteTableId *string `type:"string" required:"true"` } // String returns the string representation -func (s DescribeFleetInstancesInput) String() string { +func (s DeleteTransitGatewayRouteInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeFleetInstancesInput) GoString() string { +func (s DeleteTransitGatewayRouteInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeFleetInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeFleetInstancesInput"} - if s.FleetId == nil { - invalidParams.Add(request.NewErrParamRequired("FleetId")) +func (s *DeleteTransitGatewayRouteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTransitGatewayRouteInput"} + if s.DestinationCidrBlock == nil { + invalidParams.Add(request.NewErrParamRequired("DestinationCidrBlock")) + } + if s.TransitGatewayRouteTableId == nil { + invalidParams.Add(request.NewErrParamRequired("TransitGatewayRouteTableId")) } if invalidParams.Len() > 0 { @@ -35332,79 +41164,48 @@ func (s *DescribeFleetInstancesInput) Validate() error { return nil } -// SetDryRun sets the DryRun field's value. -func (s *DescribeFleetInstancesInput) SetDryRun(v bool) *DescribeFleetInstancesInput { - s.DryRun = &v +// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. +func (s *DeleteTransitGatewayRouteInput) SetDestinationCidrBlock(v string) *DeleteTransitGatewayRouteInput { + s.DestinationCidrBlock = &v return s } -// SetFilters sets the Filters field's value. -func (s *DescribeFleetInstancesInput) SetFilters(v []*Filter) *DescribeFleetInstancesInput { - s.Filters = v +// SetDryRun sets the DryRun field's value. +func (s *DeleteTransitGatewayRouteInput) SetDryRun(v bool) *DeleteTransitGatewayRouteInput { + s.DryRun = &v return s } -// SetFleetId sets the FleetId field's value. -func (s *DescribeFleetInstancesInput) SetFleetId(v string) *DescribeFleetInstancesInput { - s.FleetId = &v +// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. +func (s *DeleteTransitGatewayRouteInput) SetTransitGatewayRouteTableId(v string) *DeleteTransitGatewayRouteInput { + s.TransitGatewayRouteTableId = &v return s } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeFleetInstancesInput) SetMaxResults(v int64) *DescribeFleetInstancesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeFleetInstancesInput) SetNextToken(v string) *DescribeFleetInstancesInput { - s.NextToken = &v - return s -} - -type DescribeFleetInstancesOutput struct { +type DeleteTransitGatewayRouteOutput struct { _ struct{} `type:"structure"` - // The running instances. This list is refreshed periodically and might be out - // of date. - ActiveInstances []*ActiveInstance `locationName:"activeInstanceSet" locationNameList:"item" type:"list"` - - // The ID of the EC2 Fleet. - FleetId *string `locationName:"fleetId" type:"string"` - - // The token for the next set of results. - NextToken *string `locationName:"nextToken" type:"string"` + // Information about the route. + Route *TransitGatewayRoute `locationName:"route" type:"structure"` } // String returns the string representation -func (s DescribeFleetInstancesOutput) String() string { +func (s DeleteTransitGatewayRouteOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeFleetInstancesOutput) GoString() string { +func (s DeleteTransitGatewayRouteOutput) GoString() string { return s.String() } -// SetActiveInstances sets the ActiveInstances field's value. -func (s *DescribeFleetInstancesOutput) SetActiveInstances(v []*ActiveInstance) *DescribeFleetInstancesOutput { - s.ActiveInstances = v - return s -} - -// SetFleetId sets the FleetId field's value. -func (s *DescribeFleetInstancesOutput) SetFleetId(v string) *DescribeFleetInstancesOutput { - s.FleetId = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeFleetInstancesOutput) SetNextToken(v string) *DescribeFleetInstancesOutput { - s.NextToken = &v +// SetRoute sets the Route field's value. +func (s *DeleteTransitGatewayRouteOutput) SetRoute(v *TransitGatewayRoute) *DeleteTransitGatewayRouteOutput { + s.Route = v return s } -type DescribeFleetsInput struct { +type DeleteTransitGatewayRouteTableInput struct { _ struct{} `type:"structure"` // Checks whether you have the required permissions for the action, without @@ -35413,110 +41214,71 @@ type DescribeFleetsInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // One or more filters. - // - // * activity-status - The progress of the EC2 Fleet ( error | pending-fulfillment - // | pending-termination | fulfilled). - // - // * excess-capacity-termination-policy - Indicates whether to terminate - // running instances if the target capacity is decreased below the current - // EC2 Fleet size (true | false). + // The ID of the transit gateway route table. // - // * fleet-state - The state of the EC2 Fleet (submitted | active | deleted - // | failed | deleted-running | deleted-terminating | modifying). - // - // * replace-unhealthy-instances - Indicates whether EC2 Fleet should replace - // unhealthy instances (true | false). - // - // * type - The type of request (request | maintain). - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The ID of the EC2 Fleets. - FleetIds []*string `locationName:"FleetId" type:"list"` - - // The maximum number of results to return in a single call. Specify a value - // between 1 and 1000. The default value is 1000. To retrieve the remaining - // results, make another call with the returned NextToken value. - MaxResults *int64 `type:"integer"` - - // The token for the next set of results. - NextToken *string `type:"string"` + // TransitGatewayRouteTableId is a required field + TransitGatewayRouteTableId *string `type:"string" required:"true"` } // String returns the string representation -func (s DescribeFleetsInput) String() string { +func (s DeleteTransitGatewayRouteTableInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeFleetsInput) GoString() string { +func (s DeleteTransitGatewayRouteTableInput) GoString() string { return s.String() } -// SetDryRun sets the DryRun field's value. -func (s *DescribeFleetsInput) SetDryRun(v bool) *DescribeFleetsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeFleetsInput) SetFilters(v []*Filter) *DescribeFleetsInput { - s.Filters = v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTransitGatewayRouteTableInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTransitGatewayRouteTableInput"} + if s.TransitGatewayRouteTableId == nil { + invalidParams.Add(request.NewErrParamRequired("TransitGatewayRouteTableId")) + } -// SetFleetIds sets the FleetIds field's value. -func (s *DescribeFleetsInput) SetFleetIds(v []*string) *DescribeFleetsInput { - s.FleetIds = v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeFleetsInput) SetMaxResults(v int64) *DescribeFleetsInput { - s.MaxResults = &v +// SetDryRun sets the DryRun field's value. +func (s *DeleteTransitGatewayRouteTableInput) SetDryRun(v bool) *DeleteTransitGatewayRouteTableInput { + s.DryRun = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeFleetsInput) SetNextToken(v string) *DescribeFleetsInput { - s.NextToken = &v +// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. +func (s *DeleteTransitGatewayRouteTableInput) SetTransitGatewayRouteTableId(v string) *DeleteTransitGatewayRouteTableInput { + s.TransitGatewayRouteTableId = &v return s } -type DescribeFleetsOutput struct { +type DeleteTransitGatewayRouteTableOutput struct { _ struct{} `type:"structure"` - // Information about the EC2 Fleets. - Fleets []*FleetData `locationName:"fleetSet" locationNameList:"item" type:"list"` - - // The token for the next set of results. - NextToken *string `locationName:"nextToken" type:"string"` + // Information about the deleted transit gateway route table. + TransitGatewayRouteTable *TransitGatewayRouteTable `locationName:"transitGatewayRouteTable" type:"structure"` } // String returns the string representation -func (s DescribeFleetsOutput) String() string { +func (s DeleteTransitGatewayRouteTableOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeFleetsOutput) GoString() string { +func (s DeleteTransitGatewayRouteTableOutput) GoString() string { return s.String() } -// SetFleets sets the Fleets field's value. -func (s *DescribeFleetsOutput) SetFleets(v []*FleetData) *DescribeFleetsOutput { - s.Fleets = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeFleetsOutput) SetNextToken(v string) *DescribeFleetsOutput { - s.NextToken = &v +// SetTransitGatewayRouteTable sets the TransitGatewayRouteTable field's value. +func (s *DeleteTransitGatewayRouteTableOutput) SetTransitGatewayRouteTable(v *TransitGatewayRouteTable) *DeleteTransitGatewayRouteTableOutput { + s.TransitGatewayRouteTable = v return s } -// Contains the parameters for DescribeFlowLogs. -type DescribeFlowLogsInput struct { +type DeleteTransitGatewayVpcAttachmentInput struct { _ struct{} `type:"structure"` // Checks whether you have the required permissions for the action, without @@ -35525,149 +41287,165 @@ type DescribeFlowLogsInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // One or more filters. - // - // * deliver-log-status - The status of the logs delivery (SUCCESS | FAILED). - // - // * log-destination-type - The type of destination to which the flow log - // publishes data. Possible destination types include cloud-watch-logs and - // S3. - // - // * flow-log-id - The ID of the flow log. - // - // * log-group-name - The name of the log group. - // - // * resource-id - The ID of the VPC, subnet, or network interface. + // The ID of the attachment. // - // * traffic-type - The type of traffic (ACCEPT | REJECT | ALL). - Filter []*Filter `locationNameList:"Filter" type:"list"` - - // One or more flow log IDs. - FlowLogIds []*string `locationName:"FlowLogId" locationNameList:"item" type:"list"` - - // The maximum number of results to return for the request in a single page. - // The remaining results can be seen by sending another request with the returned - // NextToken value. This value can be between 5 and 1000. If MaxResults is given - // a value larger than 1000, only 1000 results are returned. You cannot specify - // this parameter and the flow log IDs parameter in the same request. - MaxResults *int64 `type:"integer"` - - // The token to retrieve the next page of results. - NextToken *string `type:"string"` + // TransitGatewayAttachmentId is a required field + TransitGatewayAttachmentId *string `type:"string" required:"true"` } // String returns the string representation -func (s DescribeFlowLogsInput) String() string { +func (s DeleteTransitGatewayVpcAttachmentInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeFlowLogsInput) GoString() string { +func (s DeleteTransitGatewayVpcAttachmentInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTransitGatewayVpcAttachmentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTransitGatewayVpcAttachmentInput"} + 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 *DescribeFlowLogsInput) SetDryRun(v bool) *DescribeFlowLogsInput { +func (s *DeleteTransitGatewayVpcAttachmentInput) SetDryRun(v bool) *DeleteTransitGatewayVpcAttachmentInput { s.DryRun = &v return s } -// SetFilter sets the Filter field's value. -func (s *DescribeFlowLogsInput) SetFilter(v []*Filter) *DescribeFlowLogsInput { - s.Filter = v +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *DeleteTransitGatewayVpcAttachmentInput) SetTransitGatewayAttachmentId(v string) *DeleteTransitGatewayVpcAttachmentInput { + s.TransitGatewayAttachmentId = &v return s } -// SetFlowLogIds sets the FlowLogIds field's value. -func (s *DescribeFlowLogsInput) SetFlowLogIds(v []*string) *DescribeFlowLogsInput { - s.FlowLogIds = v - return s +type DeleteTransitGatewayVpcAttachmentOutput struct { + _ struct{} `type:"structure"` + + // Information about the deleted VPC attachment. + TransitGatewayVpcAttachment *TransitGatewayVpcAttachment `locationName:"transitGatewayVpcAttachment" type:"structure"` } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeFlowLogsInput) SetMaxResults(v int64) *DescribeFlowLogsInput { - s.MaxResults = &v - return s +// String returns the string representation +func (s DeleteTransitGatewayVpcAttachmentOutput) String() string { + return awsutil.Prettify(s) } -// SetNextToken sets the NextToken field's value. -func (s *DescribeFlowLogsInput) SetNextToken(v string) *DescribeFlowLogsInput { - s.NextToken = &v +// GoString returns the string representation +func (s DeleteTransitGatewayVpcAttachmentOutput) GoString() string { + return s.String() +} + +// SetTransitGatewayVpcAttachment sets the TransitGatewayVpcAttachment field's value. +func (s *DeleteTransitGatewayVpcAttachmentOutput) SetTransitGatewayVpcAttachment(v *TransitGatewayVpcAttachment) *DeleteTransitGatewayVpcAttachmentOutput { + s.TransitGatewayVpcAttachment = v return s } -// Contains the output of DescribeFlowLogs. -type DescribeFlowLogsOutput struct { +// Contains the parameters for DeleteVolume. +type DeleteVolumeInput struct { _ struct{} `type:"structure"` - // Information about the flow logs. - FlowLogs []*FlowLog `locationName:"flowLogSet" 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 `locationName:"dryRun" type:"boolean"` - // 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 ID of the volume. + // + // VolumeId is a required field + VolumeId *string `type:"string" required:"true"` } // String returns the string representation -func (s DescribeFlowLogsOutput) String() string { +func (s DeleteVolumeInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeFlowLogsOutput) GoString() string { +func (s DeleteVolumeInput) GoString() string { return s.String() } -// SetFlowLogs sets the FlowLogs field's value. -func (s *DescribeFlowLogsOutput) SetFlowLogs(v []*FlowLog) *DescribeFlowLogsOutput { - s.FlowLogs = v +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteVolumeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVolumeInput"} + if s.VolumeId == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DeleteVolumeInput) SetDryRun(v bool) *DeleteVolumeInput { + s.DryRun = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeFlowLogsOutput) SetNextToken(v string) *DescribeFlowLogsOutput { - s.NextToken = &v +// SetVolumeId sets the VolumeId field's value. +func (s *DeleteVolumeInput) SetVolumeId(v string) *DeleteVolumeInput { + s.VolumeId = &v return s } -type DescribeFpgaImageAttributeInput struct { +type DeleteVolumeOutput struct { _ struct{} `type:"structure"` +} - // The AFI attribute. +// String returns the string representation +func (s DeleteVolumeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVolumeOutput) GoString() string { + return s.String() +} + +type DeleteVpcEndpointConnectionNotificationsInput struct { + _ struct{} `type:"structure"` + + // One or more notification IDs. // - // Attribute is a required field - Attribute *string `type:"string" required:"true" enum:"FpgaImageAttributeName"` + // ConnectionNotificationIds is a required field + ConnectionNotificationIds []*string `locationName:"ConnectionNotificationId" locationNameList:"item" type:"list" 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 AFI. - // - // FpgaImageId is a required field - FpgaImageId *string `type:"string" required:"true"` } // String returns the string representation -func (s DescribeFpgaImageAttributeInput) String() string { +func (s DeleteVpcEndpointConnectionNotificationsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeFpgaImageAttributeInput) GoString() string { +func (s DeleteVpcEndpointConnectionNotificationsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeFpgaImageAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeFpgaImageAttributeInput"} - if s.Attribute == nil { - invalidParams.Add(request.NewErrParamRequired("Attribute")) - } - if s.FpgaImageId == nil { - invalidParams.Add(request.NewErrParamRequired("FpgaImageId")) +func (s *DeleteVpcEndpointConnectionNotificationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVpcEndpointConnectionNotificationsInput"} + if s.ConnectionNotificationIds == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectionNotificationIds")) } if invalidParams.Len() > 0 { @@ -35676,48 +41454,42 @@ func (s *DescribeFpgaImageAttributeInput) Validate() error { return nil } -// SetAttribute sets the Attribute field's value. -func (s *DescribeFpgaImageAttributeInput) SetAttribute(v string) *DescribeFpgaImageAttributeInput { - s.Attribute = &v +// SetConnectionNotificationIds sets the ConnectionNotificationIds field's value. +func (s *DeleteVpcEndpointConnectionNotificationsInput) SetConnectionNotificationIds(v []*string) *DeleteVpcEndpointConnectionNotificationsInput { + s.ConnectionNotificationIds = v return s } // SetDryRun sets the DryRun field's value. -func (s *DescribeFpgaImageAttributeInput) SetDryRun(v bool) *DescribeFpgaImageAttributeInput { +func (s *DeleteVpcEndpointConnectionNotificationsInput) SetDryRun(v bool) *DeleteVpcEndpointConnectionNotificationsInput { s.DryRun = &v return s } -// SetFpgaImageId sets the FpgaImageId field's value. -func (s *DescribeFpgaImageAttributeInput) SetFpgaImageId(v string) *DescribeFpgaImageAttributeInput { - s.FpgaImageId = &v - return s -} - -type DescribeFpgaImageAttributeOutput struct { +type DeleteVpcEndpointConnectionNotificationsOutput struct { _ struct{} `type:"structure"` - // Information about the attribute. - FpgaImageAttribute *FpgaImageAttribute `locationName:"fpgaImageAttribute" type:"structure"` + // Information about the notifications that could not be deleted successfully. + Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"` } // String returns the string representation -func (s DescribeFpgaImageAttributeOutput) String() string { +func (s DeleteVpcEndpointConnectionNotificationsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeFpgaImageAttributeOutput) GoString() string { +func (s DeleteVpcEndpointConnectionNotificationsOutput) GoString() string { return s.String() } -// SetFpgaImageAttribute sets the FpgaImageAttribute field's value. -func (s *DescribeFpgaImageAttributeOutput) SetFpgaImageAttribute(v *FpgaImageAttribute) *DescribeFpgaImageAttributeOutput { - s.FpgaImageAttribute = v +// SetUnsuccessful sets the Unsuccessful field's value. +func (s *DeleteVpcEndpointConnectionNotificationsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *DeleteVpcEndpointConnectionNotificationsOutput { + s.Unsuccessful = v return s } -type DescribeFpgaImagesInput struct { +type DeleteVpcEndpointServiceConfigurationsInput struct { _ struct{} `type:"structure"` // Checks whether you have the required permissions for the action, without @@ -35726,70 +41498,27 @@ type DescribeFpgaImagesInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // One or more filters. - // - // * create-time - The creation time of the AFI. - // - // * fpga-image-id - The FPGA image identifier (AFI ID). - // - // * fpga-image-global-id - The global FPGA image identifier (AGFI ID). - // - // * name - The name of the AFI. - // - // * owner-id - The AWS account ID of the AFI owner. - // - // * product-code - The product code. - // - // * shell-version - The version of the AWS Shell that was used to create - // the bitstream. - // - // * state - The state of the AFI (pending | failed | available | unavailable). - // - // * 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. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. + // The IDs of one or more services. // - // * update-time - The time of the most recent update. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // One or more AFI IDs. - FpgaImageIds []*string `locationName:"FpgaImageId" locationNameList:"item" type:"list"` - - // The maximum number of results to return in a single call. - MaxResults *int64 `min:"5" type:"integer"` - - // The token to retrieve the next page of results. - NextToken *string `min:"1" type:"string"` - - // Filters the AFI by owner. Specify an AWS account ID, self (owner is the sender - // of the request), or an AWS owner alias (valid values are amazon | aws-marketplace). - Owners []*string `locationName:"Owner" locationNameList:"Owner" type:"list"` + // ServiceIds is a required field + ServiceIds []*string `locationName:"ServiceId" locationNameList:"item" type:"list" required:"true"` } // String returns the string representation -func (s DescribeFpgaImagesInput) String() string { +func (s DeleteVpcEndpointServiceConfigurationsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeFpgaImagesInput) GoString() string { +func (s DeleteVpcEndpointServiceConfigurationsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeFpgaImagesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeFpgaImagesInput"} - if s.MaxResults != nil && *s.MaxResults < 5 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) +func (s *DeleteVpcEndpointServiceConfigurationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVpcEndpointServiceConfigurationsInput"} + if s.ServiceIds == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceIds")) } if invalidParams.Len() > 0 { @@ -35799,433 +41528,350 @@ func (s *DescribeFpgaImagesInput) Validate() error { } // SetDryRun sets the DryRun field's value. -func (s *DescribeFpgaImagesInput) SetDryRun(v bool) *DescribeFpgaImagesInput { +func (s *DeleteVpcEndpointServiceConfigurationsInput) SetDryRun(v bool) *DeleteVpcEndpointServiceConfigurationsInput { s.DryRun = &v return s } -// SetFilters sets the Filters field's value. -func (s *DescribeFpgaImagesInput) SetFilters(v []*Filter) *DescribeFpgaImagesInput { - s.Filters = v +// SetServiceIds sets the ServiceIds field's value. +func (s *DeleteVpcEndpointServiceConfigurationsInput) SetServiceIds(v []*string) *DeleteVpcEndpointServiceConfigurationsInput { + s.ServiceIds = v return s } -// SetFpgaImageIds sets the FpgaImageIds field's value. -func (s *DescribeFpgaImagesInput) SetFpgaImageIds(v []*string) *DescribeFpgaImagesInput { - s.FpgaImageIds = v - return s +type DeleteVpcEndpointServiceConfigurationsOutput struct { + _ struct{} `type:"structure"` + + // Information about the service configurations that were not deleted, if applicable. + Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"` } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeFpgaImagesInput) SetMaxResults(v int64) *DescribeFpgaImagesInput { - s.MaxResults = &v - return s +// String returns the string representation +func (s DeleteVpcEndpointServiceConfigurationsOutput) String() string { + return awsutil.Prettify(s) } -// SetNextToken sets the NextToken field's value. -func (s *DescribeFpgaImagesInput) SetNextToken(v string) *DescribeFpgaImagesInput { - s.NextToken = &v - return s +// GoString returns the string representation +func (s DeleteVpcEndpointServiceConfigurationsOutput) GoString() string { + return s.String() } -// SetOwners sets the Owners field's value. -func (s *DescribeFpgaImagesInput) SetOwners(v []*string) *DescribeFpgaImagesInput { - s.Owners = v +// SetUnsuccessful sets the Unsuccessful field's value. +func (s *DeleteVpcEndpointServiceConfigurationsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *DeleteVpcEndpointServiceConfigurationsOutput { + s.Unsuccessful = v return s } -type DescribeFpgaImagesOutput struct { +// Contains the parameters for DeleteVpcEndpoints. +type DeleteVpcEndpointsInput struct { _ struct{} `type:"structure"` - // Information about one or more FPGA images. - FpgaImages []*FpgaImage `locationName:"fpgaImageSet" 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"` - // 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" min:"1" type:"string"` + // One or more VPC endpoint IDs. + // + // VpcEndpointIds is a required field + VpcEndpointIds []*string `locationName:"VpcEndpointId" locationNameList:"item" type:"list" required:"true"` } // String returns the string representation -func (s DescribeFpgaImagesOutput) String() string { +func (s DeleteVpcEndpointsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeFpgaImagesOutput) GoString() string { +func (s DeleteVpcEndpointsInput) GoString() string { return s.String() } -// SetFpgaImages sets the FpgaImages field's value. -func (s *DescribeFpgaImagesOutput) SetFpgaImages(v []*FpgaImage) *DescribeFpgaImagesOutput { - s.FpgaImages = v +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteVpcEndpointsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVpcEndpointsInput"} + if s.VpcEndpointIds == nil { + invalidParams.Add(request.NewErrParamRequired("VpcEndpointIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DeleteVpcEndpointsInput) SetDryRun(v bool) *DeleteVpcEndpointsInput { + s.DryRun = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeFpgaImagesOutput) SetNextToken(v string) *DescribeFpgaImagesOutput { - s.NextToken = &v +// SetVpcEndpointIds sets the VpcEndpointIds field's value. +func (s *DeleteVpcEndpointsInput) SetVpcEndpointIds(v []*string) *DeleteVpcEndpointsInput { + s.VpcEndpointIds = v return s } -type DescribeHostReservationOfferingsInput struct { +// Contains the output of DeleteVpcEndpoints. +type DeleteVpcEndpointsOutput struct { _ struct{} `type:"structure"` - // One or more filters. - // - // * instance-family - The instance family of the offering (for example, - // m4). - // - // * payment-option - The payment option (NoUpfront | PartialUpfront | AllUpfront). - Filter []*Filter `locationNameList:"Filter" type:"list"` - - // This is the maximum duration of the reservation to purchase, specified in - // seconds. Reservations are available in one-year and three-year terms. The - // number of seconds specified must be the number of seconds in a year (365x24x60x60) - // times one of the supported durations (1 or 3). For example, specify 94608000 - // for three years. - MaxDuration *int64 `type:"integer"` - - // The maximum number of results to return for the request in a single page. - // The remaining results can be seen by sending another request with the returned - // nextToken value. This value can be between 5 and 500. If maxResults is given - // a larger value than 500, you receive an error. - MaxResults *int64 `type:"integer"` - - // This is the minimum duration of the reservation you'd like to purchase, specified - // in seconds. Reservations are available in one-year and three-year terms. - // The number of seconds specified must be the number of seconds in a year (365x24x60x60) - // times one of the supported durations (1 or 3). For example, specify 31536000 - // for one year. - MinDuration *int64 `type:"integer"` - - // The token to use to retrieve the next page of results. - NextToken *string `type:"string"` - - // The ID of the reservation offering. - OfferingId *string `type:"string"` + // Information about the VPC endpoints that were not successfully deleted. + Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"` } // String returns the string representation -func (s DescribeHostReservationOfferingsInput) String() string { +func (s DeleteVpcEndpointsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeHostReservationOfferingsInput) GoString() string { +func (s DeleteVpcEndpointsOutput) GoString() string { return s.String() } -// SetFilter sets the Filter field's value. -func (s *DescribeHostReservationOfferingsInput) SetFilter(v []*Filter) *DescribeHostReservationOfferingsInput { - s.Filter = v +// SetUnsuccessful sets the Unsuccessful field's value. +func (s *DeleteVpcEndpointsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *DeleteVpcEndpointsOutput { + s.Unsuccessful = v return s } -// SetMaxDuration sets the MaxDuration field's value. -func (s *DescribeHostReservationOfferingsInput) SetMaxDuration(v int64) *DescribeHostReservationOfferingsInput { - s.MaxDuration = &v - return s -} +type DeleteVpcInput struct { + _ struct{} `type:"structure"` -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeHostReservationOfferingsInput) SetMaxResults(v int64) *DescribeHostReservationOfferingsInput { - s.MaxResults = &v - return s + // 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 `locationName:"dryRun" type:"boolean"` + + // The ID of the VPC. + // + // VpcId is a required field + VpcId *string `type:"string" required:"true"` } -// SetMinDuration sets the MinDuration field's value. -func (s *DescribeHostReservationOfferingsInput) SetMinDuration(v int64) *DescribeHostReservationOfferingsInput { - s.MinDuration = &v - return s +// String returns the string representation +func (s DeleteVpcInput) String() string { + return awsutil.Prettify(s) } -// SetNextToken sets the NextToken field's value. -func (s *DescribeHostReservationOfferingsInput) SetNextToken(v string) *DescribeHostReservationOfferingsInput { - s.NextToken = &v +// GoString returns the string representation +func (s DeleteVpcInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteVpcInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVpcInput"} + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DeleteVpcInput) SetDryRun(v bool) *DeleteVpcInput { + s.DryRun = &v return s } -// SetOfferingId sets the OfferingId field's value. -func (s *DescribeHostReservationOfferingsInput) SetOfferingId(v string) *DescribeHostReservationOfferingsInput { - s.OfferingId = &v +// SetVpcId sets the VpcId field's value. +func (s *DeleteVpcInput) SetVpcId(v string) *DeleteVpcInput { + s.VpcId = &v return s } -type DescribeHostReservationOfferingsOutput struct { +type DeleteVpcOutput 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 offerings. - OfferingSet []*HostOffering `locationName:"offeringSet" locationNameList:"item" type:"list"` } // String returns the string representation -func (s DescribeHostReservationOfferingsOutput) String() string { +func (s DeleteVpcOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeHostReservationOfferingsOutput) GoString() string { +func (s DeleteVpcOutput) GoString() string { return s.String() } -// SetNextToken sets the NextToken field's value. -func (s *DescribeHostReservationOfferingsOutput) SetNextToken(v string) *DescribeHostReservationOfferingsOutput { - s.NextToken = &v - return s -} - -// SetOfferingSet sets the OfferingSet field's value. -func (s *DescribeHostReservationOfferingsOutput) SetOfferingSet(v []*HostOffering) *DescribeHostReservationOfferingsOutput { - s.OfferingSet = v - return s -} - -type DescribeHostReservationsInput struct { +type DeleteVpcPeeringConnectionInput struct { _ struct{} `type:"structure"` - // One or more filters. - // - // * instance-family - The instance family (for example, m4). - // - // * payment-option - The payment option (NoUpfront | PartialUpfront | AllUpfront). - // - // * state - The state of the reservation (payment-pending | payment-failed - // | active | retired). - Filter []*Filter `locationNameList:"Filter" type:"list"` - - // One or more host reservation IDs. - HostReservationIdSet []*string `locationNameList:"item" type:"list"` - - // The maximum number of results to return for the request in a single page. - // The remaining results can be seen by sending another request with the returned - // nextToken value. This value can be between 5 and 500.If maxResults is given - // a larger value than 500, you receive an error. - MaxResults *int64 `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 `locationName:"dryRun" type:"boolean"` - // The token to use to retrieve the next page of results. - NextToken *string `type:"string"` + // The ID of the VPC peering connection. + // + // VpcPeeringConnectionId is a required field + VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string" required:"true"` } // String returns the string representation -func (s DescribeHostReservationsInput) String() string { +func (s DeleteVpcPeeringConnectionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeHostReservationsInput) GoString() string { +func (s DeleteVpcPeeringConnectionInput) GoString() string { return s.String() } -// SetFilter sets the Filter field's value. -func (s *DescribeHostReservationsInput) SetFilter(v []*Filter) *DescribeHostReservationsInput { - s.Filter = v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteVpcPeeringConnectionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVpcPeeringConnectionInput"} + if s.VpcPeeringConnectionId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcPeeringConnectionId")) + } -// SetHostReservationIdSet sets the HostReservationIdSet field's value. -func (s *DescribeHostReservationsInput) SetHostReservationIdSet(v []*string) *DescribeHostReservationsInput { - s.HostReservationIdSet = v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeHostReservationsInput) SetMaxResults(v int64) *DescribeHostReservationsInput { - s.MaxResults = &v +// SetDryRun sets the DryRun field's value. +func (s *DeleteVpcPeeringConnectionInput) SetDryRun(v bool) *DeleteVpcPeeringConnectionInput { + s.DryRun = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeHostReservationsInput) SetNextToken(v string) *DescribeHostReservationsInput { - s.NextToken = &v +// SetVpcPeeringConnectionId sets the VpcPeeringConnectionId field's value. +func (s *DeleteVpcPeeringConnectionInput) SetVpcPeeringConnectionId(v string) *DeleteVpcPeeringConnectionInput { + s.VpcPeeringConnectionId = &v return s } -type DescribeHostReservationsOutput struct { +type DeleteVpcPeeringConnectionOutput struct { _ struct{} `type:"structure"` - // Details about the reservation's configuration. - HostReservationSet []*HostReservation `locationName:"hostReservationSet" 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"` + // Returns true if the request succeeds; otherwise, it returns an error. + Return *bool `locationName:"return" type:"boolean"` } // String returns the string representation -func (s DescribeHostReservationsOutput) String() string { +func (s DeleteVpcPeeringConnectionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeHostReservationsOutput) GoString() string { +func (s DeleteVpcPeeringConnectionOutput) GoString() string { return s.String() } -// SetHostReservationSet sets the HostReservationSet field's value. -func (s *DescribeHostReservationsOutput) SetHostReservationSet(v []*HostReservation) *DescribeHostReservationsOutput { - s.HostReservationSet = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeHostReservationsOutput) SetNextToken(v string) *DescribeHostReservationsOutput { - s.NextToken = &v +// SetReturn sets the Return field's value. +func (s *DeleteVpcPeeringConnectionOutput) SetReturn(v bool) *DeleteVpcPeeringConnectionOutput { + s.Return = &v return s } -// Contains the parameters for DescribeHosts. -type DescribeHostsInput struct { +// Contains the parameters for DeleteVpnConnection. +type DeleteVpnConnectionInput struct { _ struct{} `type:"structure"` - // One or more filters. - // - // * auto-placement - Whether auto-placement is enabled or disabled (on | - // off). - // - // * availability-zone - The Availability Zone of the host. - // - // * client-token - The idempotency token that you provided when you allocated - // the host. - // - // * host-reservation-id - The ID of the reservation assigned to this host. - // - // * instance-type - The instance type size that the Dedicated Host is configured - // to support. - // - // * state - The allocation state of the Dedicated Host (available | under-assessment - // | permanent-failure | released | released-permanent-failure). - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - Filter []*Filter `locationName:"filter" locationNameList:"Filter" type:"list"` - - // The IDs of the Dedicated Hosts. The IDs are used for targeted instance launches. - HostIds []*string `locationName:"hostId" locationNameList:"item" type:"list"` - - // The maximum number of results to return for the request in a single page. - // The remaining results can be seen by sending another request with the returned - // nextToken value. This value can be between 5 and 500. If maxResults is given - // a larger value than 500, you receive an error. You cannot specify this parameter - // and the host IDs parameter in the same request. - MaxResults *int64 `locationName:"maxResults" 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 `locationName:"dryRun" type:"boolean"` - // The token to retrieve the next page of results. - NextToken *string `locationName:"nextToken" type:"string"` + // The ID of the VPN connection. + // + // VpnConnectionId is a required field + VpnConnectionId *string `type:"string" required:"true"` } // String returns the string representation -func (s DescribeHostsInput) String() string { +func (s DeleteVpnConnectionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeHostsInput) GoString() string { +func (s DeleteVpnConnectionInput) GoString() string { return s.String() } -// SetFilter sets the Filter field's value. -func (s *DescribeHostsInput) SetFilter(v []*Filter) *DescribeHostsInput { - s.Filter = v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteVpnConnectionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVpnConnectionInput"} + if s.VpnConnectionId == nil { + invalidParams.Add(request.NewErrParamRequired("VpnConnectionId")) + } -// SetHostIds sets the HostIds field's value. -func (s *DescribeHostsInput) SetHostIds(v []*string) *DescribeHostsInput { - s.HostIds = v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeHostsInput) SetMaxResults(v int64) *DescribeHostsInput { - s.MaxResults = &v +// SetDryRun sets the DryRun field's value. +func (s *DeleteVpnConnectionInput) SetDryRun(v bool) *DeleteVpnConnectionInput { + s.DryRun = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeHostsInput) SetNextToken(v string) *DescribeHostsInput { - s.NextToken = &v +// SetVpnConnectionId sets the VpnConnectionId field's value. +func (s *DeleteVpnConnectionInput) SetVpnConnectionId(v string) *DeleteVpnConnectionInput { + s.VpnConnectionId = &v return s } -// Contains the output of DescribeHosts. -type DescribeHostsOutput struct { +type DeleteVpnConnectionOutput struct { _ struct{} `type:"structure"` - - // Information about the Dedicated Hosts. - Hosts []*Host `locationName:"hostSet" 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 DescribeHostsOutput) String() string { +func (s DeleteVpnConnectionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeHostsOutput) GoString() string { +func (s DeleteVpnConnectionOutput) GoString() string { return s.String() } -// SetHosts sets the Hosts field's value. -func (s *DescribeHostsOutput) SetHosts(v []*Host) *DescribeHostsOutput { - s.Hosts = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeHostsOutput) SetNextToken(v string) *DescribeHostsOutput { - s.NextToken = &v - return s -} - -type DescribeIamInstanceProfileAssociationsInput struct { +// Contains the parameters for DeleteVpnConnectionRoute. +type DeleteVpnConnectionRouteInput struct { _ struct{} `type:"structure"` - // One or more IAM instance profile associations. - AssociationIds []*string `locationName:"AssociationId" locationNameList:"AssociationId" type:"list"` - - // One or more filters. - // - // * instance-id - The ID of the instance. + // The CIDR block associated with the local subnet of the customer network. // - // * state - The state of the association (associating | associated | disassociating - // | disassociated). - 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 call with the returned NextToken value. - MaxResults *int64 `min:"5" type:"integer"` + // DestinationCidrBlock is a required field + DestinationCidrBlock *string `type:"string" required:"true"` - // The token to request the next page of results. - NextToken *string `min:"1" type:"string"` + // The ID of the VPN connection. + // + // VpnConnectionId is a required field + VpnConnectionId *string `type:"string" required:"true"` } // String returns the string representation -func (s DescribeIamInstanceProfileAssociationsInput) String() string { +func (s DeleteVpnConnectionRouteInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeIamInstanceProfileAssociationsInput) GoString() string { +func (s DeleteVpnConnectionRouteInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeIamInstanceProfileAssociationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeIamInstanceProfileAssociationsInput"} - if s.MaxResults != nil && *s.MaxResults < 5 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) +func (s *DeleteVpnConnectionRouteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVpnConnectionRouteInput"} + if s.DestinationCidrBlock == nil { + invalidParams.Add(request.NewErrParamRequired("DestinationCidrBlock")) } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + if s.VpnConnectionId == nil { + invalidParams.Add(request.NewErrParamRequired("VpnConnectionId")) } if invalidParams.Len() > 0 { @@ -36234,152 +41880,128 @@ func (s *DescribeIamInstanceProfileAssociationsInput) Validate() error { return nil } -// SetAssociationIds sets the AssociationIds field's value. -func (s *DescribeIamInstanceProfileAssociationsInput) SetAssociationIds(v []*string) *DescribeIamInstanceProfileAssociationsInput { - s.AssociationIds = v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeIamInstanceProfileAssociationsInput) SetFilters(v []*Filter) *DescribeIamInstanceProfileAssociationsInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeIamInstanceProfileAssociationsInput) SetMaxResults(v int64) *DescribeIamInstanceProfileAssociationsInput { - s.MaxResults = &v +// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. +func (s *DeleteVpnConnectionRouteInput) SetDestinationCidrBlock(v string) *DeleteVpnConnectionRouteInput { + s.DestinationCidrBlock = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeIamInstanceProfileAssociationsInput) SetNextToken(v string) *DescribeIamInstanceProfileAssociationsInput { - s.NextToken = &v +// SetVpnConnectionId sets the VpnConnectionId field's value. +func (s *DeleteVpnConnectionRouteInput) SetVpnConnectionId(v string) *DeleteVpnConnectionRouteInput { + s.VpnConnectionId = &v return s } -type DescribeIamInstanceProfileAssociationsOutput struct { +type DeleteVpnConnectionRouteOutput struct { _ struct{} `type:"structure"` - - // Information about one or more IAM instance profile associations. - IamInstanceProfileAssociations []*IamInstanceProfileAssociation `locationName:"iamInstanceProfileAssociationSet" 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" min:"1" type:"string"` } // String returns the string representation -func (s DescribeIamInstanceProfileAssociationsOutput) String() string { +func (s DeleteVpnConnectionRouteOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeIamInstanceProfileAssociationsOutput) GoString() string { +func (s DeleteVpnConnectionRouteOutput) GoString() string { return s.String() } -// SetIamInstanceProfileAssociations sets the IamInstanceProfileAssociations field's value. -func (s *DescribeIamInstanceProfileAssociationsOutput) SetIamInstanceProfileAssociations(v []*IamInstanceProfileAssociation) *DescribeIamInstanceProfileAssociationsOutput { - s.IamInstanceProfileAssociations = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeIamInstanceProfileAssociationsOutput) SetNextToken(v string) *DescribeIamInstanceProfileAssociationsOutput { - s.NextToken = &v - return s -} - -// Contains the parameters for DescribeIdFormat. -type DescribeIdFormatInput struct { +// Contains the parameters for DeleteVpnGateway. +type DeleteVpnGatewayInput struct { _ struct{} `type:"structure"` - // The type of resource: bundle | conversion-task | customer-gateway | dhcp-options - // | elastic-ip-allocation | elastic-ip-association | export-task | flow-log - // | image | import-task | instance | internet-gateway | network-acl | network-acl-association - // | network-interface | network-interface-attachment | prefix-list | reservation - // | route-table | route-table-association | security-group | snapshot | subnet - // | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association - // | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway - Resource *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 `locationName:"dryRun" type:"boolean"` + + // The ID of the virtual private gateway. + // + // VpnGatewayId is a required field + VpnGatewayId *string `type:"string" required:"true"` } // String returns the string representation -func (s DescribeIdFormatInput) String() string { +func (s DeleteVpnGatewayInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeIdFormatInput) GoString() string { +func (s DeleteVpnGatewayInput) GoString() string { return s.String() } -// SetResource sets the Resource field's value. -func (s *DescribeIdFormatInput) SetResource(v string) *DescribeIdFormatInput { - s.Resource = &v +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteVpnGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVpnGatewayInput"} + if s.VpnGatewayId == nil { + invalidParams.Add(request.NewErrParamRequired("VpnGatewayId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DeleteVpnGatewayInput) SetDryRun(v bool) *DeleteVpnGatewayInput { + s.DryRun = &v return s } -// Contains the output of DescribeIdFormat. -type DescribeIdFormatOutput struct { - _ struct{} `type:"structure"` +// SetVpnGatewayId sets the VpnGatewayId field's value. +func (s *DeleteVpnGatewayInput) SetVpnGatewayId(v string) *DeleteVpnGatewayInput { + s.VpnGatewayId = &v + return s +} - // Information about the ID format for the resource. - Statuses []*IdFormat `locationName:"statusSet" locationNameList:"item" type:"list"` +type DeleteVpnGatewayOutput struct { + _ struct{} `type:"structure"` } // String returns the string representation -func (s DescribeIdFormatOutput) String() string { +func (s DeleteVpnGatewayOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeIdFormatOutput) GoString() string { +func (s DeleteVpnGatewayOutput) GoString() string { return s.String() } -// SetStatuses sets the Statuses field's value. -func (s *DescribeIdFormatOutput) SetStatuses(v []*IdFormat) *DescribeIdFormatOutput { - s.Statuses = v - return s -} - -// Contains the parameters for DescribeIdentityIdFormat. -type DescribeIdentityIdFormatInput struct { +type DeprovisionByoipCidrInput struct { _ struct{} `type:"structure"` - // The ARN of the principal, which can be an IAM role, IAM user, or the root - // user. + // The public IPv4 address range, in CIDR notation. The prefix must be the same + // prefix that you specified when you provisioned the address range. // - // PrincipalArn is a required field - PrincipalArn *string `locationName:"principalArn" type:"string" required:"true"` + // Cidr is a required field + Cidr *string `type:"string" required:"true"` - // The type of resource: bundle | conversion-task | customer-gateway | dhcp-options - // | elastic-ip-allocation | elastic-ip-association | export-task | flow-log - // | image | import-task | instance | internet-gateway | network-acl | network-acl-association - // | network-interface | network-interface-attachment | prefix-list | reservation - // | route-table | route-table-association | security-group | snapshot | subnet - // | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association - // | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway - Resource *string `locationName:"resource" 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 DescribeIdentityIdFormatInput) String() string { +func (s DeprovisionByoipCidrInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeIdentityIdFormatInput) GoString() string { +func (s DeprovisionByoipCidrInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeIdentityIdFormatInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeIdentityIdFormatInput"} - if s.PrincipalArn == nil { - invalidParams.Add(request.NewErrParamRequired("PrincipalArn")) +func (s *DeprovisionByoipCidrInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeprovisionByoipCidrInput"} + if s.Cidr == nil { + invalidParams.Add(request.NewErrParamRequired("Cidr")) } if invalidParams.Len() > 0 { @@ -36388,55 +42010,45 @@ func (s *DescribeIdentityIdFormatInput) Validate() error { return nil } -// SetPrincipalArn sets the PrincipalArn field's value. -func (s *DescribeIdentityIdFormatInput) SetPrincipalArn(v string) *DescribeIdentityIdFormatInput { - s.PrincipalArn = &v +// SetCidr sets the Cidr field's value. +func (s *DeprovisionByoipCidrInput) SetCidr(v string) *DeprovisionByoipCidrInput { + s.Cidr = &v return s } -// SetResource sets the Resource field's value. -func (s *DescribeIdentityIdFormatInput) SetResource(v string) *DescribeIdentityIdFormatInput { - s.Resource = &v +// SetDryRun sets the DryRun field's value. +func (s *DeprovisionByoipCidrInput) SetDryRun(v bool) *DeprovisionByoipCidrInput { + s.DryRun = &v return s } -// Contains the output of DescribeIdentityIdFormat. -type DescribeIdentityIdFormatOutput struct { +type DeprovisionByoipCidrOutput struct { _ struct{} `type:"structure"` - // Information about the ID format for the resources. - Statuses []*IdFormat `locationName:"statusSet" locationNameList:"item" type:"list"` + // Information about the address range. + ByoipCidr *ByoipCidr `locationName:"byoipCidr" type:"structure"` } // String returns the string representation -func (s DescribeIdentityIdFormatOutput) String() string { +func (s DeprovisionByoipCidrOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeIdentityIdFormatOutput) GoString() string { +func (s DeprovisionByoipCidrOutput) GoString() string { return s.String() } -// SetStatuses sets the Statuses field's value. -func (s *DescribeIdentityIdFormatOutput) SetStatuses(v []*IdFormat) *DescribeIdentityIdFormatOutput { - s.Statuses = v +// SetByoipCidr sets the ByoipCidr field's value. +func (s *DeprovisionByoipCidrOutput) SetByoipCidr(v *ByoipCidr) *DeprovisionByoipCidrOutput { + s.ByoipCidr = v return s } -// Contains the parameters for DescribeImageAttribute. -type DescribeImageAttributeInput struct { +// Contains the parameters for DeregisterImage. +type DeregisterImageInput struct { _ struct{} `type:"structure"` - // 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. - // - // Attribute is a required field - Attribute *string `type:"string" required:"true" enum:"ImageAttributeName"` - // 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, @@ -36450,21 +42062,18 @@ type DescribeImageAttributeInput struct { } // String returns the string representation -func (s DescribeImageAttributeInput) String() string { +func (s DeregisterImageInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeImageAttributeInput) GoString() string { +func (s DeregisterImageInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeImageAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeImageAttributeInput"} - if s.Attribute == nil { - invalidParams.Add(request.NewErrParamRequired("Attribute")) - } +func (s *DeregisterImageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeregisterImageInput"} if s.ImageId == nil { invalidParams.Add(request.NewErrParamRequired("ImageId")) } @@ -36475,191 +42084,125 @@ func (s *DescribeImageAttributeInput) Validate() error { return nil } -// SetAttribute sets the Attribute field's value. -func (s *DescribeImageAttributeInput) SetAttribute(v string) *DescribeImageAttributeInput { - s.Attribute = &v - return s -} - // SetDryRun sets the DryRun field's value. -func (s *DescribeImageAttributeInput) SetDryRun(v bool) *DescribeImageAttributeInput { +func (s *DeregisterImageInput) SetDryRun(v bool) *DeregisterImageInput { s.DryRun = &v return s } // SetImageId sets the ImageId field's value. -func (s *DescribeImageAttributeInput) SetImageId(v string) *DescribeImageAttributeInput { +func (s *DeregisterImageInput) SetImageId(v string) *DeregisterImageInput { s.ImageId = &v return s } -// Describes an image attribute. -type DescribeImageAttributeOutput struct { +type DeregisterImageOutput struct { _ struct{} `type:"structure"` +} - // One or more block device mapping entries. - BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` +// String returns the string representation +func (s DeregisterImageOutput) String() string { + return awsutil.Prettify(s) +} - // A description for the AMI. - Description *AttributeValue `locationName:"description" type:"structure"` +// GoString returns the string representation +func (s DeregisterImageOutput) GoString() string { + return s.String() +} - // The ID of the AMI. - ImageId *string `locationName:"imageId" type:"string"` +type DescribeAccountAttributesInput struct { + _ struct{} `type:"structure"` - // The kernel ID. - KernelId *AttributeValue `locationName:"kernel" type:"structure"` + // One or more account attribute names. + AttributeNames []*string `locationName:"attributeName" locationNameList:"attributeName" type:"list"` - // One or more launch permissions. - LaunchPermissions []*LaunchPermission `locationName:"launchPermission" locationNameList:"item" type:"list"` - - // One or more product codes. - ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` - - // The RAM disk ID. - RamdiskId *AttributeValue `locationName:"ramdisk" type:"structure"` - - // Indicates whether enhanced networking with the Intel 82599 Virtual Function - // interface is enabled. - SriovNetSupport *AttributeValue `locationName:"sriovNetSupport" 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 `locationName:"dryRun" type:"boolean"` } // String returns the string representation -func (s DescribeImageAttributeOutput) String() string { +func (s DescribeAccountAttributesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeImageAttributeOutput) GoString() string { +func (s DescribeAccountAttributesInput) GoString() string { return s.String() } -// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *DescribeImageAttributeOutput) SetBlockDeviceMappings(v []*BlockDeviceMapping) *DescribeImageAttributeOutput { - s.BlockDeviceMappings = v - return s -} - -// SetDescription sets the Description field's value. -func (s *DescribeImageAttributeOutput) SetDescription(v *AttributeValue) *DescribeImageAttributeOutput { - s.Description = v +// SetAttributeNames sets the AttributeNames field's value. +func (s *DescribeAccountAttributesInput) SetAttributeNames(v []*string) *DescribeAccountAttributesInput { + s.AttributeNames = v return s } -// SetImageId sets the ImageId field's value. -func (s *DescribeImageAttributeOutput) SetImageId(v string) *DescribeImageAttributeOutput { - s.ImageId = &v +// SetDryRun sets the DryRun field's value. +func (s *DescribeAccountAttributesInput) SetDryRun(v bool) *DescribeAccountAttributesInput { + s.DryRun = &v return s } -// SetKernelId sets the KernelId field's value. -func (s *DescribeImageAttributeOutput) SetKernelId(v *AttributeValue) *DescribeImageAttributeOutput { - s.KernelId = v - return s -} +type DescribeAccountAttributesOutput struct { + _ struct{} `type:"structure"` -// SetLaunchPermissions sets the LaunchPermissions field's value. -func (s *DescribeImageAttributeOutput) SetLaunchPermissions(v []*LaunchPermission) *DescribeImageAttributeOutput { - s.LaunchPermissions = v - return s + // Information about one or more account attributes. + AccountAttributes []*AccountAttribute `locationName:"accountAttributeSet" locationNameList:"item" type:"list"` } -// SetProductCodes sets the ProductCodes field's value. -func (s *DescribeImageAttributeOutput) SetProductCodes(v []*ProductCode) *DescribeImageAttributeOutput { - s.ProductCodes = v - return s +// String returns the string representation +func (s DescribeAccountAttributesOutput) String() string { + return awsutil.Prettify(s) } -// SetRamdiskId sets the RamdiskId field's value. -func (s *DescribeImageAttributeOutput) SetRamdiskId(v *AttributeValue) *DescribeImageAttributeOutput { - s.RamdiskId = v - return s +// GoString returns the string representation +func (s DescribeAccountAttributesOutput) GoString() string { + return s.String() } -// SetSriovNetSupport sets the SriovNetSupport field's value. -func (s *DescribeImageAttributeOutput) SetSriovNetSupport(v *AttributeValue) *DescribeImageAttributeOutput { - s.SriovNetSupport = v +// SetAccountAttributes sets the AccountAttributes field's value. +func (s *DescribeAccountAttributesOutput) SetAccountAttributes(v []*AccountAttribute) *DescribeAccountAttributesOutput { + s.AccountAttributes = v return s } -// Contains the parameters for DescribeImages. -type DescribeImagesInput struct { +type DescribeAddressesInput struct { _ struct{} `type:"structure"` + // [EC2-VPC] One or more allocation IDs. + // + // Default: Describes all your Elastic IP addresses. + AllocationIds []*string `locationName:"AllocationId" locationNameList:"AllocationId" 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 `locationName:"dryRun" type:"boolean"` - // Scopes the images by users with explicit launch permissions. Specify an AWS - // account ID, self (the sender of the request), or all (public AMIs). - ExecutableUsers []*string `locationName:"ExecutableBy" locationNameList:"ExecutableBy" type:"list"` - - // One or more filters. - // - // * architecture - The image architecture (i386 | x86_64). - // - // * block-device-mapping.delete-on-termination - A Boolean value that indicates - // whether the Amazon EBS volume is deleted on instance termination. - // - // * block-device-mapping.device-name - The device name specified in the - // block device mapping (for example, /dev/sdh or xvdh). - // - // * block-device-mapping.snapshot-id - The ID of the snapshot used for the - // EBS volume. - // - // * block-device-mapping.volume-size - The volume size of the EBS volume, - // in GiB. - // - // * block-device-mapping.volume-type - The volume type of the EBS volume - // (gp2 | io1 | st1 | sc1 | standard). - // - // * description - The description of the image (provided during image creation). - // - // * ena-support - A Boolean that indicates whether enhanced networking with - // ENA is enabled. - // - // * hypervisor - The hypervisor type (ovm | xen). - // - // * image-id - The ID of the image. - // - // * image-type - The image type (machine | kernel | ramdisk). - // - // * is-public - A Boolean that indicates whether the image is public. - // - // * kernel-id - The kernel ID. - // - // * manifest-location - The location of the image manifest. - // - // * name - The name of the AMI (provided during image creation). - // - // * owner-alias - String value from an Amazon-maintained list (amazon | - // aws-marketplace | microsoft) of snapshot owners. Not to be confused with - // the user-configured AWS account alias, which is set from the IAM console. - // - // * owner-id - The AWS account ID of the image owner. - // - // * platform - The platform. To only list Windows-based AMIs, use windows. - // - // * product-code - The product code. + // One or more filters. Filter names and values are case-sensitive. // - // * product-code.type - The type of the product code (devpay | marketplace). + // * allocation-id - [EC2-VPC] The allocation ID for the address. // - // * ramdisk-id - The RAM disk ID. + // * association-id - [EC2-VPC] The association ID for the address. // - // * root-device-name - The device name of the root device volume (for example, - // /dev/sda1). + // * domain - Indicates whether the address is for use in EC2-Classic (standard) + // or in a VPC (vpc). // - // * root-device-type - The type of the root device volume (ebs | instance-store). + // * instance-id - The ID of the instance the address is associated with, + // if any. // - // * state - The state of the image (available | pending | failed). + // * network-interface-id - [EC2-VPC] The ID of the network interface that + // the address is associated with, if any. // - // * state-reason-code - The reason code for the state change. + // * network-interface-owner-id - The AWS account ID of the owner. // - // * state-reason-message - The message for the state change. + // * private-ip-address - [EC2-VPC] The private IP address associated with + // the Elastic IP address. // - // * sriov-net-support - A value of simple indicates that enhanced networking - // with the Intel 82599 VF interface is enabled. + // * public-ip - The Elastic IP address. // // * 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. @@ -36670,88 +42213,72 @@ type DescribeImagesInput struct { // * tag-key - The key of a tag assigned to the resource. Use this filter // to find all resources assigned a tag with a specific key, regardless of // the tag value. - // - // * virtualization-type - The virtualization type (paravirtual | hvm). Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - // One or more image IDs. + // [EC2-Classic] One or more Elastic IP addresses. // - // Default: Describes all images available to you. - ImageIds []*string `locationName:"ImageId" locationNameList:"ImageId" type:"list"` - - // Filters the images by the owner. Specify an AWS account ID, self (owner is - // the sender of the request), or an AWS owner alias (valid values are amazon - // | aws-marketplace | microsoft). Omitting this option returns all images for - // which you have launch permissions, regardless of ownership. - Owners []*string `locationName:"Owner" locationNameList:"Owner" type:"list"` + // Default: Describes all your Elastic IP addresses. + PublicIps []*string `locationName:"PublicIp" locationNameList:"PublicIp" type:"list"` } // String returns the string representation -func (s DescribeImagesInput) String() string { +func (s DescribeAddressesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeImagesInput) GoString() string { +func (s DescribeAddressesInput) GoString() string { return s.String() } -// SetDryRun sets the DryRun field's value. -func (s *DescribeImagesInput) SetDryRun(v bool) *DescribeImagesInput { - s.DryRun = &v +// SetAllocationIds sets the AllocationIds field's value. +func (s *DescribeAddressesInput) SetAllocationIds(v []*string) *DescribeAddressesInput { + s.AllocationIds = v return s } -// SetExecutableUsers sets the ExecutableUsers field's value. -func (s *DescribeImagesInput) SetExecutableUsers(v []*string) *DescribeImagesInput { - s.ExecutableUsers = v +// SetDryRun sets the DryRun field's value. +func (s *DescribeAddressesInput) SetDryRun(v bool) *DescribeAddressesInput { + s.DryRun = &v return s } // SetFilters sets the Filters field's value. -func (s *DescribeImagesInput) SetFilters(v []*Filter) *DescribeImagesInput { +func (s *DescribeAddressesInput) SetFilters(v []*Filter) *DescribeAddressesInput { s.Filters = v return s } -// SetImageIds sets the ImageIds field's value. -func (s *DescribeImagesInput) SetImageIds(v []*string) *DescribeImagesInput { - s.ImageIds = v - return s -} - -// SetOwners sets the Owners field's value. -func (s *DescribeImagesInput) SetOwners(v []*string) *DescribeImagesInput { - s.Owners = v +// SetPublicIps sets the PublicIps field's value. +func (s *DescribeAddressesInput) SetPublicIps(v []*string) *DescribeAddressesInput { + s.PublicIps = v return s } -// Contains the output of DescribeImages. -type DescribeImagesOutput struct { +type DescribeAddressesOutput struct { _ struct{} `type:"structure"` - // Information about one or more images. - Images []*Image `locationName:"imagesSet" locationNameList:"item" type:"list"` + // Information about one or more Elastic IP addresses. + Addresses []*Address `locationName:"addressesSet" locationNameList:"item" type:"list"` } // String returns the string representation -func (s DescribeImagesOutput) String() string { +func (s DescribeAddressesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeImagesOutput) GoString() string { +func (s DescribeAddressesOutput) GoString() string { return s.String() } -// SetImages sets the Images field's value. -func (s *DescribeImagesOutput) SetImages(v []*Image) *DescribeImagesOutput { - s.Images = v +// SetAddresses sets the Addresses field's value. +func (s *DescribeAddressesOutput) SetAddresses(v []*Address) *DescribeAddressesOutput { + s.Addresses = v return s } -// Contains the parameters for DescribeImportImageTasks. -type DescribeImportImageTasksInput struct { +type DescribeAggregateIdFormatInput struct { _ struct{} `type:"structure"` // Checks whether you have the required permissions for the action, without @@ -36759,237 +42286,279 @@ type DescribeImportImageTasksInput struct { // the required permissions, the error response is DryRunOperation. Otherwise, // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - - // Filter tasks using the task-state filter and one of the following values: - // active, completed, deleting, deleted. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // A list of import image task IDs. - ImportTaskIds []*string `locationName:"ImportTaskId" locationNameList:"ImportTaskId" 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. - MaxResults *int64 `type:"integer"` - - // A token that indicates the next page of results. - NextToken *string `type:"string"` } // String returns the string representation -func (s DescribeImportImageTasksInput) String() string { +func (s DescribeAggregateIdFormatInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeImportImageTasksInput) GoString() string { +func (s DescribeAggregateIdFormatInput) GoString() string { return s.String() } // SetDryRun sets the DryRun field's value. -func (s *DescribeImportImageTasksInput) SetDryRun(v bool) *DescribeImportImageTasksInput { +func (s *DescribeAggregateIdFormatInput) SetDryRun(v bool) *DescribeAggregateIdFormatInput { s.DryRun = &v return s } -// SetFilters sets the Filters field's value. -func (s *DescribeImportImageTasksInput) SetFilters(v []*Filter) *DescribeImportImageTasksInput { - s.Filters = v - return s -} - -// SetImportTaskIds sets the ImportTaskIds field's value. -func (s *DescribeImportImageTasksInput) SetImportTaskIds(v []*string) *DescribeImportImageTasksInput { - s.ImportTaskIds = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeImportImageTasksInput) SetMaxResults(v int64) *DescribeImportImageTasksInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeImportImageTasksInput) SetNextToken(v string) *DescribeImportImageTasksInput { - s.NextToken = &v - return s -} - -// Contains the output for DescribeImportImageTasks. -type DescribeImportImageTasksOutput struct { +type DescribeAggregateIdFormatOutput struct { _ struct{} `type:"structure"` - // A list of zero or more import image tasks that are currently active or were - // completed or canceled in the previous 7 days. - ImportImageTasks []*ImportImageTask `locationName:"importImageTaskSet" locationNameList:"item" type:"list"` + // Information about each resource's ID format. + Statuses []*IdFormat `locationName:"statusSet" locationNameList:"item" type:"list"` - // The token to use to get the next page of results. This value is null when - // there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` + // Indicates whether all resource types in the region are configured to use + // longer IDs. This value is only true if all users are configured to use longer + // IDs for all resources types in the region. + UseLongIdsAggregated *bool `locationName:"useLongIdsAggregated" type:"boolean"` } // String returns the string representation -func (s DescribeImportImageTasksOutput) String() string { +func (s DescribeAggregateIdFormatOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeImportImageTasksOutput) GoString() string { +func (s DescribeAggregateIdFormatOutput) GoString() string { return s.String() } -// SetImportImageTasks sets the ImportImageTasks field's value. -func (s *DescribeImportImageTasksOutput) SetImportImageTasks(v []*ImportImageTask) *DescribeImportImageTasksOutput { - s.ImportImageTasks = v +// SetStatuses sets the Statuses field's value. +func (s *DescribeAggregateIdFormatOutput) SetStatuses(v []*IdFormat) *DescribeAggregateIdFormatOutput { + s.Statuses = v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeImportImageTasksOutput) SetNextToken(v string) *DescribeImportImageTasksOutput { - s.NextToken = &v +// SetUseLongIdsAggregated sets the UseLongIdsAggregated field's value. +func (s *DescribeAggregateIdFormatOutput) SetUseLongIdsAggregated(v bool) *DescribeAggregateIdFormatOutput { + s.UseLongIdsAggregated = &v return s } -// Contains the parameters for DescribeImportSnapshotTasks. -type DescribeImportSnapshotTasksInput struct { +type DescribeAvailabilityZonesInput 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"` + DryRun *bool `locationName:"dryRun" type:"boolean"` // One or more filters. - Filters []*Filter `locationNameList:"Filter" type:"list"` - - // A list of import snapshot task IDs. - ImportTaskIds []*string `locationName:"ImportTaskId" locationNameList:"ImportTaskId" type:"list"` + // + // * message - Information about the Availability Zone. + // + // * region-name - The name of the region for the Availability Zone (for + // example, us-east-1). + // + // * state - The state of the Availability Zone (available | information + // | impaired | unavailable). + // + // * zone-id - The ID of the Availability Zone (for example, use1-az1). + // + // * zone-name - The name of the Availability Zone (for example, us-east-1a). + 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 call with the returned NextToken value. - MaxResults *int64 `type:"integer"` + // The IDs of one or more Availability Zones. + ZoneIds []*string `locationName:"ZoneId" locationNameList:"ZoneId" type:"list"` - // A token that indicates the next page of results. - NextToken *string `type:"string"` + // The names of one or more Availability Zones. + ZoneNames []*string `locationName:"ZoneName" locationNameList:"ZoneName" type:"list"` } // String returns the string representation -func (s DescribeImportSnapshotTasksInput) String() string { +func (s DescribeAvailabilityZonesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeImportSnapshotTasksInput) GoString() string { +func (s DescribeAvailabilityZonesInput) GoString() string { return s.String() } // SetDryRun sets the DryRun field's value. -func (s *DescribeImportSnapshotTasksInput) SetDryRun(v bool) *DescribeImportSnapshotTasksInput { +func (s *DescribeAvailabilityZonesInput) SetDryRun(v bool) *DescribeAvailabilityZonesInput { s.DryRun = &v return s } // SetFilters sets the Filters field's value. -func (s *DescribeImportSnapshotTasksInput) SetFilters(v []*Filter) *DescribeImportSnapshotTasksInput { +func (s *DescribeAvailabilityZonesInput) SetFilters(v []*Filter) *DescribeAvailabilityZonesInput { s.Filters = v return s } -// SetImportTaskIds sets the ImportTaskIds field's value. -func (s *DescribeImportSnapshotTasksInput) SetImportTaskIds(v []*string) *DescribeImportSnapshotTasksInput { - s.ImportTaskIds = v +// SetZoneIds sets the ZoneIds field's value. +func (s *DescribeAvailabilityZonesInput) SetZoneIds(v []*string) *DescribeAvailabilityZonesInput { + s.ZoneIds = v return s } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeImportSnapshotTasksInput) SetMaxResults(v int64) *DescribeImportSnapshotTasksInput { - s.MaxResults = &v +// SetZoneNames sets the ZoneNames field's value. +func (s *DescribeAvailabilityZonesInput) SetZoneNames(v []*string) *DescribeAvailabilityZonesInput { + s.ZoneNames = v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeImportSnapshotTasksInput) SetNextToken(v string) *DescribeImportSnapshotTasksInput { - s.NextToken = &v +type DescribeAvailabilityZonesOutput struct { + _ struct{} `type:"structure"` + + // Information about one or more Availability Zones. + AvailabilityZones []*AvailabilityZone `locationName:"availabilityZoneInfo" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeAvailabilityZonesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAvailabilityZonesOutput) GoString() string { + return s.String() +} + +// SetAvailabilityZones sets the AvailabilityZones field's value. +func (s *DescribeAvailabilityZonesOutput) SetAvailabilityZones(v []*AvailabilityZone) *DescribeAvailabilityZonesOutput { + s.AvailabilityZones = v return s } -// Contains the output for DescribeImportSnapshotTasks. -type DescribeImportSnapshotTasksOutput struct { +// Contains the parameters for DescribeBundleTasks. +type DescribeBundleTasksInput struct { _ struct{} `type:"structure"` - // A list of zero or more import snapshot tasks that are currently active or - // were completed or canceled in the previous 7 days. - ImportSnapshotTasks []*ImportSnapshotTask `locationName:"importSnapshotTaskSet" locationNameList:"item" type:"list"` + // One or more bundle task IDs. + // + // Default: Describes all your bundle tasks. + BundleIds []*string `locationName:"BundleId" locationNameList:"BundleId" type:"list"` - // The token to use to get the next page of results. This value is null when - // there are no more results to return. - NextToken *string `locationName:"nextToken" 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 `locationName:"dryRun" type:"boolean"` + + // One or more filters. + // + // * bundle-id - The ID of the bundle task. + // + // * error-code - If the task failed, the error code returned. + // + // * error-message - If the task failed, the error message returned. + // + // * instance-id - The ID of the instance. + // + // * progress - The level of task completion, as a percentage (for example, + // 20%). + // + // * s3-bucket - The Amazon S3 bucket to store the AMI. + // + // * s3-prefix - The beginning of the AMI name. + // + // * start-time - The time the task started (for example, 2013-09-15T17:15:20.000Z). + // + // * state - The state of the task (pending | waiting-for-shutdown | bundling + // | storing | cancelling | complete | failed). + // + // * update-time - The time of the most recent update for the task. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` } // String returns the string representation -func (s DescribeImportSnapshotTasksOutput) String() string { +func (s DescribeBundleTasksInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeImportSnapshotTasksOutput) GoString() string { +func (s DescribeBundleTasksInput) GoString() string { return s.String() } -// SetImportSnapshotTasks sets the ImportSnapshotTasks field's value. -func (s *DescribeImportSnapshotTasksOutput) SetImportSnapshotTasks(v []*ImportSnapshotTask) *DescribeImportSnapshotTasksOutput { - s.ImportSnapshotTasks = v +// SetBundleIds sets the BundleIds field's value. +func (s *DescribeBundleTasksInput) SetBundleIds(v []*string) *DescribeBundleTasksInput { + s.BundleIds = v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeImportSnapshotTasksOutput) SetNextToken(v string) *DescribeImportSnapshotTasksOutput { - s.NextToken = &v +// SetDryRun sets the DryRun field's value. +func (s *DescribeBundleTasksInput) SetDryRun(v bool) *DescribeBundleTasksInput { + s.DryRun = &v return s } -// Contains the parameters for DescribeInstanceAttribute. -type DescribeInstanceAttributeInput struct { +// SetFilters sets the Filters field's value. +func (s *DescribeBundleTasksInput) SetFilters(v []*Filter) *DescribeBundleTasksInput { + s.Filters = v + return s +} + +// Contains the output of DescribeBundleTasks. +type DescribeBundleTasksOutput struct { _ struct{} `type:"structure"` - // The instance attribute. - // - // Note: The enaSupport attribute is not supported at this time. - // - // Attribute is a required field - Attribute *string `locationName:"attribute" type:"string" required:"true" enum:"InstanceAttributeName"` + // Information about one or more bundle tasks. + BundleTasks []*BundleTask `locationName:"bundleInstanceTasksSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeBundleTasksOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeBundleTasksOutput) GoString() string { + return s.String() +} + +// SetBundleTasks sets the BundleTasks field's value. +func (s *DescribeBundleTasksOutput) SetBundleTasks(v []*BundleTask) *DescribeBundleTasksOutput { + s.BundleTasks = v + return s +} + +type DescribeByoipCidrsInput 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 `locationName:"dryRun" type:"boolean"` + DryRun *bool `type:"boolean"` - // The ID of the instance. + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. // - // InstanceId is a required field - InstanceId *string `locationName:"instanceId" type:"string" required:"true"` + // MaxResults is a required field + MaxResults *int64 `min:"5" type:"integer" required:"true"` + + // The token for the next page of results. + NextToken *string `min:"1" type:"string"` } // String returns the string representation -func (s DescribeInstanceAttributeInput) String() string { +func (s DescribeByoipCidrsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeInstanceAttributeInput) GoString() string { +func (s DescribeByoipCidrsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeInstanceAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeInstanceAttributeInput"} - if s.Attribute == nil { - invalidParams.Add(request.NewErrParamRequired("Attribute")) +func (s *DescribeByoipCidrsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeByoipCidrsInput"} + if s.MaxResults == nil { + invalidParams.Add(request.NewErrParamRequired("MaxResults")) } - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) } if invalidParams.Len() > 0 { @@ -36998,1110 +42567,1047 @@ func (s *DescribeInstanceAttributeInput) Validate() error { return nil } -// SetAttribute sets the Attribute field's value. -func (s *DescribeInstanceAttributeInput) SetAttribute(v string) *DescribeInstanceAttributeInput { - s.Attribute = &v +// SetDryRun sets the DryRun field's value. +func (s *DescribeByoipCidrsInput) SetDryRun(v bool) *DescribeByoipCidrsInput { + s.DryRun = &v return s } -// SetDryRun sets the DryRun field's value. -func (s *DescribeInstanceAttributeInput) SetDryRun(v bool) *DescribeInstanceAttributeInput { - s.DryRun = &v +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeByoipCidrsInput) SetMaxResults(v int64) *DescribeByoipCidrsInput { + s.MaxResults = &v return s } -// SetInstanceId sets the InstanceId field's value. -func (s *DescribeInstanceAttributeInput) SetInstanceId(v string) *DescribeInstanceAttributeInput { - s.InstanceId = &v +// SetNextToken sets the NextToken field's value. +func (s *DescribeByoipCidrsInput) SetNextToken(v string) *DescribeByoipCidrsInput { + s.NextToken = &v return s } -// Describes an instance attribute. -type DescribeInstanceAttributeOutput struct { +type DescribeByoipCidrsOutput struct { _ struct{} `type:"structure"` - // The block device mapping of the instance. - BlockDeviceMappings []*InstanceBlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` + // Information about your address ranges. + ByoipCidrs []*ByoipCidr `locationName:"byoipCidrSet" locationNameList:"item" type:"list"` - // If the value is true, you can't terminate the instance through the Amazon - // EC2 console, CLI, or API; otherwise, you can. - DisableApiTermination *AttributeBooleanValue `locationName:"disableApiTermination" 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"` +} - // Indicates whether the instance is optimized for Amazon EBS I/O. - EbsOptimized *AttributeBooleanValue `locationName:"ebsOptimized" type:"structure"` +// String returns the string representation +func (s DescribeByoipCidrsOutput) String() string { + return awsutil.Prettify(s) +} - // Indicates whether enhanced networking with ENA is enabled. - EnaSupport *AttributeBooleanValue `locationName:"enaSupport" type:"structure"` +// GoString returns the string representation +func (s DescribeByoipCidrsOutput) GoString() string { + return s.String() +} - // The security groups associated with the instance. - Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` - - // The ID of the instance. - InstanceId *string `locationName:"instanceId" type:"string"` - - // Indicates whether an instance stops or terminates when you initiate shutdown - // from the instance (using the operating system command for system shutdown). - InstanceInitiatedShutdownBehavior *AttributeValue `locationName:"instanceInitiatedShutdownBehavior" type:"structure"` - - // The instance type. - InstanceType *AttributeValue `locationName:"instanceType" type:"structure"` +// SetByoipCidrs sets the ByoipCidrs field's value. +func (s *DescribeByoipCidrsOutput) SetByoipCidrs(v []*ByoipCidr) *DescribeByoipCidrsOutput { + s.ByoipCidrs = v + return s +} - // The kernel ID. - KernelId *AttributeValue `locationName:"kernel" type:"structure"` +// SetNextToken sets the NextToken field's value. +func (s *DescribeByoipCidrsOutput) SetNextToken(v string) *DescribeByoipCidrsOutput { + s.NextToken = &v + return s +} - // A list of product codes. - ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` +type DescribeCapacityReservationsInput struct { + _ struct{} `type:"structure"` - // The RAM disk ID. - RamdiskId *AttributeValue `locationName:"ramdisk" type:"structure"` + // The ID of the Capacity Reservation. + CapacityReservationIds []*string `locationName:"CapacityReservationId" locationNameList:"item" type:"list"` - // The device name of the root device volume (for example, /dev/sda1). - RootDeviceName *AttributeValue `locationName:"rootDeviceName" 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"` - // 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. - SourceDestCheck *AttributeBooleanValue `locationName:"sourceDestCheck" type:"structure"` + // One or more filters. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - // Indicates whether enhanced networking with the Intel 82599 Virtual Function - // interface is enabled. - SriovNetSupport *AttributeValue `locationName:"sriovNetSupport" type:"structure"` + // The maximum number of results to return for the request in a single page. + // The remaining results can be seen by sending another request with the returned + // nextToken value. + MaxResults *int64 `type:"integer"` - // The user data. - UserData *AttributeValue `locationName:"userData" type:"structure"` + // The token to retrieve the next page of results. + NextToken *string `type:"string"` } // String returns the string representation -func (s DescribeInstanceAttributeOutput) String() string { +func (s DescribeCapacityReservationsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeInstanceAttributeOutput) GoString() string { +func (s DescribeCapacityReservationsInput) GoString() string { return s.String() } -// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *DescribeInstanceAttributeOutput) SetBlockDeviceMappings(v []*InstanceBlockDeviceMapping) *DescribeInstanceAttributeOutput { - s.BlockDeviceMappings = v +// SetCapacityReservationIds sets the CapacityReservationIds field's value. +func (s *DescribeCapacityReservationsInput) SetCapacityReservationIds(v []*string) *DescribeCapacityReservationsInput { + s.CapacityReservationIds = v return s } -// SetDisableApiTermination sets the DisableApiTermination field's value. -func (s *DescribeInstanceAttributeOutput) SetDisableApiTermination(v *AttributeBooleanValue) *DescribeInstanceAttributeOutput { - s.DisableApiTermination = v +// SetDryRun sets the DryRun field's value. +func (s *DescribeCapacityReservationsInput) SetDryRun(v bool) *DescribeCapacityReservationsInput { + s.DryRun = &v return s } -// SetEbsOptimized sets the EbsOptimized field's value. -func (s *DescribeInstanceAttributeOutput) SetEbsOptimized(v *AttributeBooleanValue) *DescribeInstanceAttributeOutput { - s.EbsOptimized = v +// SetFilters sets the Filters field's value. +func (s *DescribeCapacityReservationsInput) SetFilters(v []*Filter) *DescribeCapacityReservationsInput { + s.Filters = v return s } -// SetEnaSupport sets the EnaSupport field's value. -func (s *DescribeInstanceAttributeOutput) SetEnaSupport(v *AttributeBooleanValue) *DescribeInstanceAttributeOutput { - s.EnaSupport = v +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeCapacityReservationsInput) SetMaxResults(v int64) *DescribeCapacityReservationsInput { + s.MaxResults = &v return s } -// SetGroups sets the Groups field's value. -func (s *DescribeInstanceAttributeOutput) SetGroups(v []*GroupIdentifier) *DescribeInstanceAttributeOutput { - s.Groups = v +// SetNextToken sets the NextToken field's value. +func (s *DescribeCapacityReservationsInput) SetNextToken(v string) *DescribeCapacityReservationsInput { + s.NextToken = &v return s } -// SetInstanceId sets the InstanceId field's value. -func (s *DescribeInstanceAttributeOutput) SetInstanceId(v string) *DescribeInstanceAttributeOutput { - s.InstanceId = &v - return s +type DescribeCapacityReservationsOutput struct { + _ struct{} `type:"structure"` + + // Information about the Capacity Reservations. + CapacityReservations []*CapacityReservation `locationName:"capacityReservationSet" 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"` } -// SetInstanceInitiatedShutdownBehavior sets the InstanceInitiatedShutdownBehavior field's value. -func (s *DescribeInstanceAttributeOutput) SetInstanceInitiatedShutdownBehavior(v *AttributeValue) *DescribeInstanceAttributeOutput { - s.InstanceInitiatedShutdownBehavior = v +// String returns the string representation +func (s DescribeCapacityReservationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCapacityReservationsOutput) GoString() string { + return s.String() +} + +// SetCapacityReservations sets the CapacityReservations field's value. +func (s *DescribeCapacityReservationsOutput) SetCapacityReservations(v []*CapacityReservation) *DescribeCapacityReservationsOutput { + s.CapacityReservations = v return s } -// SetInstanceType sets the InstanceType field's value. -func (s *DescribeInstanceAttributeOutput) SetInstanceType(v *AttributeValue) *DescribeInstanceAttributeOutput { - s.InstanceType = v +// SetNextToken sets the NextToken field's value. +func (s *DescribeCapacityReservationsOutput) SetNextToken(v string) *DescribeCapacityReservationsOutput { + s.NextToken = &v return s } -// SetKernelId sets the KernelId field's value. -func (s *DescribeInstanceAttributeOutput) SetKernelId(v *AttributeValue) *DescribeInstanceAttributeOutput { - s.KernelId = v +type DescribeClassicLinkInstancesInput 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 `locationName:"dryRun" type:"boolean"` + + // One or more filters. + // + // * group-id - The ID of a VPC security group that's associated with the + // instance. + // + // * instance-id - The ID of the instance. + // + // * 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. + // + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. + // + // * vpc-id - The ID of the VPC to which the instance is linked. + // + // vpc-id - The ID of the VPC that the instance is linked to. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // One or more instance IDs. Must be instances linked to a VPC through ClassicLink. + InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list"` + + // The maximum number of results to return for the request in a single page. + // The remaining results of the initial request can be seen by sending another + // request with the returned NextToken value. This value can be between 5 and + // 1000. If MaxResults is given a value larger than 1000, only 1000 results + // are returned. You cannot specify this parameter and the instance IDs parameter + // in the same request. + // + // Constraint: If the value is greater than 1000, we return only 1000 items. + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // The token to retrieve the next page of results. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s DescribeClassicLinkInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClassicLinkInstancesInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeClassicLinkInstancesInput) SetDryRun(v bool) *DescribeClassicLinkInstancesInput { + s.DryRun = &v return s } -// SetProductCodes sets the ProductCodes field's value. -func (s *DescribeInstanceAttributeOutput) SetProductCodes(v []*ProductCode) *DescribeInstanceAttributeOutput { - s.ProductCodes = v +// SetFilters sets the Filters field's value. +func (s *DescribeClassicLinkInstancesInput) SetFilters(v []*Filter) *DescribeClassicLinkInstancesInput { + s.Filters = v return s } -// SetRamdiskId sets the RamdiskId field's value. -func (s *DescribeInstanceAttributeOutput) SetRamdiskId(v *AttributeValue) *DescribeInstanceAttributeOutput { - s.RamdiskId = v +// SetInstanceIds sets the InstanceIds field's value. +func (s *DescribeClassicLinkInstancesInput) SetInstanceIds(v []*string) *DescribeClassicLinkInstancesInput { + s.InstanceIds = v return s } -// SetRootDeviceName sets the RootDeviceName field's value. -func (s *DescribeInstanceAttributeOutput) SetRootDeviceName(v *AttributeValue) *DescribeInstanceAttributeOutput { - s.RootDeviceName = v +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeClassicLinkInstancesInput) SetMaxResults(v int64) *DescribeClassicLinkInstancesInput { + s.MaxResults = &v return s } -// SetSourceDestCheck sets the SourceDestCheck field's value. -func (s *DescribeInstanceAttributeOutput) SetSourceDestCheck(v *AttributeBooleanValue) *DescribeInstanceAttributeOutput { - s.SourceDestCheck = v +// SetNextToken sets the NextToken field's value. +func (s *DescribeClassicLinkInstancesInput) SetNextToken(v string) *DescribeClassicLinkInstancesInput { + s.NextToken = &v return s } -// SetSriovNetSupport sets the SriovNetSupport field's value. -func (s *DescribeInstanceAttributeOutput) SetSriovNetSupport(v *AttributeValue) *DescribeInstanceAttributeOutput { - s.SriovNetSupport = v +type DescribeClassicLinkInstancesOutput struct { + _ struct{} `type:"structure"` + + // Information about one or more linked EC2-Classic instances. + Instances []*ClassicLinkInstance `locationName:"instancesSet" 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 DescribeClassicLinkInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClassicLinkInstancesOutput) GoString() string { + return s.String() +} + +// SetInstances sets the Instances field's value. +func (s *DescribeClassicLinkInstancesOutput) SetInstances(v []*ClassicLinkInstance) *DescribeClassicLinkInstancesOutput { + s.Instances = v return s } -// SetUserData sets the UserData field's value. -func (s *DescribeInstanceAttributeOutput) SetUserData(v *AttributeValue) *DescribeInstanceAttributeOutput { - s.UserData = v +// SetNextToken sets the NextToken field's value. +func (s *DescribeClassicLinkInstancesOutput) SetNextToken(v string) *DescribeClassicLinkInstancesOutput { + s.NextToken = &v return s } -type DescribeInstanceCreditSpecificationsInput struct { +type DescribeClientVpnAuthorizationRulesInput struct { _ struct{} `type:"structure"` + // The ID of the Client VPN endpoint. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *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"` - // One or more filters. - // - // * instance-id - The ID of the instance. + // One or more filters. Filter names and values are case-sensitive. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - // One or more instance IDs. - // - // Default: Describes all your instances. - // - // Constraints: Maximum 1000 explicitly specified instance IDs. - InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" 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 5 and 1000. You cannot specify this parameter and the - // instance IDs parameter in the same call. - MaxResults *int64 `type:"integer"` + // The maximum number of results to return for the request in a single page. + // The remaining results can be seen by sending another request with the nextToken + // value. + MaxResults *int64 `min:"5" type:"integer"` // The token to retrieve the next page of results. - NextToken *string `type:"string"` + NextToken *string `min:"1" type:"string"` } // String returns the string representation -func (s DescribeInstanceCreditSpecificationsInput) String() string { +func (s DescribeClientVpnAuthorizationRulesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeInstanceCreditSpecificationsInput) GoString() string { +func (s DescribeClientVpnAuthorizationRulesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeClientVpnAuthorizationRulesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeClientVpnAuthorizationRulesInput"} + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *DescribeClientVpnAuthorizationRulesInput) SetClientVpnEndpointId(v string) *DescribeClientVpnAuthorizationRulesInput { + s.ClientVpnEndpointId = &v + return s +} + // SetDryRun sets the DryRun field's value. -func (s *DescribeInstanceCreditSpecificationsInput) SetDryRun(v bool) *DescribeInstanceCreditSpecificationsInput { +func (s *DescribeClientVpnAuthorizationRulesInput) SetDryRun(v bool) *DescribeClientVpnAuthorizationRulesInput { s.DryRun = &v return s } // SetFilters sets the Filters field's value. -func (s *DescribeInstanceCreditSpecificationsInput) SetFilters(v []*Filter) *DescribeInstanceCreditSpecificationsInput { +func (s *DescribeClientVpnAuthorizationRulesInput) SetFilters(v []*Filter) *DescribeClientVpnAuthorizationRulesInput { s.Filters = v return s } -// SetInstanceIds sets the InstanceIds field's value. -func (s *DescribeInstanceCreditSpecificationsInput) SetInstanceIds(v []*string) *DescribeInstanceCreditSpecificationsInput { - s.InstanceIds = v - return s -} - // SetMaxResults sets the MaxResults field's value. -func (s *DescribeInstanceCreditSpecificationsInput) SetMaxResults(v int64) *DescribeInstanceCreditSpecificationsInput { +func (s *DescribeClientVpnAuthorizationRulesInput) SetMaxResults(v int64) *DescribeClientVpnAuthorizationRulesInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. -func (s *DescribeInstanceCreditSpecificationsInput) SetNextToken(v string) *DescribeInstanceCreditSpecificationsInput { +func (s *DescribeClientVpnAuthorizationRulesInput) SetNextToken(v string) *DescribeClientVpnAuthorizationRulesInput { s.NextToken = &v return s } -type DescribeInstanceCreditSpecificationsOutput struct { +type DescribeClientVpnAuthorizationRulesOutput struct { _ struct{} `type:"structure"` - // Information about the credit option for CPU usage of an instance. - InstanceCreditSpecifications []*InstanceCreditSpecification `locationName:"instanceCreditSpecificationSet" locationNameList:"item" type:"list"` + // Information about the authorization rules. + AuthorizationRules []*AuthorizationRule `locationName:"authorizationRule" 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"` + NextToken *string `locationName:"nextToken" min:"1" type:"string"` } // String returns the string representation -func (s DescribeInstanceCreditSpecificationsOutput) String() string { +func (s DescribeClientVpnAuthorizationRulesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeInstanceCreditSpecificationsOutput) GoString() string { +func (s DescribeClientVpnAuthorizationRulesOutput) GoString() string { return s.String() } -// SetInstanceCreditSpecifications sets the InstanceCreditSpecifications field's value. -func (s *DescribeInstanceCreditSpecificationsOutput) SetInstanceCreditSpecifications(v []*InstanceCreditSpecification) *DescribeInstanceCreditSpecificationsOutput { - s.InstanceCreditSpecifications = v +// SetAuthorizationRules sets the AuthorizationRules field's value. +func (s *DescribeClientVpnAuthorizationRulesOutput) SetAuthorizationRules(v []*AuthorizationRule) *DescribeClientVpnAuthorizationRulesOutput { + s.AuthorizationRules = v return s } // SetNextToken sets the NextToken field's value. -func (s *DescribeInstanceCreditSpecificationsOutput) SetNextToken(v string) *DescribeInstanceCreditSpecificationsOutput { +func (s *DescribeClientVpnAuthorizationRulesOutput) SetNextToken(v string) *DescribeClientVpnAuthorizationRulesOutput { s.NextToken = &v return s } -// Contains the parameters for DescribeInstanceStatus. -type DescribeInstanceStatusInput struct { +type DescribeClientVpnConnectionsInput struct { _ struct{} `type:"structure"` + // The ID of the Client VPN endpoint. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *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 `locationName:"dryRun" type:"boolean"` + DryRun *bool `type:"boolean"` - // One or more filters. - // - // * availability-zone - The Availability Zone of the instance. - // - // * event.code - The code for the scheduled event (instance-reboot | system-reboot - // | system-maintenance | instance-retirement | instance-stop). - // - // * event.description - A description of the event. - // - // * event.not-after - The latest end time for the scheduled event (for example, - // 2014-09-15T17:15:20.000Z). - // - // * event.not-before - The earliest start time for the scheduled event (for - // example, 2014-09-15T17:15:20.000Z). - // - // * instance-state-code - The code for the instance state, as a 16-bit unsigned - // integer. The high byte is used for internal purposes and should be ignored. - // The low byte is set based on the state represented. The valid values are - // 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), - // and 80 (stopped). - // - // * instance-state-name - The state of the instance (pending | running | - // shutting-down | terminated | stopping | stopped). - // - // * instance-status.reachability - Filters on instance status where the - // name is reachability (passed | failed | initializing | insufficient-data). - // - // * instance-status.status - The status of the instance (ok | impaired | - // initializing | insufficient-data | not-applicable). - // - // * system-status.reachability - Filters on system status where the name - // is reachability (passed | failed | initializing | insufficient-data). - // - // * system-status.status - The system status of the instance (ok | impaired - // | initializing | insufficient-data | not-applicable). + // One or more filters. Filter names and values are case-sensitive. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - // When true, includes the health status for all instances. When false, includes - // the health status for running instances only. - // - // Default: false - IncludeAllInstances *bool `locationName:"includeAllInstances" type:"boolean"` - - // One or more instance IDs. - // - // Default: Describes all your instances. - // - // Constraints: Maximum 100 explicitly specified instance IDs. - InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" 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 5 and 1000. You cannot specify this parameter and the - // instance IDs parameter in the same call. - MaxResults *int64 `type:"integer"` + // The maximum number of results to return for the request in a single page. + // The remaining results can be seen by sending another request with the nextToken + // value. + MaxResults *int64 `min:"5" type:"integer"` // The token to retrieve the next page of results. - NextToken *string `type:"string"` + NextToken *string `min:"1" type:"string"` } // String returns the string representation -func (s DescribeInstanceStatusInput) String() string { +func (s DescribeClientVpnConnectionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeInstanceStatusInput) GoString() string { +func (s DescribeClientVpnConnectionsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeClientVpnConnectionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeClientVpnConnectionsInput"} + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *DescribeClientVpnConnectionsInput) SetClientVpnEndpointId(v string) *DescribeClientVpnConnectionsInput { + s.ClientVpnEndpointId = &v + return s +} + // SetDryRun sets the DryRun field's value. -func (s *DescribeInstanceStatusInput) SetDryRun(v bool) *DescribeInstanceStatusInput { +func (s *DescribeClientVpnConnectionsInput) SetDryRun(v bool) *DescribeClientVpnConnectionsInput { s.DryRun = &v return s } // SetFilters sets the Filters field's value. -func (s *DescribeInstanceStatusInput) SetFilters(v []*Filter) *DescribeInstanceStatusInput { +func (s *DescribeClientVpnConnectionsInput) SetFilters(v []*Filter) *DescribeClientVpnConnectionsInput { s.Filters = v return s } -// SetIncludeAllInstances sets the IncludeAllInstances field's value. -func (s *DescribeInstanceStatusInput) SetIncludeAllInstances(v bool) *DescribeInstanceStatusInput { - s.IncludeAllInstances = &v +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeClientVpnConnectionsInput) SetMaxResults(v int64) *DescribeClientVpnConnectionsInput { + s.MaxResults = &v return s } -// SetInstanceIds sets the InstanceIds field's value. -func (s *DescribeInstanceStatusInput) SetInstanceIds(v []*string) *DescribeInstanceStatusInput { - s.InstanceIds = v +// SetNextToken sets the NextToken field's value. +func (s *DescribeClientVpnConnectionsInput) SetNextToken(v string) *DescribeClientVpnConnectionsInput { + s.NextToken = &v + return s +} + +type DescribeClientVpnConnectionsOutput struct { + _ struct{} `type:"structure"` + + // Information about the active and terminated client connections. + Connections []*ClientVpnConnection `locationName:"connections" 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" min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeClientVpnConnectionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClientVpnConnectionsOutput) GoString() string { + return s.String() +} + +// SetConnections sets the Connections field's value. +func (s *DescribeClientVpnConnectionsOutput) SetConnections(v []*ClientVpnConnection) *DescribeClientVpnConnectionsOutput { + s.Connections = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeClientVpnConnectionsOutput) SetNextToken(v string) *DescribeClientVpnConnectionsOutput { + s.NextToken = &v + return s +} + +type DescribeClientVpnEndpointsInput struct { + _ struct{} `type:"structure"` + + // The ID of the Client VPN endpoint. + ClientVpnEndpointIds []*string `locationName:"ClientVpnEndpointId" 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. Filter names and values are case-sensitive. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The maximum number of results to return for the request in a single page. + // The remaining results can be seen by sending another request with the nextToken + // value. + MaxResults *int64 `min:"5" type:"integer"` + + // The token to retrieve the next page of results. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeClientVpnEndpointsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClientVpnEndpointsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeClientVpnEndpointsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeClientVpnEndpointsInput"} + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientVpnEndpointIds sets the ClientVpnEndpointIds field's value. +func (s *DescribeClientVpnEndpointsInput) SetClientVpnEndpointIds(v []*string) *DescribeClientVpnEndpointsInput { + s.ClientVpnEndpointIds = v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeClientVpnEndpointsInput) SetDryRun(v bool) *DescribeClientVpnEndpointsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeClientVpnEndpointsInput) SetFilters(v []*Filter) *DescribeClientVpnEndpointsInput { + s.Filters = v return s } // SetMaxResults sets the MaxResults field's value. -func (s *DescribeInstanceStatusInput) SetMaxResults(v int64) *DescribeInstanceStatusInput { +func (s *DescribeClientVpnEndpointsInput) SetMaxResults(v int64) *DescribeClientVpnEndpointsInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. -func (s *DescribeInstanceStatusInput) SetNextToken(v string) *DescribeInstanceStatusInput { +func (s *DescribeClientVpnEndpointsInput) SetNextToken(v string) *DescribeClientVpnEndpointsInput { s.NextToken = &v return s } -// Contains the output of DescribeInstanceStatus. -type DescribeInstanceStatusOutput struct { +type DescribeClientVpnEndpointsOutput struct { _ struct{} `type:"structure"` - // One or more instance status descriptions. - InstanceStatuses []*InstanceStatus `locationName:"instanceStatusSet" locationNameList:"item" type:"list"` + // Information about the Client VPN endpoints. + ClientVpnEndpoints []*ClientVpnEndpoint `locationName:"clientVpnEndpoint" 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"` + NextToken *string `locationName:"nextToken" min:"1" type:"string"` } // String returns the string representation -func (s DescribeInstanceStatusOutput) String() string { +func (s DescribeClientVpnEndpointsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeInstanceStatusOutput) GoString() string { +func (s DescribeClientVpnEndpointsOutput) GoString() string { return s.String() } -// SetInstanceStatuses sets the InstanceStatuses field's value. -func (s *DescribeInstanceStatusOutput) SetInstanceStatuses(v []*InstanceStatus) *DescribeInstanceStatusOutput { - s.InstanceStatuses = v +// SetClientVpnEndpoints sets the ClientVpnEndpoints field's value. +func (s *DescribeClientVpnEndpointsOutput) SetClientVpnEndpoints(v []*ClientVpnEndpoint) *DescribeClientVpnEndpointsOutput { + s.ClientVpnEndpoints = v return s } // SetNextToken sets the NextToken field's value. -func (s *DescribeInstanceStatusOutput) SetNextToken(v string) *DescribeInstanceStatusOutput { +func (s *DescribeClientVpnEndpointsOutput) SetNextToken(v string) *DescribeClientVpnEndpointsOutput { s.NextToken = &v return s } -// Contains the parameters for DescribeInstances. -type DescribeInstancesInput struct { +type DescribeClientVpnRoutesInput struct { _ struct{} `type:"structure"` + // The ID of the Client VPN endpoint. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *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 `locationName:"dryRun" type:"boolean"` + DryRun *bool `type:"boolean"` - // One or more filters. - // - // * affinity - The affinity setting for an instance running on a Dedicated - // Host (default | host). - // - // * architecture - The instance architecture (i386 | x86_64). - // - // * availability-zone - The Availability Zone of the instance. - // - // * block-device-mapping.attach-time - The attach time for an EBS volume - // mapped to the instance, for example, 2010-09-15T17:15:20.000Z. - // - // * block-device-mapping.delete-on-termination - A Boolean that indicates - // whether the EBS volume is deleted on instance termination. - // - // * block-device-mapping.device-name - The device name specified in the - // block device mapping (for example, /dev/sdh or xvdh). - // - // * block-device-mapping.status - The status for the EBS volume (attaching - // | attached | detaching | detached). - // - // * block-device-mapping.volume-id - The volume ID of the EBS volume. - // - // * client-token - The idempotency token you provided when you launched - // the instance. - // - // * dns-name - The public DNS name of the instance. - // - // * group-id - The ID of the security group for the instance. EC2-Classic - // only. - // - // * group-name - The name of the security group for the instance. EC2-Classic - // only. - // - // * host-id - The ID of the Dedicated Host on which the instance is running, - // if applicable. - // - // * hypervisor - The hypervisor type of the instance (ovm | xen). - // - // * iam-instance-profile.arn - The instance profile associated with the - // instance. Specified as an ARN. - // - // * image-id - The ID of the image used to launch the instance. - // - // * instance-id - The ID of the instance. - // - // * instance-lifecycle - Indicates whether this is a Spot Instance or a - // Scheduled Instance (spot | scheduled). - // - // * instance-state-code - The state of the instance, as a 16-bit unsigned - // integer. The high byte is used for internal purposes and should be ignored. - // The low byte is set based on the state represented. The valid values are: - // 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), - // and 80 (stopped). - // - // * instance-state-name - The state of the instance (pending | running | - // shutting-down | terminated | stopping | stopped). - // - // * instance-type - The type of instance (for example, t2.micro). - // - // * instance.group-id - The ID of the security group for the instance. - // - // * instance.group-name - The name of the security group for the instance. - // - // - // * ip-address - The public IPv4 address of the instance. - // - // * kernel-id - The kernel ID. - // - // * key-name - The name of the key pair used when the instance was launched. - // - // * launch-index - When launching multiple instances, this is the index - // for the instance in the launch group (for example, 0, 1, 2, and so on). - // - // - // * launch-time - The time when the instance was launched. - // - // * monitoring-state - Indicates whether detailed monitoring is enabled - // (disabled | enabled). - // - // * network-interface.addresses.private-ip-address - The private IPv4 address - // associated with the network interface. - // - // * network-interface.addresses.primary - Specifies whether the IPv4 address - // of the network interface is the primary private IPv4 address. - // - // * network-interface.addresses.association.public-ip - The ID of the association - // of an Elastic IP address (IPv4) with a network interface. - // - // * network-interface.addresses.association.ip-owner-id - The owner ID of - // the private IPv4 address associated with the network interface. - // - // * network-interface.association.public-ip - The address of the Elastic - // IP address (IPv4) bound to the network interface. - // - // * network-interface.association.ip-owner-id - The owner of the Elastic - // IP address (IPv4) associated with the network interface. - // - // * network-interface.association.allocation-id - The allocation ID returned - // when you allocated the Elastic IP address (IPv4) for your network interface. - // - // * network-interface.association.association-id - The association ID returned - // when the network interface was associated with an IPv4 address. - // - // * network-interface.attachment.attachment-id - The ID of the interface - // attachment. - // - // * network-interface.attachment.instance-id - The ID of the instance to - // which the network interface is attached. - // - // * network-interface.attachment.instance-owner-id - The owner ID of the - // instance to which the network interface is attached. - // - // * network-interface.attachment.device-index - The device index to which - // the network interface is attached. - // - // * network-interface.attachment.status - The status of the attachment (attaching - // | attached | detaching | detached). - // - // * network-interface.attachment.attach-time - The time that the network - // interface was attached to an instance. - // - // * network-interface.attachment.delete-on-termination - Specifies whether - // the attachment is deleted when an instance is terminated. - // - // * network-interface.availability-zone - The Availability Zone for the - // network interface. - // - // * network-interface.description - The description of the network interface. - // - // * network-interface.group-id - The ID of a security group associated with - // the network interface. - // - // * network-interface.group-name - The name of a security group associated - // with the network interface. - // - // * network-interface.ipv6-addresses.ipv6-address - The IPv6 address associated - // with the network interface. - // - // * network-interface.mac-address - The MAC address of the network interface. - // - // * network-interface.network-interface-id - The ID of the network interface. - // - // * network-interface.owner-id - The ID of the owner of the network interface. - // - // * network-interface.private-dns-name - The private DNS name of the network - // interface. - // - // * 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. - // - // * network-interface.status - The status of the network interface (available) - // | in-use). - // - // * network-interface.source-dest-check - Whether the network interface - // performs source/destination checking. A value of true means that checking - // is enabled, and false means that checking is disabled. The value must - // be false for the network interface to perform network address translation - // (NAT) in your VPC. - // - // * network-interface.subnet-id - The ID of the subnet for the network interface. - // - // * network-interface.vpc-id - The ID of the VPC for the network interface. - // - // * owner-id - The AWS account ID of the instance owner. - // - // * placement-group-name - The name of the placement group for the instance. - // - // * platform - The platform. Use windows if you have Windows instances; - // otherwise, leave blank. - // - // * private-dns-name - The private IPv4 DNS name of the instance. - // - // * private-ip-address - The private IPv4 address of the instance. - // - // * product-code - The product code associated with the AMI used to launch - // the instance. - // - // * product-code.type - The type of product code (devpay | marketplace). - // - // * ramdisk-id - The RAM disk ID. - // - // * reason - The reason for the current state of the instance (for example, - // shows "User Initiated [date]" when you stop or terminate the instance). - // 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). - // - // * 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 - // one-to-one relationship with an instance launch request, but can be associated - // with more than one instance if you launch multiple instances using the - // same launch request. For example, if you launch one instance, you get - // one reservation ID. If you launch ten instances using the same launch - // request, you also get one reservation ID. - // - // * root-device-name - The device name of the root device volume (for example, - // /dev/sda1). - // - // * root-device-type - The type of the root device volume (ebs | instance-store). - // - // * source-dest-check - Indicates whether the instance performs source/destination - // checking. 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 network address translation (NAT) in your VPC. - // - // * spot-instance-request-id - The ID of the Spot Instance request. - // - // * state-reason-code - The reason code for the state change. - // - // * state-reason-message - A message that describes the state change. - // - // * subnet-id - The ID of the subnet for the instance. - // - // * 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. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources that have a tag with a specific key, regardless - // of the tag value. - // - // * tenancy - The tenancy of an instance (dedicated | default | host). - // - // * virtualization-type - The virtualization type of the instance (paravirtual - // | hvm). - // - // * vpc-id - The ID of the VPC that the instance is running in. + // One or more filters. Filter names and values are case-sensitive. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - // One or more instance IDs. - // - // Default: Describes all your instances. - InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" 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 5 and 1000. You cannot specify this parameter and the - // instance IDs parameter in the same call. - MaxResults *int64 `locationName:"maxResults" type:"integer"` + // The maximum number of results to return for the request in a single page. + // The remaining results can be seen by sending another request with the nextToken + // value. + MaxResults *int64 `min:"5" type:"integer"` - // The token to request the next page of results. - NextToken *string `locationName:"nextToken" type:"string"` + // The token to retrieve the next page of results. + NextToken *string `min:"1" type:"string"` } // String returns the string representation -func (s DescribeInstancesInput) String() string { +func (s DescribeClientVpnRoutesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeInstancesInput) GoString() string { +func (s DescribeClientVpnRoutesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeClientVpnRoutesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeClientVpnRoutesInput"} + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *DescribeClientVpnRoutesInput) SetClientVpnEndpointId(v string) *DescribeClientVpnRoutesInput { + s.ClientVpnEndpointId = &v + return s +} + // SetDryRun sets the DryRun field's value. -func (s *DescribeInstancesInput) SetDryRun(v bool) *DescribeInstancesInput { +func (s *DescribeClientVpnRoutesInput) SetDryRun(v bool) *DescribeClientVpnRoutesInput { s.DryRun = &v return s } // SetFilters sets the Filters field's value. -func (s *DescribeInstancesInput) SetFilters(v []*Filter) *DescribeInstancesInput { +func (s *DescribeClientVpnRoutesInput) SetFilters(v []*Filter) *DescribeClientVpnRoutesInput { s.Filters = v return s } -// SetInstanceIds sets the InstanceIds field's value. -func (s *DescribeInstancesInput) SetInstanceIds(v []*string) *DescribeInstancesInput { - s.InstanceIds = v - return s -} - // SetMaxResults sets the MaxResults field's value. -func (s *DescribeInstancesInput) SetMaxResults(v int64) *DescribeInstancesInput { +func (s *DescribeClientVpnRoutesInput) SetMaxResults(v int64) *DescribeClientVpnRoutesInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. -func (s *DescribeInstancesInput) SetNextToken(v string) *DescribeInstancesInput { +func (s *DescribeClientVpnRoutesInput) SetNextToken(v string) *DescribeClientVpnRoutesInput { s.NextToken = &v return s } -// Contains the output of DescribeInstances. -type DescribeInstancesOutput struct { +type DescribeClientVpnRoutesOutput 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"` + NextToken *string `locationName:"nextToken" min:"1" type:"string"` - // Zero or more reservations. - Reservations []*Reservation `locationName:"reservationSet" locationNameList:"item" type:"list"` + // Information about the Client VPN endpoint routes. + Routes []*ClientVpnRoute `locationName:"routes" locationNameList:"item" type:"list"` } // String returns the string representation -func (s DescribeInstancesOutput) String() string { +func (s DescribeClientVpnRoutesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeInstancesOutput) GoString() string { +func (s DescribeClientVpnRoutesOutput) GoString() string { return s.String() } // SetNextToken sets the NextToken field's value. -func (s *DescribeInstancesOutput) SetNextToken(v string) *DescribeInstancesOutput { +func (s *DescribeClientVpnRoutesOutput) SetNextToken(v string) *DescribeClientVpnRoutesOutput { s.NextToken = &v return s } -// SetReservations sets the Reservations field's value. -func (s *DescribeInstancesOutput) SetReservations(v []*Reservation) *DescribeInstancesOutput { - s.Reservations = v +// SetRoutes sets the Routes field's value. +func (s *DescribeClientVpnRoutesOutput) SetRoutes(v []*ClientVpnRoute) *DescribeClientVpnRoutesOutput { + s.Routes = v return s } -// Contains the parameters for DescribeInternetGateways. -type DescribeInternetGatewaysInput struct { +type DescribeClientVpnTargetNetworksInput struct { _ struct{} `type:"structure"` + // The IDs of the target network associations. + AssociationIds []*string `locationNameList:"item" type:"list"` + + // The ID of the Client VPN endpoint. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *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 `locationName:"dryRun" type:"boolean"` + DryRun *bool `type:"boolean"` - // One or more filters. - // - // * attachment.state - The current state of the attachment between the gateway - // and the VPC (available). Present only if a VPC is attached. - // - // * attachment.vpc-id - The ID of an attached VPC. - // - // * internet-gateway-id - The ID of the Internet 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 - // and the value TeamA, specify tag:Owner for the filter name and TeamA for - // the filter value. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. + // One or more filters. Filter names and values are case-sensitive. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - // One or more internet gateway IDs. - // - // Default: Describes all your internet gateways. - InternetGatewayIds []*string `locationName:"internetGatewayId" locationNameList:"item" type:"list"` + // The maximum number of results to return for the request in a single page. + // The remaining results can be seen by sending another request with the nextToken + // value. + MaxResults *int64 `min:"5" type:"integer"` + + // The token to retrieve the next page of results. + NextToken *string `min:"1" type:"string"` } // String returns the string representation -func (s DescribeInternetGatewaysInput) String() string { +func (s DescribeClientVpnTargetNetworksInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeInternetGatewaysInput) GoString() string { +func (s DescribeClientVpnTargetNetworksInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeClientVpnTargetNetworksInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeClientVpnTargetNetworksInput"} + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAssociationIds sets the AssociationIds field's value. +func (s *DescribeClientVpnTargetNetworksInput) SetAssociationIds(v []*string) *DescribeClientVpnTargetNetworksInput { + s.AssociationIds = v + return s +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *DescribeClientVpnTargetNetworksInput) SetClientVpnEndpointId(v string) *DescribeClientVpnTargetNetworksInput { + s.ClientVpnEndpointId = &v + return s +} + // SetDryRun sets the DryRun field's value. -func (s *DescribeInternetGatewaysInput) SetDryRun(v bool) *DescribeInternetGatewaysInput { +func (s *DescribeClientVpnTargetNetworksInput) SetDryRun(v bool) *DescribeClientVpnTargetNetworksInput { s.DryRun = &v return s } // SetFilters sets the Filters field's value. -func (s *DescribeInternetGatewaysInput) SetFilters(v []*Filter) *DescribeInternetGatewaysInput { +func (s *DescribeClientVpnTargetNetworksInput) SetFilters(v []*Filter) *DescribeClientVpnTargetNetworksInput { s.Filters = v return s } -// SetInternetGatewayIds sets the InternetGatewayIds field's value. -func (s *DescribeInternetGatewaysInput) SetInternetGatewayIds(v []*string) *DescribeInternetGatewaysInput { - s.InternetGatewayIds = v +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeClientVpnTargetNetworksInput) SetMaxResults(v int64) *DescribeClientVpnTargetNetworksInput { + s.MaxResults = &v return s } -// Contains the output of DescribeInternetGateways. -type DescribeInternetGatewaysOutput struct { +// SetNextToken sets the NextToken field's value. +func (s *DescribeClientVpnTargetNetworksInput) SetNextToken(v string) *DescribeClientVpnTargetNetworksInput { + s.NextToken = &v + return s +} + +type DescribeClientVpnTargetNetworksOutput struct { _ struct{} `type:"structure"` - // Information about one or more internet gateways. - InternetGateways []*InternetGateway `locationName:"internetGatewaySet" locationNameList:"item" type:"list"` + // Information about the associated target networks. + ClientVpnTargetNetworks []*TargetNetwork `locationName:"clientVpnTargetNetworks" 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" min:"1" type:"string"` } // String returns the string representation -func (s DescribeInternetGatewaysOutput) String() string { +func (s DescribeClientVpnTargetNetworksOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeInternetGatewaysOutput) GoString() string { +func (s DescribeClientVpnTargetNetworksOutput) GoString() string { return s.String() } -// SetInternetGateways sets the InternetGateways field's value. -func (s *DescribeInternetGatewaysOutput) SetInternetGateways(v []*InternetGateway) *DescribeInternetGatewaysOutput { - s.InternetGateways = v +// SetClientVpnTargetNetworks sets the ClientVpnTargetNetworks field's value. +func (s *DescribeClientVpnTargetNetworksOutput) SetClientVpnTargetNetworks(v []*TargetNetwork) *DescribeClientVpnTargetNetworksOutput { + s.ClientVpnTargetNetworks = v return s } -// Contains the parameters for DescribeKeyPairs. -type DescribeKeyPairsInput struct { +// SetNextToken sets the NextToken field's value. +func (s *DescribeClientVpnTargetNetworksOutput) SetNextToken(v string) *DescribeClientVpnTargetNetworksOutput { + s.NextToken = &v + return s +} + +// Contains the parameters for DescribeConversionTasks. +type DescribeConversionTasksInput struct { _ struct{} `type:"structure"` + // One or more conversion task IDs. + ConversionTaskIds []*string `locationName:"conversionTaskId" 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 `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * fingerprint - The fingerprint of the key pair. - // - // * key-name - The name of the key pair. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // One or more key pair names. - // - // Default: Describes all your key pairs. - KeyNames []*string `locationName:"KeyName" locationNameList:"KeyName" type:"list"` } // String returns the string representation -func (s DescribeKeyPairsInput) String() string { +func (s DescribeConversionTasksInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeKeyPairsInput) GoString() string { +func (s DescribeConversionTasksInput) GoString() string { return s.String() } -// SetDryRun sets the DryRun field's value. -func (s *DescribeKeyPairsInput) SetDryRun(v bool) *DescribeKeyPairsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeKeyPairsInput) SetFilters(v []*Filter) *DescribeKeyPairsInput { - s.Filters = v +// SetConversionTaskIds sets the ConversionTaskIds field's value. +func (s *DescribeConversionTasksInput) SetConversionTaskIds(v []*string) *DescribeConversionTasksInput { + s.ConversionTaskIds = v return s } -// SetKeyNames sets the KeyNames field's value. -func (s *DescribeKeyPairsInput) SetKeyNames(v []*string) *DescribeKeyPairsInput { - s.KeyNames = v +// SetDryRun sets the DryRun field's value. +func (s *DescribeConversionTasksInput) SetDryRun(v bool) *DescribeConversionTasksInput { + s.DryRun = &v return s } -// Contains the output of DescribeKeyPairs. -type DescribeKeyPairsOutput struct { +// Contains the output for DescribeConversionTasks. +type DescribeConversionTasksOutput struct { _ struct{} `type:"structure"` - // Information about one or more key pairs. - KeyPairs []*KeyPairInfo `locationName:"keySet" locationNameList:"item" type:"list"` + // Information about the conversion tasks. + ConversionTasks []*ConversionTask `locationName:"conversionTasks" locationNameList:"item" type:"list"` } // String returns the string representation -func (s DescribeKeyPairsOutput) String() string { +func (s DescribeConversionTasksOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeKeyPairsOutput) GoString() string { +func (s DescribeConversionTasksOutput) GoString() string { return s.String() } -// SetKeyPairs sets the KeyPairs field's value. -func (s *DescribeKeyPairsOutput) SetKeyPairs(v []*KeyPairInfo) *DescribeKeyPairsOutput { - s.KeyPairs = v +// SetConversionTasks sets the ConversionTasks field's value. +func (s *DescribeConversionTasksOutput) SetConversionTasks(v []*ConversionTask) *DescribeConversionTasksOutput { + s.ConversionTasks = v return s } -type DescribeLaunchTemplateVersionsInput struct { +// Contains the parameters for DescribeCustomerGateways. +type DescribeCustomerGatewaysInput struct { _ struct{} `type:"structure"` + // One or more customer gateway IDs. + // + // Default: Describes all your customer gateways. + CustomerGatewayIds []*string `locationName:"CustomerGatewayId" locationNameList:"CustomerGatewayId" 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"` + DryRun *bool `locationName:"dryRun" type:"boolean"` // One or more filters. // - // * create-time - The time the launch template version was created. - // - // * ebs-optimized - A boolean that indicates whether the instance is optimized - // for Amazon EBS I/O. + // * bgp-asn - The customer gateway's Border Gateway Protocol (BGP) Autonomous + // System Number (ASN). // - // * iam-instance-profile - The ARN of the IAM instance profile. + // * customer-gateway-id - The ID of the customer gateway. // - // * image-id - The ID of the AMI. + // * ip-address - The IP address of the customer gateway's Internet-routable + // external interface. // - // * instance-type - The instance type. + // * state - The state of the customer gateway (pending | available | deleting + // | deleted). // - // * is-default-version - A boolean that indicates whether the launch template - // version is the default version. + // * type - The type of customer gateway. Currently, the only supported type + // is ipsec.1. // - // * kernel-id - The kernel ID. + // * 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. // - // * ram-disk-id - The RAM disk ID. + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The ID of the launch template. You must specify either the launch template - // ID or launch template name in the request. - LaunchTemplateId *string `type:"string"` - - // The name of the launch template. You must specify either the launch template - // ID or launch template name in the request. - LaunchTemplateName *string `min:"3" type:"string"` - - // 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. - MaxResults *int64 `type:"integer"` - - // The version number up to which to describe launch template versions. - MaxVersion *string `type:"string"` - - // The version number after which to describe launch template versions. - MinVersion *string `type:"string"` - - // The token to request the next page of results. - NextToken *string `type:"string"` - - // One or more versions of the launch template. - Versions []*string `locationName:"LaunchTemplateVersion" locationNameList:"item" type:"list"` } // String returns the string representation -func (s DescribeLaunchTemplateVersionsInput) String() string { +func (s DescribeCustomerGatewaysInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeLaunchTemplateVersionsInput) GoString() string { +func (s DescribeCustomerGatewaysInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeLaunchTemplateVersionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeLaunchTemplateVersionsInput"} - if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetCustomerGatewayIds sets the CustomerGatewayIds field's value. +func (s *DescribeCustomerGatewaysInput) SetCustomerGatewayIds(v []*string) *DescribeCustomerGatewaysInput { + s.CustomerGatewayIds = v + return s } // SetDryRun sets the DryRun field's value. -func (s *DescribeLaunchTemplateVersionsInput) SetDryRun(v bool) *DescribeLaunchTemplateVersionsInput { +func (s *DescribeCustomerGatewaysInput) SetDryRun(v bool) *DescribeCustomerGatewaysInput { s.DryRun = &v return s } // SetFilters sets the Filters field's value. -func (s *DescribeLaunchTemplateVersionsInput) SetFilters(v []*Filter) *DescribeLaunchTemplateVersionsInput { +func (s *DescribeCustomerGatewaysInput) SetFilters(v []*Filter) *DescribeCustomerGatewaysInput { s.Filters = v return s } -// SetLaunchTemplateId sets the LaunchTemplateId field's value. -func (s *DescribeLaunchTemplateVersionsInput) SetLaunchTemplateId(v string) *DescribeLaunchTemplateVersionsInput { - s.LaunchTemplateId = &v - return s +// Contains the output of DescribeCustomerGateways. +type DescribeCustomerGatewaysOutput struct { + _ struct{} `type:"structure"` + + // Information about one or more customer gateways. + CustomerGateways []*CustomerGateway `locationName:"customerGatewaySet" locationNameList:"item" type:"list"` } -// SetLaunchTemplateName sets the LaunchTemplateName field's value. -func (s *DescribeLaunchTemplateVersionsInput) SetLaunchTemplateName(v string) *DescribeLaunchTemplateVersionsInput { - s.LaunchTemplateName = &v - return s +// String returns the string representation +func (s DescribeCustomerGatewaysOutput) String() string { + return awsutil.Prettify(s) } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeLaunchTemplateVersionsInput) SetMaxResults(v int64) *DescribeLaunchTemplateVersionsInput { - s.MaxResults = &v - return s +// GoString returns the string representation +func (s DescribeCustomerGatewaysOutput) GoString() string { + return s.String() } -// SetMaxVersion sets the MaxVersion field's value. -func (s *DescribeLaunchTemplateVersionsInput) SetMaxVersion(v string) *DescribeLaunchTemplateVersionsInput { - s.MaxVersion = &v - return s -} - -// SetMinVersion sets the MinVersion field's value. -func (s *DescribeLaunchTemplateVersionsInput) SetMinVersion(v string) *DescribeLaunchTemplateVersionsInput { - s.MinVersion = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeLaunchTemplateVersionsInput) SetNextToken(v string) *DescribeLaunchTemplateVersionsInput { - s.NextToken = &v - return s -} - -// SetVersions sets the Versions field's value. -func (s *DescribeLaunchTemplateVersionsInput) SetVersions(v []*string) *DescribeLaunchTemplateVersionsInput { - s.Versions = v +// SetCustomerGateways sets the CustomerGateways field's value. +func (s *DescribeCustomerGatewaysOutput) SetCustomerGateways(v []*CustomerGateway) *DescribeCustomerGatewaysOutput { + s.CustomerGateways = v return s } -type DescribeLaunchTemplateVersionsOutput struct { +type DescribeDhcpOptionsInput struct { _ struct{} `type:"structure"` - // Information about the launch template versions. - LaunchTemplateVersions []*LaunchTemplateVersion `locationName:"launchTemplateVersionSet" 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 DescribeLaunchTemplateVersionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeLaunchTemplateVersionsOutput) GoString() string { - return s.String() -} - -// SetLaunchTemplateVersions sets the LaunchTemplateVersions field's value. -func (s *DescribeLaunchTemplateVersionsOutput) SetLaunchTemplateVersions(v []*LaunchTemplateVersion) *DescribeLaunchTemplateVersionsOutput { - s.LaunchTemplateVersions = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeLaunchTemplateVersionsOutput) SetNextToken(v string) *DescribeLaunchTemplateVersionsOutput { - s.NextToken = &v - return s -} - -type DescribeLaunchTemplatesInput struct { - _ struct{} `type:"structure"` + // The IDs of one or more DHCP options sets. + // + // Default: Describes all your DHCP options sets. + DhcpOptionsIds []*string `locationName:"DhcpOptionsId" locationNameList:"DhcpOptionsId" 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"` + DryRun *bool `locationName:"dryRun" type:"boolean"` // One or more filters. // - // * create-time - The time the launch template was created. + // * dhcp-options-id - The ID of a DHCP options set. // - // * launch-template-name - The name of the launch template. + // * key - The key for one of the options (for example, domain-name). + // + // * value - The value for one of the options. + // + // * owner-id - The ID of the AWS account that owns the DHCP options set. // // * 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. @@ -38113,287 +43619,235 @@ type DescribeLaunchTemplatesInput struct { // to find all resources assigned a tag with a specific key, regardless of // the tag value. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // One or more launch template IDs. - LaunchTemplateIds []*string `locationName:"LaunchTemplateId" locationNameList:"item" type:"list"` - - // One or more launch template names. - LaunchTemplateNames []*string `locationName:"LaunchTemplateName" 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 5 and 1000. - MaxResults *int64 `type:"integer"` - - // The token to request the next page of results. - NextToken *string `type:"string"` } // String returns the string representation -func (s DescribeLaunchTemplatesInput) String() string { +func (s DescribeDhcpOptionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeLaunchTemplatesInput) GoString() string { +func (s DescribeDhcpOptionsInput) GoString() string { return s.String() } +// SetDhcpOptionsIds sets the DhcpOptionsIds field's value. +func (s *DescribeDhcpOptionsInput) SetDhcpOptionsIds(v []*string) *DescribeDhcpOptionsInput { + s.DhcpOptionsIds = v + return s +} + // SetDryRun sets the DryRun field's value. -func (s *DescribeLaunchTemplatesInput) SetDryRun(v bool) *DescribeLaunchTemplatesInput { +func (s *DescribeDhcpOptionsInput) SetDryRun(v bool) *DescribeDhcpOptionsInput { s.DryRun = &v return s } // SetFilters sets the Filters field's value. -func (s *DescribeLaunchTemplatesInput) SetFilters(v []*Filter) *DescribeLaunchTemplatesInput { +func (s *DescribeDhcpOptionsInput) SetFilters(v []*Filter) *DescribeDhcpOptionsInput { s.Filters = v return s } -// SetLaunchTemplateIds sets the LaunchTemplateIds field's value. -func (s *DescribeLaunchTemplatesInput) SetLaunchTemplateIds(v []*string) *DescribeLaunchTemplatesInput { - s.LaunchTemplateIds = v - return s -} - -// SetLaunchTemplateNames sets the LaunchTemplateNames field's value. -func (s *DescribeLaunchTemplatesInput) SetLaunchTemplateNames(v []*string) *DescribeLaunchTemplatesInput { - s.LaunchTemplateNames = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeLaunchTemplatesInput) SetMaxResults(v int64) *DescribeLaunchTemplatesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeLaunchTemplatesInput) SetNextToken(v string) *DescribeLaunchTemplatesInput { - s.NextToken = &v - return s -} - -type DescribeLaunchTemplatesOutput struct { +type DescribeDhcpOptionsOutput struct { _ struct{} `type:"structure"` - // Information about the launch templates. - LaunchTemplates []*LaunchTemplate `locationName:"launchTemplates" 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"` + // Information about one or more DHCP options sets. + DhcpOptions []*DhcpOptions `locationName:"dhcpOptionsSet" locationNameList:"item" type:"list"` } // String returns the string representation -func (s DescribeLaunchTemplatesOutput) String() string { +func (s DescribeDhcpOptionsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeLaunchTemplatesOutput) GoString() string { +func (s DescribeDhcpOptionsOutput) GoString() string { return s.String() } -// SetLaunchTemplates sets the LaunchTemplates field's value. -func (s *DescribeLaunchTemplatesOutput) SetLaunchTemplates(v []*LaunchTemplate) *DescribeLaunchTemplatesOutput { - s.LaunchTemplates = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeLaunchTemplatesOutput) SetNextToken(v string) *DescribeLaunchTemplatesOutput { - s.NextToken = &v +// SetDhcpOptions sets the DhcpOptions field's value. +func (s *DescribeDhcpOptionsOutput) SetDhcpOptions(v []*DhcpOptions) *DescribeDhcpOptionsOutput { + s.DhcpOptions = v return s } -// Contains the parameters for DescribeMovingAddresses. -type DescribeMovingAddressesInput struct { +type DescribeEgressOnlyInternetGatewaysInput 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 `locationName:"dryRun" type:"boolean"` + DryRun *bool `type:"boolean"` - // One or more filters. - // - // * moving-status - The status of the Elastic IP address (MovingToVpc | - // RestoringToClassic). - Filters []*Filter `locationName:"filter" locationNameList:"Filter" type:"list"` + // One or more egress-only internet gateway IDs. + EgressOnlyInternetGatewayIds []*string `locationName:"EgressOnlyInternetGatewayId" locationNameList:"item" type:"list"` // The maximum number of results to return for the request in a single page. - // The remaining results of the initial request can be seen by sending another - // request with the returned NextToken value. This value can be between 5 and - // 1000; if MaxResults is given a value outside of this range, an error is returned. - // - // Default: If no value is provided, the default is 1000. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The token to use to retrieve the next page of results. - NextToken *string `locationName:"nextToken" type:"string"` + // The remaining results can be seen by sending another request with the returned + // NextToken value. This value can be between 5 and 1000. If MaxResults is given + // a value larger than 1000, only 1000 results are returned. + MaxResults *int64 `type:"integer"` - // One or more Elastic IP addresses. - PublicIps []*string `locationName:"publicIp" locationNameList:"item" type:"list"` + // The token to retrieve the next page of results. + NextToken *string `type:"string"` } // String returns the string representation -func (s DescribeMovingAddressesInput) String() string { +func (s DescribeEgressOnlyInternetGatewaysInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeMovingAddressesInput) GoString() string { +func (s DescribeEgressOnlyInternetGatewaysInput) GoString() string { return s.String() } // SetDryRun sets the DryRun field's value. -func (s *DescribeMovingAddressesInput) SetDryRun(v bool) *DescribeMovingAddressesInput { +func (s *DescribeEgressOnlyInternetGatewaysInput) SetDryRun(v bool) *DescribeEgressOnlyInternetGatewaysInput { s.DryRun = &v return s } -// SetFilters sets the Filters field's value. -func (s *DescribeMovingAddressesInput) SetFilters(v []*Filter) *DescribeMovingAddressesInput { - s.Filters = v +// SetEgressOnlyInternetGatewayIds sets the EgressOnlyInternetGatewayIds field's value. +func (s *DescribeEgressOnlyInternetGatewaysInput) SetEgressOnlyInternetGatewayIds(v []*string) *DescribeEgressOnlyInternetGatewaysInput { + s.EgressOnlyInternetGatewayIds = v return s } // SetMaxResults sets the MaxResults field's value. -func (s *DescribeMovingAddressesInput) SetMaxResults(v int64) *DescribeMovingAddressesInput { +func (s *DescribeEgressOnlyInternetGatewaysInput) SetMaxResults(v int64) *DescribeEgressOnlyInternetGatewaysInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. -func (s *DescribeMovingAddressesInput) SetNextToken(v string) *DescribeMovingAddressesInput { +func (s *DescribeEgressOnlyInternetGatewaysInput) SetNextToken(v string) *DescribeEgressOnlyInternetGatewaysInput { s.NextToken = &v return s } -// SetPublicIps sets the PublicIps field's value. -func (s *DescribeMovingAddressesInput) SetPublicIps(v []*string) *DescribeMovingAddressesInput { - s.PublicIps = v - return s -} - -// Contains the output of DescribeMovingAddresses. -type DescribeMovingAddressesOutput struct { +type DescribeEgressOnlyInternetGatewaysOutput struct { _ struct{} `type:"structure"` - // The status for each Elastic IP address. - MovingAddressStatuses []*MovingAddressStatus `locationName:"movingAddressStatusSet" locationNameList:"item" type:"list"` + // Information about the egress-only internet gateways. + EgressOnlyInternetGateways []*EgressOnlyInternetGateway `locationName:"egressOnlyInternetGatewaySet" 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. + // The token to use to retrieve the next page of results. NextToken *string `locationName:"nextToken" type:"string"` } // String returns the string representation -func (s DescribeMovingAddressesOutput) String() string { +func (s DescribeEgressOnlyInternetGatewaysOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeMovingAddressesOutput) GoString() string { +func (s DescribeEgressOnlyInternetGatewaysOutput) GoString() string { return s.String() } -// SetMovingAddressStatuses sets the MovingAddressStatuses field's value. -func (s *DescribeMovingAddressesOutput) SetMovingAddressStatuses(v []*MovingAddressStatus) *DescribeMovingAddressesOutput { - s.MovingAddressStatuses = v +// SetEgressOnlyInternetGateways sets the EgressOnlyInternetGateways field's value. +func (s *DescribeEgressOnlyInternetGatewaysOutput) SetEgressOnlyInternetGateways(v []*EgressOnlyInternetGateway) *DescribeEgressOnlyInternetGatewaysOutput { + s.EgressOnlyInternetGateways = v return s } // SetNextToken sets the NextToken field's value. -func (s *DescribeMovingAddressesOutput) SetNextToken(v string) *DescribeMovingAddressesOutput { +func (s *DescribeEgressOnlyInternetGatewaysOutput) SetNextToken(v string) *DescribeEgressOnlyInternetGatewaysOutput { s.NextToken = &v return s } -// Contains the parameters for DescribeNatGateways. -type DescribeNatGatewaysInput struct { +type DescribeElasticGpusInput 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 Elastic Graphics accelerator IDs. + ElasticGpuIds []*string `locationName:"ElasticGpuId" locationNameList:"item" type:"list"` + // One or more filters. // - // * nat-gateway-id - The ID of the NAT gateway. - // - // * state - The state of the NAT gateway (pending | failed | available | - // deleting | deleted). + // * availability-zone - The Availability Zone in which the Elastic Graphics + // accelerator resides. // - // * subnet-id - The ID of the subnet in which the NAT gateway resides. + // * elastic-gpu-health - The status of the Elastic Graphics accelerator + // (OK | IMPAIRED). // - // * 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. + // * elastic-gpu-state - The state of the Elastic Graphics accelerator (ATTACHED). // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. + // * elastic-gpu-type - The type of Elastic Graphics accelerator; for example, + // eg1.medium. // - // * vpc-id - The ID of the VPC in which the NAT gateway resides. - Filter []*Filter `locationNameList:"Filter" type:"list"` + // * instance-id - The ID of the instance to which the Elastic Graphics accelerator + // is associated. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - // The maximum number of items to return for this request. The request returns - // a token that you can specify in a subsequent call to get the next set of - // results. - // - // Constraint: If the value specified is greater than 1000, we return only 1000 - // items. + // 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 5 and 1000. MaxResults *int64 `type:"integer"` - // One or more NAT gateway IDs. - NatGatewayIds []*string `locationName:"NatGatewayId" locationNameList:"item" type:"list"` - - // The token to retrieve the next page of results. + // The token to request the next page of results. NextToken *string `type:"string"` } // String returns the string representation -func (s DescribeNatGatewaysInput) String() string { +func (s DescribeElasticGpusInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeNatGatewaysInput) GoString() string { +func (s DescribeElasticGpusInput) GoString() string { return s.String() } -// SetFilter sets the Filter field's value. -func (s *DescribeNatGatewaysInput) SetFilter(v []*Filter) *DescribeNatGatewaysInput { - s.Filter = v +// SetDryRun sets the DryRun field's value. +func (s *DescribeElasticGpusInput) SetDryRun(v bool) *DescribeElasticGpusInput { + s.DryRun = &v return s } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeNatGatewaysInput) SetMaxResults(v int64) *DescribeNatGatewaysInput { - s.MaxResults = &v +// SetElasticGpuIds sets the ElasticGpuIds field's value. +func (s *DescribeElasticGpusInput) SetElasticGpuIds(v []*string) *DescribeElasticGpusInput { + s.ElasticGpuIds = v return s } -// SetNatGatewayIds sets the NatGatewayIds field's value. -func (s *DescribeNatGatewaysInput) SetNatGatewayIds(v []*string) *DescribeNatGatewaysInput { - s.NatGatewayIds = v +// SetFilters sets the Filters field's value. +func (s *DescribeElasticGpusInput) SetFilters(v []*Filter) *DescribeElasticGpusInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeElasticGpusInput) SetMaxResults(v int64) *DescribeElasticGpusInput { + s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. -func (s *DescribeNatGatewaysInput) SetNextToken(v string) *DescribeNatGatewaysInput { +func (s *DescribeElasticGpusInput) SetNextToken(v string) *DescribeElasticGpusInput { s.NextToken = &v return s } -// Contains the output of DescribeNatGateways. -type DescribeNatGatewaysOutput struct { +type DescribeElasticGpusOutput struct { _ struct{} `type:"structure"` - // Information about the NAT gateways. - NatGateways []*NatGateway `locationName:"natGatewaySet" locationNameList:"item" type:"list"` + // Information about the Elastic Graphics accelerators. + ElasticGpuSet []*ElasticGpus `locationName:"elasticGpuSet" locationNameList:"item" type:"list"` + + // The total number of items to return. If the total number of items available + // is more than the value specified in max-items then a Next-Token will be provided + // in the output that you can use to resume pagination. + MaxResults *int64 `locationName:"maxResults" type:"integer"` // The token to use to retrieve the next page of results. This value is null // when there are no more results to return. @@ -38401,726 +43855,590 @@ type DescribeNatGatewaysOutput struct { } // String returns the string representation -func (s DescribeNatGatewaysOutput) String() string { +func (s DescribeElasticGpusOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeNatGatewaysOutput) GoString() string { +func (s DescribeElasticGpusOutput) GoString() string { return s.String() } -// SetNatGateways sets the NatGateways field's value. -func (s *DescribeNatGatewaysOutput) SetNatGateways(v []*NatGateway) *DescribeNatGatewaysOutput { - s.NatGateways = v +// SetElasticGpuSet sets the ElasticGpuSet field's value. +func (s *DescribeElasticGpusOutput) SetElasticGpuSet(v []*ElasticGpus) *DescribeElasticGpusOutput { + s.ElasticGpuSet = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeElasticGpusOutput) SetMaxResults(v int64) *DescribeElasticGpusOutput { + s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. -func (s *DescribeNatGatewaysOutput) SetNextToken(v string) *DescribeNatGatewaysOutput { +func (s *DescribeElasticGpusOutput) SetNextToken(v string) *DescribeElasticGpusOutput { s.NextToken = &v return s } -// Contains the parameters for DescribeNetworkAcls. -type DescribeNetworkAclsInput struct { +// Contains the parameters for DescribeExportTasks. +type DescribeExportTasksInput 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 `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * association.association-id - The ID of an association ID for the ACL. - // - // * association.network-acl-id - The ID of the network ACL involved in the - // association. - // - // * association.subnet-id - The ID of the subnet involved in the association. - // - // * default - Indicates whether the ACL is the default network ACL for the - // VPC. - // - // * entry.cidr - The IPv4 CIDR range specified in the entry. - // - // * entry.egress - Indicates whether the entry applies to egress traffic. - // - // * entry.icmp.code - The ICMP code specified in the entry, if any. - // - // * entry.icmp.type - The ICMP type specified in the entry, if any. - // - // * entry.ipv6-cidr - The IPv6 CIDR range specified in the entry. - // - // * entry.port-range.from - The start of the port range specified in the - // entry. - // - // * entry.port-range.to - The end of the port range specified in the entry. - // - // - // * entry.protocol - The protocol specified in the entry (tcp | udp | icmp - // or a protocol number). - // - // * entry.rule-action - Allows or denies the matching traffic (allow | deny). - // - // * entry.rule-number - The number of an entry (in other words, rule) in - // the ACL's set of entries. - // - // * network-acl-id - The ID of the network ACL. - // - // * 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. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - // - // * vpc-id - The ID of the VPC for the network ACL. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // One or more network ACL IDs. - // - // Default: Describes all your network ACLs. - NetworkAclIds []*string `locationName:"NetworkAclId" locationNameList:"item" type:"list"` + // One or more export task IDs. + ExportTaskIds []*string `locationName:"exportTaskId" locationNameList:"ExportTaskId" type:"list"` } // String returns the string representation -func (s DescribeNetworkAclsInput) String() string { +func (s DescribeExportTasksInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeNetworkAclsInput) GoString() string { +func (s DescribeExportTasksInput) GoString() string { return s.String() } -// SetDryRun sets the DryRun field's value. -func (s *DescribeNetworkAclsInput) SetDryRun(v bool) *DescribeNetworkAclsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeNetworkAclsInput) SetFilters(v []*Filter) *DescribeNetworkAclsInput { - s.Filters = v - return s -} - -// SetNetworkAclIds sets the NetworkAclIds field's value. -func (s *DescribeNetworkAclsInput) SetNetworkAclIds(v []*string) *DescribeNetworkAclsInput { - s.NetworkAclIds = v +// SetExportTaskIds sets the ExportTaskIds field's value. +func (s *DescribeExportTasksInput) SetExportTaskIds(v []*string) *DescribeExportTasksInput { + s.ExportTaskIds = v return s } -// Contains the output of DescribeNetworkAcls. -type DescribeNetworkAclsOutput struct { +// Contains the output for DescribeExportTasks. +type DescribeExportTasksOutput struct { _ struct{} `type:"structure"` - // Information about one or more network ACLs. - NetworkAcls []*NetworkAcl `locationName:"networkAclSet" locationNameList:"item" type:"list"` + // Information about the export tasks. + ExportTasks []*ExportTask `locationName:"exportTaskSet" locationNameList:"item" type:"list"` } // String returns the string representation -func (s DescribeNetworkAclsOutput) String() string { +func (s DescribeExportTasksOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeNetworkAclsOutput) GoString() string { +func (s DescribeExportTasksOutput) GoString() string { return s.String() } -// SetNetworkAcls sets the NetworkAcls field's value. -func (s *DescribeNetworkAclsOutput) SetNetworkAcls(v []*NetworkAcl) *DescribeNetworkAclsOutput { - s.NetworkAcls = v +// SetExportTasks sets the ExportTasks field's value. +func (s *DescribeExportTasksOutput) SetExportTasks(v []*ExportTask) *DescribeExportTasksOutput { + s.ExportTasks = v return s } -// Contains the parameters for DescribeNetworkInterfaceAttribute. -type DescribeNetworkInterfaceAttributeInput struct { +// Describes the instances that could not be launched by the fleet. +type DescribeFleetError struct { _ struct{} `type:"structure"` - // The attribute of the network interface. This parameter is required. - Attribute *string `locationName:"attribute" type:"string" enum:"NetworkInterfaceAttribute"` + // The error code that indicates why the instance could not be launched. For + // more information about error codes, see Error Codes (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html). + ErrorCode *string `locationName:"errorCode" 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 `locationName:"dryRun" type:"boolean"` + // The error message that describes why the instance could not be launched. + // For more information about error messages, see ee Error Codes (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html). + ErrorMessage *string `locationName:"errorMessage" type:"string"` - // The ID of the network interface. - // - // NetworkInterfaceId is a required field - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"` + // The launch templates and overrides that were used for launching the instances. + // Any parameters that you specify in the Overrides override the same parameters + // in the launch template. + LaunchTemplateAndOverrides *LaunchTemplateAndOverridesResponse `locationName:"launchTemplateAndOverrides" type:"structure"` + + // Indicates if the instance that could not be launched was a Spot Instance + // or On-Demand Instance. + Lifecycle *string `locationName:"lifecycle" type:"string" enum:"InstanceLifecycle"` } // String returns the string representation -func (s DescribeNetworkInterfaceAttributeInput) String() string { +func (s DescribeFleetError) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeNetworkInterfaceAttributeInput) GoString() string { +func (s DescribeFleetError) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeNetworkInterfaceAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeNetworkInterfaceAttributeInput"} - if s.NetworkInterfaceId == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetErrorCode sets the ErrorCode field's value. +func (s *DescribeFleetError) SetErrorCode(v string) *DescribeFleetError { + s.ErrorCode = &v + return s } -// SetAttribute sets the Attribute field's value. -func (s *DescribeNetworkInterfaceAttributeInput) SetAttribute(v string) *DescribeNetworkInterfaceAttributeInput { - s.Attribute = &v +// SetErrorMessage sets the ErrorMessage field's value. +func (s *DescribeFleetError) SetErrorMessage(v string) *DescribeFleetError { + s.ErrorMessage = &v return s } -// SetDryRun sets the DryRun field's value. -func (s *DescribeNetworkInterfaceAttributeInput) SetDryRun(v bool) *DescribeNetworkInterfaceAttributeInput { - s.DryRun = &v +// SetLaunchTemplateAndOverrides sets the LaunchTemplateAndOverrides field's value. +func (s *DescribeFleetError) SetLaunchTemplateAndOverrides(v *LaunchTemplateAndOverridesResponse) *DescribeFleetError { + s.LaunchTemplateAndOverrides = v return s } -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *DescribeNetworkInterfaceAttributeInput) SetNetworkInterfaceId(v string) *DescribeNetworkInterfaceAttributeInput { - s.NetworkInterfaceId = &v +// SetLifecycle sets the Lifecycle field's value. +func (s *DescribeFleetError) SetLifecycle(v string) *DescribeFleetError { + s.Lifecycle = &v return s } -// Contains the output of DescribeNetworkInterfaceAttribute. -type DescribeNetworkInterfaceAttributeOutput struct { +type DescribeFleetHistoryInput struct { _ struct{} `type:"structure"` - // The attachment (if any) of the network interface. - Attachment *NetworkInterfaceAttachment `locationName:"attachment" 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 description of the network interface. - Description *AttributeValue `locationName:"description" type:"structure"` + // The type of events to describe. By default, all events are described. + EventType *string `type:"string" enum:"FleetEventType"` - // The security groups associated with the network interface. - Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` + // The ID of the EC2 Fleet. + // + // FleetId is a required field + FleetId *string `type:"string" required:"true"` - // The ID of the network interface. - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` + // The maximum number of results to return in a single call. Specify a value + // between 1 and 1000. The default value is 1000. To retrieve the remaining + // results, make another call with the returned NextToken value. + MaxResults *int64 `type:"integer"` - // Indicates whether source/destination checking is enabled. - SourceDestCheck *AttributeBooleanValue `locationName:"sourceDestCheck" type:"structure"` + // The token for the next set of results. + NextToken *string `type:"string"` + + // The start date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + // + // StartTime is a required field + StartTime *time.Time `type:"timestamp" required:"true"` } // String returns the string representation -func (s DescribeNetworkInterfaceAttributeOutput) String() string { +func (s DescribeFleetHistoryInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeNetworkInterfaceAttributeOutput) GoString() string { +func (s DescribeFleetHistoryInput) GoString() string { return s.String() } -// SetAttachment sets the Attachment field's value. -func (s *DescribeNetworkInterfaceAttributeOutput) SetAttachment(v *NetworkInterfaceAttachment) *DescribeNetworkInterfaceAttributeOutput { - s.Attachment = v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeFleetHistoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeFleetHistoryInput"} + if s.FleetId == nil { + invalidParams.Add(request.NewErrParamRequired("FleetId")) + } + if s.StartTime == nil { + invalidParams.Add(request.NewErrParamRequired("StartTime")) + } -// SetDescription sets the Description field's value. -func (s *DescribeNetworkInterfaceAttributeOutput) SetDescription(v *AttributeValue) *DescribeNetworkInterfaceAttributeOutput { - s.Description = v - return s -} - -// SetGroups sets the Groups field's value. -func (s *DescribeNetworkInterfaceAttributeOutput) SetGroups(v []*GroupIdentifier) *DescribeNetworkInterfaceAttributeOutput { - s.Groups = v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *DescribeNetworkInterfaceAttributeOutput) SetNetworkInterfaceId(v string) *DescribeNetworkInterfaceAttributeOutput { - s.NetworkInterfaceId = &v +// SetDryRun sets the DryRun field's value. +func (s *DescribeFleetHistoryInput) SetDryRun(v bool) *DescribeFleetHistoryInput { + s.DryRun = &v return s } -// SetSourceDestCheck sets the SourceDestCheck field's value. -func (s *DescribeNetworkInterfaceAttributeOutput) SetSourceDestCheck(v *AttributeBooleanValue) *DescribeNetworkInterfaceAttributeOutput { - s.SourceDestCheck = v +// SetEventType sets the EventType field's value. +func (s *DescribeFleetHistoryInput) SetEventType(v string) *DescribeFleetHistoryInput { + s.EventType = &v return s } -// Contains the parameters for DescribeNetworkInterfacePermissions. -type DescribeNetworkInterfacePermissionsInput struct { - _ struct{} `type:"structure"` - - // One or more filters. - // - // * network-interface-permission.network-interface-permission-id - The ID - // of the permission. - // - // * 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-service - The AWS service. - // - // * network-interface-permission.permission - The type of permission (INSTANCE-ATTACH - // | EIP-ASSOCIATE). - 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 call with the returned NextToken value. If - // this parameter is not specified, up to 50 results are returned by default. - MaxResults *int64 `type:"integer"` - - // One or more network interface permission IDs. - NetworkInterfacePermissionIds []*string `locationName:"NetworkInterfacePermissionId" type:"list"` - - // The token to request the next page of results. - NextToken *string `type:"string"` -} - -// String returns the string representation -func (s DescribeNetworkInterfacePermissionsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeNetworkInterfacePermissionsInput) GoString() string { - return s.String() -} - -// SetFilters sets the Filters field's value. -func (s *DescribeNetworkInterfacePermissionsInput) SetFilters(v []*Filter) *DescribeNetworkInterfacePermissionsInput { - s.Filters = v +// SetFleetId sets the FleetId field's value. +func (s *DescribeFleetHistoryInput) SetFleetId(v string) *DescribeFleetHistoryInput { + s.FleetId = &v return s } // SetMaxResults sets the MaxResults field's value. -func (s *DescribeNetworkInterfacePermissionsInput) SetMaxResults(v int64) *DescribeNetworkInterfacePermissionsInput { +func (s *DescribeFleetHistoryInput) SetMaxResults(v int64) *DescribeFleetHistoryInput { s.MaxResults = &v return s } -// SetNetworkInterfacePermissionIds sets the NetworkInterfacePermissionIds field's value. -func (s *DescribeNetworkInterfacePermissionsInput) SetNetworkInterfacePermissionIds(v []*string) *DescribeNetworkInterfacePermissionsInput { - s.NetworkInterfacePermissionIds = v +// SetNextToken sets the NextToken field's value. +func (s *DescribeFleetHistoryInput) SetNextToken(v string) *DescribeFleetHistoryInput { + s.NextToken = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeNetworkInterfacePermissionsInput) SetNextToken(v string) *DescribeNetworkInterfacePermissionsInput { - s.NextToken = &v +// SetStartTime sets the StartTime field's value. +func (s *DescribeFleetHistoryInput) SetStartTime(v time.Time) *DescribeFleetHistoryInput { + s.StartTime = &v return s } -// Contains the output for DescribeNetworkInterfacePermissions. -type DescribeNetworkInterfacePermissionsOutput struct { +type DescribeFleetHistoryOutput struct { _ struct{} `type:"structure"` - // The network interface permissions. - NetworkInterfacePermissions []*NetworkInterfacePermission `locationName:"networkInterfacePermissions" locationNameList:"item" type:"list"` + // The ID of the EC Fleet. + FleetId *string `locationName:"fleetId" type:"string"` - // The token to use to retrieve the next page of results. + // Information about the events in the history of the EC2 Fleet. + HistoryRecords []*HistoryRecordEntry `locationName:"historyRecordSet" locationNameList:"item" type:"list"` + + // The last date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + // All records up to this time were retrieved. + // + // If nextToken indicates that there are more results, this value is not present. + LastEvaluatedTime *time.Time `locationName:"lastEvaluatedTime" type:"timestamp"` + + // The token for the next set of results. NextToken *string `locationName:"nextToken" type:"string"` + + // The start date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + StartTime *time.Time `locationName:"startTime" type:"timestamp"` } // String returns the string representation -func (s DescribeNetworkInterfacePermissionsOutput) String() string { +func (s DescribeFleetHistoryOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeNetworkInterfacePermissionsOutput) GoString() string { +func (s DescribeFleetHistoryOutput) GoString() string { return s.String() } -// SetNetworkInterfacePermissions sets the NetworkInterfacePermissions field's value. -func (s *DescribeNetworkInterfacePermissionsOutput) SetNetworkInterfacePermissions(v []*NetworkInterfacePermission) *DescribeNetworkInterfacePermissionsOutput { - s.NetworkInterfacePermissions = v +// SetFleetId sets the FleetId field's value. +func (s *DescribeFleetHistoryOutput) SetFleetId(v string) *DescribeFleetHistoryOutput { + s.FleetId = &v + return s +} + +// SetHistoryRecords sets the HistoryRecords field's value. +func (s *DescribeFleetHistoryOutput) SetHistoryRecords(v []*HistoryRecordEntry) *DescribeFleetHistoryOutput { + s.HistoryRecords = v + return s +} + +// SetLastEvaluatedTime sets the LastEvaluatedTime field's value. +func (s *DescribeFleetHistoryOutput) SetLastEvaluatedTime(v time.Time) *DescribeFleetHistoryOutput { + s.LastEvaluatedTime = &v return s } // SetNextToken sets the NextToken field's value. -func (s *DescribeNetworkInterfacePermissionsOutput) SetNextToken(v string) *DescribeNetworkInterfacePermissionsOutput { +func (s *DescribeFleetHistoryOutput) SetNextToken(v string) *DescribeFleetHistoryOutput { s.NextToken = &v return s } -// Contains the parameters for DescribeNetworkInterfaces. -type DescribeNetworkInterfacesInput struct { +// SetStartTime sets the StartTime field's value. +func (s *DescribeFleetHistoryOutput) SetStartTime(v time.Time) *DescribeFleetHistoryOutput { + s.StartTime = &v + return s +} + +type DescribeFleetInstancesInput 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 `locationName:"dryRun" type:"boolean"` + DryRun *bool `type:"boolean"` // One or more filters. // - // * addresses.private-ip-address - The private IPv4 addresses associated - // with the network interface. - // - // * addresses.primary - Whether the private IPv4 address is the primary - // IP address associated with the network interface. - // - // * addresses.association.public-ip - The association ID returned when the - // network interface was associated with the Elastic IP address (IPv4). - // - // * addresses.association.owner-id - The owner ID of the addresses associated - // with the network interface. - // - // * association.association-id - The association ID returned when the network - // interface was associated with an IPv4 address. - // - // * association.allocation-id - The allocation ID returned when you allocated - // the Elastic IP address (IPv4) for your network interface. - // - // * association.ip-owner-id - The owner of the Elastic IP address (IPv4) - // associated with the network interface. - // - // * association.public-ip - The address of the Elastic IP address (IPv4) - // bound to the network interface. - // - // * association.public-dns-name - The public DNS name for the network interface - // (IPv4). - // - // * attachment.attachment-id - The ID of the interface attachment. - // - // * attachment.attach.time - The time that the network interface was attached - // to an instance. - // - // * attachment.delete-on-termination - Indicates whether the attachment - // is deleted when an instance is terminated. - // - // * attachment.device-index - The device index to which the network interface - // is attached. - // - // * attachment.instance-id - The ID of the instance to which the network - // interface is attached. - // - // * attachment.instance-owner-id - The owner ID of the instance to which - // the network interface is attached. - // - // * attachment.nat-gateway-id - The ID of the NAT gateway to which the network - // interface is attached. - // - // * attachment.status - The status of the attachment (attaching | attached - // | detaching | detached). - // - // * availability-zone - The Availability Zone of the network interface. - // - // * description - The description of the network interface. - // - // * group-id - The ID of a security group associated with the network interface. - // - // * group-name - The name of a security group associated with the network - // interface. - // - // * ipv6-addresses.ipv6-address - An IPv6 address associated with the network - // interface. - // - // * mac-address - The MAC address of the network interface. - // - // * network-interface-id - The ID of the network interface. - // - // * owner-id - The AWS 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-managed - Indicates whether the network interface is being - // managed by an AWS service (for example, AWS Management Console, Auto Scaling, - // and so on). - // - // * source-desk-check - Indicates whether the network interface performs - // source/destination checking. A value of true means checking is enabled, - // and false means checking is disabled. The value must be false for the - // network interface to perform network address translation (NAT) in your - // VPC. - // - // * status - The status of the network interface. If the network interface - // is not attached to an instance, the status is available; if a network - // interface is attached to an instance the status is in-use. - // - // * subnet-id - The ID of the subnet for the network interface. - // - // * 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. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - // - // * vpc-id - The ID of the VPC for the network interface. - Filters []*Filter `locationName:"filter" locationNameList:"Filter" type:"list"` + // * instance-type - The instance type. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - // One or more network interface IDs. + // The ID of the EC2 Fleet. // - // Default: Describes all your network interfaces. - NetworkInterfaceIds []*string `locationName:"NetworkInterfaceId" locationNameList:"item" type:"list"` + // FleetId is a required field + FleetId *string `type:"string" required:"true"` + + // The maximum number of results to return in a single call. Specify a value + // between 1 and 1000. The default value is 1000. To retrieve the remaining + // results, make another call with the returned NextToken value. + MaxResults *int64 `type:"integer"` + + // The token for the next set of results. + NextToken *string `type:"string"` } // String returns the string representation -func (s DescribeNetworkInterfacesInput) String() string { +func (s DescribeFleetInstancesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeNetworkInterfacesInput) GoString() string { +func (s DescribeFleetInstancesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeFleetInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeFleetInstancesInput"} + if s.FleetId == nil { + invalidParams.Add(request.NewErrParamRequired("FleetId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetDryRun sets the DryRun field's value. -func (s *DescribeNetworkInterfacesInput) SetDryRun(v bool) *DescribeNetworkInterfacesInput { +func (s *DescribeFleetInstancesInput) SetDryRun(v bool) *DescribeFleetInstancesInput { s.DryRun = &v return s } // SetFilters sets the Filters field's value. -func (s *DescribeNetworkInterfacesInput) SetFilters(v []*Filter) *DescribeNetworkInterfacesInput { +func (s *DescribeFleetInstancesInput) SetFilters(v []*Filter) *DescribeFleetInstancesInput { s.Filters = v return s } -// SetNetworkInterfaceIds sets the NetworkInterfaceIds field's value. -func (s *DescribeNetworkInterfacesInput) SetNetworkInterfaceIds(v []*string) *DescribeNetworkInterfacesInput { - s.NetworkInterfaceIds = v +// SetFleetId sets the FleetId field's value. +func (s *DescribeFleetInstancesInput) SetFleetId(v string) *DescribeFleetInstancesInput { + s.FleetId = &v return s } -// Contains the output of DescribeNetworkInterfaces. -type DescribeNetworkInterfacesOutput struct { +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeFleetInstancesInput) SetMaxResults(v int64) *DescribeFleetInstancesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeFleetInstancesInput) SetNextToken(v string) *DescribeFleetInstancesInput { + s.NextToken = &v + return s +} + +type DescribeFleetInstancesOutput struct { _ struct{} `type:"structure"` - // Information about one or more network interfaces. - NetworkInterfaces []*NetworkInterface `locationName:"networkInterfaceSet" locationNameList:"item" type:"list"` + // The running instances. This list is refreshed periodically and might be out + // of date. + ActiveInstances []*ActiveInstance `locationName:"activeInstanceSet" locationNameList:"item" type:"list"` + + // The ID of the EC2 Fleet. + FleetId *string `locationName:"fleetId" type:"string"` + + // The token for the next set of results. + NextToken *string `locationName:"nextToken" type:"string"` } // String returns the string representation -func (s DescribeNetworkInterfacesOutput) String() string { +func (s DescribeFleetInstancesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeNetworkInterfacesOutput) GoString() string { +func (s DescribeFleetInstancesOutput) GoString() string { return s.String() } -// SetNetworkInterfaces sets the NetworkInterfaces field's value. -func (s *DescribeNetworkInterfacesOutput) SetNetworkInterfaces(v []*NetworkInterface) *DescribeNetworkInterfacesOutput { - s.NetworkInterfaces = v +// SetActiveInstances sets the ActiveInstances field's value. +func (s *DescribeFleetInstancesOutput) SetActiveInstances(v []*ActiveInstance) *DescribeFleetInstancesOutput { + s.ActiveInstances = v return s } -// Contains the parameters for DescribePlacementGroups. -type DescribePlacementGroupsInput struct { +// SetFleetId sets the FleetId field's value. +func (s *DescribeFleetInstancesOutput) SetFleetId(v string) *DescribeFleetInstancesOutput { + s.FleetId = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeFleetInstancesOutput) SetNextToken(v string) *DescribeFleetInstancesOutput { + s.NextToken = &v + return s +} + +type DescribeFleetsInput 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 `locationName:"dryRun" type:"boolean"` + DryRun *bool `type:"boolean"` // One or more filters. // - // * group-name - The name of the placement group. + // * activity-status - The progress of the EC2 Fleet ( error | pending-fulfillment + // | pending-termination | fulfilled). // - // * state - The state of the placement group (pending | available | deleting - // | deleted). + // * excess-capacity-termination-policy - Indicates whether to terminate + // running instances if the target capacity is decreased below the current + // EC2 Fleet size (true | false). + // + // * fleet-state - The state of the EC2 Fleet (submitted | active | deleted + // | failed | deleted-running | deleted-terminating | modifying). + // + // * replace-unhealthy-instances - Indicates whether EC2 Fleet should replace + // unhealthy instances (true | false). // - // * strategy - The strategy of the placement group (cluster | spread). + // * type - The type of request (instant | request | maintain). Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - // One or more placement group names. - // - // Default: Describes all your placement groups, or only those otherwise specified. - GroupNames []*string `locationName:"groupName" type:"list"` + // The ID of the EC2 Fleets. + FleetIds []*string `locationName:"FleetId" type:"list"` + + // The maximum number of results to return in a single call. Specify a value + // between 1 and 1000. The default value is 1000. To retrieve the remaining + // results, make another call with the returned NextToken value. + MaxResults *int64 `type:"integer"` + + // The token for the next set of results. + NextToken *string `type:"string"` } // String returns the string representation -func (s DescribePlacementGroupsInput) String() string { +func (s DescribeFleetsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribePlacementGroupsInput) GoString() string { +func (s DescribeFleetsInput) GoString() string { return s.String() } // SetDryRun sets the DryRun field's value. -func (s *DescribePlacementGroupsInput) SetDryRun(v bool) *DescribePlacementGroupsInput { +func (s *DescribeFleetsInput) SetDryRun(v bool) *DescribeFleetsInput { s.DryRun = &v return s } // SetFilters sets the Filters field's value. -func (s *DescribePlacementGroupsInput) SetFilters(v []*Filter) *DescribePlacementGroupsInput { +func (s *DescribeFleetsInput) SetFilters(v []*Filter) *DescribeFleetsInput { s.Filters = v return s } -// SetGroupNames sets the GroupNames field's value. -func (s *DescribePlacementGroupsInput) SetGroupNames(v []*string) *DescribePlacementGroupsInput { - s.GroupNames = v +// SetFleetIds sets the FleetIds field's value. +func (s *DescribeFleetsInput) SetFleetIds(v []*string) *DescribeFleetsInput { + s.FleetIds = v return s } -// Contains the output of DescribePlacementGroups. -type DescribePlacementGroupsOutput struct { - _ struct{} `type:"structure"` - - // One or more placement groups. - PlacementGroups []*PlacementGroup `locationName:"placementGroupSet" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s DescribePlacementGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribePlacementGroupsOutput) GoString() string { - return s.String() +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeFleetsInput) SetMaxResults(v int64) *DescribeFleetsInput { + s.MaxResults = &v + return s } -// SetPlacementGroups sets the PlacementGroups field's value. -func (s *DescribePlacementGroupsOutput) SetPlacementGroups(v []*PlacementGroup) *DescribePlacementGroupsOutput { - s.PlacementGroups = v +// SetNextToken sets the NextToken field's value. +func (s *DescribeFleetsInput) SetNextToken(v string) *DescribeFleetsInput { + s.NextToken = &v return s } -// Contains the parameters for DescribePrefixLists. -type DescribePrefixListsInput struct { +// Describes the instances that were launched by the fleet. +type DescribeFleetsInstances 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 instances. + InstanceIds []*string `locationName:"instanceIds" locationNameList:"item" type:"list"` - // One or more filters. - // - // * prefix-list-id: The ID of a prefix list. - // - // * prefix-list-name: The name of a prefix list. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + // The instance type. + InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` - // The maximum number of items to return for this request. The request returns - // a token that you can specify in a subsequent call to get the next set of - // results. - // - // Constraint: If the value specified is greater than 1000, we return only 1000 - // items. - MaxResults *int64 `type:"integer"` + // The launch templates and overrides that were used for launching the instances. + // Any parameters that you specify in the Overrides override the same parameters + // in the launch template. + LaunchTemplateAndOverrides *LaunchTemplateAndOverridesResponse `locationName:"launchTemplateAndOverrides" type:"structure"` - // The token for the next set of items to return. (You received this token from - // a prior call.) - NextToken *string `type:"string"` + // Indicates if the instance that was launched is a Spot Instance or On-Demand + // Instance. + Lifecycle *string `locationName:"lifecycle" type:"string" enum:"InstanceLifecycle"` - // One or more prefix list IDs. - PrefixListIds []*string `locationName:"PrefixListId" locationNameList:"item" type:"list"` + // The value is Windows for Windows instances; otherwise blank. + Platform *string `locationName:"platform" type:"string" enum:"PlatformValues"` } // String returns the string representation -func (s DescribePrefixListsInput) String() string { +func (s DescribeFleetsInstances) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribePrefixListsInput) GoString() string { +func (s DescribeFleetsInstances) GoString() string { return s.String() } -// SetDryRun sets the DryRun field's value. -func (s *DescribePrefixListsInput) SetDryRun(v bool) *DescribePrefixListsInput { - s.DryRun = &v +// SetInstanceIds sets the InstanceIds field's value. +func (s *DescribeFleetsInstances) SetInstanceIds(v []*string) *DescribeFleetsInstances { + s.InstanceIds = v return s } -// SetFilters sets the Filters field's value. -func (s *DescribePrefixListsInput) SetFilters(v []*Filter) *DescribePrefixListsInput { - s.Filters = v +// SetInstanceType sets the InstanceType field's value. +func (s *DescribeFleetsInstances) SetInstanceType(v string) *DescribeFleetsInstances { + s.InstanceType = &v return s } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribePrefixListsInput) SetMaxResults(v int64) *DescribePrefixListsInput { - s.MaxResults = &v +// SetLaunchTemplateAndOverrides sets the LaunchTemplateAndOverrides field's value. +func (s *DescribeFleetsInstances) SetLaunchTemplateAndOverrides(v *LaunchTemplateAndOverridesResponse) *DescribeFleetsInstances { + s.LaunchTemplateAndOverrides = v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribePrefixListsInput) SetNextToken(v string) *DescribePrefixListsInput { - s.NextToken = &v +// SetLifecycle sets the Lifecycle field's value. +func (s *DescribeFleetsInstances) SetLifecycle(v string) *DescribeFleetsInstances { + s.Lifecycle = &v return s } -// SetPrefixListIds sets the PrefixListIds field's value. -func (s *DescribePrefixListsInput) SetPrefixListIds(v []*string) *DescribePrefixListsInput { - s.PrefixListIds = v +// SetPlatform sets the Platform field's value. +func (s *DescribeFleetsInstances) SetPlatform(v string) *DescribeFleetsInstances { + s.Platform = &v return s } -// Contains the output of DescribePrefixLists. -type DescribePrefixListsOutput struct { +type DescribeFleetsOutput struct { _ struct{} `type:"structure"` - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `locationName:"nextToken" type:"string"` + // Information about the EC2 Fleets. + Fleets []*FleetData `locationName:"fleetSet" locationNameList:"item" type:"list"` - // All available prefix lists. - PrefixLists []*PrefixList `locationName:"prefixListSet" locationNameList:"item" type:"list"` + // The token for the next set of results. + NextToken *string `locationName:"nextToken" type:"string"` } // String returns the string representation -func (s DescribePrefixListsOutput) String() string { +func (s DescribeFleetsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribePrefixListsOutput) GoString() string { +func (s DescribeFleetsOutput) GoString() string { return s.String() } -// SetNextToken sets the NextToken field's value. -func (s *DescribePrefixListsOutput) SetNextToken(v string) *DescribePrefixListsOutput { - s.NextToken = &v +// SetFleets sets the Fleets field's value. +func (s *DescribeFleetsOutput) SetFleets(v []*FleetData) *DescribeFleetsOutput { + s.Fleets = v return s } -// SetPrefixLists sets the PrefixLists field's value. -func (s *DescribePrefixListsOutput) SetPrefixLists(v []*PrefixList) *DescribePrefixListsOutput { - s.PrefixLists = v +// SetNextToken sets the NextToken field's value. +func (s *DescribeFleetsOutput) SetNextToken(v string) *DescribeFleetsOutput { + s.NextToken = &v return s } -type DescribePrincipalIdFormatInput struct { +type DescribeFlowLogsInput struct { _ struct{} `type:"structure"` // Checks whether you have the required permissions for the action, without @@ -39129,207 +44447,224 @@ type DescribePrincipalIdFormatInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another call with the returned NextToken value. - MaxResults *int64 `type:"integer"` + // One or more filters. + // + // * deliver-log-status - The status of the logs delivery (SUCCESS | FAILED). + // + // * log-destination-type - The type of destination to which the flow log + // publishes data. Possible destination types include cloud-watch-logs and + // S3. + // + // * flow-log-id - The ID of the flow log. + // + // * log-group-name - The name of the log group. + // + // * resource-id - The ID of the VPC, subnet, or network interface. + // + // * traffic-type - The type of traffic (ACCEPT | REJECT | ALL). + Filter []*Filter `locationNameList:"Filter" type:"list"` - // The token to request the next page of results. - NextToken *string `type:"string"` + // One or more flow log IDs. + FlowLogIds []*string `locationName:"FlowLogId" locationNameList:"item" type:"list"` - // The type of resource: bundle | conversion-task | customer-gateway | dhcp-options - // | elastic-ip-allocation | elastic-ip-association | export-task | flow-log - // | image | import-task | instance | internet-gateway | network-acl | network-acl-association - // | network-interface | network-interface-attachment | prefix-list | reservation - // | route-table | route-table-association | security-group | snapshot | subnet - // | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association - // | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway - Resources []*string `locationName:"Resource" locationNameList:"item" type:"list"` + // The maximum number of results to return for the request in a single page. + // The remaining results can be seen by sending another request with the returned + // NextToken value. This value can be between 5 and 1000. If MaxResults is given + // a value larger than 1000, only 1000 results are returned. You cannot specify + // this parameter and the flow log IDs parameter in the same request. + MaxResults *int64 `type:"integer"` + + // The token to retrieve the next page of results. + NextToken *string `type:"string"` } // String returns the string representation -func (s DescribePrincipalIdFormatInput) String() string { +func (s DescribeFlowLogsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribePrincipalIdFormatInput) GoString() string { +func (s DescribeFlowLogsInput) GoString() string { return s.String() } // SetDryRun sets the DryRun field's value. -func (s *DescribePrincipalIdFormatInput) SetDryRun(v bool) *DescribePrincipalIdFormatInput { +func (s *DescribeFlowLogsInput) SetDryRun(v bool) *DescribeFlowLogsInput { s.DryRun = &v return s } +// SetFilter sets the Filter field's value. +func (s *DescribeFlowLogsInput) SetFilter(v []*Filter) *DescribeFlowLogsInput { + s.Filter = v + return s +} + +// SetFlowLogIds sets the FlowLogIds field's value. +func (s *DescribeFlowLogsInput) SetFlowLogIds(v []*string) *DescribeFlowLogsInput { + s.FlowLogIds = v + return s +} + // SetMaxResults sets the MaxResults field's value. -func (s *DescribePrincipalIdFormatInput) SetMaxResults(v int64) *DescribePrincipalIdFormatInput { +func (s *DescribeFlowLogsInput) SetMaxResults(v int64) *DescribeFlowLogsInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. -func (s *DescribePrincipalIdFormatInput) SetNextToken(v string) *DescribePrincipalIdFormatInput { +func (s *DescribeFlowLogsInput) SetNextToken(v string) *DescribeFlowLogsInput { s.NextToken = &v return s } -// SetResources sets the Resources field's value. -func (s *DescribePrincipalIdFormatInput) SetResources(v []*string) *DescribePrincipalIdFormatInput { - s.Resources = v - return s -} - -type DescribePrincipalIdFormatOutput struct { +type DescribeFlowLogsOutput struct { _ struct{} `type:"structure"` + // Information about the flow logs. + FlowLogs []*FlowLog `locationName:"flowLogSet" 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"` - - // Information about the ID format settings for the ARN. - Principals []*PrincipalIdFormat `locationName:"principalSet" locationNameList:"item" type:"list"` } // String returns the string representation -func (s DescribePrincipalIdFormatOutput) String() string { +func (s DescribeFlowLogsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribePrincipalIdFormatOutput) GoString() string { +func (s DescribeFlowLogsOutput) GoString() string { return s.String() } -// SetNextToken sets the NextToken field's value. -func (s *DescribePrincipalIdFormatOutput) SetNextToken(v string) *DescribePrincipalIdFormatOutput { - s.NextToken = &v +// SetFlowLogs sets the FlowLogs field's value. +func (s *DescribeFlowLogsOutput) SetFlowLogs(v []*FlowLog) *DescribeFlowLogsOutput { + s.FlowLogs = v return s } -// SetPrincipals sets the Principals field's value. -func (s *DescribePrincipalIdFormatOutput) SetPrincipals(v []*PrincipalIdFormat) *DescribePrincipalIdFormatOutput { - s.Principals = v +// SetNextToken sets the NextToken field's value. +func (s *DescribeFlowLogsOutput) SetNextToken(v string) *DescribeFlowLogsOutput { + s.NextToken = &v return s } -// Contains the parameters for DescribeRegions. -type DescribeRegionsInput struct { +type DescribeFpgaImageAttributeInput struct { _ struct{} `type:"structure"` + // The AFI attribute. + // + // Attribute is a required field + Attribute *string `type:"string" required:"true" enum:"FpgaImageAttributeName"` + // 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 `locationName:"dryRun" type:"boolean"` + DryRun *bool `type:"boolean"` - // One or more filters. - // - // * endpoint - The endpoint of the region (for example, ec2.us-east-1.amazonaws.com). + // The ID of the AFI. // - // * region-name - The name of the region (for example, us-east-1). - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The names of one or more regions. - RegionNames []*string `locationName:"RegionName" locationNameList:"RegionName" type:"list"` + // FpgaImageId is a required field + FpgaImageId *string `type:"string" required:"true"` } // String returns the string representation -func (s DescribeRegionsInput) String() string { +func (s DescribeFpgaImageAttributeInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeRegionsInput) GoString() string { +func (s DescribeFpgaImageAttributeInput) GoString() string { return s.String() } -// SetDryRun sets the DryRun field's value. -func (s *DescribeRegionsInput) SetDryRun(v bool) *DescribeRegionsInput { - s.DryRun = &v +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeFpgaImageAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeFpgaImageAttributeInput"} + if s.Attribute == nil { + invalidParams.Add(request.NewErrParamRequired("Attribute")) + } + if s.FpgaImageId == nil { + invalidParams.Add(request.NewErrParamRequired("FpgaImageId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAttribute sets the Attribute field's value. +func (s *DescribeFpgaImageAttributeInput) SetAttribute(v string) *DescribeFpgaImageAttributeInput { + s.Attribute = &v return s } -// SetFilters sets the Filters field's value. -func (s *DescribeRegionsInput) SetFilters(v []*Filter) *DescribeRegionsInput { - s.Filters = v +// SetDryRun sets the DryRun field's value. +func (s *DescribeFpgaImageAttributeInput) SetDryRun(v bool) *DescribeFpgaImageAttributeInput { + s.DryRun = &v return s } -// SetRegionNames sets the RegionNames field's value. -func (s *DescribeRegionsInput) SetRegionNames(v []*string) *DescribeRegionsInput { - s.RegionNames = v +// SetFpgaImageId sets the FpgaImageId field's value. +func (s *DescribeFpgaImageAttributeInput) SetFpgaImageId(v string) *DescribeFpgaImageAttributeInput { + s.FpgaImageId = &v return s } -// Contains the output of DescribeRegions. -type DescribeRegionsOutput struct { +type DescribeFpgaImageAttributeOutput struct { _ struct{} `type:"structure"` - // Information about one or more regions. - Regions []*Region `locationName:"regionInfo" locationNameList:"item" type:"list"` + // Information about the attribute. + FpgaImageAttribute *FpgaImageAttribute `locationName:"fpgaImageAttribute" type:"structure"` } // String returns the string representation -func (s DescribeRegionsOutput) String() string { +func (s DescribeFpgaImageAttributeOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeRegionsOutput) GoString() string { +func (s DescribeFpgaImageAttributeOutput) GoString() string { return s.String() } -// SetRegions sets the Regions field's value. -func (s *DescribeRegionsOutput) SetRegions(v []*Region) *DescribeRegionsOutput { - s.Regions = v +// SetFpgaImageAttribute sets the FpgaImageAttribute field's value. +func (s *DescribeFpgaImageAttributeOutput) SetFpgaImageAttribute(v *FpgaImageAttribute) *DescribeFpgaImageAttributeOutput { + s.FpgaImageAttribute = v return s } -// Contains the parameters for DescribeReservedInstances. -type DescribeReservedInstancesInput struct { +type DescribeFpgaImagesInput 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 `locationName:"dryRun" type:"boolean"` + DryRun *bool `type:"boolean"` // One or more filters. // - // * availability-zone - The Availability Zone where the Reserved Instance - // can be used. - // - // * duration - The duration of the Reserved Instance (one year or three - // years), in seconds (31536000 | 94608000). - // - // * end - The time when the Reserved Instance expires (for example, 2015-08-07T11:54:42.000Z). + // * create-time - The creation time of the AFI. // - // * fixed-price - The purchase price of the Reserved Instance (for example, - // 9800.0). + // * fpga-image-id - The FPGA image identifier (AFI ID). // - // * instance-type - The instance type that is covered by the reservation. + // * fpga-image-global-id - The global FPGA image identifier (AGFI ID). // - // * scope - The scope of the Reserved Instance (Region or Availability Zone). + // * name - The name of the AFI. // - // * 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)). + // * owner-id - The AWS account ID of the AFI owner. // - // * reserved-instances-id - The ID of the Reserved Instance. + // * product-code - The product code. // - // * start - The time at which the Reserved Instance purchase request was - // placed (for example, 2014-08-07T11:54:42.000Z). + // * shell-version - The version of the AWS Shell that was used to create + // the bitstream. // - // * state - The state of the Reserved Instance (payment-pending | active - // | payment-failed | retired). + // * state - The state of the AFI (pending | failed | available | unavailable). // // * 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. @@ -39341,718 +44676,712 @@ type DescribeReservedInstancesInput struct { // to find all resources assigned a tag with a specific key, regardless of // the tag value. // - // * usage-price - The usage price of the Reserved Instance, per hour (for - // example, 0.84). + // * update-time - The time of the most recent update. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - // Describes whether the Reserved Instance is Standard or Convertible. - OfferingClass *string `type:"string" enum:"OfferingClassType"` + // One or more AFI IDs. + FpgaImageIds []*string `locationName:"FpgaImageId" locationNameList:"item" type:"list"` - // The Reserved Instance offering type. If you are using tools that predate - // the 2011-11-01 API version, you only have access to the Medium Utilization - // Reserved Instance offering type. - OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingTypeValues"` + // The maximum number of results to return in a single call. + MaxResults *int64 `min:"5" type:"integer"` - // One or more Reserved Instance IDs. - // - // Default: Describes all your Reserved Instances, or only those otherwise specified. - ReservedInstancesIds []*string `locationName:"ReservedInstancesId" locationNameList:"ReservedInstancesId" type:"list"` + // The token to retrieve the next page of results. + NextToken *string `min:"1" type:"string"` + + // Filters the AFI by owner. Specify an AWS account ID, self (owner is the sender + // of the request), or an AWS owner alias (valid values are amazon | aws-marketplace). + Owners []*string `locationName:"Owner" locationNameList:"Owner" type:"list"` } // String returns the string representation -func (s DescribeReservedInstancesInput) String() string { +func (s DescribeFpgaImagesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeReservedInstancesInput) GoString() string { +func (s DescribeFpgaImagesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeFpgaImagesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeFpgaImagesInput"} + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetDryRun sets the DryRun field's value. -func (s *DescribeReservedInstancesInput) SetDryRun(v bool) *DescribeReservedInstancesInput { +func (s *DescribeFpgaImagesInput) SetDryRun(v bool) *DescribeFpgaImagesInput { s.DryRun = &v return s } // SetFilters sets the Filters field's value. -func (s *DescribeReservedInstancesInput) SetFilters(v []*Filter) *DescribeReservedInstancesInput { +func (s *DescribeFpgaImagesInput) SetFilters(v []*Filter) *DescribeFpgaImagesInput { s.Filters = v return s } -// SetOfferingClass sets the OfferingClass field's value. -func (s *DescribeReservedInstancesInput) SetOfferingClass(v string) *DescribeReservedInstancesInput { - s.OfferingClass = &v +// SetFpgaImageIds sets the FpgaImageIds field's value. +func (s *DescribeFpgaImagesInput) SetFpgaImageIds(v []*string) *DescribeFpgaImagesInput { + s.FpgaImageIds = v return s } -// SetOfferingType sets the OfferingType field's value. -func (s *DescribeReservedInstancesInput) SetOfferingType(v string) *DescribeReservedInstancesInput { - s.OfferingType = &v +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeFpgaImagesInput) SetMaxResults(v int64) *DescribeFpgaImagesInput { + s.MaxResults = &v return s } -// SetReservedInstancesIds sets the ReservedInstancesIds field's value. -func (s *DescribeReservedInstancesInput) SetReservedInstancesIds(v []*string) *DescribeReservedInstancesInput { - s.ReservedInstancesIds = v +// SetNextToken sets the NextToken field's value. +func (s *DescribeFpgaImagesInput) SetNextToken(v string) *DescribeFpgaImagesInput { + s.NextToken = &v return s } -// Contains the parameters for DescribeReservedInstancesListings. -type DescribeReservedInstancesListingsInput struct { +// SetOwners sets the Owners field's value. +func (s *DescribeFpgaImagesInput) SetOwners(v []*string) *DescribeFpgaImagesInput { + s.Owners = v + return s +} + +type DescribeFpgaImagesOutput struct { + _ struct{} `type:"structure"` + + // Information about one or more FPGA images. + FpgaImages []*FpgaImage `locationName:"fpgaImageSet" 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" min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeFpgaImagesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeFpgaImagesOutput) GoString() string { + return s.String() +} + +// SetFpgaImages sets the FpgaImages field's value. +func (s *DescribeFpgaImagesOutput) SetFpgaImages(v []*FpgaImage) *DescribeFpgaImagesOutput { + s.FpgaImages = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeFpgaImagesOutput) SetNextToken(v string) *DescribeFpgaImagesOutput { + s.NextToken = &v + return s +} + +type DescribeHostReservationOfferingsInput struct { _ struct{} `type:"structure"` // One or more filters. // - // * reserved-instances-id - The ID of the Reserved Instances. - // - // * reserved-instances-listing-id - The ID of the Reserved Instances listing. - // - // * status - The status of the Reserved Instance listing (pending | active - // | cancelled | closed). + // * instance-family - The instance family of the offering (for example, + // m4). // - // * status-message - The reason for the status. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + // * payment-option - The payment option (NoUpfront | PartialUpfront | AllUpfront). + Filter []*Filter `locationNameList:"Filter" type:"list"` - // One or more Reserved Instance IDs. - ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"` + // This is the maximum duration of the reservation to purchase, specified in + // seconds. Reservations are available in one-year and three-year terms. The + // number of seconds specified must be the number of seconds in a year (365x24x60x60) + // times one of the supported durations (1 or 3). For example, specify 94608000 + // for three years. + MaxDuration *int64 `type:"integer"` - // One or more Reserved Instance listing IDs. - ReservedInstancesListingId *string `locationName:"reservedInstancesListingId" type:"string"` + // The maximum number of results to return for the request in a single page. + // The remaining results can be seen by sending another request with the returned + // nextToken value. This value can be between 5 and 500. If maxResults is given + // a larger value than 500, you receive an error. + MaxResults *int64 `type:"integer"` + + // This is the minimum duration of the reservation you'd like to purchase, specified + // in seconds. Reservations are available in one-year and three-year terms. + // The number of seconds specified must be the number of seconds in a year (365x24x60x60) + // times one of the supported durations (1 or 3). For example, specify 31536000 + // for one year. + MinDuration *int64 `type:"integer"` + + // The token to use to retrieve the next page of results. + NextToken *string `type:"string"` + + // The ID of the reservation offering. + OfferingId *string `type:"string"` } // String returns the string representation -func (s DescribeReservedInstancesListingsInput) String() string { +func (s DescribeHostReservationOfferingsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeReservedInstancesListingsInput) GoString() string { +func (s DescribeHostReservationOfferingsInput) GoString() string { return s.String() } -// SetFilters sets the Filters field's value. -func (s *DescribeReservedInstancesListingsInput) SetFilters(v []*Filter) *DescribeReservedInstancesListingsInput { - s.Filters = v +// SetFilter sets the Filter field's value. +func (s *DescribeHostReservationOfferingsInput) SetFilter(v []*Filter) *DescribeHostReservationOfferingsInput { + s.Filter = v return s } -// SetReservedInstancesId sets the ReservedInstancesId field's value. -func (s *DescribeReservedInstancesListingsInput) SetReservedInstancesId(v string) *DescribeReservedInstancesListingsInput { - s.ReservedInstancesId = &v +// SetMaxDuration sets the MaxDuration field's value. +func (s *DescribeHostReservationOfferingsInput) SetMaxDuration(v int64) *DescribeHostReservationOfferingsInput { + s.MaxDuration = &v return s } -// SetReservedInstancesListingId sets the ReservedInstancesListingId field's value. -func (s *DescribeReservedInstancesListingsInput) SetReservedInstancesListingId(v string) *DescribeReservedInstancesListingsInput { - s.ReservedInstancesListingId = &v +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeHostReservationOfferingsInput) SetMaxResults(v int64) *DescribeHostReservationOfferingsInput { + s.MaxResults = &v return s } -// Contains the output of DescribeReservedInstancesListings. -type DescribeReservedInstancesListingsOutput struct { +// SetMinDuration sets the MinDuration field's value. +func (s *DescribeHostReservationOfferingsInput) SetMinDuration(v int64) *DescribeHostReservationOfferingsInput { + s.MinDuration = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeHostReservationOfferingsInput) SetNextToken(v string) *DescribeHostReservationOfferingsInput { + s.NextToken = &v + return s +} + +// SetOfferingId sets the OfferingId field's value. +func (s *DescribeHostReservationOfferingsInput) SetOfferingId(v string) *DescribeHostReservationOfferingsInput { + s.OfferingId = &v + return s +} + +type DescribeHostReservationOfferingsOutput struct { _ struct{} `type:"structure"` - // Information about the Reserved Instance listing. - ReservedInstancesListings []*ReservedInstancesListing `locationName:"reservedInstancesListingsSet" 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"` + + // Information about the offerings. + OfferingSet []*HostOffering `locationName:"offeringSet" locationNameList:"item" type:"list"` } // String returns the string representation -func (s DescribeReservedInstancesListingsOutput) String() string { +func (s DescribeHostReservationOfferingsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeReservedInstancesListingsOutput) GoString() string { +func (s DescribeHostReservationOfferingsOutput) GoString() string { return s.String() } -// SetReservedInstancesListings sets the ReservedInstancesListings field's value. -func (s *DescribeReservedInstancesListingsOutput) SetReservedInstancesListings(v []*ReservedInstancesListing) *DescribeReservedInstancesListingsOutput { - s.ReservedInstancesListings = v +// SetNextToken sets the NextToken field's value. +func (s *DescribeHostReservationOfferingsOutput) SetNextToken(v string) *DescribeHostReservationOfferingsOutput { + s.NextToken = &v return s } -// Contains the parameters for DescribeReservedInstancesModifications. -type DescribeReservedInstancesModificationsInput struct { +// SetOfferingSet sets the OfferingSet field's value. +func (s *DescribeHostReservationOfferingsOutput) SetOfferingSet(v []*HostOffering) *DescribeHostReservationOfferingsOutput { + s.OfferingSet = v + return s +} + +type DescribeHostReservationsInput struct { _ struct{} `type:"structure"` // One or more filters. // - // * client-token - The idempotency token for the modification request. - // - // * create-date - The time when the modification request was created. - // - // * effective-date - The time when the modification becomes effective. - // - // * modification-result.reserved-instances-id - The ID for the Reserved - // Instances created as part of the modification request. This ID is only - // available when the status of the modification is fulfilled. - // - // * modification-result.target-configuration.availability-zone - The Availability - // Zone for the new Reserved Instances. - // - // * modification-result.target-configuration.instance-count - The number - // of new Reserved Instances. - // - // * modification-result.target-configuration.instance-type - The instance - // type of the new Reserved Instances. - // - // * modification-result.target-configuration.platform - The network platform - // of the new Reserved Instances (EC2-Classic | EC2-VPC). - // - // * reserved-instances-id - The ID of the Reserved Instances modified. - // - // * reserved-instances-modification-id - The ID of the modification request. - // - // * status - The status of the Reserved Instances modification request (processing - // | fulfilled | failed). + // * instance-family - The instance family (for example, m4). // - // * status-message - The reason for the status. + // * payment-option - The payment option (NoUpfront | PartialUpfront | AllUpfront). // - // * update-date - The time when the modification request was last updated. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + // * state - The state of the reservation (payment-pending | payment-failed + // | active | retired). + Filter []*Filter `locationNameList:"Filter" type:"list"` - // The token to retrieve the next page of results. - NextToken *string `locationName:"nextToken" type:"string"` + // One or more host reservation IDs. + HostReservationIdSet []*string `locationNameList:"item" type:"list"` - // IDs for the submitted modification request. - ReservedInstancesModificationIds []*string `locationName:"ReservedInstancesModificationId" locationNameList:"ReservedInstancesModificationId" type:"list"` + // The maximum number of results to return for the request in a single page. + // The remaining results can be seen by sending another request with the returned + // nextToken value. This value can be between 5 and 500. If maxResults is given + // a larger value than 500, you receive an error. + MaxResults *int64 `type:"integer"` + + // The token to use to retrieve the next page of results. + NextToken *string `type:"string"` } // String returns the string representation -func (s DescribeReservedInstancesModificationsInput) String() string { +func (s DescribeHostReservationsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeReservedInstancesModificationsInput) GoString() string { +func (s DescribeHostReservationsInput) GoString() string { return s.String() } -// SetFilters sets the Filters field's value. -func (s *DescribeReservedInstancesModificationsInput) SetFilters(v []*Filter) *DescribeReservedInstancesModificationsInput { - s.Filters = v +// SetFilter sets the Filter field's value. +func (s *DescribeHostReservationsInput) SetFilter(v []*Filter) *DescribeHostReservationsInput { + s.Filter = v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeReservedInstancesModificationsInput) SetNextToken(v string) *DescribeReservedInstancesModificationsInput { - s.NextToken = &v +// SetHostReservationIdSet sets the HostReservationIdSet field's value. +func (s *DescribeHostReservationsInput) SetHostReservationIdSet(v []*string) *DescribeHostReservationsInput { + s.HostReservationIdSet = v return s } -// SetReservedInstancesModificationIds sets the ReservedInstancesModificationIds field's value. -func (s *DescribeReservedInstancesModificationsInput) SetReservedInstancesModificationIds(v []*string) *DescribeReservedInstancesModificationsInput { - s.ReservedInstancesModificationIds = v +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeHostReservationsInput) SetMaxResults(v int64) *DescribeHostReservationsInput { + s.MaxResults = &v return s } -// Contains the output of DescribeReservedInstancesModifications. -type DescribeReservedInstancesModificationsOutput struct { +// SetNextToken sets the NextToken field's value. +func (s *DescribeHostReservationsInput) SetNextToken(v string) *DescribeHostReservationsInput { + s.NextToken = &v + return s +} + +type DescribeHostReservationsOutput struct { _ struct{} `type:"structure"` + // Details about the reservation's configuration. + HostReservationSet []*HostReservation `locationName:"hostReservationSet" 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"` - - // The Reserved Instance modification information. - ReservedInstancesModifications []*ReservedInstancesModification `locationName:"reservedInstancesModificationsSet" locationNameList:"item" type:"list"` } // String returns the string representation -func (s DescribeReservedInstancesModificationsOutput) String() string { +func (s DescribeHostReservationsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeReservedInstancesModificationsOutput) GoString() string { +func (s DescribeHostReservationsOutput) GoString() string { return s.String() } -// SetNextToken sets the NextToken field's value. -func (s *DescribeReservedInstancesModificationsOutput) SetNextToken(v string) *DescribeReservedInstancesModificationsOutput { - s.NextToken = &v +// SetHostReservationSet sets the HostReservationSet field's value. +func (s *DescribeHostReservationsOutput) SetHostReservationSet(v []*HostReservation) *DescribeHostReservationsOutput { + s.HostReservationSet = v return s } -// SetReservedInstancesModifications sets the ReservedInstancesModifications field's value. -func (s *DescribeReservedInstancesModificationsOutput) SetReservedInstancesModifications(v []*ReservedInstancesModification) *DescribeReservedInstancesModificationsOutput { - s.ReservedInstancesModifications = v +// SetNextToken sets the NextToken field's value. +func (s *DescribeHostReservationsOutput) SetNextToken(v string) *DescribeHostReservationsOutput { + s.NextToken = &v return s } -// Contains the parameters for DescribeReservedInstancesOfferings. -type DescribeReservedInstancesOfferingsInput struct { +type DescribeHostsInput struct { _ struct{} `type:"structure"` - // The Availability Zone in which the Reserved Instance can be used. - AvailabilityZone *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 `locationName:"dryRun" type:"boolean"` - // One or more filters. // - // * availability-zone - The Availability Zone where the Reserved Instance - // can be used. - // - // * duration - The duration of the Reserved Instance (for example, one year - // or three years), in seconds (31536000 | 94608000). - // - // * fixed-price - The purchase price of the Reserved Instance (for example, - // 9800.0). - // - // * instance-type - The instance type that is covered by the reservation. - // - // * 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. - // - // * 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)) + // * auto-placement - Whether auto-placement is enabled or disabled (on | + // off). // - // * reserved-instances-offering-id - The Reserved Instances offering ID. + // * availability-zone - The Availability Zone of the host. // - // * scope - The scope of the Reserved Instance (Availability Zone or Region). + // * client-token - The idempotency token that you provided when you allocated + // the host. // - // * usage-price - The usage price of the Reserved Instance, per hour (for - // example, 0.84). - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // Include Reserved Instance Marketplace offerings in the response. - IncludeMarketplace *bool `type:"boolean"` - - // The tenancy of the instances covered by the reservation. A Reserved Instance - // with a tenancy of dedicated is applied to instances that run in a VPC on - // single-tenant hardware (i.e., Dedicated Instances). + // * host-reservation-id - The ID of the reservation assigned to this host. // - // Important: The host value cannot be used with this parameter. Use the default - // or dedicated values only. + // * instance-type - The instance type size that the Dedicated Host is configured + // to support. // - // Default: default - 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 (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) - // in the Amazon Elastic Compute Cloud User Guide. - InstanceType *string `type:"string" enum:"InstanceType"` - - // The maximum duration (in seconds) to filter when searching for offerings. + // * state - The allocation state of the Dedicated Host (available | under-assessment + // | permanent-failure | released | released-permanent-failure). // - // Default: 94608000 (3 years) - MaxDuration *int64 `type:"long"` + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. + Filter []*Filter `locationName:"filter" locationNameList:"Filter" type:"list"` - // The maximum number of instances to filter when searching for offerings. - // - // Default: 20 - MaxInstanceCount *int64 `type:"integer"` + // The IDs of the Dedicated Hosts. The IDs are used for targeted instance launches. + HostIds []*string `locationName:"hostId" locationNameList:"item" type:"list"` // The maximum number of results to return for the request in a single page. - // The remaining results of the initial request can be seen by sending another - // request with the returned NextToken value. The maximum is 100. - // - // Default: 100 + // The remaining results can be seen by sending another request with the returned + // nextToken value. This value can be between 5 and 500. If maxResults is given + // a larger value than 500, you receive an error. You cannot specify this parameter + // and the host IDs parameter in the same request. MaxResults *int64 `locationName:"maxResults" type:"integer"` - // The minimum duration (in seconds) to filter when searching for offerings. - // - // Default: 2592000 (1 month) - MinDuration *int64 `type:"long"` - // The token to retrieve the next page of results. NextToken *string `locationName:"nextToken" type:"string"` - - // The offering class of the Reserved Instance. Can be standard or convertible. - OfferingClass *string `type:"string" enum:"OfferingClassType"` - - // The Reserved Instance offering type. If you are using tools that predate - // the 2011-11-01 API version, you only have access to the Medium Utilization - // Reserved Instance offering type. - OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingTypeValues"` - - // The Reserved Instance product platform description. Instances that include - // (Amazon VPC) in the description are for use with Amazon VPC. - ProductDescription *string `type:"string" enum:"RIProductDescription"` - - // One or more Reserved Instances offering IDs. - ReservedInstancesOfferingIds []*string `locationName:"ReservedInstancesOfferingId" type:"list"` } // String returns the string representation -func (s DescribeReservedInstancesOfferingsInput) String() string { +func (s DescribeHostsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeReservedInstancesOfferingsInput) GoString() string { +func (s DescribeHostsInput) GoString() string { return s.String() } -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *DescribeReservedInstancesOfferingsInput) SetAvailabilityZone(v string) *DescribeReservedInstancesOfferingsInput { - s.AvailabilityZone = &v +// SetFilter sets the Filter field's value. +func (s *DescribeHostsInput) SetFilter(v []*Filter) *DescribeHostsInput { + s.Filter = v return s } -// SetDryRun sets the DryRun field's value. -func (s *DescribeReservedInstancesOfferingsInput) SetDryRun(v bool) *DescribeReservedInstancesOfferingsInput { - s.DryRun = &v +// SetHostIds sets the HostIds field's value. +func (s *DescribeHostsInput) SetHostIds(v []*string) *DescribeHostsInput { + s.HostIds = v return s } -// SetFilters sets the Filters field's value. -func (s *DescribeReservedInstancesOfferingsInput) SetFilters(v []*Filter) *DescribeReservedInstancesOfferingsInput { - s.Filters = v +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeHostsInput) SetMaxResults(v int64) *DescribeHostsInput { + s.MaxResults = &v return s } -// SetIncludeMarketplace sets the IncludeMarketplace field's value. -func (s *DescribeReservedInstancesOfferingsInput) SetIncludeMarketplace(v bool) *DescribeReservedInstancesOfferingsInput { - s.IncludeMarketplace = &v +// SetNextToken sets the NextToken field's value. +func (s *DescribeHostsInput) SetNextToken(v string) *DescribeHostsInput { + s.NextToken = &v return s } -// SetInstanceTenancy sets the InstanceTenancy field's value. -func (s *DescribeReservedInstancesOfferingsInput) SetInstanceTenancy(v string) *DescribeReservedInstancesOfferingsInput { - s.InstanceTenancy = &v - return s -} +type DescribeHostsOutput struct { + _ struct{} `type:"structure"` -// SetInstanceType sets the InstanceType field's value. -func (s *DescribeReservedInstancesOfferingsInput) SetInstanceType(v string) *DescribeReservedInstancesOfferingsInput { - s.InstanceType = &v - return s -} + // Information about the Dedicated Hosts. + Hosts []*Host `locationName:"hostSet" locationNameList:"item" type:"list"` -// SetMaxDuration sets the MaxDuration field's value. -func (s *DescribeReservedInstancesOfferingsInput) SetMaxDuration(v int64) *DescribeReservedInstancesOfferingsInput { - s.MaxDuration = &v - return s + // 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"` } -// SetMaxInstanceCount sets the MaxInstanceCount field's value. -func (s *DescribeReservedInstancesOfferingsInput) SetMaxInstanceCount(v int64) *DescribeReservedInstancesOfferingsInput { - s.MaxInstanceCount = &v - return s +// String returns the string representation +func (s DescribeHostsOutput) String() string { + return awsutil.Prettify(s) } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeReservedInstancesOfferingsInput) SetMaxResults(v int64) *DescribeReservedInstancesOfferingsInput { - s.MaxResults = &v - return s +// GoString returns the string representation +func (s DescribeHostsOutput) GoString() string { + return s.String() } -// SetMinDuration sets the MinDuration field's value. -func (s *DescribeReservedInstancesOfferingsInput) SetMinDuration(v int64) *DescribeReservedInstancesOfferingsInput { - s.MinDuration = &v +// SetHosts sets the Hosts field's value. +func (s *DescribeHostsOutput) SetHosts(v []*Host) *DescribeHostsOutput { + s.Hosts = v return s } // SetNextToken sets the NextToken field's value. -func (s *DescribeReservedInstancesOfferingsInput) SetNextToken(v string) *DescribeReservedInstancesOfferingsInput { +func (s *DescribeHostsOutput) SetNextToken(v string) *DescribeHostsOutput { s.NextToken = &v return s } -// SetOfferingClass sets the OfferingClass field's value. -func (s *DescribeReservedInstancesOfferingsInput) SetOfferingClass(v string) *DescribeReservedInstancesOfferingsInput { - s.OfferingClass = &v +type DescribeIamInstanceProfileAssociationsInput struct { + _ struct{} `type:"structure"` + + // One or more IAM instance profile associations. + AssociationIds []*string `locationName:"AssociationId" locationNameList:"AssociationId" type:"list"` + + // One or more filters. + // + // * instance-id - The ID of the instance. + // + // * state - The state of the association (associating | associated | disassociating + // | disassociated). + 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 call with the returned NextToken value. + MaxResults *int64 `min:"5" type:"integer"` + + // The token to request the next page of results. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeIamInstanceProfileAssociationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeIamInstanceProfileAssociationsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeIamInstanceProfileAssociationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeIamInstanceProfileAssociationsInput"} + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAssociationIds sets the AssociationIds field's value. +func (s *DescribeIamInstanceProfileAssociationsInput) SetAssociationIds(v []*string) *DescribeIamInstanceProfileAssociationsInput { + s.AssociationIds = v return s } -// SetOfferingType sets the OfferingType field's value. -func (s *DescribeReservedInstancesOfferingsInput) SetOfferingType(v string) *DescribeReservedInstancesOfferingsInput { - s.OfferingType = &v +// SetFilters sets the Filters field's value. +func (s *DescribeIamInstanceProfileAssociationsInput) SetFilters(v []*Filter) *DescribeIamInstanceProfileAssociationsInput { + s.Filters = v return s } -// SetProductDescription sets the ProductDescription field's value. -func (s *DescribeReservedInstancesOfferingsInput) SetProductDescription(v string) *DescribeReservedInstancesOfferingsInput { - s.ProductDescription = &v +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeIamInstanceProfileAssociationsInput) SetMaxResults(v int64) *DescribeIamInstanceProfileAssociationsInput { + s.MaxResults = &v return s } -// SetReservedInstancesOfferingIds sets the ReservedInstancesOfferingIds field's value. -func (s *DescribeReservedInstancesOfferingsInput) SetReservedInstancesOfferingIds(v []*string) *DescribeReservedInstancesOfferingsInput { - s.ReservedInstancesOfferingIds = v +// SetNextToken sets the NextToken field's value. +func (s *DescribeIamInstanceProfileAssociationsInput) SetNextToken(v string) *DescribeIamInstanceProfileAssociationsInput { + s.NextToken = &v return s } -// Contains the output of DescribeReservedInstancesOfferings. -type DescribeReservedInstancesOfferingsOutput struct { +type DescribeIamInstanceProfileAssociationsOutput struct { _ struct{} `type:"structure"` + // Information about one or more IAM instance profile associations. + IamInstanceProfileAssociations []*IamInstanceProfileAssociation `locationName:"iamInstanceProfileAssociationSet" 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"` - - // A list of Reserved Instances offerings. - ReservedInstancesOfferings []*ReservedInstancesOffering `locationName:"reservedInstancesOfferingsSet" locationNameList:"item" type:"list"` + NextToken *string `locationName:"nextToken" min:"1" type:"string"` } // String returns the string representation -func (s DescribeReservedInstancesOfferingsOutput) String() string { +func (s DescribeIamInstanceProfileAssociationsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeReservedInstancesOfferingsOutput) GoString() string { +func (s DescribeIamInstanceProfileAssociationsOutput) GoString() string { return s.String() } +// SetIamInstanceProfileAssociations sets the IamInstanceProfileAssociations field's value. +func (s *DescribeIamInstanceProfileAssociationsOutput) SetIamInstanceProfileAssociations(v []*IamInstanceProfileAssociation) *DescribeIamInstanceProfileAssociationsOutput { + s.IamInstanceProfileAssociations = v + return s +} + // SetNextToken sets the NextToken field's value. -func (s *DescribeReservedInstancesOfferingsOutput) SetNextToken(v string) *DescribeReservedInstancesOfferingsOutput { +func (s *DescribeIamInstanceProfileAssociationsOutput) SetNextToken(v string) *DescribeIamInstanceProfileAssociationsOutput { s.NextToken = &v return s } -// SetReservedInstancesOfferings sets the ReservedInstancesOfferings field's value. -func (s *DescribeReservedInstancesOfferingsOutput) SetReservedInstancesOfferings(v []*ReservedInstancesOffering) *DescribeReservedInstancesOfferingsOutput { - s.ReservedInstancesOfferings = v +type DescribeIdFormatInput struct { + _ struct{} `type:"structure"` + + // The type of resource: bundle | conversion-task | customer-gateway | dhcp-options + // | elastic-ip-allocation | elastic-ip-association | export-task | flow-log + // | image | import-task | instance | internet-gateway | network-acl | network-acl-association + // | network-interface | network-interface-attachment | prefix-list | reservation + // | route-table | route-table-association | security-group | snapshot | subnet + // | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association + // | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway + Resource *string `type:"string"` +} + +// String returns the string representation +func (s DescribeIdFormatInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeIdFormatInput) GoString() string { + return s.String() +} + +// SetResource sets the Resource field's value. +func (s *DescribeIdFormatInput) SetResource(v string) *DescribeIdFormatInput { + s.Resource = &v return s } -// Contains the output for DescribeReservedInstances. -type DescribeReservedInstancesOutput struct { +type DescribeIdFormatOutput struct { _ struct{} `type:"structure"` - // A list of Reserved Instances. - ReservedInstances []*ReservedInstances `locationName:"reservedInstancesSet" locationNameList:"item" type:"list"` + // Information about the ID format for the resource. + Statuses []*IdFormat `locationName:"statusSet" locationNameList:"item" type:"list"` } // String returns the string representation -func (s DescribeReservedInstancesOutput) String() string { +func (s DescribeIdFormatOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeReservedInstancesOutput) GoString() string { +func (s DescribeIdFormatOutput) GoString() string { return s.String() } -// SetReservedInstances sets the ReservedInstances field's value. -func (s *DescribeReservedInstancesOutput) SetReservedInstances(v []*ReservedInstances) *DescribeReservedInstancesOutput { - s.ReservedInstances = v +// SetStatuses sets the Statuses field's value. +func (s *DescribeIdFormatOutput) SetStatuses(v []*IdFormat) *DescribeIdFormatOutput { + s.Statuses = v return s } -// Contains the parameters for DescribeRouteTables. -type DescribeRouteTablesInput struct { +type DescribeIdentityIdFormatInput 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 `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * association.route-table-association-id - The ID of an association ID - // for the route table. - // - // * association.route-table-id - The ID of the route table involved in the - // association. - // - // * association.subnet-id - The ID of the subnet involved in the association. - // - // * association.main - Indicates whether the route table is the main route - // table for the VPC (true | false). Route tables that do not have an association - // ID are not returned in the response. - // - // * route-table-id - The ID of the route table. - // - // * route.destination-cidr-block - The IPv4 CIDR range specified in a route - // in the table. - // - // * route.destination-ipv6-cidr-block - The IPv6 CIDR range specified in - // a route in the route table. - // - // * route.destination-prefix-list-id - The ID (prefix) of the AWS service - // specified in a route in the table. - // - // * route.egress-only-internet-gateway-id - The ID of an egress-only Internet - // gateway specified in a route in the route table. - // - // * route.gateway-id - The ID of a gateway specified in a route in the table. - // - // * route.instance-id - The ID of an instance specified in a route in the - // table. - // - // * route.nat-gateway-id - The ID of a NAT gateway. - // - // * route.origin - Describes how the route was created. CreateRouteTable - // indicates that the route was automatically created when the route table - // was created; CreateRoute indicates that the route was manually added to - // the route table; EnableVgwRoutePropagation indicates that the route was - // propagated by route propagation. - // - // * route.state - The state of a route in the route table (active | blackhole). - // The blackhole state indicates that the route's target isn't available - // (for example, the specified gateway isn't attached to the VPC, the specified - // NAT instance has been terminated, and so on). - // - // * route.vpc-peering-connection-id - The ID of a VPC peering connection - // specified in a route in the table. - // - // * 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. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. + // The ARN of the principal, which can be an IAM role, IAM user, or the root + // user. // - // * vpc-id - The ID of the VPC for the route table. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + // PrincipalArn is a required field + PrincipalArn *string `locationName:"principalArn" type:"string" required:"true"` - // One or more route table IDs. - // - // Default: Describes all your route tables. - RouteTableIds []*string `locationName:"RouteTableId" locationNameList:"item" type:"list"` + // The type of resource: bundle | conversion-task | customer-gateway | dhcp-options + // | elastic-ip-allocation | elastic-ip-association | export-task | flow-log + // | image | import-task | instance | internet-gateway | network-acl | network-acl-association + // | network-interface | network-interface-attachment | prefix-list | reservation + // | route-table | route-table-association | security-group | snapshot | subnet + // | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association + // | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway + Resource *string `locationName:"resource" type:"string"` } // String returns the string representation -func (s DescribeRouteTablesInput) String() string { +func (s DescribeIdentityIdFormatInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeRouteTablesInput) GoString() string { +func (s DescribeIdentityIdFormatInput) GoString() string { return s.String() } -// SetDryRun sets the DryRun field's value. -func (s *DescribeRouteTablesInput) SetDryRun(v bool) *DescribeRouteTablesInput { - s.DryRun = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeIdentityIdFormatInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeIdentityIdFormatInput"} + if s.PrincipalArn == nil { + invalidParams.Add(request.NewErrParamRequired("PrincipalArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetFilters sets the Filters field's value. -func (s *DescribeRouteTablesInput) SetFilters(v []*Filter) *DescribeRouteTablesInput { - s.Filters = v +// SetPrincipalArn sets the PrincipalArn field's value. +func (s *DescribeIdentityIdFormatInput) SetPrincipalArn(v string) *DescribeIdentityIdFormatInput { + s.PrincipalArn = &v return s } -// SetRouteTableIds sets the RouteTableIds field's value. -func (s *DescribeRouteTablesInput) SetRouteTableIds(v []*string) *DescribeRouteTablesInput { - s.RouteTableIds = v +// SetResource sets the Resource field's value. +func (s *DescribeIdentityIdFormatInput) SetResource(v string) *DescribeIdentityIdFormatInput { + s.Resource = &v return s } -// Contains the output of DescribeRouteTables. -type DescribeRouteTablesOutput struct { +type DescribeIdentityIdFormatOutput struct { _ struct{} `type:"structure"` - // Information about one or more route tables. - RouteTables []*RouteTable `locationName:"routeTableSet" locationNameList:"item" type:"list"` + // Information about the ID format for the resources. + Statuses []*IdFormat `locationName:"statusSet" locationNameList:"item" type:"list"` } // String returns the string representation -func (s DescribeRouteTablesOutput) String() string { +func (s DescribeIdentityIdFormatOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeRouteTablesOutput) GoString() string { +func (s DescribeIdentityIdFormatOutput) GoString() string { return s.String() } -// SetRouteTables sets the RouteTables field's value. -func (s *DescribeRouteTablesOutput) SetRouteTables(v []*RouteTable) *DescribeRouteTablesOutput { - s.RouteTables = v +// SetStatuses sets the Statuses field's value. +func (s *DescribeIdentityIdFormatOutput) SetStatuses(v []*IdFormat) *DescribeIdentityIdFormatOutput { + s.Statuses = v return s } -// Contains the parameters for DescribeScheduledInstanceAvailability. -type DescribeScheduledInstanceAvailabilityInput struct { +// Contains the parameters for DescribeImageAttribute. +type DescribeImageAttributeInput struct { _ struct{} `type:"structure"` + // 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. + // + // Attribute is a required field + Attribute *string `type:"string" required:"true" enum:"ImageAttributeName"` + // 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. - // - // * availability-zone - The Availability Zone (for example, us-west-2a). - // - // * instance-type - The instance type (for example, c4.large). - // - // * network-platform - The network platform (EC2-Classic or EC2-VPC). - // - // * platform - The platform (Linux/UNIX or Windows). - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The time period for the first schedule to start. - // - // FirstSlotStartTimeRange is a required field - FirstSlotStartTimeRange *SlotDateTimeRangeRequest `type:"structure" required:"true"` - - // The maximum number of results to return in a single call. This value can - // be between 5 and 300. The default value is 300. To retrieve the remaining - // results, make another call with the returned NextToken value. - MaxResults *int64 `type:"integer"` - - // The maximum available duration, in hours. This value must be greater than - // MinSlotDurationInHours and less than 1,720. - MaxSlotDurationInHours *int64 `type:"integer"` - - // The minimum available duration, in hours. The minimum required duration is - // 1,200 hours per year. For example, the minimum daily schedule is 4 hours, - // the minimum weekly schedule is 24 hours, and the minimum monthly schedule - // is 100 hours. - MinSlotDurationInHours *int64 `type:"integer"` - - // The token for the next set of results. - NextToken *string `type:"string"` + DryRun *bool `locationName:"dryRun" type:"boolean"` - // The schedule recurrence. + // The ID of the AMI. // - // Recurrence is a required field - Recurrence *ScheduledInstanceRecurrenceRequest `type:"structure" required:"true"` + // ImageId is a required field + ImageId *string `type:"string" required:"true"` } // String returns the string representation -func (s DescribeScheduledInstanceAvailabilityInput) String() string { +func (s DescribeImageAttributeInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeScheduledInstanceAvailabilityInput) GoString() string { +func (s DescribeImageAttributeInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeScheduledInstanceAvailabilityInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeScheduledInstanceAvailabilityInput"} - if s.FirstSlotStartTimeRange == nil { - invalidParams.Add(request.NewErrParamRequired("FirstSlotStartTimeRange")) +func (s *DescribeImageAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeImageAttributeInput"} + if s.Attribute == nil { + invalidParams.Add(request.NewErrParamRequired("Attribute")) } - if s.Recurrence == nil { - invalidParams.Add(request.NewErrParamRequired("Recurrence")) - } - if s.FirstSlotStartTimeRange != nil { - if err := s.FirstSlotStartTimeRange.Validate(); err != nil { - invalidParams.AddNested("FirstSlotStartTimeRange", err.(request.ErrInvalidParams)) - } + if s.ImageId == nil { + invalidParams.Add(request.NewErrParamRequired("ImageId")) } if invalidParams.Len() > 0 { @@ -40061,478 +45390,489 @@ func (s *DescribeScheduledInstanceAvailabilityInput) Validate() error { return nil } +// SetAttribute sets the Attribute field's value. +func (s *DescribeImageAttributeInput) SetAttribute(v string) *DescribeImageAttributeInput { + s.Attribute = &v + return s +} + // SetDryRun sets the DryRun field's value. -func (s *DescribeScheduledInstanceAvailabilityInput) SetDryRun(v bool) *DescribeScheduledInstanceAvailabilityInput { +func (s *DescribeImageAttributeInput) SetDryRun(v bool) *DescribeImageAttributeInput { s.DryRun = &v return s } -// SetFilters sets the Filters field's value. -func (s *DescribeScheduledInstanceAvailabilityInput) SetFilters(v []*Filter) *DescribeScheduledInstanceAvailabilityInput { - s.Filters = v +// SetImageId sets the ImageId field's value. +func (s *DescribeImageAttributeInput) SetImageId(v string) *DescribeImageAttributeInput { + s.ImageId = &v return s } -// SetFirstSlotStartTimeRange sets the FirstSlotStartTimeRange field's value. -func (s *DescribeScheduledInstanceAvailabilityInput) SetFirstSlotStartTimeRange(v *SlotDateTimeRangeRequest) *DescribeScheduledInstanceAvailabilityInput { - s.FirstSlotStartTimeRange = v - return s +// Describes an image attribute. +type DescribeImageAttributeOutput struct { + _ struct{} `type:"structure"` + + // One or more block device mapping entries. + BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` + + // A description for the AMI. + Description *AttributeValue `locationName:"description" type:"structure"` + + // The ID of the AMI. + ImageId *string `locationName:"imageId" type:"string"` + + // The kernel ID. + KernelId *AttributeValue `locationName:"kernel" type:"structure"` + + // One or more launch permissions. + LaunchPermissions []*LaunchPermission `locationName:"launchPermission" locationNameList:"item" type:"list"` + + // One or more product codes. + ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` + + // The RAM disk ID. + RamdiskId *AttributeValue `locationName:"ramdisk" type:"structure"` + + // Indicates whether enhanced networking with the Intel 82599 Virtual Function + // interface is enabled. + SriovNetSupport *AttributeValue `locationName:"sriovNetSupport" type:"structure"` } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeScheduledInstanceAvailabilityInput) SetMaxResults(v int64) *DescribeScheduledInstanceAvailabilityInput { - s.MaxResults = &v - return s +// String returns the string representation +func (s DescribeImageAttributeOutput) String() string { + return awsutil.Prettify(s) } -// SetMaxSlotDurationInHours sets the MaxSlotDurationInHours field's value. -func (s *DescribeScheduledInstanceAvailabilityInput) SetMaxSlotDurationInHours(v int64) *DescribeScheduledInstanceAvailabilityInput { - s.MaxSlotDurationInHours = &v - return s +// GoString returns the string representation +func (s DescribeImageAttributeOutput) GoString() string { + return s.String() } -// SetMinSlotDurationInHours sets the MinSlotDurationInHours field's value. -func (s *DescribeScheduledInstanceAvailabilityInput) SetMinSlotDurationInHours(v int64) *DescribeScheduledInstanceAvailabilityInput { - s.MinSlotDurationInHours = &v +// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. +func (s *DescribeImageAttributeOutput) SetBlockDeviceMappings(v []*BlockDeviceMapping) *DescribeImageAttributeOutput { + s.BlockDeviceMappings = v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeScheduledInstanceAvailabilityInput) SetNextToken(v string) *DescribeScheduledInstanceAvailabilityInput { - s.NextToken = &v +// SetDescription sets the Description field's value. +func (s *DescribeImageAttributeOutput) SetDescription(v *AttributeValue) *DescribeImageAttributeOutput { + s.Description = v return s } -// SetRecurrence sets the Recurrence field's value. -func (s *DescribeScheduledInstanceAvailabilityInput) SetRecurrence(v *ScheduledInstanceRecurrenceRequest) *DescribeScheduledInstanceAvailabilityInput { - s.Recurrence = v +// SetImageId sets the ImageId field's value. +func (s *DescribeImageAttributeOutput) SetImageId(v string) *DescribeImageAttributeOutput { + s.ImageId = &v return s } -// Contains the output of DescribeScheduledInstanceAvailability. -type DescribeScheduledInstanceAvailabilityOutput struct { - _ struct{} `type:"structure"` - - // The token required to retrieve the next set of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // Information about the available Scheduled Instances. - ScheduledInstanceAvailabilitySet []*ScheduledInstanceAvailability `locationName:"scheduledInstanceAvailabilitySet" locationNameList:"item" type:"list"` +// SetKernelId sets the KernelId field's value. +func (s *DescribeImageAttributeOutput) SetKernelId(v *AttributeValue) *DescribeImageAttributeOutput { + s.KernelId = v + return s } -// String returns the string representation -func (s DescribeScheduledInstanceAvailabilityOutput) String() string { - return awsutil.Prettify(s) +// SetLaunchPermissions sets the LaunchPermissions field's value. +func (s *DescribeImageAttributeOutput) SetLaunchPermissions(v []*LaunchPermission) *DescribeImageAttributeOutput { + s.LaunchPermissions = v + return s } -// GoString returns the string representation -func (s DescribeScheduledInstanceAvailabilityOutput) GoString() string { - return s.String() +// SetProductCodes sets the ProductCodes field's value. +func (s *DescribeImageAttributeOutput) SetProductCodes(v []*ProductCode) *DescribeImageAttributeOutput { + s.ProductCodes = v + return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeScheduledInstanceAvailabilityOutput) SetNextToken(v string) *DescribeScheduledInstanceAvailabilityOutput { - s.NextToken = &v +// SetRamdiskId sets the RamdiskId field's value. +func (s *DescribeImageAttributeOutput) SetRamdiskId(v *AttributeValue) *DescribeImageAttributeOutput { + s.RamdiskId = v return s } -// SetScheduledInstanceAvailabilitySet sets the ScheduledInstanceAvailabilitySet field's value. -func (s *DescribeScheduledInstanceAvailabilityOutput) SetScheduledInstanceAvailabilitySet(v []*ScheduledInstanceAvailability) *DescribeScheduledInstanceAvailabilityOutput { - s.ScheduledInstanceAvailabilitySet = v +// SetSriovNetSupport sets the SriovNetSupport field's value. +func (s *DescribeImageAttributeOutput) SetSriovNetSupport(v *AttributeValue) *DescribeImageAttributeOutput { + s.SriovNetSupport = v return s } -// Contains the parameters for DescribeScheduledInstances. -type DescribeScheduledInstancesInput struct { +// Contains the parameters for DescribeImages. +type DescribeImagesInput 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"` + DryRun *bool `locationName:"dryRun" type:"boolean"` + + // Scopes the images by users with explicit launch permissions. Specify an AWS + // account ID, self (the sender of the request), or all (public AMIs). + ExecutableUsers []*string `locationName:"ExecutableBy" locationNameList:"ExecutableBy" type:"list"` // One or more filters. // - // * availability-zone - The Availability Zone (for example, us-west-2a). + // * architecture - The image architecture (i386 | x86_64). // - // * instance-type - The instance type (for example, c4.large). + // * block-device-mapping.delete-on-termination - A Boolean value that indicates + // whether the Amazon EBS volume is deleted on instance termination. // - // * network-platform - The network platform (EC2-Classic or EC2-VPC). + // * block-device-mapping.device-name - The device name specified in the + // block device mapping (for example, /dev/sdh or xvdh). // - // * platform - The platform (Linux/UNIX or Windows). + // * block-device-mapping.snapshot-id - The ID of the snapshot used for the + // EBS volume. + // + // * block-device-mapping.volume-size - The volume size of the EBS volume, + // in GiB. + // + // * block-device-mapping.volume-type - The volume type of the EBS volume + // (gp2 | io1 | st1 | sc1 | standard). + // + // * description - The description of the image (provided during image creation). + // + // * ena-support - A Boolean that indicates whether enhanced networking with + // ENA is enabled. + // + // * hypervisor - The hypervisor type (ovm | xen). + // + // * image-id - The ID of the image. + // + // * image-type - The image type (machine | kernel | ramdisk). + // + // * is-public - A Boolean that indicates whether the image is public. + // + // * kernel-id - The kernel ID. + // + // * manifest-location - The location of the image manifest. + // + // * name - The name of the AMI (provided during image creation). + // + // * owner-alias - String value from an Amazon-maintained list (amazon | + // aws-marketplace | microsoft) of snapshot owners. Not to be confused with + // the user-configured AWS account alias, which is set from the IAM console. + // + // * owner-id - The AWS account ID of the image owner. + // + // * platform - The platform. To only list Windows-based AMIs, use windows. + // + // * product-code - The product code. + // + // * product-code.type - The type of the product code (devpay | marketplace). + // + // * ramdisk-id - The RAM disk ID. + // + // * root-device-name - The device name of the root device volume (for example, + // /dev/sda1). + // + // * root-device-type - The type of the root device volume (ebs | instance-store). + // + // * state - The state of the image (available | pending | failed). + // + // * state-reason-code - The reason code for the state change. + // + // * state-reason-message - The message for the state change. + // + // * sriov-net-support - A value of simple indicates that enhanced networking + // with the Intel 82599 VF interface is enabled. + // + // * 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. + // + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. + // + // * virtualization-type - The virtualization type (paravirtual | hvm). Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - // The maximum number of results to return in a single call. This value can - // be between 5 and 300. The default value is 100. To retrieve the remaining - // results, make another call with the returned NextToken value. - MaxResults *int64 `type:"integer"` - - // The token for the next set of results. - NextToken *string `type:"string"` - - // One or more Scheduled Instance IDs. - ScheduledInstanceIds []*string `locationName:"ScheduledInstanceId" locationNameList:"ScheduledInstanceId" type:"list"` + // One or more image IDs. + // + // Default: Describes all images available to you. + ImageIds []*string `locationName:"ImageId" locationNameList:"ImageId" type:"list"` - // The time period for the first schedule to start. - SlotStartTimeRange *SlotStartTimeRangeRequest `type:"structure"` + // Filters the images by the owner. Specify an AWS account ID, self (owner is + // the sender of the request), or an AWS owner alias (valid values are amazon + // | aws-marketplace | microsoft). Omitting this option returns all images for + // which you have launch permissions, regardless of ownership. + Owners []*string `locationName:"Owner" locationNameList:"Owner" type:"list"` } // String returns the string representation -func (s DescribeScheduledInstancesInput) String() string { +func (s DescribeImagesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeScheduledInstancesInput) GoString() string { +func (s DescribeImagesInput) GoString() string { return s.String() } // SetDryRun sets the DryRun field's value. -func (s *DescribeScheduledInstancesInput) SetDryRun(v bool) *DescribeScheduledInstancesInput { +func (s *DescribeImagesInput) SetDryRun(v bool) *DescribeImagesInput { s.DryRun = &v return s } -// SetFilters sets the Filters field's value. -func (s *DescribeScheduledInstancesInput) SetFilters(v []*Filter) *DescribeScheduledInstancesInput { - s.Filters = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeScheduledInstancesInput) SetMaxResults(v int64) *DescribeScheduledInstancesInput { - s.MaxResults = &v +// SetExecutableUsers sets the ExecutableUsers field's value. +func (s *DescribeImagesInput) SetExecutableUsers(v []*string) *DescribeImagesInput { + s.ExecutableUsers = v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeScheduledInstancesInput) SetNextToken(v string) *DescribeScheduledInstancesInput { - s.NextToken = &v +// SetFilters sets the Filters field's value. +func (s *DescribeImagesInput) SetFilters(v []*Filter) *DescribeImagesInput { + s.Filters = v return s } -// SetScheduledInstanceIds sets the ScheduledInstanceIds field's value. -func (s *DescribeScheduledInstancesInput) SetScheduledInstanceIds(v []*string) *DescribeScheduledInstancesInput { - s.ScheduledInstanceIds = v +// SetImageIds sets the ImageIds field's value. +func (s *DescribeImagesInput) SetImageIds(v []*string) *DescribeImagesInput { + s.ImageIds = v return s } -// SetSlotStartTimeRange sets the SlotStartTimeRange field's value. -func (s *DescribeScheduledInstancesInput) SetSlotStartTimeRange(v *SlotStartTimeRangeRequest) *DescribeScheduledInstancesInput { - s.SlotStartTimeRange = v +// SetOwners sets the Owners field's value. +func (s *DescribeImagesInput) SetOwners(v []*string) *DescribeImagesInput { + s.Owners = v return s } -// Contains the output of DescribeScheduledInstances. -type DescribeScheduledInstancesOutput struct { +// Contains the output of DescribeImages. +type DescribeImagesOutput struct { _ struct{} `type:"structure"` - // The token required to retrieve the next set of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // Information about the Scheduled Instances. - ScheduledInstanceSet []*ScheduledInstance `locationName:"scheduledInstanceSet" locationNameList:"item" type:"list"` + // Information about one or more images. + Images []*Image `locationName:"imagesSet" locationNameList:"item" type:"list"` } // String returns the string representation -func (s DescribeScheduledInstancesOutput) String() string { +func (s DescribeImagesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeScheduledInstancesOutput) GoString() string { +func (s DescribeImagesOutput) GoString() string { return s.String() } -// SetNextToken sets the NextToken field's value. -func (s *DescribeScheduledInstancesOutput) SetNextToken(v string) *DescribeScheduledInstancesOutput { - s.NextToken = &v - return s -} - -// SetScheduledInstanceSet sets the ScheduledInstanceSet field's value. -func (s *DescribeScheduledInstancesOutput) SetScheduledInstanceSet(v []*ScheduledInstance) *DescribeScheduledInstancesOutput { - s.ScheduledInstanceSet = v +// SetImages sets the Images field's value. +func (s *DescribeImagesOutput) SetImages(v []*Image) *DescribeImagesOutput { + s.Images = v return s } -type DescribeSecurityGroupReferencesInput struct { +// Contains the parameters for DescribeImportImageTasks. +type DescribeImportImageTasksInput struct { _ struct{} `type:"structure"` - // Checks whether you have the required permissions for the operation, without + // 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 security group IDs in your account. - // - // GroupId is a required field - GroupId []*string `locationNameList:"item" type:"list" required:"true"` + // Filter tasks using the task-state filter and one of the following values: + // active, completed, deleting, deleted. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // A list of import image task IDs. + ImportTaskIds []*string `locationName:"ImportTaskId" locationNameList:"ImportTaskId" 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. + MaxResults *int64 `type:"integer"` + + // A token that indicates the next page of results. + NextToken *string `type:"string"` } // String returns the string representation -func (s DescribeSecurityGroupReferencesInput) String() string { +func (s DescribeImportImageTasksInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeSecurityGroupReferencesInput) GoString() string { +func (s DescribeImportImageTasksInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeSecurityGroupReferencesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeSecurityGroupReferencesInput"} - if s.GroupId == nil { - invalidParams.Add(request.NewErrParamRequired("GroupId")) - } +// SetDryRun sets the DryRun field's value. +func (s *DescribeImportImageTasksInput) SetDryRun(v bool) *DescribeImportImageTasksInput { + s.DryRun = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetFilters sets the Filters field's value. +func (s *DescribeImportImageTasksInput) SetFilters(v []*Filter) *DescribeImportImageTasksInput { + s.Filters = v + return s } -// SetDryRun sets the DryRun field's value. -func (s *DescribeSecurityGroupReferencesInput) SetDryRun(v bool) *DescribeSecurityGroupReferencesInput { - s.DryRun = &v +// SetImportTaskIds sets the ImportTaskIds field's value. +func (s *DescribeImportImageTasksInput) SetImportTaskIds(v []*string) *DescribeImportImageTasksInput { + s.ImportTaskIds = v return s } -// SetGroupId sets the GroupId field's value. -func (s *DescribeSecurityGroupReferencesInput) SetGroupId(v []*string) *DescribeSecurityGroupReferencesInput { - s.GroupId = v +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeImportImageTasksInput) SetMaxResults(v int64) *DescribeImportImageTasksInput { + s.MaxResults = &v return s } -type DescribeSecurityGroupReferencesOutput struct { +// SetNextToken sets the NextToken field's value. +func (s *DescribeImportImageTasksInput) SetNextToken(v string) *DescribeImportImageTasksInput { + s.NextToken = &v + return s +} + +// Contains the output for DescribeImportImageTasks. +type DescribeImportImageTasksOutput struct { _ struct{} `type:"structure"` - // Information about the VPCs with the referencing security groups. - SecurityGroupReferenceSet []*SecurityGroupReference `locationName:"securityGroupReferenceSet" locationNameList:"item" type:"list"` + // A list of zero or more import image tasks that are currently active or were + // completed or canceled in the previous 7 days. + ImportImageTasks []*ImportImageTask `locationName:"importImageTaskSet" locationNameList:"item" type:"list"` + + // The token to use to get 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 DescribeSecurityGroupReferencesOutput) String() string { +func (s DescribeImportImageTasksOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeSecurityGroupReferencesOutput) GoString() string { +func (s DescribeImportImageTasksOutput) GoString() string { return s.String() } -// SetSecurityGroupReferenceSet sets the SecurityGroupReferenceSet field's value. -func (s *DescribeSecurityGroupReferencesOutput) SetSecurityGroupReferenceSet(v []*SecurityGroupReference) *DescribeSecurityGroupReferencesOutput { - s.SecurityGroupReferenceSet = v +// SetImportImageTasks sets the ImportImageTasks field's value. +func (s *DescribeImportImageTasksOutput) SetImportImageTasks(v []*ImportImageTask) *DescribeImportImageTasksOutput { + s.ImportImageTasks = v return s } -// Contains the parameters for DescribeSecurityGroups. -type DescribeSecurityGroupsInput struct { +// SetNextToken sets the NextToken field's value. +func (s *DescribeImportImageTasksOutput) SetNextToken(v string) *DescribeImportImageTasksOutput { + s.NextToken = &v + return s +} + +// Contains the parameters for DescribeImportSnapshotTasks. +type DescribeImportSnapshotTasksInput 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 `locationName:"dryRun" type:"boolean"` - - // One or more filters. If using multiple filters for rules, the results include - // security groups for which any combination of rules - not necessarily a single - // rule - match all filters. - // - // * description - The description of the security group. - // - // * egress.ip-permission.cidr - An IPv4 CIDR block for an outbound security - // group rule. - // - // * egress.ip-permission.from-port - For an outbound rule, the start of - // port range for the TCP and UDP protocols, or an ICMP type number. - // - // * egress.ip-permission.group-id - The ID of a security group that has - // 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. - // - // * egress.ip-permission.ipv6-cidr - An IPv6 CIDR block for an outbound - // security group rule. - // - // * egress.ip-permission.prefix-list-id - The ID (prefix) of the AWS service - // to which 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). - // - // * 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. - // - // * group-id - The ID of the security group. - // - // * group-name - The name of the security group. - // - // * ip-permission.cidr - An IPv4 CIDR block for an inbound security group - // rule. - // - // * ip-permission.from-port - For an inbound rule, the start of port range - // for the TCP and UDP protocols, or an ICMP type number. - // - // * 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.ipv6-cidr - An IPv6 CIDR block for an inbound security - // group rule. - // - // * ip-permission.prefix-list-id - The ID (prefix) of the AWS service from - // which a 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). - // - // * 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. - // - // * owner-id - The AWS 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. - // 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. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - // - // * vpc-id - The ID of the VPC specified when the security group was created. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + DryRun *bool `type:"boolean"` - // One or more security group IDs. Required for security groups in a nondefault - // VPC. - // - // Default: Describes all your security groups. - GroupIds []*string `locationName:"GroupId" locationNameList:"groupId" type:"list"` + // One or more filters. + Filters []*Filter `locationNameList:"Filter" type:"list"` - // [EC2-Classic and default VPC only] One or more security group names. You - // can specify either the security group name or the security group ID. For - // security groups in a nondefault VPC, use the group-name filter to describe - // security groups by name. - // - // Default: Describes all your security groups. - GroupNames []*string `locationName:"GroupName" locationNameList:"GroupName" type:"list"` + // A list of import snapshot task IDs. + ImportTaskIds []*string `locationName:"ImportTaskId" locationNameList:"ImportTaskId" 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. + // remaining results, make another call with the returned NextToken value. MaxResults *int64 `type:"integer"` - // The token to request the next page of results. + // A token that indicates the next page of results. NextToken *string `type:"string"` } // String returns the string representation -func (s DescribeSecurityGroupsInput) String() string { +func (s DescribeImportSnapshotTasksInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeSecurityGroupsInput) GoString() string { +func (s DescribeImportSnapshotTasksInput) GoString() string { return s.String() } // SetDryRun sets the DryRun field's value. -func (s *DescribeSecurityGroupsInput) SetDryRun(v bool) *DescribeSecurityGroupsInput { +func (s *DescribeImportSnapshotTasksInput) SetDryRun(v bool) *DescribeImportSnapshotTasksInput { s.DryRun = &v return s } // SetFilters sets the Filters field's value. -func (s *DescribeSecurityGroupsInput) SetFilters(v []*Filter) *DescribeSecurityGroupsInput { +func (s *DescribeImportSnapshotTasksInput) SetFilters(v []*Filter) *DescribeImportSnapshotTasksInput { s.Filters = v return s } -// SetGroupIds sets the GroupIds field's value. -func (s *DescribeSecurityGroupsInput) SetGroupIds(v []*string) *DescribeSecurityGroupsInput { - s.GroupIds = v +// SetImportTaskIds sets the ImportTaskIds field's value. +func (s *DescribeImportSnapshotTasksInput) SetImportTaskIds(v []*string) *DescribeImportSnapshotTasksInput { + s.ImportTaskIds = v return s } -// SetGroupNames sets the GroupNames field's value. -func (s *DescribeSecurityGroupsInput) SetGroupNames(v []*string) *DescribeSecurityGroupsInput { - s.GroupNames = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeSecurityGroupsInput) SetMaxResults(v int64) *DescribeSecurityGroupsInput { - s.MaxResults = &v +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeImportSnapshotTasksInput) SetMaxResults(v int64) *DescribeImportSnapshotTasksInput { + s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. -func (s *DescribeSecurityGroupsInput) SetNextToken(v string) *DescribeSecurityGroupsInput { +func (s *DescribeImportSnapshotTasksInput) SetNextToken(v string) *DescribeImportSnapshotTasksInput { s.NextToken = &v return s } -// Contains the output of DescribeSecurityGroups. -type DescribeSecurityGroupsOutput struct { +// Contains the output for DescribeImportSnapshotTasks. +type DescribeImportSnapshotTasksOutput 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"` + // A list of zero or more import snapshot tasks that are currently active or + // were completed or canceled in the previous 7 days. + ImportSnapshotTasks []*ImportSnapshotTask `locationName:"importSnapshotTaskSet" locationNameList:"item" type:"list"` - // Information about one or more security groups. - SecurityGroups []*SecurityGroup `locationName:"securityGroupInfo" locationNameList:"item" type:"list"` + // The token to use to get 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 DescribeSecurityGroupsOutput) String() string { +func (s DescribeImportSnapshotTasksOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeSecurityGroupsOutput) GoString() string { +func (s DescribeImportSnapshotTasksOutput) GoString() string { return s.String() } -// SetNextToken sets the NextToken field's value. -func (s *DescribeSecurityGroupsOutput) SetNextToken(v string) *DescribeSecurityGroupsOutput { - s.NextToken = &v +// SetImportSnapshotTasks sets the ImportSnapshotTasks field's value. +func (s *DescribeImportSnapshotTasksOutput) SetImportSnapshotTasks(v []*ImportSnapshotTask) *DescribeImportSnapshotTasksOutput { + s.ImportSnapshotTasks = v return s } -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *DescribeSecurityGroupsOutput) SetSecurityGroups(v []*SecurityGroup) *DescribeSecurityGroupsOutput { - s.SecurityGroups = v +// SetNextToken sets the NextToken field's value. +func (s *DescribeImportSnapshotTasksOutput) SetNextToken(v string) *DescribeImportSnapshotTasksOutput { + s.NextToken = &v return s } -// Contains the parameters for DescribeSnapshotAttribute. -type DescribeSnapshotAttributeInput struct { +type DescribeInstanceAttributeInput struct { _ struct{} `type:"structure"` - // The snapshot attribute you would like to view. + // The instance attribute. + // + // Note: The enaSupport attribute is not supported at this time. // // Attribute is a required field - Attribute *string `type:"string" required:"true" enum:"SnapshotAttributeName"` + Attribute *string `locationName:"attribute" type:"string" required:"true" enum:"InstanceAttributeName"` // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have @@ -40540,30 +45880,30 @@ type DescribeSnapshotAttributeInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // The ID of the EBS snapshot. + // The ID of the instance. // - // SnapshotId is a required field - SnapshotId *string `type:"string" required:"true"` + // InstanceId is a required field + InstanceId *string `locationName:"instanceId" type:"string" required:"true"` } // String returns the string representation -func (s DescribeSnapshotAttributeInput) String() string { +func (s DescribeInstanceAttributeInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeSnapshotAttributeInput) GoString() string { +func (s DescribeInstanceAttributeInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeSnapshotAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeSnapshotAttributeInput"} +func (s *DescribeInstanceAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeInstanceAttributeInput"} if s.Attribute == nil { invalidParams.Add(request.NewErrParamRequired("Attribute")) } - if s.SnapshotId == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotId")) + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) } if invalidParams.Len() > 0 { @@ -40573,230 +45913,283 @@ func (s *DescribeSnapshotAttributeInput) Validate() error { } // SetAttribute sets the Attribute field's value. -func (s *DescribeSnapshotAttributeInput) SetAttribute(v string) *DescribeSnapshotAttributeInput { +func (s *DescribeInstanceAttributeInput) SetAttribute(v string) *DescribeInstanceAttributeInput { s.Attribute = &v return s } // SetDryRun sets the DryRun field's value. -func (s *DescribeSnapshotAttributeInput) SetDryRun(v bool) *DescribeSnapshotAttributeInput { +func (s *DescribeInstanceAttributeInput) SetDryRun(v bool) *DescribeInstanceAttributeInput { s.DryRun = &v return s } -// SetSnapshotId sets the SnapshotId field's value. -func (s *DescribeSnapshotAttributeInput) SetSnapshotId(v string) *DescribeSnapshotAttributeInput { - s.SnapshotId = &v +// SetInstanceId sets the InstanceId field's value. +func (s *DescribeInstanceAttributeInput) SetInstanceId(v string) *DescribeInstanceAttributeInput { + s.InstanceId = &v return s } -// Contains the output of DescribeSnapshotAttribute. -type DescribeSnapshotAttributeOutput struct { +// Describes an instance attribute. +type DescribeInstanceAttributeOutput struct { _ struct{} `type:"structure"` - // A list of permissions for creating volumes from the snapshot. - CreateVolumePermissions []*CreateVolumePermission `locationName:"createVolumePermission" locationNameList:"item" type:"list"` + // The block device mapping of the instance. + BlockDeviceMappings []*InstanceBlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` + + // If the value is true, you can't terminate the instance through the Amazon + // EC2 console, CLI, or API; otherwise, you can. + DisableApiTermination *AttributeBooleanValue `locationName:"disableApiTermination" type:"structure"` + + // Indicates whether the instance is optimized for Amazon EBS I/O. + EbsOptimized *AttributeBooleanValue `locationName:"ebsOptimized" type:"structure"` + + // Indicates whether enhanced networking with ENA is enabled. + EnaSupport *AttributeBooleanValue `locationName:"enaSupport" type:"structure"` + + // The security groups associated with the instance. + Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` + + // The ID of the instance. + InstanceId *string `locationName:"instanceId" type:"string"` + + // Indicates whether an instance stops or terminates when you initiate shutdown + // from the instance (using the operating system command for system shutdown). + InstanceInitiatedShutdownBehavior *AttributeValue `locationName:"instanceInitiatedShutdownBehavior" type:"structure"` + + // The instance type. + InstanceType *AttributeValue `locationName:"instanceType" type:"structure"` + + // The kernel ID. + KernelId *AttributeValue `locationName:"kernel" type:"structure"` // A list of product codes. ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` - // The ID of the EBS snapshot. - SnapshotId *string `locationName:"snapshotId" type:"string"` + // The RAM disk ID. + RamdiskId *AttributeValue `locationName:"ramdisk" type:"structure"` + + // 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. + SourceDestCheck *AttributeBooleanValue `locationName:"sourceDestCheck" type:"structure"` + + // Indicates whether enhanced networking with the Intel 82599 Virtual Function + // interface is enabled. + SriovNetSupport *AttributeValue `locationName:"sriovNetSupport" type:"structure"` + + // The user data. + UserData *AttributeValue `locationName:"userData" type:"structure"` } // String returns the string representation -func (s DescribeSnapshotAttributeOutput) String() string { +func (s DescribeInstanceAttributeOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeSnapshotAttributeOutput) GoString() string { +func (s DescribeInstanceAttributeOutput) GoString() string { return s.String() } -// SetCreateVolumePermissions sets the CreateVolumePermissions field's value. -func (s *DescribeSnapshotAttributeOutput) SetCreateVolumePermissions(v []*CreateVolumePermission) *DescribeSnapshotAttributeOutput { - s.CreateVolumePermissions = v +// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. +func (s *DescribeInstanceAttributeOutput) SetBlockDeviceMappings(v []*InstanceBlockDeviceMapping) *DescribeInstanceAttributeOutput { + s.BlockDeviceMappings = v + return s +} + +// SetDisableApiTermination sets the DisableApiTermination field's value. +func (s *DescribeInstanceAttributeOutput) SetDisableApiTermination(v *AttributeBooleanValue) *DescribeInstanceAttributeOutput { + s.DisableApiTermination = v + return s +} + +// SetEbsOptimized sets the EbsOptimized field's value. +func (s *DescribeInstanceAttributeOutput) SetEbsOptimized(v *AttributeBooleanValue) *DescribeInstanceAttributeOutput { + s.EbsOptimized = v + return s +} + +// SetEnaSupport sets the EnaSupport field's value. +func (s *DescribeInstanceAttributeOutput) SetEnaSupport(v *AttributeBooleanValue) *DescribeInstanceAttributeOutput { + s.EnaSupport = v + return s +} + +// SetGroups sets the Groups field's value. +func (s *DescribeInstanceAttributeOutput) SetGroups(v []*GroupIdentifier) *DescribeInstanceAttributeOutput { + s.Groups = v + return s +} + +// SetInstanceId sets the InstanceId field's value. +func (s *DescribeInstanceAttributeOutput) SetInstanceId(v string) *DescribeInstanceAttributeOutput { + s.InstanceId = &v + return s +} + +// SetInstanceInitiatedShutdownBehavior sets the InstanceInitiatedShutdownBehavior field's value. +func (s *DescribeInstanceAttributeOutput) SetInstanceInitiatedShutdownBehavior(v *AttributeValue) *DescribeInstanceAttributeOutput { + s.InstanceInitiatedShutdownBehavior = v + return s +} + +// SetInstanceType sets the InstanceType field's value. +func (s *DescribeInstanceAttributeOutput) SetInstanceType(v *AttributeValue) *DescribeInstanceAttributeOutput { + s.InstanceType = v + return s +} + +// SetKernelId sets the KernelId field's value. +func (s *DescribeInstanceAttributeOutput) SetKernelId(v *AttributeValue) *DescribeInstanceAttributeOutput { + s.KernelId = v return s } // SetProductCodes sets the ProductCodes field's value. -func (s *DescribeSnapshotAttributeOutput) SetProductCodes(v []*ProductCode) *DescribeSnapshotAttributeOutput { +func (s *DescribeInstanceAttributeOutput) SetProductCodes(v []*ProductCode) *DescribeInstanceAttributeOutput { s.ProductCodes = v return s } -// SetSnapshotId sets the SnapshotId field's value. -func (s *DescribeSnapshotAttributeOutput) SetSnapshotId(v string) *DescribeSnapshotAttributeOutput { - s.SnapshotId = &v +// SetRamdiskId sets the RamdiskId field's value. +func (s *DescribeInstanceAttributeOutput) SetRamdiskId(v *AttributeValue) *DescribeInstanceAttributeOutput { + s.RamdiskId = v return s } -// Contains the parameters for DescribeSnapshots. -type DescribeSnapshotsInput struct { +// SetRootDeviceName sets the RootDeviceName field's value. +func (s *DescribeInstanceAttributeOutput) SetRootDeviceName(v *AttributeValue) *DescribeInstanceAttributeOutput { + s.RootDeviceName = v + return s +} + +// SetSourceDestCheck sets the SourceDestCheck field's value. +func (s *DescribeInstanceAttributeOutput) SetSourceDestCheck(v *AttributeBooleanValue) *DescribeInstanceAttributeOutput { + s.SourceDestCheck = v + return s +} + +// SetSriovNetSupport sets the SriovNetSupport field's value. +func (s *DescribeInstanceAttributeOutput) SetSriovNetSupport(v *AttributeValue) *DescribeInstanceAttributeOutput { + s.SriovNetSupport = v + return s +} + +// SetUserData sets the UserData field's value. +func (s *DescribeInstanceAttributeOutput) SetUserData(v *AttributeValue) *DescribeInstanceAttributeOutput { + s.UserData = v + return s +} + +type DescribeInstanceCreditSpecificationsInput 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 `locationName:"dryRun" type:"boolean"` + DryRun *bool `type:"boolean"` // One or more filters. // - // * description - A description of the snapshot. - // - // * owner-alias - Value from an Amazon-maintained list (amazon | aws-marketplace - // | microsoft) of snapshot owners. Not to be confused with the user-configured - // AWS account alias, which is set from the IAM console. - // - // * owner-id - The ID of the AWS account that owns the snapshot. - // - // * progress - The progress of the snapshot, as a percentage (for example, - // 80%). - // - // * snapshot-id - The snapshot ID. - // - // * start-time - The time stamp when the snapshot was initiated. - // - // * status - The status of the snapshot (pending | completed | error). - // - // * 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. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. + // * instance-id - The ID of the instance. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // One or more instance IDs. // - // * volume-id - The ID of the volume the snapshot is for. + // Default: Describes all your instances. // - // * volume-size - The size of the volume, in GiB. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + // Constraints: Maximum 1000 explicitly specified instance IDs. + InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list"` - // The maximum number of snapshot results returned by DescribeSnapshots in paginated - // output. When this parameter is used, DescribeSnapshots only returns MaxResults - // results in a single page along with a NextToken response element. The remaining - // results of the initial request can be seen by sending another DescribeSnapshots - // request with the returned NextToken value. This value can be between 5 and - // 1000; if MaxResults is given a value larger than 1000, only 1000 results - // are returned. If this parameter is not used, then DescribeSnapshots returns - // all results. You cannot specify this parameter and the snapshot IDs parameter - // in the same request. + // 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 5 and 1000. You cannot specify this parameter and the + // instance IDs parameter in the same call. MaxResults *int64 `type:"integer"` - // The NextToken value returned from a previous paginated DescribeSnapshots - // request where MaxResults was used and the results exceeded the value of that - // parameter. Pagination continues from the end of the previous results that - // returned the NextToken value. This value is null when there are no more results - // to return. + // The token to retrieve the next page of results. NextToken *string `type:"string"` - - // Returns the snapshots owned by the specified owner. Multiple owners can be - // specified. - OwnerIds []*string `locationName:"Owner" locationNameList:"Owner" type:"list"` - - // One or more AWS accounts IDs that can create volumes from the snapshot. - RestorableByUserIds []*string `locationName:"RestorableBy" type:"list"` - - // One or more snapshot IDs. - // - // Default: Describes snapshots for which you have launch permissions. - SnapshotIds []*string `locationName:"SnapshotId" locationNameList:"SnapshotId" type:"list"` } // String returns the string representation -func (s DescribeSnapshotsInput) String() string { +func (s DescribeInstanceCreditSpecificationsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeSnapshotsInput) GoString() string { +func (s DescribeInstanceCreditSpecificationsInput) GoString() string { return s.String() } // SetDryRun sets the DryRun field's value. -func (s *DescribeSnapshotsInput) SetDryRun(v bool) *DescribeSnapshotsInput { +func (s *DescribeInstanceCreditSpecificationsInput) SetDryRun(v bool) *DescribeInstanceCreditSpecificationsInput { s.DryRun = &v return s } // SetFilters sets the Filters field's value. -func (s *DescribeSnapshotsInput) SetFilters(v []*Filter) *DescribeSnapshotsInput { +func (s *DescribeInstanceCreditSpecificationsInput) SetFilters(v []*Filter) *DescribeInstanceCreditSpecificationsInput { s.Filters = v return s } +// SetInstanceIds sets the InstanceIds field's value. +func (s *DescribeInstanceCreditSpecificationsInput) SetInstanceIds(v []*string) *DescribeInstanceCreditSpecificationsInput { + s.InstanceIds = v + return s +} + // SetMaxResults sets the MaxResults field's value. -func (s *DescribeSnapshotsInput) SetMaxResults(v int64) *DescribeSnapshotsInput { +func (s *DescribeInstanceCreditSpecificationsInput) SetMaxResults(v int64) *DescribeInstanceCreditSpecificationsInput { s.MaxResults = &v return s } // SetNextToken sets the NextToken field's value. -func (s *DescribeSnapshotsInput) SetNextToken(v string) *DescribeSnapshotsInput { +func (s *DescribeInstanceCreditSpecificationsInput) SetNextToken(v string) *DescribeInstanceCreditSpecificationsInput { s.NextToken = &v return s } -// SetOwnerIds sets the OwnerIds field's value. -func (s *DescribeSnapshotsInput) SetOwnerIds(v []*string) *DescribeSnapshotsInput { - s.OwnerIds = v - return s -} - -// SetRestorableByUserIds sets the RestorableByUserIds field's value. -func (s *DescribeSnapshotsInput) SetRestorableByUserIds(v []*string) *DescribeSnapshotsInput { - s.RestorableByUserIds = v - return s -} - -// SetSnapshotIds sets the SnapshotIds field's value. -func (s *DescribeSnapshotsInput) SetSnapshotIds(v []*string) *DescribeSnapshotsInput { - s.SnapshotIds = v - return s -} - -// Contains the output of DescribeSnapshots. -type DescribeSnapshotsOutput struct { +type DescribeInstanceCreditSpecificationsOutput struct { _ struct{} `type:"structure"` - // The NextToken value to include in a future DescribeSnapshots request. When - // the results of a DescribeSnapshots request exceed MaxResults, this value - // can be used to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` + // Information about the credit option for CPU usage of an instance. + InstanceCreditSpecifications []*InstanceCreditSpecification `locationName:"instanceCreditSpecificationSet" locationNameList:"item" type:"list"` - // Information about the snapshots. - Snapshots []*Snapshot `locationName:"snapshotSet" 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 DescribeSnapshotsOutput) String() string { +func (s DescribeInstanceCreditSpecificationsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeSnapshotsOutput) GoString() string { +func (s DescribeInstanceCreditSpecificationsOutput) GoString() string { return s.String() } -// SetNextToken sets the NextToken field's value. -func (s *DescribeSnapshotsOutput) SetNextToken(v string) *DescribeSnapshotsOutput { - s.NextToken = &v +// SetInstanceCreditSpecifications sets the InstanceCreditSpecifications field's value. +func (s *DescribeInstanceCreditSpecificationsOutput) SetInstanceCreditSpecifications(v []*InstanceCreditSpecification) *DescribeInstanceCreditSpecificationsOutput { + s.InstanceCreditSpecifications = v return s } -// SetSnapshots sets the Snapshots field's value. -func (s *DescribeSnapshotsOutput) SetSnapshots(v []*Snapshot) *DescribeSnapshotsOutput { - s.Snapshots = v +// SetNextToken sets the NextToken field's value. +func (s *DescribeInstanceCreditSpecificationsOutput) SetNextToken(v string) *DescribeInstanceCreditSpecificationsOutput { + s.NextToken = &v return s } -// Contains the parameters for DescribeSpotDatafeedSubscription. -type DescribeSpotDatafeedSubscriptionInput struct { +type DescribeInstanceStatusInput struct { _ struct{} `type:"structure"` // Checks whether you have the required permissions for the action, without @@ -40804,169 +46197,7870 @@ type DescribeSpotDatafeedSubscriptionInput struct { // the required permissions, the error response is DryRunOperation. Otherwise, // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` + + // One or more filters. + // + // * availability-zone - The Availability Zone of the instance. + // + // * event.code - The code for the scheduled event (instance-reboot | system-reboot + // | system-maintenance | instance-retirement | instance-stop). + // + // * event.description - A description of the event. + // + // * event.not-after - The latest end time for the scheduled event (for example, + // 2014-09-15T17:15:20.000Z). + // + // * event.not-before - The earliest start time for the scheduled event (for + // example, 2014-09-15T17:15:20.000Z). + // + // * instance-state-code - The code for the instance state, as a 16-bit unsigned + // integer. The high byte is used for internal purposes and should be ignored. + // The low byte is set based on the state represented. The valid values are + // 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), + // and 80 (stopped). + // + // * instance-state-name - The state of the instance (pending | running | + // shutting-down | terminated | stopping | stopped). + // + // * instance-status.reachability - Filters on instance status where the + // name is reachability (passed | failed | initializing | insufficient-data). + // + // * instance-status.status - The status of the instance (ok | impaired | + // initializing | insufficient-data | not-applicable). + // + // * system-status.reachability - Filters on system status where the name + // is reachability (passed | failed | initializing | insufficient-data). + // + // * system-status.status - The system status of the instance (ok | impaired + // | initializing | insufficient-data | not-applicable). + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // When true, includes the health status for all instances. When false, includes + // the health status for running instances only. + // + // Default: false + IncludeAllInstances *bool `locationName:"includeAllInstances" type:"boolean"` + + // One or more instance IDs. + // + // Default: Describes all your instances. + // + // Constraints: Maximum 100 explicitly specified instance IDs. + InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" 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 5 and 1000. You cannot specify this parameter and the + // instance IDs parameter in the same call. + MaxResults *int64 `type:"integer"` + + // The token to retrieve the next page of results. + NextToken *string `type:"string"` } // String returns the string representation -func (s DescribeSpotDatafeedSubscriptionInput) String() string { +func (s DescribeInstanceStatusInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeSpotDatafeedSubscriptionInput) GoString() string { +func (s DescribeInstanceStatusInput) GoString() string { return s.String() } // SetDryRun sets the DryRun field's value. -func (s *DescribeSpotDatafeedSubscriptionInput) SetDryRun(v bool) *DescribeSpotDatafeedSubscriptionInput { +func (s *DescribeInstanceStatusInput) SetDryRun(v bool) *DescribeInstanceStatusInput { s.DryRun = &v return s } -// Contains the output of DescribeSpotDatafeedSubscription. -type DescribeSpotDatafeedSubscriptionOutput struct { - _ struct{} `type:"structure"` +// SetFilters sets the Filters field's value. +func (s *DescribeInstanceStatusInput) SetFilters(v []*Filter) *DescribeInstanceStatusInput { + s.Filters = v + return s +} - // The Spot Instance data feed subscription. - SpotDatafeedSubscription *SpotDatafeedSubscription `locationName:"spotDatafeedSubscription" type:"structure"` +// SetIncludeAllInstances sets the IncludeAllInstances field's value. +func (s *DescribeInstanceStatusInput) SetIncludeAllInstances(v bool) *DescribeInstanceStatusInput { + s.IncludeAllInstances = &v + return s } -// String returns the string representation -func (s DescribeSpotDatafeedSubscriptionOutput) String() string { - return awsutil.Prettify(s) +// SetInstanceIds sets the InstanceIds field's value. +func (s *DescribeInstanceStatusInput) SetInstanceIds(v []*string) *DescribeInstanceStatusInput { + s.InstanceIds = v + return s } -// GoString returns the string representation -func (s DescribeSpotDatafeedSubscriptionOutput) GoString() string { - return s.String() +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeInstanceStatusInput) SetMaxResults(v int64) *DescribeInstanceStatusInput { + s.MaxResults = &v + return s } -// SetSpotDatafeedSubscription sets the SpotDatafeedSubscription field's value. -func (s *DescribeSpotDatafeedSubscriptionOutput) SetSpotDatafeedSubscription(v *SpotDatafeedSubscription) *DescribeSpotDatafeedSubscriptionOutput { - s.SpotDatafeedSubscription = v +// SetNextToken sets the NextToken field's value. +func (s *DescribeInstanceStatusInput) SetNextToken(v string) *DescribeInstanceStatusInput { + s.NextToken = &v return s } -// Contains the parameters for DescribeSpotFleetInstances. -type DescribeSpotFleetInstancesInput struct { +type DescribeInstanceStatusOutput 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 `locationName:"dryRun" type:"boolean"` - - // The maximum number of results to return in a single call. Specify a value - // between 1 and 1000. The default value is 1000. To retrieve the remaining - // results, make another call with the returned NextToken value. - MaxResults *int64 `locationName:"maxResults" type:"integer"` + // One or more instance status descriptions. + InstanceStatuses []*InstanceStatus `locationName:"instanceStatusSet" locationNameList:"item" type:"list"` - // The token for the next set of results. + // 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 ID of the Spot Fleet request. - // - // SpotFleetRequestId is a required field - SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"` } // String returns the string representation -func (s DescribeSpotFleetInstancesInput) String() string { +func (s DescribeInstanceStatusOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeSpotFleetInstancesInput) GoString() string { +func (s DescribeInstanceStatusOutput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeSpotFleetInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeSpotFleetInstancesInput"} - if s.SpotFleetRequestId == nil { - invalidParams.Add(request.NewErrParamRequired("SpotFleetRequestId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeSpotFleetInstancesInput) SetDryRun(v bool) *DescribeSpotFleetInstancesInput { - s.DryRun = &v +// SetInstanceStatuses sets the InstanceStatuses field's value. +func (s *DescribeInstanceStatusOutput) SetInstanceStatuses(v []*InstanceStatus) *DescribeInstanceStatusOutput { + s.InstanceStatuses = v return s } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeSpotFleetInstancesInput) SetMaxResults(v int64) *DescribeSpotFleetInstancesInput { - s.MaxResults = &v +// SetNextToken sets the NextToken field's value. +func (s *DescribeInstanceStatusOutput) SetNextToken(v string) *DescribeInstanceStatusOutput { + s.NextToken = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeSpotFleetInstancesInput) SetNextToken(v string) *DescribeSpotFleetInstancesInput { +type DescribeInstancesInput 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 `locationName:"dryRun" type:"boolean"` + + // One or more filters. + // + // * affinity - The affinity setting for an instance running on a Dedicated + // Host (default | host). + // + // * architecture - The instance architecture (i386 | x86_64). + // + // * availability-zone - The Availability Zone of the instance. + // + // * block-device-mapping.attach-time - The attach time for an EBS volume + // mapped to the instance, for example, 2010-09-15T17:15:20.000Z. + // + // * block-device-mapping.delete-on-termination - A Boolean that indicates + // whether the EBS volume is deleted on instance termination. + // + // * block-device-mapping.device-name - The device name specified in the + // block device mapping (for example, /dev/sdh or xvdh). + // + // * block-device-mapping.status - The status for the EBS volume (attaching + // | attached | detaching | detached). + // + // * block-device-mapping.volume-id - The volume ID of the EBS volume. + // + // * client-token - The idempotency token you provided when you launched + // the instance. + // + // * dns-name - The public DNS name of the instance. + // + // * group-id - The ID of the security group for the instance. EC2-Classic + // only. + // + // * group-name - The name of the security group for the instance. EC2-Classic + // only. + // + // * hibernation-options.configured - A Boolean that indicates whether the + // instance is enabled for hibernation. A value of true means that the instance + // is enabled for hibernation. + // + // * host-id - The ID of the Dedicated Host on which the instance is running, + // if applicable. + // + // * hypervisor - The hypervisor type of the instance (ovm | xen). + // + // * iam-instance-profile.arn - The instance profile associated with the + // instance. Specified as an ARN. + // + // * image-id - The ID of the image used to launch the instance. + // + // * instance-id - The ID of the instance. + // + // * instance-lifecycle - Indicates whether this is a Spot Instance or a + // Scheduled Instance (spot | scheduled). + // + // * instance-state-code - The state of the instance, as a 16-bit unsigned + // integer. The high byte is used for internal purposes and should be ignored. + // The low byte is set based on the state represented. The valid values are: + // 0 (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), + // and 80 (stopped). + // + // * instance-state-name - The state of the instance (pending | running | + // shutting-down | terminated | stopping | stopped). + // + // * instance-type - The type of instance (for example, t2.micro). + // + // * instance.group-id - The ID of the security group for the instance. + // + // * instance.group-name - The name of the security group for the instance. + // + // + // * ip-address - The public IPv4 address of the instance. + // + // * kernel-id - The kernel ID. + // + // * key-name - The name of the key pair used when the instance was launched. + // + // * launch-index - When launching multiple instances, this is the index + // for the instance in the launch group (for example, 0, 1, 2, and so on). + // + // + // * launch-time - The time when the instance was launched. + // + // * monitoring-state - Indicates whether detailed monitoring is enabled + // (disabled | enabled). + // + // * network-interface.addresses.private-ip-address - The private IPv4 address + // associated with the network interface. + // + // * network-interface.addresses.primary - Specifies whether the IPv4 address + // of the network interface is the primary private IPv4 address. + // + // * network-interface.addresses.association.public-ip - The ID of the association + // of an Elastic IP address (IPv4) with a network interface. + // + // * network-interface.addresses.association.ip-owner-id - The owner ID of + // the private IPv4 address associated with the network interface. + // + // * network-interface.association.public-ip - The address of the Elastic + // IP address (IPv4) bound to the network interface. + // + // * network-interface.association.ip-owner-id - The owner of the Elastic + // IP address (IPv4) associated with the network interface. + // + // * network-interface.association.allocation-id - The allocation ID returned + // when you allocated the Elastic IP address (IPv4) for your network interface. + // + // * network-interface.association.association-id - The association ID returned + // when the network interface was associated with an IPv4 address. + // + // * network-interface.attachment.attachment-id - The ID of the interface + // attachment. + // + // * network-interface.attachment.instance-id - The ID of the instance to + // which the network interface is attached. + // + // * network-interface.attachment.instance-owner-id - The owner ID of the + // instance to which the network interface is attached. + // + // * network-interface.attachment.device-index - The device index to which + // the network interface is attached. + // + // * network-interface.attachment.status - The status of the attachment (attaching + // | attached | detaching | detached). + // + // * network-interface.attachment.attach-time - The time that the network + // interface was attached to an instance. + // + // * network-interface.attachment.delete-on-termination - Specifies whether + // the attachment is deleted when an instance is terminated. + // + // * network-interface.availability-zone - The Availability Zone for the + // network interface. + // + // * network-interface.description - The description of the network interface. + // + // * network-interface.group-id - The ID of a security group associated with + // the network interface. + // + // * network-interface.group-name - The name of a security group associated + // with the network interface. + // + // * network-interface.ipv6-addresses.ipv6-address - The IPv6 address associated + // with the network interface. + // + // * network-interface.mac-address - The MAC address of the network interface. + // + // * network-interface.network-interface-id - The ID of the network interface. + // + // * network-interface.owner-id - The ID of the owner of the network interface. + // + // * network-interface.private-dns-name - The private DNS name of the network + // interface. + // + // * 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. + // + // * network-interface.status - The status of the network interface (available) + // | in-use). + // + // * network-interface.source-dest-check - Whether the network interface + // performs source/destination checking. A value of true means that checking + // is enabled, and false means that checking is disabled. The value must + // be false for the network interface to perform network address translation + // (NAT) in your VPC. + // + // * network-interface.subnet-id - The ID of the subnet for the network interface. + // + // * network-interface.vpc-id - The ID of the VPC for the network interface. + // + // * owner-id - The AWS account ID of the instance owner. + // + // * placement-group-name - The name of the placement group for the instance. + // + // * placement-partition-number - The partition in which the instance is + // located. + // + // * platform - The platform. Use windows if you have Windows instances; + // otherwise, leave blank. + // + // * private-dns-name - The private IPv4 DNS name of the instance. + // + // * private-ip-address - The private IPv4 address of the instance. + // + // * product-code - The product code associated with the AMI used to launch + // the instance. + // + // * product-code.type - The type of product code (devpay | marketplace). + // + // * ramdisk-id - The RAM disk ID. + // + // * reason - The reason for the current state of the instance (for example, + // shows "User Initiated [date]" when you stop or terminate the instance). + // 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). + // + // * 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 + // one-to-one relationship with an instance launch request, but can be associated + // with more than one instance if you launch multiple instances using the + // same launch request. For example, if you launch one instance, you get + // one reservation ID. If you launch ten instances using the same launch + // request, you also get one reservation ID. + // + // * root-device-name - The device name of the root device volume (for example, + // /dev/sda1). + // + // * root-device-type - The type of the root device volume (ebs | instance-store). + // + // * source-dest-check - Indicates whether the instance performs source/destination + // checking. 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 network address translation (NAT) in your VPC. + // + // * spot-instance-request-id - The ID of the Spot Instance request. + // + // * state-reason-code - The reason code for the state change. + // + // * state-reason-message - A message that describes the state change. + // + // * subnet-id - The ID of the subnet for the instance. + // + // * 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. + // + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources that have a tag with a specific key, regardless + // of the tag value. + // + // * tenancy - The tenancy of an instance (dedicated | default | host). + // + // * virtualization-type - The virtualization type of the instance (paravirtual + // | hvm). + // + // * vpc-id - The ID of the VPC that the instance is running in. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // One or more instance IDs. + // + // Default: Describes all your instances. + InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" 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 5 and 1000. You cannot specify this parameter and the + // instance IDs parameter in the same call. + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // The token to request the next page of results. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s DescribeInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInstancesInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeInstancesInput) SetDryRun(v bool) *DescribeInstancesInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeInstancesInput) SetFilters(v []*Filter) *DescribeInstancesInput { + s.Filters = v + return s +} + +// SetInstanceIds sets the InstanceIds field's value. +func (s *DescribeInstancesInput) SetInstanceIds(v []*string) *DescribeInstancesInput { + s.InstanceIds = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeInstancesInput) SetMaxResults(v int64) *DescribeInstancesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeInstancesInput) SetNextToken(v string) *DescribeInstancesInput { + s.NextToken = &v + return s +} + +type DescribeInstancesOutput 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"` + + // Zero or more reservations. + Reservations []*Reservation `locationName:"reservationSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInstancesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeInstancesOutput) SetNextToken(v string) *DescribeInstancesOutput { s.NextToken = &v return s } -// SetSpotFleetRequestId sets the SpotFleetRequestId field's value. -func (s *DescribeSpotFleetInstancesInput) SetSpotFleetRequestId(v string) *DescribeSpotFleetInstancesInput { - s.SpotFleetRequestId = &v +// SetReservations sets the Reservations field's value. +func (s *DescribeInstancesOutput) SetReservations(v []*Reservation) *DescribeInstancesOutput { + s.Reservations = v + return s +} + +type DescribeInternetGatewaysInput 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 `locationName:"dryRun" type:"boolean"` + + // One or more filters. + // + // * attachment.state - The current state of the attachment between the gateway + // and the VPC (available). Present only if a VPC is attached. + // + // * attachment.vpc-id - The ID of an attached VPC. + // + // * internet-gateway-id - The ID of the Internet gateway. + // + // * owner-id - The ID of the AWS account that owns the internet 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 + // and the value TeamA, specify tag:Owner for the filter name and TeamA for + // the filter value. + // + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // One or more internet gateway IDs. + // + // Default: Describes all your internet gateways. + InternetGatewayIds []*string `locationName:"internetGatewayId" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeInternetGatewaysInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInternetGatewaysInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeInternetGatewaysInput) SetDryRun(v bool) *DescribeInternetGatewaysInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeInternetGatewaysInput) SetFilters(v []*Filter) *DescribeInternetGatewaysInput { + s.Filters = v + return s +} + +// SetInternetGatewayIds sets the InternetGatewayIds field's value. +func (s *DescribeInternetGatewaysInput) SetInternetGatewayIds(v []*string) *DescribeInternetGatewaysInput { + s.InternetGatewayIds = v + return s +} + +type DescribeInternetGatewaysOutput struct { + _ struct{} `type:"structure"` + + // Information about one or more internet gateways. + InternetGateways []*InternetGateway `locationName:"internetGatewaySet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeInternetGatewaysOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInternetGatewaysOutput) GoString() string { + return s.String() +} + +// SetInternetGateways sets the InternetGateways field's value. +func (s *DescribeInternetGatewaysOutput) SetInternetGateways(v []*InternetGateway) *DescribeInternetGatewaysOutput { + s.InternetGateways = v + return s +} + +type DescribeKeyPairsInput 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 `locationName:"dryRun" type:"boolean"` + + // One or more filters. + // + // * fingerprint - The fingerprint of the key pair. + // + // * key-name - The name of the key pair. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // One or more key pair names. + // + // Default: Describes all your key pairs. + KeyNames []*string `locationName:"KeyName" locationNameList:"KeyName" type:"list"` +} + +// String returns the string representation +func (s DescribeKeyPairsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeKeyPairsInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeKeyPairsInput) SetDryRun(v bool) *DescribeKeyPairsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeKeyPairsInput) SetFilters(v []*Filter) *DescribeKeyPairsInput { + s.Filters = v + return s +} + +// SetKeyNames sets the KeyNames field's value. +func (s *DescribeKeyPairsInput) SetKeyNames(v []*string) *DescribeKeyPairsInput { + s.KeyNames = v + return s +} + +type DescribeKeyPairsOutput struct { + _ struct{} `type:"structure"` + + // Information about one or more key pairs. + KeyPairs []*KeyPairInfo `locationName:"keySet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeKeyPairsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeKeyPairsOutput) GoString() string { + return s.String() +} + +// SetKeyPairs sets the KeyPairs field's value. +func (s *DescribeKeyPairsOutput) SetKeyPairs(v []*KeyPairInfo) *DescribeKeyPairsOutput { + s.KeyPairs = v + return s +} + +type DescribeLaunchTemplateVersionsInput 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. + // + // * create-time - The time the launch template version was created. + // + // * ebs-optimized - A boolean that indicates whether the instance is optimized + // for Amazon EBS I/O. + // + // * iam-instance-profile - The ARN of the IAM instance profile. + // + // * image-id - The ID of the AMI. + // + // * instance-type - The instance type. + // + // * is-default-version - A boolean that indicates whether the launch template + // version is the default version. + // + // * kernel-id - The kernel ID. + // + // * ram-disk-id - The RAM disk ID. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The ID of the launch template. You must specify either the launch template + // ID or launch template name in the request. + LaunchTemplateId *string `type:"string"` + + // The name of the launch template. You must specify either the launch template + // ID or launch template name in the request. + LaunchTemplateName *string `min:"3" type:"string"` + + // 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. + MaxResults *int64 `type:"integer"` + + // The version number up to which to describe launch template versions. + MaxVersion *string `type:"string"` + + // The version number after which to describe launch template versions. + MinVersion *string `type:"string"` + + // The token to request the next page of results. + NextToken *string `type:"string"` + + // One or more versions of the launch template. + Versions []*string `locationName:"LaunchTemplateVersion" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeLaunchTemplateVersionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLaunchTemplateVersionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeLaunchTemplateVersionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeLaunchTemplateVersionsInput"} + if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeLaunchTemplateVersionsInput) SetDryRun(v bool) *DescribeLaunchTemplateVersionsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeLaunchTemplateVersionsInput) SetFilters(v []*Filter) *DescribeLaunchTemplateVersionsInput { + s.Filters = v + return s +} + +// SetLaunchTemplateId sets the LaunchTemplateId field's value. +func (s *DescribeLaunchTemplateVersionsInput) SetLaunchTemplateId(v string) *DescribeLaunchTemplateVersionsInput { + s.LaunchTemplateId = &v + return s +} + +// SetLaunchTemplateName sets the LaunchTemplateName field's value. +func (s *DescribeLaunchTemplateVersionsInput) SetLaunchTemplateName(v string) *DescribeLaunchTemplateVersionsInput { + s.LaunchTemplateName = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeLaunchTemplateVersionsInput) SetMaxResults(v int64) *DescribeLaunchTemplateVersionsInput { + s.MaxResults = &v + return s +} + +// SetMaxVersion sets the MaxVersion field's value. +func (s *DescribeLaunchTemplateVersionsInput) SetMaxVersion(v string) *DescribeLaunchTemplateVersionsInput { + s.MaxVersion = &v + return s +} + +// SetMinVersion sets the MinVersion field's value. +func (s *DescribeLaunchTemplateVersionsInput) SetMinVersion(v string) *DescribeLaunchTemplateVersionsInput { + s.MinVersion = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeLaunchTemplateVersionsInput) SetNextToken(v string) *DescribeLaunchTemplateVersionsInput { + s.NextToken = &v + return s +} + +// SetVersions sets the Versions field's value. +func (s *DescribeLaunchTemplateVersionsInput) SetVersions(v []*string) *DescribeLaunchTemplateVersionsInput { + s.Versions = v + return s +} + +type DescribeLaunchTemplateVersionsOutput struct { + _ struct{} `type:"structure"` + + // Information about the launch template versions. + LaunchTemplateVersions []*LaunchTemplateVersion `locationName:"launchTemplateVersionSet" 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 DescribeLaunchTemplateVersionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLaunchTemplateVersionsOutput) GoString() string { + return s.String() +} + +// SetLaunchTemplateVersions sets the LaunchTemplateVersions field's value. +func (s *DescribeLaunchTemplateVersionsOutput) SetLaunchTemplateVersions(v []*LaunchTemplateVersion) *DescribeLaunchTemplateVersionsOutput { + s.LaunchTemplateVersions = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeLaunchTemplateVersionsOutput) SetNextToken(v string) *DescribeLaunchTemplateVersionsOutput { + s.NextToken = &v + return s +} + +type DescribeLaunchTemplatesInput 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. + // + // * create-time - The time the launch template was created. + // + // * launch-template-name - The name of the launch template. + // + // * 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. + // + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // One or more launch template IDs. + LaunchTemplateIds []*string `locationName:"LaunchTemplateId" locationNameList:"item" type:"list"` + + // One or more launch template names. + LaunchTemplateNames []*string `locationName:"LaunchTemplateName" 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. + MaxResults *int64 `type:"integer"` + + // The token to request the next page of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeLaunchTemplatesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLaunchTemplatesInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeLaunchTemplatesInput) SetDryRun(v bool) *DescribeLaunchTemplatesInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeLaunchTemplatesInput) SetFilters(v []*Filter) *DescribeLaunchTemplatesInput { + s.Filters = v + return s +} + +// SetLaunchTemplateIds sets the LaunchTemplateIds field's value. +func (s *DescribeLaunchTemplatesInput) SetLaunchTemplateIds(v []*string) *DescribeLaunchTemplatesInput { + s.LaunchTemplateIds = v + return s +} + +// SetLaunchTemplateNames sets the LaunchTemplateNames field's value. +func (s *DescribeLaunchTemplatesInput) SetLaunchTemplateNames(v []*string) *DescribeLaunchTemplatesInput { + s.LaunchTemplateNames = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeLaunchTemplatesInput) SetMaxResults(v int64) *DescribeLaunchTemplatesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeLaunchTemplatesInput) SetNextToken(v string) *DescribeLaunchTemplatesInput { + s.NextToken = &v + return s +} + +type DescribeLaunchTemplatesOutput struct { + _ struct{} `type:"structure"` + + // Information about the launch templates. + LaunchTemplates []*LaunchTemplate `locationName:"launchTemplates" 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 DescribeLaunchTemplatesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeLaunchTemplatesOutput) GoString() string { + return s.String() +} + +// SetLaunchTemplates sets the LaunchTemplates field's value. +func (s *DescribeLaunchTemplatesOutput) SetLaunchTemplates(v []*LaunchTemplate) *DescribeLaunchTemplatesOutput { + s.LaunchTemplates = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeLaunchTemplatesOutput) SetNextToken(v string) *DescribeLaunchTemplatesOutput { + s.NextToken = &v + return s +} + +type DescribeMovingAddressesInput 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 `locationName:"dryRun" type:"boolean"` + + // One or more filters. + // + // * moving-status - The status of the Elastic IP address (MovingToVpc | + // RestoringToClassic). + Filters []*Filter `locationName:"filter" locationNameList:"Filter" type:"list"` + + // The maximum number of results to return for the request in a single page. + // The remaining results of the initial request can be seen by sending another + // request with the returned NextToken value. This value can be between 5 and + // 1000; if MaxResults is given a value outside of this range, an error is returned. + // + // Default: If no value is provided, the default is 1000. + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // The token for the next page of results. + NextToken *string `locationName:"nextToken" type:"string"` + + // One or more Elastic IP addresses. + PublicIps []*string `locationName:"publicIp" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeMovingAddressesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeMovingAddressesInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeMovingAddressesInput) SetDryRun(v bool) *DescribeMovingAddressesInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeMovingAddressesInput) SetFilters(v []*Filter) *DescribeMovingAddressesInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeMovingAddressesInput) SetMaxResults(v int64) *DescribeMovingAddressesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeMovingAddressesInput) SetNextToken(v string) *DescribeMovingAddressesInput { + s.NextToken = &v + return s +} + +// SetPublicIps sets the PublicIps field's value. +func (s *DescribeMovingAddressesInput) SetPublicIps(v []*string) *DescribeMovingAddressesInput { + s.PublicIps = v + return s +} + +type DescribeMovingAddressesOutput struct { + _ struct{} `type:"structure"` + + // The status for each Elastic IP address. + MovingAddressStatuses []*MovingAddressStatus `locationName:"movingAddressStatusSet" 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 DescribeMovingAddressesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeMovingAddressesOutput) GoString() string { + return s.String() +} + +// SetMovingAddressStatuses sets the MovingAddressStatuses field's value. +func (s *DescribeMovingAddressesOutput) SetMovingAddressStatuses(v []*MovingAddressStatus) *DescribeMovingAddressesOutput { + s.MovingAddressStatuses = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeMovingAddressesOutput) SetNextToken(v string) *DescribeMovingAddressesOutput { + s.NextToken = &v + return s +} + +type DescribeNatGatewaysInput struct { + _ struct{} `type:"structure"` + + // One or more filters. + // + // * nat-gateway-id - The ID of the NAT gateway. + // + // * state - The state of the NAT gateway (pending | failed | available | + // deleting | deleted). + // + // * subnet-id - The ID of the subnet in which the NAT gateway resides. + // + // * 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. + // + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. + // + // * vpc-id - The ID of the VPC in which the NAT gateway resides. + Filter []*Filter `locationNameList:"Filter" type:"list"` + + // The maximum number of items to return for this request. The request returns + // a token that you can specify in a subsequent call to get the next set of + // results. + // + // Constraint: If the value specified is greater than 1000, we return only 1000 + // items. + MaxResults *int64 `type:"integer"` + + // One or more NAT gateway IDs. + NatGatewayIds []*string `locationName:"NatGatewayId" locationNameList:"item" type:"list"` + + // The token to retrieve the next page of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeNatGatewaysInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNatGatewaysInput) GoString() string { + return s.String() +} + +// SetFilter sets the Filter field's value. +func (s *DescribeNatGatewaysInput) SetFilter(v []*Filter) *DescribeNatGatewaysInput { + s.Filter = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeNatGatewaysInput) SetMaxResults(v int64) *DescribeNatGatewaysInput { + s.MaxResults = &v + return s +} + +// SetNatGatewayIds sets the NatGatewayIds field's value. +func (s *DescribeNatGatewaysInput) SetNatGatewayIds(v []*string) *DescribeNatGatewaysInput { + s.NatGatewayIds = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeNatGatewaysInput) SetNextToken(v string) *DescribeNatGatewaysInput { + s.NextToken = &v + return s +} + +type DescribeNatGatewaysOutput struct { + _ struct{} `type:"structure"` + + // Information about the NAT gateways. + NatGateways []*NatGateway `locationName:"natGatewaySet" 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 DescribeNatGatewaysOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNatGatewaysOutput) GoString() string { + return s.String() +} + +// SetNatGateways sets the NatGateways field's value. +func (s *DescribeNatGatewaysOutput) SetNatGateways(v []*NatGateway) *DescribeNatGatewaysOutput { + s.NatGateways = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeNatGatewaysOutput) SetNextToken(v string) *DescribeNatGatewaysOutput { + s.NextToken = &v + return s +} + +type DescribeNetworkAclsInput 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 `locationName:"dryRun" type:"boolean"` + + // One or more filters. + // + // * association.association-id - The ID of an association ID for the ACL. + // + // * association.network-acl-id - The ID of the network ACL involved in the + // association. + // + // * association.subnet-id - The ID of the subnet involved in the association. + // + // * default - Indicates whether the ACL is the default network ACL for the + // VPC. + // + // * entry.cidr - The IPv4 CIDR range specified in the entry. + // + // * entry.icmp.code - The ICMP code specified in the entry, if any. + // + // * entry.icmp.type - The ICMP type specified in the entry, if any. + // + // * entry.ipv6-cidr - The IPv6 CIDR range specified in the entry. + // + // * entry.port-range.from - The start of the port range specified in the + // entry. + // + // * entry.port-range.to - The end of the port range specified in the entry. + // + // + // * entry.protocol - The protocol specified in the entry (tcp | udp | icmp + // or a protocol number). + // + // * entry.rule-action - Allows or denies the matching traffic (allow | deny). + // + // * entry.rule-number - The number of an entry (in other words, rule) in + // the set of ACL entries. + // + // * network-acl-id - The ID of the network ACL. + // + // * owner-id - The ID of the AWS account that owns the network ACL. + // + // * 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. + // + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. + // + // * vpc-id - The ID of the VPC for the network ACL. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // One or more network ACL IDs. + // + // Default: Describes all your network ACLs. + NetworkAclIds []*string `locationName:"NetworkAclId" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeNetworkAclsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNetworkAclsInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeNetworkAclsInput) SetDryRun(v bool) *DescribeNetworkAclsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeNetworkAclsInput) SetFilters(v []*Filter) *DescribeNetworkAclsInput { + s.Filters = v + return s +} + +// SetNetworkAclIds sets the NetworkAclIds field's value. +func (s *DescribeNetworkAclsInput) SetNetworkAclIds(v []*string) *DescribeNetworkAclsInput { + s.NetworkAclIds = v + return s +} + +type DescribeNetworkAclsOutput struct { + _ struct{} `type:"structure"` + + // Information about one or more network ACLs. + NetworkAcls []*NetworkAcl `locationName:"networkAclSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeNetworkAclsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNetworkAclsOutput) GoString() string { + return s.String() +} + +// SetNetworkAcls sets the NetworkAcls field's value. +func (s *DescribeNetworkAclsOutput) SetNetworkAcls(v []*NetworkAcl) *DescribeNetworkAclsOutput { + s.NetworkAcls = v + return s +} + +// Contains the parameters for DescribeNetworkInterfaceAttribute. +type DescribeNetworkInterfaceAttributeInput struct { + _ struct{} `type:"structure"` + + // The attribute of the network interface. This parameter is required. + Attribute *string `locationName:"attribute" type:"string" enum:"NetworkInterfaceAttribute"` + + // 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 `locationName:"dryRun" type:"boolean"` + + // The ID of the network interface. + // + // NetworkInterfaceId is a required field + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeNetworkInterfaceAttributeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNetworkInterfaceAttributeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeNetworkInterfaceAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeNetworkInterfaceAttributeInput"} + if s.NetworkInterfaceId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAttribute sets the Attribute field's value. +func (s *DescribeNetworkInterfaceAttributeInput) SetAttribute(v string) *DescribeNetworkInterfaceAttributeInput { + s.Attribute = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeNetworkInterfaceAttributeInput) SetDryRun(v bool) *DescribeNetworkInterfaceAttributeInput { + s.DryRun = &v + return s +} + +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *DescribeNetworkInterfaceAttributeInput) SetNetworkInterfaceId(v string) *DescribeNetworkInterfaceAttributeInput { + s.NetworkInterfaceId = &v + return s +} + +// Contains the output of DescribeNetworkInterfaceAttribute. +type DescribeNetworkInterfaceAttributeOutput struct { + _ struct{} `type:"structure"` + + // The attachment (if any) of the network interface. + Attachment *NetworkInterfaceAttachment `locationName:"attachment" type:"structure"` + + // The description of the network interface. + Description *AttributeValue `locationName:"description" type:"structure"` + + // The security groups associated with the network interface. + Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` + + // The ID of the network interface. + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` + + // Indicates whether source/destination checking is enabled. + SourceDestCheck *AttributeBooleanValue `locationName:"sourceDestCheck" type:"structure"` +} + +// String returns the string representation +func (s DescribeNetworkInterfaceAttributeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNetworkInterfaceAttributeOutput) GoString() string { + return s.String() +} + +// SetAttachment sets the Attachment field's value. +func (s *DescribeNetworkInterfaceAttributeOutput) SetAttachment(v *NetworkInterfaceAttachment) *DescribeNetworkInterfaceAttributeOutput { + s.Attachment = v + return s +} + +// SetDescription sets the Description field's value. +func (s *DescribeNetworkInterfaceAttributeOutput) SetDescription(v *AttributeValue) *DescribeNetworkInterfaceAttributeOutput { + s.Description = v + return s +} + +// SetGroups sets the Groups field's value. +func (s *DescribeNetworkInterfaceAttributeOutput) SetGroups(v []*GroupIdentifier) *DescribeNetworkInterfaceAttributeOutput { + s.Groups = v + return s +} + +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *DescribeNetworkInterfaceAttributeOutput) SetNetworkInterfaceId(v string) *DescribeNetworkInterfaceAttributeOutput { + s.NetworkInterfaceId = &v + return s +} + +// SetSourceDestCheck sets the SourceDestCheck field's value. +func (s *DescribeNetworkInterfaceAttributeOutput) SetSourceDestCheck(v *AttributeBooleanValue) *DescribeNetworkInterfaceAttributeOutput { + s.SourceDestCheck = v + return s +} + +// Contains the parameters for DescribeNetworkInterfacePermissions. +type DescribeNetworkInterfacePermissionsInput struct { + _ struct{} `type:"structure"` + + // One or more filters. + // + // * network-interface-permission.network-interface-permission-id - The ID + // of the permission. + // + // * 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-service - The AWS service. + // + // * network-interface-permission.permission - The type of permission (INSTANCE-ATTACH + // | EIP-ASSOCIATE). + 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 call with the returned NextToken value. If + // this parameter is not specified, up to 50 results are returned by default. + MaxResults *int64 `type:"integer"` + + // One or more network interface permission IDs. + NetworkInterfacePermissionIds []*string `locationName:"NetworkInterfacePermissionId" type:"list"` + + // The token to request the next page of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeNetworkInterfacePermissionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNetworkInterfacePermissionsInput) GoString() string { + return s.String() +} + +// SetFilters sets the Filters field's value. +func (s *DescribeNetworkInterfacePermissionsInput) SetFilters(v []*Filter) *DescribeNetworkInterfacePermissionsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeNetworkInterfacePermissionsInput) SetMaxResults(v int64) *DescribeNetworkInterfacePermissionsInput { + s.MaxResults = &v + return s +} + +// SetNetworkInterfacePermissionIds sets the NetworkInterfacePermissionIds field's value. +func (s *DescribeNetworkInterfacePermissionsInput) SetNetworkInterfacePermissionIds(v []*string) *DescribeNetworkInterfacePermissionsInput { + s.NetworkInterfacePermissionIds = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeNetworkInterfacePermissionsInput) SetNextToken(v string) *DescribeNetworkInterfacePermissionsInput { + s.NextToken = &v + return s +} + +// Contains the output for DescribeNetworkInterfacePermissions. +type DescribeNetworkInterfacePermissionsOutput struct { + _ struct{} `type:"structure"` + + // The network interface permissions. + NetworkInterfacePermissions []*NetworkInterfacePermission `locationName:"networkInterfacePermissions" locationNameList:"item" type:"list"` + + // The token to use to retrieve the next page of results. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s DescribeNetworkInterfacePermissionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNetworkInterfacePermissionsOutput) GoString() string { + return s.String() +} + +// SetNetworkInterfacePermissions sets the NetworkInterfacePermissions field's value. +func (s *DescribeNetworkInterfacePermissionsOutput) SetNetworkInterfacePermissions(v []*NetworkInterfacePermission) *DescribeNetworkInterfacePermissionsOutput { + s.NetworkInterfacePermissions = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeNetworkInterfacePermissionsOutput) SetNextToken(v string) *DescribeNetworkInterfacePermissionsOutput { + s.NextToken = &v + return s +} + +// Contains the parameters for DescribeNetworkInterfaces. +type DescribeNetworkInterfacesInput 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 `locationName:"dryRun" type:"boolean"` + + // One or more filters. + // + // * addresses.private-ip-address - The private IPv4 addresses associated + // with the network interface. + // + // * addresses.primary - Whether the private IPv4 address is the primary + // IP address associated with the network interface. + // + // * addresses.association.public-ip - The association ID returned when the + // network interface was associated with the Elastic IP address (IPv4). + // + // * addresses.association.owner-id - The owner ID of the addresses associated + // with the network interface. + // + // * association.association-id - The association ID returned when the network + // interface was associated with an IPv4 address. + // + // * association.allocation-id - The allocation ID returned when you allocated + // the Elastic IP address (IPv4) for your network interface. + // + // * association.ip-owner-id - The owner of the Elastic IP address (IPv4) + // associated with the network interface. + // + // * association.public-ip - The address of the Elastic IP address (IPv4) + // bound to the network interface. + // + // * association.public-dns-name - The public DNS name for the network interface + // (IPv4). + // + // * attachment.attachment-id - The ID of the interface attachment. + // + // * attachment.attach.time - The time that the network interface was attached + // to an instance. + // + // * attachment.delete-on-termination - Indicates whether the attachment + // is deleted when an instance is terminated. + // + // * attachment.device-index - The device index to which the network interface + // is attached. + // + // * attachment.instance-id - The ID of the instance to which the network + // interface is attached. + // + // * attachment.instance-owner-id - The owner ID of the instance to which + // the network interface is attached. + // + // * attachment.nat-gateway-id - The ID of the NAT gateway to which the network + // interface is attached. + // + // * attachment.status - The status of the attachment (attaching | attached + // | detaching | detached). + // + // * availability-zone - The Availability Zone of the network interface. + // + // * description - The description of the network interface. + // + // * group-id - The ID of a security group associated with the network interface. + // + // * group-name - The name of a security group associated with the network + // interface. + // + // * ipv6-addresses.ipv6-address - An IPv6 address associated with the network + // interface. + // + // * mac-address - The MAC address of the network interface. + // + // * network-interface-id - The ID of the network interface. + // + // * owner-id - The AWS 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-managed - Indicates whether the network interface is being + // managed by an AWS service (for example, AWS Management Console, Auto Scaling, + // and so on). + // + // * source-desk-check - Indicates whether the network interface performs + // source/destination checking. A value of true means checking is enabled, + // and false means checking is disabled. The value must be false for the + // network interface to perform network address translation (NAT) in your + // VPC. + // + // * status - The status of the network interface. If the network interface + // is not attached to an instance, the status is available; if a network + // interface is attached to an instance the status is in-use. + // + // * subnet-id - The ID of the subnet for the network interface. + // + // * 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. + // + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. + // + // * vpc-id - The ID of the VPC for the network interface. + Filters []*Filter `locationName:"filter" locationNameList:"Filter" type:"list"` + + // The maximum number of items to return for this request. The request returns + // a token that you can specify in a subsequent call to get the next set of + // results. + MaxResults *int64 `type:"integer"` + + // One or more network interface IDs. + // + // Default: Describes all your network interfaces. + NetworkInterfaceIds []*string `locationName:"NetworkInterfaceId" locationNameList:"item" type:"list"` + + // The token to retrieve the next page of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeNetworkInterfacesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNetworkInterfacesInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeNetworkInterfacesInput) SetDryRun(v bool) *DescribeNetworkInterfacesInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeNetworkInterfacesInput) SetFilters(v []*Filter) *DescribeNetworkInterfacesInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeNetworkInterfacesInput) SetMaxResults(v int64) *DescribeNetworkInterfacesInput { + s.MaxResults = &v + return s +} + +// SetNetworkInterfaceIds sets the NetworkInterfaceIds field's value. +func (s *DescribeNetworkInterfacesInput) SetNetworkInterfaceIds(v []*string) *DescribeNetworkInterfacesInput { + s.NetworkInterfaceIds = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeNetworkInterfacesInput) SetNextToken(v string) *DescribeNetworkInterfacesInput { + s.NextToken = &v + return s +} + +// Contains the output of DescribeNetworkInterfaces. +type DescribeNetworkInterfacesOutput struct { + _ struct{} `type:"structure"` + + // Information about one or more network interfaces. + NetworkInterfaces []*NetworkInterface `locationName:"networkInterfaceSet" 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 DescribeNetworkInterfacesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNetworkInterfacesOutput) GoString() string { + return s.String() +} + +// SetNetworkInterfaces sets the NetworkInterfaces field's value. +func (s *DescribeNetworkInterfacesOutput) SetNetworkInterfaces(v []*NetworkInterface) *DescribeNetworkInterfacesOutput { + s.NetworkInterfaces = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeNetworkInterfacesOutput) SetNextToken(v string) *DescribeNetworkInterfacesOutput { + s.NextToken = &v + return s +} + +type DescribePlacementGroupsInput 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 `locationName:"dryRun" type:"boolean"` + + // One or more filters. + // + // * group-name - The name of the placement group. + // + // * state - The state of the placement group (pending | available | deleting + // | deleted). + // + // * strategy - The strategy of the placement group (cluster | spread | partition). + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // One or more placement group names. + // + // Default: Describes all your placement groups, or only those otherwise specified. + GroupNames []*string `locationName:"groupName" type:"list"` +} + +// String returns the string representation +func (s DescribePlacementGroupsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePlacementGroupsInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribePlacementGroupsInput) SetDryRun(v bool) *DescribePlacementGroupsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribePlacementGroupsInput) SetFilters(v []*Filter) *DescribePlacementGroupsInput { + s.Filters = v + return s +} + +// SetGroupNames sets the GroupNames field's value. +func (s *DescribePlacementGroupsInput) SetGroupNames(v []*string) *DescribePlacementGroupsInput { + s.GroupNames = v + return s +} + +type DescribePlacementGroupsOutput struct { + _ struct{} `type:"structure"` + + // One or more placement groups. + PlacementGroups []*PlacementGroup `locationName:"placementGroupSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribePlacementGroupsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePlacementGroupsOutput) GoString() string { + return s.String() +} + +// SetPlacementGroups sets the PlacementGroups field's value. +func (s *DescribePlacementGroupsOutput) SetPlacementGroups(v []*PlacementGroup) *DescribePlacementGroupsOutput { + s.PlacementGroups = v + return s +} + +type DescribePrefixListsInput 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. + // + // * prefix-list-id: The ID of a prefix list. + // + // * prefix-list-name: The name of a prefix list. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The maximum number of items to return for this request. The request returns + // a token that you can specify in a subsequent call to get the next set of + // results. + // + // Constraint: If the value specified is greater than 1000, we return only 1000 + // items. + MaxResults *int64 `type:"integer"` + + // The token for the next set of items to return. (You received this token from + // a prior call.) + NextToken *string `type:"string"` + + // One or more prefix list IDs. + PrefixListIds []*string `locationName:"PrefixListId" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribePrefixListsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePrefixListsInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribePrefixListsInput) SetDryRun(v bool) *DescribePrefixListsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribePrefixListsInput) SetFilters(v []*Filter) *DescribePrefixListsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribePrefixListsInput) SetMaxResults(v int64) *DescribePrefixListsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribePrefixListsInput) SetNextToken(v string) *DescribePrefixListsInput { + s.NextToken = &v + return s +} + +// SetPrefixListIds sets the PrefixListIds field's value. +func (s *DescribePrefixListsInput) SetPrefixListIds(v []*string) *DescribePrefixListsInput { + s.PrefixListIds = v + return s +} + +type DescribePrefixListsOutput struct { + _ struct{} `type:"structure"` + + // The token to use when requesting the next set of items. If there are no additional + // items to return, the string is empty. + NextToken *string `locationName:"nextToken" type:"string"` + + // All available prefix lists. + PrefixLists []*PrefixList `locationName:"prefixListSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribePrefixListsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePrefixListsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribePrefixListsOutput) SetNextToken(v string) *DescribePrefixListsOutput { + s.NextToken = &v + return s +} + +// SetPrefixLists sets the PrefixLists field's value. +func (s *DescribePrefixListsOutput) SetPrefixLists(v []*PrefixList) *DescribePrefixListsOutput { + s.PrefixLists = v + return s +} + +type DescribePrincipalIdFormatInput 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 maximum number of results to return in a single call. To retrieve the + // remaining results, make another call with the returned NextToken value. + MaxResults *int64 `type:"integer"` + + // The token to request the next page of results. + NextToken *string `type:"string"` + + // The type of resource: bundle | conversion-task | customer-gateway | dhcp-options + // | elastic-ip-allocation | elastic-ip-association | export-task | flow-log + // | image | import-task | instance | internet-gateway | network-acl | network-acl-association + // | network-interface | network-interface-attachment | prefix-list | reservation + // | route-table | route-table-association | security-group | snapshot | subnet + // | subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association + // | vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway + Resources []*string `locationName:"Resource" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribePrincipalIdFormatInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePrincipalIdFormatInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribePrincipalIdFormatInput) SetDryRun(v bool) *DescribePrincipalIdFormatInput { + s.DryRun = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribePrincipalIdFormatInput) SetMaxResults(v int64) *DescribePrincipalIdFormatInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribePrincipalIdFormatInput) SetNextToken(v string) *DescribePrincipalIdFormatInput { + s.NextToken = &v + return s +} + +// SetResources sets the Resources field's value. +func (s *DescribePrincipalIdFormatInput) SetResources(v []*string) *DescribePrincipalIdFormatInput { + s.Resources = v + return s +} + +type DescribePrincipalIdFormatOutput 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 ID format settings for the ARN. + Principals []*PrincipalIdFormat `locationName:"principalSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribePrincipalIdFormatOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePrincipalIdFormatOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribePrincipalIdFormatOutput) SetNextToken(v string) *DescribePrincipalIdFormatOutput { + s.NextToken = &v + return s +} + +// SetPrincipals sets the Principals field's value. +func (s *DescribePrincipalIdFormatOutput) SetPrincipals(v []*PrincipalIdFormat) *DescribePrincipalIdFormatOutput { + s.Principals = v + return s +} + +type DescribePublicIpv4PoolsInput struct { + _ struct{} `type:"structure"` + + // 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 `min:"1" type:"string"` + + // The IDs of the address pools. + PoolIds []*string `locationName:"PoolId" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribePublicIpv4PoolsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePublicIpv4PoolsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribePublicIpv4PoolsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribePublicIpv4PoolsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribePublicIpv4PoolsInput) SetMaxResults(v int64) *DescribePublicIpv4PoolsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribePublicIpv4PoolsInput) SetNextToken(v string) *DescribePublicIpv4PoolsInput { + s.NextToken = &v + return s +} + +// SetPoolIds sets the PoolIds field's value. +func (s *DescribePublicIpv4PoolsInput) SetPoolIds(v []*string) *DescribePublicIpv4PoolsInput { + s.PoolIds = v + return s +} + +type DescribePublicIpv4PoolsOutput 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 address pools. + PublicIpv4Pools []*PublicIpv4Pool `locationName:"publicIpv4PoolSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribePublicIpv4PoolsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePublicIpv4PoolsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribePublicIpv4PoolsOutput) SetNextToken(v string) *DescribePublicIpv4PoolsOutput { + s.NextToken = &v + return s +} + +// SetPublicIpv4Pools sets the PublicIpv4Pools field's value. +func (s *DescribePublicIpv4PoolsOutput) SetPublicIpv4Pools(v []*PublicIpv4Pool) *DescribePublicIpv4PoolsOutput { + s.PublicIpv4Pools = v + return s +} + +type DescribeRegionsInput 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 `locationName:"dryRun" type:"boolean"` + + // One or more filters. + // + // * endpoint - The endpoint of the region (for example, ec2.us-east-1.amazonaws.com). + // + // * region-name - The name of the region (for example, us-east-1). + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The names of one or more regions. + RegionNames []*string `locationName:"RegionName" locationNameList:"RegionName" type:"list"` +} + +// String returns the string representation +func (s DescribeRegionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeRegionsInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeRegionsInput) SetDryRun(v bool) *DescribeRegionsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeRegionsInput) SetFilters(v []*Filter) *DescribeRegionsInput { + s.Filters = v + return s +} + +// SetRegionNames sets the RegionNames field's value. +func (s *DescribeRegionsInput) SetRegionNames(v []*string) *DescribeRegionsInput { + s.RegionNames = v + return s +} + +type DescribeRegionsOutput struct { + _ struct{} `type:"structure"` + + // Information about one or more regions. + Regions []*Region `locationName:"regionInfo" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeRegionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeRegionsOutput) GoString() string { + return s.String() +} + +// SetRegions sets the Regions field's value. +func (s *DescribeRegionsOutput) SetRegions(v []*Region) *DescribeRegionsOutput { + s.Regions = v + return s +} + +// Contains the parameters for DescribeReservedInstances. +type DescribeReservedInstancesInput 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 `locationName:"dryRun" type:"boolean"` + + // One or more filters. + // + // * availability-zone - The Availability Zone where the Reserved Instance + // can be used. + // + // * duration - The duration of the Reserved Instance (one year or three + // years), in seconds (31536000 | 94608000). + // + // * end - The time when the Reserved Instance expires (for example, 2015-08-07T11:54:42.000Z). + // + // * fixed-price - The purchase price of the Reserved Instance (for example, + // 9800.0). + // + // * instance-type - The instance type that is covered by the reservation. + // + // * scope - The scope of the Reserved Instance (Region or Availability Zone). + // + // * 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)). + // + // * reserved-instances-id - The ID of the Reserved Instance. + // + // * start - The time at which the Reserved Instance purchase request was + // placed (for example, 2014-08-07T11:54:42.000Z). + // + // * state - The state of the Reserved Instance (payment-pending | active + // | payment-failed | retired). + // + // * 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. + // + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. + // + // * usage-price - The usage price of the Reserved Instance, per hour (for + // example, 0.84). + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // Describes whether the Reserved Instance is Standard or Convertible. + OfferingClass *string `type:"string" enum:"OfferingClassType"` + + // The Reserved Instance offering type. If you are using tools that predate + // the 2011-11-01 API version, you only have access to the Medium Utilization + // Reserved Instance offering type. + OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingTypeValues"` + + // One or more Reserved Instance IDs. + // + // Default: Describes all your Reserved Instances, or only those otherwise specified. + ReservedInstancesIds []*string `locationName:"ReservedInstancesId" locationNameList:"ReservedInstancesId" type:"list"` +} + +// String returns the string representation +func (s DescribeReservedInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeReservedInstancesInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeReservedInstancesInput) SetDryRun(v bool) *DescribeReservedInstancesInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeReservedInstancesInput) SetFilters(v []*Filter) *DescribeReservedInstancesInput { + s.Filters = v + return s +} + +// SetOfferingClass sets the OfferingClass field's value. +func (s *DescribeReservedInstancesInput) SetOfferingClass(v string) *DescribeReservedInstancesInput { + s.OfferingClass = &v + return s +} + +// SetOfferingType sets the OfferingType field's value. +func (s *DescribeReservedInstancesInput) SetOfferingType(v string) *DescribeReservedInstancesInput { + s.OfferingType = &v + return s +} + +// SetReservedInstancesIds sets the ReservedInstancesIds field's value. +func (s *DescribeReservedInstancesInput) SetReservedInstancesIds(v []*string) *DescribeReservedInstancesInput { + s.ReservedInstancesIds = v + return s +} + +// Contains the parameters for DescribeReservedInstancesListings. +type DescribeReservedInstancesListingsInput struct { + _ struct{} `type:"structure"` + + // One or more filters. + // + // * reserved-instances-id - The ID of the Reserved Instances. + // + // * reserved-instances-listing-id - The ID of the Reserved Instances listing. + // + // * status - The status of the Reserved Instance listing (pending | active + // | cancelled | closed). + // + // * status-message - The reason for the status. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // One or more Reserved Instance IDs. + ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"` + + // One or more Reserved Instance listing IDs. + ReservedInstancesListingId *string `locationName:"reservedInstancesListingId" type:"string"` +} + +// String returns the string representation +func (s DescribeReservedInstancesListingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeReservedInstancesListingsInput) GoString() string { + return s.String() +} + +// SetFilters sets the Filters field's value. +func (s *DescribeReservedInstancesListingsInput) SetFilters(v []*Filter) *DescribeReservedInstancesListingsInput { + s.Filters = v + return s +} + +// SetReservedInstancesId sets the ReservedInstancesId field's value. +func (s *DescribeReservedInstancesListingsInput) SetReservedInstancesId(v string) *DescribeReservedInstancesListingsInput { + s.ReservedInstancesId = &v + return s +} + +// SetReservedInstancesListingId sets the ReservedInstancesListingId field's value. +func (s *DescribeReservedInstancesListingsInput) SetReservedInstancesListingId(v string) *DescribeReservedInstancesListingsInput { + s.ReservedInstancesListingId = &v + return s +} + +// Contains the output of DescribeReservedInstancesListings. +type DescribeReservedInstancesListingsOutput struct { + _ struct{} `type:"structure"` + + // Information about the Reserved Instance listing. + ReservedInstancesListings []*ReservedInstancesListing `locationName:"reservedInstancesListingsSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeReservedInstancesListingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeReservedInstancesListingsOutput) GoString() string { + return s.String() +} + +// SetReservedInstancesListings sets the ReservedInstancesListings field's value. +func (s *DescribeReservedInstancesListingsOutput) SetReservedInstancesListings(v []*ReservedInstancesListing) *DescribeReservedInstancesListingsOutput { + s.ReservedInstancesListings = v + return s +} + +// Contains the parameters for DescribeReservedInstancesModifications. +type DescribeReservedInstancesModificationsInput struct { + _ struct{} `type:"structure"` + + // One or more filters. + // + // * client-token - The idempotency token for the modification request. + // + // * create-date - The time when the modification request was created. + // + // * effective-date - The time when the modification becomes effective. + // + // * modification-result.reserved-instances-id - The ID for the Reserved + // Instances created as part of the modification request. This ID is only + // available when the status of the modification is fulfilled. + // + // * modification-result.target-configuration.availability-zone - The Availability + // Zone for the new Reserved Instances. + // + // * modification-result.target-configuration.instance-count - The number + // of new Reserved Instances. + // + // * modification-result.target-configuration.instance-type - The instance + // type of the new Reserved Instances. + // + // * modification-result.target-configuration.platform - The network platform + // of the new Reserved Instances (EC2-Classic | EC2-VPC). + // + // * reserved-instances-id - The ID of the Reserved Instances modified. + // + // * reserved-instances-modification-id - The ID of the modification request. + // + // * status - The status of the Reserved Instances modification request (processing + // | fulfilled | failed). + // + // * status-message - The reason for the status. + // + // * update-date - The time when the modification request was last updated. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The token to retrieve the next page of results. + NextToken *string `locationName:"nextToken" type:"string"` + + // IDs for the submitted modification request. + ReservedInstancesModificationIds []*string `locationName:"ReservedInstancesModificationId" locationNameList:"ReservedInstancesModificationId" type:"list"` +} + +// String returns the string representation +func (s DescribeReservedInstancesModificationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeReservedInstancesModificationsInput) GoString() string { + return s.String() +} + +// SetFilters sets the Filters field's value. +func (s *DescribeReservedInstancesModificationsInput) SetFilters(v []*Filter) *DescribeReservedInstancesModificationsInput { + s.Filters = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeReservedInstancesModificationsInput) SetNextToken(v string) *DescribeReservedInstancesModificationsInput { + s.NextToken = &v + return s +} + +// SetReservedInstancesModificationIds sets the ReservedInstancesModificationIds field's value. +func (s *DescribeReservedInstancesModificationsInput) SetReservedInstancesModificationIds(v []*string) *DescribeReservedInstancesModificationsInput { + s.ReservedInstancesModificationIds = v + return s +} + +// Contains the output of DescribeReservedInstancesModifications. +type DescribeReservedInstancesModificationsOutput 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 Reserved Instance modification information. + ReservedInstancesModifications []*ReservedInstancesModification `locationName:"reservedInstancesModificationsSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeReservedInstancesModificationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeReservedInstancesModificationsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeReservedInstancesModificationsOutput) SetNextToken(v string) *DescribeReservedInstancesModificationsOutput { + s.NextToken = &v + return s +} + +// SetReservedInstancesModifications sets the ReservedInstancesModifications field's value. +func (s *DescribeReservedInstancesModificationsOutput) SetReservedInstancesModifications(v []*ReservedInstancesModification) *DescribeReservedInstancesModificationsOutput { + s.ReservedInstancesModifications = v + return s +} + +// Contains the parameters for DescribeReservedInstancesOfferings. +type DescribeReservedInstancesOfferingsInput struct { + _ struct{} `type:"structure"` + + // The Availability Zone in which the Reserved Instance can be used. + AvailabilityZone *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 `locationName:"dryRun" type:"boolean"` + + // One or more filters. + // + // * availability-zone - The Availability Zone where the Reserved Instance + // can be used. + // + // * duration - The duration of the Reserved Instance (for example, one year + // or three years), in seconds (31536000 | 94608000). + // + // * fixed-price - The purchase price of the Reserved Instance (for example, + // 9800.0). + // + // * instance-type - The instance type that is covered by the reservation. + // + // * 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. + // + // * 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)) + // + // * reserved-instances-offering-id - The Reserved Instances offering ID. + // + // * scope - The scope of the Reserved Instance (Availability Zone or Region). + // + // * usage-price - The usage price of the Reserved Instance, per hour (for + // example, 0.84). + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // Include Reserved Instance Marketplace offerings in the response. + IncludeMarketplace *bool `type:"boolean"` + + // The tenancy of the instances covered by the reservation. A Reserved Instance + // with a tenancy of dedicated is applied to instances that run in a VPC on + // single-tenant hardware (i.e., Dedicated Instances). + // + // Important: The host value cannot be used with this parameter. Use the default + // or dedicated values only. + // + // Default: default + 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 (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) + // in the Amazon Elastic Compute Cloud User Guide. + InstanceType *string `type:"string" enum:"InstanceType"` + + // The maximum duration (in seconds) to filter when searching for offerings. + // + // Default: 94608000 (3 years) + MaxDuration *int64 `type:"long"` + + // The maximum number of instances to filter when searching for offerings. + // + // Default: 20 + MaxInstanceCount *int64 `type:"integer"` + + // The maximum number of results to return for the request in a single page. + // The remaining results of the initial request can be seen by sending another + // request with the returned NextToken value. The maximum is 100. + // + // Default: 100 + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // The minimum duration (in seconds) to filter when searching for offerings. + // + // Default: 2592000 (1 month) + MinDuration *int64 `type:"long"` + + // The token to retrieve the next page of results. + NextToken *string `locationName:"nextToken" type:"string"` + + // The offering class of the Reserved Instance. Can be standard or convertible. + OfferingClass *string `type:"string" enum:"OfferingClassType"` + + // The Reserved Instance offering type. If you are using tools that predate + // the 2011-11-01 API version, you only have access to the Medium Utilization + // Reserved Instance offering type. + OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingTypeValues"` + + // The Reserved Instance product platform description. Instances that include + // (Amazon VPC) in the description are for use with Amazon VPC. + ProductDescription *string `type:"string" enum:"RIProductDescription"` + + // One or more Reserved Instances offering IDs. + ReservedInstancesOfferingIds []*string `locationName:"ReservedInstancesOfferingId" type:"list"` +} + +// String returns the string representation +func (s DescribeReservedInstancesOfferingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeReservedInstancesOfferingsInput) GoString() string { + return s.String() +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *DescribeReservedInstancesOfferingsInput) SetAvailabilityZone(v string) *DescribeReservedInstancesOfferingsInput { + s.AvailabilityZone = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeReservedInstancesOfferingsInput) SetDryRun(v bool) *DescribeReservedInstancesOfferingsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeReservedInstancesOfferingsInput) SetFilters(v []*Filter) *DescribeReservedInstancesOfferingsInput { + s.Filters = v + return s +} + +// SetIncludeMarketplace sets the IncludeMarketplace field's value. +func (s *DescribeReservedInstancesOfferingsInput) SetIncludeMarketplace(v bool) *DescribeReservedInstancesOfferingsInput { + s.IncludeMarketplace = &v + return s +} + +// SetInstanceTenancy sets the InstanceTenancy field's value. +func (s *DescribeReservedInstancesOfferingsInput) SetInstanceTenancy(v string) *DescribeReservedInstancesOfferingsInput { + s.InstanceTenancy = &v + return s +} + +// SetInstanceType sets the InstanceType field's value. +func (s *DescribeReservedInstancesOfferingsInput) SetInstanceType(v string) *DescribeReservedInstancesOfferingsInput { + s.InstanceType = &v + return s +} + +// SetMaxDuration sets the MaxDuration field's value. +func (s *DescribeReservedInstancesOfferingsInput) SetMaxDuration(v int64) *DescribeReservedInstancesOfferingsInput { + s.MaxDuration = &v + return s +} + +// SetMaxInstanceCount sets the MaxInstanceCount field's value. +func (s *DescribeReservedInstancesOfferingsInput) SetMaxInstanceCount(v int64) *DescribeReservedInstancesOfferingsInput { + s.MaxInstanceCount = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeReservedInstancesOfferingsInput) SetMaxResults(v int64) *DescribeReservedInstancesOfferingsInput { + s.MaxResults = &v + return s +} + +// SetMinDuration sets the MinDuration field's value. +func (s *DescribeReservedInstancesOfferingsInput) SetMinDuration(v int64) *DescribeReservedInstancesOfferingsInput { + s.MinDuration = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeReservedInstancesOfferingsInput) SetNextToken(v string) *DescribeReservedInstancesOfferingsInput { + s.NextToken = &v + return s +} + +// SetOfferingClass sets the OfferingClass field's value. +func (s *DescribeReservedInstancesOfferingsInput) SetOfferingClass(v string) *DescribeReservedInstancesOfferingsInput { + s.OfferingClass = &v + return s +} + +// SetOfferingType sets the OfferingType field's value. +func (s *DescribeReservedInstancesOfferingsInput) SetOfferingType(v string) *DescribeReservedInstancesOfferingsInput { + s.OfferingType = &v + return s +} + +// SetProductDescription sets the ProductDescription field's value. +func (s *DescribeReservedInstancesOfferingsInput) SetProductDescription(v string) *DescribeReservedInstancesOfferingsInput { + s.ProductDescription = &v + return s +} + +// SetReservedInstancesOfferingIds sets the ReservedInstancesOfferingIds field's value. +func (s *DescribeReservedInstancesOfferingsInput) SetReservedInstancesOfferingIds(v []*string) *DescribeReservedInstancesOfferingsInput { + s.ReservedInstancesOfferingIds = v + return s +} + +// Contains the output of DescribeReservedInstancesOfferings. +type DescribeReservedInstancesOfferingsOutput 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"` + + // A list of Reserved Instances offerings. + ReservedInstancesOfferings []*ReservedInstancesOffering `locationName:"reservedInstancesOfferingsSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeReservedInstancesOfferingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeReservedInstancesOfferingsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeReservedInstancesOfferingsOutput) SetNextToken(v string) *DescribeReservedInstancesOfferingsOutput { + s.NextToken = &v + return s +} + +// SetReservedInstancesOfferings sets the ReservedInstancesOfferings field's value. +func (s *DescribeReservedInstancesOfferingsOutput) SetReservedInstancesOfferings(v []*ReservedInstancesOffering) *DescribeReservedInstancesOfferingsOutput { + s.ReservedInstancesOfferings = v + return s +} + +// Contains the output for DescribeReservedInstances. +type DescribeReservedInstancesOutput struct { + _ struct{} `type:"structure"` + + // A list of Reserved Instances. + ReservedInstances []*ReservedInstances `locationName:"reservedInstancesSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeReservedInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeReservedInstancesOutput) GoString() string { + return s.String() +} + +// SetReservedInstances sets the ReservedInstances field's value. +func (s *DescribeReservedInstancesOutput) SetReservedInstances(v []*ReservedInstances) *DescribeReservedInstancesOutput { + s.ReservedInstances = v + return s +} + +type DescribeRouteTablesInput 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 `locationName:"dryRun" type:"boolean"` + + // One or more filters. + // + // * association.route-table-association-id - The ID of an association ID + // for the route table. + // + // * association.route-table-id - The ID of the route table involved in the + // association. + // + // * association.subnet-id - The ID of the subnet involved in the association. + // + // * association.main - Indicates whether the route table is the main route + // table for the VPC (true | false). Route tables that do not have an association + // ID are not returned in the response. + // + // * owner-id - The ID of the AWS account that owns the route table. + // + // * route-table-id - The ID of the route table. + // + // * route.destination-cidr-block - The IPv4 CIDR range specified in a route + // in the table. + // + // * route.destination-ipv6-cidr-block - The IPv6 CIDR range specified in + // a route in the route table. + // + // * route.destination-prefix-list-id - The ID (prefix) of the AWS service + // specified in a route in the table. + // + // * route.egress-only-internet-gateway-id - The ID of an egress-only Internet + // gateway specified in a route in the route table. + // + // * route.gateway-id - The ID of a gateway specified in a route in the table. + // + // * route.instance-id - The ID of an instance specified in a route in the + // table. + // + // * route.nat-gateway-id - The ID of a NAT gateway. + // + // * route.transit-gateway-id - The ID of a transit gateway. + // + // * route.origin - Describes how the route was created. CreateRouteTable + // indicates that the route was automatically created when the route table + // was created; CreateRoute indicates that the route was manually added to + // the route table; EnableVgwRoutePropagation indicates that the route was + // propagated by route propagation. + // + // * route.state - The state of a route in the route table (active | blackhole). + // The blackhole state indicates that the route's target isn't available + // (for example, the specified gateway isn't attached to the VPC, the specified + // NAT instance has been terminated, and so on). + // + // * route.vpc-peering-connection-id - The ID of a VPC peering connection + // specified in a route in the table. + // + // * 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. + // + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. + // + // * transit-gateway-id - The ID of a transit gateway. + // + // * vpc-id - The ID of the VPC for the route table. + 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 call with the returned NextToken value. This + // value can be between 5 and 100. + MaxResults *int64 `type:"integer"` + + // The token to retrieve the next page of results. + NextToken *string `type:"string"` + + // One or more route table IDs. + // + // Default: Describes all your route tables. + RouteTableIds []*string `locationName:"RouteTableId" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeRouteTablesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeRouteTablesInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeRouteTablesInput) SetDryRun(v bool) *DescribeRouteTablesInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeRouteTablesInput) SetFilters(v []*Filter) *DescribeRouteTablesInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeRouteTablesInput) SetMaxResults(v int64) *DescribeRouteTablesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeRouteTablesInput) SetNextToken(v string) *DescribeRouteTablesInput { + s.NextToken = &v + return s +} + +// SetRouteTableIds sets the RouteTableIds field's value. +func (s *DescribeRouteTablesInput) SetRouteTableIds(v []*string) *DescribeRouteTablesInput { + s.RouteTableIds = v + return s +} + +// Contains the output of DescribeRouteTables. +type DescribeRouteTablesOutput 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 one or more route tables. + RouteTables []*RouteTable `locationName:"routeTableSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeRouteTablesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeRouteTablesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeRouteTablesOutput) SetNextToken(v string) *DescribeRouteTablesOutput { + s.NextToken = &v + return s +} + +// SetRouteTables sets the RouteTables field's value. +func (s *DescribeRouteTablesOutput) SetRouteTables(v []*RouteTable) *DescribeRouteTablesOutput { + s.RouteTables = v + return s +} + +// Contains the parameters for DescribeScheduledInstanceAvailability. +type DescribeScheduledInstanceAvailabilityInput 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. + // + // * availability-zone - The Availability Zone (for example, us-west-2a). + // + // * instance-type - The instance type (for example, c4.large). + // + // * network-platform - The network platform (EC2-Classic or EC2-VPC). + // + // * platform - The platform (Linux/UNIX or Windows). + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The time period for the first schedule to start. + // + // FirstSlotStartTimeRange is a required field + FirstSlotStartTimeRange *SlotDateTimeRangeRequest `type:"structure" required:"true"` + + // The maximum number of results to return in a single call. This value can + // be between 5 and 300. The default value is 300. To retrieve the remaining + // results, make another call with the returned NextToken value. + MaxResults *int64 `type:"integer"` + + // The maximum available duration, in hours. This value must be greater than + // MinSlotDurationInHours and less than 1,720. + MaxSlotDurationInHours *int64 `type:"integer"` + + // The minimum available duration, in hours. The minimum required duration is + // 1,200 hours per year. For example, the minimum daily schedule is 4 hours, + // the minimum weekly schedule is 24 hours, and the minimum monthly schedule + // is 100 hours. + MinSlotDurationInHours *int64 `type:"integer"` + + // The token for the next set of results. + NextToken *string `type:"string"` + + // The schedule recurrence. + // + // Recurrence is a required field + Recurrence *ScheduledInstanceRecurrenceRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DescribeScheduledInstanceAvailabilityInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeScheduledInstanceAvailabilityInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeScheduledInstanceAvailabilityInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeScheduledInstanceAvailabilityInput"} + if s.FirstSlotStartTimeRange == nil { + invalidParams.Add(request.NewErrParamRequired("FirstSlotStartTimeRange")) + } + if s.Recurrence == nil { + invalidParams.Add(request.NewErrParamRequired("Recurrence")) + } + if s.FirstSlotStartTimeRange != nil { + if err := s.FirstSlotStartTimeRange.Validate(); err != nil { + invalidParams.AddNested("FirstSlotStartTimeRange", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeScheduledInstanceAvailabilityInput) SetDryRun(v bool) *DescribeScheduledInstanceAvailabilityInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeScheduledInstanceAvailabilityInput) SetFilters(v []*Filter) *DescribeScheduledInstanceAvailabilityInput { + s.Filters = v + return s +} + +// SetFirstSlotStartTimeRange sets the FirstSlotStartTimeRange field's value. +func (s *DescribeScheduledInstanceAvailabilityInput) SetFirstSlotStartTimeRange(v *SlotDateTimeRangeRequest) *DescribeScheduledInstanceAvailabilityInput { + s.FirstSlotStartTimeRange = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeScheduledInstanceAvailabilityInput) SetMaxResults(v int64) *DescribeScheduledInstanceAvailabilityInput { + s.MaxResults = &v + return s +} + +// SetMaxSlotDurationInHours sets the MaxSlotDurationInHours field's value. +func (s *DescribeScheduledInstanceAvailabilityInput) SetMaxSlotDurationInHours(v int64) *DescribeScheduledInstanceAvailabilityInput { + s.MaxSlotDurationInHours = &v + return s +} + +// SetMinSlotDurationInHours sets the MinSlotDurationInHours field's value. +func (s *DescribeScheduledInstanceAvailabilityInput) SetMinSlotDurationInHours(v int64) *DescribeScheduledInstanceAvailabilityInput { + s.MinSlotDurationInHours = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeScheduledInstanceAvailabilityInput) SetNextToken(v string) *DescribeScheduledInstanceAvailabilityInput { + s.NextToken = &v + return s +} + +// SetRecurrence sets the Recurrence field's value. +func (s *DescribeScheduledInstanceAvailabilityInput) SetRecurrence(v *ScheduledInstanceRecurrenceRequest) *DescribeScheduledInstanceAvailabilityInput { + s.Recurrence = v + return s +} + +// Contains the output of DescribeScheduledInstanceAvailability. +type DescribeScheduledInstanceAvailabilityOutput struct { + _ struct{} `type:"structure"` + + // The token required to retrieve the next set of results. This value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + + // Information about the available Scheduled Instances. + ScheduledInstanceAvailabilitySet []*ScheduledInstanceAvailability `locationName:"scheduledInstanceAvailabilitySet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeScheduledInstanceAvailabilityOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeScheduledInstanceAvailabilityOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeScheduledInstanceAvailabilityOutput) SetNextToken(v string) *DescribeScheduledInstanceAvailabilityOutput { + s.NextToken = &v + return s +} + +// SetScheduledInstanceAvailabilitySet sets the ScheduledInstanceAvailabilitySet field's value. +func (s *DescribeScheduledInstanceAvailabilityOutput) SetScheduledInstanceAvailabilitySet(v []*ScheduledInstanceAvailability) *DescribeScheduledInstanceAvailabilityOutput { + s.ScheduledInstanceAvailabilitySet = v + return s +} + +// Contains the parameters for DescribeScheduledInstances. +type DescribeScheduledInstancesInput 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. + // + // * availability-zone - The Availability Zone (for example, us-west-2a). + // + // * instance-type - The instance type (for example, c4.large). + // + // * network-platform - The network platform (EC2-Classic or EC2-VPC). + // + // * platform - The platform (Linux/UNIX or Windows). + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The maximum number of results to return in a single call. This value can + // be between 5 and 300. The default value is 100. To retrieve the remaining + // results, make another call with the returned NextToken value. + MaxResults *int64 `type:"integer"` + + // The token for the next set of results. + NextToken *string `type:"string"` + + // One or more Scheduled Instance IDs. + ScheduledInstanceIds []*string `locationName:"ScheduledInstanceId" locationNameList:"ScheduledInstanceId" type:"list"` + + // The time period for the first schedule to start. + SlotStartTimeRange *SlotStartTimeRangeRequest `type:"structure"` +} + +// String returns the string representation +func (s DescribeScheduledInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeScheduledInstancesInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeScheduledInstancesInput) SetDryRun(v bool) *DescribeScheduledInstancesInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeScheduledInstancesInput) SetFilters(v []*Filter) *DescribeScheduledInstancesInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeScheduledInstancesInput) SetMaxResults(v int64) *DescribeScheduledInstancesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeScheduledInstancesInput) SetNextToken(v string) *DescribeScheduledInstancesInput { + s.NextToken = &v + return s +} + +// SetScheduledInstanceIds sets the ScheduledInstanceIds field's value. +func (s *DescribeScheduledInstancesInput) SetScheduledInstanceIds(v []*string) *DescribeScheduledInstancesInput { + s.ScheduledInstanceIds = v + return s +} + +// SetSlotStartTimeRange sets the SlotStartTimeRange field's value. +func (s *DescribeScheduledInstancesInput) SetSlotStartTimeRange(v *SlotStartTimeRangeRequest) *DescribeScheduledInstancesInput { + s.SlotStartTimeRange = v + return s +} + +// Contains the output of DescribeScheduledInstances. +type DescribeScheduledInstancesOutput struct { + _ struct{} `type:"structure"` + + // The token required to retrieve the next set of results. This value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + + // Information about the Scheduled Instances. + ScheduledInstanceSet []*ScheduledInstance `locationName:"scheduledInstanceSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeScheduledInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeScheduledInstancesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeScheduledInstancesOutput) SetNextToken(v string) *DescribeScheduledInstancesOutput { + s.NextToken = &v + return s +} + +// SetScheduledInstanceSet sets the ScheduledInstanceSet field's value. +func (s *DescribeScheduledInstancesOutput) SetScheduledInstanceSet(v []*ScheduledInstance) *DescribeScheduledInstancesOutput { + s.ScheduledInstanceSet = v + return s +} + +type DescribeSecurityGroupReferencesInput 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 security group IDs in your account. + // + // GroupId is a required field + GroupId []*string `locationNameList:"item" type:"list" required:"true"` +} + +// String returns the string representation +func (s DescribeSecurityGroupReferencesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSecurityGroupReferencesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeSecurityGroupReferencesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeSecurityGroupReferencesInput"} + if s.GroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeSecurityGroupReferencesInput) SetDryRun(v bool) *DescribeSecurityGroupReferencesInput { + s.DryRun = &v + return s +} + +// SetGroupId sets the GroupId field's value. +func (s *DescribeSecurityGroupReferencesInput) SetGroupId(v []*string) *DescribeSecurityGroupReferencesInput { + s.GroupId = v + return s +} + +type DescribeSecurityGroupReferencesOutput struct { + _ struct{} `type:"structure"` + + // Information about the VPCs with the referencing security groups. + SecurityGroupReferenceSet []*SecurityGroupReference `locationName:"securityGroupReferenceSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeSecurityGroupReferencesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSecurityGroupReferencesOutput) GoString() string { + return s.String() +} + +// SetSecurityGroupReferenceSet sets the SecurityGroupReferenceSet field's value. +func (s *DescribeSecurityGroupReferencesOutput) SetSecurityGroupReferenceSet(v []*SecurityGroupReference) *DescribeSecurityGroupReferencesOutput { + s.SecurityGroupReferenceSet = v + return s +} + +type DescribeSecurityGroupsInput 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 `locationName:"dryRun" type:"boolean"` + + // One or more filters. If using multiple filters for rules, the results include + // security groups for which any combination of rules - not necessarily a single + // rule - match all filters. + // + // * description - The description of the security group. + // + // * egress.ip-permission.cidr - An IPv4 CIDR block for an outbound security + // group rule. + // + // * egress.ip-permission.from-port - For an outbound rule, the start of + // port range for the TCP and UDP protocols, or an ICMP type number. + // + // * egress.ip-permission.group-id - The ID of a security group that has + // 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. + // + // * egress.ip-permission.ipv6-cidr - An IPv6 CIDR block for an outbound + // security group rule. + // + // * egress.ip-permission.prefix-list-id - The ID (prefix) of the AWS service + // to which 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). + // + // * 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. + // + // * group-id - The ID of the security group. + // + // * group-name - The name of the security group. + // + // * ip-permission.cidr - An IPv4 CIDR block for an inbound security group + // rule. + // + // * ip-permission.from-port - For an inbound rule, the start of port range + // for the TCP and UDP protocols, or an ICMP type number. + // + // * 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.ipv6-cidr - An IPv6 CIDR block for an inbound security + // group rule. + // + // * ip-permission.prefix-list-id - The ID (prefix) of the AWS service from + // which a 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). + // + // * 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. + // + // * owner-id - The AWS 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. + // 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. + // + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. + // + // * vpc-id - The ID of the VPC specified when the security group was created. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // One or more security group IDs. Required for security groups in a nondefault + // VPC. + // + // Default: Describes all your security groups. + GroupIds []*string `locationName:"GroupId" locationNameList:"groupId" type:"list"` + + // [EC2-Classic and default VPC only] One or more security group names. You + // can specify either the security group name or the security group ID. For + // security groups in a nondefault VPC, use the group-name filter to describe + // security groups by name. + // + // Default: Describes all 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 + // 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 `type:"integer"` + + // The token to request the next page of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeSecurityGroupsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSecurityGroupsInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeSecurityGroupsInput) SetDryRun(v bool) *DescribeSecurityGroupsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeSecurityGroupsInput) SetFilters(v []*Filter) *DescribeSecurityGroupsInput { + s.Filters = v + return s +} + +// SetGroupIds sets the GroupIds field's value. +func (s *DescribeSecurityGroupsInput) SetGroupIds(v []*string) *DescribeSecurityGroupsInput { + s.GroupIds = v + return s +} + +// SetGroupNames sets the GroupNames field's value. +func (s *DescribeSecurityGroupsInput) SetGroupNames(v []*string) *DescribeSecurityGroupsInput { + s.GroupNames = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeSecurityGroupsInput) SetMaxResults(v int64) *DescribeSecurityGroupsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeSecurityGroupsInput) SetNextToken(v string) *DescribeSecurityGroupsInput { + s.NextToken = &v + return s +} + +type DescribeSecurityGroupsOutput 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 one or more security groups. + SecurityGroups []*SecurityGroup `locationName:"securityGroupInfo" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeSecurityGroupsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSecurityGroupsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeSecurityGroupsOutput) SetNextToken(v string) *DescribeSecurityGroupsOutput { + s.NextToken = &v + return s +} + +// SetSecurityGroups sets the SecurityGroups field's value. +func (s *DescribeSecurityGroupsOutput) SetSecurityGroups(v []*SecurityGroup) *DescribeSecurityGroupsOutput { + s.SecurityGroups = v + return s +} + +// Contains the parameters for DescribeSnapshotAttribute. +type DescribeSnapshotAttributeInput struct { + _ struct{} `type:"structure"` + + // The snapshot attribute you would like to view. + // + // Attribute is a required field + Attribute *string `type:"string" required:"true" enum:"SnapshotAttributeName"` + + // 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 `locationName:"dryRun" type:"boolean"` + + // The ID of the EBS snapshot. + // + // SnapshotId is a required field + SnapshotId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeSnapshotAttributeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSnapshotAttributeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeSnapshotAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeSnapshotAttributeInput"} + if s.Attribute == nil { + invalidParams.Add(request.NewErrParamRequired("Attribute")) + } + if s.SnapshotId == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAttribute sets the Attribute field's value. +func (s *DescribeSnapshotAttributeInput) SetAttribute(v string) *DescribeSnapshotAttributeInput { + s.Attribute = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeSnapshotAttributeInput) SetDryRun(v bool) *DescribeSnapshotAttributeInput { + s.DryRun = &v + return s +} + +// SetSnapshotId sets the SnapshotId field's value. +func (s *DescribeSnapshotAttributeInput) SetSnapshotId(v string) *DescribeSnapshotAttributeInput { + s.SnapshotId = &v + return s +} + +// Contains the output of DescribeSnapshotAttribute. +type DescribeSnapshotAttributeOutput struct { + _ struct{} `type:"structure"` + + // A list of permissions for creating volumes from the snapshot. + CreateVolumePermissions []*CreateVolumePermission `locationName:"createVolumePermission" locationNameList:"item" type:"list"` + + // A list of product codes. + ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` + + // The ID of the EBS snapshot. + SnapshotId *string `locationName:"snapshotId" type:"string"` +} + +// String returns the string representation +func (s DescribeSnapshotAttributeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSnapshotAttributeOutput) GoString() string { + return s.String() +} + +// SetCreateVolumePermissions sets the CreateVolumePermissions field's value. +func (s *DescribeSnapshotAttributeOutput) SetCreateVolumePermissions(v []*CreateVolumePermission) *DescribeSnapshotAttributeOutput { + s.CreateVolumePermissions = v + return s +} + +// SetProductCodes sets the ProductCodes field's value. +func (s *DescribeSnapshotAttributeOutput) SetProductCodes(v []*ProductCode) *DescribeSnapshotAttributeOutput { + s.ProductCodes = v + return s +} + +// SetSnapshotId sets the SnapshotId field's value. +func (s *DescribeSnapshotAttributeOutput) SetSnapshotId(v string) *DescribeSnapshotAttributeOutput { + s.SnapshotId = &v + return s +} + +// Contains the parameters for DescribeSnapshots. +type DescribeSnapshotsInput 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 `locationName:"dryRun" type:"boolean"` + + // One or more filters. + // + // * description - A description of the snapshot. + // + // * owner-alias - Value from an Amazon-maintained list (amazon | aws-marketplace + // | microsoft) of snapshot owners. Not to be confused with the user-configured + // AWS account alias, which is set from the IAM console. + // + // * owner-id - The ID of the AWS account that owns the snapshot. + // + // * progress - The progress of the snapshot, as a percentage (for example, + // 80%). + // + // * snapshot-id - The snapshot ID. + // + // * start-time - The time stamp when the snapshot was initiated. + // + // * status - The status of the snapshot (pending | completed | error). + // + // * 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. + // + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. + // + // * volume-id - The ID of the volume the snapshot is for. + // + // * volume-size - The size of the volume, in GiB. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The maximum number of snapshot results returned by DescribeSnapshots in paginated + // output. When this parameter is used, DescribeSnapshots only returns MaxResults + // results in a single page along with a NextToken response element. The remaining + // results of the initial request can be seen by sending another DescribeSnapshots + // request with the returned NextToken value. This value can be between 5 and + // 1000; if MaxResults is given a value larger than 1000, only 1000 results + // are returned. If this parameter is not used, then DescribeSnapshots returns + // all results. You cannot specify this parameter and the snapshot IDs parameter + // in the same request. + MaxResults *int64 `type:"integer"` + + // The NextToken value returned from a previous paginated DescribeSnapshots + // request where MaxResults was used and the results exceeded the value of that + // parameter. Pagination continues from the end of the previous results that + // returned the NextToken value. This value is null when there are no more results + // to return. + NextToken *string `type:"string"` + + // Returns the snapshots owned by the specified owner. Multiple owners can be + // specified. + OwnerIds []*string `locationName:"Owner" locationNameList:"Owner" type:"list"` + + // One or more AWS accounts IDs that can create volumes from the snapshot. + RestorableByUserIds []*string `locationName:"RestorableBy" type:"list"` + + // One or more snapshot IDs. + // + // Default: Describes snapshots for which you have launch permissions. + SnapshotIds []*string `locationName:"SnapshotId" locationNameList:"SnapshotId" type:"list"` +} + +// String returns the string representation +func (s DescribeSnapshotsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSnapshotsInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeSnapshotsInput) SetDryRun(v bool) *DescribeSnapshotsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeSnapshotsInput) SetFilters(v []*Filter) *DescribeSnapshotsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeSnapshotsInput) SetMaxResults(v int64) *DescribeSnapshotsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeSnapshotsInput) SetNextToken(v string) *DescribeSnapshotsInput { + s.NextToken = &v + return s +} + +// SetOwnerIds sets the OwnerIds field's value. +func (s *DescribeSnapshotsInput) SetOwnerIds(v []*string) *DescribeSnapshotsInput { + s.OwnerIds = v + return s +} + +// SetRestorableByUserIds sets the RestorableByUserIds field's value. +func (s *DescribeSnapshotsInput) SetRestorableByUserIds(v []*string) *DescribeSnapshotsInput { + s.RestorableByUserIds = v + return s +} + +// SetSnapshotIds sets the SnapshotIds field's value. +func (s *DescribeSnapshotsInput) SetSnapshotIds(v []*string) *DescribeSnapshotsInput { + s.SnapshotIds = v + return s +} + +// Contains the output of DescribeSnapshots. +type DescribeSnapshotsOutput struct { + _ struct{} `type:"structure"` + + // The NextToken value to include in a future DescribeSnapshots request. When + // the results of a DescribeSnapshots request exceed MaxResults, this value + // can be used to retrieve the next page of results. This value is null when + // there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + + // Information about the snapshots. + Snapshots []*Snapshot `locationName:"snapshotSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeSnapshotsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSnapshotsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeSnapshotsOutput) SetNextToken(v string) *DescribeSnapshotsOutput { + s.NextToken = &v + return s +} + +// SetSnapshots sets the Snapshots field's value. +func (s *DescribeSnapshotsOutput) SetSnapshots(v []*Snapshot) *DescribeSnapshotsOutput { + s.Snapshots = v + return s +} + +// Contains the parameters for DescribeSpotDatafeedSubscription. +type DescribeSpotDatafeedSubscriptionInput 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 `locationName:"dryRun" type:"boolean"` +} + +// String returns the string representation +func (s DescribeSpotDatafeedSubscriptionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSpotDatafeedSubscriptionInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeSpotDatafeedSubscriptionInput) SetDryRun(v bool) *DescribeSpotDatafeedSubscriptionInput { + s.DryRun = &v + return s +} + +// Contains the output of DescribeSpotDatafeedSubscription. +type DescribeSpotDatafeedSubscriptionOutput struct { + _ struct{} `type:"structure"` + + // The Spot Instance data feed subscription. + SpotDatafeedSubscription *SpotDatafeedSubscription `locationName:"spotDatafeedSubscription" type:"structure"` +} + +// String returns the string representation +func (s DescribeSpotDatafeedSubscriptionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSpotDatafeedSubscriptionOutput) GoString() string { + return s.String() +} + +// SetSpotDatafeedSubscription sets the SpotDatafeedSubscription field's value. +func (s *DescribeSpotDatafeedSubscriptionOutput) SetSpotDatafeedSubscription(v *SpotDatafeedSubscription) *DescribeSpotDatafeedSubscriptionOutput { + s.SpotDatafeedSubscription = v + return s +} + +// Contains the parameters for DescribeSpotFleetInstances. +type DescribeSpotFleetInstancesInput 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 `locationName:"dryRun" type:"boolean"` + + // The maximum number of results to return in a single call. Specify a value + // between 1 and 1000. The default value is 1000. To retrieve the remaining + // results, make another call with the returned NextToken value. + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // The token for the next set of results. + NextToken *string `locationName:"nextToken" type:"string"` + + // The ID of the Spot Fleet request. + // + // SpotFleetRequestId is a required field + SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeSpotFleetInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSpotFleetInstancesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeSpotFleetInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeSpotFleetInstancesInput"} + if s.SpotFleetRequestId == nil { + invalidParams.Add(request.NewErrParamRequired("SpotFleetRequestId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeSpotFleetInstancesInput) SetDryRun(v bool) *DescribeSpotFleetInstancesInput { + s.DryRun = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeSpotFleetInstancesInput) SetMaxResults(v int64) *DescribeSpotFleetInstancesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeSpotFleetInstancesInput) SetNextToken(v string) *DescribeSpotFleetInstancesInput { + s.NextToken = &v + return s +} + +// SetSpotFleetRequestId sets the SpotFleetRequestId field's value. +func (s *DescribeSpotFleetInstancesInput) SetSpotFleetRequestId(v string) *DescribeSpotFleetInstancesInput { + s.SpotFleetRequestId = &v + return s +} + +// Contains the output of DescribeSpotFleetInstances. +type DescribeSpotFleetInstancesOutput struct { + _ struct{} `type:"structure"` + + // The running instances. This list is refreshed periodically and might be out + // of date. + ActiveInstances []*ActiveInstance `locationName:"activeInstanceSet" locationNameList:"item" type:"list"` + + // The token required to retrieve the next set of results. This value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + + // The ID of the Spot Fleet request. + SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string"` +} + +// String returns the string representation +func (s DescribeSpotFleetInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSpotFleetInstancesOutput) GoString() string { + return s.String() +} + +// SetActiveInstances sets the ActiveInstances field's value. +func (s *DescribeSpotFleetInstancesOutput) SetActiveInstances(v []*ActiveInstance) *DescribeSpotFleetInstancesOutput { + s.ActiveInstances = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeSpotFleetInstancesOutput) SetNextToken(v string) *DescribeSpotFleetInstancesOutput { + s.NextToken = &v + return s +} + +// SetSpotFleetRequestId sets the SpotFleetRequestId field's value. +func (s *DescribeSpotFleetInstancesOutput) SetSpotFleetRequestId(v string) *DescribeSpotFleetInstancesOutput { + s.SpotFleetRequestId = &v + return s +} + +// Contains the parameters for DescribeSpotFleetRequestHistory. +type DescribeSpotFleetRequestHistoryInput 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 `locationName:"dryRun" type:"boolean"` + + // The type of events to describe. By default, all events are described. + EventType *string `locationName:"eventType" type:"string" enum:"EventType"` + + // The maximum number of results to return in a single call. Specify a value + // between 1 and 1000. The default value is 1000. To retrieve the remaining + // results, make another call with the returned NextToken value. + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // The token for the next set of results. + NextToken *string `locationName:"nextToken" type:"string"` + + // The ID of the Spot Fleet request. + // + // SpotFleetRequestId is a required field + SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"` + + // The starting date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + // + // StartTime is a required field + StartTime *time.Time `locationName:"startTime" type:"timestamp" required:"true"` +} + +// String returns the string representation +func (s DescribeSpotFleetRequestHistoryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSpotFleetRequestHistoryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeSpotFleetRequestHistoryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeSpotFleetRequestHistoryInput"} + if s.SpotFleetRequestId == nil { + invalidParams.Add(request.NewErrParamRequired("SpotFleetRequestId")) + } + if s.StartTime == nil { + invalidParams.Add(request.NewErrParamRequired("StartTime")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeSpotFleetRequestHistoryInput) SetDryRun(v bool) *DescribeSpotFleetRequestHistoryInput { + s.DryRun = &v + return s +} + +// SetEventType sets the EventType field's value. +func (s *DescribeSpotFleetRequestHistoryInput) SetEventType(v string) *DescribeSpotFleetRequestHistoryInput { + s.EventType = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeSpotFleetRequestHistoryInput) SetMaxResults(v int64) *DescribeSpotFleetRequestHistoryInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeSpotFleetRequestHistoryInput) SetNextToken(v string) *DescribeSpotFleetRequestHistoryInput { + s.NextToken = &v + return s +} + +// SetSpotFleetRequestId sets the SpotFleetRequestId field's value. +func (s *DescribeSpotFleetRequestHistoryInput) SetSpotFleetRequestId(v string) *DescribeSpotFleetRequestHistoryInput { + s.SpotFleetRequestId = &v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *DescribeSpotFleetRequestHistoryInput) SetStartTime(v time.Time) *DescribeSpotFleetRequestHistoryInput { + s.StartTime = &v + return s +} + +// Contains the output of DescribeSpotFleetRequestHistory. +type DescribeSpotFleetRequestHistoryOutput struct { + _ struct{} `type:"structure"` + + // Information about the events in the history of the Spot Fleet request. + HistoryRecords []*HistoryRecord `locationName:"historyRecordSet" locationNameList:"item" type:"list"` + + // The last date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + // All records up to this time were retrieved. + // + // If nextToken indicates that there are more results, this value is not present. + LastEvaluatedTime *time.Time `locationName:"lastEvaluatedTime" type:"timestamp"` + + // The token required to retrieve the next set of results. This value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + + // The ID of the Spot Fleet request. + SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string"` + + // The starting date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + StartTime *time.Time `locationName:"startTime" type:"timestamp"` +} + +// String returns the string representation +func (s DescribeSpotFleetRequestHistoryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSpotFleetRequestHistoryOutput) GoString() string { + return s.String() +} + +// SetHistoryRecords sets the HistoryRecords field's value. +func (s *DescribeSpotFleetRequestHistoryOutput) SetHistoryRecords(v []*HistoryRecord) *DescribeSpotFleetRequestHistoryOutput { + s.HistoryRecords = v + return s +} + +// SetLastEvaluatedTime sets the LastEvaluatedTime field's value. +func (s *DescribeSpotFleetRequestHistoryOutput) SetLastEvaluatedTime(v time.Time) *DescribeSpotFleetRequestHistoryOutput { + s.LastEvaluatedTime = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeSpotFleetRequestHistoryOutput) SetNextToken(v string) *DescribeSpotFleetRequestHistoryOutput { + s.NextToken = &v + return s +} + +// SetSpotFleetRequestId sets the SpotFleetRequestId field's value. +func (s *DescribeSpotFleetRequestHistoryOutput) SetSpotFleetRequestId(v string) *DescribeSpotFleetRequestHistoryOutput { + s.SpotFleetRequestId = &v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *DescribeSpotFleetRequestHistoryOutput) SetStartTime(v time.Time) *DescribeSpotFleetRequestHistoryOutput { + s.StartTime = &v + return s +} + +// Contains the parameters for DescribeSpotFleetRequests. +type DescribeSpotFleetRequestsInput 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 `locationName:"dryRun" type:"boolean"` + + // The maximum number of results to return in a single call. Specify a value + // between 1 and 1000. The default value is 1000. To retrieve the remaining + // results, make another call with the returned NextToken value. + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // The token for the next set of results. + NextToken *string `locationName:"nextToken" type:"string"` + + // The IDs of the Spot Fleet requests. + SpotFleetRequestIds []*string `locationName:"spotFleetRequestId" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeSpotFleetRequestsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSpotFleetRequestsInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeSpotFleetRequestsInput) SetDryRun(v bool) *DescribeSpotFleetRequestsInput { + s.DryRun = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeSpotFleetRequestsInput) SetMaxResults(v int64) *DescribeSpotFleetRequestsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeSpotFleetRequestsInput) SetNextToken(v string) *DescribeSpotFleetRequestsInput { + s.NextToken = &v + return s +} + +// SetSpotFleetRequestIds sets the SpotFleetRequestIds field's value. +func (s *DescribeSpotFleetRequestsInput) SetSpotFleetRequestIds(v []*string) *DescribeSpotFleetRequestsInput { + s.SpotFleetRequestIds = v + return s +} + +// Contains the output of DescribeSpotFleetRequests. +type DescribeSpotFleetRequestsOutput struct { + _ struct{} `type:"structure"` + + // The token required to retrieve the next set of results. This value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + + // Information about the configuration of your Spot Fleet. + SpotFleetRequestConfigs []*SpotFleetRequestConfig `locationName:"spotFleetRequestConfigSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeSpotFleetRequestsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSpotFleetRequestsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeSpotFleetRequestsOutput) SetNextToken(v string) *DescribeSpotFleetRequestsOutput { + s.NextToken = &v + return s +} + +// SetSpotFleetRequestConfigs sets the SpotFleetRequestConfigs field's value. +func (s *DescribeSpotFleetRequestsOutput) SetSpotFleetRequestConfigs(v []*SpotFleetRequestConfig) *DescribeSpotFleetRequestsOutput { + s.SpotFleetRequestConfigs = v + return s +} + +// Contains the parameters for DescribeSpotInstanceRequests. +type DescribeSpotInstanceRequestsInput 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 `locationName:"dryRun" type:"boolean"` + + // One or more filters. + // + // * availability-zone-group - The Availability Zone group. + // + // * create-time - The time stamp when the Spot Instance request was created. + // + // * fault-code - The fault code related to the request. + // + // * fault-message - The fault message related to the request. + // + // * instance-id - The ID of the instance that fulfilled the request. + // + // * launch-group - The Spot Instance launch group. + // + // * launch.block-device-mapping.delete-on-termination - Indicates whether + // the EBS volume is deleted on instance termination. + // + // * launch.block-device-mapping.device-name - The device name for the volume + // in the block device mapping (for example, /dev/sdh or xvdh). + // + // * launch.block-device-mapping.snapshot-id - The ID of the snapshot for + // the EBS volume. + // + // * launch.block-device-mapping.volume-size - The size of the EBS volume, + // in GiB. + // + // * launch.block-device-mapping.volume-type - The type of EBS volume: gp2 + // for General Purpose SSD, io1 for Provisioned IOPS SSD, st1 for Throughput + // Optimized HDD, sc1for Cold HDD, or standard for Magnetic. + // + // * launch.group-id - The ID of the security group for the instance. + // + // * launch.group-name - The name of the security group for the instance. + // + // * launch.image-id - The ID of the AMI. + // + // * launch.instance-type - The type of instance (for example, m3.medium). + // + // * launch.kernel-id - The kernel ID. + // + // * launch.key-name - The name of the key pair the instance launched with. + // + // * launch.monitoring-enabled - Whether detailed monitoring is enabled for + // the Spot Instance. + // + // * launch.ramdisk-id - The RAM disk ID. + // + // * launched-availability-zone - The Availability Zone in which the request + // is launched. + // + // * network-interface.addresses.primary - Indicates whether the IP address + // is the primary private IP address. + // + // * network-interface.delete-on-termination - Indicates whether the network + // interface is deleted when the instance is terminated. + // + // * network-interface.description - A description of the network interface. + // + // * network-interface.device-index - The index of the device for the network + // interface attachment on the instance. + // + // * network-interface.group-id - The ID of the security group associated + // with the network interface. + // + // * network-interface.network-interface-id - The ID of the network interface. + // + // * network-interface.private-ip-address - The primary private IP address + // of the network interface. + // + // * network-interface.subnet-id - The ID of the subnet for the instance. + // + // * product-description - The product description associated with the instance + // (Linux/UNIX | Windows). + // + // * spot-instance-request-id - The Spot Instance request ID. + // + // * spot-price - The maximum hourly price for any Spot Instance launched + // to fulfill the request. + // + // * state - The state of the Spot Instance request (open | active | closed + // | cancelled | failed). Spot request status information can help you track + // your Amazon EC2 Spot Instance requests. For more information, see Spot + // Request Status (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html) + // in the Amazon EC2 User Guide for Linux Instances. + // + // * status-code - The short code describing the most recent evaluation of + // your Spot Instance request. + // + // * status-message - The message explaining the status of the Spot Instance + // request. + // + // * 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. + // + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. + // + // * type - The type of Spot Instance request (one-time | persistent). + // + // * valid-from - The start date of the request. + // + // * valid-until - The end date of the request. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The maximum number of results to return in a single call. Specify a value + // between 5 and 1000. To retrieve the remaining results, make another call + // with the returned NextToken value. + MaxResults *int64 `type:"integer"` + + // The token to request the next set of results. This value is null when there + // are no more results to return. + NextToken *string `type:"string"` + + // One or more Spot Instance request IDs. + SpotInstanceRequestIds []*string `locationName:"SpotInstanceRequestId" locationNameList:"SpotInstanceRequestId" type:"list"` +} + +// String returns the string representation +func (s DescribeSpotInstanceRequestsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSpotInstanceRequestsInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeSpotInstanceRequestsInput) SetDryRun(v bool) *DescribeSpotInstanceRequestsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeSpotInstanceRequestsInput) SetFilters(v []*Filter) *DescribeSpotInstanceRequestsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeSpotInstanceRequestsInput) SetMaxResults(v int64) *DescribeSpotInstanceRequestsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeSpotInstanceRequestsInput) SetNextToken(v string) *DescribeSpotInstanceRequestsInput { + s.NextToken = &v + return s +} + +// SetSpotInstanceRequestIds sets the SpotInstanceRequestIds field's value. +func (s *DescribeSpotInstanceRequestsInput) SetSpotInstanceRequestIds(v []*string) *DescribeSpotInstanceRequestsInput { + s.SpotInstanceRequestIds = v + return s +} + +// Contains the output of DescribeSpotInstanceRequests. +type DescribeSpotInstanceRequestsOutput struct { + _ struct{} `type:"structure"` + + // The token to use to retrieve the next set of results. This value is null + // when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + + // One or more Spot Instance requests. + SpotInstanceRequests []*SpotInstanceRequest `locationName:"spotInstanceRequestSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeSpotInstanceRequestsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSpotInstanceRequestsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeSpotInstanceRequestsOutput) SetNextToken(v string) *DescribeSpotInstanceRequestsOutput { + s.NextToken = &v + return s +} + +// SetSpotInstanceRequests sets the SpotInstanceRequests field's value. +func (s *DescribeSpotInstanceRequestsOutput) SetSpotInstanceRequests(v []*SpotInstanceRequest) *DescribeSpotInstanceRequestsOutput { + s.SpotInstanceRequests = v + return s +} + +// Contains the parameters for DescribeSpotPriceHistory. +type DescribeSpotPriceHistoryInput struct { + _ struct{} `type:"structure"` + + // Filters the results by the specified Availability Zone. + AvailabilityZone *string `locationName:"availabilityZone" 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 `locationName:"dryRun" type:"boolean"` + + // The date and time, up to the current date, from which to stop retrieving + // the price history data, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + EndTime *time.Time `locationName:"endTime" type:"timestamp"` + + // One or more filters. + // + // * availability-zone - The Availability Zone for which prices should be + // returned. + // + // * instance-type - The type of instance (for example, m3.medium). + // + // * product-description - The product description for the Spot price (Linux/UNIX + // | SUSE Linux | Windows | Linux/UNIX (Amazon VPC) | SUSE Linux (Amazon + // VPC) | Windows (Amazon VPC)). + // + // * spot-price - The Spot price. The value must match exactly (or use wildcards; + // greater than or less than comparison is not supported). + // + // * timestamp - The time stamp of the Spot price history, in UTC format + // (for example, YYYY-MM-DDTHH:MM:SSZ). You can use wildcards (* and ?). + // Greater than or less than comparison is not supported. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // Filters the results by the specified instance types. + InstanceTypes []*string `locationName:"InstanceType" type:"list"` + + // The maximum number of results to return in a single call. Specify a value + // between 1 and 1000. The default value is 1000. To retrieve the remaining + // results, make another call with the returned NextToken value. + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // The token for the next set of results. + NextToken *string `locationName:"nextToken" type:"string"` + + // Filters the results by the specified basic product descriptions. + ProductDescriptions []*string `locationName:"ProductDescription" type:"list"` + + // The date and time, up to the past 90 days, from which to start retrieving + // the price history data, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + StartTime *time.Time `locationName:"startTime" type:"timestamp"` +} + +// String returns the string representation +func (s DescribeSpotPriceHistoryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSpotPriceHistoryInput) GoString() string { + return s.String() +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *DescribeSpotPriceHistoryInput) SetAvailabilityZone(v string) *DescribeSpotPriceHistoryInput { + s.AvailabilityZone = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeSpotPriceHistoryInput) SetDryRun(v bool) *DescribeSpotPriceHistoryInput { + s.DryRun = &v + return s +} + +// SetEndTime sets the EndTime field's value. +func (s *DescribeSpotPriceHistoryInput) SetEndTime(v time.Time) *DescribeSpotPriceHistoryInput { + s.EndTime = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeSpotPriceHistoryInput) SetFilters(v []*Filter) *DescribeSpotPriceHistoryInput { + s.Filters = v + return s +} + +// SetInstanceTypes sets the InstanceTypes field's value. +func (s *DescribeSpotPriceHistoryInput) SetInstanceTypes(v []*string) *DescribeSpotPriceHistoryInput { + s.InstanceTypes = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeSpotPriceHistoryInput) SetMaxResults(v int64) *DescribeSpotPriceHistoryInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeSpotPriceHistoryInput) SetNextToken(v string) *DescribeSpotPriceHistoryInput { + s.NextToken = &v + return s +} + +// SetProductDescriptions sets the ProductDescriptions field's value. +func (s *DescribeSpotPriceHistoryInput) SetProductDescriptions(v []*string) *DescribeSpotPriceHistoryInput { + s.ProductDescriptions = v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *DescribeSpotPriceHistoryInput) SetStartTime(v time.Time) *DescribeSpotPriceHistoryInput { + s.StartTime = &v + return s +} + +// Contains the output of DescribeSpotPriceHistory. +type DescribeSpotPriceHistoryOutput struct { + _ struct{} `type:"structure"` + + // The token required to retrieve the next set of results. This value is null + // or an empty string when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + + // The historical Spot prices. + SpotPriceHistory []*SpotPrice `locationName:"spotPriceHistorySet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeSpotPriceHistoryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSpotPriceHistoryOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeSpotPriceHistoryOutput) SetNextToken(v string) *DescribeSpotPriceHistoryOutput { + s.NextToken = &v + return s +} + +// SetSpotPriceHistory sets the SpotPriceHistory field's value. +func (s *DescribeSpotPriceHistoryOutput) SetSpotPriceHistory(v []*SpotPrice) *DescribeSpotPriceHistoryOutput { + s.SpotPriceHistory = v + return s +} + +type DescribeStaleSecurityGroupsInput 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 maximum number of items to return for this request. The request returns + // a token that you can specify in a subsequent call to get the next set of + // results. + MaxResults *int64 `min:"5" type:"integer"` + + // The token for the next set of items to return. (You received this token from + // a prior call.) + NextToken *string `min:"1" type:"string"` + + // The ID of the VPC. + // + // VpcId is a required field + VpcId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeStaleSecurityGroupsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeStaleSecurityGroupsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeStaleSecurityGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeStaleSecurityGroupsInput"} + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeStaleSecurityGroupsInput) SetDryRun(v bool) *DescribeStaleSecurityGroupsInput { + s.DryRun = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeStaleSecurityGroupsInput) SetMaxResults(v int64) *DescribeStaleSecurityGroupsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeStaleSecurityGroupsInput) SetNextToken(v string) *DescribeStaleSecurityGroupsInput { + s.NextToken = &v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *DescribeStaleSecurityGroupsInput) SetVpcId(v string) *DescribeStaleSecurityGroupsInput { + s.VpcId = &v + return s +} + +type DescribeStaleSecurityGroupsOutput struct { + _ struct{} `type:"structure"` + + // The token to use when requesting the next set of items. If there are no additional + // items to return, the string is empty. + NextToken *string `locationName:"nextToken" type:"string"` + + // Information about the stale security groups. + StaleSecurityGroupSet []*StaleSecurityGroup `locationName:"staleSecurityGroupSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeStaleSecurityGroupsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeStaleSecurityGroupsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeStaleSecurityGroupsOutput) SetNextToken(v string) *DescribeStaleSecurityGroupsOutput { + s.NextToken = &v + return s +} + +// SetStaleSecurityGroupSet sets the StaleSecurityGroupSet field's value. +func (s *DescribeStaleSecurityGroupsOutput) SetStaleSecurityGroupSet(v []*StaleSecurityGroup) *DescribeStaleSecurityGroupsOutput { + s.StaleSecurityGroupSet = v + return s +} + +type DescribeSubnetsInput 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 `locationName:"dryRun" type:"boolean"` + + // One or more filters. + // + // * availability-zone - The Availability Zone for the subnet. You can also + // use availabilityZone as the filter name. + // + // * availability-zone-id - The ID of the Availability Zone for the subnet. + // You can also use availabilityZoneId as the filter name. + // + // * available-ip-address-count - The number of IPv4 addresses in the subnet + // that are available. + // + // * cidr-block - The IPv4 CIDR block of the subnet. The CIDR block you specify + // must exactly match the subnet's CIDR block for information to be returned + // for the subnet. You can also use cidr or cidrBlock as the filter names. + // + // * default-for-az - Indicates whether this is the default subnet for the + // Availability Zone. You can also use defaultForAz as the filter name. + // + // * ipv6-cidr-block-association.ipv6-cidr-block - An IPv6 CIDR block associated + // with the subnet. + // + // * ipv6-cidr-block-association.association-id - An association ID for an + // IPv6 CIDR block associated with the subnet. + // + // * ipv6-cidr-block-association.state - The state of an IPv6 CIDR block + // associated with the subnet. + // + // * owner-id - The ID of the AWS account that owns the subnet. + // + // * state - The state of the subnet (pending | available). + // + // * subnet-arn - The Amazon Resource Name (ARN) of the subnet. + // + // * subnet-id - The ID of the subnet. + // + // * 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. + // + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. + // + // * vpc-id - The ID of the VPC for the subnet. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // One or more subnet IDs. + // + // Default: Describes all your subnets. + SubnetIds []*string `locationName:"SubnetId" locationNameList:"SubnetId" type:"list"` +} + +// String returns the string representation +func (s DescribeSubnetsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSubnetsInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeSubnetsInput) SetDryRun(v bool) *DescribeSubnetsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeSubnetsInput) SetFilters(v []*Filter) *DescribeSubnetsInput { + s.Filters = v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *DescribeSubnetsInput) SetSubnetIds(v []*string) *DescribeSubnetsInput { + s.SubnetIds = v + return s +} + +type DescribeSubnetsOutput struct { + _ struct{} `type:"structure"` + + // Information about one or more subnets. + Subnets []*Subnet `locationName:"subnetSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeSubnetsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSubnetsOutput) GoString() string { + return s.String() +} + +// SetSubnets sets the Subnets field's value. +func (s *DescribeSubnetsOutput) SetSubnets(v []*Subnet) *DescribeSubnetsOutput { + s.Subnets = v + return s +} + +type DescribeTagsInput 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 `locationName:"dryRun" type:"boolean"` + + // One or more filters. + // + // * key - The tag key. + // + // * resource-id - The ID of the resource. + // + // * resource-type - The resource type (customer-gateway | dedicated-host + // | dhcp-options | elastic-ip | fleet | fpga-image | image | instance | + // internet-gateway | launch-template | natgateway | network-acl | network-interface + // | reserved-instances | route-table | security-group | snapshot | spot-instances-request + // | subnet | volume | vpc | vpc-peering-connection | vpn-connection | vpn-gateway). + // + // * tag: - The key/value combination of the tag. For example, specify + // "tag:Owner" for the filter name and "TeamA" for the filter value to find + // resources with the tag "Owner=TeamA". + // + // * value - The tag value. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The maximum number of results to return in a single call. This value can + // be between 5 and 1000. To retrieve the remaining results, make another call + // with the returned NextToken value. + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // The token to retrieve the next page of results. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s DescribeTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTagsInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeTagsInput) SetDryRun(v bool) *DescribeTagsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeTagsInput) SetFilters(v []*Filter) *DescribeTagsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeTagsInput) SetMaxResults(v int64) *DescribeTagsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeTagsInput) SetNextToken(v string) *DescribeTagsInput { + s.NextToken = &v + return s +} + +type DescribeTagsOutput 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 tags. + Tags []*TagDescription `locationName:"tagSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTagsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeTagsOutput) SetNextToken(v string) *DescribeTagsOutput { + s.NextToken = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *DescribeTagsOutput) SetTags(v []*TagDescription) *DescribeTagsOutput { + s.Tags = v + return s +} + +type DescribeTransitGatewayAttachmentsInput 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: + // + // * association.transit-gateway-route-table-id - The ID of the route table + // for the transit gateway. + // + // * association.state - The state of the association (associating | associated + // | disassociating). + // + // * resource-id - The ID of the resource. + // + // * resource-owner - The ID of the AWS account that owns the resource. + // + // * resource-type - The resource type (vpc | vpn). + // + // * state - The state of the attachment (pendingAcceptance | pending | available + // | modifying | deleting | deleted | failed | rejected). + // + // * transit-gateway-attachment-id - The ID of the attachment. + // + // * transit-gateway-id - The ID of the transit gateway. + // + // * transit-gateway-owner - The ID of the AWS account that owns the transit + // gateway. + 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 DescribeTransitGatewayAttachmentsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTransitGatewayAttachmentsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTransitGatewayAttachmentsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTransitGatewayAttachmentsInput"} + 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 *DescribeTransitGatewayAttachmentsInput) SetDryRun(v bool) *DescribeTransitGatewayAttachmentsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeTransitGatewayAttachmentsInput) SetFilters(v []*Filter) *DescribeTransitGatewayAttachmentsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeTransitGatewayAttachmentsInput) SetMaxResults(v int64) *DescribeTransitGatewayAttachmentsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeTransitGatewayAttachmentsInput) SetNextToken(v string) *DescribeTransitGatewayAttachmentsInput { + s.NextToken = &v + return s +} + +// SetTransitGatewayAttachmentIds sets the TransitGatewayAttachmentIds field's value. +func (s *DescribeTransitGatewayAttachmentsInput) SetTransitGatewayAttachmentIds(v []*string) *DescribeTransitGatewayAttachmentsInput { + s.TransitGatewayAttachmentIds = v + return s +} + +type DescribeTransitGatewayAttachmentsOutput 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 attachments. + TransitGatewayAttachments []*TransitGatewayAttachment `locationName:"transitGatewayAttachments" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeTransitGatewayAttachmentsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTransitGatewayAttachmentsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeTransitGatewayAttachmentsOutput) SetNextToken(v string) *DescribeTransitGatewayAttachmentsOutput { + s.NextToken = &v + return s +} + +// SetTransitGatewayAttachments sets the TransitGatewayAttachments field's value. +func (s *DescribeTransitGatewayAttachmentsOutput) SetTransitGatewayAttachments(v []*TransitGatewayAttachment) *DescribeTransitGatewayAttachmentsOutput { + s.TransitGatewayAttachments = v + return s +} + +type DescribeTransitGatewayRouteTablesInput 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: + // + // * default-association-route-table - Indicates whether this is the default + // association route table for the transit gateway (true | false). + // + // * default-propagation-route-table - Indicates whether this is the default + // propagation route table for the transit gateway (true | false). + // + // * state - The state of the attachment (pendingAcceptance | pending | available + // | modifying | deleting | deleted | failed | rejected). + // + // * transit-gateway-id - The ID of the transit gateway. + // + // * transit-gateway-route-table-id - The ID of the transit gateway route + // table. + 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 transit gateway route tables. + TransitGatewayRouteTableIds []*string `locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeTransitGatewayRouteTablesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTransitGatewayRouteTablesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTransitGatewayRouteTablesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTransitGatewayRouteTablesInput"} + 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 *DescribeTransitGatewayRouteTablesInput) SetDryRun(v bool) *DescribeTransitGatewayRouteTablesInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeTransitGatewayRouteTablesInput) SetFilters(v []*Filter) *DescribeTransitGatewayRouteTablesInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeTransitGatewayRouteTablesInput) SetMaxResults(v int64) *DescribeTransitGatewayRouteTablesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeTransitGatewayRouteTablesInput) SetNextToken(v string) *DescribeTransitGatewayRouteTablesInput { + s.NextToken = &v + return s +} + +// SetTransitGatewayRouteTableIds sets the TransitGatewayRouteTableIds field's value. +func (s *DescribeTransitGatewayRouteTablesInput) SetTransitGatewayRouteTableIds(v []*string) *DescribeTransitGatewayRouteTablesInput { + s.TransitGatewayRouteTableIds = v + return s +} + +type DescribeTransitGatewayRouteTablesOutput 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 transit gateway route tables. + TransitGatewayRouteTables []*TransitGatewayRouteTable `locationName:"transitGatewayRouteTables" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeTransitGatewayRouteTablesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTransitGatewayRouteTablesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeTransitGatewayRouteTablesOutput) SetNextToken(v string) *DescribeTransitGatewayRouteTablesOutput { + s.NextToken = &v + return s +} + +// SetTransitGatewayRouteTables sets the TransitGatewayRouteTables field's value. +func (s *DescribeTransitGatewayRouteTablesOutput) SetTransitGatewayRouteTables(v []*TransitGatewayRouteTable) *DescribeTransitGatewayRouteTablesOutput { + s.TransitGatewayRouteTables = v + return s +} + +type DescribeTransitGatewayVpcAttachmentsInput 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 attachment (pendingAcceptance | pending | available + // | modifying | deleting | deleted | failed | rejected). + // + // * transit-gateway-attachment-id - The ID of the attachment. + // + // * transit-gateway-id - The ID of the transit gateway. + // + // * vpc-id - The ID of the VPC. + 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 DescribeTransitGatewayVpcAttachmentsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTransitGatewayVpcAttachmentsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTransitGatewayVpcAttachmentsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTransitGatewayVpcAttachmentsInput"} + 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 *DescribeTransitGatewayVpcAttachmentsInput) SetDryRun(v bool) *DescribeTransitGatewayVpcAttachmentsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeTransitGatewayVpcAttachmentsInput) SetFilters(v []*Filter) *DescribeTransitGatewayVpcAttachmentsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeTransitGatewayVpcAttachmentsInput) SetMaxResults(v int64) *DescribeTransitGatewayVpcAttachmentsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeTransitGatewayVpcAttachmentsInput) SetNextToken(v string) *DescribeTransitGatewayVpcAttachmentsInput { + s.NextToken = &v + return s +} + +// SetTransitGatewayAttachmentIds sets the TransitGatewayAttachmentIds field's value. +func (s *DescribeTransitGatewayVpcAttachmentsInput) SetTransitGatewayAttachmentIds(v []*string) *DescribeTransitGatewayVpcAttachmentsInput { + s.TransitGatewayAttachmentIds = v + return s +} + +type DescribeTransitGatewayVpcAttachmentsOutput 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 VPC attachments. + TransitGatewayVpcAttachments []*TransitGatewayVpcAttachment `locationName:"transitGatewayVpcAttachments" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeTransitGatewayVpcAttachmentsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTransitGatewayVpcAttachmentsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeTransitGatewayVpcAttachmentsOutput) SetNextToken(v string) *DescribeTransitGatewayVpcAttachmentsOutput { + s.NextToken = &v + return s +} + +// SetTransitGatewayVpcAttachments sets the TransitGatewayVpcAttachments field's value. +func (s *DescribeTransitGatewayVpcAttachmentsOutput) SetTransitGatewayVpcAttachments(v []*TransitGatewayVpcAttachment) *DescribeTransitGatewayVpcAttachmentsOutput { + s.TransitGatewayVpcAttachments = v + return s +} + +type DescribeTransitGatewaysInput 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: + // + // * owner-id - The ID of the AWS account that owns the transit gateway. + // + // * options.propagation-default-route-table-id - The ID of the default propagation + // route table. + // + // * options.amazon-side-asn - The private ASN for the Amazon side of a BGP + // session. + // + // * options.association-default-route-table-id - The ID of the default association + // route table. + // + // * options.auto-accept-shared-attachments - Indicates whether there is + // automatic acceptance of attachment requests (enable | disable). + // + // * options.default-route-table-association - Indicates whether resource + // attachments are automatically associated with the default association + // route table (enable | disable). + // + // * options.default-route-table-propagation - Indicates whether resource + // attachments automatically propagate routes to the default propagation + // route table (enable | disable). + // + // * options.dns-support - Indicates whether DNS support is enabled (enable + // | disable). + // + // * options.vpn-ecmp-support - Indicates whether Equal Cost Multipath Protocol + // support is enabled (enable | disable). + // + // * state - The state of the attachment (pendingAcceptance | pending | available + // | modifying | deleting | deleted | failed | rejected). + // + // * transit-gateway-id - The ID of the transit gateway. + // + // * transit-gateway-state - The state of the transit gateway (pending | + // available | deleting | deleted). + 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 transit gateways. + TransitGatewayIds []*string `locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeTransitGatewaysInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTransitGatewaysInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTransitGatewaysInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTransitGatewaysInput"} + 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 *DescribeTransitGatewaysInput) SetDryRun(v bool) *DescribeTransitGatewaysInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeTransitGatewaysInput) SetFilters(v []*Filter) *DescribeTransitGatewaysInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeTransitGatewaysInput) SetMaxResults(v int64) *DescribeTransitGatewaysInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeTransitGatewaysInput) SetNextToken(v string) *DescribeTransitGatewaysInput { + s.NextToken = &v + return s +} + +// SetTransitGatewayIds sets the TransitGatewayIds field's value. +func (s *DescribeTransitGatewaysInput) SetTransitGatewayIds(v []*string) *DescribeTransitGatewaysInput { + s.TransitGatewayIds = v + return s +} + +type DescribeTransitGatewaysOutput 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 transit gateways. + TransitGateways []*TransitGateway `locationName:"transitGatewaySet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeTransitGatewaysOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTransitGatewaysOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeTransitGatewaysOutput) SetNextToken(v string) *DescribeTransitGatewaysOutput { + s.NextToken = &v + return s +} + +// SetTransitGateways sets the TransitGateways field's value. +func (s *DescribeTransitGatewaysOutput) SetTransitGateways(v []*TransitGateway) *DescribeTransitGatewaysOutput { + s.TransitGateways = v + return s +} + +// Contains the parameters for DescribeVolumeAttribute. +type DescribeVolumeAttributeInput struct { + _ struct{} `type:"structure"` + + // The attribute of the volume. This parameter is required. + // + // Attribute is a required field + Attribute *string `type:"string" required:"true" enum:"VolumeAttributeName"` + + // 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 `locationName:"dryRun" type:"boolean"` + + // The ID of the volume. + // + // VolumeId is a required field + VolumeId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeVolumeAttributeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVolumeAttributeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeVolumeAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeVolumeAttributeInput"} + if s.Attribute == nil { + invalidParams.Add(request.NewErrParamRequired("Attribute")) + } + if s.VolumeId == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAttribute sets the Attribute field's value. +func (s *DescribeVolumeAttributeInput) SetAttribute(v string) *DescribeVolumeAttributeInput { + s.Attribute = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeVolumeAttributeInput) SetDryRun(v bool) *DescribeVolumeAttributeInput { + s.DryRun = &v + return s +} + +// SetVolumeId sets the VolumeId field's value. +func (s *DescribeVolumeAttributeInput) SetVolumeId(v string) *DescribeVolumeAttributeInput { + s.VolumeId = &v + return s +} + +// Contains the output of DescribeVolumeAttribute. +type DescribeVolumeAttributeOutput struct { + _ struct{} `type:"structure"` + + // The state of autoEnableIO attribute. + AutoEnableIO *AttributeBooleanValue `locationName:"autoEnableIO" type:"structure"` + + // A list of product codes. + ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` + + // The ID of the volume. + VolumeId *string `locationName:"volumeId" type:"string"` +} + +// String returns the string representation +func (s DescribeVolumeAttributeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVolumeAttributeOutput) GoString() string { + return s.String() +} + +// SetAutoEnableIO sets the AutoEnableIO field's value. +func (s *DescribeVolumeAttributeOutput) SetAutoEnableIO(v *AttributeBooleanValue) *DescribeVolumeAttributeOutput { + s.AutoEnableIO = v + return s +} + +// SetProductCodes sets the ProductCodes field's value. +func (s *DescribeVolumeAttributeOutput) SetProductCodes(v []*ProductCode) *DescribeVolumeAttributeOutput { + s.ProductCodes = v + return s +} + +// SetVolumeId sets the VolumeId field's value. +func (s *DescribeVolumeAttributeOutput) SetVolumeId(v string) *DescribeVolumeAttributeOutput { + s.VolumeId = &v + return s +} + +// Contains the parameters for DescribeVolumeStatus. +type DescribeVolumeStatusInput 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 `locationName:"dryRun" type:"boolean"` + + // One or more filters. + // + // * action.code - The action code for the event (for example, enable-volume-io). + // + // * action.description - A description of the action. + // + // * action.event-id - The event ID associated with the action. + // + // * availability-zone - The Availability Zone of the instance. + // + // * event.description - A description of the event. + // + // * event.event-id - The event ID. + // + // * event.event-type - The event type (for io-enabled: passed | failed; + // for io-performance: io-performance:degraded | io-performance:severely-degraded + // | io-performance:stalled). + // + // * event.not-after - The latest end time for the event. + // + // * event.not-before - The earliest start time for the event. + // + // * volume-status.details-name - The cause for volume-status.status (io-enabled + // | io-performance). + // + // * volume-status.details-status - The status of volume-status.details-name + // (for io-enabled: passed | failed; for io-performance: normal | degraded + // | severely-degraded | stalled). + // + // * volume-status.status - The status of the volume (ok | impaired | warning + // | insufficient-data). + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The maximum number of volume results returned by DescribeVolumeStatus in + // paginated output. When this parameter is used, the request only returns MaxResults + // results in a single page along with a NextToken response element. The remaining + // results of the initial request can be seen by sending another request with + // the returned NextToken value. This value can be between 5 and 1000; if MaxResults + // is given a value larger than 1000, only 1000 results are returned. If this + // parameter is not used, then DescribeVolumeStatus returns all results. You + // cannot specify this parameter and the volume IDs parameter in the same request. + MaxResults *int64 `type:"integer"` + + // The NextToken value to include in a future DescribeVolumeStatus request. + // When the results of the request exceed MaxResults, this value can be used + // to retrieve the next page of results. This value is null when there are no + // more results to return. + NextToken *string `type:"string"` + + // One or more volume IDs. + // + // Default: Describes all your volumes. + VolumeIds []*string `locationName:"VolumeId" locationNameList:"VolumeId" type:"list"` +} + +// String returns the string representation +func (s DescribeVolumeStatusInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVolumeStatusInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeVolumeStatusInput) SetDryRun(v bool) *DescribeVolumeStatusInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeVolumeStatusInput) SetFilters(v []*Filter) *DescribeVolumeStatusInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeVolumeStatusInput) SetMaxResults(v int64) *DescribeVolumeStatusInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeVolumeStatusInput) SetNextToken(v string) *DescribeVolumeStatusInput { + s.NextToken = &v + return s +} + +// SetVolumeIds sets the VolumeIds field's value. +func (s *DescribeVolumeStatusInput) SetVolumeIds(v []*string) *DescribeVolumeStatusInput { + s.VolumeIds = v + return s +} + +// Contains the output of DescribeVolumeStatus. +type DescribeVolumeStatusOutput 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"` + + // A list of volumes. + VolumeStatuses []*VolumeStatusItem `locationName:"volumeStatusSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeVolumeStatusOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVolumeStatusOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeVolumeStatusOutput) SetNextToken(v string) *DescribeVolumeStatusOutput { + s.NextToken = &v + return s +} + +// SetVolumeStatuses sets the VolumeStatuses field's value. +func (s *DescribeVolumeStatusOutput) SetVolumeStatuses(v []*VolumeStatusItem) *DescribeVolumeStatusOutput { + s.VolumeStatuses = v + return s +} + +// Contains the parameters for DescribeVolumes. +type DescribeVolumesInput 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 `locationName:"dryRun" type:"boolean"` + + // One or more filters. + // + // * attachment.attach-time - The time stamp when the attachment initiated. + // + // * attachment.delete-on-termination - Whether the volume is deleted on + // instance termination. + // + // * attachment.device - The device name specified in the block device mapping + // (for example, /dev/sda1). + // + // * attachment.instance-id - The ID of the instance the volume is attached + // to. + // + // * attachment.status - The attachment state (attaching | attached | detaching). + // + // * availability-zone - The Availability Zone in which the volume was created. + // + // * create-time - The time stamp when the volume was created. + // + // * encrypted - The encryption status of the volume. + // + // * size - The size of the volume, in GiB. + // + // * snapshot-id - The snapshot from which the volume was created. + // + // * status - The status of the volume (creating | available | in-use | deleting + // | deleted | error). + // + // * 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. + // + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. + // + // * volume-id - The volume ID. + // + // * volume-type - The Amazon EBS volume type. This can be gp2 for General + // Purpose SSD, io1 for Provisioned IOPS SSD, st1 for Throughput Optimized + // HDD, sc1 for Cold HDD, or standard for Magnetic volumes. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The maximum number of volume results returned by DescribeVolumes in paginated + // output. When this parameter is used, DescribeVolumes only returns MaxResults + // results in a single page along with a NextToken response element. The remaining + // results of the initial request can be seen by sending another DescribeVolumes + // request with the returned NextToken value. This value can be between 5 and + // 500; if MaxResults is given a value larger than 500, only 500 results are + // returned. If this parameter is not used, then DescribeVolumes returns all + // results. You cannot specify this parameter and the volume IDs parameter in + // the same request. + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // The NextToken value returned from a previous paginated DescribeVolumes request + // where MaxResults was used and the results exceeded the value of that parameter. + // Pagination continues from the end of the previous results that returned the + // NextToken value. This value is null when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + + // One or more volume IDs. + VolumeIds []*string `locationName:"VolumeId" locationNameList:"VolumeId" type:"list"` +} + +// String returns the string representation +func (s DescribeVolumesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVolumesInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeVolumesInput) SetDryRun(v bool) *DescribeVolumesInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeVolumesInput) SetFilters(v []*Filter) *DescribeVolumesInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeVolumesInput) SetMaxResults(v int64) *DescribeVolumesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeVolumesInput) SetNextToken(v string) *DescribeVolumesInput { + s.NextToken = &v + return s +} + +// SetVolumeIds sets the VolumeIds field's value. +func (s *DescribeVolumesInput) SetVolumeIds(v []*string) *DescribeVolumesInput { + s.VolumeIds = v + return s +} + +type DescribeVolumesModificationsInput 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. Supported filters: volume-id, modification-state, target-size, + // target-iops, target-volume-type, original-size, original-iops, original-volume-type, + // start-time. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The maximum number of results (up to a limit of 500) to be returned in a + // paginated request. + MaxResults *int64 `type:"integer"` + + // The nextToken value returned by a previous paginated request. + NextToken *string `type:"string"` + + // One or more volume IDs for which in-progress modifications will be described. + VolumeIds []*string `locationName:"VolumeId" locationNameList:"VolumeId" type:"list"` +} + +// String returns the string representation +func (s DescribeVolumesModificationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVolumesModificationsInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeVolumesModificationsInput) SetDryRun(v bool) *DescribeVolumesModificationsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeVolumesModificationsInput) SetFilters(v []*Filter) *DescribeVolumesModificationsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeVolumesModificationsInput) SetMaxResults(v int64) *DescribeVolumesModificationsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeVolumesModificationsInput) SetNextToken(v string) *DescribeVolumesModificationsInput { + s.NextToken = &v + return s +} + +// SetVolumeIds sets the VolumeIds field's value. +func (s *DescribeVolumesModificationsInput) SetVolumeIds(v []*string) *DescribeVolumesModificationsInput { + s.VolumeIds = v + return s +} + +type DescribeVolumesModificationsOutput struct { + _ struct{} `type:"structure"` + + // Token for pagination, null if there are no more results + NextToken *string `locationName:"nextToken" type:"string"` + + // A list of returned VolumeModification objects. + VolumesModifications []*VolumeModification `locationName:"volumeModificationSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeVolumesModificationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVolumesModificationsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeVolumesModificationsOutput) SetNextToken(v string) *DescribeVolumesModificationsOutput { + s.NextToken = &v + return s +} + +// SetVolumesModifications sets the VolumesModifications field's value. +func (s *DescribeVolumesModificationsOutput) SetVolumesModifications(v []*VolumeModification) *DescribeVolumesModificationsOutput { + s.VolumesModifications = v + return s +} + +// Contains the output of DescribeVolumes. +type DescribeVolumesOutput struct { + _ struct{} `type:"structure"` + + // The NextToken value to include in a future DescribeVolumes request. When + // the results of a DescribeVolumes request exceed MaxResults, this value can + // be used to retrieve the next page of results. This value is null when there + // are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + + // Information about the volumes. + Volumes []*Volume `locationName:"volumeSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeVolumesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVolumesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeVolumesOutput) SetNextToken(v string) *DescribeVolumesOutput { + s.NextToken = &v + return s +} + +// SetVolumes sets the Volumes field's value. +func (s *DescribeVolumesOutput) SetVolumes(v []*Volume) *DescribeVolumesOutput { + s.Volumes = v + return s +} + +type DescribeVpcAttributeInput struct { + _ struct{} `type:"structure"` + + // The VPC attribute. + // + // Attribute is a required field + Attribute *string `type:"string" required:"true" enum:"VpcAttributeName"` + + // 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 `locationName:"dryRun" type:"boolean"` + + // The ID of the VPC. + // + // VpcId is a required field + VpcId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeVpcAttributeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcAttributeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeVpcAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeVpcAttributeInput"} + if s.Attribute == nil { + invalidParams.Add(request.NewErrParamRequired("Attribute")) + } + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAttribute sets the Attribute field's value. +func (s *DescribeVpcAttributeInput) SetAttribute(v string) *DescribeVpcAttributeInput { + s.Attribute = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeVpcAttributeInput) SetDryRun(v bool) *DescribeVpcAttributeInput { + s.DryRun = &v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *DescribeVpcAttributeInput) SetVpcId(v string) *DescribeVpcAttributeInput { + s.VpcId = &v + return s +} + +type DescribeVpcAttributeOutput struct { + _ struct{} `type:"structure"` + + // Indicates whether the instances launched in the VPC get DNS hostnames. If + // this attribute is true, instances in the VPC get DNS hostnames; otherwise, + // they do not. + EnableDnsHostnames *AttributeBooleanValue `locationName:"enableDnsHostnames" type:"structure"` + + // Indicates whether DNS resolution is enabled for the VPC. If this attribute + // is true, the Amazon DNS server resolves DNS hostnames for your instances + // to their corresponding IP addresses; otherwise, it does not. + EnableDnsSupport *AttributeBooleanValue `locationName:"enableDnsSupport" type:"structure"` + + // The ID of the VPC. + VpcId *string `locationName:"vpcId" type:"string"` +} + +// String returns the string representation +func (s DescribeVpcAttributeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcAttributeOutput) GoString() string { + return s.String() +} + +// SetEnableDnsHostnames sets the EnableDnsHostnames field's value. +func (s *DescribeVpcAttributeOutput) SetEnableDnsHostnames(v *AttributeBooleanValue) *DescribeVpcAttributeOutput { + s.EnableDnsHostnames = v + return s +} + +// SetEnableDnsSupport sets the EnableDnsSupport field's value. +func (s *DescribeVpcAttributeOutput) SetEnableDnsSupport(v *AttributeBooleanValue) *DescribeVpcAttributeOutput { + s.EnableDnsSupport = v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *DescribeVpcAttributeOutput) SetVpcId(v string) *DescribeVpcAttributeOutput { + s.VpcId = &v + return s +} + +type DescribeVpcClassicLinkDnsSupportInput struct { + _ struct{} `type:"structure"` + + // The maximum number of items to return for this request. The request returns + // a token that you can specify in a subsequent call to get the next set of + // results. + MaxResults *int64 `locationName:"maxResults" min:"5" type:"integer"` + + // The token for the next set of items to return. (You received this token from + // a prior call.) + NextToken *string `locationName:"nextToken" min:"1" type:"string"` + + // One or more VPC IDs. + VpcIds []*string `locationNameList:"VpcId" type:"list"` +} + +// String returns the string representation +func (s DescribeVpcClassicLinkDnsSupportInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcClassicLinkDnsSupportInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeVpcClassicLinkDnsSupportInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeVpcClassicLinkDnsSupportInput"} + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeVpcClassicLinkDnsSupportInput) SetMaxResults(v int64) *DescribeVpcClassicLinkDnsSupportInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeVpcClassicLinkDnsSupportInput) SetNextToken(v string) *DescribeVpcClassicLinkDnsSupportInput { + s.NextToken = &v + return s +} + +// SetVpcIds sets the VpcIds field's value. +func (s *DescribeVpcClassicLinkDnsSupportInput) SetVpcIds(v []*string) *DescribeVpcClassicLinkDnsSupportInput { + s.VpcIds = v + return s +} + +type DescribeVpcClassicLinkDnsSupportOutput struct { + _ struct{} `type:"structure"` + + // The token to use when requesting the next set of items. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` + + // Information about the ClassicLink DNS support status of the VPCs. + Vpcs []*ClassicLinkDnsSupport `locationName:"vpcs" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeVpcClassicLinkDnsSupportOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcClassicLinkDnsSupportOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeVpcClassicLinkDnsSupportOutput) SetNextToken(v string) *DescribeVpcClassicLinkDnsSupportOutput { + s.NextToken = &v + return s +} + +// SetVpcs sets the Vpcs field's value. +func (s *DescribeVpcClassicLinkDnsSupportOutput) SetVpcs(v []*ClassicLinkDnsSupport) *DescribeVpcClassicLinkDnsSupportOutput { + s.Vpcs = v + return s +} + +type DescribeVpcClassicLinkInput 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 `locationName:"dryRun" type:"boolean"` + + // One or more filters. + // + // * is-classic-link-enabled - Whether the VPC is enabled for ClassicLink + // (true | false). + // + // * 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. + // + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // One or more VPCs for which you want to describe the ClassicLink status. + VpcIds []*string `locationName:"VpcId" locationNameList:"VpcId" type:"list"` +} + +// String returns the string representation +func (s DescribeVpcClassicLinkInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcClassicLinkInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeVpcClassicLinkInput) SetDryRun(v bool) *DescribeVpcClassicLinkInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeVpcClassicLinkInput) SetFilters(v []*Filter) *DescribeVpcClassicLinkInput { + s.Filters = v + return s +} + +// SetVpcIds sets the VpcIds field's value. +func (s *DescribeVpcClassicLinkInput) SetVpcIds(v []*string) *DescribeVpcClassicLinkInput { + s.VpcIds = v + return s +} + +type DescribeVpcClassicLinkOutput struct { + _ struct{} `type:"structure"` + + // The ClassicLink status of one or more VPCs. + Vpcs []*VpcClassicLink `locationName:"vpcSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeVpcClassicLinkOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcClassicLinkOutput) GoString() string { + return s.String() +} + +// SetVpcs sets the Vpcs field's value. +func (s *DescribeVpcClassicLinkOutput) SetVpcs(v []*VpcClassicLink) *DescribeVpcClassicLinkOutput { + s.Vpcs = v + return s +} + +type DescribeVpcEndpointConnectionNotificationsInput struct { + _ struct{} `type:"structure"` + + // The ID of the notification. + ConnectionNotificationId *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"` + + // One or more filters. + // + // * connection-notification-arn - The ARN of SNS topic for the notification. + // + // * connection-notification-id - The ID of the notification. + // + // * connection-notification-state - The state of the notification (Enabled + // | Disabled). + // + // * connection-notification-type - The type of notification (Topic). + // + // * service-id - The ID of the endpoint service. + // + // * vpc-endpoint-id - The ID of the VPC endpoint. + 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. + MaxResults *int64 `type:"integer"` + + // The token to request the next page of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeVpcEndpointConnectionNotificationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcEndpointConnectionNotificationsInput) GoString() string { + return s.String() +} + +// SetConnectionNotificationId sets the ConnectionNotificationId field's value. +func (s *DescribeVpcEndpointConnectionNotificationsInput) SetConnectionNotificationId(v string) *DescribeVpcEndpointConnectionNotificationsInput { + s.ConnectionNotificationId = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeVpcEndpointConnectionNotificationsInput) SetDryRun(v bool) *DescribeVpcEndpointConnectionNotificationsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeVpcEndpointConnectionNotificationsInput) SetFilters(v []*Filter) *DescribeVpcEndpointConnectionNotificationsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeVpcEndpointConnectionNotificationsInput) SetMaxResults(v int64) *DescribeVpcEndpointConnectionNotificationsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeVpcEndpointConnectionNotificationsInput) SetNextToken(v string) *DescribeVpcEndpointConnectionNotificationsInput { + s.NextToken = &v + return s +} + +type DescribeVpcEndpointConnectionNotificationsOutput struct { + _ struct{} `type:"structure"` + + // One or more notifications. + ConnectionNotificationSet []*ConnectionNotification `locationName:"connectionNotificationSet" 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 DescribeVpcEndpointConnectionNotificationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcEndpointConnectionNotificationsOutput) GoString() string { + return s.String() +} + +// SetConnectionNotificationSet sets the ConnectionNotificationSet field's value. +func (s *DescribeVpcEndpointConnectionNotificationsOutput) SetConnectionNotificationSet(v []*ConnectionNotification) *DescribeVpcEndpointConnectionNotificationsOutput { + s.ConnectionNotificationSet = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeVpcEndpointConnectionNotificationsOutput) SetNextToken(v string) *DescribeVpcEndpointConnectionNotificationsOutput { + s.NextToken = &v + return s +} + +type DescribeVpcEndpointConnectionsInput 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. + // + // * service-id - The ID of the service. + // + // * vpc-endpoint-owner - The AWS account number of the owner of the endpoint. + // + // * vpc-endpoint-state - The state of the endpoint (pendingAcceptance | + // pending | available | deleting | deleted | rejected | failed). + // + // * vpc-endpoint-id - The ID of the endpoint. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The maximum number of results to return for the request in a single page. + // The remaining results of the initial request can be seen by sending another + // request with the returned NextToken value. This value can be between 5 and + // 1000; if MaxResults is given a value larger than 1000, only 1000 results + // are returned. + MaxResults *int64 `type:"integer"` + + // The token to retrieve the next page of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeVpcEndpointConnectionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcEndpointConnectionsInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeVpcEndpointConnectionsInput) SetDryRun(v bool) *DescribeVpcEndpointConnectionsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeVpcEndpointConnectionsInput) SetFilters(v []*Filter) *DescribeVpcEndpointConnectionsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeVpcEndpointConnectionsInput) SetMaxResults(v int64) *DescribeVpcEndpointConnectionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeVpcEndpointConnectionsInput) SetNextToken(v string) *DescribeVpcEndpointConnectionsInput { + s.NextToken = &v + return s +} + +type DescribeVpcEndpointConnectionsOutput 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 one or more VPC endpoint connections. + VpcEndpointConnections []*VpcEndpointConnection `locationName:"vpcEndpointConnectionSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeVpcEndpointConnectionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcEndpointConnectionsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeVpcEndpointConnectionsOutput) SetNextToken(v string) *DescribeVpcEndpointConnectionsOutput { + s.NextToken = &v + return s +} + +// SetVpcEndpointConnections sets the VpcEndpointConnections field's value. +func (s *DescribeVpcEndpointConnectionsOutput) SetVpcEndpointConnections(v []*VpcEndpointConnection) *DescribeVpcEndpointConnectionsOutput { + s.VpcEndpointConnections = v + return s +} + +type DescribeVpcEndpointServiceConfigurationsInput 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. + // + // * service-name - The name of the service. + // + // * service-id - The ID of the service. + // + // * service-state - The state of the service (Pending | Available | Deleting + // | Deleted | Failed). + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The maximum number of results to return for the request in a single page. + // The remaining results of the initial request can be seen by sending another + // request with the returned NextToken value. This value can be between 5 and + // 1000; if MaxResults is given a value larger than 1000, only 1000 results + // are returned. + MaxResults *int64 `type:"integer"` + + // The token to retrieve the next page of results. + NextToken *string `type:"string"` + + // The IDs of one or more services. + ServiceIds []*string `locationName:"ServiceId" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeVpcEndpointServiceConfigurationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcEndpointServiceConfigurationsInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeVpcEndpointServiceConfigurationsInput) SetDryRun(v bool) *DescribeVpcEndpointServiceConfigurationsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeVpcEndpointServiceConfigurationsInput) SetFilters(v []*Filter) *DescribeVpcEndpointServiceConfigurationsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeVpcEndpointServiceConfigurationsInput) SetMaxResults(v int64) *DescribeVpcEndpointServiceConfigurationsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeVpcEndpointServiceConfigurationsInput) SetNextToken(v string) *DescribeVpcEndpointServiceConfigurationsInput { + s.NextToken = &v + return s +} + +// SetServiceIds sets the ServiceIds field's value. +func (s *DescribeVpcEndpointServiceConfigurationsInput) SetServiceIds(v []*string) *DescribeVpcEndpointServiceConfigurationsInput { + s.ServiceIds = v + return s +} + +type DescribeVpcEndpointServiceConfigurationsOutput 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 one or more services. + ServiceConfigurations []*ServiceConfiguration `locationName:"serviceConfigurationSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeVpcEndpointServiceConfigurationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcEndpointServiceConfigurationsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeVpcEndpointServiceConfigurationsOutput) SetNextToken(v string) *DescribeVpcEndpointServiceConfigurationsOutput { + s.NextToken = &v + return s +} + +// SetServiceConfigurations sets the ServiceConfigurations field's value. +func (s *DescribeVpcEndpointServiceConfigurationsOutput) SetServiceConfigurations(v []*ServiceConfiguration) *DescribeVpcEndpointServiceConfigurationsOutput { + s.ServiceConfigurations = v + return s +} + +type DescribeVpcEndpointServicePermissionsInput 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. + // + // * principal - The ARN of the principal. + // + // * principal-type - The principal type (All | Service | OrganizationUnit + // | Account | User | Role). + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The maximum number of results to return for the request in a single page. + // The remaining results of the initial request can be seen by sending another + // request with the returned NextToken value. This value can be between 5 and + // 1000; if MaxResults is given a value larger than 1000, only 1000 results + // are returned. + MaxResults *int64 `type:"integer"` + + // The token to retrieve the next page of results. + NextToken *string `type:"string"` + + // The ID of the service. + // + // ServiceId is a required field + ServiceId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeVpcEndpointServicePermissionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcEndpointServicePermissionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeVpcEndpointServicePermissionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeVpcEndpointServicePermissionsInput"} + if s.ServiceId == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeVpcEndpointServicePermissionsInput) SetDryRun(v bool) *DescribeVpcEndpointServicePermissionsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeVpcEndpointServicePermissionsInput) SetFilters(v []*Filter) *DescribeVpcEndpointServicePermissionsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeVpcEndpointServicePermissionsInput) SetMaxResults(v int64) *DescribeVpcEndpointServicePermissionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeVpcEndpointServicePermissionsInput) SetNextToken(v string) *DescribeVpcEndpointServicePermissionsInput { + s.NextToken = &v + return s +} + +// SetServiceId sets the ServiceId field's value. +func (s *DescribeVpcEndpointServicePermissionsInput) SetServiceId(v string) *DescribeVpcEndpointServicePermissionsInput { + s.ServiceId = &v + return s +} + +type DescribeVpcEndpointServicePermissionsOutput struct { + _ struct{} `type:"structure"` + + // Information about one or more allowed principals. + AllowedPrincipals []*AllowedPrincipal `locationName:"allowedPrincipals" 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 DescribeVpcEndpointServicePermissionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcEndpointServicePermissionsOutput) GoString() string { + return s.String() +} + +// SetAllowedPrincipals sets the AllowedPrincipals field's value. +func (s *DescribeVpcEndpointServicePermissionsOutput) SetAllowedPrincipals(v []*AllowedPrincipal) *DescribeVpcEndpointServicePermissionsOutput { + s.AllowedPrincipals = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeVpcEndpointServicePermissionsOutput) SetNextToken(v string) *DescribeVpcEndpointServicePermissionsOutput { + s.NextToken = &v + return s +} + +// Contains the parameters for DescribeVpcEndpointServices. +type DescribeVpcEndpointServicesInput 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. + // + // * service-name: The name of the service. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The maximum number of items to return for this request. The request returns + // a token that you can specify in a subsequent call to get the next set of + // results. + // + // Constraint: If the value is greater than 1000, we return only 1000 items. + MaxResults *int64 `type:"integer"` + + // The token for the next set of items to return. (You received this token from + // a prior call.) + NextToken *string `type:"string"` + + // One or more service names. + ServiceNames []*string `locationName:"ServiceName" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeVpcEndpointServicesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcEndpointServicesInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeVpcEndpointServicesInput) SetDryRun(v bool) *DescribeVpcEndpointServicesInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeVpcEndpointServicesInput) SetFilters(v []*Filter) *DescribeVpcEndpointServicesInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeVpcEndpointServicesInput) SetMaxResults(v int64) *DescribeVpcEndpointServicesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeVpcEndpointServicesInput) SetNextToken(v string) *DescribeVpcEndpointServicesInput { + s.NextToken = &v + return s +} + +// SetServiceNames sets the ServiceNames field's value. +func (s *DescribeVpcEndpointServicesInput) SetServiceNames(v []*string) *DescribeVpcEndpointServicesInput { + s.ServiceNames = v + return s +} + +// Contains the output of DescribeVpcEndpointServices. +type DescribeVpcEndpointServicesOutput struct { + _ struct{} `type:"structure"` + + // The token to use when requesting the next set of items. If there are no additional + // items to return, the string is empty. + NextToken *string `locationName:"nextToken" type:"string"` + + // Information about the service. + ServiceDetails []*ServiceDetail `locationName:"serviceDetailSet" locationNameList:"item" type:"list"` + + // A list of supported services. + ServiceNames []*string `locationName:"serviceNameSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeVpcEndpointServicesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcEndpointServicesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeVpcEndpointServicesOutput) SetNextToken(v string) *DescribeVpcEndpointServicesOutput { + s.NextToken = &v + return s +} + +// SetServiceDetails sets the ServiceDetails field's value. +func (s *DescribeVpcEndpointServicesOutput) SetServiceDetails(v []*ServiceDetail) *DescribeVpcEndpointServicesOutput { + s.ServiceDetails = v + return s +} + +// SetServiceNames sets the ServiceNames field's value. +func (s *DescribeVpcEndpointServicesOutput) SetServiceNames(v []*string) *DescribeVpcEndpointServicesOutput { + s.ServiceNames = v + return s +} + +// Contains the parameters for DescribeVpcEndpoints. +type DescribeVpcEndpointsInput 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. + // + // * service-name: The name of the service. + // + // * vpc-id: The ID of the VPC in which the endpoint resides. + // + // * vpc-endpoint-id: The ID of the endpoint. + // + // * vpc-endpoint-state: The state of the endpoint. (pending | available + // | deleting | deleted) + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The maximum number of items to return for this request. The request returns + // a token that you can specify in a subsequent call to get the next set of + // results. + // + // Constraint: If the value is greater than 1000, we return only 1000 items. + MaxResults *int64 `type:"integer"` + + // The token for the next set of items to return. (You received this token from + // a prior call.) + NextToken *string `type:"string"` + + // One or more endpoint IDs. + VpcEndpointIds []*string `locationName:"VpcEndpointId" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeVpcEndpointsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcEndpointsInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeVpcEndpointsInput) SetDryRun(v bool) *DescribeVpcEndpointsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeVpcEndpointsInput) SetFilters(v []*Filter) *DescribeVpcEndpointsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeVpcEndpointsInput) SetMaxResults(v int64) *DescribeVpcEndpointsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeVpcEndpointsInput) SetNextToken(v string) *DescribeVpcEndpointsInput { + s.NextToken = &v + return s +} + +// SetVpcEndpointIds sets the VpcEndpointIds field's value. +func (s *DescribeVpcEndpointsInput) SetVpcEndpointIds(v []*string) *DescribeVpcEndpointsInput { + s.VpcEndpointIds = v + return s +} + +// Contains the output of DescribeVpcEndpoints. +type DescribeVpcEndpointsOutput struct { + _ struct{} `type:"structure"` + + // The token to use when requesting the next set of items. If there are no additional + // items to return, the string is empty. + NextToken *string `locationName:"nextToken" type:"string"` + + // Information about the endpoints. + VpcEndpoints []*VpcEndpoint `locationName:"vpcEndpointSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeVpcEndpointsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcEndpointsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeVpcEndpointsOutput) SetNextToken(v string) *DescribeVpcEndpointsOutput { + s.NextToken = &v + return s +} + +// SetVpcEndpoints sets the VpcEndpoints field's value. +func (s *DescribeVpcEndpointsOutput) SetVpcEndpoints(v []*VpcEndpoint) *DescribeVpcEndpointsOutput { + s.VpcEndpoints = v + return s +} + +type DescribeVpcPeeringConnectionsInput 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 `locationName:"dryRun" type:"boolean"` + + // One or more filters. + // + // * accepter-vpc-info.cidr-block - The IPv4 CIDR block of the accepter VPC. + // + // * accepter-vpc-info.owner-id - The AWS account ID of the owner of the + // accepter VPC. + // + // * accepter-vpc-info.vpc-id - The ID of the accepter VPC. + // + // * expiration-time - The expiration date and time for the VPC peering connection. + // + // * requester-vpc-info.cidr-block - The IPv4 CIDR block of the requester's + // VPC. + // + // * requester-vpc-info.owner-id - The AWS account ID of the owner of the + // requester VPC. + // + // * requester-vpc-info.vpc-id - The ID of the requester VPC. + // + // * status-code - The status of the VPC peering connection (pending-acceptance + // | failed | expired | provisioning | active | deleting | deleted | rejected). + // + // * status-message - A message that provides more information about the + // status of the VPC peering connection, if applicable. + // + // * 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. + // + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. + // + // * vpc-peering-connection-id - The ID of the VPC peering connection. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // One or more VPC peering connection IDs. + // + // Default: Describes all your VPC peering connections. + VpcPeeringConnectionIds []*string `locationName:"VpcPeeringConnectionId" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeVpcPeeringConnectionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcPeeringConnectionsInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeVpcPeeringConnectionsInput) SetDryRun(v bool) *DescribeVpcPeeringConnectionsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeVpcPeeringConnectionsInput) SetFilters(v []*Filter) *DescribeVpcPeeringConnectionsInput { + s.Filters = v + return s +} + +// SetVpcPeeringConnectionIds sets the VpcPeeringConnectionIds field's value. +func (s *DescribeVpcPeeringConnectionsInput) SetVpcPeeringConnectionIds(v []*string) *DescribeVpcPeeringConnectionsInput { + s.VpcPeeringConnectionIds = v + return s +} + +type DescribeVpcPeeringConnectionsOutput struct { + _ struct{} `type:"structure"` + + // Information about the VPC peering connections. + VpcPeeringConnections []*VpcPeeringConnection `locationName:"vpcPeeringConnectionSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeVpcPeeringConnectionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcPeeringConnectionsOutput) GoString() string { + return s.String() +} + +// SetVpcPeeringConnections sets the VpcPeeringConnections field's value. +func (s *DescribeVpcPeeringConnectionsOutput) SetVpcPeeringConnections(v []*VpcPeeringConnection) *DescribeVpcPeeringConnectionsOutput { + s.VpcPeeringConnections = v + return s +} + +type DescribeVpcsInput 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 `locationName:"dryRun" type:"boolean"` + + // One or more filters. + // + // * cidr - The primary IPv4 CIDR block of the VPC. The CIDR block you specify + // must exactly match the VPC's CIDR block for information to be returned + // for the VPC. Must contain the slash followed by one or two digits (for + // example, /28). + // + // * cidr-block-association.cidr-block - An IPv4 CIDR block associated with + // the VPC. + // + // * cidr-block-association.association-id - The association ID for an IPv4 + // CIDR block associated with the VPC. + // + // * cidr-block-association.state - The state of an IPv4 CIDR block associated + // with the VPC. + // + // * dhcp-options-id - The ID of a set of DHCP options. + // + // * ipv6-cidr-block-association.ipv6-cidr-block - An IPv6 CIDR block associated + // with the VPC. + // + // * ipv6-cidr-block-association.association-id - The association ID for + // an IPv6 CIDR block associated with the VPC. + // + // * ipv6-cidr-block-association.state - The state of an IPv6 CIDR block + // associated with the VPC. + // + // * isDefault - Indicates whether the VPC is the default VPC. + // + // * owner-id - The ID of the AWS account that owns the VPC. + // + // * state - The state of the VPC (pending | available). + // + // * 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. + // + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. + // + // * vpc-id - The ID of the VPC. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // One or more VPC IDs. + // + // Default: Describes all your VPCs. + VpcIds []*string `locationName:"VpcId" locationNameList:"VpcId" type:"list"` +} + +// String returns the string representation +func (s DescribeVpcsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcsInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeVpcsInput) SetDryRun(v bool) *DescribeVpcsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeVpcsInput) SetFilters(v []*Filter) *DescribeVpcsInput { + s.Filters = v + return s +} + +// SetVpcIds sets the VpcIds field's value. +func (s *DescribeVpcsInput) SetVpcIds(v []*string) *DescribeVpcsInput { + s.VpcIds = v + return s +} + +type DescribeVpcsOutput struct { + _ struct{} `type:"structure"` + + // Information about one or more VPCs. + Vpcs []*Vpc `locationName:"vpcSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeVpcsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpcsOutput) GoString() string { + return s.String() +} + +// SetVpcs sets the Vpcs field's value. +func (s *DescribeVpcsOutput) SetVpcs(v []*Vpc) *DescribeVpcsOutput { + s.Vpcs = v + return s +} + +// Contains the parameters for DescribeVpnConnections. +type DescribeVpnConnectionsInput 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 `locationName:"dryRun" type:"boolean"` + + // One or more filters. + // + // * customer-gateway-configuration - The configuration information for the + // customer gateway. + // + // * customer-gateway-id - The ID of a customer gateway associated with the + // VPN connection. + // + // * state - The state of the VPN connection (pending | available | deleting + // | deleted). + // + // * option.static-routes-only - Indicates whether the connection has static + // routes only. Used for devices that do not support Border Gateway Protocol + // (BGP). + // + // * route.destination-cidr-block - The destination CIDR block. This corresponds + // to the subnet used in a customer data center. + // + // * bgp-asn - The BGP Autonomous System Number (ASN) associated with a BGP + // device. + // + // * 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. + // + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. + // + // * type - The type of VPN connection. Currently the only supported type + // is ipsec.1. + // + // * vpn-connection-id - The ID of the VPN connection. + // + // * vpn-gateway-id - The ID of a virtual private gateway associated with + // the VPN connection. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // One or more VPN connection IDs. + // + // Default: Describes your VPN connections. + VpnConnectionIds []*string `locationName:"VpnConnectionId" locationNameList:"VpnConnectionId" type:"list"` +} + +// String returns the string representation +func (s DescribeVpnConnectionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpnConnectionsInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeVpnConnectionsInput) SetDryRun(v bool) *DescribeVpnConnectionsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeVpnConnectionsInput) SetFilters(v []*Filter) *DescribeVpnConnectionsInput { + s.Filters = v + return s +} + +// SetVpnConnectionIds sets the VpnConnectionIds field's value. +func (s *DescribeVpnConnectionsInput) SetVpnConnectionIds(v []*string) *DescribeVpnConnectionsInput { + s.VpnConnectionIds = v + return s +} + +// Contains the output of DescribeVpnConnections. +type DescribeVpnConnectionsOutput struct { + _ struct{} `type:"structure"` + + // Information about one or more VPN connections. + VpnConnections []*VpnConnection `locationName:"vpnConnectionSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeVpnConnectionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpnConnectionsOutput) GoString() string { + return s.String() +} + +// SetVpnConnections sets the VpnConnections field's value. +func (s *DescribeVpnConnectionsOutput) SetVpnConnections(v []*VpnConnection) *DescribeVpnConnectionsOutput { + s.VpnConnections = v + return s +} + +// Contains the parameters for DescribeVpnGateways. +type DescribeVpnGatewaysInput 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 `locationName:"dryRun" type:"boolean"` + + // One or more filters. + // + // * amazon-side-asn - The Autonomous System Number (ASN) for the Amazon + // side of the gateway. + // + // * attachment.state - The current state of the attachment between the gateway + // and the VPC (attaching | attached | detaching | detached). + // + // * attachment.vpc-id - The ID of an attached VPC. + // + // * availability-zone - The Availability Zone for the virtual private gateway + // (if applicable). + // + // * state - The state of the virtual private gateway (pending | available + // | deleting | deleted). + // + // * 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. + // + // * tag-key - The key of a tag assigned to the resource. Use this filter + // to find all resources assigned a tag with a specific key, regardless of + // the tag value. + // + // * type - The type of virtual private gateway. Currently the only supported + // type is ipsec.1. + // + // * vpn-gateway-id - The ID of the virtual private gateway. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // One or more virtual private gateway IDs. + // + // Default: Describes all your virtual private gateways. + VpnGatewayIds []*string `locationName:"VpnGatewayId" locationNameList:"VpnGatewayId" type:"list"` +} + +// String returns the string representation +func (s DescribeVpnGatewaysInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpnGatewaysInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeVpnGatewaysInput) SetDryRun(v bool) *DescribeVpnGatewaysInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeVpnGatewaysInput) SetFilters(v []*Filter) *DescribeVpnGatewaysInput { + s.Filters = v + return s +} + +// SetVpnGatewayIds sets the VpnGatewayIds field's value. +func (s *DescribeVpnGatewaysInput) SetVpnGatewayIds(v []*string) *DescribeVpnGatewaysInput { + s.VpnGatewayIds = v + return s +} + +// Contains the output of DescribeVpnGateways. +type DescribeVpnGatewaysOutput struct { + _ struct{} `type:"structure"` + + // Information about one or more virtual private gateways. + VpnGateways []*VpnGateway `locationName:"vpnGatewaySet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeVpnGatewaysOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeVpnGatewaysOutput) GoString() string { + return s.String() +} + +// SetVpnGateways sets the VpnGateways field's value. +func (s *DescribeVpnGatewaysOutput) SetVpnGateways(v []*VpnGateway) *DescribeVpnGatewaysOutput { + s.VpnGateways = v + return s +} + +type DetachClassicLinkVpcInput 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 `locationName:"dryRun" type:"boolean"` + + // The ID of the instance to unlink from the VPC. + // + // InstanceId is a required field + InstanceId *string `locationName:"instanceId" type:"string" required:"true"` + + // The ID of the VPC to which the instance is linked. + // + // VpcId is a required field + VpcId *string `locationName:"vpcId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DetachClassicLinkVpcInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachClassicLinkVpcInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DetachClassicLinkVpcInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DetachClassicLinkVpcInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DetachClassicLinkVpcInput) SetDryRun(v bool) *DetachClassicLinkVpcInput { + s.DryRun = &v + return s +} + +// SetInstanceId sets the InstanceId field's value. +func (s *DetachClassicLinkVpcInput) SetInstanceId(v string) *DetachClassicLinkVpcInput { + s.InstanceId = &v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *DetachClassicLinkVpcInput) SetVpcId(v string) *DetachClassicLinkVpcInput { + s.VpcId = &v + return s +} + +type DetachClassicLinkVpcOutput 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 DetachClassicLinkVpcOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachClassicLinkVpcOutput) GoString() string { + return s.String() +} + +// SetReturn sets the Return field's value. +func (s *DetachClassicLinkVpcOutput) SetReturn(v bool) *DetachClassicLinkVpcOutput { + s.Return = &v + return s +} + +type DetachInternetGatewayInput 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 `locationName:"dryRun" type:"boolean"` + + // The ID of the internet gateway. + // + // InternetGatewayId is a required field + InternetGatewayId *string `locationName:"internetGatewayId" type:"string" required:"true"` + + // The ID of the VPC. + // + // VpcId is a required field + VpcId *string `locationName:"vpcId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DetachInternetGatewayInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachInternetGatewayInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DetachInternetGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DetachInternetGatewayInput"} + if s.InternetGatewayId == nil { + invalidParams.Add(request.NewErrParamRequired("InternetGatewayId")) + } + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DetachInternetGatewayInput) SetDryRun(v bool) *DetachInternetGatewayInput { + s.DryRun = &v + return s +} + +// SetInternetGatewayId sets the InternetGatewayId field's value. +func (s *DetachInternetGatewayInput) SetInternetGatewayId(v string) *DetachInternetGatewayInput { + s.InternetGatewayId = &v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *DetachInternetGatewayInput) SetVpcId(v string) *DetachInternetGatewayInput { + s.VpcId = &v + return s +} + +type DetachInternetGatewayOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DetachInternetGatewayOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachInternetGatewayOutput) GoString() string { + return s.String() +} + +// Contains the parameters for DetachNetworkInterface. +type DetachNetworkInterfaceInput struct { + _ struct{} `type:"structure"` + + // The ID of the attachment. + // + // AttachmentId is a required field + AttachmentId *string `locationName:"attachmentId" 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 `locationName:"dryRun" type:"boolean"` + + // Specifies whether to force a detachment. + Force *bool `locationName:"force" type:"boolean"` +} + +// String returns the string representation +func (s DetachNetworkInterfaceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachNetworkInterfaceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DetachNetworkInterfaceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DetachNetworkInterfaceInput"} + if s.AttachmentId == nil { + invalidParams.Add(request.NewErrParamRequired("AttachmentId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAttachmentId sets the AttachmentId field's value. +func (s *DetachNetworkInterfaceInput) SetAttachmentId(v string) *DetachNetworkInterfaceInput { + s.AttachmentId = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *DetachNetworkInterfaceInput) SetDryRun(v bool) *DetachNetworkInterfaceInput { + s.DryRun = &v + return s +} + +// SetForce sets the Force field's value. +func (s *DetachNetworkInterfaceInput) SetForce(v bool) *DetachNetworkInterfaceInput { + s.Force = &v + return s +} + +type DetachNetworkInterfaceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DetachNetworkInterfaceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachNetworkInterfaceOutput) GoString() string { + return s.String() +} + +// Contains the parameters for DetachVolume. +type DetachVolumeInput struct { + _ struct{} `type:"structure"` + + // The device name. + Device *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 `locationName:"dryRun" type:"boolean"` + + // Forces detachment if the previous detachment attempt did not occur cleanly + // (for example, logging into an instance, unmounting the volume, and detaching + // normally). This option can lead to data loss or a corrupted file system. + // Use this option only as a last resort to detach a volume from a failed instance. + // The instance won't have an opportunity to flush file system caches or file + // system metadata. If you use this option, you must perform file system check + // and repair procedures. + Force *bool `type:"boolean"` + + // The ID of the instance. + InstanceId *string `type:"string"` + + // The ID of the volume. + // + // VolumeId is a required field + VolumeId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DetachVolumeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachVolumeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DetachVolumeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DetachVolumeInput"} + if s.VolumeId == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDevice sets the Device field's value. +func (s *DetachVolumeInput) SetDevice(v string) *DetachVolumeInput { + s.Device = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *DetachVolumeInput) SetDryRun(v bool) *DetachVolumeInput { + s.DryRun = &v + return s +} + +// SetForce sets the Force field's value. +func (s *DetachVolumeInput) SetForce(v bool) *DetachVolumeInput { + s.Force = &v + return s +} + +// SetInstanceId sets the InstanceId field's value. +func (s *DetachVolumeInput) SetInstanceId(v string) *DetachVolumeInput { + s.InstanceId = &v + return s +} + +// SetVolumeId sets the VolumeId field's value. +func (s *DetachVolumeInput) SetVolumeId(v string) *DetachVolumeInput { + s.VolumeId = &v + return s +} + +// Contains the parameters for DetachVpnGateway. +type DetachVpnGatewayInput 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 `locationName:"dryRun" type:"boolean"` + + // The ID of the VPC. + // + // VpcId is a required field + VpcId *string `type:"string" required:"true"` + + // The ID of the virtual private gateway. + // + // VpnGatewayId is a required field + VpnGatewayId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DetachVpnGatewayInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachVpnGatewayInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DetachVpnGatewayInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DetachVpnGatewayInput"} + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) + } + if s.VpnGatewayId == nil { + invalidParams.Add(request.NewErrParamRequired("VpnGatewayId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DetachVpnGatewayInput) SetDryRun(v bool) *DetachVpnGatewayInput { + s.DryRun = &v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *DetachVpnGatewayInput) SetVpcId(v string) *DetachVpnGatewayInput { + s.VpcId = &v + return s +} + +// SetVpnGatewayId sets the VpnGatewayId field's value. +func (s *DetachVpnGatewayInput) SetVpnGatewayId(v string) *DetachVpnGatewayInput { + s.VpnGatewayId = &v + return s +} + +type DetachVpnGatewayOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DetachVpnGatewayOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachVpnGatewayOutput) GoString() string { + return s.String() +} + +// Describes a DHCP configuration option. +type DhcpConfiguration struct { + _ struct{} `type:"structure"` + + // The name of a DHCP option. + Key *string `locationName:"key" type:"string"` + + // One or more values for the DHCP option. + Values []*AttributeValue `locationName:"valueSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DhcpConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DhcpConfiguration) GoString() string { + return s.String() +} + +// SetKey sets the Key field's value. +func (s *DhcpConfiguration) SetKey(v string) *DhcpConfiguration { + s.Key = &v + return s +} + +// SetValues sets the Values field's value. +func (s *DhcpConfiguration) SetValues(v []*AttributeValue) *DhcpConfiguration { + s.Values = v + return s +} + +// Describes a set of DHCP options. +type DhcpOptions struct { + _ struct{} `type:"structure"` + + // One or more DHCP options in the set. + DhcpConfigurations []*DhcpConfiguration `locationName:"dhcpConfigurationSet" locationNameList:"item" type:"list"` + + // The ID of the set of DHCP options. + DhcpOptionsId *string `locationName:"dhcpOptionsId" type:"string"` + + // The ID of the AWS account that owns the DHCP options set. + OwnerId *string `locationName:"ownerId" type:"string"` + + // Any tags assigned to the DHCP options set. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DhcpOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DhcpOptions) GoString() string { + return s.String() +} + +// SetDhcpConfigurations sets the DhcpConfigurations field's value. +func (s *DhcpOptions) SetDhcpConfigurations(v []*DhcpConfiguration) *DhcpOptions { + s.DhcpConfigurations = v + return s +} + +// SetDhcpOptionsId sets the DhcpOptionsId field's value. +func (s *DhcpOptions) SetDhcpOptionsId(v string) *DhcpOptions { + s.DhcpOptionsId = &v + return s +} + +// SetOwnerId sets the OwnerId field's value. +func (s *DhcpOptions) SetOwnerId(v string) *DhcpOptions { + s.OwnerId = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *DhcpOptions) SetTags(v []*Tag) *DhcpOptions { + s.Tags = v + return s +} + +// Describes an Active Directory. +type DirectoryServiceAuthentication struct { + _ struct{} `type:"structure"` + + // The ID of the Active Directory used for authentication. + DirectoryId *string `locationName:"directoryId" type:"string"` +} + +// String returns the string representation +func (s DirectoryServiceAuthentication) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DirectoryServiceAuthentication) GoString() string { + return s.String() +} + +// SetDirectoryId sets the DirectoryId field's value. +func (s *DirectoryServiceAuthentication) SetDirectoryId(v string) *DirectoryServiceAuthentication { + s.DirectoryId = &v + return s +} + +// Describes the Active Directory to be used for client authentication. +type DirectoryServiceAuthenticationRequest struct { + _ struct{} `type:"structure"` + + // The ID of the Active Directory to be used for authentication. + DirectoryId *string `type:"string"` +} + +// String returns the string representation +func (s DirectoryServiceAuthenticationRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DirectoryServiceAuthenticationRequest) GoString() string { + return s.String() +} + +// SetDirectoryId sets the DirectoryId field's value. +func (s *DirectoryServiceAuthenticationRequest) SetDirectoryId(v string) *DirectoryServiceAuthenticationRequest { + s.DirectoryId = &v + return s +} + +type DisableTransitGatewayRouteTablePropagationInput 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 attachment. + // + // TransitGatewayAttachmentId is a required field + TransitGatewayAttachmentId *string `type:"string" required:"true"` + + // The ID of the propagation route table. + // + // TransitGatewayRouteTableId is a required field + TransitGatewayRouteTableId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DisableTransitGatewayRouteTablePropagationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableTransitGatewayRouteTablePropagationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisableTransitGatewayRouteTablePropagationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisableTransitGatewayRouteTablePropagationInput"} + if s.TransitGatewayAttachmentId == nil { + invalidParams.Add(request.NewErrParamRequired("TransitGatewayAttachmentId")) + } + if s.TransitGatewayRouteTableId == nil { + invalidParams.Add(request.NewErrParamRequired("TransitGatewayRouteTableId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DisableTransitGatewayRouteTablePropagationInput) SetDryRun(v bool) *DisableTransitGatewayRouteTablePropagationInput { + s.DryRun = &v + return s +} + +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *DisableTransitGatewayRouteTablePropagationInput) SetTransitGatewayAttachmentId(v string) *DisableTransitGatewayRouteTablePropagationInput { + s.TransitGatewayAttachmentId = &v + return s +} + +// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. +func (s *DisableTransitGatewayRouteTablePropagationInput) SetTransitGatewayRouteTableId(v string) *DisableTransitGatewayRouteTablePropagationInput { + s.TransitGatewayRouteTableId = &v + return s +} + +type DisableTransitGatewayRouteTablePropagationOutput struct { + _ struct{} `type:"structure"` + + // Information about route propagation. + Propagation *TransitGatewayPropagation `locationName:"propagation" type:"structure"` +} + +// String returns the string representation +func (s DisableTransitGatewayRouteTablePropagationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableTransitGatewayRouteTablePropagationOutput) GoString() string { + return s.String() +} + +// SetPropagation sets the Propagation field's value. +func (s *DisableTransitGatewayRouteTablePropagationOutput) SetPropagation(v *TransitGatewayPropagation) *DisableTransitGatewayRouteTablePropagationOutput { + s.Propagation = v + return s +} + +// Contains the parameters for DisableVgwRoutePropagation. +type DisableVgwRoutePropagationInput struct { + _ struct{} `type:"structure"` + + // The ID of the virtual private gateway. + // + // GatewayId is a required field + GatewayId *string `type:"string" required:"true"` + + // The ID of the route table. + // + // RouteTableId is a required field + RouteTableId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DisableVgwRoutePropagationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableVgwRoutePropagationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisableVgwRoutePropagationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisableVgwRoutePropagationInput"} + if s.GatewayId == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayId")) + } + if s.RouteTableId == nil { + invalidParams.Add(request.NewErrParamRequired("RouteTableId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGatewayId sets the GatewayId field's value. +func (s *DisableVgwRoutePropagationInput) SetGatewayId(v string) *DisableVgwRoutePropagationInput { + s.GatewayId = &v + return s +} + +// SetRouteTableId sets the RouteTableId field's value. +func (s *DisableVgwRoutePropagationInput) SetRouteTableId(v string) *DisableVgwRoutePropagationInput { + s.RouteTableId = &v return s } -// Contains the output of DescribeSpotFleetInstances. -type DescribeSpotFleetInstancesOutput struct { +type DisableVgwRoutePropagationOutput struct { _ struct{} `type:"structure"` +} - // The running instances. This list is refreshed periodically and might be out - // of date. - // - // ActiveInstances is a required field - ActiveInstances []*ActiveInstance `locationName:"activeInstanceSet" locationNameList:"item" type:"list" required:"true"` +// String returns the string representation +func (s DisableVgwRoutePropagationOutput) String() string { + return awsutil.Prettify(s) +} - // The token required to retrieve the next set of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` +// GoString returns the string representation +func (s DisableVgwRoutePropagationOutput) GoString() string { + return s.String() +} - // The ID of the Spot Fleet request. - // - // SpotFleetRequestId is a required field - SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"` +type DisableVpcClassicLinkDnsSupportInput struct { + _ struct{} `type:"structure"` + + // The ID of the VPC. + VpcId *string `type:"string"` } // String returns the string representation -func (s DescribeSpotFleetInstancesOutput) String() string { +func (s DisableVpcClassicLinkDnsSupportInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeSpotFleetInstancesOutput) GoString() string { +func (s DisableVpcClassicLinkDnsSupportInput) GoString() string { return s.String() } -// SetActiveInstances sets the ActiveInstances field's value. -func (s *DescribeSpotFleetInstancesOutput) SetActiveInstances(v []*ActiveInstance) *DescribeSpotFleetInstancesOutput { - s.ActiveInstances = v +// SetVpcId sets the VpcId field's value. +func (s *DisableVpcClassicLinkDnsSupportInput) SetVpcId(v string) *DisableVpcClassicLinkDnsSupportInput { + s.VpcId = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeSpotFleetInstancesOutput) SetNextToken(v string) *DescribeSpotFleetInstancesOutput { - s.NextToken = &v - return s +type DisableVpcClassicLinkDnsSupportOutput struct { + _ struct{} `type:"structure"` + + // Returns true if the request succeeds; otherwise, it returns an error. + Return *bool `locationName:"return" type:"boolean"` } -// SetSpotFleetRequestId sets the SpotFleetRequestId field's value. -func (s *DescribeSpotFleetInstancesOutput) SetSpotFleetRequestId(v string) *DescribeSpotFleetInstancesOutput { - s.SpotFleetRequestId = &v +// String returns the string representation +func (s DisableVpcClassicLinkDnsSupportOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableVpcClassicLinkDnsSupportOutput) GoString() string { + return s.String() +} + +// SetReturn sets the Return field's value. +func (s *DisableVpcClassicLinkDnsSupportOutput) SetReturn(v bool) *DisableVpcClassicLinkDnsSupportOutput { + s.Return = &v return s } -// Contains the parameters for DescribeSpotFleetRequestHistory. -type DescribeSpotFleetRequestHistoryInput struct { +type DisableVpcClassicLinkInput struct { _ struct{} `type:"structure"` // Checks whether you have the required permissions for the action, without @@ -40975,46 +54069,27 @@ type DescribeSpotFleetRequestHistoryInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // The type of events to describe. By default, all events are described. - EventType *string `locationName:"eventType" type:"string" enum:"EventType"` - - // The maximum number of results to return in a single call. Specify a value - // between 1 and 1000. The default value is 1000. To retrieve the remaining - // results, make another call with the returned NextToken value. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The token for the next set of results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The ID of the Spot Fleet request. - // - // SpotFleetRequestId is a required field - SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"` - - // The starting date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + // The ID of the VPC. // - // StartTime is a required field - StartTime *time.Time `locationName:"startTime" type:"timestamp" required:"true"` + // VpcId is a required field + VpcId *string `locationName:"vpcId" type:"string" required:"true"` } // String returns the string representation -func (s DescribeSpotFleetRequestHistoryInput) String() string { +func (s DisableVpcClassicLinkInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeSpotFleetRequestHistoryInput) GoString() string { +func (s DisableVpcClassicLinkInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeSpotFleetRequestHistoryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeSpotFleetRequestHistoryInput"} - if s.SpotFleetRequestId == nil { - invalidParams.Add(request.NewErrParamRequired("SpotFleetRequestId")) - } - if s.StartTime == nil { - invalidParams.Add(request.NewErrParamRequired("StartTime")) +func (s *DisableVpcClassicLinkInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisableVpcClassicLinkInput"} + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) } if invalidParams.Len() > 0 { @@ -41024,577 +54099,724 @@ func (s *DescribeSpotFleetRequestHistoryInput) Validate() error { } // SetDryRun sets the DryRun field's value. -func (s *DescribeSpotFleetRequestHistoryInput) SetDryRun(v bool) *DescribeSpotFleetRequestHistoryInput { +func (s *DisableVpcClassicLinkInput) SetDryRun(v bool) *DisableVpcClassicLinkInput { s.DryRun = &v return s } -// SetEventType sets the EventType field's value. -func (s *DescribeSpotFleetRequestHistoryInput) SetEventType(v string) *DescribeSpotFleetRequestHistoryInput { - s.EventType = &v +// SetVpcId sets the VpcId field's value. +func (s *DisableVpcClassicLinkInput) SetVpcId(v string) *DisableVpcClassicLinkInput { + s.VpcId = &v return s } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeSpotFleetRequestHistoryInput) SetMaxResults(v int64) *DescribeSpotFleetRequestHistoryInput { - s.MaxResults = &v - return s +type DisableVpcClassicLinkOutput struct { + _ struct{} `type:"structure"` + + // Returns true if the request succeeds; otherwise, it returns an error. + Return *bool `locationName:"return" type:"boolean"` } -// SetNextToken sets the NextToken field's value. -func (s *DescribeSpotFleetRequestHistoryInput) SetNextToken(v string) *DescribeSpotFleetRequestHistoryInput { - s.NextToken = &v - return s +// String returns the string representation +func (s DisableVpcClassicLinkOutput) String() string { + return awsutil.Prettify(s) } -// SetSpotFleetRequestId sets the SpotFleetRequestId field's value. -func (s *DescribeSpotFleetRequestHistoryInput) SetSpotFleetRequestId(v string) *DescribeSpotFleetRequestHistoryInput { - s.SpotFleetRequestId = &v - return s +// GoString returns the string representation +func (s DisableVpcClassicLinkOutput) GoString() string { + return s.String() } -// SetStartTime sets the StartTime field's value. -func (s *DescribeSpotFleetRequestHistoryInput) SetStartTime(v time.Time) *DescribeSpotFleetRequestHistoryInput { - s.StartTime = &v +// SetReturn sets the Return field's value. +func (s *DisableVpcClassicLinkOutput) SetReturn(v bool) *DisableVpcClassicLinkOutput { + s.Return = &v return s } -// Contains the output of DescribeSpotFleetRequestHistory. -type DescribeSpotFleetRequestHistoryOutput struct { +type DisassociateAddressInput struct { _ struct{} `type:"structure"` - // Information about the events in the history of the Spot Fleet request. - // - // HistoryRecords is a required field - HistoryRecords []*HistoryRecord `locationName:"historyRecordSet" locationNameList:"item" type:"list" required:"true"` - - // The last date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - // All records up to this time were retrieved. - // - // If nextToken indicates that there are more results, this value is not present. - // - // LastEvaluatedTime is a required field - LastEvaluatedTime *time.Time `locationName:"lastEvaluatedTime" type:"timestamp" required:"true"` - - // The token required to retrieve the next set of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` + // [EC2-VPC] The association ID. Required for EC2-VPC. + AssociationId *string `type:"string"` - // The ID of the Spot Fleet request. - // - // SpotFleetRequestId is a required field - SpotFleetRequestId *string `locationName:"spotFleetRequestId" 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 `locationName:"dryRun" type:"boolean"` - // The starting date and time for the events, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - // - // StartTime is a required field - StartTime *time.Time `locationName:"startTime" type:"timestamp" required:"true"` + // [EC2-Classic] The Elastic IP address. Required for EC2-Classic. + PublicIp *string `type:"string"` } // String returns the string representation -func (s DescribeSpotFleetRequestHistoryOutput) String() string { +func (s DisassociateAddressInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeSpotFleetRequestHistoryOutput) GoString() string { +func (s DisassociateAddressInput) GoString() string { return s.String() } -// SetHistoryRecords sets the HistoryRecords field's value. -func (s *DescribeSpotFleetRequestHistoryOutput) SetHistoryRecords(v []*HistoryRecord) *DescribeSpotFleetRequestHistoryOutput { - s.HistoryRecords = v +// SetAssociationId sets the AssociationId field's value. +func (s *DisassociateAddressInput) SetAssociationId(v string) *DisassociateAddressInput { + s.AssociationId = &v return s } -// SetLastEvaluatedTime sets the LastEvaluatedTime field's value. -func (s *DescribeSpotFleetRequestHistoryOutput) SetLastEvaluatedTime(v time.Time) *DescribeSpotFleetRequestHistoryOutput { - s.LastEvaluatedTime = &v +// SetDryRun sets the DryRun field's value. +func (s *DisassociateAddressInput) SetDryRun(v bool) *DisassociateAddressInput { + s.DryRun = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeSpotFleetRequestHistoryOutput) SetNextToken(v string) *DescribeSpotFleetRequestHistoryOutput { - s.NextToken = &v +// SetPublicIp sets the PublicIp field's value. +func (s *DisassociateAddressInput) SetPublicIp(v string) *DisassociateAddressInput { + s.PublicIp = &v return s } -// SetSpotFleetRequestId sets the SpotFleetRequestId field's value. -func (s *DescribeSpotFleetRequestHistoryOutput) SetSpotFleetRequestId(v string) *DescribeSpotFleetRequestHistoryOutput { - s.SpotFleetRequestId = &v - return s +type DisassociateAddressOutput struct { + _ struct{} `type:"structure"` } -// SetStartTime sets the StartTime field's value. -func (s *DescribeSpotFleetRequestHistoryOutput) SetStartTime(v time.Time) *DescribeSpotFleetRequestHistoryOutput { - s.StartTime = &v - return s +// String returns the string representation +func (s DisassociateAddressOutput) String() string { + return awsutil.Prettify(s) } -// Contains the parameters for DescribeSpotFleetRequests. -type DescribeSpotFleetRequestsInput struct { +// GoString returns the string representation +func (s DisassociateAddressOutput) GoString() string { + return s.String() +} + +type DisassociateClientVpnTargetNetworkInput struct { _ struct{} `type:"structure"` + // The ID of the target network association. + // + // AssociationId is a required field + AssociationId *string `type:"string" required:"true"` + + // The ID of the Client VPN endpoint from which to disassociate the target network. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *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 `locationName:"dryRun" type:"boolean"` - - // The maximum number of results to return in a single call. Specify a value - // between 1 and 1000. The default value is 1000. To retrieve the remaining - // results, make another call with the returned NextToken value. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The token for the next set of results. - NextToken *string `locationName:"nextToken" type:"string"` - - // The IDs of the Spot Fleet requests. - SpotFleetRequestIds []*string `locationName:"spotFleetRequestId" locationNameList:"item" type:"list"` + DryRun *bool `type:"boolean"` } // String returns the string representation -func (s DescribeSpotFleetRequestsInput) String() string { +func (s DisassociateClientVpnTargetNetworkInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeSpotFleetRequestsInput) GoString() string { +func (s DisassociateClientVpnTargetNetworkInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateClientVpnTargetNetworkInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateClientVpnTargetNetworkInput"} + if s.AssociationId == nil { + invalidParams.Add(request.NewErrParamRequired("AssociationId")) + } + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAssociationId sets the AssociationId field's value. +func (s *DisassociateClientVpnTargetNetworkInput) SetAssociationId(v string) *DisassociateClientVpnTargetNetworkInput { + s.AssociationId = &v + return s +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *DisassociateClientVpnTargetNetworkInput) SetClientVpnEndpointId(v string) *DisassociateClientVpnTargetNetworkInput { + s.ClientVpnEndpointId = &v + return s +} + // SetDryRun sets the DryRun field's value. -func (s *DescribeSpotFleetRequestsInput) SetDryRun(v bool) *DescribeSpotFleetRequestsInput { +func (s *DisassociateClientVpnTargetNetworkInput) SetDryRun(v bool) *DisassociateClientVpnTargetNetworkInput { s.DryRun = &v return s } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeSpotFleetRequestsInput) SetMaxResults(v int64) *DescribeSpotFleetRequestsInput { - s.MaxResults = &v - return s +type DisassociateClientVpnTargetNetworkOutput struct { + _ struct{} `type:"structure"` + + // The ID of the target network association. + AssociationId *string `locationName:"associationId" type:"string"` + + // The current state of the target network association. + Status *AssociationStatus `locationName:"status" type:"structure"` } -// SetNextToken sets the NextToken field's value. -func (s *DescribeSpotFleetRequestsInput) SetNextToken(v string) *DescribeSpotFleetRequestsInput { - s.NextToken = &v +// String returns the string representation +func (s DisassociateClientVpnTargetNetworkOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateClientVpnTargetNetworkOutput) GoString() string { + return s.String() +} + +// SetAssociationId sets the AssociationId field's value. +func (s *DisassociateClientVpnTargetNetworkOutput) SetAssociationId(v string) *DisassociateClientVpnTargetNetworkOutput { + s.AssociationId = &v return s } -// SetSpotFleetRequestIds sets the SpotFleetRequestIds field's value. -func (s *DescribeSpotFleetRequestsInput) SetSpotFleetRequestIds(v []*string) *DescribeSpotFleetRequestsInput { - s.SpotFleetRequestIds = v +// SetStatus sets the Status field's value. +func (s *DisassociateClientVpnTargetNetworkOutput) SetStatus(v *AssociationStatus) *DisassociateClientVpnTargetNetworkOutput { + s.Status = v return s } -// Contains the output of DescribeSpotFleetRequests. -type DescribeSpotFleetRequestsOutput struct { +type DisassociateIamInstanceProfileInput struct { _ struct{} `type:"structure"` - // The token required to retrieve the next set of results. This value is null - // when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // Information about the configuration of your Spot Fleet. + // The ID of the IAM instance profile association. // - // SpotFleetRequestConfigs is a required field - SpotFleetRequestConfigs []*SpotFleetRequestConfig `locationName:"spotFleetRequestConfigSet" locationNameList:"item" type:"list" required:"true"` + // AssociationId is a required field + AssociationId *string `type:"string" required:"true"` } // String returns the string representation -func (s DescribeSpotFleetRequestsOutput) String() string { +func (s DisassociateIamInstanceProfileInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeSpotFleetRequestsOutput) GoString() string { +func (s DisassociateIamInstanceProfileInput) GoString() string { return s.String() } -// SetNextToken sets the NextToken field's value. -func (s *DescribeSpotFleetRequestsOutput) SetNextToken(v string) *DescribeSpotFleetRequestsOutput { - s.NextToken = &v +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateIamInstanceProfileInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateIamInstanceProfileInput"} + 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 *DisassociateIamInstanceProfileInput) SetAssociationId(v string) *DisassociateIamInstanceProfileInput { + s.AssociationId = &v return s } -// SetSpotFleetRequestConfigs sets the SpotFleetRequestConfigs field's value. -func (s *DescribeSpotFleetRequestsOutput) SetSpotFleetRequestConfigs(v []*SpotFleetRequestConfig) *DescribeSpotFleetRequestsOutput { - s.SpotFleetRequestConfigs = v +type DisassociateIamInstanceProfileOutput struct { + _ struct{} `type:"structure"` + + // Information about the IAM instance profile association. + IamInstanceProfileAssociation *IamInstanceProfileAssociation `locationName:"iamInstanceProfileAssociation" type:"structure"` +} + +// String returns the string representation +func (s DisassociateIamInstanceProfileOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateIamInstanceProfileOutput) GoString() string { + return s.String() +} + +// SetIamInstanceProfileAssociation sets the IamInstanceProfileAssociation field's value. +func (s *DisassociateIamInstanceProfileOutput) SetIamInstanceProfileAssociation(v *IamInstanceProfileAssociation) *DisassociateIamInstanceProfileOutput { + s.IamInstanceProfileAssociation = v return s } -// Contains the parameters for DescribeSpotInstanceRequests. -type DescribeSpotInstanceRequestsInput struct { +type DisassociateRouteTableInput struct { _ struct{} `type:"structure"` + // The association ID representing the current association between the route + // table and subnet. + // + // AssociationId is a required field + AssociationId *string `locationName:"associationId" 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 `locationName:"dryRun" type:"boolean"` +} - // One or more filters. - // - // * availability-zone-group - The Availability Zone group. - // - // * create-time - The time stamp when the Spot Instance request was created. - // - // * fault-code - The fault code related to the request. - // - // * fault-message - The fault message related to the request. - // - // * instance-id - The ID of the instance that fulfilled the request. - // - // * launch-group - The Spot Instance launch group. - // - // * launch.block-device-mapping.delete-on-termination - Indicates whether - // the EBS volume is deleted on instance termination. - // - // * launch.block-device-mapping.device-name - The device name for the volume - // in the block device mapping (for example, /dev/sdh or xvdh). - // - // * launch.block-device-mapping.snapshot-id - The ID of the snapshot for - // the EBS volume. - // - // * launch.block-device-mapping.volume-size - The size of the EBS volume, - // in GiB. - // - // * launch.block-device-mapping.volume-type - The type of EBS volume: gp2 - // for General Purpose SSD, io1 for Provisioned IOPS SSD, st1 for Throughput - // Optimized HDD, sc1for Cold HDD, or standard for Magnetic. - // - // * launch.group-id - The ID of the security group for the instance. - // - // * launch.group-name - The name of the security group for the instance. - // - // * launch.image-id - The ID of the AMI. - // - // * launch.instance-type - The type of instance (for example, m3.medium). - // - // * launch.kernel-id - The kernel ID. - // - // * launch.key-name - The name of the key pair the instance launched with. - // - // * launch.monitoring-enabled - Whether detailed monitoring is enabled for - // the Spot Instance. - // - // * launch.ramdisk-id - The RAM disk ID. - // - // * launched-availability-zone - The Availability Zone in which the request - // is launched. - // - // * network-interface.addresses.primary - Indicates whether the IP address - // is the primary private IP address. - // - // * network-interface.delete-on-termination - Indicates whether the network - // interface is deleted when the instance is terminated. - // - // * network-interface.description - A description of the network interface. - // - // * network-interface.device-index - The index of the device for the network - // interface attachment on the instance. - // - // * network-interface.group-id - The ID of the security group associated - // with the network interface. - // - // * network-interface.network-interface-id - The ID of the network interface. - // - // * network-interface.private-ip-address - The primary private IP address - // of the network interface. - // - // * network-interface.subnet-id - The ID of the subnet for the instance. - // - // * product-description - The product description associated with the instance - // (Linux/UNIX | Windows). - // - // * spot-instance-request-id - The Spot Instance request ID. - // - // * spot-price - The maximum hourly price for any Spot Instance launched - // to fulfill the request. - // - // * state - The state of the Spot Instance request (open | active | closed - // | cancelled | failed). Spot request status information can help you track - // your Amazon EC2 Spot Instance requests. For more information, see Spot - // Request Status (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html) - // in the Amazon EC2 User Guide for Linux Instances. - // - // * status-code - The short code describing the most recent evaluation of - // your Spot Instance request. - // - // * status-message - The message explaining the status of the Spot Instance - // request. - // - // * 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. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - // - // * type - The type of Spot Instance request (one-time | persistent). +// String returns the string representation +func (s DisassociateRouteTableInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateRouteTableInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateRouteTableInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateRouteTableInput"} + 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 *DisassociateRouteTableInput) SetAssociationId(v string) *DisassociateRouteTableInput { + s.AssociationId = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *DisassociateRouteTableInput) SetDryRun(v bool) *DisassociateRouteTableInput { + s.DryRun = &v + return s +} + +type DisassociateRouteTableOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisassociateRouteTableOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateRouteTableOutput) GoString() string { + return s.String() +} + +type DisassociateSubnetCidrBlockInput struct { + _ struct{} `type:"structure"` + + // The association ID for the CIDR block. // - // * valid-from - The start date of the request. + // AssociationId is a required field + AssociationId *string `locationName:"associationId" type:"string" required:"true"` +} + +// String returns the string representation +func (s DisassociateSubnetCidrBlockInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateSubnetCidrBlockInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateSubnetCidrBlockInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateSubnetCidrBlockInput"} + 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 *DisassociateSubnetCidrBlockInput) SetAssociationId(v string) *DisassociateSubnetCidrBlockInput { + s.AssociationId = &v + return s +} + +type DisassociateSubnetCidrBlockOutput struct { + _ struct{} `type:"structure"` + + // Information about the IPv6 CIDR block association. + Ipv6CidrBlockAssociation *SubnetIpv6CidrBlockAssociation `locationName:"ipv6CidrBlockAssociation" type:"structure"` + + // The ID of the subnet. + SubnetId *string `locationName:"subnetId" type:"string"` +} + +// String returns the string representation +func (s DisassociateSubnetCidrBlockOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateSubnetCidrBlockOutput) GoString() string { + return s.String() +} + +// SetIpv6CidrBlockAssociation sets the Ipv6CidrBlockAssociation field's value. +func (s *DisassociateSubnetCidrBlockOutput) SetIpv6CidrBlockAssociation(v *SubnetIpv6CidrBlockAssociation) *DisassociateSubnetCidrBlockOutput { + s.Ipv6CidrBlockAssociation = v + return s +} + +// SetSubnetId sets the SubnetId field's value. +func (s *DisassociateSubnetCidrBlockOutput) SetSubnetId(v string) *DisassociateSubnetCidrBlockOutput { + s.SubnetId = &v + return s +} + +type DisassociateTransitGatewayRouteTableInput 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 attachment. // - // * valid-until - The end date of the request. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + // TransitGatewayAttachmentId is a required field + TransitGatewayAttachmentId *string `type:"string" required:"true"` - // One or more Spot Instance request IDs. - SpotInstanceRequestIds []*string `locationName:"SpotInstanceRequestId" locationNameList:"SpotInstanceRequestId" type:"list"` + // The ID of the transit gateway route table. + // + // TransitGatewayRouteTableId is a required field + TransitGatewayRouteTableId *string `type:"string" required:"true"` } // String returns the string representation -func (s DescribeSpotInstanceRequestsInput) String() string { +func (s DisassociateTransitGatewayRouteTableInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeSpotInstanceRequestsInput) GoString() string { +func (s DisassociateTransitGatewayRouteTableInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateTransitGatewayRouteTableInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateTransitGatewayRouteTableInput"} + if s.TransitGatewayAttachmentId == nil { + invalidParams.Add(request.NewErrParamRequired("TransitGatewayAttachmentId")) + } + if s.TransitGatewayRouteTableId == nil { + invalidParams.Add(request.NewErrParamRequired("TransitGatewayRouteTableId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetDryRun sets the DryRun field's value. -func (s *DescribeSpotInstanceRequestsInput) SetDryRun(v bool) *DescribeSpotInstanceRequestsInput { +func (s *DisassociateTransitGatewayRouteTableInput) SetDryRun(v bool) *DisassociateTransitGatewayRouteTableInput { s.DryRun = &v return s } -// SetFilters sets the Filters field's value. -func (s *DescribeSpotInstanceRequestsInput) SetFilters(v []*Filter) *DescribeSpotInstanceRequestsInput { - s.Filters = v +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *DisassociateTransitGatewayRouteTableInput) SetTransitGatewayAttachmentId(v string) *DisassociateTransitGatewayRouteTableInput { + s.TransitGatewayAttachmentId = &v return s } -// SetSpotInstanceRequestIds sets the SpotInstanceRequestIds field's value. -func (s *DescribeSpotInstanceRequestsInput) SetSpotInstanceRequestIds(v []*string) *DescribeSpotInstanceRequestsInput { - s.SpotInstanceRequestIds = v +// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. +func (s *DisassociateTransitGatewayRouteTableInput) SetTransitGatewayRouteTableId(v string) *DisassociateTransitGatewayRouteTableInput { + s.TransitGatewayRouteTableId = &v return s } -// Contains the output of DescribeSpotInstanceRequests. -type DescribeSpotInstanceRequestsOutput struct { +type DisassociateTransitGatewayRouteTableOutput struct { _ struct{} `type:"structure"` - // One or more Spot Instance requests. - SpotInstanceRequests []*SpotInstanceRequest `locationName:"spotInstanceRequestSet" locationNameList:"item" type:"list"` + // Information about the association. + Association *TransitGatewayAssociation `locationName:"association" type:"structure"` } // String returns the string representation -func (s DescribeSpotInstanceRequestsOutput) String() string { +func (s DisassociateTransitGatewayRouteTableOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeSpotInstanceRequestsOutput) GoString() string { +func (s DisassociateTransitGatewayRouteTableOutput) GoString() string { return s.String() } -// SetSpotInstanceRequests sets the SpotInstanceRequests field's value. -func (s *DescribeSpotInstanceRequestsOutput) SetSpotInstanceRequests(v []*SpotInstanceRequest) *DescribeSpotInstanceRequestsOutput { - s.SpotInstanceRequests = v +// SetAssociation sets the Association field's value. +func (s *DisassociateTransitGatewayRouteTableOutput) SetAssociation(v *TransitGatewayAssociation) *DisassociateTransitGatewayRouteTableOutput { + s.Association = v return s } -// Contains the parameters for DescribeSpotPriceHistory. -type DescribeSpotPriceHistoryInput struct { +type DisassociateVpcCidrBlockInput struct { _ struct{} `type:"structure"` - // Filters the results by the specified Availability Zone. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` + // The association ID for the CIDR block. + // + // AssociationId is a required field + AssociationId *string `locationName:"associationId" 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 `locationName:"dryRun" type:"boolean"` +// String returns the string representation +func (s DisassociateVpcCidrBlockInput) String() string { + return awsutil.Prettify(s) +} - // The date and time, up to the current date, from which to stop retrieving - // the price history data, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - EndTime *time.Time `locationName:"endTime" type:"timestamp"` +// GoString returns the string representation +func (s DisassociateVpcCidrBlockInput) GoString() string { + return s.String() +} - // One or more filters. - // - // * availability-zone - The Availability Zone for which prices should be - // returned. - // - // * instance-type - The type of instance (for example, m3.medium). - // - // * product-description - The product description for the Spot price (Linux/UNIX - // | SUSE Linux | Windows | Linux/UNIX (Amazon VPC) | SUSE Linux (Amazon - // VPC) | Windows (Amazon VPC)). - // - // * spot-price - The Spot price. The value must match exactly (or use wildcards; - // greater than or less than comparison is not supported). - // - // * timestamp - The time stamp of the Spot price history, in UTC format - // (for example, YYYY-MM-DDTHH:MM:SSZ). You can use wildcards (* and ?). - // Greater than or less than comparison is not supported. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateVpcCidrBlockInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateVpcCidrBlockInput"} + if s.AssociationId == nil { + invalidParams.Add(request.NewErrParamRequired("AssociationId")) + } - // Filters the results by the specified instance types. - InstanceTypes []*string `locationName:"InstanceType" type:"list"` + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} - // The maximum number of results to return in a single call. Specify a value - // between 1 and 1000. The default value is 1000. To retrieve the remaining - // results, make another call with the returned NextToken value. - MaxResults *int64 `locationName:"maxResults" type:"integer"` +// SetAssociationId sets the AssociationId field's value. +func (s *DisassociateVpcCidrBlockInput) SetAssociationId(v string) *DisassociateVpcCidrBlockInput { + s.AssociationId = &v + return s +} - // The token for the next set of results. - NextToken *string `locationName:"nextToken" type:"string"` +type DisassociateVpcCidrBlockOutput struct { + _ struct{} `type:"structure"` - // Filters the results by the specified basic product descriptions. - ProductDescriptions []*string `locationName:"ProductDescription" type:"list"` + // Information about the IPv4 CIDR block association. + CidrBlockAssociation *VpcCidrBlockAssociation `locationName:"cidrBlockAssociation" type:"structure"` - // The date and time, up to the past 90 days, from which to start retrieving - // the price history data, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - StartTime *time.Time `locationName:"startTime" type:"timestamp"` + // Information about the IPv6 CIDR block association. + Ipv6CidrBlockAssociation *VpcIpv6CidrBlockAssociation `locationName:"ipv6CidrBlockAssociation" type:"structure"` + + // The ID of the VPC. + VpcId *string `locationName:"vpcId" type:"string"` } // String returns the string representation -func (s DescribeSpotPriceHistoryInput) String() string { +func (s DisassociateVpcCidrBlockOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeSpotPriceHistoryInput) GoString() string { +func (s DisassociateVpcCidrBlockOutput) GoString() string { return s.String() } -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *DescribeSpotPriceHistoryInput) SetAvailabilityZone(v string) *DescribeSpotPriceHistoryInput { - s.AvailabilityZone = &v +// SetCidrBlockAssociation sets the CidrBlockAssociation field's value. +func (s *DisassociateVpcCidrBlockOutput) SetCidrBlockAssociation(v *VpcCidrBlockAssociation) *DisassociateVpcCidrBlockOutput { + s.CidrBlockAssociation = v return s } -// SetDryRun sets the DryRun field's value. -func (s *DescribeSpotPriceHistoryInput) SetDryRun(v bool) *DescribeSpotPriceHistoryInput { - s.DryRun = &v +// SetIpv6CidrBlockAssociation sets the Ipv6CidrBlockAssociation field's value. +func (s *DisassociateVpcCidrBlockOutput) SetIpv6CidrBlockAssociation(v *VpcIpv6CidrBlockAssociation) *DisassociateVpcCidrBlockOutput { + s.Ipv6CidrBlockAssociation = v return s } -// SetEndTime sets the EndTime field's value. -func (s *DescribeSpotPriceHistoryInput) SetEndTime(v time.Time) *DescribeSpotPriceHistoryInput { - s.EndTime = &v +// SetVpcId sets the VpcId field's value. +func (s *DisassociateVpcCidrBlockOutput) SetVpcId(v string) *DisassociateVpcCidrBlockOutput { + s.VpcId = &v return s } -// SetFilters sets the Filters field's value. -func (s *DescribeSpotPriceHistoryInput) SetFilters(v []*Filter) *DescribeSpotPriceHistoryInput { - s.Filters = v - return s +// Describes a disk image. +type DiskImage struct { + _ struct{} `type:"structure"` + + // A description of the disk image. + Description *string `type:"string"` + + // Information about the disk image. + Image *DiskImageDetail `type:"structure"` + + // Information about the volume. + Volume *VolumeDetail `type:"structure"` } -// SetInstanceTypes sets the InstanceTypes field's value. -func (s *DescribeSpotPriceHistoryInput) SetInstanceTypes(v []*string) *DescribeSpotPriceHistoryInput { - s.InstanceTypes = v - return s +// String returns the string representation +func (s DiskImage) String() string { + return awsutil.Prettify(s) } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeSpotPriceHistoryInput) SetMaxResults(v int64) *DescribeSpotPriceHistoryInput { - s.MaxResults = &v - return s +// GoString returns the string representation +func (s DiskImage) GoString() string { + return s.String() } -// SetNextToken sets the NextToken field's value. -func (s *DescribeSpotPriceHistoryInput) SetNextToken(v string) *DescribeSpotPriceHistoryInput { - s.NextToken = &v +// Validate inspects the fields of the type to determine if they are valid. +func (s *DiskImage) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DiskImage"} + if s.Image != nil { + if err := s.Image.Validate(); err != nil { + invalidParams.AddNested("Image", err.(request.ErrInvalidParams)) + } + } + if s.Volume != nil { + if err := s.Volume.Validate(); err != nil { + invalidParams.AddNested("Volume", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *DiskImage) SetDescription(v string) *DiskImage { + s.Description = &v return s } -// SetProductDescriptions sets the ProductDescriptions field's value. -func (s *DescribeSpotPriceHistoryInput) SetProductDescriptions(v []*string) *DescribeSpotPriceHistoryInput { - s.ProductDescriptions = v +// SetImage sets the Image field's value. +func (s *DiskImage) SetImage(v *DiskImageDetail) *DiskImage { + s.Image = v return s } -// SetStartTime sets the StartTime field's value. -func (s *DescribeSpotPriceHistoryInput) SetStartTime(v time.Time) *DescribeSpotPriceHistoryInput { - s.StartTime = &v +// SetVolume sets the Volume field's value. +func (s *DiskImage) SetVolume(v *VolumeDetail) *DiskImage { + s.Volume = v return s } -// Contains the output of DescribeSpotPriceHistory. -type DescribeSpotPriceHistoryOutput struct { +// Describes a disk image. +type DiskImageDescription struct { _ struct{} `type:"structure"` - // The token required to retrieve the next set of results. This value is null - // or an empty string when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` + // The checksum computed for the disk image. + Checksum *string `locationName:"checksum" type:"string"` - // The historical Spot prices. - SpotPriceHistory []*SpotPrice `locationName:"spotPriceHistorySet" locationNameList:"item" type:"list"` + // The disk image format. + Format *string `locationName:"format" type:"string" enum:"DiskImageFormat"` + + // A presigned URL for the import manifest stored in Amazon S3. For information + // about creating a presigned URL for an Amazon S3 object, read the "Query String + // Request Authentication Alternative" section of the Authenticating REST Requests + // (http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html) + // topic in the Amazon Simple Storage Service Developer Guide. + // + // For information about the import manifest referenced by this API action, + // see VM Import Manifest (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html). + ImportManifestUrl *string `locationName:"importManifestUrl" type:"string"` + + // The size of the disk image, in GiB. + Size *int64 `locationName:"size" type:"long"` } // String returns the string representation -func (s DescribeSpotPriceHistoryOutput) String() string { +func (s DiskImageDescription) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeSpotPriceHistoryOutput) GoString() string { +func (s DiskImageDescription) GoString() string { return s.String() } -// SetNextToken sets the NextToken field's value. -func (s *DescribeSpotPriceHistoryOutput) SetNextToken(v string) *DescribeSpotPriceHistoryOutput { - s.NextToken = &v +// SetChecksum sets the Checksum field's value. +func (s *DiskImageDescription) SetChecksum(v string) *DiskImageDescription { + s.Checksum = &v return s } -// SetSpotPriceHistory sets the SpotPriceHistory field's value. -func (s *DescribeSpotPriceHistoryOutput) SetSpotPriceHistory(v []*SpotPrice) *DescribeSpotPriceHistoryOutput { - s.SpotPriceHistory = v +// SetFormat sets the Format field's value. +func (s *DiskImageDescription) SetFormat(v string) *DiskImageDescription { + s.Format = &v return s } -type DescribeStaleSecurityGroupsInput struct { - _ struct{} `type:"structure"` +// SetImportManifestUrl sets the ImportManifestUrl field's value. +func (s *DiskImageDescription) SetImportManifestUrl(v string) *DiskImageDescription { + s.ImportManifestUrl = &v + return s +} - // Checks whether you have the required permissions for the operation, 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"` +// SetSize sets the Size field's value. +func (s *DiskImageDescription) SetSize(v int64) *DiskImageDescription { + s.Size = &v + return s +} - // The maximum number of items to return for this request. The request returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `min:"5" type:"integer"` +// Describes a disk image. +type DiskImageDetail struct { + _ struct{} `type:"structure"` - // The token for the next set of items to return. (You received this token from - // a prior call.) - NextToken *string `min:"1" type:"string"` + // The size of the disk image, in GiB. + // + // Bytes is a required field + Bytes *int64 `locationName:"bytes" type:"long" required:"true"` - // The ID of the VPC. + // The disk image format. // - // VpcId is a required field - VpcId *string `type:"string" required:"true"` + // Format is a required field + Format *string `locationName:"format" type:"string" required:"true" enum:"DiskImageFormat"` + + // A presigned URL for the import manifest stored in Amazon S3 and presented + // here as an Amazon S3 presigned URL. For information about creating a presigned + // URL for an Amazon S3 object, read the "Query String Request Authentication + // Alternative" section of the Authenticating REST Requests (http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html) + // topic in the Amazon Simple Storage Service Developer Guide. + // + // For information about the import manifest referenced by this API action, + // see VM Import Manifest (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html). + // + // ImportManifestUrl is a required field + ImportManifestUrl *string `locationName:"importManifestUrl" type:"string" required:"true"` } // String returns the string representation -func (s DescribeStaleSecurityGroupsInput) String() string { +func (s DiskImageDetail) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeStaleSecurityGroupsInput) GoString() string { +func (s DiskImageDetail) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeStaleSecurityGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeStaleSecurityGroupsInput"} - if s.MaxResults != nil && *s.MaxResults < 5 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) +func (s *DiskImageDetail) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DiskImageDetail"} + if s.Bytes == nil { + invalidParams.Add(request.NewErrParamRequired("Bytes")) } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + if s.Format == nil { + invalidParams.Add(request.NewErrParamRequired("Format")) } - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) + if s.ImportManifestUrl == nil { + invalidParams.Add(request.NewErrParamRequired("ImportManifestUrl")) } if invalidParams.Len() > 0 { @@ -41603,808 +54825,701 @@ func (s *DescribeStaleSecurityGroupsInput) Validate() error { return nil } -// SetDryRun sets the DryRun field's value. -func (s *DescribeStaleSecurityGroupsInput) SetDryRun(v bool) *DescribeStaleSecurityGroupsInput { - s.DryRun = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeStaleSecurityGroupsInput) SetMaxResults(v int64) *DescribeStaleSecurityGroupsInput { - s.MaxResults = &v +// SetBytes sets the Bytes field's value. +func (s *DiskImageDetail) SetBytes(v int64) *DiskImageDetail { + s.Bytes = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeStaleSecurityGroupsInput) SetNextToken(v string) *DescribeStaleSecurityGroupsInput { - s.NextToken = &v +// SetFormat sets the Format field's value. +func (s *DiskImageDetail) SetFormat(v string) *DiskImageDetail { + s.Format = &v return s } -// SetVpcId sets the VpcId field's value. -func (s *DescribeStaleSecurityGroupsInput) SetVpcId(v string) *DescribeStaleSecurityGroupsInput { - s.VpcId = &v +// SetImportManifestUrl sets the ImportManifestUrl field's value. +func (s *DiskImageDetail) SetImportManifestUrl(v string) *DiskImageDetail { + s.ImportManifestUrl = &v return s } -type DescribeStaleSecurityGroupsOutput struct { +// Describes a disk image volume. +type DiskImageVolumeDescription struct { _ struct{} `type:"structure"` - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `locationName:"nextToken" type:"string"` + // The volume identifier. + Id *string `locationName:"id" type:"string"` - // Information about the stale security groups. - StaleSecurityGroupSet []*StaleSecurityGroup `locationName:"staleSecurityGroupSet" locationNameList:"item" type:"list"` + // The size of the volume, in GiB. + Size *int64 `locationName:"size" type:"long"` } // String returns the string representation -func (s DescribeStaleSecurityGroupsOutput) String() string { +func (s DiskImageVolumeDescription) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeStaleSecurityGroupsOutput) GoString() string { +func (s DiskImageVolumeDescription) GoString() string { return s.String() } -// SetNextToken sets the NextToken field's value. -func (s *DescribeStaleSecurityGroupsOutput) SetNextToken(v string) *DescribeStaleSecurityGroupsOutput { - s.NextToken = &v +// SetId sets the Id field's value. +func (s *DiskImageVolumeDescription) SetId(v string) *DiskImageVolumeDescription { + s.Id = &v return s } -// SetStaleSecurityGroupSet sets the StaleSecurityGroupSet field's value. -func (s *DescribeStaleSecurityGroupsOutput) SetStaleSecurityGroupSet(v []*StaleSecurityGroup) *DescribeStaleSecurityGroupsOutput { - s.StaleSecurityGroupSet = v +// SetSize sets the Size field's value. +func (s *DiskImageVolumeDescription) SetSize(v int64) *DiskImageVolumeDescription { + s.Size = &v return s } -// Contains the parameters for DescribeSubnets. -type DescribeSubnetsInput struct { +// Describes a DNS entry. +type DnsEntry 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 `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * availabilityZone - The Availability Zone for the subnet. You can also - // use availability-zone as the filter name. - // - // * available-ip-address-count - The number of IPv4 addresses in the subnet - // that are available. - // - // * cidrBlock - The IPv4 CIDR block of the subnet. The CIDR block you specify - // must exactly match the subnet's CIDR block for information to be returned - // for the subnet. You can also use cidr or cidr-block as the filter names. - // - // * defaultForAz - Indicates whether this is the default subnet for the - // Availability Zone. You can also use default-for-az as the filter name. - // - // * ipv6-cidr-block-association.ipv6-cidr-block - An IPv6 CIDR block associated - // with the subnet. - // - // * ipv6-cidr-block-association.association-id - An association ID for an - // IPv6 CIDR block associated with the subnet. - // - // * ipv6-cidr-block-association.state - The state of an IPv6 CIDR block - // associated with the subnet. - // - // * state - The state of the subnet (pending | available). - // - // * subnet-id - The ID of the subnet. - // - // * 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. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - // - // * vpc-id - The ID of the VPC for the subnet. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + // The DNS name. + DnsName *string `locationName:"dnsName" type:"string"` - // One or more subnet IDs. - // - // Default: Describes all your subnets. - SubnetIds []*string `locationName:"SubnetId" locationNameList:"SubnetId" type:"list"` + // The ID of the private hosted zone. + HostedZoneId *string `locationName:"hostedZoneId" type:"string"` } // String returns the string representation -func (s DescribeSubnetsInput) String() string { +func (s DnsEntry) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeSubnetsInput) GoString() string { +func (s DnsEntry) GoString() string { return s.String() } -// SetDryRun sets the DryRun field's value. -func (s *DescribeSubnetsInput) SetDryRun(v bool) *DescribeSubnetsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeSubnetsInput) SetFilters(v []*Filter) *DescribeSubnetsInput { - s.Filters = v +// SetDnsName sets the DnsName field's value. +func (s *DnsEntry) SetDnsName(v string) *DnsEntry { + s.DnsName = &v return s } -// SetSubnetIds sets the SubnetIds field's value. -func (s *DescribeSubnetsInput) SetSubnetIds(v []*string) *DescribeSubnetsInput { - s.SubnetIds = v +// SetHostedZoneId sets the HostedZoneId field's value. +func (s *DnsEntry) SetHostedZoneId(v string) *DnsEntry { + s.HostedZoneId = &v return s } -// Contains the output of DescribeSubnets. -type DescribeSubnetsOutput struct { +// Information about the DNS server to be used. +type DnsServersOptionsModifyStructure struct { _ struct{} `type:"structure"` - // Information about one or more subnets. - Subnets []*Subnet `locationName:"subnetSet" locationNameList:"item" type:"list"` + // The IPv4 address range, in CIDR notation, of the DNS servers to be used. + // You can specify up to two DNS servers. Ensure that the DNS servers can be + // reached by the clients. The specified values overwrite the existing values. + CustomDnsServers []*string `locationNameList:"item" type:"list"` + + // Indicates whether DNS servers should be used. Specify False to delete the + // existing DNS servers. + Enabled *bool `type:"boolean"` } // String returns the string representation -func (s DescribeSubnetsOutput) String() string { +func (s DnsServersOptionsModifyStructure) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeSubnetsOutput) GoString() string { +func (s DnsServersOptionsModifyStructure) GoString() string { return s.String() } -// SetSubnets sets the Subnets field's value. -func (s *DescribeSubnetsOutput) SetSubnets(v []*Subnet) *DescribeSubnetsOutput { - s.Subnets = v +// SetCustomDnsServers sets the CustomDnsServers field's value. +func (s *DnsServersOptionsModifyStructure) SetCustomDnsServers(v []*string) *DnsServersOptionsModifyStructure { + s.CustomDnsServers = v return s } -// Contains the parameters for DescribeTags. -type DescribeTagsInput struct { +// SetEnabled sets the Enabled field's value. +func (s *DnsServersOptionsModifyStructure) SetEnabled(v bool) *DnsServersOptionsModifyStructure { + s.Enabled = &v + return s +} + +// Describes a block device for an EBS volume. +type EbsBlockDevice 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 `locationName:"dryRun" type:"boolean"` + // Indicates whether the EBS volume is deleted on instance termination. + DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` - // One or more filters. - // - // * key - The tag key. + // Indicates whether the EBS volume is encrypted. Encrypted volumes can only + // be attached to instances that support Amazon EBS encryption. + // + // If you are creating a volume from a snapshot, you cannot specify an encryption + // value. This is because only blank volumes can be encrypted on creation. If + // you are creating a snapshot from an existing EBS volume, you cannot specify + // an encryption value that differs from that of the EBS volume. We recommend + // that you omit the encryption value from the block device mappings when creating + // an image from an instance. + Encrypted *bool `locationName:"encrypted" type:"boolean"` + + // The number of I/O operations per second (IOPS) that the volume supports. + // For io1, this represents the number of IOPS that are provisioned for the + // volume. For gp2, this represents the baseline performance of the volume and + // the rate at which the volume accumulates I/O credits for bursting. For more + // information about General Purpose SSD baseline performance, I/O credits, + // and bursting, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) + // in the Amazon Elastic Compute Cloud User Guide. // - // * resource-id - The resource ID. + // Constraints: Range is 100-16,000 IOPS for gp2 volumes and 100 to 64,000IOPS + // for io1 volumes in most Regions. Maximum io1IOPS of 64,000 is guaranteed + // only on Nitro-based instances (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 (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) + // in the Amazon Elastic Compute Cloud User Guide. // - // * resource-type - The resource type (customer-gateway | dhcp-options | - // elastic-ip | fleet | fpga-image | image | instance | internet-gateway - // | launch-template | natgateway | network-acl | network-interface | reserved-instances - // | route-table | security-group | snapshot | spot-instances-request | subnet - // | volume | vpc | vpc-peering-connection | vpn-connection | vpn-gateway). + // Condition: This parameter is required for requests to create io1 volumes; + // it is not used in requests to create gp2, st1, sc1, or standard volumes. + Iops *int64 `locationName:"iops" type:"integer"` + + // Identifier (key ID, key alias, ID ARN, or alias ARN) for a user-managed CMK + // under which the EBS volume is encrypted. // - // * value - The tag value. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + // This parameter is only supported on BlockDeviceMapping objects called by + // RunInstances (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html), + // RequestSpotFleet (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotFleet.html), + // and RequestSpotInstances (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotInstances.html). + KmsKeyId *string `type:"string"` - // The maximum number of results to return in a single call. This value can - // be between 5 and 1000. To retrieve the remaining results, make another call - // with the returned NextToken value. - MaxResults *int64 `locationName:"maxResults" type:"integer"` + // The ID of the snapshot. + SnapshotId *string `locationName:"snapshotId" type:"string"` - // The token to retrieve the next page of results. - NextToken *string `locationName:"nextToken" type:"string"` + // The size of the volume, in GiB. + // + // Constraints: 1-16384 for General Purpose SSD (gp2), 4-16384 for Provisioned + // IOPS SSD (io1), 500-16384 for Throughput Optimized HDD (st1), 500-16384 for + // Cold HDD (sc1), and 1-1024 for Magnetic (standard) volumes. If you specify + // a snapshot, the volume size must be equal to or larger than the snapshot + // size. + // + // Default: If you're creating the volume from a snapshot and don't specify + // a volume size, the default is the snapshot size. + VolumeSize *int64 `locationName:"volumeSize" type:"integer"` + + // The volume type: gp2, io1, st1, sc1, or standard. + // + // Default: standard + VolumeType *string `locationName:"volumeType" type:"string" enum:"VolumeType"` } // String returns the string representation -func (s DescribeTagsInput) String() string { +func (s EbsBlockDevice) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeTagsInput) GoString() string { +func (s EbsBlockDevice) GoString() string { return s.String() } -// SetDryRun sets the DryRun field's value. -func (s *DescribeTagsInput) SetDryRun(v bool) *DescribeTagsInput { - s.DryRun = &v +// SetDeleteOnTermination sets the DeleteOnTermination field's value. +func (s *EbsBlockDevice) SetDeleteOnTermination(v bool) *EbsBlockDevice { + s.DeleteOnTermination = &v return s } -// SetFilters sets the Filters field's value. -func (s *DescribeTagsInput) SetFilters(v []*Filter) *DescribeTagsInput { - s.Filters = v +// SetEncrypted sets the Encrypted field's value. +func (s *EbsBlockDevice) SetEncrypted(v bool) *EbsBlockDevice { + s.Encrypted = &v return s } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeTagsInput) SetMaxResults(v int64) *DescribeTagsInput { - s.MaxResults = &v +// SetIops sets the Iops field's value. +func (s *EbsBlockDevice) SetIops(v int64) *EbsBlockDevice { + s.Iops = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeTagsInput) SetNextToken(v string) *DescribeTagsInput { - s.NextToken = &v +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *EbsBlockDevice) SetKmsKeyId(v string) *EbsBlockDevice { + s.KmsKeyId = &v return s } -// Contains the output of DescribeTags. -type DescribeTagsOutput struct { +// SetSnapshotId sets the SnapshotId field's value. +func (s *EbsBlockDevice) SetSnapshotId(v string) *EbsBlockDevice { + s.SnapshotId = &v + return s +} + +// SetVolumeSize sets the VolumeSize field's value. +func (s *EbsBlockDevice) SetVolumeSize(v int64) *EbsBlockDevice { + s.VolumeSize = &v + return s +} + +// SetVolumeType sets the VolumeType field's value. +func (s *EbsBlockDevice) SetVolumeType(v string) *EbsBlockDevice { + s.VolumeType = &v + return s +} + +// Describes a parameter used to set up an EBS volume in a block device mapping. +type EbsInstanceBlockDevice 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 time stamp when the attachment initiated. + AttachTime *time.Time `locationName:"attachTime" type:"timestamp"` - // A list of tags. - Tags []*TagDescription `locationName:"tagSet" locationNameList:"item" type:"list"` + // Indicates whether the volume is deleted on instance termination. + DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` + + // The attachment state. + Status *string `locationName:"status" type:"string" enum:"AttachmentStatus"` + + // The ID of the EBS volume. + VolumeId *string `locationName:"volumeId" type:"string"` } // String returns the string representation -func (s DescribeTagsOutput) String() string { +func (s EbsInstanceBlockDevice) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeTagsOutput) GoString() string { +func (s EbsInstanceBlockDevice) GoString() string { return s.String() } -// SetNextToken sets the NextToken field's value. -func (s *DescribeTagsOutput) SetNextToken(v string) *DescribeTagsOutput { - s.NextToken = &v +// SetAttachTime sets the AttachTime field's value. +func (s *EbsInstanceBlockDevice) SetAttachTime(v time.Time) *EbsInstanceBlockDevice { + s.AttachTime = &v return s } -// SetTags sets the Tags field's value. -func (s *DescribeTagsOutput) SetTags(v []*TagDescription) *DescribeTagsOutput { - s.Tags = v +// SetDeleteOnTermination sets the DeleteOnTermination field's value. +func (s *EbsInstanceBlockDevice) SetDeleteOnTermination(v bool) *EbsInstanceBlockDevice { + s.DeleteOnTermination = &v return s } -// Contains the parameters for DescribeVolumeAttribute. -type DescribeVolumeAttributeInput struct { - _ struct{} `type:"structure"` +// SetStatus sets the Status field's value. +func (s *EbsInstanceBlockDevice) SetStatus(v string) *EbsInstanceBlockDevice { + s.Status = &v + return s +} - // The attribute of the volume. This parameter is required. - // - // Attribute is a required field - Attribute *string `type:"string" required:"true" enum:"VolumeAttributeName"` +// SetVolumeId sets the VolumeId field's value. +func (s *EbsInstanceBlockDevice) SetVolumeId(v string) *EbsInstanceBlockDevice { + s.VolumeId = &v + return s +} - // 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 `locationName:"dryRun" type:"boolean"` +// Describes information used to set up an EBS volume specified in a block device +// mapping. +type EbsInstanceBlockDeviceSpecification struct { + _ struct{} `type:"structure"` - // The ID of the volume. - // - // VolumeId is a required field - VolumeId *string `type:"string" required:"true"` + // Indicates whether the volume is deleted on instance termination. + DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` + + // The ID of the EBS volume. + VolumeId *string `locationName:"volumeId" type:"string"` } // String returns the string representation -func (s DescribeVolumeAttributeInput) String() string { +func (s EbsInstanceBlockDeviceSpecification) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeVolumeAttributeInput) GoString() string { +func (s EbsInstanceBlockDeviceSpecification) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeVolumeAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeVolumeAttributeInput"} - if s.Attribute == nil { - invalidParams.Add(request.NewErrParamRequired("Attribute")) - } - if s.VolumeId == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttribute sets the Attribute field's value. -func (s *DescribeVolumeAttributeInput) SetAttribute(v string) *DescribeVolumeAttributeInput { - s.Attribute = &v - return s -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeVolumeAttributeInput) SetDryRun(v bool) *DescribeVolumeAttributeInput { - s.DryRun = &v +// SetDeleteOnTermination sets the DeleteOnTermination field's value. +func (s *EbsInstanceBlockDeviceSpecification) SetDeleteOnTermination(v bool) *EbsInstanceBlockDeviceSpecification { + s.DeleteOnTermination = &v return s } // SetVolumeId sets the VolumeId field's value. -func (s *DescribeVolumeAttributeInput) SetVolumeId(v string) *DescribeVolumeAttributeInput { +func (s *EbsInstanceBlockDeviceSpecification) SetVolumeId(v string) *EbsInstanceBlockDeviceSpecification { s.VolumeId = &v return s } -// Contains the output of DescribeVolumeAttribute. -type DescribeVolumeAttributeOutput struct { +// Describes an egress-only internet gateway. +type EgressOnlyInternetGateway struct { _ struct{} `type:"structure"` - // The state of autoEnableIO attribute. - AutoEnableIO *AttributeBooleanValue `locationName:"autoEnableIO" type:"structure"` - - // A list of product codes. - ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` + // Information about the attachment of the egress-only internet gateway. + Attachments []*InternetGatewayAttachment `locationName:"attachmentSet" locationNameList:"item" type:"list"` - // The ID of the volume. - VolumeId *string `locationName:"volumeId" type:"string"` + // The ID of the egress-only internet gateway. + EgressOnlyInternetGatewayId *string `locationName:"egressOnlyInternetGatewayId" type:"string"` } // String returns the string representation -func (s DescribeVolumeAttributeOutput) String() string { +func (s EgressOnlyInternetGateway) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeVolumeAttributeOutput) GoString() string { +func (s EgressOnlyInternetGateway) GoString() string { return s.String() } -// SetAutoEnableIO sets the AutoEnableIO field's value. -func (s *DescribeVolumeAttributeOutput) SetAutoEnableIO(v *AttributeBooleanValue) *DescribeVolumeAttributeOutput { - s.AutoEnableIO = v - return s -} - -// SetProductCodes sets the ProductCodes field's value. -func (s *DescribeVolumeAttributeOutput) SetProductCodes(v []*ProductCode) *DescribeVolumeAttributeOutput { - s.ProductCodes = v +// SetAttachments sets the Attachments field's value. +func (s *EgressOnlyInternetGateway) SetAttachments(v []*InternetGatewayAttachment) *EgressOnlyInternetGateway { + s.Attachments = v return s } -// SetVolumeId sets the VolumeId field's value. -func (s *DescribeVolumeAttributeOutput) SetVolumeId(v string) *DescribeVolumeAttributeOutput { - s.VolumeId = &v +// SetEgressOnlyInternetGatewayId sets the EgressOnlyInternetGatewayId field's value. +func (s *EgressOnlyInternetGateway) SetEgressOnlyInternetGatewayId(v string) *EgressOnlyInternetGateway { + s.EgressOnlyInternetGatewayId = &v return s } -// Contains the parameters for DescribeVolumeStatus. -type DescribeVolumeStatusInput struct { +// Describes the association between an instance and an Elastic Graphics accelerator. +type ElasticGpuAssociation 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 `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * action.code - The action code for the event (for example, enable-volume-io). - // - // * action.description - A description of the action. - // - // * action.event-id - The event ID associated with the action. - // - // * availability-zone - The Availability Zone of the instance. - // - // * event.description - A description of the event. - // - // * event.event-id - The event ID. - // - // * event.event-type - The event type (for io-enabled: passed | failed; - // for io-performance: io-performance:degraded | io-performance:severely-degraded - // | io-performance:stalled). - // - // * event.not-after - The latest end time for the event. - // - // * event.not-before - The earliest start time for the event. - // - // * volume-status.details-name - The cause for volume-status.status (io-enabled - // | io-performance). - // - // * volume-status.details-status - The status of volume-status.details-name - // (for io-enabled: passed | failed; for io-performance: normal | degraded - // | severely-degraded | stalled). - // - // * volume-status.status - The status of the volume (ok | impaired | warning - // | insufficient-data). - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + // The ID of the association. + ElasticGpuAssociationId *string `locationName:"elasticGpuAssociationId" type:"string"` - // The maximum number of volume results returned by DescribeVolumeStatus in - // paginated output. When this parameter is used, the request only returns MaxResults - // results in a single page along with a NextToken response element. The remaining - // results of the initial request can be seen by sending another request with - // the returned NextToken value. This value can be between 5 and 1000; if MaxResults - // is given a value larger than 1000, only 1000 results are returned. If this - // parameter is not used, then DescribeVolumeStatus returns all results. You - // cannot specify this parameter and the volume IDs parameter in the same request. - MaxResults *int64 `type:"integer"` + // The state of the association between the instance and the Elastic Graphics + // accelerator. + ElasticGpuAssociationState *string `locationName:"elasticGpuAssociationState" type:"string"` - // The NextToken value to include in a future DescribeVolumeStatus request. - // When the results of the request exceed MaxResults, this value can be used - // to retrieve the next page of results. This value is null when there are no - // more results to return. - NextToken *string `type:"string"` + // The time the Elastic Graphics accelerator was associated with the instance. + ElasticGpuAssociationTime *string `locationName:"elasticGpuAssociationTime" type:"string"` - // One or more volume IDs. - // - // Default: Describes all your volumes. - VolumeIds []*string `locationName:"VolumeId" locationNameList:"VolumeId" type:"list"` + // The ID of the Elastic Graphics accelerator. + ElasticGpuId *string `locationName:"elasticGpuId" type:"string"` } // String returns the string representation -func (s DescribeVolumeStatusInput) String() string { +func (s ElasticGpuAssociation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeVolumeStatusInput) GoString() string { +func (s ElasticGpuAssociation) GoString() string { return s.String() } -// SetDryRun sets the DryRun field's value. -func (s *DescribeVolumeStatusInput) SetDryRun(v bool) *DescribeVolumeStatusInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeVolumeStatusInput) SetFilters(v []*Filter) *DescribeVolumeStatusInput { - s.Filters = v +// SetElasticGpuAssociationId sets the ElasticGpuAssociationId field's value. +func (s *ElasticGpuAssociation) SetElasticGpuAssociationId(v string) *ElasticGpuAssociation { + s.ElasticGpuAssociationId = &v return s } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeVolumeStatusInput) SetMaxResults(v int64) *DescribeVolumeStatusInput { - s.MaxResults = &v +// SetElasticGpuAssociationState sets the ElasticGpuAssociationState field's value. +func (s *ElasticGpuAssociation) SetElasticGpuAssociationState(v string) *ElasticGpuAssociation { + s.ElasticGpuAssociationState = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeVolumeStatusInput) SetNextToken(v string) *DescribeVolumeStatusInput { - s.NextToken = &v +// SetElasticGpuAssociationTime sets the ElasticGpuAssociationTime field's value. +func (s *ElasticGpuAssociation) SetElasticGpuAssociationTime(v string) *ElasticGpuAssociation { + s.ElasticGpuAssociationTime = &v return s } -// SetVolumeIds sets the VolumeIds field's value. -func (s *DescribeVolumeStatusInput) SetVolumeIds(v []*string) *DescribeVolumeStatusInput { - s.VolumeIds = v +// SetElasticGpuId sets the ElasticGpuId field's value. +func (s *ElasticGpuAssociation) SetElasticGpuId(v string) *ElasticGpuAssociation { + s.ElasticGpuId = &v return s } -// Contains the output of DescribeVolumeStatus. -type DescribeVolumeStatusOutput struct { +// Describes the status of an Elastic Graphics accelerator. +type ElasticGpuHealth 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"` - - // A list of volumes. - VolumeStatuses []*VolumeStatusItem `locationName:"volumeStatusSet" locationNameList:"item" type:"list"` + // The health status. + Status *string `locationName:"status" type:"string" enum:"ElasticGpuStatus"` } // String returns the string representation -func (s DescribeVolumeStatusOutput) String() string { +func (s ElasticGpuHealth) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeVolumeStatusOutput) GoString() string { +func (s ElasticGpuHealth) GoString() string { return s.String() } -// SetNextToken sets the NextToken field's value. -func (s *DescribeVolumeStatusOutput) SetNextToken(v string) *DescribeVolumeStatusOutput { - s.NextToken = &v - return s -} - -// SetVolumeStatuses sets the VolumeStatuses field's value. -func (s *DescribeVolumeStatusOutput) SetVolumeStatuses(v []*VolumeStatusItem) *DescribeVolumeStatusOutput { - s.VolumeStatuses = v +// SetStatus sets the Status field's value. +func (s *ElasticGpuHealth) SetStatus(v string) *ElasticGpuHealth { + s.Status = &v return s } -// Contains the parameters for DescribeVolumes. -type DescribeVolumesInput struct { +// A specification for an Elastic Graphics accelerator. +type ElasticGpuSpecification 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 `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * attachment.attach-time - The time stamp when the attachment initiated. - // - // * attachment.delete-on-termination - Whether the volume is deleted on - // instance termination. - // - // * attachment.device - The device name specified in the block device mapping - // (for example, /dev/sda1). - // - // * attachment.instance-id - The ID of the instance the volume is attached - // to. - // - // * attachment.status - The attachment state (attaching | attached | detaching). - // - // * availability-zone - The Availability Zone in which the volume was created. - // - // * create-time - The time stamp when the volume was created. - // - // * encrypted - The encryption status of the volume. - // - // * size - The size of the volume, in GiB. - // - // * snapshot-id - The snapshot from which the volume was created. - // - // * status - The status of the volume (creating | available | in-use | deleting - // | deleted | error). - // - // * 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. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - // - // * volume-id - The volume ID. + // The type of Elastic Graphics accelerator. // - // * volume-type - The Amazon EBS volume type. This can be gp2 for General - // Purpose SSD, io1 for Provisioned IOPS SSD, st1 for Throughput Optimized - // HDD, sc1 for Cold HDD, or standard for Magnetic volumes. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of volume results returned by DescribeVolumes in paginated - // output. When this parameter is used, DescribeVolumes only returns MaxResults - // results in a single page along with a NextToken response element. The remaining - // results of the initial request can be seen by sending another DescribeVolumes - // request with the returned NextToken value. This value can be between 5 and - // 500; if MaxResults is given a value larger than 500, only 500 results are - // returned. If this parameter is not used, then DescribeVolumes returns all - // results. You cannot specify this parameter and the volume IDs parameter in - // the same request. - MaxResults *int64 `locationName:"maxResults" type:"integer"` - - // The NextToken value returned from a previous paginated DescribeVolumes request - // where MaxResults was used and the results exceeded the value of that parameter. - // Pagination continues from the end of the previous results that returned the - // NextToken value. This value is null when there are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` - - // One or more volume IDs. - VolumeIds []*string `locationName:"VolumeId" locationNameList:"VolumeId" type:"list"` + // Type is a required field + Type *string `type:"string" required:"true"` } // String returns the string representation -func (s DescribeVolumesInput) String() string { +func (s ElasticGpuSpecification) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeVolumesInput) GoString() string { +func (s ElasticGpuSpecification) GoString() string { return s.String() } -// SetDryRun sets the DryRun field's value. -func (s *DescribeVolumesInput) SetDryRun(v bool) *DescribeVolumesInput { - s.DryRun = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *ElasticGpuSpecification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ElasticGpuSpecification"} + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetFilters sets the Filters field's value. -func (s *DescribeVolumesInput) SetFilters(v []*Filter) *DescribeVolumesInput { - s.Filters = v +// SetType sets the Type field's value. +func (s *ElasticGpuSpecification) SetType(v string) *ElasticGpuSpecification { + s.Type = &v return s } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeVolumesInput) SetMaxResults(v int64) *DescribeVolumesInput { - s.MaxResults = &v - return s +// Describes an elastic GPU. +type ElasticGpuSpecificationResponse struct { + _ struct{} `type:"structure"` + + // The elastic GPU type. + Type *string `locationName:"type" type:"string"` } -// SetNextToken sets the NextToken field's value. -func (s *DescribeVolumesInput) SetNextToken(v string) *DescribeVolumesInput { - s.NextToken = &v - return s +// String returns the string representation +func (s ElasticGpuSpecificationResponse) String() string { + return awsutil.Prettify(s) } -// SetVolumeIds sets the VolumeIds field's value. -func (s *DescribeVolumesInput) SetVolumeIds(v []*string) *DescribeVolumesInput { - s.VolumeIds = v +// GoString returns the string representation +func (s ElasticGpuSpecificationResponse) GoString() string { + return s.String() +} + +// SetType sets the Type field's value. +func (s *ElasticGpuSpecificationResponse) SetType(v string) *ElasticGpuSpecificationResponse { + s.Type = &v return s } -type DescribeVolumesModificationsInput struct { +// Describes an Elastic Graphics accelerator. +type ElasticGpus 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 Availability Zone in the which the Elastic Graphics accelerator resides. + AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - // One or more filters. Supported filters: volume-id, modification-state, target-size, - // target-iops, target-volume-type, original-size, original-iops, original-volume-type, - // start-time. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + // The status of the Elastic Graphics accelerator. + ElasticGpuHealth *ElasticGpuHealth `locationName:"elasticGpuHealth" type:"structure"` - // The maximum number of results (up to a limit of 500) to be returned in a - // paginated request. - MaxResults *int64 `type:"integer"` + // The ID of the Elastic Graphics accelerator. + ElasticGpuId *string `locationName:"elasticGpuId" type:"string"` - // The nextToken value returned by a previous paginated request. - NextToken *string `type:"string"` + // The state of the Elastic Graphics accelerator. + ElasticGpuState *string `locationName:"elasticGpuState" type:"string" enum:"ElasticGpuState"` - // One or more volume IDs for which in-progress modifications will be described. - VolumeIds []*string `locationName:"VolumeId" locationNameList:"VolumeId" type:"list"` + // The type of Elastic Graphics accelerator. + ElasticGpuType *string `locationName:"elasticGpuType" type:"string"` + + // The ID of the instance to which the Elastic Graphics accelerator is attached. + InstanceId *string `locationName:"instanceId" type:"string"` } // String returns the string representation -func (s DescribeVolumesModificationsInput) String() string { +func (s ElasticGpus) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeVolumesModificationsInput) GoString() string { +func (s ElasticGpus) GoString() string { return s.String() } -// SetDryRun sets the DryRun field's value. -func (s *DescribeVolumesModificationsInput) SetDryRun(v bool) *DescribeVolumesModificationsInput { - s.DryRun = &v +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *ElasticGpus) SetAvailabilityZone(v string) *ElasticGpus { + s.AvailabilityZone = &v return s } -// SetFilters sets the Filters field's value. -func (s *DescribeVolumesModificationsInput) SetFilters(v []*Filter) *DescribeVolumesModificationsInput { - s.Filters = v +// SetElasticGpuHealth sets the ElasticGpuHealth field's value. +func (s *ElasticGpus) SetElasticGpuHealth(v *ElasticGpuHealth) *ElasticGpus { + s.ElasticGpuHealth = v return s } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeVolumesModificationsInput) SetMaxResults(v int64) *DescribeVolumesModificationsInput { - s.MaxResults = &v +// SetElasticGpuId sets the ElasticGpuId field's value. +func (s *ElasticGpus) SetElasticGpuId(v string) *ElasticGpus { + s.ElasticGpuId = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeVolumesModificationsInput) SetNextToken(v string) *DescribeVolumesModificationsInput { - s.NextToken = &v +// SetElasticGpuState sets the ElasticGpuState field's value. +func (s *ElasticGpus) SetElasticGpuState(v string) *ElasticGpus { + s.ElasticGpuState = &v return s } -// SetVolumeIds sets the VolumeIds field's value. -func (s *DescribeVolumesModificationsInput) SetVolumeIds(v []*string) *DescribeVolumesModificationsInput { - s.VolumeIds = v +// SetElasticGpuType sets the ElasticGpuType field's value. +func (s *ElasticGpus) SetElasticGpuType(v string) *ElasticGpus { + s.ElasticGpuType = &v return s } -type DescribeVolumesModificationsOutput struct { - _ struct{} `type:"structure"` +// SetInstanceId sets the InstanceId field's value. +func (s *ElasticGpus) SetInstanceId(v string) *ElasticGpus { + s.InstanceId = &v + return s +} - // Token for pagination, null if there are no more results - NextToken *string `locationName:"nextToken" type:"string"` +// Describes an elastic inference accelerator. +type ElasticInferenceAccelerator struct { + _ struct{} `type:"structure"` - // A list of returned VolumeModification objects. - VolumesModifications []*VolumeModification `locationName:"volumeModificationSet" locationNameList:"item" type:"list"` + // The type of elastic inference accelerator. The possible values are eia1.small, + // eia1.medium, and eia1.large. + // + // Type is a required field + Type *string `type:"string" required:"true"` } // String returns the string representation -func (s DescribeVolumesModificationsOutput) String() string { +func (s ElasticInferenceAccelerator) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeVolumesModificationsOutput) GoString() string { +func (s ElasticInferenceAccelerator) GoString() string { return s.String() } -// SetNextToken sets the NextToken field's value. -func (s *DescribeVolumesModificationsOutput) SetNextToken(v string) *DescribeVolumesModificationsOutput { - s.NextToken = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *ElasticInferenceAccelerator) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ElasticInferenceAccelerator"} + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetVolumesModifications sets the VolumesModifications field's value. -func (s *DescribeVolumesModificationsOutput) SetVolumesModifications(v []*VolumeModification) *DescribeVolumesModificationsOutput { - s.VolumesModifications = v +// SetType sets the Type field's value. +func (s *ElasticInferenceAccelerator) SetType(v string) *ElasticInferenceAccelerator { + s.Type = &v return s } -// Contains the output of DescribeVolumes. -type DescribeVolumesOutput struct { +// Describes the association between an instance and an elastic inference accelerator. +type ElasticInferenceAcceleratorAssociation struct { _ struct{} `type:"structure"` - // The NextToken value to include in a future DescribeVolumes request. When - // the results of a DescribeVolumes request exceed MaxResults, this value can - // be used to retrieve the next page of results. This value is null when there - // are no more results to return. - NextToken *string `locationName:"nextToken" type:"string"` + // The Amazon Resource Name (ARN) of the elastic inference accelerator. + ElasticInferenceAcceleratorArn *string `locationName:"elasticInferenceAcceleratorArn" type:"string"` - // Information about the volumes. - Volumes []*Volume `locationName:"volumeSet" locationNameList:"item" type:"list"` + // The ID of the association. + ElasticInferenceAcceleratorAssociationId *string `locationName:"elasticInferenceAcceleratorAssociationId" type:"string"` + + // The state of the elastic inference accelerator. + ElasticInferenceAcceleratorAssociationState *string `locationName:"elasticInferenceAcceleratorAssociationState" type:"string"` + + // The time at which the elastic inference accelerator is associated with an + // instance. + ElasticInferenceAcceleratorAssociationTime *time.Time `locationName:"elasticInferenceAcceleratorAssociationTime" type:"timestamp"` } // String returns the string representation -func (s DescribeVolumesOutput) String() string { +func (s ElasticInferenceAcceleratorAssociation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeVolumesOutput) GoString() string { +func (s ElasticInferenceAcceleratorAssociation) GoString() string { return s.String() } -// SetNextToken sets the NextToken field's value. -func (s *DescribeVolumesOutput) SetNextToken(v string) *DescribeVolumesOutput { - s.NextToken = &v +// SetElasticInferenceAcceleratorArn sets the ElasticInferenceAcceleratorArn field's value. +func (s *ElasticInferenceAcceleratorAssociation) SetElasticInferenceAcceleratorArn(v string) *ElasticInferenceAcceleratorAssociation { + s.ElasticInferenceAcceleratorArn = &v return s } -// SetVolumes sets the Volumes field's value. -func (s *DescribeVolumesOutput) SetVolumes(v []*Volume) *DescribeVolumesOutput { - s.Volumes = v +// SetElasticInferenceAcceleratorAssociationId sets the ElasticInferenceAcceleratorAssociationId field's value. +func (s *ElasticInferenceAcceleratorAssociation) SetElasticInferenceAcceleratorAssociationId(v string) *ElasticInferenceAcceleratorAssociation { + s.ElasticInferenceAcceleratorAssociationId = &v return s } -// Contains the parameters for DescribeVpcAttribute. -type DescribeVpcAttributeInput struct { - _ struct{} `type:"structure"` +// SetElasticInferenceAcceleratorAssociationState sets the ElasticInferenceAcceleratorAssociationState field's value. +func (s *ElasticInferenceAcceleratorAssociation) SetElasticInferenceAcceleratorAssociationState(v string) *ElasticInferenceAcceleratorAssociation { + s.ElasticInferenceAcceleratorAssociationState = &v + return s +} - // The VPC attribute. - // - // Attribute is a required field - Attribute *string `type:"string" required:"true" enum:"VpcAttributeName"` +// SetElasticInferenceAcceleratorAssociationTime sets the ElasticInferenceAcceleratorAssociationTime field's value. +func (s *ElasticInferenceAcceleratorAssociation) SetElasticInferenceAcceleratorAssociationTime(v time.Time) *ElasticInferenceAcceleratorAssociation { + s.ElasticInferenceAcceleratorAssociationTime = &v + return s +} + +type EnableTransitGatewayRouteTablePropagationInput 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 `locationName:"dryRun" type:"boolean"` + DryRun *bool `type:"boolean"` - // The ID of the VPC. + // The ID of the attachment. // - // VpcId is a required field - VpcId *string `type:"string" required:"true"` + // TransitGatewayAttachmentId is a required field + TransitGatewayAttachmentId *string `type:"string" required:"true"` + + // The ID of the propagation route table. + // + // TransitGatewayRouteTableId is a required field + TransitGatewayRouteTableId *string `type:"string" required:"true"` } // String returns the string representation -func (s DescribeVpcAttributeInput) String() string { +func (s EnableTransitGatewayRouteTablePropagationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeVpcAttributeInput) GoString() string { +func (s EnableTransitGatewayRouteTablePropagationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeVpcAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeVpcAttributeInput"} - if s.Attribute == nil { - invalidParams.Add(request.NewErrParamRequired("Attribute")) +func (s *EnableTransitGatewayRouteTablePropagationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EnableTransitGatewayRouteTablePropagationInput"} + if s.TransitGatewayAttachmentId == nil { + invalidParams.Add(request.NewErrParamRequired("TransitGatewayAttachmentId")) } - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) + if s.TransitGatewayRouteTableId == nil { + invalidParams.Add(request.NewErrParamRequired("TransitGatewayRouteTableId")) } if invalidParams.Len() > 0 { @@ -42413,105 +55528,80 @@ func (s *DescribeVpcAttributeInput) Validate() error { return nil } -// SetAttribute sets the Attribute field's value. -func (s *DescribeVpcAttributeInput) SetAttribute(v string) *DescribeVpcAttributeInput { - s.Attribute = &v +// SetDryRun sets the DryRun field's value. +func (s *EnableTransitGatewayRouteTablePropagationInput) SetDryRun(v bool) *EnableTransitGatewayRouteTablePropagationInput { + s.DryRun = &v return s } -// SetDryRun sets the DryRun field's value. -func (s *DescribeVpcAttributeInput) SetDryRun(v bool) *DescribeVpcAttributeInput { - s.DryRun = &v +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *EnableTransitGatewayRouteTablePropagationInput) SetTransitGatewayAttachmentId(v string) *EnableTransitGatewayRouteTablePropagationInput { + s.TransitGatewayAttachmentId = &v return s } -// SetVpcId sets the VpcId field's value. -func (s *DescribeVpcAttributeInput) SetVpcId(v string) *DescribeVpcAttributeInput { - s.VpcId = &v +// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. +func (s *EnableTransitGatewayRouteTablePropagationInput) SetTransitGatewayRouteTableId(v string) *EnableTransitGatewayRouteTablePropagationInput { + s.TransitGatewayRouteTableId = &v return s } -// Contains the output of DescribeVpcAttribute. -type DescribeVpcAttributeOutput struct { +type EnableTransitGatewayRouteTablePropagationOutput struct { _ struct{} `type:"structure"` - // Indicates whether the instances launched in the VPC get DNS hostnames. If - // this attribute is true, instances in the VPC get DNS hostnames; otherwise, - // they do not. - EnableDnsHostnames *AttributeBooleanValue `locationName:"enableDnsHostnames" type:"structure"` - - // Indicates whether DNS resolution is enabled for the VPC. If this attribute - // is true, the Amazon DNS server resolves DNS hostnames for your instances - // to their corresponding IP addresses; otherwise, it does not. - EnableDnsSupport *AttributeBooleanValue `locationName:"enableDnsSupport" type:"structure"` - - // The ID of the VPC. - VpcId *string `locationName:"vpcId" type:"string"` + // Information about route propagation. + Propagation *TransitGatewayPropagation `locationName:"propagation" type:"structure"` } // String returns the string representation -func (s DescribeVpcAttributeOutput) String() string { +func (s EnableTransitGatewayRouteTablePropagationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeVpcAttributeOutput) GoString() string { +func (s EnableTransitGatewayRouteTablePropagationOutput) GoString() string { return s.String() } -// SetEnableDnsHostnames sets the EnableDnsHostnames field's value. -func (s *DescribeVpcAttributeOutput) SetEnableDnsHostnames(v *AttributeBooleanValue) *DescribeVpcAttributeOutput { - s.EnableDnsHostnames = v - return s -} - -// SetEnableDnsSupport sets the EnableDnsSupport field's value. -func (s *DescribeVpcAttributeOutput) SetEnableDnsSupport(v *AttributeBooleanValue) *DescribeVpcAttributeOutput { - s.EnableDnsSupport = v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *DescribeVpcAttributeOutput) SetVpcId(v string) *DescribeVpcAttributeOutput { - s.VpcId = &v +// SetPropagation sets the Propagation field's value. +func (s *EnableTransitGatewayRouteTablePropagationOutput) SetPropagation(v *TransitGatewayPropagation) *EnableTransitGatewayRouteTablePropagationOutput { + s.Propagation = v return s } -// Contains the parameters for DescribeVpcClassicLinkDnsSupport. -type DescribeVpcClassicLinkDnsSupportInput struct { +// Contains the parameters for EnableVgwRoutePropagation. +type EnableVgwRoutePropagationInput struct { _ struct{} `type:"structure"` - // The maximum number of items to return for this request. The request returns - // a token that you can specify in a subsequent call to get the next set of - // results. - MaxResults *int64 `locationName:"maxResults" min:"5" type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a prior call.) - NextToken *string `locationName:"nextToken" min:"1" type:"string"` + // The ID of the virtual private gateway. + // + // GatewayId is a required field + GatewayId *string `type:"string" required:"true"` - // One or more VPC IDs. - VpcIds []*string `locationNameList:"VpcId" type:"list"` + // The ID of the route table. + // + // RouteTableId is a required field + RouteTableId *string `type:"string" required:"true"` } // String returns the string representation -func (s DescribeVpcClassicLinkDnsSupportInput) String() string { +func (s EnableVgwRoutePropagationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeVpcClassicLinkDnsSupportInput) GoString() string { +func (s EnableVgwRoutePropagationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeVpcClassicLinkDnsSupportInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeVpcClassicLinkDnsSupportInput"} - if s.MaxResults != nil && *s.MaxResults < 5 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) +func (s *EnableVgwRoutePropagationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EnableVgwRoutePropagationInput"} + if s.GatewayId == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayId")) } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + if s.RouteTableId == nil { + invalidParams.Add(request.NewErrParamRequired("RouteTableId")) } if invalidParams.Len() > 0 { @@ -42520,59 +55610,34 @@ func (s *DescribeVpcClassicLinkDnsSupportInput) Validate() error { return nil } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeVpcClassicLinkDnsSupportInput) SetMaxResults(v int64) *DescribeVpcClassicLinkDnsSupportInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeVpcClassicLinkDnsSupportInput) SetNextToken(v string) *DescribeVpcClassicLinkDnsSupportInput { - s.NextToken = &v +// SetGatewayId sets the GatewayId field's value. +func (s *EnableVgwRoutePropagationInput) SetGatewayId(v string) *EnableVgwRoutePropagationInput { + s.GatewayId = &v return s } -// SetVpcIds sets the VpcIds field's value. -func (s *DescribeVpcClassicLinkDnsSupportInput) SetVpcIds(v []*string) *DescribeVpcClassicLinkDnsSupportInput { - s.VpcIds = v +// SetRouteTableId sets the RouteTableId field's value. +func (s *EnableVgwRoutePropagationInput) SetRouteTableId(v string) *EnableVgwRoutePropagationInput { + s.RouteTableId = &v return s } -// Contains the output of DescribeVpcClassicLinkDnsSupport. -type DescribeVpcClassicLinkDnsSupportOutput struct { +type EnableVgwRoutePropagationOutput struct { _ struct{} `type:"structure"` - - // The token to use when requesting the next set of items. - NextToken *string `locationName:"nextToken" min:"1" type:"string"` - - // Information about the ClassicLink DNS support status of the VPCs. - Vpcs []*ClassicLinkDnsSupport `locationName:"vpcs" locationNameList:"item" type:"list"` } // String returns the string representation -func (s DescribeVpcClassicLinkDnsSupportOutput) String() string { +func (s EnableVgwRoutePropagationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeVpcClassicLinkDnsSupportOutput) GoString() string { +func (s EnableVgwRoutePropagationOutput) GoString() string { return s.String() } -// SetNextToken sets the NextToken field's value. -func (s *DescribeVpcClassicLinkDnsSupportOutput) SetNextToken(v string) *DescribeVpcClassicLinkDnsSupportOutput { - s.NextToken = &v - return s -} - -// SetVpcs sets the Vpcs field's value. -func (s *DescribeVpcClassicLinkDnsSupportOutput) SetVpcs(v []*ClassicLinkDnsSupport) *DescribeVpcClassicLinkDnsSupportOutput { - s.Vpcs = v - return s -} - -// Contains the parameters for DescribeVpcClassicLink. -type DescribeVpcClassicLinkInput struct { +// Contains the parameters for EnableVolumeIO. +type EnableVolumeIOInput struct { _ struct{} `type:"structure"` // Checks whether you have the required permissions for the action, without @@ -42581,626 +55646,615 @@ type DescribeVpcClassicLinkInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // One or more filters. - // - // * is-classic-link-enabled - Whether the VPC is enabled for ClassicLink - // (true | false). - // - // * 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. + // The ID of the volume. // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // One or more VPCs for which you want to describe the ClassicLink status. - VpcIds []*string `locationName:"VpcId" locationNameList:"VpcId" type:"list"` + // VolumeId is a required field + VolumeId *string `locationName:"volumeId" type:"string" required:"true"` } // String returns the string representation -func (s DescribeVpcClassicLinkInput) String() string { +func (s EnableVolumeIOInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeVpcClassicLinkInput) GoString() string { +func (s EnableVolumeIOInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *EnableVolumeIOInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EnableVolumeIOInput"} + if s.VolumeId == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetDryRun sets the DryRun field's value. -func (s *DescribeVpcClassicLinkInput) SetDryRun(v bool) *DescribeVpcClassicLinkInput { +func (s *EnableVolumeIOInput) SetDryRun(v bool) *EnableVolumeIOInput { s.DryRun = &v return s } -// SetFilters sets the Filters field's value. -func (s *DescribeVpcClassicLinkInput) SetFilters(v []*Filter) *DescribeVpcClassicLinkInput { - s.Filters = v +// SetVolumeId sets the VolumeId field's value. +func (s *EnableVolumeIOInput) SetVolumeId(v string) *EnableVolumeIOInput { + s.VolumeId = &v return s } -// SetVpcIds sets the VpcIds field's value. -func (s *DescribeVpcClassicLinkInput) SetVpcIds(v []*string) *DescribeVpcClassicLinkInput { - s.VpcIds = v - return s +type EnableVolumeIOOutput struct { + _ struct{} `type:"structure"` } -// Contains the output of DescribeVpcClassicLink. -type DescribeVpcClassicLinkOutput struct { +// String returns the string representation +func (s EnableVolumeIOOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableVolumeIOOutput) GoString() string { + return s.String() +} + +type EnableVpcClassicLinkDnsSupportInput struct { _ struct{} `type:"structure"` - // The ClassicLink status of one or more VPCs. - Vpcs []*VpcClassicLink `locationName:"vpcSet" locationNameList:"item" type:"list"` + // The ID of the VPC. + VpcId *string `type:"string"` } // String returns the string representation -func (s DescribeVpcClassicLinkOutput) String() string { +func (s EnableVpcClassicLinkDnsSupportInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeVpcClassicLinkOutput) GoString() string { +func (s EnableVpcClassicLinkDnsSupportInput) GoString() string { return s.String() } -// SetVpcs sets the Vpcs field's value. -func (s *DescribeVpcClassicLinkOutput) SetVpcs(v []*VpcClassicLink) *DescribeVpcClassicLinkOutput { - s.Vpcs = v +// SetVpcId sets the VpcId field's value. +func (s *EnableVpcClassicLinkDnsSupportInput) SetVpcId(v string) *EnableVpcClassicLinkDnsSupportInput { + s.VpcId = &v return s } -type DescribeVpcEndpointConnectionNotificationsInput struct { +type EnableVpcClassicLinkDnsSupportOutput struct { _ struct{} `type:"structure"` - // The ID of the notification. - ConnectionNotificationId *string `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 EnableVpcClassicLinkDnsSupportOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableVpcClassicLinkDnsSupportOutput) GoString() string { + return s.String() +} + +// SetReturn sets the Return field's value. +func (s *EnableVpcClassicLinkDnsSupportOutput) SetReturn(v bool) *EnableVpcClassicLinkDnsSupportOutput { + s.Return = &v + return s +} + +type EnableVpcClassicLinkInput 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"` + DryRun *bool `locationName:"dryRun" type:"boolean"` - // One or more filters. - // - // * connection-notification-arn - The ARN of SNS topic for the notification. - // - // * connection-notification-id - The ID of the notification. - // - // * connection-notification-state - The state of the notification (Enabled - // | Disabled). - // - // * connection-notification-type - The type of notification (Topic). - // - // * service-id - The ID of the endpoint service. + // The ID of the VPC. // - // * vpc-endpoint-id - The ID of the VPC endpoint. - 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. - MaxResults *int64 `type:"integer"` - - // The token to request the next page of results. - NextToken *string `type:"string"` + // VpcId is a required field + VpcId *string `locationName:"vpcId" type:"string" required:"true"` } // String returns the string representation -func (s DescribeVpcEndpointConnectionNotificationsInput) String() string { +func (s EnableVpcClassicLinkInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeVpcEndpointConnectionNotificationsInput) GoString() string { +func (s EnableVpcClassicLinkInput) GoString() string { return s.String() } -// SetConnectionNotificationId sets the ConnectionNotificationId field's value. -func (s *DescribeVpcEndpointConnectionNotificationsInput) SetConnectionNotificationId(v string) *DescribeVpcEndpointConnectionNotificationsInput { - s.ConnectionNotificationId = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *EnableVpcClassicLinkInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EnableVpcClassicLinkInput"} + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } // SetDryRun sets the DryRun field's value. -func (s *DescribeVpcEndpointConnectionNotificationsInput) SetDryRun(v bool) *DescribeVpcEndpointConnectionNotificationsInput { +func (s *EnableVpcClassicLinkInput) SetDryRun(v bool) *EnableVpcClassicLinkInput { s.DryRun = &v return s } -// SetFilters sets the Filters field's value. -func (s *DescribeVpcEndpointConnectionNotificationsInput) SetFilters(v []*Filter) *DescribeVpcEndpointConnectionNotificationsInput { - s.Filters = v +// SetVpcId sets the VpcId field's value. +func (s *EnableVpcClassicLinkInput) SetVpcId(v string) *EnableVpcClassicLinkInput { + s.VpcId = &v return s } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeVpcEndpointConnectionNotificationsInput) SetMaxResults(v int64) *DescribeVpcEndpointConnectionNotificationsInput { - s.MaxResults = &v - return s +type EnableVpcClassicLinkOutput struct { + _ struct{} `type:"structure"` + + // Returns true if the request succeeds; otherwise, it returns an error. + Return *bool `locationName:"return" type:"boolean"` } -// SetNextToken sets the NextToken field's value. -func (s *DescribeVpcEndpointConnectionNotificationsInput) SetNextToken(v string) *DescribeVpcEndpointConnectionNotificationsInput { - s.NextToken = &v +// String returns the string representation +func (s EnableVpcClassicLinkOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableVpcClassicLinkOutput) GoString() string { + return s.String() +} + +// SetReturn sets the Return field's value. +func (s *EnableVpcClassicLinkOutput) SetReturn(v bool) *EnableVpcClassicLinkOutput { + s.Return = &v return s } -type DescribeVpcEndpointConnectionNotificationsOutput struct { +// Describes a Spot Fleet event. +type EventInformation struct { _ struct{} `type:"structure"` - // One or more notifications. - ConnectionNotificationSet []*ConnectionNotification `locationName:"connectionNotificationSet" locationNameList:"item" type:"list"` + // The description of the event. + EventDescription *string `locationName:"eventDescription" type:"string"` + + // The event. + // + // The following are the error events: + // + // * iamFleetRoleInvalid - The Spot Fleet did not have the required permissions + // either to launch or terminate an instance. + // + // * launchSpecTemporarilyBlacklisted - The configuration is not valid and + // several attempts to launch instances have failed. For more information, + // see the description of the event. + // + // * spotFleetRequestConfigurationInvalid - The configuration is not valid. + // For more information, see the description of the event. + // + // * spotInstanceCountLimitExceeded - You've reached the limit on the number + // of Spot Instances that you can launch. + // + // The following are the fleetRequestChange events: + // + // * active - The Spot Fleet has been validated and Amazon EC2 is attempting + // to maintain the target number of running Spot Instances. + // + // * cancelled - The Spot Fleet is canceled and has no running Spot Instances. + // The Spot Fleet will be deleted two days after its instances were terminated. + // + // * cancelled_running - The Spot Fleet is canceled and does not launch additional + // Spot Instances. Existing Spot Instances continue to run until they are + // interrupted or terminated. + // + // * cancelled_terminating - The Spot Fleet is canceled and its Spot Instances + // are terminating. + // + // * expired - The Spot Fleet request has expired. A subsequent event indicates + // that the instances were terminated, if the request was created with TerminateInstancesWithExpiration + // set. + // + // * modify_in_progress - A request to modify the Spot Fleet request was + // accepted and is in progress. + // + // * modify_successful - The Spot Fleet request was modified. + // + // * price_update - The price for a launch configuration was adjusted because + // it was too high. This change is permanent. + // + // * submitted - The Spot Fleet request is being evaluated and Amazon EC2 + // is preparing to launch the target number of Spot Instances. + // + // The following are the instanceChange events: + // + // * launched - A request was fulfilled and a new instance was launched. + // + // * terminated - An instance was terminated by the user. + // + // The following are the Information events: + // + // * launchSpecUnusable - The price in a launch specification is not valid + // because it is below the Spot price or the Spot price is above the On-Demand + // price. + // + // * fleetProgressHalted - The price in every launch specification is not + // valid. A launch specification might become valid if the Spot price changes. + EventSubType *string `locationName:"eventSubType" type:"string"` - // 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 ID of the instance. This information is available only for instanceChange + // events. + InstanceId *string `locationName:"instanceId" type:"string"` } // String returns the string representation -func (s DescribeVpcEndpointConnectionNotificationsOutput) String() string { +func (s EventInformation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeVpcEndpointConnectionNotificationsOutput) GoString() string { +func (s EventInformation) GoString() string { return s.String() } -// SetConnectionNotificationSet sets the ConnectionNotificationSet field's value. -func (s *DescribeVpcEndpointConnectionNotificationsOutput) SetConnectionNotificationSet(v []*ConnectionNotification) *DescribeVpcEndpointConnectionNotificationsOutput { - s.ConnectionNotificationSet = v +// SetEventDescription sets the EventDescription field's value. +func (s *EventInformation) SetEventDescription(v string) *EventInformation { + s.EventDescription = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeVpcEndpointConnectionNotificationsOutput) SetNextToken(v string) *DescribeVpcEndpointConnectionNotificationsOutput { - s.NextToken = &v +// SetEventSubType sets the EventSubType field's value. +func (s *EventInformation) SetEventSubType(v string) *EventInformation { + s.EventSubType = &v return s } -type DescribeVpcEndpointConnectionsInput struct { +// SetInstanceId sets the InstanceId field's value. +func (s *EventInformation) SetInstanceId(v string) *EventInformation { + s.InstanceId = &v + return s +} + +type ExportClientVpnClientCertificateRevocationListInput struct { _ struct{} `type:"structure"` + // The ID of the Client VPN endpoint. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *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"` - - // One or more filters. - // - // * service-id - The ID of the service. - // - // * vpc-endpoint-owner - The AWS account number of the owner of the endpoint. - // - // * vpc-endpoint-state - The state of the endpoint (pendingAcceptance | - // pending | available | deleting | deleted | rejected | failed). - // - // * vpc-endpoint-id - The ID of the endpoint. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of results to return for the request in a single page. - // The remaining results of the initial request can be seen by sending another - // request with the returned NextToken value. This value can be between 5 and - // 1000; if MaxResults is given a value larger than 1000, only 1000 results - // are returned. - MaxResults *int64 `type:"integer"` - - // The token to retrieve the next page of results. - NextToken *string `type:"string"` } // String returns the string representation -func (s DescribeVpcEndpointConnectionsInput) String() string { +func (s ExportClientVpnClientCertificateRevocationListInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeVpcEndpointConnectionsInput) GoString() string { +func (s ExportClientVpnClientCertificateRevocationListInput) GoString() string { return s.String() } -// SetDryRun sets the DryRun field's value. -func (s *DescribeVpcEndpointConnectionsInput) SetDryRun(v bool) *DescribeVpcEndpointConnectionsInput { - s.DryRun = &v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *ExportClientVpnClientCertificateRevocationListInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ExportClientVpnClientCertificateRevocationListInput"} + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } -// SetFilters sets the Filters field's value. -func (s *DescribeVpcEndpointConnectionsInput) SetFilters(v []*Filter) *DescribeVpcEndpointConnectionsInput { - s.Filters = v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeVpcEndpointConnectionsInput) SetMaxResults(v int64) *DescribeVpcEndpointConnectionsInput { - s.MaxResults = &v +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *ExportClientVpnClientCertificateRevocationListInput) SetClientVpnEndpointId(v string) *ExportClientVpnClientCertificateRevocationListInput { + s.ClientVpnEndpointId = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeVpcEndpointConnectionsInput) SetNextToken(v string) *DescribeVpcEndpointConnectionsInput { - s.NextToken = &v +// SetDryRun sets the DryRun field's value. +func (s *ExportClientVpnClientCertificateRevocationListInput) SetDryRun(v bool) *ExportClientVpnClientCertificateRevocationListInput { + s.DryRun = &v return s } -type DescribeVpcEndpointConnectionsOutput struct { +type ExportClientVpnClientCertificateRevocationListOutput 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 client certificate revocation list. + CertificateRevocationList *string `locationName:"certificateRevocationList" type:"string"` - // Information about one or more VPC endpoint connections. - VpcEndpointConnections []*VpcEndpointConnection `locationName:"vpcEndpointConnectionSet" locationNameList:"item" type:"list"` + // The current state of the client certificate revocation list. + Status *ClientCertificateRevocationListStatus `locationName:"status" type:"structure"` } // String returns the string representation -func (s DescribeVpcEndpointConnectionsOutput) String() string { +func (s ExportClientVpnClientCertificateRevocationListOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeVpcEndpointConnectionsOutput) GoString() string { +func (s ExportClientVpnClientCertificateRevocationListOutput) GoString() string { return s.String() } -// SetNextToken sets the NextToken field's value. -func (s *DescribeVpcEndpointConnectionsOutput) SetNextToken(v string) *DescribeVpcEndpointConnectionsOutput { - s.NextToken = &v +// SetCertificateRevocationList sets the CertificateRevocationList field's value. +func (s *ExportClientVpnClientCertificateRevocationListOutput) SetCertificateRevocationList(v string) *ExportClientVpnClientCertificateRevocationListOutput { + s.CertificateRevocationList = &v return s } -// SetVpcEndpointConnections sets the VpcEndpointConnections field's value. -func (s *DescribeVpcEndpointConnectionsOutput) SetVpcEndpointConnections(v []*VpcEndpointConnection) *DescribeVpcEndpointConnectionsOutput { - s.VpcEndpointConnections = v +// SetStatus sets the Status field's value. +func (s *ExportClientVpnClientCertificateRevocationListOutput) SetStatus(v *ClientCertificateRevocationListStatus) *ExportClientVpnClientCertificateRevocationListOutput { + s.Status = v return s } -type DescribeVpcEndpointServiceConfigurationsInput struct { +type ExportClientVpnClientConfigurationInput struct { _ struct{} `type:"structure"` + // The ID of the Client VPN endpoint. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *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"` - - // One or more filters. - // - // * service-name - The name of the service. - // - // * service-id - The ID of the service. - // - // * service-state - The state of the service (Pending | Available | Deleting - // | Deleted | Failed). - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - - // The maximum number of results to return for the request in a single page. - // The remaining results of the initial request can be seen by sending another - // request with the returned NextToken value. This value can be between 5 and - // 1000; if MaxResults is given a value larger than 1000, only 1000 results - // are returned. - MaxResults *int64 `type:"integer"` - - // The token to retrieve the next page of results. - NextToken *string `type:"string"` - - // The IDs of one or more services. - ServiceIds []*string `locationName:"ServiceId" locationNameList:"item" type:"list"` } // String returns the string representation -func (s DescribeVpcEndpointServiceConfigurationsInput) String() string { +func (s ExportClientVpnClientConfigurationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeVpcEndpointServiceConfigurationsInput) GoString() string { +func (s ExportClientVpnClientConfigurationInput) GoString() string { return s.String() } -// SetDryRun sets the DryRun field's value. -func (s *DescribeVpcEndpointServiceConfigurationsInput) SetDryRun(v bool) *DescribeVpcEndpointServiceConfigurationsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeVpcEndpointServiceConfigurationsInput) SetFilters(v []*Filter) *DescribeVpcEndpointServiceConfigurationsInput { - s.Filters = v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *ExportClientVpnClientConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ExportClientVpnClientConfigurationInput"} + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeVpcEndpointServiceConfigurationsInput) SetMaxResults(v int64) *DescribeVpcEndpointServiceConfigurationsInput { - s.MaxResults = &v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetNextToken sets the NextToken field's value. -func (s *DescribeVpcEndpointServiceConfigurationsInput) SetNextToken(v string) *DescribeVpcEndpointServiceConfigurationsInput { - s.NextToken = &v +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *ExportClientVpnClientConfigurationInput) SetClientVpnEndpointId(v string) *ExportClientVpnClientConfigurationInput { + s.ClientVpnEndpointId = &v return s } -// SetServiceIds sets the ServiceIds field's value. -func (s *DescribeVpcEndpointServiceConfigurationsInput) SetServiceIds(v []*string) *DescribeVpcEndpointServiceConfigurationsInput { - s.ServiceIds = v +// SetDryRun sets the DryRun field's value. +func (s *ExportClientVpnClientConfigurationInput) SetDryRun(v bool) *ExportClientVpnClientConfigurationInput { + s.DryRun = &v return s } -type DescribeVpcEndpointServiceConfigurationsOutput struct { +type ExportClientVpnClientConfigurationOutput 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 one or more services. - ServiceConfigurations []*ServiceConfiguration `locationName:"serviceConfigurationSet" locationNameList:"item" type:"list"` + // The contents of the Client VPN endpoint configuration file. + ClientConfiguration *string `locationName:"clientConfiguration" type:"string"` } // String returns the string representation -func (s DescribeVpcEndpointServiceConfigurationsOutput) String() string { +func (s ExportClientVpnClientConfigurationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeVpcEndpointServiceConfigurationsOutput) GoString() string { +func (s ExportClientVpnClientConfigurationOutput) GoString() string { return s.String() } -// SetNextToken sets the NextToken field's value. -func (s *DescribeVpcEndpointServiceConfigurationsOutput) SetNextToken(v string) *DescribeVpcEndpointServiceConfigurationsOutput { - s.NextToken = &v - return s -} - -// SetServiceConfigurations sets the ServiceConfigurations field's value. -func (s *DescribeVpcEndpointServiceConfigurationsOutput) SetServiceConfigurations(v []*ServiceConfiguration) *DescribeVpcEndpointServiceConfigurationsOutput { - s.ServiceConfigurations = v +// SetClientConfiguration sets the ClientConfiguration field's value. +func (s *ExportClientVpnClientConfigurationOutput) SetClientConfiguration(v string) *ExportClientVpnClientConfigurationOutput { + s.ClientConfiguration = &v return s } -type DescribeVpcEndpointServicePermissionsInput struct { +// Describes an instance export task. +type ExportTask 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"` + // A description of the resource being exported. + Description *string `locationName:"description" type:"string"` - // One or more filters. - // - // * principal - The ARN of the principal. - // - // * principal-type - The principal type (All | Service | OrganizationUnit - // | Account | User | Role). - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + // The ID of the export task. + ExportTaskId *string `locationName:"exportTaskId" type:"string"` - // The maximum number of results to return for the request in a single page. - // The remaining results of the initial request can be seen by sending another - // request with the returned NextToken value. This value can be between 5 and - // 1000; if MaxResults is given a value larger than 1000, only 1000 results - // are returned. - MaxResults *int64 `type:"integer"` + // Information about the export task. + ExportToS3Task *ExportToS3Task `locationName:"exportToS3" type:"structure"` - // The token to retrieve the next page of results. - NextToken *string `type:"string"` + // Information about the instance to export. + InstanceExportDetails *InstanceExportDetails `locationName:"instanceExport" type:"structure"` - // The ID of the service. - // - // ServiceId is a required field - ServiceId *string `type:"string" required:"true"` + // The state of the export task. + State *string `locationName:"state" type:"string" enum:"ExportTaskState"` + + // The status message related to the export task. + StatusMessage *string `locationName:"statusMessage" type:"string"` } // String returns the string representation -func (s DescribeVpcEndpointServicePermissionsInput) String() string { +func (s ExportTask) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeVpcEndpointServicePermissionsInput) GoString() string { +func (s ExportTask) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeVpcEndpointServicePermissionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeVpcEndpointServicePermissionsInput"} - if s.ServiceId == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DescribeVpcEndpointServicePermissionsInput) SetDryRun(v bool) *DescribeVpcEndpointServicePermissionsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeVpcEndpointServicePermissionsInput) SetFilters(v []*Filter) *DescribeVpcEndpointServicePermissionsInput { - s.Filters = v +// SetDescription sets the Description field's value. +func (s *ExportTask) SetDescription(v string) *ExportTask { + s.Description = &v return s } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeVpcEndpointServicePermissionsInput) SetMaxResults(v int64) *DescribeVpcEndpointServicePermissionsInput { - s.MaxResults = &v +// SetExportTaskId sets the ExportTaskId field's value. +func (s *ExportTask) SetExportTaskId(v string) *ExportTask { + s.ExportTaskId = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeVpcEndpointServicePermissionsInput) SetNextToken(v string) *DescribeVpcEndpointServicePermissionsInput { - s.NextToken = &v +// SetExportToS3Task sets the ExportToS3Task field's value. +func (s *ExportTask) SetExportToS3Task(v *ExportToS3Task) *ExportTask { + s.ExportToS3Task = v return s } -// SetServiceId sets the ServiceId field's value. -func (s *DescribeVpcEndpointServicePermissionsInput) SetServiceId(v string) *DescribeVpcEndpointServicePermissionsInput { - s.ServiceId = &v +// SetInstanceExportDetails sets the InstanceExportDetails field's value. +func (s *ExportTask) SetInstanceExportDetails(v *InstanceExportDetails) *ExportTask { + s.InstanceExportDetails = v return s } -type DescribeVpcEndpointServicePermissionsOutput struct { - _ struct{} `type:"structure"` - - // Information about one or more allowed principals. - AllowedPrincipals []*AllowedPrincipal `locationName:"allowedPrincipals" 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 DescribeVpcEndpointServicePermissionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DescribeVpcEndpointServicePermissionsOutput) GoString() string { - return s.String() -} - -// SetAllowedPrincipals sets the AllowedPrincipals field's value. -func (s *DescribeVpcEndpointServicePermissionsOutput) SetAllowedPrincipals(v []*AllowedPrincipal) *DescribeVpcEndpointServicePermissionsOutput { - s.AllowedPrincipals = v +// SetState sets the State field's value. +func (s *ExportTask) SetState(v string) *ExportTask { + s.State = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeVpcEndpointServicePermissionsOutput) SetNextToken(v string) *DescribeVpcEndpointServicePermissionsOutput { - s.NextToken = &v +// SetStatusMessage sets the StatusMessage field's value. +func (s *ExportTask) SetStatusMessage(v string) *ExportTask { + s.StatusMessage = &v return s } -// Contains the parameters for DescribeVpcEndpointServices. -type DescribeVpcEndpointServicesInput struct { +// Describes the format and location for an instance export task. +type ExportToS3Task 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. - // - // * service-name: The name of the service. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + // The container format used to combine disk images with metadata (such as OVF). + // If absent, only the disk image is exported. + ContainerFormat *string `locationName:"containerFormat" type:"string" enum:"ContainerFormat"` - // The maximum number of items to return for this request. The request returns - // a token that you can specify in a subsequent call to get the next set of - // results. - // - // Constraint: If the value is greater than 1000, we return only 1000 items. - MaxResults *int64 `type:"integer"` + // The format for the exported image. + DiskImageFormat *string `locationName:"diskImageFormat" type:"string" enum:"DiskImageFormat"` - // The token for the next set of items to return. (You received this token from - // a prior call.) - NextToken *string `type:"string"` + // The S3 bucket for the destination image. The destination bucket must exist + // and grant WRITE and READ_ACP permissions to the AWS account vm-import-export@amazon.com. + S3Bucket *string `locationName:"s3Bucket" type:"string"` - // One or more service names. - ServiceNames []*string `locationName:"ServiceName" locationNameList:"item" type:"list"` + // The encryption key for your S3 bucket. + S3Key *string `locationName:"s3Key" type:"string"` } // String returns the string representation -func (s DescribeVpcEndpointServicesInput) String() string { +func (s ExportToS3Task) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeVpcEndpointServicesInput) GoString() string { +func (s ExportToS3Task) GoString() string { return s.String() } -// SetDryRun sets the DryRun field's value. -func (s *DescribeVpcEndpointServicesInput) SetDryRun(v bool) *DescribeVpcEndpointServicesInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeVpcEndpointServicesInput) SetFilters(v []*Filter) *DescribeVpcEndpointServicesInput { - s.Filters = v +// SetContainerFormat sets the ContainerFormat field's value. +func (s *ExportToS3Task) SetContainerFormat(v string) *ExportToS3Task { + s.ContainerFormat = &v return s } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeVpcEndpointServicesInput) SetMaxResults(v int64) *DescribeVpcEndpointServicesInput { - s.MaxResults = &v +// SetDiskImageFormat sets the DiskImageFormat field's value. +func (s *ExportToS3Task) SetDiskImageFormat(v string) *ExportToS3Task { + s.DiskImageFormat = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeVpcEndpointServicesInput) SetNextToken(v string) *DescribeVpcEndpointServicesInput { - s.NextToken = &v +// SetS3Bucket sets the S3Bucket field's value. +func (s *ExportToS3Task) SetS3Bucket(v string) *ExportToS3Task { + s.S3Bucket = &v return s } -// SetServiceNames sets the ServiceNames field's value. -func (s *DescribeVpcEndpointServicesInput) SetServiceNames(v []*string) *DescribeVpcEndpointServicesInput { - s.ServiceNames = v +// SetS3Key sets the S3Key field's value. +func (s *ExportToS3Task) SetS3Key(v string) *ExportToS3Task { + s.S3Key = &v return s } -// Contains the output of DescribeVpcEndpointServices. -type DescribeVpcEndpointServicesOutput struct { +// Describes an instance export task. +type ExportToS3TaskSpecification struct { _ struct{} `type:"structure"` - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `locationName:"nextToken" type:"string"` + // The container format used to combine disk images with metadata (such as OVF). + // If absent, only the disk image is exported. + ContainerFormat *string `locationName:"containerFormat" type:"string" enum:"ContainerFormat"` - // Information about the service. - ServiceDetails []*ServiceDetail `locationName:"serviceDetailSet" locationNameList:"item" type:"list"` + // The format for the exported image. + DiskImageFormat *string `locationName:"diskImageFormat" type:"string" enum:"DiskImageFormat"` - // A list of supported services. - ServiceNames []*string `locationName:"serviceNameSet" locationNameList:"item" type:"list"` + // The S3 bucket for the destination image. The destination bucket must exist + // and grant WRITE and READ_ACP permissions to the AWS account vm-import-export@amazon.com. + S3Bucket *string `locationName:"s3Bucket" type:"string"` + + // The image is written to a single object in the S3 bucket at the S3 key s3prefix + // + exportTaskId + '.' + diskImageFormat. + S3Prefix *string `locationName:"s3Prefix" type:"string"` } // String returns the string representation -func (s DescribeVpcEndpointServicesOutput) String() string { +func (s ExportToS3TaskSpecification) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeVpcEndpointServicesOutput) GoString() string { +func (s ExportToS3TaskSpecification) GoString() string { return s.String() } -// SetNextToken sets the NextToken field's value. -func (s *DescribeVpcEndpointServicesOutput) SetNextToken(v string) *DescribeVpcEndpointServicesOutput { - s.NextToken = &v +// SetContainerFormat sets the ContainerFormat field's value. +func (s *ExportToS3TaskSpecification) SetContainerFormat(v string) *ExportToS3TaskSpecification { + s.ContainerFormat = &v return s } -// SetServiceDetails sets the ServiceDetails field's value. -func (s *DescribeVpcEndpointServicesOutput) SetServiceDetails(v []*ServiceDetail) *DescribeVpcEndpointServicesOutput { - s.ServiceDetails = v +// SetDiskImageFormat sets the DiskImageFormat field's value. +func (s *ExportToS3TaskSpecification) SetDiskImageFormat(v string) *ExportToS3TaskSpecification { + s.DiskImageFormat = &v return s } -// SetServiceNames sets the ServiceNames field's value. -func (s *DescribeVpcEndpointServicesOutput) SetServiceNames(v []*string) *DescribeVpcEndpointServicesOutput { - s.ServiceNames = v +// SetS3Bucket sets the S3Bucket field's value. +func (s *ExportToS3TaskSpecification) SetS3Bucket(v string) *ExportToS3TaskSpecification { + s.S3Bucket = &v return s } -// Contains the parameters for DescribeVpcEndpoints. -type DescribeVpcEndpointsInput struct { +// SetS3Prefix sets the S3Prefix field's value. +func (s *ExportToS3TaskSpecification) SetS3Prefix(v string) *ExportToS3TaskSpecification { + s.S3Prefix = &v + return s +} + +type ExportTransitGatewayRoutesInput struct { _ struct{} `type:"structure"` // Checks whether you have the required permissions for the action, without @@ -43209,661 +56263,664 @@ type DescribeVpcEndpointsInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // One or more filters. + // One or more filters. The possible values are: // - // * service-name: The name of the service. + // * transit-gateway-route-destination-cidr-block - The CIDR range. // - // * vpc-id: The ID of the VPC in which the endpoint resides. + // * transit-gateway-route-state - The state of the route (active | blackhole). // - // * vpc-endpoint-id: The ID of the endpoint. + // * transit-gateway-route-transit-gateway-attachment-id - The ID of the + // attachment. // - // * vpc-endpoint-state: The state of the endpoint. (pending | available - // | deleting | deleted) + // * transit-gateway-route-type - The route type (static | propagated). + // + // * transit-gateway-route-vpn-connection-id - The ID of the VPN connection. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - // The maximum number of items to return for this request. The request returns - // a token that you can specify in a subsequent call to get the next set of - // results. + // The name of the S3 bucket. // - // Constraint: If the value is greater than 1000, we return only 1000 items. - MaxResults *int64 `type:"integer"` - - // The token for the next set of items to return. (You received this token from - // a prior call.) - NextToken *string `type:"string"` + // S3Bucket is a required field + S3Bucket *string `type:"string" required:"true"` - // One or more endpoint IDs. - VpcEndpointIds []*string `locationName:"VpcEndpointId" locationNameList:"item" type:"list"` + // The ID of the route table. + // + // TransitGatewayRouteTableId is a required field + TransitGatewayRouteTableId *string `type:"string" required:"true"` } // String returns the string representation -func (s DescribeVpcEndpointsInput) String() string { +func (s ExportTransitGatewayRoutesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeVpcEndpointsInput) GoString() string { +func (s ExportTransitGatewayRoutesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ExportTransitGatewayRoutesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ExportTransitGatewayRoutesInput"} + if s.S3Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("S3Bucket")) + } + if s.TransitGatewayRouteTableId == nil { + invalidParams.Add(request.NewErrParamRequired("TransitGatewayRouteTableId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetDryRun sets the DryRun field's value. -func (s *DescribeVpcEndpointsInput) SetDryRun(v bool) *DescribeVpcEndpointsInput { +func (s *ExportTransitGatewayRoutesInput) SetDryRun(v bool) *ExportTransitGatewayRoutesInput { s.DryRun = &v return s } // SetFilters sets the Filters field's value. -func (s *DescribeVpcEndpointsInput) SetFilters(v []*Filter) *DescribeVpcEndpointsInput { +func (s *ExportTransitGatewayRoutesInput) SetFilters(v []*Filter) *ExportTransitGatewayRoutesInput { s.Filters = v return s } -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeVpcEndpointsInput) SetMaxResults(v int64) *DescribeVpcEndpointsInput { - s.MaxResults = &v +// SetS3Bucket sets the S3Bucket field's value. +func (s *ExportTransitGatewayRoutesInput) SetS3Bucket(v string) *ExportTransitGatewayRoutesInput { + s.S3Bucket = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *DescribeVpcEndpointsInput) SetNextToken(v string) *DescribeVpcEndpointsInput { - s.NextToken = &v +// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. +func (s *ExportTransitGatewayRoutesInput) SetTransitGatewayRouteTableId(v string) *ExportTransitGatewayRoutesInput { + s.TransitGatewayRouteTableId = &v return s } -// SetVpcEndpointIds sets the VpcEndpointIds field's value. -func (s *DescribeVpcEndpointsInput) SetVpcEndpointIds(v []*string) *DescribeVpcEndpointsInput { - s.VpcEndpointIds = v +type ExportTransitGatewayRoutesOutput struct { + _ struct{} `type:"structure"` + + // The URL of the exported file in Amazon S3. For example, s3://bucket_name/VPCTransitGateway/TransitGatewayRouteTables/file_name. + S3Location *string `locationName:"s3Location" type:"string"` +} + +// String returns the string representation +func (s ExportTransitGatewayRoutesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportTransitGatewayRoutesOutput) GoString() string { + return s.String() +} + +// SetS3Location sets the S3Location field's value. +func (s *ExportTransitGatewayRoutesOutput) SetS3Location(v string) *ExportTransitGatewayRoutesOutput { + s.S3Location = &v return s } -// Contains the output of DescribeVpcEndpoints. -type DescribeVpcEndpointsOutput struct { +// 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 +type Filter struct { _ struct{} `type:"structure"` - // The token to use when requesting the next set of items. If there are no additional - // items to return, the string is empty. - NextToken *string `locationName:"nextToken" type:"string"` + // The name of the filter. Filter names are case-sensitive. + Name *string `type:"string"` - // Information about the endpoints. - VpcEndpoints []*VpcEndpoint `locationName:"vpcEndpointSet" locationNameList:"item" type:"list"` + // One or more filter values. Filter values are case-sensitive. + Values []*string `locationName:"Value" locationNameList:"item" type:"list"` } // String returns the string representation -func (s DescribeVpcEndpointsOutput) String() string { +func (s Filter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeVpcEndpointsOutput) GoString() string { +func (s Filter) GoString() string { return s.String() } -// SetNextToken sets the NextToken field's value. -func (s *DescribeVpcEndpointsOutput) SetNextToken(v string) *DescribeVpcEndpointsOutput { - s.NextToken = &v +// SetName sets the Name field's value. +func (s *Filter) SetName(v string) *Filter { + s.Name = &v return s } -// SetVpcEndpoints sets the VpcEndpoints field's value. -func (s *DescribeVpcEndpointsOutput) SetVpcEndpoints(v []*VpcEndpoint) *DescribeVpcEndpointsOutput { - s.VpcEndpoints = v +// SetValues sets the Values field's value. +func (s *Filter) SetValues(v []*string) *Filter { + s.Values = v return s } -// Contains the parameters for DescribeVpcPeeringConnections. -type DescribeVpcPeeringConnectionsInput struct { +// Describes an EC2 Fleet. +type FleetData 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 `locationName:"dryRun" type:"boolean"` + // The progress of the EC2 Fleet. If there is an error, the status is error. + // After all requests are placed, the status is pending_fulfillment. If the + // size of the EC2 Fleet is equal to or greater than its target capacity, the + // status is fulfilled. If the size of the EC2 Fleet is decreased, the status + // is pending_termination while instances are terminating. + ActivityStatus *string `locationName:"activityStatus" type:"string" enum:"FleetActivityStatus"` - // One or more filters. - // - // * accepter-vpc-info.cidr-block - The IPv4 CIDR block of the accepter VPC. - // - // * accepter-vpc-info.owner-id - The AWS account ID of the owner of the - // accepter VPC. - // - // * accepter-vpc-info.vpc-id - The ID of the accepter VPC. - // - // * expiration-time - The expiration date and time for the VPC peering connection. - // - // * requester-vpc-info.cidr-block - The IPv4 CIDR block of the requester's - // VPC. - // - // * requester-vpc-info.owner-id - The AWS account ID of the owner of the - // requester VPC. - // - // * requester-vpc-info.vpc-id - The ID of the requester VPC. - // - // * status-code - The status of the VPC peering connection (pending-acceptance - // | failed | expired | provisioning | active | deleting | deleted | rejected). - // - // * status-message - A message that provides more information about the - // status of the VPC peering connection, if applicable. - // - // * 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. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. + // Unique, case-sensitive identifier you provide to ensure the idempotency of + // the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). // - // * vpc-peering-connection-id - The ID of the VPC peering connection. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + // Constraints: Maximum 64 ASCII characters + ClientToken *string `locationName:"clientToken" type:"string"` - // One or more VPC peering connection IDs. - // - // Default: Describes all your VPC peering connections. - VpcPeeringConnectionIds []*string `locationName:"VpcPeeringConnectionId" locationNameList:"item" type:"list"` + // The creation date and time of the EC2 Fleet. + CreateTime *time.Time `locationName:"createTime" type:"timestamp"` + + // Information about the instances that could not be launched by the fleet. + // Valid only when Type is set to instant. + Errors []*DescribeFleetError `locationName:"errorSet" locationNameList:"item" type:"list"` + + // Indicates whether running instances should be terminated if the target capacity + // of the EC2 Fleet is decreased below the current size of the EC2 Fleet. + ExcessCapacityTerminationPolicy *string `locationName:"excessCapacityTerminationPolicy" type:"string" enum:"FleetExcessCapacityTerminationPolicy"` + + // The ID of the EC2 Fleet. + FleetId *string `locationName:"fleetId" type:"string"` + + // The state of the EC2 Fleet. + FleetState *string `locationName:"fleetState" type:"string" enum:"FleetStateCode"` + + // The number of units fulfilled by this request compared to the set target + // capacity. + FulfilledCapacity *float64 `locationName:"fulfilledCapacity" type:"double"` + + // The number of units fulfilled by this request compared to the set target + // On-Demand capacity. + FulfilledOnDemandCapacity *float64 `locationName:"fulfilledOnDemandCapacity" type:"double"` + + // Information about the instances that were launched by the fleet. Valid only + // when Type is set to instant. + Instances []*DescribeFleetsInstances `locationName:"fleetInstanceSet" locationNameList:"item" type:"list"` + + // The launch template and overrides. + LaunchTemplateConfigs []*FleetLaunchTemplateConfig `locationName:"launchTemplateConfigs" locationNameList:"item" type:"list"` + + // 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. + ReplaceUnhealthyInstances *bool `locationName:"replaceUnhealthyInstances" type:"boolean"` + + // The configuration of Spot Instances in an EC2 Fleet. + SpotOptions *SpotOptions `locationName:"spotOptions" type:"structure"` + + // The tags for an EC2 Fleet resource. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + + // The number of units to request. You can choose to set the target capacity + // in terms of instances or a performance characteristic that is important to + // your application workload, such as vCPUs, memory, or I/O. If the request + // type is maintain, you can specify a target capacity of 0 and add capacity + // later. + TargetCapacitySpecification *TargetCapacitySpecification `locationName:"targetCapacitySpecification" type:"structure"` + + // Indicates whether running instances should be terminated when the EC2 Fleet + // expires. + TerminateInstancesWithExpiration *bool `locationName:"terminateInstancesWithExpiration" type:"boolean"` + + // The type of request. Indicates whether the EC2 Fleet only requests the target + // capacity, or also attempts to maintain it. If you request a certain target + // capacity, EC2 Fleet only places the required requests; it does not attempt + // to replenish instances if capacity is diminished, and does not submit requests + // in alternative capacity pools if capacity is unavailable. To maintain a certain + // target capacity, EC2 Fleet places the required requests to meet this target + // capacity. It also automatically replenishes any interrupted Spot Instances. + // Default: maintain. + Type *string `locationName:"type" type:"string" enum:"FleetType"` + + // The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + // The default is to start fulfilling the request immediately. + ValidFrom *time.Time `locationName:"validFrom" type:"timestamp"` + + // The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + // At this point, no new instance requests are placed or able to fulfill the + // request. The default end date is 7 days from the current date. + ValidUntil *time.Time `locationName:"validUntil" type:"timestamp"` } // String returns the string representation -func (s DescribeVpcPeeringConnectionsInput) String() string { +func (s FleetData) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeVpcPeeringConnectionsInput) GoString() string { +func (s FleetData) GoString() string { return s.String() } -// SetDryRun sets the DryRun field's value. -func (s *DescribeVpcPeeringConnectionsInput) SetDryRun(v bool) *DescribeVpcPeeringConnectionsInput { - s.DryRun = &v +// SetActivityStatus sets the ActivityStatus field's value. +func (s *FleetData) SetActivityStatus(v string) *FleetData { + s.ActivityStatus = &v return s } -// SetFilters sets the Filters field's value. -func (s *DescribeVpcPeeringConnectionsInput) SetFilters(v []*Filter) *DescribeVpcPeeringConnectionsInput { - s.Filters = v +// SetClientToken sets the ClientToken field's value. +func (s *FleetData) SetClientToken(v string) *FleetData { + s.ClientToken = &v return s } -// SetVpcPeeringConnectionIds sets the VpcPeeringConnectionIds field's value. -func (s *DescribeVpcPeeringConnectionsInput) SetVpcPeeringConnectionIds(v []*string) *DescribeVpcPeeringConnectionsInput { - s.VpcPeeringConnectionIds = v +// SetCreateTime sets the CreateTime field's value. +func (s *FleetData) SetCreateTime(v time.Time) *FleetData { + s.CreateTime = &v return s } -// Contains the output of DescribeVpcPeeringConnections. -type DescribeVpcPeeringConnectionsOutput struct { - _ struct{} `type:"structure"` - - // Information about the VPC peering connections. - VpcPeeringConnections []*VpcPeeringConnection `locationName:"vpcPeeringConnectionSet" locationNameList:"item" type:"list"` +// SetErrors sets the Errors field's value. +func (s *FleetData) SetErrors(v []*DescribeFleetError) *FleetData { + s.Errors = v + return s } -// String returns the string representation -func (s DescribeVpcPeeringConnectionsOutput) String() string { - return awsutil.Prettify(s) +// SetExcessCapacityTerminationPolicy sets the ExcessCapacityTerminationPolicy field's value. +func (s *FleetData) SetExcessCapacityTerminationPolicy(v string) *FleetData { + s.ExcessCapacityTerminationPolicy = &v + return s } -// GoString returns the string representation -func (s DescribeVpcPeeringConnectionsOutput) GoString() string { - return s.String() +// SetFleetId sets the FleetId field's value. +func (s *FleetData) SetFleetId(v string) *FleetData { + s.FleetId = &v + return s } -// SetVpcPeeringConnections sets the VpcPeeringConnections field's value. -func (s *DescribeVpcPeeringConnectionsOutput) SetVpcPeeringConnections(v []*VpcPeeringConnection) *DescribeVpcPeeringConnectionsOutput { - s.VpcPeeringConnections = v +// SetFleetState sets the FleetState field's value. +func (s *FleetData) SetFleetState(v string) *FleetData { + s.FleetState = &v return s } -// Contains the parameters for DescribeVpcs. -type DescribeVpcsInput 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 `locationName:"dryRun" type:"boolean"` +// SetFulfilledCapacity sets the FulfilledCapacity field's value. +func (s *FleetData) SetFulfilledCapacity(v float64) *FleetData { + s.FulfilledCapacity = &v + return s +} - // One or more filters. - // - // * cidr - The primary IPv4 CIDR block of the VPC. The CIDR block you specify - // must exactly match the VPC's CIDR block for information to be returned - // for the VPC. Must contain the slash followed by one or two digits (for - // example, /28). - // - // * cidr-block-association.cidr-block - An IPv4 CIDR block associated with - // the VPC. - // - // * cidr-block-association.association-id - The association ID for an IPv4 - // CIDR block associated with the VPC. - // - // * cidr-block-association.state - The state of an IPv4 CIDR block associated - // with the VPC. - // - // * dhcp-options-id - The ID of a set of DHCP options. - // - // * ipv6-cidr-block-association.ipv6-cidr-block - An IPv6 CIDR block associated - // with the VPC. - // - // * ipv6-cidr-block-association.association-id - The association ID for - // an IPv6 CIDR block associated with the VPC. - // - // * ipv6-cidr-block-association.state - The state of an IPv6 CIDR block - // associated with the VPC. - // - // * isDefault - Indicates whether the VPC is the default VPC. - // - // * state - The state of the VPC (pending | available). - // - // * 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. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - // - // * vpc-id - The ID of the VPC. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` +// SetFulfilledOnDemandCapacity sets the FulfilledOnDemandCapacity field's value. +func (s *FleetData) SetFulfilledOnDemandCapacity(v float64) *FleetData { + s.FulfilledOnDemandCapacity = &v + return s +} - // One or more VPC IDs. - // - // Default: Describes all your VPCs. - VpcIds []*string `locationName:"VpcId" locationNameList:"VpcId" type:"list"` +// SetInstances sets the Instances field's value. +func (s *FleetData) SetInstances(v []*DescribeFleetsInstances) *FleetData { + s.Instances = v + return s } -// String returns the string representation -func (s DescribeVpcsInput) String() string { - return awsutil.Prettify(s) +// SetLaunchTemplateConfigs sets the LaunchTemplateConfigs field's value. +func (s *FleetData) SetLaunchTemplateConfigs(v []*FleetLaunchTemplateConfig) *FleetData { + s.LaunchTemplateConfigs = v + return s } -// GoString returns the string representation -func (s DescribeVpcsInput) GoString() string { - return s.String() +// SetOnDemandOptions sets the OnDemandOptions field's value. +func (s *FleetData) SetOnDemandOptions(v *OnDemandOptions) *FleetData { + s.OnDemandOptions = v + return s } -// SetDryRun sets the DryRun field's value. -func (s *DescribeVpcsInput) SetDryRun(v bool) *DescribeVpcsInput { - s.DryRun = &v +// SetReplaceUnhealthyInstances sets the ReplaceUnhealthyInstances field's value. +func (s *FleetData) SetReplaceUnhealthyInstances(v bool) *FleetData { + s.ReplaceUnhealthyInstances = &v return s } -// SetFilters sets the Filters field's value. -func (s *DescribeVpcsInput) SetFilters(v []*Filter) *DescribeVpcsInput { - s.Filters = v +// SetSpotOptions sets the SpotOptions field's value. +func (s *FleetData) SetSpotOptions(v *SpotOptions) *FleetData { + s.SpotOptions = v return s } -// SetVpcIds sets the VpcIds field's value. -func (s *DescribeVpcsInput) SetVpcIds(v []*string) *DescribeVpcsInput { - s.VpcIds = v +// SetTags sets the Tags field's value. +func (s *FleetData) SetTags(v []*Tag) *FleetData { + s.Tags = v return s } -// Contains the output of DescribeVpcs. -type DescribeVpcsOutput struct { - _ struct{} `type:"structure"` +// SetTargetCapacitySpecification sets the TargetCapacitySpecification field's value. +func (s *FleetData) SetTargetCapacitySpecification(v *TargetCapacitySpecification) *FleetData { + s.TargetCapacitySpecification = v + return s +} - // Information about one or more VPCs. - Vpcs []*Vpc `locationName:"vpcSet" locationNameList:"item" type:"list"` +// SetTerminateInstancesWithExpiration sets the TerminateInstancesWithExpiration field's value. +func (s *FleetData) SetTerminateInstancesWithExpiration(v bool) *FleetData { + s.TerminateInstancesWithExpiration = &v + return s } -// String returns the string representation -func (s DescribeVpcsOutput) String() string { - return awsutil.Prettify(s) +// SetType sets the Type field's value. +func (s *FleetData) SetType(v string) *FleetData { + s.Type = &v + return s } -// GoString returns the string representation -func (s DescribeVpcsOutput) GoString() string { - return s.String() +// SetValidFrom sets the ValidFrom field's value. +func (s *FleetData) SetValidFrom(v time.Time) *FleetData { + s.ValidFrom = &v + return s } -// SetVpcs sets the Vpcs field's value. -func (s *DescribeVpcsOutput) SetVpcs(v []*Vpc) *DescribeVpcsOutput { - s.Vpcs = v +// SetValidUntil sets the ValidUntil field's value. +func (s *FleetData) SetValidUntil(v time.Time) *FleetData { + s.ValidUntil = &v return s } -// Contains the parameters for DescribeVpnConnections. -type DescribeVpnConnectionsInput struct { +// Describes a launch template and overrides. +type FleetLaunchTemplateConfig 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 `locationName:"dryRun" type:"boolean"` - - // One or more filters. - // - // * customer-gateway-configuration - The configuration information for the - // customer gateway. - // - // * customer-gateway-id - The ID of a customer gateway associated with the - // VPN connection. - // - // * state - The state of the VPN connection (pending | available | deleting - // | deleted). - // - // * option.static-routes-only - Indicates whether the connection has static - // routes only. Used for devices that do not support Border Gateway Protocol - // (BGP). - // - // * route.destination-cidr-block - The destination CIDR block. This corresponds - // to the subnet used in a customer data center. - // - // * bgp-asn - The BGP Autonomous System Number (ASN) associated with a BGP - // device. - // - // * 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. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - // - // * type - The type of VPN connection. Currently the only supported type - // is ipsec.1. - // - // * vpn-connection-id - The ID of the VPN connection. - // - // * vpn-gateway-id - The ID of a virtual private gateway associated with - // the VPN connection. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + // The launch template. + LaunchTemplateSpecification *FleetLaunchTemplateSpecification `locationName:"launchTemplateSpecification" type:"structure"` - // One or more VPN connection IDs. - // - // Default: Describes your VPN connections. - VpnConnectionIds []*string `locationName:"VpnConnectionId" locationNameList:"VpnConnectionId" type:"list"` + // Any parameters that you specify override the same parameters in the launch + // template. + Overrides []*FleetLaunchTemplateOverrides `locationName:"overrides" locationNameList:"item" type:"list"` } // String returns the string representation -func (s DescribeVpnConnectionsInput) String() string { +func (s FleetLaunchTemplateConfig) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeVpnConnectionsInput) GoString() string { +func (s FleetLaunchTemplateConfig) GoString() string { return s.String() } -// SetDryRun sets the DryRun field's value. -func (s *DescribeVpnConnectionsInput) SetDryRun(v bool) *DescribeVpnConnectionsInput { - s.DryRun = &v - return s -} - -// SetFilters sets the Filters field's value. -func (s *DescribeVpnConnectionsInput) SetFilters(v []*Filter) *DescribeVpnConnectionsInput { - s.Filters = v +// SetLaunchTemplateSpecification sets the LaunchTemplateSpecification field's value. +func (s *FleetLaunchTemplateConfig) SetLaunchTemplateSpecification(v *FleetLaunchTemplateSpecification) *FleetLaunchTemplateConfig { + s.LaunchTemplateSpecification = v return s } -// SetVpnConnectionIds sets the VpnConnectionIds field's value. -func (s *DescribeVpnConnectionsInput) SetVpnConnectionIds(v []*string) *DescribeVpnConnectionsInput { - s.VpnConnectionIds = v +// SetOverrides sets the Overrides field's value. +func (s *FleetLaunchTemplateConfig) SetOverrides(v []*FleetLaunchTemplateOverrides) *FleetLaunchTemplateConfig { + s.Overrides = v return s } -// Contains the output of DescribeVpnConnections. -type DescribeVpnConnectionsOutput struct { +// Describes a launch template and overrides. +type FleetLaunchTemplateConfigRequest struct { _ struct{} `type:"structure"` - // Information about one or more VPN connections. - VpnConnections []*VpnConnection `locationName:"vpnConnectionSet" locationNameList:"item" type:"list"` + // The launch template to use. You must specify either the launch template ID + // or launch template name in the request. + LaunchTemplateSpecification *FleetLaunchTemplateSpecificationRequest `type:"structure"` + + // Any parameters that you specify override the same parameters in the launch + // template. + Overrides []*FleetLaunchTemplateOverridesRequest `locationNameList:"item" type:"list"` } // String returns the string representation -func (s DescribeVpnConnectionsOutput) String() string { +func (s FleetLaunchTemplateConfigRequest) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeVpnConnectionsOutput) GoString() string { +func (s FleetLaunchTemplateConfigRequest) GoString() string { return s.String() } -// SetVpnConnections sets the VpnConnections field's value. -func (s *DescribeVpnConnectionsOutput) SetVpnConnections(v []*VpnConnection) *DescribeVpnConnectionsOutput { - s.VpnConnections = v +// Validate inspects the fields of the type to determine if they are valid. +func (s *FleetLaunchTemplateConfigRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FleetLaunchTemplateConfigRequest"} + if s.LaunchTemplateSpecification != nil { + if err := s.LaunchTemplateSpecification.Validate(); err != nil { + invalidParams.AddNested("LaunchTemplateSpecification", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLaunchTemplateSpecification sets the LaunchTemplateSpecification field's value. +func (s *FleetLaunchTemplateConfigRequest) SetLaunchTemplateSpecification(v *FleetLaunchTemplateSpecificationRequest) *FleetLaunchTemplateConfigRequest { + s.LaunchTemplateSpecification = v return s } -// Contains the parameters for DescribeVpnGateways. -type DescribeVpnGatewaysInput struct { +// SetOverrides sets the Overrides field's value. +func (s *FleetLaunchTemplateConfigRequest) SetOverrides(v []*FleetLaunchTemplateOverridesRequest) *FleetLaunchTemplateConfigRequest { + s.Overrides = v + return s +} + +// Describes overrides for a launch template. +type FleetLaunchTemplateOverrides 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 `locationName:"dryRun" type:"boolean"` + // The Availability Zone in which to launch the instances. + AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - // One or more filters. - // - // * amazon-side-asn - The Autonomous System Number (ASN) for the Amazon - // side of the gateway. - // - // * attachment.state - The current state of the attachment between the gateway - // and the VPC (attaching | attached | detaching | detached). - // - // * attachment.vpc-id - The ID of an attached VPC. - // - // * availability-zone - The Availability Zone for the virtual private gateway - // (if applicable). - // - // * state - The state of the virtual private gateway (pending | available - // | deleting | deleted). - // - // * 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. - // - // * tag-key - The key of a tag assigned to the resource. Use this filter - // to find all resources assigned a tag with a specific key, regardless of - // the tag value. - // - // * type - The type of virtual private gateway. Currently the only supported - // type is ipsec.1. - // - // * vpn-gateway-id - The ID of the virtual private gateway. - Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + // The instance type. + InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` + + // The maximum price per unit hour that you are willing to pay for a Spot Instance. + MaxPrice *string `locationName:"maxPrice" type:"string"` - // One or more virtual private gateway IDs. - // - // Default: Describes all your virtual private gateways. - VpnGatewayIds []*string `locationName:"VpnGatewayId" locationNameList:"VpnGatewayId" type:"list"` + // 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. + Priority *float64 `locationName:"priority" type:"double"` + + // The ID of the subnet in which to launch the instances. + SubnetId *string `locationName:"subnetId" type:"string"` + + // The number of units provided by the specified instance type. + WeightedCapacity *float64 `locationName:"weightedCapacity" type:"double"` } // String returns the string representation -func (s DescribeVpnGatewaysInput) String() string { +func (s FleetLaunchTemplateOverrides) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeVpnGatewaysInput) GoString() string { +func (s FleetLaunchTemplateOverrides) GoString() string { return s.String() } -// SetDryRun sets the DryRun field's value. -func (s *DescribeVpnGatewaysInput) SetDryRun(v bool) *DescribeVpnGatewaysInput { - s.DryRun = &v +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *FleetLaunchTemplateOverrides) SetAvailabilityZone(v string) *FleetLaunchTemplateOverrides { + s.AvailabilityZone = &v return s } -// SetFilters sets the Filters field's value. -func (s *DescribeVpnGatewaysInput) SetFilters(v []*Filter) *DescribeVpnGatewaysInput { - s.Filters = v +// SetInstanceType sets the InstanceType field's value. +func (s *FleetLaunchTemplateOverrides) SetInstanceType(v string) *FleetLaunchTemplateOverrides { + s.InstanceType = &v return s } -// SetVpnGatewayIds sets the VpnGatewayIds field's value. -func (s *DescribeVpnGatewaysInput) SetVpnGatewayIds(v []*string) *DescribeVpnGatewaysInput { - s.VpnGatewayIds = v +// SetMaxPrice sets the MaxPrice field's value. +func (s *FleetLaunchTemplateOverrides) SetMaxPrice(v string) *FleetLaunchTemplateOverrides { + s.MaxPrice = &v return s } -// Contains the output of DescribeVpnGateways. -type DescribeVpnGatewaysOutput struct { - _ struct{} `type:"structure"` - - // Information about one or more virtual private gateways. - VpnGateways []*VpnGateway `locationName:"vpnGatewaySet" locationNameList:"item" type:"list"` +// SetPlacement sets the Placement field's value. +func (s *FleetLaunchTemplateOverrides) SetPlacement(v *PlacementResponse) *FleetLaunchTemplateOverrides { + s.Placement = v + return s } -// String returns the string representation -func (s DescribeVpnGatewaysOutput) String() string { - return awsutil.Prettify(s) +// SetPriority sets the Priority field's value. +func (s *FleetLaunchTemplateOverrides) SetPriority(v float64) *FleetLaunchTemplateOverrides { + s.Priority = &v + return s } -// GoString returns the string representation -func (s DescribeVpnGatewaysOutput) GoString() string { - return s.String() +// SetSubnetId sets the SubnetId field's value. +func (s *FleetLaunchTemplateOverrides) SetSubnetId(v string) *FleetLaunchTemplateOverrides { + s.SubnetId = &v + return s } -// SetVpnGateways sets the VpnGateways field's value. -func (s *DescribeVpnGatewaysOutput) SetVpnGateways(v []*VpnGateway) *DescribeVpnGatewaysOutput { - s.VpnGateways = v +// SetWeightedCapacity sets the WeightedCapacity field's value. +func (s *FleetLaunchTemplateOverrides) SetWeightedCapacity(v float64) *FleetLaunchTemplateOverrides { + s.WeightedCapacity = &v return s } -// Contains the parameters for DetachClassicLinkVpc. -type DetachClassicLinkVpcInput struct { +// Describes overrides for a launch template. +type FleetLaunchTemplateOverridesRequest 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 `locationName:"dryRun" type:"boolean"` + // The Availability Zone in which to launch the instances. + AvailabilityZone *string `type:"string"` - // The ID of the instance to unlink from the VPC. - // - // InstanceId is a required field - InstanceId *string `locationName:"instanceId" type:"string" required:"true"` + // The instance type. + InstanceType *string `type:"string" enum:"InstanceType"` - // The ID of the VPC to which the instance is linked. - // - // VpcId is a required field - VpcId *string `locationName:"vpcId" type:"string" required:"true"` + // The maximum price per unit hour that you are willing to pay for a Spot Instance. + MaxPrice *string `type:"string"` + + // 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. + Priority *float64 `type:"double"` + + // The ID of the subnet in which to launch the instances. + SubnetId *string `type:"string"` + + // The number of units provided by the specified instance type. + WeightedCapacity *float64 `type:"double"` } // String returns the string representation -func (s DetachClassicLinkVpcInput) String() string { +func (s FleetLaunchTemplateOverridesRequest) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DetachClassicLinkVpcInput) GoString() string { +func (s FleetLaunchTemplateOverridesRequest) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetachClassicLinkVpcInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachClassicLinkVpcInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *DetachClassicLinkVpcInput) SetDryRun(v bool) *DetachClassicLinkVpcInput { - s.DryRun = &v +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *FleetLaunchTemplateOverridesRequest) SetAvailabilityZone(v string) *FleetLaunchTemplateOverridesRequest { + s.AvailabilityZone = &v return s } -// SetInstanceId sets the InstanceId field's value. -func (s *DetachClassicLinkVpcInput) SetInstanceId(v string) *DetachClassicLinkVpcInput { - s.InstanceId = &v +// SetInstanceType sets the InstanceType field's value. +func (s *FleetLaunchTemplateOverridesRequest) SetInstanceType(v string) *FleetLaunchTemplateOverridesRequest { + s.InstanceType = &v return s } -// SetVpcId sets the VpcId field's value. -func (s *DetachClassicLinkVpcInput) SetVpcId(v string) *DetachClassicLinkVpcInput { - s.VpcId = &v +// SetMaxPrice sets the MaxPrice field's value. +func (s *FleetLaunchTemplateOverridesRequest) SetMaxPrice(v string) *FleetLaunchTemplateOverridesRequest { + s.MaxPrice = &v return s } -// Contains the output of DetachClassicLinkVpc. -type DetachClassicLinkVpcOutput struct { - _ struct{} `type:"structure"` - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool `locationName:"return" type:"boolean"` +// SetPlacement sets the Placement field's value. +func (s *FleetLaunchTemplateOverridesRequest) SetPlacement(v *Placement) *FleetLaunchTemplateOverridesRequest { + s.Placement = v + return s } -// String returns the string representation -func (s DetachClassicLinkVpcOutput) String() string { - return awsutil.Prettify(s) +// SetPriority sets the Priority field's value. +func (s *FleetLaunchTemplateOverridesRequest) SetPriority(v float64) *FleetLaunchTemplateOverridesRequest { + s.Priority = &v + return s } -// GoString returns the string representation -func (s DetachClassicLinkVpcOutput) GoString() string { - return s.String() +// SetSubnetId sets the SubnetId field's value. +func (s *FleetLaunchTemplateOverridesRequest) SetSubnetId(v string) *FleetLaunchTemplateOverridesRequest { + s.SubnetId = &v + return s } -// SetReturn sets the Return field's value. -func (s *DetachClassicLinkVpcOutput) SetReturn(v bool) *DetachClassicLinkVpcOutput { - s.Return = &v +// SetWeightedCapacity sets the WeightedCapacity field's value. +func (s *FleetLaunchTemplateOverridesRequest) SetWeightedCapacity(v float64) *FleetLaunchTemplateOverridesRequest { + s.WeightedCapacity = &v return s } -// Contains the parameters for DetachInternetGateway. -type DetachInternetGatewayInput struct { +// Describes a launch template. +type FleetLaunchTemplateSpecification 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 `locationName:"dryRun" type:"boolean"` + // The ID of the launch template. You must specify either a template ID or a + // template name. + LaunchTemplateId *string `locationName:"launchTemplateId" type:"string"` - // The ID of the internet gateway. - // - // InternetGatewayId is a required field - InternetGatewayId *string `locationName:"internetGatewayId" type:"string" required:"true"` + // The name of the launch template. You must specify either a template name + // or a template ID. + LaunchTemplateName *string `locationName:"launchTemplateName" min:"3" type:"string"` - // The ID of the VPC. - // - // VpcId is a required field - VpcId *string `locationName:"vpcId" type:"string" required:"true"` + // The version number of the launch template. You must specify a version number. + Version *string `locationName:"version" type:"string"` } // String returns the string representation -func (s DetachInternetGatewayInput) String() string { +func (s FleetLaunchTemplateSpecification) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DetachInternetGatewayInput) GoString() string { +func (s FleetLaunchTemplateSpecification) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DetachInternetGatewayInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachInternetGatewayInput"} - if s.InternetGatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("InternetGatewayId")) - } - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) +func (s *FleetLaunchTemplateSpecification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FleetLaunchTemplateSpecification"} + if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3)) } if invalidParams.Len() > 0 { @@ -43872,72 +56929,54 @@ func (s *DetachInternetGatewayInput) Validate() error { return nil } -// SetDryRun sets the DryRun field's value. -func (s *DetachInternetGatewayInput) SetDryRun(v bool) *DetachInternetGatewayInput { - s.DryRun = &v +// SetLaunchTemplateId sets the LaunchTemplateId field's value. +func (s *FleetLaunchTemplateSpecification) SetLaunchTemplateId(v string) *FleetLaunchTemplateSpecification { + s.LaunchTemplateId = &v return s } -// SetInternetGatewayId sets the InternetGatewayId field's value. -func (s *DetachInternetGatewayInput) SetInternetGatewayId(v string) *DetachInternetGatewayInput { - s.InternetGatewayId = &v +// SetLaunchTemplateName sets the LaunchTemplateName field's value. +func (s *FleetLaunchTemplateSpecification) SetLaunchTemplateName(v string) *FleetLaunchTemplateSpecification { + s.LaunchTemplateName = &v return s } -// SetVpcId sets the VpcId field's value. -func (s *DetachInternetGatewayInput) SetVpcId(v string) *DetachInternetGatewayInput { - s.VpcId = &v +// SetVersion sets the Version field's value. +func (s *FleetLaunchTemplateSpecification) SetVersion(v string) *FleetLaunchTemplateSpecification { + s.Version = &v return s } -type DetachInternetGatewayOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DetachInternetGatewayOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DetachInternetGatewayOutput) GoString() string { - return s.String() -} - -// Contains the parameters for DetachNetworkInterface. -type DetachNetworkInterfaceInput struct { +// The launch template to use. You must specify either the launch template ID +// or launch template name in the request. +type FleetLaunchTemplateSpecificationRequest struct { _ struct{} `type:"structure"` - // The ID of the attachment. - // - // AttachmentId is a required field - AttachmentId *string `locationName:"attachmentId" type:"string" required:"true"` + // The ID of the launch template. + LaunchTemplateId *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 `locationName:"dryRun" type:"boolean"` + // The name of the launch template. + LaunchTemplateName *string `min:"3" type:"string"` - // Specifies whether to force a detachment. - Force *bool `locationName:"force" type:"boolean"` + // The version number of the launch template. + Version *string `type:"string"` } // String returns the string representation -func (s DetachNetworkInterfaceInput) String() string { +func (s FleetLaunchTemplateSpecificationRequest) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DetachNetworkInterfaceInput) GoString() string { +func (s FleetLaunchTemplateSpecificationRequest) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DetachNetworkInterfaceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachNetworkInterfaceInput"} - if s.AttachmentId == nil { - invalidParams.Add(request.NewErrParamRequired("AttachmentId")) +func (s *FleetLaunchTemplateSpecificationRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FleetLaunchTemplateSpecificationRequest"} + if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3)) } if invalidParams.Len() > 0 { @@ -43946,393 +56985,393 @@ func (s *DetachNetworkInterfaceInput) Validate() error { return nil } -// SetAttachmentId sets the AttachmentId field's value. -func (s *DetachNetworkInterfaceInput) SetAttachmentId(v string) *DetachNetworkInterfaceInput { - s.AttachmentId = &v +// SetLaunchTemplateId sets the LaunchTemplateId field's value. +func (s *FleetLaunchTemplateSpecificationRequest) SetLaunchTemplateId(v string) *FleetLaunchTemplateSpecificationRequest { + s.LaunchTemplateId = &v return s } -// SetDryRun sets the DryRun field's value. -func (s *DetachNetworkInterfaceInput) SetDryRun(v bool) *DetachNetworkInterfaceInput { - s.DryRun = &v +// SetLaunchTemplateName sets the LaunchTemplateName field's value. +func (s *FleetLaunchTemplateSpecificationRequest) SetLaunchTemplateName(v string) *FleetLaunchTemplateSpecificationRequest { + s.LaunchTemplateName = &v return s } -// SetForce sets the Force field's value. -func (s *DetachNetworkInterfaceInput) SetForce(v bool) *DetachNetworkInterfaceInput { - s.Force = &v +// SetVersion sets the Version field's value. +func (s *FleetLaunchTemplateSpecificationRequest) SetVersion(v string) *FleetLaunchTemplateSpecificationRequest { + s.Version = &v return s } -type DetachNetworkInterfaceOutput struct { +// Describes a flow log. +type FlowLog struct { _ struct{} `type:"structure"` -} -// String returns the string representation -func (s DetachNetworkInterfaceOutput) String() string { - return awsutil.Prettify(s) -} + // The date and time the flow log was created. + CreationTime *time.Time `locationName:"creationTime" type:"timestamp"` -// GoString returns the string representation -func (s DetachNetworkInterfaceOutput) GoString() string { - return s.String() -} + // Information about the error that occurred. Rate limited indicates that CloudWatch + // Logs throttling has been applied for one or more network interfaces, or that + // you've reached the limit on the number of log groups that you can create. + // Access error indicates that the IAM role associated with the flow log does + // not have sufficient permissions to publish to CloudWatch Logs. Unknown error + // indicates an internal error. + DeliverLogsErrorMessage *string `locationName:"deliverLogsErrorMessage" type:"string"` -// Contains the parameters for DetachVolume. -type DetachVolumeInput struct { - _ struct{} `type:"structure"` + // The ARN of the IAM role that posts logs to CloudWatch Logs. + DeliverLogsPermissionArn *string `locationName:"deliverLogsPermissionArn" type:"string"` - // The device name. - Device *string `type:"string"` + // The status of the logs delivery (SUCCESS | FAILED). + DeliverLogsStatus *string `locationName:"deliverLogsStatus" 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 `locationName:"dryRun" type:"boolean"` + // The flow log ID. + FlowLogId *string `locationName:"flowLogId" type:"string"` - // Forces detachment if the previous detachment attempt did not occur cleanly - // (for example, logging into an instance, unmounting the volume, and detaching - // normally). This option can lead to data loss or a corrupted file system. - // Use this option only as a last resort to detach a volume from a failed instance. - // The instance won't have an opportunity to flush file system caches or file - // system metadata. If you use this option, you must perform file system check - // and repair procedures. - Force *bool `type:"boolean"` + // The status of the flow log (ACTIVE). + FlowLogStatus *string `locationName:"flowLogStatus" type:"string"` - // The ID of the instance. - InstanceId *string `type:"string"` + // Specifies the destination to which the flow log data is published. Flow log + // data can be published to an CloudWatch Logs log group or an Amazon S3 bucket. + // If the flow log publishes to CloudWatch Logs, this element indicates the + // Amazon Resource Name (ARN) of the CloudWatch Logs log group to which the + // data is published. If the flow log publishes to Amazon S3, this element indicates + // the ARN of the Amazon S3 bucket to which the data is published. + LogDestination *string `locationName:"logDestination" type:"string"` - // The ID of the volume. - // - // VolumeId is a required field - VolumeId *string `type:"string" required:"true"` + // Specifies the type of destination to which the flow log data is published. + // Flow log data can be published to CloudWatch Logs or Amazon S3. + LogDestinationType *string `locationName:"logDestinationType" type:"string" enum:"LogDestinationType"` + + // The name of the flow log group. + LogGroupName *string `locationName:"logGroupName" type:"string"` + + // The ID of the resource on which the flow log was created. + ResourceId *string `locationName:"resourceId" type:"string"` + + // The type of traffic captured for the flow log. + TrafficType *string `locationName:"trafficType" type:"string" enum:"TrafficType"` } // String returns the string representation -func (s DetachVolumeInput) String() string { +func (s FlowLog) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DetachVolumeInput) GoString() string { +func (s FlowLog) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetachVolumeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachVolumeInput"} - if s.VolumeId == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDevice sets the Device field's value. -func (s *DetachVolumeInput) SetDevice(v string) *DetachVolumeInput { - s.Device = &v +// SetCreationTime sets the CreationTime field's value. +func (s *FlowLog) SetCreationTime(v time.Time) *FlowLog { + s.CreationTime = &v return s } -// SetDryRun sets the DryRun field's value. -func (s *DetachVolumeInput) SetDryRun(v bool) *DetachVolumeInput { - s.DryRun = &v +// SetDeliverLogsErrorMessage sets the DeliverLogsErrorMessage field's value. +func (s *FlowLog) SetDeliverLogsErrorMessage(v string) *FlowLog { + s.DeliverLogsErrorMessage = &v return s } -// SetForce sets the Force field's value. -func (s *DetachVolumeInput) SetForce(v bool) *DetachVolumeInput { - s.Force = &v +// SetDeliverLogsPermissionArn sets the DeliverLogsPermissionArn field's value. +func (s *FlowLog) SetDeliverLogsPermissionArn(v string) *FlowLog { + s.DeliverLogsPermissionArn = &v return s } -// SetInstanceId sets the InstanceId field's value. -func (s *DetachVolumeInput) SetInstanceId(v string) *DetachVolumeInput { - s.InstanceId = &v +// SetDeliverLogsStatus sets the DeliverLogsStatus field's value. +func (s *FlowLog) SetDeliverLogsStatus(v string) *FlowLog { + s.DeliverLogsStatus = &v return s } -// SetVolumeId sets the VolumeId field's value. -func (s *DetachVolumeInput) SetVolumeId(v string) *DetachVolumeInput { - s.VolumeId = &v +// SetFlowLogId sets the FlowLogId field's value. +func (s *FlowLog) SetFlowLogId(v string) *FlowLog { + s.FlowLogId = &v return s } -// Contains the parameters for DetachVpnGateway. -type DetachVpnGatewayInput 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 `locationName:"dryRun" type:"boolean"` - - // The ID of the VPC. - // - // VpcId is a required field - VpcId *string `type:"string" required:"true"` - - // The ID of the virtual private gateway. - // - // VpnGatewayId is a required field - VpnGatewayId *string `type:"string" required:"true"` -} - -// String returns the string representation -func (s DetachVpnGatewayInput) String() string { - return awsutil.Prettify(s) +// SetFlowLogStatus sets the FlowLogStatus field's value. +func (s *FlowLog) SetFlowLogStatus(v string) *FlowLog { + s.FlowLogStatus = &v + return s } -// GoString returns the string representation -func (s DetachVpnGatewayInput) GoString() string { - return s.String() +// SetLogDestination sets the LogDestination field's value. +func (s *FlowLog) SetLogDestination(v string) *FlowLog { + s.LogDestination = &v + return s } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetachVpnGatewayInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachVpnGatewayInput"} - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } - if s.VpnGatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("VpnGatewayId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetLogDestinationType sets the LogDestinationType field's value. +func (s *FlowLog) SetLogDestinationType(v string) *FlowLog { + s.LogDestinationType = &v + return s } -// SetDryRun sets the DryRun field's value. -func (s *DetachVpnGatewayInput) SetDryRun(v bool) *DetachVpnGatewayInput { - s.DryRun = &v +// SetLogGroupName sets the LogGroupName field's value. +func (s *FlowLog) SetLogGroupName(v string) *FlowLog { + s.LogGroupName = &v return s } -// SetVpcId sets the VpcId field's value. -func (s *DetachVpnGatewayInput) SetVpcId(v string) *DetachVpnGatewayInput { - s.VpcId = &v +// SetResourceId sets the ResourceId field's value. +func (s *FlowLog) SetResourceId(v string) *FlowLog { + s.ResourceId = &v return s } -// SetVpnGatewayId sets the VpnGatewayId field's value. -func (s *DetachVpnGatewayInput) SetVpnGatewayId(v string) *DetachVpnGatewayInput { - s.VpnGatewayId = &v +// SetTrafficType sets the TrafficType field's value. +func (s *FlowLog) SetTrafficType(v string) *FlowLog { + s.TrafficType = &v return s } -type DetachVpnGatewayOutput struct { - _ struct{} `type:"structure"` -} +// Describes an Amazon FPGA image (AFI). +type FpgaImage struct { + _ struct{} `type:"structure"` + + // The date and time the AFI was created. + CreateTime *time.Time `locationName:"createTime" type:"timestamp"` + + // The description of the AFI. + Description *string `locationName:"description" type:"string"` + + // The global FPGA image identifier (AGFI ID). + FpgaImageGlobalId *string `locationName:"fpgaImageGlobalId" type:"string"` + + // The FPGA image identifier (AFI ID). + FpgaImageId *string `locationName:"fpgaImageId" type:"string"` + + // The name of the AFI. + Name *string `locationName:"name" type:"string"` + + // The alias of the AFI owner. Possible values include self, amazon, and aws-marketplace. + OwnerAlias *string `locationName:"ownerAlias" type:"string"` + + // The AWS account ID of the AFI owner. + OwnerId *string `locationName:"ownerId" type:"string"` + + // Information about the PCI bus. + PciId *PciId `locationName:"pciId" type:"structure"` -// String returns the string representation -func (s DetachVpnGatewayOutput) String() string { - return awsutil.Prettify(s) -} + // The product codes for the AFI. + ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` -// GoString returns the string representation -func (s DetachVpnGatewayOutput) GoString() string { - return s.String() -} + // Indicates whether the AFI is public. + Public *bool `locationName:"public" type:"boolean"` -// Describes a DHCP configuration option. -type DhcpConfiguration struct { - _ struct{} `type:"structure"` + // The version of the AWS Shell that was used to create the bitstream. + ShellVersion *string `locationName:"shellVersion" type:"string"` - // The name of a DHCP option. - Key *string `locationName:"key" type:"string"` + // Information about the state of the AFI. + State *FpgaImageState `locationName:"state" type:"structure"` - // One or more values for the DHCP option. - Values []*AttributeValue `locationName:"valueSet" locationNameList:"item" type:"list"` + // Any tags assigned to the AFI. + Tags []*Tag `locationName:"tags" locationNameList:"item" type:"list"` + + // The time of the most recent update to the AFI. + UpdateTime *time.Time `locationName:"updateTime" type:"timestamp"` } // String returns the string representation -func (s DhcpConfiguration) String() string { +func (s FpgaImage) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DhcpConfiguration) GoString() string { +func (s FpgaImage) GoString() string { return s.String() } -// SetKey sets the Key field's value. -func (s *DhcpConfiguration) SetKey(v string) *DhcpConfiguration { - s.Key = &v +// SetCreateTime sets the CreateTime field's value. +func (s *FpgaImage) SetCreateTime(v time.Time) *FpgaImage { + s.CreateTime = &v return s } -// SetValues sets the Values field's value. -func (s *DhcpConfiguration) SetValues(v []*AttributeValue) *DhcpConfiguration { - s.Values = v +// SetDescription sets the Description field's value. +func (s *FpgaImage) SetDescription(v string) *FpgaImage { + s.Description = &v return s } -// Describes a set of DHCP options. -type DhcpOptions struct { - _ struct{} `type:"structure"` - - // One or more DHCP options in the set. - DhcpConfigurations []*DhcpConfiguration `locationName:"dhcpConfigurationSet" locationNameList:"item" type:"list"` - - // The ID of the set of DHCP options. - DhcpOptionsId *string `locationName:"dhcpOptionsId" type:"string"` - - // Any tags assigned to the DHCP options set. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` +// SetFpgaImageGlobalId sets the FpgaImageGlobalId field's value. +func (s *FpgaImage) SetFpgaImageGlobalId(v string) *FpgaImage { + s.FpgaImageGlobalId = &v + return s } -// String returns the string representation -func (s DhcpOptions) String() string { - return awsutil.Prettify(s) +// SetFpgaImageId sets the FpgaImageId field's value. +func (s *FpgaImage) SetFpgaImageId(v string) *FpgaImage { + s.FpgaImageId = &v + return s } -// GoString returns the string representation -func (s DhcpOptions) GoString() string { - return s.String() +// SetName sets the Name field's value. +func (s *FpgaImage) SetName(v string) *FpgaImage { + s.Name = &v + return s } -// SetDhcpConfigurations sets the DhcpConfigurations field's value. -func (s *DhcpOptions) SetDhcpConfigurations(v []*DhcpConfiguration) *DhcpOptions { - s.DhcpConfigurations = v +// SetOwnerAlias sets the OwnerAlias field's value. +func (s *FpgaImage) SetOwnerAlias(v string) *FpgaImage { + s.OwnerAlias = &v return s } -// SetDhcpOptionsId sets the DhcpOptionsId field's value. -func (s *DhcpOptions) SetDhcpOptionsId(v string) *DhcpOptions { - s.DhcpOptionsId = &v +// SetOwnerId sets the OwnerId field's value. +func (s *FpgaImage) SetOwnerId(v string) *FpgaImage { + s.OwnerId = &v return s } -// SetTags sets the Tags field's value. -func (s *DhcpOptions) SetTags(v []*Tag) *DhcpOptions { - s.Tags = v +// SetPciId sets the PciId field's value. +func (s *FpgaImage) SetPciId(v *PciId) *FpgaImage { + s.PciId = v return s } -// Contains the parameters for DisableVgwRoutePropagation. -type DisableVgwRoutePropagationInput struct { - _ struct{} `type:"structure"` - - // The ID of the virtual private gateway. - // - // GatewayId is a required field - GatewayId *string `type:"string" required:"true"` - - // The ID of the route table. - // - // RouteTableId is a required field - RouteTableId *string `type:"string" required:"true"` +// SetProductCodes sets the ProductCodes field's value. +func (s *FpgaImage) SetProductCodes(v []*ProductCode) *FpgaImage { + s.ProductCodes = v + return s } -// String returns the string representation -func (s DisableVgwRoutePropagationInput) String() string { - return awsutil.Prettify(s) +// SetPublic sets the Public field's value. +func (s *FpgaImage) SetPublic(v bool) *FpgaImage { + s.Public = &v + return s } -// GoString returns the string representation -func (s DisableVgwRoutePropagationInput) GoString() string { - return s.String() +// SetShellVersion sets the ShellVersion field's value. +func (s *FpgaImage) SetShellVersion(v string) *FpgaImage { + s.ShellVersion = &v + return s } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisableVgwRoutePropagationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisableVgwRoutePropagationInput"} - if s.GatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayId")) - } - if s.RouteTableId == nil { - invalidParams.Add(request.NewErrParamRequired("RouteTableId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetState sets the State field's value. +func (s *FpgaImage) SetState(v *FpgaImageState) *FpgaImage { + s.State = v + return s } -// SetGatewayId sets the GatewayId field's value. -func (s *DisableVgwRoutePropagationInput) SetGatewayId(v string) *DisableVgwRoutePropagationInput { - s.GatewayId = &v +// SetTags sets the Tags field's value. +func (s *FpgaImage) SetTags(v []*Tag) *FpgaImage { + s.Tags = v return s } -// SetRouteTableId sets the RouteTableId field's value. -func (s *DisableVgwRoutePropagationInput) SetRouteTableId(v string) *DisableVgwRoutePropagationInput { - s.RouteTableId = &v +// SetUpdateTime sets the UpdateTime field's value. +func (s *FpgaImage) SetUpdateTime(v time.Time) *FpgaImage { + s.UpdateTime = &v return s } -type DisableVgwRoutePropagationOutput struct { +// Describes an Amazon FPGA image (AFI) attribute. +type FpgaImageAttribute struct { _ struct{} `type:"structure"` + + // The description of the AFI. + Description *string `locationName:"description" type:"string"` + + // The ID of the AFI. + FpgaImageId *string `locationName:"fpgaImageId" type:"string"` + + // One or more load permissions. + LoadPermissions []*LoadPermission `locationName:"loadPermissions" locationNameList:"item" type:"list"` + + // The name of the AFI. + Name *string `locationName:"name" type:"string"` + + // One or more product codes. + ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` } // String returns the string representation -func (s DisableVgwRoutePropagationOutput) String() string { +func (s FpgaImageAttribute) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DisableVgwRoutePropagationOutput) GoString() string { +func (s FpgaImageAttribute) GoString() string { return s.String() } -// Contains the parameters for DisableVpcClassicLinkDnsSupport. -type DisableVpcClassicLinkDnsSupportInput struct { - _ struct{} `type:"structure"` +// SetDescription sets the Description field's value. +func (s *FpgaImageAttribute) SetDescription(v string) *FpgaImageAttribute { + s.Description = &v + return s +} - // The ID of the VPC. - VpcId *string `type:"string"` +// SetFpgaImageId sets the FpgaImageId field's value. +func (s *FpgaImageAttribute) SetFpgaImageId(v string) *FpgaImageAttribute { + s.FpgaImageId = &v + return s } -// String returns the string representation -func (s DisableVpcClassicLinkDnsSupportInput) String() string { - return awsutil.Prettify(s) +// SetLoadPermissions sets the LoadPermissions field's value. +func (s *FpgaImageAttribute) SetLoadPermissions(v []*LoadPermission) *FpgaImageAttribute { + s.LoadPermissions = v + return s } -// GoString returns the string representation -func (s DisableVpcClassicLinkDnsSupportInput) GoString() string { - return s.String() +// SetName sets the Name field's value. +func (s *FpgaImageAttribute) SetName(v string) *FpgaImageAttribute { + s.Name = &v + return s } -// SetVpcId sets the VpcId field's value. -func (s *DisableVpcClassicLinkDnsSupportInput) SetVpcId(v string) *DisableVpcClassicLinkDnsSupportInput { - s.VpcId = &v +// SetProductCodes sets the ProductCodes field's value. +func (s *FpgaImageAttribute) SetProductCodes(v []*ProductCode) *FpgaImageAttribute { + s.ProductCodes = v return s } -// Contains the output of DisableVpcClassicLinkDnsSupport. -type DisableVpcClassicLinkDnsSupportOutput struct { +// Describes the state of the bitstream generation process for an Amazon FPGA +// image (AFI). +type FpgaImageState struct { _ struct{} `type:"structure"` - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool `locationName:"return" type:"boolean"` + // The state. The following are the possible values: + // + // * pending - AFI bitstream generation is in progress. + // + // * available - The AFI is available for use. + // + // * failed - AFI bitstream generation failed. + // + // * unavailable - The AFI is no longer available for use. + Code *string `locationName:"code" type:"string" enum:"FpgaImageStateCode"` + + // If the state is failed, this is the error message. + Message *string `locationName:"message" type:"string"` } // String returns the string representation -func (s DisableVpcClassicLinkDnsSupportOutput) String() string { +func (s FpgaImageState) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DisableVpcClassicLinkDnsSupportOutput) GoString() string { +func (s FpgaImageState) GoString() string { return s.String() } -// SetReturn sets the Return field's value. -func (s *DisableVpcClassicLinkDnsSupportOutput) SetReturn(v bool) *DisableVpcClassicLinkDnsSupportOutput { - s.Return = &v +// SetCode sets the Code field's value. +func (s *FpgaImageState) SetCode(v string) *FpgaImageState { + s.Code = &v return s } -// Contains the parameters for DisableVpcClassicLink. -type DisableVpcClassicLinkInput struct { +// SetMessage sets the Message field's value. +func (s *FpgaImageState) SetMessage(v string) *FpgaImageState { + s.Message = &v + return s +} + +type GetConsoleOutputInput struct { _ struct{} `type:"structure"` // Checks whether you have the required permissions for the action, without @@ -44341,27 +57380,32 @@ type DisableVpcClassicLinkInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // The ID of the VPC. + // The ID of the instance. // - // VpcId is a required field - VpcId *string `locationName:"vpcId" type:"string" required:"true"` + // InstanceId is a required field + InstanceId *string `type:"string" required:"true"` + + // When enabled, retrieves the latest console output for the instance. + // + // Default: disabled (false) + Latest *bool `type:"boolean"` } // String returns the string representation -func (s DisableVpcClassicLinkInput) String() string { +func (s GetConsoleOutputInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DisableVpcClassicLinkInput) GoString() string { +func (s GetConsoleOutputInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DisableVpcClassicLinkInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisableVpcClassicLinkInput"} - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) +func (s *GetConsoleOutputInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetConsoleOutputInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) } if invalidParams.Len() > 0 { @@ -44371,124 +57415,99 @@ func (s *DisableVpcClassicLinkInput) Validate() error { } // SetDryRun sets the DryRun field's value. -func (s *DisableVpcClassicLinkInput) SetDryRun(v bool) *DisableVpcClassicLinkInput { +func (s *GetConsoleOutputInput) SetDryRun(v bool) *GetConsoleOutputInput { s.DryRun = &v return s } -// SetVpcId sets the VpcId field's value. -func (s *DisableVpcClassicLinkInput) SetVpcId(v string) *DisableVpcClassicLinkInput { - s.VpcId = &v +// SetInstanceId sets the InstanceId field's value. +func (s *GetConsoleOutputInput) SetInstanceId(v string) *GetConsoleOutputInput { + s.InstanceId = &v return s } -// Contains the output of DisableVpcClassicLink. -type DisableVpcClassicLinkOutput 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 DisableVpcClassicLinkOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DisableVpcClassicLinkOutput) GoString() string { - return s.String() -} - -// SetReturn sets the Return field's value. -func (s *DisableVpcClassicLinkOutput) SetReturn(v bool) *DisableVpcClassicLinkOutput { - s.Return = &v +// SetLatest sets the Latest field's value. +func (s *GetConsoleOutputInput) SetLatest(v bool) *GetConsoleOutputInput { + s.Latest = &v return s } -// Contains the parameters for DisassociateAddress. -type DisassociateAddressInput struct { +type GetConsoleOutputOutput struct { _ struct{} `type:"structure"` - // [EC2-VPC] The association ID. Required for EC2-VPC. - AssociationId *string `type:"string"` + // The ID of the instance. + InstanceId *string `locationName:"instanceId" 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 `locationName:"dryRun" type:"boolean"` + // The console output, base64-encoded. If you are using a command line tool, + // the tool decodes the output for you. + Output *string `locationName:"output" type:"string"` - // [EC2-Classic] The Elastic IP address. Required for EC2-Classic. - PublicIp *string `type:"string"` + // The time at which the output was last updated. + Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` } // String returns the string representation -func (s DisassociateAddressInput) String() string { +func (s GetConsoleOutputOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DisassociateAddressInput) GoString() string { +func (s GetConsoleOutputOutput) GoString() string { return s.String() } -// SetAssociationId sets the AssociationId field's value. -func (s *DisassociateAddressInput) SetAssociationId(v string) *DisassociateAddressInput { - s.AssociationId = &v +// SetInstanceId sets the InstanceId field's value. +func (s *GetConsoleOutputOutput) SetInstanceId(v string) *GetConsoleOutputOutput { + s.InstanceId = &v return s } -// SetDryRun sets the DryRun field's value. -func (s *DisassociateAddressInput) SetDryRun(v bool) *DisassociateAddressInput { - s.DryRun = &v +// SetOutput sets the Output field's value. +func (s *GetConsoleOutputOutput) SetOutput(v string) *GetConsoleOutputOutput { + s.Output = &v return s } -// SetPublicIp sets the PublicIp field's value. -func (s *DisassociateAddressInput) SetPublicIp(v string) *DisassociateAddressInput { - s.PublicIp = &v +// SetTimestamp sets the Timestamp field's value. +func (s *GetConsoleOutputOutput) SetTimestamp(v time.Time) *GetConsoleOutputOutput { + s.Timestamp = &v return s } -type DisassociateAddressOutput struct { +type GetConsoleScreenshotInput struct { _ struct{} `type:"structure"` -} - -// String returns the string representation -func (s DisassociateAddressOutput) String() string { - return awsutil.Prettify(s) -} -// GoString returns the string representation -func (s DisassociateAddressOutput) GoString() string { - return s.String() -} - -type DisassociateIamInstanceProfileInput 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 IAM instance profile association. + // The ID of the instance. // - // AssociationId is a required field - AssociationId *string `type:"string" required:"true"` + // InstanceId is a required field + InstanceId *string `type:"string" required:"true"` + + // When set to true, acts as keystroke input and wakes up an instance that's + // in standby or "sleep" mode. + WakeUp *bool `type:"boolean"` } // String returns the string representation -func (s DisassociateIamInstanceProfileInput) String() string { +func (s GetConsoleScreenshotInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DisassociateIamInstanceProfileInput) GoString() string { +func (s GetConsoleScreenshotInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateIamInstanceProfileInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateIamInstanceProfileInput"} - if s.AssociationId == nil { - invalidParams.Add(request.NewErrParamRequired("AssociationId")) +func (s *GetConsoleScreenshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetConsoleScreenshotInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) } if invalidParams.Len() > 0 { @@ -44497,67 +57516,88 @@ func (s *DisassociateIamInstanceProfileInput) Validate() error { return nil } -// SetAssociationId sets the AssociationId field's value. -func (s *DisassociateIamInstanceProfileInput) SetAssociationId(v string) *DisassociateIamInstanceProfileInput { - s.AssociationId = &v +// SetDryRun sets the DryRun field's value. +func (s *GetConsoleScreenshotInput) SetDryRun(v bool) *GetConsoleScreenshotInput { + s.DryRun = &v return s } -type DisassociateIamInstanceProfileOutput struct { +// SetInstanceId sets the InstanceId field's value. +func (s *GetConsoleScreenshotInput) SetInstanceId(v string) *GetConsoleScreenshotInput { + s.InstanceId = &v + return s +} + +// SetWakeUp sets the WakeUp field's value. +func (s *GetConsoleScreenshotInput) SetWakeUp(v bool) *GetConsoleScreenshotInput { + s.WakeUp = &v + return s +} + +type GetConsoleScreenshotOutput struct { _ struct{} `type:"structure"` - // Information about the IAM instance profile association. - IamInstanceProfileAssociation *IamInstanceProfileAssociation `locationName:"iamInstanceProfileAssociation" type:"structure"` + // The data that comprises the image. + ImageData *string `locationName:"imageData" type:"string"` + + // The ID of the instance. + InstanceId *string `locationName:"instanceId" type:"string"` } // String returns the string representation -func (s DisassociateIamInstanceProfileOutput) String() string { +func (s GetConsoleScreenshotOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DisassociateIamInstanceProfileOutput) GoString() string { +func (s GetConsoleScreenshotOutput) GoString() string { return s.String() } -// SetIamInstanceProfileAssociation sets the IamInstanceProfileAssociation field's value. -func (s *DisassociateIamInstanceProfileOutput) SetIamInstanceProfileAssociation(v *IamInstanceProfileAssociation) *DisassociateIamInstanceProfileOutput { - s.IamInstanceProfileAssociation = v +// SetImageData sets the ImageData field's value. +func (s *GetConsoleScreenshotOutput) SetImageData(v string) *GetConsoleScreenshotOutput { + s.ImageData = &v return s } -// Contains the parameters for DisassociateRouteTable. -type DisassociateRouteTableInput struct { +// SetInstanceId sets the InstanceId field's value. +func (s *GetConsoleScreenshotOutput) SetInstanceId(v string) *GetConsoleScreenshotOutput { + s.InstanceId = &v + return s +} + +type GetHostReservationPurchasePreviewInput struct { _ struct{} `type:"structure"` - // The association ID representing the current association between the route - // table and subnet. + // The IDs of the Dedicated Hosts with which the reservation is associated. // - // AssociationId is a required field - AssociationId *string `locationName:"associationId" type:"string" required:"true"` + // HostIdSet is a required field + HostIdSet []*string `locationNameList:"item" type:"list" 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 `locationName:"dryRun" type:"boolean"` + // The offering ID of the reservation. + // + // OfferingId is a required field + OfferingId *string `type:"string" required:"true"` } // String returns the string representation -func (s DisassociateRouteTableInput) String() string { +func (s GetHostReservationPurchasePreviewInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DisassociateRouteTableInput) GoString() string { +func (s GetHostReservationPurchasePreviewInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateRouteTableInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateRouteTableInput"} - if s.AssociationId == nil { - invalidParams.Add(request.NewErrParamRequired("AssociationId")) +func (s *GetHostReservationPurchasePreviewInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetHostReservationPurchasePreviewInput"} + if s.HostIdSet == nil { + invalidParams.Add(request.NewErrParamRequired("HostIdSet")) + } + if s.OfferingId == nil { + invalidParams.Add(request.NewErrParamRequired("OfferingId")) } if invalidParams.Len() > 0 { @@ -44566,56 +57606,100 @@ func (s *DisassociateRouteTableInput) Validate() error { return nil } -// SetAssociationId sets the AssociationId field's value. -func (s *DisassociateRouteTableInput) SetAssociationId(v string) *DisassociateRouteTableInput { - s.AssociationId = &v +// SetHostIdSet sets the HostIdSet field's value. +func (s *GetHostReservationPurchasePreviewInput) SetHostIdSet(v []*string) *GetHostReservationPurchasePreviewInput { + s.HostIdSet = v return s } -// SetDryRun sets the DryRun field's value. -func (s *DisassociateRouteTableInput) SetDryRun(v bool) *DisassociateRouteTableInput { - s.DryRun = &v +// SetOfferingId sets the OfferingId field's value. +func (s *GetHostReservationPurchasePreviewInput) SetOfferingId(v string) *GetHostReservationPurchasePreviewInput { + s.OfferingId = &v return s } -type DisassociateRouteTableOutput struct { +type GetHostReservationPurchasePreviewOutput struct { _ struct{} `type:"structure"` + + // The currency in which the totalUpfrontPrice and totalHourlyPrice amounts + // are specified. At this time, the only supported currency is USD. + CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` + + // The purchase information of the Dedicated Host reservation and the Dedicated + // Hosts associated with it. + Purchase []*Purchase `locationName:"purchase" locationNameList:"item" type:"list"` + + // The potential total hourly price of the reservation per hour. + TotalHourlyPrice *string `locationName:"totalHourlyPrice" type:"string"` + + // The potential total upfront price. This is billed immediately. + TotalUpfrontPrice *string `locationName:"totalUpfrontPrice" type:"string"` } // String returns the string representation -func (s DisassociateRouteTableOutput) String() string { +func (s GetHostReservationPurchasePreviewOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DisassociateRouteTableOutput) GoString() string { +func (s GetHostReservationPurchasePreviewOutput) GoString() string { return s.String() } -type DisassociateSubnetCidrBlockInput struct { +// SetCurrencyCode sets the CurrencyCode field's value. +func (s *GetHostReservationPurchasePreviewOutput) SetCurrencyCode(v string) *GetHostReservationPurchasePreviewOutput { + s.CurrencyCode = &v + return s +} + +// SetPurchase sets the Purchase field's value. +func (s *GetHostReservationPurchasePreviewOutput) SetPurchase(v []*Purchase) *GetHostReservationPurchasePreviewOutput { + s.Purchase = v + return s +} + +// SetTotalHourlyPrice sets the TotalHourlyPrice field's value. +func (s *GetHostReservationPurchasePreviewOutput) SetTotalHourlyPrice(v string) *GetHostReservationPurchasePreviewOutput { + s.TotalHourlyPrice = &v + return s +} + +// SetTotalUpfrontPrice sets the TotalUpfrontPrice field's value. +func (s *GetHostReservationPurchasePreviewOutput) SetTotalUpfrontPrice(v string) *GetHostReservationPurchasePreviewOutput { + s.TotalUpfrontPrice = &v + return s +} + +type GetLaunchTemplateDataInput struct { _ struct{} `type:"structure"` - // The association ID for the CIDR block. + // 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. // - // AssociationId is a required field - AssociationId *string `locationName:"associationId" type:"string" required:"true"` + // InstanceId is a required field + InstanceId *string `type:"string" required:"true"` } // String returns the string representation -func (s DisassociateSubnetCidrBlockInput) String() string { +func (s GetLaunchTemplateDataInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DisassociateSubnetCidrBlockInput) GoString() string { +func (s GetLaunchTemplateDataInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateSubnetCidrBlockInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateSubnetCidrBlockInput"} - if s.AssociationId == nil { - invalidParams.Add(request.NewErrParamRequired("AssociationId")) +func (s *GetLaunchTemplateDataInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetLaunchTemplateDataInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) } if invalidParams.Len() > 0 { @@ -44624,68 +57708,71 @@ func (s *DisassociateSubnetCidrBlockInput) Validate() error { return nil } -// SetAssociationId sets the AssociationId field's value. -func (s *DisassociateSubnetCidrBlockInput) SetAssociationId(v string) *DisassociateSubnetCidrBlockInput { - s.AssociationId = &v +// SetDryRun sets the DryRun field's value. +func (s *GetLaunchTemplateDataInput) SetDryRun(v bool) *GetLaunchTemplateDataInput { + s.DryRun = &v return s } -type DisassociateSubnetCidrBlockOutput struct { - _ struct{} `type:"structure"` +// SetInstanceId sets the InstanceId field's value. +func (s *GetLaunchTemplateDataInput) SetInstanceId(v string) *GetLaunchTemplateDataInput { + s.InstanceId = &v + return s +} - // Information about the IPv6 CIDR block association. - Ipv6CidrBlockAssociation *SubnetIpv6CidrBlockAssociation `locationName:"ipv6CidrBlockAssociation" type:"structure"` +type GetLaunchTemplateDataOutput struct { + _ struct{} `type:"structure"` - // The ID of the subnet. - SubnetId *string `locationName:"subnetId" type:"string"` + // The instance data. + LaunchTemplateData *ResponseLaunchTemplateData `locationName:"launchTemplateData" type:"structure"` } // String returns the string representation -func (s DisassociateSubnetCidrBlockOutput) String() string { +func (s GetLaunchTemplateDataOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DisassociateSubnetCidrBlockOutput) GoString() string { +func (s GetLaunchTemplateDataOutput) GoString() string { return s.String() } -// SetIpv6CidrBlockAssociation sets the Ipv6CidrBlockAssociation field's value. -func (s *DisassociateSubnetCidrBlockOutput) SetIpv6CidrBlockAssociation(v *SubnetIpv6CidrBlockAssociation) *DisassociateSubnetCidrBlockOutput { - s.Ipv6CidrBlockAssociation = v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *DisassociateSubnetCidrBlockOutput) SetSubnetId(v string) *DisassociateSubnetCidrBlockOutput { - s.SubnetId = &v +// SetLaunchTemplateData sets the LaunchTemplateData field's value. +func (s *GetLaunchTemplateDataOutput) SetLaunchTemplateData(v *ResponseLaunchTemplateData) *GetLaunchTemplateDataOutput { + s.LaunchTemplateData = v return s } -type DisassociateVpcCidrBlockInput struct { +type GetPasswordDataInput struct { _ struct{} `type:"structure"` - // The association ID for the CIDR block. + // 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 `locationName:"dryRun" type:"boolean"` + + // The ID of the Windows instance. // - // AssociationId is a required field - AssociationId *string `locationName:"associationId" type:"string" required:"true"` + // InstanceId is a required field + InstanceId *string `type:"string" required:"true"` } // String returns the string representation -func (s DisassociateVpcCidrBlockInput) String() string { +func (s GetPasswordDataInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DisassociateVpcCidrBlockInput) GoString() string { +func (s GetPasswordDataInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DisassociateVpcCidrBlockInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisassociateVpcCidrBlockInput"} - if s.AssociationId == nil { - invalidParams.Add(request.NewErrParamRequired("AssociationId")) +func (s *GetPasswordDataInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetPasswordDataInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) } if invalidParams.Len() > 0 { @@ -44694,88 +57781,104 @@ func (s *DisassociateVpcCidrBlockInput) Validate() error { return nil } -// SetAssociationId sets the AssociationId field's value. -func (s *DisassociateVpcCidrBlockInput) SetAssociationId(v string) *DisassociateVpcCidrBlockInput { - s.AssociationId = &v +// SetDryRun sets the DryRun field's value. +func (s *GetPasswordDataInput) SetDryRun(v bool) *GetPasswordDataInput { + s.DryRun = &v return s } -type DisassociateVpcCidrBlockOutput struct { +// SetInstanceId sets the InstanceId field's value. +func (s *GetPasswordDataInput) SetInstanceId(v string) *GetPasswordDataInput { + s.InstanceId = &v + return s +} + +type GetPasswordDataOutput struct { _ struct{} `type:"structure"` - // Information about the IPv4 CIDR block association. - CidrBlockAssociation *VpcCidrBlockAssociation `locationName:"cidrBlockAssociation" type:"structure"` + // The ID of the Windows instance. + InstanceId *string `locationName:"instanceId" type:"string"` - // Information about the IPv6 CIDR block association. - Ipv6CidrBlockAssociation *VpcIpv6CidrBlockAssociation `locationName:"ipv6CidrBlockAssociation" type:"structure"` + // The password of the instance. Returns an empty string if the password is + // not available. + PasswordData *string `locationName:"passwordData" type:"string"` - // The ID of the VPC. - VpcId *string `locationName:"vpcId" type:"string"` + // The time the data was last updated. + Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` } // String returns the string representation -func (s DisassociateVpcCidrBlockOutput) String() string { +func (s GetPasswordDataOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DisassociateVpcCidrBlockOutput) GoString() string { +func (s GetPasswordDataOutput) GoString() string { return s.String() } -// SetCidrBlockAssociation sets the CidrBlockAssociation field's value. -func (s *DisassociateVpcCidrBlockOutput) SetCidrBlockAssociation(v *VpcCidrBlockAssociation) *DisassociateVpcCidrBlockOutput { - s.CidrBlockAssociation = v +// SetInstanceId sets the InstanceId field's value. +func (s *GetPasswordDataOutput) SetInstanceId(v string) *GetPasswordDataOutput { + s.InstanceId = &v return s } -// SetIpv6CidrBlockAssociation sets the Ipv6CidrBlockAssociation field's value. -func (s *DisassociateVpcCidrBlockOutput) SetIpv6CidrBlockAssociation(v *VpcIpv6CidrBlockAssociation) *DisassociateVpcCidrBlockOutput { - s.Ipv6CidrBlockAssociation = v +// SetPasswordData sets the PasswordData field's value. +func (s *GetPasswordDataOutput) SetPasswordData(v string) *GetPasswordDataOutput { + s.PasswordData = &v return s } -// SetVpcId sets the VpcId field's value. -func (s *DisassociateVpcCidrBlockOutput) SetVpcId(v string) *DisassociateVpcCidrBlockOutput { - s.VpcId = &v +// SetTimestamp sets the Timestamp field's value. +func (s *GetPasswordDataOutput) SetTimestamp(v time.Time) *GetPasswordDataOutput { + s.Timestamp = &v return s } -// Describes a disk image. -type DiskImage struct { +// Contains the parameters for GetReservedInstanceExchangeQuote. +type GetReservedInstancesExchangeQuoteInput struct { _ struct{} `type:"structure"` - // A description of the disk image. - Description *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"` - // Information about the disk image. - Image *DiskImageDetail `type:"structure"` + // The IDs of the Convertible Reserved Instances to exchange. + // + // ReservedInstanceIds is a required field + ReservedInstanceIds []*string `locationName:"ReservedInstanceId" locationNameList:"ReservedInstanceId" type:"list" required:"true"` - // Information about the volume. - Volume *VolumeDetail `type:"structure"` + // The configuration of the target Convertible Reserved Instance to exchange + // for your current Convertible Reserved Instances. + TargetConfigurations []*TargetConfigurationRequest `locationName:"TargetConfiguration" locationNameList:"TargetConfigurationRequest" type:"list"` } // String returns the string representation -func (s DiskImage) String() string { +func (s GetReservedInstancesExchangeQuoteInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DiskImage) GoString() string { +func (s GetReservedInstancesExchangeQuoteInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DiskImage) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DiskImage"} - if s.Image != nil { - if err := s.Image.Validate(); err != nil { - invalidParams.AddNested("Image", err.(request.ErrInvalidParams)) - } +func (s *GetReservedInstancesExchangeQuoteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetReservedInstancesExchangeQuoteInput"} + if s.ReservedInstanceIds == nil { + invalidParams.Add(request.NewErrParamRequired("ReservedInstanceIds")) } - if s.Volume != nil { - if err := s.Volume.Validate(); err != nil { - invalidParams.AddNested("Volume", err.(request.ErrInvalidParams)) + if s.TargetConfigurations != nil { + for i, v := range s.TargetConfigurations { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetConfigurations", i), err.(request.ErrInvalidParams)) + } } } @@ -44785,130 +57888,166 @@ func (s *DiskImage) Validate() error { return nil } -// SetDescription sets the Description field's value. -func (s *DiskImage) SetDescription(v string) *DiskImage { - s.Description = &v +// SetDryRun sets the DryRun field's value. +func (s *GetReservedInstancesExchangeQuoteInput) SetDryRun(v bool) *GetReservedInstancesExchangeQuoteInput { + s.DryRun = &v return s } -// SetImage sets the Image field's value. -func (s *DiskImage) SetImage(v *DiskImageDetail) *DiskImage { - s.Image = v +// SetReservedInstanceIds sets the ReservedInstanceIds field's value. +func (s *GetReservedInstancesExchangeQuoteInput) SetReservedInstanceIds(v []*string) *GetReservedInstancesExchangeQuoteInput { + s.ReservedInstanceIds = v return s } -// SetVolume sets the Volume field's value. -func (s *DiskImage) SetVolume(v *VolumeDetail) *DiskImage { - s.Volume = v +// SetTargetConfigurations sets the TargetConfigurations field's value. +func (s *GetReservedInstancesExchangeQuoteInput) SetTargetConfigurations(v []*TargetConfigurationRequest) *GetReservedInstancesExchangeQuoteInput { + s.TargetConfigurations = v return s } -// Describes a disk image. -type DiskImageDescription struct { +// Contains the output of GetReservedInstancesExchangeQuote. +type GetReservedInstancesExchangeQuoteOutput struct { _ struct{} `type:"structure"` - // The checksum computed for the disk image. - Checksum *string `locationName:"checksum" type:"string"` + // The currency of the transaction. + CurrencyCode *string `locationName:"currencyCode" type:"string"` - // The disk image format. - Format *string `locationName:"format" type:"string" enum:"DiskImageFormat"` + // If true, the exchange is valid. If false, the exchange cannot be completed. + IsValidExchange *bool `locationName:"isValidExchange" type:"boolean"` - // A presigned URL for the import manifest stored in Amazon S3. For information - // about creating a presigned URL for an Amazon S3 object, read the "Query String - // Request Authentication Alternative" section of the Authenticating REST Requests - // (http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html) - // topic in the Amazon Simple Storage Service Developer Guide. - // - // For information about the import manifest referenced by this API action, - // see VM Import Manifest (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html). - ImportManifestUrl *string `locationName:"importManifestUrl" type:"string"` + // The new end date of the reservation term. + OutputReservedInstancesWillExpireAt *time.Time `locationName:"outputReservedInstancesWillExpireAt" type:"timestamp"` - // The size of the disk image, in GiB. - Size *int64 `locationName:"size" type:"long"` + // The total true upfront charge for the exchange. + PaymentDue *string `locationName:"paymentDue" type:"string"` + + // The cost associated with the Reserved Instance. + ReservedInstanceValueRollup *ReservationValue `locationName:"reservedInstanceValueRollup" type:"structure"` + + // The configuration of your Convertible Reserved Instances. + ReservedInstanceValueSet []*ReservedInstanceReservationValue `locationName:"reservedInstanceValueSet" locationNameList:"item" type:"list"` + + // The cost associated with the Reserved Instance. + TargetConfigurationValueRollup *ReservationValue `locationName:"targetConfigurationValueRollup" type:"structure"` + + // The values of the target Convertible Reserved Instances. + TargetConfigurationValueSet []*TargetReservationValue `locationName:"targetConfigurationValueSet" locationNameList:"item" type:"list"` + + // Describes the reason why the exchange cannot be completed. + ValidationFailureReason *string `locationName:"validationFailureReason" type:"string"` } // String returns the string representation -func (s DiskImageDescription) String() string { +func (s GetReservedInstancesExchangeQuoteOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DiskImageDescription) GoString() string { +func (s GetReservedInstancesExchangeQuoteOutput) GoString() string { return s.String() } -// SetChecksum sets the Checksum field's value. -func (s *DiskImageDescription) SetChecksum(v string) *DiskImageDescription { - s.Checksum = &v +// SetCurrencyCode sets the CurrencyCode field's value. +func (s *GetReservedInstancesExchangeQuoteOutput) SetCurrencyCode(v string) *GetReservedInstancesExchangeQuoteOutput { + s.CurrencyCode = &v return s } -// SetFormat sets the Format field's value. -func (s *DiskImageDescription) SetFormat(v string) *DiskImageDescription { - s.Format = &v +// SetIsValidExchange sets the IsValidExchange field's value. +func (s *GetReservedInstancesExchangeQuoteOutput) SetIsValidExchange(v bool) *GetReservedInstancesExchangeQuoteOutput { + s.IsValidExchange = &v return s } -// SetImportManifestUrl sets the ImportManifestUrl field's value. -func (s *DiskImageDescription) SetImportManifestUrl(v string) *DiskImageDescription { - s.ImportManifestUrl = &v +// SetOutputReservedInstancesWillExpireAt sets the OutputReservedInstancesWillExpireAt field's value. +func (s *GetReservedInstancesExchangeQuoteOutput) SetOutputReservedInstancesWillExpireAt(v time.Time) *GetReservedInstancesExchangeQuoteOutput { + s.OutputReservedInstancesWillExpireAt = &v return s } -// SetSize sets the Size field's value. -func (s *DiskImageDescription) SetSize(v int64) *DiskImageDescription { - s.Size = &v +// SetPaymentDue sets the PaymentDue field's value. +func (s *GetReservedInstancesExchangeQuoteOutput) SetPaymentDue(v string) *GetReservedInstancesExchangeQuoteOutput { + s.PaymentDue = &v return s } -// Describes a disk image. -type DiskImageDetail struct { +// SetReservedInstanceValueRollup sets the ReservedInstanceValueRollup field's value. +func (s *GetReservedInstancesExchangeQuoteOutput) SetReservedInstanceValueRollup(v *ReservationValue) *GetReservedInstancesExchangeQuoteOutput { + s.ReservedInstanceValueRollup = v + return s +} + +// SetReservedInstanceValueSet sets the ReservedInstanceValueSet field's value. +func (s *GetReservedInstancesExchangeQuoteOutput) SetReservedInstanceValueSet(v []*ReservedInstanceReservationValue) *GetReservedInstancesExchangeQuoteOutput { + s.ReservedInstanceValueSet = v + return s +} + +// SetTargetConfigurationValueRollup sets the TargetConfigurationValueRollup field's value. +func (s *GetReservedInstancesExchangeQuoteOutput) SetTargetConfigurationValueRollup(v *ReservationValue) *GetReservedInstancesExchangeQuoteOutput { + s.TargetConfigurationValueRollup = v + return s +} + +// SetTargetConfigurationValueSet sets the TargetConfigurationValueSet field's value. +func (s *GetReservedInstancesExchangeQuoteOutput) SetTargetConfigurationValueSet(v []*TargetReservationValue) *GetReservedInstancesExchangeQuoteOutput { + s.TargetConfigurationValueSet = v + return s +} + +// SetValidationFailureReason sets the ValidationFailureReason field's value. +func (s *GetReservedInstancesExchangeQuoteOutput) SetValidationFailureReason(v string) *GetReservedInstancesExchangeQuoteOutput { + s.ValidationFailureReason = &v + return s +} + +type GetTransitGatewayAttachmentPropagationsInput struct { _ struct{} `type:"structure"` - // The size of the disk image, in GiB. - // - // Bytes is a required field - Bytes *int64 `locationName:"bytes" type:"long" 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 disk image format. + // One or more filters. The possible values are: // - // Format is a required field - Format *string `locationName:"format" type:"string" required:"true" enum:"DiskImageFormat"` + // * transit-gateway-route-table-id - The ID of the transit gateway route + // table. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - // A presigned URL for the import manifest stored in Amazon S3 and presented - // here as an Amazon S3 presigned URL. For information about creating a presigned - // URL for an Amazon S3 object, read the "Query String Request Authentication - // Alternative" section of the Authenticating REST Requests (http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html) - // topic in the Amazon Simple Storage Service Developer Guide. - // - // For information about the import manifest referenced by this API action, - // see VM Import Manifest (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html). + // 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 ID of the attachment. // - // ImportManifestUrl is a required field - ImportManifestUrl *string `locationName:"importManifestUrl" type:"string" required:"true"` + // TransitGatewayAttachmentId is a required field + TransitGatewayAttachmentId *string `type:"string" required:"true"` } // String returns the string representation -func (s DiskImageDetail) String() string { +func (s GetTransitGatewayAttachmentPropagationsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DiskImageDetail) GoString() string { +func (s GetTransitGatewayAttachmentPropagationsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DiskImageDetail) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DiskImageDetail"} - if s.Bytes == nil { - invalidParams.Add(request.NewErrParamRequired("Bytes")) - } - if s.Format == nil { - invalidParams.Add(request.NewErrParamRequired("Format")) +func (s *GetTransitGatewayAttachmentPropagationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetTransitGatewayAttachmentPropagationsInput"} + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) } - if s.ImportManifestUrl == nil { - invalidParams.Add(request.NewErrParamRequired("ImportManifestUrl")) + if s.TransitGatewayAttachmentId == nil { + invalidParams.Add(request.NewErrParamRequired("TransitGatewayAttachmentId")) } if invalidParams.Len() > 0 { @@ -44917,2263 +58056,2360 @@ func (s *DiskImageDetail) Validate() error { return nil } -// SetBytes sets the Bytes field's value. -func (s *DiskImageDetail) SetBytes(v int64) *DiskImageDetail { - s.Bytes = &v +// SetDryRun sets the DryRun field's value. +func (s *GetTransitGatewayAttachmentPropagationsInput) SetDryRun(v bool) *GetTransitGatewayAttachmentPropagationsInput { + s.DryRun = &v return s } -// SetFormat sets the Format field's value. -func (s *DiskImageDetail) SetFormat(v string) *DiskImageDetail { - s.Format = &v +// SetFilters sets the Filters field's value. +func (s *GetTransitGatewayAttachmentPropagationsInput) SetFilters(v []*Filter) *GetTransitGatewayAttachmentPropagationsInput { + s.Filters = v return s } -// SetImportManifestUrl sets the ImportManifestUrl field's value. -func (s *DiskImageDetail) SetImportManifestUrl(v string) *DiskImageDetail { - s.ImportManifestUrl = &v +// SetMaxResults sets the MaxResults field's value. +func (s *GetTransitGatewayAttachmentPropagationsInput) SetMaxResults(v int64) *GetTransitGatewayAttachmentPropagationsInput { + s.MaxResults = &v return s } -// Describes a disk image volume. -type DiskImageVolumeDescription struct { - _ struct{} `type:"structure"` - - // The volume identifier. - Id *string `locationName:"id" type:"string"` - - // The size of the volume, in GiB. - Size *int64 `locationName:"size" type:"long"` -} - -// String returns the string representation -func (s DiskImageVolumeDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s DiskImageVolumeDescription) GoString() string { - return s.String() -} - -// SetId sets the Id field's value. -func (s *DiskImageVolumeDescription) SetId(v string) *DiskImageVolumeDescription { - s.Id = &v +// SetNextToken sets the NextToken field's value. +func (s *GetTransitGatewayAttachmentPropagationsInput) SetNextToken(v string) *GetTransitGatewayAttachmentPropagationsInput { + s.NextToken = &v return s } -// SetSize sets the Size field's value. -func (s *DiskImageVolumeDescription) SetSize(v int64) *DiskImageVolumeDescription { - s.Size = &v +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *GetTransitGatewayAttachmentPropagationsInput) SetTransitGatewayAttachmentId(v string) *GetTransitGatewayAttachmentPropagationsInput { + s.TransitGatewayAttachmentId = &v return s } -// Describes a DNS entry. -type DnsEntry struct { +type GetTransitGatewayAttachmentPropagationsOutput struct { _ struct{} `type:"structure"` - // The DNS name. - DnsName *string `locationName:"dnsName" type:"string"` + // 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 ID of the private hosted zone. - HostedZoneId *string `locationName:"hostedZoneId" type:"string"` + // Information about the propagation route tables. + TransitGatewayAttachmentPropagations []*TransitGatewayAttachmentPropagation `locationName:"transitGatewayAttachmentPropagations" locationNameList:"item" type:"list"` } // String returns the string representation -func (s DnsEntry) String() string { +func (s GetTransitGatewayAttachmentPropagationsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DnsEntry) GoString() string { +func (s GetTransitGatewayAttachmentPropagationsOutput) GoString() string { return s.String() } -// SetDnsName sets the DnsName field's value. -func (s *DnsEntry) SetDnsName(v string) *DnsEntry { - s.DnsName = &v +// SetNextToken sets the NextToken field's value. +func (s *GetTransitGatewayAttachmentPropagationsOutput) SetNextToken(v string) *GetTransitGatewayAttachmentPropagationsOutput { + s.NextToken = &v return s } -// SetHostedZoneId sets the HostedZoneId field's value. -func (s *DnsEntry) SetHostedZoneId(v string) *DnsEntry { - s.HostedZoneId = &v +// SetTransitGatewayAttachmentPropagations sets the TransitGatewayAttachmentPropagations field's value. +func (s *GetTransitGatewayAttachmentPropagationsOutput) SetTransitGatewayAttachmentPropagations(v []*TransitGatewayAttachmentPropagation) *GetTransitGatewayAttachmentPropagationsOutput { + s.TransitGatewayAttachmentPropagations = v return s } -// Describes a block device for an EBS volume. -type EbsBlockDevice struct { +type GetTransitGatewayRouteTableAssociationsInput struct { _ struct{} `type:"structure"` - // Indicates whether the EBS volume is deleted on instance termination. - DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` - - // Indicates whether the EBS volume is encrypted. Encrypted volumes can only - // be attached to instances that support Amazon EBS encryption. If you are creating - // a volume from a snapshot, you can't specify an encryption value. This is - // because only blank volumes can be encrypted on creation. - Encrypted *bool `locationName:"encrypted" type:"boolean"` + // 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 number of I/O operations per second (IOPS) that the volume supports. - // For io1, this represents the number of IOPS that are provisioned for the - // volume. For gp2, this represents the baseline performance of the volume and - // the rate at which the volume accumulates I/O credits for bursting. For more - // information about General Purpose SSD baseline performance, I/O credits, - // and bursting, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) - // in the Amazon Elastic Compute Cloud User Guide. + // One or more filters. The possible values are: // - // Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for - // gp2 volumes. + // * resource-id - The ID of the resource. // - // Condition: This parameter is required for requests to create io1 volumes; - // it is not used in requests to create gp2, st1, sc1, or standard volumes. - Iops *int64 `locationName:"iops" type:"integer"` - - // Identifier (key ID, key alias, ID ARN, or alias ARN) for a user-managed CMK - // under which the EBS volume is encrypted. + // * resource-type - The resource type (vpc | vpn). // - // This parameter is only supported on BlockDeviceMapping objects called by - // RunInstances (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html), - // RequestSpotFleet (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotFleet.html), - // and RequestSpotInstances (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotInstances.html). - KmsKeyId *string `type:"string"` + // * transit-gateway-attachment-id - The ID of the attachment. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - // The ID of the snapshot. - SnapshotId *string `locationName:"snapshotId" type:"string"` + // 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 size of the volume, in GiB. - // - // Constraints: 1-16384 for General Purpose SSD (gp2), 4-16384 for Provisioned - // IOPS SSD (io1), 500-16384 for Throughput Optimized HDD (st1), 500-16384 for - // Cold HDD (sc1), and 1-1024 for Magnetic (standard) volumes. If you specify - // a snapshot, the volume size must be equal to or larger than the snapshot - // size. - // - // Default: If you're creating the volume from a snapshot and don't specify - // a volume size, the default is the snapshot size. - VolumeSize *int64 `locationName:"volumeSize" type:"integer"` + // The token for the next page of results. + NextToken *string `type:"string"` - // The volume type: gp2, io1, st1, sc1, or standard. + // The ID of the transit gateway route table. // - // Default: standard - VolumeType *string `locationName:"volumeType" type:"string" enum:"VolumeType"` + // TransitGatewayRouteTableId is a required field + TransitGatewayRouteTableId *string `type:"string" required:"true"` } // String returns the string representation -func (s EbsBlockDevice) String() string { +func (s GetTransitGatewayRouteTableAssociationsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s EbsBlockDevice) GoString() string { +func (s GetTransitGatewayRouteTableAssociationsInput) GoString() string { return s.String() } -// SetDeleteOnTermination sets the DeleteOnTermination field's value. -func (s *EbsBlockDevice) SetDeleteOnTermination(v bool) *EbsBlockDevice { - s.DeleteOnTermination = &v +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetTransitGatewayRouteTableAssociationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetTransitGatewayRouteTableAssociationsInput"} + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } + if s.TransitGatewayRouteTableId == nil { + invalidParams.Add(request.NewErrParamRequired("TransitGatewayRouteTableId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *GetTransitGatewayRouteTableAssociationsInput) SetDryRun(v bool) *GetTransitGatewayRouteTableAssociationsInput { + s.DryRun = &v return s } -// SetEncrypted sets the Encrypted field's value. -func (s *EbsBlockDevice) SetEncrypted(v bool) *EbsBlockDevice { - s.Encrypted = &v +// SetFilters sets the Filters field's value. +func (s *GetTransitGatewayRouteTableAssociationsInput) SetFilters(v []*Filter) *GetTransitGatewayRouteTableAssociationsInput { + s.Filters = v return s } -// SetIops sets the Iops field's value. -func (s *EbsBlockDevice) SetIops(v int64) *EbsBlockDevice { - s.Iops = &v +// SetMaxResults sets the MaxResults field's value. +func (s *GetTransitGatewayRouteTableAssociationsInput) SetMaxResults(v int64) *GetTransitGatewayRouteTableAssociationsInput { + s.MaxResults = &v return s } -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *EbsBlockDevice) SetKmsKeyId(v string) *EbsBlockDevice { - s.KmsKeyId = &v +// SetNextToken sets the NextToken field's value. +func (s *GetTransitGatewayRouteTableAssociationsInput) SetNextToken(v string) *GetTransitGatewayRouteTableAssociationsInput { + s.NextToken = &v + return s +} + +// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. +func (s *GetTransitGatewayRouteTableAssociationsInput) SetTransitGatewayRouteTableId(v string) *GetTransitGatewayRouteTableAssociationsInput { + s.TransitGatewayRouteTableId = &v return s } -// SetSnapshotId sets the SnapshotId field's value. -func (s *EbsBlockDevice) SetSnapshotId(v string) *EbsBlockDevice { - s.SnapshotId = &v - return s +type GetTransitGatewayRouteTableAssociationsOutput struct { + _ struct{} `type:"structure"` + + // Information about the associations. + Associations []*TransitGatewayRouteTableAssociation `locationName:"associations" 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 GetTransitGatewayRouteTableAssociationsOutput) String() string { + return awsutil.Prettify(s) } -// SetVolumeSize sets the VolumeSize field's value. -func (s *EbsBlockDevice) SetVolumeSize(v int64) *EbsBlockDevice { - s.VolumeSize = &v +// GoString returns the string representation +func (s GetTransitGatewayRouteTableAssociationsOutput) GoString() string { + return s.String() +} + +// SetAssociations sets the Associations field's value. +func (s *GetTransitGatewayRouteTableAssociationsOutput) SetAssociations(v []*TransitGatewayRouteTableAssociation) *GetTransitGatewayRouteTableAssociationsOutput { + s.Associations = v return s } -// SetVolumeType sets the VolumeType field's value. -func (s *EbsBlockDevice) SetVolumeType(v string) *EbsBlockDevice { - s.VolumeType = &v +// SetNextToken sets the NextToken field's value. +func (s *GetTransitGatewayRouteTableAssociationsOutput) SetNextToken(v string) *GetTransitGatewayRouteTableAssociationsOutput { + s.NextToken = &v return s } -// Describes a parameter used to set up an EBS volume in a block device mapping. -type EbsInstanceBlockDevice struct { +type GetTransitGatewayRouteTablePropagationsInput struct { _ struct{} `type:"structure"` - // The time stamp when the attachment initiated. - AttachTime *time.Time `locationName:"attachTime" 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"` - // Indicates whether the volume is deleted on instance termination. - DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` + // One or more filters. The possible values are: + // + // * resource-id - The ID of the resource. + // + // * resource-type - The resource type (vpc | vpn). + // + // * transit-gateway-attachment-id - The ID of the attachment. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - // The attachment state. - Status *string `locationName:"status" type:"string" enum:"AttachmentStatus"` + // 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 ID of the EBS volume. - VolumeId *string `locationName:"volumeId" type:"string"` + // The token for the next page of results. + NextToken *string `type:"string"` + + // The ID of the transit gateway route table. + // + // TransitGatewayRouteTableId is a required field + TransitGatewayRouteTableId *string `type:"string" required:"true"` } // String returns the string representation -func (s EbsInstanceBlockDevice) String() string { +func (s GetTransitGatewayRouteTablePropagationsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s EbsInstanceBlockDevice) GoString() string { +func (s GetTransitGatewayRouteTablePropagationsInput) GoString() string { return s.String() } -// SetAttachTime sets the AttachTime field's value. -func (s *EbsInstanceBlockDevice) SetAttachTime(v time.Time) *EbsInstanceBlockDevice { - s.AttachTime = &v +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetTransitGatewayRouteTablePropagationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetTransitGatewayRouteTablePropagationsInput"} + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } + if s.TransitGatewayRouteTableId == nil { + invalidParams.Add(request.NewErrParamRequired("TransitGatewayRouteTableId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *GetTransitGatewayRouteTablePropagationsInput) SetDryRun(v bool) *GetTransitGatewayRouteTablePropagationsInput { + s.DryRun = &v return s } -// SetDeleteOnTermination sets the DeleteOnTermination field's value. -func (s *EbsInstanceBlockDevice) SetDeleteOnTermination(v bool) *EbsInstanceBlockDevice { - s.DeleteOnTermination = &v +// SetFilters sets the Filters field's value. +func (s *GetTransitGatewayRouteTablePropagationsInput) SetFilters(v []*Filter) *GetTransitGatewayRouteTablePropagationsInput { + s.Filters = v return s } -// SetStatus sets the Status field's value. -func (s *EbsInstanceBlockDevice) SetStatus(v string) *EbsInstanceBlockDevice { - s.Status = &v +// SetMaxResults sets the MaxResults field's value. +func (s *GetTransitGatewayRouteTablePropagationsInput) SetMaxResults(v int64) *GetTransitGatewayRouteTablePropagationsInput { + s.MaxResults = &v return s } -// SetVolumeId sets the VolumeId field's value. -func (s *EbsInstanceBlockDevice) SetVolumeId(v string) *EbsInstanceBlockDevice { - s.VolumeId = &v +// SetNextToken sets the NextToken field's value. +func (s *GetTransitGatewayRouteTablePropagationsInput) SetNextToken(v string) *GetTransitGatewayRouteTablePropagationsInput { + s.NextToken = &v return s } -// Describes information used to set up an EBS volume specified in a block device -// mapping. -type EbsInstanceBlockDeviceSpecification struct { +// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. +func (s *GetTransitGatewayRouteTablePropagationsInput) SetTransitGatewayRouteTableId(v string) *GetTransitGatewayRouteTablePropagationsInput { + s.TransitGatewayRouteTableId = &v + return s +} + +type GetTransitGatewayRouteTablePropagationsOutput struct { _ struct{} `type:"structure"` - // Indicates whether the volume is deleted on instance termination. - DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` + // 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 ID of the EBS volume. - VolumeId *string `locationName:"volumeId" type:"string"` + // Information about the route table propagations. + TransitGatewayRouteTablePropagations []*TransitGatewayRouteTablePropagation `locationName:"transitGatewayRouteTablePropagations" locationNameList:"item" type:"list"` } // String returns the string representation -func (s EbsInstanceBlockDeviceSpecification) String() string { +func (s GetTransitGatewayRouteTablePropagationsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s EbsInstanceBlockDeviceSpecification) GoString() string { +func (s GetTransitGatewayRouteTablePropagationsOutput) GoString() string { return s.String() } -// SetDeleteOnTermination sets the DeleteOnTermination field's value. -func (s *EbsInstanceBlockDeviceSpecification) SetDeleteOnTermination(v bool) *EbsInstanceBlockDeviceSpecification { - s.DeleteOnTermination = &v +// SetNextToken sets the NextToken field's value. +func (s *GetTransitGatewayRouteTablePropagationsOutput) SetNextToken(v string) *GetTransitGatewayRouteTablePropagationsOutput { + s.NextToken = &v return s } -// SetVolumeId sets the VolumeId field's value. -func (s *EbsInstanceBlockDeviceSpecification) SetVolumeId(v string) *EbsInstanceBlockDeviceSpecification { - s.VolumeId = &v +// SetTransitGatewayRouteTablePropagations sets the TransitGatewayRouteTablePropagations field's value. +func (s *GetTransitGatewayRouteTablePropagationsOutput) SetTransitGatewayRouteTablePropagations(v []*TransitGatewayRouteTablePropagation) *GetTransitGatewayRouteTablePropagationsOutput { + s.TransitGatewayRouteTablePropagations = v return s } -// Describes an egress-only internet gateway. -type EgressOnlyInternetGateway struct { +// Describes a security group. +type GroupIdentifier struct { _ struct{} `type:"structure"` - // Information about the attachment of the egress-only internet gateway. - Attachments []*InternetGatewayAttachment `locationName:"attachmentSet" locationNameList:"item" type:"list"` + // The ID of the security group. + GroupId *string `locationName:"groupId" type:"string"` - // The ID of the egress-only internet gateway. - EgressOnlyInternetGatewayId *string `locationName:"egressOnlyInternetGatewayId" type:"string"` + // The name of the security group. + GroupName *string `locationName:"groupName" type:"string"` } // String returns the string representation -func (s EgressOnlyInternetGateway) String() string { +func (s GroupIdentifier) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s EgressOnlyInternetGateway) GoString() string { +func (s GroupIdentifier) GoString() string { return s.String() } -// SetAttachments sets the Attachments field's value. -func (s *EgressOnlyInternetGateway) SetAttachments(v []*InternetGatewayAttachment) *EgressOnlyInternetGateway { - s.Attachments = v +// SetGroupId sets the GroupId field's value. +func (s *GroupIdentifier) SetGroupId(v string) *GroupIdentifier { + s.GroupId = &v return s } -// SetEgressOnlyInternetGatewayId sets the EgressOnlyInternetGatewayId field's value. -func (s *EgressOnlyInternetGateway) SetEgressOnlyInternetGatewayId(v string) *EgressOnlyInternetGateway { - s.EgressOnlyInternetGatewayId = &v +// SetGroupName sets the GroupName field's value. +func (s *GroupIdentifier) SetGroupName(v string) *GroupIdentifier { + s.GroupName = &v return s } -// Describes the association between an instance and an Elastic GPU. -type ElasticGpuAssociation struct { +// Indicates whether your instance is configured for hibernation. This parameter +// is valid only if the instance meets the hibernation prerequisites (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#hibernating-prerequisites). +// Hibernation is currently supported only for Amazon Linux. For more information, +// see Hibernate Your Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) +// in the Amazon Elastic Compute Cloud User Guide. +type HibernationOptions struct { _ struct{} `type:"structure"` - // The ID of the association. - ElasticGpuAssociationId *string `locationName:"elasticGpuAssociationId" type:"string"` - - // The state of the association between the instance and the Elastic GPU. - ElasticGpuAssociationState *string `locationName:"elasticGpuAssociationState" type:"string"` - - // The time the Elastic GPU was associated with the instance. - ElasticGpuAssociationTime *string `locationName:"elasticGpuAssociationTime" type:"string"` - - // The ID of the Elastic GPU. - ElasticGpuId *string `locationName:"elasticGpuId" type:"string"` + // If this parameter is set to true, your instance is enabled for hibernation; + // otherwise, it is not enabled for hibernation. + Configured *bool `locationName:"configured" type:"boolean"` } // String returns the string representation -func (s ElasticGpuAssociation) String() string { +func (s HibernationOptions) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ElasticGpuAssociation) GoString() string { +func (s HibernationOptions) GoString() string { return s.String() } -// SetElasticGpuAssociationId sets the ElasticGpuAssociationId field's value. -func (s *ElasticGpuAssociation) SetElasticGpuAssociationId(v string) *ElasticGpuAssociation { - s.ElasticGpuAssociationId = &v - return s -} - -// SetElasticGpuAssociationState sets the ElasticGpuAssociationState field's value. -func (s *ElasticGpuAssociation) SetElasticGpuAssociationState(v string) *ElasticGpuAssociation { - s.ElasticGpuAssociationState = &v - return s -} - -// SetElasticGpuAssociationTime sets the ElasticGpuAssociationTime field's value. -func (s *ElasticGpuAssociation) SetElasticGpuAssociationTime(v string) *ElasticGpuAssociation { - s.ElasticGpuAssociationTime = &v - return s -} - -// SetElasticGpuId sets the ElasticGpuId field's value. -func (s *ElasticGpuAssociation) SetElasticGpuId(v string) *ElasticGpuAssociation { - s.ElasticGpuId = &v +// SetConfigured sets the Configured field's value. +func (s *HibernationOptions) SetConfigured(v bool) *HibernationOptions { + s.Configured = &v return s } -// Describes the status of an Elastic GPU. -type ElasticGpuHealth struct { +// Indicates whether your instance is configured for hibernation. This parameter +// is valid only if the instance meets the hibernation prerequisites (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#hibernating-prerequisites). +// Hibernation is currently supported only for Amazon Linux. For more information, +// see Hibernate Your Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) +// in the Amazon Elastic Compute Cloud User Guide. +type HibernationOptionsRequest struct { _ struct{} `type:"structure"` - // The health status. - Status *string `locationName:"status" type:"string" enum:"ElasticGpuStatus"` + // If you set this parameter to true, your instance is enabled for hibernation. + // + // Default: false + Configured *bool `type:"boolean"` } // String returns the string representation -func (s ElasticGpuHealth) String() string { +func (s HibernationOptionsRequest) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ElasticGpuHealth) GoString() string { +func (s HibernationOptionsRequest) GoString() string { return s.String() } -// SetStatus sets the Status field's value. -func (s *ElasticGpuHealth) SetStatus(v string) *ElasticGpuHealth { - s.Status = &v +// SetConfigured sets the Configured field's value. +func (s *HibernationOptionsRequest) SetConfigured(v bool) *HibernationOptionsRequest { + s.Configured = &v return s } -// A specification for an Elastic GPU. -type ElasticGpuSpecification struct { +// Describes an event in the history of the Spot Fleet request. +type HistoryRecord struct { _ struct{} `type:"structure"` - // The type of Elastic GPU. + // Information about the event. + EventInformation *EventInformation `locationName:"eventInformation" type:"structure"` + + // The event type. // - // Type is a required field - Type *string `type:"string" required:"true"` + // * error - An error with the Spot Fleet request. + // + // * fleetRequestChange - A change in the status or configuration of the + // Spot Fleet request. + // + // * instanceChange - An instance was launched or terminated. + // + // * Information - An informational event. + EventType *string `locationName:"eventType" type:"string" enum:"EventType"` + + // The date and time of the event, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` } // String returns the string representation -func (s ElasticGpuSpecification) String() string { +func (s HistoryRecord) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ElasticGpuSpecification) GoString() string { +func (s HistoryRecord) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *ElasticGpuSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ElasticGpuSpecification"} - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } +// SetEventInformation sets the EventInformation field's value. +func (s *HistoryRecord) SetEventInformation(v *EventInformation) *HistoryRecord { + s.EventInformation = v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetEventType sets the EventType field's value. +func (s *HistoryRecord) SetEventType(v string) *HistoryRecord { + s.EventType = &v + return s } -// SetType sets the Type field's value. -func (s *ElasticGpuSpecification) SetType(v string) *ElasticGpuSpecification { - s.Type = &v +// SetTimestamp sets the Timestamp field's value. +func (s *HistoryRecord) SetTimestamp(v time.Time) *HistoryRecord { + s.Timestamp = &v return s } -// Describes an elastic GPU. -type ElasticGpuSpecificationResponse struct { +// Describes an event in the history of an EC2 Fleet. +type HistoryRecordEntry struct { _ struct{} `type:"structure"` - // The elastic GPU type. - Type *string `locationName:"type" type:"string"` + // Information about the event. + EventInformation *EventInformation `locationName:"eventInformation" type:"structure"` + + // The event type. + EventType *string `locationName:"eventType" type:"string" enum:"FleetEventType"` + + // The date and time of the event, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` } // String returns the string representation -func (s ElasticGpuSpecificationResponse) String() string { +func (s HistoryRecordEntry) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ElasticGpuSpecificationResponse) GoString() string { +func (s HistoryRecordEntry) GoString() string { return s.String() } -// SetType sets the Type field's value. -func (s *ElasticGpuSpecificationResponse) SetType(v string) *ElasticGpuSpecificationResponse { - s.Type = &v +// SetEventInformation sets the EventInformation field's value. +func (s *HistoryRecordEntry) SetEventInformation(v *EventInformation) *HistoryRecordEntry { + s.EventInformation = v return s } -// Describes an Elastic GPU. -type ElasticGpus struct { +// SetEventType sets the EventType field's value. +func (s *HistoryRecordEntry) SetEventType(v string) *HistoryRecordEntry { + s.EventType = &v + return s +} + +// SetTimestamp sets the Timestamp field's value. +func (s *HistoryRecordEntry) SetTimestamp(v time.Time) *HistoryRecordEntry { + s.Timestamp = &v + return s +} + +// Describes the properties of the Dedicated Host. +type Host struct { _ struct{} `type:"structure"` - // The Availability Zone in the which the Elastic GPU resides. + // The time that the Dedicated Host was allocated. + AllocationTime *time.Time `locationName:"allocationTime" type:"timestamp"` + + // Whether auto-placement is on or off. + AutoPlacement *string `locationName:"autoPlacement" type:"string" enum:"AutoPlacement"` + + // The Availability Zone of the Dedicated Host. AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - // The status of the Elastic GPU. - ElasticGpuHealth *ElasticGpuHealth `locationName:"elasticGpuHealth" type:"structure"` + // The number of new instances that can be launched onto the Dedicated Host. + AvailableCapacity *AvailableCapacity `locationName:"availableCapacity" type:"structure"` - // The ID of the Elastic GPU. - ElasticGpuId *string `locationName:"elasticGpuId" type:"string"` + // Unique, case-sensitive identifier that you provide to ensure idempotency + // of the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) + // in the Amazon Elastic Compute Cloud User Guide. + ClientToken *string `locationName:"clientToken" type:"string"` - // The state of the Elastic GPU. - ElasticGpuState *string `locationName:"elasticGpuState" type:"string" enum:"ElasticGpuState"` + // The ID of the Dedicated Host. + HostId *string `locationName:"hostId" type:"string"` - // The type of Elastic GPU. - ElasticGpuType *string `locationName:"elasticGpuType" type:"string"` + // The hardware specifications of the Dedicated Host. + HostProperties *HostProperties `locationName:"hostProperties" type:"structure"` - // The ID of the instance to which the Elastic GPU is attached. - InstanceId *string `locationName:"instanceId" type:"string"` + // The reservation ID of the Dedicated Host. This returns a null response if + // the Dedicated Host doesn't have an associated reservation. + HostReservationId *string `locationName:"hostReservationId" type:"string"` + + // The IDs and instance type that are currently running on the Dedicated Host. + Instances []*HostInstance `locationName:"instances" locationNameList:"item" type:"list"` + + // The time that the Dedicated Host was released. + ReleaseTime *time.Time `locationName:"releaseTime" type:"timestamp"` + + // The Dedicated Host's state. + State *string `locationName:"state" type:"string" enum:"AllocationState"` + + // Any tags assigned to the Dedicated Host. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` } // String returns the string representation -func (s ElasticGpus) String() string { +func (s Host) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ElasticGpus) GoString() string { +func (s Host) GoString() string { return s.String() } +// SetAllocationTime sets the AllocationTime field's value. +func (s *Host) SetAllocationTime(v time.Time) *Host { + s.AllocationTime = &v + return s +} + +// SetAutoPlacement sets the AutoPlacement field's value. +func (s *Host) SetAutoPlacement(v string) *Host { + s.AutoPlacement = &v + return s +} + // SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *ElasticGpus) SetAvailabilityZone(v string) *ElasticGpus { +func (s *Host) SetAvailabilityZone(v string) *Host { s.AvailabilityZone = &v return s } -// SetElasticGpuHealth sets the ElasticGpuHealth field's value. -func (s *ElasticGpus) SetElasticGpuHealth(v *ElasticGpuHealth) *ElasticGpus { - s.ElasticGpuHealth = v +// SetAvailableCapacity sets the AvailableCapacity field's value. +func (s *Host) SetAvailableCapacity(v *AvailableCapacity) *Host { + s.AvailableCapacity = v return s } -// SetElasticGpuId sets the ElasticGpuId field's value. -func (s *ElasticGpus) SetElasticGpuId(v string) *ElasticGpus { - s.ElasticGpuId = &v +// SetClientToken sets the ClientToken field's value. +func (s *Host) SetClientToken(v string) *Host { + s.ClientToken = &v return s } -// SetElasticGpuState sets the ElasticGpuState field's value. -func (s *ElasticGpus) SetElasticGpuState(v string) *ElasticGpus { - s.ElasticGpuState = &v +// SetHostId sets the HostId field's value. +func (s *Host) SetHostId(v string) *Host { + s.HostId = &v return s } -// SetElasticGpuType sets the ElasticGpuType field's value. -func (s *ElasticGpus) SetElasticGpuType(v string) *ElasticGpus { - s.ElasticGpuType = &v +// SetHostProperties sets the HostProperties field's value. +func (s *Host) SetHostProperties(v *HostProperties) *Host { + s.HostProperties = v return s } -// SetInstanceId sets the InstanceId field's value. -func (s *ElasticGpus) SetInstanceId(v string) *ElasticGpus { - s.InstanceId = &v +// SetHostReservationId sets the HostReservationId field's value. +func (s *Host) SetHostReservationId(v string) *Host { + s.HostReservationId = &v return s } -// Contains the parameters for EnableVgwRoutePropagation. -type EnableVgwRoutePropagationInput struct { +// SetInstances sets the Instances field's value. +func (s *Host) SetInstances(v []*HostInstance) *Host { + s.Instances = v + return s +} + +// SetReleaseTime sets the ReleaseTime field's value. +func (s *Host) SetReleaseTime(v time.Time) *Host { + s.ReleaseTime = &v + return s +} + +// SetState sets the State field's value. +func (s *Host) SetState(v string) *Host { + s.State = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *Host) SetTags(v []*Tag) *Host { + s.Tags = v + return s +} + +// Describes an instance running on a Dedicated Host. +type HostInstance struct { _ struct{} `type:"structure"` - // The ID of the virtual private gateway. - // - // GatewayId is a required field - GatewayId *string `type:"string" required:"true"` + // the IDs of instances that are running on the Dedicated Host. + InstanceId *string `locationName:"instanceId" type:"string"` - // The ID of the route table. - // - // RouteTableId is a required field - RouteTableId *string `type:"string" required:"true"` + // The instance type size (for example, m3.medium) of the running instance. + InstanceType *string `locationName:"instanceType" type:"string"` } // String returns the string representation -func (s EnableVgwRoutePropagationInput) String() string { +func (s HostInstance) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s EnableVgwRoutePropagationInput) GoString() string { +func (s HostInstance) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *EnableVgwRoutePropagationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EnableVgwRoutePropagationInput"} - if s.GatewayId == nil { - invalidParams.Add(request.NewErrParamRequired("GatewayId")) - } - if s.RouteTableId == nil { - invalidParams.Add(request.NewErrParamRequired("RouteTableId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGatewayId sets the GatewayId field's value. -func (s *EnableVgwRoutePropagationInput) SetGatewayId(v string) *EnableVgwRoutePropagationInput { - s.GatewayId = &v +// SetInstanceId sets the InstanceId field's value. +func (s *HostInstance) SetInstanceId(v string) *HostInstance { + s.InstanceId = &v return s } -// SetRouteTableId sets the RouteTableId field's value. -func (s *EnableVgwRoutePropagationInput) SetRouteTableId(v string) *EnableVgwRoutePropagationInput { - s.RouteTableId = &v +// SetInstanceType sets the InstanceType field's value. +func (s *HostInstance) SetInstanceType(v string) *HostInstance { + s.InstanceType = &v return s } -type EnableVgwRoutePropagationOutput struct { +// Details about the Dedicated Host Reservation offering. +type HostOffering struct { _ struct{} `type:"structure"` + + // The currency of the offering. + CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` + + // The duration of the offering (in seconds). + Duration *int64 `locationName:"duration" type:"integer"` + + // The hourly price of the offering. + HourlyPrice *string `locationName:"hourlyPrice" type:"string"` + + // The instance family of the offering. + InstanceFamily *string `locationName:"instanceFamily" type:"string"` + + // The ID of the offering. + OfferingId *string `locationName:"offeringId" type:"string"` + + // The available payment option. + PaymentOption *string `locationName:"paymentOption" type:"string" enum:"PaymentOption"` + + // The upfront price of the offering. Does not apply to No Upfront offerings. + UpfrontPrice *string `locationName:"upfrontPrice" type:"string"` } // String returns the string representation -func (s EnableVgwRoutePropagationOutput) String() string { +func (s HostOffering) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s EnableVgwRoutePropagationOutput) GoString() string { +func (s HostOffering) GoString() string { return s.String() } -// Contains the parameters for EnableVolumeIO. -type EnableVolumeIOInput struct { +// SetCurrencyCode sets the CurrencyCode field's value. +func (s *HostOffering) SetCurrencyCode(v string) *HostOffering { + s.CurrencyCode = &v + return s +} + +// SetDuration sets the Duration field's value. +func (s *HostOffering) SetDuration(v int64) *HostOffering { + s.Duration = &v + return s +} + +// SetHourlyPrice sets the HourlyPrice field's value. +func (s *HostOffering) SetHourlyPrice(v string) *HostOffering { + s.HourlyPrice = &v + return s +} + +// SetInstanceFamily sets the InstanceFamily field's value. +func (s *HostOffering) SetInstanceFamily(v string) *HostOffering { + s.InstanceFamily = &v + return s +} + +// SetOfferingId sets the OfferingId field's value. +func (s *HostOffering) SetOfferingId(v string) *HostOffering { + s.OfferingId = &v + return s +} + +// SetPaymentOption sets the PaymentOption field's value. +func (s *HostOffering) SetPaymentOption(v string) *HostOffering { + s.PaymentOption = &v + return s +} + +// SetUpfrontPrice sets the UpfrontPrice field's value. +func (s *HostOffering) SetUpfrontPrice(v string) *HostOffering { + s.UpfrontPrice = &v + return s +} + +// Describes properties of a Dedicated Host. +type HostProperties 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 `locationName:"dryRun" type:"boolean"` + // The number of cores on the Dedicated Host. + Cores *int64 `locationName:"cores" type:"integer"` - // The ID of the volume. - // - // VolumeId is a required field - VolumeId *string `locationName:"volumeId" type:"string" required:"true"` + // The instance type size that the Dedicated Host supports (for example, m3.medium). + InstanceType *string `locationName:"instanceType" type:"string"` + + // The number of sockets on the Dedicated Host. + Sockets *int64 `locationName:"sockets" type:"integer"` + + // The number of vCPUs on the Dedicated Host. + TotalVCpus *int64 `locationName:"totalVCpus" type:"integer"` } // String returns the string representation -func (s EnableVolumeIOInput) String() string { +func (s HostProperties) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s EnableVolumeIOInput) GoString() string { +func (s HostProperties) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *EnableVolumeIOInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EnableVolumeIOInput"} - if s.VolumeId == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeId")) - } +// SetCores sets the Cores field's value. +func (s *HostProperties) SetCores(v int64) *HostProperties { + s.Cores = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetInstanceType sets the InstanceType field's value. +func (s *HostProperties) SetInstanceType(v string) *HostProperties { + s.InstanceType = &v + return s } -// SetDryRun sets the DryRun field's value. -func (s *EnableVolumeIOInput) SetDryRun(v bool) *EnableVolumeIOInput { - s.DryRun = &v +// SetSockets sets the Sockets field's value. +func (s *HostProperties) SetSockets(v int64) *HostProperties { + s.Sockets = &v return s } -// SetVolumeId sets the VolumeId field's value. -func (s *EnableVolumeIOInput) SetVolumeId(v string) *EnableVolumeIOInput { - s.VolumeId = &v +// SetTotalVCpus sets the TotalVCpus field's value. +func (s *HostProperties) SetTotalVCpus(v int64) *HostProperties { + s.TotalVCpus = &v return s } -type EnableVolumeIOOutput struct { +// Details about the Dedicated Host Reservation and associated Dedicated Hosts. +type HostReservation struct { _ struct{} `type:"structure"` -} -// String returns the string representation -func (s EnableVolumeIOOutput) String() string { - return awsutil.Prettify(s) -} + // The number of Dedicated Hosts the reservation is associated with. + Count *int64 `locationName:"count" type:"integer"` -// GoString returns the string representation -func (s EnableVolumeIOOutput) GoString() string { - return s.String() -} + // The currency in which the upfrontPrice and hourlyPrice amounts are specified. + // At this time, the only supported currency is USD. + CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` -// Contains the parameters for EnableVpcClassicLinkDnsSupport. -type EnableVpcClassicLinkDnsSupportInput struct { - _ struct{} `type:"structure"` + // The length of the reservation's term, specified in seconds. Can be 31536000 + // (1 year) | 94608000 (3 years). + Duration *int64 `locationName:"duration" type:"integer"` - // The ID of the VPC. - VpcId *string `type:"string"` -} + // The date and time that the reservation ends. + End *time.Time `locationName:"end" type:"timestamp"` -// String returns the string representation -func (s EnableVpcClassicLinkDnsSupportInput) String() string { - return awsutil.Prettify(s) -} + // The IDs of the Dedicated Hosts associated with the reservation. + HostIdSet []*string `locationName:"hostIdSet" locationNameList:"item" type:"list"` -// GoString returns the string representation -func (s EnableVpcClassicLinkDnsSupportInput) GoString() string { - return s.String() -} + // The ID of the reservation that specifies the associated Dedicated Hosts. + HostReservationId *string `locationName:"hostReservationId" type:"string"` -// SetVpcId sets the VpcId field's value. -func (s *EnableVpcClassicLinkDnsSupportInput) SetVpcId(v string) *EnableVpcClassicLinkDnsSupportInput { - s.VpcId = &v - return s -} + // The hourly price of the reservation. + HourlyPrice *string `locationName:"hourlyPrice" type:"string"` -// Contains the output of EnableVpcClassicLinkDnsSupport. -type EnableVpcClassicLinkDnsSupportOutput struct { - _ struct{} `type:"structure"` + // The instance family of the Dedicated Host Reservation. The instance family + // on the Dedicated Host must be the same in order for it to benefit from the + // reservation. + InstanceFamily *string `locationName:"instanceFamily" type:"string"` - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool `locationName:"return" type:"boolean"` + // The ID of the reservation. This remains the same regardless of which Dedicated + // Hosts are associated with it. + OfferingId *string `locationName:"offeringId" type:"string"` + + // The payment option selected for this reservation. + PaymentOption *string `locationName:"paymentOption" type:"string" enum:"PaymentOption"` + + // The date and time that the reservation started. + Start *time.Time `locationName:"start" type:"timestamp"` + + // The state of the reservation. + State *string `locationName:"state" type:"string" enum:"ReservationState"` + + // The upfront price of the reservation. + UpfrontPrice *string `locationName:"upfrontPrice" type:"string"` } // String returns the string representation -func (s EnableVpcClassicLinkDnsSupportOutput) String() string { +func (s HostReservation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s EnableVpcClassicLinkDnsSupportOutput) GoString() string { +func (s HostReservation) GoString() string { return s.String() } -// SetReturn sets the Return field's value. -func (s *EnableVpcClassicLinkDnsSupportOutput) SetReturn(v bool) *EnableVpcClassicLinkDnsSupportOutput { - s.Return = &v +// SetCount sets the Count field's value. +func (s *HostReservation) SetCount(v int64) *HostReservation { + s.Count = &v return s } -// Contains the parameters for EnableVpcClassicLink. -type EnableVpcClassicLinkInput 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 `locationName:"dryRun" type:"boolean"` - - // The ID of the VPC. - // - // VpcId is a required field - VpcId *string `locationName:"vpcId" type:"string" required:"true"` +// SetCurrencyCode sets the CurrencyCode field's value. +func (s *HostReservation) SetCurrencyCode(v string) *HostReservation { + s.CurrencyCode = &v + return s } -// String returns the string representation -func (s EnableVpcClassicLinkInput) String() string { - return awsutil.Prettify(s) +// SetDuration sets the Duration field's value. +func (s *HostReservation) SetDuration(v int64) *HostReservation { + s.Duration = &v + return s } -// GoString returns the string representation -func (s EnableVpcClassicLinkInput) GoString() string { - return s.String() +// SetEnd sets the End field's value. +func (s *HostReservation) SetEnd(v time.Time) *HostReservation { + s.End = &v + return s } -// Validate inspects the fields of the type to determine if they are valid. -func (s *EnableVpcClassicLinkInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EnableVpcClassicLinkInput"} - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } +// SetHostIdSet sets the HostIdSet field's value. +func (s *HostReservation) SetHostIdSet(v []*string) *HostReservation { + s.HostIdSet = v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetHostReservationId sets the HostReservationId field's value. +func (s *HostReservation) SetHostReservationId(v string) *HostReservation { + s.HostReservationId = &v + return s } -// SetDryRun sets the DryRun field's value. -func (s *EnableVpcClassicLinkInput) SetDryRun(v bool) *EnableVpcClassicLinkInput { - s.DryRun = &v +// SetHourlyPrice sets the HourlyPrice field's value. +func (s *HostReservation) SetHourlyPrice(v string) *HostReservation { + s.HourlyPrice = &v return s } -// SetVpcId sets the VpcId field's value. -func (s *EnableVpcClassicLinkInput) SetVpcId(v string) *EnableVpcClassicLinkInput { - s.VpcId = &v +// SetInstanceFamily sets the InstanceFamily field's value. +func (s *HostReservation) SetInstanceFamily(v string) *HostReservation { + s.InstanceFamily = &v return s } -// Contains the output of EnableVpcClassicLink. -type EnableVpcClassicLinkOutput struct { - _ struct{} `type:"structure"` +// SetOfferingId sets the OfferingId field's value. +func (s *HostReservation) SetOfferingId(v string) *HostReservation { + s.OfferingId = &v + return s +} - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool `locationName:"return" type:"boolean"` +// SetPaymentOption sets the PaymentOption field's value. +func (s *HostReservation) SetPaymentOption(v string) *HostReservation { + s.PaymentOption = &v + return s } -// String returns the string representation -func (s EnableVpcClassicLinkOutput) String() string { - return awsutil.Prettify(s) +// SetStart sets the Start field's value. +func (s *HostReservation) SetStart(v time.Time) *HostReservation { + s.Start = &v + return s } -// GoString returns the string representation -func (s EnableVpcClassicLinkOutput) GoString() string { - return s.String() +// SetState sets the State field's value. +func (s *HostReservation) SetState(v string) *HostReservation { + s.State = &v + return s } -// SetReturn sets the Return field's value. -func (s *EnableVpcClassicLinkOutput) SetReturn(v bool) *EnableVpcClassicLinkOutput { - s.Return = &v +// SetUpfrontPrice sets the UpfrontPrice field's value. +func (s *HostReservation) SetUpfrontPrice(v string) *HostReservation { + s.UpfrontPrice = &v return s } -// Describes a Spot Fleet event. -type EventInformation struct { +// Describes an IAM instance profile. +type IamInstanceProfile struct { _ struct{} `type:"structure"` - // The description of the event. - EventDescription *string `locationName:"eventDescription" type:"string"` - - // The event. - // - // The following are the error events: - // - // * iamFleetRoleInvalid - The Spot Fleet did not have the required permissions - // either to launch or terminate an instance. - // - // * launchSpecTemporarilyBlacklisted - The configuration is not valid and - // several attempts to launch instances have failed. For more information, - // see the description of the event. - // - // * spotFleetRequestConfigurationInvalid - The configuration is not valid. - // For more information, see the description of the event. - // - // * spotInstanceCountLimitExceeded - You've reached the limit on the number - // of Spot Instances that you can launch. - // - // The following are the fleetRequestChange events: - // - // * active - The Spot Fleet has been validated and Amazon EC2 is attempting - // to maintain the target number of running Spot Instances. - // - // * cancelled - The Spot Fleet is canceled and has no running Spot Instances. - // The Spot Fleet will be deleted two days after its instances were terminated. - // - // * cancelled_running - The Spot Fleet is canceled and does not launch additional - // Spot Instances. Existing Spot Instances continue to run until they are - // interrupted or terminated. - // - // * cancelled_terminating - The Spot Fleet is canceled and its Spot Instances - // are terminating. - // - // * expired - The Spot Fleet request has expired. A subsequent event indicates - // that the instances were terminated, if the request was created with TerminateInstancesWithExpiration - // set. - // - // * modify_in_progress - A request to modify the Spot Fleet request was - // accepted and is in progress. - // - // * modify_successful - The Spot Fleet request was modified. - // - // * price_update - The price for a launch configuration was adjusted because - // it was too high. This change is permanent. - // - // * submitted - The Spot Fleet request is being evaluated and Amazon EC2 - // is preparing to launch the target number of Spot Instances. - // - // The following are the instanceChange events: - // - // * launched - A request was fulfilled and a new instance was launched. - // - // * terminated - An instance was terminated by the user. - // - // The following are the Information events: - // - // * launchSpecUnusable - The price in a launch specification is not valid - // because it is below the Spot price or the Spot price is above the On-Demand - // price. - // - // * fleetProgressHalted - The price in every launch specification is not - // valid. A launch specification might become valid if the Spot price changes. - EventSubType *string `locationName:"eventSubType" type:"string"` + // The Amazon Resource Name (ARN) of the instance profile. + Arn *string `locationName:"arn" type:"string"` - // The ID of the instance. This information is available only for instanceChange - // events. - InstanceId *string `locationName:"instanceId" type:"string"` + // The ID of the instance profile. + Id *string `locationName:"id" type:"string"` } // String returns the string representation -func (s EventInformation) String() string { +func (s IamInstanceProfile) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s EventInformation) GoString() string { +func (s IamInstanceProfile) GoString() string { return s.String() } -// SetEventDescription sets the EventDescription field's value. -func (s *EventInformation) SetEventDescription(v string) *EventInformation { - s.EventDescription = &v - return s -} - -// SetEventSubType sets the EventSubType field's value. -func (s *EventInformation) SetEventSubType(v string) *EventInformation { - s.EventSubType = &v +// SetArn sets the Arn field's value. +func (s *IamInstanceProfile) SetArn(v string) *IamInstanceProfile { + s.Arn = &v return s } -// SetInstanceId sets the InstanceId field's value. -func (s *EventInformation) SetInstanceId(v string) *EventInformation { - s.InstanceId = &v +// SetId sets the Id field's value. +func (s *IamInstanceProfile) SetId(v string) *IamInstanceProfile { + s.Id = &v return s } -// Describes an instance export task. -type ExportTask struct { +// Describes an association between an IAM instance profile and an instance. +type IamInstanceProfileAssociation struct { _ struct{} `type:"structure"` - // A description of the resource being exported. - Description *string `locationName:"description" type:"string"` - - // The ID of the export task. - ExportTaskId *string `locationName:"exportTaskId" type:"string"` + // The ID of the association. + AssociationId *string `locationName:"associationId" type:"string"` - // Information about the export task. - ExportToS3Task *ExportToS3Task `locationName:"exportToS3" type:"structure"` + // The IAM instance profile. + IamInstanceProfile *IamInstanceProfile `locationName:"iamInstanceProfile" type:"structure"` - // Information about the instance to export. - InstanceExportDetails *InstanceExportDetails `locationName:"instanceExport" type:"structure"` + // The ID of the instance. + InstanceId *string `locationName:"instanceId" type:"string"` - // The state of the export task. - State *string `locationName:"state" type:"string" enum:"ExportTaskState"` + // The state of the association. + State *string `locationName:"state" type:"string" enum:"IamInstanceProfileAssociationState"` - // The status message related to the export task. - StatusMessage *string `locationName:"statusMessage" type:"string"` + // The time the IAM instance profile was associated with the instance. + Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` } // String returns the string representation -func (s ExportTask) String() string { +func (s IamInstanceProfileAssociation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ExportTask) GoString() string { +func (s IamInstanceProfileAssociation) GoString() string { return s.String() } -// SetDescription sets the Description field's value. -func (s *ExportTask) SetDescription(v string) *ExportTask { - s.Description = &v - return s -} - -// SetExportTaskId sets the ExportTaskId field's value. -func (s *ExportTask) SetExportTaskId(v string) *ExportTask { - s.ExportTaskId = &v +// SetAssociationId sets the AssociationId field's value. +func (s *IamInstanceProfileAssociation) SetAssociationId(v string) *IamInstanceProfileAssociation { + s.AssociationId = &v return s } -// SetExportToS3Task sets the ExportToS3Task field's value. -func (s *ExportTask) SetExportToS3Task(v *ExportToS3Task) *ExportTask { - s.ExportToS3Task = v +// SetIamInstanceProfile sets the IamInstanceProfile field's value. +func (s *IamInstanceProfileAssociation) SetIamInstanceProfile(v *IamInstanceProfile) *IamInstanceProfileAssociation { + s.IamInstanceProfile = v return s } -// SetInstanceExportDetails sets the InstanceExportDetails field's value. -func (s *ExportTask) SetInstanceExportDetails(v *InstanceExportDetails) *ExportTask { - s.InstanceExportDetails = v +// SetInstanceId sets the InstanceId field's value. +func (s *IamInstanceProfileAssociation) SetInstanceId(v string) *IamInstanceProfileAssociation { + s.InstanceId = &v return s } // SetState sets the State field's value. -func (s *ExportTask) SetState(v string) *ExportTask { +func (s *IamInstanceProfileAssociation) SetState(v string) *IamInstanceProfileAssociation { s.State = &v return s } -// SetStatusMessage sets the StatusMessage field's value. -func (s *ExportTask) SetStatusMessage(v string) *ExportTask { - s.StatusMessage = &v +// SetTimestamp sets the Timestamp field's value. +func (s *IamInstanceProfileAssociation) SetTimestamp(v time.Time) *IamInstanceProfileAssociation { + s.Timestamp = &v return s } -// Describes the format and location for an instance export task. -type ExportToS3Task struct { +// Describes an IAM instance profile. +type IamInstanceProfileSpecification struct { _ struct{} `type:"structure"` - // The container format used to combine disk images with metadata (such as OVF). - // If absent, only the disk image is exported. - ContainerFormat *string `locationName:"containerFormat" type:"string" enum:"ContainerFormat"` - - // The format for the exported image. - DiskImageFormat *string `locationName:"diskImageFormat" type:"string" enum:"DiskImageFormat"` - - // The S3 bucket for the destination image. The destination bucket must exist - // and grant WRITE and READ_ACP permissions to the AWS account vm-import-export@amazon.com. - S3Bucket *string `locationName:"s3Bucket" type:"string"` + // The Amazon Resource Name (ARN) of the instance profile. + Arn *string `locationName:"arn" type:"string"` - // The encryption key for your S3 bucket. - S3Key *string `locationName:"s3Key" type:"string"` + // The name of the instance profile. + Name *string `locationName:"name" type:"string"` } // String returns the string representation -func (s ExportToS3Task) String() string { +func (s IamInstanceProfileSpecification) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ExportToS3Task) GoString() string { +func (s IamInstanceProfileSpecification) GoString() string { return s.String() } -// SetContainerFormat sets the ContainerFormat field's value. -func (s *ExportToS3Task) SetContainerFormat(v string) *ExportToS3Task { - s.ContainerFormat = &v - return s -} - -// SetDiskImageFormat sets the DiskImageFormat field's value. -func (s *ExportToS3Task) SetDiskImageFormat(v string) *ExportToS3Task { - s.DiskImageFormat = &v - return s -} - -// SetS3Bucket sets the S3Bucket field's value. -func (s *ExportToS3Task) SetS3Bucket(v string) *ExportToS3Task { - s.S3Bucket = &v +// SetArn sets the Arn field's value. +func (s *IamInstanceProfileSpecification) SetArn(v string) *IamInstanceProfileSpecification { + s.Arn = &v return s } -// SetS3Key sets the S3Key field's value. -func (s *ExportToS3Task) SetS3Key(v string) *ExportToS3Task { - s.S3Key = &v +// SetName sets the Name field's value. +func (s *IamInstanceProfileSpecification) SetName(v string) *IamInstanceProfileSpecification { + s.Name = &v return s } -// Describes an instance export task. -type ExportToS3TaskSpecification struct { +// Describes the ICMP type and code. +type IcmpTypeCode struct { _ struct{} `type:"structure"` - // The container format used to combine disk images with metadata (such as OVF). - // If absent, only the disk image is exported. - ContainerFormat *string `locationName:"containerFormat" type:"string" enum:"ContainerFormat"` - - // The format for the exported image. - DiskImageFormat *string `locationName:"diskImageFormat" type:"string" enum:"DiskImageFormat"` - - // The S3 bucket for the destination image. The destination bucket must exist - // and grant WRITE and READ_ACP permissions to the AWS account vm-import-export@amazon.com. - S3Bucket *string `locationName:"s3Bucket" type:"string"` + // The ICMP code. A value of -1 means all codes for the specified ICMP type. + Code *int64 `locationName:"code" type:"integer"` - // The image is written to a single object in the S3 bucket at the S3 key s3prefix - // + exportTaskId + '.' + diskImageFormat. - S3Prefix *string `locationName:"s3Prefix" type:"string"` + // The ICMP type. A value of -1 means all types. + Type *int64 `locationName:"type" type:"integer"` } // String returns the string representation -func (s ExportToS3TaskSpecification) String() string { +func (s IcmpTypeCode) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ExportToS3TaskSpecification) GoString() string { +func (s IcmpTypeCode) GoString() string { return s.String() } -// SetContainerFormat sets the ContainerFormat field's value. -func (s *ExportToS3TaskSpecification) SetContainerFormat(v string) *ExportToS3TaskSpecification { - s.ContainerFormat = &v - return s -} - -// SetDiskImageFormat sets the DiskImageFormat field's value. -func (s *ExportToS3TaskSpecification) SetDiskImageFormat(v string) *ExportToS3TaskSpecification { - s.DiskImageFormat = &v - return s -} - -// SetS3Bucket sets the S3Bucket field's value. -func (s *ExportToS3TaskSpecification) SetS3Bucket(v string) *ExportToS3TaskSpecification { - s.S3Bucket = &v +// SetCode sets the Code field's value. +func (s *IcmpTypeCode) SetCode(v int64) *IcmpTypeCode { + s.Code = &v return s } -// SetS3Prefix sets the S3Prefix field's value. -func (s *ExportToS3TaskSpecification) SetS3Prefix(v string) *ExportToS3TaskSpecification { - s.S3Prefix = &v +// SetType sets the Type field's value. +func (s *IcmpTypeCode) SetType(v int64) *IcmpTypeCode { + s.Type = &v return s } -// 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 -type Filter struct { +// Describes the ID format for a resource. +type IdFormat struct { _ struct{} `type:"structure"` - // The name of the filter. Filter names are case-sensitive. - Name *string `type:"string"` + // The date in UTC at which you are permanently switched over to using longer + // IDs. If a deadline is not yet available for this resource type, this field + // is not returned. + Deadline *time.Time `locationName:"deadline" type:"timestamp"` - // One or more filter values. Filter values are case-sensitive. - Values []*string `locationName:"Value" locationNameList:"item" type:"list"` + // The type of resource. + Resource *string `locationName:"resource" type:"string"` + + // Indicates whether longer IDs (17-character IDs) are enabled for the resource. + UseLongIds *bool `locationName:"useLongIds" type:"boolean"` } // String returns the string representation -func (s Filter) String() string { +func (s IdFormat) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Filter) GoString() string { +func (s IdFormat) GoString() string { return s.String() } -// SetName sets the Name field's value. -func (s *Filter) SetName(v string) *Filter { - s.Name = &v +// SetDeadline sets the Deadline field's value. +func (s *IdFormat) SetDeadline(v time.Time) *IdFormat { + s.Deadline = &v return s } -// SetValues sets the Values field's value. -func (s *Filter) SetValues(v []*string) *Filter { - s.Values = v +// SetResource sets the Resource field's value. +func (s *IdFormat) SetResource(v string) *IdFormat { + s.Resource = &v return s } -// Describes an EC2 Fleet. -type FleetData struct { +// SetUseLongIds sets the UseLongIds field's value. +func (s *IdFormat) SetUseLongIds(v bool) *IdFormat { + s.UseLongIds = &v + return s +} + +// Describes an image. +type Image struct { _ struct{} `type:"structure"` - // The progress of the EC2 Fleet. If there is an error, the status is error. - // After all requests are placed, the status is pending_fulfillment. If the - // size of the EC2 Fleet is equal to or greater than its target capacity, the - // status is fulfilled. If the size of the EC2 Fleet is decreased, the status - // is pending_termination while instances are terminating. - ActivityStatus *string `locationName:"activityStatus" type:"string" enum:"FleetActivityStatus"` + // The architecture of the image. + Architecture *string `locationName:"architecture" type:"string" enum:"ArchitectureValues"` - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - // - // Constraints: Maximum 64 ASCII characters - ClientToken *string `locationName:"clientToken" type:"string"` + // Any block device mapping entries. + BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` - // The creation date and time of the EC2 Fleet. - CreateTime *time.Time `locationName:"createTime" type:"timestamp"` + // The date and time the image was created. + CreationDate *string `locationName:"creationDate" type:"string"` - // Indicates whether running instances should be terminated if the target capacity - // of the EC2 Fleet is decreased below the current size of the EC2 Fleet. - ExcessCapacityTerminationPolicy *string `locationName:"excessCapacityTerminationPolicy" type:"string" enum:"FleetExcessCapacityTerminationPolicy"` + // The description of the AMI that was provided during image creation. + Description *string `locationName:"description" type:"string"` - // The ID of the EC2 Fleet. - FleetId *string `locationName:"fleetId" type:"string"` + // Specifies whether enhanced networking with ENA is enabled. + EnaSupport *bool `locationName:"enaSupport" type:"boolean"` - // The state of the EC2 Fleet. - FleetState *string `locationName:"fleetState" type:"string" enum:"FleetStateCode"` + // The hypervisor type of the image. + Hypervisor *string `locationName:"hypervisor" type:"string" enum:"HypervisorType"` - // The number of units fulfilled by this request compared to the set target - // capacity. - FulfilledCapacity *float64 `locationName:"fulfilledCapacity" type:"double"` + // The ID of the AMI. + ImageId *string `locationName:"imageId" type:"string"` - // The number of units fulfilled by this request compared to the set target - // On-Demand capacity. - FulfilledOnDemandCapacity *float64 `locationName:"fulfilledOnDemandCapacity" type:"double"` + // The location of the AMI. + ImageLocation *string `locationName:"imageLocation" type:"string"` - // The launch template and overrides. - LaunchTemplateConfigs []*FleetLaunchTemplateConfig `locationName:"launchTemplateConfigs" locationNameList:"item" type:"list"` + // The AWS account alias (for example, amazon, self) or the AWS account ID of + // the AMI owner. + ImageOwnerAlias *string `locationName:"imageOwnerAlias" type:"string"` - // The allocation strategy of On-Demand Instances in an EC2 Fleet. - OnDemandOptions *OnDemandOptions `locationName:"onDemandOptions" type:"structure"` + // The type of image. + ImageType *string `locationName:"imageType" type:"string" enum:"ImageTypeValues"` - // Indicates whether EC2 Fleet should replace unhealthy instances. - ReplaceUnhealthyInstances *bool `locationName:"replaceUnhealthyInstances" type:"boolean"` + // The kernel associated with the image, if any. Only applicable for machine + // images. + KernelId *string `locationName:"kernelId" type:"string"` - // The configuration of Spot Instances in an EC2 Fleet. - SpotOptions *SpotOptions `locationName:"spotOptions" type:"structure"` + // The name of the AMI that was provided during image creation. + Name *string `locationName:"name" type:"string"` - // The tags for an EC2 Fleet resource. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + // The AWS account ID of the image owner. + OwnerId *string `locationName:"imageOwnerId" type:"string"` - // The number of units to request. You can choose to set the target capacity - // in terms of instances or a performance characteristic that is important to - // your application workload, such as vCPUs, memory, or I/O. If the request - // type is maintain, you can specify a target capacity of 0 and add capacity - // later. - TargetCapacitySpecification *TargetCapacitySpecification `locationName:"targetCapacitySpecification" type:"structure"` + // The value is Windows for Windows AMIs; otherwise blank. + Platform *string `locationName:"platform" type:"string" enum:"PlatformValues"` - // Indicates whether running instances should be terminated when the EC2 Fleet - // expires. - TerminateInstancesWithExpiration *bool `locationName:"terminateInstancesWithExpiration" type:"boolean"` + // Any product codes associated with the AMI. + ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` - // The type of request. Indicates whether the EC2 Fleet only requests the target - // capacity, or also attempts to maintain it. If you request a certain target - // capacity, EC2 Fleet only places the required requests; it does not attempt - // to replenish instances if capacity is diminished, and does not submit requests - // in alternative capacity pools if capacity is unavailable. To maintain a certain - // target capacity, EC2 Fleet places the required requests to meet this target - // capacity. It also automatically replenishes any interrupted Spot Instances. - // Default: maintain. - Type *string `locationName:"type" type:"string" enum:"FleetType"` + // Indicates whether the image has public launch permissions. The value is true + // if this image has public launch permissions or false if it has only implicit + // and explicit launch permissions. + Public *bool `locationName:"isPublic" type:"boolean"` - // The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - // The default is to start fulfilling the request immediately. - ValidFrom *time.Time `locationName:"validFrom" type:"timestamp"` + // The RAM disk associated with the image, if any. Only applicable for machine + // images. + RamdiskId *string `locationName:"ramdiskId" type:"string"` - // The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - // At this point, no new instance requests are placed or able to fulfill the - // request. The default end date is 7 days from the current date. - ValidUntil *time.Time `locationName:"validUntil" type:"timestamp"` + // The device name of the root device volume (for example, /dev/sda1). + RootDeviceName *string `locationName:"rootDeviceName" type:"string"` + + // The type of root device used by the AMI. The AMI can use an EBS volume or + // an instance store volume. + RootDeviceType *string `locationName:"rootDeviceType" type:"string" enum:"DeviceType"` + + // Specifies whether enhanced networking with the Intel 82599 Virtual Function + // interface is enabled. + SriovNetSupport *string `locationName:"sriovNetSupport" type:"string"` + + // The current state of the AMI. If the state is available, the image is successfully + // registered and can be used to launch an instance. + State *string `locationName:"imageState" type:"string" enum:"ImageState"` + + // The reason for the state change. + StateReason *StateReason `locationName:"stateReason" type:"structure"` + + // Any tags assigned to the image. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + + // The type of virtualization of the AMI. + VirtualizationType *string `locationName:"virtualizationType" type:"string" enum:"VirtualizationType"` } // String returns the string representation -func (s FleetData) String() string { +func (s Image) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s FleetData) GoString() string { +func (s Image) GoString() string { return s.String() } -// SetActivityStatus sets the ActivityStatus field's value. -func (s *FleetData) SetActivityStatus(v string) *FleetData { - s.ActivityStatus = &v +// SetArchitecture sets the Architecture field's value. +func (s *Image) SetArchitecture(v string) *Image { + s.Architecture = &v return s } -// SetClientToken sets the ClientToken field's value. -func (s *FleetData) SetClientToken(v string) *FleetData { - s.ClientToken = &v +// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. +func (s *Image) SetBlockDeviceMappings(v []*BlockDeviceMapping) *Image { + s.BlockDeviceMappings = v return s } -// SetCreateTime sets the CreateTime field's value. -func (s *FleetData) SetCreateTime(v time.Time) *FleetData { - s.CreateTime = &v +// SetCreationDate sets the CreationDate field's value. +func (s *Image) SetCreationDate(v string) *Image { + s.CreationDate = &v return s } -// SetExcessCapacityTerminationPolicy sets the ExcessCapacityTerminationPolicy field's value. -func (s *FleetData) SetExcessCapacityTerminationPolicy(v string) *FleetData { - s.ExcessCapacityTerminationPolicy = &v +// SetDescription sets the Description field's value. +func (s *Image) SetDescription(v string) *Image { + s.Description = &v return s } -// SetFleetId sets the FleetId field's value. -func (s *FleetData) SetFleetId(v string) *FleetData { - s.FleetId = &v +// SetEnaSupport sets the EnaSupport field's value. +func (s *Image) SetEnaSupport(v bool) *Image { + s.EnaSupport = &v return s } -// SetFleetState sets the FleetState field's value. -func (s *FleetData) SetFleetState(v string) *FleetData { - s.FleetState = &v +// SetHypervisor sets the Hypervisor field's value. +func (s *Image) SetHypervisor(v string) *Image { + s.Hypervisor = &v return s } -// SetFulfilledCapacity sets the FulfilledCapacity field's value. -func (s *FleetData) SetFulfilledCapacity(v float64) *FleetData { - s.FulfilledCapacity = &v +// SetImageId sets the ImageId field's value. +func (s *Image) SetImageId(v string) *Image { + s.ImageId = &v return s } -// SetFulfilledOnDemandCapacity sets the FulfilledOnDemandCapacity field's value. -func (s *FleetData) SetFulfilledOnDemandCapacity(v float64) *FleetData { - s.FulfilledOnDemandCapacity = &v +// SetImageLocation sets the ImageLocation field's value. +func (s *Image) SetImageLocation(v string) *Image { + s.ImageLocation = &v return s } -// SetLaunchTemplateConfigs sets the LaunchTemplateConfigs field's value. -func (s *FleetData) SetLaunchTemplateConfigs(v []*FleetLaunchTemplateConfig) *FleetData { - s.LaunchTemplateConfigs = v +// SetImageOwnerAlias sets the ImageOwnerAlias field's value. +func (s *Image) SetImageOwnerAlias(v string) *Image { + s.ImageOwnerAlias = &v return s } -// SetOnDemandOptions sets the OnDemandOptions field's value. -func (s *FleetData) SetOnDemandOptions(v *OnDemandOptions) *FleetData { - s.OnDemandOptions = v +// SetImageType sets the ImageType field's value. +func (s *Image) SetImageType(v string) *Image { + s.ImageType = &v return s } -// SetReplaceUnhealthyInstances sets the ReplaceUnhealthyInstances field's value. -func (s *FleetData) SetReplaceUnhealthyInstances(v bool) *FleetData { - s.ReplaceUnhealthyInstances = &v +// SetKernelId sets the KernelId field's value. +func (s *Image) SetKernelId(v string) *Image { + s.KernelId = &v return s } -// SetSpotOptions sets the SpotOptions field's value. -func (s *FleetData) SetSpotOptions(v *SpotOptions) *FleetData { - s.SpotOptions = v +// SetName sets the Name field's value. +func (s *Image) SetName(v string) *Image { + s.Name = &v return s } -// SetTags sets the Tags field's value. -func (s *FleetData) SetTags(v []*Tag) *FleetData { - s.Tags = v +// SetOwnerId sets the OwnerId field's value. +func (s *Image) SetOwnerId(v string) *Image { + s.OwnerId = &v return s } -// SetTargetCapacitySpecification sets the TargetCapacitySpecification field's value. -func (s *FleetData) SetTargetCapacitySpecification(v *TargetCapacitySpecification) *FleetData { - s.TargetCapacitySpecification = v +// SetPlatform sets the Platform field's value. +func (s *Image) SetPlatform(v string) *Image { + s.Platform = &v return s } -// SetTerminateInstancesWithExpiration sets the TerminateInstancesWithExpiration field's value. -func (s *FleetData) SetTerminateInstancesWithExpiration(v bool) *FleetData { - s.TerminateInstancesWithExpiration = &v +// SetProductCodes sets the ProductCodes field's value. +func (s *Image) SetProductCodes(v []*ProductCode) *Image { + s.ProductCodes = v return s } -// SetType sets the Type field's value. -func (s *FleetData) SetType(v string) *FleetData { - s.Type = &v +// SetPublic sets the Public field's value. +func (s *Image) SetPublic(v bool) *Image { + s.Public = &v return s } -// SetValidFrom sets the ValidFrom field's value. -func (s *FleetData) SetValidFrom(v time.Time) *FleetData { - s.ValidFrom = &v +// SetRamdiskId sets the RamdiskId field's value. +func (s *Image) SetRamdiskId(v string) *Image { + s.RamdiskId = &v return s } -// SetValidUntil sets the ValidUntil field's value. -func (s *FleetData) SetValidUntil(v time.Time) *FleetData { - s.ValidUntil = &v +// SetRootDeviceName sets the RootDeviceName field's value. +func (s *Image) SetRootDeviceName(v string) *Image { + s.RootDeviceName = &v return s } -// Describes a launch template and overrides. -type FleetLaunchTemplateConfig struct { - _ struct{} `type:"structure"` - - // The launch template. - LaunchTemplateSpecification *FleetLaunchTemplateSpecification `locationName:"launchTemplateSpecification" type:"structure"` +// SetRootDeviceType sets the RootDeviceType field's value. +func (s *Image) SetRootDeviceType(v string) *Image { + s.RootDeviceType = &v + return s +} - // Any parameters that you specify override the same parameters in the launch - // template. - Overrides []*FleetLaunchTemplateOverrides `locationName:"overrides" locationNameList:"item" type:"list"` +// SetSriovNetSupport sets the SriovNetSupport field's value. +func (s *Image) SetSriovNetSupport(v string) *Image { + s.SriovNetSupport = &v + return s } -// String returns the string representation -func (s FleetLaunchTemplateConfig) String() string { - return awsutil.Prettify(s) +// SetState sets the State field's value. +func (s *Image) SetState(v string) *Image { + s.State = &v + return s } -// GoString returns the string representation -func (s FleetLaunchTemplateConfig) GoString() string { - return s.String() +// SetStateReason sets the StateReason field's value. +func (s *Image) SetStateReason(v *StateReason) *Image { + s.StateReason = v + return s } -// SetLaunchTemplateSpecification sets the LaunchTemplateSpecification field's value. -func (s *FleetLaunchTemplateConfig) SetLaunchTemplateSpecification(v *FleetLaunchTemplateSpecification) *FleetLaunchTemplateConfig { - s.LaunchTemplateSpecification = v +// SetTags sets the Tags field's value. +func (s *Image) SetTags(v []*Tag) *Image { + s.Tags = v return s } -// SetOverrides sets the Overrides field's value. -func (s *FleetLaunchTemplateConfig) SetOverrides(v []*FleetLaunchTemplateOverrides) *FleetLaunchTemplateConfig { - s.Overrides = v +// SetVirtualizationType sets the VirtualizationType field's value. +func (s *Image) SetVirtualizationType(v string) *Image { + s.VirtualizationType = &v return s } -// Describes a launch template and overrides. -type FleetLaunchTemplateConfigRequest struct { +// Describes the disk container object for an import image task. +type ImageDiskContainer struct { _ struct{} `type:"structure"` - // The launch template to use. You must specify either the launch template ID - // or launch template name in the request. - LaunchTemplateSpecification *FleetLaunchTemplateSpecificationRequest `type:"structure"` + // The description of the disk image. + Description *string `type:"string"` - // Any parameters that you specify override the same parameters in the launch - // template. - Overrides []*FleetLaunchTemplateOverridesRequest `locationNameList:"item" type:"list"` + // The block device mapping for the disk. + DeviceName *string `type:"string"` + + // The format of the disk image being imported. + // + // Valid values: VHD | VMDK | OVA + Format *string `type:"string"` + + // The ID of the EBS snapshot to be used for importing the snapshot. + SnapshotId *string `type:"string"` + + // The URL to the Amazon S3-based disk image being imported. The URL can either + // be a https URL (https://..) or an Amazon S3 URL (s3://..) + Url *string `type:"string"` + + // The S3 bucket for the disk image. + UserBucket *UserBucket `type:"structure"` } // String returns the string representation -func (s FleetLaunchTemplateConfigRequest) String() string { +func (s ImageDiskContainer) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s FleetLaunchTemplateConfigRequest) GoString() string { +func (s ImageDiskContainer) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *FleetLaunchTemplateConfigRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FleetLaunchTemplateConfigRequest"} - if s.LaunchTemplateSpecification != nil { - if err := s.LaunchTemplateSpecification.Validate(); err != nil { - invalidParams.AddNested("LaunchTemplateSpecification", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetDescription sets the Description field's value. +func (s *ImageDiskContainer) SetDescription(v string) *ImageDiskContainer { + s.Description = &v + return s } -// SetLaunchTemplateSpecification sets the LaunchTemplateSpecification field's value. -func (s *FleetLaunchTemplateConfigRequest) SetLaunchTemplateSpecification(v *FleetLaunchTemplateSpecificationRequest) *FleetLaunchTemplateConfigRequest { - s.LaunchTemplateSpecification = v +// SetDeviceName sets the DeviceName field's value. +func (s *ImageDiskContainer) SetDeviceName(v string) *ImageDiskContainer { + s.DeviceName = &v return s } -// SetOverrides sets the Overrides field's value. -func (s *FleetLaunchTemplateConfigRequest) SetOverrides(v []*FleetLaunchTemplateOverridesRequest) *FleetLaunchTemplateConfigRequest { - s.Overrides = v +// SetFormat sets the Format field's value. +func (s *ImageDiskContainer) SetFormat(v string) *ImageDiskContainer { + s.Format = &v return s } -// Describes overrides for a launch template. -type FleetLaunchTemplateOverrides struct { - _ struct{} `type:"structure"` +// SetSnapshotId sets the SnapshotId field's value. +func (s *ImageDiskContainer) SetSnapshotId(v string) *ImageDiskContainer { + s.SnapshotId = &v + return s +} - // The Availability Zone in which to launch the instances. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` +// SetUrl sets the Url field's value. +func (s *ImageDiskContainer) SetUrl(v string) *ImageDiskContainer { + s.Url = &v + return s +} - // The instance type. - InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` +// SetUserBucket sets the UserBucket field's value. +func (s *ImageDiskContainer) SetUserBucket(v *UserBucket) *ImageDiskContainer { + s.UserBucket = v + return s +} - // The maximum price per unit hour that you are willing to pay for a Spot Instance. - MaxPrice *string `locationName:"maxPrice" type:"string"` +type ImportClientVpnClientCertificateRevocationListInput struct { + _ struct{} `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. - Priority *float64 `locationName:"priority" type:"double"` + // The client certificate revocation list file. For more information, see Generate + // a Client Certificate Revocation List (vpn/latest/clientvpn-admin/cvpn-working-certificates.html#cvpn-working-certificates-generate) + // in the AWS Client VPN Admin Guide. + // + // CertificateRevocationList is a required field + CertificateRevocationList *string `type:"string" required:"true"` - // The ID of the subnet in which to launch the instances. - SubnetId *string `locationName:"subnetId" type:"string"` + // The ID of the Client VPN endpoint to which the client certificate revocation + // list applies. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *string `type:"string" required:"true"` - // The number of units provided by the specified instance type. - WeightedCapacity *float64 `locationName:"weightedCapacity" type:"double"` + // 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 FleetLaunchTemplateOverrides) String() string { +func (s ImportClientVpnClientCertificateRevocationListInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s FleetLaunchTemplateOverrides) GoString() string { +func (s ImportClientVpnClientCertificateRevocationListInput) GoString() string { return s.String() } -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *FleetLaunchTemplateOverrides) SetAvailabilityZone(v string) *FleetLaunchTemplateOverrides { - s.AvailabilityZone = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *ImportClientVpnClientCertificateRevocationListInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ImportClientVpnClientCertificateRevocationListInput"} + if s.CertificateRevocationList == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateRevocationList")) + } + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetInstanceType sets the InstanceType field's value. -func (s *FleetLaunchTemplateOverrides) SetInstanceType(v string) *FleetLaunchTemplateOverrides { - s.InstanceType = &v +// SetCertificateRevocationList sets the CertificateRevocationList field's value. +func (s *ImportClientVpnClientCertificateRevocationListInput) SetCertificateRevocationList(v string) *ImportClientVpnClientCertificateRevocationListInput { + s.CertificateRevocationList = &v return s } -// SetMaxPrice sets the MaxPrice field's value. -func (s *FleetLaunchTemplateOverrides) SetMaxPrice(v string) *FleetLaunchTemplateOverrides { - s.MaxPrice = &v +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *ImportClientVpnClientCertificateRevocationListInput) SetClientVpnEndpointId(v string) *ImportClientVpnClientCertificateRevocationListInput { + s.ClientVpnEndpointId = &v return s } -// SetPriority sets the Priority field's value. -func (s *FleetLaunchTemplateOverrides) SetPriority(v float64) *FleetLaunchTemplateOverrides { - s.Priority = &v +// SetDryRun sets the DryRun field's value. +func (s *ImportClientVpnClientCertificateRevocationListInput) SetDryRun(v bool) *ImportClientVpnClientCertificateRevocationListInput { + s.DryRun = &v return s } -// SetSubnetId sets the SubnetId field's value. -func (s *FleetLaunchTemplateOverrides) SetSubnetId(v string) *FleetLaunchTemplateOverrides { - s.SubnetId = &v - return s +type ImportClientVpnClientCertificateRevocationListOutput struct { + _ struct{} `type:"structure"` + + // Returns true if the request succeeds; otherwise, it returns an error. + Return *bool `locationName:"return" type:"boolean"` } -// SetWeightedCapacity sets the WeightedCapacity field's value. -func (s *FleetLaunchTemplateOverrides) SetWeightedCapacity(v float64) *FleetLaunchTemplateOverrides { - s.WeightedCapacity = &v +// String returns the string representation +func (s ImportClientVpnClientCertificateRevocationListOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportClientVpnClientCertificateRevocationListOutput) GoString() string { + return s.String() +} + +// SetReturn sets the Return field's value. +func (s *ImportClientVpnClientCertificateRevocationListOutput) SetReturn(v bool) *ImportClientVpnClientCertificateRevocationListOutput { + s.Return = &v return s } -// Describes overrides for a launch template. -type FleetLaunchTemplateOverridesRequest struct { +// Contains the parameters for ImportImage. +type ImportImageInput struct { _ struct{} `type:"structure"` - // The Availability Zone in which to launch the instances. - AvailabilityZone *string `type:"string"` + // The architecture of the virtual machine. + // + // Valid values: i386 | x86_64 + Architecture *string `type:"string"` - // The instance type. - InstanceType *string `type:"string" enum:"InstanceType"` + // The client-specific data. + ClientData *ClientData `type:"structure"` - // The maximum price per unit hour that you are willing to pay for a Spot Instance. - MaxPrice *string `type:"string"` + // The token to enable idempotency for VM import requests. + ClientToken *string `type:"string"` + + // A description string for the import image task. + Description *string `type:"string"` + + // Information about the disk containers. + DiskContainers []*ImageDiskContainer `locationName:"DiskContainer" 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"` + + // Specifies whether the destination AMI of the imported image should be encrypted. + // The default CMK for EBS is used unless you specify a non-default AWS Key + // Management Service (AWS KMS) CMK using KmsKeyId. For more information, see + // Amazon EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) + // in the Amazon Elastic Compute Cloud User Guide. + Encrypted *bool `type:"boolean"` + + // The target hypervisor platform. + // + // Valid values: xen + Hypervisor *string `type:"string"` + + // An identifier for the AWS Key Management Service (AWS KMS) customer master + // key (CMK) to use when creating the encrypted AMI. This parameter is only + // required if you want to use a non-default CMK; if this parameter is not specified, + // the default CMK for EBS is used. If a KmsKeyId is specified, the Encrypted + // flag must also be set. + // + // The CMK identifier may be provided in any of the following formats: + // + // * Key ID + // + // * Key alias, in the form alias/ExampleAlias + // + // * ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed + // by the region of the CMK, the AWS account ID of the CMK owner, the key + // namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. + // + // * ARN using key alias. The alias ARN contains the arn:aws:kms namespace, + // followed by the region of the CMK, the AWS account ID of the CMK owner, + // the alias namespace, and then the CMK alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. + // + // + // AWS parses KmsKeyId asynchronously, meaning that the action you call may + // appear to complete even though you provided an invalid identifier. This action + // will eventually report failure. + // + // The specified CMK must exist in the region that the AMI is being copied to. + KmsKeyId *string `type:"string"` - // 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. - Priority *float64 `type:"double"` + // The license type to be used for the Amazon Machine Image (AMI) after importing. + // + // Note: You may only use BYOL if you have existing licenses with rights to + // use these licenses in a third party cloud like AWS. For more information, + // see Prerequisites (http://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html#prerequisites-image) + // in the VM Import/Export User Guide. + // + // Valid values: AWS | BYOL + LicenseType *string `type:"string"` - // The ID of the subnet in which to launch the instances. - SubnetId *string `type:"string"` + // The operating system of the virtual machine. + // + // Valid values: Windows | Linux + Platform *string `type:"string"` - // The number of units provided by the specified instance type. - WeightedCapacity *float64 `type:"double"` + // The name of the role to use when not using the default role, 'vmimport'. + RoleName *string `type:"string"` } // String returns the string representation -func (s FleetLaunchTemplateOverridesRequest) String() string { +func (s ImportImageInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s FleetLaunchTemplateOverridesRequest) GoString() string { +func (s ImportImageInput) GoString() string { return s.String() } -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *FleetLaunchTemplateOverridesRequest) SetAvailabilityZone(v string) *FleetLaunchTemplateOverridesRequest { - s.AvailabilityZone = &v +// SetArchitecture sets the Architecture field's value. +func (s *ImportImageInput) SetArchitecture(v string) *ImportImageInput { + s.Architecture = &v return s } -// SetInstanceType sets the InstanceType field's value. -func (s *FleetLaunchTemplateOverridesRequest) SetInstanceType(v string) *FleetLaunchTemplateOverridesRequest { - s.InstanceType = &v +// SetClientData sets the ClientData field's value. +func (s *ImportImageInput) SetClientData(v *ClientData) *ImportImageInput { + s.ClientData = v return s } -// SetMaxPrice sets the MaxPrice field's value. -func (s *FleetLaunchTemplateOverridesRequest) SetMaxPrice(v string) *FleetLaunchTemplateOverridesRequest { - s.MaxPrice = &v +// SetClientToken sets the ClientToken field's value. +func (s *ImportImageInput) SetClientToken(v string) *ImportImageInput { + s.ClientToken = &v return s } -// SetPriority sets the Priority field's value. -func (s *FleetLaunchTemplateOverridesRequest) SetPriority(v float64) *FleetLaunchTemplateOverridesRequest { - s.Priority = &v +// SetDescription sets the Description field's value. +func (s *ImportImageInput) SetDescription(v string) *ImportImageInput { + s.Description = &v return s } -// SetSubnetId sets the SubnetId field's value. -func (s *FleetLaunchTemplateOverridesRequest) SetSubnetId(v string) *FleetLaunchTemplateOverridesRequest { - s.SubnetId = &v +// SetDiskContainers sets the DiskContainers field's value. +func (s *ImportImageInput) SetDiskContainers(v []*ImageDiskContainer) *ImportImageInput { + s.DiskContainers = v return s } -// SetWeightedCapacity sets the WeightedCapacity field's value. -func (s *FleetLaunchTemplateOverridesRequest) SetWeightedCapacity(v float64) *FleetLaunchTemplateOverridesRequest { - s.WeightedCapacity = &v +// SetDryRun sets the DryRun field's value. +func (s *ImportImageInput) SetDryRun(v bool) *ImportImageInput { + s.DryRun = &v return s } -// Describes a launch template. -type FleetLaunchTemplateSpecification struct { - _ struct{} `type:"structure"` - - // The ID of the launch template. You must specify either a template ID or a - // template name. - LaunchTemplateId *string `locationName:"launchTemplateId" type:"string"` - - // The name of the launch template. You must specify either a template name - // or a template ID. - LaunchTemplateName *string `locationName:"launchTemplateName" min:"3" type:"string"` - - // The version number. By default, the default version of the launch template - // is used. - Version *string `locationName:"version" type:"string"` -} - -// String returns the string representation -func (s FleetLaunchTemplateSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FleetLaunchTemplateSpecification) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FleetLaunchTemplateSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FleetLaunchTemplateSpecification"} - if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLaunchTemplateId sets the LaunchTemplateId field's value. -func (s *FleetLaunchTemplateSpecification) SetLaunchTemplateId(v string) *FleetLaunchTemplateSpecification { - s.LaunchTemplateId = &v +// SetEncrypted sets the Encrypted field's value. +func (s *ImportImageInput) SetEncrypted(v bool) *ImportImageInput { + s.Encrypted = &v return s } -// SetLaunchTemplateName sets the LaunchTemplateName field's value. -func (s *FleetLaunchTemplateSpecification) SetLaunchTemplateName(v string) *FleetLaunchTemplateSpecification { - s.LaunchTemplateName = &v +// SetHypervisor sets the Hypervisor field's value. +func (s *ImportImageInput) SetHypervisor(v string) *ImportImageInput { + s.Hypervisor = &v return s } -// SetVersion sets the Version field's value. -func (s *FleetLaunchTemplateSpecification) SetVersion(v string) *FleetLaunchTemplateSpecification { - s.Version = &v +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *ImportImageInput) SetKmsKeyId(v string) *ImportImageInput { + s.KmsKeyId = &v return s } -// The launch template to use. You must specify either the launch template ID -// or launch template name in the request. -type FleetLaunchTemplateSpecificationRequest struct { - _ struct{} `type:"structure"` - - // The ID of the launch template. - LaunchTemplateId *string `type:"string"` - - // The name of the launch template. - LaunchTemplateName *string `min:"3" type:"string"` - - // The version number of the launch template. - Version *string `type:"string"` -} - -// String returns the string representation -func (s FleetLaunchTemplateSpecificationRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s FleetLaunchTemplateSpecificationRequest) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FleetLaunchTemplateSpecificationRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FleetLaunchTemplateSpecificationRequest"} - if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLaunchTemplateId sets the LaunchTemplateId field's value. -func (s *FleetLaunchTemplateSpecificationRequest) SetLaunchTemplateId(v string) *FleetLaunchTemplateSpecificationRequest { - s.LaunchTemplateId = &v +// SetLicenseType sets the LicenseType field's value. +func (s *ImportImageInput) SetLicenseType(v string) *ImportImageInput { + s.LicenseType = &v return s } -// SetLaunchTemplateName sets the LaunchTemplateName field's value. -func (s *FleetLaunchTemplateSpecificationRequest) SetLaunchTemplateName(v string) *FleetLaunchTemplateSpecificationRequest { - s.LaunchTemplateName = &v +// SetPlatform sets the Platform field's value. +func (s *ImportImageInput) SetPlatform(v string) *ImportImageInput { + s.Platform = &v return s } -// SetVersion sets the Version field's value. -func (s *FleetLaunchTemplateSpecificationRequest) SetVersion(v string) *FleetLaunchTemplateSpecificationRequest { - s.Version = &v +// SetRoleName sets the RoleName field's value. +func (s *ImportImageInput) SetRoleName(v string) *ImportImageInput { + s.RoleName = &v return s } -// Describes a flow log. -type FlowLog struct { +// Contains the output for ImportImage. +type ImportImageOutput struct { _ struct{} `type:"structure"` - // The date and time the flow log was created. - CreationTime *time.Time `locationName:"creationTime" type:"timestamp"` + // The architecture of the virtual machine. + Architecture *string `locationName:"architecture" type:"string"` - // Information about the error that occurred. Rate limited indicates that CloudWatch - // Logs throttling has been applied for one or more network interfaces, or that - // you've reached the limit on the number of log groups that you can create. - // Access error indicates that the IAM role associated with the flow log does - // not have sufficient permissions to publish to CloudWatch Logs. Unknown error - // indicates an internal error. - DeliverLogsErrorMessage *string `locationName:"deliverLogsErrorMessage" type:"string"` + // A description of the import task. + Description *string `locationName:"description" type:"string"` - // The ARN of the IAM role that posts logs to CloudWatch Logs. - DeliverLogsPermissionArn *string `locationName:"deliverLogsPermissionArn" type:"string"` + // Indicates whether the AMI is encypted. + Encrypted *bool `locationName:"encrypted" type:"boolean"` - // The status of the logs delivery (SUCCESS | FAILED). - DeliverLogsStatus *string `locationName:"deliverLogsStatus" type:"string"` + // The target hypervisor of the import task. + Hypervisor *string `locationName:"hypervisor" type:"string"` - // The flow log ID. - FlowLogId *string `locationName:"flowLogId" type:"string"` + // The ID of the Amazon Machine Image (AMI) created by the import task. + ImageId *string `locationName:"imageId" type:"string"` - // The status of the flow log (ACTIVE). - FlowLogStatus *string `locationName:"flowLogStatus" type:"string"` + // The task ID of the import image task. + ImportTaskId *string `locationName:"importTaskId" type:"string"` - // Specifies the destination to which the flow log data is published. Flow log - // data can be published to an CloudWatch Logs log group or an Amazon S3 bucket. - // If the flow log publishes to CloudWatch Logs, this element indicates the - // Amazon Resource Name (ARN) of the CloudWatch Logs log group to which the - // data is published. If the flow log publishes to Amazon S3, this element indicates - // the ARN of the Amazon S3 bucket to which the data is published. - LogDestination *string `locationName:"logDestination" type:"string"` + // The identifier for the AWS Key Management Service (AWS KMS) customer master + // key (CMK) that was used to create the encrypted AMI. + KmsKeyId *string `locationName:"kmsKeyId" type:"string"` - // Specifies the type of destination to which the flow log data is published. - // Flow log data can be published to CloudWatch Logs or Amazon S3. - LogDestinationType *string `locationName:"logDestinationType" type:"string" enum:"LogDestinationType"` + // The license type of the virtual machine. + LicenseType *string `locationName:"licenseType" type:"string"` - // The name of the flow log group. - LogGroupName *string `locationName:"logGroupName" type:"string"` + // The operating system of the virtual machine. + Platform *string `locationName:"platform" type:"string"` - // The ID of the resource on which the flow log was created. - ResourceId *string `locationName:"resourceId" type:"string"` + // The progress of the task. + Progress *string `locationName:"progress" type:"string"` - // The type of traffic captured for the flow log. - TrafficType *string `locationName:"trafficType" type:"string" enum:"TrafficType"` + // Information about the snapshots. + SnapshotDetails []*SnapshotDetail `locationName:"snapshotDetailSet" locationNameList:"item" type:"list"` + + // A brief status of the task. + Status *string `locationName:"status" type:"string"` + + // A detailed status message of the import task. + StatusMessage *string `locationName:"statusMessage" type:"string"` } // String returns the string representation -func (s FlowLog) String() string { +func (s ImportImageOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s FlowLog) GoString() string { +func (s ImportImageOutput) GoString() string { return s.String() } -// SetCreationTime sets the CreationTime field's value. -func (s *FlowLog) SetCreationTime(v time.Time) *FlowLog { - s.CreationTime = &v +// SetArchitecture sets the Architecture field's value. +func (s *ImportImageOutput) SetArchitecture(v string) *ImportImageOutput { + s.Architecture = &v return s } -// SetDeliverLogsErrorMessage sets the DeliverLogsErrorMessage field's value. -func (s *FlowLog) SetDeliverLogsErrorMessage(v string) *FlowLog { - s.DeliverLogsErrorMessage = &v +// SetDescription sets the Description field's value. +func (s *ImportImageOutput) SetDescription(v string) *ImportImageOutput { + s.Description = &v return s } -// SetDeliverLogsPermissionArn sets the DeliverLogsPermissionArn field's value. -func (s *FlowLog) SetDeliverLogsPermissionArn(v string) *FlowLog { - s.DeliverLogsPermissionArn = &v +// SetEncrypted sets the Encrypted field's value. +func (s *ImportImageOutput) SetEncrypted(v bool) *ImportImageOutput { + s.Encrypted = &v return s } -// SetDeliverLogsStatus sets the DeliverLogsStatus field's value. -func (s *FlowLog) SetDeliverLogsStatus(v string) *FlowLog { - s.DeliverLogsStatus = &v +// SetHypervisor sets the Hypervisor field's value. +func (s *ImportImageOutput) SetHypervisor(v string) *ImportImageOutput { + s.Hypervisor = &v return s } -// SetFlowLogId sets the FlowLogId field's value. -func (s *FlowLog) SetFlowLogId(v string) *FlowLog { - s.FlowLogId = &v +// SetImageId sets the ImageId field's value. +func (s *ImportImageOutput) SetImageId(v string) *ImportImageOutput { + s.ImageId = &v return s } -// SetFlowLogStatus sets the FlowLogStatus field's value. -func (s *FlowLog) SetFlowLogStatus(v string) *FlowLog { - s.FlowLogStatus = &v +// SetImportTaskId sets the ImportTaskId field's value. +func (s *ImportImageOutput) SetImportTaskId(v string) *ImportImageOutput { + s.ImportTaskId = &v return s } -// SetLogDestination sets the LogDestination field's value. -func (s *FlowLog) SetLogDestination(v string) *FlowLog { - s.LogDestination = &v +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *ImportImageOutput) SetKmsKeyId(v string) *ImportImageOutput { + s.KmsKeyId = &v return s } -// SetLogDestinationType sets the LogDestinationType field's value. -func (s *FlowLog) SetLogDestinationType(v string) *FlowLog { - s.LogDestinationType = &v +// SetLicenseType sets the LicenseType field's value. +func (s *ImportImageOutput) SetLicenseType(v string) *ImportImageOutput { + s.LicenseType = &v return s } -// SetLogGroupName sets the LogGroupName field's value. -func (s *FlowLog) SetLogGroupName(v string) *FlowLog { - s.LogGroupName = &v +// SetPlatform sets the Platform field's value. +func (s *ImportImageOutput) SetPlatform(v string) *ImportImageOutput { + s.Platform = &v return s } -// SetResourceId sets the ResourceId field's value. -func (s *FlowLog) SetResourceId(v string) *FlowLog { - s.ResourceId = &v +// SetProgress sets the Progress field's value. +func (s *ImportImageOutput) SetProgress(v string) *ImportImageOutput { + s.Progress = &v return s } -// SetTrafficType sets the TrafficType field's value. -func (s *FlowLog) SetTrafficType(v string) *FlowLog { - s.TrafficType = &v +// SetSnapshotDetails sets the SnapshotDetails field's value. +func (s *ImportImageOutput) SetSnapshotDetails(v []*SnapshotDetail) *ImportImageOutput { + s.SnapshotDetails = v return s } -// Describes an Amazon FPGA image (AFI). -type FpgaImage struct { +// SetStatus sets the Status field's value. +func (s *ImportImageOutput) SetStatus(v string) *ImportImageOutput { + s.Status = &v + return s +} + +// SetStatusMessage sets the StatusMessage field's value. +func (s *ImportImageOutput) SetStatusMessage(v string) *ImportImageOutput { + s.StatusMessage = &v + return s +} + +// Describes an import image task. +type ImportImageTask struct { _ struct{} `type:"structure"` - // The date and time the AFI was created. - CreateTime *time.Time `locationName:"createTime" type:"timestamp"` + // The architecture of the virtual machine. + // + // Valid values: i386 | x86_64 + Architecture *string `locationName:"architecture" type:"string"` - // The description of the AFI. + // A description of the import task. Description *string `locationName:"description" type:"string"` - // The global FPGA image identifier (AGFI ID). - FpgaImageGlobalId *string `locationName:"fpgaImageGlobalId" type:"string"` - - // The FPGA image identifier (AFI ID). - FpgaImageId *string `locationName:"fpgaImageId" type:"string"` + // Indicates whether the image is encrypted. + Encrypted *bool `locationName:"encrypted" type:"boolean"` - // The name of the AFI. - Name *string `locationName:"name" type:"string"` + // The target hypervisor for the import task. + // + // Valid values: xen + Hypervisor *string `locationName:"hypervisor" type:"string"` - // The alias of the AFI owner. Possible values include self, amazon, and aws-marketplace. - OwnerAlias *string `locationName:"ownerAlias" type:"string"` + // The ID of the Amazon Machine Image (AMI) of the imported virtual machine. + ImageId *string `locationName:"imageId" type:"string"` - // The AWS account ID of the AFI owner. - OwnerId *string `locationName:"ownerId" type:"string"` + // The ID of the import image task. + ImportTaskId *string `locationName:"importTaskId" type:"string"` - // Information about the PCI bus. - PciId *PciId `locationName:"pciId" type:"structure"` + // The identifier for the AWS Key Management Service (AWS KMS) customer master + // key (CMK) that was used to create the encrypted image. + KmsKeyId *string `locationName:"kmsKeyId" type:"string"` - // The product codes for the AFI. - ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` + // The license type of the virtual machine. + LicenseType *string `locationName:"licenseType" type:"string"` - // Indicates whether the AFI is public. - Public *bool `locationName:"public" type:"boolean"` + // The description string for the import image task. + Platform *string `locationName:"platform" type:"string"` - // The version of the AWS Shell that was used to create the bitstream. - ShellVersion *string `locationName:"shellVersion" type:"string"` + // The percentage of progress of the import image task. + Progress *string `locationName:"progress" type:"string"` - // Information about the state of the AFI. - State *FpgaImageState `locationName:"state" type:"structure"` + // Information about the snapshots. + SnapshotDetails []*SnapshotDetail `locationName:"snapshotDetailSet" locationNameList:"item" type:"list"` - // Any tags assigned to the AFI. - Tags []*Tag `locationName:"tags" locationNameList:"item" type:"list"` + // A brief status for the import image task. + Status *string `locationName:"status" type:"string"` - // The time of the most recent update to the AFI. - UpdateTime *time.Time `locationName:"updateTime" type:"timestamp"` + // A descriptive status message for the import image task. + StatusMessage *string `locationName:"statusMessage" type:"string"` } // String returns the string representation -func (s FpgaImage) String() string { +func (s ImportImageTask) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s FpgaImage) GoString() string { +func (s ImportImageTask) GoString() string { return s.String() } -// SetCreateTime sets the CreateTime field's value. -func (s *FpgaImage) SetCreateTime(v time.Time) *FpgaImage { - s.CreateTime = &v +// SetArchitecture sets the Architecture field's value. +func (s *ImportImageTask) SetArchitecture(v string) *ImportImageTask { + s.Architecture = &v return s } // SetDescription sets the Description field's value. -func (s *FpgaImage) SetDescription(v string) *FpgaImage { +func (s *ImportImageTask) SetDescription(v string) *ImportImageTask { s.Description = &v return s } -// SetFpgaImageGlobalId sets the FpgaImageGlobalId field's value. -func (s *FpgaImage) SetFpgaImageGlobalId(v string) *FpgaImage { - s.FpgaImageGlobalId = &v +// SetEncrypted sets the Encrypted field's value. +func (s *ImportImageTask) SetEncrypted(v bool) *ImportImageTask { + s.Encrypted = &v return s } -// SetFpgaImageId sets the FpgaImageId field's value. -func (s *FpgaImage) SetFpgaImageId(v string) *FpgaImage { - s.FpgaImageId = &v +// SetHypervisor sets the Hypervisor field's value. +func (s *ImportImageTask) SetHypervisor(v string) *ImportImageTask { + s.Hypervisor = &v return s } -// SetName sets the Name field's value. -func (s *FpgaImage) SetName(v string) *FpgaImage { - s.Name = &v +// SetImageId sets the ImageId field's value. +func (s *ImportImageTask) SetImageId(v string) *ImportImageTask { + s.ImageId = &v return s } -// SetOwnerAlias sets the OwnerAlias field's value. -func (s *FpgaImage) SetOwnerAlias(v string) *FpgaImage { - s.OwnerAlias = &v +// SetImportTaskId sets the ImportTaskId field's value. +func (s *ImportImageTask) SetImportTaskId(v string) *ImportImageTask { + s.ImportTaskId = &v return s } -// SetOwnerId sets the OwnerId field's value. -func (s *FpgaImage) SetOwnerId(v string) *FpgaImage { - s.OwnerId = &v +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *ImportImageTask) SetKmsKeyId(v string) *ImportImageTask { + s.KmsKeyId = &v return s } -// SetPciId sets the PciId field's value. -func (s *FpgaImage) SetPciId(v *PciId) *FpgaImage { - s.PciId = v +// SetLicenseType sets the LicenseType field's value. +func (s *ImportImageTask) SetLicenseType(v string) *ImportImageTask { + s.LicenseType = &v return s } -// SetProductCodes sets the ProductCodes field's value. -func (s *FpgaImage) SetProductCodes(v []*ProductCode) *FpgaImage { - s.ProductCodes = v +// SetPlatform sets the Platform field's value. +func (s *ImportImageTask) SetPlatform(v string) *ImportImageTask { + s.Platform = &v + return s +} + +// SetProgress sets the Progress field's value. +func (s *ImportImageTask) SetProgress(v string) *ImportImageTask { + s.Progress = &v + return s +} + +// SetSnapshotDetails sets the SnapshotDetails field's value. +func (s *ImportImageTask) SetSnapshotDetails(v []*SnapshotDetail) *ImportImageTask { + s.SnapshotDetails = v + return s +} + +// SetStatus sets the Status field's value. +func (s *ImportImageTask) SetStatus(v string) *ImportImageTask { + s.Status = &v + return s +} + +// SetStatusMessage sets the StatusMessage field's value. +func (s *ImportImageTask) SetStatusMessage(v string) *ImportImageTask { + s.StatusMessage = &v return s } -// SetPublic sets the Public field's value. -func (s *FpgaImage) SetPublic(v bool) *FpgaImage { - s.Public = &v +// Contains the parameters for ImportInstance. +type ImportInstanceInput struct { + _ struct{} `type:"structure"` + + // A description for the instance being imported. + Description *string `locationName:"description" type:"string"` + + // The disk image. + DiskImages []*DiskImage `locationName:"diskImage" 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 `locationName:"dryRun" type:"boolean"` + + // The launch specification. + LaunchSpecification *ImportInstanceLaunchSpecification `locationName:"launchSpecification" type:"structure"` + + // The instance operating system. + // + // Platform is a required field + Platform *string `locationName:"platform" type:"string" required:"true" enum:"PlatformValues"` +} + +// String returns the string representation +func (s ImportInstanceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportInstanceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ImportInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ImportInstanceInput"} + if s.Platform == nil { + invalidParams.Add(request.NewErrParamRequired("Platform")) + } + if s.DiskImages != nil { + for i, v := range s.DiskImages { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DiskImages", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *ImportInstanceInput) SetDescription(v string) *ImportInstanceInput { + s.Description = &v return s } -// SetShellVersion sets the ShellVersion field's value. -func (s *FpgaImage) SetShellVersion(v string) *FpgaImage { - s.ShellVersion = &v +// SetDiskImages sets the DiskImages field's value. +func (s *ImportInstanceInput) SetDiskImages(v []*DiskImage) *ImportInstanceInput { + s.DiskImages = v return s } -// SetState sets the State field's value. -func (s *FpgaImage) SetState(v *FpgaImageState) *FpgaImage { - s.State = v +// SetDryRun sets the DryRun field's value. +func (s *ImportInstanceInput) SetDryRun(v bool) *ImportInstanceInput { + s.DryRun = &v return s } -// SetTags sets the Tags field's value. -func (s *FpgaImage) SetTags(v []*Tag) *FpgaImage { - s.Tags = v +// SetLaunchSpecification sets the LaunchSpecification field's value. +func (s *ImportInstanceInput) SetLaunchSpecification(v *ImportInstanceLaunchSpecification) *ImportInstanceInput { + s.LaunchSpecification = v return s } -// SetUpdateTime sets the UpdateTime field's value. -func (s *FpgaImage) SetUpdateTime(v time.Time) *FpgaImage { - s.UpdateTime = &v +// SetPlatform sets the Platform field's value. +func (s *ImportInstanceInput) SetPlatform(v string) *ImportInstanceInput { + s.Platform = &v return s } -// Describes an Amazon FPGA image (AFI) attribute. -type FpgaImageAttribute struct { +// Describes the launch specification for VM import. +type ImportInstanceLaunchSpecification struct { _ struct{} `type:"structure"` - // The description of the AFI. - Description *string `locationName:"description" type:"string"` + // Reserved. + AdditionalInfo *string `locationName:"additionalInfo" type:"string"` - // The ID of the AFI. - FpgaImageId *string `locationName:"fpgaImageId" type:"string"` + // The architecture of the instance. + Architecture *string `locationName:"architecture" type:"string" enum:"ArchitectureValues"` - // One or more load permissions. - LoadPermissions []*LoadPermission `locationName:"loadPermissions" locationNameList:"item" type:"list"` + // One or more security group IDs. + GroupIds []*string `locationName:"GroupId" locationNameList:"SecurityGroupId" type:"list"` - // The name of the AFI. - Name *string `locationName:"name" type:"string"` + // One or more security group names. + GroupNames []*string `locationName:"GroupName" locationNameList:"SecurityGroup" type:"list"` - // One or more product codes. - ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` + // Indicates whether an instance stops or terminates when you initiate shutdown + // from the instance (using the operating system command for system shutdown). + InstanceInitiatedShutdownBehavior *string `locationName:"instanceInitiatedShutdownBehavior" type:"string" enum:"ShutdownBehavior"` + + // The instance type. For more information about the instance types that you + // can import, see Instance Types (http://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html#vmimport-instance-types) + // in the VM Import/Export User Guide. + InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` + + // Indicates whether monitoring is enabled. + Monitoring *bool `locationName:"monitoring" type:"boolean"` + + // The placement information for the instance. + Placement *Placement `locationName:"placement" type:"structure"` + + // [EC2-VPC] An available IP address from the IP address range of the subnet. + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` + + // [EC2-VPC] The ID of the subnet in which to launch the instance. + SubnetId *string `locationName:"subnetId" type:"string"` + + // The Base64-encoded user data to make available to the instance. + UserData *UserData `locationName:"userData" type:"structure"` } // String returns the string representation -func (s FpgaImageAttribute) String() string { +func (s ImportInstanceLaunchSpecification) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s FpgaImageAttribute) GoString() string { +func (s ImportInstanceLaunchSpecification) GoString() string { return s.String() } -// SetDescription sets the Description field's value. -func (s *FpgaImageAttribute) SetDescription(v string) *FpgaImageAttribute { - s.Description = &v +// SetAdditionalInfo sets the AdditionalInfo field's value. +func (s *ImportInstanceLaunchSpecification) SetAdditionalInfo(v string) *ImportInstanceLaunchSpecification { + s.AdditionalInfo = &v return s } -// SetFpgaImageId sets the FpgaImageId field's value. -func (s *FpgaImageAttribute) SetFpgaImageId(v string) *FpgaImageAttribute { - s.FpgaImageId = &v +// SetArchitecture sets the Architecture field's value. +func (s *ImportInstanceLaunchSpecification) SetArchitecture(v string) *ImportInstanceLaunchSpecification { + s.Architecture = &v return s } -// SetLoadPermissions sets the LoadPermissions field's value. -func (s *FpgaImageAttribute) SetLoadPermissions(v []*LoadPermission) *FpgaImageAttribute { - s.LoadPermissions = v +// SetGroupIds sets the GroupIds field's value. +func (s *ImportInstanceLaunchSpecification) SetGroupIds(v []*string) *ImportInstanceLaunchSpecification { + s.GroupIds = v return s } -// SetName sets the Name field's value. -func (s *FpgaImageAttribute) SetName(v string) *FpgaImageAttribute { - s.Name = &v +// SetGroupNames sets the GroupNames field's value. +func (s *ImportInstanceLaunchSpecification) SetGroupNames(v []*string) *ImportInstanceLaunchSpecification { + s.GroupNames = v return s } -// SetProductCodes sets the ProductCodes field's value. -func (s *FpgaImageAttribute) SetProductCodes(v []*ProductCode) *FpgaImageAttribute { - s.ProductCodes = v +// SetInstanceInitiatedShutdownBehavior sets the InstanceInitiatedShutdownBehavior field's value. +func (s *ImportInstanceLaunchSpecification) SetInstanceInitiatedShutdownBehavior(v string) *ImportInstanceLaunchSpecification { + s.InstanceInitiatedShutdownBehavior = &v return s } -// Describes the state of the bitstream generation process for an Amazon FPGA -// image (AFI). -type FpgaImageState struct { - _ struct{} `type:"structure"` - - // The state. The following are the possible values: - // - // * pending - AFI bitstream generation is in progress. - // - // * available - The AFI is available for use. - // - // * failed - AFI bitstream generation failed. - // - // * unavailable - The AFI is no longer available for use. - Code *string `locationName:"code" type:"string" enum:"FpgaImageStateCode"` +// SetInstanceType sets the InstanceType field's value. +func (s *ImportInstanceLaunchSpecification) SetInstanceType(v string) *ImportInstanceLaunchSpecification { + s.InstanceType = &v + return s +} - // If the state is failed, this is the error message. - Message *string `locationName:"message" type:"string"` +// SetMonitoring sets the Monitoring field's value. +func (s *ImportInstanceLaunchSpecification) SetMonitoring(v bool) *ImportInstanceLaunchSpecification { + s.Monitoring = &v + return s } -// String returns the string representation -func (s FpgaImageState) String() string { - return awsutil.Prettify(s) +// SetPlacement sets the Placement field's value. +func (s *ImportInstanceLaunchSpecification) SetPlacement(v *Placement) *ImportInstanceLaunchSpecification { + s.Placement = v + return s } -// GoString returns the string representation -func (s FpgaImageState) GoString() string { - return s.String() +// SetPrivateIpAddress sets the PrivateIpAddress field's value. +func (s *ImportInstanceLaunchSpecification) SetPrivateIpAddress(v string) *ImportInstanceLaunchSpecification { + s.PrivateIpAddress = &v + return s } -// SetCode sets the Code field's value. -func (s *FpgaImageState) SetCode(v string) *FpgaImageState { - s.Code = &v +// SetSubnetId sets the SubnetId field's value. +func (s *ImportInstanceLaunchSpecification) SetSubnetId(v string) *ImportInstanceLaunchSpecification { + s.SubnetId = &v return s } -// SetMessage sets the Message field's value. -func (s *FpgaImageState) SetMessage(v string) *FpgaImageState { - s.Message = &v +// SetUserData sets the UserData field's value. +func (s *ImportInstanceLaunchSpecification) SetUserData(v *UserData) *ImportInstanceLaunchSpecification { + s.UserData = v return s } -// Contains the parameters for GetConsoleOutput. -type GetConsoleOutputInput struct { +// Contains the output for ImportInstance. +type ImportInstanceOutput 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 `locationName:"dryRun" type:"boolean"` - - // The ID of the instance. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` - - // When enabled, retrieves the latest console output for the instance. - // - // Default: disabled (false) - Latest *bool `type:"boolean"` + // Information about the conversion task. + ConversionTask *ConversionTask `locationName:"conversionTask" type:"structure"` } // String returns the string representation -func (s GetConsoleOutputInput) String() string { +func (s ImportInstanceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetConsoleOutputInput) GoString() string { +func (s ImportInstanceOutput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetConsoleOutputInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetConsoleOutputInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *GetConsoleOutputInput) SetDryRun(v bool) *GetConsoleOutputInput { - s.DryRun = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *GetConsoleOutputInput) SetInstanceId(v string) *GetConsoleOutputInput { - s.InstanceId = &v - return s -} - -// SetLatest sets the Latest field's value. -func (s *GetConsoleOutputInput) SetLatest(v bool) *GetConsoleOutputInput { - s.Latest = &v +// SetConversionTask sets the ConversionTask field's value. +func (s *ImportInstanceOutput) SetConversionTask(v *ConversionTask) *ImportInstanceOutput { + s.ConversionTask = v return s } -// Contains the output of GetConsoleOutput. -type GetConsoleOutputOutput struct { +// Describes an import instance task. +type ImportInstanceTaskDetails struct { _ struct{} `type:"structure"` + // A description of the task. + Description *string `locationName:"description" type:"string"` + // The ID of the instance. InstanceId *string `locationName:"instanceId" type:"string"` - // The console output, base64-encoded. If you are using a command line tool, - // the tool decodes the output for you. - Output *string `locationName:"output" type:"string"` + // The instance operating system. + Platform *string `locationName:"platform" type:"string" enum:"PlatformValues"` - // The time at which the output was last updated. - Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` + // One or more volumes. + Volumes []*ImportInstanceVolumeDetailItem `locationName:"volumes" locationNameList:"item" type:"list"` } // String returns the string representation -func (s GetConsoleOutputOutput) String() string { +func (s ImportInstanceTaskDetails) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetConsoleOutputOutput) GoString() string { +func (s ImportInstanceTaskDetails) GoString() string { return s.String() } +// SetDescription sets the Description field's value. +func (s *ImportInstanceTaskDetails) SetDescription(v string) *ImportInstanceTaskDetails { + s.Description = &v + return s +} + // SetInstanceId sets the InstanceId field's value. -func (s *GetConsoleOutputOutput) SetInstanceId(v string) *GetConsoleOutputOutput { +func (s *ImportInstanceTaskDetails) SetInstanceId(v string) *ImportInstanceTaskDetails { s.InstanceId = &v return s } -// SetOutput sets the Output field's value. -func (s *GetConsoleOutputOutput) SetOutput(v string) *GetConsoleOutputOutput { - s.Output = &v +// SetPlatform sets the Platform field's value. +func (s *ImportInstanceTaskDetails) SetPlatform(v string) *ImportInstanceTaskDetails { + s.Platform = &v return s } -// SetTimestamp sets the Timestamp field's value. -func (s *GetConsoleOutputOutput) SetTimestamp(v time.Time) *GetConsoleOutputOutput { - s.Timestamp = &v +// SetVolumes sets the Volumes field's value. +func (s *ImportInstanceTaskDetails) SetVolumes(v []*ImportInstanceVolumeDetailItem) *ImportInstanceTaskDetails { + s.Volumes = v return s } -// Contains the parameters for the request. -type GetConsoleScreenshotInput struct { +// Describes an import volume task. +type ImportInstanceVolumeDetailItem 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 Availability Zone where the resulting instance will reside. + AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - // The ID of the instance. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` + // The number of bytes converted so far. + BytesConverted *int64 `locationName:"bytesConverted" type:"long"` - // When set to true, acts as keystroke input and wakes up an instance that's - // in standby or "sleep" mode. - WakeUp *bool `type:"boolean"` + // A description of the task. + Description *string `locationName:"description" type:"string"` + + // The image. + Image *DiskImageDescription `locationName:"image" type:"structure"` + + // The status of the import of this particular disk image. + Status *string `locationName:"status" type:"string"` + + // The status information or errors related to the disk image. + StatusMessage *string `locationName:"statusMessage" type:"string"` + + // The volume. + Volume *DiskImageVolumeDescription `locationName:"volume" type:"structure"` } // String returns the string representation -func (s GetConsoleScreenshotInput) String() string { +func (s ImportInstanceVolumeDetailItem) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetConsoleScreenshotInput) GoString() string { +func (s ImportInstanceVolumeDetailItem) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetConsoleScreenshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetConsoleScreenshotInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *GetConsoleScreenshotInput) SetDryRun(v bool) *GetConsoleScreenshotInput { - s.DryRun = &v +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *ImportInstanceVolumeDetailItem) SetAvailabilityZone(v string) *ImportInstanceVolumeDetailItem { + s.AvailabilityZone = &v return s } -// SetInstanceId sets the InstanceId field's value. -func (s *GetConsoleScreenshotInput) SetInstanceId(v string) *GetConsoleScreenshotInput { - s.InstanceId = &v +// SetBytesConverted sets the BytesConverted field's value. +func (s *ImportInstanceVolumeDetailItem) SetBytesConverted(v int64) *ImportInstanceVolumeDetailItem { + s.BytesConverted = &v return s } -// SetWakeUp sets the WakeUp field's value. -func (s *GetConsoleScreenshotInput) SetWakeUp(v bool) *GetConsoleScreenshotInput { - s.WakeUp = &v +// SetDescription sets the Description field's value. +func (s *ImportInstanceVolumeDetailItem) SetDescription(v string) *ImportInstanceVolumeDetailItem { + s.Description = &v return s } -// Contains the output of the request. -type GetConsoleScreenshotOutput struct { - _ struct{} `type:"structure"` - - // The data that comprises the image. - ImageData *string `locationName:"imageData" type:"string"` - - // The ID of the instance. - InstanceId *string `locationName:"instanceId" type:"string"` -} - -// String returns the string representation -func (s GetConsoleScreenshotOutput) String() string { - return awsutil.Prettify(s) +// SetImage sets the Image field's value. +func (s *ImportInstanceVolumeDetailItem) SetImage(v *DiskImageDescription) *ImportInstanceVolumeDetailItem { + s.Image = v + return s } -// GoString returns the string representation -func (s GetConsoleScreenshotOutput) GoString() string { - return s.String() +// SetStatus sets the Status field's value. +func (s *ImportInstanceVolumeDetailItem) SetStatus(v string) *ImportInstanceVolumeDetailItem { + s.Status = &v + return s } -// SetImageData sets the ImageData field's value. -func (s *GetConsoleScreenshotOutput) SetImageData(v string) *GetConsoleScreenshotOutput { - s.ImageData = &v +// SetStatusMessage sets the StatusMessage field's value. +func (s *ImportInstanceVolumeDetailItem) SetStatusMessage(v string) *ImportInstanceVolumeDetailItem { + s.StatusMessage = &v return s } -// SetInstanceId sets the InstanceId field's value. -func (s *GetConsoleScreenshotOutput) SetInstanceId(v string) *GetConsoleScreenshotOutput { - s.InstanceId = &v +// SetVolume sets the Volume field's value. +func (s *ImportInstanceVolumeDetailItem) SetVolume(v *DiskImageVolumeDescription) *ImportInstanceVolumeDetailItem { + s.Volume = v return s } -type GetHostReservationPurchasePreviewInput struct { +type ImportKeyPairInput struct { _ struct{} `type:"structure"` - // The IDs of the Dedicated Hosts with which the reservation is associated. + // 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 `locationName:"dryRun" type:"boolean"` + + // A unique name for the key pair. // - // HostIdSet is a required field - HostIdSet []*string `locationNameList:"item" type:"list" required:"true"` + // KeyName is a required field + KeyName *string `locationName:"keyName" type:"string" required:"true"` - // The offering ID of the reservation. + // The public key. For API calls, the text must be base64-encoded. For command + // line tools, base64 encoding is performed for you. // - // OfferingId is a required field - OfferingId *string `type:"string" required:"true"` + // PublicKeyMaterial is automatically base64 encoded/decoded by the SDK. + // + // PublicKeyMaterial is a required field + PublicKeyMaterial []byte `locationName:"publicKeyMaterial" type:"blob" required:"true"` } // String returns the string representation -func (s GetHostReservationPurchasePreviewInput) String() string { +func (s ImportKeyPairInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetHostReservationPurchasePreviewInput) GoString() string { +func (s ImportKeyPairInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetHostReservationPurchasePreviewInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetHostReservationPurchasePreviewInput"} - if s.HostIdSet == nil { - invalidParams.Add(request.NewErrParamRequired("HostIdSet")) +func (s *ImportKeyPairInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ImportKeyPairInput"} + if s.KeyName == nil { + invalidParams.Add(request.NewErrParamRequired("KeyName")) } - if s.OfferingId == nil { - invalidParams.Add(request.NewErrParamRequired("OfferingId")) + if s.PublicKeyMaterial == nil { + invalidParams.Add(request.NewErrParamRequired("PublicKeyMaterial")) } if invalidParams.Len() > 0 { @@ -47182,72 +60418,71 @@ func (s *GetHostReservationPurchasePreviewInput) Validate() error { return nil } -// SetHostIdSet sets the HostIdSet field's value. -func (s *GetHostReservationPurchasePreviewInput) SetHostIdSet(v []*string) *GetHostReservationPurchasePreviewInput { - s.HostIdSet = v +// SetDryRun sets the DryRun field's value. +func (s *ImportKeyPairInput) SetDryRun(v bool) *ImportKeyPairInput { + s.DryRun = &v return s } -// SetOfferingId sets the OfferingId field's value. -func (s *GetHostReservationPurchasePreviewInput) SetOfferingId(v string) *GetHostReservationPurchasePreviewInput { - s.OfferingId = &v +// SetKeyName sets the KeyName field's value. +func (s *ImportKeyPairInput) SetKeyName(v string) *ImportKeyPairInput { + s.KeyName = &v return s } -type GetHostReservationPurchasePreviewOutput struct { - _ struct{} `type:"structure"` - - // The currency in which the totalUpfrontPrice and totalHourlyPrice amounts - // are specified. At this time, the only supported currency is USD. - CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` +// SetPublicKeyMaterial sets the PublicKeyMaterial field's value. +func (s *ImportKeyPairInput) SetPublicKeyMaterial(v []byte) *ImportKeyPairInput { + s.PublicKeyMaterial = v + return s +} - // The purchase information of the Dedicated Host reservation and the Dedicated - // Hosts associated with it. - Purchase []*Purchase `locationName:"purchase" locationNameList:"item" type:"list"` +type ImportKeyPairOutput struct { + _ struct{} `type:"structure"` - // The potential total hourly price of the reservation per hour. - TotalHourlyPrice *string `locationName:"totalHourlyPrice" type:"string"` + // The MD5 public key fingerprint as specified in section 4 of RFC 4716. + KeyFingerprint *string `locationName:"keyFingerprint" type:"string"` - // The potential total upfront price. This is billed immediately. - TotalUpfrontPrice *string `locationName:"totalUpfrontPrice" type:"string"` + // The key pair name you provided. + KeyName *string `locationName:"keyName" type:"string"` } // String returns the string representation -func (s GetHostReservationPurchasePreviewOutput) String() string { +func (s ImportKeyPairOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetHostReservationPurchasePreviewOutput) GoString() string { +func (s ImportKeyPairOutput) GoString() string { return s.String() } -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *GetHostReservationPurchasePreviewOutput) SetCurrencyCode(v string) *GetHostReservationPurchasePreviewOutput { - s.CurrencyCode = &v +// SetKeyFingerprint sets the KeyFingerprint field's value. +func (s *ImportKeyPairOutput) SetKeyFingerprint(v string) *ImportKeyPairOutput { + s.KeyFingerprint = &v return s } -// SetPurchase sets the Purchase field's value. -func (s *GetHostReservationPurchasePreviewOutput) SetPurchase(v []*Purchase) *GetHostReservationPurchasePreviewOutput { - s.Purchase = v +// SetKeyName sets the KeyName field's value. +func (s *ImportKeyPairOutput) SetKeyName(v string) *ImportKeyPairOutput { + s.KeyName = &v return s } -// SetTotalHourlyPrice sets the TotalHourlyPrice field's value. -func (s *GetHostReservationPurchasePreviewOutput) SetTotalHourlyPrice(v string) *GetHostReservationPurchasePreviewOutput { - s.TotalHourlyPrice = &v - return s -} +// Contains the parameters for ImportSnapshot. +type ImportSnapshotInput struct { + _ struct{} `type:"structure"` -// SetTotalUpfrontPrice sets the TotalUpfrontPrice field's value. -func (s *GetHostReservationPurchasePreviewOutput) SetTotalUpfrontPrice(v string) *GetHostReservationPurchasePreviewOutput { - s.TotalUpfrontPrice = &v - return s -} + // The client-specific data. + ClientData *ClientData `type:"structure"` -type GetLaunchTemplateDataInput struct { - _ struct{} `type:"structure"` + // Token to enable idempotency for VM import requests. + ClientToken *string `type:"string"` + + // The description string for the import snapshot task. + Description *string `type:"string"` + + // Information about the disk container. + DiskContainer *SnapshotDiskContainer `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 @@ -47255,208 +60490,247 @@ type GetLaunchTemplateDataInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // The ID of the instance. + // Specifies whether the destination snapshot of the imported image should be + // encrypted. The default CMK for EBS is used unless you specify a non-default + // AWS Key Management Service (AWS KMS) CMK using KmsKeyId. For more information, + // see Amazon EBS Encryption (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) + // in the Amazon Elastic Compute Cloud User Guide. + Encrypted *bool `type:"boolean"` + + // An identifier for the AWS Key Management Service (AWS KMS) customer master + // key (CMK) to use when creating the encrypted snapshot. This parameter is + // only required if you want to use a non-default CMK; if this parameter is + // not specified, the default CMK for EBS is used. If a KmsKeyId is specified, + // the Encrypted flag must also be set. // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` + // The CMK identifier may be provided in any of the following formats: + // + // * Key ID + // + // * Key alias, in the form alias/ExampleAlias + // + // * ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed + // by the region of the CMK, the AWS account ID of the CMK owner, the key + // namespace, and then the CMK ID. For example, arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. + // + // * ARN using key alias. The alias ARN contains the arn:aws:kms namespace, + // followed by the region of the CMK, the AWS account ID of the CMK owner, + // the alias namespace, and then the CMK alias. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. + // + // + // AWS parses KmsKeyId asynchronously, meaning that the action you call may + // appear to complete even though you provided an invalid identifier. This action + // will eventually report failure. + // + // The specified CMK must exist in the region that the snapshot is being copied + // to. + KmsKeyId *string `type:"string"` + + // The name of the role to use when not using the default role, 'vmimport'. + RoleName *string `type:"string"` } // String returns the string representation -func (s GetLaunchTemplateDataInput) String() string { +func (s ImportSnapshotInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetLaunchTemplateDataInput) GoString() string { +func (s ImportSnapshotInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetLaunchTemplateDataInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetLaunchTemplateDataInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetClientData sets the ClientData field's value. +func (s *ImportSnapshotInput) SetClientData(v *ClientData) *ImportSnapshotInput { + s.ClientData = v + return s } -// SetDryRun sets the DryRun field's value. -func (s *GetLaunchTemplateDataInput) SetDryRun(v bool) *GetLaunchTemplateDataInput { - s.DryRun = &v +// SetClientToken sets the ClientToken field's value. +func (s *ImportSnapshotInput) SetClientToken(v string) *ImportSnapshotInput { + s.ClientToken = &v return s } -// SetInstanceId sets the InstanceId field's value. -func (s *GetLaunchTemplateDataInput) SetInstanceId(v string) *GetLaunchTemplateDataInput { - s.InstanceId = &v +// SetDescription sets the Description field's value. +func (s *ImportSnapshotInput) SetDescription(v string) *ImportSnapshotInput { + s.Description = &v return s } -type GetLaunchTemplateDataOutput struct { - _ struct{} `type:"structure"` +// SetDiskContainer sets the DiskContainer field's value. +func (s *ImportSnapshotInput) SetDiskContainer(v *SnapshotDiskContainer) *ImportSnapshotInput { + s.DiskContainer = v + return s +} - // The instance data. - LaunchTemplateData *ResponseLaunchTemplateData `locationName:"launchTemplateData" type:"structure"` +// SetDryRun sets the DryRun field's value. +func (s *ImportSnapshotInput) SetDryRun(v bool) *ImportSnapshotInput { + s.DryRun = &v + return s } -// String returns the string representation -func (s GetLaunchTemplateDataOutput) String() string { - return awsutil.Prettify(s) +// SetEncrypted sets the Encrypted field's value. +func (s *ImportSnapshotInput) SetEncrypted(v bool) *ImportSnapshotInput { + s.Encrypted = &v + return s } -// GoString returns the string representation -func (s GetLaunchTemplateDataOutput) GoString() string { - return s.String() +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *ImportSnapshotInput) SetKmsKeyId(v string) *ImportSnapshotInput { + s.KmsKeyId = &v + return s } -// SetLaunchTemplateData sets the LaunchTemplateData field's value. -func (s *GetLaunchTemplateDataOutput) SetLaunchTemplateData(v *ResponseLaunchTemplateData) *GetLaunchTemplateDataOutput { - s.LaunchTemplateData = v +// SetRoleName sets the RoleName field's value. +func (s *ImportSnapshotInput) SetRoleName(v string) *ImportSnapshotInput { + s.RoleName = &v return s } -// Contains the parameters for GetPasswordData. -type GetPasswordDataInput struct { +// Contains the output for ImportSnapshot. +type ImportSnapshotOutput 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 `locationName:"dryRun" type:"boolean"` + // A description of the import snapshot task. + Description *string `locationName:"description" type:"string"` - // The ID of the Windows instance. - // - // InstanceId is a required field - InstanceId *string `type:"string" required:"true"` + // The ID of the import snapshot task. + ImportTaskId *string `locationName:"importTaskId" type:"string"` + + // Information about the import snapshot task. + SnapshotTaskDetail *SnapshotTaskDetail `locationName:"snapshotTaskDetail" type:"structure"` } // String returns the string representation -func (s GetPasswordDataInput) String() string { +func (s ImportSnapshotOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetPasswordDataInput) GoString() string { +func (s ImportSnapshotOutput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetPasswordDataInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetPasswordDataInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetDescription sets the Description field's value. +func (s *ImportSnapshotOutput) SetDescription(v string) *ImportSnapshotOutput { + s.Description = &v + return s } -// SetDryRun sets the DryRun field's value. -func (s *GetPasswordDataInput) SetDryRun(v bool) *GetPasswordDataInput { - s.DryRun = &v +// SetImportTaskId sets the ImportTaskId field's value. +func (s *ImportSnapshotOutput) SetImportTaskId(v string) *ImportSnapshotOutput { + s.ImportTaskId = &v return s } -// SetInstanceId sets the InstanceId field's value. -func (s *GetPasswordDataInput) SetInstanceId(v string) *GetPasswordDataInput { - s.InstanceId = &v +// SetSnapshotTaskDetail sets the SnapshotTaskDetail field's value. +func (s *ImportSnapshotOutput) SetSnapshotTaskDetail(v *SnapshotTaskDetail) *ImportSnapshotOutput { + s.SnapshotTaskDetail = v return s } -// Contains the output of GetPasswordData. -type GetPasswordDataOutput struct { +// Describes an import snapshot task. +type ImportSnapshotTask struct { _ struct{} `type:"structure"` - // The ID of the Windows instance. - InstanceId *string `locationName:"instanceId" type:"string"` + // A description of the import snapshot task. + Description *string `locationName:"description" type:"string"` - // The password of the instance. Returns an empty string if the password is - // not available. - PasswordData *string `locationName:"passwordData" type:"string"` + // The ID of the import snapshot task. + ImportTaskId *string `locationName:"importTaskId" type:"string"` - // The time the data was last updated. - Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` + // Describes an import snapshot task. + SnapshotTaskDetail *SnapshotTaskDetail `locationName:"snapshotTaskDetail" type:"structure"` } // String returns the string representation -func (s GetPasswordDataOutput) String() string { +func (s ImportSnapshotTask) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetPasswordDataOutput) GoString() string { +func (s ImportSnapshotTask) GoString() string { return s.String() } -// SetInstanceId sets the InstanceId field's value. -func (s *GetPasswordDataOutput) SetInstanceId(v string) *GetPasswordDataOutput { - s.InstanceId = &v +// SetDescription sets the Description field's value. +func (s *ImportSnapshotTask) SetDescription(v string) *ImportSnapshotTask { + s.Description = &v return s } -// SetPasswordData sets the PasswordData field's value. -func (s *GetPasswordDataOutput) SetPasswordData(v string) *GetPasswordDataOutput { - s.PasswordData = &v +// SetImportTaskId sets the ImportTaskId field's value. +func (s *ImportSnapshotTask) SetImportTaskId(v string) *ImportSnapshotTask { + s.ImportTaskId = &v return s } -// SetTimestamp sets the Timestamp field's value. -func (s *GetPasswordDataOutput) SetTimestamp(v time.Time) *GetPasswordDataOutput { - s.Timestamp = &v +// SetSnapshotTaskDetail sets the SnapshotTaskDetail field's value. +func (s *ImportSnapshotTask) SetSnapshotTaskDetail(v *SnapshotTaskDetail) *ImportSnapshotTask { + s.SnapshotTaskDetail = v return s } -// Contains the parameters for GetReservedInstanceExchangeQuote. -type GetReservedInstancesExchangeQuoteInput struct { +// Contains the parameters for ImportVolume. +type ImportVolumeInput struct { _ struct{} `type:"structure"` + // The Availability Zone for the resulting EBS volume. + // + // AvailabilityZone is a required field + AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` + + // A description of the volume. + Description *string `locationName:"description" 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"` + DryRun *bool `locationName:"dryRun" type:"boolean"` - // The IDs of the Convertible Reserved Instances to exchange. + // The disk image. // - // ReservedInstanceIds is a required field - ReservedInstanceIds []*string `locationName:"ReservedInstanceId" locationNameList:"ReservedInstanceId" type:"list" required:"true"` + // Image is a required field + Image *DiskImageDetail `locationName:"image" type:"structure" required:"true"` - // The configuration of the target Convertible Reserved Instance to exchange - // for your current Convertible Reserved Instances. - TargetConfigurations []*TargetConfigurationRequest `locationName:"TargetConfiguration" locationNameList:"TargetConfigurationRequest" type:"list"` + // The volume size. + // + // Volume is a required field + Volume *VolumeDetail `locationName:"volume" type:"structure" required:"true"` } // String returns the string representation -func (s GetReservedInstancesExchangeQuoteInput) String() string { +func (s ImportVolumeInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetReservedInstancesExchangeQuoteInput) GoString() string { +func (s ImportVolumeInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetReservedInstancesExchangeQuoteInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetReservedInstancesExchangeQuoteInput"} - if s.ReservedInstanceIds == nil { - invalidParams.Add(request.NewErrParamRequired("ReservedInstanceIds")) +func (s *ImportVolumeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ImportVolumeInput"} + if s.AvailabilityZone == nil { + invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) } - if s.TargetConfigurations != nil { - for i, v := range s.TargetConfigurations { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetConfigurations", i), err.(request.ErrInvalidParams)) - } + if s.Image == nil { + invalidParams.Add(request.NewErrParamRequired("Image")) + } + if s.Volume == nil { + invalidParams.Add(request.NewErrParamRequired("Volume")) + } + if s.Image != nil { + if err := s.Image.Validate(); err != nil { + invalidParams.AddNested("Image", err.(request.ErrInvalidParams)) + } + } + if s.Volume != nil { + if err := s.Volume.Validate(); err != nil { + invalidParams.AddNested("Volume", err.(request.ErrInvalidParams)) } } @@ -47466,4417 +60740,3838 @@ func (s *GetReservedInstancesExchangeQuoteInput) Validate() error { return nil } +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *ImportVolumeInput) SetAvailabilityZone(v string) *ImportVolumeInput { + s.AvailabilityZone = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *ImportVolumeInput) SetDescription(v string) *ImportVolumeInput { + s.Description = &v + return s +} + // SetDryRun sets the DryRun field's value. -func (s *GetReservedInstancesExchangeQuoteInput) SetDryRun(v bool) *GetReservedInstancesExchangeQuoteInput { +func (s *ImportVolumeInput) SetDryRun(v bool) *ImportVolumeInput { s.DryRun = &v return s } -// SetReservedInstanceIds sets the ReservedInstanceIds field's value. -func (s *GetReservedInstancesExchangeQuoteInput) SetReservedInstanceIds(v []*string) *GetReservedInstancesExchangeQuoteInput { - s.ReservedInstanceIds = v +// SetImage sets the Image field's value. +func (s *ImportVolumeInput) SetImage(v *DiskImageDetail) *ImportVolumeInput { + s.Image = v return s } -// SetTargetConfigurations sets the TargetConfigurations field's value. -func (s *GetReservedInstancesExchangeQuoteInput) SetTargetConfigurations(v []*TargetConfigurationRequest) *GetReservedInstancesExchangeQuoteInput { - s.TargetConfigurations = v +// SetVolume sets the Volume field's value. +func (s *ImportVolumeInput) SetVolume(v *VolumeDetail) *ImportVolumeInput { + s.Volume = v return s } -// Contains the output of GetReservedInstancesExchangeQuote. -type GetReservedInstancesExchangeQuoteOutput struct { +// Contains the output for ImportVolume. +type ImportVolumeOutput struct { _ struct{} `type:"structure"` - // The currency of the transaction. - CurrencyCode *string `locationName:"currencyCode" type:"string"` + // Information about the conversion task. + ConversionTask *ConversionTask `locationName:"conversionTask" type:"structure"` +} - // If true, the exchange is valid. If false, the exchange cannot be completed. - IsValidExchange *bool `locationName:"isValidExchange" type:"boolean"` +// String returns the string representation +func (s ImportVolumeOutput) String() string { + return awsutil.Prettify(s) +} - // The new end date of the reservation term. - OutputReservedInstancesWillExpireAt *time.Time `locationName:"outputReservedInstancesWillExpireAt" type:"timestamp"` +// GoString returns the string representation +func (s ImportVolumeOutput) GoString() string { + return s.String() +} - // The total true upfront charge for the exchange. - PaymentDue *string `locationName:"paymentDue" type:"string"` +// SetConversionTask sets the ConversionTask field's value. +func (s *ImportVolumeOutput) SetConversionTask(v *ConversionTask) *ImportVolumeOutput { + s.ConversionTask = v + return s +} - // The cost associated with the Reserved Instance. - ReservedInstanceValueRollup *ReservationValue `locationName:"reservedInstanceValueRollup" type:"structure"` +// Describes an import volume task. +type ImportVolumeTaskDetails struct { + _ struct{} `type:"structure"` - // The configuration of your Convertible Reserved Instances. - ReservedInstanceValueSet []*ReservedInstanceReservationValue `locationName:"reservedInstanceValueSet" locationNameList:"item" type:"list"` + // The Availability Zone where the resulting volume will reside. + AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - // The cost associated with the Reserved Instance. - TargetConfigurationValueRollup *ReservationValue `locationName:"targetConfigurationValueRollup" type:"structure"` + // The number of bytes converted so far. + BytesConverted *int64 `locationName:"bytesConverted" type:"long"` - // The values of the target Convertible Reserved Instances. - TargetConfigurationValueSet []*TargetReservationValue `locationName:"targetConfigurationValueSet" locationNameList:"item" type:"list"` + // The description you provided when starting the import volume task. + Description *string `locationName:"description" type:"string"` - // Describes the reason why the exchange cannot be completed. - ValidationFailureReason *string `locationName:"validationFailureReason" type:"string"` + // The image. + Image *DiskImageDescription `locationName:"image" type:"structure"` + + // The volume. + Volume *DiskImageVolumeDescription `locationName:"volume" type:"structure"` } // String returns the string representation -func (s GetReservedInstancesExchangeQuoteOutput) String() string { +func (s ImportVolumeTaskDetails) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetReservedInstancesExchangeQuoteOutput) GoString() string { +func (s ImportVolumeTaskDetails) GoString() string { return s.String() } -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *GetReservedInstancesExchangeQuoteOutput) SetCurrencyCode(v string) *GetReservedInstancesExchangeQuoteOutput { - s.CurrencyCode = &v +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *ImportVolumeTaskDetails) SetAvailabilityZone(v string) *ImportVolumeTaskDetails { + s.AvailabilityZone = &v return s } -// SetIsValidExchange sets the IsValidExchange field's value. -func (s *GetReservedInstancesExchangeQuoteOutput) SetIsValidExchange(v bool) *GetReservedInstancesExchangeQuoteOutput { - s.IsValidExchange = &v +// SetBytesConverted sets the BytesConverted field's value. +func (s *ImportVolumeTaskDetails) SetBytesConverted(v int64) *ImportVolumeTaskDetails { + s.BytesConverted = &v return s } -// SetOutputReservedInstancesWillExpireAt sets the OutputReservedInstancesWillExpireAt field's value. -func (s *GetReservedInstancesExchangeQuoteOutput) SetOutputReservedInstancesWillExpireAt(v time.Time) *GetReservedInstancesExchangeQuoteOutput { - s.OutputReservedInstancesWillExpireAt = &v +// SetDescription sets the Description field's value. +func (s *ImportVolumeTaskDetails) SetDescription(v string) *ImportVolumeTaskDetails { + s.Description = &v return s } -// SetPaymentDue sets the PaymentDue field's value. -func (s *GetReservedInstancesExchangeQuoteOutput) SetPaymentDue(v string) *GetReservedInstancesExchangeQuoteOutput { - s.PaymentDue = &v +// SetImage sets the Image field's value. +func (s *ImportVolumeTaskDetails) SetImage(v *DiskImageDescription) *ImportVolumeTaskDetails { + s.Image = v return s } -// SetReservedInstanceValueRollup sets the ReservedInstanceValueRollup field's value. -func (s *GetReservedInstancesExchangeQuoteOutput) SetReservedInstanceValueRollup(v *ReservationValue) *GetReservedInstancesExchangeQuoteOutput { - s.ReservedInstanceValueRollup = v +// SetVolume sets the Volume field's value. +func (s *ImportVolumeTaskDetails) SetVolume(v *DiskImageVolumeDescription) *ImportVolumeTaskDetails { + s.Volume = v return s } -// SetReservedInstanceValueSet sets the ReservedInstanceValueSet field's value. -func (s *GetReservedInstancesExchangeQuoteOutput) SetReservedInstanceValueSet(v []*ReservedInstanceReservationValue) *GetReservedInstancesExchangeQuoteOutput { - s.ReservedInstanceValueSet = v - return s -} +// Describes an instance. +type Instance struct { + _ struct{} `type:"structure"` -// SetTargetConfigurationValueRollup sets the TargetConfigurationValueRollup field's value. -func (s *GetReservedInstancesExchangeQuoteOutput) SetTargetConfigurationValueRollup(v *ReservationValue) *GetReservedInstancesExchangeQuoteOutput { - s.TargetConfigurationValueRollup = v - return s -} + // The AMI launch index, which can be used to find this instance in the launch + // group. + AmiLaunchIndex *int64 `locationName:"amiLaunchIndex" type:"integer"` -// SetTargetConfigurationValueSet sets the TargetConfigurationValueSet field's value. -func (s *GetReservedInstancesExchangeQuoteOutput) SetTargetConfigurationValueSet(v []*TargetReservationValue) *GetReservedInstancesExchangeQuoteOutput { - s.TargetConfigurationValueSet = v - return s -} + // The architecture of the image. + Architecture *string `locationName:"architecture" type:"string" enum:"ArchitectureValues"` -// SetValidationFailureReason sets the ValidationFailureReason field's value. -func (s *GetReservedInstancesExchangeQuoteOutput) SetValidationFailureReason(v string) *GetReservedInstancesExchangeQuoteOutput { - s.ValidationFailureReason = &v - return s -} + // Any block device mapping entries for the instance. + BlockDeviceMappings []*InstanceBlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` -// Describes a security group. -type GroupIdentifier struct { - _ struct{} `type:"structure"` + // The ID of the Capacity Reservation. + CapacityReservationId *string `locationName:"capacityReservationId" type:"string"` - // The ID of the security group. - GroupId *string `locationName:"groupId" type:"string"` + // Information about the Capacity Reservation targeting option. + CapacityReservationSpecification *CapacityReservationSpecificationResponse `locationName:"capacityReservationSpecification" type:"structure"` - // The name of the security group. - GroupName *string `locationName:"groupName" type:"string"` -} + // The idempotency token you provided when you launched the instance, if applicable. + ClientToken *string `locationName:"clientToken" type:"string"` -// String returns the string representation -func (s GroupIdentifier) String() string { - return awsutil.Prettify(s) -} + // The CPU options for the instance. + CpuOptions *CpuOptions `locationName:"cpuOptions" type:"structure"` -// GoString returns the string representation -func (s GroupIdentifier) GoString() string { - return s.String() -} + // Indicates whether the instance is optimized for Amazon EBS I/O. This optimization + // provides dedicated throughput to Amazon EBS and an optimized configuration + // stack to provide optimal I/O performance. This optimization isn't available + // with all instance types. Additional usage charges apply when using an EBS + // Optimized instance. + EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"` -// SetGroupId sets the GroupId field's value. -func (s *GroupIdentifier) SetGroupId(v string) *GroupIdentifier { - s.GroupId = &v - return s -} + // The Elastic GPU associated with the instance. + ElasticGpuAssociations []*ElasticGpuAssociation `locationName:"elasticGpuAssociationSet" locationNameList:"item" type:"list"` -// SetGroupName sets the GroupName field's value. -func (s *GroupIdentifier) SetGroupName(v string) *GroupIdentifier { - s.GroupName = &v - return s -} + // The elastic inference accelerator associated with the instance. + ElasticInferenceAcceleratorAssociations []*ElasticInferenceAcceleratorAssociation `locationName:"elasticInferenceAcceleratorAssociationSet" locationNameList:"item" type:"list"` -// Describes an event in the history of the Spot Fleet request. -type HistoryRecord struct { - _ struct{} `type:"structure"` + // Specifies whether enhanced networking with ENA is enabled. + EnaSupport *bool `locationName:"enaSupport" type:"boolean"` - // Information about the event. - // - // EventInformation is a required field - EventInformation *EventInformation `locationName:"eventInformation" type:"structure" required:"true"` + // Indicates whether the instance is enabled for hibernation. + HibernationOptions *HibernationOptions `locationName:"hibernationOptions" type:"structure"` - // The event type. - // - // * error - An error with the Spot Fleet request. - // - // * fleetRequestChange - A change in the status or configuration of the - // Spot Fleet request. - // - // * instanceChange - An instance was launched or terminated. - // - // * Information - An informational event. - // - // EventType is a required field - EventType *string `locationName:"eventType" type:"string" required:"true" enum:"EventType"` + // The hypervisor type of the instance. + Hypervisor *string `locationName:"hypervisor" type:"string" enum:"HypervisorType"` - // The date and time of the event, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - // - // Timestamp is a required field - Timestamp *time.Time `locationName:"timestamp" type:"timestamp" required:"true"` -} + // The IAM instance profile associated with the instance, if applicable. + IamInstanceProfile *IamInstanceProfile `locationName:"iamInstanceProfile" type:"structure"` -// String returns the string representation -func (s HistoryRecord) String() string { - return awsutil.Prettify(s) -} + // The ID of the AMI used to launch the instance. + ImageId *string `locationName:"imageId" type:"string"` -// GoString returns the string representation -func (s HistoryRecord) GoString() string { - return s.String() -} + // The ID of the instance. + InstanceId *string `locationName:"instanceId" type:"string"` -// SetEventInformation sets the EventInformation field's value. -func (s *HistoryRecord) SetEventInformation(v *EventInformation) *HistoryRecord { - s.EventInformation = v - return s -} + // Indicates whether this is a Spot Instance or a Scheduled Instance. + InstanceLifecycle *string `locationName:"instanceLifecycle" type:"string" enum:"InstanceLifecycleType"` -// SetEventType sets the EventType field's value. -func (s *HistoryRecord) SetEventType(v string) *HistoryRecord { - s.EventType = &v - return s -} + // The instance type. + InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` -// SetTimestamp sets the Timestamp field's value. -func (s *HistoryRecord) SetTimestamp(v time.Time) *HistoryRecord { - s.Timestamp = &v - return s -} + // The kernel associated with this instance, if applicable. + KernelId *string `locationName:"kernelId" type:"string"` -// Describes an event in the history of an EC2 Fleet. -type HistoryRecordEntry struct { - _ struct{} `type:"structure"` + // The name of the key pair, if this instance was launched with an associated + // key pair. + KeyName *string `locationName:"keyName" type:"string"` - // Information about the event. - EventInformation *EventInformation `locationName:"eventInformation" type:"structure"` + // The time the instance was launched. + LaunchTime *time.Time `locationName:"launchTime" type:"timestamp"` - // The event type. - EventType *string `locationName:"eventType" type:"string" enum:"FleetEventType"` + // The license configurations. + Licenses []*LicenseConfiguration `locationName:"licenseSet" locationNameList:"item" type:"list"` - // The date and time of the event, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` -} + // The monitoring for the instance. + Monitoring *Monitoring `locationName:"monitoring" type:"structure"` -// String returns the string representation -func (s HistoryRecordEntry) String() string { - return awsutil.Prettify(s) -} + // [EC2-VPC] One or more network interfaces for the instance. + NetworkInterfaces []*InstanceNetworkInterface `locationName:"networkInterfaceSet" locationNameList:"item" type:"list"` -// GoString returns the string representation -func (s HistoryRecordEntry) GoString() string { - return s.String() -} + // The location where the instance launched, if applicable. + Placement *Placement `locationName:"placement" type:"structure"` -// SetEventInformation sets the EventInformation field's value. -func (s *HistoryRecordEntry) SetEventInformation(v *EventInformation) *HistoryRecordEntry { - s.EventInformation = v - return s -} + // The value is Windows for Windows instances; otherwise blank. + Platform *string `locationName:"platform" type:"string" enum:"PlatformValues"` -// SetEventType sets the EventType field's value. -func (s *HistoryRecordEntry) SetEventType(v string) *HistoryRecordEntry { - s.EventType = &v - return s -} + // (IPv4 only) The private DNS hostname name assigned to the instance. This + // DNS hostname can only be used inside the Amazon EC2 network. This name is + // not available until the instance enters the running state. + // + // [EC2-VPC] The Amazon-provided DNS server resolves Amazon-provided private + // DNS hostnames if you've enabled DNS resolution and DNS hostnames in your + // VPC. If you are not using the Amazon-provided DNS server in your VPC, your + // custom domain name servers must resolve the hostname as appropriate. + PrivateDnsName *string `locationName:"privateDnsName" type:"string"` -// SetTimestamp sets the Timestamp field's value. -func (s *HistoryRecordEntry) SetTimestamp(v time.Time) *HistoryRecordEntry { - s.Timestamp = &v - return s -} + // The private IPv4 address assigned to the instance. + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` + + // The product codes attached to this instance, if applicable. + ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` + + // (IPv4 only) The public DNS name assigned to the instance. This name is not + // available until the instance enters the running state. For EC2-VPC, this + // name is only available if you've enabled DNS hostnames for your VPC. + PublicDnsName *string `locationName:"dnsName" type:"string"` -// Describes the properties of the Dedicated Host. -type Host struct { - _ struct{} `type:"structure"` + // The public IPv4 address assigned to the instance, if applicable. + PublicIpAddress *string `locationName:"ipAddress" type:"string"` - // The time that the Dedicated Host was allocated. - AllocationTime *time.Time `locationName:"allocationTime" type:"timestamp"` + // The RAM disk associated with this instance, if applicable. + RamdiskId *string `locationName:"ramdiskId" type:"string"` - // Whether auto-placement is on or off. - AutoPlacement *string `locationName:"autoPlacement" type:"string" enum:"AutoPlacement"` + // The device name of the root device volume (for example, /dev/sda1). + RootDeviceName *string `locationName:"rootDeviceName" type:"string"` - // The Availability Zone of the Dedicated Host. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` + // The root device type used by the AMI. The AMI can use an EBS volume or an + // instance store volume. + RootDeviceType *string `locationName:"rootDeviceType" type:"string" enum:"DeviceType"` - // The number of new instances that can be launched onto the Dedicated Host. - AvailableCapacity *AvailableCapacity `locationName:"availableCapacity" type:"structure"` + // One or more security groups for the instance. + SecurityGroups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` - // Unique, case-sensitive identifier that you provide to ensure idempotency - // of the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // in the Amazon Elastic Compute Cloud User Guide. - ClientToken *string `locationName:"clientToken" type:"string"` + // 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 (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html) + // in the Amazon Virtual Private Cloud User Guide. + SourceDestCheck *bool `locationName:"sourceDestCheck" type:"boolean"` - // The ID of the Dedicated Host. - HostId *string `locationName:"hostId" type:"string"` + // If the request is a Spot Instance request, the ID of the request. + SpotInstanceRequestId *string `locationName:"spotInstanceRequestId" type:"string"` - // The hardware specifications of the Dedicated Host. - HostProperties *HostProperties `locationName:"hostProperties" type:"structure"` + // Specifies whether enhanced networking with the Intel 82599 Virtual Function + // interface is enabled. + SriovNetSupport *string `locationName:"sriovNetSupport" type:"string"` - // The reservation ID of the Dedicated Host. This returns a null response if - // the Dedicated Host doesn't have an associated reservation. - HostReservationId *string `locationName:"hostReservationId" type:"string"` + // The current state of the instance. + State *InstanceState `locationName:"instanceState" type:"structure"` - // The IDs and instance type that are currently running on the Dedicated Host. - Instances []*HostInstance `locationName:"instances" locationNameList:"item" type:"list"` + // The reason for the most recent state transition. + StateReason *StateReason `locationName:"stateReason" type:"structure"` - // The time that the Dedicated Host was released. - ReleaseTime *time.Time `locationName:"releaseTime" type:"timestamp"` + // The reason for the most recent state transition. This might be an empty string. + StateTransitionReason *string `locationName:"reason" type:"string"` - // The Dedicated Host's state. - State *string `locationName:"state" type:"string" enum:"AllocationState"` + // [EC2-VPC] The ID of the subnet in which the instance is running. + SubnetId *string `locationName:"subnetId" type:"string"` - // Any tags assigned to the Dedicated Host. + // Any tags assigned to the instance. Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + + // The virtualization type of the instance. + VirtualizationType *string `locationName:"virtualizationType" type:"string" enum:"VirtualizationType"` + + // [EC2-VPC] The ID of the VPC in which the instance is running. + VpcId *string `locationName:"vpcId" type:"string"` } // String returns the string representation -func (s Host) String() string { +func (s Instance) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Host) GoString() string { +func (s Instance) GoString() string { return s.String() } -// SetAllocationTime sets the AllocationTime field's value. -func (s *Host) SetAllocationTime(v time.Time) *Host { - s.AllocationTime = &v +// SetAmiLaunchIndex sets the AmiLaunchIndex field's value. +func (s *Instance) SetAmiLaunchIndex(v int64) *Instance { + s.AmiLaunchIndex = &v return s } -// SetAutoPlacement sets the AutoPlacement field's value. -func (s *Host) SetAutoPlacement(v string) *Host { - s.AutoPlacement = &v +// SetArchitecture sets the Architecture field's value. +func (s *Instance) SetArchitecture(v string) *Instance { + s.Architecture = &v return s } -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *Host) SetAvailabilityZone(v string) *Host { - s.AvailabilityZone = &v +// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. +func (s *Instance) SetBlockDeviceMappings(v []*InstanceBlockDeviceMapping) *Instance { + s.BlockDeviceMappings = v return s } -// SetAvailableCapacity sets the AvailableCapacity field's value. -func (s *Host) SetAvailableCapacity(v *AvailableCapacity) *Host { - s.AvailableCapacity = v +// SetCapacityReservationId sets the CapacityReservationId field's value. +func (s *Instance) SetCapacityReservationId(v string) *Instance { + s.CapacityReservationId = &v return s } -// SetClientToken sets the ClientToken field's value. -func (s *Host) SetClientToken(v string) *Host { - s.ClientToken = &v +// SetCapacityReservationSpecification sets the CapacityReservationSpecification field's value. +func (s *Instance) SetCapacityReservationSpecification(v *CapacityReservationSpecificationResponse) *Instance { + s.CapacityReservationSpecification = v return s } -// SetHostId sets the HostId field's value. -func (s *Host) SetHostId(v string) *Host { - s.HostId = &v +// SetClientToken sets the ClientToken field's value. +func (s *Instance) SetClientToken(v string) *Instance { + s.ClientToken = &v return s } -// SetHostProperties sets the HostProperties field's value. -func (s *Host) SetHostProperties(v *HostProperties) *Host { - s.HostProperties = v +// SetCpuOptions sets the CpuOptions field's value. +func (s *Instance) SetCpuOptions(v *CpuOptions) *Instance { + s.CpuOptions = v return s } -// SetHostReservationId sets the HostReservationId field's value. -func (s *Host) SetHostReservationId(v string) *Host { - s.HostReservationId = &v +// SetEbsOptimized sets the EbsOptimized field's value. +func (s *Instance) SetEbsOptimized(v bool) *Instance { + s.EbsOptimized = &v return s } -// SetInstances sets the Instances field's value. -func (s *Host) SetInstances(v []*HostInstance) *Host { - s.Instances = v +// SetElasticGpuAssociations sets the ElasticGpuAssociations field's value. +func (s *Instance) SetElasticGpuAssociations(v []*ElasticGpuAssociation) *Instance { + s.ElasticGpuAssociations = v return s } -// SetReleaseTime sets the ReleaseTime field's value. -func (s *Host) SetReleaseTime(v time.Time) *Host { - s.ReleaseTime = &v +// SetElasticInferenceAcceleratorAssociations sets the ElasticInferenceAcceleratorAssociations field's value. +func (s *Instance) SetElasticInferenceAcceleratorAssociations(v []*ElasticInferenceAcceleratorAssociation) *Instance { + s.ElasticInferenceAcceleratorAssociations = v return s } -// SetState sets the State field's value. -func (s *Host) SetState(v string) *Host { - s.State = &v +// SetEnaSupport sets the EnaSupport field's value. +func (s *Instance) SetEnaSupport(v bool) *Instance { + s.EnaSupport = &v return s } -// SetTags sets the Tags field's value. -func (s *Host) SetTags(v []*Tag) *Host { - s.Tags = v +// SetHibernationOptions sets the HibernationOptions field's value. +func (s *Instance) SetHibernationOptions(v *HibernationOptions) *Instance { + s.HibernationOptions = v return s } -// Describes an instance running on a Dedicated Host. -type HostInstance struct { - _ struct{} `type:"structure"` - - // the IDs of instances that are running on the Dedicated Host. - InstanceId *string `locationName:"instanceId" type:"string"` - - // The instance type size (for example, m3.medium) of the running instance. - InstanceType *string `locationName:"instanceType" type:"string"` +// SetHypervisor sets the Hypervisor field's value. +func (s *Instance) SetHypervisor(v string) *Instance { + s.Hypervisor = &v + return s } -// String returns the string representation -func (s HostInstance) String() string { - return awsutil.Prettify(s) +// SetIamInstanceProfile sets the IamInstanceProfile field's value. +func (s *Instance) SetIamInstanceProfile(v *IamInstanceProfile) *Instance { + s.IamInstanceProfile = v + return s } -// GoString returns the string representation -func (s HostInstance) GoString() string { - return s.String() +// SetImageId sets the ImageId field's value. +func (s *Instance) SetImageId(v string) *Instance { + s.ImageId = &v + return s } // SetInstanceId sets the InstanceId field's value. -func (s *HostInstance) SetInstanceId(v string) *HostInstance { +func (s *Instance) SetInstanceId(v string) *Instance { s.InstanceId = &v return s } -// SetInstanceType sets the InstanceType field's value. -func (s *HostInstance) SetInstanceType(v string) *HostInstance { - s.InstanceType = &v +// SetInstanceLifecycle sets the InstanceLifecycle field's value. +func (s *Instance) SetInstanceLifecycle(v string) *Instance { + s.InstanceLifecycle = &v return s } -// Details about the Dedicated Host Reservation offering. -type HostOffering struct { - _ struct{} `type:"structure"` - - // The currency of the offering. - CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` - - // The duration of the offering (in seconds). - Duration *int64 `locationName:"duration" type:"integer"` - - // The hourly price of the offering. - HourlyPrice *string `locationName:"hourlyPrice" type:"string"` - - // The instance family of the offering. - InstanceFamily *string `locationName:"instanceFamily" type:"string"` - - // The ID of the offering. - OfferingId *string `locationName:"offeringId" type:"string"` - - // The available payment option. - PaymentOption *string `locationName:"paymentOption" type:"string" enum:"PaymentOption"` - - // The upfront price of the offering. Does not apply to No Upfront offerings. - UpfrontPrice *string `locationName:"upfrontPrice" type:"string"` -} - -// String returns the string representation -func (s HostOffering) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HostOffering) GoString() string { - return s.String() -} - -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *HostOffering) SetCurrencyCode(v string) *HostOffering { - s.CurrencyCode = &v +// SetInstanceType sets the InstanceType field's value. +func (s *Instance) SetInstanceType(v string) *Instance { + s.InstanceType = &v return s } -// SetDuration sets the Duration field's value. -func (s *HostOffering) SetDuration(v int64) *HostOffering { - s.Duration = &v +// SetKernelId sets the KernelId field's value. +func (s *Instance) SetKernelId(v string) *Instance { + s.KernelId = &v return s } -// SetHourlyPrice sets the HourlyPrice field's value. -func (s *HostOffering) SetHourlyPrice(v string) *HostOffering { - s.HourlyPrice = &v +// SetKeyName sets the KeyName field's value. +func (s *Instance) SetKeyName(v string) *Instance { + s.KeyName = &v return s } -// SetInstanceFamily sets the InstanceFamily field's value. -func (s *HostOffering) SetInstanceFamily(v string) *HostOffering { - s.InstanceFamily = &v +// SetLaunchTime sets the LaunchTime field's value. +func (s *Instance) SetLaunchTime(v time.Time) *Instance { + s.LaunchTime = &v return s } -// SetOfferingId sets the OfferingId field's value. -func (s *HostOffering) SetOfferingId(v string) *HostOffering { - s.OfferingId = &v +// SetLicenses sets the Licenses field's value. +func (s *Instance) SetLicenses(v []*LicenseConfiguration) *Instance { + s.Licenses = v return s } -// SetPaymentOption sets the PaymentOption field's value. -func (s *HostOffering) SetPaymentOption(v string) *HostOffering { - s.PaymentOption = &v +// SetMonitoring sets the Monitoring field's value. +func (s *Instance) SetMonitoring(v *Monitoring) *Instance { + s.Monitoring = v return s } -// SetUpfrontPrice sets the UpfrontPrice field's value. -func (s *HostOffering) SetUpfrontPrice(v string) *HostOffering { - s.UpfrontPrice = &v +// SetNetworkInterfaces sets the NetworkInterfaces field's value. +func (s *Instance) SetNetworkInterfaces(v []*InstanceNetworkInterface) *Instance { + s.NetworkInterfaces = v return s } -// Describes properties of a Dedicated Host. -type HostProperties struct { - _ struct{} `type:"structure"` - - // The number of cores on the Dedicated Host. - Cores *int64 `locationName:"cores" type:"integer"` - - // The instance type size that the Dedicated Host supports (for example, m3.medium). - InstanceType *string `locationName:"instanceType" type:"string"` - - // The number of sockets on the Dedicated Host. - Sockets *int64 `locationName:"sockets" type:"integer"` - - // The number of vCPUs on the Dedicated Host. - TotalVCpus *int64 `locationName:"totalVCpus" type:"integer"` -} - -// String returns the string representation -func (s HostProperties) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s HostProperties) GoString() string { - return s.String() +// SetPlacement sets the Placement field's value. +func (s *Instance) SetPlacement(v *Placement) *Instance { + s.Placement = v + return s } -// SetCores sets the Cores field's value. -func (s *HostProperties) SetCores(v int64) *HostProperties { - s.Cores = &v +// SetPlatform sets the Platform field's value. +func (s *Instance) SetPlatform(v string) *Instance { + s.Platform = &v return s } -// SetInstanceType sets the InstanceType field's value. -func (s *HostProperties) SetInstanceType(v string) *HostProperties { - s.InstanceType = &v +// SetPrivateDnsName sets the PrivateDnsName field's value. +func (s *Instance) SetPrivateDnsName(v string) *Instance { + s.PrivateDnsName = &v return s } -// SetSockets sets the Sockets field's value. -func (s *HostProperties) SetSockets(v int64) *HostProperties { - s.Sockets = &v +// SetPrivateIpAddress sets the PrivateIpAddress field's value. +func (s *Instance) SetPrivateIpAddress(v string) *Instance { + s.PrivateIpAddress = &v return s } -// SetTotalVCpus sets the TotalVCpus field's value. -func (s *HostProperties) SetTotalVCpus(v int64) *HostProperties { - s.TotalVCpus = &v +// SetProductCodes sets the ProductCodes field's value. +func (s *Instance) SetProductCodes(v []*ProductCode) *Instance { + s.ProductCodes = v return s } -// Details about the Dedicated Host Reservation and associated Dedicated Hosts. -type HostReservation struct { - _ struct{} `type:"structure"` - - // The number of Dedicated Hosts the reservation is associated with. - Count *int64 `locationName:"count" type:"integer"` - - // The currency in which the upfrontPrice and hourlyPrice amounts are specified. - // At this time, the only supported currency is USD. - CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` - - // The length of the reservation's term, specified in seconds. Can be 31536000 - // (1 year) | 94608000 (3 years). - Duration *int64 `locationName:"duration" type:"integer"` - - // The date and time that the reservation ends. - End *time.Time `locationName:"end" type:"timestamp"` - - // The IDs of the Dedicated Hosts associated with the reservation. - HostIdSet []*string `locationName:"hostIdSet" locationNameList:"item" type:"list"` - - // The ID of the reservation that specifies the associated Dedicated Hosts. - HostReservationId *string `locationName:"hostReservationId" type:"string"` - - // The hourly price of the reservation. - HourlyPrice *string `locationName:"hourlyPrice" type:"string"` - - // The instance family of the Dedicated Host Reservation. The instance family - // on the Dedicated Host must be the same in order for it to benefit from the - // reservation. - InstanceFamily *string `locationName:"instanceFamily" type:"string"` - - // The ID of the reservation. This remains the same regardless of which Dedicated - // Hosts are associated with it. - OfferingId *string `locationName:"offeringId" type:"string"` - - // The payment option selected for this reservation. - PaymentOption *string `locationName:"paymentOption" type:"string" enum:"PaymentOption"` - - // The date and time that the reservation started. - Start *time.Time `locationName:"start" type:"timestamp"` - - // The state of the reservation. - State *string `locationName:"state" type:"string" enum:"ReservationState"` - - // The upfront price of the reservation. - UpfrontPrice *string `locationName:"upfrontPrice" type:"string"` +// SetPublicDnsName sets the PublicDnsName field's value. +func (s *Instance) SetPublicDnsName(v string) *Instance { + s.PublicDnsName = &v + return s } -// String returns the string representation -func (s HostReservation) String() string { - return awsutil.Prettify(s) +// SetPublicIpAddress sets the PublicIpAddress field's value. +func (s *Instance) SetPublicIpAddress(v string) *Instance { + s.PublicIpAddress = &v + return s } -// GoString returns the string representation -func (s HostReservation) GoString() string { - return s.String() +// SetRamdiskId sets the RamdiskId field's value. +func (s *Instance) SetRamdiskId(v string) *Instance { + s.RamdiskId = &v + return s } -// SetCount sets the Count field's value. -func (s *HostReservation) SetCount(v int64) *HostReservation { - s.Count = &v +// SetRootDeviceName sets the RootDeviceName field's value. +func (s *Instance) SetRootDeviceName(v string) *Instance { + s.RootDeviceName = &v return s } -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *HostReservation) SetCurrencyCode(v string) *HostReservation { - s.CurrencyCode = &v +// SetRootDeviceType sets the RootDeviceType field's value. +func (s *Instance) SetRootDeviceType(v string) *Instance { + s.RootDeviceType = &v return s } -// SetDuration sets the Duration field's value. -func (s *HostReservation) SetDuration(v int64) *HostReservation { - s.Duration = &v +// SetSecurityGroups sets the SecurityGroups field's value. +func (s *Instance) SetSecurityGroups(v []*GroupIdentifier) *Instance { + s.SecurityGroups = v return s } -// SetEnd sets the End field's value. -func (s *HostReservation) SetEnd(v time.Time) *HostReservation { - s.End = &v +// SetSourceDestCheck sets the SourceDestCheck field's value. +func (s *Instance) SetSourceDestCheck(v bool) *Instance { + s.SourceDestCheck = &v return s } -// SetHostIdSet sets the HostIdSet field's value. -func (s *HostReservation) SetHostIdSet(v []*string) *HostReservation { - s.HostIdSet = v +// SetSpotInstanceRequestId sets the SpotInstanceRequestId field's value. +func (s *Instance) SetSpotInstanceRequestId(v string) *Instance { + s.SpotInstanceRequestId = &v return s } -// SetHostReservationId sets the HostReservationId field's value. -func (s *HostReservation) SetHostReservationId(v string) *HostReservation { - s.HostReservationId = &v +// SetSriovNetSupport sets the SriovNetSupport field's value. +func (s *Instance) SetSriovNetSupport(v string) *Instance { + s.SriovNetSupport = &v return s } -// SetHourlyPrice sets the HourlyPrice field's value. -func (s *HostReservation) SetHourlyPrice(v string) *HostReservation { - s.HourlyPrice = &v +// SetState sets the State field's value. +func (s *Instance) SetState(v *InstanceState) *Instance { + s.State = v return s } -// SetInstanceFamily sets the InstanceFamily field's value. -func (s *HostReservation) SetInstanceFamily(v string) *HostReservation { - s.InstanceFamily = &v +// SetStateReason sets the StateReason field's value. +func (s *Instance) SetStateReason(v *StateReason) *Instance { + s.StateReason = v return s } -// SetOfferingId sets the OfferingId field's value. -func (s *HostReservation) SetOfferingId(v string) *HostReservation { - s.OfferingId = &v +// SetStateTransitionReason sets the StateTransitionReason field's value. +func (s *Instance) SetStateTransitionReason(v string) *Instance { + s.StateTransitionReason = &v return s } -// SetPaymentOption sets the PaymentOption field's value. -func (s *HostReservation) SetPaymentOption(v string) *HostReservation { - s.PaymentOption = &v +// SetSubnetId sets the SubnetId field's value. +func (s *Instance) SetSubnetId(v string) *Instance { + s.SubnetId = &v return s } -// SetStart sets the Start field's value. -func (s *HostReservation) SetStart(v time.Time) *HostReservation { - s.Start = &v +// SetTags sets the Tags field's value. +func (s *Instance) SetTags(v []*Tag) *Instance { + s.Tags = v return s } -// SetState sets the State field's value. -func (s *HostReservation) SetState(v string) *HostReservation { - s.State = &v +// SetVirtualizationType sets the VirtualizationType field's value. +func (s *Instance) SetVirtualizationType(v string) *Instance { + s.VirtualizationType = &v return s } -// SetUpfrontPrice sets the UpfrontPrice field's value. -func (s *HostReservation) SetUpfrontPrice(v string) *HostReservation { - s.UpfrontPrice = &v +// SetVpcId sets the VpcId field's value. +func (s *Instance) SetVpcId(v string) *Instance { + s.VpcId = &v return s } -// Describes an IAM instance profile. -type IamInstanceProfile struct { +// Describes a block device mapping. +type InstanceBlockDeviceMapping struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the instance profile. - Arn *string `locationName:"arn" type:"string"` + // The device name (for example, /dev/sdh or xvdh). + DeviceName *string `locationName:"deviceName" type:"string"` - // The ID of the instance profile. - Id *string `locationName:"id" type:"string"` + // Parameters used to automatically set up EBS volumes when the instance is + // launched. + Ebs *EbsInstanceBlockDevice `locationName:"ebs" type:"structure"` } // String returns the string representation -func (s IamInstanceProfile) String() string { +func (s InstanceBlockDeviceMapping) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s IamInstanceProfile) GoString() string { +func (s InstanceBlockDeviceMapping) GoString() string { return s.String() } -// SetArn sets the Arn field's value. -func (s *IamInstanceProfile) SetArn(v string) *IamInstanceProfile { - s.Arn = &v +// SetDeviceName sets the DeviceName field's value. +func (s *InstanceBlockDeviceMapping) SetDeviceName(v string) *InstanceBlockDeviceMapping { + s.DeviceName = &v return s } -// SetId sets the Id field's value. -func (s *IamInstanceProfile) SetId(v string) *IamInstanceProfile { - s.Id = &v +// SetEbs sets the Ebs field's value. +func (s *InstanceBlockDeviceMapping) SetEbs(v *EbsInstanceBlockDevice) *InstanceBlockDeviceMapping { + s.Ebs = v return s } -// Describes an association between an IAM instance profile and an instance. -type IamInstanceProfileAssociation struct { +// Describes a block device mapping entry. +type InstanceBlockDeviceMappingSpecification struct { _ struct{} `type:"structure"` - // The ID of the association. - AssociationId *string `locationName:"associationId" type:"string"` - - // The IAM instance profile. - IamInstanceProfile *IamInstanceProfile `locationName:"iamInstanceProfile" type:"structure"` + // The device name (for example, /dev/sdh or xvdh). + DeviceName *string `locationName:"deviceName" type:"string"` - // The ID of the instance. - InstanceId *string `locationName:"instanceId" type:"string"` + // Parameters used to automatically set up EBS volumes when the instance is + // launched. + Ebs *EbsInstanceBlockDeviceSpecification `locationName:"ebs" type:"structure"` - // The state of the association. - State *string `locationName:"state" type:"string" enum:"IamInstanceProfileAssociationState"` + // suppress the specified device included in the block device mapping. + NoDevice *string `locationName:"noDevice" type:"string"` - // The time the IAM instance profile was associated with the instance. - Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` + // The virtual device name. + VirtualName *string `locationName:"virtualName" type:"string"` } // String returns the string representation -func (s IamInstanceProfileAssociation) String() string { +func (s InstanceBlockDeviceMappingSpecification) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s IamInstanceProfileAssociation) GoString() string { +func (s InstanceBlockDeviceMappingSpecification) GoString() string { return s.String() } -// SetAssociationId sets the AssociationId field's value. -func (s *IamInstanceProfileAssociation) SetAssociationId(v string) *IamInstanceProfileAssociation { - s.AssociationId = &v - return s -} - -// SetIamInstanceProfile sets the IamInstanceProfile field's value. -func (s *IamInstanceProfileAssociation) SetIamInstanceProfile(v *IamInstanceProfile) *IamInstanceProfileAssociation { - s.IamInstanceProfile = v +// SetDeviceName sets the DeviceName field's value. +func (s *InstanceBlockDeviceMappingSpecification) SetDeviceName(v string) *InstanceBlockDeviceMappingSpecification { + s.DeviceName = &v return s } - -// SetInstanceId sets the InstanceId field's value. -func (s *IamInstanceProfileAssociation) SetInstanceId(v string) *IamInstanceProfileAssociation { - s.InstanceId = &v + +// SetEbs sets the Ebs field's value. +func (s *InstanceBlockDeviceMappingSpecification) SetEbs(v *EbsInstanceBlockDeviceSpecification) *InstanceBlockDeviceMappingSpecification { + s.Ebs = v return s } -// SetState sets the State field's value. -func (s *IamInstanceProfileAssociation) SetState(v string) *IamInstanceProfileAssociation { - s.State = &v +// SetNoDevice sets the NoDevice field's value. +func (s *InstanceBlockDeviceMappingSpecification) SetNoDevice(v string) *InstanceBlockDeviceMappingSpecification { + s.NoDevice = &v return s } -// SetTimestamp sets the Timestamp field's value. -func (s *IamInstanceProfileAssociation) SetTimestamp(v time.Time) *IamInstanceProfileAssociation { - s.Timestamp = &v +// SetVirtualName sets the VirtualName field's value. +func (s *InstanceBlockDeviceMappingSpecification) SetVirtualName(v string) *InstanceBlockDeviceMappingSpecification { + s.VirtualName = &v return s } -// Describes an IAM instance profile. -type IamInstanceProfileSpecification struct { +// Information about the instance type that the Dedicated Host supports. +type InstanceCapacity struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the instance profile. - Arn *string `locationName:"arn" type:"string"` + // The number of instances that can still be launched onto the Dedicated Host. + AvailableCapacity *int64 `locationName:"availableCapacity" type:"integer"` - // The name of the instance profile. - Name *string `locationName:"name" type:"string"` + // The instance type size supported by the Dedicated Host. + InstanceType *string `locationName:"instanceType" type:"string"` + + // The total number of instances that can be launched onto the Dedicated Host. + TotalCapacity *int64 `locationName:"totalCapacity" type:"integer"` } // String returns the string representation -func (s IamInstanceProfileSpecification) String() string { +func (s InstanceCapacity) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s IamInstanceProfileSpecification) GoString() string { +func (s InstanceCapacity) GoString() string { return s.String() } -// SetArn sets the Arn field's value. -func (s *IamInstanceProfileSpecification) SetArn(v string) *IamInstanceProfileSpecification { - s.Arn = &v +// SetAvailableCapacity sets the AvailableCapacity field's value. +func (s *InstanceCapacity) SetAvailableCapacity(v int64) *InstanceCapacity { + s.AvailableCapacity = &v return s } -// SetName sets the Name field's value. -func (s *IamInstanceProfileSpecification) SetName(v string) *IamInstanceProfileSpecification { - s.Name = &v +// SetInstanceType sets the InstanceType field's value. +func (s *InstanceCapacity) SetInstanceType(v string) *InstanceCapacity { + s.InstanceType = &v return s } -// Describes the ICMP type and code. -type IcmpTypeCode struct { +// SetTotalCapacity sets the TotalCapacity field's value. +func (s *InstanceCapacity) SetTotalCapacity(v int64) *InstanceCapacity { + s.TotalCapacity = &v + return s +} + +// Describes a Reserved Instance listing state. +type InstanceCount struct { _ struct{} `type:"structure"` - // The ICMP code. A value of -1 means all codes for the specified ICMP type. - Code *int64 `locationName:"code" type:"integer"` + // The number of listed Reserved Instances in the state specified by the state. + InstanceCount *int64 `locationName:"instanceCount" type:"integer"` - // The ICMP type. A value of -1 means all types. - Type *int64 `locationName:"type" type:"integer"` + // The states of the listed Reserved Instances. + State *string `locationName:"state" type:"string" enum:"ListingState"` } // String returns the string representation -func (s IcmpTypeCode) String() string { +func (s InstanceCount) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s IcmpTypeCode) GoString() string { +func (s InstanceCount) GoString() string { return s.String() } -// SetCode sets the Code field's value. -func (s *IcmpTypeCode) SetCode(v int64) *IcmpTypeCode { - s.Code = &v +// SetInstanceCount sets the InstanceCount field's value. +func (s *InstanceCount) SetInstanceCount(v int64) *InstanceCount { + s.InstanceCount = &v return s } -// SetType sets the Type field's value. -func (s *IcmpTypeCode) SetType(v int64) *IcmpTypeCode { - s.Type = &v +// SetState sets the State field's value. +func (s *InstanceCount) SetState(v string) *InstanceCount { + s.State = &v return s } -// Describes the ID format for a resource. -type IdFormat struct { +// Describes the credit option for CPU usage of a T2 or T3 instance. +type InstanceCreditSpecification struct { _ struct{} `type:"structure"` - // The date in UTC at which you are permanently switched over to using longer - // IDs. If a deadline is not yet available for this resource type, this field - // is not returned. - Deadline *time.Time `locationName:"deadline" type:"timestamp"` - - // The type of resource. - Resource *string `locationName:"resource" type:"string"` + // The credit option for CPU usage of the instance. Valid values are standard + // and unlimited. + CpuCredits *string `locationName:"cpuCredits" type:"string"` - // Indicates whether longer IDs (17-character IDs) are enabled for the resource. - UseLongIds *bool `locationName:"useLongIds" type:"boolean"` + // The ID of the instance. + InstanceId *string `locationName:"instanceId" type:"string"` } // String returns the string representation -func (s IdFormat) String() string { +func (s InstanceCreditSpecification) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s IdFormat) GoString() string { +func (s InstanceCreditSpecification) GoString() string { return s.String() } -// SetDeadline sets the Deadline field's value. -func (s *IdFormat) SetDeadline(v time.Time) *IdFormat { - s.Deadline = &v - return s -} - -// SetResource sets the Resource field's value. -func (s *IdFormat) SetResource(v string) *IdFormat { - s.Resource = &v +// SetCpuCredits sets the CpuCredits field's value. +func (s *InstanceCreditSpecification) SetCpuCredits(v string) *InstanceCreditSpecification { + s.CpuCredits = &v return s } -// SetUseLongIds sets the UseLongIds field's value. -func (s *IdFormat) SetUseLongIds(v bool) *IdFormat { - s.UseLongIds = &v +// SetInstanceId sets the InstanceId field's value. +func (s *InstanceCreditSpecification) SetInstanceId(v string) *InstanceCreditSpecification { + s.InstanceId = &v return s } -// Describes an image. -type Image struct { +// Describes the credit option for CPU usage of a T2 or T3 instance. +type InstanceCreditSpecificationRequest struct { _ struct{} `type:"structure"` - // The architecture of the image. - Architecture *string `locationName:"architecture" type:"string" enum:"ArchitectureValues"` - - // Any block device mapping entries. - BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` - - // The date and time the image was created. - CreationDate *string `locationName:"creationDate" type:"string"` - - // The description of the AMI that was provided during image creation. - Description *string `locationName:"description" type:"string"` - - // Specifies whether enhanced networking with ENA is enabled. - EnaSupport *bool `locationName:"enaSupport" type:"boolean"` - - // The hypervisor type of the image. - Hypervisor *string `locationName:"hypervisor" type:"string" enum:"HypervisorType"` - - // The ID of the AMI. - ImageId *string `locationName:"imageId" type:"string"` - - // The location of the AMI. - ImageLocation *string `locationName:"imageLocation" type:"string"` - - // The AWS account alias (for example, amazon, self) or the AWS account ID of - // the AMI owner. - ImageOwnerAlias *string `locationName:"imageOwnerAlias" type:"string"` - - // The type of image. - ImageType *string `locationName:"imageType" type:"string" enum:"ImageTypeValues"` - - // The kernel associated with the image, if any. Only applicable for machine - // images. - KernelId *string `locationName:"kernelId" type:"string"` - - // The name of the AMI that was provided during image creation. - Name *string `locationName:"name" type:"string"` - - // The AWS account ID of the image owner. - OwnerId *string `locationName:"imageOwnerId" type:"string"` - - // The value is Windows for Windows AMIs; otherwise blank. - Platform *string `locationName:"platform" type:"string" enum:"PlatformValues"` - - // Any product codes associated with the AMI. - ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` - - // Indicates whether the image has public launch permissions. The value is true - // if this image has public launch permissions or false if it has only implicit - // and explicit launch permissions. - Public *bool `locationName:"isPublic" type:"boolean"` - - // The RAM disk associated with the image, if any. Only applicable for machine - // images. - RamdiskId *string `locationName:"ramdiskId" type:"string"` - - // The device name of the root device volume (for example, /dev/sda1). - RootDeviceName *string `locationName:"rootDeviceName" type:"string"` - - // The type of root device used by the AMI. The AMI can use an EBS volume or - // an instance store volume. - RootDeviceType *string `locationName:"rootDeviceType" type:"string" enum:"DeviceType"` - - // Specifies whether enhanced networking with the Intel 82599 Virtual Function - // interface is enabled. - SriovNetSupport *string `locationName:"sriovNetSupport" type:"string"` - - // The current state of the AMI. If the state is available, the image is successfully - // registered and can be used to launch an instance. - State *string `locationName:"imageState" type:"string" enum:"ImageState"` - - // The reason for the state change. - StateReason *StateReason `locationName:"stateReason" type:"structure"` - - // Any tags assigned to the image. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + // The credit option for CPU usage of the instance. Valid values are standard + // and unlimited. + CpuCredits *string `type:"string"` - // The type of virtualization of the AMI. - VirtualizationType *string `locationName:"virtualizationType" type:"string" enum:"VirtualizationType"` + // The ID of the instance. + InstanceId *string `type:"string"` } // String returns the string representation -func (s Image) String() string { +func (s InstanceCreditSpecificationRequest) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Image) GoString() string { +func (s InstanceCreditSpecificationRequest) GoString() string { return s.String() } -// SetArchitecture sets the Architecture field's value. -func (s *Image) SetArchitecture(v string) *Image { - s.Architecture = &v +// SetCpuCredits sets the CpuCredits field's value. +func (s *InstanceCreditSpecificationRequest) SetCpuCredits(v string) *InstanceCreditSpecificationRequest { + s.CpuCredits = &v return s } -// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *Image) SetBlockDeviceMappings(v []*BlockDeviceMapping) *Image { - s.BlockDeviceMappings = v +// SetInstanceId sets the InstanceId field's value. +func (s *InstanceCreditSpecificationRequest) SetInstanceId(v string) *InstanceCreditSpecificationRequest { + s.InstanceId = &v return s } -// SetCreationDate sets the CreationDate field's value. -func (s *Image) SetCreationDate(v string) *Image { - s.CreationDate = &v - return s -} +// Describes an instance to export. +type InstanceExportDetails struct { + _ struct{} `type:"structure"` -// SetDescription sets the Description field's value. -func (s *Image) SetDescription(v string) *Image { - s.Description = &v - return s -} + // The ID of the resource being exported. + InstanceId *string `locationName:"instanceId" type:"string"` -// SetEnaSupport sets the EnaSupport field's value. -func (s *Image) SetEnaSupport(v bool) *Image { - s.EnaSupport = &v - return s + // The target virtualization environment. + TargetEnvironment *string `locationName:"targetEnvironment" type:"string" enum:"ExportEnvironment"` } -// SetHypervisor sets the Hypervisor field's value. -func (s *Image) SetHypervisor(v string) *Image { - s.Hypervisor = &v - return s +// String returns the string representation +func (s InstanceExportDetails) String() string { + return awsutil.Prettify(s) } -// SetImageId sets the ImageId field's value. -func (s *Image) SetImageId(v string) *Image { - s.ImageId = &v - return s +// GoString returns the string representation +func (s InstanceExportDetails) GoString() string { + return s.String() } -// SetImageLocation sets the ImageLocation field's value. -func (s *Image) SetImageLocation(v string) *Image { - s.ImageLocation = &v +// SetInstanceId sets the InstanceId field's value. +func (s *InstanceExportDetails) SetInstanceId(v string) *InstanceExportDetails { + s.InstanceId = &v return s } -// SetImageOwnerAlias sets the ImageOwnerAlias field's value. -func (s *Image) SetImageOwnerAlias(v string) *Image { - s.ImageOwnerAlias = &v +// SetTargetEnvironment sets the TargetEnvironment field's value. +func (s *InstanceExportDetails) SetTargetEnvironment(v string) *InstanceExportDetails { + s.TargetEnvironment = &v return s } -// SetImageType sets the ImageType field's value. -func (s *Image) SetImageType(v string) *Image { - s.ImageType = &v - return s -} +// Describes an IPv6 address. +type InstanceIpv6Address struct { + _ struct{} `type:"structure"` -// SetKernelId sets the KernelId field's value. -func (s *Image) SetKernelId(v string) *Image { - s.KernelId = &v - return s + // The IPv6 address. + Ipv6Address *string `locationName:"ipv6Address" type:"string"` } -// SetName sets the Name field's value. -func (s *Image) SetName(v string) *Image { - s.Name = &v - return s +// String returns the string representation +func (s InstanceIpv6Address) String() string { + return awsutil.Prettify(s) } -// SetOwnerId sets the OwnerId field's value. -func (s *Image) SetOwnerId(v string) *Image { - s.OwnerId = &v - return s +// GoString returns the string representation +func (s InstanceIpv6Address) GoString() string { + return s.String() } -// SetPlatform sets the Platform field's value. -func (s *Image) SetPlatform(v string) *Image { - s.Platform = &v +// SetIpv6Address sets the Ipv6Address field's value. +func (s *InstanceIpv6Address) SetIpv6Address(v string) *InstanceIpv6Address { + s.Ipv6Address = &v return s } -// SetProductCodes sets the ProductCodes field's value. -func (s *Image) SetProductCodes(v []*ProductCode) *Image { - s.ProductCodes = v - return s -} +// Describes an IPv6 address. +type InstanceIpv6AddressRequest struct { + _ struct{} `type:"structure"` -// SetPublic sets the Public field's value. -func (s *Image) SetPublic(v bool) *Image { - s.Public = &v - return s + // The IPv6 address. + Ipv6Address *string `type:"string"` } -// SetRamdiskId sets the RamdiskId field's value. -func (s *Image) SetRamdiskId(v string) *Image { - s.RamdiskId = &v - return s +// String returns the string representation +func (s InstanceIpv6AddressRequest) String() string { + return awsutil.Prettify(s) } -// SetRootDeviceName sets the RootDeviceName field's value. -func (s *Image) SetRootDeviceName(v string) *Image { - s.RootDeviceName = &v - return s +// GoString returns the string representation +func (s InstanceIpv6AddressRequest) GoString() string { + return s.String() } -// SetRootDeviceType sets the RootDeviceType field's value. -func (s *Image) SetRootDeviceType(v string) *Image { - s.RootDeviceType = &v +// SetIpv6Address sets the Ipv6Address field's value. +func (s *InstanceIpv6AddressRequest) SetIpv6Address(v string) *InstanceIpv6AddressRequest { + s.Ipv6Address = &v return s } -// SetSriovNetSupport sets the SriovNetSupport field's value. -func (s *Image) SetSriovNetSupport(v string) *Image { - s.SriovNetSupport = &v - return s +// Describes the market (purchasing) option for the instances. +type InstanceMarketOptionsRequest struct { + _ struct{} `type:"structure"` + + // The market type. + MarketType *string `type:"string" enum:"MarketType"` + + // The options for Spot Instances. + SpotOptions *SpotMarketOptions `type:"structure"` } -// SetState sets the State field's value. -func (s *Image) SetState(v string) *Image { - s.State = &v - return s +// String returns the string representation +func (s InstanceMarketOptionsRequest) String() string { + return awsutil.Prettify(s) } -// SetStateReason sets the StateReason field's value. -func (s *Image) SetStateReason(v *StateReason) *Image { - s.StateReason = v - return s +// GoString returns the string representation +func (s InstanceMarketOptionsRequest) GoString() string { + return s.String() } -// SetTags sets the Tags field's value. -func (s *Image) SetTags(v []*Tag) *Image { - s.Tags = v +// SetMarketType sets the MarketType field's value. +func (s *InstanceMarketOptionsRequest) SetMarketType(v string) *InstanceMarketOptionsRequest { + s.MarketType = &v return s } -// SetVirtualizationType sets the VirtualizationType field's value. -func (s *Image) SetVirtualizationType(v string) *Image { - s.VirtualizationType = &v +// SetSpotOptions sets the SpotOptions field's value. +func (s *InstanceMarketOptionsRequest) SetSpotOptions(v *SpotMarketOptions) *InstanceMarketOptionsRequest { + s.SpotOptions = v return s } -// Describes the disk container object for an import image task. -type ImageDiskContainer struct { +// Describes the monitoring of an instance. +type InstanceMonitoring struct { _ struct{} `type:"structure"` - // The description of the disk image. - Description *string `type:"string"` - - // The block device mapping for the disk. - DeviceName *string `type:"string"` - - // The format of the disk image being imported. - // - // Valid values: VHD | VMDK | OVA - Format *string `type:"string"` - - // The ID of the EBS snapshot to be used for importing the snapshot. - SnapshotId *string `type:"string"` - - // The URL to the Amazon S3-based disk image being imported. The URL can either - // be a https URL (https://..) or an Amazon S3 URL (s3://..) - Url *string `type:"string"` + // The ID of the instance. + InstanceId *string `locationName:"instanceId" type:"string"` - // The S3 bucket for the disk image. - UserBucket *UserBucket `type:"structure"` + // The monitoring for the instance. + Monitoring *Monitoring `locationName:"monitoring" type:"structure"` } // String returns the string representation -func (s ImageDiskContainer) String() string { +func (s InstanceMonitoring) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ImageDiskContainer) GoString() string { +func (s InstanceMonitoring) GoString() string { return s.String() } -// SetDescription sets the Description field's value. -func (s *ImageDiskContainer) SetDescription(v string) *ImageDiskContainer { - s.Description = &v +// SetInstanceId sets the InstanceId field's value. +func (s *InstanceMonitoring) SetInstanceId(v string) *InstanceMonitoring { + s.InstanceId = &v return s } -// SetDeviceName sets the DeviceName field's value. -func (s *ImageDiskContainer) SetDeviceName(v string) *ImageDiskContainer { - s.DeviceName = &v +// SetMonitoring sets the Monitoring field's value. +func (s *InstanceMonitoring) SetMonitoring(v *Monitoring) *InstanceMonitoring { + s.Monitoring = v return s } -// SetFormat sets the Format field's value. -func (s *ImageDiskContainer) SetFormat(v string) *ImageDiskContainer { - s.Format = &v - return s -} +// Describes a network interface. +type InstanceNetworkInterface struct { + _ struct{} `type:"structure"` -// SetSnapshotId sets the SnapshotId field's value. -func (s *ImageDiskContainer) SetSnapshotId(v string) *ImageDiskContainer { - s.SnapshotId = &v - return s -} + // The association information for an Elastic IPv4 associated with the network + // interface. + Association *InstanceNetworkInterfaceAssociation `locationName:"association" type:"structure"` -// SetUrl sets the Url field's value. -func (s *ImageDiskContainer) SetUrl(v string) *ImageDiskContainer { - s.Url = &v - return s -} + // The network interface attachment. + Attachment *InstanceNetworkInterfaceAttachment `locationName:"attachment" type:"structure"` -// SetUserBucket sets the UserBucket field's value. -func (s *ImageDiskContainer) SetUserBucket(v *UserBucket) *ImageDiskContainer { - s.UserBucket = v - return s -} + // The description. + Description *string `locationName:"description" type:"string"` -// Contains the parameters for ImportImage. -type ImportImageInput struct { - _ struct{} `type:"structure"` + // One or more security groups. + Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` - // The architecture of the virtual machine. - // - // Valid values: i386 | x86_64 - Architecture *string `type:"string"` + // One or more IPv6 addresses associated with the network interface. + Ipv6Addresses []*InstanceIpv6Address `locationName:"ipv6AddressesSet" locationNameList:"item" type:"list"` - // The client-specific data. - ClientData *ClientData `type:"structure"` + // The MAC address. + MacAddress *string `locationName:"macAddress" type:"string"` - // The token to enable idempotency for VM import requests. - ClientToken *string `type:"string"` + // The ID of the network interface. + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` - // A description string for the import image task. - Description *string `type:"string"` + // The ID of the AWS account that created the network interface. + OwnerId *string `locationName:"ownerId" type:"string"` - // Information about the disk containers. - DiskContainers []*ImageDiskContainer `locationName:"DiskContainer" locationNameList:"item" type:"list"` + // The private DNS name. + PrivateDnsName *string `locationName:"privateDnsName" 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 IPv4 address of the network interface within the subnet. + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` - // The target hypervisor platform. - // - // Valid values: xen - Hypervisor *string `type:"string"` + // One or more private IPv4 addresses associated with the network interface. + PrivateIpAddresses []*InstancePrivateIpAddress `locationName:"privateIpAddressesSet" locationNameList:"item" type:"list"` - // The license type to be used for the Amazon Machine Image (AMI) after importing. - // - // Note: You may only use BYOL if you have existing licenses with rights to - // use these licenses in a third party cloud like AWS. For more information, - // see Prerequisites (http://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html#prerequisites-image) - // in the VM Import/Export User Guide. - // - // Valid values: AWS | BYOL - LicenseType *string `type:"string"` + // Indicates whether to validate network traffic to or from this network interface. + SourceDestCheck *bool `locationName:"sourceDestCheck" type:"boolean"` - // The operating system of the virtual machine. - // - // Valid values: Windows | Linux - Platform *string `type:"string"` + // The status of the network interface. + Status *string `locationName:"status" type:"string" enum:"NetworkInterfaceStatus"` - // The name of the role to use when not using the default role, 'vmimport'. - RoleName *string `type:"string"` + // The ID of the subnet. + SubnetId *string `locationName:"subnetId" type:"string"` + + // The ID of the VPC. + VpcId *string `locationName:"vpcId" type:"string"` } // String returns the string representation -func (s ImportImageInput) String() string { +func (s InstanceNetworkInterface) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ImportImageInput) GoString() string { +func (s InstanceNetworkInterface) GoString() string { return s.String() } -// SetArchitecture sets the Architecture field's value. -func (s *ImportImageInput) SetArchitecture(v string) *ImportImageInput { - s.Architecture = &v - return s -} - -// SetClientData sets the ClientData field's value. -func (s *ImportImageInput) SetClientData(v *ClientData) *ImportImageInput { - s.ClientData = v +// SetAssociation sets the Association field's value. +func (s *InstanceNetworkInterface) SetAssociation(v *InstanceNetworkInterfaceAssociation) *InstanceNetworkInterface { + s.Association = v return s } -// SetClientToken sets the ClientToken field's value. -func (s *ImportImageInput) SetClientToken(v string) *ImportImageInput { - s.ClientToken = &v +// SetAttachment sets the Attachment field's value. +func (s *InstanceNetworkInterface) SetAttachment(v *InstanceNetworkInterfaceAttachment) *InstanceNetworkInterface { + s.Attachment = v return s } // SetDescription sets the Description field's value. -func (s *ImportImageInput) SetDescription(v string) *ImportImageInput { +func (s *InstanceNetworkInterface) SetDescription(v string) *InstanceNetworkInterface { s.Description = &v return s } -// SetDiskContainers sets the DiskContainers field's value. -func (s *ImportImageInput) SetDiskContainers(v []*ImageDiskContainer) *ImportImageInput { - s.DiskContainers = v +// SetGroups sets the Groups field's value. +func (s *InstanceNetworkInterface) SetGroups(v []*GroupIdentifier) *InstanceNetworkInterface { + s.Groups = v return s } -// SetDryRun sets the DryRun field's value. -func (s *ImportImageInput) SetDryRun(v bool) *ImportImageInput { - s.DryRun = &v +// SetIpv6Addresses sets the Ipv6Addresses field's value. +func (s *InstanceNetworkInterface) SetIpv6Addresses(v []*InstanceIpv6Address) *InstanceNetworkInterface { + s.Ipv6Addresses = v return s } -// SetHypervisor sets the Hypervisor field's value. -func (s *ImportImageInput) SetHypervisor(v string) *ImportImageInput { - s.Hypervisor = &v +// SetMacAddress sets the MacAddress field's value. +func (s *InstanceNetworkInterface) SetMacAddress(v string) *InstanceNetworkInterface { + s.MacAddress = &v return s } -// SetLicenseType sets the LicenseType field's value. -func (s *ImportImageInput) SetLicenseType(v string) *ImportImageInput { - s.LicenseType = &v +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *InstanceNetworkInterface) SetNetworkInterfaceId(v string) *InstanceNetworkInterface { + s.NetworkInterfaceId = &v return s } -// SetPlatform sets the Platform field's value. -func (s *ImportImageInput) SetPlatform(v string) *ImportImageInput { - s.Platform = &v +// SetOwnerId sets the OwnerId field's value. +func (s *InstanceNetworkInterface) SetOwnerId(v string) *InstanceNetworkInterface { + s.OwnerId = &v return s } -// SetRoleName sets the RoleName field's value. -func (s *ImportImageInput) SetRoleName(v string) *ImportImageInput { - s.RoleName = &v +// SetPrivateDnsName sets the PrivateDnsName field's value. +func (s *InstanceNetworkInterface) SetPrivateDnsName(v string) *InstanceNetworkInterface { + s.PrivateDnsName = &v return s } -// Contains the output for ImportImage. -type ImportImageOutput struct { - _ struct{} `type:"structure"` - - // The architecture of the virtual machine. - Architecture *string `locationName:"architecture" type:"string"` - - // A description of the import task. - Description *string `locationName:"description" type:"string"` +// SetPrivateIpAddress sets the PrivateIpAddress field's value. +func (s *InstanceNetworkInterface) SetPrivateIpAddress(v string) *InstanceNetworkInterface { + s.PrivateIpAddress = &v + return s +} - // The target hypervisor of the import task. - Hypervisor *string `locationName:"hypervisor" type:"string"` +// SetPrivateIpAddresses sets the PrivateIpAddresses field's value. +func (s *InstanceNetworkInterface) SetPrivateIpAddresses(v []*InstancePrivateIpAddress) *InstanceNetworkInterface { + s.PrivateIpAddresses = v + return s +} - // The ID of the Amazon Machine Image (AMI) created by the import task. - ImageId *string `locationName:"imageId" type:"string"` +// SetSourceDestCheck sets the SourceDestCheck field's value. +func (s *InstanceNetworkInterface) SetSourceDestCheck(v bool) *InstanceNetworkInterface { + s.SourceDestCheck = &v + return s +} - // The task ID of the import image task. - ImportTaskId *string `locationName:"importTaskId" type:"string"` +// SetStatus sets the Status field's value. +func (s *InstanceNetworkInterface) SetStatus(v string) *InstanceNetworkInterface { + s.Status = &v + return s +} - // The license type of the virtual machine. - LicenseType *string `locationName:"licenseType" type:"string"` +// SetSubnetId sets the SubnetId field's value. +func (s *InstanceNetworkInterface) SetSubnetId(v string) *InstanceNetworkInterface { + s.SubnetId = &v + return s +} - // The operating system of the virtual machine. - Platform *string `locationName:"platform" type:"string"` +// SetVpcId sets the VpcId field's value. +func (s *InstanceNetworkInterface) SetVpcId(v string) *InstanceNetworkInterface { + s.VpcId = &v + return s +} - // The progress of the task. - Progress *string `locationName:"progress" type:"string"` +// Describes association information for an Elastic IP address (IPv4). +type InstanceNetworkInterfaceAssociation struct { + _ struct{} `type:"structure"` - // Information about the snapshots. - SnapshotDetails []*SnapshotDetail `locationName:"snapshotDetailSet" locationNameList:"item" type:"list"` + // The ID of the owner of the Elastic IP address. + IpOwnerId *string `locationName:"ipOwnerId" type:"string"` - // A brief status of the task. - Status *string `locationName:"status" type:"string"` + // The public DNS name. + PublicDnsName *string `locationName:"publicDnsName" type:"string"` - // A detailed status message of the import task. - StatusMessage *string `locationName:"statusMessage" type:"string"` + // The public IP address or Elastic IP address bound to the network interface. + PublicIp *string `locationName:"publicIp" type:"string"` } // String returns the string representation -func (s ImportImageOutput) String() string { +func (s InstanceNetworkInterfaceAssociation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ImportImageOutput) GoString() string { +func (s InstanceNetworkInterfaceAssociation) GoString() string { return s.String() } -// SetArchitecture sets the Architecture field's value. -func (s *ImportImageOutput) SetArchitecture(v string) *ImportImageOutput { - s.Architecture = &v +// SetIpOwnerId sets the IpOwnerId field's value. +func (s *InstanceNetworkInterfaceAssociation) SetIpOwnerId(v string) *InstanceNetworkInterfaceAssociation { + s.IpOwnerId = &v return s } -// SetDescription sets the Description field's value. -func (s *ImportImageOutput) SetDescription(v string) *ImportImageOutput { - s.Description = &v +// SetPublicDnsName sets the PublicDnsName field's value. +func (s *InstanceNetworkInterfaceAssociation) SetPublicDnsName(v string) *InstanceNetworkInterfaceAssociation { + s.PublicDnsName = &v return s } -// SetHypervisor sets the Hypervisor field's value. -func (s *ImportImageOutput) SetHypervisor(v string) *ImportImageOutput { - s.Hypervisor = &v +// SetPublicIp sets the PublicIp field's value. +func (s *InstanceNetworkInterfaceAssociation) SetPublicIp(v string) *InstanceNetworkInterfaceAssociation { + s.PublicIp = &v return s } -// SetImageId sets the ImageId field's value. -func (s *ImportImageOutput) SetImageId(v string) *ImportImageOutput { - s.ImageId = &v - return s +// Describes a network interface attachment. +type InstanceNetworkInterfaceAttachment struct { + _ struct{} `type:"structure"` + + // The time stamp when the attachment initiated. + AttachTime *time.Time `locationName:"attachTime" type:"timestamp"` + + // The ID of the network interface attachment. + AttachmentId *string `locationName:"attachmentId" type:"string"` + + // Indicates whether the network interface is deleted when the instance is terminated. + DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` + + // The index of the device on the instance for the network interface attachment. + DeviceIndex *int64 `locationName:"deviceIndex" type:"integer"` + + // The attachment state. + Status *string `locationName:"status" type:"string" enum:"AttachmentStatus"` } -// SetImportTaskId sets the ImportTaskId field's value. -func (s *ImportImageOutput) SetImportTaskId(v string) *ImportImageOutput { - s.ImportTaskId = &v - return s +// String returns the string representation +func (s InstanceNetworkInterfaceAttachment) String() string { + return awsutil.Prettify(s) } -// SetLicenseType sets the LicenseType field's value. -func (s *ImportImageOutput) SetLicenseType(v string) *ImportImageOutput { - s.LicenseType = &v - return s +// GoString returns the string representation +func (s InstanceNetworkInterfaceAttachment) GoString() string { + return s.String() } -// SetPlatform sets the Platform field's value. -func (s *ImportImageOutput) SetPlatform(v string) *ImportImageOutput { - s.Platform = &v +// SetAttachTime sets the AttachTime field's value. +func (s *InstanceNetworkInterfaceAttachment) SetAttachTime(v time.Time) *InstanceNetworkInterfaceAttachment { + s.AttachTime = &v return s } -// SetProgress sets the Progress field's value. -func (s *ImportImageOutput) SetProgress(v string) *ImportImageOutput { - s.Progress = &v +// SetAttachmentId sets the AttachmentId field's value. +func (s *InstanceNetworkInterfaceAttachment) SetAttachmentId(v string) *InstanceNetworkInterfaceAttachment { + s.AttachmentId = &v return s } -// SetSnapshotDetails sets the SnapshotDetails field's value. -func (s *ImportImageOutput) SetSnapshotDetails(v []*SnapshotDetail) *ImportImageOutput { - s.SnapshotDetails = v +// SetDeleteOnTermination sets the DeleteOnTermination field's value. +func (s *InstanceNetworkInterfaceAttachment) SetDeleteOnTermination(v bool) *InstanceNetworkInterfaceAttachment { + s.DeleteOnTermination = &v return s } -// SetStatus sets the Status field's value. -func (s *ImportImageOutput) SetStatus(v string) *ImportImageOutput { - s.Status = &v +// SetDeviceIndex sets the DeviceIndex field's value. +func (s *InstanceNetworkInterfaceAttachment) SetDeviceIndex(v int64) *InstanceNetworkInterfaceAttachment { + s.DeviceIndex = &v return s } -// SetStatusMessage sets the StatusMessage field's value. -func (s *ImportImageOutput) SetStatusMessage(v string) *ImportImageOutput { - s.StatusMessage = &v +// SetStatus sets the Status field's value. +func (s *InstanceNetworkInterfaceAttachment) SetStatus(v string) *InstanceNetworkInterfaceAttachment { + s.Status = &v return s } -// Describes an import image task. -type ImportImageTask struct { +// Describes a network interface. +type InstanceNetworkInterfaceSpecification struct { _ struct{} `type:"structure"` - // The architecture of the virtual machine. - // - // Valid values: i386 | x86_64 - Architecture *string `locationName:"architecture" type:"string"` + // Indicates whether to assign a public IPv4 address to an instance you launch + // in a VPC. The public IP address can only be assigned to a network interface + // for eth0, and can only be assigned to a new network interface, not an existing + // one. You cannot specify more than one network interface in the request. If + // launching into a default subnet, the default value is true. + AssociatePublicIpAddress *bool `locationName:"associatePublicIpAddress" type:"boolean"` - // A description of the import task. + // If set to true, the interface is deleted when the instance is terminated. + // You can specify true only if creating a new network interface when launching + // an instance. + DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` + + // The description of the network interface. Applies only if creating a network + // interface when launching an instance. Description *string `locationName:"description" type:"string"` - // The target hypervisor for the import task. - // - // Valid values: xen - Hypervisor *string `locationName:"hypervisor" type:"string"` + // The index of the device on the instance for the network interface attachment. + // If you are specifying a network interface in a RunInstances request, you + // must provide the device index. + DeviceIndex *int64 `locationName:"deviceIndex" type:"integer"` - // The ID of the Amazon Machine Image (AMI) of the imported virtual machine. - ImageId *string `locationName:"imageId" type:"string"` + // The IDs of the security groups for the network interface. Applies only if + // creating a network interface when launching an instance. + Groups []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"` - // The ID of the import image task. - ImportTaskId *string `locationName:"importTaskId" type:"string"` + // A number of IPv6 addresses to assign to the network interface. Amazon EC2 + // chooses the IPv6 addresses from the range of the subnet. You cannot specify + // this option and the option to assign specific IPv6 addresses in the same + // request. You can specify this option if you've specified a minimum number + // of instances to launch. + Ipv6AddressCount *int64 `locationName:"ipv6AddressCount" type:"integer"` - // The license type of the virtual machine. - LicenseType *string `locationName:"licenseType" type:"string"` + // One or more IPv6 addresses to assign to the network interface. You cannot + // specify this option and the option to assign a number of IPv6 addresses in + // the same request. You cannot specify this option if you've specified a minimum + // number of instances to launch. + Ipv6Addresses []*InstanceIpv6Address `locationName:"ipv6AddressesSet" queryName:"Ipv6Addresses" locationNameList:"item" type:"list"` - // The description string for the import image task. - Platform *string `locationName:"platform" type:"string"` + // The ID of the network interface. + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` - // The percentage of progress of the import image task. - Progress *string `locationName:"progress" type:"string"` + // The private IPv4 address of the network interface. Applies only if creating + // a network interface when launching an instance. You cannot specify this option + // if you're launching more than one instance in a RunInstances request. + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` - // Information about the snapshots. - SnapshotDetails []*SnapshotDetail `locationName:"snapshotDetailSet" locationNameList:"item" type:"list"` + // One or more private IPv4 addresses to assign to the network interface. Only + // one private IPv4 address can be designated as primary. You cannot specify + // this option if you're launching more than one instance in a RunInstances + // request. + PrivateIpAddresses []*PrivateIpAddressSpecification `locationName:"privateIpAddressesSet" queryName:"PrivateIpAddresses" locationNameList:"item" type:"list"` - // A brief status for the import image task. - Status *string `locationName:"status" type:"string"` + // The number of secondary private IPv4 addresses. You can't specify this option + // and specify more than one private IP address using the private IP addresses + // option. You cannot specify this option if you're launching more than one + // instance in a RunInstances request. + SecondaryPrivateIpAddressCount *int64 `locationName:"secondaryPrivateIpAddressCount" type:"integer"` - // A descriptive status message for the import image task. - StatusMessage *string `locationName:"statusMessage" type:"string"` + // The ID of the subnet associated with the network string. Applies only if + // creating a network interface when launching an instance. + SubnetId *string `locationName:"subnetId" type:"string"` } // String returns the string representation -func (s ImportImageTask) String() string { +func (s InstanceNetworkInterfaceSpecification) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ImportImageTask) GoString() string { +func (s InstanceNetworkInterfaceSpecification) GoString() string { return s.String() } -// SetArchitecture sets the Architecture field's value. -func (s *ImportImageTask) SetArchitecture(v string) *ImportImageTask { - s.Architecture = &v +// SetAssociatePublicIpAddress sets the AssociatePublicIpAddress field's value. +func (s *InstanceNetworkInterfaceSpecification) SetAssociatePublicIpAddress(v bool) *InstanceNetworkInterfaceSpecification { + s.AssociatePublicIpAddress = &v + return s +} + +// SetDeleteOnTermination sets the DeleteOnTermination field's value. +func (s *InstanceNetworkInterfaceSpecification) SetDeleteOnTermination(v bool) *InstanceNetworkInterfaceSpecification { + s.DeleteOnTermination = &v return s } // SetDescription sets the Description field's value. -func (s *ImportImageTask) SetDescription(v string) *ImportImageTask { +func (s *InstanceNetworkInterfaceSpecification) SetDescription(v string) *InstanceNetworkInterfaceSpecification { s.Description = &v return s } -// SetHypervisor sets the Hypervisor field's value. -func (s *ImportImageTask) SetHypervisor(v string) *ImportImageTask { - s.Hypervisor = &v +// SetDeviceIndex sets the DeviceIndex field's value. +func (s *InstanceNetworkInterfaceSpecification) SetDeviceIndex(v int64) *InstanceNetworkInterfaceSpecification { + s.DeviceIndex = &v return s } -// SetImageId sets the ImageId field's value. -func (s *ImportImageTask) SetImageId(v string) *ImportImageTask { - s.ImageId = &v +// SetGroups sets the Groups field's value. +func (s *InstanceNetworkInterfaceSpecification) SetGroups(v []*string) *InstanceNetworkInterfaceSpecification { + s.Groups = v return s } -// SetImportTaskId sets the ImportTaskId field's value. -func (s *ImportImageTask) SetImportTaskId(v string) *ImportImageTask { - s.ImportTaskId = &v +// SetIpv6AddressCount sets the Ipv6AddressCount field's value. +func (s *InstanceNetworkInterfaceSpecification) SetIpv6AddressCount(v int64) *InstanceNetworkInterfaceSpecification { + s.Ipv6AddressCount = &v return s } -// SetLicenseType sets the LicenseType field's value. -func (s *ImportImageTask) SetLicenseType(v string) *ImportImageTask { - s.LicenseType = &v +// SetIpv6Addresses sets the Ipv6Addresses field's value. +func (s *InstanceNetworkInterfaceSpecification) SetIpv6Addresses(v []*InstanceIpv6Address) *InstanceNetworkInterfaceSpecification { + s.Ipv6Addresses = v return s } -// SetPlatform sets the Platform field's value. -func (s *ImportImageTask) SetPlatform(v string) *ImportImageTask { - s.Platform = &v +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *InstanceNetworkInterfaceSpecification) SetNetworkInterfaceId(v string) *InstanceNetworkInterfaceSpecification { + s.NetworkInterfaceId = &v return s } -// SetProgress sets the Progress field's value. -func (s *ImportImageTask) SetProgress(v string) *ImportImageTask { - s.Progress = &v +// SetPrivateIpAddress sets the PrivateIpAddress field's value. +func (s *InstanceNetworkInterfaceSpecification) SetPrivateIpAddress(v string) *InstanceNetworkInterfaceSpecification { + s.PrivateIpAddress = &v return s } -// SetSnapshotDetails sets the SnapshotDetails field's value. -func (s *ImportImageTask) SetSnapshotDetails(v []*SnapshotDetail) *ImportImageTask { - s.SnapshotDetails = v +// SetPrivateIpAddresses sets the PrivateIpAddresses field's value. +func (s *InstanceNetworkInterfaceSpecification) SetPrivateIpAddresses(v []*PrivateIpAddressSpecification) *InstanceNetworkInterfaceSpecification { + s.PrivateIpAddresses = v return s } -// SetStatus sets the Status field's value. -func (s *ImportImageTask) SetStatus(v string) *ImportImageTask { - s.Status = &v +// SetSecondaryPrivateIpAddressCount sets the SecondaryPrivateIpAddressCount field's value. +func (s *InstanceNetworkInterfaceSpecification) SetSecondaryPrivateIpAddressCount(v int64) *InstanceNetworkInterfaceSpecification { + s.SecondaryPrivateIpAddressCount = &v return s } -// SetStatusMessage sets the StatusMessage field's value. -func (s *ImportImageTask) SetStatusMessage(v string) *ImportImageTask { - s.StatusMessage = &v +// SetSubnetId sets the SubnetId field's value. +func (s *InstanceNetworkInterfaceSpecification) SetSubnetId(v string) *InstanceNetworkInterfaceSpecification { + s.SubnetId = &v return s } -// Contains the parameters for ImportInstance. -type ImportInstanceInput struct { +// Describes a private IPv4 address. +type InstancePrivateIpAddress struct { _ struct{} `type:"structure"` - // A description for the instance being imported. - Description *string `locationName:"description" type:"string"` - - // The disk image. - DiskImages []*DiskImage `locationName:"diskImage" type:"list"` + // The association information for an Elastic IP address for the network interface. + Association *InstanceNetworkInterfaceAssociation `locationName:"association" 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 `locationName:"dryRun" type:"boolean"` + // Indicates whether this IPv4 address is the primary private IP address of + // the network interface. + Primary *bool `locationName:"primary" type:"boolean"` - // The launch specification. - LaunchSpecification *ImportInstanceLaunchSpecification `locationName:"launchSpecification" type:"structure"` + // The private IPv4 DNS name. + PrivateDnsName *string `locationName:"privateDnsName" type:"string"` - // The instance operating system. - // - // Platform is a required field - Platform *string `locationName:"platform" type:"string" required:"true" enum:"PlatformValues"` + // The private IPv4 address of the network interface. + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` } // String returns the string representation -func (s ImportInstanceInput) String() string { +func (s InstancePrivateIpAddress) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ImportInstanceInput) GoString() string { +func (s InstancePrivateIpAddress) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *ImportInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ImportInstanceInput"} - if s.Platform == nil { - invalidParams.Add(request.NewErrParamRequired("Platform")) - } - if s.DiskImages != nil { - for i, v := range s.DiskImages { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DiskImages", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDescription sets the Description field's value. -func (s *ImportInstanceInput) SetDescription(v string) *ImportInstanceInput { - s.Description = &v - return s -} - -// SetDiskImages sets the DiskImages field's value. -func (s *ImportInstanceInput) SetDiskImages(v []*DiskImage) *ImportInstanceInput { - s.DiskImages = v +// SetAssociation sets the Association field's value. +func (s *InstancePrivateIpAddress) SetAssociation(v *InstanceNetworkInterfaceAssociation) *InstancePrivateIpAddress { + s.Association = v return s } -// SetDryRun sets the DryRun field's value. -func (s *ImportInstanceInput) SetDryRun(v bool) *ImportInstanceInput { - s.DryRun = &v +// SetPrimary sets the Primary field's value. +func (s *InstancePrivateIpAddress) SetPrimary(v bool) *InstancePrivateIpAddress { + s.Primary = &v return s } -// SetLaunchSpecification sets the LaunchSpecification field's value. -func (s *ImportInstanceInput) SetLaunchSpecification(v *ImportInstanceLaunchSpecification) *ImportInstanceInput { - s.LaunchSpecification = v +// SetPrivateDnsName sets the PrivateDnsName field's value. +func (s *InstancePrivateIpAddress) SetPrivateDnsName(v string) *InstancePrivateIpAddress { + s.PrivateDnsName = &v return s } -// SetPlatform sets the Platform field's value. -func (s *ImportInstanceInput) SetPlatform(v string) *ImportInstanceInput { - s.Platform = &v +// SetPrivateIpAddress sets the PrivateIpAddress field's value. +func (s *InstancePrivateIpAddress) SetPrivateIpAddress(v string) *InstancePrivateIpAddress { + s.PrivateIpAddress = &v return s } -// Describes the launch specification for VM import. -type ImportInstanceLaunchSpecification struct { +// Describes the current state of an instance. +type InstanceState struct { _ struct{} `type:"structure"` - // Reserved. - AdditionalInfo *string `locationName:"additionalInfo" type:"string"` - - // The architecture of the instance. - Architecture *string `locationName:"architecture" type:"string" enum:"ArchitectureValues"` + // The low byte represents the state. The high byte is used for internal purposes + // and should be ignored. + // + // * 0 : pending + // + // * 16 : running + // + // * 32 : shutting-down + // + // * 48 : terminated + // + // * 64 : stopping + // + // * 80 : stopped + Code *int64 `locationName:"code" type:"integer"` - // One or more security group IDs. - GroupIds []*string `locationName:"GroupId" locationNameList:"SecurityGroupId" type:"list"` + // The current state of the instance. + Name *string `locationName:"name" type:"string" enum:"InstanceStateName"` +} - // One or more security group names. - GroupNames []*string `locationName:"GroupName" locationNameList:"SecurityGroup" type:"list"` +// String returns the string representation +func (s InstanceState) String() string { + return awsutil.Prettify(s) +} - // Indicates whether an instance stops or terminates when you initiate shutdown - // from the instance (using the operating system command for system shutdown). - InstanceInitiatedShutdownBehavior *string `locationName:"instanceInitiatedShutdownBehavior" type:"string" enum:"ShutdownBehavior"` +// GoString returns the string representation +func (s InstanceState) GoString() string { + return s.String() +} - // The instance type. For more information about the instance types that you - // can import, see Instance Types (http://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html#vmimport-instance-types) - // in the VM Import/Export User Guide. - InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` +// SetCode sets the Code field's value. +func (s *InstanceState) SetCode(v int64) *InstanceState { + s.Code = &v + return s +} - // Indicates whether monitoring is enabled. - Monitoring *bool `locationName:"monitoring" type:"boolean"` +// SetName sets the Name field's value. +func (s *InstanceState) SetName(v string) *InstanceState { + s.Name = &v + return s +} - // The placement information for the instance. - Placement *Placement `locationName:"placement" type:"structure"` +// Describes an instance state change. +type InstanceStateChange struct { + _ struct{} `type:"structure"` - // [EC2-VPC] An available IP address from the IP address range of the subnet. - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` + // The current state of the instance. + CurrentState *InstanceState `locationName:"currentState" type:"structure"` - // [EC2-VPC] The ID of the subnet in which to launch the instance. - SubnetId *string `locationName:"subnetId" type:"string"` + // The ID of the instance. + InstanceId *string `locationName:"instanceId" type:"string"` - // The Base64-encoded user data to make available to the instance. - UserData *UserData `locationName:"userData" type:"structure"` + // The previous state of the instance. + PreviousState *InstanceState `locationName:"previousState" type:"structure"` } // String returns the string representation -func (s ImportInstanceLaunchSpecification) String() string { +func (s InstanceStateChange) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ImportInstanceLaunchSpecification) GoString() string { +func (s InstanceStateChange) GoString() string { return s.String() } -// SetAdditionalInfo sets the AdditionalInfo field's value. -func (s *ImportInstanceLaunchSpecification) SetAdditionalInfo(v string) *ImportInstanceLaunchSpecification { - s.AdditionalInfo = &v +// SetCurrentState sets the CurrentState field's value. +func (s *InstanceStateChange) SetCurrentState(v *InstanceState) *InstanceStateChange { + s.CurrentState = v return s } -// SetArchitecture sets the Architecture field's value. -func (s *ImportInstanceLaunchSpecification) SetArchitecture(v string) *ImportInstanceLaunchSpecification { - s.Architecture = &v +// SetInstanceId sets the InstanceId field's value. +func (s *InstanceStateChange) SetInstanceId(v string) *InstanceStateChange { + s.InstanceId = &v return s } -// SetGroupIds sets the GroupIds field's value. -func (s *ImportInstanceLaunchSpecification) SetGroupIds(v []*string) *ImportInstanceLaunchSpecification { - s.GroupIds = v +// SetPreviousState sets the PreviousState field's value. +func (s *InstanceStateChange) SetPreviousState(v *InstanceState) *InstanceStateChange { + s.PreviousState = v return s } -// SetGroupNames sets the GroupNames field's value. -func (s *ImportInstanceLaunchSpecification) SetGroupNames(v []*string) *ImportInstanceLaunchSpecification { - s.GroupNames = v - return s +// Describes the status of an instance. +type InstanceStatus struct { + _ struct{} `type:"structure"` + + // The Availability Zone of the instance. + AvailabilityZone *string `locationName:"availabilityZone" type:"string"` + + // Any scheduled events associated with the instance. + Events []*InstanceStatusEvent `locationName:"eventsSet" locationNameList:"item" type:"list"` + + // The ID of the instance. + InstanceId *string `locationName:"instanceId" type:"string"` + + // The intended state of the instance. DescribeInstanceStatus requires that + // an instance be in the running state. + InstanceState *InstanceState `locationName:"instanceState" type:"structure"` + + // Reports impaired functionality that stems from issues internal to the instance, + // such as impaired reachability. + InstanceStatus *InstanceStatusSummary `locationName:"instanceStatus" type:"structure"` + + // Reports impaired functionality that stems from issues related to the systems + // that support an instance, such as hardware failures and network connectivity + // problems. + SystemStatus *InstanceStatusSummary `locationName:"systemStatus" type:"structure"` } -// SetInstanceInitiatedShutdownBehavior sets the InstanceInitiatedShutdownBehavior field's value. -func (s *ImportInstanceLaunchSpecification) SetInstanceInitiatedShutdownBehavior(v string) *ImportInstanceLaunchSpecification { - s.InstanceInitiatedShutdownBehavior = &v - return s +// String returns the string representation +func (s InstanceStatus) String() string { + return awsutil.Prettify(s) } -// SetInstanceType sets the InstanceType field's value. -func (s *ImportInstanceLaunchSpecification) SetInstanceType(v string) *ImportInstanceLaunchSpecification { - s.InstanceType = &v +// GoString returns the string representation +func (s InstanceStatus) GoString() string { + return s.String() +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *InstanceStatus) SetAvailabilityZone(v string) *InstanceStatus { + s.AvailabilityZone = &v return s } -// SetMonitoring sets the Monitoring field's value. -func (s *ImportInstanceLaunchSpecification) SetMonitoring(v bool) *ImportInstanceLaunchSpecification { - s.Monitoring = &v +// SetEvents sets the Events field's value. +func (s *InstanceStatus) SetEvents(v []*InstanceStatusEvent) *InstanceStatus { + s.Events = v return s } -// SetPlacement sets the Placement field's value. -func (s *ImportInstanceLaunchSpecification) SetPlacement(v *Placement) *ImportInstanceLaunchSpecification { - s.Placement = v +// SetInstanceId sets the InstanceId field's value. +func (s *InstanceStatus) SetInstanceId(v string) *InstanceStatus { + s.InstanceId = &v return s } -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *ImportInstanceLaunchSpecification) SetPrivateIpAddress(v string) *ImportInstanceLaunchSpecification { - s.PrivateIpAddress = &v +// SetInstanceState sets the InstanceState field's value. +func (s *InstanceStatus) SetInstanceState(v *InstanceState) *InstanceStatus { + s.InstanceState = v return s } -// SetSubnetId sets the SubnetId field's value. -func (s *ImportInstanceLaunchSpecification) SetSubnetId(v string) *ImportInstanceLaunchSpecification { - s.SubnetId = &v +// SetInstanceStatus sets the InstanceStatus field's value. +func (s *InstanceStatus) SetInstanceStatus(v *InstanceStatusSummary) *InstanceStatus { + s.InstanceStatus = v return s } -// SetUserData sets the UserData field's value. -func (s *ImportInstanceLaunchSpecification) SetUserData(v *UserData) *ImportInstanceLaunchSpecification { - s.UserData = v +// SetSystemStatus sets the SystemStatus field's value. +func (s *InstanceStatus) SetSystemStatus(v *InstanceStatusSummary) *InstanceStatus { + s.SystemStatus = v return s } -// Contains the output for ImportInstance. -type ImportInstanceOutput struct { +// Describes the instance status. +type InstanceStatusDetails struct { _ struct{} `type:"structure"` - // Information about the conversion task. - ConversionTask *ConversionTask `locationName:"conversionTask" type:"structure"` + // The time when a status check failed. For an instance that was launched and + // impaired, this is the time when the instance was launched. + ImpairedSince *time.Time `locationName:"impairedSince" type:"timestamp"` + + // The type of instance status. + Name *string `locationName:"name" type:"string" enum:"StatusName"` + + // The status. + Status *string `locationName:"status" type:"string" enum:"StatusType"` } // String returns the string representation -func (s ImportInstanceOutput) String() string { +func (s InstanceStatusDetails) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ImportInstanceOutput) GoString() string { +func (s InstanceStatusDetails) GoString() string { return s.String() } -// SetConversionTask sets the ConversionTask field's value. -func (s *ImportInstanceOutput) SetConversionTask(v *ConversionTask) *ImportInstanceOutput { - s.ConversionTask = v +// SetImpairedSince sets the ImpairedSince field's value. +func (s *InstanceStatusDetails) SetImpairedSince(v time.Time) *InstanceStatusDetails { + s.ImpairedSince = &v return s } -// Describes an import instance task. -type ImportInstanceTaskDetails struct { +// SetName sets the Name field's value. +func (s *InstanceStatusDetails) SetName(v string) *InstanceStatusDetails { + s.Name = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *InstanceStatusDetails) SetStatus(v string) *InstanceStatusDetails { + s.Status = &v + return s +} + +// Describes a scheduled event for an instance. +type InstanceStatusEvent struct { _ struct{} `type:"structure"` - // A description of the task. - Description *string `locationName:"description" type:"string"` + // The event code. + Code *string `locationName:"code" type:"string" enum:"EventCode"` - // The ID of the instance. - InstanceId *string `locationName:"instanceId" type:"string"` + // A description of the event. + // + // After a scheduled event is completed, it can still be described for up to + // a week. If the event has been completed, this description starts with the + // following text: [Completed]. + Description *string `locationName:"description" type:"string"` - // The instance operating system. - Platform *string `locationName:"platform" type:"string" enum:"PlatformValues"` + // The latest scheduled end time for the event. + NotAfter *time.Time `locationName:"notAfter" type:"timestamp"` - // One or more volumes. - Volumes []*ImportInstanceVolumeDetailItem `locationName:"volumes" locationNameList:"item" type:"list"` + // The earliest scheduled start time for the event. + NotBefore *time.Time `locationName:"notBefore" type:"timestamp"` } // String returns the string representation -func (s ImportInstanceTaskDetails) String() string { +func (s InstanceStatusEvent) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ImportInstanceTaskDetails) GoString() string { +func (s InstanceStatusEvent) GoString() string { return s.String() } -// SetDescription sets the Description field's value. -func (s *ImportInstanceTaskDetails) SetDescription(v string) *ImportInstanceTaskDetails { - s.Description = &v +// SetCode sets the Code field's value. +func (s *InstanceStatusEvent) SetCode(v string) *InstanceStatusEvent { + s.Code = &v return s } -// SetInstanceId sets the InstanceId field's value. -func (s *ImportInstanceTaskDetails) SetInstanceId(v string) *ImportInstanceTaskDetails { - s.InstanceId = &v +// SetDescription sets the Description field's value. +func (s *InstanceStatusEvent) SetDescription(v string) *InstanceStatusEvent { + s.Description = &v return s } -// SetPlatform sets the Platform field's value. -func (s *ImportInstanceTaskDetails) SetPlatform(v string) *ImportInstanceTaskDetails { - s.Platform = &v +// SetNotAfter sets the NotAfter field's value. +func (s *InstanceStatusEvent) SetNotAfter(v time.Time) *InstanceStatusEvent { + s.NotAfter = &v return s } -// SetVolumes sets the Volumes field's value. -func (s *ImportInstanceTaskDetails) SetVolumes(v []*ImportInstanceVolumeDetailItem) *ImportInstanceTaskDetails { - s.Volumes = v +// SetNotBefore sets the NotBefore field's value. +func (s *InstanceStatusEvent) SetNotBefore(v time.Time) *InstanceStatusEvent { + s.NotBefore = &v return s } -// Describes an import volume task. -type ImportInstanceVolumeDetailItem struct { +// Describes the status of an instance. +type InstanceStatusSummary struct { _ struct{} `type:"structure"` - // The Availability Zone where the resulting instance will reside. - // - // AvailabilityZone is a required field - AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` - - // The number of bytes converted so far. - // - // BytesConverted is a required field - BytesConverted *int64 `locationName:"bytesConverted" type:"long" required:"true"` - - // A description of the task. - Description *string `locationName:"description" type:"string"` - - // The image. - // - // Image is a required field - Image *DiskImageDescription `locationName:"image" type:"structure" required:"true"` - - // The status of the import of this particular disk image. - // - // Status is a required field - Status *string `locationName:"status" type:"string" required:"true"` - - // The status information or errors related to the disk image. - StatusMessage *string `locationName:"statusMessage" type:"string"` + // The system instance health or application instance health. + Details []*InstanceStatusDetails `locationName:"details" locationNameList:"item" type:"list"` - // The volume. - // - // Volume is a required field - Volume *DiskImageVolumeDescription `locationName:"volume" type:"structure" required:"true"` + // The status. + Status *string `locationName:"status" type:"string" enum:"SummaryStatus"` } // String returns the string representation -func (s ImportInstanceVolumeDetailItem) String() string { +func (s InstanceStatusSummary) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ImportInstanceVolumeDetailItem) GoString() string { +func (s InstanceStatusSummary) GoString() string { return s.String() } -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *ImportInstanceVolumeDetailItem) SetAvailabilityZone(v string) *ImportInstanceVolumeDetailItem { - s.AvailabilityZone = &v - return s -} - -// SetBytesConverted sets the BytesConverted field's value. -func (s *ImportInstanceVolumeDetailItem) SetBytesConverted(v int64) *ImportInstanceVolumeDetailItem { - s.BytesConverted = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ImportInstanceVolumeDetailItem) SetDescription(v string) *ImportInstanceVolumeDetailItem { - s.Description = &v - return s -} - -// SetImage sets the Image field's value. -func (s *ImportInstanceVolumeDetailItem) SetImage(v *DiskImageDescription) *ImportInstanceVolumeDetailItem { - s.Image = v +// SetDetails sets the Details field's value. +func (s *InstanceStatusSummary) SetDetails(v []*InstanceStatusDetails) *InstanceStatusSummary { + s.Details = v return s } // SetStatus sets the Status field's value. -func (s *ImportInstanceVolumeDetailItem) SetStatus(v string) *ImportInstanceVolumeDetailItem { +func (s *InstanceStatusSummary) SetStatus(v string) *InstanceStatusSummary { s.Status = &v return s } -// SetStatusMessage sets the StatusMessage field's value. -func (s *ImportInstanceVolumeDetailItem) SetStatusMessage(v string) *ImportInstanceVolumeDetailItem { - s.StatusMessage = &v - return s -} - -// SetVolume sets the Volume field's value. -func (s *ImportInstanceVolumeDetailItem) SetVolume(v *DiskImageVolumeDescription) *ImportInstanceVolumeDetailItem { - s.Volume = v - return s -} - -// Contains the parameters for ImportKeyPair. -type ImportKeyPairInput struct { +// Describes an internet gateway. +type InternetGateway 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 `locationName:"dryRun" type:"boolean"` + // Any VPCs attached to the internet gateway. + Attachments []*InternetGatewayAttachment `locationName:"attachmentSet" locationNameList:"item" type:"list"` - // A unique name for the key pair. - // - // KeyName is a required field - KeyName *string `locationName:"keyName" type:"string" required:"true"` + // The ID of the internet gateway. + InternetGatewayId *string `locationName:"internetGatewayId" type:"string"` - // The public key. For API calls, the text must be base64-encoded. For command - // line tools, base64 encoding is performed for you. - // - // PublicKeyMaterial is automatically base64 encoded/decoded by the SDK. - // - // PublicKeyMaterial is a required field - PublicKeyMaterial []byte `locationName:"publicKeyMaterial" type:"blob" required:"true"` + // The ID of the AWS account that owns the internet gateway. + OwnerId *string `locationName:"ownerId" type:"string"` + + // Any tags assigned to the internet gateway. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` } // String returns the string representation -func (s ImportKeyPairInput) String() string { +func (s InternetGateway) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ImportKeyPairInput) GoString() string { +func (s InternetGateway) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *ImportKeyPairInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ImportKeyPairInput"} - if s.KeyName == nil { - invalidParams.Add(request.NewErrParamRequired("KeyName")) - } - if s.PublicKeyMaterial == nil { - invalidParams.Add(request.NewErrParamRequired("PublicKeyMaterial")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetAttachments sets the Attachments field's value. +func (s *InternetGateway) SetAttachments(v []*InternetGatewayAttachment) *InternetGateway { + s.Attachments = v + return s } -// SetDryRun sets the DryRun field's value. -func (s *ImportKeyPairInput) SetDryRun(v bool) *ImportKeyPairInput { - s.DryRun = &v +// SetInternetGatewayId sets the InternetGatewayId field's value. +func (s *InternetGateway) SetInternetGatewayId(v string) *InternetGateway { + s.InternetGatewayId = &v return s } -// SetKeyName sets the KeyName field's value. -func (s *ImportKeyPairInput) SetKeyName(v string) *ImportKeyPairInput { - s.KeyName = &v +// SetOwnerId sets the OwnerId field's value. +func (s *InternetGateway) SetOwnerId(v string) *InternetGateway { + s.OwnerId = &v return s } -// SetPublicKeyMaterial sets the PublicKeyMaterial field's value. -func (s *ImportKeyPairInput) SetPublicKeyMaterial(v []byte) *ImportKeyPairInput { - s.PublicKeyMaterial = v +// SetTags sets the Tags field's value. +func (s *InternetGateway) SetTags(v []*Tag) *InternetGateway { + s.Tags = v return s } -// Contains the output of ImportKeyPair. -type ImportKeyPairOutput struct { +// Describes the attachment of a VPC to an internet gateway or an egress-only +// internet gateway. +type InternetGatewayAttachment struct { _ struct{} `type:"structure"` - // The MD5 public key fingerprint as specified in section 4 of RFC 4716. - KeyFingerprint *string `locationName:"keyFingerprint" type:"string"` + // The current state of the attachment. For an internet gateway, the state is + // available when attached to a VPC; otherwise, this value is not returned. + State *string `locationName:"state" type:"string" enum:"AttachmentStatus"` - // The key pair name you provided. - KeyName *string `locationName:"keyName" type:"string"` + // The ID of the VPC. + VpcId *string `locationName:"vpcId" type:"string"` } // String returns the string representation -func (s ImportKeyPairOutput) String() string { +func (s InternetGatewayAttachment) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ImportKeyPairOutput) GoString() string { +func (s InternetGatewayAttachment) GoString() string { return s.String() } -// SetKeyFingerprint sets the KeyFingerprint field's value. -func (s *ImportKeyPairOutput) SetKeyFingerprint(v string) *ImportKeyPairOutput { - s.KeyFingerprint = &v +// SetState sets the State field's value. +func (s *InternetGatewayAttachment) SetState(v string) *InternetGatewayAttachment { + s.State = &v return s } -// SetKeyName sets the KeyName field's value. -func (s *ImportKeyPairOutput) SetKeyName(v string) *ImportKeyPairOutput { - s.KeyName = &v +// SetVpcId sets the VpcId field's value. +func (s *InternetGatewayAttachment) SetVpcId(v string) *InternetGatewayAttachment { + s.VpcId = &v return s } -// Contains the parameters for ImportSnapshot. -type ImportSnapshotInput struct { +// Describes a set of permissions for a security group rule. +type IpPermission struct { _ struct{} `type:"structure"` - // The client-specific data. - ClientData *ClientData `type:"structure"` + // The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 + // type number. 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"` - // Token to enable idempotency for VM import requests. - ClientToken *string `type:"string"` + // The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)). + // + // [EC2-VPC only] Use -1 to specify all protocols. When authorizing security + // group rules, specifying -1 or a protocol number other than tcp, udp, icmp, + // or 58 (ICMPv6) allows traffic on all ports, regardless of any port range + // you specify. For tcp, udp, and icmp, you must specify a port range. For 58 + // (ICMPv6), you can optionally specify a port range; if you don't, traffic + // for all types and codes is allowed when authorizing rules. + IpProtocol *string `locationName:"ipProtocol" type:"string"` - // The description string for the import snapshot task. - Description *string `type:"string"` + // One or more IPv4 ranges. + IpRanges []*IpRange `locationName:"ipRanges" locationNameList:"item" type:"list"` - // Information about the disk container. - DiskContainer *SnapshotDiskContainer `type:"structure"` + // [EC2-VPC only] One or more IPv6 ranges. + Ipv6Ranges []*Ipv6Range `locationName:"ipv6Ranges" 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"` + // [EC2-VPC only] One or more prefix list IDs for an AWS service. With AuthorizeSecurityGroupEgress, + // this is the AWS service that you want to access through a VPC endpoint from + // instances associated with the security group. + PrefixListIds []*PrefixListId `locationName:"prefixListIds" locationNameList:"item" type:"list"` - // The name of the role to use when not using the default role, 'vmimport'. - RoleName *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 for the specified ICMP type. + // If you specify all ICMP/ICMPv6 types, you must specify all codes. + ToPort *int64 `locationName:"toPort" type:"integer"` + + // One or more security group and AWS account ID pairs. + UserIdGroupPairs []*UserIdGroupPair `locationName:"groups" locationNameList:"item" type:"list"` } // String returns the string representation -func (s ImportSnapshotInput) String() string { +func (s IpPermission) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ImportSnapshotInput) GoString() string { +func (s IpPermission) GoString() string { return s.String() } -// SetClientData sets the ClientData field's value. -func (s *ImportSnapshotInput) SetClientData(v *ClientData) *ImportSnapshotInput { - s.ClientData = v +// SetFromPort sets the FromPort field's value. +func (s *IpPermission) SetFromPort(v int64) *IpPermission { + s.FromPort = &v return s } -// SetClientToken sets the ClientToken field's value. -func (s *ImportSnapshotInput) SetClientToken(v string) *ImportSnapshotInput { - s.ClientToken = &v +// SetIpProtocol sets the IpProtocol field's value. +func (s *IpPermission) SetIpProtocol(v string) *IpPermission { + s.IpProtocol = &v return s } -// SetDescription sets the Description field's value. -func (s *ImportSnapshotInput) SetDescription(v string) *ImportSnapshotInput { - s.Description = &v +// SetIpRanges sets the IpRanges field's value. +func (s *IpPermission) SetIpRanges(v []*IpRange) *IpPermission { + s.IpRanges = v return s } -// SetDiskContainer sets the DiskContainer field's value. -func (s *ImportSnapshotInput) SetDiskContainer(v *SnapshotDiskContainer) *ImportSnapshotInput { - s.DiskContainer = v +// SetIpv6Ranges sets the Ipv6Ranges field's value. +func (s *IpPermission) SetIpv6Ranges(v []*Ipv6Range) *IpPermission { + s.Ipv6Ranges = v return s } -// SetDryRun sets the DryRun field's value. -func (s *ImportSnapshotInput) SetDryRun(v bool) *ImportSnapshotInput { - s.DryRun = &v +// SetPrefixListIds sets the PrefixListIds field's value. +func (s *IpPermission) SetPrefixListIds(v []*PrefixListId) *IpPermission { + s.PrefixListIds = v return s } -// SetRoleName sets the RoleName field's value. -func (s *ImportSnapshotInput) SetRoleName(v string) *ImportSnapshotInput { - s.RoleName = &v +// SetToPort sets the ToPort field's value. +func (s *IpPermission) SetToPort(v int64) *IpPermission { + s.ToPort = &v return s } -// Contains the output for ImportSnapshot. -type ImportSnapshotOutput struct { - _ struct{} `type:"structure"` +// SetUserIdGroupPairs sets the UserIdGroupPairs field's value. +func (s *IpPermission) SetUserIdGroupPairs(v []*UserIdGroupPair) *IpPermission { + s.UserIdGroupPairs = v + return s +} - // A description of the import snapshot task. - Description *string `locationName:"description" type:"string"` +// Describes an IPv4 range. +type IpRange struct { + _ struct{} `type:"structure"` - // The ID of the import snapshot task. - ImportTaskId *string `locationName:"importTaskId" type:"string"` + // The IPv4 CIDR range. You can either specify a CIDR range or a source security + // group, not both. To specify a single IPv4 address, use the /32 prefix length. + CidrIp *string `locationName:"cidrIp" type:"string"` - // Information about the import snapshot task. - SnapshotTaskDetail *SnapshotTaskDetail `locationName:"snapshotTaskDetail" type:"structure"` + // A description for the security group rule that references this IPv4 address + // range. + // + // Constraints: Up to 255 characters in length. Allowed characters are a-z, + // A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$* + Description *string `locationName:"description" type:"string"` } // String returns the string representation -func (s ImportSnapshotOutput) String() string { +func (s IpRange) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ImportSnapshotOutput) GoString() string { +func (s IpRange) GoString() string { return s.String() } -// SetDescription sets the Description field's value. -func (s *ImportSnapshotOutput) SetDescription(v string) *ImportSnapshotOutput { - s.Description = &v - return s -} - -// SetImportTaskId sets the ImportTaskId field's value. -func (s *ImportSnapshotOutput) SetImportTaskId(v string) *ImportSnapshotOutput { - s.ImportTaskId = &v +// SetCidrIp sets the CidrIp field's value. +func (s *IpRange) SetCidrIp(v string) *IpRange { + s.CidrIp = &v return s } -// SetSnapshotTaskDetail sets the SnapshotTaskDetail field's value. -func (s *ImportSnapshotOutput) SetSnapshotTaskDetail(v *SnapshotTaskDetail) *ImportSnapshotOutput { - s.SnapshotTaskDetail = v +// SetDescription sets the Description field's value. +func (s *IpRange) SetDescription(v string) *IpRange { + s.Description = &v return s -} - -// Describes an import snapshot task. -type ImportSnapshotTask struct { - _ struct{} `type:"structure"` - - // A description of the import snapshot task. - Description *string `locationName:"description" type:"string"` +} - // The ID of the import snapshot task. - ImportTaskId *string `locationName:"importTaskId" type:"string"` +// Describes an IPv6 CIDR block. +type Ipv6CidrBlock struct { + _ struct{} `type:"structure"` - // Describes an import snapshot task. - SnapshotTaskDetail *SnapshotTaskDetail `locationName:"snapshotTaskDetail" type:"structure"` + // The IPv6 CIDR block. + Ipv6CidrBlock *string `locationName:"ipv6CidrBlock" type:"string"` } // String returns the string representation -func (s ImportSnapshotTask) String() string { +func (s Ipv6CidrBlock) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ImportSnapshotTask) GoString() string { +func (s Ipv6CidrBlock) GoString() string { return s.String() } -// SetDescription sets the Description field's value. -func (s *ImportSnapshotTask) SetDescription(v string) *ImportSnapshotTask { - s.Description = &v - return s -} - -// SetImportTaskId sets the ImportTaskId field's value. -func (s *ImportSnapshotTask) SetImportTaskId(v string) *ImportSnapshotTask { - s.ImportTaskId = &v - return s -} - -// SetSnapshotTaskDetail sets the SnapshotTaskDetail field's value. -func (s *ImportSnapshotTask) SetSnapshotTaskDetail(v *SnapshotTaskDetail) *ImportSnapshotTask { - s.SnapshotTaskDetail = v +// SetIpv6CidrBlock sets the Ipv6CidrBlock field's value. +func (s *Ipv6CidrBlock) SetIpv6CidrBlock(v string) *Ipv6CidrBlock { + s.Ipv6CidrBlock = &v return s } -// Contains the parameters for ImportVolume. -type ImportVolumeInput struct { +// [EC2-VPC only] Describes an IPv6 range. +type Ipv6Range struct { _ struct{} `type:"structure"` - // The Availability Zone for the resulting EBS volume. - // - // AvailabilityZone is a required field - AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` - - // A description of the volume. - Description *string `locationName:"description" 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 `locationName:"dryRun" type:"boolean"` - - // The disk image. - // - // Image is a required field - Image *DiskImageDetail `locationName:"image" type:"structure" required:"true"` + // The IPv6 CIDR range. You can either specify a CIDR range or a source security + // group, not both. To specify a single IPv6 address, use the /128 prefix length. + CidrIpv6 *string `locationName:"cidrIpv6" type:"string"` - // The volume size. + // A description for the security group rule that references this IPv6 address + // range. // - // Volume is a required field - Volume *VolumeDetail `locationName:"volume" type:"structure" required:"true"` + // Constraints: Up to 255 characters in length. Allowed characters are a-z, + // A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$* + Description *string `locationName:"description" type:"string"` } // String returns the string representation -func (s ImportVolumeInput) String() string { +func (s Ipv6Range) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ImportVolumeInput) GoString() string { +func (s Ipv6Range) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *ImportVolumeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ImportVolumeInput"} - if s.AvailabilityZone == nil { - invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) - } - if s.Image == nil { - invalidParams.Add(request.NewErrParamRequired("Image")) - } - if s.Volume == nil { - invalidParams.Add(request.NewErrParamRequired("Volume")) - } - if s.Image != nil { - if err := s.Image.Validate(); err != nil { - invalidParams.AddNested("Image", err.(request.ErrInvalidParams)) - } - } - if s.Volume != nil { - if err := s.Volume.Validate(); err != nil { - invalidParams.AddNested("Volume", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *ImportVolumeInput) SetAvailabilityZone(v string) *ImportVolumeInput { - s.AvailabilityZone = &v +// SetCidrIpv6 sets the CidrIpv6 field's value. +func (s *Ipv6Range) SetCidrIpv6(v string) *Ipv6Range { + s.CidrIpv6 = &v return s } // SetDescription sets the Description field's value. -func (s *ImportVolumeInput) SetDescription(v string) *ImportVolumeInput { +func (s *Ipv6Range) SetDescription(v string) *Ipv6Range { s.Description = &v return s } -// SetDryRun sets the DryRun field's value. -func (s *ImportVolumeInput) SetDryRun(v bool) *ImportVolumeInput { - s.DryRun = &v - return s -} - -// SetImage sets the Image field's value. -func (s *ImportVolumeInput) SetImage(v *DiskImageDetail) *ImportVolumeInput { - s.Image = v - return s -} - -// SetVolume sets the Volume field's value. -func (s *ImportVolumeInput) SetVolume(v *VolumeDetail) *ImportVolumeInput { - s.Volume = v - return s -} - -// Contains the output for ImportVolume. -type ImportVolumeOutput struct { +// Describes a key pair. +type KeyPairInfo struct { _ struct{} `type:"structure"` - // Information about the conversion task. - ConversionTask *ConversionTask `locationName:"conversionTask" 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. + KeyFingerprint *string `locationName:"keyFingerprint" type:"string"` + + // The name of the key pair. + KeyName *string `locationName:"keyName" type:"string"` } // String returns the string representation -func (s ImportVolumeOutput) String() string { +func (s KeyPairInfo) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ImportVolumeOutput) GoString() string { +func (s KeyPairInfo) GoString() string { return s.String() } -// SetConversionTask sets the ConversionTask field's value. -func (s *ImportVolumeOutput) SetConversionTask(v *ConversionTask) *ImportVolumeOutput { - s.ConversionTask = v +// SetKeyFingerprint sets the KeyFingerprint field's value. +func (s *KeyPairInfo) SetKeyFingerprint(v string) *KeyPairInfo { + s.KeyFingerprint = &v return s } -// Describes an import volume task. -type ImportVolumeTaskDetails struct { - _ struct{} `type:"structure"` - - // The Availability Zone where the resulting volume will reside. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The number of bytes converted so far. - BytesConverted *int64 `locationName:"bytesConverted" type:"long"` +// SetKeyName sets the KeyName field's value. +func (s *KeyPairInfo) SetKeyName(v string) *KeyPairInfo { + s.KeyName = &v + return s +} - // The description you provided when starting the import volume task. - Description *string `locationName:"description" type:"string"` +// Describes a launch permission. +type LaunchPermission struct { + _ struct{} `type:"structure"` - // The image. - Image *DiskImageDescription `locationName:"image" type:"structure"` + // The name of the group. + Group *string `locationName:"group" type:"string" enum:"PermissionGroup"` - // The volume. - Volume *DiskImageVolumeDescription `locationName:"volume" type:"structure"` + // The AWS account ID. + UserId *string `locationName:"userId" type:"string"` } // String returns the string representation -func (s ImportVolumeTaskDetails) String() string { +func (s LaunchPermission) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ImportVolumeTaskDetails) GoString() string { +func (s LaunchPermission) GoString() string { return s.String() } -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *ImportVolumeTaskDetails) SetAvailabilityZone(v string) *ImportVolumeTaskDetails { - s.AvailabilityZone = &v +// SetGroup sets the Group field's value. +func (s *LaunchPermission) SetGroup(v string) *LaunchPermission { + s.Group = &v return s } -// SetBytesConverted sets the BytesConverted field's value. -func (s *ImportVolumeTaskDetails) SetBytesConverted(v int64) *ImportVolumeTaskDetails { - s.BytesConverted = &v +// SetUserId sets the UserId field's value. +func (s *LaunchPermission) SetUserId(v string) *LaunchPermission { + s.UserId = &v return s } -// SetDescription sets the Description field's value. -func (s *ImportVolumeTaskDetails) SetDescription(v string) *ImportVolumeTaskDetails { - s.Description = &v - return s +// Describes a launch permission modification. +type LaunchPermissionModifications struct { + _ struct{} `type:"structure"` + + // The AWS account ID to add to the list of launch permissions for the AMI. + Add []*LaunchPermission `locationNameList:"item" type:"list"` + + // The AWS account ID to remove from the list of launch permissions for the + // AMI. + Remove []*LaunchPermission `locationNameList:"item" type:"list"` } -// SetImage sets the Image field's value. -func (s *ImportVolumeTaskDetails) SetImage(v *DiskImageDescription) *ImportVolumeTaskDetails { - s.Image = v +// String returns the string representation +func (s LaunchPermissionModifications) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LaunchPermissionModifications) GoString() string { + return s.String() +} + +// SetAdd sets the Add field's value. +func (s *LaunchPermissionModifications) SetAdd(v []*LaunchPermission) *LaunchPermissionModifications { + s.Add = v return s } -// SetVolume sets the Volume field's value. -func (s *ImportVolumeTaskDetails) SetVolume(v *DiskImageVolumeDescription) *ImportVolumeTaskDetails { - s.Volume = v +// SetRemove sets the Remove field's value. +func (s *LaunchPermissionModifications) SetRemove(v []*LaunchPermission) *LaunchPermissionModifications { + s.Remove = v return s } -// Describes an instance. -type Instance struct { +// Describes the launch specification for an instance. +type LaunchSpecification struct { _ struct{} `type:"structure"` - // The AMI launch index, which can be used to find this instance in the launch - // group. - AmiLaunchIndex *int64 `locationName:"amiLaunchIndex" type:"integer"` - - // The architecture of the image. - Architecture *string `locationName:"architecture" type:"string" enum:"ArchitectureValues"` - - // Any block device mapping entries for the instance. - BlockDeviceMappings []*InstanceBlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` - - // The idempotency token you provided when you launched the instance, if applicable. - ClientToken *string `locationName:"clientToken" type:"string"` + // Deprecated. + AddressingType *string `locationName:"addressingType" type:"string"` - // The CPU options for the instance. - CpuOptions *CpuOptions `locationName:"cpuOptions" type:"structure"` + // One or more block device mapping entries. + BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` - // Indicates whether the instance is optimized for Amazon EBS I/O. This optimization + // Indicates whether the instance is optimized for EBS I/O. This optimization // provides dedicated throughput to Amazon EBS and an optimized configuration - // stack to provide optimal I/O performance. This optimization isn't available + // stack to provide optimal EBS I/O performance. This optimization isn't available // with all instance types. Additional usage charges apply when using an EBS // Optimized instance. + // + // Default: false EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"` - // The Elastic GPU associated with the instance. - ElasticGpuAssociations []*ElasticGpuAssociation `locationName:"elasticGpuAssociationSet" locationNameList:"item" type:"list"` - - // Specifies whether enhanced networking with ENA is enabled. - EnaSupport *bool `locationName:"enaSupport" type:"boolean"` - - // The hypervisor type of the instance. - Hypervisor *string `locationName:"hypervisor" type:"string" enum:"HypervisorType"` - - // The IAM instance profile associated with the instance, if applicable. - IamInstanceProfile *IamInstanceProfile `locationName:"iamInstanceProfile" type:"structure"` + // The IAM instance profile. + IamInstanceProfile *IamInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"` - // The ID of the AMI used to launch the instance. + // The ID of the AMI. ImageId *string `locationName:"imageId" type:"string"` - // The ID of the instance. - InstanceId *string `locationName:"instanceId" type:"string"` - - // Indicates whether this is a Spot Instance or a Scheduled Instance. - InstanceLifecycle *string `locationName:"instanceLifecycle" type:"string" enum:"InstanceLifecycleType"` - // The instance type. InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` - // The kernel associated with this instance, if applicable. + // The ID of the kernel. KernelId *string `locationName:"kernelId" type:"string"` - // The name of the key pair, if this instance was launched with an associated - // key pair. + // The name of the key pair. KeyName *string `locationName:"keyName" type:"string"` - // The time the instance was launched. - LaunchTime *time.Time `locationName:"launchTime" type:"timestamp"` - - // The monitoring for the instance. - Monitoring *Monitoring `locationName:"monitoring" type:"structure"` - - // [EC2-VPC] One or more network interfaces for the instance. - NetworkInterfaces []*InstanceNetworkInterface `locationName:"networkInterfaceSet" locationNameList:"item" type:"list"` - - // The location where the instance launched, if applicable. - Placement *Placement `locationName:"placement" type:"structure"` - - // The value is Windows for Windows instances; otherwise blank. - Platform *string `locationName:"platform" type:"string" enum:"PlatformValues"` - - // (IPv4 only) The private DNS hostname name assigned to the instance. This - // DNS hostname can only be used inside the Amazon EC2 network. This name is - // not available until the instance enters the running state. - // - // [EC2-VPC] The Amazon-provided DNS server resolves Amazon-provided private - // DNS hostnames if you've enabled DNS resolution and DNS hostnames in your - // VPC. If you are not using the Amazon-provided DNS server in your VPC, your - // custom domain name servers must resolve the hostname as appropriate. - PrivateDnsName *string `locationName:"privateDnsName" type:"string"` - - // The private IPv4 address assigned to the instance. - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` - - // The product codes attached to this instance, if applicable. - ProductCodes []*ProductCode `locationName:"productCodes" locationNameList:"item" type:"list"` + // Describes the monitoring of an instance. + Monitoring *RunInstancesMonitoringEnabled `locationName:"monitoring" type:"structure"` - // (IPv4 only) The public DNS name assigned to the instance. This name is not - // available until the instance enters the running state. For EC2-VPC, this - // name is only available if you've enabled DNS hostnames for your VPC. - PublicDnsName *string `locationName:"dnsName" type:"string"` + // One or more network interfaces. If you specify a network interface, you must + // specify subnet IDs and security group IDs using the network interface. + NetworkInterfaces []*InstanceNetworkInterfaceSpecification `locationName:"networkInterfaceSet" locationNameList:"item" type:"list"` - // The public IPv4 address assigned to the instance, if applicable. - PublicIpAddress *string `locationName:"ipAddress" type:"string"` + // The placement information for the instance. + Placement *SpotPlacement `locationName:"placement" type:"structure"` - // The RAM disk associated with this instance, if applicable. + // The ID of the RAM disk. RamdiskId *string `locationName:"ramdiskId" type:"string"` - // The device name of the root device volume (for example, /dev/sda1). - RootDeviceName *string `locationName:"rootDeviceName" type:"string"` - - // The root device type used by the AMI. The AMI can use an EBS volume or an - // instance store volume. - RootDeviceType *string `locationName:"rootDeviceType" type:"string" enum:"DeviceType"` - - // One or more security groups for the instance. + // One or more security groups. When requesting instances in a VPC, you must + // specify the IDs of the security groups. When requesting instances in EC2-Classic, + // you can specify the names or the IDs of the security groups. 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 (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html) - // in the Amazon Virtual Private Cloud User Guide. - SourceDestCheck *bool `locationName:"sourceDestCheck" type:"boolean"` - - // If the request is a Spot Instance request, the ID of the request. - SpotInstanceRequestId *string `locationName:"spotInstanceRequestId" type:"string"` - - // Specifies whether enhanced networking with the Intel 82599 Virtual Function - // interface is enabled. - SriovNetSupport *string `locationName:"sriovNetSupport" type:"string"` - - // The current state of the instance. - State *InstanceState `locationName:"instanceState" type:"structure"` - - // The reason for the most recent state transition. - StateReason *StateReason `locationName:"stateReason" type:"structure"` - - // The reason for the most recent state transition. This might be an empty string. - StateTransitionReason *string `locationName:"reason" type:"string"` - - // [EC2-VPC] The ID of the subnet in which the instance is running. + // The ID of the subnet in which to launch the instance. SubnetId *string `locationName:"subnetId" type:"string"` - // Any tags assigned to the instance. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // The virtualization type of the instance. - VirtualizationType *string `locationName:"virtualizationType" type:"string" enum:"VirtualizationType"` - - // [EC2-VPC] The ID of the VPC in which the instance is running. - VpcId *string `locationName:"vpcId" type:"string"` + // The Base64-encoded user data for the instance. + UserData *string `locationName:"userData" type:"string"` } // String returns the string representation -func (s Instance) String() string { +func (s LaunchSpecification) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Instance) GoString() string { +func (s LaunchSpecification) GoString() string { return s.String() } -// SetAmiLaunchIndex sets the AmiLaunchIndex field's value. -func (s *Instance) SetAmiLaunchIndex(v int64) *Instance { - s.AmiLaunchIndex = &v - return s -} - -// SetArchitecture sets the Architecture field's value. -func (s *Instance) SetArchitecture(v string) *Instance { - s.Architecture = &v +// SetAddressingType sets the AddressingType field's value. +func (s *LaunchSpecification) SetAddressingType(v string) *LaunchSpecification { + s.AddressingType = &v return s } // SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *Instance) SetBlockDeviceMappings(v []*InstanceBlockDeviceMapping) *Instance { +func (s *LaunchSpecification) SetBlockDeviceMappings(v []*BlockDeviceMapping) *LaunchSpecification { s.BlockDeviceMappings = v return s } -// SetClientToken sets the ClientToken field's value. -func (s *Instance) SetClientToken(v string) *Instance { - s.ClientToken = &v - return s -} - -// SetCpuOptions sets the CpuOptions field's value. -func (s *Instance) SetCpuOptions(v *CpuOptions) *Instance { - s.CpuOptions = v - return s -} - // SetEbsOptimized sets the EbsOptimized field's value. -func (s *Instance) SetEbsOptimized(v bool) *Instance { +func (s *LaunchSpecification) SetEbsOptimized(v bool) *LaunchSpecification { s.EbsOptimized = &v return s } -// SetElasticGpuAssociations sets the ElasticGpuAssociations field's value. -func (s *Instance) SetElasticGpuAssociations(v []*ElasticGpuAssociation) *Instance { - s.ElasticGpuAssociations = v - return s -} - -// SetEnaSupport sets the EnaSupport field's value. -func (s *Instance) SetEnaSupport(v bool) *Instance { - s.EnaSupport = &v - return s -} - -// SetHypervisor sets the Hypervisor field's value. -func (s *Instance) SetHypervisor(v string) *Instance { - s.Hypervisor = &v - return s -} - // SetIamInstanceProfile sets the IamInstanceProfile field's value. -func (s *Instance) SetIamInstanceProfile(v *IamInstanceProfile) *Instance { +func (s *LaunchSpecification) SetIamInstanceProfile(v *IamInstanceProfileSpecification) *LaunchSpecification { s.IamInstanceProfile = v return s } // SetImageId sets the ImageId field's value. -func (s *Instance) SetImageId(v string) *Instance { +func (s *LaunchSpecification) SetImageId(v string) *LaunchSpecification { s.ImageId = &v return s } -// SetInstanceId sets the InstanceId field's value. -func (s *Instance) SetInstanceId(v string) *Instance { - s.InstanceId = &v - return s -} - -// SetInstanceLifecycle sets the InstanceLifecycle field's value. -func (s *Instance) SetInstanceLifecycle(v string) *Instance { - s.InstanceLifecycle = &v - return s -} - // SetInstanceType sets the InstanceType field's value. -func (s *Instance) SetInstanceType(v string) *Instance { +func (s *LaunchSpecification) SetInstanceType(v string) *LaunchSpecification { s.InstanceType = &v return s } // SetKernelId sets the KernelId field's value. -func (s *Instance) SetKernelId(v string) *Instance { +func (s *LaunchSpecification) SetKernelId(v string) *LaunchSpecification { s.KernelId = &v return s } // SetKeyName sets the KeyName field's value. -func (s *Instance) SetKeyName(v string) *Instance { +func (s *LaunchSpecification) SetKeyName(v string) *LaunchSpecification { s.KeyName = &v return s } -// SetLaunchTime sets the LaunchTime field's value. -func (s *Instance) SetLaunchTime(v time.Time) *Instance { - s.LaunchTime = &v - return s -} - // SetMonitoring sets the Monitoring field's value. -func (s *Instance) SetMonitoring(v *Monitoring) *Instance { +func (s *LaunchSpecification) SetMonitoring(v *RunInstancesMonitoringEnabled) *LaunchSpecification { s.Monitoring = v return s } // SetNetworkInterfaces sets the NetworkInterfaces field's value. -func (s *Instance) SetNetworkInterfaces(v []*InstanceNetworkInterface) *Instance { +func (s *LaunchSpecification) SetNetworkInterfaces(v []*InstanceNetworkInterfaceSpecification) *LaunchSpecification { s.NetworkInterfaces = v return s } // SetPlacement sets the Placement field's value. -func (s *Instance) SetPlacement(v *Placement) *Instance { +func (s *LaunchSpecification) SetPlacement(v *SpotPlacement) *LaunchSpecification { s.Placement = v return s } -// SetPlatform sets the Platform field's value. -func (s *Instance) SetPlatform(v string) *Instance { - s.Platform = &v +// SetRamdiskId sets the RamdiskId field's value. +func (s *LaunchSpecification) SetRamdiskId(v string) *LaunchSpecification { + s.RamdiskId = &v return s } -// SetPrivateDnsName sets the PrivateDnsName field's value. -func (s *Instance) SetPrivateDnsName(v string) *Instance { - s.PrivateDnsName = &v +// SetSecurityGroups sets the SecurityGroups field's value. +func (s *LaunchSpecification) SetSecurityGroups(v []*GroupIdentifier) *LaunchSpecification { + s.SecurityGroups = v return s } -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *Instance) SetPrivateIpAddress(v string) *Instance { - s.PrivateIpAddress = &v +// SetSubnetId sets the SubnetId field's value. +func (s *LaunchSpecification) SetSubnetId(v string) *LaunchSpecification { + s.SubnetId = &v return s } -// SetProductCodes sets the ProductCodes field's value. -func (s *Instance) SetProductCodes(v []*ProductCode) *Instance { - s.ProductCodes = v +// SetUserData sets the UserData field's value. +func (s *LaunchSpecification) SetUserData(v string) *LaunchSpecification { + s.UserData = &v return s } -// SetPublicDnsName sets the PublicDnsName field's value. -func (s *Instance) SetPublicDnsName(v string) *Instance { - s.PublicDnsName = &v - return s -} +// Describes a launch template. +type LaunchTemplate struct { + _ struct{} `type:"structure"` -// SetPublicIpAddress sets the PublicIpAddress field's value. -func (s *Instance) SetPublicIpAddress(v string) *Instance { - s.PublicIpAddress = &v - return s -} + // The time launch template was created. + CreateTime *time.Time `locationName:"createTime" type:"timestamp"` -// SetRamdiskId sets the RamdiskId field's value. -func (s *Instance) SetRamdiskId(v string) *Instance { - s.RamdiskId = &v - return s -} + // The principal that created the launch template. + CreatedBy *string `locationName:"createdBy" type:"string"` + + // The version number of the default version of the launch template. + DefaultVersionNumber *int64 `locationName:"defaultVersionNumber" type:"long"` + + // The version number of the latest version of the launch template. + LatestVersionNumber *int64 `locationName:"latestVersionNumber" type:"long"` + + // The ID of the launch template. + LaunchTemplateId *string `locationName:"launchTemplateId" type:"string"` -// SetRootDeviceName sets the RootDeviceName field's value. -func (s *Instance) SetRootDeviceName(v string) *Instance { - s.RootDeviceName = &v - return s -} + // The name of the launch template. + LaunchTemplateName *string `locationName:"launchTemplateName" min:"3" type:"string"` -// SetRootDeviceType sets the RootDeviceType field's value. -func (s *Instance) SetRootDeviceType(v string) *Instance { - s.RootDeviceType = &v - return s + // The tags for the launch template. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` } -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *Instance) SetSecurityGroups(v []*GroupIdentifier) *Instance { - s.SecurityGroups = v - return s +// String returns the string representation +func (s LaunchTemplate) String() string { + return awsutil.Prettify(s) } -// SetSourceDestCheck sets the SourceDestCheck field's value. -func (s *Instance) SetSourceDestCheck(v bool) *Instance { - s.SourceDestCheck = &v - return s +// GoString returns the string representation +func (s LaunchTemplate) GoString() string { + return s.String() } -// SetSpotInstanceRequestId sets the SpotInstanceRequestId field's value. -func (s *Instance) SetSpotInstanceRequestId(v string) *Instance { - s.SpotInstanceRequestId = &v +// SetCreateTime sets the CreateTime field's value. +func (s *LaunchTemplate) SetCreateTime(v time.Time) *LaunchTemplate { + s.CreateTime = &v return s } -// SetSriovNetSupport sets the SriovNetSupport field's value. -func (s *Instance) SetSriovNetSupport(v string) *Instance { - s.SriovNetSupport = &v +// SetCreatedBy sets the CreatedBy field's value. +func (s *LaunchTemplate) SetCreatedBy(v string) *LaunchTemplate { + s.CreatedBy = &v return s } -// SetState sets the State field's value. -func (s *Instance) SetState(v *InstanceState) *Instance { - s.State = v +// SetDefaultVersionNumber sets the DefaultVersionNumber field's value. +func (s *LaunchTemplate) SetDefaultVersionNumber(v int64) *LaunchTemplate { + s.DefaultVersionNumber = &v return s } -// SetStateReason sets the StateReason field's value. -func (s *Instance) SetStateReason(v *StateReason) *Instance { - s.StateReason = v +// SetLatestVersionNumber sets the LatestVersionNumber field's value. +func (s *LaunchTemplate) SetLatestVersionNumber(v int64) *LaunchTemplate { + s.LatestVersionNumber = &v return s } -// SetStateTransitionReason sets the StateTransitionReason field's value. -func (s *Instance) SetStateTransitionReason(v string) *Instance { - s.StateTransitionReason = &v +// SetLaunchTemplateId sets the LaunchTemplateId field's value. +func (s *LaunchTemplate) SetLaunchTemplateId(v string) *LaunchTemplate { + s.LaunchTemplateId = &v return s } -// SetSubnetId sets the SubnetId field's value. -func (s *Instance) SetSubnetId(v string) *Instance { - s.SubnetId = &v +// SetLaunchTemplateName sets the LaunchTemplateName field's value. +func (s *LaunchTemplate) SetLaunchTemplateName(v string) *LaunchTemplate { + s.LaunchTemplateName = &v return s } // SetTags sets the Tags field's value. -func (s *Instance) SetTags(v []*Tag) *Instance { +func (s *LaunchTemplate) SetTags(v []*Tag) *LaunchTemplate { s.Tags = v return s } -// SetVirtualizationType sets the VirtualizationType field's value. -func (s *Instance) SetVirtualizationType(v string) *Instance { - s.VirtualizationType = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *Instance) SetVpcId(v string) *Instance { - s.VpcId = &v - return s -} - -// Describes a block device mapping. -type InstanceBlockDeviceMapping struct { +// Describes a launch template and overrides. +type LaunchTemplateAndOverridesResponse struct { _ struct{} `type:"structure"` - // The device name (for example, /dev/sdh or xvdh). - DeviceName *string `locationName:"deviceName" type:"string"` + // The launch template. + LaunchTemplateSpecification *FleetLaunchTemplateSpecification `locationName:"launchTemplateSpecification" type:"structure"` - // Parameters used to automatically set up EBS volumes when the instance is - // launched. - Ebs *EbsInstanceBlockDevice `locationName:"ebs" type:"structure"` + // Any parameters that you specify override the same parameters in the launch + // template. + Overrides *FleetLaunchTemplateOverrides `locationName:"overrides" type:"structure"` } // String returns the string representation -func (s InstanceBlockDeviceMapping) String() string { +func (s LaunchTemplateAndOverridesResponse) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s InstanceBlockDeviceMapping) GoString() string { +func (s LaunchTemplateAndOverridesResponse) GoString() string { return s.String() } -// SetDeviceName sets the DeviceName field's value. -func (s *InstanceBlockDeviceMapping) SetDeviceName(v string) *InstanceBlockDeviceMapping { - s.DeviceName = &v +// SetLaunchTemplateSpecification sets the LaunchTemplateSpecification field's value. +func (s *LaunchTemplateAndOverridesResponse) SetLaunchTemplateSpecification(v *FleetLaunchTemplateSpecification) *LaunchTemplateAndOverridesResponse { + s.LaunchTemplateSpecification = v return s } -// SetEbs sets the Ebs field's value. -func (s *InstanceBlockDeviceMapping) SetEbs(v *EbsInstanceBlockDevice) *InstanceBlockDeviceMapping { - s.Ebs = v +// SetOverrides sets the Overrides field's value. +func (s *LaunchTemplateAndOverridesResponse) SetOverrides(v *FleetLaunchTemplateOverrides) *LaunchTemplateAndOverridesResponse { + s.Overrides = v return s } -// Describes a block device mapping entry. -type InstanceBlockDeviceMappingSpecification struct { +// Describes a block device mapping. +type LaunchTemplateBlockDeviceMapping struct { _ struct{} `type:"structure"` - // The device name (for example, /dev/sdh or xvdh). + // The device name. DeviceName *string `locationName:"deviceName" type:"string"` - // Parameters used to automatically set up EBS volumes when the instance is - // launched. - Ebs *EbsInstanceBlockDeviceSpecification `locationName:"ebs" type:"structure"` + // Information about the block device for an EBS volume. + Ebs *LaunchTemplateEbsBlockDevice `locationName:"ebs" type:"structure"` - // suppress the specified device included in the block device mapping. + // Suppresses the specified device included in the block device mapping of the + // AMI. NoDevice *string `locationName:"noDevice" type:"string"` - // The virtual device name. + // The virtual device name (ephemeralN). VirtualName *string `locationName:"virtualName" type:"string"` } // String returns the string representation -func (s InstanceBlockDeviceMappingSpecification) String() string { +func (s LaunchTemplateBlockDeviceMapping) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s InstanceBlockDeviceMappingSpecification) GoString() string { +func (s LaunchTemplateBlockDeviceMapping) GoString() string { return s.String() } // SetDeviceName sets the DeviceName field's value. -func (s *InstanceBlockDeviceMappingSpecification) SetDeviceName(v string) *InstanceBlockDeviceMappingSpecification { +func (s *LaunchTemplateBlockDeviceMapping) SetDeviceName(v string) *LaunchTemplateBlockDeviceMapping { s.DeviceName = &v return s } // SetEbs sets the Ebs field's value. -func (s *InstanceBlockDeviceMappingSpecification) SetEbs(v *EbsInstanceBlockDeviceSpecification) *InstanceBlockDeviceMappingSpecification { +func (s *LaunchTemplateBlockDeviceMapping) SetEbs(v *LaunchTemplateEbsBlockDevice) *LaunchTemplateBlockDeviceMapping { s.Ebs = v return s } // SetNoDevice sets the NoDevice field's value. -func (s *InstanceBlockDeviceMappingSpecification) SetNoDevice(v string) *InstanceBlockDeviceMappingSpecification { +func (s *LaunchTemplateBlockDeviceMapping) SetNoDevice(v string) *LaunchTemplateBlockDeviceMapping { s.NoDevice = &v return s } // SetVirtualName sets the VirtualName field's value. -func (s *InstanceBlockDeviceMappingSpecification) SetVirtualName(v string) *InstanceBlockDeviceMappingSpecification { +func (s *LaunchTemplateBlockDeviceMapping) SetVirtualName(v string) *LaunchTemplateBlockDeviceMapping { s.VirtualName = &v return s } -// Information about the instance type that the Dedicated Host supports. -type InstanceCapacity struct { +// Describes a block device mapping. +type LaunchTemplateBlockDeviceMappingRequest struct { _ struct{} `type:"structure"` - // The number of instances that can still be launched onto the Dedicated Host. - AvailableCapacity *int64 `locationName:"availableCapacity" type:"integer"` + // The device name (for example, /dev/sdh or xvdh). + DeviceName *string `type:"string"` - // The instance type size supported by the Dedicated Host. - InstanceType *string `locationName:"instanceType" type:"string"` + // Parameters used to automatically set up EBS volumes when the instance is + // launched. + Ebs *LaunchTemplateEbsBlockDeviceRequest `type:"structure"` - // The total number of instances that can be launched onto the Dedicated Host. - TotalCapacity *int64 `locationName:"totalCapacity" type:"integer"` + // Suppresses the specified device included in the block device mapping of the + // AMI. + NoDevice *string `type:"string"` + + // The virtual device name (ephemeralN). Instance store volumes are numbered + // starting from 0. An instance type with 2 available instance store volumes + // can specify mappings for ephemeral0 and ephemeral1. The number of available + // instance store volumes depends on the instance type. After you connect to + // the instance, you must mount the volume. + VirtualName *string `type:"string"` } // String returns the string representation -func (s InstanceCapacity) String() string { +func (s LaunchTemplateBlockDeviceMappingRequest) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s InstanceCapacity) GoString() string { +func (s LaunchTemplateBlockDeviceMappingRequest) GoString() string { return s.String() } -// SetAvailableCapacity sets the AvailableCapacity field's value. -func (s *InstanceCapacity) SetAvailableCapacity(v int64) *InstanceCapacity { - s.AvailableCapacity = &v +// SetDeviceName sets the DeviceName field's value. +func (s *LaunchTemplateBlockDeviceMappingRequest) SetDeviceName(v string) *LaunchTemplateBlockDeviceMappingRequest { + s.DeviceName = &v return s } -// SetInstanceType sets the InstanceType field's value. -func (s *InstanceCapacity) SetInstanceType(v string) *InstanceCapacity { - s.InstanceType = &v +// SetEbs sets the Ebs field's value. +func (s *LaunchTemplateBlockDeviceMappingRequest) SetEbs(v *LaunchTemplateEbsBlockDeviceRequest) *LaunchTemplateBlockDeviceMappingRequest { + s.Ebs = v return s } -// SetTotalCapacity sets the TotalCapacity field's value. -func (s *InstanceCapacity) SetTotalCapacity(v int64) *InstanceCapacity { - s.TotalCapacity = &v +// SetNoDevice sets the NoDevice field's value. +func (s *LaunchTemplateBlockDeviceMappingRequest) SetNoDevice(v string) *LaunchTemplateBlockDeviceMappingRequest { + s.NoDevice = &v return s } -// Describes a Reserved Instance listing state. -type InstanceCount struct { +// SetVirtualName sets the VirtualName field's value. +func (s *LaunchTemplateBlockDeviceMappingRequest) SetVirtualName(v string) *LaunchTemplateBlockDeviceMappingRequest { + s.VirtualName = &v + return s +} + +// Describes an instance's Capacity Reservation targeting option. You can specify +// only one option at a time. Use the CapacityReservationPreference parameter +// to configure the instance to run in On-Demand capacity or to run in any open +// Capacity Reservation that has matching attributes (instance type, platform, +// Availability Zone). Use the CapacityReservationTarget parameter to explicitly +// target a specific Capacity Reservation. +type LaunchTemplateCapacityReservationSpecificationRequest struct { _ struct{} `type:"structure"` - // The number of listed Reserved Instances in the state specified by the state. - InstanceCount *int64 `locationName:"instanceCount" type:"integer"` + // Indicates the instance's Capacity Reservation preferences. Possible preferences + // include: + // + // * open - The instance can run in any open Capacity Reservation that has + // matching attributes (instance type, platform, Availability Zone). + // + // * none - The instance avoids running in a Capacity Reservation even if + // one is available. The instance runs in On-Demand capacity. + CapacityReservationPreference *string `type:"string" enum:"CapacityReservationPreference"` - // The states of the listed Reserved Instances. - State *string `locationName:"state" type:"string" enum:"ListingState"` + // Information about the target Capacity Reservation. + CapacityReservationTarget *CapacityReservationTarget `type:"structure"` } // String returns the string representation -func (s InstanceCount) String() string { +func (s LaunchTemplateCapacityReservationSpecificationRequest) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s InstanceCount) GoString() string { +func (s LaunchTemplateCapacityReservationSpecificationRequest) GoString() string { return s.String() } -// SetInstanceCount sets the InstanceCount field's value. -func (s *InstanceCount) SetInstanceCount(v int64) *InstanceCount { - s.InstanceCount = &v +// SetCapacityReservationPreference sets the CapacityReservationPreference field's value. +func (s *LaunchTemplateCapacityReservationSpecificationRequest) SetCapacityReservationPreference(v string) *LaunchTemplateCapacityReservationSpecificationRequest { + s.CapacityReservationPreference = &v return s } -// SetState sets the State field's value. -func (s *InstanceCount) SetState(v string) *InstanceCount { - s.State = &v +// SetCapacityReservationTarget sets the CapacityReservationTarget field's value. +func (s *LaunchTemplateCapacityReservationSpecificationRequest) SetCapacityReservationTarget(v *CapacityReservationTarget) *LaunchTemplateCapacityReservationSpecificationRequest { + s.CapacityReservationTarget = v return s } -// Describes the credit option for CPU usage of a T2 instance. -type InstanceCreditSpecification struct { +// Information about the Capacity Reservation targeting option. +type LaunchTemplateCapacityReservationSpecificationResponse struct { _ struct{} `type:"structure"` - // The credit option for CPU usage of the instance. Valid values are standard - // and unlimited. - CpuCredits *string `locationName:"cpuCredits" type:"string"` + // Indicates the instance's Capacity Reservation preferences. Possible preferences + // include: + // + // * open - The instance can run in any open Capacity Reservation that has + // matching attributes (instance type, platform, Availability Zone). + // + // * none - The instance avoids running in a Capacity Reservation even if + // one is available. The instance runs in On-Demand capacity. + CapacityReservationPreference *string `locationName:"capacityReservationPreference" type:"string" enum:"CapacityReservationPreference"` - // The ID of the instance. - InstanceId *string `locationName:"instanceId" type:"string"` + // Information about the target Capacity Reservation. + CapacityReservationTarget *CapacityReservationTargetResponse `locationName:"capacityReservationTarget" type:"structure"` } // String returns the string representation -func (s InstanceCreditSpecification) String() string { +func (s LaunchTemplateCapacityReservationSpecificationResponse) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s InstanceCreditSpecification) GoString() string { +func (s LaunchTemplateCapacityReservationSpecificationResponse) GoString() string { return s.String() } -// SetCpuCredits sets the CpuCredits field's value. -func (s *InstanceCreditSpecification) SetCpuCredits(v string) *InstanceCreditSpecification { - s.CpuCredits = &v +// SetCapacityReservationPreference sets the CapacityReservationPreference field's value. +func (s *LaunchTemplateCapacityReservationSpecificationResponse) SetCapacityReservationPreference(v string) *LaunchTemplateCapacityReservationSpecificationResponse { + s.CapacityReservationPreference = &v return s } -// SetInstanceId sets the InstanceId field's value. -func (s *InstanceCreditSpecification) SetInstanceId(v string) *InstanceCreditSpecification { - s.InstanceId = &v +// SetCapacityReservationTarget sets the CapacityReservationTarget field's value. +func (s *LaunchTemplateCapacityReservationSpecificationResponse) SetCapacityReservationTarget(v *CapacityReservationTargetResponse) *LaunchTemplateCapacityReservationSpecificationResponse { + s.CapacityReservationTarget = v return s } -// Describes the credit option for CPU usage of a T2 instance. -type InstanceCreditSpecificationRequest struct { +// Describes a launch template and overrides. +type LaunchTemplateConfig struct { _ struct{} `type:"structure"` - // The credit option for CPU usage of the instance. Valid values are standard - // and unlimited. - CpuCredits *string `type:"string"` + // The launch template. + LaunchTemplateSpecification *FleetLaunchTemplateSpecification `locationName:"launchTemplateSpecification" type:"structure"` - // The ID of the instance. - InstanceId *string `type:"string"` + // Any parameters that you specify override the same parameters in the launch + // template. + Overrides []*LaunchTemplateOverrides `locationName:"overrides" locationNameList:"item" type:"list"` } // String returns the string representation -func (s InstanceCreditSpecificationRequest) String() string { +func (s LaunchTemplateConfig) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s InstanceCreditSpecificationRequest) GoString() string { +func (s LaunchTemplateConfig) GoString() string { return s.String() } -// SetCpuCredits sets the CpuCredits field's value. -func (s *InstanceCreditSpecificationRequest) SetCpuCredits(v string) *InstanceCreditSpecificationRequest { - s.CpuCredits = &v +// Validate inspects the fields of the type to determine if they are valid. +func (s *LaunchTemplateConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LaunchTemplateConfig"} + if s.LaunchTemplateSpecification != nil { + if err := s.LaunchTemplateSpecification.Validate(); err != nil { + invalidParams.AddNested("LaunchTemplateSpecification", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLaunchTemplateSpecification sets the LaunchTemplateSpecification field's value. +func (s *LaunchTemplateConfig) SetLaunchTemplateSpecification(v *FleetLaunchTemplateSpecification) *LaunchTemplateConfig { + s.LaunchTemplateSpecification = v return s } -// SetInstanceId sets the InstanceId field's value. -func (s *InstanceCreditSpecificationRequest) SetInstanceId(v string) *InstanceCreditSpecificationRequest { - s.InstanceId = &v +// SetOverrides sets the Overrides field's value. +func (s *LaunchTemplateConfig) SetOverrides(v []*LaunchTemplateOverrides) *LaunchTemplateConfig { + s.Overrides = v return s } -// Describes an instance to export. -type InstanceExportDetails struct { +// The CPU options for the instance. +type LaunchTemplateCpuOptions struct { _ struct{} `type:"structure"` - // The ID of the resource being exported. - InstanceId *string `locationName:"instanceId" type:"string"` + // The number of CPU cores for the instance. + CoreCount *int64 `locationName:"coreCount" type:"integer"` - // The target virtualization environment. - TargetEnvironment *string `locationName:"targetEnvironment" type:"string" enum:"ExportEnvironment"` + // The number of threads per CPU core. + ThreadsPerCore *int64 `locationName:"threadsPerCore" type:"integer"` } // String returns the string representation -func (s InstanceExportDetails) String() string { +func (s LaunchTemplateCpuOptions) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s InstanceExportDetails) GoString() string { +func (s LaunchTemplateCpuOptions) GoString() string { return s.String() } -// SetInstanceId sets the InstanceId field's value. -func (s *InstanceExportDetails) SetInstanceId(v string) *InstanceExportDetails { - s.InstanceId = &v +// SetCoreCount sets the CoreCount field's value. +func (s *LaunchTemplateCpuOptions) SetCoreCount(v int64) *LaunchTemplateCpuOptions { + s.CoreCount = &v return s } -// SetTargetEnvironment sets the TargetEnvironment field's value. -func (s *InstanceExportDetails) SetTargetEnvironment(v string) *InstanceExportDetails { - s.TargetEnvironment = &v +// SetThreadsPerCore sets the ThreadsPerCore field's value. +func (s *LaunchTemplateCpuOptions) SetThreadsPerCore(v int64) *LaunchTemplateCpuOptions { + s.ThreadsPerCore = &v return s } -// Describes an IPv6 address. -type InstanceIpv6Address struct { +// The CPU options for the instance. Both the core count and threads per core +// must be specified in the request. +type LaunchTemplateCpuOptionsRequest struct { _ struct{} `type:"structure"` - // The IPv6 address. - Ipv6Address *string `locationName:"ipv6Address" type:"string"` + // The number of CPU cores for the instance. + CoreCount *int64 `type:"integer"` + + // The number of threads per CPU core. To disable Intel Hyper-Threading Technology + // for the instance, specify a value of 1. Otherwise, specify the default value + // of 2. + ThreadsPerCore *int64 `type:"integer"` } // String returns the string representation -func (s InstanceIpv6Address) String() string { +func (s LaunchTemplateCpuOptionsRequest) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s InstanceIpv6Address) GoString() string { +func (s LaunchTemplateCpuOptionsRequest) GoString() string { return s.String() } -// SetIpv6Address sets the Ipv6Address field's value. -func (s *InstanceIpv6Address) SetIpv6Address(v string) *InstanceIpv6Address { - s.Ipv6Address = &v +// SetCoreCount sets the CoreCount field's value. +func (s *LaunchTemplateCpuOptionsRequest) SetCoreCount(v int64) *LaunchTemplateCpuOptionsRequest { + s.CoreCount = &v return s } -// Describes an IPv6 address. -type InstanceIpv6AddressRequest struct { +// SetThreadsPerCore sets the ThreadsPerCore field's value. +func (s *LaunchTemplateCpuOptionsRequest) SetThreadsPerCore(v int64) *LaunchTemplateCpuOptionsRequest { + s.ThreadsPerCore = &v + return s +} + +// Describes a block device for an EBS volume. +type LaunchTemplateEbsBlockDevice struct { _ struct{} `type:"structure"` - // The IPv6 address. - Ipv6Address *string `type:"string"` -} + // Indicates whether the EBS volume is deleted on instance termination. + DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` -// String returns the string representation -func (s InstanceIpv6AddressRequest) String() string { - return awsutil.Prettify(s) -} + // Indicates whether the EBS volume is encrypted. + Encrypted *bool `locationName:"encrypted" type:"boolean"` -// GoString returns the string representation -func (s InstanceIpv6AddressRequest) GoString() string { - return s.String() -} + // The number of I/O operations per second (IOPS) that the volume supports. + Iops *int64 `locationName:"iops" type:"integer"` -// SetIpv6Address sets the Ipv6Address field's value. -func (s *InstanceIpv6AddressRequest) SetIpv6Address(v string) *InstanceIpv6AddressRequest { - s.Ipv6Address = &v - return s -} + // The ARN of the AWS Key Management Service (AWS KMS) CMK used for encryption. + KmsKeyId *string `locationName:"kmsKeyId" type:"string"` -// Describes the market (purchasing) option for the instances. -type InstanceMarketOptionsRequest struct { - _ struct{} `type:"structure"` + // The ID of the snapshot. + SnapshotId *string `locationName:"snapshotId" type:"string"` - // The market type. - MarketType *string `type:"string" enum:"MarketType"` + // The size of the volume, in GiB. + VolumeSize *int64 `locationName:"volumeSize" type:"integer"` - // The options for Spot Instances. - SpotOptions *SpotMarketOptions `type:"structure"` + // The volume type. + VolumeType *string `locationName:"volumeType" type:"string" enum:"VolumeType"` } // String returns the string representation -func (s InstanceMarketOptionsRequest) String() string { +func (s LaunchTemplateEbsBlockDevice) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s InstanceMarketOptionsRequest) GoString() string { +func (s LaunchTemplateEbsBlockDevice) GoString() string { return s.String() } -// SetMarketType sets the MarketType field's value. -func (s *InstanceMarketOptionsRequest) SetMarketType(v string) *InstanceMarketOptionsRequest { - s.MarketType = &v +// SetDeleteOnTermination sets the DeleteOnTermination field's value. +func (s *LaunchTemplateEbsBlockDevice) SetDeleteOnTermination(v bool) *LaunchTemplateEbsBlockDevice { + s.DeleteOnTermination = &v return s } -// SetSpotOptions sets the SpotOptions field's value. -func (s *InstanceMarketOptionsRequest) SetSpotOptions(v *SpotMarketOptions) *InstanceMarketOptionsRequest { - s.SpotOptions = v +// SetEncrypted sets the Encrypted field's value. +func (s *LaunchTemplateEbsBlockDevice) SetEncrypted(v bool) *LaunchTemplateEbsBlockDevice { + s.Encrypted = &v return s } -// Describes the monitoring of an instance. -type InstanceMonitoring struct { - _ struct{} `type:"structure"` - - // The ID of the instance. - InstanceId *string `locationName:"instanceId" type:"string"` - - // The monitoring for the instance. - Monitoring *Monitoring `locationName:"monitoring" type:"structure"` +// SetIops sets the Iops field's value. +func (s *LaunchTemplateEbsBlockDevice) SetIops(v int64) *LaunchTemplateEbsBlockDevice { + s.Iops = &v + return s } -// String returns the string representation -func (s InstanceMonitoring) String() string { - return awsutil.Prettify(s) +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *LaunchTemplateEbsBlockDevice) SetKmsKeyId(v string) *LaunchTemplateEbsBlockDevice { + s.KmsKeyId = &v + return s } -// GoString returns the string representation -func (s InstanceMonitoring) GoString() string { - return s.String() +// SetSnapshotId sets the SnapshotId field's value. +func (s *LaunchTemplateEbsBlockDevice) SetSnapshotId(v string) *LaunchTemplateEbsBlockDevice { + s.SnapshotId = &v + return s } -// SetInstanceId sets the InstanceId field's value. -func (s *InstanceMonitoring) SetInstanceId(v string) *InstanceMonitoring { - s.InstanceId = &v +// SetVolumeSize sets the VolumeSize field's value. +func (s *LaunchTemplateEbsBlockDevice) SetVolumeSize(v int64) *LaunchTemplateEbsBlockDevice { + s.VolumeSize = &v return s } -// SetMonitoring sets the Monitoring field's value. -func (s *InstanceMonitoring) SetMonitoring(v *Monitoring) *InstanceMonitoring { - s.Monitoring = v +// SetVolumeType sets the VolumeType field's value. +func (s *LaunchTemplateEbsBlockDevice) SetVolumeType(v string) *LaunchTemplateEbsBlockDevice { + s.VolumeType = &v return s } -// Describes a network interface. -type InstanceNetworkInterface struct { +// The parameters for a block device for an EBS volume. +type LaunchTemplateEbsBlockDeviceRequest struct { _ struct{} `type:"structure"` - // The association information for an Elastic IPv4 associated with the network - // interface. - Association *InstanceNetworkInterfaceAssociation `locationName:"association" type:"structure"` - - // The network interface attachment. - Attachment *InstanceNetworkInterfaceAttachment `locationName:"attachment" type:"structure"` - - // The description. - Description *string `locationName:"description" type:"string"` - - // One or more security groups. - Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` - - // One or more IPv6 addresses associated with the network interface. - Ipv6Addresses []*InstanceIpv6Address `locationName:"ipv6AddressesSet" locationNameList:"item" type:"list"` - - // The MAC address. - MacAddress *string `locationName:"macAddress" type:"string"` - - // The ID of the network interface. - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` - - // The ID of the AWS account that created the network interface. - OwnerId *string `locationName:"ownerId" type:"string"` - - // The private DNS name. - PrivateDnsName *string `locationName:"privateDnsName" type:"string"` - - // The IPv4 address of the network interface within the subnet. - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` - - // 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. - SourceDestCheck *bool `locationName:"sourceDestCheck" type:"boolean"` - - // The status of the network interface. - Status *string `locationName:"status" type:"string" enum:"NetworkInterfaceStatus"` - - // The ID of the subnet. - SubnetId *string `locationName:"subnetId" type:"string"` - - // The ID of the VPC. - VpcId *string `locationName:"vpcId" type:"string"` -} - -// String returns the string representation -func (s InstanceNetworkInterface) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s InstanceNetworkInterface) GoString() string { - return s.String() -} - -// SetAssociation sets the Association field's value. -func (s *InstanceNetworkInterface) SetAssociation(v *InstanceNetworkInterfaceAssociation) *InstanceNetworkInterface { - s.Association = v - return s -} + // Indicates whether the EBS volume is deleted on instance termination. + DeleteOnTermination *bool `type:"boolean"` -// SetAttachment sets the Attachment field's value. -func (s *InstanceNetworkInterface) SetAttachment(v *InstanceNetworkInterfaceAttachment) *InstanceNetworkInterface { - s.Attachment = v - return s -} + // Indicates whether the EBS volume is encrypted. Encrypted volumes can only + // be attached to instances that support Amazon EBS encryption. If you are creating + // a volume from a snapshot, you can't specify an encryption value. + Encrypted *bool `type:"boolean"` -// SetDescription sets the Description field's value. -func (s *InstanceNetworkInterface) SetDescription(v string) *InstanceNetworkInterface { - s.Description = &v - return s -} + // The number of I/O operations per second (IOPS) that the volume supports. + // For io1, this represents the number of IOPS that are provisioned for the + // volume. For gp2, this represents the baseline performance of the volume and + // the rate at which the volume accumulates I/O credits for bursting. For more + // information about General Purpose SSD baseline performance, I/O credits, + // and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud + // User Guide. + // + // Condition: This parameter is required for requests to create io1 volumes; + // it is not used in requests to create gp2, st1, sc1, or standard volumes. + Iops *int64 `type:"integer"` -// SetGroups sets the Groups field's value. -func (s *InstanceNetworkInterface) SetGroups(v []*GroupIdentifier) *InstanceNetworkInterface { - s.Groups = v - return s -} + // The ARN of the AWS Key Management Service (AWS KMS) CMK used for encryption. + KmsKeyId *string `type:"string"` -// SetIpv6Addresses sets the Ipv6Addresses field's value. -func (s *InstanceNetworkInterface) SetIpv6Addresses(v []*InstanceIpv6Address) *InstanceNetworkInterface { - s.Ipv6Addresses = v - return s -} + // The ID of the snapshot. + SnapshotId *string `type:"string"` -// SetMacAddress sets the MacAddress field's value. -func (s *InstanceNetworkInterface) SetMacAddress(v string) *InstanceNetworkInterface { - s.MacAddress = &v - return s + // The size of the volume, in GiB. + // + // Default: If you're creating the volume from a snapshot and don't specify + // a volume size, the default is the snapshot size. + VolumeSize *int64 `type:"integer"` + + // The volume type. + VolumeType *string `type:"string" enum:"VolumeType"` } -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *InstanceNetworkInterface) SetNetworkInterfaceId(v string) *InstanceNetworkInterface { - s.NetworkInterfaceId = &v - return s +// String returns the string representation +func (s LaunchTemplateEbsBlockDeviceRequest) String() string { + return awsutil.Prettify(s) } -// SetOwnerId sets the OwnerId field's value. -func (s *InstanceNetworkInterface) SetOwnerId(v string) *InstanceNetworkInterface { - s.OwnerId = &v - return s +// GoString returns the string representation +func (s LaunchTemplateEbsBlockDeviceRequest) GoString() string { + return s.String() } -// SetPrivateDnsName sets the PrivateDnsName field's value. -func (s *InstanceNetworkInterface) SetPrivateDnsName(v string) *InstanceNetworkInterface { - s.PrivateDnsName = &v +// SetDeleteOnTermination sets the DeleteOnTermination field's value. +func (s *LaunchTemplateEbsBlockDeviceRequest) SetDeleteOnTermination(v bool) *LaunchTemplateEbsBlockDeviceRequest { + s.DeleteOnTermination = &v return s } -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *InstanceNetworkInterface) SetPrivateIpAddress(v string) *InstanceNetworkInterface { - s.PrivateIpAddress = &v +// SetEncrypted sets the Encrypted field's value. +func (s *LaunchTemplateEbsBlockDeviceRequest) SetEncrypted(v bool) *LaunchTemplateEbsBlockDeviceRequest { + s.Encrypted = &v return s } -// SetPrivateIpAddresses sets the PrivateIpAddresses field's value. -func (s *InstanceNetworkInterface) SetPrivateIpAddresses(v []*InstancePrivateIpAddress) *InstanceNetworkInterface { - s.PrivateIpAddresses = v +// SetIops sets the Iops field's value. +func (s *LaunchTemplateEbsBlockDeviceRequest) SetIops(v int64) *LaunchTemplateEbsBlockDeviceRequest { + s.Iops = &v return s } -// SetSourceDestCheck sets the SourceDestCheck field's value. -func (s *InstanceNetworkInterface) SetSourceDestCheck(v bool) *InstanceNetworkInterface { - s.SourceDestCheck = &v +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *LaunchTemplateEbsBlockDeviceRequest) SetKmsKeyId(v string) *LaunchTemplateEbsBlockDeviceRequest { + s.KmsKeyId = &v return s } -// SetStatus sets the Status field's value. -func (s *InstanceNetworkInterface) SetStatus(v string) *InstanceNetworkInterface { - s.Status = &v +// SetSnapshotId sets the SnapshotId field's value. +func (s *LaunchTemplateEbsBlockDeviceRequest) SetSnapshotId(v string) *LaunchTemplateEbsBlockDeviceRequest { + s.SnapshotId = &v return s } -// SetSubnetId sets the SubnetId field's value. -func (s *InstanceNetworkInterface) SetSubnetId(v string) *InstanceNetworkInterface { - s.SubnetId = &v +// SetVolumeSize sets the VolumeSize field's value. +func (s *LaunchTemplateEbsBlockDeviceRequest) SetVolumeSize(v int64) *LaunchTemplateEbsBlockDeviceRequest { + s.VolumeSize = &v return s } -// SetVpcId sets the VpcId field's value. -func (s *InstanceNetworkInterface) SetVpcId(v string) *InstanceNetworkInterface { - s.VpcId = &v +// SetVolumeType sets the VolumeType field's value. +func (s *LaunchTemplateEbsBlockDeviceRequest) SetVolumeType(v string) *LaunchTemplateEbsBlockDeviceRequest { + s.VolumeType = &v return s } -// Describes association information for an Elastic IP address (IPv4). -type InstanceNetworkInterfaceAssociation struct { +// Describes an elastic inference accelerator. +type LaunchTemplateElasticInferenceAccelerator struct { _ struct{} `type:"structure"` - // The ID of the owner of the Elastic IP address. - IpOwnerId *string `locationName:"ipOwnerId" type:"string"` - - // The public DNS name. - PublicDnsName *string `locationName:"publicDnsName" type:"string"` - - // The public IP address or Elastic IP address bound to the network interface. - PublicIp *string `locationName:"publicIp" type:"string"` + // The type of elastic inference accelerator. The possible values are eia1.medium, + // eia1.large, and eia1.xlarge. + // + // Type is a required field + Type *string `type:"string" required:"true"` } // String returns the string representation -func (s InstanceNetworkInterfaceAssociation) String() string { +func (s LaunchTemplateElasticInferenceAccelerator) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s InstanceNetworkInterfaceAssociation) GoString() string { +func (s LaunchTemplateElasticInferenceAccelerator) GoString() string { return s.String() } -// SetIpOwnerId sets the IpOwnerId field's value. -func (s *InstanceNetworkInterfaceAssociation) SetIpOwnerId(v string) *InstanceNetworkInterfaceAssociation { - s.IpOwnerId = &v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *LaunchTemplateElasticInferenceAccelerator) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LaunchTemplateElasticInferenceAccelerator"} + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } -// SetPublicDnsName sets the PublicDnsName field's value. -func (s *InstanceNetworkInterfaceAssociation) SetPublicDnsName(v string) *InstanceNetworkInterfaceAssociation { - s.PublicDnsName = &v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetPublicIp sets the PublicIp field's value. -func (s *InstanceNetworkInterfaceAssociation) SetPublicIp(v string) *InstanceNetworkInterfaceAssociation { - s.PublicIp = &v +// SetType sets the Type field's value. +func (s *LaunchTemplateElasticInferenceAccelerator) SetType(v string) *LaunchTemplateElasticInferenceAccelerator { + s.Type = &v return s } -// Describes a network interface attachment. -type InstanceNetworkInterfaceAttachment struct { +// Describes an elastic inference accelerator. +type LaunchTemplateElasticInferenceAcceleratorResponse struct { _ struct{} `type:"structure"` - // The time stamp when the attachment initiated. - AttachTime *time.Time `locationName:"attachTime" type:"timestamp"` - - // The ID of the network interface attachment. - AttachmentId *string `locationName:"attachmentId" type:"string"` - - // Indicates whether the network interface is deleted when the instance is terminated. - DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` - - // The index of the device on the instance for the network interface attachment. - DeviceIndex *int64 `locationName:"deviceIndex" type:"integer"` - - // The attachment state. - Status *string `locationName:"status" type:"string" enum:"AttachmentStatus"` + // The type of elastic inference accelerator. The possible values are eia1.medium, + // eia1.large, and eia1.xlarge. + Type *string `locationName:"type" type:"string"` } // String returns the string representation -func (s InstanceNetworkInterfaceAttachment) String() string { +func (s LaunchTemplateElasticInferenceAcceleratorResponse) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s InstanceNetworkInterfaceAttachment) GoString() string { +func (s LaunchTemplateElasticInferenceAcceleratorResponse) GoString() string { return s.String() } -// SetAttachTime sets the AttachTime field's value. -func (s *InstanceNetworkInterfaceAttachment) SetAttachTime(v time.Time) *InstanceNetworkInterfaceAttachment { - s.AttachTime = &v +// SetType sets the Type field's value. +func (s *LaunchTemplateElasticInferenceAcceleratorResponse) SetType(v string) *LaunchTemplateElasticInferenceAcceleratorResponse { + s.Type = &v return s } -// SetAttachmentId sets the AttachmentId field's value. -func (s *InstanceNetworkInterfaceAttachment) SetAttachmentId(v string) *InstanceNetworkInterfaceAttachment { - s.AttachmentId = &v - return s +// Indicates whether an instance is configured for hibernation. +type LaunchTemplateHibernationOptions struct { + _ struct{} `type:"structure"` + + // If this parameter is set to true, the instance is enabled for hibernation; + // otherwise, it is not enabled for hibernation. + Configured *bool `locationName:"configured" type:"boolean"` } -// SetDeleteOnTermination sets the DeleteOnTermination field's value. -func (s *InstanceNetworkInterfaceAttachment) SetDeleteOnTermination(v bool) *InstanceNetworkInterfaceAttachment { - s.DeleteOnTermination = &v - return s +// String returns the string representation +func (s LaunchTemplateHibernationOptions) String() string { + return awsutil.Prettify(s) } -// SetDeviceIndex sets the DeviceIndex field's value. -func (s *InstanceNetworkInterfaceAttachment) SetDeviceIndex(v int64) *InstanceNetworkInterfaceAttachment { - s.DeviceIndex = &v - return s +// GoString returns the string representation +func (s LaunchTemplateHibernationOptions) GoString() string { + return s.String() } -// SetStatus sets the Status field's value. -func (s *InstanceNetworkInterfaceAttachment) SetStatus(v string) *InstanceNetworkInterfaceAttachment { - s.Status = &v +// SetConfigured sets the Configured field's value. +func (s *LaunchTemplateHibernationOptions) SetConfigured(v bool) *LaunchTemplateHibernationOptions { + s.Configured = &v return s } -// Describes a network interface. -type InstanceNetworkInterfaceSpecification struct { +// Indicates whether the instance is configured for hibernation. This parameter +// is valid only if the instance meets the hibernation prerequisites (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#hibernating-prerequisites). +// Hibernation is currently supported only for Amazon Linux. +type LaunchTemplateHibernationOptionsRequest struct { _ struct{} `type:"structure"` - // Indicates whether to assign a public IPv4 address to an instance you launch - // in a VPC. The public IP address can only be assigned to a network interface - // for eth0, and can only be assigned to a new network interface, not an existing - // one. You cannot specify more than one network interface in the request. If - // launching into a default subnet, the default value is true. - AssociatePublicIpAddress *bool `locationName:"associatePublicIpAddress" type:"boolean"` - - // If set to true, the interface is deleted when the instance is terminated. - // You can specify true only if creating a new network interface when launching - // an instance. - DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` - - // The description of the network interface. Applies only if creating a network - // interface when launching an instance. - Description *string `locationName:"description" type:"string"` - - // The index of the device on the instance for the network interface attachment. - // If you are specifying a network interface in a RunInstances request, you - // must provide the device index. - DeviceIndex *int64 `locationName:"deviceIndex" type:"integer"` - - // The IDs of the security groups for the network interface. Applies only if - // creating a network interface when launching an instance. - Groups []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"` - - // A number of IPv6 addresses to assign to the network interface. Amazon EC2 - // chooses the IPv6 addresses from the range of the subnet. You cannot specify - // this option and the option to assign specific IPv6 addresses in the same - // request. You can specify this option if you've specified a minimum number - // of instances to launch. - Ipv6AddressCount *int64 `locationName:"ipv6AddressCount" type:"integer"` - - // One or more IPv6 addresses to assign to the network interface. You cannot - // specify this option and the option to assign a number of IPv6 addresses in - // the same request. You cannot specify this option if you've specified a minimum - // number of instances to launch. - Ipv6Addresses []*InstanceIpv6Address `locationName:"ipv6AddressesSet" queryName:"Ipv6Addresses" locationNameList:"item" type:"list"` - - // The ID of the network interface. - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` - - // The private IPv4 address of the network interface. Applies only if creating - // a network interface when launching an instance. You cannot specify this option - // if you're launching more than one instance in a RunInstances request. - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` - - // One or more private IPv4 addresses to assign to the network interface. Only - // one private IPv4 address can be designated as primary. You cannot specify - // this option if you're launching more than one instance in a RunInstances - // request. - PrivateIpAddresses []*PrivateIpAddressSpecification `locationName:"privateIpAddressesSet" queryName:"PrivateIpAddresses" locationNameList:"item" type:"list"` - - // The number of secondary private IPv4 addresses. You can't specify this option - // and specify more than one private IP address using the private IP addresses - // option. You cannot specify this option if you're launching more than one - // instance in a RunInstances request. - SecondaryPrivateIpAddressCount *int64 `locationName:"secondaryPrivateIpAddressCount" type:"integer"` - - // The ID of the subnet associated with the network string. Applies only if - // creating a network interface when launching an instance. - SubnetId *string `locationName:"subnetId" type:"string"` + // If you set this parameter to true, the instance is enabled for hibernation. + // + // Default: false + Configured *bool `type:"boolean"` } // String returns the string representation -func (s InstanceNetworkInterfaceSpecification) String() string { +func (s LaunchTemplateHibernationOptionsRequest) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s InstanceNetworkInterfaceSpecification) GoString() string { +func (s LaunchTemplateHibernationOptionsRequest) GoString() string { return s.String() } -// SetAssociatePublicIpAddress sets the AssociatePublicIpAddress field's value. -func (s *InstanceNetworkInterfaceSpecification) SetAssociatePublicIpAddress(v bool) *InstanceNetworkInterfaceSpecification { - s.AssociatePublicIpAddress = &v +// SetConfigured sets the Configured field's value. +func (s *LaunchTemplateHibernationOptionsRequest) SetConfigured(v bool) *LaunchTemplateHibernationOptionsRequest { + s.Configured = &v return s } -// SetDeleteOnTermination sets the DeleteOnTermination field's value. -func (s *InstanceNetworkInterfaceSpecification) SetDeleteOnTermination(v bool) *InstanceNetworkInterfaceSpecification { - s.DeleteOnTermination = &v - return s -} +// Describes an IAM instance profile. +type LaunchTemplateIamInstanceProfileSpecification struct { + _ struct{} `type:"structure"` -// SetDescription sets the Description field's value. -func (s *InstanceNetworkInterfaceSpecification) SetDescription(v string) *InstanceNetworkInterfaceSpecification { - s.Description = &v - return s + // The Amazon Resource Name (ARN) of the instance profile. + Arn *string `locationName:"arn" type:"string"` + + // The name of the instance profile. + Name *string `locationName:"name" type:"string"` } -// SetDeviceIndex sets the DeviceIndex field's value. -func (s *InstanceNetworkInterfaceSpecification) SetDeviceIndex(v int64) *InstanceNetworkInterfaceSpecification { - s.DeviceIndex = &v - return s +// String returns the string representation +func (s LaunchTemplateIamInstanceProfileSpecification) String() string { + return awsutil.Prettify(s) } -// SetGroups sets the Groups field's value. -func (s *InstanceNetworkInterfaceSpecification) SetGroups(v []*string) *InstanceNetworkInterfaceSpecification { - s.Groups = v - return s +// GoString returns the string representation +func (s LaunchTemplateIamInstanceProfileSpecification) GoString() string { + return s.String() } -// SetIpv6AddressCount sets the Ipv6AddressCount field's value. -func (s *InstanceNetworkInterfaceSpecification) SetIpv6AddressCount(v int64) *InstanceNetworkInterfaceSpecification { - s.Ipv6AddressCount = &v +// SetArn sets the Arn field's value. +func (s *LaunchTemplateIamInstanceProfileSpecification) SetArn(v string) *LaunchTemplateIamInstanceProfileSpecification { + s.Arn = &v return s } -// SetIpv6Addresses sets the Ipv6Addresses field's value. -func (s *InstanceNetworkInterfaceSpecification) SetIpv6Addresses(v []*InstanceIpv6Address) *InstanceNetworkInterfaceSpecification { - s.Ipv6Addresses = v +// SetName sets the Name field's value. +func (s *LaunchTemplateIamInstanceProfileSpecification) SetName(v string) *LaunchTemplateIamInstanceProfileSpecification { + s.Name = &v return s } -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *InstanceNetworkInterfaceSpecification) SetNetworkInterfaceId(v string) *InstanceNetworkInterfaceSpecification { - s.NetworkInterfaceId = &v - return s +// An IAM instance profile. +type LaunchTemplateIamInstanceProfileSpecificationRequest struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the instance profile. + Arn *string `type:"string"` + + // The name of the instance profile. + Name *string `type:"string"` } -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *InstanceNetworkInterfaceSpecification) SetPrivateIpAddress(v string) *InstanceNetworkInterfaceSpecification { - s.PrivateIpAddress = &v - return s +// String returns the string representation +func (s LaunchTemplateIamInstanceProfileSpecificationRequest) String() string { + return awsutil.Prettify(s) } -// SetPrivateIpAddresses sets the PrivateIpAddresses field's value. -func (s *InstanceNetworkInterfaceSpecification) SetPrivateIpAddresses(v []*PrivateIpAddressSpecification) *InstanceNetworkInterfaceSpecification { - s.PrivateIpAddresses = v - return s +// GoString returns the string representation +func (s LaunchTemplateIamInstanceProfileSpecificationRequest) GoString() string { + return s.String() } -// SetSecondaryPrivateIpAddressCount sets the SecondaryPrivateIpAddressCount field's value. -func (s *InstanceNetworkInterfaceSpecification) SetSecondaryPrivateIpAddressCount(v int64) *InstanceNetworkInterfaceSpecification { - s.SecondaryPrivateIpAddressCount = &v +// SetArn sets the Arn field's value. +func (s *LaunchTemplateIamInstanceProfileSpecificationRequest) SetArn(v string) *LaunchTemplateIamInstanceProfileSpecificationRequest { + s.Arn = &v return s } -// SetSubnetId sets the SubnetId field's value. -func (s *InstanceNetworkInterfaceSpecification) SetSubnetId(v string) *InstanceNetworkInterfaceSpecification { - s.SubnetId = &v +// SetName sets the Name field's value. +func (s *LaunchTemplateIamInstanceProfileSpecificationRequest) SetName(v string) *LaunchTemplateIamInstanceProfileSpecificationRequest { + s.Name = &v return s } -// Describes a private IPv4 address. -type InstancePrivateIpAddress struct { +// The market (purchasing) option for the instances. +type LaunchTemplateInstanceMarketOptions struct { _ struct{} `type:"structure"` - // The association information for an Elastic IP address for the network interface. - Association *InstanceNetworkInterfaceAssociation `locationName:"association" type:"structure"` - - // Indicates whether this IPv4 address is the primary private IP address of - // the network interface. - Primary *bool `locationName:"primary" type:"boolean"` - - // The private IPv4 DNS name. - PrivateDnsName *string `locationName:"privateDnsName" type:"string"` + // The market type. + MarketType *string `locationName:"marketType" type:"string" enum:"MarketType"` - // The private IPv4 address of the network interface. - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` + // The options for Spot Instances. + SpotOptions *LaunchTemplateSpotMarketOptions `locationName:"spotOptions" type:"structure"` } // String returns the string representation -func (s InstancePrivateIpAddress) String() string { +func (s LaunchTemplateInstanceMarketOptions) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s InstancePrivateIpAddress) GoString() string { +func (s LaunchTemplateInstanceMarketOptions) GoString() string { return s.String() } -// SetAssociation sets the Association field's value. -func (s *InstancePrivateIpAddress) SetAssociation(v *InstanceNetworkInterfaceAssociation) *InstancePrivateIpAddress { - s.Association = v - return s -} - -// SetPrimary sets the Primary field's value. -func (s *InstancePrivateIpAddress) SetPrimary(v bool) *InstancePrivateIpAddress { - s.Primary = &v - return s -} - -// SetPrivateDnsName sets the PrivateDnsName field's value. -func (s *InstancePrivateIpAddress) SetPrivateDnsName(v string) *InstancePrivateIpAddress { - s.PrivateDnsName = &v +// SetMarketType sets the MarketType field's value. +func (s *LaunchTemplateInstanceMarketOptions) SetMarketType(v string) *LaunchTemplateInstanceMarketOptions { + s.MarketType = &v return s } -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *InstancePrivateIpAddress) SetPrivateIpAddress(v string) *InstancePrivateIpAddress { - s.PrivateIpAddress = &v +// SetSpotOptions sets the SpotOptions field's value. +func (s *LaunchTemplateInstanceMarketOptions) SetSpotOptions(v *LaunchTemplateSpotMarketOptions) *LaunchTemplateInstanceMarketOptions { + s.SpotOptions = v return s } -// Describes the current state of an instance. -type InstanceState struct { +// The market (purchasing) option for the instances. +type LaunchTemplateInstanceMarketOptionsRequest struct { _ struct{} `type:"structure"` - // The low byte represents the state. The high byte is used for internal purposes - // and should be ignored. - // - // * 0 : pending - // - // * 16 : running - // - // * 32 : shutting-down - // - // * 48 : terminated - // - // * 64 : stopping - // - // * 80 : stopped - Code *int64 `locationName:"code" type:"integer"` + // The market type. + MarketType *string `type:"string" enum:"MarketType"` - // The current state of the instance. - Name *string `locationName:"name" type:"string" enum:"InstanceStateName"` + // The options for Spot Instances. + SpotOptions *LaunchTemplateSpotMarketOptionsRequest `type:"structure"` } // String returns the string representation -func (s InstanceState) String() string { +func (s LaunchTemplateInstanceMarketOptionsRequest) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s InstanceState) GoString() string { +func (s LaunchTemplateInstanceMarketOptionsRequest) GoString() string { return s.String() } -// SetCode sets the Code field's value. -func (s *InstanceState) SetCode(v int64) *InstanceState { - s.Code = &v +// SetMarketType sets the MarketType field's value. +func (s *LaunchTemplateInstanceMarketOptionsRequest) SetMarketType(v string) *LaunchTemplateInstanceMarketOptionsRequest { + s.MarketType = &v return s } -// SetName sets the Name field's value. -func (s *InstanceState) SetName(v string) *InstanceState { - s.Name = &v +// SetSpotOptions sets the SpotOptions field's value. +func (s *LaunchTemplateInstanceMarketOptionsRequest) SetSpotOptions(v *LaunchTemplateSpotMarketOptionsRequest) *LaunchTemplateInstanceMarketOptionsRequest { + s.SpotOptions = v return s } -// Describes an instance state change. -type InstanceStateChange struct { +// Describes a network interface. +type LaunchTemplateInstanceNetworkInterfaceSpecification struct { _ struct{} `type:"structure"` - // The current state of the instance. - CurrentState *InstanceState `locationName:"currentState" type:"structure"` + // Indicates whether to associate a public IPv4 address with eth0 for a new + // network interface. + AssociatePublicIpAddress *bool `locationName:"associatePublicIpAddress" type:"boolean"` - // The ID of the instance. - InstanceId *string `locationName:"instanceId" type:"string"` + // Indicates whether the network interface is deleted when the instance is terminated. + DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` - // The previous state of the instance. - PreviousState *InstanceState `locationName:"previousState" type:"structure"` + // A description for the network interface. + Description *string `locationName:"description" type:"string"` + + // The device index for the network interface attachment. + DeviceIndex *int64 `locationName:"deviceIndex" type:"integer"` + + // The IDs of one or more security groups. + Groups []*string `locationName:"groupSet" locationNameList:"groupId" type:"list"` + + // The number of IPv6 addresses for the network interface. + Ipv6AddressCount *int64 `locationName:"ipv6AddressCount" type:"integer"` + + // The IPv6 addresses for the network interface. + Ipv6Addresses []*InstanceIpv6Address `locationName:"ipv6AddressesSet" locationNameList:"item" type:"list"` + + // The ID of the network interface. + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` + + // The primary private IPv4 address of the network interface. + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` + + // One or more private IPv4 addresses. + PrivateIpAddresses []*PrivateIpAddressSpecification `locationName:"privateIpAddressesSet" locationNameList:"item" type:"list"` + + // The number of secondary private IPv4 addresses for the network interface. + SecondaryPrivateIpAddressCount *int64 `locationName:"secondaryPrivateIpAddressCount" type:"integer"` + + // The ID of the subnet for the network interface. + SubnetId *string `locationName:"subnetId" type:"string"` } // String returns the string representation -func (s InstanceStateChange) String() string { +func (s LaunchTemplateInstanceNetworkInterfaceSpecification) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s InstanceStateChange) GoString() string { +func (s LaunchTemplateInstanceNetworkInterfaceSpecification) GoString() string { return s.String() } -// SetCurrentState sets the CurrentState field's value. -func (s *InstanceStateChange) SetCurrentState(v *InstanceState) *InstanceStateChange { - s.CurrentState = v +// SetAssociatePublicIpAddress sets the AssociatePublicIpAddress field's value. +func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetAssociatePublicIpAddress(v bool) *LaunchTemplateInstanceNetworkInterfaceSpecification { + s.AssociatePublicIpAddress = &v return s } -// SetInstanceId sets the InstanceId field's value. -func (s *InstanceStateChange) SetInstanceId(v string) *InstanceStateChange { - s.InstanceId = &v +// SetDeleteOnTermination sets the DeleteOnTermination field's value. +func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetDeleteOnTermination(v bool) *LaunchTemplateInstanceNetworkInterfaceSpecification { + s.DeleteOnTermination = &v return s } -// SetPreviousState sets the PreviousState field's value. -func (s *InstanceStateChange) SetPreviousState(v *InstanceState) *InstanceStateChange { - s.PreviousState = v +// SetDescription sets the Description field's value. +func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetDescription(v string) *LaunchTemplateInstanceNetworkInterfaceSpecification { + s.Description = &v return s } -// Describes the status of an instance. -type InstanceStatus struct { - _ struct{} `type:"structure"` - - // The Availability Zone of the instance. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // Any scheduled events associated with the instance. - Events []*InstanceStatusEvent `locationName:"eventsSet" locationNameList:"item" type:"list"` - - // The ID of the instance. - InstanceId *string `locationName:"instanceId" type:"string"` - - // The intended state of the instance. DescribeInstanceStatus requires that - // an instance be in the running state. - InstanceState *InstanceState `locationName:"instanceState" type:"structure"` - - // Reports impaired functionality that stems from issues internal to the instance, - // such as impaired reachability. - InstanceStatus *InstanceStatusSummary `locationName:"instanceStatus" type:"structure"` - - // Reports impaired functionality that stems from issues related to the systems - // that support an instance, such as hardware failures and network connectivity - // problems. - SystemStatus *InstanceStatusSummary `locationName:"systemStatus" type:"structure"` +// SetDeviceIndex sets the DeviceIndex field's value. +func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetDeviceIndex(v int64) *LaunchTemplateInstanceNetworkInterfaceSpecification { + s.DeviceIndex = &v + return s } -// String returns the string representation -func (s InstanceStatus) String() string { - return awsutil.Prettify(s) +// SetGroups sets the Groups field's value. +func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetGroups(v []*string) *LaunchTemplateInstanceNetworkInterfaceSpecification { + s.Groups = v + return s } -// GoString returns the string representation -func (s InstanceStatus) GoString() string { - return s.String() +// SetIpv6AddressCount sets the Ipv6AddressCount field's value. +func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetIpv6AddressCount(v int64) *LaunchTemplateInstanceNetworkInterfaceSpecification { + s.Ipv6AddressCount = &v + return s } -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *InstanceStatus) SetAvailabilityZone(v string) *InstanceStatus { - s.AvailabilityZone = &v +// SetIpv6Addresses sets the Ipv6Addresses field's value. +func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetIpv6Addresses(v []*InstanceIpv6Address) *LaunchTemplateInstanceNetworkInterfaceSpecification { + s.Ipv6Addresses = v return s } -// SetEvents sets the Events field's value. -func (s *InstanceStatus) SetEvents(v []*InstanceStatusEvent) *InstanceStatus { - s.Events = v +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetNetworkInterfaceId(v string) *LaunchTemplateInstanceNetworkInterfaceSpecification { + s.NetworkInterfaceId = &v return s } -// SetInstanceId sets the InstanceId field's value. -func (s *InstanceStatus) SetInstanceId(v string) *InstanceStatus { - s.InstanceId = &v +// SetPrivateIpAddress sets the PrivateIpAddress field's value. +func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetPrivateIpAddress(v string) *LaunchTemplateInstanceNetworkInterfaceSpecification { + s.PrivateIpAddress = &v return s } -// SetInstanceState sets the InstanceState field's value. -func (s *InstanceStatus) SetInstanceState(v *InstanceState) *InstanceStatus { - s.InstanceState = v +// SetPrivateIpAddresses sets the PrivateIpAddresses field's value. +func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetPrivateIpAddresses(v []*PrivateIpAddressSpecification) *LaunchTemplateInstanceNetworkInterfaceSpecification { + s.PrivateIpAddresses = v return s } -// SetInstanceStatus sets the InstanceStatus field's value. -func (s *InstanceStatus) SetInstanceStatus(v *InstanceStatusSummary) *InstanceStatus { - s.InstanceStatus = v +// SetSecondaryPrivateIpAddressCount sets the SecondaryPrivateIpAddressCount field's value. +func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetSecondaryPrivateIpAddressCount(v int64) *LaunchTemplateInstanceNetworkInterfaceSpecification { + s.SecondaryPrivateIpAddressCount = &v return s } -// SetSystemStatus sets the SystemStatus field's value. -func (s *InstanceStatus) SetSystemStatus(v *InstanceStatusSummary) *InstanceStatus { - s.SystemStatus = v +// SetSubnetId sets the SubnetId field's value. +func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetSubnetId(v string) *LaunchTemplateInstanceNetworkInterfaceSpecification { + s.SubnetId = &v return s } -// Describes the instance status. -type InstanceStatusDetails struct { +// The parameters for a network interface. +type LaunchTemplateInstanceNetworkInterfaceSpecificationRequest struct { _ struct{} `type:"structure"` - // The time when a status check failed. For an instance that was launched and - // impaired, this is the time when the instance was launched. - ImpairedSince *time.Time `locationName:"impairedSince" type:"timestamp"` - - // The type of instance status. - Name *string `locationName:"name" type:"string" enum:"StatusName"` + // Associates a public IPv4 address with eth0 for a new network interface. + AssociatePublicIpAddress *bool `type:"boolean"` - // The status. - Status *string `locationName:"status" type:"string" enum:"StatusType"` -} + // Indicates whether the network interface is deleted when the instance is terminated. + DeleteOnTermination *bool `type:"boolean"` -// String returns the string representation -func (s InstanceStatusDetails) String() string { - return awsutil.Prettify(s) -} + // A description for the network interface. + Description *string `type:"string"` -// GoString returns the string representation -func (s InstanceStatusDetails) GoString() string { - return s.String() -} + // The device index for the network interface attachment. + DeviceIndex *int64 `type:"integer"` -// SetImpairedSince sets the ImpairedSince field's value. -func (s *InstanceStatusDetails) SetImpairedSince(v time.Time) *InstanceStatusDetails { - s.ImpairedSince = &v - return s -} + // The IDs of one or more security groups. + Groups []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"` -// SetName sets the Name field's value. -func (s *InstanceStatusDetails) SetName(v string) *InstanceStatusDetails { - s.Name = &v - return s -} + // The number of IPv6 addresses to assign to a 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 `type:"integer"` -// SetStatus sets the Status field's value. -func (s *InstanceStatusDetails) SetStatus(v string) *InstanceStatusDetails { - s.Status = &v - return s -} + // One or more specific IPv6 addresses from the IPv6 CIDR block range of your + // subnet. You can't use this option if you're specifying a number of IPv6 addresses. + Ipv6Addresses []*InstanceIpv6AddressRequest `locationNameList:"InstanceIpv6Address" type:"list"` -// Describes a scheduled event for an instance. -type InstanceStatusEvent struct { - _ struct{} `type:"structure"` + // The ID of the network interface. + NetworkInterfaceId *string `type:"string"` - // The event code. - Code *string `locationName:"code" type:"string" enum:"EventCode"` + // The primary private IPv4 address of the network interface. + PrivateIpAddress *string `type:"string"` - // A description of the event. - // - // After a scheduled event is completed, it can still be described for up to - // a week. If the event has been completed, this description starts with the - // following text: [Completed]. - Description *string `locationName:"description" type:"string"` + // One or more private IPv4 addresses. + PrivateIpAddresses []*PrivateIpAddressSpecification `locationNameList:"item" type:"list"` - // The latest scheduled end time for the event. - NotAfter *time.Time `locationName:"notAfter" type:"timestamp"` + // The number of secondary private IPv4 addresses to assign to a network interface. + SecondaryPrivateIpAddressCount *int64 `type:"integer"` - // The earliest scheduled start time for the event. - NotBefore *time.Time `locationName:"notBefore" type:"timestamp"` + // The ID of the subnet for the network interface. + SubnetId *string `type:"string"` } // String returns the string representation -func (s InstanceStatusEvent) String() string { +func (s LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s InstanceStatusEvent) GoString() string { +func (s LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) GoString() string { return s.String() } -// SetCode sets the Code field's value. -func (s *InstanceStatusEvent) SetCode(v string) *InstanceStatusEvent { - s.Code = &v +// SetAssociatePublicIpAddress sets the AssociatePublicIpAddress field's value. +func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetAssociatePublicIpAddress(v bool) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { + s.AssociatePublicIpAddress = &v + return s +} + +// SetDeleteOnTermination sets the DeleteOnTermination field's value. +func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetDeleteOnTermination(v bool) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { + s.DeleteOnTermination = &v return s } // SetDescription sets the Description field's value. -func (s *InstanceStatusEvent) SetDescription(v string) *InstanceStatusEvent { +func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetDescription(v string) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { s.Description = &v return s } -// SetNotAfter sets the NotAfter field's value. -func (s *InstanceStatusEvent) SetNotAfter(v time.Time) *InstanceStatusEvent { - s.NotAfter = &v +// SetDeviceIndex sets the DeviceIndex field's value. +func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetDeviceIndex(v int64) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { + s.DeviceIndex = &v return s } -// SetNotBefore sets the NotBefore field's value. -func (s *InstanceStatusEvent) SetNotBefore(v time.Time) *InstanceStatusEvent { - s.NotBefore = &v +// SetGroups sets the Groups field's value. +func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetGroups(v []*string) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { + s.Groups = v return s } -// Describes the status of an instance. -type InstanceStatusSummary struct { - _ struct{} `type:"structure"` +// SetIpv6AddressCount sets the Ipv6AddressCount field's value. +func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetIpv6AddressCount(v int64) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { + s.Ipv6AddressCount = &v + return s +} - // The system instance health or application instance health. - Details []*InstanceStatusDetails `locationName:"details" locationNameList:"item" type:"list"` +// SetIpv6Addresses sets the Ipv6Addresses field's value. +func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetIpv6Addresses(v []*InstanceIpv6AddressRequest) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { + s.Ipv6Addresses = v + return s +} - // The status. - Status *string `locationName:"status" type:"string" enum:"SummaryStatus"` +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetNetworkInterfaceId(v string) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { + s.NetworkInterfaceId = &v + return s } -// String returns the string representation -func (s InstanceStatusSummary) String() string { - return awsutil.Prettify(s) +// SetPrivateIpAddress sets the PrivateIpAddress field's value. +func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetPrivateIpAddress(v string) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { + s.PrivateIpAddress = &v + return s } -// GoString returns the string representation -func (s InstanceStatusSummary) GoString() string { - return s.String() +// SetPrivateIpAddresses sets the PrivateIpAddresses field's value. +func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetPrivateIpAddresses(v []*PrivateIpAddressSpecification) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { + s.PrivateIpAddresses = v + return s } -// SetDetails sets the Details field's value. -func (s *InstanceStatusSummary) SetDetails(v []*InstanceStatusDetails) *InstanceStatusSummary { - s.Details = v +// SetSecondaryPrivateIpAddressCount sets the SecondaryPrivateIpAddressCount field's value. +func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetSecondaryPrivateIpAddressCount(v int64) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { + s.SecondaryPrivateIpAddressCount = &v return s } -// SetStatus sets the Status field's value. -func (s *InstanceStatusSummary) SetStatus(v string) *InstanceStatusSummary { - s.Status = &v +// SetSubnetId sets the SubnetId field's value. +func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetSubnetId(v string) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { + s.SubnetId = &v return s } -// Describes an internet gateway. -type InternetGateway struct { +// Describes a license configuration. +type LaunchTemplateLicenseConfiguration struct { _ struct{} `type:"structure"` - // Any VPCs attached to the internet gateway. - Attachments []*InternetGatewayAttachment `locationName:"attachmentSet" locationNameList:"item" type:"list"` - - // The ID of the internet gateway. - InternetGatewayId *string `locationName:"internetGatewayId" type:"string"` - - // Any tags assigned to the internet gateway. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + // The Amazon Resource Name (ARN) of the license configuration. + LicenseConfigurationArn *string `locationName:"licenseConfigurationArn" type:"string"` } // String returns the string representation -func (s InternetGateway) String() string { +func (s LaunchTemplateLicenseConfiguration) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s InternetGateway) GoString() string { +func (s LaunchTemplateLicenseConfiguration) GoString() string { return s.String() } -// SetAttachments sets the Attachments field's value. -func (s *InternetGateway) SetAttachments(v []*InternetGatewayAttachment) *InternetGateway { - s.Attachments = v - return s -} - -// SetInternetGatewayId sets the InternetGatewayId field's value. -func (s *InternetGateway) SetInternetGatewayId(v string) *InternetGateway { - s.InternetGatewayId = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *InternetGateway) SetTags(v []*Tag) *InternetGateway { - s.Tags = v +// SetLicenseConfigurationArn sets the LicenseConfigurationArn field's value. +func (s *LaunchTemplateLicenseConfiguration) SetLicenseConfigurationArn(v string) *LaunchTemplateLicenseConfiguration { + s.LicenseConfigurationArn = &v return s } -// Describes the attachment of a VPC to an internet gateway or an egress-only -// internet gateway. -type InternetGatewayAttachment struct { +// Describes a license configuration. +type LaunchTemplateLicenseConfigurationRequest struct { _ struct{} `type:"structure"` - // The current state of the attachment. For an internet gateway, the state is - // available when attached to a VPC; otherwise, this value is not returned. - State *string `locationName:"state" type:"string" enum:"AttachmentStatus"` - - // The ID of the VPC. - VpcId *string `locationName:"vpcId" type:"string"` + // The Amazon Resource Name (ARN) of the license configuration. + LicenseConfigurationArn *string `type:"string"` } // String returns the string representation -func (s InternetGatewayAttachment) String() string { +func (s LaunchTemplateLicenseConfigurationRequest) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s InternetGatewayAttachment) GoString() string { +func (s LaunchTemplateLicenseConfigurationRequest) GoString() string { return s.String() } -// SetState sets the State field's value. -func (s *InternetGatewayAttachment) SetState(v string) *InternetGatewayAttachment { - s.State = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *InternetGatewayAttachment) SetVpcId(v string) *InternetGatewayAttachment { - s.VpcId = &v +// SetLicenseConfigurationArn sets the LicenseConfigurationArn field's value. +func (s *LaunchTemplateLicenseConfigurationRequest) SetLicenseConfigurationArn(v string) *LaunchTemplateLicenseConfigurationRequest { + s.LicenseConfigurationArn = &v return s } -// Describes a set of permissions for a security group rule. -type IpPermission struct { +// Describes overrides for a launch template. +type LaunchTemplateOverrides struct { _ struct{} `type:"structure"` - // The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 - // type number. 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 IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)). - // - // [EC2-VPC only] Use -1 to specify all protocols. When authorizing security - // group rules, specifying -1 or a protocol number other than tcp, udp, icmp, - // or 58 (ICMPv6) allows traffic on all ports, regardless of any port range - // you specify. For tcp, udp, and icmp, you must specify a port range. For 58 - // (ICMPv6), you can optionally specify a port range; if you don't, traffic - // for all types and codes is allowed when authorizing rules. - IpProtocol *string `locationName:"ipProtocol" type:"string"` + // The Availability Zone in which to launch the instances. + AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - // One or more IPv4 ranges. - IpRanges []*IpRange `locationName:"ipRanges" locationNameList:"item" type:"list"` + // The instance type. + InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` - // [EC2-VPC only] One or more IPv6 ranges. - Ipv6Ranges []*Ipv6Range `locationName:"ipv6Ranges" locationNameList:"item" type:"list"` + // 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. + Priority *float64 `locationName:"priority" type:"double"` - // (EC2-VPC only; valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress - // and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. - // In an AuthorizeSecurityGroupEgress request, this is the AWS service that - // you want to access through a VPC endpoint from instances associated with - // the security group. - PrefixListIds []*PrefixListId `locationName:"prefixListIds" locationNameList:"item" type:"list"` + // The maximum price per unit hour that you are willing to pay for a Spot Instance. + SpotPrice *string `locationName:"spotPrice" 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 for the specified ICMP type. - // If you specify all ICMP/ICMPv6 types, you must specify all codes. - ToPort *int64 `locationName:"toPort" type:"integer"` + // The ID of the subnet in which to launch the instances. + SubnetId *string `locationName:"subnetId" type:"string"` - // One or more security group and AWS account ID pairs. - UserIdGroupPairs []*UserIdGroupPair `locationName:"groups" locationNameList:"item" type:"list"` + // The number of units provided by the specified instance type. + WeightedCapacity *float64 `locationName:"weightedCapacity" type:"double"` } // String returns the string representation -func (s IpPermission) String() string { +func (s LaunchTemplateOverrides) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s IpPermission) GoString() string { +func (s LaunchTemplateOverrides) GoString() string { return s.String() } -// SetFromPort sets the FromPort field's value. -func (s *IpPermission) SetFromPort(v int64) *IpPermission { - s.FromPort = &v - return s -} - -// SetIpProtocol sets the IpProtocol field's value. -func (s *IpPermission) SetIpProtocol(v string) *IpPermission { - s.IpProtocol = &v +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *LaunchTemplateOverrides) SetAvailabilityZone(v string) *LaunchTemplateOverrides { + s.AvailabilityZone = &v return s } -// SetIpRanges sets the IpRanges field's value. -func (s *IpPermission) SetIpRanges(v []*IpRange) *IpPermission { - s.IpRanges = v +// SetInstanceType sets the InstanceType field's value. +func (s *LaunchTemplateOverrides) SetInstanceType(v string) *LaunchTemplateOverrides { + s.InstanceType = &v return s } -// SetIpv6Ranges sets the Ipv6Ranges field's value. -func (s *IpPermission) SetIpv6Ranges(v []*Ipv6Range) *IpPermission { - s.Ipv6Ranges = v +// SetPriority sets the Priority field's value. +func (s *LaunchTemplateOverrides) SetPriority(v float64) *LaunchTemplateOverrides { + s.Priority = &v return s } -// SetPrefixListIds sets the PrefixListIds field's value. -func (s *IpPermission) SetPrefixListIds(v []*PrefixListId) *IpPermission { - s.PrefixListIds = v +// SetSpotPrice sets the SpotPrice field's value. +func (s *LaunchTemplateOverrides) SetSpotPrice(v string) *LaunchTemplateOverrides { + s.SpotPrice = &v return s } -// SetToPort sets the ToPort field's value. -func (s *IpPermission) SetToPort(v int64) *IpPermission { - s.ToPort = &v +// SetSubnetId sets the SubnetId field's value. +func (s *LaunchTemplateOverrides) SetSubnetId(v string) *LaunchTemplateOverrides { + s.SubnetId = &v return s } -// SetUserIdGroupPairs sets the UserIdGroupPairs field's value. -func (s *IpPermission) SetUserIdGroupPairs(v []*UserIdGroupPair) *IpPermission { - s.UserIdGroupPairs = v +// SetWeightedCapacity sets the WeightedCapacity field's value. +func (s *LaunchTemplateOverrides) SetWeightedCapacity(v float64) *LaunchTemplateOverrides { + s.WeightedCapacity = &v return s } -// Describes an IPv4 range. -type IpRange struct { +// Describes the placement of an instance. +type LaunchTemplatePlacement struct { _ struct{} `type:"structure"` - // The IPv4 CIDR range. You can either specify a CIDR range or a source security - // group, not both. To specify a single IPv4 address, use the /32 prefix length. - CidrIp *string `locationName:"cidrIp" type:"string"` + // The affinity setting for the instance on the Dedicated Host. + Affinity *string `locationName:"affinity" type:"string"` - // A description for the security group rule that references this IPv4 address - // range. - // - // Constraints: Up to 255 characters in length. Allowed characters are a-z, - // A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$* - Description *string `locationName:"description" type:"string"` + // The Availability Zone of the instance. + AvailabilityZone *string `locationName:"availabilityZone" type:"string"` + + // The name of the placement group for the instance. + GroupName *string `locationName:"groupName" type:"string"` + + // The ID of the Dedicated Host for the instance. + HostId *string `locationName:"hostId" type:"string"` + + // Reserved for future use. + SpreadDomain *string `locationName:"spreadDomain" type:"string"` + + // The tenancy of the instance (if the instance is running in a VPC). An instance + // with a tenancy of dedicated runs on single-tenant hardware. + Tenancy *string `locationName:"tenancy" type:"string" enum:"Tenancy"` } // String returns the string representation -func (s IpRange) String() string { +func (s LaunchTemplatePlacement) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s IpRange) GoString() string { +func (s LaunchTemplatePlacement) GoString() string { return s.String() } -// SetCidrIp sets the CidrIp field's value. -func (s *IpRange) SetCidrIp(v string) *IpRange { - s.CidrIp = &v +// SetAffinity sets the Affinity field's value. +func (s *LaunchTemplatePlacement) SetAffinity(v string) *LaunchTemplatePlacement { + s.Affinity = &v return s } -// SetDescription sets the Description field's value. -func (s *IpRange) SetDescription(v string) *IpRange { - s.Description = &v +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *LaunchTemplatePlacement) SetAvailabilityZone(v string) *LaunchTemplatePlacement { + s.AvailabilityZone = &v return s } -// Describes an IPv6 CIDR block. -type Ipv6CidrBlock struct { - _ struct{} `type:"structure"` - - // The IPv6 CIDR block. - Ipv6CidrBlock *string `locationName:"ipv6CidrBlock" type:"string"` +// SetGroupName sets the GroupName field's value. +func (s *LaunchTemplatePlacement) SetGroupName(v string) *LaunchTemplatePlacement { + s.GroupName = &v + return s } -// String returns the string representation -func (s Ipv6CidrBlock) String() string { - return awsutil.Prettify(s) +// SetHostId sets the HostId field's value. +func (s *LaunchTemplatePlacement) SetHostId(v string) *LaunchTemplatePlacement { + s.HostId = &v + return s } -// GoString returns the string representation -func (s Ipv6CidrBlock) GoString() string { - return s.String() +// SetSpreadDomain sets the SpreadDomain field's value. +func (s *LaunchTemplatePlacement) SetSpreadDomain(v string) *LaunchTemplatePlacement { + s.SpreadDomain = &v + return s } -// SetIpv6CidrBlock sets the Ipv6CidrBlock field's value. -func (s *Ipv6CidrBlock) SetIpv6CidrBlock(v string) *Ipv6CidrBlock { - s.Ipv6CidrBlock = &v +// SetTenancy sets the Tenancy field's value. +func (s *LaunchTemplatePlacement) SetTenancy(v string) *LaunchTemplatePlacement { + s.Tenancy = &v return s } -// [EC2-VPC only] Describes an IPv6 range. -type Ipv6Range struct { +// Describes the placement of an instance. +type LaunchTemplatePlacementRequest struct { _ struct{} `type:"structure"` - // The IPv6 CIDR range. You can either specify a CIDR range or a source security - // group, not both. To specify a single IPv6 address, use the /128 prefix length. - CidrIpv6 *string `locationName:"cidrIpv6" type:"string"` + // The affinity setting for an instance on a Dedicated Host. + Affinity *string `type:"string"` - // A description for the security group rule that references this IPv6 address - // range. - // - // Constraints: Up to 255 characters in length. Allowed characters are a-z, - // A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$* - Description *string `locationName:"description" type:"string"` + // The Availability Zone for the instance. + AvailabilityZone *string `type:"string"` + + // The name of the placement group for the instance. + GroupName *string `type:"string"` + + // The ID of the Dedicated Host for the instance. + HostId *string `type:"string"` + + // Reserved for future use. + SpreadDomain *string `type:"string"` + + // The tenancy of the instance (if the instance is running in a VPC). An instance + // with a tenancy of dedicated runs on single-tenant hardware. + Tenancy *string `type:"string" enum:"Tenancy"` } // String returns the string representation -func (s Ipv6Range) String() string { +func (s LaunchTemplatePlacementRequest) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Ipv6Range) GoString() string { +func (s LaunchTemplatePlacementRequest) GoString() string { return s.String() } -// SetCidrIpv6 sets the CidrIpv6 field's value. -func (s *Ipv6Range) SetCidrIpv6(v string) *Ipv6Range { - s.CidrIpv6 = &v +// SetAffinity sets the Affinity field's value. +func (s *LaunchTemplatePlacementRequest) SetAffinity(v string) *LaunchTemplatePlacementRequest { + s.Affinity = &v return s } -// SetDescription sets the Description field's value. -func (s *Ipv6Range) SetDescription(v string) *Ipv6Range { - s.Description = &v +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *LaunchTemplatePlacementRequest) SetAvailabilityZone(v string) *LaunchTemplatePlacementRequest { + s.AvailabilityZone = &v return s } -// Describes a key pair. -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. - KeyFingerprint *string `locationName:"keyFingerprint" type:"string"` - - // The name of the key pair. - KeyName *string `locationName:"keyName" type:"string"` -} - -// String returns the string representation -func (s KeyPairInfo) String() string { - return awsutil.Prettify(s) +// SetGroupName sets the GroupName field's value. +func (s *LaunchTemplatePlacementRequest) SetGroupName(v string) *LaunchTemplatePlacementRequest { + s.GroupName = &v + return s } -// GoString returns the string representation -func (s KeyPairInfo) GoString() string { - return s.String() +// SetHostId sets the HostId field's value. +func (s *LaunchTemplatePlacementRequest) SetHostId(v string) *LaunchTemplatePlacementRequest { + s.HostId = &v + return s } -// SetKeyFingerprint sets the KeyFingerprint field's value. -func (s *KeyPairInfo) SetKeyFingerprint(v string) *KeyPairInfo { - s.KeyFingerprint = &v +// SetSpreadDomain sets the SpreadDomain field's value. +func (s *LaunchTemplatePlacementRequest) SetSpreadDomain(v string) *LaunchTemplatePlacementRequest { + s.SpreadDomain = &v return s } -// SetKeyName sets the KeyName field's value. -func (s *KeyPairInfo) SetKeyName(v string) *KeyPairInfo { - s.KeyName = &v +// SetTenancy sets the Tenancy field's value. +func (s *LaunchTemplatePlacementRequest) SetTenancy(v string) *LaunchTemplatePlacementRequest { + s.Tenancy = &v return s } -// Describes a launch permission. -type LaunchPermission struct { +// The launch template to use. You must specify either the launch template ID +// or launch template name in the request, but not both. +type LaunchTemplateSpecification struct { _ struct{} `type:"structure"` - // The name of the group. - Group *string `locationName:"group" type:"string" enum:"PermissionGroup"` + // The ID of the launch template. + LaunchTemplateId *string `type:"string"` - // The AWS account ID. - UserId *string `locationName:"userId" type:"string"` + // The name of the launch template. + LaunchTemplateName *string `type:"string"` + + // The version number of the launch template. + // + // Default: The default version for the launch template. + Version *string `type:"string"` } // String returns the string representation -func (s LaunchPermission) String() string { +func (s LaunchTemplateSpecification) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LaunchPermission) GoString() string { +func (s LaunchTemplateSpecification) GoString() string { return s.String() } -// SetGroup sets the Group field's value. -func (s *LaunchPermission) SetGroup(v string) *LaunchPermission { - s.Group = &v +// SetLaunchTemplateId sets the LaunchTemplateId field's value. +func (s *LaunchTemplateSpecification) SetLaunchTemplateId(v string) *LaunchTemplateSpecification { + s.LaunchTemplateId = &v + return s +} + +// SetLaunchTemplateName sets the LaunchTemplateName field's value. +func (s *LaunchTemplateSpecification) SetLaunchTemplateName(v string) *LaunchTemplateSpecification { + s.LaunchTemplateName = &v return s } -// SetUserId sets the UserId field's value. -func (s *LaunchPermission) SetUserId(v string) *LaunchPermission { - s.UserId = &v +// SetVersion sets the Version field's value. +func (s *LaunchTemplateSpecification) SetVersion(v string) *LaunchTemplateSpecification { + s.Version = &v return s } -// Describes a launch permission modification. -type LaunchPermissionModifications struct { +// The options for Spot Instances. +type LaunchTemplateSpotMarketOptions struct { _ struct{} `type:"structure"` - // The AWS account ID to add to the list of launch permissions for the AMI. - Add []*LaunchPermission `locationNameList:"item" type:"list"` + // 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). + BlockDurationMinutes *int64 `locationName:"blockDurationMinutes" type:"integer"` - // The AWS account ID to remove from the list of launch permissions for the - // AMI. - Remove []*LaunchPermission `locationNameList:"item" type:"list"` + // The behavior when a Spot Instance is interrupted. + InstanceInterruptionBehavior *string `locationName:"instanceInterruptionBehavior" type:"string" enum:"InstanceInterruptionBehavior"` + + // The maximum hourly price you're willing to pay for the Spot Instances. + MaxPrice *string `locationName:"maxPrice" type:"string"` + + // The Spot Instance request type. + SpotInstanceType *string `locationName:"spotInstanceType" type:"string" enum:"SpotInstanceType"` + + // The end date of the request. For a one-time request, the request remains + // active until all instances launch, the request is canceled, or this date + // is reached. If the request is persistent, it remains active until it is canceled + // or this date and time is reached. + ValidUntil *time.Time `locationName:"validUntil" type:"timestamp"` } // String returns the string representation -func (s LaunchPermissionModifications) String() string { +func (s LaunchTemplateSpotMarketOptions) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LaunchPermissionModifications) GoString() string { +func (s LaunchTemplateSpotMarketOptions) GoString() string { return s.String() } -// SetAdd sets the Add field's value. -func (s *LaunchPermissionModifications) SetAdd(v []*LaunchPermission) *LaunchPermissionModifications { - s.Add = v +// SetBlockDurationMinutes sets the BlockDurationMinutes field's value. +func (s *LaunchTemplateSpotMarketOptions) SetBlockDurationMinutes(v int64) *LaunchTemplateSpotMarketOptions { + s.BlockDurationMinutes = &v return s } -// SetRemove sets the Remove field's value. -func (s *LaunchPermissionModifications) SetRemove(v []*LaunchPermission) *LaunchPermissionModifications { - s.Remove = v +// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value. +func (s *LaunchTemplateSpotMarketOptions) SetInstanceInterruptionBehavior(v string) *LaunchTemplateSpotMarketOptions { + s.InstanceInterruptionBehavior = &v return s } -// Describes the launch specification for an instance. -type LaunchSpecification struct { - _ struct{} `type:"structure"` - - // Deprecated. - AddressingType *string `locationName:"addressingType" type:"string"` - - // One or more block device mapping entries. - BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` - - // Indicates whether the instance is optimized for EBS I/O. This optimization - // provides dedicated throughput to Amazon EBS and an optimized configuration - // stack to provide optimal EBS I/O performance. This optimization isn't available - // with all instance types. Additional usage charges apply when using an EBS - // Optimized instance. - // - // Default: false - EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"` - - // The IAM instance profile. - IamInstanceProfile *IamInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"` - - // The ID of the AMI. - ImageId *string `locationName:"imageId" type:"string"` - - // The instance type. - InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` - - // The ID of the kernel. - KernelId *string `locationName:"kernelId" type:"string"` +// SetMaxPrice sets the MaxPrice field's value. +func (s *LaunchTemplateSpotMarketOptions) SetMaxPrice(v string) *LaunchTemplateSpotMarketOptions { + s.MaxPrice = &v + return s +} - // The name of the key pair. - KeyName *string `locationName:"keyName" type:"string"` +// SetSpotInstanceType sets the SpotInstanceType field's value. +func (s *LaunchTemplateSpotMarketOptions) SetSpotInstanceType(v string) *LaunchTemplateSpotMarketOptions { + s.SpotInstanceType = &v + return s +} - // Describes the monitoring of an instance. - Monitoring *RunInstancesMonitoringEnabled `locationName:"monitoring" type:"structure"` +// SetValidUntil sets the ValidUntil field's value. +func (s *LaunchTemplateSpotMarketOptions) SetValidUntil(v time.Time) *LaunchTemplateSpotMarketOptions { + s.ValidUntil = &v + return s +} - // One or more network interfaces. If you specify a network interface, you must - // specify subnet IDs and security group IDs using the network interface. - NetworkInterfaces []*InstanceNetworkInterfaceSpecification `locationName:"networkInterfaceSet" locationNameList:"item" type:"list"` +// The options for Spot Instances. +type LaunchTemplateSpotMarketOptionsRequest struct { + _ struct{} `type:"structure"` - // The placement information for the instance. - Placement *SpotPlacement `locationName:"placement" 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). + BlockDurationMinutes *int64 `type:"integer"` - // The ID of the RAM disk. - RamdiskId *string `locationName:"ramdiskId" type:"string"` + // The behavior when a Spot Instance is interrupted. The default is terminate. + InstanceInterruptionBehavior *string `type:"string" enum:"InstanceInterruptionBehavior"` - // One or more security groups. When requesting instances in a VPC, you must - // specify the IDs of the security groups. When requesting instances in EC2-Classic, - // you can specify the names or the IDs of the security groups. - SecurityGroups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` + // The maximum hourly price you're willing to pay for the Spot Instances. + MaxPrice *string `type:"string"` - // The ID of the subnet in which to launch the instance. - SubnetId *string `locationName:"subnetId" type:"string"` + // The Spot Instance request type. + SpotInstanceType *string `type:"string" enum:"SpotInstanceType"` - // The Base64-encoded user data for the instance. - UserData *string `locationName:"userData" type:"string"` + // The end date of the request. For a one-time request, the request remains + // active until all instances launch, the request is canceled, or this date + // is reached. If the request is persistent, it remains active until it is canceled + // or this date and time is reached. The default end date is 7 days from the + // current date. + ValidUntil *time.Time `type:"timestamp"` } // String returns the string representation -func (s LaunchSpecification) String() string { +func (s LaunchTemplateSpotMarketOptionsRequest) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LaunchSpecification) GoString() string { +func (s LaunchTemplateSpotMarketOptionsRequest) GoString() string { return s.String() } -// SetAddressingType sets the AddressingType field's value. -func (s *LaunchSpecification) SetAddressingType(v string) *LaunchSpecification { - s.AddressingType = &v +// SetBlockDurationMinutes sets the BlockDurationMinutes field's value. +func (s *LaunchTemplateSpotMarketOptionsRequest) SetBlockDurationMinutes(v int64) *LaunchTemplateSpotMarketOptionsRequest { + s.BlockDurationMinutes = &v return s } -// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *LaunchSpecification) SetBlockDeviceMappings(v []*BlockDeviceMapping) *LaunchSpecification { - s.BlockDeviceMappings = v +// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value. +func (s *LaunchTemplateSpotMarketOptionsRequest) SetInstanceInterruptionBehavior(v string) *LaunchTemplateSpotMarketOptionsRequest { + s.InstanceInterruptionBehavior = &v return s } -// SetEbsOptimized sets the EbsOptimized field's value. -func (s *LaunchSpecification) SetEbsOptimized(v bool) *LaunchSpecification { - s.EbsOptimized = &v +// SetMaxPrice sets the MaxPrice field's value. +func (s *LaunchTemplateSpotMarketOptionsRequest) SetMaxPrice(v string) *LaunchTemplateSpotMarketOptionsRequest { + s.MaxPrice = &v return s } -// SetIamInstanceProfile sets the IamInstanceProfile field's value. -func (s *LaunchSpecification) SetIamInstanceProfile(v *IamInstanceProfileSpecification) *LaunchSpecification { - s.IamInstanceProfile = v +// SetSpotInstanceType sets the SpotInstanceType field's value. +func (s *LaunchTemplateSpotMarketOptionsRequest) SetSpotInstanceType(v string) *LaunchTemplateSpotMarketOptionsRequest { + s.SpotInstanceType = &v return s } -// SetImageId sets the ImageId field's value. -func (s *LaunchSpecification) SetImageId(v string) *LaunchSpecification { - s.ImageId = &v +// SetValidUntil sets the ValidUntil field's value. +func (s *LaunchTemplateSpotMarketOptionsRequest) SetValidUntil(v time.Time) *LaunchTemplateSpotMarketOptionsRequest { + s.ValidUntil = &v return s } -// SetInstanceType sets the InstanceType field's value. -func (s *LaunchSpecification) SetInstanceType(v string) *LaunchSpecification { - s.InstanceType = &v - return s +// The tag specification for the launch template. +type LaunchTemplateTagSpecification struct { + _ struct{} `type:"structure"` + + // The type of resource. + ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` + + // The tags for the resource. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` } -// SetKernelId sets the KernelId field's value. -func (s *LaunchSpecification) SetKernelId(v string) *LaunchSpecification { - s.KernelId = &v - return s +// String returns the string representation +func (s LaunchTemplateTagSpecification) String() string { + return awsutil.Prettify(s) } -// SetKeyName sets the KeyName field's value. -func (s *LaunchSpecification) SetKeyName(v string) *LaunchSpecification { - s.KeyName = &v - return s +// GoString returns the string representation +func (s LaunchTemplateTagSpecification) GoString() string { + return s.String() } -// SetMonitoring sets the Monitoring field's value. -func (s *LaunchSpecification) SetMonitoring(v *RunInstancesMonitoringEnabled) *LaunchSpecification { - s.Monitoring = v +// SetResourceType sets the ResourceType field's value. +func (s *LaunchTemplateTagSpecification) SetResourceType(v string) *LaunchTemplateTagSpecification { + s.ResourceType = &v return s } -// SetNetworkInterfaces sets the NetworkInterfaces field's value. -func (s *LaunchSpecification) SetNetworkInterfaces(v []*InstanceNetworkInterfaceSpecification) *LaunchSpecification { - s.NetworkInterfaces = v +// SetTags sets the Tags field's value. +func (s *LaunchTemplateTagSpecification) SetTags(v []*Tag) *LaunchTemplateTagSpecification { + s.Tags = v return s } -// SetPlacement sets the Placement field's value. -func (s *LaunchSpecification) SetPlacement(v *SpotPlacement) *LaunchSpecification { - s.Placement = v - return s +// The tags specification for the launch template. +type LaunchTemplateTagSpecificationRequest struct { + _ struct{} `type:"structure"` + + // The type of resource to tag. Currently, the resource types that support tagging + // on creation are instance and volume. To tag a resource after it has been + // created, see CreateTags. + ResourceType *string `type:"string" enum:"ResourceType"` + + // The tags to apply to the resource. + Tags []*Tag `locationName:"Tag" locationNameList:"item" type:"list"` } -// SetRamdiskId sets the RamdiskId field's value. -func (s *LaunchSpecification) SetRamdiskId(v string) *LaunchSpecification { - s.RamdiskId = &v - return s +// String returns the string representation +func (s LaunchTemplateTagSpecificationRequest) String() string { + return awsutil.Prettify(s) } -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *LaunchSpecification) SetSecurityGroups(v []*GroupIdentifier) *LaunchSpecification { - s.SecurityGroups = v - return s +// GoString returns the string representation +func (s LaunchTemplateTagSpecificationRequest) GoString() string { + return s.String() } -// SetSubnetId sets the SubnetId field's value. -func (s *LaunchSpecification) SetSubnetId(v string) *LaunchSpecification { - s.SubnetId = &v +// SetResourceType sets the ResourceType field's value. +func (s *LaunchTemplateTagSpecificationRequest) SetResourceType(v string) *LaunchTemplateTagSpecificationRequest { + s.ResourceType = &v return s } -// SetUserData sets the UserData field's value. -func (s *LaunchSpecification) SetUserData(v string) *LaunchSpecification { - s.UserData = &v +// SetTags sets the Tags field's value. +func (s *LaunchTemplateTagSpecificationRequest) SetTags(v []*Tag) *LaunchTemplateTagSpecificationRequest { + s.Tags = v return s } -// Describes a launch template. -type LaunchTemplate struct { +// Describes a launch template version. +type LaunchTemplateVersion struct { _ struct{} `type:"structure"` - // The time launch template was created. + // The time the version was created. CreateTime *time.Time `locationName:"createTime" type:"timestamp"` - // The principal that created the launch template. + // The principal that created the version. CreatedBy *string `locationName:"createdBy" type:"string"` - // The version number of the default version of the launch template. - DefaultVersionNumber *int64 `locationName:"defaultVersionNumber" type:"long"` + // Indicates whether the version is the default version. + DefaultVersion *bool `locationName:"defaultVersion" type:"boolean"` - // The version number of the latest version of the launch template. - LatestVersionNumber *int64 `locationName:"latestVersionNumber" type:"long"` + // Information about the launch template. + LaunchTemplateData *ResponseLaunchTemplateData `locationName:"launchTemplateData" type:"structure"` // The ID of the launch template. LaunchTemplateId *string `locationName:"launchTemplateId" type:"string"` @@ -51884,199 +64579,202 @@ type LaunchTemplate struct { // The name of the launch template. LaunchTemplateName *string `locationName:"launchTemplateName" min:"3" type:"string"` - // The tags for the launch template. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + // The description for the version. + VersionDescription *string `locationName:"versionDescription" type:"string"` + + // The version number. + VersionNumber *int64 `locationName:"versionNumber" type:"long"` } // String returns the string representation -func (s LaunchTemplate) String() string { +func (s LaunchTemplateVersion) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LaunchTemplate) GoString() string { +func (s LaunchTemplateVersion) GoString() string { return s.String() } // SetCreateTime sets the CreateTime field's value. -func (s *LaunchTemplate) SetCreateTime(v time.Time) *LaunchTemplate { +func (s *LaunchTemplateVersion) SetCreateTime(v time.Time) *LaunchTemplateVersion { s.CreateTime = &v return s } // SetCreatedBy sets the CreatedBy field's value. -func (s *LaunchTemplate) SetCreatedBy(v string) *LaunchTemplate { +func (s *LaunchTemplateVersion) SetCreatedBy(v string) *LaunchTemplateVersion { s.CreatedBy = &v return s } -// SetDefaultVersionNumber sets the DefaultVersionNumber field's value. -func (s *LaunchTemplate) SetDefaultVersionNumber(v int64) *LaunchTemplate { - s.DefaultVersionNumber = &v +// SetDefaultVersion sets the DefaultVersion field's value. +func (s *LaunchTemplateVersion) SetDefaultVersion(v bool) *LaunchTemplateVersion { + s.DefaultVersion = &v return s } -// SetLatestVersionNumber sets the LatestVersionNumber field's value. -func (s *LaunchTemplate) SetLatestVersionNumber(v int64) *LaunchTemplate { - s.LatestVersionNumber = &v +// SetLaunchTemplateData sets the LaunchTemplateData field's value. +func (s *LaunchTemplateVersion) SetLaunchTemplateData(v *ResponseLaunchTemplateData) *LaunchTemplateVersion { + s.LaunchTemplateData = v return s } // SetLaunchTemplateId sets the LaunchTemplateId field's value. -func (s *LaunchTemplate) SetLaunchTemplateId(v string) *LaunchTemplate { +func (s *LaunchTemplateVersion) SetLaunchTemplateId(v string) *LaunchTemplateVersion { s.LaunchTemplateId = &v return s } // SetLaunchTemplateName sets the LaunchTemplateName field's value. -func (s *LaunchTemplate) SetLaunchTemplateName(v string) *LaunchTemplate { +func (s *LaunchTemplateVersion) SetLaunchTemplateName(v string) *LaunchTemplateVersion { s.LaunchTemplateName = &v return s } -// SetTags sets the Tags field's value. -func (s *LaunchTemplate) SetTags(v []*Tag) *LaunchTemplate { - s.Tags = v +// SetVersionDescription sets the VersionDescription field's value. +func (s *LaunchTemplateVersion) SetVersionDescription(v string) *LaunchTemplateVersion { + s.VersionDescription = &v return s } -// Describes a block device mapping. -type LaunchTemplateBlockDeviceMapping struct { - _ struct{} `type:"structure"` - - // The device name. - DeviceName *string `locationName:"deviceName" type:"string"` - - // Information about the block device for an EBS volume. - Ebs *LaunchTemplateEbsBlockDevice `locationName:"ebs" type:"structure"` +// SetVersionNumber sets the VersionNumber field's value. +func (s *LaunchTemplateVersion) SetVersionNumber(v int64) *LaunchTemplateVersion { + s.VersionNumber = &v + return s +} - // Suppresses the specified device included in the block device mapping of the - // AMI. - NoDevice *string `locationName:"noDevice" type:"string"` +// Describes the monitoring for the instance. +type LaunchTemplatesMonitoring struct { + _ struct{} `type:"structure"` - // The virtual device name (ephemeralN). - VirtualName *string `locationName:"virtualName" type:"string"` + // Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring + // is enabled. + Enabled *bool `locationName:"enabled" type:"boolean"` } // String returns the string representation -func (s LaunchTemplateBlockDeviceMapping) String() string { +func (s LaunchTemplatesMonitoring) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LaunchTemplateBlockDeviceMapping) GoString() string { +func (s LaunchTemplatesMonitoring) GoString() string { return s.String() } -// SetDeviceName sets the DeviceName field's value. -func (s *LaunchTemplateBlockDeviceMapping) SetDeviceName(v string) *LaunchTemplateBlockDeviceMapping { - s.DeviceName = &v +// SetEnabled sets the Enabled field's value. +func (s *LaunchTemplatesMonitoring) SetEnabled(v bool) *LaunchTemplatesMonitoring { + s.Enabled = &v return s } -// SetEbs sets the Ebs field's value. -func (s *LaunchTemplateBlockDeviceMapping) SetEbs(v *LaunchTemplateEbsBlockDevice) *LaunchTemplateBlockDeviceMapping { - s.Ebs = v - return s +// Describes the monitoring for the instance. +type LaunchTemplatesMonitoringRequest struct { + _ struct{} `type:"structure"` + + // Specify true to enable detailed monitoring. Otherwise, basic monitoring is + // enabled. + Enabled *bool `type:"boolean"` } -// SetNoDevice sets the NoDevice field's value. -func (s *LaunchTemplateBlockDeviceMapping) SetNoDevice(v string) *LaunchTemplateBlockDeviceMapping { - s.NoDevice = &v - return s +// String returns the string representation +func (s LaunchTemplatesMonitoringRequest) String() string { + return awsutil.Prettify(s) } -// SetVirtualName sets the VirtualName field's value. -func (s *LaunchTemplateBlockDeviceMapping) SetVirtualName(v string) *LaunchTemplateBlockDeviceMapping { - s.VirtualName = &v +// GoString returns the string representation +func (s LaunchTemplatesMonitoringRequest) GoString() string { + return s.String() +} + +// SetEnabled sets the Enabled field's value. +func (s *LaunchTemplatesMonitoringRequest) SetEnabled(v bool) *LaunchTemplatesMonitoringRequest { + s.Enabled = &v return s } -// Describes a block device mapping. -type LaunchTemplateBlockDeviceMappingRequest struct { +// Describes a license configuration. +type LicenseConfiguration struct { _ struct{} `type:"structure"` - // The device name (for example, /dev/sdh or xvdh). - DeviceName *string `type:"string"` - - // Parameters used to automatically set up EBS volumes when the instance is - // launched. - Ebs *LaunchTemplateEbsBlockDeviceRequest `type:"structure"` - - // Suppresses the specified device included in the block device mapping of the - // AMI. - NoDevice *string `type:"string"` - - // The virtual device name (ephemeralN). Instance store volumes are numbered - // starting from 0. An instance type with 2 available instance store volumes - // can specify mappings for ephemeral0 and ephemeral1. The number of available - // instance store volumes depends on the instance type. After you connect to - // the instance, you must mount the volume. - VirtualName *string `type:"string"` + // The Amazon Resource Name (ARN) of the license configuration. + LicenseConfigurationArn *string `locationName:"licenseConfigurationArn" type:"string"` } // String returns the string representation -func (s LaunchTemplateBlockDeviceMappingRequest) String() string { +func (s LicenseConfiguration) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LaunchTemplateBlockDeviceMappingRequest) GoString() string { +func (s LicenseConfiguration) GoString() string { return s.String() } -// SetDeviceName sets the DeviceName field's value. -func (s *LaunchTemplateBlockDeviceMappingRequest) SetDeviceName(v string) *LaunchTemplateBlockDeviceMappingRequest { - s.DeviceName = &v +// SetLicenseConfigurationArn sets the LicenseConfigurationArn field's value. +func (s *LicenseConfiguration) SetLicenseConfigurationArn(v string) *LicenseConfiguration { + s.LicenseConfigurationArn = &v return s } -// SetEbs sets the Ebs field's value. -func (s *LaunchTemplateBlockDeviceMappingRequest) SetEbs(v *LaunchTemplateEbsBlockDeviceRequest) *LaunchTemplateBlockDeviceMappingRequest { - s.Ebs = v - return s +// Describes a license configuration. +type LicenseConfigurationRequest struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the license configuration. + LicenseConfigurationArn *string `type:"string"` } -// SetNoDevice sets the NoDevice field's value. -func (s *LaunchTemplateBlockDeviceMappingRequest) SetNoDevice(v string) *LaunchTemplateBlockDeviceMappingRequest { - s.NoDevice = &v - return s +// String returns the string representation +func (s LicenseConfigurationRequest) String() string { + return awsutil.Prettify(s) } -// SetVirtualName sets the VirtualName field's value. -func (s *LaunchTemplateBlockDeviceMappingRequest) SetVirtualName(v string) *LaunchTemplateBlockDeviceMappingRequest { - s.VirtualName = &v +// GoString returns the string representation +func (s LicenseConfigurationRequest) GoString() string { + return s.String() +} + +// SetLicenseConfigurationArn sets the LicenseConfigurationArn field's value. +func (s *LicenseConfigurationRequest) SetLicenseConfigurationArn(v string) *LicenseConfigurationRequest { + s.LicenseConfigurationArn = &v return s } -// Describes a launch template and overrides. -type LaunchTemplateConfig struct { +// Describes the Classic Load Balancers and target groups to attach to a Spot +// Fleet request. +type LoadBalancersConfig struct { _ struct{} `type:"structure"` - // The launch template. - LaunchTemplateSpecification *FleetLaunchTemplateSpecification `locationName:"launchTemplateSpecification" type:"structure"` + // The Classic Load Balancers. + ClassicLoadBalancersConfig *ClassicLoadBalancersConfig `locationName:"classicLoadBalancersConfig" type:"structure"` - // Any parameters that you specify override the same parameters in the launch - // template. - Overrides []*LaunchTemplateOverrides `locationName:"overrides" locationNameList:"item" type:"list"` + // The target groups. + TargetGroupsConfig *TargetGroupsConfig `locationName:"targetGroupsConfig" type:"structure"` } // String returns the string representation -func (s LaunchTemplateConfig) String() string { +func (s LoadBalancersConfig) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LaunchTemplateConfig) GoString() string { +func (s LoadBalancersConfig) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *LaunchTemplateConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LaunchTemplateConfig"} - if s.LaunchTemplateSpecification != nil { - if err := s.LaunchTemplateSpecification.Validate(); err != nil { - invalidParams.AddNested("LaunchTemplateSpecification", err.(request.ErrInvalidParams)) +func (s *LoadBalancersConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LoadBalancersConfig"} + if s.ClassicLoadBalancersConfig != nil { + if err := s.ClassicLoadBalancersConfig.Validate(); err != nil { + invalidParams.AddNested("ClassicLoadBalancersConfig", err.(request.ErrInvalidParams)) + } + } + if s.TargetGroupsConfig != nil { + if err := s.TargetGroupsConfig.Validate(); err != nil { + invalidParams.AddNested("TargetGroupsConfig", err.(request.ErrInvalidParams)) } } @@ -52086,1268 +64784,1353 @@ func (s *LaunchTemplateConfig) Validate() error { return nil } -// SetLaunchTemplateSpecification sets the LaunchTemplateSpecification field's value. -func (s *LaunchTemplateConfig) SetLaunchTemplateSpecification(v *FleetLaunchTemplateSpecification) *LaunchTemplateConfig { - s.LaunchTemplateSpecification = v +// SetClassicLoadBalancersConfig sets the ClassicLoadBalancersConfig field's value. +func (s *LoadBalancersConfig) SetClassicLoadBalancersConfig(v *ClassicLoadBalancersConfig) *LoadBalancersConfig { + s.ClassicLoadBalancersConfig = v return s } -// SetOverrides sets the Overrides field's value. -func (s *LaunchTemplateConfig) SetOverrides(v []*LaunchTemplateOverrides) *LaunchTemplateConfig { - s.Overrides = v +// SetTargetGroupsConfig sets the TargetGroupsConfig field's value. +func (s *LoadBalancersConfig) SetTargetGroupsConfig(v *TargetGroupsConfig) *LoadBalancersConfig { + s.TargetGroupsConfig = v return s } -// The CPU options for the instance. -type LaunchTemplateCpuOptions struct { +// Describes a load permission. +type LoadPermission struct { _ struct{} `type:"structure"` - // The number of CPU cores for the instance. - CoreCount *int64 `locationName:"coreCount" type:"integer"` + // The name of the group. + Group *string `locationName:"group" type:"string" enum:"PermissionGroup"` - // The number of threads per CPU core. - ThreadsPerCore *int64 `locationName:"threadsPerCore" type:"integer"` + // The AWS account ID. + UserId *string `locationName:"userId" type:"string"` } // String returns the string representation -func (s LaunchTemplateCpuOptions) String() string { +func (s LoadPermission) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LaunchTemplateCpuOptions) GoString() string { +func (s LoadPermission) GoString() string { return s.String() } -// SetCoreCount sets the CoreCount field's value. -func (s *LaunchTemplateCpuOptions) SetCoreCount(v int64) *LaunchTemplateCpuOptions { - s.CoreCount = &v +// SetGroup sets the Group field's value. +func (s *LoadPermission) SetGroup(v string) *LoadPermission { + s.Group = &v + return s +} + +// SetUserId sets the UserId field's value. +func (s *LoadPermission) SetUserId(v string) *LoadPermission { + s.UserId = &v + return s +} + +// Describes modifications to the load permissions of an Amazon FPGA image (AFI). +type LoadPermissionModifications struct { + _ struct{} `type:"structure"` + + // The load permissions to add. + Add []*LoadPermissionRequest `locationNameList:"item" type:"list"` + + // The load permissions to remove. + Remove []*LoadPermissionRequest `locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s LoadPermissionModifications) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LoadPermissionModifications) GoString() string { + return s.String() +} + +// SetAdd sets the Add field's value. +func (s *LoadPermissionModifications) SetAdd(v []*LoadPermissionRequest) *LoadPermissionModifications { + s.Add = v return s } -// SetThreadsPerCore sets the ThreadsPerCore field's value. -func (s *LaunchTemplateCpuOptions) SetThreadsPerCore(v int64) *LaunchTemplateCpuOptions { - s.ThreadsPerCore = &v +// SetRemove sets the Remove field's value. +func (s *LoadPermissionModifications) SetRemove(v []*LoadPermissionRequest) *LoadPermissionModifications { + s.Remove = v return s } -// The CPU options for the instance. Both the core count and threads per core -// must be specified in the request. -type LaunchTemplateCpuOptionsRequest struct { +// Describes a load permission. +type LoadPermissionRequest struct { _ struct{} `type:"structure"` - // The number of CPU cores for the instance. - CoreCount *int64 `type:"integer"` + // The name of the group. + Group *string `type:"string" enum:"PermissionGroup"` - // The number of threads per CPU core. To disable Intel Hyper-Threading Technology - // for the instance, specify a value of 1. Otherwise, specify the default value - // of 2. - ThreadsPerCore *int64 `type:"integer"` + // The AWS account ID. + UserId *string `type:"string"` } // String returns the string representation -func (s LaunchTemplateCpuOptionsRequest) String() string { +func (s LoadPermissionRequest) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LaunchTemplateCpuOptionsRequest) GoString() string { +func (s LoadPermissionRequest) GoString() string { return s.String() } -// SetCoreCount sets the CoreCount field's value. -func (s *LaunchTemplateCpuOptionsRequest) SetCoreCount(v int64) *LaunchTemplateCpuOptionsRequest { - s.CoreCount = &v +// SetGroup sets the Group field's value. +func (s *LoadPermissionRequest) SetGroup(v string) *LoadPermissionRequest { + s.Group = &v return s } -// SetThreadsPerCore sets the ThreadsPerCore field's value. -func (s *LaunchTemplateCpuOptionsRequest) SetThreadsPerCore(v int64) *LaunchTemplateCpuOptionsRequest { - s.ThreadsPerCore = &v +// SetUserId sets the UserId field's value. +func (s *LoadPermissionRequest) SetUserId(v string) *LoadPermissionRequest { + s.UserId = &v return s } -// Describes a block device for an EBS volume. -type LaunchTemplateEbsBlockDevice struct { +type ModifyCapacityReservationInput struct { _ struct{} `type:"structure"` - // Indicates whether the EBS volume is deleted on instance termination. - DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` - - // Indicates whether the EBS volume is encrypted. - Encrypted *bool `locationName:"encrypted" type:"boolean"` - - // The number of I/O operations per second (IOPS) that the volume supports. - Iops *int64 `locationName:"iops" type:"integer"` + // The ID of the Capacity Reservation. + // + // CapacityReservationId is a required field + CapacityReservationId *string `type:"string" required:"true"` - // The ARN of the AWS Key Management Service (AWS KMS) CMK used for encryption. - KmsKeyId *string `locationName:"kmsKeyId" 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 snapshot. - SnapshotId *string `locationName:"snapshotId" type:"string"` + // The date and time at which the Capacity Reservation expires. When a Capacity + // Reservation expires, the reserved capacity is released and you can no longer + // launch instances into it. The Capacity Reservation's state changes to expired + // when it reaches its end date and time. + // + // The Capacity Reservation is cancelled within an hour from the specified time. + // For example, if you specify 5/31/2019, 13:30:55, the Capacity Reservation + // is guaranteed to end between 13:30:55 and 14:30:55 on 5/31/2019. + // + // You must provide an EndDate value if EndDateType is limited. Omit EndDate + // if EndDateType is unlimited. + EndDate *time.Time `type:"timestamp"` - // The size of the volume, in GiB. - VolumeSize *int64 `locationName:"volumeSize" type:"integer"` + // Indicates the way in which the Capacity Reservation ends. A Capacity Reservation + // can have one of the following end types: + // + // * unlimited - The Capacity Reservation remains active until you explicitly + // cancel it. Do not provide an EndDate value if EndDateType is unlimited. + // + // * limited - The Capacity Reservation expires automatically at a specified + // date and time. You must provide an EndDate value if EndDateType is limited. + EndDateType *string `type:"string" enum:"EndDateType"` - // The volume type. - VolumeType *string `locationName:"volumeType" type:"string" enum:"VolumeType"` + // The number of instances for which to reserve capacity. + InstanceCount *int64 `type:"integer"` } // String returns the string representation -func (s LaunchTemplateEbsBlockDevice) String() string { +func (s ModifyCapacityReservationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LaunchTemplateEbsBlockDevice) GoString() string { +func (s ModifyCapacityReservationInput) GoString() string { return s.String() } -// SetDeleteOnTermination sets the DeleteOnTermination field's value. -func (s *LaunchTemplateEbsBlockDevice) SetDeleteOnTermination(v bool) *LaunchTemplateEbsBlockDevice { - s.DeleteOnTermination = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyCapacityReservationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyCapacityReservationInput"} + if s.CapacityReservationId == nil { + invalidParams.Add(request.NewErrParamRequired("CapacityReservationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetEncrypted sets the Encrypted field's value. -func (s *LaunchTemplateEbsBlockDevice) SetEncrypted(v bool) *LaunchTemplateEbsBlockDevice { - s.Encrypted = &v +// SetCapacityReservationId sets the CapacityReservationId field's value. +func (s *ModifyCapacityReservationInput) SetCapacityReservationId(v string) *ModifyCapacityReservationInput { + s.CapacityReservationId = &v return s } -// SetIops sets the Iops field's value. -func (s *LaunchTemplateEbsBlockDevice) SetIops(v int64) *LaunchTemplateEbsBlockDevice { - s.Iops = &v +// SetDryRun sets the DryRun field's value. +func (s *ModifyCapacityReservationInput) SetDryRun(v bool) *ModifyCapacityReservationInput { + s.DryRun = &v return s } -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *LaunchTemplateEbsBlockDevice) SetKmsKeyId(v string) *LaunchTemplateEbsBlockDevice { - s.KmsKeyId = &v +// SetEndDate sets the EndDate field's value. +func (s *ModifyCapacityReservationInput) SetEndDate(v time.Time) *ModifyCapacityReservationInput { + s.EndDate = &v return s } -// SetSnapshotId sets the SnapshotId field's value. -func (s *LaunchTemplateEbsBlockDevice) SetSnapshotId(v string) *LaunchTemplateEbsBlockDevice { - s.SnapshotId = &v +// SetEndDateType sets the EndDateType field's value. +func (s *ModifyCapacityReservationInput) SetEndDateType(v string) *ModifyCapacityReservationInput { + s.EndDateType = &v return s } -// SetVolumeSize sets the VolumeSize field's value. -func (s *LaunchTemplateEbsBlockDevice) SetVolumeSize(v int64) *LaunchTemplateEbsBlockDevice { - s.VolumeSize = &v +// SetInstanceCount sets the InstanceCount field's value. +func (s *ModifyCapacityReservationInput) SetInstanceCount(v int64) *ModifyCapacityReservationInput { + s.InstanceCount = &v return s } -// SetVolumeType sets the VolumeType field's value. -func (s *LaunchTemplateEbsBlockDevice) SetVolumeType(v string) *LaunchTemplateEbsBlockDevice { - s.VolumeType = &v +type ModifyCapacityReservationOutput struct { + _ struct{} `type:"structure"` + + // Information about the Capacity Reservation. + Return *bool `locationName:"return" type:"boolean"` +} + +// String returns the string representation +func (s ModifyCapacityReservationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyCapacityReservationOutput) GoString() string { + return s.String() +} + +// SetReturn sets the Return field's value. +func (s *ModifyCapacityReservationOutput) SetReturn(v bool) *ModifyCapacityReservationOutput { + s.Return = &v return s } -// The parameters for a block device for an EBS volume. -type LaunchTemplateEbsBlockDeviceRequest struct { +type ModifyClientVpnEndpointInput struct { _ struct{} `type:"structure"` - // Indicates whether the EBS volume is deleted on instance termination. - DeleteOnTermination *bool `type:"boolean"` - - // Indicates whether the EBS volume is encrypted. Encrypted volumes can only - // be attached to instances that support Amazon EBS encryption. If you are creating - // a volume from a snapshot, you can't specify an encryption value. - Encrypted *bool `type:"boolean"` + // The ID of the Client VPN endpoint to modify. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *string `type:"string" required:"true"` - // The number of I/O operations per second (IOPS) that the volume supports. - // For io1, this represents the number of IOPS that are provisioned for the - // volume. For gp2, this represents the baseline performance of the volume and - // the rate at which the volume accumulates I/O credits for bursting. For more - // information about General Purpose SSD baseline performance, I/O credits, - // and bursting, see Amazon EBS Volume Types in the Amazon Elastic Compute Cloud - // User Guide. + // Information about the client connection logging options. // - // Condition: This parameter is required for requests to create io1 volumes; - // it is not used in requests to create gp2, st1, sc1, or standard volumes. - Iops *int64 `type:"integer"` + // If you enable client connection logging, data about client connections is + // sent to a Cloudwatch Logs log stream. The following information is logged: + // + // * Client connection requests + // + // * Client connection results (successful and unsuccessful) + // + // * Reasons for unsuccessful client connection requests + // + // * Client connection termination time + ConnectionLogOptions *ConnectionLogOptions `type:"structure"` - // The ARN of the AWS Key Management Service (AWS KMS) CMK used for encryption. - KmsKeyId *string `type:"string"` + // A brief description of the Client VPN endpoint. + Description *string `type:"string"` - // The ID of the snapshot. - SnapshotId *string `type:"string"` + // Information about the DNS servers to be used by Client VPN connections. A + // Client VPN endpoint can have up to two DNS servers. + DnsServers *DnsServersOptionsModifyStructure `type:"structure"` - // The size of the volume, in GiB. - // - // Default: If you're creating the volume from a snapshot and don't specify - // a volume size, the default is the snapshot size. - VolumeSize *int64 `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 volume type. - VolumeType *string `type:"string" enum:"VolumeType"` + // The ARN of the server certificate to be used. The server certificate must + // be provisioned in AWS Certificate Manager (ACM). + ServerCertificateArn *string `type:"string"` } // String returns the string representation -func (s LaunchTemplateEbsBlockDeviceRequest) String() string { +func (s ModifyClientVpnEndpointInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LaunchTemplateEbsBlockDeviceRequest) GoString() string { +func (s ModifyClientVpnEndpointInput) GoString() string { return s.String() } -// SetDeleteOnTermination sets the DeleteOnTermination field's value. -func (s *LaunchTemplateEbsBlockDeviceRequest) SetDeleteOnTermination(v bool) *LaunchTemplateEbsBlockDeviceRequest { - s.DeleteOnTermination = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyClientVpnEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyClientVpnEndpointInput"} + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetEncrypted sets the Encrypted field's value. -func (s *LaunchTemplateEbsBlockDeviceRequest) SetEncrypted(v bool) *LaunchTemplateEbsBlockDeviceRequest { - s.Encrypted = &v +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *ModifyClientVpnEndpointInput) SetClientVpnEndpointId(v string) *ModifyClientVpnEndpointInput { + s.ClientVpnEndpointId = &v return s } -// SetIops sets the Iops field's value. -func (s *LaunchTemplateEbsBlockDeviceRequest) SetIops(v int64) *LaunchTemplateEbsBlockDeviceRequest { - s.Iops = &v +// SetConnectionLogOptions sets the ConnectionLogOptions field's value. +func (s *ModifyClientVpnEndpointInput) SetConnectionLogOptions(v *ConnectionLogOptions) *ModifyClientVpnEndpointInput { + s.ConnectionLogOptions = v return s } -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *LaunchTemplateEbsBlockDeviceRequest) SetKmsKeyId(v string) *LaunchTemplateEbsBlockDeviceRequest { - s.KmsKeyId = &v +// SetDescription sets the Description field's value. +func (s *ModifyClientVpnEndpointInput) SetDescription(v string) *ModifyClientVpnEndpointInput { + s.Description = &v return s } -// SetSnapshotId sets the SnapshotId field's value. -func (s *LaunchTemplateEbsBlockDeviceRequest) SetSnapshotId(v string) *LaunchTemplateEbsBlockDeviceRequest { - s.SnapshotId = &v +// SetDnsServers sets the DnsServers field's value. +func (s *ModifyClientVpnEndpointInput) SetDnsServers(v *DnsServersOptionsModifyStructure) *ModifyClientVpnEndpointInput { + s.DnsServers = v return s } -// SetVolumeSize sets the VolumeSize field's value. -func (s *LaunchTemplateEbsBlockDeviceRequest) SetVolumeSize(v int64) *LaunchTemplateEbsBlockDeviceRequest { - s.VolumeSize = &v +// SetDryRun sets the DryRun field's value. +func (s *ModifyClientVpnEndpointInput) SetDryRun(v bool) *ModifyClientVpnEndpointInput { + s.DryRun = &v return s } -// SetVolumeType sets the VolumeType field's value. -func (s *LaunchTemplateEbsBlockDeviceRequest) SetVolumeType(v string) *LaunchTemplateEbsBlockDeviceRequest { - s.VolumeType = &v +// SetServerCertificateArn sets the ServerCertificateArn field's value. +func (s *ModifyClientVpnEndpointInput) SetServerCertificateArn(v string) *ModifyClientVpnEndpointInput { + s.ServerCertificateArn = &v return s } -// Describes an IAM instance profile. -type LaunchTemplateIamInstanceProfileSpecification struct { +type ModifyClientVpnEndpointOutput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the instance profile. - Arn *string `locationName:"arn" type:"string"` - - // The name of the instance profile. - Name *string `locationName:"name" 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 LaunchTemplateIamInstanceProfileSpecification) String() string { +func (s ModifyClientVpnEndpointOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LaunchTemplateIamInstanceProfileSpecification) GoString() string { +func (s ModifyClientVpnEndpointOutput) GoString() string { return s.String() } -// SetArn sets the Arn field's value. -func (s *LaunchTemplateIamInstanceProfileSpecification) SetArn(v string) *LaunchTemplateIamInstanceProfileSpecification { - s.Arn = &v - return s -} - -// SetName sets the Name field's value. -func (s *LaunchTemplateIamInstanceProfileSpecification) SetName(v string) *LaunchTemplateIamInstanceProfileSpecification { - s.Name = &v +// SetReturn sets the Return field's value. +func (s *ModifyClientVpnEndpointOutput) SetReturn(v bool) *ModifyClientVpnEndpointOutput { + s.Return = &v return s } -// An IAM instance profile. -type LaunchTemplateIamInstanceProfileSpecificationRequest struct { +type ModifyFleetInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the instance profile. - Arn *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 instance profile. - Name *string `type:"string"` + // Indicates whether running instances should be terminated if the total target + // capacity of the EC2 Fleet is decreased below the current size of the EC2 + // Fleet. + ExcessCapacityTerminationPolicy *string `type:"string" enum:"FleetExcessCapacityTerminationPolicy"` + + // The ID of the EC2 Fleet. + // + // FleetId is a required field + FleetId *string `type:"string" required:"true"` + + // The size of the EC2 Fleet. + // + // TargetCapacitySpecification is a required field + TargetCapacitySpecification *TargetCapacitySpecificationRequest `type:"structure" required:"true"` } // String returns the string representation -func (s LaunchTemplateIamInstanceProfileSpecificationRequest) String() string { +func (s ModifyFleetInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LaunchTemplateIamInstanceProfileSpecificationRequest) GoString() string { +func (s ModifyFleetInput) GoString() string { return s.String() } -// SetArn sets the Arn field's value. -func (s *LaunchTemplateIamInstanceProfileSpecificationRequest) SetArn(v string) *LaunchTemplateIamInstanceProfileSpecificationRequest { - s.Arn = &v - return s -} - -// SetName sets the Name field's value. -func (s *LaunchTemplateIamInstanceProfileSpecificationRequest) SetName(v string) *LaunchTemplateIamInstanceProfileSpecificationRequest { - s.Name = &v - return s -} - -// The market (purchasing) option for the instances. -type LaunchTemplateInstanceMarketOptions struct { - _ struct{} `type:"structure"` - - // The market type. - MarketType *string `locationName:"marketType" type:"string" enum:"MarketType"` +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyFleetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyFleetInput"} + if s.FleetId == nil { + invalidParams.Add(request.NewErrParamRequired("FleetId")) + } + if s.TargetCapacitySpecification == nil { + invalidParams.Add(request.NewErrParamRequired("TargetCapacitySpecification")) + } + if s.TargetCapacitySpecification != nil { + if err := s.TargetCapacitySpecification.Validate(); err != nil { + invalidParams.AddNested("TargetCapacitySpecification", err.(request.ErrInvalidParams)) + } + } - // The options for Spot Instances. - SpotOptions *LaunchTemplateSpotMarketOptions `locationName:"spotOptions" type:"structure"` + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// String returns the string representation -func (s LaunchTemplateInstanceMarketOptions) String() string { - return awsutil.Prettify(s) +// SetDryRun sets the DryRun field's value. +func (s *ModifyFleetInput) SetDryRun(v bool) *ModifyFleetInput { + s.DryRun = &v + return s } -// GoString returns the string representation -func (s LaunchTemplateInstanceMarketOptions) GoString() string { - return s.String() +// SetExcessCapacityTerminationPolicy sets the ExcessCapacityTerminationPolicy field's value. +func (s *ModifyFleetInput) SetExcessCapacityTerminationPolicy(v string) *ModifyFleetInput { + s.ExcessCapacityTerminationPolicy = &v + return s } -// SetMarketType sets the MarketType field's value. -func (s *LaunchTemplateInstanceMarketOptions) SetMarketType(v string) *LaunchTemplateInstanceMarketOptions { - s.MarketType = &v +// SetFleetId sets the FleetId field's value. +func (s *ModifyFleetInput) SetFleetId(v string) *ModifyFleetInput { + s.FleetId = &v return s } -// SetSpotOptions sets the SpotOptions field's value. -func (s *LaunchTemplateInstanceMarketOptions) SetSpotOptions(v *LaunchTemplateSpotMarketOptions) *LaunchTemplateInstanceMarketOptions { - s.SpotOptions = v +// SetTargetCapacitySpecification sets the TargetCapacitySpecification field's value. +func (s *ModifyFleetInput) SetTargetCapacitySpecification(v *TargetCapacitySpecificationRequest) *ModifyFleetInput { + s.TargetCapacitySpecification = v return s } -// The market (purchasing) option for the instances. -type LaunchTemplateInstanceMarketOptionsRequest struct { +type ModifyFleetOutput struct { _ struct{} `type:"structure"` - // The market type. - MarketType *string `type:"string" enum:"MarketType"` - - // The options for Spot Instances. - SpotOptions *LaunchTemplateSpotMarketOptionsRequest `type:"structure"` + // Is true if the request succeeds, and an error otherwise. + Return *bool `locationName:"return" type:"boolean"` } // String returns the string representation -func (s LaunchTemplateInstanceMarketOptionsRequest) String() string { +func (s ModifyFleetOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LaunchTemplateInstanceMarketOptionsRequest) GoString() string { +func (s ModifyFleetOutput) GoString() string { return s.String() } -// SetMarketType sets the MarketType field's value. -func (s *LaunchTemplateInstanceMarketOptionsRequest) SetMarketType(v string) *LaunchTemplateInstanceMarketOptionsRequest { - s.MarketType = &v - return s -} - -// SetSpotOptions sets the SpotOptions field's value. -func (s *LaunchTemplateInstanceMarketOptionsRequest) SetSpotOptions(v *LaunchTemplateSpotMarketOptionsRequest) *LaunchTemplateInstanceMarketOptionsRequest { - s.SpotOptions = v +// SetReturn sets the Return field's value. +func (s *ModifyFleetOutput) SetReturn(v bool) *ModifyFleetOutput { + s.Return = &v return s } -// Describes a network interface. -type LaunchTemplateInstanceNetworkInterfaceSpecification struct { +type ModifyFpgaImageAttributeInput struct { _ struct{} `type:"structure"` - // Indicates whether to associate a public IPv4 address with eth0 for a new - // network interface. - AssociatePublicIpAddress *bool `locationName:"associatePublicIpAddress" type:"boolean"` - - // Indicates whether the network interface is deleted when the instance is terminated. - DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` - - // A description for the network interface. - Description *string `locationName:"description" type:"string"` + // The name of the attribute. + Attribute *string `type:"string" enum:"FpgaImageAttributeName"` - // The device index for the network interface attachment. - DeviceIndex *int64 `locationName:"deviceIndex" type:"integer"` + // A description for the AFI. + Description *string `type:"string"` - // The IDs of one or more security groups. - Groups []*string `locationName:"groupSet" locationNameList:"groupId" 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"` - // The number of IPv6 addresses for the network interface. - Ipv6AddressCount *int64 `locationName:"ipv6AddressCount" type:"integer"` + // The ID of the AFI. + // + // FpgaImageId is a required field + FpgaImageId *string `type:"string" required:"true"` - // The IPv6 addresses for the network interface. - Ipv6Addresses []*InstanceIpv6Address `locationName:"ipv6AddressesSet" locationNameList:"item" type:"list"` + // The load permission for the AFI. + LoadPermission *LoadPermissionModifications `type:"structure"` - // The ID of the network interface. - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` + // A name for the AFI. + Name *string `type:"string"` - // The primary private IPv4 address of the network interface. - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` + // The operation type. + OperationType *string `type:"string" enum:"OperationType"` - // One or more private IPv4 addresses. - PrivateIpAddresses []*PrivateIpAddressSpecification `locationName:"privateIpAddressesSet" locationNameList:"item" type:"list"` + // One or more product codes. After you add a product code to an AFI, it can't + // be removed. This parameter is valid only when modifying the productCodes + // attribute. + ProductCodes []*string `locationName:"ProductCode" locationNameList:"ProductCode" type:"list"` - // The number of secondary private IPv4 addresses for the network interface. - SecondaryPrivateIpAddressCount *int64 `locationName:"secondaryPrivateIpAddressCount" type:"integer"` + // One or more user groups. This parameter is valid only when modifying the + // loadPermission attribute. + UserGroups []*string `locationName:"UserGroup" locationNameList:"UserGroup" type:"list"` - // The ID of the subnet for the network interface. - SubnetId *string `locationName:"subnetId" type:"string"` + // One or more AWS account IDs. This parameter is valid only when modifying + // the loadPermission attribute. + UserIds []*string `locationName:"UserId" locationNameList:"UserId" type:"list"` } // String returns the string representation -func (s LaunchTemplateInstanceNetworkInterfaceSpecification) String() string { +func (s ModifyFpgaImageAttributeInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LaunchTemplateInstanceNetworkInterfaceSpecification) GoString() string { +func (s ModifyFpgaImageAttributeInput) GoString() string { return s.String() } -// SetAssociatePublicIpAddress sets the AssociatePublicIpAddress field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetAssociatePublicIpAddress(v bool) *LaunchTemplateInstanceNetworkInterfaceSpecification { - s.AssociatePublicIpAddress = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyFpgaImageAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyFpgaImageAttributeInput"} + if s.FpgaImageId == nil { + invalidParams.Add(request.NewErrParamRequired("FpgaImageId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetDeleteOnTermination sets the DeleteOnTermination field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetDeleteOnTermination(v bool) *LaunchTemplateInstanceNetworkInterfaceSpecification { - s.DeleteOnTermination = &v +// SetAttribute sets the Attribute field's value. +func (s *ModifyFpgaImageAttributeInput) SetAttribute(v string) *ModifyFpgaImageAttributeInput { + s.Attribute = &v return s } // SetDescription sets the Description field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetDescription(v string) *LaunchTemplateInstanceNetworkInterfaceSpecification { +func (s *ModifyFpgaImageAttributeInput) SetDescription(v string) *ModifyFpgaImageAttributeInput { s.Description = &v return s } -// SetDeviceIndex sets the DeviceIndex field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetDeviceIndex(v int64) *LaunchTemplateInstanceNetworkInterfaceSpecification { - s.DeviceIndex = &v - return s -} - -// SetGroups sets the Groups field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetGroups(v []*string) *LaunchTemplateInstanceNetworkInterfaceSpecification { - s.Groups = v - return s -} - -// SetIpv6AddressCount sets the Ipv6AddressCount field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetIpv6AddressCount(v int64) *LaunchTemplateInstanceNetworkInterfaceSpecification { - s.Ipv6AddressCount = &v +// SetDryRun sets the DryRun field's value. +func (s *ModifyFpgaImageAttributeInput) SetDryRun(v bool) *ModifyFpgaImageAttributeInput { + s.DryRun = &v return s } -// SetIpv6Addresses sets the Ipv6Addresses field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetIpv6Addresses(v []*InstanceIpv6Address) *LaunchTemplateInstanceNetworkInterfaceSpecification { - s.Ipv6Addresses = v +// SetFpgaImageId sets the FpgaImageId field's value. +func (s *ModifyFpgaImageAttributeInput) SetFpgaImageId(v string) *ModifyFpgaImageAttributeInput { + s.FpgaImageId = &v return s } -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetNetworkInterfaceId(v string) *LaunchTemplateInstanceNetworkInterfaceSpecification { - s.NetworkInterfaceId = &v +// SetLoadPermission sets the LoadPermission field's value. +func (s *ModifyFpgaImageAttributeInput) SetLoadPermission(v *LoadPermissionModifications) *ModifyFpgaImageAttributeInput { + s.LoadPermission = v return s } -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetPrivateIpAddress(v string) *LaunchTemplateInstanceNetworkInterfaceSpecification { - s.PrivateIpAddress = &v +// SetName sets the Name field's value. +func (s *ModifyFpgaImageAttributeInput) SetName(v string) *ModifyFpgaImageAttributeInput { + s.Name = &v return s } -// SetPrivateIpAddresses sets the PrivateIpAddresses field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetPrivateIpAddresses(v []*PrivateIpAddressSpecification) *LaunchTemplateInstanceNetworkInterfaceSpecification { - s.PrivateIpAddresses = v +// SetOperationType sets the OperationType field's value. +func (s *ModifyFpgaImageAttributeInput) SetOperationType(v string) *ModifyFpgaImageAttributeInput { + s.OperationType = &v return s } -// SetSecondaryPrivateIpAddressCount sets the SecondaryPrivateIpAddressCount field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetSecondaryPrivateIpAddressCount(v int64) *LaunchTemplateInstanceNetworkInterfaceSpecification { - s.SecondaryPrivateIpAddressCount = &v +// SetProductCodes sets the ProductCodes field's value. +func (s *ModifyFpgaImageAttributeInput) SetProductCodes(v []*string) *ModifyFpgaImageAttributeInput { + s.ProductCodes = v return s } -// SetSubnetId sets the SubnetId field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecification) SetSubnetId(v string) *LaunchTemplateInstanceNetworkInterfaceSpecification { - s.SubnetId = &v +// SetUserGroups sets the UserGroups field's value. +func (s *ModifyFpgaImageAttributeInput) SetUserGroups(v []*string) *ModifyFpgaImageAttributeInput { + s.UserGroups = v return s } -// The parameters for a network interface. -type LaunchTemplateInstanceNetworkInterfaceSpecificationRequest struct { - _ struct{} `type:"structure"` - - // Associates a public IPv4 address with eth0 for a new network interface. - AssociatePublicIpAddress *bool `type:"boolean"` - - // Indicates whether the network interface is deleted when the instance is terminated. - DeleteOnTermination *bool `type:"boolean"` - - // A description for the network interface. - Description *string `type:"string"` - - // The device index for the network interface attachment. - DeviceIndex *int64 `type:"integer"` - - // The IDs of one or more security groups. - Groups []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"` - - // The number of IPv6 addresses to assign to a 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 `type:"integer"` - - // One or more specific IPv6 addresses from the IPv6 CIDR block range of your - // subnet. You can't use this option if you're specifying a number of IPv6 addresses. - Ipv6Addresses []*InstanceIpv6AddressRequest `locationNameList:"InstanceIpv6Address" type:"list"` - - // The ID of the network interface. - NetworkInterfaceId *string `type:"string"` - - // The primary private IPv4 address of the network interface. - PrivateIpAddress *string `type:"string"` - - // One or more private IPv4 addresses. - PrivateIpAddresses []*PrivateIpAddressSpecification `locationNameList:"item" type:"list"` +// SetUserIds sets the UserIds field's value. +func (s *ModifyFpgaImageAttributeInput) SetUserIds(v []*string) *ModifyFpgaImageAttributeInput { + s.UserIds = v + return s +} - // The number of secondary private IPv4 addresses to assign to a network interface. - SecondaryPrivateIpAddressCount *int64 `type:"integer"` +type ModifyFpgaImageAttributeOutput struct { + _ struct{} `type:"structure"` - // The ID of the subnet for the network interface. - SubnetId *string `type:"string"` + // Information about the attribute. + FpgaImageAttribute *FpgaImageAttribute `locationName:"fpgaImageAttribute" type:"structure"` } // String returns the string representation -func (s LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) String() string { +func (s ModifyFpgaImageAttributeOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) GoString() string { +func (s ModifyFpgaImageAttributeOutput) GoString() string { return s.String() } -// SetAssociatePublicIpAddress sets the AssociatePublicIpAddress field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetAssociatePublicIpAddress(v bool) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { - s.AssociatePublicIpAddress = &v +// SetFpgaImageAttribute sets the FpgaImageAttribute field's value. +func (s *ModifyFpgaImageAttributeOutput) SetFpgaImageAttribute(v *FpgaImageAttribute) *ModifyFpgaImageAttributeOutput { + s.FpgaImageAttribute = v return s } -// SetDeleteOnTermination sets the DeleteOnTermination field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetDeleteOnTermination(v bool) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { - s.DeleteOnTermination = &v - return s +type ModifyHostsInput struct { + _ struct{} `type:"structure"` + + // Specify whether to enable or disable auto-placement. + // + // AutoPlacement is a required field + AutoPlacement *string `locationName:"autoPlacement" type:"string" required:"true" enum:"AutoPlacement"` + + // The IDs of the Dedicated Hosts to modify. + // + // HostIds is a required field + HostIds []*string `locationName:"hostId" locationNameList:"item" type:"list" required:"true"` } -// SetDescription sets the Description field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetDescription(v string) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { - s.Description = &v - return s +// String returns the string representation +func (s ModifyHostsInput) String() string { + return awsutil.Prettify(s) } -// SetDeviceIndex sets the DeviceIndex field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetDeviceIndex(v int64) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { - s.DeviceIndex = &v - return s +// GoString returns the string representation +func (s ModifyHostsInput) GoString() string { + return s.String() } -// SetGroups sets the Groups field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetGroups(v []*string) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { - s.Groups = v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyHostsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyHostsInput"} + if s.AutoPlacement == nil { + invalidParams.Add(request.NewErrParamRequired("AutoPlacement")) + } + if s.HostIds == nil { + invalidParams.Add(request.NewErrParamRequired("HostIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetIpv6AddressCount sets the Ipv6AddressCount field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetIpv6AddressCount(v int64) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { - s.Ipv6AddressCount = &v +// SetAutoPlacement sets the AutoPlacement field's value. +func (s *ModifyHostsInput) SetAutoPlacement(v string) *ModifyHostsInput { + s.AutoPlacement = &v return s } -// SetIpv6Addresses sets the Ipv6Addresses field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetIpv6Addresses(v []*InstanceIpv6AddressRequest) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { - s.Ipv6Addresses = v +// SetHostIds sets the HostIds field's value. +func (s *ModifyHostsInput) SetHostIds(v []*string) *ModifyHostsInput { + s.HostIds = v return s } -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetNetworkInterfaceId(v string) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { - s.NetworkInterfaceId = &v - return s +type ModifyHostsOutput struct { + _ struct{} `type:"structure"` + + // The IDs of the Dedicated Hosts that were successfully modified. + Successful []*string `locationName:"successful" locationNameList:"item" type:"list"` + + // The IDs of the Dedicated Hosts that could not be modified. Check whether + // the setting you requested can be used. + Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"` } -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetPrivateIpAddress(v string) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { - s.PrivateIpAddress = &v - return s +// String returns the string representation +func (s ModifyHostsOutput) String() string { + return awsutil.Prettify(s) } -// SetPrivateIpAddresses sets the PrivateIpAddresses field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetPrivateIpAddresses(v []*PrivateIpAddressSpecification) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { - s.PrivateIpAddresses = v - return s +// GoString returns the string representation +func (s ModifyHostsOutput) GoString() string { + return s.String() } -// SetSecondaryPrivateIpAddressCount sets the SecondaryPrivateIpAddressCount field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetSecondaryPrivateIpAddressCount(v int64) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { - s.SecondaryPrivateIpAddressCount = &v +// SetSuccessful sets the Successful field's value. +func (s *ModifyHostsOutput) SetSuccessful(v []*string) *ModifyHostsOutput { + s.Successful = v return s } -// SetSubnetId sets the SubnetId field's value. -func (s *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) SetSubnetId(v string) *LaunchTemplateInstanceNetworkInterfaceSpecificationRequest { - s.SubnetId = &v +// SetUnsuccessful sets the Unsuccessful field's value. +func (s *ModifyHostsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *ModifyHostsOutput { + s.Unsuccessful = v return s } -// Describes overrides for a launch template. -type LaunchTemplateOverrides struct { +type ModifyIdFormatInput struct { _ struct{} `type:"structure"` - // The Availability Zone in which to launch the instances. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // 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. - Priority *float64 `locationName:"priority" type:"double"` - - // The maximum price per unit hour that you are willing to pay for a Spot Instance. - SpotPrice *string `locationName:"spotPrice" type:"string"` - - // The ID of the subnet in which to launch the instances. - SubnetId *string `locationName:"subnetId" type:"string"` + // The type of resource: bundle | conversion-task | customer-gateway | dhcp-options + // | elastic-ip-allocation | elastic-ip-association | export-task | flow-log + // | image | import-task | internet-gateway | network-acl | network-acl-association + // | network-interface | network-interface-attachment | prefix-list | route-table + // | route-table-association | security-group | subnet | subnet-cidr-block-association + // | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection + // | vpn-connection | vpn-gateway. + // + // Alternatively, use the all-current option to include all resource types that + // are currently within their opt-in period for longer IDs. + // + // Resource is a required field + Resource *string `type:"string" required:"true"` - // The number of units provided by the specified instance type. - WeightedCapacity *float64 `locationName:"weightedCapacity" type:"double"` + // Indicate whether the resource should use longer IDs (17-character IDs). + // + // UseLongIds is a required field + UseLongIds *bool `type:"boolean" required:"true"` } // String returns the string representation -func (s LaunchTemplateOverrides) String() string { +func (s ModifyIdFormatInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LaunchTemplateOverrides) GoString() string { +func (s ModifyIdFormatInput) GoString() string { return s.String() } -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *LaunchTemplateOverrides) SetAvailabilityZone(v string) *LaunchTemplateOverrides { - s.AvailabilityZone = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyIdFormatInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyIdFormatInput"} + if s.Resource == nil { + invalidParams.Add(request.NewErrParamRequired("Resource")) + } + if s.UseLongIds == nil { + invalidParams.Add(request.NewErrParamRequired("UseLongIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetInstanceType sets the InstanceType field's value. -func (s *LaunchTemplateOverrides) SetInstanceType(v string) *LaunchTemplateOverrides { - s.InstanceType = &v +// SetResource sets the Resource field's value. +func (s *ModifyIdFormatInput) SetResource(v string) *ModifyIdFormatInput { + s.Resource = &v return s } -// SetPriority sets the Priority field's value. -func (s *LaunchTemplateOverrides) SetPriority(v float64) *LaunchTemplateOverrides { - s.Priority = &v +// SetUseLongIds sets the UseLongIds field's value. +func (s *ModifyIdFormatInput) SetUseLongIds(v bool) *ModifyIdFormatInput { + s.UseLongIds = &v return s } -// SetSpotPrice sets the SpotPrice field's value. -func (s *LaunchTemplateOverrides) SetSpotPrice(v string) *LaunchTemplateOverrides { - s.SpotPrice = &v - return s +type ModifyIdFormatOutput struct { + _ struct{} `type:"structure"` } -// SetSubnetId sets the SubnetId field's value. -func (s *LaunchTemplateOverrides) SetSubnetId(v string) *LaunchTemplateOverrides { - s.SubnetId = &v - return s +// String returns the string representation +func (s ModifyIdFormatOutput) String() string { + return awsutil.Prettify(s) } -// SetWeightedCapacity sets the WeightedCapacity field's value. -func (s *LaunchTemplateOverrides) SetWeightedCapacity(v float64) *LaunchTemplateOverrides { - s.WeightedCapacity = &v - return s +// GoString returns the string representation +func (s ModifyIdFormatOutput) GoString() string { + return s.String() } -// Describes the placement of an instance. -type LaunchTemplatePlacement struct { +type ModifyIdentityIdFormatInput struct { _ struct{} `type:"structure"` - // The affinity setting for the instance on the Dedicated Host. - Affinity *string `locationName:"affinity" type:"string"` - - // The Availability Zone of the instance. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The name of the placement group for the instance. - GroupName *string `locationName:"groupName" type:"string"` - - // The ID of the Dedicated Host for the instance. - HostId *string `locationName:"hostId" type:"string"` + // The ARN of the principal, which can be an IAM user, IAM role, or the root + // user. Specify all to modify the ID format for all IAM users, IAM roles, and + // the root user of the account. + // + // PrincipalArn is a required field + PrincipalArn *string `locationName:"principalArn" type:"string" required:"true"` - // Reserved for future use. - SpreadDomain *string `locationName:"spreadDomain" type:"string"` + // The type of resource: bundle | conversion-task | customer-gateway | dhcp-options + // | elastic-ip-allocation | elastic-ip-association | export-task | flow-log + // | image | import-task | internet-gateway | network-acl | network-acl-association + // | network-interface | network-interface-attachment | prefix-list | route-table + // | route-table-association | security-group | subnet | subnet-cidr-block-association + // | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection + // | vpn-connection | vpn-gateway. + // + // Alternatively, use the all-current option to include all resource types that + // are currently within their opt-in period for longer IDs. + // + // Resource is a required field + Resource *string `locationName:"resource" type:"string" required:"true"` - // The tenancy of the instance (if the instance is running in a VPC). An instance - // with a tenancy of dedicated runs on single-tenant hardware. - Tenancy *string `locationName:"tenancy" type:"string" enum:"Tenancy"` + // Indicates whether the resource should use longer IDs (17-character IDs) + // + // UseLongIds is a required field + UseLongIds *bool `locationName:"useLongIds" type:"boolean" required:"true"` } // String returns the string representation -func (s LaunchTemplatePlacement) String() string { +func (s ModifyIdentityIdFormatInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LaunchTemplatePlacement) GoString() string { +func (s ModifyIdentityIdFormatInput) GoString() string { return s.String() } -// SetAffinity sets the Affinity field's value. -func (s *LaunchTemplatePlacement) SetAffinity(v string) *LaunchTemplatePlacement { - s.Affinity = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyIdentityIdFormatInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyIdentityIdFormatInput"} + if s.PrincipalArn == nil { + invalidParams.Add(request.NewErrParamRequired("PrincipalArn")) + } + if s.Resource == nil { + invalidParams.Add(request.NewErrParamRequired("Resource")) + } + if s.UseLongIds == nil { + invalidParams.Add(request.NewErrParamRequired("UseLongIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *LaunchTemplatePlacement) SetAvailabilityZone(v string) *LaunchTemplatePlacement { - s.AvailabilityZone = &v +// SetPrincipalArn sets the PrincipalArn field's value. +func (s *ModifyIdentityIdFormatInput) SetPrincipalArn(v string) *ModifyIdentityIdFormatInput { + s.PrincipalArn = &v return s } -// SetGroupName sets the GroupName field's value. -func (s *LaunchTemplatePlacement) SetGroupName(v string) *LaunchTemplatePlacement { - s.GroupName = &v +// SetResource sets the Resource field's value. +func (s *ModifyIdentityIdFormatInput) SetResource(v string) *ModifyIdentityIdFormatInput { + s.Resource = &v return s } -// SetHostId sets the HostId field's value. -func (s *LaunchTemplatePlacement) SetHostId(v string) *LaunchTemplatePlacement { - s.HostId = &v +// SetUseLongIds sets the UseLongIds field's value. +func (s *ModifyIdentityIdFormatInput) SetUseLongIds(v bool) *ModifyIdentityIdFormatInput { + s.UseLongIds = &v return s } -// SetSpreadDomain sets the SpreadDomain field's value. -func (s *LaunchTemplatePlacement) SetSpreadDomain(v string) *LaunchTemplatePlacement { - s.SpreadDomain = &v - return s +type ModifyIdentityIdFormatOutput struct { + _ struct{} `type:"structure"` } -// SetTenancy sets the Tenancy field's value. -func (s *LaunchTemplatePlacement) SetTenancy(v string) *LaunchTemplatePlacement { - s.Tenancy = &v - return s +// String returns the string representation +func (s ModifyIdentityIdFormatOutput) String() string { + return awsutil.Prettify(s) } -// The placement for the instance. -type LaunchTemplatePlacementRequest struct { +// GoString returns the string representation +func (s ModifyIdentityIdFormatOutput) GoString() string { + return s.String() +} + +// Contains the parameters for ModifyImageAttribute. +type ModifyImageAttributeInput struct { _ struct{} `type:"structure"` - // The affinity setting for an instance on a Dedicated Host. - Affinity *string `type:"string"` + // The name of the attribute to modify. The valid values are description, launchPermission, + // and productCodes. + Attribute *string `type:"string"` - // The Availability Zone for the instance. - AvailabilityZone *string `type:"string"` + // A new description for the AMI. + Description *AttributeValue `type:"structure"` - // The name of the placement group for the instance. - GroupName *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 `locationName:"dryRun" type:"boolean"` - // The ID of the Dedicated Host for the instance. - HostId *string `type:"string"` + // The ID of the AMI. + // + // ImageId is a required field + ImageId *string `type:"string" required:"true"` - // Reserved for future use. - SpreadDomain *string `type:"string"` + // A new launch permission for the AMI. + LaunchPermission *LaunchPermissionModifications `type:"structure"` - // The tenancy of the instance (if the instance is running in a VPC). An instance - // with a tenancy of dedicated runs on single-tenant hardware. - Tenancy *string `type:"string" enum:"Tenancy"` + // The operation type. This parameter can be used only when the Attribute parameter + // is launchPermission. + OperationType *string `type:"string" enum:"OperationType"` + + // One or more DevPay product codes. After you add a product code to an AMI, + // it can't be removed. + ProductCodes []*string `locationName:"ProductCode" locationNameList:"ProductCode" type:"list"` + + // One or more user groups. This parameter can be used only when the Attribute + // parameter is launchPermission. + UserGroups []*string `locationName:"UserGroup" locationNameList:"UserGroup" type:"list"` + + // One or more AWS account IDs. This parameter can be used only when the Attribute + // parameter is launchPermission. + UserIds []*string `locationName:"UserId" locationNameList:"UserId" type:"list"` + + // The value of the attribute being modified. This parameter can be used only + // when the Attribute parameter is description or productCodes. + Value *string `type:"string"` } // String returns the string representation -func (s LaunchTemplatePlacementRequest) String() string { +func (s ModifyImageAttributeInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LaunchTemplatePlacementRequest) GoString() string { +func (s ModifyImageAttributeInput) GoString() string { return s.String() } -// SetAffinity sets the Affinity field's value. -func (s *LaunchTemplatePlacementRequest) SetAffinity(v string) *LaunchTemplatePlacementRequest { - s.Affinity = &v +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyImageAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyImageAttributeInput"} + if s.ImageId == nil { + invalidParams.Add(request.NewErrParamRequired("ImageId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAttribute sets the Attribute field's value. +func (s *ModifyImageAttributeInput) SetAttribute(v string) *ModifyImageAttributeInput { + s.Attribute = &v return s } -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *LaunchTemplatePlacementRequest) SetAvailabilityZone(v string) *LaunchTemplatePlacementRequest { - s.AvailabilityZone = &v +// SetDescription sets the Description field's value. +func (s *ModifyImageAttributeInput) SetDescription(v *AttributeValue) *ModifyImageAttributeInput { + s.Description = v return s } -// SetGroupName sets the GroupName field's value. -func (s *LaunchTemplatePlacementRequest) SetGroupName(v string) *LaunchTemplatePlacementRequest { - s.GroupName = &v +// SetDryRun sets the DryRun field's value. +func (s *ModifyImageAttributeInput) SetDryRun(v bool) *ModifyImageAttributeInput { + s.DryRun = &v return s } -// SetHostId sets the HostId field's value. -func (s *LaunchTemplatePlacementRequest) SetHostId(v string) *LaunchTemplatePlacementRequest { - s.HostId = &v +// SetImageId sets the ImageId field's value. +func (s *ModifyImageAttributeInput) SetImageId(v string) *ModifyImageAttributeInput { + s.ImageId = &v return s } -// SetSpreadDomain sets the SpreadDomain field's value. -func (s *LaunchTemplatePlacementRequest) SetSpreadDomain(v string) *LaunchTemplatePlacementRequest { - s.SpreadDomain = &v +// SetLaunchPermission sets the LaunchPermission field's value. +func (s *ModifyImageAttributeInput) SetLaunchPermission(v *LaunchPermissionModifications) *ModifyImageAttributeInput { + s.LaunchPermission = v return s } -// SetTenancy sets the Tenancy field's value. -func (s *LaunchTemplatePlacementRequest) SetTenancy(v string) *LaunchTemplatePlacementRequest { - s.Tenancy = &v +// SetOperationType sets the OperationType field's value. +func (s *ModifyImageAttributeInput) SetOperationType(v string) *ModifyImageAttributeInput { + s.OperationType = &v return s } -// The launch template to use. You must specify either the launch template ID -// or launch template name in the request, but not both. -type LaunchTemplateSpecification struct { - _ struct{} `type:"structure"` +// SetProductCodes sets the ProductCodes field's value. +func (s *ModifyImageAttributeInput) SetProductCodes(v []*string) *ModifyImageAttributeInput { + s.ProductCodes = v + return s +} - // The ID of the launch template. - LaunchTemplateId *string `type:"string"` +// SetUserGroups sets the UserGroups field's value. +func (s *ModifyImageAttributeInput) SetUserGroups(v []*string) *ModifyImageAttributeInput { + s.UserGroups = v + return s +} - // The name of the launch template. - LaunchTemplateName *string `type:"string"` +// SetUserIds sets the UserIds field's value. +func (s *ModifyImageAttributeInput) SetUserIds(v []*string) *ModifyImageAttributeInput { + s.UserIds = v + return s +} - // The version number of the launch template. - // - // Default: The default version for the launch template. - Version *string `type:"string"` +// SetValue sets the Value field's value. +func (s *ModifyImageAttributeInput) SetValue(v string) *ModifyImageAttributeInput { + s.Value = &v + return s +} + +type ModifyImageAttributeOutput struct { + _ struct{} `type:"structure"` } // String returns the string representation -func (s LaunchTemplateSpecification) String() string { +func (s ModifyImageAttributeOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LaunchTemplateSpecification) GoString() string { +func (s ModifyImageAttributeOutput) GoString() string { return s.String() } -// SetLaunchTemplateId sets the LaunchTemplateId field's value. -func (s *LaunchTemplateSpecification) SetLaunchTemplateId(v string) *LaunchTemplateSpecification { - s.LaunchTemplateId = &v - return s -} +type ModifyInstanceAttributeInput struct { + _ struct{} `type:"structure"` + + // The name of the attribute. + Attribute *string `locationName:"attribute" type:"string" enum:"InstanceAttributeName"` + + // Modifies the DeleteOnTermination attribute for volumes that are currently + // attached. The volume must be owned by the caller. If no value is specified + // for DeleteOnTermination, the default is true and the volume is deleted when + // the instance is terminated. + // + // 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 (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html#Using_OverridingAMIBDM) + // in the Amazon Elastic Compute Cloud 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 + // console, CLI, or API; otherwise, you can. You cannot use this parameter for + // Spot Instances. + DisableApiTermination *AttributeBooleanValue `locationName:"disableApiTermination" 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 `locationName:"dryRun" type:"boolean"` + + // Specifies whether the instance is optimized for Amazon EBS I/O. This optimization + // provides dedicated throughput to Amazon EBS and an optimized configuration + // stack to provide optimal EBS I/O performance. This optimization isn't available + // with all instance types. Additional usage charges apply when using an EBS + // Optimized instance. + EbsOptimized *AttributeBooleanValue `locationName:"ebsOptimized" type:"structure"` + + // Set to true to enable enhanced networking with ENA for the instance. + // + // This option is supported only for HVM instances. Specifying this option with + // 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. + Groups []*string `locationName:"GroupId" locationNameList:"groupId" type:"list"` -// SetLaunchTemplateName sets the LaunchTemplateName field's value. -func (s *LaunchTemplateSpecification) SetLaunchTemplateName(v string) *LaunchTemplateSpecification { - s.LaunchTemplateName = &v - return s -} + // The ID of the instance. + // + // InstanceId is a required field + InstanceId *string `locationName:"instanceId" type:"string" required:"true"` -// SetVersion sets the Version field's value. -func (s *LaunchTemplateSpecification) SetVersion(v string) *LaunchTemplateSpecification { - s.Version = &v - return s -} + // Specifies whether an instance stops or terminates when you initiate shutdown + // from the instance (using the operating system command for system shutdown). + InstanceInitiatedShutdownBehavior *AttributeValue `locationName:"instanceInitiatedShutdownBehavior" type:"structure"` -// The options for Spot Instances. -type LaunchTemplateSpotMarketOptions struct { - _ struct{} `type:"structure"` + // Changes the instance type to the specified value. For more information, see + // Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html). + // If the instance type is not valid, the error returned is InvalidInstanceAttributeValue. + InstanceType *AttributeValue `locationName:"instanceType" 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). - BlockDurationMinutes *int64 `locationName:"blockDurationMinutes" type:"integer"` + // Changes the instance's kernel to the specified value. We recommend that you + // use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB + // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html). + Kernel *AttributeValue `locationName:"kernel" type:"structure"` - // The behavior when a Spot Instance is interrupted. - InstanceInterruptionBehavior *string `locationName:"instanceInterruptionBehavior" type:"string" enum:"InstanceInterruptionBehavior"` + // Changes the instance's RAM disk to the specified value. We recommend that + // you use PV-GRUB instead of kernels and RAM disks. For more information, see + // PV-GRUB (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html). + Ramdisk *AttributeValue `locationName:"ramdisk" type:"structure"` - // The maximum hourly price you're willing to pay for the Spot Instances. - MaxPrice *string `locationName:"maxPrice" type:"string"` + // 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. + SourceDestCheck *AttributeBooleanValue `type:"structure"` - // The Spot Instance request type. - SpotInstanceType *string `locationName:"spotInstanceType" type:"string" enum:"SpotInstanceType"` + // Set to simple to enable enhanced networking with the Intel 82599 Virtual + // Function interface for the instance. + // + // There is no way to disable enhanced networking with the Intel 82599 Virtual + // Function interface at this time. + // + // This option is supported only for HVM instances. Specifying this option with + // a PV instance can make it unreachable. + SriovNetSupport *AttributeValue `locationName:"sriovNetSupport" type:"structure"` - // The end date of the request. For a one-time request, the request remains - // active until all instances launch, the request is canceled, or this date - // is reached. If the request is persistent, it remains active until it is canceled - // or this date and time is reached. - ValidUntil *time.Time `locationName:"validUntil" type:"timestamp"` + // 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. + UserData *BlobAttributeValue `locationName:"userData" type:"structure"` + + // A new value for the attribute. Use only with the kernel, ramdisk, userData, + // disableApiTermination, or instanceInitiatedShutdownBehavior attribute. + Value *string `locationName:"value" type:"string"` } // String returns the string representation -func (s LaunchTemplateSpotMarketOptions) String() string { +func (s ModifyInstanceAttributeInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LaunchTemplateSpotMarketOptions) GoString() string { +func (s ModifyInstanceAttributeInput) GoString() string { return s.String() } -// SetBlockDurationMinutes sets the BlockDurationMinutes field's value. -func (s *LaunchTemplateSpotMarketOptions) SetBlockDurationMinutes(v int64) *LaunchTemplateSpotMarketOptions { - s.BlockDurationMinutes = &v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyInstanceAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyInstanceAttributeInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } -// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value. -func (s *LaunchTemplateSpotMarketOptions) SetInstanceInterruptionBehavior(v string) *LaunchTemplateSpotMarketOptions { - s.InstanceInterruptionBehavior = &v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetMaxPrice sets the MaxPrice field's value. -func (s *LaunchTemplateSpotMarketOptions) SetMaxPrice(v string) *LaunchTemplateSpotMarketOptions { - s.MaxPrice = &v +// SetAttribute sets the Attribute field's value. +func (s *ModifyInstanceAttributeInput) SetAttribute(v string) *ModifyInstanceAttributeInput { + s.Attribute = &v return s } -// SetSpotInstanceType sets the SpotInstanceType field's value. -func (s *LaunchTemplateSpotMarketOptions) SetSpotInstanceType(v string) *LaunchTemplateSpotMarketOptions { - s.SpotInstanceType = &v +// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. +func (s *ModifyInstanceAttributeInput) SetBlockDeviceMappings(v []*InstanceBlockDeviceMappingSpecification) *ModifyInstanceAttributeInput { + s.BlockDeviceMappings = v return s } -// SetValidUntil sets the ValidUntil field's value. -func (s *LaunchTemplateSpotMarketOptions) SetValidUntil(v time.Time) *LaunchTemplateSpotMarketOptions { - s.ValidUntil = &v +// SetDisableApiTermination sets the DisableApiTermination field's value. +func (s *ModifyInstanceAttributeInput) SetDisableApiTermination(v *AttributeBooleanValue) *ModifyInstanceAttributeInput { + s.DisableApiTermination = v return s } -// The options for Spot Instances. -type LaunchTemplateSpotMarketOptionsRequest 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). - BlockDurationMinutes *int64 `type:"integer"` - - // The behavior when a Spot Instance is interrupted. The default is terminate. - InstanceInterruptionBehavior *string `type:"string" enum:"InstanceInterruptionBehavior"` - - // The maximum hourly price you're willing to pay for the Spot Instances. - MaxPrice *string `type:"string"` - - // The Spot Instance request type. - SpotInstanceType *string `type:"string" enum:"SpotInstanceType"` - - // The end date of the request. For a one-time request, the request remains - // active until all instances launch, the request is canceled, or this date - // is reached. If the request is persistent, it remains active until it is canceled - // or this date and time is reached. The default end date is 7 days from the - // current date. - ValidUntil *time.Time `type:"timestamp"` +// SetDryRun sets the DryRun field's value. +func (s *ModifyInstanceAttributeInput) SetDryRun(v bool) *ModifyInstanceAttributeInput { + s.DryRun = &v + return s } -// String returns the string representation -func (s LaunchTemplateSpotMarketOptionsRequest) String() string { - return awsutil.Prettify(s) +// SetEbsOptimized sets the EbsOptimized field's value. +func (s *ModifyInstanceAttributeInput) SetEbsOptimized(v *AttributeBooleanValue) *ModifyInstanceAttributeInput { + s.EbsOptimized = v + return s } -// GoString returns the string representation -func (s LaunchTemplateSpotMarketOptionsRequest) GoString() string { - return s.String() +// SetEnaSupport sets the EnaSupport field's value. +func (s *ModifyInstanceAttributeInput) SetEnaSupport(v *AttributeBooleanValue) *ModifyInstanceAttributeInput { + s.EnaSupport = v + return s } -// SetBlockDurationMinutes sets the BlockDurationMinutes field's value. -func (s *LaunchTemplateSpotMarketOptionsRequest) SetBlockDurationMinutes(v int64) *LaunchTemplateSpotMarketOptionsRequest { - s.BlockDurationMinutes = &v +// SetGroups sets the Groups field's value. +func (s *ModifyInstanceAttributeInput) SetGroups(v []*string) *ModifyInstanceAttributeInput { + s.Groups = v return s } -// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value. -func (s *LaunchTemplateSpotMarketOptionsRequest) SetInstanceInterruptionBehavior(v string) *LaunchTemplateSpotMarketOptionsRequest { - s.InstanceInterruptionBehavior = &v +// SetInstanceId sets the InstanceId field's value. +func (s *ModifyInstanceAttributeInput) SetInstanceId(v string) *ModifyInstanceAttributeInput { + s.InstanceId = &v return s } -// SetMaxPrice sets the MaxPrice field's value. -func (s *LaunchTemplateSpotMarketOptionsRequest) SetMaxPrice(v string) *LaunchTemplateSpotMarketOptionsRequest { - s.MaxPrice = &v +// SetInstanceInitiatedShutdownBehavior sets the InstanceInitiatedShutdownBehavior field's value. +func (s *ModifyInstanceAttributeInput) SetInstanceInitiatedShutdownBehavior(v *AttributeValue) *ModifyInstanceAttributeInput { + s.InstanceInitiatedShutdownBehavior = v return s } -// SetSpotInstanceType sets the SpotInstanceType field's value. -func (s *LaunchTemplateSpotMarketOptionsRequest) SetSpotInstanceType(v string) *LaunchTemplateSpotMarketOptionsRequest { - s.SpotInstanceType = &v +// SetInstanceType sets the InstanceType field's value. +func (s *ModifyInstanceAttributeInput) SetInstanceType(v *AttributeValue) *ModifyInstanceAttributeInput { + s.InstanceType = v return s } -// SetValidUntil sets the ValidUntil field's value. -func (s *LaunchTemplateSpotMarketOptionsRequest) SetValidUntil(v time.Time) *LaunchTemplateSpotMarketOptionsRequest { - s.ValidUntil = &v +// SetKernel sets the Kernel field's value. +func (s *ModifyInstanceAttributeInput) SetKernel(v *AttributeValue) *ModifyInstanceAttributeInput { + s.Kernel = v return s } -// The tag specification for the launch template. -type LaunchTemplateTagSpecification struct { - _ struct{} `type:"structure"` - - // The type of resource. - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - - // The tags for the resource. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` +// SetRamdisk sets the Ramdisk field's value. +func (s *ModifyInstanceAttributeInput) SetRamdisk(v *AttributeValue) *ModifyInstanceAttributeInput { + s.Ramdisk = v + return s } -// String returns the string representation -func (s LaunchTemplateTagSpecification) String() string { - return awsutil.Prettify(s) +// SetSourceDestCheck sets the SourceDestCheck field's value. +func (s *ModifyInstanceAttributeInput) SetSourceDestCheck(v *AttributeBooleanValue) *ModifyInstanceAttributeInput { + s.SourceDestCheck = v + return s } -// GoString returns the string representation -func (s LaunchTemplateTagSpecification) GoString() string { - return s.String() +// SetSriovNetSupport sets the SriovNetSupport field's value. +func (s *ModifyInstanceAttributeInput) SetSriovNetSupport(v *AttributeValue) *ModifyInstanceAttributeInput { + s.SriovNetSupport = v + return s } -// SetResourceType sets the ResourceType field's value. -func (s *LaunchTemplateTagSpecification) SetResourceType(v string) *LaunchTemplateTagSpecification { - s.ResourceType = &v +// SetUserData sets the UserData field's value. +func (s *ModifyInstanceAttributeInput) SetUserData(v *BlobAttributeValue) *ModifyInstanceAttributeInput { + s.UserData = v return s } -// SetTags sets the Tags field's value. -func (s *LaunchTemplateTagSpecification) SetTags(v []*Tag) *LaunchTemplateTagSpecification { - s.Tags = v +// SetValue sets the Value field's value. +func (s *ModifyInstanceAttributeInput) SetValue(v string) *ModifyInstanceAttributeInput { + s.Value = &v return s } -// The tags specification for the launch template. -type LaunchTemplateTagSpecificationRequest struct { +type ModifyInstanceAttributeOutput struct { _ struct{} `type:"structure"` - - // The type of resource to tag. Currently, the resource types that support tagging - // on creation are instance and volume. To tag a resource after it has been - // created, see CreateTags. - ResourceType *string `type:"string" enum:"ResourceType"` - - // The tags to apply to the resource. - Tags []*Tag `locationName:"Tag" locationNameList:"item" type:"list"` } // String returns the string representation -func (s LaunchTemplateTagSpecificationRequest) String() string { +func (s ModifyInstanceAttributeOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LaunchTemplateTagSpecificationRequest) GoString() string { +func (s ModifyInstanceAttributeOutput) GoString() string { return s.String() } -// SetResourceType sets the ResourceType field's value. -func (s *LaunchTemplateTagSpecificationRequest) SetResourceType(v string) *LaunchTemplateTagSpecificationRequest { - s.ResourceType = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *LaunchTemplateTagSpecificationRequest) SetTags(v []*Tag) *LaunchTemplateTagSpecificationRequest { - s.Tags = v - return s -} - -// Describes a launch template version. -type LaunchTemplateVersion struct { +type ModifyInstanceCapacityReservationAttributesInput struct { _ struct{} `type:"structure"` - // The time the version was created. - CreateTime *time.Time `locationName:"createTime" type:"timestamp"` - - // The principal that created the version. - CreatedBy *string `locationName:"createdBy" type:"string"` - - // Indicates whether the version is the default version. - DefaultVersion *bool `locationName:"defaultVersion" type:"boolean"` - - // Information about the launch template. - LaunchTemplateData *ResponseLaunchTemplateData `locationName:"launchTemplateData" type:"structure"` - - // The ID of the launch template. - LaunchTemplateId *string `locationName:"launchTemplateId" type:"string"` - - // The name of the launch template. - LaunchTemplateName *string `locationName:"launchTemplateName" min:"3" type:"string"` + // Information about the Capacity Reservation targeting option. + // + // CapacityReservationSpecification is a required field + CapacityReservationSpecification *CapacityReservationSpecification `type:"structure" required:"true"` - // The description for the version. - VersionDescription *string `locationName:"versionDescription" 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 version number. - VersionNumber *int64 `locationName:"versionNumber" type:"long"` + // The ID of the instance to be modified. + // + // InstanceId is a required field + InstanceId *string `type:"string" required:"true"` } // String returns the string representation -func (s LaunchTemplateVersion) String() string { +func (s ModifyInstanceCapacityReservationAttributesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LaunchTemplateVersion) GoString() string { +func (s ModifyInstanceCapacityReservationAttributesInput) GoString() string { return s.String() } -// SetCreateTime sets the CreateTime field's value. -func (s *LaunchTemplateVersion) SetCreateTime(v time.Time) *LaunchTemplateVersion { - s.CreateTime = &v - return s -} - -// SetCreatedBy sets the CreatedBy field's value. -func (s *LaunchTemplateVersion) SetCreatedBy(v string) *LaunchTemplateVersion { - s.CreatedBy = &v - return s -} - -// SetDefaultVersion sets the DefaultVersion field's value. -func (s *LaunchTemplateVersion) SetDefaultVersion(v bool) *LaunchTemplateVersion { - s.DefaultVersion = &v - return s -} - -// SetLaunchTemplateData sets the LaunchTemplateData field's value. -func (s *LaunchTemplateVersion) SetLaunchTemplateData(v *ResponseLaunchTemplateData) *LaunchTemplateVersion { - s.LaunchTemplateData = v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyInstanceCapacityReservationAttributesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyInstanceCapacityReservationAttributesInput"} + if s.CapacityReservationSpecification == nil { + invalidParams.Add(request.NewErrParamRequired("CapacityReservationSpecification")) + } + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } -// SetLaunchTemplateId sets the LaunchTemplateId field's value. -func (s *LaunchTemplateVersion) SetLaunchTemplateId(v string) *LaunchTemplateVersion { - s.LaunchTemplateId = &v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetLaunchTemplateName sets the LaunchTemplateName field's value. -func (s *LaunchTemplateVersion) SetLaunchTemplateName(v string) *LaunchTemplateVersion { - s.LaunchTemplateName = &v +// SetCapacityReservationSpecification sets the CapacityReservationSpecification field's value. +func (s *ModifyInstanceCapacityReservationAttributesInput) SetCapacityReservationSpecification(v *CapacityReservationSpecification) *ModifyInstanceCapacityReservationAttributesInput { + s.CapacityReservationSpecification = v return s } -// SetVersionDescription sets the VersionDescription field's value. -func (s *LaunchTemplateVersion) SetVersionDescription(v string) *LaunchTemplateVersion { - s.VersionDescription = &v +// SetDryRun sets the DryRun field's value. +func (s *ModifyInstanceCapacityReservationAttributesInput) SetDryRun(v bool) *ModifyInstanceCapacityReservationAttributesInput { + s.DryRun = &v return s } -// SetVersionNumber sets the VersionNumber field's value. -func (s *LaunchTemplateVersion) SetVersionNumber(v int64) *LaunchTemplateVersion { - s.VersionNumber = &v +// SetInstanceId sets the InstanceId field's value. +func (s *ModifyInstanceCapacityReservationAttributesInput) SetInstanceId(v string) *ModifyInstanceCapacityReservationAttributesInput { + s.InstanceId = &v return s } -// Describes the monitoring for the instance. -type LaunchTemplatesMonitoring struct { +type ModifyInstanceCapacityReservationAttributesOutput struct { _ struct{} `type:"structure"` - // Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring - // is enabled. - Enabled *bool `locationName:"enabled" type:"boolean"` + // Returns true if the request succeeds; otherwise, it returns an error. + Return *bool `locationName:"return" type:"boolean"` } // String returns the string representation -func (s LaunchTemplatesMonitoring) String() string { +func (s ModifyInstanceCapacityReservationAttributesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LaunchTemplatesMonitoring) GoString() string { +func (s ModifyInstanceCapacityReservationAttributesOutput) GoString() string { return s.String() } -// SetEnabled sets the Enabled field's value. -func (s *LaunchTemplatesMonitoring) SetEnabled(v bool) *LaunchTemplatesMonitoring { - s.Enabled = &v +// SetReturn sets the Return field's value. +func (s *ModifyInstanceCapacityReservationAttributesOutput) SetReturn(v bool) *ModifyInstanceCapacityReservationAttributesOutput { + s.Return = &v return s } -// Describes the monitoring for the instance. -type LaunchTemplatesMonitoringRequest struct { +type ModifyInstanceCreditSpecificationInput struct { _ struct{} `type:"structure"` - // Specify true to enable detailed monitoring. Otherwise, basic monitoring is - // enabled. - Enabled *bool `type:"boolean"` -} - -// String returns the string representation -func (s LaunchTemplatesMonitoringRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s LaunchTemplatesMonitoringRequest) GoString() string { - return s.String() -} - -// SetEnabled sets the Enabled field's value. -func (s *LaunchTemplatesMonitoringRequest) SetEnabled(v bool) *LaunchTemplatesMonitoringRequest { - s.Enabled = &v - return s -} - -// Describes the Classic Load Balancers and target groups to attach to a Spot -// Fleet request. -type LoadBalancersConfig struct { - _ struct{} `type:"structure"` + // A unique, case-sensitive token that you provide to ensure idempotency of + // your modification request. For more information, see Ensuring Idempotency + // (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + ClientToken *string `type:"string"` - // The Classic Load Balancers. - ClassicLoadBalancersConfig *ClassicLoadBalancersConfig `locationName:"classicLoadBalancersConfig" 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 target groups. - TargetGroupsConfig *TargetGroupsConfig `locationName:"targetGroupsConfig" type:"structure"` + // Information about the credit option for CPU usage. + // + // InstanceCreditSpecifications is a required field + InstanceCreditSpecifications []*InstanceCreditSpecificationRequest `locationName:"InstanceCreditSpecification" locationNameList:"item" type:"list" required:"true"` } // String returns the string representation -func (s LoadBalancersConfig) String() string { +func (s ModifyInstanceCreditSpecificationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LoadBalancersConfig) GoString() string { +func (s ModifyInstanceCreditSpecificationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *LoadBalancersConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LoadBalancersConfig"} - if s.ClassicLoadBalancersConfig != nil { - if err := s.ClassicLoadBalancersConfig.Validate(); err != nil { - invalidParams.AddNested("ClassicLoadBalancersConfig", err.(request.ErrInvalidParams)) - } - } - if s.TargetGroupsConfig != nil { - if err := s.TargetGroupsConfig.Validate(); err != nil { - invalidParams.AddNested("TargetGroupsConfig", err.(request.ErrInvalidParams)) - } +func (s *ModifyInstanceCreditSpecificationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyInstanceCreditSpecificationInput"} + if s.InstanceCreditSpecifications == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceCreditSpecifications")) } if invalidParams.Len() > 0 { @@ -53356,165 +66139,209 @@ func (s *LoadBalancersConfig) Validate() error { return nil } -// SetClassicLoadBalancersConfig sets the ClassicLoadBalancersConfig field's value. -func (s *LoadBalancersConfig) SetClassicLoadBalancersConfig(v *ClassicLoadBalancersConfig) *LoadBalancersConfig { - s.ClassicLoadBalancersConfig = v +// SetClientToken sets the ClientToken field's value. +func (s *ModifyInstanceCreditSpecificationInput) SetClientToken(v string) *ModifyInstanceCreditSpecificationInput { + s.ClientToken = &v return s } -// SetTargetGroupsConfig sets the TargetGroupsConfig field's value. -func (s *LoadBalancersConfig) SetTargetGroupsConfig(v *TargetGroupsConfig) *LoadBalancersConfig { - s.TargetGroupsConfig = v +// SetDryRun sets the DryRun field's value. +func (s *ModifyInstanceCreditSpecificationInput) SetDryRun(v bool) *ModifyInstanceCreditSpecificationInput { + s.DryRun = &v return s } -// Describes a load permission. -type LoadPermission struct { +// SetInstanceCreditSpecifications sets the InstanceCreditSpecifications field's value. +func (s *ModifyInstanceCreditSpecificationInput) SetInstanceCreditSpecifications(v []*InstanceCreditSpecificationRequest) *ModifyInstanceCreditSpecificationInput { + s.InstanceCreditSpecifications = v + return s +} + +type ModifyInstanceCreditSpecificationOutput struct { _ struct{} `type:"structure"` - // The name of the group. - Group *string `locationName:"group" type:"string" enum:"PermissionGroup"` + // Information about the instances whose credit option for CPU usage was successfully + // modified. + SuccessfulInstanceCreditSpecifications []*SuccessfulInstanceCreditSpecificationItem `locationName:"successfulInstanceCreditSpecificationSet" locationNameList:"item" type:"list"` - // The AWS account ID. - UserId *string `locationName:"userId" type:"string"` + // Information about the instances whose credit option for CPU usage was not + // modified. + UnsuccessfulInstanceCreditSpecifications []*UnsuccessfulInstanceCreditSpecificationItem `locationName:"unsuccessfulInstanceCreditSpecificationSet" locationNameList:"item" type:"list"` } // String returns the string representation -func (s LoadPermission) String() string { +func (s ModifyInstanceCreditSpecificationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LoadPermission) GoString() string { +func (s ModifyInstanceCreditSpecificationOutput) GoString() string { return s.String() } -// SetGroup sets the Group field's value. -func (s *LoadPermission) SetGroup(v string) *LoadPermission { - s.Group = &v +// SetSuccessfulInstanceCreditSpecifications sets the SuccessfulInstanceCreditSpecifications field's value. +func (s *ModifyInstanceCreditSpecificationOutput) SetSuccessfulInstanceCreditSpecifications(v []*SuccessfulInstanceCreditSpecificationItem) *ModifyInstanceCreditSpecificationOutput { + s.SuccessfulInstanceCreditSpecifications = v return s } -// SetUserId sets the UserId field's value. -func (s *LoadPermission) SetUserId(v string) *LoadPermission { - s.UserId = &v +// SetUnsuccessfulInstanceCreditSpecifications sets the UnsuccessfulInstanceCreditSpecifications field's value. +func (s *ModifyInstanceCreditSpecificationOutput) SetUnsuccessfulInstanceCreditSpecifications(v []*UnsuccessfulInstanceCreditSpecificationItem) *ModifyInstanceCreditSpecificationOutput { + s.UnsuccessfulInstanceCreditSpecifications = v return s } -// Describes modifications to the load permissions of an Amazon FPGA image (AFI). -type LoadPermissionModifications struct { +type ModifyInstancePlacementInput struct { _ struct{} `type:"structure"` - // The load permissions to add. - Add []*LoadPermissionRequest `locationNameList:"item" type:"list"` + // The affinity setting for the instance. + Affinity *string `locationName:"affinity" type:"string" enum:"Affinity"` + + // The name of the placement group in which to place the instance. For spread + // placement groups, the instance must have a tenancy of default. For cluster + // and partition placement groups, the instance must have a tenancy of default + // or dedicated. + // + // To remove an instance from a placement group, specify an empty string (""). + GroupName *string `type:"string"` + + // The ID of the Dedicated Host with which to associate the instance. + HostId *string `locationName:"hostId" type:"string"` + + // The ID of the instance that you are modifying. + // + // InstanceId is a required field + InstanceId *string `locationName:"instanceId" type:"string" required:"true"` + + // Reserved for future use. + PartitionNumber *int64 `type:"integer"` + + // The tenancy for the instance. + Tenancy *string `locationName:"tenancy" type:"string" enum:"HostTenancy"` +} + +// String returns the string representation +func (s ModifyInstancePlacementInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyInstancePlacementInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyInstancePlacementInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyInstancePlacementInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAffinity sets the Affinity field's value. +func (s *ModifyInstancePlacementInput) SetAffinity(v string) *ModifyInstancePlacementInput { + s.Affinity = &v + return s +} - // The load permissions to remove. - Remove []*LoadPermissionRequest `locationNameList:"item" type:"list"` +// SetGroupName sets the GroupName field's value. +func (s *ModifyInstancePlacementInput) SetGroupName(v string) *ModifyInstancePlacementInput { + s.GroupName = &v + return s } -// String returns the string representation -func (s LoadPermissionModifications) String() string { - return awsutil.Prettify(s) +// SetHostId sets the HostId field's value. +func (s *ModifyInstancePlacementInput) SetHostId(v string) *ModifyInstancePlacementInput { + s.HostId = &v + return s } -// GoString returns the string representation -func (s LoadPermissionModifications) GoString() string { - return s.String() +// SetInstanceId sets the InstanceId field's value. +func (s *ModifyInstancePlacementInput) SetInstanceId(v string) *ModifyInstancePlacementInput { + s.InstanceId = &v + return s } -// SetAdd sets the Add field's value. -func (s *LoadPermissionModifications) SetAdd(v []*LoadPermissionRequest) *LoadPermissionModifications { - s.Add = v +// SetPartitionNumber sets the PartitionNumber field's value. +func (s *ModifyInstancePlacementInput) SetPartitionNumber(v int64) *ModifyInstancePlacementInput { + s.PartitionNumber = &v return s } -// SetRemove sets the Remove field's value. -func (s *LoadPermissionModifications) SetRemove(v []*LoadPermissionRequest) *LoadPermissionModifications { - s.Remove = v +// SetTenancy sets the Tenancy field's value. +func (s *ModifyInstancePlacementInput) SetTenancy(v string) *ModifyInstancePlacementInput { + s.Tenancy = &v return s } -// Describes a load permission. -type LoadPermissionRequest struct { +type ModifyInstancePlacementOutput struct { _ struct{} `type:"structure"` - // The name of the group. - Group *string `type:"string" enum:"PermissionGroup"` - - // The AWS account ID. - UserId *string `type:"string"` + // Is true if the request succeeds, and an error otherwise. + Return *bool `locationName:"return" type:"boolean"` } // String returns the string representation -func (s LoadPermissionRequest) String() string { +func (s ModifyInstancePlacementOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LoadPermissionRequest) GoString() string { +func (s ModifyInstancePlacementOutput) GoString() string { return s.String() } -// SetGroup sets the Group field's value. -func (s *LoadPermissionRequest) SetGroup(v string) *LoadPermissionRequest { - s.Group = &v - return s -} - -// SetUserId sets the UserId field's value. -func (s *LoadPermissionRequest) SetUserId(v string) *LoadPermissionRequest { - s.UserId = &v +// SetReturn sets the Return field's value. +func (s *ModifyInstancePlacementOutput) SetReturn(v bool) *ModifyInstancePlacementOutput { + s.Return = &v return s } -type ModifyFleetInput struct { +type ModifyLaunchTemplateInput struct { _ struct{} `type:"structure"` + // Unique, case-sensitive identifier you provide to ensure the idempotency of + // the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + ClientToken *string `type:"string"` + + // The version number of the launch template to set as the default version. + DefaultVersion *string `locationName:"SetDefaultVersion" 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"` - // Indicates whether running instances should be terminated if the total target - // capacity of the EC2 Fleet is decreased below the current size of the EC2 - // Fleet. - ExcessCapacityTerminationPolicy *string `type:"string" enum:"FleetExcessCapacityTerminationPolicy"` - - // The ID of the EC2 Fleet. - // - // FleetId is a required field - FleetId *string `type:"string" required:"true"` + // The ID of the launch template. You must specify either the launch template + // ID or launch template name in the request. + LaunchTemplateId *string `type:"string"` - // The size of the EC2 Fleet. - // - // TargetCapacitySpecification is a required field - TargetCapacitySpecification *TargetCapacitySpecificationRequest `type:"structure" required:"true"` + // The name of the launch template. You must specify either the launch template + // ID or launch template name in the request. + LaunchTemplateName *string `min:"3" type:"string"` } // String returns the string representation -func (s ModifyFleetInput) String() string { +func (s ModifyLaunchTemplateInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyFleetInput) GoString() string { +func (s ModifyLaunchTemplateInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyFleetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyFleetInput"} - if s.FleetId == nil { - invalidParams.Add(request.NewErrParamRequired("FleetId")) - } - if s.TargetCapacitySpecification == nil { - invalidParams.Add(request.NewErrParamRequired("TargetCapacitySpecification")) - } - if s.TargetCapacitySpecification != nil { - if err := s.TargetCapacitySpecification.Validate(); err != nil { - invalidParams.AddNested("TargetCapacitySpecification", err.(request.ErrInvalidParams)) - } +func (s *ModifyLaunchTemplateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyLaunchTemplateInput"} + if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3)) } if invalidParams.Len() > 0 { @@ -53523,111 +66350,110 @@ func (s *ModifyFleetInput) Validate() error { return nil } -// SetDryRun sets the DryRun field's value. -func (s *ModifyFleetInput) SetDryRun(v bool) *ModifyFleetInput { - s.DryRun = &v +// SetClientToken sets the ClientToken field's value. +func (s *ModifyLaunchTemplateInput) SetClientToken(v string) *ModifyLaunchTemplateInput { + s.ClientToken = &v return s } -// SetExcessCapacityTerminationPolicy sets the ExcessCapacityTerminationPolicy field's value. -func (s *ModifyFleetInput) SetExcessCapacityTerminationPolicy(v string) *ModifyFleetInput { - s.ExcessCapacityTerminationPolicy = &v +// SetDefaultVersion sets the DefaultVersion field's value. +func (s *ModifyLaunchTemplateInput) SetDefaultVersion(v string) *ModifyLaunchTemplateInput { + s.DefaultVersion = &v return s } -// SetFleetId sets the FleetId field's value. -func (s *ModifyFleetInput) SetFleetId(v string) *ModifyFleetInput { - s.FleetId = &v +// SetDryRun sets the DryRun field's value. +func (s *ModifyLaunchTemplateInput) SetDryRun(v bool) *ModifyLaunchTemplateInput { + s.DryRun = &v return s } -// SetTargetCapacitySpecification sets the TargetCapacitySpecification field's value. -func (s *ModifyFleetInput) SetTargetCapacitySpecification(v *TargetCapacitySpecificationRequest) *ModifyFleetInput { - s.TargetCapacitySpecification = v +// SetLaunchTemplateId sets the LaunchTemplateId field's value. +func (s *ModifyLaunchTemplateInput) SetLaunchTemplateId(v string) *ModifyLaunchTemplateInput { + s.LaunchTemplateId = &v return s } -type ModifyFleetOutput struct { +// SetLaunchTemplateName sets the LaunchTemplateName field's value. +func (s *ModifyLaunchTemplateInput) SetLaunchTemplateName(v string) *ModifyLaunchTemplateInput { + s.LaunchTemplateName = &v + return s +} + +type ModifyLaunchTemplateOutput struct { _ struct{} `type:"structure"` - // Is true if the request succeeds, and an error otherwise. - Return *bool `locationName:"return" type:"boolean"` + // Information about the launch template. + LaunchTemplate *LaunchTemplate `locationName:"launchTemplate" type:"structure"` } // String returns the string representation -func (s ModifyFleetOutput) String() string { +func (s ModifyLaunchTemplateOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyFleetOutput) GoString() string { +func (s ModifyLaunchTemplateOutput) GoString() string { return s.String() } -// SetReturn sets the Return field's value. -func (s *ModifyFleetOutput) SetReturn(v bool) *ModifyFleetOutput { - s.Return = &v +// SetLaunchTemplate sets the LaunchTemplate field's value. +func (s *ModifyLaunchTemplateOutput) SetLaunchTemplate(v *LaunchTemplate) *ModifyLaunchTemplateOutput { + s.LaunchTemplate = v return s } -type ModifyFpgaImageAttributeInput struct { +// Contains the parameters for ModifyNetworkInterfaceAttribute. +type ModifyNetworkInterfaceAttributeInput struct { _ struct{} `type:"structure"` - // The name of the attribute. - Attribute *string `type:"string" enum:"FpgaImageAttributeName"` + // Information about the interface attachment. If modifying the 'delete on termination' + // attribute, you must specify the ID of the interface attachment. + Attachment *NetworkInterfaceAttachmentChanges `locationName:"attachment" type:"structure"` - // A description for the AFI. - Description *string `type:"string"` + // A description for the network interface. + Description *AttributeValue `locationName:"description" 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 AFI. - // - // FpgaImageId is a required field - FpgaImageId *string `type:"string" required:"true"` - - // The load permission for the AFI. - LoadPermission *LoadPermissionModifications `type:"structure"` - - // A name for the AFI. - Name *string `type:"string"` - - // The operation type. - OperationType *string `type:"string" enum:"OperationType"` + DryRun *bool `locationName:"dryRun" type:"boolean"` - // One or more product codes. After you add a product code to an AFI, it can't - // be removed. This parameter is valid only when modifying the productCodes - // attribute. - ProductCodes []*string `locationName:"ProductCode" locationNameList:"ProductCode" type:"list"` + // Changes the security groups for the network interface. The new set of groups + // you specify replaces the current set. You must specify at least one group, + // even if it's just the default security group in the VPC. You must specify + // the ID of the security group, not the name. + Groups []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"` - // One or more user groups. This parameter is valid only when modifying the - // loadPermission attribute. - UserGroups []*string `locationName:"UserGroup" locationNameList:"UserGroup" type:"list"` + // The ID of the network interface. + // + // NetworkInterfaceId is a required field + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"` - // One or more AWS account IDs. This parameter is valid only when modifying - // the loadPermission attribute. - UserIds []*string `locationName:"UserId" locationNameList:"UserId" type:"list"` + // 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 (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html) + // in the Amazon Virtual Private Cloud User Guide. + SourceDestCheck *AttributeBooleanValue `locationName:"sourceDestCheck" type:"structure"` } // String returns the string representation -func (s ModifyFpgaImageAttributeInput) String() string { +func (s ModifyNetworkInterfaceAttributeInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyFpgaImageAttributeInput) GoString() string { +func (s ModifyNetworkInterfaceAttributeInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyFpgaImageAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyFpgaImageAttributeInput"} - if s.FpgaImageId == nil { - invalidParams.Add(request.NewErrParamRequired("FpgaImageId")) +func (s *ModifyNetworkInterfaceAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyNetworkInterfaceAttributeInput"} + if s.NetworkInterfaceId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) } if invalidParams.Len() > 0 { @@ -53636,122 +66462,190 @@ func (s *ModifyFpgaImageAttributeInput) Validate() error { return nil } -// SetAttribute sets the Attribute field's value. -func (s *ModifyFpgaImageAttributeInput) SetAttribute(v string) *ModifyFpgaImageAttributeInput { - s.Attribute = &v +// SetAttachment sets the Attachment field's value. +func (s *ModifyNetworkInterfaceAttributeInput) SetAttachment(v *NetworkInterfaceAttachmentChanges) *ModifyNetworkInterfaceAttributeInput { + s.Attachment = v return s } // SetDescription sets the Description field's value. -func (s *ModifyFpgaImageAttributeInput) SetDescription(v string) *ModifyFpgaImageAttributeInput { - s.Description = &v +func (s *ModifyNetworkInterfaceAttributeInput) SetDescription(v *AttributeValue) *ModifyNetworkInterfaceAttributeInput { + s.Description = v return s } // SetDryRun sets the DryRun field's value. -func (s *ModifyFpgaImageAttributeInput) SetDryRun(v bool) *ModifyFpgaImageAttributeInput { +func (s *ModifyNetworkInterfaceAttributeInput) SetDryRun(v bool) *ModifyNetworkInterfaceAttributeInput { s.DryRun = &v return s } -// SetFpgaImageId sets the FpgaImageId field's value. -func (s *ModifyFpgaImageAttributeInput) SetFpgaImageId(v string) *ModifyFpgaImageAttributeInput { - s.FpgaImageId = &v +// SetGroups sets the Groups field's value. +func (s *ModifyNetworkInterfaceAttributeInput) SetGroups(v []*string) *ModifyNetworkInterfaceAttributeInput { + s.Groups = v return s } -// SetLoadPermission sets the LoadPermission field's value. -func (s *ModifyFpgaImageAttributeInput) SetLoadPermission(v *LoadPermissionModifications) *ModifyFpgaImageAttributeInput { - s.LoadPermission = v +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *ModifyNetworkInterfaceAttributeInput) SetNetworkInterfaceId(v string) *ModifyNetworkInterfaceAttributeInput { + s.NetworkInterfaceId = &v return s } -// SetName sets the Name field's value. -func (s *ModifyFpgaImageAttributeInput) SetName(v string) *ModifyFpgaImageAttributeInput { - s.Name = &v +// SetSourceDestCheck sets the SourceDestCheck field's value. +func (s *ModifyNetworkInterfaceAttributeInput) SetSourceDestCheck(v *AttributeBooleanValue) *ModifyNetworkInterfaceAttributeInput { + s.SourceDestCheck = v return s } -// SetOperationType sets the OperationType field's value. -func (s *ModifyFpgaImageAttributeInput) SetOperationType(v string) *ModifyFpgaImageAttributeInput { - s.OperationType = &v - return s +type ModifyNetworkInterfaceAttributeOutput struct { + _ struct{} `type:"structure"` } -// SetProductCodes sets the ProductCodes field's value. -func (s *ModifyFpgaImageAttributeInput) SetProductCodes(v []*string) *ModifyFpgaImageAttributeInput { - s.ProductCodes = v +// String returns the string representation +func (s ModifyNetworkInterfaceAttributeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyNetworkInterfaceAttributeOutput) GoString() string { + return s.String() +} + +// Contains the parameters for ModifyReservedInstances. +type ModifyReservedInstancesInput struct { + _ struct{} `type:"structure"` + + // A unique, case-sensitive token you provide to ensure idempotency of your + // modification request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + ClientToken *string `locationName:"clientToken" type:"string"` + + // The IDs of the Reserved Instances to modify. + // + // ReservedInstancesIds is a required field + ReservedInstancesIds []*string `locationName:"ReservedInstancesId" locationNameList:"ReservedInstancesId" type:"list" required:"true"` + + // The configuration settings for the Reserved Instances to modify. + // + // TargetConfigurations is a required field + TargetConfigurations []*ReservedInstancesConfiguration `locationName:"ReservedInstancesConfigurationSetItemType" locationNameList:"item" type:"list" required:"true"` +} + +// String returns the string representation +func (s ModifyReservedInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyReservedInstancesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyReservedInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyReservedInstancesInput"} + if s.ReservedInstancesIds == nil { + invalidParams.Add(request.NewErrParamRequired("ReservedInstancesIds")) + } + if s.TargetConfigurations == nil { + invalidParams.Add(request.NewErrParamRequired("TargetConfigurations")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *ModifyReservedInstancesInput) SetClientToken(v string) *ModifyReservedInstancesInput { + s.ClientToken = &v return s } -// SetUserGroups sets the UserGroups field's value. -func (s *ModifyFpgaImageAttributeInput) SetUserGroups(v []*string) *ModifyFpgaImageAttributeInput { - s.UserGroups = v +// SetReservedInstancesIds sets the ReservedInstancesIds field's value. +func (s *ModifyReservedInstancesInput) SetReservedInstancesIds(v []*string) *ModifyReservedInstancesInput { + s.ReservedInstancesIds = v return s } -// SetUserIds sets the UserIds field's value. -func (s *ModifyFpgaImageAttributeInput) SetUserIds(v []*string) *ModifyFpgaImageAttributeInput { - s.UserIds = v +// SetTargetConfigurations sets the TargetConfigurations field's value. +func (s *ModifyReservedInstancesInput) SetTargetConfigurations(v []*ReservedInstancesConfiguration) *ModifyReservedInstancesInput { + s.TargetConfigurations = v return s } -type ModifyFpgaImageAttributeOutput struct { +// Contains the output of ModifyReservedInstances. +type ModifyReservedInstancesOutput struct { _ struct{} `type:"structure"` - // Information about the attribute. - FpgaImageAttribute *FpgaImageAttribute `locationName:"fpgaImageAttribute" type:"structure"` + // The ID for the modification. + ReservedInstancesModificationId *string `locationName:"reservedInstancesModificationId" type:"string"` } // String returns the string representation -func (s ModifyFpgaImageAttributeOutput) String() string { +func (s ModifyReservedInstancesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyFpgaImageAttributeOutput) GoString() string { +func (s ModifyReservedInstancesOutput) GoString() string { return s.String() } -// SetFpgaImageAttribute sets the FpgaImageAttribute field's value. -func (s *ModifyFpgaImageAttributeOutput) SetFpgaImageAttribute(v *FpgaImageAttribute) *ModifyFpgaImageAttributeOutput { - s.FpgaImageAttribute = v +// SetReservedInstancesModificationId sets the ReservedInstancesModificationId field's value. +func (s *ModifyReservedInstancesOutput) SetReservedInstancesModificationId(v string) *ModifyReservedInstancesOutput { + s.ReservedInstancesModificationId = &v return s } -// Contains the parameters for ModifyHosts. -type ModifyHostsInput struct { +// Contains the parameters for ModifySnapshotAttribute. +type ModifySnapshotAttributeInput struct { _ struct{} `type:"structure"` - // Specify whether to enable or disable auto-placement. - // - // AutoPlacement is a required field - AutoPlacement *string `locationName:"autoPlacement" type:"string" required:"true" enum:"AutoPlacement"` + // The snapshot attribute to modify. Only volume creation permissions can be + // modified. + Attribute *string `type:"string" enum:"SnapshotAttributeName"` - // The IDs of the Dedicated Hosts to modify. + // A JSON representation of the snapshot attribute modification. + CreateVolumePermission *CreateVolumePermissionModifications `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 `locationName:"dryRun" type:"boolean"` + + // The group to modify for the snapshot. + GroupNames []*string `locationName:"UserGroup" locationNameList:"GroupName" type:"list"` + + // The type of operation to perform to the attribute. + OperationType *string `type:"string" enum:"OperationType"` + + // The ID of the snapshot. // - // HostIds is a required field - HostIds []*string `locationName:"hostId" locationNameList:"item" type:"list" required:"true"` + // SnapshotId is a required field + SnapshotId *string `type:"string" required:"true"` + + // The account ID to modify for the snapshot. + UserIds []*string `locationName:"UserId" locationNameList:"UserId" type:"list"` } // String returns the string representation -func (s ModifyHostsInput) String() string { +func (s ModifySnapshotAttributeInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyHostsInput) GoString() string { +func (s ModifySnapshotAttributeInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyHostsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyHostsInput"} - if s.AutoPlacement == nil { - invalidParams.Add(request.NewErrParamRequired("AutoPlacement")) - } - if s.HostIds == nil { - invalidParams.Add(request.NewErrParamRequired("HostIds")) +func (s *ModifySnapshotAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifySnapshotAttributeInput"} + if s.SnapshotId == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotId")) } if invalidParams.Len() > 0 { @@ -53760,94 +66654,95 @@ func (s *ModifyHostsInput) Validate() error { return nil } -// SetAutoPlacement sets the AutoPlacement field's value. -func (s *ModifyHostsInput) SetAutoPlacement(v string) *ModifyHostsInput { - s.AutoPlacement = &v +// SetAttribute sets the Attribute field's value. +func (s *ModifySnapshotAttributeInput) SetAttribute(v string) *ModifySnapshotAttributeInput { + s.Attribute = &v return s } -// SetHostIds sets the HostIds field's value. -func (s *ModifyHostsInput) SetHostIds(v []*string) *ModifyHostsInput { - s.HostIds = v +// SetCreateVolumePermission sets the CreateVolumePermission field's value. +func (s *ModifySnapshotAttributeInput) SetCreateVolumePermission(v *CreateVolumePermissionModifications) *ModifySnapshotAttributeInput { + s.CreateVolumePermission = v return s } -// Contains the output of ModifyHosts. -type ModifyHostsOutput struct { - _ struct{} `type:"structure"` - - // The IDs of the Dedicated Hosts that were successfully modified. - Successful []*string `locationName:"successful" locationNameList:"item" type:"list"` - - // The IDs of the Dedicated Hosts that could not be modified. Check whether - // the setting you requested can be used. - Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"` +// SetDryRun sets the DryRun field's value. +func (s *ModifySnapshotAttributeInput) SetDryRun(v bool) *ModifySnapshotAttributeInput { + s.DryRun = &v + return s } -// String returns the string representation -func (s ModifyHostsOutput) String() string { - return awsutil.Prettify(s) +// SetGroupNames sets the GroupNames field's value. +func (s *ModifySnapshotAttributeInput) SetGroupNames(v []*string) *ModifySnapshotAttributeInput { + s.GroupNames = v + return s } -// GoString returns the string representation -func (s ModifyHostsOutput) GoString() string { - return s.String() +// SetOperationType sets the OperationType field's value. +func (s *ModifySnapshotAttributeInput) SetOperationType(v string) *ModifySnapshotAttributeInput { + s.OperationType = &v + return s } -// SetSuccessful sets the Successful field's value. -func (s *ModifyHostsOutput) SetSuccessful(v []*string) *ModifyHostsOutput { - s.Successful = v +// SetSnapshotId sets the SnapshotId field's value. +func (s *ModifySnapshotAttributeInput) SetSnapshotId(v string) *ModifySnapshotAttributeInput { + s.SnapshotId = &v return s } -// SetUnsuccessful sets the Unsuccessful field's value. -func (s *ModifyHostsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *ModifyHostsOutput { - s.Unsuccessful = v +// SetUserIds sets the UserIds field's value. +func (s *ModifySnapshotAttributeInput) SetUserIds(v []*string) *ModifySnapshotAttributeInput { + s.UserIds = v return s } -// Contains the parameters of ModifyIdFormat. -type ModifyIdFormatInput struct { +type ModifySnapshotAttributeOutput struct { _ struct{} `type:"structure"` +} - // The type of resource: bundle | conversion-task | customer-gateway | dhcp-options - // | elastic-ip-allocation | elastic-ip-association | export-task | flow-log - // | image | import-task | internet-gateway | network-acl | network-acl-association - // | network-interface | network-interface-attachment | prefix-list | route-table - // | route-table-association | security-group | subnet | subnet-cidr-block-association - // | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection - // | vpn-connection | vpn-gateway. - // - // Alternatively, use the all-current option to include all resource types that - // are currently within their opt-in period for longer IDs. - // - // Resource is a required field - Resource *string `type:"string" required:"true"` +// String returns the string representation +func (s ModifySnapshotAttributeOutput) String() string { + return awsutil.Prettify(s) +} - // Indicate whether the resource should use longer IDs (17-character IDs). +// GoString returns the string representation +func (s ModifySnapshotAttributeOutput) GoString() string { + return s.String() +} + +// Contains the parameters for ModifySpotFleetRequest. +type ModifySpotFleetRequestInput struct { + _ struct{} `type:"structure"` + + // 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. + ExcessCapacityTerminationPolicy *string `locationName:"excessCapacityTerminationPolicy" type:"string" enum:"ExcessCapacityTerminationPolicy"` + + // The ID of the Spot Fleet request. // - // UseLongIds is a required field - UseLongIds *bool `type:"boolean" required:"true"` + // SpotFleetRequestId is a required field + SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"` + + // The size of the fleet. + TargetCapacity *int64 `locationName:"targetCapacity" type:"integer"` } // String returns the string representation -func (s ModifyIdFormatInput) String() string { +func (s ModifySpotFleetRequestInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyIdFormatInput) GoString() string { +func (s ModifySpotFleetRequestInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyIdFormatInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyIdFormatInput"} - if s.Resource == nil { - invalidParams.Add(request.NewErrParamRequired("Resource")) - } - if s.UseLongIds == nil { - invalidParams.Add(request.NewErrParamRequired("UseLongIds")) +func (s *ModifySpotFleetRequestInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifySpotFleetRequestInput"} + if s.SpotFleetRequestId == nil { + invalidParams.Add(request.NewErrParamRequired("SpotFleetRequestId")) } if invalidParams.Len() > 0 { @@ -53856,84 +66751,88 @@ func (s *ModifyIdFormatInput) Validate() error { return nil } -// SetResource sets the Resource field's value. -func (s *ModifyIdFormatInput) SetResource(v string) *ModifyIdFormatInput { - s.Resource = &v +// SetExcessCapacityTerminationPolicy sets the ExcessCapacityTerminationPolicy field's value. +func (s *ModifySpotFleetRequestInput) SetExcessCapacityTerminationPolicy(v string) *ModifySpotFleetRequestInput { + s.ExcessCapacityTerminationPolicy = &v return s } -// SetUseLongIds sets the UseLongIds field's value. -func (s *ModifyIdFormatInput) SetUseLongIds(v bool) *ModifyIdFormatInput { - s.UseLongIds = &v +// SetSpotFleetRequestId sets the SpotFleetRequestId field's value. +func (s *ModifySpotFleetRequestInput) SetSpotFleetRequestId(v string) *ModifySpotFleetRequestInput { + s.SpotFleetRequestId = &v + return s +} + +// SetTargetCapacity sets the TargetCapacity field's value. +func (s *ModifySpotFleetRequestInput) SetTargetCapacity(v int64) *ModifySpotFleetRequestInput { + s.TargetCapacity = &v return s } -type ModifyIdFormatOutput struct { +// Contains the output of ModifySpotFleetRequest. +type ModifySpotFleetRequestOutput struct { _ struct{} `type:"structure"` + + // Is true if the request succeeds, and an error otherwise. + Return *bool `locationName:"return" type:"boolean"` } // String returns the string representation -func (s ModifyIdFormatOutput) String() string { +func (s ModifySpotFleetRequestOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyIdFormatOutput) GoString() string { +func (s ModifySpotFleetRequestOutput) GoString() string { return s.String() } -// Contains the parameters of ModifyIdentityIdFormat. -type ModifyIdentityIdFormatInput struct { +// SetReturn sets the Return field's value. +func (s *ModifySpotFleetRequestOutput) SetReturn(v bool) *ModifySpotFleetRequestOutput { + s.Return = &v + return s +} + +type ModifySubnetAttributeInput struct { _ struct{} `type:"structure"` - // The ARN of the principal, which can be an IAM user, IAM role, or the root - // user. Specify all to modify the ID format for all IAM users, IAM roles, and - // the root user of the account. + // Specify true to indicate that network interfaces created in the specified + // subnet should be assigned an IPv6 address. This includes a network interface + // that's created when launching an instance into the subnet (the instance therefore + // receives an IPv6 address). // - // PrincipalArn is a required field - PrincipalArn *string `locationName:"principalArn" type:"string" required:"true"` + // If you enable the IPv6 addressing feature for your subnet, your network interface + // or instance only receives an IPv6 address if it's created using version 2016-11-15 + // or later of the Amazon EC2 API. + AssignIpv6AddressOnCreation *AttributeBooleanValue `type:"structure"` - // The type of resource: bundle | conversion-task | customer-gateway | dhcp-options - // | elastic-ip-allocation | elastic-ip-association | export-task | flow-log - // | image | import-task | internet-gateway | network-acl | network-acl-association - // | network-interface | network-interface-attachment | prefix-list | route-table - // | route-table-association | security-group | subnet | subnet-cidr-block-association - // | vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection - // | vpn-connection | vpn-gateway. - // - // Alternatively, use the all-current option to include all resource types that - // are currently within their opt-in period for longer IDs. - // - // Resource is a required field - Resource *string `locationName:"resource" type:"string" required:"true"` + // Specify true to indicate that network interfaces created in the specified + // subnet should be assigned a public IPv4 address. This includes a network + // interface that's created when launching an instance into the subnet (the + // instance therefore receives a public IPv4 address). + MapPublicIpOnLaunch *AttributeBooleanValue `type:"structure"` - // Indicates whether the resource should use longer IDs (17-character IDs) + // The ID of the subnet. // - // UseLongIds is a required field - UseLongIds *bool `locationName:"useLongIds" type:"boolean" required:"true"` + // SubnetId is a required field + SubnetId *string `locationName:"subnetId" type:"string" required:"true"` } // String returns the string representation -func (s ModifyIdentityIdFormatInput) String() string { +func (s ModifySubnetAttributeInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyIdentityIdFormatInput) GoString() string { +func (s ModifySubnetAttributeInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyIdentityIdFormatInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyIdentityIdFormatInput"} - if s.PrincipalArn == nil { - invalidParams.Add(request.NewErrParamRequired("PrincipalArn")) - } - if s.Resource == nil { - invalidParams.Add(request.NewErrParamRequired("Resource")) - } - if s.UseLongIds == nil { - invalidParams.Add(request.NewErrParamRequired("UseLongIds")) +func (s *ModifySubnetAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifySubnetAttributeInput"} + if s.SubnetId == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetId")) } if invalidParams.Len() > 0 { @@ -53942,99 +66841,78 @@ func (s *ModifyIdentityIdFormatInput) Validate() error { return nil } -// SetPrincipalArn sets the PrincipalArn field's value. -func (s *ModifyIdentityIdFormatInput) SetPrincipalArn(v string) *ModifyIdentityIdFormatInput { - s.PrincipalArn = &v +// SetAssignIpv6AddressOnCreation sets the AssignIpv6AddressOnCreation field's value. +func (s *ModifySubnetAttributeInput) SetAssignIpv6AddressOnCreation(v *AttributeBooleanValue) *ModifySubnetAttributeInput { + s.AssignIpv6AddressOnCreation = v return s } -// SetResource sets the Resource field's value. -func (s *ModifyIdentityIdFormatInput) SetResource(v string) *ModifyIdentityIdFormatInput { - s.Resource = &v +// SetMapPublicIpOnLaunch sets the MapPublicIpOnLaunch field's value. +func (s *ModifySubnetAttributeInput) SetMapPublicIpOnLaunch(v *AttributeBooleanValue) *ModifySubnetAttributeInput { + s.MapPublicIpOnLaunch = v return s } -// SetUseLongIds sets the UseLongIds field's value. -func (s *ModifyIdentityIdFormatInput) SetUseLongIds(v bool) *ModifyIdentityIdFormatInput { - s.UseLongIds = &v +// SetSubnetId sets the SubnetId field's value. +func (s *ModifySubnetAttributeInput) SetSubnetId(v string) *ModifySubnetAttributeInput { + s.SubnetId = &v return s } -type ModifyIdentityIdFormatOutput struct { +type ModifySubnetAttributeOutput struct { _ struct{} `type:"structure"` } // String returns the string representation -func (s ModifyIdentityIdFormatOutput) String() string { +func (s ModifySubnetAttributeOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyIdentityIdFormatOutput) GoString() string { +func (s ModifySubnetAttributeOutput) GoString() string { return s.String() } -// Contains the parameters for ModifyImageAttribute. -type ModifyImageAttributeInput struct { +type ModifyTransitGatewayVpcAttachmentInput struct { _ struct{} `type:"structure"` - // The name of the attribute to modify. The valid values are description, launchPermission, - // and productCodes. - Attribute *string `type:"string"` - - // A new description for the AMI. - Description *AttributeValue `type:"structure"` + // The IDs of one or more subnets to add. You can specify at most one subnet + // per Availability Zone. + AddSubnetIds []*string `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 `locationName:"dryRun" type:"boolean"` - - // The ID of the AMI. - // - // ImageId is a required field - ImageId *string `type:"string" required:"true"` - - // A new launch permission for the AMI. - LaunchPermission *LaunchPermissionModifications `type:"structure"` - - // The operation type. This parameter can be used only when the Attribute parameter - // is launchPermission. - OperationType *string `type:"string" enum:"OperationType"` - - // One or more DevPay product codes. After you add a product code to an AMI, - // it can't be removed. - ProductCodes []*string `locationName:"ProductCode" locationNameList:"ProductCode" type:"list"` + DryRun *bool `type:"boolean"` - // One or more user groups. This parameter can be used only when the Attribute - // parameter is launchPermission. - UserGroups []*string `locationName:"UserGroup" locationNameList:"UserGroup" type:"list"` + // The new VPC attachment options. + Options *ModifyTransitGatewayVpcAttachmentRequestOptions `type:"structure"` - // One or more AWS account IDs. This parameter can be used only when the Attribute - // parameter is launchPermission. - UserIds []*string `locationName:"UserId" locationNameList:"UserId" type:"list"` + // The IDs of one or more subnets to remove. + RemoveSubnetIds []*string `locationNameList:"item" type:"list"` - // The value of the attribute being modified. This parameter can be used only - // when the Attribute parameter is description or productCodes. - Value *string `type:"string"` + // The ID of the attachment. + // + // TransitGatewayAttachmentId is a required field + TransitGatewayAttachmentId *string `type:"string" required:"true"` } // String returns the string representation -func (s ModifyImageAttributeInput) String() string { +func (s ModifyTransitGatewayVpcAttachmentInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyImageAttributeInput) GoString() string { +func (s ModifyTransitGatewayVpcAttachmentInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyImageAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyImageAttributeInput"} - if s.ImageId == nil { - invalidParams.Add(request.NewErrParamRequired("ImageId")) +func (s *ModifyTransitGatewayVpcAttachmentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyTransitGatewayVpcAttachmentInput"} + if s.TransitGatewayAttachmentId == nil { + invalidParams.Add(request.NewErrParamRequired("TransitGatewayAttachmentId")) } if invalidParams.Len() > 0 { @@ -54043,102 +66921,98 @@ func (s *ModifyImageAttributeInput) Validate() error { return nil } -// SetAttribute sets the Attribute field's value. -func (s *ModifyImageAttributeInput) SetAttribute(v string) *ModifyImageAttributeInput { - s.Attribute = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *ModifyImageAttributeInput) SetDescription(v *AttributeValue) *ModifyImageAttributeInput { - s.Description = v +// SetAddSubnetIds sets the AddSubnetIds field's value. +func (s *ModifyTransitGatewayVpcAttachmentInput) SetAddSubnetIds(v []*string) *ModifyTransitGatewayVpcAttachmentInput { + s.AddSubnetIds = v return s } // SetDryRun sets the DryRun field's value. -func (s *ModifyImageAttributeInput) SetDryRun(v bool) *ModifyImageAttributeInput { +func (s *ModifyTransitGatewayVpcAttachmentInput) SetDryRun(v bool) *ModifyTransitGatewayVpcAttachmentInput { s.DryRun = &v return s } -// SetImageId sets the ImageId field's value. -func (s *ModifyImageAttributeInput) SetImageId(v string) *ModifyImageAttributeInput { - s.ImageId = &v +// SetOptions sets the Options field's value. +func (s *ModifyTransitGatewayVpcAttachmentInput) SetOptions(v *ModifyTransitGatewayVpcAttachmentRequestOptions) *ModifyTransitGatewayVpcAttachmentInput { + s.Options = v return s } -// SetLaunchPermission sets the LaunchPermission field's value. -func (s *ModifyImageAttributeInput) SetLaunchPermission(v *LaunchPermissionModifications) *ModifyImageAttributeInput { - s.LaunchPermission = v +// SetRemoveSubnetIds sets the RemoveSubnetIds field's value. +func (s *ModifyTransitGatewayVpcAttachmentInput) SetRemoveSubnetIds(v []*string) *ModifyTransitGatewayVpcAttachmentInput { + s.RemoveSubnetIds = v return s } -// SetOperationType sets the OperationType field's value. -func (s *ModifyImageAttributeInput) SetOperationType(v string) *ModifyImageAttributeInput { - s.OperationType = &v +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *ModifyTransitGatewayVpcAttachmentInput) SetTransitGatewayAttachmentId(v string) *ModifyTransitGatewayVpcAttachmentInput { + s.TransitGatewayAttachmentId = &v return s } -// SetProductCodes sets the ProductCodes field's value. -func (s *ModifyImageAttributeInput) SetProductCodes(v []*string) *ModifyImageAttributeInput { - s.ProductCodes = v - return s +type ModifyTransitGatewayVpcAttachmentOutput struct { + _ struct{} `type:"structure"` + + // Information about the modified attachment. + TransitGatewayVpcAttachment *TransitGatewayVpcAttachment `locationName:"transitGatewayVpcAttachment" type:"structure"` } -// SetUserGroups sets the UserGroups field's value. -func (s *ModifyImageAttributeInput) SetUserGroups(v []*string) *ModifyImageAttributeInput { - s.UserGroups = v - return s +// String returns the string representation +func (s ModifyTransitGatewayVpcAttachmentOutput) String() string { + return awsutil.Prettify(s) } -// SetUserIds sets the UserIds field's value. -func (s *ModifyImageAttributeInput) SetUserIds(v []*string) *ModifyImageAttributeInput { - s.UserIds = v - return s +// GoString returns the string representation +func (s ModifyTransitGatewayVpcAttachmentOutput) GoString() string { + return s.String() } -// SetValue sets the Value field's value. -func (s *ModifyImageAttributeInput) SetValue(v string) *ModifyImageAttributeInput { - s.Value = &v +// SetTransitGatewayVpcAttachment sets the TransitGatewayVpcAttachment field's value. +func (s *ModifyTransitGatewayVpcAttachmentOutput) SetTransitGatewayVpcAttachment(v *TransitGatewayVpcAttachment) *ModifyTransitGatewayVpcAttachmentOutput { + s.TransitGatewayVpcAttachment = v return s } -type ModifyImageAttributeOutput struct { +// Describes the options for a VPC attachment. +type ModifyTransitGatewayVpcAttachmentRequestOptions struct { _ struct{} `type:"structure"` + + // Enable or disable DNS support. The default is enable. + DnsSupport *string `type:"string" enum:"DnsSupportValue"` + + // Enable or disable IPv6 support. The default is enable. + Ipv6Support *string `type:"string" enum:"Ipv6SupportValue"` } // String returns the string representation -func (s ModifyImageAttributeOutput) String() string { +func (s ModifyTransitGatewayVpcAttachmentRequestOptions) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyImageAttributeOutput) GoString() string { +func (s ModifyTransitGatewayVpcAttachmentRequestOptions) GoString() string { return s.String() } -// Contains the parameters for ModifyInstanceAttribute. -type ModifyInstanceAttributeInput struct { - _ struct{} `type:"structure"` +// SetDnsSupport sets the DnsSupport field's value. +func (s *ModifyTransitGatewayVpcAttachmentRequestOptions) SetDnsSupport(v string) *ModifyTransitGatewayVpcAttachmentRequestOptions { + s.DnsSupport = &v + return s +} - // The name of the attribute. - Attribute *string `locationName:"attribute" type:"string" enum:"InstanceAttributeName"` +// SetIpv6Support sets the Ipv6Support field's value. +func (s *ModifyTransitGatewayVpcAttachmentRequestOptions) SetIpv6Support(v string) *ModifyTransitGatewayVpcAttachmentRequestOptions { + s.Ipv6Support = &v + return s +} - // Modifies the DeleteOnTermination attribute for volumes that are currently - // attached. The volume must be owned by the caller. If no value is specified - // for DeleteOnTermination, the default is true and the volume is deleted when - // the instance is terminated. - // - // 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 (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html#Using_OverridingAMIBDM) - // in the Amazon Elastic Compute Cloud User Guide. - BlockDeviceMappings []*InstanceBlockDeviceMappingSpecification `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` +// Contains the parameters for ModifyVolumeAttribute. +type ModifyVolumeAttributeInput struct { + _ struct{} `type:"structure"` - // If the value is true, you can't terminate the instance using the Amazon EC2 - // console, CLI, or API; otherwise, you can. You cannot use this parameter for - // Spot Instances. - DisableApiTermination *AttributeBooleanValue `locationName:"disableApiTermination" type:"structure"` + // Indicates whether the volume should be auto-enabled for I/O operations. + AutoEnableIO *AttributeBooleanValue `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 @@ -54146,89 +67020,27 @@ type ModifyInstanceAttributeInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // Specifies whether the instance is optimized for Amazon EBS I/O. This optimization - // provides dedicated throughput to Amazon EBS and an optimized configuration - // stack to provide optimal EBS I/O performance. This optimization isn't available - // with all instance types. Additional usage charges apply when using an EBS - // Optimized instance. - EbsOptimized *AttributeBooleanValue `locationName:"ebsOptimized" type:"structure"` - - // Set to true to enable enhanced networking with ENA for the instance. - // - // This option is supported only for HVM instances. Specifying this option with - // 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. - Groups []*string `locationName:"GroupId" locationNameList:"groupId" type:"list"` - - // The ID of the instance. - // - // InstanceId is a required field - InstanceId *string `locationName:"instanceId" type:"string" required:"true"` - - // Specifies whether an instance stops or terminates when you initiate shutdown - // from the instance (using the operating system command for system shutdown). - InstanceInitiatedShutdownBehavior *AttributeValue `locationName:"instanceInitiatedShutdownBehavior" type:"structure"` - - // Changes the instance type to the specified value. For more information, see - // Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html). - // 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 - // use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB - // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html). - Kernel *AttributeValue `locationName:"kernel" type:"structure"` - - // Changes the instance's RAM disk to the specified value. We recommend that - // you use PV-GRUB instead of kernels and RAM disks. For more information, see - // PV-GRUB (http://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. - SourceDestCheck *AttributeBooleanValue `type:"structure"` - - // Set to simple to enable enhanced networking with the Intel 82599 Virtual - // Function interface for the instance. - // - // There is no way to disable enhanced networking with the Intel 82599 Virtual - // Function interface at this time. + // The ID of the volume. // - // This option is supported only for HVM instances. Specifying this option with - // a PV instance can make it unreachable. - 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. - UserData *BlobAttributeValue `locationName:"userData" type:"structure"` - - // A new value for the attribute. Use only with the kernel, ramdisk, userData, - // disableApiTermination, or instanceInitiatedShutdownBehavior attribute. - Value *string `locationName:"value" type:"string"` + // VolumeId is a required field + VolumeId *string `type:"string" required:"true"` } // String returns the string representation -func (s ModifyInstanceAttributeInput) String() string { +func (s ModifyVolumeAttributeInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyInstanceAttributeInput) GoString() string { +func (s ModifyVolumeAttributeInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyInstanceAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyInstanceAttributeInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) +func (s *ModifyVolumeAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyVolumeAttributeInput"} + if s.VolumeId == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeId")) } if invalidParams.Len() > 0 { @@ -54237,151 +67049,191 @@ func (s *ModifyInstanceAttributeInput) Validate() error { return nil } -// SetAttribute sets the Attribute field's value. -func (s *ModifyInstanceAttributeInput) SetAttribute(v string) *ModifyInstanceAttributeInput { - s.Attribute = &v +// SetAutoEnableIO sets the AutoEnableIO field's value. +func (s *ModifyVolumeAttributeInput) SetAutoEnableIO(v *AttributeBooleanValue) *ModifyVolumeAttributeInput { + s.AutoEnableIO = v return s } -// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *ModifyInstanceAttributeInput) SetBlockDeviceMappings(v []*InstanceBlockDeviceMappingSpecification) *ModifyInstanceAttributeInput { - s.BlockDeviceMappings = v +// SetDryRun sets the DryRun field's value. +func (s *ModifyVolumeAttributeInput) SetDryRun(v bool) *ModifyVolumeAttributeInput { + s.DryRun = &v return s } -// SetDisableApiTermination sets the DisableApiTermination field's value. -func (s *ModifyInstanceAttributeInput) SetDisableApiTermination(v *AttributeBooleanValue) *ModifyInstanceAttributeInput { - s.DisableApiTermination = v +// SetVolumeId sets the VolumeId field's value. +func (s *ModifyVolumeAttributeInput) SetVolumeId(v string) *ModifyVolumeAttributeInput { + s.VolumeId = &v return s } -// SetDryRun sets the DryRun field's value. -func (s *ModifyInstanceAttributeInput) SetDryRun(v bool) *ModifyInstanceAttributeInput { - s.DryRun = &v - return s +type ModifyVolumeAttributeOutput struct { + _ struct{} `type:"structure"` } -// SetEbsOptimized sets the EbsOptimized field's value. -func (s *ModifyInstanceAttributeInput) SetEbsOptimized(v *AttributeBooleanValue) *ModifyInstanceAttributeInput { - s.EbsOptimized = v - return s +// String returns the string representation +func (s ModifyVolumeAttributeOutput) String() string { + return awsutil.Prettify(s) } -// SetEnaSupport sets the EnaSupport field's value. -func (s *ModifyInstanceAttributeInput) SetEnaSupport(v *AttributeBooleanValue) *ModifyInstanceAttributeInput { - s.EnaSupport = v - return s +// GoString returns the string representation +func (s ModifyVolumeAttributeOutput) GoString() string { + return s.String() } -// SetGroups sets the Groups field's value. -func (s *ModifyInstanceAttributeInput) SetGroups(v []*string) *ModifyInstanceAttributeInput { - s.Groups = v - return s -} +type ModifyVolumeInput struct { + _ struct{} `type:"structure"` -// SetInstanceId sets the InstanceId field's value. -func (s *ModifyInstanceAttributeInput) SetInstanceId(v string) *ModifyInstanceAttributeInput { - s.InstanceId = &v - return s + // 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 target IOPS rate of the volume. + // + // This is only valid for Provisioned IOPS SSD (io1) volumes. For more information, + // see Provisioned IOPS SSD (io1) Volumes (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html#EBSVolumeTypes_piops). + // + // Default: If no IOPS value is specified, the existing value is retained. + Iops *int64 `type:"integer"` + + // The target size of the volume, in GiB. The target volume size must be greater + // than or equal to than the existing size of the volume. For information about + // available EBS volume sizes, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html). + // + // Default: If no size is specified, the existing size is retained. + Size *int64 `type:"integer"` + + // The ID of the volume. + // + // VolumeId is a required field + VolumeId *string `type:"string" required:"true"` + + // The target EBS volume type of the volume. + // + // Default: If no type is specified, the existing type is retained. + VolumeType *string `type:"string" enum:"VolumeType"` } -// SetInstanceInitiatedShutdownBehavior sets the InstanceInitiatedShutdownBehavior field's value. -func (s *ModifyInstanceAttributeInput) SetInstanceInitiatedShutdownBehavior(v *AttributeValue) *ModifyInstanceAttributeInput { - s.InstanceInitiatedShutdownBehavior = v - return s +// String returns the string representation +func (s ModifyVolumeInput) String() string { + return awsutil.Prettify(s) } -// SetInstanceType sets the InstanceType field's value. -func (s *ModifyInstanceAttributeInput) SetInstanceType(v *AttributeValue) *ModifyInstanceAttributeInput { - s.InstanceType = v - return s +// GoString returns the string representation +func (s ModifyVolumeInput) GoString() string { + return s.String() } -// SetKernel sets the Kernel field's value. -func (s *ModifyInstanceAttributeInput) SetKernel(v *AttributeValue) *ModifyInstanceAttributeInput { - s.Kernel = v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyVolumeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyVolumeInput"} + if s.VolumeId == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetRamdisk sets the Ramdisk field's value. -func (s *ModifyInstanceAttributeInput) SetRamdisk(v *AttributeValue) *ModifyInstanceAttributeInput { - s.Ramdisk = v +// SetDryRun sets the DryRun field's value. +func (s *ModifyVolumeInput) SetDryRun(v bool) *ModifyVolumeInput { + s.DryRun = &v return s } -// SetSourceDestCheck sets the SourceDestCheck field's value. -func (s *ModifyInstanceAttributeInput) SetSourceDestCheck(v *AttributeBooleanValue) *ModifyInstanceAttributeInput { - s.SourceDestCheck = v +// SetIops sets the Iops field's value. +func (s *ModifyVolumeInput) SetIops(v int64) *ModifyVolumeInput { + s.Iops = &v return s } -// SetSriovNetSupport sets the SriovNetSupport field's value. -func (s *ModifyInstanceAttributeInput) SetSriovNetSupport(v *AttributeValue) *ModifyInstanceAttributeInput { - s.SriovNetSupport = v +// SetSize sets the Size field's value. +func (s *ModifyVolumeInput) SetSize(v int64) *ModifyVolumeInput { + s.Size = &v return s } -// SetUserData sets the UserData field's value. -func (s *ModifyInstanceAttributeInput) SetUserData(v *BlobAttributeValue) *ModifyInstanceAttributeInput { - s.UserData = v +// SetVolumeId sets the VolumeId field's value. +func (s *ModifyVolumeInput) SetVolumeId(v string) *ModifyVolumeInput { + s.VolumeId = &v return s } -// SetValue sets the Value field's value. -func (s *ModifyInstanceAttributeInput) SetValue(v string) *ModifyInstanceAttributeInput { - s.Value = &v +// SetVolumeType sets the VolumeType field's value. +func (s *ModifyVolumeInput) SetVolumeType(v string) *ModifyVolumeInput { + s.VolumeType = &v return s } -type ModifyInstanceAttributeOutput struct { +type ModifyVolumeOutput struct { _ struct{} `type:"structure"` + + // Information about the volume modification. + VolumeModification *VolumeModification `locationName:"volumeModification" type:"structure"` } // String returns the string representation -func (s ModifyInstanceAttributeOutput) String() string { +func (s ModifyVolumeOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyInstanceAttributeOutput) GoString() string { +func (s ModifyVolumeOutput) GoString() string { return s.String() } -type ModifyInstanceCreditSpecificationInput struct { +// SetVolumeModification sets the VolumeModification field's value. +func (s *ModifyVolumeOutput) SetVolumeModification(v *VolumeModification) *ModifyVolumeOutput { + s.VolumeModification = v + return s +} + +type ModifyVpcAttributeInput struct { _ struct{} `type:"structure"` - // A unique, case-sensitive token that you provide to ensure idempotency of - // your modification request. For more information, see Ensuring Idempotency - // (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - ClientToken *string `type:"string"` + // Indicates whether the instances launched in the VPC get DNS hostnames. If + // enabled, instances in the VPC get DNS hostnames; otherwise, they do not. + // + // You cannot modify the DNS resolution and DNS hostnames attributes in the + // same request. Use separate requests for each attribute. You can only enable + // DNS hostnames if you've enabled DNS support. + EnableDnsHostnames *AttributeBooleanValue `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"` + // Indicates whether the DNS resolution is supported for the VPC. If enabled, + // queries to the Amazon provided DNS server at the 169.254.169.253 IP address, + // or the reserved IP address at the base of the VPC network range "plus two" + // succeed. If disabled, the Amazon provided DNS service in the VPC that resolves + // public DNS hostnames to IP addresses is not enabled. + // + // You cannot modify the DNS resolution and DNS hostnames attributes in the + // same request. Use separate requests for each attribute. + EnableDnsSupport *AttributeBooleanValue `type:"structure"` - // Information about the credit option for CPU usage. + // The ID of the VPC. // - // InstanceCreditSpecifications is a required field - InstanceCreditSpecifications []*InstanceCreditSpecificationRequest `locationName:"InstanceCreditSpecification" locationNameList:"item" type:"list" required:"true"` + // VpcId is a required field + VpcId *string `locationName:"vpcId" type:"string" required:"true"` } // String returns the string representation -func (s ModifyInstanceCreditSpecificationInput) String() string { +func (s ModifyVpcAttributeInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyInstanceCreditSpecificationInput) GoString() string { +func (s ModifyVpcAttributeInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyInstanceCreditSpecificationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyInstanceCreditSpecificationInput"} - if s.InstanceCreditSpecifications == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceCreditSpecifications")) +func (s *ModifyVpcAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyVpcAttributeInput"} + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) } if invalidParams.Len() > 0 { @@ -54390,99 +67242,75 @@ func (s *ModifyInstanceCreditSpecificationInput) Validate() error { return nil } -// SetClientToken sets the ClientToken field's value. -func (s *ModifyInstanceCreditSpecificationInput) SetClientToken(v string) *ModifyInstanceCreditSpecificationInput { - s.ClientToken = &v +// SetEnableDnsHostnames sets the EnableDnsHostnames field's value. +func (s *ModifyVpcAttributeInput) SetEnableDnsHostnames(v *AttributeBooleanValue) *ModifyVpcAttributeInput { + s.EnableDnsHostnames = v return s -} - -// SetDryRun sets the DryRun field's value. -func (s *ModifyInstanceCreditSpecificationInput) SetDryRun(v bool) *ModifyInstanceCreditSpecificationInput { - s.DryRun = &v +} + +// SetEnableDnsSupport sets the EnableDnsSupport field's value. +func (s *ModifyVpcAttributeInput) SetEnableDnsSupport(v *AttributeBooleanValue) *ModifyVpcAttributeInput { + s.EnableDnsSupport = v return s } -// SetInstanceCreditSpecifications sets the InstanceCreditSpecifications field's value. -func (s *ModifyInstanceCreditSpecificationInput) SetInstanceCreditSpecifications(v []*InstanceCreditSpecificationRequest) *ModifyInstanceCreditSpecificationInput { - s.InstanceCreditSpecifications = v +// SetVpcId sets the VpcId field's value. +func (s *ModifyVpcAttributeInput) SetVpcId(v string) *ModifyVpcAttributeInput { + s.VpcId = &v return s } -type ModifyInstanceCreditSpecificationOutput struct { +type ModifyVpcAttributeOutput struct { _ struct{} `type:"structure"` - - // Information about the instances whose credit option for CPU usage was successfully - // modified. - SuccessfulInstanceCreditSpecifications []*SuccessfulInstanceCreditSpecificationItem `locationName:"successfulInstanceCreditSpecificationSet" locationNameList:"item" type:"list"` - - // Information about the instances whose credit option for CPU usage was not - // modified. - UnsuccessfulInstanceCreditSpecifications []*UnsuccessfulInstanceCreditSpecificationItem `locationName:"unsuccessfulInstanceCreditSpecificationSet" locationNameList:"item" type:"list"` } // String returns the string representation -func (s ModifyInstanceCreditSpecificationOutput) String() string { +func (s ModifyVpcAttributeOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyInstanceCreditSpecificationOutput) GoString() string { +func (s ModifyVpcAttributeOutput) GoString() string { return s.String() } -// SetSuccessfulInstanceCreditSpecifications sets the SuccessfulInstanceCreditSpecifications field's value. -func (s *ModifyInstanceCreditSpecificationOutput) SetSuccessfulInstanceCreditSpecifications(v []*SuccessfulInstanceCreditSpecificationItem) *ModifyInstanceCreditSpecificationOutput { - s.SuccessfulInstanceCreditSpecifications = v - return s -} - -// SetUnsuccessfulInstanceCreditSpecifications sets the UnsuccessfulInstanceCreditSpecifications field's value. -func (s *ModifyInstanceCreditSpecificationOutput) SetUnsuccessfulInstanceCreditSpecifications(v []*UnsuccessfulInstanceCreditSpecificationItem) *ModifyInstanceCreditSpecificationOutput { - s.UnsuccessfulInstanceCreditSpecifications = v - return s -} - -// Contains the parameters for ModifyInstancePlacement. -type ModifyInstancePlacementInput struct { +type ModifyVpcEndpointConnectionNotificationInput struct { _ struct{} `type:"structure"` - // The affinity setting for the instance. - Affinity *string `locationName:"affinity" type:"string" enum:"Affinity"` - - // The name of the placement group in which to place the instance. For spread - // placement groups, the instance must have a tenancy of default. For cluster - // placement groups, the instance must have a tenancy of default or dedicated. - // - // To remove an instance from a placement group, specify an empty string (""). - GroupName *string `type:"string"` + // One or more events for the endpoint. Valid values are Accept, Connect, Delete, + // and Reject. + ConnectionEvents []*string `locationNameList:"item" type:"list"` - // The ID of the Dedicated Host with which to associate the instance. - HostId *string `locationName:"hostId" type:"string"` + // The ARN for the SNS topic for the notification. + ConnectionNotificationArn *string `type:"string"` - // The ID of the instance that you are modifying. + // The ID of the notification. // - // InstanceId is a required field - InstanceId *string `locationName:"instanceId" type:"string" required:"true"` + // ConnectionNotificationId is a required field + ConnectionNotificationId *string `type:"string" required:"true"` - // The tenancy for the instance. - Tenancy *string `locationName:"tenancy" type:"string" enum:"HostTenancy"` + // 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 ModifyInstancePlacementInput) String() string { +func (s ModifyVpcEndpointConnectionNotificationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyInstancePlacementInput) GoString() string { +func (s ModifyVpcEndpointConnectionNotificationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyInstancePlacementInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyInstancePlacementInput"} - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) +func (s *ModifyVpcEndpointConnectionNotificationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyVpcEndpointConnectionNotificationInput"} + if s.ConnectionNotificationId == nil { + invalidParams.Add(request.NewErrParamRequired("ConnectionNotificationId")) } if invalidParams.Len() > 0 { @@ -54491,69 +67319,66 @@ func (s *ModifyInstancePlacementInput) Validate() error { return nil } -// SetAffinity sets the Affinity field's value. -func (s *ModifyInstancePlacementInput) SetAffinity(v string) *ModifyInstancePlacementInput { - s.Affinity = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *ModifyInstancePlacementInput) SetGroupName(v string) *ModifyInstancePlacementInput { - s.GroupName = &v +// SetConnectionEvents sets the ConnectionEvents field's value. +func (s *ModifyVpcEndpointConnectionNotificationInput) SetConnectionEvents(v []*string) *ModifyVpcEndpointConnectionNotificationInput { + s.ConnectionEvents = v return s } -// SetHostId sets the HostId field's value. -func (s *ModifyInstancePlacementInput) SetHostId(v string) *ModifyInstancePlacementInput { - s.HostId = &v +// SetConnectionNotificationArn sets the ConnectionNotificationArn field's value. +func (s *ModifyVpcEndpointConnectionNotificationInput) SetConnectionNotificationArn(v string) *ModifyVpcEndpointConnectionNotificationInput { + s.ConnectionNotificationArn = &v return s } -// SetInstanceId sets the InstanceId field's value. -func (s *ModifyInstancePlacementInput) SetInstanceId(v string) *ModifyInstancePlacementInput { - s.InstanceId = &v +// SetConnectionNotificationId sets the ConnectionNotificationId field's value. +func (s *ModifyVpcEndpointConnectionNotificationInput) SetConnectionNotificationId(v string) *ModifyVpcEndpointConnectionNotificationInput { + s.ConnectionNotificationId = &v return s } -// SetTenancy sets the Tenancy field's value. -func (s *ModifyInstancePlacementInput) SetTenancy(v string) *ModifyInstancePlacementInput { - s.Tenancy = &v +// SetDryRun sets the DryRun field's value. +func (s *ModifyVpcEndpointConnectionNotificationInput) SetDryRun(v bool) *ModifyVpcEndpointConnectionNotificationInput { + s.DryRun = &v return s } -// Contains the output of ModifyInstancePlacement. -type ModifyInstancePlacementOutput struct { +type ModifyVpcEndpointConnectionNotificationOutput struct { _ struct{} `type:"structure"` - // Is true if the request succeeds, and an error otherwise. - Return *bool `locationName:"return" type:"boolean"` + // Returns true if the request succeeds; otherwise, it returns an error. + ReturnValue *bool `locationName:"return" type:"boolean"` } // String returns the string representation -func (s ModifyInstancePlacementOutput) String() string { +func (s ModifyVpcEndpointConnectionNotificationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyInstancePlacementOutput) GoString() string { +func (s ModifyVpcEndpointConnectionNotificationOutput) GoString() string { return s.String() } -// SetReturn sets the Return field's value. -func (s *ModifyInstancePlacementOutput) SetReturn(v bool) *ModifyInstancePlacementOutput { - s.Return = &v +// SetReturnValue sets the ReturnValue field's value. +func (s *ModifyVpcEndpointConnectionNotificationOutput) SetReturnValue(v bool) *ModifyVpcEndpointConnectionNotificationOutput { + s.ReturnValue = &v return s } -type ModifyLaunchTemplateInput struct { +// Contains the parameters for ModifyVpcEndpoint. +type ModifyVpcEndpointInput struct { _ struct{} `type:"structure"` - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - ClientToken *string `type:"string"` + // (Gateway endpoint) One or more route tables IDs to associate with the endpoint. + AddRouteTableIds []*string `locationName:"AddRouteTableId" locationNameList:"item" type:"list"` - // The version number of the launch template to set as the default version. - DefaultVersion *string `locationName:"SetDefaultVersion" type:"string"` + // (Interface endpoint) One or more security group IDs to associate with the + // network interface. + AddSecurityGroupIds []*string `locationName:"AddSecurityGroupId" locationNameList:"item" type:"list"` + + // (Interface endpoint) One or more subnet IDs in which to serve the endpoint. + AddSubnetIds []*string `locationName:"AddSubnetId" 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 @@ -54561,30 +67386,49 @@ type ModifyLaunchTemplateInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // The ID of the launch template. You must specify either the launch template - // ID or launch template name in the request. - LaunchTemplateId *string `type:"string"` + // (Gateway endpoint) A policy document to attach to the endpoint. The policy + // must be in valid JSON format. + PolicyDocument *string `type:"string"` - // The name of the launch template. You must specify either the launch template - // ID or launch template name in the request. - LaunchTemplateName *string `min:"3" type:"string"` + // (Interface endpoint) Indicate whether a private hosted zone is associated + // with the VPC. + PrivateDnsEnabled *bool `type:"boolean"` + + // (Gateway endpoint) One or more route table IDs to disassociate from the endpoint. + RemoveRouteTableIds []*string `locationName:"RemoveRouteTableId" locationNameList:"item" type:"list"` + + // (Interface endpoint) One or more security group IDs to disassociate from + // the network interface. + RemoveSecurityGroupIds []*string `locationName:"RemoveSecurityGroupId" locationNameList:"item" type:"list"` + + // (Interface endpoint) One or more subnets IDs in which to remove the endpoint. + RemoveSubnetIds []*string `locationName:"RemoveSubnetId" locationNameList:"item" type:"list"` + + // (Gateway endpoint) Specify true to reset the policy document to the default + // policy. The default policy allows full access to the service. + ResetPolicy *bool `type:"boolean"` + + // The ID of the endpoint. + // + // VpcEndpointId is a required field + VpcEndpointId *string `type:"string" required:"true"` } // String returns the string representation -func (s ModifyLaunchTemplateInput) String() string { +func (s ModifyVpcEndpointInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyLaunchTemplateInput) GoString() string { +func (s ModifyVpcEndpointInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyLaunchTemplateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyLaunchTemplateInput"} - if s.LaunchTemplateName != nil && len(*s.LaunchTemplateName) < 3 { - invalidParams.Add(request.NewErrParamMinLen("LaunchTemplateName", 3)) +func (s *ModifyVpcEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyVpcEndpointInput"} + if s.VpcEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcEndpointId")) } if invalidParams.Len() > 0 { @@ -54593,110 +67437,136 @@ func (s *ModifyLaunchTemplateInput) Validate() error { return nil } -// SetClientToken sets the ClientToken field's value. -func (s *ModifyLaunchTemplateInput) SetClientToken(v string) *ModifyLaunchTemplateInput { - s.ClientToken = &v +// SetAddRouteTableIds sets the AddRouteTableIds field's value. +func (s *ModifyVpcEndpointInput) SetAddRouteTableIds(v []*string) *ModifyVpcEndpointInput { + s.AddRouteTableIds = v return s } -// SetDefaultVersion sets the DefaultVersion field's value. -func (s *ModifyLaunchTemplateInput) SetDefaultVersion(v string) *ModifyLaunchTemplateInput { - s.DefaultVersion = &v +// SetAddSecurityGroupIds sets the AddSecurityGroupIds field's value. +func (s *ModifyVpcEndpointInput) SetAddSecurityGroupIds(v []*string) *ModifyVpcEndpointInput { + s.AddSecurityGroupIds = v + return s +} + +// SetAddSubnetIds sets the AddSubnetIds field's value. +func (s *ModifyVpcEndpointInput) SetAddSubnetIds(v []*string) *ModifyVpcEndpointInput { + s.AddSubnetIds = v return s } // SetDryRun sets the DryRun field's value. -func (s *ModifyLaunchTemplateInput) SetDryRun(v bool) *ModifyLaunchTemplateInput { +func (s *ModifyVpcEndpointInput) SetDryRun(v bool) *ModifyVpcEndpointInput { s.DryRun = &v return s } -// SetLaunchTemplateId sets the LaunchTemplateId field's value. -func (s *ModifyLaunchTemplateInput) SetLaunchTemplateId(v string) *ModifyLaunchTemplateInput { - s.LaunchTemplateId = &v +// SetPolicyDocument sets the PolicyDocument field's value. +func (s *ModifyVpcEndpointInput) SetPolicyDocument(v string) *ModifyVpcEndpointInput { + s.PolicyDocument = &v return s } -// SetLaunchTemplateName sets the LaunchTemplateName field's value. -func (s *ModifyLaunchTemplateInput) SetLaunchTemplateName(v string) *ModifyLaunchTemplateInput { - s.LaunchTemplateName = &v +// SetPrivateDnsEnabled sets the PrivateDnsEnabled field's value. +func (s *ModifyVpcEndpointInput) SetPrivateDnsEnabled(v bool) *ModifyVpcEndpointInput { + s.PrivateDnsEnabled = &v return s } -type ModifyLaunchTemplateOutput struct { +// SetRemoveRouteTableIds sets the RemoveRouteTableIds field's value. +func (s *ModifyVpcEndpointInput) SetRemoveRouteTableIds(v []*string) *ModifyVpcEndpointInput { + s.RemoveRouteTableIds = v + return s +} + +// SetRemoveSecurityGroupIds sets the RemoveSecurityGroupIds field's value. +func (s *ModifyVpcEndpointInput) SetRemoveSecurityGroupIds(v []*string) *ModifyVpcEndpointInput { + s.RemoveSecurityGroupIds = v + return s +} + +// SetRemoveSubnetIds sets the RemoveSubnetIds field's value. +func (s *ModifyVpcEndpointInput) SetRemoveSubnetIds(v []*string) *ModifyVpcEndpointInput { + s.RemoveSubnetIds = v + return s +} + +// SetResetPolicy sets the ResetPolicy field's value. +func (s *ModifyVpcEndpointInput) SetResetPolicy(v bool) *ModifyVpcEndpointInput { + s.ResetPolicy = &v + return s +} + +// SetVpcEndpointId sets the VpcEndpointId field's value. +func (s *ModifyVpcEndpointInput) SetVpcEndpointId(v string) *ModifyVpcEndpointInput { + s.VpcEndpointId = &v + return s +} + +type ModifyVpcEndpointOutput struct { _ struct{} `type:"structure"` - // Information about the launch template. - LaunchTemplate *LaunchTemplate `locationName:"launchTemplate" 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 ModifyLaunchTemplateOutput) String() string { +func (s ModifyVpcEndpointOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyLaunchTemplateOutput) GoString() string { +func (s ModifyVpcEndpointOutput) GoString() string { return s.String() } -// SetLaunchTemplate sets the LaunchTemplate field's value. -func (s *ModifyLaunchTemplateOutput) SetLaunchTemplate(v *LaunchTemplate) *ModifyLaunchTemplateOutput { - s.LaunchTemplate = v +// SetReturn sets the Return field's value. +func (s *ModifyVpcEndpointOutput) SetReturn(v bool) *ModifyVpcEndpointOutput { + s.Return = &v return s } -// Contains the parameters for ModifyNetworkInterfaceAttribute. -type ModifyNetworkInterfaceAttributeInput struct { +type ModifyVpcEndpointServiceConfigurationInput struct { _ struct{} `type:"structure"` - // Information about the interface attachment. If modifying the 'delete on termination' - // attribute, you must specify the ID of the interface attachment. - Attachment *NetworkInterfaceAttachmentChanges `locationName:"attachment" type:"structure"` + // Indicate whether requests to create an endpoint to your service must be accepted. + AcceptanceRequired *bool `type:"boolean"` - // A description for the network interface. - Description *AttributeValue `locationName:"description" type:"structure"` + // The Amazon Resource Names (ARNs) of Network Load Balancers to add to your + // service configuration. + AddNetworkLoadBalancerArns []*string `locationName:"AddNetworkLoadBalancerArn" 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 `locationName:"dryRun" type:"boolean"` + DryRun *bool `type:"boolean"` - // Changes the security groups for the network interface. The new set of groups - // you specify replaces the current set. You must specify at least one group, - // even if it's just the default security group in the VPC. You must specify - // the ID of the security group, not the name. - Groups []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"` + // The Amazon Resource Names (ARNs) of Network Load Balancers to remove from + // your service configuration. + RemoveNetworkLoadBalancerArns []*string `locationName:"RemoveNetworkLoadBalancerArn" locationNameList:"item" type:"list"` - // The ID of the network interface. + // The ID of the service. // - // 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 (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html) - // in the Amazon Virtual Private Cloud User Guide. - SourceDestCheck *AttributeBooleanValue `locationName:"sourceDestCheck" type:"structure"` + // ServiceId is a required field + ServiceId *string `type:"string" required:"true"` } // String returns the string representation -func (s ModifyNetworkInterfaceAttributeInput) String() string { +func (s ModifyVpcEndpointServiceConfigurationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyNetworkInterfaceAttributeInput) GoString() string { +func (s ModifyVpcEndpointServiceConfigurationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyNetworkInterfaceAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyNetworkInterfaceAttributeInput"} - if s.NetworkInterfaceId == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) +func (s *ModifyVpcEndpointServiceConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyVpcEndpointServiceConfigurationInput"} + if s.ServiceId == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceId")) } if invalidParams.Len() > 0 { @@ -54705,93 +67575,98 @@ func (s *ModifyNetworkInterfaceAttributeInput) Validate() error { return nil } -// SetAttachment sets the Attachment field's value. -func (s *ModifyNetworkInterfaceAttributeInput) SetAttachment(v *NetworkInterfaceAttachmentChanges) *ModifyNetworkInterfaceAttributeInput { - s.Attachment = v +// SetAcceptanceRequired sets the AcceptanceRequired field's value. +func (s *ModifyVpcEndpointServiceConfigurationInput) SetAcceptanceRequired(v bool) *ModifyVpcEndpointServiceConfigurationInput { + s.AcceptanceRequired = &v return s } -// SetDescription sets the Description field's value. -func (s *ModifyNetworkInterfaceAttributeInput) SetDescription(v *AttributeValue) *ModifyNetworkInterfaceAttributeInput { - s.Description = v +// SetAddNetworkLoadBalancerArns sets the AddNetworkLoadBalancerArns field's value. +func (s *ModifyVpcEndpointServiceConfigurationInput) SetAddNetworkLoadBalancerArns(v []*string) *ModifyVpcEndpointServiceConfigurationInput { + s.AddNetworkLoadBalancerArns = v return s } // SetDryRun sets the DryRun field's value. -func (s *ModifyNetworkInterfaceAttributeInput) SetDryRun(v bool) *ModifyNetworkInterfaceAttributeInput { +func (s *ModifyVpcEndpointServiceConfigurationInput) SetDryRun(v bool) *ModifyVpcEndpointServiceConfigurationInput { s.DryRun = &v return s } -// SetGroups sets the Groups field's value. -func (s *ModifyNetworkInterfaceAttributeInput) SetGroups(v []*string) *ModifyNetworkInterfaceAttributeInput { - s.Groups = v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *ModifyNetworkInterfaceAttributeInput) SetNetworkInterfaceId(v string) *ModifyNetworkInterfaceAttributeInput { - s.NetworkInterfaceId = &v +// SetRemoveNetworkLoadBalancerArns sets the RemoveNetworkLoadBalancerArns field's value. +func (s *ModifyVpcEndpointServiceConfigurationInput) SetRemoveNetworkLoadBalancerArns(v []*string) *ModifyVpcEndpointServiceConfigurationInput { + s.RemoveNetworkLoadBalancerArns = v return s } -// SetSourceDestCheck sets the SourceDestCheck field's value. -func (s *ModifyNetworkInterfaceAttributeInput) SetSourceDestCheck(v *AttributeBooleanValue) *ModifyNetworkInterfaceAttributeInput { - s.SourceDestCheck = v +// SetServiceId sets the ServiceId field's value. +func (s *ModifyVpcEndpointServiceConfigurationInput) SetServiceId(v string) *ModifyVpcEndpointServiceConfigurationInput { + s.ServiceId = &v return s } -type ModifyNetworkInterfaceAttributeOutput struct { +type ModifyVpcEndpointServiceConfigurationOutput 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 ModifyNetworkInterfaceAttributeOutput) String() string { +func (s ModifyVpcEndpointServiceConfigurationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyNetworkInterfaceAttributeOutput) GoString() string { +func (s ModifyVpcEndpointServiceConfigurationOutput) GoString() string { return s.String() } -// Contains the parameters for ModifyReservedInstances. -type ModifyReservedInstancesInput struct { +// SetReturn sets the Return field's value. +func (s *ModifyVpcEndpointServiceConfigurationOutput) SetReturn(v bool) *ModifyVpcEndpointServiceConfigurationOutput { + s.Return = &v + return s +} + +type ModifyVpcEndpointServicePermissionsInput struct { _ struct{} `type:"structure"` - // A unique, case-sensitive token you provide to ensure idempotency of your - // modification request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - ClientToken *string `locationName:"clientToken" type:"string"` + // The Amazon Resource Names (ARN) of one or more principals. Permissions are + // granted to the principals in this list. To grant permissions to all principals, + // specify an asterisk (*). + AddAllowedPrincipals []*string `locationNameList:"item" type:"list"` - // The IDs of the Reserved Instances to modify. - // - // ReservedInstancesIds is a required field - ReservedInstancesIds []*string `locationName:"ReservedInstancesId" locationNameList:"ReservedInstancesId" type:"list" 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 configuration settings for the Reserved Instances to modify. + // The Amazon Resource Names (ARN) of one or more principals. Permissions are + // revoked for principals in this list. + RemoveAllowedPrincipals []*string `locationNameList:"item" type:"list"` + + // The ID of the service. // - // TargetConfigurations is a required field - TargetConfigurations []*ReservedInstancesConfiguration `locationName:"ReservedInstancesConfigurationSetItemType" locationNameList:"item" type:"list" required:"true"` + // ServiceId is a required field + ServiceId *string `type:"string" required:"true"` } // String returns the string representation -func (s ModifyReservedInstancesInput) String() string { +func (s ModifyVpcEndpointServicePermissionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyReservedInstancesInput) GoString() string { +func (s ModifyVpcEndpointServicePermissionsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyReservedInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyReservedInstancesInput"} - if s.ReservedInstancesIds == nil { - invalidParams.Add(request.NewErrParamRequired("ReservedInstancesIds")) - } - if s.TargetConfigurations == nil { - invalidParams.Add(request.NewErrParamRequired("TargetConfigurations")) +func (s *ModifyVpcEndpointServicePermissionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyVpcEndpointServicePermissionsInput"} + if s.ServiceId == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceId")) } if invalidParams.Len() > 0 { @@ -54800,95 +67675,89 @@ func (s *ModifyReservedInstancesInput) Validate() error { return nil } -// SetClientToken sets the ClientToken field's value. -func (s *ModifyReservedInstancesInput) SetClientToken(v string) *ModifyReservedInstancesInput { - s.ClientToken = &v +// SetAddAllowedPrincipals sets the AddAllowedPrincipals field's value. +func (s *ModifyVpcEndpointServicePermissionsInput) SetAddAllowedPrincipals(v []*string) *ModifyVpcEndpointServicePermissionsInput { + s.AddAllowedPrincipals = v return s } -// SetReservedInstancesIds sets the ReservedInstancesIds field's value. -func (s *ModifyReservedInstancesInput) SetReservedInstancesIds(v []*string) *ModifyReservedInstancesInput { - s.ReservedInstancesIds = v +// SetDryRun sets the DryRun field's value. +func (s *ModifyVpcEndpointServicePermissionsInput) SetDryRun(v bool) *ModifyVpcEndpointServicePermissionsInput { + s.DryRun = &v return s } -// SetTargetConfigurations sets the TargetConfigurations field's value. -func (s *ModifyReservedInstancesInput) SetTargetConfigurations(v []*ReservedInstancesConfiguration) *ModifyReservedInstancesInput { - s.TargetConfigurations = v +// SetRemoveAllowedPrincipals sets the RemoveAllowedPrincipals field's value. +func (s *ModifyVpcEndpointServicePermissionsInput) SetRemoveAllowedPrincipals(v []*string) *ModifyVpcEndpointServicePermissionsInput { + s.RemoveAllowedPrincipals = v return s } -// Contains the output of ModifyReservedInstances. -type ModifyReservedInstancesOutput struct { +// SetServiceId sets the ServiceId field's value. +func (s *ModifyVpcEndpointServicePermissionsInput) SetServiceId(v string) *ModifyVpcEndpointServicePermissionsInput { + s.ServiceId = &v + return s +} + +type ModifyVpcEndpointServicePermissionsOutput struct { _ struct{} `type:"structure"` - // The ID for the modification. - ReservedInstancesModificationId *string `locationName:"reservedInstancesModificationId" type:"string"` + // Returns true if the request succeeds; otherwise, it returns an error. + ReturnValue *bool `locationName:"return" type:"boolean"` } // String returns the string representation -func (s ModifyReservedInstancesOutput) String() string { +func (s ModifyVpcEndpointServicePermissionsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyReservedInstancesOutput) GoString() string { +func (s ModifyVpcEndpointServicePermissionsOutput) GoString() string { return s.String() } -// SetReservedInstancesModificationId sets the ReservedInstancesModificationId field's value. -func (s *ModifyReservedInstancesOutput) SetReservedInstancesModificationId(v string) *ModifyReservedInstancesOutput { - s.ReservedInstancesModificationId = &v +// SetReturnValue sets the ReturnValue field's value. +func (s *ModifyVpcEndpointServicePermissionsOutput) SetReturnValue(v bool) *ModifyVpcEndpointServicePermissionsOutput { + s.ReturnValue = &v return s } -// Contains the parameters for ModifySnapshotAttribute. -type ModifySnapshotAttributeInput struct { +type ModifyVpcPeeringConnectionOptionsInput struct { _ struct{} `type:"structure"` - // The snapshot attribute to modify. Only volume creation permissions can be - // modified. - Attribute *string `type:"string" enum:"SnapshotAttributeName"` - - // A JSON representation of the snapshot attribute modification. - CreateVolumePermission *CreateVolumePermissionModifications `type:"structure"` + // The VPC peering connection options for the accepter VPC. + AccepterPeeringConnectionOptions *PeeringConnectionOptionsRequest `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 `locationName:"dryRun" type:"boolean"` - - // The group to modify for the snapshot. - GroupNames []*string `locationName:"UserGroup" locationNameList:"GroupName" type:"list"` + DryRun *bool `type:"boolean"` - // The type of operation to perform to the attribute. - OperationType *string `type:"string" enum:"OperationType"` + // The VPC peering connection options for the requester VPC. + RequesterPeeringConnectionOptions *PeeringConnectionOptionsRequest `type:"structure"` - // The ID of the snapshot. + // The ID of the VPC peering connection. // - // SnapshotId is a required field - SnapshotId *string `type:"string" required:"true"` - - // The account ID to modify for the snapshot. - UserIds []*string `locationName:"UserId" locationNameList:"UserId" type:"list"` + // VpcPeeringConnectionId is a required field + VpcPeeringConnectionId *string `type:"string" required:"true"` } // String returns the string representation -func (s ModifySnapshotAttributeInput) String() string { +func (s ModifyVpcPeeringConnectionOptionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifySnapshotAttributeInput) GoString() string { +func (s ModifyVpcPeeringConnectionOptionsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ModifySnapshotAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifySnapshotAttributeInput"} - if s.SnapshotId == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotId")) +func (s *ModifyVpcPeeringConnectionOptionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyVpcPeeringConnectionOptionsInput"} + if s.VpcPeeringConnectionId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcPeeringConnectionId")) } if invalidParams.Len() > 0 { @@ -54897,95 +67766,100 @@ func (s *ModifySnapshotAttributeInput) Validate() error { return nil } -// SetAttribute sets the Attribute field's value. -func (s *ModifySnapshotAttributeInput) SetAttribute(v string) *ModifySnapshotAttributeInput { - s.Attribute = &v - return s -} - -// SetCreateVolumePermission sets the CreateVolumePermission field's value. -func (s *ModifySnapshotAttributeInput) SetCreateVolumePermission(v *CreateVolumePermissionModifications) *ModifySnapshotAttributeInput { - s.CreateVolumePermission = v +// SetAccepterPeeringConnectionOptions sets the AccepterPeeringConnectionOptions field's value. +func (s *ModifyVpcPeeringConnectionOptionsInput) SetAccepterPeeringConnectionOptions(v *PeeringConnectionOptionsRequest) *ModifyVpcPeeringConnectionOptionsInput { + s.AccepterPeeringConnectionOptions = v return s } // SetDryRun sets the DryRun field's value. -func (s *ModifySnapshotAttributeInput) SetDryRun(v bool) *ModifySnapshotAttributeInput { +func (s *ModifyVpcPeeringConnectionOptionsInput) SetDryRun(v bool) *ModifyVpcPeeringConnectionOptionsInput { s.DryRun = &v return s } -// SetGroupNames sets the GroupNames field's value. -func (s *ModifySnapshotAttributeInput) SetGroupNames(v []*string) *ModifySnapshotAttributeInput { - s.GroupNames = v - return s -} - -// SetOperationType sets the OperationType field's value. -func (s *ModifySnapshotAttributeInput) SetOperationType(v string) *ModifySnapshotAttributeInput { - s.OperationType = &v - return s -} - -// SetSnapshotId sets the SnapshotId field's value. -func (s *ModifySnapshotAttributeInput) SetSnapshotId(v string) *ModifySnapshotAttributeInput { - s.SnapshotId = &v +// SetRequesterPeeringConnectionOptions sets the RequesterPeeringConnectionOptions field's value. +func (s *ModifyVpcPeeringConnectionOptionsInput) SetRequesterPeeringConnectionOptions(v *PeeringConnectionOptionsRequest) *ModifyVpcPeeringConnectionOptionsInput { + s.RequesterPeeringConnectionOptions = v return s } -// SetUserIds sets the UserIds field's value. -func (s *ModifySnapshotAttributeInput) SetUserIds(v []*string) *ModifySnapshotAttributeInput { - s.UserIds = v +// SetVpcPeeringConnectionId sets the VpcPeeringConnectionId field's value. +func (s *ModifyVpcPeeringConnectionOptionsInput) SetVpcPeeringConnectionId(v string) *ModifyVpcPeeringConnectionOptionsInput { + s.VpcPeeringConnectionId = &v return s } -type ModifySnapshotAttributeOutput struct { +type ModifyVpcPeeringConnectionOptionsOutput struct { _ struct{} `type:"structure"` + + // Information about the VPC peering connection options for the accepter VPC. + AccepterPeeringConnectionOptions *PeeringConnectionOptions `locationName:"accepterPeeringConnectionOptions" type:"structure"` + + // Information about the VPC peering connection options for the requester VPC. + RequesterPeeringConnectionOptions *PeeringConnectionOptions `locationName:"requesterPeeringConnectionOptions" type:"structure"` } // String returns the string representation -func (s ModifySnapshotAttributeOutput) String() string { +func (s ModifyVpcPeeringConnectionOptionsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifySnapshotAttributeOutput) GoString() string { +func (s ModifyVpcPeeringConnectionOptionsOutput) GoString() string { return s.String() } -// Contains the parameters for ModifySpotFleetRequest. -type ModifySpotFleetRequestInput struct { +// SetAccepterPeeringConnectionOptions sets the AccepterPeeringConnectionOptions field's value. +func (s *ModifyVpcPeeringConnectionOptionsOutput) SetAccepterPeeringConnectionOptions(v *PeeringConnectionOptions) *ModifyVpcPeeringConnectionOptionsOutput { + s.AccepterPeeringConnectionOptions = v + return s +} + +// SetRequesterPeeringConnectionOptions sets the RequesterPeeringConnectionOptions field's value. +func (s *ModifyVpcPeeringConnectionOptionsOutput) SetRequesterPeeringConnectionOptions(v *PeeringConnectionOptions) *ModifyVpcPeeringConnectionOptionsOutput { + s.RequesterPeeringConnectionOptions = v + return s +} + +type ModifyVpcTenancyInput struct { _ struct{} `type:"structure"` - // 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. - ExcessCapacityTerminationPolicy *string `locationName:"excessCapacityTerminationPolicy" type:"string" enum:"ExcessCapacityTerminationPolicy"` + // 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 Spot Fleet request. + // The instance tenancy attribute for the VPC. // - // SpotFleetRequestId is a required field - SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"` + // InstanceTenancy is a required field + InstanceTenancy *string `type:"string" required:"true" enum:"VpcTenancy"` - // The size of the fleet. - TargetCapacity *int64 `locationName:"targetCapacity" type:"integer"` + // The ID of the VPC. + // + // VpcId is a required field + VpcId *string `type:"string" required:"true"` } // String returns the string representation -func (s ModifySpotFleetRequestInput) String() string { +func (s ModifyVpcTenancyInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifySpotFleetRequestInput) GoString() string { +func (s ModifyVpcTenancyInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ModifySpotFleetRequestInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifySpotFleetRequestInput"} - if s.SpotFleetRequestId == nil { - invalidParams.Add(request.NewErrParamRequired("SpotFleetRequestId")) +func (s *ModifyVpcTenancyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyVpcTenancyInput"} + if s.InstanceTenancy == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceTenancy")) + } + if s.VpcId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcId")) } if invalidParams.Len() > 0 { @@ -54994,89 +67868,77 @@ func (s *ModifySpotFleetRequestInput) Validate() error { return nil } -// SetExcessCapacityTerminationPolicy sets the ExcessCapacityTerminationPolicy field's value. -func (s *ModifySpotFleetRequestInput) SetExcessCapacityTerminationPolicy(v string) *ModifySpotFleetRequestInput { - s.ExcessCapacityTerminationPolicy = &v +// SetDryRun sets the DryRun field's value. +func (s *ModifyVpcTenancyInput) SetDryRun(v bool) *ModifyVpcTenancyInput { + s.DryRun = &v return s } -// SetSpotFleetRequestId sets the SpotFleetRequestId field's value. -func (s *ModifySpotFleetRequestInput) SetSpotFleetRequestId(v string) *ModifySpotFleetRequestInput { - s.SpotFleetRequestId = &v +// SetInstanceTenancy sets the InstanceTenancy field's value. +func (s *ModifyVpcTenancyInput) SetInstanceTenancy(v string) *ModifyVpcTenancyInput { + s.InstanceTenancy = &v return s } -// SetTargetCapacity sets the TargetCapacity field's value. -func (s *ModifySpotFleetRequestInput) SetTargetCapacity(v int64) *ModifySpotFleetRequestInput { - s.TargetCapacity = &v +// SetVpcId sets the VpcId field's value. +func (s *ModifyVpcTenancyInput) SetVpcId(v string) *ModifyVpcTenancyInput { + s.VpcId = &v return s } -// Contains the output of ModifySpotFleetRequest. -type ModifySpotFleetRequestOutput struct { +type ModifyVpcTenancyOutput struct { _ struct{} `type:"structure"` - // Is true if the request succeeds, and an error otherwise. - Return *bool `locationName:"return" type:"boolean"` + // Returns true if the request succeeds; otherwise, returns an error. + ReturnValue *bool `locationName:"return" type:"boolean"` } // String returns the string representation -func (s ModifySpotFleetRequestOutput) String() string { +func (s ModifyVpcTenancyOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifySpotFleetRequestOutput) GoString() string { +func (s ModifyVpcTenancyOutput) GoString() string { return s.String() } -// SetReturn sets the Return field's value. -func (s *ModifySpotFleetRequestOutput) SetReturn(v bool) *ModifySpotFleetRequestOutput { - s.Return = &v +// SetReturnValue sets the ReturnValue field's value. +func (s *ModifyVpcTenancyOutput) SetReturnValue(v bool) *ModifyVpcTenancyOutput { + s.ReturnValue = &v return s } -// Contains the parameters for ModifySubnetAttribute. -type ModifySubnetAttributeInput struct { +type MonitorInstancesInput struct { _ struct{} `type:"structure"` - // Specify true to indicate that network interfaces created in the specified - // subnet should be assigned an IPv6 address. This includes a network interface - // that's created when launching an instance into the subnet (the instance therefore - // receives an IPv6 address). - // - // If you enable the IPv6 addressing feature for your subnet, your network interface - // or instance only receives an IPv6 address if it's created using version 2016-11-15 - // or later of the Amazon EC2 API. - AssignIpv6AddressOnCreation *AttributeBooleanValue `type:"structure"` - - // Specify true to indicate that network interfaces created in the specified - // subnet should be assigned a public IPv4 address. This includes a network - // interface that's created when launching an instance into the subnet (the - // instance therefore receives a public IPv4 address). - MapPublicIpOnLaunch *AttributeBooleanValue `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 `locationName:"dryRun" type:"boolean"` - // The ID of the subnet. + // One or more instance IDs. // - // SubnetId is a required field - SubnetId *string `locationName:"subnetId" type:"string" required:"true"` + // InstanceIds is a required field + InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"` } // String returns the string representation -func (s ModifySubnetAttributeInput) String() string { +func (s MonitorInstancesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifySubnetAttributeInput) GoString() string { +func (s MonitorInstancesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ModifySubnetAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifySubnetAttributeInput"} - if s.SubnetId == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetId")) +func (s *MonitorInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "MonitorInstancesInput"} + if s.InstanceIds == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceIds")) } if invalidParams.Len() > 0 { @@ -55085,44 +67947,68 @@ func (s *ModifySubnetAttributeInput) Validate() error { return nil } -// SetAssignIpv6AddressOnCreation sets the AssignIpv6AddressOnCreation field's value. -func (s *ModifySubnetAttributeInput) SetAssignIpv6AddressOnCreation(v *AttributeBooleanValue) *ModifySubnetAttributeInput { - s.AssignIpv6AddressOnCreation = v +// SetDryRun sets the DryRun field's value. +func (s *MonitorInstancesInput) SetDryRun(v bool) *MonitorInstancesInput { + s.DryRun = &v return s } -// SetMapPublicIpOnLaunch sets the MapPublicIpOnLaunch field's value. -func (s *ModifySubnetAttributeInput) SetMapPublicIpOnLaunch(v *AttributeBooleanValue) *ModifySubnetAttributeInput { - s.MapPublicIpOnLaunch = v +// SetInstanceIds sets the InstanceIds field's value. +func (s *MonitorInstancesInput) SetInstanceIds(v []*string) *MonitorInstancesInput { + s.InstanceIds = v return s } -// SetSubnetId sets the SubnetId field's value. -func (s *ModifySubnetAttributeInput) SetSubnetId(v string) *ModifySubnetAttributeInput { - s.SubnetId = &v +type MonitorInstancesOutput struct { + _ struct{} `type:"structure"` + + // The monitoring information. + InstanceMonitorings []*InstanceMonitoring `locationName:"instancesSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s MonitorInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MonitorInstancesOutput) GoString() string { + return s.String() +} + +// SetInstanceMonitorings sets the InstanceMonitorings field's value. +func (s *MonitorInstancesOutput) SetInstanceMonitorings(v []*InstanceMonitoring) *MonitorInstancesOutput { + s.InstanceMonitorings = v return s } -type ModifySubnetAttributeOutput struct { +// Describes the monitoring of an instance. +type Monitoring struct { _ struct{} `type:"structure"` + + // Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring + // is enabled. + State *string `locationName:"state" type:"string" enum:"MonitoringState"` } // String returns the string representation -func (s ModifySubnetAttributeOutput) String() string { +func (s Monitoring) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifySubnetAttributeOutput) GoString() string { +func (s Monitoring) GoString() string { return s.String() } -// Contains the parameters for ModifyVolumeAttribute. -type ModifyVolumeAttributeInput struct { - _ struct{} `type:"structure"` +// SetState sets the State field's value. +func (s *Monitoring) SetState(v string) *Monitoring { + s.State = &v + return s +} - // Indicates whether the volume should be auto-enabled for I/O operations. - AutoEnableIO *AttributeBooleanValue `type:"structure"` +type MoveAddressToVpcInput 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 @@ -55130,27 +68016,27 @@ type ModifyVolumeAttributeInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // The ID of the volume. + // The Elastic IP address. // - // VolumeId is a required field - VolumeId *string `type:"string" required:"true"` + // PublicIp is a required field + PublicIp *string `locationName:"publicIp" type:"string" required:"true"` } // String returns the string representation -func (s ModifyVolumeAttributeInput) String() string { +func (s MoveAddressToVpcInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyVolumeAttributeInput) GoString() string { +func (s MoveAddressToVpcInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyVolumeAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyVolumeAttributeInput"} - if s.VolumeId == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeId")) +func (s *MoveAddressToVpcInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "MoveAddressToVpcInput"} + if s.PublicIp == nil { + invalidParams.Add(request.NewErrParamRequired("PublicIp")) } if invalidParams.Len() > 0 { @@ -55159,2970 +68045,3156 @@ func (s *ModifyVolumeAttributeInput) Validate() error { return nil } -// SetAutoEnableIO sets the AutoEnableIO field's value. -func (s *ModifyVolumeAttributeInput) SetAutoEnableIO(v *AttributeBooleanValue) *ModifyVolumeAttributeInput { - s.AutoEnableIO = v +// SetDryRun sets the DryRun field's value. +func (s *MoveAddressToVpcInput) SetDryRun(v bool) *MoveAddressToVpcInput { + s.DryRun = &v return s } -// SetDryRun sets the DryRun field's value. -func (s *ModifyVolumeAttributeInput) SetDryRun(v bool) *ModifyVolumeAttributeInput { - s.DryRun = &v +// SetPublicIp sets the PublicIp field's value. +func (s *MoveAddressToVpcInput) SetPublicIp(v string) *MoveAddressToVpcInput { + s.PublicIp = &v return s } -// SetVolumeId sets the VolumeId field's value. -func (s *ModifyVolumeAttributeInput) SetVolumeId(v string) *ModifyVolumeAttributeInput { - s.VolumeId = &v +type MoveAddressToVpcOutput struct { + _ struct{} `type:"structure"` + + // The allocation ID for the Elastic IP address. + AllocationId *string `locationName:"allocationId" type:"string"` + + // The status of the move of the IP address. + Status *string `locationName:"status" type:"string" enum:"Status"` +} + +// String returns the string representation +func (s MoveAddressToVpcOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MoveAddressToVpcOutput) GoString() string { + return s.String() +} + +// SetAllocationId sets the AllocationId field's value. +func (s *MoveAddressToVpcOutput) SetAllocationId(v string) *MoveAddressToVpcOutput { + s.AllocationId = &v return s } -type ModifyVolumeAttributeOutput struct { +// SetStatus sets the Status field's value. +func (s *MoveAddressToVpcOutput) SetStatus(v string) *MoveAddressToVpcOutput { + s.Status = &v + return s +} + +// Describes the status of a moving Elastic IP address. +type MovingAddressStatus struct { _ struct{} `type:"structure"` + + // The status of the Elastic IP address that's being moved to the EC2-VPC platform, + // or restored to the EC2-Classic platform. + MoveStatus *string `locationName:"moveStatus" type:"string" enum:"MoveStatus"` + + // The Elastic IP address. + PublicIp *string `locationName:"publicIp" type:"string"` } // String returns the string representation -func (s ModifyVolumeAttributeOutput) String() string { +func (s MovingAddressStatus) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyVolumeAttributeOutput) GoString() string { +func (s MovingAddressStatus) GoString() string { return s.String() } -type ModifyVolumeInput struct { +// SetMoveStatus sets the MoveStatus field's value. +func (s *MovingAddressStatus) SetMoveStatus(v string) *MovingAddressStatus { + s.MoveStatus = &v + return s +} + +// SetPublicIp sets the PublicIp field's value. +func (s *MovingAddressStatus) SetPublicIp(v string) *MovingAddressStatus { + s.PublicIp = &v + return s +} + +// Describes a NAT gateway. +type NatGateway 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 date and time the NAT gateway was created. + CreateTime *time.Time `locationName:"createTime" type:"timestamp"` - // The target IOPS rate of the volume. + // The date and time the NAT gateway was deleted, if applicable. + DeleteTime *time.Time `locationName:"deleteTime" type:"timestamp"` + + // If the NAT gateway could not be created, specifies the error code for the + // failure. (InsufficientFreeAddressesInSubnet | Gateway.NotAttached | InvalidAllocationID.NotFound + // | Resource.AlreadyAssociated | InternalError | InvalidSubnetID.NotFound) + FailureCode *string `locationName:"failureCode" type:"string"` + + // If the NAT gateway could not be created, specifies the error message for + // the failure, that corresponds to the error code. // - // This is only valid for Provisioned IOPS SSD (io1) volumes. For more information, - // see Provisioned IOPS SSD (io1) Volumes (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html#EBSVolumeTypes_piops). + // * For InsufficientFreeAddressesInSubnet: "Subnet has insufficient free + // addresses to create this NAT gateway" // - // Default: If no IOPS value is specified, the existing value is retained. - Iops *int64 `type:"integer"` - - // The target size of the volume, in GiB. The target volume size must be greater - // than or equal to than the existing size of the volume. For information about - // available EBS volume sizes, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html). + // * For Gateway.NotAttached: "Network vpc-xxxxxxxx has no Internet gateway + // attached" // - // Default: If no size is specified, the existing size is retained. - Size *int64 `type:"integer"` - - // The ID of the volume. + // * For InvalidAllocationID.NotFound: "Elastic IP address eipalloc-xxxxxxxx + // could not be associated with this NAT gateway" // - // VolumeId is a required field - VolumeId *string `type:"string" required:"true"` + // * For Resource.AlreadyAssociated: "Elastic IP address eipalloc-xxxxxxxx + // is already associated" + // + // * For InternalError: "Network interface eni-xxxxxxxx, created and used + // internally by this NAT gateway is in an invalid state. Please try again." + // + // * For InvalidSubnetID.NotFound: "The specified subnet subnet-xxxxxxxx + // does not exist or could not be found." + FailureMessage *string `locationName:"failureMessage" type:"string"` - // The target EBS volume type of the volume. + // Information about the IP addresses and network interface associated with + // the NAT gateway. + NatGatewayAddresses []*NatGatewayAddress `locationName:"natGatewayAddressSet" locationNameList:"item" type:"list"` + + // The ID of the NAT gateway. + NatGatewayId *string `locationName:"natGatewayId" type:"string"` + + // Reserved. If you need to sustain traffic greater than the documented limits + // (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), + // contact us through the Support Center (https://console.aws.amazon.com/support/home?). + ProvisionedBandwidth *ProvisionedBandwidth `locationName:"provisionedBandwidth" type:"structure"` + + // The state of the NAT gateway. // - // Default: If no type is specified, the existing type is retained. - VolumeType *string `type:"string" enum:"VolumeType"` + // * pending: The NAT gateway is being created and is not ready to process + // traffic. + // + // * failed: The NAT gateway could not be created. Check the failureCode + // and failureMessage fields for the reason. + // + // * available: The NAT gateway is able to process traffic. This status remains + // until you delete the NAT gateway, and does not indicate the health of + // the NAT gateway. + // + // * deleting: The NAT gateway is in the process of being terminated and + // may still be processing traffic. + // + // * deleted: The NAT gateway has been terminated and is no longer processing + // traffic. + State *string `locationName:"state" type:"string" enum:"NatGatewayState"` + + // The ID of the subnet in which the NAT gateway is located. + SubnetId *string `locationName:"subnetId" type:"string"` + + // The tags for the NAT gateway. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + + // The ID of the VPC in which the NAT gateway is located. + VpcId *string `locationName:"vpcId" type:"string"` } // String returns the string representation -func (s ModifyVolumeInput) String() string { +func (s NatGateway) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyVolumeInput) GoString() string { +func (s NatGateway) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyVolumeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyVolumeInput"} - if s.VolumeId == nil { - invalidParams.Add(request.NewErrParamRequired("VolumeId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetCreateTime sets the CreateTime field's value. +func (s *NatGateway) SetCreateTime(v time.Time) *NatGateway { + s.CreateTime = &v + return s } -// SetDryRun sets the DryRun field's value. -func (s *ModifyVolumeInput) SetDryRun(v bool) *ModifyVolumeInput { - s.DryRun = &v +// SetDeleteTime sets the DeleteTime field's value. +func (s *NatGateway) SetDeleteTime(v time.Time) *NatGateway { + s.DeleteTime = &v return s } -// SetIops sets the Iops field's value. -func (s *ModifyVolumeInput) SetIops(v int64) *ModifyVolumeInput { - s.Iops = &v +// SetFailureCode sets the FailureCode field's value. +func (s *NatGateway) SetFailureCode(v string) *NatGateway { + s.FailureCode = &v return s } -// SetSize sets the Size field's value. -func (s *ModifyVolumeInput) SetSize(v int64) *ModifyVolumeInput { - s.Size = &v +// SetFailureMessage sets the FailureMessage field's value. +func (s *NatGateway) SetFailureMessage(v string) *NatGateway { + s.FailureMessage = &v return s } -// SetVolumeId sets the VolumeId field's value. -func (s *ModifyVolumeInput) SetVolumeId(v string) *ModifyVolumeInput { - s.VolumeId = &v +// SetNatGatewayAddresses sets the NatGatewayAddresses field's value. +func (s *NatGateway) SetNatGatewayAddresses(v []*NatGatewayAddress) *NatGateway { + s.NatGatewayAddresses = v return s } -// SetVolumeType sets the VolumeType field's value. -func (s *ModifyVolumeInput) SetVolumeType(v string) *ModifyVolumeInput { - s.VolumeType = &v +// SetNatGatewayId sets the NatGatewayId field's value. +func (s *NatGateway) SetNatGatewayId(v string) *NatGateway { + s.NatGatewayId = &v return s } -type ModifyVolumeOutput struct { - _ struct{} `type:"structure"` +// SetProvisionedBandwidth sets the ProvisionedBandwidth field's value. +func (s *NatGateway) SetProvisionedBandwidth(v *ProvisionedBandwidth) *NatGateway { + s.ProvisionedBandwidth = v + return s +} - // Information about the volume modification. - VolumeModification *VolumeModification `locationName:"volumeModification" type:"structure"` +// SetState sets the State field's value. +func (s *NatGateway) SetState(v string) *NatGateway { + s.State = &v + return s } -// String returns the string representation -func (s ModifyVolumeOutput) String() string { - return awsutil.Prettify(s) +// SetSubnetId sets the SubnetId field's value. +func (s *NatGateway) SetSubnetId(v string) *NatGateway { + s.SubnetId = &v + return s } -// GoString returns the string representation -func (s ModifyVolumeOutput) GoString() string { - return s.String() +// SetTags sets the Tags field's value. +func (s *NatGateway) SetTags(v []*Tag) *NatGateway { + s.Tags = v + return s } -// SetVolumeModification sets the VolumeModification field's value. -func (s *ModifyVolumeOutput) SetVolumeModification(v *VolumeModification) *ModifyVolumeOutput { - s.VolumeModification = v +// SetVpcId sets the VpcId field's value. +func (s *NatGateway) SetVpcId(v string) *NatGateway { + s.VpcId = &v return s } -// Contains the parameters for ModifyVpcAttribute. -type ModifyVpcAttributeInput struct { +// Describes the IP addresses and network interface associated with a NAT gateway. +type NatGatewayAddress struct { _ struct{} `type:"structure"` - // Indicates whether the instances launched in the VPC get DNS hostnames. If - // enabled, instances in the VPC get DNS hostnames; otherwise, they do not. - // - // You cannot modify the DNS resolution and DNS hostnames attributes in the - // same request. Use separate requests for each attribute. You can only enable - // DNS hostnames if you've enabled DNS support. - EnableDnsHostnames *AttributeBooleanValue `type:"structure"` + // The allocation ID of the Elastic IP address that's associated with the NAT + // gateway. + AllocationId *string `locationName:"allocationId" type:"string"` - // Indicates whether the DNS resolution is supported for the VPC. If enabled, - // queries to the Amazon provided DNS server at the 169.254.169.253 IP address, - // or the reserved IP address at the base of the VPC network range "plus two" - // succeed. If disabled, the Amazon provided DNS service in the VPC that resolves - // public DNS hostnames to IP addresses is not enabled. - // - // You cannot modify the DNS resolution and DNS hostnames attributes in the - // same request. Use separate requests for each attribute. - EnableDnsSupport *AttributeBooleanValue `type:"structure"` + // The ID of the network interface associated with the NAT gateway. + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` - // The ID of the VPC. - // - // VpcId is a required field - VpcId *string `locationName:"vpcId" type:"string" required:"true"` + // The private IP address associated with the Elastic IP address. + PrivateIp *string `locationName:"privateIp" type:"string"` + + // The Elastic IP address associated with the NAT gateway. + PublicIp *string `locationName:"publicIp" type:"string"` } // String returns the string representation -func (s ModifyVpcAttributeInput) String() string { +func (s NatGatewayAddress) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyVpcAttributeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyVpcAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyVpcAttributeInput"} - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } +func (s NatGatewayAddress) GoString() string { + return s.String() +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetAllocationId sets the AllocationId field's value. +func (s *NatGatewayAddress) SetAllocationId(v string) *NatGatewayAddress { + s.AllocationId = &v + return s } -// SetEnableDnsHostnames sets the EnableDnsHostnames field's value. -func (s *ModifyVpcAttributeInput) SetEnableDnsHostnames(v *AttributeBooleanValue) *ModifyVpcAttributeInput { - s.EnableDnsHostnames = v +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *NatGatewayAddress) SetNetworkInterfaceId(v string) *NatGatewayAddress { + s.NetworkInterfaceId = &v return s } -// SetEnableDnsSupport sets the EnableDnsSupport field's value. -func (s *ModifyVpcAttributeInput) SetEnableDnsSupport(v *AttributeBooleanValue) *ModifyVpcAttributeInput { - s.EnableDnsSupport = v +// SetPrivateIp sets the PrivateIp field's value. +func (s *NatGatewayAddress) SetPrivateIp(v string) *NatGatewayAddress { + s.PrivateIp = &v return s } -// SetVpcId sets the VpcId field's value. -func (s *ModifyVpcAttributeInput) SetVpcId(v string) *ModifyVpcAttributeInput { - s.VpcId = &v +// SetPublicIp sets the PublicIp field's value. +func (s *NatGatewayAddress) SetPublicIp(v string) *NatGatewayAddress { + s.PublicIp = &v return s } -type ModifyVpcAttributeOutput struct { +// Describes a network ACL. +type NetworkAcl struct { _ struct{} `type:"structure"` -} -// String returns the string representation -func (s ModifyVpcAttributeOutput) String() string { - return awsutil.Prettify(s) -} + // Any associations between the network ACL and one or more subnets + Associations []*NetworkAclAssociation `locationName:"associationSet" locationNameList:"item" type:"list"` -// GoString returns the string representation -func (s ModifyVpcAttributeOutput) GoString() string { - return s.String() -} + // One or more entries (rules) in the network ACL. + Entries []*NetworkAclEntry `locationName:"entrySet" locationNameList:"item" type:"list"` -type ModifyVpcEndpointConnectionNotificationInput struct { - _ struct{} `type:"structure"` + // Indicates whether this is the default network ACL for the VPC. + IsDefault *bool `locationName:"default" type:"boolean"` - // One or more events for the endpoint. Valid values are Accept, Connect, Delete, - // and Reject. - ConnectionEvents []*string `locationNameList:"item" type:"list"` + // The ID of the network ACL. + NetworkAclId *string `locationName:"networkAclId" type:"string"` - // The ARN for the SNS topic for the notification. - ConnectionNotificationArn *string `type:"string"` + // The ID of the AWS account that owns the network ACL. + OwnerId *string `locationName:"ownerId" type:"string"` - // The ID of the notification. - // - // ConnectionNotificationId is a required field - ConnectionNotificationId *string `type:"string" required:"true"` + // Any tags assigned to the network ACL. + Tags []*Tag `locationName:"tagSet" 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"` + // The ID of the VPC for the network ACL. + VpcId *string `locationName:"vpcId" type:"string"` } // String returns the string representation -func (s ModifyVpcEndpointConnectionNotificationInput) String() string { +func (s NetworkAcl) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyVpcEndpointConnectionNotificationInput) GoString() string { +func (s NetworkAcl) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyVpcEndpointConnectionNotificationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyVpcEndpointConnectionNotificationInput"} - if s.ConnectionNotificationId == nil { - invalidParams.Add(request.NewErrParamRequired("ConnectionNotificationId")) - } +// SetAssociations sets the Associations field's value. +func (s *NetworkAcl) SetAssociations(v []*NetworkAclAssociation) *NetworkAcl { + s.Associations = v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetEntries sets the Entries field's value. +func (s *NetworkAcl) SetEntries(v []*NetworkAclEntry) *NetworkAcl { + s.Entries = v + return s } -// SetConnectionEvents sets the ConnectionEvents field's value. -func (s *ModifyVpcEndpointConnectionNotificationInput) SetConnectionEvents(v []*string) *ModifyVpcEndpointConnectionNotificationInput { - s.ConnectionEvents = v +// SetIsDefault sets the IsDefault field's value. +func (s *NetworkAcl) SetIsDefault(v bool) *NetworkAcl { + s.IsDefault = &v return s } -// SetConnectionNotificationArn sets the ConnectionNotificationArn field's value. -func (s *ModifyVpcEndpointConnectionNotificationInput) SetConnectionNotificationArn(v string) *ModifyVpcEndpointConnectionNotificationInput { - s.ConnectionNotificationArn = &v +// SetNetworkAclId sets the NetworkAclId field's value. +func (s *NetworkAcl) SetNetworkAclId(v string) *NetworkAcl { + s.NetworkAclId = &v return s } -// SetConnectionNotificationId sets the ConnectionNotificationId field's value. -func (s *ModifyVpcEndpointConnectionNotificationInput) SetConnectionNotificationId(v string) *ModifyVpcEndpointConnectionNotificationInput { - s.ConnectionNotificationId = &v +// SetOwnerId sets the OwnerId field's value. +func (s *NetworkAcl) SetOwnerId(v string) *NetworkAcl { + s.OwnerId = &v return s } -// SetDryRun sets the DryRun field's value. -func (s *ModifyVpcEndpointConnectionNotificationInput) SetDryRun(v bool) *ModifyVpcEndpointConnectionNotificationInput { - s.DryRun = &v +// SetTags sets the Tags field's value. +func (s *NetworkAcl) SetTags(v []*Tag) *NetworkAcl { + s.Tags = v return s } -type ModifyVpcEndpointConnectionNotificationOutput struct { +// SetVpcId sets the VpcId field's value. +func (s *NetworkAcl) SetVpcId(v string) *NetworkAcl { + s.VpcId = &v + return s +} + +// Describes an association between a network ACL and a subnet. +type NetworkAclAssociation struct { _ struct{} `type:"structure"` - // Returns true if the request succeeds; otherwise, it returns an error. - ReturnValue *bool `locationName:"return" type:"boolean"` + // The ID of the association between a network ACL and a subnet. + NetworkAclAssociationId *string `locationName:"networkAclAssociationId" type:"string"` + + // The ID of the network ACL. + NetworkAclId *string `locationName:"networkAclId" type:"string"` + + // The ID of the subnet. + SubnetId *string `locationName:"subnetId" type:"string"` } // String returns the string representation -func (s ModifyVpcEndpointConnectionNotificationOutput) String() string { +func (s NetworkAclAssociation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyVpcEndpointConnectionNotificationOutput) GoString() string { +func (s NetworkAclAssociation) GoString() string { return s.String() } -// SetReturnValue sets the ReturnValue field's value. -func (s *ModifyVpcEndpointConnectionNotificationOutput) SetReturnValue(v bool) *ModifyVpcEndpointConnectionNotificationOutput { - s.ReturnValue = &v +// SetNetworkAclAssociationId sets the NetworkAclAssociationId field's value. +func (s *NetworkAclAssociation) SetNetworkAclAssociationId(v string) *NetworkAclAssociation { + s.NetworkAclAssociationId = &v return s } -// Contains the parameters for ModifyVpcEndpoint. -type ModifyVpcEndpointInput struct { - _ struct{} `type:"structure"` - - // (Gateway endpoint) One or more route tables IDs to associate with the endpoint. - AddRouteTableIds []*string `locationName:"AddRouteTableId" locationNameList:"item" type:"list"` +// SetNetworkAclId sets the NetworkAclId field's value. +func (s *NetworkAclAssociation) SetNetworkAclId(v string) *NetworkAclAssociation { + s.NetworkAclId = &v + return s +} - // (Interface endpoint) One or more security group IDs to associate with the - // network interface. - AddSecurityGroupIds []*string `locationName:"AddSecurityGroupId" locationNameList:"item" type:"list"` +// SetSubnetId sets the SubnetId field's value. +func (s *NetworkAclAssociation) SetSubnetId(v string) *NetworkAclAssociation { + s.SubnetId = &v + return s +} - // (Interface endpoint) One or more subnet IDs in which to serve the endpoint. - AddSubnetIds []*string `locationName:"AddSubnetId" locationNameList:"item" type:"list"` +// Describes an entry in a network ACL. +type NetworkAclEntry 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 IPv4 network range to allow or deny, in CIDR notation. + CidrBlock *string `locationName:"cidrBlock" type:"string"` - // (Gateway endpoint) A policy document to attach to the endpoint. The policy - // must be in valid JSON format. - PolicyDocument *string `type:"string"` + // Indicates whether the rule is an egress rule (applied to traffic leaving + // the subnet). + Egress *bool `locationName:"egress" type:"boolean"` - // (Interface endpoint) Indicate whether a private hosted zone is associated - // with the VPC. - PrivateDnsEnabled *bool `type:"boolean"` + // ICMP protocol: The ICMP type and code. + IcmpTypeCode *IcmpTypeCode `locationName:"icmpTypeCode" type:"structure"` - // (Gateway endpoint) One or more route table IDs to disassociate from the endpoint. - RemoveRouteTableIds []*string `locationName:"RemoveRouteTableId" locationNameList:"item" type:"list"` + // The IPv6 network range to allow or deny, in CIDR notation. + Ipv6CidrBlock *string `locationName:"ipv6CidrBlock" type:"string"` - // (Interface endpoint) One or more security group IDs to disassociate from - // the network interface. - RemoveSecurityGroupIds []*string `locationName:"RemoveSecurityGroupId" locationNameList:"item" type:"list"` + // TCP or UDP protocols: The range of ports the rule applies to. + PortRange *PortRange `locationName:"portRange" type:"structure"` - // (Interface endpoint) One or more subnets IDs in which to remove the endpoint. - RemoveSubnetIds []*string `locationName:"RemoveSubnetId" locationNameList:"item" type:"list"` + // The protocol number. A value of "-1" means all protocols. + Protocol *string `locationName:"protocol" type:"string"` - // (Gateway endpoint) Specify true to reset the policy document to the default - // policy. The default policy allows full access to the service. - ResetPolicy *bool `type:"boolean"` + // Indicates whether to allow or deny the traffic that matches the rule. + RuleAction *string `locationName:"ruleAction" type:"string" enum:"RuleAction"` - // The ID of the endpoint. - // - // VpcEndpointId is a required field - VpcEndpointId *string `type:"string" required:"true"` + // The rule number for the entry. ACL entries are processed in ascending order + // by rule number. + RuleNumber *int64 `locationName:"ruleNumber" type:"integer"` } // String returns the string representation -func (s ModifyVpcEndpointInput) String() string { +func (s NetworkAclEntry) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyVpcEndpointInput) GoString() string { +func (s NetworkAclEntry) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyVpcEndpointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyVpcEndpointInput"} - if s.VpcEndpointId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcEndpointId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAddRouteTableIds sets the AddRouteTableIds field's value. -func (s *ModifyVpcEndpointInput) SetAddRouteTableIds(v []*string) *ModifyVpcEndpointInput { - s.AddRouteTableIds = v +// SetCidrBlock sets the CidrBlock field's value. +func (s *NetworkAclEntry) SetCidrBlock(v string) *NetworkAclEntry { + s.CidrBlock = &v return s } -// SetAddSecurityGroupIds sets the AddSecurityGroupIds field's value. -func (s *ModifyVpcEndpointInput) SetAddSecurityGroupIds(v []*string) *ModifyVpcEndpointInput { - s.AddSecurityGroupIds = v +// SetEgress sets the Egress field's value. +func (s *NetworkAclEntry) SetEgress(v bool) *NetworkAclEntry { + s.Egress = &v return s } -// SetAddSubnetIds sets the AddSubnetIds field's value. -func (s *ModifyVpcEndpointInput) SetAddSubnetIds(v []*string) *ModifyVpcEndpointInput { - s.AddSubnetIds = v +// SetIcmpTypeCode sets the IcmpTypeCode field's value. +func (s *NetworkAclEntry) SetIcmpTypeCode(v *IcmpTypeCode) *NetworkAclEntry { + s.IcmpTypeCode = v return s } -// SetDryRun sets the DryRun field's value. -func (s *ModifyVpcEndpointInput) SetDryRun(v bool) *ModifyVpcEndpointInput { - s.DryRun = &v +// SetIpv6CidrBlock sets the Ipv6CidrBlock field's value. +func (s *NetworkAclEntry) SetIpv6CidrBlock(v string) *NetworkAclEntry { + s.Ipv6CidrBlock = &v return s } -// SetPolicyDocument sets the PolicyDocument field's value. -func (s *ModifyVpcEndpointInput) SetPolicyDocument(v string) *ModifyVpcEndpointInput { - s.PolicyDocument = &v +// SetPortRange sets the PortRange field's value. +func (s *NetworkAclEntry) SetPortRange(v *PortRange) *NetworkAclEntry { + s.PortRange = v return s } -// SetPrivateDnsEnabled sets the PrivateDnsEnabled field's value. -func (s *ModifyVpcEndpointInput) SetPrivateDnsEnabled(v bool) *ModifyVpcEndpointInput { - s.PrivateDnsEnabled = &v +// SetProtocol sets the Protocol field's value. +func (s *NetworkAclEntry) SetProtocol(v string) *NetworkAclEntry { + s.Protocol = &v return s } -// SetRemoveRouteTableIds sets the RemoveRouteTableIds field's value. -func (s *ModifyVpcEndpointInput) SetRemoveRouteTableIds(v []*string) *ModifyVpcEndpointInput { - s.RemoveRouteTableIds = v +// SetRuleAction sets the RuleAction field's value. +func (s *NetworkAclEntry) SetRuleAction(v string) *NetworkAclEntry { + s.RuleAction = &v return s } -// SetRemoveSecurityGroupIds sets the RemoveSecurityGroupIds field's value. -func (s *ModifyVpcEndpointInput) SetRemoveSecurityGroupIds(v []*string) *ModifyVpcEndpointInput { - s.RemoveSecurityGroupIds = v +// SetRuleNumber sets the RuleNumber field's value. +func (s *NetworkAclEntry) SetRuleNumber(v int64) *NetworkAclEntry { + s.RuleNumber = &v return s } -// SetRemoveSubnetIds sets the RemoveSubnetIds field's value. -func (s *ModifyVpcEndpointInput) SetRemoveSubnetIds(v []*string) *ModifyVpcEndpointInput { - s.RemoveSubnetIds = v - return s -} +// Describes a network interface. +type NetworkInterface struct { + _ struct{} `type:"structure"` -// SetResetPolicy sets the ResetPolicy field's value. -func (s *ModifyVpcEndpointInput) SetResetPolicy(v bool) *ModifyVpcEndpointInput { - s.ResetPolicy = &v - return s -} + // The association information for an Elastic IP address (IPv4) associated with + // the network interface. + Association *NetworkInterfaceAssociation `locationName:"association" type:"structure"` -// SetVpcEndpointId sets the VpcEndpointId field's value. -func (s *ModifyVpcEndpointInput) SetVpcEndpointId(v string) *ModifyVpcEndpointInput { - s.VpcEndpointId = &v - return s -} + // The network interface attachment. + Attachment *NetworkInterfaceAttachment `locationName:"attachment" type:"structure"` -type ModifyVpcEndpointOutput struct { - _ struct{} `type:"structure"` + // The Availability Zone. + AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool `locationName:"return" type:"boolean"` -} + // A description. + Description *string `locationName:"description" type:"string"` -// String returns the string representation -func (s ModifyVpcEndpointOutput) String() string { - return awsutil.Prettify(s) -} + // Any security groups for the network interface. + Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` -// GoString returns the string representation -func (s ModifyVpcEndpointOutput) GoString() string { - return s.String() -} + // The type of interface. + InterfaceType *string `locationName:"interfaceType" type:"string" enum:"NetworkInterfaceType"` -// SetReturn sets the Return field's value. -func (s *ModifyVpcEndpointOutput) SetReturn(v bool) *ModifyVpcEndpointOutput { - s.Return = &v - return s -} + // The IPv6 addresses associated with the network interface. + Ipv6Addresses []*NetworkInterfaceIpv6Address `locationName:"ipv6AddressesSet" locationNameList:"item" type:"list"` -type ModifyVpcEndpointServiceConfigurationInput struct { - _ struct{} `type:"structure"` + // The MAC address. + MacAddress *string `locationName:"macAddress" type:"string"` - // Indicate whether requests to create an endpoint to your service must be accepted. - AcceptanceRequired *bool `type:"boolean"` + // The ID of the network interface. + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` - // The Amazon Resource Names (ARNs) of Network Load Balancers to add to your - // service configuration. - AddNetworkLoadBalancerArns []*string `locationName:"AddNetworkLoadBalancerArn" locationNameList:"item" type:"list"` + // The AWS account ID of the owner of the network interface. + OwnerId *string `locationName:"ownerId" 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 private DNS name. + PrivateDnsName *string `locationName:"privateDnsName" type:"string"` - // The Amazon Resource Names (ARNs) of Network Load Balancers to remove from - // your service configuration. - RemoveNetworkLoadBalancerArns []*string `locationName:"RemoveNetworkLoadBalancerArn" locationNameList:"item" type:"list"` + // The IPv4 address of the network interface within the subnet. + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` - // The ID of the service. - // - // ServiceId is a required field - ServiceId *string `type:"string" required:"true"` + // 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). + RequesterId *string `locationName:"requesterId" type:"string"` + + // Indicates whether the network interface is being managed by AWS. + RequesterManaged *bool `locationName:"requesterManaged" type:"boolean"` + + // Indicates whether traffic to or from the instance is validated. + SourceDestCheck *bool `locationName:"sourceDestCheck" type:"boolean"` + + // The status of the network interface. + Status *string `locationName:"status" type:"string" enum:"NetworkInterfaceStatus"` + + // The ID of the subnet. + SubnetId *string `locationName:"subnetId" type:"string"` + + // Any tags assigned to the network interface. + TagSet []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + + // The ID of the VPC. + VpcId *string `locationName:"vpcId" type:"string"` } // String returns the string representation -func (s ModifyVpcEndpointServiceConfigurationInput) String() string { +func (s NetworkInterface) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyVpcEndpointServiceConfigurationInput) GoString() string { +func (s NetworkInterface) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyVpcEndpointServiceConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyVpcEndpointServiceConfigurationInput"} - if s.ServiceId == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAcceptanceRequired sets the AcceptanceRequired field's value. -func (s *ModifyVpcEndpointServiceConfigurationInput) SetAcceptanceRequired(v bool) *ModifyVpcEndpointServiceConfigurationInput { - s.AcceptanceRequired = &v +// SetAssociation sets the Association field's value. +func (s *NetworkInterface) SetAssociation(v *NetworkInterfaceAssociation) *NetworkInterface { + s.Association = v return s } -// SetAddNetworkLoadBalancerArns sets the AddNetworkLoadBalancerArns field's value. -func (s *ModifyVpcEndpointServiceConfigurationInput) SetAddNetworkLoadBalancerArns(v []*string) *ModifyVpcEndpointServiceConfigurationInput { - s.AddNetworkLoadBalancerArns = v +// SetAttachment sets the Attachment field's value. +func (s *NetworkInterface) SetAttachment(v *NetworkInterfaceAttachment) *NetworkInterface { + s.Attachment = v return s } -// SetDryRun sets the DryRun field's value. -func (s *ModifyVpcEndpointServiceConfigurationInput) SetDryRun(v bool) *ModifyVpcEndpointServiceConfigurationInput { - s.DryRun = &v +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *NetworkInterface) SetAvailabilityZone(v string) *NetworkInterface { + s.AvailabilityZone = &v return s } -// SetRemoveNetworkLoadBalancerArns sets the RemoveNetworkLoadBalancerArns field's value. -func (s *ModifyVpcEndpointServiceConfigurationInput) SetRemoveNetworkLoadBalancerArns(v []*string) *ModifyVpcEndpointServiceConfigurationInput { - s.RemoveNetworkLoadBalancerArns = v +// SetDescription sets the Description field's value. +func (s *NetworkInterface) SetDescription(v string) *NetworkInterface { + s.Description = &v return s } -// SetServiceId sets the ServiceId field's value. -func (s *ModifyVpcEndpointServiceConfigurationInput) SetServiceId(v string) *ModifyVpcEndpointServiceConfigurationInput { - s.ServiceId = &v +// SetGroups sets the Groups field's value. +func (s *NetworkInterface) SetGroups(v []*GroupIdentifier) *NetworkInterface { + s.Groups = v return s } -type ModifyVpcEndpointServiceConfigurationOutput 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 ModifyVpcEndpointServiceConfigurationOutput) String() string { - return awsutil.Prettify(s) +// SetInterfaceType sets the InterfaceType field's value. +func (s *NetworkInterface) SetInterfaceType(v string) *NetworkInterface { + s.InterfaceType = &v + return s } -// GoString returns the string representation -func (s ModifyVpcEndpointServiceConfigurationOutput) GoString() string { - return s.String() +// SetIpv6Addresses sets the Ipv6Addresses field's value. +func (s *NetworkInterface) SetIpv6Addresses(v []*NetworkInterfaceIpv6Address) *NetworkInterface { + s.Ipv6Addresses = v + return s } -// SetReturn sets the Return field's value. -func (s *ModifyVpcEndpointServiceConfigurationOutput) SetReturn(v bool) *ModifyVpcEndpointServiceConfigurationOutput { - s.Return = &v +// SetMacAddress sets the MacAddress field's value. +func (s *NetworkInterface) SetMacAddress(v string) *NetworkInterface { + s.MacAddress = &v return s } -type ModifyVpcEndpointServicePermissionsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Names (ARN) of one or more principals. Permissions are - // granted to the principals in this list. To grant permissions to all principals, - // specify an asterisk (*). - AddAllowedPrincipals []*string `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"` - - // The Amazon Resource Names (ARN) of one or more principals. Permissions are - // revoked for principals in this list. - RemoveAllowedPrincipals []*string `locationNameList:"item" type:"list"` - - // The ID of the service. - // - // ServiceId is a required field - ServiceId *string `type:"string" required:"true"` +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *NetworkInterface) SetNetworkInterfaceId(v string) *NetworkInterface { + s.NetworkInterfaceId = &v + return s } -// String returns the string representation -func (s ModifyVpcEndpointServicePermissionsInput) String() string { - return awsutil.Prettify(s) +// SetOwnerId sets the OwnerId field's value. +func (s *NetworkInterface) SetOwnerId(v string) *NetworkInterface { + s.OwnerId = &v + return s } -// GoString returns the string representation -func (s ModifyVpcEndpointServicePermissionsInput) GoString() string { - return s.String() +// SetPrivateDnsName sets the PrivateDnsName field's value. +func (s *NetworkInterface) SetPrivateDnsName(v string) *NetworkInterface { + s.PrivateDnsName = &v + return s } -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyVpcEndpointServicePermissionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyVpcEndpointServicePermissionsInput"} - if s.ServiceId == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetPrivateIpAddress sets the PrivateIpAddress field's value. +func (s *NetworkInterface) SetPrivateIpAddress(v string) *NetworkInterface { + s.PrivateIpAddress = &v + return s } -// SetAddAllowedPrincipals sets the AddAllowedPrincipals field's value. -func (s *ModifyVpcEndpointServicePermissionsInput) SetAddAllowedPrincipals(v []*string) *ModifyVpcEndpointServicePermissionsInput { - s.AddAllowedPrincipals = v +// SetPrivateIpAddresses sets the PrivateIpAddresses field's value. +func (s *NetworkInterface) SetPrivateIpAddresses(v []*NetworkInterfacePrivateIpAddress) *NetworkInterface { + s.PrivateIpAddresses = v return s } -// SetDryRun sets the DryRun field's value. -func (s *ModifyVpcEndpointServicePermissionsInput) SetDryRun(v bool) *ModifyVpcEndpointServicePermissionsInput { - s.DryRun = &v +// SetRequesterId sets the RequesterId field's value. +func (s *NetworkInterface) SetRequesterId(v string) *NetworkInterface { + s.RequesterId = &v return s } -// SetRemoveAllowedPrincipals sets the RemoveAllowedPrincipals field's value. -func (s *ModifyVpcEndpointServicePermissionsInput) SetRemoveAllowedPrincipals(v []*string) *ModifyVpcEndpointServicePermissionsInput { - s.RemoveAllowedPrincipals = v +// SetRequesterManaged sets the RequesterManaged field's value. +func (s *NetworkInterface) SetRequesterManaged(v bool) *NetworkInterface { + s.RequesterManaged = &v return s } -// SetServiceId sets the ServiceId field's value. -func (s *ModifyVpcEndpointServicePermissionsInput) SetServiceId(v string) *ModifyVpcEndpointServicePermissionsInput { - s.ServiceId = &v +// SetSourceDestCheck sets the SourceDestCheck field's value. +func (s *NetworkInterface) SetSourceDestCheck(v bool) *NetworkInterface { + s.SourceDestCheck = &v return s } -type ModifyVpcEndpointServicePermissionsOutput struct { - _ struct{} `type:"structure"` - - // Returns true if the request succeeds; otherwise, it returns an error. - ReturnValue *bool `locationName:"return" type:"boolean"` +// SetStatus sets the Status field's value. +func (s *NetworkInterface) SetStatus(v string) *NetworkInterface { + s.Status = &v + return s } -// String returns the string representation -func (s ModifyVpcEndpointServicePermissionsOutput) String() string { - return awsutil.Prettify(s) +// SetSubnetId sets the SubnetId field's value. +func (s *NetworkInterface) SetSubnetId(v string) *NetworkInterface { + s.SubnetId = &v + return s } -// GoString returns the string representation -func (s ModifyVpcEndpointServicePermissionsOutput) GoString() string { - return s.String() +// SetTagSet sets the TagSet field's value. +func (s *NetworkInterface) SetTagSet(v []*Tag) *NetworkInterface { + s.TagSet = v + return s } -// SetReturnValue sets the ReturnValue field's value. -func (s *ModifyVpcEndpointServicePermissionsOutput) SetReturnValue(v bool) *ModifyVpcEndpointServicePermissionsOutput { - s.ReturnValue = &v +// SetVpcId sets the VpcId field's value. +func (s *NetworkInterface) SetVpcId(v string) *NetworkInterface { + s.VpcId = &v return s } -type ModifyVpcPeeringConnectionOptionsInput struct { +// Describes association information for an Elastic IP address (IPv4 only). +type NetworkInterfaceAssociation struct { _ struct{} `type:"structure"` - // The VPC peering connection options for the accepter VPC. - AccepterPeeringConnectionOptions *PeeringConnectionOptionsRequest `type:"structure"` + // The allocation ID. + AllocationId *string `locationName:"allocationId" type:"string"` - // Checks whether you have the required permissions for the operation, 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 association ID. + AssociationId *string `locationName:"associationId" type:"string"` - // The VPC peering connection options for the requester VPC. - RequesterPeeringConnectionOptions *PeeringConnectionOptionsRequest `type:"structure"` + // The ID of the Elastic IP address owner. + IpOwnerId *string `locationName:"ipOwnerId" type:"string"` - // The ID of the VPC peering connection. - // - // VpcPeeringConnectionId is a required field - VpcPeeringConnectionId *string `type:"string" required:"true"` + // The public DNS name. + PublicDnsName *string `locationName:"publicDnsName" type:"string"` + + // The address of the Elastic IP address bound to the network interface. + PublicIp *string `locationName:"publicIp" type:"string"` } // String returns the string representation -func (s ModifyVpcPeeringConnectionOptionsInput) String() string { +func (s NetworkInterfaceAssociation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyVpcPeeringConnectionOptionsInput) GoString() string { +func (s NetworkInterfaceAssociation) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyVpcPeeringConnectionOptionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyVpcPeeringConnectionOptionsInput"} - if s.VpcPeeringConnectionId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcPeeringConnectionId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetAllocationId sets the AllocationId field's value. +func (s *NetworkInterfaceAssociation) SetAllocationId(v string) *NetworkInterfaceAssociation { + s.AllocationId = &v + return s } -// SetAccepterPeeringConnectionOptions sets the AccepterPeeringConnectionOptions field's value. -func (s *ModifyVpcPeeringConnectionOptionsInput) SetAccepterPeeringConnectionOptions(v *PeeringConnectionOptionsRequest) *ModifyVpcPeeringConnectionOptionsInput { - s.AccepterPeeringConnectionOptions = v +// SetAssociationId sets the AssociationId field's value. +func (s *NetworkInterfaceAssociation) SetAssociationId(v string) *NetworkInterfaceAssociation { + s.AssociationId = &v return s } -// SetDryRun sets the DryRun field's value. -func (s *ModifyVpcPeeringConnectionOptionsInput) SetDryRun(v bool) *ModifyVpcPeeringConnectionOptionsInput { - s.DryRun = &v +// SetIpOwnerId sets the IpOwnerId field's value. +func (s *NetworkInterfaceAssociation) SetIpOwnerId(v string) *NetworkInterfaceAssociation { + s.IpOwnerId = &v return s } -// SetRequesterPeeringConnectionOptions sets the RequesterPeeringConnectionOptions field's value. -func (s *ModifyVpcPeeringConnectionOptionsInput) SetRequesterPeeringConnectionOptions(v *PeeringConnectionOptionsRequest) *ModifyVpcPeeringConnectionOptionsInput { - s.RequesterPeeringConnectionOptions = v +// SetPublicDnsName sets the PublicDnsName field's value. +func (s *NetworkInterfaceAssociation) SetPublicDnsName(v string) *NetworkInterfaceAssociation { + s.PublicDnsName = &v return s } -// SetVpcPeeringConnectionId sets the VpcPeeringConnectionId field's value. -func (s *ModifyVpcPeeringConnectionOptionsInput) SetVpcPeeringConnectionId(v string) *ModifyVpcPeeringConnectionOptionsInput { - s.VpcPeeringConnectionId = &v +// SetPublicIp sets the PublicIp field's value. +func (s *NetworkInterfaceAssociation) SetPublicIp(v string) *NetworkInterfaceAssociation { + s.PublicIp = &v return s } -type ModifyVpcPeeringConnectionOptionsOutput struct { +// Describes a network interface attachment. +type NetworkInterfaceAttachment struct { _ struct{} `type:"structure"` - // Information about the VPC peering connection options for the accepter VPC. - AccepterPeeringConnectionOptions *PeeringConnectionOptions `locationName:"accepterPeeringConnectionOptions" type:"structure"` - - // Information about the VPC peering connection options for the requester VPC. - RequesterPeeringConnectionOptions *PeeringConnectionOptions `locationName:"requesterPeeringConnectionOptions" type:"structure"` -} - -// String returns the string representation -func (s ModifyVpcPeeringConnectionOptionsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ModifyVpcPeeringConnectionOptionsOutput) GoString() string { - return s.String() -} + // The timestamp indicating when the attachment initiated. + AttachTime *time.Time `locationName:"attachTime" type:"timestamp"` -// SetAccepterPeeringConnectionOptions sets the AccepterPeeringConnectionOptions field's value. -func (s *ModifyVpcPeeringConnectionOptionsOutput) SetAccepterPeeringConnectionOptions(v *PeeringConnectionOptions) *ModifyVpcPeeringConnectionOptionsOutput { - s.AccepterPeeringConnectionOptions = v - return s -} + // The ID of the network interface attachment. + AttachmentId *string `locationName:"attachmentId" type:"string"` -// SetRequesterPeeringConnectionOptions sets the RequesterPeeringConnectionOptions field's value. -func (s *ModifyVpcPeeringConnectionOptionsOutput) SetRequesterPeeringConnectionOptions(v *PeeringConnectionOptions) *ModifyVpcPeeringConnectionOptionsOutput { - s.RequesterPeeringConnectionOptions = v - return s -} + // Indicates whether the network interface is deleted when the instance is terminated. + DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` -// Contains the parameters for ModifyVpcTenancy. -type ModifyVpcTenancyInput struct { - _ struct{} `type:"structure"` + // The device index of the network interface attachment on the instance. + DeviceIndex *int64 `locationName:"deviceIndex" type:"integer"` - // Checks whether you have the required permissions for the operation, 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. + InstanceId *string `locationName:"instanceId" type:"string"` - // The instance tenancy attribute for the VPC. - // - // InstanceTenancy is a required field - InstanceTenancy *string `type:"string" required:"true" enum:"VpcTenancy"` + // The AWS account ID of the owner of the instance. + InstanceOwnerId *string `locationName:"instanceOwnerId" type:"string"` - // The ID of the VPC. - // - // VpcId is a required field - VpcId *string `type:"string" required:"true"` + // The attachment state. + Status *string `locationName:"status" type:"string" enum:"AttachmentStatus"` } // String returns the string representation -func (s ModifyVpcTenancyInput) String() string { +func (s NetworkInterfaceAttachment) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ModifyVpcTenancyInput) GoString() string { +func (s NetworkInterfaceAttachment) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyVpcTenancyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyVpcTenancyInput"} - if s.InstanceTenancy == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceTenancy")) - } - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *ModifyVpcTenancyInput) SetDryRun(v bool) *ModifyVpcTenancyInput { - s.DryRun = &v +// SetAttachTime sets the AttachTime field's value. +func (s *NetworkInterfaceAttachment) SetAttachTime(v time.Time) *NetworkInterfaceAttachment { + s.AttachTime = &v return s } -// SetInstanceTenancy sets the InstanceTenancy field's value. -func (s *ModifyVpcTenancyInput) SetInstanceTenancy(v string) *ModifyVpcTenancyInput { - s.InstanceTenancy = &v +// SetAttachmentId sets the AttachmentId field's value. +func (s *NetworkInterfaceAttachment) SetAttachmentId(v string) *NetworkInterfaceAttachment { + s.AttachmentId = &v return s } -// SetVpcId sets the VpcId field's value. -func (s *ModifyVpcTenancyInput) SetVpcId(v string) *ModifyVpcTenancyInput { - s.VpcId = &v +// SetDeleteOnTermination sets the DeleteOnTermination field's value. +func (s *NetworkInterfaceAttachment) SetDeleteOnTermination(v bool) *NetworkInterfaceAttachment { + s.DeleteOnTermination = &v return s } -// Contains the output of ModifyVpcTenancy. -type ModifyVpcTenancyOutput struct { - _ struct{} `type:"structure"` - - // Returns true if the request succeeds; otherwise, returns an error. - ReturnValue *bool `locationName:"return" type:"boolean"` +// SetDeviceIndex sets the DeviceIndex field's value. +func (s *NetworkInterfaceAttachment) SetDeviceIndex(v int64) *NetworkInterfaceAttachment { + s.DeviceIndex = &v + return s } -// String returns the string representation -func (s ModifyVpcTenancyOutput) String() string { - return awsutil.Prettify(s) +// SetInstanceId sets the InstanceId field's value. +func (s *NetworkInterfaceAttachment) SetInstanceId(v string) *NetworkInterfaceAttachment { + s.InstanceId = &v + return s } -// GoString returns the string representation -func (s ModifyVpcTenancyOutput) GoString() string { - return s.String() +// SetInstanceOwnerId sets the InstanceOwnerId field's value. +func (s *NetworkInterfaceAttachment) SetInstanceOwnerId(v string) *NetworkInterfaceAttachment { + s.InstanceOwnerId = &v + return s } -// SetReturnValue sets the ReturnValue field's value. -func (s *ModifyVpcTenancyOutput) SetReturnValue(v bool) *ModifyVpcTenancyOutput { - s.ReturnValue = &v +// SetStatus sets the Status field's value. +func (s *NetworkInterfaceAttachment) SetStatus(v string) *NetworkInterfaceAttachment { + s.Status = &v return s } -// Contains the parameters for MonitorInstances. -type MonitorInstancesInput struct { +// Describes an attachment change. +type NetworkInterfaceAttachmentChanges 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 `locationName:"dryRun" type:"boolean"` + // The ID of the network interface attachment. + AttachmentId *string `locationName:"attachmentId" type:"string"` - // One or more instance IDs. - // - // InstanceIds is a required field - InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"` + // Indicates whether the network interface is deleted when the instance is terminated. + DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` } // String returns the string representation -func (s MonitorInstancesInput) String() string { +func (s NetworkInterfaceAttachmentChanges) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s MonitorInstancesInput) GoString() string { +func (s NetworkInterfaceAttachmentChanges) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *MonitorInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MonitorInstancesInput"} - if s.InstanceIds == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceIds")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *MonitorInstancesInput) SetDryRun(v bool) *MonitorInstancesInput { - s.DryRun = &v +// SetAttachmentId sets the AttachmentId field's value. +func (s *NetworkInterfaceAttachmentChanges) SetAttachmentId(v string) *NetworkInterfaceAttachmentChanges { + s.AttachmentId = &v return s } -// SetInstanceIds sets the InstanceIds field's value. -func (s *MonitorInstancesInput) SetInstanceIds(v []*string) *MonitorInstancesInput { - s.InstanceIds = v +// SetDeleteOnTermination sets the DeleteOnTermination field's value. +func (s *NetworkInterfaceAttachmentChanges) SetDeleteOnTermination(v bool) *NetworkInterfaceAttachmentChanges { + s.DeleteOnTermination = &v return s } -// Contains the output of MonitorInstances. -type MonitorInstancesOutput struct { +// Describes an IPv6 address associated with a network interface. +type NetworkInterfaceIpv6Address struct { _ struct{} `type:"structure"` - // The monitoring information. - InstanceMonitorings []*InstanceMonitoring `locationName:"instancesSet" locationNameList:"item" type:"list"` + // The IPv6 address. + Ipv6Address *string `locationName:"ipv6Address" type:"string"` } // String returns the string representation -func (s MonitorInstancesOutput) String() string { +func (s NetworkInterfaceIpv6Address) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s MonitorInstancesOutput) GoString() string { +func (s NetworkInterfaceIpv6Address) GoString() string { return s.String() } -// SetInstanceMonitorings sets the InstanceMonitorings field's value. -func (s *MonitorInstancesOutput) SetInstanceMonitorings(v []*InstanceMonitoring) *MonitorInstancesOutput { - s.InstanceMonitorings = v +// SetIpv6Address sets the Ipv6Address field's value. +func (s *NetworkInterfaceIpv6Address) SetIpv6Address(v string) *NetworkInterfaceIpv6Address { + s.Ipv6Address = &v return s } -// Describes the monitoring of an instance. -type Monitoring struct { +// Describes a permission for a network interface. +type NetworkInterfacePermission struct { _ struct{} `type:"structure"` - // Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring - // is enabled. - State *string `locationName:"state" type:"string" enum:"MonitoringState"` -} - -// String returns the string representation -func (s Monitoring) String() string { - return awsutil.Prettify(s) -} + // The AWS account ID. + AwsAccountId *string `locationName:"awsAccountId" type:"string"` -// GoString returns the string representation -func (s Monitoring) GoString() string { - return s.String() -} + // The AWS service. + AwsService *string `locationName:"awsService" type:"string"` -// SetState sets the State field's value. -func (s *Monitoring) SetState(v string) *Monitoring { - s.State = &v - return s -} + // The ID of the network interface. + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` -// Contains the parameters for MoveAddressToVpc. -type MoveAddressToVpcInput struct { - _ struct{} `type:"structure"` + // The ID of the network interface permission. + NetworkInterfacePermissionId *string `locationName:"networkInterfacePermissionId" 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 `locationName:"dryRun" type:"boolean"` + // The type of permission. + Permission *string `locationName:"permission" type:"string" enum:"InterfacePermissionType"` - // The Elastic IP address. - // - // PublicIp is a required field - PublicIp *string `locationName:"publicIp" type:"string" required:"true"` + // Information about the state of the permission. + PermissionState *NetworkInterfacePermissionState `locationName:"permissionState" type:"structure"` } // String returns the string representation -func (s MoveAddressToVpcInput) String() string { +func (s NetworkInterfacePermission) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s MoveAddressToVpcInput) GoString() string { +func (s NetworkInterfacePermission) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *MoveAddressToVpcInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "MoveAddressToVpcInput"} - if s.PublicIp == nil { - invalidParams.Add(request.NewErrParamRequired("PublicIp")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDryRun sets the DryRun field's value. -func (s *MoveAddressToVpcInput) SetDryRun(v bool) *MoveAddressToVpcInput { - s.DryRun = &v +// SetAwsAccountId sets the AwsAccountId field's value. +func (s *NetworkInterfacePermission) SetAwsAccountId(v string) *NetworkInterfacePermission { + s.AwsAccountId = &v return s } -// SetPublicIp sets the PublicIp field's value. -func (s *MoveAddressToVpcInput) SetPublicIp(v string) *MoveAddressToVpcInput { - s.PublicIp = &v +// SetAwsService sets the AwsService field's value. +func (s *NetworkInterfacePermission) SetAwsService(v string) *NetworkInterfacePermission { + s.AwsService = &v return s } -// Contains the output of MoveAddressToVpc. -type MoveAddressToVpcOutput struct { - _ struct{} `type:"structure"` - - // The allocation ID for the Elastic IP address. - AllocationId *string `locationName:"allocationId" type:"string"` - - // The status of the move of the IP address. - Status *string `locationName:"status" type:"string" enum:"Status"` -} - -// String returns the string representation -func (s MoveAddressToVpcOutput) String() string { - return awsutil.Prettify(s) +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *NetworkInterfacePermission) SetNetworkInterfaceId(v string) *NetworkInterfacePermission { + s.NetworkInterfaceId = &v + return s } -// GoString returns the string representation -func (s MoveAddressToVpcOutput) GoString() string { - return s.String() +// SetNetworkInterfacePermissionId sets the NetworkInterfacePermissionId field's value. +func (s *NetworkInterfacePermission) SetNetworkInterfacePermissionId(v string) *NetworkInterfacePermission { + s.NetworkInterfacePermissionId = &v + return s } -// SetAllocationId sets the AllocationId field's value. -func (s *MoveAddressToVpcOutput) SetAllocationId(v string) *MoveAddressToVpcOutput { - s.AllocationId = &v +// SetPermission sets the Permission field's value. +func (s *NetworkInterfacePermission) SetPermission(v string) *NetworkInterfacePermission { + s.Permission = &v return s } -// SetStatus sets the Status field's value. -func (s *MoveAddressToVpcOutput) SetStatus(v string) *MoveAddressToVpcOutput { - s.Status = &v +// SetPermissionState sets the PermissionState field's value. +func (s *NetworkInterfacePermission) SetPermissionState(v *NetworkInterfacePermissionState) *NetworkInterfacePermission { + s.PermissionState = v return s } -// Describes the status of a moving Elastic IP address. -type MovingAddressStatus struct { +// Describes the state of a network interface permission. +type NetworkInterfacePermissionState struct { _ struct{} `type:"structure"` - // The status of the Elastic IP address that's being moved to the EC2-VPC platform, - // or restored to the EC2-Classic platform. - MoveStatus *string `locationName:"moveStatus" type:"string" enum:"MoveStatus"` + // The state of the permission. + State *string `locationName:"state" type:"string" enum:"NetworkInterfacePermissionStateCode"` - // The Elastic IP address. - PublicIp *string `locationName:"publicIp" type:"string"` + // A status message, if applicable. + StatusMessage *string `locationName:"statusMessage" type:"string"` } // String returns the string representation -func (s MovingAddressStatus) String() string { +func (s NetworkInterfacePermissionState) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s MovingAddressStatus) GoString() string { +func (s NetworkInterfacePermissionState) GoString() string { return s.String() } -// SetMoveStatus sets the MoveStatus field's value. -func (s *MovingAddressStatus) SetMoveStatus(v string) *MovingAddressStatus { - s.MoveStatus = &v - return s -} - -// SetPublicIp sets the PublicIp field's value. -func (s *MovingAddressStatus) SetPublicIp(v string) *MovingAddressStatus { - s.PublicIp = &v +// SetState sets the State field's value. +func (s *NetworkInterfacePermissionState) SetState(v string) *NetworkInterfacePermissionState { + s.State = &v return s } -// Describes a NAT gateway. -type NatGateway struct { - _ struct{} `type:"structure"` - - // The date and time the NAT gateway was created. - CreateTime *time.Time `locationName:"createTime" type:"timestamp"` - - // The date and time the NAT gateway was deleted, if applicable. - DeleteTime *time.Time `locationName:"deleteTime" type:"timestamp"` - - // If the NAT gateway could not be created, specifies the error code for the - // failure. (InsufficientFreeAddressesInSubnet | Gateway.NotAttached | InvalidAllocationID.NotFound - // | Resource.AlreadyAssociated | InternalError | InvalidSubnetID.NotFound) - FailureCode *string `locationName:"failureCode" type:"string"` - - // If the NAT gateway could not be created, specifies the error message for - // the failure, that corresponds to the error code. - // - // * For InsufficientFreeAddressesInSubnet: "Subnet has insufficient free - // addresses to create this NAT gateway" - // - // * For Gateway.NotAttached: "Network vpc-xxxxxxxx has no Internet gateway - // attached" - // - // * For InvalidAllocationID.NotFound: "Elastic IP address eipalloc-xxxxxxxx - // could not be associated with this NAT gateway" - // - // * For Resource.AlreadyAssociated: "Elastic IP address eipalloc-xxxxxxxx - // is already associated" - // - // * For InternalError: "Network interface eni-xxxxxxxx, created and used - // internally by this NAT gateway is in an invalid state. Please try again." - // - // * For InvalidSubnetID.NotFound: "The specified subnet subnet-xxxxxxxx - // does not exist or could not be found." - FailureMessage *string `locationName:"failureMessage" type:"string"` - - // Information about the IP addresses and network interface associated with - // the NAT gateway. - NatGatewayAddresses []*NatGatewayAddress `locationName:"natGatewayAddressSet" locationNameList:"item" type:"list"` - - // The ID of the NAT gateway. - NatGatewayId *string `locationName:"natGatewayId" type:"string"` - - // Reserved. If you need to sustain traffic greater than the documented limits - // (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), - // contact us through the Support Center (https://console.aws.amazon.com/support/home?). - ProvisionedBandwidth *ProvisionedBandwidth `locationName:"provisionedBandwidth" type:"structure"` - - // The state of the NAT gateway. - // - // * pending: The NAT gateway is being created and is not ready to process - // traffic. - // - // * failed: The NAT gateway could not be created. Check the failureCode - // and failureMessage fields for the reason. - // - // * available: The NAT gateway is able to process traffic. This status remains - // until you delete the NAT gateway, and does not indicate the health of - // the NAT gateway. - // - // * deleting: The NAT gateway is in the process of being terminated and - // may still be processing traffic. - // - // * deleted: The NAT gateway has been terminated and is no longer processing - // traffic. - State *string `locationName:"state" type:"string" enum:"NatGatewayState"` +// SetStatusMessage sets the StatusMessage field's value. +func (s *NetworkInterfacePermissionState) SetStatusMessage(v string) *NetworkInterfacePermissionState { + s.StatusMessage = &v + return s +} - // The ID of the subnet in which the NAT gateway is located. - SubnetId *string `locationName:"subnetId" type:"string"` +// Describes the private IPv4 address of a network interface. +type NetworkInterfacePrivateIpAddress struct { + _ struct{} `type:"structure"` - // The tags for the NAT gateway. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + // The association information for an Elastic IP address (IPv4) associated with + // the network interface. + Association *NetworkInterfaceAssociation `locationName:"association" type:"structure"` - // The ID of the VPC in which the NAT gateway is located. - VpcId *string `locationName:"vpcId" type:"string"` + // Indicates whether this IPv4 address is the primary private IPv4 address of + // the network interface. + Primary *bool `locationName:"primary" type:"boolean"` + + // The private DNS name. + PrivateDnsName *string `locationName:"privateDnsName" type:"string"` + + // The private IPv4 address. + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` } // String returns the string representation -func (s NatGateway) String() string { +func (s NetworkInterfacePrivateIpAddress) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s NatGateway) GoString() string { +func (s NetworkInterfacePrivateIpAddress) GoString() string { return s.String() } -// SetCreateTime sets the CreateTime field's value. -func (s *NatGateway) SetCreateTime(v time.Time) *NatGateway { - s.CreateTime = &v +// SetAssociation sets the Association field's value. +func (s *NetworkInterfacePrivateIpAddress) SetAssociation(v *NetworkInterfaceAssociation) *NetworkInterfacePrivateIpAddress { + s.Association = v return s } -// SetDeleteTime sets the DeleteTime field's value. -func (s *NatGateway) SetDeleteTime(v time.Time) *NatGateway { - s.DeleteTime = &v +// SetPrimary sets the Primary field's value. +func (s *NetworkInterfacePrivateIpAddress) SetPrimary(v bool) *NetworkInterfacePrivateIpAddress { + s.Primary = &v return s } -// SetFailureCode sets the FailureCode field's value. -func (s *NatGateway) SetFailureCode(v string) *NatGateway { - s.FailureCode = &v +// SetPrivateDnsName sets the PrivateDnsName field's value. +func (s *NetworkInterfacePrivateIpAddress) SetPrivateDnsName(v string) *NetworkInterfacePrivateIpAddress { + s.PrivateDnsName = &v return s } -// SetFailureMessage sets the FailureMessage field's value. -func (s *NatGateway) SetFailureMessage(v string) *NatGateway { - s.FailureMessage = &v +// SetPrivateIpAddress sets the PrivateIpAddress field's value. +func (s *NetworkInterfacePrivateIpAddress) SetPrivateIpAddress(v string) *NetworkInterfacePrivateIpAddress { + s.PrivateIpAddress = &v return s } -// SetNatGatewayAddresses sets the NatGatewayAddresses field's value. -func (s *NatGateway) SetNatGatewayAddresses(v []*NatGatewayAddress) *NatGateway { - s.NatGatewayAddresses = v - return s +type NewDhcpConfiguration struct { + _ struct{} `type:"structure"` + + Key *string `locationName:"key" type:"string"` + + Values []*string `locationName:"Value" locationNameList:"item" type:"list"` } -// SetNatGatewayId sets the NatGatewayId field's value. -func (s *NatGateway) SetNatGatewayId(v string) *NatGateway { - s.NatGatewayId = &v +// String returns the string representation +func (s NewDhcpConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NewDhcpConfiguration) GoString() string { + return s.String() +} + +// SetKey sets the Key field's value. +func (s *NewDhcpConfiguration) SetKey(v string) *NewDhcpConfiguration { + s.Key = &v return s } -// SetProvisionedBandwidth sets the ProvisionedBandwidth field's value. -func (s *NatGateway) SetProvisionedBandwidth(v *ProvisionedBandwidth) *NatGateway { - s.ProvisionedBandwidth = v +// SetValues sets the Values field's value. +func (s *NewDhcpConfiguration) SetValues(v []*string) *NewDhcpConfiguration { + s.Values = v return s } -// SetState sets the State field's value. -func (s *NatGateway) SetState(v string) *NatGateway { - s.State = &v +// The allocation strategy of On-Demand Instances in an EC2 Fleet. +type OnDemandOptions struct { + _ struct{} `type:"structure"` + + // The order of the launch template overrides to use in fulfilling On-Demand + // capacity. If you specify lowest-price, EC2 Fleet uses price to determine + // the order, launching the lowest price first. If you specify prioritized, + // EC2 Fleet uses the priority that you assigned to each launch template override, + // launching the highest priority first. If you do not specify a value, EC2 + // Fleet defaults to lowest-price. + AllocationStrategy *string `locationName:"allocationStrategy" type:"string" enum:"FleetOnDemandAllocationStrategy"` + + // The minimum target capacity for On-Demand Instances in the fleet. If the + // minimum target capacity is not reached, the fleet launches no instances. + MinTargetCapacity *int64 `locationName:"minTargetCapacity" type:"integer"` + + // Indicates that the fleet launches all On-Demand Instances into a single Availability + // Zone. + SingleAvailabilityZone *bool `locationName:"singleAvailabilityZone" type:"boolean"` + + // Indicates that the fleet uses a single instance type to launch all On-Demand + // Instances in the fleet. + SingleInstanceType *bool `locationName:"singleInstanceType" type:"boolean"` +} + +// String returns the string representation +func (s OnDemandOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OnDemandOptions) GoString() string { + return s.String() +} + +// SetAllocationStrategy sets the AllocationStrategy field's value. +func (s *OnDemandOptions) SetAllocationStrategy(v string) *OnDemandOptions { + s.AllocationStrategy = &v return s } -// SetSubnetId sets the SubnetId field's value. -func (s *NatGateway) SetSubnetId(v string) *NatGateway { - s.SubnetId = &v +// SetMinTargetCapacity sets the MinTargetCapacity field's value. +func (s *OnDemandOptions) SetMinTargetCapacity(v int64) *OnDemandOptions { + s.MinTargetCapacity = &v return s } -// SetTags sets the Tags field's value. -func (s *NatGateway) SetTags(v []*Tag) *NatGateway { - s.Tags = v +// SetSingleAvailabilityZone sets the SingleAvailabilityZone field's value. +func (s *OnDemandOptions) SetSingleAvailabilityZone(v bool) *OnDemandOptions { + s.SingleAvailabilityZone = &v return s } -// SetVpcId sets the VpcId field's value. -func (s *NatGateway) SetVpcId(v string) *NatGateway { - s.VpcId = &v +// SetSingleInstanceType sets the SingleInstanceType field's value. +func (s *OnDemandOptions) SetSingleInstanceType(v bool) *OnDemandOptions { + s.SingleInstanceType = &v return s } -// Describes the IP addresses and network interface associated with a NAT gateway. -type NatGatewayAddress struct { +// The allocation strategy of On-Demand Instances in an EC2 Fleet. +type OnDemandOptionsRequest struct { _ struct{} `type:"structure"` - // The allocation ID of the Elastic IP address that's associated with the NAT - // gateway. - AllocationId *string `locationName:"allocationId" type:"string"` + // The order of the launch template overrides to use in fulfilling On-Demand + // capacity. If you specify lowest-price, EC2 Fleet uses price to determine + // the order, launching the lowest price first. If you specify prioritized, + // EC2 Fleet uses the priority that you assigned to each launch template override, + // launching the highest priority first. If you do not specify a value, EC2 + // Fleet defaults to lowest-price. + AllocationStrategy *string `type:"string" enum:"FleetOnDemandAllocationStrategy"` - // The ID of the network interface associated with the NAT gateway. - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` + // The minimum target capacity for On-Demand Instances in the fleet. If the + // minimum target capacity is not reached, the fleet launches no instances. + MinTargetCapacity *int64 `type:"integer"` - // The private IP address associated with the Elastic IP address. - PrivateIp *string `locationName:"privateIp" type:"string"` + // Indicates that the fleet launches all On-Demand Instances into a single Availability + // Zone. + SingleAvailabilityZone *bool `type:"boolean"` - // The Elastic IP address associated with the NAT gateway. - PublicIp *string `locationName:"publicIp" type:"string"` + // Indicates that the fleet uses a single instance type to launch all On-Demand + // Instances in the fleet. + SingleInstanceType *bool `type:"boolean"` } // String returns the string representation -func (s NatGatewayAddress) String() string { +func (s OnDemandOptionsRequest) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s NatGatewayAddress) GoString() string { +func (s OnDemandOptionsRequest) GoString() string { return s.String() } -// SetAllocationId sets the AllocationId field's value. -func (s *NatGatewayAddress) SetAllocationId(v string) *NatGatewayAddress { - s.AllocationId = &v +// SetAllocationStrategy sets the AllocationStrategy field's value. +func (s *OnDemandOptionsRequest) SetAllocationStrategy(v string) *OnDemandOptionsRequest { + s.AllocationStrategy = &v return s } -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *NatGatewayAddress) SetNetworkInterfaceId(v string) *NatGatewayAddress { - s.NetworkInterfaceId = &v +// SetMinTargetCapacity sets the MinTargetCapacity field's value. +func (s *OnDemandOptionsRequest) SetMinTargetCapacity(v int64) *OnDemandOptionsRequest { + s.MinTargetCapacity = &v return s } -// SetPrivateIp sets the PrivateIp field's value. -func (s *NatGatewayAddress) SetPrivateIp(v string) *NatGatewayAddress { - s.PrivateIp = &v +// SetSingleAvailabilityZone sets the SingleAvailabilityZone field's value. +func (s *OnDemandOptionsRequest) SetSingleAvailabilityZone(v bool) *OnDemandOptionsRequest { + s.SingleAvailabilityZone = &v return s } -// SetPublicIp sets the PublicIp field's value. -func (s *NatGatewayAddress) SetPublicIp(v string) *NatGatewayAddress { - s.PublicIp = &v +// SetSingleInstanceType sets the SingleInstanceType field's value. +func (s *OnDemandOptionsRequest) SetSingleInstanceType(v bool) *OnDemandOptionsRequest { + s.SingleInstanceType = &v return s } -// Describes a network ACL. -type NetworkAcl struct { +// Describes the data that identifies an Amazon FPGA image (AFI) on the PCI +// bus. +type PciId struct { _ struct{} `type:"structure"` - // Any associations between the network ACL and one or more subnets - Associations []*NetworkAclAssociation `locationName:"associationSet" locationNameList:"item" type:"list"` - - // One or more entries (rules) in the network ACL. - Entries []*NetworkAclEntry `locationName:"entrySet" locationNameList:"item" type:"list"` - - // Indicates whether this is the default network ACL for the VPC. - IsDefault *bool `locationName:"default" type:"boolean"` + // The ID of the device. + DeviceId *string `type:"string"` - // The ID of the network ACL. - NetworkAclId *string `locationName:"networkAclId" type:"string"` + // The ID of the subsystem. + SubsystemId *string `type:"string"` - // Any tags assigned to the network ACL. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + // The ID of the vendor for the subsystem. + SubsystemVendorId *string `type:"string"` - // The ID of the VPC for the network ACL. - VpcId *string `locationName:"vpcId" type:"string"` + // The ID of the vendor. + VendorId *string `type:"string"` } // String returns the string representation -func (s NetworkAcl) String() string { +func (s PciId) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s NetworkAcl) GoString() string { +func (s PciId) GoString() string { return s.String() } -// SetAssociations sets the Associations field's value. -func (s *NetworkAcl) SetAssociations(v []*NetworkAclAssociation) *NetworkAcl { - s.Associations = v +// SetDeviceId sets the DeviceId field's value. +func (s *PciId) SetDeviceId(v string) *PciId { + s.DeviceId = &v return s } -// SetEntries sets the Entries field's value. -func (s *NetworkAcl) SetEntries(v []*NetworkAclEntry) *NetworkAcl { - s.Entries = v +// SetSubsystemId sets the SubsystemId field's value. +func (s *PciId) SetSubsystemId(v string) *PciId { + s.SubsystemId = &v return s } -// SetIsDefault sets the IsDefault field's value. -func (s *NetworkAcl) SetIsDefault(v bool) *NetworkAcl { - s.IsDefault = &v +// SetSubsystemVendorId sets the SubsystemVendorId field's value. +func (s *PciId) SetSubsystemVendorId(v string) *PciId { + s.SubsystemVendorId = &v return s } -// SetNetworkAclId sets the NetworkAclId field's value. -func (s *NetworkAcl) SetNetworkAclId(v string) *NetworkAcl { - s.NetworkAclId = &v +// SetVendorId sets the VendorId field's value. +func (s *PciId) SetVendorId(v string) *PciId { + s.VendorId = &v return s } -// SetTags sets the Tags field's value. -func (s *NetworkAcl) SetTags(v []*Tag) *NetworkAcl { - s.Tags = v +// Describes the VPC peering connection options. +type PeeringConnectionOptions struct { + _ struct{} `type:"structure"` + + // If true, the public DNS hostnames of instances in the specified VPC resolve + // to private IP addresses when queried from instances in the peer VPC. + AllowDnsResolutionFromRemoteVpc *bool `locationName:"allowDnsResolutionFromRemoteVpc" type:"boolean"` + + // If true, enables outbound communication from an EC2-Classic instance that's + // linked to a local VPC using ClassicLink to instances in a peer VPC. + AllowEgressFromLocalClassicLinkToRemoteVpc *bool `locationName:"allowEgressFromLocalClassicLinkToRemoteVpc" type:"boolean"` + + // If true, enables outbound communication from instances in a local VPC to + // an EC2-Classic instance that's linked to a peer VPC using ClassicLink. + AllowEgressFromLocalVpcToRemoteClassicLink *bool `locationName:"allowEgressFromLocalVpcToRemoteClassicLink" type:"boolean"` +} + +// String returns the string representation +func (s PeeringConnectionOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PeeringConnectionOptions) GoString() string { + return s.String() +} + +// SetAllowDnsResolutionFromRemoteVpc sets the AllowDnsResolutionFromRemoteVpc field's value. +func (s *PeeringConnectionOptions) SetAllowDnsResolutionFromRemoteVpc(v bool) *PeeringConnectionOptions { + s.AllowDnsResolutionFromRemoteVpc = &v return s } -// SetVpcId sets the VpcId field's value. -func (s *NetworkAcl) SetVpcId(v string) *NetworkAcl { - s.VpcId = &v +// SetAllowEgressFromLocalClassicLinkToRemoteVpc sets the AllowEgressFromLocalClassicLinkToRemoteVpc field's value. +func (s *PeeringConnectionOptions) SetAllowEgressFromLocalClassicLinkToRemoteVpc(v bool) *PeeringConnectionOptions { + s.AllowEgressFromLocalClassicLinkToRemoteVpc = &v return s } -// Describes an association between a network ACL and a subnet. -type NetworkAclAssociation struct { +// SetAllowEgressFromLocalVpcToRemoteClassicLink sets the AllowEgressFromLocalVpcToRemoteClassicLink field's value. +func (s *PeeringConnectionOptions) SetAllowEgressFromLocalVpcToRemoteClassicLink(v bool) *PeeringConnectionOptions { + s.AllowEgressFromLocalVpcToRemoteClassicLink = &v + return s +} + +// The VPC peering connection options. +type PeeringConnectionOptionsRequest struct { _ struct{} `type:"structure"` - // The ID of the association between a network ACL and a subnet. - NetworkAclAssociationId *string `locationName:"networkAclAssociationId" type:"string"` + // If true, enables a local VPC to resolve public DNS hostnames to private IP + // addresses when queried from instances in the peer VPC. + AllowDnsResolutionFromRemoteVpc *bool `type:"boolean"` - // The ID of the network ACL. - NetworkAclId *string `locationName:"networkAclId" type:"string"` + // If true, enables outbound communication from an EC2-Classic instance that's + // linked to a local VPC using ClassicLink to instances in a peer VPC. + AllowEgressFromLocalClassicLinkToRemoteVpc *bool `type:"boolean"` - // The ID of the subnet. - SubnetId *string `locationName:"subnetId" type:"string"` + // If true, enables outbound communication from instances in a local VPC to + // an EC2-Classic instance that's linked to a peer VPC using ClassicLink. + AllowEgressFromLocalVpcToRemoteClassicLink *bool `type:"boolean"` } // String returns the string representation -func (s NetworkAclAssociation) String() string { +func (s PeeringConnectionOptionsRequest) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s NetworkAclAssociation) GoString() string { +func (s PeeringConnectionOptionsRequest) GoString() string { return s.String() } -// SetNetworkAclAssociationId sets the NetworkAclAssociationId field's value. -func (s *NetworkAclAssociation) SetNetworkAclAssociationId(v string) *NetworkAclAssociation { - s.NetworkAclAssociationId = &v +// SetAllowDnsResolutionFromRemoteVpc sets the AllowDnsResolutionFromRemoteVpc field's value. +func (s *PeeringConnectionOptionsRequest) SetAllowDnsResolutionFromRemoteVpc(v bool) *PeeringConnectionOptionsRequest { + s.AllowDnsResolutionFromRemoteVpc = &v return s } -// SetNetworkAclId sets the NetworkAclId field's value. -func (s *NetworkAclAssociation) SetNetworkAclId(v string) *NetworkAclAssociation { - s.NetworkAclId = &v +// SetAllowEgressFromLocalClassicLinkToRemoteVpc sets the AllowEgressFromLocalClassicLinkToRemoteVpc field's value. +func (s *PeeringConnectionOptionsRequest) SetAllowEgressFromLocalClassicLinkToRemoteVpc(v bool) *PeeringConnectionOptionsRequest { + s.AllowEgressFromLocalClassicLinkToRemoteVpc = &v return s } -// SetSubnetId sets the SubnetId field's value. -func (s *NetworkAclAssociation) SetSubnetId(v string) *NetworkAclAssociation { - s.SubnetId = &v +// SetAllowEgressFromLocalVpcToRemoteClassicLink sets the AllowEgressFromLocalVpcToRemoteClassicLink field's value. +func (s *PeeringConnectionOptionsRequest) SetAllowEgressFromLocalVpcToRemoteClassicLink(v bool) *PeeringConnectionOptionsRequest { + s.AllowEgressFromLocalVpcToRemoteClassicLink = &v return s } -// Describes an entry in a network ACL. -type NetworkAclEntry struct { +// Describes the placement of an instance. +type Placement struct { _ struct{} `type:"structure"` - // The IPv4 network range to allow or deny, in CIDR notation. - CidrBlock *string `locationName:"cidrBlock" type:"string"` - - // Indicates whether the rule is an egress rule (applied to traffic leaving - // the subnet). - Egress *bool `locationName:"egress" type:"boolean"` + // The affinity setting for the instance on the Dedicated Host. This parameter + // is not supported for the ImportInstance command. + Affinity *string `locationName:"affinity" type:"string"` - // ICMP protocol: The ICMP type and code. - IcmpTypeCode *IcmpTypeCode `locationName:"icmpTypeCode" type:"structure"` + // The Availability Zone of the instance. + AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - // The IPv6 network range to allow or deny, in CIDR notation. - Ipv6CidrBlock *string `locationName:"ipv6CidrBlock" type:"string"` + // The name of the placement group the instance is in. + GroupName *string `locationName:"groupName" type:"string"` - // TCP or UDP protocols: The range of ports the rule applies to. - PortRange *PortRange `locationName:"portRange" type:"structure"` + // The ID of the Dedicated Host on which the instance resides. This parameter + // is not supported for the ImportInstance command. + HostId *string `locationName:"hostId" type:"string"` - // The protocol. A value of -1 means all protocols. - Protocol *string `locationName:"protocol" type:"string"` + // The number of the partition the instance is in. Valid only if the placement + // group strategy is set to partition. + PartitionNumber *int64 `locationName:"partitionNumber" type:"integer"` - // Indicates whether to allow or deny the traffic that matches the rule. - RuleAction *string `locationName:"ruleAction" type:"string" enum:"RuleAction"` + // Reserved for future use. + SpreadDomain *string `locationName:"spreadDomain" type:"string"` - // The rule number for the entry. ACL entries are processed in ascending order - // by rule number. - RuleNumber *int64 `locationName:"ruleNumber" type:"integer"` + // The tenancy of the instance (if the instance is running in a VPC). An instance + // with a tenancy of dedicated runs on single-tenant hardware. The host tenancy + // is not supported for the ImportInstance command. + Tenancy *string `locationName:"tenancy" type:"string" enum:"Tenancy"` } // String returns the string representation -func (s NetworkAclEntry) String() string { +func (s Placement) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s NetworkAclEntry) GoString() string { +func (s Placement) GoString() string { return s.String() } -// SetCidrBlock sets the CidrBlock field's value. -func (s *NetworkAclEntry) SetCidrBlock(v string) *NetworkAclEntry { - s.CidrBlock = &v +// SetAffinity sets the Affinity field's value. +func (s *Placement) SetAffinity(v string) *Placement { + s.Affinity = &v return s } -// SetEgress sets the Egress field's value. -func (s *NetworkAclEntry) SetEgress(v bool) *NetworkAclEntry { - s.Egress = &v +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *Placement) SetAvailabilityZone(v string) *Placement { + s.AvailabilityZone = &v return s } -// SetIcmpTypeCode sets the IcmpTypeCode field's value. -func (s *NetworkAclEntry) SetIcmpTypeCode(v *IcmpTypeCode) *NetworkAclEntry { - s.IcmpTypeCode = v +// SetGroupName sets the GroupName field's value. +func (s *Placement) SetGroupName(v string) *Placement { + s.GroupName = &v return s } -// SetIpv6CidrBlock sets the Ipv6CidrBlock field's value. -func (s *NetworkAclEntry) SetIpv6CidrBlock(v string) *NetworkAclEntry { - s.Ipv6CidrBlock = &v +// SetHostId sets the HostId field's value. +func (s *Placement) SetHostId(v string) *Placement { + s.HostId = &v return s } -// SetPortRange sets the PortRange field's value. -func (s *NetworkAclEntry) SetPortRange(v *PortRange) *NetworkAclEntry { - s.PortRange = v +// SetPartitionNumber sets the PartitionNumber field's value. +func (s *Placement) SetPartitionNumber(v int64) *Placement { + s.PartitionNumber = &v return s } -// SetProtocol sets the Protocol field's value. -func (s *NetworkAclEntry) SetProtocol(v string) *NetworkAclEntry { - s.Protocol = &v +// SetSpreadDomain sets the SpreadDomain field's value. +func (s *Placement) SetSpreadDomain(v string) *Placement { + s.SpreadDomain = &v return s } -// SetRuleAction sets the RuleAction field's value. -func (s *NetworkAclEntry) SetRuleAction(v string) *NetworkAclEntry { - s.RuleAction = &v +// SetTenancy sets the Tenancy field's value. +func (s *Placement) SetTenancy(v string) *Placement { + s.Tenancy = &v return s } -// SetRuleNumber sets the RuleNumber field's value. -func (s *NetworkAclEntry) SetRuleNumber(v int64) *NetworkAclEntry { - s.RuleNumber = &v - return s +// Describes a placement group. +type PlacementGroup struct { + _ struct{} `type:"structure"` + + // The name of the placement group. + GroupName *string `locationName:"groupName" type:"string"` + + // The number of partitions. Valid only if strategy is set to partition. + PartitionCount *int64 `locationName:"partitionCount" type:"integer"` + + // The state of the placement group. + State *string `locationName:"state" type:"string" enum:"PlacementGroupState"` + + // The placement strategy. + Strategy *string `locationName:"strategy" type:"string" enum:"PlacementStrategy"` } -// Describes a network interface. -type NetworkInterface struct { - _ struct{} `type:"structure"` +// String returns the string representation +func (s PlacementGroup) String() string { + return awsutil.Prettify(s) +} - // The association information for an Elastic IP address (IPv4) associated with - // the network interface. - Association *NetworkInterfaceAssociation `locationName:"association" type:"structure"` +// GoString returns the string representation +func (s PlacementGroup) GoString() string { + return s.String() +} - // The network interface attachment. - Attachment *NetworkInterfaceAttachment `locationName:"attachment" type:"structure"` +// SetGroupName sets the GroupName field's value. +func (s *PlacementGroup) SetGroupName(v string) *PlacementGroup { + s.GroupName = &v + return s +} - // The Availability Zone. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` +// SetPartitionCount sets the PartitionCount field's value. +func (s *PlacementGroup) SetPartitionCount(v int64) *PlacementGroup { + s.PartitionCount = &v + return s +} - // A description. - Description *string `locationName:"description" type:"string"` +// SetState sets the State field's value. +func (s *PlacementGroup) SetState(v string) *PlacementGroup { + s.State = &v + return s +} - // Any security groups for the network interface. - Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` +// SetStrategy sets the Strategy field's value. +func (s *PlacementGroup) SetStrategy(v string) *PlacementGroup { + s.Strategy = &v + return s +} - // The type of interface. - InterfaceType *string `locationName:"interfaceType" type:"string" enum:"NetworkInterfaceType"` +// Describes the placement of an instance. +type PlacementResponse struct { + _ struct{} `type:"structure"` - // The IPv6 addresses associated with the network interface. - Ipv6Addresses []*NetworkInterfaceIpv6Address `locationName:"ipv6AddressesSet" locationNameList:"item" type:"list"` + // The name of the placement group the instance is in. + GroupName *string `locationName:"groupName" type:"string"` +} - // The MAC address. - MacAddress *string `locationName:"macAddress" type:"string"` +// String returns the string representation +func (s PlacementResponse) String() string { + return awsutil.Prettify(s) +} - // The ID of the network interface. - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` +// GoString returns the string representation +func (s PlacementResponse) GoString() string { + return s.String() +} - // The AWS account ID of the owner of the network interface. - OwnerId *string `locationName:"ownerId" type:"string"` +// SetGroupName sets the GroupName field's value. +func (s *PlacementResponse) SetGroupName(v string) *PlacementResponse { + s.GroupName = &v + return s +} - // The private DNS name. - PrivateDnsName *string `locationName:"privateDnsName" type:"string"` +// Describes a range of ports. +type PortRange struct { + _ struct{} `type:"structure"` - // The IPv4 address of the network interface within the subnet. - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` + // The first port in the range. + From *int64 `locationName:"from" type:"integer"` - // The private IPv4 addresses associated with the network interface. - PrivateIpAddresses []*NetworkInterfacePrivateIpAddress `locationName:"privateIpAddressesSet" locationNameList:"item" type:"list"` + // The last port in the range. + To *int64 `locationName:"to" type:"integer"` +} - // The ID of the entity that launched the instance on your behalf (for example, - // AWS Management Console or Auto Scaling). - RequesterId *string `locationName:"requesterId" type:"string"` +// String returns the string representation +func (s PortRange) String() string { + return awsutil.Prettify(s) +} - // Indicates whether the network interface is being managed by AWS. - RequesterManaged *bool `locationName:"requesterManaged" type:"boolean"` +// GoString returns the string representation +func (s PortRange) GoString() string { + return s.String() +} - // Indicates whether traffic to or from the instance is validated. - SourceDestCheck *bool `locationName:"sourceDestCheck" type:"boolean"` +// SetFrom sets the From field's value. +func (s *PortRange) SetFrom(v int64) *PortRange { + s.From = &v + return s +} - // The status of the network interface. - Status *string `locationName:"status" type:"string" enum:"NetworkInterfaceStatus"` +// SetTo sets the To field's value. +func (s *PortRange) SetTo(v int64) *PortRange { + s.To = &v + return s +} - // The ID of the subnet. - SubnetId *string `locationName:"subnetId" type:"string"` +// Describes prefixes for AWS services. +type PrefixList struct { + _ struct{} `type:"structure"` + + // The IP address range of the AWS service. + Cidrs []*string `locationName:"cidrSet" locationNameList:"item" type:"list"` - // Any tags assigned to the network interface. - TagSet []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + // The ID of the prefix. + PrefixListId *string `locationName:"prefixListId" type:"string"` - // The ID of the VPC. - VpcId *string `locationName:"vpcId" type:"string"` + // The name of the prefix. + PrefixListName *string `locationName:"prefixListName" type:"string"` } // String returns the string representation -func (s NetworkInterface) String() string { +func (s PrefixList) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s NetworkInterface) GoString() string { +func (s PrefixList) GoString() string { return s.String() } -// SetAssociation sets the Association field's value. -func (s *NetworkInterface) SetAssociation(v *NetworkInterfaceAssociation) *NetworkInterface { - s.Association = v +// SetCidrs sets the Cidrs field's value. +func (s *PrefixList) SetCidrs(v []*string) *PrefixList { + s.Cidrs = v return s } -// SetAttachment sets the Attachment field's value. -func (s *NetworkInterface) SetAttachment(v *NetworkInterfaceAttachment) *NetworkInterface { - s.Attachment = v +// SetPrefixListId sets the PrefixListId field's value. +func (s *PrefixList) SetPrefixListId(v string) *PrefixList { + s.PrefixListId = &v return s } -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *NetworkInterface) SetAvailabilityZone(v string) *NetworkInterface { - s.AvailabilityZone = &v +// SetPrefixListName sets the PrefixListName field's value. +func (s *PrefixList) SetPrefixListName(v string) *PrefixList { + s.PrefixListName = &v return s } -// SetDescription sets the Description field's value. -func (s *NetworkInterface) SetDescription(v string) *NetworkInterface { - s.Description = &v - return s -} +// Describes a prefix list ID. +type PrefixListId struct { + _ struct{} `type:"structure"` -// SetGroups sets the Groups field's value. -func (s *NetworkInterface) SetGroups(v []*GroupIdentifier) *NetworkInterface { - s.Groups = v - return s -} + // A description for the security group rule that references this prefix list + // ID. + // + // Constraints: Up to 255 characters in length. Allowed characters are a-z, + // A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$* + Description *string `locationName:"description" type:"string"` -// SetInterfaceType sets the InterfaceType field's value. -func (s *NetworkInterface) SetInterfaceType(v string) *NetworkInterface { - s.InterfaceType = &v - return s + // The ID of the prefix. + PrefixListId *string `locationName:"prefixListId" type:"string"` } -// SetIpv6Addresses sets the Ipv6Addresses field's value. -func (s *NetworkInterface) SetIpv6Addresses(v []*NetworkInterfaceIpv6Address) *NetworkInterface { - s.Ipv6Addresses = v - return s +// String returns the string representation +func (s PrefixListId) String() string { + return awsutil.Prettify(s) } -// SetMacAddress sets the MacAddress field's value. -func (s *NetworkInterface) SetMacAddress(v string) *NetworkInterface { - s.MacAddress = &v - return s +// GoString returns the string representation +func (s PrefixListId) GoString() string { + return s.String() } -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *NetworkInterface) SetNetworkInterfaceId(v string) *NetworkInterface { - s.NetworkInterfaceId = &v +// SetDescription sets the Description field's value. +func (s *PrefixListId) SetDescription(v string) *PrefixListId { + s.Description = &v return s } -// SetOwnerId sets the OwnerId field's value. -func (s *NetworkInterface) SetOwnerId(v string) *NetworkInterface { - s.OwnerId = &v +// SetPrefixListId sets the PrefixListId field's value. +func (s *PrefixListId) SetPrefixListId(v string) *PrefixListId { + s.PrefixListId = &v return s } -// SetPrivateDnsName sets the PrivateDnsName field's value. -func (s *NetworkInterface) SetPrivateDnsName(v string) *NetworkInterface { - s.PrivateDnsName = &v - return s -} +// Describes the price for a Reserved Instance. +type PriceSchedule struct { + _ struct{} `type:"structure"` -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *NetworkInterface) SetPrivateIpAddress(v string) *NetworkInterface { - s.PrivateIpAddress = &v - return s -} + // The current price schedule, as determined by the term remaining for the Reserved + // Instance in the listing. + // + // A specific price schedule is always in effect, but only one price schedule + // can be active at any time. Take, for example, a Reserved Instance listing + // that has five months remaining in its term. When you specify price schedules + // for five months and two months, this means that schedule 1, covering the + // first three months of the remaining term, will be active during months 5, + // 4, and 3. Then schedule 2, covering the last two months of the term, will + // be active for months 2 and 1. + Active *bool `locationName:"active" type:"boolean"` -// SetPrivateIpAddresses sets the PrivateIpAddresses field's value. -func (s *NetworkInterface) SetPrivateIpAddresses(v []*NetworkInterfacePrivateIpAddress) *NetworkInterface { - s.PrivateIpAddresses = v - return s -} + // The currency for transacting the Reserved Instance resale. At this time, + // the only supported currency is USD. + CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` -// SetRequesterId sets the RequesterId field's value. -func (s *NetworkInterface) SetRequesterId(v string) *NetworkInterface { - s.RequesterId = &v - return s + // The fixed price for the term. + Price *float64 `locationName:"price" type:"double"` + + // The number of months remaining in the reservation. For example, 2 is the + // second to the last month before the capacity reservation expires. + Term *int64 `locationName:"term" type:"long"` } -// SetRequesterManaged sets the RequesterManaged field's value. -func (s *NetworkInterface) SetRequesterManaged(v bool) *NetworkInterface { - s.RequesterManaged = &v - return s +// String returns the string representation +func (s PriceSchedule) String() string { + return awsutil.Prettify(s) } -// SetSourceDestCheck sets the SourceDestCheck field's value. -func (s *NetworkInterface) SetSourceDestCheck(v bool) *NetworkInterface { - s.SourceDestCheck = &v - return s +// GoString returns the string representation +func (s PriceSchedule) GoString() string { + return s.String() } -// SetStatus sets the Status field's value. -func (s *NetworkInterface) SetStatus(v string) *NetworkInterface { - s.Status = &v +// SetActive sets the Active field's value. +func (s *PriceSchedule) SetActive(v bool) *PriceSchedule { + s.Active = &v return s } -// SetSubnetId sets the SubnetId field's value. -func (s *NetworkInterface) SetSubnetId(v string) *NetworkInterface { - s.SubnetId = &v +// SetCurrencyCode sets the CurrencyCode field's value. +func (s *PriceSchedule) SetCurrencyCode(v string) *PriceSchedule { + s.CurrencyCode = &v return s } -// SetTagSet sets the TagSet field's value. -func (s *NetworkInterface) SetTagSet(v []*Tag) *NetworkInterface { - s.TagSet = v +// SetPrice sets the Price field's value. +func (s *PriceSchedule) SetPrice(v float64) *PriceSchedule { + s.Price = &v return s } -// SetVpcId sets the VpcId field's value. -func (s *NetworkInterface) SetVpcId(v string) *NetworkInterface { - s.VpcId = &v +// SetTerm sets the Term field's value. +func (s *PriceSchedule) SetTerm(v int64) *PriceSchedule { + s.Term = &v return s } -// Describes association information for an Elastic IP address (IPv4 only). -type NetworkInterfaceAssociation struct { +// Describes the price for a Reserved Instance. +type PriceScheduleSpecification struct { _ struct{} `type:"structure"` - // The allocation ID. - AllocationId *string `locationName:"allocationId" type:"string"` - - // The association ID. - AssociationId *string `locationName:"associationId" type:"string"` - - // The ID of the Elastic IP address owner. - IpOwnerId *string `locationName:"ipOwnerId" type:"string"` + // The currency for transacting the Reserved Instance resale. At this time, + // the only supported currency is USD. + CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` - // The public DNS name. - PublicDnsName *string `locationName:"publicDnsName" type:"string"` + // The fixed price for the term. + Price *float64 `locationName:"price" type:"double"` - // The address of the Elastic IP address bound to the network interface. - PublicIp *string `locationName:"publicIp" type:"string"` + // The number of months remaining in the reservation. For example, 2 is the + // second to the last month before the capacity reservation expires. + Term *int64 `locationName:"term" type:"long"` } // String returns the string representation -func (s NetworkInterfaceAssociation) String() string { +func (s PriceScheduleSpecification) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s NetworkInterfaceAssociation) GoString() string { +func (s PriceScheduleSpecification) GoString() string { return s.String() } -// SetAllocationId sets the AllocationId field's value. -func (s *NetworkInterfaceAssociation) SetAllocationId(v string) *NetworkInterfaceAssociation { - s.AllocationId = &v +// SetCurrencyCode sets the CurrencyCode field's value. +func (s *PriceScheduleSpecification) SetCurrencyCode(v string) *PriceScheduleSpecification { + s.CurrencyCode = &v return s } -// SetAssociationId sets the AssociationId field's value. -func (s *NetworkInterfaceAssociation) SetAssociationId(v string) *NetworkInterfaceAssociation { - s.AssociationId = &v +// SetPrice sets the Price field's value. +func (s *PriceScheduleSpecification) SetPrice(v float64) *PriceScheduleSpecification { + s.Price = &v return s } -// SetIpOwnerId sets the IpOwnerId field's value. -func (s *NetworkInterfaceAssociation) SetIpOwnerId(v string) *NetworkInterfaceAssociation { - s.IpOwnerId = &v +// SetTerm sets the Term field's value. +func (s *PriceScheduleSpecification) SetTerm(v int64) *PriceScheduleSpecification { + s.Term = &v return s } -// SetPublicDnsName sets the PublicDnsName field's value. -func (s *NetworkInterfaceAssociation) SetPublicDnsName(v string) *NetworkInterfaceAssociation { - s.PublicDnsName = &v - return s -} +// Describes a Reserved Instance offering. +type PricingDetail struct { + _ struct{} `type:"structure"` -// SetPublicIp sets the PublicIp field's value. -func (s *NetworkInterfaceAssociation) SetPublicIp(v string) *NetworkInterfaceAssociation { - s.PublicIp = &v - return s -} + // The number of reservations available for the price. + Count *int64 `locationName:"count" type:"integer"` -// Describes a network interface attachment. -type NetworkInterfaceAttachment struct { - _ struct{} `type:"structure"` + // The price per instance. + Price *float64 `locationName:"price" type:"double"` +} - // The timestamp indicating when the attachment initiated. - AttachTime *time.Time `locationName:"attachTime" type:"timestamp"` +// String returns the string representation +func (s PricingDetail) String() string { + return awsutil.Prettify(s) +} - // The ID of the network interface attachment. - AttachmentId *string `locationName:"attachmentId" type:"string"` +// GoString returns the string representation +func (s PricingDetail) GoString() string { + return s.String() +} - // Indicates whether the network interface is deleted when the instance is terminated. - DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` +// SetCount sets the Count field's value. +func (s *PricingDetail) SetCount(v int64) *PricingDetail { + s.Count = &v + return s +} - // The device index of the network interface attachment on the instance. - DeviceIndex *int64 `locationName:"deviceIndex" type:"integer"` +// SetPrice sets the Price field's value. +func (s *PricingDetail) SetPrice(v float64) *PricingDetail { + s.Price = &v + return s +} - // The ID of the instance. - InstanceId *string `locationName:"instanceId" type:"string"` +// PrincipalIdFormat description +type PrincipalIdFormat struct { + _ struct{} `type:"structure"` - // The AWS account ID of the owner of the instance. - InstanceOwnerId *string `locationName:"instanceOwnerId" type:"string"` + // PrincipalIdFormatARN description + Arn *string `locationName:"arn" type:"string"` - // The attachment state. - Status *string `locationName:"status" type:"string" enum:"AttachmentStatus"` + // PrincipalIdFormatStatuses description + Statuses []*IdFormat `locationName:"statusSet" locationNameList:"item" type:"list"` } // String returns the string representation -func (s NetworkInterfaceAttachment) String() string { +func (s PrincipalIdFormat) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s NetworkInterfaceAttachment) GoString() string { +func (s PrincipalIdFormat) GoString() string { return s.String() } -// SetAttachTime sets the AttachTime field's value. -func (s *NetworkInterfaceAttachment) SetAttachTime(v time.Time) *NetworkInterfaceAttachment { - s.AttachTime = &v +// SetArn sets the Arn field's value. +func (s *PrincipalIdFormat) SetArn(v string) *PrincipalIdFormat { + s.Arn = &v return s } -// SetAttachmentId sets the AttachmentId field's value. -func (s *NetworkInterfaceAttachment) SetAttachmentId(v string) *NetworkInterfaceAttachment { - s.AttachmentId = &v +// SetStatuses sets the Statuses field's value. +func (s *PrincipalIdFormat) SetStatuses(v []*IdFormat) *PrincipalIdFormat { + s.Statuses = v return s } -// SetDeleteOnTermination sets the DeleteOnTermination field's value. -func (s *NetworkInterfaceAttachment) SetDeleteOnTermination(v bool) *NetworkInterfaceAttachment { - s.DeleteOnTermination = &v - return s +// Describes a secondary private IPv4 address for a network interface. +type PrivateIpAddressSpecification struct { + _ struct{} `type:"structure"` + + // Indicates whether the private IPv4 address is the primary private IPv4 address. + // Only one IPv4 address can be designated as primary. + Primary *bool `locationName:"primary" type:"boolean"` + + // The private IPv4 addresses. + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` } -// SetDeviceIndex sets the DeviceIndex field's value. -func (s *NetworkInterfaceAttachment) SetDeviceIndex(v int64) *NetworkInterfaceAttachment { - s.DeviceIndex = &v - return s +// String returns the string representation +func (s PrivateIpAddressSpecification) String() string { + return awsutil.Prettify(s) } -// SetInstanceId sets the InstanceId field's value. -func (s *NetworkInterfaceAttachment) SetInstanceId(v string) *NetworkInterfaceAttachment { - s.InstanceId = &v - return s +// GoString returns the string representation +func (s PrivateIpAddressSpecification) GoString() string { + return s.String() } -// SetInstanceOwnerId sets the InstanceOwnerId field's value. -func (s *NetworkInterfaceAttachment) SetInstanceOwnerId(v string) *NetworkInterfaceAttachment { - s.InstanceOwnerId = &v +// SetPrimary sets the Primary field's value. +func (s *PrivateIpAddressSpecification) SetPrimary(v bool) *PrivateIpAddressSpecification { + s.Primary = &v return s } -// SetStatus sets the Status field's value. -func (s *NetworkInterfaceAttachment) SetStatus(v string) *NetworkInterfaceAttachment { - s.Status = &v +// SetPrivateIpAddress sets the PrivateIpAddress field's value. +func (s *PrivateIpAddressSpecification) SetPrivateIpAddress(v string) *PrivateIpAddressSpecification { + s.PrivateIpAddress = &v return s } -// Describes an attachment change. -type NetworkInterfaceAttachmentChanges struct { +// Describes a product code. +type ProductCode struct { _ struct{} `type:"structure"` - // The ID of the network interface attachment. - AttachmentId *string `locationName:"attachmentId" type:"string"` + // The product code. + ProductCodeId *string `locationName:"productCode" type:"string"` - // Indicates whether the network interface is deleted when the instance is terminated. - DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` + // The type of product code. + ProductCodeType *string `locationName:"type" type:"string" enum:"ProductCodeValues"` } // String returns the string representation -func (s NetworkInterfaceAttachmentChanges) String() string { +func (s ProductCode) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s NetworkInterfaceAttachmentChanges) GoString() string { +func (s ProductCode) GoString() string { return s.String() } -// SetAttachmentId sets the AttachmentId field's value. -func (s *NetworkInterfaceAttachmentChanges) SetAttachmentId(v string) *NetworkInterfaceAttachmentChanges { - s.AttachmentId = &v +// SetProductCodeId sets the ProductCodeId field's value. +func (s *ProductCode) SetProductCodeId(v string) *ProductCode { + s.ProductCodeId = &v return s } -// SetDeleteOnTermination sets the DeleteOnTermination field's value. -func (s *NetworkInterfaceAttachmentChanges) SetDeleteOnTermination(v bool) *NetworkInterfaceAttachmentChanges { - s.DeleteOnTermination = &v +// SetProductCodeType sets the ProductCodeType field's value. +func (s *ProductCode) SetProductCodeType(v string) *ProductCode { + s.ProductCodeType = &v return s } -// Describes an IPv6 address associated with a network interface. -type NetworkInterfaceIpv6Address struct { +// Describes a virtual private gateway propagating route. +type PropagatingVgw struct { _ struct{} `type:"structure"` - // The IPv6 address. - Ipv6Address *string `locationName:"ipv6Address" type:"string"` + // The ID of the virtual private gateway. + GatewayId *string `locationName:"gatewayId" type:"string"` } // String returns the string representation -func (s NetworkInterfaceIpv6Address) String() string { +func (s PropagatingVgw) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s NetworkInterfaceIpv6Address) GoString() string { +func (s PropagatingVgw) GoString() string { return s.String() } -// SetIpv6Address sets the Ipv6Address field's value. -func (s *NetworkInterfaceIpv6Address) SetIpv6Address(v string) *NetworkInterfaceIpv6Address { - s.Ipv6Address = &v +// SetGatewayId sets the GatewayId field's value. +func (s *PropagatingVgw) SetGatewayId(v string) *PropagatingVgw { + s.GatewayId = &v return s } -// Describes a permission for a network interface. -type NetworkInterfacePermission struct { +type ProvisionByoipCidrInput struct { _ struct{} `type:"structure"` - // The AWS account ID. - AwsAccountId *string `locationName:"awsAccountId" type:"string"` - - // The AWS service. - AwsService *string `locationName:"awsService" type:"string"` - - // The ID of the network interface. - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` + // The public IPv4 address range, in CIDR notation. The most specific prefix + // that you can specify is /24. The address range cannot overlap with another + // address range that you've brought to this or another region. + // + // Cidr is a required field + Cidr *string `type:"string" required:"true"` - // The ID of the network interface permission. - NetworkInterfacePermissionId *string `locationName:"networkInterfacePermissionId" type:"string"` + // A signed document that proves that you are authorized to bring the specified + // IP address range to Amazon using BYOIP. + CidrAuthorizationContext *CidrAuthorizationContext `type:"structure"` - // The type of permission. - Permission *string `locationName:"permission" type:"string" enum:"InterfacePermissionType"` + // A description for the address range and the address pool. + Description *string `type:"string"` - // Information about the state of the permission. - PermissionState *NetworkInterfacePermissionState `locationName:"permissionState" 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 NetworkInterfacePermission) String() string { +func (s ProvisionByoipCidrInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s NetworkInterfacePermission) GoString() string { +func (s ProvisionByoipCidrInput) GoString() string { return s.String() } -// SetAwsAccountId sets the AwsAccountId field's value. -func (s *NetworkInterfacePermission) SetAwsAccountId(v string) *NetworkInterfacePermission { - s.AwsAccountId = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *ProvisionByoipCidrInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ProvisionByoipCidrInput"} + if s.Cidr == nil { + invalidParams.Add(request.NewErrParamRequired("Cidr")) + } + if s.CidrAuthorizationContext != nil { + if err := s.CidrAuthorizationContext.Validate(); err != nil { + invalidParams.AddNested("CidrAuthorizationContext", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetAwsService sets the AwsService field's value. -func (s *NetworkInterfacePermission) SetAwsService(v string) *NetworkInterfacePermission { - s.AwsService = &v +// SetCidr sets the Cidr field's value. +func (s *ProvisionByoipCidrInput) SetCidr(v string) *ProvisionByoipCidrInput { + s.Cidr = &v return s } -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *NetworkInterfacePermission) SetNetworkInterfaceId(v string) *NetworkInterfacePermission { - s.NetworkInterfaceId = &v +// SetCidrAuthorizationContext sets the CidrAuthorizationContext field's value. +func (s *ProvisionByoipCidrInput) SetCidrAuthorizationContext(v *CidrAuthorizationContext) *ProvisionByoipCidrInput { + s.CidrAuthorizationContext = v return s } -// SetNetworkInterfacePermissionId sets the NetworkInterfacePermissionId field's value. -func (s *NetworkInterfacePermission) SetNetworkInterfacePermissionId(v string) *NetworkInterfacePermission { - s.NetworkInterfacePermissionId = &v +// SetDescription sets the Description field's value. +func (s *ProvisionByoipCidrInput) SetDescription(v string) *ProvisionByoipCidrInput { + s.Description = &v return s } -// SetPermission sets the Permission field's value. -func (s *NetworkInterfacePermission) SetPermission(v string) *NetworkInterfacePermission { - s.Permission = &v +// SetDryRun sets the DryRun field's value. +func (s *ProvisionByoipCidrInput) SetDryRun(v bool) *ProvisionByoipCidrInput { + s.DryRun = &v return s } -// SetPermissionState sets the PermissionState field's value. -func (s *NetworkInterfacePermission) SetPermissionState(v *NetworkInterfacePermissionState) *NetworkInterfacePermission { - s.PermissionState = v +type ProvisionByoipCidrOutput struct { + _ struct{} `type:"structure"` + + // Information about the address pool. + ByoipCidr *ByoipCidr `locationName:"byoipCidr" type:"structure"` +} + +// String returns the string representation +func (s ProvisionByoipCidrOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProvisionByoipCidrOutput) GoString() string { + return s.String() +} + +// SetByoipCidr sets the ByoipCidr field's value. +func (s *ProvisionByoipCidrOutput) SetByoipCidr(v *ByoipCidr) *ProvisionByoipCidrOutput { + s.ByoipCidr = v return s } -// Describes the state of a network interface permission. -type NetworkInterfacePermissionState struct { +// Reserved. If you need to sustain traffic greater than the documented limits +// (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), +// contact us through the Support Center (https://console.aws.amazon.com/support/home?). +type ProvisionedBandwidth struct { _ struct{} `type:"structure"` - // The state of the permission. - State *string `locationName:"state" type:"string" enum:"NetworkInterfacePermissionStateCode"` + // Reserved. If you need to sustain traffic greater than the documented limits + // (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), + // contact us through the Support Center (https://console.aws.amazon.com/support/home?). + ProvisionTime *time.Time `locationName:"provisionTime" type:"timestamp"` - // A status message, if applicable. - StatusMessage *string `locationName:"statusMessage" type:"string"` + // Reserved. If you need to sustain traffic greater than the documented limits + // (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), + // contact us through the Support Center (https://console.aws.amazon.com/support/home?). + Provisioned *string `locationName:"provisioned" type:"string"` + + // Reserved. If you need to sustain traffic greater than the documented limits + // (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), + // contact us through the Support Center (https://console.aws.amazon.com/support/home?). + RequestTime *time.Time `locationName:"requestTime" type:"timestamp"` + + // Reserved. If you need to sustain traffic greater than the documented limits + // (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), + // contact us through the Support Center (https://console.aws.amazon.com/support/home?). + Requested *string `locationName:"requested" type:"string"` + + // Reserved. If you need to sustain traffic greater than the documented limits + // (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), + // contact us through the Support Center (https://console.aws.amazon.com/support/home?). + Status *string `locationName:"status" type:"string"` } // String returns the string representation -func (s NetworkInterfacePermissionState) String() string { +func (s ProvisionedBandwidth) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s NetworkInterfacePermissionState) GoString() string { +func (s ProvisionedBandwidth) GoString() string { return s.String() } -// SetState sets the State field's value. -func (s *NetworkInterfacePermissionState) SetState(v string) *NetworkInterfacePermissionState { - s.State = &v +// SetProvisionTime sets the ProvisionTime field's value. +func (s *ProvisionedBandwidth) SetProvisionTime(v time.Time) *ProvisionedBandwidth { + s.ProvisionTime = &v return s } -// SetStatusMessage sets the StatusMessage field's value. -func (s *NetworkInterfacePermissionState) SetStatusMessage(v string) *NetworkInterfacePermissionState { - s.StatusMessage = &v +// SetProvisioned sets the Provisioned field's value. +func (s *ProvisionedBandwidth) SetProvisioned(v string) *ProvisionedBandwidth { + s.Provisioned = &v return s } -// Describes the private IPv4 address of a network interface. -type NetworkInterfacePrivateIpAddress struct { +// SetRequestTime sets the RequestTime field's value. +func (s *ProvisionedBandwidth) SetRequestTime(v time.Time) *ProvisionedBandwidth { + s.RequestTime = &v + return s +} + +// SetRequested sets the Requested field's value. +func (s *ProvisionedBandwidth) SetRequested(v string) *ProvisionedBandwidth { + s.Requested = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *ProvisionedBandwidth) SetStatus(v string) *ProvisionedBandwidth { + s.Status = &v + return s +} + +// Describes an address pool. +type PublicIpv4Pool struct { _ struct{} `type:"structure"` - // The association information for an Elastic IP address (IPv4) associated with - // the network interface. - Association *NetworkInterfaceAssociation `locationName:"association" type:"structure"` + // A description of the address pool. + Description *string `locationName:"description" type:"string"` + + // The address ranges. + PoolAddressRanges []*PublicIpv4PoolRange `locationName:"poolAddressRangeSet" locationNameList:"item" type:"list"` - // Indicates whether this IPv4 address is the primary private IPv4 address of - // the network interface. - Primary *bool `locationName:"primary" type:"boolean"` + // The ID of the IPv4 address pool. + PoolId *string `locationName:"poolId" type:"string"` - // The private DNS name. - PrivateDnsName *string `locationName:"privateDnsName" type:"string"` + // The total number of addresses. + TotalAddressCount *int64 `locationName:"totalAddressCount" type:"integer"` - // The private IPv4 address. - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` + // The total number of available addresses. + TotalAvailableAddressCount *int64 `locationName:"totalAvailableAddressCount" type:"integer"` } // String returns the string representation -func (s NetworkInterfacePrivateIpAddress) String() string { +func (s PublicIpv4Pool) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s NetworkInterfacePrivateIpAddress) GoString() string { +func (s PublicIpv4Pool) GoString() string { return s.String() } -// SetAssociation sets the Association field's value. -func (s *NetworkInterfacePrivateIpAddress) SetAssociation(v *NetworkInterfaceAssociation) *NetworkInterfacePrivateIpAddress { - s.Association = v +// SetDescription sets the Description field's value. +func (s *PublicIpv4Pool) SetDescription(v string) *PublicIpv4Pool { + s.Description = &v return s } -// SetPrimary sets the Primary field's value. -func (s *NetworkInterfacePrivateIpAddress) SetPrimary(v bool) *NetworkInterfacePrivateIpAddress { - s.Primary = &v +// SetPoolAddressRanges sets the PoolAddressRanges field's value. +func (s *PublicIpv4Pool) SetPoolAddressRanges(v []*PublicIpv4PoolRange) *PublicIpv4Pool { + s.PoolAddressRanges = v return s } -// SetPrivateDnsName sets the PrivateDnsName field's value. -func (s *NetworkInterfacePrivateIpAddress) SetPrivateDnsName(v string) *NetworkInterfacePrivateIpAddress { - s.PrivateDnsName = &v +// SetPoolId sets the PoolId field's value. +func (s *PublicIpv4Pool) SetPoolId(v string) *PublicIpv4Pool { + s.PoolId = &v return s } -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *NetworkInterfacePrivateIpAddress) SetPrivateIpAddress(v string) *NetworkInterfacePrivateIpAddress { - s.PrivateIpAddress = &v +// SetTotalAddressCount sets the TotalAddressCount field's value. +func (s *PublicIpv4Pool) SetTotalAddressCount(v int64) *PublicIpv4Pool { + s.TotalAddressCount = &v return s } -type NewDhcpConfiguration struct { +// SetTotalAvailableAddressCount sets the TotalAvailableAddressCount field's value. +func (s *PublicIpv4Pool) SetTotalAvailableAddressCount(v int64) *PublicIpv4Pool { + s.TotalAvailableAddressCount = &v + return s +} + +// Describes an address range of an IPv4 address pool. +type PublicIpv4PoolRange struct { _ struct{} `type:"structure"` - Key *string `locationName:"key" type:"string"` + // The number of addresses in the range. + AddressCount *int64 `locationName:"addressCount" type:"integer"` - Values []*string `locationName:"Value" locationNameList:"item" type:"list"` + // The number of available addresses in the range. + AvailableAddressCount *int64 `locationName:"availableAddressCount" type:"integer"` + + // The first IP address in the range. + FirstAddress *string `locationName:"firstAddress" type:"string"` + + // The last IP address in the range. + LastAddress *string `locationName:"lastAddress" type:"string"` } // String returns the string representation -func (s NewDhcpConfiguration) String() string { +func (s PublicIpv4PoolRange) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s NewDhcpConfiguration) GoString() string { +func (s PublicIpv4PoolRange) GoString() string { return s.String() } -// SetKey sets the Key field's value. -func (s *NewDhcpConfiguration) SetKey(v string) *NewDhcpConfiguration { - s.Key = &v +// SetAddressCount sets the AddressCount field's value. +func (s *PublicIpv4PoolRange) SetAddressCount(v int64) *PublicIpv4PoolRange { + s.AddressCount = &v return s } -// SetValues sets the Values field's value. -func (s *NewDhcpConfiguration) SetValues(v []*string) *NewDhcpConfiguration { - s.Values = v +// SetAvailableAddressCount sets the AvailableAddressCount field's value. +func (s *PublicIpv4PoolRange) SetAvailableAddressCount(v int64) *PublicIpv4PoolRange { + s.AvailableAddressCount = &v return s } -// The allocation strategy of On-Demand Instances in an EC2 Fleet. -type OnDemandOptions struct { - _ struct{} `type:"structure"` - - // The order of the launch template overrides to use in fulfilling On-Demand - // capacity. If you specify lowest-price, EC2 Fleet uses price to determine - // the order, launching the lowest price first. If you specify prioritized, - // EC2 Fleet uses the priority that you assigned to each launch template override, - // launching the highest priority first. If you do not specify a value, EC2 - // Fleet defaults to lowest-price. - AllocationStrategy *string `locationName:"allocationStrategy" type:"string" enum:"FleetOnDemandAllocationStrategy"` -} - -// String returns the string representation -func (s OnDemandOptions) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s OnDemandOptions) GoString() string { - return s.String() +// SetFirstAddress sets the FirstAddress field's value. +func (s *PublicIpv4PoolRange) SetFirstAddress(v string) *PublicIpv4PoolRange { + s.FirstAddress = &v + return s } -// SetAllocationStrategy sets the AllocationStrategy field's value. -func (s *OnDemandOptions) SetAllocationStrategy(v string) *OnDemandOptions { - s.AllocationStrategy = &v +// SetLastAddress sets the LastAddress field's value. +func (s *PublicIpv4PoolRange) SetLastAddress(v string) *PublicIpv4PoolRange { + s.LastAddress = &v return s } -// The allocation strategy of On-Demand Instances in an EC2 Fleet. -type OnDemandOptionsRequest struct { +// Describes the result of the purchase. +type Purchase struct { _ struct{} `type:"structure"` - // The order of the launch template overrides to use in fulfilling On-Demand - // capacity. If you specify lowest-price, EC2 Fleet uses price to determine - // the order, launching the lowest price first. If you specify prioritized, - // EC2 Fleet uses the priority that you assigned to each launch template override, - // launching the highest priority first. If you do not specify a value, EC2 - // Fleet defaults to lowest-price. - AllocationStrategy *string `type:"string" enum:"FleetOnDemandAllocationStrategy"` + // The currency in which the UpfrontPrice and HourlyPrice amounts are specified. + // At this time, the only supported currency is USD. + CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` + + // The duration of the reservation's term in seconds. + Duration *int64 `locationName:"duration" type:"integer"` + + // The IDs of the Dedicated Hosts associated with the reservation. + HostIdSet []*string `locationName:"hostIdSet" locationNameList:"item" type:"list"` + + // The ID of the reservation. + HostReservationId *string `locationName:"hostReservationId" type:"string"` + + // The hourly price of the reservation per hour. + HourlyPrice *string `locationName:"hourlyPrice" type:"string"` + + // The instance family on the Dedicated Host that the reservation can be associated + // with. + InstanceFamily *string `locationName:"instanceFamily" type:"string"` + + // The payment option for the reservation. + PaymentOption *string `locationName:"paymentOption" type:"string" enum:"PaymentOption"` + + // The upfront price of the reservation. + UpfrontPrice *string `locationName:"upfrontPrice" type:"string"` } // String returns the string representation -func (s OnDemandOptionsRequest) String() string { +func (s Purchase) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s OnDemandOptionsRequest) GoString() string { +func (s Purchase) GoString() string { return s.String() } -// SetAllocationStrategy sets the AllocationStrategy field's value. -func (s *OnDemandOptionsRequest) SetAllocationStrategy(v string) *OnDemandOptionsRequest { - s.AllocationStrategy = &v +// SetCurrencyCode sets the CurrencyCode field's value. +func (s *Purchase) SetCurrencyCode(v string) *Purchase { + s.CurrencyCode = &v return s } -// Describes the data that identifies an Amazon FPGA image (AFI) on the PCI -// bus. -type PciId struct { - _ struct{} `type:"structure"` - - // The ID of the device. - DeviceId *string `type:"string"` - - // The ID of the subsystem. - SubsystemId *string `type:"string"` - - // The ID of the vendor for the subsystem. - SubsystemVendorId *string `type:"string"` - - // The ID of the vendor. - VendorId *string `type:"string"` +// SetDuration sets the Duration field's value. +func (s *Purchase) SetDuration(v int64) *Purchase { + s.Duration = &v + return s } -// String returns the string representation -func (s PciId) String() string { - return awsutil.Prettify(s) +// SetHostIdSet sets the HostIdSet field's value. +func (s *Purchase) SetHostIdSet(v []*string) *Purchase { + s.HostIdSet = v + return s } -// GoString returns the string representation -func (s PciId) GoString() string { - return s.String() +// SetHostReservationId sets the HostReservationId field's value. +func (s *Purchase) SetHostReservationId(v string) *Purchase { + s.HostReservationId = &v + return s } -// SetDeviceId sets the DeviceId field's value. -func (s *PciId) SetDeviceId(v string) *PciId { - s.DeviceId = &v +// SetHourlyPrice sets the HourlyPrice field's value. +func (s *Purchase) SetHourlyPrice(v string) *Purchase { + s.HourlyPrice = &v return s } -// SetSubsystemId sets the SubsystemId field's value. -func (s *PciId) SetSubsystemId(v string) *PciId { - s.SubsystemId = &v +// SetInstanceFamily sets the InstanceFamily field's value. +func (s *Purchase) SetInstanceFamily(v string) *Purchase { + s.InstanceFamily = &v return s } -// SetSubsystemVendorId sets the SubsystemVendorId field's value. -func (s *PciId) SetSubsystemVendorId(v string) *PciId { - s.SubsystemVendorId = &v +// SetPaymentOption sets the PaymentOption field's value. +func (s *Purchase) SetPaymentOption(v string) *Purchase { + s.PaymentOption = &v return s } -// SetVendorId sets the VendorId field's value. -func (s *PciId) SetVendorId(v string) *PciId { - s.VendorId = &v +// SetUpfrontPrice sets the UpfrontPrice field's value. +func (s *Purchase) SetUpfrontPrice(v string) *Purchase { + s.UpfrontPrice = &v return s } -// Describes the VPC peering connection options. -type PeeringConnectionOptions struct { +type PurchaseHostReservationInput struct { _ struct{} `type:"structure"` - // If true, the public DNS hostnames of instances in the specified VPC resolve - // to private IP addresses when queried from instances in the peer VPC. - AllowDnsResolutionFromRemoteVpc *bool `locationName:"allowDnsResolutionFromRemoteVpc" type:"boolean"` + // Unique, case-sensitive identifier you provide to ensure idempotency of the + // request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) + // in the Amazon Elastic Compute Cloud User Guide. + ClientToken *string `type:"string"` - // If true, enables outbound communication from an EC2-Classic instance that's - // linked to a local VPC via ClassicLink to instances in a peer VPC. - AllowEgressFromLocalClassicLinkToRemoteVpc *bool `locationName:"allowEgressFromLocalClassicLinkToRemoteVpc" type:"boolean"` + // The currency in which the totalUpfrontPrice, LimitPrice, and totalHourlyPrice + // amounts are specified. At this time, the only supported currency is USD. + CurrencyCode *string `type:"string" enum:"CurrencyCodeValues"` - // If true, enables outbound communication from instances in a local VPC to - // an EC2-Classic instance that's linked to a peer VPC via ClassicLink. - AllowEgressFromLocalVpcToRemoteClassicLink *bool `locationName:"allowEgressFromLocalVpcToRemoteClassicLink" type:"boolean"` + // The IDs of the Dedicated Hosts with which the reservation will be associated. + // + // HostIdSet is a required field + HostIdSet []*string `locationNameList:"item" type:"list" required:"true"` + + // The specified limit is checked against the total upfront cost of the reservation + // (calculated as the offering's upfront cost multiplied by the host count). + // If the total upfront cost is greater than the specified price limit, the + // request fails. This is used to ensure that the purchase does not exceed the + // expected upfront cost of the purchase. At this time, the only supported currency + // is USD. For example, to indicate a limit price of USD 100, specify 100.00. + LimitPrice *string `type:"string"` + + // The ID of the offering. + // + // OfferingId is a required field + OfferingId *string `type:"string" required:"true"` } // String returns the string representation -func (s PeeringConnectionOptions) String() string { +func (s PurchaseHostReservationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s PeeringConnectionOptions) GoString() string { +func (s PurchaseHostReservationInput) GoString() string { return s.String() } -// SetAllowDnsResolutionFromRemoteVpc sets the AllowDnsResolutionFromRemoteVpc field's value. -func (s *PeeringConnectionOptions) SetAllowDnsResolutionFromRemoteVpc(v bool) *PeeringConnectionOptions { - s.AllowDnsResolutionFromRemoteVpc = &v +// Validate inspects the fields of the type to determine if they are valid. +func (s *PurchaseHostReservationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PurchaseHostReservationInput"} + if s.HostIdSet == nil { + invalidParams.Add(request.NewErrParamRequired("HostIdSet")) + } + if s.OfferingId == nil { + invalidParams.Add(request.NewErrParamRequired("OfferingId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *PurchaseHostReservationInput) SetClientToken(v string) *PurchaseHostReservationInput { + s.ClientToken = &v return s } -// SetAllowEgressFromLocalClassicLinkToRemoteVpc sets the AllowEgressFromLocalClassicLinkToRemoteVpc field's value. -func (s *PeeringConnectionOptions) SetAllowEgressFromLocalClassicLinkToRemoteVpc(v bool) *PeeringConnectionOptions { - s.AllowEgressFromLocalClassicLinkToRemoteVpc = &v +// SetCurrencyCode sets the CurrencyCode field's value. +func (s *PurchaseHostReservationInput) SetCurrencyCode(v string) *PurchaseHostReservationInput { + s.CurrencyCode = &v return s } -// SetAllowEgressFromLocalVpcToRemoteClassicLink sets the AllowEgressFromLocalVpcToRemoteClassicLink field's value. -func (s *PeeringConnectionOptions) SetAllowEgressFromLocalVpcToRemoteClassicLink(v bool) *PeeringConnectionOptions { - s.AllowEgressFromLocalVpcToRemoteClassicLink = &v +// SetHostIdSet sets the HostIdSet field's value. +func (s *PurchaseHostReservationInput) SetHostIdSet(v []*string) *PurchaseHostReservationInput { + s.HostIdSet = v return s } -// The VPC peering connection options. -type PeeringConnectionOptionsRequest struct { +// SetLimitPrice sets the LimitPrice field's value. +func (s *PurchaseHostReservationInput) SetLimitPrice(v string) *PurchaseHostReservationInput { + s.LimitPrice = &v + return s +} + +// SetOfferingId sets the OfferingId field's value. +func (s *PurchaseHostReservationInput) SetOfferingId(v string) *PurchaseHostReservationInput { + s.OfferingId = &v + return s +} + +type PurchaseHostReservationOutput struct { _ struct{} `type:"structure"` - // If true, enables a local VPC to resolve public DNS hostnames to private IP - // addresses when queried from instances in the peer VPC. - AllowDnsResolutionFromRemoteVpc *bool `type:"boolean"` + // Unique, case-sensitive identifier you provide to ensure idempotency of the + // request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) + // in the Amazon Elastic Compute Cloud User Guide. + ClientToken *string `locationName:"clientToken" type:"string"` - // If true, enables outbound communication from an EC2-Classic instance that's - // linked to a local VPC via ClassicLink to instances in a peer VPC. - AllowEgressFromLocalClassicLinkToRemoteVpc *bool `type:"boolean"` + // The currency in which the totalUpfrontPrice and totalHourlyPrice amounts + // are specified. At this time, the only supported currency is USD. + CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` - // If true, enables outbound communication from instances in a local VPC to - // an EC2-Classic instance that's linked to a peer VPC via ClassicLink. - AllowEgressFromLocalVpcToRemoteClassicLink *bool `type:"boolean"` + // Describes the details of the purchase. + Purchase []*Purchase `locationName:"purchase" locationNameList:"item" type:"list"` + + // The total hourly price of the reservation calculated per hour. + TotalHourlyPrice *string `locationName:"totalHourlyPrice" type:"string"` + + // The total amount charged to your account when you purchase the reservation. + TotalUpfrontPrice *string `locationName:"totalUpfrontPrice" type:"string"` } // String returns the string representation -func (s PeeringConnectionOptionsRequest) String() string { +func (s PurchaseHostReservationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s PeeringConnectionOptionsRequest) GoString() string { +func (s PurchaseHostReservationOutput) GoString() string { return s.String() } -// SetAllowDnsResolutionFromRemoteVpc sets the AllowDnsResolutionFromRemoteVpc field's value. -func (s *PeeringConnectionOptionsRequest) SetAllowDnsResolutionFromRemoteVpc(v bool) *PeeringConnectionOptionsRequest { - s.AllowDnsResolutionFromRemoteVpc = &v +// SetClientToken sets the ClientToken field's value. +func (s *PurchaseHostReservationOutput) SetClientToken(v string) *PurchaseHostReservationOutput { + s.ClientToken = &v return s } -// SetAllowEgressFromLocalClassicLinkToRemoteVpc sets the AllowEgressFromLocalClassicLinkToRemoteVpc field's value. -func (s *PeeringConnectionOptionsRequest) SetAllowEgressFromLocalClassicLinkToRemoteVpc(v bool) *PeeringConnectionOptionsRequest { - s.AllowEgressFromLocalClassicLinkToRemoteVpc = &v +// SetCurrencyCode sets the CurrencyCode field's value. +func (s *PurchaseHostReservationOutput) SetCurrencyCode(v string) *PurchaseHostReservationOutput { + s.CurrencyCode = &v return s } -// SetAllowEgressFromLocalVpcToRemoteClassicLink sets the AllowEgressFromLocalVpcToRemoteClassicLink field's value. -func (s *PeeringConnectionOptionsRequest) SetAllowEgressFromLocalVpcToRemoteClassicLink(v bool) *PeeringConnectionOptionsRequest { - s.AllowEgressFromLocalVpcToRemoteClassicLink = &v +// SetPurchase sets the Purchase field's value. +func (s *PurchaseHostReservationOutput) SetPurchase(v []*Purchase) *PurchaseHostReservationOutput { + s.Purchase = v return s } -// Describes the placement of an instance. -type Placement struct { - _ struct{} `type:"structure"` - - // The affinity setting for the instance on the Dedicated Host. This parameter - // is not supported for the ImportInstance command. - Affinity *string `locationName:"affinity" type:"string"` - - // The Availability Zone of the instance. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` +// SetTotalHourlyPrice sets the TotalHourlyPrice field's value. +func (s *PurchaseHostReservationOutput) SetTotalHourlyPrice(v string) *PurchaseHostReservationOutput { + s.TotalHourlyPrice = &v + return s +} - // The name of the placement group the instance is in. - GroupName *string `locationName:"groupName" type:"string"` +// SetTotalUpfrontPrice sets the TotalUpfrontPrice field's value. +func (s *PurchaseHostReservationOutput) SetTotalUpfrontPrice(v string) *PurchaseHostReservationOutput { + s.TotalUpfrontPrice = &v + return s +} - // The ID of the Dedicated Host on which the instance resides. This parameter - // is not supported for the ImportInstance command. - HostId *string `locationName:"hostId" type:"string"` +// Describes a request to purchase Scheduled Instances. +type PurchaseRequest struct { + _ struct{} `type:"structure"` - // Reserved for future use. - SpreadDomain *string `locationName:"spreadDomain" type:"string"` + // The number of instances. + // + // InstanceCount is a required field + InstanceCount *int64 `type:"integer" required:"true"` - // The tenancy of the instance (if the instance is running in a VPC). An instance - // with a tenancy of dedicated runs on single-tenant hardware. The host tenancy - // is not supported for the ImportInstance command. - Tenancy *string `locationName:"tenancy" type:"string" enum:"Tenancy"` + // The purchase token. + // + // PurchaseToken is a required field + PurchaseToken *string `type:"string" required:"true"` } // String returns the string representation -func (s Placement) String() string { +func (s PurchaseRequest) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Placement) GoString() string { +func (s PurchaseRequest) GoString() string { return s.String() } -// SetAffinity sets the Affinity field's value. -func (s *Placement) SetAffinity(v string) *Placement { - s.Affinity = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *Placement) SetAvailabilityZone(v string) *Placement { - s.AvailabilityZone = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *Placement) SetGroupName(v string) *Placement { - s.GroupName = &v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *PurchaseRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PurchaseRequest"} + if s.InstanceCount == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceCount")) + } + if s.PurchaseToken == nil { + invalidParams.Add(request.NewErrParamRequired("PurchaseToken")) + } -// SetHostId sets the HostId field's value. -func (s *Placement) SetHostId(v string) *Placement { - s.HostId = &v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetSpreadDomain sets the SpreadDomain field's value. -func (s *Placement) SetSpreadDomain(v string) *Placement { - s.SpreadDomain = &v +// SetInstanceCount sets the InstanceCount field's value. +func (s *PurchaseRequest) SetInstanceCount(v int64) *PurchaseRequest { + s.InstanceCount = &v return s } -// SetTenancy sets the Tenancy field's value. -func (s *Placement) SetTenancy(v string) *Placement { - s.Tenancy = &v +// SetPurchaseToken sets the PurchaseToken field's value. +func (s *PurchaseRequest) SetPurchaseToken(v string) *PurchaseRequest { + s.PurchaseToken = &v return s } -// Describes a placement group. -type PlacementGroup struct { +// Contains the parameters for PurchaseReservedInstancesOffering. +type PurchaseReservedInstancesOfferingInput struct { _ struct{} `type:"structure"` - // The name of the placement group. - GroupName *string `locationName:"groupName" 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 `locationName:"dryRun" type:"boolean"` - // The state of the placement group. - State *string `locationName:"state" type:"string" enum:"PlacementGroupState"` + // The number of Reserved Instances to purchase. + // + // InstanceCount is a required field + InstanceCount *int64 `type:"integer" required:"true"` - // The placement strategy. - Strategy *string `locationName:"strategy" type:"string" enum:"PlacementStrategy"` + // Specified for Reserved Instance Marketplace offerings to limit the total + // order and ensure that the Reserved Instances are not purchased at unexpected + // prices. + LimitPrice *ReservedInstanceLimitPrice `locationName:"limitPrice" type:"structure"` + + // The ID of the Reserved Instance offering to purchase. + // + // ReservedInstancesOfferingId is a required field + ReservedInstancesOfferingId *string `type:"string" required:"true"` } // String returns the string representation -func (s PlacementGroup) String() string { +func (s PurchaseReservedInstancesOfferingInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s PlacementGroup) GoString() string { +func (s PurchaseReservedInstancesOfferingInput) GoString() string { return s.String() } -// SetGroupName sets the GroupName field's value. -func (s *PlacementGroup) SetGroupName(v string) *PlacementGroup { - s.GroupName = &v +// Validate inspects the fields of the type to determine if they are valid. +func (s *PurchaseReservedInstancesOfferingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PurchaseReservedInstancesOfferingInput"} + if s.InstanceCount == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceCount")) + } + if s.ReservedInstancesOfferingId == nil { + invalidParams.Add(request.NewErrParamRequired("ReservedInstancesOfferingId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *PurchaseReservedInstancesOfferingInput) SetDryRun(v bool) *PurchaseReservedInstancesOfferingInput { + s.DryRun = &v return s } -// SetState sets the State field's value. -func (s *PlacementGroup) SetState(v string) *PlacementGroup { - s.State = &v +// SetInstanceCount sets the InstanceCount field's value. +func (s *PurchaseReservedInstancesOfferingInput) SetInstanceCount(v int64) *PurchaseReservedInstancesOfferingInput { + s.InstanceCount = &v return s } -// SetStrategy sets the Strategy field's value. -func (s *PlacementGroup) SetStrategy(v string) *PlacementGroup { - s.Strategy = &v +// SetLimitPrice sets the LimitPrice field's value. +func (s *PurchaseReservedInstancesOfferingInput) SetLimitPrice(v *ReservedInstanceLimitPrice) *PurchaseReservedInstancesOfferingInput { + s.LimitPrice = v return s } -// Describes a range of ports. -type PortRange struct { - _ struct{} `type:"structure"` +// SetReservedInstancesOfferingId sets the ReservedInstancesOfferingId field's value. +func (s *PurchaseReservedInstancesOfferingInput) SetReservedInstancesOfferingId(v string) *PurchaseReservedInstancesOfferingInput { + s.ReservedInstancesOfferingId = &v + return s +} - // The first port in the range. - From *int64 `locationName:"from" type:"integer"` +// Contains the output of PurchaseReservedInstancesOffering. +type PurchaseReservedInstancesOfferingOutput struct { + _ struct{} `type:"structure"` - // The last port in the range. - To *int64 `locationName:"to" type:"integer"` + // The IDs of the purchased Reserved Instances. + ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"` } // String returns the string representation -func (s PortRange) String() string { +func (s PurchaseReservedInstancesOfferingOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s PortRange) GoString() string { +func (s PurchaseReservedInstancesOfferingOutput) GoString() string { return s.String() } -// SetFrom sets the From field's value. -func (s *PortRange) SetFrom(v int64) *PortRange { - s.From = &v - return s -} - -// SetTo sets the To field's value. -func (s *PortRange) SetTo(v int64) *PortRange { - s.To = &v +// SetReservedInstancesId sets the ReservedInstancesId field's value. +func (s *PurchaseReservedInstancesOfferingOutput) SetReservedInstancesId(v string) *PurchaseReservedInstancesOfferingOutput { + s.ReservedInstancesId = &v return s } -// Describes prefixes for AWS services. -type PrefixList struct { +// Contains the parameters for PurchaseScheduledInstances. +type PurchaseScheduledInstancesInput struct { _ struct{} `type:"structure"` - // The IP address range of the AWS service. - Cidrs []*string `locationName:"cidrSet" locationNameList:"item" type:"list"` + // Unique, case-sensitive identifier that ensures the idempotency of the request. + // For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + ClientToken *string `type:"string" idempotencyToken:"true"` - // The ID of the prefix. - PrefixListId *string `locationName:"prefixListId" 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 prefix. - PrefixListName *string `locationName:"prefixListName" type:"string"` + // One or more purchase requests. + // + // PurchaseRequests is a required field + PurchaseRequests []*PurchaseRequest `locationName:"PurchaseRequest" locationNameList:"PurchaseRequest" min:"1" type:"list" required:"true"` } // String returns the string representation -func (s PrefixList) String() string { +func (s PurchaseScheduledInstancesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s PrefixList) GoString() string { +func (s PurchaseScheduledInstancesInput) GoString() string { return s.String() } -// SetCidrs sets the Cidrs field's value. -func (s *PrefixList) SetCidrs(v []*string) *PrefixList { - s.Cidrs = v +// Validate inspects the fields of the type to determine if they are valid. +func (s *PurchaseScheduledInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PurchaseScheduledInstancesInput"} + if s.PurchaseRequests == nil { + invalidParams.Add(request.NewErrParamRequired("PurchaseRequests")) + } + if s.PurchaseRequests != nil && len(s.PurchaseRequests) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PurchaseRequests", 1)) + } + if s.PurchaseRequests != nil { + for i, v := range s.PurchaseRequests { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PurchaseRequests", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *PurchaseScheduledInstancesInput) SetClientToken(v string) *PurchaseScheduledInstancesInput { + s.ClientToken = &v return s } -// SetPrefixListId sets the PrefixListId field's value. -func (s *PrefixList) SetPrefixListId(v string) *PrefixList { - s.PrefixListId = &v +// SetDryRun sets the DryRun field's value. +func (s *PurchaseScheduledInstancesInput) SetDryRun(v bool) *PurchaseScheduledInstancesInput { + s.DryRun = &v return s } -// SetPrefixListName sets the PrefixListName field's value. -func (s *PrefixList) SetPrefixListName(v string) *PrefixList { - s.PrefixListName = &v +// SetPurchaseRequests sets the PurchaseRequests field's value. +func (s *PurchaseScheduledInstancesInput) SetPurchaseRequests(v []*PurchaseRequest) *PurchaseScheduledInstancesInput { + s.PurchaseRequests = v return s } -// [EC2-VPC only] The ID of the prefix. -type PrefixListId struct { +// Contains the output of PurchaseScheduledInstances. +type PurchaseScheduledInstancesOutput struct { _ struct{} `type:"structure"` - // A description for the security group rule that references this prefix list - // ID. - // - // Constraints: Up to 255 characters in length. Allowed characters are a-z, - // A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$* - Description *string `locationName:"description" type:"string"` - - // The ID of the prefix. - PrefixListId *string `locationName:"prefixListId" type:"string"` + // Information about the Scheduled Instances. + ScheduledInstanceSet []*ScheduledInstance `locationName:"scheduledInstanceSet" locationNameList:"item" type:"list"` } // String returns the string representation -func (s PrefixListId) String() string { +func (s PurchaseScheduledInstancesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s PrefixListId) GoString() string { +func (s PurchaseScheduledInstancesOutput) GoString() string { return s.String() } -// SetDescription sets the Description field's value. -func (s *PrefixListId) SetDescription(v string) *PrefixListId { - s.Description = &v - return s -} - -// SetPrefixListId sets the PrefixListId field's value. -func (s *PrefixListId) SetPrefixListId(v string) *PrefixListId { - s.PrefixListId = &v +// SetScheduledInstanceSet sets the ScheduledInstanceSet field's value. +func (s *PurchaseScheduledInstancesOutput) SetScheduledInstanceSet(v []*ScheduledInstance) *PurchaseScheduledInstancesOutput { + s.ScheduledInstanceSet = v return s } -// Describes the price for a Reserved Instance. -type PriceSchedule struct { +type RebootInstancesInput struct { _ struct{} `type:"structure"` - // The current price schedule, as determined by the term remaining for the Reserved - // Instance in the listing. - // - // A specific price schedule is always in effect, but only one price schedule - // can be active at any time. Take, for example, a Reserved Instance listing - // that has five months remaining in its term. When you specify price schedules - // for five months and two months, this means that schedule 1, covering the - // first three months of the remaining term, will be active during months 5, - // 4, and 3. Then schedule 2, covering the last two months of the term, will - // be active for months 2 and 1. - Active *bool `locationName:"active" type:"boolean"` - - // The currency for transacting the Reserved Instance resale. At this time, - // the only supported currency is USD. - CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` - - // The fixed price for the term. - Price *float64 `locationName:"price" type:"double"` + // 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 `locationName:"dryRun" type:"boolean"` - // The number of months remaining in the reservation. For example, 2 is the - // second to the last month before the capacity reservation expires. - Term *int64 `locationName:"term" type:"long"` + // One or more instance IDs. + // + // InstanceIds is a required field + InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"` } // String returns the string representation -func (s PriceSchedule) String() string { +func (s RebootInstancesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s PriceSchedule) GoString() string { +func (s RebootInstancesInput) GoString() string { return s.String() } -// SetActive sets the Active field's value. -func (s *PriceSchedule) SetActive(v bool) *PriceSchedule { - s.Active = &v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *RebootInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RebootInstancesInput"} + if s.InstanceIds == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceIds")) + } -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *PriceSchedule) SetCurrencyCode(v string) *PriceSchedule { - s.CurrencyCode = &v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetPrice sets the Price field's value. -func (s *PriceSchedule) SetPrice(v float64) *PriceSchedule { - s.Price = &v +// SetDryRun sets the DryRun field's value. +func (s *RebootInstancesInput) SetDryRun(v bool) *RebootInstancesInput { + s.DryRun = &v return s } -// SetTerm sets the Term field's value. -func (s *PriceSchedule) SetTerm(v int64) *PriceSchedule { - s.Term = &v +// SetInstanceIds sets the InstanceIds field's value. +func (s *RebootInstancesInput) SetInstanceIds(v []*string) *RebootInstancesInput { + s.InstanceIds = v return s } -// Describes the price for a Reserved Instance. -type PriceScheduleSpecification struct { +type RebootInstancesOutput struct { _ struct{} `type:"structure"` +} - // The currency for transacting the Reserved Instance resale. At this time, - // the only supported currency is USD. - CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` +// String returns the string representation +func (s RebootInstancesOutput) String() string { + return awsutil.Prettify(s) +} - // The fixed price for the term. - Price *float64 `locationName:"price" type:"double"` +// GoString returns the string representation +func (s RebootInstancesOutput) GoString() string { + return s.String() +} - // The number of months remaining in the reservation. For example, 2 is the - // second to the last month before the capacity reservation expires. - Term *int64 `locationName:"term" type:"long"` +// Describes a recurring charge. +type RecurringCharge struct { + _ struct{} `type:"structure"` + + // The amount of the recurring charge. + Amount *float64 `locationName:"amount" type:"double"` + + // The frequency of the recurring charge. + Frequency *string `locationName:"frequency" type:"string" enum:"RecurringChargeFrequency"` } // String returns the string representation -func (s PriceScheduleSpecification) String() string { +func (s RecurringCharge) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s PriceScheduleSpecification) GoString() string { +func (s RecurringCharge) GoString() string { return s.String() } -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *PriceScheduleSpecification) SetCurrencyCode(v string) *PriceScheduleSpecification { - s.CurrencyCode = &v - return s -} - -// SetPrice sets the Price field's value. -func (s *PriceScheduleSpecification) SetPrice(v float64) *PriceScheduleSpecification { - s.Price = &v +// SetAmount sets the Amount field's value. +func (s *RecurringCharge) SetAmount(v float64) *RecurringCharge { + s.Amount = &v return s } -// SetTerm sets the Term field's value. -func (s *PriceScheduleSpecification) SetTerm(v int64) *PriceScheduleSpecification { - s.Term = &v +// SetFrequency sets the Frequency field's value. +func (s *RecurringCharge) SetFrequency(v string) *RecurringCharge { + s.Frequency = &v return s } -// Describes a Reserved Instance offering. -type PricingDetail struct { +// Describes a region. +type Region struct { _ struct{} `type:"structure"` - // The number of reservations available for the price. - Count *int64 `locationName:"count" type:"integer"` + // The region service endpoint. + Endpoint *string `locationName:"regionEndpoint" type:"string"` - // The price per instance. - Price *float64 `locationName:"price" type:"double"` + // The name of the region. + RegionName *string `locationName:"regionName" type:"string"` } // String returns the string representation -func (s PricingDetail) String() string { +func (s Region) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s PricingDetail) GoString() string { +func (s Region) GoString() string { return s.String() } -// SetCount sets the Count field's value. -func (s *PricingDetail) SetCount(v int64) *PricingDetail { - s.Count = &v +// SetEndpoint sets the Endpoint field's value. +func (s *Region) SetEndpoint(v string) *Region { + s.Endpoint = &v return s } -// SetPrice sets the Price field's value. -func (s *PricingDetail) SetPrice(v float64) *PricingDetail { - s.Price = &v +// SetRegionName sets the RegionName field's value. +func (s *Region) SetRegionName(v string) *Region { + s.RegionName = &v return s } -// PrincipalIdFormat description -type PrincipalIdFormat struct { +// Contains the parameters for RegisterImage. +type RegisterImageInput struct { _ struct{} `type:"structure"` - // PrincipalIdFormatARN description - Arn *string `locationName:"arn" type:"string"` + // The architecture of the AMI. + // + // Default: For Amazon EBS-backed AMIs, i386. For instance store-backed AMIs, + // the architecture specified in the manifest file. + Architecture *string `locationName:"architecture" type:"string" enum:"ArchitectureValues"` - // PrincipalIdFormatStatuses description - Statuses []*IdFormat `locationName:"statusSet" locationNameList:"item" type:"list"` + // The billing product codes. Your account must be authorized to specify billing + // product codes. Otherwise, you can use the AWS Marketplace to bill for the + // use of an AMI. + BillingProducts []*string `locationName:"BillingProduct" locationNameList:"item" type:"list"` + + // One or more block device mapping entries. + BlockDeviceMappings []*BlockDeviceMapping `locationName:"BlockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"` + + // A description for your AMI. + Description *string `locationName:"description" 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 `locationName:"dryRun" type:"boolean"` + + // Set to true to enable enhanced networking with ENA for the AMI and any instances + // that you launch from the AMI. + // + // This option is supported only for HVM AMIs. Specifying this option with a + // PV AMI can make instances launched from the AMI unreachable. + EnaSupport *bool `locationName:"enaSupport" type:"boolean"` + + // The full path to your AMI manifest in Amazon S3 storage. + ImageLocation *string `type:"string"` + + // The ID of the kernel. + KernelId *string `locationName:"kernelId" type:"string"` + + // A name for your AMI. + // + // Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets + // ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), + // at-signs (@), or underscores(_) + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // The ID of the RAM disk. + RamdiskId *string `locationName:"ramdiskId" type:"string"` + + // The device name of the root device volume (for example, /dev/sda1). + RootDeviceName *string `locationName:"rootDeviceName" type:"string"` + + // Set to simple to enable enhanced networking with the Intel 82599 Virtual + // Function interface for the AMI and any instances that you launch from the + // AMI. + // + // There is no way to disable sriovNetSupport at this time. + // + // This option is supported only for HVM AMIs. Specifying this option with a + // PV AMI can make instances launched from the AMI unreachable. + SriovNetSupport *string `locationName:"sriovNetSupport" type:"string"` + + // The type of virtualization (hvm | paravirtual). + // + // Default: paravirtual + VirtualizationType *string `locationName:"virtualizationType" type:"string"` } // String returns the string representation -func (s PrincipalIdFormat) String() string { +func (s RegisterImageInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s PrincipalIdFormat) GoString() string { +func (s RegisterImageInput) GoString() string { return s.String() } -// SetArn sets the Arn field's value. -func (s *PrincipalIdFormat) SetArn(v string) *PrincipalIdFormat { - s.Arn = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegisterImageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegisterImageInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetStatuses sets the Statuses field's value. -func (s *PrincipalIdFormat) SetStatuses(v []*IdFormat) *PrincipalIdFormat { - s.Statuses = v +// SetArchitecture sets the Architecture field's value. +func (s *RegisterImageInput) SetArchitecture(v string) *RegisterImageInput { + s.Architecture = &v return s } -// Describes a secondary private IPv4 address for a network interface. -type PrivateIpAddressSpecification struct { - _ struct{} `type:"structure"` - - // Indicates whether the private IPv4 address is the primary private IPv4 address. - // Only one IPv4 address can be designated as primary. - Primary *bool `locationName:"primary" type:"boolean"` - - // The private IPv4 addresses. - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` +// SetBillingProducts sets the BillingProducts field's value. +func (s *RegisterImageInput) SetBillingProducts(v []*string) *RegisterImageInput { + s.BillingProducts = v + return s } -// String returns the string representation -func (s PrivateIpAddressSpecification) String() string { - return awsutil.Prettify(s) +// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. +func (s *RegisterImageInput) SetBlockDeviceMappings(v []*BlockDeviceMapping) *RegisterImageInput { + s.BlockDeviceMappings = v + return s } -// GoString returns the string representation -func (s PrivateIpAddressSpecification) GoString() string { - return s.String() +// SetDescription sets the Description field's value. +func (s *RegisterImageInput) SetDescription(v string) *RegisterImageInput { + s.Description = &v + return s } -// SetPrimary sets the Primary field's value. -func (s *PrivateIpAddressSpecification) SetPrimary(v bool) *PrivateIpAddressSpecification { - s.Primary = &v +// SetDryRun sets the DryRun field's value. +func (s *RegisterImageInput) SetDryRun(v bool) *RegisterImageInput { + s.DryRun = &v return s } -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *PrivateIpAddressSpecification) SetPrivateIpAddress(v string) *PrivateIpAddressSpecification { - s.PrivateIpAddress = &v +// SetEnaSupport sets the EnaSupport field's value. +func (s *RegisterImageInput) SetEnaSupport(v bool) *RegisterImageInput { + s.EnaSupport = &v return s } -// Describes a product code. -type ProductCode struct { - _ struct{} `type:"structure"` +// SetImageLocation sets the ImageLocation field's value. +func (s *RegisterImageInput) SetImageLocation(v string) *RegisterImageInput { + s.ImageLocation = &v + return s +} - // The product code. - ProductCodeId *string `locationName:"productCode" type:"string"` +// SetKernelId sets the KernelId field's value. +func (s *RegisterImageInput) SetKernelId(v string) *RegisterImageInput { + s.KernelId = &v + return s +} - // The type of product code. - ProductCodeType *string `locationName:"type" type:"string" enum:"ProductCodeValues"` +// SetName sets the Name field's value. +func (s *RegisterImageInput) SetName(v string) *RegisterImageInput { + s.Name = &v + return s } -// String returns the string representation -func (s ProductCode) String() string { - return awsutil.Prettify(s) +// SetRamdiskId sets the RamdiskId field's value. +func (s *RegisterImageInput) SetRamdiskId(v string) *RegisterImageInput { + s.RamdiskId = &v + return s } -// GoString returns the string representation -func (s ProductCode) GoString() string { - return s.String() +// SetRootDeviceName sets the RootDeviceName field's value. +func (s *RegisterImageInput) SetRootDeviceName(v string) *RegisterImageInput { + s.RootDeviceName = &v + return s } -// SetProductCodeId sets the ProductCodeId field's value. -func (s *ProductCode) SetProductCodeId(v string) *ProductCode { - s.ProductCodeId = &v +// SetSriovNetSupport sets the SriovNetSupport field's value. +func (s *RegisterImageInput) SetSriovNetSupport(v string) *RegisterImageInput { + s.SriovNetSupport = &v return s } -// SetProductCodeType sets the ProductCodeType field's value. -func (s *ProductCode) SetProductCodeType(v string) *ProductCode { - s.ProductCodeType = &v +// SetVirtualizationType sets the VirtualizationType field's value. +func (s *RegisterImageInput) SetVirtualizationType(v string) *RegisterImageInput { + s.VirtualizationType = &v return s } -// Describes a virtual private gateway propagating route. -type PropagatingVgw struct { +// Contains the output of RegisterImage. +type RegisterImageOutput struct { _ struct{} `type:"structure"` - // The ID of the virtual private gateway. - GatewayId *string `locationName:"gatewayId" type:"string"` + // The ID of the newly registered AMI. + ImageId *string `locationName:"imageId" type:"string"` } // String returns the string representation -func (s PropagatingVgw) String() string { +func (s RegisterImageOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s PropagatingVgw) GoString() string { +func (s RegisterImageOutput) GoString() string { return s.String() } -// SetGatewayId sets the GatewayId field's value. -func (s *PropagatingVgw) SetGatewayId(v string) *PropagatingVgw { - s.GatewayId = &v +// SetImageId sets the ImageId field's value. +func (s *RegisterImageOutput) SetImageId(v string) *RegisterImageOutput { + s.ImageId = &v return s } -// Reserved. If you need to sustain traffic greater than the documented limits -// (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), -// contact us through the Support Center (https://console.aws.amazon.com/support/home?). -type ProvisionedBandwidth struct { +type RejectTransitGatewayVpcAttachmentInput struct { _ struct{} `type:"structure"` - // Reserved. If you need to sustain traffic greater than the documented limits - // (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), - // contact us through the Support Center (https://console.aws.amazon.com/support/home?). - ProvisionTime *time.Time `locationName:"provisionTime" type:"timestamp"` - - // Reserved. If you need to sustain traffic greater than the documented limits - // (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), - // contact us through the Support Center (https://console.aws.amazon.com/support/home?). - Provisioned *string `locationName:"provisioned" type:"string"` - - // Reserved. If you need to sustain traffic greater than the documented limits - // (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), - // contact us through the Support Center (https://console.aws.amazon.com/support/home?). - RequestTime *time.Time `locationName:"requestTime" type:"timestamp"` - - // Reserved. If you need to sustain traffic greater than the documented limits - // (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), - // contact us through the Support Center (https://console.aws.amazon.com/support/home?). - Requested *string `locationName:"requested" 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"` - // Reserved. If you need to sustain traffic greater than the documented limits - // (http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-nat-gateway.html), - // contact us through the Support Center (https://console.aws.amazon.com/support/home?). - Status *string `locationName:"status" type:"string"` + // The ID of the attachment. + // + // TransitGatewayAttachmentId is a required field + TransitGatewayAttachmentId *string `type:"string" required:"true"` } // String returns the string representation -func (s ProvisionedBandwidth) String() string { +func (s RejectTransitGatewayVpcAttachmentInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ProvisionedBandwidth) GoString() string { +func (s RejectTransitGatewayVpcAttachmentInput) GoString() string { return s.String() } -// SetProvisionTime sets the ProvisionTime field's value. -func (s *ProvisionedBandwidth) SetProvisionTime(v time.Time) *ProvisionedBandwidth { - s.ProvisionTime = &v - return s -} - -// SetProvisioned sets the Provisioned field's value. -func (s *ProvisionedBandwidth) SetProvisioned(v string) *ProvisionedBandwidth { - s.Provisioned = &v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *RejectTransitGatewayVpcAttachmentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RejectTransitGatewayVpcAttachmentInput"} + if s.TransitGatewayAttachmentId == nil { + invalidParams.Add(request.NewErrParamRequired("TransitGatewayAttachmentId")) + } -// SetRequestTime sets the RequestTime field's value. -func (s *ProvisionedBandwidth) SetRequestTime(v time.Time) *ProvisionedBandwidth { - s.RequestTime = &v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetRequested sets the Requested field's value. -func (s *ProvisionedBandwidth) SetRequested(v string) *ProvisionedBandwidth { - s.Requested = &v +// SetDryRun sets the DryRun field's value. +func (s *RejectTransitGatewayVpcAttachmentInput) SetDryRun(v bool) *RejectTransitGatewayVpcAttachmentInput { + s.DryRun = &v return s } -// SetStatus sets the Status field's value. -func (s *ProvisionedBandwidth) SetStatus(v string) *ProvisionedBandwidth { - s.Status = &v +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *RejectTransitGatewayVpcAttachmentInput) SetTransitGatewayAttachmentId(v string) *RejectTransitGatewayVpcAttachmentInput { + s.TransitGatewayAttachmentId = &v return s } -// Describes the result of the purchase. -type Purchase struct { +type RejectTransitGatewayVpcAttachmentOutput struct { _ struct{} `type:"structure"` - // The currency in which the UpfrontPrice and HourlyPrice amounts are specified. - // At this time, the only supported currency is USD. - CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` - - // The duration of the reservation's term in seconds. - Duration *int64 `locationName:"duration" type:"integer"` + // Information about the attachment. + TransitGatewayVpcAttachment *TransitGatewayVpcAttachment `locationName:"transitGatewayVpcAttachment" type:"structure"` +} - // The IDs of the Dedicated Hosts associated with the reservation. - HostIdSet []*string `locationName:"hostIdSet" locationNameList:"item" type:"list"` +// String returns the string representation +func (s RejectTransitGatewayVpcAttachmentOutput) String() string { + return awsutil.Prettify(s) +} - // The ID of the reservation. - HostReservationId *string `locationName:"hostReservationId" type:"string"` +// GoString returns the string representation +func (s RejectTransitGatewayVpcAttachmentOutput) GoString() string { + return s.String() +} - // The hourly price of the reservation per hour. - HourlyPrice *string `locationName:"hourlyPrice" type:"string"` +// SetTransitGatewayVpcAttachment sets the TransitGatewayVpcAttachment field's value. +func (s *RejectTransitGatewayVpcAttachmentOutput) SetTransitGatewayVpcAttachment(v *TransitGatewayVpcAttachment) *RejectTransitGatewayVpcAttachmentOutput { + s.TransitGatewayVpcAttachment = v + return s +} - // The instance family on the Dedicated Host that the reservation can be associated - // with. - InstanceFamily *string `locationName:"instanceFamily" type:"string"` +type RejectVpcEndpointConnectionsInput struct { + _ struct{} `type:"structure"` - // The payment option for the reservation. - PaymentOption *string `locationName:"paymentOption" type:"string" enum:"PaymentOption"` + // 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 upfront price of the reservation. - UpfrontPrice *string `locationName:"upfrontPrice" type:"string"` + // The ID of the service. + // + // ServiceId is a required field + ServiceId *string `type:"string" required:"true"` + + // The IDs of one or more VPC endpoints. + // + // VpcEndpointIds is a required field + VpcEndpointIds []*string `locationName:"VpcEndpointId" locationNameList:"item" type:"list" required:"true"` } // String returns the string representation -func (s Purchase) String() string { +func (s RejectVpcEndpointConnectionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Purchase) GoString() string { +func (s RejectVpcEndpointConnectionsInput) GoString() string { return s.String() } -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *Purchase) SetCurrencyCode(v string) *Purchase { - s.CurrencyCode = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *RejectVpcEndpointConnectionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RejectVpcEndpointConnectionsInput"} + if s.ServiceId == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceId")) + } + if s.VpcEndpointIds == nil { + invalidParams.Add(request.NewErrParamRequired("VpcEndpointIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetDuration sets the Duration field's value. -func (s *Purchase) SetDuration(v int64) *Purchase { - s.Duration = &v +// SetDryRun sets the DryRun field's value. +func (s *RejectVpcEndpointConnectionsInput) SetDryRun(v bool) *RejectVpcEndpointConnectionsInput { + s.DryRun = &v return s } -// SetHostIdSet sets the HostIdSet field's value. -func (s *Purchase) SetHostIdSet(v []*string) *Purchase { - s.HostIdSet = v +// SetServiceId sets the ServiceId field's value. +func (s *RejectVpcEndpointConnectionsInput) SetServiceId(v string) *RejectVpcEndpointConnectionsInput { + s.ServiceId = &v return s } -// SetHostReservationId sets the HostReservationId field's value. -func (s *Purchase) SetHostReservationId(v string) *Purchase { - s.HostReservationId = &v +// SetVpcEndpointIds sets the VpcEndpointIds field's value. +func (s *RejectVpcEndpointConnectionsInput) SetVpcEndpointIds(v []*string) *RejectVpcEndpointConnectionsInput { + s.VpcEndpointIds = v return s } -// SetHourlyPrice sets the HourlyPrice field's value. -func (s *Purchase) SetHourlyPrice(v string) *Purchase { - s.HourlyPrice = &v - return s +type RejectVpcEndpointConnectionsOutput struct { + _ struct{} `type:"structure"` + + // Information about the endpoints that were not rejected, if applicable. + Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"` } -// SetInstanceFamily sets the InstanceFamily field's value. -func (s *Purchase) SetInstanceFamily(v string) *Purchase { - s.InstanceFamily = &v - return s +// String returns the string representation +func (s RejectVpcEndpointConnectionsOutput) String() string { + return awsutil.Prettify(s) } -// SetPaymentOption sets the PaymentOption field's value. -func (s *Purchase) SetPaymentOption(v string) *Purchase { - s.PaymentOption = &v - return s +// GoString returns the string representation +func (s RejectVpcEndpointConnectionsOutput) GoString() string { + return s.String() } -// SetUpfrontPrice sets the UpfrontPrice field's value. -func (s *Purchase) SetUpfrontPrice(v string) *Purchase { - s.UpfrontPrice = &v +// SetUnsuccessful sets the Unsuccessful field's value. +func (s *RejectVpcEndpointConnectionsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *RejectVpcEndpointConnectionsOutput { + s.Unsuccessful = v return s } -type PurchaseHostReservationInput struct { +type RejectVpcPeeringConnectionInput struct { _ struct{} `type:"structure"` - // Unique, case-sensitive identifier you provide to ensure idempotency of the - // request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // in the Amazon Elastic Compute Cloud User Guide. - ClientToken *string `type:"string"` - - // The currency in which the totalUpfrontPrice, LimitPrice, and totalHourlyPrice - // amounts are specified. At this time, the only supported currency is USD. - CurrencyCode *string `type:"string" enum:"CurrencyCodeValues"` - - // The IDs of the Dedicated Hosts with which the reservation will be associated. - // - // HostIdSet is a required field - HostIdSet []*string `locationNameList:"item" type:"list" required:"true"` - - // The specified limit is checked against the total upfront cost of the reservation - // (calculated as the offering's upfront cost multiplied by the host count). - // If the total upfront cost is greater than the specified price limit, the - // request fails. This is used to ensure that the purchase does not exceed the - // expected upfront cost of the purchase. At this time, the only supported currency - // is USD. For example, to indicate a limit price of USD 100, specify 100.00. - LimitPrice *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 `locationName:"dryRun" type:"boolean"` - // The ID of the offering. + // The ID of the VPC peering connection. // - // OfferingId is a required field - OfferingId *string `type:"string" required:"true"` + // VpcPeeringConnectionId is a required field + VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string" required:"true"` } // String returns the string representation -func (s PurchaseHostReservationInput) String() string { +func (s RejectVpcPeeringConnectionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s PurchaseHostReservationInput) GoString() string { +func (s RejectVpcPeeringConnectionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *PurchaseHostReservationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PurchaseHostReservationInput"} - if s.HostIdSet == nil { - invalidParams.Add(request.NewErrParamRequired("HostIdSet")) - } - if s.OfferingId == nil { - invalidParams.Add(request.NewErrParamRequired("OfferingId")) +func (s *RejectVpcPeeringConnectionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RejectVpcPeeringConnectionInput"} + if s.VpcPeeringConnectionId == nil { + invalidParams.Add(request.NewErrParamRequired("VpcPeeringConnectionId")) } if invalidParams.Len() > 0 { @@ -58131,131 +71203,123 @@ func (s *PurchaseHostReservationInput) Validate() error { return nil } -// SetClientToken sets the ClientToken field's value. -func (s *PurchaseHostReservationInput) SetClientToken(v string) *PurchaseHostReservationInput { - s.ClientToken = &v +// SetDryRun sets the DryRun field's value. +func (s *RejectVpcPeeringConnectionInput) SetDryRun(v bool) *RejectVpcPeeringConnectionInput { + s.DryRun = &v return s } -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *PurchaseHostReservationInput) SetCurrencyCode(v string) *PurchaseHostReservationInput { - s.CurrencyCode = &v +// SetVpcPeeringConnectionId sets the VpcPeeringConnectionId field's value. +func (s *RejectVpcPeeringConnectionInput) SetVpcPeeringConnectionId(v string) *RejectVpcPeeringConnectionInput { + s.VpcPeeringConnectionId = &v return s } -// SetHostIdSet sets the HostIdSet field's value. -func (s *PurchaseHostReservationInput) SetHostIdSet(v []*string) *PurchaseHostReservationInput { - s.HostIdSet = v - return s +type RejectVpcPeeringConnectionOutput struct { + _ struct{} `type:"structure"` + + // Returns true if the request succeeds; otherwise, it returns an error. + Return *bool `locationName:"return" type:"boolean"` } -// SetLimitPrice sets the LimitPrice field's value. -func (s *PurchaseHostReservationInput) SetLimitPrice(v string) *PurchaseHostReservationInput { - s.LimitPrice = &v - return s +// String returns the string representation +func (s RejectVpcPeeringConnectionOutput) String() string { + return awsutil.Prettify(s) } -// SetOfferingId sets the OfferingId field's value. -func (s *PurchaseHostReservationInput) SetOfferingId(v string) *PurchaseHostReservationInput { - s.OfferingId = &v +// GoString returns the string representation +func (s RejectVpcPeeringConnectionOutput) GoString() string { + return s.String() +} + +// SetReturn sets the Return field's value. +func (s *RejectVpcPeeringConnectionOutput) SetReturn(v bool) *RejectVpcPeeringConnectionOutput { + s.Return = &v return s } -type PurchaseHostReservationOutput struct { +type ReleaseAddressInput struct { _ struct{} `type:"structure"` - // Unique, case-sensitive identifier you provide to ensure idempotency of the - // request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // in the Amazon Elastic Compute Cloud User Guide. - ClientToken *string `locationName:"clientToken" type:"string"` - - // The currency in which the totalUpfrontPrice and totalHourlyPrice amounts - // are specified. At this time, the only supported currency is USD. - CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` - - // Describes the details of the purchase. - Purchase []*Purchase `locationName:"purchase" locationNameList:"item" type:"list"` + // [EC2-VPC] The allocation ID. Required for EC2-VPC. + AllocationId *string `type:"string"` - // The total hourly price of the reservation calculated per hour. - TotalHourlyPrice *string `locationName:"totalHourlyPrice" 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 `locationName:"dryRun" type:"boolean"` - // The total amount charged to your account when you purchase the reservation. - TotalUpfrontPrice *string `locationName:"totalUpfrontPrice" type:"string"` + // [EC2-Classic] The Elastic IP address. Required for EC2-Classic. + PublicIp *string `type:"string"` } // String returns the string representation -func (s PurchaseHostReservationOutput) String() string { +func (s ReleaseAddressInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s PurchaseHostReservationOutput) GoString() string { +func (s ReleaseAddressInput) GoString() string { return s.String() } -// SetClientToken sets the ClientToken field's value. -func (s *PurchaseHostReservationOutput) SetClientToken(v string) *PurchaseHostReservationOutput { - s.ClientToken = &v +// SetAllocationId sets the AllocationId field's value. +func (s *ReleaseAddressInput) SetAllocationId(v string) *ReleaseAddressInput { + s.AllocationId = &v return s } -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *PurchaseHostReservationOutput) SetCurrencyCode(v string) *PurchaseHostReservationOutput { - s.CurrencyCode = &v +// SetDryRun sets the DryRun field's value. +func (s *ReleaseAddressInput) SetDryRun(v bool) *ReleaseAddressInput { + s.DryRun = &v return s } -// SetPurchase sets the Purchase field's value. -func (s *PurchaseHostReservationOutput) SetPurchase(v []*Purchase) *PurchaseHostReservationOutput { - s.Purchase = v +// SetPublicIp sets the PublicIp field's value. +func (s *ReleaseAddressInput) SetPublicIp(v string) *ReleaseAddressInput { + s.PublicIp = &v return s } -// SetTotalHourlyPrice sets the TotalHourlyPrice field's value. -func (s *PurchaseHostReservationOutput) SetTotalHourlyPrice(v string) *PurchaseHostReservationOutput { - s.TotalHourlyPrice = &v - return s +type ReleaseAddressOutput struct { + _ struct{} `type:"structure"` } -// SetTotalUpfrontPrice sets the TotalUpfrontPrice field's value. -func (s *PurchaseHostReservationOutput) SetTotalUpfrontPrice(v string) *PurchaseHostReservationOutput { - s.TotalUpfrontPrice = &v - return s +// String returns the string representation +func (s ReleaseAddressOutput) String() string { + return awsutil.Prettify(s) } -// Describes a request to purchase Scheduled Instances. -type PurchaseRequest struct { - _ struct{} `type:"structure"` +// GoString returns the string representation +func (s ReleaseAddressOutput) GoString() string { + return s.String() +} - // The number of instances. - // - // InstanceCount is a required field - InstanceCount *int64 `type:"integer" required:"true"` +type ReleaseHostsInput struct { + _ struct{} `type:"structure"` - // The purchase token. + // The IDs of the Dedicated Hosts to release. // - // PurchaseToken is a required field - PurchaseToken *string `type:"string" required:"true"` + // HostIds is a required field + HostIds []*string `locationName:"hostId" locationNameList:"item" type:"list" required:"true"` } // String returns the string representation -func (s PurchaseRequest) String() string { +func (s ReleaseHostsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s PurchaseRequest) GoString() string { +func (s ReleaseHostsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *PurchaseRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PurchaseRequest"} - if s.InstanceCount == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceCount")) - } - if s.PurchaseToken == nil { - invalidParams.Add(request.NewErrParamRequired("PurchaseToken")) +func (s *ReleaseHostsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReleaseHostsInput"} + if s.HostIds == nil { + invalidParams.Add(request.NewErrParamRequired("HostIds")) } if invalidParams.Len() > 0 { @@ -58264,62 +71328,77 @@ func (s *PurchaseRequest) Validate() error { return nil } -// SetInstanceCount sets the InstanceCount field's value. -func (s *PurchaseRequest) SetInstanceCount(v int64) *PurchaseRequest { - s.InstanceCount = &v +// SetHostIds sets the HostIds field's value. +func (s *ReleaseHostsInput) SetHostIds(v []*string) *ReleaseHostsInput { + s.HostIds = v return s } -// SetPurchaseToken sets the PurchaseToken field's value. -func (s *PurchaseRequest) SetPurchaseToken(v string) *PurchaseRequest { - s.PurchaseToken = &v +type ReleaseHostsOutput struct { + _ struct{} `type:"structure"` + + // The IDs of the Dedicated Hosts that were successfully released. + Successful []*string `locationName:"successful" locationNameList:"item" type:"list"` + + // The IDs of the Dedicated Hosts that could not be released, including an error + // message. + Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s ReleaseHostsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReleaseHostsOutput) GoString() string { + return s.String() +} + +// SetSuccessful sets the Successful field's value. +func (s *ReleaseHostsOutput) SetSuccessful(v []*string) *ReleaseHostsOutput { + s.Successful = v return s } -// Contains the parameters for PurchaseReservedInstancesOffering. -type PurchaseReservedInstancesOfferingInput struct { - _ struct{} `type:"structure"` +// SetUnsuccessful sets the Unsuccessful field's value. +func (s *ReleaseHostsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *ReleaseHostsOutput { + s.Unsuccessful = v + return s +} - // 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 `locationName:"dryRun" type:"boolean"` +type ReplaceIamInstanceProfileAssociationInput struct { + _ struct{} `type:"structure"` - // The number of Reserved Instances to purchase. + // The ID of the existing IAM instance profile association. // - // InstanceCount is a required field - InstanceCount *int64 `type:"integer" required:"true"` - - // Specified for Reserved Instance Marketplace offerings to limit the total - // order and ensure that the Reserved Instances are not purchased at unexpected - // prices. - LimitPrice *ReservedInstanceLimitPrice `locationName:"limitPrice" type:"structure"` + // AssociationId is a required field + AssociationId *string `type:"string" required:"true"` - // The ID of the Reserved Instance offering to purchase. + // The IAM instance profile. // - // ReservedInstancesOfferingId is a required field - ReservedInstancesOfferingId *string `type:"string" required:"true"` + // IamInstanceProfile is a required field + IamInstanceProfile *IamInstanceProfileSpecification `type:"structure" required:"true"` } // String returns the string representation -func (s PurchaseReservedInstancesOfferingInput) String() string { +func (s ReplaceIamInstanceProfileAssociationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s PurchaseReservedInstancesOfferingInput) GoString() string { +func (s ReplaceIamInstanceProfileAssociationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *PurchaseReservedInstancesOfferingInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PurchaseReservedInstancesOfferingInput"} - if s.InstanceCount == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceCount")) +func (s *ReplaceIamInstanceProfileAssociationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReplaceIamInstanceProfileAssociationInput"} + if s.AssociationId == nil { + invalidParams.Add(request.NewErrParamRequired("AssociationId")) } - if s.ReservedInstancesOfferingId == nil { - invalidParams.Add(request.NewErrParamRequired("ReservedInstancesOfferingId")) + if s.IamInstanceProfile == nil { + invalidParams.Add(request.NewErrParamRequired("IamInstanceProfile")) } if invalidParams.Len() > 0 { @@ -58328,102 +71407,80 @@ func (s *PurchaseReservedInstancesOfferingInput) Validate() error { return nil } -// SetDryRun sets the DryRun field's value. -func (s *PurchaseReservedInstancesOfferingInput) SetDryRun(v bool) *PurchaseReservedInstancesOfferingInput { - s.DryRun = &v - return s -} - -// SetInstanceCount sets the InstanceCount field's value. -func (s *PurchaseReservedInstancesOfferingInput) SetInstanceCount(v int64) *PurchaseReservedInstancesOfferingInput { - s.InstanceCount = &v - return s -} - -// SetLimitPrice sets the LimitPrice field's value. -func (s *PurchaseReservedInstancesOfferingInput) SetLimitPrice(v *ReservedInstanceLimitPrice) *PurchaseReservedInstancesOfferingInput { - s.LimitPrice = v +// SetAssociationId sets the AssociationId field's value. +func (s *ReplaceIamInstanceProfileAssociationInput) SetAssociationId(v string) *ReplaceIamInstanceProfileAssociationInput { + s.AssociationId = &v return s } -// SetReservedInstancesOfferingId sets the ReservedInstancesOfferingId field's value. -func (s *PurchaseReservedInstancesOfferingInput) SetReservedInstancesOfferingId(v string) *PurchaseReservedInstancesOfferingInput { - s.ReservedInstancesOfferingId = &v +// SetIamInstanceProfile sets the IamInstanceProfile field's value. +func (s *ReplaceIamInstanceProfileAssociationInput) SetIamInstanceProfile(v *IamInstanceProfileSpecification) *ReplaceIamInstanceProfileAssociationInput { + s.IamInstanceProfile = v return s } -// Contains the output of PurchaseReservedInstancesOffering. -type PurchaseReservedInstancesOfferingOutput struct { +type ReplaceIamInstanceProfileAssociationOutput struct { _ struct{} `type:"structure"` - // The IDs of the purchased Reserved Instances. - ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"` + // Information about the IAM instance profile association. + IamInstanceProfileAssociation *IamInstanceProfileAssociation `locationName:"iamInstanceProfileAssociation" type:"structure"` } // String returns the string representation -func (s PurchaseReservedInstancesOfferingOutput) String() string { +func (s ReplaceIamInstanceProfileAssociationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s PurchaseReservedInstancesOfferingOutput) GoString() string { +func (s ReplaceIamInstanceProfileAssociationOutput) GoString() string { return s.String() } -// SetReservedInstancesId sets the ReservedInstancesId field's value. -func (s *PurchaseReservedInstancesOfferingOutput) SetReservedInstancesId(v string) *PurchaseReservedInstancesOfferingOutput { - s.ReservedInstancesId = &v +// SetIamInstanceProfileAssociation sets the IamInstanceProfileAssociation field's value. +func (s *ReplaceIamInstanceProfileAssociationOutput) SetIamInstanceProfileAssociation(v *IamInstanceProfileAssociation) *ReplaceIamInstanceProfileAssociationOutput { + s.IamInstanceProfileAssociation = v return s } -// Contains the parameters for PurchaseScheduledInstances. -type PurchaseScheduledInstancesInput struct { +type ReplaceNetworkAclAssociationInput struct { _ struct{} `type:"structure"` - // Unique, case-sensitive identifier that ensures the idempotency of the request. - // For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - ClientToken *string `type:"string" idempotencyToken:"true"` + // The ID of the current association between the original network ACL and the + // subnet. + // + // AssociationId is a required field + AssociationId *string `locationName:"associationId" 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"` + DryRun *bool `locationName:"dryRun" type:"boolean"` - // One or more purchase requests. + // The ID of the new network ACL to associate with the subnet. // - // PurchaseRequests is a required field - PurchaseRequests []*PurchaseRequest `locationName:"PurchaseRequest" locationNameList:"PurchaseRequest" min:"1" type:"list" required:"true"` + // NetworkAclId is a required field + NetworkAclId *string `locationName:"networkAclId" type:"string" required:"true"` } // String returns the string representation -func (s PurchaseScheduledInstancesInput) String() string { +func (s ReplaceNetworkAclAssociationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s PurchaseScheduledInstancesInput) GoString() string { +func (s ReplaceNetworkAclAssociationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *PurchaseScheduledInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PurchaseScheduledInstancesInput"} - if s.PurchaseRequests == nil { - invalidParams.Add(request.NewErrParamRequired("PurchaseRequests")) - } - if s.PurchaseRequests != nil && len(s.PurchaseRequests) < 1 { - invalidParams.Add(request.NewErrParamMinLen("PurchaseRequests", 1)) +func (s *ReplaceNetworkAclAssociationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReplaceNetworkAclAssociationInput"} + if s.AssociationId == nil { + invalidParams.Add(request.NewErrParamRequired("AssociationId")) } - if s.PurchaseRequests != nil { - for i, v := range s.PurchaseRequests { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PurchaseRequests", i), err.(request.ErrInvalidParams)) - } - } + if s.NetworkAclId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkAclId")) } if invalidParams.Len() > 0 { @@ -58432,79 +71489,131 @@ func (s *PurchaseScheduledInstancesInput) Validate() error { return nil } -// SetClientToken sets the ClientToken field's value. -func (s *PurchaseScheduledInstancesInput) SetClientToken(v string) *PurchaseScheduledInstancesInput { - s.ClientToken = &v +// SetAssociationId sets the AssociationId field's value. +func (s *ReplaceNetworkAclAssociationInput) SetAssociationId(v string) *ReplaceNetworkAclAssociationInput { + s.AssociationId = &v return s } // SetDryRun sets the DryRun field's value. -func (s *PurchaseScheduledInstancesInput) SetDryRun(v bool) *PurchaseScheduledInstancesInput { +func (s *ReplaceNetworkAclAssociationInput) SetDryRun(v bool) *ReplaceNetworkAclAssociationInput { s.DryRun = &v return s } -// SetPurchaseRequests sets the PurchaseRequests field's value. -func (s *PurchaseScheduledInstancesInput) SetPurchaseRequests(v []*PurchaseRequest) *PurchaseScheduledInstancesInput { - s.PurchaseRequests = v +// SetNetworkAclId sets the NetworkAclId field's value. +func (s *ReplaceNetworkAclAssociationInput) SetNetworkAclId(v string) *ReplaceNetworkAclAssociationInput { + s.NetworkAclId = &v return s } -// Contains the output of PurchaseScheduledInstances. -type PurchaseScheduledInstancesOutput struct { +type ReplaceNetworkAclAssociationOutput struct { _ struct{} `type:"structure"` - // Information about the Scheduled Instances. - ScheduledInstanceSet []*ScheduledInstance `locationName:"scheduledInstanceSet" locationNameList:"item" type:"list"` + // The ID of the new association. + NewAssociationId *string `locationName:"newAssociationId" type:"string"` } // String returns the string representation -func (s PurchaseScheduledInstancesOutput) String() string { +func (s ReplaceNetworkAclAssociationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s PurchaseScheduledInstancesOutput) GoString() string { +func (s ReplaceNetworkAclAssociationOutput) GoString() string { return s.String() } -// SetScheduledInstanceSet sets the ScheduledInstanceSet field's value. -func (s *PurchaseScheduledInstancesOutput) SetScheduledInstanceSet(v []*ScheduledInstance) *PurchaseScheduledInstancesOutput { - s.ScheduledInstanceSet = v +// SetNewAssociationId sets the NewAssociationId field's value. +func (s *ReplaceNetworkAclAssociationOutput) SetNewAssociationId(v string) *ReplaceNetworkAclAssociationOutput { + s.NewAssociationId = &v return s } -// Contains the parameters for RebootInstances. -type RebootInstancesInput struct { +type ReplaceNetworkAclEntryInput 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 `locationName:"dryRun" type:"boolean"` + // The IPv4 network range to allow or deny, in CIDR notation (for example 172.16.0.0/24). + CidrBlock *string `locationName:"cidrBlock" 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 `locationName:"dryRun" type:"boolean"` + + // Indicates whether to replace the egress rule. + // + // Default: If no value is specified, we replace the ingress rule. + // + // Egress is a required field + Egress *bool `locationName:"egress" type:"boolean" required:"true"` + + // ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying protocol + // 1 (ICMP) or protocol 58 (ICMPv6) with an IPv6 CIDR block. + IcmpTypeCode *IcmpTypeCode `locationName:"Icmp" type:"structure"` + + // The IPv6 network range to allow or deny, in CIDR notation (for example 2001:bd8:1234:1a00::/64). + Ipv6CidrBlock *string `locationName:"ipv6CidrBlock" type:"string"` + + // The ID of the ACL. + // + // NetworkAclId is a required field + NetworkAclId *string `locationName:"networkAclId" type:"string" required:"true"` + + // TCP or UDP protocols: The range of ports the rule applies to. Required if + // specifying protocol 6 (TCP) or 17 (UDP). + PortRange *PortRange `locationName:"portRange" type:"structure"` + + // The protocol number. A value of "-1" means all protocols. If you specify + // "-1" or a protocol number other than "6" (TCP), "17" (UDP), or "1" (ICMP), + // traffic on all ports is allowed, regardless of any ports or ICMP types or + // codes that you specify. If you specify protocol "58" (ICMPv6) and specify + // an IPv4 CIDR block, traffic for all ICMP types and codes allowed, regardless + // of any that you specify. If you specify protocol "58" (ICMPv6) and specify + // an IPv6 CIDR block, you must specify an ICMP type and code. + // + // Protocol is a required field + Protocol *string `locationName:"protocol" type:"string" required:"true"` + + // Indicates whether to allow or deny the traffic that matches the rule. + // + // RuleAction is a required field + RuleAction *string `locationName:"ruleAction" type:"string" required:"true" enum:"RuleAction"` - // One or more instance IDs. + // The rule number of the entry to replace. // - // InstanceIds is a required field - InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"` + // RuleNumber is a required field + RuleNumber *int64 `locationName:"ruleNumber" type:"integer" required:"true"` } // String returns the string representation -func (s RebootInstancesInput) String() string { +func (s ReplaceNetworkAclEntryInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s RebootInstancesInput) GoString() string { +func (s ReplaceNetworkAclEntryInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *RebootInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RebootInstancesInput"} - if s.InstanceIds == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceIds")) +func (s *ReplaceNetworkAclEntryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReplaceNetworkAclEntryInput"} + if s.Egress == nil { + invalidParams.Add(request.NewErrParamRequired("Egress")) + } + if s.NetworkAclId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkAclId")) + } + if s.Protocol == nil { + invalidParams.Add(request.NewErrParamRequired("Protocol")) + } + if s.RuleAction == nil { + invalidParams.Add(request.NewErrParamRequired("RuleAction")) + } + if s.RuleNumber == nil { + invalidParams.Add(request.NewErrParamRequired("RuleNumber")) } if invalidParams.Len() > 0 { @@ -58513,118 +71622,90 @@ func (s *RebootInstancesInput) Validate() error { return nil } -// SetDryRun sets the DryRun field's value. -func (s *RebootInstancesInput) SetDryRun(v bool) *RebootInstancesInput { - s.DryRun = &v +// SetCidrBlock sets the CidrBlock field's value. +func (s *ReplaceNetworkAclEntryInput) SetCidrBlock(v string) *ReplaceNetworkAclEntryInput { + s.CidrBlock = &v return s } -// SetInstanceIds sets the InstanceIds field's value. -func (s *RebootInstancesInput) SetInstanceIds(v []*string) *RebootInstancesInput { - s.InstanceIds = v +// SetDryRun sets the DryRun field's value. +func (s *ReplaceNetworkAclEntryInput) SetDryRun(v bool) *ReplaceNetworkAclEntryInput { + s.DryRun = &v return s } -type RebootInstancesOutput struct { - _ struct{} `type:"structure"` +// SetEgress sets the Egress field's value. +func (s *ReplaceNetworkAclEntryInput) SetEgress(v bool) *ReplaceNetworkAclEntryInput { + s.Egress = &v + return s } -// String returns the string representation -func (s RebootInstancesOutput) String() string { - return awsutil.Prettify(s) +// SetIcmpTypeCode sets the IcmpTypeCode field's value. +func (s *ReplaceNetworkAclEntryInput) SetIcmpTypeCode(v *IcmpTypeCode) *ReplaceNetworkAclEntryInput { + s.IcmpTypeCode = v + return s } -// GoString returns the string representation -func (s RebootInstancesOutput) GoString() string { - return s.String() +// SetIpv6CidrBlock sets the Ipv6CidrBlock field's value. +func (s *ReplaceNetworkAclEntryInput) SetIpv6CidrBlock(v string) *ReplaceNetworkAclEntryInput { + s.Ipv6CidrBlock = &v + return s } -// Describes a recurring charge. -type RecurringCharge struct { - _ struct{} `type:"structure"` - - // The amount of the recurring charge. - Amount *float64 `locationName:"amount" type:"double"` - - // The frequency of the recurring charge. - Frequency *string `locationName:"frequency" type:"string" enum:"RecurringChargeFrequency"` +// SetNetworkAclId sets the NetworkAclId field's value. +func (s *ReplaceNetworkAclEntryInput) SetNetworkAclId(v string) *ReplaceNetworkAclEntryInput { + s.NetworkAclId = &v + return s } -// String returns the string representation -func (s RecurringCharge) String() string { - return awsutil.Prettify(s) +// SetPortRange sets the PortRange field's value. +func (s *ReplaceNetworkAclEntryInput) SetPortRange(v *PortRange) *ReplaceNetworkAclEntryInput { + s.PortRange = v + return s } -// GoString returns the string representation -func (s RecurringCharge) GoString() string { - return s.String() +// SetProtocol sets the Protocol field's value. +func (s *ReplaceNetworkAclEntryInput) SetProtocol(v string) *ReplaceNetworkAclEntryInput { + s.Protocol = &v + return s } -// SetAmount sets the Amount field's value. -func (s *RecurringCharge) SetAmount(v float64) *RecurringCharge { - s.Amount = &v +// SetRuleAction sets the RuleAction field's value. +func (s *ReplaceNetworkAclEntryInput) SetRuleAction(v string) *ReplaceNetworkAclEntryInput { + s.RuleAction = &v return s } -// SetFrequency sets the Frequency field's value. -func (s *RecurringCharge) SetFrequency(v string) *RecurringCharge { - s.Frequency = &v +// SetRuleNumber sets the RuleNumber field's value. +func (s *ReplaceNetworkAclEntryInput) SetRuleNumber(v int64) *ReplaceNetworkAclEntryInput { + s.RuleNumber = &v return s } -// Describes a region. -type Region struct { +type ReplaceNetworkAclEntryOutput struct { _ struct{} `type:"structure"` - - // The region service endpoint. - Endpoint *string `locationName:"regionEndpoint" type:"string"` - - // The name of the region. - RegionName *string `locationName:"regionName" type:"string"` } // String returns the string representation -func (s Region) String() string { +func (s ReplaceNetworkAclEntryOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Region) GoString() string { +func (s ReplaceNetworkAclEntryOutput) GoString() string { return s.String() } -// SetEndpoint sets the Endpoint field's value. -func (s *Region) SetEndpoint(v string) *Region { - s.Endpoint = &v - return s -} - -// SetRegionName sets the RegionName field's value. -func (s *Region) SetRegionName(v string) *Region { - s.RegionName = &v - return s -} - -// Contains the parameters for RegisterImage. -type RegisterImageInput struct { +type ReplaceRouteInput struct { _ struct{} `type:"structure"` - // The architecture of the AMI. - // - // Default: For Amazon EBS-backed AMIs, i386. For instance store-backed AMIs, - // the architecture specified in the manifest file. - Architecture *string `locationName:"architecture" type:"string" enum:"ArchitectureValues"` - - // The billing product codes. Your account must be authorized to specify billing - // product codes. Otherwise, you can use the AWS Marketplace to bill for the - // use of an AMI. - BillingProducts []*string `locationName:"BillingProduct" locationNameList:"item" type:"list"` - - // One or more block device mapping entries. - BlockDeviceMappings []*BlockDeviceMapping `locationName:"BlockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"` + // The IPv4 CIDR address block used for the destination match. The value that + // you provide must match the CIDR of an existing route in the table. + DestinationCidrBlock *string `locationName:"destinationCidrBlock" type:"string"` - // A description for your AMI. - Description *string `locationName:"description" type:"string"` + // The IPv6 CIDR address block used for the destination match. The value that + // you provide must match the CIDR of an existing route in the table. + DestinationIpv6CidrBlock *string `locationName:"destinationIpv6CidrBlock" 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 @@ -58632,65 +71713,48 @@ type RegisterImageInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // Set to true to enable enhanced networking with ENA for the AMI and any instances - // that you launch from the AMI. - // - // This option is supported only for HVM AMIs. Specifying this option with a - // PV AMI can make instances launched from the AMI unreachable. - EnaSupport *bool `locationName:"enaSupport" type:"boolean"` - - // The full path to your AMI manifest in Amazon S3 storage. - ImageLocation *string `type:"string"` + // [IPv6 traffic only] The ID of an egress-only internet gateway. + EgressOnlyInternetGatewayId *string `locationName:"egressOnlyInternetGatewayId" type:"string"` - // The ID of the kernel. - KernelId *string `locationName:"kernelId" type:"string"` + // The ID of an internet gateway or virtual private gateway. + GatewayId *string `locationName:"gatewayId" type:"string"` - // A name for your AMI. - // - // Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets - // ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), - // at-signs (@), or underscores(_) - // - // Name is a required field - Name *string `locationName:"name" type:"string" required:"true"` + // The ID of a NAT instance in your VPC. + InstanceId *string `locationName:"instanceId" type:"string"` - // The ID of the RAM disk. - RamdiskId *string `locationName:"ramdiskId" type:"string"` + // [IPv4 traffic only] The ID of a NAT gateway. + NatGatewayId *string `locationName:"natGatewayId" type:"string"` - // The device name of the root device volume (for example, /dev/sda1). - RootDeviceName *string `locationName:"rootDeviceName" type:"string"` + // The ID of a network interface. + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` - // Set to simple to enable enhanced networking with the Intel 82599 Virtual - // Function interface for the AMI and any instances that you launch from the - // AMI. - // - // There is no way to disable sriovNetSupport at this time. + // The ID of the route table. // - // This option is supported only for HVM AMIs. Specifying this option with a - // PV AMI can make instances launched from the AMI unreachable. - SriovNetSupport *string `locationName:"sriovNetSupport" type:"string"` + // RouteTableId is a required field + RouteTableId *string `locationName:"routeTableId" type:"string" required:"true"` - // The type of virtualization (hvm | paravirtual). - // - // Default: paravirtual - VirtualizationType *string `locationName:"virtualizationType" type:"string"` + // The ID of a transit gateway. + TransitGatewayId *string `type:"string"` + + // The ID of a VPC peering connection. + VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string"` } // String returns the string representation -func (s RegisterImageInput) String() string { +func (s ReplaceRouteInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s RegisterImageInput) GoString() string { +func (s ReplaceRouteInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterImageInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterImageInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) +func (s *ReplaceRouteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReplaceRouteInput"} + if s.RouteTableId == nil { + invalidParams.Add(request.NewErrParamRequired("RouteTableId")) } if invalidParams.Len() > 0 { @@ -58699,146 +71763,124 @@ func (s *RegisterImageInput) Validate() error { return nil } -// SetArchitecture sets the Architecture field's value. -func (s *RegisterImageInput) SetArchitecture(v string) *RegisterImageInput { - s.Architecture = &v - return s -} - -// SetBillingProducts sets the BillingProducts field's value. -func (s *RegisterImageInput) SetBillingProducts(v []*string) *RegisterImageInput { - s.BillingProducts = v - return s -} - -// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *RegisterImageInput) SetBlockDeviceMappings(v []*BlockDeviceMapping) *RegisterImageInput { - s.BlockDeviceMappings = v +// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. +func (s *ReplaceRouteInput) SetDestinationCidrBlock(v string) *ReplaceRouteInput { + s.DestinationCidrBlock = &v return s } -// SetDescription sets the Description field's value. -func (s *RegisterImageInput) SetDescription(v string) *RegisterImageInput { - s.Description = &v +// SetDestinationIpv6CidrBlock sets the DestinationIpv6CidrBlock field's value. +func (s *ReplaceRouteInput) SetDestinationIpv6CidrBlock(v string) *ReplaceRouteInput { + s.DestinationIpv6CidrBlock = &v return s } // SetDryRun sets the DryRun field's value. -func (s *RegisterImageInput) SetDryRun(v bool) *RegisterImageInput { +func (s *ReplaceRouteInput) SetDryRun(v bool) *ReplaceRouteInput { s.DryRun = &v return s } -// SetEnaSupport sets the EnaSupport field's value. -func (s *RegisterImageInput) SetEnaSupport(v bool) *RegisterImageInput { - s.EnaSupport = &v +// SetEgressOnlyInternetGatewayId sets the EgressOnlyInternetGatewayId field's value. +func (s *ReplaceRouteInput) SetEgressOnlyInternetGatewayId(v string) *ReplaceRouteInput { + s.EgressOnlyInternetGatewayId = &v return s } -// SetImageLocation sets the ImageLocation field's value. -func (s *RegisterImageInput) SetImageLocation(v string) *RegisterImageInput { - s.ImageLocation = &v +// SetGatewayId sets the GatewayId field's value. +func (s *ReplaceRouteInput) SetGatewayId(v string) *ReplaceRouteInput { + s.GatewayId = &v return s } -// SetKernelId sets the KernelId field's value. -func (s *RegisterImageInput) SetKernelId(v string) *RegisterImageInput { - s.KernelId = &v +// SetInstanceId sets the InstanceId field's value. +func (s *ReplaceRouteInput) SetInstanceId(v string) *ReplaceRouteInput { + s.InstanceId = &v return s } -// SetName sets the Name field's value. -func (s *RegisterImageInput) SetName(v string) *RegisterImageInput { - s.Name = &v +// SetNatGatewayId sets the NatGatewayId field's value. +func (s *ReplaceRouteInput) SetNatGatewayId(v string) *ReplaceRouteInput { + s.NatGatewayId = &v return s } -// SetRamdiskId sets the RamdiskId field's value. -func (s *RegisterImageInput) SetRamdiskId(v string) *RegisterImageInput { - s.RamdiskId = &v +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *ReplaceRouteInput) SetNetworkInterfaceId(v string) *ReplaceRouteInput { + s.NetworkInterfaceId = &v return s } -// SetRootDeviceName sets the RootDeviceName field's value. -func (s *RegisterImageInput) SetRootDeviceName(v string) *RegisterImageInput { - s.RootDeviceName = &v +// SetRouteTableId sets the RouteTableId field's value. +func (s *ReplaceRouteInput) SetRouteTableId(v string) *ReplaceRouteInput { + s.RouteTableId = &v return s } -// SetSriovNetSupport sets the SriovNetSupport field's value. -func (s *RegisterImageInput) SetSriovNetSupport(v string) *RegisterImageInput { - s.SriovNetSupport = &v +// SetTransitGatewayId sets the TransitGatewayId field's value. +func (s *ReplaceRouteInput) SetTransitGatewayId(v string) *ReplaceRouteInput { + s.TransitGatewayId = &v return s } -// SetVirtualizationType sets the VirtualizationType field's value. -func (s *RegisterImageInput) SetVirtualizationType(v string) *RegisterImageInput { - s.VirtualizationType = &v +// SetVpcPeeringConnectionId sets the VpcPeeringConnectionId field's value. +func (s *ReplaceRouteInput) SetVpcPeeringConnectionId(v string) *ReplaceRouteInput { + s.VpcPeeringConnectionId = &v return s } -// Contains the output of RegisterImage. -type RegisterImageOutput struct { +type ReplaceRouteOutput struct { _ struct{} `type:"structure"` - - // The ID of the newly registered AMI. - ImageId *string `locationName:"imageId" type:"string"` } // String returns the string representation -func (s RegisterImageOutput) String() string { +func (s ReplaceRouteOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s RegisterImageOutput) GoString() string { +func (s ReplaceRouteOutput) GoString() string { return s.String() } -// SetImageId sets the ImageId field's value. -func (s *RegisterImageOutput) SetImageId(v string) *RegisterImageOutput { - s.ImageId = &v - return s -} - -type RejectVpcEndpointConnectionsInput struct { +type ReplaceRouteTableAssociationInput struct { _ struct{} `type:"structure"` + // The association ID. + // + // AssociationId is a required field + AssociationId *string `locationName:"associationId" 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 service. - // - // ServiceId is a required field - ServiceId *string `type:"string" required:"true"` + DryRun *bool `locationName:"dryRun" type:"boolean"` - // The IDs of one or more VPC endpoints. + // The ID of the new route table to associate with the subnet. // - // VpcEndpointIds is a required field - VpcEndpointIds []*string `locationName:"VpcEndpointId" locationNameList:"item" type:"list" required:"true"` + // RouteTableId is a required field + RouteTableId *string `locationName:"routeTableId" type:"string" required:"true"` } // String returns the string representation -func (s RejectVpcEndpointConnectionsInput) String() string { +func (s ReplaceRouteTableAssociationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s RejectVpcEndpointConnectionsInput) GoString() string { +func (s ReplaceRouteTableAssociationInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *RejectVpcEndpointConnectionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RejectVpcEndpointConnectionsInput"} - if s.ServiceId == nil { - invalidParams.Add(request.NewErrParamRequired("ServiceId")) +func (s *ReplaceRouteTableAssociationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReplaceRouteTableAssociationInput"} + if s.AssociationId == nil { + invalidParams.Add(request.NewErrParamRequired("AssociationId")) } - if s.VpcEndpointIds == nil { - invalidParams.Add(request.NewErrParamRequired("VpcEndpointIds")) + if s.RouteTableId == nil { + invalidParams.Add(request.NewErrParamRequired("RouteTableId")) } if invalidParams.Len() > 0 { @@ -58847,78 +71889,92 @@ func (s *RejectVpcEndpointConnectionsInput) Validate() error { return nil } -// SetDryRun sets the DryRun field's value. -func (s *RejectVpcEndpointConnectionsInput) SetDryRun(v bool) *RejectVpcEndpointConnectionsInput { - s.DryRun = &v +// SetAssociationId sets the AssociationId field's value. +func (s *ReplaceRouteTableAssociationInput) SetAssociationId(v string) *ReplaceRouteTableAssociationInput { + s.AssociationId = &v return s } -// SetServiceId sets the ServiceId field's value. -func (s *RejectVpcEndpointConnectionsInput) SetServiceId(v string) *RejectVpcEndpointConnectionsInput { - s.ServiceId = &v +// SetDryRun sets the DryRun field's value. +func (s *ReplaceRouteTableAssociationInput) SetDryRun(v bool) *ReplaceRouteTableAssociationInput { + s.DryRun = &v return s } -// SetVpcEndpointIds sets the VpcEndpointIds field's value. -func (s *RejectVpcEndpointConnectionsInput) SetVpcEndpointIds(v []*string) *RejectVpcEndpointConnectionsInput { - s.VpcEndpointIds = v +// SetRouteTableId sets the RouteTableId field's value. +func (s *ReplaceRouteTableAssociationInput) SetRouteTableId(v string) *ReplaceRouteTableAssociationInput { + s.RouteTableId = &v return s } -type RejectVpcEndpointConnectionsOutput struct { +type ReplaceRouteTableAssociationOutput struct { _ struct{} `type:"structure"` - // Information about the endpoints that were not rejected, if applicable. - Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"` + // The ID of the new association. + NewAssociationId *string `locationName:"newAssociationId" type:"string"` } // String returns the string representation -func (s RejectVpcEndpointConnectionsOutput) String() string { +func (s ReplaceRouteTableAssociationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s RejectVpcEndpointConnectionsOutput) GoString() string { +func (s ReplaceRouteTableAssociationOutput) GoString() string { return s.String() } -// SetUnsuccessful sets the Unsuccessful field's value. -func (s *RejectVpcEndpointConnectionsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *RejectVpcEndpointConnectionsOutput { - s.Unsuccessful = v +// SetNewAssociationId sets the NewAssociationId field's value. +func (s *ReplaceRouteTableAssociationOutput) SetNewAssociationId(v string) *ReplaceRouteTableAssociationOutput { + s.NewAssociationId = &v return s } -// Contains the parameters for RejectVpcPeeringConnection. -type RejectVpcPeeringConnectionInput struct { +type ReplaceTransitGatewayRouteInput struct { _ struct{} `type:"structure"` + // Indicates whether traffic matching this route is to be dropped. + Blackhole *bool `type:"boolean"` + + // The CIDR range used for the destination match. Routing decisions are based + // on the most specific match. + // + // DestinationCidrBlock is a required field + DestinationCidrBlock *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 `locationName:"dryRun" type:"boolean"` + DryRun *bool `type:"boolean"` - // The ID of the VPC peering connection. + // The ID of the attachment. + TransitGatewayAttachmentId *string `type:"string"` + + // The ID of the route table. // - // VpcPeeringConnectionId is a required field - VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string" required:"true"` + // TransitGatewayRouteTableId is a required field + TransitGatewayRouteTableId *string `type:"string" required:"true"` } // String returns the string representation -func (s RejectVpcPeeringConnectionInput) String() string { +func (s ReplaceTransitGatewayRouteInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s RejectVpcPeeringConnectionInput) GoString() string { +func (s ReplaceTransitGatewayRouteInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *RejectVpcPeeringConnectionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RejectVpcPeeringConnectionInput"} - if s.VpcPeeringConnectionId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcPeeringConnectionId")) +func (s *ReplaceTransitGatewayRouteInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReplaceTransitGatewayRouteInput"} + if s.DestinationCidrBlock == nil { + invalidParams.Add(request.NewErrParamRequired("DestinationCidrBlock")) + } + if s.TransitGatewayRouteTableId == nil { + invalidParams.Add(request.NewErrParamRequired("TransitGatewayRouteTableId")) } if invalidParams.Len() > 0 { @@ -58927,126 +71983,360 @@ func (s *RejectVpcPeeringConnectionInput) Validate() error { return nil } +// SetBlackhole sets the Blackhole field's value. +func (s *ReplaceTransitGatewayRouteInput) SetBlackhole(v bool) *ReplaceTransitGatewayRouteInput { + s.Blackhole = &v + return s +} + +// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. +func (s *ReplaceTransitGatewayRouteInput) SetDestinationCidrBlock(v string) *ReplaceTransitGatewayRouteInput { + s.DestinationCidrBlock = &v + return s +} + // SetDryRun sets the DryRun field's value. -func (s *RejectVpcPeeringConnectionInput) SetDryRun(v bool) *RejectVpcPeeringConnectionInput { +func (s *ReplaceTransitGatewayRouteInput) SetDryRun(v bool) *ReplaceTransitGatewayRouteInput { s.DryRun = &v return s } -// SetVpcPeeringConnectionId sets the VpcPeeringConnectionId field's value. -func (s *RejectVpcPeeringConnectionInput) SetVpcPeeringConnectionId(v string) *RejectVpcPeeringConnectionInput { - s.VpcPeeringConnectionId = &v +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *ReplaceTransitGatewayRouteInput) SetTransitGatewayAttachmentId(v string) *ReplaceTransitGatewayRouteInput { + s.TransitGatewayAttachmentId = &v return s } -// Contains the output of RejectVpcPeeringConnection. -type RejectVpcPeeringConnectionOutput struct { +// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. +func (s *ReplaceTransitGatewayRouteInput) SetTransitGatewayRouteTableId(v string) *ReplaceTransitGatewayRouteInput { + s.TransitGatewayRouteTableId = &v + return s +} + +type ReplaceTransitGatewayRouteOutput struct { _ struct{} `type:"structure"` - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool `locationName:"return" type:"boolean"` + // Information about the modified route. + Route *TransitGatewayRoute `locationName:"route" type:"structure"` } // String returns the string representation -func (s RejectVpcPeeringConnectionOutput) String() string { +func (s ReplaceTransitGatewayRouteOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s RejectVpcPeeringConnectionOutput) GoString() string { +func (s ReplaceTransitGatewayRouteOutput) GoString() string { return s.String() } -// SetReturn sets the Return field's value. -func (s *RejectVpcPeeringConnectionOutput) SetReturn(v bool) *RejectVpcPeeringConnectionOutput { - s.Return = &v +// SetRoute sets the Route field's value. +func (s *ReplaceTransitGatewayRouteOutput) SetRoute(v *TransitGatewayRoute) *ReplaceTransitGatewayRouteOutput { + s.Route = v + return s +} + +type ReportInstanceStatusInput struct { + _ struct{} `type:"structure"` + + // Descriptive text about the health state of your instance. + Description *string `locationName:"description" 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 `locationName:"dryRun" type:"boolean"` + + // The time at which the reported instance health state ended. + EndTime *time.Time `locationName:"endTime" type:"timestamp"` + + // One or more instances. + // + // Instances is a required field + Instances []*string `locationName:"instanceId" locationNameList:"InstanceId" type:"list" required:"true"` + + // One or more reason codes that describe the health state of your instance. + // + // * instance-stuck-in-state: My instance is stuck in a state. + // + // * unresponsive: My instance is unresponsive. + // + // * not-accepting-credentials: My instance is not accepting my credentials. + // + // * password-not-available: A password is not available for my instance. + // + // * performance-network: My instance is experiencing performance problems + // that I believe are network related. + // + // * performance-instance-store: My instance is experiencing performance + // problems that I believe are related to the instance stores. + // + // * performance-ebs-volume: My instance is experiencing performance problems + // that I believe are related to an EBS volume. + // + // * performance-other: My instance is experiencing performance problems. + // + // * other: [explain using the description parameter] + // + // ReasonCodes is a required field + ReasonCodes []*string `locationName:"reasonCode" locationNameList:"item" type:"list" required:"true"` + + // The time at which the reported instance health state began. + StartTime *time.Time `locationName:"startTime" type:"timestamp"` + + // The status of all instances listed. + // + // Status is a required field + Status *string `locationName:"status" type:"string" required:"true" enum:"ReportStatusType"` +} + +// String returns the string representation +func (s ReportInstanceStatusInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReportInstanceStatusInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ReportInstanceStatusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReportInstanceStatusInput"} + if s.Instances == nil { + invalidParams.Add(request.NewErrParamRequired("Instances")) + } + if s.ReasonCodes == nil { + invalidParams.Add(request.NewErrParamRequired("ReasonCodes")) + } + if s.Status == nil { + invalidParams.Add(request.NewErrParamRequired("Status")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *ReportInstanceStatusInput) SetDescription(v string) *ReportInstanceStatusInput { + s.Description = &v return s } -// Contains the parameters for ReleaseAddress. -type ReleaseAddressInput struct { - _ struct{} `type:"structure"` - - // [EC2-VPC] The allocation ID. Required for EC2-VPC. - AllocationId *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 `locationName:"dryRun" type:"boolean"` - - // [EC2-Classic] The Elastic IP address. Required for EC2-Classic. - PublicIp *string `type:"string"` +// SetDryRun sets the DryRun field's value. +func (s *ReportInstanceStatusInput) SetDryRun(v bool) *ReportInstanceStatusInput { + s.DryRun = &v + return s } -// String returns the string representation -func (s ReleaseAddressInput) String() string { - return awsutil.Prettify(s) +// SetEndTime sets the EndTime field's value. +func (s *ReportInstanceStatusInput) SetEndTime(v time.Time) *ReportInstanceStatusInput { + s.EndTime = &v + return s } -// GoString returns the string representation -func (s ReleaseAddressInput) GoString() string { - return s.String() +// SetInstances sets the Instances field's value. +func (s *ReportInstanceStatusInput) SetInstances(v []*string) *ReportInstanceStatusInput { + s.Instances = v + return s } -// SetAllocationId sets the AllocationId field's value. -func (s *ReleaseAddressInput) SetAllocationId(v string) *ReleaseAddressInput { - s.AllocationId = &v +// SetReasonCodes sets the ReasonCodes field's value. +func (s *ReportInstanceStatusInput) SetReasonCodes(v []*string) *ReportInstanceStatusInput { + s.ReasonCodes = v return s } -// SetDryRun sets the DryRun field's value. -func (s *ReleaseAddressInput) SetDryRun(v bool) *ReleaseAddressInput { - s.DryRun = &v +// SetStartTime sets the StartTime field's value. +func (s *ReportInstanceStatusInput) SetStartTime(v time.Time) *ReportInstanceStatusInput { + s.StartTime = &v return s } -// SetPublicIp sets the PublicIp field's value. -func (s *ReleaseAddressInput) SetPublicIp(v string) *ReleaseAddressInput { - s.PublicIp = &v +// SetStatus sets the Status field's value. +func (s *ReportInstanceStatusInput) SetStatus(v string) *ReportInstanceStatusInput { + s.Status = &v return s } -type ReleaseAddressOutput struct { +type ReportInstanceStatusOutput struct { _ struct{} `type:"structure"` } // String returns the string representation -func (s ReleaseAddressOutput) String() string { +func (s ReportInstanceStatusOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ReleaseAddressOutput) GoString() string { +func (s ReportInstanceStatusOutput) GoString() string { return s.String() } -// Contains the parameters for ReleaseHosts. -type ReleaseHostsInput struct { +// The information to include in the launch template. +type RequestLaunchTemplateData struct { _ struct{} `type:"structure"` - // The IDs of the Dedicated Hosts to release. + // The block device mapping. // - // HostIds is a required field - HostIds []*string `locationName:"hostId" locationNameList:"item" type:"list" required:"true"` + // Supplying both a snapshot ID and an encryption value as arguments for block-device + // mapping results in an error. This is because only blank volumes can be encrypted + // on start, and these are not created from a snapshot. If a snapshot is the + // basis for the volume, it contains data by definition and its encryption status + // cannot be changed using this action. + BlockDeviceMappings []*LaunchTemplateBlockDeviceMappingRequest `locationName:"BlockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"` + + // The Capacity Reservation targeting option. + CapacityReservationSpecification *LaunchTemplateCapacityReservationSpecificationRequest `type:"structure"` + + // The CPU options for the instance. For more information, see Optimizing CPU + // Options (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) + // in the Amazon Elastic Compute Cloud User Guide. + CpuOptions *LaunchTemplateCpuOptionsRequest `type:"structure"` + + // The credit option for CPU usage of the instance. Valid for T2 or T3 instances + // only. + CreditSpecification *CreditSpecificationRequest `type:"structure"` + + // If set to true, you can't terminate the instance using the Amazon EC2 console, + // CLI, or API. To change this attribute to false after launch, use ModifyInstanceAttribute. + DisableApiTermination *bool `type:"boolean"` + + // Indicates whether the instance is optimized for Amazon EBS I/O. This optimization + // provides dedicated throughput to Amazon EBS and an optimized configuration + // stack to provide optimal Amazon EBS I/O performance. This optimization isn't + // available with all instance types. Additional usage charges apply when using + // an EBS-optimized instance. + EbsOptimized *bool `type:"boolean"` + + // An elastic GPU to associate with the instance. + ElasticGpuSpecifications []*ElasticGpuSpecification `locationName:"ElasticGpuSpecification" locationNameList:"ElasticGpuSpecification" type:"list"` + + // The elastic inference accelerator for the instance. + ElasticInferenceAccelerators []*LaunchTemplateElasticInferenceAccelerator `locationName:"ElasticInferenceAccelerator" locationNameList:"item" type:"list"` + + // Indicates whether an instance is enabled for hibernation. This parameter + // is valid only if the instance meets the hibernation prerequisites (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#hibernating-prerequisites). + // Hibernation is currently supported only for Amazon Linux. For more information, + // see Hibernate Your Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) + // in the Amazon Elastic Compute Cloud User Guide. + HibernationOptions *LaunchTemplateHibernationOptionsRequest `type:"structure"` + + // The IAM instance profile. + IamInstanceProfile *LaunchTemplateIamInstanceProfileSpecificationRequest `type:"structure"` + + // The ID of the AMI, which you can get by using DescribeImages. + ImageId *string `type:"string"` + + // Indicates whether an instance stops or terminates when you initiate shutdown + // from the instance (using the operating system command for system shutdown). + // + // Default: stop + InstanceInitiatedShutdownBehavior *string `type:"string" enum:"ShutdownBehavior"` + + // The market (purchasing) option for the instances. + InstanceMarketOptions *LaunchTemplateInstanceMarketOptionsRequest `type:"structure"` + + // The instance type. For more information, see Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) + // in the Amazon Elastic Compute Cloud User Guide. + InstanceType *string `type:"string" enum:"InstanceType"` + + // The ID of the kernel. + // + // We recommend that you use PV-GRUB instead of kernels and RAM disks. For more + // information, see User Provided Kernels (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html) + // in the Amazon Elastic Compute Cloud User Guide. + KernelId *string `type:"string"` + + // The name of the key pair. You can create a key pair using CreateKeyPair or + // ImportKeyPair. + // + // If you do not specify a key pair, you can't connect to the instance unless + // you choose an AMI that is configured to allow users another way to log in. + KeyName *string `type:"string"` + + // The license configurations. + LicenseSpecifications []*LaunchTemplateLicenseConfigurationRequest `locationName:"LicenseSpecification" locationNameList:"item" type:"list"` + + // The monitoring for the instance. + Monitoring *LaunchTemplatesMonitoringRequest `type:"structure"` + + // One or more network interfaces. + NetworkInterfaces []*LaunchTemplateInstanceNetworkInterfaceSpecificationRequest `locationName:"NetworkInterface" locationNameList:"InstanceNetworkInterfaceSpecification" type:"list"` + + // The placement for the instance. + Placement *LaunchTemplatePlacementRequest `type:"structure"` + + // The ID of the RAM disk. + // + // We recommend that you use PV-GRUB instead of kernels and RAM disks. For more + // information, see User Provided Kernels (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html) + // in the Amazon Elastic Compute Cloud User Guide. + RamDiskId *string `type:"string"` + + // One or more security group IDs. You can create a security group using CreateSecurityGroup. + // You cannot specify both a security group ID and security name in the same + // request. + SecurityGroupIds []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"` + + // [EC2-Classic, default VPC] One or more security group names. For a nondefault + // VPC, you must use security group IDs instead. You cannot specify both a security + // group ID and security name in the same request. + SecurityGroups []*string `locationName:"SecurityGroup" locationNameList:"SecurityGroup" type:"list"` + + // The tags to apply to the resources during launch. You can only tag instances + // and volumes on launch. The specified tags are applied to all instances or + // volumes that are created during launch. To tag a resource after it has been + // created, see CreateTags. + TagSpecifications []*LaunchTemplateTagSpecificationRequest `locationName:"TagSpecification" locationNameList:"LaunchTemplateTagSpecificationRequest" type:"list"` + + // The Base64-encoded user data to make available to the instance. For more + // information, see Running Commands on Your Linux Instance at Launch (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html) + // (Linux) and Adding User Data (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html#instancedata-add-user-data) + // (Windows). + UserData *string `type:"string"` } // String returns the string representation -func (s ReleaseHostsInput) String() string { +func (s RequestLaunchTemplateData) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ReleaseHostsInput) GoString() string { +func (s RequestLaunchTemplateData) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ReleaseHostsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReleaseHostsInput"} - if s.HostIds == nil { - invalidParams.Add(request.NewErrParamRequired("HostIds")) +func (s *RequestLaunchTemplateData) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RequestLaunchTemplateData"} + if s.CreditSpecification != nil { + if err := s.CreditSpecification.Validate(); err != nil { + invalidParams.AddNested("CreditSpecification", err.(request.ErrInvalidParams)) + } + } + if s.ElasticGpuSpecifications != nil { + for i, v := range s.ElasticGpuSpecifications { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ElasticGpuSpecifications", i), err.(request.ErrInvalidParams)) + } + } + } + if s.ElasticInferenceAccelerators != nil { + for i, v := range s.ElasticInferenceAccelerators { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ElasticInferenceAccelerators", i), err.(request.ErrInvalidParams)) + } + } } if invalidParams.Len() > 0 { @@ -59055,130 +72345,159 @@ func (s *ReleaseHostsInput) Validate() error { return nil } -// SetHostIds sets the HostIds field's value. -func (s *ReleaseHostsInput) SetHostIds(v []*string) *ReleaseHostsInput { - s.HostIds = v +// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. +func (s *RequestLaunchTemplateData) SetBlockDeviceMappings(v []*LaunchTemplateBlockDeviceMappingRequest) *RequestLaunchTemplateData { + s.BlockDeviceMappings = v return s } -// Contains the output of ReleaseHosts. -type ReleaseHostsOutput struct { - _ struct{} `type:"structure"` +// SetCapacityReservationSpecification sets the CapacityReservationSpecification field's value. +func (s *RequestLaunchTemplateData) SetCapacityReservationSpecification(v *LaunchTemplateCapacityReservationSpecificationRequest) *RequestLaunchTemplateData { + s.CapacityReservationSpecification = v + return s +} - // The IDs of the Dedicated Hosts that were successfully released. - Successful []*string `locationName:"successful" locationNameList:"item" type:"list"` +// SetCpuOptions sets the CpuOptions field's value. +func (s *RequestLaunchTemplateData) SetCpuOptions(v *LaunchTemplateCpuOptionsRequest) *RequestLaunchTemplateData { + s.CpuOptions = v + return s +} - // The IDs of the Dedicated Hosts that could not be released, including an error - // message. - Unsuccessful []*UnsuccessfulItem `locationName:"unsuccessful" locationNameList:"item" type:"list"` +// SetCreditSpecification sets the CreditSpecification field's value. +func (s *RequestLaunchTemplateData) SetCreditSpecification(v *CreditSpecificationRequest) *RequestLaunchTemplateData { + s.CreditSpecification = v + return s } -// String returns the string representation -func (s ReleaseHostsOutput) String() string { - return awsutil.Prettify(s) +// SetDisableApiTermination sets the DisableApiTermination field's value. +func (s *RequestLaunchTemplateData) SetDisableApiTermination(v bool) *RequestLaunchTemplateData { + s.DisableApiTermination = &v + return s } -// GoString returns the string representation -func (s ReleaseHostsOutput) GoString() string { - return s.String() +// SetEbsOptimized sets the EbsOptimized field's value. +func (s *RequestLaunchTemplateData) SetEbsOptimized(v bool) *RequestLaunchTemplateData { + s.EbsOptimized = &v + return s } -// SetSuccessful sets the Successful field's value. -func (s *ReleaseHostsOutput) SetSuccessful(v []*string) *ReleaseHostsOutput { - s.Successful = v +// SetElasticGpuSpecifications sets the ElasticGpuSpecifications field's value. +func (s *RequestLaunchTemplateData) SetElasticGpuSpecifications(v []*ElasticGpuSpecification) *RequestLaunchTemplateData { + s.ElasticGpuSpecifications = v return s } -// SetUnsuccessful sets the Unsuccessful field's value. -func (s *ReleaseHostsOutput) SetUnsuccessful(v []*UnsuccessfulItem) *ReleaseHostsOutput { - s.Unsuccessful = v +// SetElasticInferenceAccelerators sets the ElasticInferenceAccelerators field's value. +func (s *RequestLaunchTemplateData) SetElasticInferenceAccelerators(v []*LaunchTemplateElasticInferenceAccelerator) *RequestLaunchTemplateData { + s.ElasticInferenceAccelerators = v return s } -type ReplaceIamInstanceProfileAssociationInput struct { - _ struct{} `type:"structure"` +// SetHibernationOptions sets the HibernationOptions field's value. +func (s *RequestLaunchTemplateData) SetHibernationOptions(v *LaunchTemplateHibernationOptionsRequest) *RequestLaunchTemplateData { + s.HibernationOptions = v + return s +} - // The ID of the existing IAM instance profile association. - // - // AssociationId is a required field - AssociationId *string `type:"string" required:"true"` +// SetIamInstanceProfile sets the IamInstanceProfile field's value. +func (s *RequestLaunchTemplateData) SetIamInstanceProfile(v *LaunchTemplateIamInstanceProfileSpecificationRequest) *RequestLaunchTemplateData { + s.IamInstanceProfile = v + return s +} - // The IAM instance profile. - // - // IamInstanceProfile is a required field - IamInstanceProfile *IamInstanceProfileSpecification `type:"structure" required:"true"` +// SetImageId sets the ImageId field's value. +func (s *RequestLaunchTemplateData) SetImageId(v string) *RequestLaunchTemplateData { + s.ImageId = &v + return s } -// String returns the string representation -func (s ReplaceIamInstanceProfileAssociationInput) String() string { - return awsutil.Prettify(s) +// SetInstanceInitiatedShutdownBehavior sets the InstanceInitiatedShutdownBehavior field's value. +func (s *RequestLaunchTemplateData) SetInstanceInitiatedShutdownBehavior(v string) *RequestLaunchTemplateData { + s.InstanceInitiatedShutdownBehavior = &v + return s } -// GoString returns the string representation -func (s ReplaceIamInstanceProfileAssociationInput) GoString() string { - return s.String() +// SetInstanceMarketOptions sets the InstanceMarketOptions field's value. +func (s *RequestLaunchTemplateData) SetInstanceMarketOptions(v *LaunchTemplateInstanceMarketOptionsRequest) *RequestLaunchTemplateData { + s.InstanceMarketOptions = v + return s } -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReplaceIamInstanceProfileAssociationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReplaceIamInstanceProfileAssociationInput"} - if s.AssociationId == nil { - invalidParams.Add(request.NewErrParamRequired("AssociationId")) - } - if s.IamInstanceProfile == nil { - invalidParams.Add(request.NewErrParamRequired("IamInstanceProfile")) - } +// SetInstanceType sets the InstanceType field's value. +func (s *RequestLaunchTemplateData) SetInstanceType(v string) *RequestLaunchTemplateData { + s.InstanceType = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetKernelId sets the KernelId field's value. +func (s *RequestLaunchTemplateData) SetKernelId(v string) *RequestLaunchTemplateData { + s.KernelId = &v + return s } -// SetAssociationId sets the AssociationId field's value. -func (s *ReplaceIamInstanceProfileAssociationInput) SetAssociationId(v string) *ReplaceIamInstanceProfileAssociationInput { - s.AssociationId = &v +// SetKeyName sets the KeyName field's value. +func (s *RequestLaunchTemplateData) SetKeyName(v string) *RequestLaunchTemplateData { + s.KeyName = &v return s } -// SetIamInstanceProfile sets the IamInstanceProfile field's value. -func (s *ReplaceIamInstanceProfileAssociationInput) SetIamInstanceProfile(v *IamInstanceProfileSpecification) *ReplaceIamInstanceProfileAssociationInput { - s.IamInstanceProfile = v +// SetLicenseSpecifications sets the LicenseSpecifications field's value. +func (s *RequestLaunchTemplateData) SetLicenseSpecifications(v []*LaunchTemplateLicenseConfigurationRequest) *RequestLaunchTemplateData { + s.LicenseSpecifications = v return s } -type ReplaceIamInstanceProfileAssociationOutput struct { - _ struct{} `type:"structure"` +// SetMonitoring sets the Monitoring field's value. +func (s *RequestLaunchTemplateData) SetMonitoring(v *LaunchTemplatesMonitoringRequest) *RequestLaunchTemplateData { + s.Monitoring = v + return s +} - // Information about the IAM instance profile association. - IamInstanceProfileAssociation *IamInstanceProfileAssociation `locationName:"iamInstanceProfileAssociation" type:"structure"` +// SetNetworkInterfaces sets the NetworkInterfaces field's value. +func (s *RequestLaunchTemplateData) SetNetworkInterfaces(v []*LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) *RequestLaunchTemplateData { + s.NetworkInterfaces = v + return s } -// String returns the string representation -func (s ReplaceIamInstanceProfileAssociationOutput) String() string { - return awsutil.Prettify(s) +// SetPlacement sets the Placement field's value. +func (s *RequestLaunchTemplateData) SetPlacement(v *LaunchTemplatePlacementRequest) *RequestLaunchTemplateData { + s.Placement = v + return s } -// GoString returns the string representation -func (s ReplaceIamInstanceProfileAssociationOutput) GoString() string { - return s.String() +// SetRamDiskId sets the RamDiskId field's value. +func (s *RequestLaunchTemplateData) SetRamDiskId(v string) *RequestLaunchTemplateData { + s.RamDiskId = &v + return s } -// SetIamInstanceProfileAssociation sets the IamInstanceProfileAssociation field's value. -func (s *ReplaceIamInstanceProfileAssociationOutput) SetIamInstanceProfileAssociation(v *IamInstanceProfileAssociation) *ReplaceIamInstanceProfileAssociationOutput { - s.IamInstanceProfileAssociation = v +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *RequestLaunchTemplateData) SetSecurityGroupIds(v []*string) *RequestLaunchTemplateData { + s.SecurityGroupIds = v return s } -// Contains the parameters for ReplaceNetworkAclAssociation. -type ReplaceNetworkAclAssociationInput struct { - _ struct{} `type:"structure"` +// SetSecurityGroups sets the SecurityGroups field's value. +func (s *RequestLaunchTemplateData) SetSecurityGroups(v []*string) *RequestLaunchTemplateData { + s.SecurityGroups = v + return s +} - // The ID of the current association between the original network ACL and the - // subnet. - // - // AssociationId is a required field - AssociationId *string `locationName:"associationId" type:"string" required:"true"` +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *RequestLaunchTemplateData) SetTagSpecifications(v []*LaunchTemplateTagSpecificationRequest) *RequestLaunchTemplateData { + s.TagSpecifications = v + return s +} + +// SetUserData sets the UserData field's value. +func (s *RequestLaunchTemplateData) SetUserData(v string) *RequestLaunchTemplateData { + s.UserData = &v + return s +} + +// Contains the parameters for RequestSpotFleet. +type RequestSpotFleetInput 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 @@ -59186,30 +72505,32 @@ type ReplaceNetworkAclAssociationInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // The ID of the new network ACL to associate with the subnet. + // The configuration for the Spot Fleet request. // - // NetworkAclId is a required field - NetworkAclId *string `locationName:"networkAclId" type:"string" required:"true"` + // SpotFleetRequestConfig is a required field + SpotFleetRequestConfig *SpotFleetRequestConfigData `locationName:"spotFleetRequestConfig" type:"structure" required:"true"` } // String returns the string representation -func (s ReplaceNetworkAclAssociationInput) String() string { +func (s RequestSpotFleetInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ReplaceNetworkAclAssociationInput) GoString() string { +func (s RequestSpotFleetInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ReplaceNetworkAclAssociationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReplaceNetworkAclAssociationInput"} - if s.AssociationId == nil { - invalidParams.Add(request.NewErrParamRequired("AssociationId")) +func (s *RequestSpotFleetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RequestSpotFleetInput"} + if s.SpotFleetRequestConfig == nil { + invalidParams.Add(request.NewErrParamRequired("SpotFleetRequestConfig")) } - if s.NetworkAclId == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkAclId")) + if s.SpotFleetRequestConfig != nil { + if err := s.SpotFleetRequestConfig.Validate(); err != nil { + invalidParams.AddNested("SpotFleetRequestConfig", err.(request.ErrInvalidParams)) + } } if invalidParams.Len() > 0 { @@ -59218,54 +72539,84 @@ func (s *ReplaceNetworkAclAssociationInput) Validate() error { return nil } -// SetAssociationId sets the AssociationId field's value. -func (s *ReplaceNetworkAclAssociationInput) SetAssociationId(v string) *ReplaceNetworkAclAssociationInput { - s.AssociationId = &v - return s -} - // SetDryRun sets the DryRun field's value. -func (s *ReplaceNetworkAclAssociationInput) SetDryRun(v bool) *ReplaceNetworkAclAssociationInput { +func (s *RequestSpotFleetInput) SetDryRun(v bool) *RequestSpotFleetInput { s.DryRun = &v return s } -// SetNetworkAclId sets the NetworkAclId field's value. -func (s *ReplaceNetworkAclAssociationInput) SetNetworkAclId(v string) *ReplaceNetworkAclAssociationInput { - s.NetworkAclId = &v +// SetSpotFleetRequestConfig sets the SpotFleetRequestConfig field's value. +func (s *RequestSpotFleetInput) SetSpotFleetRequestConfig(v *SpotFleetRequestConfigData) *RequestSpotFleetInput { + s.SpotFleetRequestConfig = v return s } -// Contains the output of ReplaceNetworkAclAssociation. -type ReplaceNetworkAclAssociationOutput struct { +// Contains the output of RequestSpotFleet. +type RequestSpotFleetOutput struct { _ struct{} `type:"structure"` - // The ID of the new association. - NewAssociationId *string `locationName:"newAssociationId" type:"string"` + // The ID of the Spot Fleet request. + SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string"` } // String returns the string representation -func (s ReplaceNetworkAclAssociationOutput) String() string { +func (s RequestSpotFleetOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ReplaceNetworkAclAssociationOutput) GoString() string { +func (s RequestSpotFleetOutput) GoString() string { return s.String() } -// SetNewAssociationId sets the NewAssociationId field's value. -func (s *ReplaceNetworkAclAssociationOutput) SetNewAssociationId(v string) *ReplaceNetworkAclAssociationOutput { - s.NewAssociationId = &v +// SetSpotFleetRequestId sets the SpotFleetRequestId field's value. +func (s *RequestSpotFleetOutput) SetSpotFleetRequestId(v string) *RequestSpotFleetOutput { + s.SpotFleetRequestId = &v return s } -// Contains the parameters for ReplaceNetworkAclEntry. -type ReplaceNetworkAclEntryInput struct { +// Contains the parameters for RequestSpotInstances. +type RequestSpotInstancesInput struct { _ struct{} `type:"structure"` - // The IPv4 network range to allow or deny, in CIDR notation (for example 172.16.0.0/24). - CidrBlock *string `locationName:"cidrBlock" type:"string"` + // The user-specified name for a logical grouping of requests. + // + // When you specify an Availability Zone group in a Spot Instance request, all + // Spot Instances in the request are launched in the same Availability Zone. + // Instance proximity is maintained with this parameter, but the choice of Availability + // Zone is not. The group applies only to requests for Spot Instances of the + // same instance type. Any additional Spot Instance requests that are specified + // with the same Availability Zone group name are launched in that same Availability + // Zone, as long as at least one instance from the group is still active. + // + // If there is no active instance running in the Availability Zone group that + // you specify for a new Spot Instance request (all instances are terminated, + // the request is expired, or the maximum price you specified falls below current + // Spot price), then Amazon EC2 launches the instance in any Availability Zone + // where the constraint can be met. Consequently, the subsequent set of Spot + // Instances could be placed in a different zone from the original request, + // even if you specified the same Availability Zone group. + // + // 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. + BlockDurationMinutes *int64 `locationName:"blockDurationMinutes" type:"integer"` + + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) + // in the Amazon EC2 User Guide for Linux Instances. + ClientToken *string `locationName:"clientToken" 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 @@ -59273,78 +72624,64 @@ type ReplaceNetworkAclEntryInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // Indicates whether to replace the egress rule. - // - // Default: If no value is specified, we replace the ingress rule. + // The maximum number of Spot Instances to launch. // - // Egress is a required field - Egress *bool `locationName:"egress" type:"boolean" required:"true"` - - // ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying the - // ICMP (1) protocol, or protocol 58 (ICMPv6) with an IPv6 CIDR block. - IcmpTypeCode *IcmpTypeCode `locationName:"Icmp" type:"structure"` + // Default: 1 + InstanceCount *int64 `locationName:"instanceCount" type:"integer"` - // The IPv6 network range to allow or deny, in CIDR notation (for example 2001:bd8:1234:1a00::/64). - Ipv6CidrBlock *string `locationName:"ipv6CidrBlock" type:"string"` + // The behavior when a Spot Instance is interrupted. The default is terminate. + InstanceInterruptionBehavior *string `type:"string" enum:"InstanceInterruptionBehavior"` - // The ID of the ACL. + // The instance launch group. Launch groups are Spot Instances that launch together + // and terminate together. // - // NetworkAclId is a required field - NetworkAclId *string `locationName:"networkAclId" type:"string" required:"true"` + // Default: Instances are launched and terminated individually + LaunchGroup *string `locationName:"launchGroup" type:"string"` - // TCP or UDP protocols: The range of ports the rule applies to. Required if - // specifying TCP (6) or UDP (17) for the protocol. - PortRange *PortRange `locationName:"portRange" type:"structure"` + // The launch specification. + LaunchSpecification *RequestSpotLaunchSpecification `type:"structure"` - // The IP protocol. You can specify all or -1 to mean all protocols. If you - // specify all, -1, or a protocol number other than tcp, udp, or icmp, traffic - // on all ports is allowed, regardless of any ports or ICMP types or codes you - // that specify. If you specify protocol 58 (ICMPv6) and specify an IPv4 CIDR - // block, traffic for all ICMP types and codes allowed, regardless of any that - // you specify. If you specify protocol 58 (ICMPv6) and specify an IPv6 CIDR - // block, you must specify an ICMP type and code. - // - // Protocol is a required field - Protocol *string `locationName:"protocol" type:"string" required:"true"` + // The maximum price per hour that you are willing to pay for a Spot Instance. + // The default is the On-Demand price. + SpotPrice *string `locationName:"spotPrice" type:"string"` - // Indicates whether to allow or deny the traffic that matches the rule. + // The Spot Instance request type. // - // RuleAction is a required field - RuleAction *string `locationName:"ruleAction" type:"string" required:"true" enum:"RuleAction"` + // Default: one-time + Type *string `locationName:"type" type:"string" enum:"SpotInstanceType"` + + // The start date of the request. If this is a one-time request, the request + // becomes active at this date and time and remains active until all instances + // launch, the request expires, or the request is canceled. If the request is + // persistent, the request becomes active at this date and time and remains + // active until it expires or is canceled. + ValidFrom *time.Time `locationName:"validFrom" type:"timestamp"` - // The rule number of the entry to replace. - // - // RuleNumber is a required field - RuleNumber *int64 `locationName:"ruleNumber" type:"integer" required:"true"` + // The end date of the request. If this is a one-time request, the request remains + // active until all instances launch, the request is canceled, or this date + // is reached. If the request is persistent, it remains active until it is canceled + // or this date is reached. The default end date is 7 days from the current + // date. + ValidUntil *time.Time `locationName:"validUntil" type:"timestamp"` } // String returns the string representation -func (s ReplaceNetworkAclEntryInput) String() string { +func (s RequestSpotInstancesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ReplaceNetworkAclEntryInput) GoString() string { +func (s RequestSpotInstancesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ReplaceNetworkAclEntryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReplaceNetworkAclEntryInput"} - if s.Egress == nil { - invalidParams.Add(request.NewErrParamRequired("Egress")) - } - if s.NetworkAclId == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkAclId")) - } - if s.Protocol == nil { - invalidParams.Add(request.NewErrParamRequired("Protocol")) - } - if s.RuleAction == nil { - invalidParams.Add(request.NewErrParamRequired("RuleAction")) - } - if s.RuleNumber == nil { - invalidParams.Add(request.NewErrParamRequired("RuleNumber")) +func (s *RequestSpotInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RequestSpotInstancesInput"} + if s.LaunchSpecification != nil { + if err := s.LaunchSpecification.Validate(); err != nil { + invalidParams.AddNested("LaunchSpecification", err.(request.ErrInvalidParams)) + } } if invalidParams.Len() > 0 { @@ -59353,137 +72690,186 @@ func (s *ReplaceNetworkAclEntryInput) Validate() error { return nil } -// SetCidrBlock sets the CidrBlock field's value. -func (s *ReplaceNetworkAclEntryInput) SetCidrBlock(v string) *ReplaceNetworkAclEntryInput { - s.CidrBlock = &v +// SetAvailabilityZoneGroup sets the AvailabilityZoneGroup field's value. +func (s *RequestSpotInstancesInput) SetAvailabilityZoneGroup(v string) *RequestSpotInstancesInput { + s.AvailabilityZoneGroup = &v + return s +} + +// SetBlockDurationMinutes sets the BlockDurationMinutes field's value. +func (s *RequestSpotInstancesInput) SetBlockDurationMinutes(v int64) *RequestSpotInstancesInput { + s.BlockDurationMinutes = &v + return s +} + +// SetClientToken sets the ClientToken field's value. +func (s *RequestSpotInstancesInput) SetClientToken(v string) *RequestSpotInstancesInput { + s.ClientToken = &v return s } // SetDryRun sets the DryRun field's value. -func (s *ReplaceNetworkAclEntryInput) SetDryRun(v bool) *ReplaceNetworkAclEntryInput { +func (s *RequestSpotInstancesInput) SetDryRun(v bool) *RequestSpotInstancesInput { s.DryRun = &v return s } -// SetEgress sets the Egress field's value. -func (s *ReplaceNetworkAclEntryInput) SetEgress(v bool) *ReplaceNetworkAclEntryInput { - s.Egress = &v +// SetInstanceCount sets the InstanceCount field's value. +func (s *RequestSpotInstancesInput) SetInstanceCount(v int64) *RequestSpotInstancesInput { + s.InstanceCount = &v return s } -// SetIcmpTypeCode sets the IcmpTypeCode field's value. -func (s *ReplaceNetworkAclEntryInput) SetIcmpTypeCode(v *IcmpTypeCode) *ReplaceNetworkAclEntryInput { - s.IcmpTypeCode = v +// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value. +func (s *RequestSpotInstancesInput) SetInstanceInterruptionBehavior(v string) *RequestSpotInstancesInput { + s.InstanceInterruptionBehavior = &v return s } -// SetIpv6CidrBlock sets the Ipv6CidrBlock field's value. -func (s *ReplaceNetworkAclEntryInput) SetIpv6CidrBlock(v string) *ReplaceNetworkAclEntryInput { - s.Ipv6CidrBlock = &v +// SetLaunchGroup sets the LaunchGroup field's value. +func (s *RequestSpotInstancesInput) SetLaunchGroup(v string) *RequestSpotInstancesInput { + s.LaunchGroup = &v return s } -// SetNetworkAclId sets the NetworkAclId field's value. -func (s *ReplaceNetworkAclEntryInput) SetNetworkAclId(v string) *ReplaceNetworkAclEntryInput { - s.NetworkAclId = &v +// SetLaunchSpecification sets the LaunchSpecification field's value. +func (s *RequestSpotInstancesInput) SetLaunchSpecification(v *RequestSpotLaunchSpecification) *RequestSpotInstancesInput { + s.LaunchSpecification = v return s } -// SetPortRange sets the PortRange field's value. -func (s *ReplaceNetworkAclEntryInput) SetPortRange(v *PortRange) *ReplaceNetworkAclEntryInput { - s.PortRange = v +// SetSpotPrice sets the SpotPrice field's value. +func (s *RequestSpotInstancesInput) SetSpotPrice(v string) *RequestSpotInstancesInput { + s.SpotPrice = &v return s } -// SetProtocol sets the Protocol field's value. -func (s *ReplaceNetworkAclEntryInput) SetProtocol(v string) *ReplaceNetworkAclEntryInput { - s.Protocol = &v +// SetType sets the Type field's value. +func (s *RequestSpotInstancesInput) SetType(v string) *RequestSpotInstancesInput { + s.Type = &v return s } -// SetRuleAction sets the RuleAction field's value. -func (s *ReplaceNetworkAclEntryInput) SetRuleAction(v string) *ReplaceNetworkAclEntryInput { - s.RuleAction = &v +// SetValidFrom sets the ValidFrom field's value. +func (s *RequestSpotInstancesInput) SetValidFrom(v time.Time) *RequestSpotInstancesInput { + s.ValidFrom = &v return s } -// SetRuleNumber sets the RuleNumber field's value. -func (s *ReplaceNetworkAclEntryInput) SetRuleNumber(v int64) *ReplaceNetworkAclEntryInput { - s.RuleNumber = &v +// SetValidUntil sets the ValidUntil field's value. +func (s *RequestSpotInstancesInput) SetValidUntil(v time.Time) *RequestSpotInstancesInput { + s.ValidUntil = &v return s } -type ReplaceNetworkAclEntryOutput struct { +// Contains the output of RequestSpotInstances. +type RequestSpotInstancesOutput struct { _ struct{} `type:"structure"` + + // One or more Spot Instance requests. + SpotInstanceRequests []*SpotInstanceRequest `locationName:"spotInstanceRequestSet" locationNameList:"item" type:"list"` } // String returns the string representation -func (s ReplaceNetworkAclEntryOutput) String() string { +func (s RequestSpotInstancesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ReplaceNetworkAclEntryOutput) GoString() string { +func (s RequestSpotInstancesOutput) GoString() string { return s.String() } -// Contains the parameters for ReplaceRoute. -type ReplaceRouteInput struct { +// SetSpotInstanceRequests sets the SpotInstanceRequests field's value. +func (s *RequestSpotInstancesOutput) SetSpotInstanceRequests(v []*SpotInstanceRequest) *RequestSpotInstancesOutput { + s.SpotInstanceRequests = v + return s +} + +// Describes the launch specification for an instance. +type RequestSpotLaunchSpecification struct { _ struct{} `type:"structure"` - // The IPv4 CIDR address block used for the destination match. The value that - // you provide must match the CIDR of an existing route in the table. - DestinationCidrBlock *string `locationName:"destinationCidrBlock" type:"string"` + // Deprecated. + AddressingType *string `locationName:"addressingType" type:"string"` - // The IPv6 CIDR address block used for the destination match. The value that - // you provide must match the CIDR of an existing route in the table. - DestinationIpv6CidrBlock *string `locationName:"destinationIpv6CidrBlock" type:"string"` + // One or more block device mapping entries. You can't specify both a snapshot + // ID and an encryption value. This is because only blank volumes can be encrypted + // on creation. If a snapshot is the basis for a volume, it is not blank and + // its encryption status is used for the volume encryption status. + BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" 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 `locationName:"dryRun" type:"boolean"` + // Indicates whether the instance is optimized for EBS I/O. This optimization + // provides dedicated throughput to Amazon EBS and an optimized configuration + // stack to provide optimal EBS I/O performance. This optimization isn't available + // with all instance types. Additional usage charges apply when using an EBS + // Optimized instance. + // + // Default: false + EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"` - // [IPv6 traffic only] The ID of an egress-only internet gateway. - EgressOnlyInternetGatewayId *string `locationName:"egressOnlyInternetGatewayId" type:"string"` + // The IAM instance profile. + IamInstanceProfile *IamInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"` - // The ID of an internet gateway or virtual private gateway. - GatewayId *string `locationName:"gatewayId" type:"string"` + // The ID of the AMI. + ImageId *string `locationName:"imageId" type:"string"` - // The ID of a NAT instance in your VPC. - InstanceId *string `locationName:"instanceId" type:"string"` + // The instance type. + InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` - // [IPv4 traffic only] The ID of a NAT gateway. - NatGatewayId *string `locationName:"natGatewayId" type:"string"` + // The ID of the kernel. + KernelId *string `locationName:"kernelId" type:"string"` - // The ID of a network interface. - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` + // The name of the key pair. + KeyName *string `locationName:"keyName" type:"string"` - // The ID of the route table. + // Indicates whether basic or detailed monitoring is enabled for the instance. // - // RouteTableId is a required field - RouteTableId *string `locationName:"routeTableId" type:"string" required:"true"` + // Default: Disabled + Monitoring *RunInstancesMonitoringEnabled `locationName:"monitoring" type:"structure"` - // The ID of a VPC peering connection. - VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string"` + // One or more network interfaces. If you specify a network interface, you must + // specify subnet IDs and security group IDs using the network interface. + NetworkInterfaces []*InstanceNetworkInterfaceSpecification `locationName:"NetworkInterface" locationNameList:"item" type:"list"` + + // The placement information for the instance. + Placement *SpotPlacement `locationName:"placement" type:"structure"` + + // The ID of the RAM disk. + RamdiskId *string `locationName:"ramdiskId" type:"string"` + + // One or more security group IDs. + SecurityGroupIds []*string `locationName:"SecurityGroupId" locationNameList:"item" type:"list"` + + // One or more security groups. When requesting instances in a VPC, you must + // specify the IDs of the security groups. When requesting instances in EC2-Classic, + // you can specify the names or the IDs of the security groups. + SecurityGroups []*string `locationName:"SecurityGroup" locationNameList:"item" type:"list"` + + // 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. + UserData *string `locationName:"userData" type:"string"` } // String returns the string representation -func (s ReplaceRouteInput) String() string { +func (s RequestSpotLaunchSpecification) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ReplaceRouteInput) GoString() string { +func (s RequestSpotLaunchSpecification) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ReplaceRouteInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReplaceRouteInput"} - if s.RouteTableId == nil { - invalidParams.Add(request.NewErrParamRequired("RouteTableId")) +func (s *RequestSpotLaunchSpecification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RequestSpotLaunchSpecification"} + if s.Monitoring != nil { + if err := s.Monitoring.Validate(); err != nil { + invalidParams.AddNested("Monitoring", err.(request.ErrInvalidParams)) + } } if invalidParams.Len() > 0 { @@ -59492,1898 +72878,1705 @@ func (s *ReplaceRouteInput) Validate() error { return nil } -// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. -func (s *ReplaceRouteInput) SetDestinationCidrBlock(v string) *ReplaceRouteInput { - s.DestinationCidrBlock = &v +// SetAddressingType sets the AddressingType field's value. +func (s *RequestSpotLaunchSpecification) SetAddressingType(v string) *RequestSpotLaunchSpecification { + s.AddressingType = &v return s } -// SetDestinationIpv6CidrBlock sets the DestinationIpv6CidrBlock field's value. -func (s *ReplaceRouteInput) SetDestinationIpv6CidrBlock(v string) *ReplaceRouteInput { - s.DestinationIpv6CidrBlock = &v +// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. +func (s *RequestSpotLaunchSpecification) SetBlockDeviceMappings(v []*BlockDeviceMapping) *RequestSpotLaunchSpecification { + s.BlockDeviceMappings = v return s } -// SetDryRun sets the DryRun field's value. -func (s *ReplaceRouteInput) SetDryRun(v bool) *ReplaceRouteInput { - s.DryRun = &v +// SetEbsOptimized sets the EbsOptimized field's value. +func (s *RequestSpotLaunchSpecification) SetEbsOptimized(v bool) *RequestSpotLaunchSpecification { + s.EbsOptimized = &v return s } -// SetEgressOnlyInternetGatewayId sets the EgressOnlyInternetGatewayId field's value. -func (s *ReplaceRouteInput) SetEgressOnlyInternetGatewayId(v string) *ReplaceRouteInput { - s.EgressOnlyInternetGatewayId = &v +// SetIamInstanceProfile sets the IamInstanceProfile field's value. +func (s *RequestSpotLaunchSpecification) SetIamInstanceProfile(v *IamInstanceProfileSpecification) *RequestSpotLaunchSpecification { + s.IamInstanceProfile = v return s } -// SetGatewayId sets the GatewayId field's value. -func (s *ReplaceRouteInput) SetGatewayId(v string) *ReplaceRouteInput { - s.GatewayId = &v +// SetImageId sets the ImageId field's value. +func (s *RequestSpotLaunchSpecification) SetImageId(v string) *RequestSpotLaunchSpecification { + s.ImageId = &v return s } -// SetInstanceId sets the InstanceId field's value. -func (s *ReplaceRouteInput) SetInstanceId(v string) *ReplaceRouteInput { - s.InstanceId = &v +// SetInstanceType sets the InstanceType field's value. +func (s *RequestSpotLaunchSpecification) SetInstanceType(v string) *RequestSpotLaunchSpecification { + s.InstanceType = &v return s } -// SetNatGatewayId sets the NatGatewayId field's value. -func (s *ReplaceRouteInput) SetNatGatewayId(v string) *ReplaceRouteInput { - s.NatGatewayId = &v +// SetKernelId sets the KernelId field's value. +func (s *RequestSpotLaunchSpecification) SetKernelId(v string) *RequestSpotLaunchSpecification { + s.KernelId = &v return s } -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *ReplaceRouteInput) SetNetworkInterfaceId(v string) *ReplaceRouteInput { - s.NetworkInterfaceId = &v +// SetKeyName sets the KeyName field's value. +func (s *RequestSpotLaunchSpecification) SetKeyName(v string) *RequestSpotLaunchSpecification { + s.KeyName = &v return s } -// SetRouteTableId sets the RouteTableId field's value. -func (s *ReplaceRouteInput) SetRouteTableId(v string) *ReplaceRouteInput { - s.RouteTableId = &v +// SetMonitoring sets the Monitoring field's value. +func (s *RequestSpotLaunchSpecification) SetMonitoring(v *RunInstancesMonitoringEnabled) *RequestSpotLaunchSpecification { + s.Monitoring = v return s } -// SetVpcPeeringConnectionId sets the VpcPeeringConnectionId field's value. -func (s *ReplaceRouteInput) SetVpcPeeringConnectionId(v string) *ReplaceRouteInput { - s.VpcPeeringConnectionId = &v +// SetNetworkInterfaces sets the NetworkInterfaces field's value. +func (s *RequestSpotLaunchSpecification) SetNetworkInterfaces(v []*InstanceNetworkInterfaceSpecification) *RequestSpotLaunchSpecification { + s.NetworkInterfaces = v return s } -type ReplaceRouteOutput struct { - _ struct{} `type:"structure"` +// SetPlacement sets the Placement field's value. +func (s *RequestSpotLaunchSpecification) SetPlacement(v *SpotPlacement) *RequestSpotLaunchSpecification { + s.Placement = v + return s } -// String returns the string representation -func (s ReplaceRouteOutput) String() string { - return awsutil.Prettify(s) +// SetRamdiskId sets the RamdiskId field's value. +func (s *RequestSpotLaunchSpecification) SetRamdiskId(v string) *RequestSpotLaunchSpecification { + s.RamdiskId = &v + return s } -// GoString returns the string representation -func (s ReplaceRouteOutput) GoString() string { - return s.String() +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *RequestSpotLaunchSpecification) SetSecurityGroupIds(v []*string) *RequestSpotLaunchSpecification { + s.SecurityGroupIds = v + return s } -// Contains the parameters for ReplaceRouteTableAssociation. -type ReplaceRouteTableAssociationInput struct { +// SetSecurityGroups sets the SecurityGroups field's value. +func (s *RequestSpotLaunchSpecification) SetSecurityGroups(v []*string) *RequestSpotLaunchSpecification { + s.SecurityGroups = v + return s +} + +// SetSubnetId sets the SubnetId field's value. +func (s *RequestSpotLaunchSpecification) SetSubnetId(v string) *RequestSpotLaunchSpecification { + s.SubnetId = &v + return s +} + +// SetUserData sets the UserData field's value. +func (s *RequestSpotLaunchSpecification) SetUserData(v string) *RequestSpotLaunchSpecification { + s.UserData = &v + return s +} + +// Describes a reservation. +type Reservation struct { _ struct{} `type:"structure"` - // The association ID. - // - // AssociationId is a required field - AssociationId *string `locationName:"associationId" type:"string" required:"true"` + // [EC2-Classic only] One or more security groups. + Groups []*GroupIdentifier `locationName:"groupSet" 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 `locationName:"dryRun" type:"boolean"` + // One or more instances. + Instances []*Instance `locationName:"instancesSet" locationNameList:"item" type:"list"` - // The ID of the new route table to associate with the subnet. - // - // RouteTableId is a required field - RouteTableId *string `locationName:"routeTableId" type:"string" required:"true"` + // The ID of the AWS 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). + RequesterId *string `locationName:"requesterId" type:"string"` + + // The ID of the reservation. + ReservationId *string `locationName:"reservationId" type:"string"` } // String returns the string representation -func (s ReplaceRouteTableAssociationInput) String() string { +func (s Reservation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ReplaceRouteTableAssociationInput) GoString() string { +func (s Reservation) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReplaceRouteTableAssociationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReplaceRouteTableAssociationInput"} - if s.AssociationId == nil { - invalidParams.Add(request.NewErrParamRequired("AssociationId")) - } - if s.RouteTableId == nil { - invalidParams.Add(request.NewErrParamRequired("RouteTableId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAssociationId sets the AssociationId field's value. -func (s *ReplaceRouteTableAssociationInput) SetAssociationId(v string) *ReplaceRouteTableAssociationInput { - s.AssociationId = &v +// SetGroups sets the Groups field's value. +func (s *Reservation) SetGroups(v []*GroupIdentifier) *Reservation { + s.Groups = v return s } -// SetDryRun sets the DryRun field's value. -func (s *ReplaceRouteTableAssociationInput) SetDryRun(v bool) *ReplaceRouteTableAssociationInput { - s.DryRun = &v +// SetInstances sets the Instances field's value. +func (s *Reservation) SetInstances(v []*Instance) *Reservation { + s.Instances = v return s } -// SetRouteTableId sets the RouteTableId field's value. -func (s *ReplaceRouteTableAssociationInput) SetRouteTableId(v string) *ReplaceRouteTableAssociationInput { - s.RouteTableId = &v +// SetOwnerId sets the OwnerId field's value. +func (s *Reservation) SetOwnerId(v string) *Reservation { + s.OwnerId = &v return s } -// Contains the output of ReplaceRouteTableAssociation. -type ReplaceRouteTableAssociationOutput struct { - _ struct{} `type:"structure"` - - // The ID of the new association. - NewAssociationId *string `locationName:"newAssociationId" type:"string"` -} - -// String returns the string representation -func (s ReplaceRouteTableAssociationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReplaceRouteTableAssociationOutput) GoString() string { - return s.String() +// SetRequesterId sets the RequesterId field's value. +func (s *Reservation) SetRequesterId(v string) *Reservation { + s.RequesterId = &v + return s } -// SetNewAssociationId sets the NewAssociationId field's value. -func (s *ReplaceRouteTableAssociationOutput) SetNewAssociationId(v string) *ReplaceRouteTableAssociationOutput { - s.NewAssociationId = &v +// SetReservationId sets the ReservationId field's value. +func (s *Reservation) SetReservationId(v string) *Reservation { + s.ReservationId = &v return s } -// Contains the parameters for ReportInstanceStatus. -type ReportInstanceStatusInput struct { +// The cost associated with the Reserved Instance. +type ReservationValue struct { _ struct{} `type:"structure"` - // Descriptive text about the health state of your instance. - Description *string `locationName:"description" 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 `locationName:"dryRun" type:"boolean"` - - // The time at which the reported instance health state ended. - EndTime *time.Time `locationName:"endTime" type:"timestamp"` - - // One or more instances. - // - // Instances is a required field - Instances []*string `locationName:"instanceId" locationNameList:"InstanceId" type:"list" required:"true"` - - // One or more reason codes that describe the health state of your instance. - // - // * instance-stuck-in-state: My instance is stuck in a state. - // - // * unresponsive: My instance is unresponsive. - // - // * not-accepting-credentials: My instance is not accepting my credentials. - // - // * password-not-available: A password is not available for my instance. - // - // * performance-network: My instance is experiencing performance problems - // that I believe are network related. - // - // * performance-instance-store: My instance is experiencing performance - // problems that I believe are related to the instance stores. - // - // * performance-ebs-volume: My instance is experiencing performance problems - // that I believe are related to an EBS volume. - // - // * performance-other: My instance is experiencing performance problems. - // - // * other: [explain using the description parameter] - // - // ReasonCodes is a required field - ReasonCodes []*string `locationName:"reasonCode" locationNameList:"item" type:"list" required:"true"` + // The hourly rate of the reservation. + HourlyPrice *string `locationName:"hourlyPrice" type:"string"` - // The time at which the reported instance health state began. - StartTime *time.Time `locationName:"startTime" type:"timestamp"` + // The balance of the total value (the sum of remainingUpfrontValue + hourlyPrice + // * number of hours remaining). + RemainingTotalValue *string `locationName:"remainingTotalValue" type:"string"` - // The status of all instances listed. - // - // Status is a required field - Status *string `locationName:"status" type:"string" required:"true" enum:"ReportStatusType"` + // The remaining upfront cost of the reservation. + RemainingUpfrontValue *string `locationName:"remainingUpfrontValue" type:"string"` } // String returns the string representation -func (s ReportInstanceStatusInput) String() string { +func (s ReservationValue) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ReportInstanceStatusInput) GoString() string { +func (s ReservationValue) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *ReportInstanceStatusInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ReportInstanceStatusInput"} - if s.Instances == nil { - invalidParams.Add(request.NewErrParamRequired("Instances")) - } - if s.ReasonCodes == nil { - invalidParams.Add(request.NewErrParamRequired("ReasonCodes")) - } - if s.Status == nil { - invalidParams.Add(request.NewErrParamRequired("Status")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetHourlyPrice sets the HourlyPrice field's value. +func (s *ReservationValue) SetHourlyPrice(v string) *ReservationValue { + s.HourlyPrice = &v + return s } -// SetDescription sets the Description field's value. -func (s *ReportInstanceStatusInput) SetDescription(v string) *ReportInstanceStatusInput { - s.Description = &v +// SetRemainingTotalValue sets the RemainingTotalValue field's value. +func (s *ReservationValue) SetRemainingTotalValue(v string) *ReservationValue { + s.RemainingTotalValue = &v return s } -// SetDryRun sets the DryRun field's value. -func (s *ReportInstanceStatusInput) SetDryRun(v bool) *ReportInstanceStatusInput { - s.DryRun = &v +// SetRemainingUpfrontValue sets the RemainingUpfrontValue field's value. +func (s *ReservationValue) SetRemainingUpfrontValue(v string) *ReservationValue { + s.RemainingUpfrontValue = &v return s } -// SetEndTime sets the EndTime field's value. -func (s *ReportInstanceStatusInput) SetEndTime(v time.Time) *ReportInstanceStatusInput { - s.EndTime = &v - return s +// Describes the limit price of a Reserved Instance offering. +type ReservedInstanceLimitPrice struct { + _ struct{} `type:"structure"` + + // Used for Reserved Instance Marketplace offerings. Specifies the limit price + // on the total order (instanceCount * price). + Amount *float64 `locationName:"amount" type:"double"` + + // The currency in which the limitPrice amount is specified. At this time, the + // only supported currency is USD. + CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` } -// SetInstances sets the Instances field's value. -func (s *ReportInstanceStatusInput) SetInstances(v []*string) *ReportInstanceStatusInput { - s.Instances = v - return s +// String returns the string representation +func (s ReservedInstanceLimitPrice) String() string { + return awsutil.Prettify(s) } -// SetReasonCodes sets the ReasonCodes field's value. -func (s *ReportInstanceStatusInput) SetReasonCodes(v []*string) *ReportInstanceStatusInput { - s.ReasonCodes = v - return s +// GoString returns the string representation +func (s ReservedInstanceLimitPrice) GoString() string { + return s.String() } -// SetStartTime sets the StartTime field's value. -func (s *ReportInstanceStatusInput) SetStartTime(v time.Time) *ReportInstanceStatusInput { - s.StartTime = &v +// SetAmount sets the Amount field's value. +func (s *ReservedInstanceLimitPrice) SetAmount(v float64) *ReservedInstanceLimitPrice { + s.Amount = &v return s } -// SetStatus sets the Status field's value. -func (s *ReportInstanceStatusInput) SetStatus(v string) *ReportInstanceStatusInput { - s.Status = &v +// SetCurrencyCode sets the CurrencyCode field's value. +func (s *ReservedInstanceLimitPrice) SetCurrencyCode(v string) *ReservedInstanceLimitPrice { + s.CurrencyCode = &v return s } -type ReportInstanceStatusOutput struct { +// The total value of the Convertible Reserved Instance. +type ReservedInstanceReservationValue struct { _ struct{} `type:"structure"` + + // The total value of the Convertible Reserved Instance that you are exchanging. + ReservationValue *ReservationValue `locationName:"reservationValue" type:"structure"` + + // The ID of the Convertible Reserved Instance that you are exchanging. + ReservedInstanceId *string `locationName:"reservedInstanceId" type:"string"` } // String returns the string representation -func (s ReportInstanceStatusOutput) String() string { +func (s ReservedInstanceReservationValue) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ReportInstanceStatusOutput) GoString() string { +func (s ReservedInstanceReservationValue) GoString() string { return s.String() } -// The information to include in the launch template. -type RequestLaunchTemplateData struct { - _ struct{} `type:"structure"` - - // The block device mapping. - // - // Supplying both a snapshot ID and an encryption value as arguments for block-device - // mapping results in an error. This is because only blank volumes can be encrypted - // on start, and these are not created from a snapshot. If a snapshot is the - // basis for the volume, it contains data by definition and its encryption status - // cannot be changed using this action. - BlockDeviceMappings []*LaunchTemplateBlockDeviceMappingRequest `locationName:"BlockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"` +// SetReservationValue sets the ReservationValue field's value. +func (s *ReservedInstanceReservationValue) SetReservationValue(v *ReservationValue) *ReservedInstanceReservationValue { + s.ReservationValue = v + return s +} - // The CPU options for the instance. For more information, see Optimizing CPU - // Options (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) - // in the Amazon Elastic Compute Cloud User Guide. - CpuOptions *LaunchTemplateCpuOptionsRequest `type:"structure"` +// SetReservedInstanceId sets the ReservedInstanceId field's value. +func (s *ReservedInstanceReservationValue) SetReservedInstanceId(v string) *ReservedInstanceReservationValue { + s.ReservedInstanceId = &v + return s +} - // The credit option for CPU usage of the instance. Valid for T2 instances only. - CreditSpecification *CreditSpecificationRequest `type:"structure"` +// Describes a Reserved Instance. +type ReservedInstances struct { + _ struct{} `type:"structure"` - // If set to true, you can't terminate the instance using the Amazon EC2 console, - // CLI, or API. To change this attribute to false after launch, use ModifyInstanceAttribute. - DisableApiTermination *bool `type:"boolean"` + // The Availability Zone in which the Reserved Instance can be used. + AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - // Indicates whether the instance is optimized for Amazon EBS I/O. This optimization - // provides dedicated throughput to Amazon EBS and an optimized configuration - // stack to provide optimal Amazon EBS I/O performance. This optimization isn't - // available with all instance types. Additional usage charges apply when using - // an EBS-optimized instance. - EbsOptimized *bool `type:"boolean"` + // The currency of the Reserved Instance. It's specified using ISO 4217 standard + // currency codes. At this time, the only supported currency is USD. + CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` - // An elastic GPU to associate with the instance. - ElasticGpuSpecifications []*ElasticGpuSpecification `locationName:"ElasticGpuSpecification" locationNameList:"ElasticGpuSpecification" type:"list"` + // The duration of the Reserved Instance, in seconds. + Duration *int64 `locationName:"duration" type:"long"` - // The IAM instance profile. - IamInstanceProfile *LaunchTemplateIamInstanceProfileSpecificationRequest `type:"structure"` + // The time when the Reserved Instance expires. + End *time.Time `locationName:"end" type:"timestamp"` - // The ID of the AMI, which you can get by using DescribeImages. - ImageId *string `type:"string"` + // The purchase price of the Reserved Instance. + FixedPrice *float64 `locationName:"fixedPrice" type:"float"` - // Indicates whether an instance stops or terminates when you initiate shutdown - // from the instance (using the operating system command for system shutdown). - // - // Default: stop - InstanceInitiatedShutdownBehavior *string `type:"string" enum:"ShutdownBehavior"` + // The number of reservations purchased. + InstanceCount *int64 `locationName:"instanceCount" type:"integer"` - // The market (purchasing) option for the instances. - InstanceMarketOptions *LaunchTemplateInstanceMarketOptionsRequest `type:"structure"` + // The tenancy of the instance. + InstanceTenancy *string `locationName:"instanceTenancy" type:"string" enum:"Tenancy"` - // The instance type. For more information, see Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) - // in the Amazon Elastic Compute Cloud User Guide. - InstanceType *string `type:"string" enum:"InstanceType"` + // The instance type on which the Reserved Instance can be used. + InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` - // The ID of the kernel. - // - // We recommend that you use PV-GRUB instead of kernels and RAM disks. For more - // information, see User Provided Kernels (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html) - // in the Amazon Elastic Compute Cloud User Guide. - KernelId *string `type:"string"` + // The offering class of the Reserved Instance. + OfferingClass *string `locationName:"offeringClass" type:"string" enum:"OfferingClassType"` - // The name of the key pair. You can create a key pair using CreateKeyPair or - // ImportKeyPair. - // - // If you do not specify a key pair, you can't connect to the instance unless - // you choose an AMI that is configured to allow users another way to log in. - KeyName *string `type:"string"` + // The Reserved Instance offering type. + OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingTypeValues"` - // The monitoring for the instance. - Monitoring *LaunchTemplatesMonitoringRequest `type:"structure"` + // The Reserved Instance product platform description. + ProductDescription *string `locationName:"productDescription" type:"string" enum:"RIProductDescription"` - // One or more network interfaces. - NetworkInterfaces []*LaunchTemplateInstanceNetworkInterfaceSpecificationRequest `locationName:"NetworkInterface" locationNameList:"InstanceNetworkInterfaceSpecification" type:"list"` + // The recurring charge tag assigned to the resource. + RecurringCharges []*RecurringCharge `locationName:"recurringCharges" locationNameList:"item" type:"list"` - // The placement for the instance. - Placement *LaunchTemplatePlacementRequest `type:"structure"` + // The ID of the Reserved Instance. + ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"` - // The ID of the RAM disk. - // - // We recommend that you use PV-GRUB instead of kernels and RAM disks. For more - // information, see User Provided Kernels (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html) - // in the Amazon Elastic Compute Cloud User Guide. - RamDiskId *string `type:"string"` + // The scope of the Reserved Instance. + Scope *string `locationName:"scope" type:"string" enum:"scope"` - // One or more security group IDs. You can create a security group using CreateSecurityGroup. - // You cannot specify both a security group ID and security name in the same - // request. - SecurityGroupIds []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"` + // The date and time the Reserved Instance started. + Start *time.Time `locationName:"start" type:"timestamp"` - // [EC2-Classic, default VPC] One or more security group names. For a nondefault - // VPC, you must use security group IDs instead. You cannot specify both a security - // group ID and security name in the same request. - SecurityGroups []*string `locationName:"SecurityGroup" locationNameList:"SecurityGroup" type:"list"` + // The state of the Reserved Instance purchase. + State *string `locationName:"state" type:"string" enum:"ReservedInstanceState"` - // The tags to apply to the resources during launch. You can only tag instances - // and volumes on launch. The specified tags are applied to all instances or - // volumes that are created during launch. To tag a resource after it has been - // created, see CreateTags. - TagSpecifications []*LaunchTemplateTagSpecificationRequest `locationName:"TagSpecification" locationNameList:"LaunchTemplateTagSpecificationRequest" type:"list"` + // Any tags assigned to the resource. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - // The Base64-encoded user data to make available to the instance. For more - // information, see Running Commands on Your Linux Instance at Launch (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html) - // (Linux) and Adding User Data (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html#instancedata-add-user-data) - // (Windows). - UserData *string `type:"string"` + // The usage price of the Reserved Instance, per hour. + UsagePrice *float64 `locationName:"usagePrice" type:"float"` } // String returns the string representation -func (s RequestLaunchTemplateData) String() string { +func (s ReservedInstances) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s RequestLaunchTemplateData) GoString() string { +func (s ReservedInstances) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *RequestLaunchTemplateData) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RequestLaunchTemplateData"} - if s.CreditSpecification != nil { - if err := s.CreditSpecification.Validate(); err != nil { - invalidParams.AddNested("CreditSpecification", err.(request.ErrInvalidParams)) - } - } - if s.ElasticGpuSpecifications != nil { - for i, v := range s.ElasticGpuSpecifications { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ElasticGpuSpecifications", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *RequestLaunchTemplateData) SetBlockDeviceMappings(v []*LaunchTemplateBlockDeviceMappingRequest) *RequestLaunchTemplateData { - s.BlockDeviceMappings = v - return s -} - -// SetCpuOptions sets the CpuOptions field's value. -func (s *RequestLaunchTemplateData) SetCpuOptions(v *LaunchTemplateCpuOptionsRequest) *RequestLaunchTemplateData { - s.CpuOptions = v - return s -} - -// SetCreditSpecification sets the CreditSpecification field's value. -func (s *RequestLaunchTemplateData) SetCreditSpecification(v *CreditSpecificationRequest) *RequestLaunchTemplateData { - s.CreditSpecification = v - return s -} - -// SetDisableApiTermination sets the DisableApiTermination field's value. -func (s *RequestLaunchTemplateData) SetDisableApiTermination(v bool) *RequestLaunchTemplateData { - s.DisableApiTermination = &v +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *ReservedInstances) SetAvailabilityZone(v string) *ReservedInstances { + s.AvailabilityZone = &v return s } -// SetEbsOptimized sets the EbsOptimized field's value. -func (s *RequestLaunchTemplateData) SetEbsOptimized(v bool) *RequestLaunchTemplateData { - s.EbsOptimized = &v +// SetCurrencyCode sets the CurrencyCode field's value. +func (s *ReservedInstances) SetCurrencyCode(v string) *ReservedInstances { + s.CurrencyCode = &v return s } -// SetElasticGpuSpecifications sets the ElasticGpuSpecifications field's value. -func (s *RequestLaunchTemplateData) SetElasticGpuSpecifications(v []*ElasticGpuSpecification) *RequestLaunchTemplateData { - s.ElasticGpuSpecifications = v +// SetDuration sets the Duration field's value. +func (s *ReservedInstances) SetDuration(v int64) *ReservedInstances { + s.Duration = &v return s } -// SetIamInstanceProfile sets the IamInstanceProfile field's value. -func (s *RequestLaunchTemplateData) SetIamInstanceProfile(v *LaunchTemplateIamInstanceProfileSpecificationRequest) *RequestLaunchTemplateData { - s.IamInstanceProfile = v +// SetEnd sets the End field's value. +func (s *ReservedInstances) SetEnd(v time.Time) *ReservedInstances { + s.End = &v return s } -// SetImageId sets the ImageId field's value. -func (s *RequestLaunchTemplateData) SetImageId(v string) *RequestLaunchTemplateData { - s.ImageId = &v +// SetFixedPrice sets the FixedPrice field's value. +func (s *ReservedInstances) SetFixedPrice(v float64) *ReservedInstances { + s.FixedPrice = &v return s } -// SetInstanceInitiatedShutdownBehavior sets the InstanceInitiatedShutdownBehavior field's value. -func (s *RequestLaunchTemplateData) SetInstanceInitiatedShutdownBehavior(v string) *RequestLaunchTemplateData { - s.InstanceInitiatedShutdownBehavior = &v +// SetInstanceCount sets the InstanceCount field's value. +func (s *ReservedInstances) SetInstanceCount(v int64) *ReservedInstances { + s.InstanceCount = &v return s } -// SetInstanceMarketOptions sets the InstanceMarketOptions field's value. -func (s *RequestLaunchTemplateData) SetInstanceMarketOptions(v *LaunchTemplateInstanceMarketOptionsRequest) *RequestLaunchTemplateData { - s.InstanceMarketOptions = v +// SetInstanceTenancy sets the InstanceTenancy field's value. +func (s *ReservedInstances) SetInstanceTenancy(v string) *ReservedInstances { + s.InstanceTenancy = &v return s } // SetInstanceType sets the InstanceType field's value. -func (s *RequestLaunchTemplateData) SetInstanceType(v string) *RequestLaunchTemplateData { +func (s *ReservedInstances) SetInstanceType(v string) *ReservedInstances { s.InstanceType = &v return s } -// SetKernelId sets the KernelId field's value. -func (s *RequestLaunchTemplateData) SetKernelId(v string) *RequestLaunchTemplateData { - s.KernelId = &v +// SetOfferingClass sets the OfferingClass field's value. +func (s *ReservedInstances) SetOfferingClass(v string) *ReservedInstances { + s.OfferingClass = &v return s } -// SetKeyName sets the KeyName field's value. -func (s *RequestLaunchTemplateData) SetKeyName(v string) *RequestLaunchTemplateData { - s.KeyName = &v +// SetOfferingType sets the OfferingType field's value. +func (s *ReservedInstances) SetOfferingType(v string) *ReservedInstances { + s.OfferingType = &v return s } -// SetMonitoring sets the Monitoring field's value. -func (s *RequestLaunchTemplateData) SetMonitoring(v *LaunchTemplatesMonitoringRequest) *RequestLaunchTemplateData { - s.Monitoring = v +// SetProductDescription sets the ProductDescription field's value. +func (s *ReservedInstances) SetProductDescription(v string) *ReservedInstances { + s.ProductDescription = &v return s } -// SetNetworkInterfaces sets the NetworkInterfaces field's value. -func (s *RequestLaunchTemplateData) SetNetworkInterfaces(v []*LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) *RequestLaunchTemplateData { - s.NetworkInterfaces = v +// SetRecurringCharges sets the RecurringCharges field's value. +func (s *ReservedInstances) SetRecurringCharges(v []*RecurringCharge) *ReservedInstances { + s.RecurringCharges = v return s } -// SetPlacement sets the Placement field's value. -func (s *RequestLaunchTemplateData) SetPlacement(v *LaunchTemplatePlacementRequest) *RequestLaunchTemplateData { - s.Placement = v +// SetReservedInstancesId sets the ReservedInstancesId field's value. +func (s *ReservedInstances) SetReservedInstancesId(v string) *ReservedInstances { + s.ReservedInstancesId = &v return s } -// SetRamDiskId sets the RamDiskId field's value. -func (s *RequestLaunchTemplateData) SetRamDiskId(v string) *RequestLaunchTemplateData { - s.RamDiskId = &v +// SetScope sets the Scope field's value. +func (s *ReservedInstances) SetScope(v string) *ReservedInstances { + s.Scope = &v return s } -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *RequestLaunchTemplateData) SetSecurityGroupIds(v []*string) *RequestLaunchTemplateData { - s.SecurityGroupIds = v +// SetStart sets the Start field's value. +func (s *ReservedInstances) SetStart(v time.Time) *ReservedInstances { + s.Start = &v return s } -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *RequestLaunchTemplateData) SetSecurityGroups(v []*string) *RequestLaunchTemplateData { - s.SecurityGroups = v +// SetState sets the State field's value. +func (s *ReservedInstances) SetState(v string) *ReservedInstances { + s.State = &v return s } -// SetTagSpecifications sets the TagSpecifications field's value. -func (s *RequestLaunchTemplateData) SetTagSpecifications(v []*LaunchTemplateTagSpecificationRequest) *RequestLaunchTemplateData { - s.TagSpecifications = v +// SetTags sets the Tags field's value. +func (s *ReservedInstances) SetTags(v []*Tag) *ReservedInstances { + s.Tags = v return s } -// SetUserData sets the UserData field's value. -func (s *RequestLaunchTemplateData) SetUserData(v string) *RequestLaunchTemplateData { - s.UserData = &v +// SetUsagePrice sets the UsagePrice field's value. +func (s *ReservedInstances) SetUsagePrice(v float64) *ReservedInstances { + s.UsagePrice = &v return s } -// Contains the parameters for RequestSpotFleet. -type RequestSpotFleetInput struct { +// Describes the configuration settings for the modified Reserved Instances. +type ReservedInstancesConfiguration 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 `locationName:"dryRun" type:"boolean"` + // The Availability Zone for the modified Reserved Instances. + AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - // The configuration for the Spot Fleet request. - // - // SpotFleetRequestConfig is a required field - SpotFleetRequestConfig *SpotFleetRequestConfigData `locationName:"spotFleetRequestConfig" type:"structure" required:"true"` + // The number of modified Reserved Instances. + InstanceCount *int64 `locationName:"instanceCount" type:"integer"` + + // The instance type for the modified Reserved Instances. + InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` + + // The network platform of the modified Reserved Instances, which is either + // EC2-Classic or EC2-VPC. + Platform *string `locationName:"platform" type:"string"` + + // Whether the Reserved Instance is applied to instances in a region or instances + // in a specific Availability Zone. + Scope *string `locationName:"scope" type:"string" enum:"scope"` } // String returns the string representation -func (s RequestSpotFleetInput) String() string { +func (s ReservedInstancesConfiguration) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s RequestSpotFleetInput) GoString() string { +func (s ReservedInstancesConfiguration) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *RequestSpotFleetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RequestSpotFleetInput"} - if s.SpotFleetRequestConfig == nil { - invalidParams.Add(request.NewErrParamRequired("SpotFleetRequestConfig")) - } - if s.SpotFleetRequestConfig != nil { - if err := s.SpotFleetRequestConfig.Validate(); err != nil { - invalidParams.AddNested("SpotFleetRequestConfig", err.(request.ErrInvalidParams)) - } - } +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *ReservedInstancesConfiguration) SetAvailabilityZone(v string) *ReservedInstancesConfiguration { + s.AvailabilityZone = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetInstanceCount sets the InstanceCount field's value. +func (s *ReservedInstancesConfiguration) SetInstanceCount(v int64) *ReservedInstancesConfiguration { + s.InstanceCount = &v + return s } -// SetDryRun sets the DryRun field's value. -func (s *RequestSpotFleetInput) SetDryRun(v bool) *RequestSpotFleetInput { - s.DryRun = &v +// SetInstanceType sets the InstanceType field's value. +func (s *ReservedInstancesConfiguration) SetInstanceType(v string) *ReservedInstancesConfiguration { + s.InstanceType = &v return s } -// SetSpotFleetRequestConfig sets the SpotFleetRequestConfig field's value. -func (s *RequestSpotFleetInput) SetSpotFleetRequestConfig(v *SpotFleetRequestConfigData) *RequestSpotFleetInput { - s.SpotFleetRequestConfig = v +// SetPlatform sets the Platform field's value. +func (s *ReservedInstancesConfiguration) SetPlatform(v string) *ReservedInstancesConfiguration { + s.Platform = &v return s } -// Contains the output of RequestSpotFleet. -type RequestSpotFleetOutput struct { +// SetScope sets the Scope field's value. +func (s *ReservedInstancesConfiguration) SetScope(v string) *ReservedInstancesConfiguration { + s.Scope = &v + return s +} + +// Describes the ID of a Reserved Instance. +type ReservedInstancesId struct { _ struct{} `type:"structure"` - // The ID of the Spot Fleet request. - // - // SpotFleetRequestId is a required field - SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"` + // The ID of the Reserved Instance. + ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"` } // String returns the string representation -func (s RequestSpotFleetOutput) String() string { +func (s ReservedInstancesId) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s RequestSpotFleetOutput) GoString() string { +func (s ReservedInstancesId) GoString() string { return s.String() } -// SetSpotFleetRequestId sets the SpotFleetRequestId field's value. -func (s *RequestSpotFleetOutput) SetSpotFleetRequestId(v string) *RequestSpotFleetOutput { - s.SpotFleetRequestId = &v +// SetReservedInstancesId sets the ReservedInstancesId field's value. +func (s *ReservedInstancesId) SetReservedInstancesId(v string) *ReservedInstancesId { + s.ReservedInstancesId = &v return s } -// Contains the parameters for RequestSpotInstances. -type RequestSpotInstancesInput struct { +// Describes a Reserved Instance listing. +type ReservedInstancesListing struct { _ struct{} `type:"structure"` - // The user-specified name for a logical grouping of requests. - // - // When you specify an Availability Zone group in a Spot Instance request, all - // Spot Instances in the request are launched in the same Availability Zone. - // Instance proximity is maintained with this parameter, but the choice of Availability - // Zone is not. The group applies only to requests for Spot Instances of the - // same instance type. Any additional Spot Instance requests that are specified - // with the same Availability Zone group name are launched in that same Availability - // Zone, as long as at least one instance from the group is still active. - // - // If there is no active instance running in the Availability Zone group that - // you specify for a new Spot Instance request (all instances are terminated, - // the request is expired, or the maximum price you specified falls below current - // Spot price), then Amazon EC2 launches the instance in any Availability Zone - // where the constraint can be met. Consequently, the subsequent set of Spot - // Instances could be placed in a different zone from the original request, - // even if you specified the same Availability Zone group. - // - // 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. - BlockDurationMinutes *int64 `locationName:"blockDurationMinutes" type:"integer"` - - // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. For more information, see How to Ensure Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // in the Amazon EC2 User Guide for Linux Instances. + // A unique, case-sensitive key supplied by the client to ensure that the request + // is idempotent. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). ClientToken *string `locationName:"clientToken" 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 `locationName:"dryRun" type:"boolean"` + // The time the listing was created. + CreateDate *time.Time `locationName:"createDate" type:"timestamp"` - // The maximum number of Spot Instances to launch. - // - // Default: 1 - InstanceCount *int64 `locationName:"instanceCount" type:"integer"` + // The number of instances in this state. + InstanceCounts []*InstanceCount `locationName:"instanceCounts" locationNameList:"item" type:"list"` - // The behavior when a Spot Instance is interrupted. The default is terminate. - InstanceInterruptionBehavior *string `type:"string" enum:"InstanceInterruptionBehavior"` + // The price of the Reserved Instance listing. + PriceSchedules []*PriceSchedule `locationName:"priceSchedules" locationNameList:"item" type:"list"` - // The instance launch group. Launch groups are Spot Instances that launch together - // and terminate together. - // - // Default: Instances are launched and terminated individually - LaunchGroup *string `locationName:"launchGroup" type:"string"` + // The ID of the Reserved Instance. + ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"` - // The launch specification. - LaunchSpecification *RequestSpotLaunchSpecification `type:"structure"` + // The ID of the Reserved Instance listing. + ReservedInstancesListingId *string `locationName:"reservedInstancesListingId" type:"string"` - // The maximum price per hour that you are willing to pay for a Spot Instance. - // The default is the On-Demand price. - SpotPrice *string `locationName:"spotPrice" type:"string"` + // The status of the Reserved Instance listing. + Status *string `locationName:"status" type:"string" enum:"ListingStatus"` - // The Spot Instance request type. - // - // Default: one-time - Type *string `locationName:"type" type:"string" enum:"SpotInstanceType"` + // The reason for the current status of the Reserved Instance listing. The response + // can be blank. + StatusMessage *string `locationName:"statusMessage" type:"string"` - // The start date of the request. If this is a one-time request, the request - // becomes active at this date and time and remains active until all instances - // launch, the request expires, or the request is canceled. If the request is - // persistent, the request becomes active at this date and time and remains - // active until it expires or is canceled. - ValidFrom *time.Time `locationName:"validFrom" type:"timestamp"` + // Any tags assigned to the resource. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - // The end date of the request. If this is a one-time request, the request remains - // active until all instances launch, the request is canceled, or this date - // is reached. If the request is persistent, it remains active until it is canceled - // or this date is reached. The default end date is 7 days from the current - // date. - ValidUntil *time.Time `locationName:"validUntil" type:"timestamp"` + // The last modified timestamp of the listing. + UpdateDate *time.Time `locationName:"updateDate" type:"timestamp"` } // String returns the string representation -func (s RequestSpotInstancesInput) String() string { +func (s ReservedInstancesListing) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s RequestSpotInstancesInput) GoString() string { +func (s ReservedInstancesListing) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *RequestSpotInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RequestSpotInstancesInput"} - if s.LaunchSpecification != nil { - if err := s.LaunchSpecification.Validate(); err != nil { - invalidParams.AddNested("LaunchSpecification", err.(request.ErrInvalidParams)) - } - } +// SetClientToken sets the ClientToken field's value. +func (s *ReservedInstancesListing) SetClientToken(v string) *ReservedInstancesListing { + s.ClientToken = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetCreateDate sets the CreateDate field's value. +func (s *ReservedInstancesListing) SetCreateDate(v time.Time) *ReservedInstancesListing { + s.CreateDate = &v + return s } -// SetAvailabilityZoneGroup sets the AvailabilityZoneGroup field's value. -func (s *RequestSpotInstancesInput) SetAvailabilityZoneGroup(v string) *RequestSpotInstancesInput { - s.AvailabilityZoneGroup = &v +// SetInstanceCounts sets the InstanceCounts field's value. +func (s *ReservedInstancesListing) SetInstanceCounts(v []*InstanceCount) *ReservedInstancesListing { + s.InstanceCounts = v return s } -// SetBlockDurationMinutes sets the BlockDurationMinutes field's value. -func (s *RequestSpotInstancesInput) SetBlockDurationMinutes(v int64) *RequestSpotInstancesInput { - s.BlockDurationMinutes = &v +// SetPriceSchedules sets the PriceSchedules field's value. +func (s *ReservedInstancesListing) SetPriceSchedules(v []*PriceSchedule) *ReservedInstancesListing { + s.PriceSchedules = v return s } -// SetClientToken sets the ClientToken field's value. -func (s *RequestSpotInstancesInput) SetClientToken(v string) *RequestSpotInstancesInput { - s.ClientToken = &v +// SetReservedInstancesId sets the ReservedInstancesId field's value. +func (s *ReservedInstancesListing) SetReservedInstancesId(v string) *ReservedInstancesListing { + s.ReservedInstancesId = &v return s } -// SetDryRun sets the DryRun field's value. -func (s *RequestSpotInstancesInput) SetDryRun(v bool) *RequestSpotInstancesInput { - s.DryRun = &v +// SetReservedInstancesListingId sets the ReservedInstancesListingId field's value. +func (s *ReservedInstancesListing) SetReservedInstancesListingId(v string) *ReservedInstancesListing { + s.ReservedInstancesListingId = &v return s } -// SetInstanceCount sets the InstanceCount field's value. -func (s *RequestSpotInstancesInput) SetInstanceCount(v int64) *RequestSpotInstancesInput { - s.InstanceCount = &v +// SetStatus sets the Status field's value. +func (s *ReservedInstancesListing) SetStatus(v string) *ReservedInstancesListing { + s.Status = &v return s } -// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value. -func (s *RequestSpotInstancesInput) SetInstanceInterruptionBehavior(v string) *RequestSpotInstancesInput { - s.InstanceInterruptionBehavior = &v +// SetStatusMessage sets the StatusMessage field's value. +func (s *ReservedInstancesListing) SetStatusMessage(v string) *ReservedInstancesListing { + s.StatusMessage = &v return s } -// SetLaunchGroup sets the LaunchGroup field's value. -func (s *RequestSpotInstancesInput) SetLaunchGroup(v string) *RequestSpotInstancesInput { - s.LaunchGroup = &v +// SetTags sets the Tags field's value. +func (s *ReservedInstancesListing) SetTags(v []*Tag) *ReservedInstancesListing { + s.Tags = v return s } -// SetLaunchSpecification sets the LaunchSpecification field's value. -func (s *RequestSpotInstancesInput) SetLaunchSpecification(v *RequestSpotLaunchSpecification) *RequestSpotInstancesInput { - s.LaunchSpecification = v +// SetUpdateDate sets the UpdateDate field's value. +func (s *ReservedInstancesListing) SetUpdateDate(v time.Time) *ReservedInstancesListing { + s.UpdateDate = &v return s } -// SetSpotPrice sets the SpotPrice field's value. -func (s *RequestSpotInstancesInput) SetSpotPrice(v string) *RequestSpotInstancesInput { - s.SpotPrice = &v +// Describes a Reserved Instance modification. +type ReservedInstancesModification struct { + _ struct{} `type:"structure"` + + // A unique, case-sensitive key supplied by the client to ensure that the request + // is idempotent. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + ClientToken *string `locationName:"clientToken" type:"string"` + + // The time when the modification request was created. + CreateDate *time.Time `locationName:"createDate" type:"timestamp"` + + // The time for the modification to become effective. + EffectiveDate *time.Time `locationName:"effectiveDate" type:"timestamp"` + + // Contains target configurations along with their corresponding new Reserved + // Instance IDs. + ModificationResults []*ReservedInstancesModificationResult `locationName:"modificationResultSet" locationNameList:"item" type:"list"` + + // The IDs of one or more Reserved Instances. + ReservedInstancesIds []*ReservedInstancesId `locationName:"reservedInstancesSet" locationNameList:"item" type:"list"` + + // A unique ID for the Reserved Instance modification. + ReservedInstancesModificationId *string `locationName:"reservedInstancesModificationId" type:"string"` + + // The status of the Reserved Instances modification request. + Status *string `locationName:"status" type:"string"` + + // The reason for the status. + StatusMessage *string `locationName:"statusMessage" type:"string"` + + // The time when the modification request was last updated. + UpdateDate *time.Time `locationName:"updateDate" type:"timestamp"` +} + +// String returns the string representation +func (s ReservedInstancesModification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReservedInstancesModification) GoString() string { + return s.String() +} + +// SetClientToken sets the ClientToken field's value. +func (s *ReservedInstancesModification) SetClientToken(v string) *ReservedInstancesModification { + s.ClientToken = &v return s } -// SetType sets the Type field's value. -func (s *RequestSpotInstancesInput) SetType(v string) *RequestSpotInstancesInput { - s.Type = &v +// SetCreateDate sets the CreateDate field's value. +func (s *ReservedInstancesModification) SetCreateDate(v time.Time) *ReservedInstancesModification { + s.CreateDate = &v return s } -// SetValidFrom sets the ValidFrom field's value. -func (s *RequestSpotInstancesInput) SetValidFrom(v time.Time) *RequestSpotInstancesInput { - s.ValidFrom = &v +// SetEffectiveDate sets the EffectiveDate field's value. +func (s *ReservedInstancesModification) SetEffectiveDate(v time.Time) *ReservedInstancesModification { + s.EffectiveDate = &v return s } -// SetValidUntil sets the ValidUntil field's value. -func (s *RequestSpotInstancesInput) SetValidUntil(v time.Time) *RequestSpotInstancesInput { - s.ValidUntil = &v +// SetModificationResults sets the ModificationResults field's value. +func (s *ReservedInstancesModification) SetModificationResults(v []*ReservedInstancesModificationResult) *ReservedInstancesModification { + s.ModificationResults = v return s } -// Contains the output of RequestSpotInstances. -type RequestSpotInstancesOutput struct { +// SetReservedInstancesIds sets the ReservedInstancesIds field's value. +func (s *ReservedInstancesModification) SetReservedInstancesIds(v []*ReservedInstancesId) *ReservedInstancesModification { + s.ReservedInstancesIds = v + return s +} + +// SetReservedInstancesModificationId sets the ReservedInstancesModificationId field's value. +func (s *ReservedInstancesModification) SetReservedInstancesModificationId(v string) *ReservedInstancesModification { + s.ReservedInstancesModificationId = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *ReservedInstancesModification) SetStatus(v string) *ReservedInstancesModification { + s.Status = &v + return s +} + +// SetStatusMessage sets the StatusMessage field's value. +func (s *ReservedInstancesModification) SetStatusMessage(v string) *ReservedInstancesModification { + s.StatusMessage = &v + return s +} + +// SetUpdateDate sets the UpdateDate field's value. +func (s *ReservedInstancesModification) SetUpdateDate(v time.Time) *ReservedInstancesModification { + s.UpdateDate = &v + return s +} + +// Describes the modification request/s. +type ReservedInstancesModificationResult struct { _ struct{} `type:"structure"` - // One or more Spot Instance requests. - SpotInstanceRequests []*SpotInstanceRequest `locationName:"spotInstanceRequestSet" locationNameList:"item" type:"list"` + // The ID for the Reserved Instances that were created as part of the modification + // request. This field is only available when the modification is fulfilled. + ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"` + + // The target Reserved Instances configurations supplied as part of the modification + // request. + TargetConfiguration *ReservedInstancesConfiguration `locationName:"targetConfiguration" type:"structure"` } // String returns the string representation -func (s RequestSpotInstancesOutput) String() string { +func (s ReservedInstancesModificationResult) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s RequestSpotInstancesOutput) GoString() string { +func (s ReservedInstancesModificationResult) GoString() string { return s.String() } -// SetSpotInstanceRequests sets the SpotInstanceRequests field's value. -func (s *RequestSpotInstancesOutput) SetSpotInstanceRequests(v []*SpotInstanceRequest) *RequestSpotInstancesOutput { - s.SpotInstanceRequests = v +// SetReservedInstancesId sets the ReservedInstancesId field's value. +func (s *ReservedInstancesModificationResult) SetReservedInstancesId(v string) *ReservedInstancesModificationResult { + s.ReservedInstancesId = &v return s } -// Describes the launch specification for an instance. -type RequestSpotLaunchSpecification struct { +// SetTargetConfiguration sets the TargetConfiguration field's value. +func (s *ReservedInstancesModificationResult) SetTargetConfiguration(v *ReservedInstancesConfiguration) *ReservedInstancesModificationResult { + s.TargetConfiguration = v + return s +} + +// Describes a Reserved Instance offering. +type ReservedInstancesOffering struct { _ struct{} `type:"structure"` - // Deprecated. - AddressingType *string `locationName:"addressingType" type:"string"` + // The Availability Zone in which the Reserved Instance can be used. + AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - // One or more block device mapping entries. You can't specify both a snapshot - // ID and an encryption value. This is because only blank volumes can be encrypted - // on creation. If a snapshot is the basis for a volume, it is not blank and - // its encryption status is used for the volume encryption status. - BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` + // The currency of the Reserved Instance offering you are purchasing. It's specified + // using ISO 4217 standard currency codes. At this time, the only supported + // currency is USD. + CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` - // Indicates whether the instance is optimized for EBS I/O. This optimization - // provides dedicated throughput to Amazon EBS and an optimized configuration - // stack to provide optimal EBS I/O performance. This optimization isn't available - // with all instance types. Additional usage charges apply when using an EBS - // Optimized instance. - // - // Default: false - EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"` + // The duration of the Reserved Instance, in seconds. + Duration *int64 `locationName:"duration" type:"long"` - // The IAM instance profile. - IamInstanceProfile *IamInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"` + // The purchase price of the Reserved Instance. + FixedPrice *float64 `locationName:"fixedPrice" type:"float"` - // The ID of the AMI. - ImageId *string `locationName:"imageId" type:"string"` + // The tenancy of the instance. + InstanceTenancy *string `locationName:"instanceTenancy" type:"string" enum:"Tenancy"` - // The instance type. + // The instance type on which the Reserved Instance can be used. InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` - // The ID of the kernel. - KernelId *string `locationName:"kernelId" type:"string"` - - // The name of the key pair. - KeyName *string `locationName:"keyName" type:"string"` + // 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 *bool `locationName:"marketplace" type:"boolean"` - // Indicates whether basic or detailed monitoring is enabled for the instance. - // - // Default: Disabled - Monitoring *RunInstancesMonitoringEnabled `locationName:"monitoring" type:"structure"` + // If convertible it can be exchanged for Reserved Instances of the same or + // higher monetary value, with different configurations. If standard, it is + // not possible to perform an exchange. + OfferingClass *string `locationName:"offeringClass" type:"string" enum:"OfferingClassType"` - // One or more network interfaces. If you specify a network interface, you must - // specify subnet IDs and security group IDs using the network interface. - NetworkInterfaces []*InstanceNetworkInterfaceSpecification `locationName:"NetworkInterface" locationNameList:"item" type:"list"` + // The Reserved Instance offering type. + OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingTypeValues"` - // The placement information for the instance. - Placement *SpotPlacement `locationName:"placement" type:"structure"` + // The pricing details of the Reserved Instance offering. + PricingDetails []*PricingDetail `locationName:"pricingDetailsSet" locationNameList:"item" type:"list"` - // The ID of the RAM disk. - RamdiskId *string `locationName:"ramdiskId" type:"string"` + // The Reserved Instance product platform description. + ProductDescription *string `locationName:"productDescription" type:"string" enum:"RIProductDescription"` - // One or more security group IDs. - SecurityGroupIds []*string `locationName:"SecurityGroupId" locationNameList:"item" type:"list"` + // The recurring charge tag assigned to the resource. + RecurringCharges []*RecurringCharge `locationName:"recurringCharges" locationNameList:"item" type:"list"` - // One or more security groups. When requesting instances in a VPC, you must - // specify the IDs of the security groups. When requesting instances in EC2-Classic, - // you can specify the names or the IDs of the security groups. - SecurityGroups []*string `locationName:"SecurityGroup" locationNameList:"item" type:"list"` + // The ID of the Reserved Instance offering. This is the offering ID used in + // GetReservedInstancesExchangeQuote to confirm that an exchange can be made. + ReservedInstancesOfferingId *string `locationName:"reservedInstancesOfferingId" type:"string"` - // The ID of the subnet in which to launch the instance. - SubnetId *string `locationName:"subnetId" type:"string"` + // Whether the Reserved Instance is applied to instances in a region or an Availability + // Zone. + Scope *string `locationName:"scope" type:"string" enum:"scope"` - // The Base64-encoded user data for the instance. - UserData *string `locationName:"userData" type:"string"` + // The usage price of the Reserved Instance, per hour. + UsagePrice *float64 `locationName:"usagePrice" type:"float"` } // String returns the string representation -func (s RequestSpotLaunchSpecification) String() string { +func (s ReservedInstancesOffering) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s RequestSpotLaunchSpecification) GoString() string { +func (s ReservedInstancesOffering) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *RequestSpotLaunchSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RequestSpotLaunchSpecification"} - if s.Monitoring != nil { - if err := s.Monitoring.Validate(); err != nil { - invalidParams.AddNested("Monitoring", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAddressingType sets the AddressingType field's value. -func (s *RequestSpotLaunchSpecification) SetAddressingType(v string) *RequestSpotLaunchSpecification { - s.AddressingType = &v +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *ReservedInstancesOffering) SetAvailabilityZone(v string) *ReservedInstancesOffering { + s.AvailabilityZone = &v return s } -// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *RequestSpotLaunchSpecification) SetBlockDeviceMappings(v []*BlockDeviceMapping) *RequestSpotLaunchSpecification { - s.BlockDeviceMappings = v +// SetCurrencyCode sets the CurrencyCode field's value. +func (s *ReservedInstancesOffering) SetCurrencyCode(v string) *ReservedInstancesOffering { + s.CurrencyCode = &v return s } -// SetEbsOptimized sets the EbsOptimized field's value. -func (s *RequestSpotLaunchSpecification) SetEbsOptimized(v bool) *RequestSpotLaunchSpecification { - s.EbsOptimized = &v +// SetDuration sets the Duration field's value. +func (s *ReservedInstancesOffering) SetDuration(v int64) *ReservedInstancesOffering { + s.Duration = &v return s } -// SetIamInstanceProfile sets the IamInstanceProfile field's value. -func (s *RequestSpotLaunchSpecification) SetIamInstanceProfile(v *IamInstanceProfileSpecification) *RequestSpotLaunchSpecification { - s.IamInstanceProfile = v +// SetFixedPrice sets the FixedPrice field's value. +func (s *ReservedInstancesOffering) SetFixedPrice(v float64) *ReservedInstancesOffering { + s.FixedPrice = &v return s } -// SetImageId sets the ImageId field's value. -func (s *RequestSpotLaunchSpecification) SetImageId(v string) *RequestSpotLaunchSpecification { - s.ImageId = &v +// SetInstanceTenancy sets the InstanceTenancy field's value. +func (s *ReservedInstancesOffering) SetInstanceTenancy(v string) *ReservedInstancesOffering { + s.InstanceTenancy = &v return s } // SetInstanceType sets the InstanceType field's value. -func (s *RequestSpotLaunchSpecification) SetInstanceType(v string) *RequestSpotLaunchSpecification { +func (s *ReservedInstancesOffering) SetInstanceType(v string) *ReservedInstancesOffering { s.InstanceType = &v return s } -// SetKernelId sets the KernelId field's value. -func (s *RequestSpotLaunchSpecification) SetKernelId(v string) *RequestSpotLaunchSpecification { - s.KernelId = &v - return s -} - -// SetKeyName sets the KeyName field's value. -func (s *RequestSpotLaunchSpecification) SetKeyName(v string) *RequestSpotLaunchSpecification { - s.KeyName = &v +// SetMarketplace sets the Marketplace field's value. +func (s *ReservedInstancesOffering) SetMarketplace(v bool) *ReservedInstancesOffering { + s.Marketplace = &v return s } -// SetMonitoring sets the Monitoring field's value. -func (s *RequestSpotLaunchSpecification) SetMonitoring(v *RunInstancesMonitoringEnabled) *RequestSpotLaunchSpecification { - s.Monitoring = v +// SetOfferingClass sets the OfferingClass field's value. +func (s *ReservedInstancesOffering) SetOfferingClass(v string) *ReservedInstancesOffering { + s.OfferingClass = &v return s } -// SetNetworkInterfaces sets the NetworkInterfaces field's value. -func (s *RequestSpotLaunchSpecification) SetNetworkInterfaces(v []*InstanceNetworkInterfaceSpecification) *RequestSpotLaunchSpecification { - s.NetworkInterfaces = v +// SetOfferingType sets the OfferingType field's value. +func (s *ReservedInstancesOffering) SetOfferingType(v string) *ReservedInstancesOffering { + s.OfferingType = &v return s } -// SetPlacement sets the Placement field's value. -func (s *RequestSpotLaunchSpecification) SetPlacement(v *SpotPlacement) *RequestSpotLaunchSpecification { - s.Placement = v +// SetPricingDetails sets the PricingDetails field's value. +func (s *ReservedInstancesOffering) SetPricingDetails(v []*PricingDetail) *ReservedInstancesOffering { + s.PricingDetails = v return s } -// SetRamdiskId sets the RamdiskId field's value. -func (s *RequestSpotLaunchSpecification) SetRamdiskId(v string) *RequestSpotLaunchSpecification { - s.RamdiskId = &v +// SetProductDescription sets the ProductDescription field's value. +func (s *ReservedInstancesOffering) SetProductDescription(v string) *ReservedInstancesOffering { + s.ProductDescription = &v return s } -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *RequestSpotLaunchSpecification) SetSecurityGroupIds(v []*string) *RequestSpotLaunchSpecification { - s.SecurityGroupIds = v +// SetRecurringCharges sets the RecurringCharges field's value. +func (s *ReservedInstancesOffering) SetRecurringCharges(v []*RecurringCharge) *ReservedInstancesOffering { + s.RecurringCharges = v return s } -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *RequestSpotLaunchSpecification) SetSecurityGroups(v []*string) *RequestSpotLaunchSpecification { - s.SecurityGroups = v +// SetReservedInstancesOfferingId sets the ReservedInstancesOfferingId field's value. +func (s *ReservedInstancesOffering) SetReservedInstancesOfferingId(v string) *ReservedInstancesOffering { + s.ReservedInstancesOfferingId = &v return s } -// SetSubnetId sets the SubnetId field's value. -func (s *RequestSpotLaunchSpecification) SetSubnetId(v string) *RequestSpotLaunchSpecification { - s.SubnetId = &v +// SetScope sets the Scope field's value. +func (s *ReservedInstancesOffering) SetScope(v string) *ReservedInstancesOffering { + s.Scope = &v return s } -// SetUserData sets the UserData field's value. -func (s *RequestSpotLaunchSpecification) SetUserData(v string) *RequestSpotLaunchSpecification { - s.UserData = &v +// SetUsagePrice sets the UsagePrice field's value. +func (s *ReservedInstancesOffering) SetUsagePrice(v float64) *ReservedInstancesOffering { + s.UsagePrice = &v return s } -// Describes a reservation. -type Reservation struct { +type ResetFpgaImageAttributeInput struct { _ struct{} `type:"structure"` - // [EC2-Classic only] One or more security groups. - Groups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` - - // One or more instances. - Instances []*Instance `locationName:"instancesSet" locationNameList:"item" type:"list"` - - // The ID of the AWS account that owns the reservation. - OwnerId *string `locationName:"ownerId" type:"string"` + // The attribute. + Attribute *string `type:"string" enum:"ResetFpgaImageAttributeName"` - // The ID of the requester that launched the instances on your behalf (for example, - // AWS Management Console or Auto Scaling). - RequesterId *string `locationName:"requesterId" 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 reservation. - ReservationId *string `locationName:"reservationId" type:"string"` + // The ID of the AFI. + // + // FpgaImageId is a required field + FpgaImageId *string `type:"string" required:"true"` } // String returns the string representation -func (s Reservation) String() string { +func (s ResetFpgaImageAttributeInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Reservation) GoString() string { +func (s ResetFpgaImageAttributeInput) GoString() string { return s.String() } -// SetGroups sets the Groups field's value. -func (s *Reservation) SetGroups(v []*GroupIdentifier) *Reservation { - s.Groups = v - return s -} - -// SetInstances sets the Instances field's value. -func (s *Reservation) SetInstances(v []*Instance) *Reservation { - s.Instances = v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *Reservation) SetOwnerId(v string) *Reservation { - s.OwnerId = &v - return s -} - -// SetRequesterId sets the RequesterId field's value. -func (s *Reservation) SetRequesterId(v string) *Reservation { - s.RequesterId = &v - return s -} - -// SetReservationId sets the ReservationId field's value. -func (s *Reservation) SetReservationId(v string) *Reservation { - s.ReservationId = &v - return s -} - -// The cost associated with the Reserved Instance. -type ReservationValue struct { - _ struct{} `type:"structure"` - - // The hourly rate of the reservation. - HourlyPrice *string `locationName:"hourlyPrice" type:"string"` - - // The balance of the total value (the sum of remainingUpfrontValue + hourlyPrice - // * number of hours remaining). - RemainingTotalValue *string `locationName:"remainingTotalValue" type:"string"` - - // The remaining upfront cost of the reservation. - RemainingUpfrontValue *string `locationName:"remainingUpfrontValue" type:"string"` -} - -// String returns the string representation -func (s ReservationValue) String() string { - return awsutil.Prettify(s) -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResetFpgaImageAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResetFpgaImageAttributeInput"} + if s.FpgaImageId == nil { + invalidParams.Add(request.NewErrParamRequired("FpgaImageId")) + } -// GoString returns the string representation -func (s ReservationValue) GoString() string { - return s.String() + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetHourlyPrice sets the HourlyPrice field's value. -func (s *ReservationValue) SetHourlyPrice(v string) *ReservationValue { - s.HourlyPrice = &v +// SetAttribute sets the Attribute field's value. +func (s *ResetFpgaImageAttributeInput) SetAttribute(v string) *ResetFpgaImageAttributeInput { + s.Attribute = &v return s } -// SetRemainingTotalValue sets the RemainingTotalValue field's value. -func (s *ReservationValue) SetRemainingTotalValue(v string) *ReservationValue { - s.RemainingTotalValue = &v +// SetDryRun sets the DryRun field's value. +func (s *ResetFpgaImageAttributeInput) SetDryRun(v bool) *ResetFpgaImageAttributeInput { + s.DryRun = &v return s } -// SetRemainingUpfrontValue sets the RemainingUpfrontValue field's value. -func (s *ReservationValue) SetRemainingUpfrontValue(v string) *ReservationValue { - s.RemainingUpfrontValue = &v +// SetFpgaImageId sets the FpgaImageId field's value. +func (s *ResetFpgaImageAttributeInput) SetFpgaImageId(v string) *ResetFpgaImageAttributeInput { + s.FpgaImageId = &v return s } -// Describes the limit price of a Reserved Instance offering. -type ReservedInstanceLimitPrice struct { +type ResetFpgaImageAttributeOutput struct { _ struct{} `type:"structure"` - // Used for Reserved Instance Marketplace offerings. Specifies the limit price - // on the total order (instanceCount * price). - Amount *float64 `locationName:"amount" type:"double"` - - // The currency in which the limitPrice amount is specified. At this time, the - // only supported currency is USD. - CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` + // Is true if the request succeeds, and an error otherwise. + Return *bool `locationName:"return" type:"boolean"` } // String returns the string representation -func (s ReservedInstanceLimitPrice) String() string { +func (s ResetFpgaImageAttributeOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ReservedInstanceLimitPrice) GoString() string { +func (s ResetFpgaImageAttributeOutput) GoString() string { return s.String() } -// SetAmount sets the Amount field's value. -func (s *ReservedInstanceLimitPrice) SetAmount(v float64) *ReservedInstanceLimitPrice { - s.Amount = &v - return s -} - -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *ReservedInstanceLimitPrice) SetCurrencyCode(v string) *ReservedInstanceLimitPrice { - s.CurrencyCode = &v +// SetReturn sets the Return field's value. +func (s *ResetFpgaImageAttributeOutput) SetReturn(v bool) *ResetFpgaImageAttributeOutput { + s.Return = &v return s } -// The total value of the Convertible Reserved Instance. -type ReservedInstanceReservationValue struct { +// Contains the parameters for ResetImageAttribute. +type ResetImageAttributeInput struct { _ struct{} `type:"structure"` - // The total value of the Convertible Reserved Instance that you are exchanging. - ReservationValue *ReservationValue `locationName:"reservationValue" type:"structure"` + // The attribute to reset (currently you can only reset the launch permission + // attribute). + // + // Attribute is a required field + Attribute *string `type:"string" required:"true" enum:"ResetImageAttributeName"` - // The ID of the Convertible Reserved Instance that you are exchanging. - ReservedInstanceId *string `locationName:"reservedInstanceId" 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 `locationName:"dryRun" 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 ReservedInstanceReservationValue) String() string { +func (s ResetImageAttributeInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ReservedInstanceReservationValue) GoString() string { +func (s ResetImageAttributeInput) GoString() string { return s.String() } -// SetReservationValue sets the ReservationValue field's value. -func (s *ReservedInstanceReservationValue) SetReservationValue(v *ReservationValue) *ReservedInstanceReservationValue { - s.ReservationValue = v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResetImageAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResetImageAttributeInput"} + if s.Attribute == nil { + invalidParams.Add(request.NewErrParamRequired("Attribute")) + } + if s.ImageId == nil { + invalidParams.Add(request.NewErrParamRequired("ImageId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetReservedInstanceId sets the ReservedInstanceId field's value. -func (s *ReservedInstanceReservationValue) SetReservedInstanceId(v string) *ReservedInstanceReservationValue { - s.ReservedInstanceId = &v +// SetAttribute sets the Attribute field's value. +func (s *ResetImageAttributeInput) SetAttribute(v string) *ResetImageAttributeInput { + s.Attribute = &v return s } -// Describes a Reserved Instance. -type ReservedInstances struct { - _ struct{} `type:"structure"` - - // The Availability Zone in which the Reserved Instance can be used. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The currency of the Reserved Instance. It's specified using ISO 4217 standard - // currency codes. At this time, the only supported currency is USD. - CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` - - // The duration of the Reserved Instance, in seconds. - Duration *int64 `locationName:"duration" type:"long"` - - // The time when the Reserved Instance expires. - End *time.Time `locationName:"end" type:"timestamp"` - - // The purchase price of the Reserved Instance. - FixedPrice *float64 `locationName:"fixedPrice" type:"float"` - - // The number of reservations purchased. - InstanceCount *int64 `locationName:"instanceCount" type:"integer"` - - // The tenancy of the instance. - InstanceTenancy *string `locationName:"instanceTenancy" type:"string" enum:"Tenancy"` - - // The instance type on which the Reserved Instance can be used. - InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` - - // The offering class of the Reserved Instance. - OfferingClass *string `locationName:"offeringClass" type:"string" enum:"OfferingClassType"` - - // The Reserved Instance offering type. - OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingTypeValues"` +// SetDryRun sets the DryRun field's value. +func (s *ResetImageAttributeInput) SetDryRun(v bool) *ResetImageAttributeInput { + s.DryRun = &v + return s +} - // The Reserved Instance product platform description. - ProductDescription *string `locationName:"productDescription" type:"string" enum:"RIProductDescription"` +// SetImageId sets the ImageId field's value. +func (s *ResetImageAttributeInput) SetImageId(v string) *ResetImageAttributeInput { + s.ImageId = &v + return s +} - // The recurring charge tag assigned to the resource. - RecurringCharges []*RecurringCharge `locationName:"recurringCharges" locationNameList:"item" type:"list"` +type ResetImageAttributeOutput struct { + _ struct{} `type:"structure"` +} - // The ID of the Reserved Instance. - ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"` +// String returns the string representation +func (s ResetImageAttributeOutput) String() string { + return awsutil.Prettify(s) +} - // The scope of the Reserved Instance. - Scope *string `locationName:"scope" type:"string" enum:"scope"` +// GoString returns the string representation +func (s ResetImageAttributeOutput) GoString() string { + return s.String() +} - // The date and time the Reserved Instance started. - Start *time.Time `locationName:"start" type:"timestamp"` +type ResetInstanceAttributeInput struct { + _ struct{} `type:"structure"` - // The state of the Reserved Instance purchase. - State *string `locationName:"state" type:"string" enum:"ReservedInstanceState"` + // The attribute to reset. + // + // You can only reset the following attributes: kernel | ramdisk | sourceDestCheck. + // To change an instance attribute, use ModifyInstanceAttribute. + // + // Attribute is a required field + Attribute *string `locationName:"attribute" type:"string" required:"true" enum:"InstanceAttributeName"` - // Any tags assigned to the resource. - Tags []*Tag `locationName:"tagSet" 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 `locationName:"dryRun" type:"boolean"` - // The usage price of the Reserved Instance, per hour. - UsagePrice *float64 `locationName:"usagePrice" type:"float"` + // The ID of the instance. + // + // InstanceId is a required field + InstanceId *string `locationName:"instanceId" type:"string" required:"true"` } // String returns the string representation -func (s ReservedInstances) String() string { +func (s ResetInstanceAttributeInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ReservedInstances) GoString() string { +func (s ResetInstanceAttributeInput) GoString() string { return s.String() } -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *ReservedInstances) SetAvailabilityZone(v string) *ReservedInstances { - s.AvailabilityZone = &v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResetInstanceAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResetInstanceAttributeInput"} + if s.Attribute == nil { + invalidParams.Add(request.NewErrParamRequired("Attribute")) + } + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *ReservedInstances) SetCurrencyCode(v string) *ReservedInstances { - s.CurrencyCode = &v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetDuration sets the Duration field's value. -func (s *ReservedInstances) SetDuration(v int64) *ReservedInstances { - s.Duration = &v +// SetAttribute sets the Attribute field's value. +func (s *ResetInstanceAttributeInput) SetAttribute(v string) *ResetInstanceAttributeInput { + s.Attribute = &v return s } -// SetEnd sets the End field's value. -func (s *ReservedInstances) SetEnd(v time.Time) *ReservedInstances { - s.End = &v +// SetDryRun sets the DryRun field's value. +func (s *ResetInstanceAttributeInput) SetDryRun(v bool) *ResetInstanceAttributeInput { + s.DryRun = &v return s } -// SetFixedPrice sets the FixedPrice field's value. -func (s *ReservedInstances) SetFixedPrice(v float64) *ReservedInstances { - s.FixedPrice = &v +// SetInstanceId sets the InstanceId field's value. +func (s *ResetInstanceAttributeInput) SetInstanceId(v string) *ResetInstanceAttributeInput { + s.InstanceId = &v return s } -// SetInstanceCount sets the InstanceCount field's value. -func (s *ReservedInstances) SetInstanceCount(v int64) *ReservedInstances { - s.InstanceCount = &v - return s +type ResetInstanceAttributeOutput struct { + _ struct{} `type:"structure"` } -// SetInstanceTenancy sets the InstanceTenancy field's value. -func (s *ReservedInstances) SetInstanceTenancy(v string) *ReservedInstances { - s.InstanceTenancy = &v - return s +// String returns the string representation +func (s ResetInstanceAttributeOutput) String() string { + return awsutil.Prettify(s) } -// SetInstanceType sets the InstanceType field's value. -func (s *ReservedInstances) SetInstanceType(v string) *ReservedInstances { - s.InstanceType = &v - return s +// GoString returns the string representation +func (s ResetInstanceAttributeOutput) GoString() string { + return s.String() } -// SetOfferingClass sets the OfferingClass field's value. -func (s *ReservedInstances) SetOfferingClass(v string) *ReservedInstances { - s.OfferingClass = &v - return s +// Contains the parameters for ResetNetworkInterfaceAttribute. +type ResetNetworkInterfaceAttributeInput 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 `locationName:"dryRun" type:"boolean"` + + // The ID of the network interface. + // + // NetworkInterfaceId is a required field + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"` + + // The source/destination checking attribute. Resets the value to true. + SourceDestCheck *string `locationName:"sourceDestCheck" type:"string"` } -// SetOfferingType sets the OfferingType field's value. -func (s *ReservedInstances) SetOfferingType(v string) *ReservedInstances { - s.OfferingType = &v - return s +// String returns the string representation +func (s ResetNetworkInterfaceAttributeInput) String() string { + return awsutil.Prettify(s) } -// SetProductDescription sets the ProductDescription field's value. -func (s *ReservedInstances) SetProductDescription(v string) *ReservedInstances { - s.ProductDescription = &v - return s +// GoString returns the string representation +func (s ResetNetworkInterfaceAttributeInput) GoString() string { + return s.String() } -// SetRecurringCharges sets the RecurringCharges field's value. -func (s *ReservedInstances) SetRecurringCharges(v []*RecurringCharge) *ReservedInstances { - s.RecurringCharges = v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResetNetworkInterfaceAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResetNetworkInterfaceAttributeInput"} + if s.NetworkInterfaceId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetReservedInstancesId sets the ReservedInstancesId field's value. -func (s *ReservedInstances) SetReservedInstancesId(v string) *ReservedInstances { - s.ReservedInstancesId = &v +// SetDryRun sets the DryRun field's value. +func (s *ResetNetworkInterfaceAttributeInput) SetDryRun(v bool) *ResetNetworkInterfaceAttributeInput { + s.DryRun = &v return s } -// SetScope sets the Scope field's value. -func (s *ReservedInstances) SetScope(v string) *ReservedInstances { - s.Scope = &v +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *ResetNetworkInterfaceAttributeInput) SetNetworkInterfaceId(v string) *ResetNetworkInterfaceAttributeInput { + s.NetworkInterfaceId = &v return s } -// SetStart sets the Start field's value. -func (s *ReservedInstances) SetStart(v time.Time) *ReservedInstances { - s.Start = &v +// SetSourceDestCheck sets the SourceDestCheck field's value. +func (s *ResetNetworkInterfaceAttributeInput) SetSourceDestCheck(v string) *ResetNetworkInterfaceAttributeInput { + s.SourceDestCheck = &v return s } -// SetState sets the State field's value. -func (s *ReservedInstances) SetState(v string) *ReservedInstances { - s.State = &v - return s +type ResetNetworkInterfaceAttributeOutput struct { + _ struct{} `type:"structure"` } -// SetTags sets the Tags field's value. -func (s *ReservedInstances) SetTags(v []*Tag) *ReservedInstances { - s.Tags = v - return s +// String returns the string representation +func (s ResetNetworkInterfaceAttributeOutput) String() string { + return awsutil.Prettify(s) } -// SetUsagePrice sets the UsagePrice field's value. -func (s *ReservedInstances) SetUsagePrice(v float64) *ReservedInstances { - s.UsagePrice = &v - return s +// GoString returns the string representation +func (s ResetNetworkInterfaceAttributeOutput) GoString() string { + return s.String() } -// Describes the configuration settings for the modified Reserved Instances. -type ReservedInstancesConfiguration struct { +// Contains the parameters for ResetSnapshotAttribute. +type ResetSnapshotAttributeInput struct { _ struct{} `type:"structure"` - // The Availability Zone for the modified Reserved Instances. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The number of modified Reserved Instances. - InstanceCount *int64 `locationName:"instanceCount" type:"integer"` - - // The instance type for the modified Reserved Instances. - InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` + // The attribute to reset. Currently, only the attribute for permission to create + // volumes can be reset. + // + // Attribute is a required field + Attribute *string `type:"string" required:"true" enum:"SnapshotAttributeName"` - // The network platform of the modified Reserved Instances, which is either - // EC2-Classic or EC2-VPC. - Platform *string `locationName:"platform" 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 `locationName:"dryRun" type:"boolean"` - // Whether the Reserved Instance is applied to instances in a region or instances - // in a specific Availability Zone. - Scope *string `locationName:"scope" type:"string" enum:"scope"` + // The ID of the snapshot. + // + // SnapshotId is a required field + SnapshotId *string `type:"string" required:"true"` } // String returns the string representation -func (s ReservedInstancesConfiguration) String() string { +func (s ResetSnapshotAttributeInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ReservedInstancesConfiguration) GoString() string { +func (s ResetSnapshotAttributeInput) GoString() string { return s.String() } -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *ReservedInstancesConfiguration) SetAvailabilityZone(v string) *ReservedInstancesConfiguration { - s.AvailabilityZone = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResetSnapshotAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResetSnapshotAttributeInput"} + if s.Attribute == nil { + invalidParams.Add(request.NewErrParamRequired("Attribute")) + } + if s.SnapshotId == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetInstanceCount sets the InstanceCount field's value. -func (s *ReservedInstancesConfiguration) SetInstanceCount(v int64) *ReservedInstancesConfiguration { - s.InstanceCount = &v +// SetAttribute sets the Attribute field's value. +func (s *ResetSnapshotAttributeInput) SetAttribute(v string) *ResetSnapshotAttributeInput { + s.Attribute = &v return s } -// SetInstanceType sets the InstanceType field's value. -func (s *ReservedInstancesConfiguration) SetInstanceType(v string) *ReservedInstancesConfiguration { - s.InstanceType = &v +// SetDryRun sets the DryRun field's value. +func (s *ResetSnapshotAttributeInput) SetDryRun(v bool) *ResetSnapshotAttributeInput { + s.DryRun = &v return s } -// SetPlatform sets the Platform field's value. -func (s *ReservedInstancesConfiguration) SetPlatform(v string) *ReservedInstancesConfiguration { - s.Platform = &v +// SetSnapshotId sets the SnapshotId field's value. +func (s *ResetSnapshotAttributeInput) SetSnapshotId(v string) *ResetSnapshotAttributeInput { + s.SnapshotId = &v return s } -// SetScope sets the Scope field's value. -func (s *ReservedInstancesConfiguration) SetScope(v string) *ReservedInstancesConfiguration { - s.Scope = &v - return s +type ResetSnapshotAttributeOutput struct { + _ struct{} `type:"structure"` } -// Describes the ID of a Reserved Instance. -type ReservedInstancesId struct { +// String returns the string representation +func (s ResetSnapshotAttributeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResetSnapshotAttributeOutput) GoString() string { + return s.String() +} + +// Describes the error that's returned when you cannot delete a launch template +// version. +type ResponseError struct { _ struct{} `type:"structure"` - // The ID of the Reserved Instance. - ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"` + // The error code. + Code *string `locationName:"code" type:"string" enum:"LaunchTemplateErrorCode"` + + // The error message, if applicable. + Message *string `locationName:"message" type:"string"` } // String returns the string representation -func (s ReservedInstancesId) String() string { +func (s ResponseError) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ReservedInstancesId) GoString() string { +func (s ResponseError) GoString() string { return s.String() } -// SetReservedInstancesId sets the ReservedInstancesId field's value. -func (s *ReservedInstancesId) SetReservedInstancesId(v string) *ReservedInstancesId { - s.ReservedInstancesId = &v +// SetCode sets the Code field's value. +func (s *ResponseError) SetCode(v string) *ResponseError { + s.Code = &v return s } -// Describes a Reserved Instance listing. -type ReservedInstancesListing struct { +// SetMessage sets the Message field's value. +func (s *ResponseError) SetMessage(v string) *ResponseError { + s.Message = &v + return s +} + +// The information for a launch template. +type ResponseLaunchTemplateData struct { _ struct{} `type:"structure"` - // A unique, case-sensitive key supplied by the client to ensure that the request - // is idempotent. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - ClientToken *string `locationName:"clientToken" type:"string"` + // The block device mappings. + BlockDeviceMappings []*LaunchTemplateBlockDeviceMapping `locationName:"blockDeviceMappingSet" locationNameList:"item" type:"list"` - // The time the listing was created. - CreateDate *time.Time `locationName:"createDate" type:"timestamp"` + // Information about the Capacity Reservation targeting option. + CapacityReservationSpecification *LaunchTemplateCapacityReservationSpecificationResponse `locationName:"capacityReservationSpecification" type:"structure"` - // The number of instances in this state. - InstanceCounts []*InstanceCount `locationName:"instanceCounts" locationNameList:"item" type:"list"` + // The CPU options for the instance. For more information, see Optimizing CPU + // Options (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) + // in the Amazon Elastic Compute Cloud User Guide. + CpuOptions *LaunchTemplateCpuOptions `locationName:"cpuOptions" type:"structure"` - // The price of the Reserved Instance listing. - PriceSchedules []*PriceSchedule `locationName:"priceSchedules" locationNameList:"item" type:"list"` + // The credit option for CPU usage of the instance. + CreditSpecification *CreditSpecification `locationName:"creditSpecification" type:"structure"` - // The ID of the Reserved Instance. - ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"` + // If set to true, indicates that the instance cannot be terminated using the + // Amazon EC2 console, command line tool, or API. + DisableApiTermination *bool `locationName:"disableApiTermination" type:"boolean"` - // The ID of the Reserved Instance listing. - ReservedInstancesListingId *string `locationName:"reservedInstancesListingId" type:"string"` + // Indicates whether the instance is optimized for Amazon EBS I/O. + EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"` + + // The elastic GPU specification. + ElasticGpuSpecifications []*ElasticGpuSpecificationResponse `locationName:"elasticGpuSpecificationSet" locationNameList:"item" type:"list"` + + // The elastic inference accelerator for the instance. + ElasticInferenceAccelerators []*LaunchTemplateElasticInferenceAcceleratorResponse `locationName:"elasticInferenceAcceleratorSet" locationNameList:"item" type:"list"` + + // Indicates whether an instance is configured for hibernation. For more information, + // see Hibernate Your Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) + // in the Amazon Elastic Compute Cloud User Guide. + HibernationOptions *LaunchTemplateHibernationOptions `locationName:"hibernationOptions" type:"structure"` + + // The IAM instance profile. + IamInstanceProfile *LaunchTemplateIamInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"` + + // The ID of the AMI that was used to launch the instance. + ImageId *string `locationName:"imageId" type:"string"` + + // Indicates whether an instance stops or terminates when you initiate shutdown + // from the instance (using the operating system command for system shutdown). + InstanceInitiatedShutdownBehavior *string `locationName:"instanceInitiatedShutdownBehavior" type:"string" enum:"ShutdownBehavior"` + + // The market (purchasing) option for the instances. + InstanceMarketOptions *LaunchTemplateInstanceMarketOptions `locationName:"instanceMarketOptions" type:"structure"` + + // The instance type. + InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` + + // The ID of the kernel, if applicable. + KernelId *string `locationName:"kernelId" type:"string"` + + // The name of the key pair. + KeyName *string `locationName:"keyName" type:"string"` + + // The license configurations. + LicenseSpecifications []*LaunchTemplateLicenseConfiguration `locationName:"licenseSet" locationNameList:"item" type:"list"` + + // The monitoring for the instance. + Monitoring *LaunchTemplatesMonitoring `locationName:"monitoring" type:"structure"` + + // The network interfaces. + NetworkInterfaces []*LaunchTemplateInstanceNetworkInterfaceSpecification `locationName:"networkInterfaceSet" locationNameList:"item" type:"list"` + + // The placement of the instance. + Placement *LaunchTemplatePlacement `locationName:"placement" type:"structure"` + + // The ID of the RAM disk, if applicable. + RamDiskId *string `locationName:"ramDiskId" type:"string"` - // The status of the Reserved Instance listing. - Status *string `locationName:"status" type:"string" enum:"ListingStatus"` + // The security group IDs. + SecurityGroupIds []*string `locationName:"securityGroupIdSet" locationNameList:"item" type:"list"` - // The reason for the current status of the Reserved Instance listing. The response - // can be blank. - StatusMessage *string `locationName:"statusMessage" type:"string"` + // The security group names. + SecurityGroups []*string `locationName:"securityGroupSet" locationNameList:"item" type:"list"` - // Any tags assigned to the resource. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + // The tags. + TagSpecifications []*LaunchTemplateTagSpecification `locationName:"tagSpecificationSet" locationNameList:"item" type:"list"` - // The last modified timestamp of the listing. - UpdateDate *time.Time `locationName:"updateDate" type:"timestamp"` + // The user data for the instance. + UserData *string `locationName:"userData" type:"string"` } // String returns the string representation -func (s ReservedInstancesListing) String() string { +func (s ResponseLaunchTemplateData) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ReservedInstancesListing) GoString() string { +func (s ResponseLaunchTemplateData) GoString() string { return s.String() } -// SetClientToken sets the ClientToken field's value. -func (s *ReservedInstancesListing) SetClientToken(v string) *ReservedInstancesListing { - s.ClientToken = &v +// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. +func (s *ResponseLaunchTemplateData) SetBlockDeviceMappings(v []*LaunchTemplateBlockDeviceMapping) *ResponseLaunchTemplateData { + s.BlockDeviceMappings = v return s } -// SetCreateDate sets the CreateDate field's value. -func (s *ReservedInstancesListing) SetCreateDate(v time.Time) *ReservedInstancesListing { - s.CreateDate = &v +// SetCapacityReservationSpecification sets the CapacityReservationSpecification field's value. +func (s *ResponseLaunchTemplateData) SetCapacityReservationSpecification(v *LaunchTemplateCapacityReservationSpecificationResponse) *ResponseLaunchTemplateData { + s.CapacityReservationSpecification = v return s } -// SetInstanceCounts sets the InstanceCounts field's value. -func (s *ReservedInstancesListing) SetInstanceCounts(v []*InstanceCount) *ReservedInstancesListing { - s.InstanceCounts = v +// SetCpuOptions sets the CpuOptions field's value. +func (s *ResponseLaunchTemplateData) SetCpuOptions(v *LaunchTemplateCpuOptions) *ResponseLaunchTemplateData { + s.CpuOptions = v return s } -// SetPriceSchedules sets the PriceSchedules field's value. -func (s *ReservedInstancesListing) SetPriceSchedules(v []*PriceSchedule) *ReservedInstancesListing { - s.PriceSchedules = v +// SetCreditSpecification sets the CreditSpecification field's value. +func (s *ResponseLaunchTemplateData) SetCreditSpecification(v *CreditSpecification) *ResponseLaunchTemplateData { + s.CreditSpecification = v return s } -// SetReservedInstancesId sets the ReservedInstancesId field's value. -func (s *ReservedInstancesListing) SetReservedInstancesId(v string) *ReservedInstancesListing { - s.ReservedInstancesId = &v +// SetDisableApiTermination sets the DisableApiTermination field's value. +func (s *ResponseLaunchTemplateData) SetDisableApiTermination(v bool) *ResponseLaunchTemplateData { + s.DisableApiTermination = &v return s } -// SetReservedInstancesListingId sets the ReservedInstancesListingId field's value. -func (s *ReservedInstancesListing) SetReservedInstancesListingId(v string) *ReservedInstancesListing { - s.ReservedInstancesListingId = &v +// SetEbsOptimized sets the EbsOptimized field's value. +func (s *ResponseLaunchTemplateData) SetEbsOptimized(v bool) *ResponseLaunchTemplateData { + s.EbsOptimized = &v return s } -// SetStatus sets the Status field's value. -func (s *ReservedInstancesListing) SetStatus(v string) *ReservedInstancesListing { - s.Status = &v +// SetElasticGpuSpecifications sets the ElasticGpuSpecifications field's value. +func (s *ResponseLaunchTemplateData) SetElasticGpuSpecifications(v []*ElasticGpuSpecificationResponse) *ResponseLaunchTemplateData { + s.ElasticGpuSpecifications = v return s } -// SetStatusMessage sets the StatusMessage field's value. -func (s *ReservedInstancesListing) SetStatusMessage(v string) *ReservedInstancesListing { - s.StatusMessage = &v +// SetElasticInferenceAccelerators sets the ElasticInferenceAccelerators field's value. +func (s *ResponseLaunchTemplateData) SetElasticInferenceAccelerators(v []*LaunchTemplateElasticInferenceAcceleratorResponse) *ResponseLaunchTemplateData { + s.ElasticInferenceAccelerators = v return s } -// SetTags sets the Tags field's value. -func (s *ReservedInstancesListing) SetTags(v []*Tag) *ReservedInstancesListing { - s.Tags = v +// SetHibernationOptions sets the HibernationOptions field's value. +func (s *ResponseLaunchTemplateData) SetHibernationOptions(v *LaunchTemplateHibernationOptions) *ResponseLaunchTemplateData { + s.HibernationOptions = v return s } -// SetUpdateDate sets the UpdateDate field's value. -func (s *ReservedInstancesListing) SetUpdateDate(v time.Time) *ReservedInstancesListing { - s.UpdateDate = &v +// SetIamInstanceProfile sets the IamInstanceProfile field's value. +func (s *ResponseLaunchTemplateData) SetIamInstanceProfile(v *LaunchTemplateIamInstanceProfileSpecification) *ResponseLaunchTemplateData { + s.IamInstanceProfile = v return s } -// Describes a Reserved Instance modification. -type ReservedInstancesModification struct { - _ struct{} `type:"structure"` - - // A unique, case-sensitive key supplied by the client to ensure that the request - // is idempotent. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - ClientToken *string `locationName:"clientToken" type:"string"` - - // The time when the modification request was created. - CreateDate *time.Time `locationName:"createDate" type:"timestamp"` - - // The time for the modification to become effective. - EffectiveDate *time.Time `locationName:"effectiveDate" type:"timestamp"` - - // Contains target configurations along with their corresponding new Reserved - // Instance IDs. - ModificationResults []*ReservedInstancesModificationResult `locationName:"modificationResultSet" locationNameList:"item" type:"list"` - - // The IDs of one or more Reserved Instances. - ReservedInstancesIds []*ReservedInstancesId `locationName:"reservedInstancesSet" locationNameList:"item" type:"list"` - - // A unique ID for the Reserved Instance modification. - ReservedInstancesModificationId *string `locationName:"reservedInstancesModificationId" type:"string"` - - // The status of the Reserved Instances modification request. - Status *string `locationName:"status" type:"string"` - - // The reason for the status. - StatusMessage *string `locationName:"statusMessage" type:"string"` - - // The time when the modification request was last updated. - UpdateDate *time.Time `locationName:"updateDate" type:"timestamp"` -} - -// String returns the string representation -func (s ReservedInstancesModification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ReservedInstancesModification) GoString() string { - return s.String() +// SetImageId sets the ImageId field's value. +func (s *ResponseLaunchTemplateData) SetImageId(v string) *ResponseLaunchTemplateData { + s.ImageId = &v + return s } -// SetClientToken sets the ClientToken field's value. -func (s *ReservedInstancesModification) SetClientToken(v string) *ReservedInstancesModification { - s.ClientToken = &v +// SetInstanceInitiatedShutdownBehavior sets the InstanceInitiatedShutdownBehavior field's value. +func (s *ResponseLaunchTemplateData) SetInstanceInitiatedShutdownBehavior(v string) *ResponseLaunchTemplateData { + s.InstanceInitiatedShutdownBehavior = &v return s } -// SetCreateDate sets the CreateDate field's value. -func (s *ReservedInstancesModification) SetCreateDate(v time.Time) *ReservedInstancesModification { - s.CreateDate = &v +// SetInstanceMarketOptions sets the InstanceMarketOptions field's value. +func (s *ResponseLaunchTemplateData) SetInstanceMarketOptions(v *LaunchTemplateInstanceMarketOptions) *ResponseLaunchTemplateData { + s.InstanceMarketOptions = v return s } -// SetEffectiveDate sets the EffectiveDate field's value. -func (s *ReservedInstancesModification) SetEffectiveDate(v time.Time) *ReservedInstancesModification { - s.EffectiveDate = &v +// SetInstanceType sets the InstanceType field's value. +func (s *ResponseLaunchTemplateData) SetInstanceType(v string) *ResponseLaunchTemplateData { + s.InstanceType = &v return s } -// SetModificationResults sets the ModificationResults field's value. -func (s *ReservedInstancesModification) SetModificationResults(v []*ReservedInstancesModificationResult) *ReservedInstancesModification { - s.ModificationResults = v +// SetKernelId sets the KernelId field's value. +func (s *ResponseLaunchTemplateData) SetKernelId(v string) *ResponseLaunchTemplateData { + s.KernelId = &v return s } -// SetReservedInstancesIds sets the ReservedInstancesIds field's value. -func (s *ReservedInstancesModification) SetReservedInstancesIds(v []*ReservedInstancesId) *ReservedInstancesModification { - s.ReservedInstancesIds = v +// SetKeyName sets the KeyName field's value. +func (s *ResponseLaunchTemplateData) SetKeyName(v string) *ResponseLaunchTemplateData { + s.KeyName = &v return s } -// SetReservedInstancesModificationId sets the ReservedInstancesModificationId field's value. -func (s *ReservedInstancesModification) SetReservedInstancesModificationId(v string) *ReservedInstancesModification { - s.ReservedInstancesModificationId = &v +// SetLicenseSpecifications sets the LicenseSpecifications field's value. +func (s *ResponseLaunchTemplateData) SetLicenseSpecifications(v []*LaunchTemplateLicenseConfiguration) *ResponseLaunchTemplateData { + s.LicenseSpecifications = v return s } -// SetStatus sets the Status field's value. -func (s *ReservedInstancesModification) SetStatus(v string) *ReservedInstancesModification { - s.Status = &v +// SetMonitoring sets the Monitoring field's value. +func (s *ResponseLaunchTemplateData) SetMonitoring(v *LaunchTemplatesMonitoring) *ResponseLaunchTemplateData { + s.Monitoring = v return s } -// SetStatusMessage sets the StatusMessage field's value. -func (s *ReservedInstancesModification) SetStatusMessage(v string) *ReservedInstancesModification { - s.StatusMessage = &v +// SetNetworkInterfaces sets the NetworkInterfaces field's value. +func (s *ResponseLaunchTemplateData) SetNetworkInterfaces(v []*LaunchTemplateInstanceNetworkInterfaceSpecification) *ResponseLaunchTemplateData { + s.NetworkInterfaces = v return s } -// SetUpdateDate sets the UpdateDate field's value. -func (s *ReservedInstancesModification) SetUpdateDate(v time.Time) *ReservedInstancesModification { - s.UpdateDate = &v +// SetPlacement sets the Placement field's value. +func (s *ResponseLaunchTemplateData) SetPlacement(v *LaunchTemplatePlacement) *ResponseLaunchTemplateData { + s.Placement = v return s } -// Describes the modification request/s. -type ReservedInstancesModificationResult struct { - _ struct{} `type:"structure"` - - // The ID for the Reserved Instances that were created as part of the modification - // request. This field is only available when the modification is fulfilled. - ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"` - - // The target Reserved Instances configurations supplied as part of the modification - // request. - TargetConfiguration *ReservedInstancesConfiguration `locationName:"targetConfiguration" type:"structure"` +// SetRamDiskId sets the RamDiskId field's value. +func (s *ResponseLaunchTemplateData) SetRamDiskId(v string) *ResponseLaunchTemplateData { + s.RamDiskId = &v + return s } -// String returns the string representation -func (s ReservedInstancesModificationResult) String() string { - return awsutil.Prettify(s) +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *ResponseLaunchTemplateData) SetSecurityGroupIds(v []*string) *ResponseLaunchTemplateData { + s.SecurityGroupIds = v + return s } -// GoString returns the string representation -func (s ReservedInstancesModificationResult) GoString() string { - return s.String() +// SetSecurityGroups sets the SecurityGroups field's value. +func (s *ResponseLaunchTemplateData) SetSecurityGroups(v []*string) *ResponseLaunchTemplateData { + s.SecurityGroups = v + return s } -// SetReservedInstancesId sets the ReservedInstancesId field's value. -func (s *ReservedInstancesModificationResult) SetReservedInstancesId(v string) *ReservedInstancesModificationResult { - s.ReservedInstancesId = &v +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *ResponseLaunchTemplateData) SetTagSpecifications(v []*LaunchTemplateTagSpecification) *ResponseLaunchTemplateData { + s.TagSpecifications = v return s } -// SetTargetConfiguration sets the TargetConfiguration field's value. -func (s *ReservedInstancesModificationResult) SetTargetConfiguration(v *ReservedInstancesConfiguration) *ReservedInstancesModificationResult { - s.TargetConfiguration = v +// SetUserData sets the UserData field's value. +func (s *ResponseLaunchTemplateData) SetUserData(v string) *ResponseLaunchTemplateData { + s.UserData = &v return s } -// Describes a Reserved Instance offering. -type ReservedInstancesOffering struct { +type RestoreAddressToClassicInput struct { _ struct{} `type:"structure"` - // The Availability Zone in which the Reserved Instance can be used. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The currency of the Reserved Instance offering you are purchasing. It's specified - // using ISO 4217 standard currency codes. At this time, the only supported - // currency is USD. - CurrencyCode *string `locationName:"currencyCode" type:"string" enum:"CurrencyCodeValues"` - - // The duration of the Reserved Instance, in seconds. - Duration *int64 `locationName:"duration" type:"long"` - - // The purchase price of the Reserved Instance. - FixedPrice *float64 `locationName:"fixedPrice" type:"float"` - - // The tenancy of the instance. - InstanceTenancy *string `locationName:"instanceTenancy" type:"string" enum:"Tenancy"` - - // The instance type on which the Reserved Instance can be used. - 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 *bool `locationName:"marketplace" type:"boolean"` - - // If convertible it can be exchanged for Reserved Instances of the same or - // higher monetary value, with different configurations. If standard, it is - // not possible to perform an exchange. - OfferingClass *string `locationName:"offeringClass" type:"string" enum:"OfferingClassType"` - - // The Reserved Instance offering type. - OfferingType *string `locationName:"offeringType" type:"string" enum:"OfferingTypeValues"` - - // The pricing details of the Reserved Instance offering. - PricingDetails []*PricingDetail `locationName:"pricingDetailsSet" locationNameList:"item" type:"list"` - - // The Reserved Instance product platform description. - ProductDescription *string `locationName:"productDescription" type:"string" enum:"RIProductDescription"` - - // The recurring charge tag assigned to the resource. - RecurringCharges []*RecurringCharge `locationName:"recurringCharges" locationNameList:"item" type:"list"` - - // The ID of the Reserved Instance offering. This is the offering ID used in - // GetReservedInstancesExchangeQuote to confirm that an exchange can be made. - ReservedInstancesOfferingId *string `locationName:"reservedInstancesOfferingId" type:"string"` - - // Whether the Reserved Instance is applied to instances in a region or an Availability - // Zone. - Scope *string `locationName:"scope" type:"string" enum:"scope"` + // 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 `locationName:"dryRun" type:"boolean"` - // The usage price of the Reserved Instance, per hour. - UsagePrice *float64 `locationName:"usagePrice" type:"float"` + // The Elastic IP address. + // + // PublicIp is a required field + PublicIp *string `locationName:"publicIp" type:"string" required:"true"` } // String returns the string representation -func (s ReservedInstancesOffering) String() string { +func (s RestoreAddressToClassicInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ReservedInstancesOffering) GoString() string { +func (s RestoreAddressToClassicInput) GoString() string { return s.String() } -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *ReservedInstancesOffering) SetAvailabilityZone(v string) *ReservedInstancesOffering { - s.AvailabilityZone = &v - return s -} - -// SetCurrencyCode sets the CurrencyCode field's value. -func (s *ReservedInstancesOffering) SetCurrencyCode(v string) *ReservedInstancesOffering { - s.CurrencyCode = &v - return s -} - -// SetDuration sets the Duration field's value. -func (s *ReservedInstancesOffering) SetDuration(v int64) *ReservedInstancesOffering { - s.Duration = &v - return s -} - -// SetFixedPrice sets the FixedPrice field's value. -func (s *ReservedInstancesOffering) SetFixedPrice(v float64) *ReservedInstancesOffering { - s.FixedPrice = &v - return s -} - -// SetInstanceTenancy sets the InstanceTenancy field's value. -func (s *ReservedInstancesOffering) SetInstanceTenancy(v string) *ReservedInstancesOffering { - s.InstanceTenancy = &v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *RestoreAddressToClassicInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RestoreAddressToClassicInput"} + if s.PublicIp == nil { + invalidParams.Add(request.NewErrParamRequired("PublicIp")) + } -// SetInstanceType sets the InstanceType field's value. -func (s *ReservedInstancesOffering) SetInstanceType(v string) *ReservedInstancesOffering { - s.InstanceType = &v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetMarketplace sets the Marketplace field's value. -func (s *ReservedInstancesOffering) SetMarketplace(v bool) *ReservedInstancesOffering { - s.Marketplace = &v +// SetDryRun sets the DryRun field's value. +func (s *RestoreAddressToClassicInput) SetDryRun(v bool) *RestoreAddressToClassicInput { + s.DryRun = &v return s } -// SetOfferingClass sets the OfferingClass field's value. -func (s *ReservedInstancesOffering) SetOfferingClass(v string) *ReservedInstancesOffering { - s.OfferingClass = &v +// SetPublicIp sets the PublicIp field's value. +func (s *RestoreAddressToClassicInput) SetPublicIp(v string) *RestoreAddressToClassicInput { + s.PublicIp = &v return s } -// SetOfferingType sets the OfferingType field's value. -func (s *ReservedInstancesOffering) SetOfferingType(v string) *ReservedInstancesOffering { - s.OfferingType = &v - return s -} +type RestoreAddressToClassicOutput struct { + _ struct{} `type:"structure"` -// SetPricingDetails sets the PricingDetails field's value. -func (s *ReservedInstancesOffering) SetPricingDetails(v []*PricingDetail) *ReservedInstancesOffering { - s.PricingDetails = v - return s -} + // The Elastic IP address. + PublicIp *string `locationName:"publicIp" type:"string"` -// SetProductDescription sets the ProductDescription field's value. -func (s *ReservedInstancesOffering) SetProductDescription(v string) *ReservedInstancesOffering { - s.ProductDescription = &v - return s + // The move status for the IP address. + Status *string `locationName:"status" type:"string" enum:"Status"` } -// SetRecurringCharges sets the RecurringCharges field's value. -func (s *ReservedInstancesOffering) SetRecurringCharges(v []*RecurringCharge) *ReservedInstancesOffering { - s.RecurringCharges = v - return s +// String returns the string representation +func (s RestoreAddressToClassicOutput) String() string { + return awsutil.Prettify(s) } -// SetReservedInstancesOfferingId sets the ReservedInstancesOfferingId field's value. -func (s *ReservedInstancesOffering) SetReservedInstancesOfferingId(v string) *ReservedInstancesOffering { - s.ReservedInstancesOfferingId = &v - return s +// GoString returns the string representation +func (s RestoreAddressToClassicOutput) GoString() string { + return s.String() } -// SetScope sets the Scope field's value. -func (s *ReservedInstancesOffering) SetScope(v string) *ReservedInstancesOffering { - s.Scope = &v +// SetPublicIp sets the PublicIp field's value. +func (s *RestoreAddressToClassicOutput) SetPublicIp(v string) *RestoreAddressToClassicOutput { + s.PublicIp = &v return s } -// SetUsagePrice sets the UsagePrice field's value. -func (s *ReservedInstancesOffering) SetUsagePrice(v float64) *ReservedInstancesOffering { - s.UsagePrice = &v +// SetStatus sets the Status field's value. +func (s *RestoreAddressToClassicOutput) SetStatus(v string) *RestoreAddressToClassicOutput { + s.Status = &v return s } -type ResetFpgaImageAttributeInput struct { +type RevokeClientVpnIngressInput struct { _ struct{} `type:"structure"` - // The attribute. - Attribute *string `type:"string" enum:"ResetFpgaImageAttributeName"` + // The ID of the Active Directory group for which to revoke access. + AccessGroupId *string `type:"string"` + + // The ID of the Client VPN endpoint with which the authorization rule is associated. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *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 @@ -61391,27 +74584,34 @@ type ResetFpgaImageAttributeInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // The ID of the AFI. + // Indicates whether access should be revoked for all clients. + RevokeAllGroups *bool `type:"boolean"` + + // The IPv4 address range, in CIDR notation, of the network for which access + // is being removed. // - // FpgaImageId is a required field - FpgaImageId *string `type:"string" required:"true"` + // TargetNetworkCidr is a required field + TargetNetworkCidr *string `type:"string" required:"true"` } // String returns the string representation -func (s ResetFpgaImageAttributeInput) String() string { +func (s RevokeClientVpnIngressInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ResetFpgaImageAttributeInput) GoString() string { +func (s RevokeClientVpnIngressInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ResetFpgaImageAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResetFpgaImageAttributeInput"} - if s.FpgaImageId == nil { - invalidParams.Add(request.NewErrParamRequired("FpgaImageId")) +func (s *RevokeClientVpnIngressInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RevokeClientVpnIngressInput"} + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) + } + if s.TargetNetworkCidr == nil { + invalidParams.Add(request.NewErrParamRequired("TargetNetworkCidr")) } if invalidParams.Len() > 0 { @@ -61420,56 +74620,64 @@ func (s *ResetFpgaImageAttributeInput) Validate() error { return nil } -// SetAttribute sets the Attribute field's value. -func (s *ResetFpgaImageAttributeInput) SetAttribute(v string) *ResetFpgaImageAttributeInput { - s.Attribute = &v +// SetAccessGroupId sets the AccessGroupId field's value. +func (s *RevokeClientVpnIngressInput) SetAccessGroupId(v string) *RevokeClientVpnIngressInput { + s.AccessGroupId = &v + return s +} + +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *RevokeClientVpnIngressInput) SetClientVpnEndpointId(v string) *RevokeClientVpnIngressInput { + s.ClientVpnEndpointId = &v return s } // SetDryRun sets the DryRun field's value. -func (s *ResetFpgaImageAttributeInput) SetDryRun(v bool) *ResetFpgaImageAttributeInput { +func (s *RevokeClientVpnIngressInput) SetDryRun(v bool) *RevokeClientVpnIngressInput { s.DryRun = &v return s } -// SetFpgaImageId sets the FpgaImageId field's value. -func (s *ResetFpgaImageAttributeInput) SetFpgaImageId(v string) *ResetFpgaImageAttributeInput { - s.FpgaImageId = &v +// SetRevokeAllGroups sets the RevokeAllGroups field's value. +func (s *RevokeClientVpnIngressInput) SetRevokeAllGroups(v bool) *RevokeClientVpnIngressInput { + s.RevokeAllGroups = &v return s } -type ResetFpgaImageAttributeOutput struct { +// SetTargetNetworkCidr sets the TargetNetworkCidr field's value. +func (s *RevokeClientVpnIngressInput) SetTargetNetworkCidr(v string) *RevokeClientVpnIngressInput { + s.TargetNetworkCidr = &v + return s +} + +type RevokeClientVpnIngressOutput struct { _ struct{} `type:"structure"` - // Is true if the request succeeds, and an error otherwise. - Return *bool `locationName:"return" type:"boolean"` + // The current state of the authorization rule. + Status *ClientVpnAuthorizationRuleStatus `locationName:"status" type:"structure"` } // String returns the string representation -func (s ResetFpgaImageAttributeOutput) String() string { +func (s RevokeClientVpnIngressOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ResetFpgaImageAttributeOutput) GoString() string { +func (s RevokeClientVpnIngressOutput) GoString() string { return s.String() } -// SetReturn sets the Return field's value. -func (s *ResetFpgaImageAttributeOutput) SetReturn(v bool) *ResetFpgaImageAttributeOutput { - s.Return = &v +// SetStatus sets the Status field's value. +func (s *RevokeClientVpnIngressOutput) SetStatus(v *ClientVpnAuthorizationRuleStatus) *RevokeClientVpnIngressOutput { + s.Status = v return s } -// Contains the parameters for ResetImageAttribute. -type ResetImageAttributeInput struct { +type RevokeSecurityGroupEgressInput struct { _ struct{} `type:"structure"` - // The attribute to reset (currently you can only reset the launch permission - // attribute). - // - // Attribute is a required field - Attribute *string `type:"string" required:"true" enum:"ResetImageAttributeName"` + // Not supported. Use a set of IP permissions to specify the CIDR. + CidrIp *string `locationName:"cidrIp" 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 @@ -61477,30 +74685,49 @@ type ResetImageAttributeInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // The ID of the AMI. + // Not supported. Use a set of IP permissions to specify the port. + FromPort *int64 `locationName:"fromPort" type:"integer"` + + // The ID of the security group. // - // ImageId is a required field - ImageId *string `type:"string" required:"true"` + // GroupId is a required field + GroupId *string `locationName:"groupId" type:"string" required:"true"` + + // One or more sets of IP permissions. You can't specify a destination security + // group and a CIDR IP address range in the same set of permissions. + IpPermissions []*IpPermission `locationName:"ipPermissions" locationNameList:"item" type:"list"` + + // Not supported. Use a set of IP permissions to specify the protocol name or + // number. + IpProtocol *string `locationName:"ipProtocol" type:"string"` + + // Not supported. Use a set of IP permissions to specify a destination security + // group. + SourceSecurityGroupName *string `locationName:"sourceSecurityGroupName" type:"string"` + + // Not supported. Use a set of IP permissions to specify a destination security + // group. + SourceSecurityGroupOwnerId *string `locationName:"sourceSecurityGroupOwnerId" type:"string"` + + // Not supported. Use a set of IP permissions to specify the port. + ToPort *int64 `locationName:"toPort" type:"integer"` } // String returns the string representation -func (s ResetImageAttributeInput) String() string { +func (s RevokeSecurityGroupEgressInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ResetImageAttributeInput) GoString() string { +func (s RevokeSecurityGroupEgressInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ResetImageAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResetImageAttributeInput"} - if s.Attribute == nil { - invalidParams.Add(request.NewErrParamRequired("Attribute")) - } - if s.ImageId == nil { - invalidParams.Add(request.NewErrParamRequired("ImageId")) +func (s *RevokeSecurityGroupEgressInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RevokeSecurityGroupEgressInput"} + if s.GroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupId")) } if invalidParams.Len() > 0 { @@ -61509,49 +74736,80 @@ func (s *ResetImageAttributeInput) Validate() error { return nil } -// SetAttribute sets the Attribute field's value. -func (s *ResetImageAttributeInput) SetAttribute(v string) *ResetImageAttributeInput { - s.Attribute = &v +// SetCidrIp sets the CidrIp field's value. +func (s *RevokeSecurityGroupEgressInput) SetCidrIp(v string) *RevokeSecurityGroupEgressInput { + s.CidrIp = &v return s } // SetDryRun sets the DryRun field's value. -func (s *ResetImageAttributeInput) SetDryRun(v bool) *ResetImageAttributeInput { +func (s *RevokeSecurityGroupEgressInput) SetDryRun(v bool) *RevokeSecurityGroupEgressInput { s.DryRun = &v return s } -// SetImageId sets the ImageId field's value. -func (s *ResetImageAttributeInput) SetImageId(v string) *ResetImageAttributeInput { - s.ImageId = &v +// SetFromPort sets the FromPort field's value. +func (s *RevokeSecurityGroupEgressInput) SetFromPort(v int64) *RevokeSecurityGroupEgressInput { + s.FromPort = &v + return s +} + +// SetGroupId sets the GroupId field's value. +func (s *RevokeSecurityGroupEgressInput) SetGroupId(v string) *RevokeSecurityGroupEgressInput { + s.GroupId = &v + return s +} + +// SetIpPermissions sets the IpPermissions field's value. +func (s *RevokeSecurityGroupEgressInput) SetIpPermissions(v []*IpPermission) *RevokeSecurityGroupEgressInput { + s.IpPermissions = v + return s +} + +// SetIpProtocol sets the IpProtocol field's value. +func (s *RevokeSecurityGroupEgressInput) SetIpProtocol(v string) *RevokeSecurityGroupEgressInput { + s.IpProtocol = &v + return s +} + +// SetSourceSecurityGroupName sets the SourceSecurityGroupName field's value. +func (s *RevokeSecurityGroupEgressInput) SetSourceSecurityGroupName(v string) *RevokeSecurityGroupEgressInput { + s.SourceSecurityGroupName = &v + return s +} + +// SetSourceSecurityGroupOwnerId sets the SourceSecurityGroupOwnerId field's value. +func (s *RevokeSecurityGroupEgressInput) SetSourceSecurityGroupOwnerId(v string) *RevokeSecurityGroupEgressInput { + s.SourceSecurityGroupOwnerId = &v + return s +} + +// SetToPort sets the ToPort field's value. +func (s *RevokeSecurityGroupEgressInput) SetToPort(v int64) *RevokeSecurityGroupEgressInput { + s.ToPort = &v return s } -type ResetImageAttributeOutput struct { +type RevokeSecurityGroupEgressOutput struct { _ struct{} `type:"structure"` } // String returns the string representation -func (s ResetImageAttributeOutput) String() string { +func (s RevokeSecurityGroupEgressOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ResetImageAttributeOutput) GoString() string { +func (s RevokeSecurityGroupEgressOutput) GoString() string { return s.String() } -// Contains the parameters for ResetInstanceAttribute. -type ResetInstanceAttributeInput struct { +type RevokeSecurityGroupIngressInput struct { _ struct{} `type:"structure"` - // The attribute to reset. - // - // You can only reset the following attributes: kernel | ramdisk | sourceDestCheck. - // To change an instance attribute, use ModifyInstanceAttribute. - // - // Attribute is a required field - Attribute *string `locationName:"attribute" type:"string" required:"true" enum:"InstanceAttributeName"` + // The CIDR IP address range. You can't specify this parameter when specifying + // a source security group. + CidrIp *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 @@ -61559,497 +74817,971 @@ type ResetInstanceAttributeInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // The ID of the instance. - // - // InstanceId is a required field - InstanceId *string `locationName:"instanceId" type:"string" required:"true"` + // The start of port range for the TCP and UDP protocols, or an ICMP type number. + // For the ICMP type number, use -1 to specify all ICMP types. + FromPort *int64 `type:"integer"` + + // The ID of the security group. You must specify either the security group + // ID or the security group name in the request. For security groups in a nondefault + // VPC, you must specify the security group ID. + GroupId *string `type:"string"` + + // [EC2-Classic, default VPC] The name of the security group. You must specify + // either the security group ID or the security group name in the request. + GroupName *string `type:"string"` + + // One or more sets of IP permissions. You can't specify a source security group + // and a CIDR IP address range in the same set of permissions. + IpPermissions []*IpPermission `locationNameList:"item" type:"list"` + + // The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)). + // Use -1 to specify all. + IpProtocol *string `type:"string"` + + // [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 + // the end of the port range. For EC2-VPC, the source security group must be + // in the same VPC. To revoke a specific rule for an IP protocol and port range, + // 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. + SourceSecurityGroupOwnerId *string `type:"string"` + + // 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 ICMP codes for the ICMP type. + ToPort *int64 `type:"integer"` } // String returns the string representation -func (s ResetInstanceAttributeInput) String() string { +func (s RevokeSecurityGroupIngressInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ResetInstanceAttributeInput) GoString() string { +func (s RevokeSecurityGroupIngressInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResetInstanceAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResetInstanceAttributeInput"} - if s.Attribute == nil { - invalidParams.Add(request.NewErrParamRequired("Attribute")) - } - if s.InstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceId")) - } +// SetCidrIp sets the CidrIp field's value. +func (s *RevokeSecurityGroupIngressInput) SetCidrIp(v string) *RevokeSecurityGroupIngressInput { + s.CidrIp = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetDryRun sets the DryRun field's value. +func (s *RevokeSecurityGroupIngressInput) SetDryRun(v bool) *RevokeSecurityGroupIngressInput { + s.DryRun = &v + return s } -// SetAttribute sets the Attribute field's value. -func (s *ResetInstanceAttributeInput) SetAttribute(v string) *ResetInstanceAttributeInput { - s.Attribute = &v +// SetFromPort sets the FromPort field's value. +func (s *RevokeSecurityGroupIngressInput) SetFromPort(v int64) *RevokeSecurityGroupIngressInput { + s.FromPort = &v return s } -// SetDryRun sets the DryRun field's value. -func (s *ResetInstanceAttributeInput) SetDryRun(v bool) *ResetInstanceAttributeInput { - s.DryRun = &v +// SetGroupId sets the GroupId field's value. +func (s *RevokeSecurityGroupIngressInput) SetGroupId(v string) *RevokeSecurityGroupIngressInput { + s.GroupId = &v return s } -// SetInstanceId sets the InstanceId field's value. -func (s *ResetInstanceAttributeInput) SetInstanceId(v string) *ResetInstanceAttributeInput { - s.InstanceId = &v +// SetGroupName sets the GroupName field's value. +func (s *RevokeSecurityGroupIngressInput) SetGroupName(v string) *RevokeSecurityGroupIngressInput { + s.GroupName = &v return s } -type ResetInstanceAttributeOutput struct { +// SetIpPermissions sets the IpPermissions field's value. +func (s *RevokeSecurityGroupIngressInput) SetIpPermissions(v []*IpPermission) *RevokeSecurityGroupIngressInput { + s.IpPermissions = v + return s +} + +// SetIpProtocol sets the IpProtocol field's value. +func (s *RevokeSecurityGroupIngressInput) SetIpProtocol(v string) *RevokeSecurityGroupIngressInput { + s.IpProtocol = &v + return s +} + +// SetSourceSecurityGroupName sets the SourceSecurityGroupName field's value. +func (s *RevokeSecurityGroupIngressInput) SetSourceSecurityGroupName(v string) *RevokeSecurityGroupIngressInput { + s.SourceSecurityGroupName = &v + return s +} + +// SetSourceSecurityGroupOwnerId sets the SourceSecurityGroupOwnerId field's value. +func (s *RevokeSecurityGroupIngressInput) SetSourceSecurityGroupOwnerId(v string) *RevokeSecurityGroupIngressInput { + s.SourceSecurityGroupOwnerId = &v + return s +} + +// SetToPort sets the ToPort field's value. +func (s *RevokeSecurityGroupIngressInput) SetToPort(v int64) *RevokeSecurityGroupIngressInput { + s.ToPort = &v + return s +} + +type RevokeSecurityGroupIngressOutput struct { _ struct{} `type:"structure"` } // String returns the string representation -func (s ResetInstanceAttributeOutput) String() string { +func (s RevokeSecurityGroupIngressOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ResetInstanceAttributeOutput) GoString() string { +func (s RevokeSecurityGroupIngressOutput) GoString() string { return s.String() } -// Contains the parameters for ResetNetworkInterfaceAttribute. -type ResetNetworkInterfaceAttributeInput struct { +// Describes a route in a route table. +type Route 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 `locationName:"dryRun" type:"boolean"` + // The IPv4 CIDR block used for the destination match. + DestinationCidrBlock *string `locationName:"destinationCidrBlock" type:"string"` + + // The IPv6 CIDR block used for the destination match. + DestinationIpv6CidrBlock *string `locationName:"destinationIpv6CidrBlock" type:"string"` + + // The prefix of the AWS service. + DestinationPrefixListId *string `locationName:"destinationPrefixListId" type:"string"` + + // The ID of the egress-only internet gateway. + EgressOnlyInternetGatewayId *string `locationName:"egressOnlyInternetGatewayId" type:"string"` + + // The ID of a gateway attached to your VPC. + GatewayId *string `locationName:"gatewayId" type:"string"` + + // The ID of a NAT instance in your VPC. + InstanceId *string `locationName:"instanceId" type:"string"` + + // The AWS account ID of the owner of the instance. + InstanceOwnerId *string `locationName:"instanceOwnerId" type:"string"` + + // The ID of a NAT gateway. + NatGatewayId *string `locationName:"natGatewayId" type:"string"` // The ID of the network interface. + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` + + // Describes how the route was created. // - // NetworkInterfaceId is a required field - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"` + // * 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" enum:"RouteOrigin"` - // The source/destination checking attribute. Resets the value to true. - SourceDestCheck *string `locationName:"sourceDestCheck" type:"string"` + // The state of the route. The blackhole state indicates that the route's target + // isn't available (for example, the specified gateway isn't attached to the + // VPC, or the specified NAT instance has been terminated). + State *string `locationName:"state" type:"string" enum:"RouteState"` + + // 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 ResetNetworkInterfaceAttributeInput) String() string { +func (s Route) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ResetNetworkInterfaceAttributeInput) GoString() string { +func (s Route) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResetNetworkInterfaceAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResetNetworkInterfaceAttributeInput"} - if s.NetworkInterfaceId == nil { - invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) - } +// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. +func (s *Route) SetDestinationCidrBlock(v string) *Route { + s.DestinationCidrBlock = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetDestinationIpv6CidrBlock sets the DestinationIpv6CidrBlock field's value. +func (s *Route) SetDestinationIpv6CidrBlock(v string) *Route { + s.DestinationIpv6CidrBlock = &v + return s } -// SetDryRun sets the DryRun field's value. -func (s *ResetNetworkInterfaceAttributeInput) SetDryRun(v bool) *ResetNetworkInterfaceAttributeInput { - s.DryRun = &v +// SetDestinationPrefixListId sets the DestinationPrefixListId field's value. +func (s *Route) SetDestinationPrefixListId(v string) *Route { + s.DestinationPrefixListId = &v + return s +} + +// SetEgressOnlyInternetGatewayId sets the EgressOnlyInternetGatewayId field's value. +func (s *Route) SetEgressOnlyInternetGatewayId(v string) *Route { + s.EgressOnlyInternetGatewayId = &v + return s +} + +// SetGatewayId sets the GatewayId field's value. +func (s *Route) SetGatewayId(v string) *Route { + s.GatewayId = &v + return s +} + +// SetInstanceId sets the InstanceId field's value. +func (s *Route) SetInstanceId(v string) *Route { + s.InstanceId = &v + return s +} + +// SetInstanceOwnerId sets the InstanceOwnerId field's value. +func (s *Route) SetInstanceOwnerId(v string) *Route { + s.InstanceOwnerId = &v + return s +} + +// SetNatGatewayId sets the NatGatewayId field's value. +func (s *Route) SetNatGatewayId(v string) *Route { + s.NatGatewayId = &v return s } // SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *ResetNetworkInterfaceAttributeInput) SetNetworkInterfaceId(v string) *ResetNetworkInterfaceAttributeInput { +func (s *Route) SetNetworkInterfaceId(v string) *Route { s.NetworkInterfaceId = &v return s } -// SetSourceDestCheck sets the SourceDestCheck field's value. -func (s *ResetNetworkInterfaceAttributeInput) SetSourceDestCheck(v string) *ResetNetworkInterfaceAttributeInput { - s.SourceDestCheck = &v +// SetOrigin sets the Origin field's value. +func (s *Route) SetOrigin(v string) *Route { + s.Origin = &v return s } -type ResetNetworkInterfaceAttributeOutput struct { - _ struct{} `type:"structure"` +// SetState sets the State field's value. +func (s *Route) SetState(v string) *Route { + s.State = &v + return s } -// String returns the string representation -func (s ResetNetworkInterfaceAttributeOutput) String() string { - return awsutil.Prettify(s) +// SetTransitGatewayId sets the TransitGatewayId field's value. +func (s *Route) SetTransitGatewayId(v string) *Route { + s.TransitGatewayId = &v + return s } -// GoString returns the string representation -func (s ResetNetworkInterfaceAttributeOutput) GoString() string { - return s.String() +// SetVpcPeeringConnectionId sets the VpcPeeringConnectionId field's value. +func (s *Route) SetVpcPeeringConnectionId(v string) *Route { + s.VpcPeeringConnectionId = &v + return s } -// Contains the parameters for ResetSnapshotAttribute. -type ResetSnapshotAttributeInput struct { +// Describes a route table. +type RouteTable struct { _ struct{} `type:"structure"` - // The attribute to reset. Currently, only the attribute for permission to create - // volumes can be reset. - // - // Attribute is a required field - Attribute *string `type:"string" required:"true" enum:"SnapshotAttributeName"` + // The associations between the route table and one or more subnets. + Associations []*RouteTableAssociation `locationName:"associationSet" 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 `locationName:"dryRun" type:"boolean"` + // The ID of the AWS account that owns the route table. + OwnerId *string `locationName:"ownerId" type:"string"` - // The ID of the snapshot. - // - // SnapshotId is a required field - SnapshotId *string `type:"string" required:"true"` + // Any virtual private gateway (VGW) propagating routes. + PropagatingVgws []*PropagatingVgw `locationName:"propagatingVgwSet" locationNameList:"item" type:"list"` + + // The ID of the route table. + RouteTableId *string `locationName:"routeTableId" type:"string"` + + // The routes in the route table. + Routes []*Route `locationName:"routeSet" locationNameList:"item" type:"list"` + + // Any tags assigned to the route table. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + + // The ID of the VPC. + VpcId *string `locationName:"vpcId" type:"string"` } // String returns the string representation -func (s ResetSnapshotAttributeInput) String() string { +func (s RouteTable) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ResetSnapshotAttributeInput) GoString() string { +func (s RouteTable) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *ResetSnapshotAttributeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ResetSnapshotAttributeInput"} - if s.Attribute == nil { - invalidParams.Add(request.NewErrParamRequired("Attribute")) - } - if s.SnapshotId == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetAssociations sets the Associations field's value. +func (s *RouteTable) SetAssociations(v []*RouteTableAssociation) *RouteTable { + s.Associations = v + return s } -// SetAttribute sets the Attribute field's value. -func (s *ResetSnapshotAttributeInput) SetAttribute(v string) *ResetSnapshotAttributeInput { - s.Attribute = &v +// SetOwnerId sets the OwnerId field's value. +func (s *RouteTable) SetOwnerId(v string) *RouteTable { + s.OwnerId = &v return s } -// SetDryRun sets the DryRun field's value. -func (s *ResetSnapshotAttributeInput) SetDryRun(v bool) *ResetSnapshotAttributeInput { - s.DryRun = &v +// SetPropagatingVgws sets the PropagatingVgws field's value. +func (s *RouteTable) SetPropagatingVgws(v []*PropagatingVgw) *RouteTable { + s.PropagatingVgws = v return s } -// SetSnapshotId sets the SnapshotId field's value. -func (s *ResetSnapshotAttributeInput) SetSnapshotId(v string) *ResetSnapshotAttributeInput { - s.SnapshotId = &v +// SetRouteTableId sets the RouteTableId field's value. +func (s *RouteTable) SetRouteTableId(v string) *RouteTable { + s.RouteTableId = &v return s } -type ResetSnapshotAttributeOutput struct { - _ struct{} `type:"structure"` +// SetRoutes sets the Routes field's value. +func (s *RouteTable) SetRoutes(v []*Route) *RouteTable { + s.Routes = v + return s } -// String returns the string representation -func (s ResetSnapshotAttributeOutput) String() string { - return awsutil.Prettify(s) +// SetTags sets the Tags field's value. +func (s *RouteTable) SetTags(v []*Tag) *RouteTable { + s.Tags = v + return s } -// GoString returns the string representation -func (s ResetSnapshotAttributeOutput) GoString() string { - return s.String() +// SetVpcId sets the VpcId field's value. +func (s *RouteTable) SetVpcId(v string) *RouteTable { + s.VpcId = &v + return s } -// Describes the error that's returned when you cannot delete a launch template -// version. -type ResponseError struct { +// Describes an association between a route table and a subnet. +type RouteTableAssociation struct { _ struct{} `type:"structure"` - // The error code. - Code *string `locationName:"code" type:"string" enum:"LaunchTemplateErrorCode"` + // Indicates whether this is the main route table. + Main *bool `locationName:"main" type:"boolean"` - // The error message, if applicable. - Message *string `locationName:"message" type:"string"` + // The ID of the association between a route table and a subnet. + RouteTableAssociationId *string `locationName:"routeTableAssociationId" type:"string"` + + // The ID of the route table. + RouteTableId *string `locationName:"routeTableId" type:"string"` + + // The ID of the subnet. A subnet ID is not returned for an implicit association. + SubnetId *string `locationName:"subnetId" type:"string"` } // String returns the string representation -func (s ResponseError) String() string { +func (s RouteTableAssociation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ResponseError) GoString() string { +func (s RouteTableAssociation) GoString() string { return s.String() } -// SetCode sets the Code field's value. -func (s *ResponseError) SetCode(v string) *ResponseError { - s.Code = &v +// SetMain sets the Main field's value. +func (s *RouteTableAssociation) SetMain(v bool) *RouteTableAssociation { + s.Main = &v return s } -// SetMessage sets the Message field's value. -func (s *ResponseError) SetMessage(v string) *ResponseError { - s.Message = &v +// SetRouteTableAssociationId sets the RouteTableAssociationId field's value. +func (s *RouteTableAssociation) SetRouteTableAssociationId(v string) *RouteTableAssociation { + s.RouteTableAssociationId = &v return s } -// The information for a launch template. -type ResponseLaunchTemplateData struct { +// SetRouteTableId sets the RouteTableId field's value. +func (s *RouteTableAssociation) SetRouteTableId(v string) *RouteTableAssociation { + s.RouteTableId = &v + return s +} + +// SetSubnetId sets the SubnetId field's value. +func (s *RouteTableAssociation) SetSubnetId(v string) *RouteTableAssociation { + s.SubnetId = &v + return s +} + +type RunInstancesInput struct { _ struct{} `type:"structure"` - // The block device mappings. - BlockDeviceMappings []*LaunchTemplateBlockDeviceMapping `locationName:"blockDeviceMappingSet" locationNameList:"item" type:"list"` + // Reserved. + AdditionalInfo *string `locationName:"additionalInfo" type:"string"` + + // One or more block device mapping entries. You can't specify both a snapshot + // ID and an encryption value. This is because only blank volumes can be encrypted + // on creation. If a snapshot is the basis for a volume, it is not blank and + // its encryption status is used for the volume encryption status. + BlockDeviceMappings []*BlockDeviceMapping `locationName:"BlockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"` + + // Information about the Capacity Reservation targeting option. + CapacityReservationSpecification *CapacityReservationSpecification `type:"structure"` + + // Unique, case-sensitive identifier you provide to ensure the idempotency of + // the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + // + // Constraints: Maximum 64 ASCII characters + ClientToken *string `locationName:"clientToken" type:"string"` // The CPU options for the instance. For more information, see Optimizing CPU // Options (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) // in the Amazon Elastic Compute Cloud User Guide. - CpuOptions *LaunchTemplateCpuOptions `locationName:"cpuOptions" type:"structure"` + CpuOptions *CpuOptionsRequest `type:"structure"` - // The credit option for CPU usage of the instance. - CreditSpecification *CreditSpecification `locationName:"creditSpecification" type:"structure"` + // The credit option for CPU usage of the instance. Valid values are standard + // and unlimited. To change this attribute after launch, use ModifyInstanceCreditSpecification. + // For more information, see Burstable Performance Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html) + // in the Amazon Elastic Compute Cloud User Guide. + // + // Default: standard (T2 instances) or unlimited (T3 instances) + CreditSpecification *CreditSpecificationRequest `type:"structure"` - // If set to true, indicates that the instance cannot be terminated using the - // Amazon EC2 console, command line tool, or API. + // If you set this parameter to true, you can't terminate the instance using + // the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute + // to false after launch, use ModifyInstanceAttribute. Alternatively, if you + // set InstanceInitiatedShutdownBehavior to terminate, you can terminate the + // instance by running the shutdown command from the instance. + // + // Default: false DisableApiTermination *bool `locationName:"disableApiTermination" type:"boolean"` - // Indicates whether the instance is optimized for Amazon EBS I/O. + // 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 `locationName:"dryRun" type:"boolean"` + + // Indicates whether the instance is optimized for Amazon EBS I/O. This optimization + // provides dedicated throughput to Amazon EBS and an optimized configuration + // stack to provide optimal Amazon EBS I/O performance. This optimization isn't + // available with all instance types. Additional usage charges apply when using + // an EBS-optimized instance. + // + // Default: false EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"` - // The elastic GPU specification. - ElasticGpuSpecifications []*ElasticGpuSpecificationResponse `locationName:"elasticGpuSpecificationSet" locationNameList:"item" type:"list"` + // An elastic GPU to associate with the instance. + ElasticGpuSpecification []*ElasticGpuSpecification `locationNameList:"item" type:"list"` + + // An elastic inference accelerator. + ElasticInferenceAccelerators []*ElasticInferenceAccelerator `locationName:"ElasticInferenceAccelerator" locationNameList:"item" type:"list"` + + // Indicates whether an instance is enabled for hibernation. For more information, + // see Hibernate Your Instance (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) + // in the Amazon Elastic Compute Cloud User Guide. + HibernationOptions *HibernationOptionsRequest `type:"structure"` + + // The IAM instance profile. + IamInstanceProfile *IamInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"` + + // The ID of the AMI, which you can get by calling DescribeImages. An AMI is + // required to launch an instance and must be specified here or in a launch + // template. + ImageId *string `type:"string"` + + // Indicates whether an instance stops or terminates when you initiate shutdown + // from the instance (using the operating system command for system shutdown). + // + // Default: stop + InstanceInitiatedShutdownBehavior *string `locationName:"instanceInitiatedShutdownBehavior" type:"string" enum:"ShutdownBehavior"` + + // The market (purchasing) option for the instances. + // + // For RunInstances, persistent Spot Instance requests are only supported when + // InstanceInterruptionBehavior is set to either hibernate or stop. + InstanceMarketOptions *InstanceMarketOptionsRequest `type:"structure"` + + // The instance type. For more information, see Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) + // in the Amazon Elastic Compute Cloud User Guide. + // + // Default: m1.small + InstanceType *string `type:"string" enum:"InstanceType"` + + // [EC2-VPC] A number of IPv6 addresses to associate with the primary network + // interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet. + // You cannot specify this option and the option to assign specific IPv6 addresses + // in the same request. You can specify this option if you've specified a minimum + // number of instances to launch. + Ipv6AddressCount *int64 `type:"integer"` - // The IAM instance profile. - IamInstanceProfile *LaunchTemplateIamInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"` + // [EC2-VPC] Specify one or more IPv6 addresses from the range of the subnet + // to associate with the primary network interface. You cannot specify this + // option and the option to assign a number of IPv6 addresses in the same request. + // You cannot specify this option if you've specified a minimum number of instances + // to launch. + Ipv6Addresses []*InstanceIpv6Address `locationName:"Ipv6Address" locationNameList:"item" type:"list"` - // The ID of the AMI that was used to launch the instance. - ImageId *string `locationName:"imageId" type:"string"` + // The ID of the kernel. + // + // We recommend that you use PV-GRUB instead of kernels and RAM disks. For more + // information, see PV-GRUB (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html) + // in the Amazon Elastic Compute Cloud User Guide. + KernelId *string `type:"string"` - // Indicates whether an instance stops or terminates when you initiate shutdown - // from the instance (using the operating system command for system shutdown). - InstanceInitiatedShutdownBehavior *string `locationName:"instanceInitiatedShutdownBehavior" type:"string" enum:"ShutdownBehavior"` + // The name of the key pair. You can create a key pair using CreateKeyPair or + // ImportKeyPair. + // + // If you do not specify a key pair, you can't connect to the instance unless + // you choose an AMI that is configured to allow users another way to log in. + KeyName *string `type:"string"` - // The market (purchasing) option for the instances. - InstanceMarketOptions *LaunchTemplateInstanceMarketOptions `locationName:"instanceMarketOptions" type:"structure"` + // The launch template to use to launch the instances. Any parameters that you + // specify in RunInstances override the same parameters in the launch template. + // You can specify either the name or ID of a launch template, but not both. + LaunchTemplate *LaunchTemplateSpecification `type:"structure"` - // The instance type. - InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` + // The license configurations. + LicenseSpecifications []*LicenseConfigurationRequest `locationName:"LicenseSpecification" locationNameList:"item" type:"list"` - // The ID of the kernel, if applicable. - KernelId *string `locationName:"kernelId" type:"string"` + // The maximum number of instances to launch. If you specify more instances + // than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches + // the largest possible number of instances above MinCount. + // + // Constraints: Between 1 and the maximum number you're allowed for the specified + // instance type. For more information about the default limits, and how to + // request an increase, see How many instances can I run in Amazon EC2 (http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2) + // in the Amazon EC2 FAQ. + // + // MaxCount is a required field + MaxCount *int64 `type:"integer" required:"true"` - // The name of the key pair. - KeyName *string `locationName:"keyName" type:"string"` + // The minimum number of instances to launch. If you specify a minimum that + // is more instances than Amazon EC2 can launch in the target Availability Zone, + // Amazon EC2 launches no instances. + // + // Constraints: Between 1 and the maximum number you're allowed for the specified + // instance type. For more information about the default limits, and how to + // request an increase, see How many instances can I run in Amazon EC2 (http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2) + // in the Amazon EC2 General FAQ. + // + // MinCount is a required field + MinCount *int64 `type:"integer" required:"true"` // The monitoring for the instance. - Monitoring *LaunchTemplatesMonitoring `locationName:"monitoring" type:"structure"` + Monitoring *RunInstancesMonitoringEnabled `type:"structure"` - // The network interfaces. - NetworkInterfaces []*LaunchTemplateInstanceNetworkInterfaceSpecification `locationName:"networkInterfaceSet" locationNameList:"item" type:"list"` + // One or more network interfaces. + NetworkInterfaces []*InstanceNetworkInterfaceSpecification `locationName:"networkInterface" locationNameList:"item" type:"list"` - // The placement of the instance. - Placement *LaunchTemplatePlacement `locationName:"placement" type:"structure"` + // The placement for the instance. + Placement *Placement `type:"structure"` - // The ID of the RAM disk, if applicable. - RamDiskId *string `locationName:"ramDiskId" type:"string"` + // [EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 + // address range of the subnet. + // + // Only one private IP address can be designated as primary. You can't specify + // this option if you've specified the option to designate a private IP address + // as the primary IP address in a network interface specification. You cannot + // specify this option if you're launching more than one instance in the request. + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` - // The security group IDs. - SecurityGroupIds []*string `locationName:"securityGroupIdSet" locationNameList:"item" type:"list"` + // The ID of the RAM disk. + // + // We recommend that you use PV-GRUB instead of kernels and RAM disks. For more + // information, see PV-GRUB (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html) + // in the Amazon Elastic Compute Cloud User Guide. + RamdiskId *string `type:"string"` - // The security group names. - SecurityGroups []*string `locationName:"securityGroupSet" locationNameList:"item" type:"list"` + // One or more security group IDs. You can create a security group using CreateSecurityGroup. + // + // Default: Amazon EC2 uses the default security group. + SecurityGroupIds []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"` - // The tags. - TagSpecifications []*LaunchTemplateTagSpecification `locationName:"tagSpecificationSet" locationNameList:"item" type:"list"` + // [EC2-Classic, default VPC] One or more security group names. For a nondefault + // VPC, you must use security group IDs instead. + // + // Default: Amazon EC2 uses the default security group. + SecurityGroups []*string `locationName:"SecurityGroup" locationNameList:"SecurityGroup" type:"list"` - // The user data for the instance. - UserData *string `locationName:"userData" type:"string"` + // [EC2-VPC] The ID of the subnet to launch the instance into. + SubnetId *string `type:"string"` + + // The tags to apply to the resources during launch. You can only tag instances + // and volumes on launch. The specified tags are applied to all instances or + // volumes that are created during launch. To tag a resource after it has been + // created, see CreateTags. + TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` + + // The user data to make available to the instance. For more information, see + // Running Commands on Your Linux Instance at Launch (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html) + // (Linux) and Adding User Data (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html#instancedata-add-user-data) + // (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. + UserData *string `type:"string"` } // String returns the string representation -func (s ResponseLaunchTemplateData) String() string { +func (s RunInstancesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ResponseLaunchTemplateData) GoString() string { +func (s RunInstancesInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *RunInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RunInstancesInput"} + if s.MaxCount == nil { + invalidParams.Add(request.NewErrParamRequired("MaxCount")) + } + if s.MinCount == nil { + invalidParams.Add(request.NewErrParamRequired("MinCount")) + } + if s.CreditSpecification != nil { + if err := s.CreditSpecification.Validate(); err != nil { + invalidParams.AddNested("CreditSpecification", err.(request.ErrInvalidParams)) + } + } + if s.ElasticGpuSpecification != nil { + for i, v := range s.ElasticGpuSpecification { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ElasticGpuSpecification", i), err.(request.ErrInvalidParams)) + } + } + } + if s.ElasticInferenceAccelerators != nil { + for i, v := range s.ElasticInferenceAccelerators { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ElasticInferenceAccelerators", i), err.(request.ErrInvalidParams)) + } + } + } + if s.Monitoring != nil { + if err := s.Monitoring.Validate(); err != nil { + invalidParams.AddNested("Monitoring", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAdditionalInfo sets the AdditionalInfo field's value. +func (s *RunInstancesInput) SetAdditionalInfo(v string) *RunInstancesInput { + s.AdditionalInfo = &v + return s +} + // SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *ResponseLaunchTemplateData) SetBlockDeviceMappings(v []*LaunchTemplateBlockDeviceMapping) *ResponseLaunchTemplateData { +func (s *RunInstancesInput) SetBlockDeviceMappings(v []*BlockDeviceMapping) *RunInstancesInput { s.BlockDeviceMappings = v return s } +// SetCapacityReservationSpecification sets the CapacityReservationSpecification field's value. +func (s *RunInstancesInput) SetCapacityReservationSpecification(v *CapacityReservationSpecification) *RunInstancesInput { + s.CapacityReservationSpecification = v + return s +} + +// SetClientToken sets the ClientToken field's value. +func (s *RunInstancesInput) SetClientToken(v string) *RunInstancesInput { + s.ClientToken = &v + return s +} + // SetCpuOptions sets the CpuOptions field's value. -func (s *ResponseLaunchTemplateData) SetCpuOptions(v *LaunchTemplateCpuOptions) *ResponseLaunchTemplateData { +func (s *RunInstancesInput) SetCpuOptions(v *CpuOptionsRequest) *RunInstancesInput { s.CpuOptions = v return s } // SetCreditSpecification sets the CreditSpecification field's value. -func (s *ResponseLaunchTemplateData) SetCreditSpecification(v *CreditSpecification) *ResponseLaunchTemplateData { +func (s *RunInstancesInput) SetCreditSpecification(v *CreditSpecificationRequest) *RunInstancesInput { s.CreditSpecification = v return s } // SetDisableApiTermination sets the DisableApiTermination field's value. -func (s *ResponseLaunchTemplateData) SetDisableApiTermination(v bool) *ResponseLaunchTemplateData { +func (s *RunInstancesInput) SetDisableApiTermination(v bool) *RunInstancesInput { s.DisableApiTermination = &v return s } +// SetDryRun sets the DryRun field's value. +func (s *RunInstancesInput) SetDryRun(v bool) *RunInstancesInput { + s.DryRun = &v + return s +} + // SetEbsOptimized sets the EbsOptimized field's value. -func (s *ResponseLaunchTemplateData) SetEbsOptimized(v bool) *ResponseLaunchTemplateData { +func (s *RunInstancesInput) SetEbsOptimized(v bool) *RunInstancesInput { s.EbsOptimized = &v return s } -// SetElasticGpuSpecifications sets the ElasticGpuSpecifications field's value. -func (s *ResponseLaunchTemplateData) SetElasticGpuSpecifications(v []*ElasticGpuSpecificationResponse) *ResponseLaunchTemplateData { - s.ElasticGpuSpecifications = v +// SetElasticGpuSpecification sets the ElasticGpuSpecification field's value. +func (s *RunInstancesInput) SetElasticGpuSpecification(v []*ElasticGpuSpecification) *RunInstancesInput { + s.ElasticGpuSpecification = v + return s +} + +// SetElasticInferenceAccelerators sets the ElasticInferenceAccelerators field's value. +func (s *RunInstancesInput) SetElasticInferenceAccelerators(v []*ElasticInferenceAccelerator) *RunInstancesInput { + s.ElasticInferenceAccelerators = v + return s +} + +// SetHibernationOptions sets the HibernationOptions field's value. +func (s *RunInstancesInput) SetHibernationOptions(v *HibernationOptionsRequest) *RunInstancesInput { + s.HibernationOptions = v return s } // SetIamInstanceProfile sets the IamInstanceProfile field's value. -func (s *ResponseLaunchTemplateData) SetIamInstanceProfile(v *LaunchTemplateIamInstanceProfileSpecification) *ResponseLaunchTemplateData { +func (s *RunInstancesInput) SetIamInstanceProfile(v *IamInstanceProfileSpecification) *RunInstancesInput { s.IamInstanceProfile = v return s } // SetImageId sets the ImageId field's value. -func (s *ResponseLaunchTemplateData) SetImageId(v string) *ResponseLaunchTemplateData { +func (s *RunInstancesInput) SetImageId(v string) *RunInstancesInput { s.ImageId = &v return s } // SetInstanceInitiatedShutdownBehavior sets the InstanceInitiatedShutdownBehavior field's value. -func (s *ResponseLaunchTemplateData) SetInstanceInitiatedShutdownBehavior(v string) *ResponseLaunchTemplateData { +func (s *RunInstancesInput) SetInstanceInitiatedShutdownBehavior(v string) *RunInstancesInput { s.InstanceInitiatedShutdownBehavior = &v return s } // SetInstanceMarketOptions sets the InstanceMarketOptions field's value. -func (s *ResponseLaunchTemplateData) SetInstanceMarketOptions(v *LaunchTemplateInstanceMarketOptions) *ResponseLaunchTemplateData { +func (s *RunInstancesInput) SetInstanceMarketOptions(v *InstanceMarketOptionsRequest) *RunInstancesInput { s.InstanceMarketOptions = v return s } // SetInstanceType sets the InstanceType field's value. -func (s *ResponseLaunchTemplateData) SetInstanceType(v string) *ResponseLaunchTemplateData { +func (s *RunInstancesInput) SetInstanceType(v string) *RunInstancesInput { s.InstanceType = &v return s } +// SetIpv6AddressCount sets the Ipv6AddressCount field's value. +func (s *RunInstancesInput) SetIpv6AddressCount(v int64) *RunInstancesInput { + s.Ipv6AddressCount = &v + return s +} + +// SetIpv6Addresses sets the Ipv6Addresses field's value. +func (s *RunInstancesInput) SetIpv6Addresses(v []*InstanceIpv6Address) *RunInstancesInput { + s.Ipv6Addresses = v + return s +} + // SetKernelId sets the KernelId field's value. -func (s *ResponseLaunchTemplateData) SetKernelId(v string) *ResponseLaunchTemplateData { +func (s *RunInstancesInput) SetKernelId(v string) *RunInstancesInput { s.KernelId = &v return s } // SetKeyName sets the KeyName field's value. -func (s *ResponseLaunchTemplateData) SetKeyName(v string) *ResponseLaunchTemplateData { +func (s *RunInstancesInput) SetKeyName(v string) *RunInstancesInput { s.KeyName = &v return s } +// SetLaunchTemplate sets the LaunchTemplate field's value. +func (s *RunInstancesInput) SetLaunchTemplate(v *LaunchTemplateSpecification) *RunInstancesInput { + s.LaunchTemplate = v + return s +} + +// SetLicenseSpecifications sets the LicenseSpecifications field's value. +func (s *RunInstancesInput) SetLicenseSpecifications(v []*LicenseConfigurationRequest) *RunInstancesInput { + s.LicenseSpecifications = v + return s +} + +// SetMaxCount sets the MaxCount field's value. +func (s *RunInstancesInput) SetMaxCount(v int64) *RunInstancesInput { + s.MaxCount = &v + return s +} + +// SetMinCount sets the MinCount field's value. +func (s *RunInstancesInput) SetMinCount(v int64) *RunInstancesInput { + s.MinCount = &v + return s +} + // SetMonitoring sets the Monitoring field's value. -func (s *ResponseLaunchTemplateData) SetMonitoring(v *LaunchTemplatesMonitoring) *ResponseLaunchTemplateData { +func (s *RunInstancesInput) SetMonitoring(v *RunInstancesMonitoringEnabled) *RunInstancesInput { s.Monitoring = v return s } // SetNetworkInterfaces sets the NetworkInterfaces field's value. -func (s *ResponseLaunchTemplateData) SetNetworkInterfaces(v []*LaunchTemplateInstanceNetworkInterfaceSpecification) *ResponseLaunchTemplateData { +func (s *RunInstancesInput) SetNetworkInterfaces(v []*InstanceNetworkInterfaceSpecification) *RunInstancesInput { s.NetworkInterfaces = v return s } // SetPlacement sets the Placement field's value. -func (s *ResponseLaunchTemplateData) SetPlacement(v *LaunchTemplatePlacement) *ResponseLaunchTemplateData { +func (s *RunInstancesInput) SetPlacement(v *Placement) *RunInstancesInput { s.Placement = v return s } -// SetRamDiskId sets the RamDiskId field's value. -func (s *ResponseLaunchTemplateData) SetRamDiskId(v string) *ResponseLaunchTemplateData { - s.RamDiskId = &v +// SetPrivateIpAddress sets the PrivateIpAddress field's value. +func (s *RunInstancesInput) SetPrivateIpAddress(v string) *RunInstancesInput { + s.PrivateIpAddress = &v + return s +} + +// SetRamdiskId sets the RamdiskId field's value. +func (s *RunInstancesInput) SetRamdiskId(v string) *RunInstancesInput { + s.RamdiskId = &v return s } // SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *ResponseLaunchTemplateData) SetSecurityGroupIds(v []*string) *ResponseLaunchTemplateData { +func (s *RunInstancesInput) SetSecurityGroupIds(v []*string) *RunInstancesInput { s.SecurityGroupIds = v return s } // SetSecurityGroups sets the SecurityGroups field's value. -func (s *ResponseLaunchTemplateData) SetSecurityGroups(v []*string) *ResponseLaunchTemplateData { +func (s *RunInstancesInput) SetSecurityGroups(v []*string) *RunInstancesInput { s.SecurityGroups = v return s } +// SetSubnetId sets the SubnetId field's value. +func (s *RunInstancesInput) SetSubnetId(v string) *RunInstancesInput { + s.SubnetId = &v + return s +} + // SetTagSpecifications sets the TagSpecifications field's value. -func (s *ResponseLaunchTemplateData) SetTagSpecifications(v []*LaunchTemplateTagSpecification) *ResponseLaunchTemplateData { +func (s *RunInstancesInput) SetTagSpecifications(v []*TagSpecification) *RunInstancesInput { s.TagSpecifications = v return s } // SetUserData sets the UserData field's value. -func (s *ResponseLaunchTemplateData) SetUserData(v string) *ResponseLaunchTemplateData { +func (s *RunInstancesInput) SetUserData(v string) *RunInstancesInput { s.UserData = &v return s } -// Contains the parameters for RestoreAddressToClassic. -type RestoreAddressToClassicInput struct { +// Describes the monitoring of an instance. +type RunInstancesMonitoringEnabled struct { + _ struct{} `type:"structure"` + + // Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring + // is enabled. + // + // Enabled is a required field + Enabled *bool `locationName:"enabled" type:"boolean" required:"true"` +} + +// String returns the string representation +func (s RunInstancesMonitoringEnabled) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RunInstancesMonitoringEnabled) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RunInstancesMonitoringEnabled) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RunInstancesMonitoringEnabled"} + if s.Enabled == nil { + invalidParams.Add(request.NewErrParamRequired("Enabled")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEnabled sets the Enabled field's value. +func (s *RunInstancesMonitoringEnabled) SetEnabled(v bool) *RunInstancesMonitoringEnabled { + s.Enabled = &v + return s +} + +// Contains the parameters for RunScheduledInstances. +type RunScheduledInstancesInput struct { _ struct{} `type:"structure"` + // Unique, case-sensitive identifier that ensures the idempotency of the request. + // For more information, see Ensuring Idempotency (http://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 `locationName:"dryRun" type:"boolean"` + DryRun *bool `type:"boolean"` - // The Elastic IP address. + // The number of instances. // - // PublicIp is a required field - PublicIp *string `locationName:"publicIp" type:"string" required:"true"` + // Default: 1 + InstanceCount *int64 `type:"integer"` + + // The launch specification. You must match the instance type, Availability + // Zone, network, and platform of the schedule that you purchased. + // + // LaunchSpecification is a required field + LaunchSpecification *ScheduledInstancesLaunchSpecification `type:"structure" required:"true"` + + // The Scheduled Instance ID. + // + // ScheduledInstanceId is a required field + ScheduledInstanceId *string `type:"string" required:"true"` } // String returns the string representation -func (s RestoreAddressToClassicInput) String() string { +func (s RunScheduledInstancesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s RestoreAddressToClassicInput) GoString() string { +func (s RunScheduledInstancesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *RestoreAddressToClassicInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RestoreAddressToClassicInput"} - if s.PublicIp == nil { - invalidParams.Add(request.NewErrParamRequired("PublicIp")) +func (s *RunScheduledInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RunScheduledInstancesInput"} + if s.LaunchSpecification == nil { + invalidParams.Add(request.NewErrParamRequired("LaunchSpecification")) + } + if s.ScheduledInstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("ScheduledInstanceId")) + } + if s.LaunchSpecification != nil { + if err := s.LaunchSpecification.Validate(); err != nil { + invalidParams.AddNested("LaunchSpecification", err.(request.ErrInvalidParams)) + } } if invalidParams.Len() > 0 { @@ -62058,809 +75790,823 @@ func (s *RestoreAddressToClassicInput) Validate() error { return nil } +// SetClientToken sets the ClientToken field's value. +func (s *RunScheduledInstancesInput) SetClientToken(v string) *RunScheduledInstancesInput { + s.ClientToken = &v + return s +} + // SetDryRun sets the DryRun field's value. -func (s *RestoreAddressToClassicInput) SetDryRun(v bool) *RestoreAddressToClassicInput { +func (s *RunScheduledInstancesInput) SetDryRun(v bool) *RunScheduledInstancesInput { s.DryRun = &v return s } -// SetPublicIp sets the PublicIp field's value. -func (s *RestoreAddressToClassicInput) SetPublicIp(v string) *RestoreAddressToClassicInput { - s.PublicIp = &v +// SetInstanceCount sets the InstanceCount field's value. +func (s *RunScheduledInstancesInput) SetInstanceCount(v int64) *RunScheduledInstancesInput { + s.InstanceCount = &v return s } -// Contains the output of RestoreAddressToClassic. -type RestoreAddressToClassicOutput struct { +// SetLaunchSpecification sets the LaunchSpecification field's value. +func (s *RunScheduledInstancesInput) SetLaunchSpecification(v *ScheduledInstancesLaunchSpecification) *RunScheduledInstancesInput { + s.LaunchSpecification = v + return s +} + +// SetScheduledInstanceId sets the ScheduledInstanceId field's value. +func (s *RunScheduledInstancesInput) SetScheduledInstanceId(v string) *RunScheduledInstancesInput { + s.ScheduledInstanceId = &v + return s +} + +// Contains the output of RunScheduledInstances. +type RunScheduledInstancesOutput struct { _ struct{} `type:"structure"` - // The Elastic IP address. - PublicIp *string `locationName:"publicIp" type:"string"` + // The IDs of the newly launched instances. + InstanceIdSet []*string `locationName:"instanceIdSet" locationNameList:"item" type:"list"` +} - // The move status for the IP address. - Status *string `locationName:"status" type:"string" enum:"Status"` +// String returns the string representation +func (s RunScheduledInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RunScheduledInstancesOutput) GoString() string { + return s.String() +} + +// SetInstanceIdSet sets the InstanceIdSet field's value. +func (s *RunScheduledInstancesOutput) SetInstanceIdSet(v []*string) *RunScheduledInstancesOutput { + s.InstanceIdSet = v + return s +} + +// Describes the storage parameters for S3 and S3 buckets for an instance store-backed +// AMI. +type S3Storage struct { + _ struct{} `type:"structure"` + + // The access key ID of the owner of the bucket. Before you specify a value + // for your access key ID, review and follow the guidance in Best Practices + // for Managing AWS Access Keys (http://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html). + AWSAccessKeyId *string `type:"string"` + + // The bucket in which to store the AMI. You can specify a bucket that you already + // own or a new bucket that Amazon EC2 creates on your behalf. If you specify + // a bucket that belongs to someone else, Amazon EC2 returns an error. + Bucket *string `locationName:"bucket" type:"string"` + + // The beginning of the file name of the AMI. + Prefix *string `locationName:"prefix" type:"string"` + + // An Amazon S3 upload policy that gives Amazon EC2 permission to upload items + // into Amazon S3 on your behalf. + // + // UploadPolicy is automatically base64 encoded/decoded by the SDK. + UploadPolicy []byte `locationName:"uploadPolicy" type:"blob"` + + // The signature of the JSON document. + UploadPolicySignature *string `locationName:"uploadPolicySignature" type:"string"` } // String returns the string representation -func (s RestoreAddressToClassicOutput) String() string { +func (s S3Storage) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s RestoreAddressToClassicOutput) GoString() string { +func (s S3Storage) GoString() string { return s.String() } -// SetPublicIp sets the PublicIp field's value. -func (s *RestoreAddressToClassicOutput) SetPublicIp(v string) *RestoreAddressToClassicOutput { - s.PublicIp = &v +// SetAWSAccessKeyId sets the AWSAccessKeyId field's value. +func (s *S3Storage) SetAWSAccessKeyId(v string) *S3Storage { + s.AWSAccessKeyId = &v return s } -// SetStatus sets the Status field's value. -func (s *RestoreAddressToClassicOutput) SetStatus(v string) *RestoreAddressToClassicOutput { - s.Status = &v +// SetBucket sets the Bucket field's value. +func (s *S3Storage) SetBucket(v string) *S3Storage { + s.Bucket = &v + return s +} + +// SetPrefix sets the Prefix field's value. +func (s *S3Storage) SetPrefix(v string) *S3Storage { + s.Prefix = &v + return s +} + +// SetUploadPolicy sets the UploadPolicy field's value. +func (s *S3Storage) SetUploadPolicy(v []byte) *S3Storage { + s.UploadPolicy = v + return s +} + +// SetUploadPolicySignature sets the UploadPolicySignature field's value. +func (s *S3Storage) SetUploadPolicySignature(v string) *S3Storage { + s.UploadPolicySignature = &v return s } -// Contains the parameters for RevokeSecurityGroupEgress. -type RevokeSecurityGroupEgressInput struct { - _ struct{} `type:"structure"` +// Describes a Scheduled Instance. +type ScheduledInstance struct { + _ struct{} `type:"structure"` + + // The Availability Zone. + AvailabilityZone *string `locationName:"availabilityZone" type:"string"` + + // The date when the Scheduled Instance was purchased. + CreateDate *time.Time `locationName:"createDate" type:"timestamp"` + + // The hourly price for a single instance. + HourlyPrice *string `locationName:"hourlyPrice" type:"string"` + + // The number of instances. + InstanceCount *int64 `locationName:"instanceCount" type:"integer"` + + // The instance type. + InstanceType *string `locationName:"instanceType" type:"string"` + + // The network platform (EC2-Classic or EC2-VPC). + NetworkPlatform *string `locationName:"networkPlatform" type:"string"` - // Not supported. Use a set of IP permissions to specify the CIDR. - CidrIp *string `locationName:"cidrIp" type:"string"` + // The time for the next schedule to start. + NextSlotStartTime *time.Time `locationName:"nextSlotStartTime" 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 `locationName:"dryRun" type:"boolean"` + // The platform (Linux/UNIX or Windows). + Platform *string `locationName:"platform" type:"string"` - // Not supported. Use a set of IP permissions to specify the port. - FromPort *int64 `locationName:"fromPort" type:"integer"` + // The time that the previous schedule ended or will end. + PreviousSlotEndTime *time.Time `locationName:"previousSlotEndTime" type:"timestamp"` - // The ID of the security group. - // - // GroupId is a required field - GroupId *string `locationName:"groupId" type:"string" required:"true"` + // The schedule recurrence. + Recurrence *ScheduledInstanceRecurrence `locationName:"recurrence" type:"structure"` - // One or more sets of IP permissions. You can't specify a destination security - // group and a CIDR IP address range in the same set of permissions. - IpPermissions []*IpPermission `locationName:"ipPermissions" locationNameList:"item" type:"list"` + // The Scheduled Instance ID. + ScheduledInstanceId *string `locationName:"scheduledInstanceId" type:"string"` - // Not supported. Use a set of IP permissions to specify the protocol name or - // number. - IpProtocol *string `locationName:"ipProtocol" type:"string"` + // The number of hours in the schedule. + SlotDurationInHours *int64 `locationName:"slotDurationInHours" type:"integer"` - // Not supported. Use a set of IP permissions to specify a destination security - // group. - SourceSecurityGroupName *string `locationName:"sourceSecurityGroupName" type:"string"` + // The end date for the Scheduled Instance. + TermEndDate *time.Time `locationName:"termEndDate" type:"timestamp"` - // Not supported. Use a set of IP permissions to specify a destination security - // group. - SourceSecurityGroupOwnerId *string `locationName:"sourceSecurityGroupOwnerId" type:"string"` + // The start date for the Scheduled Instance. + TermStartDate *time.Time `locationName:"termStartDate" type:"timestamp"` - // Not supported. Use a set of IP permissions to specify the port. - ToPort *int64 `locationName:"toPort" type:"integer"` + // The total number of hours for a single instance for the entire term. + TotalScheduledInstanceHours *int64 `locationName:"totalScheduledInstanceHours" type:"integer"` } // String returns the string representation -func (s RevokeSecurityGroupEgressInput) String() string { +func (s ScheduledInstance) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s RevokeSecurityGroupEgressInput) GoString() string { +func (s ScheduledInstance) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *RevokeSecurityGroupEgressInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RevokeSecurityGroupEgressInput"} - if s.GroupId == nil { - invalidParams.Add(request.NewErrParamRequired("GroupId")) - } +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *ScheduledInstance) SetAvailabilityZone(v string) *ScheduledInstance { + s.AvailabilityZone = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetCreateDate sets the CreateDate field's value. +func (s *ScheduledInstance) SetCreateDate(v time.Time) *ScheduledInstance { + s.CreateDate = &v + return s } -// SetCidrIp sets the CidrIp field's value. -func (s *RevokeSecurityGroupEgressInput) SetCidrIp(v string) *RevokeSecurityGroupEgressInput { - s.CidrIp = &v +// SetHourlyPrice sets the HourlyPrice field's value. +func (s *ScheduledInstance) SetHourlyPrice(v string) *ScheduledInstance { + s.HourlyPrice = &v return s } -// SetDryRun sets the DryRun field's value. -func (s *RevokeSecurityGroupEgressInput) SetDryRun(v bool) *RevokeSecurityGroupEgressInput { - s.DryRun = &v +// SetInstanceCount sets the InstanceCount field's value. +func (s *ScheduledInstance) SetInstanceCount(v int64) *ScheduledInstance { + s.InstanceCount = &v return s } -// SetFromPort sets the FromPort field's value. -func (s *RevokeSecurityGroupEgressInput) SetFromPort(v int64) *RevokeSecurityGroupEgressInput { - s.FromPort = &v +// SetInstanceType sets the InstanceType field's value. +func (s *ScheduledInstance) SetInstanceType(v string) *ScheduledInstance { + s.InstanceType = &v return s } -// SetGroupId sets the GroupId field's value. -func (s *RevokeSecurityGroupEgressInput) SetGroupId(v string) *RevokeSecurityGroupEgressInput { - s.GroupId = &v +// SetNetworkPlatform sets the NetworkPlatform field's value. +func (s *ScheduledInstance) SetNetworkPlatform(v string) *ScheduledInstance { + s.NetworkPlatform = &v return s } -// SetIpPermissions sets the IpPermissions field's value. -func (s *RevokeSecurityGroupEgressInput) SetIpPermissions(v []*IpPermission) *RevokeSecurityGroupEgressInput { - s.IpPermissions = v +// SetNextSlotStartTime sets the NextSlotStartTime field's value. +func (s *ScheduledInstance) SetNextSlotStartTime(v time.Time) *ScheduledInstance { + s.NextSlotStartTime = &v return s } -// SetIpProtocol sets the IpProtocol field's value. -func (s *RevokeSecurityGroupEgressInput) SetIpProtocol(v string) *RevokeSecurityGroupEgressInput { - s.IpProtocol = &v +// SetPlatform sets the Platform field's value. +func (s *ScheduledInstance) SetPlatform(v string) *ScheduledInstance { + s.Platform = &v return s } -// SetSourceSecurityGroupName sets the SourceSecurityGroupName field's value. -func (s *RevokeSecurityGroupEgressInput) SetSourceSecurityGroupName(v string) *RevokeSecurityGroupEgressInput { - s.SourceSecurityGroupName = &v +// SetPreviousSlotEndTime sets the PreviousSlotEndTime field's value. +func (s *ScheduledInstance) SetPreviousSlotEndTime(v time.Time) *ScheduledInstance { + s.PreviousSlotEndTime = &v return s } -// SetSourceSecurityGroupOwnerId sets the SourceSecurityGroupOwnerId field's value. -func (s *RevokeSecurityGroupEgressInput) SetSourceSecurityGroupOwnerId(v string) *RevokeSecurityGroupEgressInput { - s.SourceSecurityGroupOwnerId = &v +// SetRecurrence sets the Recurrence field's value. +func (s *ScheduledInstance) SetRecurrence(v *ScheduledInstanceRecurrence) *ScheduledInstance { + s.Recurrence = v return s } -// SetToPort sets the ToPort field's value. -func (s *RevokeSecurityGroupEgressInput) SetToPort(v int64) *RevokeSecurityGroupEgressInput { - s.ToPort = &v +// SetScheduledInstanceId sets the ScheduledInstanceId field's value. +func (s *ScheduledInstance) SetScheduledInstanceId(v string) *ScheduledInstance { + s.ScheduledInstanceId = &v return s } -type RevokeSecurityGroupEgressOutput struct { - _ struct{} `type:"structure"` +// SetSlotDurationInHours sets the SlotDurationInHours field's value. +func (s *ScheduledInstance) SetSlotDurationInHours(v int64) *ScheduledInstance { + s.SlotDurationInHours = &v + return s } -// String returns the string representation -func (s RevokeSecurityGroupEgressOutput) String() string { - return awsutil.Prettify(s) +// SetTermEndDate sets the TermEndDate field's value. +func (s *ScheduledInstance) SetTermEndDate(v time.Time) *ScheduledInstance { + s.TermEndDate = &v + return s } -// GoString returns the string representation -func (s RevokeSecurityGroupEgressOutput) GoString() string { - return s.String() +// SetTermStartDate sets the TermStartDate field's value. +func (s *ScheduledInstance) SetTermStartDate(v time.Time) *ScheduledInstance { + s.TermStartDate = &v + return s } -// Contains the parameters for RevokeSecurityGroupIngress. -type RevokeSecurityGroupIngressInput struct { +// SetTotalScheduledInstanceHours sets the TotalScheduledInstanceHours field's value. +func (s *ScheduledInstance) SetTotalScheduledInstanceHours(v int64) *ScheduledInstance { + s.TotalScheduledInstanceHours = &v + return s +} + +// Describes a schedule that is available for your Scheduled Instances. +type ScheduledInstanceAvailability struct { _ struct{} `type:"structure"` - // The CIDR IP address range. You can't specify this parameter when specifying - // a source security group. - CidrIp *string `type:"string"` + // The Availability Zone. + AvailabilityZone *string `locationName:"availabilityZone" 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 `locationName:"dryRun" type:"boolean"` + // The number of available instances. + AvailableInstanceCount *int64 `locationName:"availableInstanceCount" type:"integer"` - // The start of port range for the TCP and UDP protocols, or an ICMP type number. - // For the ICMP type number, use -1 to specify all ICMP types. - FromPort *int64 `type:"integer"` + // The time period for the first schedule to start. + FirstSlotStartTime *time.Time `locationName:"firstSlotStartTime" type:"timestamp"` - // The ID of the security group. You must specify either the security group - // ID or the security group name in the request. For security groups in a nondefault - // VPC, you must specify the security group ID. - GroupId *string `type:"string"` + // The hourly price for a single instance. + HourlyPrice *string `locationName:"hourlyPrice" type:"string"` - // [EC2-Classic, default VPC] The name of the security group. You must specify - // either the security group ID or the security group name in the request. - GroupName *string `type:"string"` + // The instance type. You can specify one of the C3, C4, M4, or R3 instance + // types. + InstanceType *string `locationName:"instanceType" type:"string"` - // One or more sets of IP permissions. You can't specify a source security group - // and a CIDR IP address range in the same set of permissions. - IpPermissions []*IpPermission `locationNameList:"item" type:"list"` + // The maximum term. The only possible value is 365 days. + MaxTermDurationInDays *int64 `locationName:"maxTermDurationInDays" type:"integer"` - // The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)). - // Use -1 to specify all. - IpProtocol *string `type:"string"` + // The minimum term. The only possible value is 365 days. + MinTermDurationInDays *int64 `locationName:"minTermDurationInDays" type:"integer"` - // [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 - // the end of the port range. For EC2-VPC, the source security group must be - // in the same VPC. To revoke a specific rule for an IP protocol and port range, - // use a set of IP permissions instead. - SourceSecurityGroupName *string `type:"string"` + // The network platform (EC2-Classic or EC2-VPC). + NetworkPlatform *string `locationName:"networkPlatform" 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. - SourceSecurityGroupOwnerId *string `type:"string"` + // The platform (Linux/UNIX or Windows). + Platform *string `locationName:"platform" type:"string"` - // 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 ICMP codes for the ICMP type. - ToPort *int64 `type:"integer"` + // The purchase token. This token expires in two hours. + PurchaseToken *string `locationName:"purchaseToken" type:"string"` + + // The schedule recurrence. + Recurrence *ScheduledInstanceRecurrence `locationName:"recurrence" type:"structure"` + + // The number of hours in the schedule. + SlotDurationInHours *int64 `locationName:"slotDurationInHours" type:"integer"` + + // The total number of hours for a single instance for the entire term. + TotalScheduledInstanceHours *int64 `locationName:"totalScheduledInstanceHours" type:"integer"` } // String returns the string representation -func (s RevokeSecurityGroupIngressInput) String() string { +func (s ScheduledInstanceAvailability) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s RevokeSecurityGroupIngressInput) GoString() string { +func (s ScheduledInstanceAvailability) GoString() string { return s.String() } -// SetCidrIp sets the CidrIp field's value. -func (s *RevokeSecurityGroupIngressInput) SetCidrIp(v string) *RevokeSecurityGroupIngressInput { - s.CidrIp = &v +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *ScheduledInstanceAvailability) SetAvailabilityZone(v string) *ScheduledInstanceAvailability { + s.AvailabilityZone = &v return s } -// SetDryRun sets the DryRun field's value. -func (s *RevokeSecurityGroupIngressInput) SetDryRun(v bool) *RevokeSecurityGroupIngressInput { - s.DryRun = &v +// SetAvailableInstanceCount sets the AvailableInstanceCount field's value. +func (s *ScheduledInstanceAvailability) SetAvailableInstanceCount(v int64) *ScheduledInstanceAvailability { + s.AvailableInstanceCount = &v return s } -// SetFromPort sets the FromPort field's value. -func (s *RevokeSecurityGroupIngressInput) SetFromPort(v int64) *RevokeSecurityGroupIngressInput { - s.FromPort = &v +// SetFirstSlotStartTime sets the FirstSlotStartTime field's value. +func (s *ScheduledInstanceAvailability) SetFirstSlotStartTime(v time.Time) *ScheduledInstanceAvailability { + s.FirstSlotStartTime = &v return s } -// SetGroupId sets the GroupId field's value. -func (s *RevokeSecurityGroupIngressInput) SetGroupId(v string) *RevokeSecurityGroupIngressInput { - s.GroupId = &v +// SetHourlyPrice sets the HourlyPrice field's value. +func (s *ScheduledInstanceAvailability) SetHourlyPrice(v string) *ScheduledInstanceAvailability { + s.HourlyPrice = &v return s } -// SetGroupName sets the GroupName field's value. -func (s *RevokeSecurityGroupIngressInput) SetGroupName(v string) *RevokeSecurityGroupIngressInput { - s.GroupName = &v +// SetInstanceType sets the InstanceType field's value. +func (s *ScheduledInstanceAvailability) SetInstanceType(v string) *ScheduledInstanceAvailability { + s.InstanceType = &v return s } -// SetIpPermissions sets the IpPermissions field's value. -func (s *RevokeSecurityGroupIngressInput) SetIpPermissions(v []*IpPermission) *RevokeSecurityGroupIngressInput { - s.IpPermissions = v +// SetMaxTermDurationInDays sets the MaxTermDurationInDays field's value. +func (s *ScheduledInstanceAvailability) SetMaxTermDurationInDays(v int64) *ScheduledInstanceAvailability { + s.MaxTermDurationInDays = &v return s } -// SetIpProtocol sets the IpProtocol field's value. -func (s *RevokeSecurityGroupIngressInput) SetIpProtocol(v string) *RevokeSecurityGroupIngressInput { - s.IpProtocol = &v +// SetMinTermDurationInDays sets the MinTermDurationInDays field's value. +func (s *ScheduledInstanceAvailability) SetMinTermDurationInDays(v int64) *ScheduledInstanceAvailability { + s.MinTermDurationInDays = &v return s } -// SetSourceSecurityGroupName sets the SourceSecurityGroupName field's value. -func (s *RevokeSecurityGroupIngressInput) SetSourceSecurityGroupName(v string) *RevokeSecurityGroupIngressInput { - s.SourceSecurityGroupName = &v +// SetNetworkPlatform sets the NetworkPlatform field's value. +func (s *ScheduledInstanceAvailability) SetNetworkPlatform(v string) *ScheduledInstanceAvailability { + s.NetworkPlatform = &v return s } -// SetSourceSecurityGroupOwnerId sets the SourceSecurityGroupOwnerId field's value. -func (s *RevokeSecurityGroupIngressInput) SetSourceSecurityGroupOwnerId(v string) *RevokeSecurityGroupIngressInput { - s.SourceSecurityGroupOwnerId = &v +// SetPlatform sets the Platform field's value. +func (s *ScheduledInstanceAvailability) SetPlatform(v string) *ScheduledInstanceAvailability { + s.Platform = &v return s } -// SetToPort sets the ToPort field's value. -func (s *RevokeSecurityGroupIngressInput) SetToPort(v int64) *RevokeSecurityGroupIngressInput { - s.ToPort = &v +// SetPurchaseToken sets the PurchaseToken field's value. +func (s *ScheduledInstanceAvailability) SetPurchaseToken(v string) *ScheduledInstanceAvailability { + s.PurchaseToken = &v return s } -type RevokeSecurityGroupIngressOutput struct { +// SetRecurrence sets the Recurrence field's value. +func (s *ScheduledInstanceAvailability) SetRecurrence(v *ScheduledInstanceRecurrence) *ScheduledInstanceAvailability { + s.Recurrence = v + return s +} + +// SetSlotDurationInHours sets the SlotDurationInHours field's value. +func (s *ScheduledInstanceAvailability) SetSlotDurationInHours(v int64) *ScheduledInstanceAvailability { + s.SlotDurationInHours = &v + return s +} + +// SetTotalScheduledInstanceHours sets the TotalScheduledInstanceHours field's value. +func (s *ScheduledInstanceAvailability) SetTotalScheduledInstanceHours(v int64) *ScheduledInstanceAvailability { + s.TotalScheduledInstanceHours = &v + return s +} + +// Describes the recurring schedule for a Scheduled Instance. +type ScheduledInstanceRecurrence struct { _ struct{} `type:"structure"` + + // The frequency (Daily, Weekly, or Monthly). + Frequency *string `locationName:"frequency" type:"string"` + + // The interval quantity. The interval unit depends on the value of frequency. + // For example, every 2 weeks or every 2 months. + Interval *int64 `locationName:"interval" type:"integer"` + + // The days. For a monthly schedule, this is one or more days of the month (1-31). + // For a weekly schedule, this is one or more days of the week (1-7, where 1 + // is Sunday). + OccurrenceDaySet []*int64 `locationName:"occurrenceDaySet" locationNameList:"item" type:"list"` + + // Indicates whether the occurrence is relative to the end of the specified + // week or month. + OccurrenceRelativeToEnd *bool `locationName:"occurrenceRelativeToEnd" type:"boolean"` + + // The unit for occurrenceDaySet (DayOfWeek or DayOfMonth). + OccurrenceUnit *string `locationName:"occurrenceUnit" type:"string"` } // String returns the string representation -func (s RevokeSecurityGroupIngressOutput) String() string { +func (s ScheduledInstanceRecurrence) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s RevokeSecurityGroupIngressOutput) GoString() string { +func (s ScheduledInstanceRecurrence) GoString() string { return s.String() } -// Describes a route in a route table. -type Route struct { - _ struct{} `type:"structure"` - - // The IPv4 CIDR block used for the destination match. - DestinationCidrBlock *string `locationName:"destinationCidrBlock" type:"string"` - - // The IPv6 CIDR block used for the destination match. - DestinationIpv6CidrBlock *string `locationName:"destinationIpv6CidrBlock" type:"string"` +// SetFrequency sets the Frequency field's value. +func (s *ScheduledInstanceRecurrence) SetFrequency(v string) *ScheduledInstanceRecurrence { + s.Frequency = &v + return s +} - // The prefix of the AWS service. - DestinationPrefixListId *string `locationName:"destinationPrefixListId" type:"string"` +// SetInterval sets the Interval field's value. +func (s *ScheduledInstanceRecurrence) SetInterval(v int64) *ScheduledInstanceRecurrence { + s.Interval = &v + return s +} - // The ID of the egress-only internet gateway. - EgressOnlyInternetGatewayId *string `locationName:"egressOnlyInternetGatewayId" type:"string"` +// SetOccurrenceDaySet sets the OccurrenceDaySet field's value. +func (s *ScheduledInstanceRecurrence) SetOccurrenceDaySet(v []*int64) *ScheduledInstanceRecurrence { + s.OccurrenceDaySet = v + return s +} - // The ID of a gateway attached to your VPC. - GatewayId *string `locationName:"gatewayId" type:"string"` +// SetOccurrenceRelativeToEnd sets the OccurrenceRelativeToEnd field's value. +func (s *ScheduledInstanceRecurrence) SetOccurrenceRelativeToEnd(v bool) *ScheduledInstanceRecurrence { + s.OccurrenceRelativeToEnd = &v + return s +} - // The ID of a NAT instance in your VPC. - InstanceId *string `locationName:"instanceId" type:"string"` +// SetOccurrenceUnit sets the OccurrenceUnit field's value. +func (s *ScheduledInstanceRecurrence) SetOccurrenceUnit(v string) *ScheduledInstanceRecurrence { + s.OccurrenceUnit = &v + return s +} - // The AWS account ID of the owner of the instance. - InstanceOwnerId *string `locationName:"instanceOwnerId" type:"string"` +// Describes the recurring schedule for a Scheduled Instance. +type ScheduledInstanceRecurrenceRequest struct { + _ struct{} `type:"structure"` - // The ID of a NAT gateway. - NatGatewayId *string `locationName:"natGatewayId" type:"string"` + // The frequency (Daily, Weekly, or Monthly). + Frequency *string `type:"string"` - // The ID of the network interface. - NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` + // The interval quantity. The interval unit depends on the value of Frequency. + // For example, every 2 weeks or every 2 months. + Interval *int64 `type:"integer"` - // Describes how the route was created. - // - // * 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" enum:"RouteOrigin"` + // The days. For a monthly schedule, this is one or more days of the month (1-31). + // For a weekly schedule, this is one or more days of the week (1-7, where 1 + // is Sunday). You can't specify this value with a daily schedule. If the occurrence + // is relative to the end of the month, you can specify only a single day. + OccurrenceDays []*int64 `locationName:"OccurrenceDay" locationNameList:"OccurenceDay" type:"list"` - // The state of the route. The blackhole state indicates that the route's target - // isn't available (for example, the specified gateway isn't attached to the - // VPC, or the specified NAT instance has been terminated). - State *string `locationName:"state" type:"string" enum:"RouteState"` + // Indicates whether the occurrence is relative to the end of the specified + // week or month. You can't specify this value with a daily schedule. + OccurrenceRelativeToEnd *bool `type:"boolean"` - // The ID of the VPC peering connection. - VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string"` + // The unit for OccurrenceDays (DayOfWeek or DayOfMonth). This value is required + // for a monthly schedule. You can't specify DayOfWeek with a weekly schedule. + // You can't specify this value with a daily schedule. + OccurrenceUnit *string `type:"string"` } // String returns the string representation -func (s Route) String() string { +func (s ScheduledInstanceRecurrenceRequest) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Route) GoString() string { +func (s ScheduledInstanceRecurrenceRequest) GoString() string { return s.String() } -// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. -func (s *Route) SetDestinationCidrBlock(v string) *Route { - s.DestinationCidrBlock = &v +// SetFrequency sets the Frequency field's value. +func (s *ScheduledInstanceRecurrenceRequest) SetFrequency(v string) *ScheduledInstanceRecurrenceRequest { + s.Frequency = &v return s } -// SetDestinationIpv6CidrBlock sets the DestinationIpv6CidrBlock field's value. -func (s *Route) SetDestinationIpv6CidrBlock(v string) *Route { - s.DestinationIpv6CidrBlock = &v +// SetInterval sets the Interval field's value. +func (s *ScheduledInstanceRecurrenceRequest) SetInterval(v int64) *ScheduledInstanceRecurrenceRequest { + s.Interval = &v return s } -// SetDestinationPrefixListId sets the DestinationPrefixListId field's value. -func (s *Route) SetDestinationPrefixListId(v string) *Route { - s.DestinationPrefixListId = &v +// SetOccurrenceDays sets the OccurrenceDays field's value. +func (s *ScheduledInstanceRecurrenceRequest) SetOccurrenceDays(v []*int64) *ScheduledInstanceRecurrenceRequest { + s.OccurrenceDays = v return s } -// SetEgressOnlyInternetGatewayId sets the EgressOnlyInternetGatewayId field's value. -func (s *Route) SetEgressOnlyInternetGatewayId(v string) *Route { - s.EgressOnlyInternetGatewayId = &v +// SetOccurrenceRelativeToEnd sets the OccurrenceRelativeToEnd field's value. +func (s *ScheduledInstanceRecurrenceRequest) SetOccurrenceRelativeToEnd(v bool) *ScheduledInstanceRecurrenceRequest { + s.OccurrenceRelativeToEnd = &v return s } -// SetGatewayId sets the GatewayId field's value. -func (s *Route) SetGatewayId(v string) *Route { - s.GatewayId = &v +// SetOccurrenceUnit sets the OccurrenceUnit field's value. +func (s *ScheduledInstanceRecurrenceRequest) SetOccurrenceUnit(v string) *ScheduledInstanceRecurrenceRequest { + s.OccurrenceUnit = &v return s } -// SetInstanceId sets the InstanceId field's value. -func (s *Route) SetInstanceId(v string) *Route { - s.InstanceId = &v - return s +// Describes a block device mapping for a Scheduled Instance. +type ScheduledInstancesBlockDeviceMapping struct { + _ struct{} `type:"structure"` + + // The device name (for example, /dev/sdh or xvdh). + DeviceName *string `type:"string"` + + // Parameters used to set up EBS volumes automatically when the instance is + // launched. + Ebs *ScheduledInstancesEbs `type:"structure"` + + // Suppresses the specified device included in the block device mapping of the + // AMI. + NoDevice *string `type:"string"` + + // The virtual device name (ephemeralN). Instance store volumes are numbered + // starting from 0. An instance type with two available instance store volumes + // can specify mappings for ephemeral0 and ephemeral1. The number of available + // instance store volumes depends on the instance type. After you connect to + // the instance, you must mount the volume. + // + // Constraints: For M3 instances, you must specify instance store volumes in + // the block device mapping for the instance. When you launch an M3 instance, + // we ignore any instance store volumes specified in the block device mapping + // for the AMI. + VirtualName *string `type:"string"` } -// SetInstanceOwnerId sets the InstanceOwnerId field's value. -func (s *Route) SetInstanceOwnerId(v string) *Route { - s.InstanceOwnerId = &v - return s +// String returns the string representation +func (s ScheduledInstancesBlockDeviceMapping) String() string { + return awsutil.Prettify(s) } -// SetNatGatewayId sets the NatGatewayId field's value. -func (s *Route) SetNatGatewayId(v string) *Route { - s.NatGatewayId = &v - return s +// GoString returns the string representation +func (s ScheduledInstancesBlockDeviceMapping) GoString() string { + return s.String() } -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *Route) SetNetworkInterfaceId(v string) *Route { - s.NetworkInterfaceId = &v +// SetDeviceName sets the DeviceName field's value. +func (s *ScheduledInstancesBlockDeviceMapping) SetDeviceName(v string) *ScheduledInstancesBlockDeviceMapping { + s.DeviceName = &v return s } -// SetOrigin sets the Origin field's value. -func (s *Route) SetOrigin(v string) *Route { - s.Origin = &v +// SetEbs sets the Ebs field's value. +func (s *ScheduledInstancesBlockDeviceMapping) SetEbs(v *ScheduledInstancesEbs) *ScheduledInstancesBlockDeviceMapping { + s.Ebs = v return s } -// SetState sets the State field's value. -func (s *Route) SetState(v string) *Route { - s.State = &v +// SetNoDevice sets the NoDevice field's value. +func (s *ScheduledInstancesBlockDeviceMapping) SetNoDevice(v string) *ScheduledInstancesBlockDeviceMapping { + s.NoDevice = &v return s } -// SetVpcPeeringConnectionId sets the VpcPeeringConnectionId field's value. -func (s *Route) SetVpcPeeringConnectionId(v string) *Route { - s.VpcPeeringConnectionId = &v +// SetVirtualName sets the VirtualName field's value. +func (s *ScheduledInstancesBlockDeviceMapping) SetVirtualName(v string) *ScheduledInstancesBlockDeviceMapping { + s.VirtualName = &v return s } -// Describes a route table. -type RouteTable struct { +// Describes an EBS volume for a Scheduled Instance. +type ScheduledInstancesEbs struct { _ struct{} `type:"structure"` - // The associations between the route table and one or more subnets. - Associations []*RouteTableAssociation `locationName:"associationSet" locationNameList:"item" type:"list"` + // Indicates whether the volume is deleted on instance termination. + DeleteOnTermination *bool `type:"boolean"` - // Any virtual private gateway (VGW) propagating routes. - PropagatingVgws []*PropagatingVgw `locationName:"propagatingVgwSet" locationNameList:"item" type:"list"` + // Indicates whether the volume is encrypted. You can attached encrypted volumes + // only to instances that support them. + Encrypted *bool `type:"boolean"` - // The ID of the route table. - RouteTableId *string `locationName:"routeTableId" type:"string"` + // The number of I/O operations per second (IOPS) that the volume supports. + // For 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. For more information about gp2 baseline performance, I/O credits, + // and bursting, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) + // in the Amazon Elastic Compute Cloud User Guide. + // + // Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for + // gp2 volumes. + // + // Condition: This parameter is required for requests to create io1volumes; + // it is not used in requests to create gp2, st1, sc1, or standard volumes. + Iops *int64 `type:"integer"` - // The routes in the route table. - Routes []*Route `locationName:"routeSet" locationNameList:"item" type:"list"` + // The ID of the snapshot. + SnapshotId *string `type:"string"` - // Any tags assigned to the route table. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + // The size of the volume, in GiB. + // + // Default: If you're creating the volume from a snapshot and don't specify + // a volume size, the default is the snapshot size. + VolumeSize *int64 `type:"integer"` - // The ID of the VPC. - VpcId *string `locationName:"vpcId" type:"string"` + // The volume type. gp2 for General Purpose SSD, io1 for Provisioned IOPS SSD, + // Throughput Optimized HDD for st1, Cold HDD for sc1, or standard for Magnetic. + // + // Default: standard + VolumeType *string `type:"string"` } // String returns the string representation -func (s RouteTable) String() string { +func (s ScheduledInstancesEbs) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s RouteTable) GoString() string { +func (s ScheduledInstancesEbs) GoString() string { return s.String() } -// SetAssociations sets the Associations field's value. -func (s *RouteTable) SetAssociations(v []*RouteTableAssociation) *RouteTable { - s.Associations = v +// SetDeleteOnTermination sets the DeleteOnTermination field's value. +func (s *ScheduledInstancesEbs) SetDeleteOnTermination(v bool) *ScheduledInstancesEbs { + s.DeleteOnTermination = &v return s } -// SetPropagatingVgws sets the PropagatingVgws field's value. -func (s *RouteTable) SetPropagatingVgws(v []*PropagatingVgw) *RouteTable { - s.PropagatingVgws = v +// SetEncrypted sets the Encrypted field's value. +func (s *ScheduledInstancesEbs) SetEncrypted(v bool) *ScheduledInstancesEbs { + s.Encrypted = &v return s } -// SetRouteTableId sets the RouteTableId field's value. -func (s *RouteTable) SetRouteTableId(v string) *RouteTable { - s.RouteTableId = &v +// SetIops sets the Iops field's value. +func (s *ScheduledInstancesEbs) SetIops(v int64) *ScheduledInstancesEbs { + s.Iops = &v return s } -// SetRoutes sets the Routes field's value. -func (s *RouteTable) SetRoutes(v []*Route) *RouteTable { - s.Routes = v +// SetSnapshotId sets the SnapshotId field's value. +func (s *ScheduledInstancesEbs) SetSnapshotId(v string) *ScheduledInstancesEbs { + s.SnapshotId = &v return s } -// SetTags sets the Tags field's value. -func (s *RouteTable) SetTags(v []*Tag) *RouteTable { - s.Tags = v +// SetVolumeSize sets the VolumeSize field's value. +func (s *ScheduledInstancesEbs) SetVolumeSize(v int64) *ScheduledInstancesEbs { + s.VolumeSize = &v return s } -// SetVpcId sets the VpcId field's value. -func (s *RouteTable) SetVpcId(v string) *RouteTable { - s.VpcId = &v +// SetVolumeType sets the VolumeType field's value. +func (s *ScheduledInstancesEbs) SetVolumeType(v string) *ScheduledInstancesEbs { + s.VolumeType = &v return s } -// Describes an association between a route table and a subnet. -type RouteTableAssociation struct { +// Describes an IAM instance profile for a Scheduled Instance. +type ScheduledInstancesIamInstanceProfile struct { _ struct{} `type:"structure"` - // Indicates whether this is the main route table. - Main *bool `locationName:"main" type:"boolean"` - - // The ID of the association between a route table and a subnet. - RouteTableAssociationId *string `locationName:"routeTableAssociationId" type:"string"` - - // The ID of the route table. - RouteTableId *string `locationName:"routeTableId" type:"string"` + // The Amazon Resource Name (ARN). + Arn *string `type:"string"` - // The ID of the subnet. A subnet ID is not returned for an implicit association. - SubnetId *string `locationName:"subnetId" type:"string"` + // The name. + Name *string `type:"string"` } // String returns the string representation -func (s RouteTableAssociation) String() string { +func (s ScheduledInstancesIamInstanceProfile) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s RouteTableAssociation) GoString() string { +func (s ScheduledInstancesIamInstanceProfile) GoString() string { return s.String() } -// SetMain sets the Main field's value. -func (s *RouteTableAssociation) SetMain(v bool) *RouteTableAssociation { - s.Main = &v - return s -} - -// SetRouteTableAssociationId sets the RouteTableAssociationId field's value. -func (s *RouteTableAssociation) SetRouteTableAssociationId(v string) *RouteTableAssociation { - s.RouteTableAssociationId = &v - return s -} - -// SetRouteTableId sets the RouteTableId field's value. -func (s *RouteTableAssociation) SetRouteTableId(v string) *RouteTableAssociation { - s.RouteTableId = &v +// SetArn sets the Arn field's value. +func (s *ScheduledInstancesIamInstanceProfile) SetArn(v string) *ScheduledInstancesIamInstanceProfile { + s.Arn = &v return s } -// SetSubnetId sets the SubnetId field's value. -func (s *RouteTableAssociation) SetSubnetId(v string) *RouteTableAssociation { - s.SubnetId = &v +// SetName sets the Name field's value. +func (s *ScheduledInstancesIamInstanceProfile) SetName(v string) *ScheduledInstancesIamInstanceProfile { + s.Name = &v return s } -// Contains the parameters for RunInstances. -type RunInstancesInput struct { +// Describes an IPv6 address. +type ScheduledInstancesIpv6Address struct { _ struct{} `type:"structure"` - // Reserved. - AdditionalInfo *string `locationName:"additionalInfo" type:"string"` - - // One or more block device mapping entries. You can't specify both a snapshot - // ID and an encryption value. This is because only blank volumes can be encrypted - // on creation. If a snapshot is the basis for a volume, it is not blank and - // its encryption status is used for the volume encryption status. - BlockDeviceMappings []*BlockDeviceMapping `locationName:"BlockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"` + // The IPv6 address. + Ipv6Address *string `type:"string"` +} - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. For more information, see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - // - // Constraints: Maximum 64 ASCII characters - ClientToken *string `locationName:"clientToken" type:"string"` +// String returns the string representation +func (s ScheduledInstancesIpv6Address) String() string { + return awsutil.Prettify(s) +} - // The CPU options for the instance. For more information, see Optimizing CPU - // Options (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) - // in the Amazon Elastic Compute Cloud User Guide. - CpuOptions *CpuOptionsRequest `type:"structure"` +// GoString returns the string representation +func (s ScheduledInstancesIpv6Address) GoString() string { + return s.String() +} - // The credit option for CPU usage of the instance. Valid values are standard - // and unlimited. To change this attribute after launch, use ModifyInstanceCreditSpecification. - // For more information, see T2 Instances (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-instances.html) - // in the Amazon Elastic Compute Cloud User Guide. - // - // Default: standard - CreditSpecification *CreditSpecificationRequest `type:"structure"` +// SetIpv6Address sets the Ipv6Address field's value. +func (s *ScheduledInstancesIpv6Address) SetIpv6Address(v string) *ScheduledInstancesIpv6Address { + s.Ipv6Address = &v + return s +} - // If you set this parameter to true, you can't terminate the instance using - // the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute - // to false after launch, use ModifyInstanceAttribute. Alternatively, if you - // set InstanceInitiatedShutdownBehavior to terminate, you can terminate the - // instance by running the shutdown command from the instance. - // - // Default: false - DisableApiTermination *bool `locationName:"disableApiTermination" type:"boolean"` +// Describes the launch specification for a Scheduled Instance. +// +// If you are launching the Scheduled Instance in EC2-VPC, you must specify +// the ID of the subnet. You can specify the subnet using either SubnetId or +// NetworkInterface. +type ScheduledInstancesLaunchSpecification 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 `locationName:"dryRun" type:"boolean"` + // One or more block device mapping entries. + BlockDeviceMappings []*ScheduledInstancesBlockDeviceMapping `locationName:"BlockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"` - // Indicates whether the instance is optimized for Amazon EBS I/O. This optimization + // Indicates whether the instances are optimized for EBS I/O. This optimization // provides dedicated throughput to Amazon EBS and an optimized configuration - // stack to provide optimal Amazon EBS I/O performance. This optimization isn't - // available with all instance types. Additional usage charges apply when using - // an EBS-optimized instance. + // stack to provide optimal EBS I/O performance. This optimization isn't available + // with all instance types. Additional usage charges apply when using an EBS-optimized + // instance. // // Default: false - EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"` - - // An elastic GPU to associate with the instance. - ElasticGpuSpecification []*ElasticGpuSpecification `locationNameList:"item" type:"list"` + EbsOptimized *bool `type:"boolean"` // The IAM instance profile. - IamInstanceProfile *IamInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"` - - // The ID of the AMI, which you can get by calling DescribeImages. An AMI is - // required to launch an instance and must be specified here or in a launch - // template. - ImageId *string `type:"string"` - - // Indicates whether an instance stops or terminates when you initiate shutdown - // from the instance (using the operating system command for system shutdown). - // - // Default: stop - InstanceInitiatedShutdownBehavior *string `locationName:"instanceInitiatedShutdownBehavior" type:"string" enum:"ShutdownBehavior"` - - // The market (purchasing) option for the instances. - // - // For RunInstances, persistent Spot Instance requests are only supported when - // InstanceInterruptionBehavior is set to either hibernate or stop. - InstanceMarketOptions *InstanceMarketOptionsRequest `type:"structure"` + IamInstanceProfile *ScheduledInstancesIamInstanceProfile `type:"structure"` - // The instance type. For more information, see Instance Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) - // in the Amazon Elastic Compute Cloud User Guide. + // The ID of the Amazon Machine Image (AMI). // - // Default: m1.small - InstanceType *string `type:"string" enum:"InstanceType"` - - // [EC2-VPC] A number of IPv6 addresses to associate with the primary network - // interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet. - // You cannot specify this option and the option to assign specific IPv6 addresses - // in the same request. You can specify this option if you've specified a minimum - // number of instances to launch. - Ipv6AddressCount *int64 `type:"integer"` + // ImageId is a required field + ImageId *string `type:"string" required:"true"` - // [EC2-VPC] Specify one or more IPv6 addresses from the range of the subnet - // to associate with the primary network interface. You cannot specify this - // option and the option to assign a number of IPv6 addresses in the same request. - // You cannot specify this option if you've specified a minimum number of instances - // to launch. - Ipv6Addresses []*InstanceIpv6Address `locationName:"Ipv6Address" locationNameList:"item" type:"list"` + // The instance type. + InstanceType *string `type:"string"` // The ID of the kernel. - // - // We recommend that you use PV-GRUB instead of kernels and RAM disks. For more - // information, see PV-GRUB (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html) - // in the Amazon Elastic Compute Cloud User Guide. KernelId *string `type:"string"` - // The name of the key pair. You can create a key pair using CreateKeyPair or - // ImportKeyPair. - // - // If you do not specify a key pair, you can't connect to the instance unless - // you choose an AMI that is configured to allow users another way to log in. + // The name of the key pair. KeyName *string `type:"string"` - // The launch template to use to launch the instances. Any parameters that you - // specify in RunInstances override the same parameters in the launch template. - // You can specify either the name or ID of a launch template, but not both. - LaunchTemplate *LaunchTemplateSpecification `type:"structure"` - - // The maximum number of instances to launch. If you specify more instances - // than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches - // the largest possible number of instances above MinCount. - // - // Constraints: Between 1 and the maximum number you're allowed for the specified - // instance type. For more information about the default limits, and how to - // request an increase, see How many instances can I run in Amazon EC2 (http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2) - // in the Amazon EC2 FAQ. - // - // MaxCount is a required field - MaxCount *int64 `type:"integer" required:"true"` - - // The minimum number of instances to launch. If you specify a minimum that - // is more instances than Amazon EC2 can launch in the target Availability Zone, - // Amazon EC2 launches no instances. - // - // Constraints: Between 1 and the maximum number you're allowed for the specified - // instance type. For more information about the default limits, and how to - // request an increase, see How many instances can I run in Amazon EC2 (http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2) - // in the Amazon EC2 General FAQ. - // - // MinCount is a required field - MinCount *int64 `type:"integer" required:"true"` - - // The monitoring for the instance. - Monitoring *RunInstancesMonitoringEnabled `type:"structure"` + // Enable or disable monitoring for the instances. + Monitoring *ScheduledInstancesMonitoring `type:"structure"` // One or more network interfaces. - NetworkInterfaces []*InstanceNetworkInterfaceSpecification `locationName:"networkInterface" locationNameList:"item" type:"list"` - - // The placement for the instance. - Placement *Placement `type:"structure"` + NetworkInterfaces []*ScheduledInstancesNetworkInterface `locationName:"NetworkInterface" locationNameList:"NetworkInterface" type:"list"` - // [EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 - // address range of the subnet. - // - // Only one private IP address can be designated as primary. You can't specify - // this option if you've specified the option to designate a private IP address - // as the primary IP address in a network interface specification. You cannot - // specify this option if you're launching more than one instance in the request. - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` + // The placement information. + Placement *ScheduledInstancesPlacement `type:"structure"` // The ID of the RAM disk. - // - // We recommend that you use PV-GRUB instead of kernels and RAM disks. For more - // information, see PV-GRUB (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html) - // in the Amazon Elastic Compute Cloud User Guide. RamdiskId *string `type:"string"` - // One or more security group IDs. You can create a security group using CreateSecurityGroup. - // - // Default: Amazon EC2 uses the default security group. + // The IDs of one or more security groups. SecurityGroupIds []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"` - // [EC2-Classic, default VPC] One or more security group names. For a nondefault - // VPC, you must use security group IDs instead. - // - // Default: Amazon EC2 uses the default security group. - SecurityGroups []*string `locationName:"SecurityGroup" locationNameList:"SecurityGroup" type:"list"` - - // [EC2-VPC] The ID of the subnet to launch the instance into. + // The ID of the subnet in which to launch the instances. SubnetId *string `type:"string"` - // The tags to apply to the resources during launch. You can only tag instances - // and volumes on launch. The specified tags are applied to all instances or - // volumes that are created during launch. To tag a resource after it has been - // created, see CreateTags. - TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` - - // The user data to make available to the instance. For more information, see - // Running Commands on Your Linux Instance at Launch (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html) - // (Linux) and Adding User Data (http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html#instancedata-add-user-data) - // (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. + // The base64-encoded MIME user data. UserData *string `type:"string"` } // String returns the string representation -func (s RunInstancesInput) String() string { +func (s ScheduledInstancesLaunchSpecification) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s RunInstancesInput) GoString() string { +func (s ScheduledInstancesLaunchSpecification) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *RunInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RunInstancesInput"} - if s.MaxCount == nil { - invalidParams.Add(request.NewErrParamRequired("MaxCount")) - } - if s.MinCount == nil { - invalidParams.Add(request.NewErrParamRequired("MinCount")) - } - if s.CreditSpecification != nil { - if err := s.CreditSpecification.Validate(); err != nil { - invalidParams.AddNested("CreditSpecification", err.(request.ErrInvalidParams)) - } - } - if s.ElasticGpuSpecification != nil { - for i, v := range s.ElasticGpuSpecification { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ElasticGpuSpecification", i), err.(request.ErrInvalidParams)) - } - } - } - if s.Monitoring != nil { - if err := s.Monitoring.Validate(); err != nil { - invalidParams.AddNested("Monitoring", err.(request.ErrInvalidParams)) - } +func (s *ScheduledInstancesLaunchSpecification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ScheduledInstancesLaunchSpecification"} + if s.ImageId == nil { + invalidParams.Add(request.NewErrParamRequired("ImageId")) } if invalidParams.Len() > 0 { @@ -62869,286 +76615,362 @@ func (s *RunInstancesInput) Validate() error { return nil } -// SetAdditionalInfo sets the AdditionalInfo field's value. -func (s *RunInstancesInput) SetAdditionalInfo(v string) *RunInstancesInput { - s.AdditionalInfo = &v +// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. +func (s *ScheduledInstancesLaunchSpecification) SetBlockDeviceMappings(v []*ScheduledInstancesBlockDeviceMapping) *ScheduledInstancesLaunchSpecification { + s.BlockDeviceMappings = v + return s +} + +// SetEbsOptimized sets the EbsOptimized field's value. +func (s *ScheduledInstancesLaunchSpecification) SetEbsOptimized(v bool) *ScheduledInstancesLaunchSpecification { + s.EbsOptimized = &v + return s +} + +// SetIamInstanceProfile sets the IamInstanceProfile field's value. +func (s *ScheduledInstancesLaunchSpecification) SetIamInstanceProfile(v *ScheduledInstancesIamInstanceProfile) *ScheduledInstancesLaunchSpecification { + s.IamInstanceProfile = v + return s +} + +// SetImageId sets the ImageId field's value. +func (s *ScheduledInstancesLaunchSpecification) SetImageId(v string) *ScheduledInstancesLaunchSpecification { + s.ImageId = &v + return s +} + +// SetInstanceType sets the InstanceType field's value. +func (s *ScheduledInstancesLaunchSpecification) SetInstanceType(v string) *ScheduledInstancesLaunchSpecification { + s.InstanceType = &v + return s +} + +// SetKernelId sets the KernelId field's value. +func (s *ScheduledInstancesLaunchSpecification) SetKernelId(v string) *ScheduledInstancesLaunchSpecification { + s.KernelId = &v + return s +} + +// SetKeyName sets the KeyName field's value. +func (s *ScheduledInstancesLaunchSpecification) SetKeyName(v string) *ScheduledInstancesLaunchSpecification { + s.KeyName = &v + return s +} + +// SetMonitoring sets the Monitoring field's value. +func (s *ScheduledInstancesLaunchSpecification) SetMonitoring(v *ScheduledInstancesMonitoring) *ScheduledInstancesLaunchSpecification { + s.Monitoring = v + return s +} + +// SetNetworkInterfaces sets the NetworkInterfaces field's value. +func (s *ScheduledInstancesLaunchSpecification) SetNetworkInterfaces(v []*ScheduledInstancesNetworkInterface) *ScheduledInstancesLaunchSpecification { + s.NetworkInterfaces = v + return s +} + +// SetPlacement sets the Placement field's value. +func (s *ScheduledInstancesLaunchSpecification) SetPlacement(v *ScheduledInstancesPlacement) *ScheduledInstancesLaunchSpecification { + s.Placement = v + return s +} + +// SetRamdiskId sets the RamdiskId field's value. +func (s *ScheduledInstancesLaunchSpecification) SetRamdiskId(v string) *ScheduledInstancesLaunchSpecification { + s.RamdiskId = &v return s } -// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *RunInstancesInput) SetBlockDeviceMappings(v []*BlockDeviceMapping) *RunInstancesInput { - s.BlockDeviceMappings = v - return s -} +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *ScheduledInstancesLaunchSpecification) SetSecurityGroupIds(v []*string) *ScheduledInstancesLaunchSpecification { + s.SecurityGroupIds = v + return s +} + +// SetSubnetId sets the SubnetId field's value. +func (s *ScheduledInstancesLaunchSpecification) SetSubnetId(v string) *ScheduledInstancesLaunchSpecification { + s.SubnetId = &v + return s +} + +// SetUserData sets the UserData field's value. +func (s *ScheduledInstancesLaunchSpecification) SetUserData(v string) *ScheduledInstancesLaunchSpecification { + s.UserData = &v + return s +} + +// Describes whether monitoring is enabled for a Scheduled Instance. +type ScheduledInstancesMonitoring struct { + _ struct{} `type:"structure"` + + // Indicates whether monitoring is enabled. + Enabled *bool `type:"boolean"` +} + +// String returns the string representation +func (s ScheduledInstancesMonitoring) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ScheduledInstancesMonitoring) GoString() string { + return s.String() +} + +// SetEnabled sets the Enabled field's value. +func (s *ScheduledInstancesMonitoring) SetEnabled(v bool) *ScheduledInstancesMonitoring { + s.Enabled = &v + return s +} + +// Describes a network interface for a Scheduled Instance. +type ScheduledInstancesNetworkInterface struct { + _ struct{} `type:"structure"` + + // Indicates whether to assign a public IPv4 address to instances launched in + // a VPC. The public IPv4 address can only be assigned to a network interface + // for eth0, and can only be assigned to a new network interface, not an existing + // one. You cannot specify more than one network interface in the request. If + // launching into a default subnet, the default value is true. + AssociatePublicIpAddress *bool `type:"boolean"` + + // Indicates whether to delete the interface when the instance is terminated. + DeleteOnTermination *bool `type:"boolean"` + + // The description. + Description *string `type:"string"` + + // The index of the device for the network interface attachment. + DeviceIndex *int64 `type:"integer"` + + // The IDs of one or more security groups. + Groups []*string `locationName:"Group" locationNameList:"SecurityGroupId" type:"list"` + + // The number of IPv6 addresses to assign to the network interface. The IPv6 + // addresses are automatically selected from the subnet range. + Ipv6AddressCount *int64 `type:"integer"` -// SetClientToken sets the ClientToken field's value. -func (s *RunInstancesInput) SetClientToken(v string) *RunInstancesInput { - s.ClientToken = &v - return s -} + // One or more specific IPv6 addresses from the subnet range. + Ipv6Addresses []*ScheduledInstancesIpv6Address `locationName:"Ipv6Address" locationNameList:"Ipv6Address" type:"list"` -// SetCpuOptions sets the CpuOptions field's value. -func (s *RunInstancesInput) SetCpuOptions(v *CpuOptionsRequest) *RunInstancesInput { - s.CpuOptions = v - return s -} + // The ID of the network interface. + NetworkInterfaceId *string `type:"string"` -// SetCreditSpecification sets the CreditSpecification field's value. -func (s *RunInstancesInput) SetCreditSpecification(v *CreditSpecificationRequest) *RunInstancesInput { - s.CreditSpecification = v - return s -} + // The IPv4 address of the network interface within the subnet. + PrivateIpAddress *string `type:"string"` -// SetDisableApiTermination sets the DisableApiTermination field's value. -func (s *RunInstancesInput) SetDisableApiTermination(v bool) *RunInstancesInput { - s.DisableApiTermination = &v - return s -} + // The private IPv4 addresses. + PrivateIpAddressConfigs []*ScheduledInstancesPrivateIpAddressConfig `locationName:"PrivateIpAddressConfig" locationNameList:"PrivateIpAddressConfigSet" type:"list"` -// SetDryRun sets the DryRun field's value. -func (s *RunInstancesInput) SetDryRun(v bool) *RunInstancesInput { - s.DryRun = &v - return s + // The number of secondary private IPv4 addresses. + SecondaryPrivateIpAddressCount *int64 `type:"integer"` + + // The ID of the subnet. + SubnetId *string `type:"string"` } -// SetEbsOptimized sets the EbsOptimized field's value. -func (s *RunInstancesInput) SetEbsOptimized(v bool) *RunInstancesInput { - s.EbsOptimized = &v - return s +// String returns the string representation +func (s ScheduledInstancesNetworkInterface) String() string { + return awsutil.Prettify(s) } -// SetElasticGpuSpecification sets the ElasticGpuSpecification field's value. -func (s *RunInstancesInput) SetElasticGpuSpecification(v []*ElasticGpuSpecification) *RunInstancesInput { - s.ElasticGpuSpecification = v - return s +// GoString returns the string representation +func (s ScheduledInstancesNetworkInterface) GoString() string { + return s.String() } -// SetIamInstanceProfile sets the IamInstanceProfile field's value. -func (s *RunInstancesInput) SetIamInstanceProfile(v *IamInstanceProfileSpecification) *RunInstancesInput { - s.IamInstanceProfile = v +// SetAssociatePublicIpAddress sets the AssociatePublicIpAddress field's value. +func (s *ScheduledInstancesNetworkInterface) SetAssociatePublicIpAddress(v bool) *ScheduledInstancesNetworkInterface { + s.AssociatePublicIpAddress = &v return s } -// SetImageId sets the ImageId field's value. -func (s *RunInstancesInput) SetImageId(v string) *RunInstancesInput { - s.ImageId = &v +// SetDeleteOnTermination sets the DeleteOnTermination field's value. +func (s *ScheduledInstancesNetworkInterface) SetDeleteOnTermination(v bool) *ScheduledInstancesNetworkInterface { + s.DeleteOnTermination = &v return s } -// SetInstanceInitiatedShutdownBehavior sets the InstanceInitiatedShutdownBehavior field's value. -func (s *RunInstancesInput) SetInstanceInitiatedShutdownBehavior(v string) *RunInstancesInput { - s.InstanceInitiatedShutdownBehavior = &v +// SetDescription sets the Description field's value. +func (s *ScheduledInstancesNetworkInterface) SetDescription(v string) *ScheduledInstancesNetworkInterface { + s.Description = &v return s } -// SetInstanceMarketOptions sets the InstanceMarketOptions field's value. -func (s *RunInstancesInput) SetInstanceMarketOptions(v *InstanceMarketOptionsRequest) *RunInstancesInput { - s.InstanceMarketOptions = v +// SetDeviceIndex sets the DeviceIndex field's value. +func (s *ScheduledInstancesNetworkInterface) SetDeviceIndex(v int64) *ScheduledInstancesNetworkInterface { + s.DeviceIndex = &v return s } -// SetInstanceType sets the InstanceType field's value. -func (s *RunInstancesInput) SetInstanceType(v string) *RunInstancesInput { - s.InstanceType = &v +// SetGroups sets the Groups field's value. +func (s *ScheduledInstancesNetworkInterface) SetGroups(v []*string) *ScheduledInstancesNetworkInterface { + s.Groups = v return s } // SetIpv6AddressCount sets the Ipv6AddressCount field's value. -func (s *RunInstancesInput) SetIpv6AddressCount(v int64) *RunInstancesInput { +func (s *ScheduledInstancesNetworkInterface) SetIpv6AddressCount(v int64) *ScheduledInstancesNetworkInterface { s.Ipv6AddressCount = &v return s } // SetIpv6Addresses sets the Ipv6Addresses field's value. -func (s *RunInstancesInput) SetIpv6Addresses(v []*InstanceIpv6Address) *RunInstancesInput { +func (s *ScheduledInstancesNetworkInterface) SetIpv6Addresses(v []*ScheduledInstancesIpv6Address) *ScheduledInstancesNetworkInterface { s.Ipv6Addresses = v return s } -// SetKernelId sets the KernelId field's value. -func (s *RunInstancesInput) SetKernelId(v string) *RunInstancesInput { - s.KernelId = &v - return s -} - -// SetKeyName sets the KeyName field's value. -func (s *RunInstancesInput) SetKeyName(v string) *RunInstancesInput { - s.KeyName = &v - return s -} - -// SetLaunchTemplate sets the LaunchTemplate field's value. -func (s *RunInstancesInput) SetLaunchTemplate(v *LaunchTemplateSpecification) *RunInstancesInput { - s.LaunchTemplate = v - return s -} - -// SetMaxCount sets the MaxCount field's value. -func (s *RunInstancesInput) SetMaxCount(v int64) *RunInstancesInput { - s.MaxCount = &v +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *ScheduledInstancesNetworkInterface) SetNetworkInterfaceId(v string) *ScheduledInstancesNetworkInterface { + s.NetworkInterfaceId = &v return s } -// SetMinCount sets the MinCount field's value. -func (s *RunInstancesInput) SetMinCount(v int64) *RunInstancesInput { - s.MinCount = &v +// SetPrivateIpAddress sets the PrivateIpAddress field's value. +func (s *ScheduledInstancesNetworkInterface) SetPrivateIpAddress(v string) *ScheduledInstancesNetworkInterface { + s.PrivateIpAddress = &v return s } -// SetMonitoring sets the Monitoring field's value. -func (s *RunInstancesInput) SetMonitoring(v *RunInstancesMonitoringEnabled) *RunInstancesInput { - s.Monitoring = v +// SetPrivateIpAddressConfigs sets the PrivateIpAddressConfigs field's value. +func (s *ScheduledInstancesNetworkInterface) SetPrivateIpAddressConfigs(v []*ScheduledInstancesPrivateIpAddressConfig) *ScheduledInstancesNetworkInterface { + s.PrivateIpAddressConfigs = v return s } -// SetNetworkInterfaces sets the NetworkInterfaces field's value. -func (s *RunInstancesInput) SetNetworkInterfaces(v []*InstanceNetworkInterfaceSpecification) *RunInstancesInput { - s.NetworkInterfaces = v +// SetSecondaryPrivateIpAddressCount sets the SecondaryPrivateIpAddressCount field's value. +func (s *ScheduledInstancesNetworkInterface) SetSecondaryPrivateIpAddressCount(v int64) *ScheduledInstancesNetworkInterface { + s.SecondaryPrivateIpAddressCount = &v return s } -// SetPlacement sets the Placement field's value. -func (s *RunInstancesInput) SetPlacement(v *Placement) *RunInstancesInput { - s.Placement = v +// SetSubnetId sets the SubnetId field's value. +func (s *ScheduledInstancesNetworkInterface) SetSubnetId(v string) *ScheduledInstancesNetworkInterface { + s.SubnetId = &v return s } -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *RunInstancesInput) SetPrivateIpAddress(v string) *RunInstancesInput { - s.PrivateIpAddress = &v - return s -} +// Describes the placement for a Scheduled Instance. +type ScheduledInstancesPlacement struct { + _ struct{} `type:"structure"` -// SetRamdiskId sets the RamdiskId field's value. -func (s *RunInstancesInput) SetRamdiskId(v string) *RunInstancesInput { - s.RamdiskId = &v - return s -} + // The Availability Zone. + AvailabilityZone *string `type:"string"` -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *RunInstancesInput) SetSecurityGroupIds(v []*string) *RunInstancesInput { - s.SecurityGroupIds = v - return s + // The name of the placement group. + GroupName *string `type:"string"` } -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *RunInstancesInput) SetSecurityGroups(v []*string) *RunInstancesInput { - s.SecurityGroups = v - return s +// String returns the string representation +func (s ScheduledInstancesPlacement) String() string { + return awsutil.Prettify(s) } -// SetSubnetId sets the SubnetId field's value. -func (s *RunInstancesInput) SetSubnetId(v string) *RunInstancesInput { - s.SubnetId = &v - return s +// GoString returns the string representation +func (s ScheduledInstancesPlacement) GoString() string { + return s.String() } -// SetTagSpecifications sets the TagSpecifications field's value. -func (s *RunInstancesInput) SetTagSpecifications(v []*TagSpecification) *RunInstancesInput { - s.TagSpecifications = v +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *ScheduledInstancesPlacement) SetAvailabilityZone(v string) *ScheduledInstancesPlacement { + s.AvailabilityZone = &v return s } -// SetUserData sets the UserData field's value. -func (s *RunInstancesInput) SetUserData(v string) *RunInstancesInput { - s.UserData = &v +// SetGroupName sets the GroupName field's value. +func (s *ScheduledInstancesPlacement) SetGroupName(v string) *ScheduledInstancesPlacement { + s.GroupName = &v return s } -// Describes the monitoring of an instance. -type RunInstancesMonitoringEnabled struct { +// Describes a private IPv4 address for a Scheduled Instance. +type ScheduledInstancesPrivateIpAddressConfig struct { _ struct{} `type:"structure"` - // Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring - // is enabled. - // - // Enabled is a required field - Enabled *bool `locationName:"enabled" type:"boolean" required:"true"` + // Indicates whether this is a primary IPv4 address. Otherwise, this is a secondary + // IPv4 address. + Primary *bool `type:"boolean"` + + // The IPv4 address. + PrivateIpAddress *string `type:"string"` } // String returns the string representation -func (s RunInstancesMonitoringEnabled) String() string { +func (s ScheduledInstancesPrivateIpAddressConfig) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s RunInstancesMonitoringEnabled) GoString() string { +func (s ScheduledInstancesPrivateIpAddressConfig) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *RunInstancesMonitoringEnabled) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RunInstancesMonitoringEnabled"} - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetPrimary sets the Primary field's value. +func (s *ScheduledInstancesPrivateIpAddressConfig) SetPrimary(v bool) *ScheduledInstancesPrivateIpAddressConfig { + s.Primary = &v + return s } -// SetEnabled sets the Enabled field's value. -func (s *RunInstancesMonitoringEnabled) SetEnabled(v bool) *RunInstancesMonitoringEnabled { - s.Enabled = &v +// SetPrivateIpAddress sets the PrivateIpAddress field's value. +func (s *ScheduledInstancesPrivateIpAddressConfig) SetPrivateIpAddress(v string) *ScheduledInstancesPrivateIpAddressConfig { + s.PrivateIpAddress = &v return s } -// Contains the parameters for RunScheduledInstances. -type RunScheduledInstancesInput struct { +type SearchTransitGatewayRoutesInput struct { _ struct{} `type:"structure"` - // Unique, case-sensitive identifier that ensures the idempotency of the request. - // For more information, see Ensuring Idempotency (http://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 number of instances. + // One or more filters. The possible values are: // - // Default: 1 - InstanceCount *int64 `type:"integer"` - - // The launch specification. You must match the instance type, Availability - // Zone, network, and platform of the schedule that you purchased. + // * transit-gateway-route-destination-cidr-block - The CIDR range. // - // LaunchSpecification is a required field - LaunchSpecification *ScheduledInstancesLaunchSpecification `type:"structure" required:"true"` + // * transit-gateway-route-state - The state of the route (active | blackhole). + // + // * transit-gateway-route-transit-gateway-attachment-id - The ID of the + // attachment. + // + // * transit-gateway-route-type - The route type (static | propagated). + // + // Filters is a required field + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list" required:"true"` - // The Scheduled Instance ID. + // The maximum number of routes to return. + MaxResults *int64 `min:"5" type:"integer"` + + // The ID of the transit gateway route table. // - // ScheduledInstanceId is a required field - ScheduledInstanceId *string `type:"string" required:"true"` + // TransitGatewayRouteTableId is a required field + TransitGatewayRouteTableId *string `type:"string" required:"true"` } // String returns the string representation -func (s RunScheduledInstancesInput) String() string { +func (s SearchTransitGatewayRoutesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s RunScheduledInstancesInput) GoString() string { +func (s SearchTransitGatewayRoutesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *RunScheduledInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RunScheduledInstancesInput"} - if s.LaunchSpecification == nil { - invalidParams.Add(request.NewErrParamRequired("LaunchSpecification")) +func (s *SearchTransitGatewayRoutesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SearchTransitGatewayRoutesInput"} + if s.Filters == nil { + invalidParams.Add(request.NewErrParamRequired("Filters")) } - if s.ScheduledInstanceId == nil { - invalidParams.Add(request.NewErrParamRequired("ScheduledInstanceId")) + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) } - if s.LaunchSpecification != nil { - if err := s.LaunchSpecification.Validate(); err != nil { - invalidParams.AddNested("LaunchSpecification", err.(request.ErrInvalidParams)) - } + if s.TransitGatewayRouteTableId == nil { + invalidParams.Add(request.NewErrParamRequired("TransitGatewayRouteTableId")) } if invalidParams.Len() > 0 { @@ -63157,2511 +76979,2556 @@ func (s *RunScheduledInstancesInput) Validate() error { return nil } -// SetClientToken sets the ClientToken field's value. -func (s *RunScheduledInstancesInput) SetClientToken(v string) *RunScheduledInstancesInput { - s.ClientToken = &v - return s -} - // SetDryRun sets the DryRun field's value. -func (s *RunScheduledInstancesInput) SetDryRun(v bool) *RunScheduledInstancesInput { +func (s *SearchTransitGatewayRoutesInput) SetDryRun(v bool) *SearchTransitGatewayRoutesInput { s.DryRun = &v return s } -// SetInstanceCount sets the InstanceCount field's value. -func (s *RunScheduledInstancesInput) SetInstanceCount(v int64) *RunScheduledInstancesInput { - s.InstanceCount = &v +// SetFilters sets the Filters field's value. +func (s *SearchTransitGatewayRoutesInput) SetFilters(v []*Filter) *SearchTransitGatewayRoutesInput { + s.Filters = v return s } -// SetLaunchSpecification sets the LaunchSpecification field's value. -func (s *RunScheduledInstancesInput) SetLaunchSpecification(v *ScheduledInstancesLaunchSpecification) *RunScheduledInstancesInput { - s.LaunchSpecification = v +// SetMaxResults sets the MaxResults field's value. +func (s *SearchTransitGatewayRoutesInput) SetMaxResults(v int64) *SearchTransitGatewayRoutesInput { + s.MaxResults = &v return s } -// SetScheduledInstanceId sets the ScheduledInstanceId field's value. -func (s *RunScheduledInstancesInput) SetScheduledInstanceId(v string) *RunScheduledInstancesInput { - s.ScheduledInstanceId = &v +// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. +func (s *SearchTransitGatewayRoutesInput) SetTransitGatewayRouteTableId(v string) *SearchTransitGatewayRoutesInput { + s.TransitGatewayRouteTableId = &v return s } -// Contains the output of RunScheduledInstances. -type RunScheduledInstancesOutput struct { +type SearchTransitGatewayRoutesOutput struct { _ struct{} `type:"structure"` - // The IDs of the newly launched instances. - InstanceIdSet []*string `locationName:"instanceIdSet" locationNameList:"item" type:"list"` + // Indicates whether there are additional routes available. + AdditionalRoutesAvailable *bool `locationName:"additionalRoutesAvailable" type:"boolean"` + + // Information about the routes. + Routes []*TransitGatewayRoute `locationName:"routeSet" locationNameList:"item" type:"list"` } // String returns the string representation -func (s RunScheduledInstancesOutput) String() string { +func (s SearchTransitGatewayRoutesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s RunScheduledInstancesOutput) GoString() string { +func (s SearchTransitGatewayRoutesOutput) GoString() string { return s.String() } -// SetInstanceIdSet sets the InstanceIdSet field's value. -func (s *RunScheduledInstancesOutput) SetInstanceIdSet(v []*string) *RunScheduledInstancesOutput { - s.InstanceIdSet = v +// SetAdditionalRoutesAvailable sets the AdditionalRoutesAvailable field's value. +func (s *SearchTransitGatewayRoutesOutput) SetAdditionalRoutesAvailable(v bool) *SearchTransitGatewayRoutesOutput { + s.AdditionalRoutesAvailable = &v return s } -// Describes the storage parameters for S3 and S3 buckets for an instance store-backed -// AMI. -type S3Storage struct { +// SetRoutes sets the Routes field's value. +func (s *SearchTransitGatewayRoutesOutput) SetRoutes(v []*TransitGatewayRoute) *SearchTransitGatewayRoutesOutput { + s.Routes = v + return s +} + +// Describes a security group +type SecurityGroup struct { _ struct{} `type:"structure"` - // The access key ID of the owner of the bucket. Before you specify a value - // for your access key ID, review and follow the guidance in Best Practices - // for Managing AWS Access Keys (http://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html). - AWSAccessKeyId *string `type:"string"` + // A description of the security group. + Description *string `locationName:"groupDescription" type:"string"` - // The bucket in which to store the AMI. You can specify a bucket that you already - // own or a new bucket that Amazon EC2 creates on your behalf. If you specify - // a bucket that belongs to someone else, Amazon EC2 returns an error. - Bucket *string `locationName:"bucket" type:"string"` + // The ID of the security group. + GroupId *string `locationName:"groupId" type:"string"` - // The beginning of the file name of the AMI. - Prefix *string `locationName:"prefix" type:"string"` + // The name of the security group. + GroupName *string `locationName:"groupName" type:"string"` - // An Amazon S3 upload policy that gives Amazon EC2 permission to upload items - // into Amazon S3 on your behalf. - // - // UploadPolicy is automatically base64 encoded/decoded by the SDK. - UploadPolicy []byte `locationName:"uploadPolicy" type:"blob"` + // One or more inbound rules associated with the security group. + IpPermissions []*IpPermission `locationName:"ipPermissions" locationNameList:"item" type:"list"` - // The signature of the JSON document. - UploadPolicySignature *string `locationName:"uploadPolicySignature" type:"string"` + // [EC2-VPC] One or more 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. + OwnerId *string `locationName:"ownerId" type:"string"` + + // Any tags assigned to the security group. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + + // [EC2-VPC] The ID of the VPC for the security group. + VpcId *string `locationName:"vpcId" type:"string"` } // String returns the string representation -func (s S3Storage) String() string { +func (s SecurityGroup) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s S3Storage) GoString() string { +func (s SecurityGroup) GoString() string { return s.String() } -// SetAWSAccessKeyId sets the AWSAccessKeyId field's value. -func (s *S3Storage) SetAWSAccessKeyId(v string) *S3Storage { - s.AWSAccessKeyId = &v +// SetDescription sets the Description field's value. +func (s *SecurityGroup) SetDescription(v string) *SecurityGroup { + s.Description = &v return s } -// SetBucket sets the Bucket field's value. -func (s *S3Storage) SetBucket(v string) *S3Storage { - s.Bucket = &v +// SetGroupId sets the GroupId field's value. +func (s *SecurityGroup) SetGroupId(v string) *SecurityGroup { + s.GroupId = &v return s } -// SetPrefix sets the Prefix field's value. -func (s *S3Storage) SetPrefix(v string) *S3Storage { - s.Prefix = &v +// SetGroupName sets the GroupName field's value. +func (s *SecurityGroup) SetGroupName(v string) *SecurityGroup { + s.GroupName = &v return s } -// SetUploadPolicy sets the UploadPolicy field's value. -func (s *S3Storage) SetUploadPolicy(v []byte) *S3Storage { - s.UploadPolicy = v +// SetIpPermissions sets the IpPermissions field's value. +func (s *SecurityGroup) SetIpPermissions(v []*IpPermission) *SecurityGroup { + s.IpPermissions = v return s } -// SetUploadPolicySignature sets the UploadPolicySignature field's value. -func (s *S3Storage) SetUploadPolicySignature(v string) *S3Storage { - s.UploadPolicySignature = &v +// SetIpPermissionsEgress sets the IpPermissionsEgress field's value. +func (s *SecurityGroup) SetIpPermissionsEgress(v []*IpPermission) *SecurityGroup { + s.IpPermissionsEgress = v return s } -// Describes a Scheduled Instance. -type ScheduledInstance struct { - _ struct{} `type:"structure"` - - // The Availability Zone. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The date when the Scheduled Instance was purchased. - CreateDate *time.Time `locationName:"createDate" type:"timestamp"` - - // The hourly price for a single instance. - HourlyPrice *string `locationName:"hourlyPrice" type:"string"` - - // The number of instances. - InstanceCount *int64 `locationName:"instanceCount" type:"integer"` - - // The instance type. - InstanceType *string `locationName:"instanceType" type:"string"` - - // The network platform (EC2-Classic or EC2-VPC). - NetworkPlatform *string `locationName:"networkPlatform" type:"string"` - - // The time for the next schedule to start. - NextSlotStartTime *time.Time `locationName:"nextSlotStartTime" type:"timestamp"` - - // The platform (Linux/UNIX or Windows). - Platform *string `locationName:"platform" type:"string"` - - // The time that the previous schedule ended or will end. - PreviousSlotEndTime *time.Time `locationName:"previousSlotEndTime" type:"timestamp"` - - // The schedule recurrence. - Recurrence *ScheduledInstanceRecurrence `locationName:"recurrence" type:"structure"` +// SetOwnerId sets the OwnerId field's value. +func (s *SecurityGroup) SetOwnerId(v string) *SecurityGroup { + s.OwnerId = &v + return s +} - // The Scheduled Instance ID. - ScheduledInstanceId *string `locationName:"scheduledInstanceId" type:"string"` +// SetTags sets the Tags field's value. +func (s *SecurityGroup) SetTags(v []*Tag) *SecurityGroup { + s.Tags = v + return s +} - // The number of hours in the schedule. - SlotDurationInHours *int64 `locationName:"slotDurationInHours" type:"integer"` +// SetVpcId sets the VpcId field's value. +func (s *SecurityGroup) SetVpcId(v string) *SecurityGroup { + s.VpcId = &v + return s +} - // The end date for the Scheduled Instance. - TermEndDate *time.Time `locationName:"termEndDate" type:"timestamp"` +// Describes a security group. +type SecurityGroupIdentifier struct { + _ struct{} `type:"structure"` - // The start date for the Scheduled Instance. - TermStartDate *time.Time `locationName:"termStartDate" type:"timestamp"` + // The ID of the security group. + GroupId *string `locationName:"groupId" type:"string"` - // The total number of hours for a single instance for the entire term. - TotalScheduledInstanceHours *int64 `locationName:"totalScheduledInstanceHours" type:"integer"` + // The name of the security group. + GroupName *string `locationName:"groupName" type:"string"` } // String returns the string representation -func (s ScheduledInstance) String() string { +func (s SecurityGroupIdentifier) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ScheduledInstance) GoString() string { +func (s SecurityGroupIdentifier) GoString() string { return s.String() } -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *ScheduledInstance) SetAvailabilityZone(v string) *ScheduledInstance { - s.AvailabilityZone = &v - return s -} - -// SetCreateDate sets the CreateDate field's value. -func (s *ScheduledInstance) SetCreateDate(v time.Time) *ScheduledInstance { - s.CreateDate = &v - return s -} - -// SetHourlyPrice sets the HourlyPrice field's value. -func (s *ScheduledInstance) SetHourlyPrice(v string) *ScheduledInstance { - s.HourlyPrice = &v - return s -} - -// SetInstanceCount sets the InstanceCount field's value. -func (s *ScheduledInstance) SetInstanceCount(v int64) *ScheduledInstance { - s.InstanceCount = &v - return s -} - -// SetInstanceType sets the InstanceType field's value. -func (s *ScheduledInstance) SetInstanceType(v string) *ScheduledInstance { - s.InstanceType = &v +// SetGroupId sets the GroupId field's value. +func (s *SecurityGroupIdentifier) SetGroupId(v string) *SecurityGroupIdentifier { + s.GroupId = &v return s } -// SetNetworkPlatform sets the NetworkPlatform field's value. -func (s *ScheduledInstance) SetNetworkPlatform(v string) *ScheduledInstance { - s.NetworkPlatform = &v +// SetGroupName sets the GroupName field's value. +func (s *SecurityGroupIdentifier) SetGroupName(v string) *SecurityGroupIdentifier { + s.GroupName = &v return s } -// SetNextSlotStartTime sets the NextSlotStartTime field's value. -func (s *ScheduledInstance) SetNextSlotStartTime(v time.Time) *ScheduledInstance { - s.NextSlotStartTime = &v - return s -} +// Describes a VPC with a security group that references your security group. +type SecurityGroupReference struct { + _ struct{} `type:"structure"` -// SetPlatform sets the Platform field's value. -func (s *ScheduledInstance) SetPlatform(v string) *ScheduledInstance { - s.Platform = &v - return s -} + // The ID of your security group. + GroupId *string `locationName:"groupId" type:"string"` -// SetPreviousSlotEndTime sets the PreviousSlotEndTime field's value. -func (s *ScheduledInstance) SetPreviousSlotEndTime(v time.Time) *ScheduledInstance { - s.PreviousSlotEndTime = &v - return s -} + // The ID of the VPC with the referencing security group. + ReferencingVpcId *string `locationName:"referencingVpcId" type:"string"` -// SetRecurrence sets the Recurrence field's value. -func (s *ScheduledInstance) SetRecurrence(v *ScheduledInstanceRecurrence) *ScheduledInstance { - s.Recurrence = v - return s + // The ID of the VPC peering connection. + VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string"` } -// SetScheduledInstanceId sets the ScheduledInstanceId field's value. -func (s *ScheduledInstance) SetScheduledInstanceId(v string) *ScheduledInstance { - s.ScheduledInstanceId = &v - return s +// String returns the string representation +func (s SecurityGroupReference) String() string { + return awsutil.Prettify(s) } -// SetSlotDurationInHours sets the SlotDurationInHours field's value. -func (s *ScheduledInstance) SetSlotDurationInHours(v int64) *ScheduledInstance { - s.SlotDurationInHours = &v - return s +// GoString returns the string representation +func (s SecurityGroupReference) GoString() string { + return s.String() } -// SetTermEndDate sets the TermEndDate field's value. -func (s *ScheduledInstance) SetTermEndDate(v time.Time) *ScheduledInstance { - s.TermEndDate = &v +// SetGroupId sets the GroupId field's value. +func (s *SecurityGroupReference) SetGroupId(v string) *SecurityGroupReference { + s.GroupId = &v return s } -// SetTermStartDate sets the TermStartDate field's value. -func (s *ScheduledInstance) SetTermStartDate(v time.Time) *ScheduledInstance { - s.TermStartDate = &v +// SetReferencingVpcId sets the ReferencingVpcId field's value. +func (s *SecurityGroupReference) SetReferencingVpcId(v string) *SecurityGroupReference { + s.ReferencingVpcId = &v return s } -// SetTotalScheduledInstanceHours sets the TotalScheduledInstanceHours field's value. -func (s *ScheduledInstance) SetTotalScheduledInstanceHours(v int64) *ScheduledInstance { - s.TotalScheduledInstanceHours = &v +// SetVpcPeeringConnectionId sets the VpcPeeringConnectionId field's value. +func (s *SecurityGroupReference) SetVpcPeeringConnectionId(v string) *SecurityGroupReference { + s.VpcPeeringConnectionId = &v return s } -// Describes a schedule that is available for your Scheduled Instances. -type ScheduledInstanceAvailability struct { +// Describes a service configuration for a VPC endpoint service. +type ServiceConfiguration struct { _ struct{} `type:"structure"` - // The Availability Zone. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The number of available instances. - AvailableInstanceCount *int64 `locationName:"availableInstanceCount" type:"integer"` - - // The time period for the first schedule to start. - FirstSlotStartTime *time.Time `locationName:"firstSlotStartTime" type:"timestamp"` - - // The hourly price for a single instance. - HourlyPrice *string `locationName:"hourlyPrice" type:"string"` - - // The instance type. You can specify one of the C3, C4, M4, or R3 instance - // types. - InstanceType *string `locationName:"instanceType" type:"string"` + // Indicates whether requests from other AWS accounts to create an endpoint + // to the service must first be accepted. + AcceptanceRequired *bool `locationName:"acceptanceRequired" type:"boolean"` - // The maximum term. The only possible value is 365 days. - MaxTermDurationInDays *int64 `locationName:"maxTermDurationInDays" type:"integer"` + // In the Availability Zones in which the service is available. + AvailabilityZones []*string `locationName:"availabilityZoneSet" locationNameList:"item" type:"list"` - // The minimum term. The only possible value is 365 days. - MinTermDurationInDays *int64 `locationName:"minTermDurationInDays" type:"integer"` + // The DNS names for the service. + BaseEndpointDnsNames []*string `locationName:"baseEndpointDnsNameSet" locationNameList:"item" type:"list"` - // The network platform (EC2-Classic or EC2-VPC). - NetworkPlatform *string `locationName:"networkPlatform" type:"string"` + // The Amazon Resource Names (ARNs) of the Network Load Balancers for the service. + NetworkLoadBalancerArns []*string `locationName:"networkLoadBalancerArnSet" locationNameList:"item" type:"list"` - // The platform (Linux/UNIX or Windows). - Platform *string `locationName:"platform" type:"string"` + // The private DNS name for the service. + PrivateDnsName *string `locationName:"privateDnsName" type:"string"` - // The purchase token. This token expires in two hours. - PurchaseToken *string `locationName:"purchaseToken" type:"string"` + // The ID of the service. + ServiceId *string `locationName:"serviceId" type:"string"` - // The schedule recurrence. - Recurrence *ScheduledInstanceRecurrence `locationName:"recurrence" type:"structure"` + // The name of the service. + ServiceName *string `locationName:"serviceName" type:"string"` - // The number of hours in the schedule. - SlotDurationInHours *int64 `locationName:"slotDurationInHours" type:"integer"` + // The service state. + ServiceState *string `locationName:"serviceState" type:"string" enum:"ServiceState"` - // The total number of hours for a single instance for the entire term. - TotalScheduledInstanceHours *int64 `locationName:"totalScheduledInstanceHours" type:"integer"` + // The type of service. + ServiceType []*ServiceTypeDetail `locationName:"serviceType" locationNameList:"item" type:"list"` } // String returns the string representation -func (s ScheduledInstanceAvailability) String() string { +func (s ServiceConfiguration) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ScheduledInstanceAvailability) GoString() string { +func (s ServiceConfiguration) GoString() string { return s.String() } -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *ScheduledInstanceAvailability) SetAvailabilityZone(v string) *ScheduledInstanceAvailability { - s.AvailabilityZone = &v - return s -} - -// SetAvailableInstanceCount sets the AvailableInstanceCount field's value. -func (s *ScheduledInstanceAvailability) SetAvailableInstanceCount(v int64) *ScheduledInstanceAvailability { - s.AvailableInstanceCount = &v +// SetAcceptanceRequired sets the AcceptanceRequired field's value. +func (s *ServiceConfiguration) SetAcceptanceRequired(v bool) *ServiceConfiguration { + s.AcceptanceRequired = &v return s } -// SetFirstSlotStartTime sets the FirstSlotStartTime field's value. -func (s *ScheduledInstanceAvailability) SetFirstSlotStartTime(v time.Time) *ScheduledInstanceAvailability { - s.FirstSlotStartTime = &v +// SetAvailabilityZones sets the AvailabilityZones field's value. +func (s *ServiceConfiguration) SetAvailabilityZones(v []*string) *ServiceConfiguration { + s.AvailabilityZones = v return s } -// SetHourlyPrice sets the HourlyPrice field's value. -func (s *ScheduledInstanceAvailability) SetHourlyPrice(v string) *ScheduledInstanceAvailability { - s.HourlyPrice = &v +// SetBaseEndpointDnsNames sets the BaseEndpointDnsNames field's value. +func (s *ServiceConfiguration) SetBaseEndpointDnsNames(v []*string) *ServiceConfiguration { + s.BaseEndpointDnsNames = v return s } -// SetInstanceType sets the InstanceType field's value. -func (s *ScheduledInstanceAvailability) SetInstanceType(v string) *ScheduledInstanceAvailability { - s.InstanceType = &v +// SetNetworkLoadBalancerArns sets the NetworkLoadBalancerArns field's value. +func (s *ServiceConfiguration) SetNetworkLoadBalancerArns(v []*string) *ServiceConfiguration { + s.NetworkLoadBalancerArns = v return s } -// SetMaxTermDurationInDays sets the MaxTermDurationInDays field's value. -func (s *ScheduledInstanceAvailability) SetMaxTermDurationInDays(v int64) *ScheduledInstanceAvailability { - s.MaxTermDurationInDays = &v +// SetPrivateDnsName sets the PrivateDnsName field's value. +func (s *ServiceConfiguration) SetPrivateDnsName(v string) *ServiceConfiguration { + s.PrivateDnsName = &v return s } -// SetMinTermDurationInDays sets the MinTermDurationInDays field's value. -func (s *ScheduledInstanceAvailability) SetMinTermDurationInDays(v int64) *ScheduledInstanceAvailability { - s.MinTermDurationInDays = &v +// SetServiceId sets the ServiceId field's value. +func (s *ServiceConfiguration) SetServiceId(v string) *ServiceConfiguration { + s.ServiceId = &v return s } -// SetNetworkPlatform sets the NetworkPlatform field's value. -func (s *ScheduledInstanceAvailability) SetNetworkPlatform(v string) *ScheduledInstanceAvailability { - s.NetworkPlatform = &v +// SetServiceName sets the ServiceName field's value. +func (s *ServiceConfiguration) SetServiceName(v string) *ServiceConfiguration { + s.ServiceName = &v return s } -// SetPlatform sets the Platform field's value. -func (s *ScheduledInstanceAvailability) SetPlatform(v string) *ScheduledInstanceAvailability { - s.Platform = &v +// SetServiceState sets the ServiceState field's value. +func (s *ServiceConfiguration) SetServiceState(v string) *ServiceConfiguration { + s.ServiceState = &v return s } -// SetPurchaseToken sets the PurchaseToken field's value. -func (s *ScheduledInstanceAvailability) SetPurchaseToken(v string) *ScheduledInstanceAvailability { - s.PurchaseToken = &v +// SetServiceType sets the ServiceType field's value. +func (s *ServiceConfiguration) SetServiceType(v []*ServiceTypeDetail) *ServiceConfiguration { + s.ServiceType = v return s } -// SetRecurrence sets the Recurrence field's value. -func (s *ScheduledInstanceAvailability) SetRecurrence(v *ScheduledInstanceRecurrence) *ScheduledInstanceAvailability { - s.Recurrence = v - return s -} +// Describes a VPC endpoint service. +type ServiceDetail struct { + _ struct{} `type:"structure"` -// SetSlotDurationInHours sets the SlotDurationInHours field's value. -func (s *ScheduledInstanceAvailability) SetSlotDurationInHours(v int64) *ScheduledInstanceAvailability { - s.SlotDurationInHours = &v - return s -} + // Indicates whether VPC endpoint connection requests to the service must be + // accepted by the service owner. + AcceptanceRequired *bool `locationName:"acceptanceRequired" type:"boolean"` -// SetTotalScheduledInstanceHours sets the TotalScheduledInstanceHours field's value. -func (s *ScheduledInstanceAvailability) SetTotalScheduledInstanceHours(v int64) *ScheduledInstanceAvailability { - s.TotalScheduledInstanceHours = &v - return s -} + // The Availability Zones in which the service is available. + AvailabilityZones []*string `locationName:"availabilityZoneSet" locationNameList:"item" type:"list"` -// Describes the recurring schedule for a Scheduled Instance. -type ScheduledInstanceRecurrence struct { - _ struct{} `type:"structure"` + // The DNS names for the service. + BaseEndpointDnsNames []*string `locationName:"baseEndpointDnsNameSet" locationNameList:"item" type:"list"` - // The frequency (Daily, Weekly, or Monthly). - Frequency *string `locationName:"frequency" type:"string"` + // The AWS account ID of the service owner. + Owner *string `locationName:"owner" type:"string"` - // The interval quantity. The interval unit depends on the value of frequency. - // For example, every 2 weeks or every 2 months. - Interval *int64 `locationName:"interval" type:"integer"` + // The private DNS name for the service. + PrivateDnsName *string `locationName:"privateDnsName" type:"string"` - // The days. For a monthly schedule, this is one or more days of the month (1-31). - // For a weekly schedule, this is one or more days of the week (1-7, where 1 - // is Sunday). - OccurrenceDaySet []*int64 `locationName:"occurrenceDaySet" locationNameList:"item" type:"list"` + // The Amazon Resource Name (ARN) of the service. + ServiceName *string `locationName:"serviceName" type:"string"` - // Indicates whether the occurrence is relative to the end of the specified - // week or month. - OccurrenceRelativeToEnd *bool `locationName:"occurrenceRelativeToEnd" type:"boolean"` + // The type of service. + ServiceType []*ServiceTypeDetail `locationName:"serviceType" locationNameList:"item" type:"list"` - // The unit for occurrenceDaySet (DayOfWeek or DayOfMonth). - OccurrenceUnit *string `locationName:"occurrenceUnit" type:"string"` + // Indicates whether the service supports endpoint policies. + VpcEndpointPolicySupported *bool `locationName:"vpcEndpointPolicySupported" type:"boolean"` } // String returns the string representation -func (s ScheduledInstanceRecurrence) String() string { +func (s ServiceDetail) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ScheduledInstanceRecurrence) GoString() string { +func (s ServiceDetail) GoString() string { return s.String() } -// SetFrequency sets the Frequency field's value. -func (s *ScheduledInstanceRecurrence) SetFrequency(v string) *ScheduledInstanceRecurrence { - s.Frequency = &v +// SetAcceptanceRequired sets the AcceptanceRequired field's value. +func (s *ServiceDetail) SetAcceptanceRequired(v bool) *ServiceDetail { + s.AcceptanceRequired = &v return s } -// SetInterval sets the Interval field's value. -func (s *ScheduledInstanceRecurrence) SetInterval(v int64) *ScheduledInstanceRecurrence { - s.Interval = &v +// SetAvailabilityZones sets the AvailabilityZones field's value. +func (s *ServiceDetail) SetAvailabilityZones(v []*string) *ServiceDetail { + s.AvailabilityZones = v return s } -// SetOccurrenceDaySet sets the OccurrenceDaySet field's value. -func (s *ScheduledInstanceRecurrence) SetOccurrenceDaySet(v []*int64) *ScheduledInstanceRecurrence { - s.OccurrenceDaySet = v +// SetBaseEndpointDnsNames sets the BaseEndpointDnsNames field's value. +func (s *ServiceDetail) SetBaseEndpointDnsNames(v []*string) *ServiceDetail { + s.BaseEndpointDnsNames = v return s } -// SetOccurrenceRelativeToEnd sets the OccurrenceRelativeToEnd field's value. -func (s *ScheduledInstanceRecurrence) SetOccurrenceRelativeToEnd(v bool) *ScheduledInstanceRecurrence { - s.OccurrenceRelativeToEnd = &v +// SetOwner sets the Owner field's value. +func (s *ServiceDetail) SetOwner(v string) *ServiceDetail { + s.Owner = &v return s } -// SetOccurrenceUnit sets the OccurrenceUnit field's value. -func (s *ScheduledInstanceRecurrence) SetOccurrenceUnit(v string) *ScheduledInstanceRecurrence { - s.OccurrenceUnit = &v +// SetPrivateDnsName sets the PrivateDnsName field's value. +func (s *ServiceDetail) SetPrivateDnsName(v string) *ServiceDetail { + s.PrivateDnsName = &v return s } -// Describes the recurring schedule for a Scheduled Instance. -type ScheduledInstanceRecurrenceRequest struct { - _ struct{} `type:"structure"` - - // The frequency (Daily, Weekly, or Monthly). - Frequency *string `type:"string"` +// SetServiceName sets the ServiceName field's value. +func (s *ServiceDetail) SetServiceName(v string) *ServiceDetail { + s.ServiceName = &v + return s +} - // The interval quantity. The interval unit depends on the value of Frequency. - // For example, every 2 weeks or every 2 months. - Interval *int64 `type:"integer"` +// SetServiceType sets the ServiceType field's value. +func (s *ServiceDetail) SetServiceType(v []*ServiceTypeDetail) *ServiceDetail { + s.ServiceType = v + return s +} - // The days. For a monthly schedule, this is one or more days of the month (1-31). - // For a weekly schedule, this is one or more days of the week (1-7, where 1 - // is Sunday). You can't specify this value with a daily schedule. If the occurrence - // is relative to the end of the month, you can specify only a single day. - OccurrenceDays []*int64 `locationName:"OccurrenceDay" locationNameList:"OccurenceDay" type:"list"` +// SetVpcEndpointPolicySupported sets the VpcEndpointPolicySupported field's value. +func (s *ServiceDetail) SetVpcEndpointPolicySupported(v bool) *ServiceDetail { + s.VpcEndpointPolicySupported = &v + return s +} - // Indicates whether the occurrence is relative to the end of the specified - // week or month. You can't specify this value with a daily schedule. - OccurrenceRelativeToEnd *bool `type:"boolean"` +// Describes the type of service for a VPC endpoint. +type ServiceTypeDetail struct { + _ struct{} `type:"structure"` - // The unit for OccurrenceDays (DayOfWeek or DayOfMonth). This value is required - // for a monthly schedule. You can't specify DayOfWeek with a weekly schedule. - // You can't specify this value with a daily schedule. - OccurrenceUnit *string `type:"string"` + // The type of service. + ServiceType *string `locationName:"serviceType" type:"string" enum:"ServiceType"` } // String returns the string representation -func (s ScheduledInstanceRecurrenceRequest) String() string { +func (s ServiceTypeDetail) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ScheduledInstanceRecurrenceRequest) GoString() string { +func (s ServiceTypeDetail) GoString() string { return s.String() } -// SetFrequency sets the Frequency field's value. -func (s *ScheduledInstanceRecurrenceRequest) SetFrequency(v string) *ScheduledInstanceRecurrenceRequest { - s.Frequency = &v +// SetServiceType sets the ServiceType field's value. +func (s *ServiceTypeDetail) SetServiceType(v string) *ServiceTypeDetail { + s.ServiceType = &v return s } -// SetInterval sets the Interval field's value. -func (s *ScheduledInstanceRecurrenceRequest) SetInterval(v int64) *ScheduledInstanceRecurrenceRequest { - s.Interval = &v - return s +// Describes the time period for a Scheduled Instance to start its first schedule. +// The time period must span less than one day. +type SlotDateTimeRangeRequest struct { + _ struct{} `type:"structure"` + + // The earliest date and time, in UTC, for the Scheduled Instance to start. + // + // EarliestTime is a required field + EarliestTime *time.Time `type:"timestamp" required:"true"` + + // The latest date and time, in UTC, for the Scheduled Instance to start. This + // value must be later than or equal to the earliest date and at most three + // months in the future. + // + // LatestTime is a required field + LatestTime *time.Time `type:"timestamp" required:"true"` } -// SetOccurrenceDays sets the OccurrenceDays field's value. -func (s *ScheduledInstanceRecurrenceRequest) SetOccurrenceDays(v []*int64) *ScheduledInstanceRecurrenceRequest { - s.OccurrenceDays = v - return s +// String returns the string representation +func (s SlotDateTimeRangeRequest) String() string { + return awsutil.Prettify(s) } -// SetOccurrenceRelativeToEnd sets the OccurrenceRelativeToEnd field's value. -func (s *ScheduledInstanceRecurrenceRequest) SetOccurrenceRelativeToEnd(v bool) *ScheduledInstanceRecurrenceRequest { - s.OccurrenceRelativeToEnd = &v +// GoString returns the string representation +func (s SlotDateTimeRangeRequest) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SlotDateTimeRangeRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SlotDateTimeRangeRequest"} + if s.EarliestTime == nil { + invalidParams.Add(request.NewErrParamRequired("EarliestTime")) + } + if s.LatestTime == nil { + invalidParams.Add(request.NewErrParamRequired("LatestTime")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEarliestTime sets the EarliestTime field's value. +func (s *SlotDateTimeRangeRequest) SetEarliestTime(v time.Time) *SlotDateTimeRangeRequest { + s.EarliestTime = &v return s } -// SetOccurrenceUnit sets the OccurrenceUnit field's value. -func (s *ScheduledInstanceRecurrenceRequest) SetOccurrenceUnit(v string) *ScheduledInstanceRecurrenceRequest { - s.OccurrenceUnit = &v +// SetLatestTime sets the LatestTime field's value. +func (s *SlotDateTimeRangeRequest) SetLatestTime(v time.Time) *SlotDateTimeRangeRequest { + s.LatestTime = &v return s } -// Describes a block device mapping for a Scheduled Instance. -type ScheduledInstancesBlockDeviceMapping struct { +// Describes the time period for a Scheduled Instance to start its first schedule. +type SlotStartTimeRangeRequest struct { _ struct{} `type:"structure"` - // The device name (for example, /dev/sdh or xvdh). - DeviceName *string `type:"string"` - - // Parameters used to set up EBS volumes automatically when the instance is - // launched. - Ebs *ScheduledInstancesEbs `type:"structure"` - - // Suppresses the specified device included in the block device mapping of the - // AMI. - NoDevice *string `type:"string"` + // The earliest date and time, in UTC, for the Scheduled Instance to start. + EarliestTime *time.Time `type:"timestamp"` - // The virtual device name (ephemeralN). Instance store volumes are numbered - // starting from 0. An instance type with two available instance store volumes - // can specify mappings for ephemeral0 and ephemeral1. The number of available - // instance store volumes depends on the instance type. After you connect to - // the instance, you must mount the volume. - // - // Constraints: For M3 instances, you must specify instance store volumes in - // the block device mapping for the instance. When you launch an M3 instance, - // we ignore any instance store volumes specified in the block device mapping - // for the AMI. - VirtualName *string `type:"string"` + // The latest date and time, in UTC, for the Scheduled Instance to start. + LatestTime *time.Time `type:"timestamp"` } // String returns the string representation -func (s ScheduledInstancesBlockDeviceMapping) String() string { +func (s SlotStartTimeRangeRequest) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ScheduledInstancesBlockDeviceMapping) GoString() string { +func (s SlotStartTimeRangeRequest) GoString() string { return s.String() } -// SetDeviceName sets the DeviceName field's value. -func (s *ScheduledInstancesBlockDeviceMapping) SetDeviceName(v string) *ScheduledInstancesBlockDeviceMapping { - s.DeviceName = &v +// SetEarliestTime sets the EarliestTime field's value. +func (s *SlotStartTimeRangeRequest) SetEarliestTime(v time.Time) *SlotStartTimeRangeRequest { + s.EarliestTime = &v return s } -// SetEbs sets the Ebs field's value. -func (s *ScheduledInstancesBlockDeviceMapping) SetEbs(v *ScheduledInstancesEbs) *ScheduledInstancesBlockDeviceMapping { - s.Ebs = v +// SetLatestTime sets the LatestTime field's value. +func (s *SlotStartTimeRangeRequest) SetLatestTime(v time.Time) *SlotStartTimeRangeRequest { + s.LatestTime = &v return s } -// SetNoDevice sets the NoDevice field's value. -func (s *ScheduledInstancesBlockDeviceMapping) SetNoDevice(v string) *ScheduledInstancesBlockDeviceMapping { - s.NoDevice = &v - return s -} +// Describes a snapshot. +type Snapshot struct { + _ struct{} `type:"structure"` -// SetVirtualName sets the VirtualName field's value. -func (s *ScheduledInstancesBlockDeviceMapping) SetVirtualName(v string) *ScheduledInstancesBlockDeviceMapping { - s.VirtualName = &v - return s -} + // The data encryption key identifier for the snapshot. This value is a unique + // identifier that corresponds to the data encryption key that was used to encrypt + // the original volume or snapshot copy. Because data encryption keys are inherited + // by volumes created from snapshots, and vice versa, if snapshots share the + // same data encryption key identifier, then they belong to the same volume/snapshot + // lineage. This parameter is only returned by the DescribeSnapshots API operation. + DataEncryptionKeyId *string `locationName:"dataEncryptionKeyId" type:"string"` -// Describes an EBS volume for a Scheduled Instance. -type ScheduledInstancesEbs struct { - _ struct{} `type:"structure"` + // The description for the snapshot. + Description *string `locationName:"description" type:"string"` - // Indicates whether the volume is deleted on instance termination. - DeleteOnTermination *bool `type:"boolean"` + // Indicates whether the snapshot is encrypted. + Encrypted *bool `locationName:"encrypted" type:"boolean"` - // Indicates whether the volume is encrypted. You can attached encrypted volumes - // only to instances that support them. - Encrypted *bool `type:"boolean"` + // The full 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. + KmsKeyId *string `locationName:"kmsKeyId" type:"string"` - // The number of I/O operations per second (IOPS) that the volume supports. - // For 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. For more information about gp2 baseline performance, I/O credits, - // and bursting, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) - // in the Amazon Elastic Compute Cloud User Guide. - // - // Constraint: Range is 100-20000 IOPS for io1 volumes and 100-10000 IOPS for - // gp2 volumes. - // - // Condition: This parameter is required for requests to create io1volumes; - // it is not used in requests to create gp2, st1, sc1, or standard volumes. - Iops *int64 `type:"integer"` + // Value from an Amazon-maintained list (amazon | aws-marketplace | microsoft) + // of snapshot owners. Not to be confused with the user-configured AWS account + // alias, which is set from the IAM console. + OwnerAlias *string `locationName:"ownerAlias" type:"string"` - // The ID of the snapshot. - SnapshotId *string `type:"string"` + // The AWS account ID of the EBS snapshot owner. + OwnerId *string `locationName:"ownerId" type:"string"` - // The size of the volume, in GiB. - // - // Default: If you're creating the volume from a snapshot and don't specify - // a volume size, the default is the snapshot size. - VolumeSize *int64 `type:"integer"` + // The progress of the snapshot, as a percentage. + Progress *string `locationName:"progress" type:"string"` - // The volume type. gp2 for General Purpose SSD, io1 for Provisioned IOPS SSD, - // Throughput Optimized HDD for st1, Cold HDD for sc1, or standard for Magnetic. - // - // Default: standard - VolumeType *string `type:"string"` + // The ID of the snapshot. Each snapshot receives a unique identifier when it + // is created. + SnapshotId *string `locationName:"snapshotId" type:"string"` + + // The time stamp when the snapshot was initiated. + StartTime *time.Time `locationName:"startTime" type:"timestamp"` + + // The snapshot state. + 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 + // by the DescribeSnapshots API operation. + StateMessage *string `locationName:"statusMessage" type:"string"` + + // Any tags assigned to the snapshot. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + + // The ID of the volume that was used to create the snapshot. Snapshots created + // by the CopySnapshot action have an arbitrary volume ID that should not be + // used for any purpose. + VolumeId *string `locationName:"volumeId" type:"string"` + + // The size of the volume, in GiB. + VolumeSize *int64 `locationName:"volumeSize" type:"integer"` } // String returns the string representation -func (s ScheduledInstancesEbs) String() string { +func (s Snapshot) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ScheduledInstancesEbs) GoString() string { +func (s Snapshot) GoString() string { return s.String() } -// SetDeleteOnTermination sets the DeleteOnTermination field's value. -func (s *ScheduledInstancesEbs) SetDeleteOnTermination(v bool) *ScheduledInstancesEbs { - s.DeleteOnTermination = &v - return s -} - -// SetEncrypted sets the Encrypted field's value. -func (s *ScheduledInstancesEbs) SetEncrypted(v bool) *ScheduledInstancesEbs { - s.Encrypted = &v +// SetDataEncryptionKeyId sets the DataEncryptionKeyId field's value. +func (s *Snapshot) SetDataEncryptionKeyId(v string) *Snapshot { + s.DataEncryptionKeyId = &v return s } -// SetIops sets the Iops field's value. -func (s *ScheduledInstancesEbs) SetIops(v int64) *ScheduledInstancesEbs { - s.Iops = &v +// SetDescription sets the Description field's value. +func (s *Snapshot) SetDescription(v string) *Snapshot { + s.Description = &v return s } -// SetSnapshotId sets the SnapshotId field's value. -func (s *ScheduledInstancesEbs) SetSnapshotId(v string) *ScheduledInstancesEbs { - s.SnapshotId = &v +// SetEncrypted sets the Encrypted field's value. +func (s *Snapshot) SetEncrypted(v bool) *Snapshot { + s.Encrypted = &v return s } -// SetVolumeSize sets the VolumeSize field's value. -func (s *ScheduledInstancesEbs) SetVolumeSize(v int64) *ScheduledInstancesEbs { - s.VolumeSize = &v +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *Snapshot) SetKmsKeyId(v string) *Snapshot { + s.KmsKeyId = &v return s } -// SetVolumeType sets the VolumeType field's value. -func (s *ScheduledInstancesEbs) SetVolumeType(v string) *ScheduledInstancesEbs { - s.VolumeType = &v +// SetOwnerAlias sets the OwnerAlias field's value. +func (s *Snapshot) SetOwnerAlias(v string) *Snapshot { + s.OwnerAlias = &v return s } -// Describes an IAM instance profile for a Scheduled Instance. -type ScheduledInstancesIamInstanceProfile struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN). - Arn *string `type:"string"` - - // The name. - Name *string `type:"string"` +// SetOwnerId sets the OwnerId field's value. +func (s *Snapshot) SetOwnerId(v string) *Snapshot { + s.OwnerId = &v + return s } -// String returns the string representation -func (s ScheduledInstancesIamInstanceProfile) String() string { - return awsutil.Prettify(s) +// SetProgress sets the Progress field's value. +func (s *Snapshot) SetProgress(v string) *Snapshot { + s.Progress = &v + return s } -// GoString returns the string representation -func (s ScheduledInstancesIamInstanceProfile) GoString() string { - return s.String() +// SetSnapshotId sets the SnapshotId field's value. +func (s *Snapshot) SetSnapshotId(v string) *Snapshot { + s.SnapshotId = &v + return s } -// SetArn sets the Arn field's value. -func (s *ScheduledInstancesIamInstanceProfile) SetArn(v string) *ScheduledInstancesIamInstanceProfile { - s.Arn = &v +// SetStartTime sets the StartTime field's value. +func (s *Snapshot) SetStartTime(v time.Time) *Snapshot { + s.StartTime = &v return s } -// SetName sets the Name field's value. -func (s *ScheduledInstancesIamInstanceProfile) SetName(v string) *ScheduledInstancesIamInstanceProfile { - s.Name = &v +// SetState sets the State field's value. +func (s *Snapshot) SetState(v string) *Snapshot { + s.State = &v return s } -// Describes an IPv6 address. -type ScheduledInstancesIpv6Address struct { - _ struct{} `type:"structure"` - - // The IPv6 address. - Ipv6Address *string `type:"string"` +// SetStateMessage sets the StateMessage field's value. +func (s *Snapshot) SetStateMessage(v string) *Snapshot { + s.StateMessage = &v + return s } -// String returns the string representation -func (s ScheduledInstancesIpv6Address) String() string { - return awsutil.Prettify(s) +// SetTags sets the Tags field's value. +func (s *Snapshot) SetTags(v []*Tag) *Snapshot { + s.Tags = v + return s } -// GoString returns the string representation -func (s ScheduledInstancesIpv6Address) GoString() string { - return s.String() +// SetVolumeId sets the VolumeId field's value. +func (s *Snapshot) SetVolumeId(v string) *Snapshot { + s.VolumeId = &v + return s } -// SetIpv6Address sets the Ipv6Address field's value. -func (s *ScheduledInstancesIpv6Address) SetIpv6Address(v string) *ScheduledInstancesIpv6Address { - s.Ipv6Address = &v +// SetVolumeSize sets the VolumeSize field's value. +func (s *Snapshot) SetVolumeSize(v int64) *Snapshot { + s.VolumeSize = &v return s } -// Describes the launch specification for a Scheduled Instance. -// -// If you are launching the Scheduled Instance in EC2-VPC, you must specify -// the ID of the subnet. You can specify the subnet using either SubnetId or -// NetworkInterface. -type ScheduledInstancesLaunchSpecification struct { +// Describes the snapshot created from the imported disk. +type SnapshotDetail struct { _ struct{} `type:"structure"` - // One or more block device mapping entries. - BlockDeviceMappings []*ScheduledInstancesBlockDeviceMapping `locationName:"BlockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"` - - // Indicates whether the instances are optimized for EBS I/O. This optimization - // provides dedicated throughput to Amazon EBS and an optimized configuration - // stack to provide optimal EBS I/O performance. This optimization isn't available - // with all instance types. Additional usage charges apply when using an EBS-optimized - // instance. - // - // Default: false - EbsOptimized *bool `type:"boolean"` - - // The IAM instance profile. - IamInstanceProfile *ScheduledInstancesIamInstanceProfile `type:"structure"` - - // The ID of the Amazon Machine Image (AMI). - // - // ImageId is a required field - ImageId *string `type:"string" required:"true"` - - // The instance type. - InstanceType *string `type:"string"` + // A description for the snapshot. + Description *string `locationName:"description" type:"string"` - // The ID of the kernel. - KernelId *string `type:"string"` + // The block device mapping for the snapshot. + DeviceName *string `locationName:"deviceName" type:"string"` - // The name of the key pair. - KeyName *string `type:"string"` + // The size of the disk in the snapshot, in GiB. + DiskImageSize *float64 `locationName:"diskImageSize" type:"double"` - // Enable or disable monitoring for the instances. - Monitoring *ScheduledInstancesMonitoring `type:"structure"` + // The format of the disk image from which the snapshot is created. + Format *string `locationName:"format" type:"string"` - // One or more network interfaces. - NetworkInterfaces []*ScheduledInstancesNetworkInterface `locationName:"NetworkInterface" locationNameList:"NetworkInterface" type:"list"` + // The percentage of progress for the task. + Progress *string `locationName:"progress" type:"string"` - // The placement information. - Placement *ScheduledInstancesPlacement `type:"structure"` + // The snapshot ID of the disk being imported. + SnapshotId *string `locationName:"snapshotId" type:"string"` - // The ID of the RAM disk. - RamdiskId *string `type:"string"` + // A brief status of the snapshot creation. + Status *string `locationName:"status" type:"string"` - // The IDs of one or more security groups. - SecurityGroupIds []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"` + // A detailed status message for the snapshot creation. + StatusMessage *string `locationName:"statusMessage" type:"string"` - // The ID of the subnet in which to launch the instances. - SubnetId *string `type:"string"` + // The URL used to access the disk image. + Url *string `locationName:"url" type:"string"` - // The base64-encoded MIME user data. - UserData *string `type:"string"` + // The S3 bucket for the disk image. + UserBucket *UserBucketDetails `locationName:"userBucket" type:"structure"` } // String returns the string representation -func (s ScheduledInstancesLaunchSpecification) String() string { +func (s SnapshotDetail) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ScheduledInstancesLaunchSpecification) GoString() string { +func (s SnapshotDetail) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *ScheduledInstancesLaunchSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ScheduledInstancesLaunchSpecification"} - if s.ImageId == nil { - invalidParams.Add(request.NewErrParamRequired("ImageId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *ScheduledInstancesLaunchSpecification) SetBlockDeviceMappings(v []*ScheduledInstancesBlockDeviceMapping) *ScheduledInstancesLaunchSpecification { - s.BlockDeviceMappings = v - return s -} - -// SetEbsOptimized sets the EbsOptimized field's value. -func (s *ScheduledInstancesLaunchSpecification) SetEbsOptimized(v bool) *ScheduledInstancesLaunchSpecification { - s.EbsOptimized = &v +// SetDescription sets the Description field's value. +func (s *SnapshotDetail) SetDescription(v string) *SnapshotDetail { + s.Description = &v return s } -// SetIamInstanceProfile sets the IamInstanceProfile field's value. -func (s *ScheduledInstancesLaunchSpecification) SetIamInstanceProfile(v *ScheduledInstancesIamInstanceProfile) *ScheduledInstancesLaunchSpecification { - s.IamInstanceProfile = v +// SetDeviceName sets the DeviceName field's value. +func (s *SnapshotDetail) SetDeviceName(v string) *SnapshotDetail { + s.DeviceName = &v return s } -// SetImageId sets the ImageId field's value. -func (s *ScheduledInstancesLaunchSpecification) SetImageId(v string) *ScheduledInstancesLaunchSpecification { - s.ImageId = &v +// SetDiskImageSize sets the DiskImageSize field's value. +func (s *SnapshotDetail) SetDiskImageSize(v float64) *SnapshotDetail { + s.DiskImageSize = &v return s } -// SetInstanceType sets the InstanceType field's value. -func (s *ScheduledInstancesLaunchSpecification) SetInstanceType(v string) *ScheduledInstancesLaunchSpecification { - s.InstanceType = &v +// SetFormat sets the Format field's value. +func (s *SnapshotDetail) SetFormat(v string) *SnapshotDetail { + s.Format = &v return s } -// SetKernelId sets the KernelId field's value. -func (s *ScheduledInstancesLaunchSpecification) SetKernelId(v string) *ScheduledInstancesLaunchSpecification { - s.KernelId = &v +// SetProgress sets the Progress field's value. +func (s *SnapshotDetail) SetProgress(v string) *SnapshotDetail { + s.Progress = &v return s } -// SetKeyName sets the KeyName field's value. -func (s *ScheduledInstancesLaunchSpecification) SetKeyName(v string) *ScheduledInstancesLaunchSpecification { - s.KeyName = &v +// SetSnapshotId sets the SnapshotId field's value. +func (s *SnapshotDetail) SetSnapshotId(v string) *SnapshotDetail { + s.SnapshotId = &v return s } -// SetMonitoring sets the Monitoring field's value. -func (s *ScheduledInstancesLaunchSpecification) SetMonitoring(v *ScheduledInstancesMonitoring) *ScheduledInstancesLaunchSpecification { - s.Monitoring = v +// SetStatus sets the Status field's value. +func (s *SnapshotDetail) SetStatus(v string) *SnapshotDetail { + s.Status = &v return s } -// SetNetworkInterfaces sets the NetworkInterfaces field's value. -func (s *ScheduledInstancesLaunchSpecification) SetNetworkInterfaces(v []*ScheduledInstancesNetworkInterface) *ScheduledInstancesLaunchSpecification { - s.NetworkInterfaces = v +// SetStatusMessage sets the StatusMessage field's value. +func (s *SnapshotDetail) SetStatusMessage(v string) *SnapshotDetail { + s.StatusMessage = &v return s } -// SetPlacement sets the Placement field's value. -func (s *ScheduledInstancesLaunchSpecification) SetPlacement(v *ScheduledInstancesPlacement) *ScheduledInstancesLaunchSpecification { - s.Placement = v +// SetUrl sets the Url field's value. +func (s *SnapshotDetail) SetUrl(v string) *SnapshotDetail { + s.Url = &v return s } -// SetRamdiskId sets the RamdiskId field's value. -func (s *ScheduledInstancesLaunchSpecification) SetRamdiskId(v string) *ScheduledInstancesLaunchSpecification { - s.RamdiskId = &v +// SetUserBucket sets the UserBucket field's value. +func (s *SnapshotDetail) SetUserBucket(v *UserBucketDetails) *SnapshotDetail { + s.UserBucket = v return s } -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *ScheduledInstancesLaunchSpecification) SetSecurityGroupIds(v []*string) *ScheduledInstancesLaunchSpecification { - s.SecurityGroupIds = v - return s -} +// The disk container object for the import snapshot request. +type SnapshotDiskContainer struct { + _ struct{} `type:"structure"` -// SetSubnetId sets the SubnetId field's value. -func (s *ScheduledInstancesLaunchSpecification) SetSubnetId(v string) *ScheduledInstancesLaunchSpecification { - s.SubnetId = &v - return s -} + // The description of the disk image being imported. + Description *string `type:"string"` -// SetUserData sets the UserData field's value. -func (s *ScheduledInstancesLaunchSpecification) SetUserData(v string) *ScheduledInstancesLaunchSpecification { - s.UserData = &v - return s -} + // The format of the disk image being imported. + // + // Valid values: VHD | VMDK + Format *string `type:"string"` -// Describes whether monitoring is enabled for a Scheduled Instance. -type ScheduledInstancesMonitoring struct { - _ struct{} `type:"structure"` + // The URL to the Amazon S3-based disk image being imported. It can either be + // a https URL (https://..) or an Amazon S3 URL (s3://..). + Url *string `type:"string"` - // Indicates whether monitoring is enabled. - Enabled *bool `type:"boolean"` + // The S3 bucket for the disk image. + UserBucket *UserBucket `type:"structure"` } // String returns the string representation -func (s ScheduledInstancesMonitoring) String() string { +func (s SnapshotDiskContainer) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ScheduledInstancesMonitoring) GoString() string { +func (s SnapshotDiskContainer) GoString() string { return s.String() } -// SetEnabled sets the Enabled field's value. -func (s *ScheduledInstancesMonitoring) SetEnabled(v bool) *ScheduledInstancesMonitoring { - s.Enabled = &v +// SetDescription sets the Description field's value. +func (s *SnapshotDiskContainer) SetDescription(v string) *SnapshotDiskContainer { + s.Description = &v return s } -// Describes a network interface for a Scheduled Instance. -type ScheduledInstancesNetworkInterface struct { - _ struct{} `type:"structure"` +// SetFormat sets the Format field's value. +func (s *SnapshotDiskContainer) SetFormat(v string) *SnapshotDiskContainer { + s.Format = &v + return s +} - // Indicates whether to assign a public IPv4 address to instances launched in - // a VPC. The public IPv4 address can only be assigned to a network interface - // for eth0, and can only be assigned to a new network interface, not an existing - // one. You cannot specify more than one network interface in the request. If - // launching into a default subnet, the default value is true. - AssociatePublicIpAddress *bool `type:"boolean"` +// SetUrl sets the Url field's value. +func (s *SnapshotDiskContainer) SetUrl(v string) *SnapshotDiskContainer { + s.Url = &v + return s +} - // Indicates whether to delete the interface when the instance is terminated. - DeleteOnTermination *bool `type:"boolean"` +// SetUserBucket sets the UserBucket field's value. +func (s *SnapshotDiskContainer) SetUserBucket(v *UserBucket) *SnapshotDiskContainer { + s.UserBucket = v + return s +} - // The description. - Description *string `type:"string"` +// Details about the import snapshot task. +type SnapshotTaskDetail struct { + _ struct{} `type:"structure"` - // The index of the device for the network interface attachment. - DeviceIndex *int64 `type:"integer"` + // The description of the snapshot. + Description *string `locationName:"description" type:"string"` - // The IDs of one or more security groups. - Groups []*string `locationName:"Group" locationNameList:"SecurityGroupId" type:"list"` + // The size of the disk in the snapshot, in GiB. + DiskImageSize *float64 `locationName:"diskImageSize" type:"double"` - // The number of IPv6 addresses to assign to the network interface. The IPv6 - // addresses are automatically selected from the subnet range. - Ipv6AddressCount *int64 `type:"integer"` + // Indicates whether the snapshot is encrypted. + Encrypted *bool `locationName:"encrypted" type:"boolean"` - // One or more specific IPv6 addresses from the subnet range. - Ipv6Addresses []*ScheduledInstancesIpv6Address `locationName:"Ipv6Address" locationNameList:"Ipv6Address" type:"list"` + // The format of the disk image from which the snapshot is created. + Format *string `locationName:"format" type:"string"` - // The ID of the network interface. - NetworkInterfaceId *string `type:"string"` + // The identifier for the AWS Key Management Service (AWS KMS) customer master + // key (CMK) that was used to create the encrypted snapshot. + KmsKeyId *string `locationName:"kmsKeyId" type:"string"` - // The IPv4 address of the network interface within the subnet. - PrivateIpAddress *string `type:"string"` + // The percentage of completion for the import snapshot task. + Progress *string `locationName:"progress" type:"string"` - // The private IPv4 addresses. - PrivateIpAddressConfigs []*ScheduledInstancesPrivateIpAddressConfig `locationName:"PrivateIpAddressConfig" locationNameList:"PrivateIpAddressConfigSet" type:"list"` + // The snapshot ID of the disk being imported. + SnapshotId *string `locationName:"snapshotId" type:"string"` - // The number of secondary private IPv4 addresses. - SecondaryPrivateIpAddressCount *int64 `type:"integer"` + // A brief status for the import snapshot task. + Status *string `locationName:"status" type:"string"` - // The ID of the subnet. - SubnetId *string `type:"string"` + // A detailed status message for the import snapshot task. + StatusMessage *string `locationName:"statusMessage" type:"string"` + + // The URL of the disk image from which the snapshot is created. + Url *string `locationName:"url" type:"string"` + + // The S3 bucket for the disk image. + UserBucket *UserBucketDetails `locationName:"userBucket" type:"structure"` } // String returns the string representation -func (s ScheduledInstancesNetworkInterface) String() string { +func (s SnapshotTaskDetail) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ScheduledInstancesNetworkInterface) GoString() string { +func (s SnapshotTaskDetail) GoString() string { return s.String() } -// SetAssociatePublicIpAddress sets the AssociatePublicIpAddress field's value. -func (s *ScheduledInstancesNetworkInterface) SetAssociatePublicIpAddress(v bool) *ScheduledInstancesNetworkInterface { - s.AssociatePublicIpAddress = &v +// SetDescription sets the Description field's value. +func (s *SnapshotTaskDetail) SetDescription(v string) *SnapshotTaskDetail { + s.Description = &v return s } -// SetDeleteOnTermination sets the DeleteOnTermination field's value. -func (s *ScheduledInstancesNetworkInterface) SetDeleteOnTermination(v bool) *ScheduledInstancesNetworkInterface { - s.DeleteOnTermination = &v +// SetDiskImageSize sets the DiskImageSize field's value. +func (s *SnapshotTaskDetail) SetDiskImageSize(v float64) *SnapshotTaskDetail { + s.DiskImageSize = &v return s } -// SetDescription sets the Description field's value. -func (s *ScheduledInstancesNetworkInterface) SetDescription(v string) *ScheduledInstancesNetworkInterface { - s.Description = &v +// SetEncrypted sets the Encrypted field's value. +func (s *SnapshotTaskDetail) SetEncrypted(v bool) *SnapshotTaskDetail { + s.Encrypted = &v return s } -// SetDeviceIndex sets the DeviceIndex field's value. -func (s *ScheduledInstancesNetworkInterface) SetDeviceIndex(v int64) *ScheduledInstancesNetworkInterface { - s.DeviceIndex = &v +// SetFormat sets the Format field's value. +func (s *SnapshotTaskDetail) SetFormat(v string) *SnapshotTaskDetail { + s.Format = &v return s } -// SetGroups sets the Groups field's value. -func (s *ScheduledInstancesNetworkInterface) SetGroups(v []*string) *ScheduledInstancesNetworkInterface { - s.Groups = v +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *SnapshotTaskDetail) SetKmsKeyId(v string) *SnapshotTaskDetail { + s.KmsKeyId = &v return s } -// SetIpv6AddressCount sets the Ipv6AddressCount field's value. -func (s *ScheduledInstancesNetworkInterface) SetIpv6AddressCount(v int64) *ScheduledInstancesNetworkInterface { - s.Ipv6AddressCount = &v +// SetProgress sets the Progress field's value. +func (s *SnapshotTaskDetail) SetProgress(v string) *SnapshotTaskDetail { + s.Progress = &v return s } -// SetIpv6Addresses sets the Ipv6Addresses field's value. -func (s *ScheduledInstancesNetworkInterface) SetIpv6Addresses(v []*ScheduledInstancesIpv6Address) *ScheduledInstancesNetworkInterface { - s.Ipv6Addresses = v +// SetSnapshotId sets the SnapshotId field's value. +func (s *SnapshotTaskDetail) SetSnapshotId(v string) *SnapshotTaskDetail { + s.SnapshotId = &v return s } -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *ScheduledInstancesNetworkInterface) SetNetworkInterfaceId(v string) *ScheduledInstancesNetworkInterface { - s.NetworkInterfaceId = &v +// SetStatus sets the Status field's value. +func (s *SnapshotTaskDetail) SetStatus(v string) *SnapshotTaskDetail { + s.Status = &v return s } -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *ScheduledInstancesNetworkInterface) SetPrivateIpAddress(v string) *ScheduledInstancesNetworkInterface { - s.PrivateIpAddress = &v +// SetStatusMessage sets the StatusMessage field's value. +func (s *SnapshotTaskDetail) SetStatusMessage(v string) *SnapshotTaskDetail { + s.StatusMessage = &v return s } -// SetPrivateIpAddressConfigs sets the PrivateIpAddressConfigs field's value. -func (s *ScheduledInstancesNetworkInterface) SetPrivateIpAddressConfigs(v []*ScheduledInstancesPrivateIpAddressConfig) *ScheduledInstancesNetworkInterface { - s.PrivateIpAddressConfigs = v +// SetUrl sets the Url field's value. +func (s *SnapshotTaskDetail) SetUrl(v string) *SnapshotTaskDetail { + s.Url = &v return s } -// SetSecondaryPrivateIpAddressCount sets the SecondaryPrivateIpAddressCount field's value. -func (s *ScheduledInstancesNetworkInterface) SetSecondaryPrivateIpAddressCount(v int64) *ScheduledInstancesNetworkInterface { - s.SecondaryPrivateIpAddressCount = &v +// SetUserBucket sets the UserBucket field's value. +func (s *SnapshotTaskDetail) SetUserBucket(v *UserBucketDetails) *SnapshotTaskDetail { + s.UserBucket = v return s } -// SetSubnetId sets the SubnetId field's value. -func (s *ScheduledInstancesNetworkInterface) SetSubnetId(v string) *ScheduledInstancesNetworkInterface { - s.SubnetId = &v +// Describes the data feed for a Spot Instance. +type SpotDatafeedSubscription struct { + _ struct{} `type:"structure"` + + // The Amazon S3 bucket where the Spot Instance data feed is located. + Bucket *string `locationName:"bucket" type:"string"` + + // The fault codes for the Spot Instance request, if any. + Fault *SpotInstanceStateFault `locationName:"fault" type:"structure"` + + // The AWS account ID of the account. + OwnerId *string `locationName:"ownerId" type:"string"` + + // The prefix that is prepended to data feed files. + Prefix *string `locationName:"prefix" type:"string"` + + // The state of the Spot Instance data feed subscription. + State *string `locationName:"state" type:"string" enum:"DatafeedSubscriptionState"` +} + +// String returns the string representation +func (s SpotDatafeedSubscription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SpotDatafeedSubscription) GoString() string { + return s.String() +} + +// SetBucket sets the Bucket field's value. +func (s *SpotDatafeedSubscription) SetBucket(v string) *SpotDatafeedSubscription { + s.Bucket = &v + return s +} + +// SetFault sets the Fault field's value. +func (s *SpotDatafeedSubscription) SetFault(v *SpotInstanceStateFault) *SpotDatafeedSubscription { + s.Fault = v + return s +} + +// SetOwnerId sets the OwnerId field's value. +func (s *SpotDatafeedSubscription) SetOwnerId(v string) *SpotDatafeedSubscription { + s.OwnerId = &v + return s +} + +// SetPrefix sets the Prefix field's value. +func (s *SpotDatafeedSubscription) SetPrefix(v string) *SpotDatafeedSubscription { + s.Prefix = &v + return s +} + +// SetState sets the State field's value. +func (s *SpotDatafeedSubscription) SetState(v string) *SpotDatafeedSubscription { + s.State = &v return s } -// Describes the placement for a Scheduled Instance. -type ScheduledInstancesPlacement struct { - _ struct{} `type:"structure"` +// Describes the launch specification for one or more Spot Instances. +type SpotFleetLaunchSpecification struct { + _ struct{} `type:"structure"` + + // Deprecated. + AddressingType *string `locationName:"addressingType" type:"string"` + + // One or more block device mapping entries. You can't specify both a snapshot + // ID and an encryption value. This is because only blank volumes can be encrypted + // on creation. If a snapshot is the basis for a volume, it is not blank and + // its encryption status is used for the volume encryption status. + BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` + + // Indicates whether the instances are optimized for EBS I/O. This optimization + // provides dedicated throughput to Amazon EBS and an optimized configuration + // stack to provide optimal EBS I/O performance. This optimization isn't available + // with all instance types. Additional usage charges apply when using an EBS + // Optimized instance. + // + // Default: false + EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"` + + // The IAM instance profile. + IamInstanceProfile *IamInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"` + + // The ID of the AMI. + ImageId *string `locationName:"imageId" type:"string"` + + // The instance type. + InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` + + // The ID of the kernel. + KernelId *string `locationName:"kernelId" type:"string"` + + // The name of the key pair. + KeyName *string `locationName:"keyName" type:"string"` + + // Enable or disable monitoring for the instances. + Monitoring *SpotFleetMonitoring `locationName:"monitoring" type:"structure"` - // The Availability Zone. - AvailabilityZone *string `type:"string"` + // One or more network interfaces. If you specify a network interface, you must + // specify subnet IDs and security group IDs using the network interface. + NetworkInterfaces []*InstanceNetworkInterfaceSpecification `locationName:"networkInterfaceSet" locationNameList:"item" type:"list"` - // The name of the placement group. - GroupName *string `type:"string"` -} + // The placement information. + Placement *SpotPlacement `locationName:"placement" type:"structure"` -// String returns the string representation -func (s ScheduledInstancesPlacement) String() string { - return awsutil.Prettify(s) -} + // The ID of the RAM disk. + RamdiskId *string `locationName:"ramdiskId" type:"string"` -// GoString returns the string representation -func (s ScheduledInstancesPlacement) GoString() string { - return s.String() -} + // One or more security groups. When requesting instances in a VPC, you must + // specify the IDs of the security groups. When requesting instances in EC2-Classic, + // you can specify the names or the IDs of the security groups. + SecurityGroups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *ScheduledInstancesPlacement) SetAvailabilityZone(v string) *ScheduledInstancesPlacement { - s.AvailabilityZone = &v - return s -} + // The maximum price per unit hour that you are willing to pay for a Spot Instance. + // If this value is not specified, the default is the Spot price specified for + // the fleet. To determine the Spot price per unit hour, divide the Spot price + // by the value of WeightedCapacity. + SpotPrice *string `locationName:"spotPrice" type:"string"` -// SetGroupName sets the GroupName field's value. -func (s *ScheduledInstancesPlacement) SetGroupName(v string) *ScheduledInstancesPlacement { - s.GroupName = &v - return s -} + // The ID of the subnet in which to launch the instances. To specify multiple + // subnets, separate them using commas; for example, "subnet-a61dafcf, subnet-65ea5f08". + SubnetId *string `locationName:"subnetId" type:"string"` -// Describes a private IPv4 address for a Scheduled Instance. -type ScheduledInstancesPrivateIpAddressConfig struct { - _ struct{} `type:"structure"` + // The tags to apply during creation. + TagSpecifications []*SpotFleetTagSpecification `locationName:"tagSpecificationSet" locationNameList:"item" type:"list"` - // Indicates whether this is a primary IPv4 address. Otherwise, this is a secondary - // IPv4 address. - Primary *bool `type:"boolean"` + // The Base64-encoded user data to make available to the instances. + UserData *string `locationName:"userData" type:"string"` - // The IPv4 address. - PrivateIpAddress *string `type:"string"` + // The number of units provided by the specified instance type. These are the + // same units that you chose to set the target capacity in terms (instances + // or a performance characteristic such as vCPUs, memory, or I/O). + // + // If the target capacity divided by this value is not a whole number, we round + // the number of instances to the next whole number. If this value is not specified, + // the default is 1. + WeightedCapacity *float64 `locationName:"weightedCapacity" type:"double"` } // String returns the string representation -func (s ScheduledInstancesPrivateIpAddressConfig) String() string { +func (s SpotFleetLaunchSpecification) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ScheduledInstancesPrivateIpAddressConfig) GoString() string { +func (s SpotFleetLaunchSpecification) GoString() string { return s.String() } -// SetPrimary sets the Primary field's value. -func (s *ScheduledInstancesPrivateIpAddressConfig) SetPrimary(v bool) *ScheduledInstancesPrivateIpAddressConfig { - s.Primary = &v +// SetAddressingType sets the AddressingType field's value. +func (s *SpotFleetLaunchSpecification) SetAddressingType(v string) *SpotFleetLaunchSpecification { + s.AddressingType = &v return s } -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *ScheduledInstancesPrivateIpAddressConfig) SetPrivateIpAddress(v string) *ScheduledInstancesPrivateIpAddressConfig { - s.PrivateIpAddress = &v +// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. +func (s *SpotFleetLaunchSpecification) SetBlockDeviceMappings(v []*BlockDeviceMapping) *SpotFleetLaunchSpecification { + s.BlockDeviceMappings = v return s } -// Describes a security group -type SecurityGroup struct { - _ struct{} `type:"structure"` - - // A description of the security group. - Description *string `locationName:"groupDescription" type:"string"` - - // The ID of the security group. - GroupId *string `locationName:"groupId" type:"string"` - - // The name of the security group. - GroupName *string `locationName:"groupName" type:"string"` - - // One or more inbound rules associated with the security group. - IpPermissions []*IpPermission `locationName:"ipPermissions" locationNameList:"item" type:"list"` - - // [EC2-VPC] One or more 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. - OwnerId *string `locationName:"ownerId" type:"string"` - - // Any tags assigned to the security group. - Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - - // [EC2-VPC] The ID of the VPC for the security group. - VpcId *string `locationName:"vpcId" type:"string"` +// SetEbsOptimized sets the EbsOptimized field's value. +func (s *SpotFleetLaunchSpecification) SetEbsOptimized(v bool) *SpotFleetLaunchSpecification { + s.EbsOptimized = &v + return s } -// String returns the string representation -func (s SecurityGroup) String() string { - return awsutil.Prettify(s) +// SetIamInstanceProfile sets the IamInstanceProfile field's value. +func (s *SpotFleetLaunchSpecification) SetIamInstanceProfile(v *IamInstanceProfileSpecification) *SpotFleetLaunchSpecification { + s.IamInstanceProfile = v + return s } -// GoString returns the string representation -func (s SecurityGroup) GoString() string { - return s.String() +// SetImageId sets the ImageId field's value. +func (s *SpotFleetLaunchSpecification) SetImageId(v string) *SpotFleetLaunchSpecification { + s.ImageId = &v + return s } -// SetDescription sets the Description field's value. -func (s *SecurityGroup) SetDescription(v string) *SecurityGroup { - s.Description = &v +// SetInstanceType sets the InstanceType field's value. +func (s *SpotFleetLaunchSpecification) SetInstanceType(v string) *SpotFleetLaunchSpecification { + s.InstanceType = &v return s } -// SetGroupId sets the GroupId field's value. -func (s *SecurityGroup) SetGroupId(v string) *SecurityGroup { - s.GroupId = &v +// SetKernelId sets the KernelId field's value. +func (s *SpotFleetLaunchSpecification) SetKernelId(v string) *SpotFleetLaunchSpecification { + s.KernelId = &v return s } -// SetGroupName sets the GroupName field's value. -func (s *SecurityGroup) SetGroupName(v string) *SecurityGroup { - s.GroupName = &v +// SetKeyName sets the KeyName field's value. +func (s *SpotFleetLaunchSpecification) SetKeyName(v string) *SpotFleetLaunchSpecification { + s.KeyName = &v return s } -// SetIpPermissions sets the IpPermissions field's value. -func (s *SecurityGroup) SetIpPermissions(v []*IpPermission) *SecurityGroup { - s.IpPermissions = v +// SetMonitoring sets the Monitoring field's value. +func (s *SpotFleetLaunchSpecification) SetMonitoring(v *SpotFleetMonitoring) *SpotFleetLaunchSpecification { + s.Monitoring = v return s } -// SetIpPermissionsEgress sets the IpPermissionsEgress field's value. -func (s *SecurityGroup) SetIpPermissionsEgress(v []*IpPermission) *SecurityGroup { - s.IpPermissionsEgress = v +// SetNetworkInterfaces sets the NetworkInterfaces field's value. +func (s *SpotFleetLaunchSpecification) SetNetworkInterfaces(v []*InstanceNetworkInterfaceSpecification) *SpotFleetLaunchSpecification { + s.NetworkInterfaces = v return s } -// SetOwnerId sets the OwnerId field's value. -func (s *SecurityGroup) SetOwnerId(v string) *SecurityGroup { - s.OwnerId = &v +// SetPlacement sets the Placement field's value. +func (s *SpotFleetLaunchSpecification) SetPlacement(v *SpotPlacement) *SpotFleetLaunchSpecification { + s.Placement = v return s } -// SetTags sets the Tags field's value. -func (s *SecurityGroup) SetTags(v []*Tag) *SecurityGroup { - s.Tags = v +// SetRamdiskId sets the RamdiskId field's value. +func (s *SpotFleetLaunchSpecification) SetRamdiskId(v string) *SpotFleetLaunchSpecification { + s.RamdiskId = &v return s } -// SetVpcId sets the VpcId field's value. -func (s *SecurityGroup) SetVpcId(v string) *SecurityGroup { - s.VpcId = &v +// SetSecurityGroups sets the SecurityGroups field's value. +func (s *SpotFleetLaunchSpecification) SetSecurityGroups(v []*GroupIdentifier) *SpotFleetLaunchSpecification { + s.SecurityGroups = v return s } -// Describes a security group. -type SecurityGroupIdentifier struct { - _ struct{} `type:"structure"` - - // The ID of the security group. - GroupId *string `locationName:"groupId" type:"string"` - - // The name of the security group. - GroupName *string `locationName:"groupName" type:"string"` +// SetSpotPrice sets the SpotPrice field's value. +func (s *SpotFleetLaunchSpecification) SetSpotPrice(v string) *SpotFleetLaunchSpecification { + s.SpotPrice = &v + return s } -// String returns the string representation -func (s SecurityGroupIdentifier) String() string { - return awsutil.Prettify(s) +// SetSubnetId sets the SubnetId field's value. +func (s *SpotFleetLaunchSpecification) SetSubnetId(v string) *SpotFleetLaunchSpecification { + s.SubnetId = &v + return s } -// GoString returns the string representation -func (s SecurityGroupIdentifier) GoString() string { - return s.String() +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *SpotFleetLaunchSpecification) SetTagSpecifications(v []*SpotFleetTagSpecification) *SpotFleetLaunchSpecification { + s.TagSpecifications = v + return s } -// SetGroupId sets the GroupId field's value. -func (s *SecurityGroupIdentifier) SetGroupId(v string) *SecurityGroupIdentifier { - s.GroupId = &v +// SetUserData sets the UserData field's value. +func (s *SpotFleetLaunchSpecification) SetUserData(v string) *SpotFleetLaunchSpecification { + s.UserData = &v return s } -// SetGroupName sets the GroupName field's value. -func (s *SecurityGroupIdentifier) SetGroupName(v string) *SecurityGroupIdentifier { - s.GroupName = &v +// SetWeightedCapacity sets the WeightedCapacity field's value. +func (s *SpotFleetLaunchSpecification) SetWeightedCapacity(v float64) *SpotFleetLaunchSpecification { + s.WeightedCapacity = &v return s } -// Describes a VPC with a security group that references your security group. -type SecurityGroupReference struct { +// Describes whether monitoring is enabled. +type SpotFleetMonitoring struct { _ struct{} `type:"structure"` - // The ID of your security group. - // - // GroupId is a required field - GroupId *string `locationName:"groupId" type:"string" required:"true"` - - // The ID of the VPC with the referencing security group. + // Enables monitoring for the instance. // - // ReferencingVpcId is a required field - ReferencingVpcId *string `locationName:"referencingVpcId" type:"string" required:"true"` - - // The ID of the VPC peering connection. - VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string"` + // Default: false + Enabled *bool `locationName:"enabled" type:"boolean"` } // String returns the string representation -func (s SecurityGroupReference) String() string { +func (s SpotFleetMonitoring) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s SecurityGroupReference) GoString() string { +func (s SpotFleetMonitoring) GoString() string { return s.String() } -// SetGroupId sets the GroupId field's value. -func (s *SecurityGroupReference) SetGroupId(v string) *SecurityGroupReference { - s.GroupId = &v - return s -} - -// SetReferencingVpcId sets the ReferencingVpcId field's value. -func (s *SecurityGroupReference) SetReferencingVpcId(v string) *SecurityGroupReference { - s.ReferencingVpcId = &v - return s -} - -// SetVpcPeeringConnectionId sets the VpcPeeringConnectionId field's value. -func (s *SecurityGroupReference) SetVpcPeeringConnectionId(v string) *SecurityGroupReference { - s.VpcPeeringConnectionId = &v +// SetEnabled sets the Enabled field's value. +func (s *SpotFleetMonitoring) SetEnabled(v bool) *SpotFleetMonitoring { + s.Enabled = &v return s } -// Describes a service configuration for a VPC endpoint service. -type ServiceConfiguration struct { +// Describes a Spot Fleet request. +type SpotFleetRequestConfig struct { _ struct{} `type:"structure"` - // Indicates whether requests from other AWS accounts to create an endpoint - // to the service must first be accepted. - AcceptanceRequired *bool `locationName:"acceptanceRequired" type:"boolean"` - - // In the Availability Zones in which the service is available. - AvailabilityZones []*string `locationName:"availabilityZoneSet" locationNameList:"item" type:"list"` - - // The DNS names for the service. - BaseEndpointDnsNames []*string `locationName:"baseEndpointDnsNameSet" locationNameList:"item" type:"list"` - - // The Amazon Resource Names (ARNs) of the Network Load Balancers for the service. - NetworkLoadBalancerArns []*string `locationName:"networkLoadBalancerArnSet" locationNameList:"item" type:"list"` - - // The private DNS name for the service. - PrivateDnsName *string `locationName:"privateDnsName" type:"string"` + // The progress of the Spot Fleet request. If there is an error, the status + // is error. After all requests are placed, the status is pending_fulfillment. + // If the size of the fleet is equal to or greater than its target capacity, + // the status is fulfilled. If the size of the fleet is decreased, the status + // is pending_termination while Spot Instances are terminating. + ActivityStatus *string `locationName:"activityStatus" type:"string" enum:"ActivityStatus"` - // The ID of the service. - ServiceId *string `locationName:"serviceId" type:"string"` + // The creation date and time of the request. + CreateTime *time.Time `locationName:"createTime" type:"timestamp"` - // The name of the service. - ServiceName *string `locationName:"serviceName" type:"string"` + // The configuration of the Spot Fleet request. + SpotFleetRequestConfig *SpotFleetRequestConfigData `locationName:"spotFleetRequestConfig" type:"structure"` - // The service state. - ServiceState *string `locationName:"serviceState" type:"string" enum:"ServiceState"` + // The ID of the Spot Fleet request. + SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string"` - // The type of service. - ServiceType []*ServiceTypeDetail `locationName:"serviceType" locationNameList:"item" type:"list"` + // The state of the Spot Fleet request. + SpotFleetRequestState *string `locationName:"spotFleetRequestState" type:"string" enum:"BatchState"` } // String returns the string representation -func (s ServiceConfiguration) String() string { +func (s SpotFleetRequestConfig) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ServiceConfiguration) GoString() string { +func (s SpotFleetRequestConfig) GoString() string { return s.String() } -// SetAcceptanceRequired sets the AcceptanceRequired field's value. -func (s *ServiceConfiguration) SetAcceptanceRequired(v bool) *ServiceConfiguration { - s.AcceptanceRequired = &v +// SetActivityStatus sets the ActivityStatus field's value. +func (s *SpotFleetRequestConfig) SetActivityStatus(v string) *SpotFleetRequestConfig { + s.ActivityStatus = &v return s } -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *ServiceConfiguration) SetAvailabilityZones(v []*string) *ServiceConfiguration { - s.AvailabilityZones = v +// SetCreateTime sets the CreateTime field's value. +func (s *SpotFleetRequestConfig) SetCreateTime(v time.Time) *SpotFleetRequestConfig { + s.CreateTime = &v return s } -// SetBaseEndpointDnsNames sets the BaseEndpointDnsNames field's value. -func (s *ServiceConfiguration) SetBaseEndpointDnsNames(v []*string) *ServiceConfiguration { - s.BaseEndpointDnsNames = v +// SetSpotFleetRequestConfig sets the SpotFleetRequestConfig field's value. +func (s *SpotFleetRequestConfig) SetSpotFleetRequestConfig(v *SpotFleetRequestConfigData) *SpotFleetRequestConfig { + s.SpotFleetRequestConfig = v return s } -// SetNetworkLoadBalancerArns sets the NetworkLoadBalancerArns field's value. -func (s *ServiceConfiguration) SetNetworkLoadBalancerArns(v []*string) *ServiceConfiguration { - s.NetworkLoadBalancerArns = v +// SetSpotFleetRequestId sets the SpotFleetRequestId field's value. +func (s *SpotFleetRequestConfig) SetSpotFleetRequestId(v string) *SpotFleetRequestConfig { + s.SpotFleetRequestId = &v return s } -// SetPrivateDnsName sets the PrivateDnsName field's value. -func (s *ServiceConfiguration) SetPrivateDnsName(v string) *ServiceConfiguration { - s.PrivateDnsName = &v +// SetSpotFleetRequestState sets the SpotFleetRequestState field's value. +func (s *SpotFleetRequestConfig) SetSpotFleetRequestState(v string) *SpotFleetRequestConfig { + s.SpotFleetRequestState = &v return s } -// SetServiceId sets the ServiceId field's value. -func (s *ServiceConfiguration) SetServiceId(v string) *ServiceConfiguration { - s.ServiceId = &v - return s -} +// Describes the configuration of a Spot Fleet request. +type SpotFleetRequestConfigData struct { + _ struct{} `type:"structure"` -// SetServiceName sets the ServiceName field's value. -func (s *ServiceConfiguration) SetServiceName(v string) *ServiceConfiguration { - s.ServiceName = &v - return s -} + // Indicates how to allocate the target capacity across the Spot pools specified + // by the Spot Fleet request. The default is lowestPrice. + AllocationStrategy *string `locationName:"allocationStrategy" type:"string" enum:"AllocationStrategy"` -// SetServiceState sets the ServiceState field's value. -func (s *ServiceConfiguration) SetServiceState(v string) *ServiceConfiguration { - s.ServiceState = &v - return s -} + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of your listings. This helps to avoid duplicate listings. For more information, + // see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + ClientToken *string `locationName:"clientToken" type:"string"` -// SetServiceType sets the ServiceType field's value. -func (s *ServiceConfiguration) SetServiceType(v []*ServiceTypeDetail) *ServiceConfiguration { - s.ServiceType = v - return s -} + // 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. + ExcessCapacityTerminationPolicy *string `locationName:"excessCapacityTerminationPolicy" type:"string" enum:"ExcessCapacityTerminationPolicy"` -// Describes a VPC endpoint service. -type ServiceDetail struct { - _ struct{} `type:"structure"` + // The number of units fulfilled by this request compared to the set target + // capacity. You cannot set this value. + FulfilledCapacity *float64 `locationName:"fulfilledCapacity" type:"double"` - // Indicates whether VPC endpoint connection requests to the service must be - // accepted by the service owner. - AcceptanceRequired *bool `locationName:"acceptanceRequired" type:"boolean"` + // Grants the Spot Fleet permission to terminate Spot Instances on your behalf + // when you cancel its Spot Fleet request using CancelSpotFleetRequests or when + // the Spot Fleet request expires, if you set terminateInstancesWithExpiration. + // + // IamFleetRole is a required field + IamFleetRole *string `locationName:"iamFleetRole" type:"string" required:"true"` - // The Availability Zones in which the service is available. - AvailabilityZones []*string `locationName:"availabilityZoneSet" locationNameList:"item" type:"list"` + // The behavior when a Spot Instance is interrupted. The default is terminate. + InstanceInterruptionBehavior *string `locationName:"instanceInterruptionBehavior" type:"string" enum:"InstanceInterruptionBehavior"` - // The DNS names for the service. - BaseEndpointDnsNames []*string `locationName:"baseEndpointDnsNameSet" locationNameList:"item" type:"list"` + // The number of Spot pools across which to allocate your target Spot capacity. + // 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. + InstancePoolsToUseCount *int64 `locationName:"instancePoolsToUseCount" type:"integer"` - // The AWS account ID of the service owner. - Owner *string `locationName:"owner" type:"string"` + // The launch specifications for the Spot Fleet request. + LaunchSpecifications []*SpotFleetLaunchSpecification `locationName:"launchSpecifications" locationNameList:"item" type:"list"` - // The private DNS name for the service. - PrivateDnsName *string `locationName:"privateDnsName" type:"string"` + // The launch template and overrides. + LaunchTemplateConfigs []*LaunchTemplateConfig `locationName:"launchTemplateConfigs" locationNameList:"item" type:"list"` - // The Amazon Resource Name (ARN) of the service. - ServiceName *string `locationName:"serviceName" type:"string"` + // One or more Classic Load Balancers and target groups to attach to the Spot + // Fleet request. Spot Fleet registers the running Spot Instances with the specified + // Classic Load Balancers and target groups. + // + // With Network Load Balancers, Spot Fleet cannot register instances that have + // the following instance types: C1, CC1, CC2, CG1, CG2, CR1, CS1, G1, G2, HI1, + // HS1, M1, M2, M3, and T1. + LoadBalancersConfig *LoadBalancersConfig `locationName:"loadBalancersConfig" type:"structure"` - // The type of service. - ServiceType []*ServiceTypeDetail `locationName:"serviceType" locationNameList:"item" type:"list"` + // The order of the launch template overrides to use in fulfilling On-Demand + // capacity. If you specify lowestPrice, Spot Fleet uses price to determine + // the order, launching the lowest price first. If you specify prioritized, + // Spot Fleet uses the priority that you assign to each Spot Fleet launch template + // override, launching the highest priority first. If you do not specify a value, + // Spot Fleet defaults to lowestPrice. + OnDemandAllocationStrategy *string `locationName:"onDemandAllocationStrategy" type:"string" enum:"OnDemandAllocationStrategy"` - // Indicates whether the service supports endpoint policies. - VpcEndpointPolicySupported *bool `locationName:"vpcEndpointPolicySupported" type:"boolean"` + // The number of On-Demand units fulfilled by this request compared to the set + // target On-Demand capacity. + OnDemandFulfilledCapacity *float64 `locationName:"onDemandFulfilledCapacity" type:"double"` + + // The number of On-Demand units to request. You can choose to set the target + // capacity in terms of instances or a performance characteristic that is important + // to your application workload, such as vCPUs, memory, or I/O. If the request + // type is maintain, you can specify a target capacity of 0 and add capacity + // later. + OnDemandTargetCapacity *int64 `locationName:"onDemandTargetCapacity" type:"integer"` + + // Indicates whether Spot Fleet should replace unhealthy instances. + ReplaceUnhealthyInstances *bool `locationName:"replaceUnhealthyInstances" type:"boolean"` + + // The maximum price per unit hour that you are willing to pay for a Spot Instance. + // The default is the On-Demand price. + SpotPrice *string `locationName:"spotPrice" type:"string"` + + // The number of units to request. You can choose to set the target capacity + // in terms of instances or a performance characteristic that is important to + // your application workload, such as vCPUs, memory, or I/O. If the request + // type is maintain, you can specify a target capacity of 0 and add capacity + // later. + // + // TargetCapacity is a required field + TargetCapacity *int64 `locationName:"targetCapacity" type:"integer" required:"true"` + + // Indicates whether running Spot Instances should be terminated when the Spot + // Fleet request expires. + TerminateInstancesWithExpiration *bool `locationName:"terminateInstancesWithExpiration" type:"boolean"` + + // The type of request. Indicates whether the Spot Fleet only requests the target + // capacity or also attempts to maintain it. When this value is request, the + // Spot Fleet only places the required requests. It does not attempt to replenish + // Spot Instances if capacity is diminished, nor does it submit requests in + // alternative Spot pools if capacity is not available. When this value is maintain, + // the Spot Fleet maintains the target capacity. The Spot Fleet places the required + // requests to meet capacity and automatically replenishes any interrupted instances. + // Default: maintain. instant is listed but is not used by Spot Fleet. + Type *string `locationName:"type" type:"string" enum:"FleetType"` + + // The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + // The default is to start fulfilling the request immediately. + ValidFrom *time.Time `locationName:"validFrom" type:"timestamp"` + + // The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + // At this point, no new Spot Instance requests are placed or able to fulfill + // the request. The default end date is 7 days from the current date. + ValidUntil *time.Time `locationName:"validUntil" type:"timestamp"` } // String returns the string representation -func (s ServiceDetail) String() string { +func (s SpotFleetRequestConfigData) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ServiceDetail) GoString() string { +func (s SpotFleetRequestConfigData) GoString() string { return s.String() } -// SetAcceptanceRequired sets the AcceptanceRequired field's value. -func (s *ServiceDetail) SetAcceptanceRequired(v bool) *ServiceDetail { - s.AcceptanceRequired = &v +// Validate inspects the fields of the type to determine if they are valid. +func (s *SpotFleetRequestConfigData) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SpotFleetRequestConfigData"} + if s.IamFleetRole == nil { + invalidParams.Add(request.NewErrParamRequired("IamFleetRole")) + } + if s.TargetCapacity == nil { + invalidParams.Add(request.NewErrParamRequired("TargetCapacity")) + } + if s.LaunchTemplateConfigs != nil { + for i, v := range s.LaunchTemplateConfigs { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LaunchTemplateConfigs", i), err.(request.ErrInvalidParams)) + } + } + } + if s.LoadBalancersConfig != nil { + if err := s.LoadBalancersConfig.Validate(); err != nil { + invalidParams.AddNested("LoadBalancersConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAllocationStrategy sets the AllocationStrategy field's value. +func (s *SpotFleetRequestConfigData) SetAllocationStrategy(v string) *SpotFleetRequestConfigData { + s.AllocationStrategy = &v + return s +} + +// SetClientToken sets the ClientToken field's value. +func (s *SpotFleetRequestConfigData) SetClientToken(v string) *SpotFleetRequestConfigData { + s.ClientToken = &v + return s +} + +// SetExcessCapacityTerminationPolicy sets the ExcessCapacityTerminationPolicy field's value. +func (s *SpotFleetRequestConfigData) SetExcessCapacityTerminationPolicy(v string) *SpotFleetRequestConfigData { + s.ExcessCapacityTerminationPolicy = &v return s } -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *ServiceDetail) SetAvailabilityZones(v []*string) *ServiceDetail { - s.AvailabilityZones = v +// SetFulfilledCapacity sets the FulfilledCapacity field's value. +func (s *SpotFleetRequestConfigData) SetFulfilledCapacity(v float64) *SpotFleetRequestConfigData { + s.FulfilledCapacity = &v return s } -// SetBaseEndpointDnsNames sets the BaseEndpointDnsNames field's value. -func (s *ServiceDetail) SetBaseEndpointDnsNames(v []*string) *ServiceDetail { - s.BaseEndpointDnsNames = v +// SetIamFleetRole sets the IamFleetRole field's value. +func (s *SpotFleetRequestConfigData) SetIamFleetRole(v string) *SpotFleetRequestConfigData { + s.IamFleetRole = &v return s } -// SetOwner sets the Owner field's value. -func (s *ServiceDetail) SetOwner(v string) *ServiceDetail { - s.Owner = &v +// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value. +func (s *SpotFleetRequestConfigData) SetInstanceInterruptionBehavior(v string) *SpotFleetRequestConfigData { + s.InstanceInterruptionBehavior = &v return s } -// SetPrivateDnsName sets the PrivateDnsName field's value. -func (s *ServiceDetail) SetPrivateDnsName(v string) *ServiceDetail { - s.PrivateDnsName = &v +// SetInstancePoolsToUseCount sets the InstancePoolsToUseCount field's value. +func (s *SpotFleetRequestConfigData) SetInstancePoolsToUseCount(v int64) *SpotFleetRequestConfigData { + s.InstancePoolsToUseCount = &v return s } -// SetServiceName sets the ServiceName field's value. -func (s *ServiceDetail) SetServiceName(v string) *ServiceDetail { - s.ServiceName = &v +// SetLaunchSpecifications sets the LaunchSpecifications field's value. +func (s *SpotFleetRequestConfigData) SetLaunchSpecifications(v []*SpotFleetLaunchSpecification) *SpotFleetRequestConfigData { + s.LaunchSpecifications = v return s } -// SetServiceType sets the ServiceType field's value. -func (s *ServiceDetail) SetServiceType(v []*ServiceTypeDetail) *ServiceDetail { - s.ServiceType = v +// SetLaunchTemplateConfigs sets the LaunchTemplateConfigs field's value. +func (s *SpotFleetRequestConfigData) SetLaunchTemplateConfigs(v []*LaunchTemplateConfig) *SpotFleetRequestConfigData { + s.LaunchTemplateConfigs = v return s } -// SetVpcEndpointPolicySupported sets the VpcEndpointPolicySupported field's value. -func (s *ServiceDetail) SetVpcEndpointPolicySupported(v bool) *ServiceDetail { - s.VpcEndpointPolicySupported = &v +// SetLoadBalancersConfig sets the LoadBalancersConfig field's value. +func (s *SpotFleetRequestConfigData) SetLoadBalancersConfig(v *LoadBalancersConfig) *SpotFleetRequestConfigData { + s.LoadBalancersConfig = v return s } -// Describes the type of service for a VPC endpoint. -type ServiceTypeDetail struct { - _ struct{} `type:"structure"` - - // The type of service. - ServiceType *string `locationName:"serviceType" type:"string" enum:"ServiceType"` +// SetOnDemandAllocationStrategy sets the OnDemandAllocationStrategy field's value. +func (s *SpotFleetRequestConfigData) SetOnDemandAllocationStrategy(v string) *SpotFleetRequestConfigData { + s.OnDemandAllocationStrategy = &v + return s } -// String returns the string representation -func (s ServiceTypeDetail) String() string { - return awsutil.Prettify(s) +// SetOnDemandFulfilledCapacity sets the OnDemandFulfilledCapacity field's value. +func (s *SpotFleetRequestConfigData) SetOnDemandFulfilledCapacity(v float64) *SpotFleetRequestConfigData { + s.OnDemandFulfilledCapacity = &v + return s } -// GoString returns the string representation -func (s ServiceTypeDetail) GoString() string { - return s.String() +// SetOnDemandTargetCapacity sets the OnDemandTargetCapacity field's value. +func (s *SpotFleetRequestConfigData) SetOnDemandTargetCapacity(v int64) *SpotFleetRequestConfigData { + s.OnDemandTargetCapacity = &v + return s } -// SetServiceType sets the ServiceType field's value. -func (s *ServiceTypeDetail) SetServiceType(v string) *ServiceTypeDetail { - s.ServiceType = &v +// SetReplaceUnhealthyInstances sets the ReplaceUnhealthyInstances field's value. +func (s *SpotFleetRequestConfigData) SetReplaceUnhealthyInstances(v bool) *SpotFleetRequestConfigData { + s.ReplaceUnhealthyInstances = &v return s } -// Describes the time period for a Scheduled Instance to start its first schedule. -// The time period must span less than one day. -type SlotDateTimeRangeRequest struct { - _ struct{} `type:"structure"` - - // The earliest date and time, in UTC, for the Scheduled Instance to start. - // - // EarliestTime is a required field - EarliestTime *time.Time `type:"timestamp" required:"true"` - - // The latest date and time, in UTC, for the Scheduled Instance to start. This - // value must be later than or equal to the earliest date and at most three - // months in the future. - // - // LatestTime is a required field - LatestTime *time.Time `type:"timestamp" required:"true"` +// SetSpotPrice sets the SpotPrice field's value. +func (s *SpotFleetRequestConfigData) SetSpotPrice(v string) *SpotFleetRequestConfigData { + s.SpotPrice = &v + return s } -// String returns the string representation -func (s SlotDateTimeRangeRequest) String() string { - return awsutil.Prettify(s) +// SetTargetCapacity sets the TargetCapacity field's value. +func (s *SpotFleetRequestConfigData) SetTargetCapacity(v int64) *SpotFleetRequestConfigData { + s.TargetCapacity = &v + return s } -// GoString returns the string representation -func (s SlotDateTimeRangeRequest) GoString() string { - return s.String() +// SetTerminateInstancesWithExpiration sets the TerminateInstancesWithExpiration field's value. +func (s *SpotFleetRequestConfigData) SetTerminateInstancesWithExpiration(v bool) *SpotFleetRequestConfigData { + s.TerminateInstancesWithExpiration = &v + return s } -// Validate inspects the fields of the type to determine if they are valid. -func (s *SlotDateTimeRangeRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SlotDateTimeRangeRequest"} - if s.EarliestTime == nil { - invalidParams.Add(request.NewErrParamRequired("EarliestTime")) - } - if s.LatestTime == nil { - invalidParams.Add(request.NewErrParamRequired("LatestTime")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetType sets the Type field's value. +func (s *SpotFleetRequestConfigData) SetType(v string) *SpotFleetRequestConfigData { + s.Type = &v + return s } -// SetEarliestTime sets the EarliestTime field's value. -func (s *SlotDateTimeRangeRequest) SetEarliestTime(v time.Time) *SlotDateTimeRangeRequest { - s.EarliestTime = &v +// SetValidFrom sets the ValidFrom field's value. +func (s *SpotFleetRequestConfigData) SetValidFrom(v time.Time) *SpotFleetRequestConfigData { + s.ValidFrom = &v return s } -// SetLatestTime sets the LatestTime field's value. -func (s *SlotDateTimeRangeRequest) SetLatestTime(v time.Time) *SlotDateTimeRangeRequest { - s.LatestTime = &v +// SetValidUntil sets the ValidUntil field's value. +func (s *SpotFleetRequestConfigData) SetValidUntil(v time.Time) *SpotFleetRequestConfigData { + s.ValidUntil = &v return s } -// Describes the time period for a Scheduled Instance to start its first schedule. -type SlotStartTimeRangeRequest struct { +// The tags for a Spot Fleet resource. +type SpotFleetTagSpecification struct { _ struct{} `type:"structure"` - // The earliest date and time, in UTC, for the Scheduled Instance to start. - EarliestTime *time.Time `type:"timestamp"` + // The type of resource. Currently, the only resource type that is supported + // is instance. + ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - // The latest date and time, in UTC, for the Scheduled Instance to start. - LatestTime *time.Time `type:"timestamp"` + // The tags. + Tags []*Tag `locationName:"tag" locationNameList:"item" type:"list"` } // String returns the string representation -func (s SlotStartTimeRangeRequest) String() string { +func (s SpotFleetTagSpecification) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s SlotStartTimeRangeRequest) GoString() string { +func (s SpotFleetTagSpecification) GoString() string { return s.String() } -// SetEarliestTime sets the EarliestTime field's value. -func (s *SlotStartTimeRangeRequest) SetEarliestTime(v time.Time) *SlotStartTimeRangeRequest { - s.EarliestTime = &v +// SetResourceType sets the ResourceType field's value. +func (s *SpotFleetTagSpecification) SetResourceType(v string) *SpotFleetTagSpecification { + s.ResourceType = &v return s } -// SetLatestTime sets the LatestTime field's value. -func (s *SlotStartTimeRangeRequest) SetLatestTime(v time.Time) *SlotStartTimeRangeRequest { - s.LatestTime = &v +// SetTags sets the Tags field's value. +func (s *SpotFleetTagSpecification) SetTags(v []*Tag) *SpotFleetTagSpecification { + s.Tags = v return s } -// Describes a snapshot. -type Snapshot struct { +// Describes a Spot Instance request. +type SpotInstanceRequest struct { _ struct{} `type:"structure"` - // The data encryption key identifier for the snapshot. This value is a unique - // identifier that corresponds to the data encryption key that was used to encrypt - // the original volume or snapshot copy. Because data encryption keys are inherited - // by volumes created from snapshots, and vice versa, if snapshots share the - // same data encryption key identifier, then they belong to the same volume/snapshot - // lineage. This parameter is only returned by the DescribeSnapshots API operation. - DataEncryptionKeyId *string `locationName:"dataEncryptionKeyId" type:"string"` + // 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. + ActualBlockHourlyPrice *string `locationName:"actualBlockHourlyPrice" type:"string"` - // The description for the snapshot. - Description *string `locationName:"description" type:"string"` + // The Availability Zone group. If you specify the same Availability Zone group + // for all Spot Instance requests, all Spot Instances are launched in the same + // Availability Zone. + AvailabilityZoneGroup *string `locationName:"availabilityZoneGroup" type:"string"` - // Indicates whether the snapshot is encrypted. - Encrypted *bool `locationName:"encrypted" type:"boolean"` + // The duration for the Spot Instance, in minutes. + BlockDurationMinutes *int64 `locationName:"blockDurationMinutes" type:"integer"` - // The full 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. - KmsKeyId *string `locationName:"kmsKeyId" type:"string"` + // The date and time when the Spot Instance request was created, in UTC format + // (for example, YYYY-MM-DDTHH:MM:SSZ). + CreateTime *time.Time `locationName:"createTime" type:"timestamp"` - // Value from an Amazon-maintained list (amazon | aws-marketplace | microsoft) - // of snapshot owners. Not to be confused with the user-configured AWS account - // alias, which is set from the IAM console. - OwnerAlias *string `locationName:"ownerAlias" type:"string"` + // The fault codes for the Spot Instance request, if any. + Fault *SpotInstanceStateFault `locationName:"fault" type:"structure"` - // The AWS account ID of the EBS snapshot owner. - OwnerId *string `locationName:"ownerId" type:"string"` + // The instance ID, if an instance has been launched to fulfill the Spot Instance + // request. + InstanceId *string `locationName:"instanceId" type:"string"` - // The progress of the snapshot, as a percentage. - Progress *string `locationName:"progress" type:"string"` + // The behavior when a Spot Instance is interrupted. + InstanceInterruptionBehavior *string `locationName:"instanceInterruptionBehavior" type:"string" enum:"InstanceInterruptionBehavior"` - // The ID of the snapshot. Each snapshot receives a unique identifier when it - // is created. - SnapshotId *string `locationName:"snapshotId" type:"string"` + // The instance launch group. Launch groups are Spot Instances that launch together + // and terminate together. + LaunchGroup *string `locationName:"launchGroup" type:"string"` - // The time stamp when the snapshot was initiated. - StartTime *time.Time `locationName:"startTime" type:"timestamp"` + // Additional information for launching instances. + LaunchSpecification *LaunchSpecification `locationName:"launchSpecification" type:"structure"` - // The snapshot state. - State *string `locationName:"status" type:"string" enum:"SnapshotState"` + // The Availability Zone in which the request is launched. + LaunchedAvailabilityZone *string `locationName:"launchedAvailabilityZone" type:"string"` - // 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 - // by the DescribeSnapshots API operation. - StateMessage *string `locationName:"statusMessage" type:"string"` + // The product description associated with the Spot Instance. + ProductDescription *string `locationName:"productDescription" type:"string" enum:"RIProductDescription"` - // Any tags assigned to the snapshot. + // The ID of the Spot Instance request. + SpotInstanceRequestId *string `locationName:"spotInstanceRequestId" type:"string"` + + // The maximum price per hour that you are willing to pay for a Spot Instance. + SpotPrice *string `locationName:"spotPrice" type:"string"` + + // The state of the Spot Instance request. Spot status information helps track + // your Spot Instance requests. For more information, see Spot Status (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html) + // in the Amazon EC2 User Guide for Linux Instances. + State *string `locationName:"state" type:"string" enum:"SpotInstanceState"` + + // The status code and status message describing the Spot Instance request. + Status *SpotInstanceStatus `locationName:"status" type:"structure"` + + // Any tags assigned to the resource. Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - // The ID of the volume that was used to create the snapshot. Snapshots created - // by the CopySnapshot action have an arbitrary volume ID that should not be - // used for any purpose. - VolumeId *string `locationName:"volumeId" type:"string"` + // The Spot Instance request type. + Type *string `locationName:"type" type:"string" enum:"SpotInstanceType"` - // The size of the volume, in GiB. - VolumeSize *int64 `locationName:"volumeSize" type:"integer"` + // The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + // The request becomes active at this date and time. + ValidFrom *time.Time `locationName:"validFrom" type:"timestamp"` + + // The end date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + // If this is a one-time request, it remains active until all instances launch, + // the request is canceled, or this date is reached. If the request is persistent, + // it remains active until it is canceled or this date is reached. The default + // end date is 7 days from the current date. + ValidUntil *time.Time `locationName:"validUntil" type:"timestamp"` } // String returns the string representation -func (s Snapshot) String() string { +func (s SpotInstanceRequest) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Snapshot) GoString() string { +func (s SpotInstanceRequest) GoString() string { return s.String() } -// SetDataEncryptionKeyId sets the DataEncryptionKeyId field's value. -func (s *Snapshot) SetDataEncryptionKeyId(v string) *Snapshot { - s.DataEncryptionKeyId = &v +// SetActualBlockHourlyPrice sets the ActualBlockHourlyPrice field's value. +func (s *SpotInstanceRequest) SetActualBlockHourlyPrice(v string) *SpotInstanceRequest { + s.ActualBlockHourlyPrice = &v return s } -// SetDescription sets the Description field's value. -func (s *Snapshot) SetDescription(v string) *Snapshot { - s.Description = &v +// SetAvailabilityZoneGroup sets the AvailabilityZoneGroup field's value. +func (s *SpotInstanceRequest) SetAvailabilityZoneGroup(v string) *SpotInstanceRequest { + s.AvailabilityZoneGroup = &v return s } -// SetEncrypted sets the Encrypted field's value. -func (s *Snapshot) SetEncrypted(v bool) *Snapshot { - s.Encrypted = &v +// SetBlockDurationMinutes sets the BlockDurationMinutes field's value. +func (s *SpotInstanceRequest) SetBlockDurationMinutes(v int64) *SpotInstanceRequest { + s.BlockDurationMinutes = &v return s } -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *Snapshot) SetKmsKeyId(v string) *Snapshot { - s.KmsKeyId = &v +// SetCreateTime sets the CreateTime field's value. +func (s *SpotInstanceRequest) SetCreateTime(v time.Time) *SpotInstanceRequest { + s.CreateTime = &v return s } -// SetOwnerAlias sets the OwnerAlias field's value. -func (s *Snapshot) SetOwnerAlias(v string) *Snapshot { - s.OwnerAlias = &v +// SetFault sets the Fault field's value. +func (s *SpotInstanceRequest) SetFault(v *SpotInstanceStateFault) *SpotInstanceRequest { + s.Fault = v return s } -// SetOwnerId sets the OwnerId field's value. -func (s *Snapshot) SetOwnerId(v string) *Snapshot { - s.OwnerId = &v +// SetInstanceId sets the InstanceId field's value. +func (s *SpotInstanceRequest) SetInstanceId(v string) *SpotInstanceRequest { + s.InstanceId = &v return s } -// SetProgress sets the Progress field's value. -func (s *Snapshot) SetProgress(v string) *Snapshot { - s.Progress = &v +// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value. +func (s *SpotInstanceRequest) SetInstanceInterruptionBehavior(v string) *SpotInstanceRequest { + s.InstanceInterruptionBehavior = &v return s } -// SetSnapshotId sets the SnapshotId field's value. -func (s *Snapshot) SetSnapshotId(v string) *Snapshot { - s.SnapshotId = &v +// SetLaunchGroup sets the LaunchGroup field's value. +func (s *SpotInstanceRequest) SetLaunchGroup(v string) *SpotInstanceRequest { + s.LaunchGroup = &v return s } -// SetStartTime sets the StartTime field's value. -func (s *Snapshot) SetStartTime(v time.Time) *Snapshot { - s.StartTime = &v +// SetLaunchSpecification sets the LaunchSpecification field's value. +func (s *SpotInstanceRequest) SetLaunchSpecification(v *LaunchSpecification) *SpotInstanceRequest { + s.LaunchSpecification = v + return s +} + +// SetLaunchedAvailabilityZone sets the LaunchedAvailabilityZone field's value. +func (s *SpotInstanceRequest) SetLaunchedAvailabilityZone(v string) *SpotInstanceRequest { + s.LaunchedAvailabilityZone = &v + return s +} + +// SetProductDescription sets the ProductDescription field's value. +func (s *SpotInstanceRequest) SetProductDescription(v string) *SpotInstanceRequest { + s.ProductDescription = &v + return s +} + +// SetSpotInstanceRequestId sets the SpotInstanceRequestId field's value. +func (s *SpotInstanceRequest) SetSpotInstanceRequestId(v string) *SpotInstanceRequest { + s.SpotInstanceRequestId = &v + return s +} + +// SetSpotPrice sets the SpotPrice field's value. +func (s *SpotInstanceRequest) SetSpotPrice(v string) *SpotInstanceRequest { + s.SpotPrice = &v return s } // SetState sets the State field's value. -func (s *Snapshot) SetState(v string) *Snapshot { +func (s *SpotInstanceRequest) SetState(v string) *SpotInstanceRequest { s.State = &v return s } -// SetStateMessage sets the StateMessage field's value. -func (s *Snapshot) SetStateMessage(v string) *Snapshot { - s.StateMessage = &v +// SetStatus sets the Status field's value. +func (s *SpotInstanceRequest) SetStatus(v *SpotInstanceStatus) *SpotInstanceRequest { + s.Status = v return s } // SetTags sets the Tags field's value. -func (s *Snapshot) SetTags(v []*Tag) *Snapshot { +func (s *SpotInstanceRequest) SetTags(v []*Tag) *SpotInstanceRequest { s.Tags = v return s } -// SetVolumeId sets the VolumeId field's value. -func (s *Snapshot) SetVolumeId(v string) *Snapshot { - s.VolumeId = &v +// SetType sets the Type field's value. +func (s *SpotInstanceRequest) SetType(v string) *SpotInstanceRequest { + s.Type = &v return s } -// SetVolumeSize sets the VolumeSize field's value. -func (s *Snapshot) SetVolumeSize(v int64) *Snapshot { - s.VolumeSize = &v +// SetValidFrom sets the ValidFrom field's value. +func (s *SpotInstanceRequest) SetValidFrom(v time.Time) *SpotInstanceRequest { + s.ValidFrom = &v return s } -// Describes the snapshot created from the imported disk. -type SnapshotDetail struct { +// SetValidUntil sets the ValidUntil field's value. +func (s *SpotInstanceRequest) SetValidUntil(v time.Time) *SpotInstanceRequest { + s.ValidUntil = &v + return s +} + +// Describes a Spot Instance state change. +type SpotInstanceStateFault struct { _ struct{} `type:"structure"` - // A description for the snapshot. - Description *string `locationName:"description" type:"string"` + // The reason code for the Spot Instance state change. + Code *string `locationName:"code" type:"string"` - // The block device mapping for the snapshot. - DeviceName *string `locationName:"deviceName" type:"string"` + // The message for the Spot Instance state change. + Message *string `locationName:"message" type:"string"` +} - // The size of the disk in the snapshot, in GiB. - DiskImageSize *float64 `locationName:"diskImageSize" type:"double"` +// String returns the string representation +func (s SpotInstanceStateFault) String() string { + return awsutil.Prettify(s) +} - // The format of the disk image from which the snapshot is created. - Format *string `locationName:"format" type:"string"` +// GoString returns the string representation +func (s SpotInstanceStateFault) GoString() string { + return s.String() +} - // The percentage of progress for the task. - Progress *string `locationName:"progress" type:"string"` +// SetCode sets the Code field's value. +func (s *SpotInstanceStateFault) SetCode(v string) *SpotInstanceStateFault { + s.Code = &v + return s +} - // The snapshot ID of the disk being imported. - SnapshotId *string `locationName:"snapshotId" type:"string"` +// SetMessage sets the Message field's value. +func (s *SpotInstanceStateFault) SetMessage(v string) *SpotInstanceStateFault { + s.Message = &v + return s +} - // A brief status of the snapshot creation. - Status *string `locationName:"status" type:"string"` +// Describes the status of a Spot Instance request. +type SpotInstanceStatus struct { + _ struct{} `type:"structure"` - // A detailed status message for the snapshot creation. - StatusMessage *string `locationName:"statusMessage" type:"string"` + // The status code. For a list of status codes, see Spot Status Codes (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html#spot-instance-bid-status-understand) + // in the Amazon EC2 User Guide for Linux Instances. + Code *string `locationName:"code" type:"string"` - // The URL used to access the disk image. - Url *string `locationName:"url" type:"string"` + // The description for the status code. + Message *string `locationName:"message" type:"string"` - // The S3 bucket for the disk image. - UserBucket *UserBucketDetails `locationName:"userBucket" type:"structure"` + // The date and time of the most recent status update, in UTC format (for example, + // YYYY-MM-DDTHH:MM:SSZ). + UpdateTime *time.Time `locationName:"updateTime" type:"timestamp"` } // String returns the string representation -func (s SnapshotDetail) String() string { +func (s SpotInstanceStatus) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s SnapshotDetail) GoString() string { +func (s SpotInstanceStatus) GoString() string { return s.String() } -// SetDescription sets the Description field's value. -func (s *SnapshotDetail) SetDescription(v string) *SnapshotDetail { - s.Description = &v +// SetCode sets the Code field's value. +func (s *SpotInstanceStatus) SetCode(v string) *SpotInstanceStatus { + s.Code = &v return s } -// SetDeviceName sets the DeviceName field's value. -func (s *SnapshotDetail) SetDeviceName(v string) *SnapshotDetail { - s.DeviceName = &v +// SetMessage sets the Message field's value. +func (s *SpotInstanceStatus) SetMessage(v string) *SpotInstanceStatus { + s.Message = &v return s } -// SetDiskImageSize sets the DiskImageSize field's value. -func (s *SnapshotDetail) SetDiskImageSize(v float64) *SnapshotDetail { - s.DiskImageSize = &v +// SetUpdateTime sets the UpdateTime field's value. +func (s *SpotInstanceStatus) SetUpdateTime(v time.Time) *SpotInstanceStatus { + s.UpdateTime = &v return s } -// SetFormat sets the Format field's value. -func (s *SnapshotDetail) SetFormat(v string) *SnapshotDetail { - s.Format = &v - return s +// The options for Spot Instances. +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). + BlockDurationMinutes *int64 `type:"integer"` + + // The behavior when a Spot Instance is interrupted. The default is terminate. + InstanceInterruptionBehavior *string `type:"string" enum:"InstanceInterruptionBehavior"` + + // The maximum hourly price you're willing to pay for the Spot Instances. The + // default is the On-Demand price. + MaxPrice *string `type:"string"` + + // The Spot Instance request type. For RunInstances, persistent Spot Instance + // requests are only supported when InstanceInterruptionBehavior is set to either + // hibernate or stop. + SpotInstanceType *string `type:"string" enum:"SpotInstanceType"` + + // The end date of the request. For a one-time request, the request remains + // active until all instances launch, the request is canceled, or this date + // is reached. If the request is persistent, it remains active until it is canceled + // or this date and time is reached. The default end date is 7 days from the + // current date. + ValidUntil *time.Time `type:"timestamp"` } -// SetProgress sets the Progress field's value. -func (s *SnapshotDetail) SetProgress(v string) *SnapshotDetail { - s.Progress = &v - return s +// String returns the string representation +func (s SpotMarketOptions) String() string { + return awsutil.Prettify(s) } -// SetSnapshotId sets the SnapshotId field's value. -func (s *SnapshotDetail) SetSnapshotId(v string) *SnapshotDetail { - s.SnapshotId = &v +// GoString returns the string representation +func (s SpotMarketOptions) GoString() string { + return s.String() +} + +// SetBlockDurationMinutes sets the BlockDurationMinutes field's value. +func (s *SpotMarketOptions) SetBlockDurationMinutes(v int64) *SpotMarketOptions { + s.BlockDurationMinutes = &v return s } -// SetStatus sets the Status field's value. -func (s *SnapshotDetail) SetStatus(v string) *SnapshotDetail { - s.Status = &v +// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value. +func (s *SpotMarketOptions) SetInstanceInterruptionBehavior(v string) *SpotMarketOptions { + s.InstanceInterruptionBehavior = &v return s } -// SetStatusMessage sets the StatusMessage field's value. -func (s *SnapshotDetail) SetStatusMessage(v string) *SnapshotDetail { - s.StatusMessage = &v +// SetMaxPrice sets the MaxPrice field's value. +func (s *SpotMarketOptions) SetMaxPrice(v string) *SpotMarketOptions { + s.MaxPrice = &v return s } -// SetUrl sets the Url field's value. -func (s *SnapshotDetail) SetUrl(v string) *SnapshotDetail { - s.Url = &v +// SetSpotInstanceType sets the SpotInstanceType field's value. +func (s *SpotMarketOptions) SetSpotInstanceType(v string) *SpotMarketOptions { + s.SpotInstanceType = &v return s } -// SetUserBucket sets the UserBucket field's value. -func (s *SnapshotDetail) SetUserBucket(v *UserBucketDetails) *SnapshotDetail { - s.UserBucket = v +// SetValidUntil sets the ValidUntil field's value. +func (s *SpotMarketOptions) SetValidUntil(v time.Time) *SpotMarketOptions { + s.ValidUntil = &v return s } -// The disk container object for the import snapshot request. -type SnapshotDiskContainer struct { +// Describes the configuration of Spot Instances in an EC2 Fleet. +type SpotOptions struct { _ struct{} `type:"structure"` - // The description of the disk image being imported. - Description *string `type:"string"` + // Indicates how to allocate the target capacity across the Spot pools specified + // by the Spot Fleet request. The default is lowest-price. + AllocationStrategy *string `locationName:"allocationStrategy" type:"string" enum:"SpotAllocationStrategy"` - // The format of the disk image being imported. - // - // Valid values: VHD | VMDK | OVA - Format *string `type:"string"` + // The behavior when a Spot Instance is interrupted. The default is terminate. + InstanceInterruptionBehavior *string `locationName:"instanceInterruptionBehavior" type:"string" enum:"SpotInstanceInterruptionBehavior"` - // The URL to the Amazon S3-based disk image being imported. It can either be - // a https URL (https://..) or an Amazon S3 URL (s3://..). - Url *string `type:"string"` + // The number of Spot pools across which to allocate your target Spot capacity. + // Valid only when AllocationStrategy is set to lowestPrice. EC2 Fleet selects + // the cheapest Spot pools and evenly allocates your target Spot capacity across + // the number of Spot pools that you specify. + InstancePoolsToUseCount *int64 `locationName:"instancePoolsToUseCount" type:"integer"` - // The S3 bucket for the disk image. - UserBucket *UserBucket `type:"structure"` + // The minimum target capacity for Spot Instances in the fleet. If the minimum + // target capacity is not reached, the fleet launches no instances. + MinTargetCapacity *int64 `locationName:"minTargetCapacity" type:"integer"` + + // Indicates that the fleet launches all Spot Instances into a single Availability + // Zone. + SingleAvailabilityZone *bool `locationName:"singleAvailabilityZone" type:"boolean"` + + // Indicates that the fleet uses a single instance type to launch all Spot Instances + // in the fleet. + SingleInstanceType *bool `locationName:"singleInstanceType" type:"boolean"` } // String returns the string representation -func (s SnapshotDiskContainer) String() string { +func (s SpotOptions) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s SnapshotDiskContainer) GoString() string { +func (s SpotOptions) GoString() string { return s.String() } -// SetDescription sets the Description field's value. -func (s *SnapshotDiskContainer) SetDescription(v string) *SnapshotDiskContainer { - s.Description = &v +// SetAllocationStrategy sets the AllocationStrategy field's value. +func (s *SpotOptions) SetAllocationStrategy(v string) *SpotOptions { + s.AllocationStrategy = &v return s } -// SetFormat sets the Format field's value. -func (s *SnapshotDiskContainer) SetFormat(v string) *SnapshotDiskContainer { - s.Format = &v +// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value. +func (s *SpotOptions) SetInstanceInterruptionBehavior(v string) *SpotOptions { + s.InstanceInterruptionBehavior = &v return s } -// SetUrl sets the Url field's value. -func (s *SnapshotDiskContainer) SetUrl(v string) *SnapshotDiskContainer { - s.Url = &v +// SetInstancePoolsToUseCount sets the InstancePoolsToUseCount field's value. +func (s *SpotOptions) SetInstancePoolsToUseCount(v int64) *SpotOptions { + s.InstancePoolsToUseCount = &v return s } -// SetUserBucket sets the UserBucket field's value. -func (s *SnapshotDiskContainer) SetUserBucket(v *UserBucket) *SnapshotDiskContainer { - s.UserBucket = v +// SetMinTargetCapacity sets the MinTargetCapacity field's value. +func (s *SpotOptions) SetMinTargetCapacity(v int64) *SpotOptions { + s.MinTargetCapacity = &v return s } -// Details about the import snapshot task. -type SnapshotTaskDetail struct { - _ struct{} `type:"structure"` - - // The description of the snapshot. - Description *string `locationName:"description" type:"string"` +// SetSingleAvailabilityZone sets the SingleAvailabilityZone field's value. +func (s *SpotOptions) SetSingleAvailabilityZone(v bool) *SpotOptions { + s.SingleAvailabilityZone = &v + return s +} - // The size of the disk in the snapshot, in GiB. - DiskImageSize *float64 `locationName:"diskImageSize" type:"double"` +// SetSingleInstanceType sets the SingleInstanceType field's value. +func (s *SpotOptions) SetSingleInstanceType(v bool) *SpotOptions { + s.SingleInstanceType = &v + return s +} - // The format of the disk image from which the snapshot is created. - Format *string `locationName:"format" type:"string"` +// Describes the configuration of Spot Instances in an EC2 Fleet request. +type SpotOptionsRequest struct { + _ struct{} `type:"structure"` - // The percentage of completion for the import snapshot task. - Progress *string `locationName:"progress" type:"string"` + // Indicates how to allocate the target capacity across the Spot pools specified + // by the Spot Fleet request. The default is lowestPrice. + AllocationStrategy *string `type:"string" enum:"SpotAllocationStrategy"` - // The snapshot ID of the disk being imported. - SnapshotId *string `locationName:"snapshotId" type:"string"` + // The behavior when a Spot Instance is interrupted. The default is terminate. + InstanceInterruptionBehavior *string `type:"string" enum:"SpotInstanceInterruptionBehavior"` - // A brief status for the import snapshot task. - Status *string `locationName:"status" type:"string"` + // The number of Spot pools across which to allocate your target Spot capacity. + // 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. + InstancePoolsToUseCount *int64 `type:"integer"` - // A detailed status message for the import snapshot task. - StatusMessage *string `locationName:"statusMessage" type:"string"` + // The minimum target capacity for Spot Instances in the fleet. If the minimum + // target capacity is not reached, the fleet launches no instances. + MinTargetCapacity *int64 `type:"integer"` - // The URL of the disk image from which the snapshot is created. - Url *string `locationName:"url" type:"string"` + // Indicates that the fleet launches all Spot Instances into a single Availability + // Zone. + SingleAvailabilityZone *bool `type:"boolean"` - // The S3 bucket for the disk image. - UserBucket *UserBucketDetails `locationName:"userBucket" type:"structure"` + // Indicates that the fleet uses a single instance type to launch all Spot Instances + // in the fleet. + SingleInstanceType *bool `type:"boolean"` } // String returns the string representation -func (s SnapshotTaskDetail) String() string { +func (s SpotOptionsRequest) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s SnapshotTaskDetail) GoString() string { +func (s SpotOptionsRequest) GoString() string { return s.String() } -// SetDescription sets the Description field's value. -func (s *SnapshotTaskDetail) SetDescription(v string) *SnapshotTaskDetail { - s.Description = &v +// SetAllocationStrategy sets the AllocationStrategy field's value. +func (s *SpotOptionsRequest) SetAllocationStrategy(v string) *SpotOptionsRequest { + s.AllocationStrategy = &v return s } -// SetDiskImageSize sets the DiskImageSize field's value. -func (s *SnapshotTaskDetail) SetDiskImageSize(v float64) *SnapshotTaskDetail { - s.DiskImageSize = &v +// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value. +func (s *SpotOptionsRequest) SetInstanceInterruptionBehavior(v string) *SpotOptionsRequest { + s.InstanceInterruptionBehavior = &v return s } -// SetFormat sets the Format field's value. -func (s *SnapshotTaskDetail) SetFormat(v string) *SnapshotTaskDetail { - s.Format = &v +// SetInstancePoolsToUseCount sets the InstancePoolsToUseCount field's value. +func (s *SpotOptionsRequest) SetInstancePoolsToUseCount(v int64) *SpotOptionsRequest { + s.InstancePoolsToUseCount = &v return s } -// SetProgress sets the Progress field's value. -func (s *SnapshotTaskDetail) SetProgress(v string) *SnapshotTaskDetail { - s.Progress = &v +// SetMinTargetCapacity sets the MinTargetCapacity field's value. +func (s *SpotOptionsRequest) SetMinTargetCapacity(v int64) *SpotOptionsRequest { + s.MinTargetCapacity = &v return s } -// SetSnapshotId sets the SnapshotId field's value. -func (s *SnapshotTaskDetail) SetSnapshotId(v string) *SnapshotTaskDetail { - s.SnapshotId = &v +// SetSingleAvailabilityZone sets the SingleAvailabilityZone field's value. +func (s *SpotOptionsRequest) SetSingleAvailabilityZone(v bool) *SpotOptionsRequest { + s.SingleAvailabilityZone = &v return s } -// SetStatus sets the Status field's value. -func (s *SnapshotTaskDetail) SetStatus(v string) *SnapshotTaskDetail { - s.Status = &v +// SetSingleInstanceType sets the SingleInstanceType field's value. +func (s *SpotOptionsRequest) SetSingleInstanceType(v bool) *SpotOptionsRequest { + s.SingleInstanceType = &v return s } -// SetStatusMessage sets the StatusMessage field's value. -func (s *SnapshotTaskDetail) SetStatusMessage(v string) *SnapshotTaskDetail { - s.StatusMessage = &v +// Describes Spot Instance placement. +type SpotPlacement struct { + _ struct{} `type:"structure"` + + // The Availability Zone. + // + // [Spot Fleet only] To specify multiple Availability Zones, separate them using + // commas; for example, "us-west-2a, us-west-2b". + AvailabilityZone *string `locationName:"availabilityZone" type:"string"` + + // The name of the placement group. + GroupName *string `locationName:"groupName" type:"string"` + + // The tenancy of the instance (if the instance is running in a VPC). An instance + // with a tenancy of dedicated runs on single-tenant hardware. The host tenancy + // is not supported for Spot Instances. + Tenancy *string `locationName:"tenancy" type:"string" enum:"Tenancy"` +} + +// String returns the string representation +func (s SpotPlacement) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SpotPlacement) GoString() string { + return s.String() +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *SpotPlacement) SetAvailabilityZone(v string) *SpotPlacement { + s.AvailabilityZone = &v return s } -// SetUrl sets the Url field's value. -func (s *SnapshotTaskDetail) SetUrl(v string) *SnapshotTaskDetail { - s.Url = &v +// SetGroupName sets the GroupName field's value. +func (s *SpotPlacement) SetGroupName(v string) *SpotPlacement { + s.GroupName = &v return s } -// SetUserBucket sets the UserBucket field's value. -func (s *SnapshotTaskDetail) SetUserBucket(v *UserBucketDetails) *SnapshotTaskDetail { - s.UserBucket = v +// SetTenancy sets the Tenancy field's value. +func (s *SpotPlacement) SetTenancy(v string) *SpotPlacement { + s.Tenancy = &v return s } -// Describes the data feed for a Spot Instance. -type SpotDatafeedSubscription struct { +// Describes the maximum price per hour that you are willing to pay for a Spot +// Instance. +type SpotPrice struct { _ struct{} `type:"structure"` - // The Amazon S3 bucket where the Spot Instance data feed is located. - Bucket *string `locationName:"bucket" type:"string"` + // The Availability Zone. + AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - // The fault codes for the Spot Instance request, if any. - Fault *SpotInstanceStateFault `locationName:"fault" type:"structure"` + // The instance type. + InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` - // The AWS account ID of the account. - OwnerId *string `locationName:"ownerId" type:"string"` + // A general description of the AMI. + ProductDescription *string `locationName:"productDescription" type:"string" enum:"RIProductDescription"` - // The prefix that is prepended to data feed files. - Prefix *string `locationName:"prefix" type:"string"` + // The maximum price per hour that you are willing to pay for a Spot Instance. + SpotPrice *string `locationName:"spotPrice" type:"string"` - // The state of the Spot Instance data feed subscription. - State *string `locationName:"state" type:"string" enum:"DatafeedSubscriptionState"` + // The date and time the request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). + Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` } // String returns the string representation -func (s SpotDatafeedSubscription) String() string { +func (s SpotPrice) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s SpotDatafeedSubscription) GoString() string { +func (s SpotPrice) GoString() string { return s.String() } -// SetBucket sets the Bucket field's value. -func (s *SpotDatafeedSubscription) SetBucket(v string) *SpotDatafeedSubscription { - s.Bucket = &v +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *SpotPrice) SetAvailabilityZone(v string) *SpotPrice { + s.AvailabilityZone = &v return s } -// SetFault sets the Fault field's value. -func (s *SpotDatafeedSubscription) SetFault(v *SpotInstanceStateFault) *SpotDatafeedSubscription { - s.Fault = v +// SetInstanceType sets the InstanceType field's value. +func (s *SpotPrice) SetInstanceType(v string) *SpotPrice { + s.InstanceType = &v return s } -// SetOwnerId sets the OwnerId field's value. -func (s *SpotDatafeedSubscription) SetOwnerId(v string) *SpotDatafeedSubscription { - s.OwnerId = &v +// SetProductDescription sets the ProductDescription field's value. +func (s *SpotPrice) SetProductDescription(v string) *SpotPrice { + s.ProductDescription = &v return s } -// SetPrefix sets the Prefix field's value. -func (s *SpotDatafeedSubscription) SetPrefix(v string) *SpotDatafeedSubscription { - s.Prefix = &v +// SetSpotPrice sets the SpotPrice field's value. +func (s *SpotPrice) SetSpotPrice(v string) *SpotPrice { + s.SpotPrice = &v return s } -// SetState sets the State field's value. -func (s *SpotDatafeedSubscription) SetState(v string) *SpotDatafeedSubscription { - s.State = &v +// SetTimestamp sets the Timestamp field's value. +func (s *SpotPrice) SetTimestamp(v time.Time) *SpotPrice { + s.Timestamp = &v return s } -// Describes the launch specification for one or more Spot Instances. -type SpotFleetLaunchSpecification struct { +// Describes a stale rule in a security group. +type StaleIpPermission struct { _ struct{} `type:"structure"` - // Deprecated. - AddressingType *string `locationName:"addressingType" type:"string"` - - // One or more block device mapping entries. You can't specify both a snapshot - // ID and an encryption value. This is because only blank volumes can be encrypted - // on creation. If a snapshot is the basis for a volume, it is not blank and - // its encryption status is used for the volume encryption status. - BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` - - // Indicates whether the instances are optimized for EBS I/O. This optimization - // provides dedicated throughput to Amazon EBS and an optimized configuration - // stack to provide optimal EBS I/O performance. This optimization isn't available - // with all instance types. Additional usage charges apply when using an EBS - // Optimized instance. - // - // Default: false - EbsOptimized *bool `locationName:"ebsOptimized" type:"boolean"` - - // The IAM instance profile. - IamInstanceProfile *IamInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"` - - // The ID of the AMI. - ImageId *string `locationName:"imageId" type:"string"` - - // The instance type. - InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` - - // The ID of the kernel. - KernelId *string `locationName:"kernelId" type:"string"` - - // The name of the key pair. - KeyName *string `locationName:"keyName" type:"string"` - - // Enable or disable monitoring for the instances. - Monitoring *SpotFleetMonitoring `locationName:"monitoring" type:"structure"` - - // One or more network interfaces. If you specify a network interface, you must - // specify subnet IDs and security group IDs using the network interface. - NetworkInterfaces []*InstanceNetworkInterfaceSpecification `locationName:"networkInterfaceSet" locationNameList:"item" type:"list"` - - // The placement information. - Placement *SpotPlacement `locationName:"placement" type:"structure"` - - // The ID of the RAM disk. - RamdiskId *string `locationName:"ramdiskId" type:"string"` - - // One or more security groups. When requesting instances in a VPC, you must - // specify the IDs of the security groups. When requesting instances in EC2-Classic, - // you can specify the names or the IDs of the security groups. - SecurityGroups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` + // The start of the port range for the TCP and UDP protocols, or an ICMP type + // number. A value of -1 indicates all ICMP types. + FromPort *int64 `locationName:"fromPort" type:"integer"` - // The maximum price per unit hour that you are willing to pay for a Spot Instance. - // If this value is not specified, the default is the Spot price specified for - // the fleet. To determine the Spot price per unit hour, divide the Spot price - // by the value of WeightedCapacity. - SpotPrice *string `locationName:"spotPrice" type:"string"` + // The IP protocol name (for tcp, udp, and icmp) or number (see Protocol Numbers) + // (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). + IpProtocol *string `locationName:"ipProtocol" type:"string"` - // The ID of the subnet in which to launch the instances. To specify multiple - // subnets, separate them using commas; for example, "subnet-a61dafcf, subnet-65ea5f08". - SubnetId *string `locationName:"subnetId" type:"string"` + // One or more IP ranges. Not applicable for stale security group rules. + IpRanges []*string `locationName:"ipRanges" locationNameList:"item" type:"list"` - // The tags to apply during creation. - TagSpecifications []*SpotFleetTagSpecification `locationName:"tagSpecificationSet" locationNameList:"item" type:"list"` + // One or more prefix list IDs for an AWS service. Not applicable for stale + // security group rules. + PrefixListIds []*string `locationName:"prefixListIds" locationNameList:"item" type:"list"` - // The Base64-encoded user data to make available to the instances. - UserData *string `locationName:"userData" type:"string"` + // The end of the port range for the TCP and UDP protocols, or an ICMP type + // number. A value of -1 indicates all ICMP types. + ToPort *int64 `locationName:"toPort" type:"integer"` - // The number of units provided by the specified instance type. These are the - // same units that you chose to set the target capacity in terms (instances - // or a performance characteristic such as vCPUs, memory, or I/O). - // - // If the target capacity divided by this value is not a whole number, we round - // the number of instances to the next whole number. If this value is not specified, - // the default is 1. - WeightedCapacity *float64 `locationName:"weightedCapacity" type:"double"` + // One or more security group pairs. Returns the ID of the referenced security + // group and VPC, and the ID and status of the VPC peering connection. + UserIdGroupPairs []*UserIdGroupPair `locationName:"groups" locationNameList:"item" type:"list"` } // String returns the string representation -func (s SpotFleetLaunchSpecification) String() string { +func (s StaleIpPermission) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s SpotFleetLaunchSpecification) GoString() string { +func (s StaleIpPermission) GoString() string { return s.String() } -// SetAddressingType sets the AddressingType field's value. -func (s *SpotFleetLaunchSpecification) SetAddressingType(v string) *SpotFleetLaunchSpecification { - s.AddressingType = &v +// SetFromPort sets the FromPort field's value. +func (s *StaleIpPermission) SetFromPort(v int64) *StaleIpPermission { + s.FromPort = &v return s } -// SetBlockDeviceMappings sets the BlockDeviceMappings field's value. -func (s *SpotFleetLaunchSpecification) SetBlockDeviceMappings(v []*BlockDeviceMapping) *SpotFleetLaunchSpecification { - s.BlockDeviceMappings = v +// SetIpProtocol sets the IpProtocol field's value. +func (s *StaleIpPermission) SetIpProtocol(v string) *StaleIpPermission { + s.IpProtocol = &v return s } -// SetEbsOptimized sets the EbsOptimized field's value. -func (s *SpotFleetLaunchSpecification) SetEbsOptimized(v bool) *SpotFleetLaunchSpecification { - s.EbsOptimized = &v +// SetIpRanges sets the IpRanges field's value. +func (s *StaleIpPermission) SetIpRanges(v []*string) *StaleIpPermission { + s.IpRanges = v return s } -// SetIamInstanceProfile sets the IamInstanceProfile field's value. -func (s *SpotFleetLaunchSpecification) SetIamInstanceProfile(v *IamInstanceProfileSpecification) *SpotFleetLaunchSpecification { - s.IamInstanceProfile = v +// SetPrefixListIds sets the PrefixListIds field's value. +func (s *StaleIpPermission) SetPrefixListIds(v []*string) *StaleIpPermission { + s.PrefixListIds = v return s } -// SetImageId sets the ImageId field's value. -func (s *SpotFleetLaunchSpecification) SetImageId(v string) *SpotFleetLaunchSpecification { - s.ImageId = &v +// SetToPort sets the ToPort field's value. +func (s *StaleIpPermission) SetToPort(v int64) *StaleIpPermission { + s.ToPort = &v return s } -// SetInstanceType sets the InstanceType field's value. -func (s *SpotFleetLaunchSpecification) SetInstanceType(v string) *SpotFleetLaunchSpecification { - s.InstanceType = &v +// SetUserIdGroupPairs sets the UserIdGroupPairs field's value. +func (s *StaleIpPermission) SetUserIdGroupPairs(v []*UserIdGroupPair) *StaleIpPermission { + s.UserIdGroupPairs = v return s } -// SetKernelId sets the KernelId field's value. -func (s *SpotFleetLaunchSpecification) SetKernelId(v string) *SpotFleetLaunchSpecification { - s.KernelId = &v - return s +// Describes a stale security group (a security group that contains stale rules). +type StaleSecurityGroup struct { + _ struct{} `type:"structure"` + + // The description of the security group. + Description *string `locationName:"description" type:"string"` + + // The ID of the security group. + GroupId *string `locationName:"groupId" type:"string"` + + // The name of the security group. + GroupName *string `locationName:"groupName" type:"string"` + + // Information about the stale inbound rules in the security group. + StaleIpPermissions []*StaleIpPermission `locationName:"staleIpPermissions" locationNameList:"item" type:"list"` + + // Information about the stale outbound rules in the security group. + StaleIpPermissionsEgress []*StaleIpPermission `locationName:"staleIpPermissionsEgress" locationNameList:"item" type:"list"` + + // The ID of the VPC for the security group. + VpcId *string `locationName:"vpcId" type:"string"` } -// SetKeyName sets the KeyName field's value. -func (s *SpotFleetLaunchSpecification) SetKeyName(v string) *SpotFleetLaunchSpecification { - s.KeyName = &v - return s +// String returns the string representation +func (s StaleSecurityGroup) String() string { + return awsutil.Prettify(s) } -// SetMonitoring sets the Monitoring field's value. -func (s *SpotFleetLaunchSpecification) SetMonitoring(v *SpotFleetMonitoring) *SpotFleetLaunchSpecification { - s.Monitoring = v - return s +// GoString returns the string representation +func (s StaleSecurityGroup) GoString() string { + return s.String() } -// SetNetworkInterfaces sets the NetworkInterfaces field's value. -func (s *SpotFleetLaunchSpecification) SetNetworkInterfaces(v []*InstanceNetworkInterfaceSpecification) *SpotFleetLaunchSpecification { - s.NetworkInterfaces = v +// SetDescription sets the Description field's value. +func (s *StaleSecurityGroup) SetDescription(v string) *StaleSecurityGroup { + s.Description = &v return s } -// SetPlacement sets the Placement field's value. -func (s *SpotFleetLaunchSpecification) SetPlacement(v *SpotPlacement) *SpotFleetLaunchSpecification { - s.Placement = v +// SetGroupId sets the GroupId field's value. +func (s *StaleSecurityGroup) SetGroupId(v string) *StaleSecurityGroup { + s.GroupId = &v return s } -// SetRamdiskId sets the RamdiskId field's value. -func (s *SpotFleetLaunchSpecification) SetRamdiskId(v string) *SpotFleetLaunchSpecification { - s.RamdiskId = &v +// SetGroupName sets the GroupName field's value. +func (s *StaleSecurityGroup) SetGroupName(v string) *StaleSecurityGroup { + s.GroupName = &v return s } -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *SpotFleetLaunchSpecification) SetSecurityGroups(v []*GroupIdentifier) *SpotFleetLaunchSpecification { - s.SecurityGroups = v +// SetStaleIpPermissions sets the StaleIpPermissions field's value. +func (s *StaleSecurityGroup) SetStaleIpPermissions(v []*StaleIpPermission) *StaleSecurityGroup { + s.StaleIpPermissions = v return s } -// SetSpotPrice sets the SpotPrice field's value. -func (s *SpotFleetLaunchSpecification) SetSpotPrice(v string) *SpotFleetLaunchSpecification { - s.SpotPrice = &v +// SetStaleIpPermissionsEgress sets the StaleIpPermissionsEgress field's value. +func (s *StaleSecurityGroup) SetStaleIpPermissionsEgress(v []*StaleIpPermission) *StaleSecurityGroup { + s.StaleIpPermissionsEgress = v return s } -// SetSubnetId sets the SubnetId field's value. -func (s *SpotFleetLaunchSpecification) SetSubnetId(v string) *SpotFleetLaunchSpecification { - s.SubnetId = &v +// SetVpcId sets the VpcId field's value. +func (s *StaleSecurityGroup) SetVpcId(v string) *StaleSecurityGroup { + s.VpcId = &v return s } -// SetTagSpecifications sets the TagSpecifications field's value. -func (s *SpotFleetLaunchSpecification) SetTagSpecifications(v []*SpotFleetTagSpecification) *SpotFleetLaunchSpecification { - s.TagSpecifications = v - return s +type StartInstancesInput struct { + _ struct{} `type:"structure"` + + // Reserved. + AdditionalInfo *string `locationName:"additionalInfo" 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 `locationName:"dryRun" type:"boolean"` + + // One or more instance IDs. + // + // InstanceIds is a required field + InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"` } -// SetUserData sets the UserData field's value. -func (s *SpotFleetLaunchSpecification) SetUserData(v string) *SpotFleetLaunchSpecification { - s.UserData = &v +// String returns the string representation +func (s StartInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartInstancesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartInstancesInput"} + if s.InstanceIds == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAdditionalInfo sets the AdditionalInfo field's value. +func (s *StartInstancesInput) SetAdditionalInfo(v string) *StartInstancesInput { + s.AdditionalInfo = &v return s } -// SetWeightedCapacity sets the WeightedCapacity field's value. -func (s *SpotFleetLaunchSpecification) SetWeightedCapacity(v float64) *SpotFleetLaunchSpecification { - s.WeightedCapacity = &v +// SetDryRun sets the DryRun field's value. +func (s *StartInstancesInput) SetDryRun(v bool) *StartInstancesInput { + s.DryRun = &v + return s +} + +// SetInstanceIds sets the InstanceIds field's value. +func (s *StartInstancesInput) SetInstanceIds(v []*string) *StartInstancesInput { + s.InstanceIds = v return s } -// Describes whether monitoring is enabled. -type SpotFleetMonitoring struct { +type StartInstancesOutput struct { _ struct{} `type:"structure"` - // Enables monitoring for the instance. - // - // Default: false - Enabled *bool `locationName:"enabled" type:"boolean"` + // Information about one or more started instances. + StartingInstances []*InstanceStateChange `locationName:"instancesSet" locationNameList:"item" type:"list"` } // String returns the string representation -func (s SpotFleetMonitoring) String() string { +func (s StartInstancesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s SpotFleetMonitoring) GoString() string { +func (s StartInstancesOutput) GoString() string { return s.String() } -// SetEnabled sets the Enabled field's value. -func (s *SpotFleetMonitoring) SetEnabled(v bool) *SpotFleetMonitoring { - s.Enabled = &v +// SetStartingInstances sets the StartingInstances field's value. +func (s *StartInstancesOutput) SetStartingInstances(v []*InstanceStateChange) *StartInstancesOutput { + s.StartingInstances = v return s } -// Describes a Spot Fleet request. -type SpotFleetRequestConfig struct { +// Describes a state change. +type StateReason struct { _ struct{} `type:"structure"` - // The progress of the Spot Fleet request. If there is an error, the status - // is error. After all requests are placed, the status is pending_fulfillment. - // If the size of the fleet is equal to or greater than its target capacity, - // the status is fulfilled. If the size of the fleet is decreased, the status - // is pending_termination while Spot Instances are terminating. - ActivityStatus *string `locationName:"activityStatus" type:"string" enum:"ActivityStatus"` + // The reason code for the state change. + Code *string `locationName:"code" type:"string"` - // The creation date and time of the request. + // The message for the state change. // - // CreateTime is a required field - CreateTime *time.Time `locationName:"createTime" type:"timestamp" required:"true"` - - // The configuration of the Spot Fleet request. + // * Server.InsufficientInstanceCapacity: There was insufficient capacity + // available to satisfy the launch request. // - // SpotFleetRequestConfig is a required field - SpotFleetRequestConfig *SpotFleetRequestConfigData `locationName:"spotFleetRequestConfig" type:"structure" required:"true"` - - // The ID of the Spot Fleet request. + // * Server.InternalError: An internal error caused the instance to terminate + // during launch. // - // SpotFleetRequestId is a required field - SpotFleetRequestId *string `locationName:"spotFleetRequestId" type:"string" required:"true"` - - // The state of the Spot Fleet request. + // * Server.ScheduledStop: The instance was stopped due to a scheduled retirement. + // + // * Server.SpotInstanceShutdown: The instance was stopped because the number + // of Spot requests with a maximum price equal to or higher than the Spot + // price exceeded available capacity or because of an increase in the Spot + // price. + // + // * Server.SpotInstanceTermination: The instance was terminated because + // the number of Spot requests with a maximum price equal to or higher than + // the Spot price exceeded available capacity or because of an increase in + // the Spot price. + // + // * Client.InstanceInitiatedShutdown: The instance was shut down using the + // shutdown -h command from the instance. + // + // * Client.InstanceTerminated: The instance was terminated or rebooted during + // AMI creation. + // + // * Client.InternalError: A client error caused the instance to terminate + // during launch. + // + // * Client.InvalidSnapshot.NotFound: The specified snapshot was not found. + // + // * Client.UserInitiatedHibernate: Hibernation was initiated on the instance. + // + // * Client.UserInitiatedShutdown: The instance was shut down using the Amazon + // EC2 API. // - // SpotFleetRequestState is a required field - SpotFleetRequestState *string `locationName:"spotFleetRequestState" type:"string" required:"true" enum:"BatchState"` + // * Client.VolumeLimitExceeded: The limit on the number of EBS volumes or + // total storage was exceeded. Decrease usage or request an increase in your + // account limits. + Message *string `locationName:"message" type:"string"` } // String returns the string representation -func (s SpotFleetRequestConfig) String() string { +func (s StateReason) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s SpotFleetRequestConfig) GoString() string { +func (s StateReason) GoString() string { return s.String() } -// SetActivityStatus sets the ActivityStatus field's value. -func (s *SpotFleetRequestConfig) SetActivityStatus(v string) *SpotFleetRequestConfig { - s.ActivityStatus = &v - return s -} - -// SetCreateTime sets the CreateTime field's value. -func (s *SpotFleetRequestConfig) SetCreateTime(v time.Time) *SpotFleetRequestConfig { - s.CreateTime = &v - return s -} - -// SetSpotFleetRequestConfig sets the SpotFleetRequestConfig field's value. -func (s *SpotFleetRequestConfig) SetSpotFleetRequestConfig(v *SpotFleetRequestConfigData) *SpotFleetRequestConfig { - s.SpotFleetRequestConfig = v - return s -} - -// SetSpotFleetRequestId sets the SpotFleetRequestId field's value. -func (s *SpotFleetRequestConfig) SetSpotFleetRequestId(v string) *SpotFleetRequestConfig { - s.SpotFleetRequestId = &v +// SetCode sets the Code field's value. +func (s *StateReason) SetCode(v string) *StateReason { + s.Code = &v return s } -// SetSpotFleetRequestState sets the SpotFleetRequestState field's value. -func (s *SpotFleetRequestConfig) SetSpotFleetRequestState(v string) *SpotFleetRequestConfig { - s.SpotFleetRequestState = &v +// SetMessage sets the Message field's value. +func (s *StateReason) SetMessage(v string) *StateReason { + s.Message = &v return s } -// Describes the configuration of a Spot Fleet request. -type SpotFleetRequestConfigData struct { +type StopInstancesInput struct { _ struct{} `type:"structure"` - // Indicates how to allocate the target capacity across the Spot pools specified - // by the Spot Fleet request. The default is lowestPrice. - AllocationStrategy *string `locationName:"allocationStrategy" type:"string" enum:"AllocationStrategy"` - - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of your listings. This helps to avoid duplicate listings. For more information, - // see Ensuring Idempotency (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). - ClientToken *string `locationName:"clientToken" 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. - ExcessCapacityTerminationPolicy *string `locationName:"excessCapacityTerminationPolicy" type:"string" enum:"ExcessCapacityTerminationPolicy"` - - // The number of units fulfilled by this request compared to the set target - // capacity. - FulfilledCapacity *float64 `locationName:"fulfilledCapacity" type:"double"` + // 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 `locationName:"dryRun" type:"boolean"` - // Grants the Spot Fleet permission to terminate Spot Instances on your behalf - // when you cancel its Spot Fleet request using CancelSpotFleetRequests or when - // the Spot Fleet request expires, if you set terminateInstancesWithExpiration. + // Forces the instances to stop. The instances do not have an opportunity to + // flush file system caches or file system metadata. If you use this option, + // you must perform file system check and repair procedures. This option is + // not recommended for Windows instances. // - // IamFleetRole is a required field - IamFleetRole *string `locationName:"iamFleetRole" type:"string" required:"true"` - - // The behavior when a Spot Instance is interrupted. The default is terminate. - InstanceInterruptionBehavior *string `locationName:"instanceInterruptionBehavior" type:"string" enum:"InstanceInterruptionBehavior"` - - // The number of Spot pools across which to allocate your target Spot capacity. - // 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. - InstancePoolsToUseCount *int64 `locationName:"instancePoolsToUseCount" type:"integer"` - - // The launch specifications for the Spot Fleet request. - LaunchSpecifications []*SpotFleetLaunchSpecification `locationName:"launchSpecifications" locationNameList:"item" type:"list"` - - // The launch template and overrides. - LaunchTemplateConfigs []*LaunchTemplateConfig `locationName:"launchTemplateConfigs" locationNameList:"item" type:"list"` + // Default: false + Force *bool `locationName:"force" type:"boolean"` - // One or more Classic Load Balancers and target groups to attach to the Spot - // Fleet request. Spot Fleet registers the running Spot Instances with the specified - // Classic Load Balancers and target groups. + // 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 (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) + // in the Amazon Elastic Compute Cloud User Guide. // - // With Network Load Balancers, Spot Fleet cannot register instances that have - // the following instance types: C1, CC1, CC2, CG1, CG2, CR1, CS1, G1, G2, HI1, - // HS1, M1, M2, M3, and T1. - LoadBalancersConfig *LoadBalancersConfig `locationName:"loadBalancersConfig" type:"structure"` - - // The order of the launch template overrides to use in fulfilling On-Demand - // capacity. If you specify lowestPrice, Spot Fleet uses price to determine - // the order, launching the lowest price first. If you specify prioritized, - // Spot Fleet uses the priority that you assign to each Spot Fleet launch template - // override, launching the highest priority first. If you do not specify a value, - // Spot Fleet defaults to lowestPrice. - OnDemandAllocationStrategy *string `locationName:"onDemandAllocationStrategy" type:"string" enum:"OnDemandAllocationStrategy"` - - // The number of On-Demand units fulfilled by this request compared to the set - // target On-Demand capacity. - OnDemandFulfilledCapacity *float64 `locationName:"onDemandFulfilledCapacity" type:"double"` - - // The number of On-Demand units to request. You can choose to set the target - // capacity in terms of instances or a performance characteristic that is important - // to your application workload, such as vCPUs, memory, or I/O. If the request - // type is maintain, you can specify a target capacity of 0 and add capacity - // later. - OnDemandTargetCapacity *int64 `locationName:"onDemandTargetCapacity" type:"integer"` - - // Indicates whether Spot Fleet should replace unhealthy instances. - ReplaceUnhealthyInstances *bool `locationName:"replaceUnhealthyInstances" type:"boolean"` - - // The maximum price per unit hour that you are willing to pay for a Spot Instance. - // The default is the On-Demand price. - SpotPrice *string `locationName:"spotPrice" type:"string"` + // Default: false + Hibernate *bool `type:"boolean"` - // The number of units to request. You can choose to set the target capacity - // in terms of instances or a performance characteristic that is important to - // your application workload, such as vCPUs, memory, or I/O. If the request - // type is maintain, you can specify a target capacity of 0 and add capacity - // later. + // One or more instance IDs. // - // TargetCapacity is a required field - TargetCapacity *int64 `locationName:"targetCapacity" type:"integer" required:"true"` - - // Indicates whether running Spot Instances should be terminated when the Spot - // Fleet request expires. - TerminateInstancesWithExpiration *bool `locationName:"terminateInstancesWithExpiration" type:"boolean"` - - // The type of request. Indicates whether the Spot Fleet only requests the target - // capacity or also attempts to maintain it. When this value is request, the - // Spot Fleet only places the required requests. It does not attempt to replenish - // Spot Instances if capacity is diminished, nor does it submit requests in - // alternative Spot pools if capacity is not available. To maintain a certain - // target capacity, the Spot Fleet places the required requests to meet capacity - // and automatically replenishes any interrupted instances. Default: maintain. - Type *string `locationName:"type" type:"string" enum:"FleetType"` - - // The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - // The default is to start fulfilling the request immediately. - ValidFrom *time.Time `locationName:"validFrom" type:"timestamp"` - - // The end date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - // At this point, no new Spot Instance requests are placed or able to fulfill - // the request. The default end date is 7 days from the current date. - ValidUntil *time.Time `locationName:"validUntil" type:"timestamp"` + // InstanceIds is a required field + InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"` } // String returns the string representation -func (s SpotFleetRequestConfigData) String() string { +func (s StopInstancesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s SpotFleetRequestConfigData) GoString() string { +func (s StopInstancesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *SpotFleetRequestConfigData) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SpotFleetRequestConfigData"} - if s.IamFleetRole == nil { - invalidParams.Add(request.NewErrParamRequired("IamFleetRole")) - } - if s.TargetCapacity == nil { - invalidParams.Add(request.NewErrParamRequired("TargetCapacity")) - } - if s.LaunchTemplateConfigs != nil { - for i, v := range s.LaunchTemplateConfigs { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LaunchTemplateConfigs", i), err.(request.ErrInvalidParams)) - } - } - } - if s.LoadBalancersConfig != nil { - if err := s.LoadBalancersConfig.Validate(); err != nil { - invalidParams.AddNested("LoadBalancersConfig", err.(request.ErrInvalidParams)) - } +func (s *StopInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopInstancesInput"} + if s.InstanceIds == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceIds")) } if invalidParams.Len() > 0 { @@ -65670,884 +79537,892 @@ func (s *SpotFleetRequestConfigData) Validate() error { return nil } -// SetAllocationStrategy sets the AllocationStrategy field's value. -func (s *SpotFleetRequestConfigData) SetAllocationStrategy(v string) *SpotFleetRequestConfigData { - s.AllocationStrategy = &v - return s -} - -// SetClientToken sets the ClientToken field's value. -func (s *SpotFleetRequestConfigData) SetClientToken(v string) *SpotFleetRequestConfigData { - s.ClientToken = &v - return s -} - -// SetExcessCapacityTerminationPolicy sets the ExcessCapacityTerminationPolicy field's value. -func (s *SpotFleetRequestConfigData) SetExcessCapacityTerminationPolicy(v string) *SpotFleetRequestConfigData { - s.ExcessCapacityTerminationPolicy = &v - return s -} - -// SetFulfilledCapacity sets the FulfilledCapacity field's value. -func (s *SpotFleetRequestConfigData) SetFulfilledCapacity(v float64) *SpotFleetRequestConfigData { - s.FulfilledCapacity = &v - return s -} - -// SetIamFleetRole sets the IamFleetRole field's value. -func (s *SpotFleetRequestConfigData) SetIamFleetRole(v string) *SpotFleetRequestConfigData { - s.IamFleetRole = &v - return s -} - -// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value. -func (s *SpotFleetRequestConfigData) SetInstanceInterruptionBehavior(v string) *SpotFleetRequestConfigData { - s.InstanceInterruptionBehavior = &v - return s -} - -// SetInstancePoolsToUseCount sets the InstancePoolsToUseCount field's value. -func (s *SpotFleetRequestConfigData) SetInstancePoolsToUseCount(v int64) *SpotFleetRequestConfigData { - s.InstancePoolsToUseCount = &v +// SetDryRun sets the DryRun field's value. +func (s *StopInstancesInput) SetDryRun(v bool) *StopInstancesInput { + s.DryRun = &v return s } -// SetLaunchSpecifications sets the LaunchSpecifications field's value. -func (s *SpotFleetRequestConfigData) SetLaunchSpecifications(v []*SpotFleetLaunchSpecification) *SpotFleetRequestConfigData { - s.LaunchSpecifications = v +// SetForce sets the Force field's value. +func (s *StopInstancesInput) SetForce(v bool) *StopInstancesInput { + s.Force = &v return s } -// SetLaunchTemplateConfigs sets the LaunchTemplateConfigs field's value. -func (s *SpotFleetRequestConfigData) SetLaunchTemplateConfigs(v []*LaunchTemplateConfig) *SpotFleetRequestConfigData { - s.LaunchTemplateConfigs = v +// SetHibernate sets the Hibernate field's value. +func (s *StopInstancesInput) SetHibernate(v bool) *StopInstancesInput { + s.Hibernate = &v return s } -// SetLoadBalancersConfig sets the LoadBalancersConfig field's value. -func (s *SpotFleetRequestConfigData) SetLoadBalancersConfig(v *LoadBalancersConfig) *SpotFleetRequestConfigData { - s.LoadBalancersConfig = v +// SetInstanceIds sets the InstanceIds field's value. +func (s *StopInstancesInput) SetInstanceIds(v []*string) *StopInstancesInput { + s.InstanceIds = v return s } -// SetOnDemandAllocationStrategy sets the OnDemandAllocationStrategy field's value. -func (s *SpotFleetRequestConfigData) SetOnDemandAllocationStrategy(v string) *SpotFleetRequestConfigData { - s.OnDemandAllocationStrategy = &v - return s -} +type StopInstancesOutput struct { + _ struct{} `type:"structure"` -// SetOnDemandFulfilledCapacity sets the OnDemandFulfilledCapacity field's value. -func (s *SpotFleetRequestConfigData) SetOnDemandFulfilledCapacity(v float64) *SpotFleetRequestConfigData { - s.OnDemandFulfilledCapacity = &v - return s + // Information about one or more stopped instances. + StoppingInstances []*InstanceStateChange `locationName:"instancesSet" locationNameList:"item" type:"list"` } -// SetOnDemandTargetCapacity sets the OnDemandTargetCapacity field's value. -func (s *SpotFleetRequestConfigData) SetOnDemandTargetCapacity(v int64) *SpotFleetRequestConfigData { - s.OnDemandTargetCapacity = &v - return s +// String returns the string representation +func (s StopInstancesOutput) String() string { + return awsutil.Prettify(s) } -// SetReplaceUnhealthyInstances sets the ReplaceUnhealthyInstances field's value. -func (s *SpotFleetRequestConfigData) SetReplaceUnhealthyInstances(v bool) *SpotFleetRequestConfigData { - s.ReplaceUnhealthyInstances = &v - return s +// GoString returns the string representation +func (s StopInstancesOutput) GoString() string { + return s.String() } -// SetSpotPrice sets the SpotPrice field's value. -func (s *SpotFleetRequestConfigData) SetSpotPrice(v string) *SpotFleetRequestConfigData { - s.SpotPrice = &v +// SetStoppingInstances sets the StoppingInstances field's value. +func (s *StopInstancesOutput) SetStoppingInstances(v []*InstanceStateChange) *StopInstancesOutput { + s.StoppingInstances = v return s } -// SetTargetCapacity sets the TargetCapacity field's value. -func (s *SpotFleetRequestConfigData) SetTargetCapacity(v int64) *SpotFleetRequestConfigData { - s.TargetCapacity = &v - return s -} +// Describes the storage location for an instance store-backed AMI. +type Storage struct { + _ struct{} `type:"structure"` -// SetTerminateInstancesWithExpiration sets the TerminateInstancesWithExpiration field's value. -func (s *SpotFleetRequestConfigData) SetTerminateInstancesWithExpiration(v bool) *SpotFleetRequestConfigData { - s.TerminateInstancesWithExpiration = &v - return s + // An Amazon S3 storage location. + S3 *S3Storage `type:"structure"` } -// SetType sets the Type field's value. -func (s *SpotFleetRequestConfigData) SetType(v string) *SpotFleetRequestConfigData { - s.Type = &v - return s +// String returns the string representation +func (s Storage) String() string { + return awsutil.Prettify(s) } -// SetValidFrom sets the ValidFrom field's value. -func (s *SpotFleetRequestConfigData) SetValidFrom(v time.Time) *SpotFleetRequestConfigData { - s.ValidFrom = &v - return s +// GoString returns the string representation +func (s Storage) GoString() string { + return s.String() } -// SetValidUntil sets the ValidUntil field's value. -func (s *SpotFleetRequestConfigData) SetValidUntil(v time.Time) *SpotFleetRequestConfigData { - s.ValidUntil = &v +// SetS3 sets the S3 field's value. +func (s *Storage) SetS3(v *S3Storage) *Storage { + s.S3 = v return s } -// The tags for a Spot Fleet resource. -type SpotFleetTagSpecification struct { +// Describes a storage location in Amazon S3. +type StorageLocation struct { _ struct{} `type:"structure"` - // The type of resource. Currently, the only resource type that is supported - // is instance. - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` + // The name of the S3 bucket. + Bucket *string `type:"string"` - // The tags. - Tags []*Tag `locationName:"tag" locationNameList:"item" type:"list"` + // The key. + Key *string `type:"string"` } // String returns the string representation -func (s SpotFleetTagSpecification) String() string { +func (s StorageLocation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s SpotFleetTagSpecification) GoString() string { +func (s StorageLocation) GoString() string { return s.String() } -// SetResourceType sets the ResourceType field's value. -func (s *SpotFleetTagSpecification) SetResourceType(v string) *SpotFleetTagSpecification { - s.ResourceType = &v +// SetBucket sets the Bucket field's value. +func (s *StorageLocation) SetBucket(v string) *StorageLocation { + s.Bucket = &v return s } -// SetTags sets the Tags field's value. -func (s *SpotFleetTagSpecification) SetTags(v []*Tag) *SpotFleetTagSpecification { - s.Tags = v +// SetKey sets the Key field's value. +func (s *StorageLocation) SetKey(v string) *StorageLocation { + s.Key = &v return s } -// Describes a Spot Instance request. -type SpotInstanceRequest struct { +// Describes a subnet. +type Subnet 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. - ActualBlockHourlyPrice *string `locationName:"actualBlockHourlyPrice" type:"string"` - - // The Availability Zone group. If you specify the same Availability Zone group - // for all Spot Instance requests, all Spot Instances are launched in the same - // Availability Zone. - AvailabilityZoneGroup *string `locationName:"availabilityZoneGroup" type:"string"` - - // The duration for the Spot Instance, in minutes. - BlockDurationMinutes *int64 `locationName:"blockDurationMinutes" type:"integer"` - - // The date and time when the Spot Instance request was created, in UTC format - // (for example, YYYY-MM-DDTHH:MM:SSZ). - CreateTime *time.Time `locationName:"createTime" type:"timestamp"` + // Indicates whether a network interface created in this subnet (including a + // network interface created by RunInstances) receives an IPv6 address. + AssignIpv6AddressOnCreation *bool `locationName:"assignIpv6AddressOnCreation" type:"boolean"` - // The fault codes for the Spot Instance request, if any. - Fault *SpotInstanceStateFault `locationName:"fault" type:"structure"` + // The Availability Zone of the subnet. + AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - // The instance ID, if an instance has been launched to fulfill the Spot Instance - // request. - InstanceId *string `locationName:"instanceId" type:"string"` + // The AZ ID of the subnet. + AvailabilityZoneId *string `locationName:"availabilityZoneId" type:"string"` - // The behavior when a Spot Instance is interrupted. - InstanceInterruptionBehavior *string `locationName:"instanceInterruptionBehavior" type:"string" enum:"InstanceInterruptionBehavior"` + // The number of unused private IPv4 addresses in the subnet. The IPv4 addresses + // for any stopped instances are considered unavailable. + AvailableIpAddressCount *int64 `locationName:"availableIpAddressCount" type:"integer"` - // The instance launch group. Launch groups are Spot Instances that launch together - // and terminate together. - LaunchGroup *string `locationName:"launchGroup" type:"string"` + // The IPv4 CIDR block assigned to the subnet. + CidrBlock *string `locationName:"cidrBlock" type:"string"` - // Additional information for launching instances. - LaunchSpecification *LaunchSpecification `locationName:"launchSpecification" type:"structure"` + // Indicates whether this is the default subnet for the Availability Zone. + DefaultForAz *bool `locationName:"defaultForAz" type:"boolean"` - // The Availability Zone in which the request is launched. - LaunchedAvailabilityZone *string `locationName:"launchedAvailabilityZone" type:"string"` + // Information about the IPv6 CIDR blocks associated with the subnet. + Ipv6CidrBlockAssociationSet []*SubnetIpv6CidrBlockAssociation `locationName:"ipv6CidrBlockAssociationSet" locationNameList:"item" type:"list"` - // The product description associated with the Spot Instance. - ProductDescription *string `locationName:"productDescription" type:"string" enum:"RIProductDescription"` + // Indicates whether instances launched in this subnet receive a public IPv4 + // address. + MapPublicIpOnLaunch *bool `locationName:"mapPublicIpOnLaunch" type:"boolean"` - // The ID of the Spot Instance request. - SpotInstanceRequestId *string `locationName:"spotInstanceRequestId" type:"string"` + // The ID of the AWS account that owns the subnet. + OwnerId *string `locationName:"ownerId" type:"string"` - // The maximum price per hour that you are willing to pay for a Spot Instance. - SpotPrice *string `locationName:"spotPrice" type:"string"` + // The current state of the subnet. + State *string `locationName:"state" type:"string" enum:"SubnetState"` - // The state of the Spot Instance request. Spot status information helps track - // your Spot Instance requests. For more information, see Spot Status (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html) - // in the Amazon EC2 User Guide for Linux Instances. - State *string `locationName:"state" type:"string" enum:"SpotInstanceState"` + // The Amazon Resource Name (ARN) of the subnet. + SubnetArn *string `locationName:"subnetArn" type:"string"` - // The status code and status message describing the Spot Instance request. - Status *SpotInstanceStatus `locationName:"status" type:"structure"` + // The ID of the subnet. + SubnetId *string `locationName:"subnetId" type:"string"` - // Any tags assigned to the resource. + // Any tags assigned to the subnet. Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - // The Spot Instance request type. - Type *string `locationName:"type" type:"string" enum:"SpotInstanceType"` - - // The start date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - // The request becomes active at this date and time. - ValidFrom *time.Time `locationName:"validFrom" type:"timestamp"` - - // The end date of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - // If this is a one-time request, it remains active until all instances launch, - // the request is canceled, or this date is reached. If the request is persistent, - // it remains active until it is canceled or this date is reached. The default - // end date is 7 days from the current date. - ValidUntil *time.Time `locationName:"validUntil" type:"timestamp"` + // The ID of the VPC the subnet is in. + VpcId *string `locationName:"vpcId" type:"string"` } // String returns the string representation -func (s SpotInstanceRequest) String() string { +func (s Subnet) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s SpotInstanceRequest) GoString() string { +func (s Subnet) GoString() string { return s.String() } -// SetActualBlockHourlyPrice sets the ActualBlockHourlyPrice field's value. -func (s *SpotInstanceRequest) SetActualBlockHourlyPrice(v string) *SpotInstanceRequest { - s.ActualBlockHourlyPrice = &v +// SetAssignIpv6AddressOnCreation sets the AssignIpv6AddressOnCreation field's value. +func (s *Subnet) SetAssignIpv6AddressOnCreation(v bool) *Subnet { + s.AssignIpv6AddressOnCreation = &v + return s +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *Subnet) SetAvailabilityZone(v string) *Subnet { + s.AvailabilityZone = &v + return s +} + +// SetAvailabilityZoneId sets the AvailabilityZoneId field's value. +func (s *Subnet) SetAvailabilityZoneId(v string) *Subnet { + s.AvailabilityZoneId = &v return s } -// SetAvailabilityZoneGroup sets the AvailabilityZoneGroup field's value. -func (s *SpotInstanceRequest) SetAvailabilityZoneGroup(v string) *SpotInstanceRequest { - s.AvailabilityZoneGroup = &v +// SetAvailableIpAddressCount sets the AvailableIpAddressCount field's value. +func (s *Subnet) SetAvailableIpAddressCount(v int64) *Subnet { + s.AvailableIpAddressCount = &v return s } -// SetBlockDurationMinutes sets the BlockDurationMinutes field's value. -func (s *SpotInstanceRequest) SetBlockDurationMinutes(v int64) *SpotInstanceRequest { - s.BlockDurationMinutes = &v +// SetCidrBlock sets the CidrBlock field's value. +func (s *Subnet) SetCidrBlock(v string) *Subnet { + s.CidrBlock = &v return s } -// SetCreateTime sets the CreateTime field's value. -func (s *SpotInstanceRequest) SetCreateTime(v time.Time) *SpotInstanceRequest { - s.CreateTime = &v +// SetDefaultForAz sets the DefaultForAz field's value. +func (s *Subnet) SetDefaultForAz(v bool) *Subnet { + s.DefaultForAz = &v return s } -// SetFault sets the Fault field's value. -func (s *SpotInstanceRequest) SetFault(v *SpotInstanceStateFault) *SpotInstanceRequest { - s.Fault = v +// SetIpv6CidrBlockAssociationSet sets the Ipv6CidrBlockAssociationSet field's value. +func (s *Subnet) SetIpv6CidrBlockAssociationSet(v []*SubnetIpv6CidrBlockAssociation) *Subnet { + s.Ipv6CidrBlockAssociationSet = v return s } -// SetInstanceId sets the InstanceId field's value. -func (s *SpotInstanceRequest) SetInstanceId(v string) *SpotInstanceRequest { - s.InstanceId = &v +// SetMapPublicIpOnLaunch sets the MapPublicIpOnLaunch field's value. +func (s *Subnet) SetMapPublicIpOnLaunch(v bool) *Subnet { + s.MapPublicIpOnLaunch = &v return s } -// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value. -func (s *SpotInstanceRequest) SetInstanceInterruptionBehavior(v string) *SpotInstanceRequest { - s.InstanceInterruptionBehavior = &v +// SetOwnerId sets the OwnerId field's value. +func (s *Subnet) SetOwnerId(v string) *Subnet { + s.OwnerId = &v return s } -// SetLaunchGroup sets the LaunchGroup field's value. -func (s *SpotInstanceRequest) SetLaunchGroup(v string) *SpotInstanceRequest { - s.LaunchGroup = &v +// SetState sets the State field's value. +func (s *Subnet) SetState(v string) *Subnet { + s.State = &v return s } -// SetLaunchSpecification sets the LaunchSpecification field's value. -func (s *SpotInstanceRequest) SetLaunchSpecification(v *LaunchSpecification) *SpotInstanceRequest { - s.LaunchSpecification = v +// SetSubnetArn sets the SubnetArn field's value. +func (s *Subnet) SetSubnetArn(v string) *Subnet { + s.SubnetArn = &v return s } -// SetLaunchedAvailabilityZone sets the LaunchedAvailabilityZone field's value. -func (s *SpotInstanceRequest) SetLaunchedAvailabilityZone(v string) *SpotInstanceRequest { - s.LaunchedAvailabilityZone = &v +// SetSubnetId sets the SubnetId field's value. +func (s *Subnet) SetSubnetId(v string) *Subnet { + s.SubnetId = &v return s } -// SetProductDescription sets the ProductDescription field's value. -func (s *SpotInstanceRequest) SetProductDescription(v string) *SpotInstanceRequest { - s.ProductDescription = &v +// SetTags sets the Tags field's value. +func (s *Subnet) SetTags(v []*Tag) *Subnet { + s.Tags = v return s } -// SetSpotInstanceRequestId sets the SpotInstanceRequestId field's value. -func (s *SpotInstanceRequest) SetSpotInstanceRequestId(v string) *SpotInstanceRequest { - s.SpotInstanceRequestId = &v +// SetVpcId sets the VpcId field's value. +func (s *Subnet) SetVpcId(v string) *Subnet { + s.VpcId = &v return s } -// SetSpotPrice sets the SpotPrice field's value. -func (s *SpotInstanceRequest) SetSpotPrice(v string) *SpotInstanceRequest { - s.SpotPrice = &v - return s +// Describes the state of a CIDR block. +type SubnetCidrBlockState struct { + _ struct{} `type:"structure"` + + // The state of a CIDR block. + State *string `locationName:"state" type:"string" enum:"SubnetCidrBlockStateCode"` + + // A message about the status of the CIDR block, if applicable. + StatusMessage *string `locationName:"statusMessage" type:"string"` +} + +// String returns the string representation +func (s SubnetCidrBlockState) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SubnetCidrBlockState) GoString() string { + return s.String() } // SetState sets the State field's value. -func (s *SpotInstanceRequest) SetState(v string) *SpotInstanceRequest { +func (s *SubnetCidrBlockState) SetState(v string) *SubnetCidrBlockState { s.State = &v return s } -// SetStatus sets the Status field's value. -func (s *SpotInstanceRequest) SetStatus(v *SpotInstanceStatus) *SpotInstanceRequest { - s.Status = v +// SetStatusMessage sets the StatusMessage field's value. +func (s *SubnetCidrBlockState) SetStatusMessage(v string) *SubnetCidrBlockState { + s.StatusMessage = &v return s } -// SetTags sets the Tags field's value. -func (s *SpotInstanceRequest) SetTags(v []*Tag) *SpotInstanceRequest { - s.Tags = v +// Describes an IPv6 CIDR block associated with a subnet. +type SubnetIpv6CidrBlockAssociation struct { + _ struct{} `type:"structure"` + + // The association ID for the CIDR block. + AssociationId *string `locationName:"associationId" type:"string"` + + // The IPv6 CIDR block. + Ipv6CidrBlock *string `locationName:"ipv6CidrBlock" type:"string"` + + // Information about the state of the CIDR block. + Ipv6CidrBlockState *SubnetCidrBlockState `locationName:"ipv6CidrBlockState" type:"structure"` +} + +// String returns the string representation +func (s SubnetIpv6CidrBlockAssociation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SubnetIpv6CidrBlockAssociation) GoString() string { + return s.String() +} + +// SetAssociationId sets the AssociationId field's value. +func (s *SubnetIpv6CidrBlockAssociation) SetAssociationId(v string) *SubnetIpv6CidrBlockAssociation { + s.AssociationId = &v return s } -// SetType sets the Type field's value. -func (s *SpotInstanceRequest) SetType(v string) *SpotInstanceRequest { - s.Type = &v +// SetIpv6CidrBlock sets the Ipv6CidrBlock field's value. +func (s *SubnetIpv6CidrBlockAssociation) SetIpv6CidrBlock(v string) *SubnetIpv6CidrBlockAssociation { + s.Ipv6CidrBlock = &v return s } -// SetValidFrom sets the ValidFrom field's value. -func (s *SpotInstanceRequest) SetValidFrom(v time.Time) *SpotInstanceRequest { - s.ValidFrom = &v +// SetIpv6CidrBlockState sets the Ipv6CidrBlockState field's value. +func (s *SubnetIpv6CidrBlockAssociation) SetIpv6CidrBlockState(v *SubnetCidrBlockState) *SubnetIpv6CidrBlockAssociation { + s.Ipv6CidrBlockState = v return s } -// SetValidUntil sets the ValidUntil field's value. -func (s *SpotInstanceRequest) SetValidUntil(v time.Time) *SpotInstanceRequest { - s.ValidUntil = &v +// Describes the T2 or T3 instance whose credit option for CPU usage was successfully +// modified. +type SuccessfulInstanceCreditSpecificationItem struct { + _ struct{} `type:"structure"` + + // The ID of the instance. + InstanceId *string `locationName:"instanceId" type:"string"` +} + +// String returns the string representation +func (s SuccessfulInstanceCreditSpecificationItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SuccessfulInstanceCreditSpecificationItem) GoString() string { + return s.String() +} + +// SetInstanceId sets the InstanceId field's value. +func (s *SuccessfulInstanceCreditSpecificationItem) SetInstanceId(v string) *SuccessfulInstanceCreditSpecificationItem { + s.InstanceId = &v return s } -// Describes a Spot Instance state change. -type SpotInstanceStateFault struct { +// Describes a tag. +type Tag struct { _ struct{} `type:"structure"` - // The reason code for the Spot Instance state change. - Code *string `locationName:"code" type:"string"` + // The key of the tag. + // + // Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode + // characters. May not begin with aws:. + Key *string `locationName:"key" type:"string"` - // The message for the Spot Instance state change. - Message *string `locationName:"message" type:"string"` + // The value of the tag. + // + // Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode + // characters. + Value *string `locationName:"value" type:"string"` } // String returns the string representation -func (s SpotInstanceStateFault) String() string { +func (s Tag) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s SpotInstanceStateFault) GoString() string { +func (s Tag) GoString() string { return s.String() } -// SetCode sets the Code field's value. -func (s *SpotInstanceStateFault) SetCode(v string) *SpotInstanceStateFault { - s.Code = &v +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v return s } -// SetMessage sets the Message field's value. -func (s *SpotInstanceStateFault) SetMessage(v string) *SpotInstanceStateFault { - s.Message = &v +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v return s } -// Describes the status of a Spot Instance request. -type SpotInstanceStatus struct { +// Describes a tag. +type TagDescription struct { _ struct{} `type:"structure"` - // The status code. For a list of status codes, see Spot Status Codes (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-bid-status.html#spot-instance-bid-status-understand) - // in the Amazon EC2 User Guide for Linux Instances. - Code *string `locationName:"code" type:"string"` + // The tag key. + Key *string `locationName:"key" type:"string"` - // The description for the status code. - Message *string `locationName:"message" type:"string"` + // The ID of the resource. + ResourceId *string `locationName:"resourceId" type:"string"` - // The date and time of the most recent status update, in UTC format (for example, - // YYYY-MM-DDTHH:MM:SSZ). - UpdateTime *time.Time `locationName:"updateTime" type:"timestamp"` + // The resource type. + ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` + + // The tag value. + Value *string `locationName:"value" type:"string"` } // String returns the string representation -func (s SpotInstanceStatus) String() string { +func (s TagDescription) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s SpotInstanceStatus) GoString() string { +func (s TagDescription) GoString() string { return s.String() } -// SetCode sets the Code field's value. -func (s *SpotInstanceStatus) SetCode(v string) *SpotInstanceStatus { - s.Code = &v +// SetKey sets the Key field's value. +func (s *TagDescription) SetKey(v string) *TagDescription { + s.Key = &v return s } -// SetMessage sets the Message field's value. -func (s *SpotInstanceStatus) SetMessage(v string) *SpotInstanceStatus { - s.Message = &v +// SetResourceId sets the ResourceId field's value. +func (s *TagDescription) SetResourceId(v string) *TagDescription { + s.ResourceId = &v return s } -// SetUpdateTime sets the UpdateTime field's value. -func (s *SpotInstanceStatus) SetUpdateTime(v time.Time) *SpotInstanceStatus { - s.UpdateTime = &v +// SetResourceType sets the ResourceType field's value. +func (s *TagDescription) SetResourceType(v string) *TagDescription { + s.ResourceType = &v return s } -// The options for Spot Instances. -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). - BlockDurationMinutes *int64 `type:"integer"` - - // The behavior when a Spot Instance is interrupted. The default is terminate. - InstanceInterruptionBehavior *string `type:"string" enum:"InstanceInterruptionBehavior"` +// SetValue sets the Value field's value. +func (s *TagDescription) SetValue(v string) *TagDescription { + s.Value = &v + return s +} - // The maximum hourly price you're willing to pay for the Spot Instances. The - // default is the On-Demand price. - MaxPrice *string `type:"string"` +// The tags to apply to a resource when the resource is being created. +type TagSpecification struct { + _ struct{} `type:"structure"` - // The Spot Instance request type. For RunInstances, persistent Spot Instance - // requests are only supported when InstanceInterruptionBehavior is set to either - // hibernate or stop. - SpotInstanceType *string `type:"string" enum:"SpotInstanceType"` + // The type of resource to tag. Currently, the resource types that support tagging + // on creation are fleet, dedicated-host, instance, snapshot, and volume. To + // tag a resource after it has been created, see CreateTags. + ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - // The end date of the request. For a one-time request, the request remains - // active until all instances launch, the request is canceled, or this date - // is reached. If the request is persistent, it remains active until it is canceled - // or this date and time is reached. The default end date is 7 days from the - // current date. - ValidUntil *time.Time `type:"timestamp"` + // The tags to apply to the resource. + Tags []*Tag `locationName:"Tag" locationNameList:"item" type:"list"` } // String returns the string representation -func (s SpotMarketOptions) String() string { +func (s TagSpecification) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s SpotMarketOptions) GoString() string { +func (s TagSpecification) GoString() string { return s.String() } -// SetBlockDurationMinutes sets the BlockDurationMinutes field's value. -func (s *SpotMarketOptions) SetBlockDurationMinutes(v int64) *SpotMarketOptions { - s.BlockDurationMinutes = &v +// SetResourceType sets the ResourceType field's value. +func (s *TagSpecification) SetResourceType(v string) *TagSpecification { + s.ResourceType = &v return s } -// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value. -func (s *SpotMarketOptions) SetInstanceInterruptionBehavior(v string) *SpotMarketOptions { - s.InstanceInterruptionBehavior = &v +// SetTags sets the Tags field's value. +func (s *TagSpecification) SetTags(v []*Tag) *TagSpecification { + s.Tags = v return s } -// SetMaxPrice sets the MaxPrice field's value. -func (s *SpotMarketOptions) SetMaxPrice(v string) *SpotMarketOptions { - s.MaxPrice = &v +// The number of units to request. You can choose to set the target capacity +// in terms of instances or a performance characteristic that is important to +// your application workload, such as vCPUs, memory, or I/O. If the request +// type is maintain, you can specify a target capacity of 0 and add capacity +// later. +type TargetCapacitySpecification struct { + _ struct{} `type:"structure"` + + // The default TotalTargetCapacity, which is either Spot or On-Demand. + DefaultTargetCapacityType *string `locationName:"defaultTargetCapacityType" type:"string" enum:"DefaultTargetCapacityType"` + + // The number of On-Demand units to request. + OnDemandTargetCapacity *int64 `locationName:"onDemandTargetCapacity" type:"integer"` + + // The maximum number of Spot units to launch. + SpotTargetCapacity *int64 `locationName:"spotTargetCapacity" type:"integer"` + + // The number of units to request, filled using DefaultTargetCapacityType. + TotalTargetCapacity *int64 `locationName:"totalTargetCapacity" type:"integer"` +} + +// String returns the string representation +func (s TargetCapacitySpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TargetCapacitySpecification) GoString() string { + return s.String() +} + +// SetDefaultTargetCapacityType sets the DefaultTargetCapacityType field's value. +func (s *TargetCapacitySpecification) SetDefaultTargetCapacityType(v string) *TargetCapacitySpecification { + s.DefaultTargetCapacityType = &v return s } -// SetSpotInstanceType sets the SpotInstanceType field's value. -func (s *SpotMarketOptions) SetSpotInstanceType(v string) *SpotMarketOptions { - s.SpotInstanceType = &v +// SetOnDemandTargetCapacity sets the OnDemandTargetCapacity field's value. +func (s *TargetCapacitySpecification) SetOnDemandTargetCapacity(v int64) *TargetCapacitySpecification { + s.OnDemandTargetCapacity = &v return s } -// SetValidUntil sets the ValidUntil field's value. -func (s *SpotMarketOptions) SetValidUntil(v time.Time) *SpotMarketOptions { - s.ValidUntil = &v +// SetSpotTargetCapacity sets the SpotTargetCapacity field's value. +func (s *TargetCapacitySpecification) SetSpotTargetCapacity(v int64) *TargetCapacitySpecification { + s.SpotTargetCapacity = &v return s } -// Describes the configuration of Spot Instances in an EC2 Fleet. -type SpotOptions struct { +// SetTotalTargetCapacity sets the TotalTargetCapacity field's value. +func (s *TargetCapacitySpecification) SetTotalTargetCapacity(v int64) *TargetCapacitySpecification { + s.TotalTargetCapacity = &v + return s +} + +// The number of units to request. You can choose to set the target capacity +// in terms of instances or a performance characteristic that is important to +// your application workload, such as vCPUs, memory, or I/O. If the request +// type is maintain, you can specify a target capacity of 0 and add capacity +// later. +type TargetCapacitySpecificationRequest struct { _ struct{} `type:"structure"` - // Indicates how to allocate the target capacity across the Spot pools specified - // by the Spot Fleet request. The default is lowest-price. - AllocationStrategy *string `locationName:"allocationStrategy" type:"string" enum:"SpotAllocationStrategy"` + // The default TotalTargetCapacity, which is either Spot or On-Demand. + DefaultTargetCapacityType *string `type:"string" enum:"DefaultTargetCapacityType"` - // The behavior when a Spot Instance is interrupted. The default is terminate. - InstanceInterruptionBehavior *string `locationName:"instanceInterruptionBehavior" type:"string" enum:"SpotInstanceInterruptionBehavior"` + // The number of On-Demand units to request. + OnDemandTargetCapacity *int64 `type:"integer"` - // The number of Spot pools across which to allocate your target Spot capacity. - // Valid only when AllocationStrategy is set to lowestPrice. EC2 Fleet selects - // the cheapest Spot pools and evenly allocates your target Spot capacity across - // the number of Spot pools that you specify. - InstancePoolsToUseCount *int64 `locationName:"instancePoolsToUseCount" type:"integer"` + // The number of Spot units to request. + SpotTargetCapacity *int64 `type:"integer"` + + // The number of units to request, filled using DefaultTargetCapacityType. + // + // TotalTargetCapacity is a required field + TotalTargetCapacity *int64 `type:"integer" required:"true"` } // String returns the string representation -func (s SpotOptions) String() string { +func (s TargetCapacitySpecificationRequest) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s SpotOptions) GoString() string { +func (s TargetCapacitySpecificationRequest) GoString() string { return s.String() } -// SetAllocationStrategy sets the AllocationStrategy field's value. -func (s *SpotOptions) SetAllocationStrategy(v string) *SpotOptions { - s.AllocationStrategy = &v +// Validate inspects the fields of the type to determine if they are valid. +func (s *TargetCapacitySpecificationRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TargetCapacitySpecificationRequest"} + if s.TotalTargetCapacity == nil { + invalidParams.Add(request.NewErrParamRequired("TotalTargetCapacity")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDefaultTargetCapacityType sets the DefaultTargetCapacityType field's value. +func (s *TargetCapacitySpecificationRequest) SetDefaultTargetCapacityType(v string) *TargetCapacitySpecificationRequest { + s.DefaultTargetCapacityType = &v return s } -// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value. -func (s *SpotOptions) SetInstanceInterruptionBehavior(v string) *SpotOptions { - s.InstanceInterruptionBehavior = &v +// SetOnDemandTargetCapacity sets the OnDemandTargetCapacity field's value. +func (s *TargetCapacitySpecificationRequest) SetOnDemandTargetCapacity(v int64) *TargetCapacitySpecificationRequest { + s.OnDemandTargetCapacity = &v return s } -// SetInstancePoolsToUseCount sets the InstancePoolsToUseCount field's value. -func (s *SpotOptions) SetInstancePoolsToUseCount(v int64) *SpotOptions { - s.InstancePoolsToUseCount = &v +// SetSpotTargetCapacity sets the SpotTargetCapacity field's value. +func (s *TargetCapacitySpecificationRequest) SetSpotTargetCapacity(v int64) *TargetCapacitySpecificationRequest { + s.SpotTargetCapacity = &v return s } -// Describes the configuration of Spot Instances in an EC2 Fleet request. -type SpotOptionsRequest struct { - _ struct{} `type:"structure"` +// SetTotalTargetCapacity sets the TotalTargetCapacity field's value. +func (s *TargetCapacitySpecificationRequest) SetTotalTargetCapacity(v int64) *TargetCapacitySpecificationRequest { + s.TotalTargetCapacity = &v + return s +} - // Indicates how to allocate the target capacity across the Spot pools specified - // by the Spot Fleet request. The default is lowestPrice. - AllocationStrategy *string `type:"string" enum:"SpotAllocationStrategy"` +// Information about the Convertible Reserved Instance offering. +type TargetConfiguration struct { + _ struct{} `type:"structure"` - // The behavior when a Spot Instance is interrupted. The default is terminate. - InstanceInterruptionBehavior *string `type:"string" enum:"SpotInstanceInterruptionBehavior"` + // The number of instances the Convertible Reserved Instance offering can be + // applied to. This parameter is reserved and cannot be specified in a request + InstanceCount *int64 `locationName:"instanceCount" type:"integer"` - // The number of Spot pools across which to allocate your target Spot capacity. - // 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. - InstancePoolsToUseCount *int64 `type:"integer"` + // The ID of the Convertible Reserved Instance offering. + OfferingId *string `locationName:"offeringId" type:"string"` } // String returns the string representation -func (s SpotOptionsRequest) String() string { +func (s TargetConfiguration) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s SpotOptionsRequest) GoString() string { +func (s TargetConfiguration) GoString() string { return s.String() } -// SetAllocationStrategy sets the AllocationStrategy field's value. -func (s *SpotOptionsRequest) SetAllocationStrategy(v string) *SpotOptionsRequest { - s.AllocationStrategy = &v - return s -} - -// SetInstanceInterruptionBehavior sets the InstanceInterruptionBehavior field's value. -func (s *SpotOptionsRequest) SetInstanceInterruptionBehavior(v string) *SpotOptionsRequest { - s.InstanceInterruptionBehavior = &v +// SetInstanceCount sets the InstanceCount field's value. +func (s *TargetConfiguration) SetInstanceCount(v int64) *TargetConfiguration { + s.InstanceCount = &v return s } -// SetInstancePoolsToUseCount sets the InstancePoolsToUseCount field's value. -func (s *SpotOptionsRequest) SetInstancePoolsToUseCount(v int64) *SpotOptionsRequest { - s.InstancePoolsToUseCount = &v +// SetOfferingId sets the OfferingId field's value. +func (s *TargetConfiguration) SetOfferingId(v string) *TargetConfiguration { + s.OfferingId = &v return s } -// Describes Spot Instance placement. -type SpotPlacement struct { +// Details about the target configuration. +type TargetConfigurationRequest struct { _ struct{} `type:"structure"` - // The Availability Zone. - // - // [Spot Fleet only] To specify multiple Availability Zones, separate them using - // commas; for example, "us-west-2a, us-west-2b". - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The name of the placement group. - GroupName *string `locationName:"groupName" type:"string"` + // The number of instances the Covertible Reserved Instance offering can be + // applied to. This parameter is reserved and cannot be specified in a request + InstanceCount *int64 `type:"integer"` - // The tenancy of the instance (if the instance is running in a VPC). An instance - // with a tenancy of dedicated runs on single-tenant hardware. The host tenancy - // is not supported for Spot Instances. - Tenancy *string `locationName:"tenancy" type:"string" enum:"Tenancy"` + // The Convertible Reserved Instance offering ID. + // + // OfferingId is a required field + OfferingId *string `type:"string" required:"true"` } // String returns the string representation -func (s SpotPlacement) String() string { +func (s TargetConfigurationRequest) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s SpotPlacement) GoString() string { +func (s TargetConfigurationRequest) GoString() string { return s.String() } -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *SpotPlacement) SetAvailabilityZone(v string) *SpotPlacement { - s.AvailabilityZone = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *TargetConfigurationRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TargetConfigurationRequest"} + if s.OfferingId == nil { + invalidParams.Add(request.NewErrParamRequired("OfferingId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetGroupName sets the GroupName field's value. -func (s *SpotPlacement) SetGroupName(v string) *SpotPlacement { - s.GroupName = &v +// SetInstanceCount sets the InstanceCount field's value. +func (s *TargetConfigurationRequest) SetInstanceCount(v int64) *TargetConfigurationRequest { + s.InstanceCount = &v return s } -// SetTenancy sets the Tenancy field's value. -func (s *SpotPlacement) SetTenancy(v string) *SpotPlacement { - s.Tenancy = &v +// SetOfferingId sets the OfferingId field's value. +func (s *TargetConfigurationRequest) SetOfferingId(v string) *TargetConfigurationRequest { + s.OfferingId = &v return s } -// Describes the maximum price per hour that you are willing to pay for a Spot -// Instance. -type SpotPrice struct { +// Describes a load balancer target group. +type TargetGroup struct { _ struct{} `type:"structure"` - // The Availability Zone. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` - - // The instance type. - InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` - - // A general description of the AMI. - ProductDescription *string `locationName:"productDescription" type:"string" enum:"RIProductDescription"` - - // The maximum price per hour that you are willing to pay for a Spot Instance. - SpotPrice *string `locationName:"spotPrice" type:"string"` - - // The date and time the request was created, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` + // The Amazon Resource Name (ARN) of the target group. + Arn *string `locationName:"arn" type:"string"` } // String returns the string representation -func (s SpotPrice) String() string { +func (s TargetGroup) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s SpotPrice) GoString() string { +func (s TargetGroup) GoString() string { return s.String() } -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *SpotPrice) SetAvailabilityZone(v string) *SpotPrice { - s.AvailabilityZone = &v +// SetArn sets the Arn field's value. +func (s *TargetGroup) SetArn(v string) *TargetGroup { + s.Arn = &v return s } -// SetInstanceType sets the InstanceType field's value. -func (s *SpotPrice) SetInstanceType(v string) *SpotPrice { - s.InstanceType = &v - return s +// Describes the target groups to attach to a Spot Fleet. Spot Fleet registers +// the running Spot Instances with these target groups. +type TargetGroupsConfig struct { + _ struct{} `type:"structure"` + + // One or more target groups. + TargetGroups []*TargetGroup `locationName:"targetGroups" locationNameList:"item" min:"1" type:"list"` } -// SetProductDescription sets the ProductDescription field's value. -func (s *SpotPrice) SetProductDescription(v string) *SpotPrice { - s.ProductDescription = &v - return s +// String returns the string representation +func (s TargetGroupsConfig) String() string { + return awsutil.Prettify(s) } -// SetSpotPrice sets the SpotPrice field's value. -func (s *SpotPrice) SetSpotPrice(v string) *SpotPrice { - s.SpotPrice = &v - return s +// GoString returns the string representation +func (s TargetGroupsConfig) GoString() string { + return s.String() } -// SetTimestamp sets the Timestamp field's value. -func (s *SpotPrice) SetTimestamp(v time.Time) *SpotPrice { - s.Timestamp = &v +// Validate inspects the fields of the type to determine if they are valid. +func (s *TargetGroupsConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TargetGroupsConfig"} + if s.TargetGroups != nil && len(s.TargetGroups) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TargetGroups", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTargetGroups sets the TargetGroups field's value. +func (s *TargetGroupsConfig) SetTargetGroups(v []*TargetGroup) *TargetGroupsConfig { + s.TargetGroups = v return s } -// Describes a stale rule in a security group. -type StaleIpPermission struct { +// Describes a target network associated with a Client VPN endpoint. +type TargetNetwork struct { _ struct{} `type:"structure"` - // The start of the port range for the TCP and UDP protocols, or an ICMP type - // number. A value of -1 indicates all ICMP types. - FromPort *int64 `locationName:"fromPort" type:"integer"` + // The ID of the association. + AssociationId *string `locationName:"associationId" type:"string"` - // The IP protocol name (for tcp, udp, and icmp) or number (see Protocol Numbers) - // (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml). - IpProtocol *string `locationName:"ipProtocol" type:"string"` + // The ID of the Client VPN endpoint with which the target network is associated. + ClientVpnEndpointId *string `locationName:"clientVpnEndpointId" type:"string"` - // One or more IP ranges. Not applicable for stale security group rules. - IpRanges []*string `locationName:"ipRanges" locationNameList:"item" type:"list"` + // The IDs of the security groups applied to the target network association. + SecurityGroups []*string `locationName:"securityGroups" locationNameList:"item" type:"list"` - // One or more prefix list IDs for an AWS service. Not applicable for stale - // security group rules. - PrefixListIds []*string `locationName:"prefixListIds" locationNameList:"item" type:"list"` + // The current state of the target network association. + Status *AssociationStatus `locationName:"status" type:"structure"` - // The end of the port range for the TCP and UDP protocols, or an ICMP type - // number. A value of -1 indicates all ICMP types. - ToPort *int64 `locationName:"toPort" type:"integer"` + // The ID of the subnet specified as the target network. + TargetNetworkId *string `locationName:"targetNetworkId" type:"string"` - // One or more security group pairs. Returns the ID of the referenced security - // group and VPC, and the ID and status of the VPC peering connection. - UserIdGroupPairs []*UserIdGroupPair `locationName:"groups" locationNameList:"item" type:"list"` + // The ID of the VPC in which the target network (subnet) is located. + VpcId *string `locationName:"vpcId" type:"string"` } // String returns the string representation -func (s StaleIpPermission) String() string { +func (s TargetNetwork) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s StaleIpPermission) GoString() string { +func (s TargetNetwork) GoString() string { return s.String() } -// SetFromPort sets the FromPort field's value. -func (s *StaleIpPermission) SetFromPort(v int64) *StaleIpPermission { - s.FromPort = &v +// SetAssociationId sets the AssociationId field's value. +func (s *TargetNetwork) SetAssociationId(v string) *TargetNetwork { + s.AssociationId = &v return s } -// SetIpProtocol sets the IpProtocol field's value. -func (s *StaleIpPermission) SetIpProtocol(v string) *StaleIpPermission { - s.IpProtocol = &v +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *TargetNetwork) SetClientVpnEndpointId(v string) *TargetNetwork { + s.ClientVpnEndpointId = &v return s } -// SetIpRanges sets the IpRanges field's value. -func (s *StaleIpPermission) SetIpRanges(v []*string) *StaleIpPermission { - s.IpRanges = v +// SetSecurityGroups sets the SecurityGroups field's value. +func (s *TargetNetwork) SetSecurityGroups(v []*string) *TargetNetwork { + s.SecurityGroups = v return s } -// SetPrefixListIds sets the PrefixListIds field's value. -func (s *StaleIpPermission) SetPrefixListIds(v []*string) *StaleIpPermission { - s.PrefixListIds = v +// SetStatus sets the Status field's value. +func (s *TargetNetwork) SetStatus(v *AssociationStatus) *TargetNetwork { + s.Status = v return s } -// SetToPort sets the ToPort field's value. -func (s *StaleIpPermission) SetToPort(v int64) *StaleIpPermission { - s.ToPort = &v +// SetTargetNetworkId sets the TargetNetworkId field's value. +func (s *TargetNetwork) SetTargetNetworkId(v string) *TargetNetwork { + s.TargetNetworkId = &v return s } -// SetUserIdGroupPairs sets the UserIdGroupPairs field's value. -func (s *StaleIpPermission) SetUserIdGroupPairs(v []*UserIdGroupPair) *StaleIpPermission { - s.UserIdGroupPairs = v +// SetVpcId sets the VpcId field's value. +func (s *TargetNetwork) SetVpcId(v string) *TargetNetwork { + s.VpcId = &v return s } -// Describes a stale security group (a security group that contains stale rules). -type StaleSecurityGroup struct { +// The total value of the new Convertible Reserved Instances. +type TargetReservationValue struct { _ struct{} `type:"structure"` - // The description of the security group. - Description *string `locationName:"description" type:"string"` - - // The ID of the security group. - // - // GroupId is a required field - GroupId *string `locationName:"groupId" type:"string" required:"true"` - - // The name of the security group. - GroupName *string `locationName:"groupName" type:"string"` - - // Information about the stale inbound rules in the security group. - StaleIpPermissions []*StaleIpPermission `locationName:"staleIpPermissions" locationNameList:"item" type:"list"` - - // Information about the stale outbound rules in the security group. - StaleIpPermissionsEgress []*StaleIpPermission `locationName:"staleIpPermissionsEgress" locationNameList:"item" type:"list"` + // The total value of the Convertible Reserved Instances that make up the exchange. + // This is the sum of the list value, remaining upfront price, and additional + // upfront cost of the exchange. + ReservationValue *ReservationValue `locationName:"reservationValue" type:"structure"` - // The ID of the VPC for the security group. - VpcId *string `locationName:"vpcId" type:"string"` + // The configuration of the Convertible Reserved Instances that make up the + // exchange. + TargetConfiguration *TargetConfiguration `locationName:"targetConfiguration" type:"structure"` } // String returns the string representation -func (s StaleSecurityGroup) String() string { +func (s TargetReservationValue) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s StaleSecurityGroup) GoString() string { +func (s TargetReservationValue) GoString() string { return s.String() } -// SetDescription sets the Description field's value. -func (s *StaleSecurityGroup) SetDescription(v string) *StaleSecurityGroup { - s.Description = &v - return s -} - -// SetGroupId sets the GroupId field's value. -func (s *StaleSecurityGroup) SetGroupId(v string) *StaleSecurityGroup { - s.GroupId = &v - return s -} - -// SetGroupName sets the GroupName field's value. -func (s *StaleSecurityGroup) SetGroupName(v string) *StaleSecurityGroup { - s.GroupName = &v - return s -} - -// SetStaleIpPermissions sets the StaleIpPermissions field's value. -func (s *StaleSecurityGroup) SetStaleIpPermissions(v []*StaleIpPermission) *StaleSecurityGroup { - s.StaleIpPermissions = v - return s -} - -// SetStaleIpPermissionsEgress sets the StaleIpPermissionsEgress field's value. -func (s *StaleSecurityGroup) SetStaleIpPermissionsEgress(v []*StaleIpPermission) *StaleSecurityGroup { - s.StaleIpPermissionsEgress = v +// SetReservationValue sets the ReservationValue field's value. +func (s *TargetReservationValue) SetReservationValue(v *ReservationValue) *TargetReservationValue { + s.ReservationValue = v return s } -// SetVpcId sets the VpcId field's value. -func (s *StaleSecurityGroup) SetVpcId(v string) *StaleSecurityGroup { - s.VpcId = &v +// SetTargetConfiguration sets the TargetConfiguration field's value. +func (s *TargetReservationValue) SetTargetConfiguration(v *TargetConfiguration) *TargetReservationValue { + s.TargetConfiguration = v return s } -// Contains the parameters for StartInstances. -type StartInstancesInput struct { +type TerminateClientVpnConnectionsInput struct { _ struct{} `type:"structure"` - // Reserved. - AdditionalInfo *string `locationName:"additionalInfo" type:"string"` + // The ID of the Client VPN endpoint to which the client is connected. + // + // ClientVpnEndpointId is a required field + ClientVpnEndpointId *string `type:"string" required:"true"` + + // The ID of the client connection to be terminated. + ConnectionId *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 `locationName:"dryRun" type:"boolean"` + DryRun *bool `type:"boolean"` - // One or more instance IDs. - // - // InstanceIds is a required field - InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"` + // The name of the user who initiated the connection. Use this option to terminate + // all active connections for the specified user. This option can only be used + // if the user has established up to five connections. + Username *string `type:"string"` } // String returns the string representation -func (s StartInstancesInput) String() string { +func (s TerminateClientVpnConnectionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s StartInstancesInput) GoString() string { +func (s TerminateClientVpnConnectionsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *StartInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartInstancesInput"} - if s.InstanceIds == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceIds")) +func (s *TerminateClientVpnConnectionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TerminateClientVpnConnectionsInput"} + if s.ClientVpnEndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("ClientVpnEndpointId")) } if invalidParams.Len() > 0 { @@ -66556,119 +80431,114 @@ func (s *StartInstancesInput) Validate() error { return nil } -// SetAdditionalInfo sets the AdditionalInfo field's value. -func (s *StartInstancesInput) SetAdditionalInfo(v string) *StartInstancesInput { - s.AdditionalInfo = &v +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *TerminateClientVpnConnectionsInput) SetClientVpnEndpointId(v string) *TerminateClientVpnConnectionsInput { + s.ClientVpnEndpointId = &v + return s +} + +// SetConnectionId sets the ConnectionId field's value. +func (s *TerminateClientVpnConnectionsInput) SetConnectionId(v string) *TerminateClientVpnConnectionsInput { + s.ConnectionId = &v return s } // SetDryRun sets the DryRun field's value. -func (s *StartInstancesInput) SetDryRun(v bool) *StartInstancesInput { +func (s *TerminateClientVpnConnectionsInput) SetDryRun(v bool) *TerminateClientVpnConnectionsInput { s.DryRun = &v return s } -// SetInstanceIds sets the InstanceIds field's value. -func (s *StartInstancesInput) SetInstanceIds(v []*string) *StartInstancesInput { - s.InstanceIds = v +// SetUsername sets the Username field's value. +func (s *TerminateClientVpnConnectionsInput) SetUsername(v string) *TerminateClientVpnConnectionsInput { + s.Username = &v return s } -// Contains the output of StartInstances. -type StartInstancesOutput struct { +type TerminateClientVpnConnectionsOutput struct { _ struct{} `type:"structure"` - // Information about one or more started instances. - StartingInstances []*InstanceStateChange `locationName:"instancesSet" locationNameList:"item" type:"list"` + // The ID of the Client VPN endpoint. + ClientVpnEndpointId *string `locationName:"clientVpnEndpointId" type:"string"` + + // The current state of the client connections. + ConnectionStatuses []*TerminateConnectionStatus `locationName:"connectionStatuses" locationNameList:"item" type:"list"` + + // The user who established the terminated client connections. + Username *string `locationName:"username" type:"string"` } // String returns the string representation -func (s StartInstancesOutput) String() string { +func (s TerminateClientVpnConnectionsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s StartInstancesOutput) GoString() string { +func (s TerminateClientVpnConnectionsOutput) GoString() string { return s.String() } -// SetStartingInstances sets the StartingInstances field's value. -func (s *StartInstancesOutput) SetStartingInstances(v []*InstanceStateChange) *StartInstancesOutput { - s.StartingInstances = v +// SetClientVpnEndpointId sets the ClientVpnEndpointId field's value. +func (s *TerminateClientVpnConnectionsOutput) SetClientVpnEndpointId(v string) *TerminateClientVpnConnectionsOutput { + s.ClientVpnEndpointId = &v return s } -// Describes a state change. -type StateReason struct { +// SetConnectionStatuses sets the ConnectionStatuses field's value. +func (s *TerminateClientVpnConnectionsOutput) SetConnectionStatuses(v []*TerminateConnectionStatus) *TerminateClientVpnConnectionsOutput { + s.ConnectionStatuses = v + return s +} + +// SetUsername sets the Username field's value. +func (s *TerminateClientVpnConnectionsOutput) SetUsername(v string) *TerminateClientVpnConnectionsOutput { + s.Username = &v + return s +} + +// Information about a terminated Client VPN endpoint client connection. +type TerminateConnectionStatus struct { _ struct{} `type:"structure"` - // The reason code for the state change. - Code *string `locationName:"code" type:"string"` + // The ID of the client connection. + ConnectionId *string `locationName:"connectionId" type:"string"` - // The message for the state change. - // - // * Server.InsufficientInstanceCapacity: There was insufficient capacity - // available to satisfy the launch request. - // - // * Server.InternalError: An internal error caused the instance to terminate - // during launch. - // - // * Server.ScheduledStop: The instance was stopped due to a scheduled retirement. - // - // * Server.SpotInstanceShutdown: The instance was stopped because the number - // of Spot requests with a maximum price equal to or higher than the Spot - // price exceeded available capacity or because of an increase in the Spot - // price. - // - // * Server.SpotInstanceTermination: The instance was terminated because - // the number of Spot requests with a maximum price equal to or higher than - // the Spot price exceeded available capacity or because of an increase in - // the Spot price. - // - // * Client.InstanceInitiatedShutdown: The instance was shut down using the - // shutdown -h command from the instance. - // - // * Client.InstanceTerminated: The instance was terminated or rebooted during - // AMI creation. - // - // * Client.InternalError: A client error caused the instance to terminate - // during launch. - // - // * Client.InvalidSnapshot.NotFound: The specified snapshot was not found. - // - // * Client.UserInitiatedShutdown: The instance was shut down using the Amazon - // EC2 API. - // - // * Client.VolumeLimitExceeded: The limit on the number of EBS volumes or - // total storage was exceeded. Decrease usage or request an increase in your - // account limits. - Message *string `locationName:"message" type:"string"` + // A message about the status of the client connection, if applicable. + CurrentStatus *ClientVpnConnectionStatus `locationName:"currentStatus" type:"structure"` + + // The state of the client connection. + PreviousStatus *ClientVpnConnectionStatus `locationName:"previousStatus" type:"structure"` } // String returns the string representation -func (s StateReason) String() string { +func (s TerminateConnectionStatus) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s StateReason) GoString() string { +func (s TerminateConnectionStatus) GoString() string { return s.String() } -// SetCode sets the Code field's value. -func (s *StateReason) SetCode(v string) *StateReason { - s.Code = &v +// SetConnectionId sets the ConnectionId field's value. +func (s *TerminateConnectionStatus) SetConnectionId(v string) *TerminateConnectionStatus { + s.ConnectionId = &v return s } -// SetMessage sets the Message field's value. -func (s *StateReason) SetMessage(v string) *StateReason { - s.Message = &v +// SetCurrentStatus sets the CurrentStatus field's value. +func (s *TerminateConnectionStatus) SetCurrentStatus(v *ClientVpnConnectionStatus) *TerminateConnectionStatus { + s.CurrentStatus = v return s } -// Contains the parameters for StopInstances. -type StopInstancesInput struct { +// SetPreviousStatus sets the PreviousStatus field's value. +func (s *TerminateConnectionStatus) SetPreviousStatus(v *ClientVpnConnectionStatus) *TerminateConnectionStatus { + s.PreviousStatus = v + return s +} + +type TerminateInstancesInput struct { _ struct{} `type:"structure"` // Checks whether you have the required permissions for the action, without @@ -66677,33 +80547,28 @@ type StopInstancesInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // Forces the instances to stop. The instances do not have an opportunity to - // flush file system caches or file system metadata. If you use this option, - // you must perform file system check and repair procedures. This option is - // not recommended for Windows instances. - // - // Default: false - Force *bool `locationName:"force" type:"boolean"` - // One or more instance IDs. // + // Constraints: Up to 1000 instance IDs. We recommend breaking up this request + // into smaller batches. + // // InstanceIds is a required field InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"` } // String returns the string representation -func (s StopInstancesInput) String() string { +func (s TerminateInstancesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s StopInstancesInput) GoString() string { +func (s TerminateInstancesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *StopInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StopInstancesInput"} +func (s *TerminateInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TerminateInstancesInput"} if s.InstanceIds == nil { invalidParams.Add(request.NewErrParamRequired("InstanceIds")) } @@ -66715,857 +80580,985 @@ func (s *StopInstancesInput) Validate() error { } // SetDryRun sets the DryRun field's value. -func (s *StopInstancesInput) SetDryRun(v bool) *StopInstancesInput { +func (s *TerminateInstancesInput) SetDryRun(v bool) *TerminateInstancesInput { s.DryRun = &v return s } -// SetForce sets the Force field's value. -func (s *StopInstancesInput) SetForce(v bool) *StopInstancesInput { - s.Force = &v - return s -} - // SetInstanceIds sets the InstanceIds field's value. -func (s *StopInstancesInput) SetInstanceIds(v []*string) *StopInstancesInput { +func (s *TerminateInstancesInput) SetInstanceIds(v []*string) *TerminateInstancesInput { s.InstanceIds = v return s } -// Contains the output of StopInstances. -type StopInstancesOutput struct { +type TerminateInstancesOutput struct { _ struct{} `type:"structure"` - // Information about one or more stopped instances. - StoppingInstances []*InstanceStateChange `locationName:"instancesSet" locationNameList:"item" type:"list"` + // Information about one or more terminated instances. + TerminatingInstances []*InstanceStateChange `locationName:"instancesSet" locationNameList:"item" type:"list"` } // String returns the string representation -func (s StopInstancesOutput) String() string { +func (s TerminateInstancesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s StopInstancesOutput) GoString() string { +func (s TerminateInstancesOutput) GoString() string { return s.String() } -// SetStoppingInstances sets the StoppingInstances field's value. -func (s *StopInstancesOutput) SetStoppingInstances(v []*InstanceStateChange) *StopInstancesOutput { - s.StoppingInstances = v +// SetTerminatingInstances sets the TerminatingInstances field's value. +func (s *TerminateInstancesOutput) SetTerminatingInstances(v []*InstanceStateChange) *TerminateInstancesOutput { + s.TerminatingInstances = v return s } -// Describes the storage location for an instance store-backed AMI. -type Storage struct { +// Describes a transit gateway. +type TransitGateway struct { _ struct{} `type:"structure"` - // An Amazon S3 storage location. - S3 *S3Storage `type:"structure"` + // The creation time. + CreationTime *time.Time `locationName:"creationTime" type:"timestamp"` + + // The description of the transit gateway. + Description *string `locationName:"description" type:"string"` + + // The transit gateway options. + Options *TransitGatewayOptions `locationName:"options" type:"structure"` + + // The ID of the AWS account ID that owns the transit gateway. + OwnerId *string `locationName:"ownerId" type:"string"` + + // The state of the transit gateway. + State *string `locationName:"state" type:"string" enum:"TransitGatewayState"` + + // The tags for the transit gateway. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + + // The Amazon Resource Name (ARN) of the transit gateway. + TransitGatewayArn *string `locationName:"transitGatewayArn" type:"string"` + + // The ID of the transit gateway. + TransitGatewayId *string `locationName:"transitGatewayId" type:"string"` } // String returns the string representation -func (s Storage) String() string { +func (s TransitGateway) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Storage) GoString() string { +func (s TransitGateway) GoString() string { return s.String() } -// SetS3 sets the S3 field's value. -func (s *Storage) SetS3(v *S3Storage) *Storage { - s.S3 = v +// SetCreationTime sets the CreationTime field's value. +func (s *TransitGateway) SetCreationTime(v time.Time) *TransitGateway { + s.CreationTime = &v return s } -// Describes a storage location in Amazon S3. -type StorageLocation struct { +// SetDescription sets the Description field's value. +func (s *TransitGateway) SetDescription(v string) *TransitGateway { + s.Description = &v + return s +} + +// SetOptions sets the Options field's value. +func (s *TransitGateway) SetOptions(v *TransitGatewayOptions) *TransitGateway { + s.Options = v + return s +} + +// SetOwnerId sets the OwnerId field's value. +func (s *TransitGateway) SetOwnerId(v string) *TransitGateway { + s.OwnerId = &v + return s +} + +// SetState sets the State field's value. +func (s *TransitGateway) SetState(v string) *TransitGateway { + s.State = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TransitGateway) SetTags(v []*Tag) *TransitGateway { + s.Tags = v + return s +} + +// SetTransitGatewayArn sets the TransitGatewayArn field's value. +func (s *TransitGateway) SetTransitGatewayArn(v string) *TransitGateway { + s.TransitGatewayArn = &v + return s +} + +// SetTransitGatewayId sets the TransitGatewayId field's value. +func (s *TransitGateway) SetTransitGatewayId(v string) *TransitGateway { + s.TransitGatewayId = &v + return s +} + +// Describes an association between a resource attachment and a transit gateway +// route table. +type TransitGatewayAssociation struct { _ struct{} `type:"structure"` - // The name of the S3 bucket. - Bucket *string `type:"string"` + // The ID of the resource. + ResourceId *string `locationName:"resourceId" type:"string"` - // The key. - Key *string `type:"string"` + // The resource type. + ResourceType *string `locationName:"resourceType" type:"string" enum:"TransitGatewayAttachmentResourceType"` + + // The state of the association. + State *string `locationName:"state" type:"string" enum:"TransitGatewayAssociationState"` + + // The ID of the attachment. + TransitGatewayAttachmentId *string `locationName:"transitGatewayAttachmentId" type:"string"` + + // The ID of the transit gateway route table. + TransitGatewayRouteTableId *string `locationName:"transitGatewayRouteTableId" type:"string"` } // String returns the string representation -func (s StorageLocation) String() string { +func (s TransitGatewayAssociation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s StorageLocation) GoString() string { +func (s TransitGatewayAssociation) GoString() string { return s.String() } -// SetBucket sets the Bucket field's value. -func (s *StorageLocation) SetBucket(v string) *StorageLocation { - s.Bucket = &v +// SetResourceId sets the ResourceId field's value. +func (s *TransitGatewayAssociation) SetResourceId(v string) *TransitGatewayAssociation { + s.ResourceId = &v return s } -// SetKey sets the Key field's value. -func (s *StorageLocation) SetKey(v string) *StorageLocation { - s.Key = &v +// SetResourceType sets the ResourceType field's value. +func (s *TransitGatewayAssociation) SetResourceType(v string) *TransitGatewayAssociation { + s.ResourceType = &v return s } -// Describes a subnet. -type Subnet struct { - _ struct{} `type:"structure"` +// SetState sets the State field's value. +func (s *TransitGatewayAssociation) SetState(v string) *TransitGatewayAssociation { + s.State = &v + return s +} - // Indicates whether a network interface created in this subnet (including a - // network interface created by RunInstances) receives an IPv6 address. - AssignIpv6AddressOnCreation *bool `locationName:"assignIpv6AddressOnCreation" type:"boolean"` +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *TransitGatewayAssociation) SetTransitGatewayAttachmentId(v string) *TransitGatewayAssociation { + s.TransitGatewayAttachmentId = &v + return s +} - // The Availability Zone of the subnet. - AvailabilityZone *string `locationName:"availabilityZone" type:"string"` +// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. +func (s *TransitGatewayAssociation) SetTransitGatewayRouteTableId(v string) *TransitGatewayAssociation { + s.TransitGatewayRouteTableId = &v + return s +} - // The number of unused private IPv4 addresses in the subnet. The IPv4 addresses - // for any stopped instances are considered unavailable. - AvailableIpAddressCount *int64 `locationName:"availableIpAddressCount" type:"integer"` +// Describes an attachment between a resource and a transit gateway. +type TransitGatewayAttachment struct { + _ struct{} `type:"structure"` - // The IPv4 CIDR block assigned to the subnet. - CidrBlock *string `locationName:"cidrBlock" type:"string"` + // The association. + Association *TransitGatewayAttachmentAssociation `locationName:"association" type:"structure"` - // Indicates whether this is the default subnet for the Availability Zone. - DefaultForAz *bool `locationName:"defaultForAz" type:"boolean"` + // The creation time. + CreationTime *time.Time `locationName:"creationTime" type:"timestamp"` - // Information about the IPv6 CIDR blocks associated with the subnet. - Ipv6CidrBlockAssociationSet []*SubnetIpv6CidrBlockAssociation `locationName:"ipv6CidrBlockAssociationSet" locationNameList:"item" type:"list"` + // The ID of the resource. + ResourceId *string `locationName:"resourceId" type:"string"` - // Indicates whether instances launched in this subnet receive a public IPv4 - // address. - MapPublicIpOnLaunch *bool `locationName:"mapPublicIpOnLaunch" type:"boolean"` + // The ID of the AWS account that owns the resource. + ResourceOwnerId *string `locationName:"resourceOwnerId" type:"string"` - // The current state of the subnet. - State *string `locationName:"state" type:"string" enum:"SubnetState"` + // The resource type. + ResourceType *string `locationName:"resourceType" type:"string" enum:"TransitGatewayAttachmentResourceType"` - // The ID of the subnet. - SubnetId *string `locationName:"subnetId" type:"string"` + // The attachment state. + State *string `locationName:"state" type:"string" enum:"TransitGatewayAttachmentState"` - // Any tags assigned to the subnet. + // The tags for the attachment. Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` - // The ID of the VPC the subnet is in. - VpcId *string `locationName:"vpcId" type:"string"` + // The ID of the attachment. + TransitGatewayAttachmentId *string `locationName:"transitGatewayAttachmentId" type:"string"` + + // The ID of the transit gateway. + TransitGatewayId *string `locationName:"transitGatewayId" type:"string"` + + // The ID of the AWS account that owns the transit gateway. + TransitGatewayOwnerId *string `locationName:"transitGatewayOwnerId" type:"string"` } // String returns the string representation -func (s Subnet) String() string { +func (s TransitGatewayAttachment) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Subnet) GoString() string { +func (s TransitGatewayAttachment) GoString() string { return s.String() } -// SetAssignIpv6AddressOnCreation sets the AssignIpv6AddressOnCreation field's value. -func (s *Subnet) SetAssignIpv6AddressOnCreation(v bool) *Subnet { - s.AssignIpv6AddressOnCreation = &v - return s -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *Subnet) SetAvailabilityZone(v string) *Subnet { - s.AvailabilityZone = &v +// SetAssociation sets the Association field's value. +func (s *TransitGatewayAttachment) SetAssociation(v *TransitGatewayAttachmentAssociation) *TransitGatewayAttachment { + s.Association = v return s } -// SetAvailableIpAddressCount sets the AvailableIpAddressCount field's value. -func (s *Subnet) SetAvailableIpAddressCount(v int64) *Subnet { - s.AvailableIpAddressCount = &v +// SetCreationTime sets the CreationTime field's value. +func (s *TransitGatewayAttachment) SetCreationTime(v time.Time) *TransitGatewayAttachment { + s.CreationTime = &v return s } -// SetCidrBlock sets the CidrBlock field's value. -func (s *Subnet) SetCidrBlock(v string) *Subnet { - s.CidrBlock = &v +// SetResourceId sets the ResourceId field's value. +func (s *TransitGatewayAttachment) SetResourceId(v string) *TransitGatewayAttachment { + s.ResourceId = &v return s } -// SetDefaultForAz sets the DefaultForAz field's value. -func (s *Subnet) SetDefaultForAz(v bool) *Subnet { - s.DefaultForAz = &v +// SetResourceOwnerId sets the ResourceOwnerId field's value. +func (s *TransitGatewayAttachment) SetResourceOwnerId(v string) *TransitGatewayAttachment { + s.ResourceOwnerId = &v return s } -// SetIpv6CidrBlockAssociationSet sets the Ipv6CidrBlockAssociationSet field's value. -func (s *Subnet) SetIpv6CidrBlockAssociationSet(v []*SubnetIpv6CidrBlockAssociation) *Subnet { - s.Ipv6CidrBlockAssociationSet = v +// SetResourceType sets the ResourceType field's value. +func (s *TransitGatewayAttachment) SetResourceType(v string) *TransitGatewayAttachment { + s.ResourceType = &v return s } -// SetMapPublicIpOnLaunch sets the MapPublicIpOnLaunch field's value. -func (s *Subnet) SetMapPublicIpOnLaunch(v bool) *Subnet { - s.MapPublicIpOnLaunch = &v +// SetState sets the State field's value. +func (s *TransitGatewayAttachment) SetState(v string) *TransitGatewayAttachment { + s.State = &v return s } -// SetState sets the State field's value. -func (s *Subnet) SetState(v string) *Subnet { - s.State = &v +// SetTags sets the Tags field's value. +func (s *TransitGatewayAttachment) SetTags(v []*Tag) *TransitGatewayAttachment { + s.Tags = v return s } -// SetSubnetId sets the SubnetId field's value. -func (s *Subnet) SetSubnetId(v string) *Subnet { - s.SubnetId = &v +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *TransitGatewayAttachment) SetTransitGatewayAttachmentId(v string) *TransitGatewayAttachment { + s.TransitGatewayAttachmentId = &v return s } -// SetTags sets the Tags field's value. -func (s *Subnet) SetTags(v []*Tag) *Subnet { - s.Tags = v +// SetTransitGatewayId sets the TransitGatewayId field's value. +func (s *TransitGatewayAttachment) SetTransitGatewayId(v string) *TransitGatewayAttachment { + s.TransitGatewayId = &v return s } -// SetVpcId sets the VpcId field's value. -func (s *Subnet) SetVpcId(v string) *Subnet { - s.VpcId = &v +// SetTransitGatewayOwnerId sets the TransitGatewayOwnerId field's value. +func (s *TransitGatewayAttachment) SetTransitGatewayOwnerId(v string) *TransitGatewayAttachment { + s.TransitGatewayOwnerId = &v return s } -// Describes the state of a CIDR block. -type SubnetCidrBlockState struct { +// Describes an association. +type TransitGatewayAttachmentAssociation struct { _ struct{} `type:"structure"` - // The state of a CIDR block. - State *string `locationName:"state" type:"string" enum:"SubnetCidrBlockStateCode"` + // The state of the association. + State *string `locationName:"state" type:"string" enum:"TransitGatewayAssociationState"` - // A message about the status of the CIDR block, if applicable. - StatusMessage *string `locationName:"statusMessage" type:"string"` + // The ID of the route table for the transit gateway. + TransitGatewayRouteTableId *string `locationName:"transitGatewayRouteTableId" type:"string"` } // String returns the string representation -func (s SubnetCidrBlockState) String() string { +func (s TransitGatewayAttachmentAssociation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s SubnetCidrBlockState) GoString() string { +func (s TransitGatewayAttachmentAssociation) GoString() string { return s.String() } // SetState sets the State field's value. -func (s *SubnetCidrBlockState) SetState(v string) *SubnetCidrBlockState { +func (s *TransitGatewayAttachmentAssociation) SetState(v string) *TransitGatewayAttachmentAssociation { s.State = &v return s } -// SetStatusMessage sets the StatusMessage field's value. -func (s *SubnetCidrBlockState) SetStatusMessage(v string) *SubnetCidrBlockState { - s.StatusMessage = &v +// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. +func (s *TransitGatewayAttachmentAssociation) SetTransitGatewayRouteTableId(v string) *TransitGatewayAttachmentAssociation { + s.TransitGatewayRouteTableId = &v return s } -// Describes an IPv6 CIDR block associated with a subnet. -type SubnetIpv6CidrBlockAssociation struct { +// Describes a propagation route table. +type TransitGatewayAttachmentPropagation struct { _ struct{} `type:"structure"` - // The association ID for the CIDR block. - AssociationId *string `locationName:"associationId" type:"string"` - - // The IPv6 CIDR block. - Ipv6CidrBlock *string `locationName:"ipv6CidrBlock" type:"string"` + // The state of the propagation route table. + State *string `locationName:"state" type:"string" enum:"TransitGatewayPropagationState"` - // Information about the state of the CIDR block. - Ipv6CidrBlockState *SubnetCidrBlockState `locationName:"ipv6CidrBlockState" type:"structure"` + // The ID of the propagation route table. + TransitGatewayRouteTableId *string `locationName:"transitGatewayRouteTableId" type:"string"` } // String returns the string representation -func (s SubnetIpv6CidrBlockAssociation) String() string { +func (s TransitGatewayAttachmentPropagation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s SubnetIpv6CidrBlockAssociation) GoString() string { +func (s TransitGatewayAttachmentPropagation) GoString() string { return s.String() } -// SetAssociationId sets the AssociationId field's value. -func (s *SubnetIpv6CidrBlockAssociation) SetAssociationId(v string) *SubnetIpv6CidrBlockAssociation { - s.AssociationId = &v - return s -} - -// SetIpv6CidrBlock sets the Ipv6CidrBlock field's value. -func (s *SubnetIpv6CidrBlockAssociation) SetIpv6CidrBlock(v string) *SubnetIpv6CidrBlockAssociation { - s.Ipv6CidrBlock = &v +// SetState sets the State field's value. +func (s *TransitGatewayAttachmentPropagation) SetState(v string) *TransitGatewayAttachmentPropagation { + s.State = &v return s } -// SetIpv6CidrBlockState sets the Ipv6CidrBlockState field's value. -func (s *SubnetIpv6CidrBlockAssociation) SetIpv6CidrBlockState(v *SubnetCidrBlockState) *SubnetIpv6CidrBlockAssociation { - s.Ipv6CidrBlockState = v +// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. +func (s *TransitGatewayAttachmentPropagation) SetTransitGatewayRouteTableId(v string) *TransitGatewayAttachmentPropagation { + s.TransitGatewayRouteTableId = &v return s } -// Describes the T2 instance whose credit option for CPU usage was successfully -// modified. -type SuccessfulInstanceCreditSpecificationItem struct { +// Describes the options for a transit gateway. +type TransitGatewayOptions struct { _ struct{} `type:"structure"` - // The ID of the instance. - InstanceId *string `locationName:"instanceId" type:"string"` + // A private Autonomous System Number (ASN) for the Amazon side of a BGP session. + // The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 + // for 32-bit ASNs. + AmazonSideAsn *int64 `locationName:"amazonSideAsn" type:"long"` + + // The ID of the default association route table. + AssociationDefaultRouteTableId *string `locationName:"associationDefaultRouteTableId" type:"string"` + + // Indicates whether attachment requests are automatically accepted. + AutoAcceptSharedAttachments *string `locationName:"autoAcceptSharedAttachments" type:"string" enum:"AutoAcceptSharedAttachmentsValue"` + + // Indicates whether resource attachments are automatically associated with + // the default association route table. + DefaultRouteTableAssociation *string `locationName:"defaultRouteTableAssociation" type:"string" enum:"DefaultRouteTableAssociationValue"` + + // Indicates whether resource attachments automatically propagate routes to + // the default propagation route table. + DefaultRouteTablePropagation *string `locationName:"defaultRouteTablePropagation" type:"string" enum:"DefaultRouteTablePropagationValue"` + + // Indicates whether DNS support is enabled. + DnsSupport *string `locationName:"dnsSupport" type:"string" enum:"DnsSupportValue"` + + // The ID of the default propagation route table. + PropagationDefaultRouteTableId *string `locationName:"propagationDefaultRouteTableId" type:"string"` + + // Indicates whether Equal Cost Multipath Protocol support is enabled. + VpnEcmpSupport *string `locationName:"vpnEcmpSupport" type:"string" enum:"VpnEcmpSupportValue"` } // String returns the string representation -func (s SuccessfulInstanceCreditSpecificationItem) String() string { +func (s TransitGatewayOptions) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s SuccessfulInstanceCreditSpecificationItem) GoString() string { +func (s TransitGatewayOptions) GoString() string { return s.String() } -// SetInstanceId sets the InstanceId field's value. -func (s *SuccessfulInstanceCreditSpecificationItem) SetInstanceId(v string) *SuccessfulInstanceCreditSpecificationItem { - s.InstanceId = &v +// SetAmazonSideAsn sets the AmazonSideAsn field's value. +func (s *TransitGatewayOptions) SetAmazonSideAsn(v int64) *TransitGatewayOptions { + s.AmazonSideAsn = &v return s } -// Describes a tag. -type Tag struct { - _ struct{} `type:"structure"` +// SetAssociationDefaultRouteTableId sets the AssociationDefaultRouteTableId field's value. +func (s *TransitGatewayOptions) SetAssociationDefaultRouteTableId(v string) *TransitGatewayOptions { + s.AssociationDefaultRouteTableId = &v + return s +} - // The key of the tag. - // - // Constraints: Tag keys are case-sensitive and accept a maximum of 127 Unicode - // characters. May not begin with aws: - Key *string `locationName:"key" type:"string"` +// SetAutoAcceptSharedAttachments sets the AutoAcceptSharedAttachments field's value. +func (s *TransitGatewayOptions) SetAutoAcceptSharedAttachments(v string) *TransitGatewayOptions { + s.AutoAcceptSharedAttachments = &v + return s +} - // The value of the tag. - // - // Constraints: Tag values are case-sensitive and accept a maximum of 255 Unicode - // characters. - Value *string `locationName:"value" type:"string"` +// SetDefaultRouteTableAssociation sets the DefaultRouteTableAssociation field's value. +func (s *TransitGatewayOptions) SetDefaultRouteTableAssociation(v string) *TransitGatewayOptions { + s.DefaultRouteTableAssociation = &v + return s } -// String returns the string representation -func (s Tag) String() string { - return awsutil.Prettify(s) +// SetDefaultRouteTablePropagation sets the DefaultRouteTablePropagation field's value. +func (s *TransitGatewayOptions) SetDefaultRouteTablePropagation(v string) *TransitGatewayOptions { + s.DefaultRouteTablePropagation = &v + return s } -// GoString returns the string representation -func (s Tag) GoString() string { - return s.String() +// SetDnsSupport sets the DnsSupport field's value. +func (s *TransitGatewayOptions) SetDnsSupport(v string) *TransitGatewayOptions { + s.DnsSupport = &v + return s } -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v +// SetPropagationDefaultRouteTableId sets the PropagationDefaultRouteTableId field's value. +func (s *TransitGatewayOptions) SetPropagationDefaultRouteTableId(v string) *TransitGatewayOptions { + s.PropagationDefaultRouteTableId = &v return s } -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v +// SetVpnEcmpSupport sets the VpnEcmpSupport field's value. +func (s *TransitGatewayOptions) SetVpnEcmpSupport(v string) *TransitGatewayOptions { + s.VpnEcmpSupport = &v return s } -// Describes a tag. -type TagDescription struct { +// Describes route propagation. +type TransitGatewayPropagation struct { _ struct{} `type:"structure"` - // The tag key. - Key *string `locationName:"key" type:"string"` - - // The ID of the resource. For example, ami-1a2b3c4d. + // The ID of the resource. ResourceId *string `locationName:"resourceId" type:"string"` // The resource type. - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` + ResourceType *string `locationName:"resourceType" type:"string" enum:"TransitGatewayAttachmentResourceType"` - // The tag value. - Value *string `locationName:"value" type:"string"` + // The state. + State *string `locationName:"state" type:"string" enum:"TransitGatewayPropagationState"` + + // The ID of the attachment. + TransitGatewayAttachmentId *string `locationName:"transitGatewayAttachmentId" type:"string"` + + // The ID of the transit gateway route table. + TransitGatewayRouteTableId *string `locationName:"transitGatewayRouteTableId" type:"string"` } // String returns the string representation -func (s TagDescription) String() string { +func (s TransitGatewayPropagation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s TagDescription) GoString() string { +func (s TransitGatewayPropagation) GoString() string { return s.String() } -// SetKey sets the Key field's value. -func (s *TagDescription) SetKey(v string) *TagDescription { - s.Key = &v - return s -} - // SetResourceId sets the ResourceId field's value. -func (s *TagDescription) SetResourceId(v string) *TagDescription { +func (s *TransitGatewayPropagation) SetResourceId(v string) *TransitGatewayPropagation { s.ResourceId = &v return s } // SetResourceType sets the ResourceType field's value. -func (s *TagDescription) SetResourceType(v string) *TagDescription { +func (s *TransitGatewayPropagation) SetResourceType(v string) *TransitGatewayPropagation { s.ResourceType = &v return s } -// SetValue sets the Value field's value. -func (s *TagDescription) SetValue(v string) *TagDescription { - s.Value = &v +// SetState sets the State field's value. +func (s *TransitGatewayPropagation) SetState(v string) *TransitGatewayPropagation { + s.State = &v return s } -// The tags to apply to a resource when the resource is being created. -type TagSpecification struct { - _ struct{} `type:"structure"` - - // The type of resource to tag. Currently, the resource types that support tagging - // on creation are fleet, instance, snapshot, and volume. To tag a resource - // after it has been created, see CreateTags. - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - - // The tags to apply to the resource. - Tags []*Tag `locationName:"Tag" locationNameList:"item" type:"list"` -} - -// String returns the string representation -func (s TagSpecification) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s TagSpecification) GoString() string { - return s.String() -} - -// SetResourceType sets the ResourceType field's value. -func (s *TagSpecification) SetResourceType(v string) *TagSpecification { - s.ResourceType = &v +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *TransitGatewayPropagation) SetTransitGatewayAttachmentId(v string) *TransitGatewayPropagation { + s.TransitGatewayAttachmentId = &v return s } -// SetTags sets the Tags field's value. -func (s *TagSpecification) SetTags(v []*Tag) *TagSpecification { - s.Tags = v +// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. +func (s *TransitGatewayPropagation) SetTransitGatewayRouteTableId(v string) *TransitGatewayPropagation { + s.TransitGatewayRouteTableId = &v return s } -// The number of units to request. You can choose to set the target capacity -// in terms of instances or a performance characteristic that is important to -// your application workload, such as vCPUs, memory, or I/O. If the request -// type is maintain, you can specify a target capacity of 0 and add capacity -// later. -type TargetCapacitySpecification struct { +// Describes the options for a transit gateway. +type TransitGatewayRequestOptions struct { _ struct{} `type:"structure"` - // The default TotalTargetCapacity, which is either Spot or On-Demand. - DefaultTargetCapacityType *string `locationName:"defaultTargetCapacityType" type:"string" enum:"DefaultTargetCapacityType"` + // A private Autonomous System Number (ASN) for the Amazon side of a BGP session. + // The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 + // for 32-bit ASNs. + AmazonSideAsn *int64 `type:"long"` - // The number of On-Demand units to request. - OnDemandTargetCapacity *int64 `locationName:"onDemandTargetCapacity" type:"integer"` + // Enable or disable automatic acceptance of attachment requests. The default + // is disable. + AutoAcceptSharedAttachments *string `type:"string" enum:"AutoAcceptSharedAttachmentsValue"` - // The maximum number of Spot units to launch. - SpotTargetCapacity *int64 `locationName:"spotTargetCapacity" type:"integer"` + // Enable or disable automatic association with the default association route + // table. The default is enable. + DefaultRouteTableAssociation *string `type:"string" enum:"DefaultRouteTableAssociationValue"` - // The number of units to request, filled using DefaultTargetCapacityType. - TotalTargetCapacity *int64 `locationName:"totalTargetCapacity" type:"integer"` + // Enable or disable automatic propagation of routes to the default propagation + // route table. The default is enable. + DefaultRouteTablePropagation *string `type:"string" enum:"DefaultRouteTablePropagationValue"` + + // Enable or disable DNS support. + DnsSupport *string `type:"string" enum:"DnsSupportValue"` + + // Enable or disable Equal Cost Multipath Protocol support. + VpnEcmpSupport *string `type:"string" enum:"VpnEcmpSupportValue"` } // String returns the string representation -func (s TargetCapacitySpecification) String() string { +func (s TransitGatewayRequestOptions) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s TargetCapacitySpecification) GoString() string { +func (s TransitGatewayRequestOptions) GoString() string { return s.String() } -// SetDefaultTargetCapacityType sets the DefaultTargetCapacityType field's value. -func (s *TargetCapacitySpecification) SetDefaultTargetCapacityType(v string) *TargetCapacitySpecification { - s.DefaultTargetCapacityType = &v +// SetAmazonSideAsn sets the AmazonSideAsn field's value. +func (s *TransitGatewayRequestOptions) SetAmazonSideAsn(v int64) *TransitGatewayRequestOptions { + s.AmazonSideAsn = &v return s } -// SetOnDemandTargetCapacity sets the OnDemandTargetCapacity field's value. -func (s *TargetCapacitySpecification) SetOnDemandTargetCapacity(v int64) *TargetCapacitySpecification { - s.OnDemandTargetCapacity = &v +// SetAutoAcceptSharedAttachments sets the AutoAcceptSharedAttachments field's value. +func (s *TransitGatewayRequestOptions) SetAutoAcceptSharedAttachments(v string) *TransitGatewayRequestOptions { + s.AutoAcceptSharedAttachments = &v return s } -// SetSpotTargetCapacity sets the SpotTargetCapacity field's value. -func (s *TargetCapacitySpecification) SetSpotTargetCapacity(v int64) *TargetCapacitySpecification { - s.SpotTargetCapacity = &v +// SetDefaultRouteTableAssociation sets the DefaultRouteTableAssociation field's value. +func (s *TransitGatewayRequestOptions) SetDefaultRouteTableAssociation(v string) *TransitGatewayRequestOptions { + s.DefaultRouteTableAssociation = &v return s } -// SetTotalTargetCapacity sets the TotalTargetCapacity field's value. -func (s *TargetCapacitySpecification) SetTotalTargetCapacity(v int64) *TargetCapacitySpecification { - s.TotalTargetCapacity = &v +// SetDefaultRouteTablePropagation sets the DefaultRouteTablePropagation field's value. +func (s *TransitGatewayRequestOptions) SetDefaultRouteTablePropagation(v string) *TransitGatewayRequestOptions { + s.DefaultRouteTablePropagation = &v return s } -// The number of units to request. You can choose to set the target capacity -// in terms of instances or a performance characteristic that is important to -// your application workload, such as vCPUs, memory, or I/O. If the request -// type is maintain, you can specify a target capacity of 0 and add capacity -// later. -type TargetCapacitySpecificationRequest struct { +// SetDnsSupport sets the DnsSupport field's value. +func (s *TransitGatewayRequestOptions) SetDnsSupport(v string) *TransitGatewayRequestOptions { + s.DnsSupport = &v + return s +} + +// SetVpnEcmpSupport sets the VpnEcmpSupport field's value. +func (s *TransitGatewayRequestOptions) SetVpnEcmpSupport(v string) *TransitGatewayRequestOptions { + s.VpnEcmpSupport = &v + return s +} + +// Describes a route for a transit gateway route table. +type TransitGatewayRoute struct { _ struct{} `type:"structure"` - // The default TotalTargetCapacity, which is either Spot or On-Demand. - DefaultTargetCapacityType *string `type:"string" enum:"DefaultTargetCapacityType"` + // The CIDR block used for destination matches. + DestinationCidrBlock *string `locationName:"destinationCidrBlock" type:"string"` - // The number of On-Demand units to request. - OnDemandTargetCapacity *int64 `type:"integer"` + // The state of the route. + State *string `locationName:"state" type:"string" enum:"TransitGatewayRouteState"` - // The number of Spot units to request. - SpotTargetCapacity *int64 `type:"integer"` + // The attachments. + TransitGatewayAttachments []*TransitGatewayRouteAttachment `locationName:"transitGatewayAttachments" locationNameList:"item" type:"list"` - // The number of units to request, filled using DefaultTargetCapacityType. - // - // TotalTargetCapacity is a required field - TotalTargetCapacity *int64 `type:"integer" required:"true"` + // The route type. + Type *string `locationName:"type" type:"string" enum:"TransitGatewayRouteType"` } // String returns the string representation -func (s TargetCapacitySpecificationRequest) String() string { +func (s TransitGatewayRoute) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s TargetCapacitySpecificationRequest) GoString() string { +func (s TransitGatewayRoute) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *TargetCapacitySpecificationRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TargetCapacitySpecificationRequest"} - if s.TotalTargetCapacity == nil { - invalidParams.Add(request.NewErrParamRequired("TotalTargetCapacity")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDefaultTargetCapacityType sets the DefaultTargetCapacityType field's value. -func (s *TargetCapacitySpecificationRequest) SetDefaultTargetCapacityType(v string) *TargetCapacitySpecificationRequest { - s.DefaultTargetCapacityType = &v +// SetDestinationCidrBlock sets the DestinationCidrBlock field's value. +func (s *TransitGatewayRoute) SetDestinationCidrBlock(v string) *TransitGatewayRoute { + s.DestinationCidrBlock = &v return s } -// SetOnDemandTargetCapacity sets the OnDemandTargetCapacity field's value. -func (s *TargetCapacitySpecificationRequest) SetOnDemandTargetCapacity(v int64) *TargetCapacitySpecificationRequest { - s.OnDemandTargetCapacity = &v +// SetState sets the State field's value. +func (s *TransitGatewayRoute) SetState(v string) *TransitGatewayRoute { + s.State = &v return s } -// SetSpotTargetCapacity sets the SpotTargetCapacity field's value. -func (s *TargetCapacitySpecificationRequest) SetSpotTargetCapacity(v int64) *TargetCapacitySpecificationRequest { - s.SpotTargetCapacity = &v +// SetTransitGatewayAttachments sets the TransitGatewayAttachments field's value. +func (s *TransitGatewayRoute) SetTransitGatewayAttachments(v []*TransitGatewayRouteAttachment) *TransitGatewayRoute { + s.TransitGatewayAttachments = v return s } -// SetTotalTargetCapacity sets the TotalTargetCapacity field's value. -func (s *TargetCapacitySpecificationRequest) SetTotalTargetCapacity(v int64) *TargetCapacitySpecificationRequest { - s.TotalTargetCapacity = &v +// SetType sets the Type field's value. +func (s *TransitGatewayRoute) SetType(v string) *TransitGatewayRoute { + s.Type = &v return s } -// Information about the Convertible Reserved Instance offering. -type TargetConfiguration struct { +// Describes a route attachment. +type TransitGatewayRouteAttachment struct { _ struct{} `type:"structure"` - // The number of instances the Convertible Reserved Instance offering can be - // applied to. This parameter is reserved and cannot be specified in a request - InstanceCount *int64 `locationName:"instanceCount" type:"integer"` + // The ID of the resource. + ResourceId *string `locationName:"resourceId" type:"string"` - // The ID of the Convertible Reserved Instance offering. - OfferingId *string `locationName:"offeringId" type:"string"` + // The resource type. + ResourceType *string `locationName:"resourceType" type:"string" enum:"TransitGatewayAttachmentResourceType"` + + // The ID of the attachment. + TransitGatewayAttachmentId *string `locationName:"transitGatewayAttachmentId" type:"string"` } // String returns the string representation -func (s TargetConfiguration) String() string { +func (s TransitGatewayRouteAttachment) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s TargetConfiguration) GoString() string { +func (s TransitGatewayRouteAttachment) GoString() string { return s.String() } -// SetInstanceCount sets the InstanceCount field's value. -func (s *TargetConfiguration) SetInstanceCount(v int64) *TargetConfiguration { - s.InstanceCount = &v +// SetResourceId sets the ResourceId field's value. +func (s *TransitGatewayRouteAttachment) SetResourceId(v string) *TransitGatewayRouteAttachment { + s.ResourceId = &v return s } -// SetOfferingId sets the OfferingId field's value. -func (s *TargetConfiguration) SetOfferingId(v string) *TargetConfiguration { - s.OfferingId = &v +// SetResourceType sets the ResourceType field's value. +func (s *TransitGatewayRouteAttachment) SetResourceType(v string) *TransitGatewayRouteAttachment { + s.ResourceType = &v return s } -// Details about the target configuration. -type TargetConfigurationRequest struct { +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *TransitGatewayRouteAttachment) SetTransitGatewayAttachmentId(v string) *TransitGatewayRouteAttachment { + s.TransitGatewayAttachmentId = &v + return s +} + +// Describes a transit gateway route table. +type TransitGatewayRouteTable struct { _ struct{} `type:"structure"` - // The number of instances the Covertible Reserved Instance offering can be - // applied to. This parameter is reserved and cannot be specified in a request - InstanceCount *int64 `type:"integer"` + // The creation time. + CreationTime *time.Time `locationName:"creationTime" type:"timestamp"` - // The Convertible Reserved Instance offering ID. - // - // OfferingId is a required field - OfferingId *string `type:"string" required:"true"` + // Indicates whether this is the default association route table for the transit + // gateway. + DefaultAssociationRouteTable *bool `locationName:"defaultAssociationRouteTable" type:"boolean"` + + // Indicates whether this is the default propagation route table for the transit + // gateway. + DefaultPropagationRouteTable *bool `locationName:"defaultPropagationRouteTable" type:"boolean"` + + // The state of the transit gateway route table. + State *string `locationName:"state" type:"string" enum:"TransitGatewayRouteTableState"` + + // Any tags assigned to the route table. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + + // The ID of the transit gateway. + TransitGatewayId *string `locationName:"transitGatewayId" type:"string"` + + // The ID of the transit gateway route table. + TransitGatewayRouteTableId *string `locationName:"transitGatewayRouteTableId" type:"string"` } // String returns the string representation -func (s TargetConfigurationRequest) String() string { +func (s TransitGatewayRouteTable) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s TargetConfigurationRequest) GoString() string { +func (s TransitGatewayRouteTable) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *TargetConfigurationRequest) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TargetConfigurationRequest"} - if s.OfferingId == nil { - invalidParams.Add(request.NewErrParamRequired("OfferingId")) - } +// SetCreationTime sets the CreationTime field's value. +func (s *TransitGatewayRouteTable) SetCreationTime(v time.Time) *TransitGatewayRouteTable { + s.CreationTime = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetDefaultAssociationRouteTable sets the DefaultAssociationRouteTable field's value. +func (s *TransitGatewayRouteTable) SetDefaultAssociationRouteTable(v bool) *TransitGatewayRouteTable { + s.DefaultAssociationRouteTable = &v + return s } -// SetInstanceCount sets the InstanceCount field's value. -func (s *TargetConfigurationRequest) SetInstanceCount(v int64) *TargetConfigurationRequest { - s.InstanceCount = &v +// SetDefaultPropagationRouteTable sets the DefaultPropagationRouteTable field's value. +func (s *TransitGatewayRouteTable) SetDefaultPropagationRouteTable(v bool) *TransitGatewayRouteTable { + s.DefaultPropagationRouteTable = &v return s } -// SetOfferingId sets the OfferingId field's value. -func (s *TargetConfigurationRequest) SetOfferingId(v string) *TargetConfigurationRequest { - s.OfferingId = &v +// SetState sets the State field's value. +func (s *TransitGatewayRouteTable) SetState(v string) *TransitGatewayRouteTable { + s.State = &v return s } -// Describes a load balancer target group. -type TargetGroup struct { +// SetTags sets the Tags field's value. +func (s *TransitGatewayRouteTable) SetTags(v []*Tag) *TransitGatewayRouteTable { + s.Tags = v + return s +} + +// SetTransitGatewayId sets the TransitGatewayId field's value. +func (s *TransitGatewayRouteTable) SetTransitGatewayId(v string) *TransitGatewayRouteTable { + s.TransitGatewayId = &v + return s +} + +// SetTransitGatewayRouteTableId sets the TransitGatewayRouteTableId field's value. +func (s *TransitGatewayRouteTable) SetTransitGatewayRouteTableId(v string) *TransitGatewayRouteTable { + s.TransitGatewayRouteTableId = &v + return s +} + +// Describes an association between a route table and a resource attachment. +type TransitGatewayRouteTableAssociation struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the target group. - // - // Arn is a required field - Arn *string `locationName:"arn" type:"string" required:"true"` + // The ID of the resource. + ResourceId *string `locationName:"resourceId" type:"string"` + + // The resource type. + ResourceType *string `locationName:"resourceType" type:"string" enum:"TransitGatewayAttachmentResourceType"` + + // The state of the association. + State *string `locationName:"state" type:"string" enum:"TransitGatewayAssociationState"` + + // The ID of the attachment. + TransitGatewayAttachmentId *string `locationName:"transitGatewayAttachmentId" type:"string"` } // String returns the string representation -func (s TargetGroup) String() string { +func (s TransitGatewayRouteTableAssociation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s TargetGroup) GoString() string { +func (s TransitGatewayRouteTableAssociation) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *TargetGroup) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TargetGroup"} - if s.Arn == nil { - invalidParams.Add(request.NewErrParamRequired("Arn")) - } +// SetResourceId sets the ResourceId field's value. +func (s *TransitGatewayRouteTableAssociation) SetResourceId(v string) *TransitGatewayRouteTableAssociation { + s.ResourceId = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetResourceType sets the ResourceType field's value. +func (s *TransitGatewayRouteTableAssociation) SetResourceType(v string) *TransitGatewayRouteTableAssociation { + s.ResourceType = &v + return s } -// SetArn sets the Arn field's value. -func (s *TargetGroup) SetArn(v string) *TargetGroup { - s.Arn = &v +// SetState sets the State field's value. +func (s *TransitGatewayRouteTableAssociation) SetState(v string) *TransitGatewayRouteTableAssociation { + s.State = &v return s } -// Describes the target groups to attach to a Spot Fleet. Spot Fleet registers -// the running Spot Instances with these target groups. -type TargetGroupsConfig struct { +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *TransitGatewayRouteTableAssociation) SetTransitGatewayAttachmentId(v string) *TransitGatewayRouteTableAssociation { + s.TransitGatewayAttachmentId = &v + return s +} + +// Describes a route table propagation. +type TransitGatewayRouteTablePropagation struct { _ struct{} `type:"structure"` - // One or more target groups. - // - // TargetGroups is a required field - TargetGroups []*TargetGroup `locationName:"targetGroups" locationNameList:"item" min:"1" type:"list" required:"true"` + // The ID of the resource. + ResourceId *string `locationName:"resourceId" type:"string"` + + // The type of resource. + ResourceType *string `locationName:"resourceType" type:"string" enum:"TransitGatewayAttachmentResourceType"` + + // The state of the resource. + State *string `locationName:"state" type:"string" enum:"TransitGatewayPropagationState"` + + // The ID of the attachment. + TransitGatewayAttachmentId *string `locationName:"transitGatewayAttachmentId" type:"string"` } // String returns the string representation -func (s TargetGroupsConfig) String() string { +func (s TransitGatewayRouteTablePropagation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s TargetGroupsConfig) GoString() string { +func (s TransitGatewayRouteTablePropagation) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *TargetGroupsConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TargetGroupsConfig"} - if s.TargetGroups == nil { - invalidParams.Add(request.NewErrParamRequired("TargetGroups")) - } - if s.TargetGroups != nil && len(s.TargetGroups) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TargetGroups", 1)) - } - if s.TargetGroups != nil { - for i, v := range s.TargetGroups { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetGroups", i), err.(request.ErrInvalidParams)) - } - } - } +// SetResourceId sets the ResourceId field's value. +func (s *TransitGatewayRouteTablePropagation) SetResourceId(v string) *TransitGatewayRouteTablePropagation { + s.ResourceId = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetResourceType sets the ResourceType field's value. +func (s *TransitGatewayRouteTablePropagation) SetResourceType(v string) *TransitGatewayRouteTablePropagation { + s.ResourceType = &v + return s } -// SetTargetGroups sets the TargetGroups field's value. -func (s *TargetGroupsConfig) SetTargetGroups(v []*TargetGroup) *TargetGroupsConfig { - s.TargetGroups = v +// SetState sets the State field's value. +func (s *TransitGatewayRouteTablePropagation) SetState(v string) *TransitGatewayRouteTablePropagation { + s.State = &v return s } -// The total value of the new Convertible Reserved Instances. -type TargetReservationValue struct { +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *TransitGatewayRouteTablePropagation) SetTransitGatewayAttachmentId(v string) *TransitGatewayRouteTablePropagation { + s.TransitGatewayAttachmentId = &v + return s +} + +// Describes a VPC attachment. +type TransitGatewayVpcAttachment struct { _ struct{} `type:"structure"` - // The total value of the Convertible Reserved Instances that make up the exchange. - // This is the sum of the list value, remaining upfront price, and additional - // upfront cost of the exchange. - ReservationValue *ReservationValue `locationName:"reservationValue" type:"structure"` + // The creation time. + CreationTime *time.Time `locationName:"creationTime" type:"timestamp"` - // The configuration of the Convertible Reserved Instances that make up the - // exchange. - TargetConfiguration *TargetConfiguration `locationName:"targetConfiguration" type:"structure"` + // The VPC attachment options. + Options *TransitGatewayVpcAttachmentOptions `locationName:"options" type:"structure"` + + // The state of the VPC attachment. + State *string `locationName:"state" type:"string" enum:"TransitGatewayAttachmentState"` + + // The IDs of the subnets. + SubnetIds []*string `locationName:"subnetIds" locationNameList:"item" type:"list"` + + // The tags for the VPC attachment. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + + // The ID of the attachment. + TransitGatewayAttachmentId *string `locationName:"transitGatewayAttachmentId" type:"string"` + + // The ID of the transit gateway. + TransitGatewayId *string `locationName:"transitGatewayId" type:"string"` + + // The ID of the VPC. + VpcId *string `locationName:"vpcId" type:"string"` + + // The ID of the AWS account that owns the VPC. + VpcOwnerId *string `locationName:"vpcOwnerId" type:"string"` } // String returns the string representation -func (s TargetReservationValue) String() string { +func (s TransitGatewayVpcAttachment) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s TargetReservationValue) GoString() string { +func (s TransitGatewayVpcAttachment) GoString() string { return s.String() } -// SetReservationValue sets the ReservationValue field's value. -func (s *TargetReservationValue) SetReservationValue(v *ReservationValue) *TargetReservationValue { - s.ReservationValue = v +// SetCreationTime sets the CreationTime field's value. +func (s *TransitGatewayVpcAttachment) SetCreationTime(v time.Time) *TransitGatewayVpcAttachment { + s.CreationTime = &v return s } -// SetTargetConfiguration sets the TargetConfiguration field's value. -func (s *TargetReservationValue) SetTargetConfiguration(v *TargetConfiguration) *TargetReservationValue { - s.TargetConfiguration = v +// SetOptions sets the Options field's value. +func (s *TransitGatewayVpcAttachment) SetOptions(v *TransitGatewayVpcAttachmentOptions) *TransitGatewayVpcAttachment { + s.Options = v return s } -// Contains the parameters for TerminateInstances. -type TerminateInstancesInput 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 `locationName:"dryRun" type:"boolean"` - - // One or more instance IDs. - // - // Constraints: Up to 1000 instance IDs. We recommend breaking up this request - // into smaller batches. - // - // InstanceIds is a required field - InstanceIds []*string `locationName:"InstanceId" locationNameList:"InstanceId" type:"list" required:"true"` +// SetState sets the State field's value. +func (s *TransitGatewayVpcAttachment) SetState(v string) *TransitGatewayVpcAttachment { + s.State = &v + return s } -// String returns the string representation -func (s TerminateInstancesInput) String() string { - return awsutil.Prettify(s) +// SetSubnetIds sets the SubnetIds field's value. +func (s *TransitGatewayVpcAttachment) SetSubnetIds(v []*string) *TransitGatewayVpcAttachment { + s.SubnetIds = v + return s } -// GoString returns the string representation -func (s TerminateInstancesInput) GoString() string { - return s.String() +// SetTags sets the Tags field's value. +func (s *TransitGatewayVpcAttachment) SetTags(v []*Tag) *TransitGatewayVpcAttachment { + s.Tags = v + return s } -// Validate inspects the fields of the type to determine if they are valid. -func (s *TerminateInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TerminateInstancesInput"} - if s.InstanceIds == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceIds")) - } +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *TransitGatewayVpcAttachment) SetTransitGatewayAttachmentId(v string) *TransitGatewayVpcAttachment { + s.TransitGatewayAttachmentId = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetTransitGatewayId sets the TransitGatewayId field's value. +func (s *TransitGatewayVpcAttachment) SetTransitGatewayId(v string) *TransitGatewayVpcAttachment { + s.TransitGatewayId = &v + return s } -// SetDryRun sets the DryRun field's value. -func (s *TerminateInstancesInput) SetDryRun(v bool) *TerminateInstancesInput { - s.DryRun = &v +// SetVpcId sets the VpcId field's value. +func (s *TransitGatewayVpcAttachment) SetVpcId(v string) *TransitGatewayVpcAttachment { + s.VpcId = &v return s } -// SetInstanceIds sets the InstanceIds field's value. -func (s *TerminateInstancesInput) SetInstanceIds(v []*string) *TerminateInstancesInput { - s.InstanceIds = v +// SetVpcOwnerId sets the VpcOwnerId field's value. +func (s *TransitGatewayVpcAttachment) SetVpcOwnerId(v string) *TransitGatewayVpcAttachment { + s.VpcOwnerId = &v return s } -// Contains the output of TerminateInstances. -type TerminateInstancesOutput struct { +// Describes the VPC attachment options. +type TransitGatewayVpcAttachmentOptions struct { _ struct{} `type:"structure"` - // Information about one or more terminated instances. - TerminatingInstances []*InstanceStateChange `locationName:"instancesSet" locationNameList:"item" type:"list"` + // Indicates whether DNS support is enabled. + DnsSupport *string `locationName:"dnsSupport" type:"string" enum:"DnsSupportValue"` + + // Indicates whether IPv6 support is enabled. + Ipv6Support *string `locationName:"ipv6Support" type:"string" enum:"Ipv6SupportValue"` } // String returns the string representation -func (s TerminateInstancesOutput) String() string { +func (s TransitGatewayVpcAttachmentOptions) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s TerminateInstancesOutput) GoString() string { +func (s TransitGatewayVpcAttachmentOptions) GoString() string { return s.String() } -// SetTerminatingInstances sets the TerminatingInstances field's value. -func (s *TerminateInstancesOutput) SetTerminatingInstances(v []*InstanceStateChange) *TerminateInstancesOutput { - s.TerminatingInstances = v +// SetDnsSupport sets the DnsSupport field's value. +func (s *TransitGatewayVpcAttachmentOptions) SetDnsSupport(v string) *TransitGatewayVpcAttachmentOptions { + s.DnsSupport = &v + return s +} + +// SetIpv6Support sets the Ipv6Support field's value. +func (s *TransitGatewayVpcAttachmentOptions) SetIpv6Support(v string) *TransitGatewayVpcAttachmentOptions { + s.Ipv6Support = &v return s } @@ -67721,7 +81714,6 @@ func (s UnassignPrivateIpAddressesOutput) GoString() string { return s.String() } -// Contains the parameters for UnmonitorInstances. type UnmonitorInstancesInput struct { _ struct{} `type:"structure"` @@ -67772,7 +81764,6 @@ func (s *UnmonitorInstancesInput) SetInstanceIds(v []*string) *UnmonitorInstance return s } -// Contains the output of UnmonitorInstances. type UnmonitorInstancesOutput struct { _ struct{} `type:"structure"` @@ -67796,12 +81787,13 @@ func (s *UnmonitorInstancesOutput) SetInstanceMonitorings(v []*InstanceMonitorin return s } -// Describes the T2 instance whose credit option for CPU usage was not modified. +// Describes the T2 or T3 instance whose credit option for CPU usage was not +// modified. type UnsuccessfulInstanceCreditSpecificationItem struct { _ struct{} `type:"structure"` - // The applicable error for the T2 instance whose credit option for CPU usage - // was not modified. + // The applicable error for the T2 or T3 instance whose credit option for CPU + // usage was not modified. Error *UnsuccessfulInstanceCreditSpecificationItemError `locationName:"error" type:"structure"` // The ID of the instance. @@ -67830,8 +81822,8 @@ func (s *UnsuccessfulInstanceCreditSpecificationItem) SetInstanceId(v string) *U return s } -// Information about the error for the T2 instance whose credit option for CPU -// usage was not modified. +// Information about the error for the T2 or T3 instance whose credit option +// for CPU usage was not modified. type UnsuccessfulInstanceCreditSpecificationItemError struct { _ struct{} `type:"structure"` @@ -67869,9 +81861,7 @@ type UnsuccessfulItem struct { _ struct{} `type:"structure"` // Information about the error. - // - // Error is a required field - Error *UnsuccessfulItemError `locationName:"error" type:"structure" required:"true"` + Error *UnsuccessfulItemError `locationName:"error" type:"structure"` // The ID of the resource. ResourceId *string `locationName:"resourceId" type:"string"` @@ -67905,14 +81895,10 @@ type UnsuccessfulItemError struct { _ struct{} `type:"structure"` // The error code. - // - // Code is a required field - Code *string `locationName:"code" type:"string" required:"true"` + Code *string `locationName:"code" type:"string"` // The error message accompanying the error code. - // - // Message is a required field - Message *string `locationName:"message" type:"string" required:"true"` + Message *string `locationName:"message" type:"string"` } // String returns the string representation @@ -67937,7 +81923,6 @@ func (s *UnsuccessfulItemError) SetMessage(v string) *UnsuccessfulItemError { return s } -// Contains the parameters for UpdateSecurityGroupRuleDescriptionsEgress. type UpdateSecurityGroupRuleDescriptionsEgressInput struct { _ struct{} `type:"structure"` @@ -68009,7 +81994,6 @@ func (s *UpdateSecurityGroupRuleDescriptionsEgressInput) SetIpPermissions(v []*I return s } -// Contains the output of UpdateSecurityGroupRuleDescriptionsEgress. type UpdateSecurityGroupRuleDescriptionsEgressOutput struct { _ struct{} `type:"structure"` @@ -68033,7 +82017,6 @@ func (s *UpdateSecurityGroupRuleDescriptionsEgressOutput) SetReturn(v bool) *Upd return s } -// Contains the parameters for UpdateSecurityGroupRuleDescriptionsIngress. type UpdateSecurityGroupRuleDescriptionsIngressInput struct { _ struct{} `type:"structure"` @@ -68105,7 +82088,6 @@ func (s *UpdateSecurityGroupRuleDescriptionsIngressInput) SetIpPermissions(v []* return s } -// Contains the output of UpdateSecurityGroupRuleDescriptionsIngress. type UpdateSecurityGroupRuleDescriptionsIngressOutput struct { _ struct{} `type:"structure"` @@ -68401,8 +82383,12 @@ type Volume struct { // (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) // in the Amazon Elastic Compute Cloud User Guide. // - // Constraint: Range is 100-32000 IOPS for io1 volumes and 100-10000 IOPS for - // gp2 volumes. + // Constraints: Range is 100-16,000 IOPS for gp2 volumes and 100 to 64,000IOPS + // for io1 volumes in most regions. Maximum io1IOPS of 64,000 is guaranteed + // only on Nitro-based instances (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 (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) + // in the Amazon Elastic Compute Cloud User Guide. // // Condition: This parameter is required for requests to create io1 volumes; // it is not used in requests to create gp2, st1, sc1, or standard volumes. @@ -69009,6 +82995,9 @@ type Vpc struct { // Indicates whether the VPC is the default VPC. IsDefault *bool `locationName:"isDefault" type:"boolean"` + // The ID of the AWS account that owns the VPC. + OwnerId *string `locationName:"ownerId" type:"string"` + // The current state of the VPC. State *string `locationName:"state" type:"string" enum:"VpcState"` @@ -69065,6 +83054,12 @@ func (s *Vpc) SetIsDefault(v bool) *Vpc { return s } +// SetOwnerId sets the OwnerId field's value. +func (s *Vpc) SetOwnerId(v string) *Vpc { + s.OwnerId = &v + return s +} + // SetState sets the State field's value. func (s *Vpc) SetState(v string) *Vpc { s.State = &v @@ -69728,6 +83723,9 @@ type VpnConnection struct { // Any tags assigned to the VPN connection. Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + // The ID of the transit gateway associated with the VPN connection. + TransitGatewayId *string `locationName:"transitGatewayId" type:"string"` + // The type of VPN connection. Type *string `locationName:"type" type:"string" enum:"GatewayType"` @@ -69793,6 +83791,12 @@ func (s *VpnConnection) SetTags(v []*Tag) *VpnConnection { return s } +// SetTransitGatewayId sets the TransitGatewayId field's value. +func (s *VpnConnection) SetTransitGatewayId(v string) *VpnConnection { + s.TransitGatewayId = &v + return s +} + // SetType sets the Type field's value. func (s *VpnConnection) SetType(v string) *VpnConnection { s.Type = &v @@ -70056,6 +84060,79 @@ func (s *VpnTunnelOptionsSpecification) SetTunnelInsideCidr(v string) *VpnTunnel return s } +type WithdrawByoipCidrInput struct { + _ struct{} `type:"structure"` + + // The public IPv4 address range, in CIDR notation. + // + // Cidr is a required field + Cidr *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"` +} + +// String returns the string representation +func (s WithdrawByoipCidrInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WithdrawByoipCidrInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *WithdrawByoipCidrInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "WithdrawByoipCidrInput"} + if s.Cidr == nil { + invalidParams.Add(request.NewErrParamRequired("Cidr")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCidr sets the Cidr field's value. +func (s *WithdrawByoipCidrInput) SetCidr(v string) *WithdrawByoipCidrInput { + s.Cidr = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *WithdrawByoipCidrInput) SetDryRun(v bool) *WithdrawByoipCidrInput { + s.DryRun = &v + return s +} + +type WithdrawByoipCidrOutput struct { + _ struct{} `type:"structure"` + + // Information about the address pool. + ByoipCidr *ByoipCidr `locationName:"byoipCidr" type:"structure"` +} + +// String returns the string representation +func (s WithdrawByoipCidrOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WithdrawByoipCidrOutput) GoString() string { + return s.String() +} + +// SetByoipCidr sets the ByoipCidr field's value. +func (s *WithdrawByoipCidrOutput) SetByoipCidr(v *ByoipCidr) *WithdrawByoipCidrOutput { + s.ByoipCidr = v + return s +} + const ( // AccountAttributeNameSupportedPlatforms is a AccountAttributeName enum value AccountAttributeNameSupportedPlatforms = "supported-platforms" @@ -70117,6 +84194,31 @@ const ( // ArchitectureValuesX8664 is a ArchitectureValues enum value ArchitectureValuesX8664 = "x86_64" + + // ArchitectureValuesArm64 is a ArchitectureValues enum value + ArchitectureValuesArm64 = "arm64" +) + +const ( + // AssociatedNetworkTypeVpc is a AssociatedNetworkType enum value + AssociatedNetworkTypeVpc = "vpc" +) + +const ( + // AssociationStatusCodeAssociating is a AssociationStatusCode enum value + AssociationStatusCodeAssociating = "associating" + + // AssociationStatusCodeAssociated is a AssociationStatusCode enum value + AssociationStatusCodeAssociated = "associated" + + // AssociationStatusCodeAssociationFailed is a AssociationStatusCode enum value + AssociationStatusCodeAssociationFailed = "association-failed" + + // AssociationStatusCodeDisassociating is a AssociationStatusCode enum value + AssociationStatusCodeDisassociating = "disassociating" + + // AssociationStatusCodeDisassociated is a AssociationStatusCode enum value + AssociationStatusCodeDisassociated = "disassociated" ) const ( @@ -70133,6 +84235,14 @@ const ( AttachmentStatusDetached = "detached" ) +const ( + // AutoAcceptSharedAttachmentsValueEnable is a AutoAcceptSharedAttachmentsValue enum value + AutoAcceptSharedAttachmentsValueEnable = "enable" + + // AutoAcceptSharedAttachmentsValueDisable is a AutoAcceptSharedAttachmentsValue enum value + AutoAcceptSharedAttachmentsValueDisable = "disable" +) + const ( // AutoPlacementOn is a AutoPlacement enum value AutoPlacementOn = "on" @@ -70201,6 +84311,29 @@ const ( BundleTaskStateFailed = "failed" ) +const ( + // ByoipCidrStateAdvertised is a ByoipCidrState enum value + ByoipCidrStateAdvertised = "advertised" + + // ByoipCidrStateDeprovisioned is a ByoipCidrState enum value + ByoipCidrStateDeprovisioned = "deprovisioned" + + // ByoipCidrStateFailedDeprovision is a ByoipCidrState enum value + ByoipCidrStateFailedDeprovision = "failed-deprovision" + + // ByoipCidrStateFailedProvision is a ByoipCidrState enum value + ByoipCidrStateFailedProvision = "failed-provision" + + // ByoipCidrStatePendingDeprovision is a ByoipCidrState enum value + ByoipCidrStatePendingDeprovision = "pending-deprovision" + + // ByoipCidrStatePendingProvision is a ByoipCidrState enum value + ByoipCidrStatePendingProvision = "pending-provision" + + // ByoipCidrStateProvisioned is a ByoipCidrState enum value + ByoipCidrStateProvisioned = "provisioned" +) + const ( // CancelBatchErrorCodeFleetRequestIdDoesNotExist is a CancelBatchErrorCode enum value CancelBatchErrorCodeFleetRequestIdDoesNotExist = "fleetRequestIdDoesNotExist" @@ -70232,6 +84365,137 @@ const ( CancelSpotInstanceRequestStateCompleted = "completed" ) +const ( + // CapacityReservationInstancePlatformLinuxUnix is a CapacityReservationInstancePlatform enum value + CapacityReservationInstancePlatformLinuxUnix = "Linux/UNIX" + + // CapacityReservationInstancePlatformRedHatEnterpriseLinux is a CapacityReservationInstancePlatform enum value + CapacityReservationInstancePlatformRedHatEnterpriseLinux = "Red Hat Enterprise Linux" + + // CapacityReservationInstancePlatformSuselinux is a CapacityReservationInstancePlatform enum value + CapacityReservationInstancePlatformSuselinux = "SUSE Linux" + + // CapacityReservationInstancePlatformWindows is a CapacityReservationInstancePlatform enum value + CapacityReservationInstancePlatformWindows = "Windows" + + // CapacityReservationInstancePlatformWindowswithSqlserver is a CapacityReservationInstancePlatform enum value + CapacityReservationInstancePlatformWindowswithSqlserver = "Windows with SQL Server" + + // CapacityReservationInstancePlatformWindowswithSqlserverEnterprise is a CapacityReservationInstancePlatform enum value + CapacityReservationInstancePlatformWindowswithSqlserverEnterprise = "Windows with SQL Server Enterprise" + + // CapacityReservationInstancePlatformWindowswithSqlserverStandard is a CapacityReservationInstancePlatform enum value + CapacityReservationInstancePlatformWindowswithSqlserverStandard = "Windows with SQL Server Standard" + + // CapacityReservationInstancePlatformWindowswithSqlserverWeb is a CapacityReservationInstancePlatform enum value + CapacityReservationInstancePlatformWindowswithSqlserverWeb = "Windows with SQL Server Web" +) + +const ( + // CapacityReservationPreferenceOpen is a CapacityReservationPreference enum value + CapacityReservationPreferenceOpen = "open" + + // CapacityReservationPreferenceNone is a CapacityReservationPreference enum value + CapacityReservationPreferenceNone = "none" +) + +const ( + // CapacityReservationStateActive is a CapacityReservationState enum value + CapacityReservationStateActive = "active" + + // CapacityReservationStateExpired is a CapacityReservationState enum value + CapacityReservationStateExpired = "expired" + + // CapacityReservationStateCancelled is a CapacityReservationState enum value + CapacityReservationStateCancelled = "cancelled" + + // CapacityReservationStatePending is a CapacityReservationState enum value + CapacityReservationStatePending = "pending" + + // CapacityReservationStateFailed is a CapacityReservationState enum value + CapacityReservationStateFailed = "failed" +) + +const ( + // CapacityReservationTenancyDefault is a CapacityReservationTenancy enum value + CapacityReservationTenancyDefault = "default" + + // CapacityReservationTenancyDedicated is a CapacityReservationTenancy enum value + CapacityReservationTenancyDedicated = "dedicated" +) + +const ( + // ClientCertificateRevocationListStatusCodePending is a ClientCertificateRevocationListStatusCode enum value + ClientCertificateRevocationListStatusCodePending = "pending" + + // ClientCertificateRevocationListStatusCodeActive is a ClientCertificateRevocationListStatusCode enum value + ClientCertificateRevocationListStatusCodeActive = "active" +) + +const ( + // ClientVpnAuthenticationTypeCertificateAuthentication is a ClientVpnAuthenticationType enum value + ClientVpnAuthenticationTypeCertificateAuthentication = "certificate-authentication" + + // ClientVpnAuthenticationTypeDirectoryServiceAuthentication is a ClientVpnAuthenticationType enum value + ClientVpnAuthenticationTypeDirectoryServiceAuthentication = "directory-service-authentication" +) + +const ( + // ClientVpnAuthorizationRuleStatusCodeAuthorizing is a ClientVpnAuthorizationRuleStatusCode enum value + ClientVpnAuthorizationRuleStatusCodeAuthorizing = "authorizing" + + // ClientVpnAuthorizationRuleStatusCodeActive is a ClientVpnAuthorizationRuleStatusCode enum value + ClientVpnAuthorizationRuleStatusCodeActive = "active" + + // ClientVpnAuthorizationRuleStatusCodeFailed is a ClientVpnAuthorizationRuleStatusCode enum value + ClientVpnAuthorizationRuleStatusCodeFailed = "failed" + + // ClientVpnAuthorizationRuleStatusCodeRevoking is a ClientVpnAuthorizationRuleStatusCode enum value + ClientVpnAuthorizationRuleStatusCodeRevoking = "revoking" +) + +const ( + // ClientVpnConnectionStatusCodeActive is a ClientVpnConnectionStatusCode enum value + ClientVpnConnectionStatusCodeActive = "active" + + // ClientVpnConnectionStatusCodeFailedToTerminate is a ClientVpnConnectionStatusCode enum value + ClientVpnConnectionStatusCodeFailedToTerminate = "failed-to-terminate" + + // ClientVpnConnectionStatusCodeTerminating is a ClientVpnConnectionStatusCode enum value + ClientVpnConnectionStatusCodeTerminating = "terminating" + + // ClientVpnConnectionStatusCodeTerminated is a ClientVpnConnectionStatusCode enum value + ClientVpnConnectionStatusCodeTerminated = "terminated" +) + +const ( + // ClientVpnEndpointStatusCodePendingAssociate is a ClientVpnEndpointStatusCode enum value + ClientVpnEndpointStatusCodePendingAssociate = "pending-associate" + + // ClientVpnEndpointStatusCodeAvailable is a ClientVpnEndpointStatusCode enum value + ClientVpnEndpointStatusCodeAvailable = "available" + + // ClientVpnEndpointStatusCodeDeleting is a ClientVpnEndpointStatusCode enum value + ClientVpnEndpointStatusCodeDeleting = "deleting" + + // ClientVpnEndpointStatusCodeDeleted is a ClientVpnEndpointStatusCode enum value + ClientVpnEndpointStatusCodeDeleted = "deleted" +) + +const ( + // ClientVpnRouteStatusCodeCreating is a ClientVpnRouteStatusCode enum value + ClientVpnRouteStatusCodeCreating = "creating" + + // ClientVpnRouteStatusCodeActive is a ClientVpnRouteStatusCode enum value + ClientVpnRouteStatusCodeActive = "active" + + // ClientVpnRouteStatusCodeFailed is a ClientVpnRouteStatusCode enum value + ClientVpnRouteStatusCodeFailed = "failed" + + // ClientVpnRouteStatusCodeDeleting is a ClientVpnRouteStatusCode enum value + ClientVpnRouteStatusCodeDeleting = "deleting" +) + const ( // ConnectionNotificationStateEnabled is a ConnectionNotificationState enum value ConnectionNotificationStateEnabled = "Enabled" @@ -70277,6 +84541,22 @@ const ( DatafeedSubscriptionStateInactive = "Inactive" ) +const ( + // DefaultRouteTableAssociationValueEnable is a DefaultRouteTableAssociationValue enum value + DefaultRouteTableAssociationValueEnable = "enable" + + // DefaultRouteTableAssociationValueDisable is a DefaultRouteTableAssociationValue enum value + DefaultRouteTableAssociationValueDisable = "disable" +) + +const ( + // DefaultRouteTablePropagationValueEnable is a DefaultRouteTablePropagationValue enum value + DefaultRouteTablePropagationValueEnable = "enable" + + // DefaultRouteTablePropagationValueDisable is a DefaultRouteTablePropagationValue enum value + DefaultRouteTablePropagationValueDisable = "disable" +) + const ( // DefaultTargetCapacityTypeSpot is a DefaultTargetCapacityType enum value DefaultTargetCapacityTypeSpot = "spot" @@ -70318,6 +84598,14 @@ const ( DiskImageFormatVhd = "VHD" ) +const ( + // DnsSupportValueEnable is a DnsSupportValue enum value + DnsSupportValueEnable = "enable" + + // DnsSupportValueDisable is a DnsSupportValue enum value + DnsSupportValueDisable = "disable" +) + const ( // DomainTypeVpc is a DomainType enum value DomainTypeVpc = "vpc" @@ -70339,6 +84627,14 @@ const ( ElasticGpuStatusImpaired = "IMPAIRED" ) +const ( + // EndDateTypeUnlimited is a EndDateType enum value + EndDateTypeUnlimited = "unlimited" + + // EndDateTypeLimited is a EndDateType enum value + EndDateTypeLimited = "limited" +) + const ( // EventCodeInstanceReboot is a EventCode enum value EventCodeInstanceReboot = "instance-reboot" @@ -70470,6 +84766,9 @@ const ( // FleetTypeMaintain is a FleetType enum value FleetTypeMaintain = "maintain" + + // FleetTypeInstant is a FleetType enum value + FleetTypeInstant = "instant" ) const ( @@ -70666,6 +84965,14 @@ const ( InstanceInterruptionBehaviorTerminate = "terminate" ) +const ( + // InstanceLifecycleSpot is a InstanceLifecycle enum value + InstanceLifecycleSpot = "spot" + + // InstanceLifecycleOnDemand is a InstanceLifecycle enum value + InstanceLifecycleOnDemand = "on-demand" +) + const ( // InstanceLifecycleTypeSpot is a InstanceLifecycleType enum value InstanceLifecycleTypeSpot = "spot" @@ -70674,6 +84981,14 @@ const ( InstanceLifecycleTypeScheduled = "scheduled" ) +const ( + // InstanceMatchCriteriaOpen is a InstanceMatchCriteria enum value + InstanceMatchCriteriaOpen = "open" + + // InstanceMatchCriteriaTargeted is a InstanceMatchCriteria enum value + InstanceMatchCriteriaTargeted = "targeted" +) + const ( // InstanceStateNamePending is a InstanceStateName enum value InstanceStateNamePending = "pending" @@ -70854,6 +85169,24 @@ const ( // InstanceTypeR5Metal is a InstanceType enum value InstanceTypeR5Metal = "r5.metal" + // InstanceTypeR5aLarge is a InstanceType enum value + InstanceTypeR5aLarge = "r5a.large" + + // InstanceTypeR5aXlarge is a InstanceType enum value + InstanceTypeR5aXlarge = "r5a.xlarge" + + // InstanceTypeR5a2xlarge is a InstanceType enum value + InstanceTypeR5a2xlarge = "r5a.2xlarge" + + // InstanceTypeR5a4xlarge is a InstanceType enum value + InstanceTypeR5a4xlarge = "r5a.4xlarge" + + // InstanceTypeR5a12xlarge is a InstanceType enum value + InstanceTypeR5a12xlarge = "r5a.12xlarge" + + // InstanceTypeR5a24xlarge is a InstanceType enum value + InstanceTypeR5a24xlarge = "r5a.24xlarge" + // InstanceTypeR5dLarge is a InstanceType enum value InstanceTypeR5dLarge = "r5d.large" @@ -71016,6 +85349,24 @@ const ( // InstanceTypeC5d18xlarge is a InstanceType enum value InstanceTypeC5d18xlarge = "c5d.18xlarge" + // InstanceTypeC5nLarge is a InstanceType enum value + InstanceTypeC5nLarge = "c5n.large" + + // InstanceTypeC5nXlarge is a InstanceType enum value + InstanceTypeC5nXlarge = "c5n.xlarge" + + // InstanceTypeC5n2xlarge is a InstanceType enum value + InstanceTypeC5n2xlarge = "c5n.2xlarge" + + // InstanceTypeC5n4xlarge is a InstanceType enum value + InstanceTypeC5n4xlarge = "c5n.4xlarge" + + // InstanceTypeC5n9xlarge is a InstanceType enum value + InstanceTypeC5n9xlarge = "c5n.9xlarge" + + // InstanceTypeC5n18xlarge is a InstanceType enum value + InstanceTypeC5n18xlarge = "c5n.18xlarge" + // InstanceTypeCc14xlarge is a InstanceType enum value InstanceTypeCc14xlarge = "cc1.4xlarge" @@ -71037,6 +85388,9 @@ const ( // InstanceTypeG316xlarge is a InstanceType enum value InstanceTypeG316xlarge = "g3.16xlarge" + // InstanceTypeG3sXlarge is a InstanceType enum value + InstanceTypeG3sXlarge = "g3s.xlarge" + // InstanceTypeCg14xlarge is a InstanceType enum value InstanceTypeCg14xlarge = "cg1.4xlarge" @@ -71058,6 +85412,9 @@ const ( // InstanceTypeP316xlarge is a InstanceType enum value InstanceTypeP316xlarge = "p3.16xlarge" + // InstanceTypeP3dn24xlarge is a InstanceType enum value + InstanceTypeP3dn24xlarge = "p3dn.24xlarge" + // InstanceTypeD2Xlarge is a InstanceType enum value InstanceTypeD2Xlarge = "d2.xlarge" @@ -71073,6 +85430,9 @@ const ( // InstanceTypeF12xlarge is a InstanceType enum value InstanceTypeF12xlarge = "f1.2xlarge" + // InstanceTypeF14xlarge is a InstanceType enum value + InstanceTypeF14xlarge = "f1.4xlarge" + // InstanceTypeF116xlarge is a InstanceType enum value InstanceTypeF116xlarge = "f1.16xlarge" @@ -71094,6 +85454,24 @@ const ( // InstanceTypeM524xlarge is a InstanceType enum value InstanceTypeM524xlarge = "m5.24xlarge" + // InstanceTypeM5aLarge is a InstanceType enum value + InstanceTypeM5aLarge = "m5a.large" + + // InstanceTypeM5aXlarge is a InstanceType enum value + InstanceTypeM5aXlarge = "m5a.xlarge" + + // InstanceTypeM5a2xlarge is a InstanceType enum value + InstanceTypeM5a2xlarge = "m5a.2xlarge" + + // InstanceTypeM5a4xlarge is a InstanceType enum value + InstanceTypeM5a4xlarge = "m5a.4xlarge" + + // InstanceTypeM5a12xlarge is a InstanceType enum value + InstanceTypeM5a12xlarge = "m5a.12xlarge" + + // InstanceTypeM5a24xlarge is a InstanceType enum value + InstanceTypeM5a24xlarge = "m5a.24xlarge" + // InstanceTypeM5dLarge is a InstanceType enum value InstanceTypeM5dLarge = "m5d.large" @@ -71141,6 +85519,30 @@ const ( // InstanceTypeZ1d12xlarge is a InstanceType enum value InstanceTypeZ1d12xlarge = "z1d.12xlarge" + + // InstanceTypeU6tb1Metal is a InstanceType enum value + InstanceTypeU6tb1Metal = "u-6tb1.metal" + + // InstanceTypeU9tb1Metal is a InstanceType enum value + InstanceTypeU9tb1Metal = "u-9tb1.metal" + + // InstanceTypeU12tb1Metal is a InstanceType enum value + InstanceTypeU12tb1Metal = "u-12tb1.metal" + + // InstanceTypeA1Medium is a InstanceType enum value + InstanceTypeA1Medium = "a1.medium" + + // InstanceTypeA1Large is a InstanceType enum value + InstanceTypeA1Large = "a1.large" + + // InstanceTypeA1Xlarge is a InstanceType enum value + InstanceTypeA1Xlarge = "a1.xlarge" + + // InstanceTypeA12xlarge is a InstanceType enum value + InstanceTypeA12xlarge = "a1.2xlarge" + + // InstanceTypeA14xlarge is a InstanceType enum value + InstanceTypeA14xlarge = "a1.4xlarge" ) const ( @@ -71151,6 +85553,14 @@ const ( InterfacePermissionTypeEipAssociate = "EIP-ASSOCIATE" ) +const ( + // Ipv6SupportValueEnable is a Ipv6SupportValue enum value + Ipv6SupportValueEnable = "enable" + + // Ipv6SupportValueDisable is a Ipv6SupportValue enum value + Ipv6SupportValueDisable = "disable" +) + const ( // LaunchTemplateErrorCodeLaunchTemplateIdDoesNotExist is a LaunchTemplateErrorCode enum value LaunchTemplateErrorCodeLaunchTemplateIdDoesNotExist = "launchTemplateIdDoesNotExist" @@ -71384,6 +85794,9 @@ const ( // PlacementStrategySpread is a PlacementStrategy enum value PlacementStrategySpread = "spread" + + // PlacementStrategyPartition is a PlacementStrategy enum value + PlacementStrategyPartition = "partition" ) const ( @@ -71517,9 +85930,21 @@ const ( // ResourceTypeCustomerGateway is a ResourceType enum value ResourceTypeCustomerGateway = "customer-gateway" + // ResourceTypeDedicatedHost is a ResourceType enum value + ResourceTypeDedicatedHost = "dedicated-host" + // ResourceTypeDhcpOptions is a ResourceType enum value ResourceTypeDhcpOptions = "dhcp-options" + // ResourceTypeElasticIp is a ResourceType enum value + ResourceTypeElasticIp = "elastic-ip" + + // ResourceTypeFleet is a ResourceType enum value + ResourceTypeFleet = "fleet" + + // ResourceTypeFpgaImage is a ResourceType enum value + ResourceTypeFpgaImage = "fpga-image" + // ResourceTypeImage is a ResourceType enum value ResourceTypeImage = "image" @@ -71529,6 +85954,12 @@ const ( // ResourceTypeInternetGateway is a ResourceType enum value ResourceTypeInternetGateway = "internet-gateway" + // ResourceTypeLaunchTemplate is a ResourceType enum value + ResourceTypeLaunchTemplate = "launch-template" + + // ResourceTypeNatgateway is a ResourceType enum value + ResourceTypeNatgateway = "natgateway" + // ResourceTypeNetworkAcl is a ResourceType enum value ResourceTypeNetworkAcl = "network-acl" @@ -71541,6 +85972,9 @@ const ( // ResourceTypeRouteTable is a ResourceType enum value ResourceTypeRouteTable = "route-table" + // ResourceTypeSecurityGroup is a ResourceType enum value + ResourceTypeSecurityGroup = "security-group" + // ResourceTypeSnapshot is a ResourceType enum value ResourceTypeSnapshot = "snapshot" @@ -71550,8 +85984,14 @@ const ( // ResourceTypeSubnet is a ResourceType enum value ResourceTypeSubnet = "subnet" - // ResourceTypeSecurityGroup is a ResourceType enum value - ResourceTypeSecurityGroup = "security-group" + // ResourceTypeTransitGateway is a ResourceType enum value + ResourceTypeTransitGateway = "transit-gateway" + + // ResourceTypeTransitGatewayAttachment is a ResourceType enum value + ResourceTypeTransitGatewayAttachment = "transit-gateway-attachment" + + // ResourceTypeTransitGatewayRouteTable is a ResourceType enum value + ResourceTypeTransitGatewayRouteTable = "transit-gateway-route-table" // ResourceTypeVolume is a ResourceType enum value ResourceTypeVolume = "volume" @@ -71559,6 +85999,9 @@ const ( // ResourceTypeVpc is a ResourceType enum value ResourceTypeVpc = "vpc" + // ResourceTypeVpcPeeringConnection is a ResourceType enum value + ResourceTypeVpcPeeringConnection = "vpc-peering-connection" + // ResourceTypeVpnConnection is a ResourceType enum value ResourceTypeVpnConnection = "vpn-connection" @@ -71820,6 +86263,141 @@ const ( TrafficTypeAll = "ALL" ) +const ( + // TransitGatewayAssociationStateAssociating is a TransitGatewayAssociationState enum value + TransitGatewayAssociationStateAssociating = "associating" + + // TransitGatewayAssociationStateAssociated is a TransitGatewayAssociationState enum value + TransitGatewayAssociationStateAssociated = "associated" + + // TransitGatewayAssociationStateDisassociating is a TransitGatewayAssociationState enum value + TransitGatewayAssociationStateDisassociating = "disassociating" + + // TransitGatewayAssociationStateDisassociated is a TransitGatewayAssociationState enum value + TransitGatewayAssociationStateDisassociated = "disassociated" +) + +const ( + // TransitGatewayAttachmentResourceTypeVpc is a TransitGatewayAttachmentResourceType enum value + TransitGatewayAttachmentResourceTypeVpc = "vpc" + + // TransitGatewayAttachmentResourceTypeVpn is a TransitGatewayAttachmentResourceType enum value + TransitGatewayAttachmentResourceTypeVpn = "vpn" +) + +const ( + // TransitGatewayAttachmentStatePendingAcceptance is a TransitGatewayAttachmentState enum value + TransitGatewayAttachmentStatePendingAcceptance = "pendingAcceptance" + + // TransitGatewayAttachmentStateRollingBack is a TransitGatewayAttachmentState enum value + TransitGatewayAttachmentStateRollingBack = "rollingBack" + + // TransitGatewayAttachmentStatePending is a TransitGatewayAttachmentState enum value + TransitGatewayAttachmentStatePending = "pending" + + // TransitGatewayAttachmentStateAvailable is a TransitGatewayAttachmentState enum value + TransitGatewayAttachmentStateAvailable = "available" + + // TransitGatewayAttachmentStateModifying is a TransitGatewayAttachmentState enum value + TransitGatewayAttachmentStateModifying = "modifying" + + // TransitGatewayAttachmentStateDeleting is a TransitGatewayAttachmentState enum value + TransitGatewayAttachmentStateDeleting = "deleting" + + // TransitGatewayAttachmentStateDeleted is a TransitGatewayAttachmentState enum value + TransitGatewayAttachmentStateDeleted = "deleted" + + // TransitGatewayAttachmentStateFailed is a TransitGatewayAttachmentState enum value + TransitGatewayAttachmentStateFailed = "failed" + + // TransitGatewayAttachmentStateRejected is a TransitGatewayAttachmentState enum value + TransitGatewayAttachmentStateRejected = "rejected" + + // TransitGatewayAttachmentStateRejecting is a TransitGatewayAttachmentState enum value + TransitGatewayAttachmentStateRejecting = "rejecting" + + // TransitGatewayAttachmentStateFailing is a TransitGatewayAttachmentState enum value + TransitGatewayAttachmentStateFailing = "failing" +) + +const ( + // TransitGatewayPropagationStateEnabling is a TransitGatewayPropagationState enum value + TransitGatewayPropagationStateEnabling = "enabling" + + // TransitGatewayPropagationStateEnabled is a TransitGatewayPropagationState enum value + TransitGatewayPropagationStateEnabled = "enabled" + + // TransitGatewayPropagationStateDisabling is a TransitGatewayPropagationState enum value + TransitGatewayPropagationStateDisabling = "disabling" + + // TransitGatewayPropagationStateDisabled is a TransitGatewayPropagationState enum value + TransitGatewayPropagationStateDisabled = "disabled" +) + +const ( + // TransitGatewayRouteStatePending is a TransitGatewayRouteState enum value + TransitGatewayRouteStatePending = "pending" + + // TransitGatewayRouteStateActive is a TransitGatewayRouteState enum value + TransitGatewayRouteStateActive = "active" + + // TransitGatewayRouteStateBlackhole is a TransitGatewayRouteState enum value + TransitGatewayRouteStateBlackhole = "blackhole" + + // TransitGatewayRouteStateDeleting is a TransitGatewayRouteState enum value + TransitGatewayRouteStateDeleting = "deleting" + + // TransitGatewayRouteStateDeleted is a TransitGatewayRouteState enum value + TransitGatewayRouteStateDeleted = "deleted" +) + +const ( + // TransitGatewayRouteTableStatePending is a TransitGatewayRouteTableState enum value + TransitGatewayRouteTableStatePending = "pending" + + // TransitGatewayRouteTableStateAvailable is a TransitGatewayRouteTableState enum value + TransitGatewayRouteTableStateAvailable = "available" + + // TransitGatewayRouteTableStateDeleting is a TransitGatewayRouteTableState enum value + TransitGatewayRouteTableStateDeleting = "deleting" + + // TransitGatewayRouteTableStateDeleted is a TransitGatewayRouteTableState enum value + TransitGatewayRouteTableStateDeleted = "deleted" +) + +const ( + // TransitGatewayRouteTypeStatic is a TransitGatewayRouteType enum value + TransitGatewayRouteTypeStatic = "static" + + // TransitGatewayRouteTypePropagated is a TransitGatewayRouteType enum value + TransitGatewayRouteTypePropagated = "propagated" +) + +const ( + // TransitGatewayStatePending is a TransitGatewayState enum value + TransitGatewayStatePending = "pending" + + // TransitGatewayStateAvailable is a TransitGatewayState enum value + TransitGatewayStateAvailable = "available" + + // TransitGatewayStateModifying is a TransitGatewayState enum value + TransitGatewayStateModifying = "modifying" + + // TransitGatewayStateDeleting is a TransitGatewayState enum value + TransitGatewayStateDeleting = "deleting" + + // TransitGatewayStateDeleted is a TransitGatewayState enum value + TransitGatewayStateDeleted = "deleted" +) + +const ( + // TransportProtocolTcp is a TransportProtocol enum value + TransportProtocolTcp = "tcp" + + // TransportProtocolUdp is a TransportProtocol enum value + TransportProtocolUdp = "udp" +) + const ( // UnsuccessfulInstanceCreditSpecificationErrorCodeInvalidInstanceIdMalformed is a UnsuccessfulInstanceCreditSpecificationErrorCode enum value UnsuccessfulInstanceCreditSpecificationErrorCodeInvalidInstanceIdMalformed = "InvalidInstanceID.Malformed" @@ -72015,6 +86593,19 @@ const ( VpcTenancyDefault = "default" ) +const ( + // VpnEcmpSupportValueEnable is a VpnEcmpSupportValue enum value + VpnEcmpSupportValueEnable = "enable" + + // VpnEcmpSupportValueDisable is a VpnEcmpSupportValue enum value + VpnEcmpSupportValueDisable = "disable" +) + +const ( + // VpnProtocolOpenvpn is a VpnProtocol enum value + VpnProtocolOpenvpn = "openvpn" +) + const ( // VpnStatePending is a VpnState enum value VpnStatePending = "pending" diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go b/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go index e7b467d340..e3284308c8 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ecr/api.go @@ -8,6 +8,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) const opBatchCheckLayerAvailability = "BatchCheckLayerAvailability" @@ -15,7 +17,7 @@ const opBatchCheckLayerAvailability = "BatchCheckLayerAvailability" // BatchCheckLayerAvailabilityRequest generates a "aws/request.Request" representing the // client's request for the BatchCheckLayerAvailability operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -107,7 +109,7 @@ const opBatchDeleteImage = "BatchDeleteImage" // BatchDeleteImageRequest generates a "aws/request.Request" representing the // client's request for the BatchDeleteImage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -202,7 +204,7 @@ const opBatchGetImage = "BatchGetImage" // BatchGetImageRequest generates a "aws/request.Request" representing the // client's request for the BatchGetImage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -290,7 +292,7 @@ const opCompleteLayerUpload = "CompleteLayerUpload" // CompleteLayerUploadRequest generates a "aws/request.Request" representing the // client's request for the CompleteLayerUpload operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -400,7 +402,7 @@ const opCreateRepository = "CreateRepository" // CreateRepositoryRequest generates a "aws/request.Request" representing the // client's request for the CreateRepository operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -456,6 +458,15 @@ func (c *ECR) CreateRepositoryRequest(input *CreateRepositoryInput) (req *reques // The specified parameter is invalid. Review the available parameters for the // API request. // +// * ErrCodeInvalidTagParameterException "InvalidTagParameterException" +// An invalid parameter has been specified. Tag keys can have a maximum character +// length of 128 characters, and tag values can have a maximum length of 256 +// characters. +// +// * ErrCodeTooManyTagsException "TooManyTagsException" +// The list of tags on the repository is over the limit. The maximum number +// of tags that can be applied to a repository is 50. +// // * ErrCodeRepositoryAlreadyExistsException "RepositoryAlreadyExistsException" // The specified repository already exists in the specified registry. // @@ -492,7 +503,7 @@ const opDeleteLifecyclePolicy = "DeleteLifecyclePolicy" // DeleteLifecyclePolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteLifecyclePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -582,7 +593,7 @@ const opDeleteRepository = "DeleteRepository" // DeleteRepositoryRequest generates a "aws/request.Request" representing the // client's request for the DeleteRepository operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -674,7 +685,7 @@ const opDeleteRepositoryPolicy = "DeleteRepositoryPolicy" // DeleteRepositoryPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteRepositoryPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -765,7 +776,7 @@ const opDescribeImages = "DescribeImages" // DescribeImagesRequest generates a "aws/request.Request" representing the // client's request for the DescribeImages operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -917,7 +928,7 @@ const opDescribeRepositories = "DescribeRepositories" // DescribeRepositoriesRequest generates a "aws/request.Request" representing the // client's request for the DescribeRepositories operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1060,7 +1071,7 @@ const opGetAuthorizationToken = "GetAuthorizationToken" // GetAuthorizationTokenRequest generates a "aws/request.Request" representing the // client's request for the GetAuthorizationToken operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1150,7 +1161,7 @@ const opGetDownloadUrlForLayer = "GetDownloadUrlForLayer" // GetDownloadUrlForLayerRequest generates a "aws/request.Request" representing the // client's request for the GetDownloadUrlForLayer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1250,7 +1261,7 @@ const opGetLifecyclePolicy = "GetLifecyclePolicy" // GetLifecyclePolicyRequest generates a "aws/request.Request" representing the // client's request for the GetLifecyclePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1340,7 +1351,7 @@ const opGetLifecyclePolicyPreview = "GetLifecyclePolicyPreview" // GetLifecyclePolicyPreviewRequest generates a "aws/request.Request" representing the // client's request for the GetLifecyclePolicyPreview operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1430,7 +1441,7 @@ const opGetRepositoryPolicy = "GetRepositoryPolicy" // GetRepositoryPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetRepositoryPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1521,7 +1532,7 @@ const opInitiateLayerUpload = "InitiateLayerUpload" // InitiateLayerUploadRequest generates a "aws/request.Request" representing the // client's request for the InitiateLayerUpload operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1612,7 +1623,7 @@ const opListImages = "ListImages" // ListImagesRequest generates a "aws/request.Request" representing the // client's request for the ListImages operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1756,12 +1767,99 @@ func (c *ECR) ListImagesPagesWithContext(ctx aws.Context, input *ListImagesInput return p.Err() } +const opListTagsForResource = "ListTagsForResource" + +// ListTagsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForResource 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 ListTagsForResource for more information on using the ListTagsForResource +// 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 ListTagsForResourceRequest method. +// req, resp := client.ListTagsForResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListTagsForResource +func (c *ECR) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { + op := &request.Operation{ + Name: opListTagsForResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListTagsForResourceInput{} + } + + output = &ListTagsForResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagsForResource API operation for Amazon EC2 Container Registry. +// +// List the tags for an Amazon ECR resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EC2 Container Registry's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// The specified parameter is invalid. Review the available parameters for the +// API request. +// +// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" +// The specified repository could not be found. Check the spelling of the specified +// repository and ensure that you are performing operations on the correct registry. +// +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server-side issue. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListTagsForResource +func (c *ECR) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + return out, req.Send() +} + +// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of +// the ability to pass a context and additional request options. +// +// See ListTagsForResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ECR) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPutImage = "PutImage" // PutImageRequest generates a "aws/request.Request" representing the // client's request for the PutImage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1866,7 +1964,7 @@ const opPutLifecyclePolicy = "PutLifecyclePolicy" // PutLifecyclePolicyRequest generates a "aws/request.Request" representing the // client's request for the PutLifecyclePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1954,7 +2052,7 @@ const opSetRepositoryPolicy = "SetRepositoryPolicy" // SetRepositoryPolicyRequest generates a "aws/request.Request" representing the // client's request for the SetRepositoryPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2041,7 +2139,7 @@ const opStartLifecyclePolicyPreview = "StartLifecyclePolicyPreview" // StartLifecyclePolicyPreviewRequest generates a "aws/request.Request" representing the // client's request for the StartLifecyclePolicyPreview operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2131,12 +2229,207 @@ func (c *ECR) StartLifecyclePolicyPreviewWithContext(ctx aws.Context, input *Sta return out, req.Send() } +const opTagResource = "TagResource" + +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return +// 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 TagResource for more information on using the TagResource +// 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 TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/TagResource +func (c *ECR) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagResource API operation for Amazon EC2 Container Registry. +// +// Adds specified tags to a resource with the specified ARN. Existing tags on +// a resource are not changed if they are not specified in the request parameters. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EC2 Container Registry's +// API operation TagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// The specified parameter is invalid. Review the available parameters for the +// API request. +// +// * ErrCodeInvalidTagParameterException "InvalidTagParameterException" +// An invalid parameter has been specified. Tag keys can have a maximum character +// length of 128 characters, and tag values can have a maximum length of 256 +// characters. +// +// * ErrCodeTooManyTagsException "TooManyTagsException" +// The list of tags on the repository is over the limit. The maximum number +// of tags that can be applied to a repository is 50. +// +// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" +// The specified repository could not be found. Check the spelling of the specified +// repository and ensure that you are performing operations on the correct registry. +// +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server-side issue. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/TagResource +func (c *ECR) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + return out, req.Send() +} + +// TagResourceWithContext is the same as TagResource with the addition of +// the ability to pass a context and additional request options. +// +// See TagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ECR) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagResource = "UntagResource" + +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource 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 UntagResource for more information on using the UntagResource +// 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 UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UntagResource +func (c *ECR) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagResource API operation for Amazon EC2 Container Registry. +// +// Deletes specified tags from a resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EC2 Container Registry's +// API operation UntagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// The specified parameter is invalid. Review the available parameters for the +// API request. +// +// * ErrCodeInvalidTagParameterException "InvalidTagParameterException" +// An invalid parameter has been specified. Tag keys can have a maximum character +// length of 128 characters, and tag values can have a maximum length of 256 +// characters. +// +// * ErrCodeTooManyTagsException "TooManyTagsException" +// The list of tags on the repository is over the limit. The maximum number +// of tags that can be applied to a repository is 50. +// +// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" +// The specified repository could not be found. Check the spelling of the specified +// repository and ensure that you are performing operations on the correct registry. +// +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server-side issue. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UntagResource +func (c *ECR) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + return out, req.Send() +} + +// UntagResourceWithContext is the same as UntagResource with the addition of +// the ability to pass a context and additional request options. +// +// See UntagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ECR) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUploadLayerPart = "UploadLayerPart" // UploadLayerPartRequest generates a "aws/request.Request" representing the // client's request for the UploadLayerPart operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2745,6 +3038,8 @@ type CreateRepositoryInput struct { // // RepositoryName is a required field RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` + + Tags []*Tag `locationName:"tags" type:"list"` } // String returns the string representation @@ -2779,6 +3074,12 @@ func (s *CreateRepositoryInput) SetRepositoryName(v string) *CreateRepositoryInp return s } +// SetTags sets the Tags field's value. +func (s *CreateRepositoryInput) SetTags(v []*Tag) *CreateRepositoryInput { + s.Tags = v + return s +} + type CreateRepositoryOutput struct { _ struct{} `type:"structure"` @@ -3119,7 +3420,7 @@ type DescribeImagesInput struct { // results in a single page along with a nextToken response element. The remaining // results of the initial request can be seen by sending another DescribeImages // request with the returned nextToken value. This value can be between 1 and - // 100. If this parameter is not used, then DescribeImages returns up to 100 + // 1000. If this parameter is not used, then DescribeImages returns up to 100 // results and a nextToken value, if applicable. This option cannot be used // when you specify images with imageIds. MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` @@ -3136,8 +3437,7 @@ type DescribeImagesInput struct { // registry is assumed. RegistryId *string `locationName:"registryId" type:"string"` - // A list of repositories to describe. If this parameter is omitted, then all - // repositories in a registry are described. + // A list of repositories to describe. // // RepositoryName is a required field RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` @@ -3254,7 +3554,7 @@ type DescribeRepositoriesInput struct { // returns maxResults results in a single page along with a nextToken response // element. The remaining results of the initial request can be seen by sending // another DescribeRepositories request with the returned nextToken value. This - // value can be between 1 and 100. If this parameter is not used, then DescribeRepositories + // value can be between 1 and 1000. If this parameter is not used, then DescribeRepositories // returns up to 100 results and a nextToken value, if applicable. This option // cannot be used when you specify repositories with repositoryNames. MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` @@ -3640,7 +3940,7 @@ type GetLifecyclePolicyPreviewInput struct { // only returns
 maxResults results in a single page along with a nextToken // response element. The remaining results of the initial request can be seen // by sending
 another GetLifecyclePolicyPreviewRequest request with the returned - // nextToken
 value. This value can be between 1 and 100. If this
 parameter + // nextToken
 value. This value can be between 1 and 1000. If this
 parameter // is not used, then GetLifecyclePolicyPreviewRequest returns up to
 100 results // and a nextToken value, if
 applicable. This option cannot be used when you // specify images with imageIds. @@ -4452,9 +4752,9 @@ type ListImagesInput struct { // When this parameter is used, ListImages only returns maxResults results in // a single page along with a nextToken response element. The remaining results // of the initial request can be seen by sending another ListImages request - // with the returned nextToken value. This value can be between 1 and 100. If - // this parameter is not used, then ListImages returns up to 100 results and - // a nextToken value, if applicable. + // with the returned nextToken value. This value can be between 1 and 1000. + // If this parameter is not used, then ListImages returns up to 100 results + // and a nextToken value, if applicable. MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` // The nextToken value returned from a previous paginated ListImages request @@ -4571,6 +4871,68 @@ func (s *ListImagesOutput) SetNextToken(v string) *ListImagesOutput { return s } +type ListTagsForResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) that identifies the resource for which to + // list the tags. Currently, the only supported resource is an Amazon ECR repository. + // + // ResourceArn is a required field + ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTagsForResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { + s.ResourceArn = &v + return s +} + +type ListTagsForResourceOutput struct { + _ struct{} `type:"structure"` + + // The tags for the resource. + Tags []*Tag `locationName:"tags" type:"list"` +} + +// String returns the string representation +func (s ListTagsForResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceOutput) GoString() string { + return s.String() +} + +// SetTags sets the Tags field's value. +func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { + s.Tags = v + return s +} + type PutImageInput struct { _ struct{} `type:"structure"` @@ -5074,6 +5436,180 @@ func (s *StartLifecyclePolicyPreviewOutput) SetStatus(v string) *StartLifecycleP return s } +// The metadata that you apply to a resource to help you categorize and organize +// them. Each tag consists of a key and an optional value, both of which you +// define. Tag keys can have a maximum character length of 128 characters, and +// tag values can have a maximum length of 256 characters. +type Tag struct { + _ struct{} `type:"structure"` + + // One part of a key-value pair that make up a tag. A key is a general label + // that acts like a category for more specific tag values. + Key *string `type:"string"` + + // The optional part of a key-value pair that make up a tag. A value acts as + // a descriptor within a tag category (key). + Value *string `type:"string"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the the resource to which to add tags. + // Currently, the only supported resource is an Amazon ECR repository. + // + // ResourceArn is a required field + ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` + + // The tags to add to the resource. A tag is an array of key-value pairs. Tag + // keys can have a maximum character length of 128 characters, and tag values + // can have a maximum length of 256 characters. + // + // Tags is a required field + Tags []*Tag `locationName:"tags" type:"list" required:"true"` +} + +// String returns the string representation +func (s TagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { + s.ResourceArn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { + s.Tags = v + return s +} + +type TagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceOutput) GoString() string { + return s.String() +} + +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource from which to remove tags. + // Currently, the only supported resource is an Amazon ECR repository. + // + // ResourceArn is a required field + ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` + + // The keys of the tags to be removed. + // + // TagKeys is a required field + TagKeys []*string `locationName:"tagKeys" type:"list" required:"true"` +} + +// String returns the string representation +func (s UntagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { + s.ResourceArn = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { + s.TagKeys = v + return s +} + +type UntagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UntagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceOutput) GoString() string { + return s.String() +} + type UploadLayerPartInput struct { _ struct{} `type:"structure"` @@ -5292,4 +5828,7 @@ const ( // TagStatusUntagged is a TagStatus enum value TagStatusUntagged = "UNTAGGED" + + // TagStatusAny is a TagStatus enum value + TagStatusAny = "ANY" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecr/errors.go b/vendor/github.com/aws/aws-sdk-go/service/ecr/errors.go index 09e0595de7..834905106a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ecr/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ecr/errors.go @@ -44,6 +44,14 @@ const ( // API request. ErrCodeInvalidParameterException = "InvalidParameterException" + // ErrCodeInvalidTagParameterException for service response error code + // "InvalidTagParameterException". + // + // An invalid parameter has been specified. Tag keys can have a maximum character + // length of 128 characters, and tag values can have a maximum length of 256 + // characters. + ErrCodeInvalidTagParameterException = "InvalidTagParameterException" + // ErrCodeLayerAlreadyExistsException for service response error code // "LayerAlreadyExistsException". // @@ -131,6 +139,13 @@ const ( // These errors are usually caused by a server-side issue. ErrCodeServerException = "ServerException" + // ErrCodeTooManyTagsException for service response error code + // "TooManyTagsException". + // + // The list of tags on the repository is over the limit. The maximum number + // of tags that can be applied to a repository is 50. + ErrCodeTooManyTagsException = "TooManyTagsException" + // ErrCodeUploadNotFoundException for service response error code // "UploadNotFoundException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go b/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go index 9b57732489..23a09052c1 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ecs/api.go @@ -9,6 +9,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) const opCreateCluster = "CreateCluster" @@ -16,7 +18,7 @@ const opCreateCluster = "CreateCluster" // CreateClusterRequest generates a "aws/request.Request" representing the // client's request for the CreateCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -114,7 +116,7 @@ const opCreateService = "CreateService" // CreateServiceRequest generates a "aws/request.Request" representing the // client's request for the CreateService operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -164,37 +166,51 @@ func (c *ECS) CreateServiceRequest(input *CreateServiceInput) (req *request.Requ // For more information, see Service Load Balancing (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-load-balancing.html) // in the Amazon Elastic Container Service Developer Guide. // -// You can optionally specify a deployment configuration for your service. During -// a deployment, the service scheduler uses the minimumHealthyPercent and maximumPercent -// parameters to determine the deployment strategy. The deployment is triggered -// by changing the task definition or the desired count of a service with an -// UpdateService operation. -// -// The minimumHealthyPercent represents a lower limit on the number of your -// service's tasks that must remain in the RUNNING state during a deployment, -// as a percentage of the desiredCount (rounded up to the nearest integer). -// This parameter enables you to deploy without using additional cluster capacity. -// For example, if your service has a desiredCount of four tasks and a minimumHealthyPercent -// of 50%, the scheduler can stop two existing tasks to free up cluster capacity -// before starting two new tasks. Tasks for services that do not use a load -// balancer are considered healthy if they are in the RUNNING state. Tasks for -// services that do use a load balancer are considered healthy if they are in -// the RUNNING state and the container instance they are hosted on is reported -// as healthy by the load balancer. The default value for a replica service -// for minimumHealthyPercent is 50% in the console and 100% for the AWS CLI, -// the AWS SDKs, and the APIs. The default value for a daemon service for minimumHealthyPercent -// is 0% for the AWS CLI, the AWS SDKs, and the APIs and 50% for the console. -// -// The maximumPercent parameter represents an upper limit on the number of your -// service's tasks that are allowed in the RUNNING or PENDING state during a -// deployment, as a percentage of the desiredCount (rounded down to the nearest -// integer). This parameter enables you to define the deployment batch size. -// For example, if your replica service has a desiredCount of four tasks and -// a maximumPercent value of 200%, the scheduler can start four new tasks before -// stopping the four older tasks (provided that the cluster resources required -// to do this are available). The default value for a replica service for maximumPercent -// is 200%. If you are using a daemon service type, the maximumPercent should -// remain at 100%, which is the default value. +// You can optionally specify a deployment configuration for your service. The +// deployment is triggered by changing properties, such as the task definition +// or the desired count of a service, with an UpdateService operation. +// +// If a service is using the ECS deployment controller, the minimum healthy +// percent represents a lower limit on the number of tasks in a service that +// must remain in the RUNNING state during a deployment, as a percentage of +// the desired number of tasks (rounded up to the nearest integer), and while +// any container instances are in the DRAINING state if the service contains +// tasks using the EC2 launch type. This parameter enables you to deploy without +// using additional cluster capacity. For example, if your service has a desired +// number of four tasks and a minimum healthy percent of 50%, the scheduler +// may stop two existing tasks to free up cluster capacity before starting two +// new tasks. Tasks for services that do not use a load balancer are considered +// healthy if they are in the RUNNING state; tasks for services that do use +// a load balancer are considered healthy if they are in the RUNNING state and +// they are reported as healthy by the load balancer. The default value for +// minimum healthy percent is 100%. +// +// If a service is using the ECS deployment controller, the maximum percent +// parameter represents an upper limit on the number of tasks in a service that +// are allowed in the RUNNING or PENDING state during a deployment, as a percentage +// of the desired number of tasks (rounded down to the nearest integer), and +// while any container instances are in the DRAINING state if the service contains +// tasks using the EC2 launch type. This parameter enables you to define the +// deployment batch size. For example, if your service has a desired number +// of four tasks and a maximum percent value of 200%, the scheduler may start +// four new tasks before stopping the four older tasks (provided that the cluster +// resources required to do this are available). The default value for maximum +// percent is 200%. +// +// If a service is using the CODE_DEPLOY deployment controller and tasks that +// use the EC2 launch type, the minimum healthy percent and maximum percent +// values are only used to define the lower and upper limit on the number of +// the tasks in the service that remain in the RUNNING state while the container +// instances are in the DRAINING state. If the tasks in the service use the +// Fargate launch type, the minimum healthy percent and maximum percent values +// are not used, although they are currently visible when describing your service. +// +// Tasks for services that do not use a load balancer are considered healthy +// if they are in the RUNNING state. Tasks for services that do use a load balancer +// are considered healthy if they are in the RUNNING state and the container +// instance they are hosted on is reported as healthy by the load balancer. +// The default value for a replica service for minimumHealthyPercent is 100%. +// The default value for a daemon service for minimumHealthyPercent is 0%. // // When the service scheduler launches new tasks, it determines task placement // in your cluster using the following logic: @@ -239,10 +255,10 @@ func (c *ECS) CreateServiceRequest(input *CreateServiceInput) (req *request.Requ // // * ErrCodeClusterNotFoundException "ClusterNotFoundException" // The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are region-specific. +// with ListClusters. Amazon ECS clusters are Region-specific. // // * ErrCodeUnsupportedFeatureException "UnsupportedFeatureException" -// The specified task is not supported in this region. +// The specified task is not supported in this Region. // // * ErrCodePlatformUnknownException "PlatformUnknownException" // The specified platform version does not exist. @@ -276,12 +292,103 @@ func (c *ECS) CreateServiceWithContext(ctx aws.Context, input *CreateServiceInpu return out, req.Send() } +const opDeleteAccountSetting = "DeleteAccountSetting" + +// DeleteAccountSettingRequest generates a "aws/request.Request" representing the +// client's request for the DeleteAccountSetting 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 DeleteAccountSetting for more information on using the DeleteAccountSetting +// 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 DeleteAccountSettingRequest method. +// req, resp := client.DeleteAccountSettingRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeleteAccountSetting +func (c *ECS) DeleteAccountSettingRequest(input *DeleteAccountSettingInput) (req *request.Request, output *DeleteAccountSettingOutput) { + op := &request.Operation{ + Name: opDeleteAccountSetting, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteAccountSettingInput{} + } + + output = &DeleteAccountSettingOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteAccountSetting API operation for Amazon EC2 Container Service. +// +// Modifies the ARN and resource ID format of a resource for a specified IAM +// user, IAM role, or the root user for an account. You can specify whether +// the new ARN and resource ID format are disabled for new resources that are +// created. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EC2 Container Service's +// API operation DeleteAccountSetting for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server issue. +// +// * ErrCodeClientException "ClientException" +// These errors are usually caused by a client action, such as using an action +// or resource on behalf of a user that doesn't have permissions to use the +// action or resource, or specifying an identifier that is not valid. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// The specified parameter is invalid. Review the available parameters for the +// API request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeleteAccountSetting +func (c *ECS) DeleteAccountSetting(input *DeleteAccountSettingInput) (*DeleteAccountSettingOutput, error) { + req, out := c.DeleteAccountSettingRequest(input) + return out, req.Send() +} + +// DeleteAccountSettingWithContext is the same as DeleteAccountSetting with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteAccountSetting 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 *ECS) DeleteAccountSettingWithContext(ctx aws.Context, input *DeleteAccountSettingInput, opts ...request.Option) (*DeleteAccountSettingOutput, error) { + req, out := c.DeleteAccountSettingRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteAttributes = "DeleteAttributes" // DeleteAttributesRequest generates a "aws/request.Request" representing the // client's request for the DeleteAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -332,12 +439,12 @@ func (c *ECS) DeleteAttributesRequest(input *DeleteAttributesInput) (req *reques // Returned Error Codes: // * ErrCodeClusterNotFoundException "ClusterNotFoundException" // The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are region-specific. +// with ListClusters. Amazon ECS clusters are Region-specific. // // * ErrCodeTargetNotFoundException "TargetNotFoundException" // The specified target could not be found. You can view your available container // instances with ListContainerInstances. Amazon ECS container instances are -// cluster-specific and region-specific. +// cluster-specific and Region-specific. // // * ErrCodeInvalidParameterException "InvalidParameterException" // The specified parameter is invalid. Review the available parameters for the @@ -370,7 +477,7 @@ const opDeleteCluster = "DeleteCluster" // DeleteClusterRequest generates a "aws/request.Request" representing the // client's request for the DeleteCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -435,17 +542,17 @@ func (c *ECS) DeleteClusterRequest(input *DeleteClusterInput) (req *request.Requ // // * ErrCodeClusterNotFoundException "ClusterNotFoundException" // The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are region-specific. +// with ListClusters. Amazon ECS clusters are Region-specific. // // * ErrCodeClusterContainsContainerInstancesException "ClusterContainsContainerInstancesException" -// You cannot delete a cluster that has registered container instances. You -// must first deregister the container instances before you can delete the cluster. -// For more information, see DeregisterContainerInstance. +// You cannot delete a cluster that has registered container instances. First, +// deregister the container instances before you can delete the cluster. For +// more information, see DeregisterContainerInstance. // // * ErrCodeClusterContainsServicesException "ClusterContainsServicesException" -// You cannot delete a cluster that contains services. You must first update -// the service to reduce its desired task count to 0 and then delete the service. -// For more information, see UpdateService and DeleteService. +// You cannot delete a cluster that contains services. First, update the service +// to reduce its desired task count to 0 and then delete the service. For more +// information, see UpdateService and DeleteService. // // * ErrCodeClusterContainsTasksException "ClusterContainsTasksException" // You cannot delete a cluster that has active tasks. @@ -477,7 +584,7 @@ const opDeleteService = "DeleteService" // DeleteServiceRequest generates a "aws/request.Request" representing the // client's request for the DeleteService operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -524,15 +631,16 @@ func (c *ECS) DeleteServiceRequest(input *DeleteServiceInput) (req *request.Requ // // When you delete a service, if there are still running tasks that require // cleanup, the service status moves from ACTIVE to DRAINING, and the service -// is no longer visible in the console or in ListServices API operations. After -// the tasks have stopped, then the service status moves from DRAINING to INACTIVE. -// Services in the DRAINING or INACTIVE status can still be viewed with DescribeServices -// API operations. However, in the future, INACTIVE services may be cleaned -// up and purged from Amazon ECS record keeping, and DescribeServices API operations -// on those services return a ServiceNotFoundException error. +// is no longer visible in the console or in the ListServices API operation. +// After the tasks have stopped, then the service status moves from DRAINING +// to INACTIVE. Services in the DRAINING or INACTIVE status can still be viewed +// with the DescribeServices API operation. However, in the future, INACTIVE +// services may be cleaned up and purged from Amazon ECS record keeping, and +// DescribeServices calls on those services return a ServiceNotFoundException +// error. // // If you attempt to create a new service with the same name as an existing -// service in either ACTIVE or DRAINING status, you will receive an error. +// service in either ACTIVE or DRAINING status, you receive an error. // // 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 @@ -556,11 +664,11 @@ func (c *ECS) DeleteServiceRequest(input *DeleteServiceInput) (req *request.Requ // // * ErrCodeClusterNotFoundException "ClusterNotFoundException" // The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are region-specific. +// with ListClusters. Amazon ECS clusters are Region-specific. // // * ErrCodeServiceNotFoundException "ServiceNotFoundException" // The specified service could not be found. You can view your available services -// with ListServices. Amazon ECS services are cluster-specific and region-specific. +// with ListServices. Amazon ECS services are cluster-specific and Region-specific. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeleteService func (c *ECS) DeleteService(input *DeleteServiceInput) (*DeleteServiceOutput, error) { @@ -589,7 +697,7 @@ const opDeregisterContainerInstance = "DeregisterContainerInstance" // DeregisterContainerInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeregisterContainerInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -637,7 +745,7 @@ func (c *ECS) DeregisterContainerInstanceRequest(input *DeregisterContainerInsta // resources. // // Deregistering a container instance removes the instance from a cluster, but -// it does not terminate the EC2 instance; if you are finished using the instance, +// it does not terminate the EC2 instance. If you are finished using the instance, // be sure to terminate it in the Amazon EC2 console to stop billing. // // If you terminate a running container instance, Amazon ECS automatically deregisters @@ -666,7 +774,7 @@ func (c *ECS) DeregisterContainerInstanceRequest(input *DeregisterContainerInsta // // * ErrCodeClusterNotFoundException "ClusterNotFoundException" // The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are region-specific. +// with ListClusters. Amazon ECS clusters are Region-specific. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DeregisterContainerInstance func (c *ECS) DeregisterContainerInstance(input *DeregisterContainerInstanceInput) (*DeregisterContainerInstanceOutput, error) { @@ -695,7 +803,7 @@ const opDeregisterTaskDefinition = "DeregisterTaskDefinition" // DeregisterTaskDefinitionRequest generates a "aws/request.Request" representing the // client's request for the DeregisterTaskDefinition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -742,11 +850,11 @@ func (c *ECS) DeregisterTaskDefinitionRequest(input *DeregisterTaskDefinitionInp // // You cannot use an INACTIVE task definition to run new tasks or create new // services, and you cannot update an existing service to reference an INACTIVE -// task definition (although there may be up to a 10-minute window following -// deregistration where these restrictions have not yet taken effect). +// task definition. However, there may be up to a 10-minute window following +// deregistration where these restrictions have not yet taken effect. // // At this time, INACTIVE task definitions remain discoverable in your account -// indefinitely; however, this behavior is subject to change in the future, +// indefinitely. However, this behavior is subject to change in the future, // so you should not rely on INACTIVE task definitions persisting beyond the // lifecycle of any associated tasks and services. // @@ -797,7 +905,7 @@ const opDescribeClusters = "DescribeClusters" // DescribeClustersRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -885,7 +993,7 @@ const opDescribeContainerInstances = "DescribeContainerInstances" // DescribeContainerInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeContainerInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -949,7 +1057,7 @@ func (c *ECS) DescribeContainerInstancesRequest(input *DescribeContainerInstance // // * ErrCodeClusterNotFoundException "ClusterNotFoundException" // The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are region-specific. +// with ListClusters. Amazon ECS clusters are Region-specific. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DescribeContainerInstances func (c *ECS) DescribeContainerInstances(input *DescribeContainerInstancesInput) (*DescribeContainerInstancesOutput, error) { @@ -978,7 +1086,7 @@ const opDescribeServices = "DescribeServices" // DescribeServicesRequest generates a "aws/request.Request" representing the // client's request for the DescribeServices operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1041,7 +1149,7 @@ func (c *ECS) DescribeServicesRequest(input *DescribeServicesInput) (req *reques // // * ErrCodeClusterNotFoundException "ClusterNotFoundException" // The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are region-specific. +// with ListClusters. Amazon ECS clusters are Region-specific. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DescribeServices func (c *ECS) DescribeServices(input *DescribeServicesInput) (*DescribeServicesOutput, error) { @@ -1070,7 +1178,7 @@ const opDescribeTaskDefinition = "DescribeTaskDefinition" // DescribeTaskDefinitionRequest generates a "aws/request.Request" representing the // client's request for the DescribeTaskDefinition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1163,7 +1271,7 @@ const opDescribeTasks = "DescribeTasks" // DescribeTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeTasks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1226,7 +1334,7 @@ func (c *ECS) DescribeTasksRequest(input *DescribeTasksInput) (req *request.Requ // // * ErrCodeClusterNotFoundException "ClusterNotFoundException" // The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are region-specific. +// with ListClusters. Amazon ECS clusters are Region-specific. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/DescribeTasks func (c *ECS) DescribeTasks(input *DescribeTasksInput) (*DescribeTasksOutput, error) { @@ -1255,7 +1363,7 @@ const opDiscoverPollEndpoint = "DiscoverPollEndpoint" // DiscoverPollEndpointRequest generates a "aws/request.Request" representing the // client's request for the DiscoverPollEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1337,12 +1445,100 @@ func (c *ECS) DiscoverPollEndpointWithContext(ctx aws.Context, input *DiscoverPo return out, req.Send() } +const opListAccountSettings = "ListAccountSettings" + +// ListAccountSettingsRequest generates a "aws/request.Request" representing the +// client's request for the ListAccountSettings 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 ListAccountSettings for more information on using the ListAccountSettings +// 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 ListAccountSettingsRequest method. +// req, resp := client.ListAccountSettingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListAccountSettings +func (c *ECS) ListAccountSettingsRequest(input *ListAccountSettingsInput) (req *request.Request, output *ListAccountSettingsOutput) { + op := &request.Operation{ + Name: opListAccountSettings, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListAccountSettingsInput{} + } + + output = &ListAccountSettingsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListAccountSettings API operation for Amazon EC2 Container Service. +// +// Lists the account settings for an Amazon ECS resource for a specified principal. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EC2 Container Service's +// API operation ListAccountSettings for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server issue. +// +// * ErrCodeClientException "ClientException" +// These errors are usually caused by a client action, such as using an action +// or resource on behalf of a user that doesn't have permissions to use the +// action or resource, or specifying an identifier that is not valid. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// The specified parameter is invalid. Review the available parameters for the +// API request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListAccountSettings +func (c *ECS) ListAccountSettings(input *ListAccountSettingsInput) (*ListAccountSettingsOutput, error) { + req, out := c.ListAccountSettingsRequest(input) + return out, req.Send() +} + +// ListAccountSettingsWithContext is the same as ListAccountSettings with the addition of +// the ability to pass a context and additional request options. +// +// See ListAccountSettings 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 *ECS) ListAccountSettingsWithContext(ctx aws.Context, input *ListAccountSettingsInput, opts ...request.Option) (*ListAccountSettingsOutput, error) { + req, out := c.ListAccountSettingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListAttributes = "ListAttributes" // ListAttributesRequest generates a "aws/request.Request" representing the // client's request for the ListAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1399,7 +1595,7 @@ func (c *ECS) ListAttributesRequest(input *ListAttributesInput) (req *request.Re // Returned Error Codes: // * ErrCodeClusterNotFoundException "ClusterNotFoundException" // The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are region-specific. +// with ListClusters. Amazon ECS clusters are Region-specific. // // * ErrCodeInvalidParameterException "InvalidParameterException" // The specified parameter is invalid. Review the available parameters for the @@ -1432,7 +1628,7 @@ const opListClusters = "ListClusters" // ListClustersRequest generates a "aws/request.Request" representing the // client's request for the ListClusters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1576,7 +1772,7 @@ const opListContainerInstances = "ListContainerInstances" // ListContainerInstancesRequest generates a "aws/request.Request" representing the // client's request for the ListContainerInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1649,7 +1845,7 @@ func (c *ECS) ListContainerInstancesRequest(input *ListContainerInstancesInput) // // * ErrCodeClusterNotFoundException "ClusterNotFoundException" // The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are region-specific. +// with ListClusters. Amazon ECS clusters are Region-specific. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListContainerInstances func (c *ECS) ListContainerInstances(input *ListContainerInstancesInput) (*ListContainerInstancesOutput, error) { @@ -1728,7 +1924,7 @@ const opListServices = "ListServices" // ListServicesRequest generates a "aws/request.Request" representing the // client's request for the ListServices operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1797,7 +1993,7 @@ func (c *ECS) ListServicesRequest(input *ListServicesInput) (req *request.Reques // // * ErrCodeClusterNotFoundException "ClusterNotFoundException" // The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are region-specific. +// with ListClusters. Amazon ECS clusters are Region-specific. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListServices func (c *ECS) ListServices(input *ListServicesInput) (*ListServicesOutput, error) { @@ -1871,12 +2067,104 @@ func (c *ECS) ListServicesPagesWithContext(ctx aws.Context, input *ListServicesI return p.Err() } +const opListTagsForResource = "ListTagsForResource" + +// ListTagsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForResource 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 ListTagsForResource for more information on using the ListTagsForResource +// 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 ListTagsForResourceRequest method. +// req, resp := client.ListTagsForResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListTagsForResource +func (c *ECS) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { + op := &request.Operation{ + Name: opListTagsForResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListTagsForResourceInput{} + } + + output = &ListTagsForResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagsForResource API operation for Amazon EC2 Container Service. +// +// List the tags for an Amazon ECS resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EC2 Container Service's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server issue. +// +// * ErrCodeClientException "ClientException" +// These errors are usually caused by a client action, such as using an action +// or resource on behalf of a user that doesn't have permissions to use the +// action or resource, or specifying an identifier that is not valid. +// +// * ErrCodeClusterNotFoundException "ClusterNotFoundException" +// The specified cluster could not be found. You can view your available clusters +// with ListClusters. Amazon ECS clusters are Region-specific. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// The specified parameter is invalid. Review the available parameters for the +// API request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListTagsForResource +func (c *ECS) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + return out, req.Send() +} + +// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of +// the ability to pass a context and additional request options. +// +// See ListTagsForResource 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 *ECS) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListTaskDefinitionFamilies = "ListTaskDefinitionFamilies" // ListTaskDefinitionFamiliesRequest generates a "aws/request.Request" representing the // client's request for the ListTaskDefinitionFamilies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2026,7 +2314,7 @@ const opListTaskDefinitions = "ListTaskDefinitions" // ListTaskDefinitionsRequest generates a "aws/request.Request" representing the // client's request for the ListTaskDefinitions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2172,7 +2460,7 @@ const opListTasks = "ListTasks" // ListTasksRequest generates a "aws/request.Request" representing the // client's request for the ListTasks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2246,11 +2534,11 @@ func (c *ECS) ListTasksRequest(input *ListTasksInput) (req *request.Request, out // // * ErrCodeClusterNotFoundException "ClusterNotFoundException" // The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are region-specific. +// with ListClusters. Amazon ECS clusters are Region-specific. // // * ErrCodeServiceNotFoundException "ServiceNotFoundException" // The specified service could not be found. You can view your available services -// with ListServices. Amazon ECS services are cluster-specific and region-specific. +// with ListServices. Amazon ECS services are cluster-specific and Region-specific. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/ListTasks func (c *ECS) ListTasks(input *ListTasksInput) (*ListTasksOutput, error) { @@ -2324,131 +2612,223 @@ func (c *ECS) ListTasksPagesWithContext(ctx aws.Context, input *ListTasksInput, return p.Err() } -const opPutAttributes = "PutAttributes" +const opPutAccountSetting = "PutAccountSetting" -// PutAttributesRequest generates a "aws/request.Request" representing the -// client's request for the PutAttributes operation. The "output" return +// PutAccountSettingRequest generates a "aws/request.Request" representing the +// client's request for the PutAccountSetting operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 PutAttributes for more information on using the PutAttributes +// See PutAccountSetting for more information on using the PutAccountSetting // 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 PutAttributesRequest method. -// req, resp := client.PutAttributesRequest(params) +// // Example sending a request using the PutAccountSettingRequest method. +// req, resp := client.PutAccountSettingRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/PutAttributes -func (c *ECS) PutAttributesRequest(input *PutAttributesInput) (req *request.Request, output *PutAttributesOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/PutAccountSetting +func (c *ECS) PutAccountSettingRequest(input *PutAccountSettingInput) (req *request.Request, output *PutAccountSettingOutput) { op := &request.Operation{ - Name: opPutAttributes, + Name: opPutAccountSetting, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &PutAttributesInput{} + input = &PutAccountSettingInput{} } - output = &PutAttributesOutput{} + output = &PutAccountSettingOutput{} req = c.newRequest(op, input, output) return } -// PutAttributes API operation for Amazon EC2 Container Service. +// PutAccountSetting API operation for Amazon EC2 Container Service. // -// Create or update an attribute on an Amazon ECS resource. If the attribute -// does not exist, it is created. If the attribute exists, its value is replaced -// with the specified value. To delete an attribute, use DeleteAttributes. For -// more information, see Attributes (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html#attributes) -// in the Amazon Elastic Container Service Developer Guide. +// Modifies the ARN and resource ID format of a resource for a specified IAM +// user, IAM role, or the root user for an account. You can specify whether +// the new ARN and resource ID format are enabled for new resources that are +// created. Enabling this setting is required to use new Amazon ECS features +// such as resource tagging. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon EC2 Container Service's -// API operation PutAttributes for usage and error information. +// API operation PutAccountSetting for usage and error information. // // Returned Error Codes: -// * ErrCodeClusterNotFoundException "ClusterNotFoundException" -// The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are region-specific. -// -// * ErrCodeTargetNotFoundException "TargetNotFoundException" -// The specified target could not be found. You can view your available container -// instances with ListContainerInstances. Amazon ECS container instances are -// cluster-specific and region-specific. +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server issue. // -// * ErrCodeAttributeLimitExceededException "AttributeLimitExceededException" -// You can apply up to 10 custom attributes per resource. You can view the attributes -// of a resource with ListAttributes. You can remove existing attributes on -// a resource with DeleteAttributes. +// * ErrCodeClientException "ClientException" +// These errors are usually caused by a client action, such as using an action +// or resource on behalf of a user that doesn't have permissions to use the +// action or resource, or specifying an identifier that is not valid. // // * ErrCodeInvalidParameterException "InvalidParameterException" // The specified parameter is invalid. Review the available parameters for the // API request. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/PutAttributes -func (c *ECS) PutAttributes(input *PutAttributesInput) (*PutAttributesOutput, error) { - req, out := c.PutAttributesRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/PutAccountSetting +func (c *ECS) PutAccountSetting(input *PutAccountSettingInput) (*PutAccountSettingOutput, error) { + req, out := c.PutAccountSettingRequest(input) return out, req.Send() } -// PutAttributesWithContext is the same as PutAttributes with the addition of +// PutAccountSettingWithContext is the same as PutAccountSetting with the addition of // the ability to pass a context and additional request options. // -// See PutAttributes for details on how to use this API operation. +// See PutAccountSetting 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 *ECS) PutAttributesWithContext(ctx aws.Context, input *PutAttributesInput, opts ...request.Option) (*PutAttributesOutput, error) { - req, out := c.PutAttributesRequest(input) +func (c *ECS) PutAccountSettingWithContext(ctx aws.Context, input *PutAccountSettingInput, opts ...request.Option) (*PutAccountSettingOutput, error) { + req, out := c.PutAccountSettingRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opRegisterContainerInstance = "RegisterContainerInstance" +const opPutAttributes = "PutAttributes" -// RegisterContainerInstanceRequest generates a "aws/request.Request" representing the -// client's request for the RegisterContainerInstance operation. The "output" return +// PutAttributesRequest generates a "aws/request.Request" representing the +// client's request for the PutAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 RegisterContainerInstance for more information on using the RegisterContainerInstance +// See PutAttributes for more information on using the PutAttributes // 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 RegisterContainerInstanceRequest method. -// req, resp := client.RegisterContainerInstanceRequest(params) +// // Example sending a request using the PutAttributesRequest method. +// req, resp := client.PutAttributesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/RegisterContainerInstance -func (c *ECS) RegisterContainerInstanceRequest(input *RegisterContainerInstanceInput) (req *request.Request, output *RegisterContainerInstanceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/PutAttributes +func (c *ECS) PutAttributesRequest(input *PutAttributesInput) (req *request.Request, output *PutAttributesOutput) { + op := &request.Operation{ + Name: opPutAttributes, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutAttributesInput{} + } + + output = &PutAttributesOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutAttributes API operation for Amazon EC2 Container Service. +// +// Create or update an attribute on an Amazon ECS resource. If the attribute +// does not exist, it is created. If the attribute exists, its value is replaced +// with the specified value. To delete an attribute, use DeleteAttributes. For +// more information, see Attributes (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html#attributes) +// in the Amazon Elastic Container Service Developer 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 EC2 Container Service's +// API operation PutAttributes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClusterNotFoundException "ClusterNotFoundException" +// The specified cluster could not be found. You can view your available clusters +// with ListClusters. Amazon ECS clusters are Region-specific. +// +// * ErrCodeTargetNotFoundException "TargetNotFoundException" +// The specified target could not be found. You can view your available container +// instances with ListContainerInstances. Amazon ECS container instances are +// cluster-specific and Region-specific. +// +// * ErrCodeAttributeLimitExceededException "AttributeLimitExceededException" +// You can apply up to 10 custom attributes per resource. You can view the attributes +// of a resource with ListAttributes. You can remove existing attributes on +// a resource with DeleteAttributes. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// The specified parameter is invalid. Review the available parameters for the +// API request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/PutAttributes +func (c *ECS) PutAttributes(input *PutAttributesInput) (*PutAttributesOutput, error) { + req, out := c.PutAttributesRequest(input) + return out, req.Send() +} + +// PutAttributesWithContext is the same as PutAttributes with the addition of +// the ability to pass a context and additional request options. +// +// See PutAttributes 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 *ECS) PutAttributesWithContext(ctx aws.Context, input *PutAttributesInput, opts ...request.Option) (*PutAttributesOutput, error) { + req, out := c.PutAttributesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRegisterContainerInstance = "RegisterContainerInstance" + +// RegisterContainerInstanceRequest generates a "aws/request.Request" representing the +// client's request for the RegisterContainerInstance 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 RegisterContainerInstance for more information on using the RegisterContainerInstance +// 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 RegisterContainerInstanceRequest method. +// req, resp := client.RegisterContainerInstanceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/RegisterContainerInstance +func (c *ECS) RegisterContainerInstanceRequest(input *RegisterContainerInstanceInput) (req *request.Request, output *RegisterContainerInstanceOutput) { op := &request.Operation{ Name: opRegisterContainerInstance, HTTPMethod: "POST", @@ -2519,7 +2899,7 @@ const opRegisterTaskDefinition = "RegisterTaskDefinition" // RegisterTaskDefinitionRequest generates a "aws/request.Request" representing the // client's request for the RegisterTaskDefinition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2627,7 +3007,7 @@ const opRunTask = "RunTask" // RunTaskRequest generates a "aws/request.Request" representing the // client's request for the RunTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2679,9 +3059,8 @@ func (c *ECS) RunTaskRequest(input *RunTaskInput) (req *request.Request, output // The Amazon ECS API follows an eventual consistency model, due to the distributed // nature of the system supporting the API. This means that the result of an // API command you run that affects your Amazon ECS resources might not be immediately -// visible to all subsequent commands you run. You should keep this in mind -// when you carry out an API command that immediately follows a previous API -// command. +// visible to all subsequent commands you run. Keep this in mind when you carry +// out an API command that immediately follows a previous API command. // // To manage eventual consistency, you can do the following: // @@ -2719,10 +3098,10 @@ func (c *ECS) RunTaskRequest(input *RunTaskInput) (req *request.Request, output // // * ErrCodeClusterNotFoundException "ClusterNotFoundException" // The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are region-specific. +// with ListClusters. Amazon ECS clusters are Region-specific. // // * ErrCodeUnsupportedFeatureException "UnsupportedFeatureException" -// The specified task is not supported in this region. +// The specified task is not supported in this Region. // // * ErrCodePlatformUnknownException "PlatformUnknownException" // The specified platform version does not exist. @@ -2735,8 +3114,8 @@ func (c *ECS) RunTaskRequest(input *RunTaskInput) (req *request.Request, output // You do not have authorization to perform the requested action. // // * ErrCodeBlockedException "BlockedException" -// Your AWS account has been blocked. Contact AWS Support (http://aws.amazon.com/contact-us/) -// for more information. +// Your AWS account has been blocked. For more information, contact AWS Support +// (http://aws.amazon.com/contact-us/). // // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/RunTask func (c *ECS) RunTask(input *RunTaskInput) (*RunTaskOutput, error) { @@ -2765,7 +3144,7 @@ const opStartTask = "StartTask" // StartTaskRequest generates a "aws/request.Request" representing the // client's request for the StartTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2833,7 +3212,7 @@ func (c *ECS) StartTaskRequest(input *StartTaskInput) (req *request.Request, out // // * ErrCodeClusterNotFoundException "ClusterNotFoundException" // The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are region-specific. +// with ListClusters. Amazon ECS clusters are Region-specific. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/StartTask func (c *ECS) StartTask(input *StartTaskInput) (*StartTaskOutput, error) { @@ -2862,7 +3241,7 @@ const opStopTask = "StopTask" // StopTaskRequest generates a "aws/request.Request" representing the // client's request for the StopTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2901,13 +3280,14 @@ func (c *ECS) StopTaskRequest(input *StopTaskInput) (req *request.Request, outpu // StopTask API operation for Amazon EC2 Container Service. // -// Stops a running task. +// Stops a running task. Any tags associated with the task will be deleted. // // When StopTask is called on a task, the equivalent of docker stop is issued -// to the containers running in the task. This results in a SIGTERM and a default -// 30-second timeout, after which SIGKILL is sent and the containers are forcibly -// stopped. If the container handles the SIGTERM gracefully and exits within -// 30 seconds from receiving it, no SIGKILL is sent. +// to the containers running in the task. This results in a SIGTERM value and +// a default 30-second timeout, after which the SIGKILL value is sent and the +// containers are forcibly stopped. If the container handles the SIGTERM value +// gracefully and exits within 30 seconds from receiving it, no SIGKILL value +// is sent. // // The default 30-second timeout can be configured on the Amazon ECS container // agent with the ECS_CONTAINER_STOP_TIMEOUT variable. For more information, @@ -2936,7 +3316,7 @@ func (c *ECS) StopTaskRequest(input *StopTaskInput) (req *request.Request, outpu // // * ErrCodeClusterNotFoundException "ClusterNotFoundException" // The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are region-specific. +// with ListClusters. Amazon ECS clusters are Region-specific. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/StopTask func (c *ECS) StopTask(input *StopTaskInput) (*StopTaskOutput, error) { @@ -2965,7 +3345,7 @@ const opSubmitContainerStateChange = "SubmitContainerStateChange" // SubmitContainerStateChangeRequest generates a "aws/request.Request" representing the // client's request for the SubmitContainerStateChange operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3055,7 +3435,7 @@ const opSubmitTaskStateChange = "SubmitTaskStateChange" // SubmitTaskStateChangeRequest generates a "aws/request.Request" representing the // client's request for the SubmitTaskStateChange operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3140,12 +3520,207 @@ func (c *ECS) SubmitTaskStateChangeWithContext(ctx aws.Context, input *SubmitTas return out, req.Send() } +const opTagResource = "TagResource" + +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return +// 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 TagResource for more information on using the TagResource +// 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 TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/TagResource +func (c *ECS) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagResource API operation for Amazon EC2 Container Service. +// +// Associates the specified tags to a resource with the specified resourceArn. +// If existing tags on a resource are not specified in the request parameters, +// they are not changed. When a resource is deleted, the tags associated with +// that resource are deleted as well. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EC2 Container Service's +// API operation TagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server issue. +// +// * ErrCodeClientException "ClientException" +// These errors are usually caused by a client action, such as using an action +// or resource on behalf of a user that doesn't have permissions to use the +// action or resource, or specifying an identifier that is not valid. +// +// * ErrCodeClusterNotFoundException "ClusterNotFoundException" +// The specified cluster could not be found. You can view your available clusters +// with ListClusters. Amazon ECS clusters are Region-specific. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource could not be found. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// The specified parameter is invalid. Review the available parameters for the +// API request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/TagResource +func (c *ECS) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + return out, req.Send() +} + +// TagResourceWithContext is the same as TagResource with the addition of +// the ability to pass a context and additional request options. +// +// See TagResource 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 *ECS) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagResource = "UntagResource" + +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource 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 UntagResource for more information on using the UntagResource +// 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 UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/UntagResource +func (c *ECS) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagResource API operation for Amazon EC2 Container Service. +// +// Deletes specified tags from a resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EC2 Container Service's +// API operation UntagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server issue. +// +// * ErrCodeClientException "ClientException" +// These errors are usually caused by a client action, such as using an action +// or resource on behalf of a user that doesn't have permissions to use the +// action or resource, or specifying an identifier that is not valid. +// +// * ErrCodeClusterNotFoundException "ClusterNotFoundException" +// The specified cluster could not be found. You can view your available clusters +// with ListClusters. Amazon ECS clusters are Region-specific. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource could not be found. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// The specified parameter is invalid. Review the available parameters for the +// API request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/UntagResource +func (c *ECS) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + return out, req.Send() +} + +// UntagResourceWithContext is the same as UntagResource with the addition of +// the ability to pass a context and additional request options. +// +// See UntagResource 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 *ECS) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateContainerAgent = "UpdateContainerAgent" // UpdateContainerAgentRequest generates a "aws/request.Request" representing the // client's request for the UpdateContainerAgent operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3218,7 +3793,7 @@ func (c *ECS) UpdateContainerAgentRequest(input *UpdateContainerAgentInput) (req // // * ErrCodeClusterNotFoundException "ClusterNotFoundException" // The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are region-specific. +// with ListClusters. Amazon ECS clusters are Region-specific. // // * ErrCodeUpdateInProgressException "UpdateInProgressException" // There is already a current Amazon ECS container agent update in progress @@ -3265,7 +3840,7 @@ const opUpdateContainerInstancesState = "UpdateContainerInstancesState" // UpdateContainerInstancesStateRequest generates a "aws/request.Request" representing the // client's request for the UpdateContainerInstancesState operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3334,14 +3909,14 @@ func (c *ECS) UpdateContainerInstancesStateRequest(input *UpdateContainerInstanc // // * The maximumPercent parameter represents an upper limit on the number // of running tasks during task replacement, which enables you to define -// the replacement batch size. For example, if desiredCount of four tasks, +// the replacement batch size. For example, if desiredCount is four tasks, // a maximum of 200% starts four new tasks before stopping the four tasks -// to be drained (provided that the cluster resources required to do this -// are available). If the maximum is 100%, then replacement tasks can't start +// to be drained, provided that the cluster resources required to do this +// are available. If the maximum is 100%, then replacement tasks can't start // until the draining tasks have stopped. // -// Any PENDING or RUNNING tasks that do not belong to a service are not affected; -// you must wait for them to finish or stop them manually. +// Any PENDING or RUNNING tasks that do not belong to a service are not affected. +// You must wait for them to finish or stop them manually. // // A container instance has completed draining when it has no more RUNNING tasks. // You can verify this using ListTasks. @@ -3371,7 +3946,7 @@ func (c *ECS) UpdateContainerInstancesStateRequest(input *UpdateContainerInstanc // // * ErrCodeClusterNotFoundException "ClusterNotFoundException" // The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are region-specific. +// with ListClusters. Amazon ECS clusters are Region-specific. // // See also, https://docs.aws.amazon.com/goto/WebAPI/ecs-2014-11-13/UpdateContainerInstancesState func (c *ECS) UpdateContainerInstancesState(input *UpdateContainerInstancesStateInput) (*UpdateContainerInstancesStateOutput, error) { @@ -3400,7 +3975,7 @@ const opUpdateService = "UpdateService" // UpdateServiceRequest generates a "aws/request.Request" representing the // client's request for the UpdateService operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3439,8 +4014,18 @@ func (c *ECS) UpdateServiceRequest(input *UpdateServiceInput) (req *request.Requ // UpdateService API operation for Amazon EC2 Container Service. // -// Modifies the desired count, deployment configuration, network configuration, -// or task definition used in a service. +// Modifies the parameters of a service. +// +// For services using the rolling update (ECS) deployment controller, the desired +// count, deployment configuration, network configuration, or task definition +// used can be updated. +// +// For services using the blue/green (CODE_DEPLOY) deployment controller, only +// the desired count, deployment configuration, and health check grace period +// can be updated using this API. If the network configuration, platform version, +// or task definition need to be updated, a new AWS CodeDeploy deployment should +// be created. For more information, see CreateDeployment (https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_CreateDeployment.html) +// in the AWS CodeDeploy API Reference. // // You can add to or subtract from the number of instantiations of a task definition // in a service by specifying the cluster that the service is running in and @@ -3538,11 +4123,11 @@ func (c *ECS) UpdateServiceRequest(input *UpdateServiceInput) (req *request.Requ // // * ErrCodeClusterNotFoundException "ClusterNotFoundException" // The specified cluster could not be found. You can view your available clusters -// with ListClusters. Amazon ECS clusters are region-specific. +// with ListClusters. Amazon ECS clusters are Region-specific. // // * ErrCodeServiceNotFoundException "ServiceNotFoundException" // The specified service could not be found. You can view your available services -// with ListServices. Amazon ECS services are cluster-specific and region-specific. +// with ListServices. Amazon ECS services are cluster-specific and Region-specific. // // * ErrCodeServiceNotActiveException "ServiceNotActiveException" // The specified service is not active. You can't update a service that is inactive. @@ -3772,12 +4357,12 @@ type AwsVpcConfiguration struct { // The security groups associated with the task or service. If you do not specify // a security group, the default security group for the VPC is used. There is - // a limit of 5 security groups able to be specified per AwsVpcConfiguration. + // a limit of five security groups able to be specified per AwsVpcConfiguration. // // All specified security groups must be from the same VPC. SecurityGroups []*string `locationName:"securityGroups" type:"list"` - // The subnets associated with the task or service. There is a limit of 10 subnets + // The subnets associated with the task or service. There is a limit of 16 subnets // able to be specified per AwsVpcConfiguration. // // All specified subnets must be from the same VPC. @@ -3881,6 +4466,12 @@ type Cluster struct { // indicates that you can register container instances with the cluster and // the associated instances can accept tasks. Status *string `locationName:"status" type:"string"` + + // The metadata that you apply to the cluster to help you categorize and organize + // them. Each tag consists of a key and an optional value, both of which you + // define. Tag keys can have a maximum character length of 128 characters, and + // tag values can have a maximum length of 256 characters. + Tags []*Tag `locationName:"tags" type:"list"` } // String returns the string representation @@ -3941,6 +4532,12 @@ func (s *Cluster) SetStatus(v string) *Cluster { return s } +// SetTags sets the Tags field's value. +func (s *Cluster) SetTags(v []*Tag) *Cluster { + s.Tags = v + return s +} + // A Docker container that is part of a task. type Container struct { _ struct{} `type:"structure"` @@ -3952,7 +4549,8 @@ type Container struct { ExitCode *int64 `locationName:"exitCode" type:"integer"` // The health status of the container. If health checks are not configured for - // this container in its task definition, then it reports health status as UNKNOWN. + // this container in its task definition, then it reports the health status + // as UNKNOWN. HealthStatus *string `locationName:"healthStatus" type:"string" enum:"HealthStatus"` // The last known status of the container. @@ -4045,7 +4643,7 @@ type ContainerDefinition struct { _ struct{} `type:"structure"` // The command that is passed to the container. This parameter maps to Cmd in - // the Create a container (https://docs.docker.com/engine/api/v1.35/#create-a-container) + // the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the COMMAND parameter to docker run (https://docs.docker.com/engine/reference/run/). // For more information, see https://docs.docker.com/engine/reference/builder/#cmd @@ -4053,7 +4651,7 @@ type ContainerDefinition struct { Command []*string `locationName:"command" type:"list"` // The number of cpu units reserved for the container. This parameter maps to - // CpuShares in the Create a container (https://docs.docker.com/engine/api/v1.35/#create-a-container) + // CpuShares in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --cpu-shares option to docker run (https://docs.docker.com/engine/reference/run/). // @@ -4090,7 +4688,7 @@ type ContainerDefinition struct { // uses the CPU value to calculate the relative CPU share ratios for running // containers. For more information, see CPU share constraint (https://docs.docker.com/engine/reference/run/#cpu-share-constraint) // in the Docker documentation. The minimum valid CPU share value that the Linux - // kernel allows is 2; however, the CPU parameter is not required, and you can + // kernel allows is 2. However, the CPU parameter is not required, and you can // use CPU values below 2 in your container definitions. For CPU values below // 2 (including null), the behavior varies based on your Amazon ECS container // agent version: @@ -4098,7 +4696,7 @@ type ContainerDefinition struct { // * Agent versions less than or equal to 1.1.0: Null and zero CPU values // are passed to Docker as 0, which Docker then converts to 1,024 CPU shares. // CPU values of 1 are passed to Docker as 1, which the Linux kernel converts - // to 2 CPU shares. + // to two CPU shares. // // * Agent versions greater than or equal to 1.2.0: Null, zero, and CPU values // of 1 are passed to Docker as 2. @@ -4109,14 +4707,14 @@ type ContainerDefinition struct { Cpu *int64 `locationName:"cpu" type:"integer"` // When this parameter is true, networking is disabled within the container. - // This parameter maps to NetworkDisabled in the Create a container (https://docs.docker.com/engine/api/v1.35/#create-a-container) + // This parameter maps to NetworkDisabled in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/). // // This parameter is not supported for Windows containers. DisableNetworking *bool `locationName:"disableNetworking" type:"boolean"` // A list of DNS search domains that are presented to the container. This parameter - // maps to DnsSearch in the Create a container (https://docs.docker.com/engine/api/v1.35/#create-a-container) + // maps to DnsSearch in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --dns-search option to docker run (https://docs.docker.com/engine/reference/run/). // @@ -4124,7 +4722,7 @@ type ContainerDefinition struct { DnsSearchDomains []*string `locationName:"dnsSearchDomains" type:"list"` // A list of DNS servers that are presented to the container. This parameter - // maps to Dns in the Create a container (https://docs.docker.com/engine/api/v1.35/#create-a-container) + // maps to Dns in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --dns option to docker run (https://docs.docker.com/engine/reference/run/). // @@ -4132,20 +4730,20 @@ type ContainerDefinition struct { DnsServers []*string `locationName:"dnsServers" type:"list"` // A key/value map of labels to add to the container. This parameter maps to - // Labels in the Create a container (https://docs.docker.com/engine/api/v1.35/#create-a-container) + // Labels in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --label option to docker run (https://docs.docker.com/engine/reference/run/). // This parameter requires version 1.18 of the Docker Remote API or greater // on your container instance. To check the Docker Remote API version on your // container instance, log in to your container instance and run the following - // command: sudo docker version | grep "Server API version" + // command: sudo docker version --format '{{.Server.APIVersion}}' DockerLabels map[string]*string `locationName:"dockerLabels" type:"map"` // A list of strings to provide custom labels for SELinux and AppArmor multi-level // security systems. This field is not valid for containers in tasks using the // Fargate launch type. // - // This parameter maps to SecurityOpt in the Create a container (https://docs.docker.com/engine/api/v1.35/#create-a-container) + // This parameter maps to SecurityOpt in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --security-opt option to docker run (https://docs.docker.com/engine/reference/run/). // @@ -4164,7 +4762,7 @@ type ContainerDefinition struct { // agent or enter your commands and arguments as command array items instead. // // The entry point that is passed to the container. This parameter maps to Entrypoint - // in the Create a container (https://docs.docker.com/engine/api/v1.35/#create-a-container) + // in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --entrypoint option to docker run (https://docs.docker.com/engine/reference/run/). // For more information, see https://docs.docker.com/engine/reference/builder/#entrypoint @@ -4172,7 +4770,7 @@ type ContainerDefinition struct { EntryPoint []*string `locationName:"entryPoint" type:"list"` // The environment variables to pass to a container. This parameter maps to - // Env in the Create a container (https://docs.docker.com/engine/api/v1.35/#create-a-container) + // Env in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --env option to docker run (https://docs.docker.com/engine/reference/run/). // @@ -4195,27 +4793,28 @@ type ContainerDefinition struct { Essential *bool `locationName:"essential" type:"boolean"` // A list of hostnames and IP address mappings to append to the /etc/hosts file - // on the container. If using the Fargate launch type, this may be used to list - // non-Fargate hosts to which the container can talk. This parameter maps to - // ExtraHosts in the Create a container (https://docs.docker.com/engine/api/v1.35/#create-a-container) - // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) - // and the --add-host option to docker run (https://docs.docker.com/engine/reference/run/). + // on the container. This parameter maps to ExtraHosts in the Create a container + // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section + // of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and + // the --add-host option to docker run (https://docs.docker.com/engine/reference/run/). // - // This parameter is not supported for Windows containers. + // This parameter is not supported for Windows containers or tasks that use + // the awsvpc network mode. ExtraHosts []*HostEntry `locationName:"extraHosts" type:"list"` // The health check command and associated configuration parameters for the - // container. This parameter maps to HealthCheck in the Create a container (https://docs.docker.com/engine/api/v1.35/#create-a-container) + // container. This parameter maps to HealthCheck in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the HEALTHCHECK parameter of docker run (https://docs.docker.com/engine/reference/run/). HealthCheck *HealthCheck `locationName:"healthCheck" type:"structure"` // The hostname to use for your container. This parameter maps to Hostname in - // the Create a container (https://docs.docker.com/engine/api/v1.35/#create-a-container) + // the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --hostname option to docker run (https://docs.docker.com/engine/reference/run/). // - // The hostname parameter is not supported if using the awsvpc networkMode. + // The hostname parameter is not supported if you are using the awsvpc network + // mode. Hostname *string `locationName:"hostname" type:"string"` // The image used to start a container. This string is passed directly to the @@ -4224,9 +4823,9 @@ type ContainerDefinition struct { // repository-url/image@digest. Up to 255 letters (uppercase and lowercase), // numbers, hyphens, underscores, colons, periods, forward slashes, and number // signs are allowed. This parameter maps to Image in the Create a container - // (https://docs.docker.com/engine/api/v1.35/#create-a-container) section of - // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the - // IMAGE parameter of docker run (https://docs.docker.com/engine/reference/run/). + // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section + // of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and + // the IMAGE parameter of docker run (https://docs.docker.com/engine/reference/run/). // // * When a new task starts, the Amazon ECS container agent pulls the latest // version of the specified image and tag for the container to use. However, @@ -4249,6 +4848,13 @@ type ContainerDefinition struct { // name (for example, quay.io/assemblyline/ubuntu). Image *string `locationName:"image" type:"string"` + // When this parameter is true, this allows you to deploy containerized applications + // that require stdin or a tty to be allocated. This parameter maps to OpenStdin + // in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) + // and the --interactive option to docker run (https://docs.docker.com/engine/reference/run/). + Interactive *bool `locationName:"interactive" type:"boolean"` + // The link parameter allows containers to communicate with each other without // the need for port mappings. Only supported if the network mode of a task // definition is set to bridge. The name:internalName construct is analogous @@ -4256,7 +4862,7 @@ type ContainerDefinition struct { // numbers, hyphens, and underscores are allowed. For more information about // linking Docker containers, go to https://docs.docker.com/engine/userguide/networking/default_network/dockerlinks/ // (https://docs.docker.com/engine/userguide/networking/default_network/dockerlinks/). - // This parameter maps to Links in the Create a container (https://docs.docker.com/engine/api/v1.35/#create-a-container) + // This parameter maps to Links in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --link option to docker run (https://docs.docker.com/engine/reference/commandline/run/). // @@ -4276,13 +4882,13 @@ type ContainerDefinition struct { // The log configuration specification for the container. // - // If using the Fargate launch type, the only supported value is awslogs. + // If you are using the Fargate launch type, the only supported value is awslogs. // - // This parameter maps to LogConfig in the Create a container (https://docs.docker.com/engine/api/v1.35/#create-a-container) + // This parameter maps to LogConfig in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --log-driver option to docker run (https://docs.docker.com/engine/reference/run/). // By default, containers use the same logging driver that the Docker daemon - // uses; however the container may use a different logging driver than the Docker + // uses. However the container may use a different logging driver than the Docker // daemon by specifying a log driver with this parameter in the container definition. // To use a different logging driver for a container, the log system must be // configured properly on the container instance (or on a different log server @@ -4297,7 +4903,7 @@ type ContainerDefinition struct { // This parameter requires version 1.18 of the Docker Remote API or greater // on your container instance. To check the Docker Remote API version on your // container instance, log in to your container instance and run the following - // command: sudo docker version | grep "Server API version" + // command: sudo docker version --format '{{.Server.APIVersion}}' // // The Amazon ECS container agent running on a container instance must register // the logging drivers available on that instance with the ECS_AVAILABLE_LOGGING_DRIVERS @@ -4309,7 +4915,7 @@ type ContainerDefinition struct { // The hard limit (in MiB) of memory to present to the container. If your container // attempts to exceed the memory specified here, the container is killed. This - // parameter maps to Memory in the Create a container (https://docs.docker.com/engine/api/v1.35/#create-a-container) + // parameter maps to Memory in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --memory option to docker run (https://docs.docker.com/engine/reference/run/). // @@ -4322,7 +4928,7 @@ type ContainerDefinition struct { // in container definitions. If you specify both, memory must be greater than // memoryReservation. If you specify memoryReservation, then that value is subtracted // from the available memory resources for the container instance on which the - // container is placed; otherwise, the value of memory is used. + // container is placed. Otherwise, the value of memory is used. // // The Docker daemon reserves a minimum of 4 MiB of memory for a container, // so you should not specify fewer than 4 MiB of memory for your containers. @@ -4330,11 +4936,11 @@ type ContainerDefinition struct { // The soft limit (in MiB) of memory to reserve for the container. When system // memory is under heavy contention, Docker attempts to keep the container memory - // to this soft limit; however, your container can consume more memory when + // to this soft limit. However, your container can consume more memory when // it needs to, up to either the hard limit specified with the memory parameter // (if applicable), or all of the available memory on the container instance, // whichever comes first. This parameter maps to MemoryReservation in the Create - // a container (https://docs.docker.com/engine/api/v1.35/#create-a-container) + // a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --memory-reservation option to docker run (https://docs.docker.com/engine/reference/run/). // @@ -4342,7 +4948,7 @@ type ContainerDefinition struct { // in container definitions. If you specify both, memory must be greater than // memoryReservation. If you specify memoryReservation, then that value is subtracted // from the available memory resources for the container instance on which the - // container is placed; otherwise, the value of memory is used. + // container is placed. Otherwise, the value of memory is used. // // For example, if your container normally uses 128 MiB of memory, but occasionally // bursts to 256 MiB of memory for short periods of time, you can set a memoryReservation @@ -4357,7 +4963,7 @@ type ContainerDefinition struct { // The mount points for data volumes in your container. // - // This parameter maps to Volumes in the Create a container (https://docs.docker.com/engine/api/v1.35/#create-a-container) + // This parameter maps to Volumes in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --volume option to docker run (https://docs.docker.com/engine/reference/run/). // @@ -4370,7 +4976,7 @@ type ContainerDefinition struct { // in a task definition, the name of one container can be entered in the links // of another container to connect the containers. Up to 255 letters (uppercase // and lowercase), numbers, hyphens, and underscores are allowed. This parameter - // maps to name in the Create a container (https://docs.docker.com/engine/api/v1.35/#create-a-container) + // maps to name in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --name option to docker run (https://docs.docker.com/engine/reference/run/). Name *string `locationName:"name" type:"string"` @@ -4386,7 +4992,7 @@ type ContainerDefinition struct { // There is no loopback for port mappings on Windows, so you cannot access a // container's mapped port from the host itself. // - // This parameter maps to PortBindings in the Create a container (https://docs.docker.com/engine/api/v1.35/#create-a-container) + // This parameter maps to PortBindings in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --publish option to docker run (https://docs.docker.com/engine/reference/run/). // If the network mode of a task definition is set to none, then you can't specify @@ -4402,7 +5008,7 @@ type ContainerDefinition struct { // When this parameter is true, the container is given elevated privileges on // the host container instance (similar to the root user). This parameter maps - // to Privileged in the Create a container (https://docs.docker.com/engine/api/v1.35/#create-a-container) + // to Privileged in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --privileged option to docker run (https://docs.docker.com/engine/reference/run/). // @@ -4410,11 +5016,17 @@ type ContainerDefinition struct { // Fargate launch type. Privileged *bool `locationName:"privileged" type:"boolean"` + // When this parameter is true, a TTY is allocated. This parameter maps to Tty + // in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) + // and the --tty option to docker run (https://docs.docker.com/engine/reference/run/). + PseudoTerminal *bool `locationName:"pseudoTerminal" type:"boolean"` + // When this parameter is true, the container is given read-only access to its // root file system. This parameter maps to ReadonlyRootfs in the Create a container - // (https://docs.docker.com/engine/api/v1.35/#create-a-container) section of - // the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and the - // --read-only option to docker run. + // (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section + // of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) and + // the --read-only option to docker run (https://docs.docker.com/engine/reference/run/). // // This parameter is not supported for Windows containers. ReadonlyRootFilesystem *bool `locationName:"readonlyRootFilesystem" type:"boolean"` @@ -4422,21 +5034,37 @@ type ContainerDefinition struct { // The private repository authentication credentials to use. RepositoryCredentials *RepositoryCredentials `locationName:"repositoryCredentials" type:"structure"` + // The secrets to pass to the container. + Secrets []*Secret `locationName:"secrets" type:"list"` + + // A list of namespaced kernel parameters to set in the container. This parameter + // maps to Sysctls in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) + // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) + // and the --sysctl option to docker run (https://docs.docker.com/engine/reference/run/). + // + // It is not recommended that you specify network-related systemControls parameters + // for multiple containers in a single task that also uses either the awsvpc + // or host network modes. For tasks that use the awsvpc network mode, the container + // that is started last determines which systemControls parameters take effect. + // For tasks that use the host network mode, it changes the container instance's + // namespaced kernel parameters as well as the containers. + SystemControls []*SystemControl `locationName:"systemControls" type:"list"` + // A list of ulimits to set in the container. This parameter maps to Ulimits - // in the Create a container (https://docs.docker.com/engine/api/v1.35/#create-a-container) + // in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --ulimit option to docker run (https://docs.docker.com/engine/reference/run/). // Valid naming values are displayed in the Ulimit data type. This parameter // requires version 1.18 of the Docker Remote API or greater on your container // instance. To check the Docker Remote API version on your container instance, // log in to your container instance and run the following command: sudo docker - // version | grep "Server API version" + // version --format '{{.Server.APIVersion}}' // // This parameter is not supported for Windows containers. Ulimits []*Ulimit `locationName:"ulimits" type:"list"` // The user name to use inside the container. This parameter maps to User in - // the Create a container (https://docs.docker.com/engine/api/v1.35/#create-a-container) + // the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --user option to docker run (https://docs.docker.com/engine/reference/run/). // @@ -4444,13 +5072,13 @@ type ContainerDefinition struct { User *string `locationName:"user" type:"string"` // Data volumes to mount from another container. This parameter maps to VolumesFrom - // in the Create a container (https://docs.docker.com/engine/api/v1.35/#create-a-container) + // in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --volumes-from option to docker run (https://docs.docker.com/engine/reference/run/). VolumesFrom []*VolumeFrom `locationName:"volumesFrom" type:"list"` // The working directory in which to run commands inside the container. This - // parameter maps to WorkingDir in the Create a container (https://docs.docker.com/engine/api/v1.35/#create-a-container) + // parameter maps to WorkingDir in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --workdir option to docker run (https://docs.docker.com/engine/reference/run/). WorkingDirectory *string `locationName:"workingDirectory" type:"string"` @@ -4499,13 +5127,23 @@ func (s *ContainerDefinition) Validate() error { invalidParams.AddNested("RepositoryCredentials", err.(request.ErrInvalidParams)) } } - if s.Ulimits != nil { - for i, v := range s.Ulimits { + if s.Secrets != nil { + for i, v := range s.Secrets { if v == nil { continue } if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Ulimits", i), err.(request.ErrInvalidParams)) + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Secrets", i), err.(request.ErrInvalidParams)) + } + } + } + if s.Ulimits != nil { + for i, v := range s.Ulimits { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Ulimits", i), err.(request.ErrInvalidParams)) } } } @@ -4600,6 +5238,12 @@ func (s *ContainerDefinition) SetImage(v string) *ContainerDefinition { return s } +// SetInteractive sets the Interactive field's value. +func (s *ContainerDefinition) SetInteractive(v bool) *ContainerDefinition { + s.Interactive = &v + return s +} + // SetLinks sets the Links field's value. func (s *ContainerDefinition) SetLinks(v []*string) *ContainerDefinition { s.Links = v @@ -4654,6 +5298,12 @@ func (s *ContainerDefinition) SetPrivileged(v bool) *ContainerDefinition { return s } +// SetPseudoTerminal sets the PseudoTerminal field's value. +func (s *ContainerDefinition) SetPseudoTerminal(v bool) *ContainerDefinition { + s.PseudoTerminal = &v + return s +} + // SetReadonlyRootFilesystem sets the ReadonlyRootFilesystem field's value. func (s *ContainerDefinition) SetReadonlyRootFilesystem(v bool) *ContainerDefinition { s.ReadonlyRootFilesystem = &v @@ -4666,6 +5316,18 @@ func (s *ContainerDefinition) SetRepositoryCredentials(v *RepositoryCredentials) return s } +// SetSecrets sets the Secrets field's value. +func (s *ContainerDefinition) SetSecrets(v []*Secret) *ContainerDefinition { + s.Secrets = v + return s +} + +// SetSystemControls sets the SystemControls field's value. +func (s *ContainerDefinition) SetSystemControls(v []*SystemControl) *ContainerDefinition { + s.SystemControls = v + return s +} + // SetUlimits sets the Ulimits field's value. func (s *ContainerDefinition) SetUlimits(v []*Ulimit) *ContainerDefinition { s.Ulimits = v @@ -4723,12 +5385,12 @@ type ContainerInstance struct { // The number of tasks on the container instance that are in the PENDING status. PendingTasksCount *int64 `locationName:"pendingTasksCount" type:"integer"` - // The Unix time stamp for when the container instance was registered. + // The Unix timestamp for when the container instance was registered. RegisteredAt *time.Time `locationName:"registeredAt" type:"timestamp"` // For CPU and memory resource types, this parameter describes the amount of // each resource that was available on the container instance when the container - // agent registered it with Amazon ECS; this value represents the total amount + // agent registered it with Amazon ECS. This value represents the total amount // of CPU and memory that can be allocated on this container instance to tasks. // For port resource types, this parameter describes the ports that were reserved // by the Amazon ECS container agent when it registered the container instance @@ -4755,6 +5417,12 @@ type ContainerInstance struct { // in the Amazon Elastic Container Service Developer Guide. Status *string `locationName:"status" type:"string"` + // The metadata that you apply to the container instance to help you categorize + // and organize them. Each tag consists of a key and an optional value, both + // of which you define. Tag keys can have a maximum character length of 128 + // characters, and tag values can have a maximum length of 256 characters. + Tags []*Tag `locationName:"tags" type:"list"` + // The version counter for the container instance. Every time a container instance // experiences a change that triggers a CloudWatch event, the version counter // is incremented. If you are replicating your Amazon ECS container instance @@ -4851,6 +5519,12 @@ func (s *ContainerInstance) SetStatus(v string) *ContainerInstance { return s } +// SetTags sets the Tags field's value. +func (s *ContainerInstance) SetTags(v []*Tag) *ContainerInstance { + s.Tags = v + return s +} + // SetVersion sets the Version field's value. func (s *ContainerInstance) SetVersion(v int64) *ContainerInstance { s.Version = &v @@ -5012,6 +5686,12 @@ type CreateClusterInput struct { // you create a cluster named default. Up to 255 letters (uppercase and lowercase), // numbers, hyphens, and underscores are allowed. ClusterName *string `locationName:"clusterName" type:"string"` + + // The metadata that you apply to the cluster to help you categorize and organize + // them. Each tag consists of a key and an optional value, both of which you + // define. Tag keys can have a maximum character length of 128 characters, and + // tag values can have a maximum length of 256 characters. + Tags []*Tag `locationName:"tags" type:"list"` } // String returns the string representation @@ -5024,12 +5704,38 @@ func (s CreateClusterInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateClusterInput"} + 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 +} + // SetClusterName sets the ClusterName field's value. func (s *CreateClusterInput) SetClusterName(v string) *CreateClusterInput { s.ClusterName = &v return s } +// SetTags sets the Tags field's value. +func (s *CreateClusterInput) SetTags(v []*Tag) *CreateClusterInput { + s.Tags = v + return s +} + type CreateClusterOutput struct { _ struct{} `type:"structure"` @@ -5069,28 +5775,55 @@ type CreateServiceInput struct { // deployment and the ordering of stopping and starting tasks. DeploymentConfiguration *DeploymentConfiguration `locationName:"deploymentConfiguration" type:"structure"` + // The deployment controller to use for the service. + DeploymentController *DeploymentController `locationName:"deploymentController" type:"structure"` + // The number of instantiations of the specified task definition to place and // keep running on your cluster. DesiredCount *int64 `locationName:"desiredCount" type:"integer"` + // Specifies whether to enable Amazon ECS managed tags for the tasks within + // the service. For more information, see Tagging Your Amazon ECS Resources + // (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html) + // in the Amazon Elastic Container Service Developer Guide. + EnableECSManagedTags *bool `locationName:"enableECSManagedTags" type:"boolean"` + // The period of time, in seconds, that the Amazon ECS service scheduler should // ignore unhealthy Elastic Load Balancing target health checks after a task // has first started. This is only valid if your service is configured to use // a load balancer. If your service's tasks take a while to start and respond // to Elastic Load Balancing health checks, you can specify a health check grace - // period of up to 7,200 seconds during which the ECS service scheduler ignores - // health check status. This grace period can prevent the ECS service scheduler - // from marking tasks as unhealthy and stopping them before they have time to - // come up. + // period of up to 7,200 seconds. During that time, the ECS service scheduler + // ignores health check status. This grace period can prevent the ECS service + // scheduler from marking tasks as unhealthy and stopping them before they have + // time to come up. HealthCheckGracePeriodSeconds *int64 `locationName:"healthCheckGracePeriodSeconds" type:"integer"` - // The launch type on which to run your service. + // The launch type on which to run your service. For more information, see Amazon + // ECS Launch Types (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) + // in the Amazon Elastic Container Service Developer Guide. LaunchType *string `locationName:"launchType" type:"string" enum:"LaunchType"` // A load balancer object representing the load balancer to use with your service. - // Currently, you are limited to one load balancer or target group per service. - // After you create a service, the load balancer name or target group ARN, container - // name, and container port specified in the service definition are immutable. + // + // If the service is using the ECS deployment controller, you are limited to + // one load balancer or target group. + // + // If the service is using the CODE_DEPLOY deployment controller, the service + // is required to use either an Application Load Balancer or Network Load Balancer. + // When creating an AWS CodeDeploy deployment group, you specify two target + // groups (referred to as a targetGroupPair). During a deployment, AWS CodeDeploy + // determines which task set in your service has the status PRIMARY and associates + // one target group with it, and then associates the other target group with + // the replacement task set. The load balancer can also have up to two listeners: + // a required listener for production traffic and an optional listener that + // allows you perform validation tests with Lambda functions before routing + // production traffic to it. + // + // After you create a service using the ECS deployment controller, the load + // balancer name or target group ARN, container name, and container port specified + // in the service definition are immutable. If you are using the CODE_DEPLOY + // deployment controller, these values can be changed when updating the service. // // For Classic Load Balancers, this object must contain the load balancer name, // the container name (as it appears in a container definition), and the container @@ -5107,32 +5840,41 @@ type CreateServiceInput struct { // // Services with tasks that use the awsvpc network mode (for example, those // with the Fargate launch type) only support Application Load Balancers and - // Network Load Balancers; Classic Load Balancers are not supported. Also, when + // Network Load Balancers. Classic Load Balancers are not supported. Also, when // you create any target groups for these services, you must choose ip as the // target type, not instance, because tasks that use the awsvpc network mode // are associated with an elastic network interface, not an Amazon EC2 instance. LoadBalancers []*LoadBalancer `locationName:"loadBalancers" type:"list"` // The network configuration for the service. This parameter is required for - // task definitions that use the awsvpc network mode to receive their own Elastic - // Network Interface, and it is not supported for other network modes. For more + // task definitions that use the awsvpc network mode to receive their own elastic + // network interface, and it is not supported for other network modes. For more // information, see Task Networking (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html) // in the Amazon Elastic Container Service Developer Guide. NetworkConfiguration *NetworkConfiguration `locationName:"networkConfiguration" type:"structure"` // An array of placement constraint objects to use for tasks in your service. // You can specify a maximum of 10 constraints per task (this limit includes - // constraints in the task definition and those specified at run time). + // constraints in the task definition and those specified at runtime). PlacementConstraints []*PlacementConstraint `locationName:"placementConstraints" type:"list"` // The placement strategy objects to use for tasks in your service. You can // specify a maximum of five strategy rules per service. PlacementStrategy []*PlacementStrategy `locationName:"placementStrategy" type:"list"` - // The platform version on which to run your service. If one is not specified, - // the latest version is used by default. + // The platform version on which your tasks in the service are running. A platform + // version is only specified for tasks using the Fargate launch type. If one + // is not specified, the LATEST platform version is used by default. For more + // information, see AWS Fargate Platform Versions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) + // in the Amazon Elastic Container Service Developer Guide. PlatformVersion *string `locationName:"platformVersion" type:"string"` + // Specifies whether to propagate the tags from the task definition or the service + // to the tasks. If no value is specified, the tags are not propagated. Tags + // can only be propagated to the tasks within the service during service creation. + // To add tags to a task after service creation, use the TagResource API action. + PropagateTags *string `locationName:"propagateTags" type:"string" enum:"PropagateTags"` + // The name or full Amazon Resource Name (ARN) of the IAM role that allows Amazon // ECS to make calls to your load balancer on your behalf. This parameter is // only permitted if you are using a load balancer with your service and your @@ -5156,22 +5898,24 @@ type CreateServiceInput struct { Role *string `locationName:"role" type:"string"` // The scheduling strategy to use for the service. For more information, see - // Services (http://docs.aws.amazon.com/AmazonECS/latest/developerguideecs_services.html). + // Services (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html). // // There are two service scheduler strategies available: // // * REPLICA-The replica scheduling strategy places and maintains the desired // number of tasks across your cluster. By default, the service scheduler // spreads tasks across Availability Zones. You can use task placement strategies - // and constraints to customize task placement decisions. + // and constraints to customize task placement decisions. This scheduler + // strategy is required if using the CODE_DEPLOY deployment controller. // // * DAEMON-The daemon scheduling strategy deploys exactly one task on each // active container instance that meets all of the task placement constraints - // that you specify in your cluster. When using this strategy, there is no - // need to specify a desired number of tasks, a task placement strategy, + // that you specify in your cluster. When you are using this strategy, there + // is no need to specify a desired number of tasks, a task placement strategy, // or use Service Auto Scaling policies. // - // Fargate tasks do not support the DAEMON scheduling strategy. + // Tasks using the Fargate launch type or the CODE_DEPLOY deploymenet controller + // do not support the DAEMON scheduling strategy. SchedulingStrategy *string `locationName:"schedulingStrategy" type:"string" enum:"SchedulingStrategy"` // The name of your service. Up to 255 letters (uppercase and lowercase), numbers, @@ -5185,11 +5929,18 @@ type CreateServiceInput struct { // The details of the service discovery registries to assign to this service. // For more information, see Service Discovery (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html). // - // Service discovery is supported for Fargate tasks if using platform version - // v1.1.0 or later. For more information, see AWS Fargate Platform Versions + // Service discovery is supported for Fargate tasks if you are using platform + // version v1.1.0 or later. For more information, see AWS Fargate Platform Versions // (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html). ServiceRegistries []*ServiceRegistry `locationName:"serviceRegistries" type:"list"` + // The metadata that you apply to the service to help you categorize and organize + // them. Each tag consists of a key and an optional value, both of which you + // define. When a service is deleted, the tags are deleted as well. Tag keys + // can have a maximum character length of 128 characters, and tag values can + // have a maximum length of 256 characters. + Tags []*Tag `locationName:"tags" type:"list"` + // The family and revision (family:revision) or full ARN of the task definition // to run in your service. If a revision is not specified, the latest ACTIVE // revision is used. @@ -5217,11 +5968,26 @@ func (s *CreateServiceInput) Validate() error { if s.TaskDefinition == nil { invalidParams.Add(request.NewErrParamRequired("TaskDefinition")) } + if s.DeploymentController != nil { + if err := s.DeploymentController.Validate(); err != nil { + invalidParams.AddNested("DeploymentController", err.(request.ErrInvalidParams)) + } + } if s.NetworkConfiguration != nil { if err := s.NetworkConfiguration.Validate(); err != nil { invalidParams.AddNested("NetworkConfiguration", err.(request.ErrInvalidParams)) } } + 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 @@ -5247,12 +6013,24 @@ func (s *CreateServiceInput) SetDeploymentConfiguration(v *DeploymentConfigurati return s } +// SetDeploymentController sets the DeploymentController field's value. +func (s *CreateServiceInput) SetDeploymentController(v *DeploymentController) *CreateServiceInput { + s.DeploymentController = v + return s +} + // SetDesiredCount sets the DesiredCount field's value. func (s *CreateServiceInput) SetDesiredCount(v int64) *CreateServiceInput { s.DesiredCount = &v return s } +// SetEnableECSManagedTags sets the EnableECSManagedTags field's value. +func (s *CreateServiceInput) SetEnableECSManagedTags(v bool) *CreateServiceInput { + s.EnableECSManagedTags = &v + return s +} + // SetHealthCheckGracePeriodSeconds sets the HealthCheckGracePeriodSeconds field's value. func (s *CreateServiceInput) SetHealthCheckGracePeriodSeconds(v int64) *CreateServiceInput { s.HealthCheckGracePeriodSeconds = &v @@ -5295,6 +6073,12 @@ func (s *CreateServiceInput) SetPlatformVersion(v string) *CreateServiceInput { return s } +// SetPropagateTags sets the PropagateTags field's value. +func (s *CreateServiceInput) SetPropagateTags(v string) *CreateServiceInput { + s.PropagateTags = &v + return s +} + // SetRole sets the Role field's value. func (s *CreateServiceInput) SetRole(v string) *CreateServiceInput { s.Role = &v @@ -5319,6 +6103,12 @@ func (s *CreateServiceInput) SetServiceRegistries(v []*ServiceRegistry) *CreateS return s } +// SetTags sets the Tags field's value. +func (s *CreateServiceInput) SetTags(v []*Tag) *CreateServiceInput { + s.Tags = v + return s +} + // SetTaskDefinition sets the TaskDefinition field's value. func (s *CreateServiceInput) SetTaskDefinition(v string) *CreateServiceInput { s.TaskDefinition = &v @@ -5329,6 +6119,13 @@ type CreateServiceOutput struct { _ struct{} `type:"structure"` // The full description of your service following the create call. + // + // If a service is using the ECS deployment controller, the deploymentController + // and taskSets parameters will not be returned. + // + // If the service is using the CODE_DEPLOY deployment controller, the deploymentController, + // taskSets and deployments parameters will be returned, however the deployments + // parameter will be an empty list. Service *Service `locationName:"service" type:"structure"` } @@ -5348,6 +6145,84 @@ func (s *CreateServiceOutput) SetService(v *Service) *CreateServiceOutput { return s } +type DeleteAccountSettingInput struct { + _ struct{} `type:"structure"` + + // The resource name for which to disable the new format. If serviceLongArnFormat + // is specified, the ARN for your Amazon ECS services is affected. If taskLongArnFormat + // is specified, the ARN and resource ID for your Amazon ECS tasks is affected. + // If containerInstanceLongArnFormat is specified, the ARN and resource ID for + // your Amazon ECS container instances is affected. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true" enum:"SettingName"` + + // The ARN of the principal, which can be an IAM user, IAM role, or the root + // user. If you specify the root user, it modifies the ARN and resource ID format + // for all IAM users, IAM roles, and the root user of the account unless an + // IAM user or role explicitly overrides these settings for themselves. If this + // field is omitted, the setting are changed only for the authenticated user. + PrincipalArn *string `locationName:"principalArn" type:"string"` +} + +// String returns the string representation +func (s DeleteAccountSettingInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAccountSettingInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteAccountSettingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteAccountSettingInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *DeleteAccountSettingInput) SetName(v string) *DeleteAccountSettingInput { + s.Name = &v + return s +} + +// SetPrincipalArn sets the PrincipalArn field's value. +func (s *DeleteAccountSettingInput) SetPrincipalArn(v string) *DeleteAccountSettingInput { + s.PrincipalArn = &v + return s +} + +type DeleteAccountSettingOutput struct { + _ struct{} `type:"structure"` + + // The account setting for the specified principal ARN. + Setting *Setting `locationName:"setting" type:"structure"` +} + +// String returns the string representation +func (s DeleteAccountSettingOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAccountSettingOutput) GoString() string { + return s.String() +} + +// SetSetting sets the Setting field's value. +func (s *DeleteAccountSettingOutput) SetSetting(v *Setting) *DeleteAccountSettingOutput { + s.Setting = v + return s +} + type DeleteAttributesInput struct { _ struct{} `type:"structure"` @@ -5577,11 +6452,12 @@ func (s *DeleteServiceOutput) SetService(v *Service) *DeleteServiceOutput { return s } -// The details of an Amazon ECS service deployment. +// The details of an Amazon ECS service deployment. This is used when a service +// uses the CODE_DEPLOY deployment controller type. type Deployment struct { _ struct{} `type:"structure"` - // The Unix time stamp for when the service was created. + // The Unix timestamp for when the service deployment was created. CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The most recent desired count of tasks that was specified for the service @@ -5591,7 +6467,9 @@ type Deployment struct { // The ID of the deployment. Id *string `locationName:"id" type:"string"` - // The launch type on which your service is running. + // The launch type the tasks in the service are using. For more information, + // see Amazon ECS Launch Types (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) + // in the Amazon Elastic Container Service Developer Guide. LaunchType *string `locationName:"launchType" type:"string" enum:"LaunchType"` // The VPC subnet and security group configuration for tasks that receive their @@ -5601,22 +6479,31 @@ type Deployment struct { // The number of tasks in the deployment that are in the PENDING status. PendingCount *int64 `locationName:"pendingCount" type:"integer"` - // The platform version on which your service is running. + // The platform version on which your tasks in the service are running. A platform + // version is only specified for tasks using the Fargate launch type. If one + // is not specified, the LATEST platform version is used by default. For more + // information, see AWS Fargate Platform Versions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) + // in the Amazon Elastic Container Service Developer Guide. PlatformVersion *string `locationName:"platformVersion" type:"string"` // The number of tasks in the deployment that are in the RUNNING status. RunningCount *int64 `locationName:"runningCount" type:"integer"` - // The status of the deployment. Valid values are PRIMARY (for the most recent - // deployment), ACTIVE (for previous deployments that still have tasks running, - // but are being replaced with the PRIMARY deployment), and INACTIVE (for deployments - // that have been completely replaced). + // The status of the deployment. The following describes each state: + // + // PRIMARYThe most recent deployment of a service. + // + // ACTIVEA service deployment that still has running tasks, but are in the process + // of being replaced with a new PRIMARY deployment. + // + // INACTIVEA deployment that has been completely replaced. Status *string `locationName:"status" type:"string"` - // The most recent task definition that was specified for the service to use. + // The most recent task definition that was specified for the tasks in the service + // to use. TaskDefinition *string `locationName:"taskDefinition" type:"string"` - // The Unix time stamp for when the service was last updated. + // The Unix timestamp for when the service deployment was last updated. UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp"` } @@ -5701,17 +6588,49 @@ func (s *Deployment) SetUpdatedAt(v time.Time) *Deployment { type DeploymentConfiguration struct { _ struct{} `type:"structure"` - // The upper limit (as a percentage of the service's desiredCount) of the number - // of tasks that are allowed in the RUNNING or PENDING state in a service during - // a deployment. The maximum number of tasks during a deployment is the desiredCount - // multiplied by maximumPercent/100, rounded down to the nearest integer value. + // If a service is using the rolling update (ECS) deployment type, the maximum + // percent parameter represents an upper limit on the number of tasks in a service + // that are allowed in the RUNNING or PENDING state during a deployment, as + // a percentage of the desired number of tasks (rounded down to the nearest + // integer), and while any container instances are in the DRAINING state if + // the service contains tasks using the EC2 launch type. This parameter enables + // you to define the deployment batch size. For example, if your service has + // a desired number of four tasks and a maximum percent value of 200%, the scheduler + // may start four new tasks before stopping the four older tasks (provided that + // the cluster resources required to do this are available). The default value + // for maximum percent is 200%. + // + // If a service is using the blue/green (CODE_DEPLOY) deployment type and tasks + // that use the EC2 launch type, the maximum percent value is set to the default + // value and is used to define the upper limit on the number of the tasks in + // the service that remain in the RUNNING state while the container instances + // are in the DRAINING state. If the tasks in the service use the Fargate launch + // type, the maximum percent value is not used, although it is returned when + // describing your service. MaximumPercent *int64 `locationName:"maximumPercent" type:"integer"` - // The lower limit (as a percentage of the service's desiredCount) of the number - // of running tasks that must remain in the RUNNING state in a service during - // a deployment. The minimum number of healthy tasks during a deployment is - // the desiredCount multiplied by minimumHealthyPercent/100, rounded up to the - // nearest integer value. + // If a service is using the rolling update (ECS) deployment type, the minimum + // healthy percent represents a lower limit on the number of tasks in a service + // that must remain in the RUNNING state during a deployment, as a percentage + // of the desired number of tasks (rounded up to the nearest integer), and while + // any container instances are in the DRAINING state if the service contains + // tasks using the EC2 launch type. This parameter enables you to deploy without + // using additional cluster capacity. For example, if your service has a desired + // number of four tasks and a minimum healthy percent of 50%, the scheduler + // may stop two existing tasks to free up cluster capacity before starting two + // new tasks. Tasks for services that do not use a load balancer are considered + // healthy if they are in the RUNNING state; tasks for services that do use + // a load balancer are considered healthy if they are in the RUNNING state and + // they are reported as healthy by the load balancer. The default value for + // minimum healthy percent is 100%. + // + // If a service is using the blue/green (CODE_DEPLOY) deployment type and tasks + // that use the EC2 launch type, the minimum healthy percent value is set to + // the default value and is used to define the lower limit on the number of + // the tasks in the service that remain in the RUNNING state while the container + // instances are in the DRAINING state. If the tasks in the service use the + // Fargate launch type, the minimum healthy percent value is not used, although + // it is returned when describing your service. MinimumHealthyPercent *int64 `locationName:"minimumHealthyPercent" type:"integer"` } @@ -5737,6 +6656,61 @@ func (s *DeploymentConfiguration) SetMinimumHealthyPercent(v int64) *DeploymentC return s } +// The deployment controller to use for the service. For more information, see +// Amazon ECS Deployment Types (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html) +// in the Amazon Elastic Container Service Developer Guide. +type DeploymentController struct { + _ struct{} `type:"structure"` + + // The deployment controller type to use. + // + // There are two deployment controller types available: + // + // ECSThe rolling update (ECS) deployment type involves replacing the current + // running version of the container with the latest version. The number of containers + // Amazon ECS adds or removes from the service during a rolling update is controlled + // by adjusting the minimum and maximum number of healthy tasks allowed during + // a service deployment, as specified in the DeploymentConfiguration. + // + // CODE_DEPLOYThe blue/green (CODE_DEPLOY) deployment type uses the blue/green + // deployment model powered by AWS CodeDeploy, which allows you to verify a + // new deployment of a service before sending production traffic to it. For + // more information, see Amazon ECS Deployment Types (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html) + // in the Amazon Elastic Container Service Developer Guide. + // + // Type is a required field + Type *string `locationName:"type" type:"string" required:"true" enum:"DeploymentControllerType"` +} + +// String returns the string representation +func (s DeploymentController) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeploymentController) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeploymentController) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeploymentController"} + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetType sets the Type field's value. +func (s *DeploymentController) SetType(v string) *DeploymentController { + s.Type = &v + return s +} + type DeregisterContainerInstanceInput struct { _ struct{} `type:"structure"` @@ -5990,6 +6964,11 @@ type DescribeContainerInstancesInput struct { // // ContainerInstances is a required field ContainerInstances []*string `locationName:"containerInstances" type:"list" required:"true"` + + // Specifies whether you want to see the resource tags for the container instance. + // If TAGS is specified, the tags are included in the response. If this field + // is omitted, tags are not included in the response. + Include []*string `locationName:"include" type:"list"` } // String returns the string representation @@ -6027,6 +7006,12 @@ func (s *DescribeContainerInstancesInput) SetContainerInstances(v []*string) *De return s } +// SetInclude sets the Include field's value. +func (s *DescribeContainerInstancesInput) SetInclude(v []*string) *DescribeContainerInstancesInput { + s.Include = v + return s +} + type DescribeContainerInstancesOutput struct { _ struct{} `type:"structure"` @@ -6067,6 +7052,11 @@ type DescribeServicesInput struct { // is assumed. Cluster *string `locationName:"cluster" type:"string"` + // Specifies whether you want to see the resource tags for the service. If TAGS + // is specified, the tags are included in the response. If this field is omitted, + // tags are not included in the response. + Include []*string `locationName:"include" type:"list"` + // A list of services to describe. You may specify up to 10 services to describe // in a single operation. // @@ -6103,6 +7093,12 @@ func (s *DescribeServicesInput) SetCluster(v string) *DescribeServicesInput { return s } +// SetInclude sets the Include field's value. +func (s *DescribeServicesInput) SetInclude(v []*string) *DescribeServicesInput { + s.Include = v + return s +} + // SetServices sets the Services field's value. func (s *DescribeServicesInput) SetServices(v []*string) *DescribeServicesInput { s.Services = v @@ -6144,6 +7140,11 @@ func (s *DescribeServicesOutput) SetServices(v []*Service) *DescribeServicesOutp type DescribeTaskDefinitionInput struct { _ struct{} `type:"structure"` + // Specifies whether to see the resource tags for the task definition. If TAGS + // is specified, the tags are included in the response. If this field is omitted, + // tags are not included in the response. + Include []*string `locationName:"include" type:"list"` + // The family for the latest ACTIVE revision, family and revision (family:revision) // for a specific revision in the family, or full Amazon Resource Name (ARN) // of the task definition to describe. @@ -6175,6 +7176,12 @@ func (s *DescribeTaskDefinitionInput) Validate() error { return nil } +// SetInclude sets the Include field's value. +func (s *DescribeTaskDefinitionInput) SetInclude(v []*string) *DescribeTaskDefinitionInput { + s.Include = v + return s +} + // SetTaskDefinition sets the TaskDefinition field's value. func (s *DescribeTaskDefinitionInput) SetTaskDefinition(v string) *DescribeTaskDefinitionInput { s.TaskDefinition = &v @@ -6184,6 +7191,12 @@ func (s *DescribeTaskDefinitionInput) SetTaskDefinition(v string) *DescribeTaskD type DescribeTaskDefinitionOutput struct { _ struct{} `type:"structure"` + // The metadata that is applied to the task definition to help you categorize + // and organize them. Each tag consists of a key and an optional value, both + // of which you define. Tag keys can have a maximum character length of 128 + // characters, and tag values can have a maximum length of 256 characters. + Tags []*Tag `locationName:"tags" type:"list"` + // The full task definition description. TaskDefinition *TaskDefinition `locationName:"taskDefinition" type:"structure"` } @@ -6198,6 +7211,12 @@ func (s DescribeTaskDefinitionOutput) GoString() string { return s.String() } +// SetTags sets the Tags field's value. +func (s *DescribeTaskDefinitionOutput) SetTags(v []*Tag) *DescribeTaskDefinitionOutput { + s.Tags = v + return s +} + // SetTaskDefinition sets the TaskDefinition field's value. func (s *DescribeTaskDefinitionOutput) SetTaskDefinition(v *TaskDefinition) *DescribeTaskDefinitionOutput { s.TaskDefinition = v @@ -6212,6 +7231,11 @@ type DescribeTasksInput struct { // is assumed. Cluster *string `locationName:"cluster" type:"string"` + // Specifies whether you want to see the resource tags for the task. If TAGS + // is specified, the tags are included in the response. If this field is omitted, + // tags are not included in the response. + Include []*string `locationName:"include" type:"list"` + // A list of up to 100 task IDs or full ARN entries. // // Tasks is a required field @@ -6247,6 +7271,12 @@ func (s *DescribeTasksInput) SetCluster(v string) *DescribeTasksInput { return s } +// SetInclude sets the Include field's value. +func (s *DescribeTasksInput) SetInclude(v []*string) *DescribeTasksInput { + s.Include = v + return s +} + // SetTasks sets the Tasks field's value. func (s *DescribeTasksInput) SetTasks(v []*string) *DescribeTasksInput { s.Tasks = v @@ -6346,8 +7376,8 @@ func (s *Device) SetPermissions(v []*string) *Device { type DiscoverPollEndpointInput struct { _ struct{} `type:"structure"` - // The short name or full Amazon Resource Name (ARN) of the cluster that the - // container instance belongs to. + // The short name or full Amazon Resource Name (ARN) of the cluster to which + // the container instance belongs. Cluster *string `locationName:"cluster" type:"string"` // The container instance ID or full ARN of the container instance. The ARN @@ -6411,8 +7441,10 @@ func (s *DiscoverPollEndpointOutput) SetTelemetryEndpoint(v string) *DiscoverPol return s } -// The configuration for the Docker volume. This parameter is specified when -// using Docker volumes. +// This parameter is specified when you are using Docker volumes. Docker volumes +// are only supported when you are using the EC2 launch type. Windows containers +// only support the use of the local driver. To use bind mounts, specify a host +// instead. type DockerVolumeConfiguration struct { _ struct{} `type:"structure"` @@ -6433,7 +7465,7 @@ type DockerVolumeConfiguration struct { // and the xxdriver option to docker volume create (https://docs.docker.com/engine/reference/commandline/volume_create/). Driver *string `locationName:"driver" type:"string"` - // A map of Docker driver specific options passed through. This parameter maps + // A map of Docker driver-specific options passed through. This parameter maps // to DriverOpts in the Create a volume (https://docs.docker.com/engine/api/v1.35/#operation/VolumeCreate) // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the xxopt option to docker volume create (https://docs.docker.com/engine/reference/commandline/volume_create/). @@ -6445,7 +7477,7 @@ type DockerVolumeConfiguration struct { // and the xxlabel option to docker volume create (https://docs.docker.com/engine/reference/commandline/volume_create/). Labels map[string]*string `locationName:"labels" type:"map"` - // The scope for the Docker volume which determines it's lifecycle. Docker volumes + // The scope for the Docker volume that determines its lifecycle. Docker volumes // that are scoped to a task are automatically provisioned when the task starts // and destroyed when the task stops. Docker volumes that are scoped as shared // persist after the task stops. @@ -6529,6 +7561,19 @@ func (s *Failure) SetReason(v string) *Failure { // that are specified in a container definition override any Docker health checks // that exist in the container image (such as those specified in a parent image // or from the image's Dockerfile). +// +// The following are notes about container health check support: +// +// * Container health checks require version 1.17.0 or greater of the Amazon +// ECS container agent. For more information, see Updating the Amazon ECS +// Container Agent (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html). +// +// * Container health checks are supported for Fargate tasks if you are using +// platform version 1.1.0 or greater. For more information, see AWS Fargate +// Platform Versions (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html). +// +// * Container health checks are not supported for tasks that are part of +// a service that is configured to use a Classic Load Balancer. type HealthCheck struct { _ struct{} `type:"structure"` @@ -6540,7 +7585,7 @@ type HealthCheck struct { // [ "CMD-SHELL", "curl -f http://localhost/ || exit 1" ] // // An exit code of 0 indicates success, and non-zero exit code indicates failure. - // For more information, see HealthCheck in the Create a container (https://docs.docker.com/engine/api/v1.35/#create-a-container) + // For more information, see HealthCheck in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/). // // Command is a required field @@ -6724,7 +7769,7 @@ type KernelCapabilities struct { // The Linux capabilities for the container that have been added to the default // configuration provided by Docker. This parameter maps to CapAdd in the Create - // a container (https://docs.docker.com/engine/api/v1.35/#create-a-container) + // a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --cap-add option to docker run (https://docs.docker.com/engine/reference/run/). // @@ -6743,7 +7788,7 @@ type KernelCapabilities struct { // The Linux capabilities for the container that have been removed from the // default configuration provided by Docker. This parameter maps to CapDrop - // in the Create a container (https://docs.docker.com/engine/api/v1.35/#create-a-container) + // in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --cap-drop option to docker run (https://docs.docker.com/engine/reference/run/). // @@ -6780,15 +7825,15 @@ func (s *KernelCapabilities) SetDrop(v []*string) *KernelCapabilities { return s } -// A key and value pair object. +// A key-value pair object. type KeyValuePair struct { _ struct{} `type:"structure"` - // The name of the key value pair. For environment variables, this is the name + // The name of the key-value pair. For environment variables, this is the name // of the environment variable. Name *string `locationName:"name" type:"string"` - // The value of the key value pair. For environment variables, this is the value + // The value of the key-value pair. For environment variables, this is the value // of the environment variable. Value *string `locationName:"value" type:"string"` } @@ -6827,7 +7872,7 @@ type LinuxParameters struct { Capabilities *KernelCapabilities `locationName:"capabilities" type:"structure"` // Any host devices to expose to the container. This parameter maps to Devices - // in the Create a container (https://docs.docker.com/engine/api/v1.35/#create-a-container) + // in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) // section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) // and the --device option to docker run (https://docs.docker.com/engine/reference/run/). // @@ -6840,7 +7885,7 @@ type LinuxParameters struct { // This parameter requires version 1.25 of the Docker Remote API or greater // on your container instance. To check the Docker Remote API version on your // container instance, log in to your container instance and run the following - // command: sudo docker version | grep "Server API version" + // command: sudo docker version --format '{{.Server.APIVersion}}' InitProcessEnabled *bool `locationName:"initProcessEnabled" type:"boolean"` // The value for the size (in MiB) of the /dev/shm volume. This parameter maps @@ -6928,74 +7973,195 @@ func (s *LinuxParameters) SetTmpfs(v []*Tmpfs) *LinuxParameters { return s } -type ListAttributesInput struct { +type ListAccountSettingsInput struct { _ struct{} `type:"structure"` - // The name of the attribute with which to filter the results. - AttributeName *string `locationName:"attributeName" type:"string"` - - // The value of the attribute with which to filter results. You must also specify - // an attribute name to use this parameter. - AttributeValue *string `locationName:"attributeValue" type:"string"` - - // The short name or full Amazon Resource Name (ARN) of the cluster to list - // attributes. If you do not specify a cluster, the default cluster is assumed. - Cluster *string `locationName:"cluster" type:"string"` + // Specifies whether to return the effective settings. If true, the account + // settings for the root user or the default setting for the principalArn. If + // false, the account settings for the principalArn are returned if they are + // set. Otherwise, no account settings are returned. + EffectiveSettings *bool `locationName:"effectiveSettings" type:"boolean"` - // The maximum number of cluster results returned by ListAttributes in paginated - // output. When this parameter is used, ListAttributes only returns maxResults - // results in a single page along with a nextToken response element. The remaining - // results of the initial request can be seen by sending another ListAttributes - // request with the returned nextToken value. This value can be between 1 and - // 100. If this parameter is not used, then ListAttributes returns up to 100 - // results and a nextToken value if applicable. + // The maximum number of account setting results returned by ListAccountSettings + // in paginated output. When this parameter is used, ListAccountSettings only + // returns maxResults results in a single page along with a nextToken response + // element. The remaining results of the initial request can be seen by sending + // another ListAccountSettings request with the returned nextToken value. This + // value can be between 1 and 10. If this parameter is not used, then ListAccountSettings + // returns up to 10 results and a nextToken value if applicable. MaxResults *int64 `locationName:"maxResults" type:"integer"` - // The nextToken value returned from a previous paginated ListAttributes request - // where maxResults was used and the results exceeded the value of that parameter. - // Pagination continues from the end of the previous results that returned the - // nextToken value. + // The resource name you want to list the account settings for. + Name *string `locationName:"name" type:"string" enum:"SettingName"` + + // The nextToken value returned from a previous paginated ListAccountSettings + // request where maxResults was used and the results exceeded the value of that + // parameter. Pagination continues from the end of the previous results that + // returned the nextToken value. // // This token should be treated as an opaque identifier that is only used to // retrieve the next items in a list and not for other programmatic purposes. NextToken *string `locationName:"nextToken" type:"string"` - // The type of the target with which to list attributes. - // - // TargetType is a required field - TargetType *string `locationName:"targetType" type:"string" required:"true" enum:"TargetType"` + // The ARN of the principal, which can be an IAM user, IAM role, or the root + // user. If this field is omitted, the account settings are listed only for + // the authenticated user. + PrincipalArn *string `locationName:"principalArn" type:"string"` + + // The value of the account settings with which to filter results. You must + // also specify an account setting name to use this parameter. + Value *string `locationName:"value" type:"string"` } // String returns the string representation -func (s ListAttributesInput) String() string { +func (s ListAccountSettingsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListAttributesInput) GoString() string { +func (s ListAccountSettingsInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListAttributesInput"} - if s.TargetType == nil { - invalidParams.Add(request.NewErrParamRequired("TargetType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetEffectiveSettings sets the EffectiveSettings field's value. +func (s *ListAccountSettingsInput) SetEffectiveSettings(v bool) *ListAccountSettingsInput { + s.EffectiveSettings = &v + return s } -// SetAttributeName sets the AttributeName field's value. -func (s *ListAttributesInput) SetAttributeName(v string) *ListAttributesInput { - s.AttributeName = &v +// SetMaxResults sets the MaxResults field's value. +func (s *ListAccountSettingsInput) SetMaxResults(v int64) *ListAccountSettingsInput { + s.MaxResults = &v return s } -// SetAttributeValue sets the AttributeValue field's value. +// SetName sets the Name field's value. +func (s *ListAccountSettingsInput) SetName(v string) *ListAccountSettingsInput { + s.Name = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListAccountSettingsInput) SetNextToken(v string) *ListAccountSettingsInput { + s.NextToken = &v + return s +} + +// SetPrincipalArn sets the PrincipalArn field's value. +func (s *ListAccountSettingsInput) SetPrincipalArn(v string) *ListAccountSettingsInput { + s.PrincipalArn = &v + return s +} + +// SetValue sets the Value field's value. +func (s *ListAccountSettingsInput) SetValue(v string) *ListAccountSettingsInput { + s.Value = &v + return s +} + +type ListAccountSettingsOutput struct { + _ struct{} `type:"structure"` + + // The nextToken value to include in a future ListAccountSettings request. When + // the results of a ListAccountSettings request exceed maxResults, this value + // can be used to retrieve the next page of results. This value is null when + // there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + + // The account settings for the resource. + Settings []*Setting `locationName:"settings" type:"list"` +} + +// String returns the string representation +func (s ListAccountSettingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListAccountSettingsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListAccountSettingsOutput) SetNextToken(v string) *ListAccountSettingsOutput { + s.NextToken = &v + return s +} + +// SetSettings sets the Settings field's value. +func (s *ListAccountSettingsOutput) SetSettings(v []*Setting) *ListAccountSettingsOutput { + s.Settings = v + return s +} + +type ListAttributesInput struct { + _ struct{} `type:"structure"` + + // The name of the attribute with which to filter the results. + AttributeName *string `locationName:"attributeName" type:"string"` + + // The value of the attribute with which to filter results. You must also specify + // an attribute name to use this parameter. + AttributeValue *string `locationName:"attributeValue" type:"string"` + + // The short name or full Amazon Resource Name (ARN) of the cluster to list + // attributes. If you do not specify a cluster, the default cluster is assumed. + Cluster *string `locationName:"cluster" type:"string"` + + // The maximum number of cluster results returned by ListAttributes in paginated + // output. When this parameter is used, ListAttributes only returns maxResults + // results in a single page along with a nextToken response element. The remaining + // results of the initial request can be seen by sending another ListAttributes + // request with the returned nextToken value. This value can be between 1 and + // 100. If this parameter is not used, then ListAttributes returns up to 100 + // results and a nextToken value if applicable. + MaxResults *int64 `locationName:"maxResults" type:"integer"` + + // The nextToken value returned from a previous paginated ListAttributes request + // where maxResults was used and the results exceeded the value of that parameter. + // Pagination continues from the end of the previous results that returned the + // nextToken value. + // + // This token should be treated as an opaque identifier that is only used to + // retrieve the next items in a list and not for other programmatic purposes. + NextToken *string `locationName:"nextToken" type:"string"` + + // The type of the target with which to list attributes. + // + // TargetType is a required field + TargetType *string `locationName:"targetType" type:"string" required:"true" enum:"TargetType"` +} + +// String returns the string representation +func (s ListAttributesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListAttributesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListAttributesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListAttributesInput"} + if s.TargetType == nil { + invalidParams.Add(request.NewErrParamRequired("TargetType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAttributeName sets the AttributeName field's value. +func (s *ListAttributesInput) SetAttributeName(v string) *ListAttributesInput { + s.AttributeName = &v + return s +} + +// SetAttributeValue sets the AttributeValue field's value. func (s *ListAttributesInput) SetAttributeValue(v string) *ListAttributesInput { s.AttributeValue = &v return s @@ -7273,7 +8439,7 @@ type ListServicesInput struct { // results in a single page along with a nextToken response element. The remaining // results of the initial request can be seen by sending another ListServices // request with the returned nextToken value. This value can be between 1 and - // 10. If this parameter is not used, then ListServices returns up to 10 results + // 100. If this parameter is not used, then ListServices returns up to 10 results // and a nextToken value if applicable. MaxResults *int64 `locationName:"maxResults" type:"integer"` @@ -7366,6 +8532,69 @@ func (s *ListServicesOutput) SetServiceArns(v []*string) *ListServicesOutput { return s } +type ListTagsForResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) that identifies the resource for which to + // list the tags. Currently, the supported resources are Amazon ECS tasks, services, + // task definitions, clusters, and container instances. + // + // ResourceArn is a required field + ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTagsForResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { + s.ResourceArn = &v + return s +} + +type ListTagsForResourceOutput struct { + _ struct{} `type:"structure"` + + // The tags for the resource. + Tags []*Tag `locationName:"tags" type:"list"` +} + +// String returns the string representation +func (s ListTagsForResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceOutput) GoString() string { + return s.String() +} + +// SetTags sets the Tags field's value. +func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { + s.Tags = v + return s +} + type ListTaskDefinitionFamiliesInput struct { _ struct{} `type:"structure"` @@ -7606,14 +8835,14 @@ type ListTasksInput struct { // The task desired status with which to filter the ListTasks results. Specifying // a desiredStatus of STOPPED limits the results to tasks that Amazon ECS has - // set the desired status to STOPPED, which can be useful for debugging tasks + // set the desired status to STOPPED. This can be useful for debugging tasks // that are not starting properly or have died or finished. The default status // filter is RUNNING, which shows tasks that Amazon ECS has set the desired // status to RUNNING. // // Although you can filter results based on a desired status of PENDING, this - // does not return any results because Amazon ECS never sets the desired status - // of a task to that value (only a task's lastStatus may have a value of PENDING). + // does not return any results. Amazon ECS never sets the desired status of + // a task to that value (only a task's lastStatus may have a value of PENDING). DesiredStatus *string `locationName:"desiredStatus" type:"string" enum:"DesiredStatus"` // The name of the family with which to filter the ListTasks results. Specifying @@ -7751,12 +8980,24 @@ func (s *ListTasksOutput) SetTaskArns(v []*string) *ListTasksOutput { // Details on a load balancer that is used with a service. // +// If the service is using the ECS deployment controller, you are limited to +// one load balancer or target group. +// +// If the service is using the CODE_DEPLOY deployment controller, the service +// is required to use either an Application Load Balancer or Network Load Balancer. +// When you are creating an AWS CodeDeploy deployment group, you specify two +// target groups (referred to as a targetGroupPair). Each target group binds +// to a separate task set in the deployment. The load balancer can also have +// up to two listeners, a required listener for production traffic and an optional +// listener that allows you to test new revisions of the service before routing +// production traffic to it. +// // Services with tasks that use the awsvpc network mode (for example, those // with the Fargate launch type) only support Application Load Balancers and -// Network Load Balancers; Classic Load Balancers are not supported. Also, when +// Network Load Balancers. Classic Load Balancers are not supported. Also, when // you create any target groups for these services, you must choose ip as the -// target type, not instance, because tasks that use the awsvpc network mode -// are associated with an elastic network interface, not an Amazon EC2 instance. +// target type, not instance. Tasks that use the awsvpc network mode are associated +// with an elastic network interface, not an Amazon EC2 instance. type LoadBalancer struct { _ struct{} `type:"structure"` @@ -7774,7 +9015,10 @@ type LoadBalancer struct { LoadBalancerName *string `locationName:"loadBalancerName" type:"string"` // The full Amazon Resource Name (ARN) of the Elastic Load Balancing target - // group associated with a service. + // group or groups associated with a service. For services using the ECS deployment + // controller, you are limited to one target group. For services using the CODE_DEPLOY + // deployment controller, you are required to define two target groups for the + // load balancer. // // If your service's task definition uses the awsvpc network mode (which is // required for the Fargate launch type), you must choose ip as the target type, @@ -7823,9 +9067,9 @@ type LogConfiguration struct { // The log driver to use for the container. The valid values listed for this // parameter are log drivers that the Amazon ECS container agent can communicate - // with by default. If using the Fargate launch type, the only supported value - // is awslogs. For more information about using the awslogs driver, see Using - // the awslogs Log Driver (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html) + // with by default. If you are using the Fargate launch type, the only supported + // value is awslogs. For more information about using the awslogs driver, see + // Using the awslogs Log Driver (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html) // in the Amazon Elastic Container Service Developer Guide. // // If you have a custom driver that is not listed above that you would like @@ -7838,7 +9082,7 @@ type LogConfiguration struct { // This parameter requires version 1.18 of the Docker Remote API or greater // on your container instance. To check the Docker Remote API version on your // container instance, log in to your container instance and run the following - // command: sudo docker version | grep "Server API version" + // command: sudo docker version --format '{{.Server.APIVersion}}' // // LogDriver is a required field LogDriver *string `locationName:"logDriver" type:"string" required:"true" enum:"LogDriver"` @@ -7847,7 +9091,7 @@ type LogConfiguration struct { // version 1.19 of the Docker Remote API or greater on your container instance. // To check the Docker Remote API version on your container instance, log in // to your container instance and run the following command: sudo docker version - // | grep "Server API version" + // --format '{{.Server.APIVersion}}' Options map[string]*string `locationName:"options" type:"map"` } @@ -8160,9 +9404,9 @@ func (s *PlacementStrategy) SetType(v string) *PlacementStrategy { // to send or receive traffic. Port mappings are specified as part of the container // definition. // -// If using containers in a task with the awsvpc or host network mode, exposed -// ports should be specified using containerPort. The hostPort can be left blank -// or it must be the same value as the containerPort. +// If you are using containers in a task with the awsvpc or host network mode, +// exposed ports should be specified using containerPort. The hostPort can be +// left blank or it must be the same value as the containerPort. // // After a task reaches the RUNNING status, manual and automatic host and container // port assignments are visible in the networkBindings section of DescribeTasks @@ -8173,33 +9417,33 @@ type PortMapping struct { // The port number on the container that is bound to the user-specified or automatically // assigned host port. // - // If using containers in a task with the awsvpc or host network mode, exposed - // ports should be specified using containerPort. + // If you are using containers in a task with the awsvpc or host network mode, + // exposed ports should be specified using containerPort. // - // If using containers in a task with the bridge network mode and you specify - // a container port and not a host port, your container automatically receives - // a host port in the ephemeral port range (for more information, see hostPort). - // Port mappings that are automatically assigned in this way do not count toward - // the 100 reserved ports limit of a container instance. + // If you are using containers in a task with the bridge network mode and you + // specify a container port and not a host port, your container automatically + // receives a host port in the ephemeral port range. For more information, see + // hostPort. Port mappings that are automatically assigned in this way do not + // count toward the 100 reserved ports limit of a container instance. ContainerPort *int64 `locationName:"containerPort" type:"integer"` // The port number on the container instance to reserve for your container. // - // If using containers in a task with the awsvpc or host network mode, the hostPort - // can either be left blank or set to the same value as the containerPort. + // If you are using containers in a task with the awsvpc or host network mode, + // the hostPort can either be left blank or set to the same value as the containerPort. // - // If using containers in a task with the bridge network mode, you can specify - // a non-reserved host port for your container port mapping, or you can omit - // the hostPort (or set it to 0) while specifying a containerPort and your container - // automatically receives a port in the ephemeral port range for your container - // instance operating system and Docker version. + // If you are using containers in a task with the bridge network mode, you can + // specify a non-reserved host port for your container port mapping, or you + // can omit the hostPort (or set it to 0) while specifying a containerPort and + // your container automatically receives a port in the ephemeral port range + // for your container instance operating system and Docker version. // // The default ephemeral port range for Docker version 1.6.0 and later is listed - // on the instance under /proc/sys/net/ipv4/ip_local_port_range; if this kernel + // on the instance under /proc/sys/net/ipv4/ip_local_port_range. If this kernel // parameter is unavailable, the default ephemeral port range from 49153 through - // 65535 is used. You should not attempt to specify a host port in the ephemeral - // port range as these are reserved for automatic assignment. In general, ports - // below 32768 are outside of the ephemeral port range. + // 65535 is used. Do not attempt to specify a host port in the ephemeral port + // range as these are reserved for automatic assignment. In general, ports below + // 32768 are outside of the ephemeral port range. // // The default ephemeral port range from 49153 through 65535 is always used // for Docker versions before 1.6.0. @@ -8209,9 +9453,9 @@ type PortMapping struct { // was previously specified in a running task is also reserved while the task // is running (after a task stops, the host port is released). The current reserved // ports are displayed in the remainingResources of DescribeContainerInstances - // output, and a container instance may have up to 100 reserved ports at a time, - // including the default reserved ports (automatically assigned ports do not - // count toward the 100 reserved ports limit). + // output. A container instance may have up to 100 reserved ports at a time, + // including the default reserved ports. Aautomatically assigned ports do not + // count toward the 100 reserved ports limit. HostPort *int64 `locationName:"hostPort" type:"integer"` // The protocol used for the port mapping. Valid values are tcp and udp. The @@ -8247,6 +9491,99 @@ func (s *PortMapping) SetProtocol(v string) *PortMapping { return s } +type PutAccountSettingInput struct { + _ struct{} `type:"structure"` + + // The resource name for which to enable the new format. If serviceLongArnFormat + // is specified, the ARN for your Amazon ECS services is affected. If taskLongArnFormat + // is specified, the ARN and resource ID for your Amazon ECS tasks is affected. + // If containerInstanceLongArnFormat is specified, the ARN and resource ID for + // your Amazon ECS container instances is affected. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true" enum:"SettingName"` + + // The ARN of the principal, which can be an IAM user, IAM role, or the root + // user. If you specify the root user, it modifies the ARN and resource ID format + // for all IAM users, IAM roles, and the root user of the account unless an + // IAM user or role explicitly overrides these settings for themselves. If this + // field is omitted, the setting are changed only for the authenticated user. + PrincipalArn *string `locationName:"principalArn" type:"string"` + + // The account setting value for the specified principal ARN. Accepted values + // are enabled and disabled. + // + // Value is a required field + Value *string `locationName:"value" type:"string" required:"true"` +} + +// String returns the string representation +func (s PutAccountSettingInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutAccountSettingInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutAccountSettingInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutAccountSettingInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *PutAccountSettingInput) SetName(v string) *PutAccountSettingInput { + s.Name = &v + return s +} + +// SetPrincipalArn sets the PrincipalArn field's value. +func (s *PutAccountSettingInput) SetPrincipalArn(v string) *PutAccountSettingInput { + s.PrincipalArn = &v + return s +} + +// SetValue sets the Value field's value. +func (s *PutAccountSettingInput) SetValue(v string) *PutAccountSettingInput { + s.Value = &v + return s +} + +type PutAccountSettingOutput struct { + _ struct{} `type:"structure"` + + // The current account setting for a resource. + Setting *Setting `locationName:"setting" type:"structure"` +} + +// String returns the string representation +func (s PutAccountSettingOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutAccountSettingOutput) GoString() string { + return s.String() +} + +// SetSetting sets the Setting field's value. +func (s *PutAccountSettingOutput) SetSetting(v *Setting) *PutAccountSettingOutput { + s.Setting = v + return s +} + type PutAttributesInput struct { _ struct{} `type:"structure"` @@ -8354,6 +9691,12 @@ type RegisterContainerInstanceInput struct { // curl http://169.254.169.254/latest/dynamic/instance-identity/signature/ InstanceIdentityDocumentSignature *string `locationName:"instanceIdentityDocumentSignature" type:"string"` + // The metadata that you apply to the container instance to help you categorize + // and organize them. Each tag consists of a key and an optional value, both + // of which you define. Tag keys can have a maximum character length of 128 + // characters, and tag values can have a maximum length of 256 characters. + Tags []*Tag `locationName:"tags" type:"list"` + // The resources available on the instance. TotalResources []*Resource `locationName:"totalResources" type:"list"` @@ -8385,6 +9728,16 @@ func (s *RegisterContainerInstanceInput) Validate() error { } } } + 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 @@ -8422,6 +9775,12 @@ func (s *RegisterContainerInstanceInput) SetInstanceIdentityDocumentSignature(v return s } +// SetTags sets the Tags field's value. +func (s *RegisterContainerInstanceInput) SetTags(v []*Tag) *RegisterContainerInstanceInput { + s.Tags = v + return s +} + // SetTotalResources sets the TotalResources field's value. func (s *RegisterContainerInstanceInput) SetTotalResources(v []*Resource) *RegisterContainerInstanceInput { s.TotalResources = v @@ -8474,12 +9833,12 @@ type RegisterTaskDefinitionInput struct { // Task-level CPU and memory parameters are ignored for Windows containers. // We recommend specifying container-level resources for Windows containers. // - // If using the EC2 launch type, this field is optional. Supported values are - // between 128 CPU units (0.125 vCPUs) and 10240 CPU units (10 vCPUs). + // If you are using the EC2 launch type, this field is optional. Supported values + // are between 128 CPU units (0.125 vCPUs) and 10240 CPU units (10 vCPUs). // - // If using the Fargate launch type, this field is required and you must use - // one of the following values, which determines your range of supported values - // for the memory parameter: + // If you are using the Fargate launch type, this field is required and you + // must use one of the following values, which determines your range of supported + // values for the memory parameter: // // * 256 (.25 vCPU) - Available memory values: 512 (0.5 GB), 1024 (1 GB), // 2048 (2 GB) @@ -8509,6 +9868,37 @@ type RegisterTaskDefinitionInput struct { // Family is a required field Family *string `locationName:"family" type:"string" required:"true"` + // The IPC resource namespace to use for the containers in the task. The valid + // values are host, task, or none. If host is specified, then all containers + // within the tasks that specified the host IPC mode on the same container instance + // share the same IPC resources with the host Amazon EC2 instance. If task is + // specified, all containers within the specified task share the same IPC resources. + // If none is specified, then IPC resources within the containers of a task + // are private and not shared with other containers in a task or on the container + // instance. If no value is specified, then the IPC resource namespace sharing + // depends on the Docker daemon setting on the container instance. For more + // information, see IPC settings (https://docs.docker.com/engine/reference/run/#ipc-settings---ipc) + // in the Docker run reference. + // + // If the host IPC mode is used, be aware that there is a heightened risk of + // undesired IPC namespace expose. For more information, see Docker security + // (https://docs.docker.com/engine/security/security/). + // + // If you are setting namespaced kernel parameters using systemControls for + // the containers in the task, the following will apply to your IPC resource + // namespace. For more information, see System Controls (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html) + // in the Amazon Elastic Container Service Developer Guide. + // + // * For tasks that use the host IPC mode, IPC namespace related systemControls + // are not supported. + // + // * For tasks that use the task IPC mode, IPC namespace related systemControls + // will apply to all containers within a task. + // + // This parameter is not supported for Windows containers or tasks using the + // Fargate launch type. + IpcMode *string `locationName:"ipcMode" type:"string" enum:"IpcMode"` + // The amount of memory (in MiB) used by the task. It can be expressed as an // integer using MiB, for example 1024, or as a string using GB, for example // 1GB or 1 GB, in a task definition. String values are converted to an integer @@ -8541,45 +9931,73 @@ type RegisterTaskDefinitionInput struct { // The Docker networking mode to use for the containers in the task. The valid // values are none, bridge, awsvpc, and host. The default Docker network mode - // is bridge. If using the Fargate launch type, the awsvpc network mode is required. - // If using the EC2 launch type, any network mode can be used. If the network - // mode is set to none, you can't specify port mappings in your container definitions, - // and the task's containers do not have external connectivity. The host and - // awsvpc network modes offer the highest networking performance for containers - // because they use the EC2 network stack instead of the virtualized network - // stack provided by the bridge mode. + // is bridge. If you are using the Fargate launch type, the awsvpc network mode + // is required. If you are using the EC2 launch type, any network mode can be + // used. If the network mode is set to none, you cannot specify port mappings + // in your container definitions, and the tasks containers do not have external + // connectivity. The host and awsvpc network modes offer the highest networking + // performance for containers because they use the EC2 network stack instead + // of the virtualized network stack provided by the bridge mode. // // With the host and awsvpc network modes, exposed container ports are mapped // directly to the corresponding host port (for the host network mode) or the // attached elastic network interface port (for the awsvpc network mode), so // you cannot take advantage of dynamic host port mappings. // - // If the network mode is awsvpc, the task is allocated an Elastic Network Interface, - // and you must specify a NetworkConfiguration when you create a service or - // run a task with the task definition. For more information, see Task Networking + // If the network mode is awsvpc, the task is allocated an elastic network interface, + // and you must specify a NetworkConfiguration value when you create a service + // or run a task with the task definition. For more information, see Task Networking // (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html) // in the Amazon Elastic Container Service Developer Guide. // - // If the network mode is host, you can't run multiple instantiations of the + // Currently, only Amazon ECS-optimized AMIs, other Amazon Linux variants with + // the ecs-init package, or AWS Fargate infrastructure support the awsvpc network + // mode. + // + // If the network mode is host, you cannot run multiple instantiations of the // same task on a single container instance when port mappings are used. // // Docker for Windows uses different network modes than Docker for Linux. When // you register a task definition with Windows containers, you must not specify - // a network mode. + // a network mode. If you use the console to register a task definition with + // Windows containers, you must choose the network mode object. // // For more information, see Network settings (https://docs.docker.com/engine/reference/run/#network-settings) // in the Docker run reference. NetworkMode *string `locationName:"networkMode" type:"string" enum:"NetworkMode"` + // The process namespace to use for the containers in the task. The valid values + // are host or task. If host is specified, then all containers within the tasks + // that specified the host PID mode on the same container instance share the + // same IPC resources with the host Amazon EC2 instance. If task is specified, + // all containers within the specified task share the same process namespace. + // If no value is specified, the default is a private namespace. For more information, + // see PID settings (https://docs.docker.com/engine/reference/run/#pid-settings---pid) + // in the Docker run reference. + // + // If the host PID mode is used, be aware that there is a heightened risk of + // undesired process namespace expose. For more information, see Docker security + // (https://docs.docker.com/engine/security/security/). + // + // This parameter is not supported for Windows containers or tasks using the + // Fargate launch type. + PidMode *string `locationName:"pidMode" type:"string" enum:"PidMode"` + // An array of placement constraint objects to use for the task. You can specify // a maximum of 10 constraints per task (this limit includes constraints in - // the task definition and those specified at run time). + // the task definition and those specified at runtime). PlacementConstraints []*TaskDefinitionPlacementConstraint `locationName:"placementConstraints" type:"list"` // The launch type required by the task. If no value is specified, it defaults // to EC2. RequiresCompatibilities []*string `locationName:"requiresCompatibilities" type:"list"` + // The metadata that you apply to the task definition to help you categorize + // and organize them. Each tag consists of a key and an optional value, both + // of which you define. Tag keys can have a maximum character length of 128 + // characters, and tag values can have a maximum length of 256 characters. + Tags []*Tag `locationName:"tags" type:"list"` + // The short name or full Amazon Resource Name (ARN) of the IAM role that containers // in this task can assume. All containers in this task are granted the permissions // that are specified in this role. For more information, see IAM Roles for @@ -8621,6 +10039,16 @@ func (s *RegisterTaskDefinitionInput) Validate() error { } } } + 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 @@ -8652,6 +10080,12 @@ func (s *RegisterTaskDefinitionInput) SetFamily(v string) *RegisterTaskDefinitio return s } +// SetIpcMode sets the IpcMode field's value. +func (s *RegisterTaskDefinitionInput) SetIpcMode(v string) *RegisterTaskDefinitionInput { + s.IpcMode = &v + return s +} + // SetMemory sets the Memory field's value. func (s *RegisterTaskDefinitionInput) SetMemory(v string) *RegisterTaskDefinitionInput { s.Memory = &v @@ -8664,6 +10098,12 @@ func (s *RegisterTaskDefinitionInput) SetNetworkMode(v string) *RegisterTaskDefi return s } +// SetPidMode sets the PidMode field's value. +func (s *RegisterTaskDefinitionInput) SetPidMode(v string) *RegisterTaskDefinitionInput { + s.PidMode = &v + return s +} + // SetPlacementConstraints sets the PlacementConstraints field's value. func (s *RegisterTaskDefinitionInput) SetPlacementConstraints(v []*TaskDefinitionPlacementConstraint) *RegisterTaskDefinitionInput { s.PlacementConstraints = v @@ -8676,7 +10116,13 @@ func (s *RegisterTaskDefinitionInput) SetRequiresCompatibilities(v []*string) *R return s } -// SetTaskRoleArn sets the TaskRoleArn field's value. +// SetTags sets the Tags field's value. +func (s *RegisterTaskDefinitionInput) SetTags(v []*Tag) *RegisterTaskDefinitionInput { + s.Tags = v + return s +} + +// SetTaskRoleArn sets the TaskRoleArn field's value. func (s *RegisterTaskDefinitionInput) SetTaskRoleArn(v string) *RegisterTaskDefinitionInput { s.TaskRoleArn = &v return s @@ -8691,6 +10137,9 @@ func (s *RegisterTaskDefinitionInput) SetVolumes(v []*Volume) *RegisterTaskDefin type RegisterTaskDefinitionOutput struct { _ struct{} `type:"structure"` + // The list of tags associated with the task definition. + Tags []*Tag `locationName:"tags" type:"list"` + // The full description of the registered task definition. TaskDefinition *TaskDefinition `locationName:"taskDefinition" type:"structure"` } @@ -8705,6 +10154,12 @@ func (s RegisterTaskDefinitionOutput) GoString() string { return s.String() } +// SetTags sets the Tags field's value. +func (s *RegisterTaskDefinitionOutput) SetTags(v []*Tag) *RegisterTaskDefinitionOutput { + s.Tags = v + return s +} + // SetTaskDefinition sets the TaskDefinition field's value. func (s *RegisterTaskDefinitionOutput) SetTaskDefinition(v *TaskDefinition) *RegisterTaskDefinitionOutput { s.TaskDefinition = v @@ -8715,8 +10170,13 @@ func (s *RegisterTaskDefinitionOutput) SetTaskDefinition(v *TaskDefinition) *Reg type RepositoryCredentials struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) or name of the secret containing the private - // repository credentials. + // The Amazon Resource Name (ARN) of the secret containing the private repository + // credentials. + // + // When you are using the Amazon ECS API, AWS CLI, or AWS SDK, if the secret + // exists in the same Region as the task that you are launching then you can + // use either the full ARN or the name of the secret. When you are using the + // AWS Management Console, you must specify the full ARN of the secret. // // CredentialsParameter is a required field CredentialsParameter *string `locationName:"credentialsParameter" type:"string" required:"true"` @@ -8836,16 +10296,23 @@ type RunTaskInput struct { // You can specify up to 10 tasks per call. Count *int64 `locationName:"count" type:"integer"` + // Specifies whether to enable Amazon ECS managed tags for the task. For more + // information, see Tagging Your Amazon ECS Resources (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html) + // in the Amazon Elastic Container Service Developer Guide. + EnableECSManagedTags *bool `locationName:"enableECSManagedTags" type:"boolean"` + // The name of the task group to associate with the task. The default value // is the family name of the task definition (for example, family:my-family-name). Group *string `locationName:"group" type:"string"` - // The launch type on which to run your task. + // The launch type on which to run your task. For more information, see Amazon + // ECS Launch Types (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) + // in the Amazon Elastic Container Service Developer Guide. LaunchType *string `locationName:"launchType" type:"string" enum:"LaunchType"` // The network configuration for the task. This parameter is required for task - // definitions that use the awsvpc network mode to receive their own Elastic - // Network Interface, and it is not supported for other network modes. For more + // definitions that use the awsvpc network mode to receive their own elastic + // network interface, and it is not supported for other network modes. For more // information, see Task Networking (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html) // in the Amazon Elastic Container Service Developer Guide. NetworkConfiguration *NetworkConfiguration `locationName:"networkConfiguration" type:"structure"` @@ -8864,18 +10331,25 @@ type RunTaskInput struct { // An array of placement constraint objects to use for the task. You can specify // up to 10 constraints per task (including constraints in the task definition - // and those specified at run time). + // and those specified at runtime). PlacementConstraints []*PlacementConstraint `locationName:"placementConstraints" type:"list"` // The placement strategy objects to use for the task. You can specify a maximum // of five strategy rules per task. PlacementStrategy []*PlacementStrategy `locationName:"placementStrategy" type:"list"` - // The platform version on which to run your task. If one is not specified, - // the latest version is used by default. + // The platform version the task should run. A platform version is only specified + // for tasks using the Fargate launch type. If one is not specified, the LATEST + // platform version is used by default. For more information, see AWS Fargate + // Platform Versions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) + // in the Amazon Elastic Container Service Developer Guide. PlatformVersion *string `locationName:"platformVersion" type:"string"` - // An optional tag specified when a task is started. For example if you automatically + // Specifies whether to propagate the tags from the task definition or the service + // to the task. If no value is specified, the tags are not propagated. + PropagateTags *string `locationName:"propagateTags" type:"string" enum:"PropagateTags"` + + // An optional tag specified when a task is started. For example, if you automatically // trigger a task to run a batch process job, you could apply a unique identifier // for that job to your task with the startedBy parameter. You can then identify // which tasks belong to that job by filtering the results of a ListTasks call @@ -8886,6 +10360,12 @@ type RunTaskInput struct { // contains the deployment ID of the service that starts it. StartedBy *string `locationName:"startedBy" type:"string"` + // The metadata that you apply to the task to help you categorize and organize + // them. Each tag consists of a key and an optional value, both of which you + // define. Tag keys can have a maximum character length of 128 characters, and + // tag values can have a maximum length of 256 characters. + Tags []*Tag `locationName:"tags" type:"list"` + // The family and revision (family:revision) or full ARN of the task definition // to run. If a revision is not specified, the latest ACTIVE revision is used. // @@ -8914,6 +10394,16 @@ func (s *RunTaskInput) Validate() error { invalidParams.AddNested("NetworkConfiguration", err.(request.ErrInvalidParams)) } } + 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 @@ -8933,6 +10423,12 @@ func (s *RunTaskInput) SetCount(v int64) *RunTaskInput { return s } +// SetEnableECSManagedTags sets the EnableECSManagedTags field's value. +func (s *RunTaskInput) SetEnableECSManagedTags(v bool) *RunTaskInput { + s.EnableECSManagedTags = &v + return s +} + // SetGroup sets the Group field's value. func (s *RunTaskInput) SetGroup(v string) *RunTaskInput { s.Group = &v @@ -8975,12 +10471,24 @@ func (s *RunTaskInput) SetPlatformVersion(v string) *RunTaskInput { return s } +// SetPropagateTags sets the PropagateTags field's value. +func (s *RunTaskInput) SetPropagateTags(v string) *RunTaskInput { + s.PropagateTags = &v + return s +} + // SetStartedBy sets the StartedBy field's value. func (s *RunTaskInput) SetStartedBy(v string) *RunTaskInput { s.StartedBy = &v return s } +// SetTags sets the Tags field's value. +func (s *RunTaskInput) SetTags(v []*Tag) *RunTaskInput { + s.Tags = v + return s +} + // SetTaskDefinition sets the TaskDefinition field's value. func (s *RunTaskInput) SetTaskDefinition(v string) *RunTaskInput { s.TaskDefinition = &v @@ -9020,6 +10528,96 @@ func (s *RunTaskOutput) SetTasks(v []*Task) *RunTaskOutput { return s } +// A floating-point percentage of the desired number of tasks to place and keep +// running in the service. This is used when a service uses the CODE_DEPLOY +// deployment controller type. +type Scale struct { + _ struct{} `type:"structure"` + + // The unit of measure for the scale value. + Unit *string `locationName:"unit" type:"string" enum:"ScaleUnit"` + + // The value, specified as a percent total of a service's desiredCount, to scale + // the task set. + Value *float64 `locationName:"value" type:"double"` +} + +// String returns the string representation +func (s Scale) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Scale) GoString() string { + return s.String() +} + +// SetUnit sets the Unit field's value. +func (s *Scale) SetUnit(v string) *Scale { + s.Unit = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Scale) SetValue(v float64) *Scale { + s.Value = &v + return s +} + +// An object representing the secret to expose to your container. +type Secret struct { + _ struct{} `type:"structure"` + + // The value to set as the environment variable on the container. + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` + + // The secret to expose to the container. Supported values are either the full + // ARN or the name of the parameter in the AWS Systems Manager Parameter Store. + // + // ValueFrom is a required field + ValueFrom *string `locationName:"valueFrom" type:"string" required:"true"` +} + +// String returns the string representation +func (s Secret) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Secret) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Secret) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Secret"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.ValueFrom == nil { + invalidParams.Add(request.NewErrParamRequired("ValueFrom")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *Secret) SetName(v string) *Secret { + s.Name = &v + return s +} + +// SetValueFrom sets the ValueFrom field's value. +func (s *Secret) SetValueFrom(v string) *Secret { + s.ValueFrom = &v + return s +} + // Details on a service within a cluster type Service struct { _ struct{} `type:"structure"` @@ -9027,13 +10625,19 @@ type Service struct { // The Amazon Resource Name (ARN) of the cluster that hosts the service. ClusterArn *string `locationName:"clusterArn" type:"string"` - // The Unix time stamp for when the service was created. + // The Unix timestamp for when the service was created. CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` + // The principal that created the service. + CreatedBy *string `locationName:"createdBy" type:"string"` + // Optional deployment parameters that control how many tasks run during the // deployment and the ordering of stopping and starting tasks. DeploymentConfiguration *DeploymentConfiguration `locationName:"deploymentConfiguration" type:"structure"` + // The deployment controller type the service is using. + DeploymentController *DeploymentController `locationName:"deploymentController" type:"structure"` + // The current state of deployments for the service. Deployments []*Deployment `locationName:"deployments" type:"list"` @@ -9042,6 +10646,11 @@ type Service struct { // CreateService, and it can be modified with UpdateService. DesiredCount *int64 `locationName:"desiredCount" type:"integer"` + // Specifies whether to enable Amazon ECS managed tags for the tasks in the + // service. For more information, see Tagging Your Amazon ECS Resources (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html) + // in the Amazon Elastic Container Service Developer Guide. + EnableECSManagedTags *bool `locationName:"enableECSManagedTags" type:"boolean"` + // The event stream for your service. A maximum of 100 of the latest events // are displayed. Events []*ServiceEvent `locationName:"events" type:"list"` @@ -9051,7 +10660,9 @@ type Service struct { // started. HealthCheckGracePeriodSeconds *int64 `locationName:"healthCheckGracePeriodSeconds" type:"integer"` - // The launch type on which your service is running. + // The launch type on which your service is running. For more information, see + // Amazon ECS Launch Types (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) + // in the Amazon Elastic Container Service Developer Guide. LaunchType *string `locationName:"launchType" type:"string" enum:"LaunchType"` // A list of Elastic Load Balancing load balancer objects, containing the load @@ -9060,10 +10671,10 @@ type Service struct { // // Services with tasks that use the awsvpc network mode (for example, those // with the Fargate launch type) only support Application Load Balancers and - // Network Load Balancers; Classic Load Balancers are not supported. Also, when + // Network Load Balancers. Classic Load Balancers are not supported. Also, when // you create any target groups for these services, you must choose ip as the - // target type, not instance, because tasks that use the awsvpc network mode - // are associated with an elastic network interface, not an Amazon EC2 instance. + // target type, not instance. Tasks that use the awsvpc network mode are associated + // with an elastic network interface, not an Amazon EC2 instance. LoadBalancers []*LoadBalancer `locationName:"loadBalancers" type:"list"` // The VPC subnet and security group configuration for tasks that receive their @@ -9079,11 +10690,17 @@ type Service struct { // The placement strategy that determines how tasks for the service are placed. PlacementStrategy []*PlacementStrategy `locationName:"placementStrategy" type:"list"` - // The platform version on which your task is running. For more information, - // see AWS Fargate Platform Versions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) + // The platform version on which your tasks in the service are running. A platform + // version is only specified for tasks using the Fargate launch type. If one + // is not specified, the LATEST platform version is used by default. For more + // information, see AWS Fargate Platform Versions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) // in the Amazon Elastic Container Service Developer Guide. PlatformVersion *string `locationName:"platformVersion" type:"string"` + // Specifies whether to propagate the tags from the task definition or the service + // to the task. If no value is specified, the tags are not propagated. + PropagateTags *string `locationName:"propagateTags" type:"string" enum:"PropagateTags"` + // The ARN of the IAM role associated with the service that allows the Amazon // ECS container agent to register container instances with an Elastic Load // Balancing load balancer. @@ -9093,7 +10710,7 @@ type Service struct { RunningCount *int64 `locationName:"runningCount" type:"integer"` // The scheduling strategy to use for the service. For more information, see - // Services (http://docs.aws.amazon.com/AmazonECS/latest/developerguideecs_services.html). + // Services (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html). // // There are two service scheduler strategies available: // @@ -9103,8 +10720,8 @@ type Service struct { // and constraints to customize task placement decisions. // // * DAEMON-The daemon scheduling strategy deploys exactly one task on each - // container instance in your cluster. When using this strategy, do not specify - // a desired number of tasks or any task placement strategies. + // container instance in your cluster. When you are using this strategy, + // do not specify a desired number of tasks or any task placement strategies. // // Fargate tasks do not support the DAEMON scheduling strategy. SchedulingStrategy *string `locationName:"schedulingStrategy" type:"string" enum:"SchedulingStrategy"` @@ -9125,10 +10742,21 @@ type Service struct { // The status of the service. The valid values are ACTIVE, DRAINING, or INACTIVE. Status *string `locationName:"status" type:"string"` + // The metadata that you apply to the service to help you categorize and organize + // them. Each tag consists of a key and an optional value, both of which you + // define. Tag keys can have a maximum character length of 128 characters, and + // tag values can have a maximum length of 256 characters. + Tags []*Tag `locationName:"tags" type:"list"` + // The task definition to use for tasks in the service. This value is specified // when the service is created with CreateService, and it can be modified with // UpdateService. TaskDefinition *string `locationName:"taskDefinition" type:"string"` + + // Information about a set of Amazon ECS tasks in an AWS CodeDeploy deployment. + // An Amazon ECS task set includes details such as the desired number of tasks, + // how many tasks are running, and whether the task set serves production traffic. + TaskSets []*TaskSet `locationName:"taskSets" type:"list"` } // String returns the string representation @@ -9153,12 +10781,24 @@ func (s *Service) SetCreatedAt(v time.Time) *Service { return s } +// SetCreatedBy sets the CreatedBy field's value. +func (s *Service) SetCreatedBy(v string) *Service { + s.CreatedBy = &v + return s +} + // SetDeploymentConfiguration sets the DeploymentConfiguration field's value. func (s *Service) SetDeploymentConfiguration(v *DeploymentConfiguration) *Service { s.DeploymentConfiguration = v return s } +// SetDeploymentController sets the DeploymentController field's value. +func (s *Service) SetDeploymentController(v *DeploymentController) *Service { + s.DeploymentController = v + return s +} + // SetDeployments sets the Deployments field's value. func (s *Service) SetDeployments(v []*Deployment) *Service { s.Deployments = v @@ -9171,6 +10811,12 @@ func (s *Service) SetDesiredCount(v int64) *Service { return s } +// SetEnableECSManagedTags sets the EnableECSManagedTags field's value. +func (s *Service) SetEnableECSManagedTags(v bool) *Service { + s.EnableECSManagedTags = &v + return s +} + // SetEvents sets the Events field's value. func (s *Service) SetEvents(v []*ServiceEvent) *Service { s.Events = v @@ -9225,6 +10871,12 @@ func (s *Service) SetPlatformVersion(v string) *Service { return s } +// SetPropagateTags sets the PropagateTags field's value. +func (s *Service) SetPropagateTags(v string) *Service { + s.PropagateTags = &v + return s +} + // SetRoleArn sets the RoleArn field's value. func (s *Service) SetRoleArn(v string) *Service { s.RoleArn = &v @@ -9267,17 +10919,29 @@ func (s *Service) SetStatus(v string) *Service { return s } +// SetTags sets the Tags field's value. +func (s *Service) SetTags(v []*Tag) *Service { + s.Tags = v + return s +} + // SetTaskDefinition sets the TaskDefinition field's value. func (s *Service) SetTaskDefinition(v string) *Service { s.TaskDefinition = &v return s } +// SetTaskSets sets the TaskSets field's value. +func (s *Service) SetTaskSets(v []*TaskSet) *Service { + s.TaskSets = v + return s +} + // Details on an event associated with a service. type ServiceEvent struct { _ struct{} `type:"structure"` - // The Unix time stamp for when the event was triggered. + // The Unix timestamp for when the event was triggered. CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The ID string of the event. @@ -9338,7 +11002,7 @@ type ServiceRegistry struct { ContainerPort *int64 `locationName:"containerPort" type:"integer"` // The port value used if your service discovery service specified an SRV record. - // This field is required if both the awsvpc network mode and SRV records are + // This field may be used if both the awsvpc network mode and SRV records are // used. Port *int64 `locationName:"port" type:"integer"` @@ -9382,6 +11046,52 @@ func (s *ServiceRegistry) SetRegistryArn(v string) *ServiceRegistry { return s } +// The current account setting for a resource. +type Setting struct { + _ struct{} `type:"structure"` + + // The account resource name. + Name *string `locationName:"name" type:"string" enum:"SettingName"` + + // The ARN of the principal, which can be an IAM user, IAM role, or the root + // user. If this field is omitted, the authenticated user is assumed. + PrincipalArn *string `locationName:"principalArn" type:"string"` + + // The current account setting for the resource name. If enabled, then the resource + // will receive the new Amazon Resource Name (ARN) and resource identifier (ID) + // format. If disabled, then the resource will receive the old Amazon Resource + // Name (ARN) and resource identifier (ID) format. + Value *string `locationName:"value" type:"string"` +} + +// String returns the string representation +func (s Setting) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Setting) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *Setting) SetName(v string) *Setting { + s.Name = &v + return s +} + +// SetPrincipalArn sets the PrincipalArn field's value. +func (s *Setting) SetPrincipalArn(v string) *Setting { + s.PrincipalArn = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Setting) SetValue(v string) *Setting { + s.Value = &v + return s +} + type StartTaskInput struct { _ struct{} `type:"structure"` @@ -9397,6 +11107,11 @@ type StartTaskInput struct { // ContainerInstances is a required field ContainerInstances []*string `locationName:"containerInstances" type:"list" required:"true"` + // Specifies whether to enable Amazon ECS managed tags for the task. For more + // information, see Tagging Your Amazon ECS Resources (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html) + // in the Amazon Elastic Container Service Developer Guide. + EnableECSManagedTags *bool `locationName:"enableECSManagedTags" type:"boolean"` + // The name of the task group to associate with the task. The default value // is the family name of the task definition (for example, family:my-family-name). Group *string `locationName:"group" type:"string"` @@ -9417,7 +11132,11 @@ type StartTaskInput struct { // the JSON formatting characters of the override structure. Overrides *TaskOverride `locationName:"overrides" type:"structure"` - // An optional tag specified when a task is started. For example if you automatically + // Specifies whether to propagate the tags from the task definition or the service + // to the task. If no value is specified, the tags are not propagated. + PropagateTags *string `locationName:"propagateTags" type:"string" enum:"PropagateTags"` + + // An optional tag specified when a task is started. For example, if you automatically // trigger a task to run a batch process job, you could apply a unique identifier // for that job to your task with the startedBy parameter. You can then identify // which tasks belong to that job by filtering the results of a ListTasks call @@ -9428,6 +11147,12 @@ type StartTaskInput struct { // contains the deployment ID of the service that starts it. StartedBy *string `locationName:"startedBy" type:"string"` + // The metadata that you apply to the task to help you categorize and organize + // them. Each tag consists of a key and an optional value, both of which you + // define. Tag keys can have a maximum character length of 128 characters, and + // tag values can have a maximum length of 256 characters. + Tags []*Tag `locationName:"tags" type:"list"` + // The family and revision (family:revision) or full ARN of the task definition // to start. If a revision is not specified, the latest ACTIVE revision is used. // @@ -9459,6 +11184,16 @@ func (s *StartTaskInput) Validate() error { invalidParams.AddNested("NetworkConfiguration", err.(request.ErrInvalidParams)) } } + 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 @@ -9478,6 +11213,12 @@ func (s *StartTaskInput) SetContainerInstances(v []*string) *StartTaskInput { return s } +// SetEnableECSManagedTags sets the EnableECSManagedTags field's value. +func (s *StartTaskInput) SetEnableECSManagedTags(v bool) *StartTaskInput { + s.EnableECSManagedTags = &v + return s +} + // SetGroup sets the Group field's value. func (s *StartTaskInput) SetGroup(v string) *StartTaskInput { s.Group = &v @@ -9496,12 +11237,24 @@ func (s *StartTaskInput) SetOverrides(v *TaskOverride) *StartTaskInput { return s } +// SetPropagateTags sets the PropagateTags field's value. +func (s *StartTaskInput) SetPropagateTags(v string) *StartTaskInput { + s.PropagateTags = &v + return s +} + // SetStartedBy sets the StartedBy field's value. func (s *StartTaskInput) SetStartedBy(v string) *StartTaskInput { s.StartedBy = &v return s } +// SetTags sets the Tags field's value. +func (s *StartTaskInput) SetTags(v []*Tag) *StartTaskInput { + s.Tags = v + return s +} + // SetTaskDefinition sets the TaskDefinition field's value. func (s *StartTaskInput) SetTaskDefinition(v string) *StartTaskInput { s.TaskDefinition = &v @@ -9739,13 +11492,13 @@ type SubmitTaskStateChangeInput struct { // Any containers associated with the state change request. Containers []*ContainerStateChange `locationName:"containers" type:"list"` - // The Unix time stamp for when the task execution stopped. + // The Unix timestamp for when the task execution stopped. ExecutionStoppedAt *time.Time `locationName:"executionStoppedAt" type:"timestamp"` - // The Unix time stamp for when the container image pull began. + // The Unix timestamp for when the container image pull began. PullStartedAt *time.Time `locationName:"pullStartedAt" type:"timestamp"` - // The Unix time stamp for when the container image pull completed. + // The Unix timestamp for when the container image pull completed. PullStoppedAt *time.Time `locationName:"pullStoppedAt" type:"timestamp"` // The reason for the state change request. @@ -9865,11 +11618,191 @@ func (s *SubmitTaskStateChangeOutput) SetAcknowledgment(v string) *SubmitTaskSta return s } +// A list of namespaced kernel parameters to set in the container. This parameter +// maps to Sysctls in the Create a container (https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) +// section of the Docker Remote API (https://docs.docker.com/engine/api/v1.35/) +// and the --sysctl option to docker run (https://docs.docker.com/engine/reference/run/). +// +// It is not recommended that you specify network-related systemControls parameters +// for multiple containers in a single task that also uses either the awsvpc +// or host network mode for the following reasons: +// +// * For tasks that use the awsvpc network mode, if you set systemControls +// for any container, it applies to all containers in the task. If you set +// different systemControls for multiple containers in a single task, the +// container that is started last determines which systemControls take effect. +// +// * For tasks that use the host network mode, the systemControls parameter +// applies to the container instance's kernel parameter as well as that of +// all containers of any tasks running on that container instance. +type SystemControl struct { + _ struct{} `type:"structure"` + + // The namespaced kernel parameter for which to set a value. + Namespace *string `locationName:"namespace" type:"string"` + + // The value for the namespaced kernel parameter specified in namespace. + Value *string `locationName:"value" type:"string"` +} + +// String returns the string representation +func (s SystemControl) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SystemControl) GoString() string { + return s.String() +} + +// SetNamespace sets the Namespace field's value. +func (s *SystemControl) SetNamespace(v string) *SystemControl { + s.Namespace = &v + return s +} + +// SetValue sets the Value field's value. +func (s *SystemControl) SetValue(v string) *SystemControl { + s.Value = &v + return s +} + +// The metadata that you apply to a resource to help you categorize and organize +// them. Each tag consists of a key and an optional value, both of which you +// define. Tag keys can have a maximum character length of 128 characters, and +// tag values can have a maximum length of 256 characters. +type Tag struct { + _ struct{} `type:"structure"` + + // One part of a key-value pair that make up a tag. A key is a general label + // that acts like a category for more specific tag values. + Key *string `locationName:"key" min:"1" type:"string"` + + // The optional part of a key-value pair that make up a tag. A value acts as + // a descriptor within a tag category (key). + Value *string `locationName:"value" type:"string"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Tag) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Tag"} + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource to which to add tags. Currently, + // the supported resources are Amazon ECS tasks, services, task definitions, + // clusters, and container instances. + // + // ResourceArn is a required field + ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` + + // The tags to add to the resource. A tag is an array of key-value pairs. Tag + // keys can have a maximum character length of 128 characters, and tag values + // can have a maximum length of 256 characters. + // + // Tags is a required field + Tags []*Tag `locationName:"tags" type:"list" required:"true"` +} + +// String returns the string representation +func (s TagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + 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 +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { + s.ResourceArn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { + s.Tags = v + return s +} + +type TagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceOutput) GoString() string { + return s.String() +} + // Details on a task in a cluster. type Task struct { _ struct{} `type:"structure"` - // The elastic network adapter associated with the task if the task uses the + // The Elastic Network Adapter associated with the task if the task uses the // awsvpc network mode. Attachments []*Attachment `locationName:"attachments" type:"list"` @@ -9879,7 +11812,7 @@ type Task struct { // The connectivity status of a task. Connectivity *string `locationName:"connectivity" type:"string" enum:"Connectivity"` - // The Unix time stamp for when the task last went into CONNECTED status. + // The Unix timestamp for when the task last went into CONNECTED status. ConnectivityAt *time.Time `locationName:"connectivityAt" type:"timestamp"` // The ARN of the container instances that host the task. @@ -9888,17 +11821,18 @@ type Task struct { // The containers associated with the task. Containers []*Container `locationName:"containers" type:"list"` - // The number of CPU units used by the task. It can be expressed as an integer - // using CPU units, for example 1024, or as a string using vCPUs, for example - // 1 vCPU or 1 vcpu, in a task definition. String values are converted to an - // integer indicating the CPU units when the task definition is registered. + // The number of CPU units used by the task as expressed in a task definition. + // It can be expressed as an integer using CPU units, for example 1024. It can + // also be expressed as a string using vCPUs, for example 1 vCPU or 1 vcpu. + // String values are converted to an integer indicating the CPU units when the + // task definition is registered. // - // If using the EC2 launch type, this field is optional. Supported values are - // between 128 CPU units (0.125 vCPUs) and 10240 CPU units (10 vCPUs). + // If you are using the EC2 launch type, this field is optional. Supported values + // are between 128 CPU units (0.125 vCPUs) and 10240 CPU units (10 vCPUs). // - // If using the Fargate launch type, this field is required and you must use - // one of the following values, which determines your range of supported values - // for the memory parameter: + // If you are using the Fargate launch type, this field is required and you + // must use one of the following values, which determines your range of supported + // values for the memory parameter: // // * 256 (.25 vCPU) - Available memory values: 512 (0.5 GB), 1024 (1 GB), // 2048 (2 GB) @@ -9916,7 +11850,7 @@ type Task struct { // (30 GB) in increments of 1024 (1 GB) Cpu *string `locationName:"cpu" type:"string"` - // The Unix time stamp for when the task was created (the task entered the PENDING + // The Unix timestamp for when the task was created (the task entered the PENDING // state). CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` @@ -9924,7 +11858,7 @@ type Task struct { // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_life_cycle.html). DesiredStatus *string `locationName:"desiredStatus" type:"string"` - // The Unix time stamp for when the task execution stopped. + // The Unix timestamp for when the task execution stopped. ExecutionStoppedAt *time.Time `locationName:"executionStoppedAt" type:"timestamp"` // The name of the task group associated with the task. @@ -9947,19 +11881,22 @@ type Task struct { // (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_life_cycle.html). LastStatus *string `locationName:"lastStatus" type:"string"` - // The launch type on which your task is running. - LaunchType *string `locationName:"launchType" type:"string" enum:"LaunchType"` - - // The amount of memory (in MiB) used by the task. It can be expressed as an - // integer using MiB, for example 1024, or as a string using GB, for example - // 1GB or 1 GB, in a task definition. String values are converted to an integer - // indicating the MiB when the task definition is registered. + // The launch type on which your task is running. For more information, see + // Amazon ECS Launch Types (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) + // in the Amazon Elastic Container Service Developer Guide. + LaunchType *string `locationName:"launchType" type:"string" enum:"LaunchType"` + + // The amount of memory (in MiB) used by the task as expressed in a task definition. + // It can be expressed as an integer using MiB, for example 1024. It can also + // be expressed as a string using GB, for example 1GB or 1 GB. String values + // are converted to an integer indicating the MiB when the task definition is + // registered. // - // If using the EC2 launch type, this field is optional. + // If you are using the EC2 launch type, this field is optional. // - // If using the Fargate launch type, this field is required and you must use - // one of the following values, which determines your range of supported values - // for the cpu parameter: + // If you are using the Fargate launch type, this field is required and you + // must use one of the following values, which determines your range of supported + // values for the cpu parameter: // // * 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu values: 256 (.25 // vCPU) @@ -9980,18 +11917,20 @@ type Task struct { // One or more container overrides. Overrides *TaskOverride `locationName:"overrides" type:"structure"` - // The platform version on which your task is running. For more information, - // see AWS Fargate Platform Versions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) + // The platform version on which your task is running. A platform version is + // only specified for tasks using the Fargate launch type. If one is not specified, + // the LATEST platform version is used by default. For more information, see + // AWS Fargate Platform Versions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) // in the Amazon Elastic Container Service Developer Guide. PlatformVersion *string `locationName:"platformVersion" type:"string"` - // The Unix time stamp for when the container image pull began. + // The Unix timestamp for when the container image pull began. PullStartedAt *time.Time `locationName:"pullStartedAt" type:"timestamp"` - // The Unix time stamp for when the container image pull completed. + // The Unix timestamp for when the container image pull completed. PullStoppedAt *time.Time `locationName:"pullStoppedAt" type:"timestamp"` - // The Unix time stamp for when the task started (the task transitioned from + // The Unix timestamp for when the task started (the task transitioned from // the PENDING state to the RUNNING state). StartedAt *time.Time `locationName:"startedAt" type:"timestamp"` @@ -10000,17 +11939,27 @@ type Task struct { // service that starts it. StartedBy *string `locationName:"startedBy" type:"string"` - // The Unix time stamp for when the task was stopped (the task transitioned - // from the RUNNING state to the STOPPED state). + // The stop code indicating why a task was stopped. The stoppedReason may contain + // additional details. + StopCode *string `locationName:"stopCode" type:"string" enum:"TaskStopCode"` + + // The Unix timestamp for when the task was stopped (the task transitioned from + // the RUNNING state to the STOPPED state). StoppedAt *time.Time `locationName:"stoppedAt" type:"timestamp"` - // The reason the task was stopped. + // The reason that the task was stopped. StoppedReason *string `locationName:"stoppedReason" type:"string"` - // The Unix time stamp for when the task stops (transitions from the RUNNING + // The Unix timestamp for when the task stops (transitions from the RUNNING // state to STOPPED). StoppingAt *time.Time `locationName:"stoppingAt" type:"timestamp"` + // The metadata that you apply to the task to help you categorize and organize + // them. Each tag consists of a key and an optional value, both of which you + // define. Tag keys can have a maximum character length of 128 characters, and + // tag values can have a maximum length of 256 characters. + Tags []*Tag `locationName:"tags" type:"list"` + // The Amazon Resource Name (ARN) of the task. TaskArn *string `locationName:"taskArn" type:"string"` @@ -10020,9 +11969,9 @@ type Task struct { // The version counter for the task. Every time a task experiences a change // that triggers a CloudWatch event, the version counter is incremented. If // you are replicating your Amazon ECS task state with CloudWatch Events, you - // can compare the version of a task reported by the Amazon ECS APIs with the - // version reported in CloudWatch Events for the task (inside the detail object) - // to verify that the version in your event stream is current. + // can compare the version of a task reported by the Amazon ECS API actionss + // with the version reported in CloudWatch Events for the task (inside the detail + // object) to verify that the version in your event stream is current. Version *int64 `locationName:"version" type:"long"` } @@ -10162,6 +12111,12 @@ func (s *Task) SetStartedBy(v string) *Task { return s } +// SetStopCode sets the StopCode field's value. +func (s *Task) SetStopCode(v string) *Task { + s.StopCode = &v + return s +} + // SetStoppedAt sets the StoppedAt field's value. func (s *Task) SetStoppedAt(v time.Time) *Task { s.StoppedAt = &v @@ -10180,6 +12135,12 @@ func (s *Task) SetStoppingAt(v time.Time) *Task { return s } +// SetTags sets the Tags field's value. +func (s *Task) SetTags(v []*Tag) *Task { + s.Tags = v + return s +} + // SetTaskArn sets the TaskArn field's value. func (s *Task) SetTaskArn(v string) *Task { s.TaskArn = &v @@ -10213,10 +12174,11 @@ type TaskDefinition struct { // in the Amazon Elastic Container Service Developer Guide. ContainerDefinitions []*ContainerDefinition `locationName:"containerDefinitions" type:"list"` - // The number of cpu units used by the task. If using the EC2 launch type, this - // field is optional and any value can be used. If using the Fargate launch - // type, this field is required and you must use one of the following values, - // which determines your range of valid values for the memory parameter: + // The number of cpu units used by the task. If you are using the EC2 launch + // type, this field is optional and any value can be used. If you are using + // the Fargate launch type, this field is required and you must use one of the + // following values, which determines your range of valid values for the memory + // parameter: // // * 256 (.25 vCPU) - Available memory values: 512 (0.5 GB), 1024 (1 GB), // 2048 (2 GB) @@ -10241,6 +12203,37 @@ type TaskDefinition struct { // The family of your task definition, used as the definition name. Family *string `locationName:"family" type:"string"` + // The IPC resource namespace to use for the containers in the task. The valid + // values are host, task, or none. If host is specified, then all containers + // within the tasks that specified the host IPC mode on the same container instance + // share the same IPC resources with the host Amazon EC2 instance. If task is + // specified, all containers within the specified task share the same IPC resources. + // If none is specified, then IPC resources within the containers of a task + // are private and not shared with other containers in a task or on the container + // instance. If no value is specified, then the IPC resource namespace sharing + // depends on the Docker daemon setting on the container instance. For more + // information, see IPC settings (https://docs.docker.com/engine/reference/run/#ipc-settings---ipc) + // in the Docker run reference. + // + // If the host IPC mode is used, be aware that there is a heightened risk of + // undesired IPC namespace expose. For more information, see Docker security + // (https://docs.docker.com/engine/security/security/). + // + // If you are setting namespaced kernel parameters using systemControls for + // the containers in the task, the following will apply to your IPC resource + // namespace. For more information, see System Controls (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html) + // in the Amazon Elastic Container Service Developer Guide. + // + // * For tasks that use the host IPC mode, IPC namespace related systemControls + // are not supported. + // + // * For tasks that use the task IPC mode, IPC namespace related systemControls + // will apply to all containers within a task. + // + // This parameter is not supported for Windows containers or tasks using the + // Fargate launch type. + IpcMode *string `locationName:"ipcMode" type:"string" enum:"IpcMode"` + // The amount (in MiB) of memory used by the task. If using the EC2 launch type, // this field is optional and any value can be used. If using the Fargate launch // type, this field is required and you must use one of the following values, @@ -10264,30 +12257,30 @@ type TaskDefinition struct { // The Docker networking mode to use for the containers in the task. The valid // values are none, bridge, awsvpc, and host. The default Docker network mode - // is bridge. If using the Fargate launch type, the awsvpc network mode is required. - // If using the EC2 launch type, any network mode can be used. If the network - // mode is set to none, you can't specify port mappings in your container definitions, - // and the task's containers do not have external connectivity. The host and - // awsvpc network modes offer the highest networking performance for containers - // because they use the EC2 network stack instead of the virtualized network - // stack provided by the bridge mode. + // is bridge. If you are using the Fargate launch type, the awsvpc network mode + // is required. If you are using the EC2 launch type, any network mode can be + // used. If the network mode is set to none, you cannot specify port mappings + // in your container definitions, and the tasks containers do not have external + // connectivity. The host and awsvpc network modes offer the highest networking + // performance for containers because they use the EC2 network stack instead + // of the virtualized network stack provided by the bridge mode. // // With the host and awsvpc network modes, exposed container ports are mapped // directly to the corresponding host port (for the host network mode) or the // attached elastic network interface port (for the awsvpc network mode), so // you cannot take advantage of dynamic host port mappings. // - // If the network mode is awsvpc, the task is allocated an Elastic Network Interface, - // and you must specify a NetworkConfiguration when you create a service or - // run a task with the task definition. For more information, see Task Networking + // If the network mode is awsvpc, the task is allocated an elastic network interface, + // and you must specify a NetworkConfiguration value when you create a service + // or run a task with the task definition. For more information, see Task Networking // (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html) // in the Amazon Elastic Container Service Developer Guide. // - // Currently, only the Amazon ECS-optimized AMI, other Amazon Linux variants - // with the ecs-init package, or AWS Fargate infrastructure support the awsvpc - // network mode. + // Currently, only Amazon ECS-optimized AMIs, other Amazon Linux variants with + // the ecs-init package, or AWS Fargate infrastructure support the awsvpc network + // mode. // - // If the network mode is host, you can't run multiple instantiations of the + // If the network mode is host, you cannot run multiple instantiations of the // same task on a single container instance when port mappings are used. // // Docker for Windows uses different network modes than Docker for Linux. When @@ -10299,22 +12292,40 @@ type TaskDefinition struct { // in the Docker run reference. NetworkMode *string `locationName:"networkMode" type:"string" enum:"NetworkMode"` + // The process namespace to use for the containers in the task. The valid values + // are host or task. If host is specified, then all containers within the tasks + // that specified the host PID mode on the same container instance share the + // same IPC resources with the host Amazon EC2 instance. If task is specified, + // all containers within the specified task share the same process namespace. + // If no value is specified, the default is a private namespace. For more information, + // see PID settings (https://docs.docker.com/engine/reference/run/#pid-settings---pid) + // in the Docker run reference. + // + // If the host PID mode is used, be aware that there is a heightened risk of + // undesired process namespace expose. For more information, see Docker security + // (https://docs.docker.com/engine/security/security/). + // + // This parameter is not supported for Windows containers or tasks using the + // Fargate launch type. + PidMode *string `locationName:"pidMode" type:"string" enum:"PidMode"` + // An array of placement constraint objects to use for tasks. This field is - // not valid if using the Fargate launch type for your task. + // not valid if you are using the Fargate launch type for your task. PlacementConstraints []*TaskDefinitionPlacementConstraint `locationName:"placementConstraints" type:"list"` // The container instance attributes required by your task. This field is not - // valid if using the Fargate launch type for your task. + // valid if you are using the Fargate launch type for your task. RequiresAttributes []*Attribute `locationName:"requiresAttributes" type:"list"` - // The launch type the task is using. + // The launch type that the task is using. RequiresCompatibilities []*string `locationName:"requiresCompatibilities" type:"list"` // The revision of the task in a particular family. The revision is a version // number of a task definition in a family. When you register a task definition - // for the first time, the revision is 1; each time you register a new revision - // of a task definition in the same family, the revision value always increases - // by one (even if you have deregistered previous revisions in this family). + // for the first time, the revision is 1. Each time that you register a new + // revision of a task definition in the same family, the revision value always + // increases by one, even if you have deregistered previous revisions in this + // family. Revision *int64 `locationName:"revision" type:"integer"` // The status of the task definition. @@ -10384,6 +12395,12 @@ func (s *TaskDefinition) SetFamily(v string) *TaskDefinition { return s } +// SetIpcMode sets the IpcMode field's value. +func (s *TaskDefinition) SetIpcMode(v string) *TaskDefinition { + s.IpcMode = &v + return s +} + // SetMemory sets the Memory field's value. func (s *TaskDefinition) SetMemory(v string) *TaskDefinition { s.Memory = &v @@ -10396,6 +12413,12 @@ func (s *TaskDefinition) SetNetworkMode(v string) *TaskDefinition { return s } +// SetPidMode sets the PidMode field's value. +func (s *TaskDefinition) SetPidMode(v string) *TaskDefinition { + s.PidMode = &v + return s +} + // SetPlacementConstraints sets the PlacementConstraints field's value. func (s *TaskDefinition) SetPlacementConstraints(v []*TaskDefinitionPlacementConstraint) *TaskDefinition { s.PlacementConstraints = v @@ -10532,6 +12555,218 @@ func (s *TaskOverride) SetTaskRoleArn(v string) *TaskOverride { return s } +// Information about a set of Amazon ECS tasks in an AWS CodeDeploy deployment. +// An Amazon ECS task set includes details such as the desired number of tasks, +// how many tasks are running, and whether the task set serves production traffic. +type TaskSet struct { + _ struct{} `type:"structure"` + + // The computed desired count for the task set. This is calculated by multiplying + // the service's desiredCount by the task set's scale percentage. + ComputedDesiredCount *int64 `locationName:"computedDesiredCount" type:"integer"` + + // The Unix timestamp for when the task set was created. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` + + // The deployment ID of the AWS CodeDeploy deployment. + ExternalId *string `locationName:"externalId" type:"string"` + + // The ID of the task set. + Id *string `locationName:"id" type:"string"` + + // The launch type the tasks in the task set are using. For more information, + // see Amazon ECS Launch Types (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) + // in the Amazon Elastic Container Service Developer Guide. + LaunchType *string `locationName:"launchType" type:"string" enum:"LaunchType"` + + // Details on a load balancer that is used with a task set. + LoadBalancers []*LoadBalancer `locationName:"loadBalancers" type:"list"` + + // The network configuration for the task set. + NetworkConfiguration *NetworkConfiguration `locationName:"networkConfiguration" type:"structure"` + + // The number of tasks in the task set that are in the PENDING status during + // a deployment. A task in the PENDING state is preparing to enter the RUNNING + // state. A task set enters the PENDING status when it launches for the first + // time, or when it is restarted after being in the STOPPED state. + PendingCount *int64 `locationName:"pendingCount" type:"integer"` + + // The platform version on which the tasks in the task set are running. A platform + // version is only specified for tasks using the Fargate launch type. If one + // is not specified, the LATEST platform version is used by default. For more + // information, see AWS Fargate Platform Versions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) + // in the Amazon Elastic Container Service Developer Guide. + PlatformVersion *string `locationName:"platformVersion" type:"string"` + + // The number of tasks in the task set that are in the RUNNING status during + // a deployment. A task in the RUNNING state is running and ready for use. + RunningCount *int64 `locationName:"runningCount" type:"integer"` + + // A floating-point percentage of the desired number of tasks to place and keep + // running in the service. + Scale *Scale `locationName:"scale" type:"structure"` + + // The stability status, which indicates whether the task set has reached a + // steady state. If the following conditions are met, the task set will be in + // STEADY_STATE: + // + // * The task runningCount is equal to the computedDesiredCount. + // + // * The pendingCount is 0. + // + // * There are no tasks running on container instances in the DRAINING status. + // + // * All tasks are reporting a healthy status from the load balancers, service + // discovery, and container health checks. + // + // If any of those conditions are not met, the stability status returns STABILIZING. + StabilityStatus *string `locationName:"stabilityStatus" type:"string" enum:"StabilityStatus"` + + // The Unix timestamp for when the task set stability status was retrieved. + StabilityStatusAt *time.Time `locationName:"stabilityStatusAt" type:"timestamp"` + + // The tag specified when a task set is started. If the task is started by an + // AWS CodeDeploy deployment, then the startedBy parameter is CODE_DEPLOY. + StartedBy *string `locationName:"startedBy" type:"string"` + + // The status of the task set. The following describes each state: + // + // PRIMARYThe task set is serving production traffic. + // + // ACTIVEThe task set is not serving production traffic. + // + // DRAININGThe tasks in the task set are being stopped and their corresponding + // targets are being deregistered from their target group. + Status *string `locationName:"status" type:"string"` + + // The task definition the task set is using. + TaskDefinition *string `locationName:"taskDefinition" type:"string"` + + // The Amazon Resource Name (ARN) of the task set. + TaskSetArn *string `locationName:"taskSetArn" type:"string"` + + // The Unix timestamp for when the task set was last updated. + UpdatedAt *time.Time `locationName:"updatedAt" type:"timestamp"` +} + +// String returns the string representation +func (s TaskSet) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TaskSet) GoString() string { + return s.String() +} + +// SetComputedDesiredCount sets the ComputedDesiredCount field's value. +func (s *TaskSet) SetComputedDesiredCount(v int64) *TaskSet { + s.ComputedDesiredCount = &v + return s +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *TaskSet) SetCreatedAt(v time.Time) *TaskSet { + s.CreatedAt = &v + return s +} + +// SetExternalId sets the ExternalId field's value. +func (s *TaskSet) SetExternalId(v string) *TaskSet { + s.ExternalId = &v + return s +} + +// SetId sets the Id field's value. +func (s *TaskSet) SetId(v string) *TaskSet { + s.Id = &v + return s +} + +// SetLaunchType sets the LaunchType field's value. +func (s *TaskSet) SetLaunchType(v string) *TaskSet { + s.LaunchType = &v + return s +} + +// SetLoadBalancers sets the LoadBalancers field's value. +func (s *TaskSet) SetLoadBalancers(v []*LoadBalancer) *TaskSet { + s.LoadBalancers = v + return s +} + +// SetNetworkConfiguration sets the NetworkConfiguration field's value. +func (s *TaskSet) SetNetworkConfiguration(v *NetworkConfiguration) *TaskSet { + s.NetworkConfiguration = v + return s +} + +// SetPendingCount sets the PendingCount field's value. +func (s *TaskSet) SetPendingCount(v int64) *TaskSet { + s.PendingCount = &v + return s +} + +// SetPlatformVersion sets the PlatformVersion field's value. +func (s *TaskSet) SetPlatformVersion(v string) *TaskSet { + s.PlatformVersion = &v + return s +} + +// SetRunningCount sets the RunningCount field's value. +func (s *TaskSet) SetRunningCount(v int64) *TaskSet { + s.RunningCount = &v + return s +} + +// SetScale sets the Scale field's value. +func (s *TaskSet) SetScale(v *Scale) *TaskSet { + s.Scale = v + return s +} + +// SetStabilityStatus sets the StabilityStatus field's value. +func (s *TaskSet) SetStabilityStatus(v string) *TaskSet { + s.StabilityStatus = &v + return s +} + +// SetStabilityStatusAt sets the StabilityStatusAt field's value. +func (s *TaskSet) SetStabilityStatusAt(v time.Time) *TaskSet { + s.StabilityStatusAt = &v + return s +} + +// SetStartedBy sets the StartedBy field's value. +func (s *TaskSet) SetStartedBy(v string) *TaskSet { + s.StartedBy = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *TaskSet) SetStatus(v string) *TaskSet { + s.Status = &v + return s +} + +// SetTaskDefinition sets the TaskDefinition field's value. +func (s *TaskSet) SetTaskDefinition(v string) *TaskSet { + s.TaskDefinition = &v + return s +} + +// SetTaskSetArn sets the TaskSetArn field's value. +func (s *TaskSet) SetTaskSetArn(v string) *TaskSet { + s.TaskSetArn = &v + return s +} + +// SetUpdatedAt sets the UpdatedAt field's value. +func (s *TaskSet) SetUpdatedAt(v time.Time) *TaskSet { + s.UpdatedAt = &v + return s +} + // The container path, mount options, and size of the tmpfs mount. type Tmpfs struct { _ struct{} `type:"structure"` @@ -10668,6 +12903,74 @@ func (s *Ulimit) SetSoftLimit(v int64) *Ulimit { return s } +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource from which to delete tags. + // Currently, the supported resources are Amazon ECS tasks, services, task definitions, + // clusters, and container instances. + // + // ResourceArn is a required field + ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` + + // The keys of the tags to be removed. + // + // TagKeys is a required field + TagKeys []*string `locationName:"tagKeys" type:"list" required:"true"` +} + +// String returns the string representation +func (s UntagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { + s.ResourceArn = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { + s.TagKeys = v + return s +} + +type UntagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UntagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceOutput) GoString() string { + return s.String() +} + type UpdateContainerAgentInput struct { _ struct{} `type:"structure"` @@ -10864,10 +13167,10 @@ type UpdateServiceInput struct { // has first started. This is only valid if your service is configured to use // a load balancer. If your service's tasks take a while to start and respond // to Elastic Load Balancing health checks, you can specify a health check grace - // period of up to 1,800 seconds during which the ECS service scheduler ignores - // the Elastic Load Balancing health check status. This grace period can prevent - // the ECS service scheduler from marking tasks as unhealthy and stopping them - // before they have time to come up. + // period of up to 1,800 seconds. During that time, the ECS service scheduler + // ignores the Elastic Load Balancing health check status. This grace period + // can prevent the ECS service scheduler from marking tasks as unhealthy and + // stopping them before they have time to come up. HealthCheckGracePeriodSeconds *int64 `locationName:"healthCheckGracePeriodSeconds" type:"integer"` // The network configuration for the service. This parameter is required for @@ -10882,7 +13185,11 @@ type UpdateServiceInput struct { // network configuration, this does not trigger a new service deployment. NetworkConfiguration *NetworkConfiguration `locationName:"networkConfiguration" type:"structure"` - // The platform version that your service should run. + // The platform version on which your tasks in the service are running. A platform + // version is only specified for tasks using the Fargate launch type. If one + // is not specified, the LATEST platform version is used by default. For more + // information, see AWS Fargate Platform Versions (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) + // in the Amazon Elastic Container Service Developer Guide. PlatformVersion *string `locationName:"platformVersion" type:"string"` // The name of the service to update. @@ -11050,21 +13357,23 @@ func (s *VersionInfo) SetDockerVersion(v string) *VersionInfo { // A data volume used in a task definition. For tasks that use a Docker volume, // specify a DockerVolumeConfiguration. For tasks that use a bind mount host // volume, specify a host and optional sourcePath. For more information, see -// Using Data Volumes in Tasks (http://docs.aws.amazon.com/AmazonECS/latest/developerguideusing_data_volumes.html). +// Using Data Volumes in Tasks (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html). type Volume struct { _ struct{} `type:"structure"` - // The configuration for the Docker volume. This parameter is specified when - // using Docker volumes. + // This parameter is specified when you are using Docker volumes. Docker volumes + // are only supported when you are using the EC2 launch type. Windows containers + // only support the use of the local driver. To use bind mounts, specify a host + // instead. DockerVolumeConfiguration *DockerVolumeConfiguration `locationName:"dockerVolumeConfiguration" type:"structure"` - // This parameter is specified when using bind mount host volumes. Bind mount - // host volumes are supported when using either the EC2 or Fargate launch types. - // The contents of the host parameter determine whether your bind mount host - // volume persists on the host container instance and where it is stored. If - // the host parameter is empty, then the Docker daemon assigns a host path for - // your data volume, but the data is not guaranteed to persist after the containers - // associated with it stop running. + // This parameter is specified when you are using bind mount host volumes. Bind + // mount host volumes are supported when you are using either the EC2 or Fargate + // launch types. The contents of the host parameter determine whether your bind + // mount host volume persists on the host container instance and where it is + // stored. If the host parameter is empty, then the Docker daemon assigns a + // host path for your data volume. However, the data is not guaranteed to persist + // after the containers associated with it stop running. // // Windows containers can mount whole directories on the same drive as $env:ProgramData. // Windows containers cannot mount directories on a different drive, and mount @@ -11115,8 +13424,8 @@ type VolumeFrom struct { // value is false. ReadOnly *bool `locationName:"readOnly" type:"boolean"` - // The name of another container within the same task definition to mount volumes - // from. + // The name of another container within the same task definition from which + // to mount volumes. SourceContainer *string `locationName:"sourceContainer" type:"string"` } @@ -11173,6 +13482,9 @@ const ( const ( // ClusterFieldStatistics is a ClusterField enum value ClusterFieldStatistics = "STATISTICS" + + // ClusterFieldTags is a ClusterField enum value + ClusterFieldTags = "TAGS" ) const ( @@ -11191,6 +13503,11 @@ const ( ConnectivityDisconnected = "DISCONNECTED" ) +const ( + // ContainerInstanceFieldTags is a ContainerInstanceField enum value + ContainerInstanceFieldTags = "TAGS" +) + const ( // ContainerInstanceStatusActive is a ContainerInstanceStatus enum value ContainerInstanceStatusActive = "ACTIVE" @@ -11199,6 +13516,14 @@ const ( ContainerInstanceStatusDraining = "DRAINING" ) +const ( + // DeploymentControllerTypeEcs is a DeploymentControllerType enum value + DeploymentControllerTypeEcs = "ECS" + + // DeploymentControllerTypeCodeDeploy is a DeploymentControllerType enum value + DeploymentControllerTypeCodeDeploy = "CODE_DEPLOY" +) + const ( // DesiredStatusRunning is a DesiredStatus enum value DesiredStatusRunning = "RUNNING" @@ -11232,6 +13557,17 @@ const ( HealthStatusUnknown = "UNKNOWN" ) +const ( + // IpcModeHost is a IpcMode enum value + IpcModeHost = "host" + + // IpcModeTask is a IpcMode enum value + IpcModeTask = "task" + + // IpcModeNone is a IpcMode enum value + IpcModeNone = "none" +) + const ( // LaunchTypeEc2 is a LaunchType enum value LaunchTypeEc2 = "EC2" @@ -11277,6 +13613,14 @@ const ( NetworkModeNone = "none" ) +const ( + // PidModeHost is a PidMode enum value + PidModeHost = "host" + + // PidModeTask is a PidMode enum value + PidModeTask = "task" +) + const ( // PlacementConstraintTypeDistinctInstance is a PlacementConstraintType enum value PlacementConstraintTypeDistinctInstance = "distinctInstance" @@ -11296,6 +13640,19 @@ const ( PlacementStrategyTypeBinpack = "binpack" ) +const ( + // PropagateTagsTaskDefinition is a PropagateTags enum value + PropagateTagsTaskDefinition = "TASK_DEFINITION" + + // PropagateTagsService is a PropagateTags enum value + PropagateTagsService = "SERVICE" +) + +const ( + // ScaleUnitPercent is a ScaleUnit enum value + ScaleUnitPercent = "PERCENT" +) + const ( // SchedulingStrategyReplica is a SchedulingStrategy enum value SchedulingStrategyReplica = "REPLICA" @@ -11312,6 +13669,22 @@ const ( ScopeShared = "shared" ) +const ( + // ServiceFieldTags is a ServiceField enum value + ServiceFieldTags = "TAGS" +) + +const ( + // SettingNameServiceLongArnFormat is a SettingName enum value + SettingNameServiceLongArnFormat = "serviceLongArnFormat" + + // SettingNameTaskLongArnFormat is a SettingName enum value + SettingNameTaskLongArnFormat = "taskLongArnFormat" + + // SettingNameContainerInstanceLongArnFormat is a SettingName enum value + SettingNameContainerInstanceLongArnFormat = "containerInstanceLongArnFormat" +) + const ( // SortOrderAsc is a SortOrder enum value SortOrderAsc = "ASC" @@ -11320,6 +13693,14 @@ const ( SortOrderDesc = "DESC" ) +const ( + // StabilityStatusSteadyState is a StabilityStatus enum value + StabilityStatusSteadyState = "STEADY_STATE" + + // StabilityStatusStabilizing is a StabilityStatus enum value + StabilityStatusStabilizing = "STABILIZING" +) + const ( // TargetTypeContainerInstance is a TargetType enum value TargetTypeContainerInstance = "container-instance" @@ -11336,6 +13717,11 @@ const ( TaskDefinitionFamilyStatusAll = "ALL" ) +const ( + // TaskDefinitionFieldTags is a TaskDefinitionField enum value + TaskDefinitionFieldTags = "TAGS" +) + const ( // TaskDefinitionPlacementConstraintTypeMemberOf is a TaskDefinitionPlacementConstraintType enum value TaskDefinitionPlacementConstraintTypeMemberOf = "memberOf" @@ -11349,6 +13735,22 @@ const ( TaskDefinitionStatusInactive = "INACTIVE" ) +const ( + // TaskFieldTags is a TaskField enum value + TaskFieldTags = "TAGS" +) + +const ( + // TaskStopCodeTaskFailedToStart is a TaskStopCode enum value + TaskStopCodeTaskFailedToStart = "TaskFailedToStart" + + // TaskStopCodeEssentialContainerExited is a TaskStopCode enum value + TaskStopCodeEssentialContainerExited = "EssentialContainerExited" + + // TaskStopCodeUserInitiated is a TaskStopCode enum value + TaskStopCodeUserInitiated = "UserInitiated" +) + const ( // TransportProtocolTcp is a TransportProtocol enum value TransportProtocolTcp = "tcp" diff --git a/vendor/github.com/aws/aws-sdk-go/service/ecs/errors.go b/vendor/github.com/aws/aws-sdk-go/service/ecs/errors.go index 5091c3ff3b..9a11f23dcd 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ecs/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ecs/errors.go @@ -21,8 +21,8 @@ const ( // ErrCodeBlockedException for service response error code // "BlockedException". // - // Your AWS account has been blocked. Contact AWS Support (http://aws.amazon.com/contact-us/) - // for more information. + // Your AWS account has been blocked. For more information, contact AWS Support + // (http://aws.amazon.com/contact-us/). ErrCodeBlockedException = "BlockedException" // ErrCodeClientException for service response error code @@ -36,17 +36,17 @@ const ( // ErrCodeClusterContainsContainerInstancesException for service response error code // "ClusterContainsContainerInstancesException". // - // You cannot delete a cluster that has registered container instances. You - // must first deregister the container instances before you can delete the cluster. - // For more information, see DeregisterContainerInstance. + // You cannot delete a cluster that has registered container instances. First, + // deregister the container instances before you can delete the cluster. For + // more information, see DeregisterContainerInstance. ErrCodeClusterContainsContainerInstancesException = "ClusterContainsContainerInstancesException" // ErrCodeClusterContainsServicesException for service response error code // "ClusterContainsServicesException". // - // You cannot delete a cluster that contains services. You must first update - // the service to reduce its desired task count to 0 and then delete the service. - // For more information, see UpdateService and DeleteService. + // You cannot delete a cluster that contains services. First, update the service + // to reduce its desired task count to 0 and then delete the service. For more + // information, see UpdateService and DeleteService. ErrCodeClusterContainsServicesException = "ClusterContainsServicesException" // ErrCodeClusterContainsTasksException for service response error code @@ -59,7 +59,7 @@ const ( // "ClusterNotFoundException". // // The specified cluster could not be found. You can view your available clusters - // with ListClusters. Amazon ECS clusters are region-specific. + // with ListClusters. Amazon ECS clusters are Region-specific. ErrCodeClusterNotFoundException = "ClusterNotFoundException" // ErrCodeInvalidParameterException for service response error code @@ -99,6 +99,12 @@ const ( // The specified platform version does not exist. ErrCodePlatformUnknownException = "PlatformUnknownException" + // ErrCodeResourceNotFoundException for service response error code + // "ResourceNotFoundException". + // + // The specified resource could not be found. + ErrCodeResourceNotFoundException = "ResourceNotFoundException" + // ErrCodeServerException for service response error code // "ServerException". // @@ -116,7 +122,7 @@ const ( // "ServiceNotFoundException". // // The specified service could not be found. You can view your available services - // with ListServices. Amazon ECS services are cluster-specific and region-specific. + // with ListServices. Amazon ECS services are cluster-specific and Region-specific. ErrCodeServiceNotFoundException = "ServiceNotFoundException" // ErrCodeTargetNotFoundException for service response error code @@ -124,13 +130,13 @@ const ( // // The specified target could not be found. You can view your available container // instances with ListContainerInstances. Amazon ECS container instances are - // cluster-specific and region-specific. + // cluster-specific and Region-specific. ErrCodeTargetNotFoundException = "TargetNotFoundException" // ErrCodeUnsupportedFeatureException for service response error code // "UnsupportedFeatureException". // - // The specified task is not supported in this region. + // The specified task is not supported in this Region. ErrCodeUnsupportedFeatureException = "UnsupportedFeatureException" // ErrCodeUpdateInProgressException for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/efs/api.go b/vendor/github.com/aws/aws-sdk-go/service/efs/api.go index cc40d16918..b3ef2782e9 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/efs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/efs/api.go @@ -18,7 +18,7 @@ const opCreateFileSystem = "CreateFileSystem" // CreateFileSystemRequest generates a "aws/request.Request" representing the // client's request for the CreateFileSystem operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -165,7 +165,7 @@ const opCreateMountTarget = "CreateMountTarget" // CreateMountTargetRequest generates a "aws/request.Request" representing the // client's request for the CreateMountTarget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -382,7 +382,7 @@ const opCreateTags = "CreateTags" // CreateTagsRequest generates a "aws/request.Request" representing the // client's request for the CreateTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -416,8 +416,7 @@ func (c *EFS) CreateTagsRequest(input *CreateTagsInput) (req *request.Request, o output = &CreateTagsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -477,7 +476,7 @@ const opDeleteFileSystem = "DeleteFileSystem" // DeleteFileSystemRequest generates a "aws/request.Request" representing the // client's request for the DeleteFileSystem operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -511,8 +510,7 @@ func (c *EFS) DeleteFileSystemRequest(input *DeleteFileSystemInput) (req *reques output = &DeleteFileSystemOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -584,7 +582,7 @@ const opDeleteMountTarget = "DeleteMountTarget" // DeleteMountTargetRequest generates a "aws/request.Request" representing the // client's request for the DeleteMountTarget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -618,8 +616,7 @@ func (c *EFS) DeleteMountTargetRequest(input *DeleteMountTargetInput) (req *requ output = &DeleteMountTargetOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -701,7 +698,7 @@ const opDeleteTags = "DeleteTags" // DeleteTagsRequest generates a "aws/request.Request" representing the // client's request for the DeleteTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -735,8 +732,7 @@ func (c *EFS) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, o output = &DeleteTagsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -797,7 +793,7 @@ const opDescribeFileSystems = "DescribeFileSystems" // DescribeFileSystemsRequest generates a "aws/request.Request" representing the // client's request for the DescribeFileSystems operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -909,7 +905,7 @@ const opDescribeMountTargetSecurityGroups = "DescribeMountTargetSecurityGroups" // DescribeMountTargetSecurityGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeMountTargetSecurityGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1009,7 +1005,7 @@ const opDescribeMountTargets = "DescribeMountTargets" // DescribeMountTargetsRequest generates a "aws/request.Request" representing the // client's request for the DescribeMountTargets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1106,7 +1102,7 @@ const opDescribeTags = "DescribeTags" // DescribeTagsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1198,7 +1194,7 @@ const opModifyMountTargetSecurityGroups = "ModifyMountTargetSecurityGroups" // ModifyMountTargetSecurityGroupsRequest generates a "aws/request.Request" representing the // client's request for the ModifyMountTargetSecurityGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1232,8 +1228,7 @@ func (c *EFS) ModifyMountTargetSecurityGroupsRequest(input *ModifyMountTargetSec output = &ModifyMountTargetSecurityGroupsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1313,7 +1308,7 @@ const opUpdateFileSystem = "UpdateFileSystem" // UpdateFileSystemRequest generates a "aws/request.Request" representing the // client's request for the UpdateFileSystem operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1637,6 +1632,9 @@ func (s *CreateTagsInput) Validate() error { if s.FileSystemId == nil { invalidParams.Add(request.NewErrParamRequired("FileSystemId")) } + if s.FileSystemId != nil && len(*s.FileSystemId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1)) + } if s.Tags == nil { invalidParams.Add(request.NewErrParamRequired("Tags")) } @@ -1708,6 +1706,9 @@ func (s *DeleteFileSystemInput) Validate() error { if s.FileSystemId == nil { invalidParams.Add(request.NewErrParamRequired("FileSystemId")) } + if s.FileSystemId != nil && len(*s.FileSystemId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -1760,6 +1761,9 @@ func (s *DeleteMountTargetInput) Validate() error { if s.MountTargetId == nil { invalidParams.Add(request.NewErrParamRequired("MountTargetId")) } + if s.MountTargetId != nil && len(*s.MountTargetId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MountTargetId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -1817,6 +1821,9 @@ func (s *DeleteTagsInput) Validate() error { if s.FileSystemId == nil { invalidParams.Add(request.NewErrParamRequired("FileSystemId")) } + if s.FileSystemId != nil && len(*s.FileSystemId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1)) + } if s.TagKeys == nil { invalidParams.Add(request.NewErrParamRequired("TagKeys")) } @@ -1994,6 +2001,9 @@ func (s *DescribeMountTargetSecurityGroupsInput) Validate() error { if s.MountTargetId == nil { invalidParams.Add(request.NewErrParamRequired("MountTargetId")) } + if s.MountTargetId != nil && len(*s.MountTargetId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MountTargetId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -2179,6 +2189,9 @@ func (s *DescribeTagsInput) Validate() error { if s.FileSystemId == nil { invalidParams.Add(request.NewErrParamRequired("FileSystemId")) } + if s.FileSystemId != nil && len(*s.FileSystemId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1)) + } if s.MaxItems != nil && *s.MaxItems < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) } @@ -2493,6 +2506,9 @@ func (s *ModifyMountTargetSecurityGroupsInput) Validate() error { if s.MountTargetId == nil { invalidParams.Add(request.NewErrParamRequired("MountTargetId")) } + if s.MountTargetId != nil && len(*s.MountTargetId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MountTargetId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -2705,6 +2721,9 @@ func (s *UpdateFileSystemInput) Validate() error { if s.FileSystemId == nil { invalidParams.Add(request.NewErrParamRequired("FileSystemId")) } + if s.FileSystemId != nil && len(*s.FileSystemId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1)) + } if invalidParams.Len() > 0 { return invalidParams diff --git a/vendor/github.com/aws/aws-sdk-go/service/eks/api.go b/vendor/github.com/aws/aws-sdk-go/service/eks/api.go index bb1cefd889..9190a03d87 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/eks/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/eks/api.go @@ -15,7 +15,7 @@ const opCreateCluster = "CreateCluster" // CreateClusterRequest generates a "aws/request.Request" representing the // client's request for the CreateCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -96,9 +96,9 @@ func (c *EKS) CreateClusterRequest(input *CreateClusterInput) (req *request.Requ // API request. // // * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. +// These errors are usually caused by a client action. Actions can include using +// an action or resource on behalf of a user that doesn't have permissions to +// use the action or resource or specifying an identifier that is not valid. // // * ErrCodeServerException "ServerException" // These errors are usually caused by a server-side issue. @@ -139,7 +139,7 @@ const opDeleteCluster = "DeleteCluster" // DeleteClusterRequest generates a "aws/request.Request" representing the // client's request for the DeleteCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -203,9 +203,9 @@ func (c *EKS) DeleteClusterRequest(input *DeleteClusterInput) (req *request.Requ // with ListClusters. Amazon EKS clusters are Region-specific. // // * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. +// These errors are usually caused by a client action. Actions can include using +// an action or resource on behalf of a user that doesn't have permissions to +// use the action or resource or specifying an identifier that is not valid. // // * ErrCodeServerException "ServerException" // These errors are usually caused by a server-side issue. @@ -240,7 +240,7 @@ const opDescribeCluster = "DescribeCluster" // DescribeClusterRequest generates a "aws/request.Request" representing the // client's request for the DescribeCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -302,9 +302,9 @@ func (c *EKS) DescribeClusterRequest(input *DescribeClusterInput) (req *request. // with ListClusters. Amazon EKS clusters are Region-specific. // // * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. +// These errors are usually caused by a client action. Actions can include using +// an action or resource on behalf of a user that doesn't have permissions to +// use the action or resource or specifying an identifier that is not valid. // // * ErrCodeServerException "ServerException" // These errors are usually caused by a server-side issue. @@ -334,12 +334,108 @@ func (c *EKS) DescribeClusterWithContext(ctx aws.Context, input *DescribeCluster return out, req.Send() } +const opDescribeUpdate = "DescribeUpdate" + +// DescribeUpdateRequest generates a "aws/request.Request" representing the +// client's request for the DescribeUpdate 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 DescribeUpdate for more information on using the DescribeUpdate +// 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 DescribeUpdateRequest method. +// req, resp := client.DescribeUpdateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/DescribeUpdate +func (c *EKS) DescribeUpdateRequest(input *DescribeUpdateInput) (req *request.Request, output *DescribeUpdateOutput) { + op := &request.Operation{ + Name: opDescribeUpdate, + HTTPMethod: "GET", + HTTPPath: "/clusters/{name}/updates/{updateId}", + } + + if input == nil { + input = &DescribeUpdateInput{} + } + + output = &DescribeUpdateOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeUpdate API operation for Amazon Elastic Container Service for Kubernetes. +// +// Returns descriptive information about an update against your Amazon EKS cluster. +// +// When the status of the update is Succeeded, the update is complete. If an +// update fails, the status is Failed, and an error detail explains the reason +// for the failure. +// +// 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 Container Service for Kubernetes's +// API operation DescribeUpdate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// The specified parameter is invalid. Review the available parameters for the +// API request. +// +// * ErrCodeClientException "ClientException" +// These errors are usually caused by a client action. Actions can include using +// an action or resource on behalf of a user that doesn't have permissions to +// use the action or resource or specifying an identifier that is not valid. +// +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server-side issue. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource could not be found. You can view your available clusters +// with ListClusters. Amazon EKS clusters are Region-specific. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/DescribeUpdate +func (c *EKS) DescribeUpdate(input *DescribeUpdateInput) (*DescribeUpdateOutput, error) { + req, out := c.DescribeUpdateRequest(input) + return out, req.Send() +} + +// DescribeUpdateWithContext is the same as DescribeUpdate with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeUpdate 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 *EKS) DescribeUpdateWithContext(ctx aws.Context, input *DescribeUpdateInput, opts ...request.Option) (*DescribeUpdateOutput, error) { + req, out := c.DescribeUpdateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListClusters = "ListClusters" // ListClustersRequest generates a "aws/request.Request" representing the // client's request for the ListClusters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -393,9 +489,9 @@ func (c *EKS) ListClustersRequest(input *ListClustersInput) (req *request.Reques // API request. // // * ErrCodeClientException "ClientException" -// These errors are usually caused by a client action, such as using an action -// or resource on behalf of a user that doesn't have permissions to use the -// action or resource, or specifying an identifier that is not valid. +// These errors are usually caused by a client action. Actions can include using +// an action or resource on behalf of a user that doesn't have permissions to +// use the action or resource or specifying an identifier that is not valid. // // * ErrCodeServerException "ServerException" // These errors are usually caused by a server-side issue. @@ -425,6 +521,206 @@ func (c *EKS) ListClustersWithContext(ctx aws.Context, input *ListClustersInput, return out, req.Send() } +const opListUpdates = "ListUpdates" + +// ListUpdatesRequest generates a "aws/request.Request" representing the +// client's request for the ListUpdates 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 ListUpdates for more information on using the ListUpdates +// 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 ListUpdatesRequest method. +// req, resp := client.ListUpdatesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/ListUpdates +func (c *EKS) ListUpdatesRequest(input *ListUpdatesInput) (req *request.Request, output *ListUpdatesOutput) { + op := &request.Operation{ + Name: opListUpdates, + HTTPMethod: "GET", + HTTPPath: "/clusters/{name}/updates", + } + + if input == nil { + input = &ListUpdatesInput{} + } + + output = &ListUpdatesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListUpdates API operation for Amazon Elastic Container Service for Kubernetes. +// +// Lists the updates associated with an Amazon EKS cluster in your AWS account, +// in the specified 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. +// +// See the AWS API reference guide for Amazon Elastic Container Service for Kubernetes's +// API operation ListUpdates for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// The specified parameter is invalid. Review the available parameters for the +// API request. +// +// * ErrCodeClientException "ClientException" +// These errors are usually caused by a client action. Actions can include using +// an action or resource on behalf of a user that doesn't have permissions to +// use the action or resource or specifying an identifier that is not valid. +// +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server-side issue. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource could not be found. You can view your available clusters +// with ListClusters. Amazon EKS clusters are Region-specific. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/ListUpdates +func (c *EKS) ListUpdates(input *ListUpdatesInput) (*ListUpdatesOutput, error) { + req, out := c.ListUpdatesRequest(input) + return out, req.Send() +} + +// ListUpdatesWithContext is the same as ListUpdates with the addition of +// the ability to pass a context and additional request options. +// +// See ListUpdates 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 *EKS) ListUpdatesWithContext(ctx aws.Context, input *ListUpdatesInput, opts ...request.Option) (*ListUpdatesOutput, error) { + req, out := c.ListUpdatesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateClusterVersion = "UpdateClusterVersion" + +// UpdateClusterVersionRequest generates a "aws/request.Request" representing the +// client's request for the UpdateClusterVersion 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 UpdateClusterVersion for more information on using the UpdateClusterVersion +// 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 UpdateClusterVersionRequest method. +// req, resp := client.UpdateClusterVersionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/UpdateClusterVersion +func (c *EKS) UpdateClusterVersionRequest(input *UpdateClusterVersionInput) (req *request.Request, output *UpdateClusterVersionOutput) { + op := &request.Operation{ + Name: opUpdateClusterVersion, + HTTPMethod: "POST", + HTTPPath: "/clusters/{name}/updates", + } + + if input == nil { + input = &UpdateClusterVersionInput{} + } + + output = &UpdateClusterVersionOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateClusterVersion API operation for Amazon Elastic Container Service for Kubernetes. +// +// Updates an Amazon EKS cluster to the specified Kubernetes version. Your cluster +// continues to function during the update. The response output includes an +// update ID that you can use to track the status of your cluster update with +// the DescribeUpdate API operation. +// +// Cluster updates are asynchronous, and they should finish within a few minutes. +// During an update, the cluster status moves to UPDATING (this status transition +// is eventually consistent). When the update is complete (either Failed or +// Successful), the cluster status moves to Active. +// +// 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 Container Service for Kubernetes's +// API operation UpdateClusterVersion for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterException "InvalidParameterException" +// The specified parameter is invalid. Review the available parameters for the +// API request. +// +// * ErrCodeClientException "ClientException" +// These errors are usually caused by a client action. Actions can include using +// an action or resource on behalf of a user that doesn't have permissions to +// use the action or resource or specifying an identifier that is not valid. +// +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server-side issue. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// The specified resource is in use. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource could not be found. You can view your available clusters +// with ListClusters. Amazon EKS clusters are Region-specific. +// +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is invalid given the state of the cluster. Check the state of +// the cluster and the associated operations. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/eks-2017-11-01/UpdateClusterVersion +func (c *EKS) UpdateClusterVersion(input *UpdateClusterVersionInput) (*UpdateClusterVersionOutput, error) { + req, out := c.UpdateClusterVersionRequest(input) + return out, req.Send() +} + +// UpdateClusterVersionWithContext is the same as UpdateClusterVersion with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateClusterVersion 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 *EKS) UpdateClusterVersionWithContext(ctx aws.Context, input *UpdateClusterVersionInput, opts ...request.Option) (*UpdateClusterVersionOutput, error) { + req, out := c.UpdateClusterVersionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + // An object representing the certificate-authority-data for your cluster. type Certificate struct { _ struct{} `type:"structure"` @@ -461,11 +757,11 @@ type Cluster struct { // The certificate-authority-data for your cluster. CertificateAuthority *Certificate `locationName:"certificateAuthority" type:"structure"` - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. ClientRequestToken *string `locationName:"clientRequestToken" type:"string"` - // The Unix epoch time stamp in seconds for when the cluster was created. + // The Unix epoch timestamp in seconds for when the cluster was created. CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` // The endpoint for your Kubernetes API server. @@ -475,8 +771,8 @@ type Cluster struct { Name *string `locationName:"name" type:"string"` // The platform version of your Amazon EKS cluster. For more information, see - // Platform Versions (eks/latest/userguide/platform-versions.html) in the Amazon - // EKS User Guide. + // Platform Versions (http://docs.aws.amazon.com/eks/latest/userguide/platform-versions.html) + // in the Amazon EKS User Guide. PlatformVersion *string `locationName:"platformVersion" type:"string"` // The VPC subnets and security groups used by the cluster control plane. Amazon @@ -577,8 +873,8 @@ func (s *Cluster) SetVersion(v string) *Cluster { type CreateClusterInput struct { _ struct{} `type:"structure"` - // Unique, case-sensitive identifier you provide to ensure the idempotency of - // the request. + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. ClientRequestToken *string `locationName:"clientRequestToken" type:"string" idempotencyToken:"true"` // The unique name to give to your cluster. @@ -591,7 +887,7 @@ type CreateClusterInput struct { // For more information, see Cluster VPC Considerations (http://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html) // and Cluster Security Group Considerations (http://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html) // in the Amazon EKS User Guide. You must specify at least two subnets. You - // may specify up to 5 security groups, but we recommend that you use a dedicated + // may specify up to five security groups, but we recommend that you use a dedicated // security group for your cluster control plane. // // ResourcesVpcConfig is a required field @@ -725,6 +1021,9 @@ func (s *DeleteClusterInput) Validate() error { if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -786,6 +1085,9 @@ func (s *DescribeClusterInput) Validate() error { if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -822,43 +1124,44 @@ func (s *DescribeClusterOutput) SetCluster(v *Cluster) *DescribeClusterOutput { return s } -type ListClustersInput struct { +type DescribeUpdateInput struct { _ struct{} `type:"structure"` - // The maximum number of cluster results returned by ListClusters in paginated - // output. When this parameter is used, ListClusters only returns maxResults - // results in a single page along with a nextToken response element. The remaining - // results of the initial request can be seen by sending another ListClusters - // request with the returned nextToken value. This value can be between 1 and - // 100. If this parameter is not used, then ListClusters returns up to 100 results - // and a nextToken value if applicable. - MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + // The name of the Amazon EKS cluster to update. + // + // Name is a required field + Name *string `location:"uri" locationName:"name" type:"string" required:"true"` - // The nextToken value returned from a previous paginated ListClusters request - // where maxResults was used and the results exceeded the value of that parameter. - // Pagination continues from the end of the previous results that returned the - // nextToken value. + // The ID of the update to describe. // - // This token should be treated as an opaque identifier that is only used to - // retrieve the next items in a list and not for other programmatic purposes. - NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` + // UpdateId is a required field + UpdateId *string `location:"uri" locationName:"updateId" type:"string" required:"true"` } // String returns the string representation -func (s ListClustersInput) String() string { +func (s DescribeUpdateInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListClustersInput) GoString() string { +func (s DescribeUpdateInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ListClustersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListClustersInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) +func (s *DescribeUpdateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeUpdateInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.UpdateId == nil { + invalidParams.Add(request.NewErrParamRequired("UpdateId")) + } + if s.UpdateId != nil && len(*s.UpdateId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UpdateId", 1)) } if invalidParams.Len() > 0 { @@ -867,25 +1170,166 @@ func (s *ListClustersInput) Validate() error { return nil } -// SetMaxResults sets the MaxResults field's value. -func (s *ListClustersInput) SetMaxResults(v int64) *ListClustersInput { - s.MaxResults = &v +// SetName sets the Name field's value. +func (s *DescribeUpdateInput) SetName(v string) *DescribeUpdateInput { + s.Name = &v return s } -// SetNextToken sets the NextToken field's value. -func (s *ListClustersInput) SetNextToken(v string) *ListClustersInput { - s.NextToken = &v +// SetUpdateId sets the UpdateId field's value. +func (s *DescribeUpdateInput) SetUpdateId(v string) *DescribeUpdateInput { + s.UpdateId = &v return s } -type ListClustersOutput struct { +type DescribeUpdateOutput struct { _ struct{} `type:"structure"` - // A list of all of the clusters for your account in the specified Region. - Clusters []*string `locationName:"clusters" type:"list"` + // The full description of the specified update. + Update *Update `locationName:"update" type:"structure"` +} - // The nextToken value to include in a future ListClusters request. When the +// String returns the string representation +func (s DescribeUpdateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeUpdateOutput) GoString() string { + return s.String() +} + +// SetUpdate sets the Update field's value. +func (s *DescribeUpdateOutput) SetUpdate(v *Update) *DescribeUpdateOutput { + s.Update = v + return s +} + +// An object representing an error when an asynchronous operation fails. +type ErrorDetail struct { + _ struct{} `type:"structure"` + + // A brief description of the error. + // + // * SubnetNotFound: One of the subnets associated with the cluster could + // not be found. + // + // * SecurityGroupNotFound: One of the security groups associated with the + // cluster could not be found. + // + // * EniLimitReached: You have reached the elastic network interface limit + // for your account. + // + // * IpNotAvailable: A subnet associated with the cluster does not have any + // free IP addresses. + // + // * AccessDenied: You do not have permissions to perform the specified operation. + // + // * OperationNotPermitted: The service role associated with the cluster + // does not have the required access permissions for Amazon EKS. + // + // * VpcIdNotFound: The VPC associated with the cluster could not be found. + ErrorCode *string `locationName:"errorCode" type:"string" enum:"ErrorCode"` + + // A more complete description of the error. + ErrorMessage *string `locationName:"errorMessage" type:"string"` + + // An optional field that contains the resource IDs associated with the error. + ResourceIds []*string `locationName:"resourceIds" type:"list"` +} + +// String returns the string representation +func (s ErrorDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ErrorDetail) GoString() string { + return s.String() +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *ErrorDetail) SetErrorCode(v string) *ErrorDetail { + s.ErrorCode = &v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *ErrorDetail) SetErrorMessage(v string) *ErrorDetail { + s.ErrorMessage = &v + return s +} + +// SetResourceIds sets the ResourceIds field's value. +func (s *ErrorDetail) SetResourceIds(v []*string) *ErrorDetail { + s.ResourceIds = v + return s +} + +type ListClustersInput struct { + _ struct{} `type:"structure"` + + // The maximum number of cluster results returned by ListClusters in paginated + // output. When this parameter is used, ListClusters only returns maxResults + // results in a single page along with a nextToken response element. The remaining + // results of the initial request can be seen by sending another ListClusters + // request with the returned nextToken value. This value can be between 1 and + // 100. If this parameter is not used, then ListClusters returns up to 100 results + // and a nextToken value if applicable. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The nextToken value returned from a previous paginated ListClusters request + // where maxResults was used and the results exceeded the value of that parameter. + // Pagination continues from the end of the previous results that returned the + // nextToken value. + // + // This token should be treated as an opaque identifier that is only used to + // retrieve the next items in a list and not for other programmatic purposes. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListClustersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListClustersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListClustersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListClustersInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListClustersInput) SetMaxResults(v int64) *ListClustersInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListClustersInput) SetNextToken(v string) *ListClustersInput { + s.NextToken = &v + return s +} + +type ListClustersOutput struct { + _ struct{} `type:"structure"` + + // A list of all of the clusters for your account in the specified Region. + Clusters []*string `locationName:"clusters" type:"list"` + + // The nextToken value to include in a future ListClusters request. When the // results of a ListClusters request exceed maxResults, this value can be used // to retrieve the next page of results. This value is null when there are no // more results to return. @@ -914,13 +1358,310 @@ func (s *ListClustersOutput) SetNextToken(v string) *ListClustersOutput { return s } +type ListUpdatesInput struct { + _ struct{} `type:"structure"` + + // The maximum number of update results returned by ListUpdates in paginated + // output. When this parameter is used, ListUpdates only returns maxResults + // results in a single page along with a nextToken response element. The remaining + // results of the initial request can be seen by sending another ListUpdates + // request with the returned nextToken value. This value can be between 1 and + // 100. If this parameter is not used, then ListUpdates returns up to 100 results + // and a nextToken value if applicable. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The name of the Amazon EKS cluster for which to list updates. + // + // Name is a required field + Name *string `location:"uri" locationName:"name" type:"string" required:"true"` + + // The nextToken value returned from a previous paginated ListUpdates request + // where maxResults was used and the results exceeded the value of that parameter. + // Pagination continues from the end of the previous results that returned the + // nextToken value. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListUpdatesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListUpdatesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListUpdatesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListUpdatesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListUpdatesInput) SetMaxResults(v int64) *ListUpdatesInput { + s.MaxResults = &v + return s +} + +// SetName sets the Name field's value. +func (s *ListUpdatesInput) SetName(v string) *ListUpdatesInput { + s.Name = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListUpdatesInput) SetNextToken(v string) *ListUpdatesInput { + s.NextToken = &v + return s +} + +type ListUpdatesOutput struct { + _ struct{} `type:"structure"` + + // The nextToken value to include in a future ListUpdates request. When the + // results of a ListUpdates request exceed maxResults, this value can be used + // to retrieve the next page of results. This value is null when there are no + // more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + + // A list of all the updates for the specified cluster and Region. + UpdateIds []*string `locationName:"updateIds" type:"list"` +} + +// String returns the string representation +func (s ListUpdatesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListUpdatesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListUpdatesOutput) SetNextToken(v string) *ListUpdatesOutput { + s.NextToken = &v + return s +} + +// SetUpdateIds sets the UpdateIds field's value. +func (s *ListUpdatesOutput) SetUpdateIds(v []*string) *ListUpdatesOutput { + s.UpdateIds = v + return s +} + +// An object representing an asynchronous update. +type Update struct { + _ struct{} `type:"structure"` + + // The Unix epoch timestamp in seconds for when the update was created. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` + + // Any errors associated with a Failed update. + Errors []*ErrorDetail `locationName:"errors" type:"list"` + + // A UUID that is used to track the update. + Id *string `locationName:"id" type:"string"` + + // A key-value map that contains the parameters associated with the update. + Params []*UpdateParam `locationName:"params" type:"list"` + + // The current status of the update. + Status *string `locationName:"status" type:"string" enum:"UpdateStatus"` + + // The type of the update. + Type *string `locationName:"type" type:"string" enum:"UpdateType"` +} + +// String returns the string representation +func (s Update) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Update) GoString() string { + return s.String() +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *Update) SetCreatedAt(v time.Time) *Update { + s.CreatedAt = &v + return s +} + +// SetErrors sets the Errors field's value. +func (s *Update) SetErrors(v []*ErrorDetail) *Update { + s.Errors = v + return s +} + +// SetId sets the Id field's value. +func (s *Update) SetId(v string) *Update { + s.Id = &v + return s +} + +// SetParams sets the Params field's value. +func (s *Update) SetParams(v []*UpdateParam) *Update { + s.Params = v + return s +} + +// SetStatus sets the Status field's value. +func (s *Update) SetStatus(v string) *Update { + s.Status = &v + return s +} + +// SetType sets the Type field's value. +func (s *Update) SetType(v string) *Update { + s.Type = &v + return s +} + +type UpdateClusterVersionInput struct { + _ struct{} `type:"structure"` + + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. + ClientRequestToken *string `locationName:"clientRequestToken" type:"string" idempotencyToken:"true"` + + // The name of the Amazon EKS cluster to update. + // + // Name is a required field + Name *string `location:"uri" locationName:"name" type:"string" required:"true"` + + // The desired Kubernetes version following a successful update. + // + // Version is a required field + Version *string `locationName:"version" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateClusterVersionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateClusterVersionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateClusterVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateClusterVersionInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.Version == nil { + invalidParams.Add(request.NewErrParamRequired("Version")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientRequestToken sets the ClientRequestToken field's value. +func (s *UpdateClusterVersionInput) SetClientRequestToken(v string) *UpdateClusterVersionInput { + s.ClientRequestToken = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateClusterVersionInput) SetName(v string) *UpdateClusterVersionInput { + s.Name = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *UpdateClusterVersionInput) SetVersion(v string) *UpdateClusterVersionInput { + s.Version = &v + return s +} + +type UpdateClusterVersionOutput struct { + _ struct{} `type:"structure"` + + // The full description of the specified update + Update *Update `locationName:"update" type:"structure"` +} + +// String returns the string representation +func (s UpdateClusterVersionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateClusterVersionOutput) GoString() string { + return s.String() +} + +// SetUpdate sets the Update field's value. +func (s *UpdateClusterVersionOutput) SetUpdate(v *Update) *UpdateClusterVersionOutput { + s.Update = v + return s +} + +// An object representing the details of an update request. +type UpdateParam struct { + _ struct{} `type:"structure"` + + // The keys associated with an update request. + Type *string `locationName:"type" type:"string" enum:"UpdateParamType"` + + // The value of the keys submitted as part of an update request. + Value *string `locationName:"value" type:"string"` +} + +// String returns the string representation +func (s UpdateParam) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateParam) GoString() string { + return s.String() +} + +// SetType sets the Type field's value. +func (s *UpdateParam) SetType(v string) *UpdateParam { + s.Type = &v + return s +} + +// SetValue sets the Value field's value. +func (s *UpdateParam) SetValue(v string) *UpdateParam { + s.Value = &v + return s +} + // An object representing an Amazon EKS cluster VPC configuration request. type VpcConfigRequest struct { _ struct{} `type:"structure"` // Specify one or more security groups for the cross-account elastic network // interfaces that Amazon EKS creates to use to allow communication between - // your worker nodes and the Kubernetes control plane. + // your worker nodes and the Kubernetes control plane. If you do not specify + // a security group, the default security group for your VPC is used. SecurityGroupIds []*string `locationName:"securityGroupIds" type:"list"` // Specify subnets for your Amazon EKS worker nodes. Amazon EKS creates cross-account @@ -1023,3 +1764,56 @@ const ( // ClusterStatusFailed is a ClusterStatus enum value ClusterStatusFailed = "FAILED" ) + +const ( + // ErrorCodeSubnetNotFound is a ErrorCode enum value + ErrorCodeSubnetNotFound = "SubnetNotFound" + + // ErrorCodeSecurityGroupNotFound is a ErrorCode enum value + ErrorCodeSecurityGroupNotFound = "SecurityGroupNotFound" + + // ErrorCodeEniLimitReached is a ErrorCode enum value + ErrorCodeEniLimitReached = "EniLimitReached" + + // ErrorCodeIpNotAvailable is a ErrorCode enum value + ErrorCodeIpNotAvailable = "IpNotAvailable" + + // ErrorCodeAccessDenied is a ErrorCode enum value + ErrorCodeAccessDenied = "AccessDenied" + + // ErrorCodeOperationNotPermitted is a ErrorCode enum value + ErrorCodeOperationNotPermitted = "OperationNotPermitted" + + // ErrorCodeVpcIdNotFound is a ErrorCode enum value + ErrorCodeVpcIdNotFound = "VpcIdNotFound" + + // ErrorCodeUnknown is a ErrorCode enum value + ErrorCodeUnknown = "Unknown" +) + +const ( + // UpdateParamTypeVersion is a UpdateParamType enum value + UpdateParamTypeVersion = "Version" + + // UpdateParamTypePlatformVersion is a UpdateParamType enum value + UpdateParamTypePlatformVersion = "PlatformVersion" +) + +const ( + // UpdateStatusInProgress is a UpdateStatus enum value + UpdateStatusInProgress = "InProgress" + + // UpdateStatusFailed is a UpdateStatus enum value + UpdateStatusFailed = "Failed" + + // UpdateStatusCancelled is a UpdateStatus enum value + UpdateStatusCancelled = "Cancelled" + + // UpdateStatusSuccessful is a UpdateStatus enum value + UpdateStatusSuccessful = "Successful" +) + +const ( + // UpdateTypeVersionUpdate is a UpdateType enum value + UpdateTypeVersionUpdate = "VersionUpdate" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/eks/errors.go b/vendor/github.com/aws/aws-sdk-go/service/eks/errors.go index 98a2410c56..b343c7e0b6 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/eks/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/eks/errors.go @@ -7,9 +7,9 @@ const ( // ErrCodeClientException for service response error code // "ClientException". // - // These errors are usually caused by a client action, such as using an action - // or resource on behalf of a user that doesn't have permissions to use the - // action or resource, or specifying an identifier that is not valid. + // These errors are usually caused by a client action. Actions can include using + // an action or resource on behalf of a user that doesn't have permissions to + // use the action or resource or specifying an identifier that is not valid. ErrCodeClientException = "ClientException" // ErrCodeInvalidParameterException for service response error code @@ -19,6 +19,13 @@ const ( // API request. ErrCodeInvalidParameterException = "InvalidParameterException" + // ErrCodeInvalidRequestException for service response error code + // "InvalidRequestException". + // + // The request is invalid given the state of the cluster. Check the state of + // the cluster and the associated operations. + ErrCodeInvalidRequestException = "InvalidRequestException" + // ErrCodeResourceInUseException for service response error code // "ResourceInUseException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/eks/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/eks/waiters.go new file mode 100644 index 0000000000..022255cf05 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/eks/waiters.go @@ -0,0 +1,122 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package eks + +import ( + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" +) + +// WaitUntilClusterActive uses the Amazon EKS API operation +// DescribeCluster to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *EKS) WaitUntilClusterActive(input *DescribeClusterInput) error { + return c.WaitUntilClusterActiveWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilClusterActiveWithContext is an extended version of WaitUntilClusterActive. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// 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 *EKS) WaitUntilClusterActiveWithContext(ctx aws.Context, input *DescribeClusterInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilClusterActive", + MaxAttempts: 40, + Delay: request.ConstantWaiterDelay(30 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.FailureWaiterState, + Matcher: request.PathWaiterMatch, Argument: "cluster.status", + Expected: "DELETING", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathWaiterMatch, Argument: "cluster.status", + Expected: "FAILED", + }, + { + State: request.SuccessWaiterState, + Matcher: request.PathWaiterMatch, Argument: "cluster.status", + Expected: "ACTIVE", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeClusterInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeClusterRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} + +// WaitUntilClusterDeleted uses the Amazon EKS API operation +// DescribeCluster to wait for a condition to be met before returning. +// If the condition is not met within the max attempt window, an error will +// be returned. +func (c *EKS) WaitUntilClusterDeleted(input *DescribeClusterInput) error { + return c.WaitUntilClusterDeletedWithContext(aws.BackgroundContext(), input) +} + +// WaitUntilClusterDeletedWithContext is an extended version of WaitUntilClusterDeleted. +// With the support for passing in a context and options to configure the +// Waiter and the underlying request options. +// +// 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 *EKS) WaitUntilClusterDeletedWithContext(ctx aws.Context, input *DescribeClusterInput, opts ...request.WaiterOption) error { + w := request.Waiter{ + Name: "WaitUntilClusterDeleted", + MaxAttempts: 40, + Delay: request.ConstantWaiterDelay(30 * time.Second), + Acceptors: []request.WaiterAcceptor{ + { + State: request.FailureWaiterState, + Matcher: request.PathWaiterMatch, Argument: "cluster.status", + Expected: "ACTIVE", + }, + { + State: request.FailureWaiterState, + Matcher: request.PathWaiterMatch, Argument: "cluster.status", + Expected: "CREATING", + }, + { + State: request.SuccessWaiterState, + Matcher: request.ErrorWaiterMatch, + Expected: "ResourceNotFoundException", + }, + }, + Logger: c.Config.Logger, + NewRequest: func(opts []request.Option) (*request.Request, error) { + var inCpy *DescribeClusterInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeClusterRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + w.ApplyOptions(opts...) + + return w.WaitWithContext(ctx) +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go index 18d404a5c6..f0b65981d9 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticache/api.go @@ -3,6 +3,7 @@ package elasticache import ( + "fmt" "time" "github.com/aws/aws-sdk-go/aws" @@ -17,7 +18,7 @@ const opAddTagsToResource = "AddTagsToResource" // AddTagsToResourceRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -65,7 +66,7 @@ func (c *ElastiCache) AddTagsToResourceRequest(input *AddTagsToResourceInput) (r // by your tags. You can apply tags that represent business categories (such // as cost centers, application names, or owners) to organize your costs across // multiple services. For more information, see Using Cost Allocation Tags in -// Amazon ElastiCache (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Tagging.html) +// Amazon ElastiCache (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Tagging.html) // in the ElastiCache User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -117,7 +118,7 @@ const opAuthorizeCacheSecurityGroupIngress = "AuthorizeCacheSecurityGroupIngress // AuthorizeCacheSecurityGroupIngressRequest generates a "aws/request.Request" representing the // client's request for the AuthorizeCacheSecurityGroupIngress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -215,7 +216,7 @@ const opCopySnapshot = "CopySnapshot" // CopySnapshotRequest generates a "aws/request.Request" representing the // client's request for the CopySnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -262,8 +263,8 @@ func (c *ElastiCache) CopySnapshotRequest(input *CopySnapshotInput) (req *reques // create their own Amazon S3 buckets and copy snapshots to it. To control access // to your snapshots, use an IAM policy to control who has the ability to use // the CopySnapshot operation. For more information about using IAM to control -// the use of ElastiCache operations, see Exporting Snapshots (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Snapshots.Exporting.html) -// and Authentication & Access Control (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/IAM.html). +// the use of ElastiCache operations, see Exporting Snapshots (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Snapshots.Exporting.html) +// and Authentication & Access Control (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/IAM.html). // // You could receive the following error messages. // @@ -272,19 +273,19 @@ func (c *ElastiCache) CopySnapshotRequest(input *CopySnapshotInput) (req *reques // * Error Message: The S3 bucket %s is outside of the region. // // Solution: Create an Amazon S3 bucket in the same region as your snapshot. -// For more information, see Step 1: Create an Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Snapshots.Exporting.html#Snapshots.Exporting.CreateBucket) +// For more information, see Step 1: Create an Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Snapshots.Exporting.html#Snapshots.Exporting.CreateBucket) // in the ElastiCache User Guide. // // * Error Message: The S3 bucket %s does not exist. // // Solution: Create an Amazon S3 bucket in the same region as your snapshot. -// For more information, see Step 1: Create an Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Snapshots.Exporting.html#Snapshots.Exporting.CreateBucket) +// For more information, see Step 1: Create an Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Snapshots.Exporting.html#Snapshots.Exporting.CreateBucket) // in the ElastiCache User Guide. // // * Error Message: The S3 bucket %s is not owned by the authenticated user. // // Solution: Create an Amazon S3 bucket in the same region as your snapshot. -// For more information, see Step 1: Create an Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Snapshots.Exporting.html#Snapshots.Exporting.CreateBucket) +// For more information, see Step 1: Create an Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Snapshots.Exporting.html#Snapshots.Exporting.CreateBucket) // in the ElastiCache User Guide. // // * Error Message: The authenticated user does not have sufficient permissions @@ -303,21 +304,21 @@ func (c *ElastiCache) CopySnapshotRequest(input *CopySnapshotInput) (req *reques // on the S3 Bucket. // // Solution: Add List and Read permissions on the bucket. For more information, -// see Step 2: Grant ElastiCache Access to Your Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Snapshots.Exporting.html#Snapshots.Exporting.GrantAccess) +// see Step 2: Grant ElastiCache Access to Your Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Snapshots.Exporting.html#Snapshots.Exporting.GrantAccess) // in the ElastiCache User Guide. // // * Error Message: ElastiCache has not been granted WRITE permissions %s // on the S3 Bucket. // // Solution: Add Upload/Delete permissions on the bucket. For more information, -// see Step 2: Grant ElastiCache Access to Your Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Snapshots.Exporting.html#Snapshots.Exporting.GrantAccess) +// see Step 2: Grant ElastiCache Access to Your Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Snapshots.Exporting.html#Snapshots.Exporting.GrantAccess) // in the ElastiCache User Guide. // // * Error Message: ElastiCache has not been granted READ_ACP permissions // %s on the S3 Bucket. // // Solution: Add View Permissions on the bucket. For more information, see Step -// 2: Grant ElastiCache Access to Your Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Snapshots.Exporting.html#Snapshots.Exporting.GrantAccess) +// 2: Grant ElastiCache Access to Your Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Snapshots.Exporting.html#Snapshots.Exporting.GrantAccess) // in the ElastiCache User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -375,7 +376,7 @@ const opCreateCacheCluster = "CreateCacheCluster" // CreateCacheClusterRequest generates a "aws/request.Request" representing the // client's request for the CreateCacheCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -417,9 +418,7 @@ func (c *ElastiCache) CreateCacheClusterRequest(input *CreateCacheClusterInput) // Creates a cluster. All nodes in the cluster run the same protocol-compliant // cache engine software, either Memcached or Redis. // -// Due to current limitations on Redis (cluster mode disabled), this operation -// or parameter is not supported on Redis (cluster mode enabled) replication -// groups. +// This operation is not supported for Redis (cluster mode enabled) clusters. // // 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 @@ -507,7 +506,7 @@ const opCreateCacheParameterGroup = "CreateCacheParameterGroup" // CreateCacheParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateCacheParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -558,7 +557,7 @@ func (c *ElastiCache) CreateCacheParameterGroupRequest(input *CreateCacheParamet // * ModifyCacheParameterGroup (http://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_ModifyCacheParameterGroup.html) // in the ElastiCache API Reference. // -// * Parameters and Parameter Groups (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/ParameterGroups.html) +// * Parameters and Parameter Groups (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.html) // in the ElastiCache User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -613,7 +612,7 @@ const opCreateCacheSecurityGroup = "CreateCacheSecurityGroup" // CreateCacheSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateCacheSecurityGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -708,7 +707,7 @@ const opCreateCacheSubnetGroup = "CreateCacheSubnetGroup" // CreateCacheSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateCacheSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -802,7 +801,7 @@ const opCreateReplicationGroup = "CreateReplicationGroup" // CreateReplicationGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateReplicationGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -860,7 +859,7 @@ func (c *ElastiCache) CreateReplicationGroupRequest(input *CreateReplicationGrou // group after it has been created. However, if you need to increase or decrease // the number of node groups (console: shards), you can avail yourself of ElastiCache // for Redis' enhanced backup and restore. For more information, see Restoring -// From a Backup with Cluster Resizing (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/backups-restoring.html) +// From a Backup with Cluster Resizing (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/backups-restoring.html) // in the ElastiCache User Guide. // // This operation is valid for Redis only. @@ -956,7 +955,7 @@ const opCreateSnapshot = "CreateSnapshot" // CreateSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1066,12 +1065,132 @@ func (c *ElastiCache) CreateSnapshotWithContext(ctx aws.Context, input *CreateSn return out, req.Send() } +const opDecreaseReplicaCount = "DecreaseReplicaCount" + +// DecreaseReplicaCountRequest generates a "aws/request.Request" representing the +// client's request for the DecreaseReplicaCount 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 DecreaseReplicaCount for more information on using the DecreaseReplicaCount +// 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 DecreaseReplicaCountRequest method. +// req, resp := client.DecreaseReplicaCountRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DecreaseReplicaCount +func (c *ElastiCache) DecreaseReplicaCountRequest(input *DecreaseReplicaCountInput) (req *request.Request, output *DecreaseReplicaCountOutput) { + op := &request.Operation{ + Name: opDecreaseReplicaCount, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DecreaseReplicaCountInput{} + } + + output = &DecreaseReplicaCountOutput{} + req = c.newRequest(op, input, output) + return +} + +// DecreaseReplicaCount API operation for Amazon ElastiCache. +// +// Dynamically decreases the number of replics in a Redis (cluster mode disabled) +// replication group or the number of replica nodes in one or more node groups +// (shards) of a Redis (cluster mode enabled) replication group. This operation +// is performed with no cluster down 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 +// the error. +// +// See the AWS API reference guide for Amazon ElastiCache's +// API operation DecreaseReplicaCount for usage and error information. +// +// Returned Error Codes: +// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" +// The specified replication group does not exist. +// +// * ErrCodeInvalidReplicationGroupStateFault "InvalidReplicationGroupState" +// The requested replication group is not in the available state. +// +// * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" +// The requested cluster is not in the available state. +// +// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" +// The VPC network is in an invalid state. +// +// * ErrCodeInsufficientCacheClusterCapacityFault "InsufficientCacheClusterCapacity" +// The requested cache node type is not available in the specified Availability +// Zone. +// +// * ErrCodeClusterQuotaForCustomerExceededFault "ClusterQuotaForCustomerExceeded" +// The request cannot be processed because it would exceed the allowed number +// of clusters per customer. +// +// * ErrCodeNodeGroupsPerReplicationGroupQuotaExceededFault "NodeGroupsPerReplicationGroupQuotaExceeded" +// The request cannot be processed because it would exceed the maximum allowed +// number of node groups (shards) in a single replication group. The default +// maximum is 15 +// +// * ErrCodeNodeQuotaForCustomerExceededFault "NodeQuotaForCustomerExceeded" +// The request cannot be processed because it would exceed the allowed number +// of cache nodes per customer. +// +// * ErrCodeServiceLinkedRoleNotFoundFault "ServiceLinkedRoleNotFoundFault" +// The specified service linked role (SLR) was not found. +// +// * ErrCodeNoOperationFault "NoOperationFault" +// The operation was not performed because no changes were required. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValue" +// The value for a parameter is invalid. +// +// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" +// Two or more incompatible parameters were specified. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/DecreaseReplicaCount +func (c *ElastiCache) DecreaseReplicaCount(input *DecreaseReplicaCountInput) (*DecreaseReplicaCountOutput, error) { + req, out := c.DecreaseReplicaCountRequest(input) + return out, req.Send() +} + +// DecreaseReplicaCountWithContext is the same as DecreaseReplicaCount with the addition of +// the ability to pass a context and additional request options. +// +// See DecreaseReplicaCount for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElastiCache) DecreaseReplicaCountWithContext(ctx aws.Context, input *DecreaseReplicaCountInput, opts ...request.Option) (*DecreaseReplicaCountOutput, error) { + req, out := c.DecreaseReplicaCountRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteCacheCluster = "DeleteCacheCluster" // DeleteCacheClusterRequest generates a "aws/request.Request" representing the // client's request for the DeleteCacheCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1119,9 +1238,7 @@ func (c *ElastiCache) DeleteCacheClusterRequest(input *DeleteCacheClusterInput) // of a replication group or node group (shard) that has Multi-AZ mode enabled // or a cluster from a Redis (cluster mode enabled) replication group. // -// Due to current limitations on Redis (cluster mode disabled), this operation -// or parameter is not supported on Redis (cluster mode enabled) replication -// groups. +// This operation is not valid for Redis (cluster mode enabled) clusters. // // 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 @@ -1188,7 +1305,7 @@ const opDeleteCacheParameterGroup = "DeleteCacheParameterGroup" // DeleteCacheParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteCacheParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1222,8 +1339,7 @@ func (c *ElastiCache) DeleteCacheParameterGroupRequest(input *DeleteCacheParamet output = &DeleteCacheParameterGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1281,7 +1397,7 @@ const opDeleteCacheSecurityGroup = "DeleteCacheSecurityGroup" // DeleteCacheSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteCacheSecurityGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1315,8 +1431,7 @@ func (c *ElastiCache) DeleteCacheSecurityGroupRequest(input *DeleteCacheSecurity output = &DeleteCacheSecurityGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1374,7 +1489,7 @@ const opDeleteCacheSubnetGroup = "DeleteCacheSubnetGroup" // DeleteCacheSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteCacheSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1408,8 +1523,7 @@ func (c *ElastiCache) DeleteCacheSubnetGroupRequest(input *DeleteCacheSubnetGrou output = &DeleteCacheSubnetGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1461,7 +1575,7 @@ const opDeleteReplicationGroup = "DeleteReplicationGroup" // DeleteReplicationGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteReplicationGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1577,7 +1691,7 @@ const opDeleteSnapshot = "DeleteSnapshot" // DeleteSnapshotRequest generates a "aws/request.Request" representing the // client's request for the DeleteSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1670,7 +1784,7 @@ const opDescribeCacheClusters = "DescribeCacheClusters" // DescribeCacheClustersRequest generates a "aws/request.Request" representing the // client's request for the DescribeCacheClusters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1832,7 +1946,7 @@ const opDescribeCacheEngineVersions = "DescribeCacheEngineVersions" // DescribeCacheEngineVersionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeCacheEngineVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1962,7 +2076,7 @@ const opDescribeCacheParameterGroups = "DescribeCacheParameterGroups" // DescribeCacheParameterGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeCacheParameterGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2106,7 +2220,7 @@ const opDescribeCacheParameters = "DescribeCacheParameters" // DescribeCacheParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeCacheParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2248,7 +2362,7 @@ const opDescribeCacheSecurityGroups = "DescribeCacheSecurityGroups" // DescribeCacheSecurityGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeCacheSecurityGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2391,7 +2505,7 @@ const opDescribeCacheSubnetGroups = "DescribeCacheSubnetGroups" // DescribeCacheSubnetGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeCacheSubnetGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2528,7 +2642,7 @@ const opDescribeEngineDefaultParameters = "DescribeEngineDefaultParameters" // DescribeEngineDefaultParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeEngineDefaultParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2667,7 +2781,7 @@ const opDescribeEvents = "DescribeEvents" // DescribeEventsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2810,7 +2924,7 @@ const opDescribeReplicationGroups = "DescribeReplicationGroups" // DescribeReplicationGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReplicationGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2955,7 +3069,7 @@ const opDescribeReservedCacheNodes = "DescribeReservedCacheNodes" // DescribeReservedCacheNodesRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedCacheNodes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3097,7 +3211,7 @@ const opDescribeReservedCacheNodesOfferings = "DescribeReservedCacheNodesOfferin // DescribeReservedCacheNodesOfferingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedCacheNodesOfferings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3238,7 +3352,7 @@ const opDescribeSnapshots = "DescribeSnapshots" // DescribeSnapshotsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSnapshots operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3382,12 +3496,129 @@ func (c *ElastiCache) DescribeSnapshotsPagesWithContext(ctx aws.Context, input * return p.Err() } +const opIncreaseReplicaCount = "IncreaseReplicaCount" + +// IncreaseReplicaCountRequest generates a "aws/request.Request" representing the +// client's request for the IncreaseReplicaCount 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 IncreaseReplicaCount for more information on using the IncreaseReplicaCount +// 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 IncreaseReplicaCountRequest method. +// req, resp := client.IncreaseReplicaCountRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/IncreaseReplicaCount +func (c *ElastiCache) IncreaseReplicaCountRequest(input *IncreaseReplicaCountInput) (req *request.Request, output *IncreaseReplicaCountOutput) { + op := &request.Operation{ + Name: opIncreaseReplicaCount, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &IncreaseReplicaCountInput{} + } + + output = &IncreaseReplicaCountOutput{} + req = c.newRequest(op, input, output) + return +} + +// IncreaseReplicaCount API operation for Amazon ElastiCache. +// +// Dynamically increases the number of replics in a Redis (cluster mode disabled) +// replication group or the number of replica nodes in one or more node groups +// (shards) of a Redis (cluster mode enabled) replication group. This operation +// is performed with no cluster down 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 +// the error. +// +// See the AWS API reference guide for Amazon ElastiCache's +// API operation IncreaseReplicaCount for usage and error information. +// +// Returned Error Codes: +// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" +// The specified replication group does not exist. +// +// * ErrCodeInvalidReplicationGroupStateFault "InvalidReplicationGroupState" +// The requested replication group is not in the available state. +// +// * ErrCodeInvalidCacheClusterStateFault "InvalidCacheClusterState" +// The requested cluster is not in the available state. +// +// * ErrCodeInvalidVPCNetworkStateFault "InvalidVPCNetworkStateFault" +// The VPC network is in an invalid state. +// +// * ErrCodeInsufficientCacheClusterCapacityFault "InsufficientCacheClusterCapacity" +// The requested cache node type is not available in the specified Availability +// Zone. +// +// * ErrCodeClusterQuotaForCustomerExceededFault "ClusterQuotaForCustomerExceeded" +// The request cannot be processed because it would exceed the allowed number +// of clusters per customer. +// +// * ErrCodeNodeGroupsPerReplicationGroupQuotaExceededFault "NodeGroupsPerReplicationGroupQuotaExceeded" +// The request cannot be processed because it would exceed the maximum allowed +// number of node groups (shards) in a single replication group. The default +// maximum is 15 +// +// * ErrCodeNodeQuotaForCustomerExceededFault "NodeQuotaForCustomerExceeded" +// The request cannot be processed because it would exceed the allowed number +// of cache nodes per customer. +// +// * ErrCodeNoOperationFault "NoOperationFault" +// The operation was not performed because no changes were required. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValue" +// The value for a parameter is invalid. +// +// * ErrCodeInvalidParameterCombinationException "InvalidParameterCombination" +// Two or more incompatible parameters were specified. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/IncreaseReplicaCount +func (c *ElastiCache) IncreaseReplicaCount(input *IncreaseReplicaCountInput) (*IncreaseReplicaCountOutput, error) { + req, out := c.IncreaseReplicaCountRequest(input) + return out, req.Send() +} + +// IncreaseReplicaCountWithContext is the same as IncreaseReplicaCount with the addition of +// the ability to pass a context and additional request options. +// +// See IncreaseReplicaCount for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *ElastiCache) IncreaseReplicaCountWithContext(ctx aws.Context, input *IncreaseReplicaCountInput, opts ...request.Option) (*IncreaseReplicaCountOutput, error) { + req, out := c.IncreaseReplicaCountRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListAllowedNodeTypeModifications = "ListAllowedNodeTypeModifications" // ListAllowedNodeTypeModificationsRequest generates a "aws/request.Request" representing the // client's request for the ListAllowedNodeTypeModifications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3480,7 +3711,7 @@ const opListTagsForResource = "ListTagsForResource" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3524,9 +3755,11 @@ func (c *ElastiCache) ListTagsForResourceRequest(input *ListTagsForResourceInput // optional. You can use cost allocation tags to categorize and track your AWS // costs. // +// If the cluster is not in the available state, ListTagsForResource returns +// an error. +// // You can have a maximum of 50 cost allocation tags on an ElastiCache resource. -// For more information, see Using Cost Allocation Tags in Amazon ElastiCache -// (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/BestPractices.html). +// For more information, see Monitoring Costs with Tags (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Tagging.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 @@ -3572,7 +3805,7 @@ const opModifyCacheCluster = "ModifyCacheCluster" // ModifyCacheClusterRequest generates a "aws/request.Request" representing the // client's request for the ModifyCacheCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3688,7 +3921,7 @@ const opModifyCacheParameterGroup = "ModifyCacheParameterGroup" // ModifyCacheParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyCacheParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3780,7 +4013,7 @@ const opModifyCacheSubnetGroup = "ModifyCacheSubnetGroup" // ModifyCacheSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyCacheSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3870,7 +4103,7 @@ const opModifyReplicationGroup = "ModifyReplicationGroup" // ModifyReplicationGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyReplicationGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3911,9 +4144,16 @@ func (c *ElastiCache) ModifyReplicationGroupRequest(input *ModifyReplicationGrou // // Modifies the settings for a replication group. // -// Due to current limitations on Redis (cluster mode disabled), this operation -// or parameter is not supported on Redis (cluster mode enabled) replication -// groups. +// For Redis (cluster mode enabled) clusters, this operation cannot be used +// to change a cluster's node type or engine version. For more information, +// see: +// +// * Scaling for Amazon ElastiCache for Redis—Redis (cluster mode enabled) +// (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/scaling-redis-cluster-mode-enabled.html) +// in the ElastiCache User Guide +// +// * ModifyReplicationGroupShardConfiguration (http://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_ModifyReplicationGroupShardConfiguration.html) +// in the ElastiCache API Reference // // This operation is valid for Redis only. // @@ -3996,7 +4236,7 @@ const opModifyReplicationGroupShardConfiguration = "ModifyReplicationGroupShardC // ModifyReplicationGroupShardConfigurationRequest generates a "aws/request.Request" representing the // client's request for the ModifyReplicationGroupShardConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4035,14 +4275,8 @@ func (c *ElastiCache) ModifyReplicationGroupShardConfigurationRequest(input *Mod // ModifyReplicationGroupShardConfiguration API operation for Amazon ElastiCache. // -// Performs horizontal scaling on a Redis (cluster mode enabled) cluster with -// no downtime. Requires Redis engine version 3.2.10 or newer. For information -// on upgrading your engine to a newer version, see Upgrading Engine Versions -// (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/VersionManagement.html) -// in the Amazon ElastiCache User Guide. -// -// For more information on ElastiCache for Redis online horizontal scaling, -// see ElastiCache for Redis Horizontal Scaling (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/redis-cluster-resharding-online.html) +// Modifies a replication group's shards (node groups) by allowing you to add +// shards, remove shards, or rebalance the keyspaces among exisiting shards. // // 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 @@ -4110,7 +4344,7 @@ const opPurchaseReservedCacheNodesOffering = "PurchaseReservedCacheNodesOffering // PurchaseReservedCacheNodesOfferingRequest generates a "aws/request.Request" representing the // client's request for the PurchaseReservedCacheNodesOffering operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4202,7 +4436,7 @@ const opRebootCacheCluster = "RebootCacheCluster" // RebootCacheClusterRequest generates a "aws/request.Request" representing the // client's request for the RebootCacheCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4256,7 +4490,7 @@ func (c *ElastiCache) RebootCacheClusterRequest(input *RebootCacheClusterInput) // enabled) clusters. // // If you make changes to parameters that require a Redis (cluster mode enabled) -// cluster reboot for the changes to be applied, see Rebooting a Cluster (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Clusters.Rebooting.htm) +// cluster reboot for the changes to be applied, see Rebooting a Cluster (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.Rebooting.html) // for an alternate process. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -4300,7 +4534,7 @@ const opRemoveTagsFromResource = "RemoveTagsFromResource" // RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4388,7 +4622,7 @@ const opResetCacheParameterGroup = "ResetCacheParameterGroup" // ResetCacheParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the ResetCacheParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4481,7 +4715,7 @@ const opRevokeCacheSecurityGroupIngress = "RevokeCacheSecurityGroupIngress" // RevokeCacheSecurityGroupIngressRequest generates a "aws/request.Request" representing the // client's request for the RevokeCacheSecurityGroupIngress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4575,7 +4809,7 @@ const opTestFailover = "TestFailover" // TestFailoverRequest generates a "aws/request.Request" representing the // client's request for the TestFailover operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4650,13 +4884,13 @@ func (c *ElastiCache) TestFailoverRequest(input *TestFailoverInput) (req *reques // // For more information see: // -// Viewing ElastiCache Events (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/ECEvents.Viewing.html) +// Viewing ElastiCache Events (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ECEvents.Viewing.html) // in the ElastiCache User Guide // // DescribeEvents (http://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_DescribeEvents.html) // in the ElastiCache API Reference // -// Also see, Testing Multi-AZ with Automatic Failover (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/AutoFailover.html#auto-failover-test) +// Also see, Testing Multi-AZ with Automatic Failover (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/AutoFailover.html#auto-failover-test) // in the ElastiCache User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -4685,6 +4919,7 @@ func (c *ElastiCache) TestFailoverRequest(input *TestFailoverInput) (req *reques // The specified replication group does not exist. // // * ErrCodeTestFailoverNotAvailableFault "TestFailoverNotAvailableFault" +// The TestFailover action is not available. // // * ErrCodeInvalidParameterValueException "InvalidParameterValue" // The value for a parameter is invalid. @@ -4907,6 +5142,9 @@ type CacheCluster struct { // is created. To enable at-rest encryption on a cluster you must set AtRestEncryptionEnabled // to true when you create a cluster. // + // Required: Only available when creating a replication group in an Amazon VPC + // using redis version 3.2.6 or 4.x. + // // Default: false AtRestEncryptionEnabled *bool `type:"boolean"` @@ -4966,6 +5204,9 @@ type CacheCluster struct { // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, // cache.r3.8xlarge // + // R4 node types;cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, + // cache.r4.8xlarge, cache.r4.16xlarge + // // Previous generation: (not recommended) // // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge @@ -4984,10 +5225,13 @@ type CacheCluster struct { // * Redis Append-only files (AOF) functionality is not supported for T1 // or T2 instances. // - // For a complete listing of node types and specifications, see Amazon ElastiCache - // Product Features and Details (http://aws.amazon.com/elasticache/details) - // and either Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) - // or Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific). + // For a complete listing of node types and specifications, see: + // + // * Amazon ElastiCache Product Features and Details (http://aws.amazon.com/elasticache/details) + // + // * Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/ParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) + // + // * Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific) CacheNodeType *string `type:"string"` // A list of cache nodes that are members of the cluster. @@ -5088,6 +5332,9 @@ type CacheCluster struct { // is created. To enable in-transit encryption on a cluster you must set TransitEncryptionEnabled // to true when you create a cluster. // + // Required: Only available when creating a replication group in an Amazon VPC + // using redis version 3.2.6 or 4.x. + // // Default: false TransitEncryptionEnabled *bool `type:"boolean"` } @@ -5264,7 +5511,7 @@ type CacheEngineVersion struct { // The name of the cache parameter group family associated with this cache engine. // - // Valid values are: memcached1.4 | redis2.6 | redis2.8 | redis3.2 + // Valid values are: memcached1.4 | redis2.6 | redis2.8 | redis3.2 | redis4.0 CacheParameterGroupFamily *string `type:"string"` // The name of the cache engine. @@ -5352,6 +5599,9 @@ func (s *CacheEngineVersion) SetEngineVersion(v string) *CacheEngineVersion { // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, // cache.r3.8xlarge // +// R4 node types;cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, +// cache.r4.8xlarge, cache.r4.16xlarge +// // Previous generation: (not recommended) // // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge @@ -5370,10 +5620,13 @@ func (s *CacheEngineVersion) SetEngineVersion(v string) *CacheEngineVersion { // * Redis Append-only files (AOF) functionality is not supported for T1 // or T2 instances. // -// For a complete listing of node types and specifications, see Amazon ElastiCache -// Product Features and Details (http://aws.amazon.com/elasticache/details) -// and either Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) -// or Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific). +// For a complete listing of node types and specifications, see: +// +// * Amazon ElastiCache Product Features and Details (http://aws.amazon.com/elasticache/details) +// +// * Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/ParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) +// +// * Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific) type CacheNode struct { _ struct{} `type:"structure"` @@ -5469,7 +5722,7 @@ type CacheNodeTypeSpecificParameter struct { // Indicates whether a change to the parameter is applied immediately or requires // a reboot for the change to be applied. You can force a reboot or wait until // the next maintenance window's reboot. For more information, see Rebooting - // a Cluster (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Clusters.Rebooting.html). + // a Cluster (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.Rebooting.html). ChangeType *string `type:"string" enum:"ChangeType"` // The valid data type for the parameter. @@ -5597,7 +5850,7 @@ type CacheParameterGroup struct { // The name of the cache parameter group family that this cache parameter group // is compatible with. // - // Valid values are: memcached1.4 | redis2.6 | redis2.8 | redis3.2 + // Valid values are: memcached1.4 | redis2.6 | redis2.8 | redis3.2 | redis4.0 CacheParameterGroupFamily *string `type:"string"` // The name of the cache parameter group. @@ -5855,6 +6108,93 @@ func (s *CacheSubnetGroup) SetVpcId(v string) *CacheSubnetGroup { return s } +// Node group (shard) configuration options when adding or removing replicas. +// Each node group (shard) configuration has the following members: NodeGroupId, +// NewReplicaCount, and PreferredAvailabilityZones. +type ConfigureShard struct { + _ struct{} `type:"structure"` + + // The number of replicas you want in this node group at the end of this operation. + // The maximum value for NewReplicaCount is 5. The minimum value depends upon + // the type of Redis replication group you are working with. + // + // The minimum number of replicas in a shard or replication group is: + // + // * Redis (cluster mode disabled) + // + // If Multi-AZ with Automatic Failover is enabled: 1 + // + // If Multi-AZ with Automatic Failover is not enable: 0 + // + // * Redis (cluster mode enabled): 0 (though you will not be able to failover + // to a replica if your primary node fails) + // + // NewReplicaCount is a required field + NewReplicaCount *int64 `type:"integer" required:"true"` + + // The 4-digit id for the node group you are configuring. For Redis (cluster + // mode disabled) replication groups, the node group id is always 0001. To find + // a Redis (cluster mode enabled)'s node group's (shard's) id, see Finding a + // Shard's Id (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/shard-find-id.html). + // + // NodeGroupId is a required field + NodeGroupId *string `min:"1" type:"string" required:"true"` + + // A list of PreferredAvailabilityZone strings that specify which availability + // zones the replication group's nodes are to be in. The nummber of PreferredAvailabilityZone + // values must equal the value of NewReplicaCount plus 1 to account for the + // primary node. If this member of ReplicaConfiguration is omitted, ElastiCache + // for Redis selects the availability zone for each of the replicas. + PreferredAvailabilityZones []*string `locationNameList:"PreferredAvailabilityZone" type:"list"` +} + +// String returns the string representation +func (s ConfigureShard) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConfigureShard) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ConfigureShard) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ConfigureShard"} + if s.NewReplicaCount == nil { + invalidParams.Add(request.NewErrParamRequired("NewReplicaCount")) + } + if s.NodeGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("NodeGroupId")) + } + if s.NodeGroupId != nil && len(*s.NodeGroupId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NodeGroupId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNewReplicaCount sets the NewReplicaCount field's value. +func (s *ConfigureShard) SetNewReplicaCount(v int64) *ConfigureShard { + s.NewReplicaCount = &v + return s +} + +// SetNodeGroupId sets the NodeGroupId field's value. +func (s *ConfigureShard) SetNodeGroupId(v string) *ConfigureShard { + s.NodeGroupId = &v + return s +} + +// SetPreferredAvailabilityZones sets the PreferredAvailabilityZones field's value. +func (s *ConfigureShard) SetPreferredAvailabilityZones(v []*string) *ConfigureShard { + s.PreferredAvailabilityZones = v + return s +} + // Represents the input of a CopySnapshotMessage operation. type CopySnapshotInput struct { _ struct{} `type:"structure"` @@ -5869,10 +6209,10 @@ type CopySnapshotInput struct { // // When using this parameter to export a snapshot, be sure Amazon ElastiCache // has the needed permissions to this S3 bucket. For more information, see Step - // 2: Grant ElastiCache Access to Your Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Snapshots.Exporting.html#Snapshots.Exporting.GrantAccess) + // 2: Grant ElastiCache Access to Your Amazon S3 Bucket (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Snapshots.Exporting.html#Snapshots.Exporting.GrantAccess) // in the Amazon ElastiCache User Guide. // - // For more information, see Exporting a Snapshot (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Snapshots.Exporting.html) + // For more information, see Exporting a Snapshot (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Snapshots.Exporting.html) // in the Amazon ElastiCache User Guide. TargetBucket *string `type:"string"` @@ -5968,13 +6308,6 @@ type CreateCacheClusterInput struct { // Reserved parameter. The password used to access a password protected server. // - // This parameter is valid only if: - // - // * The parameter TransitEncryptionEnabled was set to true when the cluster - // was created. - // - // * The line requirepass was added to the database configuration file. - // // Password constraints: // // * Must be only printable ASCII characters. @@ -6040,6 +6373,9 @@ type CreateCacheClusterInput struct { // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, // cache.r3.8xlarge // + // R4 node types;cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, + // cache.r4.8xlarge, cache.r4.16xlarge + // // Previous generation: (not recommended) // // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge @@ -6058,10 +6394,13 @@ type CreateCacheClusterInput struct { // * Redis Append-only files (AOF) functionality is not supported for T1 // or T2 instances. // - // For a complete listing of node types and specifications, see Amazon ElastiCache - // Product Features and Details (http://aws.amazon.com/elasticache/details) - // and either Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) - // or Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific). + // For a complete listing of node types and specifications, see: + // + // * Amazon ElastiCache Product Features and Details (http://aws.amazon.com/elasticache/details) + // + // * Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/ParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) + // + // * Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific) CacheNodeType *string `type:"string"` // The name of the parameter group to associate with this cluster. If this argument @@ -6083,7 +6422,7 @@ type CreateCacheClusterInput struct { // // If you're going to launch your cluster in an Amazon VPC, you need to create // a subnet group before you start creating a cluster. For more information, - // see Subnets and Subnet Groups (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/SubnetGroups.html). + // see Subnets and Subnet Groups (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SubnetGroups.html). CacheSubnetGroupName *string `type:"string"` // The name of the cache engine to be used for this cluster. @@ -6096,7 +6435,7 @@ type CreateCacheClusterInput struct { // operation. // // Important: You can upgrade to a newer engine version (see Selecting a Cache - // Engine and Version (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/SelectEngine.html#VersionManagement)), + // Engine and Version (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SelectEngine.html#VersionManagement)), // but you cannot downgrade to an earlier engine version. If you want to use // an earlier engine version, you must delete the existing cluster or replication // group and create it anew with the earlier engine version. @@ -6175,10 +6514,6 @@ type CreateCacheClusterInput struct { // Example: sun:23:00-mon:01:30 PreferredMaintenanceWindow *string `type:"string"` - // Due to current limitations on Redis (cluster mode disabled), this operation - // or parameter is not supported on Redis (cluster mode enabled) replication - // groups. - // // The ID of the replication group to which this cluster should belong. If this // parameter is specified, the cluster is added to the specified replication // group as a read replica; otherwise, the cluster is a standalone primary that @@ -6220,7 +6555,7 @@ type CreateCacheClusterInput struct { // // This parameter is only valid if the Engine parameter is redis. // - // Default: 0 (i.e., automatic backups are disabled for this cluster). + // Default: 0 (i.e., automatic backups are disabled for this cache cluster). SnapshotRetentionLimit *int64 `type:"integer"` // The daily time range (in UTC) during which ElastiCache begins taking a daily @@ -6429,7 +6764,7 @@ type CreateCacheParameterGroupInput struct { // The name of the cache parameter group family that the cache parameter group // can be used with. // - // Valid values are: memcached1.4 | redis2.6 | redis2.8 | redis3.2 + // Valid values are: memcached1.4 | redis2.6 | redis2.8 | redis3.2 | redis4.0 // // CacheParameterGroupFamily is a required field CacheParameterGroupFamily *string `type:"string" required:"true"` @@ -6712,20 +7047,19 @@ type CreateReplicationGroupInput struct { // must set AtRestEncryptionEnabled to true when you create the replication // group. // - // This parameter is valid only if the Engine parameter is redis and the cluster - // is being created in an Amazon VPC. + // Required: Only available when creating a replication group in an Amazon VPC + // using redis version 3.2.6 or 4.x. // // Default: false AtRestEncryptionEnabled *bool `type:"boolean"` // Reserved parameter. The password used to access a password protected server. // - // This parameter is valid only if: - // - // * The parameter TransitEncryptionEnabled was set to true when the cluster - // was created. + // AuthToken can be specified only on replication groups where TransitEncryptionEnabled + // is true. // - // * The line requirepass was added to the database configuration file. + // For HIPAA compliance, you must specify TransitEncryptionEnabled as true, + // an AuthToken, and a CacheSubnetGroup. // // Password constraints: // @@ -6799,6 +7133,9 @@ type CreateReplicationGroupInput struct { // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, // cache.r3.8xlarge // + // R4 node types;cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, + // cache.r4.8xlarge, cache.r4.16xlarge + // // Previous generation: (not recommended) // // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge @@ -6817,10 +7154,13 @@ type CreateReplicationGroupInput struct { // * Redis Append-only files (AOF) functionality is not supported for T1 // or T2 instances. // - // For a complete listing of node types and specifications, see Amazon ElastiCache - // Product Features and Details (http://aws.amazon.com/elasticache/details) - // and either Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) - // or Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific). + // For a complete listing of node types and specifications, see: + // + // * Amazon ElastiCache Product Features and Details (http://aws.amazon.com/elasticache/details) + // + // * Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/ParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) + // + // * Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific) CacheNodeType *string `type:"string"` // The name of the parameter group to associate with this replication group. @@ -6843,7 +7183,7 @@ type CreateReplicationGroupInput struct { // // If you're going to launch your cluster in an Amazon VPC, you need to create // a subnet group before you start creating a cluster. For more information, - // see Subnets and Subnet Groups (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/SubnetGroups.html). + // see Subnets and Subnet Groups (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SubnetGroups.html). CacheSubnetGroupName *string `type:"string"` // The name of the cache engine to be used for the clusters in this replication @@ -6855,7 +7195,7 @@ type CreateReplicationGroupInput struct { // operation. // // Important: You can upgrade to a newer engine version (see Selecting a Cache - // Engine and Version (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/SelectEngine.html#VersionManagement)) + // Engine and Version (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SelectEngine.html#VersionManagement)) // in the ElastiCache User Guide, but you cannot downgrade to an earlier engine // version. If you want to use an earlier engine version, you must delete the // existing cluster or replication group and create it anew with the earlier @@ -6863,12 +7203,15 @@ type CreateReplicationGroupInput struct { EngineVersion *string `type:"string"` // A list of node group (shard) configuration options. Each node group (shard) - // configuration has the following: Slots, PrimaryAvailabilityZone, ReplicaAvailabilityZones, - // ReplicaCount. + // configuration has the following members: PrimaryAvailabilityZone, ReplicaAvailabilityZones, + // ReplicaCount, and Slots. // // If you're creating a Redis (cluster mode disabled) or a Redis (cluster mode // enabled) replication group, you can use this parameter to individually configure - // each node group (shard), or you can omit this parameter. + // each node group (shard), or you can omit this parameter. However, when seeding + // a Redis (cluster mode enabled) cluster from a S3 rdb file, you must configure + // each node group (shard) using this parameter because you must specify the + // slots for each node group. NodeGroupConfiguration []*NodeGroupConfiguration `locationNameList:"NodeGroupConfiguration" type:"list"` // The Amazon Resource Name (ARN) of the Amazon Simple Notification Service @@ -6887,7 +7230,7 @@ type CreateReplicationGroupInput struct { // (it will default to 1), or you can explicitly set it to a value between 2 // and 6. // - // The maximum permitted value for NumCacheClusters is 6 (primary plus 5 replicas). + // The maximum permitted value for NumCacheClusters is 6 (1 primary plus 5 replicas). NumCacheClusters *int64 `type:"integer"` // An optional parameter that specifies the number of node groups (shards) for @@ -7014,7 +7357,7 @@ type CreateReplicationGroupInput struct { SnapshotWindow *string `type:"string"` // A list of cost allocation tags to be added to this resource. A tag is a key-value - // pair. A tag key does not have to be accompanied by a tag value. + // pair. Tags []*Tag `locationNameList:"Tag" type:"list"` // A flag that enables in-transit encryption when set to true. @@ -7024,12 +7367,18 @@ type CreateReplicationGroupInput struct { // to true when you create a cluster. // // This parameter is valid only if the Engine parameter is redis, the EngineVersion - // parameter is 3.2.4 or later, and the cluster is being created in an Amazon + // parameter is 3.2.6 or 4.x, and the cluster is being created in an Amazon // VPC. // // If you enable in-transit encryption, you must also specify a value for CacheSubnetGroup. // + // Required: Only available when creating a replication group in an Amazon VPC + // using redis version 3.2.6 or 4.x. + // // Default: false + // + // For HIPAA compliance, you must specify TransitEncryptionEnabled as true, + // an AuthToken, and a CacheSubnetGroup. TransitEncryptionEnabled *bool `type:"boolean"` } @@ -7052,6 +7401,16 @@ func (s *CreateReplicationGroupInput) Validate() error { if s.ReplicationGroupId == nil { invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) } + if s.NodeGroupConfiguration != nil { + for i, v := range s.NodeGroupConfiguration { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "NodeGroupConfiguration", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -7333,6 +7692,137 @@ func (s *CreateSnapshotOutput) SetSnapshot(v *Snapshot) *CreateSnapshotOutput { return s } +type DecreaseReplicaCountInput struct { + _ struct{} `type:"structure"` + + // If True, the number of replica nodes is decreased immediately. If False, + // the number of replica nodes is decreased during the next maintenance window. + // + // ApplyImmediately is a required field + ApplyImmediately *bool `type:"boolean" required:"true"` + + // The number of read replica nodes you want at the completion of this operation. + // For Redis (cluster mode disabled) replication groups, this is the number + // of replica nodes in the replication group. For Redis (cluster mode enabled) + // replication groups, this is the number of replica nodes in each of the replication + // group's node groups. + // + // The minimum number of replicas in a shard or replication group is: + // + // * Redis (cluster mode disabled) + // + // If Multi-AZ with Automatic Failover is enabled: 1 + // + // If Multi-AZ with Automatic Failover is not enabled: 0 + // + // * Redis (cluster mode enabled): 0 (though you will not be able to failover + // to a replica if your primary node fails) + NewReplicaCount *int64 `type:"integer"` + + // A list of ConfigureShard objects that can be used to configure each shard + // in a Redis (cluster mode enabled) replication group. The ConfigureShard has + // three members: NewReplicaCount, NodeGroupId, and PreferredAvailabilityZones. + ReplicaConfiguration []*ConfigureShard `locationNameList:"ConfigureShard" type:"list"` + + // A list of the node ids to remove from the replication group or node group + // (shard). + ReplicasToRemove []*string `type:"list"` + + // The id of the replication group from which you want to remove replica nodes. + // + // ReplicationGroupId is a required field + ReplicationGroupId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DecreaseReplicaCountInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DecreaseReplicaCountInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DecreaseReplicaCountInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DecreaseReplicaCountInput"} + if s.ApplyImmediately == nil { + invalidParams.Add(request.NewErrParamRequired("ApplyImmediately")) + } + if s.ReplicationGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) + } + if s.ReplicaConfiguration != nil { + for i, v := range s.ReplicaConfiguration { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReplicaConfiguration", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplyImmediately sets the ApplyImmediately field's value. +func (s *DecreaseReplicaCountInput) SetApplyImmediately(v bool) *DecreaseReplicaCountInput { + s.ApplyImmediately = &v + return s +} + +// SetNewReplicaCount sets the NewReplicaCount field's value. +func (s *DecreaseReplicaCountInput) SetNewReplicaCount(v int64) *DecreaseReplicaCountInput { + s.NewReplicaCount = &v + return s +} + +// SetReplicaConfiguration sets the ReplicaConfiguration field's value. +func (s *DecreaseReplicaCountInput) SetReplicaConfiguration(v []*ConfigureShard) *DecreaseReplicaCountInput { + s.ReplicaConfiguration = v + return s +} + +// SetReplicasToRemove sets the ReplicasToRemove field's value. +func (s *DecreaseReplicaCountInput) SetReplicasToRemove(v []*string) *DecreaseReplicaCountInput { + s.ReplicasToRemove = v + return s +} + +// SetReplicationGroupId sets the ReplicationGroupId field's value. +func (s *DecreaseReplicaCountInput) SetReplicationGroupId(v string) *DecreaseReplicaCountInput { + s.ReplicationGroupId = &v + return s +} + +type DecreaseReplicaCountOutput struct { + _ struct{} `type:"structure"` + + // Contains all of the attributes of a specific Redis replication group. + ReplicationGroup *ReplicationGroup `type:"structure"` +} + +// String returns the string representation +func (s DecreaseReplicaCountOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DecreaseReplicaCountOutput) GoString() string { + return s.String() +} + +// SetReplicationGroup sets the ReplicationGroup field's value. +func (s *DecreaseReplicaCountOutput) SetReplicationGroup(v *ReplicationGroup) *DecreaseReplicaCountOutput { + s.ReplicationGroup = v + return s +} + // Represents the input of a DeleteCacheCluster operation. type DeleteCacheClusterInput struct { _ struct{} `type:"structure"` @@ -7833,7 +8323,7 @@ type DescribeCacheEngineVersionsInput struct { // The name of a specific cache parameter group family to return details for. // - // Valid values are: memcached1.4 | redis2.6 | redis2.8 | redis3.2 + // Valid values are: memcached1.4 | redis2.6 | redis2.8 | redis3.2 | redis4.0 // // Constraints: // @@ -8328,7 +8818,7 @@ type DescribeEngineDefaultParametersInput struct { // The name of the cache parameter group family. // - // Valid values are: memcached1.4 | redis2.6 | redis2.8 | redis3.2 + // Valid values are: memcached1.4 | redis2.6 | redis2.8 | redis3.2 | redis4.0 // // CacheParameterGroupFamily is a required field CacheParameterGroupFamily *string `type:"string" required:"true"` @@ -8669,6 +9159,9 @@ type DescribeReservedCacheNodesInput struct { // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, // cache.r3.8xlarge // + // R4 node types;cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, + // cache.r4.8xlarge, cache.r4.16xlarge + // // Previous generation: (not recommended) // // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge @@ -8687,10 +9180,13 @@ type DescribeReservedCacheNodesInput struct { // * Redis Append-only files (AOF) functionality is not supported for T1 // or T2 instances. // - // For a complete listing of node types and specifications, see Amazon ElastiCache - // Product Features and Details (http://aws.amazon.com/elasticache/details) - // and either Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) - // or Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific). + // For a complete listing of node types and specifications, see: + // + // * Amazon ElastiCache Product Features and Details (http://aws.amazon.com/elasticache/details) + // + // * Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/ParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) + // + // * Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific) CacheNodeType *string `type:"string"` // The duration filter value, specified in years or seconds. Use this parameter @@ -8831,6 +9327,9 @@ type DescribeReservedCacheNodesOfferingsInput struct { // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, // cache.r3.8xlarge // + // R4 node types;cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, + // cache.r4.8xlarge, cache.r4.16xlarge + // // Previous generation: (not recommended) // // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge @@ -8849,10 +9348,13 @@ type DescribeReservedCacheNodesOfferingsInput struct { // * Redis Append-only files (AOF) functionality is not supported for T1 // or T2 instances. // - // For a complete listing of node types and specifications, see Amazon ElastiCache - // Product Features and Details (http://aws.amazon.com/elasticache/details) - // and either Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) - // or Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific). + // For a complete listing of node types and specifications, see: + // + // * Amazon ElastiCache Product Features and Details (http://aws.amazon.com/elasticache/details) + // + // * Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/ParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) + // + // * Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific) CacheNodeType *string `type:"string"` // Duration filter value, specified in years or seconds. Use this parameter @@ -9228,7 +9730,7 @@ type EngineDefaults struct { // Specifies the name of the cache parameter group family to which the engine // default parameters apply. // - // Valid values are: memcached1.4 | redis2.6 | redis2.8 | redis3.2 + // Valid values are: memcached1.4 | redis2.6 | redis2.8 | redis3.2 | redis4.0 CacheParameterGroupFamily *string `type:"string"` // Provides an identifier to allow retrieval of paginated results. @@ -9327,6 +9829,116 @@ func (s *Event) SetSourceType(v string) *Event { return s } +type IncreaseReplicaCountInput struct { + _ struct{} `type:"structure"` + + // If True, the number of replica nodes is increased immediately. If False, + // the number of replica nodes is increased during the next maintenance window. + // + // ApplyImmediately is a required field + ApplyImmediately *bool `type:"boolean" required:"true"` + + // The number of read replica nodes you want at the completion of this operation. + // For Redis (cluster mode disabled) replication groups, this is the number + // of replica nodes in the replication group. For Redis (cluster mode enabled) + // replication groups, this is the number of replica nodes in each of the replication + // group's node groups. + NewReplicaCount *int64 `type:"integer"` + + // A list of ConfigureShard objects that can be used to configure each shard + // in a Redis (cluster mode enabled) replication group. The ConfigureShard has + // three members: NewReplicaCount, NodeGroupId, and PreferredAvailabilityZones. + ReplicaConfiguration []*ConfigureShard `locationNameList:"ConfigureShard" type:"list"` + + // The id of the replication group to which you want to add replica nodes. + // + // ReplicationGroupId is a required field + ReplicationGroupId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s IncreaseReplicaCountInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IncreaseReplicaCountInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *IncreaseReplicaCountInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "IncreaseReplicaCountInput"} + if s.ApplyImmediately == nil { + invalidParams.Add(request.NewErrParamRequired("ApplyImmediately")) + } + if s.ReplicationGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) + } + if s.ReplicaConfiguration != nil { + for i, v := range s.ReplicaConfiguration { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReplicaConfiguration", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplyImmediately sets the ApplyImmediately field's value. +func (s *IncreaseReplicaCountInput) SetApplyImmediately(v bool) *IncreaseReplicaCountInput { + s.ApplyImmediately = &v + return s +} + +// SetNewReplicaCount sets the NewReplicaCount field's value. +func (s *IncreaseReplicaCountInput) SetNewReplicaCount(v int64) *IncreaseReplicaCountInput { + s.NewReplicaCount = &v + return s +} + +// SetReplicaConfiguration sets the ReplicaConfiguration field's value. +func (s *IncreaseReplicaCountInput) SetReplicaConfiguration(v []*ConfigureShard) *IncreaseReplicaCountInput { + s.ReplicaConfiguration = v + return s +} + +// SetReplicationGroupId sets the ReplicationGroupId field's value. +func (s *IncreaseReplicaCountInput) SetReplicationGroupId(v string) *IncreaseReplicaCountInput { + s.ReplicationGroupId = &v + return s +} + +type IncreaseReplicaCountOutput struct { + _ struct{} `type:"structure"` + + // Contains all of the attributes of a specific Redis replication group. + ReplicationGroup *ReplicationGroup `type:"structure"` +} + +// String returns the string representation +func (s IncreaseReplicaCountOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IncreaseReplicaCountOutput) GoString() string { + return s.String() +} + +// SetReplicationGroup sets the ReplicationGroup field's value. +func (s *IncreaseReplicaCountOutput) SetReplicationGroup(v *ReplicationGroup) *IncreaseReplicaCountOutput { + s.ReplicationGroup = v + return s +} + // The input parameters for the ListAllowedNodeTypeModifications operation. type ListAllowedNodeTypeModificationsInput struct { _ struct{} `type:"structure"` @@ -9461,7 +10073,7 @@ type ModifyCacheClusterInput struct { // Only newly created nodes are located in different Availability Zones. For // instructions on how to move existing Memcached nodes to different Availability // Zones, see the Availability Zone Considerations section of Cache Node Considerations - // for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheNode.Memcached.html). + // for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/CacheNode.Memcached.html). AZMode *string `type:"string" enum:"AZMode"` // If true, this parameter causes the modifications in this request and any @@ -9520,7 +10132,7 @@ type ModifyCacheClusterInput struct { // The upgraded version of the cache engine to be run on the cache nodes. // // Important: You can upgrade to a newer engine version (see Selecting a Cache - // Engine and Version (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/SelectEngine.html#VersionManagement)), + // Engine and Version (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SelectEngine.html#VersionManagement)), // but you cannot downgrade to an earlier engine version. If you want to use // an earlier engine version, you must delete the existing cluster and create // it anew with the earlier engine version. @@ -9557,7 +10169,7 @@ type ModifyCacheClusterInput struct { // Availability Zone. Only newly created nodes can be located in different Availability // Zones. For guidance on how to move existing Memcached nodes to different // Availability Zones, see the Availability Zone Considerations section of Cache - // Node Considerations for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheNode.Memcached.html). + // Node Considerations for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/CacheNode.Memcached.html). // // Impact of new add/remove requests upon pending requests // @@ -10035,14 +10647,16 @@ type ModifyReplicationGroupInput struct { // replication group. // // Important: You can upgrade to a newer engine version (see Selecting a Cache - // Engine and Version (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/SelectEngine.html#VersionManagement)), + // Engine and Version (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/SelectEngine.html#VersionManagement)), // but you cannot downgrade to an earlier engine version. If you want to use // an earlier engine version, you must delete the existing replication group // and create it anew with the earlier engine version. EngineVersion *string `type:"string"` - // The name of the Node Group (called shard in the console). - NodeGroupId *string `type:"string"` + // Deprecated. This parameter is not used. + // + // Deprecated: NodeGroupId has been deprecated + NodeGroupId *string `deprecated:"true" type:"string"` // The Amazon Resource Name (ARN) of the Amazon SNS topic to which notifications // are sent. @@ -10297,10 +10911,21 @@ type ModifyReplicationGroupShardConfigurationInput struct { NodeGroupCount *int64 `type:"integer" required:"true"` // If the value of NodeGroupCount is less than the current number of node groups - // (shards), NodeGroupsToRemove is a required list of node group ids to remove + // (shards), the NodeGroupsToRemove or NodeGroupsToRetain is a required list + // of node group ids to remove from or retain in the cluster. + // + // ElastiCache for Redis will attempt to remove all node groups listed by NodeGroupsToRemove // from the cluster. NodeGroupsToRemove []*string `locationNameList:"NodeGroupToRemove" type:"list"` + // If the value of NodeGroupCount is less than the current number of node groups + // (shards), the NodeGroupsToRemove or NodeGroupsToRetain is a required list + // of node group ids to remove from or retain in the cluster. + // + // ElastiCache for Redis will attempt to remove all node groups except those + // listed by NodeGroupsToRetain from the cluster. + NodeGroupsToRetain []*string `locationNameList:"NodeGroupToRetain" type:"list"` + // The name of the Redis (cluster mode enabled) cluster (replication group) // on which the shards are to be configured. // @@ -10340,6 +10965,16 @@ func (s *ModifyReplicationGroupShardConfigurationInput) Validate() error { if s.ReplicationGroupId == nil { invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) } + if s.ReshardingConfiguration != nil { + for i, v := range s.ReshardingConfiguration { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReshardingConfiguration", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -10365,6 +11000,12 @@ func (s *ModifyReplicationGroupShardConfigurationInput) SetNodeGroupsToRemove(v return s } +// SetNodeGroupsToRetain sets the NodeGroupsToRetain field's value. +func (s *ModifyReplicationGroupShardConfigurationInput) SetNodeGroupsToRetain(v []*string) *ModifyReplicationGroupShardConfigurationInput { + s.NodeGroupsToRetain = v + return s +} + // SetReplicationGroupId sets the ReplicationGroupId field's value. func (s *ModifyReplicationGroupShardConfigurationInput) SetReplicationGroupId(v string) *ModifyReplicationGroupShardConfigurationInput { s.ReplicationGroupId = &v @@ -10472,6 +11113,9 @@ func (s *NodeGroup) SetStatus(v string) *NodeGroup { type NodeGroupConfiguration struct { _ struct{} `type:"structure"` + // The 4-digit id for the node group these configuration values apply to. + NodeGroupId *string `min:"1" type:"string"` + // The Availability Zone where the primary node of this node group (shard) is // launched. PrimaryAvailabilityZone *string `type:"string"` @@ -10501,6 +11145,25 @@ func (s NodeGroupConfiguration) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *NodeGroupConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "NodeGroupConfiguration"} + if s.NodeGroupId != nil && len(*s.NodeGroupId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NodeGroupId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNodeGroupId sets the NodeGroupId field's value. +func (s *NodeGroupConfiguration) SetNodeGroupId(v string) *NodeGroupConfiguration { + s.NodeGroupId = &v + return s +} + // SetPrimaryAvailabilityZone sets the PrimaryAvailabilityZone field's value. func (s *NodeGroupConfiguration) SetPrimaryAvailabilityZone(v string) *NodeGroupConfiguration { s.PrimaryAvailabilityZone = &v @@ -10536,14 +11199,16 @@ type NodeGroupMember struct { // (0001, 0002, etc.). CacheNodeId *string `type:"string"` - // The role that is currently assigned to the node - primary or replica. + // The role that is currently assigned to the node - primary or replica. This + // member is only applicable for Redis (cluster mode disabled) replication groups. CurrentRole *string `type:"string"` // The name of the Availability Zone in which the node is located. PreferredAvailabilityZone *string `type:"string"` - // Represents the information required for client programs to connect to a cache - // node. + // The information required for client programs to connect to a node for read + // operations. The read endpoint is only applicable on Redis (cluster mode disabled) + // clusters. ReadEndpoint *Endpoint `type:"structure"` } @@ -10712,7 +11377,7 @@ type Parameter struct { // Indicates whether a change to the parameter is applied immediately or requires // a reboot for the change to be applied. You can force a reboot or wait until // the next maintenance window's reboot. For more information, see Rebooting - // a Cluster (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Clusters.Rebooting.html). + // a Cluster (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.Rebooting.html). ChangeType *string `type:"string" enum:"ChangeType"` // The valid data type for the parameter. @@ -10842,7 +11507,7 @@ type PendingModifiedValues struct { _ struct{} `type:"structure"` // A list of cache node IDs that are being removed (or will be removed) from - // the cluster. A node ID is a numeric identifier (0001, 0002, etc.). + // the cluster. A node ID is a 4-digit numeric identifier (0001, 0002, etc.). CacheNodeIdsToRemove []*string `locationNameList:"CacheNodeId" type:"list"` // The cache node type that this cluster or replication group is scaled to. @@ -11161,6 +11826,9 @@ type ReplicationGroup struct { // is created. To enable encryption at-rest on a cluster you must set AtRestEncryptionEnabled // to true when you create a cluster. // + // Required: Only available when creating a replication group in an Amazon VPC + // using redis version 3.2.6 or 4.x. + // // Default: false AtRestEncryptionEnabled *bool `type:"boolean"` @@ -11200,7 +11868,7 @@ type ReplicationGroup struct { // The user supplied description of the replication group. Description *string `type:"string"` - // The identifiers of all the nodes that are part of this replication group. + // The names of all the cache clusters that are part of this replication group. MemberClusters []*string `locationNameList:"ClusterId" type:"list"` // A list of node groups in this replication group. For Redis (cluster mode @@ -11249,6 +11917,9 @@ type ReplicationGroup struct { // is created. To enable in-transit encryption on a cluster you must set TransitEncryptionEnabled // to true when you create a cluster. // + // Required: Only available when creating a replication group in an Amazon VPC + // using redis version 3.2.6 or 4.x. + // // Default: false TransitEncryptionEnabled *bool `type:"boolean"` } @@ -11456,6 +12127,9 @@ type ReservedCacheNode struct { // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, // cache.r3.8xlarge // + // R4 node types;cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, + // cache.r4.8xlarge, cache.r4.16xlarge + // // Previous generation: (not recommended) // // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge @@ -11474,10 +12148,13 @@ type ReservedCacheNode struct { // * Redis Append-only files (AOF) functionality is not supported for T1 // or T2 instances. // - // For a complete listing of node types and specifications, see Amazon ElastiCache - // Product Features and Details (http://aws.amazon.com/elasticache/details) - // and either Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) - // or Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific). + // For a complete listing of node types and specifications, see: + // + // * Amazon ElastiCache Product Features and Details (http://aws.amazon.com/elasticache/details) + // + // * Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/ParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) + // + // * Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific) CacheNodeType *string `type:"string"` // The duration of the reservation in seconds. @@ -11495,6 +12172,11 @@ type ReservedCacheNode struct { // The recurring price charged to run this reserved cache node. RecurringCharges []*RecurringCharge `locationNameList:"RecurringCharge" type:"list"` + // The Amazon Resource Name (ARN) of the reserved cache node. + // + // Example: arn:aws:elasticache:us-east-1:123456789012:reserved-instance:ri-2017-03-27-08-33-25-582 + ReservationARN *string `type:"string"` + // The unique identifier for the reservation. ReservedCacheNodeId *string `type:"string"` @@ -11563,6 +12245,12 @@ func (s *ReservedCacheNode) SetRecurringCharges(v []*RecurringCharge) *ReservedC return s } +// SetReservationARN sets the ReservationARN field's value. +func (s *ReservedCacheNode) SetReservationARN(v string) *ReservedCacheNode { + s.ReservationARN = &v + return s +} + // SetReservedCacheNodeId sets the ReservedCacheNodeId field's value. func (s *ReservedCacheNode) SetReservedCacheNodeId(v string) *ReservedCacheNode { s.ReservedCacheNodeId = &v @@ -11633,6 +12321,9 @@ type ReservedCacheNodesOffering struct { // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, // cache.r3.8xlarge // + // R4 node types;cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, + // cache.r4.8xlarge, cache.r4.16xlarge + // // Previous generation: (not recommended) // // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge @@ -11651,10 +12342,13 @@ type ReservedCacheNodesOffering struct { // * Redis Append-only files (AOF) functionality is not supported for T1 // or T2 instances. // - // For a complete listing of node types and specifications, see Amazon ElastiCache - // Product Features and Details (http://aws.amazon.com/elasticache/details) - // and either Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) - // or Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific). + // For a complete listing of node types and specifications, see: + // + // * Amazon ElastiCache Product Features and Details (http://aws.amazon.com/elasticache/details) + // + // * Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/ParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) + // + // * Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific) CacheNodeType *string `type:"string"` // The duration of the offering. in seconds. @@ -11805,6 +12499,9 @@ func (s *ResetCacheParameterGroupInput) SetResetAllParameters(v bool) *ResetCach type ReshardingConfiguration struct { _ struct{} `type:"structure"` + // The 4-digit id for the node group these configuration values apply to. + NodeGroupId *string `min:"1" type:"string"` + // A list of preferred availability zones for the nodes in this cluster. PreferredAvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` } @@ -11819,6 +12516,25 @@ func (s ReshardingConfiguration) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *ReshardingConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReshardingConfiguration"} + if s.NodeGroupId != nil && len(*s.NodeGroupId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NodeGroupId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNodeGroupId sets the NodeGroupId field's value. +func (s *ReshardingConfiguration) SetNodeGroupId(v string) *ReshardingConfiguration { + s.NodeGroupId = &v + return s +} + // SetPreferredAvailabilityZones sets the PreferredAvailabilityZones field's value. func (s *ReshardingConfiguration) SetPreferredAvailabilityZones(v []*string) *ReshardingConfiguration { s.PreferredAvailabilityZones = v @@ -12069,6 +12785,9 @@ type Snapshot struct { // R3 node types:cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, // cache.r3.8xlarge // + // R4 node types;cache.r4.large, cache.r4.xlarge, cache.r4.2xlarge, cache.r4.4xlarge, + // cache.r4.8xlarge, cache.r4.16xlarge + // // Previous generation: (not recommended) // // M2 node types:cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge @@ -12087,10 +12806,13 @@ type Snapshot struct { // * Redis Append-only files (AOF) functionality is not supported for T1 // or T2 instances. // - // For a complete listing of node types and specifications, see Amazon ElastiCache - // Product Features and Details (http://aws.amazon.com/elasticache/details) - // and either Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) - // or Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific). + // For a complete listing of node types and specifications, see: + // + // * Amazon ElastiCache Product Features and Details (http://aws.amazon.com/elasticache/details) + // + // * Cache Node Type-Specific Parameters for Memcached (http://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/ParameterGroups.Memcached.html#ParameterGroups.Memcached.NodeSpecific) + // + // * Cache Node Type-Specific Parameters for Redis (http://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ParameterGroups.Redis.html#ParameterGroups.Redis.NodeSpecific) CacheNodeType *string `type:"string"` // The cache parameter group that is associated with the source cluster. @@ -12448,7 +13170,7 @@ type TestFailoverInput struct { // failover on up to 5 node groups in any rolling 24-hour period. // // NodeGroupId is a required field - NodeGroupId *string `type:"string" required:"true"` + NodeGroupId *string `min:"1" type:"string" required:"true"` // The name of the replication group (console: cluster) whose automatic failover // is being tested by this operation. @@ -12473,6 +13195,9 @@ func (s *TestFailoverInput) Validate() error { if s.NodeGroupId == nil { invalidParams.Add(request.NewErrParamRequired("NodeGroupId")) } + if s.NodeGroupId != nil && len(*s.NodeGroupId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NodeGroupId", 1)) + } if s.ReplicationGroupId == nil { invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) } diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticache/errors.go b/vendor/github.com/aws/aws-sdk-go/service/elasticache/errors.go index 272ee75b80..e35a9ece81 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticache/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticache/errors.go @@ -186,6 +186,12 @@ const ( // The VPC network is in an invalid state. ErrCodeInvalidVPCNetworkStateFault = "InvalidVPCNetworkStateFault" + // ErrCodeNoOperationFault for service response error code + // "NoOperationFault". + // + // The operation was not performed because no changes were required. + ErrCodeNoOperationFault = "NoOperationFault" + // ErrCodeNodeGroupNotFoundFault for service response error code // "NodeGroupNotFoundFault". // @@ -253,6 +259,12 @@ const ( // The requested cache node offering does not exist. ErrCodeReservedCacheNodesOfferingNotFoundFault = "ReservedCacheNodesOfferingNotFound" + // ErrCodeServiceLinkedRoleNotFoundFault for service response error code + // "ServiceLinkedRoleNotFoundFault". + // + // The specified service linked role (SLR) was not found. + ErrCodeServiceLinkedRoleNotFoundFault = "ServiceLinkedRoleNotFoundFault" + // ErrCodeSnapshotAlreadyExistsFault for service response error code // "SnapshotAlreadyExistsFault". // @@ -308,5 +320,7 @@ const ( // ErrCodeTestFailoverNotAvailableFault for service response error code // "TestFailoverNotAvailableFault". + // + // The TestFailover action is not available. ErrCodeTestFailoverNotAvailableFault = "TestFailoverNotAvailableFault" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go index c6971eead2..a91da3f523 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticbeanstalk/api.go @@ -18,7 +18,7 @@ const opAbortEnvironmentUpdate = "AbortEnvironmentUpdate" // AbortEnvironmentUpdateRequest generates a "aws/request.Request" representing the // client's request for the AbortEnvironmentUpdate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -52,8 +52,7 @@ func (c *ElasticBeanstalk) AbortEnvironmentUpdateRequest(input *AbortEnvironment output = &AbortEnvironmentUpdateOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -101,7 +100,7 @@ const opApplyEnvironmentManagedAction = "ApplyEnvironmentManagedAction" // ApplyEnvironmentManagedActionRequest generates a "aws/request.Request" representing the // client's request for the ApplyEnvironmentManagedAction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -185,7 +184,7 @@ const opCheckDNSAvailability = "CheckDNSAvailability" // CheckDNSAvailabilityRequest generates a "aws/request.Request" representing the // client's request for the CheckDNSAvailability operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -259,7 +258,7 @@ const opComposeEnvironments = "ComposeEnvironments" // ComposeEnvironmentsRequest generates a "aws/request.Request" representing the // client's request for the ComposeEnvironments operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -348,7 +347,7 @@ const opCreateApplication = "CreateApplication" // CreateApplicationRequest generates a "aws/request.Request" representing the // client's request for the CreateApplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -428,7 +427,7 @@ const opCreateApplicationVersion = "CreateApplicationVersion" // CreateApplicationVersionRequest generates a "aws/request.Request" representing the // client's request for the CreateApplicationVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -543,7 +542,7 @@ const opCreateConfigurationTemplate = "CreateConfigurationTemplate" // CreateConfigurationTemplateRequest generates a "aws/request.Request" representing the // client's request for the CreateConfigurationTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -642,7 +641,7 @@ const opCreateEnvironment = "CreateEnvironment" // CreateEnvironmentRequest generates a "aws/request.Request" representing the // client's request for the CreateEnvironment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -726,7 +725,7 @@ const opCreatePlatformVersion = "CreatePlatformVersion" // CreatePlatformVersionRequest generates a "aws/request.Request" representing the // client's request for the CreatePlatformVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -813,7 +812,7 @@ const opCreateStorageLocation = "CreateStorageLocation" // CreateStorageLocationRequest generates a "aws/request.Request" representing the // client's request for the CreateStorageLocation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -903,7 +902,7 @@ const opDeleteApplication = "DeleteApplication" // DeleteApplicationRequest generates a "aws/request.Request" representing the // client's request for the DeleteApplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -937,8 +936,7 @@ func (c *ElasticBeanstalk) DeleteApplicationRequest(input *DeleteApplicationInpu output = &DeleteApplicationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -989,7 +987,7 @@ const opDeleteApplicationVersion = "DeleteApplicationVersion" // DeleteApplicationVersionRequest generates a "aws/request.Request" representing the // client's request for the DeleteApplicationVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1023,8 +1021,7 @@ func (c *ElasticBeanstalk) DeleteApplicationVersionRequest(input *DeleteApplicat output = &DeleteApplicationVersionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1092,7 +1089,7 @@ const opDeleteConfigurationTemplate = "DeleteConfigurationTemplate" // DeleteConfigurationTemplateRequest generates a "aws/request.Request" representing the // client's request for the DeleteConfigurationTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1126,8 +1123,7 @@ func (c *ElasticBeanstalk) DeleteConfigurationTemplateRequest(input *DeleteConfi output = &DeleteConfigurationTemplateOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1178,7 +1174,7 @@ const opDeleteEnvironmentConfiguration = "DeleteEnvironmentConfiguration" // DeleteEnvironmentConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteEnvironmentConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1212,8 +1208,7 @@ func (c *ElasticBeanstalk) DeleteEnvironmentConfigurationRequest(input *DeleteEn output = &DeleteEnvironmentConfigurationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1261,7 +1256,7 @@ const opDeletePlatformVersion = "DeletePlatformVersion" // DeletePlatformVersionRequest generates a "aws/request.Request" representing the // client's request for the DeletePlatformVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1352,7 +1347,7 @@ const opDescribeAccountAttributes = "DescribeAccountAttributes" // DescribeAccountAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAccountAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1435,7 +1430,7 @@ const opDescribeApplicationVersions = "DescribeApplicationVersions" // DescribeApplicationVersionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeApplicationVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1509,7 +1504,7 @@ const opDescribeApplications = "DescribeApplications" // DescribeApplicationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeApplications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1583,7 +1578,7 @@ const opDescribeConfigurationOptions = "DescribeConfigurationOptions" // DescribeConfigurationOptionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigurationOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1666,7 +1661,7 @@ const opDescribeConfigurationSettings = "DescribeConfigurationSettings" // DescribeConfigurationSettingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigurationSettings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1757,7 +1752,7 @@ const opDescribeEnvironmentHealth = "DescribeEnvironmentHealth" // DescribeEnvironmentHealthRequest generates a "aws/request.Request" representing the // client's request for the DescribeEnvironmentHealth operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1842,7 +1837,7 @@ const opDescribeEnvironmentManagedActionHistory = "DescribeEnvironmentManagedAct // DescribeEnvironmentManagedActionHistoryRequest generates a "aws/request.Request" representing the // client's request for the DescribeEnvironmentManagedActionHistory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1921,7 +1916,7 @@ const opDescribeEnvironmentManagedActions = "DescribeEnvironmentManagedActions" // DescribeEnvironmentManagedActionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEnvironmentManagedActions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2000,7 +1995,7 @@ const opDescribeEnvironmentResources = "DescribeEnvironmentResources" // DescribeEnvironmentResourcesRequest generates a "aws/request.Request" representing the // client's request for the DescribeEnvironmentResources operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2080,7 +2075,7 @@ const opDescribeEnvironments = "DescribeEnvironments" // DescribeEnvironmentsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEnvironments operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2154,7 +2149,7 @@ const opDescribeEvents = "DescribeEvents" // DescribeEventsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2286,7 +2281,7 @@ const opDescribeInstancesHealth = "DescribeInstancesHealth" // DescribeInstancesHealthRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstancesHealth operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2370,7 +2365,7 @@ const opDescribePlatformVersion = "DescribePlatformVersion" // DescribePlatformVersionRequest generates a "aws/request.Request" representing the // client's request for the DescribePlatformVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2453,7 +2448,7 @@ const opListAvailableSolutionStacks = "ListAvailableSolutionStacks" // ListAvailableSolutionStacksRequest generates a "aws/request.Request" representing the // client's request for the ListAvailableSolutionStacks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2528,7 +2523,7 @@ const opListPlatformVersions = "ListPlatformVersions" // ListPlatformVersionsRequest generates a "aws/request.Request" representing the // client's request for the ListPlatformVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2611,7 +2606,7 @@ const opListTagsForResource = "ListTagsForResource" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2703,7 +2698,7 @@ const opRebuildEnvironment = "RebuildEnvironment" // RebuildEnvironmentRequest generates a "aws/request.Request" representing the // client's request for the RebuildEnvironment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2737,8 +2732,7 @@ func (c *ElasticBeanstalk) RebuildEnvironmentRequest(input *RebuildEnvironmentIn output = &RebuildEnvironmentOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2786,7 +2780,7 @@ const opRequestEnvironmentInfo = "RequestEnvironmentInfo" // RequestEnvironmentInfoRequest generates a "aws/request.Request" representing the // client's request for the RequestEnvironmentInfo operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2820,8 +2814,7 @@ func (c *ElasticBeanstalk) RequestEnvironmentInfoRequest(input *RequestEnvironme output = &RequestEnvironmentInfoOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2876,7 +2869,7 @@ const opRestartAppServer = "RestartAppServer" // RestartAppServerRequest generates a "aws/request.Request" representing the // client's request for the RestartAppServer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2910,8 +2903,7 @@ func (c *ElasticBeanstalk) RestartAppServerRequest(input *RestartAppServerInput) output = &RestartAppServerOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2953,7 +2945,7 @@ const opRetrieveEnvironmentInfo = "RetrieveEnvironmentInfo" // RetrieveEnvironmentInfoRequest generates a "aws/request.Request" representing the // client's request for the RetrieveEnvironmentInfo operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3031,7 +3023,7 @@ const opSwapEnvironmentCNAMEs = "SwapEnvironmentCNAMEs" // SwapEnvironmentCNAMEsRequest generates a "aws/request.Request" representing the // client's request for the SwapEnvironmentCNAMEs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3065,8 +3057,7 @@ func (c *ElasticBeanstalk) SwapEnvironmentCNAMEsRequest(input *SwapEnvironmentCN output = &SwapEnvironmentCNAMEsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3107,7 +3098,7 @@ const opTerminateEnvironment = "TerminateEnvironment" // TerminateEnvironmentRequest generates a "aws/request.Request" representing the // client's request for the TerminateEnvironment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3187,7 +3178,7 @@ const opUpdateApplication = "UpdateApplication" // UpdateApplicationRequest generates a "aws/request.Request" representing the // client's request for the UpdateApplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3264,7 +3255,7 @@ const opUpdateApplicationResourceLifecycle = "UpdateApplicationResourceLifecycle // UpdateApplicationResourceLifecycleRequest generates a "aws/request.Request" representing the // client's request for the UpdateApplicationResourceLifecycle operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3344,7 +3335,7 @@ const opUpdateApplicationVersion = "UpdateApplicationVersion" // UpdateApplicationVersionRequest generates a "aws/request.Request" representing the // client's request for the UpdateApplicationVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3421,7 +3412,7 @@ const opUpdateConfigurationTemplate = "UpdateConfigurationTemplate" // UpdateConfigurationTemplateRequest generates a "aws/request.Request" representing the // client's request for the UpdateConfigurationTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3512,7 +3503,7 @@ const opUpdateEnvironment = "UpdateEnvironment" // UpdateEnvironmentRequest generates a "aws/request.Request" representing the // client's request for the UpdateEnvironment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3605,7 +3596,7 @@ const opUpdateTagsForResource = "UpdateTagsForResource" // UpdateTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the UpdateTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3639,8 +3630,7 @@ func (c *ElasticBeanstalk) UpdateTagsForResourceRequest(input *UpdateTagsForReso output = &UpdateTagsForResourceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3723,7 +3713,7 @@ const opValidateConfigurationSettings = "ValidateConfigurationSettings" // ValidateConfigurationSettingsRequest generates a "aws/request.Request" representing the // client's request for the ValidateConfigurationSettings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7717,7 +7707,7 @@ type EnvironmentDescription struct { // // * Grey: Default health for a new environment. The environment is not fully // launched and health checks have not started or health checks are suspended - // during an UpdateEnvironment or RestartEnvironement request. + // during an UpdateEnvironment or RestartEnvironment request. // // Default: Grey Health *string `type:"string" enum:"EnvironmentHealth"` @@ -7934,7 +7924,11 @@ type EnvironmentInfoDescription struct { // The type of information retrieved. InfoType *string `type:"string" enum:"EnvironmentInfoType"` - // The retrieved information. + // The retrieved information. Currently contains a presigned Amazon S3 URL. + // The files are deleted after 15 minutes. + // + // Anyone in possession of this URL can access the files before they are deleted. + // Make the URL available only to trusted parties. Message *string `type:"string"` // The time stamp when this information was retrieved. @@ -8028,6 +8022,9 @@ type EnvironmentResourceDescription struct { // The Auto Scaling launch configurations in use by this environment. LaunchConfigurations []*LaunchConfiguration `type:"list"` + // The Amazon EC2 launch templates in use by this environment. + LaunchTemplates []*LaunchTemplate `type:"list"` + // The LoadBalancers in use by this environment. LoadBalancers []*LoadBalancer `type:"list"` @@ -8072,6 +8069,12 @@ func (s *EnvironmentResourceDescription) SetLaunchConfigurations(v []*LaunchConf return s } +// SetLaunchTemplates sets the LaunchTemplates field's value. +func (s *EnvironmentResourceDescription) SetLaunchTemplates(v []*LaunchTemplate) *EnvironmentResourceDescription { + s.LaunchTemplates = v + return s +} + // SetLoadBalancers sets the LoadBalancers field's value. func (s *EnvironmentResourceDescription) SetLoadBalancers(v []*LoadBalancer) *EnvironmentResourceDescription { s.LoadBalancers = v @@ -8120,9 +8123,21 @@ type EnvironmentTier struct { _ struct{} `type:"structure"` // The name of this environment tier. + // + // Valid values: + // + // * For Web server tier – WebServer + // + // * For Worker tier – Worker Name *string `type:"string"` // The type of this environment tier. + // + // Valid values: + // + // * For Web server tier – Standard + // + // * For Worker tier – SQS/HTTP Type *string `type:"string"` // The version of this environment tier. When you don't set a value to it, Elastic @@ -8495,6 +8510,30 @@ func (s *LaunchConfiguration) SetName(v string) *LaunchConfiguration { return s } +// Describes an Amazon EC2 launch template. +type LaunchTemplate struct { + _ struct{} `type:"structure"` + + // The ID of the launch template. + Id *string `type:"string"` +} + +// String returns the string representation +func (s LaunchTemplate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LaunchTemplate) GoString() string { + return s.String() +} + +// SetId sets the Id field's value. +func (s *LaunchTemplate) SetId(v string) *LaunchTemplate { + s.Id = &v + return s +} + type ListAvailableSolutionStacksInput struct { _ struct{} `type:"structure"` } diff --git a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go index 4d3c2658be..611b16d86c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go @@ -18,7 +18,7 @@ const opAddTags = "AddTags" // AddTagsRequest generates a "aws/request.Request" representing the // client's request for the AddTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -50,8 +50,7 @@ func (c *ElasticsearchService) AddTagsRequest(input *AddTagsInput) (req *request output = &AddTagsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -106,12 +105,103 @@ func (c *ElasticsearchService) AddTagsWithContext(ctx aws.Context, input *AddTag return out, req.Send() } +const opCancelElasticsearchServiceSoftwareUpdate = "CancelElasticsearchServiceSoftwareUpdate" + +// CancelElasticsearchServiceSoftwareUpdateRequest generates a "aws/request.Request" representing the +// client's request for the CancelElasticsearchServiceSoftwareUpdate 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 CancelElasticsearchServiceSoftwareUpdate for more information on using the CancelElasticsearchServiceSoftwareUpdate +// 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 CancelElasticsearchServiceSoftwareUpdateRequest method. +// req, resp := client.CancelElasticsearchServiceSoftwareUpdateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *ElasticsearchService) CancelElasticsearchServiceSoftwareUpdateRequest(input *CancelElasticsearchServiceSoftwareUpdateInput) (req *request.Request, output *CancelElasticsearchServiceSoftwareUpdateOutput) { + op := &request.Operation{ + Name: opCancelElasticsearchServiceSoftwareUpdate, + HTTPMethod: "POST", + HTTPPath: "/2015-01-01/es/serviceSoftwareUpdate/cancel", + } + + if input == nil { + input = &CancelElasticsearchServiceSoftwareUpdateInput{} + } + + output = &CancelElasticsearchServiceSoftwareUpdateOutput{} + req = c.newRequest(op, input, output) + return +} + +// CancelElasticsearchServiceSoftwareUpdate API operation for Amazon Elasticsearch Service. +// +// Cancels a scheduled service software update for an Amazon ES domain. You +// can only perform this operation before the AutomatedUpdateDate and when the +// UpdateStatus is in the PENDING_UPDATE state. +// +// 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 Elasticsearch Service's +// API operation CancelElasticsearchServiceSoftwareUpdate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeInternalException "InternalException" +// The request processing has failed because of an unknown error, exception +// or failure (the failure is internal to the service) . Gives http status code +// of 500. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An exception for accessing or deleting a resource that does not exist. Gives +// http status code of 400. +// +// * ErrCodeValidationException "ValidationException" +// An exception for missing / invalid input fields. Gives http status code of +// 400. +// +func (c *ElasticsearchService) CancelElasticsearchServiceSoftwareUpdate(input *CancelElasticsearchServiceSoftwareUpdateInput) (*CancelElasticsearchServiceSoftwareUpdateOutput, error) { + req, out := c.CancelElasticsearchServiceSoftwareUpdateRequest(input) + return out, req.Send() +} + +// CancelElasticsearchServiceSoftwareUpdateWithContext is the same as CancelElasticsearchServiceSoftwareUpdate with the addition of +// the ability to pass a context and additional request options. +// +// See CancelElasticsearchServiceSoftwareUpdate 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 *ElasticsearchService) CancelElasticsearchServiceSoftwareUpdateWithContext(ctx aws.Context, input *CancelElasticsearchServiceSoftwareUpdateInput, opts ...request.Option) (*CancelElasticsearchServiceSoftwareUpdateOutput, error) { + req, out := c.CancelElasticsearchServiceSoftwareUpdateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateElasticsearchDomain = "CreateElasticsearchDomain" // CreateElasticsearchDomainRequest generates a "aws/request.Request" representing the // client's request for the CreateElasticsearchDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -214,7 +304,7 @@ const opDeleteElasticsearchDomain = "DeleteElasticsearchDomain" // DeleteElasticsearchDomainRequest generates a "aws/request.Request" representing the // client's request for the DeleteElasticsearchDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -304,7 +394,7 @@ const opDeleteElasticsearchServiceRole = "DeleteElasticsearchServiceRole" // DeleteElasticsearchServiceRoleRequest generates a "aws/request.Request" representing the // client's request for the DeleteElasticsearchServiceRole operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -336,8 +426,7 @@ func (c *ElasticsearchService) DeleteElasticsearchServiceRoleRequest(input *Dele output = &DeleteElasticsearchServiceRoleOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -395,7 +484,7 @@ const opDescribeElasticsearchDomain = "DescribeElasticsearchDomain" // DescribeElasticsearchDomainRequest generates a "aws/request.Request" representing the // client's request for the DescribeElasticsearchDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -485,7 +574,7 @@ const opDescribeElasticsearchDomainConfig = "DescribeElasticsearchDomainConfig" // DescribeElasticsearchDomainConfigRequest generates a "aws/request.Request" representing the // client's request for the DescribeElasticsearchDomainConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -576,7 +665,7 @@ const opDescribeElasticsearchDomains = "DescribeElasticsearchDomains" // DescribeElasticsearchDomainsRequest generates a "aws/request.Request" representing the // client's request for the DescribeElasticsearchDomains operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -662,7 +751,7 @@ const opDescribeElasticsearchInstanceTypeLimits = "DescribeElasticsearchInstance // DescribeElasticsearchInstanceTypeLimitsRequest generates a "aws/request.Request" representing the // client's request for the DescribeElasticsearchInstanceTypeLimits operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -761,7 +850,7 @@ const opDescribeReservedElasticsearchInstanceOfferings = "DescribeReservedElasti // DescribeReservedElasticsearchInstanceOfferingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedElasticsearchInstanceOfferings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -907,7 +996,7 @@ const opDescribeReservedElasticsearchInstances = "DescribeReservedElasticsearchI // DescribeReservedElasticsearchInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedElasticsearchInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1053,7 +1142,7 @@ const opGetCompatibleElasticsearchVersions = "GetCompatibleElasticsearchVersions // GetCompatibleElasticsearchVersionsRequest generates a "aws/request.Request" representing the // client's request for the GetCompatibleElasticsearchVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1148,7 +1237,7 @@ const opGetUpgradeHistory = "GetUpgradeHistory" // GetUpgradeHistoryRequest generates a "aws/request.Request" representing the // client's request for the GetUpgradeHistory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1298,7 +1387,7 @@ const opGetUpgradeStatus = "GetUpgradeStatus" // GetUpgradeStatusRequest generates a "aws/request.Request" representing the // client's request for the GetUpgradeStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1392,7 +1481,7 @@ const opListDomainNames = "ListDomainNames" // ListDomainNamesRequest generates a "aws/request.Request" representing the // client's request for the ListDomainNames operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1473,7 +1562,7 @@ const opListElasticsearchInstanceTypes = "ListElasticsearchInstanceTypes" // ListElasticsearchInstanceTypesRequest generates a "aws/request.Request" representing the // client's request for the ListElasticsearchInstanceTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1618,7 +1707,7 @@ const opListElasticsearchVersions = "ListElasticsearchVersions" // ListElasticsearchVersionsRequest generates a "aws/request.Request" representing the // client's request for the ListElasticsearchVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1763,7 +1852,7 @@ const opListTags = "ListTags" // ListTagsRequest generates a "aws/request.Request" representing the // client's request for the ListTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1852,7 +1941,7 @@ const opPurchaseReservedElasticsearchInstanceOffering = "PurchaseReservedElastic // PurchaseReservedElasticsearchInstanceOfferingRequest generates a "aws/request.Request" representing the // client's request for the PurchaseReservedElasticsearchInstanceOffering operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1950,7 +2039,7 @@ const opRemoveTags = "RemoveTags" // RemoveTagsRequest generates a "aws/request.Request" representing the // client's request for the RemoveTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1982,8 +2071,7 @@ func (c *ElasticsearchService) RemoveTagsRequest(input *RemoveTagsInput) (req *r output = &RemoveTagsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2032,12 +2120,101 @@ func (c *ElasticsearchService) RemoveTagsWithContext(ctx aws.Context, input *Rem return out, req.Send() } +const opStartElasticsearchServiceSoftwareUpdate = "StartElasticsearchServiceSoftwareUpdate" + +// StartElasticsearchServiceSoftwareUpdateRequest generates a "aws/request.Request" representing the +// client's request for the StartElasticsearchServiceSoftwareUpdate 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 StartElasticsearchServiceSoftwareUpdate for more information on using the StartElasticsearchServiceSoftwareUpdate +// 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 StartElasticsearchServiceSoftwareUpdateRequest method. +// req, resp := client.StartElasticsearchServiceSoftwareUpdateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *ElasticsearchService) StartElasticsearchServiceSoftwareUpdateRequest(input *StartElasticsearchServiceSoftwareUpdateInput) (req *request.Request, output *StartElasticsearchServiceSoftwareUpdateOutput) { + op := &request.Operation{ + Name: opStartElasticsearchServiceSoftwareUpdate, + HTTPMethod: "POST", + HTTPPath: "/2015-01-01/es/serviceSoftwareUpdate/start", + } + + if input == nil { + input = &StartElasticsearchServiceSoftwareUpdateInput{} + } + + output = &StartElasticsearchServiceSoftwareUpdateOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartElasticsearchServiceSoftwareUpdate API operation for Amazon Elasticsearch Service. +// +// Schedules a service software update for an Amazon ES 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 Elasticsearch Service's +// API operation StartElasticsearchServiceSoftwareUpdate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBaseException "BaseException" +// An error occurred while processing the request. +// +// * ErrCodeInternalException "InternalException" +// The request processing has failed because of an unknown error, exception +// or failure (the failure is internal to the service) . Gives http status code +// of 500. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// An exception for accessing or deleting a resource that does not exist. Gives +// http status code of 400. +// +// * ErrCodeValidationException "ValidationException" +// An exception for missing / invalid input fields. Gives http status code of +// 400. +// +func (c *ElasticsearchService) StartElasticsearchServiceSoftwareUpdate(input *StartElasticsearchServiceSoftwareUpdateInput) (*StartElasticsearchServiceSoftwareUpdateOutput, error) { + req, out := c.StartElasticsearchServiceSoftwareUpdateRequest(input) + return out, req.Send() +} + +// StartElasticsearchServiceSoftwareUpdateWithContext is the same as StartElasticsearchServiceSoftwareUpdate with the addition of +// the ability to pass a context and additional request options. +// +// See StartElasticsearchServiceSoftwareUpdate 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 *ElasticsearchService) StartElasticsearchServiceSoftwareUpdateWithContext(ctx aws.Context, input *StartElasticsearchServiceSoftwareUpdateInput, opts ...request.Option) (*StartElasticsearchServiceSoftwareUpdateOutput, error) { + req, out := c.StartElasticsearchServiceSoftwareUpdateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateElasticsearchDomainConfig = "UpdateElasticsearchDomainConfig" // UpdateElasticsearchDomainConfigRequest generates a "aws/request.Request" representing the // client's request for the UpdateElasticsearchDomainConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2135,7 +2312,7 @@ const opUpgradeElasticsearchDomain = "UpgradeElasticsearchDomain" // UpgradeElasticsearchDomainRequest generates a "aws/request.Request" representing the // client's request for the UpgradeElasticsearchDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2435,6 +2612,76 @@ func (s *AdvancedOptionsStatus) SetStatus(v *OptionStatus) *AdvancedOptionsStatu return s } +// Container for the parameters to the CancelElasticsearchServiceSoftwareUpdate +// operation. Specifies the name of the Elasticsearch domain that you wish to +// cancel a service software update on. +type CancelElasticsearchServiceSoftwareUpdateInput struct { + _ struct{} `type:"structure"` + + // The name of the domain that you want to stop the latest service software + // update on. + // + // DomainName is a required field + DomainName *string `min:"3" type:"string" required:"true"` +} + +// String returns the string representation +func (s CancelElasticsearchServiceSoftwareUpdateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelElasticsearchServiceSoftwareUpdateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelElasticsearchServiceSoftwareUpdateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelElasticsearchServiceSoftwareUpdateInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *CancelElasticsearchServiceSoftwareUpdateInput) SetDomainName(v string) *CancelElasticsearchServiceSoftwareUpdateInput { + s.DomainName = &v + return s +} + +// The result of a CancelElasticsearchServiceSoftwareUpdate operation. Contains +// the status of the update. +type CancelElasticsearchServiceSoftwareUpdateOutput struct { + _ struct{} `type:"structure"` + + // The current status of the Elasticsearch service software update. + ServiceSoftwareOptions *ServiceSoftwareOptions `type:"structure"` +} + +// String returns the string representation +func (s CancelElasticsearchServiceSoftwareUpdateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelElasticsearchServiceSoftwareUpdateOutput) GoString() string { + return s.String() +} + +// SetServiceSoftwareOptions sets the ServiceSoftwareOptions field's value. +func (s *CancelElasticsearchServiceSoftwareUpdateOutput) SetServiceSoftwareOptions(v *ServiceSoftwareOptions) *CancelElasticsearchServiceSoftwareUpdateOutput { + s.ServiceSoftwareOptions = v + return s +} + // Options to specify the Cognito user and identity pools for Kibana authentication. // For more information, see Amazon Cognito Authentication for Kibana (http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-cognito-auth.html). type CognitoOptions struct { @@ -2623,6 +2870,9 @@ type CreateElasticsearchDomainInput struct { // a given type of Elasticsearch log. LogPublishingOptions map[string]*LogPublishingOption `type:"map"` + // Specifies the NodeToNodeEncryptionOptions. + NodeToNodeEncryptionOptions *NodeToNodeEncryptionOptions `type:"structure"` + // Option to set time, in UTC format, of the daily automated snapshot. Default // value is 0 hours. SnapshotOptions *SnapshotOptions `type:"structure"` @@ -2723,6 +2973,12 @@ func (s *CreateElasticsearchDomainInput) SetLogPublishingOptions(v map[string]*L return s } +// SetNodeToNodeEncryptionOptions sets the NodeToNodeEncryptionOptions field's value. +func (s *CreateElasticsearchDomainInput) SetNodeToNodeEncryptionOptions(v *NodeToNodeEncryptionOptions) *CreateElasticsearchDomainInput { + s.NodeToNodeEncryptionOptions = v + return s +} + // SetSnapshotOptions sets the SnapshotOptions field's value. func (s *CreateElasticsearchDomainInput) SetSnapshotOptions(v *SnapshotOptions) *CreateElasticsearchDomainInput { s.SnapshotOptions = v @@ -3104,9 +3360,15 @@ func (s *DescribeElasticsearchInstanceTypeLimitsInput) Validate() error { if s.ElasticsearchVersion == nil { invalidParams.Add(request.NewErrParamRequired("ElasticsearchVersion")) } + if s.ElasticsearchVersion != nil && len(*s.ElasticsearchVersion) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ElasticsearchVersion", 1)) + } if s.InstanceType == nil { invalidParams.Add(request.NewErrParamRequired("InstanceType")) } + if s.InstanceType != nil && len(*s.InstanceType) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InstanceType", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -3572,6 +3834,9 @@ type ElasticsearchDomainConfig struct { // Log publishing options for the given domain. LogPublishingOptions *LogPublishingOptionsStatus `type:"structure"` + // Specifies the NodeToNodeEncryptionOptions for the Elasticsearch domain. + NodeToNodeEncryptionOptions *NodeToNodeEncryptionOptionsStatus `type:"structure"` + // Specifies the SnapshotOptions for the Elasticsearch domain. SnapshotOptions *SnapshotOptionsStatus `type:"structure"` @@ -3638,6 +3903,12 @@ func (s *ElasticsearchDomainConfig) SetLogPublishingOptions(v *LogPublishingOpti return s } +// SetNodeToNodeEncryptionOptions sets the NodeToNodeEncryptionOptions field's value. +func (s *ElasticsearchDomainConfig) SetNodeToNodeEncryptionOptions(v *NodeToNodeEncryptionOptionsStatus) *ElasticsearchDomainConfig { + s.NodeToNodeEncryptionOptions = v + return s +} + // SetSnapshotOptions sets the SnapshotOptions field's value. func (s *ElasticsearchDomainConfig) SetSnapshotOptions(v *SnapshotOptionsStatus) *ElasticsearchDomainConfig { s.SnapshotOptions = v @@ -3720,11 +3991,17 @@ type ElasticsearchDomainStatus struct { // Log publishing options for the given domain. LogPublishingOptions map[string]*LogPublishingOption `type:"map"` + // Specifies the status of the NodeToNodeEncryptionOptions. + NodeToNodeEncryptionOptions *NodeToNodeEncryptionOptions `type:"structure"` + // The status of the Elasticsearch domain configuration. True if Amazon Elasticsearch // Service is processing configuration changes. False if the configuration is // active. Processing *bool `type:"boolean"` + // The current status of the Elasticsearch domain's service software. + ServiceSoftwareOptions *ServiceSoftwareOptions `type:"structure"` + // Specifies the status of the SnapshotOptions SnapshotOptions *SnapshotOptions `type:"structure"` @@ -3837,12 +4114,24 @@ func (s *ElasticsearchDomainStatus) SetLogPublishingOptions(v map[string]*LogPub return s } +// SetNodeToNodeEncryptionOptions sets the NodeToNodeEncryptionOptions field's value. +func (s *ElasticsearchDomainStatus) SetNodeToNodeEncryptionOptions(v *NodeToNodeEncryptionOptions) *ElasticsearchDomainStatus { + s.NodeToNodeEncryptionOptions = v + return s +} + // SetProcessing sets the Processing field's value. func (s *ElasticsearchDomainStatus) SetProcessing(v bool) *ElasticsearchDomainStatus { s.Processing = &v return s } +// SetServiceSoftwareOptions sets the ServiceSoftwareOptions field's value. +func (s *ElasticsearchDomainStatus) SetServiceSoftwareOptions(v *ServiceSoftwareOptions) *ElasticsearchDomainStatus { + s.ServiceSoftwareOptions = v + return s +} + // SetSnapshotOptions sets the SnapshotOptions field's value. func (s *ElasticsearchDomainStatus) SetSnapshotOptions(v *SnapshotOptions) *ElasticsearchDomainStatus { s.SnapshotOptions = v @@ -4433,6 +4722,9 @@ func (s *ListElasticsearchInstanceTypesInput) Validate() error { if s.ElasticsearchVersion == nil { invalidParams.Add(request.NewErrParamRequired("ElasticsearchVersion")) } + if s.ElasticsearchVersion != nil && len(*s.ElasticsearchVersion) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ElasticsearchVersion", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -4713,6 +5005,70 @@ func (s *LogPublishingOptionsStatus) SetStatus(v *OptionStatus) *LogPublishingOp return s } +// Specifies the node-to-node encryption options. +type NodeToNodeEncryptionOptions struct { + _ struct{} `type:"structure"` + + // Specify true to enable node-to-node encryption. + Enabled *bool `type:"boolean"` +} + +// String returns the string representation +func (s NodeToNodeEncryptionOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NodeToNodeEncryptionOptions) GoString() string { + return s.String() +} + +// SetEnabled sets the Enabled field's value. +func (s *NodeToNodeEncryptionOptions) SetEnabled(v bool) *NodeToNodeEncryptionOptions { + s.Enabled = &v + return s +} + +// Status of the node-to-node encryption options for the specified Elasticsearch +// domain. +type NodeToNodeEncryptionOptionsStatus struct { + _ struct{} `type:"structure"` + + // Specifies the node-to-node encryption options for the specified Elasticsearch + // domain. + // + // Options is a required field + Options *NodeToNodeEncryptionOptions `type:"structure" required:"true"` + + // Specifies the status of the node-to-node encryption options for the specified + // Elasticsearch domain. + // + // Status is a required field + Status *OptionStatus `type:"structure" required:"true"` +} + +// String returns the string representation +func (s NodeToNodeEncryptionOptionsStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NodeToNodeEncryptionOptionsStatus) GoString() string { + return s.String() +} + +// SetOptions sets the Options field's value. +func (s *NodeToNodeEncryptionOptionsStatus) SetOptions(v *NodeToNodeEncryptionOptions) *NodeToNodeEncryptionOptionsStatus { + s.Options = v + return s +} + +// SetStatus sets the Status field's value. +func (s *NodeToNodeEncryptionOptionsStatus) SetStatus(v *OptionStatus) *NodeToNodeEncryptionOptionsStatus { + s.Status = v + return s +} + // Provides the current status of the entity. type OptionStatus struct { _ struct{} `type:"structure"` @@ -5212,6 +5568,88 @@ func (s *ReservedElasticsearchInstanceOffering) SetUsagePrice(v float64) *Reserv return s } +// The current options of an Elasticsearch domain service software options. +type ServiceSoftwareOptions struct { + _ struct{} `type:"structure"` + + // Timestamp, in Epoch time, until which you can manually request a service + // software update. After this date, we automatically update your service software. + AutomatedUpdateDate *time.Time `type:"timestamp"` + + // True if you are able to cancel your service software version update. False + // if you are not able to cancel your service software version. + Cancellable *bool `type:"boolean"` + + // The current service software version that is present on the domain. + CurrentVersion *string `type:"string"` + + // The description of the UpdateStatus. + Description *string `type:"string"` + + // The new service software version if one is available. + NewVersion *string `type:"string"` + + // True if you are able to update you service software version. False if you + // are not able to update your service software version. + UpdateAvailable *bool `type:"boolean"` + + // The status of your service software update. This field can take the following + // values: ELIGIBLE, PENDING_UPDATE, IN_PROGRESS, COMPLETED, and NOT_ELIGIBLE. + UpdateStatus *string `type:"string" enum:"DeploymentStatus"` +} + +// String returns the string representation +func (s ServiceSoftwareOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ServiceSoftwareOptions) GoString() string { + return s.String() +} + +// SetAutomatedUpdateDate sets the AutomatedUpdateDate field's value. +func (s *ServiceSoftwareOptions) SetAutomatedUpdateDate(v time.Time) *ServiceSoftwareOptions { + s.AutomatedUpdateDate = &v + return s +} + +// SetCancellable sets the Cancellable field's value. +func (s *ServiceSoftwareOptions) SetCancellable(v bool) *ServiceSoftwareOptions { + s.Cancellable = &v + return s +} + +// SetCurrentVersion sets the CurrentVersion field's value. +func (s *ServiceSoftwareOptions) SetCurrentVersion(v string) *ServiceSoftwareOptions { + s.CurrentVersion = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *ServiceSoftwareOptions) SetDescription(v string) *ServiceSoftwareOptions { + s.Description = &v + return s +} + +// SetNewVersion sets the NewVersion field's value. +func (s *ServiceSoftwareOptions) SetNewVersion(v string) *ServiceSoftwareOptions { + s.NewVersion = &v + return s +} + +// SetUpdateAvailable sets the UpdateAvailable field's value. +func (s *ServiceSoftwareOptions) SetUpdateAvailable(v bool) *ServiceSoftwareOptions { + s.UpdateAvailable = &v + return s +} + +// SetUpdateStatus sets the UpdateStatus field's value. +func (s *ServiceSoftwareOptions) SetUpdateStatus(v string) *ServiceSoftwareOptions { + s.UpdateStatus = &v + return s +} + // Specifies the time, in UTC format, when the service takes a daily automated // snapshot of the specified Elasticsearch domain. Default value is 0 hours. type SnapshotOptions struct { @@ -5275,6 +5713,75 @@ func (s *SnapshotOptionsStatus) SetStatus(v *OptionStatus) *SnapshotOptionsStatu return s } +// Container for the parameters to the StartElasticsearchServiceSoftwareUpdate +// operation. Specifies the name of the Elasticsearch domain that you wish to +// schedule a service software update on. +type StartElasticsearchServiceSoftwareUpdateInput struct { + _ struct{} `type:"structure"` + + // The name of the domain that you want to update to the latest service software. + // + // DomainName is a required field + DomainName *string `min:"3" type:"string" required:"true"` +} + +// String returns the string representation +func (s StartElasticsearchServiceSoftwareUpdateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartElasticsearchServiceSoftwareUpdateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartElasticsearchServiceSoftwareUpdateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartElasticsearchServiceSoftwareUpdateInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + if s.DomainName != nil && len(*s.DomainName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *StartElasticsearchServiceSoftwareUpdateInput) SetDomainName(v string) *StartElasticsearchServiceSoftwareUpdateInput { + s.DomainName = &v + return s +} + +// The result of a StartElasticsearchServiceSoftwareUpdate operation. Contains +// the status of the update. +type StartElasticsearchServiceSoftwareUpdateOutput struct { + _ struct{} `type:"structure"` + + // The current status of the Elasticsearch service software update. + ServiceSoftwareOptions *ServiceSoftwareOptions `type:"structure"` +} + +// String returns the string representation +func (s StartElasticsearchServiceSoftwareUpdateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartElasticsearchServiceSoftwareUpdateOutput) GoString() string { + return s.String() +} + +// SetServiceSoftwareOptions sets the ServiceSoftwareOptions field's value. +func (s *StartElasticsearchServiceSoftwareUpdateOutput) SetServiceSoftwareOptions(v *ServiceSoftwareOptions) *StartElasticsearchServiceSoftwareUpdateOutput { + s.ServiceSoftwareOptions = v + return s +} + // StorageTypes represents the list of storage related types and their attributes // that are available for given InstanceType. type StorageType struct { @@ -5941,6 +6448,23 @@ func (s *VPCOptions) SetSubnetIds(v []*string) *VPCOptions { return s } +const ( + // DeploymentStatusPendingUpdate is a DeploymentStatus enum value + DeploymentStatusPendingUpdate = "PENDING_UPDATE" + + // DeploymentStatusInProgress is a DeploymentStatus enum value + DeploymentStatusInProgress = "IN_PROGRESS" + + // DeploymentStatusCompleted is a DeploymentStatus enum value + DeploymentStatusCompleted = "COMPLETED" + + // DeploymentStatusNotEligible is a DeploymentStatus enum value + DeploymentStatusNotEligible = "NOT_ELIGIBLE" + + // DeploymentStatusEligible is a DeploymentStatus enum value + DeploymentStatusEligible = "ELIGIBLE" +) + const ( // ESPartitionInstanceTypeM3MediumElasticsearch is a ESPartitionInstanceType enum value ESPartitionInstanceTypeM3MediumElasticsearch = "m3.medium.elasticsearch" diff --git a/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/api.go b/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/api.go index 69f5360c8e..ec140ae0bd 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elastictranscoder/api.go @@ -8,6 +8,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "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 opCancelJob = "CancelJob" @@ -15,7 +17,7 @@ const opCancelJob = "CancelJob" // CancelJobRequest generates a "aws/request.Request" representing the // client's request for the CancelJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -47,6 +49,7 @@ func (c *ElasticTranscoder) CancelJobRequest(input *CancelJobInput) (req *reques output = &CancelJobOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -113,7 +116,7 @@ const opCreateJob = "CreateJob" // CreateJobRequest generates a "aws/request.Request" representing the // client's request for the CreateJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -213,7 +216,7 @@ const opCreatePipeline = "CreatePipeline" // CreatePipelineRequest generates a "aws/request.Request" representing the // client's request for the CreatePipeline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -307,7 +310,7 @@ const opCreatePreset = "CreatePreset" // CreatePresetRequest generates a "aws/request.Request" representing the // client's request for the CreatePreset operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -410,7 +413,7 @@ const opDeletePipeline = "DeletePipeline" // DeletePipelineRequest generates a "aws/request.Request" representing the // client's request for the DeletePipeline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -442,6 +445,7 @@ func (c *ElasticTranscoder) DeletePipelineRequest(input *DeletePipelineInput) (r output = &DeletePipelineOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -508,7 +512,7 @@ const opDeletePreset = "DeletePreset" // DeletePresetRequest generates a "aws/request.Request" representing the // client's request for the DeletePreset operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -540,6 +544,7 @@ func (c *ElasticTranscoder) DeletePresetRequest(input *DeletePresetInput) (req * output = &DeletePresetOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -600,7 +605,7 @@ const opListJobsByPipeline = "ListJobsByPipeline" // ListJobsByPipelineRequest generates a "aws/request.Request" representing the // client's request for the ListJobsByPipeline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -750,7 +755,7 @@ const opListJobsByStatus = "ListJobsByStatus" // ListJobsByStatusRequest generates a "aws/request.Request" representing the // client's request for the ListJobsByStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -898,7 +903,7 @@ const opListPipelines = "ListPipelines" // ListPipelinesRequest generates a "aws/request.Request" representing the // client's request for the ListPipelines operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1040,7 +1045,7 @@ const opListPresets = "ListPresets" // ListPresetsRequest generates a "aws/request.Request" representing the // client's request for the ListPresets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1182,7 +1187,7 @@ const opReadJob = "ReadJob" // ReadJobRequest generates a "aws/request.Request" representing the // client's request for the ReadJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1272,7 +1277,7 @@ const opReadPipeline = "ReadPipeline" // ReadPipelineRequest generates a "aws/request.Request" representing the // client's request for the ReadPipeline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1362,7 +1367,7 @@ const opReadPreset = "ReadPreset" // ReadPresetRequest generates a "aws/request.Request" representing the // client's request for the ReadPreset operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1452,7 +1457,7 @@ const opTestRole = "TestRole" // TestRoleRequest generates a "aws/request.Request" representing the // client's request for the TestRole operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1557,7 +1562,7 @@ const opUpdatePipeline = "UpdatePipeline" // UpdatePipelineRequest generates a "aws/request.Request" representing the // client's request for the UpdatePipeline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1656,7 +1661,7 @@ const opUpdatePipelineNotifications = "UpdatePipelineNotifications" // UpdatePipelineNotificationsRequest generates a "aws/request.Request" representing the // client's request for the UpdatePipelineNotifications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1754,7 +1759,7 @@ const opUpdatePipelineStatus = "UpdatePipelineStatus" // UpdatePipelineStatusRequest generates a "aws/request.Request" representing the // client's request for the UpdatePipelineStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2324,6 +2329,9 @@ func (s *CancelJobInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -3225,11 +3233,11 @@ type CreatePipelineInput struct { // The AWS Key Management Service (AWS KMS) key that you want to use with this // pipeline. // - // If you use either S3 or S3-AWS-KMS as your Encryption:Mode, you don't need + // If you use either s3 or s3-aws-kms as your Encryption:Mode, you don't need // to provide a key with your job because a default key, known as an AWS-KMS // key, is created for you automatically. You need to provide an AWS-KMS key // only if you want to use a non-default AWS-KMS key, or if you are using an - // Encryption:Mode of AES-PKCS7, AES-CTR, or AES-GCM. + // Encryption:Mode of aes-cbc-pkcs7, aes-ctr, or aes-gcm. AwsKmsKeyArn *string `type:"string"` // The optional ContentConfig object specifies information about the Amazon @@ -3325,7 +3333,7 @@ type CreatePipelineInput struct { // SNS returned when you created the topic. For more information, see Create // a Topic in the Amazon Simple Notification Service Developer Guide. // - // * Completed: The topic ARN for the Amazon SNS topic that you want to notify + // * Complete: The topic ARN for the Amazon SNS topic that you want to notify // when Elastic Transcoder has finished processing a job in this pipeline. // This is the ARN that Amazon SNS returned when you created the topic. // @@ -3728,6 +3736,9 @@ func (s *DeletePipelineInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -3782,6 +3793,9 @@ func (s *DeletePresetInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -3907,20 +3921,20 @@ type Encryption struct { // to use when decrypting your input files or encrypting your output files. // Elastic Transcoder supports the following options: // - // * S3: Amazon S3 creates and manages the keys used for encrypting your + // * s3: Amazon S3 creates and manages the keys used for encrypting your // files. // - // * S3-AWS-KMS: Amazon S3 calls the Amazon Key Management Service, which + // * s3-aws-kms: Amazon S3 calls the Amazon Key Management Service, which // creates and manages the keys that are used for encrypting your files. - // If you specify S3-AWS-KMS and you don't want to use the default key, you + // If you specify s3-aws-kms and you don't want to use the default key, you // must add the AWS-KMS key that you want to use to your pipeline. // - // * AES-CBC-PKCS7: A padded cipher-block mode of operation originally used + // * aes-cbc-pkcs7: A padded cipher-block mode of operation originally used // for HLS files. // - // * AES-CTR: AES Counter Mode. + // * aes-ctr: AES Counter Mode. // - // * AES-GCM: AES Galois Counter Mode, a mode of operation that is an authenticated + // * aes-gcm: AES Galois Counter Mode, a mode of operation that is an authenticated // encryption format, meaning that a file, key, or initialization vector // that has been tampered with fails the decryption process. // @@ -5038,6 +5052,9 @@ func (s *ListJobsByPipelineInput) Validate() error { if s.PipelineId == nil { invalidParams.Add(request.NewErrParamRequired("PipelineId")) } + if s.PipelineId != nil && len(*s.PipelineId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PipelineId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -5134,6 +5151,9 @@ func (s *ListJobsByStatusInput) Validate() error { if s.Status == nil { invalidParams.Add(request.NewErrParamRequired("Status")) } + if s.Status != nil && len(*s.Status) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Status", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -5487,11 +5507,11 @@ type Pipeline struct { // The AWS Key Management Service (AWS KMS) key that you want to use with this // pipeline. // - // If you use either S3 or S3-AWS-KMS as your Encryption:Mode, you don't need + // If you use either s3 or s3-aws-kms as your Encryption:Mode, you don't need // to provide a key with your job because a default key, known as an AWS-KMS // key, is created for you automatically. You need to provide an AWS-KMS key // only if you want to use a non-default AWS-KMS key, or if you are using an - // Encryption:Mode of AES-PKCS7, AES-CTR, or AES-GCM. + // Encryption:Mode of aes-cbc-pkcs7, aes-ctr, or aes-gcm. AwsKmsKeyArn *string `type:"string"` // Information about the Amazon S3 bucket in which you want Elastic Transcoder @@ -5563,7 +5583,7 @@ type Pipeline struct { // SNS) topic that you want to notify when Elastic Transcoder has started // to process the job. // - // * Completed (optional): The Amazon SNS topic that you want to notify when + // * Complete (optional): The Amazon SNS topic that you want to notify when // Elastic Transcoder has finished processing the job. // // * Warning (optional): The Amazon SNS topic that you want to notify when @@ -5809,7 +5829,7 @@ func (s *PipelineOutputConfig) SetStorageClass(v string) *PipelineOutputConfig { // The PlayReady DRM settings, if any, that you want Elastic Transcoder to apply // to the output files associated with this playlist. // -// PlayReady DRM encrypts your media files using AES-CTR encryption. +// PlayReady DRM encrypts your media files using aes-ctr encryption. // // If you use DRM for an HLSv3 playlist, your outputs must have a master playlist. type PlayReadyDrm struct { @@ -6427,6 +6447,9 @@ func (s *ReadJobInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -6490,6 +6513,9 @@ func (s *ReadPipelineInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -6567,6 +6593,9 @@ func (s *ReadPresetInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -6962,11 +6991,11 @@ type UpdatePipelineInput struct { // The AWS Key Management Service (AWS KMS) key that you want to use with this // pipeline. // - // If you use either S3 or S3-AWS-KMS as your Encryption:Mode, you don't need + // If you use either s3 or s3-aws-kms as your Encryption:Mode, you don't need // to provide a key with your job because a default key, known as an AWS-KMS // key, is created for you automatically. You need to provide an AWS-KMS key // only if you want to use a non-default AWS-KMS key, or if you are using an - // Encryption:Mode of AES-PKCS7, AES-CTR, or AES-GCM. + // Encryption:Mode of aes-cbc-pkcs7, aes-ctr, or aes-gcm. AwsKmsKeyArn *string `type:"string"` // The optional ContentConfig object specifies information about the Amazon @@ -7062,7 +7091,7 @@ type UpdatePipelineInput struct { // started to process jobs that are added to this pipeline. This is the ARN // that Amazon SNS returned when you created the topic. // - // * Completed: The topic ARN for the Amazon SNS topic that you want to notify + // * Complete: The topic ARN for the Amazon SNS topic that you want to notify // when Elastic Transcoder has finished processing a job. This is the ARN // that Amazon SNS returned when you created the topic. // @@ -7156,6 +7185,9 @@ func (s *UpdatePipelineInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if s.Name != nil && len(*s.Name) < 1 { invalidParams.Add(request.NewErrParamMinLen("Name", 1)) } @@ -7245,7 +7277,7 @@ type UpdatePipelineNotificationsInput struct { // started to process jobs that are added to this pipeline. This is the ARN // that Amazon SNS returned when you created the topic. // - // * Completed: The topic ARN for the Amazon SNS topic that you want to notify + // * Complete: The topic ARN for the Amazon SNS topic that you want to notify // when Elastic Transcoder has finished processing a job. This is the ARN // that Amazon SNS returned when you created the topic. // @@ -7277,6 +7309,9 @@ func (s *UpdatePipelineNotificationsInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if s.Notifications == nil { invalidParams.Add(request.NewErrParamRequired("Notifications")) } @@ -7398,6 +7433,9 @@ func (s *UpdatePipelineStatusInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if s.Status == nil { invalidParams.Add(request.NewErrParamRequired("Status")) } diff --git a/vendor/github.com/aws/aws-sdk-go/service/elb/api.go b/vendor/github.com/aws/aws-sdk-go/service/elb/api.go index bb3af05402..c1028cae5d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elb/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elb/api.go @@ -9,6 +9,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/query" ) const opAddTags = "AddTags" @@ -16,7 +18,7 @@ const opAddTags = "AddTags" // AddTagsRequest generates a "aws/request.Request" representing the // client's request for the AddTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -50,6 +52,7 @@ func (c *ELB) AddTagsRequest(input *AddTagsInput) (req *request.Request, output output = &AddTagsOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -109,7 +112,7 @@ const opApplySecurityGroupsToLoadBalancer = "ApplySecurityGroupsToLoadBalancer" // ApplySecurityGroupsToLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the ApplySecurityGroupsToLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -199,7 +202,7 @@ const opAttachLoadBalancerToSubnets = "AttachLoadBalancerToSubnets" // AttachLoadBalancerToSubnetsRequest generates a "aws/request.Request" representing the // client's request for the AttachLoadBalancerToSubnets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -293,7 +296,7 @@ const opConfigureHealthCheck = "ConfigureHealthCheck" // ConfigureHealthCheckRequest generates a "aws/request.Request" representing the // client's request for the ConfigureHealthCheck operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -377,7 +380,7 @@ const opCreateAppCookieStickinessPolicy = "CreateAppCookieStickinessPolicy" // CreateAppCookieStickinessPolicyRequest generates a "aws/request.Request" representing the // client's request for the CreateAppCookieStickinessPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -411,6 +414,7 @@ func (c *ELB) CreateAppCookieStickinessPolicyRequest(input *CreateAppCookieStick output = &CreateAppCookieStickinessPolicyOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -479,7 +483,7 @@ const opCreateLBCookieStickinessPolicy = "CreateLBCookieStickinessPolicy" // CreateLBCookieStickinessPolicyRequest generates a "aws/request.Request" representing the // client's request for the CreateLBCookieStickinessPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -513,6 +517,7 @@ func (c *ELB) CreateLBCookieStickinessPolicyRequest(input *CreateLBCookieStickin output = &CreateLBCookieStickinessPolicyOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -583,7 +588,7 @@ const opCreateLoadBalancer = "CreateLoadBalancer" // CreateLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the CreateLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -712,7 +717,7 @@ const opCreateLoadBalancerListeners = "CreateLoadBalancerListeners" // CreateLoadBalancerListenersRequest generates a "aws/request.Request" representing the // client's request for the CreateLoadBalancerListeners operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -746,6 +751,7 @@ func (c *ELB) CreateLoadBalancerListenersRequest(input *CreateLoadBalancerListen output = &CreateLoadBalancerListenersOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -813,7 +819,7 @@ const opCreateLoadBalancerPolicy = "CreateLoadBalancerPolicy" // CreateLoadBalancerPolicyRequest generates a "aws/request.Request" representing the // client's request for the CreateLoadBalancerPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -847,6 +853,7 @@ func (c *ELB) CreateLoadBalancerPolicyRequest(input *CreateLoadBalancerPolicyInp output = &CreateLoadBalancerPolicyOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -908,7 +915,7 @@ const opDeleteLoadBalancer = "DeleteLoadBalancer" // DeleteLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the DeleteLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -942,6 +949,7 @@ func (c *ELB) DeleteLoadBalancerRequest(input *DeleteLoadBalancerInput) (req *re output = &DeleteLoadBalancerOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -991,7 +999,7 @@ const opDeleteLoadBalancerListeners = "DeleteLoadBalancerListeners" // DeleteLoadBalancerListenersRequest generates a "aws/request.Request" representing the // client's request for the DeleteLoadBalancerListeners operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1025,6 +1033,7 @@ func (c *ELB) DeleteLoadBalancerListenersRequest(input *DeleteLoadBalancerListen output = &DeleteLoadBalancerListenersOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1070,7 +1079,7 @@ const opDeleteLoadBalancerPolicy = "DeleteLoadBalancerPolicy" // DeleteLoadBalancerPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteLoadBalancerPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1104,6 +1113,7 @@ func (c *ELB) DeleteLoadBalancerPolicyRequest(input *DeleteLoadBalancerPolicyInp output = &DeleteLoadBalancerPolicyOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1153,7 +1163,7 @@ const opDeregisterInstancesFromLoadBalancer = "DeregisterInstancesFromLoadBalanc // DeregisterInstancesFromLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the DeregisterInstancesFromLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1243,7 +1253,7 @@ const opDescribeAccountLimits = "DescribeAccountLimits" // DescribeAccountLimitsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAccountLimits operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1321,7 +1331,7 @@ const opDescribeInstanceHealth = "DescribeInstanceHealth" // DescribeInstanceHealthRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstanceHealth operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1408,7 +1418,7 @@ const opDescribeLoadBalancerAttributes = "DescribeLoadBalancerAttributes" // DescribeLoadBalancerAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoadBalancerAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1490,7 +1500,7 @@ const opDescribeLoadBalancerPolicies = "DescribeLoadBalancerPolicies" // DescribeLoadBalancerPoliciesRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoadBalancerPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1579,7 +1589,7 @@ const opDescribeLoadBalancerPolicyTypes = "DescribeLoadBalancerPolicyTypes" // DescribeLoadBalancerPolicyTypesRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoadBalancerPolicyTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1669,7 +1679,7 @@ const opDescribeLoadBalancers = "DescribeLoadBalancers" // DescribeLoadBalancersRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoadBalancers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1809,7 +1819,7 @@ const opDescribeTags = "DescribeTags" // DescribeTagsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1888,7 +1898,7 @@ const opDetachLoadBalancerFromSubnets = "DetachLoadBalancerFromSubnets" // DetachLoadBalancerFromSubnetsRequest generates a "aws/request.Request" representing the // client's request for the DetachLoadBalancerFromSubnets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1975,7 +1985,7 @@ const opDisableAvailabilityZonesForLoadBalancer = "DisableAvailabilityZonesForLo // DisableAvailabilityZonesForLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the DisableAvailabilityZonesForLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2069,7 +2079,7 @@ const opEnableAvailabilityZonesForLoadBalancer = "EnableAvailabilityZonesForLoad // EnableAvailabilityZonesForLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the EnableAvailabilityZonesForLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2156,7 +2166,7 @@ const opModifyLoadBalancerAttributes = "ModifyLoadBalancerAttributes" // ModifyLoadBalancerAttributesRequest generates a "aws/request.Request" representing the // client's request for the ModifyLoadBalancerAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2256,7 +2266,7 @@ const opRegisterInstancesWithLoadBalancer = "RegisterInstancesWithLoadBalancer" // RegisterInstancesWithLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the RegisterInstancesWithLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2360,7 +2370,7 @@ const opRemoveTags = "RemoveTags" // RemoveTagsRequest generates a "aws/request.Request" representing the // client's request for the RemoveTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2394,6 +2404,7 @@ func (c *ELB) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Request, o output = &RemoveTagsOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2439,7 +2450,7 @@ const opSetLoadBalancerListenerSSLCertificate = "SetLoadBalancerListenerSSLCerti // SetLoadBalancerListenerSSLCertificateRequest generates a "aws/request.Request" representing the // client's request for the SetLoadBalancerListenerSSLCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2473,6 +2484,7 @@ func (c *ELB) SetLoadBalancerListenerSSLCertificateRequest(input *SetLoadBalance output = &SetLoadBalancerListenerSSLCertificateOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2539,7 +2551,7 @@ const opSetLoadBalancerPoliciesForBackendServer = "SetLoadBalancerPoliciesForBac // SetLoadBalancerPoliciesForBackendServerRequest generates a "aws/request.Request" representing the // client's request for the SetLoadBalancerPoliciesForBackendServer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2573,6 +2585,7 @@ func (c *ELB) SetLoadBalancerPoliciesForBackendServerRequest(input *SetLoadBalan output = &SetLoadBalancerPoliciesForBackendServerOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2639,7 +2652,7 @@ const opSetLoadBalancerPoliciesOfListener = "SetLoadBalancerPoliciesOfListener" // SetLoadBalancerPoliciesOfListenerRequest generates a "aws/request.Request" representing the // client's request for the SetLoadBalancerPoliciesOfListener operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2673,6 +2686,7 @@ func (c *ELB) SetLoadBalancerPoliciesOfListenerRequest(input *SetLoadBalancerPol output = &SetLoadBalancerPoliciesOfListenerOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } 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 b821105c51..b2a0738e3a 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 @@ -9,6 +9,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/query" ) const opAddListenerCertificates = "AddListenerCertificates" @@ -16,7 +18,7 @@ const opAddListenerCertificates = "AddListenerCertificates" // AddListenerCertificatesRequest generates a "aws/request.Request" representing the // client's request for the AddListenerCertificates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -62,6 +64,7 @@ func (c *ELBV2) AddListenerCertificatesRequest(input *AddListenerCertificatesInp // // To list the certificates for your listener, use DescribeListenerCertificates. // To remove certificates from your listener, use RemoveListenerCertificates. +// To specify the default SSL server certificate, use ModifyListener. // // 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 @@ -107,7 +110,7 @@ const opAddTags = "AddTags" // AddTagsRequest generates a "aws/request.Request" representing the // client's request for the AddTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -141,6 +144,7 @@ func (c *ELBV2) AddTagsRequest(input *AddTagsInput) (req *request.Request, outpu output = &AddTagsOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -203,7 +207,7 @@ const opCreateListener = "CreateListener" // CreateListenerRequest generates a "aws/request.Request" representing the // client's request for the CreateListener operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -339,7 +343,7 @@ const opCreateLoadBalancer = "CreateLoadBalancer" // CreateLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the CreateLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -475,7 +479,7 @@ const opCreateRule = "CreateRule" // CreateRuleRequest generates a "aws/request.Request" representing the // client's request for the CreateRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -602,7 +606,7 @@ const opCreateTargetGroup = "CreateTargetGroup" // CreateTargetGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateTargetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -706,7 +710,7 @@ const opDeleteListener = "DeleteListener" // DeleteListenerRequest generates a "aws/request.Request" representing the // client's request for the DeleteListener operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -740,6 +744,7 @@ func (c *ELBV2) DeleteListenerRequest(input *DeleteListenerInput) (req *request. output = &DeleteListenerOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -788,7 +793,7 @@ const opDeleteLoadBalancer = "DeleteLoadBalancer" // DeleteLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the DeleteLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -822,6 +827,7 @@ func (c *ELBV2) DeleteLoadBalancerRequest(input *DeleteLoadBalancerInput) (req * output = &DeleteLoadBalancerOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -882,7 +888,7 @@ const opDeleteRule = "DeleteRule" // DeleteRuleRequest generates a "aws/request.Request" representing the // client's request for the DeleteRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -916,6 +922,7 @@ func (c *ELBV2) DeleteRuleRequest(input *DeleteRuleInput) (req *request.Request, output = &DeleteRuleOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -964,7 +971,7 @@ const opDeleteTargetGroup = "DeleteTargetGroup" // DeleteTargetGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteTargetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -998,6 +1005,7 @@ func (c *ELBV2) DeleteTargetGroupRequest(input *DeleteTargetGroupInput) (req *re output = &DeleteTargetGroupOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1046,7 +1054,7 @@ const opDeregisterTargets = "DeregisterTargets" // DeregisterTargetsRequest generates a "aws/request.Request" representing the // client's request for the DeregisterTargets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1080,6 +1088,7 @@ func (c *ELBV2) DeregisterTargetsRequest(input *DeregisterTargetsInput) (req *re output = &DeregisterTargetsOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1131,7 +1140,7 @@ const opDescribeAccountLimits = "DescribeAccountLimits" // DescribeAccountLimitsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAccountLimits operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1211,7 +1220,7 @@ const opDescribeListenerCertificates = "DescribeListenerCertificates" // DescribeListenerCertificatesRequest generates a "aws/request.Request" representing the // client's request for the DescribeListenerCertificates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1290,7 +1299,7 @@ const opDescribeListeners = "DescribeListeners" // DescribeListenersRequest generates a "aws/request.Request" representing the // client's request for the DescribeListeners operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1433,7 +1442,7 @@ const opDescribeLoadBalancerAttributes = "DescribeLoadBalancerAttributes" // DescribeLoadBalancerAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoadBalancerAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1517,7 +1526,7 @@ const opDescribeLoadBalancers = "DescribeLoadBalancers" // DescribeLoadBalancersRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoadBalancers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1655,7 +1664,7 @@ const opDescribeRules = "DescribeRules" // DescribeRulesRequest generates a "aws/request.Request" representing the // client's request for the DescribeRules operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1741,7 +1750,7 @@ const opDescribeSSLPolicies = "DescribeSSLPolicies" // DescribeSSLPoliciesRequest generates a "aws/request.Request" representing the // client's request for the DescribeSSLPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1823,7 +1832,7 @@ const opDescribeTags = "DescribeTags" // DescribeTagsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1913,7 +1922,7 @@ const opDescribeTargetGroupAttributes = "DescribeTargetGroupAttributes" // DescribeTargetGroupAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeTargetGroupAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1996,7 +2005,7 @@ const opDescribeTargetGroups = "DescribeTargetGroups" // DescribeTargetGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTargetGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2140,7 +2149,7 @@ const opDescribeTargetHealth = "DescribeTargetHealth" // DescribeTargetHealthRequest generates a "aws/request.Request" representing the // client's request for the DescribeTargetHealth operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2227,7 +2236,7 @@ const opModifyListener = "ModifyListener" // ModifyListenerRequest generates a "aws/request.Request" representing the // client's request for the ModifyListener operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2354,7 +2363,7 @@ const opModifyLoadBalancerAttributes = "ModifyLoadBalancerAttributes" // ModifyLoadBalancerAttributesRequest generates a "aws/request.Request" representing the // client's request for the ModifyLoadBalancerAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2441,7 +2450,7 @@ const opModifyRule = "ModifyRule" // ModifyRuleRequest generates a "aws/request.Request" representing the // client's request for the ModifyRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2552,7 +2561,7 @@ const opModifyTargetGroup = "ModifyTargetGroup" // ModifyTargetGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyTargetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2637,7 +2646,7 @@ const opModifyTargetGroupAttributes = "ModifyTargetGroupAttributes" // ModifyTargetGroupAttributesRequest generates a "aws/request.Request" representing the // client's request for the ModifyTargetGroupAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2719,7 +2728,7 @@ const opRegisterTargets = "RegisterTargets" // RegisterTargetsRequest generates a "aws/request.Request" representing the // client's request for the RegisterTargets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2753,6 +2762,7 @@ func (c *ELBV2) RegisterTargetsRequest(input *RegisterTargetsInput) (req *reques output = &RegisterTargetsOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2760,8 +2770,8 @@ func (c *ELBV2) RegisterTargetsRequest(input *RegisterTargetsInput) (req *reques // // Registers the specified targets with the specified target group. // -// You can register targets by instance ID or by IP address. If the target is -// an EC2 instance, it must be in the running state when you register it. +// If the target is an EC2 instance, it must be in the running state when you +// register it. // // By default, the load balancer routes requests to registered targets using // the protocol and port for the target group. Alternatively, you can override @@ -2824,7 +2834,7 @@ const opRemoveListenerCertificates = "RemoveListenerCertificates" // RemoveListenerCertificatesRequest generates a "aws/request.Request" representing the // client's request for the RemoveListenerCertificates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2858,6 +2868,7 @@ func (c *ELBV2) RemoveListenerCertificatesRequest(input *RemoveListenerCertifica output = &RemoveListenerCertificatesOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2911,7 +2922,7 @@ const opRemoveTags = "RemoveTags" // RemoveTagsRequest generates a "aws/request.Request" representing the // client's request for the RemoveTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2945,6 +2956,7 @@ func (c *ELBV2) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Request, output = &RemoveTagsOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3004,7 +3016,7 @@ const opSetIpAddressType = "SetIpAddressType" // SetIpAddressTypeRequest generates a "aws/request.Request" representing the // client's request for the SetIpAddressType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3092,7 +3104,7 @@ const opSetRulePriorities = "SetRulePriorities" // SetRulePrioritiesRequest generates a "aws/request.Request" representing the // client's request for the SetRulePriorities operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3181,7 +3193,7 @@ const opSetSecurityGroups = "SetSecurityGroups" // SetSecurityGroupsRequest generates a "aws/request.Request" representing the // client's request for the SetSecurityGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3270,7 +3282,7 @@ const opSetSubnets = "SetSubnets" // SetSubnetsRequest generates a "aws/request.Request" representing the // client's request for the SetSubnets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3490,7 +3502,8 @@ func (s *Action) SetType(v string) *Action { type AddListenerCertificatesInput struct { _ struct{} `type:"structure"` - // The certificate to add. You can specify one certificate per call. + // The certificate to add. You can specify one certificate per call. Set CertificateArn + // to the certificate ARN but do not set IsDefault. // // Certificates is a required field Certificates []*Certificate `type:"list" required:"true"` @@ -3989,7 +4002,8 @@ type Certificate struct { // The Amazon Resource Name (ARN) of the certificate. CertificateArn *string `type:"string"` - // Indicates whether the certificate is the default certificate. + // Indicates whether the certificate is the default certificate. Do not set + // IsDefault when specifying a certificate as an input parameter. IsDefault *bool `type:"boolean"` } @@ -4052,28 +4066,30 @@ type CreateListenerInput struct { _ struct{} `type:"structure"` // [HTTPS listeners] The default SSL server certificate. You must provide exactly - // one default certificate. To create a certificate list, use AddListenerCertificates. + // one certificate. Set CertificateArn to the certificate ARN but do not set + // IsDefault. + // + // To create a certificate list, use AddListenerCertificates. Certificates []*Certificate `type:"list"` // The actions for the default rule. The rule must include one forward action // or one or more fixed-response actions. // - // If the action type is forward, you can specify a single target group. The - // protocol of the target group must be HTTP or HTTPS for an Application Load - // Balancer or TCP for a Network Load Balancer. + // If the action type is forward, you specify a target group. The protocol of + // the target group must be HTTP or HTTPS for an Application Load Balancer or + // TCP for a Network Load Balancer. // - // [HTTPS listener] If the action type is authenticate-oidc, you can use an - // identity provider that is OpenID Connect (OIDC) compliant to authenticate - // users as they access your application. + // [HTTPS listener] If the action type is authenticate-oidc, you authenticate + // users through an identity provider that is OpenID Connect (OIDC) compliant. // - // [HTTPS listener] If the action type is authenticate-cognito, you can use - // Amazon Cognito to authenticate users as they access your application. + // [HTTPS listener] If the action type is authenticate-cognito, you authenticate + // users through the user pools supported by Amazon Cognito. // - // [Application Load Balancer] If the action type is redirect, you can redirect - // HTTP and HTTPS requests. + // [Application Load Balancer] If the action type is redirect, you redirect + // specified client requests from one URL to another. // - // [Application Load Balancer] If the action type is fixed-response, you can - // return a custom HTTP response. + // [Application Load Balancer] If the action type is fixed-response, you drop + // specified client requests and return a custom HTTP response. // // DefaultActions is a required field DefaultActions []*Action `type:"list" required:"true"` @@ -4379,20 +4395,21 @@ type CreateRuleInput struct { // The actions. Each rule must include exactly one of the following types of // actions: forward, fixed-response, or redirect. // - // If the action type is forward, you can specify a single target group. + // If the action type is forward, you specify a target group. The protocol of + // the target group must be HTTP or HTTPS for an Application Load Balancer or + // TCP for a Network Load Balancer. // - // [HTTPS listener] If the action type is authenticate-oidc, you can use an - // identity provider that is OpenID Connect (OIDC) compliant to authenticate - // users as they access your application. + // [HTTPS listener] If the action type is authenticate-oidc, you authenticate + // users through an identity provider that is OpenID Connect (OIDC) compliant. // - // [HTTPS listener] If the action type is authenticate-cognito, you can use - // Amazon Cognito to authenticate users as they access your application. + // [HTTPS listener] If the action type is authenticate-cognito, you authenticate + // users through the user pools supported by Amazon Cognito. // - // [Application Load Balancer] If the action type is redirect, you can redirect - // HTTP and HTTPS requests. + // [Application Load Balancer] If the action type is redirect, you redirect + // specified client requests from one URL to another. // - // [Application Load Balancer] If the action type is fixed-response, you can - // return a custom HTTP response. + // [Application Load Balancer] If the action type is fixed-response, you drop + // specified client requests and return a custom HTTP response. // // Actions is a required field Actions []*Action `type:"list" required:"true"` @@ -4536,10 +4553,16 @@ func (s *CreateRuleOutput) SetRules(v []*Rule) *CreateRuleOutput { type CreateTargetGroupInput struct { _ struct{} `type:"structure"` + // Indicates whether health checks are enabled. If the target type is instance + // or ip, the default is true. If the target type is lambda, the default is + // false. + HealthCheckEnabled *bool `type:"boolean"` + // The approximate amount of time, in seconds, between health checks of an individual // target. For Application Load Balancers, the range is 5–300 seconds. For Network - // Load Balancers, the supported values are 10 or 30 seconds. The default is - // 30 seconds. + // Load Balancers, the supported values are 10 or 30 seconds. If the target + // type is instance or ip, the default is 30 seconds. If the target type is + // lambda, the default is 35 seconds. HealthCheckIntervalSeconds *int64 `min:"5" type:"integer"` // [HTTP/HTTPS health checks] The ping path that is the destination on the targets @@ -4558,10 +4581,11 @@ type CreateTargetGroupInput struct { HealthCheckProtocol *string `type:"string" enum:"ProtocolEnum"` // The amount of time, in seconds, during which no response from a target means - // a failed health check. For Application Load Balancers, the range is 2–60 - // seconds and the default is 5 seconds. For Network Load Balancers, this is - // 10 seconds for TCP and HTTPS health checks and 6 seconds for HTTP health - // checks. + // a failed health check. For Application Load Balancers, the range is 2–120 + // seconds and the default is 5 seconds if the target type is instance or ip + // and 30 seconds if the target type is lambda. For Network Load Balancers, + // this is 10 seconds for TCP and HTTPS health checks and 6 seconds for HTTP + // health checks. HealthCheckTimeoutSeconds *int64 `min:"2" type:"integer"` // The number of consecutive health checks successes required before considering @@ -4583,28 +4607,30 @@ type CreateTargetGroupInput struct { Name *string `type:"string" required:"true"` // The port on which the targets receive traffic. This port is used unless you - // specify a port override when registering the target. - // - // Port is a required field - Port *int64 `min:"1" type:"integer" required:"true"` + // specify a port override when registering the target. If the target is a Lambda + // function, this parameter does not apply. + Port *int64 `min:"1" type:"integer"` // The protocol to use for routing traffic to the targets. For Application Load // Balancers, the supported protocols are HTTP and HTTPS. For Network Load Balancers, - // the supported protocol is TCP. - // - // Protocol is a required field - Protocol *string `type:"string" required:"true" enum:"ProtocolEnum"` + // the supported protocol is TCP. If the target is a Lambda function, this parameter + // does not apply. + Protocol *string `type:"string" enum:"ProtocolEnum"` // The type of target that you must specify when registering targets with this - // target group. The possible values are instance (targets are specified by - // instance ID) or ip (targets are specified by IP address). The default is - // instance. You can't specify targets for a target group using both instance - // IDs and IP addresses. - // - // If the target type is ip, specify IP addresses from the subnets of the virtual - // private cloud (VPC) for the target group, the RFC 1918 range (10.0.0.0/8, - // 172.16.0.0/12, and 192.168.0.0/16), and the RFC 6598 range (100.64.0.0/10). - // You can't specify publicly routable IP addresses. + // target group. You can't specify targets for a target group using more than + // one target type. + // + // * instance - Targets are specified by instance ID. This is the default + // value. + // + // * ip - Targets are specified by IP address. You can specify IP addresses + // from the subnets of the virtual private cloud (VPC) for the target group, + // the RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and + // the RFC 6598 range (100.64.0.0/10). You can't specify publicly routable + // IP addresses. + // + // * lambda - The target groups contains a single Lambda function. TargetType *string `type:"string" enum:"TargetTypeEnum"` // The number of consecutive health check failures required before considering @@ -4613,10 +4639,9 @@ type CreateTargetGroupInput struct { // count. UnhealthyThresholdCount *int64 `min:"2" type:"integer"` - // The identifier of the virtual private cloud (VPC). - // - // VpcId is a required field - VpcId *string `type:"string" required:"true"` + // The identifier of the virtual private cloud (VPC). If the target is a Lambda + // function, this parameter does not apply. + VpcId *string `type:"string"` } // String returns the string representation @@ -4647,21 +4672,12 @@ func (s *CreateTargetGroupInput) Validate() error { if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } - if s.Port == nil { - invalidParams.Add(request.NewErrParamRequired("Port")) - } if s.Port != nil && *s.Port < 1 { invalidParams.Add(request.NewErrParamMinValue("Port", 1)) } - if s.Protocol == nil { - invalidParams.Add(request.NewErrParamRequired("Protocol")) - } if s.UnhealthyThresholdCount != nil && *s.UnhealthyThresholdCount < 2 { invalidParams.Add(request.NewErrParamMinValue("UnhealthyThresholdCount", 2)) } - if s.VpcId == nil { - invalidParams.Add(request.NewErrParamRequired("VpcId")) - } if s.Matcher != nil { if err := s.Matcher.Validate(); err != nil { invalidParams.AddNested("Matcher", err.(request.ErrInvalidParams)) @@ -4674,6 +4690,12 @@ func (s *CreateTargetGroupInput) Validate() error { return nil } +// SetHealthCheckEnabled sets the HealthCheckEnabled field's value. +func (s *CreateTargetGroupInput) SetHealthCheckEnabled(v bool) *CreateTargetGroupInput { + s.HealthCheckEnabled = &v + return s +} + // SetHealthCheckIntervalSeconds sets the HealthCheckIntervalSeconds field's value. func (s *CreateTargetGroupInput) SetHealthCheckIntervalSeconds(v int64) *CreateTargetGroupInput { s.HealthCheckIntervalSeconds = &v @@ -6485,28 +6507,30 @@ type ModifyListenerInput struct { _ struct{} `type:"structure"` // [HTTPS listeners] The default SSL server certificate. You must provide exactly - // one default certificate. To create a certificate list, use AddListenerCertificates. + // one certificate. Set CertificateArn to the certificate ARN but do not set + // IsDefault. + // + // To create a certificate list, use AddListenerCertificates. Certificates []*Certificate `type:"list"` // The actions for the default rule. The rule must include one forward action // or one or more fixed-response actions. // - // If the action type is forward, you can specify a single target group. The - // protocol of the target group must be HTTP or HTTPS for an Application Load - // Balancer or TCP for a Network Load Balancer. + // If the action type is forward, you specify a target group. The protocol of + // the target group must be HTTP or HTTPS for an Application Load Balancer or + // TCP for a Network Load Balancer. // - // [HTTPS listener] If the action type is authenticate-oidc, you can use an - // identity provider that is OpenID Connect (OIDC) compliant to authenticate - // users as they access your application. + // [HTTPS listener] If the action type is authenticate-oidc, you authenticate + // users through an identity provider that is OpenID Connect (OIDC) compliant. // - // [HTTPS listener] If the action type is authenticate-cognito, you can use - // Amazon Cognito to authenticate users as they access your application. + // [HTTPS listener] If the action type is authenticate-cognito, you authenticate + // users through the user pools supported by Amazon Cognito. // - // [Application Load Balancer] If the action type is redirect, you can redirect - // HTTP and HTTPS requests. + // [Application Load Balancer] If the action type is redirect, you redirect + // specified client requests from one URL to another. // - // [Application Load Balancer] If the action type is fixed-response, you can - // return a custom HTTP response. + // [Application Load Balancer] If the action type is fixed-response, you drop + // specified client requests and return a custom HTTP response. DefaultActions []*Action `type:"list"` // The Amazon Resource Name (ARN) of the listener. @@ -6703,14 +6727,21 @@ type ModifyRuleInput struct { // The actions. // - // If the action type is forward, you can specify a single target group. + // If the action type is forward, you specify a target group. The protocol of + // the target group must be HTTP or HTTPS for an Application Load Balancer or + // TCP for a Network Load Balancer. + // + // [HTTPS listener] If the action type is authenticate-oidc, you authenticate + // users through an identity provider that is OpenID Connect (OIDC) compliant. // - // If the action type is authenticate-oidc, you can use an identity provider - // that is OpenID Connect (OIDC) compliant to authenticate users as they access - // your application. + // [HTTPS listener] If the action type is authenticate-cognito, you authenticate + // users through the user pools supported by Amazon Cognito. // - // If the action type is authenticate-cognito, you can use Amazon Cognito to - // authenticate users as they access your application. + // [Application Load Balancer] If the action type is redirect, you redirect + // specified client requests from one URL to another. + // + // [Application Load Balancer] If the action type is fixed-response, you drop + // specified client requests and return a custom HTTP response. Actions []*Action `type:"list"` // The conditions. Each condition specifies a field name and a single value. @@ -6902,9 +6933,14 @@ func (s *ModifyTargetGroupAttributesOutput) SetAttributes(v []*TargetGroupAttrib type ModifyTargetGroupInput struct { _ struct{} `type:"structure"` + // Indicates whether health checks are enabled. + HealthCheckEnabled *bool `type:"boolean"` + // The approximate amount of time, in seconds, between health checks of an individual // target. For Application Load Balancers, the range is 5–300 seconds. For Network // Load Balancers, the supported values are 10 or 30 seconds. + // + // If the protocol of the target group is TCP, you can't modify this setting. HealthCheckIntervalSeconds *int64 `min:"5" type:"integer"` // [HTTP/HTTPS health checks] The ping path that is the destination for the @@ -6917,10 +6953,14 @@ type ModifyTargetGroupInput struct { // The protocol the load balancer uses when performing health checks on targets. // The TCP protocol is supported only if the protocol of the target group is // TCP. + // + // If the protocol of the target group is TCP, you can't modify this setting. HealthCheckProtocol *string `type:"string" enum:"ProtocolEnum"` // [HTTP/HTTPS health checks] The amount of time, in seconds, during which no // response means a failed health check. + // + // If the protocol of the target group is TCP, you can't modify this setting. HealthCheckTimeoutSeconds *int64 `min:"2" type:"integer"` // The number of consecutive health checks successes required before considering @@ -6929,6 +6969,8 @@ type ModifyTargetGroupInput struct { // [HTTP/HTTPS health checks] The HTTP codes to use when checking for a successful // response from a target. + // + // If the protocol of the target group is TCP, you can't modify this setting. Matcher *Matcher `type:"structure"` // The Amazon Resource Name (ARN) of the target group. @@ -6985,6 +7027,12 @@ func (s *ModifyTargetGroupInput) Validate() error { return nil } +// SetHealthCheckEnabled sets the HealthCheckEnabled field's value. +func (s *ModifyTargetGroupInput) SetHealthCheckEnabled(v bool) *ModifyTargetGroupInput { + s.HealthCheckEnabled = &v + return s +} + // SetHealthCheckIntervalSeconds sets the HealthCheckIntervalSeconds field's value. func (s *ModifyTargetGroupInput) SetHealthCheckIntervalSeconds(v int64) *ModifyTargetGroupInput { s.HealthCheckIntervalSeconds = &v @@ -7189,6 +7237,10 @@ type RegisterTargetsInput struct { // The targets. // + // To register a target by instance ID, specify the instance ID. To register + // a target by IP address, specify the IP address. To register a Lambda function, + // specify the ARN of the Lambda function. + // // Targets is a required field Targets []*TargetDescription `type:"list" required:"true"` } @@ -7258,7 +7310,8 @@ func (s RegisterTargetsOutput) GoString() string { type RemoveListenerCertificatesInput struct { _ struct{} `type:"structure"` - // The certificate to remove. You can specify one certificate per call. + // The certificate to remove. You can specify one certificate per call. Set + // CertificateArn to the certificate ARN but do not set IsDefault. // // Certificates is a required field Certificates []*Certificate `type:"list" required:"true"` @@ -8030,16 +8083,23 @@ type TargetDescription struct { // from all enabled Availability Zones for the load balancer. // // This parameter is not supported if the target type of the target group is - // instance. If the IP address is in a subnet of the VPC for the target group, - // the Availability Zone is automatically detected and this parameter is optional. - // If the IP address is outside the VPC, this parameter is required. + // instance. + // + // If the target type is ip and the IP address is in a subnet of the VPC for + // the target group, the Availability Zone is automatically detected and this + // parameter is optional. If the IP address is outside the VPC, this parameter + // is required. // - // With an Application Load Balancer, if the IP address is outside the VPC for - // the target group, the only supported value is all. + // With an Application Load Balancer, if the target type is ip and the IP address + // is outside the VPC for the target group, the only supported value is all. + // + // If the target type is lambda, this parameter is optional and the only supported + // value is all. AvailabilityZone *string `type:"string"` // The ID of the target. If the target type of the target group is instance, // specify an instance ID. If the target type is ip, specify an IP address. + // If the target type is lambda, specify the ARN of the Lambda function. // // Id is a required field Id *string `type:"string" required:"true"` @@ -8096,6 +8156,9 @@ func (s *TargetDescription) SetPort(v int64) *TargetDescription { type TargetGroup struct { _ struct{} `type:"structure"` + // Indicates whether health checks are enabled. + HealthCheckEnabled *bool `type:"boolean"` + // The approximate amount of time, in seconds, between health checks of an individual // target. HealthCheckIntervalSeconds *int64 `min:"5" type:"integer"` @@ -8159,6 +8222,12 @@ func (s TargetGroup) GoString() string { return s.String() } +// SetHealthCheckEnabled sets the HealthCheckEnabled field's value. +func (s *TargetGroup) SetHealthCheckEnabled(v bool) *TargetGroup { + s.HealthCheckEnabled = &v + return s +} + // SetHealthCheckIntervalSeconds sets the HealthCheckIntervalSeconds field's value. func (s *TargetGroup) SetHealthCheckIntervalSeconds(v int64) *TargetGroup { s.HealthCheckIntervalSeconds = &v @@ -8255,15 +8324,17 @@ type TargetGroupAttribute struct { // The name of the attribute. // - // The following attributes are supported by both Application Load Balancers - // and Network Load Balancers: + // The following attribute is supported by both Application Load Balancers and + // Network Load Balancers: // // * deregistration_delay.timeout_seconds - The amount of time, in seconds, // for Elastic Load Balancing to wait before changing the state of a deregistering // target from draining to unused. The range is 0-3600 seconds. The default - // value is 300 seconds. + // value is 300 seconds. If the target is a Lambda function, this attribute + // is not supported. // - // The following attributes are supported by only Application Load Balancers: + // The following attributes are supported by Application Load Balancers if the + // target is not a Lambda function: // // * slow_start.duration_seconds - The time period, in seconds, during which // a newly registered target receives a linearly increasing share of the @@ -8283,7 +8354,16 @@ type TargetGroupAttribute struct { // considered stale. The range is 1 second to 1 week (604800 seconds). The // default value is 1 day (86400 seconds). // - // The following attributes are supported by only Network Load Balancers: + // The following attribute is supported only if the target is a Lambda function. + // + // * lambda.multi_value_headers.enabled - Indicates whether the request and + // response headers exchanged between the load balancer and the Lambda function + // include arrays of values or strings. The value is true or false. The default + // is false. If the value is false and the request contains a duplicate header + // field name or query parameter key, the load balancer uses the last value + // sent by the client. + // + // The following attribute is supported only by Network Load Balancers: // // * proxy_protocol_v2.enabled - Indicates whether Proxy Protocol version // 2 is enabled. The value is true or false. The default is false. @@ -8323,7 +8403,9 @@ type TargetHealth struct { // state is healthy, a description is not provided. Description *string `type:"string"` - // The reason code. If the target state is healthy, a reason code is not provided. + // The reason code. + // + // If the target state is healthy, a reason code is not provided. // // If the target state is initial, the reason code can be one of the following // values: @@ -8367,6 +8449,12 @@ type TargetHealth struct { // // * Target.DeregistrationInProgress - The target is in the process of being // deregistered and the deregistration delay period has not expired. + // + // If the target state is unavailable, the reason code can be the following + // value: + // + // * Target.HealthCheckDisabled - Health checks are disabled for the target + // group. Reason *string `type:"string" enum:"TargetHealthReasonEnum"` // The state of the target. @@ -8570,6 +8658,9 @@ const ( // TargetHealthReasonEnumTargetIpUnusable is a TargetHealthReasonEnum enum value TargetHealthReasonEnumTargetIpUnusable = "Target.IpUnusable" + // TargetHealthReasonEnumTargetHealthCheckDisabled is a TargetHealthReasonEnum enum value + TargetHealthReasonEnumTargetHealthCheckDisabled = "Target.HealthCheckDisabled" + // TargetHealthReasonEnumElbInternalError is a TargetHealthReasonEnum enum value TargetHealthReasonEnumElbInternalError = "Elb.InternalError" ) @@ -8600,4 +8691,7 @@ const ( // TargetTypeEnumIp is a TargetTypeEnum enum value TargetTypeEnumIp = "ip" + + // TargetTypeEnumLambda is a TargetTypeEnum enum value + TargetTypeEnumLambda = "lambda" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/emr/api.go b/vendor/github.com/aws/aws-sdk-go/service/emr/api.go index 7ca8a0e729..6f844686a9 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/emr/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/emr/api.go @@ -18,7 +18,7 @@ const opAddInstanceFleet = "AddInstanceFleet" // AddInstanceFleetRequest generates a "aws/request.Request" representing the // client's request for the AddInstanceFleet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -103,7 +103,7 @@ const opAddInstanceGroups = "AddInstanceGroups" // AddInstanceGroupsRequest generates a "aws/request.Request" representing the // client's request for the AddInstanceGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -183,7 +183,7 @@ const opAddJobFlowSteps = "AddJobFlowSteps" // AddJobFlowStepsRequest generates a "aws/request.Request" representing the // client's request for the AddJobFlowSteps operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -285,7 +285,7 @@ const opAddTags = "AddTags" // AddTagsRequest generates a "aws/request.Request" representing the // client's request for the AddTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -319,6 +319,7 @@ func (c *EMR) AddTagsRequest(input *AddTagsInput) (req *request.Request, output output = &AddTagsOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -369,7 +370,7 @@ const opCancelSteps = "CancelSteps" // CancelStepsRequest generates a "aws/request.Request" representing the // client's request for the CancelSteps operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -456,7 +457,7 @@ const opCreateSecurityConfiguration = "CreateSecurityConfiguration" // CreateSecurityConfigurationRequest generates a "aws/request.Request" representing the // client's request for the CreateSecurityConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -539,7 +540,7 @@ const opDeleteSecurityConfiguration = "DeleteSecurityConfiguration" // DeleteSecurityConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteSecurityConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -573,6 +574,7 @@ func (c *EMR) DeleteSecurityConfigurationRequest(input *DeleteSecurityConfigurat output = &DeleteSecurityConfigurationOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -621,7 +623,7 @@ const opDescribeCluster = "DescribeCluster" // DescribeClusterRequest generates a "aws/request.Request" representing the // client's request for the DescribeCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -704,7 +706,7 @@ const opDescribeJobFlows = "DescribeJobFlows" // DescribeJobFlowsRequest generates a "aws/request.Request" representing the // client's request for the DescribeJobFlows operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -812,7 +814,7 @@ const opDescribeSecurityConfiguration = "DescribeSecurityConfiguration" // DescribeSecurityConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DescribeSecurityConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -895,7 +897,7 @@ const opDescribeStep = "DescribeStep" // DescribeStepRequest generates a "aws/request.Request" representing the // client's request for the DescribeStep operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -977,7 +979,7 @@ const opListBootstrapActions = "ListBootstrapActions" // ListBootstrapActionsRequest generates a "aws/request.Request" representing the // client's request for the ListBootstrapActions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1115,7 +1117,7 @@ const opListClusters = "ListClusters" // ListClustersRequest generates a "aws/request.Request" representing the // client's request for the ListClusters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1257,7 +1259,7 @@ const opListInstanceFleets = "ListInstanceFleets" // ListInstanceFleetsRequest generates a "aws/request.Request" representing the // client's request for the ListInstanceFleets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1398,7 +1400,7 @@ const opListInstanceGroups = "ListInstanceGroups" // ListInstanceGroupsRequest generates a "aws/request.Request" representing the // client's request for the ListInstanceGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1536,7 +1538,7 @@ const opListInstances = "ListInstances" // ListInstancesRequest generates a "aws/request.Request" representing the // client's request for the ListInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1677,7 +1679,7 @@ const opListSecurityConfigurations = "ListSecurityConfigurations" // ListSecurityConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the ListSecurityConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1762,7 +1764,7 @@ const opListSteps = "ListSteps" // ListStepsRequest generates a "aws/request.Request" representing the // client's request for the ListSteps operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1901,7 +1903,7 @@ const opModifyInstanceFleet = "ModifyInstanceFleet" // ModifyInstanceFleetRequest generates a "aws/request.Request" representing the // client's request for the ModifyInstanceFleet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1935,8 +1937,7 @@ func (c *EMR) ModifyInstanceFleetRequest(input *ModifyInstanceFleetInput) (req * output = &ModifyInstanceFleetOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1990,7 +1991,7 @@ const opModifyInstanceGroups = "ModifyInstanceGroups" // ModifyInstanceGroupsRequest generates a "aws/request.Request" representing the // client's request for the ModifyInstanceGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2024,8 +2025,7 @@ func (c *EMR) ModifyInstanceGroupsRequest(input *ModifyInstanceGroupsInput) (req output = &ModifyInstanceGroupsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2075,7 +2075,7 @@ const opPutAutoScalingPolicy = "PutAutoScalingPolicy" // PutAutoScalingPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutAutoScalingPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2152,7 +2152,7 @@ const opRemoveAutoScalingPolicy = "RemoveAutoScalingPolicy" // RemoveAutoScalingPolicyRequest generates a "aws/request.Request" representing the // client's request for the RemoveAutoScalingPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2186,6 +2186,7 @@ func (c *EMR) RemoveAutoScalingPolicyRequest(input *RemoveAutoScalingPolicyInput output = &RemoveAutoScalingPolicyOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2227,7 +2228,7 @@ const opRemoveTags = "RemoveTags" // RemoveTagsRequest generates a "aws/request.Request" representing the // client's request for the RemoveTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2261,6 +2262,7 @@ func (c *EMR) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Request, o output = &RemoveTagsOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2313,7 +2315,7 @@ const opRunJobFlow = "RunJobFlow" // RunJobFlowRequest generates a "aws/request.Request" representing the // client's request for the RunJobFlow operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2419,7 +2421,7 @@ const opSetTerminationProtection = "SetTerminationProtection" // SetTerminationProtectionRequest generates a "aws/request.Request" representing the // client's request for the SetTerminationProtection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2453,8 +2455,7 @@ func (c *EMR) SetTerminationProtectionRequest(input *SetTerminationProtectionInp output = &SetTerminationProtectionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2517,7 +2518,7 @@ const opSetVisibleToAllUsers = "SetVisibleToAllUsers" // SetVisibleToAllUsersRequest generates a "aws/request.Request" representing the // client's request for the SetVisibleToAllUsers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2551,8 +2552,7 @@ func (c *EMR) SetVisibleToAllUsersRequest(input *SetVisibleToAllUsersInput) (req output = &SetVisibleToAllUsersOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2604,7 +2604,7 @@ const opTerminateJobFlows = "TerminateJobFlows" // TerminateJobFlowsRequest generates a "aws/request.Request" representing the // client's request for the TerminateJobFlows operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2638,8 +2638,7 @@ func (c *EMR) TerminateJobFlowsRequest(input *TerminateJobFlowsInput) (req *requ output = &TerminateJobFlowsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3035,24 +3034,16 @@ func (s AddTagsOutput) GoString() string { return s.String() } -// An application is any Amazon or third-party software that you can add to -// the cluster. This structure contains a list of strings that indicates the -// software to use with the cluster and accepts a user argument list. Amazon -// EMR accepts and forwards the argument list to the corresponding installation -// script as bootstrap action argument. For more information, see Using the -// MapR Distribution for Hadoop (http://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-mapr.html). -// Currently supported values are: +// With Amazon EMR release version 4.0 and later, the only accepted parameter +// is the application name. To pass arguments to applications, you use configuration +// classifications specified using configuration JSON objects. For more information, +// see Configuring Applications (http://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-configure-apps.html). // -// * "mapr-m3" - launch the cluster using MapR M3 Edition. -// -// * "mapr-m5" - launch the cluster using MapR M5 Edition. -// -// * "mapr" with the user arguments specifying "--edition,m3" or "--edition,m5" -// - launch the cluster using MapR M3 or M5 Edition, respectively. -// -// In Amazon EMR releases 4.x and later, the only accepted parameter is the -// application name. To pass arguments to applications, you supply a configuration -// for each application. +// With earlier Amazon EMR releases, the application is any Amazon or third-party +// software that you can add to the cluster. This structure contains a list +// of strings that indicates the software to use with the cluster and accepts +// a user argument list. Amazon EMR accepts and forwards the argument list to +// the corresponding installation script as bootstrap action argument. type Application struct { _ struct{} `type:"structure"` @@ -4789,7 +4780,8 @@ type Ec2InstanceAttributes struct { // A list of additional Amazon EC2 security group IDs for the master node. AdditionalMasterSecurityGroups []*string `type:"list"` - // A list of additional Amazon EC2 security group IDs for the slave nodes. + // A list of additional Amazon EC2 security group IDs for the core and task + // nodes. AdditionalSlaveSecurityGroups []*string `type:"list"` // The Availability Zone in which the cluster will run. @@ -4812,7 +4804,7 @@ type Ec2InstanceAttributes struct { // The identifier of the Amazon EC2 security group for the master node. EmrManagedMasterSecurityGroup *string `type:"string"` - // The identifier of the Amazon EC2 security group for the slave nodes. + // The identifier of the Amazon EC2 security group for the core and task nodes. EmrManagedSlaveSecurityGroup *string `type:"string"` // The IAM role that was specified when the cluster was launched. The EC2 instances @@ -7029,7 +7021,8 @@ type JobFlowInstancesConfig struct { // A list of additional Amazon EC2 security group IDs for the master node. AdditionalMasterSecurityGroups []*string `type:"list"` - // A list of additional Amazon EC2 security group IDs for the slave nodes. + // A list of additional Amazon EC2 security group IDs for the core and task + // nodes. AdditionalSlaveSecurityGroups []*string `type:"list"` // The name of the EC2 key pair that can be used to ssh to the master node as @@ -7060,7 +7053,7 @@ type JobFlowInstancesConfig struct { // The identifier of the Amazon EC2 security group for the master node. EmrManagedMasterSecurityGroup *string `type:"string"` - // The identifier of the Amazon EC2 security group for the slave nodes. + // The identifier of the Amazon EC2 security group for the core and task nodes. EmrManagedSlaveSecurityGroup *string `type:"string"` // Applies only to Amazon EMR release versions earlier than 4.0. The Hadoop @@ -7098,7 +7091,7 @@ type JobFlowInstancesConfig struct { // to access clusters in VPC private subnets. ServiceAccessSecurityGroup *string `type:"string"` - // The EC2 instance type of the slave nodes. + // The EC2 instance type of the core and task nodes. SlaveInstanceType *string `min:"1" type:"string"` // Specifies whether to lock the cluster to prevent the Amazon EC2 instances @@ -7272,8 +7265,9 @@ type JobFlowInstancesDetail struct { HadoopVersion *string `type:"string"` // The number of Amazon EC2 instances in the cluster. If the value is 1, the - // same instance serves as both the master and slave node. If the value is greater - // than 1, one instance is the master node and all others are slave nodes. + // same instance serves as both the master and core and task node. If the value + // is greater than 1, one instance is the master node and all others are core + // and task nodes. // // InstanceCount is a required field InstanceCount *int64 `type:"integer" required:"true"` @@ -7308,7 +7302,7 @@ type JobFlowInstancesDetail struct { // The Amazon EC2 Availability Zone for the cluster. Placement *PlacementType `type:"structure"` - // The Amazon EC2 slave node instance type. + // The Amazon EC2 core and task node instance type. // // SlaveInstanceType is a required field SlaveInstanceType *string `min:"1" type:"string" required:"true"` @@ -8618,9 +8612,10 @@ type RunJobFlowInput struct { // 4.0 and later, ReleaseLabel is used. To specify a custom AMI, use CustomAmiID. AmiVersion *string `type:"string"` - // For Amazon EMR releases 4.0 and later. A list of applications for the cluster. - // Valid values are: "Hadoop", "Hive", "Mahout", "Pig", and "Spark." They are - // case insensitive. + // Applies to Amazon EMR releases 4.0 and later. A case-insensitive list of + // applications for Amazon EMR to install and configure when launching the cluster. + // For a list of applications available for each Amazon EMR release version, + // see the Amazon EMR Release Guide (http://docs.aws.amazon.com/emr/latest/ReleaseGuide/). Applications []*Application `type:"list"` // An IAM role for automatic scaling policies. The default role is EMR_AutoScaling_DefaultRole. @@ -9596,10 +9591,11 @@ type SpotProvisioningSpecification struct { BlockDurationMinutes *int64 `type:"integer"` // The action to take when TargetSpotCapacity has not been fulfilled when the - // TimeoutDurationMinutes has expired. Spot instances are not uprovisioned within - // the Spot provisioining timeout. Valid values are TERMINATE_CLUSTER and SWITCH_TO_ON_DEMAND. - // SWITCH_TO_ON_DEMAND specifies that if no Spot instances are available, On-Demand - // Instances should be provisioned to fulfill any remaining Spot capacity. + // TimeoutDurationMinutes has expired; that is, when all Spot instances could + // not be provisioned within the Spot provisioning timeout. Valid values are + // TERMINATE_CLUSTER and SWITCH_TO_ON_DEMAND. SWITCH_TO_ON_DEMAND specifies + // that if no Spot instances are available, On-Demand Instances should be provisioned + // to fulfill any remaining Spot capacity. // // TimeoutAction is a required field TimeoutAction *string `type:"string" required:"true" enum:"SpotProvisioningTimeoutAction"` @@ -9661,8 +9657,9 @@ func (s *SpotProvisioningSpecification) SetTimeoutDurationMinutes(v int64) *Spot type Step struct { _ struct{} `type:"structure"` - // This specifies what action to take when the cluster step fails. Possible - // values are TERMINATE_CLUSTER, CANCEL_AND_WAIT, and CONTINUE. + // The action to take when the cluster step fails. Possible values are TERMINATE_CLUSTER, + // CANCEL_AND_WAIT, and CONTINUE. TERMINATE_JOB_FLOW is provided for backward + // compatibility. We recommend using TERMINATE_CLUSTER instead. ActionOnFailure *string `type:"string" enum:"ActionOnFailure"` // The Hadoop job configuration of the cluster step. @@ -9722,7 +9719,9 @@ func (s *Step) SetStatus(v *StepStatus) *Step { type StepConfig struct { _ struct{} `type:"structure"` - // The action to take if the step fails. + // The action to take when the cluster step fails. Possible values are TERMINATE_CLUSTER, + // CANCEL_AND_WAIT, and CONTINUE. TERMINATE_JOB_FLOW is provided for backward + // compatibility. We recommend using TERMINATE_CLUSTER instead. ActionOnFailure *string `type:"string" enum:"ActionOnFailure"` // The JAR file used for the step. @@ -9976,8 +9975,9 @@ func (s *StepStatus) SetTimeline(v *StepTimeline) *StepStatus { type StepSummary struct { _ struct{} `type:"structure"` - // This specifies what action to take when the cluster step fails. Possible - // values are TERMINATE_CLUSTER, CANCEL_AND_WAIT, and CONTINUE. + // The action to take when the cluster step fails. Possible values are TERMINATE_CLUSTER, + // CANCEL_AND_WAIT, and CONTINUE. TERMINATE_JOB_FLOW is available for backward + // compatibility. We recommend using TERMINATE_CLUSTER instead. ActionOnFailure *string `type:"string" enum:"ActionOnFailure"` // The Hadoop job configuration of the cluster step. diff --git a/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go b/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go index 5c11bf73a4..5091681748 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/firehose/api.go @@ -9,6 +9,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) const opCreateDeliveryStream = "CreateDeliveryStream" @@ -16,7 +18,7 @@ const opCreateDeliveryStream = "CreateDeliveryStream" // CreateDeliveryStreamRequest generates a "aws/request.Request" representing the // client's request for the CreateDeliveryStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -154,7 +156,7 @@ const opDeleteDeliveryStream = "DeleteDeliveryStream" // DeleteDeliveryStreamRequest generates a "aws/request.Request" representing the // client's request for the DeleteDeliveryStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -188,6 +190,7 @@ func (c *Firehose) DeleteDeliveryStreamRequest(input *DeleteDeliveryStreamInput) output = &DeleteDeliveryStreamOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -247,7 +250,7 @@ const opDescribeDeliveryStream = "DescribeDeliveryStream" // DescribeDeliveryStreamRequest generates a "aws/request.Request" representing the // client's request for the DescribeDeliveryStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -329,7 +332,7 @@ const opListDeliveryStreams = "ListDeliveryStreams" // ListDeliveryStreamsRequest generates a "aws/request.Request" representing the // client's request for the ListDeliveryStreams operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -368,15 +371,15 @@ func (c *Firehose) ListDeliveryStreamsRequest(input *ListDeliveryStreamsInput) ( // ListDeliveryStreams API operation for Amazon Kinesis Firehose. // -// Lists your delivery streams. +// Lists your delivery streams in alphabetical order of their names. // // The number of delivery streams might be too large to return using a single // call to ListDeliveryStreams. You can limit the number of delivery streams // returned, using the Limit parameter. To determine whether there are more // delivery streams to list, check the value of HasMoreDeliveryStreams in the // output. If there are more delivery streams to list, you can request them -// by specifying the name of the last delivery stream returned in the call in -// the ExclusiveStartDeliveryStreamName parameter of a subsequent call. +// by calling this operation again and setting the ExclusiveStartDeliveryStreamName +// parameter to the name of the last delivery stream returned in the last call. // // 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 @@ -411,7 +414,7 @@ const opListTagsForDeliveryStream = "ListTagsForDeliveryStream" // ListTagsForDeliveryStreamRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForDeliveryStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -497,7 +500,7 @@ const opPutRecord = "PutRecord" // PutRecordRequest generates a "aws/request.Request" representing the // client's request for the PutRecord operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -571,6 +574,9 @@ func (c *Firehose) PutRecordRequest(input *PutRecordInput) (req *request.Request // to the destination. If the destination is unreachable for more than 24 hours, // the data is no longer available. // +// Don't concatenate two or more base64 strings to form the data fields of your +// records. Instead, concatenate the raw data, then perform base64 encoding. +// // 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. @@ -618,7 +624,7 @@ const opPutRecordBatch = "PutRecordBatch" // PutRecordBatchRequest generates a "aws/request.Request" representing the // client's request for the PutRecordBatch operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -685,19 +691,21 @@ func (c *Firehose) PutRecordBatchRequest(input *PutRecordBatchInput) (req *reque // data items when reading the data from the destination. // // The PutRecordBatch response includes a count of failed records, FailedPutCount, -// and an array of responses, RequestResponses. Each entry in the RequestResponses -// array provides additional information about the processed record. It directly -// correlates with a record in the request array using the same ordering, from -// the top to the bottom. The response array always includes the same number -// of records as the request array. RequestResponses includes both successfully -// and unsuccessfully processed records. Kinesis Data Firehose tries to process -// all records in each PutRecordBatch request. A single record failure does -// not stop the processing of subsequent records. +// and an array of responses, RequestResponses. Even if the PutRecordBatch call +// succeeds, the value of FailedPutCount may be greater than 0, indicating that +// there are records for which the operation didn't succeed. Each entry in the +// RequestResponses array provides additional information about the processed +// record. It directly correlates with a record in the request array using the +// same ordering, from the top to the bottom. The response array always includes +// the same number of records as the request array. RequestResponses includes +// both successfully and unsuccessfully processed records. Kinesis Data Firehose +// tries to process all records in each PutRecordBatch request. A single record +// failure does not stop the processing of subsequent records. // // A successfully processed record includes a RecordId value, which is unique // for the record. An unsuccessfully processed record includes ErrorCode and // ErrorMessage values. ErrorCode reflects the type of error, and is one of -// the following values: ServiceUnavailable or InternalFailure. ErrorMessage +// the following values: ServiceUnavailableException or InternalFailure. ErrorMessage // provides more detailed information about the error. // // If there is an internal server error or a timeout, the write might have completed @@ -716,6 +724,9 @@ func (c *Firehose) PutRecordBatchRequest(input *PutRecordBatchInput) (req *reque // to the destination. If the destination is unreachable for more than 24 hours, // the data is no longer available. // +// Don't concatenate two or more base64 strings to form the data fields of your +// records. Instead, concatenate the raw data, then perform base64 encoding. +// // 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. @@ -758,12 +769,227 @@ func (c *Firehose) PutRecordBatchWithContext(ctx aws.Context, input *PutRecordBa return out, req.Send() } +const opStartDeliveryStreamEncryption = "StartDeliveryStreamEncryption" + +// StartDeliveryStreamEncryptionRequest generates a "aws/request.Request" representing the +// client's request for the StartDeliveryStreamEncryption 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 StartDeliveryStreamEncryption for more information on using the StartDeliveryStreamEncryption +// 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 StartDeliveryStreamEncryptionRequest method. +// req, resp := client.StartDeliveryStreamEncryptionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/StartDeliveryStreamEncryption +func (c *Firehose) StartDeliveryStreamEncryptionRequest(input *StartDeliveryStreamEncryptionInput) (req *request.Request, output *StartDeliveryStreamEncryptionOutput) { + op := &request.Operation{ + Name: opStartDeliveryStreamEncryption, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartDeliveryStreamEncryptionInput{} + } + + output = &StartDeliveryStreamEncryptionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// StartDeliveryStreamEncryption API operation for Amazon Kinesis Firehose. +// +// Enables server-side encryption (SSE) for the delivery stream. +// +// This operation is asynchronous. It returns immediately. When you invoke it, +// Kinesis Data Firehose first sets the status of the stream to ENABLING, and +// then to ENABLED. You can continue to read and write data to your stream while +// its status is ENABLING, but the data is not encrypted. It can take up to +// 5 seconds after the encryption status changes to ENABLED before all records +// written to the delivery stream are encrypted. To find out whether a record +// or a batch of records was encrypted, check the response elements PutRecordOutput$Encrypted +// and PutRecordBatchOutput$Encrypted, respectively. +// +// To check the encryption state of a delivery stream, use DescribeDeliveryStream. +// +// You can only enable SSE for a delivery stream that uses DirectPut as its +// source. +// +// The StartDeliveryStreamEncryption and StopDeliveryStreamEncryption operations +// have a combined limit of 25 calls per delivery stream per 24 hours. For example, +// you reach the limit if you call StartDeliveryStreamEncryption 13 times and +// StopDeliveryStreamEncryption 12 times for the same delivery stream in a 24-hour +// period. +// +// 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 Kinesis Firehose's +// API operation StartDeliveryStreamEncryption for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource could not be found. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// The resource is already in use and not available for this operation. +// +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// The specified input parameter has a value that is not valid. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// You have already reached the limit for a requested resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/StartDeliveryStreamEncryption +func (c *Firehose) StartDeliveryStreamEncryption(input *StartDeliveryStreamEncryptionInput) (*StartDeliveryStreamEncryptionOutput, error) { + req, out := c.StartDeliveryStreamEncryptionRequest(input) + return out, req.Send() +} + +// StartDeliveryStreamEncryptionWithContext is the same as StartDeliveryStreamEncryption with the addition of +// the ability to pass a context and additional request options. +// +// See StartDeliveryStreamEncryption 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 *Firehose) StartDeliveryStreamEncryptionWithContext(ctx aws.Context, input *StartDeliveryStreamEncryptionInput, opts ...request.Option) (*StartDeliveryStreamEncryptionOutput, error) { + req, out := c.StartDeliveryStreamEncryptionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStopDeliveryStreamEncryption = "StopDeliveryStreamEncryption" + +// StopDeliveryStreamEncryptionRequest generates a "aws/request.Request" representing the +// client's request for the StopDeliveryStreamEncryption 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 StopDeliveryStreamEncryption for more information on using the StopDeliveryStreamEncryption +// 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 StopDeliveryStreamEncryptionRequest method. +// req, resp := client.StopDeliveryStreamEncryptionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/StopDeliveryStreamEncryption +func (c *Firehose) StopDeliveryStreamEncryptionRequest(input *StopDeliveryStreamEncryptionInput) (req *request.Request, output *StopDeliveryStreamEncryptionOutput) { + op := &request.Operation{ + Name: opStopDeliveryStreamEncryption, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StopDeliveryStreamEncryptionInput{} + } + + output = &StopDeliveryStreamEncryptionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// StopDeliveryStreamEncryption API operation for Amazon Kinesis Firehose. +// +// Disables server-side encryption (SSE) for the delivery stream. +// +// This operation is asynchronous. It returns immediately. When you invoke it, +// Kinesis Data Firehose first sets the status of the stream to DISABLING, and +// then to DISABLED. You can continue to read and write data to your stream +// while its status is DISABLING. It can take up to 5 seconds after the encryption +// status changes to DISABLED before all records written to the delivery stream +// are no longer subject to encryption. To find out whether a record or a batch +// of records was encrypted, check the response elements PutRecordOutput$Encrypted +// and PutRecordBatchOutput$Encrypted, respectively. +// +// To check the encryption state of a delivery stream, use DescribeDeliveryStream. +// +// The StartDeliveryStreamEncryption and StopDeliveryStreamEncryption operations +// have a combined limit of 25 calls per delivery stream per 24 hours. For example, +// you reach the limit if you call StartDeliveryStreamEncryption 13 times and +// StopDeliveryStreamEncryption 12 times for the same delivery stream in a 24-hour +// period. +// +// 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 Kinesis Firehose's +// API operation StopDeliveryStreamEncryption for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource could not be found. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// The resource is already in use and not available for this operation. +// +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// The specified input parameter has a value that is not valid. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// You have already reached the limit for a requested resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/StopDeliveryStreamEncryption +func (c *Firehose) StopDeliveryStreamEncryption(input *StopDeliveryStreamEncryptionInput) (*StopDeliveryStreamEncryptionOutput, error) { + req, out := c.StopDeliveryStreamEncryptionRequest(input) + return out, req.Send() +} + +// StopDeliveryStreamEncryptionWithContext is the same as StopDeliveryStreamEncryption with the addition of +// the ability to pass a context and additional request options. +// +// See StopDeliveryStreamEncryption 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 *Firehose) StopDeliveryStreamEncryptionWithContext(ctx aws.Context, input *StopDeliveryStreamEncryptionInput, opts ...request.Option) (*StopDeliveryStreamEncryptionOutput, error) { + req, out := c.StopDeliveryStreamEncryptionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opTagDeliveryStream = "TagDeliveryStream" // TagDeliveryStreamRequest generates a "aws/request.Request" representing the // client's request for the TagDeliveryStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -797,18 +1023,19 @@ func (c *Firehose) TagDeliveryStreamRequest(input *TagDeliveryStreamInput) (req output = &TagDeliveryStreamOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // TagDeliveryStream API operation for Amazon Kinesis Firehose. // // Adds or updates tags for the specified delivery stream. A tag is a key-value -// pair (the value is optional) that you can define and assign to AWS resources. -// If you specify a tag that already exists, the tag value is replaced with -// the value that you specify in the request. Tags are metadata. For example, -// you can add friendly names and descriptions or other types of information -// that can help you distinguish the delivery stream. For more information about -// tags, see Using Cost Allocation Tags (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html) +// pair that you can define and assign to AWS resources. If you specify a tag +// that already exists, the tag value is replaced with the value that you specify +// in the request. Tags are metadata. For example, you can add friendly names +// and descriptions or other types of information that can help you distinguish +// the delivery stream. For more information about tags, see Using Cost Allocation +// Tags (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html) // in the AWS Billing and Cost Management User Guide. // // Each delivery stream can have up to 50 tags. @@ -862,7 +1089,7 @@ const opUntagDeliveryStream = "UntagDeliveryStream" // UntagDeliveryStreamRequest generates a "aws/request.Request" representing the // client's request for the UntagDeliveryStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -896,6 +1123,7 @@ func (c *Firehose) UntagDeliveryStreamRequest(input *UntagDeliveryStreamInput) ( output = &UntagDeliveryStreamOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -955,7 +1183,7 @@ const opUpdateDestination = "UpdateDestination" // UpdateDestinationRequest generates a "aws/request.Request" representing the // client's request for the UpdateDestination operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -989,6 +1217,7 @@ func (c *Firehose) UpdateDestinationRequest(input *UpdateDestinationInput) (req output = &UpdateDestinationOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1288,6 +1517,16 @@ type CreateDeliveryStreamInput struct { // The destination in Splunk. You can specify only one destination. SplunkDestinationConfiguration *SplunkDestinationConfiguration `type:"structure"` + + // A set of tags to assign to the delivery stream. A tag is a key-value pair + // that you can define and assign to AWS resources. Tags are metadata. For example, + // you can add friendly names and descriptions or other types of information + // that can help you distinguish the delivery stream. For more information about + // tags, see Using Cost Allocation Tags (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html) + // in the AWS Billing and Cost Management User Guide. + // + // You can specify up to 50 tags when creating a delivery stream. + Tags []*Tag `min:"1" type:"list"` } // String returns the string representation @@ -1309,6 +1548,9 @@ func (s *CreateDeliveryStreamInput) Validate() error { if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 { invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1)) } + if s.Tags != nil && len(s.Tags) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) + } if s.ElasticsearchDestinationConfiguration != nil { if err := s.ElasticsearchDestinationConfiguration.Validate(); err != nil { invalidParams.AddNested("ElasticsearchDestinationConfiguration", err.(request.ErrInvalidParams)) @@ -1339,6 +1581,16 @@ func (s *CreateDeliveryStreamInput) Validate() error { invalidParams.AddNested("SplunkDestinationConfiguration", err.(request.ErrInvalidParams)) } } + 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 @@ -1394,6 +1646,12 @@ func (s *CreateDeliveryStreamInput) SetSplunkDestinationConfiguration(v *SplunkD return s } +// SetTags sets the Tags field's value. +func (s *CreateDeliveryStreamInput) SetTags(v []*Tag) *CreateDeliveryStreamInput { + s.Tags = v + return s +} + type CreateDeliveryStreamOutput struct { _ struct{} `type:"structure"` @@ -1559,6 +1817,9 @@ type DeliveryStreamDescription struct { // DeliveryStreamARN is a required field DeliveryStreamARN *string `min:"1" type:"string" required:"true"` + // Indicates the server-side encryption (SSE) status for the delivery stream. + DeliveryStreamEncryptionConfiguration *DeliveryStreamEncryptionConfiguration `type:"structure"` + // The name of the delivery stream. // // DeliveryStreamName is a required field @@ -1627,6 +1888,12 @@ func (s *DeliveryStreamDescription) SetDeliveryStreamARN(v string) *DeliveryStre return s } +// SetDeliveryStreamEncryptionConfiguration sets the DeliveryStreamEncryptionConfiguration field's value. +func (s *DeliveryStreamDescription) SetDeliveryStreamEncryptionConfiguration(v *DeliveryStreamEncryptionConfiguration) *DeliveryStreamDescription { + s.DeliveryStreamEncryptionConfiguration = v + return s +} + // SetDeliveryStreamName sets the DeliveryStreamName field's value. func (s *DeliveryStreamDescription) SetDeliveryStreamName(v string) *DeliveryStreamDescription { s.DeliveryStreamName = &v @@ -1675,6 +1942,31 @@ func (s *DeliveryStreamDescription) SetVersionId(v string) *DeliveryStreamDescri return s } +// Indicates the server-side encryption (SSE) status for the delivery stream. +type DeliveryStreamEncryptionConfiguration struct { + _ struct{} `type:"structure"` + + // For a full description of the different values of this status, see StartDeliveryStreamEncryption + // and StopDeliveryStreamEncryption. + Status *string `type:"string" enum:"DeliveryStreamEncryptionStatus"` +} + +// String returns the string representation +func (s DeliveryStreamEncryptionConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeliveryStreamEncryptionConfiguration) GoString() string { + return s.String() +} + +// SetStatus sets the Status field's value. +func (s *DeliveryStreamEncryptionConfiguration) SetStatus(v string) *DeliveryStreamEncryptionConfiguration { + s.Status = &v + return s +} + type DescribeDeliveryStreamInput struct { _ struct{} `type:"structure"` @@ -1963,7 +2255,7 @@ type ElasticsearchDestinationConfiguration struct { // IndexName is a required field IndexName *string `min:"1" type:"string" required:"true"` - // The Elasticsearch index rotation period. Index rotation appends a time stamp + // The Elasticsearch index rotation period. Index rotation appends a timestamp // to the IndexName to facilitate the expiration of old data. For more information, // see Index Rotation for the Amazon ES Destination (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#es-index-rotation). // The default value is OneDay. @@ -2273,7 +2565,7 @@ type ElasticsearchDestinationUpdate struct { // The Elasticsearch index name. IndexName *string `min:"1" type:"string"` - // The Elasticsearch index rotation period. Index rotation appends a time stamp + // The Elasticsearch index rotation period. Index rotation appends a timestamp // to IndexName to facilitate the expiration of old data. For more information, // see Index Rotation for the Amazon ES Destination (http://docs.aws.amazon.com/firehose/latest/dev/basic-deliver.html#es-index-rotation). // Default value is OneDay. @@ -2514,6 +2806,11 @@ type ExtendedS3DestinationConfiguration struct { // encryption. EncryptionConfiguration *EncryptionConfiguration `type:"structure"` + // A prefix that Kinesis Data Firehose evaluates and adds to failed records + // before writing them to S3. This prefix appears immediately following the + // bucket name. + ErrorOutputPrefix *string `type:"string"` + // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered // Amazon S3 files. You can specify an extra prefix to be added in front of // the time format prefix. If the prefix ends with a slash, it appears as a @@ -2631,6 +2928,12 @@ func (s *ExtendedS3DestinationConfiguration) SetEncryptionConfiguration(v *Encry return s } +// SetErrorOutputPrefix sets the ErrorOutputPrefix field's value. +func (s *ExtendedS3DestinationConfiguration) SetErrorOutputPrefix(v string) *ExtendedS3DestinationConfiguration { + s.ErrorOutputPrefix = &v + return s +} + // SetPrefix sets the Prefix field's value. func (s *ExtendedS3DestinationConfiguration) SetPrefix(v string) *ExtendedS3DestinationConfiguration { s.Prefix = &v @@ -2694,6 +2997,11 @@ type ExtendedS3DestinationDescription struct { // EncryptionConfiguration is a required field EncryptionConfiguration *EncryptionConfiguration `type:"structure" required:"true"` + // A prefix that Kinesis Data Firehose evaluates and adds to failed records + // before writing them to S3. This prefix appears immediately following the + // bucket name. + ErrorOutputPrefix *string `type:"string"` + // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered // Amazon S3 files. You can specify an extra prefix to be added in front of // the time format prefix. If the prefix ends with a slash, it appears as a @@ -2764,6 +3072,12 @@ func (s *ExtendedS3DestinationDescription) SetEncryptionConfiguration(v *Encrypt return s } +// SetErrorOutputPrefix sets the ErrorOutputPrefix field's value. +func (s *ExtendedS3DestinationDescription) SetErrorOutputPrefix(v string) *ExtendedS3DestinationDescription { + s.ErrorOutputPrefix = &v + return s +} + // SetPrefix sets the Prefix field's value. func (s *ExtendedS3DestinationDescription) SetPrefix(v string) *ExtendedS3DestinationDescription { s.Prefix = &v @@ -2819,6 +3133,11 @@ type ExtendedS3DestinationUpdate struct { // encryption. EncryptionConfiguration *EncryptionConfiguration `type:"structure"` + // A prefix that Kinesis Data Firehose evaluates and adds to failed records + // before writing them to S3. This prefix appears immediately following the + // bucket name. + ErrorOutputPrefix *string `type:"string"` + // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered // Amazon S3 files. You can specify an extra prefix to be added in front of // the time format prefix. If the prefix ends with a slash, it appears as a @@ -2928,6 +3247,12 @@ func (s *ExtendedS3DestinationUpdate) SetEncryptionConfiguration(v *EncryptionCo return s } +// SetErrorOutputPrefix sets the ErrorOutputPrefix field's value. +func (s *ExtendedS3DestinationUpdate) SetErrorOutputPrefix(v string) *ExtendedS3DestinationUpdate { + s.ErrorOutputPrefix = &v + return s +} + // SetPrefix sets the Prefix field's value. func (s *ExtendedS3DestinationUpdate) SetPrefix(v string) *ExtendedS3DestinationUpdate { s.Prefix = &v @@ -2966,11 +3291,11 @@ func (s *ExtendedS3DestinationUpdate) SetS3BackupUpdate(v *S3DestinationUpdate) type HiveJsonSerDe struct { _ struct{} `type:"structure"` - // Indicates how you want Kinesis Data Firehose to parse the date and time stamps + // Indicates how you want Kinesis Data Firehose to parse the date and timestamps // that may be present in your input data JSON. To specify these format strings, // follow the pattern syntax of JodaTime's DateTimeFormat format strings. For // more information, see Class DateTimeFormat (https://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html). - // You can also use the special value millis to parse time stamps in epoch milliseconds. + // You can also use the special value millis to parse timestamps in epoch milliseconds. // If you don't specify a format, Kinesis Data Firehose uses java.sql.Timestamp::valueOf // by default. TimestampFormats []*string `type:"list"` @@ -3132,7 +3457,7 @@ type KinesisStreamSourceDescription struct { _ struct{} `type:"structure"` // Kinesis Data Firehose starts retrieving records from the Kinesis data stream - // starting with this time stamp. + // starting with this timestamp. DeliveryStartTimestamp *time.Time `type:"timestamp"` // The Amazon Resource Name (ARN) of the source Kinesis data stream. For more @@ -3186,7 +3511,9 @@ type ListDeliveryStreamsInput struct { // of all types are returned. DeliveryStreamType *string `type:"string" enum:"DeliveryStreamType"` - // The name of the delivery stream to start the list with. + // The list of delivery streams returned by this call to ListDeliveryStreams + // will start with the delivery stream whose name comes alphabetically immediately + // after the name you specify in ExclusiveStartDeliveryStreamName. ExclusiveStartDeliveryStreamName *string `min:"1" type:"string"` // The maximum number of delivery streams to list. The default value is 10. @@ -3962,7 +4289,12 @@ func (s *PutRecordBatchInput) SetRecords(v []*Record) *PutRecordBatchInput { type PutRecordBatchOutput struct { _ struct{} `type:"structure"` - // The number of records that might have failed processing. + // Indicates whether server-side encryption (SSE) was enabled during this operation. + Encrypted *bool `type:"boolean"` + + // The number of records that might have failed processing. This number might + // be greater than 0 even if the PutRecordBatch call succeeds. Check FailedPutCount + // to determine whether there are records that you need to resend. // // FailedPutCount is a required field FailedPutCount *int64 `type:"integer" required:"true"` @@ -3984,6 +4316,12 @@ func (s PutRecordBatchOutput) GoString() string { return s.String() } +// SetEncrypted sets the Encrypted field's value. +func (s *PutRecordBatchOutput) SetEncrypted(v bool) *PutRecordBatchOutput { + s.Encrypted = &v + return s +} + // SetFailedPutCount sets the FailedPutCount field's value. func (s *PutRecordBatchOutput) SetFailedPutCount(v int64) *PutRecordBatchOutput { s.FailedPutCount = &v @@ -4104,6 +4442,9 @@ func (s *PutRecordInput) SetRecord(v *Record) *PutRecordInput { type PutRecordOutput struct { _ struct{} `type:"structure"` + // Indicates whether server-side encryption (SSE) was enabled during this operation. + Encrypted *bool `type:"boolean"` + // The ID of the record. // // RecordId is a required field @@ -4120,6 +4461,12 @@ func (s PutRecordOutput) GoString() string { return s.String() } +// SetEncrypted sets the Encrypted field's value. +func (s *PutRecordOutput) SetEncrypted(v bool) *PutRecordOutput { + s.Encrypted = &v + return s +} + // SetRecordId sets the RecordId field's value. func (s *PutRecordOutput) SetRecordId(v string) *PutRecordOutput { s.RecordId = &v @@ -4131,7 +4478,7 @@ type Record struct { _ struct{} `type:"structure"` // The data blob, which is base64-encoded when the blob is serialized. The maximum - // size of the data blob, before base64-encoding, is 1,000 KB. + // size of the data blob, before base64-encoding, is 1,000 KiB. // // Data is automatically base64 encoded/decoded by the SDK. // @@ -4188,7 +4535,7 @@ type RedshiftDestinationConfiguration struct { // The user password. // // Password is a required field - Password *string `min:"6" type:"string" required:"true"` + Password *string `min:"6" type:"string" required:"true" sensitive:"true"` // The data processing configuration. ProcessingConfiguration *ProcessingConfiguration `type:"structure"` @@ -4222,7 +4569,7 @@ type RedshiftDestinationConfiguration struct { // The name of the user. // // Username is a required field - Username *string `min:"1" type:"string" required:"true"` + Username *string `min:"1" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -4405,7 +4752,7 @@ type RedshiftDestinationDescription struct { // The name of the user. // // Username is a required field - Username *string `min:"1" type:"string" required:"true"` + Username *string `min:"1" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -4492,7 +4839,7 @@ type RedshiftDestinationUpdate struct { CopyCommand *CopyCommand `type:"structure"` // The user password. - Password *string `min:"6" type:"string"` + Password *string `min:"6" type:"string" sensitive:"true"` // The data processing configuration. ProcessingConfiguration *ProcessingConfiguration `type:"structure"` @@ -4519,7 +4866,7 @@ type RedshiftDestinationUpdate struct { S3Update *S3DestinationUpdate `type:"structure"` // The name of the user. - Username *string `min:"1" type:"string"` + Username *string `min:"1" type:"string" sensitive:"true"` } // String returns the string representation @@ -4697,6 +5044,11 @@ type S3DestinationConfiguration struct { // encryption. EncryptionConfiguration *EncryptionConfiguration `type:"structure"` + // A prefix that Kinesis Data Firehose evaluates and adds to failed records + // before writing them to S3. This prefix appears immediately following the + // bucket name. + ErrorOutputPrefix *string `type:"string"` + // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered // Amazon S3 files. You can specify an extra prefix to be added in front of // the time format prefix. If the prefix ends with a slash, it appears as a @@ -4784,6 +5136,12 @@ func (s *S3DestinationConfiguration) SetEncryptionConfiguration(v *EncryptionCon return s } +// SetErrorOutputPrefix sets the ErrorOutputPrefix field's value. +func (s *S3DestinationConfiguration) SetErrorOutputPrefix(v string) *S3DestinationConfiguration { + s.ErrorOutputPrefix = &v + return s +} + // SetPrefix sets the Prefix field's value. func (s *S3DestinationConfiguration) SetPrefix(v string) *S3DestinationConfiguration { s.Prefix = &v @@ -4826,6 +5184,11 @@ type S3DestinationDescription struct { // EncryptionConfiguration is a required field EncryptionConfiguration *EncryptionConfiguration `type:"structure" required:"true"` + // A prefix that Kinesis Data Firehose evaluates and adds to failed records + // before writing them to S3. This prefix appears immediately following the + // bucket name. + ErrorOutputPrefix *string `type:"string"` + // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered // Amazon S3 files. You can specify an extra prefix to be added in front of // the time format prefix. If the prefix ends with a slash, it appears as a @@ -4881,6 +5244,12 @@ func (s *S3DestinationDescription) SetEncryptionConfiguration(v *EncryptionConfi return s } +// SetErrorOutputPrefix sets the ErrorOutputPrefix field's value. +func (s *S3DestinationDescription) SetErrorOutputPrefix(v string) *S3DestinationDescription { + s.ErrorOutputPrefix = &v + return s +} + // SetPrefix sets the Prefix field's value. func (s *S3DestinationDescription) SetPrefix(v string) *S3DestinationDescription { s.Prefix = &v @@ -4919,6 +5288,11 @@ type S3DestinationUpdate struct { // encryption. EncryptionConfiguration *EncryptionConfiguration `type:"structure"` + // A prefix that Kinesis Data Firehose evaluates and adds to failed records + // before writing them to S3. This prefix appears immediately following the + // bucket name. + ErrorOutputPrefix *string `type:"string"` + // The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered // Amazon S3 files. You can specify an extra prefix to be added in front of // the time format prefix. If the prefix ends with a slash, it appears as a @@ -4998,6 +5372,12 @@ func (s *S3DestinationUpdate) SetEncryptionConfiguration(v *EncryptionConfigurat return s } +// SetErrorOutputPrefix sets the ErrorOutputPrefix field's value. +func (s *S3DestinationUpdate) SetErrorOutputPrefix(v string) *S3DestinationUpdate { + s.ErrorOutputPrefix = &v + return s +} + // SetPrefix sets the Prefix field's value. func (s *S3DestinationUpdate) SetPrefix(v string) *S3DestinationUpdate { s.Prefix = &v @@ -5582,6 +5962,118 @@ func (s *SplunkRetryOptions) SetDurationInSeconds(v int64) *SplunkRetryOptions { return s } +type StartDeliveryStreamEncryptionInput struct { + _ struct{} `type:"structure"` + + // The name of the delivery stream for which you want to enable server-side + // encryption (SSE). + // + // DeliveryStreamName is a required field + DeliveryStreamName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s StartDeliveryStreamEncryptionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartDeliveryStreamEncryptionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartDeliveryStreamEncryptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartDeliveryStreamEncryptionInput"} + if s.DeliveryStreamName == nil { + invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName")) + } + if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeliveryStreamName sets the DeliveryStreamName field's value. +func (s *StartDeliveryStreamEncryptionInput) SetDeliveryStreamName(v string) *StartDeliveryStreamEncryptionInput { + s.DeliveryStreamName = &v + return s +} + +type StartDeliveryStreamEncryptionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s StartDeliveryStreamEncryptionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartDeliveryStreamEncryptionOutput) GoString() string { + return s.String() +} + +type StopDeliveryStreamEncryptionInput struct { + _ struct{} `type:"structure"` + + // The name of the delivery stream for which you want to disable server-side + // encryption (SSE). + // + // DeliveryStreamName is a required field + DeliveryStreamName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s StopDeliveryStreamEncryptionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopDeliveryStreamEncryptionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopDeliveryStreamEncryptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopDeliveryStreamEncryptionInput"} + if s.DeliveryStreamName == nil { + invalidParams.Add(request.NewErrParamRequired("DeliveryStreamName")) + } + if s.DeliveryStreamName != nil && len(*s.DeliveryStreamName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DeliveryStreamName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeliveryStreamName sets the DeliveryStreamName field's value. +func (s *StopDeliveryStreamEncryptionInput) SetDeliveryStreamName(v string) *StopDeliveryStreamEncryptionInput { + s.DeliveryStreamName = &v + return s +} + +type StopDeliveryStreamEncryptionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s StopDeliveryStreamEncryptionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopDeliveryStreamEncryptionOutput) GoString() string { + return s.String() +} + // Metadata that you can assign to a delivery stream, consisting of a key-value // pair. type Tag struct { @@ -5971,6 +6463,20 @@ const ( CompressionFormatSnappy = "Snappy" ) +const ( + // DeliveryStreamEncryptionStatusEnabled is a DeliveryStreamEncryptionStatus enum value + DeliveryStreamEncryptionStatusEnabled = "ENABLED" + + // DeliveryStreamEncryptionStatusEnabling is a DeliveryStreamEncryptionStatus enum value + DeliveryStreamEncryptionStatusEnabling = "ENABLING" + + // DeliveryStreamEncryptionStatusDisabled is a DeliveryStreamEncryptionStatus enum value + DeliveryStreamEncryptionStatusDisabled = "DISABLED" + + // DeliveryStreamEncryptionStatusDisabling is a DeliveryStreamEncryptionStatus enum value + DeliveryStreamEncryptionStatusDisabling = "DISABLING" +) + const ( // DeliveryStreamStatusCreating is a DeliveryStreamStatus enum value DeliveryStreamStatusCreating = "CREATING" diff --git a/vendor/github.com/aws/aws-sdk-go/service/fms/api.go b/vendor/github.com/aws/aws-sdk-go/service/fms/api.go index 68169facc3..61cdda7a7c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/fms/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/fms/api.go @@ -18,7 +18,7 @@ const opAssociateAdminAccount = "AssociateAdminAccount" // AssociateAdminAccountRequest generates a "aws/request.Request" representing the // client's request for the AssociateAdminAccount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -52,21 +52,20 @@ func (c *FMS) AssociateAdminAccountRequest(input *AssociateAdminAccountInput) (r output = &AssociateAdminAccountOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // AssociateAdminAccount API operation for Firewall Management Service. // // Sets the AWS Firewall Manager administrator account. AWS Firewall Manager -// must be associated with a master account in AWS Organizations or associated +// must be associated with the master account your AWS organization or associated // with a member account that has the appropriate permissions. If the account // ID that you submit is not an AWS Organizations master account, AWS Firewall // Manager will set the appropriate permissions for the given member account. // // The account that you associate with AWS Firewall Manager is called the AWS -// Firewall manager administrator account. +// Firewall Manager administrator 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 @@ -118,7 +117,7 @@ const opDeleteNotificationChannel = "DeleteNotificationChannel" // DeleteNotificationChannelRequest generates a "aws/request.Request" representing the // client's request for the DeleteNotificationChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -152,8 +151,7 @@ func (c *FMS) DeleteNotificationChannelRequest(input *DeleteNotificationChannelI output = &DeleteNotificationChannelOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -210,7 +208,7 @@ const opDeletePolicy = "DeletePolicy" // DeletePolicyRequest generates a "aws/request.Request" representing the // client's request for the DeletePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -244,8 +242,7 @@ func (c *FMS) DeletePolicyRequest(input *DeletePolicyInput) (req *request.Reques output = &DeletePolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -300,7 +297,7 @@ const opDisassociateAdminAccount = "DisassociateAdminAccount" // DisassociateAdminAccountRequest generates a "aws/request.Request" representing the // client's request for the DisassociateAdminAccount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -334,8 +331,7 @@ func (c *FMS) DisassociateAdminAccountRequest(input *DisassociateAdminAccountInp output = &DisassociateAdminAccountOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -392,7 +388,7 @@ const opGetAdminAccount = "GetAdminAccount" // GetAdminAccountRequest generates a "aws/request.Request" representing the // client's request for the GetAdminAccount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -481,7 +477,7 @@ const opGetComplianceDetail = "GetComplianceDetail" // GetComplianceDetailRequest generates a "aws/request.Request" representing the // client's request for the GetComplianceDetail operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -567,7 +563,7 @@ const opGetNotificationChannel = "GetNotificationChannel" // GetNotificationChannelRequest generates a "aws/request.Request" representing the // client's request for the GetNotificationChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -656,7 +652,7 @@ const opGetPolicy = "GetPolicy" // GetPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -717,6 +713,9 @@ func (c *FMS) GetPolicyRequest(input *GetPolicyInput) (req *request.Request, out // The operation failed because of a system problem, even though the request // was valid. Retry your request. // +// * ErrCodeInvalidTypeException "InvalidTypeException" +// The value of the Type parameter is invalid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetPolicy func (c *FMS) GetPolicy(input *GetPolicyInput) (*GetPolicyOutput, error) { req, out := c.GetPolicyRequest(input) @@ -744,7 +743,7 @@ const opListComplianceStatus = "ListComplianceStatus" // ListComplianceStatusRequest generates a "aws/request.Request" representing the // client's request for the ListComplianceStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -824,12 +823,99 @@ func (c *FMS) ListComplianceStatusWithContext(ctx aws.Context, input *ListCompli return out, req.Send() } +const opListMemberAccounts = "ListMemberAccounts" + +// ListMemberAccountsRequest generates a "aws/request.Request" representing the +// client's request for the ListMemberAccounts 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 ListMemberAccounts for more information on using the ListMemberAccounts +// 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 ListMemberAccountsRequest method. +// req, resp := client.ListMemberAccountsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListMemberAccounts +func (c *FMS) ListMemberAccountsRequest(input *ListMemberAccountsInput) (req *request.Request, output *ListMemberAccountsOutput) { + op := &request.Operation{ + Name: opListMemberAccounts, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListMemberAccountsInput{} + } + + output = &ListMemberAccountsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListMemberAccounts API operation for Firewall Management Service. +// +// Returns a MemberAccounts object that lists the member accounts in the administrator's +// AWS organization. +// +// The ListMemberAccounts must be submitted by the account that is set as the +// AWS Firewall Manager administrator. +// +// 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 Firewall Management Service's +// API operation ListMemberAccounts for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListMemberAccounts +func (c *FMS) ListMemberAccounts(input *ListMemberAccountsInput) (*ListMemberAccountsOutput, error) { + req, out := c.ListMemberAccountsRequest(input) + return out, req.Send() +} + +// ListMemberAccountsWithContext is the same as ListMemberAccounts with the addition of +// the ability to pass a context and additional request options. +// +// See ListMemberAccounts 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 *FMS) ListMemberAccountsWithContext(ctx aws.Context, input *ListMemberAccountsInput, opts ...request.Option) (*ListMemberAccountsOutput, error) { + req, out := c.ListMemberAccountsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListPolicies = "ListPolicies" // ListPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -923,7 +1009,7 @@ const opPutNotificationChannel = "PutNotificationChannel" // PutNotificationChannelRequest generates a "aws/request.Request" representing the // client's request for the PutNotificationChannel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -957,8 +1043,7 @@ func (c *FMS) PutNotificationChannelRequest(input *PutNotificationChannelInput) output = &PutNotificationChannelOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1014,7 +1099,7 @@ const opPutPolicy = "PutPolicy" // PutPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1074,10 +1159,19 @@ func (c *FMS) PutPolicyRequest(input *PutPolicyInput) (req *request.Request, out // * ErrCodeInvalidInputException "InvalidInputException" // The parameters of the request were invalid. // +// * ErrCodeLimitExceededException "LimitExceededException" +// The operation exceeds a resource limit, for example, the maximum number of +// policy objects that you can create for an AWS account. For more information, +// see Firewall Manager Limits (http://docs.aws.amazon.com/waf/latest/developerguide/fms-limits.html) +// in the AWS WAF Developer Guide. +// // * ErrCodeInternalErrorException "InternalErrorException" // The operation failed because of a system problem, even though the request // was valid. Retry your request. // +// * ErrCodeInvalidTypeException "InvalidTypeException" +// The value of the Type parameter is invalid. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/PutPolicy func (c *FMS) PutPolicy(input *PutPolicyInput) (*PutPolicyOutput, error) { req, out := c.PutPolicyRequest(input) @@ -1379,6 +1473,9 @@ type GetAdminAccountOutput struct { // The AWS account that is set as the AWS Firewall Manager administrator. AdminAccount *string `min:"1" type:"string"` + + // The status of the AWS account that you set as the AWS Firewall Manager administrator. + RoleStatus *string `type:"string" enum:"AccountRoleStatus"` } // String returns the string representation @@ -1397,6 +1494,12 @@ func (s *GetAdminAccountOutput) SetAdminAccount(v string) *GetAdminAccountOutput return s } +// SetRoleStatus sets the RoleStatus field's value. +func (s *GetAdminAccountOutput) SetRoleStatus(v string) *GetAdminAccountOutput { + s.RoleStatus = &v + return s +} + type GetComplianceDetailInput struct { _ struct{} `type:"structure"` @@ -1710,6 +1813,98 @@ func (s *ListComplianceStatusOutput) SetPolicyComplianceStatusList(v []*PolicyCo return s } +type ListMemberAccountsInput struct { + _ struct{} `type:"structure"` + + // Specifies the number of member account IDs that you want AWS Firewall Manager + // to return for this request. If you have more IDs than the number that you + // specify for MaxResults, the response includes a NextToken value that you + // can use to get another batch of member account IDs. The maximum value for + // MaxResults is 100. + MaxResults *int64 `min:"1" type:"integer"` + + // If you specify a value for MaxResults and you have more account IDs than + // the number that you specify for MaxResults, AWS Firewall Manager returns + // a NextToken value in the response that allows you to list another group of + // IDs. For the second and subsequent ListMemberAccountsRequest requests, specify + // the value of NextToken from the previous response to get information about + // another batch of member account IDs. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListMemberAccountsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListMemberAccountsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListMemberAccountsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListMemberAccountsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListMemberAccountsInput) SetMaxResults(v int64) *ListMemberAccountsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListMemberAccountsInput) SetNextToken(v string) *ListMemberAccountsInput { + s.NextToken = &v + return s +} + +type ListMemberAccountsOutput struct { + _ struct{} `type:"structure"` + + // An array of account IDs. + MemberAccounts []*string `type:"list"` + + // If you have more member account IDs than the number that you specified for + // MaxResults in the request, the response includes a NextToken value. To list + // more IDs, submit another ListMemberAccounts request, and specify the NextToken + // value from the response in the NextToken value in the next request. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListMemberAccountsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListMemberAccountsOutput) GoString() string { + return s.String() +} + +// SetMemberAccounts sets the MemberAccounts field's value. +func (s *ListMemberAccountsOutput) SetMemberAccounts(v []*string) *ListMemberAccountsOutput { + s.MemberAccounts = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListMemberAccountsOutput) SetNextToken(v string) *ListMemberAccountsOutput { + s.NextToken = &v + return s +} + type ListPoliciesInput struct { _ struct{} `type:"structure"` @@ -1806,6 +2001,15 @@ func (s *ListPoliciesOutput) SetPolicyList(v []*PolicySummary) *ListPoliciesOutp type Policy struct { _ struct{} `type:"structure"` + // Specifies the AWS account IDs to exclude from the policy. The IncludeMap + // values are evaluated first, with all of the appropriate account IDs added + // to the policy. Then the accounts listed in ExcludeMap are removed, resulting + // in the final list of accounts to add to the policy. + // + // The key to the map is ACCOUNT. For example, a valid ExcludeMap would be {“ACCOUNT” + // : [“accountID1”, “accountID2”]}. + ExcludeMap map[string][]*string `type:"map"` + // If set to True, resources with the tags that are specified in the ResourceTag // array are not protected by the policy. If set to False, and the ResourceTag // array is not null, only resources with the specified tags are associated @@ -1814,6 +2018,15 @@ type Policy struct { // ExcludeResourceTags is a required field ExcludeResourceTags *bool `type:"boolean" required:"true"` + // Specifies the AWS account IDs to include in the policy. If IncludeMap is + // null, all accounts in the AWS Organization are included in the policy. If + // IncludeMap is not null, only values listed in IncludeMap will be included + // in the policy. + // + // The key to the map is ACCOUNT. For example, a valid IncludeMap would be {“ACCOUNT” + // : [“accountID1”, “accountID2”]}. + IncludeMap map[string][]*string `type:"map"` + // The ID of the AWS Firewall Manager policy. PolicyId *string `min:"36" type:"string"` @@ -1912,12 +2125,24 @@ func (s *Policy) Validate() error { return nil } +// SetExcludeMap sets the ExcludeMap field's value. +func (s *Policy) SetExcludeMap(v map[string][]*string) *Policy { + s.ExcludeMap = v + return s +} + // SetExcludeResourceTags sets the ExcludeResourceTags field's value. func (s *Policy) SetExcludeResourceTags(v bool) *Policy { s.ExcludeResourceTags = &v return s } +// SetIncludeMap sets the IncludeMap field's value. +func (s *Policy) SetIncludeMap(v map[string][]*string) *Policy { + s.IncludeMap = v + return s +} + // SetPolicyId sets the PolicyId field's value. func (s *Policy) SetPolicyId(v string) *Policy { s.PolicyId = &v @@ -1974,6 +2199,12 @@ type PolicyComplianceDetail struct { // out-of-date. ExpiredAt *time.Time `type:"timestamp"` + // Details about problems with dependent services, such as AWS WAF or AWS Config, + // that are causing a resource to be non-compliant. The details include the + // name of the dependent service and the error message recieved indicating the + // problem with the service. + IssueInfoMap map[string]*string `type:"map"` + // The AWS account ID. MemberAccount *string `min:"1" type:"string"` @@ -2009,6 +2240,12 @@ func (s *PolicyComplianceDetail) SetExpiredAt(v time.Time) *PolicyComplianceDeta return s } +// SetIssueInfoMap sets the IssueInfoMap field's value. +func (s *PolicyComplianceDetail) SetIssueInfoMap(v map[string]*string) *PolicyComplianceDetail { + s.IssueInfoMap = v + return s +} + // SetMemberAccount sets the MemberAccount field's value. func (s *PolicyComplianceDetail) SetMemberAccount(v string) *PolicyComplianceDetail { s.MemberAccount = &v @@ -2042,6 +2279,12 @@ type PolicyComplianceStatus struct { // An array of EvaluationResult objects. EvaluationResults []*EvaluationResult `type:"list"` + // Details about problems with dependent services, such as AWS WAF or AWS Config, + // that are causing a resource to be non-compliant. The details include the + // name of the dependent service and the error message recieved indicating the + // problem with the service. + IssueInfoMap map[string]*string `type:"map"` + // Time stamp of the last update to the EvaluationResult objects. LastUpdated *time.Time `type:"timestamp"` @@ -2074,6 +2317,12 @@ func (s *PolicyComplianceStatus) SetEvaluationResults(v []*EvaluationResult) *Po return s } +// SetIssueInfoMap sets the IssueInfoMap field's value. +func (s *PolicyComplianceStatus) SetIssueInfoMap(v map[string]*string) *PolicyComplianceStatus { + s.IssueInfoMap = v + return s +} + // SetLastUpdated sets the LastUpdated field's value. func (s *PolicyComplianceStatus) SetLastUpdated(v time.Time) *PolicyComplianceStatus { s.LastUpdated = &v @@ -2441,6 +2690,36 @@ func (s *SecurityServicePolicyData) SetType(v string) *SecurityServicePolicyData return s } +const ( + // AccountRoleStatusReady is a AccountRoleStatus enum value + AccountRoleStatusReady = "READY" + + // AccountRoleStatusCreating is a AccountRoleStatus enum value + AccountRoleStatusCreating = "CREATING" + + // AccountRoleStatusPendingDeletion is a AccountRoleStatus enum value + AccountRoleStatusPendingDeletion = "PENDING_DELETION" + + // AccountRoleStatusDeleting is a AccountRoleStatus enum value + AccountRoleStatusDeleting = "DELETING" + + // AccountRoleStatusDeleted is a AccountRoleStatus enum value + AccountRoleStatusDeleted = "DELETED" +) + +const ( + // CustomerPolicyScopeIdTypeAccount is a CustomerPolicyScopeIdType enum value + CustomerPolicyScopeIdTypeAccount = "ACCOUNT" +) + +const ( + // DependentServiceNameAwsconfig is a DependentServiceName enum value + DependentServiceNameAwsconfig = "AWSCONFIG" + + // DependentServiceNameAwswaf is a DependentServiceName enum value + DependentServiceNameAwswaf = "AWSWAF" +) + const ( // PolicyComplianceStatusTypeCompliant is a PolicyComplianceStatusType enum value PolicyComplianceStatusTypeCompliant = "COMPLIANT" diff --git a/vendor/github.com/aws/aws-sdk-go/service/fms/errors.go b/vendor/github.com/aws/aws-sdk-go/service/fms/errors.go index f0a64c975a..c63fd3c5b8 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/fms/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/fms/errors.go @@ -25,6 +25,12 @@ const ( // you submitted was already set as the AWS Firewall Manager administrator. ErrCodeInvalidOperationException = "InvalidOperationException" + // ErrCodeInvalidTypeException for service response error code + // "InvalidTypeException". + // + // The value of the Type parameter is invalid. + ErrCodeInvalidTypeException = "InvalidTypeException" + // ErrCodeLimitExceededException for service response error code // "LimitExceededException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/gamelift/api.go b/vendor/github.com/aws/aws-sdk-go/service/gamelift/api.go index 138c469c49..60d1aca41a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/gamelift/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/gamelift/api.go @@ -18,7 +18,7 @@ const opAcceptMatch = "AcceptMatch" // AcceptMatchRequest generates a "aws/request.Request" representing the // client's request for the AcceptMatch operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -52,6 +52,7 @@ func (c *GameLift) AcceptMatchRequest(input *AcceptMatchInput) (req *request.Req output = &AcceptMatchOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -143,7 +144,7 @@ const opCreateAlias = "CreateAlias" // CreateAliasRequest generates a "aws/request.Request" representing the // client's request for the CreateAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -272,7 +273,7 @@ const opCreateBuild = "CreateBuild" // CreateBuildRequest generates a "aws/request.Request" representing the // client's request for the CreateBuild operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -413,7 +414,7 @@ const opCreateFleet = "CreateFleet" // CreateFleetRequest generates a "aws/request.Request" representing the // client's request for the CreateFleet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -603,7 +604,7 @@ const opCreateGameSession = "CreateGameSession" // CreateGameSessionRequest generates a "aws/request.Request" representing the // client's request for the CreateGameSession operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -775,7 +776,7 @@ const opCreateGameSessionQueue = "CreateGameSessionQueue" // CreateGameSessionQueueRequest generates a "aws/request.Request" representing the // client's request for the CreateGameSessionQueue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -906,7 +907,7 @@ const opCreateMatchmakingConfiguration = "CreateMatchmakingConfiguration" // CreateMatchmakingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the CreateMatchmakingConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1045,7 +1046,7 @@ const opCreateMatchmakingRuleSet = "CreateMatchmakingRuleSet" // CreateMatchmakingRuleSetRequest generates a "aws/request.Request" representing the // client's request for the CreateMatchmakingRuleSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1169,7 +1170,7 @@ const opCreatePlayerSession = "CreatePlayerSession" // CreatePlayerSessionRequest generates a "aws/request.Request" representing the // client's request for the CreatePlayerSession operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1302,7 +1303,7 @@ const opCreatePlayerSessions = "CreatePlayerSessions" // CreatePlayerSessionsRequest generates a "aws/request.Request" representing the // client's request for the CreatePlayerSessions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1436,7 +1437,7 @@ const opCreateVpcPeeringAuthorization = "CreateVpcPeeringAuthorization" // CreateVpcPeeringAuthorizationRequest generates a "aws/request.Request" representing the // client's request for the CreateVpcPeeringAuthorization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1569,7 +1570,7 @@ const opCreateVpcPeeringConnection = "CreateVpcPeeringConnection" // CreateVpcPeeringConnectionRequest generates a "aws/request.Request" representing the // client's request for the CreateVpcPeeringConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1603,6 +1604,7 @@ func (c *GameLift) CreateVpcPeeringConnectionRequest(input *CreateVpcPeeringConn output = &CreateVpcPeeringConnectionOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1697,7 +1699,7 @@ const opDeleteAlias = "DeleteAlias" // DeleteAliasRequest generates a "aws/request.Request" representing the // client's request for the DeleteAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1731,8 +1733,7 @@ func (c *GameLift) DeleteAliasRequest(input *DeleteAliasInput) (req *request.Req output = &DeleteAliasOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1807,7 +1808,7 @@ const opDeleteBuild = "DeleteBuild" // DeleteBuildRequest generates a "aws/request.Request" representing the // client's request for the DeleteBuild operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1841,8 +1842,7 @@ func (c *GameLift) DeleteBuildRequest(input *DeleteBuildInput) (req *request.Req output = &DeleteBuildOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1918,7 +1918,7 @@ const opDeleteFleet = "DeleteFleet" // DeleteFleetRequest generates a "aws/request.Request" representing the // client's request for the DeleteFleet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1952,8 +1952,7 @@ func (c *GameLift) DeleteFleetRequest(input *DeleteFleetInput) (req *request.Req output = &DeleteFleetOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2061,7 +2060,7 @@ const opDeleteGameSessionQueue = "DeleteGameSessionQueue" // DeleteGameSessionQueueRequest generates a "aws/request.Request" representing the // client's request for the DeleteGameSessionQueue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2095,6 +2094,7 @@ func (c *GameLift) DeleteGameSessionQueueRequest(input *DeleteGameSessionQueueIn output = &DeleteGameSessionQueueOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2165,7 +2165,7 @@ const opDeleteMatchmakingConfiguration = "DeleteMatchmakingConfiguration" // DeleteMatchmakingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteMatchmakingConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2199,6 +2199,7 @@ func (c *GameLift) DeleteMatchmakingConfigurationRequest(input *DeleteMatchmakin output = &DeleteMatchmakingConfigurationOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2275,7 +2276,7 @@ const opDeleteScalingPolicy = "DeleteScalingPolicy" // DeleteScalingPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteScalingPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2309,8 +2310,7 @@ func (c *GameLift) DeleteScalingPolicyRequest(input *DeleteScalingPolicyInput) ( output = &DeleteScalingPolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2396,7 +2396,7 @@ const opDeleteVpcPeeringAuthorization = "DeleteVpcPeeringAuthorization" // DeleteVpcPeeringAuthorizationRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpcPeeringAuthorization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2430,6 +2430,7 @@ func (c *GameLift) DeleteVpcPeeringAuthorizationRequest(input *DeleteVpcPeeringA output = &DeleteVpcPeeringAuthorizationOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2504,7 +2505,7 @@ const opDeleteVpcPeeringConnection = "DeleteVpcPeeringConnection" // DeleteVpcPeeringConnectionRequest generates a "aws/request.Request" representing the // client's request for the DeleteVpcPeeringConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2538,6 +2539,7 @@ func (c *GameLift) DeleteVpcPeeringConnectionRequest(input *DeleteVpcPeeringConn output = &DeleteVpcPeeringConnectionOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2618,7 +2620,7 @@ const opDescribeAlias = "DescribeAlias" // DescribeAliasRequest generates a "aws/request.Request" representing the // client's request for the DescribeAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2728,7 +2730,7 @@ const opDescribeBuild = "DescribeBuild" // DescribeBuildRequest generates a "aws/request.Request" representing the // client's request for the DescribeBuild operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2833,7 +2835,7 @@ const opDescribeEC2InstanceLimits = "DescribeEC2InstanceLimits" // DescribeEC2InstanceLimitsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEC2InstanceLimits operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2969,7 +2971,7 @@ const opDescribeFleetAttributes = "DescribeFleetAttributes" // DescribeFleetAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeFleetAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3111,7 +3113,7 @@ const opDescribeFleetCapacity = "DescribeFleetCapacity" // DescribeFleetCapacityRequest generates a "aws/request.Request" representing the // client's request for the DescribeFleetCapacity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3254,7 +3256,7 @@ const opDescribeFleetEvents = "DescribeFleetEvents" // DescribeFleetEventsRequest generates a "aws/request.Request" representing the // client's request for the DescribeFleetEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3389,7 +3391,7 @@ const opDescribeFleetPortSettings = "DescribeFleetPortSettings" // DescribeFleetPortSettingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeFleetPortSettings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3526,7 +3528,7 @@ const opDescribeFleetUtilization = "DescribeFleetUtilization" // DescribeFleetUtilizationRequest generates a "aws/request.Request" representing the // client's request for the DescribeFleetUtilization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3667,7 +3669,7 @@ const opDescribeGameSessionDetails = "DescribeGameSessionDetails" // DescribeGameSessionDetailsRequest generates a "aws/request.Request" representing the // client's request for the DescribeGameSessionDetails operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3798,7 +3800,7 @@ const opDescribeGameSessionPlacement = "DescribeGameSessionPlacement" // DescribeGameSessionPlacementRequest generates a "aws/request.Request" representing the // client's request for the DescribeGameSessionPlacement operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3914,7 +3916,7 @@ const opDescribeGameSessionQueues = "DescribeGameSessionQueues" // DescribeGameSessionQueuesRequest generates a "aws/request.Request" representing the // client's request for the DescribeGameSessionQueues operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4020,7 +4022,7 @@ const opDescribeGameSessions = "DescribeGameSessions" // DescribeGameSessionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeGameSessions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4152,7 +4154,7 @@ const opDescribeInstances = "DescribeInstances" // DescribeInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4251,7 +4253,7 @@ const opDescribeMatchmaking = "DescribeMatchmaking" // DescribeMatchmakingRequest generates a "aws/request.Request" representing the // client's request for the DescribeMatchmaking operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4362,7 +4364,7 @@ const opDescribeMatchmakingConfigurations = "DescribeMatchmakingConfigurations" // DescribeMatchmakingConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeMatchmakingConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4473,7 +4475,7 @@ const opDescribeMatchmakingRuleSets = "DescribeMatchmakingRuleSets" // DescribeMatchmakingRuleSetsRequest generates a "aws/request.Request" representing the // client's request for the DescribeMatchmakingRuleSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4585,7 +4587,7 @@ const opDescribePlayerSessions = "DescribePlayerSessions" // DescribePlayerSessionsRequest generates a "aws/request.Request" representing the // client's request for the DescribePlayerSessions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4705,7 +4707,7 @@ const opDescribeRuntimeConfiguration = "DescribeRuntimeConfiguration" // DescribeRuntimeConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DescribeRuntimeConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4839,7 +4841,7 @@ const opDescribeScalingPolicies = "DescribeScalingPolicies" // DescribeScalingPoliciesRequest generates a "aws/request.Request" representing the // client's request for the DescribeScalingPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4963,7 +4965,7 @@ const opDescribeVpcPeeringAuthorizations = "DescribeVpcPeeringAuthorizations" // DescribeVpcPeeringAuthorizationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcPeeringAuthorizations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5067,7 +5069,7 @@ const opDescribeVpcPeeringConnections = "DescribeVpcPeeringConnections" // DescribeVpcPeeringConnectionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeVpcPeeringConnections operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5180,7 +5182,7 @@ const opGetGameSessionLogUrl = "GetGameSessionLogUrl" // GetGameSessionLogUrlRequest generates a "aws/request.Request" representing the // client's request for the GetGameSessionLogUrl operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5301,7 +5303,7 @@ const opGetInstanceAccess = "GetInstanceAccess" // GetInstanceAccessRequest generates a "aws/request.Request" representing the // client's request for the GetInstanceAccess operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5408,7 +5410,7 @@ const opListAliases = "ListAliases" // ListAliasesRequest generates a "aws/request.Request" representing the // client's request for the ListAliases operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5514,7 +5516,7 @@ const opListBuilds = "ListBuilds" // ListBuildsRequest generates a "aws/request.Request" representing the // client's request for the ListBuilds operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5619,7 +5621,7 @@ const opListFleets = "ListFleets" // ListFleetsRequest generates a "aws/request.Request" representing the // client's request for the ListFleets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5755,7 +5757,7 @@ const opPutScalingPolicy = "PutScalingPolicy" // PutScalingPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutScalingPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5942,7 +5944,7 @@ const opRequestUploadCredentials = "RequestUploadCredentials" // RequestUploadCredentialsRequest generates a "aws/request.Request" representing the // client's request for the RequestUploadCredentials operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6040,7 +6042,7 @@ const opResolveAlias = "ResolveAlias" // ResolveAliasRequest generates a "aws/request.Request" representing the // client's request for the ResolveAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6153,7 +6155,7 @@ const opSearchGameSessions = "SearchGameSessions" // SearchGameSessionsRequest generates a "aws/request.Request" representing the // client's request for the SearchGameSessions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6322,7 +6324,7 @@ const opStartFleetActions = "StartFleetActions" // StartFleetActionsRequest generates a "aws/request.Request" representing the // client's request for the StartFleetActions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6356,6 +6358,7 @@ func (c *GameLift) StartFleetActionsRequest(input *StartFleetActionsInput) (req output = &StartFleetActionsOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -6443,7 +6446,7 @@ const opStartGameSessionPlacement = "StartGameSessionPlacement" // StartGameSessionPlacementRequest generates a "aws/request.Request" representing the // client's request for the StartGameSessionPlacement operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6597,7 +6600,7 @@ const opStartMatchBackfill = "StartMatchBackfill" // StartMatchBackfillRequest generates a "aws/request.Request" representing the // client's request for the StartMatchBackfill operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6725,7 +6728,7 @@ const opStartMatchmaking = "StartMatchmaking" // StartMatchmakingRequest generates a "aws/request.Request" representing the // client's request for the StartMatchmaking operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6889,7 +6892,7 @@ const opStopFleetActions = "StopFleetActions" // StopFleetActionsRequest generates a "aws/request.Request" representing the // client's request for the StopFleetActions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6923,6 +6926,7 @@ func (c *GameLift) StopFleetActionsRequest(input *StopFleetActionsInput) (req *r output = &StopFleetActionsOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -6990,7 +6994,7 @@ const opStopGameSessionPlacement = "StopGameSessionPlacement" // StopGameSessionPlacementRequest generates a "aws/request.Request" representing the // client's request for the StopGameSessionPlacement operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7106,7 +7110,7 @@ const opStopMatchmaking = "StopMatchmaking" // StopMatchmakingRequest generates a "aws/request.Request" representing the // client's request for the StopMatchmaking operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7140,6 +7144,7 @@ func (c *GameLift) StopMatchmakingRequest(input *StopMatchmakingInput) (req *req output = &StopMatchmakingOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -7212,7 +7217,7 @@ const opUpdateAlias = "UpdateAlias" // UpdateAliasRequest generates a "aws/request.Request" representing the // client's request for the UpdateAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7321,7 +7326,7 @@ const opUpdateBuild = "UpdateBuild" // UpdateBuildRequest generates a "aws/request.Request" representing the // client's request for the UpdateBuild operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7428,7 +7433,7 @@ const opUpdateFleetAttributes = "UpdateFleetAttributes" // UpdateFleetAttributesRequest generates a "aws/request.Request" representing the // client's request for the UpdateFleetAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7576,7 +7581,7 @@ const opUpdateFleetCapacity = "UpdateFleetCapacity" // UpdateFleetCapacityRequest generates a "aws/request.Request" representing the // client's request for the UpdateFleetCapacity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7737,7 +7742,7 @@ const opUpdateFleetPortSettings = "UpdateFleetPortSettings" // UpdateFleetPortSettingsRequest generates a "aws/request.Request" representing the // client's request for the UpdateFleetPortSettings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7888,7 +7893,7 @@ const opUpdateGameSession = "UpdateGameSession" // UpdateGameSessionRequest generates a "aws/request.Request" representing the // client's request for the UpdateGameSession operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8018,7 +8023,7 @@ const opUpdateGameSessionQueue = "UpdateGameSessionQueue" // UpdateGameSessionQueueRequest generates a "aws/request.Request" representing the // client's request for the UpdateGameSessionQueue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8123,7 +8128,7 @@ const opUpdateMatchmakingConfiguration = "UpdateMatchmakingConfiguration" // UpdateMatchmakingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the UpdateMatchmakingConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8232,7 +8237,7 @@ const opUpdateRuntimeConfiguration = "UpdateRuntimeConfiguration" // UpdateRuntimeConfigurationRequest generates a "aws/request.Request" representing the // client's request for the UpdateRuntimeConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8384,7 +8389,7 @@ const opValidateMatchmakingRuleSet = "ValidateMatchmakingRuleSet" // ValidateMatchmakingRuleSetRequest generates a "aws/request.Request" representing the // client's request for the ValidateMatchmakingRuleSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8740,7 +8745,7 @@ func (s *AttributeValue) SetSL(v []*string) *AttributeValue { // GameLift. They are valid for a limited time. If they expire before you upload // your game build, get a new set by calling RequestUploadCredentials. type AwsCredentials struct { - _ struct{} `type:"structure"` + _ struct{} `type:"structure" sensitive:"true"` // Temporary key allowing access to the Amazon GameLift S3 account. AccessKeyId *string `min:"1" type:"string"` @@ -9080,7 +9085,7 @@ type CreateBuildOutput struct { // location. It contains credentials to use when you are uploading a build file // to an Amazon S3 bucket that is owned by Amazon GameLift. Credentials have // a limited life span. To refresh these credentials, call RequestUploadCredentials. - UploadCredentials *AwsCredentials `type:"structure"` + UploadCredentials *AwsCredentials `type:"structure" sensitive:"true"` } // String returns the string representation @@ -14637,7 +14642,7 @@ type InstanceAccess struct { _ struct{} `type:"structure"` // Credentials required to access the instance. - Credentials *InstanceCredentials `type:"structure"` + Credentials *InstanceCredentials `type:"structure" sensitive:"true"` // Unique identifier for a fleet containing the instance being accessed. FleetId *string `type:"string"` @@ -14696,7 +14701,7 @@ func (s *InstanceAccess) SetOperatingSystem(v string) *InstanceAccess { // are requested by calling GetInstanceAccess and returned in an InstanceAccess // object. type InstanceCredentials struct { - _ struct{} `type:"structure"` + _ struct{} `type:"structure" sensitive:"true"` // Secret string. For Windows instances, the secret is a password for use with // Windows Remote Desktop. For Linux instances, it is a private key (which must @@ -16252,7 +16257,7 @@ type RequestUploadCredentialsOutput struct { // AWS credentials required when uploading a game build to the storage location. // These credentials have a limited lifespan and are valid only for the build // they were issued for. - UploadCredentials *AwsCredentials `type:"structure"` + UploadCredentials *AwsCredentials `type:"structure" sensitive:"true"` } // String returns the string representation diff --git a/vendor/github.com/aws/aws-sdk-go/service/glacier/api.go b/vendor/github.com/aws/aws-sdk-go/service/glacier/api.go index 34050f7ce8..f6199352f7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/glacier/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/glacier/api.go @@ -18,7 +18,7 @@ const opAbortMultipartUpload = "AbortMultipartUpload" // AbortMultipartUploadRequest generates a "aws/request.Request" representing the // client's request for the AbortMultipartUpload operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -50,8 +50,7 @@ func (c *Glacier) AbortMultipartUploadRequest(input *AbortMultipartUploadInput) output = &AbortMultipartUploadOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -125,7 +124,7 @@ const opAbortVaultLock = "AbortVaultLock" // AbortVaultLockRequest generates a "aws/request.Request" representing the // client's request for the AbortVaultLock operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -157,8 +156,7 @@ func (c *Glacier) AbortVaultLockRequest(input *AbortVaultLockInput) (req *reques output = &AbortVaultLockOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -228,7 +226,7 @@ const opAddTagsToVault = "AddTagsToVault" // AddTagsToVaultRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToVault operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -260,8 +258,7 @@ func (c *Glacier) AddTagsToVaultRequest(input *AddTagsToVaultInput) (req *reques output = &AddTagsToVaultOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -324,7 +321,7 @@ const opCompleteMultipartUpload = "CompleteMultipartUpload" // CompleteMultipartUploadRequest generates a "aws/request.Request" representing the // client's request for the CompleteMultipartUpload operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -453,7 +450,7 @@ const opCompleteVaultLock = "CompleteVaultLock" // CompleteVaultLockRequest generates a "aws/request.Request" representing the // client's request for the CompleteVaultLock operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -485,8 +482,7 @@ func (c *Glacier) CompleteVaultLockRequest(input *CompleteVaultLockInput) (req * output = &CompleteVaultLockOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -555,7 +551,7 @@ const opCreateVault = "CreateVault" // CreateVaultRequest generates a "aws/request.Request" representing the // client's request for the CreateVault operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -663,7 +659,7 @@ const opDeleteArchive = "DeleteArchive" // DeleteArchiveRequest generates a "aws/request.Request" representing the // client's request for the DeleteArchive operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -695,8 +691,7 @@ func (c *Glacier) DeleteArchiveRequest(input *DeleteArchiveInput) (req *request. output = &DeleteArchiveOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -775,7 +770,7 @@ const opDeleteVault = "DeleteVault" // DeleteVaultRequest generates a "aws/request.Request" representing the // client's request for the DeleteVault operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -807,8 +802,7 @@ func (c *Glacier) DeleteVaultRequest(input *DeleteVaultInput) (req *request.Requ output = &DeleteVaultOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -885,7 +879,7 @@ const opDeleteVaultAccessPolicy = "DeleteVaultAccessPolicy" // DeleteVaultAccessPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteVaultAccessPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -917,8 +911,7 @@ func (c *Glacier) DeleteVaultAccessPolicyRequest(input *DeleteVaultAccessPolicyI output = &DeleteVaultAccessPolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -982,7 +975,7 @@ const opDeleteVaultNotifications = "DeleteVaultNotifications" // DeleteVaultNotificationsRequest generates a "aws/request.Request" representing the // client's request for the DeleteVaultNotifications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1014,8 +1007,7 @@ func (c *Glacier) DeleteVaultNotificationsRequest(input *DeleteVaultNotification output = &DeleteVaultNotificationsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1084,7 +1076,7 @@ const opDescribeJob = "DescribeJob" // DescribeJobRequest generates a "aws/request.Request" representing the // client's request for the DescribeJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1191,7 +1183,7 @@ const opDescribeVault = "DescribeVault" // DescribeVaultRequest generates a "aws/request.Request" representing the // client's request for the DescribeVault operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1296,7 +1288,7 @@ const opGetDataRetrievalPolicy = "GetDataRetrievalPolicy" // GetDataRetrievalPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetDataRetrievalPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1380,7 +1372,7 @@ const opGetJobOutput = "GetJobOutput" // GetJobOutputRequest generates a "aws/request.Request" representing the // client's request for the GetJobOutput operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1509,7 +1501,7 @@ const opGetVaultAccessPolicy = "GetVaultAccessPolicy" // GetVaultAccessPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetVaultAccessPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1600,7 +1592,7 @@ const opGetVaultLock = "GetVaultLock" // GetVaultLockRequest generates a "aws/request.Request" representing the // client's request for the GetVaultLock operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1705,7 +1697,7 @@ const opGetVaultNotifications = "GetVaultNotifications" // GetVaultNotificationsRequest generates a "aws/request.Request" representing the // client's request for the GetVaultNotifications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1809,7 +1801,7 @@ const opInitiateJob = "InitiateJob" // InitiateJobRequest generates a "aws/request.Request" representing the // client's request for the InitiateJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1907,7 +1899,7 @@ const opInitiateMultipartUpload = "InitiateMultipartUpload" // InitiateMultipartUploadRequest generates a "aws/request.Request" representing the // client's request for the InitiateMultipartUpload operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2027,7 +2019,7 @@ const opInitiateVaultLock = "InitiateVaultLock" // InitiateVaultLockRequest generates a "aws/request.Request" representing the // client's request for the InitiateVaultLock operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2141,7 +2133,7 @@ const opListJobs = "ListJobs" // ListJobsRequest generates a "aws/request.Request" representing the // client's request for the ListJobs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2318,7 +2310,7 @@ const opListMultipartUploads = "ListMultipartUploads" // ListMultipartUploadsRequest generates a "aws/request.Request" representing the // client's request for the ListMultipartUploads operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2489,7 +2481,7 @@ const opListParts = "ListParts" // ListPartsRequest generates a "aws/request.Request" representing the // client's request for the ListParts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2654,7 +2646,7 @@ const opListProvisionedCapacity = "ListProvisionedCapacity" // ListProvisionedCapacityRequest generates a "aws/request.Request" representing the // client's request for the ListProvisionedCapacity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2737,7 +2729,7 @@ const opListTagsForVault = "ListTagsForVault" // ListTagsForVaultRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForVault operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2825,7 +2817,7 @@ const opListVaults = "ListVaults" // ListVaultsRequest generates a "aws/request.Request" representing the // client's request for the ListVaults operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2987,7 +2979,7 @@ const opPurchaseProvisionedCapacity = "PurchaseProvisionedCapacity" // PurchaseProvisionedCapacityRequest generates a "aws/request.Request" representing the // client's request for the PurchaseProvisionedCapacity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3072,7 +3064,7 @@ const opRemoveTagsFromVault = "RemoveTagsFromVault" // RemoveTagsFromVaultRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromVault operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3104,8 +3096,7 @@ func (c *Glacier) RemoveTagsFromVaultRequest(input *RemoveTagsFromVaultInput) (r output = &RemoveTagsFromVaultOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3164,7 +3155,7 @@ const opSetDataRetrievalPolicy = "SetDataRetrievalPolicy" // SetDataRetrievalPolicyRequest generates a "aws/request.Request" representing the // client's request for the SetDataRetrievalPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3196,8 +3187,7 @@ func (c *Glacier) SetDataRetrievalPolicyRequest(input *SetDataRetrievalPolicyInp output = &SetDataRetrievalPolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3254,7 +3244,7 @@ const opSetVaultAccessPolicy = "SetVaultAccessPolicy" // SetVaultAccessPolicyRequest generates a "aws/request.Request" representing the // client's request for the SetVaultAccessPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3286,8 +3276,7 @@ func (c *Glacier) SetVaultAccessPolicyRequest(input *SetVaultAccessPolicyInput) output = &SetVaultAccessPolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3348,7 +3337,7 @@ const opSetVaultNotifications = "SetVaultNotifications" // SetVaultNotificationsRequest generates a "aws/request.Request" representing the // client's request for the SetVaultNotifications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3380,8 +3369,7 @@ func (c *Glacier) SetVaultNotificationsRequest(input *SetVaultNotificationsInput output = &SetVaultNotificationsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3467,7 +3455,7 @@ const opUploadArchive = "UploadArchive" // UploadArchiveRequest generates a "aws/request.Request" representing the // client's request for the UploadArchive operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3592,7 +3580,7 @@ const opUploadMultipartPart = "UploadMultipartPart" // UploadMultipartPartRequest generates a "aws/request.Request" representing the // client's request for the UploadMultipartPart operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3766,12 +3754,21 @@ func (s *AbortMultipartUploadInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if s.UploadId == nil { invalidParams.Add(request.NewErrParamRequired("UploadId")) } + if s.UploadId != nil && len(*s.UploadId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UploadId", 1)) + } if s.VaultName == nil { invalidParams.Add(request.NewErrParamRequired("VaultName")) } + if s.VaultName != nil && len(*s.VaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -3847,9 +3844,15 @@ func (s *AbortVaultLockInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if s.VaultName == nil { invalidParams.Add(request.NewErrParamRequired("VaultName")) } + if s.VaultName != nil && len(*s.VaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -3922,9 +3925,15 @@ func (s *AddTagsToVaultInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if s.VaultName == nil { invalidParams.Add(request.NewErrParamRequired("VaultName")) } + if s.VaultName != nil && len(*s.VaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -4200,12 +4209,21 @@ func (s *CompleteMultipartUploadInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if s.UploadId == nil { invalidParams.Add(request.NewErrParamRequired("UploadId")) } + if s.UploadId != nil && len(*s.UploadId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UploadId", 1)) + } if s.VaultName == nil { invalidParams.Add(request.NewErrParamRequired("VaultName")) } + if s.VaultName != nil && len(*s.VaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -4284,12 +4302,21 @@ func (s *CompleteVaultLockInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if s.LockId == nil { invalidParams.Add(request.NewErrParamRequired("LockId")) } + if s.LockId != nil && len(*s.LockId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LockId", 1)) + } if s.VaultName == nil { invalidParams.Add(request.NewErrParamRequired("VaultName")) } + if s.VaultName != nil && len(*s.VaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -4365,9 +4392,15 @@ func (s *CreateVaultInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if s.VaultName == nil { invalidParams.Add(request.NewErrParamRequired("VaultName")) } + if s.VaultName != nil && len(*s.VaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -4515,12 +4548,21 @@ func (s *DeleteArchiveInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if s.ArchiveId == nil { invalidParams.Add(request.NewErrParamRequired("ArchiveId")) } + if s.ArchiveId != nil && len(*s.ArchiveId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ArchiveId", 1)) + } if s.VaultName == nil { invalidParams.Add(request.NewErrParamRequired("VaultName")) } + if s.VaultName != nil && len(*s.VaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -4595,9 +4637,15 @@ func (s *DeleteVaultAccessPolicyInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if s.VaultName == nil { invalidParams.Add(request.NewErrParamRequired("VaultName")) } + if s.VaultName != nil && len(*s.VaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -4666,9 +4714,15 @@ func (s *DeleteVaultInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if s.VaultName == nil { invalidParams.Add(request.NewErrParamRequired("VaultName")) } + if s.VaultName != nil && len(*s.VaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -4724,9 +4778,15 @@ func (s *DeleteVaultNotificationsInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if s.VaultName == nil { invalidParams.Add(request.NewErrParamRequired("VaultName")) } + if s.VaultName != nil && len(*s.VaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -4814,12 +4874,21 @@ func (s *DescribeJobInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if s.JobId == nil { invalidParams.Add(request.NewErrParamRequired("JobId")) } + if s.JobId != nil && len(*s.JobId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) + } if s.VaultName == nil { invalidParams.Add(request.NewErrParamRequired("VaultName")) } + if s.VaultName != nil && len(*s.VaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -4880,9 +4949,15 @@ func (s *DescribeVaultInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if s.VaultName == nil { invalidParams.Add(request.NewErrParamRequired("VaultName")) } + if s.VaultName != nil && len(*s.VaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -5056,6 +5131,9 @@ func (s *GetDataRetrievalPolicyInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -5164,12 +5242,21 @@ func (s *GetJobOutputInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if s.JobId == nil { invalidParams.Add(request.NewErrParamRequired("JobId")) } + if s.JobId != nil && len(*s.JobId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) + } if s.VaultName == nil { invalidParams.Add(request.NewErrParamRequired("VaultName")) } + if s.VaultName != nil && len(*s.VaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -5336,9 +5423,15 @@ func (s *GetVaultAccessPolicyInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if s.VaultName == nil { invalidParams.Add(request.NewErrParamRequired("VaultName")) } + if s.VaultName != nil && len(*s.VaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -5417,9 +5510,15 @@ func (s *GetVaultLockInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if s.VaultName == nil { invalidParams.Add(request.NewErrParamRequired("VaultName")) } + if s.VaultName != nil && len(*s.VaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -5528,9 +5627,15 @@ func (s *GetVaultNotificationsInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if s.VaultName == nil { invalidParams.Add(request.NewErrParamRequired("VaultName")) } + if s.VaultName != nil && len(*s.VaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -5735,9 +5840,15 @@ func (s *InitiateJobInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if s.VaultName == nil { invalidParams.Add(request.NewErrParamRequired("VaultName")) } + if s.VaultName != nil && len(*s.VaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) + } if s.JobParameters != nil { if err := s.JobParameters.Validate(); err != nil { invalidParams.AddNested("JobParameters", err.(request.ErrInvalidParams)) @@ -5857,9 +5968,15 @@ func (s *InitiateMultipartUploadInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if s.VaultName == nil { invalidParams.Add(request.NewErrParamRequired("VaultName")) } + if s.VaultName != nil && len(*s.VaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -5964,9 +6081,15 @@ func (s *InitiateVaultLockInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if s.VaultName == nil { invalidParams.Add(request.NewErrParamRequired("VaultName")) } + if s.VaultName != nil && len(*s.VaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -6606,9 +6729,15 @@ func (s *ListJobsInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if s.VaultName == nil { invalidParams.Add(request.NewErrParamRequired("VaultName")) } + if s.VaultName != nil && len(*s.VaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -6735,9 +6864,15 @@ func (s *ListMultipartUploadsInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if s.VaultName == nil { invalidParams.Add(request.NewErrParamRequired("VaultName")) } + if s.VaultName != nil && len(*s.VaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -6857,12 +6992,21 @@ func (s *ListPartsInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if s.UploadId == nil { invalidParams.Add(request.NewErrParamRequired("UploadId")) } + if s.UploadId != nil && len(*s.UploadId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UploadId", 1)) + } if s.VaultName == nil { invalidParams.Add(request.NewErrParamRequired("VaultName")) } + if s.VaultName != nil && len(*s.VaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -7013,6 +7157,9 @@ func (s *ListProvisionedCapacityInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -7084,9 +7231,15 @@ func (s *ListTagsForVaultInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if s.VaultName == nil { invalidParams.Add(request.NewErrParamRequired("VaultName")) } + if s.VaultName != nil && len(*s.VaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -7171,6 +7324,9 @@ func (s *ListVaultsInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -7401,6 +7557,9 @@ func (s *PurchaseProvisionedCapacityInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -7475,9 +7634,15 @@ func (s *RemoveTagsFromVaultInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if s.VaultName == nil { invalidParams.Add(request.NewErrParamRequired("VaultName")) } + if s.VaultName != nil && len(*s.VaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -7711,6 +7876,9 @@ func (s *SetDataRetrievalPolicyInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -7782,9 +7950,15 @@ func (s *SetVaultAccessPolicyInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if s.VaultName == nil { invalidParams.Add(request.NewErrParamRequired("VaultName")) } + if s.VaultName != nil && len(*s.VaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -7863,9 +8037,15 @@ func (s *SetVaultNotificationsInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if s.VaultName == nil { invalidParams.Add(request.NewErrParamRequired("VaultName")) } + if s.VaultName != nil && len(*s.VaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -7949,9 +8129,15 @@ func (s *UploadArchiveInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if s.VaultName == nil { invalidParams.Add(request.NewErrParamRequired("VaultName")) } + if s.VaultName != nil && len(*s.VaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -8104,12 +8290,21 @@ func (s *UploadMultipartPartInput) Validate() error { if s.AccountId == nil { invalidParams.Add(request.NewErrParamRequired("AccountId")) } + if s.AccountId != nil && len(*s.AccountId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AccountId", 1)) + } if s.UploadId == nil { invalidParams.Add(request.NewErrParamRequired("UploadId")) } + if s.UploadId != nil && len(*s.UploadId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UploadId", 1)) + } if s.VaultName == nil { invalidParams.Add(request.NewErrParamRequired("VaultName")) } + if s.VaultName != nil && len(*s.VaultName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VaultName", 1)) + } if invalidParams.Len() > 0 { return invalidParams diff --git a/vendor/github.com/aws/aws-sdk-go/service/glue/api.go b/vendor/github.com/aws/aws-sdk-go/service/glue/api.go index 220bd22aaa..b274197482 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/glue/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/glue/api.go @@ -9,6 +9,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) const opBatchCreatePartition = "BatchCreatePartition" @@ -16,7 +18,7 @@ const opBatchCreatePartition = "BatchCreatePartition" // BatchCreatePartitionRequest generates a "aws/request.Request" representing the // client's request for the BatchCreatePartition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -113,7 +115,7 @@ const opBatchDeleteConnection = "BatchDeleteConnection" // BatchDeleteConnectionRequest generates a "aws/request.Request" representing the // client's request for the BatchDeleteConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -195,7 +197,7 @@ const opBatchDeletePartition = "BatchDeletePartition" // BatchDeletePartitionRequest generates a "aws/request.Request" representing the // client's request for the BatchDeletePartition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -283,7 +285,7 @@ const opBatchDeleteTable = "BatchDeleteTable" // BatchDeleteTableRequest generates a "aws/request.Request" representing the // client's request for the BatchDeleteTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -380,7 +382,7 @@ const opBatchDeleteTableVersion = "BatchDeleteTableVersion" // BatchDeleteTableVersionRequest generates a "aws/request.Request" representing the // client's request for the BatchDeleteTableVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -468,7 +470,7 @@ const opBatchGetPartition = "BatchGetPartition" // BatchGetPartitionRequest generates a "aws/request.Request" representing the // client's request for the BatchGetPartition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -559,7 +561,7 @@ const opBatchStopJobRun = "BatchStopJobRun" // BatchStopJobRunRequest generates a "aws/request.Request" representing the // client's request for the BatchStopJobRun operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -644,7 +646,7 @@ const opCreateClassifier = "CreateClassifier" // CreateClassifierRequest generates a "aws/request.Request" representing the // client's request for the CreateClassifier operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -678,6 +680,7 @@ func (c *Glue) CreateClassifierRequest(input *CreateClassifierInput) (req *reque output = &CreateClassifierOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -731,7 +734,7 @@ const opCreateConnection = "CreateConnection" // CreateConnectionRequest generates a "aws/request.Request" representing the // client's request for the CreateConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -765,6 +768,7 @@ func (c *Glue) CreateConnectionRequest(input *CreateConnectionInput) (req *reque output = &CreateConnectionOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -822,7 +826,7 @@ const opCreateCrawler = "CreateCrawler" // CreateCrawlerRequest generates a "aws/request.Request" representing the // client's request for the CreateCrawler operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -856,6 +860,7 @@ func (c *Glue) CreateCrawlerRequest(input *CreateCrawlerInput) (req *request.Req output = &CreateCrawlerOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -912,7 +917,7 @@ const opCreateDatabase = "CreateDatabase" // CreateDatabaseRequest generates a "aws/request.Request" representing the // client's request for the CreateDatabase operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -946,6 +951,7 @@ func (c *Glue) CreateDatabaseRequest(input *CreateDatabaseInput) (req *request.R output = &CreateDatabaseOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1006,7 +1012,7 @@ const opCreateDevEndpoint = "CreateDevEndpoint" // CreateDevEndpointRequest generates a "aws/request.Request" representing the // client's request for the CreateDevEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1106,7 +1112,7 @@ const opCreateJob = "CreateJob" // CreateJobRequest generates a "aws/request.Request" representing the // client's request for the CreateJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1203,7 +1209,7 @@ const opCreatePartition = "CreatePartition" // CreatePartitionRequest generates a "aws/request.Request" representing the // client's request for the CreatePartition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1237,6 +1243,7 @@ func (c *Glue) CreatePartitionRequest(input *CreatePartitionInput) (req *request output = &CreatePartitionOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1300,7 +1307,7 @@ const opCreateScript = "CreateScript" // CreateScriptRequest generates a "aws/request.Request" representing the // client's request for the CreateScript operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1385,7 +1392,7 @@ const opCreateSecurityConfiguration = "CreateSecurityConfiguration" // CreateSecurityConfigurationRequest generates a "aws/request.Request" representing the // client's request for the CreateSecurityConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1476,7 +1483,7 @@ const opCreateTable = "CreateTable" // CreateTableRequest generates a "aws/request.Request" representing the // client's request for the CreateTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1510,6 +1517,7 @@ func (c *Glue) CreateTableRequest(input *CreateTableInput) (req *request.Request output = &CreateTableOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1573,7 +1581,7 @@ const opCreateTrigger = "CreateTrigger" // CreateTriggerRequest generates a "aws/request.Request" representing the // client's request for the CreateTrigger operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1670,7 +1678,7 @@ const opCreateUserDefinedFunction = "CreateUserDefinedFunction" // CreateUserDefinedFunctionRequest generates a "aws/request.Request" representing the // client's request for the CreateUserDefinedFunction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1704,6 +1712,7 @@ func (c *Glue) CreateUserDefinedFunctionRequest(input *CreateUserDefinedFunction output = &CreateUserDefinedFunctionOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1767,7 +1776,7 @@ const opDeleteClassifier = "DeleteClassifier" // DeleteClassifierRequest generates a "aws/request.Request" representing the // client's request for the DeleteClassifier operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1801,6 +1810,7 @@ func (c *Glue) DeleteClassifierRequest(input *DeleteClassifierInput) (req *reque output = &DeleteClassifierOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1849,7 +1859,7 @@ const opDeleteConnection = "DeleteConnection" // DeleteConnectionRequest generates a "aws/request.Request" representing the // client's request for the DeleteConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1883,6 +1893,7 @@ func (c *Glue) DeleteConnectionRequest(input *DeleteConnectionInput) (req *reque output = &DeleteConnectionOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1931,7 +1942,7 @@ const opDeleteCrawler = "DeleteCrawler" // DeleteCrawlerRequest generates a "aws/request.Request" representing the // client's request for the DeleteCrawler operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1965,6 +1976,7 @@ func (c *Glue) DeleteCrawlerRequest(input *DeleteCrawlerInput) (req *request.Req output = &DeleteCrawlerOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2020,7 +2032,7 @@ const opDeleteDatabase = "DeleteDatabase" // DeleteDatabaseRequest generates a "aws/request.Request" representing the // client's request for the DeleteDatabase operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2054,6 +2066,7 @@ func (c *Glue) DeleteDatabaseRequest(input *DeleteDatabaseInput) (req *request.R output = &DeleteDatabaseOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2119,7 +2132,7 @@ const opDeleteDevEndpoint = "DeleteDevEndpoint" // DeleteDevEndpointRequest generates a "aws/request.Request" representing the // client's request for the DeleteDevEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2153,6 +2166,7 @@ func (c *Glue) DeleteDevEndpointRequest(input *DeleteDevEndpointInput) (req *req output = &DeleteDevEndpointOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2207,7 +2221,7 @@ const opDeleteJob = "DeleteJob" // DeleteJobRequest generates a "aws/request.Request" representing the // client's request for the DeleteJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2293,7 +2307,7 @@ const opDeletePartition = "DeletePartition" // DeletePartitionRequest generates a "aws/request.Request" representing the // client's request for the DeletePartition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2327,6 +2341,7 @@ func (c *Glue) DeletePartitionRequest(input *DeletePartitionInput) (req *request output = &DeletePartitionOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2376,12 +2391,104 @@ func (c *Glue) DeletePartitionWithContext(ctx aws.Context, input *DeletePartitio return out, req.Send() } +const opDeleteResourcePolicy = "DeleteResourcePolicy" + +// DeleteResourcePolicyRequest generates a "aws/request.Request" representing the +// client's request for the DeleteResourcePolicy 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 DeleteResourcePolicy for more information on using the DeleteResourcePolicy +// 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 DeleteResourcePolicyRequest method. +// req, resp := client.DeleteResourcePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeleteResourcePolicy +func (c *Glue) DeleteResourcePolicyRequest(input *DeleteResourcePolicyInput) (req *request.Request, output *DeleteResourcePolicyOutput) { + op := &request.Operation{ + Name: opDeleteResourcePolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteResourcePolicyInput{} + } + + output = &DeleteResourcePolicyOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteResourcePolicy API operation for AWS Glue. +// +// Deletes a specified policy. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Glue's +// API operation DeleteResourcePolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeEntityNotFoundException "EntityNotFoundException" +// A specified entity does not exist +// +// * ErrCodeInternalServiceException "InternalServiceException" +// An internal service error occurred. +// +// * ErrCodeOperationTimeoutException "OperationTimeoutException" +// The operation timed out. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The input provided was not valid. +// +// * ErrCodeConditionCheckFailureException "ConditionCheckFailureException" +// A specified condition was not satisfied. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/DeleteResourcePolicy +func (c *Glue) DeleteResourcePolicy(input *DeleteResourcePolicyInput) (*DeleteResourcePolicyOutput, error) { + req, out := c.DeleteResourcePolicyRequest(input) + return out, req.Send() +} + +// DeleteResourcePolicyWithContext is the same as DeleteResourcePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteResourcePolicy 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 *Glue) DeleteResourcePolicyWithContext(ctx aws.Context, input *DeleteResourcePolicyInput, opts ...request.Option) (*DeleteResourcePolicyOutput, error) { + req, out := c.DeleteResourcePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteSecurityConfiguration = "DeleteSecurityConfiguration" // DeleteSecurityConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteSecurityConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2415,6 +2522,7 @@ func (c *Glue) DeleteSecurityConfigurationRequest(input *DeleteSecurityConfigura output = &DeleteSecurityConfigurationOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2469,7 +2577,7 @@ const opDeleteTable = "DeleteTable" // DeleteTableRequest generates a "aws/request.Request" representing the // client's request for the DeleteTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2503,6 +2611,7 @@ func (c *Glue) DeleteTableRequest(input *DeleteTableInput) (req *request.Request output = &DeleteTableOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2566,7 +2675,7 @@ const opDeleteTableVersion = "DeleteTableVersion" // DeleteTableVersionRequest generates a "aws/request.Request" representing the // client's request for the DeleteTableVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2600,6 +2709,7 @@ func (c *Glue) DeleteTableVersionRequest(input *DeleteTableVersionInput) (req *r output = &DeleteTableVersionOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2654,7 +2764,7 @@ const opDeleteTrigger = "DeleteTrigger" // DeleteTriggerRequest generates a "aws/request.Request" representing the // client's request for the DeleteTrigger operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2743,7 +2853,7 @@ const opDeleteUserDefinedFunction = "DeleteUserDefinedFunction" // DeleteUserDefinedFunctionRequest generates a "aws/request.Request" representing the // client's request for the DeleteUserDefinedFunction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2777,6 +2887,7 @@ func (c *Glue) DeleteUserDefinedFunctionRequest(input *DeleteUserDefinedFunction output = &DeleteUserDefinedFunctionOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2831,7 +2942,7 @@ const opGetCatalogImportStatus = "GetCatalogImportStatus" // GetCatalogImportStatusRequest generates a "aws/request.Request" representing the // client's request for the GetCatalogImportStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2913,7 +3024,7 @@ const opGetClassifier = "GetClassifier" // GetClassifierRequest generates a "aws/request.Request" representing the // client's request for the GetClassifier operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2995,7 +3106,7 @@ const opGetClassifiers = "GetClassifiers" // GetClassifiersRequest generates a "aws/request.Request" representing the // client's request for the GetClassifiers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3130,7 +3241,7 @@ const opGetConnection = "GetConnection" // GetConnectionRequest generates a "aws/request.Request" representing the // client's request for the GetConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3218,7 +3329,7 @@ const opGetConnections = "GetConnections" // GetConnectionsRequest generates a "aws/request.Request" representing the // client's request for the GetConnections operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3362,7 +3473,7 @@ const opGetCrawler = "GetCrawler" // GetCrawlerRequest generates a "aws/request.Request" representing the // client's request for the GetCrawler operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3444,7 +3555,7 @@ const opGetCrawlerMetrics = "GetCrawlerMetrics" // GetCrawlerMetricsRequest generates a "aws/request.Request" representing the // client's request for the GetCrawlerMetrics operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3579,7 +3690,7 @@ const opGetCrawlers = "GetCrawlers" // GetCrawlersRequest generates a "aws/request.Request" representing the // client's request for the GetCrawlers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3709,12 +3820,97 @@ func (c *Glue) GetCrawlersPagesWithContext(ctx aws.Context, input *GetCrawlersIn return p.Err() } +const opGetDataCatalogEncryptionSettings = "GetDataCatalogEncryptionSettings" + +// GetDataCatalogEncryptionSettingsRequest generates a "aws/request.Request" representing the +// client's request for the GetDataCatalogEncryptionSettings 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 GetDataCatalogEncryptionSettings for more information on using the GetDataCatalogEncryptionSettings +// 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 GetDataCatalogEncryptionSettingsRequest method. +// req, resp := client.GetDataCatalogEncryptionSettingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetDataCatalogEncryptionSettings +func (c *Glue) GetDataCatalogEncryptionSettingsRequest(input *GetDataCatalogEncryptionSettingsInput) (req *request.Request, output *GetDataCatalogEncryptionSettingsOutput) { + op := &request.Operation{ + Name: opGetDataCatalogEncryptionSettings, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetDataCatalogEncryptionSettingsInput{} + } + + output = &GetDataCatalogEncryptionSettingsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetDataCatalogEncryptionSettings API operation for AWS Glue. +// +// Retrieves the security configuration for a specified catalog. +// +// 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 Glue's +// API operation GetDataCatalogEncryptionSettings for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServiceException "InternalServiceException" +// An internal service error occurred. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The input provided was not valid. +// +// * ErrCodeOperationTimeoutException "OperationTimeoutException" +// The operation timed out. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetDataCatalogEncryptionSettings +func (c *Glue) GetDataCatalogEncryptionSettings(input *GetDataCatalogEncryptionSettingsInput) (*GetDataCatalogEncryptionSettingsOutput, error) { + req, out := c.GetDataCatalogEncryptionSettingsRequest(input) + return out, req.Send() +} + +// GetDataCatalogEncryptionSettingsWithContext is the same as GetDataCatalogEncryptionSettings with the addition of +// the ability to pass a context and additional request options. +// +// See GetDataCatalogEncryptionSettings 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 *Glue) GetDataCatalogEncryptionSettingsWithContext(ctx aws.Context, input *GetDataCatalogEncryptionSettingsInput, opts ...request.Option) (*GetDataCatalogEncryptionSettingsOutput, error) { + req, out := c.GetDataCatalogEncryptionSettingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetDatabase = "GetDatabase" // GetDatabaseRequest generates a "aws/request.Request" representing the // client's request for the GetDatabase operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3805,7 +4001,7 @@ const opGetDatabases = "GetDatabases" // GetDatabasesRequest generates a "aws/request.Request" representing the // client's request for the GetDatabases operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3949,7 +4145,7 @@ const opGetDataflowGraph = "GetDataflowGraph" // GetDataflowGraphRequest generates a "aws/request.Request" representing the // client's request for the GetDataflowGraph operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4034,7 +4230,7 @@ const opGetDevEndpoint = "GetDevEndpoint" // GetDevEndpointRequest generates a "aws/request.Request" representing the // client's request for the GetDevEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4075,6 +4271,11 @@ func (c *Glue) GetDevEndpointRequest(input *GetDevEndpointInput) (req *request.R // // Retrieves information about a specified DevEndpoint. // +// When you create a development endpoint in a virtual private cloud (VPC), +// AWS Glue returns only a private IP address, and the public IP address field +// is not populated. When you create a non-VPC development endpoint, AWS Glue +// returns only a public IP address. +// // 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. @@ -4122,7 +4323,7 @@ const opGetDevEndpoints = "GetDevEndpoints" // GetDevEndpointsRequest generates a "aws/request.Request" representing the // client's request for the GetDevEndpoints operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4169,6 +4370,11 @@ func (c *Glue) GetDevEndpointsRequest(input *GetDevEndpointsInput) (req *request // // Retrieves all the DevEndpoints in this AWS account. // +// When you create a development endpoint in a virtual private cloud (VPC), +// AWS Glue returns only a private IP address and the public IP address field +// is not populated. When you create a non-VPC development endpoint, AWS Glue +// returns only a public IP address. +// // 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. @@ -4266,7 +4472,7 @@ const opGetJob = "GetJob" // GetJobRequest generates a "aws/request.Request" representing the // client's request for the GetJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4354,7 +4560,7 @@ const opGetJobRun = "GetJobRun" // GetJobRunRequest generates a "aws/request.Request" representing the // client's request for the GetJobRun operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4442,7 +4648,7 @@ const opGetJobRuns = "GetJobRuns" // GetJobRunsRequest generates a "aws/request.Request" representing the // client's request for the GetJobRuns operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4586,7 +4792,7 @@ const opGetJobs = "GetJobs" // GetJobsRequest generates a "aws/request.Request" representing the // client's request for the GetJobs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4730,7 +4936,7 @@ const opGetMapping = "GetMapping" // GetMappingRequest generates a "aws/request.Request" representing the // client's request for the GetMapping operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4818,7 +5024,7 @@ const opGetPartition = "GetPartition" // GetPartitionRequest generates a "aws/request.Request" representing the // client's request for the GetPartition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4909,7 +5115,7 @@ const opGetPartitions = "GetPartitions" // GetPartitionsRequest generates a "aws/request.Request" representing the // client's request for the GetPartitions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5056,7 +5262,7 @@ const opGetPlan = "GetPlan" // GetPlanRequest generates a "aws/request.Request" representing the // client's request for the GetPlan operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5136,12 +5342,100 @@ func (c *Glue) GetPlanWithContext(ctx aws.Context, input *GetPlanInput, opts ... return out, req.Send() } +const opGetResourcePolicy = "GetResourcePolicy" + +// GetResourcePolicyRequest generates a "aws/request.Request" representing the +// client's request for the GetResourcePolicy 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 GetResourcePolicy for more information on using the GetResourcePolicy +// 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 GetResourcePolicyRequest method. +// req, resp := client.GetResourcePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetResourcePolicy +func (c *Glue) GetResourcePolicyRequest(input *GetResourcePolicyInput) (req *request.Request, output *GetResourcePolicyOutput) { + op := &request.Operation{ + Name: opGetResourcePolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetResourcePolicyInput{} + } + + output = &GetResourcePolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetResourcePolicy API operation for AWS Glue. +// +// Retrieves a specified resource policy. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Glue's +// API operation GetResourcePolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeEntityNotFoundException "EntityNotFoundException" +// A specified entity does not exist +// +// * ErrCodeInternalServiceException "InternalServiceException" +// An internal service error occurred. +// +// * ErrCodeOperationTimeoutException "OperationTimeoutException" +// The operation timed out. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The input provided was not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/GetResourcePolicy +func (c *Glue) GetResourcePolicy(input *GetResourcePolicyInput) (*GetResourcePolicyOutput, error) { + req, out := c.GetResourcePolicyRequest(input) + return out, req.Send() +} + +// GetResourcePolicyWithContext is the same as GetResourcePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See GetResourcePolicy 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 *Glue) GetResourcePolicyWithContext(ctx aws.Context, input *GetResourcePolicyInput, opts ...request.Option) (*GetResourcePolicyOutput, error) { + req, out := c.GetResourcePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetSecurityConfiguration = "GetSecurityConfiguration" // GetSecurityConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetSecurityConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5229,7 +5523,7 @@ const opGetSecurityConfigurations = "GetSecurityConfigurations" // GetSecurityConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the GetSecurityConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5317,7 +5611,7 @@ const opGetTable = "GetTable" // GetTableRequest generates a "aws/request.Request" representing the // client's request for the GetTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5408,7 +5702,7 @@ const opGetTableVersion = "GetTableVersion" // GetTableVersionRequest generates a "aws/request.Request" representing the // client's request for the GetTableVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5499,7 +5793,7 @@ const opGetTableVersions = "GetTableVersions" // GetTableVersionsRequest generates a "aws/request.Request" representing the // client's request for the GetTableVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5647,7 +5941,7 @@ const opGetTables = "GetTables" // GetTablesRequest generates a "aws/request.Request" representing the // client's request for the GetTables operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5794,7 +6088,7 @@ const opGetTrigger = "GetTrigger" // GetTriggerRequest generates a "aws/request.Request" representing the // client's request for the GetTrigger operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5882,7 +6176,7 @@ const opGetTriggers = "GetTriggers" // GetTriggersRequest generates a "aws/request.Request" representing the // client's request for the GetTriggers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6026,7 +6320,7 @@ const opGetUserDefinedFunction = "GetUserDefinedFunction" // GetUserDefinedFunctionRequest generates a "aws/request.Request" representing the // client's request for the GetUserDefinedFunction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6117,7 +6411,7 @@ const opGetUserDefinedFunctions = "GetUserDefinedFunctions" // GetUserDefinedFunctionsRequest generates a "aws/request.Request" representing the // client's request for the GetUserDefinedFunctions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6264,7 +6558,7 @@ const opImportCatalogToGlue = "ImportCatalogToGlue" // ImportCatalogToGlueRequest generates a "aws/request.Request" representing the // client's request for the ImportCatalogToGlue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6298,6 +6592,7 @@ func (c *Glue) ImportCatalogToGlueRequest(input *ImportCatalogToGlueInput) (req output = &ImportCatalogToGlueOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -6346,7 +6641,7 @@ const opPutDataCatalogEncryptionSettings = "PutDataCatalogEncryptionSettings" // PutDataCatalogEncryptionSettingsRequest generates a "aws/request.Request" representing the // client's request for the PutDataCatalogEncryptionSettings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6380,6 +6675,7 @@ func (c *Glue) PutDataCatalogEncryptionSettingsRequest(input *PutDataCatalogEncr output = &PutDataCatalogEncryptionSettingsOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -6428,12 +6724,103 @@ func (c *Glue) PutDataCatalogEncryptionSettingsWithContext(ctx aws.Context, inpu return out, req.Send() } +const opPutResourcePolicy = "PutResourcePolicy" + +// PutResourcePolicyRequest generates a "aws/request.Request" representing the +// client's request for the PutResourcePolicy 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 PutResourcePolicy for more information on using the PutResourcePolicy +// 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 PutResourcePolicyRequest method. +// req, resp := client.PutResourcePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/PutResourcePolicy +func (c *Glue) PutResourcePolicyRequest(input *PutResourcePolicyInput) (req *request.Request, output *PutResourcePolicyOutput) { + op := &request.Operation{ + Name: opPutResourcePolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutResourcePolicyInput{} + } + + output = &PutResourcePolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutResourcePolicy API operation for AWS Glue. +// +// Sets the Data Catalog resource policy for access control. +// +// 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 Glue's +// API operation PutResourcePolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeEntityNotFoundException "EntityNotFoundException" +// A specified entity does not exist +// +// * ErrCodeInternalServiceException "InternalServiceException" +// An internal service error occurred. +// +// * ErrCodeOperationTimeoutException "OperationTimeoutException" +// The operation timed out. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The input provided was not valid. +// +// * ErrCodeConditionCheckFailureException "ConditionCheckFailureException" +// A specified condition was not satisfied. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/PutResourcePolicy +func (c *Glue) PutResourcePolicy(input *PutResourcePolicyInput) (*PutResourcePolicyOutput, error) { + req, out := c.PutResourcePolicyRequest(input) + return out, req.Send() +} + +// PutResourcePolicyWithContext is the same as PutResourcePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See PutResourcePolicy 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 *Glue) PutResourcePolicyWithContext(ctx aws.Context, input *PutResourcePolicyInput, opts ...request.Option) (*PutResourcePolicyOutput, error) { + req, out := c.PutResourcePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opResetJobBookmark = "ResetJobBookmark" // ResetJobBookmarkRequest generates a "aws/request.Request" representing the // client's request for the ResetJobBookmark operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6521,7 +6908,7 @@ const opStartCrawler = "StartCrawler" // StartCrawlerRequest generates a "aws/request.Request" representing the // client's request for the StartCrawler operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6555,6 +6942,7 @@ func (c *Glue) StartCrawlerRequest(input *StartCrawlerInput) (req *request.Reque output = &StartCrawlerOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -6607,7 +6995,7 @@ const opStartCrawlerSchedule = "StartCrawlerSchedule" // StartCrawlerScheduleRequest generates a "aws/request.Request" representing the // client's request for the StartCrawlerSchedule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6641,6 +7029,7 @@ func (c *Glue) StartCrawlerScheduleRequest(input *StartCrawlerScheduleInput) (re output = &StartCrawlerScheduleOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -6699,7 +7088,7 @@ const opStartJobRun = "StartJobRun" // StartJobRunRequest generates a "aws/request.Request" representing the // client's request for the StartJobRun operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6793,7 +7182,7 @@ const opStartTrigger = "StartTrigger" // StartTriggerRequest generates a "aws/request.Request" representing the // client's request for the StartTrigger operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6888,7 +7277,7 @@ const opStopCrawler = "StopCrawler" // StopCrawlerRequest generates a "aws/request.Request" representing the // client's request for the StopCrawler operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6922,6 +7311,7 @@ func (c *Glue) StopCrawlerRequest(input *StopCrawlerInput) (req *request.Request output = &StopCrawlerOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -6976,7 +7366,7 @@ const opStopCrawlerSchedule = "StopCrawlerSchedule" // StopCrawlerScheduleRequest generates a "aws/request.Request" representing the // client's request for the StopCrawlerSchedule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7010,6 +7400,7 @@ func (c *Glue) StopCrawlerScheduleRequest(input *StopCrawlerScheduleInput) (req output = &StopCrawlerScheduleOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -7065,7 +7456,7 @@ const opStopTrigger = "StopTrigger" // StopTriggerRequest generates a "aws/request.Request" representing the // client's request for the StopTrigger operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7156,7 +7547,7 @@ const opUpdateClassifier = "UpdateClassifier" // UpdateClassifierRequest generates a "aws/request.Request" representing the // client's request for the UpdateClassifier operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7190,6 +7581,7 @@ func (c *Glue) UpdateClassifierRequest(input *UpdateClassifierInput) (req *reque output = &UpdateClassifierOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -7245,7 +7637,7 @@ const opUpdateConnection = "UpdateConnection" // UpdateConnectionRequest generates a "aws/request.Request" representing the // client's request for the UpdateConnection operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7279,6 +7671,7 @@ func (c *Glue) UpdateConnectionRequest(input *UpdateConnectionInput) (req *reque output = &UpdateConnectionOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -7336,7 +7729,7 @@ const opUpdateCrawler = "UpdateCrawler" // UpdateCrawlerRequest generates a "aws/request.Request" representing the // client's request for the UpdateCrawler operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7370,6 +7763,7 @@ func (c *Glue) UpdateCrawlerRequest(input *UpdateCrawlerInput) (req *request.Req output = &UpdateCrawlerOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -7428,7 +7822,7 @@ const opUpdateCrawlerSchedule = "UpdateCrawlerSchedule" // UpdateCrawlerScheduleRequest generates a "aws/request.Request" representing the // client's request for the UpdateCrawlerSchedule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7462,6 +7856,7 @@ func (c *Glue) UpdateCrawlerScheduleRequest(input *UpdateCrawlerScheduleInput) ( output = &UpdateCrawlerScheduleOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -7519,7 +7914,7 @@ const opUpdateDatabase = "UpdateDatabase" // UpdateDatabaseRequest generates a "aws/request.Request" representing the // client's request for the UpdateDatabase operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7553,6 +7948,7 @@ func (c *Glue) UpdateDatabaseRequest(input *UpdateDatabaseInput) (req *request.R output = &UpdateDatabaseOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -7610,7 +8006,7 @@ const opUpdateDevEndpoint = "UpdateDevEndpoint" // UpdateDevEndpointRequest generates a "aws/request.Request" representing the // client's request for the UpdateDevEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7644,6 +8040,7 @@ func (c *Glue) UpdateDevEndpointRequest(input *UpdateDevEndpointInput) (req *req output = &UpdateDevEndpointOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -7701,7 +8098,7 @@ const opUpdateJob = "UpdateJob" // UpdateJobRequest generates a "aws/request.Request" representing the // client's request for the UpdateJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7792,7 +8189,7 @@ const opUpdatePartition = "UpdatePartition" // UpdatePartitionRequest generates a "aws/request.Request" representing the // client's request for the UpdatePartition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7826,6 +8223,7 @@ func (c *Glue) UpdatePartitionRequest(input *UpdatePartitionInput) (req *request output = &UpdatePartitionOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -7883,7 +8281,7 @@ const opUpdateTable = "UpdateTable" // UpdateTableRequest generates a "aws/request.Request" representing the // client's request for the UpdateTable operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7917,6 +8315,7 @@ func (c *Glue) UpdateTableRequest(input *UpdateTableInput) (req *request.Request output = &UpdateTableOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -7980,7 +8379,7 @@ const opUpdateTrigger = "UpdateTrigger" // UpdateTriggerRequest generates a "aws/request.Request" representing the // client's request for the UpdateTrigger operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8071,7 +8470,7 @@ const opUpdateUserDefinedFunction = "UpdateUserDefinedFunction" // UpdateUserDefinedFunctionRequest generates a "aws/request.Request" representing the // client's request for the UpdateUserDefinedFunction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8105,6 +8504,7 @@ func (c *Glue) UpdateUserDefinedFunctionRequest(input *UpdateUserDefinedFunction output = &UpdateUserDefinedFunctionOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -8685,7 +9085,8 @@ type BatchDeleteTableVersionInput struct { // TableName is a required field TableName *string `min:"1" type:"string" required:"true"` - // A list of the IDs of versions to be deleted. + // A list of the IDs of versions to be deleted. A VersionId is a string representation + // of an integer. Each version is incremented by 1. // // VersionIds is a required field VersionIds []*string `type:"list" required:"true"` @@ -9602,10 +10003,15 @@ type Connection struct { // * PORT - The port number, between 1024 and 65535, of the port on which // the database host is listening for database connections. // - // * USER_NAME - The name under which to log in to the database. + // * USER_NAME - The name under which to log in to the database. The value + // string for USER_NAME is "USERNAME". // // * PASSWORD - A password, if one is used, for the user name. // + // * ENCRYPTED_PASSWORD - When you enable connection password protection + // by setting ConnectionPasswordEncryption in the Data Catalog encryption + // settings, this field stores the key you designate to encrypt the password. + // // * JDBC_DRIVER_JAR_URI - The S3 path of the a jar file that contains the // JDBC driver to use. // @@ -9803,21 +10209,93 @@ func (s *ConnectionInput) SetDescription(v string) *ConnectionInput { return s } -// SetMatchCriteria sets the MatchCriteria field's value. -func (s *ConnectionInput) SetMatchCriteria(v []*string) *ConnectionInput { - s.MatchCriteria = v - return s +// SetMatchCriteria sets the MatchCriteria field's value. +func (s *ConnectionInput) SetMatchCriteria(v []*string) *ConnectionInput { + s.MatchCriteria = v + return s +} + +// SetName sets the Name field's value. +func (s *ConnectionInput) SetName(v string) *ConnectionInput { + s.Name = &v + return s +} + +// SetPhysicalConnectionRequirements sets the PhysicalConnectionRequirements field's value. +func (s *ConnectionInput) SetPhysicalConnectionRequirements(v *PhysicalConnectionRequirements) *ConnectionInput { + s.PhysicalConnectionRequirements = v + return s +} + +// The data structure used by the Data Catalog to encrypt the password as part +// of CreateConnection or UpdateConnection and store it in the ENCRYPTED_PASSWORD +// field in the connection properties. You can enable catalog encryption or +// only password encryption. +// +// When a CreationConnection request arrives containing a password, the Data +// Catalog first encrypts the password using your KMS key, and then encrypts +// the whole connection object again if catalog encryption is also enabled. +// +// This encryption requires that you set KMS key permissions to enable or restrict +// access on the password key according to your security requirements. For example, +// you may want only admin users to have decrypt permission on the password +// key. +type ConnectionPasswordEncryption struct { + _ struct{} `type:"structure"` + + // A KMS key used to protect access to the JDBC source. + // + // All users in your account should be granted the kms:encrypt permission to + // encrypt passwords before storing them in the Data Catalog (through the AWS + // Glue CreateConnection operation). + // + // The decrypt permission should be granted only to KMS key admins and IAM roles + // designated for AWS Glue crawlers. + AwsKmsKeyId *string `min:"1" type:"string"` + + // When the ReturnConnectionPasswordEncrypted flag is set to "true", passwords + // remain encrypted in the responses of GetConnection and GetConnections. This + // encryption takes effect independently from catalog encryption. + // + // ReturnConnectionPasswordEncrypted is a required field + ReturnConnectionPasswordEncrypted *bool `type:"boolean" required:"true"` +} + +// String returns the string representation +func (s ConnectionPasswordEncryption) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConnectionPasswordEncryption) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ConnectionPasswordEncryption) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ConnectionPasswordEncryption"} + if s.AwsKmsKeyId != nil && len(*s.AwsKmsKeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AwsKmsKeyId", 1)) + } + if s.ReturnConnectionPasswordEncrypted == nil { + invalidParams.Add(request.NewErrParamRequired("ReturnConnectionPasswordEncrypted")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetName sets the Name field's value. -func (s *ConnectionInput) SetName(v string) *ConnectionInput { - s.Name = &v +// SetAwsKmsKeyId sets the AwsKmsKeyId field's value. +func (s *ConnectionPasswordEncryption) SetAwsKmsKeyId(v string) *ConnectionPasswordEncryption { + s.AwsKmsKeyId = &v return s } -// SetPhysicalConnectionRequirements sets the PhysicalConnectionRequirements field's value. -func (s *ConnectionInput) SetPhysicalConnectionRequirements(v *PhysicalConnectionRequirements) *ConnectionInput { - s.PhysicalConnectionRequirements = v +// SetReturnConnectionPasswordEncrypted sets the ReturnConnectionPasswordEncrypted field's value. +func (s *ConnectionPasswordEncryption) SetReturnConnectionPasswordEncrypted(v bool) *ConnectionPasswordEncryption { + s.ReturnConnectionPasswordEncrypted = &v return s } @@ -9855,15 +10333,8 @@ type Crawler struct { Classifiers []*string `type:"list"` // Crawler configuration information. This versioned JSON string allows users - // to specify aspects of a Crawler's behavior. - // - // You can use this field to force partitions to inherit metadata such as classification, - // input format, output format, serde information, and schema from their parent - // table, rather than detect this information separately for each partition. - // Use the following JSON string to specify that behavior: - // - // Example: '{ "Version": 1.0, "CrawlerOutput": { "Partitions": { "AddOrUpdateBehavior": - // "InheritFromTable" } } }' + // to specify aspects of a crawler's behavior. For more information, see Configuring + // a Crawler (http://docs.aws.amazon.com/glue/latest/dg/crawler-configuration.html). Configuration *string `type:"string"` // If the crawler is running, contains the total time elapsed since the last @@ -10316,15 +10787,8 @@ type CreateCrawlerInput struct { Classifiers []*string `type:"list"` // Crawler configuration information. This versioned JSON string allows users - // to specify aspects of a Crawler's behavior. - // - // You can use this field to force partitions to inherit metadata such as classification, - // input format, output format, serde information, and schema from their parent - // table, rather than detect this information separately for each partition. - // Use the following JSON string to specify that behavior: - // - // Example: '{ "Version": 1.0, "CrawlerOutput": { "Partitions": { "AddOrUpdateBehavior": - // "InheritFromTable" } } }' + // to specify aspects of a crawler's behavior. For more information, see Configuring + // a Crawler (http://docs.aws.amazon.com/glue/latest/dg/crawler-configuration.html). Configuration *string `type:"string"` // The name of the SecurityConfiguration structure to be used by this Crawler. @@ -11891,6 +12355,12 @@ func (s *CreateXMLClassifierRequest) SetRowTag(v string) *CreateXMLClassifierReq type DataCatalogEncryptionSettings struct { _ struct{} `type:"structure"` + // When password protection is enabled, the Data Catalog uses a customer-provided + // key to encrypt the password as part of CreateConnection or UpdateConnection + // and store it in the ENCRYPTED_PASSWORD field in the connection properties. + // You can enable catalog encryption or only password encryption. + ConnectionPasswordEncryption *ConnectionPasswordEncryption `type:"structure"` + // Specifies encryption-at-rest configuration for the Data Catalog. EncryptionAtRest *EncryptionAtRest `type:"structure"` } @@ -11908,6 +12378,11 @@ func (s DataCatalogEncryptionSettings) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *DataCatalogEncryptionSettings) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DataCatalogEncryptionSettings"} + if s.ConnectionPasswordEncryption != nil { + if err := s.ConnectionPasswordEncryption.Validate(); err != nil { + invalidParams.AddNested("ConnectionPasswordEncryption", err.(request.ErrInvalidParams)) + } + } if s.EncryptionAtRest != nil { if err := s.EncryptionAtRest.Validate(); err != nil { invalidParams.AddNested("EncryptionAtRest", err.(request.ErrInvalidParams)) @@ -11920,6 +12395,12 @@ func (s *DataCatalogEncryptionSettings) Validate() error { return nil } +// SetConnectionPasswordEncryption sets the ConnectionPasswordEncryption field's value. +func (s *DataCatalogEncryptionSettings) SetConnectionPasswordEncryption(v *ConnectionPasswordEncryption) *DataCatalogEncryptionSettings { + s.ConnectionPasswordEncryption = v + return s +} + // SetEncryptionAtRest sets the EncryptionAtRest field's value. func (s *DataCatalogEncryptionSettings) SetEncryptionAtRest(v *EncryptionAtRest) *DataCatalogEncryptionSettings { s.EncryptionAtRest = v @@ -12525,6 +13006,56 @@ func (s DeletePartitionOutput) GoString() string { return s.String() } +type DeleteResourcePolicyInput struct { + _ struct{} `type:"structure"` + + // The hash value returned when this policy was set. + PolicyHashCondition *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DeleteResourcePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteResourcePolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteResourcePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteResourcePolicyInput"} + if s.PolicyHashCondition != nil && len(*s.PolicyHashCondition) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyHashCondition", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPolicyHashCondition sets the PolicyHashCondition field's value. +func (s *DeleteResourcePolicyInput) SetPolicyHashCondition(v string) *DeleteResourcePolicyInput { + s.PolicyHashCondition = &v + return s +} + +type DeleteResourcePolicyOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteResourcePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteResourcePolicyOutput) GoString() string { + return s.String() +} + type DeleteSecurityConfigurationInput struct { _ struct{} `type:"structure"` @@ -12685,7 +13216,8 @@ type DeleteTableVersionInput struct { // TableName is a required field TableName *string `min:"1" type:"string" required:"true"` - // The ID of the table version to be deleted. + // The ID of the table version to be deleted. A VersionID is a string representation + // of an integer. Each version is incremented by 1. // // VersionId is a required field VersionId *string `min:"1" type:"string" required:"true"` @@ -12960,11 +13492,13 @@ type DevEndpoint struct { // The number of AWS Glue Data Processing Units (DPUs) allocated to this DevEndpoint. NumberOfNodes *int64 `type:"integer"` - // A private DNS to access the DevEndpoint within a VPC, if the DevEndpoint - // is created within one. + // A private IP address to access the DevEndpoint within a VPC, if the DevEndpoint + // is created within one. The PrivateAddress field is present only when you + // create the DevEndpoint within your virtual private cloud (VPC). PrivateAddress *string `type:"string"` - // The public VPC address used by this DevEndpoint. + // The public IP address used by this DevEndpoint. The PublicAddress field is + // present only when you create a non-VPC (virtual private cloud) DevEndpoint. PublicAddress *string `type:"string"` // The public key to be used by this DevEndpoint for authentication. This attribute @@ -13570,6 +14104,14 @@ type GetConnectionInput struct { // the AWS account ID is used by default. CatalogId *string `min:"1" type:"string"` + // Allow you to retrieve the connection metadata without displaying the password. + // For instance, the AWS Glue console uses this flag to retrieve connections, + // since the console does not display passwords. Set this parameter where the + // caller may not have permission to use the KMS key to decrypt the password, + // but does have permission to access the rest of the connection metadata (that + // is, the other connection properties). + HidePassword *bool `type:"boolean"` + // The name of the connection definition to retrieve. // // Name is a required field @@ -13611,6 +14153,12 @@ func (s *GetConnectionInput) SetCatalogId(v string) *GetConnectionInput { return s } +// SetHidePassword sets the HidePassword field's value. +func (s *GetConnectionInput) SetHidePassword(v bool) *GetConnectionInput { + s.HidePassword = &v + return s +} + // SetName sets the Name field's value. func (s *GetConnectionInput) SetName(v string) *GetConnectionInput { s.Name = &v @@ -13685,6 +14233,14 @@ type GetConnectionsInput struct { // A filter that controls which connections will be returned. Filter *GetConnectionsFilter `type:"structure"` + // Allow you to retrieve the connection metadata without displaying the password. + // For instance, the AWS Glue console uses this flag to retrieve connections, + // since the console does not display passwords. Set this parameter where the + // caller may not have permission to use the KMS key to decrypt the password, + // but does have permission to access the rest of the connection metadata (that + // is, the other connection properties). + HidePassword *bool `type:"boolean"` + // The maximum number of connections to return in one response. MaxResults *int64 `min:"1" type:"integer"` @@ -13730,6 +14286,12 @@ func (s *GetConnectionsInput) SetFilter(v *GetConnectionsFilter) *GetConnections return s } +// SetHidePassword sets the HidePassword field's value. +func (s *GetConnectionsInput) SetHidePassword(v bool) *GetConnectionsInput { + s.HidePassword = &v + return s +} + // SetMaxResults sets the MaxResults field's value. func (s *GetConnectionsInput) SetMaxResults(v int64) *GetConnectionsInput { s.MaxResults = &v @@ -14004,6 +14566,66 @@ func (s *GetCrawlersOutput) SetNextToken(v string) *GetCrawlersOutput { return s } +type GetDataCatalogEncryptionSettingsInput struct { + _ struct{} `type:"structure"` + + // The ID of the Data Catalog for which to retrieve the security configuration. + // If none is supplied, the AWS account ID is used by default. + CatalogId *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s GetDataCatalogEncryptionSettingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDataCatalogEncryptionSettingsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetDataCatalogEncryptionSettingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDataCatalogEncryptionSettingsInput"} + if s.CatalogId != nil && len(*s.CatalogId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CatalogId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCatalogId sets the CatalogId field's value. +func (s *GetDataCatalogEncryptionSettingsInput) SetCatalogId(v string) *GetDataCatalogEncryptionSettingsInput { + s.CatalogId = &v + return s +} + +type GetDataCatalogEncryptionSettingsOutput struct { + _ struct{} `type:"structure"` + + // The requested security configuration. + DataCatalogEncryptionSettings *DataCatalogEncryptionSettings `type:"structure"` +} + +// String returns the string representation +func (s GetDataCatalogEncryptionSettingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDataCatalogEncryptionSettingsOutput) GoString() string { + return s.String() +} + +// SetDataCatalogEncryptionSettings sets the DataCatalogEncryptionSettings field's value. +func (s *GetDataCatalogEncryptionSettingsOutput) SetDataCatalogEncryptionSettings(v *DataCatalogEncryptionSettings) *GetDataCatalogEncryptionSettingsOutput { + s.DataCatalogEncryptionSettings = v + return s +} + type GetDatabaseInput struct { _ struct{} `type:"structure"` @@ -14915,6 +15537,76 @@ type GetPartitionsInput struct { DatabaseName *string `min:"1" type:"string" required:"true"` // An expression filtering the partitions to be returned. + // + // The expression uses SQL syntax similar to the SQL WHERE filter clause. The + // SQL statement parser JSQLParser (http://jsqlparser.sourceforge.net/home.php) + // parses the expression. + // + // Operators: The following are the operators that you can use in the Expression + // API call: + // + // =Checks if the values of the two operands are equal or not; if yes, then + // the condition becomes true. + // + // Example: Assume 'variable a' holds 10 and 'variable b' holds 20. + // + // (a = b) is not true. + // + // < >Checks if the values of two operands are equal or not; if the values are + // not equal, then the condition becomes true. + // + // Example: (a < > b) is true. + // + // >Checks if the value of the left operand is greater than the value of the + // right operand; if yes, then the condition becomes true. + // + // Example: (a > b) is not true. + // + // =Checks if the value of the left operand is greater than or equal to the + // value of the right operand; if yes, then the condition becomes true. + // + // Example: (a >= b) is not true. + // + // <=Checks if the value of the left operand is less than or equal to the value + // of the right operand; if yes, then the condition becomes true. + // + // Example: (a <= b) is true. + // + // AND, OR, IN, BETWEEN, LIKE, NOT, IS NULLLogical operators. + // + // Supported Partition Key Types: The following are the the supported partition + // keys. + // + // * string + // + // * date + // + // * timestamp + // + // * int + // + // * bigint + // + // * long + // + // * tinyint + // + // * smallint + // + // * decimal + // + // If an invalid type is encountered, an exception is thrown. + // + // The following list shows the valid operators on each type. When you define + // a crawler, the partitionKey type is created as a STRING, to be compatible + // with the catalog partitions. + // + // Sample API Call: Expression *string `type:"string"` // The maximum number of partitions to return in a single response. @@ -15181,6 +15873,70 @@ func (s *GetPlanOutput) SetScalaCode(v string) *GetPlanOutput { return s } +type GetResourcePolicyInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s GetResourcePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetResourcePolicyInput) GoString() string { + return s.String() +} + +type GetResourcePolicyOutput struct { + _ struct{} `type:"structure"` + + // The date and time at which the policy was created. + CreateTime *time.Time `type:"timestamp"` + + // Contains the hash value associated with this policy. + PolicyHash *string `min:"1" type:"string"` + + // Contains the requested policy document, in JSON format. + PolicyInJson *string `min:"2" type:"string"` + + // The date and time at which the policy was last updated. + UpdateTime *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s GetResourcePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetResourcePolicyOutput) GoString() string { + return s.String() +} + +// SetCreateTime sets the CreateTime field's value. +func (s *GetResourcePolicyOutput) SetCreateTime(v time.Time) *GetResourcePolicyOutput { + s.CreateTime = &v + return s +} + +// SetPolicyHash sets the PolicyHash field's value. +func (s *GetResourcePolicyOutput) SetPolicyHash(v string) *GetResourcePolicyOutput { + s.PolicyHash = &v + return s +} + +// SetPolicyInJson sets the PolicyInJson field's value. +func (s *GetResourcePolicyOutput) SetPolicyInJson(v string) *GetResourcePolicyOutput { + s.PolicyInJson = &v + return s +} + +// SetUpdateTime sets the UpdateTime field's value. +func (s *GetResourcePolicyOutput) SetUpdateTime(v time.Time) *GetResourcePolicyOutput { + s.UpdateTime = &v + return s +} + type GetSecurityConfigurationInput struct { _ struct{} `type:"structure"` @@ -15436,7 +16192,8 @@ type GetTableVersionInput struct { // TableName is a required field TableName *string `min:"1" type:"string" required:"true"` - // The ID value of the table version to be retrieved. + // The ID value of the table version to be retrieved. A VersionID is a string + // representation of an integer. Each version is incremented by 1. VersionId *string `min:"1" type:"string"` } @@ -17817,6 +18574,96 @@ func (s PutDataCatalogEncryptionSettingsOutput) GoString() string { return s.String() } +type PutResourcePolicyInput struct { + _ struct{} `type:"structure"` + + // A value of MUST_EXIST is used to update a policy. A value of NOT_EXIST is + // used to create a new policy. If a value of NONE or a null value is used, + // the call will not depend on the existence of a policy. + PolicyExistsCondition *string `type:"string" enum:"ExistCondition"` + + // This is the hash value returned when the previous policy was set using PutResourcePolicy. + // Its purpose is to prevent concurrent modifications of a policy. Do not use + // this parameter if no previous policy has been set. + PolicyHashCondition *string `min:"1" type:"string"` + + // Contains the policy document to set, in JSON format. + // + // PolicyInJson is a required field + PolicyInJson *string `min:"2" type:"string" required:"true"` +} + +// String returns the string representation +func (s PutResourcePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutResourcePolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutResourcePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutResourcePolicyInput"} + if s.PolicyHashCondition != nil && len(*s.PolicyHashCondition) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyHashCondition", 1)) + } + if s.PolicyInJson == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyInJson")) + } + if s.PolicyInJson != nil && len(*s.PolicyInJson) < 2 { + invalidParams.Add(request.NewErrParamMinLen("PolicyInJson", 2)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPolicyExistsCondition sets the PolicyExistsCondition field's value. +func (s *PutResourcePolicyInput) SetPolicyExistsCondition(v string) *PutResourcePolicyInput { + s.PolicyExistsCondition = &v + return s +} + +// SetPolicyHashCondition sets the PolicyHashCondition field's value. +func (s *PutResourcePolicyInput) SetPolicyHashCondition(v string) *PutResourcePolicyInput { + s.PolicyHashCondition = &v + return s +} + +// SetPolicyInJson sets the PolicyInJson field's value. +func (s *PutResourcePolicyInput) SetPolicyInJson(v string) *PutResourcePolicyInput { + s.PolicyInJson = &v + return s +} + +type PutResourcePolicyOutput struct { + _ struct{} `type:"structure"` + + // A hash of the policy that has just been set. This must be included in a subsequent + // call that overwrites or updates this policy. + PolicyHash *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s PutResourcePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutResourcePolicyOutput) GoString() string { + return s.String() +} + +// SetPolicyHash sets the PolicyHash field's value. +func (s *PutResourcePolicyOutput) SetPolicyHash(v string) *PutResourcePolicyOutput { + s.PolicyHash = &v + return s +} + type ResetJobBookmarkInput struct { _ struct{} `type:"structure"` @@ -18964,6 +19811,11 @@ type Table struct { // A list of columns by which the table is partitioned. Only primitive types // are supported as partition keys. + // + // When creating a table used by Athena, and you do not specify any partitionKeys, + // you must at least set the value of partitionKeys to an empty list. For example: + // + // "PartitionKeys": [] PartitionKeys []*Column `type:"list"` // Retention time for this table. @@ -19152,6 +20004,11 @@ type TableInput struct { // A list of columns by which the table is partitioned. Only primitive types // are supported as partition keys. + // + // When creating a table used by Athena, and you do not specify any partitionKeys, + // you must at least set the value of partitionKeys to an empty list. For example: + // + // "PartitionKeys": [] PartitionKeys []*Column `type:"list"` // Retention time for this table. @@ -19294,7 +20151,8 @@ type TableVersion struct { // The table in question Table *Table `type:"structure"` - // The ID value that identifies this table version. + // The ID value that identifies this table version. A VersionId is a string + // representation of an integer. Each version is incremented by 1. VersionId *string `min:"1" type:"string"` } @@ -19330,7 +20188,8 @@ type TableVersionError struct { // The name of the table in question. TableName *string `min:"1" type:"string"` - // The ID value of the version in question. + // The ID value of the version in question. A VersionID is a string representation + // of an integer. Each version is incremented by 1. VersionId *string `min:"1" type:"string"` } @@ -19720,15 +20579,8 @@ type UpdateCrawlerInput struct { Classifiers []*string `type:"list"` // Crawler configuration information. This versioned JSON string allows users - // to specify aspects of a Crawler's behavior. - // - // You can use this field to force partitions to inherit metadata such as classification, - // input format, output format, serde information, and schema from their parent - // table, rather than detect this information separately for each partition. - // Use the following JSON string to specify that behavior: - // - // Example: '{ "Version": 1.0, "CrawlerOutput": { "Partitions": { "AddOrUpdateBehavior": - // "InheritFromTable" } } }' + // to specify aspects of a crawler's behavior. For more information, see Configuring + // a Crawler (http://docs.aws.amazon.com/glue/latest/dg/crawler-configuration.html). Configuration *string `type:"string"` // The name of the SecurityConfiguration structure to be used by this Crawler. @@ -21066,6 +21918,9 @@ const ( // ConnectionPropertyKeyPassword is a ConnectionPropertyKey enum value ConnectionPropertyKeyPassword = "PASSWORD" + // ConnectionPropertyKeyEncryptedPassword is a ConnectionPropertyKey enum value + ConnectionPropertyKeyEncryptedPassword = "ENCRYPTED_PASSWORD" + // ConnectionPropertyKeyJdbcDriverJarUri is a ConnectionPropertyKey enum value ConnectionPropertyKeyJdbcDriverJarUri = "JDBC_DRIVER_JAR_URI" @@ -21121,6 +21976,17 @@ const ( DeleteBehaviorDeprecateInDatabase = "DEPRECATE_IN_DATABASE" ) +const ( + // ExistConditionMustExist is a ExistCondition enum value + ExistConditionMustExist = "MUST_EXIST" + + // ExistConditionNotExist is a ExistCondition enum value + ExistConditionNotExist = "NOT_EXIST" + + // ExistConditionNone is a ExistCondition enum value + ExistConditionNone = "NONE" +) + const ( // JobBookmarksEncryptionModeDisabled is a JobBookmarksEncryptionMode enum value JobBookmarksEncryptionModeDisabled = "DISABLED" diff --git a/vendor/github.com/aws/aws-sdk-go/service/glue/errors.go b/vendor/github.com/aws/aws-sdk-go/service/glue/errors.go index 6de7b4f0e7..a1e9b4d4d6 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/glue/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/glue/errors.go @@ -28,6 +28,12 @@ const ( // Too many jobs are being run concurrently. ErrCodeConcurrentRunsExceededException = "ConcurrentRunsExceededException" + // ErrCodeConditionCheckFailureException for service response error code + // "ConditionCheckFailureException". + // + // A specified condition was not satisfied. + ErrCodeConditionCheckFailureException = "ConditionCheckFailureException" + // ErrCodeCrawlerNotRunningException for service response error code // "CrawlerNotRunningException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go b/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go index b8cc0dc00f..59239f04d8 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/guardduty/api.go @@ -8,6 +8,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "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 opAcceptInvitation = "AcceptInvitation" @@ -15,7 +17,7 @@ const opAcceptInvitation = "AcceptInvitation" // AcceptInvitationRequest generates a "aws/request.Request" representing the // client's request for the AcceptInvitation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -49,6 +51,7 @@ func (c *GuardDuty) AcceptInvitationRequest(input *AcceptInvitationInput) (req * output = &AcceptInvitationOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -97,7 +100,7 @@ const opArchiveFindings = "ArchiveFindings" // ArchiveFindingsRequest generates a "aws/request.Request" representing the // client's request for the ArchiveFindings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -131,6 +134,7 @@ func (c *GuardDuty) ArchiveFindingsRequest(input *ArchiveFindingsInput) (req *re output = &ArchiveFindingsOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -179,7 +183,7 @@ const opCreateDetector = "CreateDetector" // CreateDetectorRequest generates a "aws/request.Request" representing the // client's request for the CreateDetector operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -263,7 +267,7 @@ const opCreateFilter = "CreateFilter" // CreateFilterRequest generates a "aws/request.Request" representing the // client's request for the CreateFilter operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -345,7 +349,7 @@ const opCreateIPSet = "CreateIPSet" // CreateIPSetRequest generates a "aws/request.Request" representing the // client's request for the CreateIPSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -428,7 +432,7 @@ const opCreateMembers = "CreateMembers" // CreateMembersRequest generates a "aws/request.Request" representing the // client's request for the CreateMembers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -512,7 +516,7 @@ const opCreateSampleFindings = "CreateSampleFindings" // CreateSampleFindingsRequest generates a "aws/request.Request" representing the // client's request for the CreateSampleFindings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -546,6 +550,7 @@ func (c *GuardDuty) CreateSampleFindingsRequest(input *CreateSampleFindingsInput output = &CreateSampleFindingsOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -596,7 +601,7 @@ const opCreateThreatIntelSet = "CreateThreatIntelSet" // CreateThreatIntelSetRequest generates a "aws/request.Request" representing the // client's request for the CreateThreatIntelSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -679,7 +684,7 @@ const opDeclineInvitations = "DeclineInvitations" // DeclineInvitationsRequest generates a "aws/request.Request" representing the // client's request for the DeclineInvitations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -762,7 +767,7 @@ const opDeleteDetector = "DeleteDetector" // DeleteDetectorRequest generates a "aws/request.Request" representing the // client's request for the DeleteDetector operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -796,6 +801,7 @@ func (c *GuardDuty) DeleteDetectorRequest(input *DeleteDetectorInput) (req *requ output = &DeleteDetectorOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -844,7 +850,7 @@ const opDeleteFilter = "DeleteFilter" // DeleteFilterRequest generates a "aws/request.Request" representing the // client's request for the DeleteFilter operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -878,6 +884,7 @@ func (c *GuardDuty) DeleteFilterRequest(input *DeleteFilterInput) (req *request. output = &DeleteFilterOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -926,7 +933,7 @@ const opDeleteIPSet = "DeleteIPSet" // DeleteIPSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteIPSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -960,6 +967,7 @@ func (c *GuardDuty) DeleteIPSetRequest(input *DeleteIPSetInput) (req *request.Re output = &DeleteIPSetOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1008,7 +1016,7 @@ const opDeleteInvitations = "DeleteInvitations" // DeleteInvitationsRequest generates a "aws/request.Request" representing the // client's request for the DeleteInvitations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1091,7 +1099,7 @@ const opDeleteMembers = "DeleteMembers" // DeleteMembersRequest generates a "aws/request.Request" representing the // client's request for the DeleteMembers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1174,7 +1182,7 @@ const opDeleteThreatIntelSet = "DeleteThreatIntelSet" // DeleteThreatIntelSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteThreatIntelSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1208,6 +1216,7 @@ func (c *GuardDuty) DeleteThreatIntelSetRequest(input *DeleteThreatIntelSetInput output = &DeleteThreatIntelSetOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1256,7 +1265,7 @@ const opDisassociateFromMasterAccount = "DisassociateFromMasterAccount" // DisassociateFromMasterAccountRequest generates a "aws/request.Request" representing the // client's request for the DisassociateFromMasterAccount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1290,6 +1299,7 @@ func (c *GuardDuty) DisassociateFromMasterAccountRequest(input *DisassociateFrom output = &DisassociateFromMasterAccountOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1338,7 +1348,7 @@ const opDisassociateMembers = "DisassociateMembers" // DisassociateMembersRequest generates a "aws/request.Request" representing the // client's request for the DisassociateMembers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1421,7 +1431,7 @@ const opGetDetector = "GetDetector" // GetDetectorRequest generates a "aws/request.Request" representing the // client's request for the GetDetector operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1503,7 +1513,7 @@ const opGetFilter = "GetFilter" // GetFilterRequest generates a "aws/request.Request" representing the // client's request for the GetFilter operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1585,7 +1595,7 @@ const opGetFindings = "GetFindings" // GetFindingsRequest generates a "aws/request.Request" representing the // client's request for the GetFindings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1667,7 +1677,7 @@ const opGetFindingsStatistics = "GetFindingsStatistics" // GetFindingsStatisticsRequest generates a "aws/request.Request" representing the // client's request for the GetFindingsStatistics operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1749,7 +1759,7 @@ const opGetIPSet = "GetIPSet" // GetIPSetRequest generates a "aws/request.Request" representing the // client's request for the GetIPSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1831,7 +1841,7 @@ const opGetInvitationsCount = "GetInvitationsCount" // GetInvitationsCountRequest generates a "aws/request.Request" representing the // client's request for the GetInvitationsCount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1914,7 +1924,7 @@ const opGetMasterAccount = "GetMasterAccount" // GetMasterAccountRequest generates a "aws/request.Request" representing the // client's request for the GetMasterAccount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1997,7 +2007,7 @@ const opGetMembers = "GetMembers" // GetMembersRequest generates a "aws/request.Request" representing the // client's request for the GetMembers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2080,7 +2090,7 @@ const opGetThreatIntelSet = "GetThreatIntelSet" // GetThreatIntelSetRequest generates a "aws/request.Request" representing the // client's request for the GetThreatIntelSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2162,7 +2172,7 @@ const opInviteMembers = "InviteMembers" // InviteMembersRequest generates a "aws/request.Request" representing the // client's request for the InviteMembers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2247,7 +2257,7 @@ const opListDetectors = "ListDetectors" // ListDetectorsRequest generates a "aws/request.Request" representing the // client's request for the ListDetectors operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2385,7 +2395,7 @@ const opListFilters = "ListFilters" // ListFiltersRequest generates a "aws/request.Request" representing the // client's request for the ListFilters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2523,7 +2533,7 @@ const opListFindings = "ListFindings" // ListFindingsRequest generates a "aws/request.Request" representing the // client's request for the ListFindings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2661,7 +2671,7 @@ const opListIPSets = "ListIPSets" // ListIPSetsRequest generates a "aws/request.Request" representing the // client's request for the ListIPSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2799,7 +2809,7 @@ const opListInvitations = "ListInvitations" // ListInvitationsRequest generates a "aws/request.Request" representing the // client's request for the ListInvitations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2938,7 +2948,7 @@ const opListMembers = "ListMembers" // ListMembersRequest generates a "aws/request.Request" representing the // client's request for the ListMembers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3077,7 +3087,7 @@ const opListThreatIntelSets = "ListThreatIntelSets" // ListThreatIntelSetsRequest generates a "aws/request.Request" representing the // client's request for the ListThreatIntelSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3216,7 +3226,7 @@ const opStartMonitoringMembers = "StartMonitoringMembers" // StartMonitoringMembersRequest generates a "aws/request.Request" representing the // client's request for the StartMonitoringMembers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3300,7 +3310,7 @@ const opStopMonitoringMembers = "StopMonitoringMembers" // StopMonitoringMembersRequest generates a "aws/request.Request" representing the // client's request for the StopMonitoringMembers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3385,7 +3395,7 @@ const opUnarchiveFindings = "UnarchiveFindings" // UnarchiveFindingsRequest generates a "aws/request.Request" representing the // client's request for the UnarchiveFindings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3419,6 +3429,7 @@ func (c *GuardDuty) UnarchiveFindingsRequest(input *UnarchiveFindingsInput) (req output = &UnarchiveFindingsOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3467,7 +3478,7 @@ const opUpdateDetector = "UpdateDetector" // UpdateDetectorRequest generates a "aws/request.Request" representing the // client's request for the UpdateDetector operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3501,6 +3512,7 @@ func (c *GuardDuty) UpdateDetectorRequest(input *UpdateDetectorInput) (req *requ output = &UpdateDetectorOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3549,7 +3561,7 @@ const opUpdateFilter = "UpdateFilter" // UpdateFilterRequest generates a "aws/request.Request" representing the // client's request for the UpdateFilter operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3631,7 +3643,7 @@ const opUpdateFindingsFeedback = "UpdateFindingsFeedback" // UpdateFindingsFeedbackRequest generates a "aws/request.Request" representing the // client's request for the UpdateFindingsFeedback operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3665,6 +3677,7 @@ func (c *GuardDuty) UpdateFindingsFeedbackRequest(input *UpdateFindingsFeedbackI output = &UpdateFindingsFeedbackOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3713,7 +3726,7 @@ const opUpdateIPSet = "UpdateIPSet" // UpdateIPSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateIPSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3747,6 +3760,7 @@ func (c *GuardDuty) UpdateIPSetRequest(input *UpdateIPSetInput) (req *request.Re output = &UpdateIPSetOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3795,7 +3809,7 @@ const opUpdateThreatIntelSet = "UpdateThreatIntelSet" // UpdateThreatIntelSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateThreatIntelSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3829,6 +3843,7 @@ func (c *GuardDuty) UpdateThreatIntelSetRequest(input *UpdateThreatIntelSetInput output = &UpdateThreatIntelSetOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3880,10 +3895,14 @@ type AcceptInvitationInput struct { DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` // This value is used to validate the master account to the member account. - InvitationId *string `locationName:"invitationId" type:"string"` + // + // InvitationId is a required field + InvitationId *string `locationName:"invitationId" type:"string" required:"true"` // The account ID of the master GuardDuty account whose invitation you're accepting. - MasterId *string `locationName:"masterId" type:"string"` + // + // MasterId is a required field + MasterId *string `locationName:"masterId" type:"string" required:"true"` } // String returns the string representation @@ -3902,6 +3921,15 @@ func (s *AcceptInvitationInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } + if s.InvitationId == nil { + invalidParams.Add(request.NewErrParamRequired("InvitationId")) + } + if s.MasterId == nil { + invalidParams.Add(request.NewErrParamRequired("MasterId")) + } if invalidParams.Len() > 0 { return invalidParams @@ -4114,7 +4142,9 @@ type ArchiveFindingsInput struct { DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` // IDs of the findings that you want to archive. - FindingIds []*string `locationName:"findingIds" type:"list"` + // + // FindingIds is a required field + FindingIds []*string `locationName:"findingIds" type:"list" required:"true"` } // String returns the string representation @@ -4133,6 +4163,12 @@ func (s *ArchiveFindingsInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } + if s.FindingIds == nil { + invalidParams.Add(request.NewErrParamRequired("FindingIds")) + } if invalidParams.Len() > 0 { return invalidParams @@ -4363,8 +4399,16 @@ func (s *Country) SetCountryName(v string) *Country { type CreateDetectorInput struct { _ struct{} `type:"structure"` + // The idempotency token for the create request. + ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` + // A boolean value that specifies whether the detector is to be enabled. - Enable *bool `locationName:"enable" type:"boolean"` + // + // Enable is a required field + Enable *bool `locationName:"enable" type:"boolean" required:"true"` + + // A enum value that specifies how frequently customer got Finding updates published. + FindingPublishingFrequency *string `locationName:"findingPublishingFrequency" type:"string" enum:"FindingPublishingFrequency"` } // String returns the string representation @@ -4377,12 +4421,37 @@ func (s CreateDetectorInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDetectorInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDetectorInput"} + if s.Enable == nil { + invalidParams.Add(request.NewErrParamRequired("Enable")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateDetectorInput) SetClientToken(v string) *CreateDetectorInput { + s.ClientToken = &v + return s +} + // SetEnable sets the Enable field's value. func (s *CreateDetectorInput) SetEnable(v bool) *CreateDetectorInput { s.Enable = &v return s } +// SetFindingPublishingFrequency sets the FindingPublishingFrequency field's value. +func (s *CreateDetectorInput) SetFindingPublishingFrequency(v string) *CreateDetectorInput { + s.FindingPublishingFrequency = &v + return s +} + // CreateDetector response object. type CreateDetectorOutput struct { _ struct{} `type:"structure"` @@ -4425,10 +4494,14 @@ type CreateFilterInput struct { DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` // Represents the criteria to be used in the filter for querying findings. - FindingCriteria *FindingCriteria `locationName:"findingCriteria" type:"structure"` + // + // FindingCriteria is a required field + FindingCriteria *FindingCriteria `locationName:"findingCriteria" type:"structure" required:"true"` // The name of the filter. - Name *string `locationName:"name" type:"string"` + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` // Specifies the position of the filter in the list of current filters. Also // specifies the order in which this filter is applied to the findings. @@ -4451,6 +4524,15 @@ func (s *CreateFilterInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } + if s.FindingCriteria == nil { + invalidParams.Add(request.NewErrParamRequired("FindingCriteria")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } if invalidParams.Len() > 0 { return invalidParams @@ -4530,21 +4612,32 @@ type CreateIPSetInput struct { // A boolean value that indicates whether GuardDuty is to start using the uploaded // IPSet. - Activate *bool `locationName:"activate" type:"boolean"` + // + // Activate is a required field + Activate *bool `locationName:"activate" type:"boolean" required:"true"` + + // The idempotency token for the create request. + ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` // The format of the file that contains the IPSet. - Format *string `locationName:"format" type:"string" enum:"IpSetFormat"` + // + // Format is a required field + Format *string `locationName:"format" type:"string" required:"true" enum:"IpSetFormat"` // The URI of the file that contains the IPSet. For example (https://s3.us-west-2.amazonaws.com/my-bucket/my-object-key) - Location *string `locationName:"location" type:"string"` + // + // Location is a required field + Location *string `locationName:"location" type:"string" required:"true"` // The user friendly name to identify the IPSet. This name is displayed in all // findings that are triggered by activity that involves IP addresses included // in this IPSet. - Name *string `locationName:"name" type:"string"` + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` } // String returns the string representation @@ -4560,9 +4653,24 @@ func (s CreateIPSetInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateIPSetInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateIPSetInput"} + if s.Activate == nil { + invalidParams.Add(request.NewErrParamRequired("Activate")) + } if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } + if s.Format == nil { + invalidParams.Add(request.NewErrParamRequired("Format")) + } + if s.Location == nil { + invalidParams.Add(request.NewErrParamRequired("Location")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } if invalidParams.Len() > 0 { return invalidParams @@ -4576,6 +4684,12 @@ func (s *CreateIPSetInput) SetActivate(v bool) *CreateIPSetInput { return s } +// SetClientToken sets the ClientToken field's value. +func (s *CreateIPSetInput) SetClientToken(v string) *CreateIPSetInput { + s.ClientToken = &v + return s +} + // SetDetectorId sets the DetectorId field's value. func (s *CreateIPSetInput) SetDetectorId(v string) *CreateIPSetInput { s.DetectorId = &v @@ -4630,7 +4744,9 @@ type CreateMembersInput struct { // A list of account ID and email address pairs of the accounts that you want // to associate with the master GuardDuty account. - AccountDetails []*AccountDetail `locationName:"accountDetails" type:"list"` + // + // AccountDetails is a required field + AccountDetails []*AccountDetail `locationName:"accountDetails" type:"list" required:"true"` // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` @@ -4649,9 +4765,15 @@ func (s CreateMembersInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateMembersInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateMembersInput"} + if s.AccountDetails == nil { + invalidParams.Add(request.NewErrParamRequired("AccountDetails")) + } if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } if s.AccountDetails != nil { for i, v := range s.AccountDetails { if v == nil { @@ -4733,6 +4855,9 @@ func (s *CreateSampleFindingsInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -4772,20 +4897,31 @@ type CreateThreatIntelSetInput struct { // A boolean value that indicates whether GuardDuty is to start using the uploaded // ThreatIntelSet. - Activate *bool `locationName:"activate" type:"boolean"` + // + // Activate is a required field + Activate *bool `locationName:"activate" type:"boolean" required:"true"` + + // The idempotency token for the create request. + ClientToken *string `locationName:"clientToken" type:"string" idempotencyToken:"true"` // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` // The format of the file that contains the ThreatIntelSet. - Format *string `locationName:"format" type:"string" enum:"ThreatIntelSetFormat"` + // + // Format is a required field + Format *string `locationName:"format" type:"string" required:"true" enum:"ThreatIntelSetFormat"` // The URI of the file that contains the ThreatIntelSet. For example (https://s3.us-west-2.amazonaws.com/my-bucket/my-object-key). - Location *string `locationName:"location" type:"string"` + // + // Location is a required field + Location *string `locationName:"location" type:"string" required:"true"` // A user-friendly ThreatIntelSet name that is displayed in all finding generated // by activity that involves IP addresses included in this ThreatIntelSet. - Name *string `locationName:"name" type:"string"` + // + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` } // String returns the string representation @@ -4801,9 +4937,24 @@ func (s CreateThreatIntelSetInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateThreatIntelSetInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateThreatIntelSetInput"} + if s.Activate == nil { + invalidParams.Add(request.NewErrParamRequired("Activate")) + } if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } + if s.Format == nil { + invalidParams.Add(request.NewErrParamRequired("Format")) + } + if s.Location == nil { + invalidParams.Add(request.NewErrParamRequired("Location")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } if invalidParams.Len() > 0 { return invalidParams @@ -4817,6 +4968,12 @@ func (s *CreateThreatIntelSetInput) SetActivate(v bool) *CreateThreatIntelSetInp return s } +// SetClientToken sets the ClientToken field's value. +func (s *CreateThreatIntelSetInput) SetClientToken(v string) *CreateThreatIntelSetInput { + s.ClientToken = &v + return s +} + // SetDetectorId sets the DetectorId field's value. func (s *CreateThreatIntelSetInput) SetDetectorId(v string) *CreateThreatIntelSetInput { s.DetectorId = &v @@ -4871,7 +5028,9 @@ type DeclineInvitationsInput struct { // A list of account IDs of the AWS accounts that sent invitations to the current // member account that you want to decline invitations from. - AccountIds []*string `locationName:"accountIds" type:"list"` + // + // AccountIds is a required field + AccountIds []*string `locationName:"accountIds" type:"list" required:"true"` } // String returns the string representation @@ -4884,6 +5043,19 @@ func (s DeclineInvitationsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeclineInvitationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeclineInvitationsInput"} + if s.AccountIds == nil { + invalidParams.Add(request.NewErrParamRequired("AccountIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetAccountIds sets the AccountIds field's value. func (s *DeclineInvitationsInput) SetAccountIds(v []*string) *DeclineInvitationsInput { s.AccountIds = v @@ -4938,6 +5110,9 @@ func (s *DeleteDetectorInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -4991,9 +5166,15 @@ func (s *DeleteFilterInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } if s.FilterName == nil { invalidParams.Add(request.NewErrParamRequired("FilterName")) } + if s.FilterName != nil && len(*s.FilterName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FilterName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -5053,9 +5234,15 @@ func (s *DeleteIPSetInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } if s.IpSetId == nil { invalidParams.Add(request.NewErrParamRequired("IpSetId")) } + if s.IpSetId != nil && len(*s.IpSetId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IpSetId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -5095,7 +5282,9 @@ type DeleteInvitationsInput struct { // A list of account IDs of the AWS accounts that sent invitations to the current // member account that you want to delete invitations from. - AccountIds []*string `locationName:"accountIds" type:"list"` + // + // AccountIds is a required field + AccountIds []*string `locationName:"accountIds" type:"list" required:"true"` } // String returns the string representation @@ -5108,6 +5297,19 @@ func (s DeleteInvitationsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteInvitationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteInvitationsInput"} + if s.AccountIds == nil { + invalidParams.Add(request.NewErrParamRequired("AccountIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetAccountIds sets the AccountIds field's value. func (s *DeleteInvitationsInput) SetAccountIds(v []*string) *DeleteInvitationsInput { s.AccountIds = v @@ -5144,7 +5346,9 @@ type DeleteMembersInput struct { _ struct{} `type:"structure"` // A list of account IDs of the GuardDuty member accounts that you want to delete. - AccountIds []*string `locationName:"accountIds" type:"list"` + // + // AccountIds is a required field + AccountIds []*string `locationName:"accountIds" type:"list" required:"true"` // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` @@ -5163,9 +5367,15 @@ func (s DeleteMembersInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteMembersInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeleteMembersInput"} + if s.AccountIds == nil { + invalidParams.Add(request.NewErrParamRequired("AccountIds")) + } if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -5236,9 +5446,15 @@ func (s *DeleteThreatIntelSetInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } if s.ThreatIntelSetId == nil { invalidParams.Add(request.NewErrParamRequired("ThreatIntelSetId")) } + if s.ThreatIntelSetId != nil && len(*s.ThreatIntelSetId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ThreatIntelSetId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -5295,6 +5511,9 @@ func (s *DisassociateFromMasterAccountInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -5328,7 +5547,9 @@ type DisassociateMembersInput struct { // A list of account IDs of the GuardDuty member accounts that you want to disassociate // from master. - AccountIds []*string `locationName:"accountIds" type:"list"` + // + // AccountIds is a required field + AccountIds []*string `locationName:"accountIds" type:"list" required:"true"` // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` @@ -5347,9 +5568,15 @@ func (s DisassociateMembersInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *DisassociateMembersInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DisassociateMembersInput"} + if s.AccountIds == nil { + invalidParams.Add(request.NewErrParamRequired("AccountIds")) + } if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -5711,6 +5938,9 @@ func (s *GetDetectorInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -5731,6 +5961,9 @@ type GetDetectorOutput struct { // The first time a resource was created. The format will be ISO-8601. CreatedAt *string `locationName:"createdAt" type:"string"` + // A enum value that specifies how frequently customer got Finding updates published. + FindingPublishingFrequency *string `locationName:"findingPublishingFrequency" type:"string" enum:"FindingPublishingFrequency"` + // Customer serviceRole name or ARN for accessing customer resources ServiceRole *string `locationName:"serviceRole" type:"string"` @@ -5757,6 +5990,12 @@ func (s *GetDetectorOutput) SetCreatedAt(v string) *GetDetectorOutput { return s } +// SetFindingPublishingFrequency sets the FindingPublishingFrequency field's value. +func (s *GetDetectorOutput) SetFindingPublishingFrequency(v string) *GetDetectorOutput { + s.FindingPublishingFrequency = &v + return s +} + // SetServiceRole sets the ServiceRole field's value. func (s *GetDetectorOutput) SetServiceRole(v string) *GetDetectorOutput { s.ServiceRole = &v @@ -5801,9 +6040,15 @@ func (s *GetFilterInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } if s.FilterName == nil { invalidParams.Add(request.NewErrParamRequired("FilterName")) } + if s.FilterName != nil && len(*s.FilterName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FilterName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -5893,7 +6138,9 @@ type GetFindingsInput struct { DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` // IDs of the findings that you want to retrieve. - FindingIds []*string `locationName:"findingIds" type:"list"` + // + // FindingIds is a required field + FindingIds []*string `locationName:"findingIds" type:"list" required:"true"` // Represents the criteria used for sorting findings. SortCriteria *SortCriteria `locationName:"sortCriteria" type:"structure"` @@ -5915,6 +6162,12 @@ func (s *GetFindingsInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } + if s.FindingIds == nil { + invalidParams.Add(request.NewErrParamRequired("FindingIds")) + } if invalidParams.Len() > 0 { return invalidParams @@ -5975,7 +6228,9 @@ type GetFindingsStatisticsInput struct { FindingCriteria *FindingCriteria `locationName:"findingCriteria" type:"structure"` // Types of finding statistics to retrieve. - FindingStatisticTypes []*string `locationName:"findingStatisticTypes" type:"list"` + // + // FindingStatisticTypes is a required field + FindingStatisticTypes []*string `locationName:"findingStatisticTypes" type:"list" required:"true"` } // String returns the string representation @@ -5994,6 +6249,12 @@ func (s *GetFindingsStatisticsInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } + if s.FindingStatisticTypes == nil { + invalidParams.Add(request.NewErrParamRequired("FindingStatisticTypes")) + } if invalidParams.Len() > 0 { return invalidParams @@ -6069,9 +6330,15 @@ func (s *GetIPSetInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } if s.IpSetId == nil { invalidParams.Add(request.NewErrParamRequired("IpSetId")) } + if s.IpSetId != nil && len(*s.IpSetId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IpSetId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -6205,6 +6472,9 @@ func (s *GetMasterAccountInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -6247,7 +6517,9 @@ type GetMembersInput struct { _ struct{} `type:"structure"` // A list of account IDs of the GuardDuty member accounts that you want to describe. - AccountIds []*string `locationName:"accountIds" type:"list"` + // + // AccountIds is a required field + AccountIds []*string `locationName:"accountIds" type:"list" required:"true"` // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` @@ -6266,9 +6538,15 @@ func (s GetMembersInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *GetMembersInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GetMembersInput"} + if s.AccountIds == nil { + invalidParams.Add(request.NewErrParamRequired("AccountIds")) + } if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -6348,9 +6626,15 @@ func (s *GetThreatIntelSetInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } if s.ThreatIntelSetId == nil { invalidParams.Add(request.NewErrParamRequired("ThreatIntelSetId")) } + if s.ThreatIntelSetId != nil && len(*s.ThreatIntelSetId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ThreatIntelSetId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -6636,7 +6920,9 @@ type InviteMembersInput struct { // A list of account IDs of the accounts that you want to invite to GuardDuty // as members. - AccountIds []*string `locationName:"accountIds" type:"list"` + // + // AccountIds is a required field + AccountIds []*string `locationName:"accountIds" type:"list" required:"true"` // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` @@ -6663,9 +6949,15 @@ func (s InviteMembersInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *InviteMembersInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "InviteMembersInput"} + if s.AccountIds == nil { + invalidParams.Add(request.NewErrParamRequired("AccountIds")) + } if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -6832,6 +7124,9 @@ func (s *ListFiltersInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } @@ -6936,6 +7231,9 @@ func (s *ListFindingsInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } @@ -7041,6 +7339,9 @@ func (s *ListIPSetsInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } @@ -7217,6 +7518,9 @@ func (s *ListMembersInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } @@ -7316,6 +7620,9 @@ func (s *ListThreatIntelSetsInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } @@ -8218,7 +8525,9 @@ type StartMonitoringMembersInput struct { // A list of account IDs of the GuardDuty member accounts whose findings you // want the master account to monitor. - AccountIds []*string `locationName:"accountIds" type:"list"` + // + // AccountIds is a required field + AccountIds []*string `locationName:"accountIds" type:"list" required:"true"` // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` @@ -8237,9 +8546,15 @@ func (s StartMonitoringMembersInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *StartMonitoringMembersInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "StartMonitoringMembersInput"} + if s.AccountIds == nil { + invalidParams.Add(request.NewErrParamRequired("AccountIds")) + } if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -8290,7 +8605,9 @@ type StopMonitoringMembersInput struct { // A list of account IDs of the GuardDuty member accounts whose findings you // want the master account to stop monitoring. - AccountIds []*string `locationName:"accountIds" type:"list"` + // + // AccountIds is a required field + AccountIds []*string `locationName:"accountIds" type:"list" required:"true"` // DetectorId is a required field DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` @@ -8309,9 +8626,15 @@ func (s StopMonitoringMembersInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *StopMonitoringMembersInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "StopMonitoringMembersInput"} + if s.AccountIds == nil { + invalidParams.Add(request.NewErrParamRequired("AccountIds")) + } if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -8397,7 +8720,9 @@ type UnarchiveFindingsInput struct { DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` // IDs of the findings that you want to unarchive. - FindingIds []*string `locationName:"findingIds" type:"list"` + // + // FindingIds is a required field + FindingIds []*string `locationName:"findingIds" type:"list" required:"true"` } // String returns the string representation @@ -8416,6 +8741,12 @@ func (s *UnarchiveFindingsInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } + if s.FindingIds == nil { + invalidParams.Add(request.NewErrParamRequired("FindingIds")) + } if invalidParams.Len() > 0 { return invalidParams @@ -8497,6 +8828,9 @@ type UpdateDetectorInput struct { // Updated boolean value for the detector that specifies whether the detector // is enabled. Enable *bool `locationName:"enable" type:"boolean"` + + // A enum value that specifies how frequently customer got Finding updates published. + FindingPublishingFrequency *string `locationName:"findingPublishingFrequency" type:"string" enum:"FindingPublishingFrequency"` } // String returns the string representation @@ -8515,6 +8849,9 @@ func (s *UpdateDetectorInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -8534,6 +8871,12 @@ func (s *UpdateDetectorInput) SetEnable(v bool) *UpdateDetectorInput { return s } +// SetFindingPublishingFrequency sets the FindingPublishingFrequency field's value. +func (s *UpdateDetectorInput) SetFindingPublishingFrequency(v string) *UpdateDetectorInput { + s.FindingPublishingFrequency = &v + return s +} + type UpdateDetectorOutput struct { _ struct{} `type:"structure"` } @@ -8589,9 +8932,15 @@ func (s *UpdateFilterInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } if s.FilterName == nil { invalidParams.Add(request.NewErrParamRequired("FilterName")) } + if s.FilterName != nil && len(*s.FilterName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FilterName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -8670,10 +9019,14 @@ type UpdateFindingsFeedbackInput struct { DetectorId *string `location:"uri" locationName:"detectorId" type:"string" required:"true"` // Valid values: USEFUL | NOT_USEFUL - Feedback *string `locationName:"feedback" type:"string" enum:"Feedback"` + // + // Feedback is a required field + Feedback *string `locationName:"feedback" type:"string" required:"true" enum:"Feedback"` // IDs of the findings that you want to mark as useful or not useful. - FindingIds []*string `locationName:"findingIds" type:"list"` + // + // FindingIds is a required field + FindingIds []*string `locationName:"findingIds" type:"list" required:"true"` } // String returns the string representation @@ -8692,6 +9045,15 @@ func (s *UpdateFindingsFeedbackInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } + if s.Feedback == nil { + invalidParams.Add(request.NewErrParamRequired("Feedback")) + } + if s.FindingIds == nil { + invalidParams.Add(request.NewErrParamRequired("FindingIds")) + } if invalidParams.Len() > 0 { return invalidParams @@ -8773,9 +9135,15 @@ func (s *UpdateIPSetInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } if s.IpSetId == nil { invalidParams.Add(request.NewErrParamRequired("IpSetId")) } + if s.IpSetId != nil && len(*s.IpSetId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IpSetId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -8865,9 +9233,15 @@ func (s *UpdateThreatIntelSetInput) Validate() error { if s.DetectorId == nil { invalidParams.Add(request.NewErrParamRequired("DetectorId")) } + if s.DetectorId != nil && len(*s.DetectorId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DetectorId", 1)) + } if s.ThreatIntelSetId == nil { invalidParams.Add(request.NewErrParamRequired("ThreatIntelSetId")) } + if s.ThreatIntelSetId != nil && len(*s.ThreatIntelSetId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ThreatIntelSetId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -8946,6 +9320,18 @@ const ( FilterActionArchive = "ARCHIVE" ) +// A enum value that specifies how frequently customer got Finding updates published. +const ( + // FindingPublishingFrequencyFifteenMinutes is a FindingPublishingFrequency enum value + FindingPublishingFrequencyFifteenMinutes = "FIFTEEN_MINUTES" + + // FindingPublishingFrequencyOneHour is a FindingPublishingFrequency enum value + FindingPublishingFrequencyOneHour = "ONE_HOUR" + + // FindingPublishingFrequencySixHours is a FindingPublishingFrequency enum value + FindingPublishingFrequencySixHours = "SIX_HOURS" +) + // The types of finding statistics. const ( // FindingStatisticTypeCountBySeverity is a FindingStatisticType enum value diff --git a/vendor/github.com/aws/aws-sdk-go/service/iam/api.go b/vendor/github.com/aws/aws-sdk-go/service/iam/api.go index 875df512f4..f91e30b575 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iam/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iam/api.go @@ -18,7 +18,7 @@ const opAddClientIDToOpenIDConnectProvider = "AddClientIDToOpenIDConnectProvider // AddClientIDToOpenIDConnectProviderRequest generates a "aws/request.Request" representing the // client's request for the AddClientIDToOpenIDConnectProvider operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -52,8 +52,7 @@ func (c *IAM) AddClientIDToOpenIDConnectProviderRequest(input *AddClientIDToOpen output = &AddClientIDToOpenIDConnectProviderOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -78,8 +77,8 @@ func (c *IAM) AddClientIDToOpenIDConnectProviderRequest(input *AddClientIDToOpen // for an input parameter. // // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeLimitExceededException "LimitExceeded" // The request was rejected because it attempted to create resources beyond @@ -116,7 +115,7 @@ const opAddRoleToInstanceProfile = "AddRoleToInstanceProfile" // AddRoleToInstanceProfileRequest generates a "aws/request.Request" representing the // client's request for the AddRoleToInstanceProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -150,8 +149,7 @@ func (c *IAM) AddRoleToInstanceProfileRequest(input *AddRoleToInstanceProfileInp output = &AddRoleToInstanceProfileOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -162,12 +160,12 @@ func (c *IAM) AddRoleToInstanceProfileRequest(input *AddRoleToInstanceProfileInp // can remove the existing role and then add a different role to an instance // profile. You must then wait for the change to appear across all of AWS because // of eventual consistency (https://en.wikipedia.org/wiki/Eventual_consistency). -// To force the change, you must disassociate the instance profile (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DisassociateIamInstanceProfile.html) -// and then associate the instance profile (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_AssociateIamInstanceProfile.html), +// To force the change, you must disassociate the instance profile (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DisassociateIamInstanceProfile.html) +// and then associate the instance profile (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_AssociateIamInstanceProfile.html), // or you can stop your instance and then restart it. // // The caller of this API must be granted the PassRole permission on the IAM -// role by a permission policy. +// role by a permissions policy. // // For more information about roles, go to Working with Roles (http://docs.aws.amazon.com/IAM/latest/UserGuide/WorkingWithRoles.html). // For more information about instance profiles, go to About Instance Profiles @@ -182,8 +180,8 @@ func (c *IAM) AddRoleToInstanceProfileRequest(input *AddRoleToInstanceProfileInp // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" // The request was rejected because it attempted to create a resource that already @@ -230,7 +228,7 @@ const opAddUserToGroup = "AddUserToGroup" // AddUserToGroupRequest generates a "aws/request.Request" representing the // client's request for the AddUserToGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -264,8 +262,7 @@ func (c *IAM) AddUserToGroupRequest(input *AddUserToGroupInput) (req *request.Re output = &AddUserToGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -282,8 +279,8 @@ func (c *IAM) AddUserToGroupRequest(input *AddUserToGroupInput) (req *request.Re // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeLimitExceededException "LimitExceeded" // The request was rejected because it attempted to create resources beyond @@ -320,7 +317,7 @@ const opAttachGroupPolicy = "AttachGroupPolicy" // AttachGroupPolicyRequest generates a "aws/request.Request" representing the // client's request for the AttachGroupPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -354,8 +351,7 @@ func (c *IAM) AttachGroupPolicyRequest(input *AttachGroupPolicyInput) (req *requ output = &AttachGroupPolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -379,8 +375,8 @@ func (c *IAM) AttachGroupPolicyRequest(input *AttachGroupPolicyInput) (req *requ // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeLimitExceededException "LimitExceeded" // The request was rejected because it attempted to create resources beyond @@ -425,7 +421,7 @@ const opAttachRolePolicy = "AttachRolePolicy" // AttachRolePolicyRequest generates a "aws/request.Request" representing the // client's request for the AttachRolePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -459,8 +455,7 @@ func (c *IAM) AttachRolePolicyRequest(input *AttachRolePolicyInput) (req *reques output = &AttachRolePolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -488,8 +483,8 @@ func (c *IAM) AttachRolePolicyRequest(input *AttachRolePolicyInput) (req *reques // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeLimitExceededException "LimitExceeded" // The request was rejected because it attempted to create resources beyond @@ -540,7 +535,7 @@ const opAttachUserPolicy = "AttachUserPolicy" // AttachUserPolicyRequest generates a "aws/request.Request" representing the // client's request for the AttachUserPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -574,8 +569,7 @@ func (c *IAM) AttachUserPolicyRequest(input *AttachUserPolicyInput) (req *reques output = &AttachUserPolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -599,8 +593,8 @@ func (c *IAM) AttachUserPolicyRequest(input *AttachUserPolicyInput) (req *reques // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeLimitExceededException "LimitExceeded" // The request was rejected because it attempted to create resources beyond @@ -645,7 +639,7 @@ const opChangePassword = "ChangePassword" // ChangePasswordRequest generates a "aws/request.Request" representing the // client's request for the ChangePassword operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -679,8 +673,7 @@ func (c *IAM) ChangePasswordRequest(input *ChangePasswordInput) (req *request.Re output = &ChangePasswordOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -702,8 +695,8 @@ func (c *IAM) ChangePasswordRequest(input *ChangePasswordInput) (req *request.Re // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeInvalidUserTypeException "InvalidUserType" // The request was rejected because the type of user for the transaction was @@ -754,7 +747,7 @@ const opCreateAccessKey = "CreateAccessKey" // CreateAccessKeyRequest generates a "aws/request.Request" representing the // client's request for the CreateAccessKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -797,10 +790,10 @@ func (c *IAM) CreateAccessKeyRequest(input *CreateAccessKeyInput) (req *request. // the specified user. The default status for new keys is Active. // // If you do not specify a user name, IAM determines the user name implicitly -// based on the AWS access key ID signing the request. Because this operation -// works for access keys under the AWS account, you can use this operation to -// manage AWS account root user credentials. This is true even if the AWS account -// has no associated users. +// based on the AWS access key ID signing the request. This operation works +// for access keys under the AWS account. Consequently, you can use this operation +// to manage AWS account root user credentials. This is true even if the AWS +// account has no associated users. // // For information about limits on the number of keys you can create, see Limitations // on IAM Entities (http://docs.aws.amazon.com/IAM/latest/UserGuide/LimitationsOnEntities.html) @@ -821,8 +814,8 @@ func (c *IAM) CreateAccessKeyRequest(input *CreateAccessKeyInput) (req *request. // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeLimitExceededException "LimitExceeded" // The request was rejected because it attempted to create resources beyond @@ -859,7 +852,7 @@ const opCreateAccountAlias = "CreateAccountAlias" // CreateAccountAliasRequest generates a "aws/request.Request" representing the // client's request for the CreateAccountAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -893,8 +886,7 @@ func (c *IAM) CreateAccountAliasRequest(input *CreateAccountAliasInput) (req *re output = &CreateAccountAliasOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -951,7 +943,7 @@ const opCreateGroup = "CreateGroup" // CreateGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1013,8 +1005,8 @@ func (c *IAM) CreateGroupRequest(input *CreateGroupInput) (req *request.Request, // exists. // // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -1047,7 +1039,7 @@ const opCreateInstanceProfile = "CreateInstanceProfile" // CreateInstanceProfileRequest generates a "aws/request.Request" representing the // client's request for the CreateInstanceProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1140,7 +1132,7 @@ const opCreateLoginProfile = "CreateLoginProfile" // CreateLoginProfileRequest generates a "aws/request.Request" representing the // client's request for the CreateLoginProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1197,8 +1189,8 @@ func (c *IAM) CreateLoginProfileRequest(input *CreateLoginProfileInput) (req *re // exists. // // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodePasswordPolicyViolationException "PasswordPolicyViolation" // The request was rejected because the provided password did not meet the requirements @@ -1239,7 +1231,7 @@ const opCreateOpenIDConnectProvider = "CreateOpenIDConnectProvider" // CreateOpenIDConnectProviderRequest generates a "aws/request.Request" representing the // client's request for the CreateOpenIDConnectProvider operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1352,7 +1344,7 @@ const opCreatePolicy = "CreatePolicy" // CreatePolicyRequest generates a "aws/request.Request" representing the // client's request for the CreatePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1457,7 +1449,7 @@ const opCreatePolicyVersion = "CreatePolicyVersion" // CreatePolicyVersionRequest generates a "aws/request.Request" representing the // client's request for the CreatePolicyVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1518,8 +1510,8 @@ func (c *IAM) CreatePolicyVersionRequest(input *CreatePolicyVersionInput) (req * // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument" // The request was rejected because the policy document was malformed. The error @@ -1564,7 +1556,7 @@ const opCreateRole = "CreateRole" // CreateRoleRequest generates a "aws/request.Request" representing the // client's request for the CreateRole operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1633,6 +1625,11 @@ func (c *IAM) CreateRoleRequest(input *CreateRoleInput) (req *request.Request, o // The request was rejected because the policy document was malformed. The error // message describes the specific error. // +// * ErrCodeConcurrentModificationException "ConcurrentModification" +// The request was rejected because multiple requests to change this object +// were submitted simultaneously. Wait a few minutes and submit your request +// again. +// // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception // or failure. @@ -1664,7 +1661,7 @@ const opCreateSAMLProvider = "CreateSAMLProvider" // CreateSAMLProviderRequest generates a "aws/request.Request" representing the // client's request for the CreateSAMLProvider operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1777,7 +1774,7 @@ const opCreateServiceLinkedRole = "CreateServiceLinkedRole" // CreateServiceLinkedRoleRequest generates a "aws/request.Request" representing the // client's request for the CreateServiceLinkedRole operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1821,12 +1818,9 @@ func (c *IAM) CreateServiceLinkedRoleRequest(input *CreateServiceLinkedRoleInput // ensure that the service is not broken by an unexpectedly changed or deleted // role, which could put your AWS resources into an unknown state. Allowing // the service to control the role helps improve service stability and proper -// cleanup when a service and its role are no longer needed. -// -// The name of the role is generated by combining the string that you specify -// for the AWSServiceName parameter with the string that you specify for the -// CustomSuffix parameter. The resulting name must be unique in your account -// or the request fails. +// cleanup when a service and its role are no longer needed. For more information, +// see Using Service-Linked Roles (http://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html) +// in the IAM User Guide. // // To attach a policy to this service-linked role, you must make the request // using the AWS service that depends on this role. @@ -1848,8 +1842,8 @@ func (c *IAM) CreateServiceLinkedRoleRequest(input *CreateServiceLinkedRoleInput // the current AWS account limits. The error message describes the limit exceeded. // // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -1882,7 +1876,7 @@ const opCreateServiceSpecificCredential = "CreateServiceSpecificCredential" // CreateServiceSpecificCredentialRequest generates a "aws/request.Request" representing the // client's request for the CreateServiceSpecificCredential operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1949,8 +1943,8 @@ func (c *IAM) CreateServiceSpecificCredentialRequest(input *CreateServiceSpecifi // the current AWS account limits. The error message describes the limit exceeded. // // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceNotSupportedException "NotSupportedService" // The specified service does not support service-specific credentials. @@ -1982,7 +1976,7 @@ const opCreateUser = "CreateUser" // CreateUserRequest generates a "aws/request.Request" representing the // client's request for the CreateUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2044,8 +2038,17 @@ func (c *IAM) CreateUserRequest(input *CreateUserInput) (req *request.Request, o // exists. // // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. +// +// * ErrCodeInvalidInputException "InvalidInput" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeConcurrentModificationException "ConcurrentModification" +// The request was rejected because multiple requests to change this object +// were submitted simultaneously. Wait a few minutes and submit your request +// again. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -2078,7 +2081,7 @@ const opCreateVirtualMFADevice = "CreateVirtualMFADevice" // CreateVirtualMFADeviceRequest generates a "aws/request.Request" representing the // client's request for the CreateVirtualMFADevice operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2179,7 +2182,7 @@ const opDeactivateMFADevice = "DeactivateMFADevice" // DeactivateMFADeviceRequest generates a "aws/request.Request" representing the // client's request for the DeactivateMFADevice operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2213,8 +2216,7 @@ func (c *IAM) DeactivateMFADeviceRequest(input *DeactivateMFADeviceInput) (req * output = &DeactivateMFADeviceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2224,7 +2226,7 @@ func (c *IAM) DeactivateMFADeviceRequest(input *DeactivateMFADeviceInput) (req * // the user name for which it was originally enabled. // // For more information about creating and working with virtual MFA devices, -// go to Using a Virtual MFA Device (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html) +// go to Enabling a Virtual Multi-factor Authentication (MFA) Device (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html) // in the IAM User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2242,8 +2244,8 @@ func (c *IAM) DeactivateMFADeviceRequest(input *DeactivateMFADeviceInput) (req * // waiting several minutes. The error message describes the entity. // // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeLimitExceededException "LimitExceeded" // The request was rejected because it attempted to create resources beyond @@ -2280,7 +2282,7 @@ const opDeleteAccessKey = "DeleteAccessKey" // DeleteAccessKeyRequest generates a "aws/request.Request" representing the // client's request for the DeleteAccessKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2314,8 +2316,7 @@ func (c *IAM) DeleteAccessKeyRequest(input *DeleteAccessKeyInput) (req *request. output = &DeleteAccessKeyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2324,10 +2325,10 @@ func (c *IAM) DeleteAccessKeyRequest(input *DeleteAccessKeyInput) (req *request. // Deletes the access key pair associated with the specified IAM user. // // If you do not specify a user name, IAM determines the user name implicitly -// based on the AWS access key ID signing the request. Because this operation -// works for access keys under the AWS account, you can use this operation to -// manage AWS account root user credentials even if the AWS account has no associated -// users. +// based on the AWS access key ID signing the request. This operation works +// for access keys under the AWS account. Consequently, you can use this operation +// to manage AWS account root user credentials even if the AWS account has no +// associated users. // // 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 @@ -2338,8 +2339,8 @@ func (c *IAM) DeleteAccessKeyRequest(input *DeleteAccessKeyInput) (req *request. // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeLimitExceededException "LimitExceeded" // The request was rejected because it attempted to create resources beyond @@ -2376,7 +2377,7 @@ const opDeleteAccountAlias = "DeleteAccountAlias" // DeleteAccountAliasRequest generates a "aws/request.Request" representing the // client's request for the DeleteAccountAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2410,8 +2411,7 @@ func (c *IAM) DeleteAccountAliasRequest(input *DeleteAccountAliasInput) (req *re output = &DeleteAccountAliasOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2430,8 +2430,8 @@ func (c *IAM) DeleteAccountAliasRequest(input *DeleteAccountAliasInput) (req *re // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeLimitExceededException "LimitExceeded" // The request was rejected because it attempted to create resources beyond @@ -2468,7 +2468,7 @@ const opDeleteAccountPasswordPolicy = "DeleteAccountPasswordPolicy" // DeleteAccountPasswordPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteAccountPasswordPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2502,8 +2502,7 @@ func (c *IAM) DeleteAccountPasswordPolicyRequest(input *DeleteAccountPasswordPol output = &DeleteAccountPasswordPolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2520,8 +2519,8 @@ func (c *IAM) DeleteAccountPasswordPolicyRequest(input *DeleteAccountPasswordPol // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeLimitExceededException "LimitExceeded" // The request was rejected because it attempted to create resources beyond @@ -2558,7 +2557,7 @@ const opDeleteGroup = "DeleteGroup" // DeleteGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2592,8 +2591,7 @@ func (c *IAM) DeleteGroupRequest(input *DeleteGroupInput) (req *request.Request, output = &DeleteGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2611,8 +2609,8 @@ func (c *IAM) DeleteGroupRequest(input *DeleteGroupInput) (req *request.Request, // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeDeleteConflictException "DeleteConflict" // The request was rejected because it attempted to delete a resource that has @@ -2653,7 +2651,7 @@ const opDeleteGroupPolicy = "DeleteGroupPolicy" // DeleteGroupPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteGroupPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2687,8 +2685,7 @@ func (c *IAM) DeleteGroupPolicyRequest(input *DeleteGroupPolicyInput) (req *requ output = &DeleteGroupPolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2711,8 +2708,8 @@ func (c *IAM) DeleteGroupPolicyRequest(input *DeleteGroupPolicyInput) (req *requ // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeLimitExceededException "LimitExceeded" // The request was rejected because it attempted to create resources beyond @@ -2749,7 +2746,7 @@ const opDeleteInstanceProfile = "DeleteInstanceProfile" // DeleteInstanceProfileRequest generates a "aws/request.Request" representing the // client's request for the DeleteInstanceProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2783,8 +2780,7 @@ func (c *IAM) DeleteInstanceProfileRequest(input *DeleteInstanceProfileInput) (r output = &DeleteInstanceProfileOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2810,8 +2806,8 @@ func (c *IAM) DeleteInstanceProfileRequest(input *DeleteInstanceProfileInput) (r // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeDeleteConflictException "DeleteConflict" // The request was rejected because it attempted to delete a resource that has @@ -2852,7 +2848,7 @@ const opDeleteLoginProfile = "DeleteLoginProfile" // DeleteLoginProfileRequest generates a "aws/request.Request" representing the // client's request for the DeleteLoginProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2886,8 +2882,7 @@ func (c *IAM) DeleteLoginProfileRequest(input *DeleteLoginProfileInput) (req *re output = &DeleteLoginProfileOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2897,7 +2892,7 @@ func (c *IAM) DeleteLoginProfileRequest(input *DeleteLoginProfileInput) (req *re // ability to access AWS services through the AWS Management Console. // // Deleting a user's password does not prevent a user from accessing AWS through -// the command line interface or the API. To prevent all user access you must +// the command line interface or the API. To prevent all user access, you must // also either make any access keys inactive or delete them. For more information // about making keys inactive or deleting them, see UpdateAccessKey and DeleteAccessKey. // @@ -2916,8 +2911,8 @@ func (c *IAM) DeleteLoginProfileRequest(input *DeleteLoginProfileInput) (req *re // waiting several minutes. The error message describes the entity. // // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeLimitExceededException "LimitExceeded" // The request was rejected because it attempted to create resources beyond @@ -2954,7 +2949,7 @@ const opDeleteOpenIDConnectProvider = "DeleteOpenIDConnectProvider" // DeleteOpenIDConnectProviderRequest generates a "aws/request.Request" representing the // client's request for the DeleteOpenIDConnectProvider operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2988,8 +2983,7 @@ func (c *IAM) DeleteOpenIDConnectProviderRequest(input *DeleteOpenIDConnectProvi output = &DeleteOpenIDConnectProviderOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3017,8 +3011,8 @@ func (c *IAM) DeleteOpenIDConnectProviderRequest(input *DeleteOpenIDConnectProvi // for an input parameter. // // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -3051,7 +3045,7 @@ const opDeletePolicy = "DeletePolicy" // DeletePolicyRequest generates a "aws/request.Request" representing the // client's request for the DeletePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3085,8 +3079,7 @@ func (c *IAM) DeletePolicyRequest(input *DeletePolicyInput) (req *request.Reques output = &DeletePolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3095,7 +3088,7 @@ func (c *IAM) DeletePolicyRequest(input *DeletePolicyInput) (req *request.Reques // Deletes the specified managed policy. // // Before you can delete a managed policy, you must first detach the policy -// from all users, groups, and roles that it is attached to. In addition you +// from all users, groups, and roles that it is attached to. In addition, you // must delete all the policy's versions. The following steps describe the process // for deleting a managed policy: // @@ -3125,8 +3118,8 @@ func (c *IAM) DeletePolicyRequest(input *DeletePolicyInput) (req *request.Reques // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeLimitExceededException "LimitExceeded" // The request was rejected because it attempted to create resources beyond @@ -3171,7 +3164,7 @@ const opDeletePolicyVersion = "DeletePolicyVersion" // DeletePolicyVersionRequest generates a "aws/request.Request" representing the // client's request for the DeletePolicyVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3205,8 +3198,7 @@ func (c *IAM) DeletePolicyVersionRequest(input *DeletePolicyVersionInput) (req * output = &DeletePolicyVersionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3231,8 +3223,8 @@ func (c *IAM) DeletePolicyVersionRequest(input *DeletePolicyVersionInput) (req * // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeLimitExceededException "LimitExceeded" // The request was rejected because it attempted to create resources beyond @@ -3277,7 +3269,7 @@ const opDeleteRole = "DeleteRole" // DeleteRoleRequest generates a "aws/request.Request" representing the // client's request for the DeleteRole operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3311,8 +3303,7 @@ func (c *IAM) DeleteRoleRequest(input *DeleteRoleInput) (req *request.Request, o output = &DeleteRoleOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3335,8 +3326,8 @@ func (c *IAM) DeleteRoleRequest(input *DeleteRoleInput) (req *request.Request, o // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeDeleteConflictException "DeleteConflict" // The request was rejected because it attempted to delete a resource that has @@ -3352,6 +3343,11 @@ func (c *IAM) DeleteRoleRequest(input *DeleteRoleInput) (req *request.Request, o // the name of the service that depends on this service-linked role. You must // request the change through that service. // +// * ErrCodeConcurrentModificationException "ConcurrentModification" +// The request was rejected because multiple requests to change this object +// were submitted simultaneously. Wait a few minutes and submit your request +// again. +// // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception // or failure. @@ -3383,7 +3379,7 @@ const opDeleteRolePermissionsBoundary = "DeleteRolePermissionsBoundary" // DeleteRolePermissionsBoundaryRequest generates a "aws/request.Request" representing the // client's request for the DeleteRolePermissionsBoundary operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3417,8 +3413,7 @@ func (c *IAM) DeleteRolePermissionsBoundaryRequest(input *DeleteRolePermissionsB output = &DeleteRolePermissionsBoundaryOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3439,8 +3434,8 @@ func (c *IAM) DeleteRolePermissionsBoundaryRequest(input *DeleteRolePermissionsB // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeUnmodifiableEntityException "UnmodifiableEntity" // The request was rejected because only the service that depends on the service-linked @@ -3479,7 +3474,7 @@ const opDeleteRolePolicy = "DeleteRolePolicy" // DeleteRolePolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteRolePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3513,8 +3508,7 @@ func (c *IAM) DeleteRolePolicyRequest(input *DeleteRolePolicyInput) (req *reques output = &DeleteRolePolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3537,8 +3531,8 @@ func (c *IAM) DeleteRolePolicyRequest(input *DeleteRolePolicyInput) (req *reques // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeLimitExceededException "LimitExceeded" // The request was rejected because it attempted to create resources beyond @@ -3581,7 +3575,7 @@ const opDeleteSAMLProvider = "DeleteSAMLProvider" // DeleteSAMLProviderRequest generates a "aws/request.Request" representing the // client's request for the DeleteSAMLProvider operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3615,8 +3609,7 @@ func (c *IAM) DeleteSAMLProviderRequest(input *DeleteSAMLProviderInput) (req *re output = &DeleteSAMLProviderOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3648,8 +3641,8 @@ func (c *IAM) DeleteSAMLProviderRequest(input *DeleteSAMLProviderInput) (req *re // the current AWS account limits. The error message describes the limit exceeded. // // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -3682,7 +3675,7 @@ const opDeleteSSHPublicKey = "DeleteSSHPublicKey" // DeleteSSHPublicKeyRequest generates a "aws/request.Request" representing the // client's request for the DeleteSSHPublicKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3716,8 +3709,7 @@ func (c *IAM) DeleteSSHPublicKeyRequest(input *DeleteSSHPublicKeyInput) (req *re output = &DeleteSSHPublicKeyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3740,8 +3732,8 @@ func (c *IAM) DeleteSSHPublicKeyRequest(input *DeleteSSHPublicKeyInput) (req *re // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteSSHPublicKey func (c *IAM) DeleteSSHPublicKey(input *DeleteSSHPublicKeyInput) (*DeleteSSHPublicKeyOutput, error) { @@ -3770,7 +3762,7 @@ const opDeleteServerCertificate = "DeleteServerCertificate" // DeleteServerCertificateRequest generates a "aws/request.Request" representing the // client's request for the DeleteServerCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3804,8 +3796,7 @@ func (c *IAM) DeleteServerCertificateRequest(input *DeleteServerCertificateInput output = &DeleteServerCertificateOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3837,8 +3828,8 @@ func (c *IAM) DeleteServerCertificateRequest(input *DeleteServerCertificateInput // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeDeleteConflictException "DeleteConflict" // The request was rejected because it attempted to delete a resource that has @@ -3879,7 +3870,7 @@ const opDeleteServiceLinkedRole = "DeleteServiceLinkedRole" // DeleteServiceLinkedRoleRequest generates a "aws/request.Request" representing the // client's request for the DeleteServiceLinkedRole operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3948,8 +3939,8 @@ func (c *IAM) DeleteServiceLinkedRoleRequest(input *DeleteServiceLinkedRoleInput // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeLimitExceededException "LimitExceeded" // The request was rejected because it attempted to create resources beyond @@ -3986,7 +3977,7 @@ const opDeleteServiceSpecificCredential = "DeleteServiceSpecificCredential" // DeleteServiceSpecificCredentialRequest generates a "aws/request.Request" representing the // client's request for the DeleteServiceSpecificCredential operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4020,8 +4011,7 @@ func (c *IAM) DeleteServiceSpecificCredentialRequest(input *DeleteServiceSpecifi output = &DeleteServiceSpecificCredentialOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4038,8 +4028,8 @@ func (c *IAM) DeleteServiceSpecificCredentialRequest(input *DeleteServiceSpecifi // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteServiceSpecificCredential func (c *IAM) DeleteServiceSpecificCredential(input *DeleteServiceSpecificCredentialInput) (*DeleteServiceSpecificCredentialOutput, error) { @@ -4068,7 +4058,7 @@ const opDeleteSigningCertificate = "DeleteSigningCertificate" // DeleteSigningCertificateRequest generates a "aws/request.Request" representing the // client's request for the DeleteSigningCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4102,8 +4092,7 @@ func (c *IAM) DeleteSigningCertificateRequest(input *DeleteSigningCertificateInp output = &DeleteSigningCertificateOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4112,10 +4101,10 @@ func (c *IAM) DeleteSigningCertificateRequest(input *DeleteSigningCertificateInp // Deletes a signing certificate associated with the specified IAM user. // // If you do not specify a user name, IAM determines the user name implicitly -// based on the AWS access key ID signing the request. Because this operation -// works for access keys under the AWS account, you can use this operation to -// manage AWS account root user credentials even if the AWS account has no associated -// IAM users. +// based on the AWS access key ID signing the request. This operation works +// for access keys under the AWS account. Consequently, you can use this operation +// to manage AWS account root user credentials even if the AWS account has no +// associated IAM users. // // 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 @@ -4126,8 +4115,8 @@ func (c *IAM) DeleteSigningCertificateRequest(input *DeleteSigningCertificateInp // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeLimitExceededException "LimitExceeded" // The request was rejected because it attempted to create resources beyond @@ -4164,7 +4153,7 @@ const opDeleteUser = "DeleteUser" // DeleteUserRequest generates a "aws/request.Request" representing the // client's request for the DeleteUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4198,15 +4187,15 @@ func (c *IAM) DeleteUserRequest(input *DeleteUserInput) (req *request.Request, o output = &DeleteUserOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteUser API operation for AWS Identity and Access Management. // // Deletes the specified IAM user. The user must not belong to any groups or -// have any access keys, signing certificates, or attached policies. +// have any access keys, signing certificates, MFA devices enabled for AWS, +// or attached policies. // // 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 @@ -4221,13 +4210,18 @@ func (c *IAM) DeleteUserRequest(input *DeleteUserInput) (req *request.Request, o // the current AWS account limits. The error message describes the limit exceeded. // // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeDeleteConflictException "DeleteConflict" // The request was rejected because it attempted to delete a resource that has // attached subordinate entities. The error message describes these entities. // +// * ErrCodeConcurrentModificationException "ConcurrentModification" +// The request was rejected because multiple requests to change this object +// were submitted simultaneously. Wait a few minutes and submit your request +// again. +// // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception // or failure. @@ -4259,7 +4253,7 @@ const opDeleteUserPermissionsBoundary = "DeleteUserPermissionsBoundary" // DeleteUserPermissionsBoundaryRequest generates a "aws/request.Request" representing the // client's request for the DeleteUserPermissionsBoundary operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4293,8 +4287,7 @@ func (c *IAM) DeleteUserPermissionsBoundaryRequest(input *DeleteUserPermissionsB output = &DeleteUserPermissionsBoundaryOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4315,8 +4308,8 @@ func (c *IAM) DeleteUserPermissionsBoundaryRequest(input *DeleteUserPermissionsB // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -4349,7 +4342,7 @@ const opDeleteUserPolicy = "DeleteUserPolicy" // DeleteUserPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteUserPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4383,8 +4376,7 @@ func (c *IAM) DeleteUserPolicyRequest(input *DeleteUserPolicyInput) (req *reques output = &DeleteUserPolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4407,8 +4399,8 @@ func (c *IAM) DeleteUserPolicyRequest(input *DeleteUserPolicyInput) (req *reques // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeLimitExceededException "LimitExceeded" // The request was rejected because it attempted to create resources beyond @@ -4445,7 +4437,7 @@ const opDeleteVirtualMFADevice = "DeleteVirtualMFADevice" // DeleteVirtualMFADeviceRequest generates a "aws/request.Request" representing the // client's request for the DeleteVirtualMFADevice operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4479,8 +4471,7 @@ func (c *IAM) DeleteVirtualMFADeviceRequest(input *DeleteVirtualMFADeviceInput) output = &DeleteVirtualMFADeviceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4500,8 +4491,8 @@ func (c *IAM) DeleteVirtualMFADeviceRequest(input *DeleteVirtualMFADeviceInput) // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeDeleteConflictException "DeleteConflict" // The request was rejected because it attempted to delete a resource that has @@ -4542,7 +4533,7 @@ const opDetachGroupPolicy = "DetachGroupPolicy" // DetachGroupPolicyRequest generates a "aws/request.Request" representing the // client's request for the DetachGroupPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4576,8 +4567,7 @@ func (c *IAM) DetachGroupPolicyRequest(input *DetachGroupPolicyInput) (req *requ output = &DetachGroupPolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4599,8 +4589,8 @@ func (c *IAM) DetachGroupPolicyRequest(input *DetachGroupPolicyInput) (req *requ // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeLimitExceededException "LimitExceeded" // The request was rejected because it attempted to create resources beyond @@ -4641,7 +4631,7 @@ const opDetachRolePolicy = "DetachRolePolicy" // DetachRolePolicyRequest generates a "aws/request.Request" representing the // client's request for the DetachRolePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4675,8 +4665,7 @@ func (c *IAM) DetachRolePolicyRequest(input *DetachRolePolicyInput) (req *reques output = &DetachRolePolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4698,8 +4687,8 @@ func (c *IAM) DetachRolePolicyRequest(input *DetachRolePolicyInput) (req *reques // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeLimitExceededException "LimitExceeded" // The request was rejected because it attempted to create resources beyond @@ -4746,7 +4735,7 @@ const opDetachUserPolicy = "DetachUserPolicy" // DetachUserPolicyRequest generates a "aws/request.Request" representing the // client's request for the DetachUserPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4780,8 +4769,7 @@ func (c *IAM) DetachUserPolicyRequest(input *DetachUserPolicyInput) (req *reques output = &DetachUserPolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4803,8 +4791,8 @@ func (c *IAM) DetachUserPolicyRequest(input *DetachUserPolicyInput) (req *reques // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeLimitExceededException "LimitExceeded" // The request was rejected because it attempted to create resources beyond @@ -4845,7 +4833,7 @@ const opEnableMFADevice = "EnableMFADevice" // EnableMFADeviceRequest generates a "aws/request.Request" representing the // client's request for the EnableMFADevice operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4879,8 +4867,7 @@ func (c *IAM) EnableMFADeviceRequest(input *EnableMFADeviceInput) (req *request. output = &EnableMFADeviceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4917,8 +4904,8 @@ func (c *IAM) EnableMFADeviceRequest(input *EnableMFADeviceInput) (req *request. // the current AWS account limits. The error message describes the limit exceeded. // // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -4951,7 +4938,7 @@ const opGenerateCredentialReport = "GenerateCredentialReport" // GenerateCredentialReportRequest generates a "aws/request.Request" representing the // client's request for the GenerateCredentialReport operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5032,12 +5019,145 @@ func (c *IAM) GenerateCredentialReportWithContext(ctx aws.Context, input *Genera return out, req.Send() } +const opGenerateServiceLastAccessedDetails = "GenerateServiceLastAccessedDetails" + +// GenerateServiceLastAccessedDetailsRequest generates a "aws/request.Request" representing the +// client's request for the GenerateServiceLastAccessedDetails 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 GenerateServiceLastAccessedDetails for more information on using the GenerateServiceLastAccessedDetails +// 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 GenerateServiceLastAccessedDetailsRequest method. +// req, resp := client.GenerateServiceLastAccessedDetailsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GenerateServiceLastAccessedDetails +func (c *IAM) GenerateServiceLastAccessedDetailsRequest(input *GenerateServiceLastAccessedDetailsInput) (req *request.Request, output *GenerateServiceLastAccessedDetailsOutput) { + op := &request.Operation{ + Name: opGenerateServiceLastAccessedDetails, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GenerateServiceLastAccessedDetailsInput{} + } + + output = &GenerateServiceLastAccessedDetailsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GenerateServiceLastAccessedDetails API operation for AWS Identity and Access Management. +// +// Generates a request for a report that includes details about when an IAM +// resource (user, group, role, or policy) was last used in an attempt to access +// AWS services. Recent activity usually appears within four hours. IAM reports +// activity for the last 365 days, or less if your region began supporting this +// feature within the last year. For more information, see Regions Where Data +// Is Tracked (http://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#access-advisor_tracking-period). +// +// The service last accessed data includes all attempts to access an AWS API, +// not just the successful ones. This includes all attempts that were made using +// the AWS Management Console, the AWS API through any of the SDKs, or any of +// the command line tools. An unexpected entry in the service last accessed +// data does not mean that your account has been compromised, because the request +// might have been denied. Refer to your CloudTrail logs as the authoritative +// source for information about all API calls and whether they were successful +// or denied access. For more information, see Logging IAM Events with CloudTrail +// (http://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html) +// in the IAM User Guide. +// +// The GenerateServiceLastAccessedDetails operation returns a JobId. Use this +// parameter in the following operations to retrieve the following details from +// your report: +// +// * GetServiceLastAccessedDetails – Use this operation for users, groups, +// roles, or policies to list every AWS service that the resource could access +// using permissions policies. For each service, the response includes information +// about the most recent access attempt. +// +// * GetServiceLastAccessedDetailsWithEntities – Use this operation for groups +// and policies to list information about the associated entities (users +// or roles) that attempted to access a specific AWS service. +// +// To check the status of the GenerateServiceLastAccessedDetails request, use +// the JobId parameter in the same operations and test the JobStatus response +// parameter. +// +// For additional information about the permissions policies that allow an identity +// (user, group, or role) to access specific services, use the ListPoliciesGrantingServiceAccess +// operation. +// +// Service last accessed data does not use other policy types when determining +// whether a resource could access a service. These other policy types include +// resource-based policies, access control lists, AWS Organizations policies, +// IAM permissions boundaries, and AWS STS assume role policies. It only applies +// permissions policy logic. For more about the evaluation of policy types, +// see Evaluating Policies (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics) +// in the IAM User Guide. +// +// For more information about service last accessed data, see Reducing Policy +// Scope by Viewing User Activity (http://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html) +// in the IAM 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 AWS Identity and Access Management's +// API operation GenerateServiceLastAccessedDetails for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNoSuchEntityException "NoSuchEntity" +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. +// +// * ErrCodeInvalidInputException "InvalidInput" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GenerateServiceLastAccessedDetails +func (c *IAM) GenerateServiceLastAccessedDetails(input *GenerateServiceLastAccessedDetailsInput) (*GenerateServiceLastAccessedDetailsOutput, error) { + req, out := c.GenerateServiceLastAccessedDetailsRequest(input) + return out, req.Send() +} + +// GenerateServiceLastAccessedDetailsWithContext is the same as GenerateServiceLastAccessedDetails with the addition of +// the ability to pass a context and additional request options. +// +// See GenerateServiceLastAccessedDetails 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 *IAM) GenerateServiceLastAccessedDetailsWithContext(ctx aws.Context, input *GenerateServiceLastAccessedDetailsInput, opts ...request.Option) (*GenerateServiceLastAccessedDetailsOutput, error) { + req, out := c.GenerateServiceLastAccessedDetailsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetAccessKeyLastUsed = "GetAccessKeyLastUsed" // GetAccessKeyLastUsedRequest generates a "aws/request.Request" representing the // client's request for the GetAccessKeyLastUsed operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5090,8 +5210,8 @@ func (c *IAM) GetAccessKeyLastUsedRequest(input *GetAccessKeyLastUsedInput) (req // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetAccessKeyLastUsed func (c *IAM) GetAccessKeyLastUsed(input *GetAccessKeyLastUsedInput) (*GetAccessKeyLastUsedOutput, error) { @@ -5120,7 +5240,7 @@ const opGetAccountAuthorizationDetails = "GetAccountAuthorizationDetails" // GetAccountAuthorizationDetailsRequest generates a "aws/request.Request" representing the // client's request for the GetAccountAuthorizationDetails operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5268,7 +5388,7 @@ const opGetAccountPasswordPolicy = "GetAccountPasswordPolicy" // GetAccountPasswordPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetAccountPasswordPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5319,8 +5439,8 @@ func (c *IAM) GetAccountPasswordPolicyRequest(input *GetAccountPasswordPolicyInp // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -5353,7 +5473,7 @@ const opGetAccountSummary = "GetAccountSummary" // GetAccountSummaryRequest generates a "aws/request.Request" representing the // client's request for the GetAccountSummary operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5437,7 +5557,7 @@ const opGetContextKeysForCustomPolicy = "GetContextKeysForCustomPolicy" // GetContextKeysForCustomPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetContextKeysForCustomPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5526,7 +5646,7 @@ const opGetContextKeysForPrincipalPolicy = "GetContextKeysForPrincipalPolicy" // GetContextKeysForPrincipalPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetContextKeysForPrincipalPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5592,8 +5712,8 @@ func (c *IAM) GetContextKeysForPrincipalPolicyRequest(input *GetContextKeysForPr // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeInvalidInputException "InvalidInput" // The request was rejected because an invalid or out-of-range value was supplied @@ -5626,7 +5746,7 @@ const opGetCredentialReport = "GetCredentialReport" // GetCredentialReportRequest generates a "aws/request.Request" representing the // client's request for the GetCredentialReport operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5722,7 +5842,7 @@ const opGetGroup = "GetGroup" // GetGroupRequest generates a "aws/request.Request" representing the // client's request for the GetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5779,8 +5899,8 @@ func (c *IAM) GetGroupRequest(input *GetGroupInput) (req *request.Request, outpu // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -5863,7 +5983,7 @@ const opGetGroupPolicy = "GetGroupPolicy" // GetGroupPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetGroupPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5929,8 +6049,8 @@ func (c *IAM) GetGroupPolicyRequest(input *GetGroupPolicyInput) (req *request.Re // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -5963,7 +6083,7 @@ const opGetInstanceProfile = "GetInstanceProfile" // GetInstanceProfileRequest generates a "aws/request.Request" representing the // client's request for the GetInstanceProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6016,8 +6136,8 @@ func (c *IAM) GetInstanceProfileRequest(input *GetInstanceProfileInput) (req *re // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -6050,7 +6170,7 @@ const opGetLoginProfile = "GetLoginProfile" // GetLoginProfileRequest generates a "aws/request.Request" representing the // client's request for the GetLoginProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6102,8 +6222,8 @@ func (c *IAM) GetLoginProfileRequest(input *GetLoginProfileInput) (req *request. // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -6136,7 +6256,7 @@ const opGetOpenIDConnectProvider = "GetOpenIDConnectProvider" // GetOpenIDConnectProviderRequest generates a "aws/request.Request" representing the // client's request for the GetOpenIDConnectProvider operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6191,8 +6311,8 @@ func (c *IAM) GetOpenIDConnectProviderRequest(input *GetOpenIDConnectProviderInp // for an input parameter. // // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -6225,7 +6345,7 @@ const opGetPolicy = "GetPolicy" // GetPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6288,8 +6408,8 @@ func (c *IAM) GetPolicyRequest(input *GetPolicyInput) (req *request.Request, out // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeInvalidInputException "InvalidInput" // The request was rejected because an invalid or out-of-range value was supplied @@ -6326,7 +6446,7 @@ const opGetPolicyVersion = "GetPolicyVersion" // GetPolicyVersionRequest generates a "aws/request.Request" representing the // client's request for the GetPolicyVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6397,8 +6517,8 @@ func (c *IAM) GetPolicyVersionRequest(input *GetPolicyVersionInput) (req *reques // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeInvalidInputException "InvalidInput" // The request was rejected because an invalid or out-of-range value was supplied @@ -6435,7 +6555,7 @@ const opGetRole = "GetRole" // GetRoleRequest generates a "aws/request.Request" representing the // client's request for the GetRole operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6493,8 +6613,8 @@ func (c *IAM) GetRoleRequest(input *GetRoleInput) (req *request.Request, output // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -6527,7 +6647,7 @@ const opGetRolePolicy = "GetRolePolicy" // GetRolePolicyRequest generates a "aws/request.Request" representing the // client's request for the GetRolePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6596,8 +6716,8 @@ func (c *IAM) GetRolePolicyRequest(input *GetRolePolicyInput) (req *request.Requ // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -6630,7 +6750,7 @@ const opGetSAMLProvider = "GetSAMLProvider" // GetSAMLProviderRequest generates a "aws/request.Request" representing the // client's request for the GetSAMLProvider operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6683,8 +6803,8 @@ func (c *IAM) GetSAMLProviderRequest(input *GetSAMLProviderInput) (req *request. // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeInvalidInputException "InvalidInput" // The request was rejected because an invalid or out-of-range value was supplied @@ -6721,7 +6841,7 @@ const opGetSSHPublicKey = "GetSSHPublicKey" // GetSSHPublicKeyRequest generates a "aws/request.Request" representing the // client's request for the GetSSHPublicKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6777,8 +6897,8 @@ func (c *IAM) GetSSHPublicKeyRequest(input *GetSSHPublicKeyInput) (req *request. // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeUnrecognizedPublicKeyEncodingException "UnrecognizedPublicKeyEncoding" // The request was rejected because the public key encoding format is unsupported @@ -6811,7 +6931,7 @@ const opGetServerCertificate = "GetServerCertificate" // GetServerCertificateRequest generates a "aws/request.Request" representing the // client's request for the GetServerCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6866,8 +6986,8 @@ func (c *IAM) GetServerCertificateRequest(input *GetServerCertificateInput) (req // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -6895,12 +7015,236 @@ func (c *IAM) GetServerCertificateWithContext(ctx aws.Context, input *GetServerC return out, req.Send() } +const opGetServiceLastAccessedDetails = "GetServiceLastAccessedDetails" + +// GetServiceLastAccessedDetailsRequest generates a "aws/request.Request" representing the +// client's request for the GetServiceLastAccessedDetails 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 GetServiceLastAccessedDetails for more information on using the GetServiceLastAccessedDetails +// 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 GetServiceLastAccessedDetailsRequest method. +// req, resp := client.GetServiceLastAccessedDetailsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetServiceLastAccessedDetails +func (c *IAM) GetServiceLastAccessedDetailsRequest(input *GetServiceLastAccessedDetailsInput) (req *request.Request, output *GetServiceLastAccessedDetailsOutput) { + op := &request.Operation{ + Name: opGetServiceLastAccessedDetails, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetServiceLastAccessedDetailsInput{} + } + + output = &GetServiceLastAccessedDetailsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetServiceLastAccessedDetails API operation for AWS Identity and Access Management. +// +// After you generate a user, group, role, or policy report using the GenerateServiceLastAccessedDetails +// operation, you can use the JobId parameter in GetServiceLastAccessedDetails. +// This operation retrieves the status of your report job and a list of AWS +// services that the resource (user, group, role, or managed policy) can access. +// +// Service last accessed data does not use other policy types when determining +// whether a resource could access a service. These other policy types include +// resource-based policies, access control lists, AWS Organizations policies, +// IAM permissions boundaries, and AWS STS assume role policies. It only applies +// permissions policy logic. For more about the evaluation of policy types, +// see Evaluating Policies (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics) +// in the IAM User Guide. +// +// For each service that the resource could access using permissions policies, +// the operation returns details about the most recent access attempt. If there +// was no attempt, the service is listed without details about the most recent +// attempt to access the service. If the operation fails, the GetServiceLastAccessedDetails +// operation returns the reason that it failed. +// +// The GetServiceLastAccessedDetails operation returns a list of services that +// includes the number of entities that have attempted to access the service +// and the date and time of the last attempt. It also returns the ARN of the +// following entity, depending on the resource ARN that you used to generate +// the report: +// +// * User – Returns the user ARN that you used to generate the report +// +// * Group – Returns the ARN of the group member (user) that last attempted +// to access the service +// +// * Role – Returns the role ARN that you used to generate the report +// +// * Policy – Returns the ARN of the user or role that last used the policy +// to attempt to access the service +// +// By default, the list is sorted by service namespace. +// +// 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 Identity and Access Management's +// API operation GetServiceLastAccessedDetails for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNoSuchEntityException "NoSuchEntity" +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. +// +// * ErrCodeInvalidInputException "InvalidInput" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetServiceLastAccessedDetails +func (c *IAM) GetServiceLastAccessedDetails(input *GetServiceLastAccessedDetailsInput) (*GetServiceLastAccessedDetailsOutput, error) { + req, out := c.GetServiceLastAccessedDetailsRequest(input) + return out, req.Send() +} + +// GetServiceLastAccessedDetailsWithContext is the same as GetServiceLastAccessedDetails with the addition of +// the ability to pass a context and additional request options. +// +// See GetServiceLastAccessedDetails 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 *IAM) GetServiceLastAccessedDetailsWithContext(ctx aws.Context, input *GetServiceLastAccessedDetailsInput, opts ...request.Option) (*GetServiceLastAccessedDetailsOutput, error) { + req, out := c.GetServiceLastAccessedDetailsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetServiceLastAccessedDetailsWithEntities = "GetServiceLastAccessedDetailsWithEntities" + +// GetServiceLastAccessedDetailsWithEntitiesRequest generates a "aws/request.Request" representing the +// client's request for the GetServiceLastAccessedDetailsWithEntities 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 GetServiceLastAccessedDetailsWithEntities for more information on using the GetServiceLastAccessedDetailsWithEntities +// 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 GetServiceLastAccessedDetailsWithEntitiesRequest method. +// req, resp := client.GetServiceLastAccessedDetailsWithEntitiesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetServiceLastAccessedDetailsWithEntities +func (c *IAM) GetServiceLastAccessedDetailsWithEntitiesRequest(input *GetServiceLastAccessedDetailsWithEntitiesInput) (req *request.Request, output *GetServiceLastAccessedDetailsWithEntitiesOutput) { + op := &request.Operation{ + Name: opGetServiceLastAccessedDetailsWithEntities, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetServiceLastAccessedDetailsWithEntitiesInput{} + } + + output = &GetServiceLastAccessedDetailsWithEntitiesOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetServiceLastAccessedDetailsWithEntities API operation for AWS Identity and Access Management. +// +// After you generate a group or policy report using the GenerateServiceLastAccessedDetails +// operation, you can use the JobId parameter in GetServiceLastAccessedDetailsWithEntities. +// This operation retrieves the status of your report job and a list of entities +// that could have used group or policy permissions to access the specified +// service. +// +// * Group – For a group report, this operation returns a list of users in +// the group that could have used the group’s policies in an attempt to access +// the service. +// +// * Policy – For a policy report, this operation returns a list of entities +// (users or roles) that could have used the policy in an attempt to access +// the service. +// +// You can also use this operation for user or role reports to retrieve details +// about those entities. +// +// If the operation fails, the GetServiceLastAccessedDetailsWithEntities operation +// returns the reason that it failed. +// +// By default, the list of associated entities is sorted by date, with the most +// recent access listed first. +// +// 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 Identity and Access Management's +// API operation GetServiceLastAccessedDetailsWithEntities for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNoSuchEntityException "NoSuchEntity" +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. +// +// * ErrCodeInvalidInputException "InvalidInput" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/GetServiceLastAccessedDetailsWithEntities +func (c *IAM) GetServiceLastAccessedDetailsWithEntities(input *GetServiceLastAccessedDetailsWithEntitiesInput) (*GetServiceLastAccessedDetailsWithEntitiesOutput, error) { + req, out := c.GetServiceLastAccessedDetailsWithEntitiesRequest(input) + return out, req.Send() +} + +// GetServiceLastAccessedDetailsWithEntitiesWithContext is the same as GetServiceLastAccessedDetailsWithEntities with the addition of +// the ability to pass a context and additional request options. +// +// See GetServiceLastAccessedDetailsWithEntities 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 *IAM) GetServiceLastAccessedDetailsWithEntitiesWithContext(ctx aws.Context, input *GetServiceLastAccessedDetailsWithEntitiesInput, opts ...request.Option) (*GetServiceLastAccessedDetailsWithEntitiesOutput, error) { + req, out := c.GetServiceLastAccessedDetailsWithEntitiesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetServiceLinkedRoleDeletionStatus = "GetServiceLinkedRoleDeletionStatus" // GetServiceLinkedRoleDeletionStatusRequest generates a "aws/request.Request" representing the // client's request for the GetServiceLinkedRoleDeletionStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6955,8 +7299,8 @@ func (c *IAM) GetServiceLinkedRoleDeletionStatusRequest(input *GetServiceLinkedR // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeInvalidInputException "InvalidInput" // The request was rejected because an invalid or out-of-range value was supplied @@ -6993,7 +7337,7 @@ const opGetUser = "GetUser" // GetUserRequest generates a "aws/request.Request" representing the // client's request for the GetUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7047,8 +7391,8 @@ func (c *IAM) GetUserRequest(input *GetUserInput) (req *request.Request, output // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -7081,7 +7425,7 @@ const opGetUserPolicy = "GetUserPolicy" // GetUserPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetUserPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7147,8 +7491,8 @@ func (c *IAM) GetUserPolicyRequest(input *GetUserPolicyInput) (req *request.Requ // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -7181,7 +7525,7 @@ const opListAccessKeys = "ListAccessKeys" // ListAccessKeysRequest generates a "aws/request.Request" representing the // client's request for the ListAccessKeys operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7227,16 +7571,16 @@ func (c *IAM) ListAccessKeysRequest(input *ListAccessKeysInput) (req *request.Re // ListAccessKeys API operation for AWS Identity and Access Management. // // Returns information about the access key IDs associated with the specified -// IAM user. If there are none, the operation returns an empty list. +// IAM user. If there is none, the operation returns an empty list. // // Although each user is limited to a small number of keys, you can still paginate // the results using the MaxItems and Marker parameters. // // If the UserName field is not specified, the user name is determined implicitly -// based on the AWS access key ID used to sign the request. Because this operation -// works for access keys under the AWS account, you can use this operation to -// manage AWS account root user credentials even if the AWS account has no associated -// users. +// based on the AWS access key ID used to sign the request. This operation works +// for access keys under the AWS account. Consequently, you can use this operation +// to manage AWS account root user credentials even if the AWS account has no +// associated users. // // To ensure the security of your AWS account, the secret access key is accessible // only during key and user creation. @@ -7250,8 +7594,8 @@ func (c *IAM) ListAccessKeysRequest(input *ListAccessKeysInput) (req *request.Re // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -7334,7 +7678,7 @@ const opListAccountAliases = "ListAccountAliases" // ListAccountAliasesRequest generates a "aws/request.Request" representing the // client's request for the ListAccountAliases operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7473,7 +7817,7 @@ const opListAttachedGroupPolicies = "ListAttachedGroupPolicies" // ListAttachedGroupPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListAttachedGroupPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7540,8 +7884,8 @@ func (c *IAM) ListAttachedGroupPoliciesRequest(input *ListAttachedGroupPoliciesI // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeInvalidInputException "InvalidInput" // The request was rejected because an invalid or out-of-range value was supplied @@ -7628,7 +7972,7 @@ const opListAttachedRolePolicies = "ListAttachedRolePolicies" // ListAttachedRolePoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListAttachedRolePolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7695,8 +8039,8 @@ func (c *IAM) ListAttachedRolePoliciesRequest(input *ListAttachedRolePoliciesInp // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeInvalidInputException "InvalidInput" // The request was rejected because an invalid or out-of-range value was supplied @@ -7783,7 +8127,7 @@ const opListAttachedUserPolicies = "ListAttachedUserPolicies" // ListAttachedUserPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListAttachedUserPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7850,8 +8194,8 @@ func (c *IAM) ListAttachedUserPoliciesRequest(input *ListAttachedUserPoliciesInp // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeInvalidInputException "InvalidInput" // The request was rejected because an invalid or out-of-range value was supplied @@ -7938,7 +8282,7 @@ const opListEntitiesForPolicy = "ListEntitiesForPolicy" // ListEntitiesForPolicyRequest generates a "aws/request.Request" representing the // client's request for the ListEntitiesForPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8002,8 +8346,8 @@ func (c *IAM) ListEntitiesForPolicyRequest(input *ListEntitiesForPolicyInput) (r // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeInvalidInputException "InvalidInput" // The request was rejected because an invalid or out-of-range value was supplied @@ -8090,7 +8434,7 @@ const opListGroupPolicies = "ListGroupPolicies" // ListGroupPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListGroupPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8157,8 +8501,8 @@ func (c *IAM) ListGroupPoliciesRequest(input *ListGroupPoliciesInput) (req *requ // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -8241,7 +8585,7 @@ const opListGroups = "ListGroups" // ListGroupsRequest generates a "aws/request.Request" representing the // client's request for the ListGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8379,7 +8723,7 @@ const opListGroupsForUser = "ListGroupsForUser" // ListGroupsForUserRequest generates a "aws/request.Request" representing the // client's request for the ListGroupsForUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8437,8 +8781,8 @@ func (c *IAM) ListGroupsForUserRequest(input *ListGroupsForUserInput) (req *requ // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -8521,7 +8865,7 @@ const opListInstanceProfiles = "ListInstanceProfiles" // ListInstanceProfilesRequest generates a "aws/request.Request" representing the // client's request for the ListInstanceProfiles operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8661,7 +9005,7 @@ const opListInstanceProfilesForRole = "ListInstanceProfilesForRole" // ListInstanceProfilesForRoleRequest generates a "aws/request.Request" representing the // client's request for the ListInstanceProfilesForRole operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8721,8 +9065,8 @@ func (c *IAM) ListInstanceProfilesForRoleRequest(input *ListInstanceProfilesForR // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -8805,7 +9149,7 @@ const opListMFADevices = "ListMFADevices" // ListMFADevicesRequest generates a "aws/request.Request" representing the // client's request for the ListMFADevices operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8866,8 +9210,8 @@ func (c *IAM) ListMFADevicesRequest(input *ListMFADevicesInput) (req *request.Re // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -8950,7 +9294,7 @@ const opListOpenIDConnectProviders = "ListOpenIDConnectProviders" // ListOpenIDConnectProvidersRequest generates a "aws/request.Request" representing the // client's request for the ListOpenIDConnectProviders operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9031,7 +9375,7 @@ const opListPolicies = "ListPolicies" // ListPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9174,90 +9518,208 @@ func (c *IAM) ListPoliciesPagesWithContext(ctx aws.Context, input *ListPoliciesI return p.Err() } -const opListPolicyVersions = "ListPolicyVersions" +const opListPoliciesGrantingServiceAccess = "ListPoliciesGrantingServiceAccess" -// ListPolicyVersionsRequest generates a "aws/request.Request" representing the -// client's request for the ListPolicyVersions operation. The "output" return +// ListPoliciesGrantingServiceAccessRequest generates a "aws/request.Request" representing the +// client's request for the ListPoliciesGrantingServiceAccess operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 ListPolicyVersions for more information on using the ListPolicyVersions +// See ListPoliciesGrantingServiceAccess for more information on using the ListPoliciesGrantingServiceAccess // 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 ListPolicyVersionsRequest method. -// req, resp := client.ListPolicyVersionsRequest(params) +// // Example sending a request using the ListPoliciesGrantingServiceAccessRequest method. +// req, resp := client.ListPoliciesGrantingServiceAccessRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListPolicyVersions -func (c *IAM) ListPolicyVersionsRequest(input *ListPolicyVersionsInput) (req *request.Request, output *ListPolicyVersionsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListPoliciesGrantingServiceAccess +func (c *IAM) ListPoliciesGrantingServiceAccessRequest(input *ListPoliciesGrantingServiceAccessInput) (req *request.Request, output *ListPoliciesGrantingServiceAccessOutput) { op := &request.Operation{ - Name: opListPolicyVersions, + Name: opListPoliciesGrantingServiceAccess, HTTPMethod: "POST", HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"Marker"}, - LimitToken: "MaxItems", - TruncationToken: "IsTruncated", - }, } if input == nil { - input = &ListPolicyVersionsInput{} + input = &ListPoliciesGrantingServiceAccessInput{} } - output = &ListPolicyVersionsOutput{} + output = &ListPoliciesGrantingServiceAccessOutput{} req = c.newRequest(op, input, output) return } -// ListPolicyVersions API operation for AWS Identity and Access Management. +// ListPoliciesGrantingServiceAccess API operation for AWS Identity and Access Management. // -// Lists information about the versions of the specified managed policy, including -// the version that is currently set as the policy's default version. +// Retrieves a list of policies that the IAM identity (user, group, or role) +// can use to access each specified service. // -// For more information about managed policies, see Managed Policies and Inline -// Policies (http://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// This operation does not use other policy types when determining whether a +// resource could access a service. These other policy types include resource-based +// policies, access control lists, AWS Organizations policies, IAM permissions +// boundaries, and AWS STS assume role policies. It only applies permissions +// policy logic. For more about the evaluation of policy types, see Evaluating +// Policies (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-basics) // in the IAM User Guide. // +// The list of policies returned by the operation depends on the ARN of the +// identity that you provide. +// +// * User – The list of policies includes the managed and inline policies +// that are attached to the user directly. The list also includes any additional +// managed and inline policies that are attached to the group to which the +// user belongs. +// +// * Group – The list of policies includes only the managed and inline policies +// that are attached to the group directly. Policies that are attached to +// the group’s user are not included. +// +// * Role – The list of policies includes only the managed and inline policies +// that are attached to the role. +// +// For each managed policy, this operation returns the ARN and policy name. +// For each inline policy, it returns the policy name and the entity to which +// it is attached. Inline policies do not have an ARN. For more information +// about these policy types, see Managed Policies and Inline Policies (http://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html) +// in the IAM User Guide. +// +// Policies that are attached to users and roles as permissions boundaries are +// not returned. To view which managed policy is currently used to set the permissions +// boundary for a user or role, use the GetUser or GetRole operations. +// // 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 Identity and Access Management's -// API operation ListPolicyVersions for usage and error information. +// API operation ListPoliciesGrantingServiceAccess for usage and error information. // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeInvalidInputException "InvalidInput" // The request was rejected because an invalid or out-of-range value was supplied // for an input parameter. // -// * ErrCodeServiceFailureException "ServiceFailure" -// The request processing has failed because of an unknown error, exception -// or failure. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListPolicyVersions -func (c *IAM) ListPolicyVersions(input *ListPolicyVersionsInput) (*ListPolicyVersionsOutput, error) { - req, out := c.ListPolicyVersionsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListPoliciesGrantingServiceAccess +func (c *IAM) ListPoliciesGrantingServiceAccess(input *ListPoliciesGrantingServiceAccessInput) (*ListPoliciesGrantingServiceAccessOutput, error) { + req, out := c.ListPoliciesGrantingServiceAccessRequest(input) return out, req.Send() } -// ListPolicyVersionsWithContext is the same as ListPolicyVersions with the addition of +// ListPoliciesGrantingServiceAccessWithContext is the same as ListPoliciesGrantingServiceAccess with the addition of +// the ability to pass a context and additional request options. +// +// See ListPoliciesGrantingServiceAccess 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 *IAM) ListPoliciesGrantingServiceAccessWithContext(ctx aws.Context, input *ListPoliciesGrantingServiceAccessInput, opts ...request.Option) (*ListPoliciesGrantingServiceAccessOutput, error) { + req, out := c.ListPoliciesGrantingServiceAccessRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListPolicyVersions = "ListPolicyVersions" + +// ListPolicyVersionsRequest generates a "aws/request.Request" representing the +// client's request for the ListPolicyVersions 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 ListPolicyVersions for more information on using the ListPolicyVersions +// 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 ListPolicyVersionsRequest method. +// req, resp := client.ListPolicyVersionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListPolicyVersions +func (c *IAM) ListPolicyVersionsRequest(input *ListPolicyVersionsInput) (req *request.Request, output *ListPolicyVersionsOutput) { + op := &request.Operation{ + Name: opListPolicyVersions, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "MaxItems", + TruncationToken: "IsTruncated", + }, + } + + if input == nil { + input = &ListPolicyVersionsInput{} + } + + output = &ListPolicyVersionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListPolicyVersions API operation for AWS Identity and Access Management. +// +// Lists information about the versions of the specified managed policy, including +// the version that is currently set as the policy's default version. +// +// For more information about managed policies, see Managed Policies and Inline +// Policies (http://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) +// in the IAM 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 AWS Identity and Access Management's +// API operation ListPolicyVersions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNoSuchEntityException "NoSuchEntity" +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. +// +// * ErrCodeInvalidInputException "InvalidInput" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeServiceFailureException "ServiceFailure" +// The request processing has failed because of an unknown error, exception +// or failure. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListPolicyVersions +func (c *IAM) ListPolicyVersions(input *ListPolicyVersionsInput) (*ListPolicyVersionsOutput, error) { + req, out := c.ListPolicyVersionsRequest(input) + return out, req.Send() +} + +// ListPolicyVersionsWithContext is the same as ListPolicyVersions with the addition of // the ability to pass a context and additional request options. // // See ListPolicyVersions for details on how to use this API operation. @@ -9328,7 +9790,7 @@ const opListRolePolicies = "ListRolePolicies" // ListRolePoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListRolePolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9394,8 +9856,8 @@ func (c *IAM) ListRolePoliciesRequest(input *ListRolePoliciesInput) (req *reques // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -9473,12 +9935,99 @@ func (c *IAM) ListRolePoliciesPagesWithContext(ctx aws.Context, input *ListRoleP return p.Err() } +const opListRoleTags = "ListRoleTags" + +// ListRoleTagsRequest generates a "aws/request.Request" representing the +// client's request for the ListRoleTags 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 ListRoleTags for more information on using the ListRoleTags +// 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 ListRoleTagsRequest method. +// req, resp := client.ListRoleTagsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListRoleTags +func (c *IAM) ListRoleTagsRequest(input *ListRoleTagsInput) (req *request.Request, output *ListRoleTagsOutput) { + op := &request.Operation{ + Name: opListRoleTags, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListRoleTagsInput{} + } + + output = &ListRoleTagsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListRoleTags API operation for AWS Identity and Access Management. +// +// Lists the tags that are attached to the specified role. The returned list +// of tags is sorted by tag key. For more information about tagging, see Tagging +// IAM Identities (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) +// in the IAM 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 AWS Identity and Access Management's +// API operation ListRoleTags for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNoSuchEntityException "NoSuchEntity" +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. +// +// * ErrCodeServiceFailureException "ServiceFailure" +// The request processing has failed because of an unknown error, exception +// or failure. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListRoleTags +func (c *IAM) ListRoleTags(input *ListRoleTagsInput) (*ListRoleTagsOutput, error) { + req, out := c.ListRoleTagsRequest(input) + return out, req.Send() +} + +// ListRoleTagsWithContext is the same as ListRoleTags with the addition of +// the ability to pass a context and additional request options. +// +// See ListRoleTags 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 *IAM) ListRoleTagsWithContext(ctx aws.Context, input *ListRoleTagsInput, opts ...request.Option) (*ListRoleTagsOutput, error) { + req, out := c.ListRoleTagsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListRoles = "ListRoles" // ListRolesRequest generates a "aws/request.Request" representing the // client's request for the ListRoles operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9618,7 +10167,7 @@ const opListSAMLProviders = "ListSAMLProviders" // ListSAMLProvidersRequest generates a "aws/request.Request" representing the // client's request for the ListSAMLProviders operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9700,7 +10249,7 @@ const opListSSHPublicKeys = "ListSSHPublicKeys" // ListSSHPublicKeysRequest generates a "aws/request.Request" representing the // client's request for the ListSSHPublicKeys operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9746,7 +10295,7 @@ func (c *IAM) ListSSHPublicKeysRequest(input *ListSSHPublicKeysInput) (req *requ // ListSSHPublicKeys API operation for AWS Identity and Access Management. // // Returns information about the SSH public keys associated with the specified -// IAM user. If there are none, the operation returns an empty list. +// IAM user. If there none exists, the operation returns an empty list. // // The SSH public keys returned by this operation are used only for authenticating // the IAM user to an AWS CodeCommit repository. For more information about @@ -9766,8 +10315,8 @@ func (c *IAM) ListSSHPublicKeysRequest(input *ListSSHPublicKeysInput) (req *requ // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListSSHPublicKeys func (c *IAM) ListSSHPublicKeys(input *ListSSHPublicKeysInput) (*ListSSHPublicKeysOutput, error) { @@ -9846,7 +10395,7 @@ const opListServerCertificates = "ListServerCertificates" // ListServerCertificatesRequest generates a "aws/request.Request" representing the // client's request for the ListServerCertificates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9990,7 +10539,7 @@ const opListServiceSpecificCredentials = "ListServiceSpecificCredentials" // ListServiceSpecificCredentialsRequest generates a "aws/request.Request" representing the // client's request for the ListServiceSpecificCredentials operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10030,9 +10579,9 @@ func (c *IAM) ListServiceSpecificCredentialsRequest(input *ListServiceSpecificCr // ListServiceSpecificCredentials API operation for AWS Identity and Access Management. // // Returns information about the service-specific credentials associated with -// the specified IAM user. If there are none, the operation returns an empty -// list. The service-specific credentials returned by this operation are used -// only for authenticating the IAM user to a specific service. For more information +// the specified IAM user. If none exists, the operation returns an empty list. +// The service-specific credentials returned by this operation are used only +// for authenticating the IAM user to a specific service. For more information // about using service-specific credentials to authenticate to an AWS service, // see Set Up service-specific credentials (http://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html) // in the AWS CodeCommit User Guide. @@ -10046,8 +10595,8 @@ func (c *IAM) ListServiceSpecificCredentialsRequest(input *ListServiceSpecificCr // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceNotSupportedException "NotSupportedService" // The specified service does not support service-specific credentials. @@ -10079,7 +10628,7 @@ const opListSigningCertificates = "ListSigningCertificates" // ListSigningCertificatesRequest generates a "aws/request.Request" representing the // client's request for the ListSigningCertificates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10125,16 +10674,16 @@ func (c *IAM) ListSigningCertificatesRequest(input *ListSigningCertificatesInput // ListSigningCertificates API operation for AWS Identity and Access Management. // // Returns information about the signing certificates associated with the specified -// IAM user. If there are none, the operation returns an empty list. +// IAM user. If there none exists, the operation returns an empty list. // // Although each user is limited to a small number of signing certificates, // you can still paginate the results using the MaxItems and Marker parameters. // // If the UserName field is not specified, the user name is determined implicitly -// based on the AWS access key ID used to sign the request for this API. Because -// this operation works for access keys under the AWS account, you can use this -// operation to manage AWS account root user credentials even if the AWS account -// has no associated users. +// based on the AWS access key ID used to sign the request for this API. This +// operation works for access keys under the AWS account. Consequently, you +// can use this operation to manage AWS account root user credentials even if +// the AWS account has no associated users. // // 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 @@ -10145,8 +10694,8 @@ func (c *IAM) ListSigningCertificatesRequest(input *ListSigningCertificatesInput // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -10229,7 +10778,7 @@ const opListUserPolicies = "ListUserPolicies" // ListUserPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListUserPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10294,8 +10843,8 @@ func (c *IAM) ListUserPoliciesRequest(input *ListUserPoliciesInput) (req *reques // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -10373,12 +10922,99 @@ func (c *IAM) ListUserPoliciesPagesWithContext(ctx aws.Context, input *ListUserP return p.Err() } +const opListUserTags = "ListUserTags" + +// ListUserTagsRequest generates a "aws/request.Request" representing the +// client's request for the ListUserTags 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 ListUserTags for more information on using the ListUserTags +// 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 ListUserTagsRequest method. +// req, resp := client.ListUserTagsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListUserTags +func (c *IAM) ListUserTagsRequest(input *ListUserTagsInput) (req *request.Request, output *ListUserTagsOutput) { + op := &request.Operation{ + Name: opListUserTags, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListUserTagsInput{} + } + + output = &ListUserTagsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListUserTags API operation for AWS Identity and Access Management. +// +// Lists the tags that are attached to the specified user. The returned list +// of tags is sorted by tag key. For more information about tagging, see Tagging +// IAM Identities (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) +// in the IAM 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 AWS Identity and Access Management's +// API operation ListUserTags for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNoSuchEntityException "NoSuchEntity" +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. +// +// * ErrCodeServiceFailureException "ServiceFailure" +// The request processing has failed because of an unknown error, exception +// or failure. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ListUserTags +func (c *IAM) ListUserTags(input *ListUserTagsInput) (*ListUserTagsOutput, error) { + req, out := c.ListUserTagsRequest(input) + return out, req.Send() +} + +// ListUserTagsWithContext is the same as ListUserTags with the addition of +// the ability to pass a context and additional request options. +// +// See ListUserTags 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 *IAM) ListUserTagsWithContext(ctx aws.Context, input *ListUserTagsInput, opts ...request.Option) (*ListUserTagsOutput, error) { + req, out := c.ListUserTagsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListUsers = "ListUsers" // ListUsersRequest generates a "aws/request.Request" representing the // client's request for the ListUsers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10518,7 +11154,7 @@ const opListVirtualMFADevices = "ListVirtualMFADevices" // ListVirtualMFADevicesRequest generates a "aws/request.Request" representing the // client's request for the ListVirtualMFADevices operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10653,7 +11289,7 @@ const opPutGroupPolicy = "PutGroupPolicy" // PutGroupPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutGroupPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10687,8 +11323,7 @@ func (c *IAM) PutGroupPolicyRequest(input *PutGroupPolicyInput) (req *request.Re output = &PutGroupPolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -10729,8 +11364,8 @@ func (c *IAM) PutGroupPolicyRequest(input *PutGroupPolicyInput) (req *request.Re // message describes the specific error. // // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -10763,7 +11398,7 @@ const opPutRolePermissionsBoundary = "PutRolePermissionsBoundary" // PutRolePermissionsBoundaryRequest generates a "aws/request.Request" representing the // client's request for the PutRolePermissionsBoundary operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10797,8 +11432,7 @@ func (c *IAM) PutRolePermissionsBoundaryRequest(input *PutRolePermissionsBoundar output = &PutRolePermissionsBoundaryOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -10815,7 +11449,7 @@ func (c *IAM) PutRolePermissionsBoundaryRequest(input *PutRolePermissionsBoundar // Policies used as permissions boundaries do not provide permissions. You must // also attach a permissions policy to the role. To learn how the effective // permissions for a role are evaluated, see IAM JSON Policy Evaluation Logic -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html) +// (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html) // in the IAM User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -10827,8 +11461,8 @@ func (c *IAM) PutRolePermissionsBoundaryRequest(input *PutRolePermissionsBoundar // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeInvalidInputException "InvalidInput" // The request was rejected because an invalid or out-of-range value was supplied @@ -10875,7 +11509,7 @@ const opPutRolePolicy = "PutRolePolicy" // PutRolePolicyRequest generates a "aws/request.Request" representing the // client's request for the PutRolePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10909,8 +11543,7 @@ func (c *IAM) PutRolePolicyRequest(input *PutRolePolicyInput) (req *request.Requ output = &PutRolePolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -10957,8 +11590,8 @@ func (c *IAM) PutRolePolicyRequest(input *PutRolePolicyInput) (req *request.Requ // message describes the specific error. // // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeUnmodifiableEntityException "UnmodifiableEntity" // The request was rejected because only the service that depends on the service-linked @@ -10997,7 +11630,7 @@ const opPutUserPermissionsBoundary = "PutUserPermissionsBoundary" // PutUserPermissionsBoundaryRequest generates a "aws/request.Request" representing the // client's request for the PutUserPermissionsBoundary operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11031,8 +11664,7 @@ func (c *IAM) PutUserPermissionsBoundaryRequest(input *PutUserPermissionsBoundar output = &PutUserPermissionsBoundaryOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -11047,7 +11679,7 @@ func (c *IAM) PutUserPermissionsBoundaryRequest(input *PutUserPermissionsBoundar // Policies that are used as permissions boundaries do not provide permissions. // You must also attach a permissions policy to the user. To learn how the effective // permissions for a user are evaluated, see IAM JSON Policy Evaluation Logic -// (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html) +// (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html) // in the IAM User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -11059,8 +11691,8 @@ func (c *IAM) PutUserPermissionsBoundaryRequest(input *PutUserPermissionsBoundar // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeInvalidInputException "InvalidInput" // The request was rejected because an invalid or out-of-range value was supplied @@ -11101,7 +11733,7 @@ const opPutUserPolicy = "PutUserPolicy" // PutUserPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutUserPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11135,8 +11767,7 @@ func (c *IAM) PutUserPolicyRequest(input *PutUserPolicyInput) (req *request.Requ output = &PutUserPolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -11177,8 +11808,8 @@ func (c *IAM) PutUserPolicyRequest(input *PutUserPolicyInput) (req *request.Requ // message describes the specific error. // // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -11211,7 +11842,7 @@ const opRemoveClientIDFromOpenIDConnectProvider = "RemoveClientIDFromOpenIDConne // RemoveClientIDFromOpenIDConnectProviderRequest generates a "aws/request.Request" representing the // client's request for the RemoveClientIDFromOpenIDConnectProvider operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11245,8 +11876,7 @@ func (c *IAM) RemoveClientIDFromOpenIDConnectProviderRequest(input *RemoveClient output = &RemoveClientIDFromOpenIDConnectProviderOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -11272,8 +11902,8 @@ func (c *IAM) RemoveClientIDFromOpenIDConnectProviderRequest(input *RemoveClient // for an input parameter. // // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -11306,7 +11936,7 @@ const opRemoveRoleFromInstanceProfile = "RemoveRoleFromInstanceProfile" // RemoveRoleFromInstanceProfileRequest generates a "aws/request.Request" representing the // client's request for the RemoveRoleFromInstanceProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11340,8 +11970,7 @@ func (c *IAM) RemoveRoleFromInstanceProfileRequest(input *RemoveRoleFromInstance output = &RemoveRoleFromInstanceProfileOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -11367,8 +11996,8 @@ func (c *IAM) RemoveRoleFromInstanceProfileRequest(input *RemoveRoleFromInstance // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeLimitExceededException "LimitExceeded" // The request was rejected because it attempted to create resources beyond @@ -11411,7 +12040,7 @@ const opRemoveUserFromGroup = "RemoveUserFromGroup" // RemoveUserFromGroupRequest generates a "aws/request.Request" representing the // client's request for the RemoveUserFromGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11445,8 +12074,7 @@ func (c *IAM) RemoveUserFromGroupRequest(input *RemoveUserFromGroupInput) (req * output = &RemoveUserFromGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -11463,8 +12091,8 @@ func (c *IAM) RemoveUserFromGroupRequest(input *RemoveUserFromGroupInput) (req * // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeLimitExceededException "LimitExceeded" // The request was rejected because it attempted to create resources beyond @@ -11501,7 +12129,7 @@ const opResetServiceSpecificCredential = "ResetServiceSpecificCredential" // ResetServiceSpecificCredentialRequest generates a "aws/request.Request" representing the // client's request for the ResetServiceSpecificCredential operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11554,8 +12182,8 @@ func (c *IAM) ResetServiceSpecificCredentialRequest(input *ResetServiceSpecificC // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ResetServiceSpecificCredential func (c *IAM) ResetServiceSpecificCredential(input *ResetServiceSpecificCredentialInput) (*ResetServiceSpecificCredentialOutput, error) { @@ -11584,7 +12212,7 @@ const opResyncMFADevice = "ResyncMFADevice" // ResyncMFADeviceRequest generates a "aws/request.Request" representing the // client's request for the ResyncMFADevice operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11618,8 +12246,7 @@ func (c *IAM) ResyncMFADeviceRequest(input *ResyncMFADeviceInput) (req *request. output = &ResyncMFADeviceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -11645,8 +12272,8 @@ func (c *IAM) ResyncMFADeviceRequest(input *ResyncMFADeviceInput) (req *request. // The error message describes the specific error. // // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeLimitExceededException "LimitExceeded" // The request was rejected because it attempted to create resources beyond @@ -11683,7 +12310,7 @@ const opSetDefaultPolicyVersion = "SetDefaultPolicyVersion" // SetDefaultPolicyVersionRequest generates a "aws/request.Request" representing the // client's request for the SetDefaultPolicyVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11717,8 +12344,7 @@ func (c *IAM) SetDefaultPolicyVersionRequest(input *SetDefaultPolicyVersionInput output = &SetDefaultPolicyVersionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -11744,8 +12370,8 @@ func (c *IAM) SetDefaultPolicyVersionRequest(input *SetDefaultPolicyVersionInput // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeInvalidInputException "InvalidInput" // The request was rejected because an invalid or out-of-range value was supplied @@ -11786,7 +12412,7 @@ const opSimulateCustomPolicy = "SimulateCustomPolicy" // SimulateCustomPolicyRequest generates a "aws/request.Request" representing the // client's request for the SimulateCustomPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11942,7 +12568,7 @@ const opSimulatePrincipalPolicy = "SimulatePrincipalPolicy" // SimulatePrincipalPolicyRequest generates a "aws/request.Request" representing the // client's request for the SimulatePrincipalPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12024,8 +12650,8 @@ func (c *IAM) SimulatePrincipalPolicyRequest(input *SimulatePrincipalPolicyInput // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeInvalidInputException "InvalidInput" // The request was rejected because an invalid or out-of-range value was supplied @@ -12107,63 +12733,84 @@ func (c *IAM) SimulatePrincipalPolicyPagesWithContext(ctx aws.Context, input *Si return p.Err() } -const opUpdateAccessKey = "UpdateAccessKey" +const opTagRole = "TagRole" -// UpdateAccessKeyRequest generates a "aws/request.Request" representing the -// client's request for the UpdateAccessKey operation. The "output" return +// TagRoleRequest generates a "aws/request.Request" representing the +// client's request for the TagRole operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 UpdateAccessKey for more information on using the UpdateAccessKey +// See TagRole for more information on using the TagRole // 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 UpdateAccessKeyRequest method. -// req, resp := client.UpdateAccessKeyRequest(params) +// // Example sending a request using the TagRoleRequest method. +// req, resp := client.TagRoleRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateAccessKey -func (c *IAM) UpdateAccessKeyRequest(input *UpdateAccessKeyInput) (req *request.Request, output *UpdateAccessKeyOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagRole +func (c *IAM) TagRoleRequest(input *TagRoleInput) (req *request.Request, output *TagRoleOutput) { op := &request.Operation{ - Name: opUpdateAccessKey, + Name: opTagRole, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &UpdateAccessKeyInput{} + input = &TagRoleInput{} } - output = &UpdateAccessKeyOutput{} + output = &TagRoleOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// UpdateAccessKey API operation for AWS Identity and Access Management. +// TagRole API operation for AWS Identity and Access Management. // -// Changes the status of the specified access key from Active to Inactive, or -// vice versa. This operation can be used to disable a user's key as part of -// a key rotation workflow. +// Adds one or more tags to an IAM role. The role can be a regular role or a +// service-linked role. If a tag with the same key name already exists, then +// that tag is overwritten with the new value. // -// If the UserName field is not specified, the user name is determined implicitly -// based on the AWS access key ID used to sign the request. Because this operation -// works for access keys under the AWS account, you can use this operation to -// manage AWS account root user credentials even if the AWS account has no associated -// users. +// A tag consists of a key name and an associated value. By assigning tags to +// your resources, you can do the following: // -// For information about rotating keys, see Managing Keys and Certificates (http://docs.aws.amazon.com/IAM/latest/UserGuide/ManagingCredentials.html) +// * Administrative grouping and discovery - Attach tags to resources to +// aid in organization and search. For example, you could search for all +// resources with the key name Project and the value MyImportantProject. +// Or search for all resources with the key name Cost Center and the value +// 41200. +// +// * Access control - Reference tags in IAM user-based and resource-based +// policies. You can use tags to restrict access to only an IAM user or role +// that has a specified tag attached. You can also restrict access to only +// those resources that have a certain tag attached. For examples of policies +// that show how to use tags to control access, see Control Access Using +// IAM Tags (http://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) +// in the IAM User Guide. +// +// * Cost allocation - Use tags to help track which individuals and teams +// are using which AWS resources. +// +// Make sure that you have no invalid tags and that you do not exceed the allowed +// number of tags per role. In either case, the entire request fails and no +// tags are added to the role. +// +// AWS always interprets the tag Value as a single string. If you need to store +// an array, you can store comma-separated values in the string. However, you +// must interpret the value in your code. +// +// For more information about tagging, see Tagging IAM Identities (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) // in the IAM User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -12171,61 +12818,484 @@ func (c *IAM) UpdateAccessKeyRequest(input *UpdateAccessKeyInput) (req *request. // the error. // // See the AWS API reference guide for AWS Identity and Access Management's -// API operation UpdateAccessKey for usage and error information. +// API operation TagRole for usage and error information. // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeLimitExceededException "LimitExceeded" // The request was rejected because it attempted to create resources beyond // the current AWS account limits. The error message describes the limit exceeded. // +// * ErrCodeInvalidInputException "InvalidInput" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeConcurrentModificationException "ConcurrentModification" +// The request was rejected because multiple requests to change this object +// were submitted simultaneously. Wait a few minutes and submit your request +// again. +// // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception // or failure. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateAccessKey -func (c *IAM) UpdateAccessKey(input *UpdateAccessKeyInput) (*UpdateAccessKeyOutput, error) { - req, out := c.UpdateAccessKeyRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagRole +func (c *IAM) TagRole(input *TagRoleInput) (*TagRoleOutput, error) { + req, out := c.TagRoleRequest(input) return out, req.Send() } -// UpdateAccessKeyWithContext is the same as UpdateAccessKey with the addition of +// TagRoleWithContext is the same as TagRole with the addition of // the ability to pass a context and additional request options. // -// See UpdateAccessKey for details on how to use this API operation. +// See TagRole 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 *IAM) UpdateAccessKeyWithContext(ctx aws.Context, input *UpdateAccessKeyInput, opts ...request.Option) (*UpdateAccessKeyOutput, error) { - req, out := c.UpdateAccessKeyRequest(input) +func (c *IAM) TagRoleWithContext(ctx aws.Context, input *TagRoleInput, opts ...request.Option) (*TagRoleOutput, error) { + req, out := c.TagRoleRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUpdateAccountPasswordPolicy = "UpdateAccountPasswordPolicy" +const opTagUser = "TagUser" -// UpdateAccountPasswordPolicyRequest generates a "aws/request.Request" representing the -// client's request for the UpdateAccountPasswordPolicy operation. The "output" return +// TagUserRequest generates a "aws/request.Request" representing the +// client's request for the TagUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 UpdateAccountPasswordPolicy for more information on using the UpdateAccountPasswordPolicy +// See TagUser for more information on using the TagUser // 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 UpdateAccountPasswordPolicyRequest method. +// // Example sending a request using the TagUserRequest method. +// req, resp := client.TagUserRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagUser +func (c *IAM) TagUserRequest(input *TagUserInput) (req *request.Request, output *TagUserOutput) { + op := &request.Operation{ + Name: opTagUser, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TagUserInput{} + } + + output = &TagUserOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagUser API operation for AWS Identity and Access Management. +// +// Adds one or more tags to an IAM user. If a tag with the same key name already +// exists, then that tag is overwritten with the new value. +// +// A tag consists of a key name and an associated value. By assigning tags to +// your resources, you can do the following: +// +// * Administrative grouping and discovery - Attach tags to resources to +// aid in organization and search. For example, you could search for all +// resources with the key name Project and the value MyImportantProject. +// Or search for all resources with the key name Cost Center and the value +// 41200. +// +// * Access control - Reference tags in IAM user-based and resource-based +// policies. You can use tags to restrict access to only an IAM requesting +// user or to a role that has a specified tag attached. You can also restrict +// access to only those resources that have a certain tag attached. For examples +// of policies that show how to use tags to control access, see Control Access +// Using IAM Tags (http://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html) +// in the IAM User Guide. +// +// * Cost allocation - Use tags to help track which individuals and teams +// are using which AWS resources. +// +// Make sure that you have no invalid tags and that you do not exceed the allowed +// number of tags per role. In either case, the entire request fails and no +// tags are added to the role. +// +// AWS always interprets the tag Value as a single string. If you need to store +// an array, you can store comma-separated values in the string. However, you +// must interpret the value in your code. +// +// For more information about tagging, see Tagging IAM Identities (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) +// in the IAM 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 AWS Identity and Access Management's +// API operation TagUser for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNoSuchEntityException "NoSuchEntity" +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. +// +// * ErrCodeLimitExceededException "LimitExceeded" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error message describes the limit exceeded. +// +// * ErrCodeInvalidInputException "InvalidInput" +// The request was rejected because an invalid or out-of-range value was supplied +// for an input parameter. +// +// * ErrCodeConcurrentModificationException "ConcurrentModification" +// The request was rejected because multiple requests to change this object +// were submitted simultaneously. Wait a few minutes and submit your request +// again. +// +// * ErrCodeServiceFailureException "ServiceFailure" +// The request processing has failed because of an unknown error, exception +// or failure. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/TagUser +func (c *IAM) TagUser(input *TagUserInput) (*TagUserOutput, error) { + req, out := c.TagUserRequest(input) + return out, req.Send() +} + +// TagUserWithContext is the same as TagUser with the addition of +// the ability to pass a context and additional request options. +// +// See TagUser 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 *IAM) TagUserWithContext(ctx aws.Context, input *TagUserInput, opts ...request.Option) (*TagUserOutput, error) { + req, out := c.TagUserRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagRole = "UntagRole" + +// UntagRoleRequest generates a "aws/request.Request" representing the +// client's request for the UntagRole 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 UntagRole for more information on using the UntagRole +// 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 UntagRoleRequest method. +// req, resp := client.UntagRoleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagRole +func (c *IAM) UntagRoleRequest(input *UntagRoleInput) (req *request.Request, output *UntagRoleOutput) { + op := &request.Operation{ + Name: opUntagRole, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UntagRoleInput{} + } + + output = &UntagRoleOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagRole API operation for AWS Identity and Access Management. +// +// Removes the specified tags from the role. For more information about tagging, +// see Tagging IAM Identities (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) +// in the IAM 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 AWS Identity and Access Management's +// API operation UntagRole for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNoSuchEntityException "NoSuchEntity" +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. +// +// * ErrCodeConcurrentModificationException "ConcurrentModification" +// The request was rejected because multiple requests to change this object +// were submitted simultaneously. Wait a few minutes and submit your request +// again. +// +// * ErrCodeServiceFailureException "ServiceFailure" +// The request processing has failed because of an unknown error, exception +// or failure. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagRole +func (c *IAM) UntagRole(input *UntagRoleInput) (*UntagRoleOutput, error) { + req, out := c.UntagRoleRequest(input) + return out, req.Send() +} + +// UntagRoleWithContext is the same as UntagRole with the addition of +// the ability to pass a context and additional request options. +// +// See UntagRole 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 *IAM) UntagRoleWithContext(ctx aws.Context, input *UntagRoleInput, opts ...request.Option) (*UntagRoleOutput, error) { + req, out := c.UntagRoleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagUser = "UntagUser" + +// UntagUserRequest generates a "aws/request.Request" representing the +// client's request for the UntagUser 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 UntagUser for more information on using the UntagUser +// 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 UntagUserRequest method. +// req, resp := client.UntagUserRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagUser +func (c *IAM) UntagUserRequest(input *UntagUserInput) (req *request.Request, output *UntagUserOutput) { + op := &request.Operation{ + Name: opUntagUser, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UntagUserInput{} + } + + output = &UntagUserOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagUser API operation for AWS Identity and Access Management. +// +// Removes the specified tags from the user. For more information about tagging, +// see Tagging IAM Identities (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) +// in the IAM 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 AWS Identity and Access Management's +// API operation UntagUser for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNoSuchEntityException "NoSuchEntity" +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. +// +// * ErrCodeConcurrentModificationException "ConcurrentModification" +// The request was rejected because multiple requests to change this object +// were submitted simultaneously. Wait a few minutes and submit your request +// again. +// +// * ErrCodeServiceFailureException "ServiceFailure" +// The request processing has failed because of an unknown error, exception +// or failure. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UntagUser +func (c *IAM) UntagUser(input *UntagUserInput) (*UntagUserOutput, error) { + req, out := c.UntagUserRequest(input) + return out, req.Send() +} + +// UntagUserWithContext is the same as UntagUser with the addition of +// the ability to pass a context and additional request options. +// +// See UntagUser 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 *IAM) UntagUserWithContext(ctx aws.Context, input *UntagUserInput, opts ...request.Option) (*UntagUserOutput, error) { + req, out := c.UntagUserRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateAccessKey = "UpdateAccessKey" + +// UpdateAccessKeyRequest generates a "aws/request.Request" representing the +// client's request for the UpdateAccessKey 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 UpdateAccessKey for more information on using the UpdateAccessKey +// 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 UpdateAccessKeyRequest method. +// req, resp := client.UpdateAccessKeyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateAccessKey +func (c *IAM) UpdateAccessKeyRequest(input *UpdateAccessKeyInput) (req *request.Request, output *UpdateAccessKeyOutput) { + op := &request.Operation{ + Name: opUpdateAccessKey, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateAccessKeyInput{} + } + + output = &UpdateAccessKeyOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateAccessKey API operation for AWS Identity and Access Management. +// +// Changes the status of the specified access key from Active to Inactive, or +// vice versa. This operation can be used to disable a user's key as part of +// a key rotation workflow. +// +// If the UserName field is not specified, the user name is determined implicitly +// based on the AWS access key ID used to sign the request. This operation works +// for access keys under the AWS account. Consequently, you can use this operation +// to manage AWS account root user credentials even if the AWS account has no +// associated users. +// +// For information about rotating keys, see Managing Keys and Certificates (http://docs.aws.amazon.com/IAM/latest/UserGuide/ManagingCredentials.html) +// in the IAM 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 AWS Identity and Access Management's +// API operation UpdateAccessKey for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNoSuchEntityException "NoSuchEntity" +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. +// +// * ErrCodeLimitExceededException "LimitExceeded" +// The request was rejected because it attempted to create resources beyond +// the current AWS account limits. The error message describes the limit exceeded. +// +// * ErrCodeServiceFailureException "ServiceFailure" +// The request processing has failed because of an unknown error, exception +// or failure. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateAccessKey +func (c *IAM) UpdateAccessKey(input *UpdateAccessKeyInput) (*UpdateAccessKeyOutput, error) { + req, out := c.UpdateAccessKeyRequest(input) + return out, req.Send() +} + +// UpdateAccessKeyWithContext is the same as UpdateAccessKey with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateAccessKey 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 *IAM) UpdateAccessKeyWithContext(ctx aws.Context, input *UpdateAccessKeyInput, opts ...request.Option) (*UpdateAccessKeyOutput, error) { + req, out := c.UpdateAccessKeyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateAccountPasswordPolicy = "UpdateAccountPasswordPolicy" + +// UpdateAccountPasswordPolicyRequest generates a "aws/request.Request" representing the +// client's request for the UpdateAccountPasswordPolicy 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 UpdateAccountPasswordPolicy for more information on using the UpdateAccountPasswordPolicy +// 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 UpdateAccountPasswordPolicyRequest method. // req, resp := client.UpdateAccountPasswordPolicyRequest(params) // // err := req.Send() @@ -12247,8 +13317,7 @@ func (c *IAM) UpdateAccountPasswordPolicyRequest(input *UpdateAccountPasswordPol output = &UpdateAccountPasswordPolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -12276,8 +13345,8 @@ func (c *IAM) UpdateAccountPasswordPolicyRequest(input *UpdateAccountPasswordPol // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument" // The request was rejected because the policy document was malformed. The error @@ -12318,7 +13387,7 @@ const opUpdateAssumeRolePolicy = "UpdateAssumeRolePolicy" // UpdateAssumeRolePolicyRequest generates a "aws/request.Request" representing the // client's request for the UpdateAssumeRolePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12352,8 +13421,7 @@ func (c *IAM) UpdateAssumeRolePolicyRequest(input *UpdateAssumeRolePolicyInput) output = &UpdateAssumeRolePolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -12373,8 +13441,8 @@ func (c *IAM) UpdateAssumeRolePolicyRequest(input *UpdateAssumeRolePolicyInput) // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument" // The request was rejected because the policy document was malformed. The error @@ -12421,7 +13489,7 @@ const opUpdateGroup = "UpdateGroup" // UpdateGroupRequest generates a "aws/request.Request" representing the // client's request for the UpdateGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12455,8 +13523,7 @@ func (c *IAM) UpdateGroupRequest(input *UpdateGroupInput) (req *request.Request, output = &UpdateGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -12484,8 +13551,8 @@ func (c *IAM) UpdateGroupRequest(input *UpdateGroupInput) (req *request.Request, // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" // The request was rejected because it attempted to create a resource that already @@ -12526,7 +13593,7 @@ const opUpdateLoginProfile = "UpdateLoginProfile" // UpdateLoginProfileRequest generates a "aws/request.Request" representing the // client's request for the UpdateLoginProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12560,8 +13627,7 @@ func (c *IAM) UpdateLoginProfileRequest(input *UpdateLoginProfileInput) (req *re output = &UpdateLoginProfileOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -12588,8 +13654,8 @@ func (c *IAM) UpdateLoginProfileRequest(input *UpdateLoginProfileInput) (req *re // waiting several minutes. The error message describes the entity. // // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodePasswordPolicyViolationException "PasswordPolicyViolation" // The request was rejected because the provided password did not meet the requirements @@ -12630,7 +13696,7 @@ const opUpdateOpenIDConnectProviderThumbprint = "UpdateOpenIDConnectProviderThum // UpdateOpenIDConnectProviderThumbprintRequest generates a "aws/request.Request" representing the // client's request for the UpdateOpenIDConnectProviderThumbprint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12664,8 +13730,7 @@ func (c *IAM) UpdateOpenIDConnectProviderThumbprintRequest(input *UpdateOpenIDCo output = &UpdateOpenIDConnectProviderThumbprintOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -12682,9 +13747,10 @@ func (c *IAM) UpdateOpenIDConnectProviderThumbprintRequest(input *UpdateOpenIDCo // does change, any attempt to assume an IAM role that specifies the OIDC provider // as a principal fails until the certificate thumbprint is updated. // -// Because trust for the OIDC provider is derived from the provider's certificate -// and is validated by the thumbprint, it is best to limit access to the UpdateOpenIDConnectProviderThumbprint -// operation to highly privileged users. +// Trust for the OIDC provider is derived from the provider's certificate and +// is validated by the thumbprint. Therefore, it is best to limit access to +// the UpdateOpenIDConnectProviderThumbprint operation to highly privileged +// users. // // 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 @@ -12699,8 +13765,8 @@ func (c *IAM) UpdateOpenIDConnectProviderThumbprintRequest(input *UpdateOpenIDCo // for an input parameter. // // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -12733,7 +13799,7 @@ const opUpdateRole = "UpdateRole" // UpdateRoleRequest generates a "aws/request.Request" representing the // client's request for the UpdateRole operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12767,6 +13833,7 @@ func (c *IAM) UpdateRoleRequest(input *UpdateRoleInput) (req *request.Request, o output = &UpdateRoleOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -12789,8 +13856,8 @@ func (c *IAM) UpdateRoleRequest(input *UpdateRoleInput) (req *request.Request, o // request the change through that service. // // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -12823,7 +13890,7 @@ const opUpdateRoleDescription = "UpdateRoleDescription" // UpdateRoleDescriptionRequest generates a "aws/request.Request" representing the // client's request for the UpdateRoleDescription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12862,7 +13929,7 @@ func (c *IAM) UpdateRoleDescriptionRequest(input *UpdateRoleDescriptionInput) (r // UpdateRoleDescription API operation for AWS Identity and Access Management. // -// Use instead. +// Use UpdateRole instead. // // Modifies only the description of a role. This operation performs the same // function as the Description parameter in the UpdateRole operation. @@ -12876,8 +13943,8 @@ func (c *IAM) UpdateRoleDescriptionRequest(input *UpdateRoleDescriptionInput) (r // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeUnmodifiableEntityException "UnmodifiableEntity" // The request was rejected because only the service that depends on the service-linked @@ -12916,7 +13983,7 @@ const opUpdateSAMLProvider = "UpdateSAMLProvider" // UpdateSAMLProviderRequest generates a "aws/request.Request" representing the // client's request for the UpdateSAMLProvider operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12968,8 +14035,8 @@ func (c *IAM) UpdateSAMLProviderRequest(input *UpdateSAMLProviderInput) (req *re // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeInvalidInputException "InvalidInput" // The request was rejected because an invalid or out-of-range value was supplied @@ -13010,7 +14077,7 @@ const opUpdateSSHPublicKey = "UpdateSSHPublicKey" // UpdateSSHPublicKeyRequest generates a "aws/request.Request" representing the // client's request for the UpdateSSHPublicKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -13044,8 +14111,7 @@ func (c *IAM) UpdateSSHPublicKeyRequest(input *UpdateSSHPublicKeyInput) (req *re output = &UpdateSSHPublicKeyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -13071,8 +14137,8 @@ func (c *IAM) UpdateSSHPublicKeyRequest(input *UpdateSSHPublicKeyInput) (req *re // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateSSHPublicKey func (c *IAM) UpdateSSHPublicKey(input *UpdateSSHPublicKeyInput) (*UpdateSSHPublicKeyOutput, error) { @@ -13101,7 +14167,7 @@ const opUpdateServerCertificate = "UpdateServerCertificate" // UpdateServerCertificateRequest generates a "aws/request.Request" representing the // client's request for the UpdateServerCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -13135,8 +14201,7 @@ func (c *IAM) UpdateServerCertificateRequest(input *UpdateServerCertificateInput output = &UpdateServerCertificateOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -13172,8 +14237,8 @@ func (c *IAM) UpdateServerCertificateRequest(input *UpdateServerCertificateInput // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeEntityAlreadyExistsException "EntityAlreadyExists" // The request was rejected because it attempted to create a resource that already @@ -13214,7 +14279,7 @@ const opUpdateServiceSpecificCredential = "UpdateServiceSpecificCredential" // UpdateServiceSpecificCredentialRequest generates a "aws/request.Request" representing the // client's request for the UpdateServiceSpecificCredential operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -13248,8 +14313,7 @@ func (c *IAM) UpdateServiceSpecificCredentialRequest(input *UpdateServiceSpecifi output = &UpdateServiceSpecificCredentialOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -13269,8 +14333,8 @@ func (c *IAM) UpdateServiceSpecificCredentialRequest(input *UpdateServiceSpecifi // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // See also, https://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/UpdateServiceSpecificCredential func (c *IAM) UpdateServiceSpecificCredential(input *UpdateServiceSpecificCredentialInput) (*UpdateServiceSpecificCredentialOutput, error) { @@ -13299,7 +14363,7 @@ const opUpdateSigningCertificate = "UpdateSigningCertificate" // UpdateSigningCertificateRequest generates a "aws/request.Request" representing the // client's request for the UpdateSigningCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -13333,8 +14397,7 @@ func (c *IAM) UpdateSigningCertificateRequest(input *UpdateSigningCertificateInp output = &UpdateSigningCertificateOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -13345,10 +14408,10 @@ func (c *IAM) UpdateSigningCertificateRequest(input *UpdateSigningCertificateInp // user's signing certificate as part of a certificate rotation work flow. // // If the UserName field is not specified, the user name is determined implicitly -// based on the AWS access key ID used to sign the request. Because this operation -// works for access keys under the AWS account, you can use this operation to -// manage AWS account root user credentials even if the AWS account has no associated -// users. +// based on the AWS access key ID used to sign the request. This operation works +// for access keys under the AWS account. Consequently, you can use this operation +// to manage AWS account root user credentials even if the AWS account has no +// associated users. // // 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 @@ -13359,8 +14422,8 @@ func (c *IAM) UpdateSigningCertificateRequest(input *UpdateSigningCertificateInp // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeLimitExceededException "LimitExceeded" // The request was rejected because it attempted to create resources beyond @@ -13397,7 +14460,7 @@ const opUpdateUser = "UpdateUser" // UpdateUserRequest generates a "aws/request.Request" representing the // client's request for the UpdateUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -13431,8 +14494,7 @@ func (c *IAM) UpdateUserRequest(input *UpdateUserInput) (req *request.Request, o output = &UpdateUserOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -13460,8 +14522,8 @@ func (c *IAM) UpdateUserRequest(input *UpdateUserInput) (req *request.Request, o // // Returned Error Codes: // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeLimitExceededException "LimitExceeded" // The request was rejected because it attempted to create resources beyond @@ -13477,6 +14539,11 @@ func (c *IAM) UpdateUserRequest(input *UpdateUserInput) (req *request.Request, o // error indicates that the request is likely to succeed if you try again after // waiting several minutes. The error message describes the entity. // +// * ErrCodeConcurrentModificationException "ConcurrentModification" +// The request was rejected because multiple requests to change this object +// were submitted simultaneously. Wait a few minutes and submit your request +// again. +// // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception // or failure. @@ -13508,7 +14575,7 @@ const opUploadSSHPublicKey = "UploadSSHPublicKey" // UploadSSHPublicKeyRequest generates a "aws/request.Request" representing the // client's request for the UploadSSHPublicKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -13568,8 +14635,8 @@ func (c *IAM) UploadSSHPublicKeyRequest(input *UploadSSHPublicKeyInput) (req *re // the current AWS account limits. The error message describes the limit exceeded. // // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeInvalidPublicKeyException "InvalidPublicKey" // The request was rejected because the public key is malformed or otherwise @@ -13610,7 +14677,7 @@ const opUploadServerCertificate = "UploadServerCertificate" // UploadServerCertificateRequest generates a "aws/request.Request" representing the // client's request for the UploadServerCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -13653,7 +14720,7 @@ func (c *IAM) UploadServerCertificateRequest(input *UploadServerCertificateInput // entity includes a public key certificate, a private key, and an optional // certificate chain, which should all be PEM-encoded. // -// We recommend that you use AWS Certificate Manager (https://aws.amazon.com/certificate-manager/) +// We recommend that you use AWS Certificate Manager (http://docs.aws.amazon.com/certificate-manager/) // to provision, manage, and deploy your server certificates. With ACM you can // request a certificate, deploy it to AWS resources, and let ACM handle certificate // renewals for you. Certificates provided by ACM are free. For more information @@ -13731,7 +14798,7 @@ const opUploadSigningCertificate = "UploadSigningCertificate" // UploadSigningCertificateRequest generates a "aws/request.Request" representing the // client's request for the UploadSigningCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -13776,10 +14843,10 @@ func (c *IAM) UploadSigningCertificateRequest(input *UploadSigningCertificateInp // its default status is Active. // // If the UserName field is not specified, the IAM user name is determined implicitly -// based on the AWS access key ID used to sign the request. Because this operation -// works for access keys under the AWS account, you can use this operation to -// manage AWS account root user credentials even if the AWS account has no associated -// users. +// based on the AWS access key ID used to sign the request. This operation works +// for access keys under the AWS account. Consequently, you can use this operation +// to manage AWS account root user credentials even if the AWS account has no +// associated users. // // Because the body of an X.509 certificate can be large, you should use POST // rather than GET when calling UploadSigningCertificate. For information about @@ -13817,8 +14884,8 @@ func (c *IAM) UploadSigningCertificateRequest(input *UploadSigningCertificateInp // an IAM user in the account. // // * ErrCodeNoSuchEntityException "NoSuchEntity" -// The request was rejected because it referenced an entity that does not exist. -// The error message describes the entity. +// The request was rejected because it referenced a resource entity that does +// not exist. The error message describes the resource. // // * ErrCodeServiceFailureException "ServiceFailure" // The request processing has failed because of an unknown error, exception @@ -13869,7 +14936,7 @@ type AccessKey struct { // The secret key used to sign requests. // // SecretAccessKey is a required field - SecretAccessKey *string `type:"string" required:"true"` + SecretAccessKey *string `type:"string" required:"true" sensitive:"true"` // The status of the access key. Active means that the key is valid for API // calls, while Inactive means it is not. @@ -13923,7 +14990,8 @@ func (s *AccessKey) SetUserName(v string) *AccessKey { return s } -// Contains information about the last time an AWS access key was used. +// Contains information about the last time an AWS access key was used since +// IAM began tracking this information on April 22, 2015. // // This data type is used as a response element in the GetAccessKeyLastUsed // operation. @@ -13936,21 +15004,21 @@ type AccessKeyLastUsed struct { // // * The user does not have an access key. // - // * An access key exists but has never been used, at least not since IAM - // started tracking this information on April 22nd, 2015. + // * An access key exists but has not been used since IAM began tracking + // this information. // // * There is no sign-in data associated with the user // // LastUsedDate is a required field LastUsedDate *time.Time `type:"timestamp" required:"true"` - // The AWS region where this access key was most recently used. This field is - // displays "N/A" in the following situations: + // The AWS region where this access key was most recently used. The value for + // this field is "N/A" in the following situations: // // * The user does not have an access key. // - // * An access key exists but has never been used, at least not since IAM - // started tracking this information on April 22nd, 2015. + // * An access key exists but has not been used since IAM began tracking + // this information. // // * There is no sign-in data associated with the user // @@ -13961,12 +15029,12 @@ type AccessKeyLastUsed struct { Region *string `type:"string" required:"true"` // The name of the AWS service with which this access key was most recently - // used. This field displays "N/A" in the following situations: + // used. The value of this field is "N/A" in the following situations: // // * The user does not have an access key. // - // * An access key exists but has never been used, at least not since IAM - // started tracking this information on April 22nd, 2015. + // * An access key exists but has not been used since IAM started tracking + // this information. // // * There is no sign-in data associated with the user // @@ -14014,8 +15082,8 @@ type AccessKeyMetadata struct { // The date when the access key was created. CreateDate *time.Time `type:"timestamp"` - // The status of the access key. Active means the key is valid for API calls; - // Inactive means it is not. + // The status of the access key. Active means that the key is valid for API + // calls; Inactive means it is not. Status *string `type:"string" enum:"statusType"` // The name of the IAM user that the key is associated with. @@ -14136,7 +15204,7 @@ type AddRoleToInstanceProfileInput struct { // The name of the instance profile to update. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -14145,7 +15213,7 @@ type AddRoleToInstanceProfileInput struct { // The name of the role to add. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -14216,7 +15284,7 @@ type AddUserToGroupInput struct { // The name of the group to update. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -14225,7 +15293,7 @@ type AddUserToGroupInput struct { // The name of the user to add. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -14296,7 +15364,7 @@ type AttachGroupPolicyInput struct { // The name (friendly name, not ARN) of the group to attach the policy to. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -14385,7 +15453,7 @@ type AttachRolePolicyInput struct { // The name (friendly name, not ARN) of the role to attach the policy to. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -14465,7 +15533,7 @@ type AttachUserPolicyInput struct { // The name (friendly name, not ARN) of the IAM user to attach the policy to. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -14537,7 +15605,7 @@ func (s AttachUserPolicyOutput) GoString() string { // to a user or role to set the permissions boundary. // // For more information about permissions boundaries, see Permissions Boundaries -// for IAM Identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) +// for IAM Identities (http://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) // in the IAM User Guide. type AttachedPermissionsBoundary struct { _ struct{} `type:"structure"` @@ -14636,12 +15704,12 @@ type ChangePasswordInput struct { // because they have special meaning within that tool. // // NewPassword is a required field - NewPassword *string `min:"1" type:"string" required:"true"` + NewPassword *string `min:"1" type:"string" required:"true" sensitive:"true"` // The IAM user's current password. // // OldPassword is a required field - OldPassword *string `min:"1" type:"string" required:"true"` + OldPassword *string `min:"1" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -14772,7 +15840,7 @@ type CreateAccessKeyInput struct { // The name of the IAM user that the new key will belong to. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- UserName *string `min:"1" type:"string"` @@ -14838,7 +15906,7 @@ type CreateAccountAliasInput struct { // The account alias to create. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of lowercase letters, digits, and dashes. // You cannot start or finish with a dash, nor can you have two dashes in a // row. @@ -14898,7 +15966,7 @@ type CreateGroupInput struct { // The name of the group to create. Do not include the path in this value. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@-. // The group name must be unique within the account. Group names are not distinguished @@ -14914,7 +15982,7 @@ type CreateGroupInput struct { // This parameter is optional. If it is not included, it defaults to a slash // (/). // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of either a forward slash (/) by itself // or a string that must begin and end with forward slashes. In addition, it // can contain any ASCII character from the ! (\u0021) through the DEL character @@ -14995,7 +16063,7 @@ type CreateInstanceProfileInput struct { // The name of the instance profile to create. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -15009,7 +16077,7 @@ type CreateInstanceProfileInput struct { // This parameter is optional. If it is not included, it defaults to a slash // (/). // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of either a forward slash (/) by itself // or a string that must begin and end with forward slashes. In addition, it // can contain any ASCII character from the ! (\u0021) through the DEL character @@ -15100,7 +16168,7 @@ type CreateLoginProfileInput struct { // because they have special meaning within that tool. // // Password is a required field - Password *string `min:"1" type:"string" required:"true"` + Password *string `min:"1" type:"string" required:"true" sensitive:"true"` // Specifies whether the user is required to set a new password on next sign-in. PasswordResetRequired *bool `type:"boolean"` @@ -15108,7 +16176,7 @@ type CreateLoginProfileInput struct { // The name of the IAM user to create a password for. The user must already // exist. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -15337,7 +16405,7 @@ type CreatePolicyInput struct { // This parameter is optional. If it is not included, it defaults to a slash // (/). // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of either a forward slash (/) by itself // or a string that must begin and end with forward slashes. In addition, it // can contain any ASCII character from the ! (\u0021) through the DEL character @@ -15365,7 +16433,7 @@ type CreatePolicyInput struct { // The friendly name of the policy. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -15617,7 +16685,7 @@ type CreateRoleInput struct { // This parameter is optional. If it is not included, it defaults to a slash // (/). // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of either a forward slash (/) by itself // or a string that must begin and end with forward slashes. In addition, it // can contain any ASCII character from the ! (\u0021) through the DEL character @@ -15631,7 +16699,7 @@ type CreateRoleInput struct { // The name of the role to create. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -15640,6 +16708,15 @@ type CreateRoleInput struct { // // RoleName is a required field RoleName *string `min:"1" type:"string" required:"true"` + + // A list of tags that you want to attach to the newly created role. Each tag + // consists of a key name and an associated value. For more information about + // tagging, see Tagging IAM Identities (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) + // in the IAM User Guide. + // + // If any one of the tags is invalid or if you exceed the allowed number of + // tags per role, then the entire request fails and the role is not created. + Tags []*Tag `type:"list"` } // String returns the string representation @@ -15676,6 +16753,16 @@ func (s *CreateRoleInput) Validate() error { if s.RoleName != nil && len(*s.RoleName) < 1 { invalidParams.Add(request.NewErrParamMinLen("RoleName", 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 @@ -15719,6 +16806,12 @@ func (s *CreateRoleInput) SetRoleName(v string) *CreateRoleInput { return s } +// SetTags sets the Tags field's value. +func (s *CreateRoleInput) SetTags(v []*Tag) *CreateRoleInput { + s.Tags = v + return s +} + // Contains the response to a successful CreateRole request. type CreateRoleOutput struct { _ struct{} `type:"structure"` @@ -15750,7 +16843,7 @@ type CreateSAMLProviderInput struct { // The name of the provider to create. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -15841,17 +16934,26 @@ func (s *CreateSAMLProviderOutput) SetSAMLProviderArn(v string) *CreateSAMLProvi type CreateServiceLinkedRoleInput struct { _ struct{} `type:"structure"` - // The AWS service to which this role is attached. You use a string similar - // to a URL but without the http:// in front. For example: elasticbeanstalk.amazonaws.com + // The service principal for the AWS service to which this role is attached. + // You use a string similar to a URL but without the http:// in front. For example: + // elasticbeanstalk.amazonaws.com. + // + // Service principals are unique and case-sensitive. To find the exact service + // principal for your service-linked role, see AWS Services That Work with IAM + // (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-services-that-work-with-iam.html) + // in the IAM User Guide and look for the services that have Yes in the Service-Linked + // Role column. Choose the Yes link to view the service-linked role documentation + // for that service. // // AWSServiceName is a required field AWSServiceName *string `min:"1" type:"string" required:"true"` - // A string that you provide, which is combined with the service name to form - // the complete role name. If you make multiple requests for the same service, - // then you must supply a different CustomSuffix for each request. Otherwise - // the request fails with a duplicate role name error. For example, you could - // add -1 or -debug to the suffix. + // A string that you provide, which is combined with the service-provided prefix + // to form the complete role name. If you make multiple requests for the same + // service, then you must supply a different CustomSuffixfor each request. Otherwise the request fails with a duplicate role name + // error. For example, you could add -1or -debugto the suffix. + // + // Some services do not support the CustomSuffix CustomSuffix *string `min:"1" type:"string"` // The description of the role. @@ -15942,7 +17044,7 @@ type CreateServiceSpecificCredentialInput struct { // new service-specific credentials have the same permissions as the associated // user except that they can be used only to access the specified service. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -16029,7 +17131,7 @@ type CreateUserInput struct { // This parameter is optional. If it is not included, it defaults to a slash // (/). // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of either a forward slash (/) by itself // or a string that must begin and end with forward slashes. In addition, it // can contain any ASCII character from the ! (\u0021) through the DEL character @@ -16041,9 +17143,18 @@ type CreateUserInput struct { // user. PermissionsBoundary *string `min:"20" type:"string"` + // A list of tags that you want to attach to the newly created user. Each tag + // consists of a key name and an associated value. For more information about + // tagging, see Tagging IAM Identities (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) + // in the IAM User Guide. + // + // If any one of the tags is invalid or if you exceed the allowed number of + // tags per user, then the entire request fails and the user is not created. + Tags []*Tag `type:"list"` + // The name of the user to create. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@-. // User names are not distinguished by case. For example, you cannot create @@ -16078,6 +17189,16 @@ func (s *CreateUserInput) Validate() error { if s.UserName != nil && len(*s.UserName) < 1 { invalidParams.Add(request.NewErrParamMinLen("UserName", 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 @@ -16097,6 +17218,12 @@ func (s *CreateUserInput) SetPermissionsBoundary(v string) *CreateUserInput { return s } +// SetTags sets the Tags field's value. +func (s *CreateUserInput) SetTags(v []*Tag) *CreateUserInput { + s.Tags = v + return s +} + // SetUserName sets the UserName field's value. func (s *CreateUserInput) SetUserName(v string) *CreateUserInput { s.UserName = &v @@ -16137,7 +17264,7 @@ type CreateVirtualMFADeviceInput struct { // This parameter is optional. If it is not included, it defaults to a slash // (/). // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of either a forward slash (/) by itself // or a string that must begin and end with forward slashes. In addition, it // can contain any ASCII character from the ! (\u0021) through the DEL character @@ -16148,7 +17275,7 @@ type CreateVirtualMFADeviceInput struct { // The name of the virtual MFA device. Use with path to uniquely identify a // virtual MFA device. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -16229,7 +17356,7 @@ type DeactivateMFADeviceInput struct { // The serial number that uniquely identifies the MFA device. For virtual MFA // devices, the serial number is the device ARN. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: =,.@:/- // @@ -16238,7 +17365,7 @@ type DeactivateMFADeviceInput struct { // The name of the user whose MFA device you want to deactivate. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -16310,7 +17437,7 @@ type DeleteAccessKeyInput struct { // The access key ID for the access key ID and secret access key you want to // delete. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters that can consist of any upper or lowercased letter // or digit. // @@ -16319,7 +17446,7 @@ type DeleteAccessKeyInput struct { // The name of the user whose access key pair you want to delete. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- UserName *string `min:"1" type:"string"` @@ -16385,7 +17512,7 @@ type DeleteAccountAliasInput struct { // The name of the account alias to delete. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of lowercase letters, digits, and dashes. // You cannot start or finish with a dash, nor can you have two dashes in a // row. @@ -16473,7 +17600,7 @@ type DeleteGroupInput struct { // The name of the IAM group to delete. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -16533,7 +17660,7 @@ type DeleteGroupPolicyInput struct { // The name (friendly name, not ARN) identifying the group that the policy is // embedded in. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -16542,7 +17669,7 @@ type DeleteGroupPolicyInput struct { // The name identifying the policy document to delete. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -16613,7 +17740,7 @@ type DeleteInstanceProfileInput struct { // The name of the instance profile to delete. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -16672,7 +17799,7 @@ type DeleteLoginProfileInput struct { // The name of the user whose password you want to delete. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -16857,7 +17984,7 @@ type DeletePolicyVersionInput struct { // The policy version to delete. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters that consists of the lowercase letter 'v' followed // by one or two digits, and optionally followed by a period '.' and a string // of letters and digits. @@ -16930,7 +18057,7 @@ type DeleteRoleInput struct { // The name of the role to delete. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -17045,7 +18172,7 @@ type DeleteRolePolicyInput struct { // The name of the inline policy to delete from the specified IAM role. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -17055,7 +18182,7 @@ type DeleteRolePolicyInput struct { // The name (friendly name, not ARN) identifying the role that the policy is // embedded in. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -17181,7 +18308,7 @@ type DeleteSSHPublicKeyInput struct { // The unique identifier for the SSH public key. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters that can consist of any upper or lowercased letter // or digit. // @@ -17190,7 +18317,7 @@ type DeleteSSHPublicKeyInput struct { // The name of the IAM user associated with the SSH public key. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -17261,7 +18388,7 @@ type DeleteServerCertificateInput struct { // The name of the server certificate you want to delete. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -17388,7 +18515,7 @@ type DeleteServiceSpecificCredentialInput struct { // The unique identifier of the service-specific credential. You can get this // value by calling ListServiceSpecificCredentials. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters that can consist of any upper or lowercased letter // or digit. // @@ -17399,7 +18526,7 @@ type DeleteServiceSpecificCredentialInput struct { // If this value is not specified, then the operation assumes the user whose // credentials are used to call the operation. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- UserName *string `min:"1" type:"string"` @@ -17474,7 +18601,7 @@ type DeleteSigningCertificateInput struct { // The name of the user the signing certificate belongs to. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- UserName *string `min:"1" type:"string"` @@ -17540,7 +18667,7 @@ type DeleteUserInput struct { // The name of the user to delete. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -17655,7 +18782,7 @@ type DeleteUserPolicyInput struct { // The name identifying the policy document to delete. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -17665,7 +18792,7 @@ type DeleteUserPolicyInput struct { // The name (friendly name, not ARN) identifying the user that the policy is // embedded in. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -17737,7 +18864,7 @@ type DeleteVirtualMFADeviceInput struct { // The serial number that uniquely identifies the MFA device. For virtual MFA // devices, the serial number is the same as the ARN. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: =,.@:/- // @@ -17837,7 +18964,7 @@ type DetachGroupPolicyInput struct { // The name (friendly name, not ARN) of the IAM group to detach the policy from. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -17926,7 +19053,7 @@ type DetachRolePolicyInput struct { // The name (friendly name, not ARN) of the IAM role to detach the policy from. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -18006,7 +19133,7 @@ type DetachUserPolicyInput struct { // The name (friendly name, not ARN) of the IAM user to detach the policy from. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -18106,7 +19233,7 @@ type EnableMFADeviceInput struct { // The serial number that uniquely identifies the MFA device. For virtual MFA // devices, the serial number is the device ARN. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: =,.@:/- // @@ -18115,7 +19242,7 @@ type EnableMFADeviceInput struct { // The name of the IAM user for whom you want to enable the MFA device. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -18205,6 +19332,166 @@ func (s EnableMFADeviceOutput) GoString() string { return s.String() } +// An object that contains details about when the IAM entities (users or roles) +// were last used in an attempt to access the specified AWS service. +// +// This data type is a response element in the GetServiceLastAccessedDetailsWithEntities +// operation. +type EntityDetails struct { + _ struct{} `type:"structure"` + + // The EntityInfo object that contains details about the entity (user or role). + // + // EntityInfo is a required field + EntityInfo *EntityInfo `type:"structure" required:"true"` + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), + // when the authenticated entity last attempted to access AWS. AWS does not + // report unauthenticated requests. + // + // This field is null if no IAM entities attempted to access the service within + // the reporting period (http://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). + LastAuthenticated *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s EntityDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EntityDetails) GoString() string { + return s.String() +} + +// SetEntityInfo sets the EntityInfo field's value. +func (s *EntityDetails) SetEntityInfo(v *EntityInfo) *EntityDetails { + s.EntityInfo = v + return s +} + +// SetLastAuthenticated sets the LastAuthenticated field's value. +func (s *EntityDetails) SetLastAuthenticated(v time.Time) *EntityDetails { + s.LastAuthenticated = &v + return s +} + +// Contains details about the specified entity (user or role). +// +// This data type is an element of the EntityDetails object. +type EntityInfo struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources. + // + // For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS + // Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the AWS General Reference. + // + // Arn is a required field + Arn *string `min:"20" type:"string" required:"true"` + + // The identifier of the entity (user or role). + // + // Id is a required field + Id *string `min:"16" type:"string" required:"true"` + + // The name of the entity (user or role). + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` + + // The path to the entity (user or role). For more information about paths, + // see IAM Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) + // in the Using IAM guide. + Path *string `min:"1" type:"string"` + + // The type of entity (user or role). + // + // Type is a required field + Type *string `type:"string" required:"true" enum:"policyOwnerEntityType"` +} + +// String returns the string representation +func (s EntityInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EntityInfo) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *EntityInfo) SetArn(v string) *EntityInfo { + s.Arn = &v + return s +} + +// SetId sets the Id field's value. +func (s *EntityInfo) SetId(v string) *EntityInfo { + s.Id = &v + return s +} + +// SetName sets the Name field's value. +func (s *EntityInfo) SetName(v string) *EntityInfo { + s.Name = &v + return s +} + +// SetPath sets the Path field's value. +func (s *EntityInfo) SetPath(v string) *EntityInfo { + s.Path = &v + return s +} + +// SetType sets the Type field's value. +func (s *EntityInfo) SetType(v string) *EntityInfo { + s.Type = &v + return s +} + +// Contains information about the reason that the operation failed. +// +// This data type is used as a response element in the GetServiceLastAccessedDetails +// operation and the GetServiceLastAccessedDetailsWithEntities operation. +type ErrorDetails struct { + _ struct{} `type:"structure"` + + // The error code associated with the operation failure. + // + // Code is a required field + Code *string `type:"string" required:"true"` + + // Detailed information about the reason that the operation failed. + // + // Message is a required field + Message *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ErrorDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ErrorDetails) GoString() string { + return s.String() +} + +// SetCode sets the Code field's value. +func (s *ErrorDetails) SetCode(v string) *ErrorDetails { + s.Code = &v + return s +} + +// SetMessage sets the Message field's value. +func (s *ErrorDetails) SetMessage(v string) *ErrorDetails { + s.Message = &v + return s +} + // Contains the results of a simulation. // // This data type is used by the return parameter of SimulateCustomPolicy and @@ -18236,8 +19523,8 @@ type EvaluationResult struct { // A list of the statements in the input policies that determine the result // for this scenario. Remember that even if multiple statements allow the operation // on the resource, if only one statement denies that operation, then the explicit - // deny overrides any allow, and the deny statement is the only entry included - // in the result. + // deny overrides any allow. Inaddition, the deny statement is the only entry + // included in the result. MatchedStatements []*Statement `type:"list"` // A list of context keys that are required by the included input policies but @@ -18331,36 +19618,103 @@ func (s GenerateCredentialReportInput) GoString() string { return s.String() } -// Contains the response to a successful GenerateCredentialReport request. -type GenerateCredentialReportOutput struct { +// Contains the response to a successful GenerateCredentialReport request. +type GenerateCredentialReportOutput struct { + _ struct{} `type:"structure"` + + // Information about the credential report. + Description *string `type:"string"` + + // Information about the state of the credential report. + State *string `type:"string" enum:"ReportStateType"` +} + +// String returns the string representation +func (s GenerateCredentialReportOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GenerateCredentialReportOutput) GoString() string { + return s.String() +} + +// SetDescription sets the Description field's value. +func (s *GenerateCredentialReportOutput) SetDescription(v string) *GenerateCredentialReportOutput { + s.Description = &v + return s +} + +// SetState sets the State field's value. +func (s *GenerateCredentialReportOutput) SetState(v string) *GenerateCredentialReportOutput { + s.State = &v + return s +} + +type GenerateServiceLastAccessedDetailsInput struct { + _ struct{} `type:"structure"` + + // The ARN of the IAM resource (user, group, role, or managed policy) used to + // generate information about when the resource was last used in an attempt + // to access an AWS service. + // + // Arn is a required field + Arn *string `min:"20" type:"string" required:"true"` +} + +// String returns the string representation +func (s GenerateServiceLastAccessedDetailsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GenerateServiceLastAccessedDetailsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GenerateServiceLastAccessedDetailsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GenerateServiceLastAccessedDetailsInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *GenerateServiceLastAccessedDetailsInput) SetArn(v string) *GenerateServiceLastAccessedDetailsInput { + s.Arn = &v + return s +} + +type GenerateServiceLastAccessedDetailsOutput struct { _ struct{} `type:"structure"` - // Information about the credential report. - Description *string `type:"string"` - - // Information about the state of the credential report. - State *string `type:"string" enum:"ReportStateType"` + // The job ID that you can use in the GetServiceLastAccessedDetails or GetServiceLastAccessedDetailsWithEntities + // operations. + JobId *string `min:"36" type:"string"` } // String returns the string representation -func (s GenerateCredentialReportOutput) String() string { +func (s GenerateServiceLastAccessedDetailsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GenerateCredentialReportOutput) GoString() string { +func (s GenerateServiceLastAccessedDetailsOutput) GoString() string { return s.String() } -// SetDescription sets the Description field's value. -func (s *GenerateCredentialReportOutput) SetDescription(v string) *GenerateCredentialReportOutput { - s.Description = &v - return s -} - -// SetState sets the State field's value. -func (s *GenerateCredentialReportOutput) SetState(v string) *GenerateCredentialReportOutput { - s.State = &v +// SetJobId sets the JobId field's value. +func (s *GenerateServiceLastAccessedDetailsOutput) SetJobId(v string) *GenerateServiceLastAccessedDetailsOutput { + s.JobId = &v return s } @@ -18369,7 +19723,7 @@ type GetAccessKeyLastUsedInput struct { // The identifier of an access key. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters that can consist of any upper or lowercased letter // or digit. // @@ -18462,15 +19816,15 @@ type GetAccountAuthorizationDetailsInput struct { // the next call should start. Marker *string `min:"1" type:"string"` - // (Optional) Use this only when paginating results to indicate the maximum - // number of items you want in the response. If additional items exist beyond - // the maximum you specify, the IsTruncated response element is true. + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true. // - // If you do not include this parameter, it defaults to 100. Note that IAM might - // return fewer results, even when there are more results available. In that - // case, the IsTruncated response element returns true and Marker contains a - // value to include in the subsequent call that tells the service where to continue - // from. + // If you do not include this parameter, the number of items defaults to 100. + // Note that IAM might return fewer results, even when there are more results + // available. In that case, the IsTruncated response element returns true, and + // Marker contains a value to include in the subsequent call that tells the + // service where to continue from. MaxItems *int64 `min:"1" type:"integer"` } @@ -18530,7 +19884,7 @@ type GetAccountAuthorizationDetailsOutput struct { // request parameter to retrieve more items. Note that IAM might return fewer // than the MaxItems number of results even when there are more results available. // We recommend that you check IsTruncated after every call to ensure that you - // receive all of your results. + // receive all your results. IsTruncated *bool `type:"boolean"` // When IsTruncated is true, this element is present and contains the value @@ -18651,7 +20005,7 @@ func (s GetAccountSummaryInput) GoString() string { type GetAccountSummaryOutput struct { _ struct{} `type:"structure"` - // A set of key value pairs containing information about IAM entity usage and + // A set of key–value pairs containing information about IAM entity usage and // IAM quotas. SummaryMap map[string]*int64 `type:"map"` } @@ -18887,7 +20241,7 @@ type GetGroupInput struct { // The name of the group. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -18900,15 +20254,15 @@ type GetGroupInput struct { // the next call should start. Marker *string `min:"1" type:"string"` - // (Optional) Use this only when paginating results to indicate the maximum - // number of items you want in the response. If additional items exist beyond - // the maximum you specify, the IsTruncated response element is true. + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true. // - // If you do not include this parameter, it defaults to 100. Note that IAM might - // return fewer results, even when there are more results available. In that - // case, the IsTruncated response element returns true and Marker contains a - // value to include in the subsequent call that tells the service where to continue - // from. + // If you do not include this parameter, the number of items defaults to 100. + // Note that IAM might return fewer results, even when there are more results + // available. In that case, the IsTruncated response element returns true, and + // Marker contains a value to include in the subsequent call that tells the + // service where to continue from. MaxItems *int64 `min:"1" type:"integer"` } @@ -18976,7 +20330,7 @@ type GetGroupOutput struct { // request parameter to retrieve more items. Note that IAM might return fewer // than the MaxItems number of results even when there are more results available. // We recommend that you check IsTruncated after every call to ensure that you - // receive all of your results. + // receive all your results. IsTruncated *bool `type:"boolean"` // When IsTruncated is true, this element is present and contains the value @@ -19028,7 +20382,7 @@ type GetGroupPolicyInput struct { // The name of the group the policy is associated with. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -19037,7 +20391,7 @@ type GetGroupPolicyInput struct { // The name of the policy document to get. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -19142,7 +20496,7 @@ type GetInstanceProfileInput struct { // The name of the instance profile to get information about. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -19213,7 +20567,7 @@ type GetLoginProfileInput struct { // The name of the user whose login profile you want to retrieve. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -19466,7 +20820,7 @@ type GetPolicyVersionInput struct { // Identifies the policy version to retrieve. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters that consists of the lowercase letter 'v' followed // by one or two digits, and optionally followed by a period '.' and a string // of letters and digits. @@ -19545,7 +20899,7 @@ type GetRoleInput struct { // The name of the IAM role to get information about. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -19616,7 +20970,7 @@ type GetRolePolicyInput struct { // The name of the policy document to get. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -19625,7 +20979,7 @@ type GetRolePolicyInput struct { // The name of the role associated with the policy. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -19825,7 +21179,7 @@ type GetSSHPublicKeyInput struct { // The unique identifier for the SSH public key. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters that can consist of any upper or lowercased letter // or digit. // @@ -19834,7 +21188,7 @@ type GetSSHPublicKeyInput struct { // The name of the IAM user associated with the SSH public key. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -19924,7 +21278,7 @@ type GetServerCertificateInput struct { // The name of the server certificate you want to retrieve information about. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -19990,6 +21344,376 @@ func (s *GetServerCertificateOutput) SetServerCertificate(v *ServerCertificate) return s } +type GetServiceLastAccessedDetailsInput struct { + _ struct{} `type:"structure"` + + // The ID of the request generated by the GenerateServiceLastAccessedDetails + // operation. + // + // JobId is a required field + JobId *string `min:"36" type:"string" required:"true"` + + // Use this parameter only when paginating results and only after you receive + // a response indicating that the results are truncated. Set it to the value + // of the Marker element in the response that you received to indicate where + // the next call should start. + Marker *string `min:"1" type:"string"` + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true. + // + // If you do not include this parameter, the number of items defaults to 100. + // Note that IAM might return fewer results, even when there are more results + // available. In that case, the IsTruncated response element returns true, and + // Marker contains a value to include in the subsequent call that tells the + // service where to continue from. + MaxItems *int64 `min:"1" type:"integer"` +} + +// String returns the string representation +func (s GetServiceLastAccessedDetailsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetServiceLastAccessedDetailsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetServiceLastAccessedDetailsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetServiceLastAccessedDetailsInput"} + if s.JobId == nil { + invalidParams.Add(request.NewErrParamRequired("JobId")) + } + if s.JobId != nil && len(*s.JobId) < 36 { + invalidParams.Add(request.NewErrParamMinLen("JobId", 36)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetJobId sets the JobId field's value. +func (s *GetServiceLastAccessedDetailsInput) SetJobId(v string) *GetServiceLastAccessedDetailsInput { + s.JobId = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *GetServiceLastAccessedDetailsInput) SetMarker(v string) *GetServiceLastAccessedDetailsInput { + s.Marker = &v + return s +} + +// SetMaxItems sets the MaxItems field's value. +func (s *GetServiceLastAccessedDetailsInput) SetMaxItems(v int64) *GetServiceLastAccessedDetailsInput { + s.MaxItems = &v + return s +} + +type GetServiceLastAccessedDetailsOutput struct { + _ struct{} `type:"structure"` + + // An object that contains details about the reason the operation failed. + Error *ErrorDetails `type:"structure"` + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Markerrequest parameter to retrieve more items. Note that IAM might return fewer + // than the MaxItemsnumber of results even when there are more results available. We recommend + // that you check IsTruncated + IsTruncated *bool `type:"boolean"` + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), + // when the generated report job was completed or failed. + // + // This field is null if the job is still in progress, as indicated by a JobStatus + // value of IN_PROGRESS. + // + // JobCompletionDate is a required field + JobCompletionDate *time.Time `type:"timestamp" required:"true"` + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), + // when the report job was created. + // + // JobCreationDate is a required field + JobCreationDate *time.Time `type:"timestamp" required:"true"` + + // The status of the job. + // + // JobStatus is a required field + JobStatus *string `type:"string" required:"true" enum:"jobStatusType"` + + // When IsTruncated is true, this element is present and contains the value + // to use for the Marker parameter in a subsequent pagination request. + Marker *string `min:"1" type:"string"` + + // A ServiceLastAccessed object that contains details about the most recent + // attempt to access the service. + // + // ServicesLastAccessed is a required field + ServicesLastAccessed []*ServiceLastAccessed `type:"list" required:"true"` +} + +// String returns the string representation +func (s GetServiceLastAccessedDetailsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetServiceLastAccessedDetailsOutput) GoString() string { + return s.String() +} + +// SetError sets the Error field's value. +func (s *GetServiceLastAccessedDetailsOutput) SetError(v *ErrorDetails) *GetServiceLastAccessedDetailsOutput { + s.Error = v + return s +} + +// SetIsTruncated sets the IsTruncated field's value. +func (s *GetServiceLastAccessedDetailsOutput) SetIsTruncated(v bool) *GetServiceLastAccessedDetailsOutput { + s.IsTruncated = &v + return s +} + +// SetJobCompletionDate sets the JobCompletionDate field's value. +func (s *GetServiceLastAccessedDetailsOutput) SetJobCompletionDate(v time.Time) *GetServiceLastAccessedDetailsOutput { + s.JobCompletionDate = &v + return s +} + +// SetJobCreationDate sets the JobCreationDate field's value. +func (s *GetServiceLastAccessedDetailsOutput) SetJobCreationDate(v time.Time) *GetServiceLastAccessedDetailsOutput { + s.JobCreationDate = &v + return s +} + +// SetJobStatus sets the JobStatus field's value. +func (s *GetServiceLastAccessedDetailsOutput) SetJobStatus(v string) *GetServiceLastAccessedDetailsOutput { + s.JobStatus = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *GetServiceLastAccessedDetailsOutput) SetMarker(v string) *GetServiceLastAccessedDetailsOutput { + s.Marker = &v + return s +} + +// SetServicesLastAccessed sets the ServicesLastAccessed field's value. +func (s *GetServiceLastAccessedDetailsOutput) SetServicesLastAccessed(v []*ServiceLastAccessed) *GetServiceLastAccessedDetailsOutput { + s.ServicesLastAccessed = v + return s +} + +type GetServiceLastAccessedDetailsWithEntitiesInput struct { + _ struct{} `type:"structure"` + + // The ID of the request generated by the GenerateServiceLastAccessedDetails + // operation. + // + // JobId is a required field + JobId *string `min:"36" type:"string" required:"true"` + + // Use this parameter only when paginating results and only after you receive + // a response indicating that the results are truncated. Set it to the value + // of the Marker element in the response that you received to indicate where + // the next call should start. + Marker *string `min:"1" type:"string"` + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true. + // + // If you do not include this parameter, the number of items defaults to 100. + // Note that IAM might return fewer results, even when there are more results + // available. In that case, the IsTruncated response element returns true, and + // Marker contains a value to include in the subsequent call that tells the + // service where to continue from. + MaxItems *int64 `min:"1" type:"integer"` + + // The service namespace for an AWS service. Provide the service namespace to + // learn when the IAM entity last attempted to access the specified service. + // + // To learn the service namespace for a service, go to Actions, Resources, and + // Condition Keys for AWS Services (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_actions-resources-contextkeys.html) + // in the IAM User Guide and choose the name of the service to view details + // for that service. In the first paragraph, find the service prefix. For example, + // (service prefix: a4b). For more information about service namespaces, see + // AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // in the AWS General Reference. + // + // ServiceNamespace is a required field + ServiceNamespace *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetServiceLastAccessedDetailsWithEntitiesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetServiceLastAccessedDetailsWithEntitiesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetServiceLastAccessedDetailsWithEntitiesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetServiceLastAccessedDetailsWithEntitiesInput"} + if s.JobId == nil { + invalidParams.Add(request.NewErrParamRequired("JobId")) + } + if s.JobId != nil && len(*s.JobId) < 36 { + invalidParams.Add(request.NewErrParamMinLen("JobId", 36)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + if s.ServiceNamespace == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceNamespace")) + } + if s.ServiceNamespace != nil && len(*s.ServiceNamespace) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ServiceNamespace", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetJobId sets the JobId field's value. +func (s *GetServiceLastAccessedDetailsWithEntitiesInput) SetJobId(v string) *GetServiceLastAccessedDetailsWithEntitiesInput { + s.JobId = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *GetServiceLastAccessedDetailsWithEntitiesInput) SetMarker(v string) *GetServiceLastAccessedDetailsWithEntitiesInput { + s.Marker = &v + return s +} + +// SetMaxItems sets the MaxItems field's value. +func (s *GetServiceLastAccessedDetailsWithEntitiesInput) SetMaxItems(v int64) *GetServiceLastAccessedDetailsWithEntitiesInput { + s.MaxItems = &v + return s +} + +// SetServiceNamespace sets the ServiceNamespace field's value. +func (s *GetServiceLastAccessedDetailsWithEntitiesInput) SetServiceNamespace(v string) *GetServiceLastAccessedDetailsWithEntitiesInput { + s.ServiceNamespace = &v + return s +} + +type GetServiceLastAccessedDetailsWithEntitiesOutput struct { + _ struct{} `type:"structure"` + + // An EntityDetailsList object that contains details about when an IAM entity + // (user or role) used group or policy permissions in an attempt to access the + // specified AWS service. + // + // EntityDetailsList is a required field + EntityDetailsList []*EntityDetails `type:"list" required:"true"` + + // An object that contains details about the reason the operation failed. + Error *ErrorDetails `type:"structure"` + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. Note that IAM might return fewer + // than the MaxItems number of results even when there are more results available. + // We recommend that you check IsTruncated after every call to ensure that you + // receive all your results. + IsTruncated *bool `type:"boolean"` + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), + // when the generated report job was completed or failed. + // + // JobCompletionDate is a required field + JobCompletionDate *time.Time `type:"timestamp" required:"true"` + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), + // when the report job was created. + // + // JobCreationDate is a required field + JobCreationDate *time.Time `type:"timestamp" required:"true"` + + // The status of the job. + // + // JobStatus is a required field + JobStatus *string `type:"string" required:"true" enum:"jobStatusType"` + + // When IsTruncated is true, this element is present and contains the value + // to use for the Marker parameter in a subsequent pagination request. + Marker *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s GetServiceLastAccessedDetailsWithEntitiesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetServiceLastAccessedDetailsWithEntitiesOutput) GoString() string { + return s.String() +} + +// SetEntityDetailsList sets the EntityDetailsList field's value. +func (s *GetServiceLastAccessedDetailsWithEntitiesOutput) SetEntityDetailsList(v []*EntityDetails) *GetServiceLastAccessedDetailsWithEntitiesOutput { + s.EntityDetailsList = v + return s +} + +// SetError sets the Error field's value. +func (s *GetServiceLastAccessedDetailsWithEntitiesOutput) SetError(v *ErrorDetails) *GetServiceLastAccessedDetailsWithEntitiesOutput { + s.Error = v + return s +} + +// SetIsTruncated sets the IsTruncated field's value. +func (s *GetServiceLastAccessedDetailsWithEntitiesOutput) SetIsTruncated(v bool) *GetServiceLastAccessedDetailsWithEntitiesOutput { + s.IsTruncated = &v + return s +} + +// SetJobCompletionDate sets the JobCompletionDate field's value. +func (s *GetServiceLastAccessedDetailsWithEntitiesOutput) SetJobCompletionDate(v time.Time) *GetServiceLastAccessedDetailsWithEntitiesOutput { + s.JobCompletionDate = &v + return s +} + +// SetJobCreationDate sets the JobCreationDate field's value. +func (s *GetServiceLastAccessedDetailsWithEntitiesOutput) SetJobCreationDate(v time.Time) *GetServiceLastAccessedDetailsWithEntitiesOutput { + s.JobCreationDate = &v + return s +} + +// SetJobStatus sets the JobStatus field's value. +func (s *GetServiceLastAccessedDetailsWithEntitiesOutput) SetJobStatus(v string) *GetServiceLastAccessedDetailsWithEntitiesOutput { + s.JobStatus = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *GetServiceLastAccessedDetailsWithEntitiesOutput) SetMarker(v string) *GetServiceLastAccessedDetailsWithEntitiesOutput { + s.Marker = &v + return s +} + type GetServiceLinkedRoleDeletionStatusInput struct { _ struct{} `type:"structure"` @@ -20072,7 +21796,7 @@ type GetUserInput struct { // The name of the user to get information about. // // This parameter is optional. If it is not included, it defaults to the user - // making the request. This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // making the request. This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- UserName *string `min:"1" type:"string"` @@ -20114,21 +21838,21 @@ type GetUserOutput struct { // A structure containing details about the IAM user. // // Due to a service issue, password last used data does not include password - // use from May 3rd 2018 22:50 PDT to May 23rd 2018 14:08 PDT. This affects - // last sign-in (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_finding-unused.html) + // use from May 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + // sign-in (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_finding-unused.html) // dates shown in the IAM console and password last used dates in the IAM credential // report (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html), // and returned by this GetUser API. If users signed in during the affected // time, the password last used date that is returned is the date the user last - // signed in before May 3rd 2018. For users that signed in after May 23rd 2018 + // signed in before May 3, 2018. For users that signed in after May 23, 2018 // 14:08 PDT, the returned password last used date is accurate. // - // If you use password last used information to identify unused credentials - // for deletion, such as deleting users who did not sign in to AWS in the last - // 90 days, we recommend that you adjust your evaluation window to include dates - // after May 23rd 2018. Alternatively, if your users use access keys to access - // AWS programmatically you can refer to access key last used information because - // it is accurate for all dates. + // You can use password last used information to identify unused credentials + // for deletion. For example, you might delete users who did not sign in to + // AWS in the last 90 days. In cases like this, we recommend that you adjust + // your evaluation window to include dates after May 23, 2018. Alternatively, + // if your users use access keys to access AWS programmatically you can refer + // to access key last used information because it is accurate for all dates. // // User is a required field User *User `type:"structure" required:"true"` @@ -20155,7 +21879,7 @@ type GetUserPolicyInput struct { // The name of the policy document to get. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -20164,7 +21888,7 @@ type GetUserPolicyInput struct { // The name of the user who the policy is associated with. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -20546,20 +22270,20 @@ type ListAccessKeysInput struct { // the next call should start. Marker *string `min:"1" type:"string"` - // (Optional) Use this only when paginating results to indicate the maximum - // number of items you want in the response. If additional items exist beyond - // the maximum you specify, the IsTruncated response element is true. + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true. // - // If you do not include this parameter, it defaults to 100. Note that IAM might - // return fewer results, even when there are more results available. In that - // case, the IsTruncated response element returns true and Marker contains a - // value to include in the subsequent call that tells the service where to continue - // from. + // If you do not include this parameter, the number of items defaults to 100. + // Note that IAM might return fewer results, even when there are more results + // available. In that case, the IsTruncated response element returns true, and + // Marker contains a value to include in the subsequent call that tells the + // service where to continue from. MaxItems *int64 `min:"1" type:"integer"` // The name of the user. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- UserName *string `min:"1" type:"string"` @@ -20626,7 +22350,7 @@ type ListAccessKeysOutput struct { // request parameter to retrieve more items. Note that IAM might return fewer // than the MaxItems number of results even when there are more results available. // We recommend that you check IsTruncated after every call to ensure that you - // receive all of your results. + // receive all your results. IsTruncated *bool `type:"boolean"` // When IsTruncated is true, this element is present and contains the value @@ -20671,15 +22395,15 @@ type ListAccountAliasesInput struct { // the next call should start. Marker *string `min:"1" type:"string"` - // (Optional) Use this only when paginating results to indicate the maximum - // number of items you want in the response. If additional items exist beyond - // the maximum you specify, the IsTruncated response element is true. + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true. // - // If you do not include this parameter, it defaults to 100. Note that IAM might - // return fewer results, even when there are more results available. In that - // case, the IsTruncated response element returns true and Marker contains a - // value to include in the subsequent call that tells the service where to continue - // from. + // If you do not include this parameter, the number of items defaults to 100. + // Note that IAM might return fewer results, even when there are more results + // available. In that case, the IsTruncated response element returns true, and + // Marker contains a value to include in the subsequent call that tells the + // service where to continue from. MaxItems *int64 `min:"1" type:"integer"` } @@ -20736,7 +22460,7 @@ type ListAccountAliasesOutput struct { // request parameter to retrieve more items. Note that IAM might return fewer // than the MaxItems number of results even when there are more results available. // We recommend that you check IsTruncated after every call to ensure that you - // receive all of your results. + // receive all your results. IsTruncated *bool `type:"boolean"` // When IsTruncated is true, this element is present and contains the value @@ -20778,7 +22502,7 @@ type ListAttachedGroupPoliciesInput struct { // The name (friendly name, not ARN) of the group to list attached policies // for. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -20791,21 +22515,21 @@ type ListAttachedGroupPoliciesInput struct { // the next call should start. Marker *string `min:"1" type:"string"` - // (Optional) Use this only when paginating results to indicate the maximum - // number of items you want in the response. If additional items exist beyond - // the maximum you specify, the IsTruncated response element is true. + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true. // - // If you do not include this parameter, it defaults to 100. Note that IAM might - // return fewer results, even when there are more results available. In that - // case, the IsTruncated response element returns true and Marker contains a - // value to include in the subsequent call that tells the service where to continue - // from. + // If you do not include this parameter, the number of items defaults to 100. + // Note that IAM might return fewer results, even when there are more results + // available. In that case, the IsTruncated response element returns true, and + // Marker contains a value to include in the subsequent call that tells the + // service where to continue from. MaxItems *int64 `min:"1" type:"integer"` // The path prefix for filtering the results. This parameter is optional. If // it is not included, it defaults to a slash (/), listing all policies. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of either a forward slash (/) by itself // or a string that must begin and end with forward slashes. In addition, it // can contain any ASCII character from the ! (\u0021) through the DEL character @@ -20882,7 +22606,7 @@ type ListAttachedGroupPoliciesOutput struct { // request parameter to retrieve more items. Note that IAM might return fewer // than the MaxItems number of results even when there are more results available. // We recommend that you check IsTruncated after every call to ensure that you - // receive all of your results. + // receive all your results. IsTruncated *bool `type:"boolean"` // When IsTruncated is true, this element is present and contains the value @@ -20927,21 +22651,21 @@ type ListAttachedRolePoliciesInput struct { // the next call should start. Marker *string `min:"1" type:"string"` - // (Optional) Use this only when paginating results to indicate the maximum - // number of items you want in the response. If additional items exist beyond - // the maximum you specify, the IsTruncated response element is true. + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true. // - // If you do not include this parameter, it defaults to 100. Note that IAM might - // return fewer results, even when there are more results available. In that - // case, the IsTruncated response element returns true and Marker contains a - // value to include in the subsequent call that tells the service where to continue - // from. + // If you do not include this parameter, the number of items defaults to 100. + // Note that IAM might return fewer results, even when there are more results + // available. In that case, the IsTruncated response element returns true, and + // Marker contains a value to include in the subsequent call that tells the + // service where to continue from. MaxItems *int64 `min:"1" type:"integer"` // The path prefix for filtering the results. This parameter is optional. If // it is not included, it defaults to a slash (/), listing all policies. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of either a forward slash (/) by itself // or a string that must begin and end with forward slashes. In addition, it // can contain any ASCII character from the ! (\u0021) through the DEL character @@ -20951,7 +22675,7 @@ type ListAttachedRolePoliciesInput struct { // The name (friendly name, not ARN) of the role to list attached policies for. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -21027,7 +22751,7 @@ type ListAttachedRolePoliciesOutput struct { // request parameter to retrieve more items. Note that IAM might return fewer // than the MaxItems number of results even when there are more results available. // We recommend that you check IsTruncated after every call to ensure that you - // receive all of your results. + // receive all your results. IsTruncated *bool `type:"boolean"` // When IsTruncated is true, this element is present and contains the value @@ -21072,21 +22796,21 @@ type ListAttachedUserPoliciesInput struct { // the next call should start. Marker *string `min:"1" type:"string"` - // (Optional) Use this only when paginating results to indicate the maximum - // number of items you want in the response. If additional items exist beyond - // the maximum you specify, the IsTruncated response element is true. + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true. // - // If you do not include this parameter, it defaults to 100. Note that IAM might - // return fewer results, even when there are more results available. In that - // case, the IsTruncated response element returns true and Marker contains a - // value to include in the subsequent call that tells the service where to continue - // from. + // If you do not include this parameter, the number of items defaults to 100. + // Note that IAM might return fewer results, even when there are more results + // available. In that case, the IsTruncated response element returns true, and + // Marker contains a value to include in the subsequent call that tells the + // service where to continue from. MaxItems *int64 `min:"1" type:"integer"` // The path prefix for filtering the results. This parameter is optional. If // it is not included, it defaults to a slash (/), listing all policies. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of either a forward slash (/) by itself // or a string that must begin and end with forward slashes. In addition, it // can contain any ASCII character from the ! (\u0021) through the DEL character @@ -21096,7 +22820,7 @@ type ListAttachedUserPoliciesInput struct { // The name (friendly name, not ARN) of the user to list attached policies for. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -21172,7 +22896,7 @@ type ListAttachedUserPoliciesOutput struct { // request parameter to retrieve more items. Note that IAM might return fewer // than the MaxItems number of results even when there are more results available. // We recommend that you check IsTruncated after every call to ensure that you - // receive all of your results. + // receive all your results. IsTruncated *bool `type:"boolean"` // When IsTruncated is true, this element is present and contains the value @@ -21225,21 +22949,21 @@ type ListEntitiesForPolicyInput struct { // the next call should start. Marker *string `min:"1" type:"string"` - // (Optional) Use this only when paginating results to indicate the maximum - // number of items you want in the response. If additional items exist beyond - // the maximum you specify, the IsTruncated response element is true. + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true. // - // If you do not include this parameter, it defaults to 100. Note that IAM might - // return fewer results, even when there are more results available. In that - // case, the IsTruncated response element returns true and Marker contains a - // value to include in the subsequent call that tells the service where to continue - // from. + // If you do not include this parameter, the number of items defaults to 100. + // Note that IAM might return fewer results, even when there are more results + // available. In that case, the IsTruncated response element returns true, and + // Marker contains a value to include in the subsequent call that tells the + // service where to continue from. MaxItems *int64 `min:"1" type:"integer"` // The path prefix for filtering the results. This parameter is optional. If // it is not included, it defaults to a slash (/), listing all entities. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of either a forward slash (/) by itself // or a string that must begin and end with forward slashes. In addition, it // can contain any ASCII character from the ! (\u0021) through the DEL character @@ -21346,7 +23070,7 @@ type ListEntitiesForPolicyOutput struct { // request parameter to retrieve more items. Note that IAM might return fewer // than the MaxItems number of results even when there are more results available. // We recommend that you check IsTruncated after every call to ensure that you - // receive all of your results. + // receive all your results. IsTruncated *bool `type:"boolean"` // When IsTruncated is true, this element is present and contains the value @@ -21408,7 +23132,7 @@ type ListGroupPoliciesInput struct { // The name of the group to list policies for. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -21421,15 +23145,15 @@ type ListGroupPoliciesInput struct { // the next call should start. Marker *string `min:"1" type:"string"` - // (Optional) Use this only when paginating results to indicate the maximum - // number of items you want in the response. If additional items exist beyond - // the maximum you specify, the IsTruncated response element is true. + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true. // - // If you do not include this parameter, it defaults to 100. Note that IAM might - // return fewer results, even when there are more results available. In that - // case, the IsTruncated response element returns true and Marker contains a - // value to include in the subsequent call that tells the service where to continue - // from. + // If you do not include this parameter, the number of items defaults to 100. + // Note that IAM might return fewer results, even when there are more results + // available. In that case, the IsTruncated response element returns true, and + // Marker contains a value to include in the subsequent call that tells the + // service where to continue from. MaxItems *int64 `min:"1" type:"integer"` } @@ -21492,7 +23216,7 @@ type ListGroupPoliciesOutput struct { // request parameter to retrieve more items. Note that IAM might return fewer // than the MaxItems number of results even when there are more results available. // We recommend that you check IsTruncated after every call to ensure that you - // receive all of your results. + // receive all your results. IsTruncated *bool `type:"boolean"` // When IsTruncated is true, this element is present and contains the value @@ -21501,7 +23225,7 @@ type ListGroupPoliciesOutput struct { // A list of policy names. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -21546,20 +23270,20 @@ type ListGroupsForUserInput struct { // the next call should start. Marker *string `min:"1" type:"string"` - // (Optional) Use this only when paginating results to indicate the maximum - // number of items you want in the response. If additional items exist beyond - // the maximum you specify, the IsTruncated response element is true. + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true. // - // If you do not include this parameter, it defaults to 100. Note that IAM might - // return fewer results, even when there are more results available. In that - // case, the IsTruncated response element returns true and Marker contains a - // value to include in the subsequent call that tells the service where to continue - // from. + // If you do not include this parameter, the number of items defaults to 100. + // Note that IAM might return fewer results, even when there are more results + // available. In that case, the IsTruncated response element returns true, and + // Marker contains a value to include in the subsequent call that tells the + // service where to continue from. MaxItems *int64 `min:"1" type:"integer"` // The name of the user to list groups for. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -21631,7 +23355,7 @@ type ListGroupsForUserOutput struct { // request parameter to retrieve more items. Note that IAM might return fewer // than the MaxItems number of results even when there are more results available. // We recommend that you check IsTruncated after every call to ensure that you - // receive all of your results. + // receive all your results. IsTruncated *bool `type:"boolean"` // When IsTruncated is true, this element is present and contains the value @@ -21676,27 +23400,27 @@ type ListGroupsInput struct { // the next call should start. Marker *string `min:"1" type:"string"` - // (Optional) Use this only when paginating results to indicate the maximum - // number of items you want in the response. If additional items exist beyond - // the maximum you specify, the IsTruncated response element is true. + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true. // - // If you do not include this parameter, it defaults to 100. Note that IAM might - // return fewer results, even when there are more results available. In that - // case, the IsTruncated response element returns true and Marker contains a - // value to include in the subsequent call that tells the service where to continue - // from. + // If you do not include this parameter, the number of items defaults to 100. + // Note that IAM might return fewer results, even when there are more results + // available. In that case, the IsTruncated response element returns true, and + // Marker contains a value to include in the subsequent call that tells the + // service where to continue from. MaxItems *int64 `min:"1" type:"integer"` // The path prefix for filtering the results. For example, the prefix /division_abc/subdivision_xyz/ // gets all groups whose path starts with /division_abc/subdivision_xyz/. // // This parameter is optional. If it is not included, it defaults to a slash - // (/), listing all groups. This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. + // (/), listing all groups. This parameter allows (through its regex pattern + // (http://wikipedia.org/wiki/regex)) a string of characters consisting of either + // a forward slash (/) by itself or a string that must begin and end with forward + // slashes. In addition, it can contain any ASCII character from the ! (\u0021) + // through the DEL character (\u007F), including most punctuation characters, + // digits, and upper and lowercased letters. PathPrefix *string `min:"1" type:"string"` } @@ -21761,7 +23485,7 @@ type ListGroupsOutput struct { // request parameter to retrieve more items. Note that IAM might return fewer // than the MaxItems number of results even when there are more results available. // We recommend that you check IsTruncated after every call to ensure that you - // receive all of your results. + // receive all your results. IsTruncated *bool `type:"boolean"` // When IsTruncated is true, this element is present and contains the value @@ -21806,20 +23530,20 @@ type ListInstanceProfilesForRoleInput struct { // the next call should start. Marker *string `min:"1" type:"string"` - // (Optional) Use this only when paginating results to indicate the maximum - // number of items you want in the response. If additional items exist beyond - // the maximum you specify, the IsTruncated response element is true. + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true. // - // If you do not include this parameter, it defaults to 100. Note that IAM might - // return fewer results, even when there are more results available. In that - // case, the IsTruncated response element returns true and Marker contains a - // value to include in the subsequent call that tells the service where to continue - // from. + // If you do not include this parameter, the number of items defaults to 100. + // Note that IAM might return fewer results, even when there are more results + // available. In that case, the IsTruncated response element returns true, and + // Marker contains a value to include in the subsequent call that tells the + // service where to continue from. MaxItems *int64 `min:"1" type:"integer"` // The name of the role to list instance profiles for. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -21891,7 +23615,7 @@ type ListInstanceProfilesForRoleOutput struct { // request parameter to retrieve more items. Note that IAM might return fewer // than the MaxItems number of results even when there are more results available. // We recommend that you check IsTruncated after every call to ensure that you - // receive all of your results. + // receive all your results. IsTruncated *bool `type:"boolean"` // When IsTruncated is true, this element is present and contains the value @@ -21936,22 +23660,22 @@ type ListInstanceProfilesInput struct { // the next call should start. Marker *string `min:"1" type:"string"` - // (Optional) Use this only when paginating results to indicate the maximum - // number of items you want in the response. If additional items exist beyond - // the maximum you specify, the IsTruncated response element is true. + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true. // - // If you do not include this parameter, it defaults to 100. Note that IAM might - // return fewer results, even when there are more results available. In that - // case, the IsTruncated response element returns true and Marker contains a - // value to include in the subsequent call that tells the service where to continue - // from. + // If you do not include this parameter, the number of items defaults to 100. + // Note that IAM might return fewer results, even when there are more results + // available. In that case, the IsTruncated response element returns true, and + // Marker contains a value to include in the subsequent call that tells the + // service where to continue from. MaxItems *int64 `min:"1" type:"integer"` // The path prefix for filtering the results. For example, the prefix /application_abc/component_xyz/ // gets all instance profiles whose path starts with /application_abc/component_xyz/. // // This parameter is optional. If it is not included, it defaults to a slash - // (/), listing all instance profiles. This parameter allows (per its regex + // (/), listing all instance profiles. This parameter allows (through its regex // pattern (http://wikipedia.org/wiki/regex)) a string of characters consisting // of either a forward slash (/) by itself or a string that must begin and end // with forward slashes. In addition, it can contain any ASCII character from @@ -22021,7 +23745,7 @@ type ListInstanceProfilesOutput struct { // request parameter to retrieve more items. Note that IAM might return fewer // than the MaxItems number of results even when there are more results available. // We recommend that you check IsTruncated after every call to ensure that you - // receive all of your results. + // receive all your results. IsTruncated *bool `type:"boolean"` // When IsTruncated is true, this element is present and contains the value @@ -22066,20 +23790,20 @@ type ListMFADevicesInput struct { // the next call should start. Marker *string `min:"1" type:"string"` - // (Optional) Use this only when paginating results to indicate the maximum - // number of items you want in the response. If additional items exist beyond - // the maximum you specify, the IsTruncated response element is true. + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true. // - // If you do not include this parameter, it defaults to 100. Note that IAM might - // return fewer results, even when there are more results available. In that - // case, the IsTruncated response element returns true and Marker contains a - // value to include in the subsequent call that tells the service where to continue - // from. + // If you do not include this parameter, the number of items defaults to 100. + // Note that IAM might return fewer results, even when there are more results + // available. In that case, the IsTruncated response element returns true, and + // Marker contains a value to include in the subsequent call that tells the + // service where to continue from. MaxItems *int64 `min:"1" type:"integer"` // The name of the user whose MFA devices you want to list. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- UserName *string `min:"1" type:"string"` @@ -22141,7 +23865,7 @@ type ListMFADevicesOutput struct { // request parameter to retrieve more items. Note that IAM might return fewer // than the MaxItems number of results even when there are more results available. // We recommend that you check IsTruncated after every call to ensure that you - // receive all of your results. + // receive all your results. IsTruncated *bool `type:"boolean"` // A list of MFA devices. @@ -22220,6 +23944,183 @@ func (s *ListOpenIDConnectProvidersOutput) SetOpenIDConnectProviderList(v []*Ope return s } +// Contains details about the permissions policies that are attached to the +// specified identity (user, group, or role). +// +// This data type is used as a response element in the ListPoliciesGrantingServiceAccess +// operation. +type ListPoliciesGrantingServiceAccessEntry struct { + _ struct{} `type:"structure"` + + // The PoliciesGrantingServiceAccess object that contains details about the + // policy. + Policies []*PolicyGrantingServiceAccess `type:"list"` + + // The namespace of the service that was accessed. + // + // To learn the service namespace of a service, go to Actions, Resources, and + // Condition Keys for AWS Services (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_actions-resources-contextkeys.html) + // in the IAM User Guide. Choose the name of the service to view details for + // that service. In the first paragraph, find the service prefix. For example, + // (service prefix: a4b). For more information about service namespaces, see + // AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // in the AWS General Reference. + ServiceNamespace *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListPoliciesGrantingServiceAccessEntry) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPoliciesGrantingServiceAccessEntry) GoString() string { + return s.String() +} + +// SetPolicies sets the Policies field's value. +func (s *ListPoliciesGrantingServiceAccessEntry) SetPolicies(v []*PolicyGrantingServiceAccess) *ListPoliciesGrantingServiceAccessEntry { + s.Policies = v + return s +} + +// SetServiceNamespace sets the ServiceNamespace field's value. +func (s *ListPoliciesGrantingServiceAccessEntry) SetServiceNamespace(v string) *ListPoliciesGrantingServiceAccessEntry { + s.ServiceNamespace = &v + return s +} + +type ListPoliciesGrantingServiceAccessInput struct { + _ struct{} `type:"structure"` + + // The ARN of the IAM identity (user, group, or role) whose policies you want + // to list. + // + // Arn is a required field + Arn *string `min:"20" type:"string" required:"true"` + + // Use this parameter only when paginating results and only after you receive + // a response indicating that the results are truncated. Set it to the value + // of the Marker element in the response that you received to indicate where + // the next call should start. + Marker *string `min:"1" type:"string"` + + // The service namespace for the AWS services whose policies you want to list. + // + // To learn the service namespace for a service, go to Actions, Resources, and + // Condition Keys for AWS Services (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_actions-resources-contextkeys.html) + // in the IAM User Guide. Choose the name of the service to view details for + // that service. In the first paragraph, find the service prefix. For example, + // (service prefix: a4b). For more information about service namespaces, see + // AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // in the AWS General Reference. + // + // ServiceNamespaces is a required field + ServiceNamespaces []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s ListPoliciesGrantingServiceAccessInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPoliciesGrantingServiceAccessInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListPoliciesGrantingServiceAccessInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListPoliciesGrantingServiceAccessInput"} + if s.Arn == nil { + invalidParams.Add(request.NewErrParamRequired("Arn")) + } + if s.Arn != nil && len(*s.Arn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("Arn", 20)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.ServiceNamespaces == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceNamespaces")) + } + if s.ServiceNamespaces != nil && len(s.ServiceNamespaces) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ServiceNamespaces", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetArn sets the Arn field's value. +func (s *ListPoliciesGrantingServiceAccessInput) SetArn(v string) *ListPoliciesGrantingServiceAccessInput { + s.Arn = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *ListPoliciesGrantingServiceAccessInput) SetMarker(v string) *ListPoliciesGrantingServiceAccessInput { + s.Marker = &v + return s +} + +// SetServiceNamespaces sets the ServiceNamespaces field's value. +func (s *ListPoliciesGrantingServiceAccessInput) SetServiceNamespaces(v []*string) *ListPoliciesGrantingServiceAccessInput { + s.ServiceNamespaces = v + return s +} + +type ListPoliciesGrantingServiceAccessOutput struct { + _ struct{} `type:"structure"` + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can make a subsequent pagination request using the Marker + // request parameter to retrieve more items. We recommend that you check IsTruncated + // after every call to ensure that you receive all your results. + IsTruncated *bool `type:"boolean"` + + // When IsTruncated is true, this element is present and contains the value + // to use for the Marker parameter in a subsequent pagination request. + Marker *string `min:"1" type:"string"` + + // A ListPoliciesGrantingServiceAccess object that contains details about the + // permissions policies attached to the specified identity (user, group, or + // role). + // + // PoliciesGrantingServiceAccess is a required field + PoliciesGrantingServiceAccess []*ListPoliciesGrantingServiceAccessEntry `type:"list" required:"true"` +} + +// String returns the string representation +func (s ListPoliciesGrantingServiceAccessOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListPoliciesGrantingServiceAccessOutput) GoString() string { + return s.String() +} + +// SetIsTruncated sets the IsTruncated field's value. +func (s *ListPoliciesGrantingServiceAccessOutput) SetIsTruncated(v bool) *ListPoliciesGrantingServiceAccessOutput { + s.IsTruncated = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *ListPoliciesGrantingServiceAccessOutput) SetMarker(v string) *ListPoliciesGrantingServiceAccessOutput { + s.Marker = &v + return s +} + +// SetPoliciesGrantingServiceAccess sets the PoliciesGrantingServiceAccess field's value. +func (s *ListPoliciesGrantingServiceAccessOutput) SetPoliciesGrantingServiceAccess(v []*ListPoliciesGrantingServiceAccessEntry) *ListPoliciesGrantingServiceAccessOutput { + s.PoliciesGrantingServiceAccess = v + return s +} + type ListPoliciesInput struct { _ struct{} `type:"structure"` @@ -22229,15 +24130,15 @@ type ListPoliciesInput struct { // the next call should start. Marker *string `min:"1" type:"string"` - // (Optional) Use this only when paginating results to indicate the maximum - // number of items you want in the response. If additional items exist beyond - // the maximum you specify, the IsTruncated response element is true. + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true. // - // If you do not include this parameter, it defaults to 100. Note that IAM might - // return fewer results, even when there are more results available. In that - // case, the IsTruncated response element returns true and Marker contains a - // value to include in the subsequent call that tells the service where to continue - // from. + // If you do not include this parameter, the number of items defaults to 100. + // Note that IAM might return fewer results, even when there are more results + // available. In that case, the IsTruncated response element returns true, and + // Marker contains a value to include in the subsequent call that tells the + // service where to continue from. MaxItems *int64 `min:"1" type:"integer"` // A flag to filter the results to only the attached policies. @@ -22249,7 +24150,7 @@ type ListPoliciesInput struct { // The path prefix for filtering the results. This parameter is optional. If // it is not included, it defaults to a slash (/), listing all policies. This - // parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of either a forward slash (/) by itself // or a string that must begin and end with forward slashes. In addition, it // can contain any ASCII character from the ! (\u0021) through the DEL character @@ -22347,7 +24248,7 @@ type ListPoliciesOutput struct { // request parameter to retrieve more items. Note that IAM might return fewer // than the MaxItems number of results even when there are more results available. // We recommend that you check IsTruncated after every call to ensure that you - // receive all of your results. + // receive all your results. IsTruncated *bool `type:"boolean"` // When IsTruncated is true, this element is present and contains the value @@ -22395,15 +24296,15 @@ type ListPolicyVersionsInput struct { // the next call should start. Marker *string `min:"1" type:"string"` - // (Optional) Use this only when paginating results to indicate the maximum - // number of items you want in the response. If additional items exist beyond - // the maximum you specify, the IsTruncated response element is true. + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true. // - // If you do not include this parameter, it defaults to 100. Note that IAM might - // return fewer results, even when there are more results available. In that - // case, the IsTruncated response element returns true and Marker contains a - // value to include in the subsequent call that tells the service where to continue - // from. + // If you do not include this parameter, the number of items defaults to 100. + // Note that IAM might return fewer results, even when there are more results + // available. In that case, the IsTruncated response element returns true, and + // Marker contains a value to include in the subsequent call that tells the + // service where to continue from. MaxItems *int64 `min:"1" type:"integer"` // The Amazon Resource Name (ARN) of the IAM policy for which you want the versions. @@ -22475,7 +24376,7 @@ type ListPolicyVersionsOutput struct { // request parameter to retrieve more items. Note that IAM might return fewer // than the MaxItems number of results even when there are more results available. // We recommend that you check IsTruncated after every call to ensure that you - // receive all of your results. + // receive all your results. IsTruncated *bool `type:"boolean"` // When IsTruncated is true, this element is present and contains the value @@ -22527,20 +24428,20 @@ type ListRolePoliciesInput struct { // the next call should start. Marker *string `min:"1" type:"string"` - // (Optional) Use this only when paginating results to indicate the maximum - // number of items you want in the response. If additional items exist beyond - // the maximum you specify, the IsTruncated response element is true. + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true. // - // If you do not include this parameter, it defaults to 100. Note that IAM might - // return fewer results, even when there are more results available. In that - // case, the IsTruncated response element returns true and Marker contains a - // value to include in the subsequent call that tells the service where to continue - // from. + // If you do not include this parameter, the number of items defaults to 100. + // Note that IAM might return fewer results, even when there are more results + // available. In that case, the IsTruncated response element returns true, and + // Marker contains a value to include in the subsequent call that tells the + // service where to continue from. MaxItems *int64 `min:"1" type:"integer"` // The name of the role to list policies for. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -22607,44 +24508,176 @@ type ListRolePoliciesOutput struct { // request parameter to retrieve more items. Note that IAM might return fewer // than the MaxItems number of results even when there are more results available. // We recommend that you check IsTruncated after every call to ensure that you - // receive all of your results. + // receive all your results. + IsTruncated *bool `type:"boolean"` + + // When IsTruncated is true, this element is present and contains the value + // to use for the Marker parameter in a subsequent pagination request. + Marker *string `min:"1" type:"string"` + + // A list of policy names. + // + // PolicyNames is a required field + PolicyNames []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s ListRolePoliciesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListRolePoliciesOutput) GoString() string { + return s.String() +} + +// SetIsTruncated sets the IsTruncated field's value. +func (s *ListRolePoliciesOutput) SetIsTruncated(v bool) *ListRolePoliciesOutput { + s.IsTruncated = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *ListRolePoliciesOutput) SetMarker(v string) *ListRolePoliciesOutput { + s.Marker = &v + return s +} + +// SetPolicyNames sets the PolicyNames field's value. +func (s *ListRolePoliciesOutput) SetPolicyNames(v []*string) *ListRolePoliciesOutput { + s.PolicyNames = v + return s +} + +type ListRoleTagsInput struct { + _ struct{} `type:"structure"` + + // Use this parameter only when paginating results and only after you receive + // a response indicating that the results are truncated. Set it to the value + // of the Marker element in the response to indicate where the next call should + // start. + Marker *string `min:"1" type:"string"` + + // (Optional) Use this only when paginating results to indicate the maximum + // number of items that you want in the response. If additional items exist + // beyond the maximum that you specify, the IsTruncated response element is + // true. + // + // If you do not include this parameter, it defaults to 100. Note that IAM might + // return fewer results, even when more results are available. In that case, + // the IsTruncated response element returns true, and Marker contains a value + // to include in the subsequent call that tells the service where to continue + // from. + MaxItems *int64 `min:"1" type:"integer"` + + // The name of the IAM role for which you want to see the list of tags. + // + // This parameter accepts (through its regex pattern (http://wikipedia.org/wiki/regex)) + // a string of characters that consist of upper and lowercase alphanumeric characters + // with no spaces. You can also include any of the following characters: _+=,.@- + // + // RoleName is a required field + RoleName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListRoleTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListRoleTagsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListRoleTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListRoleTagsInput"} + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + if s.RoleName == nil { + invalidParams.Add(request.NewErrParamRequired("RoleName")) + } + if s.RoleName != nil && len(*s.RoleName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMarker sets the Marker field's value. +func (s *ListRoleTagsInput) SetMarker(v string) *ListRoleTagsInput { + s.Marker = &v + return s +} + +// SetMaxItems sets the MaxItems field's value. +func (s *ListRoleTagsInput) SetMaxItems(v int64) *ListRoleTagsInput { + s.MaxItems = &v + return s +} + +// SetRoleName sets the RoleName field's value. +func (s *ListRoleTagsInput) SetRoleName(v string) *ListRoleTagsInput { + s.RoleName = &v + return s +} + +type ListRoleTagsOutput struct { + _ struct{} `type:"structure"` + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can use the Marker request parameter to make a subsequent + // pagination request that retrieves more items. Note that IAM might return + // fewer than the MaxItems number of results even when more results are available. + // Check IsTruncated after every call to ensure that you receive all of your + // results. IsTruncated *bool `type:"boolean"` // When IsTruncated is true, this element is present and contains the value // to use for the Marker parameter in a subsequent pagination request. Marker *string `min:"1" type:"string"` - // A list of policy names. + // The list of tags currently that is attached to the role. Each tag consists + // of a key name and an associated value. If no tags are attached to the specified + // role, the response contains an empty list. // - // PolicyNames is a required field - PolicyNames []*string `type:"list" required:"true"` + // Tags is a required field + Tags []*Tag `type:"list" required:"true"` } // String returns the string representation -func (s ListRolePoliciesOutput) String() string { +func (s ListRoleTagsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListRolePoliciesOutput) GoString() string { +func (s ListRoleTagsOutput) GoString() string { return s.String() } // SetIsTruncated sets the IsTruncated field's value. -func (s *ListRolePoliciesOutput) SetIsTruncated(v bool) *ListRolePoliciesOutput { +func (s *ListRoleTagsOutput) SetIsTruncated(v bool) *ListRoleTagsOutput { s.IsTruncated = &v return s } // SetMarker sets the Marker field's value. -func (s *ListRolePoliciesOutput) SetMarker(v string) *ListRolePoliciesOutput { +func (s *ListRoleTagsOutput) SetMarker(v string) *ListRoleTagsOutput { s.Marker = &v return s } -// SetPolicyNames sets the PolicyNames field's value. -func (s *ListRolePoliciesOutput) SetPolicyNames(v []*string) *ListRolePoliciesOutput { - s.PolicyNames = v +// SetTags sets the Tags field's value. +func (s *ListRoleTagsOutput) SetTags(v []*Tag) *ListRoleTagsOutput { + s.Tags = v return s } @@ -22657,27 +24690,27 @@ type ListRolesInput struct { // the next call should start. Marker *string `min:"1" type:"string"` - // (Optional) Use this only when paginating results to indicate the maximum - // number of items you want in the response. If additional items exist beyond - // the maximum you specify, the IsTruncated response element is true. + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true. // - // If you do not include this parameter, it defaults to 100. Note that IAM might - // return fewer results, even when there are more results available. In that - // case, the IsTruncated response element returns true and Marker contains a - // value to include in the subsequent call that tells the service where to continue - // from. + // If you do not include this parameter, the number of items defaults to 100. + // Note that IAM might return fewer results, even when there are more results + // available. In that case, the IsTruncated response element returns true, and + // Marker contains a value to include in the subsequent call that tells the + // service where to continue from. MaxItems *int64 `min:"1" type:"integer"` // The path prefix for filtering the results. For example, the prefix /application_abc/component_xyz/ // gets all roles whose path starts with /application_abc/component_xyz/. // // This parameter is optional. If it is not included, it defaults to a slash - // (/), listing all roles. This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) - // a string of characters consisting of either a forward slash (/) by itself - // or a string that must begin and end with forward slashes. In addition, it - // can contain any ASCII character from the ! (\u0021) through the DEL character - // (\u007F), including most punctuation characters, digits, and upper and lowercased - // letters. + // (/), listing all roles. This parameter allows (through its regex pattern + // (http://wikipedia.org/wiki/regex)) a string of characters consisting of either + // a forward slash (/) by itself or a string that must begin and end with forward + // slashes. In addition, it can contain any ASCII character from the ! (\u0021) + // through the DEL character (\u007F), including most punctuation characters, + // digits, and upper and lowercased letters. PathPrefix *string `min:"1" type:"string"` } @@ -22737,7 +24770,7 @@ type ListRolesOutput struct { // request parameter to retrieve more items. Note that IAM might return fewer // than the MaxItems number of results even when there are more results available. // We recommend that you check IsTruncated after every call to ensure that you - // receive all of your results. + // receive all your results. IsTruncated *bool `type:"boolean"` // When IsTruncated is true, this element is present and contains the value @@ -22825,22 +24858,22 @@ type ListSSHPublicKeysInput struct { // the next call should start. Marker *string `min:"1" type:"string"` - // (Optional) Use this only when paginating results to indicate the maximum - // number of items you want in the response. If additional items exist beyond - // the maximum you specify, the IsTruncated response element is true. + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true. // - // If you do not include this parameter, it defaults to 100. Note that IAM might - // return fewer results, even when there are more results available. In that - // case, the IsTruncated response element returns true and Marker contains a - // value to include in the subsequent call that tells the service where to continue - // from. + // If you do not include this parameter, the number of items defaults to 100. + // Note that IAM might return fewer results, even when there are more results + // available. In that case, the IsTruncated response element returns true, and + // Marker contains a value to include in the subsequent call that tells the + // service where to continue from. MaxItems *int64 `min:"1" type:"integer"` // The name of the IAM user to list SSH public keys for. If none is specified, // the UserName field is determined implicitly based on the AWS access key used // to sign the request. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- UserName *string `min:"1" type:"string"` @@ -22902,7 +24935,7 @@ type ListSSHPublicKeysOutput struct { // request parameter to retrieve more items. Note that IAM might return fewer // than the MaxItems number of results even when there are more results available. // We recommend that you check IsTruncated after every call to ensure that you - // receive all of your results. + // receive all your results. IsTruncated *bool `type:"boolean"` // When IsTruncated is true, this element is present and contains the value @@ -22950,23 +24983,23 @@ type ListServerCertificatesInput struct { // the next call should start. Marker *string `min:"1" type:"string"` - // (Optional) Use this only when paginating results to indicate the maximum - // number of items you want in the response. If additional items exist beyond - // the maximum you specify, the IsTruncated response element is true. + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true. // - // If you do not include this parameter, it defaults to 100. Note that IAM might - // return fewer results, even when there are more results available. In that - // case, the IsTruncated response element returns true and Marker contains a - // value to include in the subsequent call that tells the service where to continue - // from. + // If you do not include this parameter, the number of items defaults to 100. + // Note that IAM might return fewer results, even when there are more results + // available. In that case, the IsTruncated response element returns true, and + // Marker contains a value to include in the subsequent call that tells the + // service where to continue from. MaxItems *int64 `min:"1" type:"integer"` // The path prefix for filtering the results. For example: /company/servercerts // would get all server certificates for which the path starts with /company/servercerts. // // This parameter is optional. If it is not included, it defaults to a slash - // (/), listing all server certificates. This parameter allows (per its regex - // pattern (http://wikipedia.org/wiki/regex)) a string of characters consisting + // (/), listing all server certificates. This parameter allows (through its + // regex pattern (http://wikipedia.org/wiki/regex)) a string of characters consisting // of either a forward slash (/) by itself or a string that must begin and end // with forward slashes. In addition, it can contain any ASCII character from // the ! (\u0021) through the DEL character (\u007F), including most punctuation @@ -23030,7 +25063,7 @@ type ListServerCertificatesOutput struct { // request parameter to retrieve more items. Note that IAM might return fewer // than the MaxItems number of results even when there are more results available. // We recommend that you check IsTruncated after every call to ensure that you - // receive all of your results. + // receive all your results. IsTruncated *bool `type:"boolean"` // When IsTruncated is true, this element is present and contains the value @@ -23082,7 +25115,7 @@ type ListServiceSpecificCredentialsInput struct { // about. If this value is not specified, then the operation assumes the user // whose credentials are used to call the operation. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- UserName *string `min:"1" type:"string"` @@ -23155,20 +25188,20 @@ type ListSigningCertificatesInput struct { // the next call should start. Marker *string `min:"1" type:"string"` - // (Optional) Use this only when paginating results to indicate the maximum - // number of items you want in the response. If additional items exist beyond - // the maximum you specify, the IsTruncated response element is true. + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true. // - // If you do not include this parameter, it defaults to 100. Note that IAM might - // return fewer results, even when there are more results available. In that - // case, the IsTruncated response element returns true and Marker contains a - // value to include in the subsequent call that tells the service where to continue - // from. + // If you do not include this parameter, the number of items defaults to 100. + // Note that IAM might return fewer results, even when there are more results + // available. In that case, the IsTruncated response element returns true, and + // Marker contains a value to include in the subsequent call that tells the + // service where to continue from. MaxItems *int64 `min:"1" type:"integer"` // The name of the IAM user whose signing certificates you want to examine. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- UserName *string `min:"1" type:"string"` @@ -23235,7 +25268,7 @@ type ListSigningCertificatesOutput struct { // request parameter to retrieve more items. Note that IAM might return fewer // than the MaxItems number of results even when there are more results available. // We recommend that you check IsTruncated after every call to ensure that you - // receive all of your results. + // receive all your results. IsTruncated *bool `type:"boolean"` // When IsTruncated is true, this element is present and contains the value @@ -23280,20 +25313,20 @@ type ListUserPoliciesInput struct { // the next call should start. Marker *string `min:"1" type:"string"` - // (Optional) Use this only when paginating results to indicate the maximum - // number of items you want in the response. If additional items exist beyond - // the maximum you specify, the IsTruncated response element is true. + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true. // - // If you do not include this parameter, it defaults to 100. Note that IAM might - // return fewer results, even when there are more results available. In that - // case, the IsTruncated response element returns true and Marker contains a - // value to include in the subsequent call that tells the service where to continue - // from. + // If you do not include this parameter, the number of items defaults to 100. + // Note that IAM might return fewer results, even when there are more results + // available. In that case, the IsTruncated response element returns true, and + // Marker contains a value to include in the subsequent call that tells the + // service where to continue from. MaxItems *int64 `min:"1" type:"integer"` // The name of the user to list policies for. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -23360,7 +25393,7 @@ type ListUserPoliciesOutput struct { // request parameter to retrieve more items. Note that IAM might return fewer // than the MaxItems number of results even when there are more results available. // We recommend that you check IsTruncated after every call to ensure that you - // receive all of your results. + // receive all your results. IsTruncated *bool `type:"boolean"` // When IsTruncated is true, this element is present and contains the value @@ -23401,31 +25434,163 @@ func (s *ListUserPoliciesOutput) SetPolicyNames(v []*string) *ListUserPoliciesOu return s } -type ListUsersInput struct { +type ListUserTagsInput struct { _ struct{} `type:"structure"` // Use this parameter only when paginating results and only after you receive // a response indicating that the results are truncated. Set it to the value - // of the Marker element in the response that you received to indicate where - // the next call should start. + // of the Marker element in the response to indicate where the next call should + // start. Marker *string `min:"1" type:"string"` // (Optional) Use this only when paginating results to indicate the maximum - // number of items you want in the response. If additional items exist beyond - // the maximum you specify, the IsTruncated response element is true. + // number of items that you want in the response. If additional items exist + // beyond the maximum that you specify, the IsTruncated response element is + // true. // // If you do not include this parameter, it defaults to 100. Note that IAM might - // return fewer results, even when there are more results available. In that - // case, the IsTruncated response element returns true and Marker contains a - // value to include in the subsequent call that tells the service where to continue + // return fewer results, even when more results are available. In that case, + // the IsTruncated response element returns true, and Marker contains a value + // to include in the subsequent call that tells the service where to continue // from. MaxItems *int64 `min:"1" type:"integer"` + // The name of the IAM user whose tags you want to see. + // + // This parameter accepts (through its regex pattern (http://wikipedia.org/wiki/regex)) + // a string of characters that consist of upper and lowercase alphanumeric characters + // with no spaces. You can also include any of the following characters: =,.@- + // + // UserName is a required field + UserName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListUserTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListUserTagsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListUserTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListUserTagsInput"} + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMarker sets the Marker field's value. +func (s *ListUserTagsInput) SetMarker(v string) *ListUserTagsInput { + s.Marker = &v + return s +} + +// SetMaxItems sets the MaxItems field's value. +func (s *ListUserTagsInput) SetMaxItems(v int64) *ListUserTagsInput { + s.MaxItems = &v + return s +} + +// SetUserName sets the UserName field's value. +func (s *ListUserTagsInput) SetUserName(v string) *ListUserTagsInput { + s.UserName = &v + return s +} + +type ListUserTagsOutput struct { + _ struct{} `type:"structure"` + + // A flag that indicates whether there are more items to return. If your results + // were truncated, you can use the Marker request parameter to make a subsequent + // pagination request that retrieves more items. Note that IAM might return + // fewer than the MaxItems number of results even when more results are available. + // Check IsTruncated after every call to ensure that you receive all of your + // results. + IsTruncated *bool `type:"boolean"` + + // When IsTruncated is true, this element is present and contains the value + // to use for the Marker parameter in a subsequent pagination request. + Marker *string `min:"1" type:"string"` + + // The list of tags that are currently attached to the user. Each tag consists + // of a key name and an associated value. If no tags are attached to the specified + // user, the response contains an empty list. + // + // Tags is a required field + Tags []*Tag `type:"list" required:"true"` +} + +// String returns the string representation +func (s ListUserTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListUserTagsOutput) GoString() string { + return s.String() +} + +// SetIsTruncated sets the IsTruncated field's value. +func (s *ListUserTagsOutput) SetIsTruncated(v bool) *ListUserTagsOutput { + s.IsTruncated = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *ListUserTagsOutput) SetMarker(v string) *ListUserTagsOutput { + s.Marker = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *ListUserTagsOutput) SetTags(v []*Tag) *ListUserTagsOutput { + s.Tags = v + return s +} + +type ListUsersInput struct { + _ struct{} `type:"structure"` + + // Use this parameter only when paginating results and only after you receive + // a response indicating that the results are truncated. Set it to the value + // of the Marker element in the response that you received to indicate where + // the next call should start. + Marker *string `min:"1" type:"string"` + + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true. + // + // If you do not include this parameter, the number of items defaults to 100. + // Note that IAM might return fewer results, even when there are more results + // available. In that case, the IsTruncated response element returns true, and + // Marker contains a value to include in the subsequent call that tells the + // service where to continue from. + MaxItems *int64 `min:"1" type:"integer"` + // The path prefix for filtering the results. For example: /division_abc/subdivision_xyz/, // which would get all user names whose path starts with /division_abc/subdivision_xyz/. // // This parameter is optional. If it is not included, it defaults to a slash - // (/), listing all user names. This parameter allows (per its regex pattern + // (/), listing all user names. This parameter allows (through its regex pattern // (http://wikipedia.org/wiki/regex)) a string of characters consisting of either // a forward slash (/) by itself or a string that must begin and end with forward // slashes. In addition, it can contain any ASCII character from the ! (\u0021) @@ -23490,7 +25655,7 @@ type ListUsersOutput struct { // request parameter to retrieve more items. Note that IAM might return fewer // than the MaxItems number of results even when there are more results available. // We recommend that you check IsTruncated after every call to ensure that you - // receive all of your results. + // receive all your results. IsTruncated *bool `type:"boolean"` // When IsTruncated is true, this element is present and contains the value @@ -23535,8 +25700,8 @@ type ListVirtualMFADevicesInput struct { _ struct{} `type:"structure"` // The status (Unassigned or Assigned) of the devices to list. If you do not - // specify an AssignmentStatus, the operation defaults to Any which lists both - // assigned and unassigned virtual MFA devices. + // specify an AssignmentStatus, the operation defaults to Any, which lists both + // assigned and unassigned virtual MFA devices., AssignmentStatus *string `type:"string" enum:"assignmentStatusType"` // Use this parameter only when paginating results and only after you receive @@ -23545,15 +25710,15 @@ type ListVirtualMFADevicesInput struct { // the next call should start. Marker *string `min:"1" type:"string"` - // (Optional) Use this only when paginating results to indicate the maximum - // number of items you want in the response. If additional items exist beyond - // the maximum you specify, the IsTruncated response element is true. + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true. // - // If you do not include this parameter, it defaults to 100. Note that IAM might - // return fewer results, even when there are more results available. In that - // case, the IsTruncated response element returns true and Marker contains a - // value to include in the subsequent call that tells the service where to continue - // from. + // If you do not include this parameter, the number of items defaults to 100. + // Note that IAM might return fewer results, even when there are more results + // available. In that case, the IsTruncated response element returns true, and + // Marker contains a value to include in the subsequent call that tells the + // service where to continue from. MaxItems *int64 `min:"1" type:"integer"` } @@ -23610,7 +25775,7 @@ type ListVirtualMFADevicesOutput struct { // request parameter to retrieve more items. Note that IAM might return fewer // than the MaxItems number of results even when there are more results available. // We recommend that you check IsTruncated after every call to ensure that you - // receive all of your results. + // receive all your results. IsTruncated *bool `type:"boolean"` // When IsTruncated is true, this element is present and contains the value @@ -23805,7 +25970,7 @@ type ManagedPolicyDetail struct { // the permissions boundary. // // For more information about permissions boundaries, see Permissions Boundaries - // for IAM Identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) + // for IAM Identities (http://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) // in the IAM User Guide. PermissionsBoundaryUsageCount *int64 `type:"integer"` @@ -24126,7 +26291,7 @@ type Policy struct { // set the permissions boundary. // // For more information about permissions boundaries, see Permissions Boundaries - // for IAM Identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) + // for IAM Identities (http://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) // in the IAM User Guide. PermissionsBoundaryUsageCount *int64 `type:"integer"` @@ -24261,6 +26426,89 @@ func (s *PolicyDetail) SetPolicyName(v string) *PolicyDetail { return s } +// Contains details about the permissions policies that are attached to the +// specified identity (user, group, or role). +// +// This data type is an element of the ListPoliciesGrantingServiceAccessEntry +// object. +type PolicyGrantingServiceAccess struct { + _ struct{} `type:"structure"` + + // The name of the entity (user or role) to which the inline policy is attached. + // + // This field is null for managed policies. For more information about these + // policy types, see Managed Policies and Inline Policies (http://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html) + // in the IAM User Guide. + EntityName *string `min:"1" type:"string"` + + // The type of entity (user or role) that used the policy to access the service + // to which the inline policy is attached. + // + // This field is null for managed policies. For more information about these + // policy types, see Managed Policies and Inline Policies (http://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html) + // in the IAM User Guide. + EntityType *string `type:"string" enum:"policyOwnerEntityType"` + + // The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS resources. + // + // For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS + // Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the AWS General Reference. + PolicyArn *string `min:"20" type:"string"` + + // The policy name. + // + // PolicyName is a required field + PolicyName *string `min:"1" type:"string" required:"true"` + + // The policy type. For more information about these policy types, see Managed + // Policies and Inline Policies (http://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html) + // in the IAM User Guide. + // + // PolicyType is a required field + PolicyType *string `type:"string" required:"true" enum:"policyType"` +} + +// String returns the string representation +func (s PolicyGrantingServiceAccess) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PolicyGrantingServiceAccess) GoString() string { + return s.String() +} + +// SetEntityName sets the EntityName field's value. +func (s *PolicyGrantingServiceAccess) SetEntityName(v string) *PolicyGrantingServiceAccess { + s.EntityName = &v + return s +} + +// SetEntityType sets the EntityType field's value. +func (s *PolicyGrantingServiceAccess) SetEntityType(v string) *PolicyGrantingServiceAccess { + s.EntityType = &v + return s +} + +// SetPolicyArn sets the PolicyArn field's value. +func (s *PolicyGrantingServiceAccess) SetPolicyArn(v string) *PolicyGrantingServiceAccess { + s.PolicyArn = &v + return s +} + +// SetPolicyName sets the PolicyName field's value. +func (s *PolicyGrantingServiceAccess) SetPolicyName(v string) *PolicyGrantingServiceAccess { + s.PolicyName = &v + return s +} + +// SetPolicyType sets the PolicyType field's value. +func (s *PolicyGrantingServiceAccess) SetPolicyType(v string) *PolicyGrantingServiceAccess { + s.PolicyType = &v + return s +} + // Contains information about a group that a managed policy is attached to. // // This data type is used as a response element in the ListEntitiesForPolicy @@ -24501,7 +26749,7 @@ type PutGroupPolicyInput struct { // The name of the group to associate the policy with. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -24527,7 +26775,7 @@ type PutGroupPolicyInput struct { // The name of the policy document. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -24701,7 +26949,7 @@ type PutRolePolicyInput struct { // The name of the policy document. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -24710,7 +26958,7 @@ type PutRolePolicyInput struct { // The name of the role to associate the policy with. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -24884,7 +27132,7 @@ type PutUserPolicyInput struct { // The name of the policy document. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -24893,7 +27141,7 @@ type PutUserPolicyInput struct { // The name of the user to associate the policy with. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -25055,7 +27303,7 @@ type RemoveRoleFromInstanceProfileInput struct { // The name of the instance profile to update. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -25064,7 +27312,7 @@ type RemoveRoleFromInstanceProfileInput struct { // The name of the role to remove. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -25135,7 +27383,7 @@ type RemoveUserFromGroupInput struct { // The name of the group to update. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -25144,7 +27392,7 @@ type RemoveUserFromGroupInput struct { // The name of the user to remove. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -25215,7 +27463,7 @@ type ResetServiceSpecificCredentialInput struct { // The unique identifier of the service-specific credential. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters that can consist of any upper or lowercased letter // or digit. // @@ -25226,7 +27474,7 @@ type ResetServiceSpecificCredentialInput struct { // If this value is not specified, then the operation assumes the user whose // credentials are used to call the operation. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- UserName *string `min:"1" type:"string"` @@ -25328,8 +27576,8 @@ type ResourceSpecificResult struct { // A list of the statements in the input policies that determine the result // for this part of the simulation. Remember that even if multiple statements // allow the operation on the resource, if any statement denies that operation, - // then the explicit deny overrides any allow, and the deny statement is the - // only entry included in the result. + // then the explicit deny overrides any allow. In addition, the deny statement + // is the only entry included in the result. MatchedStatements []*Statement `type:"list"` // A list of context keys that are required by the included input policies but @@ -25402,7 +27650,7 @@ type ResyncMFADeviceInput struct { // Serial number that uniquely identifies the MFA device. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -25411,7 +27659,7 @@ type ResyncMFADeviceInput struct { // The name of the user whose MFA device you want to resynchronize. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -25526,8 +27774,9 @@ type Role struct { Description *string `type:"string"` // The maximum session duration (in seconds) for the specified role. Anyone - // who uses the AWS CLI or API to assume the role can specify the duration using - // the optional DurationSeconds API parameter or duration-seconds CLI parameter. + // who uses the AWS CLI, or API to assume the role can specify the duration + // using the optional DurationSeconds API parameter or duration-seconds CLI + // parameter. MaxSessionDuration *int64 `min:"3600" type:"integer"` // The path to the role. For more information about paths, see IAM Identifiers @@ -25540,7 +27789,7 @@ type Role struct { // The ARN of the policy used to set the permissions boundary for the role. // // For more information about permissions boundaries, see Permissions Boundaries - // for IAM Identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) + // for IAM Identities (IAM/latest/UserGuide/access_policies_boundaries.html) // in the IAM User Guide. PermissionsBoundary *AttachedPermissionsBoundary `type:"structure"` @@ -25555,6 +27804,11 @@ type Role struct { // // RoleName is a required field RoleName *string `min:"1" type:"string" required:"true"` + + // A list of tags that are attached to the specified role. For more information + // about tagging, see Tagging IAM Identities (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) + // in the IAM User Guide. + Tags []*Tag `type:"list"` } // String returns the string representation @@ -25621,6 +27875,12 @@ func (s *Role) SetRoleName(v string) *Role { return s } +// SetTags sets the Tags field's value. +func (s *Role) SetTags(v []*Tag) *Role { + s.Tags = v + return s +} + // Contains information about an IAM role, including all of the role's policies. // // This data type is used as a response element in the GetAccountAuthorizationDetails @@ -25657,7 +27917,7 @@ type RoleDetail struct { // The ARN of the policy used to set the permissions boundary for the role. // // For more information about permissions boundaries, see Permissions Boundaries - // for IAM Identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) + // for IAM Identities (IAM/latest/UserGuide/access_policies_boundaries.html) // in the IAM User Guide. PermissionsBoundary *AttachedPermissionsBoundary `type:"structure"` @@ -25672,6 +27932,11 @@ type RoleDetail struct { // A list of inline policies embedded in the role. These policies are the role's // access (permissions) policies. RolePolicyList []*PolicyDetail `type:"list"` + + // A list of tags that are attached to the specified role. For more information + // about tagging, see Tagging IAM Identities (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) + // in the IAM User Guide. + Tags []*Tag `type:"list"` } // String returns the string representation @@ -25744,6 +28009,12 @@ func (s *RoleDetail) SetRolePolicyList(v []*PolicyDetail) *RoleDetail { return s } +// SetTags sets the Tags field's value. +func (s *RoleDetail) SetTags(v []*Tag) *RoleDetail { + s.Tags = v + return s +} + // An object that contains details about how a service-linked role is used, // if that information is returned by the service. // @@ -26080,33 +28351,121 @@ func (s *ServerCertificateMetadata) SetArn(v string) *ServerCertificateMetadata return s } -// SetExpiration sets the Expiration field's value. -func (s *ServerCertificateMetadata) SetExpiration(v time.Time) *ServerCertificateMetadata { - s.Expiration = &v +// SetExpiration sets the Expiration field's value. +func (s *ServerCertificateMetadata) SetExpiration(v time.Time) *ServerCertificateMetadata { + s.Expiration = &v + return s +} + +// SetPath sets the Path field's value. +func (s *ServerCertificateMetadata) SetPath(v string) *ServerCertificateMetadata { + s.Path = &v + return s +} + +// SetServerCertificateId sets the ServerCertificateId field's value. +func (s *ServerCertificateMetadata) SetServerCertificateId(v string) *ServerCertificateMetadata { + s.ServerCertificateId = &v + return s +} + +// SetServerCertificateName sets the ServerCertificateName field's value. +func (s *ServerCertificateMetadata) SetServerCertificateName(v string) *ServerCertificateMetadata { + s.ServerCertificateName = &v + return s +} + +// SetUploadDate sets the UploadDate field's value. +func (s *ServerCertificateMetadata) SetUploadDate(v time.Time) *ServerCertificateMetadata { + s.UploadDate = &v + return s +} + +// Contains details about the most recent attempt to access the service. +// +// This data type is used as a response element in the GetServiceLastAccessedDetails +// operation. +type ServiceLastAccessed struct { + _ struct{} `type:"structure"` + + // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601), + // when an authenticated entity most recently attempted to access the service. + // AWS does not report unauthenticated requests. + // + // This field is null if no IAM entities attempted to access the service within + // the reporting period (http://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). + LastAuthenticated *time.Time `type:"timestamp"` + + // The ARN of the authenticated entity (user or role) that last attempted to + // access the service. AWS does not report unauthenticated requests. + // + // This field is null if no IAM entities attempted to access the service within + // the reporting period (http://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). + LastAuthenticatedEntity *string `min:"20" type:"string"` + + // The name of the service in which access was attempted. + // + // ServiceName is a required field + ServiceName *string `type:"string" required:"true"` + + // The namespace of the service in which access was attempted. + // + // To learn the service namespace of a service, go to Actions, Resources, and + // Condition Keys for AWS Services (http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_actions-resources-contextkeys.html) + // in the IAM User Guide. Choose the name of the service to view details for + // that service. In the first paragraph, find the service prefix. For example, + // (service prefix: a4b). For more information about service namespaces, see + // AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) + // in the AWS General Reference. + // + // ServiceNamespace is a required field + ServiceNamespace *string `min:"1" type:"string" required:"true"` + + // The total number of authenticated entities that have attempted to access + // the service. + // + // This field is null if no IAM entities attempted to access the service within + // the reporting period (http://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_access-advisor.html#service-last-accessed-reporting-period). + TotalAuthenticatedEntities *int64 `type:"integer"` +} + +// String returns the string representation +func (s ServiceLastAccessed) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ServiceLastAccessed) GoString() string { + return s.String() +} + +// SetLastAuthenticated sets the LastAuthenticated field's value. +func (s *ServiceLastAccessed) SetLastAuthenticated(v time.Time) *ServiceLastAccessed { + s.LastAuthenticated = &v return s } -// SetPath sets the Path field's value. -func (s *ServerCertificateMetadata) SetPath(v string) *ServerCertificateMetadata { - s.Path = &v +// SetLastAuthenticatedEntity sets the LastAuthenticatedEntity field's value. +func (s *ServiceLastAccessed) SetLastAuthenticatedEntity(v string) *ServiceLastAccessed { + s.LastAuthenticatedEntity = &v return s } -// SetServerCertificateId sets the ServerCertificateId field's value. -func (s *ServerCertificateMetadata) SetServerCertificateId(v string) *ServerCertificateMetadata { - s.ServerCertificateId = &v +// SetServiceName sets the ServiceName field's value. +func (s *ServiceLastAccessed) SetServiceName(v string) *ServiceLastAccessed { + s.ServiceName = &v return s } -// SetServerCertificateName sets the ServerCertificateName field's value. -func (s *ServerCertificateMetadata) SetServerCertificateName(v string) *ServerCertificateMetadata { - s.ServerCertificateName = &v +// SetServiceNamespace sets the ServiceNamespace field's value. +func (s *ServiceLastAccessed) SetServiceNamespace(v string) *ServiceLastAccessed { + s.ServiceNamespace = &v return s } -// SetUploadDate sets the UploadDate field's value. -func (s *ServerCertificateMetadata) SetUploadDate(v time.Time) *ServerCertificateMetadata { - s.UploadDate = &v +// SetTotalAuthenticatedEntities sets the TotalAuthenticatedEntities field's value. +func (s *ServiceLastAccessed) SetTotalAuthenticatedEntities(v int64) *ServiceLastAccessed { + s.TotalAuthenticatedEntities = &v return s } @@ -26128,7 +28487,7 @@ type ServiceSpecificCredential struct { // The generated password for the service-specific credential. // // ServicePassword is a required field - ServicePassword *string `type:"string" required:"true"` + ServicePassword *string `type:"string" required:"true" sensitive:"true"` // The unique identifier for the service-specific credential. // @@ -26470,15 +28829,15 @@ type SimulateCustomPolicyInput struct { // the next call should start. Marker *string `min:"1" type:"string"` - // (Optional) Use this only when paginating results to indicate the maximum - // number of items you want in the response. If additional items exist beyond - // the maximum you specify, the IsTruncated response element is true. + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true. // - // If you do not include this parameter, it defaults to 100. Note that IAM might - // return fewer results, even when there are more results available. In that - // case, the IsTruncated response element returns true and Marker contains a - // value to include in the subsequent call that tells the service where to continue - // from. + // If you do not include this parameter, the number of items defaults to 100. + // Note that IAM might return fewer results, even when there are more results + // available. In that case, the IsTruncated response element returns true, and + // Marker contains a value to include in the subsequent call that tells the + // service where to continue from. MaxItems *int64 `min:"1" type:"integer"` // A list of policy documents to include in the simulation. Each document is @@ -26507,7 +28866,7 @@ type SimulateCustomPolicyInput struct { PolicyInputList []*string `type:"list" required:"true"` // A list of ARNs of AWS resources to include in the simulation. If this parameter - // is not provided then the value defaults to * (all resources). Each API in + // is not provided, then the value defaults to * (all resources). Each API in // the ActionNames parameter is evaluated for each resource in this list. The // simulation determines the access result (allowed or denied) of each combination // and reports it in the response. @@ -26725,7 +29084,7 @@ type SimulatePolicyResponse struct { // request parameter to retrieve more items. Note that IAM might return fewer // than the MaxItems number of results even when there are more results available. // We recommend that you check IsTruncated after every call to ensure that you - // receive all of your results. + // receive all your results. IsTruncated *bool `type:"boolean"` // When IsTruncated is true, this element is present and contains the value @@ -26802,15 +29161,15 @@ type SimulatePrincipalPolicyInput struct { // the next call should start. Marker *string `min:"1" type:"string"` - // (Optional) Use this only when paginating results to indicate the maximum - // number of items you want in the response. If additional items exist beyond - // the maximum you specify, the IsTruncated response element is true. + // Use this only when paginating results to indicate the maximum number of items + // you want in the response. If additional items exist beyond the maximum you + // specify, the IsTruncated response element is true. // - // If you do not include this parameter, it defaults to 100. Note that IAM might - // return fewer results, even when there are more results available. In that - // case, the IsTruncated response element returns true and Marker contains a - // value to include in the subsequent call that tells the service where to continue - // from. + // If you do not include this parameter, the number of items defaults to 100. + // Note that IAM might return fewer results, even when there are more results + // available. In that case, the IsTruncated response element returns true, and + // Marker contains a value to include in the subsequent call that tells the + // service where to continue from. MaxItems *int64 `min:"1" type:"integer"` // An optional list of additional policy documents to include in the simulation. @@ -26867,36 +29226,36 @@ type SimulatePrincipalPolicyInput struct { // values and the resources that you must define to run the simulation. // // Each of the EC2 scenarios requires that you specify instance, image, and - // security-group resources. If your scenario includes an EBS volume, then you + // security group resources. If your scenario includes an EBS volume, then you // must specify that volume as a resource. If the EC2 scenario includes VPC, - // then you must supply the network-interface resource. If it includes an IP + // then you must supply the network interface resource. If it includes an IP // subnet, then you must specify the subnet resource. For more information on // the EC2 scenario options, see Supported Platforms (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html) // in the Amazon EC2 User Guide. // // * EC2-Classic-InstanceStore // - // instance, image, security-group + // instance, image, security group // // * EC2-Classic-EBS // - // instance, image, security-group, volume + // instance, image, security group, volume // // * EC2-VPC-InstanceStore // - // instance, image, security-group, network-interface + // instance, image, security group, network interface // // * EC2-VPC-InstanceStore-Subnet // - // instance, image, security-group, network-interface, subnet + // instance, image, security group, network interface, subnet // // * EC2-VPC-EBS // - // instance, image, security-group, network-interface, volume + // instance, image, security group, network interface, volume // // * EC2-VPC-EBS-Subnet // - // instance, image, security-group, network-interface, subnet, volume + // instance, image, security group, network interface, subnet, volume ResourceHandlingOption *string `min:"1" type:"string"` // An AWS account ID that specifies the owner of any simulated resource that @@ -26923,58 +29282,389 @@ type SimulatePrincipalPolicyInput struct { // * The printable characters in the Basic Latin and Latin-1 Supplement character // set (through \u00FF) // - // * The special characters tab (\u0009), line feed (\u000A), and carriage - // return (\u000D) - ResourcePolicy *string `min:"1" type:"string"` + // * The special characters tab (\u0009), line feed (\u000A), and carriage + // return (\u000D) + ResourcePolicy *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s SimulatePrincipalPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SimulatePrincipalPolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SimulatePrincipalPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SimulatePrincipalPolicyInput"} + if s.ActionNames == nil { + invalidParams.Add(request.NewErrParamRequired("ActionNames")) + } + if s.CallerArn != nil && len(*s.CallerArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CallerArn", 1)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + if s.PolicySourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("PolicySourceArn")) + } + if s.PolicySourceArn != nil && len(*s.PolicySourceArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("PolicySourceArn", 20)) + } + if s.ResourceHandlingOption != nil && len(*s.ResourceHandlingOption) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceHandlingOption", 1)) + } + if s.ResourceOwner != nil && len(*s.ResourceOwner) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceOwner", 1)) + } + if s.ResourcePolicy != nil && len(*s.ResourcePolicy) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourcePolicy", 1)) + } + if s.ContextEntries != nil { + for i, v := range s.ContextEntries { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ContextEntries", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetActionNames sets the ActionNames field's value. +func (s *SimulatePrincipalPolicyInput) SetActionNames(v []*string) *SimulatePrincipalPolicyInput { + s.ActionNames = v + return s +} + +// SetCallerArn sets the CallerArn field's value. +func (s *SimulatePrincipalPolicyInput) SetCallerArn(v string) *SimulatePrincipalPolicyInput { + s.CallerArn = &v + return s +} + +// SetContextEntries sets the ContextEntries field's value. +func (s *SimulatePrincipalPolicyInput) SetContextEntries(v []*ContextEntry) *SimulatePrincipalPolicyInput { + s.ContextEntries = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *SimulatePrincipalPolicyInput) SetMarker(v string) *SimulatePrincipalPolicyInput { + s.Marker = &v + return s +} + +// SetMaxItems sets the MaxItems field's value. +func (s *SimulatePrincipalPolicyInput) SetMaxItems(v int64) *SimulatePrincipalPolicyInput { + s.MaxItems = &v + return s +} + +// SetPolicyInputList sets the PolicyInputList field's value. +func (s *SimulatePrincipalPolicyInput) SetPolicyInputList(v []*string) *SimulatePrincipalPolicyInput { + s.PolicyInputList = v + return s +} + +// SetPolicySourceArn sets the PolicySourceArn field's value. +func (s *SimulatePrincipalPolicyInput) SetPolicySourceArn(v string) *SimulatePrincipalPolicyInput { + s.PolicySourceArn = &v + return s +} + +// SetResourceArns sets the ResourceArns field's value. +func (s *SimulatePrincipalPolicyInput) SetResourceArns(v []*string) *SimulatePrincipalPolicyInput { + s.ResourceArns = v + return s +} + +// SetResourceHandlingOption sets the ResourceHandlingOption field's value. +func (s *SimulatePrincipalPolicyInput) SetResourceHandlingOption(v string) *SimulatePrincipalPolicyInput { + s.ResourceHandlingOption = &v + return s +} + +// SetResourceOwner sets the ResourceOwner field's value. +func (s *SimulatePrincipalPolicyInput) SetResourceOwner(v string) *SimulatePrincipalPolicyInput { + s.ResourceOwner = &v + return s +} + +// SetResourcePolicy sets the ResourcePolicy field's value. +func (s *SimulatePrincipalPolicyInput) SetResourcePolicy(v string) *SimulatePrincipalPolicyInput { + s.ResourcePolicy = &v + return s +} + +// Contains a reference to a Statement element in a policy document that determines +// the result of the simulation. +// +// This data type is used by the MatchedStatements member of the EvaluationResult +// type. +type Statement struct { + _ struct{} `type:"structure"` + + // The row and column of the end of a Statement in an IAM policy. + EndPosition *Position `type:"structure"` + + // The identifier of the policy that was provided as an input. + SourcePolicyId *string `type:"string"` + + // The type of the policy. + SourcePolicyType *string `type:"string" enum:"PolicySourceType"` + + // The row and column of the beginning of the Statement in an IAM policy. + StartPosition *Position `type:"structure"` +} + +// String returns the string representation +func (s Statement) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Statement) GoString() string { + return s.String() +} + +// SetEndPosition sets the EndPosition field's value. +func (s *Statement) SetEndPosition(v *Position) *Statement { + s.EndPosition = v + return s +} + +// SetSourcePolicyId sets the SourcePolicyId field's value. +func (s *Statement) SetSourcePolicyId(v string) *Statement { + s.SourcePolicyId = &v + return s +} + +// SetSourcePolicyType sets the SourcePolicyType field's value. +func (s *Statement) SetSourcePolicyType(v string) *Statement { + s.SourcePolicyType = &v + return s +} + +// SetStartPosition sets the StartPosition field's value. +func (s *Statement) SetStartPosition(v *Position) *Statement { + s.StartPosition = v + return s +} + +// A structure that represents user-provided metadata that can be associated +// with a resource such as an IAM user or role. For more information about tagging, +// see Tagging IAM Identities (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) +// in the IAM User Guide. +type Tag struct { + _ struct{} `type:"structure"` + + // The key name that can be used to look up or retrieve the associated value. + // For example, Department or Cost Center are common choices. + // + // Key is a required field + Key *string `min:"1" type:"string" required:"true"` + + // The value associated with this tag. For example, tags with a key name of + // Department could have values such as Human Resources, Accounting, and Support. + // Tags with a key name of Cost Center might have values that consist of the + // number associated with the different cost centers in your company. Typically, + // many resources have tags with the same key name but with different values. + // + // AWS always interprets the tag Value as a single string. If you need to store + // an array, you can store comma-separated values in the string. However, you + // must interpret the value in your code. + // + // Value is a required field + Value *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Tag) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Tag"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +type TagRoleInput struct { + _ struct{} `type:"structure"` + + // The name of the role that you want to add tags to. + // + // This parameter accepts (through its regex pattern (http://wikipedia.org/wiki/regex)) + // a string of characters that consist of upper and lowercase alphanumeric characters + // with no spaces. You can also include any of the following characters: _+=,.@- + // + // RoleName is a required field + RoleName *string `min:"1" type:"string" required:"true"` + + // The list of tags that you want to attach to the role. Each tag consists of + // a key name and an associated value. You can specify this with a JSON string. + // + // Tags is a required field + Tags []*Tag `type:"list" required:"true"` } // String returns the string representation -func (s SimulatePrincipalPolicyInput) String() string { +func (s TagRoleInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s SimulatePrincipalPolicyInput) GoString() string { +func (s TagRoleInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *SimulatePrincipalPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SimulatePrincipalPolicyInput"} - if s.ActionNames == nil { - invalidParams.Add(request.NewErrParamRequired("ActionNames")) - } - if s.CallerArn != nil && len(*s.CallerArn) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CallerArn", 1)) +func (s *TagRoleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagRoleInput"} + if s.RoleName == nil { + invalidParams.Add(request.NewErrParamRequired("RoleName")) } - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + if s.RoleName != nil && len(*s.RoleName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) } - if s.PolicySourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("PolicySourceArn")) + 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 s.PolicySourceArn != nil && len(*s.PolicySourceArn) < 20 { - invalidParams.Add(request.NewErrParamMinLen("PolicySourceArn", 20)) + + if invalidParams.Len() > 0 { + return invalidParams } - if s.ResourceHandlingOption != nil && len(*s.ResourceHandlingOption) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceHandlingOption", 1)) + return nil +} + +// SetRoleName sets the RoleName field's value. +func (s *TagRoleInput) SetRoleName(v string) *TagRoleInput { + s.RoleName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagRoleInput) SetTags(v []*Tag) *TagRoleInput { + s.Tags = v + return s +} + +type TagRoleOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TagRoleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagRoleOutput) GoString() string { + return s.String() +} + +type TagUserInput struct { + _ struct{} `type:"structure"` + + // The list of tags that you want to attach to the user. Each tag consists of + // a key name and an associated value. + // + // Tags is a required field + Tags []*Tag `type:"list" required:"true"` + + // The name of the user that you want to add tags to. + // + // This parameter accepts (through its regex pattern (http://wikipedia.org/wiki/regex)) + // a string of characters that consist of upper and lowercase alphanumeric characters + // with no spaces. You can also include any of the following characters: =,.@- + // + // UserName is a required field + UserName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s TagUserInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagUserInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagUserInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagUserInput"} + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) } - if s.ResourceOwner != nil && len(*s.ResourceOwner) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceOwner", 1)) + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) } - if s.ResourcePolicy != nil && len(*s.ResourcePolicy) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourcePolicy", 1)) + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) } - if s.ContextEntries != nil { - for i, v := range s.ContextEntries { + 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]", "ContextEntries", i), err.(request.ErrInvalidParams)) + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) } } } @@ -26985,125 +29675,178 @@ func (s *SimulatePrincipalPolicyInput) Validate() error { return nil } -// SetActionNames sets the ActionNames field's value. -func (s *SimulatePrincipalPolicyInput) SetActionNames(v []*string) *SimulatePrincipalPolicyInput { - s.ActionNames = v +// SetTags sets the Tags field's value. +func (s *TagUserInput) SetTags(v []*Tag) *TagUserInput { + s.Tags = v return s } -// SetCallerArn sets the CallerArn field's value. -func (s *SimulatePrincipalPolicyInput) SetCallerArn(v string) *SimulatePrincipalPolicyInput { - s.CallerArn = &v +// SetUserName sets the UserName field's value. +func (s *TagUserInput) SetUserName(v string) *TagUserInput { + s.UserName = &v return s } -// SetContextEntries sets the ContextEntries field's value. -func (s *SimulatePrincipalPolicyInput) SetContextEntries(v []*ContextEntry) *SimulatePrincipalPolicyInput { - s.ContextEntries = v - return s +type TagUserOutput struct { + _ struct{} `type:"structure"` } -// SetMarker sets the Marker field's value. -func (s *SimulatePrincipalPolicyInput) SetMarker(v string) *SimulatePrincipalPolicyInput { - s.Marker = &v - return s +// String returns the string representation +func (s TagUserOutput) String() string { + return awsutil.Prettify(s) } -// SetMaxItems sets the MaxItems field's value. -func (s *SimulatePrincipalPolicyInput) SetMaxItems(v int64) *SimulatePrincipalPolicyInput { - s.MaxItems = &v - return s +// GoString returns the string representation +func (s TagUserOutput) GoString() string { + return s.String() } -// SetPolicyInputList sets the PolicyInputList field's value. -func (s *SimulatePrincipalPolicyInput) SetPolicyInputList(v []*string) *SimulatePrincipalPolicyInput { - s.PolicyInputList = v - return s +type UntagRoleInput struct { + _ struct{} `type:"structure"` + + // The name of the IAM role from which you want to remove tags. + // + // This parameter accepts (through its regex pattern (http://wikipedia.org/wiki/regex)) + // a string of characters that consist of upper and lowercase alphanumeric characters + // with no spaces. You can also include any of the following characters: _+=,.@- + // + // RoleName is a required field + RoleName *string `min:"1" type:"string" required:"true"` + + // A list of key names as a simple array of strings. The tags with matching + // keys are removed from the specified role. + // + // TagKeys is a required field + TagKeys []*string `type:"list" required:"true"` } -// SetPolicySourceArn sets the PolicySourceArn field's value. -func (s *SimulatePrincipalPolicyInput) SetPolicySourceArn(v string) *SimulatePrincipalPolicyInput { - s.PolicySourceArn = &v - return s +// String returns the string representation +func (s UntagRoleInput) String() string { + return awsutil.Prettify(s) } -// SetResourceArns sets the ResourceArns field's value. -func (s *SimulatePrincipalPolicyInput) SetResourceArns(v []*string) *SimulatePrincipalPolicyInput { - s.ResourceArns = v - return s +// GoString returns the string representation +func (s UntagRoleInput) GoString() string { + return s.String() } -// SetResourceHandlingOption sets the ResourceHandlingOption field's value. -func (s *SimulatePrincipalPolicyInput) SetResourceHandlingOption(v string) *SimulatePrincipalPolicyInput { - s.ResourceHandlingOption = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagRoleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagRoleInput"} + if s.RoleName == nil { + invalidParams.Add(request.NewErrParamRequired("RoleName")) + } + if s.RoleName != nil && len(*s.RoleName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleName", 1)) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetResourceOwner sets the ResourceOwner field's value. -func (s *SimulatePrincipalPolicyInput) SetResourceOwner(v string) *SimulatePrincipalPolicyInput { - s.ResourceOwner = &v +// SetRoleName sets the RoleName field's value. +func (s *UntagRoleInput) SetRoleName(v string) *UntagRoleInput { + s.RoleName = &v return s } -// SetResourcePolicy sets the ResourcePolicy field's value. -func (s *SimulatePrincipalPolicyInput) SetResourcePolicy(v string) *SimulatePrincipalPolicyInput { - s.ResourcePolicy = &v +// SetTagKeys sets the TagKeys field's value. +func (s *UntagRoleInput) SetTagKeys(v []*string) *UntagRoleInput { + s.TagKeys = v return s } -// Contains a reference to a Statement element in a policy document that determines -// the result of the simulation. -// -// This data type is used by the MatchedStatements member of the EvaluationResult -// type. -type Statement struct { +type UntagRoleOutput struct { _ struct{} `type:"structure"` +} - // The row and column of the end of a Statement in an IAM policy. - EndPosition *Position `type:"structure"` +// String returns the string representation +func (s UntagRoleOutput) String() string { + return awsutil.Prettify(s) +} - // The identifier of the policy that was provided as an input. - SourcePolicyId *string `type:"string"` +// GoString returns the string representation +func (s UntagRoleOutput) GoString() string { + return s.String() +} - // The type of the policy. - SourcePolicyType *string `type:"string" enum:"PolicySourceType"` +type UntagUserInput struct { + _ struct{} `type:"structure"` - // The row and column of the beginning of the Statement in an IAM policy. - StartPosition *Position `type:"structure"` + // A list of key names as a simple array of strings. The tags with matching + // keys are removed from the specified user. + // + // TagKeys is a required field + TagKeys []*string `type:"list" required:"true"` + + // The name of the IAM user from which you want to remove tags. + // + // This parameter accepts (through its regex pattern (http://wikipedia.org/wiki/regex)) + // a string of characters that consist of upper and lowercase alphanumeric characters + // with no spaces. You can also include any of the following characters: =,.@- + // + // UserName is a required field + UserName *string `min:"1" type:"string" required:"true"` } // String returns the string representation -func (s Statement) String() string { +func (s UntagUserInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Statement) GoString() string { +func (s UntagUserInput) GoString() string { return s.String() } -// SetEndPosition sets the EndPosition field's value. -func (s *Statement) SetEndPosition(v *Position) *Statement { - s.EndPosition = v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagUserInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagUserInput"} + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetSourcePolicyId sets the SourcePolicyId field's value. -func (s *Statement) SetSourcePolicyId(v string) *Statement { - s.SourcePolicyId = &v +// SetTagKeys sets the TagKeys field's value. +func (s *UntagUserInput) SetTagKeys(v []*string) *UntagUserInput { + s.TagKeys = v return s } -// SetSourcePolicyType sets the SourcePolicyType field's value. -func (s *Statement) SetSourcePolicyType(v string) *Statement { - s.SourcePolicyType = &v +// SetUserName sets the UserName field's value. +func (s *UntagUserInput) SetUserName(v string) *UntagUserInput { + s.UserName = &v return s } -// SetStartPosition sets the StartPosition field's value. -func (s *Statement) SetStartPosition(v *Position) *Statement { - s.StartPosition = v - return s +type UntagUserOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UntagUserOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagUserOutput) GoString() string { + return s.String() } type UpdateAccessKeyInput struct { @@ -27111,7 +29854,7 @@ type UpdateAccessKeyInput struct { // The access key ID of the secret access key you want to update. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters that can consist of any upper or lowercased letter // or digit. // @@ -27127,7 +29870,7 @@ type UpdateAccessKeyInput struct { // The name of the user whose key you want to update. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- UserName *string `min:"1" type:"string"` @@ -27392,7 +30135,7 @@ type UpdateAssumeRolePolicyInput struct { // The name of the role to update with the new policy. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -27464,7 +30207,7 @@ type UpdateGroupInput struct { // Name of the IAM group to update. If you're changing the name of the group, // this is the original name. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -27473,14 +30216,14 @@ type UpdateGroupInput struct { // New name for the IAM group. Only include this if changing the group's name. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- NewGroupName *string `min:"1" type:"string"` // New path for the IAM group. Only include this if changing the group's path. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of either a forward slash (/) by itself // or a string that must begin and end with forward slashes. In addition, it // can contain any ASCII character from the ! (\u0021) through the DEL character @@ -27573,7 +30316,7 @@ type UpdateLoginProfileInput struct { // However, the format can be further restricted by the account administrator // by setting a password policy on the AWS account. For more information, see // UpdateAccountPasswordPolicy. - Password *string `min:"1" type:"string"` + Password *string `min:"1" type:"string" sensitive:"true"` // Allows this new password to be used only once by requiring the specified // IAM user to set a new password on next sign-in. @@ -27581,7 +30324,7 @@ type UpdateLoginProfileInput struct { // The name of the user whose password you want to update. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -27988,7 +30731,7 @@ type UpdateSSHPublicKeyInput struct { // The unique identifier for the SSH public key. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters that can consist of any upper or lowercased letter // or digit. // @@ -28004,7 +30747,7 @@ type UpdateSSHPublicKeyInput struct { // The name of the IAM user associated with the SSH public key. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -28085,7 +30828,7 @@ type UpdateServerCertificateInput struct { // The new path for the server certificate. Include this only if you are updating // the server certificate's path. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of either a forward slash (/) by itself // or a string that must begin and end with forward slashes. In addition, it // can contain any ASCII character from the ! (\u0021) through the DEL character @@ -28097,14 +30840,14 @@ type UpdateServerCertificateInput struct { // the server certificate's name. The name of the certificate cannot contain // any spaces. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- NewServerCertificateName *string `min:"1" type:"string"` // The name of the server certificate that you want to update. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -28181,7 +30924,7 @@ type UpdateServiceSpecificCredentialInput struct { // The unique identifier of the service-specific credential. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters that can consist of any upper or lowercased letter // or digit. // @@ -28197,7 +30940,7 @@ type UpdateServiceSpecificCredentialInput struct { // If you do not specify this value, then the operation assumes the user whose // credentials are used to call the operation. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- UserName *string `min:"1" type:"string"` @@ -28272,7 +31015,7 @@ type UpdateSigningCertificateInput struct { // The ID of the signing certificate you want to update. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters that can consist of any upper or lowercased letter // or digit. // @@ -28288,7 +31031,7 @@ type UpdateSigningCertificateInput struct { // The name of the IAM user the signing certificate belongs to. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- UserName *string `min:"1" type:"string"` @@ -28364,7 +31107,7 @@ type UpdateUserInput struct { // New path for the IAM user. Include this parameter only if you're changing // the user's path. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of either a forward slash (/) by itself // or a string that must begin and end with forward slashes. In addition, it // can contain any ASCII character from the ! (\u0021) through the DEL character @@ -28375,7 +31118,7 @@ type UpdateUserInput struct { // New name for the user. Include this parameter only if you're changing the // user's name. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- NewUserName *string `min:"1" type:"string"` @@ -28383,7 +31126,7 @@ type UpdateUserInput struct { // Name of the user to update. If you're changing the name of the user, this // is the original user name. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -28459,7 +31202,7 @@ type UploadSSHPublicKeyInput struct { _ struct{} `type:"structure"` // The SSH public key. The public key must be encoded in ssh-rsa format or PEM - // format. The miminum bit-length of the public key is 2048 bits. For example, + // format. The minimum bit-length of the public key is 2048 bits. For example, // you can generate a 2048-bit key, and the resulting PEM file is 1679 bytes // long. // @@ -28480,7 +31223,7 @@ type UploadSSHPublicKeyInput struct { // The name of the IAM user to associate the SSH public key with. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -28597,7 +31340,7 @@ type UploadServerCertificateInput struct { // in the IAM User Guide. // // This parameter is optional. If it is not included, it defaults to a slash - // (/). This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // (/). This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of either a forward slash (/) by itself // or a string that must begin and end with forward slashes. In addition, it // can contain any ASCII character from the ! (\u0021) through the DEL character @@ -28625,12 +31368,12 @@ type UploadServerCertificateInput struct { // return (\u000D) // // PrivateKey is a required field - PrivateKey *string `min:"1" type:"string" required:"true"` + PrivateKey *string `min:"1" type:"string" required:"true" sensitive:"true"` // The name for the server certificate. Do not include the path in this value. // The name of the certificate cannot contain any spaces. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- // @@ -28759,7 +31502,7 @@ type UploadSigningCertificateInput struct { // The name of the user the signing certificate is for. // - // This parameter allows (per its regex pattern (http://wikipedia.org/wiki/regex)) + // This parameter allows (through its regex pattern (http://wikipedia.org/wiki/regex)) // a string of characters consisting of upper and lowercase alphanumeric characters // with no spaces. You can also include any of the following characters: _+=,.@- UserName *string `min:"1" type:"string"` @@ -28863,17 +31606,17 @@ type User struct { // Reports (http://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html) // topic in the Using IAM guide. If a password is used more than once in a five-minute // span, only the first use is returned in this field. If the field is null - // (no value) then it indicates that they never signed in with a password. This - // can be because: + // (no value), then it indicates that they never signed in with a password. + // This can be because: // // * The user never had a password. // // * A password exists but has not been used since IAM started tracking this - // information on October 20th, 2014. + // information on October 20, 2014. // - // A null does not mean that the user never had a password. Also, if the user - // does not currently have a password, but had one in the past, then this field - // contains the date and time the most recent password was used. + // A null valuedoes not mean that the user never had a password. Also, if the + // user does not currently have a password, but had one in the past, then this + // field contains the date and time the most recent password was used. // // This value is returned only in the GetUser and ListUsers operations. PasswordLastUsed *time.Time `type:"timestamp"` @@ -28888,10 +31631,15 @@ type User struct { // The ARN of the policy used to set the permissions boundary for the user. // // For more information about permissions boundaries, see Permissions Boundaries - // for IAM Identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) + // for IAM Identities (IAM/latest/UserGuide/access_policies_boundaries.html) // in the IAM User Guide. PermissionsBoundary *AttachedPermissionsBoundary `type:"structure"` + // A list of tags that are associated with the specified user. For more information + // about tagging, see Tagging IAM Identities (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) + // in the IAM User Guide. + Tags []*Tag `type:"list"` + // The stable and unique string identifying the user. For more information about // IDs, see IAM Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the Using IAM guide. @@ -28945,6 +31693,12 @@ func (s *User) SetPermissionsBoundary(v *AttachedPermissionsBoundary) *User { return s } +// SetTags sets the Tags field's value. +func (s *User) SetTags(v []*Tag) *User { + s.Tags = v + return s +} + // SetUserId sets the UserId field's value. func (s *User) SetUserId(v string) *User { s.UserId = &v @@ -28990,10 +31744,15 @@ type UserDetail struct { // The ARN of the policy used to set the permissions boundary for the user. // // For more information about permissions boundaries, see Permissions Boundaries - // for IAM Identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) + // for IAM Identities (IAM/latest/UserGuide/access_policies_boundaries.html) // in the IAM User Guide. PermissionsBoundary *AttachedPermissionsBoundary `type:"structure"` + // A list of tags that are associated with the specified user. For more information + // about tagging, see Tagging IAM Identities (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) + // in the IAM User Guide. + Tags []*Tag `type:"list"` + // The stable and unique string identifying the user. For more information about // IDs, see IAM Identifiers (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html) // in the Using IAM guide. @@ -29052,6 +31811,12 @@ func (s *UserDetail) SetPermissionsBoundary(v *AttachedPermissionsBoundary) *Use return s } +// SetTags sets the Tags field's value. +func (s *UserDetail) SetTags(v []*Tag) *UserDetail { + s.Tags = v + return s +} + // SetUserId sets the UserId field's value. func (s *UserDetail) SetUserId(v string) *UserDetail { s.UserId = &v @@ -29074,22 +31839,22 @@ func (s *UserDetail) SetUserPolicyList(v []*PolicyDetail) *UserDetail { type VirtualMFADevice struct { _ struct{} `type:"structure"` - // The Base32 seed defined as specified in RFC3548 (https://tools.ietf.org/html/rfc3548.txt). - // The Base32StringSeed is Base64-encoded. + // The base32 seed defined as specified in RFC3548 (https://tools.ietf.org/html/rfc3548.txt). + // The Base32StringSeed is base64-encoded. // // Base32StringSeed is automatically base64 encoded/decoded by the SDK. - Base32StringSeed []byte `type:"blob"` + Base32StringSeed []byte `type:"blob" sensitive:"true"` // The date and time on which the virtual MFA device was enabled. EnableDate *time.Time `type:"timestamp"` // A QR code PNG image that encodes otpauth://totp/$virtualMFADeviceName@$AccountName?secret=$Base32String - // where $virtualMFADeviceName is one of the create call arguments, AccountName + // where $virtualMFADeviceName is one of the create call arguments. AccountName // is the user name if set (otherwise, the account ID otherwise), and Base32String - // is the seed in Base32 format. The Base32String value is Base64-encoded. + // is the seed in base32 format. The Base32String value is base64-encoded. // // QRCodePNG is automatically base64 encoded/decoded by the SDK. - QRCodePNG []byte `type:"blob"` + QRCodePNG []byte `type:"blob" sensitive:"true"` // The serial number associated with VirtualMFADevice. // @@ -29252,7 +32017,7 @@ const ( // policy or as the permissions boundary for an entity. // // For more information about permissions boundaries, see Permissions Boundaries -// for IAM Identities (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) +// for IAM Identities (http://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html) // in the IAM User Guide. const ( // PolicyUsageTypePermissionsPolicy is a PolicyUsageType enum value @@ -29297,6 +32062,28 @@ const ( EncodingTypePem = "PEM" ) +const ( + // JobStatusTypeInProgress is a jobStatusType enum value + JobStatusTypeInProgress = "IN_PROGRESS" + + // JobStatusTypeCompleted is a jobStatusType enum value + JobStatusTypeCompleted = "COMPLETED" + + // JobStatusTypeFailed is a jobStatusType enum value + JobStatusTypeFailed = "FAILED" +) + +const ( + // PolicyOwnerEntityTypeUser is a policyOwnerEntityType enum value + PolicyOwnerEntityTypeUser = "USER" + + // PolicyOwnerEntityTypeRole is a policyOwnerEntityType enum value + PolicyOwnerEntityTypeRole = "ROLE" + + // PolicyOwnerEntityTypeGroup is a policyOwnerEntityType enum value + PolicyOwnerEntityTypeGroup = "GROUP" +) + const ( // PolicyScopeTypeAll is a policyScopeType enum value PolicyScopeTypeAll = "All" @@ -29308,6 +32095,14 @@ const ( PolicyScopeTypeLocal = "Local" ) +const ( + // PolicyTypeInline is a policyType enum value + PolicyTypeInline = "INLINE" + + // PolicyTypeManaged is a policyType enum value + PolicyTypeManaged = "MANAGED" +) + const ( // StatusTypeActive is a statusType enum value StatusTypeActive = "Active" diff --git a/vendor/github.com/aws/aws-sdk-go/service/iam/errors.go b/vendor/github.com/aws/aws-sdk-go/service/iam/errors.go index 470e19b37f..8c1773fcc3 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iam/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iam/errors.go @@ -4,6 +4,14 @@ package iam const ( + // ErrCodeConcurrentModificationException for service response error code + // "ConcurrentModification". + // + // The request was rejected because multiple requests to change this object + // were submitted simultaneously. Wait a few minutes and submit your request + // again. + ErrCodeConcurrentModificationException = "ConcurrentModification" + // ErrCodeCredentialReportExpiredException for service response error code // "ReportExpired". // @@ -129,8 +137,8 @@ const ( // ErrCodeNoSuchEntityException for service response error code // "NoSuchEntity". // - // The request was rejected because it referenced an entity that does not exist. - // The error message describes the entity. + // The request was rejected because it referenced a resource entity that does + // not exist. The error message describes the resource. ErrCodeNoSuchEntityException = "NoSuchEntity" // ErrCodePasswordPolicyViolationException for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go b/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go index d5698b18ca..b05d864410 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/inspector/api.go @@ -18,7 +18,7 @@ const opAddAttributesToFindings = "AddAttributesToFindings" // AddAttributesToFindingsRequest generates a "aws/request.Request" representing the // client's request for the AddAttributesToFindings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -112,7 +112,7 @@ const opCreateAssessmentTarget = "CreateAssessmentTarget" // CreateAssessmentTargetRequest generates a "aws/request.Request" representing the // client's request for the CreateAssessmentTarget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -221,7 +221,7 @@ const opCreateAssessmentTemplate = "CreateAssessmentTemplate" // CreateAssessmentTemplateRequest generates a "aws/request.Request" representing the // client's request for the CreateAssessmentTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -322,7 +322,7 @@ const opCreateExclusionsPreview = "CreateExclusionsPreview" // CreateExclusionsPreviewRequest generates a "aws/request.Request" representing the // client's request for the CreateExclusionsPreview operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -421,7 +421,7 @@ const opCreateResourceGroup = "CreateResourceGroup" // CreateResourceGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateResourceGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -517,7 +517,7 @@ const opDeleteAssessmentRun = "DeleteAssessmentRun" // DeleteAssessmentRunRequest generates a "aws/request.Request" representing the // client's request for the DeleteAssessmentRun operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -551,8 +551,7 @@ func (c *Inspector) DeleteAssessmentRunRequest(input *DeleteAssessmentRunInput) output = &DeleteAssessmentRunOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -617,7 +616,7 @@ const opDeleteAssessmentTarget = "DeleteAssessmentTarget" // DeleteAssessmentTargetRequest generates a "aws/request.Request" representing the // client's request for the DeleteAssessmentTarget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -651,8 +650,7 @@ func (c *Inspector) DeleteAssessmentTargetRequest(input *DeleteAssessmentTargetI output = &DeleteAssessmentTargetOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -717,7 +715,7 @@ const opDeleteAssessmentTemplate = "DeleteAssessmentTemplate" // DeleteAssessmentTemplateRequest generates a "aws/request.Request" representing the // client's request for the DeleteAssessmentTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -751,8 +749,7 @@ func (c *Inspector) DeleteAssessmentTemplateRequest(input *DeleteAssessmentTempl output = &DeleteAssessmentTemplateOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -817,7 +814,7 @@ const opDescribeAssessmentRuns = "DescribeAssessmentRuns" // DescribeAssessmentRunsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAssessmentRuns operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -901,7 +898,7 @@ const opDescribeAssessmentTargets = "DescribeAssessmentTargets" // DescribeAssessmentTargetsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAssessmentTargets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -985,7 +982,7 @@ const opDescribeAssessmentTemplates = "DescribeAssessmentTemplates" // DescribeAssessmentTemplatesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAssessmentTemplates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1069,7 +1066,7 @@ const opDescribeCrossAccountAccessRole = "DescribeCrossAccountAccessRole" // DescribeCrossAccountAccessRoleRequest generates a "aws/request.Request" representing the // client's request for the DescribeCrossAccountAccessRole operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1148,7 +1145,7 @@ const opDescribeExclusions = "DescribeExclusions" // DescribeExclusionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeExclusions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1231,7 +1228,7 @@ const opDescribeFindings = "DescribeFindings" // DescribeFindingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeFindings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1314,7 +1311,7 @@ const opDescribeResourceGroups = "DescribeResourceGroups" // DescribeResourceGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeResourceGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1398,7 +1395,7 @@ const opDescribeRulesPackages = "DescribeRulesPackages" // DescribeRulesPackagesRequest generates a "aws/request.Request" representing the // client's request for the DescribeRulesPackages operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1482,7 +1479,7 @@ const opGetAssessmentReport = "GetAssessmentReport" // GetAssessmentReportRequest generates a "aws/request.Request" representing the // client's request for the GetAssessmentReport operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1587,7 +1584,7 @@ const opGetExclusionsPreview = "GetExclusionsPreview" // GetExclusionsPreviewRequest generates a "aws/request.Request" representing the // client's request for the GetExclusionsPreview operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1735,7 +1732,7 @@ const opGetTelemetryMetadata = "GetTelemetryMetadata" // GetTelemetryMetadataRequest generates a "aws/request.Request" representing the // client's request for the GetTelemetryMetadata operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1826,7 +1823,7 @@ const opListAssessmentRunAgents = "ListAssessmentRunAgents" // ListAssessmentRunAgentsRequest generates a "aws/request.Request" representing the // client's request for the ListAssessmentRunAgents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1973,7 +1970,7 @@ const opListAssessmentRuns = "ListAssessmentRuns" // ListAssessmentRunsRequest generates a "aws/request.Request" representing the // client's request for the ListAssessmentRuns operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2120,7 +2117,7 @@ const opListAssessmentTargets = "ListAssessmentTargets" // ListAssessmentTargetsRequest generates a "aws/request.Request" representing the // client's request for the ListAssessmentTargets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2264,7 +2261,7 @@ const opListAssessmentTemplates = "ListAssessmentTemplates" // ListAssessmentTemplatesRequest generates a "aws/request.Request" representing the // client's request for the ListAssessmentTemplates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2411,7 +2408,7 @@ const opListEventSubscriptions = "ListEventSubscriptions" // ListEventSubscriptionsRequest generates a "aws/request.Request" representing the // client's request for the ListEventSubscriptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2559,7 +2556,7 @@ const opListExclusions = "ListExclusions" // ListExclusionsRequest generates a "aws/request.Request" representing the // client's request for the ListExclusions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2705,7 +2702,7 @@ const opListFindings = "ListFindings" // ListFindingsRequest generates a "aws/request.Request" representing the // client's request for the ListFindings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2852,7 +2849,7 @@ const opListRulesPackages = "ListRulesPackages" // ListRulesPackagesRequest generates a "aws/request.Request" representing the // client's request for the ListRulesPackages operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2994,7 +2991,7 @@ const opListTagsForResource = "ListTagsForResource" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3084,7 +3081,7 @@ const opPreviewAgents = "PreviewAgents" // PreviewAgentsRequest generates a "aws/request.Request" representing the // client's request for the PreviewAgents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3235,7 +3232,7 @@ const opRegisterCrossAccountAccessRole = "RegisterCrossAccountAccessRole" // RegisterCrossAccountAccessRoleRequest generates a "aws/request.Request" representing the // client's request for the RegisterCrossAccountAccessRole operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3269,8 +3266,7 @@ func (c *Inspector) RegisterCrossAccountAccessRoleRequest(input *RegisterCrossAc output = &RegisterCrossAccountAccessRoleOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3331,7 +3327,7 @@ const opRemoveAttributesFromFindings = "RemoveAttributesFromFindings" // RemoveAttributesFromFindingsRequest generates a "aws/request.Request" representing the // client's request for the RemoveAttributesFromFindings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3426,7 +3422,7 @@ const opSetTagsForResource = "SetTagsForResource" // SetTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the SetTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3460,8 +3456,7 @@ func (c *Inspector) SetTagsForResourceRequest(input *SetTagsForResourceInput) (r output = &SetTagsForResourceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3522,7 +3517,7 @@ const opStartAssessmentRun = "StartAssessmentRun" // StartAssessmentRunRequest generates a "aws/request.Request" representing the // client's request for the StartAssessmentRun operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3629,7 +3624,7 @@ const opStopAssessmentRun = "StopAssessmentRun" // StopAssessmentRunRequest generates a "aws/request.Request" representing the // client's request for the StopAssessmentRun operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3663,8 +3658,7 @@ func (c *Inspector) StopAssessmentRunRequest(input *StopAssessmentRunInput) (req output = &StopAssessmentRunOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3724,7 +3718,7 @@ const opSubscribeToEvent = "SubscribeToEvent" // SubscribeToEventRequest generates a "aws/request.Request" representing the // client's request for the SubscribeToEvent operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3758,8 +3752,7 @@ func (c *Inspector) SubscribeToEventRequest(input *SubscribeToEventInput) (req * output = &SubscribeToEventOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3824,7 +3817,7 @@ const opUnsubscribeFromEvent = "UnsubscribeFromEvent" // UnsubscribeFromEventRequest generates a "aws/request.Request" representing the // client's request for the UnsubscribeFromEvent operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3858,8 +3851,7 @@ func (c *Inspector) UnsubscribeFromEventRequest(input *UnsubscribeFromEventInput output = &UnsubscribeFromEventOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3920,7 +3912,7 @@ const opUpdateAssessmentTarget = "UpdateAssessmentTarget" // UpdateAssessmentTargetRequest generates a "aws/request.Request" representing the // client's request for the UpdateAssessmentTarget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3954,8 +3946,7 @@ func (c *Inspector) UpdateAssessmentTargetRequest(input *UpdateAssessmentTargetI output = &UpdateAssessmentTargetOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5105,10 +5096,17 @@ type AssetAttributes struct { // The list of IP v4 addresses of the EC2 instance where the finding is generated. Ipv4Addresses []*string `locationName:"ipv4Addresses" type:"list"` + // An array of the network interfaces interacting with the EC2 instance where + // the finding is generated. + NetworkInterfaces []*NetworkInterface `locationName:"networkInterfaces" type:"list"` + // The schema version of this data type. // // SchemaVersion is a required field SchemaVersion *int64 `locationName:"schemaVersion" type:"integer" required:"true"` + + // The tags related to the EC2 instance where the finding is generated. + Tags []*Tag `locationName:"tags" type:"list"` } // String returns the string representation @@ -5151,12 +5149,24 @@ func (s *AssetAttributes) SetIpv4Addresses(v []*string) *AssetAttributes { return s } +// SetNetworkInterfaces sets the NetworkInterfaces field's value. +func (s *AssetAttributes) SetNetworkInterfaces(v []*NetworkInterface) *AssetAttributes { + s.NetworkInterfaces = v + return s +} + // SetSchemaVersion sets the SchemaVersion field's value. func (s *AssetAttributes) SetSchemaVersion(v int64) *AssetAttributes { s.SchemaVersion = &v return s } +// SetTags sets the Tags field's value. +func (s *AssetAttributes) SetTags(v []*Tag) *AssetAttributes { + s.Tags = v + return s +} + // This data type is used as a request parameter in the AddAttributesToFindings // and CreateAssessmentTemplate actions. type Attribute struct { @@ -8216,6 +8226,115 @@ func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput return s } +// Contains information about the network interfaces interacting with an EC2 +// instance. This data type is used as one of the elements of the AssetAttributes +// data type. +type NetworkInterface struct { + _ struct{} `type:"structure"` + + // The IP addresses associated with the network interface. + Ipv6Addresses []*string `locationName:"ipv6Addresses" type:"list"` + + // The ID of the network interface. + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` + + // The name of a private DNS associated with the network interface. + PrivateDnsName *string `locationName:"privateDnsName" type:"string"` + + // The private IP address associated with the network interface. + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` + + // A list of the private IP addresses associated with the network interface. + // Includes the privateDnsName and privateIpAddress. + PrivateIpAddresses []*PrivateIp `locationName:"privateIpAddresses" type:"list"` + + // The name of a public DNS associated with the network interface. + PublicDnsName *string `locationName:"publicDnsName" type:"string"` + + // The public IP address from which the network interface is reachable. + PublicIp *string `locationName:"publicIp" type:"string"` + + // A list of the security groups associated with the network interface. Includes + // the groupId and groupName. + SecurityGroups []*SecurityGroup `locationName:"securityGroups" type:"list"` + + // The ID of a subnet associated with the network interface. + SubnetId *string `locationName:"subnetId" type:"string"` + + // The ID of a VPC associated with the network interface. + VpcId *string `locationName:"vpcId" type:"string"` +} + +// String returns the string representation +func (s NetworkInterface) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NetworkInterface) GoString() string { + return s.String() +} + +// SetIpv6Addresses sets the Ipv6Addresses field's value. +func (s *NetworkInterface) SetIpv6Addresses(v []*string) *NetworkInterface { + s.Ipv6Addresses = v + return s +} + +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *NetworkInterface) SetNetworkInterfaceId(v string) *NetworkInterface { + s.NetworkInterfaceId = &v + return s +} + +// SetPrivateDnsName sets the PrivateDnsName field's value. +func (s *NetworkInterface) SetPrivateDnsName(v string) *NetworkInterface { + s.PrivateDnsName = &v + return s +} + +// SetPrivateIpAddress sets the PrivateIpAddress field's value. +func (s *NetworkInterface) SetPrivateIpAddress(v string) *NetworkInterface { + s.PrivateIpAddress = &v + return s +} + +// SetPrivateIpAddresses sets the PrivateIpAddresses field's value. +func (s *NetworkInterface) SetPrivateIpAddresses(v []*PrivateIp) *NetworkInterface { + s.PrivateIpAddresses = v + return s +} + +// SetPublicDnsName sets the PublicDnsName field's value. +func (s *NetworkInterface) SetPublicDnsName(v string) *NetworkInterface { + s.PublicDnsName = &v + return s +} + +// SetPublicIp sets the PublicIp field's value. +func (s *NetworkInterface) SetPublicIp(v string) *NetworkInterface { + s.PublicIp = &v + return s +} + +// SetSecurityGroups sets the SecurityGroups field's value. +func (s *NetworkInterface) SetSecurityGroups(v []*SecurityGroup) *NetworkInterface { + s.SecurityGroups = v + return s +} + +// SetSubnetId sets the SubnetId field's value. +func (s *NetworkInterface) SetSubnetId(v string) *NetworkInterface { + s.SubnetId = &v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *NetworkInterface) SetVpcId(v string) *NetworkInterface { + s.VpcId = &v + return s +} + type PreviewAgentsInput struct { _ struct{} `type:"structure"` @@ -8319,6 +8438,41 @@ func (s *PreviewAgentsOutput) SetNextToken(v string) *PreviewAgentsOutput { return s } +// Contains information about a private IP address associated with a network +// interface. This data type is used as a response element in the DescribeFindings +// action. +type PrivateIp struct { + _ struct{} `type:"structure"` + + // The DNS name of the private IP address. + PrivateDnsName *string `locationName:"privateDnsName" type:"string"` + + // The full IP address of the network inteface. + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` +} + +// String returns the string representation +func (s PrivateIp) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PrivateIp) GoString() string { + return s.String() +} + +// SetPrivateDnsName sets the PrivateDnsName field's value. +func (s *PrivateIp) SetPrivateDnsName(v string) *PrivateIp { + s.PrivateDnsName = &v + return s +} + +// SetPrivateIpAddress sets the PrivateIpAddress field's value. +func (s *PrivateIp) SetPrivateIpAddress(v string) *PrivateIp { + s.PrivateIpAddress = &v + return s +} + type RegisterCrossAccountAccessRoleInput struct { _ struct{} `type:"structure"` @@ -8664,6 +8818,41 @@ func (s *Scope) SetValue(v string) *Scope { return s } +// Contains information about a security group associated with a network interface. +// This data type is used as one of the elements of the NetworkInterface data +// type. +type SecurityGroup struct { + _ struct{} `type:"structure"` + + // The ID of the security group. + GroupId *string `locationName:"groupId" type:"string"` + + // The name of the security group. + GroupName *string `locationName:"groupName" type:"string"` +} + +// String returns the string representation +func (s SecurityGroup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SecurityGroup) GoString() string { + return s.String() +} + +// SetGroupId sets the GroupId field's value. +func (s *SecurityGroup) SetGroupId(v string) *SecurityGroup { + s.GroupId = &v + return s +} + +// SetGroupName sets the GroupName field's value. +func (s *SecurityGroup) SetGroupName(v string) *SecurityGroup { + s.GroupName = &v + return s +} + // This data type is used in the Finding data type. type ServiceAttributes struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/iot/api.go b/vendor/github.com/aws/aws-sdk-go/service/iot/api.go index bbecfc0595..8345e1736b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/iot/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/iot/api.go @@ -18,7 +18,7 @@ const opAcceptCertificateTransfer = "AcceptCertificateTransfer" // AcceptCertificateTransferRequest generates a "aws/request.Request" representing the // client's request for the AcceptCertificateTransfer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -50,8 +50,7 @@ func (c *IoT) AcceptCertificateTransferRequest(input *AcceptCertificateTransferI output = &AcceptCertificateTransferOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -114,12 +113,98 @@ func (c *IoT) AcceptCertificateTransferWithContext(ctx aws.Context, input *Accep return out, req.Send() } +const opAddThingToBillingGroup = "AddThingToBillingGroup" + +// AddThingToBillingGroupRequest generates a "aws/request.Request" representing the +// client's request for the AddThingToBillingGroup 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 AddThingToBillingGroup for more information on using the AddThingToBillingGroup +// 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 AddThingToBillingGroupRequest method. +// req, resp := client.AddThingToBillingGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) AddThingToBillingGroupRequest(input *AddThingToBillingGroupInput) (req *request.Request, output *AddThingToBillingGroupOutput) { + op := &request.Operation{ + Name: opAddThingToBillingGroup, + HTTPMethod: "PUT", + HTTPPath: "/billing-groups/addThingToBillingGroup", + } + + if input == nil { + input = &AddThingToBillingGroupInput{} + } + + output = &AddThingToBillingGroupOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// AddThingToBillingGroup API operation for AWS IoT. +// +// Adds a thing to a billing 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 AWS IoT's +// API operation AddThingToBillingGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +func (c *IoT) AddThingToBillingGroup(input *AddThingToBillingGroupInput) (*AddThingToBillingGroupOutput, error) { + req, out := c.AddThingToBillingGroupRequest(input) + return out, req.Send() +} + +// AddThingToBillingGroupWithContext is the same as AddThingToBillingGroup with the addition of +// the ability to pass a context and additional request options. +// +// See AddThingToBillingGroup 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 *IoT) AddThingToBillingGroupWithContext(ctx aws.Context, input *AddThingToBillingGroupInput, opts ...request.Option) (*AddThingToBillingGroupOutput, error) { + req, out := c.AddThingToBillingGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opAddThingToThingGroup = "AddThingToThingGroup" // AddThingToThingGroupRequest generates a "aws/request.Request" representing the // client's request for the AddThingToThingGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -151,6 +236,7 @@ func (c *IoT) AddThingToThingGroupRequest(input *AddThingToThingGroupInput) (req output = &AddThingToThingGroupOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -204,7 +290,7 @@ const opAssociateTargetsWithJob = "AssociateTargetsWithJob" // AssociateTargetsWithJobRequest generates a "aws/request.Request" representing the // client's request for the AssociateTargetsWithJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -300,7 +386,7 @@ const opAttachPolicy = "AttachPolicy" // AttachPolicyRequest generates a "aws/request.Request" representing the // client's request for the AttachPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -332,8 +418,7 @@ func (c *IoT) AttachPolicyRequest(input *AttachPolicyInput) (req *request.Reques output = &AttachPolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -396,7 +481,7 @@ const opAttachPrincipalPolicy = "AttachPrincipalPolicy" // AttachPrincipalPolicyRequest generates a "aws/request.Request" representing the // client's request for the AttachPrincipalPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -433,8 +518,7 @@ func (c *IoT) AttachPrincipalPolicyRequest(input *AttachPrincipalPolicyInput) (r output = &AttachPrincipalPolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -504,7 +588,7 @@ const opAttachSecurityProfile = "AttachSecurityProfile" // AttachSecurityProfileRequest generates a "aws/request.Request" representing the // client's request for the AttachSecurityProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -536,6 +620,7 @@ func (c *IoT) AttachSecurityProfileRequest(input *AttachSecurityProfileInput) (r output = &AttachSecurityProfileOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -598,7 +683,7 @@ const opAttachThingPrincipal = "AttachThingPrincipal" // AttachThingPrincipalRequest generates a "aws/request.Request" representing the // client's request for the AttachThingPrincipal operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -630,6 +715,7 @@ func (c *IoT) AttachThingPrincipalRequest(input *AttachThingPrincipalInput) (req output = &AttachThingPrincipalOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -689,7 +775,7 @@ const opCancelAuditTask = "CancelAuditTask" // CancelAuditTaskRequest generates a "aws/request.Request" representing the // client's request for the CancelAuditTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -721,6 +807,7 @@ func (c *IoT) CancelAuditTaskRequest(input *CancelAuditTaskInput) (req *request. output = &CancelAuditTaskOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -776,7 +863,7 @@ const opCancelCertificateTransfer = "CancelCertificateTransfer" // CancelCertificateTransferRequest generates a "aws/request.Request" representing the // client's request for the CancelCertificateTransfer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -808,8 +895,7 @@ func (c *IoT) CancelCertificateTransferRequest(input *CancelCertificateTransferI output = &CancelCertificateTransferOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -882,7 +968,7 @@ const opCancelJob = "CancelJob" // CancelJobRequest generates a "aws/request.Request" representing the // client's request for the CancelJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -967,7 +1053,7 @@ const opCancelJobExecution = "CancelJobExecution" // CancelJobExecutionRequest generates a "aws/request.Request" representing the // client's request for the CancelJobExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -999,8 +1085,7 @@ func (c *IoT) CancelJobExecutionRequest(input *CancelJobExecutionInput) (req *re output = &CancelJobExecutionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1063,7 +1148,7 @@ const opClearDefaultAuthorizer = "ClearDefaultAuthorizer" // ClearDefaultAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the ClearDefaultAuthorizer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1095,6 +1180,7 @@ func (c *IoT) ClearDefaultAuthorizerRequest(input *ClearDefaultAuthorizerInput) output = &ClearDefaultAuthorizerOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1154,7 +1240,7 @@ const opCreateAuthorizer = "CreateAuthorizer" // CreateAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the CreateAuthorizer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1243,12 +1329,97 @@ func (c *IoT) CreateAuthorizerWithContext(ctx aws.Context, input *CreateAuthoriz return out, req.Send() } +const opCreateBillingGroup = "CreateBillingGroup" + +// CreateBillingGroupRequest generates a "aws/request.Request" representing the +// client's request for the CreateBillingGroup 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 CreateBillingGroup for more information on using the CreateBillingGroup +// 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 CreateBillingGroupRequest method. +// req, resp := client.CreateBillingGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) CreateBillingGroupRequest(input *CreateBillingGroupInput) (req *request.Request, output *CreateBillingGroupOutput) { + op := &request.Operation{ + Name: opCreateBillingGroup, + HTTPMethod: "POST", + HTTPPath: "/billing-groups/{billingGroupName}", + } + + if input == nil { + input = &CreateBillingGroupInput{} + } + + output = &CreateBillingGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateBillingGroup API operation for AWS IoT. +// +// Creates a billing 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 AWS IoT's +// API operation CreateBillingGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" +// The resource already exists. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +func (c *IoT) CreateBillingGroup(input *CreateBillingGroupInput) (*CreateBillingGroupOutput, error) { + req, out := c.CreateBillingGroupRequest(input) + return out, req.Send() +} + +// CreateBillingGroupWithContext is the same as CreateBillingGroup with the addition of +// the ability to pass a context and additional request options. +// +// See CreateBillingGroup 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 *IoT) CreateBillingGroupWithContext(ctx aws.Context, input *CreateBillingGroupInput, opts ...request.Option) (*CreateBillingGroupOutput, error) { + req, out := c.CreateBillingGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateCertificateFromCsr = "CreateCertificateFromCsr" // CreateCertificateFromCsrRequest generates a "aws/request.Request" representing the // client's request for the CreateCertificateFromCsr operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1372,12 +1543,106 @@ func (c *IoT) CreateCertificateFromCsrWithContext(ctx aws.Context, input *Create return out, req.Send() } +const opCreateDynamicThingGroup = "CreateDynamicThingGroup" + +// CreateDynamicThingGroupRequest generates a "aws/request.Request" representing the +// client's request for the CreateDynamicThingGroup 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 CreateDynamicThingGroup for more information on using the CreateDynamicThingGroup +// 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 CreateDynamicThingGroupRequest method. +// req, resp := client.CreateDynamicThingGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) CreateDynamicThingGroupRequest(input *CreateDynamicThingGroupInput) (req *request.Request, output *CreateDynamicThingGroupOutput) { + op := &request.Operation{ + Name: opCreateDynamicThingGroup, + HTTPMethod: "POST", + HTTPPath: "/dynamic-thing-groups/{thingGroupName}", + } + + if input == nil { + input = &CreateDynamicThingGroupInput{} + } + + output = &CreateDynamicThingGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateDynamicThingGroup API operation for AWS IoT. +// +// Creates a dynamic thing 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 AWS IoT's +// API operation CreateDynamicThingGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" +// The resource already exists. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +// * ErrCodeInvalidQueryException "InvalidQueryException" +// The query is invalid. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit has been exceeded. +// +func (c *IoT) CreateDynamicThingGroup(input *CreateDynamicThingGroupInput) (*CreateDynamicThingGroupOutput, error) { + req, out := c.CreateDynamicThingGroupRequest(input) + return out, req.Send() +} + +// CreateDynamicThingGroupWithContext is the same as CreateDynamicThingGroup with the addition of +// the ability to pass a context and additional request options. +// +// See CreateDynamicThingGroup 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 *IoT) CreateDynamicThingGroupWithContext(ctx aws.Context, input *CreateDynamicThingGroupInput, opts ...request.Option) (*CreateDynamicThingGroupOutput, error) { + req, out := c.CreateDynamicThingGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateJob = "CreateJob" // CreateJobRequest generates a "aws/request.Request" representing the // client's request for the CreateJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1468,7 +1733,7 @@ const opCreateKeysAndCertificate = "CreateKeysAndCertificate" // CreateKeysAndCertificateRequest generates a "aws/request.Request" representing the // client's request for the CreateKeysAndCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1560,7 +1825,7 @@ const opCreateOTAUpdate = "CreateOTAUpdate" // CreateOTAUpdateRequest generates a "aws/request.Request" representing the // client's request for the CreateOTAUpdate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1657,7 +1922,7 @@ const opCreatePolicy = "CreatePolicy" // CreatePolicyRequest generates a "aws/request.Request" representing the // client's request for the CreatePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1755,7 +2020,7 @@ const opCreatePolicyVersion = "CreatePolicyVersion" // CreatePolicyVersionRequest generates a "aws/request.Request" representing the // client's request for the CreatePolicyVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1859,7 +2124,7 @@ const opCreateRoleAlias = "CreateRoleAlias" // CreateRoleAliasRequest generates a "aws/request.Request" representing the // client's request for the CreateRoleAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1953,7 +2218,7 @@ const opCreateScheduledAudit = "CreateScheduledAudit" // CreateScheduledAuditRequest generates a "aws/request.Request" representing the // client's request for the CreateScheduledAudit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2038,7 +2303,7 @@ const opCreateSecurityProfile = "CreateSecurityProfile" // CreateSecurityProfileRequest generates a "aws/request.Request" representing the // client's request for the CreateSecurityProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2123,7 +2388,7 @@ const opCreateStream = "CreateStream" // CreateStreamRequest generates a "aws/request.Request" representing the // client's request for the CreateStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2226,7 +2491,7 @@ const opCreateThing = "CreateThing" // CreateThingRequest generates a "aws/request.Request" representing the // client's request for the CreateThing operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2323,7 +2588,7 @@ const opCreateThingGroup = "CreateThingGroup" // CreateThingGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateThingGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2411,7 +2676,7 @@ const opCreateThingType = "CreateThingType" // CreateThingTypeRequest generates a "aws/request.Request" representing the // client's request for the CreateThingType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2502,7 +2767,7 @@ const opCreateTopicRule = "CreateTopicRule" // CreateTopicRuleRequest generates a "aws/request.Request" representing the // client's request for the CreateTopicRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2534,8 +2799,7 @@ func (c *IoT) CreateTopicRuleRequest(input *CreateTopicRuleInput) (req *request. output = &CreateTopicRuleOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2568,6 +2832,10 @@ func (c *IoT) CreateTopicRuleRequest(input *CreateTopicRuleInput) (req *request. // * ErrCodeServiceUnavailableException "ServiceUnavailableException" // The service is temporarily unavailable. // +// * ErrCodeConflictingResourceUpdateException "ConflictingResourceUpdateException" +// A conflicting resource update exception. This exception is thrown when two +// pending updates cause a conflict. +// func (c *IoT) CreateTopicRule(input *CreateTopicRuleInput) (*CreateTopicRuleOutput, error) { req, out := c.CreateTopicRuleRequest(input) return out, req.Send() @@ -2594,7 +2862,7 @@ const opDeleteAccountAuditConfiguration = "DeleteAccountAuditConfiguration" // DeleteAccountAuditConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteAccountAuditConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2626,6 +2894,7 @@ func (c *IoT) DeleteAccountAuditConfigurationRequest(input *DeleteAccountAuditCo output = &DeleteAccountAuditConfigurationOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2681,7 +2950,7 @@ const opDeleteAuthorizer = "DeleteAuthorizer" // DeleteAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the DeleteAuthorizer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2713,6 +2982,7 @@ func (c *IoT) DeleteAuthorizerRequest(input *DeleteAuthorizerInput) (req *reques output = &DeleteAuthorizerOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2770,12 +3040,99 @@ func (c *IoT) DeleteAuthorizerWithContext(ctx aws.Context, input *DeleteAuthoriz return out, req.Send() } +const opDeleteBillingGroup = "DeleteBillingGroup" + +// DeleteBillingGroupRequest generates a "aws/request.Request" representing the +// client's request for the DeleteBillingGroup 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 DeleteBillingGroup for more information on using the DeleteBillingGroup +// 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 DeleteBillingGroupRequest method. +// req, resp := client.DeleteBillingGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) DeleteBillingGroupRequest(input *DeleteBillingGroupInput) (req *request.Request, output *DeleteBillingGroupOutput) { + op := &request.Operation{ + Name: opDeleteBillingGroup, + HTTPMethod: "DELETE", + HTTPPath: "/billing-groups/{billingGroupName}", + } + + if input == nil { + input = &DeleteBillingGroupInput{} + } + + output = &DeleteBillingGroupOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteBillingGroup API operation for AWS IoT. +// +// Deletes the billing 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 AWS IoT's +// API operation DeleteBillingGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeVersionConflictException "VersionConflictException" +// An exception thrown when the version of an entity specified with the expectedVersion +// parameter does not match the latest version in the system. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +func (c *IoT) DeleteBillingGroup(input *DeleteBillingGroupInput) (*DeleteBillingGroupOutput, error) { + req, out := c.DeleteBillingGroupRequest(input) + return out, req.Send() +} + +// DeleteBillingGroupWithContext is the same as DeleteBillingGroup with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteBillingGroup 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 *IoT) DeleteBillingGroupWithContext(ctx aws.Context, input *DeleteBillingGroupInput, opts ...request.Option) (*DeleteBillingGroupOutput, error) { + req, out := c.DeleteBillingGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteCACertificate = "DeleteCACertificate" // DeleteCACertificateRequest generates a "aws/request.Request" representing the // client's request for the DeleteCACertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2807,6 +3164,7 @@ func (c *IoT) DeleteCACertificateRequest(input *DeleteCACertificateInput) (req * output = &DeleteCACertificateOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2869,7 +3227,7 @@ const opDeleteCertificate = "DeleteCertificate" // DeleteCertificateRequest generates a "aws/request.Request" representing the // client's request for the DeleteCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2901,8 +3259,7 @@ func (c *IoT) DeleteCertificateRequest(input *DeleteCertificateInput) (req *requ output = &DeleteCertificateOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2968,12 +3325,99 @@ func (c *IoT) DeleteCertificateWithContext(ctx aws.Context, input *DeleteCertifi return out, req.Send() } +const opDeleteDynamicThingGroup = "DeleteDynamicThingGroup" + +// DeleteDynamicThingGroupRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDynamicThingGroup 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 DeleteDynamicThingGroup for more information on using the DeleteDynamicThingGroup +// 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 DeleteDynamicThingGroupRequest method. +// req, resp := client.DeleteDynamicThingGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) DeleteDynamicThingGroupRequest(input *DeleteDynamicThingGroupInput) (req *request.Request, output *DeleteDynamicThingGroupOutput) { + op := &request.Operation{ + Name: opDeleteDynamicThingGroup, + HTTPMethod: "DELETE", + HTTPPath: "/dynamic-thing-groups/{thingGroupName}", + } + + if input == nil { + input = &DeleteDynamicThingGroupInput{} + } + + output = &DeleteDynamicThingGroupOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteDynamicThingGroup API operation for AWS IoT. +// +// Deletes a dynamic thing 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 AWS IoT's +// API operation DeleteDynamicThingGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeVersionConflictException "VersionConflictException" +// An exception thrown when the version of an entity specified with the expectedVersion +// parameter does not match the latest version in the system. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +func (c *IoT) DeleteDynamicThingGroup(input *DeleteDynamicThingGroupInput) (*DeleteDynamicThingGroupOutput, error) { + req, out := c.DeleteDynamicThingGroupRequest(input) + return out, req.Send() +} + +// DeleteDynamicThingGroupWithContext is the same as DeleteDynamicThingGroup with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteDynamicThingGroup 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 *IoT) DeleteDynamicThingGroupWithContext(ctx aws.Context, input *DeleteDynamicThingGroupInput, opts ...request.Option) (*DeleteDynamicThingGroupOutput, error) { + req, out := c.DeleteDynamicThingGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteJob = "DeleteJob" // DeleteJobRequest generates a "aws/request.Request" representing the // client's request for the DeleteJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3005,8 +3449,7 @@ func (c *IoT) DeleteJobRequest(input *DeleteJobInput) (req *request.Request, out output = &DeleteJobOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3077,7 +3520,7 @@ const opDeleteJobExecution = "DeleteJobExecution" // DeleteJobExecutionRequest generates a "aws/request.Request" representing the // client's request for the DeleteJobExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3109,8 +3552,7 @@ func (c *IoT) DeleteJobExecutionRequest(input *DeleteJobExecutionInput) (req *re output = &DeleteJobExecutionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3169,7 +3611,7 @@ const opDeleteOTAUpdate = "DeleteOTAUpdate" // DeleteOTAUpdateRequest generates a "aws/request.Request" representing the // client's request for the DeleteOTAUpdate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3201,6 +3643,7 @@ func (c *IoT) DeleteOTAUpdateRequest(input *DeleteOTAUpdateInput) (req *request. output = &DeleteOTAUpdateOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3264,7 +3707,7 @@ const opDeletePolicy = "DeletePolicy" // DeletePolicyRequest generates a "aws/request.Request" representing the // client's request for the DeletePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3296,8 +3739,7 @@ func (c *IoT) DeletePolicyRequest(input *DeletePolicyInput) (req *request.Reques output = &DeletePolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3370,7 +3812,7 @@ const opDeletePolicyVersion = "DeletePolicyVersion" // DeletePolicyVersionRequest generates a "aws/request.Request" representing the // client's request for the DeletePolicyVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3402,8 +3844,7 @@ func (c *IoT) DeletePolicyVersionRequest(input *DeletePolicyVersionInput) (req * output = &DeletePolicyVersionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3469,7 +3910,7 @@ const opDeleteRegistrationCode = "DeleteRegistrationCode" // DeleteRegistrationCodeRequest generates a "aws/request.Request" representing the // client's request for the DeleteRegistrationCode operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3501,6 +3942,7 @@ func (c *IoT) DeleteRegistrationCodeRequest(input *DeleteRegistrationCodeInput) output = &DeleteRegistrationCodeOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3557,7 +3999,7 @@ const opDeleteRoleAlias = "DeleteRoleAlias" // DeleteRoleAliasRequest generates a "aws/request.Request" representing the // client's request for the DeleteRoleAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3589,6 +4031,7 @@ func (c *IoT) DeleteRoleAliasRequest(input *DeleteRoleAliasInput) (req *request. output = &DeleteRoleAliasOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3651,7 +4094,7 @@ const opDeleteScheduledAudit = "DeleteScheduledAudit" // DeleteScheduledAuditRequest generates a "aws/request.Request" representing the // client's request for the DeleteScheduledAudit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3683,6 +4126,7 @@ func (c *IoT) DeleteScheduledAuditRequest(input *DeleteScheduledAuditInput) (req output = &DeleteScheduledAuditOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3736,7 +4180,7 @@ const opDeleteSecurityProfile = "DeleteSecurityProfile" // DeleteSecurityProfileRequest generates a "aws/request.Request" representing the // client's request for the DeleteSecurityProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3768,6 +4212,7 @@ func (c *IoT) DeleteSecurityProfileRequest(input *DeleteSecurityProfileInput) (r output = &DeleteSecurityProfileOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3822,7 +4267,7 @@ const opDeleteStream = "DeleteStream" // DeleteStreamRequest generates a "aws/request.Request" representing the // client's request for the DeleteStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3854,6 +4299,7 @@ func (c *IoT) DeleteStreamRequest(input *DeleteStreamInput) (req *request.Reques output = &DeleteStreamOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3916,7 +4362,7 @@ const opDeleteThing = "DeleteThing" // DeleteThingRequest generates a "aws/request.Request" representing the // client's request for the DeleteThing operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3948,12 +4394,14 @@ func (c *IoT) DeleteThingRequest(input *DeleteThingInput) (req *request.Request, output = &DeleteThingOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteThing API operation for AWS IoT. // -// Deletes the specified thing. +// Deletes the specified thing. Returns successfully with no error if the deletion +// is successful or you specify a thing that doesn't exist. // // 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 @@ -4011,7 +4459,7 @@ const opDeleteThingGroup = "DeleteThingGroup" // DeleteThingGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteThingGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4043,6 +4491,7 @@ func (c *IoT) DeleteThingGroupRequest(input *DeleteThingGroupInput) (req *reques output = &DeleteThingGroupOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4097,7 +4546,7 @@ const opDeleteThingType = "DeleteThingType" // DeleteThingTypeRequest generates a "aws/request.Request" representing the // client's request for the DeleteThingType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4129,12 +4578,13 @@ func (c *IoT) DeleteThingTypeRequest(input *DeleteThingTypeInput) (req *request. output = &DeleteThingTypeOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteThingType API operation for AWS IoT. // -// Deletes the specified thing type . You cannot delete a thing type if it has +// Deletes the specified thing type. You cannot delete a thing type if it has // things associated with it. To delete a thing type, first mark it as deprecated // by calling DeprecateThingType, then remove any associated things by calling // UpdateThing to change the thing type on any associated thing, and finally @@ -4192,7 +4642,7 @@ const opDeleteTopicRule = "DeleteTopicRule" // DeleteTopicRuleRequest generates a "aws/request.Request" representing the // client's request for the DeleteTopicRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4224,8 +4674,7 @@ func (c *IoT) DeleteTopicRuleRequest(input *DeleteTopicRuleInput) (req *request. output = &DeleteTopicRuleOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4253,6 +4702,10 @@ func (c *IoT) DeleteTopicRuleRequest(input *DeleteTopicRuleInput) (req *request. // * ErrCodeUnauthorizedException "UnauthorizedException" // You are not authorized to perform this operation. // +// * ErrCodeConflictingResourceUpdateException "ConflictingResourceUpdateException" +// A conflicting resource update exception. This exception is thrown when two +// pending updates cause a conflict. +// func (c *IoT) DeleteTopicRule(input *DeleteTopicRuleInput) (*DeleteTopicRuleOutput, error) { req, out := c.DeleteTopicRuleRequest(input) return out, req.Send() @@ -4279,7 +4732,7 @@ const opDeleteV2LoggingLevel = "DeleteV2LoggingLevel" // DeleteV2LoggingLevelRequest generates a "aws/request.Request" representing the // client's request for the DeleteV2LoggingLevel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4311,8 +4764,7 @@ func (c *IoT) DeleteV2LoggingLevelRequest(input *DeleteV2LoggingLevelInput) (req output = &DeleteV2LoggingLevelOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4363,7 +4815,7 @@ const opDeprecateThingType = "DeprecateThingType" // DeprecateThingTypeRequest generates a "aws/request.Request" representing the // client's request for the DeprecateThingType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4395,6 +4847,7 @@ func (c *IoT) DeprecateThingTypeRequest(input *DeprecateThingTypeInput) (req *re output = &DeprecateThingTypeOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4455,7 +4908,7 @@ const opDescribeAccountAuditConfiguration = "DescribeAccountAuditConfiguration" // DescribeAccountAuditConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DescribeAccountAuditConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4536,7 +4989,7 @@ const opDescribeAuditTask = "DescribeAuditTask" // DescribeAuditTaskRequest generates a "aws/request.Request" representing the // client's request for the DescribeAuditTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4621,7 +5074,7 @@ const opDescribeAuthorizer = "DescribeAuthorizer" // DescribeAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the DescribeAuthorizer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4707,12 +5160,97 @@ func (c *IoT) DescribeAuthorizerWithContext(ctx aws.Context, input *DescribeAuth return out, req.Send() } +const opDescribeBillingGroup = "DescribeBillingGroup" + +// DescribeBillingGroupRequest generates a "aws/request.Request" representing the +// client's request for the DescribeBillingGroup 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 DescribeBillingGroup for more information on using the DescribeBillingGroup +// 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 DescribeBillingGroupRequest method. +// req, resp := client.DescribeBillingGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) DescribeBillingGroupRequest(input *DescribeBillingGroupInput) (req *request.Request, output *DescribeBillingGroupOutput) { + op := &request.Operation{ + Name: opDescribeBillingGroup, + HTTPMethod: "GET", + HTTPPath: "/billing-groups/{billingGroupName}", + } + + if input == nil { + input = &DescribeBillingGroupInput{} + } + + output = &DescribeBillingGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeBillingGroup API operation for AWS IoT. +// +// Returns information about a billing 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 AWS IoT's +// API operation DescribeBillingGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +func (c *IoT) DescribeBillingGroup(input *DescribeBillingGroupInput) (*DescribeBillingGroupOutput, error) { + req, out := c.DescribeBillingGroupRequest(input) + return out, req.Send() +} + +// DescribeBillingGroupWithContext is the same as DescribeBillingGroup with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeBillingGroup 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 *IoT) DescribeBillingGroupWithContext(ctx aws.Context, input *DescribeBillingGroupInput, opts ...request.Option) (*DescribeBillingGroupOutput, error) { + req, out := c.DescribeBillingGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeCACertificate = "DescribeCACertificate" // DescribeCACertificateRequest generates a "aws/request.Request" representing the // client's request for the DescribeCACertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4803,7 +5341,7 @@ const opDescribeCertificate = "DescribeCertificate" // DescribeCertificateRequest generates a "aws/request.Request" representing the // client's request for the DescribeCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4894,7 +5432,7 @@ const opDescribeDefaultAuthorizer = "DescribeDefaultAuthorizer" // DescribeDefaultAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the DescribeDefaultAuthorizer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4985,7 +5523,7 @@ const opDescribeEndpoint = "DescribeEndpoint" // DescribeEndpointRequest generates a "aws/request.Request" representing the // client's request for the DescribeEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5070,7 +5608,7 @@ const opDescribeEventConfigurations = "DescribeEventConfigurations" // DescribeEventConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEventConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5149,7 +5687,7 @@ const opDescribeIndex = "DescribeIndex" // DescribeIndexRequest generates a "aws/request.Request" representing the // client's request for the DescribeIndex operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5240,7 +5778,7 @@ const opDescribeJob = "DescribeJob" // DescribeJobRequest generates a "aws/request.Request" representing the // client's request for the DescribeJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5325,7 +5863,7 @@ const opDescribeJobExecution = "DescribeJobExecution" // DescribeJobExecutionRequest generates a "aws/request.Request" representing the // client's request for the DescribeJobExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5410,7 +5948,7 @@ const opDescribeRoleAlias = "DescribeRoleAlias" // DescribeRoleAliasRequest generates a "aws/request.Request" representing the // client's request for the DescribeRoleAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5501,7 +6039,7 @@ const opDescribeScheduledAudit = "DescribeScheduledAudit" // DescribeScheduledAuditRequest generates a "aws/request.Request" representing the // client's request for the DescribeScheduledAudit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5586,7 +6124,7 @@ const opDescribeSecurityProfile = "DescribeSecurityProfile" // DescribeSecurityProfileRequest generates a "aws/request.Request" representing the // client's request for the DescribeSecurityProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5671,7 +6209,7 @@ const opDescribeStream = "DescribeStream" // DescribeStreamRequest generates a "aws/request.Request" representing the // client's request for the DescribeStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5762,7 +6300,7 @@ const opDescribeThing = "DescribeThing" // DescribeThingRequest generates a "aws/request.Request" representing the // client's request for the DescribeThing operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5853,7 +6391,7 @@ const opDescribeThingGroup = "DescribeThingGroup" // DescribeThingGroupRequest generates a "aws/request.Request" representing the // client's request for the DescribeThingGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5938,7 +6476,7 @@ const opDescribeThingRegistrationTask = "DescribeThingRegistrationTask" // DescribeThingRegistrationTaskRequest generates a "aws/request.Request" representing the // client's request for the DescribeThingRegistrationTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6026,7 +6564,7 @@ const opDescribeThingType = "DescribeThingType" // DescribeThingTypeRequest generates a "aws/request.Request" representing the // client's request for the DescribeThingType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6117,7 +6655,7 @@ const opDetachPolicy = "DetachPolicy" // DetachPolicyRequest generates a "aws/request.Request" representing the // client's request for the DetachPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6149,8 +6687,7 @@ func (c *IoT) DetachPolicyRequest(input *DetachPolicyInput) (req *request.Reques output = &DetachPolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -6210,7 +6747,7 @@ const opDetachPrincipalPolicy = "DetachPrincipalPolicy" // DetachPrincipalPolicyRequest generates a "aws/request.Request" representing the // client's request for the DetachPrincipalPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6247,8 +6784,7 @@ func (c *IoT) DetachPrincipalPolicyRequest(input *DetachPrincipalPolicyInput) (r output = &DetachPrincipalPolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -6314,7 +6850,7 @@ const opDetachSecurityProfile = "DetachSecurityProfile" // DetachSecurityProfileRequest generates a "aws/request.Request" representing the // client's request for the DetachSecurityProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6346,6 +6882,7 @@ func (c *IoT) DetachSecurityProfileRequest(input *DetachSecurityProfileInput) (r output = &DetachSecurityProfileOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -6400,7 +6937,7 @@ const opDetachThingPrincipal = "DetachThingPrincipal" // DetachThingPrincipalRequest generates a "aws/request.Request" representing the // client's request for the DetachThingPrincipal operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6432,6 +6969,7 @@ func (c *IoT) DetachThingPrincipalRequest(input *DetachThingPrincipalInput) (req output = &DetachThingPrincipalOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -6439,6 +6977,9 @@ func (c *IoT) DetachThingPrincipalRequest(input *DetachThingPrincipalInput) (req // // Detaches the specified principal from the specified thing. // +// This call is asynchronous. It might take several seconds for the detachment +// to propagate. +// // 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. @@ -6491,7 +7032,7 @@ const opDisableTopicRule = "DisableTopicRule" // DisableTopicRuleRequest generates a "aws/request.Request" representing the // client's request for the DisableTopicRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6523,8 +7064,7 @@ func (c *IoT) DisableTopicRuleRequest(input *DisableTopicRuleInput) (req *reques output = &DisableTopicRuleOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -6552,6 +7092,10 @@ func (c *IoT) DisableTopicRuleRequest(input *DisableTopicRuleInput) (req *reques // * ErrCodeUnauthorizedException "UnauthorizedException" // You are not authorized to perform this operation. // +// * ErrCodeConflictingResourceUpdateException "ConflictingResourceUpdateException" +// A conflicting resource update exception. This exception is thrown when two +// pending updates cause a conflict. +// func (c *IoT) DisableTopicRule(input *DisableTopicRuleInput) (*DisableTopicRuleOutput, error) { req, out := c.DisableTopicRuleRequest(input) return out, req.Send() @@ -6578,7 +7122,7 @@ const opEnableTopicRule = "EnableTopicRule" // EnableTopicRuleRequest generates a "aws/request.Request" representing the // client's request for the EnableTopicRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6610,8 +7154,7 @@ func (c *IoT) EnableTopicRuleRequest(input *EnableTopicRuleInput) (req *request. output = &EnableTopicRuleOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -6639,6 +7182,10 @@ func (c *IoT) EnableTopicRuleRequest(input *EnableTopicRuleInput) (req *request. // * ErrCodeUnauthorizedException "UnauthorizedException" // You are not authorized to perform this operation. // +// * ErrCodeConflictingResourceUpdateException "ConflictingResourceUpdateException" +// A conflicting resource update exception. This exception is thrown when two +// pending updates cause a conflict. +// func (c *IoT) EnableTopicRule(input *EnableTopicRuleInput) (*EnableTopicRuleOutput, error) { req, out := c.EnableTopicRuleRequest(input) return out, req.Send() @@ -6665,7 +7212,7 @@ const opGetEffectivePolicies = "GetEffectivePolicies" // GetEffectivePoliciesRequest generates a "aws/request.Request" representing the // client's request for the GetEffectivePolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6760,7 +7307,7 @@ const opGetIndexingConfiguration = "GetIndexingConfiguration" // GetIndexingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetIndexingConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6848,7 +7395,7 @@ const opGetJobDocument = "GetJobDocument" // GetJobDocumentRequest generates a "aws/request.Request" representing the // client's request for the GetJobDocument operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6933,7 +7480,7 @@ const opGetLoggingOptions = "GetLoggingOptions" // GetLoggingOptionsRequest generates a "aws/request.Request" representing the // client's request for the GetLoggingOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7017,7 +7564,7 @@ const opGetOTAUpdate = "GetOTAUpdate" // GetOTAUpdateRequest generates a "aws/request.Request" representing the // client's request for the GetOTAUpdate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7108,7 +7655,7 @@ const opGetPolicy = "GetPolicy" // GetPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7200,7 +7747,7 @@ const opGetPolicyVersion = "GetPolicyVersion" // GetPolicyVersionRequest generates a "aws/request.Request" representing the // client's request for the GetPolicyVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7291,7 +7838,7 @@ const opGetRegistrationCode = "GetRegistrationCode" // GetRegistrationCodeRequest generates a "aws/request.Request" representing the // client's request for the GetRegistrationCode operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7379,7 +7926,7 @@ const opGetTopicRule = "GetTopicRule" // GetTopicRuleRequest generates a "aws/request.Request" representing the // client's request for the GetTopicRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7464,7 +8011,7 @@ const opGetV2LoggingOptions = "GetV2LoggingOptions" // GetV2LoggingOptionsRequest generates a "aws/request.Request" representing the // client's request for the GetV2LoggingOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7546,7 +8093,7 @@ const opListActiveViolations = "ListActiveViolations" // ListActiveViolationsRequest generates a "aws/request.Request" representing the // client's request for the ListActiveViolations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7631,7 +8178,7 @@ const opListAttachedPolicies = "ListAttachedPolicies" // ListAttachedPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListAttachedPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7725,7 +8272,7 @@ const opListAuditFindings = "ListAuditFindings" // ListAuditFindingsRequest generates a "aws/request.Request" representing the // client's request for the ListAuditFindings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7809,7 +8356,7 @@ const opListAuditTasks = "ListAuditTasks" // ListAuditTasksRequest generates a "aws/request.Request" representing the // client's request for the ListAuditTasks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7892,7 +8439,7 @@ const opListAuthorizers = "ListAuthorizers" // ListAuthorizersRequest generates a "aws/request.Request" representing the // client's request for the ListAuthorizers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7975,12 +8522,97 @@ func (c *IoT) ListAuthorizersWithContext(ctx aws.Context, input *ListAuthorizers return out, req.Send() } +const opListBillingGroups = "ListBillingGroups" + +// ListBillingGroupsRequest generates a "aws/request.Request" representing the +// client's request for the ListBillingGroups 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 ListBillingGroups for more information on using the ListBillingGroups +// 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 ListBillingGroupsRequest method. +// req, resp := client.ListBillingGroupsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) ListBillingGroupsRequest(input *ListBillingGroupsInput) (req *request.Request, output *ListBillingGroupsOutput) { + op := &request.Operation{ + Name: opListBillingGroups, + HTTPMethod: "GET", + HTTPPath: "/billing-groups", + } + + if input == nil { + input = &ListBillingGroupsInput{} + } + + output = &ListBillingGroupsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListBillingGroups API operation for AWS IoT. +// +// Lists the billing groups you have created. +// +// 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 IoT's +// API operation ListBillingGroups for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +func (c *IoT) ListBillingGroups(input *ListBillingGroupsInput) (*ListBillingGroupsOutput, error) { + req, out := c.ListBillingGroupsRequest(input) + return out, req.Send() +} + +// ListBillingGroupsWithContext is the same as ListBillingGroups with the addition of +// the ability to pass a context and additional request options. +// +// See ListBillingGroups 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 *IoT) ListBillingGroupsWithContext(ctx aws.Context, input *ListBillingGroupsInput, opts ...request.Option) (*ListBillingGroupsOutput, error) { + req, out := c.ListBillingGroupsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListCACertificates = "ListCACertificates" // ListCACertificatesRequest generates a "aws/request.Request" representing the // client's request for the ListCACertificates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8071,7 +8703,7 @@ const opListCertificates = "ListCertificates" // ListCertificatesRequest generates a "aws/request.Request" representing the // client's request for the ListCertificates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8162,7 +8794,7 @@ const opListCertificatesByCA = "ListCertificatesByCA" // ListCertificatesByCARequest generates a "aws/request.Request" representing the // client's request for the ListCertificatesByCA operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8250,7 +8882,7 @@ const opListIndices = "ListIndices" // ListIndicesRequest generates a "aws/request.Request" representing the // client's request for the ListIndices operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8338,7 +8970,7 @@ const opListJobExecutionsForJob = "ListJobExecutionsForJob" // ListJobExecutionsForJobRequest generates a "aws/request.Request" representing the // client's request for the ListJobExecutionsForJob operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8423,7 +9055,7 @@ const opListJobExecutionsForThing = "ListJobExecutionsForThing" // ListJobExecutionsForThingRequest generates a "aws/request.Request" representing the // client's request for the ListJobExecutionsForThing operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8508,7 +9140,7 @@ const opListJobs = "ListJobs" // ListJobsRequest generates a "aws/request.Request" representing the // client's request for the ListJobs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8593,7 +9225,7 @@ const opListOTAUpdates = "ListOTAUpdates" // ListOTAUpdatesRequest generates a "aws/request.Request" representing the // client's request for the ListOTAUpdates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8681,7 +9313,7 @@ const opListOutgoingCertificates = "ListOutgoingCertificates" // ListOutgoingCertificatesRequest generates a "aws/request.Request" representing the // client's request for the ListOutgoingCertificates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8769,7 +9401,7 @@ const opListPolicies = "ListPolicies" // ListPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8857,7 +9489,7 @@ const opListPolicyPrincipals = "ListPolicyPrincipals" // ListPolicyPrincipalsRequest generates a "aws/request.Request" representing the // client's request for the ListPolicyPrincipals operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8959,7 +9591,7 @@ const opListPolicyVersions = "ListPolicyVersions" // ListPolicyVersionsRequest generates a "aws/request.Request" representing the // client's request for the ListPolicyVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9050,7 +9682,7 @@ const opListPrincipalPolicies = "ListPrincipalPolicies" // ListPrincipalPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListPrincipalPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9153,7 +9785,7 @@ const opListPrincipalThings = "ListPrincipalThings" // ListPrincipalThingsRequest generates a "aws/request.Request" representing the // client's request for the ListPrincipalThings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9244,7 +9876,7 @@ const opListRoleAliases = "ListRoleAliases" // ListRoleAliasesRequest generates a "aws/request.Request" representing the // client's request for the ListRoleAliases operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9332,7 +9964,7 @@ const opListScheduledAudits = "ListScheduledAudits" // ListScheduledAuditsRequest generates a "aws/request.Request" representing the // client's request for the ListScheduledAudits operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9414,7 +10046,7 @@ const opListSecurityProfiles = "ListSecurityProfiles" // ListSecurityProfilesRequest generates a "aws/request.Request" representing the // client's request for the ListSecurityProfiles operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9498,7 +10130,7 @@ const opListSecurityProfilesForTarget = "ListSecurityProfilesForTarget" // ListSecurityProfilesForTargetRequest generates a "aws/request.Request" representing the // client's request for the ListSecurityProfilesForTarget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9583,7 +10215,7 @@ const opListStreams = "ListStreams" // ListStreamsRequest generates a "aws/request.Request" representing the // client's request for the ListStreams operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9666,12 +10298,97 @@ func (c *IoT) ListStreamsWithContext(ctx aws.Context, input *ListStreamsInput, o return out, req.Send() } +const opListTagsForResource = "ListTagsForResource" + +// ListTagsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForResource 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 ListTagsForResource for more information on using the ListTagsForResource +// 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 ListTagsForResourceRequest method. +// req, resp := client.ListTagsForResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { + op := &request.Operation{ + Name: opListTagsForResource, + HTTPMethod: "GET", + HTTPPath: "/tags", + } + + if input == nil { + input = &ListTagsForResourceInput{} + } + + output = &ListTagsForResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagsForResource API operation for AWS IoT. +// +// Lists the tags (metadata) you have assigned to the resource. +// +// 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 IoT's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +func (c *IoT) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + return out, req.Send() +} + +// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of +// the ability to pass a context and additional request options. +// +// See ListTagsForResource 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 *IoT) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListTargetsForPolicy = "ListTargetsForPolicy" // ListTargetsForPolicyRequest generates a "aws/request.Request" representing the // client's request for the ListTargetsForPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9765,7 +10482,7 @@ const opListTargetsForSecurityProfile = "ListTargetsForSecurityProfile" // ListTargetsForSecurityProfileRequest generates a "aws/request.Request" representing the // client's request for the ListTargetsForSecurityProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9851,7 +10568,7 @@ const opListThingGroups = "ListThingGroups" // ListThingGroupsRequest generates a "aws/request.Request" representing the // client's request for the ListThingGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9933,7 +10650,7 @@ const opListThingGroupsForThing = "ListThingGroupsForThing" // ListThingGroupsForThingRequest generates a "aws/request.Request" representing the // client's request for the ListThingGroupsForThing operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10015,7 +10732,7 @@ const opListThingPrincipals = "ListThingPrincipals" // ListThingPrincipalsRequest generates a "aws/request.Request" representing the // client's request for the ListThingPrincipals operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10106,7 +10823,7 @@ const opListThingRegistrationTaskReports = "ListThingRegistrationTaskReports" // ListThingRegistrationTaskReportsRequest generates a "aws/request.Request" representing the // client's request for the ListThingRegistrationTaskReports operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10191,7 +10908,7 @@ const opListThingRegistrationTasks = "ListThingRegistrationTasks" // ListThingRegistrationTasksRequest generates a "aws/request.Request" representing the // client's request for the ListThingRegistrationTasks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10276,7 +10993,7 @@ const opListThingTypes = "ListThingTypes" // ListThingTypesRequest generates a "aws/request.Request" representing the // client's request for the ListThingTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10364,7 +11081,7 @@ const opListThings = "ListThings" // ListThingsRequest generates a "aws/request.Request" representing the // client's request for the ListThings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10450,12 +11167,97 @@ func (c *IoT) ListThingsWithContext(ctx aws.Context, input *ListThingsInput, opt return out, req.Send() } +const opListThingsInBillingGroup = "ListThingsInBillingGroup" + +// ListThingsInBillingGroupRequest generates a "aws/request.Request" representing the +// client's request for the ListThingsInBillingGroup 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 ListThingsInBillingGroup for more information on using the ListThingsInBillingGroup +// 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 ListThingsInBillingGroupRequest method. +// req, resp := client.ListThingsInBillingGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) ListThingsInBillingGroupRequest(input *ListThingsInBillingGroupInput) (req *request.Request, output *ListThingsInBillingGroupOutput) { + op := &request.Operation{ + Name: opListThingsInBillingGroup, + HTTPMethod: "GET", + HTTPPath: "/billing-groups/{billingGroupName}/things", + } + + if input == nil { + input = &ListThingsInBillingGroupInput{} + } + + output = &ListThingsInBillingGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListThingsInBillingGroup API operation for AWS IoT. +// +// Lists the things you have added to the given billing 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 AWS IoT's +// API operation ListThingsInBillingGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +func (c *IoT) ListThingsInBillingGroup(input *ListThingsInBillingGroupInput) (*ListThingsInBillingGroupOutput, error) { + req, out := c.ListThingsInBillingGroupRequest(input) + return out, req.Send() +} + +// ListThingsInBillingGroupWithContext is the same as ListThingsInBillingGroup with the addition of +// the ability to pass a context and additional request options. +// +// See ListThingsInBillingGroup 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 *IoT) ListThingsInBillingGroupWithContext(ctx aws.Context, input *ListThingsInBillingGroupInput, opts ...request.Option) (*ListThingsInBillingGroupOutput, error) { + req, out := c.ListThingsInBillingGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListThingsInThingGroup = "ListThingsInThingGroup" // ListThingsInThingGroupRequest generates a "aws/request.Request" representing the // client's request for the ListThingsInThingGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10537,7 +11339,7 @@ const opListTopicRules = "ListTopicRules" // ListTopicRulesRequest generates a "aws/request.Request" representing the // client's request for the ListTopicRules operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10619,7 +11421,7 @@ const opListV2LoggingLevels = "ListV2LoggingLevels" // ListV2LoggingLevelsRequest generates a "aws/request.Request" representing the // client's request for the ListV2LoggingLevels operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10704,7 +11506,7 @@ const opListViolationEvents = "ListViolationEvents" // ListViolationEventsRequest generates a "aws/request.Request" representing the // client's request for the ListViolationEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10788,7 +11590,7 @@ const opRegisterCACertificate = "RegisterCACertificate" // RegisterCACertificateRequest generates a "aws/request.Request" representing the // client's request for the RegisterCACertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10894,7 +11696,7 @@ const opRegisterCertificate = "RegisterCertificate" // RegisterCertificateRequest generates a "aws/request.Request" representing the // client's request for the RegisterCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10998,7 +11800,7 @@ const opRegisterThing = "RegisterThing" // RegisterThingRequest generates a "aws/request.Request" representing the // client's request for the RegisterThing operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11093,7 +11895,7 @@ const opRejectCertificateTransfer = "RejectCertificateTransfer" // RejectCertificateTransferRequest generates a "aws/request.Request" representing the // client's request for the RejectCertificateTransfer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11125,8 +11927,7 @@ func (c *IoT) RejectCertificateTransferRequest(input *RejectCertificateTransferI output = &RejectCertificateTransferOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -11193,12 +11994,98 @@ func (c *IoT) RejectCertificateTransferWithContext(ctx aws.Context, input *Rejec return out, req.Send() } +const opRemoveThingFromBillingGroup = "RemoveThingFromBillingGroup" + +// RemoveThingFromBillingGroupRequest generates a "aws/request.Request" representing the +// client's request for the RemoveThingFromBillingGroup 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 RemoveThingFromBillingGroup for more information on using the RemoveThingFromBillingGroup +// 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 RemoveThingFromBillingGroupRequest method. +// req, resp := client.RemoveThingFromBillingGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) RemoveThingFromBillingGroupRequest(input *RemoveThingFromBillingGroupInput) (req *request.Request, output *RemoveThingFromBillingGroupOutput) { + op := &request.Operation{ + Name: opRemoveThingFromBillingGroup, + HTTPMethod: "PUT", + HTTPPath: "/billing-groups/removeThingFromBillingGroup", + } + + if input == nil { + input = &RemoveThingFromBillingGroupInput{} + } + + output = &RemoveThingFromBillingGroupOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// RemoveThingFromBillingGroup API operation for AWS IoT. +// +// Removes the given thing from the billing 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 AWS IoT's +// API operation RemoveThingFromBillingGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +func (c *IoT) RemoveThingFromBillingGroup(input *RemoveThingFromBillingGroupInput) (*RemoveThingFromBillingGroupOutput, error) { + req, out := c.RemoveThingFromBillingGroupRequest(input) + return out, req.Send() +} + +// RemoveThingFromBillingGroupWithContext is the same as RemoveThingFromBillingGroup with the addition of +// the ability to pass a context and additional request options. +// +// See RemoveThingFromBillingGroup 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 *IoT) RemoveThingFromBillingGroupWithContext(ctx aws.Context, input *RemoveThingFromBillingGroupInput, opts ...request.Option) (*RemoveThingFromBillingGroupOutput, error) { + req, out := c.RemoveThingFromBillingGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opRemoveThingFromThingGroup = "RemoveThingFromThingGroup" // RemoveThingFromThingGroupRequest generates a "aws/request.Request" representing the // client's request for the RemoveThingFromThingGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11230,6 +12117,7 @@ func (c *IoT) RemoveThingFromThingGroupRequest(input *RemoveThingFromThingGroupI output = &RemoveThingFromThingGroupOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -11283,7 +12171,7 @@ const opReplaceTopicRule = "ReplaceTopicRule" // ReplaceTopicRuleRequest generates a "aws/request.Request" representing the // client's request for the ReplaceTopicRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11315,8 +12203,7 @@ func (c *IoT) ReplaceTopicRuleRequest(input *ReplaceTopicRuleInput) (req *reques output = &ReplaceTopicRuleOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -11349,6 +12236,10 @@ func (c *IoT) ReplaceTopicRuleRequest(input *ReplaceTopicRuleInput) (req *reques // * ErrCodeUnauthorizedException "UnauthorizedException" // You are not authorized to perform this operation. // +// * ErrCodeConflictingResourceUpdateException "ConflictingResourceUpdateException" +// A conflicting resource update exception. This exception is thrown when two +// pending updates cause a conflict. +// func (c *IoT) ReplaceTopicRule(input *ReplaceTopicRuleInput) (*ReplaceTopicRuleOutput, error) { req, out := c.ReplaceTopicRuleRequest(input) return out, req.Send() @@ -11375,7 +12266,7 @@ const opSearchIndex = "SearchIndex" // SearchIndexRequest generates a "aws/request.Request" representing the // client's request for the SearchIndex operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11472,7 +12363,7 @@ const opSetDefaultAuthorizer = "SetDefaultAuthorizer" // SetDefaultAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the SetDefaultAuthorizer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11567,7 +12458,7 @@ const opSetDefaultPolicyVersion = "SetDefaultPolicyVersion" // SetDefaultPolicyVersionRequest generates a "aws/request.Request" representing the // client's request for the SetDefaultPolicyVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11599,8 +12490,7 @@ func (c *IoT) SetDefaultPolicyVersionRequest(input *SetDefaultPolicyVersionInput output = &SetDefaultPolicyVersionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -11663,7 +12553,7 @@ const opSetLoggingOptions = "SetLoggingOptions" // SetLoggingOptionsRequest generates a "aws/request.Request" representing the // client's request for the SetLoggingOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11695,8 +12585,7 @@ func (c *IoT) SetLoggingOptionsRequest(input *SetLoggingOptionsInput) (req *requ output = &SetLoggingOptionsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -11749,7 +12638,7 @@ const opSetV2LoggingLevel = "SetV2LoggingLevel" // SetV2LoggingLevelRequest generates a "aws/request.Request" representing the // client's request for the SetV2LoggingLevel operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11781,8 +12670,7 @@ func (c *IoT) SetV2LoggingLevelRequest(input *SetV2LoggingLevelInput) (req *requ output = &SetV2LoggingLevelOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -11836,7 +12724,7 @@ const opSetV2LoggingOptions = "SetV2LoggingOptions" // SetV2LoggingOptionsRequest generates a "aws/request.Request" representing the // client's request for the SetV2LoggingOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -11868,8 +12756,7 @@ func (c *IoT) SetV2LoggingOptionsRequest(input *SetV2LoggingOptionsInput) (req * output = &SetV2LoggingOptionsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -11920,7 +12807,7 @@ const opStartOnDemandAuditTask = "StartOnDemandAuditTask" // StartOnDemandAuditTaskRequest generates a "aws/request.Request" representing the // client's request for the StartOnDemandAuditTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12005,7 +12892,7 @@ const opStartThingRegistrationTask = "StartThingRegistrationTask" // StartThingRegistrationTaskRequest generates a "aws/request.Request" representing the // client's request for the StartThingRegistrationTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12090,7 +12977,7 @@ const opStopThingRegistrationTask = "StopThingRegistrationTask" // StopThingRegistrationTaskRequest generates a "aws/request.Request" representing the // client's request for the StopThingRegistrationTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12122,6 +13009,7 @@ func (c *IoT) StopThingRegistrationTaskRequest(input *StopThingRegistrationTaskI output = &StopThingRegistrationTaskOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -12173,12 +13061,102 @@ func (c *IoT) StopThingRegistrationTaskWithContext(ctx aws.Context, input *StopT return out, req.Send() } +const opTagResource = "TagResource" + +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return +// 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 TagResource for more information on using the TagResource +// 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 TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/tags", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagResource API operation for AWS IoT. +// +// Adds to or modifies the tags of the given resource. Tags are metadata which +// can be used to manage a resource. +// +// 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 IoT's +// API operation TagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// A limit has been exceeded. +// +func (c *IoT) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + return out, req.Send() +} + +// TagResourceWithContext is the same as TagResource with the addition of +// the ability to pass a context and additional request options. +// +// See TagResource 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 *IoT) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opTestAuthorization = "TestAuthorization" // TestAuthorizationRequest generates a "aws/request.Request" representing the // client's request for the TestAuthorization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12274,7 +13252,7 @@ const opTestInvokeAuthorizer = "TestInvokeAuthorizer" // TestInvokeAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the TestInvokeAuthorizer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12370,7 +13348,7 @@ const opTransferCertificate = "TransferCertificate" // TransferCertificateRequest generates a "aws/request.Request" representing the // client's request for the TransferCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12474,12 +13452,98 @@ func (c *IoT) TransferCertificateWithContext(ctx aws.Context, input *TransferCer return out, req.Send() } +const opUntagResource = "UntagResource" + +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource 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 UntagResource for more information on using the UntagResource +// 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 UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "POST", + HTTPPath: "/untag", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagResource API operation for AWS IoT. +// +// Removes the given tags (metadata) from the resource. +// +// 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 IoT's +// API operation UntagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +func (c *IoT) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + return out, req.Send() +} + +// UntagResourceWithContext is the same as UntagResource with the addition of +// the ability to pass a context and additional request options. +// +// See UntagResource 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 *IoT) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateAccountAuditConfiguration = "UpdateAccountAuditConfiguration" // UpdateAccountAuditConfigurationRequest generates a "aws/request.Request" representing the // client's request for the UpdateAccountAuditConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12511,6 +13575,7 @@ func (c *IoT) UpdateAccountAuditConfigurationRequest(input *UpdateAccountAuditCo output = &UpdateAccountAuditConfigurationOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -12563,7 +13628,7 @@ const opUpdateAuthorizer = "UpdateAuthorizer" // UpdateAuthorizerRequest generates a "aws/request.Request" representing the // client's request for the UpdateAuthorizer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12652,12 +13717,101 @@ func (c *IoT) UpdateAuthorizerWithContext(ctx aws.Context, input *UpdateAuthoriz return out, req.Send() } +const opUpdateBillingGroup = "UpdateBillingGroup" + +// UpdateBillingGroupRequest generates a "aws/request.Request" representing the +// client's request for the UpdateBillingGroup 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 UpdateBillingGroup for more information on using the UpdateBillingGroup +// 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 UpdateBillingGroupRequest method. +// req, resp := client.UpdateBillingGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) UpdateBillingGroupRequest(input *UpdateBillingGroupInput) (req *request.Request, output *UpdateBillingGroupOutput) { + op := &request.Operation{ + Name: opUpdateBillingGroup, + HTTPMethod: "PATCH", + HTTPPath: "/billing-groups/{billingGroupName}", + } + + if input == nil { + input = &UpdateBillingGroupInput{} + } + + output = &UpdateBillingGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateBillingGroup API operation for AWS IoT. +// +// Updates information about the billing 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 AWS IoT's +// API operation UpdateBillingGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeVersionConflictException "VersionConflictException" +// An exception thrown when the version of an entity specified with the expectedVersion +// parameter does not match the latest version in the system. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +func (c *IoT) UpdateBillingGroup(input *UpdateBillingGroupInput) (*UpdateBillingGroupOutput, error) { + req, out := c.UpdateBillingGroupRequest(input) + return out, req.Send() +} + +// UpdateBillingGroupWithContext is the same as UpdateBillingGroup with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateBillingGroup 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 *IoT) UpdateBillingGroupWithContext(ctx aws.Context, input *UpdateBillingGroupInput, opts ...request.Option) (*UpdateBillingGroupOutput, error) { + req, out := c.UpdateBillingGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateCACertificate = "UpdateCACertificate" // UpdateCACertificateRequest generates a "aws/request.Request" representing the // client's request for the UpdateCACertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12689,8 +13843,7 @@ func (c *IoT) UpdateCACertificateRequest(input *UpdateCACertificateInput) (req * output = &UpdateCACertificateOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -12750,7 +13903,7 @@ const opUpdateCertificate = "UpdateCertificate" // UpdateCertificateRequest generates a "aws/request.Request" representing the // client's request for the UpdateCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12782,8 +13935,7 @@ func (c *IoT) UpdateCertificateRequest(input *UpdateCertificateInput) (req *requ output = &UpdateCertificateOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -12847,12 +13999,104 @@ func (c *IoT) UpdateCertificateWithContext(ctx aws.Context, input *UpdateCertifi return out, req.Send() } +const opUpdateDynamicThingGroup = "UpdateDynamicThingGroup" + +// UpdateDynamicThingGroupRequest generates a "aws/request.Request" representing the +// client's request for the UpdateDynamicThingGroup 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 UpdateDynamicThingGroup for more information on using the UpdateDynamicThingGroup +// 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 UpdateDynamicThingGroupRequest method. +// req, resp := client.UpdateDynamicThingGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) UpdateDynamicThingGroupRequest(input *UpdateDynamicThingGroupInput) (req *request.Request, output *UpdateDynamicThingGroupOutput) { + op := &request.Operation{ + Name: opUpdateDynamicThingGroup, + HTTPMethod: "PATCH", + HTTPPath: "/dynamic-thing-groups/{thingGroupName}", + } + + if input == nil { + input = &UpdateDynamicThingGroupInput{} + } + + output = &UpdateDynamicThingGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateDynamicThingGroup API operation for AWS IoT. +// +// Updates a dynamic thing 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 AWS IoT's +// API operation UpdateDynamicThingGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeVersionConflictException "VersionConflictException" +// An exception thrown when the version of an entity specified with the expectedVersion +// parameter does not match the latest version in the system. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeInternalFailureException "InternalFailureException" +// An unexpected error has occurred. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeInvalidQueryException "InvalidQueryException" +// The query is invalid. +// +func (c *IoT) UpdateDynamicThingGroup(input *UpdateDynamicThingGroupInput) (*UpdateDynamicThingGroupOutput, error) { + req, out := c.UpdateDynamicThingGroupRequest(input) + return out, req.Send() +} + +// UpdateDynamicThingGroupWithContext is the same as UpdateDynamicThingGroup with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateDynamicThingGroup 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 *IoT) UpdateDynamicThingGroupWithContext(ctx aws.Context, input *UpdateDynamicThingGroupInput, opts ...request.Option) (*UpdateDynamicThingGroupOutput, error) { + req, out := c.UpdateDynamicThingGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateEventConfigurations = "UpdateEventConfigurations" // UpdateEventConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the UpdateEventConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12884,6 +14128,7 @@ func (c *IoT) UpdateEventConfigurationsRequest(input *UpdateEventConfigurationsI output = &UpdateEventConfigurationsOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -12934,7 +14179,7 @@ const opUpdateIndexingConfiguration = "UpdateIndexingConfiguration" // UpdateIndexingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the UpdateIndexingConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -12966,6 +14211,7 @@ func (c *IoT) UpdateIndexingConfigurationRequest(input *UpdateIndexingConfigurat output = &UpdateIndexingConfigurationOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -13017,12 +14263,98 @@ func (c *IoT) UpdateIndexingConfigurationWithContext(ctx aws.Context, input *Upd return out, req.Send() } +const opUpdateJob = "UpdateJob" + +// UpdateJobRequest generates a "aws/request.Request" representing the +// client's request for the UpdateJob 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 UpdateJob for more information on using the UpdateJob +// 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 UpdateJobRequest method. +// req, resp := client.UpdateJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +func (c *IoT) UpdateJobRequest(input *UpdateJobInput) (req *request.Request, output *UpdateJobOutput) { + op := &request.Operation{ + Name: opUpdateJob, + HTTPMethod: "PATCH", + HTTPPath: "/jobs/{jobId}", + } + + if input == nil { + input = &UpdateJobInput{} + } + + output = &UpdateJobOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateJob API operation for AWS IoT. +// +// Updates supported fields of the specified job. +// +// 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 IoT's +// API operation UpdateJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request is not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource does not exist. +// +// * ErrCodeThrottlingException "ThrottlingException" +// The rate exceeds the limit. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service is temporarily unavailable. +// +func (c *IoT) UpdateJob(input *UpdateJobInput) (*UpdateJobOutput, error) { + req, out := c.UpdateJobRequest(input) + return out, req.Send() +} + +// UpdateJobWithContext is the same as UpdateJob with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateJob 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 *IoT) UpdateJobWithContext(ctx aws.Context, input *UpdateJobInput, opts ...request.Option) (*UpdateJobOutput, error) { + req, out := c.UpdateJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateRoleAlias = "UpdateRoleAlias" // UpdateRoleAliasRequest generates a "aws/request.Request" representing the // client's request for the UpdateRoleAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -13113,7 +14445,7 @@ const opUpdateScheduledAudit = "UpdateScheduledAudit" // UpdateScheduledAuditRequest generates a "aws/request.Request" representing the // client's request for the UpdateScheduledAudit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -13199,7 +14531,7 @@ const opUpdateSecurityProfile = "UpdateSecurityProfile" // UpdateSecurityProfileRequest generates a "aws/request.Request" representing the // client's request for the UpdateSecurityProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -13288,7 +14620,7 @@ const opUpdateStream = "UpdateStream" // UpdateStreamRequest generates a "aws/request.Request" representing the // client's request for the UpdateStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -13379,7 +14711,7 @@ const opUpdateThing = "UpdateThing" // UpdateThingRequest generates a "aws/request.Request" representing the // client's request for the UpdateThing operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -13411,6 +14743,7 @@ func (c *IoT) UpdateThingRequest(input *UpdateThingInput) (req *request.Request, output = &UpdateThingOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -13474,7 +14807,7 @@ const opUpdateThingGroup = "UpdateThingGroup" // UpdateThingGroupRequest generates a "aws/request.Request" representing the // client's request for the UpdateThingGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -13563,7 +14896,7 @@ const opUpdateThingGroupsForThing = "UpdateThingGroupsForThing" // UpdateThingGroupsForThingRequest generates a "aws/request.Request" representing the // client's request for the UpdateThingGroupsForThing operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -13595,6 +14928,7 @@ func (c *IoT) UpdateThingGroupsForThingRequest(input *UpdateThingGroupsForThingI output = &UpdateThingGroupsForThingOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -13648,7 +14982,7 @@ const opValidateSecurityProfileBehaviors = "ValidateSecurityProfileBehaviors" // ValidateSecurityProfileBehaviorsRequest generates a "aws/request.Request" representing the // client's request for the ValidateSecurityProfileBehaviors operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -13725,6 +15059,146 @@ func (c *IoT) ValidateSecurityProfileBehaviorsWithContext(ctx aws.Context, input return out, req.Send() } +// Details of abort criteria to abort the job. +type AbortConfig struct { + _ struct{} `type:"structure"` + + // The list of abort criteria to define rules to abort the job. + // + // CriteriaList is a required field + CriteriaList []*AbortCriteria `locationName:"criteriaList" min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s AbortConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AbortConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AbortConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AbortConfig"} + if s.CriteriaList == nil { + invalidParams.Add(request.NewErrParamRequired("CriteriaList")) + } + if s.CriteriaList != nil && len(s.CriteriaList) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CriteriaList", 1)) + } + if s.CriteriaList != nil { + for i, v := range s.CriteriaList { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CriteriaList", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCriteriaList sets the CriteriaList field's value. +func (s *AbortConfig) SetCriteriaList(v []*AbortCriteria) *AbortConfig { + s.CriteriaList = v + return s +} + +// Details of abort criteria to define rules to abort the job. +type AbortCriteria struct { + _ struct{} `type:"structure"` + + // The type of abort action to initiate a job abort. + // + // Action is a required field + Action *string `locationName:"action" type:"string" required:"true" enum:"AbortAction"` + + // The type of job execution failure to define a rule to initiate a job abort. + // + // FailureType is a required field + FailureType *string `locationName:"failureType" type:"string" required:"true" enum:"JobExecutionFailureType"` + + // Minimum number of executed things before evaluating an abort rule. + // + // MinNumberOfExecutedThings is a required field + MinNumberOfExecutedThings *int64 `locationName:"minNumberOfExecutedThings" min:"1" type:"integer" required:"true"` + + // The threshold as a percentage of the total number of executed things that + // will initiate a job abort. + // + // AWS IoT supports up to two digits after the decimal (for example, 10.9 and + // 10.99, but not 10.999). + // + // ThresholdPercentage is a required field + ThresholdPercentage *float64 `locationName:"thresholdPercentage" type:"double" required:"true"` +} + +// String returns the string representation +func (s AbortCriteria) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AbortCriteria) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AbortCriteria) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AbortCriteria"} + if s.Action == nil { + invalidParams.Add(request.NewErrParamRequired("Action")) + } + if s.FailureType == nil { + invalidParams.Add(request.NewErrParamRequired("FailureType")) + } + if s.MinNumberOfExecutedThings == nil { + invalidParams.Add(request.NewErrParamRequired("MinNumberOfExecutedThings")) + } + if s.MinNumberOfExecutedThings != nil && *s.MinNumberOfExecutedThings < 1 { + invalidParams.Add(request.NewErrParamMinValue("MinNumberOfExecutedThings", 1)) + } + if s.ThresholdPercentage == nil { + invalidParams.Add(request.NewErrParamRequired("ThresholdPercentage")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAction sets the Action field's value. +func (s *AbortCriteria) SetAction(v string) *AbortCriteria { + s.Action = &v + return s +} + +// SetFailureType sets the FailureType field's value. +func (s *AbortCriteria) SetFailureType(v string) *AbortCriteria { + s.FailureType = &v + return s +} + +// SetMinNumberOfExecutedThings sets the MinNumberOfExecutedThings field's value. +func (s *AbortCriteria) SetMinNumberOfExecutedThings(v int64) *AbortCriteria { + s.MinNumberOfExecutedThings = &v + return s +} + +// SetThresholdPercentage sets the ThresholdPercentage field's value. +func (s *AbortCriteria) SetThresholdPercentage(v float64) *AbortCriteria { + s.ThresholdPercentage = &v + return s +} + // The input for the AcceptCertificateTransfer operation. type AcceptCertificateTransferInput struct { _ struct{} `type:"structure"` @@ -13818,6 +15292,9 @@ type Action struct { // Sends message data to an AWS IoT Analytics channel. IotAnalytics *IotAnalyticsAction `locationName:"iotAnalytics" type:"structure"` + // Sends an input to an AWS IoT Events detector. + IotEvents *IotEventsAction `locationName:"iotEvents" type:"structure"` + // Write data to an Amazon Kinesis stream. Kinesis *KinesisAction `locationName:"kinesis" type:"structure"` @@ -13886,6 +15363,11 @@ func (s *Action) Validate() error { invalidParams.AddNested("Firehose", err.(request.ErrInvalidParams)) } } + if s.IotEvents != nil { + if err := s.IotEvents.Validate(); err != nil { + invalidParams.AddNested("IotEvents", err.(request.ErrInvalidParams)) + } + } if s.Kinesis != nil { if err := s.Kinesis.Validate(); err != nil { invalidParams.AddNested("Kinesis", err.(request.ErrInvalidParams)) @@ -13975,6 +15457,12 @@ func (s *Action) SetIotAnalytics(v *IotAnalyticsAction) *Action { return s } +// SetIotEvents sets the IotEvents field's value. +func (s *Action) SetIotEvents(v *IotEventsAction) *Action { + s.IotEvents = v + return s +} + // SetKinesis sets the Kinesis field's value. func (s *Action) SetKinesis(v *KinesisAction) *Action { s.Kinesis = v @@ -14101,9 +15589,95 @@ func (s *ActiveViolation) SetViolationStartTime(v time.Time) *ActiveViolation { return s } +type AddThingToBillingGroupInput struct { + _ struct{} `type:"structure"` + + // The ARN of the billing group. + BillingGroupArn *string `locationName:"billingGroupArn" type:"string"` + + // The name of the billing group. + BillingGroupName *string `locationName:"billingGroupName" min:"1" type:"string"` + + // The ARN of the thing to be added to the billing group. + ThingArn *string `locationName:"thingArn" type:"string"` + + // The name of the thing to be added to the billing group. + ThingName *string `locationName:"thingName" min:"1" type:"string"` +} + +// String returns the string representation +func (s AddThingToBillingGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddThingToBillingGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddThingToBillingGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddThingToBillingGroupInput"} + if s.BillingGroupName != nil && len(*s.BillingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BillingGroupName", 1)) + } + if s.ThingName != nil && len(*s.ThingName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ThingName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBillingGroupArn sets the BillingGroupArn field's value. +func (s *AddThingToBillingGroupInput) SetBillingGroupArn(v string) *AddThingToBillingGroupInput { + s.BillingGroupArn = &v + return s +} + +// SetBillingGroupName sets the BillingGroupName field's value. +func (s *AddThingToBillingGroupInput) SetBillingGroupName(v string) *AddThingToBillingGroupInput { + s.BillingGroupName = &v + return s +} + +// SetThingArn sets the ThingArn field's value. +func (s *AddThingToBillingGroupInput) SetThingArn(v string) *AddThingToBillingGroupInput { + s.ThingArn = &v + return s +} + +// SetThingName sets the ThingName field's value. +func (s *AddThingToBillingGroupInput) SetThingName(v string) *AddThingToBillingGroupInput { + s.ThingName = &v + return s +} + +type AddThingToBillingGroupOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AddThingToBillingGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddThingToBillingGroupOutput) GoString() string { + return s.String() +} + type AddThingToThingGroupInput struct { _ struct{} `type:"structure"` + // Override dynamic thing groups with static thing groups when 10-group limit + // is reached. If a thing belongs to 10 thing groups, and one or more of those + // groups are dynamic thing groups, adding a thing to a static group removes + // the thing from the last dynamic group. + OverrideDynamicGroups *bool `locationName:"overrideDynamicGroups" type:"boolean"` + // The ARN of the thing to add to a group. ThingArn *string `locationName:"thingArn" type:"string"` @@ -14143,6 +15717,12 @@ func (s *AddThingToThingGroupInput) Validate() error { return nil } +// SetOverrideDynamicGroups sets the OverrideDynamicGroups field's value. +func (s *AddThingToThingGroupInput) SetOverrideDynamicGroups(v bool) *AddThingToThingGroupInput { + s.OverrideDynamicGroups = &v + return s +} + // SetThingArn sets the ThingArn field's value. func (s *AddThingToThingGroupInput) SetThingArn(v string) *AddThingToThingGroupInput { s.ThingArn = &v @@ -14379,7 +15959,8 @@ type AttachPolicyInput struct { // PolicyName is a required field PolicyName *string `location:"uri" locationName:"policyName" min:"1" type:"string" required:"true"` - // The identity to which the policy is attached. + // The identity (https://docs.aws.amazon.com/iot/latest/developerguide/iot-security-identity.html) + // to which the policy is attached. // // Target is a required field Target *string `locationName:"target" type:"string" required:"true"` @@ -15340,6 +16921,54 @@ func (s *BehaviorCriteria) SetValue(v *MetricValue) *BehaviorCriteria { return s } +// Additional information about the billing group. +type BillingGroupMetadata struct { + _ struct{} `type:"structure"` + + // The date the billing group was created. + CreationDate *time.Time `locationName:"creationDate" type:"timestamp"` +} + +// String returns the string representation +func (s BillingGroupMetadata) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BillingGroupMetadata) GoString() string { + return s.String() +} + +// SetCreationDate sets the CreationDate field's value. +func (s *BillingGroupMetadata) SetCreationDate(v time.Time) *BillingGroupMetadata { + s.CreationDate = &v + return s +} + +// The properties of a billing group. +type BillingGroupProperties struct { + _ struct{} `type:"structure"` + + // The description of the billing group. + BillingGroupDescription *string `locationName:"billingGroupDescription" type:"string"` +} + +// String returns the string representation +func (s BillingGroupProperties) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BillingGroupProperties) GoString() string { + return s.String() +} + +// SetBillingGroupDescription sets the BillingGroupDescription field's value. +func (s *BillingGroupProperties) SetBillingGroupDescription(v string) *BillingGroupProperties { + s.BillingGroupDescription = &v + return s +} + // A CA certificate. type CACertificate struct { _ struct{} `type:"structure"` @@ -15756,6 +17385,9 @@ type CancelJobInput struct { // // JobId is a required field JobId *string `location:"uri" locationName:"jobId" min:"1" type:"string" required:"true"` + + // (Optional)A reason code string that explains why the job was canceled. + ReasonCode *string `locationName:"reasonCode" type:"string"` } // String returns the string representation @@ -15802,6 +17434,12 @@ func (s *CancelJobInput) SetJobId(v string) *CancelJobInput { return s } +// SetReasonCode sets the ReasonCode field's value. +func (s *CancelJobInput) SetReasonCode(v string) *CancelJobInput { + s.ReasonCode = &v + return s +} + type CancelJobOutput struct { _ struct{} `type:"structure"` @@ -16544,6 +18182,106 @@ func (s *CreateAuthorizerOutput) SetAuthorizerName(v string) *CreateAuthorizerOu return s } +type CreateBillingGroupInput struct { + _ struct{} `type:"structure"` + + // The name you wish to give to the billing group. + // + // BillingGroupName is a required field + BillingGroupName *string `location:"uri" locationName:"billingGroupName" min:"1" type:"string" required:"true"` + + // The properties of the billing group. + BillingGroupProperties *BillingGroupProperties `locationName:"billingGroupProperties" type:"structure"` + + // Metadata which can be used to manage the billing group. + Tags []*Tag `locationName:"tags" type:"list"` +} + +// String returns the string representation +func (s CreateBillingGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateBillingGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateBillingGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateBillingGroupInput"} + if s.BillingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("BillingGroupName")) + } + if s.BillingGroupName != nil && len(*s.BillingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BillingGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBillingGroupName sets the BillingGroupName field's value. +func (s *CreateBillingGroupInput) SetBillingGroupName(v string) *CreateBillingGroupInput { + s.BillingGroupName = &v + return s +} + +// SetBillingGroupProperties sets the BillingGroupProperties field's value. +func (s *CreateBillingGroupInput) SetBillingGroupProperties(v *BillingGroupProperties) *CreateBillingGroupInput { + s.BillingGroupProperties = v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateBillingGroupInput) SetTags(v []*Tag) *CreateBillingGroupInput { + s.Tags = v + return s +} + +type CreateBillingGroupOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the billing group. + BillingGroupArn *string `locationName:"billingGroupArn" type:"string"` + + // The ID of the billing group. + BillingGroupId *string `locationName:"billingGroupId" min:"1" type:"string"` + + // The name you gave to the billing group. + BillingGroupName *string `locationName:"billingGroupName" min:"1" type:"string"` +} + +// String returns the string representation +func (s CreateBillingGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateBillingGroupOutput) GoString() string { + return s.String() +} + +// SetBillingGroupArn sets the BillingGroupArn field's value. +func (s *CreateBillingGroupOutput) SetBillingGroupArn(v string) *CreateBillingGroupOutput { + s.BillingGroupArn = &v + return s +} + +// SetBillingGroupId sets the BillingGroupId field's value. +func (s *CreateBillingGroupOutput) SetBillingGroupId(v string) *CreateBillingGroupOutput { + s.BillingGroupId = &v + return s +} + +// SetBillingGroupName sets the BillingGroupName field's value. +func (s *CreateBillingGroupOutput) SetBillingGroupName(v string) *CreateBillingGroupOutput { + s.BillingGroupName = &v + return s +} + // The input for the CreateCertificateFromCsr operation. type CreateCertificateFromCsrInput struct { _ struct{} `type:"structure"` @@ -16639,13 +18377,199 @@ func (s *CreateCertificateFromCsrOutput) SetCertificatePem(v string) *CreateCert return s } +type CreateDynamicThingGroupInput struct { + _ struct{} `type:"structure"` + + // The dynamic thing group index name. + // + // Currently one index is supported: "AWS_Things". + IndexName *string `locationName:"indexName" min:"1" type:"string"` + + // The dynamic thing group search query string. + // + // See Query Syntax (http://docs.aws.amazon.com/iot/latest/developerguide/query-syntax.html) + // for information about query string syntax. + // + // QueryString is a required field + QueryString *string `locationName:"queryString" min:"1" type:"string" required:"true"` + + // The dynamic thing group query version. + // + // Currently one query version is supported: "2017-09-30". If not specified, + // the query version defaults to this value. + QueryVersion *string `locationName:"queryVersion" type:"string"` + + // Metadata which can be used to manage the dynamic thing group. + Tags []*Tag `locationName:"tags" type:"list"` + + // The dynamic thing group name to create. + // + // ThingGroupName is a required field + ThingGroupName *string `location:"uri" locationName:"thingGroupName" min:"1" type:"string" required:"true"` + + // The dynamic thing group properties. + ThingGroupProperties *ThingGroupProperties `locationName:"thingGroupProperties" type:"structure"` +} + +// String returns the string representation +func (s CreateDynamicThingGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDynamicThingGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDynamicThingGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDynamicThingGroupInput"} + if s.IndexName != nil && len(*s.IndexName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IndexName", 1)) + } + if s.QueryString == nil { + invalidParams.Add(request.NewErrParamRequired("QueryString")) + } + if s.QueryString != nil && len(*s.QueryString) < 1 { + invalidParams.Add(request.NewErrParamMinLen("QueryString", 1)) + } + if s.ThingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("ThingGroupName")) + } + if s.ThingGroupName != nil && len(*s.ThingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ThingGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetIndexName sets the IndexName field's value. +func (s *CreateDynamicThingGroupInput) SetIndexName(v string) *CreateDynamicThingGroupInput { + s.IndexName = &v + return s +} + +// SetQueryString sets the QueryString field's value. +func (s *CreateDynamicThingGroupInput) SetQueryString(v string) *CreateDynamicThingGroupInput { + s.QueryString = &v + return s +} + +// SetQueryVersion sets the QueryVersion field's value. +func (s *CreateDynamicThingGroupInput) SetQueryVersion(v string) *CreateDynamicThingGroupInput { + s.QueryVersion = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateDynamicThingGroupInput) SetTags(v []*Tag) *CreateDynamicThingGroupInput { + s.Tags = v + return s +} + +// SetThingGroupName sets the ThingGroupName field's value. +func (s *CreateDynamicThingGroupInput) SetThingGroupName(v string) *CreateDynamicThingGroupInput { + s.ThingGroupName = &v + return s +} + +// SetThingGroupProperties sets the ThingGroupProperties field's value. +func (s *CreateDynamicThingGroupInput) SetThingGroupProperties(v *ThingGroupProperties) *CreateDynamicThingGroupInput { + s.ThingGroupProperties = v + return s +} + +type CreateDynamicThingGroupOutput struct { + _ struct{} `type:"structure"` + + // The dynamic thing group index name. + IndexName *string `locationName:"indexName" min:"1" type:"string"` + + // The dynamic thing group search query string. + QueryString *string `locationName:"queryString" min:"1" type:"string"` + + // The dynamic thing group query version. + QueryVersion *string `locationName:"queryVersion" type:"string"` + + // The dynamic thing group ARN. + ThingGroupArn *string `locationName:"thingGroupArn" type:"string"` + + // The dynamic thing group ID. + ThingGroupId *string `locationName:"thingGroupId" min:"1" type:"string"` + + // The dynamic thing group name. + ThingGroupName *string `locationName:"thingGroupName" min:"1" type:"string"` +} + +// String returns the string representation +func (s CreateDynamicThingGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDynamicThingGroupOutput) GoString() string { + return s.String() +} + +// SetIndexName sets the IndexName field's value. +func (s *CreateDynamicThingGroupOutput) SetIndexName(v string) *CreateDynamicThingGroupOutput { + s.IndexName = &v + return s +} + +// SetQueryString sets the QueryString field's value. +func (s *CreateDynamicThingGroupOutput) SetQueryString(v string) *CreateDynamicThingGroupOutput { + s.QueryString = &v + return s +} + +// SetQueryVersion sets the QueryVersion field's value. +func (s *CreateDynamicThingGroupOutput) SetQueryVersion(v string) *CreateDynamicThingGroupOutput { + s.QueryVersion = &v + return s +} + +// SetThingGroupArn sets the ThingGroupArn field's value. +func (s *CreateDynamicThingGroupOutput) SetThingGroupArn(v string) *CreateDynamicThingGroupOutput { + s.ThingGroupArn = &v + return s +} + +// SetThingGroupId sets the ThingGroupId field's value. +func (s *CreateDynamicThingGroupOutput) SetThingGroupId(v string) *CreateDynamicThingGroupOutput { + s.ThingGroupId = &v + return s +} + +// SetThingGroupName sets the ThingGroupName field's value. +func (s *CreateDynamicThingGroupOutput) SetThingGroupName(v string) *CreateDynamicThingGroupOutput { + s.ThingGroupName = &v + return s +} + type CreateJobInput struct { _ struct{} `type:"structure"` + // Allows you to create criteria to abort a job. + AbortConfig *AbortConfig `locationName:"abortConfig" type:"structure"` + // A short text description of the job. Description *string `locationName:"description" type:"string"` // The job document. + // + // If the job document resides in an S3 bucket, you must use a placeholder link + // when specifying the document. + // + // The placeholder link is of the following form: + // + // ${aws:iot:s3-presigned-url:https://s3.amazonaws.com/bucket/key} + // + // where bucket is your bucket name and key is the object in the bucket to which + // you are linking. Document *string `locationName:"document" type:"string"` // An S3 link to the job document. @@ -16663,6 +18587,9 @@ type CreateJobInput struct { // Configuration information for pre-signed S3 URLs. PresignedUrlConfig *PresignedUrlConfig `locationName:"presignedUrlConfig" type:"structure"` + // Metadata which can be used to manage the job. + Tags []*Tag `locationName:"tags" type:"list"` + // Specifies whether the job will continue to run (CONTINUOUS), or will be complete // after all those things specified as targets have completed the job (SNAPSHOT). // If continuous, the job may also be run on a thing when a change is detected @@ -16675,6 +18602,12 @@ type CreateJobInput struct { // // Targets is a required field Targets []*string `locationName:"targets" min:"1" type:"list" required:"true"` + + // Specifies the amount of time each device has to finish its execution of the + // job. The timer is started when the job execution status is set to IN_PROGRESS. + // If the job execution status is not set to another terminal state before the + // time expires, it will be automatically set to TIMED_OUT. + TimeoutConfig *TimeoutConfig `locationName:"timeoutConfig" type:"structure"` } // String returns the string representation @@ -16705,6 +18638,11 @@ func (s *CreateJobInput) Validate() error { if s.Targets != nil && len(s.Targets) < 1 { invalidParams.Add(request.NewErrParamMinLen("Targets", 1)) } + if s.AbortConfig != nil { + if err := s.AbortConfig.Validate(); err != nil { + invalidParams.AddNested("AbortConfig", err.(request.ErrInvalidParams)) + } + } if s.JobExecutionsRolloutConfig != nil { if err := s.JobExecutionsRolloutConfig.Validate(); err != nil { invalidParams.AddNested("JobExecutionsRolloutConfig", err.(request.ErrInvalidParams)) @@ -16722,6 +18660,12 @@ func (s *CreateJobInput) Validate() error { return nil } +// SetAbortConfig sets the AbortConfig field's value. +func (s *CreateJobInput) SetAbortConfig(v *AbortConfig) *CreateJobInput { + s.AbortConfig = v + return s +} + // SetDescription sets the Description field's value. func (s *CreateJobInput) SetDescription(v string) *CreateJobInput { s.Description = &v @@ -16758,6 +18702,12 @@ func (s *CreateJobInput) SetPresignedUrlConfig(v *PresignedUrlConfig) *CreateJob return s } +// SetTags sets the Tags field's value. +func (s *CreateJobInput) SetTags(v []*Tag) *CreateJobInput { + s.Tags = v + return s +} + // SetTargetSelection sets the TargetSelection field's value. func (s *CreateJobInput) SetTargetSelection(v string) *CreateJobInput { s.TargetSelection = &v @@ -16770,6 +18720,12 @@ func (s *CreateJobInput) SetTargets(v []*string) *CreateJobInput { return s } +// SetTimeoutConfig sets the TimeoutConfig field's value. +func (s *CreateJobInput) SetTimeoutConfig(v *TimeoutConfig) *CreateJobInput { + s.TimeoutConfig = v + return s +} + type CreateJobOutput struct { _ struct{} `type:"structure"` @@ -17564,6 +19520,9 @@ type CreateSecurityProfileInput struct { // // SecurityProfileName is a required field SecurityProfileName *string `location:"uri" locationName:"securityProfileName" min:"1" type:"string" required:"true"` + + // Metadata which can be used to manage the security profile. + Tags []*Tag `locationName:"tags" type:"list"` } // String returns the string representation @@ -17639,6 +19598,12 @@ func (s *CreateSecurityProfileInput) SetSecurityProfileName(v string) *CreateSec return s } +// SetTags sets the Tags field's value. +func (s *CreateSecurityProfileInput) SetTags(v []*Tag) *CreateSecurityProfileInput { + s.Tags = v + return s +} + type CreateSecurityProfileOutput struct { _ struct{} `type:"structure"` @@ -17822,6 +19787,9 @@ type CreateThingGroupInput struct { // The name of the parent thing group. ParentGroupName *string `locationName:"parentGroupName" min:"1" type:"string"` + // Metadata which can be used to manage the thing group. + Tags []*Tag `locationName:"tags" type:"list"` + // The thing group name to create. // // ThingGroupName is a required field @@ -17866,6 +19834,12 @@ func (s *CreateThingGroupInput) SetParentGroupName(v string) *CreateThingGroupIn return s } +// SetTags sets the Tags field's value. +func (s *CreateThingGroupInput) SetTags(v []*Tag) *CreateThingGroupInput { + s.Tags = v + return s +} + // SetThingGroupName sets the ThingGroupName field's value. func (s *CreateThingGroupInput) SetThingGroupName(v string) *CreateThingGroupInput { s.ThingGroupName = &v @@ -17929,6 +19903,9 @@ type CreateThingInput struct { // {\"attributes\":{\"string1\":\"string2\"}} AttributePayload *AttributePayload `locationName:"attributePayload" type:"structure"` + // The name of the billing group the thing will be added to. + BillingGroupName *string `locationName:"billingGroupName" min:"1" type:"string"` + // The name of the thing to create. // // ThingName is a required field @@ -17951,6 +19928,9 @@ func (s CreateThingInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateThingInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateThingInput"} + if s.BillingGroupName != nil && len(*s.BillingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BillingGroupName", 1)) + } if s.ThingName == nil { invalidParams.Add(request.NewErrParamRequired("ThingName")) } @@ -17973,6 +19953,12 @@ func (s *CreateThingInput) SetAttributePayload(v *AttributePayload) *CreateThing return s } +// SetBillingGroupName sets the BillingGroupName field's value. +func (s *CreateThingInput) SetBillingGroupName(v string) *CreateThingInput { + s.BillingGroupName = &v + return s +} + // SetThingName sets the ThingName field's value. func (s *CreateThingInput) SetThingName(v string) *CreateThingInput { s.ThingName = &v @@ -18031,6 +20017,9 @@ func (s *CreateThingOutput) SetThingName(v string) *CreateThingOutput { type CreateThingTypeInput struct { _ struct{} `type:"structure"` + // Metadata which can be used to manage the thing type. + Tags []*Tag `locationName:"tags" type:"list"` + // The name of the thing type. // // ThingTypeName is a required field @@ -18068,6 +20057,12 @@ func (s *CreateThingTypeInput) Validate() error { return nil } +// SetTags sets the Tags field's value. +func (s *CreateThingTypeInput) SetTags(v []*Tag) *CreateThingTypeInput { + s.Tags = v + return s +} + // SetThingTypeName sets the ThingTypeName field's value. func (s *CreateThingTypeInput) SetThingTypeName(v string) *CreateThingTypeInput { s.ThingTypeName = &v @@ -18131,6 +20126,15 @@ type CreateTopicRuleInput struct { // RuleName is a required field RuleName *string `location:"uri" locationName:"ruleName" min:"1" type:"string" required:"true"` + // Metadata which can be used to manage the topic rule. + // + // For URI Request parameters use format: ...key1=value1&key2=value2... + // + // For the CLI command-line parameter use format: --tags "key1=value1&key2=value2..." + // + // For the cli-input-json file use format: "tags": "key1=value1&key2=value2..." + Tags *string `location:"header" locationName:"x-amz-tagging" type:"string"` + // The rule payload. // // TopicRulePayload is a required field @@ -18177,6 +20181,12 @@ func (s *CreateTopicRuleInput) SetRuleName(v string) *CreateTopicRuleInput { return s } +// SetTags sets the Tags field's value. +func (s *CreateTopicRuleInput) SetTags(v string) *CreateTopicRuleInput { + s.Tags = &v + return s +} + // SetTopicRulePayload sets the TopicRulePayload field's value. func (s *CreateTopicRuleInput) SetTopicRulePayload(v *TopicRulePayload) *CreateTopicRuleInput { s.TopicRulePayload = v @@ -18340,6 +20350,72 @@ func (s DeleteAuthorizerOutput) GoString() string { return s.String() } +type DeleteBillingGroupInput struct { + _ struct{} `type:"structure"` + + // The name of the billing group. + // + // BillingGroupName is a required field + BillingGroupName *string `location:"uri" locationName:"billingGroupName" min:"1" type:"string" required:"true"` + + // The expected version of the billing group. If the version of the billing + // group does not match the expected version specified in the request, the DeleteBillingGroup + // request is rejected with a VersionConflictException. + ExpectedVersion *int64 `location:"querystring" locationName:"expectedVersion" type:"long"` +} + +// String returns the string representation +func (s DeleteBillingGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBillingGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteBillingGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteBillingGroupInput"} + if s.BillingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("BillingGroupName")) + } + if s.BillingGroupName != nil && len(*s.BillingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BillingGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBillingGroupName sets the BillingGroupName field's value. +func (s *DeleteBillingGroupInput) SetBillingGroupName(v string) *DeleteBillingGroupInput { + s.BillingGroupName = &v + return s +} + +// SetExpectedVersion sets the ExpectedVersion field's value. +func (s *DeleteBillingGroupInput) SetExpectedVersion(v int64) *DeleteBillingGroupInput { + s.ExpectedVersion = &v + return s +} + +type DeleteBillingGroupOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteBillingGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBillingGroupOutput) GoString() string { + return s.String() +} + // Input for the DeleteCACertificate operation. type DeleteCACertificateInput struct { _ struct{} `type:"structure"` @@ -18464,6 +20540,70 @@ func (s DeleteCertificateOutput) GoString() string { return s.String() } +type DeleteDynamicThingGroupInput struct { + _ struct{} `type:"structure"` + + // The expected version of the dynamic thing group to delete. + ExpectedVersion *int64 `location:"querystring" locationName:"expectedVersion" type:"long"` + + // The name of the dynamic thing group to delete. + // + // ThingGroupName is a required field + ThingGroupName *string `location:"uri" locationName:"thingGroupName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDynamicThingGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDynamicThingGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDynamicThingGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDynamicThingGroupInput"} + if s.ThingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("ThingGroupName")) + } + if s.ThingGroupName != nil && len(*s.ThingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ThingGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetExpectedVersion sets the ExpectedVersion field's value. +func (s *DeleteDynamicThingGroupInput) SetExpectedVersion(v int64) *DeleteDynamicThingGroupInput { + s.ExpectedVersion = &v + return s +} + +// SetThingGroupName sets the ThingGroupName field's value. +func (s *DeleteDynamicThingGroupInput) SetThingGroupName(v string) *DeleteDynamicThingGroupInput { + s.ThingGroupName = &v + return s +} + +type DeleteDynamicThingGroupOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteDynamicThingGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDynamicThingGroupOutput) GoString() string { + return s.String() +} + type DeleteJobExecutionInput struct { _ struct{} `type:"structure"` @@ -18813,6 +20953,9 @@ func (s *DeletePolicyVersionInput) Validate() error { if s.PolicyVersionId == nil { invalidParams.Add(request.NewErrParamRequired("PolicyVersionId")) } + if s.PolicyVersionId != nil && len(*s.PolicyVersionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyVersionId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -19754,6 +21897,115 @@ func (s *DescribeAuthorizerOutput) SetAuthorizerDescription(v *AuthorizerDescrip return s } +type DescribeBillingGroupInput struct { + _ struct{} `type:"structure"` + + // The name of the billing group. + // + // BillingGroupName is a required field + BillingGroupName *string `location:"uri" locationName:"billingGroupName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeBillingGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeBillingGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeBillingGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeBillingGroupInput"} + if s.BillingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("BillingGroupName")) + } + if s.BillingGroupName != nil && len(*s.BillingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BillingGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBillingGroupName sets the BillingGroupName field's value. +func (s *DescribeBillingGroupInput) SetBillingGroupName(v string) *DescribeBillingGroupInput { + s.BillingGroupName = &v + return s +} + +type DescribeBillingGroupOutput struct { + _ struct{} `type:"structure"` + + // The ARN of the billing group. + BillingGroupArn *string `locationName:"billingGroupArn" type:"string"` + + // The ID of the billing group. + BillingGroupId *string `locationName:"billingGroupId" min:"1" type:"string"` + + // Additional information about the billing group. + BillingGroupMetadata *BillingGroupMetadata `locationName:"billingGroupMetadata" type:"structure"` + + // The name of the billing group. + BillingGroupName *string `locationName:"billingGroupName" min:"1" type:"string"` + + // The properties of the billing group. + BillingGroupProperties *BillingGroupProperties `locationName:"billingGroupProperties" type:"structure"` + + // The version of the billing group. + Version *int64 `locationName:"version" type:"long"` +} + +// String returns the string representation +func (s DescribeBillingGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeBillingGroupOutput) GoString() string { + return s.String() +} + +// SetBillingGroupArn sets the BillingGroupArn field's value. +func (s *DescribeBillingGroupOutput) SetBillingGroupArn(v string) *DescribeBillingGroupOutput { + s.BillingGroupArn = &v + return s +} + +// SetBillingGroupId sets the BillingGroupId field's value. +func (s *DescribeBillingGroupOutput) SetBillingGroupId(v string) *DescribeBillingGroupOutput { + s.BillingGroupId = &v + return s +} + +// SetBillingGroupMetadata sets the BillingGroupMetadata field's value. +func (s *DescribeBillingGroupOutput) SetBillingGroupMetadata(v *BillingGroupMetadata) *DescribeBillingGroupOutput { + s.BillingGroupMetadata = v + return s +} + +// SetBillingGroupName sets the BillingGroupName field's value. +func (s *DescribeBillingGroupOutput) SetBillingGroupName(v string) *DescribeBillingGroupOutput { + s.BillingGroupName = &v + return s +} + +// SetBillingGroupProperties sets the BillingGroupProperties field's value. +func (s *DescribeBillingGroupOutput) SetBillingGroupProperties(v *BillingGroupProperties) *DescribeBillingGroupOutput { + s.BillingGroupProperties = v + return s +} + +// SetVersion sets the Version field's value. +func (s *DescribeBillingGroupOutput) SetVersion(v int64) *DescribeBillingGroupOutput { + s.Version = &v + return s +} + // The input for the DescribeCACertificate operation. type DescribeCACertificateInput struct { _ struct{} `type:"structure"` @@ -19937,7 +22189,16 @@ func (s *DescribeDefaultAuthorizerOutput) SetAuthorizerDescription(v *Authorizer type DescribeEndpointInput struct { _ struct{} `type:"structure"` - // The endpoint type (such as iot:Data, iot:CredentialProvider and iot:Jobs). + // The endpoint type. Valid endpoint types include: + // + // * iot:Data - Returns a VeriSign signed data endpoint. + // + // * iot:Data-ATS - Returns an ATS signed data endpoint. + // + // * iot:CredentialProvider - Returns an AWS IoT credentials provider API + // endpoint. + // + // * iot:Jobs - Returns an AWS IoT device management Jobs API endpoint. EndpointType *string `location:"querystring" locationName:"endpointType" type:"string"` } @@ -20089,9 +22350,16 @@ type DescribeIndexOutput struct { // Contains a value that specifies the type of indexing performed. Valid values // are: // - // REGISTRY – Your thing index will contain only registry data. + // * REGISTRY – Your thing index will contain only registry data. + // + // * REGISTRY_AND_SHADOW - Your thing index will contain registry data and + // shadow data. + // + // * REGISTRY_AND_CONNECTIVITY_STATUS - Your thing index will contain registry + // data and thing connectivity status data. // - // REGISTRY_AND_SHADOW - Your thing index will contain registry and shadow data. + // * REGISTRY_AND_SHADOW_AND_CONNECTIVITY_STATUS - Your thing index will + // contain registry data, shadow data, and thing connectivity status data. Schema *string `locationName:"schema" type:"string"` } @@ -20705,6 +22973,18 @@ func (s *DescribeThingGroupInput) SetThingGroupName(v string) *DescribeThingGrou type DescribeThingGroupOutput struct { _ struct{} `type:"structure"` + // The dynamic thing group index name. + IndexName *string `locationName:"indexName" min:"1" type:"string"` + + // The dynamic thing group search query string. + QueryString *string `locationName:"queryString" min:"1" type:"string"` + + // The dynamic thing group query version. + QueryVersion *string `locationName:"queryVersion" type:"string"` + + // The dynamic thing group status. + Status *string `locationName:"status" type:"string" enum:"DynamicGroupStatus"` + // The thing group ARN. ThingGroupArn *string `locationName:"thingGroupArn" type:"string"` @@ -20734,6 +23014,30 @@ func (s DescribeThingGroupOutput) GoString() string { return s.String() } +// SetIndexName sets the IndexName field's value. +func (s *DescribeThingGroupOutput) SetIndexName(v string) *DescribeThingGroupOutput { + s.IndexName = &v + return s +} + +// SetQueryString sets the QueryString field's value. +func (s *DescribeThingGroupOutput) SetQueryString(v string) *DescribeThingGroupOutput { + s.QueryString = &v + return s +} + +// SetQueryVersion sets the QueryVersion field's value. +func (s *DescribeThingGroupOutput) SetQueryVersion(v string) *DescribeThingGroupOutput { + s.QueryVersion = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *DescribeThingGroupOutput) SetStatus(v string) *DescribeThingGroupOutput { + s.Status = &v + return s +} + // SetThingGroupArn sets the ThingGroupArn field's value. func (s *DescribeThingGroupOutput) SetThingGroupArn(v string) *DescribeThingGroupOutput { s.ThingGroupArn = &v @@ -20819,6 +23123,9 @@ type DescribeThingOutput struct { // The thing attributes. Attributes map[string]*string `locationName:"attributes" type:"map"` + // The name of the billing group the thing belongs to. + BillingGroupName *string `locationName:"billingGroupName" min:"1" type:"string"` + // The default client ID. DefaultClientId *string `locationName:"defaultClientId" type:"string"` @@ -20858,6 +23165,12 @@ func (s *DescribeThingOutput) SetAttributes(v map[string]*string) *DescribeThing return s } +// SetBillingGroupName sets the BillingGroupName field's value. +func (s *DescribeThingOutput) SetBillingGroupName(v string) *DescribeThingOutput { + s.BillingGroupName = &v + return s +} + // SetDefaultClientId sets the DefaultClientId field's value. func (s *DescribeThingOutput) SetDefaultClientId(v string) *DescribeThingOutput { s.DefaultClientId = &v @@ -20919,6 +23232,9 @@ func (s *DescribeThingRegistrationTaskInput) Validate() error { if s.TaskId == nil { invalidParams.Add(request.NewErrParamRequired("TaskId")) } + if s.TaskId != nil && len(*s.TaskId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TaskId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -21706,10 +24022,14 @@ type DynamoDBv2Action struct { // // Each attribute in the message payload will be written to a separate column // in the DynamoDB database. - PutItem *PutItemInput `locationName:"putItem" type:"structure"` + // + // PutItem is a required field + PutItem *PutItemInput `locationName:"putItem" type:"structure" required:"true"` // The ARN of the IAM role that grants access to the DynamoDB table. - RoleArn *string `locationName:"roleArn" type:"string"` + // + // RoleArn is a required field + RoleArn *string `locationName:"roleArn" type:"string" required:"true"` } // String returns the string representation @@ -21725,6 +24045,12 @@ func (s DynamoDBv2Action) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *DynamoDBv2Action) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DynamoDBv2Action"} + if s.PutItem == nil { + invalidParams.Add(request.NewErrParamRequired("PutItem")) + } + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } if s.PutItem != nil { if err := s.PutItem.Validate(); err != nil { invalidParams.AddNested("PutItem", err.(request.ErrInvalidParams)) @@ -21999,6 +24325,89 @@ func (s *ExplicitDeny) SetPolicies(v []*Policy) *ExplicitDeny { return s } +// Allows you to create an exponential rate of rollout for a job. +type ExponentialRolloutRate struct { + _ struct{} `type:"structure"` + + // The minimum number of things that will be notified of a pending job, per + // minute at the start of job rollout. This parameter allows you to define the + // initial rate of rollout. + // + // BaseRatePerMinute is a required field + BaseRatePerMinute *int64 `locationName:"baseRatePerMinute" min:"1" type:"integer" required:"true"` + + // The exponential factor to increase the rate of rollout for a job. + // + // IncrementFactor is a required field + IncrementFactor *float64 `locationName:"incrementFactor" min:"1" type:"double" required:"true"` + + // The criteria to initiate the increase in rate of rollout for a job. + // + // AWS IoT supports up to one digit after the decimal (for example, 1.5, but + // not 1.55). + // + // RateIncreaseCriteria is a required field + RateIncreaseCriteria *RateIncreaseCriteria `locationName:"rateIncreaseCriteria" type:"structure" required:"true"` +} + +// String returns the string representation +func (s ExponentialRolloutRate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExponentialRolloutRate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ExponentialRolloutRate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ExponentialRolloutRate"} + if s.BaseRatePerMinute == nil { + invalidParams.Add(request.NewErrParamRequired("BaseRatePerMinute")) + } + if s.BaseRatePerMinute != nil && *s.BaseRatePerMinute < 1 { + invalidParams.Add(request.NewErrParamMinValue("BaseRatePerMinute", 1)) + } + if s.IncrementFactor == nil { + invalidParams.Add(request.NewErrParamRequired("IncrementFactor")) + } + if s.IncrementFactor != nil && *s.IncrementFactor < 1 { + invalidParams.Add(request.NewErrParamMinValue("IncrementFactor", 1)) + } + if s.RateIncreaseCriteria == nil { + invalidParams.Add(request.NewErrParamRequired("RateIncreaseCriteria")) + } + if s.RateIncreaseCriteria != nil { + if err := s.RateIncreaseCriteria.Validate(); err != nil { + invalidParams.AddNested("RateIncreaseCriteria", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBaseRatePerMinute sets the BaseRatePerMinute field's value. +func (s *ExponentialRolloutRate) SetBaseRatePerMinute(v int64) *ExponentialRolloutRate { + s.BaseRatePerMinute = &v + return s +} + +// SetIncrementFactor sets the IncrementFactor field's value. +func (s *ExponentialRolloutRate) SetIncrementFactor(v float64) *ExponentialRolloutRate { + s.IncrementFactor = &v + return s +} + +// SetRateIncreaseCriteria sets the RateIncreaseCriteria field's value. +func (s *ExponentialRolloutRate) SetRateIncreaseCriteria(v *RateIncreaseCriteria) *ExponentialRolloutRate { + s.RateIncreaseCriteria = v + return s +} + // The location of the OTA update. type FileLocation struct { _ struct{} `type:"structure"` @@ -22572,6 +24981,9 @@ func (s *GetPolicyVersionInput) Validate() error { if s.PolicyVersionId == nil { invalidParams.Add(request.NewErrParamRequired("PolicyVersionId")) } + if s.PolicyVersionId != nil && len(*s.PolicyVersionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyVersionId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -22950,10 +25362,80 @@ func (s *IotAnalyticsAction) SetRoleArn(v string) *IotAnalyticsAction { return s } +// Sends an input to an AWS IoT Events detector. +type IotEventsAction struct { + _ struct{} `type:"structure"` + + // The name of the AWS IoT Events input. + // + // InputName is a required field + InputName *string `locationName:"inputName" min:"1" type:"string" required:"true"` + + // [Optional] Use this to ensure that only one input (message) with a given + // messageId will be processed by an AWS IoT Events detector. + MessageId *string `locationName:"messageId" type:"string"` + + // The ARN of the role that grants AWS IoT permission to send an input to an + // AWS IoT Events detector. ("Action":"iotevents:BatchPutMessage"). + // + // RoleArn is a required field + RoleArn *string `locationName:"roleArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s IotEventsAction) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IotEventsAction) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *IotEventsAction) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "IotEventsAction"} + if s.InputName == nil { + invalidParams.Add(request.NewErrParamRequired("InputName")) + } + if s.InputName != nil && len(*s.InputName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InputName", 1)) + } + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInputName sets the InputName field's value. +func (s *IotEventsAction) SetInputName(v string) *IotEventsAction { + s.InputName = &v + return s +} + +// SetMessageId sets the MessageId field's value. +func (s *IotEventsAction) SetMessageId(v string) *IotEventsAction { + s.MessageId = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *IotEventsAction) SetRoleArn(v string) *IotEventsAction { + s.RoleArn = &v + return s +} + // The Job object contains details about a job. type Job struct { _ struct{} `type:"structure"` + // Configuration for criteria to abort the job. + AbortConfig *AbortConfig `locationName:"abortConfig" type:"structure"` + // If the job was updated, describes the reason for the update. Comment *string `locationName:"comment" type:"string"` @@ -22988,7 +25470,11 @@ type Job struct { // Configuration for pre-signed S3 URLs. PresignedUrlConfig *PresignedUrlConfig `locationName:"presignedUrlConfig" type:"structure"` - // The status of the job, one of IN_PROGRESS, CANCELED, or COMPLETED. + // If the job was updated, provides the reason code for the update. + ReasonCode *string `locationName:"reasonCode" type:"string"` + + // The status of the job, one of IN_PROGRESS, CANCELED, DELETION_IN_PROGRESS + // or COMPLETED. Status *string `locationName:"status" type:"string" enum:"JobStatus"` // Specifies whether the job will continue to run (CONTINUOUS), or will be complete @@ -23001,6 +25487,12 @@ type Job struct { // A list of IoT things and thing groups to which the job should be sent. Targets []*string `locationName:"targets" min:"1" type:"list"` + + // Specifies the amount of time each device has to finish its execution of the + // job. A timer is started when the job execution status is set to IN_PROGRESS. + // If the job execution status is not set to another terminal state before the + // timer expires, it will be automatically set to TIMED_OUT. + TimeoutConfig *TimeoutConfig `locationName:"timeoutConfig" type:"structure"` } // String returns the string representation @@ -23013,6 +25505,12 @@ func (s Job) GoString() string { return s.String() } +// SetAbortConfig sets the AbortConfig field's value. +func (s *Job) SetAbortConfig(v *AbortConfig) *Job { + s.AbortConfig = v + return s +} + // SetComment sets the Comment field's value. func (s *Job) SetComment(v string) *Job { s.Comment = &v @@ -23079,6 +25577,12 @@ func (s *Job) SetPresignedUrlConfig(v *PresignedUrlConfig) *Job { return s } +// SetReasonCode sets the ReasonCode field's value. +func (s *Job) SetReasonCode(v string) *Job { + s.ReasonCode = &v + return s +} + // SetStatus sets the Status field's value. func (s *Job) SetStatus(v string) *Job { s.Status = &v @@ -23097,11 +25601,24 @@ func (s *Job) SetTargets(v []*string) *Job { return s } +// SetTimeoutConfig sets the TimeoutConfig field's value. +func (s *Job) SetTimeoutConfig(v *TimeoutConfig) *Job { + s.TimeoutConfig = v + return s +} + // The job execution object represents the execution of a job on a particular // device. type JobExecution struct { _ struct{} `type:"structure"` + // The estimated number of seconds that remain before the job execution status + // will be changed to TIMED_OUT. The timeout interval can be anywhere between + // 1 minute and 7 days (1 to 10080 minutes). The actual job execution timeout + // can occur up to 60 seconds later than the estimated duration. This value + // will not be included if the job execution has reached a terminal status. + ApproximateSecondsBeforeTimedOut *int64 `locationName:"approximateSecondsBeforeTimedOut" type:"long"` + // A string (consisting of the digits "0" through "9") which identifies this // particular job execution on this particular device. It can be used in commands // which return or update job execution information. @@ -23124,8 +25641,8 @@ type JobExecution struct { // The time, in milliseconds since the epoch, when the job execution started. StartedAt *time.Time `locationName:"startedAt" type:"timestamp"` - // The status of the job execution (IN_PROGRESS, QUEUED, FAILED, SUCCESS, CANCELED, - // or REJECTED). + // The status of the job execution (IN_PROGRESS, QUEUED, FAILED, SUCCEEDED, + // TIMED_OUT, CANCELED, or REJECTED). Status *string `locationName:"status" type:"string" enum:"JobExecutionStatus"` // A collection of name/value pairs that describe the status of the job execution. @@ -23149,6 +25666,12 @@ func (s JobExecution) GoString() string { return s.String() } +// SetApproximateSecondsBeforeTimedOut sets the ApproximateSecondsBeforeTimedOut field's value. +func (s *JobExecution) SetApproximateSecondsBeforeTimedOut(v int64) *JobExecution { + s.ApproximateSecondsBeforeTimedOut = &v + return s +} + // SetExecutionNumber sets the ExecutionNumber field's value. func (s *JobExecution) SetExecutionNumber(v int64) *JobExecution { s.ExecutionNumber = &v @@ -23366,6 +25889,10 @@ func (s *JobExecutionSummaryForThing) SetJobId(v string) *JobExecutionSummaryFor type JobExecutionsRolloutConfig struct { _ struct{} `type:"structure"` + // The rate of increase for a job rollout. This parameter allows you to define + // an exponential rate for a job rollout. + ExponentialRate *ExponentialRolloutRate `locationName:"exponentialRate" type:"structure"` + // The maximum number of things that will be notified of a pending job, per // minute. This parameter allows you to create a staged rollout. MaximumPerMinute *int64 `locationName:"maximumPerMinute" min:"1" type:"integer"` @@ -23387,6 +25914,11 @@ func (s *JobExecutionsRolloutConfig) Validate() error { if s.MaximumPerMinute != nil && *s.MaximumPerMinute < 1 { invalidParams.Add(request.NewErrParamMinValue("MaximumPerMinute", 1)) } + if s.ExponentialRate != nil { + if err := s.ExponentialRate.Validate(); err != nil { + invalidParams.AddNested("ExponentialRate", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -23394,6 +25926,12 @@ func (s *JobExecutionsRolloutConfig) Validate() error { return nil } +// SetExponentialRate sets the ExponentialRate field's value. +func (s *JobExecutionsRolloutConfig) SetExponentialRate(v *ExponentialRolloutRate) *JobExecutionsRolloutConfig { + s.ExponentialRate = v + return s +} + // SetMaximumPerMinute sets the MaximumPerMinute field's value. func (s *JobExecutionsRolloutConfig) SetMaximumPerMinute(v int64) *JobExecutionsRolloutConfig { s.MaximumPerMinute = &v @@ -23427,6 +25965,9 @@ type JobProcessDetails struct { // The number of things which successfully completed the job. NumberOfSucceededThings *int64 `locationName:"numberOfSucceededThings" type:"integer"` + // The number of things whose job execution status is TIMED_OUT. + NumberOfTimedOutThings *int64 `locationName:"numberOfTimedOutThings" type:"integer"` + // The target devices to which the job execution is being rolled out. This value // will be null after the job execution has finished rolling out to all the // target devices. @@ -23485,6 +26026,12 @@ func (s *JobProcessDetails) SetNumberOfSucceededThings(v int64) *JobProcessDetai return s } +// SetNumberOfTimedOutThings sets the NumberOfTimedOutThings field's value. +func (s *JobProcessDetails) SetNumberOfTimedOutThings(v int64) *JobProcessDetails { + s.NumberOfTimedOutThings = &v + return s +} + // SetProcessingTargets sets the ProcessingTargets field's value. func (s *JobProcessDetails) SetProcessingTargets(v []*string) *JobProcessDetails { s.ProcessingTargets = v @@ -23588,7 +26135,7 @@ type KeyPair struct { _ struct{} `type:"structure"` // The private key. - PrivateKey *string `min:"1" type:"string"` + PrivateKey *string `min:"1" type:"string" sensitive:"true"` // The public key. PublicKey *string `min:"1" type:"string"` @@ -23857,6 +26404,9 @@ func (s *ListAttachedPoliciesInput) Validate() error { if s.Target == nil { invalidParams.Add(request.NewErrParamRequired("Target")) } + if s.Target != nil && len(*s.Target) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Target", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -24278,6 +26828,96 @@ func (s *ListAuthorizersOutput) SetNextMarker(v string) *ListAuthorizersOutput { return s } +type ListBillingGroupsInput struct { + _ struct{} `type:"structure"` + + // The maximum number of results to return per request. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // Limit the results to billing groups whose names have the given prefix. + NamePrefixFilter *string `location:"querystring" locationName:"namePrefixFilter" min:"1" type:"string"` + + // The token to retrieve the next set of results. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListBillingGroupsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListBillingGroupsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListBillingGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListBillingGroupsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NamePrefixFilter != nil && len(*s.NamePrefixFilter) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NamePrefixFilter", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListBillingGroupsInput) SetMaxResults(v int64) *ListBillingGroupsInput { + s.MaxResults = &v + return s +} + +// SetNamePrefixFilter sets the NamePrefixFilter field's value. +func (s *ListBillingGroupsInput) SetNamePrefixFilter(v string) *ListBillingGroupsInput { + s.NamePrefixFilter = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListBillingGroupsInput) SetNextToken(v string) *ListBillingGroupsInput { + s.NextToken = &v + return s +} + +type ListBillingGroupsOutput struct { + _ struct{} `type:"structure"` + + // The list of billing groups. + BillingGroups []*GroupNameAndArn `locationName:"billingGroups" type:"list"` + + // The token used to get the next set of results, or null if there are no additional + // results. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListBillingGroupsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListBillingGroupsOutput) GoString() string { + return s.String() +} + +// SetBillingGroups sets the BillingGroups field's value. +func (s *ListBillingGroupsOutput) SetBillingGroups(v []*GroupNameAndArn) *ListBillingGroupsOutput { + s.BillingGroups = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListBillingGroupsOutput) SetNextToken(v string) *ListBillingGroupsOutput { + s.NextToken = &v + return s +} + // Input for the ListCACertificates operation. type ListCACertificatesInput struct { _ struct{} `type:"structure"` @@ -26044,6 +28684,86 @@ func (s *ListStreamsOutput) SetStreams(v []*StreamSummary) *ListStreamsOutput { return s } +type ListTagsForResourceInput struct { + _ struct{} `type:"structure"` + + // The token to retrieve the next set of results. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` + + // The ARN of the resource. + // + // ResourceArn is a required field + ResourceArn *string `location:"querystring" locationName:"resourceArn" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTagsForResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTagsForResourceInput) SetNextToken(v string) *ListTagsForResourceInput { + s.NextToken = &v + return s +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { + s.ResourceArn = &v + return s +} + +type ListTagsForResourceOutput struct { + _ struct{} `type:"structure"` + + // The token used to get the next set of results, or null if there are no additional + // results. + NextToken *string `locationName:"nextToken" type:"string"` + + // The list of tags assigned to the resource. + Tags []*Tag `locationName:"tags" type:"list"` +} + +// String returns the string representation +func (s ListTagsForResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTagsForResourceOutput) SetNextToken(v string) *ListTagsForResourceOutput { + s.NextToken = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { + s.Tags = v + return s +} + type ListTargetsForPolicyInput struct { _ struct{} `type:"structure"` @@ -26547,6 +29267,9 @@ func (s *ListThingRegistrationTaskReportsInput) Validate() error { if s.TaskId == nil { invalidParams.Add(request.NewErrParamRequired("TaskId")) } + if s.TaskId != nil && len(*s.TaskId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TaskId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -26799,6 +29522,101 @@ func (s *ListThingTypesOutput) SetThingTypes(v []*ThingTypeDefinition) *ListThin return s } +type ListThingsInBillingGroupInput struct { + _ struct{} `type:"structure"` + + // The name of the billing group. + // + // BillingGroupName is a required field + BillingGroupName *string `location:"uri" locationName:"billingGroupName" min:"1" type:"string" required:"true"` + + // The maximum number of results to return per request. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // The token to retrieve the next set of results. + NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListThingsInBillingGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListThingsInBillingGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListThingsInBillingGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListThingsInBillingGroupInput"} + if s.BillingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("BillingGroupName")) + } + if s.BillingGroupName != nil && len(*s.BillingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BillingGroupName", 1)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBillingGroupName sets the BillingGroupName field's value. +func (s *ListThingsInBillingGroupInput) SetBillingGroupName(v string) *ListThingsInBillingGroupInput { + s.BillingGroupName = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListThingsInBillingGroupInput) SetMaxResults(v int64) *ListThingsInBillingGroupInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListThingsInBillingGroupInput) SetNextToken(v string) *ListThingsInBillingGroupInput { + s.NextToken = &v + return s +} + +type ListThingsInBillingGroupOutput struct { + _ struct{} `type:"structure"` + + // The token used to get the next set of results, or null if there are no additional + // results. + NextToken *string `locationName:"nextToken" type:"string"` + + // A list of things in the billing group. + Things []*string `locationName:"things" type:"list"` +} + +// String returns the string representation +func (s ListThingsInBillingGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListThingsInBillingGroupOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListThingsInBillingGroupOutput) SetNextToken(v string) *ListThingsInBillingGroupOutput { + s.NextToken = &v + return s +} + +// SetThings sets the Things field's value. +func (s *ListThingsInBillingGroupOutput) SetThings(v []*string) *ListThingsInBillingGroupOutput { + s.Things = v + return s +} + type ListThingsInThingGroupInput struct { _ struct{} `type:"structure"` @@ -28098,6 +30916,58 @@ func (s *PutItemInput) SetTableName(v string) *PutItemInput { return s } +// Allows you to define a criteria to initiate the increase in rate of rollout +// for a job. +type RateIncreaseCriteria struct { + _ struct{} `type:"structure"` + + // The threshold for number of notified things that will initiate the increase + // in rate of rollout. + NumberOfNotifiedThings *int64 `locationName:"numberOfNotifiedThings" min:"1" type:"integer"` + + // The threshold for number of succeeded things that will initiate the increase + // in rate of rollout. + NumberOfSucceededThings *int64 `locationName:"numberOfSucceededThings" min:"1" type:"integer"` +} + +// String returns the string representation +func (s RateIncreaseCriteria) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RateIncreaseCriteria) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RateIncreaseCriteria) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RateIncreaseCriteria"} + if s.NumberOfNotifiedThings != nil && *s.NumberOfNotifiedThings < 1 { + invalidParams.Add(request.NewErrParamMinValue("NumberOfNotifiedThings", 1)) + } + if s.NumberOfSucceededThings != nil && *s.NumberOfSucceededThings < 1 { + invalidParams.Add(request.NewErrParamMinValue("NumberOfSucceededThings", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNumberOfNotifiedThings sets the NumberOfNotifiedThings field's value. +func (s *RateIncreaseCriteria) SetNumberOfNotifiedThings(v int64) *RateIncreaseCriteria { + s.NumberOfNotifiedThings = &v + return s +} + +// SetNumberOfSucceededThings sets the NumberOfSucceededThings field's value. +func (s *RateIncreaseCriteria) SetNumberOfSucceededThings(v int64) *RateIncreaseCriteria { + s.NumberOfSucceededThings = &v + return s +} + // The input to the RegisterCACertificate operation. type RegisterCACertificateInput struct { _ struct{} `type:"structure"` @@ -28564,6 +31434,86 @@ func (s *RelatedResource) SetResourceType(v string) *RelatedResource { return s } +type RemoveThingFromBillingGroupInput struct { + _ struct{} `type:"structure"` + + // The ARN of the billing group. + BillingGroupArn *string `locationName:"billingGroupArn" type:"string"` + + // The name of the billing group. + BillingGroupName *string `locationName:"billingGroupName" min:"1" type:"string"` + + // The ARN of the thing to be removed from the billing group. + ThingArn *string `locationName:"thingArn" type:"string"` + + // The name of the thing to be removed from the billing group. + ThingName *string `locationName:"thingName" min:"1" type:"string"` +} + +// String returns the string representation +func (s RemoveThingFromBillingGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveThingFromBillingGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemoveThingFromBillingGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveThingFromBillingGroupInput"} + if s.BillingGroupName != nil && len(*s.BillingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BillingGroupName", 1)) + } + if s.ThingName != nil && len(*s.ThingName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ThingName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBillingGroupArn sets the BillingGroupArn field's value. +func (s *RemoveThingFromBillingGroupInput) SetBillingGroupArn(v string) *RemoveThingFromBillingGroupInput { + s.BillingGroupArn = &v + return s +} + +// SetBillingGroupName sets the BillingGroupName field's value. +func (s *RemoveThingFromBillingGroupInput) SetBillingGroupName(v string) *RemoveThingFromBillingGroupInput { + s.BillingGroupName = &v + return s +} + +// SetThingArn sets the ThingArn field's value. +func (s *RemoveThingFromBillingGroupInput) SetThingArn(v string) *RemoveThingFromBillingGroupInput { + s.ThingArn = &v + return s +} + +// SetThingName sets the ThingName field's value. +func (s *RemoveThingFromBillingGroupInput) SetThingName(v string) *RemoveThingFromBillingGroupInput { + s.ThingName = &v + return s +} + +type RemoveThingFromBillingGroupOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s RemoveThingFromBillingGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveThingFromBillingGroupOutput) GoString() string { + return s.String() +} + type RemoveThingFromThingGroupInput struct { _ struct{} `type:"structure"` @@ -29578,6 +32528,9 @@ func (s *SetDefaultPolicyVersionInput) Validate() error { if s.PolicyVersionId == nil { invalidParams.Add(request.NewErrParamRequired("PolicyVersionId")) } + if s.PolicyVersionId != nil && len(*s.PolicyVersionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyVersionId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -30291,6 +33244,9 @@ func (s *StopThingRegistrationTaskInput) Validate() error { if s.TaskId == nil { invalidParams.Add(request.NewErrParamRequired("TaskId")) } + if s.TaskId != nil && len(*s.TaskId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TaskId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -30550,6 +33506,105 @@ func (s *StreamSummary) SetStreamVersion(v int64) *StreamSummary { return s } +// A set of key/value pairs that are used to manage the resource. +type Tag struct { + _ struct{} `type:"structure"` + + // The tag's key. + Key *string `type:"string"` + + // The tag's value. + Value *string `type:"string"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // The ARN of the resource. + // + // ResourceArn is a required field + ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` + + // The new or modified tags for the resource. + // + // Tags is a required field + Tags []*Tag `locationName:"tags" type:"list" required:"true"` +} + +// String returns the string representation +func (s TagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { + s.ResourceArn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { + s.Tags = v + return s +} + +type TagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceOutput) GoString() string { + return s.String() +} + // Statistics for the checks performed during the audit. type TaskStatistics struct { _ struct{} `type:"structure"` @@ -30936,6 +33991,42 @@ func (s *ThingAttribute) SetVersion(v int64) *ThingAttribute { return s } +// The connectivity status of the thing. +type ThingConnectivity struct { + _ struct{} `type:"structure"` + + // True if the thing is connected to the AWS IoT service, false if it is not + // connected. + Connected *bool `locationName:"connected" type:"boolean"` + + // The epoch time (in milliseconds) when the thing last connected or disconnected. + // Note that if the thing has been disconnected for more than a few weeks, the + // time value can be missing. + Timestamp *int64 `locationName:"timestamp" type:"long"` +} + +// String returns the string representation +func (s ThingConnectivity) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ThingConnectivity) GoString() string { + return s.String() +} + +// SetConnected sets the Connected field's value. +func (s *ThingConnectivity) SetConnected(v bool) *ThingConnectivity { + s.Connected = &v + return s +} + +// SetTimestamp sets the Timestamp field's value. +func (s *ThingConnectivity) SetTimestamp(v int64) *ThingConnectivity { + s.Timestamp = &v + return s +} + // The thing search index document. type ThingDocument struct { _ struct{} `type:"structure"` @@ -30943,6 +34034,9 @@ type ThingDocument struct { // The attributes. Attributes map[string]*string `locationName:"attributes" type:"map"` + // Indicates whether or not the thing is connected to the AWS IoT service. + Connectivity *ThingConnectivity `locationName:"connectivity" type:"structure"` + // The shadow. Shadow *string `locationName:"shadow" type:"string"` @@ -30975,6 +34069,12 @@ func (s *ThingDocument) SetAttributes(v map[string]*string) *ThingDocument { return s } +// SetConnectivity sets the Connectivity field's value. +func (s *ThingDocument) SetConnectivity(v *ThingConnectivity) *ThingDocument { + s.Connectivity = v + return s +} + // SetShadow sets the Shadow field's value. func (s *ThingDocument) SetShadow(v string) *ThingDocument { s.Shadow = &v @@ -31179,10 +34279,20 @@ func (s *ThingGroupProperties) SetThingGroupDescription(v string) *ThingGroupPro return s } -// Thing indexing configuration. +// The thing indexing configuration. For more information, see Managing Thing +// Indexing (https://docs.aws.amazon.com/iot/latest/developerguide/managing-index.html). type ThingIndexingConfiguration struct { _ struct{} `type:"structure"` + // Thing connectivity indexing mode. Valid values are: + // + // * STATUS – Your thing index will contain connectivity status. In order + // to enable thing connectivity indexing, thingIndexMode must not be set + // to OFF. + // + // * OFF - Thing connectivity status indexing is disabled. + ThingConnectivityIndexingMode *string `locationName:"thingConnectivityIndexingMode" type:"string" enum:"ThingConnectivityIndexingMode"` + // Thing indexing mode. Valid values are: // // * REGISTRY – Your thing index will contain only registry data. @@ -31219,6 +34329,12 @@ func (s *ThingIndexingConfiguration) Validate() error { return nil } +// SetThingConnectivityIndexingMode sets the ThingConnectivityIndexingMode field's value. +func (s *ThingIndexingConfiguration) SetThingConnectivityIndexingMode(v string) *ThingIndexingConfiguration { + s.ThingConnectivityIndexingMode = &v + return s +} + // SetThingIndexingMode sets the ThingIndexingMode field's value. func (s *ThingIndexingConfiguration) SetThingIndexingMode(v string) *ThingIndexingConfiguration { s.ThingIndexingMode = &v @@ -31357,6 +34473,38 @@ func (s *ThingTypeProperties) SetThingTypeDescription(v string) *ThingTypeProper return s } +// Specifies the amount of time each device has to finish its execution of the +// job. A timer is started when the job execution status is set to IN_PROGRESS. +// If the job execution status is not set to another terminal state before the +// timer expires, it will be automatically set to TIMED_OUT. +type TimeoutConfig struct { + _ struct{} `type:"structure"` + + // Specifies the amount of time, in minutes, this device has to finish execution + // of this job. The timeout interval can be anywhere between 1 minute and 7 + // days (1 to 10080 minutes). The in progress timer can't be updated and will + // apply to all job executions for the job. Whenever a job execution remains + // in the IN_PROGRESS status for longer than this interval, the job execution + // will fail and switch to the terminal TIMED_OUT status. + InProgressTimeoutInMinutes *int64 `locationName:"inProgressTimeoutInMinutes" type:"long"` +} + +// String returns the string representation +func (s TimeoutConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TimeoutConfig) GoString() string { + return s.String() +} + +// SetInProgressTimeoutInMinutes sets the InProgressTimeoutInMinutes field's value. +func (s *TimeoutConfig) SetInProgressTimeoutInMinutes(v int64) *TimeoutConfig { + s.InProgressTimeoutInMinutes = &v + return s +} + // Describes a rule. type TopicRule struct { _ struct{} `type:"structure"` @@ -31764,6 +34912,72 @@ func (s *TransferData) SetTransferMessage(v string) *TransferData { return s } +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // The ARN of the resource. + // + // ResourceArn is a required field + ResourceArn *string `locationName:"resourceArn" type:"string" required:"true"` + + // A list of the keys of the tags to be removed from the resource. + // + // TagKeys is a required field + TagKeys []*string `locationName:"tagKeys" type:"list" required:"true"` +} + +// String returns the string representation +func (s UntagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { + s.ResourceArn = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { + s.TagKeys = v + return s +} + +type UntagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UntagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceOutput) GoString() string { + return s.String() +} + type UpdateAccountAuditConfigurationInput struct { _ struct{} `type:"structure"` @@ -31969,6 +35183,95 @@ func (s *UpdateAuthorizerOutput) SetAuthorizerName(v string) *UpdateAuthorizerOu return s } +type UpdateBillingGroupInput struct { + _ struct{} `type:"structure"` + + // The name of the billing group. + // + // BillingGroupName is a required field + BillingGroupName *string `location:"uri" locationName:"billingGroupName" min:"1" type:"string" required:"true"` + + // The properties of the billing group. + // + // BillingGroupProperties is a required field + BillingGroupProperties *BillingGroupProperties `locationName:"billingGroupProperties" type:"structure" required:"true"` + + // The expected version of the billing group. If the version of the billing + // group does not match the expected version specified in the request, the UpdateBillingGroup + // request is rejected with a VersionConflictException. + ExpectedVersion *int64 `locationName:"expectedVersion" type:"long"` +} + +// String returns the string representation +func (s UpdateBillingGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateBillingGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateBillingGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateBillingGroupInput"} + if s.BillingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("BillingGroupName")) + } + if s.BillingGroupName != nil && len(*s.BillingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BillingGroupName", 1)) + } + if s.BillingGroupProperties == nil { + invalidParams.Add(request.NewErrParamRequired("BillingGroupProperties")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBillingGroupName sets the BillingGroupName field's value. +func (s *UpdateBillingGroupInput) SetBillingGroupName(v string) *UpdateBillingGroupInput { + s.BillingGroupName = &v + return s +} + +// SetBillingGroupProperties sets the BillingGroupProperties field's value. +func (s *UpdateBillingGroupInput) SetBillingGroupProperties(v *BillingGroupProperties) *UpdateBillingGroupInput { + s.BillingGroupProperties = v + return s +} + +// SetExpectedVersion sets the ExpectedVersion field's value. +func (s *UpdateBillingGroupInput) SetExpectedVersion(v int64) *UpdateBillingGroupInput { + s.ExpectedVersion = &v + return s +} + +type UpdateBillingGroupOutput struct { + _ struct{} `type:"structure"` + + // The latest version of the billing group. + Version *int64 `locationName:"version" type:"long"` +} + +// String returns the string representation +func (s UpdateBillingGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateBillingGroupOutput) GoString() string { + return s.String() +} + +// SetVersion sets the Version field's value. +func (s *UpdateBillingGroupOutput) SetVersion(v int64) *UpdateBillingGroupOutput { + s.Version = &v + return s +} + // The input to the UpdateCACertificate operation. type UpdateCACertificateInput struct { _ struct{} `type:"structure"` @@ -32148,6 +35451,131 @@ func (s UpdateCertificateOutput) GoString() string { return s.String() } +type UpdateDynamicThingGroupInput struct { + _ struct{} `type:"structure"` + + // The expected version of the dynamic thing group to update. + ExpectedVersion *int64 `locationName:"expectedVersion" type:"long"` + + // The dynamic thing group index to update. + // + // Currently one index is supported: 'AWS_Things'. + IndexName *string `locationName:"indexName" min:"1" type:"string"` + + // The dynamic thing group search query string to update. + QueryString *string `locationName:"queryString" min:"1" type:"string"` + + // The dynamic thing group query version to update. + // + // Currently one query version is supported: "2017-09-30". If not specified, + // the query version defaults to this value. + QueryVersion *string `locationName:"queryVersion" type:"string"` + + // The name of the dynamic thing group to update. + // + // ThingGroupName is a required field + ThingGroupName *string `location:"uri" locationName:"thingGroupName" min:"1" type:"string" required:"true"` + + // The dynamic thing group properties to update. + // + // ThingGroupProperties is a required field + ThingGroupProperties *ThingGroupProperties `locationName:"thingGroupProperties" type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateDynamicThingGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateDynamicThingGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateDynamicThingGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateDynamicThingGroupInput"} + if s.IndexName != nil && len(*s.IndexName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IndexName", 1)) + } + if s.QueryString != nil && len(*s.QueryString) < 1 { + invalidParams.Add(request.NewErrParamMinLen("QueryString", 1)) + } + if s.ThingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("ThingGroupName")) + } + if s.ThingGroupName != nil && len(*s.ThingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ThingGroupName", 1)) + } + if s.ThingGroupProperties == nil { + invalidParams.Add(request.NewErrParamRequired("ThingGroupProperties")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetExpectedVersion sets the ExpectedVersion field's value. +func (s *UpdateDynamicThingGroupInput) SetExpectedVersion(v int64) *UpdateDynamicThingGroupInput { + s.ExpectedVersion = &v + return s +} + +// SetIndexName sets the IndexName field's value. +func (s *UpdateDynamicThingGroupInput) SetIndexName(v string) *UpdateDynamicThingGroupInput { + s.IndexName = &v + return s +} + +// SetQueryString sets the QueryString field's value. +func (s *UpdateDynamicThingGroupInput) SetQueryString(v string) *UpdateDynamicThingGroupInput { + s.QueryString = &v + return s +} + +// SetQueryVersion sets the QueryVersion field's value. +func (s *UpdateDynamicThingGroupInput) SetQueryVersion(v string) *UpdateDynamicThingGroupInput { + s.QueryVersion = &v + return s +} + +// SetThingGroupName sets the ThingGroupName field's value. +func (s *UpdateDynamicThingGroupInput) SetThingGroupName(v string) *UpdateDynamicThingGroupInput { + s.ThingGroupName = &v + return s +} + +// SetThingGroupProperties sets the ThingGroupProperties field's value. +func (s *UpdateDynamicThingGroupInput) SetThingGroupProperties(v *ThingGroupProperties) *UpdateDynamicThingGroupInput { + s.ThingGroupProperties = v + return s +} + +type UpdateDynamicThingGroupOutput struct { + _ struct{} `type:"structure"` + + // The dynamic thing group version. + Version *int64 `locationName:"version" type:"long"` +} + +// String returns the string representation +func (s UpdateDynamicThingGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateDynamicThingGroupOutput) GoString() string { + return s.String() +} + +// SetVersion sets the Version field's value. +func (s *UpdateDynamicThingGroupOutput) SetVersion(v int64) *UpdateDynamicThingGroupOutput { + s.Version = &v + return s +} + type UpdateEventConfigurationsInput struct { _ struct{} `type:"structure"` @@ -32251,6 +35679,124 @@ func (s UpdateIndexingConfigurationOutput) GoString() string { return s.String() } +type UpdateJobInput struct { + _ struct{} `type:"structure"` + + // Allows you to create criteria to abort a job. + AbortConfig *AbortConfig `locationName:"abortConfig" type:"structure"` + + // A short text description of the job. + Description *string `locationName:"description" type:"string"` + + // Allows you to create a staged rollout of the job. + JobExecutionsRolloutConfig *JobExecutionsRolloutConfig `locationName:"jobExecutionsRolloutConfig" type:"structure"` + + // The ID of the job to be updated. + // + // JobId is a required field + JobId *string `location:"uri" locationName:"jobId" min:"1" type:"string" required:"true"` + + // Configuration information for pre-signed S3 URLs. + PresignedUrlConfig *PresignedUrlConfig `locationName:"presignedUrlConfig" type:"structure"` + + // Specifies the amount of time each device has to finish its execution of the + // job. The timer is started when the job execution status is set to IN_PROGRESS. + // If the job execution status is not set to another terminal state before the + // time expires, it will be automatically set to TIMED_OUT. + TimeoutConfig *TimeoutConfig `locationName:"timeoutConfig" type:"structure"` +} + +// String returns the string representation +func (s UpdateJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateJobInput"} + if s.JobId == nil { + invalidParams.Add(request.NewErrParamRequired("JobId")) + } + if s.JobId != nil && len(*s.JobId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) + } + if s.AbortConfig != nil { + if err := s.AbortConfig.Validate(); err != nil { + invalidParams.AddNested("AbortConfig", err.(request.ErrInvalidParams)) + } + } + if s.JobExecutionsRolloutConfig != nil { + if err := s.JobExecutionsRolloutConfig.Validate(); err != nil { + invalidParams.AddNested("JobExecutionsRolloutConfig", err.(request.ErrInvalidParams)) + } + } + if s.PresignedUrlConfig != nil { + if err := s.PresignedUrlConfig.Validate(); err != nil { + invalidParams.AddNested("PresignedUrlConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAbortConfig sets the AbortConfig field's value. +func (s *UpdateJobInput) SetAbortConfig(v *AbortConfig) *UpdateJobInput { + s.AbortConfig = v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateJobInput) SetDescription(v string) *UpdateJobInput { + s.Description = &v + return s +} + +// SetJobExecutionsRolloutConfig sets the JobExecutionsRolloutConfig field's value. +func (s *UpdateJobInput) SetJobExecutionsRolloutConfig(v *JobExecutionsRolloutConfig) *UpdateJobInput { + s.JobExecutionsRolloutConfig = v + return s +} + +// SetJobId sets the JobId field's value. +func (s *UpdateJobInput) SetJobId(v string) *UpdateJobInput { + s.JobId = &v + return s +} + +// SetPresignedUrlConfig sets the PresignedUrlConfig field's value. +func (s *UpdateJobInput) SetPresignedUrlConfig(v *PresignedUrlConfig) *UpdateJobInput { + s.PresignedUrlConfig = v + return s +} + +// SetTimeoutConfig sets the TimeoutConfig field's value. +func (s *UpdateJobInput) SetTimeoutConfig(v *TimeoutConfig) *UpdateJobInput { + s.TimeoutConfig = v + return s +} + +type UpdateJobOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateJobOutput) GoString() string { + return s.String() +} + type UpdateRoleAliasInput struct { _ struct{} `type:"structure"` @@ -32871,6 +36417,12 @@ func (s *UpdateThingGroupOutput) SetVersion(v int64) *UpdateThingGroupOutput { type UpdateThingGroupsForThingInput struct { _ struct{} `type:"structure"` + // Override dynamic thing groups with static thing groups when 10-group limit + // is reached. If a thing belongs to 10 thing groups, and one or more of those + // groups are dynamic thing groups, adding a thing to a static group removes + // the thing from the last dynamic group. + OverrideDynamicGroups *bool `locationName:"overrideDynamicGroups" type:"boolean"` + // The groups to which the thing will be added. ThingGroupsToAdd []*string `locationName:"thingGroupsToAdd" type:"list"` @@ -32904,6 +36456,12 @@ func (s *UpdateThingGroupsForThingInput) Validate() error { return nil } +// SetOverrideDynamicGroups sets the OverrideDynamicGroups field's value. +func (s *UpdateThingGroupsForThingInput) SetOverrideDynamicGroups(v bool) *UpdateThingGroupsForThingInput { + s.OverrideDynamicGroups = &v + return s +} + // SetThingGroupsToAdd sets the ThingGroupsToAdd field's value. func (s *UpdateThingGroupsForThingInput) SetThingGroupsToAdd(v []*string) *UpdateThingGroupsForThingInput { s.ThingGroupsToAdd = v @@ -33222,6 +36780,11 @@ func (s *ViolationEvent) SetViolationId(v string) *ViolationEvent { return s } +const ( + // AbortActionCancel is a AbortAction enum value + AbortActionCancel = "CANCEL" +) + const ( // ActionTypePublish is a ActionType enum value ActionTypePublish = "PUBLISH" @@ -33447,6 +37010,17 @@ const ( DayOfWeekSat = "SAT" ) +const ( + // DynamicGroupStatusActive is a DynamicGroupStatus enum value + DynamicGroupStatusActive = "ACTIVE" + + // DynamicGroupStatusBuilding is a DynamicGroupStatus enum value + DynamicGroupStatusBuilding = "BUILDING" + + // DynamicGroupStatusRebuilding is a DynamicGroupStatus enum value + DynamicGroupStatusRebuilding = "REBUILDING" +) + const ( // DynamoKeyTypeString is a DynamoKeyType enum value DynamoKeyTypeString = "STRING" @@ -33501,6 +37075,20 @@ const ( IndexStatusRebuilding = "REBUILDING" ) +const ( + // JobExecutionFailureTypeFailed is a JobExecutionFailureType enum value + JobExecutionFailureTypeFailed = "FAILED" + + // JobExecutionFailureTypeRejected is a JobExecutionFailureType enum value + JobExecutionFailureTypeRejected = "REJECTED" + + // JobExecutionFailureTypeTimedOut is a JobExecutionFailureType enum value + JobExecutionFailureTypeTimedOut = "TIMED_OUT" + + // JobExecutionFailureTypeAll is a JobExecutionFailureType enum value + JobExecutionFailureTypeAll = "ALL" +) + const ( // JobExecutionStatusQueued is a JobExecutionStatus enum value JobExecutionStatusQueued = "QUEUED" @@ -33514,6 +37102,9 @@ const ( // JobExecutionStatusFailed is a JobExecutionStatus enum value JobExecutionStatusFailed = "FAILED" + // JobExecutionStatusTimedOut is a JobExecutionStatus enum value + JobExecutionStatusTimedOut = "TIMED_OUT" + // JobExecutionStatusRejected is a JobExecutionStatus enum value JobExecutionStatusRejected = "REJECTED" @@ -33638,6 +37229,14 @@ const ( TargetSelectionSnapshot = "SNAPSHOT" ) +const ( + // ThingConnectivityIndexingModeOff is a ThingConnectivityIndexingMode enum value + ThingConnectivityIndexingModeOff = "OFF" + + // ThingConnectivityIndexingModeStatus is a ThingConnectivityIndexingMode enum value + ThingConnectivityIndexingModeStatus = "STATUS" +) + const ( // ThingGroupIndexingModeOff is a ThingGroupIndexingMode enum value ThingGroupIndexingModeOff = "OFF" diff --git a/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go b/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go index b568913832..2cdb06a0f6 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kinesis/api.go @@ -18,7 +18,7 @@ const opAddTagsToStream = "AddTagsToStream" // AddTagsToStreamRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -52,8 +52,7 @@ func (c *Kinesis) AddTagsToStreamRequest(input *AddTagsToStreamInput) (req *requ output = &AddTagsToStreamOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -120,7 +119,7 @@ const opCreateStream = "CreateStream" // CreateStreamRequest generates a "aws/request.Request" representing the // client's request for the CreateStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -154,8 +153,7 @@ func (c *Kinesis) CreateStreamRequest(input *CreateStreamInput) (req *request.Re output = &CreateStreamOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -248,7 +246,7 @@ const opDecreaseStreamRetentionPeriod = "DecreaseStreamRetentionPeriod" // DecreaseStreamRetentionPeriodRequest generates a "aws/request.Request" representing the // client's request for the DecreaseStreamRetentionPeriod operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -282,8 +280,7 @@ func (c *Kinesis) DecreaseStreamRetentionPeriodRequest(input *DecreaseStreamRete output = &DecreaseStreamRetentionPeriodOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -348,7 +345,7 @@ const opDeleteStream = "DeleteStream" // DeleteStreamRequest generates a "aws/request.Request" representing the // client's request for the DeleteStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -382,8 +379,7 @@ func (c *Kinesis) DeleteStreamRequest(input *DeleteStreamInput) (req *request.Re output = &DeleteStreamOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -457,7 +453,7 @@ const opDeregisterStreamConsumer = "DeregisterStreamConsumer" // DeregisterStreamConsumerRequest generates a "aws/request.Request" representing the // client's request for the DeregisterStreamConsumer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -491,8 +487,7 @@ func (c *Kinesis) DeregisterStreamConsumerRequest(input *DeregisterStreamConsume output = &DeregisterStreamConsumerOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -556,7 +551,7 @@ const opDescribeLimits = "DescribeLimits" // DescribeLimitsRequest generates a "aws/request.Request" representing the // client's request for the DescribeLimits operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -641,7 +636,7 @@ const opDescribeStream = "DescribeStream" // DescribeStreamRequest generates a "aws/request.Request" representing the // client's request for the DescribeStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -799,7 +794,7 @@ const opDescribeStreamConsumer = "DescribeStreamConsumer" // DescribeStreamConsumerRequest generates a "aws/request.Request" representing the // client's request for the DescribeStreamConsumer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -895,7 +890,7 @@ const opDescribeStreamSummary = "DescribeStreamSummary" // DescribeStreamSummaryRequest generates a "aws/request.Request" representing the // client's request for the DescribeStreamSummary operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -984,7 +979,7 @@ const opDisableEnhancedMonitoring = "DisableEnhancedMonitoring" // DisableEnhancedMonitoringRequest generates a "aws/request.Request" representing the // client's request for the DisableEnhancedMonitoring operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1076,7 +1071,7 @@ const opEnableEnhancedMonitoring = "EnableEnhancedMonitoring" // EnableEnhancedMonitoringRequest generates a "aws/request.Request" representing the // client's request for the EnableEnhancedMonitoring operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1168,7 +1163,7 @@ const opGetRecords = "GetRecords" // GetRecordsRequest generates a "aws/request.Request" representing the // client's request for the GetRecords operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1344,7 +1339,7 @@ const opGetShardIterator = "GetShardIterator" // GetShardIteratorRequest generates a "aws/request.Request" representing the // client's request for the GetShardIterator operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1474,7 +1469,7 @@ const opIncreaseStreamRetentionPeriod = "IncreaseStreamRetentionPeriod" // IncreaseStreamRetentionPeriodRequest generates a "aws/request.Request" representing the // client's request for the IncreaseStreamRetentionPeriod operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1508,8 +1503,7 @@ func (c *Kinesis) IncreaseStreamRetentionPeriodRequest(input *IncreaseStreamRete output = &IncreaseStreamRetentionPeriodOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1578,7 +1572,7 @@ const opListShards = "ListShards" // ListShardsRequest generates a "aws/request.Request" representing the // client's request for the ListShards operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1680,7 +1674,7 @@ const opListStreamConsumers = "ListStreamConsumers" // ListStreamConsumersRequest generates a "aws/request.Request" representing the // client's request for the ListStreamConsumers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1834,7 +1828,7 @@ const opListStreams = "ListStreams" // ListStreamsRequest generates a "aws/request.Request" representing the // client's request for the ListStreams operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1985,7 +1979,7 @@ const opListTagsForStream = "ListTagsForStream" // ListTagsForStreamRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2074,7 +2068,7 @@ const opMergeShards = "MergeShards" // MergeShardsRequest generates a "aws/request.Request" representing the // client's request for the MergeShards operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2108,8 +2102,7 @@ func (c *Kinesis) MergeShardsRequest(input *MergeShardsInput) (req *request.Requ output = &MergeShardsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2203,7 +2196,7 @@ const opPutRecord = "PutRecord" // PutRecordRequest generates a "aws/request.Request" representing the // client's request for the PutRecord operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2359,7 +2352,7 @@ const opPutRecords = "PutRecords" // PutRecordsRequest generates a "aws/request.Request" representing the // client's request for the PutRecords operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2535,7 +2528,7 @@ const opRegisterStreamConsumer = "RegisterStreamConsumer" // RegisterStreamConsumerRequest generates a "aws/request.Request" representing the // client's request for the RegisterStreamConsumer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2635,7 +2628,7 @@ const opRemoveTagsFromStream = "RemoveTagsFromStream" // RemoveTagsFromStreamRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromStream operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2669,8 +2662,7 @@ func (c *Kinesis) RemoveTagsFromStreamRequest(input *RemoveTagsFromStreamInput) output = &RemoveTagsFromStreamOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2734,7 +2726,7 @@ const opSplitShard = "SplitShard" // SplitShardRequest generates a "aws/request.Request" representing the // client's request for the SplitShard operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2768,8 +2760,7 @@ func (c *Kinesis) SplitShardRequest(input *SplitShardInput) (req *request.Reques output = &SplitShardOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2873,7 +2864,7 @@ const opStartStreamEncryption = "StartStreamEncryption" // StartStreamEncryptionRequest generates a "aws/request.Request" representing the // client's request for the StartStreamEncryption operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2907,8 +2898,7 @@ func (c *Kinesis) StartStreamEncryptionRequest(input *StartStreamEncryptionInput output = &StartStreamEncryptionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3011,7 +3001,7 @@ const opStopStreamEncryption = "StopStreamEncryption" // StopStreamEncryptionRequest generates a "aws/request.Request" representing the // client's request for the StopStreamEncryption operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3045,8 +3035,7 @@ func (c *Kinesis) StopStreamEncryptionRequest(input *StopStreamEncryptionInput) output = &StopStreamEncryptionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3122,7 +3111,7 @@ const opUpdateShardCount = "UpdateShardCount" // UpdateShardCountRequest generates a "aws/request.Request" representing the // client's request for the UpdateShardCount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. diff --git a/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/api.go b/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/api.go new file mode 100644 index 0000000000..dfcfe35293 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/api.go @@ -0,0 +1,6751 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package kinesisanalytics + +import ( + "fmt" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" +) + +const opAddApplicationCloudWatchLoggingOption = "AddApplicationCloudWatchLoggingOption" + +// AddApplicationCloudWatchLoggingOptionRequest generates a "aws/request.Request" representing the +// client's request for the AddApplicationCloudWatchLoggingOption 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 AddApplicationCloudWatchLoggingOption for more information on using the AddApplicationCloudWatchLoggingOption +// 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 AddApplicationCloudWatchLoggingOptionRequest method. +// req, resp := client.AddApplicationCloudWatchLoggingOptionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/AddApplicationCloudWatchLoggingOption +func (c *KinesisAnalytics) AddApplicationCloudWatchLoggingOptionRequest(input *AddApplicationCloudWatchLoggingOptionInput) (req *request.Request, output *AddApplicationCloudWatchLoggingOptionOutput) { + op := &request.Operation{ + Name: opAddApplicationCloudWatchLoggingOption, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AddApplicationCloudWatchLoggingOptionInput{} + } + + output = &AddApplicationCloudWatchLoggingOptionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// AddApplicationCloudWatchLoggingOption API operation for Amazon Kinesis Analytics. +// +// Adds a CloudWatch log stream to monitor application configuration errors. +// For more information about using CloudWatch log streams with Amazon Kinesis +// Analytics applications, see Working with Amazon CloudWatch Logs (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/cloudwatch-logs.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. +// +// See the AWS API reference guide for Amazon Kinesis Analytics's +// API operation AddApplicationCloudWatchLoggingOption for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// Specified application can't be found. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// Application is not available for this operation. +// +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// Specified input parameter value is invalid. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Exception thrown as a result of concurrent modification to an application. +// For example, two individuals attempting to edit the same application at the +// same time. +// +// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/AddApplicationCloudWatchLoggingOption +func (c *KinesisAnalytics) AddApplicationCloudWatchLoggingOption(input *AddApplicationCloudWatchLoggingOptionInput) (*AddApplicationCloudWatchLoggingOptionOutput, error) { + req, out := c.AddApplicationCloudWatchLoggingOptionRequest(input) + return out, req.Send() +} + +// AddApplicationCloudWatchLoggingOptionWithContext is the same as AddApplicationCloudWatchLoggingOption with the addition of +// the ability to pass a context and additional request options. +// +// See AddApplicationCloudWatchLoggingOption 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 *KinesisAnalytics) AddApplicationCloudWatchLoggingOptionWithContext(ctx aws.Context, input *AddApplicationCloudWatchLoggingOptionInput, opts ...request.Option) (*AddApplicationCloudWatchLoggingOptionOutput, error) { + req, out := c.AddApplicationCloudWatchLoggingOptionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opAddApplicationInput = "AddApplicationInput" + +// AddApplicationInputRequest generates a "aws/request.Request" representing the +// client's request for the AddApplicationInput 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 AddApplicationInput for more information on using the AddApplicationInput +// 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 AddApplicationInputRequest method. +// req, resp := client.AddApplicationInputRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/AddApplicationInput +func (c *KinesisAnalytics) AddApplicationInputRequest(input *AddApplicationInputInput) (req *request.Request, output *AddApplicationInputOutput) { + op := &request.Operation{ + Name: opAddApplicationInput, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AddApplicationInputInput{} + } + + output = &AddApplicationInputOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// AddApplicationInput API operation for Amazon Kinesis Analytics. +// +// Adds a streaming source to your Amazon Kinesis application. For conceptual +// information, see Configuring Application Input (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-input.html). +// +// You can add a streaming source either when you create an application or you +// can use this operation to add a streaming source after you create an application. +// For more information, see CreateApplication. +// +// Any configuration update, including adding a streaming source using this +// operation, results in a new version of the application. You can use the DescribeApplication +// operation to find the current application version. +// +// This operation requires permissions to perform the kinesisanalytics:AddApplicationInput +// action. +// +// 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 Kinesis Analytics's +// API operation AddApplicationInput for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// Specified application can't be found. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// Application is not available for this operation. +// +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// Specified input parameter value is invalid. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Exception thrown as a result of concurrent modification to an application. +// For example, two individuals attempting to edit the same application at the +// same time. +// +// * ErrCodeCodeValidationException "CodeValidationException" +// User-provided application code (query) is invalid. This can be a simple syntax +// error. +// +// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/AddApplicationInput +func (c *KinesisAnalytics) AddApplicationInput(input *AddApplicationInputInput) (*AddApplicationInputOutput, error) { + req, out := c.AddApplicationInputRequest(input) + return out, req.Send() +} + +// AddApplicationInputWithContext is the same as AddApplicationInput with the addition of +// the ability to pass a context and additional request options. +// +// See AddApplicationInput 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 *KinesisAnalytics) AddApplicationInputWithContext(ctx aws.Context, input *AddApplicationInputInput, opts ...request.Option) (*AddApplicationInputOutput, error) { + req, out := c.AddApplicationInputRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opAddApplicationInputProcessingConfiguration = "AddApplicationInputProcessingConfiguration" + +// AddApplicationInputProcessingConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the AddApplicationInputProcessingConfiguration 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 AddApplicationInputProcessingConfiguration for more information on using the AddApplicationInputProcessingConfiguration +// 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 AddApplicationInputProcessingConfigurationRequest method. +// req, resp := client.AddApplicationInputProcessingConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/AddApplicationInputProcessingConfiguration +func (c *KinesisAnalytics) AddApplicationInputProcessingConfigurationRequest(input *AddApplicationInputProcessingConfigurationInput) (req *request.Request, output *AddApplicationInputProcessingConfigurationOutput) { + op := &request.Operation{ + Name: opAddApplicationInputProcessingConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AddApplicationInputProcessingConfigurationInput{} + } + + output = &AddApplicationInputProcessingConfigurationOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// AddApplicationInputProcessingConfiguration API operation for Amazon Kinesis Analytics. +// +// Adds an InputProcessingConfiguration to an application. An input processor +// preprocesses records on the input stream before the application's SQL code +// executes. Currently, the only input processor available is AWS Lambda (https://aws.amazon.com/documentation/lambda/). +// +// 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 Kinesis Analytics's +// API operation AddApplicationInputProcessingConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// Specified application can't be found. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// Application is not available for this operation. +// +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// Specified input parameter value is invalid. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Exception thrown as a result of concurrent modification to an application. +// For example, two individuals attempting to edit the same application at the +// same time. +// +// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/AddApplicationInputProcessingConfiguration +func (c *KinesisAnalytics) AddApplicationInputProcessingConfiguration(input *AddApplicationInputProcessingConfigurationInput) (*AddApplicationInputProcessingConfigurationOutput, error) { + req, out := c.AddApplicationInputProcessingConfigurationRequest(input) + return out, req.Send() +} + +// AddApplicationInputProcessingConfigurationWithContext is the same as AddApplicationInputProcessingConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See AddApplicationInputProcessingConfiguration 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 *KinesisAnalytics) AddApplicationInputProcessingConfigurationWithContext(ctx aws.Context, input *AddApplicationInputProcessingConfigurationInput, opts ...request.Option) (*AddApplicationInputProcessingConfigurationOutput, error) { + req, out := c.AddApplicationInputProcessingConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opAddApplicationOutput = "AddApplicationOutput" + +// AddApplicationOutputRequest generates a "aws/request.Request" representing the +// client's request for the AddApplicationOutput 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 AddApplicationOutput for more information on using the AddApplicationOutput +// 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 AddApplicationOutputRequest method. +// req, resp := client.AddApplicationOutputRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/AddApplicationOutput +func (c *KinesisAnalytics) AddApplicationOutputRequest(input *AddApplicationOutputInput) (req *request.Request, output *AddApplicationOutputOutput) { + op := &request.Operation{ + Name: opAddApplicationOutput, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AddApplicationOutputInput{} + } + + output = &AddApplicationOutputOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// AddApplicationOutput API operation for Amazon Kinesis Analytics. +// +// Adds an external destination to your Amazon Kinesis Analytics application. +// +// If you want Amazon Kinesis Analytics to deliver data from an in-application +// stream within your application to an external destination (such as an Amazon +// Kinesis stream, an Amazon Kinesis Firehose delivery stream, or an AWS Lambda +// function), you add the relevant configuration to your application using this +// operation. You can configure one or more outputs for your application. Each +// output configuration maps an in-application stream and an external destination. +// +// You can use one of the output configurations to deliver data from your in-application +// error stream to an external destination so that you can analyze the errors. +// For more information, see Understanding Application Output (Destination) +// (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-output.html). +// +// Any configuration update, including adding a streaming source using this +// operation, results in a new version of the application. You can use the DescribeApplication +// operation to find the current application version. +// +// For the limits on the number of application inputs and outputs you can configure, +// see Limits (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/limits.html). +// +// This operation requires permissions to perform the kinesisanalytics:AddApplicationOutput +// action. +// +// 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 Kinesis Analytics's +// API operation AddApplicationOutput for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// Specified application can't be found. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// Application is not available for this operation. +// +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// Specified input parameter value is invalid. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Exception thrown as a result of concurrent modification to an application. +// For example, two individuals attempting to edit the same application at the +// same time. +// +// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/AddApplicationOutput +func (c *KinesisAnalytics) AddApplicationOutput(input *AddApplicationOutputInput) (*AddApplicationOutputOutput, error) { + req, out := c.AddApplicationOutputRequest(input) + return out, req.Send() +} + +// AddApplicationOutputWithContext is the same as AddApplicationOutput with the addition of +// the ability to pass a context and additional request options. +// +// See AddApplicationOutput 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 *KinesisAnalytics) AddApplicationOutputWithContext(ctx aws.Context, input *AddApplicationOutputInput, opts ...request.Option) (*AddApplicationOutputOutput, error) { + req, out := c.AddApplicationOutputRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opAddApplicationReferenceDataSource = "AddApplicationReferenceDataSource" + +// AddApplicationReferenceDataSourceRequest generates a "aws/request.Request" representing the +// client's request for the AddApplicationReferenceDataSource 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 AddApplicationReferenceDataSource for more information on using the AddApplicationReferenceDataSource +// 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 AddApplicationReferenceDataSourceRequest method. +// req, resp := client.AddApplicationReferenceDataSourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/AddApplicationReferenceDataSource +func (c *KinesisAnalytics) AddApplicationReferenceDataSourceRequest(input *AddApplicationReferenceDataSourceInput) (req *request.Request, output *AddApplicationReferenceDataSourceOutput) { + op := &request.Operation{ + Name: opAddApplicationReferenceDataSource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AddApplicationReferenceDataSourceInput{} + } + + output = &AddApplicationReferenceDataSourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// AddApplicationReferenceDataSource API operation for Amazon Kinesis Analytics. +// +// Adds a reference data source to an existing application. +// +// Amazon Kinesis Analytics reads reference data (that is, an Amazon S3 object) +// and creates an in-application table within your application. In the request, +// you provide the source (S3 bucket name and object key name), name of the +// in-application table to create, and the necessary mapping information that +// describes how data in Amazon S3 object maps to columns in the resulting in-application +// table. +// +// For conceptual information, see Configuring Application Input (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-input.html). +// For the limits on data sources you can add to your application, see Limits +// (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/limits.html). +// +// This operation requires permissions to perform the kinesisanalytics:AddApplicationOutput +// action. +// +// 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 Kinesis Analytics's +// API operation AddApplicationReferenceDataSource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// Specified application can't be found. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// Application is not available for this operation. +// +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// Specified input parameter value is invalid. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Exception thrown as a result of concurrent modification to an application. +// For example, two individuals attempting to edit the same application at the +// same time. +// +// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/AddApplicationReferenceDataSource +func (c *KinesisAnalytics) AddApplicationReferenceDataSource(input *AddApplicationReferenceDataSourceInput) (*AddApplicationReferenceDataSourceOutput, error) { + req, out := c.AddApplicationReferenceDataSourceRequest(input) + return out, req.Send() +} + +// AddApplicationReferenceDataSourceWithContext is the same as AddApplicationReferenceDataSource with the addition of +// the ability to pass a context and additional request options. +// +// See AddApplicationReferenceDataSource 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 *KinesisAnalytics) AddApplicationReferenceDataSourceWithContext(ctx aws.Context, input *AddApplicationReferenceDataSourceInput, opts ...request.Option) (*AddApplicationReferenceDataSourceOutput, error) { + req, out := c.AddApplicationReferenceDataSourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateApplication = "CreateApplication" + +// CreateApplicationRequest generates a "aws/request.Request" representing the +// client's request for the CreateApplication 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 CreateApplication for more information on using the CreateApplication +// 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 CreateApplicationRequest method. +// req, resp := client.CreateApplicationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/CreateApplication +func (c *KinesisAnalytics) CreateApplicationRequest(input *CreateApplicationInput) (req *request.Request, output *CreateApplicationOutput) { + op := &request.Operation{ + Name: opCreateApplication, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateApplicationInput{} + } + + output = &CreateApplicationOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateApplication API operation for Amazon Kinesis Analytics. +// +// Creates an Amazon Kinesis Analytics application. You can configure each application +// with one streaming source as input, application code to process the input, +// and up to three destinations where you want Amazon Kinesis Analytics to write +// the output data from your application. For an overview, see How it Works +// (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works.html). +// +// In the input configuration, you map the streaming source to an in-application +// stream, which you can think of as a constantly updating table. In the mapping, +// you must provide a schema for the in-application stream and map each data +// column in the in-application stream to a data element in the streaming source. +// +// Your application code is one or more SQL statements that read input data, +// transform it, and generate output. Your application code can create one or +// more SQL artifacts like SQL streams or pumps. +// +// In the output configuration, you can configure the application to write data +// from in-application streams created in your applications to up to three destinations. +// +// To read data from your source stream or write data to destination streams, +// Amazon Kinesis Analytics needs your permissions. You grant these permissions +// by creating IAM roles. This operation requires permissions to perform the +// kinesisanalytics:CreateApplication action. +// +// For introductory exercises to create an Amazon Kinesis Analytics application, +// see Getting Started (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/getting-started.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. +// +// See the AWS API reference guide for Amazon Kinesis Analytics's +// API operation CreateApplication for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCodeValidationException "CodeValidationException" +// User-provided application code (query) is invalid. This can be a simple syntax +// error. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// Application is not available for this operation. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// Exceeded the number of applications allowed. +// +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// Specified input parameter value is invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/CreateApplication +func (c *KinesisAnalytics) CreateApplication(input *CreateApplicationInput) (*CreateApplicationOutput, error) { + req, out := c.CreateApplicationRequest(input) + return out, req.Send() +} + +// CreateApplicationWithContext is the same as CreateApplication with the addition of +// the ability to pass a context and additional request options. +// +// See CreateApplication 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 *KinesisAnalytics) CreateApplicationWithContext(ctx aws.Context, input *CreateApplicationInput, opts ...request.Option) (*CreateApplicationOutput, error) { + req, out := c.CreateApplicationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteApplication = "DeleteApplication" + +// DeleteApplicationRequest generates a "aws/request.Request" representing the +// client's request for the DeleteApplication 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 DeleteApplication for more information on using the DeleteApplication +// 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 DeleteApplicationRequest method. +// req, resp := client.DeleteApplicationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/DeleteApplication +func (c *KinesisAnalytics) DeleteApplicationRequest(input *DeleteApplicationInput) (req *request.Request, output *DeleteApplicationOutput) { + op := &request.Operation{ + Name: opDeleteApplication, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteApplicationInput{} + } + + output = &DeleteApplicationOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteApplication API operation for Amazon Kinesis Analytics. +// +// Deletes the specified application. Amazon Kinesis Analytics halts application +// execution and deletes the application, including any application artifacts +// (such as in-application streams, reference table, and application code). +// +// This operation requires permissions to perform the kinesisanalytics:DeleteApplication +// action. +// +// 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 Kinesis Analytics's +// API operation DeleteApplication for usage and error information. +// +// Returned Error Codes: +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Exception thrown as a result of concurrent modification to an application. +// For example, two individuals attempting to edit the same application at the +// same time. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// Specified application can't be found. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// Application is not available for this operation. +// +// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/DeleteApplication +func (c *KinesisAnalytics) DeleteApplication(input *DeleteApplicationInput) (*DeleteApplicationOutput, error) { + req, out := c.DeleteApplicationRequest(input) + return out, req.Send() +} + +// DeleteApplicationWithContext is the same as DeleteApplication with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteApplication 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 *KinesisAnalytics) DeleteApplicationWithContext(ctx aws.Context, input *DeleteApplicationInput, opts ...request.Option) (*DeleteApplicationOutput, error) { + req, out := c.DeleteApplicationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteApplicationCloudWatchLoggingOption = "DeleteApplicationCloudWatchLoggingOption" + +// DeleteApplicationCloudWatchLoggingOptionRequest generates a "aws/request.Request" representing the +// client's request for the DeleteApplicationCloudWatchLoggingOption 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 DeleteApplicationCloudWatchLoggingOption for more information on using the DeleteApplicationCloudWatchLoggingOption +// 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 DeleteApplicationCloudWatchLoggingOptionRequest method. +// req, resp := client.DeleteApplicationCloudWatchLoggingOptionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/DeleteApplicationCloudWatchLoggingOption +func (c *KinesisAnalytics) DeleteApplicationCloudWatchLoggingOptionRequest(input *DeleteApplicationCloudWatchLoggingOptionInput) (req *request.Request, output *DeleteApplicationCloudWatchLoggingOptionOutput) { + op := &request.Operation{ + Name: opDeleteApplicationCloudWatchLoggingOption, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteApplicationCloudWatchLoggingOptionInput{} + } + + output = &DeleteApplicationCloudWatchLoggingOptionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteApplicationCloudWatchLoggingOption API operation for Amazon Kinesis Analytics. +// +// Deletes a CloudWatch log stream from an application. For more information +// about using CloudWatch log streams with Amazon Kinesis Analytics applications, +// see Working with Amazon CloudWatch Logs (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/cloudwatch-logs.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. +// +// See the AWS API reference guide for Amazon Kinesis Analytics's +// API operation DeleteApplicationCloudWatchLoggingOption for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// Specified application can't be found. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// Application is not available for this operation. +// +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// Specified input parameter value is invalid. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Exception thrown as a result of concurrent modification to an application. +// For example, two individuals attempting to edit the same application at the +// same time. +// +// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/DeleteApplicationCloudWatchLoggingOption +func (c *KinesisAnalytics) DeleteApplicationCloudWatchLoggingOption(input *DeleteApplicationCloudWatchLoggingOptionInput) (*DeleteApplicationCloudWatchLoggingOptionOutput, error) { + req, out := c.DeleteApplicationCloudWatchLoggingOptionRequest(input) + return out, req.Send() +} + +// DeleteApplicationCloudWatchLoggingOptionWithContext is the same as DeleteApplicationCloudWatchLoggingOption with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteApplicationCloudWatchLoggingOption 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 *KinesisAnalytics) DeleteApplicationCloudWatchLoggingOptionWithContext(ctx aws.Context, input *DeleteApplicationCloudWatchLoggingOptionInput, opts ...request.Option) (*DeleteApplicationCloudWatchLoggingOptionOutput, error) { + req, out := c.DeleteApplicationCloudWatchLoggingOptionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteApplicationInputProcessingConfiguration = "DeleteApplicationInputProcessingConfiguration" + +// DeleteApplicationInputProcessingConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the DeleteApplicationInputProcessingConfiguration 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 DeleteApplicationInputProcessingConfiguration for more information on using the DeleteApplicationInputProcessingConfiguration +// 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 DeleteApplicationInputProcessingConfigurationRequest method. +// req, resp := client.DeleteApplicationInputProcessingConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/DeleteApplicationInputProcessingConfiguration +func (c *KinesisAnalytics) DeleteApplicationInputProcessingConfigurationRequest(input *DeleteApplicationInputProcessingConfigurationInput) (req *request.Request, output *DeleteApplicationInputProcessingConfigurationOutput) { + op := &request.Operation{ + Name: opDeleteApplicationInputProcessingConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteApplicationInputProcessingConfigurationInput{} + } + + output = &DeleteApplicationInputProcessingConfigurationOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteApplicationInputProcessingConfiguration API operation for Amazon Kinesis Analytics. +// +// Deletes an InputProcessingConfiguration from an input. +// +// 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 Kinesis Analytics's +// API operation DeleteApplicationInputProcessingConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// Specified application can't be found. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// Application is not available for this operation. +// +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// Specified input parameter value is invalid. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Exception thrown as a result of concurrent modification to an application. +// For example, two individuals attempting to edit the same application at the +// same time. +// +// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/DeleteApplicationInputProcessingConfiguration +func (c *KinesisAnalytics) DeleteApplicationInputProcessingConfiguration(input *DeleteApplicationInputProcessingConfigurationInput) (*DeleteApplicationInputProcessingConfigurationOutput, error) { + req, out := c.DeleteApplicationInputProcessingConfigurationRequest(input) + return out, req.Send() +} + +// DeleteApplicationInputProcessingConfigurationWithContext is the same as DeleteApplicationInputProcessingConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteApplicationInputProcessingConfiguration 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 *KinesisAnalytics) DeleteApplicationInputProcessingConfigurationWithContext(ctx aws.Context, input *DeleteApplicationInputProcessingConfigurationInput, opts ...request.Option) (*DeleteApplicationInputProcessingConfigurationOutput, error) { + req, out := c.DeleteApplicationInputProcessingConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteApplicationOutput = "DeleteApplicationOutput" + +// DeleteApplicationOutputRequest generates a "aws/request.Request" representing the +// client's request for the DeleteApplicationOutput 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 DeleteApplicationOutput for more information on using the DeleteApplicationOutput +// 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 DeleteApplicationOutputRequest method. +// req, resp := client.DeleteApplicationOutputRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/DeleteApplicationOutput +func (c *KinesisAnalytics) DeleteApplicationOutputRequest(input *DeleteApplicationOutputInput) (req *request.Request, output *DeleteApplicationOutputOutput) { + op := &request.Operation{ + Name: opDeleteApplicationOutput, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteApplicationOutputInput{} + } + + output = &DeleteApplicationOutputOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteApplicationOutput API operation for Amazon Kinesis Analytics. +// +// Deletes output destination configuration from your application configuration. +// Amazon Kinesis Analytics will no longer write data from the corresponding +// in-application stream to the external output destination. +// +// This operation requires permissions to perform the kinesisanalytics:DeleteApplicationOutput +// action. +// +// 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 Kinesis Analytics's +// API operation DeleteApplicationOutput for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// Specified application can't be found. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// Application is not available for this operation. +// +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// Specified input parameter value is invalid. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Exception thrown as a result of concurrent modification to an application. +// For example, two individuals attempting to edit the same application at the +// same time. +// +// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/DeleteApplicationOutput +func (c *KinesisAnalytics) DeleteApplicationOutput(input *DeleteApplicationOutputInput) (*DeleteApplicationOutputOutput, error) { + req, out := c.DeleteApplicationOutputRequest(input) + return out, req.Send() +} + +// DeleteApplicationOutputWithContext is the same as DeleteApplicationOutput with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteApplicationOutput 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 *KinesisAnalytics) DeleteApplicationOutputWithContext(ctx aws.Context, input *DeleteApplicationOutputInput, opts ...request.Option) (*DeleteApplicationOutputOutput, error) { + req, out := c.DeleteApplicationOutputRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteApplicationReferenceDataSource = "DeleteApplicationReferenceDataSource" + +// DeleteApplicationReferenceDataSourceRequest generates a "aws/request.Request" representing the +// client's request for the DeleteApplicationReferenceDataSource 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 DeleteApplicationReferenceDataSource for more information on using the DeleteApplicationReferenceDataSource +// 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 DeleteApplicationReferenceDataSourceRequest method. +// req, resp := client.DeleteApplicationReferenceDataSourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/DeleteApplicationReferenceDataSource +func (c *KinesisAnalytics) DeleteApplicationReferenceDataSourceRequest(input *DeleteApplicationReferenceDataSourceInput) (req *request.Request, output *DeleteApplicationReferenceDataSourceOutput) { + op := &request.Operation{ + Name: opDeleteApplicationReferenceDataSource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteApplicationReferenceDataSourceInput{} + } + + output = &DeleteApplicationReferenceDataSourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteApplicationReferenceDataSource API operation for Amazon Kinesis Analytics. +// +// Deletes a reference data source configuration from the specified application +// configuration. +// +// If the application is running, Amazon Kinesis Analytics immediately removes +// the in-application table that you created using the AddApplicationReferenceDataSource +// operation. +// +// This operation requires permissions to perform the kinesisanalytics.DeleteApplicationReferenceDataSource +// action. +// +// 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 Kinesis Analytics's +// API operation DeleteApplicationReferenceDataSource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// Specified application can't be found. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// Application is not available for this operation. +// +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// Specified input parameter value is invalid. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Exception thrown as a result of concurrent modification to an application. +// For example, two individuals attempting to edit the same application at the +// same time. +// +// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/DeleteApplicationReferenceDataSource +func (c *KinesisAnalytics) DeleteApplicationReferenceDataSource(input *DeleteApplicationReferenceDataSourceInput) (*DeleteApplicationReferenceDataSourceOutput, error) { + req, out := c.DeleteApplicationReferenceDataSourceRequest(input) + return out, req.Send() +} + +// DeleteApplicationReferenceDataSourceWithContext is the same as DeleteApplicationReferenceDataSource with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteApplicationReferenceDataSource 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 *KinesisAnalytics) DeleteApplicationReferenceDataSourceWithContext(ctx aws.Context, input *DeleteApplicationReferenceDataSourceInput, opts ...request.Option) (*DeleteApplicationReferenceDataSourceOutput, error) { + req, out := c.DeleteApplicationReferenceDataSourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeApplication = "DescribeApplication" + +// DescribeApplicationRequest generates a "aws/request.Request" representing the +// client's request for the DescribeApplication 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 DescribeApplication for more information on using the DescribeApplication +// 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 DescribeApplicationRequest method. +// req, resp := client.DescribeApplicationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/DescribeApplication +func (c *KinesisAnalytics) DescribeApplicationRequest(input *DescribeApplicationInput) (req *request.Request, output *DescribeApplicationOutput) { + op := &request.Operation{ + Name: opDescribeApplication, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeApplicationInput{} + } + + output = &DescribeApplicationOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeApplication API operation for Amazon Kinesis Analytics. +// +// Returns information about a specific Amazon Kinesis Analytics application. +// +// If you want to retrieve a list of all applications in your account, use the +// ListApplications operation. +// +// This operation requires permissions to perform the kinesisanalytics:DescribeApplication +// action. You can use DescribeApplication to get the current application versionId, +// which you need to call other operations such as Update. +// +// 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 Kinesis Analytics's +// API operation DescribeApplication for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// Specified application can't be found. +// +// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/DescribeApplication +func (c *KinesisAnalytics) DescribeApplication(input *DescribeApplicationInput) (*DescribeApplicationOutput, error) { + req, out := c.DescribeApplicationRequest(input) + return out, req.Send() +} + +// DescribeApplicationWithContext is the same as DescribeApplication with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeApplication 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 *KinesisAnalytics) DescribeApplicationWithContext(ctx aws.Context, input *DescribeApplicationInput, opts ...request.Option) (*DescribeApplicationOutput, error) { + req, out := c.DescribeApplicationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDiscoverInputSchema = "DiscoverInputSchema" + +// DiscoverInputSchemaRequest generates a "aws/request.Request" representing the +// client's request for the DiscoverInputSchema 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 DiscoverInputSchema for more information on using the DiscoverInputSchema +// 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 DiscoverInputSchemaRequest method. +// req, resp := client.DiscoverInputSchemaRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/DiscoverInputSchema +func (c *KinesisAnalytics) DiscoverInputSchemaRequest(input *DiscoverInputSchemaInput) (req *request.Request, output *DiscoverInputSchemaOutput) { + op := &request.Operation{ + Name: opDiscoverInputSchema, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DiscoverInputSchemaInput{} + } + + output = &DiscoverInputSchemaOutput{} + req = c.newRequest(op, input, output) + return +} + +// DiscoverInputSchema API operation for Amazon Kinesis Analytics. +// +// Infers a schema by evaluating sample records on the specified streaming source +// (Amazon Kinesis stream or Amazon Kinesis Firehose delivery stream) or S3 +// object. In the response, the operation returns the inferred schema and also +// the sample records that the operation used to infer the schema. +// +// You can use the inferred schema when configuring a streaming source for your +// application. For conceptual information, see Configuring Application Input +// (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-input.html). +// Note that when you create an application using the Amazon Kinesis Analytics +// console, the console uses this operation to infer a schema and show it in +// the console user interface. +// +// This operation requires permissions to perform the kinesisanalytics:DiscoverInputSchema +// action. +// +// 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 Kinesis Analytics's +// API operation DiscoverInputSchema for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// Specified input parameter value is invalid. +// +// * ErrCodeUnableToDetectSchemaException "UnableToDetectSchemaException" +// Data format is not valid. Amazon Kinesis Analytics is not able to detect +// schema for the given streaming source. +// +// * ErrCodeResourceProvisionedThroughputExceededException "ResourceProvisionedThroughputExceededException" +// Discovery failed to get a record from the streaming source because of the +// Amazon Kinesis Streams ProvisionedThroughputExceededException. For more information, +// see GetRecords (http://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetRecords.html) +// in the Amazon Kinesis Streams API Reference. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The service is unavailable. Back off and retry the operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/DiscoverInputSchema +func (c *KinesisAnalytics) DiscoverInputSchema(input *DiscoverInputSchemaInput) (*DiscoverInputSchemaOutput, error) { + req, out := c.DiscoverInputSchemaRequest(input) + return out, req.Send() +} + +// DiscoverInputSchemaWithContext is the same as DiscoverInputSchema with the addition of +// the ability to pass a context and additional request options. +// +// See DiscoverInputSchema 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 *KinesisAnalytics) DiscoverInputSchemaWithContext(ctx aws.Context, input *DiscoverInputSchemaInput, opts ...request.Option) (*DiscoverInputSchemaOutput, error) { + req, out := c.DiscoverInputSchemaRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListApplications = "ListApplications" + +// ListApplicationsRequest generates a "aws/request.Request" representing the +// client's request for the ListApplications 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 ListApplications for more information on using the ListApplications +// 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 ListApplicationsRequest method. +// req, resp := client.ListApplicationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/ListApplications +func (c *KinesisAnalytics) ListApplicationsRequest(input *ListApplicationsInput) (req *request.Request, output *ListApplicationsOutput) { + op := &request.Operation{ + Name: opListApplications, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListApplicationsInput{} + } + + output = &ListApplicationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListApplications API operation for Amazon Kinesis Analytics. +// +// Returns a list of Amazon Kinesis Analytics applications in your account. +// For each application, the response includes the application name, Amazon +// Resource Name (ARN), and status. If the response returns the HasMoreApplications +// value as true, you can send another request by adding the ExclusiveStartApplicationName +// in the request body, and set the value of this to the last application name +// from the previous response. +// +// If you want detailed information about a specific application, use DescribeApplication. +// +// This operation requires permissions to perform the kinesisanalytics:ListApplications +// action. +// +// 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 Kinesis Analytics's +// API operation ListApplications for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/ListApplications +func (c *KinesisAnalytics) ListApplications(input *ListApplicationsInput) (*ListApplicationsOutput, error) { + req, out := c.ListApplicationsRequest(input) + return out, req.Send() +} + +// ListApplicationsWithContext is the same as ListApplications with the addition of +// the ability to pass a context and additional request options. +// +// See ListApplications 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 *KinesisAnalytics) ListApplicationsWithContext(ctx aws.Context, input *ListApplicationsInput, opts ...request.Option) (*ListApplicationsOutput, error) { + req, out := c.ListApplicationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStartApplication = "StartApplication" + +// StartApplicationRequest generates a "aws/request.Request" representing the +// client's request for the StartApplication 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 StartApplication for more information on using the StartApplication +// 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 StartApplicationRequest method. +// req, resp := client.StartApplicationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/StartApplication +func (c *KinesisAnalytics) StartApplicationRequest(input *StartApplicationInput) (req *request.Request, output *StartApplicationOutput) { + op := &request.Operation{ + Name: opStartApplication, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartApplicationInput{} + } + + output = &StartApplicationOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// StartApplication API operation for Amazon Kinesis Analytics. +// +// Starts the specified Amazon Kinesis Analytics application. After creating +// an application, you must exclusively call this operation to start your application. +// +// After the application starts, it begins consuming the input data, processes +// it, and writes the output to the configured destination. +// +// The application status must be READY for you to start an application. You +// can get the application status in the console or using the DescribeApplication +// operation. +// +// After you start the application, you can stop the application from processing +// the input by calling the StopApplication operation. +// +// This operation requires permissions to perform the kinesisanalytics:StartApplication +// action. +// +// 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 Kinesis Analytics's +// API operation StartApplication for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// Specified application can't be found. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// Application is not available for this operation. +// +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// Specified input parameter value is invalid. +// +// * ErrCodeInvalidApplicationConfigurationException "InvalidApplicationConfigurationException" +// User-provided application configuration is not valid. +// +// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/StartApplication +func (c *KinesisAnalytics) StartApplication(input *StartApplicationInput) (*StartApplicationOutput, error) { + req, out := c.StartApplicationRequest(input) + return out, req.Send() +} + +// StartApplicationWithContext is the same as StartApplication with the addition of +// the ability to pass a context and additional request options. +// +// See StartApplication 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 *KinesisAnalytics) StartApplicationWithContext(ctx aws.Context, input *StartApplicationInput, opts ...request.Option) (*StartApplicationOutput, error) { + req, out := c.StartApplicationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStopApplication = "StopApplication" + +// StopApplicationRequest generates a "aws/request.Request" representing the +// client's request for the StopApplication 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 StopApplication for more information on using the StopApplication +// 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 StopApplicationRequest method. +// req, resp := client.StopApplicationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/StopApplication +func (c *KinesisAnalytics) StopApplicationRequest(input *StopApplicationInput) (req *request.Request, output *StopApplicationOutput) { + op := &request.Operation{ + Name: opStopApplication, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StopApplicationInput{} + } + + output = &StopApplicationOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// StopApplication API operation for Amazon Kinesis Analytics. +// +// Stops the application from processing input data. You can stop an application +// only if it is in the running state. You can use the DescribeApplication operation +// to find the application state. After the application is stopped, Amazon Kinesis +// Analytics stops reading data from the input, the application stops processing +// data, and there is no output written to the destination. +// +// This operation requires permissions to perform the kinesisanalytics:StopApplication +// action. +// +// 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 Kinesis Analytics's +// API operation StopApplication for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// Specified application can't be found. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// Application is not available for this operation. +// +// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/StopApplication +func (c *KinesisAnalytics) StopApplication(input *StopApplicationInput) (*StopApplicationOutput, error) { + req, out := c.StopApplicationRequest(input) + return out, req.Send() +} + +// StopApplicationWithContext is the same as StopApplication with the addition of +// the ability to pass a context and additional request options. +// +// See StopApplication 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 *KinesisAnalytics) StopApplicationWithContext(ctx aws.Context, input *StopApplicationInput, opts ...request.Option) (*StopApplicationOutput, error) { + req, out := c.StopApplicationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateApplication = "UpdateApplication" + +// UpdateApplicationRequest generates a "aws/request.Request" representing the +// client's request for the UpdateApplication 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 UpdateApplication for more information on using the UpdateApplication +// 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 UpdateApplicationRequest method. +// req, resp := client.UpdateApplicationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/UpdateApplication +func (c *KinesisAnalytics) UpdateApplicationRequest(input *UpdateApplicationInput) (req *request.Request, output *UpdateApplicationOutput) { + op := &request.Operation{ + Name: opUpdateApplication, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateApplicationInput{} + } + + output = &UpdateApplicationOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateApplication API operation for Amazon Kinesis Analytics. +// +// Updates an existing Amazon Kinesis Analytics application. Using this API, +// you can update application code, input configuration, and output configuration. +// +// Note that Amazon Kinesis Analytics updates the CurrentApplicationVersionId +// each time you update your application. +// +// This operation requires permission for the kinesisanalytics:UpdateApplication +// action. +// +// 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 Kinesis Analytics's +// API operation UpdateApplication for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCodeValidationException "CodeValidationException" +// User-provided application code (query) is invalid. This can be a simple syntax +// error. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// Specified application can't be found. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// Application is not available for this operation. +// +// * ErrCodeInvalidArgumentException "InvalidArgumentException" +// Specified input parameter value is invalid. +// +// * ErrCodeConcurrentModificationException "ConcurrentModificationException" +// Exception thrown as a result of concurrent modification to an application. +// For example, two individuals attempting to edit the same application at the +// same time. +// +// * ErrCodeUnsupportedOperationException "UnsupportedOperationException" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14/UpdateApplication +func (c *KinesisAnalytics) UpdateApplication(input *UpdateApplicationInput) (*UpdateApplicationOutput, error) { + req, out := c.UpdateApplicationRequest(input) + return out, req.Send() +} + +// UpdateApplicationWithContext is the same as UpdateApplication with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateApplication 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 *KinesisAnalytics) UpdateApplicationWithContext(ctx aws.Context, input *UpdateApplicationInput, opts ...request.Option) (*UpdateApplicationOutput, error) { + req, out := c.UpdateApplicationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type AddApplicationCloudWatchLoggingOptionInput struct { + _ struct{} `type:"structure"` + + // The Kinesis Analytics application name. + // + // ApplicationName is a required field + ApplicationName *string `min:"1" type:"string" required:"true"` + + // Provides the CloudWatch log stream Amazon Resource Name (ARN) and the IAM + // role ARN. Note: To write application messages to CloudWatch, the IAM role + // that is used must have the PutLogEvents policy action enabled. + // + // CloudWatchLoggingOption is a required field + CloudWatchLoggingOption *CloudWatchLoggingOption `type:"structure" required:"true"` + + // The version ID of the Kinesis Analytics application. + // + // CurrentApplicationVersionId is a required field + CurrentApplicationVersionId *int64 `min:"1" type:"long" required:"true"` +} + +// String returns the string representation +func (s AddApplicationCloudWatchLoggingOptionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddApplicationCloudWatchLoggingOptionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddApplicationCloudWatchLoggingOptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddApplicationCloudWatchLoggingOptionInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.CloudWatchLoggingOption == nil { + invalidParams.Add(request.NewErrParamRequired("CloudWatchLoggingOption")) + } + if s.CurrentApplicationVersionId == nil { + invalidParams.Add(request.NewErrParamRequired("CurrentApplicationVersionId")) + } + if s.CurrentApplicationVersionId != nil && *s.CurrentApplicationVersionId < 1 { + invalidParams.Add(request.NewErrParamMinValue("CurrentApplicationVersionId", 1)) + } + if s.CloudWatchLoggingOption != nil { + if err := s.CloudWatchLoggingOption.Validate(); err != nil { + invalidParams.AddNested("CloudWatchLoggingOption", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationName sets the ApplicationName field's value. +func (s *AddApplicationCloudWatchLoggingOptionInput) SetApplicationName(v string) *AddApplicationCloudWatchLoggingOptionInput { + s.ApplicationName = &v + return s +} + +// SetCloudWatchLoggingOption sets the CloudWatchLoggingOption field's value. +func (s *AddApplicationCloudWatchLoggingOptionInput) SetCloudWatchLoggingOption(v *CloudWatchLoggingOption) *AddApplicationCloudWatchLoggingOptionInput { + s.CloudWatchLoggingOption = v + return s +} + +// SetCurrentApplicationVersionId sets the CurrentApplicationVersionId field's value. +func (s *AddApplicationCloudWatchLoggingOptionInput) SetCurrentApplicationVersionId(v int64) *AddApplicationCloudWatchLoggingOptionInput { + s.CurrentApplicationVersionId = &v + return s +} + +type AddApplicationCloudWatchLoggingOptionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AddApplicationCloudWatchLoggingOptionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddApplicationCloudWatchLoggingOptionOutput) GoString() string { + return s.String() +} + +type AddApplicationInputInput struct { + _ struct{} `type:"structure"` + + // Name of your existing Amazon Kinesis Analytics application to which you want + // to add the streaming source. + // + // ApplicationName is a required field + ApplicationName *string `min:"1" type:"string" required:"true"` + + // Current version of your Amazon Kinesis Analytics application. You can use + // the DescribeApplication operation to find the current application version. + // + // CurrentApplicationVersionId is a required field + CurrentApplicationVersionId *int64 `min:"1" type:"long" required:"true"` + + // The Input to add. + // + // Input is a required field + Input *Input `type:"structure" required:"true"` +} + +// String returns the string representation +func (s AddApplicationInputInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddApplicationInputInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddApplicationInputInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddApplicationInputInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.CurrentApplicationVersionId == nil { + invalidParams.Add(request.NewErrParamRequired("CurrentApplicationVersionId")) + } + if s.CurrentApplicationVersionId != nil && *s.CurrentApplicationVersionId < 1 { + invalidParams.Add(request.NewErrParamMinValue("CurrentApplicationVersionId", 1)) + } + if s.Input == nil { + invalidParams.Add(request.NewErrParamRequired("Input")) + } + if s.Input != nil { + if err := s.Input.Validate(); err != nil { + invalidParams.AddNested("Input", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationName sets the ApplicationName field's value. +func (s *AddApplicationInputInput) SetApplicationName(v string) *AddApplicationInputInput { + s.ApplicationName = &v + return s +} + +// SetCurrentApplicationVersionId sets the CurrentApplicationVersionId field's value. +func (s *AddApplicationInputInput) SetCurrentApplicationVersionId(v int64) *AddApplicationInputInput { + s.CurrentApplicationVersionId = &v + return s +} + +// SetInput sets the Input field's value. +func (s *AddApplicationInputInput) SetInput(v *Input) *AddApplicationInputInput { + s.Input = v + return s +} + +type AddApplicationInputOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AddApplicationInputOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddApplicationInputOutput) GoString() string { + return s.String() +} + +type AddApplicationInputProcessingConfigurationInput struct { + _ struct{} `type:"structure"` + + // Name of the application to which you want to add the input processing configuration. + // + // ApplicationName is a required field + ApplicationName *string `min:"1" type:"string" required:"true"` + + // Version of the application to which you want to add the input processing + // configuration. You can use the DescribeApplication operation to get the current + // application version. If the version specified is not the current version, + // the ConcurrentModificationException is returned. + // + // CurrentApplicationVersionId is a required field + CurrentApplicationVersionId *int64 `min:"1" type:"long" required:"true"` + + // The ID of the input configuration to add the input processing configuration + // to. You can get a list of the input IDs for an application using the DescribeApplication + // operation. + // + // InputId is a required field + InputId *string `min:"1" type:"string" required:"true"` + + // The InputProcessingConfiguration to add to the application. + // + // InputProcessingConfiguration is a required field + InputProcessingConfiguration *InputProcessingConfiguration `type:"structure" required:"true"` +} + +// String returns the string representation +func (s AddApplicationInputProcessingConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddApplicationInputProcessingConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddApplicationInputProcessingConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddApplicationInputProcessingConfigurationInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.CurrentApplicationVersionId == nil { + invalidParams.Add(request.NewErrParamRequired("CurrentApplicationVersionId")) + } + if s.CurrentApplicationVersionId != nil && *s.CurrentApplicationVersionId < 1 { + invalidParams.Add(request.NewErrParamMinValue("CurrentApplicationVersionId", 1)) + } + if s.InputId == nil { + invalidParams.Add(request.NewErrParamRequired("InputId")) + } + if s.InputId != nil && len(*s.InputId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InputId", 1)) + } + if s.InputProcessingConfiguration == nil { + invalidParams.Add(request.NewErrParamRequired("InputProcessingConfiguration")) + } + if s.InputProcessingConfiguration != nil { + if err := s.InputProcessingConfiguration.Validate(); err != nil { + invalidParams.AddNested("InputProcessingConfiguration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationName sets the ApplicationName field's value. +func (s *AddApplicationInputProcessingConfigurationInput) SetApplicationName(v string) *AddApplicationInputProcessingConfigurationInput { + s.ApplicationName = &v + return s +} + +// SetCurrentApplicationVersionId sets the CurrentApplicationVersionId field's value. +func (s *AddApplicationInputProcessingConfigurationInput) SetCurrentApplicationVersionId(v int64) *AddApplicationInputProcessingConfigurationInput { + s.CurrentApplicationVersionId = &v + return s +} + +// SetInputId sets the InputId field's value. +func (s *AddApplicationInputProcessingConfigurationInput) SetInputId(v string) *AddApplicationInputProcessingConfigurationInput { + s.InputId = &v + return s +} + +// SetInputProcessingConfiguration sets the InputProcessingConfiguration field's value. +func (s *AddApplicationInputProcessingConfigurationInput) SetInputProcessingConfiguration(v *InputProcessingConfiguration) *AddApplicationInputProcessingConfigurationInput { + s.InputProcessingConfiguration = v + return s +} + +type AddApplicationInputProcessingConfigurationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AddApplicationInputProcessingConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddApplicationInputProcessingConfigurationOutput) GoString() string { + return s.String() +} + +type AddApplicationOutputInput struct { + _ struct{} `type:"structure"` + + // Name of the application to which you want to add the output configuration. + // + // ApplicationName is a required field + ApplicationName *string `min:"1" type:"string" required:"true"` + + // Version of the application to which you want to add the output configuration. + // You can use the DescribeApplication operation to get the current application + // version. If the version specified is not the current version, the ConcurrentModificationException + // is returned. + // + // CurrentApplicationVersionId is a required field + CurrentApplicationVersionId *int64 `min:"1" type:"long" required:"true"` + + // An array of objects, each describing one output configuration. In the output + // configuration, you specify the name of an in-application stream, a destination + // (that is, an Amazon Kinesis stream, an Amazon Kinesis Firehose delivery stream, + // or an AWS Lambda function), and record the formation to use when writing + // to the destination. + // + // Output is a required field + Output *Output `type:"structure" required:"true"` +} + +// String returns the string representation +func (s AddApplicationOutputInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddApplicationOutputInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddApplicationOutputInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddApplicationOutputInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.CurrentApplicationVersionId == nil { + invalidParams.Add(request.NewErrParamRequired("CurrentApplicationVersionId")) + } + if s.CurrentApplicationVersionId != nil && *s.CurrentApplicationVersionId < 1 { + invalidParams.Add(request.NewErrParamMinValue("CurrentApplicationVersionId", 1)) + } + if s.Output == nil { + invalidParams.Add(request.NewErrParamRequired("Output")) + } + if s.Output != nil { + if err := s.Output.Validate(); err != nil { + invalidParams.AddNested("Output", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationName sets the ApplicationName field's value. +func (s *AddApplicationOutputInput) SetApplicationName(v string) *AddApplicationOutputInput { + s.ApplicationName = &v + return s +} + +// SetCurrentApplicationVersionId sets the CurrentApplicationVersionId field's value. +func (s *AddApplicationOutputInput) SetCurrentApplicationVersionId(v int64) *AddApplicationOutputInput { + s.CurrentApplicationVersionId = &v + return s +} + +// SetOutput sets the Output field's value. +func (s *AddApplicationOutputInput) SetOutput(v *Output) *AddApplicationOutputInput { + s.Output = v + return s +} + +type AddApplicationOutputOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AddApplicationOutputOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddApplicationOutputOutput) GoString() string { + return s.String() +} + +type AddApplicationReferenceDataSourceInput struct { + _ struct{} `type:"structure"` + + // Name of an existing application. + // + // ApplicationName is a required field + ApplicationName *string `min:"1" type:"string" required:"true"` + + // Version of the application for which you are adding the reference data source. + // You can use the DescribeApplication operation to get the current application + // version. If the version specified is not the current version, the ConcurrentModificationException + // is returned. + // + // CurrentApplicationVersionId is a required field + CurrentApplicationVersionId *int64 `min:"1" type:"long" required:"true"` + + // The reference data source can be an object in your Amazon S3 bucket. Amazon + // Kinesis Analytics reads the object and copies the data into the in-application + // table that is created. You provide an S3 bucket, object key name, and the + // resulting in-application table that is created. You must also provide an + // IAM role with the necessary permissions that Amazon Kinesis Analytics can + // assume to read the object from your S3 bucket on your behalf. + // + // ReferenceDataSource is a required field + ReferenceDataSource *ReferenceDataSource `type:"structure" required:"true"` +} + +// String returns the string representation +func (s AddApplicationReferenceDataSourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddApplicationReferenceDataSourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddApplicationReferenceDataSourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddApplicationReferenceDataSourceInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.CurrentApplicationVersionId == nil { + invalidParams.Add(request.NewErrParamRequired("CurrentApplicationVersionId")) + } + if s.CurrentApplicationVersionId != nil && *s.CurrentApplicationVersionId < 1 { + invalidParams.Add(request.NewErrParamMinValue("CurrentApplicationVersionId", 1)) + } + if s.ReferenceDataSource == nil { + invalidParams.Add(request.NewErrParamRequired("ReferenceDataSource")) + } + if s.ReferenceDataSource != nil { + if err := s.ReferenceDataSource.Validate(); err != nil { + invalidParams.AddNested("ReferenceDataSource", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationName sets the ApplicationName field's value. +func (s *AddApplicationReferenceDataSourceInput) SetApplicationName(v string) *AddApplicationReferenceDataSourceInput { + s.ApplicationName = &v + return s +} + +// SetCurrentApplicationVersionId sets the CurrentApplicationVersionId field's value. +func (s *AddApplicationReferenceDataSourceInput) SetCurrentApplicationVersionId(v int64) *AddApplicationReferenceDataSourceInput { + s.CurrentApplicationVersionId = &v + return s +} + +// SetReferenceDataSource sets the ReferenceDataSource field's value. +func (s *AddApplicationReferenceDataSourceInput) SetReferenceDataSource(v *ReferenceDataSource) *AddApplicationReferenceDataSourceInput { + s.ReferenceDataSource = v + return s +} + +type AddApplicationReferenceDataSourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AddApplicationReferenceDataSourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddApplicationReferenceDataSourceOutput) GoString() string { + return s.String() +} + +// Provides a description of the application, including the application Amazon +// Resource Name (ARN), status, latest version, and input and output configuration. +type ApplicationDetail struct { + _ struct{} `type:"structure"` + + // ARN of the application. + // + // ApplicationARN is a required field + ApplicationARN *string `min:"1" type:"string" required:"true"` + + // Returns the application code that you provided to perform data analysis on + // any of the in-application streams in your application. + ApplicationCode *string `type:"string"` + + // Description of the application. + ApplicationDescription *string `type:"string"` + + // Name of the application. + // + // ApplicationName is a required field + ApplicationName *string `min:"1" type:"string" required:"true"` + + // Status of the application. + // + // ApplicationStatus is a required field + ApplicationStatus *string `type:"string" required:"true" enum:"ApplicationStatus"` + + // Provides the current application version. + // + // ApplicationVersionId is a required field + ApplicationVersionId *int64 `min:"1" type:"long" required:"true"` + + // Describes the CloudWatch log streams that are configured to receive application + // messages. For more information about using CloudWatch log streams with Amazon + // Kinesis Analytics applications, see Working with Amazon CloudWatch Logs (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/cloudwatch-logs.html). + CloudWatchLoggingOptionDescriptions []*CloudWatchLoggingOptionDescription `type:"list"` + + // Time stamp when the application version was created. + CreateTimestamp *time.Time `type:"timestamp"` + + // Describes the application input configuration. For more information, see + // Configuring Application Input (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-input.html). + InputDescriptions []*InputDescription `type:"list"` + + // Time stamp when the application was last updated. + LastUpdateTimestamp *time.Time `type:"timestamp"` + + // Describes the application output configuration. For more information, see + // Configuring Application Output (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-output.html). + OutputDescriptions []*OutputDescription `type:"list"` + + // Describes reference data sources configured for the application. For more + // information, see Configuring Application Input (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-input.html). + ReferenceDataSourceDescriptions []*ReferenceDataSourceDescription `type:"list"` +} + +// String returns the string representation +func (s ApplicationDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ApplicationDetail) GoString() string { + return s.String() +} + +// SetApplicationARN sets the ApplicationARN field's value. +func (s *ApplicationDetail) SetApplicationARN(v string) *ApplicationDetail { + s.ApplicationARN = &v + return s +} + +// SetApplicationCode sets the ApplicationCode field's value. +func (s *ApplicationDetail) SetApplicationCode(v string) *ApplicationDetail { + s.ApplicationCode = &v + return s +} + +// SetApplicationDescription sets the ApplicationDescription field's value. +func (s *ApplicationDetail) SetApplicationDescription(v string) *ApplicationDetail { + s.ApplicationDescription = &v + return s +} + +// SetApplicationName sets the ApplicationName field's value. +func (s *ApplicationDetail) SetApplicationName(v string) *ApplicationDetail { + s.ApplicationName = &v + return s +} + +// SetApplicationStatus sets the ApplicationStatus field's value. +func (s *ApplicationDetail) SetApplicationStatus(v string) *ApplicationDetail { + s.ApplicationStatus = &v + return s +} + +// SetApplicationVersionId sets the ApplicationVersionId field's value. +func (s *ApplicationDetail) SetApplicationVersionId(v int64) *ApplicationDetail { + s.ApplicationVersionId = &v + return s +} + +// SetCloudWatchLoggingOptionDescriptions sets the CloudWatchLoggingOptionDescriptions field's value. +func (s *ApplicationDetail) SetCloudWatchLoggingOptionDescriptions(v []*CloudWatchLoggingOptionDescription) *ApplicationDetail { + s.CloudWatchLoggingOptionDescriptions = v + return s +} + +// SetCreateTimestamp sets the CreateTimestamp field's value. +func (s *ApplicationDetail) SetCreateTimestamp(v time.Time) *ApplicationDetail { + s.CreateTimestamp = &v + return s +} + +// SetInputDescriptions sets the InputDescriptions field's value. +func (s *ApplicationDetail) SetInputDescriptions(v []*InputDescription) *ApplicationDetail { + s.InputDescriptions = v + return s +} + +// SetLastUpdateTimestamp sets the LastUpdateTimestamp field's value. +func (s *ApplicationDetail) SetLastUpdateTimestamp(v time.Time) *ApplicationDetail { + s.LastUpdateTimestamp = &v + return s +} + +// SetOutputDescriptions sets the OutputDescriptions field's value. +func (s *ApplicationDetail) SetOutputDescriptions(v []*OutputDescription) *ApplicationDetail { + s.OutputDescriptions = v + return s +} + +// SetReferenceDataSourceDescriptions sets the ReferenceDataSourceDescriptions field's value. +func (s *ApplicationDetail) SetReferenceDataSourceDescriptions(v []*ReferenceDataSourceDescription) *ApplicationDetail { + s.ReferenceDataSourceDescriptions = v + return s +} + +// Provides application summary information, including the application Amazon +// Resource Name (ARN), name, and status. +type ApplicationSummary struct { + _ struct{} `type:"structure"` + + // ARN of the application. + // + // ApplicationARN is a required field + ApplicationARN *string `min:"1" type:"string" required:"true"` + + // Name of the application. + // + // ApplicationName is a required field + ApplicationName *string `min:"1" type:"string" required:"true"` + + // Status of the application. + // + // ApplicationStatus is a required field + ApplicationStatus *string `type:"string" required:"true" enum:"ApplicationStatus"` +} + +// String returns the string representation +func (s ApplicationSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ApplicationSummary) GoString() string { + return s.String() +} + +// SetApplicationARN sets the ApplicationARN field's value. +func (s *ApplicationSummary) SetApplicationARN(v string) *ApplicationSummary { + s.ApplicationARN = &v + return s +} + +// SetApplicationName sets the ApplicationName field's value. +func (s *ApplicationSummary) SetApplicationName(v string) *ApplicationSummary { + s.ApplicationName = &v + return s +} + +// SetApplicationStatus sets the ApplicationStatus field's value. +func (s *ApplicationSummary) SetApplicationStatus(v string) *ApplicationSummary { + s.ApplicationStatus = &v + return s +} + +// Describes updates to apply to an existing Amazon Kinesis Analytics application. +type ApplicationUpdate struct { + _ struct{} `type:"structure"` + + // Describes application code updates. + ApplicationCodeUpdate *string `type:"string"` + + // Describes application CloudWatch logging option updates. + CloudWatchLoggingOptionUpdates []*CloudWatchLoggingOptionUpdate `type:"list"` + + // Describes application input configuration updates. + InputUpdates []*InputUpdate `type:"list"` + + // Describes application output configuration updates. + OutputUpdates []*OutputUpdate `type:"list"` + + // Describes application reference data source updates. + ReferenceDataSourceUpdates []*ReferenceDataSourceUpdate `type:"list"` +} + +// String returns the string representation +func (s ApplicationUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ApplicationUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ApplicationUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ApplicationUpdate"} + if s.CloudWatchLoggingOptionUpdates != nil { + for i, v := range s.CloudWatchLoggingOptionUpdates { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CloudWatchLoggingOptionUpdates", i), err.(request.ErrInvalidParams)) + } + } + } + if s.InputUpdates != nil { + for i, v := range s.InputUpdates { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InputUpdates", i), err.(request.ErrInvalidParams)) + } + } + } + if s.OutputUpdates != nil { + for i, v := range s.OutputUpdates { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "OutputUpdates", i), err.(request.ErrInvalidParams)) + } + } + } + if s.ReferenceDataSourceUpdates != nil { + for i, v := range s.ReferenceDataSourceUpdates { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ReferenceDataSourceUpdates", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationCodeUpdate sets the ApplicationCodeUpdate field's value. +func (s *ApplicationUpdate) SetApplicationCodeUpdate(v string) *ApplicationUpdate { + s.ApplicationCodeUpdate = &v + return s +} + +// SetCloudWatchLoggingOptionUpdates sets the CloudWatchLoggingOptionUpdates field's value. +func (s *ApplicationUpdate) SetCloudWatchLoggingOptionUpdates(v []*CloudWatchLoggingOptionUpdate) *ApplicationUpdate { + s.CloudWatchLoggingOptionUpdates = v + return s +} + +// SetInputUpdates sets the InputUpdates field's value. +func (s *ApplicationUpdate) SetInputUpdates(v []*InputUpdate) *ApplicationUpdate { + s.InputUpdates = v + return s +} + +// SetOutputUpdates sets the OutputUpdates field's value. +func (s *ApplicationUpdate) SetOutputUpdates(v []*OutputUpdate) *ApplicationUpdate { + s.OutputUpdates = v + return s +} + +// SetReferenceDataSourceUpdates sets the ReferenceDataSourceUpdates field's value. +func (s *ApplicationUpdate) SetReferenceDataSourceUpdates(v []*ReferenceDataSourceUpdate) *ApplicationUpdate { + s.ReferenceDataSourceUpdates = v + return s +} + +// Provides additional mapping information when the record format uses delimiters, +// such as CSV. For example, the following sample records use CSV format, where +// the records use the '\n' as the row delimiter and a comma (",") as the column +// delimiter: +// +// "name1", "address1" +// +// "name2", "address2" +type CSVMappingParameters struct { + _ struct{} `type:"structure"` + + // Column delimiter. For example, in a CSV format, a comma (",") is the typical + // column delimiter. + // + // RecordColumnDelimiter is a required field + RecordColumnDelimiter *string `min:"1" type:"string" required:"true"` + + // Row delimiter. For example, in a CSV format, '\n' is the typical row delimiter. + // + // RecordRowDelimiter is a required field + RecordRowDelimiter *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CSVMappingParameters) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CSVMappingParameters) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CSVMappingParameters) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CSVMappingParameters"} + if s.RecordColumnDelimiter == nil { + invalidParams.Add(request.NewErrParamRequired("RecordColumnDelimiter")) + } + if s.RecordColumnDelimiter != nil && len(*s.RecordColumnDelimiter) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RecordColumnDelimiter", 1)) + } + if s.RecordRowDelimiter == nil { + invalidParams.Add(request.NewErrParamRequired("RecordRowDelimiter")) + } + if s.RecordRowDelimiter != nil && len(*s.RecordRowDelimiter) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RecordRowDelimiter", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRecordColumnDelimiter sets the RecordColumnDelimiter field's value. +func (s *CSVMappingParameters) SetRecordColumnDelimiter(v string) *CSVMappingParameters { + s.RecordColumnDelimiter = &v + return s +} + +// SetRecordRowDelimiter sets the RecordRowDelimiter field's value. +func (s *CSVMappingParameters) SetRecordRowDelimiter(v string) *CSVMappingParameters { + s.RecordRowDelimiter = &v + return s +} + +// Provides a description of CloudWatch logging options, including the log stream +// Amazon Resource Name (ARN) and the role ARN. +type CloudWatchLoggingOption struct { + _ struct{} `type:"structure"` + + // ARN of the CloudWatch log to receive application messages. + // + // LogStreamARN is a required field + LogStreamARN *string `min:"1" type:"string" required:"true"` + + // IAM ARN of the role to use to send application messages. Note: To write application + // messages to CloudWatch, the IAM role that is used must have the PutLogEvents + // policy action enabled. + // + // RoleARN is a required field + RoleARN *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CloudWatchLoggingOption) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CloudWatchLoggingOption) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CloudWatchLoggingOption) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CloudWatchLoggingOption"} + if s.LogStreamARN == nil { + invalidParams.Add(request.NewErrParamRequired("LogStreamARN")) + } + if s.LogStreamARN != nil && len(*s.LogStreamARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogStreamARN", 1)) + } + if s.RoleARN == nil { + invalidParams.Add(request.NewErrParamRequired("RoleARN")) + } + if s.RoleARN != nil && len(*s.RoleARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLogStreamARN sets the LogStreamARN field's value. +func (s *CloudWatchLoggingOption) SetLogStreamARN(v string) *CloudWatchLoggingOption { + s.LogStreamARN = &v + return s +} + +// SetRoleARN sets the RoleARN field's value. +func (s *CloudWatchLoggingOption) SetRoleARN(v string) *CloudWatchLoggingOption { + s.RoleARN = &v + return s +} + +// Description of the CloudWatch logging option. +type CloudWatchLoggingOptionDescription struct { + _ struct{} `type:"structure"` + + // ID of the CloudWatch logging option description. + CloudWatchLoggingOptionId *string `min:"1" type:"string"` + + // ARN of the CloudWatch log to receive application messages. + // + // LogStreamARN is a required field + LogStreamARN *string `min:"1" type:"string" required:"true"` + + // IAM ARN of the role to use to send application messages. Note: To write application + // messages to CloudWatch, the IAM role used must have the PutLogEvents policy + // action enabled. + // + // RoleARN is a required field + RoleARN *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CloudWatchLoggingOptionDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CloudWatchLoggingOptionDescription) GoString() string { + return s.String() +} + +// SetCloudWatchLoggingOptionId sets the CloudWatchLoggingOptionId field's value. +func (s *CloudWatchLoggingOptionDescription) SetCloudWatchLoggingOptionId(v string) *CloudWatchLoggingOptionDescription { + s.CloudWatchLoggingOptionId = &v + return s +} + +// SetLogStreamARN sets the LogStreamARN field's value. +func (s *CloudWatchLoggingOptionDescription) SetLogStreamARN(v string) *CloudWatchLoggingOptionDescription { + s.LogStreamARN = &v + return s +} + +// SetRoleARN sets the RoleARN field's value. +func (s *CloudWatchLoggingOptionDescription) SetRoleARN(v string) *CloudWatchLoggingOptionDescription { + s.RoleARN = &v + return s +} + +// Describes CloudWatch logging option updates. +type CloudWatchLoggingOptionUpdate struct { + _ struct{} `type:"structure"` + + // ID of the CloudWatch logging option to update + // + // CloudWatchLoggingOptionId is a required field + CloudWatchLoggingOptionId *string `min:"1" type:"string" required:"true"` + + // ARN of the CloudWatch log to receive application messages. + LogStreamARNUpdate *string `min:"1" type:"string"` + + // IAM ARN of the role to use to send application messages. Note: To write application + // messages to CloudWatch, the IAM role used must have the PutLogEvents policy + // action enabled. + RoleARNUpdate *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s CloudWatchLoggingOptionUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CloudWatchLoggingOptionUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CloudWatchLoggingOptionUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CloudWatchLoggingOptionUpdate"} + if s.CloudWatchLoggingOptionId == nil { + invalidParams.Add(request.NewErrParamRequired("CloudWatchLoggingOptionId")) + } + if s.CloudWatchLoggingOptionId != nil && len(*s.CloudWatchLoggingOptionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CloudWatchLoggingOptionId", 1)) + } + if s.LogStreamARNUpdate != nil && len(*s.LogStreamARNUpdate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogStreamARNUpdate", 1)) + } + if s.RoleARNUpdate != nil && len(*s.RoleARNUpdate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleARNUpdate", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCloudWatchLoggingOptionId sets the CloudWatchLoggingOptionId field's value. +func (s *CloudWatchLoggingOptionUpdate) SetCloudWatchLoggingOptionId(v string) *CloudWatchLoggingOptionUpdate { + s.CloudWatchLoggingOptionId = &v + return s +} + +// SetLogStreamARNUpdate sets the LogStreamARNUpdate field's value. +func (s *CloudWatchLoggingOptionUpdate) SetLogStreamARNUpdate(v string) *CloudWatchLoggingOptionUpdate { + s.LogStreamARNUpdate = &v + return s +} + +// SetRoleARNUpdate sets the RoleARNUpdate field's value. +func (s *CloudWatchLoggingOptionUpdate) SetRoleARNUpdate(v string) *CloudWatchLoggingOptionUpdate { + s.RoleARNUpdate = &v + return s +} + +// TBD +type CreateApplicationInput struct { + _ struct{} `type:"structure"` + + // One or more SQL statements that read input data, transform it, and generate + // output. For example, you can write a SQL statement that reads data from one + // in-application stream, generates a running average of the number of advertisement + // clicks by vendor, and insert resulting rows in another in-application stream + // using pumps. For more information about the typical pattern, see Application + // Code (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-app-code.html). + // + // You can provide such series of SQL statements, where output of one statement + // can be used as the input for the next statement. You store intermediate results + // by creating in-application streams and pumps. + // + // Note that the application code must create the streams with names specified + // in the Outputs. For example, if your Outputs defines output streams named + // ExampleOutputStream1 and ExampleOutputStream2, then your application code + // must create these streams. + ApplicationCode *string `type:"string"` + + // Summary description of the application. + ApplicationDescription *string `type:"string"` + + // Name of your Amazon Kinesis Analytics application (for example, sample-app). + // + // ApplicationName is a required field + ApplicationName *string `min:"1" type:"string" required:"true"` + + // Use this parameter to configure a CloudWatch log stream to monitor application + // configuration errors. For more information, see Working with Amazon CloudWatch + // Logs (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/cloudwatch-logs.html). + CloudWatchLoggingOptions []*CloudWatchLoggingOption `type:"list"` + + // Use this parameter to configure the application input. + // + // You can configure your application to receive input from a single streaming + // source. In this configuration, you map this streaming source to an in-application + // stream that is created. Your application code can then query the in-application + // stream like a table (you can think of it as a constantly updating table). + // + // For the streaming source, you provide its Amazon Resource Name (ARN) and + // format of data on the stream (for example, JSON, CSV, etc.). You also must + // provide an IAM role that Amazon Kinesis Analytics can assume to read this + // stream on your behalf. + // + // To create the in-application stream, you need to specify a schema to transform + // your data into a schematized version used in SQL. In the schema, you provide + // the necessary mapping of the data elements in the streaming source to record + // columns in the in-app stream. + Inputs []*Input `type:"list"` + + // You can configure application output to write data from any of the in-application + // streams to up to three destinations. + // + // These destinations can be Amazon Kinesis streams, Amazon Kinesis Firehose + // delivery streams, AWS Lambda destinations, or any combination of the three. + // + // In the configuration, you specify the in-application stream name, the destination + // stream or Lambda function Amazon Resource Name (ARN), and the format to use + // when writing data. You must also provide an IAM role that Amazon Kinesis + // Analytics can assume to write to the destination stream or Lambda function + // on your behalf. + // + // In the output configuration, you also provide the output stream or Lambda + // function ARN. For stream destinations, you provide the format of data in + // the stream (for example, JSON, CSV). You also must provide an IAM role that + // Amazon Kinesis Analytics can assume to write to the stream or Lambda function + // on your behalf. + Outputs []*Output `type:"list"` +} + +// String returns the string representation +func (s CreateApplicationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateApplicationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateApplicationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateApplicationInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.CloudWatchLoggingOptions != nil { + for i, v := range s.CloudWatchLoggingOptions { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CloudWatchLoggingOptions", i), err.(request.ErrInvalidParams)) + } + } + } + if s.Inputs != nil { + for i, v := range s.Inputs { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Inputs", i), err.(request.ErrInvalidParams)) + } + } + } + if s.Outputs != nil { + for i, v := range s.Outputs { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Outputs", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationCode sets the ApplicationCode field's value. +func (s *CreateApplicationInput) SetApplicationCode(v string) *CreateApplicationInput { + s.ApplicationCode = &v + return s +} + +// SetApplicationDescription sets the ApplicationDescription field's value. +func (s *CreateApplicationInput) SetApplicationDescription(v string) *CreateApplicationInput { + s.ApplicationDescription = &v + return s +} + +// SetApplicationName sets the ApplicationName field's value. +func (s *CreateApplicationInput) SetApplicationName(v string) *CreateApplicationInput { + s.ApplicationName = &v + return s +} + +// SetCloudWatchLoggingOptions sets the CloudWatchLoggingOptions field's value. +func (s *CreateApplicationInput) SetCloudWatchLoggingOptions(v []*CloudWatchLoggingOption) *CreateApplicationInput { + s.CloudWatchLoggingOptions = v + return s +} + +// SetInputs sets the Inputs field's value. +func (s *CreateApplicationInput) SetInputs(v []*Input) *CreateApplicationInput { + s.Inputs = v + return s +} + +// SetOutputs sets the Outputs field's value. +func (s *CreateApplicationInput) SetOutputs(v []*Output) *CreateApplicationInput { + s.Outputs = v + return s +} + +// TBD +type CreateApplicationOutput struct { + _ struct{} `type:"structure"` + + // In response to your CreateApplication request, Amazon Kinesis Analytics returns + // a response with a summary of the application it created, including the application + // Amazon Resource Name (ARN), name, and status. + // + // ApplicationSummary is a required field + ApplicationSummary *ApplicationSummary `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreateApplicationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateApplicationOutput) GoString() string { + return s.String() +} + +// SetApplicationSummary sets the ApplicationSummary field's value. +func (s *CreateApplicationOutput) SetApplicationSummary(v *ApplicationSummary) *CreateApplicationOutput { + s.ApplicationSummary = v + return s +} + +type DeleteApplicationCloudWatchLoggingOptionInput struct { + _ struct{} `type:"structure"` + + // The Kinesis Analytics application name. + // + // ApplicationName is a required field + ApplicationName *string `min:"1" type:"string" required:"true"` + + // The CloudWatchLoggingOptionId of the CloudWatch logging option to delete. + // You can get the CloudWatchLoggingOptionId by using the DescribeApplication + // operation. + // + // CloudWatchLoggingOptionId is a required field + CloudWatchLoggingOptionId *string `min:"1" type:"string" required:"true"` + + // The version ID of the Kinesis Analytics application. + // + // CurrentApplicationVersionId is a required field + CurrentApplicationVersionId *int64 `min:"1" type:"long" required:"true"` +} + +// String returns the string representation +func (s DeleteApplicationCloudWatchLoggingOptionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApplicationCloudWatchLoggingOptionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteApplicationCloudWatchLoggingOptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteApplicationCloudWatchLoggingOptionInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.CloudWatchLoggingOptionId == nil { + invalidParams.Add(request.NewErrParamRequired("CloudWatchLoggingOptionId")) + } + if s.CloudWatchLoggingOptionId != nil && len(*s.CloudWatchLoggingOptionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CloudWatchLoggingOptionId", 1)) + } + if s.CurrentApplicationVersionId == nil { + invalidParams.Add(request.NewErrParamRequired("CurrentApplicationVersionId")) + } + if s.CurrentApplicationVersionId != nil && *s.CurrentApplicationVersionId < 1 { + invalidParams.Add(request.NewErrParamMinValue("CurrentApplicationVersionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationName sets the ApplicationName field's value. +func (s *DeleteApplicationCloudWatchLoggingOptionInput) SetApplicationName(v string) *DeleteApplicationCloudWatchLoggingOptionInput { + s.ApplicationName = &v + return s +} + +// SetCloudWatchLoggingOptionId sets the CloudWatchLoggingOptionId field's value. +func (s *DeleteApplicationCloudWatchLoggingOptionInput) SetCloudWatchLoggingOptionId(v string) *DeleteApplicationCloudWatchLoggingOptionInput { + s.CloudWatchLoggingOptionId = &v + return s +} + +// SetCurrentApplicationVersionId sets the CurrentApplicationVersionId field's value. +func (s *DeleteApplicationCloudWatchLoggingOptionInput) SetCurrentApplicationVersionId(v int64) *DeleteApplicationCloudWatchLoggingOptionInput { + s.CurrentApplicationVersionId = &v + return s +} + +type DeleteApplicationCloudWatchLoggingOptionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteApplicationCloudWatchLoggingOptionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApplicationCloudWatchLoggingOptionOutput) GoString() string { + return s.String() +} + +type DeleteApplicationInput struct { + _ struct{} `type:"structure"` + + // Name of the Amazon Kinesis Analytics application to delete. + // + // ApplicationName is a required field + ApplicationName *string `min:"1" type:"string" required:"true"` + + // You can use the DescribeApplication operation to get this value. + // + // CreateTimestamp is a required field + CreateTimestamp *time.Time `type:"timestamp" required:"true"` +} + +// String returns the string representation +func (s DeleteApplicationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApplicationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteApplicationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteApplicationInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.CreateTimestamp == nil { + invalidParams.Add(request.NewErrParamRequired("CreateTimestamp")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationName sets the ApplicationName field's value. +func (s *DeleteApplicationInput) SetApplicationName(v string) *DeleteApplicationInput { + s.ApplicationName = &v + return s +} + +// SetCreateTimestamp sets the CreateTimestamp field's value. +func (s *DeleteApplicationInput) SetCreateTimestamp(v time.Time) *DeleteApplicationInput { + s.CreateTimestamp = &v + return s +} + +type DeleteApplicationInputProcessingConfigurationInput struct { + _ struct{} `type:"structure"` + + // The Kinesis Analytics application name. + // + // ApplicationName is a required field + ApplicationName *string `min:"1" type:"string" required:"true"` + + // The version ID of the Kinesis Analytics application. + // + // CurrentApplicationVersionId is a required field + CurrentApplicationVersionId *int64 `min:"1" type:"long" required:"true"` + + // The ID of the input configuration from which to delete the input processing + // configuration. You can get a list of the input IDs for an application by + // using the DescribeApplication operation. + // + // InputId is a required field + InputId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteApplicationInputProcessingConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApplicationInputProcessingConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteApplicationInputProcessingConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteApplicationInputProcessingConfigurationInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.CurrentApplicationVersionId == nil { + invalidParams.Add(request.NewErrParamRequired("CurrentApplicationVersionId")) + } + if s.CurrentApplicationVersionId != nil && *s.CurrentApplicationVersionId < 1 { + invalidParams.Add(request.NewErrParamMinValue("CurrentApplicationVersionId", 1)) + } + if s.InputId == nil { + invalidParams.Add(request.NewErrParamRequired("InputId")) + } + if s.InputId != nil && len(*s.InputId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InputId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationName sets the ApplicationName field's value. +func (s *DeleteApplicationInputProcessingConfigurationInput) SetApplicationName(v string) *DeleteApplicationInputProcessingConfigurationInput { + s.ApplicationName = &v + return s +} + +// SetCurrentApplicationVersionId sets the CurrentApplicationVersionId field's value. +func (s *DeleteApplicationInputProcessingConfigurationInput) SetCurrentApplicationVersionId(v int64) *DeleteApplicationInputProcessingConfigurationInput { + s.CurrentApplicationVersionId = &v + return s +} + +// SetInputId sets the InputId field's value. +func (s *DeleteApplicationInputProcessingConfigurationInput) SetInputId(v string) *DeleteApplicationInputProcessingConfigurationInput { + s.InputId = &v + return s +} + +type DeleteApplicationInputProcessingConfigurationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteApplicationInputProcessingConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApplicationInputProcessingConfigurationOutput) GoString() string { + return s.String() +} + +type DeleteApplicationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteApplicationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApplicationOutput) GoString() string { + return s.String() +} + +type DeleteApplicationOutputInput struct { + _ struct{} `type:"structure"` + + // Amazon Kinesis Analytics application name. + // + // ApplicationName is a required field + ApplicationName *string `min:"1" type:"string" required:"true"` + + // Amazon Kinesis Analytics application version. You can use the DescribeApplication + // operation to get the current application version. If the version specified + // is not the current version, the ConcurrentModificationException is returned. + // + // CurrentApplicationVersionId is a required field + CurrentApplicationVersionId *int64 `min:"1" type:"long" required:"true"` + + // The ID of the configuration to delete. Each output configuration that is + // added to the application, either when the application is created or later + // using the AddApplicationOutput operation, has a unique ID. You need to provide + // the ID to uniquely identify the output configuration that you want to delete + // from the application configuration. You can use the DescribeApplication operation + // to get the specific OutputId. + // + // OutputId is a required field + OutputId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteApplicationOutputInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApplicationOutputInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteApplicationOutputInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteApplicationOutputInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.CurrentApplicationVersionId == nil { + invalidParams.Add(request.NewErrParamRequired("CurrentApplicationVersionId")) + } + if s.CurrentApplicationVersionId != nil && *s.CurrentApplicationVersionId < 1 { + invalidParams.Add(request.NewErrParamMinValue("CurrentApplicationVersionId", 1)) + } + if s.OutputId == nil { + invalidParams.Add(request.NewErrParamRequired("OutputId")) + } + if s.OutputId != nil && len(*s.OutputId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("OutputId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationName sets the ApplicationName field's value. +func (s *DeleteApplicationOutputInput) SetApplicationName(v string) *DeleteApplicationOutputInput { + s.ApplicationName = &v + return s +} + +// SetCurrentApplicationVersionId sets the CurrentApplicationVersionId field's value. +func (s *DeleteApplicationOutputInput) SetCurrentApplicationVersionId(v int64) *DeleteApplicationOutputInput { + s.CurrentApplicationVersionId = &v + return s +} + +// SetOutputId sets the OutputId field's value. +func (s *DeleteApplicationOutputInput) SetOutputId(v string) *DeleteApplicationOutputInput { + s.OutputId = &v + return s +} + +type DeleteApplicationOutputOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteApplicationOutputOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApplicationOutputOutput) GoString() string { + return s.String() +} + +type DeleteApplicationReferenceDataSourceInput struct { + _ struct{} `type:"structure"` + + // Name of an existing application. + // + // ApplicationName is a required field + ApplicationName *string `min:"1" type:"string" required:"true"` + + // Version of the application. You can use the DescribeApplication operation + // to get the current application version. If the version specified is not the + // current version, the ConcurrentModificationException is returned. + // + // CurrentApplicationVersionId is a required field + CurrentApplicationVersionId *int64 `min:"1" type:"long" required:"true"` + + // ID of the reference data source. When you add a reference data source to + // your application using the AddApplicationReferenceDataSource, Amazon Kinesis + // Analytics assigns an ID. You can use the DescribeApplication operation to + // get the reference ID. + // + // ReferenceId is a required field + ReferenceId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteApplicationReferenceDataSourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApplicationReferenceDataSourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteApplicationReferenceDataSourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteApplicationReferenceDataSourceInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.CurrentApplicationVersionId == nil { + invalidParams.Add(request.NewErrParamRequired("CurrentApplicationVersionId")) + } + if s.CurrentApplicationVersionId != nil && *s.CurrentApplicationVersionId < 1 { + invalidParams.Add(request.NewErrParamMinValue("CurrentApplicationVersionId", 1)) + } + if s.ReferenceId == nil { + invalidParams.Add(request.NewErrParamRequired("ReferenceId")) + } + if s.ReferenceId != nil && len(*s.ReferenceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ReferenceId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationName sets the ApplicationName field's value. +func (s *DeleteApplicationReferenceDataSourceInput) SetApplicationName(v string) *DeleteApplicationReferenceDataSourceInput { + s.ApplicationName = &v + return s +} + +// SetCurrentApplicationVersionId sets the CurrentApplicationVersionId field's value. +func (s *DeleteApplicationReferenceDataSourceInput) SetCurrentApplicationVersionId(v int64) *DeleteApplicationReferenceDataSourceInput { + s.CurrentApplicationVersionId = &v + return s +} + +// SetReferenceId sets the ReferenceId field's value. +func (s *DeleteApplicationReferenceDataSourceInput) SetReferenceId(v string) *DeleteApplicationReferenceDataSourceInput { + s.ReferenceId = &v + return s +} + +type DeleteApplicationReferenceDataSourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteApplicationReferenceDataSourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApplicationReferenceDataSourceOutput) GoString() string { + return s.String() +} + +type DescribeApplicationInput struct { + _ struct{} `type:"structure"` + + // Name of the application. + // + // ApplicationName is a required field + ApplicationName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeApplicationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeApplicationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeApplicationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeApplicationInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationName sets the ApplicationName field's value. +func (s *DescribeApplicationInput) SetApplicationName(v string) *DescribeApplicationInput { + s.ApplicationName = &v + return s +} + +type DescribeApplicationOutput struct { + _ struct{} `type:"structure"` + + // Provides a description of the application, such as the application Amazon + // Resource Name (ARN), status, latest version, and input and output configuration + // details. + // + // ApplicationDetail is a required field + ApplicationDetail *ApplicationDetail `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DescribeApplicationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeApplicationOutput) GoString() string { + return s.String() +} + +// SetApplicationDetail sets the ApplicationDetail field's value. +func (s *DescribeApplicationOutput) SetApplicationDetail(v *ApplicationDetail) *DescribeApplicationOutput { + s.ApplicationDetail = v + return s +} + +// Describes the data format when records are written to the destination. For +// more information, see Configuring Application Output (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-output.html). +type DestinationSchema struct { + _ struct{} `type:"structure"` + + // Specifies the format of the records on the output stream. + // + // RecordFormatType is a required field + RecordFormatType *string `type:"string" required:"true" enum:"RecordFormatType"` +} + +// String returns the string representation +func (s DestinationSchema) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DestinationSchema) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DestinationSchema) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DestinationSchema"} + if s.RecordFormatType == nil { + invalidParams.Add(request.NewErrParamRequired("RecordFormatType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRecordFormatType sets the RecordFormatType field's value. +func (s *DestinationSchema) SetRecordFormatType(v string) *DestinationSchema { + s.RecordFormatType = &v + return s +} + +type DiscoverInputSchemaInput struct { + _ struct{} `type:"structure"` + + // The InputProcessingConfiguration to use to preprocess the records before + // discovering the schema of the records. + InputProcessingConfiguration *InputProcessingConfiguration `type:"structure"` + + // Point at which you want Amazon Kinesis Analytics to start reading records + // from the specified streaming source discovery purposes. + InputStartingPositionConfiguration *InputStartingPositionConfiguration `type:"structure"` + + // Amazon Resource Name (ARN) of the streaming source. + ResourceARN *string `min:"1" type:"string"` + + // ARN of the IAM role that Amazon Kinesis Analytics can assume to access the + // stream on your behalf. + RoleARN *string `min:"1" type:"string"` + + // Specify this parameter to discover a schema from data in an Amazon S3 object. + S3Configuration *S3Configuration `type:"structure"` +} + +// String returns the string representation +func (s DiscoverInputSchemaInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DiscoverInputSchemaInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DiscoverInputSchemaInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DiscoverInputSchemaInput"} + if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) + } + if s.RoleARN != nil && len(*s.RoleARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) + } + if s.InputProcessingConfiguration != nil { + if err := s.InputProcessingConfiguration.Validate(); err != nil { + invalidParams.AddNested("InputProcessingConfiguration", err.(request.ErrInvalidParams)) + } + } + if s.S3Configuration != nil { + if err := s.S3Configuration.Validate(); err != nil { + invalidParams.AddNested("S3Configuration", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInputProcessingConfiguration sets the InputProcessingConfiguration field's value. +func (s *DiscoverInputSchemaInput) SetInputProcessingConfiguration(v *InputProcessingConfiguration) *DiscoverInputSchemaInput { + s.InputProcessingConfiguration = v + return s +} + +// SetInputStartingPositionConfiguration sets the InputStartingPositionConfiguration field's value. +func (s *DiscoverInputSchemaInput) SetInputStartingPositionConfiguration(v *InputStartingPositionConfiguration) *DiscoverInputSchemaInput { + s.InputStartingPositionConfiguration = v + return s +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *DiscoverInputSchemaInput) SetResourceARN(v string) *DiscoverInputSchemaInput { + s.ResourceARN = &v + return s +} + +// SetRoleARN sets the RoleARN field's value. +func (s *DiscoverInputSchemaInput) SetRoleARN(v string) *DiscoverInputSchemaInput { + s.RoleARN = &v + return s +} + +// SetS3Configuration sets the S3Configuration field's value. +func (s *DiscoverInputSchemaInput) SetS3Configuration(v *S3Configuration) *DiscoverInputSchemaInput { + s.S3Configuration = v + return s +} + +type DiscoverInputSchemaOutput struct { + _ struct{} `type:"structure"` + + // Schema inferred from the streaming source. It identifies the format of the + // data in the streaming source and how each data element maps to corresponding + // columns in the in-application stream that you can create. + InputSchema *SourceSchema `type:"structure"` + + // An array of elements, where each element corresponds to a row in a stream + // record (a stream record can have more than one row). + ParsedInputRecords [][]*string `type:"list"` + + // Stream data that was modified by the processor specified in the InputProcessingConfiguration + // parameter. + ProcessedInputRecords []*string `type:"list"` + + // Raw stream data that was sampled to infer the schema. + RawInputRecords []*string `type:"list"` +} + +// String returns the string representation +func (s DiscoverInputSchemaOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DiscoverInputSchemaOutput) GoString() string { + return s.String() +} + +// SetInputSchema sets the InputSchema field's value. +func (s *DiscoverInputSchemaOutput) SetInputSchema(v *SourceSchema) *DiscoverInputSchemaOutput { + s.InputSchema = v + return s +} + +// SetParsedInputRecords sets the ParsedInputRecords field's value. +func (s *DiscoverInputSchemaOutput) SetParsedInputRecords(v [][]*string) *DiscoverInputSchemaOutput { + s.ParsedInputRecords = v + return s +} + +// SetProcessedInputRecords sets the ProcessedInputRecords field's value. +func (s *DiscoverInputSchemaOutput) SetProcessedInputRecords(v []*string) *DiscoverInputSchemaOutput { + s.ProcessedInputRecords = v + return s +} + +// SetRawInputRecords sets the RawInputRecords field's value. +func (s *DiscoverInputSchemaOutput) SetRawInputRecords(v []*string) *DiscoverInputSchemaOutput { + s.RawInputRecords = v + return s +} + +// When you configure the application input, you specify the streaming source, +// the in-application stream name that is created, and the mapping between the +// two. For more information, see Configuring Application Input (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-input.html). +type Input struct { + _ struct{} `type:"structure"` + + // Describes the number of in-application streams to create. + // + // Data from your source is routed to these in-application input streams. + // + // (see Configuring Application Input (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-input.html). + InputParallelism *InputParallelism `type:"structure"` + + // The InputProcessingConfiguration for the input. An input processor transforms + // records as they are received from the stream, before the application's SQL + // code executes. Currently, the only input processing configuration available + // is InputLambdaProcessor. + InputProcessingConfiguration *InputProcessingConfiguration `type:"structure"` + + // Describes the format of the data in the streaming source, and how each data + // element maps to corresponding columns in the in-application stream that is + // being created. + // + // Also used to describe the format of the reference data source. + // + // InputSchema is a required field + InputSchema *SourceSchema `type:"structure" required:"true"` + + // If the streaming source is an Amazon Kinesis Firehose delivery stream, identifies + // the delivery stream's ARN and an IAM role that enables Amazon Kinesis Analytics + // to access the stream on your behalf. + // + // Note: Either KinesisStreamsInput or KinesisFirehoseInput is required. + KinesisFirehoseInput *KinesisFirehoseInput `type:"structure"` + + // If the streaming source is an Amazon Kinesis stream, identifies the stream's + // Amazon Resource Name (ARN) and an IAM role that enables Amazon Kinesis Analytics + // to access the stream on your behalf. + // + // Note: Either KinesisStreamsInput or KinesisFirehoseInput is required. + KinesisStreamsInput *KinesisStreamsInput `type:"structure"` + + // Name prefix to use when creating an in-application stream. Suppose that you + // specify a prefix "MyInApplicationStream." Amazon Kinesis Analytics then creates + // one or more (as per the InputParallelism count you specified) in-application + // streams with names "MyInApplicationStream_001," "MyInApplicationStream_002," + // and so on. + // + // NamePrefix is a required field + NamePrefix *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s Input) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Input) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Input) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Input"} + if s.InputSchema == nil { + invalidParams.Add(request.NewErrParamRequired("InputSchema")) + } + if s.NamePrefix == nil { + invalidParams.Add(request.NewErrParamRequired("NamePrefix")) + } + if s.NamePrefix != nil && len(*s.NamePrefix) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NamePrefix", 1)) + } + if s.InputParallelism != nil { + if err := s.InputParallelism.Validate(); err != nil { + invalidParams.AddNested("InputParallelism", err.(request.ErrInvalidParams)) + } + } + if s.InputProcessingConfiguration != nil { + if err := s.InputProcessingConfiguration.Validate(); err != nil { + invalidParams.AddNested("InputProcessingConfiguration", err.(request.ErrInvalidParams)) + } + } + if s.InputSchema != nil { + if err := s.InputSchema.Validate(); err != nil { + invalidParams.AddNested("InputSchema", err.(request.ErrInvalidParams)) + } + } + if s.KinesisFirehoseInput != nil { + if err := s.KinesisFirehoseInput.Validate(); err != nil { + invalidParams.AddNested("KinesisFirehoseInput", err.(request.ErrInvalidParams)) + } + } + if s.KinesisStreamsInput != nil { + if err := s.KinesisStreamsInput.Validate(); err != nil { + invalidParams.AddNested("KinesisStreamsInput", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInputParallelism sets the InputParallelism field's value. +func (s *Input) SetInputParallelism(v *InputParallelism) *Input { + s.InputParallelism = v + return s +} + +// SetInputProcessingConfiguration sets the InputProcessingConfiguration field's value. +func (s *Input) SetInputProcessingConfiguration(v *InputProcessingConfiguration) *Input { + s.InputProcessingConfiguration = v + return s +} + +// SetInputSchema sets the InputSchema field's value. +func (s *Input) SetInputSchema(v *SourceSchema) *Input { + s.InputSchema = v + return s +} + +// SetKinesisFirehoseInput sets the KinesisFirehoseInput field's value. +func (s *Input) SetKinesisFirehoseInput(v *KinesisFirehoseInput) *Input { + s.KinesisFirehoseInput = v + return s +} + +// SetKinesisStreamsInput sets the KinesisStreamsInput field's value. +func (s *Input) SetKinesisStreamsInput(v *KinesisStreamsInput) *Input { + s.KinesisStreamsInput = v + return s +} + +// SetNamePrefix sets the NamePrefix field's value. +func (s *Input) SetNamePrefix(v string) *Input { + s.NamePrefix = &v + return s +} + +// When you start your application, you provide this configuration, which identifies +// the input source and the point in the input source at which you want the +// application to start processing records. +type InputConfiguration struct { + _ struct{} `type:"structure"` + + // Input source ID. You can get this ID by calling the DescribeApplication operation. + // + // Id is a required field + Id *string `min:"1" type:"string" required:"true"` + + // Point at which you want the application to start processing records from + // the streaming source. + // + // InputStartingPositionConfiguration is a required field + InputStartingPositionConfiguration *InputStartingPositionConfiguration `type:"structure" required:"true"` +} + +// String returns the string representation +func (s InputConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InputConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InputConfiguration"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + if s.InputStartingPositionConfiguration == nil { + invalidParams.Add(request.NewErrParamRequired("InputStartingPositionConfiguration")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetId sets the Id field's value. +func (s *InputConfiguration) SetId(v string) *InputConfiguration { + s.Id = &v + return s +} + +// SetInputStartingPositionConfiguration sets the InputStartingPositionConfiguration field's value. +func (s *InputConfiguration) SetInputStartingPositionConfiguration(v *InputStartingPositionConfiguration) *InputConfiguration { + s.InputStartingPositionConfiguration = v + return s +} + +// Describes the application input configuration. For more information, see +// Configuring Application Input (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-input.html). +type InputDescription struct { + _ struct{} `type:"structure"` + + // Returns the in-application stream names that are mapped to the stream source. + InAppStreamNames []*string `type:"list"` + + // Input ID associated with the application input. This is the ID that Amazon + // Kinesis Analytics assigns to each input configuration you add to your application. + InputId *string `min:"1" type:"string"` + + // Describes the configured parallelism (number of in-application streams mapped + // to the streaming source). + InputParallelism *InputParallelism `type:"structure"` + + // The description of the preprocessor that executes on records in this input + // before the application's code is run. + InputProcessingConfigurationDescription *InputProcessingConfigurationDescription `type:"structure"` + + // Describes the format of the data in the streaming source, and how each data + // element maps to corresponding columns in the in-application stream that is + // being created. + InputSchema *SourceSchema `type:"structure"` + + // Point at which the application is configured to read from the input stream. + InputStartingPositionConfiguration *InputStartingPositionConfiguration `type:"structure"` + + // If an Amazon Kinesis Firehose delivery stream is configured as a streaming + // source, provides the delivery stream's ARN and an IAM role that enables Amazon + // Kinesis Analytics to access the stream on your behalf. + KinesisFirehoseInputDescription *KinesisFirehoseInputDescription `type:"structure"` + + // If an Amazon Kinesis stream is configured as streaming source, provides Amazon + // Kinesis stream's Amazon Resource Name (ARN) and an IAM role that enables + // Amazon Kinesis Analytics to access the stream on your behalf. + KinesisStreamsInputDescription *KinesisStreamsInputDescription `type:"structure"` + + // In-application name prefix. + NamePrefix *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s InputDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputDescription) GoString() string { + return s.String() +} + +// SetInAppStreamNames sets the InAppStreamNames field's value. +func (s *InputDescription) SetInAppStreamNames(v []*string) *InputDescription { + s.InAppStreamNames = v + return s +} + +// SetInputId sets the InputId field's value. +func (s *InputDescription) SetInputId(v string) *InputDescription { + s.InputId = &v + return s +} + +// SetInputParallelism sets the InputParallelism field's value. +func (s *InputDescription) SetInputParallelism(v *InputParallelism) *InputDescription { + s.InputParallelism = v + return s +} + +// SetInputProcessingConfigurationDescription sets the InputProcessingConfigurationDescription field's value. +func (s *InputDescription) SetInputProcessingConfigurationDescription(v *InputProcessingConfigurationDescription) *InputDescription { + s.InputProcessingConfigurationDescription = v + return s +} + +// SetInputSchema sets the InputSchema field's value. +func (s *InputDescription) SetInputSchema(v *SourceSchema) *InputDescription { + s.InputSchema = v + return s +} + +// SetInputStartingPositionConfiguration sets the InputStartingPositionConfiguration field's value. +func (s *InputDescription) SetInputStartingPositionConfiguration(v *InputStartingPositionConfiguration) *InputDescription { + s.InputStartingPositionConfiguration = v + return s +} + +// SetKinesisFirehoseInputDescription sets the KinesisFirehoseInputDescription field's value. +func (s *InputDescription) SetKinesisFirehoseInputDescription(v *KinesisFirehoseInputDescription) *InputDescription { + s.KinesisFirehoseInputDescription = v + return s +} + +// SetKinesisStreamsInputDescription sets the KinesisStreamsInputDescription field's value. +func (s *InputDescription) SetKinesisStreamsInputDescription(v *KinesisStreamsInputDescription) *InputDescription { + s.KinesisStreamsInputDescription = v + return s +} + +// SetNamePrefix sets the NamePrefix field's value. +func (s *InputDescription) SetNamePrefix(v string) *InputDescription { + s.NamePrefix = &v + return s +} + +// An object that contains the Amazon Resource Name (ARN) of the AWS Lambda +// (https://aws.amazon.com/documentation/lambda/) function that is used to preprocess +// records in the stream, and the ARN of the IAM role that is used to access +// the AWS Lambda function. +type InputLambdaProcessor struct { + _ struct{} `type:"structure"` + + // The ARN of the AWS Lambda (https://aws.amazon.com/documentation/lambda/) + // function that operates on records in the stream. + // + // ResourceARN is a required field + ResourceARN *string `min:"1" type:"string" required:"true"` + + // The ARN of the IAM role that is used to access the AWS Lambda function. + // + // RoleARN is a required field + RoleARN *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s InputLambdaProcessor) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputLambdaProcessor) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InputLambdaProcessor) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InputLambdaProcessor"} + if s.ResourceARN == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceARN")) + } + if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) + } + if s.RoleARN == nil { + invalidParams.Add(request.NewErrParamRequired("RoleARN")) + } + if s.RoleARN != nil && len(*s.RoleARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *InputLambdaProcessor) SetResourceARN(v string) *InputLambdaProcessor { + s.ResourceARN = &v + return s +} + +// SetRoleARN sets the RoleARN field's value. +func (s *InputLambdaProcessor) SetRoleARN(v string) *InputLambdaProcessor { + s.RoleARN = &v + return s +} + +// An object that contains the Amazon Resource Name (ARN) of the AWS Lambda +// (https://aws.amazon.com/documentation/lambda/) function that is used to preprocess +// records in the stream, and the ARN of the IAM role that is used to access +// the AWS Lambda expression. +type InputLambdaProcessorDescription struct { + _ struct{} `type:"structure"` + + // The ARN of the AWS Lambda (https://aws.amazon.com/documentation/lambda/) + // function that is used to preprocess the records in the stream. + ResourceARN *string `min:"1" type:"string"` + + // The ARN of the IAM role that is used to access the AWS Lambda function. + RoleARN *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s InputLambdaProcessorDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputLambdaProcessorDescription) GoString() string { + return s.String() +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *InputLambdaProcessorDescription) SetResourceARN(v string) *InputLambdaProcessorDescription { + s.ResourceARN = &v + return s +} + +// SetRoleARN sets the RoleARN field's value. +func (s *InputLambdaProcessorDescription) SetRoleARN(v string) *InputLambdaProcessorDescription { + s.RoleARN = &v + return s +} + +// Represents an update to the InputLambdaProcessor that is used to preprocess +// the records in the stream. +type InputLambdaProcessorUpdate struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the new AWS Lambda (https://aws.amazon.com/documentation/lambda/) + // function that is used to preprocess the records in the stream. + ResourceARNUpdate *string `min:"1" type:"string"` + + // The ARN of the new IAM role that is used to access the AWS Lambda function. + RoleARNUpdate *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s InputLambdaProcessorUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputLambdaProcessorUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InputLambdaProcessorUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InputLambdaProcessorUpdate"} + if s.ResourceARNUpdate != nil && len(*s.ResourceARNUpdate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARNUpdate", 1)) + } + if s.RoleARNUpdate != nil && len(*s.RoleARNUpdate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleARNUpdate", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceARNUpdate sets the ResourceARNUpdate field's value. +func (s *InputLambdaProcessorUpdate) SetResourceARNUpdate(v string) *InputLambdaProcessorUpdate { + s.ResourceARNUpdate = &v + return s +} + +// SetRoleARNUpdate sets the RoleARNUpdate field's value. +func (s *InputLambdaProcessorUpdate) SetRoleARNUpdate(v string) *InputLambdaProcessorUpdate { + s.RoleARNUpdate = &v + return s +} + +// Describes the number of in-application streams to create for a given streaming +// source. For information about parallelism, see Configuring Application Input +// (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-input.html). +type InputParallelism struct { + _ struct{} `type:"structure"` + + // Number of in-application streams to create. For more information, see Limits + // (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/limits.html). + Count *int64 `min:"1" type:"integer"` +} + +// String returns the string representation +func (s InputParallelism) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputParallelism) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InputParallelism) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InputParallelism"} + if s.Count != nil && *s.Count < 1 { + invalidParams.Add(request.NewErrParamMinValue("Count", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCount sets the Count field's value. +func (s *InputParallelism) SetCount(v int64) *InputParallelism { + s.Count = &v + return s +} + +// Provides updates to the parallelism count. +type InputParallelismUpdate struct { + _ struct{} `type:"structure"` + + // Number of in-application streams to create for the specified streaming source. + CountUpdate *int64 `min:"1" type:"integer"` +} + +// String returns the string representation +func (s InputParallelismUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputParallelismUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InputParallelismUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InputParallelismUpdate"} + if s.CountUpdate != nil && *s.CountUpdate < 1 { + invalidParams.Add(request.NewErrParamMinValue("CountUpdate", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCountUpdate sets the CountUpdate field's value. +func (s *InputParallelismUpdate) SetCountUpdate(v int64) *InputParallelismUpdate { + s.CountUpdate = &v + return s +} + +// Provides a description of a processor that is used to preprocess the records +// in the stream before being processed by your application code. Currently, +// the only input processor available is AWS Lambda (https://aws.amazon.com/documentation/lambda/). +type InputProcessingConfiguration struct { + _ struct{} `type:"structure"` + + // The InputLambdaProcessor that is used to preprocess the records in the stream + // before being processed by your application code. + // + // InputLambdaProcessor is a required field + InputLambdaProcessor *InputLambdaProcessor `type:"structure" required:"true"` +} + +// String returns the string representation +func (s InputProcessingConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputProcessingConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InputProcessingConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InputProcessingConfiguration"} + if s.InputLambdaProcessor == nil { + invalidParams.Add(request.NewErrParamRequired("InputLambdaProcessor")) + } + if s.InputLambdaProcessor != nil { + if err := s.InputLambdaProcessor.Validate(); err != nil { + invalidParams.AddNested("InputLambdaProcessor", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInputLambdaProcessor sets the InputLambdaProcessor field's value. +func (s *InputProcessingConfiguration) SetInputLambdaProcessor(v *InputLambdaProcessor) *InputProcessingConfiguration { + s.InputLambdaProcessor = v + return s +} + +// Provides configuration information about an input processor. Currently, the +// only input processor available is AWS Lambda (https://aws.amazon.com/documentation/lambda/). +type InputProcessingConfigurationDescription struct { + _ struct{} `type:"structure"` + + // Provides configuration information about the associated InputLambdaProcessorDescription. + InputLambdaProcessorDescription *InputLambdaProcessorDescription `type:"structure"` +} + +// String returns the string representation +func (s InputProcessingConfigurationDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputProcessingConfigurationDescription) GoString() string { + return s.String() +} + +// SetInputLambdaProcessorDescription sets the InputLambdaProcessorDescription field's value. +func (s *InputProcessingConfigurationDescription) SetInputLambdaProcessorDescription(v *InputLambdaProcessorDescription) *InputProcessingConfigurationDescription { + s.InputLambdaProcessorDescription = v + return s +} + +// Describes updates to an InputProcessingConfiguration. +type InputProcessingConfigurationUpdate struct { + _ struct{} `type:"structure"` + + // Provides update information for an InputLambdaProcessor. + // + // InputLambdaProcessorUpdate is a required field + InputLambdaProcessorUpdate *InputLambdaProcessorUpdate `type:"structure" required:"true"` +} + +// String returns the string representation +func (s InputProcessingConfigurationUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputProcessingConfigurationUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InputProcessingConfigurationUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InputProcessingConfigurationUpdate"} + if s.InputLambdaProcessorUpdate == nil { + invalidParams.Add(request.NewErrParamRequired("InputLambdaProcessorUpdate")) + } + if s.InputLambdaProcessorUpdate != nil { + if err := s.InputLambdaProcessorUpdate.Validate(); err != nil { + invalidParams.AddNested("InputLambdaProcessorUpdate", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInputLambdaProcessorUpdate sets the InputLambdaProcessorUpdate field's value. +func (s *InputProcessingConfigurationUpdate) SetInputLambdaProcessorUpdate(v *InputLambdaProcessorUpdate) *InputProcessingConfigurationUpdate { + s.InputLambdaProcessorUpdate = v + return s +} + +// Describes updates for the application's input schema. +type InputSchemaUpdate struct { + _ struct{} `type:"structure"` + + // A list of RecordColumn objects. Each object describes the mapping of the + // streaming source element to the corresponding column in the in-application + // stream. + RecordColumnUpdates []*RecordColumn `min:"1" type:"list"` + + // Specifies the encoding of the records in the streaming source. For example, + // UTF-8. + RecordEncodingUpdate *string `type:"string"` + + // Specifies the format of the records on the streaming source. + RecordFormatUpdate *RecordFormat `type:"structure"` +} + +// String returns the string representation +func (s InputSchemaUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputSchemaUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InputSchemaUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InputSchemaUpdate"} + if s.RecordColumnUpdates != nil && len(s.RecordColumnUpdates) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RecordColumnUpdates", 1)) + } + if s.RecordColumnUpdates != nil { + for i, v := range s.RecordColumnUpdates { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RecordColumnUpdates", i), err.(request.ErrInvalidParams)) + } + } + } + if s.RecordFormatUpdate != nil { + if err := s.RecordFormatUpdate.Validate(); err != nil { + invalidParams.AddNested("RecordFormatUpdate", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRecordColumnUpdates sets the RecordColumnUpdates field's value. +func (s *InputSchemaUpdate) SetRecordColumnUpdates(v []*RecordColumn) *InputSchemaUpdate { + s.RecordColumnUpdates = v + return s +} + +// SetRecordEncodingUpdate sets the RecordEncodingUpdate field's value. +func (s *InputSchemaUpdate) SetRecordEncodingUpdate(v string) *InputSchemaUpdate { + s.RecordEncodingUpdate = &v + return s +} + +// SetRecordFormatUpdate sets the RecordFormatUpdate field's value. +func (s *InputSchemaUpdate) SetRecordFormatUpdate(v *RecordFormat) *InputSchemaUpdate { + s.RecordFormatUpdate = v + return s +} + +// Describes the point at which the application reads from the streaming source. +type InputStartingPositionConfiguration struct { + _ struct{} `type:"structure"` + + // The starting position on the stream. + // + // * NOW - Start reading just after the most recent record in the stream, + // start at the request time stamp that the customer issued. + // + // * TRIM_HORIZON - Start reading at the last untrimmed record in the stream, + // which is the oldest record available in the stream. This option is not + // available for an Amazon Kinesis Firehose delivery stream. + // + // * LAST_STOPPED_POINT - Resume reading from where the application last + // stopped reading. + InputStartingPosition *string `type:"string" enum:"InputStartingPosition"` +} + +// String returns the string representation +func (s InputStartingPositionConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputStartingPositionConfiguration) GoString() string { + return s.String() +} + +// SetInputStartingPosition sets the InputStartingPosition field's value. +func (s *InputStartingPositionConfiguration) SetInputStartingPosition(v string) *InputStartingPositionConfiguration { + s.InputStartingPosition = &v + return s +} + +// Describes updates to a specific input configuration (identified by the InputId +// of an application). +type InputUpdate struct { + _ struct{} `type:"structure"` + + // Input ID of the application input to be updated. + // + // InputId is a required field + InputId *string `min:"1" type:"string" required:"true"` + + // Describes the parallelism updates (the number in-application streams Amazon + // Kinesis Analytics creates for the specific streaming source). + InputParallelismUpdate *InputParallelismUpdate `type:"structure"` + + // Describes updates for an input processing configuration. + InputProcessingConfigurationUpdate *InputProcessingConfigurationUpdate `type:"structure"` + + // Describes the data format on the streaming source, and how record elements + // on the streaming source map to columns of the in-application stream that + // is created. + InputSchemaUpdate *InputSchemaUpdate `type:"structure"` + + // If an Amazon Kinesis Firehose delivery stream is the streaming source to + // be updated, provides an updated stream ARN and IAM role ARN. + KinesisFirehoseInputUpdate *KinesisFirehoseInputUpdate `type:"structure"` + + // If an Amazon Kinesis stream is the streaming source to be updated, provides + // an updated stream Amazon Resource Name (ARN) and IAM role ARN. + KinesisStreamsInputUpdate *KinesisStreamsInputUpdate `type:"structure"` + + // Name prefix for in-application streams that Amazon Kinesis Analytics creates + // for the specific streaming source. + NamePrefixUpdate *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s InputUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InputUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InputUpdate"} + if s.InputId == nil { + invalidParams.Add(request.NewErrParamRequired("InputId")) + } + if s.InputId != nil && len(*s.InputId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("InputId", 1)) + } + if s.NamePrefixUpdate != nil && len(*s.NamePrefixUpdate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NamePrefixUpdate", 1)) + } + if s.InputParallelismUpdate != nil { + if err := s.InputParallelismUpdate.Validate(); err != nil { + invalidParams.AddNested("InputParallelismUpdate", err.(request.ErrInvalidParams)) + } + } + if s.InputProcessingConfigurationUpdate != nil { + if err := s.InputProcessingConfigurationUpdate.Validate(); err != nil { + invalidParams.AddNested("InputProcessingConfigurationUpdate", err.(request.ErrInvalidParams)) + } + } + if s.InputSchemaUpdate != nil { + if err := s.InputSchemaUpdate.Validate(); err != nil { + invalidParams.AddNested("InputSchemaUpdate", err.(request.ErrInvalidParams)) + } + } + if s.KinesisFirehoseInputUpdate != nil { + if err := s.KinesisFirehoseInputUpdate.Validate(); err != nil { + invalidParams.AddNested("KinesisFirehoseInputUpdate", err.(request.ErrInvalidParams)) + } + } + if s.KinesisStreamsInputUpdate != nil { + if err := s.KinesisStreamsInputUpdate.Validate(); err != nil { + invalidParams.AddNested("KinesisStreamsInputUpdate", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInputId sets the InputId field's value. +func (s *InputUpdate) SetInputId(v string) *InputUpdate { + s.InputId = &v + return s +} + +// SetInputParallelismUpdate sets the InputParallelismUpdate field's value. +func (s *InputUpdate) SetInputParallelismUpdate(v *InputParallelismUpdate) *InputUpdate { + s.InputParallelismUpdate = v + return s +} + +// SetInputProcessingConfigurationUpdate sets the InputProcessingConfigurationUpdate field's value. +func (s *InputUpdate) SetInputProcessingConfigurationUpdate(v *InputProcessingConfigurationUpdate) *InputUpdate { + s.InputProcessingConfigurationUpdate = v + return s +} + +// SetInputSchemaUpdate sets the InputSchemaUpdate field's value. +func (s *InputUpdate) SetInputSchemaUpdate(v *InputSchemaUpdate) *InputUpdate { + s.InputSchemaUpdate = v + return s +} + +// SetKinesisFirehoseInputUpdate sets the KinesisFirehoseInputUpdate field's value. +func (s *InputUpdate) SetKinesisFirehoseInputUpdate(v *KinesisFirehoseInputUpdate) *InputUpdate { + s.KinesisFirehoseInputUpdate = v + return s +} + +// SetKinesisStreamsInputUpdate sets the KinesisStreamsInputUpdate field's value. +func (s *InputUpdate) SetKinesisStreamsInputUpdate(v *KinesisStreamsInputUpdate) *InputUpdate { + s.KinesisStreamsInputUpdate = v + return s +} + +// SetNamePrefixUpdate sets the NamePrefixUpdate field's value. +func (s *InputUpdate) SetNamePrefixUpdate(v string) *InputUpdate { + s.NamePrefixUpdate = &v + return s +} + +// Provides additional mapping information when JSON is the record format on +// the streaming source. +type JSONMappingParameters struct { + _ struct{} `type:"structure"` + + // Path to the top-level parent that contains the records. + // + // RecordRowPath is a required field + RecordRowPath *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s JSONMappingParameters) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s JSONMappingParameters) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *JSONMappingParameters) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "JSONMappingParameters"} + if s.RecordRowPath == nil { + invalidParams.Add(request.NewErrParamRequired("RecordRowPath")) + } + if s.RecordRowPath != nil && len(*s.RecordRowPath) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RecordRowPath", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRecordRowPath sets the RecordRowPath field's value. +func (s *JSONMappingParameters) SetRecordRowPath(v string) *JSONMappingParameters { + s.RecordRowPath = &v + return s +} + +// Identifies an Amazon Kinesis Firehose delivery stream as the streaming source. +// You provide the delivery stream's Amazon Resource Name (ARN) and an IAM role +// ARN that enables Amazon Kinesis Analytics to access the stream on your behalf. +type KinesisFirehoseInput struct { + _ struct{} `type:"structure"` + + // ARN of the input delivery stream. + // + // ResourceARN is a required field + ResourceARN *string `min:"1" type:"string" required:"true"` + + // ARN of the IAM role that Amazon Kinesis Analytics can assume to access the + // stream on your behalf. You need to make sure that the role has the necessary + // permissions to access the stream. + // + // RoleARN is a required field + RoleARN *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s KinesisFirehoseInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s KinesisFirehoseInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *KinesisFirehoseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "KinesisFirehoseInput"} + if s.ResourceARN == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceARN")) + } + if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) + } + if s.RoleARN == nil { + invalidParams.Add(request.NewErrParamRequired("RoleARN")) + } + if s.RoleARN != nil && len(*s.RoleARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *KinesisFirehoseInput) SetResourceARN(v string) *KinesisFirehoseInput { + s.ResourceARN = &v + return s +} + +// SetRoleARN sets the RoleARN field's value. +func (s *KinesisFirehoseInput) SetRoleARN(v string) *KinesisFirehoseInput { + s.RoleARN = &v + return s +} + +// Describes the Amazon Kinesis Firehose delivery stream that is configured +// as the streaming source in the application input configuration. +type KinesisFirehoseInputDescription struct { + _ struct{} `type:"structure"` + + // Amazon Resource Name (ARN) of the Amazon Kinesis Firehose delivery stream. + ResourceARN *string `min:"1" type:"string"` + + // ARN of the IAM role that Amazon Kinesis Analytics assumes to access the stream. + RoleARN *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s KinesisFirehoseInputDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s KinesisFirehoseInputDescription) GoString() string { + return s.String() +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *KinesisFirehoseInputDescription) SetResourceARN(v string) *KinesisFirehoseInputDescription { + s.ResourceARN = &v + return s +} + +// SetRoleARN sets the RoleARN field's value. +func (s *KinesisFirehoseInputDescription) SetRoleARN(v string) *KinesisFirehoseInputDescription { + s.RoleARN = &v + return s +} + +// When updating application input configuration, provides information about +// an Amazon Kinesis Firehose delivery stream as the streaming source. +type KinesisFirehoseInputUpdate struct { + _ struct{} `type:"structure"` + + // Amazon Resource Name (ARN) of the input Amazon Kinesis Firehose delivery + // stream to read. + ResourceARNUpdate *string `min:"1" type:"string"` + + // ARN of the IAM role that Amazon Kinesis Analytics can assume to access the + // stream on your behalf. You need to grant the necessary permissions to this + // role. + RoleARNUpdate *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s KinesisFirehoseInputUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s KinesisFirehoseInputUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *KinesisFirehoseInputUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "KinesisFirehoseInputUpdate"} + if s.ResourceARNUpdate != nil && len(*s.ResourceARNUpdate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARNUpdate", 1)) + } + if s.RoleARNUpdate != nil && len(*s.RoleARNUpdate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleARNUpdate", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceARNUpdate sets the ResourceARNUpdate field's value. +func (s *KinesisFirehoseInputUpdate) SetResourceARNUpdate(v string) *KinesisFirehoseInputUpdate { + s.ResourceARNUpdate = &v + return s +} + +// SetRoleARNUpdate sets the RoleARNUpdate field's value. +func (s *KinesisFirehoseInputUpdate) SetRoleARNUpdate(v string) *KinesisFirehoseInputUpdate { + s.RoleARNUpdate = &v + return s +} + +// When configuring application output, identifies an Amazon Kinesis Firehose +// delivery stream as the destination. You provide the stream Amazon Resource +// Name (ARN) and an IAM role that enables Amazon Kinesis Analytics to write +// to the stream on your behalf. +type KinesisFirehoseOutput struct { + _ struct{} `type:"structure"` + + // ARN of the destination Amazon Kinesis Firehose delivery stream to write to. + // + // ResourceARN is a required field + ResourceARN *string `min:"1" type:"string" required:"true"` + + // ARN of the IAM role that Amazon Kinesis Analytics can assume to write to + // the destination stream on your behalf. You need to grant the necessary permissions + // to this role. + // + // RoleARN is a required field + RoleARN *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s KinesisFirehoseOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s KinesisFirehoseOutput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *KinesisFirehoseOutput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "KinesisFirehoseOutput"} + if s.ResourceARN == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceARN")) + } + if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) + } + if s.RoleARN == nil { + invalidParams.Add(request.NewErrParamRequired("RoleARN")) + } + if s.RoleARN != nil && len(*s.RoleARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *KinesisFirehoseOutput) SetResourceARN(v string) *KinesisFirehoseOutput { + s.ResourceARN = &v + return s +} + +// SetRoleARN sets the RoleARN field's value. +func (s *KinesisFirehoseOutput) SetRoleARN(v string) *KinesisFirehoseOutput { + s.RoleARN = &v + return s +} + +// For an application output, describes the Amazon Kinesis Firehose delivery +// stream configured as its destination. +type KinesisFirehoseOutputDescription struct { + _ struct{} `type:"structure"` + + // Amazon Resource Name (ARN) of the Amazon Kinesis Firehose delivery stream. + ResourceARN *string `min:"1" type:"string"` + + // ARN of the IAM role that Amazon Kinesis Analytics can assume to access the + // stream. + RoleARN *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s KinesisFirehoseOutputDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s KinesisFirehoseOutputDescription) GoString() string { + return s.String() +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *KinesisFirehoseOutputDescription) SetResourceARN(v string) *KinesisFirehoseOutputDescription { + s.ResourceARN = &v + return s +} + +// SetRoleARN sets the RoleARN field's value. +func (s *KinesisFirehoseOutputDescription) SetRoleARN(v string) *KinesisFirehoseOutputDescription { + s.RoleARN = &v + return s +} + +// When updating an output configuration using the UpdateApplication operation, +// provides information about an Amazon Kinesis Firehose delivery stream configured +// as the destination. +type KinesisFirehoseOutputUpdate struct { + _ struct{} `type:"structure"` + + // Amazon Resource Name (ARN) of the Amazon Kinesis Firehose delivery stream + // to write to. + ResourceARNUpdate *string `min:"1" type:"string"` + + // ARN of the IAM role that Amazon Kinesis Analytics can assume to access the + // stream on your behalf. You need to grant the necessary permissions to this + // role. + RoleARNUpdate *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s KinesisFirehoseOutputUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s KinesisFirehoseOutputUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *KinesisFirehoseOutputUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "KinesisFirehoseOutputUpdate"} + if s.ResourceARNUpdate != nil && len(*s.ResourceARNUpdate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARNUpdate", 1)) + } + if s.RoleARNUpdate != nil && len(*s.RoleARNUpdate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleARNUpdate", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceARNUpdate sets the ResourceARNUpdate field's value. +func (s *KinesisFirehoseOutputUpdate) SetResourceARNUpdate(v string) *KinesisFirehoseOutputUpdate { + s.ResourceARNUpdate = &v + return s +} + +// SetRoleARNUpdate sets the RoleARNUpdate field's value. +func (s *KinesisFirehoseOutputUpdate) SetRoleARNUpdate(v string) *KinesisFirehoseOutputUpdate { + s.RoleARNUpdate = &v + return s +} + +// Identifies an Amazon Kinesis stream as the streaming source. You provide +// the stream's Amazon Resource Name (ARN) and an IAM role ARN that enables +// Amazon Kinesis Analytics to access the stream on your behalf. +type KinesisStreamsInput struct { + _ struct{} `type:"structure"` + + // ARN of the input Amazon Kinesis stream to read. + // + // ResourceARN is a required field + ResourceARN *string `min:"1" type:"string" required:"true"` + + // ARN of the IAM role that Amazon Kinesis Analytics can assume to access the + // stream on your behalf. You need to grant the necessary permissions to this + // role. + // + // RoleARN is a required field + RoleARN *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s KinesisStreamsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s KinesisStreamsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *KinesisStreamsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "KinesisStreamsInput"} + if s.ResourceARN == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceARN")) + } + if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) + } + if s.RoleARN == nil { + invalidParams.Add(request.NewErrParamRequired("RoleARN")) + } + if s.RoleARN != nil && len(*s.RoleARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *KinesisStreamsInput) SetResourceARN(v string) *KinesisStreamsInput { + s.ResourceARN = &v + return s +} + +// SetRoleARN sets the RoleARN field's value. +func (s *KinesisStreamsInput) SetRoleARN(v string) *KinesisStreamsInput { + s.RoleARN = &v + return s +} + +// Describes the Amazon Kinesis stream that is configured as the streaming source +// in the application input configuration. +type KinesisStreamsInputDescription struct { + _ struct{} `type:"structure"` + + // Amazon Resource Name (ARN) of the Amazon Kinesis stream. + ResourceARN *string `min:"1" type:"string"` + + // ARN of the IAM role that Amazon Kinesis Analytics can assume to access the + // stream. + RoleARN *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s KinesisStreamsInputDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s KinesisStreamsInputDescription) GoString() string { + return s.String() +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *KinesisStreamsInputDescription) SetResourceARN(v string) *KinesisStreamsInputDescription { + s.ResourceARN = &v + return s +} + +// SetRoleARN sets the RoleARN field's value. +func (s *KinesisStreamsInputDescription) SetRoleARN(v string) *KinesisStreamsInputDescription { + s.RoleARN = &v + return s +} + +// When updating application input configuration, provides information about +// an Amazon Kinesis stream as the streaming source. +type KinesisStreamsInputUpdate struct { + _ struct{} `type:"structure"` + + // Amazon Resource Name (ARN) of the input Amazon Kinesis stream to read. + ResourceARNUpdate *string `min:"1" type:"string"` + + // ARN of the IAM role that Amazon Kinesis Analytics can assume to access the + // stream on your behalf. You need to grant the necessary permissions to this + // role. + RoleARNUpdate *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s KinesisStreamsInputUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s KinesisStreamsInputUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *KinesisStreamsInputUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "KinesisStreamsInputUpdate"} + if s.ResourceARNUpdate != nil && len(*s.ResourceARNUpdate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARNUpdate", 1)) + } + if s.RoleARNUpdate != nil && len(*s.RoleARNUpdate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleARNUpdate", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceARNUpdate sets the ResourceARNUpdate field's value. +func (s *KinesisStreamsInputUpdate) SetResourceARNUpdate(v string) *KinesisStreamsInputUpdate { + s.ResourceARNUpdate = &v + return s +} + +// SetRoleARNUpdate sets the RoleARNUpdate field's value. +func (s *KinesisStreamsInputUpdate) SetRoleARNUpdate(v string) *KinesisStreamsInputUpdate { + s.RoleARNUpdate = &v + return s +} + +// When configuring application output, identifies an Amazon Kinesis stream +// as the destination. You provide the stream Amazon Resource Name (ARN) and +// also an IAM role ARN that Amazon Kinesis Analytics can use to write to the +// stream on your behalf. +type KinesisStreamsOutput struct { + _ struct{} `type:"structure"` + + // ARN of the destination Amazon Kinesis stream to write to. + // + // ResourceARN is a required field + ResourceARN *string `min:"1" type:"string" required:"true"` + + // ARN of the IAM role that Amazon Kinesis Analytics can assume to write to + // the destination stream on your behalf. You need to grant the necessary permissions + // to this role. + // + // RoleARN is a required field + RoleARN *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s KinesisStreamsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s KinesisStreamsOutput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *KinesisStreamsOutput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "KinesisStreamsOutput"} + if s.ResourceARN == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceARN")) + } + if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) + } + if s.RoleARN == nil { + invalidParams.Add(request.NewErrParamRequired("RoleARN")) + } + if s.RoleARN != nil && len(*s.RoleARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *KinesisStreamsOutput) SetResourceARN(v string) *KinesisStreamsOutput { + s.ResourceARN = &v + return s +} + +// SetRoleARN sets the RoleARN field's value. +func (s *KinesisStreamsOutput) SetRoleARN(v string) *KinesisStreamsOutput { + s.RoleARN = &v + return s +} + +// For an application output, describes the Amazon Kinesis stream configured +// as its destination. +type KinesisStreamsOutputDescription struct { + _ struct{} `type:"structure"` + + // Amazon Resource Name (ARN) of the Amazon Kinesis stream. + ResourceARN *string `min:"1" type:"string"` + + // ARN of the IAM role that Amazon Kinesis Analytics can assume to access the + // stream. + RoleARN *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s KinesisStreamsOutputDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s KinesisStreamsOutputDescription) GoString() string { + return s.String() +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *KinesisStreamsOutputDescription) SetResourceARN(v string) *KinesisStreamsOutputDescription { + s.ResourceARN = &v + return s +} + +// SetRoleARN sets the RoleARN field's value. +func (s *KinesisStreamsOutputDescription) SetRoleARN(v string) *KinesisStreamsOutputDescription { + s.RoleARN = &v + return s +} + +// When updating an output configuration using the UpdateApplication operation, +// provides information about an Amazon Kinesis stream configured as the destination. +type KinesisStreamsOutputUpdate struct { + _ struct{} `type:"structure"` + + // Amazon Resource Name (ARN) of the Amazon Kinesis stream where you want to + // write the output. + ResourceARNUpdate *string `min:"1" type:"string"` + + // ARN of the IAM role that Amazon Kinesis Analytics can assume to access the + // stream on your behalf. You need to grant the necessary permissions to this + // role. + RoleARNUpdate *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s KinesisStreamsOutputUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s KinesisStreamsOutputUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *KinesisStreamsOutputUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "KinesisStreamsOutputUpdate"} + if s.ResourceARNUpdate != nil && len(*s.ResourceARNUpdate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARNUpdate", 1)) + } + if s.RoleARNUpdate != nil && len(*s.RoleARNUpdate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleARNUpdate", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceARNUpdate sets the ResourceARNUpdate field's value. +func (s *KinesisStreamsOutputUpdate) SetResourceARNUpdate(v string) *KinesisStreamsOutputUpdate { + s.ResourceARNUpdate = &v + return s +} + +// SetRoleARNUpdate sets the RoleARNUpdate field's value. +func (s *KinesisStreamsOutputUpdate) SetRoleARNUpdate(v string) *KinesisStreamsOutputUpdate { + s.RoleARNUpdate = &v + return s +} + +// When configuring application output, identifies an AWS Lambda function as +// the destination. You provide the function Amazon Resource Name (ARN) and +// also an IAM role ARN that Amazon Kinesis Analytics can use to write to the +// function on your behalf. +type LambdaOutput struct { + _ struct{} `type:"structure"` + + // Amazon Resource Name (ARN) of the destination Lambda function to write to. + // + // ResourceARN is a required field + ResourceARN *string `min:"1" type:"string" required:"true"` + + // ARN of the IAM role that Amazon Kinesis Analytics can assume to write to + // the destination function on your behalf. You need to grant the necessary + // permissions to this role. + // + // RoleARN is a required field + RoleARN *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s LambdaOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LambdaOutput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *LambdaOutput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LambdaOutput"} + if s.ResourceARN == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceARN")) + } + if s.ResourceARN != nil && len(*s.ResourceARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 1)) + } + if s.RoleARN == nil { + invalidParams.Add(request.NewErrParamRequired("RoleARN")) + } + if s.RoleARN != nil && len(*s.RoleARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *LambdaOutput) SetResourceARN(v string) *LambdaOutput { + s.ResourceARN = &v + return s +} + +// SetRoleARN sets the RoleARN field's value. +func (s *LambdaOutput) SetRoleARN(v string) *LambdaOutput { + s.RoleARN = &v + return s +} + +// For an application output, describes the AWS Lambda function configured as +// its destination. +type LambdaOutputDescription struct { + _ struct{} `type:"structure"` + + // Amazon Resource Name (ARN) of the destination Lambda function. + ResourceARN *string `min:"1" type:"string"` + + // ARN of the IAM role that Amazon Kinesis Analytics can assume to write to + // the destination function. + RoleARN *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s LambdaOutputDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LambdaOutputDescription) GoString() string { + return s.String() +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *LambdaOutputDescription) SetResourceARN(v string) *LambdaOutputDescription { + s.ResourceARN = &v + return s +} + +// SetRoleARN sets the RoleARN field's value. +func (s *LambdaOutputDescription) SetRoleARN(v string) *LambdaOutputDescription { + s.RoleARN = &v + return s +} + +// When updating an output configuration using the UpdateApplication operation, +// provides information about an AWS Lambda function configured as the destination. +type LambdaOutputUpdate struct { + _ struct{} `type:"structure"` + + // Amazon Resource Name (ARN) of the destination Lambda function. + ResourceARNUpdate *string `min:"1" type:"string"` + + // ARN of the IAM role that Amazon Kinesis Analytics can assume to write to + // the destination function on your behalf. You need to grant the necessary + // permissions to this role. + RoleARNUpdate *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s LambdaOutputUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LambdaOutputUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *LambdaOutputUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LambdaOutputUpdate"} + if s.ResourceARNUpdate != nil && len(*s.ResourceARNUpdate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARNUpdate", 1)) + } + if s.RoleARNUpdate != nil && len(*s.RoleARNUpdate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleARNUpdate", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceARNUpdate sets the ResourceARNUpdate field's value. +func (s *LambdaOutputUpdate) SetResourceARNUpdate(v string) *LambdaOutputUpdate { + s.ResourceARNUpdate = &v + return s +} + +// SetRoleARNUpdate sets the RoleARNUpdate field's value. +func (s *LambdaOutputUpdate) SetRoleARNUpdate(v string) *LambdaOutputUpdate { + s.RoleARNUpdate = &v + return s +} + +type ListApplicationsInput struct { + _ struct{} `type:"structure"` + + // Name of the application to start the list with. When using pagination to + // retrieve the list, you don't need to specify this parameter in the first + // request. However, in subsequent requests, you add the last application name + // from the previous response to get the next page of applications. + ExclusiveStartApplicationName *string `min:"1" type:"string"` + + // Maximum number of applications to list. + Limit *int64 `min:"1" type:"integer"` +} + +// String returns the string representation +func (s ListApplicationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListApplicationsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListApplicationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListApplicationsInput"} + if s.ExclusiveStartApplicationName != nil && len(*s.ExclusiveStartApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ExclusiveStartApplicationName", 1)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetExclusiveStartApplicationName sets the ExclusiveStartApplicationName field's value. +func (s *ListApplicationsInput) SetExclusiveStartApplicationName(v string) *ListApplicationsInput { + s.ExclusiveStartApplicationName = &v + return s +} + +// SetLimit sets the Limit field's value. +func (s *ListApplicationsInput) SetLimit(v int64) *ListApplicationsInput { + s.Limit = &v + return s +} + +type ListApplicationsOutput struct { + _ struct{} `type:"structure"` + + // List of ApplicationSummary objects. + // + // ApplicationSummaries is a required field + ApplicationSummaries []*ApplicationSummary `type:"list" required:"true"` + + // Returns true if there are more applications to retrieve. + // + // HasMoreApplications is a required field + HasMoreApplications *bool `type:"boolean" required:"true"` +} + +// String returns the string representation +func (s ListApplicationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListApplicationsOutput) GoString() string { + return s.String() +} + +// SetApplicationSummaries sets the ApplicationSummaries field's value. +func (s *ListApplicationsOutput) SetApplicationSummaries(v []*ApplicationSummary) *ListApplicationsOutput { + s.ApplicationSummaries = v + return s +} + +// SetHasMoreApplications sets the HasMoreApplications field's value. +func (s *ListApplicationsOutput) SetHasMoreApplications(v bool) *ListApplicationsOutput { + s.HasMoreApplications = &v + return s +} + +// When configuring application input at the time of creating or updating an +// application, provides additional mapping information specific to the record +// format (such as JSON, CSV, or record fields delimited by some delimiter) +// on the streaming source. +type MappingParameters struct { + _ struct{} `type:"structure"` + + // Provides additional mapping information when the record format uses delimiters + // (for example, CSV). + CSVMappingParameters *CSVMappingParameters `type:"structure"` + + // Provides additional mapping information when JSON is the record format on + // the streaming source. + JSONMappingParameters *JSONMappingParameters `type:"structure"` +} + +// String returns the string representation +func (s MappingParameters) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MappingParameters) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *MappingParameters) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "MappingParameters"} + if s.CSVMappingParameters != nil { + if err := s.CSVMappingParameters.Validate(); err != nil { + invalidParams.AddNested("CSVMappingParameters", err.(request.ErrInvalidParams)) + } + } + if s.JSONMappingParameters != nil { + if err := s.JSONMappingParameters.Validate(); err != nil { + invalidParams.AddNested("JSONMappingParameters", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCSVMappingParameters sets the CSVMappingParameters field's value. +func (s *MappingParameters) SetCSVMappingParameters(v *CSVMappingParameters) *MappingParameters { + s.CSVMappingParameters = v + return s +} + +// SetJSONMappingParameters sets the JSONMappingParameters field's value. +func (s *MappingParameters) SetJSONMappingParameters(v *JSONMappingParameters) *MappingParameters { + s.JSONMappingParameters = v + return s +} + +// Describes application output configuration in which you identify an in-application +// stream and a destination where you want the in-application stream data to +// be written. The destination can be an Amazon Kinesis stream or an Amazon +// Kinesis Firehose delivery stream. +// +// For limits on how many destinations an application can write and other limitations, +// see Limits (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/limits.html) +type Output struct { + _ struct{} `type:"structure"` + + // Describes the data format when records are written to the destination. For + // more information, see Configuring Application Output (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-output.html). + // + // DestinationSchema is a required field + DestinationSchema *DestinationSchema `type:"structure" required:"true"` + + // Identifies an Amazon Kinesis Firehose delivery stream as the destination. + KinesisFirehoseOutput *KinesisFirehoseOutput `type:"structure"` + + // Identifies an Amazon Kinesis stream as the destination. + KinesisStreamsOutput *KinesisStreamsOutput `type:"structure"` + + // Identifies an AWS Lambda function as the destination. + LambdaOutput *LambdaOutput `type:"structure"` + + // Name of the in-application stream. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s Output) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Output) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Output) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Output"} + if s.DestinationSchema == nil { + invalidParams.Add(request.NewErrParamRequired("DestinationSchema")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.DestinationSchema != nil { + if err := s.DestinationSchema.Validate(); err != nil { + invalidParams.AddNested("DestinationSchema", err.(request.ErrInvalidParams)) + } + } + if s.KinesisFirehoseOutput != nil { + if err := s.KinesisFirehoseOutput.Validate(); err != nil { + invalidParams.AddNested("KinesisFirehoseOutput", err.(request.ErrInvalidParams)) + } + } + if s.KinesisStreamsOutput != nil { + if err := s.KinesisStreamsOutput.Validate(); err != nil { + invalidParams.AddNested("KinesisStreamsOutput", err.(request.ErrInvalidParams)) + } + } + if s.LambdaOutput != nil { + if err := s.LambdaOutput.Validate(); err != nil { + invalidParams.AddNested("LambdaOutput", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDestinationSchema sets the DestinationSchema field's value. +func (s *Output) SetDestinationSchema(v *DestinationSchema) *Output { + s.DestinationSchema = v + return s +} + +// SetKinesisFirehoseOutput sets the KinesisFirehoseOutput field's value. +func (s *Output) SetKinesisFirehoseOutput(v *KinesisFirehoseOutput) *Output { + s.KinesisFirehoseOutput = v + return s +} + +// SetKinesisStreamsOutput sets the KinesisStreamsOutput field's value. +func (s *Output) SetKinesisStreamsOutput(v *KinesisStreamsOutput) *Output { + s.KinesisStreamsOutput = v + return s +} + +// SetLambdaOutput sets the LambdaOutput field's value. +func (s *Output) SetLambdaOutput(v *LambdaOutput) *Output { + s.LambdaOutput = v + return s +} + +// SetName sets the Name field's value. +func (s *Output) SetName(v string) *Output { + s.Name = &v + return s +} + +// Describes the application output configuration, which includes the in-application +// stream name and the destination where the stream data is written. The destination +// can be an Amazon Kinesis stream or an Amazon Kinesis Firehose delivery stream. +type OutputDescription struct { + _ struct{} `type:"structure"` + + // Data format used for writing data to the destination. + DestinationSchema *DestinationSchema `type:"structure"` + + // Describes the Amazon Kinesis Firehose delivery stream configured as the destination + // where output is written. + KinesisFirehoseOutputDescription *KinesisFirehoseOutputDescription `type:"structure"` + + // Describes Amazon Kinesis stream configured as the destination where output + // is written. + KinesisStreamsOutputDescription *KinesisStreamsOutputDescription `type:"structure"` + + // Describes the AWS Lambda function configured as the destination where output + // is written. + LambdaOutputDescription *LambdaOutputDescription `type:"structure"` + + // Name of the in-application stream configured as output. + Name *string `min:"1" type:"string"` + + // A unique identifier for the output configuration. + OutputId *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s OutputDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OutputDescription) GoString() string { + return s.String() +} + +// SetDestinationSchema sets the DestinationSchema field's value. +func (s *OutputDescription) SetDestinationSchema(v *DestinationSchema) *OutputDescription { + s.DestinationSchema = v + return s +} + +// SetKinesisFirehoseOutputDescription sets the KinesisFirehoseOutputDescription field's value. +func (s *OutputDescription) SetKinesisFirehoseOutputDescription(v *KinesisFirehoseOutputDescription) *OutputDescription { + s.KinesisFirehoseOutputDescription = v + return s +} + +// SetKinesisStreamsOutputDescription sets the KinesisStreamsOutputDescription field's value. +func (s *OutputDescription) SetKinesisStreamsOutputDescription(v *KinesisStreamsOutputDescription) *OutputDescription { + s.KinesisStreamsOutputDescription = v + return s +} + +// SetLambdaOutputDescription sets the LambdaOutputDescription field's value. +func (s *OutputDescription) SetLambdaOutputDescription(v *LambdaOutputDescription) *OutputDescription { + s.LambdaOutputDescription = v + return s +} + +// SetName sets the Name field's value. +func (s *OutputDescription) SetName(v string) *OutputDescription { + s.Name = &v + return s +} + +// SetOutputId sets the OutputId field's value. +func (s *OutputDescription) SetOutputId(v string) *OutputDescription { + s.OutputId = &v + return s +} + +// Describes updates to the output configuration identified by the OutputId. +type OutputUpdate struct { + _ struct{} `type:"structure"` + + // Describes the data format when records are written to the destination. For + // more information, see Configuring Application Output (http://docs.aws.amazon.com/kinesisanalytics/latest/dev/how-it-works-output.html). + DestinationSchemaUpdate *DestinationSchema `type:"structure"` + + // Describes an Amazon Kinesis Firehose delivery stream as the destination for + // the output. + KinesisFirehoseOutputUpdate *KinesisFirehoseOutputUpdate `type:"structure"` + + // Describes an Amazon Kinesis stream as the destination for the output. + KinesisStreamsOutputUpdate *KinesisStreamsOutputUpdate `type:"structure"` + + // Describes an AWS Lambda function as the destination for the output. + LambdaOutputUpdate *LambdaOutputUpdate `type:"structure"` + + // If you want to specify a different in-application stream for this output + // configuration, use this field to specify the new in-application stream name. + NameUpdate *string `min:"1" type:"string"` + + // Identifies the specific output configuration that you want to update. + // + // OutputId is a required field + OutputId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s OutputUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OutputUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *OutputUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OutputUpdate"} + if s.NameUpdate != nil && len(*s.NameUpdate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NameUpdate", 1)) + } + if s.OutputId == nil { + invalidParams.Add(request.NewErrParamRequired("OutputId")) + } + if s.OutputId != nil && len(*s.OutputId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("OutputId", 1)) + } + if s.DestinationSchemaUpdate != nil { + if err := s.DestinationSchemaUpdate.Validate(); err != nil { + invalidParams.AddNested("DestinationSchemaUpdate", err.(request.ErrInvalidParams)) + } + } + if s.KinesisFirehoseOutputUpdate != nil { + if err := s.KinesisFirehoseOutputUpdate.Validate(); err != nil { + invalidParams.AddNested("KinesisFirehoseOutputUpdate", err.(request.ErrInvalidParams)) + } + } + if s.KinesisStreamsOutputUpdate != nil { + if err := s.KinesisStreamsOutputUpdate.Validate(); err != nil { + invalidParams.AddNested("KinesisStreamsOutputUpdate", err.(request.ErrInvalidParams)) + } + } + if s.LambdaOutputUpdate != nil { + if err := s.LambdaOutputUpdate.Validate(); err != nil { + invalidParams.AddNested("LambdaOutputUpdate", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDestinationSchemaUpdate sets the DestinationSchemaUpdate field's value. +func (s *OutputUpdate) SetDestinationSchemaUpdate(v *DestinationSchema) *OutputUpdate { + s.DestinationSchemaUpdate = v + return s +} + +// SetKinesisFirehoseOutputUpdate sets the KinesisFirehoseOutputUpdate field's value. +func (s *OutputUpdate) SetKinesisFirehoseOutputUpdate(v *KinesisFirehoseOutputUpdate) *OutputUpdate { + s.KinesisFirehoseOutputUpdate = v + return s +} + +// SetKinesisStreamsOutputUpdate sets the KinesisStreamsOutputUpdate field's value. +func (s *OutputUpdate) SetKinesisStreamsOutputUpdate(v *KinesisStreamsOutputUpdate) *OutputUpdate { + s.KinesisStreamsOutputUpdate = v + return s +} + +// SetLambdaOutputUpdate sets the LambdaOutputUpdate field's value. +func (s *OutputUpdate) SetLambdaOutputUpdate(v *LambdaOutputUpdate) *OutputUpdate { + s.LambdaOutputUpdate = v + return s +} + +// SetNameUpdate sets the NameUpdate field's value. +func (s *OutputUpdate) SetNameUpdate(v string) *OutputUpdate { + s.NameUpdate = &v + return s +} + +// SetOutputId sets the OutputId field's value. +func (s *OutputUpdate) SetOutputId(v string) *OutputUpdate { + s.OutputId = &v + return s +} + +// Describes the mapping of each data element in the streaming source to the +// corresponding column in the in-application stream. +// +// Also used to describe the format of the reference data source. +type RecordColumn struct { + _ struct{} `type:"structure"` + + // Reference to the data element in the streaming input of the reference data + // source. + Mapping *string `type:"string"` + + // Name of the column created in the in-application input stream or reference + // table. + // + // Name is a required field + Name *string `type:"string" required:"true"` + + // Type of column created in the in-application input stream or reference table. + // + // SqlType is a required field + SqlType *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RecordColumn) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RecordColumn) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RecordColumn) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RecordColumn"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.SqlType == nil { + invalidParams.Add(request.NewErrParamRequired("SqlType")) + } + if s.SqlType != nil && len(*s.SqlType) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SqlType", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMapping sets the Mapping field's value. +func (s *RecordColumn) SetMapping(v string) *RecordColumn { + s.Mapping = &v + return s +} + +// SetName sets the Name field's value. +func (s *RecordColumn) SetName(v string) *RecordColumn { + s.Name = &v + return s +} + +// SetSqlType sets the SqlType field's value. +func (s *RecordColumn) SetSqlType(v string) *RecordColumn { + s.SqlType = &v + return s +} + +// Describes the record format and relevant mapping information that should +// be applied to schematize the records on the stream. +type RecordFormat struct { + _ struct{} `type:"structure"` + + // When configuring application input at the time of creating or updating an + // application, provides additional mapping information specific to the record + // format (such as JSON, CSV, or record fields delimited by some delimiter) + // on the streaming source. + MappingParameters *MappingParameters `type:"structure"` + + // The type of record format. + // + // RecordFormatType is a required field + RecordFormatType *string `type:"string" required:"true" enum:"RecordFormatType"` +} + +// String returns the string representation +func (s RecordFormat) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RecordFormat) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RecordFormat) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RecordFormat"} + if s.RecordFormatType == nil { + invalidParams.Add(request.NewErrParamRequired("RecordFormatType")) + } + if s.MappingParameters != nil { + if err := s.MappingParameters.Validate(); err != nil { + invalidParams.AddNested("MappingParameters", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMappingParameters sets the MappingParameters field's value. +func (s *RecordFormat) SetMappingParameters(v *MappingParameters) *RecordFormat { + s.MappingParameters = v + return s +} + +// SetRecordFormatType sets the RecordFormatType field's value. +func (s *RecordFormat) SetRecordFormatType(v string) *RecordFormat { + s.RecordFormatType = &v + return s +} + +// Describes the reference data source by providing the source information (S3 +// bucket name and object key name), the resulting in-application table name +// that is created, and the necessary schema to map the data elements in the +// Amazon S3 object to the in-application table. +type ReferenceDataSource struct { + _ struct{} `type:"structure"` + + // Describes the format of the data in the streaming source, and how each data + // element maps to corresponding columns created in the in-application stream. + // + // ReferenceSchema is a required field + ReferenceSchema *SourceSchema `type:"structure" required:"true"` + + // Identifies the S3 bucket and object that contains the reference data. Also + // identifies the IAM role Amazon Kinesis Analytics can assume to read this + // object on your behalf. An Amazon Kinesis Analytics application loads reference + // data only once. If the data changes, you call the UpdateApplication operation + // to trigger reloading of data into your application. + S3ReferenceDataSource *S3ReferenceDataSource `type:"structure"` + + // Name of the in-application table to create. + // + // TableName is a required field + TableName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ReferenceDataSource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReferenceDataSource) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ReferenceDataSource) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReferenceDataSource"} + if s.ReferenceSchema == nil { + invalidParams.Add(request.NewErrParamRequired("ReferenceSchema")) + } + if s.TableName == nil { + invalidParams.Add(request.NewErrParamRequired("TableName")) + } + if s.TableName != nil && len(*s.TableName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TableName", 1)) + } + if s.ReferenceSchema != nil { + if err := s.ReferenceSchema.Validate(); err != nil { + invalidParams.AddNested("ReferenceSchema", err.(request.ErrInvalidParams)) + } + } + if s.S3ReferenceDataSource != nil { + if err := s.S3ReferenceDataSource.Validate(); err != nil { + invalidParams.AddNested("S3ReferenceDataSource", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetReferenceSchema sets the ReferenceSchema field's value. +func (s *ReferenceDataSource) SetReferenceSchema(v *SourceSchema) *ReferenceDataSource { + s.ReferenceSchema = v + return s +} + +// SetS3ReferenceDataSource sets the S3ReferenceDataSource field's value. +func (s *ReferenceDataSource) SetS3ReferenceDataSource(v *S3ReferenceDataSource) *ReferenceDataSource { + s.S3ReferenceDataSource = v + return s +} + +// SetTableName sets the TableName field's value. +func (s *ReferenceDataSource) SetTableName(v string) *ReferenceDataSource { + s.TableName = &v + return s +} + +// Describes the reference data source configured for an application. +type ReferenceDataSourceDescription struct { + _ struct{} `type:"structure"` + + // ID of the reference data source. This is the ID that Amazon Kinesis Analytics + // assigns when you add the reference data source to your application using + // the AddApplicationReferenceDataSource operation. + // + // ReferenceId is a required field + ReferenceId *string `min:"1" type:"string" required:"true"` + + // Describes the format of the data in the streaming source, and how each data + // element maps to corresponding columns created in the in-application stream. + ReferenceSchema *SourceSchema `type:"structure"` + + // Provides the S3 bucket name, the object key name that contains the reference + // data. It also provides the Amazon Resource Name (ARN) of the IAM role that + // Amazon Kinesis Analytics can assume to read the Amazon S3 object and populate + // the in-application reference table. + // + // S3ReferenceDataSourceDescription is a required field + S3ReferenceDataSourceDescription *S3ReferenceDataSourceDescription `type:"structure" required:"true"` + + // The in-application table name created by the specific reference data source + // configuration. + // + // TableName is a required field + TableName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ReferenceDataSourceDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReferenceDataSourceDescription) GoString() string { + return s.String() +} + +// SetReferenceId sets the ReferenceId field's value. +func (s *ReferenceDataSourceDescription) SetReferenceId(v string) *ReferenceDataSourceDescription { + s.ReferenceId = &v + return s +} + +// SetReferenceSchema sets the ReferenceSchema field's value. +func (s *ReferenceDataSourceDescription) SetReferenceSchema(v *SourceSchema) *ReferenceDataSourceDescription { + s.ReferenceSchema = v + return s +} + +// SetS3ReferenceDataSourceDescription sets the S3ReferenceDataSourceDescription field's value. +func (s *ReferenceDataSourceDescription) SetS3ReferenceDataSourceDescription(v *S3ReferenceDataSourceDescription) *ReferenceDataSourceDescription { + s.S3ReferenceDataSourceDescription = v + return s +} + +// SetTableName sets the TableName field's value. +func (s *ReferenceDataSourceDescription) SetTableName(v string) *ReferenceDataSourceDescription { + s.TableName = &v + return s +} + +// When you update a reference data source configuration for an application, +// this object provides all the updated values (such as the source bucket name +// and object key name), the in-application table name that is created, and +// updated mapping information that maps the data in the Amazon S3 object to +// the in-application reference table that is created. +type ReferenceDataSourceUpdate struct { + _ struct{} `type:"structure"` + + // ID of the reference data source being updated. You can use the DescribeApplication + // operation to get this value. + // + // ReferenceId is a required field + ReferenceId *string `min:"1" type:"string" required:"true"` + + // Describes the format of the data in the streaming source, and how each data + // element maps to corresponding columns created in the in-application stream. + ReferenceSchemaUpdate *SourceSchema `type:"structure"` + + // Describes the S3 bucket name, object key name, and IAM role that Amazon Kinesis + // Analytics can assume to read the Amazon S3 object on your behalf and populate + // the in-application reference table. + S3ReferenceDataSourceUpdate *S3ReferenceDataSourceUpdate `type:"structure"` + + // In-application table name that is created by this update. + TableNameUpdate *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ReferenceDataSourceUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReferenceDataSourceUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ReferenceDataSourceUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReferenceDataSourceUpdate"} + if s.ReferenceId == nil { + invalidParams.Add(request.NewErrParamRequired("ReferenceId")) + } + if s.ReferenceId != nil && len(*s.ReferenceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ReferenceId", 1)) + } + if s.TableNameUpdate != nil && len(*s.TableNameUpdate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TableNameUpdate", 1)) + } + if s.ReferenceSchemaUpdate != nil { + if err := s.ReferenceSchemaUpdate.Validate(); err != nil { + invalidParams.AddNested("ReferenceSchemaUpdate", err.(request.ErrInvalidParams)) + } + } + if s.S3ReferenceDataSourceUpdate != nil { + if err := s.S3ReferenceDataSourceUpdate.Validate(); err != nil { + invalidParams.AddNested("S3ReferenceDataSourceUpdate", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetReferenceId sets the ReferenceId field's value. +func (s *ReferenceDataSourceUpdate) SetReferenceId(v string) *ReferenceDataSourceUpdate { + s.ReferenceId = &v + return s +} + +// SetReferenceSchemaUpdate sets the ReferenceSchemaUpdate field's value. +func (s *ReferenceDataSourceUpdate) SetReferenceSchemaUpdate(v *SourceSchema) *ReferenceDataSourceUpdate { + s.ReferenceSchemaUpdate = v + return s +} + +// SetS3ReferenceDataSourceUpdate sets the S3ReferenceDataSourceUpdate field's value. +func (s *ReferenceDataSourceUpdate) SetS3ReferenceDataSourceUpdate(v *S3ReferenceDataSourceUpdate) *ReferenceDataSourceUpdate { + s.S3ReferenceDataSourceUpdate = v + return s +} + +// SetTableNameUpdate sets the TableNameUpdate field's value. +func (s *ReferenceDataSourceUpdate) SetTableNameUpdate(v string) *ReferenceDataSourceUpdate { + s.TableNameUpdate = &v + return s +} + +// Provides a description of an Amazon S3 data source, including the Amazon +// Resource Name (ARN) of the S3 bucket, the ARN of the IAM role that is used +// to access the bucket, and the name of the Amazon S3 object that contains +// the data. +type S3Configuration struct { + _ struct{} `type:"structure"` + + // ARN of the S3 bucket that contains the data. + // + // BucketARN is a required field + BucketARN *string `min:"1" type:"string" required:"true"` + + // The name of the object that contains the data. + // + // FileKey is a required field + FileKey *string `min:"1" type:"string" required:"true"` + + // IAM ARN of the role used to access the data. + // + // RoleARN is a required field + RoleARN *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s S3Configuration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s S3Configuration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *S3Configuration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "S3Configuration"} + if s.BucketARN == nil { + invalidParams.Add(request.NewErrParamRequired("BucketARN")) + } + if s.BucketARN != nil && len(*s.BucketARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BucketARN", 1)) + } + if s.FileKey == nil { + invalidParams.Add(request.NewErrParamRequired("FileKey")) + } + if s.FileKey != nil && len(*s.FileKey) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FileKey", 1)) + } + if s.RoleARN == nil { + invalidParams.Add(request.NewErrParamRequired("RoleARN")) + } + if s.RoleARN != nil && len(*s.RoleARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RoleARN", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBucketARN sets the BucketARN field's value. +func (s *S3Configuration) SetBucketARN(v string) *S3Configuration { + s.BucketARN = &v + return s +} + +// SetFileKey sets the FileKey field's value. +func (s *S3Configuration) SetFileKey(v string) *S3Configuration { + s.FileKey = &v + return s +} + +// SetRoleARN sets the RoleARN field's value. +func (s *S3Configuration) SetRoleARN(v string) *S3Configuration { + s.RoleARN = &v + return s +} + +// Identifies the S3 bucket and object that contains the reference data. Also +// identifies the IAM role Amazon Kinesis Analytics can assume to read this +// object on your behalf. +// +// An Amazon Kinesis Analytics application loads reference data only once. If +// the data changes, you call the UpdateApplication operation to trigger reloading +// of data into your application. +type S3ReferenceDataSource struct { + _ struct{} `type:"structure"` + + // Amazon Resource Name (ARN) of the S3 bucket. + // + // BucketARN is a required field + BucketARN *string `min:"1" type:"string" required:"true"` + + // Object key name containing reference data. + // + // FileKey is a required field + FileKey *string `min:"1" type:"string" required:"true"` + + // ARN of the IAM role that the service can assume to read data on your behalf. + // This role must have permission for the s3:GetObject action on the object + // and trust policy that allows Amazon Kinesis Analytics service principal to + // assume this role. + // + // ReferenceRoleARN is a required field + ReferenceRoleARN *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s S3ReferenceDataSource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s S3ReferenceDataSource) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *S3ReferenceDataSource) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "S3ReferenceDataSource"} + if s.BucketARN == nil { + invalidParams.Add(request.NewErrParamRequired("BucketARN")) + } + if s.BucketARN != nil && len(*s.BucketARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BucketARN", 1)) + } + if s.FileKey == nil { + invalidParams.Add(request.NewErrParamRequired("FileKey")) + } + if s.FileKey != nil && len(*s.FileKey) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FileKey", 1)) + } + if s.ReferenceRoleARN == nil { + invalidParams.Add(request.NewErrParamRequired("ReferenceRoleARN")) + } + if s.ReferenceRoleARN != nil && len(*s.ReferenceRoleARN) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ReferenceRoleARN", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBucketARN sets the BucketARN field's value. +func (s *S3ReferenceDataSource) SetBucketARN(v string) *S3ReferenceDataSource { + s.BucketARN = &v + return s +} + +// SetFileKey sets the FileKey field's value. +func (s *S3ReferenceDataSource) SetFileKey(v string) *S3ReferenceDataSource { + s.FileKey = &v + return s +} + +// SetReferenceRoleARN sets the ReferenceRoleARN field's value. +func (s *S3ReferenceDataSource) SetReferenceRoleARN(v string) *S3ReferenceDataSource { + s.ReferenceRoleARN = &v + return s +} + +// Provides the bucket name and object key name that stores the reference data. +type S3ReferenceDataSourceDescription struct { + _ struct{} `type:"structure"` + + // Amazon Resource Name (ARN) of the S3 bucket. + // + // BucketARN is a required field + BucketARN *string `min:"1" type:"string" required:"true"` + + // Amazon S3 object key name. + // + // FileKey is a required field + FileKey *string `min:"1" type:"string" required:"true"` + + // ARN of the IAM role that Amazon Kinesis Analytics can assume to read the + // Amazon S3 object on your behalf to populate the in-application reference + // table. + // + // ReferenceRoleARN is a required field + ReferenceRoleARN *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s S3ReferenceDataSourceDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s S3ReferenceDataSourceDescription) GoString() string { + return s.String() +} + +// SetBucketARN sets the BucketARN field's value. +func (s *S3ReferenceDataSourceDescription) SetBucketARN(v string) *S3ReferenceDataSourceDescription { + s.BucketARN = &v + return s +} + +// SetFileKey sets the FileKey field's value. +func (s *S3ReferenceDataSourceDescription) SetFileKey(v string) *S3ReferenceDataSourceDescription { + s.FileKey = &v + return s +} + +// SetReferenceRoleARN sets the ReferenceRoleARN field's value. +func (s *S3ReferenceDataSourceDescription) SetReferenceRoleARN(v string) *S3ReferenceDataSourceDescription { + s.ReferenceRoleARN = &v + return s +} + +// Describes the S3 bucket name, object key name, and IAM role that Amazon Kinesis +// Analytics can assume to read the Amazon S3 object on your behalf and populate +// the in-application reference table. +type S3ReferenceDataSourceUpdate struct { + _ struct{} `type:"structure"` + + // Amazon Resource Name (ARN) of the S3 bucket. + BucketARNUpdate *string `min:"1" type:"string"` + + // Object key name. + FileKeyUpdate *string `min:"1" type:"string"` + + // ARN of the IAM role that Amazon Kinesis Analytics can assume to read the + // Amazon S3 object and populate the in-application. + ReferenceRoleARNUpdate *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s S3ReferenceDataSourceUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s S3ReferenceDataSourceUpdate) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *S3ReferenceDataSourceUpdate) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "S3ReferenceDataSourceUpdate"} + if s.BucketARNUpdate != nil && len(*s.BucketARNUpdate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BucketARNUpdate", 1)) + } + if s.FileKeyUpdate != nil && len(*s.FileKeyUpdate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FileKeyUpdate", 1)) + } + if s.ReferenceRoleARNUpdate != nil && len(*s.ReferenceRoleARNUpdate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ReferenceRoleARNUpdate", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBucketARNUpdate sets the BucketARNUpdate field's value. +func (s *S3ReferenceDataSourceUpdate) SetBucketARNUpdate(v string) *S3ReferenceDataSourceUpdate { + s.BucketARNUpdate = &v + return s +} + +// SetFileKeyUpdate sets the FileKeyUpdate field's value. +func (s *S3ReferenceDataSourceUpdate) SetFileKeyUpdate(v string) *S3ReferenceDataSourceUpdate { + s.FileKeyUpdate = &v + return s +} + +// SetReferenceRoleARNUpdate sets the ReferenceRoleARNUpdate field's value. +func (s *S3ReferenceDataSourceUpdate) SetReferenceRoleARNUpdate(v string) *S3ReferenceDataSourceUpdate { + s.ReferenceRoleARNUpdate = &v + return s +} + +// Describes the format of the data in the streaming source, and how each data +// element maps to corresponding columns created in the in-application stream. +type SourceSchema struct { + _ struct{} `type:"structure"` + + // A list of RecordColumn objects. + // + // RecordColumns is a required field + RecordColumns []*RecordColumn `min:"1" type:"list" required:"true"` + + // Specifies the encoding of the records in the streaming source. For example, + // UTF-8. + RecordEncoding *string `type:"string"` + + // Specifies the format of the records on the streaming source. + // + // RecordFormat is a required field + RecordFormat *RecordFormat `type:"structure" required:"true"` +} + +// String returns the string representation +func (s SourceSchema) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SourceSchema) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SourceSchema) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SourceSchema"} + if s.RecordColumns == nil { + invalidParams.Add(request.NewErrParamRequired("RecordColumns")) + } + if s.RecordColumns != nil && len(s.RecordColumns) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RecordColumns", 1)) + } + if s.RecordFormat == nil { + invalidParams.Add(request.NewErrParamRequired("RecordFormat")) + } + if s.RecordColumns != nil { + for i, v := range s.RecordColumns { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RecordColumns", i), err.(request.ErrInvalidParams)) + } + } + } + if s.RecordFormat != nil { + if err := s.RecordFormat.Validate(); err != nil { + invalidParams.AddNested("RecordFormat", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRecordColumns sets the RecordColumns field's value. +func (s *SourceSchema) SetRecordColumns(v []*RecordColumn) *SourceSchema { + s.RecordColumns = v + return s +} + +// SetRecordEncoding sets the RecordEncoding field's value. +func (s *SourceSchema) SetRecordEncoding(v string) *SourceSchema { + s.RecordEncoding = &v + return s +} + +// SetRecordFormat sets the RecordFormat field's value. +func (s *SourceSchema) SetRecordFormat(v *RecordFormat) *SourceSchema { + s.RecordFormat = v + return s +} + +type StartApplicationInput struct { + _ struct{} `type:"structure"` + + // Name of the application. + // + // ApplicationName is a required field + ApplicationName *string `min:"1" type:"string" required:"true"` + + // Identifies the specific input, by ID, that the application starts consuming. + // Amazon Kinesis Analytics starts reading the streaming source associated with + // the input. You can also specify where in the streaming source you want Amazon + // Kinesis Analytics to start reading. + // + // InputConfigurations is a required field + InputConfigurations []*InputConfiguration `type:"list" required:"true"` +} + +// String returns the string representation +func (s StartApplicationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartApplicationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartApplicationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartApplicationInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.InputConfigurations == nil { + invalidParams.Add(request.NewErrParamRequired("InputConfigurations")) + } + if s.InputConfigurations != nil { + for i, v := range s.InputConfigurations { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InputConfigurations", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationName sets the ApplicationName field's value. +func (s *StartApplicationInput) SetApplicationName(v string) *StartApplicationInput { + s.ApplicationName = &v + return s +} + +// SetInputConfigurations sets the InputConfigurations field's value. +func (s *StartApplicationInput) SetInputConfigurations(v []*InputConfiguration) *StartApplicationInput { + s.InputConfigurations = v + return s +} + +type StartApplicationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s StartApplicationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartApplicationOutput) GoString() string { + return s.String() +} + +type StopApplicationInput struct { + _ struct{} `type:"structure"` + + // Name of the running application to stop. + // + // ApplicationName is a required field + ApplicationName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s StopApplicationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopApplicationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopApplicationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopApplicationInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationName sets the ApplicationName field's value. +func (s *StopApplicationInput) SetApplicationName(v string) *StopApplicationInput { + s.ApplicationName = &v + return s +} + +type StopApplicationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s StopApplicationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopApplicationOutput) GoString() string { + return s.String() +} + +type UpdateApplicationInput struct { + _ struct{} `type:"structure"` + + // Name of the Amazon Kinesis Analytics application to update. + // + // ApplicationName is a required field + ApplicationName *string `min:"1" type:"string" required:"true"` + + // Describes application updates. + // + // ApplicationUpdate is a required field + ApplicationUpdate *ApplicationUpdate `type:"structure" required:"true"` + + // The current application version ID. You can use the DescribeApplication operation + // to get this value. + // + // CurrentApplicationVersionId is a required field + CurrentApplicationVersionId *int64 `min:"1" type:"long" required:"true"` +} + +// String returns the string representation +func (s UpdateApplicationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateApplicationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateApplicationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateApplicationInput"} + if s.ApplicationName == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationName")) + } + if s.ApplicationName != nil && len(*s.ApplicationName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationName", 1)) + } + if s.ApplicationUpdate == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationUpdate")) + } + if s.CurrentApplicationVersionId == nil { + invalidParams.Add(request.NewErrParamRequired("CurrentApplicationVersionId")) + } + if s.CurrentApplicationVersionId != nil && *s.CurrentApplicationVersionId < 1 { + invalidParams.Add(request.NewErrParamMinValue("CurrentApplicationVersionId", 1)) + } + if s.ApplicationUpdate != nil { + if err := s.ApplicationUpdate.Validate(); err != nil { + invalidParams.AddNested("ApplicationUpdate", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationName sets the ApplicationName field's value. +func (s *UpdateApplicationInput) SetApplicationName(v string) *UpdateApplicationInput { + s.ApplicationName = &v + return s +} + +// SetApplicationUpdate sets the ApplicationUpdate field's value. +func (s *UpdateApplicationInput) SetApplicationUpdate(v *ApplicationUpdate) *UpdateApplicationInput { + s.ApplicationUpdate = v + return s +} + +// SetCurrentApplicationVersionId sets the CurrentApplicationVersionId field's value. +func (s *UpdateApplicationInput) SetCurrentApplicationVersionId(v int64) *UpdateApplicationInput { + s.CurrentApplicationVersionId = &v + return s +} + +type UpdateApplicationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateApplicationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateApplicationOutput) GoString() string { + return s.String() +} + +const ( + // ApplicationStatusDeleting is a ApplicationStatus enum value + ApplicationStatusDeleting = "DELETING" + + // ApplicationStatusStarting is a ApplicationStatus enum value + ApplicationStatusStarting = "STARTING" + + // ApplicationStatusStopping is a ApplicationStatus enum value + ApplicationStatusStopping = "STOPPING" + + // ApplicationStatusReady is a ApplicationStatus enum value + ApplicationStatusReady = "READY" + + // ApplicationStatusRunning is a ApplicationStatus enum value + ApplicationStatusRunning = "RUNNING" + + // ApplicationStatusUpdating is a ApplicationStatus enum value + ApplicationStatusUpdating = "UPDATING" +) + +const ( + // InputStartingPositionNow is a InputStartingPosition enum value + InputStartingPositionNow = "NOW" + + // InputStartingPositionTrimHorizon is a InputStartingPosition enum value + InputStartingPositionTrimHorizon = "TRIM_HORIZON" + + // InputStartingPositionLastStoppedPoint is a InputStartingPosition enum value + InputStartingPositionLastStoppedPoint = "LAST_STOPPED_POINT" +) + +const ( + // RecordFormatTypeJson is a RecordFormatType enum value + RecordFormatTypeJson = "JSON" + + // RecordFormatTypeCsv is a RecordFormatType enum value + RecordFormatTypeCsv = "CSV" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/doc.go b/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/doc.go new file mode 100644 index 0000000000..8e2c781133 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/doc.go @@ -0,0 +1,26 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package kinesisanalytics provides the client and types for making API +// requests to Amazon Kinesis Analytics. +// +// See https://docs.aws.amazon.com/goto/WebAPI/kinesisanalytics-2015-08-14 for more information on this service. +// +// See kinesisanalytics package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/kinesisanalytics/ +// +// Using the Client +// +// To contact Amazon Kinesis Analytics 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 Amazon Kinesis Analytics client KinesisAnalytics for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/kinesisanalytics/#New +package kinesisanalytics diff --git a/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/errors.go b/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/errors.go new file mode 100644 index 0000000000..7091938f16 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/errors.go @@ -0,0 +1,77 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package kinesisanalytics + +const ( + + // ErrCodeCodeValidationException for service response error code + // "CodeValidationException". + // + // User-provided application code (query) is invalid. This can be a simple syntax + // error. + ErrCodeCodeValidationException = "CodeValidationException" + + // ErrCodeConcurrentModificationException for service response error code + // "ConcurrentModificationException". + // + // Exception thrown as a result of concurrent modification to an application. + // For example, two individuals attempting to edit the same application at the + // same time. + ErrCodeConcurrentModificationException = "ConcurrentModificationException" + + // ErrCodeInvalidApplicationConfigurationException for service response error code + // "InvalidApplicationConfigurationException". + // + // User-provided application configuration is not valid. + ErrCodeInvalidApplicationConfigurationException = "InvalidApplicationConfigurationException" + + // ErrCodeInvalidArgumentException for service response error code + // "InvalidArgumentException". + // + // Specified input parameter value is invalid. + ErrCodeInvalidArgumentException = "InvalidArgumentException" + + // ErrCodeLimitExceededException for service response error code + // "LimitExceededException". + // + // Exceeded the number of applications allowed. + ErrCodeLimitExceededException = "LimitExceededException" + + // ErrCodeResourceInUseException for service response error code + // "ResourceInUseException". + // + // Application is not available for this operation. + ErrCodeResourceInUseException = "ResourceInUseException" + + // ErrCodeResourceNotFoundException for service response error code + // "ResourceNotFoundException". + // + // Specified application can't be found. + ErrCodeResourceNotFoundException = "ResourceNotFoundException" + + // ErrCodeResourceProvisionedThroughputExceededException for service response error code + // "ResourceProvisionedThroughputExceededException". + // + // Discovery failed to get a record from the streaming source because of the + // Amazon Kinesis Streams ProvisionedThroughputExceededException. For more information, + // see GetRecords (http://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetRecords.html) + // in the Amazon Kinesis Streams API Reference. + ErrCodeResourceProvisionedThroughputExceededException = "ResourceProvisionedThroughputExceededException" + + // ErrCodeServiceUnavailableException for service response error code + // "ServiceUnavailableException". + // + // The service is unavailable. Back off and retry the operation. + ErrCodeServiceUnavailableException = "ServiceUnavailableException" + + // ErrCodeUnableToDetectSchemaException for service response error code + // "UnableToDetectSchemaException". + // + // Data format is not valid. Amazon Kinesis Analytics is not able to detect + // schema for the given streaming source. + ErrCodeUnableToDetectSchemaException = "UnableToDetectSchemaException" + + // ErrCodeUnsupportedOperationException for service response error code + // "UnsupportedOperationException". + ErrCodeUnsupportedOperationException = "UnsupportedOperationException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/service.go b/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/service.go new file mode 100644 index 0000000000..153daad6eb --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/kinesisanalytics/service.go @@ -0,0 +1,97 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package kinesisanalytics + +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/jsonrpc" +) + +// KinesisAnalytics provides the API operation methods for making requests to +// Amazon Kinesis Analytics. See this package's package overview docs +// for details on the service. +// +// KinesisAnalytics methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type KinesisAnalytics 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 = "kinesisanalytics" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Kinesis Analytics" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the KinesisAnalytics 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: +// // Create a KinesisAnalytics client from just a session. +// svc := kinesisanalytics.New(mySession) +// +// // Create a KinesisAnalytics client with additional configuration +// svc := kinesisanalytics.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *KinesisAnalytics { + c := p.ClientConfig(EndpointsID, cfgs...) + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *KinesisAnalytics { + svc := &KinesisAnalytics{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2015-08-14", + JSONVersion: "1.1", + TargetPrefix: "KinesisAnalytics_20150814", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a KinesisAnalytics operation and runs any +// custom request initialization. +func (c *KinesisAnalytics) 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/kms/api.go b/vendor/github.com/aws/aws-sdk-go/service/kms/api.go index 98ff529389..e669ba46ff 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 @@ -18,7 +18,7 @@ const opCancelKeyDeletion = "CancelKeyDeletion" // CancelKeyDeletionRequest generates a "aws/request.Request" representing the // client's request for the CancelKeyDeletion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -123,12 +123,178 @@ func (c *KMS) CancelKeyDeletionWithContext(ctx aws.Context, input *CancelKeyDele return out, req.Send() } +const opConnectCustomKeyStore = "ConnectCustomKeyStore" + +// ConnectCustomKeyStoreRequest generates a "aws/request.Request" representing the +// client's request for the ConnectCustomKeyStore 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 ConnectCustomKeyStore for more information on using the ConnectCustomKeyStore +// 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 ConnectCustomKeyStoreRequest method. +// req, resp := client.ConnectCustomKeyStoreRequest(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/ConnectCustomKeyStore +func (c *KMS) ConnectCustomKeyStoreRequest(input *ConnectCustomKeyStoreInput) (req *request.Request, output *ConnectCustomKeyStoreOutput) { + op := &request.Operation{ + Name: opConnectCustomKeyStore, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ConnectCustomKeyStoreInput{} + } + + output = &ConnectCustomKeyStoreOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// ConnectCustomKeyStore API operation for AWS Key Management Service. +// +// Connects or reconnects a custom key store (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html) +// to its associated AWS CloudHSM cluster. +// +// The custom key store must be connected before you can create customer master +// keys (CMKs) in the key store or use the CMKs it contains. You can disconnect +// and reconnect a custom key store at any time. +// +// To connect a custom key store, its associated AWS CloudHSM cluster must have +// at least one active HSM. To get the number of active HSMs in a cluster, use +// the DescribeClusters (http://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters) +// operation. To add HSMs to the cluster, use the CreateHsm (http://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm) +// operation. +// +// The connection process can take an extended amount of time to complete; up +// to 20 minutes. This operation starts the connection process, but it does +// not wait for it to complete. When it succeeds, this operation quickly returns +// an HTTP 200 response and a JSON object with no properties. However, this +// response does not indicate that the custom key store is connected. To get +// the connection state of the custom key store, use the DescribeCustomKeyStores +// operation. +// +// During the connection process, AWS KMS finds the AWS CloudHSM cluster that +// is associated with the custom key store, creates the connection infrastructure, +// connects to the cluster, logs into the AWS CloudHSM client as the kmsuser +// (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser) +// crypto user (CU), and rotates its password. +// +// The ConnectCustomKeyStore operation might fail for various reasons. To find +// the reason, use the DescribeCustomKeyStores operation and see the ConnectionErrorCode +// in the response. For help interpreting the ConnectionErrorCode, see CustomKeyStoresListEntry. +// +// To fix the failure, use the DisconnectCustomKeyStore operation to disconnect +// the custom key store, correct the error, use the UpdateCustomKeyStore operation +// if necessary, and then use ConnectCustomKeyStore again. +// +// If you are having trouble connecting or disconnecting a custom key store, +// see Troubleshooting a Custom Key Store (http://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html) +// in the AWS Key Management Service Developer 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 AWS Key Management Service's +// API operation ConnectCustomKeyStore for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCloudHsmClusterNotActiveException "CloudHsmClusterNotActiveException" +// The request was rejected because the AWS CloudHSM cluster that is associated +// with the custom key store is not active. Initialize and activate the cluster +// and try the command again. For detailed instructions, see Getting Started +// (http://docs.aws.amazon.com/cloudhsm/latest/userguide/getting-started.html) +// in the AWS CloudHSM User Guide. +// +// * ErrCodeCustomKeyStoreInvalidStateException "CustomKeyStoreInvalidStateException" +// The request was rejected because of the ConnectionState of the custom key +// store. To get the ConnectionState of a custom key store, use the DescribeCustomKeyStores +// operation. +// +// This exception is thrown under the following conditions: +// +// * You requested the CreateKey or GenerateRandom operation in a custom +// key store that is not connected. These operations are valid only when +// the custom key store ConnectionState is CONNECTED. +// +// * You requested the UpdateCustomKeyStore or DeleteCustomKeyStore operation +// on a custom key store that is not disconnected. This operation is valid +// only when the custom key store ConnectionState is DISCONNECTED. +// +// * You requested the ConnectCustomKeyStore operation on a custom key store +// with a ConnectionState of DISCONNECTING or FAILED. This operation is valid +// for all other ConnectionState values. +// +// * ErrCodeCustomKeyStoreNotFoundException "CustomKeyStoreNotFoundException" +// The request was rejected because AWS KMS cannot find a custom key store with +// the specified key store name or ID. +// +// * ErrCodeInternalException "KMSInternalException" +// The request was rejected because an internal exception occurred. The request +// can be retried. +// +// * ErrCodeCloudHsmClusterInvalidConfigurationException "CloudHsmClusterInvalidConfigurationException" +// The request was rejected because the associated AWS CloudHSM cluster did +// not meet the configuration requirements for a custom key store. The cluster +// must be configured with private subnets in at least two different Availability +// Zones in the Region. Also, it must contain at least as many HSMs as the operation +// requires. +// +// For the CreateCustomKeyStore, UpdateCustomKeyStore, and CreateKey operations, +// the AWS CloudHSM cluster must have at least two active HSMs, each in a different +// Availability Zone. For the ConnectCustomKeyStore operation, the AWS CloudHSM +// must contain at least one active HSM. +// +// For information about creating a private subnet for a AWS CloudHSM cluster, +// see Create a Private Subnet (http://docs.aws.amazon.com/cloudhsm/latest/userguide/create-subnets.html) +// in the AWS CloudHSM User Guide. To add HSMs, use the AWS CloudHSM CreateHsm +// (http://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html) +// operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ConnectCustomKeyStore +func (c *KMS) ConnectCustomKeyStore(input *ConnectCustomKeyStoreInput) (*ConnectCustomKeyStoreOutput, error) { + req, out := c.ConnectCustomKeyStoreRequest(input) + return out, req.Send() +} + +// ConnectCustomKeyStoreWithContext is the same as ConnectCustomKeyStore with the addition of +// the ability to pass a context and additional request options. +// +// See ConnectCustomKeyStore 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) ConnectCustomKeyStoreWithContext(ctx aws.Context, input *ConnectCustomKeyStoreInput, opts ...request.Option) (*ConnectCustomKeyStoreOutput, error) { + req, out := c.ConnectCustomKeyStoreRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateAlias = "CreateAlias" // CreateAliasRequest generates a "aws/request.Request" representing the // client's request for the CreateAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -162,16 +328,14 @@ func (c *KMS) CreateAliasRequest(input *CreateAliasInput) (req *request.Request, output = &CreateAliasOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // 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 selected operations, such as Encrypt -// and GenerateDataKey. +// Creates a display name for a customer master key (CMK). You can use an alias +// to identify a CMK in selected operations, such as Encrypt and GenerateDataKey. // // Each CMK can have multiple aliases, but each alias points to only one CMK. // The alias name must be unique in the AWS account and region. To simplify @@ -183,9 +347,10 @@ func (c *KMS) CreateAliasRequest(input *CreateAliasInput) (req *request.Request, // the response from the DescribeKey operation. To get the aliases of all CMKs, // use the ListAliases operation. // +// An alias must start with the word alias followed by a forward slash (alias/). // The alias name can contain only alphanumeric characters, forward slashes -// (/), underscores (_), and dashes (-). Alias names cannot begin with aws/. -// That alias name prefix is reserved for AWS managed CMKs. +// (/), underscores (_), and dashes (-). Alias names cannot begin with aws; +// that alias name prefix is reserved by Amazon Web Services (AWS). // // The alias and the CMK it is mapped to must be in the same AWS account and // the same region. You cannot perform this operation on an alias in a different @@ -259,12 +424,209 @@ func (c *KMS) CreateAliasWithContext(ctx aws.Context, input *CreateAliasInput, o return out, req.Send() } +const opCreateCustomKeyStore = "CreateCustomKeyStore" + +// CreateCustomKeyStoreRequest generates a "aws/request.Request" representing the +// client's request for the CreateCustomKeyStore 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 CreateCustomKeyStore for more information on using the CreateCustomKeyStore +// 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 CreateCustomKeyStoreRequest method. +// req, resp := client.CreateCustomKeyStoreRequest(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/CreateCustomKeyStore +func (c *KMS) CreateCustomKeyStoreRequest(input *CreateCustomKeyStoreInput) (req *request.Request, output *CreateCustomKeyStoreOutput) { + op := &request.Operation{ + Name: opCreateCustomKeyStore, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateCustomKeyStoreInput{} + } + + output = &CreateCustomKeyStoreOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateCustomKeyStore API operation for AWS Key Management Service. +// +// Creates a custom key store (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html) +// that is associated with an AWS CloudHSM cluster (http://docs.aws.amazon.com/cloudhsm/latest/userguide/clusters.html) +// that you own and manage. +// +// This operation is part of the Custom Key Store feature (http://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. +// +// When the operation completes successfully, it returns the ID of the new custom +// key store. Before you can use your new custom key store, you need to use +// the ConnectCustomKeyStore operation to connect the new key store to its AWS +// CloudHSM cluster. +// +// The CreateCustomKeyStore operation requires the following elements. +// +// * You must specify an active AWS CloudHSM cluster in the same account +// and AWS Region as the custom key store. You can use an existing cluster +// or create and activate a new AWS CloudHSM cluster (http://docs.aws.amazon.com/cloudhsm/latest/userguide/create-cluster.html) +// for the key store. AWS KMS does not require exclusive use of the cluster. +// +// * You must include the content of the trust anchor certificate for the +// cluster. You created this certificate, and saved it in the customerCA.crt +// file, when you initialized the cluster (http://docs.aws.amazon.com/cloudhsm/latest/userguide/initialize-cluster.html#sign-csr). +// +// * You must provide the password of the dedicated kmsuser (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser) +// crypto user (CU) account in the cluster. +// +// Before you create the custom key store, use the createUser (http://docs.aws.amazon.com/cloudhsm/latest/userguide/cloudhsm_mgmt_util-createUser.html) +// command in cloudhsm_mgmt_util to create a crypto user (CU) named (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser)kmsuserin +// specified AWS CloudHSM cluster. AWS KMS uses the kmsuser CU account to +// create and manage key material on your behalf. For instructions, see Create +// the kmsuser Crypto User (http://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore) +// in the AWS Key Management Service Developer Guide. +// +// The AWS CloudHSM cluster that you specify must meet the following requirements. +// +// * The cluster must be active and be in the same AWS account and Region +// as the custom key store. +// +// * Each custom key store must be associated with a different AWS CloudHSM +// cluster. The cluster cannot be associated with another custom key store +// or have the same cluster certificate as a cluster that is associated with +// another custom key store. To view the cluster certificate, use the AWS +// CloudHSM DescribeClusters (http://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html) +// operation. Clusters that share a backup history have the same cluster +// certificate. +// +// * The cluster must be configured with subnets in at least two different +// Availability Zones in the Region. Because AWS CloudHSM is not supported +// in all Availability Zones, we recommend that the cluster have subnets +// in all Availability Zones in the Region. +// +// * The cluster must contain at least two active HSMs, each in a different +// Availability Zone. +// +// New custom key stores are not automatically connected. After you create your +// custom key store, use the ConnectCustomKeyStore operation to connect the +// custom key store to its associated AWS CloudHSM cluster. Even if you are +// not going to use your custom key store immediately, you might want to connect +// it to verify that all settings are correct and then disconnect it until you +// are ready to use it. +// +// If this operation succeeds, it returns the ID of the new custom key store. +// For help with failures, see Troubleshoot a Custom Key Store (http://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html) +// in the AWS KMS Developer 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 AWS Key Management Service's +// API operation CreateCustomKeyStore for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCloudHsmClusterInUseException "CloudHsmClusterInUseException" +// The request was rejected because the specified AWS CloudHSM cluster is already +// associated with a custom key store or it shares a backup history with a cluster +// that is associated with a custom key store. Each custom key store must be +// associated with a different AWS CloudHSM cluster. +// +// Clusters that share a backup history have the same cluster certificate. To +// view the cluster certificate of a cluster, use the DescribeClusters (http://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html) +// operation. +// +// * ErrCodeCustomKeyStoreNameInUseException "CustomKeyStoreNameInUseException" +// The request was rejected because the specified custom key store name is already +// assigned to another custom key store in the account. Try again with a custom +// key store name that is unique in the account. +// +// * ErrCodeCloudHsmClusterNotFoundException "CloudHsmClusterNotFoundException" +// The request was rejected because AWS KMS cannot find the AWS CloudHSM cluster +// with the specified cluster ID. Retry the request with a different cluster +// ID. +// +// * ErrCodeInternalException "KMSInternalException" +// The request was rejected because an internal exception occurred. The request +// can be retried. +// +// * ErrCodeCloudHsmClusterNotActiveException "CloudHsmClusterNotActiveException" +// The request was rejected because the AWS CloudHSM cluster that is associated +// with the custom key store is not active. Initialize and activate the cluster +// and try the command again. For detailed instructions, see Getting Started +// (http://docs.aws.amazon.com/cloudhsm/latest/userguide/getting-started.html) +// in the AWS CloudHSM User Guide. +// +// * ErrCodeIncorrectTrustAnchorException "IncorrectTrustAnchorException" +// The request was rejected because the trust anchor certificate in the request +// is not the trust anchor certificate for the specified AWS CloudHSM cluster. +// +// When you initialize the cluster (http://docs.aws.amazon.com/cloudhsm/latest/userguide/initialize-cluster.html#sign-csr), +// you create the trust anchor certificate and save it in the customerCA.crt +// file. +// +// * ErrCodeCloudHsmClusterInvalidConfigurationException "CloudHsmClusterInvalidConfigurationException" +// The request was rejected because the associated AWS CloudHSM cluster did +// not meet the configuration requirements for a custom key store. The cluster +// must be configured with private subnets in at least two different Availability +// Zones in the Region. Also, it must contain at least as many HSMs as the operation +// requires. +// +// For the CreateCustomKeyStore, UpdateCustomKeyStore, and CreateKey operations, +// the AWS CloudHSM cluster must have at least two active HSMs, each in a different +// Availability Zone. For the ConnectCustomKeyStore operation, the AWS CloudHSM +// must contain at least one active HSM. +// +// For information about creating a private subnet for a AWS CloudHSM cluster, +// see Create a Private Subnet (http://docs.aws.amazon.com/cloudhsm/latest/userguide/create-subnets.html) +// in the AWS CloudHSM User Guide. To add HSMs, use the AWS CloudHSM CreateHsm +// (http://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html) +// operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/CreateCustomKeyStore +func (c *KMS) CreateCustomKeyStore(input *CreateCustomKeyStoreInput) (*CreateCustomKeyStoreOutput, error) { + req, out := c.CreateCustomKeyStoreRequest(input) + return out, req.Send() +} + +// CreateCustomKeyStoreWithContext is the same as CreateCustomKeyStore with the addition of +// the ability to pass a context and additional request options. +// +// See CreateCustomKeyStore 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) CreateCustomKeyStoreWithContext(ctx aws.Context, input *CreateCustomKeyStoreInput, opts ...request.Option) (*CreateCustomKeyStoreOutput, error) { + req, out := c.CreateCustomKeyStoreRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateGrant = "CreateGrant" // CreateGrantRequest generates a "aws/request.Request" representing the // client's request for the CreateGrant operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -385,7 +747,7 @@ const opCreateKey = "CreateKey" // CreateKeyRequest generates a "aws/request.Request" representing the // client's request for the CreateKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -426,16 +788,26 @@ func (c *KMS) CreateKeyRequest(input *CreateKeyInput) (req *request.Request, out // // Creates a customer master key (CMK) in the caller's AWS account. // -// You can use a CMK to encrypt small amounts of data (4 KiB or less) directly. -// But CMKs are more commonly used to encrypt data encryption keys (DEKs), which -// are used to encrypt raw data. For more information about DEKs and the difference -// between CMKs and DEKs, see the following: +// You can use a CMK to encrypt small amounts of data (4 KiB or less) directly, +// but CMKs are more commonly used to encrypt data keys, which are used to encrypt +// raw data. For more information about data keys and the difference between +// CMKs and data keys, see the following: // // * The GenerateDataKey operation // // * AWS Key Management Service Concepts (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html) // in the AWS Key Management Service Developer Guide // +// If you plan to import key material (http://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html), +// use the Origin parameter with a value of EXTERNAL to create a CMK with no +// key material. +// +// To create a CMK in a custom key store (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html), +// use CustomKeyStoreId parameter to specify the custom key store. You must +// also use the Origin parameter with a value of AWS_CLOUDHSM. The AWS CloudHSM +// cluster that is associated with the custom key store must have at least two +// active HSMs, each in a different Availability Zone in the Region. +// // You cannot use this operation to create a CMK in a different AWS account. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -473,6 +845,47 @@ func (c *KMS) CreateKeyRequest(input *CreateKeyInput) (req *request.Request, out // * ErrCodeTagException "TagException" // The request was rejected because one or more tags are not valid. // +// * ErrCodeCustomKeyStoreNotFoundException "CustomKeyStoreNotFoundException" +// The request was rejected because AWS KMS cannot find a custom key store with +// the specified key store name or ID. +// +// * ErrCodeCustomKeyStoreInvalidStateException "CustomKeyStoreInvalidStateException" +// The request was rejected because of the ConnectionState of the custom key +// store. To get the ConnectionState of a custom key store, use the DescribeCustomKeyStores +// operation. +// +// This exception is thrown under the following conditions: +// +// * You requested the CreateKey or GenerateRandom operation in a custom +// key store that is not connected. These operations are valid only when +// the custom key store ConnectionState is CONNECTED. +// +// * You requested the UpdateCustomKeyStore or DeleteCustomKeyStore operation +// on a custom key store that is not disconnected. This operation is valid +// only when the custom key store ConnectionState is DISCONNECTED. +// +// * You requested the ConnectCustomKeyStore operation on a custom key store +// with a ConnectionState of DISCONNECTING or FAILED. This operation is valid +// for all other ConnectionState values. +// +// * ErrCodeCloudHsmClusterInvalidConfigurationException "CloudHsmClusterInvalidConfigurationException" +// The request was rejected because the associated AWS CloudHSM cluster did +// not meet the configuration requirements for a custom key store. The cluster +// must be configured with private subnets in at least two different Availability +// Zones in the Region. Also, it must contain at least as many HSMs as the operation +// requires. +// +// For the CreateCustomKeyStore, UpdateCustomKeyStore, and CreateKey operations, +// the AWS CloudHSM cluster must have at least two active HSMs, each in a different +// Availability Zone. For the ConnectCustomKeyStore operation, the AWS CloudHSM +// must contain at least one active HSM. +// +// For information about creating a private subnet for a AWS CloudHSM cluster, +// see Create a Private Subnet (http://docs.aws.amazon.com/cloudhsm/latest/userguide/create-subnets.html) +// in the AWS CloudHSM User Guide. To add HSMs, use the AWS CloudHSM CreateHsm +// (http://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html) +// operation. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/CreateKey func (c *KMS) CreateKey(input *CreateKeyInput) (*CreateKeyOutput, error) { req, out := c.CreateKeyRequest(input) @@ -500,7 +913,7 @@ const opDecrypt = "Decrypt" // DecryptRequest generates a "aws/request.Request" representing the // client's request for the Decrypt operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -548,13 +961,14 @@ func (c *KMS) DecryptRequest(input *DecryptInput) (req *request.Request, output // // * Encrypt // -// Whenever possible, use key policies to give users permission to call the -// Decrypt operation on the CMK, instead of IAM policies. Otherwise, you might -// create an IAM user policy that gives the user Decrypt permission 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. +// Note that if a caller has been granted access permissions to all keys (through, +// for example, IAM user policies that grant Decrypt permission on all resources), +// then ciphertext encrypted by using keys in other accounts where the key grants +// access to the caller can be decrypted. To remedy this, we recommend that +// you do not grant Decrypt access in an IAM user policy. Instead grant Decrypt +// access only in key policies. If you must grant Decrypt access in an IAM user +// policy, you should scope the resource to specific keys or to specific trusted +// accounts. // // The result of this operation varies with the key state of the CMK. For details, // see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) @@ -630,7 +1044,7 @@ const opDeleteAlias = "DeleteAlias" // DeleteAliasRequest generates a "aws/request.Request" representing the // client's request for the DeleteAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -664,8 +1078,7 @@ func (c *KMS) DeleteAliasRequest(input *DeleteAliasInput) (req *request.Request, output = &DeleteAliasOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -733,12 +1146,150 @@ func (c *KMS) DeleteAliasWithContext(ctx aws.Context, input *DeleteAliasInput, o return out, req.Send() } +const opDeleteCustomKeyStore = "DeleteCustomKeyStore" + +// DeleteCustomKeyStoreRequest generates a "aws/request.Request" representing the +// client's request for the DeleteCustomKeyStore 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 DeleteCustomKeyStore for more information on using the DeleteCustomKeyStore +// 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 DeleteCustomKeyStoreRequest method. +// req, resp := client.DeleteCustomKeyStoreRequest(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/DeleteCustomKeyStore +func (c *KMS) DeleteCustomKeyStoreRequest(input *DeleteCustomKeyStoreInput) (req *request.Request, output *DeleteCustomKeyStoreOutput) { + op := &request.Operation{ + Name: opDeleteCustomKeyStore, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteCustomKeyStoreInput{} + } + + output = &DeleteCustomKeyStoreOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteCustomKeyStore API operation for AWS Key Management Service. +// +// Deletes a custom key store (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html). +// This operation does not delete the AWS CloudHSM cluster that is associated +// with the custom key store, or affect any users or keys in the cluster. +// +// The custom key store that you delete cannot contain any AWS KMS customer +// master keys (CMKs) (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#master_keys). +// Before deleting the key store, verify that you will never need to use any +// of the CMKs in the key store for any cryptographic operations. Then, use +// ScheduleKeyDeletion to delete the AWS KMS customer master keys (CMKs) from +// the key store. When the scheduled waiting period expires, the ScheduleKeyDeletion +// operation deletes the CMKs. Then it makes a best effort to delete the key +// material from the associated cluster. However, you might need to manually +// delete the orphaned key material (http://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-orphaned-key) +// from the cluster and its backups. +// +// After all CMKs are deleted from AWS KMS, use DisconnectCustomKeyStore to +// disconnect the key store from AWS KMS. Then, you can delete the custom key +// store. +// +// Instead of deleting the custom key store, consider using DisconnectCustomKeyStore +// to disconnect it from AWS KMS. While the key store is disconnected, you cannot +// create or use the CMKs in the key store. But, you do not need to delete CMKs +// and you can reconnect a disconnected custom key store at any time. +// +// If the operation succeeds, it returns a JSON object with no properties. +// +// This operation is part of the Custom Key Store feature (http://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. +// +// 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 DeleteCustomKeyStore for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCustomKeyStoreHasCMKsException "CustomKeyStoreHasCMKsException" +// The request was rejected because the custom key store contains AWS KMS customer +// master keys (CMKs). After verifying that you do not need to use the CMKs, +// use the ScheduleKeyDeletion operation to delete the CMKs. After they are +// deleted, you can delete the custom key store. +// +// * ErrCodeCustomKeyStoreInvalidStateException "CustomKeyStoreInvalidStateException" +// The request was rejected because of the ConnectionState of the custom key +// store. To get the ConnectionState of a custom key store, use the DescribeCustomKeyStores +// operation. +// +// This exception is thrown under the following conditions: +// +// * You requested the CreateKey or GenerateRandom operation in a custom +// key store that is not connected. These operations are valid only when +// the custom key store ConnectionState is CONNECTED. +// +// * You requested the UpdateCustomKeyStore or DeleteCustomKeyStore operation +// on a custom key store that is not disconnected. This operation is valid +// only when the custom key store ConnectionState is DISCONNECTED. +// +// * You requested the ConnectCustomKeyStore operation on a custom key store +// with a ConnectionState of DISCONNECTING or FAILED. This operation is valid +// for all other ConnectionState values. +// +// * ErrCodeCustomKeyStoreNotFoundException "CustomKeyStoreNotFoundException" +// The request was rejected because AWS KMS cannot find a custom key store with +// the specified key store name or ID. +// +// * ErrCodeInternalException "KMSInternalException" +// The request was rejected because an internal exception occurred. The request +// can be retried. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DeleteCustomKeyStore +func (c *KMS) DeleteCustomKeyStore(input *DeleteCustomKeyStoreInput) (*DeleteCustomKeyStoreOutput, error) { + req, out := c.DeleteCustomKeyStoreRequest(input) + return out, req.Send() +} + +// DeleteCustomKeyStoreWithContext is the same as DeleteCustomKeyStore with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteCustomKeyStore 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) DeleteCustomKeyStoreWithContext(ctx aws.Context, input *DeleteCustomKeyStoreInput, opts ...request.Option) (*DeleteCustomKeyStoreOutput, error) { + req, out := c.DeleteCustomKeyStoreRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteImportedKeyMaterial = "DeleteImportedKeyMaterial" // DeleteImportedKeyMaterialRequest generates a "aws/request.Request" representing the // client's request for the DeleteImportedKeyMaterial operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -772,8 +1323,7 @@ func (c *KMS) DeleteImportedKeyMaterialRequest(input *DeleteImportedKeyMaterialI output = &DeleteImportedKeyMaterialOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -852,12 +1402,122 @@ func (c *KMS) DeleteImportedKeyMaterialWithContext(ctx aws.Context, input *Delet return out, req.Send() } +const opDescribeCustomKeyStores = "DescribeCustomKeyStores" + +// DescribeCustomKeyStoresRequest generates a "aws/request.Request" representing the +// client's request for the DescribeCustomKeyStores 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 DescribeCustomKeyStores for more information on using the DescribeCustomKeyStores +// 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 DescribeCustomKeyStoresRequest method. +// req, resp := client.DescribeCustomKeyStoresRequest(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/DescribeCustomKeyStores +func (c *KMS) DescribeCustomKeyStoresRequest(input *DescribeCustomKeyStoresInput) (req *request.Request, output *DescribeCustomKeyStoresOutput) { + op := &request.Operation{ + Name: opDescribeCustomKeyStores, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeCustomKeyStoresInput{} + } + + output = &DescribeCustomKeyStoresOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeCustomKeyStores API operation for AWS Key Management Service. +// +// Gets information about custom key stores (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html) +// in the account and region. +// +// This operation is part of the Custom Key Store feature (http://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 +// key store, use either the CustomKeyStoreName or CustomKeyStoreId parameter +// (but not both). +// +// To determine whether the custom key store is connected to its AWS CloudHSM +// cluster, use the ConnectionState element in the response. If an attempt to +// connect the custom key store failed, the ConnectionState value is FAILED +// and the ConnectionErrorCode element in the response indicates the cause of +// the failure. For help interpreting the ConnectionErrorCode, see CustomKeyStoresListEntry. +// +// Custom key stores have a DISCONNECTED connection state if the key store has +// never been connected or you use the DisconnectCustomKeyStore operation to +// disconnect it. If your custom key store state is CONNECTED but you are having +// trouble using it, make sure that its associated AWS CloudHSM cluster is active +// and contains the minimum number of HSMs required for the operation, if any. +// +// For help repairing your custom key store, see the Troubleshooting Custom +// Key Stores (http://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore-html) +// topic in the AWS Key Management Service Developer 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 AWS Key Management Service's +// API operation DescribeCustomKeyStores for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCustomKeyStoreNotFoundException "CustomKeyStoreNotFoundException" +// The request was rejected because AWS KMS cannot find a custom key store with +// the specified key store name or ID. +// +// * ErrCodeInternalException "KMSInternalException" +// The request was rejected because an internal exception occurred. The request +// can be retried. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DescribeCustomKeyStores +func (c *KMS) DescribeCustomKeyStores(input *DescribeCustomKeyStoresInput) (*DescribeCustomKeyStoresOutput, error) { + req, out := c.DescribeCustomKeyStoresRequest(input) + return out, req.Send() +} + +// DescribeCustomKeyStoresWithContext is the same as DescribeCustomKeyStores with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeCustomKeyStores 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) DescribeCustomKeyStoresWithContext(ctx aws.Context, input *DescribeCustomKeyStoresInput, opts ...request.Option) (*DescribeCustomKeyStoresOutput, error) { + req, out := c.DescribeCustomKeyStoresRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeKey = "DescribeKey" // DescribeKeyRequest generates a "aws/request.Request" representing the // client's request for the DescribeKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -898,9 +1558,8 @@ func (c *KMS) DescribeKeyRequest(input *DescribeKeyInput) (req *request.Request, // // Provides detailed information about the specified customer master key (CMK). // -// You can use DescribeKey on a predefined AWS alias, that is, an AWS alias -// with no key ID. When you do, AWS KMS associates the alias with an AWS managed -// CMK (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#master_keys) +// If you use DescribeKey on a predefined AWS alias, that is, an AWS alias with +// no key ID, AWS KMS associates the alias with an AWS managed CMK (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#master_keys) // and returns its KeyId and Arn in the response. // // To perform this operation on a CMK in a different AWS account, specify the @@ -956,7 +1615,7 @@ const opDisableKey = "DisableKey" // DisableKeyRequest generates a "aws/request.Request" representing the // client's request for the DisableKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -990,8 +1649,7 @@ func (c *KMS) DisableKeyRequest(input *DisableKeyInput) (req *request.Request, o output = &DisableKeyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1067,7 +1725,7 @@ const opDisableKeyRotation = "DisableKeyRotation" // DisableKeyRotationRequest generates a "aws/request.Request" representing the // client's request for the DisableKeyRotation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1101,8 +1759,7 @@ func (c *KMS) DisableKeyRotationRequest(input *DisableKeyRotationInput) (req *re output = &DisableKeyRotationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1176,12 +1833,131 @@ func (c *KMS) DisableKeyRotationWithContext(ctx aws.Context, input *DisableKeyRo return out, req.Send() } +const opDisconnectCustomKeyStore = "DisconnectCustomKeyStore" + +// DisconnectCustomKeyStoreRequest generates a "aws/request.Request" representing the +// client's request for the DisconnectCustomKeyStore 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 DisconnectCustomKeyStore for more information on using the DisconnectCustomKeyStore +// 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 DisconnectCustomKeyStoreRequest method. +// req, resp := client.DisconnectCustomKeyStoreRequest(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/DisconnectCustomKeyStore +func (c *KMS) DisconnectCustomKeyStoreRequest(input *DisconnectCustomKeyStoreInput) (req *request.Request, output *DisconnectCustomKeyStoreOutput) { + op := &request.Operation{ + Name: opDisconnectCustomKeyStore, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisconnectCustomKeyStoreInput{} + } + + output = &DisconnectCustomKeyStoreOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DisconnectCustomKeyStore API operation for AWS Key Management Service. +// +// Disconnects the custom key store (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html) +// from its associated AWS CloudHSM cluster. While a custom key store is disconnected, +// you can manage the custom key store and its customer master keys (CMKs), +// but you cannot create or use CMKs in the custom key store. You can reconnect +// the custom key store at any time. +// +// While a custom key store is disconnected, all attempts to create customer +// master keys (CMKs) in the custom key store or to use existing CMKs in cryptographic +// operations will fail. This action can prevent users from storing and accessing +// sensitive data. +// +// To find the connection state of a custom key store, use the DescribeCustomKeyStoresoperation. To reconnect a custom key store, use the ConnectCustomKeyStoreoperation. +// +// If the operation succeeds, it returns a JSON object with no properties. +// +// This operation is part of the Custom Key Store feature (http://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.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. +// +// See the AWS API reference guide for AWS Key Management Service's +// API operation DisconnectCustomKeyStore for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCustomKeyStoreInvalidStateException "CustomKeyStoreInvalidStateException" +// The request was rejected because of the ConnectionState of the custom key +// store. To get the ConnectionState of a custom key store, use the DescribeCustomKeyStores +// operation. +// +// This exception is thrown under the following conditions: +// +// * You requested the CreateKey or GenerateRandom operation in a custom +// key store that is not connected. These operations are valid only when +// the custom key store ConnectionState is CONNECTED. +// +// * You requested the UpdateCustomKeyStore or DeleteCustomKeyStore operation +// on a custom key store that is not disconnected. This operation is valid +// only when the custom key store ConnectionState is DISCONNECTED. +// +// * You requested the ConnectCustomKeyStore operation on a custom key store +// with a ConnectionState of DISCONNECTING or FAILED. This operation is valid +// for all other ConnectionState values. +// +// * ErrCodeCustomKeyStoreNotFoundException "CustomKeyStoreNotFoundException" +// The request was rejected because AWS KMS cannot find a custom key store with +// the specified key store name or ID. +// +// * ErrCodeInternalException "KMSInternalException" +// The request was rejected because an internal exception occurred. The request +// can be retried. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DisconnectCustomKeyStore +func (c *KMS) DisconnectCustomKeyStore(input *DisconnectCustomKeyStoreInput) (*DisconnectCustomKeyStoreOutput, error) { + req, out := c.DisconnectCustomKeyStoreRequest(input) + return out, req.Send() +} + +// DisconnectCustomKeyStoreWithContext is the same as DisconnectCustomKeyStore with the addition of +// the ability to pass a context and additional request options. +// +// See DisconnectCustomKeyStore 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) DisconnectCustomKeyStoreWithContext(ctx aws.Context, input *DisconnectCustomKeyStoreInput, opts ...request.Option) (*DisconnectCustomKeyStoreOutput, error) { + req, out := c.DisconnectCustomKeyStoreRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opEnableKey = "EnableKey" // EnableKeyRequest generates a "aws/request.Request" representing the // client's request for the EnableKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1215,16 +1991,15 @@ func (c *KMS) EnableKeyRequest(input *EnableKeyInput) (req *request.Request, out output = &EnableKeyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // EnableKey API operation for AWS Key Management Service. // -// Sets the state of a customer master key (CMK) to enabled, thereby permitting -// its use for cryptographic operations. You cannot perform this operation on -// a CMK in a different AWS account. +// Sets the key state of a customer master key (CMK) to enabled. This allows +// you to use the CMK for cryptographic operations. You cannot perform this +// operation on a CMK in a different AWS account. // // The result of this operation varies with the key state of the CMK. For details, // see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) @@ -1293,7 +2068,7 @@ const opEnableKeyRotation = "EnableKeyRotation" // EnableKeyRotationRequest generates a "aws/request.Request" representing the // client's request for the EnableKeyRotation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1327,8 +2102,7 @@ func (c *KMS) EnableKeyRotationRequest(input *EnableKeyRotationInput) (req *requ output = &EnableKeyRotationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1338,6 +2112,9 @@ func (c *KMS) EnableKeyRotationRequest(input *EnableKeyRotationInput) (req *requ // for the specified customer master key (CMK). You cannot perform this operation // on a CMK in a different AWS account. // +// You cannot enable automatic rotation of CMKs with imported key material or +// CMKs in a custom key store (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html). +// // The result of this operation varies with the key state of the CMK. For details, // see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) // in the AWS Key Management Service Developer Guide. @@ -1407,7 +2184,7 @@ const opEncrypt = "Encrypt" // EncryptRequest generates a "aws/request.Request" representing the // client's request for the Encrypt operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1452,28 +2229,28 @@ func (c *KMS) EncryptRequest(input *EncryptInput) (req *request.Request, output // * You can encrypt up to 4 kilobytes (4096 bytes) of arbitrary data such // as an RSA key, a database password, or other sensitive information. // -// * You can use the Encrypt operation to move encrypted data from one AWS -// region to another. In the first region, generate a data key and use the -// plaintext key to encrypt the data. Then, in the new region, call the Encrypt -// method on same plaintext data key. Now, you can safely move the encrypted -// data and encrypted data key to the new region, and decrypt in the new -// region when necessary. +// * To move encrypted data from one AWS region to another, you can use this +// operation to encrypt in the new region the plaintext data key that was +// used to encrypt the data in the original region. This provides you with +// an encrypted copy of the data key that can be decrypted in the new region +// and used there to decrypt the encrypted data. +// +// 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. // -// You don't need use this operation to encrypt a data key within a region. -// The GenerateDataKey and GenerateDataKeyWithoutPlaintext operations return -// an encrypted data key. +// Unless you are moving encrypted data from one region to another, you don't +// use this operation to encrypt a generated data key within a region. To get +// data keys that are already encrypted, call the GenerateDataKey or GenerateDataKeyWithoutPlaintext +// operation. Data keys don't need to be encrypted again by calling Encrypt. // -// Also, you don't need to use this operation to encrypt data in your application. -// You can use the plaintext and encrypted data keys that the GenerateDataKey -// operation returns. +// To encrypt data locally in your application, use the GenerateDataKey operation +// to return a plaintext data encryption key and a copy of the key encrypted +// under the CMK of your choosing. // // The result of this operation varies with the key state of the CMK. For details, // see How Key State Affects Use of a Customer Master Key (http://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. -// // 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. @@ -1542,7 +2319,7 @@ const opGenerateDataKey = "GenerateDataKey" // GenerateDataKeyRequest generates a "aws/request.Request" representing the // client's request for the GenerateDataKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1700,7 +2477,7 @@ const opGenerateDataKeyWithoutPlaintext = "GenerateDataKeyWithoutPlaintext" // GenerateDataKeyWithoutPlaintextRequest generates a "aws/request.Request" representing the // client's request for the GenerateDataKeyWithoutPlaintext operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1754,10 +2531,9 @@ func (c *KMS) GenerateDataKeyWithoutPlaintextRequest(input *GenerateDataKeyWitho // (GenerateDataKeyWithoutPlaintext) to get an encrypted data key and then stores // it in the container. Later, a different component of the system, called the // data plane, puts encrypted data into the containers. To do this, it passes -// the encrypted data key to the Decrypt operation. It then uses the returned -// plaintext data key to encrypt data and finally stores the encrypted data -// in the container. In this system, the control plane never sees the plaintext -// data key. +// the encrypted data key to the Decrypt operation, then uses the returned plaintext +// data key to encrypt data, and finally stores the encrypted data in the container. +// In this system, the control plane never sees the plaintext data key. // // The result of this operation varies with the key state of the CMK. For details, // see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) @@ -1831,7 +2607,7 @@ const opGenerateRandom = "GenerateRandom" // GenerateRandomRequest generates a "aws/request.Request" representing the // client's request for the GenerateRandom operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1872,6 +2648,11 @@ func (c *KMS) GenerateRandomRequest(input *GenerateRandomInput) (req *request.Re // // Returns a random byte string that is cryptographically secure. // +// By default, the random byte string is generated in AWS KMS. To generate the +// byte string in the AWS CloudHSM cluster that is associated with a custom +// key store (http://docs.aws.amazon.com/kms/latest/developerguide/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. @@ -1892,6 +2673,29 @@ func (c *KMS) GenerateRandomRequest(input *GenerateRandomInput) (req *request.Re // The request was rejected because an internal exception occurred. The request // can be retried. // +// * ErrCodeCustomKeyStoreNotFoundException "CustomKeyStoreNotFoundException" +// The request was rejected because AWS KMS cannot find a custom key store with +// the specified key store name or ID. +// +// * ErrCodeCustomKeyStoreInvalidStateException "CustomKeyStoreInvalidStateException" +// The request was rejected because of the ConnectionState of the custom key +// store. To get the ConnectionState of a custom key store, use the DescribeCustomKeyStores +// operation. +// +// This exception is thrown under the following conditions: +// +// * You requested the CreateKey or GenerateRandom operation in a custom +// key store that is not connected. These operations are valid only when +// the custom key store ConnectionState is CONNECTED. +// +// * You requested the UpdateCustomKeyStore or DeleteCustomKeyStore operation +// on a custom key store that is not disconnected. This operation is valid +// only when the custom key store ConnectionState is DISCONNECTED. +// +// * You requested the ConnectCustomKeyStore operation on a custom key store +// with a ConnectionState of DISCONNECTING or FAILED. This operation is valid +// for all other ConnectionState values. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GenerateRandom func (c *KMS) GenerateRandom(input *GenerateRandomInput) (*GenerateRandomOutput, error) { req, out := c.GenerateRandomRequest(input) @@ -1919,7 +2723,7 @@ const opGetKeyPolicy = "GetKeyPolicy" // GetKeyPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetKeyPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2019,7 +2823,7 @@ const opGetKeyRotationStatus = "GetKeyRotationStatus" // GetKeyRotationStatusRequest generates a "aws/request.Request" representing the // client's request for the GetKeyRotationStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2139,7 +2943,7 @@ const opGetParametersForImport = "GetParametersForImport" // GetParametersForImportRequest generates a "aws/request.Request" representing the // client's request for the GetParametersForImport operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2262,7 +3066,7 @@ const opImportKeyMaterial = "ImportKeyMaterial" // ImportKeyMaterialRequest generates a "aws/request.Request" representing the // client's request for the ImportKeyMaterial operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2296,6 +3100,7 @@ func (c *KMS) ImportKeyMaterialRequest(input *ImportKeyMaterialInput) (req *requ output = &ImportKeyMaterialOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2333,10 +3138,10 @@ func (c *KMS) ImportKeyMaterialRequest(input *ImportKeyMaterialInput) (req *requ // deletes the key material and the CMK becomes unusable. To use the CMK // again, you must reimport the same key material. // -// When this operation is successful, the CMK's key state changes from PendingImport -// to Enabled, and you can use the CMK. After you successfully import key material -// into a CMK, you can reimport the same key material into that CMK, but you -// cannot import different key material. +// When this operation is successful, the key state of the CMK changes from +// PendingImport to Enabled, and you can use the CMK. After you successfully +// import key material into a CMK, you can reimport the same key material into +// that CMK, but you cannot import different key material. // // The result of this operation varies with the key state of the CMK. For details, // see How Key State Affects Use of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) @@ -2423,7 +3228,7 @@ const opListAliases = "ListAliases" // ListAliasesRequest generates a "aws/request.Request" representing the // client's request for the ListAliases operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2468,22 +3273,17 @@ 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 +// Gets a list of all aliases in the caller's AWS account and region. You cannot // list aliases in other accounts. 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. // -// The ListAliases response can include aliases that you created and associated -// with your customer managed CMKs, and aliases that AWS created and associated -// with AWS managed CMKs in your account. You can recognize AWS aliases because -// their names have the format aws/, such as aws/dynamodb. -// -// The response might also include aliases that have no TargetKeyId field. These -// are predefined aliases that AWS has created but has not yet associated with -// a CMK. Aliases that AWS creates in your account, including predefined aliases, -// do not count against your AWS KMS aliases limit (http://docs.aws.amazon.com/kms/latest/developerguide/limits.html#aliases-limit). +// The ListAliases response might include several aliases have no TargetKeyId +// field. These are predefined aliases that AWS has created but has not yet +// associated with a CMK. Aliases that AWS creates in your account, including +// predefined aliases, do not count against your AWS KMS aliases limit (http://docs.aws.amazon.com/kms/latest/developerguide/limits.html#aliases-limit). // // 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 @@ -2505,6 +3305,13 @@ func (c *KMS) ListAliasesRequest(input *ListAliasesInput) (req *request.Request, // The request was rejected because an internal exception occurred. The request // can be retried. // +// * ErrCodeInvalidArnException "InvalidArnException" +// The request was rejected because a specified ARN was not valid. +// +// * ErrCodeNotFoundException "NotFoundException" +// The request was rejected because the specified entity or resource could not +// be found. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ListAliases func (c *KMS) ListAliases(input *ListAliasesInput) (*ListAliasesOutput, error) { req, out := c.ListAliasesRequest(input) @@ -2582,7 +3389,7 @@ const opListGrants = "ListGrants" // ListGrantsRequest generates a "aws/request.Request" representing the // client's request for the ListGrants operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2744,7 +3551,7 @@ const opListKeyPolicies = "ListKeyPolicies" // ListKeyPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListKeyPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2902,7 +3709,7 @@ const opListKeys = "ListKeys" // ListKeysRequest generates a "aws/request.Request" representing the // client's request for the ListKeys operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3047,7 +3854,7 @@ const opListResourceTags = "ListResourceTags" // ListResourceTagsRequest generates a "aws/request.Request" representing the // client's request for the ListResourceTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3140,7 +3947,7 @@ const opListRetirableGrants = "ListRetirableGrants" // ListRetirableGrantsRequest generates a "aws/request.Request" representing the // client's request for the ListRetirableGrants operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3239,7 +4046,7 @@ const opPutKeyPolicy = "PutKeyPolicy" // PutKeyPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutKeyPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3273,8 +4080,7 @@ func (c *KMS) PutKeyPolicyRequest(input *PutKeyPolicyInput) (req *request.Reques output = &PutKeyPolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3357,7 +4163,7 @@ const opReEncrypt = "ReEncrypt" // ReEncryptRequest generates a "aws/request.Request" representing the // client's request for the ReEncrypt operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3407,7 +4213,7 @@ func (c *KMS) ReEncryptRequest(input *ReEncryptInput) (req *request.Request, out // on the source CMK and once as ReEncryptTo on the destination CMK. We recommend // that you include the "kms:ReEncrypt*" permission in your key policies (http://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html) // to permit reencryption from or to the CMK. This permission is automatically -// included in the key policy when you create a CMK through the console. But +// included in the key policy when you create a CMK through the console, but // you must include it manually when you create a CMK programmatically or when // you set a key policy with the PutKeyPolicy operation. // @@ -3488,7 +4294,7 @@ const opRetireGrant = "RetireGrant" // RetireGrantRequest generates a "aws/request.Request" representing the // client's request for the RetireGrant operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3522,8 +4328,7 @@ func (c *KMS) RetireGrantRequest(input *RetireGrantInput) (req *request.Request, output = &RetireGrantOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3610,7 +4415,7 @@ const opRevokeGrant = "RevokeGrant" // RevokeGrantRequest generates a "aws/request.Request" representing the // client's request for the RevokeGrant operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3644,8 +4449,7 @@ func (c *KMS) RevokeGrantRequest(input *RevokeGrantInput) (req *request.Request, output = &RevokeGrantOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3718,7 +4522,7 @@ const opScheduleKeyDeletion = "ScheduleKeyDeletion" // ScheduleKeyDeletionRequest generates a "aws/request.Request" representing the // client's request for the ScheduleKeyDeletion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3760,17 +4564,24 @@ func (c *KMS) ScheduleKeyDeletionRequest(input *ScheduleKeyDeletionInput) (req * // 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 state of the CMK changes to PendingDeletion. +// operation is successful, the key state of the CMK changes to PendingDeletion. // 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. // -// You cannot perform this operation on a CMK in a different AWS account. -// // Deleting a CMK is a destructive and potentially dangerous operation. When -// a CMK is deleted, all data that was encrypted under the CMK is rendered unrecoverable. -// To restrict the use of a CMK without deleting it, use DisableKey. +// 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. +// +// If you schedule deletion of a CMK from a custom key store (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html), +// when the waiting period expires, ScheduleKeyDeletion deletes the CMK from +// AWS KMS. Then AWS KMS makes a best effort to delete the key material from +// the associated AWS CloudHSM cluster. However, you might need to manually +// delete the orphaned key material (http://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. // // For more information about scheduling a CMK for deletion, see Deleting Customer // Master Keys (http://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html) @@ -3838,7 +4649,7 @@ const opTagResource = "TagResource" // TagResourceRequest generates a "aws/request.Request" representing the // client's request for the TagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3872,8 +4683,7 @@ func (c *KMS) TagResourceRequest(input *TagResourceInput) (req *request.Request, output = &TagResourceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3958,7 +4768,7 @@ const opUntagResource = "UntagResource" // UntagResourceRequest generates a "aws/request.Request" representing the // client's request for the UntagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3992,8 +4802,7 @@ func (c *KMS) UntagResourceRequest(input *UntagResourceInput) (req *request.Requ output = &UntagResourceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4066,7 +4875,7 @@ const opUpdateAlias = "UpdateAlias" // UpdateAliasRequest generates a "aws/request.Request" representing the // client's request for the UpdateAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4100,8 +4909,7 @@ func (c *KMS) UpdateAliasRequest(input *UpdateAliasInput) (req *request.Request, output = &UpdateAliasOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4182,12 +4990,210 @@ func (c *KMS) UpdateAliasWithContext(ctx aws.Context, input *UpdateAliasInput, o return out, req.Send() } +const opUpdateCustomKeyStore = "UpdateCustomKeyStore" + +// UpdateCustomKeyStoreRequest generates a "aws/request.Request" representing the +// client's request for the UpdateCustomKeyStore 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 UpdateCustomKeyStore for more information on using the UpdateCustomKeyStore +// 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 UpdateCustomKeyStoreRequest method. +// req, resp := client.UpdateCustomKeyStoreRequest(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/UpdateCustomKeyStore +func (c *KMS) UpdateCustomKeyStoreRequest(input *UpdateCustomKeyStoreInput) (req *request.Request, output *UpdateCustomKeyStoreOutput) { + op := &request.Operation{ + Name: opUpdateCustomKeyStore, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateCustomKeyStoreInput{} + } + + output = &UpdateCustomKeyStoreOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateCustomKeyStore API operation for AWS Key Management Service. +// +// Changes the properties of a custom key store. Use the CustomKeyStoreId parameter +// to identify the custom key store you want to edit. Use the remaining parameters +// to change the properties of the custom key store. +// +// You can only update a custom key store that is disconnected. To disconnect +// the custom key store, use DisconnectCustomKeyStore. To reconnect the custom +// key store after the update completes, use ConnectCustomKeyStore. To find +// the connection state of a custom key store, use the DescribeCustomKeyStores +// operation. +// +// Use the NewCustomKeyStoreName parameter to change the friendly name of the +// custom key store to the value that you specify. +// +// Use the KeyStorePassword parameter tell AWS KMS the current password of the +// kmsuser (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser) +// crypto user (CU) in the associated AWS CloudHSM cluster. You can use this +// parameter to fix connection failures that occur when AWS KMS cannot log into +// the associated cluster because the kmsuser password has changed. This value +// does not change the password in the AWS CloudHSM cluster. +// +// Use the CloudHsmClusterId parameter to associate the custom key store with +// a related AWS CloudHSM cluster, that is, a cluster that shares a backup history +// with the original cluster. You can use this parameter to repair a custom +// key store if its AWS CloudHSM cluster becomes corrupted or is deleted, or +// when you need to create or restore a cluster from a backup. +// +// The cluster ID must identify a AWS CloudHSM cluster with the following requirements. +// +// * The cluster must be active and be in the same AWS account and Region +// as the custom key store. +// +// * The cluster must have the same cluster certificate as the original cluster. +// You cannot use this parameter to associate the custom key store with an +// unrelated cluster. To view the cluster certificate, use the AWS CloudHSM +// DescribeClusters (http://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html) +// operation. Clusters that share a backup history have the same cluster +// certificate. +// +// * The cluster must be configured with subnets in at least two different +// Availability Zones in the Region. Because AWS CloudHSM is not supported +// in all Availability Zones, we recommend that the cluster have subnets +// in all Availability Zones in the Region. +// +// * The cluster must contain at least two active HSMs, each in a different +// Availability Zone. +// +// If the operation succeeds, it returns a JSON object with no properties. +// +// This operation is part of the Custom Key Store feature (http://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. +// +// 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 UpdateCustomKeyStore for usage and error information. +// +// Returned Error Codes: +// * ErrCodeCustomKeyStoreNotFoundException "CustomKeyStoreNotFoundException" +// The request was rejected because AWS KMS cannot find a custom key store with +// the specified key store name or ID. +// +// * ErrCodeCloudHsmClusterNotFoundException "CloudHsmClusterNotFoundException" +// The request was rejected because AWS KMS cannot find the AWS CloudHSM cluster +// with the specified cluster ID. Retry the request with a different cluster +// ID. +// +// * ErrCodeCloudHsmClusterNotRelatedException "CloudHsmClusterNotRelatedException" +// The request was rejected because the specified AWS CloudHSM cluster has a +// different cluster certificate than the original cluster. You cannot use the +// operation to specify an unrelated cluster. +// +// Specify a cluster that shares a backup history with the original cluster. +// This includes clusters that were created from a backup of the current cluster, +// and clusters that were created from the same backup that produced the current +// cluster. +// +// Clusters that share a backup history have the same cluster certificate. To +// view the cluster certificate of a cluster, use the DescribeClusters (http://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html) +// operation. +// +// * ErrCodeCustomKeyStoreInvalidStateException "CustomKeyStoreInvalidStateException" +// The request was rejected because of the ConnectionState of the custom key +// store. To get the ConnectionState of a custom key store, use the DescribeCustomKeyStores +// operation. +// +// This exception is thrown under the following conditions: +// +// * You requested the CreateKey or GenerateRandom operation in a custom +// key store that is not connected. These operations are valid only when +// the custom key store ConnectionState is CONNECTED. +// +// * You requested the UpdateCustomKeyStore or DeleteCustomKeyStore operation +// on a custom key store that is not disconnected. This operation is valid +// only when the custom key store ConnectionState is DISCONNECTED. +// +// * You requested the ConnectCustomKeyStore operation on a custom key store +// with a ConnectionState of DISCONNECTING or FAILED. This operation is valid +// for all other ConnectionState values. +// +// * ErrCodeInternalException "KMSInternalException" +// The request was rejected because an internal exception occurred. The request +// can be retried. +// +// * ErrCodeCloudHsmClusterNotActiveException "CloudHsmClusterNotActiveException" +// The request was rejected because the AWS CloudHSM cluster that is associated +// with the custom key store is not active. Initialize and activate the cluster +// and try the command again. For detailed instructions, see Getting Started +// (http://docs.aws.amazon.com/cloudhsm/latest/userguide/getting-started.html) +// in the AWS CloudHSM User Guide. +// +// * ErrCodeCloudHsmClusterInvalidConfigurationException "CloudHsmClusterInvalidConfigurationException" +// The request was rejected because the associated AWS CloudHSM cluster did +// not meet the configuration requirements for a custom key store. The cluster +// must be configured with private subnets in at least two different Availability +// Zones in the Region. Also, it must contain at least as many HSMs as the operation +// requires. +// +// For the CreateCustomKeyStore, UpdateCustomKeyStore, and CreateKey operations, +// the AWS CloudHSM cluster must have at least two active HSMs, each in a different +// Availability Zone. For the ConnectCustomKeyStore operation, the AWS CloudHSM +// must contain at least one active HSM. +// +// For information about creating a private subnet for a AWS CloudHSM cluster, +// see Create a Private Subnet (http://docs.aws.amazon.com/cloudhsm/latest/userguide/create-subnets.html) +// in the AWS CloudHSM User Guide. To add HSMs, use the AWS CloudHSM CreateHsm +// (http://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html) +// operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/UpdateCustomKeyStore +func (c *KMS) UpdateCustomKeyStore(input *UpdateCustomKeyStoreInput) (*UpdateCustomKeyStoreOutput, error) { + req, out := c.UpdateCustomKeyStoreRequest(input) + return out, req.Send() +} + +// UpdateCustomKeyStoreWithContext is the same as UpdateCustomKeyStore with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateCustomKeyStore 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) UpdateCustomKeyStoreWithContext(ctx aws.Context, input *UpdateCustomKeyStoreInput, opts ...request.Option) (*UpdateCustomKeyStoreOutput, error) { + req, out := c.UpdateCustomKeyStoreRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateKeyDescription = "UpdateKeyDescription" // UpdateKeyDescriptionRequest generates a "aws/request.Request" representing the // client's request for the UpdateKeyDescription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4221,14 +5227,13 @@ func (c *KMS) UpdateKeyDescriptionRequest(input *UpdateKeyDescriptionInput) (req output = &UpdateKeyDescriptionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // UpdateKeyDescription API operation for AWS Key Management Service. // -// Updates the description of a customer master key (CMK). To see the description +// Updates the description of a customer master key (CMK). To see the decription // of a CMK, use DescribeKey. // // You cannot perform this operation on a CMK in a different AWS account. @@ -4407,12 +5412,68 @@ func (s *CancelKeyDeletionOutput) SetKeyId(v string) *CancelKeyDeletionOutput { return s } +type ConnectCustomKeyStoreInput struct { + _ struct{} `type:"structure"` + + // Enter the key store ID of the custom key store that you want to connect. + // To find the ID of a custom key store, use the DescribeCustomKeyStores operation. + // + // CustomKeyStoreId is a required field + CustomKeyStoreId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ConnectCustomKeyStoreInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConnectCustomKeyStoreInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ConnectCustomKeyStoreInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ConnectCustomKeyStoreInput"} + if s.CustomKeyStoreId == nil { + invalidParams.Add(request.NewErrParamRequired("CustomKeyStoreId")) + } + if s.CustomKeyStoreId != nil && len(*s.CustomKeyStoreId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CustomKeyStoreId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCustomKeyStoreId sets the CustomKeyStoreId field's value. +func (s *ConnectCustomKeyStoreInput) SetCustomKeyStoreId(v string) *ConnectCustomKeyStoreInput { + s.CustomKeyStoreId = &v + return s +} + +type ConnectCustomKeyStoreOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s ConnectCustomKeyStoreOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConnectCustomKeyStoreOutput) GoString() string { + return s.String() +} + type CreateAliasInput struct { _ struct{} `type:"structure"` - // Specifies the alias name. This value must begin with alias/ followed by the - // alias name, such as alias/ExampleAlias. The alias name cannot begin with - // aws/. The alias/aws/ prefix is reserved for AWS managed CMKs. + // String that contains the display name. The name must start with the word + // "alias" followed by a forward slash (alias/). Aliases that begin with "alias/AWS" + // are reserved. // // AliasName is a required field AliasName *string `min:"1" type:"string" required:"true"` @@ -4492,6 +5553,132 @@ func (s CreateAliasOutput) GoString() string { return s.String() } +type CreateCustomKeyStoreInput struct { + _ struct{} `type:"structure"` + + // Identifies the AWS CloudHSM cluster for the custom key store. Enter the cluster + // ID of any active AWS CloudHSM cluster that is not already associated with + // a custom key store. To find the cluster ID, use the DescribeClusters (http://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html) + // operation. + // + // CloudHsmClusterId is a required field + CloudHsmClusterId *string `min:"19" type:"string" required:"true"` + + // Specifies a friendly name for the custom key store. The name must be unique + // in your AWS account. + // + // CustomKeyStoreName is a required field + CustomKeyStoreName *string `min:"1" type:"string" required:"true"` + + // Enter the password of the kmsuser (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser) + // crypto user (CU) account in the specified AWS CloudHSM cluster. AWS KMS logs + // into the cluster as this user to manage key material on your behalf. + // + // This parameter tells AWS KMS the kmsuser account password; it does not change + // the password in the AWS CloudHSM cluster. + // + // KeyStorePassword is a required field + KeyStorePassword *string `min:"1" type:"string" required:"true" sensitive:"true"` + + // Enter the content of the trust anchor certificate for the cluster. This is + // the content of the customerCA.crt file that you created when you initialized + // the cluster (http://docs.aws.amazon.com/cloudhsm/latest/userguide/initialize-cluster.html). + // + // TrustAnchorCertificate is a required field + TrustAnchorCertificate *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateCustomKeyStoreInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCustomKeyStoreInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateCustomKeyStoreInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCustomKeyStoreInput"} + if s.CloudHsmClusterId == nil { + invalidParams.Add(request.NewErrParamRequired("CloudHsmClusterId")) + } + if s.CloudHsmClusterId != nil && len(*s.CloudHsmClusterId) < 19 { + invalidParams.Add(request.NewErrParamMinLen("CloudHsmClusterId", 19)) + } + if s.CustomKeyStoreName == nil { + invalidParams.Add(request.NewErrParamRequired("CustomKeyStoreName")) + } + if s.CustomKeyStoreName != nil && len(*s.CustomKeyStoreName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CustomKeyStoreName", 1)) + } + if s.KeyStorePassword == nil { + invalidParams.Add(request.NewErrParamRequired("KeyStorePassword")) + } + if s.KeyStorePassword != nil && len(*s.KeyStorePassword) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KeyStorePassword", 1)) + } + if s.TrustAnchorCertificate == nil { + invalidParams.Add(request.NewErrParamRequired("TrustAnchorCertificate")) + } + if s.TrustAnchorCertificate != nil && len(*s.TrustAnchorCertificate) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TrustAnchorCertificate", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCloudHsmClusterId sets the CloudHsmClusterId field's value. +func (s *CreateCustomKeyStoreInput) SetCloudHsmClusterId(v string) *CreateCustomKeyStoreInput { + s.CloudHsmClusterId = &v + return s +} + +// SetCustomKeyStoreName sets the CustomKeyStoreName field's value. +func (s *CreateCustomKeyStoreInput) SetCustomKeyStoreName(v string) *CreateCustomKeyStoreInput { + s.CustomKeyStoreName = &v + return s +} + +// SetKeyStorePassword sets the KeyStorePassword field's value. +func (s *CreateCustomKeyStoreInput) SetKeyStorePassword(v string) *CreateCustomKeyStoreInput { + s.KeyStorePassword = &v + return s +} + +// SetTrustAnchorCertificate sets the TrustAnchorCertificate field's value. +func (s *CreateCustomKeyStoreInput) SetTrustAnchorCertificate(v string) *CreateCustomKeyStoreInput { + s.TrustAnchorCertificate = &v + return s +} + +type CreateCustomKeyStoreOutput struct { + _ struct{} `type:"structure"` + + // A unique identifier for the new custom key store. + CustomKeyStoreId *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s CreateCustomKeyStoreOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCustomKeyStoreOutput) GoString() string { + return s.String() +} + +// SetCustomKeyStoreId sets the CustomKeyStoreId field's value. +func (s *CreateCustomKeyStoreOutput) SetCustomKeyStoreId(v string) *CreateCustomKeyStoreOutput { + s.CustomKeyStoreId = &v + return s +} + type CreateGrantInput struct { _ struct{} `type:"structure"` @@ -4537,8 +5724,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 identifying the grant. Use this value to prevent 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. @@ -4706,6 +5893,23 @@ type CreateKeyInput struct { // The default value is false. BypassPolicyLockoutSafetyCheck *bool `type:"boolean"` + // Creates the CMK in the specified custom key store (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html) + // and the key material in its associated AWS CloudHSM cluster. To create a + // CMK in a custom key store, you must also specify the Origin parameter with + // a value of AWS_CLOUDHSM. The AWS CloudHSM cluster that is associated with + // the custom key store must have at least two active HSMs, each in a different + // Availability Zone in the Region. + // + // To find the ID of a custom key store, use the DescribeCustomKeyStores operation. + // + // The response includes the custom key store ID and the ID of the AWS CloudHSM + // cluster. + // + // This operation is part of the Custom Key Store feature (http://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. + CustomKeyStoreId *string `min:"1" type:"string"` + // A description of the CMK. // // Use a description that helps you decide whether the CMK is appropriate for @@ -4717,16 +5921,22 @@ type CreateKeyInput struct { // You can use CMKs only for symmetric encryption and decryption. KeyUsage *string `type:"string" enum:"KeyUsageType"` - // The source of the CMK's key material. + // The source of the CMK's key material. You cannot change the origin after + // you create the CMK. // - // The default is AWS_KMS, which means AWS KMS creates the key material. When - // this parameter is set to EXTERNAL, the request 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 (http://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html) + // The default is AWS_KMS, which means AWS KMS creates the key material in its + // own key store. + // + // 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 (http://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html) // in the AWS Key Management Service Developer Guide. // - // The CMK's Origin is immutable and is set when the CMK is created. + // When the parameter value is AWS_CLOUDHSM, AWS KMS creates the CMK in a AWS + // KMS custom key store (http://docs.aws.amazon.com/kms/latest/developerguide/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. Origin *string `type:"string" enum:"OriginType"` // The key policy to attach to the CMK. @@ -4744,9 +5954,9 @@ type CreateKeyInput struct { // 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. The reason for this is that the new principal might not - // be immediately visible to AWS KMS. For more information, see Changes that - // I make are not always immediately visible (http://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency) + // 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 (http://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency) // in the AWS Identity and Access Management User Guide. // // If you do not provide a key policy, AWS KMS attaches a default key policy @@ -4777,6 +5987,9 @@ func (s CreateKeyInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateKeyInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateKeyInput"} + if s.CustomKeyStoreId != nil && len(*s.CustomKeyStoreId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CustomKeyStoreId", 1)) + } if s.Policy != nil && len(*s.Policy) < 1 { invalidParams.Add(request.NewErrParamMinLen("Policy", 1)) } @@ -4803,6 +6016,12 @@ func (s *CreateKeyInput) SetBypassPolicyLockoutSafetyCheck(v bool) *CreateKeyInp return s } +// SetCustomKeyStoreId sets the CustomKeyStoreId field's value. +func (s *CreateKeyInput) SetCustomKeyStoreId(v string) *CreateKeyInput { + s.CustomKeyStoreId = &v + return s +} + // SetDescription sets the Description field's value. func (s *CreateKeyInput) SetDescription(v string) *CreateKeyInput { s.Description = &v @@ -4850,9 +6069,128 @@ func (s CreateKeyOutput) GoString() string { return s.String() } -// SetKeyMetadata sets the KeyMetadata field's value. -func (s *CreateKeyOutput) SetKeyMetadata(v *KeyMetadata) *CreateKeyOutput { - s.KeyMetadata = v +// SetKeyMetadata sets the KeyMetadata field's value. +func (s *CreateKeyOutput) SetKeyMetadata(v *KeyMetadata) *CreateKeyOutput { + s.KeyMetadata = v + return s +} + +// Contains information about each custom key store in the custom key store +// list. +type CustomKeyStoresListEntry struct { + _ struct{} `type:"structure"` + + // A unique identifier for the AWS CloudHSM cluster that is associated with + // the custom key store. + CloudHsmClusterId *string `min:"19" type:"string"` + + // Describes the connection error. Valid values are: + // + // * CLUSTER_NOT_FOUND - AWS KMS cannot find the AWS CloudHSM cluster with + // the specified cluster ID. + // + // * INSUFFICIENT_CLOUDHSM_HSMS - The associated AWS CloudHSM cluster does + // not contain any active HSMs. To connect a custom key store to its AWS + // CloudHSM cluster, the cluster must contain at least one active HSM. + // + // * INVALID_CREDENTIALS - AWS KMS does not have the correct password for + // the kmsuser crypto user in the AWS CloudHSM cluster. + // + // * NETWORK_ERRORS - Network errors are preventing AWS KMS from connecting + // to the custom key store. + // + // * USER_LOCKED_OUT - The kmsuser CU account is locked out of the associated + // AWS CloudHSM cluster due to too many failed password attempts. Before + // you can connect your custom key store to its AWS CloudHSM cluster, you + // must change the kmsuser account password and update the password value + // for the custom key store. + // + // For help with connection failures, see Troubleshooting Custom Key Stores + // (http://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html) + // in the AWS Key Management Service Developer Guide. + ConnectionErrorCode *string `type:"string" enum:"ConnectionErrorCodeType"` + + // Indicates whether the custom key store is connected to its AWS CloudHSM cluster. + // + // You can create and use CMKs in your custom key stores only when its connection + // state is CONNECTED. + // + // The value is DISCONNECTED if the key store has never been connected or you + // use the DisconnectCustomKeyStore operation to disconnect it. If the value + // is CONNECTED but you are having trouble using the custom key store, make + // sure that its associated AWS CloudHSM cluster is active and contains at least + // one active HSM. + // + // A value of FAILED indicates that an attempt to connect was unsuccessful. + // For help resolving a connection failure, see Troubleshooting a Custom Key + // Store (http://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html) + // in the AWS Key Management Service Developer Guide. + ConnectionState *string `type:"string" enum:"ConnectionStateType"` + + // The date and time when the custom key store was created. + CreationDate *time.Time `type:"timestamp"` + + // A unique identifier for the custom key store. + CustomKeyStoreId *string `min:"1" type:"string"` + + // The user-specified friendly name for the custom key store. + CustomKeyStoreName *string `min:"1" type:"string"` + + // The trust anchor certificate of the associated AWS CloudHSM cluster. When + // you initialize the cluster (http://docs.aws.amazon.com/cloudhsm/latest/userguide/initialize-cluster.html#sign-csr), + // you create this certificate and save it in the customerCA.crt file. + TrustAnchorCertificate *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s CustomKeyStoresListEntry) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CustomKeyStoresListEntry) GoString() string { + return s.String() +} + +// SetCloudHsmClusterId sets the CloudHsmClusterId field's value. +func (s *CustomKeyStoresListEntry) SetCloudHsmClusterId(v string) *CustomKeyStoresListEntry { + s.CloudHsmClusterId = &v + return s +} + +// SetConnectionErrorCode sets the ConnectionErrorCode field's value. +func (s *CustomKeyStoresListEntry) SetConnectionErrorCode(v string) *CustomKeyStoresListEntry { + s.ConnectionErrorCode = &v + return s +} + +// SetConnectionState sets the ConnectionState field's value. +func (s *CustomKeyStoresListEntry) SetConnectionState(v string) *CustomKeyStoresListEntry { + s.ConnectionState = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *CustomKeyStoresListEntry) SetCreationDate(v time.Time) *CustomKeyStoresListEntry { + s.CreationDate = &v + return s +} + +// SetCustomKeyStoreId sets the CustomKeyStoreId field's value. +func (s *CustomKeyStoresListEntry) SetCustomKeyStoreId(v string) *CustomKeyStoresListEntry { + s.CustomKeyStoreId = &v + return s +} + +// SetCustomKeyStoreName sets the CustomKeyStoreName field's value. +func (s *CustomKeyStoresListEntry) SetCustomKeyStoreName(v string) *CustomKeyStoresListEntry { + s.CustomKeyStoreName = &v + return s +} + +// SetTrustAnchorCertificate sets the TrustAnchorCertificate field's value. +func (s *CustomKeyStoresListEntry) SetTrustAnchorCertificate(v string) *CustomKeyStoresListEntry { + s.TrustAnchorCertificate = &v return s } @@ -4930,10 +6268,10 @@ type DecryptOutput struct { KeyId *string `min:"1" type:"string"` // Decrypted plaintext data. When you use the HTTP API or the AWS CLI, the value - // is Base64-encoded. Otherwise, it is not encoded. + // is Base64-encdoded. Otherwise, it is not encoded. // // Plaintext is automatically base64 encoded/decoded by the SDK. - Plaintext []byte `min:"1" type:"blob"` + Plaintext []byte `min:"1" type:"blob" sensitive:"true"` } // String returns the string representation @@ -5014,6 +6352,62 @@ func (s DeleteAliasOutput) GoString() string { return s.String() } +type DeleteCustomKeyStoreInput struct { + _ struct{} `type:"structure"` + + // Enter the ID of the custom key store you want to delete. To find the ID of + // a custom key store, use the DescribeCustomKeyStores operation. + // + // CustomKeyStoreId is a required field + CustomKeyStoreId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteCustomKeyStoreInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteCustomKeyStoreInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteCustomKeyStoreInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteCustomKeyStoreInput"} + if s.CustomKeyStoreId == nil { + invalidParams.Add(request.NewErrParamRequired("CustomKeyStoreId")) + } + if s.CustomKeyStoreId != nil && len(*s.CustomKeyStoreId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CustomKeyStoreId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCustomKeyStoreId sets the CustomKeyStoreId field's value. +func (s *DeleteCustomKeyStoreInput) SetCustomKeyStoreId(v string) *DeleteCustomKeyStoreInput { + s.CustomKeyStoreId = &v + return s +} + +type DeleteCustomKeyStoreOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteCustomKeyStoreOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteCustomKeyStoreOutput) GoString() string { + return s.String() +} + type DeleteImportedKeyMaterialInput struct { _ struct{} `type:"structure"` @@ -5080,6 +6474,139 @@ func (s DeleteImportedKeyMaterialOutput) GoString() string { return s.String() } +type DescribeCustomKeyStoresInput struct { + _ struct{} `type:"structure"` + + // Gets only information about the specified custom key store. Enter the key + // 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, + // you can use either the CustomKeyStoreId or CustomKeyStoreName parameter, + // but not both. + CustomKeyStoreId *string `min:"1" type:"string"` + + // Gets only information about the specified custom key store. Enter the friendly + // 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, + // you can use either the CustomKeyStoreId or CustomKeyStoreName parameter, + // but not both. + CustomKeyStoreName *string `min:"1" type:"string"` + + // Use this parameter to specify the maximum number of items to return. When + // this value is present, AWS KMS does not return more than the specified number + // of items, but it might return fewer. + Limit *int64 `min:"1" type:"integer"` + + // Use this parameter in a subsequent request after you receive a response with + // truncated results. Set it to the value of NextMarker from the truncated response + // you just received. + Marker *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeCustomKeyStoresInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCustomKeyStoresInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeCustomKeyStoresInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeCustomKeyStoresInput"} + if s.CustomKeyStoreId != nil && len(*s.CustomKeyStoreId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CustomKeyStoreId", 1)) + } + if s.CustomKeyStoreName != nil && len(*s.CustomKeyStoreName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CustomKeyStoreName", 1)) + } + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.Marker != nil && len(*s.Marker) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCustomKeyStoreId sets the CustomKeyStoreId field's value. +func (s *DescribeCustomKeyStoresInput) SetCustomKeyStoreId(v string) *DescribeCustomKeyStoresInput { + s.CustomKeyStoreId = &v + return s +} + +// SetCustomKeyStoreName sets the CustomKeyStoreName field's value. +func (s *DescribeCustomKeyStoresInput) SetCustomKeyStoreName(v string) *DescribeCustomKeyStoresInput { + s.CustomKeyStoreName = &v + return s +} + +// SetLimit sets the Limit field's value. +func (s *DescribeCustomKeyStoresInput) SetLimit(v int64) *DescribeCustomKeyStoresInput { + s.Limit = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeCustomKeyStoresInput) SetMarker(v string) *DescribeCustomKeyStoresInput { + s.Marker = &v + return s +} + +type DescribeCustomKeyStoresOutput struct { + _ struct{} `type:"structure"` + + // Contains metadata about each custom key store. + CustomKeyStores []*CustomKeyStoresListEntry `type:"list"` + + // When Truncated is true, this element is present and contains the value to + // use for the Marker parameter in a subsequent request. + NextMarker *string `min:"1" type:"string"` + + // A flag that indicates whether there are more items in the list. When this + // value is true, the list in this response is truncated. To get more items, + // pass the value of the NextMarker element in this response to the Marker parameter + // in a subsequent request. + Truncated *bool `type:"boolean"` +} + +// String returns the string representation +func (s DescribeCustomKeyStoresOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeCustomKeyStoresOutput) GoString() string { + return s.String() +} + +// SetCustomKeyStores sets the CustomKeyStores field's value. +func (s *DescribeCustomKeyStoresOutput) SetCustomKeyStores(v []*CustomKeyStoresListEntry) *DescribeCustomKeyStoresOutput { + s.CustomKeyStores = v + return s +} + +// SetNextMarker sets the NextMarker field's value. +func (s *DescribeCustomKeyStoresOutput) SetNextMarker(v string) *DescribeCustomKeyStoresOutput { + s.NextMarker = &v + return s +} + +// SetTruncated sets the Truncated field's value. +func (s *DescribeCustomKeyStoresOutput) SetTruncated(v bool) *DescribeCustomKeyStoresOutput { + s.Truncated = &v + return s +} + type DescribeKeyInput struct { _ struct{} `type:"structure"` @@ -5307,6 +6834,62 @@ func (s DisableKeyRotationOutput) GoString() string { return s.String() } +type DisconnectCustomKeyStoreInput struct { + _ struct{} `type:"structure"` + + // Enter the ID of the custom key store you want to disconnect. To find the + // ID of a custom key store, use the DescribeCustomKeyStores operation. + // + // CustomKeyStoreId is a required field + CustomKeyStoreId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DisconnectCustomKeyStoreInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisconnectCustomKeyStoreInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisconnectCustomKeyStoreInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisconnectCustomKeyStoreInput"} + if s.CustomKeyStoreId == nil { + invalidParams.Add(request.NewErrParamRequired("CustomKeyStoreId")) + } + if s.CustomKeyStoreId != nil && len(*s.CustomKeyStoreId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CustomKeyStoreId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCustomKeyStoreId sets the CustomKeyStoreId field's value. +func (s *DisconnectCustomKeyStoreInput) SetCustomKeyStoreId(v string) *DisconnectCustomKeyStoreInput { + s.CustomKeyStoreId = &v + return s +} + +type DisconnectCustomKeyStoreOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisconnectCustomKeyStoreOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisconnectCustomKeyStoreOutput) GoString() string { + return s.String() +} + type EnableKeyInput struct { _ struct{} `type:"structure"` @@ -5479,7 +7062,7 @@ type EncryptInput struct { // Plaintext is automatically base64 encoded/decoded by the SDK. // // Plaintext is a required field - Plaintext []byte `min:"1" type:"blob" required:"true"` + Plaintext []byte `min:"1" type:"blob" required:"true" sensitive:"true"` } // String returns the string representation @@ -5542,7 +7125,7 @@ type EncryptOutput struct { _ struct{} `type:"structure"` // The encrypted plaintext. When you use the HTTP API or the AWS CLI, the value - // is Base64-encoded. Otherwise, it is not encoded. + // is Base64-encdoded. Otherwise, it is not encoded. // // CiphertextBlob is automatically base64 encoded/decoded by the SDK. CiphertextBlob []byte `min:"1" type:"blob"` @@ -5685,7 +7268,7 @@ type GenerateDataKeyOutput struct { _ struct{} `type:"structure"` // The encrypted data encryption key. When you use the HTTP API or the AWS CLI, - // the value is Base64-encoded. Otherwise, it is not encoded. + // the value is Base64-encdoded. Otherwise, it is not encoded. // // CiphertextBlob is automatically base64 encoded/decoded by the SDK. CiphertextBlob []byte `min:"1" type:"blob"` @@ -5695,11 +7278,11 @@ type GenerateDataKeyOutput struct { KeyId *string `min:"1" type:"string"` // The data encryption key. When you use the HTTP API or the AWS CLI, the value - // is Base64-encoded. Otherwise, it is not encoded. Use this data key for local + // is Base64-encdoded. Otherwise, it is not encoded. Use this data key for local // encryption and decryption, then remove it from memory as soon as possible. // // Plaintext is automatically base64 encoded/decoded by the SDK. - Plaintext []byte `min:"1" type:"blob"` + Plaintext []byte `min:"1" type:"blob" sensitive:"true"` } // String returns the string representation @@ -5842,7 +7425,7 @@ type GenerateDataKeyWithoutPlaintextOutput struct { _ struct{} `type:"structure"` // The encrypted data encryption key. When you use the HTTP API or the AWS CLI, - // the value is Base64-encoded. Otherwise, it is not encoded. + // the value is Base64-encdoded. Otherwise, it is not encoded. // // CiphertextBlob is automatically base64 encoded/decoded by the SDK. CiphertextBlob []byte `min:"1" type:"blob"` @@ -5877,6 +7460,11 @@ func (s *GenerateDataKeyWithoutPlaintextOutput) SetKeyId(v string) *GenerateData type GenerateRandomInput struct { _ struct{} `type:"structure"` + // Generates the random byte string in the AWS CloudHSM cluster that is associated + // with the specified custom key store (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html). + // To find the ID of a custom key store, use the DescribeCustomKeyStores operation. + CustomKeyStoreId *string `min:"1" type:"string"` + // The length of the byte string. NumberOfBytes *int64 `min:"1" type:"integer"` } @@ -5894,6 +7482,9 @@ func (s GenerateRandomInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *GenerateRandomInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "GenerateRandomInput"} + if s.CustomKeyStoreId != nil && len(*s.CustomKeyStoreId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CustomKeyStoreId", 1)) + } if s.NumberOfBytes != nil && *s.NumberOfBytes < 1 { invalidParams.Add(request.NewErrParamMinValue("NumberOfBytes", 1)) } @@ -5904,6 +7495,12 @@ func (s *GenerateRandomInput) Validate() error { return nil } +// SetCustomKeyStoreId sets the CustomKeyStoreId field's value. +func (s *GenerateRandomInput) SetCustomKeyStoreId(v string) *GenerateRandomInput { + s.CustomKeyStoreId = &v + return s +} + // SetNumberOfBytes sets the NumberOfBytes field's value. func (s *GenerateRandomInput) SetNumberOfBytes(v int64) *GenerateRandomInput { s.NumberOfBytes = &v @@ -5914,10 +7511,10 @@ type GenerateRandomOutput struct { _ struct{} `type:"structure"` // The random byte string. When you use the HTTP API or the AWS CLI, the value - // is Base64-encoded. Otherwise, it is not encoded. + // is Base64-encdoded. Otherwise, it is not encoded. // // Plaintext is automatically base64 encoded/decoded by the SDK. - Plaintext []byte `min:"1" type:"blob"` + Plaintext []byte `min:"1" type:"blob" sensitive:"true"` } // String returns the string representation @@ -6122,8 +7719,9 @@ type GetParametersForImportInput struct { // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` - // The algorithm you use to encrypt the key material before importing it with - // ImportKeyMaterial. For more information, see Encrypt the Key Material (http://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-encrypt-key-material.html) + // The algorithm you will use to encrypt the key material before importing it + // with ImportKeyMaterial. For more information, see Encrypt the Key Material + // (http://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-encrypt-key-material.html) // in the AWS Key Management Service Developer Guide. // // WrappingAlgorithm is a required field @@ -6207,7 +7805,7 @@ type GetParametersForImportOutput struct { // ImportKeyMaterial. // // PublicKey is automatically base64 encoded/decoded by the SDK. - PublicKey []byte `min:"1" type:"blob"` + PublicKey []byte `min:"1" type:"blob" sensitive:"true"` } // String returns the string representation @@ -6245,14 +7843,14 @@ func (s *GetParametersForImportOutput) SetPublicKey(v []byte) *GetParametersForI } // A structure that you can use to allow certain operations in the grant only -// when the preferred encryption context is present. For more information about +// when the desired encryption context is present. For more information about // encryption context, see Encryption Context (http://docs.aws.amazon.com/kms/latest/developerguide/encryption-context.html) // in the AWS Key Management Service Developer Guide. // // Grant constraints apply only to operations that accept encryption context // as input. For example, the DescribeKey operation does not accept encryption // context as input. A grant that allows the DescribeKey operation does so regardless -// of the grant constraints. In contrast, the Encrypt operation accepts encryption +// of the grant constraints. In constrast, the Encrypt operation accepts encryption // context as input. A grant that allows the Encrypt operation does so only // when the encryption context of the Encrypt operation satisfies the grant // constraints. @@ -6574,11 +8172,23 @@ type KeyMetadata struct { // in the Example ARNs section of the AWS General Reference. Arn *string `min:"20" type:"string"` + // The cluster ID of the AWS CloudHSM cluster that contains the key material + // for the CMK. When you create a CMK in a custom key store (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html), + // AWS KMS creates the key material for the CMK in the associated AWS CloudHSM + // cluster. This value is present only when the CMK is created in a custom key + // store. + CloudHsmClusterId *string `min:"19" type:"string"` + // The date and time when the CMK was created. CreationDate *time.Time `type:"timestamp"` + // A unique identifier for the custom key store (http://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html) + // that contains the CMK. This value is present only when the CMK is created + // in a custom key store. + CustomKeyStoreId *string `min:"1" type:"string"` + // The date and time after which AWS KMS deletes the CMK. This value is present - // only when KeyState is PendingDeletion, otherwise this value is omitted. + // only when KeyState is PendingDeletion. DeletionDate *time.Time `type:"timestamp"` // The description of the CMK. @@ -6597,7 +8207,7 @@ type KeyMetadata struct { // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` - // The CMK's manager. CMKs are either customer managed or AWS managed. For more + // The CMK's manager. CMKs are either customer-managed or AWS-managed. For more // information about the difference, see Customer Master Keys (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#master_keys) // in the AWS Key Management Service Developer Guide. KeyManager *string `type:"string" enum:"KeyManagerType"` @@ -6617,7 +8227,8 @@ type KeyMetadata struct { // 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 - // key material. + // key material. When this value is AWS_CLOUDHSM, the key material was created + // in the AWS CloudHSM cluster associated with a custom key store. Origin *string `type:"string" enum:"OriginType"` // The time at which the imported key material expires. When the key material @@ -6649,12 +8260,24 @@ func (s *KeyMetadata) SetArn(v string) *KeyMetadata { return s } +// SetCloudHsmClusterId sets the CloudHsmClusterId field's value. +func (s *KeyMetadata) SetCloudHsmClusterId(v string) *KeyMetadata { + s.CloudHsmClusterId = &v + return s +} + // SetCreationDate sets the CreationDate field's value. func (s *KeyMetadata) SetCreationDate(v time.Time) *KeyMetadata { s.CreationDate = &v return s } +// SetCustomKeyStoreId sets the CustomKeyStoreId field's value. +func (s *KeyMetadata) SetCustomKeyStoreId(v string) *KeyMetadata { + s.CustomKeyStoreId = &v + return s +} + // SetDeletionDate sets the DeletionDate field's value. func (s *KeyMetadata) SetDeletionDate(v time.Time) *KeyMetadata { s.DeletionDate = &v @@ -7448,9 +9071,9 @@ type PutKeyPolicyInput struct { // 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. The reason for this is that the new principal might not - // be immediately visible to AWS KMS. For more information, see Changes that - // I make are not always immediately visible (http://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency) + // 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 (http://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 limit is 32 kilobytes (32768 bytes). @@ -7652,7 +9275,7 @@ type ReEncryptOutput struct { _ struct{} `type:"structure"` // The reencrypted data. When you use the HTTP API or the AWS CLI, the value - // is Base64-encoded. Otherwise, it is not encoded. + // is Base64-encdoded. Otherwise, it is not encoded. // // CiphertextBlob is automatically base64 encoded/decoded by the SDK. CiphertextBlob []byte `min:"1" type:"blob"` @@ -8269,6 +9892,114 @@ func (s UpdateAliasOutput) GoString() string { return s.String() } +type UpdateCustomKeyStoreInput struct { + _ struct{} `type:"structure"` + + // Associates the custom key store with a related AWS CloudHSM cluster. + // + // Enter the cluster ID of the cluster that you used to create the custom key + // store or a cluster that shares a backup history with the original cluster. + // You cannot use this parameter to associate a custom key store with a different + // cluster. + // + // Clusters that share a backup history have the same cluster certificate. To + // view the cluster certificate of a cluster, use the DescribeClusters (http://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html) + // operation. + CloudHsmClusterId *string `min:"19" type:"string"` + + // Identifies the custom key store that you want to update. Enter the ID of + // the custom key store. To find the ID of a custom key store, use the DescribeCustomKeyStores + // operation. + // + // CustomKeyStoreId is a required field + CustomKeyStoreId *string `min:"1" type:"string" required:"true"` + + // Enter the current password of the kmsuser crypto user (CU) in the AWS CloudHSM + // cluster that is associated with the custom key store. + // + // This parameter tells AWS KMS the current password of the kmsuser crypto user + // (CU). It does not set or change the password of any users in the AWS CloudHSM + // cluster. + KeyStorePassword *string `min:"1" type:"string" sensitive:"true"` + + // Changes the friendly name of the custom key store to the value that you specify. + // The custom key store name must be unique in the AWS account. + NewCustomKeyStoreName *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s UpdateCustomKeyStoreInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateCustomKeyStoreInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateCustomKeyStoreInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateCustomKeyStoreInput"} + if s.CloudHsmClusterId != nil && len(*s.CloudHsmClusterId) < 19 { + invalidParams.Add(request.NewErrParamMinLen("CloudHsmClusterId", 19)) + } + if s.CustomKeyStoreId == nil { + invalidParams.Add(request.NewErrParamRequired("CustomKeyStoreId")) + } + if s.CustomKeyStoreId != nil && len(*s.CustomKeyStoreId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CustomKeyStoreId", 1)) + } + if s.KeyStorePassword != nil && len(*s.KeyStorePassword) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KeyStorePassword", 1)) + } + if s.NewCustomKeyStoreName != nil && len(*s.NewCustomKeyStoreName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NewCustomKeyStoreName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCloudHsmClusterId sets the CloudHsmClusterId field's value. +func (s *UpdateCustomKeyStoreInput) SetCloudHsmClusterId(v string) *UpdateCustomKeyStoreInput { + s.CloudHsmClusterId = &v + return s +} + +// SetCustomKeyStoreId sets the CustomKeyStoreId field's value. +func (s *UpdateCustomKeyStoreInput) SetCustomKeyStoreId(v string) *UpdateCustomKeyStoreInput { + s.CustomKeyStoreId = &v + return s +} + +// SetKeyStorePassword sets the KeyStorePassword field's value. +func (s *UpdateCustomKeyStoreInput) SetKeyStorePassword(v string) *UpdateCustomKeyStoreInput { + s.KeyStorePassword = &v + return s +} + +// SetNewCustomKeyStoreName sets the NewCustomKeyStoreName field's value. +func (s *UpdateCustomKeyStoreInput) SetNewCustomKeyStoreName(v string) *UpdateCustomKeyStoreInput { + s.NewCustomKeyStoreName = &v + return s +} + +type UpdateCustomKeyStoreOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateCustomKeyStoreOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateCustomKeyStoreOutput) GoString() string { + return s.String() +} + type UpdateKeyDescriptionInput struct { _ struct{} `type:"structure"` @@ -8359,6 +10090,40 @@ const ( AlgorithmSpecRsaesOaepSha256 = "RSAES_OAEP_SHA_256" ) +const ( + // ConnectionErrorCodeTypeInvalidCredentials is a ConnectionErrorCodeType enum value + ConnectionErrorCodeTypeInvalidCredentials = "INVALID_CREDENTIALS" + + // ConnectionErrorCodeTypeClusterNotFound is a ConnectionErrorCodeType enum value + ConnectionErrorCodeTypeClusterNotFound = "CLUSTER_NOT_FOUND" + + // ConnectionErrorCodeTypeNetworkErrors is a ConnectionErrorCodeType enum value + ConnectionErrorCodeTypeNetworkErrors = "NETWORK_ERRORS" + + // ConnectionErrorCodeTypeInsufficientCloudhsmHsms is a ConnectionErrorCodeType enum value + ConnectionErrorCodeTypeInsufficientCloudhsmHsms = "INSUFFICIENT_CLOUDHSM_HSMS" + + // ConnectionErrorCodeTypeUserLockedOut is a ConnectionErrorCodeType enum value + ConnectionErrorCodeTypeUserLockedOut = "USER_LOCKED_OUT" +) + +const ( + // ConnectionStateTypeConnected is a ConnectionStateType enum value + ConnectionStateTypeConnected = "CONNECTED" + + // ConnectionStateTypeConnecting is a ConnectionStateType enum value + ConnectionStateTypeConnecting = "CONNECTING" + + // ConnectionStateTypeFailed is a ConnectionStateType enum value + ConnectionStateTypeFailed = "FAILED" + + // ConnectionStateTypeDisconnected is a ConnectionStateType enum value + ConnectionStateTypeDisconnected = "DISCONNECTED" + + // ConnectionStateTypeDisconnecting is a ConnectionStateType enum value + ConnectionStateTypeDisconnecting = "DISCONNECTING" +) + const ( // DataKeySpecAes256 is a DataKeySpec enum value DataKeySpecAes256 = "AES_256" @@ -8424,6 +10189,9 @@ const ( // KeyStatePendingImport is a KeyState enum value KeyStatePendingImport = "PendingImport" + + // KeyStateUnavailable is a KeyState enum value + KeyStateUnavailable = "Unavailable" ) const ( @@ -8437,6 +10205,9 @@ const ( // OriginTypeExternal is a OriginType enum value OriginTypeExternal = "EXTERNAL" + + // OriginTypeAwsCloudhsm is a OriginType enum value + OriginTypeAwsCloudhsm = "AWS_CLOUDHSM" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/kms/doc.go b/vendor/github.com/aws/aws-sdk-go/service/kms/doc.go index cc3620ac7d..fad9002e18 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kms/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kms/doc.go @@ -30,7 +30,7 @@ // Requests must be signed by using an access key ID and a secret access key. // We strongly recommend that you do not use your AWS account (root) access // key ID and secret key for everyday work with AWS KMS. Instead, use the access -// key ID and secret access key for an IAM user. You can also use the AWS Security +// key ID and secret access key for an IAM user, or you can use the AWS Security // Token Service to generate temporary security credentials that you can use // to sign requests. // @@ -50,8 +50,8 @@ // For more information about credentials and request signing, see the following: // // * AWS Security Credentials (http://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html) -// - This topic provides general information about the types of credentials -// used for accessing AWS. +// - This topic provides general information about the of credentials used +// for accessing AWS. // // * Temporary Security Credentials (http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html) // - This section of the IAM User Guide describes how to create and use temporary @@ -61,11 +61,11 @@ // - This set of topics walks you through the process of signing a request // using an access key ID and a secret access key. // -// Commonly Used API Operations +// Commonly Used APIs // -// Of the API operations discussed in this guide, the following will prove the -// most useful for most applications. You will likely perform operations other -// than these, such as creating keys and assigning policies, by using the console. +// Of the APIs discussed in this guide, the following will prove the most useful +// for most applications. You will likely perform actions other than these, +// such as creating keys and assigning policies, by using the console. // // * Encrypt // diff --git a/vendor/github.com/aws/aws-sdk-go/service/kms/errors.go b/vendor/github.com/aws/aws-sdk-go/service/kms/errors.go index 2a6511da97..e41edf66db 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kms/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kms/errors.go @@ -11,6 +11,121 @@ const ( // exists. ErrCodeAlreadyExistsException = "AlreadyExistsException" + // ErrCodeCloudHsmClusterInUseException for service response error code + // "CloudHsmClusterInUseException". + // + // The request was rejected because the specified AWS CloudHSM cluster is already + // associated with a custom key store or it shares a backup history with a cluster + // that is associated with a custom key store. Each custom key store must be + // associated with a different AWS CloudHSM cluster. + // + // Clusters that share a backup history have the same cluster certificate. To + // view the cluster certificate of a cluster, use the DescribeClusters (http://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html) + // operation. + ErrCodeCloudHsmClusterInUseException = "CloudHsmClusterInUseException" + + // ErrCodeCloudHsmClusterInvalidConfigurationException for service response error code + // "CloudHsmClusterInvalidConfigurationException". + // + // The request was rejected because the associated AWS CloudHSM cluster did + // not meet the configuration requirements for a custom key store. The cluster + // must be configured with private subnets in at least two different Availability + // Zones in the Region. Also, it must contain at least as many HSMs as the operation + // requires. + // + // For the CreateCustomKeyStore, UpdateCustomKeyStore, and CreateKey operations, + // the AWS CloudHSM cluster must have at least two active HSMs, each in a different + // Availability Zone. For the ConnectCustomKeyStore operation, the AWS CloudHSM + // must contain at least one active HSM. + // + // For information about creating a private subnet for a AWS CloudHSM cluster, + // see Create a Private Subnet (http://docs.aws.amazon.com/cloudhsm/latest/userguide/create-subnets.html) + // in the AWS CloudHSM User Guide. To add HSMs, use the AWS CloudHSM CreateHsm + // (http://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html) + // operation. + ErrCodeCloudHsmClusterInvalidConfigurationException = "CloudHsmClusterInvalidConfigurationException" + + // ErrCodeCloudHsmClusterNotActiveException for service response error code + // "CloudHsmClusterNotActiveException". + // + // The request was rejected because the AWS CloudHSM cluster that is associated + // with the custom key store is not active. Initialize and activate the cluster + // and try the command again. For detailed instructions, see Getting Started + // (http://docs.aws.amazon.com/cloudhsm/latest/userguide/getting-started.html) + // in the AWS CloudHSM User Guide. + ErrCodeCloudHsmClusterNotActiveException = "CloudHsmClusterNotActiveException" + + // ErrCodeCloudHsmClusterNotFoundException for service response error code + // "CloudHsmClusterNotFoundException". + // + // The request was rejected because AWS KMS cannot find the AWS CloudHSM cluster + // with the specified cluster ID. Retry the request with a different cluster + // ID. + ErrCodeCloudHsmClusterNotFoundException = "CloudHsmClusterNotFoundException" + + // ErrCodeCloudHsmClusterNotRelatedException for service response error code + // "CloudHsmClusterNotRelatedException". + // + // The request was rejected because the specified AWS CloudHSM cluster has a + // different cluster certificate than the original cluster. You cannot use the + // operation to specify an unrelated cluster. + // + // Specify a cluster that shares a backup history with the original cluster. + // This includes clusters that were created from a backup of the current cluster, + // and clusters that were created from the same backup that produced the current + // cluster. + // + // Clusters that share a backup history have the same cluster certificate. To + // view the cluster certificate of a cluster, use the DescribeClusters (http://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html) + // operation. + ErrCodeCloudHsmClusterNotRelatedException = "CloudHsmClusterNotRelatedException" + + // ErrCodeCustomKeyStoreHasCMKsException for service response error code + // "CustomKeyStoreHasCMKsException". + // + // The request was rejected because the custom key store contains AWS KMS customer + // master keys (CMKs). After verifying that you do not need to use the CMKs, + // use the ScheduleKeyDeletion operation to delete the CMKs. After they are + // deleted, you can delete the custom key store. + ErrCodeCustomKeyStoreHasCMKsException = "CustomKeyStoreHasCMKsException" + + // ErrCodeCustomKeyStoreInvalidStateException for service response error code + // "CustomKeyStoreInvalidStateException". + // + // The request was rejected because of the ConnectionState of the custom key + // store. To get the ConnectionState of a custom key store, use the DescribeCustomKeyStores + // operation. + // + // This exception is thrown under the following conditions: + // + // * You requested the CreateKey or GenerateRandom operation in a custom + // key store that is not connected. These operations are valid only when + // the custom key store ConnectionState is CONNECTED. + // + // * You requested the UpdateCustomKeyStore or DeleteCustomKeyStore operation + // on a custom key store that is not disconnected. This operation is valid + // only when the custom key store ConnectionState is DISCONNECTED. + // + // * You requested the ConnectCustomKeyStore operation on a custom key store + // with a ConnectionState of DISCONNECTING or FAILED. This operation is valid + // for all other ConnectionState values. + ErrCodeCustomKeyStoreInvalidStateException = "CustomKeyStoreInvalidStateException" + + // ErrCodeCustomKeyStoreNameInUseException for service response error code + // "CustomKeyStoreNameInUseException". + // + // The request was rejected because the specified custom key store name is already + // assigned to another custom key store in the account. Try again with a custom + // key store name that is unique in the account. + ErrCodeCustomKeyStoreNameInUseException = "CustomKeyStoreNameInUseException" + + // ErrCodeCustomKeyStoreNotFoundException for service response error code + // "CustomKeyStoreNotFoundException". + // + // The request was rejected because AWS KMS cannot find a custom key store with + // the specified key store name or ID. + ErrCodeCustomKeyStoreNotFoundException = "CustomKeyStoreNotFoundException" + // ErrCodeDependencyTimeoutException for service response error code // "DependencyTimeoutException". // @@ -40,6 +155,17 @@ const ( // master key (CMK). ErrCodeIncorrectKeyMaterialException = "IncorrectKeyMaterialException" + // ErrCodeIncorrectTrustAnchorException for service response error code + // "IncorrectTrustAnchorException". + // + // The request was rejected because the trust anchor certificate in the request + // is not the trust anchor certificate for the specified AWS CloudHSM cluster. + // + // When you initialize the cluster (http://docs.aws.amazon.com/cloudhsm/latest/userguide/initialize-cluster.html#sign-csr), + // you create the trust anchor certificate and save it in the customerCA.crt + // file. + ErrCodeIncorrectTrustAnchorException = "IncorrectTrustAnchorException" + // ErrCodeInternalException for service response error code // "KMSInternalException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go b/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go index f5fd4eeacc..fbbb32e8ac 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lambda/api.go @@ -13,12 +13,120 @@ import ( "github.com/aws/aws-sdk-go/private/protocol/restjson" ) +const opAddLayerVersionPermission = "AddLayerVersionPermission" + +// AddLayerVersionPermissionRequest generates a "aws/request.Request" representing the +// client's request for the AddLayerVersionPermission 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 AddLayerVersionPermission for more information on using the AddLayerVersionPermission +// 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 AddLayerVersionPermissionRequest method. +// req, resp := client.AddLayerVersionPermissionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AddLayerVersionPermission +func (c *Lambda) AddLayerVersionPermissionRequest(input *AddLayerVersionPermissionInput) (req *request.Request, output *AddLayerVersionPermissionOutput) { + op := &request.Operation{ + Name: opAddLayerVersionPermission, + HTTPMethod: "POST", + HTTPPath: "/2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy", + } + + if input == nil { + input = &AddLayerVersionPermissionInput{} + } + + output = &AddLayerVersionPermissionOutput{} + req = c.newRequest(op, input, output) + return +} + +// AddLayerVersionPermission API operation for AWS Lambda. +// +// Adds permissions to the resource-based policy of a version of a function +// layer. Use this action to grant layer usage permission to other accounts. +// You can grant permission to a single account, all AWS accounts, or all accounts +// in an organization. +// +// To revoke permission, call RemoveLayerVersionPermission with the statement +// ID that you specified when you added it. +// +// 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 Lambda's +// API operation AddLayerVersionPermission for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// The AWS Lambda service encountered an internal error. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource (for example, a Lambda function or access policy statement) +// specified in the request does not exist. +// +// * ErrCodeResourceConflictException "ResourceConflictException" +// The resource already exists. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One of the parameters in the request is invalid. For example, if you provided +// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration +// API, that AWS Lambda is unable to assume you will get this exception. +// +// * ErrCodePolicyLengthExceededException "PolicyLengthExceededException" +// Lambda function access policy is limited to 20 KB. +// +// * ErrCodePreconditionFailedException "PreconditionFailedException" +// The RevisionId provided does not match the latest RevisionId for the Lambda +// function or alias. Call the GetFunction or the GetAlias API to retrieve the +// latest RevisionId for your resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/AddLayerVersionPermission +func (c *Lambda) AddLayerVersionPermission(input *AddLayerVersionPermissionInput) (*AddLayerVersionPermissionOutput, error) { + req, out := c.AddLayerVersionPermissionRequest(input) + return out, req.Send() +} + +// AddLayerVersionPermissionWithContext is the same as AddLayerVersionPermission with the addition of +// the ability to pass a context and additional request options. +// +// See AddLayerVersionPermission 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 *Lambda) AddLayerVersionPermissionWithContext(ctx aws.Context, input *AddLayerVersionPermissionInput, opts ...request.Option) (*AddLayerVersionPermissionOutput, error) { + req, out := c.AddLayerVersionPermissionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opAddPermission = "AddPermission" // AddPermissionRequest generates a "aws/request.Request" representing the // client's request for the AddPermission operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -59,17 +167,16 @@ func (c *Lambda) AddPermissionRequest(input *AddPermissionInput) (req *request.R // // Adds a permission to the resource policy associated with the specified AWS // Lambda function. You use resource policies to grant permissions to event -// sources that use push model. In a push model, event sources (such as Amazon -// S3 and custom applications) invoke your Lambda function. Each permission -// you add to the resource policy allows an event source, permission to invoke +// sources that use the push model. In a push model, event sources (such as +// Amazon S3 and custom applications) invoke your Lambda function. Each permission +// you add to the resource policy allows an event source permission to invoke // the Lambda function. // -// For information about the push model, see Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/lambda-introduction.html). -// -// If you are using versioning, the permissions you add are specific to the -// Lambda function version or alias you specify in the AddPermission request -// via the Qualifier parameter. For more information about versioning, see AWS -// Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). +// Permissions apply to the Amazon Resource Name (ARN) used to invoke the function, +// which can be unqualified (the unpublished version of the function), or include +// a version or alias. If a client uses a version or alias to invoke a function, +// use the Qualifier parameter to apply permissions to that ARN. For more information +// about versioning, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). // // This operation requires permission for the lambda:AddPermission action. // @@ -100,6 +207,7 @@ func (c *Lambda) AddPermissionRequest(input *AddPermissionInput) (req *request.R // Lambda function access policy is limited to 20 KB. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // * ErrCodePreconditionFailedException "PreconditionFailedException" // The RevisionId provided does not match the latest RevisionId for the Lambda @@ -133,7 +241,7 @@ const opCreateAlias = "CreateAlias" // CreateAliasRequest generates a "aws/request.Request" representing the // client's request for the CreateAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -202,6 +310,7 @@ func (c *Lambda) CreateAliasRequest(input *CreateAliasInput) (req *request.Reque // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/CreateAlias func (c *Lambda) CreateAlias(input *CreateAliasInput) (*AliasConfiguration, error) { @@ -230,7 +339,7 @@ const opCreateEventSourceMapping = "CreateEventSourceMapping" // CreateEventSourceMappingRequest generates a "aws/request.Request" representing the // client's request for the CreateEventSourceMapping operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -269,28 +378,16 @@ func (c *Lambda) CreateEventSourceMappingRequest(input *CreateEventSourceMapping // CreateEventSourceMapping API operation for AWS Lambda. // -// Identifies a poll-based event source for a Lambda function. It can be either -// an Amazon Kinesis or DynamoDB stream, or an Amazon SQS queue. AWS Lambda -// invokes the specified function when records are posted to the event source. +// Creates a mapping between an event source and an AWS Lambda function. Lambda +// reads items from the event source and triggers the function. // -// This association between a poll-based source and a Lambda function is called -// the event source mapping. +// For details about each event source type, see the following topics. // -// You provide mapping information (for example, which stream or SQS queue to -// read from and which Lambda function to invoke) in the request body. +// * Using AWS Lambda with Amazon Kinesis (http://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html) // -// Amazon Kinesis or DynamoDB stream event sources can be associated with multiple -// AWS Lambda functions and a given Lambda function can be associated with multiple -// AWS event sources. For Amazon SQS, you can configure multiple queues as event -// sources for a single Lambda function, but an SQS queue can be mapped only -// to a single Lambda function. -// -// If you are using versioning, you can specify a specific function version -// or an alias via the function name parameter. For more information about versioning, -// see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). +// * Using AWS Lambda with Amazon SQS (http://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html) // -// This operation requires permission for the lambda:CreateEventSourceMapping -// action. +// * Using AWS Lambda with Amazon DynamoDB (http://docs.aws.amazon.com/lambda/latest/dg/with-ddb.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 @@ -312,6 +409,7 @@ func (c *Lambda) CreateEventSourceMappingRequest(input *CreateEventSourceMapping // The resource already exists. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // * ErrCodeResourceNotFoundException "ResourceNotFoundException" // The resource (for example, a Lambda function or access policy statement) @@ -344,7 +442,7 @@ const opCreateFunction = "CreateFunction" // CreateFunctionRequest generates a "aws/request.Request" representing the // client's request for the CreateFunction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -383,14 +481,9 @@ func (c *Lambda) CreateFunctionRequest(input *CreateFunctionInput) (req *request // CreateFunction API operation for AWS Lambda. // -// Creates a new Lambda function. The function metadata is created from the -// request parameters, and the code for the function is provided by a .zip file -// in the request body. If the function name already exists, the operation will -// fail. Note that the function name is case-sensitive. -// -// If you are using versioning, you can also publish a version of the Lambda -// function you are creating using the Publish parameter. For more information -// about versioning, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). +// Creates a new Lambda function. The function configuration is created from +// the request parameters, and the code for the function is provided by a .zip +// file. The function name is case-sensitive. // // This operation requires permission for the lambda:CreateFunction action. // @@ -418,6 +511,7 @@ func (c *Lambda) CreateFunctionRequest(input *CreateFunctionInput) (req *request // The resource already exists. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // * ErrCodeCodeStorageExceededException "CodeStorageExceededException" // You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html) @@ -449,7 +543,7 @@ const opDeleteAlias = "DeleteAlias" // DeleteAliasRequest generates a "aws/request.Request" representing the // client's request for the DeleteAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -483,8 +577,7 @@ func (c *Lambda) DeleteAliasRequest(input *DeleteAliasInput) (req *request.Reque output = &DeleteAliasOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -512,6 +605,7 @@ func (c *Lambda) DeleteAliasRequest(input *DeleteAliasInput) (req *request.Reque // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteAlias func (c *Lambda) DeleteAlias(input *DeleteAliasInput) (*DeleteAliasOutput, error) { @@ -540,7 +634,7 @@ const opDeleteEventSourceMapping = "DeleteEventSourceMapping" // DeleteEventSourceMappingRequest generates a "aws/request.Request" representing the // client's request for the DeleteEventSourceMapping operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -579,11 +673,7 @@ func (c *Lambda) DeleteEventSourceMappingRequest(input *DeleteEventSourceMapping // DeleteEventSourceMapping API operation for AWS Lambda. // -// Removes an event source mapping. This means AWS Lambda will no longer invoke -// the function for events in the associated source. -// -// This operation requires permission for the lambda:DeleteEventSourceMapping -// action. +// Deletes an event source mapping. // // 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 @@ -606,6 +696,7 @@ func (c *Lambda) DeleteEventSourceMappingRequest(input *DeleteEventSourceMapping // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // * ErrCodeResourceInUseException "ResourceInUseException" // The operation conflicts with the resource's availability. For example, you @@ -639,7 +730,7 @@ const opDeleteFunction = "DeleteFunction" // DeleteFunctionRequest generates a "aws/request.Request" representing the // client's request for the DeleteFunction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -673,24 +764,15 @@ func (c *Lambda) DeleteFunctionRequest(input *DeleteFunctionInput) (req *request output = &DeleteFunctionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteFunction API operation for AWS Lambda. // -// Deletes the specified Lambda function code and configuration. -// -// If you are using the versioning feature and you don't specify a function -// version in your DeleteFunction request, AWS Lambda will delete the function, -// including all its versions, and any aliases pointing to the function versions. -// To delete a specific function version, you must provide the function version -// via the Qualifier parameter. For information about function versioning, see -// AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). -// -// When you delete a function the associated resource policy is also deleted. -// You will need to delete the event source mappings explicitly. +// Deletes a Lambda function. To delete a specific function version, use the +// Qualifier parameter. Otherwise, all versions and aliases are deleted. Event +// source mappings are not deleted. // // This operation requires permission for the lambda:DeleteFunction action. // @@ -710,6 +792,7 @@ func (c *Lambda) DeleteFunctionRequest(input *DeleteFunctionInput) (req *request // specified in the request does not exist. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // One of the parameters in the request is invalid. For example, if you provided @@ -746,7 +829,7 @@ const opDeleteFunctionConcurrency = "DeleteFunctionConcurrency" // DeleteFunctionConcurrencyRequest generates a "aws/request.Request" representing the // client's request for the DeleteFunctionConcurrency operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -780,15 +863,14 @@ func (c *Lambda) DeleteFunctionConcurrencyRequest(input *DeleteFunctionConcurren output = &DeleteFunctionConcurrencyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteFunctionConcurrency API operation for AWS Lambda. // // Removes concurrent execution limits from this function. For more information, -// see concurrent-executions. +// see Managing Concurrency (http://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.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 @@ -806,6 +888,7 @@ func (c *Lambda) DeleteFunctionConcurrencyRequest(input *DeleteFunctionConcurren // specified in the request does not exist. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // One of the parameters in the request is invalid. For example, if you provided @@ -834,12 +917,97 @@ func (c *Lambda) DeleteFunctionConcurrencyWithContext(ctx aws.Context, input *De return out, req.Send() } +const opDeleteLayerVersion = "DeleteLayerVersion" + +// DeleteLayerVersionRequest generates a "aws/request.Request" representing the +// client's request for the DeleteLayerVersion 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 DeleteLayerVersion for more information on using the DeleteLayerVersion +// 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 DeleteLayerVersionRequest method. +// req, resp := client.DeleteLayerVersionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteLayerVersion +func (c *Lambda) DeleteLayerVersionRequest(input *DeleteLayerVersionInput) (req *request.Request, output *DeleteLayerVersionOutput) { + op := &request.Operation{ + Name: opDeleteLayerVersion, + HTTPMethod: "DELETE", + HTTPPath: "/2018-10-31/layers/{LayerName}/versions/{VersionNumber}", + } + + if input == nil { + input = &DeleteLayerVersionInput{} + } + + output = &DeleteLayerVersionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteLayerVersion API operation for AWS Lambda. +// +// Deletes a version of a function layer. Deleted versions can no longer be +// viewed or added to functions. However, a copy of the version remains in Lambda +// until no functions refer to it. +// +// 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 Lambda's +// API operation DeleteLayerVersion for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// The AWS Lambda service encountered an internal error. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/DeleteLayerVersion +func (c *Lambda) DeleteLayerVersion(input *DeleteLayerVersionInput) (*DeleteLayerVersionOutput, error) { + req, out := c.DeleteLayerVersionRequest(input) + return out, req.Send() +} + +// DeleteLayerVersionWithContext is the same as DeleteLayerVersion with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteLayerVersion 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 *Lambda) DeleteLayerVersionWithContext(ctx aws.Context, input *DeleteLayerVersionInput, opts ...request.Option) (*DeleteLayerVersionOutput, error) { + req, out := c.DeleteLayerVersionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetAccountSettings = "GetAccountSettings" // GetAccountSettingsRequest generates a "aws/request.Request" representing the // client's request for the GetAccountSettings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -878,13 +1046,8 @@ func (c *Lambda) GetAccountSettingsRequest(input *GetAccountSettingsInput) (req // GetAccountSettings API operation for AWS Lambda. // -// Returns a customer's account settings. -// -// You can use this operation to retrieve Lambda limits information, such as -// code size and concurrency limits. For more information about limits, see -// AWS Lambda Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html). -// You can also retrieve resource usage statistics, such as code storage usage -// and function count. +// Retrieves details about your account's limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html) +// and usage in a 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 @@ -895,6 +1058,7 @@ func (c *Lambda) GetAccountSettingsRequest(input *GetAccountSettingsInput) (req // // Returned Error Codes: // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // * ErrCodeServiceException "ServiceException" // The AWS Lambda service encountered an internal error. @@ -926,7 +1090,7 @@ const opGetAlias = "GetAlias" // GetAliasRequest generates a "aws/request.Request" representing the // client's request for the GetAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -992,6 +1156,7 @@ func (c *Lambda) GetAliasRequest(input *GetAliasInput) (req *request.Request, ou // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetAlias func (c *Lambda) GetAlias(input *GetAliasInput) (*AliasConfiguration, error) { @@ -1020,7 +1185,7 @@ const opGetEventSourceMapping = "GetEventSourceMapping" // GetEventSourceMappingRequest generates a "aws/request.Request" representing the // client's request for the GetEventSourceMapping operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1059,10 +1224,7 @@ func (c *Lambda) GetEventSourceMappingRequest(input *GetEventSourceMappingInput) // GetEventSourceMapping API operation for AWS Lambda. // -// Returns configuration information for the specified event source mapping -// (see CreateEventSourceMapping). -// -// This operation requires permission for the lambda:GetEventSourceMapping action. +// Returns details about an event source mapping. // // 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 @@ -1085,6 +1247,7 @@ func (c *Lambda) GetEventSourceMappingRequest(input *GetEventSourceMappingInput) // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetEventSourceMapping func (c *Lambda) GetEventSourceMapping(input *GetEventSourceMappingInput) (*EventSourceMappingConfiguration, error) { @@ -1113,7 +1276,7 @@ const opGetFunction = "GetFunction" // GetFunctionRequest generates a "aws/request.Request" representing the // client's request for the GetFunction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1158,11 +1321,9 @@ func (c *Lambda) GetFunctionRequest(input *GetFunctionInput) (req *request.Reque // information is the same information you provided as parameters when uploading // the function. // -// Using the optional Qualifier parameter, you can specify a specific function -// version for which you want this information. If you don't specify this parameter, -// the API uses unqualified function ARN which return information about the -// $LATEST version of the Lambda function. For more information, see AWS Lambda -// Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). +// Use the Qualifier parameter to retrieve a published version of the function. +// Otherwise, returns the unpublished version ($LATEST). For more information, +// see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). // // This operation requires permission for the lambda:GetFunction action. // @@ -1182,6 +1343,7 @@ func (c *Lambda) GetFunctionRequest(input *GetFunctionInput) (req *request.Reque // specified in the request does not exist. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // One of the parameters in the request is invalid. For example, if you provided @@ -1215,7 +1377,7 @@ const opGetFunctionConfiguration = "GetFunctionConfiguration" // GetFunctionConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetFunctionConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1284,6 +1446,7 @@ func (c *Lambda) GetFunctionConfigurationRequest(input *GetFunctionConfiguration // specified in the request does not exist. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // One of the parameters in the request is invalid. For example, if you provided @@ -1312,173 +1475,151 @@ func (c *Lambda) GetFunctionConfigurationWithContext(ctx aws.Context, input *Get return out, req.Send() } -const opGetPolicy = "GetPolicy" +const opGetLayerVersion = "GetLayerVersion" -// GetPolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetPolicy operation. The "output" return +// GetLayerVersionRequest generates a "aws/request.Request" representing the +// client's request for the GetLayerVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetPolicy for more information on using the GetPolicy +// See GetLayerVersion for more information on using the GetLayerVersion // 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 GetPolicyRequest method. -// req, resp := client.GetPolicyRequest(params) +// // Example sending a request using the GetLayerVersionRequest method. +// req, resp := client.GetLayerVersionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetPolicy -func (c *Lambda) GetPolicyRequest(input *GetPolicyInput) (req *request.Request, output *GetPolicyOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetLayerVersion +func (c *Lambda) GetLayerVersionRequest(input *GetLayerVersionInput) (req *request.Request, output *GetLayerVersionOutput) { op := &request.Operation{ - Name: opGetPolicy, + Name: opGetLayerVersion, HTTPMethod: "GET", - HTTPPath: "/2015-03-31/functions/{FunctionName}/policy", + HTTPPath: "/2018-10-31/layers/{LayerName}/versions/{VersionNumber}", } if input == nil { - input = &GetPolicyInput{} + input = &GetLayerVersionInput{} } - output = &GetPolicyOutput{} + output = &GetLayerVersionOutput{} req = c.newRequest(op, input, output) return } -// GetPolicy API operation for AWS Lambda. -// -// Returns the resource policy associated with the specified Lambda function. +// GetLayerVersion API operation for AWS Lambda. // -// If you are using the versioning feature, you can get the resource policy -// associated with the specific Lambda function version or alias by specifying -// the version or alias name using the Qualifier parameter. For more information -// about versioning, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). -// -// You need permission for the lambda:GetPolicy action. +// Returns information about a version of a function layer, with a link to download +// the layer archive that's valid for 10 minutes. // // 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 Lambda's -// API operation GetPolicy for usage and error information. +// API operation GetLayerVersion for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" // The AWS Lambda service encountered an internal error. // -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // One of the parameters in the request is invalid. For example, if you provided // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration // API, that AWS Lambda is unable to assume you will get this exception. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetPolicy -func (c *Lambda) GetPolicy(input *GetPolicyInput) (*GetPolicyOutput, error) { - req, out := c.GetPolicyRequest(input) +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource (for example, a Lambda function or access policy statement) +// specified in the request does not exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetLayerVersion +func (c *Lambda) GetLayerVersion(input *GetLayerVersionInput) (*GetLayerVersionOutput, error) { + req, out := c.GetLayerVersionRequest(input) return out, req.Send() } -// GetPolicyWithContext is the same as GetPolicy with the addition of +// GetLayerVersionWithContext is the same as GetLayerVersion with the addition of // the ability to pass a context and additional request options. // -// See GetPolicy for details on how to use this API operation. +// See GetLayerVersion 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 *Lambda) GetPolicyWithContext(ctx aws.Context, input *GetPolicyInput, opts ...request.Option) (*GetPolicyOutput, error) { - req, out := c.GetPolicyRequest(input) +func (c *Lambda) GetLayerVersionWithContext(ctx aws.Context, input *GetLayerVersionInput, opts ...request.Option) (*GetLayerVersionOutput, error) { + req, out := c.GetLayerVersionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opInvoke = "Invoke" +const opGetLayerVersionPolicy = "GetLayerVersionPolicy" -// InvokeRequest generates a "aws/request.Request" representing the -// client's request for the Invoke operation. The "output" return +// GetLayerVersionPolicyRequest generates a "aws/request.Request" representing the +// client's request for the GetLayerVersionPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 Invoke for more information on using the Invoke +// See GetLayerVersionPolicy for more information on using the GetLayerVersionPolicy // 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 InvokeRequest method. -// req, resp := client.InvokeRequest(params) +// // Example sending a request using the GetLayerVersionPolicyRequest method. +// req, resp := client.GetLayerVersionPolicyRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/Invoke -func (c *Lambda) InvokeRequest(input *InvokeInput) (req *request.Request, output *InvokeOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetLayerVersionPolicy +func (c *Lambda) GetLayerVersionPolicyRequest(input *GetLayerVersionPolicyInput) (req *request.Request, output *GetLayerVersionPolicyOutput) { op := &request.Operation{ - Name: opInvoke, - HTTPMethod: "POST", - HTTPPath: "/2015-03-31/functions/{FunctionName}/invocations", + Name: opGetLayerVersionPolicy, + HTTPMethod: "GET", + HTTPPath: "/2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy", } if input == nil { - input = &InvokeInput{} + input = &GetLayerVersionPolicyInput{} } - output = &InvokeOutput{} + output = &GetLayerVersionPolicyOutput{} req = c.newRequest(op, input, output) return } -// Invoke API operation for AWS Lambda. -// -// Invokes a specific Lambda function. For an example, see Create the Lambda -// Function and Test It Manually (http://docs.aws.amazon.com/lambda/latest/dg/with-dynamodb-create-function.html#with-dbb-invoke-manually). -// -// If you are using the versioning feature, you can invoke the specific function -// version by providing function version or alias name that is pointing to the -// function version using the Qualifier parameter in the request. If you don't -// provide the Qualifier parameter, the $LATEST version of the Lambda function -// is invoked. Invocations occur at least once in response to an event and functions -// must be idempotent to handle this. For information about the versioning feature, -// see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). +// GetLayerVersionPolicy API operation for AWS Lambda. // -// This operation requires permission for the lambda:InvokeFunction action. -// -// The TooManyRequestsException noted below will return the following: ConcurrentInvocationLimitExceeded -// will be returned if you have no functions with reserved concurrency and have -// exceeded your account concurrent limit or if a function without reserved -// concurrency exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded -// will be returned when a function with reserved concurrency exceeds its configured -// concurrency limit. +// Returns the permission policy for a layer version. For more information, +// see AddLayerVersionPermission. // // 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 Lambda's -// API operation Invoke for usage and error information. +// API operation GetLayerVersionPolicy for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -1488,41 +1629,251 @@ func (c *Lambda) InvokeRequest(input *InvokeInput) (req *request.Request, output // The resource (for example, a Lambda function or access policy statement) // specified in the request does not exist. // -// * ErrCodeInvalidRequestContentException "InvalidRequestContentException" -// The request body could not be parsed as JSON. -// -// * ErrCodeRequestTooLargeException "RequestTooLargeException" -// The request payload exceeded the Invoke request body JSON input limit. For -// more information, see Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html). -// -// * ErrCodeUnsupportedMediaTypeException "UnsupportedMediaTypeException" -// The content type of the Invoke request body is not JSON. -// // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // One of the parameters in the request is invalid. For example, if you provided // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration // API, that AWS Lambda is unable to assume you will get this exception. // -// * ErrCodeEC2UnexpectedException "EC2UnexpectedException" -// AWS Lambda received an unexpected EC2 client exception while setting up for -// the Lambda function. +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetLayerVersionPolicy +func (c *Lambda) GetLayerVersionPolicy(input *GetLayerVersionPolicyInput) (*GetLayerVersionPolicyOutput, error) { + req, out := c.GetLayerVersionPolicyRequest(input) + return out, req.Send() +} + +// GetLayerVersionPolicyWithContext is the same as GetLayerVersionPolicy with the addition of +// the ability to pass a context and additional request options. // -// * ErrCodeSubnetIPAddressLimitReachedException "SubnetIPAddressLimitReachedException" -// AWS Lambda was not able to set up VPC access for the Lambda function because -// one or more configured subnets has no available IP addresses. +// See GetLayerVersionPolicy for details on how to use this API operation. // -// * ErrCodeENILimitReachedException "ENILimitReachedException" -// AWS Lambda was not able to create an Elastic Network Interface (ENI) in the -// VPC, specified as part of Lambda function configuration, because the limit -// for network interfaces has been reached. +// 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 *Lambda) GetLayerVersionPolicyWithContext(ctx aws.Context, input *GetLayerVersionPolicyInput, opts ...request.Option) (*GetLayerVersionPolicyOutput, error) { + req, out := c.GetLayerVersionPolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetPolicy = "GetPolicy" + +// GetPolicyRequest generates a "aws/request.Request" representing the +// client's request for the GetPolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. // -// * ErrCodeEC2ThrottledException "EC2ThrottledException" +// 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 GetPolicy for more information on using the GetPolicy +// 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 GetPolicyRequest method. +// req, resp := client.GetPolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetPolicy +func (c *Lambda) GetPolicyRequest(input *GetPolicyInput) (req *request.Request, output *GetPolicyOutput) { + op := &request.Operation{ + Name: opGetPolicy, + HTTPMethod: "GET", + HTTPPath: "/2015-03-31/functions/{FunctionName}/policy", + } + + if input == nil { + input = &GetPolicyInput{} + } + + output = &GetPolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetPolicy API operation for AWS Lambda. +// +// Returns the resource policy associated with the specified Lambda function. +// +// This action requires permission for the lambda:GetPolicy action. +// +// 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 Lambda's +// API operation GetPolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// The AWS Lambda service encountered an internal error. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource (for example, a Lambda function or access policy statement) +// specified in the request does not exist. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One of the parameters in the request is invalid. For example, if you provided +// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration +// API, that AWS Lambda is unable to assume you will get this exception. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/GetPolicy +func (c *Lambda) GetPolicy(input *GetPolicyInput) (*GetPolicyOutput, error) { + req, out := c.GetPolicyRequest(input) + return out, req.Send() +} + +// GetPolicyWithContext is the same as GetPolicy with the addition of +// the ability to pass a context and additional request options. +// +// See GetPolicy 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 *Lambda) GetPolicyWithContext(ctx aws.Context, input *GetPolicyInput, opts ...request.Option) (*GetPolicyOutput, error) { + req, out := c.GetPolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opInvoke = "Invoke" + +// InvokeRequest generates a "aws/request.Request" representing the +// client's request for the Invoke 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 Invoke for more information on using the Invoke +// 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 InvokeRequest method. +// req, resp := client.InvokeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/Invoke +func (c *Lambda) InvokeRequest(input *InvokeInput) (req *request.Request, output *InvokeOutput) { + op := &request.Operation{ + Name: opInvoke, + HTTPMethod: "POST", + HTTPPath: "/2015-03-31/functions/{FunctionName}/invocations", + } + + if input == nil { + input = &InvokeInput{} + } + + output = &InvokeOutput{} + req = c.newRequest(op, input, output) + return +} + +// Invoke API operation for AWS Lambda. +// +// Invokes a Lambda function. For an example, see Create the Lambda Function +// and Test It Manually (http://docs.aws.amazon.com/lambda/latest/dg/with-dynamodb-create-function.html#with-dbb-invoke-manually). +// +// Specify just a function name to invoke the latest version of the function. +// To invoke a published version, use the Qualifier parameter to specify a version +// or alias (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). +// +// If you use the RequestResponse (synchronous) invocation option, the function +// will be invoked only once. If you use the Event (asynchronous) invocation +// option, the function will be invoked at least once in response to an event +// and the function must be idempotent to handle this. +// +// For functions with a long timeout, your client may be disconnected during +// synchronous invocation while it waits for a response. Configure your HTTP +// client, SDK, firewall, proxy, or operating system to allow for long connections +// with timeout or keep-alive settings. +// +// This operation requires permission for the lambda:InvokeFunction action. +// +// The TooManyRequestsException noted below will return the following: ConcurrentInvocationLimitExceeded +// will be returned if you have no functions with reserved concurrency and have +// exceeded your account concurrent limit or if a function without reserved +// concurrency exceeds the account's unreserved concurrency limit. ReservedFunctionConcurrentInvocationLimitExceeded +// will be returned when a function with reserved concurrency exceeds its configured +// concurrency limit. +// +// 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 Lambda's +// API operation Invoke for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// The AWS Lambda service encountered an internal error. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource (for example, a Lambda function or access policy statement) +// specified in the request does not exist. +// +// * ErrCodeInvalidRequestContentException "InvalidRequestContentException" +// The request body could not be parsed as JSON. +// +// * ErrCodeRequestTooLargeException "RequestTooLargeException" +// The request payload exceeded the Invoke request body JSON input limit. For +// more information, see Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html). +// +// * ErrCodeUnsupportedMediaTypeException "UnsupportedMediaTypeException" +// The content type of the Invoke request body is not JSON. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One of the parameters in the request is invalid. For example, if you provided +// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration +// API, that AWS Lambda is unable to assume you will get this exception. +// +// * ErrCodeEC2UnexpectedException "EC2UnexpectedException" +// AWS Lambda received an unexpected EC2 client exception while setting up for +// the Lambda function. +// +// * ErrCodeSubnetIPAddressLimitReachedException "SubnetIPAddressLimitReachedException" +// AWS Lambda was not able to set up VPC access for the Lambda function because +// one or more configured subnets has no available IP addresses. +// +// * ErrCodeENILimitReachedException "ENILimitReachedException" +// AWS Lambda was not able to create an Elastic Network Interface (ENI) in the +// VPC, specified as part of Lambda function configuration, because the limit +// for network interfaces has been reached. +// +// * ErrCodeEC2ThrottledException "EC2ThrottledException" // AWS Lambda was throttled by Amazon EC2 during Lambda function initialization // using the execution role provided for the Lambda function. // // * ErrCodeEC2AccessDeniedException "EC2AccessDeniedException" +// Need additional permissions to configure VPC settings. // // * ErrCodeInvalidSubnetIDException "InvalidSubnetIDException" // The Subnet ID provided in the Lambda function VPC configuration is invalid. @@ -1532,7 +1883,7 @@ func (c *Lambda) InvokeRequest(input *InvokeInput) (req *request.Request, output // invalid. // // * ErrCodeInvalidZipFileException "InvalidZipFileException" -// AWS Lambda could not unzip the function zip file. +// AWS Lambda could not unzip the deployment package. // // * ErrCodeKMSDisabledException "KMSDisabledException" // Lambda was unable to decrypt the environment variables because the KMS key @@ -1580,7 +1931,7 @@ const opInvokeAsync = "InvokeAsync" // InvokeAsyncRequest generates a "aws/request.Request" representing the // client's request for the InvokeAsync operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1624,7 +1975,7 @@ func (c *Lambda) InvokeAsyncRequest(input *InvokeAsyncInput) (req *request.Reque // InvokeAsync API operation for AWS Lambda. // -// This API is deprecated. We recommend you use Invoke API (see Invoke). +// For asynchronous function invocation, use Invoke. // // Submits an invocation request to AWS Lambda. Upon receiving the request, // Lambda executes the specified function asynchronously. To see the logs generated @@ -1684,7 +2035,7 @@ const opListAliases = "ListAliases" // ListAliasesRequest generates a "aws/request.Request" representing the // client's request for the ListAliases operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1751,6 +2102,7 @@ func (c *Lambda) ListAliasesRequest(input *ListAliasesInput) (req *request.Reque // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListAliases func (c *Lambda) ListAliases(input *ListAliasesInput) (*ListAliasesOutput, error) { @@ -1779,7 +2131,7 @@ const opListEventSourceMappings = "ListEventSourceMappings" // ListEventSourceMappingsRequest generates a "aws/request.Request" representing the // client's request for the ListEventSourceMappings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1824,19 +2176,8 @@ func (c *Lambda) ListEventSourceMappingsRequest(input *ListEventSourceMappingsIn // ListEventSourceMappings API operation for AWS Lambda. // -// Returns a list of event source mappings you created using the CreateEventSourceMapping -// (see CreateEventSourceMapping). -// -// For each mapping, the API returns configuration information. You can optionally -// specify filters to retrieve specific event source mappings. -// -// If you are using the versioning feature, you can get list of event source -// mappings for a specific Lambda function version or an alias as described -// in the FunctionName parameter. For information about the versioning feature, -// see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). -// -// This operation requires permission for the lambda:ListEventSourceMappings -// action. +// Lists event source mappings. Specify an EventSourceArn to only show event +// source mappings for a single event source. // // 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 @@ -1859,6 +2200,7 @@ func (c *Lambda) ListEventSourceMappingsRequest(input *ListEventSourceMappingsIn // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListEventSourceMappings func (c *Lambda) ListEventSourceMappings(input *ListEventSourceMappingsInput) (*ListEventSourceMappingsOutput, error) { @@ -1937,7 +2279,7 @@ const opListFunctions = "ListFunctions" // ListFunctionsRequest generates a "aws/request.Request" representing the // client's request for the ListFunctions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2004,6 +2346,7 @@ func (c *Lambda) ListFunctionsRequest(input *ListFunctionsInput) (req *request.R // The AWS Lambda service encountered an internal error. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // One of the parameters in the request is invalid. For example, if you provided @@ -2082,246 +2425,243 @@ func (c *Lambda) ListFunctionsPagesWithContext(ctx aws.Context, input *ListFunct return p.Err() } -const opListTags = "ListTags" +const opListLayerVersions = "ListLayerVersions" -// ListTagsRequest generates a "aws/request.Request" representing the -// client's request for the ListTags operation. The "output" return +// ListLayerVersionsRequest generates a "aws/request.Request" representing the +// client's request for the ListLayerVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 ListTags for more information on using the ListTags +// See ListLayerVersions for more information on using the ListLayerVersions // 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 ListTagsRequest method. -// req, resp := client.ListTagsRequest(params) +// // Example sending a request using the ListLayerVersionsRequest method. +// req, resp := client.ListLayerVersionsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListTags -func (c *Lambda) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListLayerVersions +func (c *Lambda) ListLayerVersionsRequest(input *ListLayerVersionsInput) (req *request.Request, output *ListLayerVersionsOutput) { op := &request.Operation{ - Name: opListTags, + Name: opListLayerVersions, HTTPMethod: "GET", - HTTPPath: "/2017-03-31/tags/{ARN}", + HTTPPath: "/2018-10-31/layers/{LayerName}/versions", } if input == nil { - input = &ListTagsInput{} + input = &ListLayerVersionsInput{} } - output = &ListTagsOutput{} + output = &ListLayerVersionsOutput{} req = c.newRequest(op, input, output) return } -// ListTags API operation for AWS Lambda. +// ListLayerVersions API operation for AWS Lambda. // -// Returns a list of tags assigned to a function when supplied the function -// ARN (Amazon Resource Name). For more information on Tagging, see Tagging -// Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) -// in the AWS Lambda Developer Guide. +// Lists the versions of a function layer. Versions that have been deleted aren't +// listed. Specify a runtime identifier (http://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html) +// to list only versions that indicate that they're compatible with that runtime. // // 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 Lambda's -// API operation ListTags for usage and error information. +// API operation ListLayerVersions for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" // The AWS Lambda service encountered an internal error. // -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // One of the parameters in the request is invalid. For example, if you provided // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration // API, that AWS Lambda is unable to assume you will get this exception. // +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource (for example, a Lambda function or access policy statement) +// specified in the request does not exist. +// // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListTags -func (c *Lambda) ListTags(input *ListTagsInput) (*ListTagsOutput, error) { - req, out := c.ListTagsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListLayerVersions +func (c *Lambda) ListLayerVersions(input *ListLayerVersionsInput) (*ListLayerVersionsOutput, error) { + req, out := c.ListLayerVersionsRequest(input) return out, req.Send() } -// ListTagsWithContext is the same as ListTags with the addition of +// ListLayerVersionsWithContext is the same as ListLayerVersions with the addition of // the ability to pass a context and additional request options. // -// See ListTags for details on how to use this API operation. +// See ListLayerVersions 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 *Lambda) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) { - req, out := c.ListTagsRequest(input) +func (c *Lambda) ListLayerVersionsWithContext(ctx aws.Context, input *ListLayerVersionsInput, opts ...request.Option) (*ListLayerVersionsOutput, error) { + req, out := c.ListLayerVersionsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opListVersionsByFunction = "ListVersionsByFunction" +const opListLayers = "ListLayers" -// ListVersionsByFunctionRequest generates a "aws/request.Request" representing the -// client's request for the ListVersionsByFunction operation. The "output" return +// ListLayersRequest generates a "aws/request.Request" representing the +// client's request for the ListLayers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 ListVersionsByFunction for more information on using the ListVersionsByFunction +// See ListLayers for more information on using the ListLayers // 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 ListVersionsByFunctionRequest method. -// req, resp := client.ListVersionsByFunctionRequest(params) +// // Example sending a request using the ListLayersRequest method. +// req, resp := client.ListLayersRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListVersionsByFunction -func (c *Lambda) ListVersionsByFunctionRequest(input *ListVersionsByFunctionInput) (req *request.Request, output *ListVersionsByFunctionOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListLayers +func (c *Lambda) ListLayersRequest(input *ListLayersInput) (req *request.Request, output *ListLayersOutput) { op := &request.Operation{ - Name: opListVersionsByFunction, + Name: opListLayers, HTTPMethod: "GET", - HTTPPath: "/2015-03-31/functions/{FunctionName}/versions", + HTTPPath: "/2018-10-31/layers", } if input == nil { - input = &ListVersionsByFunctionInput{} + input = &ListLayersInput{} } - output = &ListVersionsByFunctionOutput{} + output = &ListLayersOutput{} req = c.newRequest(op, input, output) return } -// ListVersionsByFunction API operation for AWS Lambda. +// ListLayers API operation for AWS Lambda. // -// List all versions of a function. For information about the versioning feature, -// see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). +// Lists function layers and shows information about the latest version of each. +// Specify a runtime identifier (http://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html) +// to list only layers that indicate that they're compatible with that runtime. // // 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 Lambda's -// API operation ListVersionsByFunction for usage and error information. +// API operation ListLayers for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" // The AWS Lambda service encountered an internal error. // -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // One of the parameters in the request is invalid. For example, if you provided // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListVersionsByFunction -func (c *Lambda) ListVersionsByFunction(input *ListVersionsByFunctionInput) (*ListVersionsByFunctionOutput, error) { - req, out := c.ListVersionsByFunctionRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListLayers +func (c *Lambda) ListLayers(input *ListLayersInput) (*ListLayersOutput, error) { + req, out := c.ListLayersRequest(input) return out, req.Send() } -// ListVersionsByFunctionWithContext is the same as ListVersionsByFunction with the addition of +// ListLayersWithContext is the same as ListLayers with the addition of // the ability to pass a context and additional request options. // -// See ListVersionsByFunction for details on how to use this API operation. +// See ListLayers 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 *Lambda) ListVersionsByFunctionWithContext(ctx aws.Context, input *ListVersionsByFunctionInput, opts ...request.Option) (*ListVersionsByFunctionOutput, error) { - req, out := c.ListVersionsByFunctionRequest(input) +func (c *Lambda) ListLayersWithContext(ctx aws.Context, input *ListLayersInput, opts ...request.Option) (*ListLayersOutput, error) { + req, out := c.ListLayersRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opPublishVersion = "PublishVersion" +const opListTags = "ListTags" -// PublishVersionRequest generates a "aws/request.Request" representing the -// client's request for the PublishVersion operation. The "output" return +// ListTagsRequest generates a "aws/request.Request" representing the +// client's request for the ListTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 PublishVersion for more information on using the PublishVersion +// See ListTags for more information on using the ListTags // 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 PublishVersionRequest method. -// req, resp := client.PublishVersionRequest(params) +// // Example sending a request using the ListTagsRequest method. +// req, resp := client.ListTagsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PublishVersion -func (c *Lambda) PublishVersionRequest(input *PublishVersionInput) (req *request.Request, output *FunctionConfiguration) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListTags +func (c *Lambda) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) { op := &request.Operation{ - Name: opPublishVersion, - HTTPMethod: "POST", - HTTPPath: "/2015-03-31/functions/{FunctionName}/versions", + Name: opListTags, + HTTPMethod: "GET", + HTTPPath: "/2017-03-31/tags/{ARN}", } if input == nil { - input = &PublishVersionInput{} + input = &ListTagsInput{} } - output = &FunctionConfiguration{} + output = &ListTagsOutput{} req = c.newRequest(op, input, output) return } -// PublishVersion API operation for AWS Lambda. +// ListTags API operation for AWS Lambda. // -// Publishes a version of your function from the current snapshot of $LATEST. -// That is, AWS Lambda takes a snapshot of the function code and configuration -// information from $LATEST and publishes a new version. The code and configuration -// cannot be modified after publication. For information about the versioning -// feature, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). +// Returns a list of tags assigned to a function when supplied the function +// ARN (Amazon Resource Name). For more information on Tagging, see Tagging +// Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) +// in the AWS Lambda Developer 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 AWS Lambda's -// API operation PublishVersion for usage and error information. +// API operation ListTags for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -2337,198 +2677,177 @@ func (c *Lambda) PublishVersionRequest(input *PublishVersionInput) (req *request // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // -// * ErrCodeCodeStorageExceededException "CodeStorageExceededException" -// You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html) -// -// * ErrCodePreconditionFailedException "PreconditionFailedException" -// The RevisionId provided does not match the latest RevisionId for the Lambda -// function or alias. Call the GetFunction or the GetAlias API to retrieve the -// latest RevisionId for your resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PublishVersion -func (c *Lambda) PublishVersion(input *PublishVersionInput) (*FunctionConfiguration, error) { - req, out := c.PublishVersionRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListTags +func (c *Lambda) ListTags(input *ListTagsInput) (*ListTagsOutput, error) { + req, out := c.ListTagsRequest(input) return out, req.Send() } -// PublishVersionWithContext is the same as PublishVersion with the addition of +// ListTagsWithContext is the same as ListTags with the addition of // the ability to pass a context and additional request options. // -// See PublishVersion for details on how to use this API operation. +// See ListTags 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 *Lambda) PublishVersionWithContext(ctx aws.Context, input *PublishVersionInput, opts ...request.Option) (*FunctionConfiguration, error) { - req, out := c.PublishVersionRequest(input) +func (c *Lambda) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) { + req, out := c.ListTagsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opPutFunctionConcurrency = "PutFunctionConcurrency" +const opListVersionsByFunction = "ListVersionsByFunction" -// PutFunctionConcurrencyRequest generates a "aws/request.Request" representing the -// client's request for the PutFunctionConcurrency operation. The "output" return +// ListVersionsByFunctionRequest generates a "aws/request.Request" representing the +// client's request for the ListVersionsByFunction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 PutFunctionConcurrency for more information on using the PutFunctionConcurrency +// See ListVersionsByFunction for more information on using the ListVersionsByFunction // 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 PutFunctionConcurrencyRequest method. -// req, resp := client.PutFunctionConcurrencyRequest(params) +// // Example sending a request using the ListVersionsByFunctionRequest method. +// req, resp := client.ListVersionsByFunctionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PutFunctionConcurrency -func (c *Lambda) PutFunctionConcurrencyRequest(input *PutFunctionConcurrencyInput) (req *request.Request, output *PutFunctionConcurrencyOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListVersionsByFunction +func (c *Lambda) ListVersionsByFunctionRequest(input *ListVersionsByFunctionInput) (req *request.Request, output *ListVersionsByFunctionOutput) { op := &request.Operation{ - Name: opPutFunctionConcurrency, - HTTPMethod: "PUT", - HTTPPath: "/2017-10-31/functions/{FunctionName}/concurrency", + Name: opListVersionsByFunction, + HTTPMethod: "GET", + HTTPPath: "/2015-03-31/functions/{FunctionName}/versions", } if input == nil { - input = &PutFunctionConcurrencyInput{} + input = &ListVersionsByFunctionInput{} } - output = &PutFunctionConcurrencyOutput{} + output = &ListVersionsByFunctionOutput{} req = c.newRequest(op, input, output) return } -// PutFunctionConcurrency API operation for AWS Lambda. +// ListVersionsByFunction API operation for AWS Lambda. // -// Sets a limit on the number of concurrent executions available to this function. -// It is a subset of your account's total concurrent execution limit per region. -// Note that Lambda automatically reserves a buffer of 100 concurrent executions -// for functions without any reserved concurrency limit. This means if your -// account limit is 1000, you have a total of 900 available to allocate to individual -// functions. For more information, see concurrent-executions. +// Lists all versions of a function. For information about versioning, see AWS +// Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.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. // // See the AWS API reference guide for AWS Lambda's -// API operation PutFunctionConcurrency for usage and error information. +// API operation ListVersionsByFunction for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" // The AWS Lambda service encountered an internal error. // +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource (for example, a Lambda function or access policy statement) +// specified in the request does not exist. +// // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // One of the parameters in the request is invalid. For example, if you provided // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration // API, that AWS Lambda is unable to assume you will get this exception. // -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PutFunctionConcurrency -func (c *Lambda) PutFunctionConcurrency(input *PutFunctionConcurrencyInput) (*PutFunctionConcurrencyOutput, error) { - req, out := c.PutFunctionConcurrencyRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/ListVersionsByFunction +func (c *Lambda) ListVersionsByFunction(input *ListVersionsByFunctionInput) (*ListVersionsByFunctionOutput, error) { + req, out := c.ListVersionsByFunctionRequest(input) return out, req.Send() } -// PutFunctionConcurrencyWithContext is the same as PutFunctionConcurrency with the addition of +// ListVersionsByFunctionWithContext is the same as ListVersionsByFunction with the addition of // the ability to pass a context and additional request options. // -// See PutFunctionConcurrency for details on how to use this API operation. +// See ListVersionsByFunction 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 *Lambda) PutFunctionConcurrencyWithContext(ctx aws.Context, input *PutFunctionConcurrencyInput, opts ...request.Option) (*PutFunctionConcurrencyOutput, error) { - req, out := c.PutFunctionConcurrencyRequest(input) +func (c *Lambda) ListVersionsByFunctionWithContext(ctx aws.Context, input *ListVersionsByFunctionInput, opts ...request.Option) (*ListVersionsByFunctionOutput, error) { + req, out := c.ListVersionsByFunctionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opRemovePermission = "RemovePermission" +const opPublishLayerVersion = "PublishLayerVersion" -// RemovePermissionRequest generates a "aws/request.Request" representing the -// client's request for the RemovePermission operation. The "output" return +// PublishLayerVersionRequest generates a "aws/request.Request" representing the +// client's request for the PublishLayerVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 RemovePermission for more information on using the RemovePermission +// See PublishLayerVersion for more information on using the PublishLayerVersion // 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 RemovePermissionRequest method. -// req, resp := client.RemovePermissionRequest(params) +// // Example sending a request using the PublishLayerVersionRequest method. +// req, resp := client.PublishLayerVersionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/RemovePermission -func (c *Lambda) RemovePermissionRequest(input *RemovePermissionInput) (req *request.Request, output *RemovePermissionOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PublishLayerVersion +func (c *Lambda) PublishLayerVersionRequest(input *PublishLayerVersionInput) (req *request.Request, output *PublishLayerVersionOutput) { op := &request.Operation{ - Name: opRemovePermission, - HTTPMethod: "DELETE", - HTTPPath: "/2015-03-31/functions/{FunctionName}/policy/{StatementId}", + Name: opPublishLayerVersion, + HTTPMethod: "POST", + HTTPPath: "/2018-10-31/layers/{LayerName}/versions", } if input == nil { - input = &RemovePermissionInput{} + input = &PublishLayerVersionInput{} } - output = &RemovePermissionOutput{} + output = &PublishLayerVersionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) return } -// RemovePermission API operation for AWS Lambda. +// PublishLayerVersion API operation for AWS Lambda. // -// You can remove individual permissions from an resource policy associated -// with a Lambda function by providing a statement ID that you provided when -// you added the permission. +// Creates a function layer from a ZIP archive. Each time you call PublishLayerVersion +// with the same version name, a new version is created. // -// If you are using versioning, the permissions you remove are specific to the -// Lambda function version or alias you specify in the AddPermission request -// via the Qualifier parameter. For more information about versioning, see AWS -// Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). -// -// Note that removal of a permission will cause an active event source to lose -// permission to the function. -// -// You need permission for the lambda:RemovePermission action. +// Add layers to your function with CreateFunction or UpdateFunctionConfiguration. // // 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 Lambda's -// API operation RemovePermission for usage and error information. +// API operation PublishLayerVersion for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -2538,98 +2857,95 @@ func (c *Lambda) RemovePermissionRequest(input *RemovePermissionInput) (req *req // The resource (for example, a Lambda function or access policy statement) // specified in the request does not exist. // +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded +// // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // One of the parameters in the request is invalid. For example, if you provided // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration // API, that AWS Lambda is unable to assume you will get this exception. // -// * ErrCodeTooManyRequestsException "TooManyRequestsException" -// -// * ErrCodePreconditionFailedException "PreconditionFailedException" -// The RevisionId provided does not match the latest RevisionId for the Lambda -// function or alias. Call the GetFunction or the GetAlias API to retrieve the -// latest RevisionId for your resource. +// * ErrCodeCodeStorageExceededException "CodeStorageExceededException" +// You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html) // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/RemovePermission -func (c *Lambda) RemovePermission(input *RemovePermissionInput) (*RemovePermissionOutput, error) { - req, out := c.RemovePermissionRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PublishLayerVersion +func (c *Lambda) PublishLayerVersion(input *PublishLayerVersionInput) (*PublishLayerVersionOutput, error) { + req, out := c.PublishLayerVersionRequest(input) return out, req.Send() } -// RemovePermissionWithContext is the same as RemovePermission with the addition of +// PublishLayerVersionWithContext is the same as PublishLayerVersion with the addition of // the ability to pass a context and additional request options. // -// See RemovePermission for details on how to use this API operation. +// See PublishLayerVersion 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 *Lambda) RemovePermissionWithContext(ctx aws.Context, input *RemovePermissionInput, opts ...request.Option) (*RemovePermissionOutput, error) { - req, out := c.RemovePermissionRequest(input) +func (c *Lambda) PublishLayerVersionWithContext(ctx aws.Context, input *PublishLayerVersionInput, opts ...request.Option) (*PublishLayerVersionOutput, error) { + req, out := c.PublishLayerVersionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opTagResource = "TagResource" +const opPublishVersion = "PublishVersion" -// TagResourceRequest generates a "aws/request.Request" representing the -// client's request for the TagResource operation. The "output" return +// PublishVersionRequest generates a "aws/request.Request" representing the +// client's request for the PublishVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 TagResource for more information on using the TagResource +// See PublishVersion for more information on using the PublishVersion // 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 TagResourceRequest method. -// req, resp := client.TagResourceRequest(params) +// // Example sending a request using the PublishVersionRequest method. +// req, resp := client.PublishVersionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/TagResource -func (c *Lambda) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PublishVersion +func (c *Lambda) PublishVersionRequest(input *PublishVersionInput) (req *request.Request, output *FunctionConfiguration) { op := &request.Operation{ - Name: opTagResource, + Name: opPublishVersion, HTTPMethod: "POST", - HTTPPath: "/2017-03-31/tags/{ARN}", + HTTPPath: "/2015-03-31/functions/{FunctionName}/versions", } if input == nil { - input = &TagResourceInput{} + input = &PublishVersionInput{} } - output = &TagResourceOutput{} + output = &FunctionConfiguration{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) return } -// TagResource API operation for AWS Lambda. +// PublishVersion API operation for AWS Lambda. // -// Creates a list of tags (key-value pairs) on the Lambda function. Requires -// the Lambda function ARN (Amazon Resource Name). If a key is specified without -// a value, Lambda creates a tag with the specified key and a value of null. -// For more information, see Tagging Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) -// in the AWS Lambda Developer Guide. +// Publishes a version of your function from the current snapshot of $LATEST. +// That is, AWS Lambda takes a snapshot of the function code and configuration +// information from $LATEST and publishes a new version. The code and configuration +// cannot be modified after publication. For information about the versioning +// feature, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.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. // // See the AWS API reference guide for AWS Lambda's -// API operation TagResource for usage and error information. +// API operation PublishVersion for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -2645,179 +2961,188 @@ func (c *Lambda) TagResourceRequest(input *TagResourceInput) (req *request.Reque // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/TagResource -func (c *Lambda) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { - req, out := c.TagResourceRequest(input) +// * ErrCodeCodeStorageExceededException "CodeStorageExceededException" +// You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html) +// +// * ErrCodePreconditionFailedException "PreconditionFailedException" +// The RevisionId provided does not match the latest RevisionId for the Lambda +// function or alias. Call the GetFunction or the GetAlias API to retrieve the +// latest RevisionId for your resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PublishVersion +func (c *Lambda) PublishVersion(input *PublishVersionInput) (*FunctionConfiguration, error) { + req, out := c.PublishVersionRequest(input) return out, req.Send() } -// TagResourceWithContext is the same as TagResource with the addition of +// PublishVersionWithContext is the same as PublishVersion with the addition of // the ability to pass a context and additional request options. // -// See TagResource for details on how to use this API operation. +// See PublishVersion 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 *Lambda) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { - req, out := c.TagResourceRequest(input) +func (c *Lambda) PublishVersionWithContext(ctx aws.Context, input *PublishVersionInput, opts ...request.Option) (*FunctionConfiguration, error) { + req, out := c.PublishVersionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUntagResource = "UntagResource" +const opPutFunctionConcurrency = "PutFunctionConcurrency" -// UntagResourceRequest generates a "aws/request.Request" representing the -// client's request for the UntagResource operation. The "output" return +// PutFunctionConcurrencyRequest generates a "aws/request.Request" representing the +// client's request for the PutFunctionConcurrency operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 UntagResource for more information on using the UntagResource +// See PutFunctionConcurrency for more information on using the PutFunctionConcurrency // 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 UntagResourceRequest method. -// req, resp := client.UntagResourceRequest(params) +// // Example sending a request using the PutFunctionConcurrencyRequest method. +// req, resp := client.PutFunctionConcurrencyRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UntagResource -func (c *Lambda) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PutFunctionConcurrency +func (c *Lambda) PutFunctionConcurrencyRequest(input *PutFunctionConcurrencyInput) (req *request.Request, output *PutFunctionConcurrencyOutput) { op := &request.Operation{ - Name: opUntagResource, - HTTPMethod: "DELETE", - HTTPPath: "/2017-03-31/tags/{ARN}", + Name: opPutFunctionConcurrency, + HTTPMethod: "PUT", + HTTPPath: "/2017-10-31/functions/{FunctionName}/concurrency", } if input == nil { - input = &UntagResourceInput{} + input = &PutFunctionConcurrencyInput{} } - output = &UntagResourceOutput{} + output = &PutFunctionConcurrencyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) return } -// UntagResource API operation for AWS Lambda. +// PutFunctionConcurrency API operation for AWS Lambda. // -// Removes tags from a Lambda function. Requires the function ARN (Amazon Resource -// Name). For more information, see Tagging Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) -// in the AWS Lambda Developer Guide. +// Sets a limit on the number of concurrent executions available to this function. +// It is a subset of your account's total concurrent execution limit per region. +// Note that Lambda automatically reserves a buffer of 100 concurrent executions +// for functions without any reserved concurrency limit. This means if your +// account limit is 1000, you have a total of 900 available to allocate to individual +// functions. For more information, see Managing Concurrency (http://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.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. // // See the AWS API reference guide for AWS Lambda's -// API operation UntagResource for usage and error information. +// API operation PutFunctionConcurrency for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" // The AWS Lambda service encountered an internal error. // -// * ErrCodeResourceNotFoundException "ResourceNotFoundException" -// The resource (for example, a Lambda function or access policy statement) -// specified in the request does not exist. -// // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // One of the parameters in the request is invalid. For example, if you provided // an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration // API, that AWS Lambda is unable to assume you will get this exception. // +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource (for example, a Lambda function or access policy statement) +// specified in the request does not exist. +// // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UntagResource -func (c *Lambda) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { - req, out := c.UntagResourceRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/PutFunctionConcurrency +func (c *Lambda) PutFunctionConcurrency(input *PutFunctionConcurrencyInput) (*PutFunctionConcurrencyOutput, error) { + req, out := c.PutFunctionConcurrencyRequest(input) return out, req.Send() } -// UntagResourceWithContext is the same as UntagResource with the addition of +// PutFunctionConcurrencyWithContext is the same as PutFunctionConcurrency with the addition of // the ability to pass a context and additional request options. // -// See UntagResource for details on how to use this API operation. +// See PutFunctionConcurrency 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 *Lambda) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { - req, out := c.UntagResourceRequest(input) +func (c *Lambda) PutFunctionConcurrencyWithContext(ctx aws.Context, input *PutFunctionConcurrencyInput, opts ...request.Option) (*PutFunctionConcurrencyOutput, error) { + req, out := c.PutFunctionConcurrencyRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUpdateAlias = "UpdateAlias" +const opRemoveLayerVersionPermission = "RemoveLayerVersionPermission" -// UpdateAliasRequest generates a "aws/request.Request" representing the -// client's request for the UpdateAlias operation. The "output" return +// RemoveLayerVersionPermissionRequest generates a "aws/request.Request" representing the +// client's request for the RemoveLayerVersionPermission operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 UpdateAlias for more information on using the UpdateAlias +// See RemoveLayerVersionPermission for more information on using the RemoveLayerVersionPermission // 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 UpdateAliasRequest method. -// req, resp := client.UpdateAliasRequest(params) +// // Example sending a request using the RemoveLayerVersionPermissionRequest method. +// req, resp := client.RemoveLayerVersionPermissionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateAlias -func (c *Lambda) UpdateAliasRequest(input *UpdateAliasInput) (req *request.Request, output *AliasConfiguration) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/RemoveLayerVersionPermission +func (c *Lambda) RemoveLayerVersionPermissionRequest(input *RemoveLayerVersionPermissionInput) (req *request.Request, output *RemoveLayerVersionPermissionOutput) { op := &request.Operation{ - Name: opUpdateAlias, - HTTPMethod: "PUT", - HTTPPath: "/2015-03-31/functions/{FunctionName}/aliases/{Name}", + Name: opRemoveLayerVersionPermission, + HTTPMethod: "DELETE", + HTTPPath: "/2018-10-31/layers/{LayerName}/versions/{VersionNumber}/policy/{StatementId}", } if input == nil { - input = &UpdateAliasInput{} + input = &RemoveLayerVersionPermissionInput{} } - output = &AliasConfiguration{} + output = &RemoveLayerVersionPermissionOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// UpdateAlias API operation for AWS Lambda. -// -// Using this API you can update the function version to which the alias points -// and the alias description. For more information, see Introduction to AWS -// Lambda Aliases (http://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html). +// RemoveLayerVersionPermission API operation for AWS Lambda. // -// This requires permission for the lambda:UpdateAlias action. +// Removes a statement from the permissions policy for a layer version. For +// more information, see AddLayerVersionPermission. // // 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 Lambda's -// API operation UpdateAlias for usage and error information. +// API operation RemoveLayerVersionPermission for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -2833,102 +3158,100 @@ func (c *Lambda) UpdateAliasRequest(input *UpdateAliasInput) (req *request.Reque // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // // * ErrCodePreconditionFailedException "PreconditionFailedException" // The RevisionId provided does not match the latest RevisionId for the Lambda // function or alias. Call the GetFunction or the GetAlias API to retrieve the // latest RevisionId for your resource. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateAlias -func (c *Lambda) UpdateAlias(input *UpdateAliasInput) (*AliasConfiguration, error) { - req, out := c.UpdateAliasRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/RemoveLayerVersionPermission +func (c *Lambda) RemoveLayerVersionPermission(input *RemoveLayerVersionPermissionInput) (*RemoveLayerVersionPermissionOutput, error) { + req, out := c.RemoveLayerVersionPermissionRequest(input) return out, req.Send() } -// UpdateAliasWithContext is the same as UpdateAlias with the addition of +// RemoveLayerVersionPermissionWithContext is the same as RemoveLayerVersionPermission with the addition of // the ability to pass a context and additional request options. // -// See UpdateAlias for details on how to use this API operation. +// See RemoveLayerVersionPermission 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 *Lambda) UpdateAliasWithContext(ctx aws.Context, input *UpdateAliasInput, opts ...request.Option) (*AliasConfiguration, error) { - req, out := c.UpdateAliasRequest(input) +func (c *Lambda) RemoveLayerVersionPermissionWithContext(ctx aws.Context, input *RemoveLayerVersionPermissionInput, opts ...request.Option) (*RemoveLayerVersionPermissionOutput, error) { + req, out := c.RemoveLayerVersionPermissionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUpdateEventSourceMapping = "UpdateEventSourceMapping" +const opRemovePermission = "RemovePermission" -// UpdateEventSourceMappingRequest generates a "aws/request.Request" representing the -// client's request for the UpdateEventSourceMapping operation. The "output" return +// RemovePermissionRequest generates a "aws/request.Request" representing the +// client's request for the RemovePermission operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 UpdateEventSourceMapping for more information on using the UpdateEventSourceMapping +// See RemovePermission for more information on using the RemovePermission // 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 UpdateEventSourceMappingRequest method. -// req, resp := client.UpdateEventSourceMappingRequest(params) +// // Example sending a request using the RemovePermissionRequest method. +// req, resp := client.RemovePermissionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateEventSourceMapping -func (c *Lambda) UpdateEventSourceMappingRequest(input *UpdateEventSourceMappingInput) (req *request.Request, output *EventSourceMappingConfiguration) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/RemovePermission +func (c *Lambda) RemovePermissionRequest(input *RemovePermissionInput) (req *request.Request, output *RemovePermissionOutput) { op := &request.Operation{ - Name: opUpdateEventSourceMapping, - HTTPMethod: "PUT", - HTTPPath: "/2015-03-31/event-source-mappings/{UUID}", + Name: opRemovePermission, + HTTPMethod: "DELETE", + HTTPPath: "/2015-03-31/functions/{FunctionName}/policy/{StatementId}", } if input == nil { - input = &UpdateEventSourceMappingInput{} + input = &RemovePermissionInput{} } - output = &EventSourceMappingConfiguration{} + output = &RemovePermissionOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// UpdateEventSourceMapping API operation for AWS Lambda. -// -// You can update an event source mapping. This is useful if you want to change -// the parameters of the existing mapping without losing your position in the -// stream. You can change which function will receive the stream records, but -// to change the stream itself, you must create a new mapping. +// RemovePermission API operation for AWS Lambda. // -// If you are using the versioning feature, you can update the event source -// mapping to map to a specific Lambda function version or alias as described -// in the FunctionName parameter. For information about the versioning feature, -// see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). +// Removes permissions from a function. You can remove individual permissions +// from an resource policy associated with a Lambda function by providing a +// statement ID that you provided when you added the permission. When you remove +// permissions, disable the event source mapping or trigger configuration first +// to avoid errors. // -// If you disable the event source mapping, AWS Lambda stops polling. If you -// enable again, it will resume polling from the time it had stopped polling, -// so you don't lose processing of any records. However, if you delete event -// source mapping and create it again, it will reset. +// Permissions apply to the Amazon Resource Name (ARN) used to invoke the function, +// which can be unqualified (the unpublished version of the function), or include +// a version or alias. If a client uses a version or alias to invoke a function, +// use the Qualifier parameter to apply permissions to that ARN. For more information +// about versioning, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). // -// This operation requires permission for the lambda:UpdateEventSourceMapping -// action. +// You need permission for the lambda:RemovePermission action. // // 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 Lambda's -// API operation UpdateEventSourceMapping for usage and error information. +// API operation RemovePermission for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -2944,97 +3267,92 @@ func (c *Lambda) UpdateEventSourceMappingRequest(input *UpdateEventSourceMapping // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // -// * ErrCodeResourceConflictException "ResourceConflictException" -// The resource already exists. -// -// * ErrCodeResourceInUseException "ResourceInUseException" -// The operation conflicts with the resource's availability. For example, you -// attempted to update an EventSoure Mapping in CREATING, or tried to delete -// a EventSoure mapping currently in the UPDATING state. +// * ErrCodePreconditionFailedException "PreconditionFailedException" +// The RevisionId provided does not match the latest RevisionId for the Lambda +// function or alias. Call the GetFunction or the GetAlias API to retrieve the +// latest RevisionId for your resource. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateEventSourceMapping -func (c *Lambda) UpdateEventSourceMapping(input *UpdateEventSourceMappingInput) (*EventSourceMappingConfiguration, error) { - req, out := c.UpdateEventSourceMappingRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/RemovePermission +func (c *Lambda) RemovePermission(input *RemovePermissionInput) (*RemovePermissionOutput, error) { + req, out := c.RemovePermissionRequest(input) return out, req.Send() } -// UpdateEventSourceMappingWithContext is the same as UpdateEventSourceMapping with the addition of +// RemovePermissionWithContext is the same as RemovePermission with the addition of // the ability to pass a context and additional request options. // -// See UpdateEventSourceMapping for details on how to use this API operation. +// See RemovePermission 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 *Lambda) UpdateEventSourceMappingWithContext(ctx aws.Context, input *UpdateEventSourceMappingInput, opts ...request.Option) (*EventSourceMappingConfiguration, error) { - req, out := c.UpdateEventSourceMappingRequest(input) +func (c *Lambda) RemovePermissionWithContext(ctx aws.Context, input *RemovePermissionInput, opts ...request.Option) (*RemovePermissionOutput, error) { + req, out := c.RemovePermissionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUpdateFunctionCode = "UpdateFunctionCode" +const opTagResource = "TagResource" -// UpdateFunctionCodeRequest generates a "aws/request.Request" representing the -// client's request for the UpdateFunctionCode operation. The "output" return +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 UpdateFunctionCode for more information on using the UpdateFunctionCode +// See TagResource for more information on using the TagResource // 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 UpdateFunctionCodeRequest method. -// req, resp := client.UpdateFunctionCodeRequest(params) +// // Example sending a request using the TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionCode -func (c *Lambda) UpdateFunctionCodeRequest(input *UpdateFunctionCodeInput) (req *request.Request, output *FunctionConfiguration) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/TagResource +func (c *Lambda) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { op := &request.Operation{ - Name: opUpdateFunctionCode, - HTTPMethod: "PUT", - HTTPPath: "/2015-03-31/functions/{FunctionName}/code", + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/2017-03-31/tags/{ARN}", } if input == nil { - input = &UpdateFunctionCodeInput{} + input = &TagResourceInput{} } - output = &FunctionConfiguration{} + output = &TagResourceOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// UpdateFunctionCode API operation for AWS Lambda. -// -// Updates the code for the specified Lambda function. This operation must only -// be used on an existing Lambda function and cannot be used to update the function -// configuration. -// -// If you are using the versioning feature, note this API will always update -// the $LATEST version of your Lambda function. For information about the versioning -// feature, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). +// TagResource API operation for AWS Lambda. // -// This operation requires permission for the lambda:UpdateFunctionCode action. +// Creates a list of tags (key-value pairs) on the Lambda function. Requires +// the Lambda function ARN (Amazon Resource Name). If a key is specified without +// a value, Lambda creates a tag with the specified key and a value of null. +// For more information, see Tagging Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) +// in the AWS Lambda Developer 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 AWS Lambda's -// API operation UpdateFunctionCode for usage and error information. +// API operation TagResource for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -3050,99 +3368,85 @@ func (c *Lambda) UpdateFunctionCodeRequest(input *UpdateFunctionCodeInput) (req // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // -// * ErrCodeCodeStorageExceededException "CodeStorageExceededException" -// You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html) -// -// * ErrCodePreconditionFailedException "PreconditionFailedException" -// The RevisionId provided does not match the latest RevisionId for the Lambda -// function or alias. Call the GetFunction or the GetAlias API to retrieve the -// latest RevisionId for your resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionCode -func (c *Lambda) UpdateFunctionCode(input *UpdateFunctionCodeInput) (*FunctionConfiguration, error) { - req, out := c.UpdateFunctionCodeRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/TagResource +func (c *Lambda) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) return out, req.Send() } -// UpdateFunctionCodeWithContext is the same as UpdateFunctionCode with the addition of +// TagResourceWithContext is the same as TagResource with the addition of // the ability to pass a context and additional request options. // -// See UpdateFunctionCode for details on how to use this API operation. +// See TagResource 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 *Lambda) UpdateFunctionCodeWithContext(ctx aws.Context, input *UpdateFunctionCodeInput, opts ...request.Option) (*FunctionConfiguration, error) { - req, out := c.UpdateFunctionCodeRequest(input) +func (c *Lambda) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUpdateFunctionConfiguration = "UpdateFunctionConfiguration" +const opUntagResource = "UntagResource" -// UpdateFunctionConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the UpdateFunctionConfiguration operation. The "output" return +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 UpdateFunctionConfiguration for more information on using the UpdateFunctionConfiguration +// See UntagResource for more information on using the UntagResource // 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 UpdateFunctionConfigurationRequest method. -// req, resp := client.UpdateFunctionConfigurationRequest(params) +// // Example sending a request using the UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionConfiguration -func (c *Lambda) UpdateFunctionConfigurationRequest(input *UpdateFunctionConfigurationInput) (req *request.Request, output *FunctionConfiguration) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UntagResource +func (c *Lambda) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { op := &request.Operation{ - Name: opUpdateFunctionConfiguration, - HTTPMethod: "PUT", - HTTPPath: "/2015-03-31/functions/{FunctionName}/configuration", + Name: opUntagResource, + HTTPMethod: "DELETE", + HTTPPath: "/2017-03-31/tags/{ARN}", } if input == nil { - input = &UpdateFunctionConfigurationInput{} + input = &UntagResourceInput{} } - output = &FunctionConfiguration{} + output = &UntagResourceOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// UpdateFunctionConfiguration API operation for AWS Lambda. -// -// Updates the configuration parameters for the specified Lambda function by -// using the values provided in the request. You provide only the parameters -// you want to change. This operation must only be used on an existing Lambda -// function and cannot be used to update the function's code. -// -// If you are using the versioning feature, note this API will always update -// the $LATEST version of your Lambda function. For information about the versioning -// feature, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). +// UntagResource API operation for AWS Lambda. // -// This operation requires permission for the lambda:UpdateFunctionConfiguration -// action. +// Removes tags from a Lambda function. Requires the function ARN (Amazon Resource +// Name). For more information, see Tagging Lambda Functions (http://docs.aws.amazon.com/lambda/latest/dg/tagging.html) +// in the AWS Lambda Developer 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 AWS Lambda's -// API operation UpdateFunctionConfiguration for usage and error information. +// API operation UntagResource for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -3158,65 +3462,473 @@ func (c *Lambda) UpdateFunctionConfigurationRequest(input *UpdateFunctionConfigu // API, that AWS Lambda is unable to assume you will get this exception. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded // -// * ErrCodeResourceConflictException "ResourceConflictException" -// The resource already exists. -// -// * ErrCodePreconditionFailedException "PreconditionFailedException" -// The RevisionId provided does not match the latest RevisionId for the Lambda -// function or alias. Call the GetFunction or the GetAlias API to retrieve the -// latest RevisionId for your resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionConfiguration -func (c *Lambda) UpdateFunctionConfiguration(input *UpdateFunctionConfigurationInput) (*FunctionConfiguration, error) { - req, out := c.UpdateFunctionConfigurationRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UntagResource +func (c *Lambda) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) return out, req.Send() } -// UpdateFunctionConfigurationWithContext is the same as UpdateFunctionConfiguration with the addition of +// UntagResourceWithContext is the same as UntagResource with the addition of // the ability to pass a context and additional request options. // -// See UpdateFunctionConfiguration for details on how to use this API operation. +// See UntagResource 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 *Lambda) UpdateFunctionConfigurationWithContext(ctx aws.Context, input *UpdateFunctionConfigurationInput, opts ...request.Option) (*FunctionConfiguration, error) { - req, out := c.UpdateFunctionConfigurationRequest(input) +func (c *Lambda) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// Provides limits of code size and concurrency associated with the current -// account and region. -type AccountLimit struct { - _ struct{} `type:"structure"` - - // Size, in bytes, of code/dependencies that you can zip into a deployment package - // (uncompressed zip/jar size) for uploading. The default limit is 250 MB. - CodeSizeUnzipped *int64 `type:"long"` - - // Size, in bytes, of a single zipped code/dependencies package you can upload - // for your Lambda function(.zip/.jar file). Try using Amazon S3 for uploading - // larger files. Default limit is 50 MB. - CodeSizeZipped *int64 `type:"long"` - - // Number of simultaneous executions of your function per region. For more information - // or to request a limit increase for concurrent executions, see Lambda Function - // Concurrent Executions (http://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html). - // The default limit is 1000. - ConcurrentExecutions *int64 `type:"integer"` - - // Maximum size, in bytes, of a code package you can upload per region. The - // default size is 75 GB. - TotalCodeSize *int64 `type:"long"` +const opUpdateAlias = "UpdateAlias" - // The number of concurrent executions available to functions that do not have - // concurrency limits set. For more information, see concurrent-executions. - UnreservedConcurrentExecutions *int64 `type:"integer"` -} +// UpdateAliasRequest generates a "aws/request.Request" representing the +// client's request for the UpdateAlias 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 UpdateAlias for more information on using the UpdateAlias +// 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 UpdateAliasRequest method. +// req, resp := client.UpdateAliasRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateAlias +func (c *Lambda) UpdateAliasRequest(input *UpdateAliasInput) (req *request.Request, output *AliasConfiguration) { + op := &request.Operation{ + Name: opUpdateAlias, + HTTPMethod: "PUT", + HTTPPath: "/2015-03-31/functions/{FunctionName}/aliases/{Name}", + } + + if input == nil { + input = &UpdateAliasInput{} + } + + output = &AliasConfiguration{} + req = c.newRequest(op, input, output) + return +} + +// UpdateAlias API operation for AWS Lambda. +// +// Using this API you can update the function version to which the alias points +// and the alias description. For more information, see Introduction to AWS +// Lambda Aliases (http://docs.aws.amazon.com/lambda/latest/dg/aliases-intro.html). +// +// This requires permission for the lambda:UpdateAlias action. +// +// 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 Lambda's +// API operation UpdateAlias for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// The AWS Lambda service encountered an internal error. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource (for example, a Lambda function or access policy statement) +// specified in the request does not exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One of the parameters in the request is invalid. For example, if you provided +// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration +// API, that AWS Lambda is unable to assume you will get this exception. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded +// +// * ErrCodePreconditionFailedException "PreconditionFailedException" +// The RevisionId provided does not match the latest RevisionId for the Lambda +// function or alias. Call the GetFunction or the GetAlias API to retrieve the +// latest RevisionId for your resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateAlias +func (c *Lambda) UpdateAlias(input *UpdateAliasInput) (*AliasConfiguration, error) { + req, out := c.UpdateAliasRequest(input) + return out, req.Send() +} + +// UpdateAliasWithContext is the same as UpdateAlias with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateAlias 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 *Lambda) UpdateAliasWithContext(ctx aws.Context, input *UpdateAliasInput, opts ...request.Option) (*AliasConfiguration, error) { + req, out := c.UpdateAliasRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateEventSourceMapping = "UpdateEventSourceMapping" + +// UpdateEventSourceMappingRequest generates a "aws/request.Request" representing the +// client's request for the UpdateEventSourceMapping 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 UpdateEventSourceMapping for more information on using the UpdateEventSourceMapping +// 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 UpdateEventSourceMappingRequest method. +// req, resp := client.UpdateEventSourceMappingRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateEventSourceMapping +func (c *Lambda) UpdateEventSourceMappingRequest(input *UpdateEventSourceMappingInput) (req *request.Request, output *EventSourceMappingConfiguration) { + op := &request.Operation{ + Name: opUpdateEventSourceMapping, + HTTPMethod: "PUT", + HTTPPath: "/2015-03-31/event-source-mappings/{UUID}", + } + + if input == nil { + input = &UpdateEventSourceMappingInput{} + } + + output = &EventSourceMappingConfiguration{} + req = c.newRequest(op, input, output) + return +} + +// UpdateEventSourceMapping API operation for AWS Lambda. +// +// Updates an event source mapping. You can change the function that AWS Lambda +// invokes, or pause invocation and resume later from the same location. +// +// 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 Lambda's +// API operation UpdateEventSourceMapping for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// The AWS Lambda service encountered an internal error. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource (for example, a Lambda function or access policy statement) +// specified in the request does not exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One of the parameters in the request is invalid. For example, if you provided +// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration +// API, that AWS Lambda is unable to assume you will get this exception. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded +// +// * ErrCodeResourceConflictException "ResourceConflictException" +// The resource already exists. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// The operation conflicts with the resource's availability. For example, you +// attempted to update an EventSoure Mapping in CREATING, or tried to delete +// a EventSoure mapping currently in the UPDATING state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateEventSourceMapping +func (c *Lambda) UpdateEventSourceMapping(input *UpdateEventSourceMappingInput) (*EventSourceMappingConfiguration, error) { + req, out := c.UpdateEventSourceMappingRequest(input) + return out, req.Send() +} + +// UpdateEventSourceMappingWithContext is the same as UpdateEventSourceMapping with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateEventSourceMapping 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 *Lambda) UpdateEventSourceMappingWithContext(ctx aws.Context, input *UpdateEventSourceMappingInput, opts ...request.Option) (*EventSourceMappingConfiguration, error) { + req, out := c.UpdateEventSourceMappingRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateFunctionCode = "UpdateFunctionCode" + +// UpdateFunctionCodeRequest generates a "aws/request.Request" representing the +// client's request for the UpdateFunctionCode 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 UpdateFunctionCode for more information on using the UpdateFunctionCode +// 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 UpdateFunctionCodeRequest method. +// req, resp := client.UpdateFunctionCodeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionCode +func (c *Lambda) UpdateFunctionCodeRequest(input *UpdateFunctionCodeInput) (req *request.Request, output *FunctionConfiguration) { + op := &request.Operation{ + Name: opUpdateFunctionCode, + HTTPMethod: "PUT", + HTTPPath: "/2015-03-31/functions/{FunctionName}/code", + } + + if input == nil { + input = &UpdateFunctionCodeInput{} + } + + output = &FunctionConfiguration{} + req = c.newRequest(op, input, output) + return +} + +// UpdateFunctionCode API operation for AWS Lambda. +// +// Updates the code for the specified Lambda function. This operation must only +// be used on an existing Lambda function and cannot be used to update the function +// configuration. +// +// If you are using the versioning feature, note this API will always update +// the $LATEST version of your Lambda function. For information about the versioning +// feature, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). +// +// This operation requires permission for the lambda:UpdateFunctionCode action. +// +// 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 Lambda's +// API operation UpdateFunctionCode for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// The AWS Lambda service encountered an internal error. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource (for example, a Lambda function or access policy statement) +// specified in the request does not exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One of the parameters in the request is invalid. For example, if you provided +// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration +// API, that AWS Lambda is unable to assume you will get this exception. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded +// +// * ErrCodeCodeStorageExceededException "CodeStorageExceededException" +// You have exceeded your maximum total code size per account. Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html) +// +// * ErrCodePreconditionFailedException "PreconditionFailedException" +// The RevisionId provided does not match the latest RevisionId for the Lambda +// function or alias. Call the GetFunction or the GetAlias API to retrieve the +// latest RevisionId for your resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionCode +func (c *Lambda) UpdateFunctionCode(input *UpdateFunctionCodeInput) (*FunctionConfiguration, error) { + req, out := c.UpdateFunctionCodeRequest(input) + return out, req.Send() +} + +// UpdateFunctionCodeWithContext is the same as UpdateFunctionCode with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateFunctionCode 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 *Lambda) UpdateFunctionCodeWithContext(ctx aws.Context, input *UpdateFunctionCodeInput, opts ...request.Option) (*FunctionConfiguration, error) { + req, out := c.UpdateFunctionCodeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateFunctionConfiguration = "UpdateFunctionConfiguration" + +// UpdateFunctionConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the UpdateFunctionConfiguration 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 UpdateFunctionConfiguration for more information on using the UpdateFunctionConfiguration +// 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 UpdateFunctionConfigurationRequest method. +// req, resp := client.UpdateFunctionConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionConfiguration +func (c *Lambda) UpdateFunctionConfigurationRequest(input *UpdateFunctionConfigurationInput) (req *request.Request, output *FunctionConfiguration) { + op := &request.Operation{ + Name: opUpdateFunctionConfiguration, + HTTPMethod: "PUT", + HTTPPath: "/2015-03-31/functions/{FunctionName}/configuration", + } + + if input == nil { + input = &UpdateFunctionConfigurationInput{} + } + + output = &FunctionConfiguration{} + req = c.newRequest(op, input, output) + return +} + +// UpdateFunctionConfiguration API operation for AWS Lambda. +// +// Updates the configuration parameters for the specified Lambda function by +// using the values provided in the request. You provide only the parameters +// you want to change. This operation must only be used on an existing Lambda +// function and cannot be used to update the function's code. +// +// If you are using the versioning feature, note this API will always update +// the $LATEST version of your Lambda function. For information about the versioning +// feature, see AWS Lambda Function Versioning and Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html). +// +// This operation requires permission for the lambda:UpdateFunctionConfiguration +// action. +// +// 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 Lambda's +// API operation UpdateFunctionConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// The AWS Lambda service encountered an internal error. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource (for example, a Lambda function or access policy statement) +// specified in the request does not exist. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValueException" +// One of the parameters in the request is invalid. For example, if you provided +// an IAM role for AWS Lambda to assume in the CreateFunction or the UpdateFunctionConfiguration +// API, that AWS Lambda is unable to assume you will get this exception. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Request throughput limit exceeded +// +// * ErrCodeResourceConflictException "ResourceConflictException" +// The resource already exists. +// +// * ErrCodePreconditionFailedException "PreconditionFailedException" +// The RevisionId provided does not match the latest RevisionId for the Lambda +// function or alias. Call the GetFunction or the GetAlias API to retrieve the +// latest RevisionId for your resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lambda-2015-03-31/UpdateFunctionConfiguration +func (c *Lambda) UpdateFunctionConfiguration(input *UpdateFunctionConfigurationInput) (*FunctionConfiguration, error) { + req, out := c.UpdateFunctionConfigurationRequest(input) + return out, req.Send() +} + +// UpdateFunctionConfigurationWithContext is the same as UpdateFunctionConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateFunctionConfiguration 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 *Lambda) UpdateFunctionConfigurationWithContext(ctx aws.Context, input *UpdateFunctionConfigurationInput, opts ...request.Option) (*FunctionConfiguration, error) { + req, out := c.UpdateFunctionConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// Provides limits of code size and concurrency associated with the current +// account and region. For more information or to request a limit increase for +// concurrent executions, see Lambda Limits (http://docs.aws.amazon.com/lambda/latest/dg/limits.html). +type AccountLimit struct { + _ struct{} `type:"structure"` + + // Size, in bytes, of code/dependencies that you can zip into a deployment package + // (uncompressed zip/jar size) for uploading. The default limit is 250 MB. + CodeSizeUnzipped *int64 `type:"long"` + + // Size, in bytes, of a single zipped code/dependencies package you can upload + // for your Lambda function(.zip/.jar file). Try using Amazon S3 for uploading + // larger files. Default limit is 50 MB. + CodeSizeZipped *int64 `type:"long"` + + // Number of simultaneous executions of your function per region. The default + // limit is 1000. + ConcurrentExecutions *int64 `type:"integer"` + + // Maximum size, in bytes, of a code package you can upload per region. The + // default size is 75 GB. + TotalCodeSize *int64 `type:"long"` + + // The number of concurrent executions available to functions that do not have + // concurrency limits set. For more information, see Managing Concurrency (http://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html). + UnreservedConcurrentExecutions *int64 `type:"integer"` +} // String returns the string representation func (s AccountLimit) String() string { @@ -3292,6 +4004,159 @@ func (s *AccountUsage) SetTotalCodeSize(v int64) *AccountUsage { return s } +type AddLayerVersionPermissionInput struct { + _ struct{} `type:"structure"` + + // The API action that grants access to the layer. For example, lambda:GetLayerVersion. + // + // Action is a required field + Action *string `type:"string" required:"true"` + + // The name of the layer. + // + // LayerName is a required field + LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"` + + // With the principal set to *, grant permission to all accounts in the specified + // organization. + OrganizationId *string `type:"string"` + + // An account ID, or * to grant permission to all AWS accounts. + // + // Principal is a required field + Principal *string `type:"string" required:"true"` + + // Only update the policy if the revision ID matches the ID specified. Use this + // option to avoid modifying a policy that has changed since you last read it. + RevisionId *string `location:"querystring" locationName:"RevisionId" type:"string"` + + // An identifier that distinguishes the policy from others on the same layer + // version. + // + // StatementId is a required field + StatementId *string `min:"1" type:"string" required:"true"` + + // The version number. + // + // VersionNumber is a required field + VersionNumber *int64 `location:"uri" locationName:"VersionNumber" type:"long" required:"true"` +} + +// String returns the string representation +func (s AddLayerVersionPermissionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddLayerVersionPermissionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AddLayerVersionPermissionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AddLayerVersionPermissionInput"} + if s.Action == nil { + invalidParams.Add(request.NewErrParamRequired("Action")) + } + if s.LayerName == nil { + invalidParams.Add(request.NewErrParamRequired("LayerName")) + } + if s.LayerName != nil && len(*s.LayerName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LayerName", 1)) + } + if s.Principal == nil { + invalidParams.Add(request.NewErrParamRequired("Principal")) + } + if s.StatementId == nil { + invalidParams.Add(request.NewErrParamRequired("StatementId")) + } + if s.StatementId != nil && len(*s.StatementId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StatementId", 1)) + } + if s.VersionNumber == nil { + invalidParams.Add(request.NewErrParamRequired("VersionNumber")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAction sets the Action field's value. +func (s *AddLayerVersionPermissionInput) SetAction(v string) *AddLayerVersionPermissionInput { + s.Action = &v + return s +} + +// SetLayerName sets the LayerName field's value. +func (s *AddLayerVersionPermissionInput) SetLayerName(v string) *AddLayerVersionPermissionInput { + s.LayerName = &v + return s +} + +// SetOrganizationId sets the OrganizationId field's value. +func (s *AddLayerVersionPermissionInput) SetOrganizationId(v string) *AddLayerVersionPermissionInput { + s.OrganizationId = &v + return s +} + +// SetPrincipal sets the Principal field's value. +func (s *AddLayerVersionPermissionInput) SetPrincipal(v string) *AddLayerVersionPermissionInput { + s.Principal = &v + return s +} + +// SetRevisionId sets the RevisionId field's value. +func (s *AddLayerVersionPermissionInput) SetRevisionId(v string) *AddLayerVersionPermissionInput { + s.RevisionId = &v + return s +} + +// SetStatementId sets the StatementId field's value. +func (s *AddLayerVersionPermissionInput) SetStatementId(v string) *AddLayerVersionPermissionInput { + s.StatementId = &v + return s +} + +// SetVersionNumber sets the VersionNumber field's value. +func (s *AddLayerVersionPermissionInput) SetVersionNumber(v int64) *AddLayerVersionPermissionInput { + s.VersionNumber = &v + return s +} + +type AddLayerVersionPermissionOutput struct { + _ struct{} `type:"structure"` + + // A unique identifier for the current revision of the policy. + RevisionId *string `type:"string"` + + // The permission statement. + Statement *string `type:"string"` +} + +// String returns the string representation +func (s AddLayerVersionPermissionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddLayerVersionPermissionOutput) GoString() string { + return s.String() +} + +// SetRevisionId sets the RevisionId field's value. +func (s *AddLayerVersionPermissionOutput) SetRevisionId(v string) *AddLayerVersionPermissionOutput { + s.RevisionId = &v + return s +} + +// SetStatement sets the Statement field's value. +func (s *AddLayerVersionPermissionOutput) SetStatement(v string) *AddLayerVersionPermissionOutput { + s.Statement = &v + return s +} + type AddPermissionInput struct { _ struct{} `type:"structure"` @@ -3307,52 +4172,40 @@ type AddPermissionInput struct { // This is currently only used for Alexa Smart Home functions. EventSourceToken *string `type:"string"` - // Name of the Lambda function whose resource policy you are updating by adding - // a new permission. + // The name of the Lambda function. + // + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. // - // You can specify a function name (for example, Thumbnail) or you can specify - // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail). - // AWS Lambda also allows you to specify partial ARN (for example, account-id:Thumbnail). - // Note that the length constraint applies only to the ARN. If you specify only - // the function name, it is limited to 64 characters in length. + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - // The principal who is getting this permission. It can be Amazon S3 service - // Principal (s3.amazonaws.com) if you want Amazon S3 to invoke the function, - // an AWS account ID if you are granting cross-account permission, or any valid - // AWS service principal such as sns.amazonaws.com. For example, you might want - // to allow a custom application in another AWS account to push events to AWS - // Lambda by invoking your function. + // The principal who is getting this permission. The principal can be an AWS + // service (e.g. s3.amazonaws.com or sns.amazonaws.com) for service triggers, + // or an account ID for cross-account access. If you specify a service as a + // principal, use the SourceArn parameter to limit who can invoke the function + // through that service. // // Principal is a required field Principal *string `type:"string" required:"true"` - // You can use this optional query parameter to describe a qualified ARN using - // a function version or an alias name. The permission will then apply to the - // specific qualified ARN. For example, if you specify function version 2 as - // the qualifier, then permission applies only when request is made using qualified - // function ARN: - // - // arn:aws:lambda:aws-region:acct-id:function:function-name:2 - // - // If you specify an alias name, for example PROD, then the permission is valid - // only for requests made using the alias ARN: - // - // arn:aws:lambda:aws-region:acct-id:function:function-name:PROD - // - // If the qualifier is not specified, the permission is valid only when requests - // is made using unqualified function ARN. - // - // arn:aws:lambda:aws-region:acct-id:function:function-name + // Specify a version or alias to add permissions to a published version of the + // function. Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"` // An optional value you can use to ensure you are updating the latest update // of the function version or alias. If the RevisionID you pass doesn't match // the latest RevisionId of the function or alias, it will fail with an error // message, advising you to retrieve the latest function version or alias RevisionID - // using either or . + // using either GetFunction or GetAlias RevisionId *string `type:"string"` // This parameter is used for S3 and SES. The AWS account ID (without a hyphen) @@ -3364,14 +4217,11 @@ type AddPermissionInput struct { // you don't specify the SourceArn) owned by a specific account. SourceAccount *string `type:"string"` - // This is optional; however, when granting permission to invoke your function, - // you should specify this field with the Amazon Resource Name (ARN) as its - // value. This ensures that only events generated from the specified source - // can invoke the function. + // The Amazon Resource Name of the invoker. // - // If you add a permission without providing the source ARN, any AWS account - // that creates a mapping to your function ARN can send events to invoke your - // Lambda function. + // If you add a permission to a service principal without providing the source + // ARN, any AWS account that creates a mapping to your function ARN can invoke + // your Lambda function. SourceArn *string `type:"string"` // A unique statement identifier. @@ -3522,8 +4372,7 @@ type AliasConfiguration struct { RevisionId *string `type:"string"` // Specifies an additional function versions the alias points to, allowing you - // to dictate what percentage of traffic will invoke each version. For more - // information, see lambda-traffic-shifting-using-aliases. + // to dictate what percentage of traffic will invoke each version. RoutingConfig *AliasRoutingConfiguration `type:"structure"` } @@ -3573,14 +4422,13 @@ func (s *AliasConfiguration) SetRoutingConfig(v *AliasRoutingConfiguration) *Ali return s } -// The parent object that implements what percentage of traffic will invoke -// each function version. For more information, see lambda-traffic-shifting-using-aliases. +// The alias's traffic shifting (http://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html) +// configuration. type AliasRoutingConfiguration struct { _ struct{} `type:"structure"` - // Set this value to dictate what percentage of traffic will invoke the updated - // function version. If set to an empty string, 100 percent of traffic will - // invoke function-version. For more information, see lambda-traffic-shifting-using-aliases. + // The name of the second alias, and the percentage of traffic that is routed + // to it. AdditionalVersionWeights map[string]*float64 `type:"map"` } @@ -3606,9 +4454,18 @@ type CreateAliasInput struct { // Description of the alias. Description *string `type:"string"` - // Name of the Lambda function for which you want to create an alias. Note that - // the length constraint applies only to the ARN. If you specify only the function - // name, it is limited to 64 characters in length. + // The name of the lambda function. + // + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` @@ -3625,7 +4482,7 @@ type CreateAliasInput struct { // Specifies an additional version your alias can point to, allowing you to // dictate what percentage of traffic will invoke each version. For more information, - // see lambda-traffic-shifting-using-aliases. + // see Traffic Shifting Using Aliases (http://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html). RoutingConfig *AliasRoutingConfiguration `type:"structure"` } @@ -3700,56 +4557,54 @@ func (s *CreateAliasInput) SetRoutingConfig(v *AliasRoutingConfiguration) *Creat type CreateEventSourceMappingInput struct { _ struct{} `type:"structure"` - // The largest number of records that AWS Lambda will retrieve from your event - // source at the time of invoking your function. Your function receives an event - // with all the retrieved records. The default for Amazon Kinesis and Amazon - // DynamoDB is 100 records. For SQS, the default is 1. + // The maximum number of items to retrieve in a single batch. + // + // * Amazon Kinesis - Default 100. Max 10,000. + // + // * Amazon DynamoDB Streams - Default 100. Max 1,000. + // + // * Amazon Simple Queue Service - Default 10. Max 10. BatchSize *int64 `min:"1" type:"integer"` - // Indicates whether AWS Lambda should begin polling the event source. By default, - // Enabled is true. + // Disables the event source mapping to pause polling and invocation. Enabled *bool `type:"boolean"` - // The Amazon Resource Name (ARN) of the event source. Any record added to this - // source could cause AWS Lambda to invoke your Lambda function, it depends - // on the BatchSize. AWS Lambda POSTs the event's records to your Lambda function - // as JSON. + // The Amazon Resource Name (ARN) of the event source. + // + // * Amazon Kinesis - The ARN of the data stream or a stream consumer. + // + // * Amazon DynamoDB Streams - The ARN of the stream. + // + // * Amazon Simple Queue Service - The ARN of the queue. // // EventSourceArn is a required field EventSourceArn *string `type:"string" required:"true"` - // The Lambda function to invoke when AWS Lambda detects an event on the stream. + // The name of the Lambda function. + // + // Name formats // - // You can specify the function name (for example, Thumbnail) or you can specify - // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail). + // * Function name - MyFunction. // - // If you are using versioning, you can also provide a qualified function ARN - // (ARN that is qualified with function version or alias name as suffix). For - // more information about versioning, see AWS Lambda Function Versioning and - // Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html) + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. // - // AWS Lambda also allows you to specify only the function name with the account - // ID qualifier (for example, account-id:Thumbnail). + // * Version or Alias ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD. // - // Note that the length constraint applies only to the ARN. If you specify only - // the function name, it is limited to 64 characters in length. + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it's limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `min:"1" type:"string" required:"true"` - // The position in the DynamoDB or Kinesis stream where AWS Lambda should start - // reading. For more information, see GetShardIterator (http://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetShardIterator.html#Kinesis-GetShardIterator-request-ShardIteratorType) - // in the Amazon Kinesis API Reference Guide or GetShardIterator (http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_streams_GetShardIterator.html) - // in the Amazon DynamoDB API Reference Guide. The AT_TIMESTAMP value is supported - // only for Kinesis streams (http://docs.aws.amazon.com/streams/latest/dev/amazon-kinesis-streams.html). + // The position in a stream from which to start reading. Required for Amazon + // Kinesis and Amazon DynamoDB Streams sources. AT_TIMESTAMP is only supported + // for Amazon Kinesis streams. StartingPosition *string `type:"string" enum:"EventSourcePosition"` - // The timestamp of the data record from which to start reading. Used with shard - // iterator type (http://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetShardIterator.html#Kinesis-GetShardIterator-request-ShardIteratorType) - // AT_TIMESTAMP. If a record with this exact timestamp does not exist, the iterator - // returned is for the next (later) record. If the timestamp is older than the - // current trim horizon, the iterator returned is for the oldest untrimmed data - // record (TRIM_HORIZON). Valid only for Kinesis streams (http://docs.aws.amazon.com/streams/latest/dev/amazon-kinesis-streams.html). + // With StartingPosition set to AT_TIMESTAMP, the Unix time in seconds from + // which to start reading. StartingPositionTimestamp *time.Time `type:"timestamp"` } @@ -3824,76 +4679,66 @@ func (s *CreateEventSourceMappingInput) SetStartingPositionTimestamp(v time.Time type CreateFunctionInput struct { _ struct{} `type:"structure"` - // The code for the Lambda function. + // The code for the function. // // Code is a required field Code *FunctionCode `type:"structure" required:"true"` - // The parent object that contains the target ARN (Amazon Resource Name) of - // an Amazon SQS queue or Amazon SNS topic. For more information, see dlq. + // A dead letter queue configuration that specifies the queue or topic where + // Lambda sends asynchronous events when they fail processing. For more information, + // see Dead Letter Queues (http://docs.aws.amazon.com/lambda/latest/dg/dlq.html). DeadLetterConfig *DeadLetterConfig `type:"structure"` - // A short, user-defined function description. Lambda does not use this value. - // Assign a meaningful description as you see fit. + // A description of the function. Description *string `type:"string"` - // The parent object that contains your environment's configuration settings. + // Environment variables that are accessible from function code during execution. Environment *Environment `type:"structure"` - // The name you want to assign to the function you are uploading. The function - // names appear in the console and are returned in the ListFunctions API. Function - // names are used to specify functions to other AWS Lambda API operations, such - // as Invoke. Note that the length constraint applies only to the ARN. If you - // specify only the function name, it is limited to 64 characters in length. + // The name of the Lambda function. + // + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `min:"1" type:"string" required:"true"` - // The function within your code that Lambda calls to begin execution. For Node.js, - // it is the module-name.export value in your function. For Java, it can be - // package.class-name::handler or package.class-name. For more information, - // see Lambda Function Handler (Java) (http://docs.aws.amazon.com/lambda/latest/dg/java-programming-model-handler-types.html). + // The name of the method within your code that Lambda calls to execute your + // function. For more information, see Programming Model (http://docs.aws.amazon.com/lambda/latest/dg/programming-model-v2.html). // // Handler is a required field Handler *string `type:"string" required:"true"` - // The Amazon Resource Name (ARN) of the KMS key used to encrypt your function's - // environment variables. If not provided, AWS Lambda will use a default service - // key. + // The ARN of the KMS key used to encrypt your function's environment variables. + // If not provided, AWS Lambda will use a default service key. KMSKeyArn *string `type:"string"` - // The amount of memory, in MB, your Lambda function is given. Lambda uses this - // memory size to infer the amount of CPU and memory allocated to your function. - // Your function use-case determines your CPU and memory requirements. For example, - // a database operation might need less memory compared to an image processing - // function. The default value is 128 MB. The value must be a multiple of 64 - // MB. + // A list of function layers (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html) + // to add to the function's execution environment. + Layers []*string `type:"list"` + + // The amount of memory that your function has access to. Increasing the function's + // memory also increases it's CPU allocation. The default value is 128 MB. The + // value must be a multiple of 64 MB. MemorySize *int64 `min:"128" type:"integer"` - // This boolean parameter can be used to request AWS Lambda to create the Lambda - // function and publish a version as an atomic operation. + // Set to true to publish the first version of the function during creation. Publish *bool `type:"boolean"` - // The Amazon Resource Name (ARN) of the IAM role that Lambda assumes when it - // executes your function to access any other Amazon Web Services (AWS) resources. - // For more information, see AWS Lambda: How it Works (http://docs.aws.amazon.com/lambda/latest/dg/lambda-introduction.html). + // The Amazon Resource Name (ARN) of the function's execution role (http://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html#lambda-intro-execution-role). // // Role is a required field Role *string `type:"string" required:"true"` - // The runtime environment for the Lambda function you are uploading. - // - // To use the Python runtime v3.6, set the value to "python3.6". To use the - // Python runtime v2.7, set the value to "python2.7". To use the Node.js runtime - // v6.10, set the value to "nodejs6.10". To use the Node.js runtime v4.3, set - // the value to "nodejs4.3". To use the .NET Core runtime v1.0, set the value - // to "dotnetcore1.0". To use the .NET Core runtime v2.0, set the value to "dotnetcore2.0". - // - // Node v0.10.42 is currently marked as deprecated. You must migrate existing - // functions to the newer Node.js runtime versions available on AWS Lambda (nodejs4.3 - // or nodejs6.10) as soon as possible. Failure to do so will result in an invalid - // parameter error being returned. Note that you will have to follow this procedure - // for each region that contains functions written in the Node v0.10.42 runtime. + // The runtime version for the function. // // Runtime is a required field Runtime *string `type:"string" required:"true" enum:"Runtime"` @@ -3903,12 +4748,12 @@ type CreateFunctionInput struct { // in the AWS Lambda Developer Guide. Tags map[string]*string `type:"map"` - // The function execution time at which Lambda should terminate the function. - // Because the execution time has cost implications, we recommend you set this - // value based on your expected execution time. The default is 3 seconds. + // The amount of time that Lambda allows a function to run before terminating + // it. The default is 3 seconds. The maximum allowed value is 900 seconds. Timeout *int64 `min:"1" type:"integer"` - // The parent object that contains your function's tracing settings. + // Set Mode to Active to sample and trace a subset of incoming requests with + // AWS X-Ray. TracingConfig *TracingConfig `type:"structure"` // If your Lambda function accesses resources in a VPC, you provide this parameter @@ -4009,6 +4854,12 @@ func (s *CreateFunctionInput) SetKMSKeyArn(v string) *CreateFunctionInput { return s } +// SetLayers sets the Layers field's value. +func (s *CreateFunctionInput) SetLayers(v []*string) *CreateFunctionInput { + s.Layers = v + return s +} + // SetMemorySize sets the MemorySize field's value. func (s *CreateFunctionInput) SetMemorySize(v int64) *CreateFunctionInput { s.MemorySize = &v @@ -4057,14 +4908,12 @@ func (s *CreateFunctionInput) SetVpcConfig(v *VpcConfig) *CreateFunctionInput { return s } -// The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic -// you specify as your Dead Letter Queue (DLQ). For more information, see dlq. +// The dead letter queue (http://docs.aws.amazon.com/lambda/latest/dg/dlq.html) +// for failed asynchronous invocations. type DeadLetterConfig struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic - // you specify as your Dead Letter Queue (DLQ). dlq. For more information, see - // dlq. + // The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic. TargetArn *string `type:"string"` } @@ -4087,10 +4936,18 @@ func (s *DeadLetterConfig) SetTargetArn(v string) *DeadLetterConfig { type DeleteAliasInput struct { _ struct{} `type:"structure"` - // The Lambda function name for which the alias is created. Deleting an alias - // does not delete the function version to which it is pointing. Note that the - // length constraint applies only to the ARN. If you specify only the function - // name, it is limited to 64 characters in length. + // The name of the lambda function. + // + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` @@ -4162,7 +5019,7 @@ func (s DeleteAliasOutput) GoString() string { type DeleteEventSourceMappingInput struct { _ struct{} `type:"structure"` - // The event source mapping ID. + // The identifier of the event source mapping. // // UUID is a required field UUID *string `location:"uri" locationName:"UUID" type:"string" required:"true"` @@ -4184,6 +5041,9 @@ func (s *DeleteEventSourceMappingInput) Validate() error { if s.UUID == nil { invalidParams.Add(request.NewErrParamRequired("UUID")) } + if s.UUID != nil && len(*s.UUID) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UUID", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -4200,8 +5060,18 @@ func (s *DeleteEventSourceMappingInput) SetUUID(v string) *DeleteEventSourceMapp type DeleteFunctionConcurrencyInput struct { _ struct{} `type:"structure"` - // The name of the function you are removing concurrent execution limits from. - // For more information, see concurrent-executions. + // The name of the Lambda function. + // + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` @@ -4256,33 +5126,24 @@ func (s DeleteFunctionConcurrencyOutput) GoString() string { type DeleteFunctionInput struct { _ struct{} `type:"structure"` - // The Lambda function to delete. + // The name of the Lambda function. + // + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. // - // You can specify the function name (for example, Thumbnail) or you can specify - // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail). - // If you are using versioning, you can also provide a qualified function ARN - // (ARN that is qualified with function version or alias name as suffix). AWS - // Lambda also allows you to specify only the function name with the account - // ID qualifier (for example, account-id:Thumbnail). Note that the length constraint - // applies only to the ARN. If you specify only the function name, it is limited - // to 64 characters in length. + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - // Using this optional parameter you can specify a function version (but not - // the $LATEST version) to direct AWS Lambda to delete a specific function version. - // If the function version has one or more aliases pointing to it, you will - // get an error because you cannot have aliases pointing to it. You can delete - // any function version but not the $LATEST, that is, you cannot specify $LATEST - // as the value of this parameter. The $LATEST version can be deleted only when - // you want to delete all the function versions and aliases. - // - // You can only specify a function version, not an alias name, using this parameter. - // You cannot delete a function version using its alias. - // - // If you don't specify this parameter, AWS Lambda will delete the function, - // including all of its versions and aliases. + // Specify a version to delete. You cannot delete a version that is referenced + // by an alias. Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"` } @@ -4341,12 +5202,81 @@ func (s DeleteFunctionOutput) GoString() string { return s.String() } -// The parent object that contains your environment's configuration settings. +type DeleteLayerVersionInput struct { + _ struct{} `type:"structure"` + + // The name of the layer. + // + // LayerName is a required field + LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"` + + // The version number. + // + // VersionNumber is a required field + VersionNumber *int64 `location:"uri" locationName:"VersionNumber" type:"long" required:"true"` +} + +// String returns the string representation +func (s DeleteLayerVersionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLayerVersionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteLayerVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLayerVersionInput"} + if s.LayerName == nil { + invalidParams.Add(request.NewErrParamRequired("LayerName")) + } + if s.LayerName != nil && len(*s.LayerName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LayerName", 1)) + } + if s.VersionNumber == nil { + invalidParams.Add(request.NewErrParamRequired("VersionNumber")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLayerName sets the LayerName field's value. +func (s *DeleteLayerVersionInput) SetLayerName(v string) *DeleteLayerVersionInput { + s.LayerName = &v + return s +} + +// SetVersionNumber sets the VersionNumber field's value. +func (s *DeleteLayerVersionInput) SetVersionNumber(v int64) *DeleteLayerVersionInput { + s.VersionNumber = &v + return s +} + +type DeleteLayerVersionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteLayerVersionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLayerVersionOutput) GoString() string { + return s.String() +} + +// A function's environment variable settings. type Environment struct { _ struct{} `type:"structure"` - // The key-value pairs that represent your environment's configuration settings. - Variables map[string]*string `type:"map"` + // Environment variable key-value pairs. + Variables map[string]*string `type:"map" sensitive:"true"` } // String returns the string representation @@ -4365,16 +5295,15 @@ func (s *Environment) SetVariables(v map[string]*string) *Environment { return s } -// The parent object that contains error information associated with your configuration -// settings. +// Error messages for environment variables that could not be applied. type EnvironmentError struct { _ struct{} `type:"structure"` - // The error code returned by the environment error object. + // The error code. ErrorCode *string `type:"string"` - // The message returned by the environment error object. - Message *string `type:"string"` + // The error message. + Message *string `type:"string" sensitive:"true"` } // String returns the string representation @@ -4399,18 +5328,15 @@ func (s *EnvironmentError) SetMessage(v string) *EnvironmentError { return s } -// The parent object returned that contains your environment's configuration -// settings or any error information associated with your configuration settings. +// The results of a configuration update that applied environment variables. type EnvironmentResponse struct { _ struct{} `type:"structure"` - // The parent object that contains error information associated with your configuration - // settings. + // Error messages for environment variables that could not be applied. Error *EnvironmentError `type:"structure"` - // The key-value pairs returned that represent your environment's configuration - // settings or error information. - Variables map[string]*string `type:"map"` + // Environment variable key-value pairs. + Variables map[string]*string `type:"map" sensitive:"true"` } // String returns the string representation @@ -4435,39 +5361,34 @@ func (s *EnvironmentResponse) SetVariables(v map[string]*string) *EnvironmentRes return s } -// Describes mapping between an Amazon Kinesis or DynamoDB stream or an Amazon -// SQS queue and a Lambda function. +// A mapping between an AWS resource and an AWS Lambda function. See CreateEventSourceMapping +// for details. type EventSourceMappingConfiguration struct { _ struct{} `type:"structure"` - // The largest number of records that AWS Lambda will retrieve from your event - // source at the time of invoking your function. Your function receives an event - // with all the retrieved records. + // The maximum number of items to retrieve in a single batch. BatchSize *int64 `min:"1" type:"integer"` - // The Amazon Resource Name (ARN) of the Amazon Kinesis or DynamoDB stream or - // the SQS queue that is the source of events. + // The Amazon Resource Name (ARN) of the event source. EventSourceArn *string `type:"string"` - // The Lambda function to invoke when AWS Lambda detects an event on the poll-based - // source. + // The ARN of the Lambda function. FunctionArn *string `type:"string"` - // The UTC time string indicating the last time the event mapping was updated. + // The date that the event source mapping was last updated, in Unix time seconds. LastModified *time.Time `type:"timestamp"` // The result of the last AWS Lambda invocation of your Lambda function. LastProcessingResult *string `type:"string"` - // The state of the event source mapping. It can be Creating, Enabled, Disabled, - // Enabling, Disabling, Updating, or Deleting. + // The state of the event source mapping. It can be one of the following: Creating, + // Enabling, Enabled, Disabling, Disabled, Updating, or Deleting. State *string `type:"string"` - // The reason the event source mapping is in its current state. It is either - // user-requested or an AWS Lambda-initiated state transition. + // The cause of the last state change, either User initiated or Lambda initiated. StateTransitionReason *string `type:"string"` - // The AWS Lambda assigned opaque identifier for the mapping. + // The identifier of the event source mapping. UUID *string `type:"string"` } @@ -4529,30 +5450,25 @@ func (s *EventSourceMappingConfiguration) SetUUID(v string) *EventSourceMappingC return s } -// The code for the Lambda function. +// The code for the Lambda function. You can specify either an S3 location, +// or upload a deployment package directly. type FunctionCode struct { _ struct{} `type:"structure"` - // Amazon S3 bucket name where the .zip file containing your deployment package - // is stored. This bucket must reside in the same AWS region where you are creating - // the Lambda function. + // An Amazon S3 bucket in the same region as your function. S3Bucket *string `min:"3" type:"string"` - // The Amazon S3 object (the deployment package) key name you want to upload. + // The Amazon S3 key of the deployment package. S3Key *string `min:"1" type:"string"` - // The Amazon S3 object (the deployment package) version you want to upload. + // For versioned objects, the version of the deployment package object to use. S3ObjectVersion *string `min:"1" type:"string"` - // The contents of your zip file containing your deployment package. If you - // are using the web API directly, the contents of the zip file must be base64-encoded. - // If you are using the AWS SDKs or the AWS CLI, the SDKs or CLI will do the - // encoding for you. For more information about creating a .zip file, see Execution - // Permissions (http://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html#lambda-intro-execution-role.html) - // in the AWS Lambda Developer Guide. + // The base64-encoded contents of your zip file containing your deployment package. + // AWS SDK and AWS CLI clients handle the encoding for you. // // ZipFile is automatically base64 encoded/decoded by the SDK. - ZipFile []byte `type:"blob"` + ZipFile []byte `type:"blob" sensitive:"true"` } // String returns the string representation @@ -4642,77 +5558,71 @@ func (s *FunctionCodeLocation) SetRepositoryType(v string) *FunctionCodeLocation return s } -// A complex type that describes function metadata. +// A Lambda function's configuration settings. type FunctionConfiguration struct { _ struct{} `type:"structure"` - // It is the SHA256 hash of your function deployment package. + // The SHA256 hash of the function's deployment package. CodeSha256 *string `type:"string"` - // The size, in bytes, of the function .zip file you uploaded. + // The size of the function's deployment package in bytes. CodeSize *int64 `type:"long"` - // The parent object that contains the target ARN (Amazon Resource Name) of - // an Amazon SQS queue or Amazon SNS topic. For more information, see dlq. + // The function's dead letter queue. DeadLetterConfig *DeadLetterConfig `type:"structure"` - // The user-provided description. + // The function's description. Description *string `type:"string"` - // The parent object that contains your environment's configuration settings. + // The function's environment variables. Environment *EnvironmentResponse `type:"structure"` - // The Amazon Resource Name (ARN) assigned to the function. + // The function's Amazon Resource Name. FunctionArn *string `type:"string"` - // The name of the function. Note that the length constraint applies only to - // the ARN. If you specify only the function name, it is limited to 64 characters - // in length. + // The name of the function. FunctionName *string `min:"1" type:"string"` // The function Lambda calls to begin executing your function. Handler *string `type:"string"` - // The Amazon Resource Name (ARN) of the KMS key used to encrypt your function's - // environment variables. If empty, it means you are using the AWS Lambda default - // service key. + // The KMS key used to encrypt the function's environment variables. Only returned + // if you've configured a customer managed CMK. KMSKeyArn *string `type:"string"` - // The time stamp of the last time you updated the function. The time stamp - // is conveyed as a string complying with ISO-8601 in this way YYYY-MM-DDThh:mm:ssTZD - // (e.g., 1997-07-16T19:20:30+01:00). For more information, see Date and Time - // Formats (https://www.w3.org/TR/NOTE-datetime). + // The date and time that the function was last updated, in ISO-8601 format + // (https://www.w3.org/TR/NOTE-datetime) (YYYY-MM-DDThh:mm:ss.sTZD). LastModified *string `type:"string"` - // Returns the ARN (Amazon Resource Name) of the master function. + // A list of function layers (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html). + Layers []*Layer `type:"list"` + + // The ARN of the master function. MasterArn *string `type:"string"` - // The memory size, in MB, you configured for the function. Must be a multiple - // of 64 MB. + // The memory allocated to the function MemorySize *int64 `min:"128" type:"integer"` // Represents the latest updated revision of the function or alias. RevisionId *string `type:"string"` - // The Amazon Resource Name (ARN) of the IAM role that Lambda assumes when it - // executes your function to access any other Amazon Web Services (AWS) resources. + // The function's execution role. Role *string `type:"string"` // The runtime environment for the Lambda function. Runtime *string `type:"string" enum:"Runtime"` - // The function execution time at which Lambda should terminate the function. - // Because the execution time has cost implications, we recommend you set this - // value based on your expected execution time. The default is 3 seconds. + // The amount of time that Lambda allows a function to run before terminating + // it. Timeout *int64 `min:"1" type:"integer"` - // The parent object that contains your function's tracing settings. + // The function's AWS X-Ray tracing configuration. TracingConfig *TracingConfigResponse `type:"structure"` // The version of the Lambda function. Version *string `min:"1" type:"string"` - // VPC configuration associated with your Lambda function. + // The function's networking configuration. VpcConfig *VpcConfigResponse `type:"structure"` } @@ -4786,6 +5696,12 @@ func (s *FunctionConfiguration) SetLastModified(v string) *FunctionConfiguration return s } +// SetLayers sets the Layers field's value. +func (s *FunctionConfiguration) SetLayers(v []*Layer) *FunctionConfiguration { + s.Layers = v + return s +} + // SetMasterArn sets the MasterArn field's value. func (s *FunctionConfiguration) SetMasterArn(v string) *FunctionConfiguration { s.MasterArn = &v @@ -4857,12 +5773,10 @@ func (s GetAccountSettingsInput) GoString() string { type GetAccountSettingsOutput struct { _ struct{} `type:"structure"` - // Provides limits of code size and concurrency associated with the current - // account and region. + // Limits related to concurrency and code storage. AccountLimit *AccountLimit `type:"structure"` - // Provides code size usage and function count associated with the current account - // and region. + // The number of functions and amount of storage in use. AccountUsage *AccountUsage `type:"structure"` } @@ -4891,11 +5805,18 @@ func (s *GetAccountSettingsOutput) SetAccountUsage(v *AccountUsage) *GetAccountS type GetAliasInput struct { _ struct{} `type:"structure"` - // Function name for which the alias is created. An alias is a subresource that - // exists only in the context of an existing Lambda function so you must specify - // the function name. Note that the length constraint applies only to the ARN. - // If you specify only the function name, it is limited to 64 characters in - // length. + // The name of the lambda function. + // + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` @@ -4953,7 +5874,7 @@ func (s *GetAliasInput) SetName(v string) *GetAliasInput { type GetEventSourceMappingInput struct { _ struct{} `type:"structure"` - // The AWS Lambda assigned ID of the event source mapping. + // The identifier of the event source mapping. // // UUID is a required field UUID *string `location:"uri" locationName:"UUID" type:"string" required:"true"` @@ -4975,6 +5896,9 @@ func (s *GetEventSourceMappingInput) Validate() error { if s.UUID == nil { invalidParams.Add(request.NewErrParamRequired("UUID")) } + if s.UUID != nil && len(*s.UUID) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UUID", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -4991,26 +5915,24 @@ func (s *GetEventSourceMappingInput) SetUUID(v string) *GetEventSourceMappingInp type GetFunctionConfigurationInput struct { _ struct{} `type:"structure"` - // The name of the Lambda function for which you want to retrieve the configuration - // information. + // The name of the Lambda function. + // + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. // - // You can specify a function name (for example, Thumbnail) or you can specify - // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail). - // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail). - // Note that the length constraint applies only to the ARN. If you specify only - // the function name, it is limited to 64 characters in length. + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - // Using this optional parameter you can specify a function version or an alias - // name. If you specify function version, the API uses qualified function ARN - // and returns information about the specific function version. If you specify - // an alias name, the API uses the alias ARN and returns information about the - // function version to which the alias points. - // - // If you don't specify this parameter, the API uses unqualified function ARN, - // and returns information about the $LATEST function version. + // Specify a version or alias to get details about a published version of the + // function. Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"` } @@ -5058,24 +5980,24 @@ func (s *GetFunctionConfigurationInput) SetQualifier(v string) *GetFunctionConfi type GetFunctionInput struct { _ struct{} `type:"structure"` - // The Lambda function name. + // The name of the Lambda function. + // + // Name formats + // + // * Function name - MyFunction. // - // You can specify a function name (for example, Thumbnail) or you can specify - // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail). - // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail). - // Note that the length constraint applies only to the ARN. If you specify only - // the function name, it is limited to 64 characters in length. + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - // Use this optional parameter to specify a function version or an alias name. - // If you specify function version, the API uses qualified function ARN for - // the request and returns information about the specific Lambda function version. - // If you specify an alias name, the API uses the alias ARN and returns information - // about the function version to which the alias points. If you don't provide - // this parameter, the API uses unqualified function ARN and returns information - // about the $LATEST version of the Lambda function. + // Specify a version or alias to get details about a published version of the + // function. Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"` } @@ -5124,14 +6046,14 @@ func (s *GetFunctionInput) SetQualifier(v string) *GetFunctionInput { type GetFunctionOutput struct { _ struct{} `type:"structure"` - // The object for the Lambda function location. + // The function's code. Code *FunctionCodeLocation `type:"structure"` // The concurrent execution limit set for this function. For more information, - // see concurrent-executions. + // see Managing Concurrency (http://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html). Concurrency *PutFunctionConcurrencyOutput `type:"structure"` - // A complex type that describes function metadata. + // The function's configuration. Configuration *FunctionConfiguration `type:"structure"` // Returns the list of tags associated with the function. For more information, @@ -5174,19 +6096,250 @@ func (s *GetFunctionOutput) SetTags(v map[string]*string) *GetFunctionOutput { return s } +type GetLayerVersionInput struct { + _ struct{} `type:"structure"` + + // The name of the layer. + // + // LayerName is a required field + LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"` + + // The version number. + // + // VersionNumber is a required field + VersionNumber *int64 `location:"uri" locationName:"VersionNumber" type:"long" required:"true"` +} + +// String returns the string representation +func (s GetLayerVersionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLayerVersionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetLayerVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetLayerVersionInput"} + if s.LayerName == nil { + invalidParams.Add(request.NewErrParamRequired("LayerName")) + } + if s.LayerName != nil && len(*s.LayerName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LayerName", 1)) + } + if s.VersionNumber == nil { + invalidParams.Add(request.NewErrParamRequired("VersionNumber")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLayerName sets the LayerName field's value. +func (s *GetLayerVersionInput) SetLayerName(v string) *GetLayerVersionInput { + s.LayerName = &v + return s +} + +// SetVersionNumber sets the VersionNumber field's value. +func (s *GetLayerVersionInput) SetVersionNumber(v int64) *GetLayerVersionInput { + s.VersionNumber = &v + return s +} + +type GetLayerVersionOutput struct { + _ struct{} `type:"structure"` + + // The layer's compatible runtimes. + CompatibleRuntimes []*string `type:"list"` + + // Details about the layer version. + Content *LayerVersionContentOutput `type:"structure"` + + // The date that the layer version was created, in ISO-8601 format (https://www.w3.org/TR/NOTE-datetime) + // (YYYY-MM-DDThh:mm:ss.sTZD). + CreatedDate *string `type:"string"` + + // The description of the version. + Description *string `type:"string"` + + // The Amazon Resource Name (ARN) of the function layer. + LayerArn *string `min:"1" type:"string"` + + // The ARN of the layer version. + LayerVersionArn *string `min:"1" type:"string"` + + // The layer's software license. + LicenseInfo *string `type:"string"` + + // The version number. + Version *int64 `type:"long"` +} + +// String returns the string representation +func (s GetLayerVersionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLayerVersionOutput) GoString() string { + return s.String() +} + +// SetCompatibleRuntimes sets the CompatibleRuntimes field's value. +func (s *GetLayerVersionOutput) SetCompatibleRuntimes(v []*string) *GetLayerVersionOutput { + s.CompatibleRuntimes = v + return s +} + +// SetContent sets the Content field's value. +func (s *GetLayerVersionOutput) SetContent(v *LayerVersionContentOutput) *GetLayerVersionOutput { + s.Content = v + return s +} + +// SetCreatedDate sets the CreatedDate field's value. +func (s *GetLayerVersionOutput) SetCreatedDate(v string) *GetLayerVersionOutput { + s.CreatedDate = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *GetLayerVersionOutput) SetDescription(v string) *GetLayerVersionOutput { + s.Description = &v + return s +} + +// SetLayerArn sets the LayerArn field's value. +func (s *GetLayerVersionOutput) SetLayerArn(v string) *GetLayerVersionOutput { + s.LayerArn = &v + return s +} + +// SetLayerVersionArn sets the LayerVersionArn field's value. +func (s *GetLayerVersionOutput) SetLayerVersionArn(v string) *GetLayerVersionOutput { + s.LayerVersionArn = &v + return s +} + +// SetLicenseInfo sets the LicenseInfo field's value. +func (s *GetLayerVersionOutput) SetLicenseInfo(v string) *GetLayerVersionOutput { + s.LicenseInfo = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *GetLayerVersionOutput) SetVersion(v int64) *GetLayerVersionOutput { + s.Version = &v + return s +} + +type GetLayerVersionPolicyInput struct { + _ struct{} `type:"structure"` + + // The name of the layer. + // + // LayerName is a required field + LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"` + + // The version number. + // + // VersionNumber is a required field + VersionNumber *int64 `location:"uri" locationName:"VersionNumber" type:"long" required:"true"` +} + +// String returns the string representation +func (s GetLayerVersionPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLayerVersionPolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetLayerVersionPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetLayerVersionPolicyInput"} + if s.LayerName == nil { + invalidParams.Add(request.NewErrParamRequired("LayerName")) + } + if s.LayerName != nil && len(*s.LayerName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LayerName", 1)) + } + if s.VersionNumber == nil { + invalidParams.Add(request.NewErrParamRequired("VersionNumber")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLayerName sets the LayerName field's value. +func (s *GetLayerVersionPolicyInput) SetLayerName(v string) *GetLayerVersionPolicyInput { + s.LayerName = &v + return s +} + +// SetVersionNumber sets the VersionNumber field's value. +func (s *GetLayerVersionPolicyInput) SetVersionNumber(v int64) *GetLayerVersionPolicyInput { + s.VersionNumber = &v + return s +} + +type GetLayerVersionPolicyOutput struct { + _ struct{} `type:"structure"` + + // The policy document. + Policy *string `type:"string"` + + // A unique identifier for the current revision of the policy. + RevisionId *string `type:"string"` +} + +// String returns the string representation +func (s GetLayerVersionPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLayerVersionPolicyOutput) GoString() string { + return s.String() +} + +// SetPolicy sets the Policy field's value. +func (s *GetLayerVersionPolicyOutput) SetPolicy(v string) *GetLayerVersionPolicyOutput { + s.Policy = &v + return s +} + +// SetRevisionId sets the RevisionId field's value. +func (s *GetLayerVersionPolicyOutput) SetRevisionId(v string) *GetLayerVersionPolicyOutput { + s.RevisionId = &v + return s +} + type GetPolicyInput struct { _ struct{} `type:"structure"` - // Function name whose resource policy you want to retrieve. + // The name of the lambda function. + // + // Name formats // - // You can specify the function name (for example, Thumbnail) or you can specify - // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail). - // If you are using versioning, you can also provide a qualified function ARN - // (ARN that is qualified with function version or alias name as suffix). AWS - // Lambda also allows you to specify only the function name with the account - // ID qualifier (for example, account-id:Thumbnail). Note that the length constraint - // applies only to the ARN. If you specify only the function name, it is limited - // to 64 characters in length. + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` @@ -5277,9 +6430,18 @@ func (s *GetPolicyOutput) SetRevisionId(v string) *GetPolicyOutput { type InvokeAsyncInput struct { _ struct{} `deprecated:"true" type:"structure" payload:"InvokeArgs"` - // The Lambda function name. Note that the length constraint applies only to - // the ARN. If you specify only the function name, it is limited to 64 characters - // in length. + // The name of the Lambda function. + // + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` @@ -5368,26 +6530,37 @@ type InvokeInput struct { // // The ClientContext JSON must be base64-encoded and has a maximum size of 3583 // bytes. + // + // ClientContext information is returned only if you use the synchronous (RequestResponse) + // invocation type. ClientContext *string `location:"header" locationName:"X-Amz-Client-Context" type:"string"` - // The Lambda function name. + // The name of the Lambda function. + // + // Name formats // - // You can specify a function name (for example, Thumbnail) or you can specify - // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail). - // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail). - // Note that the length constraint applies only to the ARN. If you specify only - // the function name, it is limited to 64 characters in length. + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - // By default, the Invoke API assumes RequestResponse invocation type. You can - // optionally request asynchronous execution by specifying Event as the InvocationType. - // You can also use this parameter to request AWS Lambda to not execute the - // function but do some verification, such as if the caller is authorized to - // invoke the function and if the inputs are valid. You request this by specifying - // DryRun as the InvocationType. This is useful in a cross-account scenario - // when you want to verify access to a function without running it. + // Choose from the following options. + // + // * RequestResponse (default) - Invoke the function synchronously. Keep + // the connection open until the function returns a response or times out. + // + // * Event - Invoke the function asynchronously. Send events that fail multiple + // times to the function's dead-letter queue (if configured). + // + // * DryRun - Validate parameter values and verify that the user or role + // has permission to invoke the function. InvocationType *string `location:"header" locationName:"X-Amz-Invocation-Type" type:"string" enum:"InvocationType"` // You can set this optional parameter to Tail in the request only if you specify @@ -5397,16 +6570,9 @@ type InvokeInput struct { LogType *string `location:"header" locationName:"X-Amz-Log-Type" type:"string" enum:"LogType"` // JSON that you want to provide to your Lambda function as input. - Payload []byte `type:"blob"` + Payload []byte `type:"blob" sensitive:"true"` - // You can use this optional parameter to specify a Lambda function version - // or alias name. If you specify a function version, the API uses the qualified - // function ARN to invoke a specific Lambda function. If you specify an alias - // name, the API uses the alias ARN to invoke the Lambda function version to - // which the alias points. - // - // If you don't provide this parameter, then the API uses unqualified function - // ARN which results in invocation of the $LATEST version. + // Specify a version or alias to invoke a published version of the function. Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"` } @@ -5433,130 +6599,400 @@ func (s *InvokeInput) Validate() error { invalidParams.Add(request.NewErrParamMinLen("Qualifier", 1)) } - if invalidParams.Len() > 0 { - return invalidParams - } - return nil + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientContext sets the ClientContext field's value. +func (s *InvokeInput) SetClientContext(v string) *InvokeInput { + s.ClientContext = &v + return s +} + +// SetFunctionName sets the FunctionName field's value. +func (s *InvokeInput) SetFunctionName(v string) *InvokeInput { + s.FunctionName = &v + return s +} + +// SetInvocationType sets the InvocationType field's value. +func (s *InvokeInput) SetInvocationType(v string) *InvokeInput { + s.InvocationType = &v + return s +} + +// SetLogType sets the LogType field's value. +func (s *InvokeInput) SetLogType(v string) *InvokeInput { + s.LogType = &v + return s +} + +// SetPayload sets the Payload field's value. +func (s *InvokeInput) SetPayload(v []byte) *InvokeInput { + s.Payload = v + return s +} + +// SetQualifier sets the Qualifier field's value. +func (s *InvokeInput) SetQualifier(v string) *InvokeInput { + s.Qualifier = &v + return s +} + +// Upon success, returns an empty response. Otherwise, throws an exception. +type InvokeOutput struct { + _ struct{} `type:"structure" payload:"Payload"` + + // The function version that has been executed. This value is returned only + // if the invocation type is RequestResponse. For more information, see Traffic + // Shifting Using Aliases (http://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html). + ExecutedVersion *string `location:"header" locationName:"X-Amz-Executed-Version" min:"1" type:"string"` + + // Indicates whether an error occurred while executing the Lambda function. + // If an error occurred this field will have one of two values; Handled or Unhandled. + // Handled errors are errors that are reported by the function while the Unhandled + // errors are those detected and reported by AWS Lambda. Unhandled errors include + // out of memory errors and function timeouts. For information about how to + // report an Handled error, see Programming Model (http://docs.aws.amazon.com/lambda/latest/dg/programming-model.html). + FunctionError *string `location:"header" locationName:"X-Amz-Function-Error" type:"string"` + + // It is the base64-encoded logs for the Lambda function invocation. This is + // present only if the invocation type is RequestResponse and the logs were + // requested. + LogResult *string `location:"header" locationName:"X-Amz-Log-Result" type:"string"` + + // It is the JSON representation of the object returned by the Lambda function. + // This is present only if the invocation type is RequestResponse. + // + // In the event of a function error this field contains a message describing + // the error. For the Handled errors the Lambda function will report this message. + // For Unhandled errors AWS Lambda reports the message. + Payload []byte `type:"blob" sensitive:"true"` + + // The HTTP status code will be in the 200 range for successful request. For + // the RequestResponse invocation type this status code will be 200. For the + // Event invocation type this status code will be 202. For the DryRun invocation + // type the status code will be 204. + StatusCode *int64 `location:"statusCode" type:"integer"` +} + +// String returns the string representation +func (s InvokeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InvokeOutput) GoString() string { + return s.String() +} + +// SetExecutedVersion sets the ExecutedVersion field's value. +func (s *InvokeOutput) SetExecutedVersion(v string) *InvokeOutput { + s.ExecutedVersion = &v + return s +} + +// SetFunctionError sets the FunctionError field's value. +func (s *InvokeOutput) SetFunctionError(v string) *InvokeOutput { + s.FunctionError = &v + return s +} + +// SetLogResult sets the LogResult field's value. +func (s *InvokeOutput) SetLogResult(v string) *InvokeOutput { + s.LogResult = &v + return s +} + +// SetPayload sets the Payload field's value. +func (s *InvokeOutput) SetPayload(v []byte) *InvokeOutput { + s.Payload = v + return s +} + +// SetStatusCode sets the StatusCode field's value. +func (s *InvokeOutput) SetStatusCode(v int64) *InvokeOutput { + s.StatusCode = &v + return s +} + +// A function layer. +type Layer struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the function layer. + Arn *string `min:"1" type:"string"` + + // The size of the layer archive in bytes. + CodeSize *int64 `type:"long"` +} + +// String returns the string representation +func (s Layer) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Layer) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *Layer) SetArn(v string) *Layer { + s.Arn = &v + return s +} + +// SetCodeSize sets the CodeSize field's value. +func (s *Layer) SetCodeSize(v int64) *Layer { + s.CodeSize = &v + return s +} + +// A ZIP archive that contains the contents of the function layer. You can specify +// either an Amazon S3 location, or upload a layer archive directly. +type LayerVersionContentInput struct { + _ struct{} `type:"structure"` + + // The Amazon S3 bucket of the layer archive. + S3Bucket *string `min:"3" type:"string"` + + // The Amazon S3 key of the layer archive. + S3Key *string `min:"1" type:"string"` + + // For versioned objects, the version of the layer archive object to use. + S3ObjectVersion *string `min:"1" type:"string"` + + // The base64-encoded contents of the layer archive. AWS SDK and AWS CLI clients + // handle the encoding for you. + // + // ZipFile is automatically base64 encoded/decoded by the SDK. + ZipFile []byte `type:"blob" sensitive:"true"` +} + +// String returns the string representation +func (s LayerVersionContentInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LayerVersionContentInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *LayerVersionContentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LayerVersionContentInput"} + if s.S3Bucket != nil && len(*s.S3Bucket) < 3 { + invalidParams.Add(request.NewErrParamMinLen("S3Bucket", 3)) + } + if s.S3Key != nil && len(*s.S3Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("S3Key", 1)) + } + if s.S3ObjectVersion != nil && len(*s.S3ObjectVersion) < 1 { + invalidParams.Add(request.NewErrParamMinLen("S3ObjectVersion", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetS3Bucket sets the S3Bucket field's value. +func (s *LayerVersionContentInput) SetS3Bucket(v string) *LayerVersionContentInput { + s.S3Bucket = &v + return s +} + +// SetS3Key sets the S3Key field's value. +func (s *LayerVersionContentInput) SetS3Key(v string) *LayerVersionContentInput { + s.S3Key = &v + return s +} + +// SetS3ObjectVersion sets the S3ObjectVersion field's value. +func (s *LayerVersionContentInput) SetS3ObjectVersion(v string) *LayerVersionContentInput { + s.S3ObjectVersion = &v + return s +} + +// SetZipFile sets the ZipFile field's value. +func (s *LayerVersionContentInput) SetZipFile(v []byte) *LayerVersionContentInput { + s.ZipFile = v + return s +} + +// Details about a layer version. +type LayerVersionContentOutput struct { + _ struct{} `type:"structure"` + + // The SHA-256 hash of the layer archive. + CodeSha256 *string `type:"string"` + + // The size of the layer archive in bytes. + CodeSize *int64 `type:"long"` + + // A link to the layer archive in Amazon S3 that is valid for 10 minutes. + Location *string `type:"string"` +} + +// String returns the string representation +func (s LayerVersionContentOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LayerVersionContentOutput) GoString() string { + return s.String() +} + +// SetCodeSha256 sets the CodeSha256 field's value. +func (s *LayerVersionContentOutput) SetCodeSha256(v string) *LayerVersionContentOutput { + s.CodeSha256 = &v + return s +} + +// SetCodeSize sets the CodeSize field's value. +func (s *LayerVersionContentOutput) SetCodeSize(v int64) *LayerVersionContentOutput { + s.CodeSize = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *LayerVersionContentOutput) SetLocation(v string) *LayerVersionContentOutput { + s.Location = &v + return s +} + +// Details about a layer version. +type LayerVersionsListItem struct { + _ struct{} `type:"structure"` + + // The layer's compatible runtimes. + CompatibleRuntimes []*string `type:"list"` + + // The date that the version was created, in ISO 8601 format. For example, 2018-11-27T15:10:45.123+0000. + CreatedDate *string `type:"string"` + + // The description of the version. + Description *string `type:"string"` + + // The ARN of the layer version. + LayerVersionArn *string `min:"1" type:"string"` + + // The layer's open-source license. + LicenseInfo *string `type:"string"` + + // The version number. + Version *int64 `type:"long"` +} + +// String returns the string representation +func (s LayerVersionsListItem) String() string { + return awsutil.Prettify(s) } -// SetClientContext sets the ClientContext field's value. -func (s *InvokeInput) SetClientContext(v string) *InvokeInput { - s.ClientContext = &v - return s +// GoString returns the string representation +func (s LayerVersionsListItem) GoString() string { + return s.String() } -// SetFunctionName sets the FunctionName field's value. -func (s *InvokeInput) SetFunctionName(v string) *InvokeInput { - s.FunctionName = &v +// SetCompatibleRuntimes sets the CompatibleRuntimes field's value. +func (s *LayerVersionsListItem) SetCompatibleRuntimes(v []*string) *LayerVersionsListItem { + s.CompatibleRuntimes = v return s } -// SetInvocationType sets the InvocationType field's value. -func (s *InvokeInput) SetInvocationType(v string) *InvokeInput { - s.InvocationType = &v +// SetCreatedDate sets the CreatedDate field's value. +func (s *LayerVersionsListItem) SetCreatedDate(v string) *LayerVersionsListItem { + s.CreatedDate = &v return s } -// SetLogType sets the LogType field's value. -func (s *InvokeInput) SetLogType(v string) *InvokeInput { - s.LogType = &v +// SetDescription sets the Description field's value. +func (s *LayerVersionsListItem) SetDescription(v string) *LayerVersionsListItem { + s.Description = &v return s } -// SetPayload sets the Payload field's value. -func (s *InvokeInput) SetPayload(v []byte) *InvokeInput { - s.Payload = v +// SetLayerVersionArn sets the LayerVersionArn field's value. +func (s *LayerVersionsListItem) SetLayerVersionArn(v string) *LayerVersionsListItem { + s.LayerVersionArn = &v return s } -// SetQualifier sets the Qualifier field's value. -func (s *InvokeInput) SetQualifier(v string) *InvokeInput { - s.Qualifier = &v +// SetLicenseInfo sets the LicenseInfo field's value. +func (s *LayerVersionsListItem) SetLicenseInfo(v string) *LayerVersionsListItem { + s.LicenseInfo = &v return s } -// Upon success, returns an empty response. Otherwise, throws an exception. -type InvokeOutput struct { - _ struct{} `type:"structure" payload:"Payload"` - - // The function version that has been executed. This value is returned only - // if the invocation type is RequestResponse. For more information, see lambda-traffic-shifting-using-aliases. - ExecutedVersion *string `location:"header" locationName:"X-Amz-Executed-Version" min:"1" type:"string"` +// SetVersion sets the Version field's value. +func (s *LayerVersionsListItem) SetVersion(v int64) *LayerVersionsListItem { + s.Version = &v + return s +} - // Indicates whether an error occurred while executing the Lambda function. - // If an error occurred this field will have one of two values; Handled or Unhandled. - // Handled errors are errors that are reported by the function while the Unhandled - // errors are those detected and reported by AWS Lambda. Unhandled errors include - // out of memory errors and function timeouts. For information about how to - // report an Handled error, see Programming Model (http://docs.aws.amazon.com/lambda/latest/dg/programming-model.html). - FunctionError *string `location:"header" locationName:"X-Amz-Function-Error" type:"string"` +// Details about a function layer. +type LayersListItem struct { + _ struct{} `type:"structure"` - // It is the base64-encoded logs for the Lambda function invocation. This is - // present only if the invocation type is RequestResponse and the logs were - // requested. - LogResult *string `location:"header" locationName:"X-Amz-Log-Result" type:"string"` + // The newest version of the layer. + LatestMatchingVersion *LayerVersionsListItem `type:"structure"` - // It is the JSON representation of the object returned by the Lambda function. - // This is present only if the invocation type is RequestResponse. - // - // In the event of a function error this field contains a message describing - // the error. For the Handled errors the Lambda function will report this message. - // For Unhandled errors AWS Lambda reports the message. - Payload []byte `type:"blob"` + // The Amazon Resource Name (ARN) of the function layer. + LayerArn *string `min:"1" type:"string"` - // The HTTP status code will be in the 200 range for successful request. For - // the RequestResponse invocation type this status code will be 200. For the - // Event invocation type this status code will be 202. For the DryRun invocation - // type the status code will be 204. - StatusCode *int64 `location:"statusCode" type:"integer"` + // The name of the layer. + LayerName *string `min:"1" type:"string"` } // String returns the string representation -func (s InvokeOutput) String() string { +func (s LayersListItem) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s InvokeOutput) GoString() string { +func (s LayersListItem) GoString() string { return s.String() } -// SetExecutedVersion sets the ExecutedVersion field's value. -func (s *InvokeOutput) SetExecutedVersion(v string) *InvokeOutput { - s.ExecutedVersion = &v - return s -} - -// SetFunctionError sets the FunctionError field's value. -func (s *InvokeOutput) SetFunctionError(v string) *InvokeOutput { - s.FunctionError = &v - return s -} - -// SetLogResult sets the LogResult field's value. -func (s *InvokeOutput) SetLogResult(v string) *InvokeOutput { - s.LogResult = &v +// SetLatestMatchingVersion sets the LatestMatchingVersion field's value. +func (s *LayersListItem) SetLatestMatchingVersion(v *LayerVersionsListItem) *LayersListItem { + s.LatestMatchingVersion = v return s } -// SetPayload sets the Payload field's value. -func (s *InvokeOutput) SetPayload(v []byte) *InvokeOutput { - s.Payload = v +// SetLayerArn sets the LayerArn field's value. +func (s *LayersListItem) SetLayerArn(v string) *LayersListItem { + s.LayerArn = &v return s } -// SetStatusCode sets the StatusCode field's value. -func (s *InvokeOutput) SetStatusCode(v int64) *InvokeOutput { - s.StatusCode = &v +// SetLayerName sets the LayerName field's value. +func (s *LayersListItem) SetLayerName(v string) *LayersListItem { + s.LayerName = &v return s } type ListAliasesInput struct { _ struct{} `type:"structure"` - // Lambda function name for which the alias is created. Note that the length - // constraint applies only to the ARN. If you specify only the function name, - // it is limited to 64 characters in length. + // The name of the lambda function. + // + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` @@ -5666,29 +7102,35 @@ func (s *ListAliasesOutput) SetNextMarker(v string) *ListAliasesOutput { type ListEventSourceMappingsInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the Amazon Kinesis or DynamoDB stream, - // or an SQS queue. (This parameter is optional.) + // The Amazon Resource Name (ARN) of the event source. + // + // * Amazon Kinesis - The ARN of the data stream or a stream consumer. + // + // * Amazon DynamoDB Streams - The ARN of the stream. + // + // * Amazon Simple Queue Service - The ARN of the queue. EventSourceArn *string `location:"querystring" locationName:"EventSourceArn" type:"string"` // The name of the Lambda function. // - // You can specify the function name (for example, Thumbnail) or you can specify - // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail). - // If you are using versioning, you can also provide a qualified function ARN - // (ARN that is qualified with function version or alias name as suffix). AWS - // Lambda also allows you to specify only the function name with the account - // ID qualifier (for example, account-id:Thumbnail). Note that the length constraint - // applies only to the ARN. If you specify only the function name, it is limited - // to 64 characters in length. + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Version or Alias ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it's limited to 64 characters in length. FunctionName *string `location:"querystring" locationName:"FunctionName" min:"1" type:"string"` - // Optional string. An opaque pagination token returned from a previous ListEventSourceMappings - // operation. If present, specifies to continue the list from where the returning - // call left off. + // A pagination token returned by a previous call. Marker *string `location:"querystring" locationName:"Marker" type:"string"` - // Optional integer. Specifies the maximum number of event sources to return - // in response. This value must be greater than 0. + // The maximum number of event source mappings to return. MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"` } @@ -5742,14 +7184,14 @@ func (s *ListEventSourceMappingsInput) SetMaxItems(v int64) *ListEventSourceMapp return s } -// Contains a list of event sources (see EventSourceMappingConfiguration) type ListEventSourceMappingsOutput struct { _ struct{} `type:"structure"` - // An array of EventSourceMappingConfiguration objects. + // A list of event source mappings. EventSourceMappings []*EventSourceMappingConfiguration `type:"list"` - // A string, present if there are more event source mappings. + // A pagination token that's returned when the response doesn't contain all + // event source mappings. NextMarker *string `type:"string"` } @@ -5778,49 +7220,234 @@ func (s *ListEventSourceMappingsOutput) SetNextMarker(v string) *ListEventSource type ListFunctionsInput struct { _ struct{} `type:"structure"` - // Optional string. If not specified, only the unqualified functions ARNs (Amazon - // Resource Names) will be returned. - // - // Valid value: - // - // ALL: Will return all versions, including $LATEST which will have fully qualified - // ARNs (Amazon Resource Names). + // Set to ALL to list all published versions. If not specified, only the latest + // unpublished version ARN is returned. FunctionVersion *string `location:"querystring" locationName:"FunctionVersion" type:"string" enum:"FunctionVersion"` // Optional string. An opaque pagination token returned from a previous ListFunctions // operation. If present, indicates where to continue the listing. Marker *string `location:"querystring" locationName:"Marker" type:"string"` - // Optional string. If not specified, will return only regular function versions - // (i.e., non-replicated versions). - // - // Valid values are: - // - // The region from which the functions are replicated. For example, if you specify - // us-east-1, only functions replicated from that region will be returned. - // - // ALL: Will return all functions from any region. If specified, you also must - // specify a valid FunctionVersion parameter. + // Specify a region (e.g. us-east-2) to only list functions that were created + // in that region, or ALL to include functions replicated from any region. If + // specified, you also must specify the FunctionVersion. MasterRegion *string `location:"querystring" locationName:"MasterRegion" type:"string"` - // Optional integer. Specifies the maximum number of AWS Lambda functions to - // return in response. This parameter value must be greater than 0. + // Optional integer. Specifies the maximum number of AWS Lambda functions to + // return in response. This parameter value must be greater than 0. The absolute + // maximum of AWS Lambda functions that can be returned is 50. + MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"` +} + +// String returns the string representation +func (s ListFunctionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListFunctionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListFunctionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListFunctionsInput"} + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFunctionVersion sets the FunctionVersion field's value. +func (s *ListFunctionsInput) SetFunctionVersion(v string) *ListFunctionsInput { + s.FunctionVersion = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *ListFunctionsInput) SetMarker(v string) *ListFunctionsInput { + s.Marker = &v + return s +} + +// SetMasterRegion sets the MasterRegion field's value. +func (s *ListFunctionsInput) SetMasterRegion(v string) *ListFunctionsInput { + s.MasterRegion = &v + return s +} + +// SetMaxItems sets the MaxItems field's value. +func (s *ListFunctionsInput) SetMaxItems(v int64) *ListFunctionsInput { + s.MaxItems = &v + return s +} + +// A list of Lambda functions. +type ListFunctionsOutput struct { + _ struct{} `type:"structure"` + + // A list of Lambda functions. + Functions []*FunctionConfiguration `type:"list"` + + // A string, present if there are more functions. + NextMarker *string `type:"string"` +} + +// String returns the string representation +func (s ListFunctionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListFunctionsOutput) GoString() string { + return s.String() +} + +// SetFunctions sets the Functions field's value. +func (s *ListFunctionsOutput) SetFunctions(v []*FunctionConfiguration) *ListFunctionsOutput { + s.Functions = v + return s +} + +// SetNextMarker sets the NextMarker field's value. +func (s *ListFunctionsOutput) SetNextMarker(v string) *ListFunctionsOutput { + s.NextMarker = &v + return s +} + +type ListLayerVersionsInput struct { + _ struct{} `type:"structure"` + + // A runtime identifier. For example, go1.x. + CompatibleRuntime *string `location:"querystring" locationName:"CompatibleRuntime" type:"string" enum:"Runtime"` + + // The name of the layer. + // + // LayerName is a required field + LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"` + + // A pagination token returned by a previous call. + Marker *string `location:"querystring" locationName:"Marker" type:"string"` + + // The maximum number of versions to return. + MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"` +} + +// String returns the string representation +func (s ListLayerVersionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLayerVersionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListLayerVersionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListLayerVersionsInput"} + if s.LayerName == nil { + invalidParams.Add(request.NewErrParamRequired("LayerName")) + } + if s.LayerName != nil && len(*s.LayerName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LayerName", 1)) + } + if s.MaxItems != nil && *s.MaxItems < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCompatibleRuntime sets the CompatibleRuntime field's value. +func (s *ListLayerVersionsInput) SetCompatibleRuntime(v string) *ListLayerVersionsInput { + s.CompatibleRuntime = &v + return s +} + +// SetLayerName sets the LayerName field's value. +func (s *ListLayerVersionsInput) SetLayerName(v string) *ListLayerVersionsInput { + s.LayerName = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *ListLayerVersionsInput) SetMarker(v string) *ListLayerVersionsInput { + s.Marker = &v + return s +} + +// SetMaxItems sets the MaxItems field's value. +func (s *ListLayerVersionsInput) SetMaxItems(v int64) *ListLayerVersionsInput { + s.MaxItems = &v + return s +} + +type ListLayerVersionsOutput struct { + _ struct{} `type:"structure"` + + // A list of versions. + LayerVersions []*LayerVersionsListItem `type:"list"` + + // A pagination token returned when the response doesn't contain all versions. + NextMarker *string `type:"string"` +} + +// String returns the string representation +func (s ListLayerVersionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListLayerVersionsOutput) GoString() string { + return s.String() +} + +// SetLayerVersions sets the LayerVersions field's value. +func (s *ListLayerVersionsOutput) SetLayerVersions(v []*LayerVersionsListItem) *ListLayerVersionsOutput { + s.LayerVersions = v + return s +} + +// SetNextMarker sets the NextMarker field's value. +func (s *ListLayerVersionsOutput) SetNextMarker(v string) *ListLayerVersionsOutput { + s.NextMarker = &v + return s +} + +type ListLayersInput struct { + _ struct{} `type:"structure"` + + // A runtime identifier. For example, go1.x. + CompatibleRuntime *string `location:"querystring" locationName:"CompatibleRuntime" type:"string" enum:"Runtime"` + + // A pagination token returned by a previous call. + Marker *string `location:"querystring" locationName:"Marker" type:"string"` + + // The maximum number of layers to return. MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"` } // String returns the string representation -func (s ListFunctionsInput) String() string { +func (s ListLayersInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListFunctionsInput) GoString() string { +func (s ListLayersInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ListFunctionsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListFunctionsInput"} +func (s *ListLayersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListLayersInput"} if s.MaxItems != nil && *s.MaxItems < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) } @@ -5831,59 +7458,52 @@ func (s *ListFunctionsInput) Validate() error { return nil } -// SetFunctionVersion sets the FunctionVersion field's value. -func (s *ListFunctionsInput) SetFunctionVersion(v string) *ListFunctionsInput { - s.FunctionVersion = &v +// SetCompatibleRuntime sets the CompatibleRuntime field's value. +func (s *ListLayersInput) SetCompatibleRuntime(v string) *ListLayersInput { + s.CompatibleRuntime = &v return s } // SetMarker sets the Marker field's value. -func (s *ListFunctionsInput) SetMarker(v string) *ListFunctionsInput { +func (s *ListLayersInput) SetMarker(v string) *ListLayersInput { s.Marker = &v return s } -// SetMasterRegion sets the MasterRegion field's value. -func (s *ListFunctionsInput) SetMasterRegion(v string) *ListFunctionsInput { - s.MasterRegion = &v - return s -} - // SetMaxItems sets the MaxItems field's value. -func (s *ListFunctionsInput) SetMaxItems(v int64) *ListFunctionsInput { +func (s *ListLayersInput) SetMaxItems(v int64) *ListLayersInput { s.MaxItems = &v return s } -// Contains a list of AWS Lambda function configurations (see FunctionConfiguration. -type ListFunctionsOutput struct { +type ListLayersOutput struct { _ struct{} `type:"structure"` - // A list of Lambda functions. - Functions []*FunctionConfiguration `type:"list"` + // A list of function layers. + Layers []*LayersListItem `type:"list"` - // A string, present if there are more functions. + // A pagination token returned when the response doesn't contain all layers. NextMarker *string `type:"string"` } // String returns the string representation -func (s ListFunctionsOutput) String() string { +func (s ListLayersOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListFunctionsOutput) GoString() string { +func (s ListLayersOutput) GoString() string { return s.String() } -// SetFunctions sets the Functions field's value. -func (s *ListFunctionsOutput) SetFunctions(v []*FunctionConfiguration) *ListFunctionsOutput { - s.Functions = v +// SetLayers sets the Layers field's value. +func (s *ListLayersOutput) SetLayers(v []*LayersListItem) *ListLayersOutput { + s.Layers = v return s } // SetNextMarker sets the NextMarker field's value. -func (s *ListFunctionsOutput) SetNextMarker(v string) *ListFunctionsOutput { +func (s *ListLayersOutput) SetNextMarker(v string) *ListLayersOutput { s.NextMarker = &v return s } @@ -5915,6 +7535,9 @@ func (s *ListTagsInput) Validate() error { if s.Resource == nil { invalidParams.Add(request.NewErrParamRequired("Resource")) } + if s.Resource != nil && len(*s.Resource) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Resource", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -5956,12 +7579,18 @@ func (s *ListTagsOutput) SetTags(v map[string]*string) *ListTagsOutput { type ListVersionsByFunctionInput struct { _ struct{} `type:"structure"` - // Function name whose versions to list. You can specify a function name (for - // example, Thumbnail) or you can specify Amazon Resource Name (ARN) of the - // function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail). - // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail). - // Note that the length constraint applies only to the ARN. If you specify only - // the function name, it is limited to 64 characters in length. + // The name of the lambda function. + // + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` @@ -6054,6 +7683,188 @@ func (s *ListVersionsByFunctionOutput) SetVersions(v []*FunctionConfiguration) * return s } +type PublishLayerVersionInput struct { + _ struct{} `type:"structure"` + + // A list of compatible function runtimes (http://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html). + // Used for filtering with ListLayers and ListLayerVersions. + CompatibleRuntimes []*string `type:"list"` + + // The function layer archive. + // + // Content is a required field + Content *LayerVersionContentInput `type:"structure" required:"true"` + + // The description of the version. + Description *string `type:"string"` + + // The name of the layer. + // + // LayerName is a required field + LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"` + + // The layer's software license. It can be any of the following: + // + // * An SPDX license identifier (https://spdx.org/licenses/). For example, + // MIT. + // + // * The URL of a license hosted on the internet. For example, https://opensource.org/licenses/MIT. + // + // * The full text of the license. + LicenseInfo *string `type:"string"` +} + +// String returns the string representation +func (s PublishLayerVersionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PublishLayerVersionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PublishLayerVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PublishLayerVersionInput"} + if s.Content == nil { + invalidParams.Add(request.NewErrParamRequired("Content")) + } + if s.LayerName == nil { + invalidParams.Add(request.NewErrParamRequired("LayerName")) + } + if s.LayerName != nil && len(*s.LayerName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LayerName", 1)) + } + if s.Content != nil { + if err := s.Content.Validate(); err != nil { + invalidParams.AddNested("Content", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCompatibleRuntimes sets the CompatibleRuntimes field's value. +func (s *PublishLayerVersionInput) SetCompatibleRuntimes(v []*string) *PublishLayerVersionInput { + s.CompatibleRuntimes = v + return s +} + +// SetContent sets the Content field's value. +func (s *PublishLayerVersionInput) SetContent(v *LayerVersionContentInput) *PublishLayerVersionInput { + s.Content = v + return s +} + +// SetDescription sets the Description field's value. +func (s *PublishLayerVersionInput) SetDescription(v string) *PublishLayerVersionInput { + s.Description = &v + return s +} + +// SetLayerName sets the LayerName field's value. +func (s *PublishLayerVersionInput) SetLayerName(v string) *PublishLayerVersionInput { + s.LayerName = &v + return s +} + +// SetLicenseInfo sets the LicenseInfo field's value. +func (s *PublishLayerVersionInput) SetLicenseInfo(v string) *PublishLayerVersionInput { + s.LicenseInfo = &v + return s +} + +type PublishLayerVersionOutput struct { + _ struct{} `type:"structure"` + + // The layer's compatible runtimes. + CompatibleRuntimes []*string `type:"list"` + + // Details about the layer version. + Content *LayerVersionContentOutput `type:"structure"` + + // The date that the layer version was created, in ISO-8601 format (https://www.w3.org/TR/NOTE-datetime) + // (YYYY-MM-DDThh:mm:ss.sTZD). + CreatedDate *string `type:"string"` + + // The description of the version. + Description *string `type:"string"` + + // The Amazon Resource Name (ARN) of the function layer. + LayerArn *string `min:"1" type:"string"` + + // The ARN of the layer version. + LayerVersionArn *string `min:"1" type:"string"` + + // The layer's software license. + LicenseInfo *string `type:"string"` + + // The version number. + Version *int64 `type:"long"` +} + +// String returns the string representation +func (s PublishLayerVersionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PublishLayerVersionOutput) GoString() string { + return s.String() +} + +// SetCompatibleRuntimes sets the CompatibleRuntimes field's value. +func (s *PublishLayerVersionOutput) SetCompatibleRuntimes(v []*string) *PublishLayerVersionOutput { + s.CompatibleRuntimes = v + return s +} + +// SetContent sets the Content field's value. +func (s *PublishLayerVersionOutput) SetContent(v *LayerVersionContentOutput) *PublishLayerVersionOutput { + s.Content = v + return s +} + +// SetCreatedDate sets the CreatedDate field's value. +func (s *PublishLayerVersionOutput) SetCreatedDate(v string) *PublishLayerVersionOutput { + s.CreatedDate = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *PublishLayerVersionOutput) SetDescription(v string) *PublishLayerVersionOutput { + s.Description = &v + return s +} + +// SetLayerArn sets the LayerArn field's value. +func (s *PublishLayerVersionOutput) SetLayerArn(v string) *PublishLayerVersionOutput { + s.LayerArn = &v + return s +} + +// SetLayerVersionArn sets the LayerVersionArn field's value. +func (s *PublishLayerVersionOutput) SetLayerVersionArn(v string) *PublishLayerVersionOutput { + s.LayerVersionArn = &v + return s +} + +// SetLicenseInfo sets the LicenseInfo field's value. +func (s *PublishLayerVersionOutput) SetLicenseInfo(v string) *PublishLayerVersionOutput { + s.LicenseInfo = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *PublishLayerVersionOutput) SetVersion(v int64) *PublishLayerVersionOutput { + s.Version = &v + return s +} + type PublishVersionInput struct { _ struct{} `type:"structure"` @@ -6068,12 +7879,18 @@ type PublishVersionInput struct { // Lambda copies the description from the $LATEST version. Description *string `type:"string"` - // The Lambda function name. You can specify a function name (for example, Thumbnail) - // or you can specify Amazon Resource Name (ARN) of the function (for example, - // arn:aws:lambda:us-west-2:account-id:function:ThumbNail). AWS Lambda also - // allows you to specify a partial ARN (for example, account-id:Thumbnail). - // Note that the length constraint applies only to the ARN. If you specify only - // the function name, it is limited to 64 characters in length. + // The name of the lambda function. + // + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` @@ -6081,8 +7898,8 @@ type PublishVersionInput struct { // An optional value you can use to ensure you are updating the latest update // of the function version or alias. If the RevisionID you pass doesn't match // the latest RevisionId of the function or alias, it will fail with an error - // message, advising you to retrieve the latest function version or alias RevisionID - // using either or . + // message, advising you retrieve the latest function version or alias RevisionID + // using either GetFunction or GetAlias. RevisionId *string `type:"string"` } @@ -6139,14 +7956,23 @@ func (s *PublishVersionInput) SetRevisionId(v string) *PublishVersionInput { type PutFunctionConcurrencyInput struct { _ struct{} `type:"structure"` - // The name of the function you are setting concurrent execution limits on. - // For more information, see concurrent-executions. + // The name of the Lambda function. + // + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - // The concurrent execution limit reserved for this function. For more information, - // see concurrent-executions. + // The concurrent execution limit reserved for this function. // // ReservedConcurrentExecutions is a required field ReservedConcurrentExecutions *int64 `type:"integer" required:"true"` @@ -6197,7 +8023,7 @@ type PutFunctionConcurrencyOutput struct { _ struct{} `type:"structure"` // The number of concurrent executions reserved for this function. For more - // information, see concurrent-executions. + // information, see Managing Concurrency (http://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html). ReservedConcurrentExecutions *int64 `type:"integer"` } @@ -6217,31 +8043,130 @@ func (s *PutFunctionConcurrencyOutput) SetReservedConcurrentExecutions(v int64) return s } +type RemoveLayerVersionPermissionInput struct { + _ struct{} `type:"structure"` + + // The name of the layer. + // + // LayerName is a required field + LayerName *string `location:"uri" locationName:"LayerName" min:"1" type:"string" required:"true"` + + // Only update the policy if the revision ID matches the ID specified. Use this + // option to avoid modifying a policy that has changed since you last read it. + RevisionId *string `location:"querystring" locationName:"RevisionId" type:"string"` + + // The identifier that was specified when the statement was added. + // + // StatementId is a required field + StatementId *string `location:"uri" locationName:"StatementId" min:"1" type:"string" required:"true"` + + // The version number. + // + // VersionNumber is a required field + VersionNumber *int64 `location:"uri" locationName:"VersionNumber" type:"long" required:"true"` +} + +// String returns the string representation +func (s RemoveLayerVersionPermissionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveLayerVersionPermissionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemoveLayerVersionPermissionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveLayerVersionPermissionInput"} + if s.LayerName == nil { + invalidParams.Add(request.NewErrParamRequired("LayerName")) + } + if s.LayerName != nil && len(*s.LayerName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LayerName", 1)) + } + if s.StatementId == nil { + invalidParams.Add(request.NewErrParamRequired("StatementId")) + } + if s.StatementId != nil && len(*s.StatementId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StatementId", 1)) + } + if s.VersionNumber == nil { + invalidParams.Add(request.NewErrParamRequired("VersionNumber")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLayerName sets the LayerName field's value. +func (s *RemoveLayerVersionPermissionInput) SetLayerName(v string) *RemoveLayerVersionPermissionInput { + s.LayerName = &v + return s +} + +// SetRevisionId sets the RevisionId field's value. +func (s *RemoveLayerVersionPermissionInput) SetRevisionId(v string) *RemoveLayerVersionPermissionInput { + s.RevisionId = &v + return s +} + +// SetStatementId sets the StatementId field's value. +func (s *RemoveLayerVersionPermissionInput) SetStatementId(v string) *RemoveLayerVersionPermissionInput { + s.StatementId = &v + return s +} + +// SetVersionNumber sets the VersionNumber field's value. +func (s *RemoveLayerVersionPermissionInput) SetVersionNumber(v int64) *RemoveLayerVersionPermissionInput { + s.VersionNumber = &v + return s +} + +type RemoveLayerVersionPermissionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s RemoveLayerVersionPermissionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveLayerVersionPermissionOutput) GoString() string { + return s.String() +} + type RemovePermissionInput struct { _ struct{} `type:"structure"` - // Lambda function whose resource policy you want to remove a permission from. + // The name of the Lambda function. + // + // Name formats + // + // * Function name - MyFunction. // - // You can specify a function name (for example, Thumbnail) or you can specify - // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail). - // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail). - // Note that the length constraint applies only to the ARN. If you specify only - // the function name, it is limited to 64 characters in length. + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` - // You can specify this optional parameter to remove permission associated with - // a specific function version or function alias. If you don't specify this - // parameter, the API removes permission associated with the unqualified function - // ARN. + // Specify a version or alias to remove permissions from a published version + // of the function. Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"` // An optional value you can use to ensure you are updating the latest update // of the function version or alias. If the RevisionID you pass doesn't match // the latest RevisionId of the function or alias, it will fail with an error // message, advising you to retrieve the latest function version or alias RevisionID - // using either or . + // using either GetFunction or GetAlias. RevisionId *string `location:"querystring" locationName:"RevisionId" type:"string"` // Statement ID of the permission to remove. @@ -6357,6 +8282,9 @@ func (s *TagResourceInput) Validate() error { if s.Resource == nil { invalidParams.Add(request.NewErrParamRequired("Resource")) } + if s.Resource != nil && len(*s.Resource) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Resource", 1)) + } if s.Tags == nil { invalidParams.Add(request.NewErrParamRequired("Tags")) } @@ -6393,15 +8321,11 @@ func (s TagResourceOutput) GoString() string { return s.String() } -// The parent object that contains your function's tracing settings. +// The function's AWS X-Ray tracing configuration. type TracingConfig struct { _ struct{} `type:"structure"` - // Can be either PassThrough or Active. If PassThrough, Lambda will only trace - // the request from an upstream service if it contains a tracing header with - // "sampled=1". If Active, Lambda will respect any tracing header it receives - // from an upstream service. If no tracing header is received, Lambda will call - // X-Ray for a tracing decision. + // The tracing mode. Mode *string `type:"string" enum:"TracingMode"` } @@ -6421,11 +8345,11 @@ func (s *TracingConfig) SetMode(v string) *TracingConfig { return s } -// Parent object of the tracing information associated with your Lambda function. +// The function's AWS X-Ray tracing configuration. type TracingConfigResponse struct { _ struct{} `type:"structure"` - // The tracing mode associated with your Lambda function. + // The tracing mode. Mode *string `type:"string" enum:"TracingMode"` } @@ -6479,6 +8403,9 @@ func (s *UntagResourceInput) Validate() error { if s.Resource == nil { invalidParams.Add(request.NewErrParamRequired("Resource")) } + if s.Resource != nil && len(*s.Resource) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Resource", 1)) + } if s.TagKeys == nil { invalidParams.Add(request.NewErrParamRequired("TagKeys")) } @@ -6521,9 +8448,18 @@ type UpdateAliasInput struct { // You can change the description of the alias using this parameter. Description *string `type:"string"` - // The function name for which the alias is created. Note that the length constraint - // applies only to the ARN. If you specify only the function name, it is limited - // to 64 characters in length. + // The name of the lambda function. + // + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` @@ -6540,13 +8476,13 @@ type UpdateAliasInput struct { // An optional value you can use to ensure you are updating the latest update // of the function version or alias. If the RevisionID you pass doesn't match // the latest RevisionId of the function or alias, it will fail with an error - // message, advising you to retrieve the latest function version or alias RevisionID - // using either or . + // message, advising you retrieve the latest function version or alias RevisionID + // using either GetFunction or GetAlias. RevisionId *string `type:"string"` // Specifies an additional version your alias can point to, allowing you to // dictate what percentage of traffic will invoke each version. For more information, - // see lambda-traffic-shifting-using-aliases. + // see Traffic Shifting Using Aliases (http://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html). RoutingConfig *AliasRoutingConfiguration `type:"structure"` } @@ -6624,32 +8560,35 @@ func (s *UpdateAliasInput) SetRoutingConfig(v *AliasRoutingConfiguration) *Updat type UpdateEventSourceMappingInput struct { _ struct{} `type:"structure"` - // The maximum number of stream records that can be sent to your Lambda function - // for a single invocation. + // The maximum number of items to retrieve in a single batch. + // + // * Amazon Kinesis - Default 100. Max 10,000. + // + // * Amazon DynamoDB Streams - Default 100. Max 1,000. + // + // * Amazon Simple Queue Service - Default 10. Max 10. BatchSize *int64 `min:"1" type:"integer"` - // Specifies whether AWS Lambda should actively poll the stream or not. If disabled, - // AWS Lambda will not poll the stream. + // Disables the event source mapping to pause polling and invocation. Enabled *bool `type:"boolean"` - // The Lambda function to which you want the stream records sent. + // The name of the Lambda function. + // + // Name formats + // + // * Function name - MyFunction. // - // You can specify a function name (for example, Thumbnail) or you can specify - // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail). - // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail). - // Note that the length constraint applies only to the ARN. If you specify only - // the function name, it is limited to 64 characters in length. + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. // - // If you are using versioning, you can also provide a qualified function ARN - // (ARN that is qualified with function version or alias name as suffix). For - // more information about versioning, see AWS Lambda Function Versioning and - // Aliases (http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html) + // * Version or Alias ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD. // - // Note that the length constraint applies only to the ARN. If you specify only - // the function name, it is limited to 64 character in length. + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it's limited to 64 characters in length. FunctionName *string `min:"1" type:"string"` - // The event source mapping identifier. + // The identifier of the event source mapping. // // UUID is a required field UUID *string `location:"uri" locationName:"UUID" type:"string" required:"true"` @@ -6677,6 +8616,9 @@ func (s *UpdateEventSourceMappingInput) Validate() error { if s.UUID == nil { invalidParams.Add(request.NewErrParamRequired("UUID")) } + if s.UUID != nil && len(*s.UUID) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UUID", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -6719,13 +8661,18 @@ type UpdateFunctionCodeInput struct { // returned in the response. DryRun *bool `type:"boolean"` - // The existing Lambda function name whose code you want to replace. + // The name of the Lambda function. + // + // Name formats // - // You can specify a function name (for example, Thumbnail) or you can specify - // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail). - // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail). - // Note that the length constraint applies only to the ARN. If you specify only - // the function name, it is limited to 64 characters in length. + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` @@ -6738,7 +8685,7 @@ type UpdateFunctionCodeInput struct { // of the function version or alias. If the RevisionID you pass doesn't match // the latest RevisionId of the function or alias, it will fail with an error // message, advising you to retrieve the latest function version or alias RevisionID - // using either or . + // using either using using either GetFunction or GetAlias. RevisionId *string `type:"string"` // Amazon S3 bucket name where the .zip file containing your deployment package @@ -6759,7 +8706,7 @@ type UpdateFunctionCodeInput struct { // Permissions (http://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html#lambda-intro-execution-role.html). // // ZipFile is automatically base64 encoded/decoded by the SDK. - ZipFile []byte `type:"blob"` + ZipFile []byte `type:"blob" sensitive:"true"` } // String returns the string representation @@ -6848,8 +8795,9 @@ func (s *UpdateFunctionCodeInput) SetZipFile(v []byte) *UpdateFunctionCodeInput type UpdateFunctionConfigurationInput struct { _ struct{} `type:"structure"` - // The parent object that contains the target ARN (Amazon Resource Name) of - // an Amazon SQS queue or Amazon SNS topic. For more information, see dlq. + // A dead letter queue configuration that specifies the queue or topic where + // Lambda sends asynchronous events when they fail processing. For more information, + // see Dead Letter Queues (http://docs.aws.amazon.com/lambda/latest/dg/dlq.html). DeadLetterConfig *DeadLetterConfig `type:"structure"` // A short user-defined function description. AWS Lambda does not use this value. @@ -6861,11 +8809,16 @@ type UpdateFunctionConfigurationInput struct { // The name of the Lambda function. // - // You can specify a function name (for example, Thumbnail) or you can specify - // Amazon Resource Name (ARN) of the function (for example, arn:aws:lambda:us-west-2:account-id:function:ThumbNail). - // AWS Lambda also allows you to specify a partial ARN (for example, account-id:Thumbnail). - // Note that the length constraint applies only to the ARN. If you specify only - // the function name, it is limited to 64 character in length. + // Name formats + // + // * Function name - MyFunction. + // + // * Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. + // + // * Partial ARN - 123456789012:function:MyFunction. + // + // The length constraint applies only to the full ARN. If you specify only the + // function name, it is limited to 64 characters in length. // // FunctionName is a required field FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` @@ -6879,6 +8832,10 @@ type UpdateFunctionConfigurationInput struct { // key, pass in an empty string ("") for this parameter. KMSKeyArn *string `type:"string"` + // A list of function layers (http://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html) + // to add to the function's execution environment. + Layers []*string `type:"list"` + // The amount of memory, in MB, your Lambda function is given. AWS Lambda uses // this memory size to infer the amount of CPU allocated to your function. Your // function use-case determines your CPU and memory requirements. For example, @@ -6891,40 +8848,26 @@ type UpdateFunctionConfigurationInput struct { // of the function version or alias. If the RevisionID you pass doesn't match // the latest RevisionId of the function or alias, it will fail with an error // message, advising you to retrieve the latest function version or alias RevisionID - // using either or . + // using either GetFunction or GetAlias. RevisionId *string `type:"string"` // The Amazon Resource Name (ARN) of the IAM role that Lambda will assume when // it executes your function. Role *string `type:"string"` - // The runtime environment for the Lambda function. - // - // To use the Python runtime v3.6, set the value to "python3.6". To use the - // Python runtime v2.7, set the value to "python2.7". To use the Node.js runtime - // v6.10, set the value to "nodejs6.10". To use the Node.js runtime v4.3, set - // the value to "nodejs4.3". To use the .NET Core runtime v1.0, set the value - // to "dotnetcore1.0". To use the .NET Core runtime v2.0, set the value to "dotnetcore2.0". - // - // Node v0.10.42 is currently marked as deprecated. You must migrate existing - // functions to the newer Node.js runtime versions available on AWS Lambda (nodejs4.3 - // or nodejs6.10) as soon as possible. Failure to do so will result in an invalid - // parameter error being returned. Note that you will have to follow this procedure - // for each region that contains functions written in the Node v0.10.42 runtime. + // The runtime version for the function. Runtime *string `type:"string" enum:"Runtime"` - // The function execution time at which AWS Lambda should terminate the function. - // Because the execution time has cost implications, we recommend you set this - // value based on your expected execution time. The default is 3 seconds. + // The amount of time that Lambda allows a function to run before terminating + // it. The default is 3 seconds. The maximum allowed value is 900 seconds. Timeout *int64 `min:"1" type:"integer"` - // The parent object that contains your function's tracing settings. + // Set Mode to Active to sample and trace a subset of incoming requests with + // AWS X-Ray. TracingConfig *TracingConfig `type:"structure"` - // If your Lambda function accesses resources in a VPC, you provide this parameter - // identifying the list of security group IDs and subnet IDs. These must belong - // to the same VPC. You must provide at least one security group and one subnet - // ID. + // Specify security groups and subnets in a VPC to which your Lambda function + // needs access. VpcConfig *VpcConfig `type:"structure"` } @@ -6996,6 +8939,12 @@ func (s *UpdateFunctionConfigurationInput) SetKMSKeyArn(v string) *UpdateFunctio return s } +// SetLayers sets the Layers field's value. +func (s *UpdateFunctionConfigurationInput) SetLayers(v []*string) *UpdateFunctionConfigurationInput { + s.Layers = v + return s +} + // SetMemorySize sets the MemorySize field's value. func (s *UpdateFunctionConfigurationInput) SetMemorySize(v int64) *UpdateFunctionConfigurationInput { s.MemorySize = &v @@ -7038,17 +8987,14 @@ func (s *UpdateFunctionConfigurationInput) SetVpcConfig(v *VpcConfig) *UpdateFun return s } -// If your Lambda function accesses resources in a VPC, you provide this parameter -// identifying the list of security group IDs and subnet IDs. These must belong -// to the same VPC. You must provide at least one security group and one subnet -// ID. +// The VPC security groups and subnets attached to a Lambda function. type VpcConfig struct { _ struct{} `type:"structure"` - // A list of one or more security groups IDs in your VPC. + // A list of VPC security groups IDs. SecurityGroupIds []*string `type:"list"` - // A list of one or more subnet IDs in your VPC. + // A list of VPC subnet IDs. SubnetIds []*string `type:"list"` } @@ -7074,17 +9020,17 @@ func (s *VpcConfig) SetSubnetIds(v []*string) *VpcConfig { return s } -// VPC configuration associated with your Lambda function. +// The VPC security groups and subnets attached to a Lambda function. type VpcConfigResponse struct { _ struct{} `type:"structure"` - // A list of security group IDs associated with the Lambda function. + // A list of VPC security groups IDs. SecurityGroupIds []*string `type:"list"` - // A list of subnet IDs associated with the Lambda function. + // A list of VPC subnet IDs. SubnetIds []*string `type:"list"` - // The VPC ID associated with you Lambda function. + // The ID of the VPC. VpcId *string `type:"string"` } @@ -7173,6 +9119,9 @@ const ( // RuntimePython36 is a Runtime enum value RuntimePython36 = "python3.6" + // RuntimePython37 is a Runtime enum value + RuntimePython37 = "python3.7" + // RuntimeDotnetcore10 is a Runtime enum value RuntimeDotnetcore10 = "dotnetcore1.0" @@ -7187,6 +9136,12 @@ const ( // RuntimeGo1X is a Runtime enum value RuntimeGo1X = "go1.x" + + // RuntimeRuby25 is a Runtime enum value + RuntimeRuby25 = "ruby2.5" + + // RuntimeProvided is a Runtime enum value + RuntimeProvided = "provided" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/lambda/errors.go b/vendor/github.com/aws/aws-sdk-go/service/lambda/errors.go index 447b49ed1a..4e12ca08f7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lambda/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lambda/errors.go @@ -12,6 +12,8 @@ const ( // ErrCodeEC2AccessDeniedException for service response error code // "EC2AccessDeniedException". + // + // Need additional permissions to configure VPC settings. ErrCodeEC2AccessDeniedException = "EC2AccessDeniedException" // ErrCodeEC2ThrottledException for service response error code @@ -72,7 +74,7 @@ const ( // ErrCodeInvalidZipFileException for service response error code // "InvalidZipFileException". // - // AWS Lambda could not unzip the function zip file. + // AWS Lambda could not unzip the deployment package. ErrCodeInvalidZipFileException = "InvalidZipFileException" // ErrCodeKMSAccessDeniedException for service response error code @@ -160,6 +162,8 @@ const ( // ErrCodeTooManyRequestsException for service response error code // "TooManyRequestsException". + // + // Request throughput limit exceeded ErrCodeTooManyRequestsException = "TooManyRequestsException" // ErrCodeUnsupportedMediaTypeException for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/api.go b/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/api.go index 121beb2d73..39ce69d1e7 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lexmodelbuildingservice/api.go @@ -18,7 +18,7 @@ const opCreateBotVersion = "CreateBotVersion" // CreateBotVersionRequest generates a "aws/request.Request" representing the // client's request for the CreateBotVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -125,7 +125,7 @@ const opCreateIntentVersion = "CreateIntentVersion" // CreateIntentVersionRequest generates a "aws/request.Request" representing the // client's request for the CreateIntentVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -234,7 +234,7 @@ const opCreateSlotTypeVersion = "CreateSlotTypeVersion" // CreateSlotTypeVersionRequest generates a "aws/request.Request" representing the // client's request for the CreateSlotTypeVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -342,7 +342,7 @@ const opDeleteBot = "DeleteBot" // DeleteBotRequest generates a "aws/request.Request" representing the // client's request for the DeleteBot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -376,8 +376,7 @@ func (c *LexModelBuildingService) DeleteBotRequest(input *DeleteBotInput) (req * output = &DeleteBotOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -459,7 +458,7 @@ const opDeleteBotAlias = "DeleteBotAlias" // DeleteBotAliasRequest generates a "aws/request.Request" representing the // client's request for the DeleteBotAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -493,8 +492,7 @@ func (c *LexModelBuildingService) DeleteBotAliasRequest(input *DeleteBotAliasInp output = &DeleteBotAliasOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -575,7 +573,7 @@ const opDeleteBotChannelAssociation = "DeleteBotChannelAssociation" // DeleteBotChannelAssociationRequest generates a "aws/request.Request" representing the // client's request for the DeleteBotChannelAssociation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -609,8 +607,7 @@ func (c *LexModelBuildingService) DeleteBotChannelAssociationRequest(input *Dele output = &DeleteBotChannelAssociationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -673,7 +670,7 @@ const opDeleteBotVersion = "DeleteBotVersion" // DeleteBotVersionRequest generates a "aws/request.Request" representing the // client's request for the DeleteBotVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -707,8 +704,7 @@ func (c *LexModelBuildingService) DeleteBotVersionRequest(input *DeleteBotVersio output = &DeleteBotVersionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -784,7 +780,7 @@ const opDeleteIntent = "DeleteIntent" // DeleteIntentRequest generates a "aws/request.Request" representing the // client's request for the DeleteIntent operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -818,8 +814,7 @@ func (c *LexModelBuildingService) DeleteIntentRequest(input *DeleteIntentInput) output = &DeleteIntentOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -905,7 +900,7 @@ const opDeleteIntentVersion = "DeleteIntentVersion" // DeleteIntentVersionRequest generates a "aws/request.Request" representing the // client's request for the DeleteIntentVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -939,8 +934,7 @@ func (c *LexModelBuildingService) DeleteIntentVersionRequest(input *DeleteIntent output = &DeleteIntentVersionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1016,7 +1010,7 @@ const opDeleteSlotType = "DeleteSlotType" // DeleteSlotTypeRequest generates a "aws/request.Request" representing the // client's request for the DeleteSlotType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1050,8 +1044,7 @@ func (c *LexModelBuildingService) DeleteSlotTypeRequest(input *DeleteSlotTypeInp output = &DeleteSlotTypeOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1139,7 +1132,7 @@ const opDeleteSlotTypeVersion = "DeleteSlotTypeVersion" // DeleteSlotTypeVersionRequest generates a "aws/request.Request" representing the // client's request for the DeleteSlotTypeVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1173,8 +1166,7 @@ func (c *LexModelBuildingService) DeleteSlotTypeVersionRequest(input *DeleteSlot output = &DeleteSlotTypeVersionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1250,7 +1242,7 @@ const opDeleteUtterances = "DeleteUtterances" // DeleteUtterancesRequest generates a "aws/request.Request" representing the // client's request for the DeleteUtterances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1284,8 +1276,7 @@ func (c *LexModelBuildingService) DeleteUtterancesRequest(input *DeleteUtterance output = &DeleteUtterancesOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1352,7 +1343,7 @@ const opGetBot = "GetBot" // GetBotRequest generates a "aws/request.Request" representing the // client's request for the GetBot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1445,7 +1436,7 @@ const opGetBotAlias = "GetBotAlias" // GetBotAliasRequest generates a "aws/request.Request" representing the // client's request for the GetBotAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1538,7 +1529,7 @@ const opGetBotAliases = "GetBotAliases" // GetBotAliasesRequest generates a "aws/request.Request" representing the // client's request for the GetBotAliases operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1682,7 +1673,7 @@ const opGetBotChannelAssociation = "GetBotChannelAssociation" // GetBotChannelAssociationRequest generates a "aws/request.Request" representing the // client's request for the GetBotChannelAssociation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1776,7 +1767,7 @@ const opGetBotChannelAssociations = "GetBotChannelAssociations" // GetBotChannelAssociationsRequest generates a "aws/request.Request" representing the // client's request for the GetBotChannelAssociations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1921,7 +1912,7 @@ const opGetBotVersions = "GetBotVersions" // GetBotVersionsRequest generates a "aws/request.Request" representing the // client's request for the GetBotVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2077,7 +2068,7 @@ const opGetBots = "GetBots" // GetBotsRequest generates a "aws/request.Request" representing the // client's request for the GetBots operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2232,7 +2223,7 @@ const opGetBuiltinIntent = "GetBuiltinIntent" // GetBuiltinIntentRequest generates a "aws/request.Request" representing the // client's request for the GetBuiltinIntent operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2324,7 +2315,7 @@ const opGetBuiltinIntents = "GetBuiltinIntents" // GetBuiltinIntentsRequest generates a "aws/request.Request" representing the // client's request for the GetBuiltinIntents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2468,7 +2459,7 @@ const opGetBuiltinSlotTypes = "GetBuiltinSlotTypes" // GetBuiltinSlotTypesRequest generates a "aws/request.Request" representing the // client's request for the GetBuiltinSlotTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2615,7 +2606,7 @@ const opGetExport = "GetExport" // GetExportRequest generates a "aws/request.Request" representing the // client's request for the GetExport operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2705,7 +2696,7 @@ const opGetImport = "GetImport" // GetImportRequest generates a "aws/request.Request" representing the // client's request for the GetImport operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2795,7 +2786,7 @@ const opGetIntent = "GetIntent" // GetIntentRequest generates a "aws/request.Request" representing the // client's request for the GetIntent operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2888,7 +2879,7 @@ const opGetIntentVersions = "GetIntentVersions" // GetIntentVersionsRequest generates a "aws/request.Request" representing the // client's request for the GetIntentVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3044,7 +3035,7 @@ const opGetIntents = "GetIntents" // GetIntentsRequest generates a "aws/request.Request" representing the // client's request for the GetIntents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3198,7 +3189,7 @@ const opGetSlotType = "GetSlotType" // GetSlotTypeRequest generates a "aws/request.Request" representing the // client's request for the GetSlotType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3291,7 +3282,7 @@ const opGetSlotTypeVersions = "GetSlotTypeVersions" // GetSlotTypeVersionsRequest generates a "aws/request.Request" representing the // client's request for the GetSlotTypeVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3447,7 +3438,7 @@ const opGetSlotTypes = "GetSlotTypes" // GetSlotTypesRequest generates a "aws/request.Request" representing the // client's request for the GetSlotTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3601,7 +3592,7 @@ const opGetUtterancesView = "GetUtterancesView" // GetUtterancesViewRequest generates a "aws/request.Request" representing the // client's request for the GetUtterancesView operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3707,7 +3698,7 @@ const opPutBot = "PutBot" // PutBotRequest generates a "aws/request.Request" representing the // client's request for the PutBot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3813,7 +3804,7 @@ const opPutBotAlias = "PutBotAlias" // PutBotAliasRequest generates a "aws/request.Request" representing the // client's request for the PutBotAlias operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3910,7 +3901,7 @@ const opPutIntent = "PutIntent" // PutIntentRequest generates a "aws/request.Request" representing the // client's request for the PutIntent operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4048,7 +4039,7 @@ const opPutSlotType = "PutSlotType" // PutSlotTypeRequest generates a "aws/request.Request" representing the // client's request for the PutSlotType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4154,7 +4145,7 @@ const opStartImport = "StartImport" // StartImportRequest generates a "aws/request.Request" representing the // client's request for the StartImport operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4324,7 +4315,7 @@ type BotChannelAssociation struct { BotAlias *string `locationName:"botAlias" min:"1" type:"string"` // Provides information necessary to communicate with the messaging platform. - BotConfiguration map[string]*string `locationName:"botConfiguration" min:"1" type:"map"` + BotConfiguration map[string]*string `locationName:"botConfiguration" min:"1" type:"map" sensitive:"true"` // The name of the Amazon Lex bot to which this association is being made. // @@ -6394,7 +6385,7 @@ type GetBotChannelAssociationOutput struct { // Provides information that the messaging platform needs to communicate with // the Amazon Lex bot. - BotConfiguration map[string]*string `locationName:"botConfiguration" min:"1" type:"map"` + BotConfiguration map[string]*string `locationName:"botConfiguration" min:"1" type:"map" sensitive:"true"` // The name of the Amazon Lex bot. BotName *string `locationName:"botName" min:"2" type:"string"` @@ -6661,6 +6652,9 @@ func (s *GetBotInput) Validate() error { if s.VersionOrAlias == nil { invalidParams.Add(request.NewErrParamRequired("VersionOrAlias")) } + if s.VersionOrAlias != nil && len(*s.VersionOrAlias) < 1 { + invalidParams.Add(request.NewErrParamMinLen("VersionOrAlias", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -7085,6 +7079,9 @@ func (s *GetBuiltinIntentInput) Validate() error { if s.Signature == nil { invalidParams.Add(request.NewErrParamRequired("Signature")) } + if s.Signature != nil && len(*s.Signature) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Signature", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -7545,6 +7542,9 @@ func (s *GetImportInput) Validate() error { if s.ImportId == nil { invalidParams.Add(request.NewErrParamRequired("ImportId")) } + if s.ImportId != nil && len(*s.ImportId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ImportId", 1)) + } if invalidParams.Len() > 0 { return invalidParams diff --git a/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go b/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go index 8e8583195f..47e0f353d5 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/lightsail/api.go @@ -3,6 +3,7 @@ package lightsail import ( + "fmt" "time" "github.com/aws/aws-sdk-go/aws" @@ -15,7 +16,7 @@ const opAllocateStaticIp = "AllocateStaticIp" // AllocateStaticIpRequest generates a "aws/request.Request" representing the // client's request for the AllocateStaticIp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -119,7 +120,7 @@ const opAttachDisk = "AttachDisk" // AttachDiskRequest generates a "aws/request.Request" representing the // client's request for the AttachDisk operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -161,6 +162,10 @@ func (c *Lightsail) AttachDiskRequest(input *AttachDiskInput) (req *request.Requ // Attaches a block storage disk to a running or stopped Lightsail instance // and exposes it to the instance with the specified disk name. // +// The attach disk operation supports tag-based access control via resource +// tags applied to the resource identified by diskName. For more information, +// see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). +// // 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. @@ -224,7 +229,7 @@ const opAttachInstancesToLoadBalancer = "AttachInstancesToLoadBalancer" // AttachInstancesToLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the AttachInstancesToLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -268,6 +273,10 @@ func (c *Lightsail) AttachInstancesToLoadBalancerRequest(input *AttachInstancesT // After some time, the instances are attached to the load balancer and the // health check status is available. // +// The attach instances to load balancer operation supports tag-based access +// control via resource tags applied to the resource identified by loadBalancerName. +// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). +// // 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. @@ -331,7 +340,7 @@ const opAttachLoadBalancerTlsCertificate = "AttachLoadBalancerTlsCertificate" // AttachLoadBalancerTlsCertificateRequest generates a "aws/request.Request" representing the // client's request for the AttachLoadBalancerTlsCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -379,6 +388,10 @@ func (c *Lightsail) AttachLoadBalancerTlsCertificateRequest(input *AttachLoadBal // certificate, and it will replace the existing one and become the attached // certificate. // +// The attach load balancer tls certificate operation supports tag-based access +// control via resource tags applied to the resource identified by loadBalancerName. +// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). +// // 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. @@ -442,7 +455,7 @@ const opAttachStaticIp = "AttachStaticIp" // AttachStaticIpRequest generates a "aws/request.Request" representing the // client's request for the AttachStaticIp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -546,7 +559,7 @@ const opCloseInstancePublicPorts = "CloseInstancePublicPorts" // CloseInstancePublicPortsRequest generates a "aws/request.Request" representing the // client's request for the CloseInstancePublicPorts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -587,6 +600,10 @@ func (c *Lightsail) CloseInstancePublicPortsRequest(input *CloseInstancePublicPo // // Closes the public ports on a specific Amazon Lightsail instance. // +// The close instance public ports operation supports tag-based access control +// via resource tags applied to the resource identified by instanceName. For +// more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). +// // 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. @@ -645,12 +662,229 @@ func (c *Lightsail) CloseInstancePublicPortsWithContext(ctx aws.Context, input * return out, req.Send() } +const opCopySnapshot = "CopySnapshot" + +// CopySnapshotRequest generates a "aws/request.Request" representing the +// client's request for the CopySnapshot 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 CopySnapshot for more information on using the CopySnapshot +// 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 CopySnapshotRequest method. +// req, resp := client.CopySnapshotRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CopySnapshot +func (c *Lightsail) CopySnapshotRequest(input *CopySnapshotInput) (req *request.Request, output *CopySnapshotOutput) { + op := &request.Operation{ + Name: opCopySnapshot, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CopySnapshotInput{} + } + + output = &CopySnapshotOutput{} + req = c.newRequest(op, input, output) + return +} + +// CopySnapshot API operation for Amazon Lightsail. +// +// Copies an instance or disk snapshot from one AWS Region to another in Amazon +// Lightsail. +// +// 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 Lightsail's +// API operation CopySnapshot for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CopySnapshot +func (c *Lightsail) CopySnapshot(input *CopySnapshotInput) (*CopySnapshotOutput, error) { + req, out := c.CopySnapshotRequest(input) + return out, req.Send() +} + +// CopySnapshotWithContext is the same as CopySnapshot with the addition of +// the ability to pass a context and additional request options. +// +// See CopySnapshot 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 *Lightsail) CopySnapshotWithContext(ctx aws.Context, input *CopySnapshotInput, opts ...request.Option) (*CopySnapshotOutput, error) { + req, out := c.CopySnapshotRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateCloudFormationStack = "CreateCloudFormationStack" + +// CreateCloudFormationStackRequest generates a "aws/request.Request" representing the +// client's request for the CreateCloudFormationStack 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 CreateCloudFormationStack for more information on using the CreateCloudFormationStack +// 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 CreateCloudFormationStackRequest method. +// req, resp := client.CreateCloudFormationStackRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateCloudFormationStack +func (c *Lightsail) CreateCloudFormationStackRequest(input *CreateCloudFormationStackInput) (req *request.Request, output *CreateCloudFormationStackOutput) { + op := &request.Operation{ + Name: opCreateCloudFormationStack, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateCloudFormationStackInput{} + } + + output = &CreateCloudFormationStackOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateCloudFormationStack API operation for Amazon Lightsail. +// +// Creates an AWS CloudFormation stack, which creates a new Amazon EC2 instance +// from an exported Amazon Lightsail snapshot. This operation results in a CloudFormation +// stack record that can be used to track the AWS CloudFormation stack created. +// Use the get cloud formation stack records operation to get a list of the +// CloudFormation stacks created. +// +// Wait until after your new Amazon EC2 instance is created before running the +// create cloud formation stack operation again with the same export snapshot +// record. +// +// 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 Lightsail's +// API operation CreateCloudFormationStack for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateCloudFormationStack +func (c *Lightsail) CreateCloudFormationStack(input *CreateCloudFormationStackInput) (*CreateCloudFormationStackOutput, error) { + req, out := c.CreateCloudFormationStackRequest(input) + return out, req.Send() +} + +// CreateCloudFormationStackWithContext is the same as CreateCloudFormationStack with the addition of +// the ability to pass a context and additional request options. +// +// See CreateCloudFormationStack 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 *Lightsail) CreateCloudFormationStackWithContext(ctx aws.Context, input *CreateCloudFormationStackInput, opts ...request.Option) (*CreateCloudFormationStackOutput, error) { + req, out := c.CreateCloudFormationStackRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateDisk = "CreateDisk" // CreateDiskRequest generates a "aws/request.Request" representing the // client's request for the CreateDisk operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -694,6 +928,9 @@ func (c *Lightsail) CreateDiskRequest(input *CreateDiskInput) (req *request.Requ // the regional endpoint that you send the HTTP request to. For more information, // see Regions and Availability Zones in Lightsail (https://lightsail.aws.amazon.com/ls/docs/overview/article/understanding-regions-and-availability-zones-in-amazon-lightsail). // +// The create disk operation supports tag-based access control via request tags. +// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). +// // 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. @@ -757,7 +994,7 @@ const opCreateDiskFromSnapshot = "CreateDiskFromSnapshot" // CreateDiskFromSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateDiskFromSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -801,6 +1038,10 @@ func (c *Lightsail) CreateDiskFromSnapshotRequest(input *CreateDiskFromSnapshotI // disk is created in the regional endpoint that you send the HTTP request to. // For more information, see Regions and Availability Zones in Lightsail (https://lightsail.aws.amazon.com/ls/docs/overview/article/understanding-regions-and-availability-zones-in-amazon-lightsail). // +// The create disk from snapshot operation supports tag-based access control +// via request tags and resource tags applied to the resource identified by +// diskSnapshotName. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). +// // 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. @@ -864,7 +1105,7 @@ const opCreateDiskSnapshot = "CreateDiskSnapshot" // CreateDiskSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateDiskSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -918,6 +1159,9 @@ func (c *Lightsail) CreateDiskSnapshotRequest(input *CreateDiskSnapshotInput) (r // snapshot. You may remount and use your disk while the snapshot status is // pending. // +// The create disk snapshot operation supports tag-based access control via +// request tags. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). +// // 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. @@ -981,7 +1225,7 @@ const opCreateDomain = "CreateDomain" // CreateDomainRequest generates a "aws/request.Request" representing the // client's request for the CreateDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1022,6 +1266,9 @@ func (c *Lightsail) CreateDomainRequest(input *CreateDomainInput) (req *request. // // Creates a domain resource for the specified domain (e.g., example.com). // +// The create domain operation supports tag-based access control via request +// tags. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). +// // 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. @@ -1085,7 +1332,7 @@ const opCreateDomainEntry = "CreateDomainEntry" // CreateDomainEntryRequest generates a "aws/request.Request" representing the // client's request for the CreateDomainEntry operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1127,6 +1374,10 @@ func (c *Lightsail) CreateDomainEntryRequest(input *CreateDomainEntryInput) (req // Creates one of the following entry records associated with the domain: A // record, CNAME record, TXT record, or MX record. // +// The create domain entry operation supports tag-based access control via resource +// tags applied to the resource identified by domainName. For more information, +// see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). +// // 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. @@ -1190,7 +1441,7 @@ const opCreateInstanceSnapshot = "CreateInstanceSnapshot" // CreateInstanceSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateInstanceSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1232,6 +1483,9 @@ func (c *Lightsail) CreateInstanceSnapshotRequest(input *CreateInstanceSnapshotI // Creates a snapshot of a specific virtual private server, or instance. You // can use a snapshot to create a new instance that is based on that snapshot. // +// The create instance snapshot operation supports tag-based access control +// via request tags. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). +// // 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. @@ -1295,7 +1549,7 @@ const opCreateInstances = "CreateInstances" // CreateInstancesRequest generates a "aws/request.Request" representing the // client's request for the CreateInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1335,6 +1589,14 @@ func (c *Lightsail) CreateInstancesRequest(input *CreateInstancesInput) (req *re // CreateInstances API operation for Amazon Lightsail. // // Creates one or more Amazon Lightsail virtual private servers, or instances. +// Create instances using active blueprints. Inactive blueprints are listed +// to support customers with existing instances but are not necessarily available +// for launch of new instances. Blueprints are marked inactive when they become +// outdated due to operating system updates or new application releases. Use +// the get blueprints operation to return a list of available blueprints. +// +// The create instances operation supports tag-based access control via request +// tags. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). // // 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 @@ -1399,7 +1661,7 @@ const opCreateInstancesFromSnapshot = "CreateInstancesFromSnapshot" // CreateInstancesFromSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateInstancesFromSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1441,6 +1703,10 @@ func (c *Lightsail) CreateInstancesFromSnapshotRequest(input *CreateInstancesFro // Uses a specific snapshot as a blueprint for creating one or more new instances // that are based on that identical configuration. // +// The create instances from snapshot operation supports tag-based access control +// via request tags and resource tags applied to the resource identified by +// instanceSnapshotName. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). +// // 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. @@ -1504,7 +1770,7 @@ const opCreateKeyPair = "CreateKeyPair" // CreateKeyPairRequest generates a "aws/request.Request" representing the // client's request for the CreateKeyPair operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1543,7 +1809,10 @@ func (c *Lightsail) CreateKeyPairRequest(input *CreateKeyPairInput) (req *reques // CreateKeyPair API operation for Amazon Lightsail. // -// Creates sn SSH key pair. +// Creates an SSH key pair. +// +// The create key pair operation supports tag-based access control via request +// tags. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). // // 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 @@ -1608,7 +1877,7 @@ const opCreateLoadBalancer = "CreateLoadBalancer" // CreateLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the CreateLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1656,6 +1925,9 @@ func (c *Lightsail) CreateLoadBalancerRequest(input *CreateLoadBalancerInput) (r // To change additional load balancer settings, use the UpdateLoadBalancerAttribute // operation. // +// The create load balancer operation supports tag-based access control via +// request tags. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). +// // 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. @@ -1719,7 +1991,7 @@ const opCreateLoadBalancerTlsCertificate = "CreateLoadBalancerTlsCertificate" // CreateLoadBalancerTlsCertificateRequest generates a "aws/request.Request" representing the // client's request for the CreateLoadBalancerTlsCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1762,6 +2034,10 @@ func (c *Lightsail) CreateLoadBalancerTlsCertificateRequest(input *CreateLoadBal // // TLS is just an updated, more secure version of Secure Socket Layer (SSL). // +// The create load balancer tls certificate operation supports tag-based access +// control via resource tags applied to the resource identified by loadBalancerName. +// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). +// // 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. @@ -1820,61 +2096,61 @@ func (c *Lightsail) CreateLoadBalancerTlsCertificateWithContext(ctx aws.Context, return out, req.Send() } -const opDeleteDisk = "DeleteDisk" +const opCreateRelationalDatabase = "CreateRelationalDatabase" -// DeleteDiskRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDisk operation. The "output" return +// CreateRelationalDatabaseRequest generates a "aws/request.Request" representing the +// client's request for the CreateRelationalDatabase operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 DeleteDisk for more information on using the DeleteDisk +// See CreateRelationalDatabase for more information on using the CreateRelationalDatabase // 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 DeleteDiskRequest method. -// req, resp := client.DeleteDiskRequest(params) +// // Example sending a request using the CreateRelationalDatabaseRequest method. +// req, resp := client.CreateRelationalDatabaseRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDisk -func (c *Lightsail) DeleteDiskRequest(input *DeleteDiskInput) (req *request.Request, output *DeleteDiskOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateRelationalDatabase +func (c *Lightsail) CreateRelationalDatabaseRequest(input *CreateRelationalDatabaseInput) (req *request.Request, output *CreateRelationalDatabaseOutput) { op := &request.Operation{ - Name: opDeleteDisk, + Name: opCreateRelationalDatabase, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DeleteDiskInput{} + input = &CreateRelationalDatabaseInput{} } - output = &DeleteDiskOutput{} + output = &CreateRelationalDatabaseOutput{} req = c.newRequest(op, input, output) return } -// DeleteDisk API operation for Amazon Lightsail. +// CreateRelationalDatabase API operation for Amazon Lightsail. // -// Deletes the specified block storage disk. The disk must be in the available -// state (not attached to a Lightsail instance). +// Creates a new database in Amazon Lightsail. // -// The disk may remain in the deleting state for several minutes. +// The create relational database operation supports tag-based access control +// via request tags. For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). // // 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 Lightsail's -// API operation DeleteDisk for usage and error information. +// API operation CreateRelationalDatabase for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -1905,87 +2181,89 @@ func (c *Lightsail) DeleteDiskRequest(input *DeleteDiskInput) (req *request.Requ // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDisk -func (c *Lightsail) DeleteDisk(input *DeleteDiskInput) (*DeleteDiskOutput, error) { - req, out := c.DeleteDiskRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateRelationalDatabase +func (c *Lightsail) CreateRelationalDatabase(input *CreateRelationalDatabaseInput) (*CreateRelationalDatabaseOutput, error) { + req, out := c.CreateRelationalDatabaseRequest(input) return out, req.Send() } -// DeleteDiskWithContext is the same as DeleteDisk with the addition of +// CreateRelationalDatabaseWithContext is the same as CreateRelationalDatabase with the addition of // the ability to pass a context and additional request options. // -// See DeleteDisk for details on how to use this API operation. +// See CreateRelationalDatabase 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 *Lightsail) DeleteDiskWithContext(ctx aws.Context, input *DeleteDiskInput, opts ...request.Option) (*DeleteDiskOutput, error) { - req, out := c.DeleteDiskRequest(input) +func (c *Lightsail) CreateRelationalDatabaseWithContext(ctx aws.Context, input *CreateRelationalDatabaseInput, opts ...request.Option) (*CreateRelationalDatabaseOutput, error) { + req, out := c.CreateRelationalDatabaseRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDeleteDiskSnapshot = "DeleteDiskSnapshot" +const opCreateRelationalDatabaseFromSnapshot = "CreateRelationalDatabaseFromSnapshot" -// DeleteDiskSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDiskSnapshot operation. The "output" return +// CreateRelationalDatabaseFromSnapshotRequest generates a "aws/request.Request" representing the +// client's request for the CreateRelationalDatabaseFromSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 DeleteDiskSnapshot for more information on using the DeleteDiskSnapshot +// See CreateRelationalDatabaseFromSnapshot for more information on using the CreateRelationalDatabaseFromSnapshot // 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 DeleteDiskSnapshotRequest method. -// req, resp := client.DeleteDiskSnapshotRequest(params) +// // Example sending a request using the CreateRelationalDatabaseFromSnapshotRequest method. +// req, resp := client.CreateRelationalDatabaseFromSnapshotRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDiskSnapshot -func (c *Lightsail) DeleteDiskSnapshotRequest(input *DeleteDiskSnapshotInput) (req *request.Request, output *DeleteDiskSnapshotOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateRelationalDatabaseFromSnapshot +func (c *Lightsail) CreateRelationalDatabaseFromSnapshotRequest(input *CreateRelationalDatabaseFromSnapshotInput) (req *request.Request, output *CreateRelationalDatabaseFromSnapshotOutput) { op := &request.Operation{ - Name: opDeleteDiskSnapshot, + Name: opCreateRelationalDatabaseFromSnapshot, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DeleteDiskSnapshotInput{} + input = &CreateRelationalDatabaseFromSnapshotInput{} } - output = &DeleteDiskSnapshotOutput{} + output = &CreateRelationalDatabaseFromSnapshotOutput{} req = c.newRequest(op, input, output) return } -// DeleteDiskSnapshot API operation for Amazon Lightsail. +// CreateRelationalDatabaseFromSnapshot API operation for Amazon Lightsail. // -// Deletes the specified disk snapshot. +// Creates a new database from an existing database snapshot in Amazon Lightsail. // -// When you make periodic snapshots of a disk, the snapshots are incremental, -// and only the blocks on the device that have changed since your last snapshot -// are saved in the new snapshot. When you delete a snapshot, only the data -// not needed for any other snapshot is removed. So regardless of which prior -// snapshots have been deleted, all active snapshots will have access to all -// the information needed to restore the disk. +// You can create a new database from a snapshot in if something goes wrong +// with your original database, or to change it to a different plan, such as +// a high availability or standard plan. +// +// The create relational database from snapshot operation supports tag-based +// access control via request tags and resource tags applied to the resource +// identified by relationalDatabaseSnapshotName. For more information, see the +// Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). // // 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 Lightsail's -// API operation DeleteDiskSnapshot for usage and error information. +// API operation CreateRelationalDatabaseFromSnapshot for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -2016,80 +2294,86 @@ func (c *Lightsail) DeleteDiskSnapshotRequest(input *DeleteDiskSnapshotInput) (r // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDiskSnapshot -func (c *Lightsail) DeleteDiskSnapshot(input *DeleteDiskSnapshotInput) (*DeleteDiskSnapshotOutput, error) { - req, out := c.DeleteDiskSnapshotRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateRelationalDatabaseFromSnapshot +func (c *Lightsail) CreateRelationalDatabaseFromSnapshot(input *CreateRelationalDatabaseFromSnapshotInput) (*CreateRelationalDatabaseFromSnapshotOutput, error) { + req, out := c.CreateRelationalDatabaseFromSnapshotRequest(input) return out, req.Send() } -// DeleteDiskSnapshotWithContext is the same as DeleteDiskSnapshot with the addition of +// CreateRelationalDatabaseFromSnapshotWithContext is the same as CreateRelationalDatabaseFromSnapshot with the addition of // the ability to pass a context and additional request options. // -// See DeleteDiskSnapshot for details on how to use this API operation. +// See CreateRelationalDatabaseFromSnapshot 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 *Lightsail) DeleteDiskSnapshotWithContext(ctx aws.Context, input *DeleteDiskSnapshotInput, opts ...request.Option) (*DeleteDiskSnapshotOutput, error) { - req, out := c.DeleteDiskSnapshotRequest(input) +func (c *Lightsail) CreateRelationalDatabaseFromSnapshotWithContext(ctx aws.Context, input *CreateRelationalDatabaseFromSnapshotInput, opts ...request.Option) (*CreateRelationalDatabaseFromSnapshotOutput, error) { + req, out := c.CreateRelationalDatabaseFromSnapshotRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDeleteDomain = "DeleteDomain" +const opCreateRelationalDatabaseSnapshot = "CreateRelationalDatabaseSnapshot" -// DeleteDomainRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDomain operation. The "output" return +// CreateRelationalDatabaseSnapshotRequest generates a "aws/request.Request" representing the +// client's request for the CreateRelationalDatabaseSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 DeleteDomain for more information on using the DeleteDomain +// See CreateRelationalDatabaseSnapshot for more information on using the CreateRelationalDatabaseSnapshot // 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 DeleteDomainRequest method. -// req, resp := client.DeleteDomainRequest(params) +// // Example sending a request using the CreateRelationalDatabaseSnapshotRequest method. +// req, resp := client.CreateRelationalDatabaseSnapshotRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDomain -func (c *Lightsail) DeleteDomainRequest(input *DeleteDomainInput) (req *request.Request, output *DeleteDomainOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateRelationalDatabaseSnapshot +func (c *Lightsail) CreateRelationalDatabaseSnapshotRequest(input *CreateRelationalDatabaseSnapshotInput) (req *request.Request, output *CreateRelationalDatabaseSnapshotOutput) { op := &request.Operation{ - Name: opDeleteDomain, + Name: opCreateRelationalDatabaseSnapshot, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DeleteDomainInput{} + input = &CreateRelationalDatabaseSnapshotInput{} } - output = &DeleteDomainOutput{} + output = &CreateRelationalDatabaseSnapshotOutput{} req = c.newRequest(op, input, output) return } -// DeleteDomain API operation for Amazon Lightsail. +// CreateRelationalDatabaseSnapshot API operation for Amazon Lightsail. // -// Deletes the specified domain recordset and all of its domain records. +// Creates a snapshot of your database in Amazon Lightsail. You can use snapshots +// for backups, to make copies of a database, and to save data before deleting +// a database. +// +// The create relational database snapshot operation supports tag-based access +// control via request tags. For more information, see the Lightsail Dev Guide +// (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). // // 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 Lightsail's -// API operation DeleteDomain for usage and error information. +// API operation CreateRelationalDatabaseSnapshot for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -2120,80 +2404,87 @@ func (c *Lightsail) DeleteDomainRequest(input *DeleteDomainInput) (req *request. // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDomain -func (c *Lightsail) DeleteDomain(input *DeleteDomainInput) (*DeleteDomainOutput, error) { - req, out := c.DeleteDomainRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CreateRelationalDatabaseSnapshot +func (c *Lightsail) CreateRelationalDatabaseSnapshot(input *CreateRelationalDatabaseSnapshotInput) (*CreateRelationalDatabaseSnapshotOutput, error) { + req, out := c.CreateRelationalDatabaseSnapshotRequest(input) return out, req.Send() } -// DeleteDomainWithContext is the same as DeleteDomain with the addition of +// CreateRelationalDatabaseSnapshotWithContext is the same as CreateRelationalDatabaseSnapshot with the addition of // the ability to pass a context and additional request options. // -// See DeleteDomain for details on how to use this API operation. +// See CreateRelationalDatabaseSnapshot 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 *Lightsail) DeleteDomainWithContext(ctx aws.Context, input *DeleteDomainInput, opts ...request.Option) (*DeleteDomainOutput, error) { - req, out := c.DeleteDomainRequest(input) +func (c *Lightsail) CreateRelationalDatabaseSnapshotWithContext(ctx aws.Context, input *CreateRelationalDatabaseSnapshotInput, opts ...request.Option) (*CreateRelationalDatabaseSnapshotOutput, error) { + req, out := c.CreateRelationalDatabaseSnapshotRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDeleteDomainEntry = "DeleteDomainEntry" +const opDeleteDisk = "DeleteDisk" -// DeleteDomainEntryRequest generates a "aws/request.Request" representing the -// client's request for the DeleteDomainEntry operation. The "output" return +// DeleteDiskRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDisk operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 DeleteDomainEntry for more information on using the DeleteDomainEntry +// See DeleteDisk for more information on using the DeleteDisk // 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 DeleteDomainEntryRequest method. -// req, resp := client.DeleteDomainEntryRequest(params) +// // Example sending a request using the DeleteDiskRequest method. +// req, resp := client.DeleteDiskRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDomainEntry -func (c *Lightsail) DeleteDomainEntryRequest(input *DeleteDomainEntryInput) (req *request.Request, output *DeleteDomainEntryOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDisk +func (c *Lightsail) DeleteDiskRequest(input *DeleteDiskInput) (req *request.Request, output *DeleteDiskOutput) { op := &request.Operation{ - Name: opDeleteDomainEntry, + Name: opDeleteDisk, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DeleteDomainEntryInput{} + input = &DeleteDiskInput{} } - output = &DeleteDomainEntryOutput{} + output = &DeleteDiskOutput{} req = c.newRequest(op, input, output) return } -// DeleteDomainEntry API operation for Amazon Lightsail. +// DeleteDisk API operation for Amazon Lightsail. // -// Deletes a specific domain entry. +// Deletes the specified block storage disk. The disk must be in the available +// state (not attached to a Lightsail instance). +// +// The disk may remain in the deleting state for several minutes. +// +// The delete disk operation supports tag-based access control via resource +// tags applied to the resource identified by diskName. For more information, +// see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). // // 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 Lightsail's -// API operation DeleteDomainEntry for usage and error information. +// API operation DeleteDisk for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -2224,80 +2515,91 @@ func (c *Lightsail) DeleteDomainEntryRequest(input *DeleteDomainEntryInput) (req // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDomainEntry -func (c *Lightsail) DeleteDomainEntry(input *DeleteDomainEntryInput) (*DeleteDomainEntryOutput, error) { - req, out := c.DeleteDomainEntryRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDisk +func (c *Lightsail) DeleteDisk(input *DeleteDiskInput) (*DeleteDiskOutput, error) { + req, out := c.DeleteDiskRequest(input) return out, req.Send() } -// DeleteDomainEntryWithContext is the same as DeleteDomainEntry with the addition of +// DeleteDiskWithContext is the same as DeleteDisk with the addition of // the ability to pass a context and additional request options. // -// See DeleteDomainEntry for details on how to use this API operation. +// See DeleteDisk 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 *Lightsail) DeleteDomainEntryWithContext(ctx aws.Context, input *DeleteDomainEntryInput, opts ...request.Option) (*DeleteDomainEntryOutput, error) { - req, out := c.DeleteDomainEntryRequest(input) +func (c *Lightsail) DeleteDiskWithContext(ctx aws.Context, input *DeleteDiskInput, opts ...request.Option) (*DeleteDiskOutput, error) { + req, out := c.DeleteDiskRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDeleteInstance = "DeleteInstance" +const opDeleteDiskSnapshot = "DeleteDiskSnapshot" -// DeleteInstanceRequest generates a "aws/request.Request" representing the -// client's request for the DeleteInstance operation. The "output" return +// DeleteDiskSnapshotRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDiskSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 DeleteInstance for more information on using the DeleteInstance +// See DeleteDiskSnapshot for more information on using the DeleteDiskSnapshot // 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 DeleteInstanceRequest method. -// req, resp := client.DeleteInstanceRequest(params) +// // Example sending a request using the DeleteDiskSnapshotRequest method. +// req, resp := client.DeleteDiskSnapshotRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteInstance -func (c *Lightsail) DeleteInstanceRequest(input *DeleteInstanceInput) (req *request.Request, output *DeleteInstanceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDiskSnapshot +func (c *Lightsail) DeleteDiskSnapshotRequest(input *DeleteDiskSnapshotInput) (req *request.Request, output *DeleteDiskSnapshotOutput) { op := &request.Operation{ - Name: opDeleteInstance, + Name: opDeleteDiskSnapshot, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DeleteInstanceInput{} + input = &DeleteDiskSnapshotInput{} } - output = &DeleteInstanceOutput{} + output = &DeleteDiskSnapshotOutput{} req = c.newRequest(op, input, output) return } -// DeleteInstance API operation for Amazon Lightsail. +// DeleteDiskSnapshot API operation for Amazon Lightsail. // -// Deletes a specific Amazon Lightsail virtual private server, or instance. +// Deletes the specified disk snapshot. +// +// When you make periodic snapshots of a disk, the snapshots are incremental, +// and only the blocks on the device that have changed since your last snapshot +// are saved in the new snapshot. When you delete a snapshot, only the data +// not needed for any other snapshot is removed. So regardless of which prior +// snapshots have been deleted, all active snapshots will have access to all +// the information needed to restore the disk. +// +// The delete disk snapshot operation supports tag-based access control via +// resource tags applied to the resource identified by diskSnapshotName. For +// more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). // // 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 Lightsail's -// API operation DeleteInstance for usage and error information. +// API operation DeleteDiskSnapshot for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -2328,80 +2630,84 @@ func (c *Lightsail) DeleteInstanceRequest(input *DeleteInstanceInput) (req *requ // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteInstance -func (c *Lightsail) DeleteInstance(input *DeleteInstanceInput) (*DeleteInstanceOutput, error) { - req, out := c.DeleteInstanceRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDiskSnapshot +func (c *Lightsail) DeleteDiskSnapshot(input *DeleteDiskSnapshotInput) (*DeleteDiskSnapshotOutput, error) { + req, out := c.DeleteDiskSnapshotRequest(input) return out, req.Send() } -// DeleteInstanceWithContext is the same as DeleteInstance with the addition of +// DeleteDiskSnapshotWithContext is the same as DeleteDiskSnapshot with the addition of // the ability to pass a context and additional request options. // -// See DeleteInstance for details on how to use this API operation. +// See DeleteDiskSnapshot 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 *Lightsail) DeleteInstanceWithContext(ctx aws.Context, input *DeleteInstanceInput, opts ...request.Option) (*DeleteInstanceOutput, error) { - req, out := c.DeleteInstanceRequest(input) +func (c *Lightsail) DeleteDiskSnapshotWithContext(ctx aws.Context, input *DeleteDiskSnapshotInput, opts ...request.Option) (*DeleteDiskSnapshotOutput, error) { + req, out := c.DeleteDiskSnapshotRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDeleteInstanceSnapshot = "DeleteInstanceSnapshot" +const opDeleteDomain = "DeleteDomain" -// DeleteInstanceSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the DeleteInstanceSnapshot operation. The "output" return +// DeleteDomainRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 DeleteInstanceSnapshot for more information on using the DeleteInstanceSnapshot +// See DeleteDomain for more information on using the DeleteDomain // 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 DeleteInstanceSnapshotRequest method. -// req, resp := client.DeleteInstanceSnapshotRequest(params) +// // Example sending a request using the DeleteDomainRequest method. +// req, resp := client.DeleteDomainRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteInstanceSnapshot -func (c *Lightsail) DeleteInstanceSnapshotRequest(input *DeleteInstanceSnapshotInput) (req *request.Request, output *DeleteInstanceSnapshotOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDomain +func (c *Lightsail) DeleteDomainRequest(input *DeleteDomainInput) (req *request.Request, output *DeleteDomainOutput) { op := &request.Operation{ - Name: opDeleteInstanceSnapshot, + Name: opDeleteDomain, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DeleteInstanceSnapshotInput{} + input = &DeleteDomainInput{} } - output = &DeleteInstanceSnapshotOutput{} + output = &DeleteDomainOutput{} req = c.newRequest(op, input, output) return } -// DeleteInstanceSnapshot API operation for Amazon Lightsail. +// DeleteDomain API operation for Amazon Lightsail. // -// Deletes a specific snapshot of a virtual private server (or instance). +// Deletes the specified domain recordset and all of its domain records. +// +// The delete domain operation supports tag-based access control via resource +// tags applied to the resource identified by domainName. For more information, +// see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). // // 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 Lightsail's -// API operation DeleteInstanceSnapshot for usage and error information. +// API operation DeleteDomain for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -2432,80 +2738,84 @@ func (c *Lightsail) DeleteInstanceSnapshotRequest(input *DeleteInstanceSnapshotI // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteInstanceSnapshot -func (c *Lightsail) DeleteInstanceSnapshot(input *DeleteInstanceSnapshotInput) (*DeleteInstanceSnapshotOutput, error) { - req, out := c.DeleteInstanceSnapshotRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDomain +func (c *Lightsail) DeleteDomain(input *DeleteDomainInput) (*DeleteDomainOutput, error) { + req, out := c.DeleteDomainRequest(input) return out, req.Send() } -// DeleteInstanceSnapshotWithContext is the same as DeleteInstanceSnapshot with the addition of +// DeleteDomainWithContext is the same as DeleteDomain with the addition of // the ability to pass a context and additional request options. // -// See DeleteInstanceSnapshot for details on how to use this API operation. +// See DeleteDomain 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 *Lightsail) DeleteInstanceSnapshotWithContext(ctx aws.Context, input *DeleteInstanceSnapshotInput, opts ...request.Option) (*DeleteInstanceSnapshotOutput, error) { - req, out := c.DeleteInstanceSnapshotRequest(input) +func (c *Lightsail) DeleteDomainWithContext(ctx aws.Context, input *DeleteDomainInput, opts ...request.Option) (*DeleteDomainOutput, error) { + req, out := c.DeleteDomainRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDeleteKeyPair = "DeleteKeyPair" +const opDeleteDomainEntry = "DeleteDomainEntry" -// DeleteKeyPairRequest generates a "aws/request.Request" representing the -// client's request for the DeleteKeyPair operation. The "output" return +// DeleteDomainEntryRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDomainEntry operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 DeleteKeyPair for more information on using the DeleteKeyPair +// See DeleteDomainEntry for more information on using the DeleteDomainEntry // 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 DeleteKeyPairRequest method. -// req, resp := client.DeleteKeyPairRequest(params) +// // Example sending a request using the DeleteDomainEntryRequest method. +// req, resp := client.DeleteDomainEntryRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteKeyPair -func (c *Lightsail) DeleteKeyPairRequest(input *DeleteKeyPairInput) (req *request.Request, output *DeleteKeyPairOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDomainEntry +func (c *Lightsail) DeleteDomainEntryRequest(input *DeleteDomainEntryInput) (req *request.Request, output *DeleteDomainEntryOutput) { op := &request.Operation{ - Name: opDeleteKeyPair, + Name: opDeleteDomainEntry, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DeleteKeyPairInput{} + input = &DeleteDomainEntryInput{} } - output = &DeleteKeyPairOutput{} + output = &DeleteDomainEntryOutput{} req = c.newRequest(op, input, output) return } -// DeleteKeyPair API operation for Amazon Lightsail. +// DeleteDomainEntry API operation for Amazon Lightsail. // -// Deletes a specific SSH key pair. +// Deletes a specific domain entry. +// +// The delete domain entry operation supports tag-based access control via resource +// tags applied to the resource identified by domainName. For more information, +// see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). // // 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 Lightsail's -// API operation DeleteKeyPair for usage and error information. +// API operation DeleteDomainEntry for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -2536,82 +2846,84 @@ func (c *Lightsail) DeleteKeyPairRequest(input *DeleteKeyPairInput) (req *reques // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteKeyPair -func (c *Lightsail) DeleteKeyPair(input *DeleteKeyPairInput) (*DeleteKeyPairOutput, error) { - req, out := c.DeleteKeyPairRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteDomainEntry +func (c *Lightsail) DeleteDomainEntry(input *DeleteDomainEntryInput) (*DeleteDomainEntryOutput, error) { + req, out := c.DeleteDomainEntryRequest(input) return out, req.Send() } -// DeleteKeyPairWithContext is the same as DeleteKeyPair with the addition of +// DeleteDomainEntryWithContext is the same as DeleteDomainEntry with the addition of // the ability to pass a context and additional request options. // -// See DeleteKeyPair for details on how to use this API operation. +// See DeleteDomainEntry 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 *Lightsail) DeleteKeyPairWithContext(ctx aws.Context, input *DeleteKeyPairInput, opts ...request.Option) (*DeleteKeyPairOutput, error) { - req, out := c.DeleteKeyPairRequest(input) +func (c *Lightsail) DeleteDomainEntryWithContext(ctx aws.Context, input *DeleteDomainEntryInput, opts ...request.Option) (*DeleteDomainEntryOutput, error) { + req, out := c.DeleteDomainEntryRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDeleteLoadBalancer = "DeleteLoadBalancer" +const opDeleteInstance = "DeleteInstance" -// DeleteLoadBalancerRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLoadBalancer operation. The "output" return +// DeleteInstanceRequest generates a "aws/request.Request" representing the +// client's request for the DeleteInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 DeleteLoadBalancer for more information on using the DeleteLoadBalancer +// See DeleteInstance for more information on using the DeleteInstance // 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 DeleteLoadBalancerRequest method. -// req, resp := client.DeleteLoadBalancerRequest(params) +// // Example sending a request using the DeleteInstanceRequest method. +// req, resp := client.DeleteInstanceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteLoadBalancer -func (c *Lightsail) DeleteLoadBalancerRequest(input *DeleteLoadBalancerInput) (req *request.Request, output *DeleteLoadBalancerOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteInstance +func (c *Lightsail) DeleteInstanceRequest(input *DeleteInstanceInput) (req *request.Request, output *DeleteInstanceOutput) { op := &request.Operation{ - Name: opDeleteLoadBalancer, + Name: opDeleteInstance, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DeleteLoadBalancerInput{} + input = &DeleteInstanceInput{} } - output = &DeleteLoadBalancerOutput{} + output = &DeleteInstanceOutput{} req = c.newRequest(op, input, output) return } -// DeleteLoadBalancer API operation for Amazon Lightsail. +// DeleteInstance API operation for Amazon Lightsail. // -// Deletes a Lightsail load balancer and all its associated SSL/TLS certificates. -// Once the load balancer is deleted, you will need to create a new load balancer, -// create a new certificate, and verify domain ownership again. +// Deletes a specific Amazon Lightsail virtual private server, or instance. +// +// The delete instance operation supports tag-based access control via resource +// tags applied to the resource identified by instanceName. For more information, +// see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). // // 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 Lightsail's -// API operation DeleteLoadBalancer for usage and error information. +// API operation DeleteInstance for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -2642,80 +2954,84 @@ func (c *Lightsail) DeleteLoadBalancerRequest(input *DeleteLoadBalancerInput) (r // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteLoadBalancer -func (c *Lightsail) DeleteLoadBalancer(input *DeleteLoadBalancerInput) (*DeleteLoadBalancerOutput, error) { - req, out := c.DeleteLoadBalancerRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteInstance +func (c *Lightsail) DeleteInstance(input *DeleteInstanceInput) (*DeleteInstanceOutput, error) { + req, out := c.DeleteInstanceRequest(input) return out, req.Send() } -// DeleteLoadBalancerWithContext is the same as DeleteLoadBalancer with the addition of +// DeleteInstanceWithContext is the same as DeleteInstance with the addition of // the ability to pass a context and additional request options. // -// See DeleteLoadBalancer for details on how to use this API operation. +// See DeleteInstance 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 *Lightsail) DeleteLoadBalancerWithContext(ctx aws.Context, input *DeleteLoadBalancerInput, opts ...request.Option) (*DeleteLoadBalancerOutput, error) { - req, out := c.DeleteLoadBalancerRequest(input) +func (c *Lightsail) DeleteInstanceWithContext(ctx aws.Context, input *DeleteInstanceInput, opts ...request.Option) (*DeleteInstanceOutput, error) { + req, out := c.DeleteInstanceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDeleteLoadBalancerTlsCertificate = "DeleteLoadBalancerTlsCertificate" +const opDeleteInstanceSnapshot = "DeleteInstanceSnapshot" -// DeleteLoadBalancerTlsCertificateRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLoadBalancerTlsCertificate operation. The "output" return +// DeleteInstanceSnapshotRequest generates a "aws/request.Request" representing the +// client's request for the DeleteInstanceSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 DeleteLoadBalancerTlsCertificate for more information on using the DeleteLoadBalancerTlsCertificate +// See DeleteInstanceSnapshot for more information on using the DeleteInstanceSnapshot // 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 DeleteLoadBalancerTlsCertificateRequest method. -// req, resp := client.DeleteLoadBalancerTlsCertificateRequest(params) +// // Example sending a request using the DeleteInstanceSnapshotRequest method. +// req, resp := client.DeleteInstanceSnapshotRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteLoadBalancerTlsCertificate -func (c *Lightsail) DeleteLoadBalancerTlsCertificateRequest(input *DeleteLoadBalancerTlsCertificateInput) (req *request.Request, output *DeleteLoadBalancerTlsCertificateOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteInstanceSnapshot +func (c *Lightsail) DeleteInstanceSnapshotRequest(input *DeleteInstanceSnapshotInput) (req *request.Request, output *DeleteInstanceSnapshotOutput) { op := &request.Operation{ - Name: opDeleteLoadBalancerTlsCertificate, + Name: opDeleteInstanceSnapshot, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DeleteLoadBalancerTlsCertificateInput{} + input = &DeleteInstanceSnapshotInput{} } - output = &DeleteLoadBalancerTlsCertificateOutput{} + output = &DeleteInstanceSnapshotOutput{} req = c.newRequest(op, input, output) return } -// DeleteLoadBalancerTlsCertificate API operation for Amazon Lightsail. +// DeleteInstanceSnapshot API operation for Amazon Lightsail. // -// Deletes an SSL/TLS certificate associated with a Lightsail load balancer. +// Deletes a specific snapshot of a virtual private server (or instance). +// +// The delete instance snapshot operation supports tag-based access control +// via resource tags applied to the resource identified by instanceSnapshotName. +// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). // // 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 Lightsail's -// API operation DeleteLoadBalancerTlsCertificate for usage and error information. +// API operation DeleteInstanceSnapshot for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -2746,82 +3062,84 @@ func (c *Lightsail) DeleteLoadBalancerTlsCertificateRequest(input *DeleteLoadBal // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteLoadBalancerTlsCertificate -func (c *Lightsail) DeleteLoadBalancerTlsCertificate(input *DeleteLoadBalancerTlsCertificateInput) (*DeleteLoadBalancerTlsCertificateOutput, error) { - req, out := c.DeleteLoadBalancerTlsCertificateRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteInstanceSnapshot +func (c *Lightsail) DeleteInstanceSnapshot(input *DeleteInstanceSnapshotInput) (*DeleteInstanceSnapshotOutput, error) { + req, out := c.DeleteInstanceSnapshotRequest(input) return out, req.Send() } -// DeleteLoadBalancerTlsCertificateWithContext is the same as DeleteLoadBalancerTlsCertificate with the addition of +// DeleteInstanceSnapshotWithContext is the same as DeleteInstanceSnapshot with the addition of // the ability to pass a context and additional request options. // -// See DeleteLoadBalancerTlsCertificate for details on how to use this API operation. +// See DeleteInstanceSnapshot 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 *Lightsail) DeleteLoadBalancerTlsCertificateWithContext(ctx aws.Context, input *DeleteLoadBalancerTlsCertificateInput, opts ...request.Option) (*DeleteLoadBalancerTlsCertificateOutput, error) { - req, out := c.DeleteLoadBalancerTlsCertificateRequest(input) +func (c *Lightsail) DeleteInstanceSnapshotWithContext(ctx aws.Context, input *DeleteInstanceSnapshotInput, opts ...request.Option) (*DeleteInstanceSnapshotOutput, error) { + req, out := c.DeleteInstanceSnapshotRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDetachDisk = "DetachDisk" +const opDeleteKeyPair = "DeleteKeyPair" -// DetachDiskRequest generates a "aws/request.Request" representing the -// client's request for the DetachDisk operation. The "output" return +// DeleteKeyPairRequest generates a "aws/request.Request" representing the +// client's request for the DeleteKeyPair operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 DetachDisk for more information on using the DetachDisk +// See DeleteKeyPair for more information on using the DeleteKeyPair // 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 DetachDiskRequest method. -// req, resp := client.DetachDiskRequest(params) +// // Example sending a request using the DeleteKeyPairRequest method. +// req, resp := client.DeleteKeyPairRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DetachDisk -func (c *Lightsail) DetachDiskRequest(input *DetachDiskInput) (req *request.Request, output *DetachDiskOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteKeyPair +func (c *Lightsail) DeleteKeyPairRequest(input *DeleteKeyPairInput) (req *request.Request, output *DeleteKeyPairOutput) { op := &request.Operation{ - Name: opDetachDisk, + Name: opDeleteKeyPair, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DetachDiskInput{} + input = &DeleteKeyPairInput{} } - output = &DetachDiskOutput{} + output = &DeleteKeyPairOutput{} req = c.newRequest(op, input, output) return } -// DetachDisk API operation for Amazon Lightsail. +// DeleteKeyPair API operation for Amazon Lightsail. // -// Detaches a stopped block storage disk from a Lightsail instance. Make sure -// to unmount any file systems on the device within your operating system before -// stopping the instance and detaching the disk. +// Deletes a specific SSH key pair. +// +// The delete key pair operation supports tag-based access control via resource +// tags applied to the resource identified by keyPairName. For more information, +// see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). // // 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 Lightsail's -// API operation DetachDisk for usage and error information. +// API operation DeleteKeyPair for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -2852,83 +3170,86 @@ func (c *Lightsail) DetachDiskRequest(input *DetachDiskInput) (req *request.Requ // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DetachDisk -func (c *Lightsail) DetachDisk(input *DetachDiskInput) (*DetachDiskOutput, error) { - req, out := c.DetachDiskRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteKeyPair +func (c *Lightsail) DeleteKeyPair(input *DeleteKeyPairInput) (*DeleteKeyPairOutput, error) { + req, out := c.DeleteKeyPairRequest(input) return out, req.Send() } -// DetachDiskWithContext is the same as DetachDisk with the addition of +// DeleteKeyPairWithContext is the same as DeleteKeyPair with the addition of // the ability to pass a context and additional request options. // -// See DetachDisk for details on how to use this API operation. +// See DeleteKeyPair 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 *Lightsail) DetachDiskWithContext(ctx aws.Context, input *DetachDiskInput, opts ...request.Option) (*DetachDiskOutput, error) { - req, out := c.DetachDiskRequest(input) +func (c *Lightsail) DeleteKeyPairWithContext(ctx aws.Context, input *DeleteKeyPairInput, opts ...request.Option) (*DeleteKeyPairOutput, error) { + req, out := c.DeleteKeyPairRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDetachInstancesFromLoadBalancer = "DetachInstancesFromLoadBalancer" +const opDeleteLoadBalancer = "DeleteLoadBalancer" -// DetachInstancesFromLoadBalancerRequest generates a "aws/request.Request" representing the -// client's request for the DetachInstancesFromLoadBalancer operation. The "output" return +// DeleteLoadBalancerRequest generates a "aws/request.Request" representing the +// client's request for the DeleteLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 DetachInstancesFromLoadBalancer for more information on using the DetachInstancesFromLoadBalancer +// See DeleteLoadBalancer for more information on using the DeleteLoadBalancer // 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 DetachInstancesFromLoadBalancerRequest method. -// req, resp := client.DetachInstancesFromLoadBalancerRequest(params) +// // Example sending a request using the DeleteLoadBalancerRequest method. +// req, resp := client.DeleteLoadBalancerRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DetachInstancesFromLoadBalancer -func (c *Lightsail) DetachInstancesFromLoadBalancerRequest(input *DetachInstancesFromLoadBalancerInput) (req *request.Request, output *DetachInstancesFromLoadBalancerOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteLoadBalancer +func (c *Lightsail) DeleteLoadBalancerRequest(input *DeleteLoadBalancerInput) (req *request.Request, output *DeleteLoadBalancerOutput) { op := &request.Operation{ - Name: opDetachInstancesFromLoadBalancer, + Name: opDeleteLoadBalancer, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DetachInstancesFromLoadBalancerInput{} + input = &DeleteLoadBalancerInput{} } - output = &DetachInstancesFromLoadBalancerOutput{} + output = &DeleteLoadBalancerOutput{} req = c.newRequest(op, input, output) return } -// DetachInstancesFromLoadBalancer API operation for Amazon Lightsail. +// DeleteLoadBalancer API operation for Amazon Lightsail. // -// Detaches the specified instances from a Lightsail load balancer. +// Deletes a Lightsail load balancer and all its associated SSL/TLS certificates. +// Once the load balancer is deleted, you will need to create a new load balancer, +// create a new certificate, and verify domain ownership again. // -// This operation waits until the instances are no longer needed before they -// are detached from the load balancer. +// The delete load balancer operation supports tag-based access control via +// resource tags applied to the resource identified by loadBalancerName. For +// more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). // // 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 Lightsail's -// API operation DetachInstancesFromLoadBalancer for usage and error information. +// API operation DeleteLoadBalancer for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -2959,80 +3280,84 @@ func (c *Lightsail) DetachInstancesFromLoadBalancerRequest(input *DetachInstance // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DetachInstancesFromLoadBalancer -func (c *Lightsail) DetachInstancesFromLoadBalancer(input *DetachInstancesFromLoadBalancerInput) (*DetachInstancesFromLoadBalancerOutput, error) { - req, out := c.DetachInstancesFromLoadBalancerRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteLoadBalancer +func (c *Lightsail) DeleteLoadBalancer(input *DeleteLoadBalancerInput) (*DeleteLoadBalancerOutput, error) { + req, out := c.DeleteLoadBalancerRequest(input) return out, req.Send() } -// DetachInstancesFromLoadBalancerWithContext is the same as DetachInstancesFromLoadBalancer with the addition of +// DeleteLoadBalancerWithContext is the same as DeleteLoadBalancer with the addition of // the ability to pass a context and additional request options. // -// See DetachInstancesFromLoadBalancer for details on how to use this API operation. +// See DeleteLoadBalancer 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 *Lightsail) DetachInstancesFromLoadBalancerWithContext(ctx aws.Context, input *DetachInstancesFromLoadBalancerInput, opts ...request.Option) (*DetachInstancesFromLoadBalancerOutput, error) { - req, out := c.DetachInstancesFromLoadBalancerRequest(input) +func (c *Lightsail) DeleteLoadBalancerWithContext(ctx aws.Context, input *DeleteLoadBalancerInput, opts ...request.Option) (*DeleteLoadBalancerOutput, error) { + req, out := c.DeleteLoadBalancerRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDetachStaticIp = "DetachStaticIp" +const opDeleteLoadBalancerTlsCertificate = "DeleteLoadBalancerTlsCertificate" -// DetachStaticIpRequest generates a "aws/request.Request" representing the -// client's request for the DetachStaticIp operation. The "output" return +// DeleteLoadBalancerTlsCertificateRequest generates a "aws/request.Request" representing the +// client's request for the DeleteLoadBalancerTlsCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 DetachStaticIp for more information on using the DetachStaticIp +// See DeleteLoadBalancerTlsCertificate for more information on using the DeleteLoadBalancerTlsCertificate // 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 DetachStaticIpRequest method. -// req, resp := client.DetachStaticIpRequest(params) +// // Example sending a request using the DeleteLoadBalancerTlsCertificateRequest method. +// req, resp := client.DeleteLoadBalancerTlsCertificateRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DetachStaticIp -func (c *Lightsail) DetachStaticIpRequest(input *DetachStaticIpInput) (req *request.Request, output *DetachStaticIpOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteLoadBalancerTlsCertificate +func (c *Lightsail) DeleteLoadBalancerTlsCertificateRequest(input *DeleteLoadBalancerTlsCertificateInput) (req *request.Request, output *DeleteLoadBalancerTlsCertificateOutput) { op := &request.Operation{ - Name: opDetachStaticIp, + Name: opDeleteLoadBalancerTlsCertificate, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DetachStaticIpInput{} + input = &DeleteLoadBalancerTlsCertificateInput{} } - output = &DetachStaticIpOutput{} + output = &DeleteLoadBalancerTlsCertificateOutput{} req = c.newRequest(op, input, output) return } -// DetachStaticIp API operation for Amazon Lightsail. +// DeleteLoadBalancerTlsCertificate API operation for Amazon Lightsail. // -// Detaches a static IP from the Amazon Lightsail instance to which it is attached. +// Deletes an SSL/TLS certificate associated with a Lightsail load balancer. +// +// The delete load balancer tls certificate operation supports tag-based access +// control via resource tags applied to the resource identified by loadBalancerName. +// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). // // 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 Lightsail's -// API operation DetachStaticIp for usage and error information. +// API operation DeleteLoadBalancerTlsCertificate for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -3063,80 +3388,84 @@ func (c *Lightsail) DetachStaticIpRequest(input *DetachStaticIpInput) (req *requ // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DetachStaticIp -func (c *Lightsail) DetachStaticIp(input *DetachStaticIpInput) (*DetachStaticIpOutput, error) { - req, out := c.DetachStaticIpRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteLoadBalancerTlsCertificate +func (c *Lightsail) DeleteLoadBalancerTlsCertificate(input *DeleteLoadBalancerTlsCertificateInput) (*DeleteLoadBalancerTlsCertificateOutput, error) { + req, out := c.DeleteLoadBalancerTlsCertificateRequest(input) return out, req.Send() } -// DetachStaticIpWithContext is the same as DetachStaticIp with the addition of +// DeleteLoadBalancerTlsCertificateWithContext is the same as DeleteLoadBalancerTlsCertificate with the addition of // the ability to pass a context and additional request options. // -// See DetachStaticIp for details on how to use this API operation. +// See DeleteLoadBalancerTlsCertificate 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 *Lightsail) DetachStaticIpWithContext(ctx aws.Context, input *DetachStaticIpInput, opts ...request.Option) (*DetachStaticIpOutput, error) { - req, out := c.DetachStaticIpRequest(input) +func (c *Lightsail) DeleteLoadBalancerTlsCertificateWithContext(ctx aws.Context, input *DeleteLoadBalancerTlsCertificateInput, opts ...request.Option) (*DeleteLoadBalancerTlsCertificateOutput, error) { + req, out := c.DeleteLoadBalancerTlsCertificateRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opDownloadDefaultKeyPair = "DownloadDefaultKeyPair" +const opDeleteRelationalDatabase = "DeleteRelationalDatabase" -// DownloadDefaultKeyPairRequest generates a "aws/request.Request" representing the -// client's request for the DownloadDefaultKeyPair operation. The "output" return +// DeleteRelationalDatabaseRequest generates a "aws/request.Request" representing the +// client's request for the DeleteRelationalDatabase operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 DownloadDefaultKeyPair for more information on using the DownloadDefaultKeyPair +// See DeleteRelationalDatabase for more information on using the DeleteRelationalDatabase // 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 DownloadDefaultKeyPairRequest method. -// req, resp := client.DownloadDefaultKeyPairRequest(params) +// // Example sending a request using the DeleteRelationalDatabaseRequest method. +// req, resp := client.DeleteRelationalDatabaseRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DownloadDefaultKeyPair -func (c *Lightsail) DownloadDefaultKeyPairRequest(input *DownloadDefaultKeyPairInput) (req *request.Request, output *DownloadDefaultKeyPairOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteRelationalDatabase +func (c *Lightsail) DeleteRelationalDatabaseRequest(input *DeleteRelationalDatabaseInput) (req *request.Request, output *DeleteRelationalDatabaseOutput) { op := &request.Operation{ - Name: opDownloadDefaultKeyPair, + Name: opDeleteRelationalDatabase, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DownloadDefaultKeyPairInput{} + input = &DeleteRelationalDatabaseInput{} } - output = &DownloadDefaultKeyPairOutput{} + output = &DeleteRelationalDatabaseOutput{} req = c.newRequest(op, input, output) return } -// DownloadDefaultKeyPair API operation for Amazon Lightsail. +// DeleteRelationalDatabase API operation for Amazon Lightsail. // -// Downloads the default SSH key pair from the user's account. +// Deletes a database in Amazon Lightsail. +// +// The delete relational database operation supports tag-based access control +// via resource tags applied to the resource identified by relationalDatabaseName. +// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). // // 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 Lightsail's -// API operation DownloadDefaultKeyPair for usage and error information. +// API operation DeleteRelationalDatabase for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -3167,80 +3496,84 @@ func (c *Lightsail) DownloadDefaultKeyPairRequest(input *DownloadDefaultKeyPairI // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DownloadDefaultKeyPair -func (c *Lightsail) DownloadDefaultKeyPair(input *DownloadDefaultKeyPairInput) (*DownloadDefaultKeyPairOutput, error) { - req, out := c.DownloadDefaultKeyPairRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteRelationalDatabase +func (c *Lightsail) DeleteRelationalDatabase(input *DeleteRelationalDatabaseInput) (*DeleteRelationalDatabaseOutput, error) { + req, out := c.DeleteRelationalDatabaseRequest(input) return out, req.Send() } -// DownloadDefaultKeyPairWithContext is the same as DownloadDefaultKeyPair with the addition of +// DeleteRelationalDatabaseWithContext is the same as DeleteRelationalDatabase with the addition of // the ability to pass a context and additional request options. // -// See DownloadDefaultKeyPair for details on how to use this API operation. +// See DeleteRelationalDatabase 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 *Lightsail) DownloadDefaultKeyPairWithContext(ctx aws.Context, input *DownloadDefaultKeyPairInput, opts ...request.Option) (*DownloadDefaultKeyPairOutput, error) { - req, out := c.DownloadDefaultKeyPairRequest(input) +func (c *Lightsail) DeleteRelationalDatabaseWithContext(ctx aws.Context, input *DeleteRelationalDatabaseInput, opts ...request.Option) (*DeleteRelationalDatabaseOutput, error) { + req, out := c.DeleteRelationalDatabaseRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetActiveNames = "GetActiveNames" +const opDeleteRelationalDatabaseSnapshot = "DeleteRelationalDatabaseSnapshot" -// GetActiveNamesRequest generates a "aws/request.Request" representing the -// client's request for the GetActiveNames operation. The "output" return +// DeleteRelationalDatabaseSnapshotRequest generates a "aws/request.Request" representing the +// client's request for the DeleteRelationalDatabaseSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetActiveNames for more information on using the GetActiveNames +// See DeleteRelationalDatabaseSnapshot for more information on using the DeleteRelationalDatabaseSnapshot // 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 GetActiveNamesRequest method. -// req, resp := client.GetActiveNamesRequest(params) +// // Example sending a request using the DeleteRelationalDatabaseSnapshotRequest method. +// req, resp := client.DeleteRelationalDatabaseSnapshotRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetActiveNames -func (c *Lightsail) GetActiveNamesRequest(input *GetActiveNamesInput) (req *request.Request, output *GetActiveNamesOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteRelationalDatabaseSnapshot +func (c *Lightsail) DeleteRelationalDatabaseSnapshotRequest(input *DeleteRelationalDatabaseSnapshotInput) (req *request.Request, output *DeleteRelationalDatabaseSnapshotOutput) { op := &request.Operation{ - Name: opGetActiveNames, + Name: opDeleteRelationalDatabaseSnapshot, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetActiveNamesInput{} + input = &DeleteRelationalDatabaseSnapshotInput{} } - output = &GetActiveNamesOutput{} + output = &DeleteRelationalDatabaseSnapshotOutput{} req = c.newRequest(op, input, output) return } -// GetActiveNames API operation for Amazon Lightsail. +// DeleteRelationalDatabaseSnapshot API operation for Amazon Lightsail. // -// Returns the names of all active (not deleted) resources. +// Deletes a database snapshot in Amazon Lightsail. +// +// The delete relational database snapshot operation supports tag-based access +// control via resource tags applied to the resource identified by relationalDatabaseName. +// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). // // 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 Lightsail's -// API operation GetActiveNames for usage and error information. +// API operation DeleteRelationalDatabaseSnapshot for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -3271,83 +3604,86 @@ func (c *Lightsail) GetActiveNamesRequest(input *GetActiveNamesInput) (req *requ // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetActiveNames -func (c *Lightsail) GetActiveNames(input *GetActiveNamesInput) (*GetActiveNamesOutput, error) { - req, out := c.GetActiveNamesRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DeleteRelationalDatabaseSnapshot +func (c *Lightsail) DeleteRelationalDatabaseSnapshot(input *DeleteRelationalDatabaseSnapshotInput) (*DeleteRelationalDatabaseSnapshotOutput, error) { + req, out := c.DeleteRelationalDatabaseSnapshotRequest(input) return out, req.Send() } -// GetActiveNamesWithContext is the same as GetActiveNames with the addition of +// DeleteRelationalDatabaseSnapshotWithContext is the same as DeleteRelationalDatabaseSnapshot with the addition of // the ability to pass a context and additional request options. // -// See GetActiveNames for details on how to use this API operation. +// See DeleteRelationalDatabaseSnapshot 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 *Lightsail) GetActiveNamesWithContext(ctx aws.Context, input *GetActiveNamesInput, opts ...request.Option) (*GetActiveNamesOutput, error) { - req, out := c.GetActiveNamesRequest(input) +func (c *Lightsail) DeleteRelationalDatabaseSnapshotWithContext(ctx aws.Context, input *DeleteRelationalDatabaseSnapshotInput, opts ...request.Option) (*DeleteRelationalDatabaseSnapshotOutput, error) { + req, out := c.DeleteRelationalDatabaseSnapshotRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetBlueprints = "GetBlueprints" +const opDetachDisk = "DetachDisk" -// GetBlueprintsRequest generates a "aws/request.Request" representing the -// client's request for the GetBlueprints operation. The "output" return +// DetachDiskRequest generates a "aws/request.Request" representing the +// client's request for the DetachDisk operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetBlueprints for more information on using the GetBlueprints +// See DetachDisk for more information on using the DetachDisk // 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 GetBlueprintsRequest method. -// req, resp := client.GetBlueprintsRequest(params) +// // Example sending a request using the DetachDiskRequest method. +// req, resp := client.DetachDiskRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetBlueprints -func (c *Lightsail) GetBlueprintsRequest(input *GetBlueprintsInput) (req *request.Request, output *GetBlueprintsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DetachDisk +func (c *Lightsail) DetachDiskRequest(input *DetachDiskInput) (req *request.Request, output *DetachDiskOutput) { op := &request.Operation{ - Name: opGetBlueprints, + Name: opDetachDisk, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetBlueprintsInput{} + input = &DetachDiskInput{} } - output = &GetBlueprintsOutput{} + output = &DetachDiskOutput{} req = c.newRequest(op, input, output) return } -// GetBlueprints API operation for Amazon Lightsail. +// DetachDisk API operation for Amazon Lightsail. // -// Returns the list of available instance images, or blueprints. You can use -// a blueprint to create a new virtual private server already running a specific -// operating system, as well as a preinstalled app or development stack. The -// software each instance is running depends on the blueprint image you choose. +// Detaches a stopped block storage disk from a Lightsail instance. Make sure +// to unmount any file systems on the device within your operating system before +// stopping the instance and detaching the disk. +// +// The detach disk operation supports tag-based access control via resource +// tags applied to the resource identified by diskName. For more information, +// see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). // // 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 Lightsail's -// API operation GetBlueprints for usage and error information. +// API operation DetachDisk for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -3378,81 +3714,87 @@ func (c *Lightsail) GetBlueprintsRequest(input *GetBlueprintsInput) (req *reques // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetBlueprints -func (c *Lightsail) GetBlueprints(input *GetBlueprintsInput) (*GetBlueprintsOutput, error) { - req, out := c.GetBlueprintsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DetachDisk +func (c *Lightsail) DetachDisk(input *DetachDiskInput) (*DetachDiskOutput, error) { + req, out := c.DetachDiskRequest(input) return out, req.Send() } -// GetBlueprintsWithContext is the same as GetBlueprints with the addition of +// DetachDiskWithContext is the same as DetachDisk with the addition of // the ability to pass a context and additional request options. // -// See GetBlueprints for details on how to use this API operation. +// See DetachDisk 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 *Lightsail) GetBlueprintsWithContext(ctx aws.Context, input *GetBlueprintsInput, opts ...request.Option) (*GetBlueprintsOutput, error) { - req, out := c.GetBlueprintsRequest(input) +func (c *Lightsail) DetachDiskWithContext(ctx aws.Context, input *DetachDiskInput, opts ...request.Option) (*DetachDiskOutput, error) { + req, out := c.DetachDiskRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetBundles = "GetBundles" +const opDetachInstancesFromLoadBalancer = "DetachInstancesFromLoadBalancer" -// GetBundlesRequest generates a "aws/request.Request" representing the -// client's request for the GetBundles operation. The "output" return +// DetachInstancesFromLoadBalancerRequest generates a "aws/request.Request" representing the +// client's request for the DetachInstancesFromLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetBundles for more information on using the GetBundles +// See DetachInstancesFromLoadBalancer for more information on using the DetachInstancesFromLoadBalancer // 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 GetBundlesRequest method. -// req, resp := client.GetBundlesRequest(params) +// // Example sending a request using the DetachInstancesFromLoadBalancerRequest method. +// req, resp := client.DetachInstancesFromLoadBalancerRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetBundles -func (c *Lightsail) GetBundlesRequest(input *GetBundlesInput) (req *request.Request, output *GetBundlesOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DetachInstancesFromLoadBalancer +func (c *Lightsail) DetachInstancesFromLoadBalancerRequest(input *DetachInstancesFromLoadBalancerInput) (req *request.Request, output *DetachInstancesFromLoadBalancerOutput) { op := &request.Operation{ - Name: opGetBundles, + Name: opDetachInstancesFromLoadBalancer, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetBundlesInput{} + input = &DetachInstancesFromLoadBalancerInput{} } - output = &GetBundlesOutput{} + output = &DetachInstancesFromLoadBalancerOutput{} req = c.newRequest(op, input, output) return } -// GetBundles API operation for Amazon Lightsail. +// DetachInstancesFromLoadBalancer API operation for Amazon Lightsail. // -// Returns the list of bundles that are available for purchase. A bundle describes -// the specs for your virtual private server (or instance). +// Detaches the specified instances from a Lightsail load balancer. +// +// This operation waits until the instances are no longer needed before they +// are detached from the load balancer. +// +// The detach instances from load balancer operation supports tag-based access +// control via resource tags applied to the resource identified by loadBalancerName. +// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). // // 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 Lightsail's -// API operation GetBundles for usage and error information. +// API operation DetachInstancesFromLoadBalancer for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -3483,80 +3825,80 @@ func (c *Lightsail) GetBundlesRequest(input *GetBundlesInput) (req *request.Requ // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetBundles -func (c *Lightsail) GetBundles(input *GetBundlesInput) (*GetBundlesOutput, error) { - req, out := c.GetBundlesRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DetachInstancesFromLoadBalancer +func (c *Lightsail) DetachInstancesFromLoadBalancer(input *DetachInstancesFromLoadBalancerInput) (*DetachInstancesFromLoadBalancerOutput, error) { + req, out := c.DetachInstancesFromLoadBalancerRequest(input) return out, req.Send() } -// GetBundlesWithContext is the same as GetBundles with the addition of +// DetachInstancesFromLoadBalancerWithContext is the same as DetachInstancesFromLoadBalancer with the addition of // the ability to pass a context and additional request options. // -// See GetBundles for details on how to use this API operation. +// See DetachInstancesFromLoadBalancer 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 *Lightsail) GetBundlesWithContext(ctx aws.Context, input *GetBundlesInput, opts ...request.Option) (*GetBundlesOutput, error) { - req, out := c.GetBundlesRequest(input) +func (c *Lightsail) DetachInstancesFromLoadBalancerWithContext(ctx aws.Context, input *DetachInstancesFromLoadBalancerInput, opts ...request.Option) (*DetachInstancesFromLoadBalancerOutput, error) { + req, out := c.DetachInstancesFromLoadBalancerRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetDisk = "GetDisk" +const opDetachStaticIp = "DetachStaticIp" -// GetDiskRequest generates a "aws/request.Request" representing the -// client's request for the GetDisk operation. The "output" return +// DetachStaticIpRequest generates a "aws/request.Request" representing the +// client's request for the DetachStaticIp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetDisk for more information on using the GetDisk +// See DetachStaticIp for more information on using the DetachStaticIp // 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 GetDiskRequest method. -// req, resp := client.GetDiskRequest(params) +// // Example sending a request using the DetachStaticIpRequest method. +// req, resp := client.DetachStaticIpRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDisk -func (c *Lightsail) GetDiskRequest(input *GetDiskInput) (req *request.Request, output *GetDiskOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DetachStaticIp +func (c *Lightsail) DetachStaticIpRequest(input *DetachStaticIpInput) (req *request.Request, output *DetachStaticIpOutput) { op := &request.Operation{ - Name: opGetDisk, + Name: opDetachStaticIp, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetDiskInput{} + input = &DetachStaticIpInput{} } - output = &GetDiskOutput{} + output = &DetachStaticIpOutput{} req = c.newRequest(op, input, output) return } -// GetDisk API operation for Amazon Lightsail. +// DetachStaticIp API operation for Amazon Lightsail. // -// Returns information about a specific block storage disk. +// Detaches a static IP from the Amazon Lightsail instance to which it is attached. // // 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 Lightsail's -// API operation GetDisk for usage and error information. +// API operation DetachStaticIp for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -3587,80 +3929,80 @@ func (c *Lightsail) GetDiskRequest(input *GetDiskInput) (req *request.Request, o // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDisk -func (c *Lightsail) GetDisk(input *GetDiskInput) (*GetDiskOutput, error) { - req, out := c.GetDiskRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DetachStaticIp +func (c *Lightsail) DetachStaticIp(input *DetachStaticIpInput) (*DetachStaticIpOutput, error) { + req, out := c.DetachStaticIpRequest(input) return out, req.Send() } -// GetDiskWithContext is the same as GetDisk with the addition of +// DetachStaticIpWithContext is the same as DetachStaticIp with the addition of // the ability to pass a context and additional request options. // -// See GetDisk for details on how to use this API operation. +// See DetachStaticIp 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 *Lightsail) GetDiskWithContext(ctx aws.Context, input *GetDiskInput, opts ...request.Option) (*GetDiskOutput, error) { - req, out := c.GetDiskRequest(input) +func (c *Lightsail) DetachStaticIpWithContext(ctx aws.Context, input *DetachStaticIpInput, opts ...request.Option) (*DetachStaticIpOutput, error) { + req, out := c.DetachStaticIpRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetDiskSnapshot = "GetDiskSnapshot" +const opDownloadDefaultKeyPair = "DownloadDefaultKeyPair" -// GetDiskSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the GetDiskSnapshot operation. The "output" return +// DownloadDefaultKeyPairRequest generates a "aws/request.Request" representing the +// client's request for the DownloadDefaultKeyPair operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetDiskSnapshot for more information on using the GetDiskSnapshot +// See DownloadDefaultKeyPair for more information on using the DownloadDefaultKeyPair // 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 GetDiskSnapshotRequest method. -// req, resp := client.GetDiskSnapshotRequest(params) +// // Example sending a request using the DownloadDefaultKeyPairRequest method. +// req, resp := client.DownloadDefaultKeyPairRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDiskSnapshot -func (c *Lightsail) GetDiskSnapshotRequest(input *GetDiskSnapshotInput) (req *request.Request, output *GetDiskSnapshotOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DownloadDefaultKeyPair +func (c *Lightsail) DownloadDefaultKeyPairRequest(input *DownloadDefaultKeyPairInput) (req *request.Request, output *DownloadDefaultKeyPairOutput) { op := &request.Operation{ - Name: opGetDiskSnapshot, + Name: opDownloadDefaultKeyPair, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetDiskSnapshotInput{} + input = &DownloadDefaultKeyPairInput{} } - output = &GetDiskSnapshotOutput{} + output = &DownloadDefaultKeyPairOutput{} req = c.newRequest(op, input, output) return } -// GetDiskSnapshot API operation for Amazon Lightsail. +// DownloadDefaultKeyPair API operation for Amazon Lightsail. // -// Returns information about a specific block storage disk snapshot. +// Downloads the default SSH key pair from the user's 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 Amazon Lightsail's -// API operation GetDiskSnapshot for usage and error information. +// API operation DownloadDefaultKeyPair for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -3691,85 +4033,96 @@ func (c *Lightsail) GetDiskSnapshotRequest(input *GetDiskSnapshotInput) (req *re // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDiskSnapshot -func (c *Lightsail) GetDiskSnapshot(input *GetDiskSnapshotInput) (*GetDiskSnapshotOutput, error) { - req, out := c.GetDiskSnapshotRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DownloadDefaultKeyPair +func (c *Lightsail) DownloadDefaultKeyPair(input *DownloadDefaultKeyPairInput) (*DownloadDefaultKeyPairOutput, error) { + req, out := c.DownloadDefaultKeyPairRequest(input) return out, req.Send() } -// GetDiskSnapshotWithContext is the same as GetDiskSnapshot with the addition of +// DownloadDefaultKeyPairWithContext is the same as DownloadDefaultKeyPair with the addition of // the ability to pass a context and additional request options. // -// See GetDiskSnapshot for details on how to use this API operation. +// See DownloadDefaultKeyPair 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 *Lightsail) GetDiskSnapshotWithContext(ctx aws.Context, input *GetDiskSnapshotInput, opts ...request.Option) (*GetDiskSnapshotOutput, error) { - req, out := c.GetDiskSnapshotRequest(input) +func (c *Lightsail) DownloadDefaultKeyPairWithContext(ctx aws.Context, input *DownloadDefaultKeyPairInput, opts ...request.Option) (*DownloadDefaultKeyPairOutput, error) { + req, out := c.DownloadDefaultKeyPairRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetDiskSnapshots = "GetDiskSnapshots" +const opExportSnapshot = "ExportSnapshot" -// GetDiskSnapshotsRequest generates a "aws/request.Request" representing the -// client's request for the GetDiskSnapshots operation. The "output" return +// ExportSnapshotRequest generates a "aws/request.Request" representing the +// client's request for the ExportSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetDiskSnapshots for more information on using the GetDiskSnapshots +// See ExportSnapshot for more information on using the ExportSnapshot // 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 GetDiskSnapshotsRequest method. -// req, resp := client.GetDiskSnapshotsRequest(params) +// // Example sending a request using the ExportSnapshotRequest method. +// req, resp := client.ExportSnapshotRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDiskSnapshots -func (c *Lightsail) GetDiskSnapshotsRequest(input *GetDiskSnapshotsInput) (req *request.Request, output *GetDiskSnapshotsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/ExportSnapshot +func (c *Lightsail) ExportSnapshotRequest(input *ExportSnapshotInput) (req *request.Request, output *ExportSnapshotOutput) { op := &request.Operation{ - Name: opGetDiskSnapshots, + Name: opExportSnapshot, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetDiskSnapshotsInput{} + input = &ExportSnapshotInput{} } - output = &GetDiskSnapshotsOutput{} + output = &ExportSnapshotOutput{} req = c.newRequest(op, input, output) return } -// GetDiskSnapshots API operation for Amazon Lightsail. +// ExportSnapshot API operation for Amazon Lightsail. // -// Returns information about all block storage disk snapshots in your AWS account -// and region. +// Exports a Amazon Lightsail instance or block storage disk snapshot to Amazon +// Elastic Compute Cloud (Amazon EC2). This operation results in an export snapshot +// record that can be used with the create cloud formation stack operation to +// create new Amazon EC2 instances. // -// If you are describing a long list of disk snapshots, you can paginate the -// output to make the list more manageable. You can use the pageToken and nextPageToken -// values to retrieve the next items in the list. +// Exported instance snapshots appear in Amazon EC2 as Amazon Machine Images +// (AMIs), and the instance system disk appears as an Amazon Elastic Block Store +// (Amazon EBS) volume. Exported disk snapshots appear in Amazon EC2 as Amazon +// EBS volumes. Snapshots are exported to the same Amazon Web Services Region +// in Amazon EC2 as the source Lightsail snapshot. +// +// The export snapshotoperation supports tag-based access control via resource tags applied to +// the resource identified by sourceSnapshotName. For more information, see +// the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). +// +// Use the get instance snapshots or get disk snapshots operations to get a +// list of snapshots that you can export to Amazon EC2. // // 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 Lightsail's -// API operation GetDiskSnapshots for usage and error information. +// API operation ExportSnapshot for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -3800,85 +4153,80 @@ func (c *Lightsail) GetDiskSnapshotsRequest(input *GetDiskSnapshotsInput) (req * // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDiskSnapshots -func (c *Lightsail) GetDiskSnapshots(input *GetDiskSnapshotsInput) (*GetDiskSnapshotsOutput, error) { - req, out := c.GetDiskSnapshotsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/ExportSnapshot +func (c *Lightsail) ExportSnapshot(input *ExportSnapshotInput) (*ExportSnapshotOutput, error) { + req, out := c.ExportSnapshotRequest(input) return out, req.Send() } -// GetDiskSnapshotsWithContext is the same as GetDiskSnapshots with the addition of +// ExportSnapshotWithContext is the same as ExportSnapshot with the addition of // the ability to pass a context and additional request options. // -// See GetDiskSnapshots for details on how to use this API operation. +// See ExportSnapshot 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 *Lightsail) GetDiskSnapshotsWithContext(ctx aws.Context, input *GetDiskSnapshotsInput, opts ...request.Option) (*GetDiskSnapshotsOutput, error) { - req, out := c.GetDiskSnapshotsRequest(input) +func (c *Lightsail) ExportSnapshotWithContext(ctx aws.Context, input *ExportSnapshotInput, opts ...request.Option) (*ExportSnapshotOutput, error) { + req, out := c.ExportSnapshotRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetDisks = "GetDisks" +const opGetActiveNames = "GetActiveNames" -// GetDisksRequest generates a "aws/request.Request" representing the -// client's request for the GetDisks operation. The "output" return +// GetActiveNamesRequest generates a "aws/request.Request" representing the +// client's request for the GetActiveNames operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetDisks for more information on using the GetDisks +// See GetActiveNames for more information on using the GetActiveNames // 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 GetDisksRequest method. -// req, resp := client.GetDisksRequest(params) +// // Example sending a request using the GetActiveNamesRequest method. +// req, resp := client.GetActiveNamesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDisks -func (c *Lightsail) GetDisksRequest(input *GetDisksInput) (req *request.Request, output *GetDisksOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetActiveNames +func (c *Lightsail) GetActiveNamesRequest(input *GetActiveNamesInput) (req *request.Request, output *GetActiveNamesOutput) { op := &request.Operation{ - Name: opGetDisks, + Name: opGetActiveNames, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetDisksInput{} + input = &GetActiveNamesInput{} } - output = &GetDisksOutput{} + output = &GetActiveNamesOutput{} req = c.newRequest(op, input, output) return } -// GetDisks API operation for Amazon Lightsail. -// -// Returns information about all block storage disks in your AWS account and -// region. +// GetActiveNames API operation for Amazon Lightsail. // -// If you are describing a long list of disks, you can paginate the output to -// make the list more manageable. You can use the pageToken and nextPageToken -// values to retrieve the next items in the list. +// Returns the names of all active (not deleted) resources. // // 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 Lightsail's -// API operation GetDisks for usage and error information. +// API operation GetActiveNames for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -3909,80 +4257,83 @@ func (c *Lightsail) GetDisksRequest(input *GetDisksInput) (req *request.Request, // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDisks -func (c *Lightsail) GetDisks(input *GetDisksInput) (*GetDisksOutput, error) { - req, out := c.GetDisksRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetActiveNames +func (c *Lightsail) GetActiveNames(input *GetActiveNamesInput) (*GetActiveNamesOutput, error) { + req, out := c.GetActiveNamesRequest(input) return out, req.Send() } -// GetDisksWithContext is the same as GetDisks with the addition of +// GetActiveNamesWithContext is the same as GetActiveNames with the addition of // the ability to pass a context and additional request options. // -// See GetDisks for details on how to use this API operation. +// See GetActiveNames 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 *Lightsail) GetDisksWithContext(ctx aws.Context, input *GetDisksInput, opts ...request.Option) (*GetDisksOutput, error) { - req, out := c.GetDisksRequest(input) +func (c *Lightsail) GetActiveNamesWithContext(ctx aws.Context, input *GetActiveNamesInput, opts ...request.Option) (*GetActiveNamesOutput, error) { + req, out := c.GetActiveNamesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetDomain = "GetDomain" +const opGetBlueprints = "GetBlueprints" -// GetDomainRequest generates a "aws/request.Request" representing the -// client's request for the GetDomain operation. The "output" return +// GetBlueprintsRequest generates a "aws/request.Request" representing the +// client's request for the GetBlueprints operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetDomain for more information on using the GetDomain +// See GetBlueprints for more information on using the GetBlueprints // 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 GetDomainRequest method. -// req, resp := client.GetDomainRequest(params) +// // Example sending a request using the GetBlueprintsRequest method. +// req, resp := client.GetBlueprintsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDomain -func (c *Lightsail) GetDomainRequest(input *GetDomainInput) (req *request.Request, output *GetDomainOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetBlueprints +func (c *Lightsail) GetBlueprintsRequest(input *GetBlueprintsInput) (req *request.Request, output *GetBlueprintsOutput) { op := &request.Operation{ - Name: opGetDomain, + Name: opGetBlueprints, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetDomainInput{} + input = &GetBlueprintsInput{} } - output = &GetDomainOutput{} + output = &GetBlueprintsOutput{} req = c.newRequest(op, input, output) return } -// GetDomain API operation for Amazon Lightsail. +// GetBlueprints API operation for Amazon Lightsail. // -// Returns information about a specific domain recordset. +// Returns the list of available instance images, or blueprints. You can use +// a blueprint to create a new virtual private server already running a specific +// operating system, as well as a preinstalled app or development stack. The +// software each instance is running depends on the blueprint image you choose. // // 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 Lightsail's -// API operation GetDomain for usage and error information. +// API operation GetBlueprints for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -4013,80 +4364,81 @@ func (c *Lightsail) GetDomainRequest(input *GetDomainInput) (req *request.Reques // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDomain -func (c *Lightsail) GetDomain(input *GetDomainInput) (*GetDomainOutput, error) { - req, out := c.GetDomainRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetBlueprints +func (c *Lightsail) GetBlueprints(input *GetBlueprintsInput) (*GetBlueprintsOutput, error) { + req, out := c.GetBlueprintsRequest(input) return out, req.Send() } -// GetDomainWithContext is the same as GetDomain with the addition of +// GetBlueprintsWithContext is the same as GetBlueprints with the addition of // the ability to pass a context and additional request options. // -// See GetDomain for details on how to use this API operation. +// See GetBlueprints 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 *Lightsail) GetDomainWithContext(ctx aws.Context, input *GetDomainInput, opts ...request.Option) (*GetDomainOutput, error) { - req, out := c.GetDomainRequest(input) +func (c *Lightsail) GetBlueprintsWithContext(ctx aws.Context, input *GetBlueprintsInput, opts ...request.Option) (*GetBlueprintsOutput, error) { + req, out := c.GetBlueprintsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetDomains = "GetDomains" +const opGetBundles = "GetBundles" -// GetDomainsRequest generates a "aws/request.Request" representing the -// client's request for the GetDomains operation. The "output" return +// GetBundlesRequest generates a "aws/request.Request" representing the +// client's request for the GetBundles operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetDomains for more information on using the GetDomains +// See GetBundles for more information on using the GetBundles // 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 GetDomainsRequest method. -// req, resp := client.GetDomainsRequest(params) +// // Example sending a request using the GetBundlesRequest method. +// req, resp := client.GetBundlesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDomains -func (c *Lightsail) GetDomainsRequest(input *GetDomainsInput) (req *request.Request, output *GetDomainsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetBundles +func (c *Lightsail) GetBundlesRequest(input *GetBundlesInput) (req *request.Request, output *GetBundlesOutput) { op := &request.Operation{ - Name: opGetDomains, + Name: opGetBundles, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetDomainsInput{} + input = &GetBundlesInput{} } - output = &GetDomainsOutput{} + output = &GetBundlesOutput{} req = c.newRequest(op, input, output) return } -// GetDomains API operation for Amazon Lightsail. +// GetBundles API operation for Amazon Lightsail. // -// Returns a list of all domains in the user's account. +// Returns the list of bundles that are available for purchase. A bundle describes +// the specs for your virtual private server (or instance). // // 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 Lightsail's -// API operation GetDomains for usage and error information. +// API operation GetBundles for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -4117,81 +4469,84 @@ func (c *Lightsail) GetDomainsRequest(input *GetDomainsInput) (req *request.Requ // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDomains -func (c *Lightsail) GetDomains(input *GetDomainsInput) (*GetDomainsOutput, error) { - req, out := c.GetDomainsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetBundles +func (c *Lightsail) GetBundles(input *GetBundlesInput) (*GetBundlesOutput, error) { + req, out := c.GetBundlesRequest(input) return out, req.Send() } -// GetDomainsWithContext is the same as GetDomains with the addition of +// GetBundlesWithContext is the same as GetBundles with the addition of // the ability to pass a context and additional request options. // -// See GetDomains for details on how to use this API operation. +// See GetBundles 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 *Lightsail) GetDomainsWithContext(ctx aws.Context, input *GetDomainsInput, opts ...request.Option) (*GetDomainsOutput, error) { - req, out := c.GetDomainsRequest(input) +func (c *Lightsail) GetBundlesWithContext(ctx aws.Context, input *GetBundlesInput, opts ...request.Option) (*GetBundlesOutput, error) { + req, out := c.GetBundlesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetInstance = "GetInstance" +const opGetCloudFormationStackRecords = "GetCloudFormationStackRecords" -// GetInstanceRequest generates a "aws/request.Request" representing the -// client's request for the GetInstance operation. The "output" return +// GetCloudFormationStackRecordsRequest generates a "aws/request.Request" representing the +// client's request for the GetCloudFormationStackRecords operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetInstance for more information on using the GetInstance +// See GetCloudFormationStackRecords for more information on using the GetCloudFormationStackRecords // 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 GetInstanceRequest method. -// req, resp := client.GetInstanceRequest(params) +// // Example sending a request using the GetCloudFormationStackRecordsRequest method. +// req, resp := client.GetCloudFormationStackRecordsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstance -func (c *Lightsail) GetInstanceRequest(input *GetInstanceInput) (req *request.Request, output *GetInstanceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetCloudFormationStackRecords +func (c *Lightsail) GetCloudFormationStackRecordsRequest(input *GetCloudFormationStackRecordsInput) (req *request.Request, output *GetCloudFormationStackRecordsOutput) { op := &request.Operation{ - Name: opGetInstance, + Name: opGetCloudFormationStackRecords, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetInstanceInput{} + input = &GetCloudFormationStackRecordsInput{} } - output = &GetInstanceOutput{} + output = &GetCloudFormationStackRecordsOutput{} req = c.newRequest(op, input, output) return } -// GetInstance API operation for Amazon Lightsail. +// GetCloudFormationStackRecords API operation for Amazon Lightsail. // -// Returns information about a specific Amazon Lightsail instance, which is -// a virtual private server. +// Returns the CloudFormation stack record created as a result of the create +// cloud formation stack operation. +// +// An AWS CloudFormation stack is used to create a new Amazon EC2 instance from +// an exported Lightsail snapshot. // // 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 Lightsail's -// API operation GetInstance for usage and error information. +// API operation GetCloudFormationStackRecords for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -4222,81 +4577,80 @@ func (c *Lightsail) GetInstanceRequest(input *GetInstanceInput) (req *request.Re // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstance -func (c *Lightsail) GetInstance(input *GetInstanceInput) (*GetInstanceOutput, error) { - req, out := c.GetInstanceRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetCloudFormationStackRecords +func (c *Lightsail) GetCloudFormationStackRecords(input *GetCloudFormationStackRecordsInput) (*GetCloudFormationStackRecordsOutput, error) { + req, out := c.GetCloudFormationStackRecordsRequest(input) return out, req.Send() } -// GetInstanceWithContext is the same as GetInstance with the addition of +// GetCloudFormationStackRecordsWithContext is the same as GetCloudFormationStackRecords with the addition of // the ability to pass a context and additional request options. // -// See GetInstance for details on how to use this API operation. +// See GetCloudFormationStackRecords 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 *Lightsail) GetInstanceWithContext(ctx aws.Context, input *GetInstanceInput, opts ...request.Option) (*GetInstanceOutput, error) { - req, out := c.GetInstanceRequest(input) +func (c *Lightsail) GetCloudFormationStackRecordsWithContext(ctx aws.Context, input *GetCloudFormationStackRecordsInput, opts ...request.Option) (*GetCloudFormationStackRecordsOutput, error) { + req, out := c.GetCloudFormationStackRecordsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetInstanceAccessDetails = "GetInstanceAccessDetails" +const opGetDisk = "GetDisk" -// GetInstanceAccessDetailsRequest generates a "aws/request.Request" representing the -// client's request for the GetInstanceAccessDetails operation. The "output" return +// GetDiskRequest generates a "aws/request.Request" representing the +// client's request for the GetDisk operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetInstanceAccessDetails for more information on using the GetInstanceAccessDetails +// See GetDisk for more information on using the GetDisk // 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 GetInstanceAccessDetailsRequest method. -// req, resp := client.GetInstanceAccessDetailsRequest(params) +// // Example sending a request using the GetDiskRequest method. +// req, resp := client.GetDiskRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstanceAccessDetails -func (c *Lightsail) GetInstanceAccessDetailsRequest(input *GetInstanceAccessDetailsInput) (req *request.Request, output *GetInstanceAccessDetailsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDisk +func (c *Lightsail) GetDiskRequest(input *GetDiskInput) (req *request.Request, output *GetDiskOutput) { op := &request.Operation{ - Name: opGetInstanceAccessDetails, + Name: opGetDisk, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetInstanceAccessDetailsInput{} + input = &GetDiskInput{} } - output = &GetInstanceAccessDetailsOutput{} + output = &GetDiskOutput{} req = c.newRequest(op, input, output) return } -// GetInstanceAccessDetails API operation for Amazon Lightsail. +// GetDisk API operation for Amazon Lightsail. // -// Returns temporary SSH keys you can use to connect to a specific virtual private -// server, or instance. +// Returns information about a specific block storage disk. // // 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 Lightsail's -// API operation GetInstanceAccessDetails for usage and error information. +// API operation GetDisk for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -4327,81 +4681,80 @@ func (c *Lightsail) GetInstanceAccessDetailsRequest(input *GetInstanceAccessDeta // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstanceAccessDetails -func (c *Lightsail) GetInstanceAccessDetails(input *GetInstanceAccessDetailsInput) (*GetInstanceAccessDetailsOutput, error) { - req, out := c.GetInstanceAccessDetailsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDisk +func (c *Lightsail) GetDisk(input *GetDiskInput) (*GetDiskOutput, error) { + req, out := c.GetDiskRequest(input) return out, req.Send() } -// GetInstanceAccessDetailsWithContext is the same as GetInstanceAccessDetails with the addition of +// GetDiskWithContext is the same as GetDisk with the addition of // the ability to pass a context and additional request options. // -// See GetInstanceAccessDetails for details on how to use this API operation. +// See GetDisk 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 *Lightsail) GetInstanceAccessDetailsWithContext(ctx aws.Context, input *GetInstanceAccessDetailsInput, opts ...request.Option) (*GetInstanceAccessDetailsOutput, error) { - req, out := c.GetInstanceAccessDetailsRequest(input) +func (c *Lightsail) GetDiskWithContext(ctx aws.Context, input *GetDiskInput, opts ...request.Option) (*GetDiskOutput, error) { + req, out := c.GetDiskRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetInstanceMetricData = "GetInstanceMetricData" +const opGetDiskSnapshot = "GetDiskSnapshot" -// GetInstanceMetricDataRequest generates a "aws/request.Request" representing the -// client's request for the GetInstanceMetricData operation. The "output" return +// GetDiskSnapshotRequest generates a "aws/request.Request" representing the +// client's request for the GetDiskSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetInstanceMetricData for more information on using the GetInstanceMetricData +// See GetDiskSnapshot for more information on using the GetDiskSnapshot // 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 GetInstanceMetricDataRequest method. -// req, resp := client.GetInstanceMetricDataRequest(params) +// // Example sending a request using the GetDiskSnapshotRequest method. +// req, resp := client.GetDiskSnapshotRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstanceMetricData -func (c *Lightsail) GetInstanceMetricDataRequest(input *GetInstanceMetricDataInput) (req *request.Request, output *GetInstanceMetricDataOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDiskSnapshot +func (c *Lightsail) GetDiskSnapshotRequest(input *GetDiskSnapshotInput) (req *request.Request, output *GetDiskSnapshotOutput) { op := &request.Operation{ - Name: opGetInstanceMetricData, + Name: opGetDiskSnapshot, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetInstanceMetricDataInput{} + input = &GetDiskSnapshotInput{} } - output = &GetInstanceMetricDataOutput{} + output = &GetDiskSnapshotOutput{} req = c.newRequest(op, input, output) return } -// GetInstanceMetricData API operation for Amazon Lightsail. +// GetDiskSnapshot API operation for Amazon Lightsail. // -// Returns the data points for the specified Amazon Lightsail instance metric, -// given an instance name. +// Returns information about a specific block storage disk snapshot. // // 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 Lightsail's -// API operation GetInstanceMetricData for usage and error information. +// API operation GetDiskSnapshot for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -4432,80 +4785,85 @@ func (c *Lightsail) GetInstanceMetricDataRequest(input *GetInstanceMetricDataInp // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstanceMetricData -func (c *Lightsail) GetInstanceMetricData(input *GetInstanceMetricDataInput) (*GetInstanceMetricDataOutput, error) { - req, out := c.GetInstanceMetricDataRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDiskSnapshot +func (c *Lightsail) GetDiskSnapshot(input *GetDiskSnapshotInput) (*GetDiskSnapshotOutput, error) { + req, out := c.GetDiskSnapshotRequest(input) return out, req.Send() } -// GetInstanceMetricDataWithContext is the same as GetInstanceMetricData with the addition of +// GetDiskSnapshotWithContext is the same as GetDiskSnapshot with the addition of // the ability to pass a context and additional request options. // -// See GetInstanceMetricData for details on how to use this API operation. +// See GetDiskSnapshot 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 *Lightsail) GetInstanceMetricDataWithContext(ctx aws.Context, input *GetInstanceMetricDataInput, opts ...request.Option) (*GetInstanceMetricDataOutput, error) { - req, out := c.GetInstanceMetricDataRequest(input) +func (c *Lightsail) GetDiskSnapshotWithContext(ctx aws.Context, input *GetDiskSnapshotInput, opts ...request.Option) (*GetDiskSnapshotOutput, error) { + req, out := c.GetDiskSnapshotRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetInstancePortStates = "GetInstancePortStates" +const opGetDiskSnapshots = "GetDiskSnapshots" -// GetInstancePortStatesRequest generates a "aws/request.Request" representing the -// client's request for the GetInstancePortStates operation. The "output" return +// GetDiskSnapshotsRequest generates a "aws/request.Request" representing the +// client's request for the GetDiskSnapshots operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetInstancePortStates for more information on using the GetInstancePortStates +// See GetDiskSnapshots for more information on using the GetDiskSnapshots // 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 GetInstancePortStatesRequest method. -// req, resp := client.GetInstancePortStatesRequest(params) +// // Example sending a request using the GetDiskSnapshotsRequest method. +// req, resp := client.GetDiskSnapshotsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstancePortStates -func (c *Lightsail) GetInstancePortStatesRequest(input *GetInstancePortStatesInput) (req *request.Request, output *GetInstancePortStatesOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDiskSnapshots +func (c *Lightsail) GetDiskSnapshotsRequest(input *GetDiskSnapshotsInput) (req *request.Request, output *GetDiskSnapshotsOutput) { op := &request.Operation{ - Name: opGetInstancePortStates, + Name: opGetDiskSnapshots, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetInstancePortStatesInput{} + input = &GetDiskSnapshotsInput{} } - output = &GetInstancePortStatesOutput{} + output = &GetDiskSnapshotsOutput{} req = c.newRequest(op, input, output) return } -// GetInstancePortStates API operation for Amazon Lightsail. +// GetDiskSnapshots API operation for Amazon Lightsail. // -// Returns the port states for a specific virtual private server, or instance. +// Returns information about all block storage disk snapshots in your AWS account +// and region. +// +// If you are describing a long list of disk snapshots, you can paginate the +// output to make the list more manageable. You can use the pageToken and nextPageToken +// values to retrieve the next items in the list. // // 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 Lightsail's -// API operation GetInstancePortStates for usage and error information. +// API operation GetDiskSnapshots for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -4536,80 +4894,85 @@ func (c *Lightsail) GetInstancePortStatesRequest(input *GetInstancePortStatesInp // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstancePortStates -func (c *Lightsail) GetInstancePortStates(input *GetInstancePortStatesInput) (*GetInstancePortStatesOutput, error) { - req, out := c.GetInstancePortStatesRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDiskSnapshots +func (c *Lightsail) GetDiskSnapshots(input *GetDiskSnapshotsInput) (*GetDiskSnapshotsOutput, error) { + req, out := c.GetDiskSnapshotsRequest(input) return out, req.Send() } -// GetInstancePortStatesWithContext is the same as GetInstancePortStates with the addition of +// GetDiskSnapshotsWithContext is the same as GetDiskSnapshots with the addition of // the ability to pass a context and additional request options. // -// See GetInstancePortStates for details on how to use this API operation. +// See GetDiskSnapshots 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 *Lightsail) GetInstancePortStatesWithContext(ctx aws.Context, input *GetInstancePortStatesInput, opts ...request.Option) (*GetInstancePortStatesOutput, error) { - req, out := c.GetInstancePortStatesRequest(input) +func (c *Lightsail) GetDiskSnapshotsWithContext(ctx aws.Context, input *GetDiskSnapshotsInput, opts ...request.Option) (*GetDiskSnapshotsOutput, error) { + req, out := c.GetDiskSnapshotsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetInstanceSnapshot = "GetInstanceSnapshot" +const opGetDisks = "GetDisks" -// GetInstanceSnapshotRequest generates a "aws/request.Request" representing the -// client's request for the GetInstanceSnapshot operation. The "output" return +// GetDisksRequest generates a "aws/request.Request" representing the +// client's request for the GetDisks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetInstanceSnapshot for more information on using the GetInstanceSnapshot +// See GetDisks for more information on using the GetDisks // 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 GetInstanceSnapshotRequest method. -// req, resp := client.GetInstanceSnapshotRequest(params) +// // Example sending a request using the GetDisksRequest method. +// req, resp := client.GetDisksRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstanceSnapshot -func (c *Lightsail) GetInstanceSnapshotRequest(input *GetInstanceSnapshotInput) (req *request.Request, output *GetInstanceSnapshotOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDisks +func (c *Lightsail) GetDisksRequest(input *GetDisksInput) (req *request.Request, output *GetDisksOutput) { op := &request.Operation{ - Name: opGetInstanceSnapshot, + Name: opGetDisks, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetInstanceSnapshotInput{} + input = &GetDisksInput{} } - output = &GetInstanceSnapshotOutput{} + output = &GetDisksOutput{} req = c.newRequest(op, input, output) return } -// GetInstanceSnapshot API operation for Amazon Lightsail. +// GetDisks API operation for Amazon Lightsail. // -// Returns information about a specific instance snapshot. +// Returns information about all block storage disks in your AWS account and +// region. +// +// If you are describing a long list of disks, you can paginate the output to +// make the list more manageable. You can use the pageToken and nextPageToken +// values to retrieve the next items in the list. // // 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 Lightsail's -// API operation GetInstanceSnapshot for usage and error information. +// API operation GetDisks for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -4640,80 +5003,80 @@ func (c *Lightsail) GetInstanceSnapshotRequest(input *GetInstanceSnapshotInput) // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstanceSnapshot -func (c *Lightsail) GetInstanceSnapshot(input *GetInstanceSnapshotInput) (*GetInstanceSnapshotOutput, error) { - req, out := c.GetInstanceSnapshotRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDisks +func (c *Lightsail) GetDisks(input *GetDisksInput) (*GetDisksOutput, error) { + req, out := c.GetDisksRequest(input) return out, req.Send() } -// GetInstanceSnapshotWithContext is the same as GetInstanceSnapshot with the addition of +// GetDisksWithContext is the same as GetDisks with the addition of // the ability to pass a context and additional request options. // -// See GetInstanceSnapshot for details on how to use this API operation. +// See GetDisks 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 *Lightsail) GetInstanceSnapshotWithContext(ctx aws.Context, input *GetInstanceSnapshotInput, opts ...request.Option) (*GetInstanceSnapshotOutput, error) { - req, out := c.GetInstanceSnapshotRequest(input) +func (c *Lightsail) GetDisksWithContext(ctx aws.Context, input *GetDisksInput, opts ...request.Option) (*GetDisksOutput, error) { + req, out := c.GetDisksRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetInstanceSnapshots = "GetInstanceSnapshots" +const opGetDomain = "GetDomain" -// GetInstanceSnapshotsRequest generates a "aws/request.Request" representing the -// client's request for the GetInstanceSnapshots operation. The "output" return +// GetDomainRequest generates a "aws/request.Request" representing the +// client's request for the GetDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetInstanceSnapshots for more information on using the GetInstanceSnapshots +// See GetDomain for more information on using the GetDomain // 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 GetInstanceSnapshotsRequest method. -// req, resp := client.GetInstanceSnapshotsRequest(params) +// // Example sending a request using the GetDomainRequest method. +// req, resp := client.GetDomainRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstanceSnapshots -func (c *Lightsail) GetInstanceSnapshotsRequest(input *GetInstanceSnapshotsInput) (req *request.Request, output *GetInstanceSnapshotsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDomain +func (c *Lightsail) GetDomainRequest(input *GetDomainInput) (req *request.Request, output *GetDomainOutput) { op := &request.Operation{ - Name: opGetInstanceSnapshots, + Name: opGetDomain, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetInstanceSnapshotsInput{} + input = &GetDomainInput{} } - output = &GetInstanceSnapshotsOutput{} + output = &GetDomainOutput{} req = c.newRequest(op, input, output) return } -// GetInstanceSnapshots API operation for Amazon Lightsail. +// GetDomain API operation for Amazon Lightsail. // -// Returns all instance snapshots for the user's account. +// Returns information about a specific domain recordset. // // 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 Lightsail's -// API operation GetInstanceSnapshots for usage and error information. +// API operation GetDomain for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -4744,80 +5107,80 @@ func (c *Lightsail) GetInstanceSnapshotsRequest(input *GetInstanceSnapshotsInput // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstanceSnapshots -func (c *Lightsail) GetInstanceSnapshots(input *GetInstanceSnapshotsInput) (*GetInstanceSnapshotsOutput, error) { - req, out := c.GetInstanceSnapshotsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDomain +func (c *Lightsail) GetDomain(input *GetDomainInput) (*GetDomainOutput, error) { + req, out := c.GetDomainRequest(input) return out, req.Send() } -// GetInstanceSnapshotsWithContext is the same as GetInstanceSnapshots with the addition of +// GetDomainWithContext is the same as GetDomain with the addition of // the ability to pass a context and additional request options. // -// See GetInstanceSnapshots for details on how to use this API operation. +// See GetDomain 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 *Lightsail) GetInstanceSnapshotsWithContext(ctx aws.Context, input *GetInstanceSnapshotsInput, opts ...request.Option) (*GetInstanceSnapshotsOutput, error) { - req, out := c.GetInstanceSnapshotsRequest(input) +func (c *Lightsail) GetDomainWithContext(ctx aws.Context, input *GetDomainInput, opts ...request.Option) (*GetDomainOutput, error) { + req, out := c.GetDomainRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetInstanceState = "GetInstanceState" +const opGetDomains = "GetDomains" -// GetInstanceStateRequest generates a "aws/request.Request" representing the -// client's request for the GetInstanceState operation. The "output" return +// GetDomainsRequest generates a "aws/request.Request" representing the +// client's request for the GetDomains operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetInstanceState for more information on using the GetInstanceState +// See GetDomains for more information on using the GetDomains // 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 GetInstanceStateRequest method. -// req, resp := client.GetInstanceStateRequest(params) +// // Example sending a request using the GetDomainsRequest method. +// req, resp := client.GetDomainsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstanceState -func (c *Lightsail) GetInstanceStateRequest(input *GetInstanceStateInput) (req *request.Request, output *GetInstanceStateOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDomains +func (c *Lightsail) GetDomainsRequest(input *GetDomainsInput) (req *request.Request, output *GetDomainsOutput) { op := &request.Operation{ - Name: opGetInstanceState, + Name: opGetDomains, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetInstanceStateInput{} + input = &GetDomainsInput{} } - output = &GetInstanceStateOutput{} + output = &GetDomainsOutput{} req = c.newRequest(op, input, output) return } -// GetInstanceState API operation for Amazon Lightsail. +// GetDomains API operation for Amazon Lightsail. // -// Returns the state of a specific instance. Works on one instance at a time. +// Returns a list of all domains in the user's 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 Amazon Lightsail's -// API operation GetInstanceState for usage and error information. +// API operation GetDomains for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -4848,81 +5211,84 @@ func (c *Lightsail) GetInstanceStateRequest(input *GetInstanceStateInput) (req * // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstanceState -func (c *Lightsail) GetInstanceState(input *GetInstanceStateInput) (*GetInstanceStateOutput, error) { - req, out := c.GetInstanceStateRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetDomains +func (c *Lightsail) GetDomains(input *GetDomainsInput) (*GetDomainsOutput, error) { + req, out := c.GetDomainsRequest(input) return out, req.Send() } -// GetInstanceStateWithContext is the same as GetInstanceState with the addition of +// GetDomainsWithContext is the same as GetDomains with the addition of // the ability to pass a context and additional request options. // -// See GetInstanceState for details on how to use this API operation. +// See GetDomains 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 *Lightsail) GetInstanceStateWithContext(ctx aws.Context, input *GetInstanceStateInput, opts ...request.Option) (*GetInstanceStateOutput, error) { - req, out := c.GetInstanceStateRequest(input) +func (c *Lightsail) GetDomainsWithContext(ctx aws.Context, input *GetDomainsInput, opts ...request.Option) (*GetDomainsOutput, error) { + req, out := c.GetDomainsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetInstances = "GetInstances" +const opGetExportSnapshotRecords = "GetExportSnapshotRecords" -// GetInstancesRequest generates a "aws/request.Request" representing the -// client's request for the GetInstances operation. The "output" return +// GetExportSnapshotRecordsRequest generates a "aws/request.Request" representing the +// client's request for the GetExportSnapshotRecords operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetInstances for more information on using the GetInstances +// See GetExportSnapshotRecords for more information on using the GetExportSnapshotRecords // 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 GetInstancesRequest method. -// req, resp := client.GetInstancesRequest(params) +// // Example sending a request using the GetExportSnapshotRecordsRequest method. +// req, resp := client.GetExportSnapshotRecordsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstances -func (c *Lightsail) GetInstancesRequest(input *GetInstancesInput) (req *request.Request, output *GetInstancesOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetExportSnapshotRecords +func (c *Lightsail) GetExportSnapshotRecordsRequest(input *GetExportSnapshotRecordsInput) (req *request.Request, output *GetExportSnapshotRecordsOutput) { op := &request.Operation{ - Name: opGetInstances, + Name: opGetExportSnapshotRecords, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetInstancesInput{} + input = &GetExportSnapshotRecordsInput{} } - output = &GetInstancesOutput{} + output = &GetExportSnapshotRecordsOutput{} req = c.newRequest(op, input, output) return } -// GetInstances API operation for Amazon Lightsail. +// GetExportSnapshotRecords API operation for Amazon Lightsail. // -// Returns information about all Amazon Lightsail virtual private servers, or -// instances. +// Returns the export snapshot record created as a result of the export snapshot +// operation. +// +// An export snapshot record can be used to create a new Amazon EC2 instance +// and its related resources with the create cloud formation stack operation. // // 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 Lightsail's -// API operation GetInstances for usage and error information. +// API operation GetExportSnapshotRecords for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -4953,80 +5319,81 @@ func (c *Lightsail) GetInstancesRequest(input *GetInstancesInput) (req *request. // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstances -func (c *Lightsail) GetInstances(input *GetInstancesInput) (*GetInstancesOutput, error) { - req, out := c.GetInstancesRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetExportSnapshotRecords +func (c *Lightsail) GetExportSnapshotRecords(input *GetExportSnapshotRecordsInput) (*GetExportSnapshotRecordsOutput, error) { + req, out := c.GetExportSnapshotRecordsRequest(input) return out, req.Send() } -// GetInstancesWithContext is the same as GetInstances with the addition of +// GetExportSnapshotRecordsWithContext is the same as GetExportSnapshotRecords with the addition of // the ability to pass a context and additional request options. // -// See GetInstances for details on how to use this API operation. +// See GetExportSnapshotRecords 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 *Lightsail) GetInstancesWithContext(ctx aws.Context, input *GetInstancesInput, opts ...request.Option) (*GetInstancesOutput, error) { - req, out := c.GetInstancesRequest(input) +func (c *Lightsail) GetExportSnapshotRecordsWithContext(ctx aws.Context, input *GetExportSnapshotRecordsInput, opts ...request.Option) (*GetExportSnapshotRecordsOutput, error) { + req, out := c.GetExportSnapshotRecordsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetKeyPair = "GetKeyPair" +const opGetInstance = "GetInstance" -// GetKeyPairRequest generates a "aws/request.Request" representing the -// client's request for the GetKeyPair operation. The "output" return +// GetInstanceRequest generates a "aws/request.Request" representing the +// client's request for the GetInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetKeyPair for more information on using the GetKeyPair +// See GetInstance for more information on using the GetInstance // 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 GetKeyPairRequest method. -// req, resp := client.GetKeyPairRequest(params) +// // Example sending a request using the GetInstanceRequest method. +// req, resp := client.GetInstanceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetKeyPair -func (c *Lightsail) GetKeyPairRequest(input *GetKeyPairInput) (req *request.Request, output *GetKeyPairOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstance +func (c *Lightsail) GetInstanceRequest(input *GetInstanceInput) (req *request.Request, output *GetInstanceOutput) { op := &request.Operation{ - Name: opGetKeyPair, + Name: opGetInstance, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetKeyPairInput{} + input = &GetInstanceInput{} } - output = &GetKeyPairOutput{} + output = &GetInstanceOutput{} req = c.newRequest(op, input, output) return } -// GetKeyPair API operation for Amazon Lightsail. +// GetInstance API operation for Amazon Lightsail. // -// Returns information about a specific key pair. +// Returns information about a specific Amazon Lightsail instance, which is +// a virtual private server. // // 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 Lightsail's -// API operation GetKeyPair for usage and error information. +// API operation GetInstance for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -5057,80 +5424,85 @@ func (c *Lightsail) GetKeyPairRequest(input *GetKeyPairInput) (req *request.Requ // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetKeyPair -func (c *Lightsail) GetKeyPair(input *GetKeyPairInput) (*GetKeyPairOutput, error) { - req, out := c.GetKeyPairRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstance +func (c *Lightsail) GetInstance(input *GetInstanceInput) (*GetInstanceOutput, error) { + req, out := c.GetInstanceRequest(input) return out, req.Send() } -// GetKeyPairWithContext is the same as GetKeyPair with the addition of +// GetInstanceWithContext is the same as GetInstance with the addition of // the ability to pass a context and additional request options. // -// See GetKeyPair for details on how to use this API operation. +// See GetInstance 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 *Lightsail) GetKeyPairWithContext(ctx aws.Context, input *GetKeyPairInput, opts ...request.Option) (*GetKeyPairOutput, error) { - req, out := c.GetKeyPairRequest(input) +func (c *Lightsail) GetInstanceWithContext(ctx aws.Context, input *GetInstanceInput, opts ...request.Option) (*GetInstanceOutput, error) { + req, out := c.GetInstanceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetKeyPairs = "GetKeyPairs" +const opGetInstanceAccessDetails = "GetInstanceAccessDetails" -// GetKeyPairsRequest generates a "aws/request.Request" representing the -// client's request for the GetKeyPairs operation. The "output" return +// GetInstanceAccessDetailsRequest generates a "aws/request.Request" representing the +// client's request for the GetInstanceAccessDetails operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetKeyPairs for more information on using the GetKeyPairs +// See GetInstanceAccessDetails for more information on using the GetInstanceAccessDetails // 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 GetKeyPairsRequest method. -// req, resp := client.GetKeyPairsRequest(params) +// // Example sending a request using the GetInstanceAccessDetailsRequest method. +// req, resp := client.GetInstanceAccessDetailsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetKeyPairs -func (c *Lightsail) GetKeyPairsRequest(input *GetKeyPairsInput) (req *request.Request, output *GetKeyPairsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstanceAccessDetails +func (c *Lightsail) GetInstanceAccessDetailsRequest(input *GetInstanceAccessDetailsInput) (req *request.Request, output *GetInstanceAccessDetailsOutput) { op := &request.Operation{ - Name: opGetKeyPairs, + Name: opGetInstanceAccessDetails, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetKeyPairsInput{} + input = &GetInstanceAccessDetailsInput{} } - output = &GetKeyPairsOutput{} + output = &GetInstanceAccessDetailsOutput{} req = c.newRequest(op, input, output) return } -// GetKeyPairs API operation for Amazon Lightsail. +// GetInstanceAccessDetails API operation for Amazon Lightsail. // -// Returns information about all key pairs in the user's account. +// Returns temporary SSH keys you can use to connect to a specific virtual private +// server, or instance. +// +// The get instance access details operation supports tag-based access control +// via resource tags applied to the resource identified by instanceName. For +// more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). // // 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 Lightsail's -// API operation GetKeyPairs for usage and error information. +// API operation GetInstanceAccessDetails for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -5161,80 +5533,81 @@ func (c *Lightsail) GetKeyPairsRequest(input *GetKeyPairsInput) (req *request.Re // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetKeyPairs -func (c *Lightsail) GetKeyPairs(input *GetKeyPairsInput) (*GetKeyPairsOutput, error) { - req, out := c.GetKeyPairsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstanceAccessDetails +func (c *Lightsail) GetInstanceAccessDetails(input *GetInstanceAccessDetailsInput) (*GetInstanceAccessDetailsOutput, error) { + req, out := c.GetInstanceAccessDetailsRequest(input) return out, req.Send() } -// GetKeyPairsWithContext is the same as GetKeyPairs with the addition of +// GetInstanceAccessDetailsWithContext is the same as GetInstanceAccessDetails with the addition of // the ability to pass a context and additional request options. // -// See GetKeyPairs for details on how to use this API operation. +// See GetInstanceAccessDetails 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 *Lightsail) GetKeyPairsWithContext(ctx aws.Context, input *GetKeyPairsInput, opts ...request.Option) (*GetKeyPairsOutput, error) { - req, out := c.GetKeyPairsRequest(input) +func (c *Lightsail) GetInstanceAccessDetailsWithContext(ctx aws.Context, input *GetInstanceAccessDetailsInput, opts ...request.Option) (*GetInstanceAccessDetailsOutput, error) { + req, out := c.GetInstanceAccessDetailsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetLoadBalancer = "GetLoadBalancer" +const opGetInstanceMetricData = "GetInstanceMetricData" -// GetLoadBalancerRequest generates a "aws/request.Request" representing the -// client's request for the GetLoadBalancer operation. The "output" return +// GetInstanceMetricDataRequest generates a "aws/request.Request" representing the +// client's request for the GetInstanceMetricData operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetLoadBalancer for more information on using the GetLoadBalancer +// See GetInstanceMetricData for more information on using the GetInstanceMetricData // 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 GetLoadBalancerRequest method. -// req, resp := client.GetLoadBalancerRequest(params) +// // Example sending a request using the GetInstanceMetricDataRequest method. +// req, resp := client.GetInstanceMetricDataRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetLoadBalancer -func (c *Lightsail) GetLoadBalancerRequest(input *GetLoadBalancerInput) (req *request.Request, output *GetLoadBalancerOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstanceMetricData +func (c *Lightsail) GetInstanceMetricDataRequest(input *GetInstanceMetricDataInput) (req *request.Request, output *GetInstanceMetricDataOutput) { op := &request.Operation{ - Name: opGetLoadBalancer, + Name: opGetInstanceMetricData, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetLoadBalancerInput{} + input = &GetInstanceMetricDataInput{} } - output = &GetLoadBalancerOutput{} + output = &GetInstanceMetricDataOutput{} req = c.newRequest(op, input, output) return } -// GetLoadBalancer API operation for Amazon Lightsail. +// GetInstanceMetricData API operation for Amazon Lightsail. // -// Returns information about the specified Lightsail load balancer. +// Returns the data points for the specified Amazon Lightsail instance metric, +// given an instance name. // // 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 Lightsail's -// API operation GetLoadBalancer for usage and error information. +// API operation GetInstanceMetricData for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -5265,80 +5638,80 @@ func (c *Lightsail) GetLoadBalancerRequest(input *GetLoadBalancerInput) (req *re // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetLoadBalancer -func (c *Lightsail) GetLoadBalancer(input *GetLoadBalancerInput) (*GetLoadBalancerOutput, error) { - req, out := c.GetLoadBalancerRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstanceMetricData +func (c *Lightsail) GetInstanceMetricData(input *GetInstanceMetricDataInput) (*GetInstanceMetricDataOutput, error) { + req, out := c.GetInstanceMetricDataRequest(input) return out, req.Send() } -// GetLoadBalancerWithContext is the same as GetLoadBalancer with the addition of +// GetInstanceMetricDataWithContext is the same as GetInstanceMetricData with the addition of // the ability to pass a context and additional request options. // -// See GetLoadBalancer for details on how to use this API operation. +// See GetInstanceMetricData 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 *Lightsail) GetLoadBalancerWithContext(ctx aws.Context, input *GetLoadBalancerInput, opts ...request.Option) (*GetLoadBalancerOutput, error) { - req, out := c.GetLoadBalancerRequest(input) +func (c *Lightsail) GetInstanceMetricDataWithContext(ctx aws.Context, input *GetInstanceMetricDataInput, opts ...request.Option) (*GetInstanceMetricDataOutput, error) { + req, out := c.GetInstanceMetricDataRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetLoadBalancerMetricData = "GetLoadBalancerMetricData" +const opGetInstancePortStates = "GetInstancePortStates" -// GetLoadBalancerMetricDataRequest generates a "aws/request.Request" representing the -// client's request for the GetLoadBalancerMetricData operation. The "output" return +// GetInstancePortStatesRequest generates a "aws/request.Request" representing the +// client's request for the GetInstancePortStates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetLoadBalancerMetricData for more information on using the GetLoadBalancerMetricData +// See GetInstancePortStates for more information on using the GetInstancePortStates // 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 GetLoadBalancerMetricDataRequest method. -// req, resp := client.GetLoadBalancerMetricDataRequest(params) +// // Example sending a request using the GetInstancePortStatesRequest method. +// req, resp := client.GetInstancePortStatesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetLoadBalancerMetricData -func (c *Lightsail) GetLoadBalancerMetricDataRequest(input *GetLoadBalancerMetricDataInput) (req *request.Request, output *GetLoadBalancerMetricDataOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstancePortStates +func (c *Lightsail) GetInstancePortStatesRequest(input *GetInstancePortStatesInput) (req *request.Request, output *GetInstancePortStatesOutput) { op := &request.Operation{ - Name: opGetLoadBalancerMetricData, + Name: opGetInstancePortStates, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetLoadBalancerMetricDataInput{} + input = &GetInstancePortStatesInput{} } - output = &GetLoadBalancerMetricDataOutput{} + output = &GetInstancePortStatesOutput{} req = c.newRequest(op, input, output) return } -// GetLoadBalancerMetricData API operation for Amazon Lightsail. +// GetInstancePortStates API operation for Amazon Lightsail. // -// Returns information about health metrics for your Lightsail load balancer. +// Returns the port states for a specific virtual private server, or instance. // // 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 Lightsail's -// API operation GetLoadBalancerMetricData for usage and error information. +// API operation GetInstancePortStates for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -5369,86 +5742,80 @@ func (c *Lightsail) GetLoadBalancerMetricDataRequest(input *GetLoadBalancerMetri // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetLoadBalancerMetricData -func (c *Lightsail) GetLoadBalancerMetricData(input *GetLoadBalancerMetricDataInput) (*GetLoadBalancerMetricDataOutput, error) { - req, out := c.GetLoadBalancerMetricDataRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstancePortStates +func (c *Lightsail) GetInstancePortStates(input *GetInstancePortStatesInput) (*GetInstancePortStatesOutput, error) { + req, out := c.GetInstancePortStatesRequest(input) return out, req.Send() } -// GetLoadBalancerMetricDataWithContext is the same as GetLoadBalancerMetricData with the addition of +// GetInstancePortStatesWithContext is the same as GetInstancePortStates with the addition of // the ability to pass a context and additional request options. // -// See GetLoadBalancerMetricData for details on how to use this API operation. +// See GetInstancePortStates 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 *Lightsail) GetLoadBalancerMetricDataWithContext(ctx aws.Context, input *GetLoadBalancerMetricDataInput, opts ...request.Option) (*GetLoadBalancerMetricDataOutput, error) { - req, out := c.GetLoadBalancerMetricDataRequest(input) +func (c *Lightsail) GetInstancePortStatesWithContext(ctx aws.Context, input *GetInstancePortStatesInput, opts ...request.Option) (*GetInstancePortStatesOutput, error) { + req, out := c.GetInstancePortStatesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetLoadBalancerTlsCertificates = "GetLoadBalancerTlsCertificates" +const opGetInstanceSnapshot = "GetInstanceSnapshot" -// GetLoadBalancerTlsCertificatesRequest generates a "aws/request.Request" representing the -// client's request for the GetLoadBalancerTlsCertificates operation. The "output" return +// GetInstanceSnapshotRequest generates a "aws/request.Request" representing the +// client's request for the GetInstanceSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetLoadBalancerTlsCertificates for more information on using the GetLoadBalancerTlsCertificates +// See GetInstanceSnapshot for more information on using the GetInstanceSnapshot // 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 GetLoadBalancerTlsCertificatesRequest method. -// req, resp := client.GetLoadBalancerTlsCertificatesRequest(params) -// +// // Example sending a request using the GetInstanceSnapshotRequest method. +// req, resp := client.GetInstanceSnapshotRequest(params) +// // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetLoadBalancerTlsCertificates -func (c *Lightsail) GetLoadBalancerTlsCertificatesRequest(input *GetLoadBalancerTlsCertificatesInput) (req *request.Request, output *GetLoadBalancerTlsCertificatesOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstanceSnapshot +func (c *Lightsail) GetInstanceSnapshotRequest(input *GetInstanceSnapshotInput) (req *request.Request, output *GetInstanceSnapshotOutput) { op := &request.Operation{ - Name: opGetLoadBalancerTlsCertificates, + Name: opGetInstanceSnapshot, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetLoadBalancerTlsCertificatesInput{} + input = &GetInstanceSnapshotInput{} } - output = &GetLoadBalancerTlsCertificatesOutput{} + output = &GetInstanceSnapshotOutput{} req = c.newRequest(op, input, output) return } -// GetLoadBalancerTlsCertificates API operation for Amazon Lightsail. -// -// Returns information about the TLS certificates that are associated with the -// specified Lightsail load balancer. -// -// TLS is just an updated, more secure version of Secure Socket Layer (SSL). +// GetInstanceSnapshot API operation for Amazon Lightsail. // -// You can have a maximum of 2 certificates associated with a Lightsail load -// balancer. One is active and the other is inactive. +// Returns information about a specific instance snapshot. // // 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 Lightsail's -// API operation GetLoadBalancerTlsCertificates for usage and error information. +// API operation GetInstanceSnapshot for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -5479,84 +5846,80 @@ func (c *Lightsail) GetLoadBalancerTlsCertificatesRequest(input *GetLoadBalancer // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetLoadBalancerTlsCertificates -func (c *Lightsail) GetLoadBalancerTlsCertificates(input *GetLoadBalancerTlsCertificatesInput) (*GetLoadBalancerTlsCertificatesOutput, error) { - req, out := c.GetLoadBalancerTlsCertificatesRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstanceSnapshot +func (c *Lightsail) GetInstanceSnapshot(input *GetInstanceSnapshotInput) (*GetInstanceSnapshotOutput, error) { + req, out := c.GetInstanceSnapshotRequest(input) return out, req.Send() } -// GetLoadBalancerTlsCertificatesWithContext is the same as GetLoadBalancerTlsCertificates with the addition of +// GetInstanceSnapshotWithContext is the same as GetInstanceSnapshot with the addition of // the ability to pass a context and additional request options. // -// See GetLoadBalancerTlsCertificates for details on how to use this API operation. +// See GetInstanceSnapshot 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 *Lightsail) GetLoadBalancerTlsCertificatesWithContext(ctx aws.Context, input *GetLoadBalancerTlsCertificatesInput, opts ...request.Option) (*GetLoadBalancerTlsCertificatesOutput, error) { - req, out := c.GetLoadBalancerTlsCertificatesRequest(input) +func (c *Lightsail) GetInstanceSnapshotWithContext(ctx aws.Context, input *GetInstanceSnapshotInput, opts ...request.Option) (*GetInstanceSnapshotOutput, error) { + req, out := c.GetInstanceSnapshotRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetLoadBalancers = "GetLoadBalancers" +const opGetInstanceSnapshots = "GetInstanceSnapshots" -// GetLoadBalancersRequest generates a "aws/request.Request" representing the -// client's request for the GetLoadBalancers operation. The "output" return +// GetInstanceSnapshotsRequest generates a "aws/request.Request" representing the +// client's request for the GetInstanceSnapshots operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetLoadBalancers for more information on using the GetLoadBalancers +// See GetInstanceSnapshots for more information on using the GetInstanceSnapshots // 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 GetLoadBalancersRequest method. -// req, resp := client.GetLoadBalancersRequest(params) +// // Example sending a request using the GetInstanceSnapshotsRequest method. +// req, resp := client.GetInstanceSnapshotsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetLoadBalancers -func (c *Lightsail) GetLoadBalancersRequest(input *GetLoadBalancersInput) (req *request.Request, output *GetLoadBalancersOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstanceSnapshots +func (c *Lightsail) GetInstanceSnapshotsRequest(input *GetInstanceSnapshotsInput) (req *request.Request, output *GetInstanceSnapshotsOutput) { op := &request.Operation{ - Name: opGetLoadBalancers, + Name: opGetInstanceSnapshots, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetLoadBalancersInput{} + input = &GetInstanceSnapshotsInput{} } - output = &GetLoadBalancersOutput{} + output = &GetInstanceSnapshotsOutput{} req = c.newRequest(op, input, output) return } -// GetLoadBalancers API operation for Amazon Lightsail. -// -// Returns information about all load balancers in an account. +// GetInstanceSnapshots API operation for Amazon Lightsail. // -// If you are describing a long list of load balancers, you can paginate the -// output to make the list more manageable. You can use the pageToken and nextPageToken -// values to retrieve the next items in the list. +// Returns all instance snapshots for the user's 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 Amazon Lightsail's -// API operation GetLoadBalancers for usage and error information. +// API operation GetInstanceSnapshots for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -5587,82 +5950,80 @@ func (c *Lightsail) GetLoadBalancersRequest(input *GetLoadBalancersInput) (req * // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetLoadBalancers -func (c *Lightsail) GetLoadBalancers(input *GetLoadBalancersInput) (*GetLoadBalancersOutput, error) { - req, out := c.GetLoadBalancersRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstanceSnapshots +func (c *Lightsail) GetInstanceSnapshots(input *GetInstanceSnapshotsInput) (*GetInstanceSnapshotsOutput, error) { + req, out := c.GetInstanceSnapshotsRequest(input) return out, req.Send() } -// GetLoadBalancersWithContext is the same as GetLoadBalancers with the addition of +// GetInstanceSnapshotsWithContext is the same as GetInstanceSnapshots with the addition of // the ability to pass a context and additional request options. // -// See GetLoadBalancers for details on how to use this API operation. +// See GetInstanceSnapshots 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 *Lightsail) GetLoadBalancersWithContext(ctx aws.Context, input *GetLoadBalancersInput, opts ...request.Option) (*GetLoadBalancersOutput, error) { - req, out := c.GetLoadBalancersRequest(input) +func (c *Lightsail) GetInstanceSnapshotsWithContext(ctx aws.Context, input *GetInstanceSnapshotsInput, opts ...request.Option) (*GetInstanceSnapshotsOutput, error) { + req, out := c.GetInstanceSnapshotsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetOperation = "GetOperation" +const opGetInstanceState = "GetInstanceState" -// GetOperationRequest generates a "aws/request.Request" representing the -// client's request for the GetOperation operation. The "output" return +// GetInstanceStateRequest generates a "aws/request.Request" representing the +// client's request for the GetInstanceState operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetOperation for more information on using the GetOperation +// See GetInstanceState for more information on using the GetInstanceState // 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 GetOperationRequest method. -// req, resp := client.GetOperationRequest(params) +// // Example sending a request using the GetInstanceStateRequest method. +// req, resp := client.GetInstanceStateRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetOperation -func (c *Lightsail) GetOperationRequest(input *GetOperationInput) (req *request.Request, output *GetOperationOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstanceState +func (c *Lightsail) GetInstanceStateRequest(input *GetInstanceStateInput) (req *request.Request, output *GetInstanceStateOutput) { op := &request.Operation{ - Name: opGetOperation, + Name: opGetInstanceState, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetOperationInput{} + input = &GetInstanceStateInput{} } - output = &GetOperationOutput{} + output = &GetInstanceStateOutput{} req = c.newRequest(op, input, output) return } -// GetOperation API operation for Amazon Lightsail. +// GetInstanceState API operation for Amazon Lightsail. // -// Returns information about a specific operation. Operations include events -// such as when you create an instance, allocate a static IP, attach a static -// IP, and so on. +// Returns the state of a specific instance. Works on one instance 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 // the error. // // See the AWS API reference guide for Amazon Lightsail's -// API operation GetOperation for usage and error information. +// API operation GetInstanceState for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -5693,84 +6054,81 @@ func (c *Lightsail) GetOperationRequest(input *GetOperationInput) (req *request. // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetOperation -func (c *Lightsail) GetOperation(input *GetOperationInput) (*GetOperationOutput, error) { - req, out := c.GetOperationRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstanceState +func (c *Lightsail) GetInstanceState(input *GetInstanceStateInput) (*GetInstanceStateOutput, error) { + req, out := c.GetInstanceStateRequest(input) return out, req.Send() } -// GetOperationWithContext is the same as GetOperation with the addition of +// GetInstanceStateWithContext is the same as GetInstanceState with the addition of // the ability to pass a context and additional request options. // -// See GetOperation for details on how to use this API operation. +// See GetInstanceState 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 *Lightsail) GetOperationWithContext(ctx aws.Context, input *GetOperationInput, opts ...request.Option) (*GetOperationOutput, error) { - req, out := c.GetOperationRequest(input) +func (c *Lightsail) GetInstanceStateWithContext(ctx aws.Context, input *GetInstanceStateInput, opts ...request.Option) (*GetInstanceStateOutput, error) { + req, out := c.GetInstanceStateRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetOperations = "GetOperations" +const opGetInstances = "GetInstances" -// GetOperationsRequest generates a "aws/request.Request" representing the -// client's request for the GetOperations operation. The "output" return +// GetInstancesRequest generates a "aws/request.Request" representing the +// client's request for the GetInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetOperations for more information on using the GetOperations +// See GetInstances for more information on using the GetInstances // 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 GetOperationsRequest method. -// req, resp := client.GetOperationsRequest(params) +// // Example sending a request using the GetInstancesRequest method. +// req, resp := client.GetInstancesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetOperations -func (c *Lightsail) GetOperationsRequest(input *GetOperationsInput) (req *request.Request, output *GetOperationsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstances +func (c *Lightsail) GetInstancesRequest(input *GetInstancesInput) (req *request.Request, output *GetInstancesOutput) { op := &request.Operation{ - Name: opGetOperations, + Name: opGetInstances, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetOperationsInput{} + input = &GetInstancesInput{} } - output = &GetOperationsOutput{} + output = &GetInstancesOutput{} req = c.newRequest(op, input, output) return } -// GetOperations API operation for Amazon Lightsail. -// -// Returns information about all operations. +// GetInstances API operation for Amazon Lightsail. // -// Results are returned from oldest to newest, up to a maximum of 200. Results -// can be paged by making each subsequent call to GetOperations use the maximum -// (last) statusChangedAt value from the previous request. +// Returns information about all Amazon Lightsail virtual private servers, or +// instances. // // 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 Lightsail's -// API operation GetOperations for usage and error information. +// API operation GetInstances for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -5801,80 +6159,80 @@ func (c *Lightsail) GetOperationsRequest(input *GetOperationsInput) (req *reques // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetOperations -func (c *Lightsail) GetOperations(input *GetOperationsInput) (*GetOperationsOutput, error) { - req, out := c.GetOperationsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetInstances +func (c *Lightsail) GetInstances(input *GetInstancesInput) (*GetInstancesOutput, error) { + req, out := c.GetInstancesRequest(input) return out, req.Send() } -// GetOperationsWithContext is the same as GetOperations with the addition of +// GetInstancesWithContext is the same as GetInstances with the addition of // the ability to pass a context and additional request options. // -// See GetOperations for details on how to use this API operation. +// See GetInstances 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 *Lightsail) GetOperationsWithContext(ctx aws.Context, input *GetOperationsInput, opts ...request.Option) (*GetOperationsOutput, error) { - req, out := c.GetOperationsRequest(input) +func (c *Lightsail) GetInstancesWithContext(ctx aws.Context, input *GetInstancesInput, opts ...request.Option) (*GetInstancesOutput, error) { + req, out := c.GetInstancesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetOperationsForResource = "GetOperationsForResource" +const opGetKeyPair = "GetKeyPair" -// GetOperationsForResourceRequest generates a "aws/request.Request" representing the -// client's request for the GetOperationsForResource operation. The "output" return +// GetKeyPairRequest generates a "aws/request.Request" representing the +// client's request for the GetKeyPair operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetOperationsForResource for more information on using the GetOperationsForResource +// See GetKeyPair for more information on using the GetKeyPair // 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 GetOperationsForResourceRequest method. -// req, resp := client.GetOperationsForResourceRequest(params) +// // Example sending a request using the GetKeyPairRequest method. +// req, resp := client.GetKeyPairRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetOperationsForResource -func (c *Lightsail) GetOperationsForResourceRequest(input *GetOperationsForResourceInput) (req *request.Request, output *GetOperationsForResourceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetKeyPair +func (c *Lightsail) GetKeyPairRequest(input *GetKeyPairInput) (req *request.Request, output *GetKeyPairOutput) { op := &request.Operation{ - Name: opGetOperationsForResource, + Name: opGetKeyPair, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetOperationsForResourceInput{} + input = &GetKeyPairInput{} } - output = &GetOperationsForResourceOutput{} + output = &GetKeyPairOutput{} req = c.newRequest(op, input, output) return } -// GetOperationsForResource API operation for Amazon Lightsail. +// GetKeyPair API operation for Amazon Lightsail. // -// Gets operations for a specific resource (e.g., an instance or a static IP). +// Returns information about a specific key pair. // // 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 Lightsail's -// API operation GetOperationsForResource for usage and error information. +// API operation GetKeyPair for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -5905,81 +6263,80 @@ func (c *Lightsail) GetOperationsForResourceRequest(input *GetOperationsForResou // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetOperationsForResource -func (c *Lightsail) GetOperationsForResource(input *GetOperationsForResourceInput) (*GetOperationsForResourceOutput, error) { - req, out := c.GetOperationsForResourceRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetKeyPair +func (c *Lightsail) GetKeyPair(input *GetKeyPairInput) (*GetKeyPairOutput, error) { + req, out := c.GetKeyPairRequest(input) return out, req.Send() } -// GetOperationsForResourceWithContext is the same as GetOperationsForResource with the addition of +// GetKeyPairWithContext is the same as GetKeyPair with the addition of // the ability to pass a context and additional request options. // -// See GetOperationsForResource for details on how to use this API operation. +// See GetKeyPair 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 *Lightsail) GetOperationsForResourceWithContext(ctx aws.Context, input *GetOperationsForResourceInput, opts ...request.Option) (*GetOperationsForResourceOutput, error) { - req, out := c.GetOperationsForResourceRequest(input) +func (c *Lightsail) GetKeyPairWithContext(ctx aws.Context, input *GetKeyPairInput, opts ...request.Option) (*GetKeyPairOutput, error) { + req, out := c.GetKeyPairRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetRegions = "GetRegions" +const opGetKeyPairs = "GetKeyPairs" -// GetRegionsRequest generates a "aws/request.Request" representing the -// client's request for the GetRegions operation. The "output" return +// GetKeyPairsRequest generates a "aws/request.Request" representing the +// client's request for the GetKeyPairs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetRegions for more information on using the GetRegions +// See GetKeyPairs for more information on using the GetKeyPairs // 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 GetRegionsRequest method. -// req, resp := client.GetRegionsRequest(params) +// // Example sending a request using the GetKeyPairsRequest method. +// req, resp := client.GetKeyPairsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRegions -func (c *Lightsail) GetRegionsRequest(input *GetRegionsInput) (req *request.Request, output *GetRegionsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetKeyPairs +func (c *Lightsail) GetKeyPairsRequest(input *GetKeyPairsInput) (req *request.Request, output *GetKeyPairsOutput) { op := &request.Operation{ - Name: opGetRegions, + Name: opGetKeyPairs, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetRegionsInput{} + input = &GetKeyPairsInput{} } - output = &GetRegionsOutput{} + output = &GetKeyPairsOutput{} req = c.newRequest(op, input, output) return } -// GetRegions API operation for Amazon Lightsail. +// GetKeyPairs API operation for Amazon Lightsail. // -// Returns a list of all valid regions for Amazon Lightsail. Use the include -// availability zones parameter to also return the availability zones in a region. +// Returns information about all key pairs in the user's 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 Amazon Lightsail's -// API operation GetRegions for usage and error information. +// API operation GetKeyPairs for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -6010,80 +6367,80 @@ func (c *Lightsail) GetRegionsRequest(input *GetRegionsInput) (req *request.Requ // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRegions -func (c *Lightsail) GetRegions(input *GetRegionsInput) (*GetRegionsOutput, error) { - req, out := c.GetRegionsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetKeyPairs +func (c *Lightsail) GetKeyPairs(input *GetKeyPairsInput) (*GetKeyPairsOutput, error) { + req, out := c.GetKeyPairsRequest(input) return out, req.Send() } -// GetRegionsWithContext is the same as GetRegions with the addition of +// GetKeyPairsWithContext is the same as GetKeyPairs with the addition of // the ability to pass a context and additional request options. // -// See GetRegions for details on how to use this API operation. +// See GetKeyPairs 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 *Lightsail) GetRegionsWithContext(ctx aws.Context, input *GetRegionsInput, opts ...request.Option) (*GetRegionsOutput, error) { - req, out := c.GetRegionsRequest(input) +func (c *Lightsail) GetKeyPairsWithContext(ctx aws.Context, input *GetKeyPairsInput, opts ...request.Option) (*GetKeyPairsOutput, error) { + req, out := c.GetKeyPairsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetStaticIp = "GetStaticIp" +const opGetLoadBalancer = "GetLoadBalancer" -// GetStaticIpRequest generates a "aws/request.Request" representing the -// client's request for the GetStaticIp operation. The "output" return +// GetLoadBalancerRequest generates a "aws/request.Request" representing the +// client's request for the GetLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetStaticIp for more information on using the GetStaticIp +// See GetLoadBalancer for more information on using the GetLoadBalancer // 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 GetStaticIpRequest method. -// req, resp := client.GetStaticIpRequest(params) +// // Example sending a request using the GetLoadBalancerRequest method. +// req, resp := client.GetLoadBalancerRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetStaticIp -func (c *Lightsail) GetStaticIpRequest(input *GetStaticIpInput) (req *request.Request, output *GetStaticIpOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetLoadBalancer +func (c *Lightsail) GetLoadBalancerRequest(input *GetLoadBalancerInput) (req *request.Request, output *GetLoadBalancerOutput) { op := &request.Operation{ - Name: opGetStaticIp, + Name: opGetLoadBalancer, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetStaticIpInput{} + input = &GetLoadBalancerInput{} } - output = &GetStaticIpOutput{} + output = &GetLoadBalancerOutput{} req = c.newRequest(op, input, output) return } -// GetStaticIp API operation for Amazon Lightsail. +// GetLoadBalancer API operation for Amazon Lightsail. // -// Returns information about a specific static IP. +// Returns information about the specified Lightsail load balancer. // // 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 Lightsail's -// API operation GetStaticIp for usage and error information. +// API operation GetLoadBalancer for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -6114,80 +6471,80 @@ func (c *Lightsail) GetStaticIpRequest(input *GetStaticIpInput) (req *request.Re // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetStaticIp -func (c *Lightsail) GetStaticIp(input *GetStaticIpInput) (*GetStaticIpOutput, error) { - req, out := c.GetStaticIpRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetLoadBalancer +func (c *Lightsail) GetLoadBalancer(input *GetLoadBalancerInput) (*GetLoadBalancerOutput, error) { + req, out := c.GetLoadBalancerRequest(input) return out, req.Send() } -// GetStaticIpWithContext is the same as GetStaticIp with the addition of +// GetLoadBalancerWithContext is the same as GetLoadBalancer with the addition of // the ability to pass a context and additional request options. // -// See GetStaticIp for details on how to use this API operation. +// See GetLoadBalancer 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 *Lightsail) GetStaticIpWithContext(ctx aws.Context, input *GetStaticIpInput, opts ...request.Option) (*GetStaticIpOutput, error) { - req, out := c.GetStaticIpRequest(input) +func (c *Lightsail) GetLoadBalancerWithContext(ctx aws.Context, input *GetLoadBalancerInput, opts ...request.Option) (*GetLoadBalancerOutput, error) { + req, out := c.GetLoadBalancerRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetStaticIps = "GetStaticIps" +const opGetLoadBalancerMetricData = "GetLoadBalancerMetricData" -// GetStaticIpsRequest generates a "aws/request.Request" representing the -// client's request for the GetStaticIps operation. The "output" return +// GetLoadBalancerMetricDataRequest generates a "aws/request.Request" representing the +// client's request for the GetLoadBalancerMetricData operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetStaticIps for more information on using the GetStaticIps +// See GetLoadBalancerMetricData for more information on using the GetLoadBalancerMetricData // 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 GetStaticIpsRequest method. -// req, resp := client.GetStaticIpsRequest(params) +// // Example sending a request using the GetLoadBalancerMetricDataRequest method. +// req, resp := client.GetLoadBalancerMetricDataRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetStaticIps -func (c *Lightsail) GetStaticIpsRequest(input *GetStaticIpsInput) (req *request.Request, output *GetStaticIpsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetLoadBalancerMetricData +func (c *Lightsail) GetLoadBalancerMetricDataRequest(input *GetLoadBalancerMetricDataInput) (req *request.Request, output *GetLoadBalancerMetricDataOutput) { op := &request.Operation{ - Name: opGetStaticIps, + Name: opGetLoadBalancerMetricData, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &GetStaticIpsInput{} + input = &GetLoadBalancerMetricDataInput{} } - output = &GetStaticIpsOutput{} + output = &GetLoadBalancerMetricDataOutput{} req = c.newRequest(op, input, output) return } -// GetStaticIps API operation for Amazon Lightsail. +// GetLoadBalancerMetricData API operation for Amazon Lightsail. // -// Returns information about all static IPs in the user's account. +// Returns information about health metrics for your Lightsail load balancer. // // 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 Lightsail's -// API operation GetStaticIps for usage and error information. +// API operation GetLoadBalancerMetricData for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -6218,80 +6575,86 @@ func (c *Lightsail) GetStaticIpsRequest(input *GetStaticIpsInput) (req *request. // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetStaticIps -func (c *Lightsail) GetStaticIps(input *GetStaticIpsInput) (*GetStaticIpsOutput, error) { - req, out := c.GetStaticIpsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetLoadBalancerMetricData +func (c *Lightsail) GetLoadBalancerMetricData(input *GetLoadBalancerMetricDataInput) (*GetLoadBalancerMetricDataOutput, error) { + req, out := c.GetLoadBalancerMetricDataRequest(input) return out, req.Send() } -// GetStaticIpsWithContext is the same as GetStaticIps with the addition of +// GetLoadBalancerMetricDataWithContext is the same as GetLoadBalancerMetricData with the addition of // the ability to pass a context and additional request options. // -// See GetStaticIps for details on how to use this API operation. +// See GetLoadBalancerMetricData 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 *Lightsail) GetStaticIpsWithContext(ctx aws.Context, input *GetStaticIpsInput, opts ...request.Option) (*GetStaticIpsOutput, error) { - req, out := c.GetStaticIpsRequest(input) +func (c *Lightsail) GetLoadBalancerMetricDataWithContext(ctx aws.Context, input *GetLoadBalancerMetricDataInput, opts ...request.Option) (*GetLoadBalancerMetricDataOutput, error) { + req, out := c.GetLoadBalancerMetricDataRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opImportKeyPair = "ImportKeyPair" +const opGetLoadBalancerTlsCertificates = "GetLoadBalancerTlsCertificates" -// ImportKeyPairRequest generates a "aws/request.Request" representing the -// client's request for the ImportKeyPair operation. The "output" return +// GetLoadBalancerTlsCertificatesRequest generates a "aws/request.Request" representing the +// client's request for the GetLoadBalancerTlsCertificates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 ImportKeyPair for more information on using the ImportKeyPair +// See GetLoadBalancerTlsCertificates for more information on using the GetLoadBalancerTlsCertificates // 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 ImportKeyPairRequest method. -// req, resp := client.ImportKeyPairRequest(params) +// // Example sending a request using the GetLoadBalancerTlsCertificatesRequest method. +// req, resp := client.GetLoadBalancerTlsCertificatesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/ImportKeyPair -func (c *Lightsail) ImportKeyPairRequest(input *ImportKeyPairInput) (req *request.Request, output *ImportKeyPairOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetLoadBalancerTlsCertificates +func (c *Lightsail) GetLoadBalancerTlsCertificatesRequest(input *GetLoadBalancerTlsCertificatesInput) (req *request.Request, output *GetLoadBalancerTlsCertificatesOutput) { op := &request.Operation{ - Name: opImportKeyPair, + Name: opGetLoadBalancerTlsCertificates, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &ImportKeyPairInput{} + input = &GetLoadBalancerTlsCertificatesInput{} } - output = &ImportKeyPairOutput{} + output = &GetLoadBalancerTlsCertificatesOutput{} req = c.newRequest(op, input, output) return } -// ImportKeyPair API operation for Amazon Lightsail. +// GetLoadBalancerTlsCertificates API operation for Amazon Lightsail. // -// Imports a public SSH key from a specific key pair. +// Returns information about the TLS certificates that are associated with the +// specified Lightsail load balancer. +// +// TLS is just an updated, more secure version of Secure Socket Layer (SSL). +// +// You can have a maximum of 2 certificates associated with a Lightsail load +// balancer. One is active and the other is inactive. // // 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 Lightsail's -// API operation ImportKeyPair for usage and error information. +// API operation GetLoadBalancerTlsCertificates for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -6322,80 +6685,84 @@ func (c *Lightsail) ImportKeyPairRequest(input *ImportKeyPairInput) (req *reques // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/ImportKeyPair -func (c *Lightsail) ImportKeyPair(input *ImportKeyPairInput) (*ImportKeyPairOutput, error) { - req, out := c.ImportKeyPairRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetLoadBalancerTlsCertificates +func (c *Lightsail) GetLoadBalancerTlsCertificates(input *GetLoadBalancerTlsCertificatesInput) (*GetLoadBalancerTlsCertificatesOutput, error) { + req, out := c.GetLoadBalancerTlsCertificatesRequest(input) return out, req.Send() } -// ImportKeyPairWithContext is the same as ImportKeyPair with the addition of +// GetLoadBalancerTlsCertificatesWithContext is the same as GetLoadBalancerTlsCertificates with the addition of // the ability to pass a context and additional request options. // -// See ImportKeyPair for details on how to use this API operation. +// See GetLoadBalancerTlsCertificates 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 *Lightsail) ImportKeyPairWithContext(ctx aws.Context, input *ImportKeyPairInput, opts ...request.Option) (*ImportKeyPairOutput, error) { - req, out := c.ImportKeyPairRequest(input) +func (c *Lightsail) GetLoadBalancerTlsCertificatesWithContext(ctx aws.Context, input *GetLoadBalancerTlsCertificatesInput, opts ...request.Option) (*GetLoadBalancerTlsCertificatesOutput, error) { + req, out := c.GetLoadBalancerTlsCertificatesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opIsVpcPeered = "IsVpcPeered" +const opGetLoadBalancers = "GetLoadBalancers" -// IsVpcPeeredRequest generates a "aws/request.Request" representing the -// client's request for the IsVpcPeered operation. The "output" return +// GetLoadBalancersRequest generates a "aws/request.Request" representing the +// client's request for the GetLoadBalancers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 IsVpcPeered for more information on using the IsVpcPeered +// See GetLoadBalancers for more information on using the GetLoadBalancers // 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 IsVpcPeeredRequest method. -// req, resp := client.IsVpcPeeredRequest(params) +// // Example sending a request using the GetLoadBalancersRequest method. +// req, resp := client.GetLoadBalancersRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/IsVpcPeered -func (c *Lightsail) IsVpcPeeredRequest(input *IsVpcPeeredInput) (req *request.Request, output *IsVpcPeeredOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetLoadBalancers +func (c *Lightsail) GetLoadBalancersRequest(input *GetLoadBalancersInput) (req *request.Request, output *GetLoadBalancersOutput) { op := &request.Operation{ - Name: opIsVpcPeered, + Name: opGetLoadBalancers, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &IsVpcPeeredInput{} + input = &GetLoadBalancersInput{} } - output = &IsVpcPeeredOutput{} + output = &GetLoadBalancersOutput{} req = c.newRequest(op, input, output) return } -// IsVpcPeered API operation for Amazon Lightsail. +// GetLoadBalancers API operation for Amazon Lightsail. // -// Returns a Boolean value indicating whether your Lightsail VPC is peered. +// Returns information about all load balancers in an account. +// +// If you are describing a long list of load balancers, you can paginate the +// output to make the list more manageable. You can use the pageToken and nextPageToken +// values to retrieve the next items in the list. // // 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 Lightsail's -// API operation IsVpcPeered for usage and error information. +// API operation GetLoadBalancers for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -6426,80 +6793,82 @@ func (c *Lightsail) IsVpcPeeredRequest(input *IsVpcPeeredInput) (req *request.Re // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/IsVpcPeered -func (c *Lightsail) IsVpcPeered(input *IsVpcPeeredInput) (*IsVpcPeeredOutput, error) { - req, out := c.IsVpcPeeredRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetLoadBalancers +func (c *Lightsail) GetLoadBalancers(input *GetLoadBalancersInput) (*GetLoadBalancersOutput, error) { + req, out := c.GetLoadBalancersRequest(input) return out, req.Send() } -// IsVpcPeeredWithContext is the same as IsVpcPeered with the addition of +// GetLoadBalancersWithContext is the same as GetLoadBalancers with the addition of // the ability to pass a context and additional request options. // -// See IsVpcPeered for details on how to use this API operation. +// See GetLoadBalancers 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 *Lightsail) IsVpcPeeredWithContext(ctx aws.Context, input *IsVpcPeeredInput, opts ...request.Option) (*IsVpcPeeredOutput, error) { - req, out := c.IsVpcPeeredRequest(input) +func (c *Lightsail) GetLoadBalancersWithContext(ctx aws.Context, input *GetLoadBalancersInput, opts ...request.Option) (*GetLoadBalancersOutput, error) { + req, out := c.GetLoadBalancersRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opOpenInstancePublicPorts = "OpenInstancePublicPorts" +const opGetOperation = "GetOperation" -// OpenInstancePublicPortsRequest generates a "aws/request.Request" representing the -// client's request for the OpenInstancePublicPorts operation. The "output" return +// GetOperationRequest generates a "aws/request.Request" representing the +// client's request for the GetOperation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 OpenInstancePublicPorts for more information on using the OpenInstancePublicPorts +// See GetOperation for more information on using the GetOperation // 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 OpenInstancePublicPortsRequest method. -// req, resp := client.OpenInstancePublicPortsRequest(params) +// // Example sending a request using the GetOperationRequest method. +// req, resp := client.GetOperationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/OpenInstancePublicPorts -func (c *Lightsail) OpenInstancePublicPortsRequest(input *OpenInstancePublicPortsInput) (req *request.Request, output *OpenInstancePublicPortsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetOperation +func (c *Lightsail) GetOperationRequest(input *GetOperationInput) (req *request.Request, output *GetOperationOutput) { op := &request.Operation{ - Name: opOpenInstancePublicPorts, + Name: opGetOperation, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &OpenInstancePublicPortsInput{} + input = &GetOperationInput{} } - output = &OpenInstancePublicPortsOutput{} + output = &GetOperationOutput{} req = c.newRequest(op, input, output) return } -// OpenInstancePublicPorts API operation for Amazon Lightsail. +// GetOperation API operation for Amazon Lightsail. // -// Adds public ports to an Amazon Lightsail instance. +// Returns information about a specific operation. Operations include events +// such as when you create an instance, allocate a static IP, attach a static +// IP, and so on. // // 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 Lightsail's -// API operation OpenInstancePublicPorts for usage and error information. +// API operation GetOperation for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -6530,80 +6899,84 @@ func (c *Lightsail) OpenInstancePublicPortsRequest(input *OpenInstancePublicPort // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/OpenInstancePublicPorts -func (c *Lightsail) OpenInstancePublicPorts(input *OpenInstancePublicPortsInput) (*OpenInstancePublicPortsOutput, error) { - req, out := c.OpenInstancePublicPortsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetOperation +func (c *Lightsail) GetOperation(input *GetOperationInput) (*GetOperationOutput, error) { + req, out := c.GetOperationRequest(input) return out, req.Send() } -// OpenInstancePublicPortsWithContext is the same as OpenInstancePublicPorts with the addition of +// GetOperationWithContext is the same as GetOperation with the addition of // the ability to pass a context and additional request options. // -// See OpenInstancePublicPorts for details on how to use this API operation. +// See GetOperation 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 *Lightsail) OpenInstancePublicPortsWithContext(ctx aws.Context, input *OpenInstancePublicPortsInput, opts ...request.Option) (*OpenInstancePublicPortsOutput, error) { - req, out := c.OpenInstancePublicPortsRequest(input) +func (c *Lightsail) GetOperationWithContext(ctx aws.Context, input *GetOperationInput, opts ...request.Option) (*GetOperationOutput, error) { + req, out := c.GetOperationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opPeerVpc = "PeerVpc" +const opGetOperations = "GetOperations" -// PeerVpcRequest generates a "aws/request.Request" representing the -// client's request for the PeerVpc operation. The "output" return +// GetOperationsRequest generates a "aws/request.Request" representing the +// client's request for the GetOperations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 PeerVpc for more information on using the PeerVpc +// See GetOperations for more information on using the GetOperations // 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 PeerVpcRequest method. -// req, resp := client.PeerVpcRequest(params) +// // Example sending a request using the GetOperationsRequest method. +// req, resp := client.GetOperationsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/PeerVpc -func (c *Lightsail) PeerVpcRequest(input *PeerVpcInput) (req *request.Request, output *PeerVpcOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetOperations +func (c *Lightsail) GetOperationsRequest(input *GetOperationsInput) (req *request.Request, output *GetOperationsOutput) { op := &request.Operation{ - Name: opPeerVpc, + Name: opGetOperations, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &PeerVpcInput{} + input = &GetOperationsInput{} } - output = &PeerVpcOutput{} + output = &GetOperationsOutput{} req = c.newRequest(op, input, output) return } -// PeerVpc API operation for Amazon Lightsail. +// GetOperations API operation for Amazon Lightsail. // -// Tries to peer the Lightsail VPC with the user's default VPC. +// Returns information about all operations. +// +// Results are returned from oldest to newest, up to a maximum of 200. Results +// can be paged by making each subsequent call to GetOperations use the maximum +// (last) statusChangedAt value from the previous 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 // the error. // // See the AWS API reference guide for Amazon Lightsail's -// API operation PeerVpc for usage and error information. +// API operation GetOperations for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -6634,81 +7007,80 @@ func (c *Lightsail) PeerVpcRequest(input *PeerVpcInput) (req *request.Request, o // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/PeerVpc -func (c *Lightsail) PeerVpc(input *PeerVpcInput) (*PeerVpcOutput, error) { - req, out := c.PeerVpcRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetOperations +func (c *Lightsail) GetOperations(input *GetOperationsInput) (*GetOperationsOutput, error) { + req, out := c.GetOperationsRequest(input) return out, req.Send() } -// PeerVpcWithContext is the same as PeerVpc with the addition of +// GetOperationsWithContext is the same as GetOperations with the addition of // the ability to pass a context and additional request options. // -// See PeerVpc for details on how to use this API operation. +// See GetOperations 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 *Lightsail) PeerVpcWithContext(ctx aws.Context, input *PeerVpcInput, opts ...request.Option) (*PeerVpcOutput, error) { - req, out := c.PeerVpcRequest(input) +func (c *Lightsail) GetOperationsWithContext(ctx aws.Context, input *GetOperationsInput, opts ...request.Option) (*GetOperationsOutput, error) { + req, out := c.GetOperationsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opPutInstancePublicPorts = "PutInstancePublicPorts" +const opGetOperationsForResource = "GetOperationsForResource" -// PutInstancePublicPortsRequest generates a "aws/request.Request" representing the -// client's request for the PutInstancePublicPorts operation. The "output" return +// GetOperationsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the GetOperationsForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 PutInstancePublicPorts for more information on using the PutInstancePublicPorts +// See GetOperationsForResource for more information on using the GetOperationsForResource // 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 PutInstancePublicPortsRequest method. -// req, resp := client.PutInstancePublicPortsRequest(params) +// // Example sending a request using the GetOperationsForResourceRequest method. +// req, resp := client.GetOperationsForResourceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/PutInstancePublicPorts -func (c *Lightsail) PutInstancePublicPortsRequest(input *PutInstancePublicPortsInput) (req *request.Request, output *PutInstancePublicPortsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetOperationsForResource +func (c *Lightsail) GetOperationsForResourceRequest(input *GetOperationsForResourceInput) (req *request.Request, output *GetOperationsForResourceOutput) { op := &request.Operation{ - Name: opPutInstancePublicPorts, + Name: opGetOperationsForResource, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &PutInstancePublicPortsInput{} + input = &GetOperationsForResourceInput{} } - output = &PutInstancePublicPortsOutput{} + output = &GetOperationsForResourceOutput{} req = c.newRequest(op, input, output) return } -// PutInstancePublicPorts API operation for Amazon Lightsail. +// GetOperationsForResource API operation for Amazon Lightsail. // -// Sets the specified open ports for an Amazon Lightsail instance, and closes -// all ports for every protocol not included in the current request. +// Gets operations for a specific resource (e.g., an instance or a static IP). // // 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 Lightsail's -// API operation PutInstancePublicPorts for usage and error information. +// API operation GetOperationsForResource for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -6739,83 +7111,81 @@ func (c *Lightsail) PutInstancePublicPortsRequest(input *PutInstancePublicPortsI // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/PutInstancePublicPorts -func (c *Lightsail) PutInstancePublicPorts(input *PutInstancePublicPortsInput) (*PutInstancePublicPortsOutput, error) { - req, out := c.PutInstancePublicPortsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetOperationsForResource +func (c *Lightsail) GetOperationsForResource(input *GetOperationsForResourceInput) (*GetOperationsForResourceOutput, error) { + req, out := c.GetOperationsForResourceRequest(input) return out, req.Send() } -// PutInstancePublicPortsWithContext is the same as PutInstancePublicPorts with the addition of +// GetOperationsForResourceWithContext is the same as GetOperationsForResource with the addition of // the ability to pass a context and additional request options. // -// See PutInstancePublicPorts for details on how to use this API operation. +// See GetOperationsForResource 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 *Lightsail) PutInstancePublicPortsWithContext(ctx aws.Context, input *PutInstancePublicPortsInput, opts ...request.Option) (*PutInstancePublicPortsOutput, error) { - req, out := c.PutInstancePublicPortsRequest(input) +func (c *Lightsail) GetOperationsForResourceWithContext(ctx aws.Context, input *GetOperationsForResourceInput, opts ...request.Option) (*GetOperationsForResourceOutput, error) { + req, out := c.GetOperationsForResourceRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opRebootInstance = "RebootInstance" +const opGetRegions = "GetRegions" -// RebootInstanceRequest generates a "aws/request.Request" representing the -// client's request for the RebootInstance operation. The "output" return +// GetRegionsRequest generates a "aws/request.Request" representing the +// client's request for the GetRegions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 RebootInstance for more information on using the RebootInstance +// See GetRegions for more information on using the GetRegions // 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 RebootInstanceRequest method. -// req, resp := client.RebootInstanceRequest(params) +// // Example sending a request using the GetRegionsRequest method. +// req, resp := client.GetRegionsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/RebootInstance -func (c *Lightsail) RebootInstanceRequest(input *RebootInstanceInput) (req *request.Request, output *RebootInstanceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRegions +func (c *Lightsail) GetRegionsRequest(input *GetRegionsInput) (req *request.Request, output *GetRegionsOutput) { op := &request.Operation{ - Name: opRebootInstance, + Name: opGetRegions, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &RebootInstanceInput{} + input = &GetRegionsInput{} } - output = &RebootInstanceOutput{} + output = &GetRegionsOutput{} req = c.newRequest(op, input, output) return } -// RebootInstance API operation for Amazon Lightsail. +// GetRegions API operation for Amazon Lightsail. // -// Restarts a specific instance. When your Amazon Lightsail instance is finished -// rebooting, Lightsail assigns a new public IP address. To use the same IP -// address after restarting, create a static IP address and attach it to the -// instance. +// Returns a list of all valid regions for Amazon Lightsail. Use the include +// availability zones parameter to also return the Availability Zones in a 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. // // See the AWS API reference guide for Amazon Lightsail's -// API operation RebootInstance for usage and error information. +// API operation GetRegions for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -6846,80 +7216,80 @@ func (c *Lightsail) RebootInstanceRequest(input *RebootInstanceInput) (req *requ // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/RebootInstance -func (c *Lightsail) RebootInstance(input *RebootInstanceInput) (*RebootInstanceOutput, error) { - req, out := c.RebootInstanceRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRegions +func (c *Lightsail) GetRegions(input *GetRegionsInput) (*GetRegionsOutput, error) { + req, out := c.GetRegionsRequest(input) return out, req.Send() } -// RebootInstanceWithContext is the same as RebootInstance with the addition of +// GetRegionsWithContext is the same as GetRegions with the addition of // the ability to pass a context and additional request options. // -// See RebootInstance for details on how to use this API operation. +// See GetRegions 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 *Lightsail) RebootInstanceWithContext(ctx aws.Context, input *RebootInstanceInput, opts ...request.Option) (*RebootInstanceOutput, error) { - req, out := c.RebootInstanceRequest(input) +func (c *Lightsail) GetRegionsWithContext(ctx aws.Context, input *GetRegionsInput, opts ...request.Option) (*GetRegionsOutput, error) { + req, out := c.GetRegionsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opReleaseStaticIp = "ReleaseStaticIp" +const opGetRelationalDatabase = "GetRelationalDatabase" -// ReleaseStaticIpRequest generates a "aws/request.Request" representing the -// client's request for the ReleaseStaticIp operation. The "output" return +// GetRelationalDatabaseRequest generates a "aws/request.Request" representing the +// client's request for the GetRelationalDatabase operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 ReleaseStaticIp for more information on using the ReleaseStaticIp +// See GetRelationalDatabase for more information on using the GetRelationalDatabase // 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 ReleaseStaticIpRequest method. -// req, resp := client.ReleaseStaticIpRequest(params) +// // Example sending a request using the GetRelationalDatabaseRequest method. +// req, resp := client.GetRelationalDatabaseRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/ReleaseStaticIp -func (c *Lightsail) ReleaseStaticIpRequest(input *ReleaseStaticIpInput) (req *request.Request, output *ReleaseStaticIpOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabase +func (c *Lightsail) GetRelationalDatabaseRequest(input *GetRelationalDatabaseInput) (req *request.Request, output *GetRelationalDatabaseOutput) { op := &request.Operation{ - Name: opReleaseStaticIp, + Name: opGetRelationalDatabase, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &ReleaseStaticIpInput{} + input = &GetRelationalDatabaseInput{} } - output = &ReleaseStaticIpOutput{} + output = &GetRelationalDatabaseOutput{} req = c.newRequest(op, input, output) return } -// ReleaseStaticIp API operation for Amazon Lightsail. +// GetRelationalDatabase API operation for Amazon Lightsail. // -// Deletes a specific static IP from your account. +// Returns information about a specific database in Amazon Lightsail. // // 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 Lightsail's -// API operation ReleaseStaticIp for usage and error information. +// API operation GetRelationalDatabase for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -6950,81 +7320,84 @@ func (c *Lightsail) ReleaseStaticIpRequest(input *ReleaseStaticIpInput) (req *re // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/ReleaseStaticIp -func (c *Lightsail) ReleaseStaticIp(input *ReleaseStaticIpInput) (*ReleaseStaticIpOutput, error) { - req, out := c.ReleaseStaticIpRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabase +func (c *Lightsail) GetRelationalDatabase(input *GetRelationalDatabaseInput) (*GetRelationalDatabaseOutput, error) { + req, out := c.GetRelationalDatabaseRequest(input) return out, req.Send() } -// ReleaseStaticIpWithContext is the same as ReleaseStaticIp with the addition of +// GetRelationalDatabaseWithContext is the same as GetRelationalDatabase with the addition of // the ability to pass a context and additional request options. // -// See ReleaseStaticIp for details on how to use this API operation. +// See GetRelationalDatabase 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 *Lightsail) ReleaseStaticIpWithContext(ctx aws.Context, input *ReleaseStaticIpInput, opts ...request.Option) (*ReleaseStaticIpOutput, error) { - req, out := c.ReleaseStaticIpRequest(input) +func (c *Lightsail) GetRelationalDatabaseWithContext(ctx aws.Context, input *GetRelationalDatabaseInput, opts ...request.Option) (*GetRelationalDatabaseOutput, error) { + req, out := c.GetRelationalDatabaseRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opStartInstance = "StartInstance" +const opGetRelationalDatabaseBlueprints = "GetRelationalDatabaseBlueprints" -// StartInstanceRequest generates a "aws/request.Request" representing the -// client's request for the StartInstance operation. The "output" return +// GetRelationalDatabaseBlueprintsRequest generates a "aws/request.Request" representing the +// client's request for the GetRelationalDatabaseBlueprints operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 StartInstance for more information on using the StartInstance +// See GetRelationalDatabaseBlueprints for more information on using the GetRelationalDatabaseBlueprints // 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 StartInstanceRequest method. -// req, resp := client.StartInstanceRequest(params) +// // Example sending a request using the GetRelationalDatabaseBlueprintsRequest method. +// req, resp := client.GetRelationalDatabaseBlueprintsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StartInstance -func (c *Lightsail) StartInstanceRequest(input *StartInstanceInput) (req *request.Request, output *StartInstanceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseBlueprints +func (c *Lightsail) GetRelationalDatabaseBlueprintsRequest(input *GetRelationalDatabaseBlueprintsInput) (req *request.Request, output *GetRelationalDatabaseBlueprintsOutput) { op := &request.Operation{ - Name: opStartInstance, + Name: opGetRelationalDatabaseBlueprints, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &StartInstanceInput{} + input = &GetRelationalDatabaseBlueprintsInput{} } - output = &StartInstanceOutput{} + output = &GetRelationalDatabaseBlueprintsOutput{} req = c.newRequest(op, input, output) return } -// StartInstance API operation for Amazon Lightsail. +// GetRelationalDatabaseBlueprints API operation for Amazon Lightsail. // -// Starts a specific Amazon Lightsail instance from a stopped state. To restart -// an instance, use the reboot instance operation. +// Returns a list of available database blueprints in Amazon Lightsail. A blueprint +// describes the major engine version of a database. +// +// You can use a blueprint ID to create a new database that runs a specific +// database engine. // // 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 Lightsail's -// API operation StartInstance for usage and error information. +// API operation GetRelationalDatabaseBlueprints for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -7055,80 +7428,84 @@ func (c *Lightsail) StartInstanceRequest(input *StartInstanceInput) (req *reques // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StartInstance -func (c *Lightsail) StartInstance(input *StartInstanceInput) (*StartInstanceOutput, error) { - req, out := c.StartInstanceRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseBlueprints +func (c *Lightsail) GetRelationalDatabaseBlueprints(input *GetRelationalDatabaseBlueprintsInput) (*GetRelationalDatabaseBlueprintsOutput, error) { + req, out := c.GetRelationalDatabaseBlueprintsRequest(input) return out, req.Send() } -// StartInstanceWithContext is the same as StartInstance with the addition of +// GetRelationalDatabaseBlueprintsWithContext is the same as GetRelationalDatabaseBlueprints with the addition of // the ability to pass a context and additional request options. // -// See StartInstance for details on how to use this API operation. +// See GetRelationalDatabaseBlueprints 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 *Lightsail) StartInstanceWithContext(ctx aws.Context, input *StartInstanceInput, opts ...request.Option) (*StartInstanceOutput, error) { - req, out := c.StartInstanceRequest(input) +func (c *Lightsail) GetRelationalDatabaseBlueprintsWithContext(ctx aws.Context, input *GetRelationalDatabaseBlueprintsInput, opts ...request.Option) (*GetRelationalDatabaseBlueprintsOutput, error) { + req, out := c.GetRelationalDatabaseBlueprintsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opStopInstance = "StopInstance" +const opGetRelationalDatabaseBundles = "GetRelationalDatabaseBundles" -// StopInstanceRequest generates a "aws/request.Request" representing the -// client's request for the StopInstance operation. The "output" return +// GetRelationalDatabaseBundlesRequest generates a "aws/request.Request" representing the +// client's request for the GetRelationalDatabaseBundles operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 StopInstance for more information on using the StopInstance +// See GetRelationalDatabaseBundles for more information on using the GetRelationalDatabaseBundles // 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 StopInstanceRequest method. -// req, resp := client.StopInstanceRequest(params) +// // Example sending a request using the GetRelationalDatabaseBundlesRequest method. +// req, resp := client.GetRelationalDatabaseBundlesRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StopInstance -func (c *Lightsail) StopInstanceRequest(input *StopInstanceInput) (req *request.Request, output *StopInstanceOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseBundles +func (c *Lightsail) GetRelationalDatabaseBundlesRequest(input *GetRelationalDatabaseBundlesInput) (req *request.Request, output *GetRelationalDatabaseBundlesOutput) { op := &request.Operation{ - Name: opStopInstance, + Name: opGetRelationalDatabaseBundles, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &StopInstanceInput{} + input = &GetRelationalDatabaseBundlesInput{} } - output = &StopInstanceOutput{} + output = &GetRelationalDatabaseBundlesOutput{} req = c.newRequest(op, input, output) return } -// StopInstance API operation for Amazon Lightsail. +// GetRelationalDatabaseBundles API operation for Amazon Lightsail. // -// Stops a specific Amazon Lightsail instance that is currently running. +// Returns the list of bundles that are available in Amazon Lightsail. A bundle +// describes the performance specifications for a database. +// +// You can use a bundle ID to create a new database with explicit performance +// specifications. // // 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 Lightsail's -// API operation StopInstance for usage and error information. +// API operation GetRelationalDatabaseBundles for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -7159,80 +7536,80 @@ func (c *Lightsail) StopInstanceRequest(input *StopInstanceInput) (req *request. // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StopInstance -func (c *Lightsail) StopInstance(input *StopInstanceInput) (*StopInstanceOutput, error) { - req, out := c.StopInstanceRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseBundles +func (c *Lightsail) GetRelationalDatabaseBundles(input *GetRelationalDatabaseBundlesInput) (*GetRelationalDatabaseBundlesOutput, error) { + req, out := c.GetRelationalDatabaseBundlesRequest(input) return out, req.Send() } -// StopInstanceWithContext is the same as StopInstance with the addition of +// GetRelationalDatabaseBundlesWithContext is the same as GetRelationalDatabaseBundles with the addition of // the ability to pass a context and additional request options. // -// See StopInstance for details on how to use this API operation. +// See GetRelationalDatabaseBundles 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 *Lightsail) StopInstanceWithContext(ctx aws.Context, input *StopInstanceInput, opts ...request.Option) (*StopInstanceOutput, error) { - req, out := c.StopInstanceRequest(input) +func (c *Lightsail) GetRelationalDatabaseBundlesWithContext(ctx aws.Context, input *GetRelationalDatabaseBundlesInput, opts ...request.Option) (*GetRelationalDatabaseBundlesOutput, error) { + req, out := c.GetRelationalDatabaseBundlesRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUnpeerVpc = "UnpeerVpc" +const opGetRelationalDatabaseEvents = "GetRelationalDatabaseEvents" -// UnpeerVpcRequest generates a "aws/request.Request" representing the -// client's request for the UnpeerVpc operation. The "output" return +// GetRelationalDatabaseEventsRequest generates a "aws/request.Request" representing the +// client's request for the GetRelationalDatabaseEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 UnpeerVpc for more information on using the UnpeerVpc +// See GetRelationalDatabaseEvents for more information on using the GetRelationalDatabaseEvents // 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 UnpeerVpcRequest method. -// req, resp := client.UnpeerVpcRequest(params) +// // Example sending a request using the GetRelationalDatabaseEventsRequest method. +// req, resp := client.GetRelationalDatabaseEventsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UnpeerVpc -func (c *Lightsail) UnpeerVpcRequest(input *UnpeerVpcInput) (req *request.Request, output *UnpeerVpcOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseEvents +func (c *Lightsail) GetRelationalDatabaseEventsRequest(input *GetRelationalDatabaseEventsInput) (req *request.Request, output *GetRelationalDatabaseEventsOutput) { op := &request.Operation{ - Name: opUnpeerVpc, + Name: opGetRelationalDatabaseEvents, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &UnpeerVpcInput{} + input = &GetRelationalDatabaseEventsInput{} } - output = &UnpeerVpcOutput{} + output = &GetRelationalDatabaseEventsOutput{} req = c.newRequest(op, input, output) return } -// UnpeerVpc API operation for Amazon Lightsail. +// GetRelationalDatabaseEvents API operation for Amazon Lightsail. // -// Attempts to unpeer the Lightsail VPC from the user's default VPC. +// Returns a list of events for a specific database in Amazon Lightsail. // // 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 Lightsail's -// API operation UnpeerVpc for usage and error information. +// API operation GetRelationalDatabaseEvents for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -7263,80 +7640,80 @@ func (c *Lightsail) UnpeerVpcRequest(input *UnpeerVpcInput) (req *request.Reques // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UnpeerVpc -func (c *Lightsail) UnpeerVpc(input *UnpeerVpcInput) (*UnpeerVpcOutput, error) { - req, out := c.UnpeerVpcRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseEvents +func (c *Lightsail) GetRelationalDatabaseEvents(input *GetRelationalDatabaseEventsInput) (*GetRelationalDatabaseEventsOutput, error) { + req, out := c.GetRelationalDatabaseEventsRequest(input) return out, req.Send() } -// UnpeerVpcWithContext is the same as UnpeerVpc with the addition of +// GetRelationalDatabaseEventsWithContext is the same as GetRelationalDatabaseEvents with the addition of // the ability to pass a context and additional request options. // -// See UnpeerVpc for details on how to use this API operation. +// See GetRelationalDatabaseEvents 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 *Lightsail) UnpeerVpcWithContext(ctx aws.Context, input *UnpeerVpcInput, opts ...request.Option) (*UnpeerVpcOutput, error) { - req, out := c.UnpeerVpcRequest(input) +func (c *Lightsail) GetRelationalDatabaseEventsWithContext(ctx aws.Context, input *GetRelationalDatabaseEventsInput, opts ...request.Option) (*GetRelationalDatabaseEventsOutput, error) { + req, out := c.GetRelationalDatabaseEventsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUpdateDomainEntry = "UpdateDomainEntry" +const opGetRelationalDatabaseLogEvents = "GetRelationalDatabaseLogEvents" -// UpdateDomainEntryRequest generates a "aws/request.Request" representing the -// client's request for the UpdateDomainEntry operation. The "output" return +// GetRelationalDatabaseLogEventsRequest generates a "aws/request.Request" representing the +// client's request for the GetRelationalDatabaseLogEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 UpdateDomainEntry for more information on using the UpdateDomainEntry +// See GetRelationalDatabaseLogEvents for more information on using the GetRelationalDatabaseLogEvents // 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 UpdateDomainEntryRequest method. -// req, resp := client.UpdateDomainEntryRequest(params) +// // Example sending a request using the GetRelationalDatabaseLogEventsRequest method. +// req, resp := client.GetRelationalDatabaseLogEventsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateDomainEntry -func (c *Lightsail) UpdateDomainEntryRequest(input *UpdateDomainEntryInput) (req *request.Request, output *UpdateDomainEntryOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseLogEvents +func (c *Lightsail) GetRelationalDatabaseLogEventsRequest(input *GetRelationalDatabaseLogEventsInput) (req *request.Request, output *GetRelationalDatabaseLogEventsOutput) { op := &request.Operation{ - Name: opUpdateDomainEntry, + Name: opGetRelationalDatabaseLogEvents, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &UpdateDomainEntryInput{} + input = &GetRelationalDatabaseLogEventsInput{} } - output = &UpdateDomainEntryOutput{} + output = &GetRelationalDatabaseLogEventsOutput{} req = c.newRequest(op, input, output) return } -// UpdateDomainEntry API operation for Amazon Lightsail. +// GetRelationalDatabaseLogEvents API operation for Amazon Lightsail. // -// Updates a domain recordset after it is created. +// Returns a list of log events for a database in Amazon Lightsail. // // 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 Lightsail's -// API operation UpdateDomainEntry for usage and error information. +// API operation GetRelationalDatabaseLogEvents for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -7367,81 +7744,81 @@ func (c *Lightsail) UpdateDomainEntryRequest(input *UpdateDomainEntryInput) (req // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateDomainEntry -func (c *Lightsail) UpdateDomainEntry(input *UpdateDomainEntryInput) (*UpdateDomainEntryOutput, error) { - req, out := c.UpdateDomainEntryRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseLogEvents +func (c *Lightsail) GetRelationalDatabaseLogEvents(input *GetRelationalDatabaseLogEventsInput) (*GetRelationalDatabaseLogEventsOutput, error) { + req, out := c.GetRelationalDatabaseLogEventsRequest(input) return out, req.Send() } -// UpdateDomainEntryWithContext is the same as UpdateDomainEntry with the addition of +// GetRelationalDatabaseLogEventsWithContext is the same as GetRelationalDatabaseLogEvents with the addition of // the ability to pass a context and additional request options. // -// See UpdateDomainEntry for details on how to use this API operation. +// See GetRelationalDatabaseLogEvents 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 *Lightsail) UpdateDomainEntryWithContext(ctx aws.Context, input *UpdateDomainEntryInput, opts ...request.Option) (*UpdateDomainEntryOutput, error) { - req, out := c.UpdateDomainEntryRequest(input) +func (c *Lightsail) GetRelationalDatabaseLogEventsWithContext(ctx aws.Context, input *GetRelationalDatabaseLogEventsInput, opts ...request.Option) (*GetRelationalDatabaseLogEventsOutput, error) { + req, out := c.GetRelationalDatabaseLogEventsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opUpdateLoadBalancerAttribute = "UpdateLoadBalancerAttribute" +const opGetRelationalDatabaseLogStreams = "GetRelationalDatabaseLogStreams" -// UpdateLoadBalancerAttributeRequest generates a "aws/request.Request" representing the -// client's request for the UpdateLoadBalancerAttribute operation. The "output" return +// GetRelationalDatabaseLogStreamsRequest generates a "aws/request.Request" representing the +// client's request for the GetRelationalDatabaseLogStreams operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 UpdateLoadBalancerAttribute for more information on using the UpdateLoadBalancerAttribute +// See GetRelationalDatabaseLogStreams for more information on using the GetRelationalDatabaseLogStreams // 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 UpdateLoadBalancerAttributeRequest method. -// req, resp := client.UpdateLoadBalancerAttributeRequest(params) +// // Example sending a request using the GetRelationalDatabaseLogStreamsRequest method. +// req, resp := client.GetRelationalDatabaseLogStreamsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateLoadBalancerAttribute -func (c *Lightsail) UpdateLoadBalancerAttributeRequest(input *UpdateLoadBalancerAttributeInput) (req *request.Request, output *UpdateLoadBalancerAttributeOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseLogStreams +func (c *Lightsail) GetRelationalDatabaseLogStreamsRequest(input *GetRelationalDatabaseLogStreamsInput) (req *request.Request, output *GetRelationalDatabaseLogStreamsOutput) { op := &request.Operation{ - Name: opUpdateLoadBalancerAttribute, + Name: opGetRelationalDatabaseLogStreams, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &UpdateLoadBalancerAttributeInput{} + input = &GetRelationalDatabaseLogStreamsInput{} } - output = &UpdateLoadBalancerAttributeOutput{} + output = &GetRelationalDatabaseLogStreamsOutput{} req = c.newRequest(op, input, output) return } -// UpdateLoadBalancerAttribute API operation for Amazon Lightsail. +// GetRelationalDatabaseLogStreams API operation for Amazon Lightsail. // -// Updates the specified attribute for a load balancer. You can only update -// one attribute at a time. +// Returns a list of available log streams for a specific database in Amazon +// Lightsail. // // 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 Lightsail's -// API operation UpdateLoadBalancerAttribute for usage and error information. +// API operation GetRelationalDatabaseLogStreams for usage and error information. // // Returned Error Codes: // * ErrCodeServiceException "ServiceException" @@ -7472,51 +7849,3268 @@ func (c *Lightsail) UpdateLoadBalancerAttributeRequest(input *UpdateLoadBalancer // * ErrCodeUnauthenticatedException "UnauthenticatedException" // Lightsail throws this exception when the user has not been authenticated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateLoadBalancerAttribute -func (c *Lightsail) UpdateLoadBalancerAttribute(input *UpdateLoadBalancerAttributeInput) (*UpdateLoadBalancerAttributeOutput, error) { - req, out := c.UpdateLoadBalancerAttributeRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseLogStreams +func (c *Lightsail) GetRelationalDatabaseLogStreams(input *GetRelationalDatabaseLogStreamsInput) (*GetRelationalDatabaseLogStreamsOutput, error) { + req, out := c.GetRelationalDatabaseLogStreamsRequest(input) return out, req.Send() } -// UpdateLoadBalancerAttributeWithContext is the same as UpdateLoadBalancerAttribute with the addition of +// GetRelationalDatabaseLogStreamsWithContext is the same as GetRelationalDatabaseLogStreams with the addition of // the ability to pass a context and additional request options. // -// See UpdateLoadBalancerAttribute for details on how to use this API operation. +// See GetRelationalDatabaseLogStreams 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 *Lightsail) UpdateLoadBalancerAttributeWithContext(ctx aws.Context, input *UpdateLoadBalancerAttributeInput, opts ...request.Option) (*UpdateLoadBalancerAttributeOutput, error) { - req, out := c.UpdateLoadBalancerAttributeRequest(input) +func (c *Lightsail) GetRelationalDatabaseLogStreamsWithContext(ctx aws.Context, input *GetRelationalDatabaseLogStreamsInput, opts ...request.Option) (*GetRelationalDatabaseLogStreamsOutput, error) { + req, out := c.GetRelationalDatabaseLogStreamsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -type AllocateStaticIpInput struct { - _ struct{} `type:"structure"` - - // The name of the static IP address. - // - // StaticIpName is a required field - StaticIpName *string `locationName:"staticIpName" type:"string" required:"true"` -} - -// String returns the string representation -func (s AllocateStaticIpInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s AllocateStaticIpInput) GoString() string { - return s.String() -} +const opGetRelationalDatabaseMasterUserPassword = "GetRelationalDatabaseMasterUserPassword" -// Validate inspects the fields of the type to determine if they are valid. -func (s *AllocateStaticIpInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AllocateStaticIpInput"} - if s.StaticIpName == nil { +// GetRelationalDatabaseMasterUserPasswordRequest generates a "aws/request.Request" representing the +// client's request for the GetRelationalDatabaseMasterUserPassword 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 GetRelationalDatabaseMasterUserPassword for more information on using the GetRelationalDatabaseMasterUserPassword +// 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 GetRelationalDatabaseMasterUserPasswordRequest method. +// req, resp := client.GetRelationalDatabaseMasterUserPasswordRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseMasterUserPassword +func (c *Lightsail) GetRelationalDatabaseMasterUserPasswordRequest(input *GetRelationalDatabaseMasterUserPasswordInput) (req *request.Request, output *GetRelationalDatabaseMasterUserPasswordOutput) { + op := &request.Operation{ + Name: opGetRelationalDatabaseMasterUserPassword, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetRelationalDatabaseMasterUserPasswordInput{} + } + + output = &GetRelationalDatabaseMasterUserPasswordOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetRelationalDatabaseMasterUserPassword API operation for Amazon Lightsail. +// +// Returns the current, previous, or pending versions of the master user password +// for a Lightsail database. +// +// The asdf operation GetRelationalDatabaseMasterUserPassword supports tag-based +// access control via resource tags applied to the resource identified by relationalDatabaseName. +// +// 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 Lightsail's +// API operation GetRelationalDatabaseMasterUserPassword for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseMasterUserPassword +func (c *Lightsail) GetRelationalDatabaseMasterUserPassword(input *GetRelationalDatabaseMasterUserPasswordInput) (*GetRelationalDatabaseMasterUserPasswordOutput, error) { + req, out := c.GetRelationalDatabaseMasterUserPasswordRequest(input) + return out, req.Send() +} + +// GetRelationalDatabaseMasterUserPasswordWithContext is the same as GetRelationalDatabaseMasterUserPassword with the addition of +// the ability to pass a context and additional request options. +// +// See GetRelationalDatabaseMasterUserPassword 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 *Lightsail) GetRelationalDatabaseMasterUserPasswordWithContext(ctx aws.Context, input *GetRelationalDatabaseMasterUserPasswordInput, opts ...request.Option) (*GetRelationalDatabaseMasterUserPasswordOutput, error) { + req, out := c.GetRelationalDatabaseMasterUserPasswordRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetRelationalDatabaseMetricData = "GetRelationalDatabaseMetricData" + +// GetRelationalDatabaseMetricDataRequest generates a "aws/request.Request" representing the +// client's request for the GetRelationalDatabaseMetricData 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 GetRelationalDatabaseMetricData for more information on using the GetRelationalDatabaseMetricData +// 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 GetRelationalDatabaseMetricDataRequest method. +// req, resp := client.GetRelationalDatabaseMetricDataRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseMetricData +func (c *Lightsail) GetRelationalDatabaseMetricDataRequest(input *GetRelationalDatabaseMetricDataInput) (req *request.Request, output *GetRelationalDatabaseMetricDataOutput) { + op := &request.Operation{ + Name: opGetRelationalDatabaseMetricData, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetRelationalDatabaseMetricDataInput{} + } + + output = &GetRelationalDatabaseMetricDataOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetRelationalDatabaseMetricData API operation for Amazon Lightsail. +// +// Returns the data points of the specified metric for a database in Amazon +// Lightsail. +// +// 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 Lightsail's +// API operation GetRelationalDatabaseMetricData for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseMetricData +func (c *Lightsail) GetRelationalDatabaseMetricData(input *GetRelationalDatabaseMetricDataInput) (*GetRelationalDatabaseMetricDataOutput, error) { + req, out := c.GetRelationalDatabaseMetricDataRequest(input) + return out, req.Send() +} + +// GetRelationalDatabaseMetricDataWithContext is the same as GetRelationalDatabaseMetricData with the addition of +// the ability to pass a context and additional request options. +// +// See GetRelationalDatabaseMetricData 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 *Lightsail) GetRelationalDatabaseMetricDataWithContext(ctx aws.Context, input *GetRelationalDatabaseMetricDataInput, opts ...request.Option) (*GetRelationalDatabaseMetricDataOutput, error) { + req, out := c.GetRelationalDatabaseMetricDataRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetRelationalDatabaseParameters = "GetRelationalDatabaseParameters" + +// GetRelationalDatabaseParametersRequest generates a "aws/request.Request" representing the +// client's request for the GetRelationalDatabaseParameters 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 GetRelationalDatabaseParameters for more information on using the GetRelationalDatabaseParameters +// 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 GetRelationalDatabaseParametersRequest method. +// req, resp := client.GetRelationalDatabaseParametersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseParameters +func (c *Lightsail) GetRelationalDatabaseParametersRequest(input *GetRelationalDatabaseParametersInput) (req *request.Request, output *GetRelationalDatabaseParametersOutput) { + op := &request.Operation{ + Name: opGetRelationalDatabaseParameters, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetRelationalDatabaseParametersInput{} + } + + output = &GetRelationalDatabaseParametersOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetRelationalDatabaseParameters API operation for Amazon Lightsail. +// +// Returns all of the runtime parameters offered by the underlying database +// software, or engine, for a specific database in Amazon Lightsail. +// +// In addition to the parameter names and values, this operation returns other +// information about each parameter. This information includes whether changes +// require a reboot, whether the parameter is modifiable, the allowed values, +// and the data types. +// +// 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 Lightsail's +// API operation GetRelationalDatabaseParameters for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseParameters +func (c *Lightsail) GetRelationalDatabaseParameters(input *GetRelationalDatabaseParametersInput) (*GetRelationalDatabaseParametersOutput, error) { + req, out := c.GetRelationalDatabaseParametersRequest(input) + return out, req.Send() +} + +// GetRelationalDatabaseParametersWithContext is the same as GetRelationalDatabaseParameters with the addition of +// the ability to pass a context and additional request options. +// +// See GetRelationalDatabaseParameters 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 *Lightsail) GetRelationalDatabaseParametersWithContext(ctx aws.Context, input *GetRelationalDatabaseParametersInput, opts ...request.Option) (*GetRelationalDatabaseParametersOutput, error) { + req, out := c.GetRelationalDatabaseParametersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetRelationalDatabaseSnapshot = "GetRelationalDatabaseSnapshot" + +// GetRelationalDatabaseSnapshotRequest generates a "aws/request.Request" representing the +// client's request for the GetRelationalDatabaseSnapshot 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 GetRelationalDatabaseSnapshot for more information on using the GetRelationalDatabaseSnapshot +// 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 GetRelationalDatabaseSnapshotRequest method. +// req, resp := client.GetRelationalDatabaseSnapshotRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseSnapshot +func (c *Lightsail) GetRelationalDatabaseSnapshotRequest(input *GetRelationalDatabaseSnapshotInput) (req *request.Request, output *GetRelationalDatabaseSnapshotOutput) { + op := &request.Operation{ + Name: opGetRelationalDatabaseSnapshot, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetRelationalDatabaseSnapshotInput{} + } + + output = &GetRelationalDatabaseSnapshotOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetRelationalDatabaseSnapshot API operation for Amazon Lightsail. +// +// Returns information about a specific database snapshot in Amazon Lightsail. +// +// 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 Lightsail's +// API operation GetRelationalDatabaseSnapshot for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseSnapshot +func (c *Lightsail) GetRelationalDatabaseSnapshot(input *GetRelationalDatabaseSnapshotInput) (*GetRelationalDatabaseSnapshotOutput, error) { + req, out := c.GetRelationalDatabaseSnapshotRequest(input) + return out, req.Send() +} + +// GetRelationalDatabaseSnapshotWithContext is the same as GetRelationalDatabaseSnapshot with the addition of +// the ability to pass a context and additional request options. +// +// See GetRelationalDatabaseSnapshot 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 *Lightsail) GetRelationalDatabaseSnapshotWithContext(ctx aws.Context, input *GetRelationalDatabaseSnapshotInput, opts ...request.Option) (*GetRelationalDatabaseSnapshotOutput, error) { + req, out := c.GetRelationalDatabaseSnapshotRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetRelationalDatabaseSnapshots = "GetRelationalDatabaseSnapshots" + +// GetRelationalDatabaseSnapshotsRequest generates a "aws/request.Request" representing the +// client's request for the GetRelationalDatabaseSnapshots 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 GetRelationalDatabaseSnapshots for more information on using the GetRelationalDatabaseSnapshots +// 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 GetRelationalDatabaseSnapshotsRequest method. +// req, resp := client.GetRelationalDatabaseSnapshotsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseSnapshots +func (c *Lightsail) GetRelationalDatabaseSnapshotsRequest(input *GetRelationalDatabaseSnapshotsInput) (req *request.Request, output *GetRelationalDatabaseSnapshotsOutput) { + op := &request.Operation{ + Name: opGetRelationalDatabaseSnapshots, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetRelationalDatabaseSnapshotsInput{} + } + + output = &GetRelationalDatabaseSnapshotsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetRelationalDatabaseSnapshots API operation for Amazon Lightsail. +// +// Returns information about all of your database snapshots in Amazon Lightsail. +// +// 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 Lightsail's +// API operation GetRelationalDatabaseSnapshots for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabaseSnapshots +func (c *Lightsail) GetRelationalDatabaseSnapshots(input *GetRelationalDatabaseSnapshotsInput) (*GetRelationalDatabaseSnapshotsOutput, error) { + req, out := c.GetRelationalDatabaseSnapshotsRequest(input) + return out, req.Send() +} + +// GetRelationalDatabaseSnapshotsWithContext is the same as GetRelationalDatabaseSnapshots with the addition of +// the ability to pass a context and additional request options. +// +// See GetRelationalDatabaseSnapshots 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 *Lightsail) GetRelationalDatabaseSnapshotsWithContext(ctx aws.Context, input *GetRelationalDatabaseSnapshotsInput, opts ...request.Option) (*GetRelationalDatabaseSnapshotsOutput, error) { + req, out := c.GetRelationalDatabaseSnapshotsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetRelationalDatabases = "GetRelationalDatabases" + +// GetRelationalDatabasesRequest generates a "aws/request.Request" representing the +// client's request for the GetRelationalDatabases 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 GetRelationalDatabases for more information on using the GetRelationalDatabases +// 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 GetRelationalDatabasesRequest method. +// req, resp := client.GetRelationalDatabasesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabases +func (c *Lightsail) GetRelationalDatabasesRequest(input *GetRelationalDatabasesInput) (req *request.Request, output *GetRelationalDatabasesOutput) { + op := &request.Operation{ + Name: opGetRelationalDatabases, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetRelationalDatabasesInput{} + } + + output = &GetRelationalDatabasesOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetRelationalDatabases API operation for Amazon Lightsail. +// +// Returns information about all of your databases in Amazon Lightsail. +// +// 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 Lightsail's +// API operation GetRelationalDatabases for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetRelationalDatabases +func (c *Lightsail) GetRelationalDatabases(input *GetRelationalDatabasesInput) (*GetRelationalDatabasesOutput, error) { + req, out := c.GetRelationalDatabasesRequest(input) + return out, req.Send() +} + +// GetRelationalDatabasesWithContext is the same as GetRelationalDatabases with the addition of +// the ability to pass a context and additional request options. +// +// See GetRelationalDatabases 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 *Lightsail) GetRelationalDatabasesWithContext(ctx aws.Context, input *GetRelationalDatabasesInput, opts ...request.Option) (*GetRelationalDatabasesOutput, error) { + req, out := c.GetRelationalDatabasesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetStaticIp = "GetStaticIp" + +// GetStaticIpRequest generates a "aws/request.Request" representing the +// client's request for the GetStaticIp 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 GetStaticIp for more information on using the GetStaticIp +// 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 GetStaticIpRequest method. +// req, resp := client.GetStaticIpRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetStaticIp +func (c *Lightsail) GetStaticIpRequest(input *GetStaticIpInput) (req *request.Request, output *GetStaticIpOutput) { + op := &request.Operation{ + Name: opGetStaticIp, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetStaticIpInput{} + } + + output = &GetStaticIpOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetStaticIp API operation for Amazon Lightsail. +// +// Returns information about a specific static IP. +// +// 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 Lightsail's +// API operation GetStaticIp for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetStaticIp +func (c *Lightsail) GetStaticIp(input *GetStaticIpInput) (*GetStaticIpOutput, error) { + req, out := c.GetStaticIpRequest(input) + return out, req.Send() +} + +// GetStaticIpWithContext is the same as GetStaticIp with the addition of +// the ability to pass a context and additional request options. +// +// See GetStaticIp 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 *Lightsail) GetStaticIpWithContext(ctx aws.Context, input *GetStaticIpInput, opts ...request.Option) (*GetStaticIpOutput, error) { + req, out := c.GetStaticIpRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetStaticIps = "GetStaticIps" + +// GetStaticIpsRequest generates a "aws/request.Request" representing the +// client's request for the GetStaticIps 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 GetStaticIps for more information on using the GetStaticIps +// 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 GetStaticIpsRequest method. +// req, resp := client.GetStaticIpsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetStaticIps +func (c *Lightsail) GetStaticIpsRequest(input *GetStaticIpsInput) (req *request.Request, output *GetStaticIpsOutput) { + op := &request.Operation{ + Name: opGetStaticIps, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetStaticIpsInput{} + } + + output = &GetStaticIpsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetStaticIps API operation for Amazon Lightsail. +// +// Returns information about all static IPs in the user's 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 Amazon Lightsail's +// API operation GetStaticIps for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/GetStaticIps +func (c *Lightsail) GetStaticIps(input *GetStaticIpsInput) (*GetStaticIpsOutput, error) { + req, out := c.GetStaticIpsRequest(input) + return out, req.Send() +} + +// GetStaticIpsWithContext is the same as GetStaticIps with the addition of +// the ability to pass a context and additional request options. +// +// See GetStaticIps 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 *Lightsail) GetStaticIpsWithContext(ctx aws.Context, input *GetStaticIpsInput, opts ...request.Option) (*GetStaticIpsOutput, error) { + req, out := c.GetStaticIpsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opImportKeyPair = "ImportKeyPair" + +// ImportKeyPairRequest generates a "aws/request.Request" representing the +// client's request for the ImportKeyPair 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 ImportKeyPair for more information on using the ImportKeyPair +// 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 ImportKeyPairRequest method. +// req, resp := client.ImportKeyPairRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/ImportKeyPair +func (c *Lightsail) ImportKeyPairRequest(input *ImportKeyPairInput) (req *request.Request, output *ImportKeyPairOutput) { + op := &request.Operation{ + Name: opImportKeyPair, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ImportKeyPairInput{} + } + + output = &ImportKeyPairOutput{} + req = c.newRequest(op, input, output) + return +} + +// ImportKeyPair API operation for Amazon Lightsail. +// +// Imports a public SSH key from a specific key pair. +// +// 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 Lightsail's +// API operation ImportKeyPair for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/ImportKeyPair +func (c *Lightsail) ImportKeyPair(input *ImportKeyPairInput) (*ImportKeyPairOutput, error) { + req, out := c.ImportKeyPairRequest(input) + return out, req.Send() +} + +// ImportKeyPairWithContext is the same as ImportKeyPair with the addition of +// the ability to pass a context and additional request options. +// +// See ImportKeyPair 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 *Lightsail) ImportKeyPairWithContext(ctx aws.Context, input *ImportKeyPairInput, opts ...request.Option) (*ImportKeyPairOutput, error) { + req, out := c.ImportKeyPairRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opIsVpcPeered = "IsVpcPeered" + +// IsVpcPeeredRequest generates a "aws/request.Request" representing the +// client's request for the IsVpcPeered 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 IsVpcPeered for more information on using the IsVpcPeered +// 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 IsVpcPeeredRequest method. +// req, resp := client.IsVpcPeeredRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/IsVpcPeered +func (c *Lightsail) IsVpcPeeredRequest(input *IsVpcPeeredInput) (req *request.Request, output *IsVpcPeeredOutput) { + op := &request.Operation{ + Name: opIsVpcPeered, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &IsVpcPeeredInput{} + } + + output = &IsVpcPeeredOutput{} + req = c.newRequest(op, input, output) + return +} + +// IsVpcPeered API operation for Amazon Lightsail. +// +// Returns a Boolean value indicating whether your Lightsail VPC is peered. +// +// 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 Lightsail's +// API operation IsVpcPeered for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/IsVpcPeered +func (c *Lightsail) IsVpcPeered(input *IsVpcPeeredInput) (*IsVpcPeeredOutput, error) { + req, out := c.IsVpcPeeredRequest(input) + return out, req.Send() +} + +// IsVpcPeeredWithContext is the same as IsVpcPeered with the addition of +// the ability to pass a context and additional request options. +// +// See IsVpcPeered 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 *Lightsail) IsVpcPeeredWithContext(ctx aws.Context, input *IsVpcPeeredInput, opts ...request.Option) (*IsVpcPeeredOutput, error) { + req, out := c.IsVpcPeeredRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opOpenInstancePublicPorts = "OpenInstancePublicPorts" + +// OpenInstancePublicPortsRequest generates a "aws/request.Request" representing the +// client's request for the OpenInstancePublicPorts 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 OpenInstancePublicPorts for more information on using the OpenInstancePublicPorts +// 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 OpenInstancePublicPortsRequest method. +// req, resp := client.OpenInstancePublicPortsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/OpenInstancePublicPorts +func (c *Lightsail) OpenInstancePublicPortsRequest(input *OpenInstancePublicPortsInput) (req *request.Request, output *OpenInstancePublicPortsOutput) { + op := &request.Operation{ + Name: opOpenInstancePublicPorts, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &OpenInstancePublicPortsInput{} + } + + output = &OpenInstancePublicPortsOutput{} + req = c.newRequest(op, input, output) + return +} + +// OpenInstancePublicPorts API operation for Amazon Lightsail. +// +// Adds public ports to an Amazon Lightsail instance. +// +// The open instance public ports operation supports tag-based access control +// via resource tags applied to the resource identified by instanceName. For +// more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). +// +// 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 Lightsail's +// API operation OpenInstancePublicPorts for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/OpenInstancePublicPorts +func (c *Lightsail) OpenInstancePublicPorts(input *OpenInstancePublicPortsInput) (*OpenInstancePublicPortsOutput, error) { + req, out := c.OpenInstancePublicPortsRequest(input) + return out, req.Send() +} + +// OpenInstancePublicPortsWithContext is the same as OpenInstancePublicPorts with the addition of +// the ability to pass a context and additional request options. +// +// See OpenInstancePublicPorts 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 *Lightsail) OpenInstancePublicPortsWithContext(ctx aws.Context, input *OpenInstancePublicPortsInput, opts ...request.Option) (*OpenInstancePublicPortsOutput, error) { + req, out := c.OpenInstancePublicPortsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPeerVpc = "PeerVpc" + +// PeerVpcRequest generates a "aws/request.Request" representing the +// client's request for the PeerVpc 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 PeerVpc for more information on using the PeerVpc +// 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 PeerVpcRequest method. +// req, resp := client.PeerVpcRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/PeerVpc +func (c *Lightsail) PeerVpcRequest(input *PeerVpcInput) (req *request.Request, output *PeerVpcOutput) { + op := &request.Operation{ + Name: opPeerVpc, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PeerVpcInput{} + } + + output = &PeerVpcOutput{} + req = c.newRequest(op, input, output) + return +} + +// PeerVpc API operation for Amazon Lightsail. +// +// Tries to peer the Lightsail VPC with the user's default VPC. +// +// 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 Lightsail's +// API operation PeerVpc for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/PeerVpc +func (c *Lightsail) PeerVpc(input *PeerVpcInput) (*PeerVpcOutput, error) { + req, out := c.PeerVpcRequest(input) + return out, req.Send() +} + +// PeerVpcWithContext is the same as PeerVpc with the addition of +// the ability to pass a context and additional request options. +// +// See PeerVpc 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 *Lightsail) PeerVpcWithContext(ctx aws.Context, input *PeerVpcInput, opts ...request.Option) (*PeerVpcOutput, error) { + req, out := c.PeerVpcRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutInstancePublicPorts = "PutInstancePublicPorts" + +// PutInstancePublicPortsRequest generates a "aws/request.Request" representing the +// client's request for the PutInstancePublicPorts 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 PutInstancePublicPorts for more information on using the PutInstancePublicPorts +// 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 PutInstancePublicPortsRequest method. +// req, resp := client.PutInstancePublicPortsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/PutInstancePublicPorts +func (c *Lightsail) PutInstancePublicPortsRequest(input *PutInstancePublicPortsInput) (req *request.Request, output *PutInstancePublicPortsOutput) { + op := &request.Operation{ + Name: opPutInstancePublicPorts, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutInstancePublicPortsInput{} + } + + output = &PutInstancePublicPortsOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutInstancePublicPorts API operation for Amazon Lightsail. +// +// Sets the specified open ports for an Amazon Lightsail instance, and closes +// all ports for every protocol not included in the current request. +// +// The put instance public ports operation supports tag-based access control +// via resource tags applied to the resource identified by instanceName. For +// more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). +// +// 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 Lightsail's +// API operation PutInstancePublicPorts for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/PutInstancePublicPorts +func (c *Lightsail) PutInstancePublicPorts(input *PutInstancePublicPortsInput) (*PutInstancePublicPortsOutput, error) { + req, out := c.PutInstancePublicPortsRequest(input) + return out, req.Send() +} + +// PutInstancePublicPortsWithContext is the same as PutInstancePublicPorts with the addition of +// the ability to pass a context and additional request options. +// +// See PutInstancePublicPorts 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 *Lightsail) PutInstancePublicPortsWithContext(ctx aws.Context, input *PutInstancePublicPortsInput, opts ...request.Option) (*PutInstancePublicPortsOutput, error) { + req, out := c.PutInstancePublicPortsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRebootInstance = "RebootInstance" + +// RebootInstanceRequest generates a "aws/request.Request" representing the +// client's request for the RebootInstance 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 RebootInstance for more information on using the RebootInstance +// 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 RebootInstanceRequest method. +// req, resp := client.RebootInstanceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/RebootInstance +func (c *Lightsail) RebootInstanceRequest(input *RebootInstanceInput) (req *request.Request, output *RebootInstanceOutput) { + op := &request.Operation{ + Name: opRebootInstance, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RebootInstanceInput{} + } + + output = &RebootInstanceOutput{} + req = c.newRequest(op, input, output) + return +} + +// RebootInstance API operation for Amazon Lightsail. +// +// Restarts a specific instance. When your Amazon Lightsail instance is finished +// rebooting, Lightsail assigns a new public IP address. To use the same IP +// address after restarting, create a static IP address and attach it to the +// instance. +// +// The reboot instance operation supports tag-based access control via resource +// tags applied to the resource identified by instanceName. For more information, +// see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). +// +// 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 Lightsail's +// API operation RebootInstance for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/RebootInstance +func (c *Lightsail) RebootInstance(input *RebootInstanceInput) (*RebootInstanceOutput, error) { + req, out := c.RebootInstanceRequest(input) + return out, req.Send() +} + +// RebootInstanceWithContext is the same as RebootInstance with the addition of +// the ability to pass a context and additional request options. +// +// See RebootInstance 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 *Lightsail) RebootInstanceWithContext(ctx aws.Context, input *RebootInstanceInput, opts ...request.Option) (*RebootInstanceOutput, error) { + req, out := c.RebootInstanceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRebootRelationalDatabase = "RebootRelationalDatabase" + +// RebootRelationalDatabaseRequest generates a "aws/request.Request" representing the +// client's request for the RebootRelationalDatabase 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 RebootRelationalDatabase for more information on using the RebootRelationalDatabase +// 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 RebootRelationalDatabaseRequest method. +// req, resp := client.RebootRelationalDatabaseRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/RebootRelationalDatabase +func (c *Lightsail) RebootRelationalDatabaseRequest(input *RebootRelationalDatabaseInput) (req *request.Request, output *RebootRelationalDatabaseOutput) { + op := &request.Operation{ + Name: opRebootRelationalDatabase, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RebootRelationalDatabaseInput{} + } + + output = &RebootRelationalDatabaseOutput{} + req = c.newRequest(op, input, output) + return +} + +// RebootRelationalDatabase API operation for Amazon Lightsail. +// +// Restarts a specific database in Amazon Lightsail. +// +// The reboot relational database operation supports tag-based access control +// via resource tags applied to the resource identified by relationalDatabaseName. +// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). +// +// 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 Lightsail's +// API operation RebootRelationalDatabase for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/RebootRelationalDatabase +func (c *Lightsail) RebootRelationalDatabase(input *RebootRelationalDatabaseInput) (*RebootRelationalDatabaseOutput, error) { + req, out := c.RebootRelationalDatabaseRequest(input) + return out, req.Send() +} + +// RebootRelationalDatabaseWithContext is the same as RebootRelationalDatabase with the addition of +// the ability to pass a context and additional request options. +// +// See RebootRelationalDatabase 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 *Lightsail) RebootRelationalDatabaseWithContext(ctx aws.Context, input *RebootRelationalDatabaseInput, opts ...request.Option) (*RebootRelationalDatabaseOutput, error) { + req, out := c.RebootRelationalDatabaseRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opReleaseStaticIp = "ReleaseStaticIp" + +// ReleaseStaticIpRequest generates a "aws/request.Request" representing the +// client's request for the ReleaseStaticIp 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 ReleaseStaticIp for more information on using the ReleaseStaticIp +// 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 ReleaseStaticIpRequest method. +// req, resp := client.ReleaseStaticIpRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/ReleaseStaticIp +func (c *Lightsail) ReleaseStaticIpRequest(input *ReleaseStaticIpInput) (req *request.Request, output *ReleaseStaticIpOutput) { + op := &request.Operation{ + Name: opReleaseStaticIp, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ReleaseStaticIpInput{} + } + + output = &ReleaseStaticIpOutput{} + req = c.newRequest(op, input, output) + return +} + +// ReleaseStaticIp API operation for Amazon Lightsail. +// +// Deletes a specific static IP from your 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 Amazon Lightsail's +// API operation ReleaseStaticIp for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/ReleaseStaticIp +func (c *Lightsail) ReleaseStaticIp(input *ReleaseStaticIpInput) (*ReleaseStaticIpOutput, error) { + req, out := c.ReleaseStaticIpRequest(input) + return out, req.Send() +} + +// ReleaseStaticIpWithContext is the same as ReleaseStaticIp with the addition of +// the ability to pass a context and additional request options. +// +// See ReleaseStaticIp 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 *Lightsail) ReleaseStaticIpWithContext(ctx aws.Context, input *ReleaseStaticIpInput, opts ...request.Option) (*ReleaseStaticIpOutput, error) { + req, out := c.ReleaseStaticIpRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStartInstance = "StartInstance" + +// StartInstanceRequest generates a "aws/request.Request" representing the +// client's request for the StartInstance 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 StartInstance for more information on using the StartInstance +// 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 StartInstanceRequest method. +// req, resp := client.StartInstanceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StartInstance +func (c *Lightsail) StartInstanceRequest(input *StartInstanceInput) (req *request.Request, output *StartInstanceOutput) { + op := &request.Operation{ + Name: opStartInstance, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartInstanceInput{} + } + + output = &StartInstanceOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartInstance API operation for Amazon Lightsail. +// +// Starts a specific Amazon Lightsail instance from a stopped state. To restart +// an instance, use the reboot instance operation. +// +// The start instance operation supports tag-based access control via resource +// tags applied to the resource identified by instanceName. For more information, +// see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). +// +// 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 Lightsail's +// API operation StartInstance for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StartInstance +func (c *Lightsail) StartInstance(input *StartInstanceInput) (*StartInstanceOutput, error) { + req, out := c.StartInstanceRequest(input) + return out, req.Send() +} + +// StartInstanceWithContext is the same as StartInstance with the addition of +// the ability to pass a context and additional request options. +// +// See StartInstance 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 *Lightsail) StartInstanceWithContext(ctx aws.Context, input *StartInstanceInput, opts ...request.Option) (*StartInstanceOutput, error) { + req, out := c.StartInstanceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStartRelationalDatabase = "StartRelationalDatabase" + +// StartRelationalDatabaseRequest generates a "aws/request.Request" representing the +// client's request for the StartRelationalDatabase 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 StartRelationalDatabase for more information on using the StartRelationalDatabase +// 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 StartRelationalDatabaseRequest method. +// req, resp := client.StartRelationalDatabaseRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StartRelationalDatabase +func (c *Lightsail) StartRelationalDatabaseRequest(input *StartRelationalDatabaseInput) (req *request.Request, output *StartRelationalDatabaseOutput) { + op := &request.Operation{ + Name: opStartRelationalDatabase, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartRelationalDatabaseInput{} + } + + output = &StartRelationalDatabaseOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartRelationalDatabase API operation for Amazon Lightsail. +// +// Starts a specific database from a stopped state in Amazon Lightsail. To restart +// a database, use the reboot relational database operation. +// +// The start relational database operation supports tag-based access control +// via resource tags applied to the resource identified by relationalDatabaseName. +// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). +// +// 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 Lightsail's +// API operation StartRelationalDatabase for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StartRelationalDatabase +func (c *Lightsail) StartRelationalDatabase(input *StartRelationalDatabaseInput) (*StartRelationalDatabaseOutput, error) { + req, out := c.StartRelationalDatabaseRequest(input) + return out, req.Send() +} + +// StartRelationalDatabaseWithContext is the same as StartRelationalDatabase with the addition of +// the ability to pass a context and additional request options. +// +// See StartRelationalDatabase 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 *Lightsail) StartRelationalDatabaseWithContext(ctx aws.Context, input *StartRelationalDatabaseInput, opts ...request.Option) (*StartRelationalDatabaseOutput, error) { + req, out := c.StartRelationalDatabaseRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStopInstance = "StopInstance" + +// StopInstanceRequest generates a "aws/request.Request" representing the +// client's request for the StopInstance 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 StopInstance for more information on using the StopInstance +// 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 StopInstanceRequest method. +// req, resp := client.StopInstanceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StopInstance +func (c *Lightsail) StopInstanceRequest(input *StopInstanceInput) (req *request.Request, output *StopInstanceOutput) { + op := &request.Operation{ + Name: opStopInstance, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StopInstanceInput{} + } + + output = &StopInstanceOutput{} + req = c.newRequest(op, input, output) + return +} + +// StopInstance API operation for Amazon Lightsail. +// +// Stops a specific Amazon Lightsail instance that is currently running. +// +// The stop instance operation supports tag-based access control via resource +// tags applied to the resource identified by instanceName. For more information, +// see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). +// +// 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 Lightsail's +// API operation StopInstance for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StopInstance +func (c *Lightsail) StopInstance(input *StopInstanceInput) (*StopInstanceOutput, error) { + req, out := c.StopInstanceRequest(input) + return out, req.Send() +} + +// StopInstanceWithContext is the same as StopInstance with the addition of +// the ability to pass a context and additional request options. +// +// See StopInstance 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 *Lightsail) StopInstanceWithContext(ctx aws.Context, input *StopInstanceInput, opts ...request.Option) (*StopInstanceOutput, error) { + req, out := c.StopInstanceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStopRelationalDatabase = "StopRelationalDatabase" + +// StopRelationalDatabaseRequest generates a "aws/request.Request" representing the +// client's request for the StopRelationalDatabase 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 StopRelationalDatabase for more information on using the StopRelationalDatabase +// 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 StopRelationalDatabaseRequest method. +// req, resp := client.StopRelationalDatabaseRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StopRelationalDatabase +func (c *Lightsail) StopRelationalDatabaseRequest(input *StopRelationalDatabaseInput) (req *request.Request, output *StopRelationalDatabaseOutput) { + op := &request.Operation{ + Name: opStopRelationalDatabase, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StopRelationalDatabaseInput{} + } + + output = &StopRelationalDatabaseOutput{} + req = c.newRequest(op, input, output) + return +} + +// StopRelationalDatabase API operation for Amazon Lightsail. +// +// Stops a specific database that is currently running in Amazon Lightsail. +// +// The stop relational database operation supports tag-based access control +// via resource tags applied to the resource identified by relationalDatabaseName. +// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). +// +// 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 Lightsail's +// API operation StopRelationalDatabase for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/StopRelationalDatabase +func (c *Lightsail) StopRelationalDatabase(input *StopRelationalDatabaseInput) (*StopRelationalDatabaseOutput, error) { + req, out := c.StopRelationalDatabaseRequest(input) + return out, req.Send() +} + +// StopRelationalDatabaseWithContext is the same as StopRelationalDatabase with the addition of +// the ability to pass a context and additional request options. +// +// See StopRelationalDatabase 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 *Lightsail) StopRelationalDatabaseWithContext(ctx aws.Context, input *StopRelationalDatabaseInput, opts ...request.Option) (*StopRelationalDatabaseOutput, error) { + req, out := c.StopRelationalDatabaseRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTagResource = "TagResource" + +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return +// 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 TagResource for more information on using the TagResource +// 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 TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/TagResource +func (c *Lightsail) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// TagResource API operation for Amazon Lightsail. +// +// Adds one or more tags to the specified Amazon Lightsail resource. Each resource +// can have a maximum of 50 tags. Each tag consists of a key and an optional +// value. Tag keys must be unique per resource. For more information about tags, +// see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-tags). +// +// The tag resource operation supports tag-based access control via request +// tags and resource tags applied to the resource identified by resourceName. +// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). +// +// 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 Lightsail's +// API operation TagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/TagResource +func (c *Lightsail) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + return out, req.Send() +} + +// TagResourceWithContext is the same as TagResource with the addition of +// the ability to pass a context and additional request options. +// +// See TagResource 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 *Lightsail) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUnpeerVpc = "UnpeerVpc" + +// UnpeerVpcRequest generates a "aws/request.Request" representing the +// client's request for the UnpeerVpc 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 UnpeerVpc for more information on using the UnpeerVpc +// 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 UnpeerVpcRequest method. +// req, resp := client.UnpeerVpcRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UnpeerVpc +func (c *Lightsail) UnpeerVpcRequest(input *UnpeerVpcInput) (req *request.Request, output *UnpeerVpcOutput) { + op := &request.Operation{ + Name: opUnpeerVpc, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UnpeerVpcInput{} + } + + output = &UnpeerVpcOutput{} + req = c.newRequest(op, input, output) + return +} + +// UnpeerVpc API operation for Amazon Lightsail. +// +// Attempts to unpeer the Lightsail VPC from the user's default VPC. +// +// 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 Lightsail's +// API operation UnpeerVpc for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UnpeerVpc +func (c *Lightsail) UnpeerVpc(input *UnpeerVpcInput) (*UnpeerVpcOutput, error) { + req, out := c.UnpeerVpcRequest(input) + return out, req.Send() +} + +// UnpeerVpcWithContext is the same as UnpeerVpc with the addition of +// the ability to pass a context and additional request options. +// +// See UnpeerVpc 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 *Lightsail) UnpeerVpcWithContext(ctx aws.Context, input *UnpeerVpcInput, opts ...request.Option) (*UnpeerVpcOutput, error) { + req, out := c.UnpeerVpcRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagResource = "UntagResource" + +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource 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 UntagResource for more information on using the UntagResource +// 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 UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UntagResource +func (c *Lightsail) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// UntagResource API operation for Amazon Lightsail. +// +// Deletes the specified set of tag keys and their values from the specified +// Amazon Lightsail resource. +// +// The untag resource operation supports tag-based access control via request +// tags and resource tags applied to the resource identified by resourceName. +// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). +// +// 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 Lightsail's +// API operation UntagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UntagResource +func (c *Lightsail) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + return out, req.Send() +} + +// UntagResourceWithContext is the same as UntagResource with the addition of +// the ability to pass a context and additional request options. +// +// See UntagResource 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 *Lightsail) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateDomainEntry = "UpdateDomainEntry" + +// UpdateDomainEntryRequest generates a "aws/request.Request" representing the +// client's request for the UpdateDomainEntry 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 UpdateDomainEntry for more information on using the UpdateDomainEntry +// 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 UpdateDomainEntryRequest method. +// req, resp := client.UpdateDomainEntryRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateDomainEntry +func (c *Lightsail) UpdateDomainEntryRequest(input *UpdateDomainEntryInput) (req *request.Request, output *UpdateDomainEntryOutput) { + op := &request.Operation{ + Name: opUpdateDomainEntry, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateDomainEntryInput{} + } + + output = &UpdateDomainEntryOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateDomainEntry API operation for Amazon Lightsail. +// +// Updates a domain recordset after it is created. +// +// The update domain entry operation supports tag-based access control via resource +// tags applied to the resource identified by domainName. For more information, +// see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). +// +// 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 Lightsail's +// API operation UpdateDomainEntry for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateDomainEntry +func (c *Lightsail) UpdateDomainEntry(input *UpdateDomainEntryInput) (*UpdateDomainEntryOutput, error) { + req, out := c.UpdateDomainEntryRequest(input) + return out, req.Send() +} + +// UpdateDomainEntryWithContext is the same as UpdateDomainEntry with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateDomainEntry 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 *Lightsail) UpdateDomainEntryWithContext(ctx aws.Context, input *UpdateDomainEntryInput, opts ...request.Option) (*UpdateDomainEntryOutput, error) { + req, out := c.UpdateDomainEntryRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateLoadBalancerAttribute = "UpdateLoadBalancerAttribute" + +// UpdateLoadBalancerAttributeRequest generates a "aws/request.Request" representing the +// client's request for the UpdateLoadBalancerAttribute 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 UpdateLoadBalancerAttribute for more information on using the UpdateLoadBalancerAttribute +// 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 UpdateLoadBalancerAttributeRequest method. +// req, resp := client.UpdateLoadBalancerAttributeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateLoadBalancerAttribute +func (c *Lightsail) UpdateLoadBalancerAttributeRequest(input *UpdateLoadBalancerAttributeInput) (req *request.Request, output *UpdateLoadBalancerAttributeOutput) { + op := &request.Operation{ + Name: opUpdateLoadBalancerAttribute, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateLoadBalancerAttributeInput{} + } + + output = &UpdateLoadBalancerAttributeOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateLoadBalancerAttribute API operation for Amazon Lightsail. +// +// Updates the specified attribute for a load balancer. You can only update +// one attribute at a time. +// +// The update load balancer attribute operation supports tag-based access control +// via resource tags applied to the resource identified by loadBalancerName. +// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). +// +// 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 Lightsail's +// API operation UpdateLoadBalancerAttribute for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateLoadBalancerAttribute +func (c *Lightsail) UpdateLoadBalancerAttribute(input *UpdateLoadBalancerAttributeInput) (*UpdateLoadBalancerAttributeOutput, error) { + req, out := c.UpdateLoadBalancerAttributeRequest(input) + return out, req.Send() +} + +// UpdateLoadBalancerAttributeWithContext is the same as UpdateLoadBalancerAttribute with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateLoadBalancerAttribute 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 *Lightsail) UpdateLoadBalancerAttributeWithContext(ctx aws.Context, input *UpdateLoadBalancerAttributeInput, opts ...request.Option) (*UpdateLoadBalancerAttributeOutput, error) { + req, out := c.UpdateLoadBalancerAttributeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateRelationalDatabase = "UpdateRelationalDatabase" + +// UpdateRelationalDatabaseRequest generates a "aws/request.Request" representing the +// client's request for the UpdateRelationalDatabase 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 UpdateRelationalDatabase for more information on using the UpdateRelationalDatabase +// 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 UpdateRelationalDatabaseRequest method. +// req, resp := client.UpdateRelationalDatabaseRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateRelationalDatabase +func (c *Lightsail) UpdateRelationalDatabaseRequest(input *UpdateRelationalDatabaseInput) (req *request.Request, output *UpdateRelationalDatabaseOutput) { + op := &request.Operation{ + Name: opUpdateRelationalDatabase, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateRelationalDatabaseInput{} + } + + output = &UpdateRelationalDatabaseOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateRelationalDatabase API operation for Amazon Lightsail. +// +// Allows the update of one or more attributes of a database in Amazon Lightsail. +// +// Updates are applied immediately, or in cases where the updates could result +// in an outage, are applied during the database's predefined maintenance window. +// +// The update relational database operation supports tag-based access control +// via resource tags applied to the resource identified by relationalDatabaseName. +// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). +// +// 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 Lightsail's +// API operation UpdateRelationalDatabase for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateRelationalDatabase +func (c *Lightsail) UpdateRelationalDatabase(input *UpdateRelationalDatabaseInput) (*UpdateRelationalDatabaseOutput, error) { + req, out := c.UpdateRelationalDatabaseRequest(input) + return out, req.Send() +} + +// UpdateRelationalDatabaseWithContext is the same as UpdateRelationalDatabase with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateRelationalDatabase 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 *Lightsail) UpdateRelationalDatabaseWithContext(ctx aws.Context, input *UpdateRelationalDatabaseInput, opts ...request.Option) (*UpdateRelationalDatabaseOutput, error) { + req, out := c.UpdateRelationalDatabaseRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateRelationalDatabaseParameters = "UpdateRelationalDatabaseParameters" + +// UpdateRelationalDatabaseParametersRequest generates a "aws/request.Request" representing the +// client's request for the UpdateRelationalDatabaseParameters 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 UpdateRelationalDatabaseParameters for more information on using the UpdateRelationalDatabaseParameters +// 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 UpdateRelationalDatabaseParametersRequest method. +// req, resp := client.UpdateRelationalDatabaseParametersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateRelationalDatabaseParameters +func (c *Lightsail) UpdateRelationalDatabaseParametersRequest(input *UpdateRelationalDatabaseParametersInput) (req *request.Request, output *UpdateRelationalDatabaseParametersOutput) { + op := &request.Operation{ + Name: opUpdateRelationalDatabaseParameters, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateRelationalDatabaseParametersInput{} + } + + output = &UpdateRelationalDatabaseParametersOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateRelationalDatabaseParameters API operation for Amazon Lightsail. +// +// Allows the update of one or more parameters of a database in Amazon Lightsail. +// +// Parameter updates don't cause outages; therefore, their application is not +// subject to the preferred maintenance window. However, there are two ways +// in which paramater updates are applied: dynamic or pending-reboot. Parameters +// marked with a dynamic apply type are applied immediately. Parameters marked +// with a pending-reboot apply type are applied only after the database is rebooted +// using the reboot relational database operation. +// +// The update relational database parameters operation supports tag-based access +// control via resource tags applied to the resource identified by relationalDatabaseName. +// For more information, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-controlling-access-using-tags). +// +// 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 Lightsail's +// API operation UpdateRelationalDatabaseParameters for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceException "ServiceException" +// A general service exception. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// Lightsail throws this exception when user input does not conform to the validation +// rules of an input field. +// +// Domain-related APIs are only available in the N. Virginia (us-east-1) Region. +// Please set your AWS Region configuration to us-east-1 to create, view, or +// edit these resources. +// +// * ErrCodeNotFoundException "NotFoundException" +// Lightsail throws this exception when it cannot find a resource. +// +// * ErrCodeOperationFailureException "OperationFailureException" +// Lightsail throws this exception when an operation fails to execute. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// Lightsail throws this exception when the user cannot be authenticated or +// uses invalid credentials to access a resource. +// +// * ErrCodeAccountSetupInProgressException "AccountSetupInProgressException" +// Lightsail throws this exception when an account is still in the setup in +// progress state. +// +// * ErrCodeUnauthenticatedException "UnauthenticatedException" +// Lightsail throws this exception when the user has not been authenticated. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/UpdateRelationalDatabaseParameters +func (c *Lightsail) UpdateRelationalDatabaseParameters(input *UpdateRelationalDatabaseParametersInput) (*UpdateRelationalDatabaseParametersOutput, error) { + req, out := c.UpdateRelationalDatabaseParametersRequest(input) + return out, req.Send() +} + +// UpdateRelationalDatabaseParametersWithContext is the same as UpdateRelationalDatabaseParameters with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateRelationalDatabaseParameters 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 *Lightsail) UpdateRelationalDatabaseParametersWithContext(ctx aws.Context, input *UpdateRelationalDatabaseParametersInput, opts ...request.Option) (*UpdateRelationalDatabaseParametersOutput, error) { + req, out := c.UpdateRelationalDatabaseParametersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +type AllocateStaticIpInput struct { + _ struct{} `type:"structure"` + + // The name of the static IP address. + // + // StaticIpName is a required field + StaticIpName *string `locationName:"staticIpName" type:"string" required:"true"` +} + +// String returns the string representation +func (s AllocateStaticIpInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AllocateStaticIpInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AllocateStaticIpInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AllocateStaticIpInput"} + if s.StaticIpName == nil { + invalidParams.Add(request.NewErrParamRequired("StaticIpName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetStaticIpName sets the StaticIpName field's value. +func (s *AllocateStaticIpInput) SetStaticIpName(v string) *AllocateStaticIpInput { + s.StaticIpName = &v + return s +} + +type AllocateStaticIpOutput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs containing information about the static IP address + // you allocated. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s AllocateStaticIpOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AllocateStaticIpOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *AllocateStaticIpOutput) SetOperations(v []*Operation) *AllocateStaticIpOutput { + s.Operations = v + return s +} + +type AttachDiskInput struct { + _ struct{} `type:"structure"` + + // The unique Lightsail disk name (e.g., my-disk). + // + // DiskName is a required field + DiskName *string `locationName:"diskName" type:"string" required:"true"` + + // The disk path to expose to the instance (e.g., /dev/xvdf). + // + // DiskPath is a required field + DiskPath *string `locationName:"diskPath" type:"string" required:"true"` + + // The name of the Lightsail instance where you want to utilize the storage + // disk. + // + // InstanceName is a required field + InstanceName *string `locationName:"instanceName" type:"string" required:"true"` +} + +// String returns the string representation +func (s AttachDiskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachDiskInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AttachDiskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AttachDiskInput"} + if s.DiskName == nil { + invalidParams.Add(request.NewErrParamRequired("DiskName")) + } + if s.DiskPath == nil { + invalidParams.Add(request.NewErrParamRequired("DiskPath")) + } + if s.InstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDiskName sets the DiskName field's value. +func (s *AttachDiskInput) SetDiskName(v string) *AttachDiskInput { + s.DiskName = &v + return s +} + +// SetDiskPath sets the DiskPath field's value. +func (s *AttachDiskInput) SetDiskPath(v string) *AttachDiskInput { + s.DiskPath = &v + return s +} + +// SetInstanceName sets the InstanceName field's value. +func (s *AttachDiskInput) SetInstanceName(v string) *AttachDiskInput { + s.InstanceName = &v + return s +} + +type AttachDiskOutput struct { + _ struct{} `type:"structure"` + + // An object describing the API operations. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s AttachDiskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachDiskOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *AttachDiskOutput) SetOperations(v []*Operation) *AttachDiskOutput { + s.Operations = v + return s +} + +type AttachInstancesToLoadBalancerInput struct { + _ struct{} `type:"structure"` + + // An array of strings representing the instance name(s) you want to attach + // to your load balancer. + // + // An instance must be running before you can attach it to your load balancer. + // + // There are no additional limits on the number of instances you can attach + // to your load balancer, aside from the limit of Lightsail instances you can + // create in your account (20). + // + // InstanceNames is a required field + InstanceNames []*string `locationName:"instanceNames" type:"list" required:"true"` + + // The name of the load balancer. + // + // LoadBalancerName is a required field + LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` +} + +// String returns the string representation +func (s AttachInstancesToLoadBalancerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachInstancesToLoadBalancerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AttachInstancesToLoadBalancerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AttachInstancesToLoadBalancerInput"} + if s.InstanceNames == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceNames")) + } + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInstanceNames sets the InstanceNames field's value. +func (s *AttachInstancesToLoadBalancerInput) SetInstanceNames(v []*string) *AttachInstancesToLoadBalancerInput { + s.InstanceNames = v + return s +} + +// SetLoadBalancerName sets the LoadBalancerName field's value. +func (s *AttachInstancesToLoadBalancerInput) SetLoadBalancerName(v string) *AttachInstancesToLoadBalancerInput { + s.LoadBalancerName = &v + return s +} + +type AttachInstancesToLoadBalancerOutput struct { + _ struct{} `type:"structure"` + + // An object representing the API operations. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s AttachInstancesToLoadBalancerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachInstancesToLoadBalancerOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *AttachInstancesToLoadBalancerOutput) SetOperations(v []*Operation) *AttachInstancesToLoadBalancerOutput { + s.Operations = v + return s +} + +type AttachLoadBalancerTlsCertificateInput struct { + _ struct{} `type:"structure"` + + // The name of your SSL/TLS certificate. + // + // CertificateName is a required field + CertificateName *string `locationName:"certificateName" type:"string" required:"true"` + + // The name of the load balancer to which you want to associate the SSL/TLS + // certificate. + // + // LoadBalancerName is a required field + LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` +} + +// String returns the string representation +func (s AttachLoadBalancerTlsCertificateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachLoadBalancerTlsCertificateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AttachLoadBalancerTlsCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AttachLoadBalancerTlsCertificateInput"} + if s.CertificateName == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateName")) + } + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateName sets the CertificateName field's value. +func (s *AttachLoadBalancerTlsCertificateInput) SetCertificateName(v string) *AttachLoadBalancerTlsCertificateInput { + s.CertificateName = &v + return s +} + +// SetLoadBalancerName sets the LoadBalancerName field's value. +func (s *AttachLoadBalancerTlsCertificateInput) SetLoadBalancerName(v string) *AttachLoadBalancerTlsCertificateInput { + s.LoadBalancerName = &v + return s +} + +type AttachLoadBalancerTlsCertificateOutput struct { + _ struct{} `type:"structure"` + + // An object representing the API operations. + // + // These SSL/TLS certificates are only usable by Lightsail load balancers. You + // can't get the certificate and use it for another purpose. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s AttachLoadBalancerTlsCertificateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachLoadBalancerTlsCertificateOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *AttachLoadBalancerTlsCertificateOutput) SetOperations(v []*Operation) *AttachLoadBalancerTlsCertificateOutput { + s.Operations = v + return s +} + +type AttachStaticIpInput struct { + _ struct{} `type:"structure"` + + // The instance name to which you want to attach the static IP address. + // + // InstanceName is a required field + InstanceName *string `locationName:"instanceName" type:"string" required:"true"` + + // The name of the static IP. + // + // StaticIpName is a required field + StaticIpName *string `locationName:"staticIpName" type:"string" required:"true"` +} + +// String returns the string representation +func (s AttachStaticIpInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachStaticIpInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AttachStaticIpInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AttachStaticIpInput"} + if s.InstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceName")) + } + if s.StaticIpName == nil { invalidParams.Add(request.NewErrParamRequired("StaticIpName")) } @@ -7526,77 +11120,2993 @@ func (s *AllocateStaticIpInput) Validate() error { return nil } -// SetStaticIpName sets the StaticIpName field's value. -func (s *AllocateStaticIpInput) SetStaticIpName(v string) *AllocateStaticIpInput { - s.StaticIpName = &v +// SetInstanceName sets the InstanceName field's value. +func (s *AttachStaticIpInput) SetInstanceName(v string) *AttachStaticIpInput { + s.InstanceName = &v + return s +} + +// SetStaticIpName sets the StaticIpName field's value. +func (s *AttachStaticIpInput) SetStaticIpName(v string) *AttachStaticIpInput { + s.StaticIpName = &v + return s +} + +type AttachStaticIpOutput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs containing information about your API operations. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s AttachStaticIpOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachStaticIpOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *AttachStaticIpOutput) SetOperations(v []*Operation) *AttachStaticIpOutput { + s.Operations = v + return s +} + +// Describes an Availability Zone. +type AvailabilityZone struct { + _ struct{} `type:"structure"` + + // The state of the Availability Zone. + State *string `locationName:"state" type:"string"` + + // The name of the Availability Zone. The format is us-east-2a (case-sensitive). + ZoneName *string `locationName:"zoneName" type:"string"` +} + +// String returns the string representation +func (s AvailabilityZone) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AvailabilityZone) GoString() string { + return s.String() +} + +// SetState sets the State field's value. +func (s *AvailabilityZone) SetState(v string) *AvailabilityZone { + s.State = &v + return s +} + +// SetZoneName sets the ZoneName field's value. +func (s *AvailabilityZone) SetZoneName(v string) *AvailabilityZone { + s.ZoneName = &v + return s +} + +// Describes a blueprint (a virtual private server image). +type Blueprint struct { + _ struct{} `type:"structure"` + + // The ID for the virtual private server image (e.g., app_wordpress_4_4 or app_lamp_7_0). + BlueprintId *string `locationName:"blueprintId" type:"string"` + + // The description of the blueprint. + Description *string `locationName:"description" type:"string"` + + // The group name of the blueprint (e.g., amazon-linux). + Group *string `locationName:"group" type:"string"` + + // A Boolean value indicating whether the blueprint is active. Inactive blueprints + // are listed to support customers with existing instances but are not necessarily + // available for launch of new instances. Blueprints are marked inactive when + // they become outdated due to operating system updates or new application releases. + IsActive *bool `locationName:"isActive" type:"boolean"` + + // The end-user license agreement URL for the image or blueprint. + LicenseUrl *string `locationName:"licenseUrl" type:"string"` + + // The minimum bundle power required to run this blueprint. For example, you + // need a bundle with a power value of 500 or more to create an instance that + // uses a blueprint with a minimum power value of 500. 0 indicates that the + // blueprint runs on all instance sizes. + MinPower *int64 `locationName:"minPower" type:"integer"` + + // The friendly name of the blueprint (e.g., Amazon Linux). + Name *string `locationName:"name" type:"string"` + + // The operating system platform (either Linux/Unix-based or Windows Server-based) + // of the blueprint. + Platform *string `locationName:"platform" type:"string" enum:"InstancePlatform"` + + // The product URL to learn more about the image or blueprint. + ProductUrl *string `locationName:"productUrl" type:"string"` + + // The type of the blueprint (e.g., os or app). + Type *string `locationName:"type" type:"string" enum:"BlueprintType"` + + // The version number of the operating system, application, or stack (e.g., + // 2016.03.0). + Version *string `locationName:"version" type:"string"` + + // The version code. + VersionCode *string `locationName:"versionCode" type:"string"` +} + +// String returns the string representation +func (s Blueprint) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Blueprint) GoString() string { + return s.String() +} + +// SetBlueprintId sets the BlueprintId field's value. +func (s *Blueprint) SetBlueprintId(v string) *Blueprint { + s.BlueprintId = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *Blueprint) SetDescription(v string) *Blueprint { + s.Description = &v + return s +} + +// SetGroup sets the Group field's value. +func (s *Blueprint) SetGroup(v string) *Blueprint { + s.Group = &v + return s +} + +// SetIsActive sets the IsActive field's value. +func (s *Blueprint) SetIsActive(v bool) *Blueprint { + s.IsActive = &v + return s +} + +// SetLicenseUrl sets the LicenseUrl field's value. +func (s *Blueprint) SetLicenseUrl(v string) *Blueprint { + s.LicenseUrl = &v + return s +} + +// SetMinPower sets the MinPower field's value. +func (s *Blueprint) SetMinPower(v int64) *Blueprint { + s.MinPower = &v + return s +} + +// SetName sets the Name field's value. +func (s *Blueprint) SetName(v string) *Blueprint { + s.Name = &v + return s +} + +// SetPlatform sets the Platform field's value. +func (s *Blueprint) SetPlatform(v string) *Blueprint { + s.Platform = &v + return s +} + +// SetProductUrl sets the ProductUrl field's value. +func (s *Blueprint) SetProductUrl(v string) *Blueprint { + s.ProductUrl = &v + return s +} + +// SetType sets the Type field's value. +func (s *Blueprint) SetType(v string) *Blueprint { + s.Type = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *Blueprint) SetVersion(v string) *Blueprint { + s.Version = &v + return s +} + +// SetVersionCode sets the VersionCode field's value. +func (s *Blueprint) SetVersionCode(v string) *Blueprint { + s.VersionCode = &v + return s +} + +// Describes a bundle, which is a set of specs describing your virtual private +// server (or instance). +type Bundle struct { + _ struct{} `type:"structure"` + + // The bundle ID (e.g., micro_1_0). + BundleId *string `locationName:"bundleId" type:"string"` + + // The number of vCPUs included in the bundle (e.g., 2). + CpuCount *int64 `locationName:"cpuCount" type:"integer"` + + // The size of the SSD (e.g., 30). + DiskSizeInGb *int64 `locationName:"diskSizeInGb" type:"integer"` + + // The Amazon EC2 instance type (e.g., t2.micro). + InstanceType *string `locationName:"instanceType" type:"string"` + + // A Boolean value indicating whether the bundle is active. + IsActive *bool `locationName:"isActive" type:"boolean"` + + // A friendly name for the bundle (e.g., Micro). + Name *string `locationName:"name" type:"string"` + + // A numeric value that represents the power of the bundle (e.g., 500). You + // can use the bundle's power value in conjunction with a blueprint's minimum + // power value to determine whether the blueprint will run on the bundle. For + // example, you need a bundle with a power value of 500 or more to create an + // instance that uses a blueprint with a minimum power value of 500. + Power *int64 `locationName:"power" type:"integer"` + + // The price in US dollars (e.g., 5.0). + Price *float64 `locationName:"price" type:"float"` + + // The amount of RAM in GB (e.g., 2.0). + RamSizeInGb *float64 `locationName:"ramSizeInGb" type:"float"` + + // The operating system platform (Linux/Unix-based or Windows Server-based) + // that the bundle supports. You can only launch a WINDOWS bundle on a blueprint + // that supports the WINDOWS platform. LINUX_UNIX blueprints require a LINUX_UNIX + // bundle. + SupportedPlatforms []*string `locationName:"supportedPlatforms" type:"list"` + + // The data transfer rate per month in GB (e.g., 2000). + TransferPerMonthInGb *int64 `locationName:"transferPerMonthInGb" type:"integer"` +} + +// String returns the string representation +func (s Bundle) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Bundle) GoString() string { + return s.String() +} + +// SetBundleId sets the BundleId field's value. +func (s *Bundle) SetBundleId(v string) *Bundle { + s.BundleId = &v + return s +} + +// SetCpuCount sets the CpuCount field's value. +func (s *Bundle) SetCpuCount(v int64) *Bundle { + s.CpuCount = &v + return s +} + +// SetDiskSizeInGb sets the DiskSizeInGb field's value. +func (s *Bundle) SetDiskSizeInGb(v int64) *Bundle { + s.DiskSizeInGb = &v + return s +} + +// SetInstanceType sets the InstanceType field's value. +func (s *Bundle) SetInstanceType(v string) *Bundle { + s.InstanceType = &v + return s +} + +// SetIsActive sets the IsActive field's value. +func (s *Bundle) SetIsActive(v bool) *Bundle { + s.IsActive = &v + return s +} + +// SetName sets the Name field's value. +func (s *Bundle) SetName(v string) *Bundle { + s.Name = &v + return s +} + +// SetPower sets the Power field's value. +func (s *Bundle) SetPower(v int64) *Bundle { + s.Power = &v + return s +} + +// SetPrice sets the Price field's value. +func (s *Bundle) SetPrice(v float64) *Bundle { + s.Price = &v + return s +} + +// SetRamSizeInGb sets the RamSizeInGb field's value. +func (s *Bundle) SetRamSizeInGb(v float64) *Bundle { + s.RamSizeInGb = &v + return s +} + +// SetSupportedPlatforms sets the SupportedPlatforms field's value. +func (s *Bundle) SetSupportedPlatforms(v []*string) *Bundle { + s.SupportedPlatforms = v + return s +} + +// SetTransferPerMonthInGb sets the TransferPerMonthInGb field's value. +func (s *Bundle) SetTransferPerMonthInGb(v int64) *Bundle { + s.TransferPerMonthInGb = &v + return s +} + +type CloseInstancePublicPortsInput struct { + _ struct{} `type:"structure"` + + // The name of the instance on which you're attempting to close the public ports. + // + // InstanceName is a required field + InstanceName *string `locationName:"instanceName" type:"string" required:"true"` + + // Information about the public port you are trying to close. + // + // PortInfo is a required field + PortInfo *PortInfo `locationName:"portInfo" type:"structure" required:"true"` +} + +// String returns the string representation +func (s CloseInstancePublicPortsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CloseInstancePublicPortsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CloseInstancePublicPortsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CloseInstancePublicPortsInput"} + if s.InstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceName")) + } + if s.PortInfo == nil { + invalidParams.Add(request.NewErrParamRequired("PortInfo")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInstanceName sets the InstanceName field's value. +func (s *CloseInstancePublicPortsInput) SetInstanceName(v string) *CloseInstancePublicPortsInput { + s.InstanceName = &v + return s +} + +// SetPortInfo sets the PortInfo field's value. +func (s *CloseInstancePublicPortsInput) SetPortInfo(v *PortInfo) *CloseInstancePublicPortsInput { + s.PortInfo = v + return s +} + +type CloseInstancePublicPortsOutput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs that contains information about the operation. + Operation *Operation `locationName:"operation" type:"structure"` +} + +// String returns the string representation +func (s CloseInstancePublicPortsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CloseInstancePublicPortsOutput) GoString() string { + return s.String() +} + +// SetOperation sets the Operation field's value. +func (s *CloseInstancePublicPortsOutput) SetOperation(v *Operation) *CloseInstancePublicPortsOutput { + s.Operation = v + return s +} + +// Describes a CloudFormation stack record created as a result of the create +// cloud formation stack operation. +// +// A CloudFormation stack record provides information about the AWS CloudFormation +// stack used to create a new Amazon Elastic Compute Cloud instance from an +// exported Lightsail instance snapshot. +type CloudFormationStackRecord struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the CloudFormation stack record. + Arn *string `locationName:"arn" type:"string"` + + // The date when the CloudFormation stack record was created. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` + + // A list of objects describing the destination service, which is AWS CloudFormation, + // and the Amazon Resource Name (ARN) of the AWS CloudFormation stack. + DestinationInfo *DestinationInfo `locationName:"destinationInfo" type:"structure"` + + // A list of objects describing the Availability Zone and AWS Region of the + // CloudFormation stack record. + Location *ResourceLocation `locationName:"location" type:"structure"` + + // The name of the CloudFormation stack record. It starts with CloudFormationStackRecord + // followed by a GUID. + Name *string `locationName:"name" type:"string"` + + // The Lightsail resource type (e.g., CloudFormationStackRecord). + ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` + + // A list of objects describing the source of the CloudFormation stack record. + SourceInfo []*CloudFormationStackRecordSourceInfo `locationName:"sourceInfo" type:"list"` + + // The current state of the CloudFormation stack record. + State *string `locationName:"state" type:"string" enum:"RecordState"` +} + +// String returns the string representation +func (s CloudFormationStackRecord) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CloudFormationStackRecord) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *CloudFormationStackRecord) SetArn(v string) *CloudFormationStackRecord { + s.Arn = &v + return s +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *CloudFormationStackRecord) SetCreatedAt(v time.Time) *CloudFormationStackRecord { + s.CreatedAt = &v + return s +} + +// SetDestinationInfo sets the DestinationInfo field's value. +func (s *CloudFormationStackRecord) SetDestinationInfo(v *DestinationInfo) *CloudFormationStackRecord { + s.DestinationInfo = v + return s +} + +// SetLocation sets the Location field's value. +func (s *CloudFormationStackRecord) SetLocation(v *ResourceLocation) *CloudFormationStackRecord { + s.Location = v + return s +} + +// SetName sets the Name field's value. +func (s *CloudFormationStackRecord) SetName(v string) *CloudFormationStackRecord { + s.Name = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *CloudFormationStackRecord) SetResourceType(v string) *CloudFormationStackRecord { + s.ResourceType = &v + return s +} + +// SetSourceInfo sets the SourceInfo field's value. +func (s *CloudFormationStackRecord) SetSourceInfo(v []*CloudFormationStackRecordSourceInfo) *CloudFormationStackRecord { + s.SourceInfo = v + return s +} + +// SetState sets the State field's value. +func (s *CloudFormationStackRecord) SetState(v string) *CloudFormationStackRecord { + s.State = &v + return s +} + +// Describes the source of a CloudFormation stack record (i.e., the export snapshot +// record). +type CloudFormationStackRecordSourceInfo struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the export snapshot record. + Arn *string `locationName:"arn" type:"string"` + + // The name of the record. + Name *string `locationName:"name" type:"string"` + + // The Lightsail resource type (e.g., ExportSnapshotRecord). + ResourceType *string `locationName:"resourceType" type:"string" enum:"CloudFormationStackRecordSourceType"` +} + +// String returns the string representation +func (s CloudFormationStackRecordSourceInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CloudFormationStackRecordSourceInfo) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *CloudFormationStackRecordSourceInfo) SetArn(v string) *CloudFormationStackRecordSourceInfo { + s.Arn = &v + return s +} + +// SetName sets the Name field's value. +func (s *CloudFormationStackRecordSourceInfo) SetName(v string) *CloudFormationStackRecordSourceInfo { + s.Name = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *CloudFormationStackRecordSourceInfo) SetResourceType(v string) *CloudFormationStackRecordSourceInfo { + s.ResourceType = &v + return s +} + +type CopySnapshotInput struct { + _ struct{} `type:"structure"` + + // The AWS Region where the source snapshot is located. + // + // SourceRegion is a required field + SourceRegion *string `locationName:"sourceRegion" type:"string" required:"true" enum:"RegionName"` + + // The name of the source instance or disk snapshot to be copied. + // + // SourceSnapshotName is a required field + SourceSnapshotName *string `locationName:"sourceSnapshotName" type:"string" required:"true"` + + // The name of the new instance or disk snapshot to be created as a copy. + // + // TargetSnapshotName is a required field + TargetSnapshotName *string `locationName:"targetSnapshotName" type:"string" required:"true"` +} + +// String returns the string representation +func (s CopySnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CopySnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CopySnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CopySnapshotInput"} + if s.SourceRegion == nil { + invalidParams.Add(request.NewErrParamRequired("SourceRegion")) + } + if s.SourceSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("SourceSnapshotName")) + } + if s.TargetSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("TargetSnapshotName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSourceRegion sets the SourceRegion field's value. +func (s *CopySnapshotInput) SetSourceRegion(v string) *CopySnapshotInput { + s.SourceRegion = &v + return s +} + +// SetSourceSnapshotName sets the SourceSnapshotName field's value. +func (s *CopySnapshotInput) SetSourceSnapshotName(v string) *CopySnapshotInput { + s.SourceSnapshotName = &v + return s +} + +// SetTargetSnapshotName sets the TargetSnapshotName field's value. +func (s *CopySnapshotInput) SetTargetSnapshotName(v string) *CopySnapshotInput { + s.TargetSnapshotName = &v + return s +} + +type CopySnapshotOutput struct { + _ struct{} `type:"structure"` + + // A list of objects describing the API operation. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s CopySnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CopySnapshotOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *CopySnapshotOutput) SetOperations(v []*Operation) *CopySnapshotOutput { + s.Operations = v + return s +} + +type CreateCloudFormationStackInput struct { + _ struct{} `type:"structure"` + + // An array of parameters that will be used to create the new Amazon EC2 instance. + // You can only pass one instance entry at a time in this array. You will get + // an invalid parameter error if you pass more than one instance entry in this + // array. + // + // Instances is a required field + Instances []*InstanceEntry `locationName:"instances" type:"list" required:"true"` +} + +// String returns the string representation +func (s CreateCloudFormationStackInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCloudFormationStackInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateCloudFormationStackInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCloudFormationStackInput"} + if s.Instances == nil { + invalidParams.Add(request.NewErrParamRequired("Instances")) + } + if s.Instances != nil { + for i, v := range s.Instances { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Instances", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInstances sets the Instances field's value. +func (s *CreateCloudFormationStackInput) SetInstances(v []*InstanceEntry) *CreateCloudFormationStackInput { + s.Instances = v + return s +} + +type CreateCloudFormationStackOutput struct { + _ struct{} `type:"structure"` + + // A list of objects describing the API operation. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s CreateCloudFormationStackOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCloudFormationStackOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *CreateCloudFormationStackOutput) SetOperations(v []*Operation) *CreateCloudFormationStackOutput { + s.Operations = v + return s +} + +type CreateDiskFromSnapshotInput struct { + _ struct{} `type:"structure"` + + // The Availability Zone where you want to create the disk (e.g., us-east-2a). + // Choose the same Availability Zone as the Lightsail instance where you want + // to create the disk. + // + // Use the GetRegions operation to list the Availability Zones where Lightsail + // is currently available. + // + // AvailabilityZone is a required field + AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` + + // The unique Lightsail disk name (e.g., my-disk). + // + // DiskName is a required field + DiskName *string `locationName:"diskName" type:"string" required:"true"` + + // The name of the disk snapshot (e.g., my-snapshot) from which to create the + // new storage disk. + // + // DiskSnapshotName is a required field + DiskSnapshotName *string `locationName:"diskSnapshotName" type:"string" required:"true"` + + // The size of the disk in GB (e.g., 32). + // + // SizeInGb is a required field + SizeInGb *int64 `locationName:"sizeInGb" type:"integer" required:"true"` + + // The tag keys and optional values to add to the resource during create. + // + // To tag a resource after it has been created, see the tag resource operation. + Tags []*Tag `locationName:"tags" type:"list"` +} + +// String returns the string representation +func (s CreateDiskFromSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDiskFromSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDiskFromSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDiskFromSnapshotInput"} + if s.AvailabilityZone == nil { + invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) + } + if s.DiskName == nil { + invalidParams.Add(request.NewErrParamRequired("DiskName")) + } + if s.DiskSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("DiskSnapshotName")) + } + if s.SizeInGb == nil { + invalidParams.Add(request.NewErrParamRequired("SizeInGb")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *CreateDiskFromSnapshotInput) SetAvailabilityZone(v string) *CreateDiskFromSnapshotInput { + s.AvailabilityZone = &v + return s +} + +// SetDiskName sets the DiskName field's value. +func (s *CreateDiskFromSnapshotInput) SetDiskName(v string) *CreateDiskFromSnapshotInput { + s.DiskName = &v + return s +} + +// SetDiskSnapshotName sets the DiskSnapshotName field's value. +func (s *CreateDiskFromSnapshotInput) SetDiskSnapshotName(v string) *CreateDiskFromSnapshotInput { + s.DiskSnapshotName = &v + return s +} + +// SetSizeInGb sets the SizeInGb field's value. +func (s *CreateDiskFromSnapshotInput) SetSizeInGb(v int64) *CreateDiskFromSnapshotInput { + s.SizeInGb = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateDiskFromSnapshotInput) SetTags(v []*Tag) *CreateDiskFromSnapshotInput { + s.Tags = v + return s +} + +type CreateDiskFromSnapshotOutput struct { + _ struct{} `type:"structure"` + + // An object describing the API operations. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s CreateDiskFromSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDiskFromSnapshotOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *CreateDiskFromSnapshotOutput) SetOperations(v []*Operation) *CreateDiskFromSnapshotOutput { + s.Operations = v + return s +} + +type CreateDiskInput struct { + _ struct{} `type:"structure"` + + // The Availability Zone where you want to create the disk (e.g., us-east-2a). + // Choose the same Availability Zone as the Lightsail instance where you want + // to create the disk. + // + // Use the GetRegions operation to list the Availability Zones where Lightsail + // is currently available. + // + // AvailabilityZone is a required field + AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` + + // The unique Lightsail disk name (e.g., my-disk). + // + // DiskName is a required field + DiskName *string `locationName:"diskName" type:"string" required:"true"` + + // The size of the disk in GB (e.g., 32). + // + // SizeInGb is a required field + SizeInGb *int64 `locationName:"sizeInGb" type:"integer" required:"true"` + + // The tag keys and optional values to add to the resource during create. + // + // To tag a resource after it has been created, see the tag resource operation. + Tags []*Tag `locationName:"tags" type:"list"` +} + +// String returns the string representation +func (s CreateDiskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDiskInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDiskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDiskInput"} + if s.AvailabilityZone == nil { + invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) + } + if s.DiskName == nil { + invalidParams.Add(request.NewErrParamRequired("DiskName")) + } + if s.SizeInGb == nil { + invalidParams.Add(request.NewErrParamRequired("SizeInGb")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *CreateDiskInput) SetAvailabilityZone(v string) *CreateDiskInput { + s.AvailabilityZone = &v + return s +} + +// SetDiskName sets the DiskName field's value. +func (s *CreateDiskInput) SetDiskName(v string) *CreateDiskInput { + s.DiskName = &v + return s +} + +// SetSizeInGb sets the SizeInGb field's value. +func (s *CreateDiskInput) SetSizeInGb(v int64) *CreateDiskInput { + s.SizeInGb = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateDiskInput) SetTags(v []*Tag) *CreateDiskInput { + s.Tags = v + return s +} + +type CreateDiskOutput struct { + _ struct{} `type:"structure"` + + // An object describing the API operations. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s CreateDiskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDiskOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *CreateDiskOutput) SetOperations(v []*Operation) *CreateDiskOutput { + s.Operations = v + return s +} + +type CreateDiskSnapshotInput struct { + _ struct{} `type:"structure"` + + // The unique name of the source disk (e.g., my-source-disk). + // + // DiskName is a required field + DiskName *string `locationName:"diskName" type:"string" required:"true"` + + // The name of the destination disk snapshot (e.g., my-disk-snapshot) based + // on the source disk. + // + // DiskSnapshotName is a required field + DiskSnapshotName *string `locationName:"diskSnapshotName" type:"string" required:"true"` + + // The tag keys and optional values to add to the resource during create. + // + // To tag a resource after it has been created, see the tag resource operation. + Tags []*Tag `locationName:"tags" type:"list"` +} + +// String returns the string representation +func (s CreateDiskSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDiskSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDiskSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDiskSnapshotInput"} + if s.DiskName == nil { + invalidParams.Add(request.NewErrParamRequired("DiskName")) + } + if s.DiskSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("DiskSnapshotName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDiskName sets the DiskName field's value. +func (s *CreateDiskSnapshotInput) SetDiskName(v string) *CreateDiskSnapshotInput { + s.DiskName = &v + return s +} + +// SetDiskSnapshotName sets the DiskSnapshotName field's value. +func (s *CreateDiskSnapshotInput) SetDiskSnapshotName(v string) *CreateDiskSnapshotInput { + s.DiskSnapshotName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateDiskSnapshotInput) SetTags(v []*Tag) *CreateDiskSnapshotInput { + s.Tags = v + return s +} + +type CreateDiskSnapshotOutput struct { + _ struct{} `type:"structure"` + + // An object describing the API operations. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s CreateDiskSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDiskSnapshotOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *CreateDiskSnapshotOutput) SetOperations(v []*Operation) *CreateDiskSnapshotOutput { + s.Operations = v + return s +} + +type CreateDomainEntryInput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs containing information about the domain entry + // request. + // + // DomainEntry is a required field + DomainEntry *DomainEntry `locationName:"domainEntry" type:"structure" required:"true"` + + // The domain name (e.g., example.com) for which you want to create the domain + // entry. + // + // DomainName is a required field + DomainName *string `locationName:"domainName" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateDomainEntryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDomainEntryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDomainEntryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDomainEntryInput"} + if s.DomainEntry == nil { + invalidParams.Add(request.NewErrParamRequired("DomainEntry")) + } + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainEntry sets the DomainEntry field's value. +func (s *CreateDomainEntryInput) SetDomainEntry(v *DomainEntry) *CreateDomainEntryInput { + s.DomainEntry = v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *CreateDomainEntryInput) SetDomainName(v string) *CreateDomainEntryInput { + s.DomainName = &v + return s +} + +type CreateDomainEntryOutput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs containing information about the operation. + Operation *Operation `locationName:"operation" type:"structure"` +} + +// String returns the string representation +func (s CreateDomainEntryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDomainEntryOutput) GoString() string { + return s.String() +} + +// SetOperation sets the Operation field's value. +func (s *CreateDomainEntryOutput) SetOperation(v *Operation) *CreateDomainEntryOutput { + s.Operation = v + return s +} + +type CreateDomainInput struct { + _ struct{} `type:"structure"` + + // The domain name to manage (e.g., example.com). + // + // You cannot register a new domain name using Lightsail. You must register + // a domain name using Amazon Route 53 or another domain name registrar. If + // you have already registered your domain, you can enter its name in this parameter + // to manage the DNS records for that domain. + // + // DomainName is a required field + DomainName *string `locationName:"domainName" type:"string" required:"true"` + + // The tag keys and optional values to add to the resource during create. + // + // To tag a resource after it has been created, see the tag resource operation. + Tags []*Tag `locationName:"tags" type:"list"` +} + +// String returns the string representation +func (s CreateDomainInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDomainInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDomainInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDomainInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *CreateDomainInput) SetDomainName(v string) *CreateDomainInput { + s.DomainName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateDomainInput) SetTags(v []*Tag) *CreateDomainInput { + s.Tags = v + return s +} + +type CreateDomainOutput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs containing information about the domain resource + // you created. + Operation *Operation `locationName:"operation" type:"structure"` +} + +// String returns the string representation +func (s CreateDomainOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDomainOutput) GoString() string { + return s.String() +} + +// SetOperation sets the Operation field's value. +func (s *CreateDomainOutput) SetOperation(v *Operation) *CreateDomainOutput { + s.Operation = v + return s +} + +type CreateInstanceSnapshotInput struct { + _ struct{} `type:"structure"` + + // The Lightsail instance on which to base your snapshot. + // + // InstanceName is a required field + InstanceName *string `locationName:"instanceName" type:"string" required:"true"` + + // The name for your new snapshot. + // + // InstanceSnapshotName is a required field + InstanceSnapshotName *string `locationName:"instanceSnapshotName" type:"string" required:"true"` + + // The tag keys and optional values to add to the resource during create. + // + // To tag a resource after it has been created, see the tag resource operation. + Tags []*Tag `locationName:"tags" type:"list"` +} + +// String returns the string representation +func (s CreateInstanceSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInstanceSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateInstanceSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateInstanceSnapshotInput"} + if s.InstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceName")) + } + if s.InstanceSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceSnapshotName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInstanceName sets the InstanceName field's value. +func (s *CreateInstanceSnapshotInput) SetInstanceName(v string) *CreateInstanceSnapshotInput { + s.InstanceName = &v + return s +} + +// SetInstanceSnapshotName sets the InstanceSnapshotName field's value. +func (s *CreateInstanceSnapshotInput) SetInstanceSnapshotName(v string) *CreateInstanceSnapshotInput { + s.InstanceSnapshotName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateInstanceSnapshotInput) SetTags(v []*Tag) *CreateInstanceSnapshotInput { + s.Tags = v + return s +} + +type CreateInstanceSnapshotOutput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs containing information about the results of your + // create instances snapshot request. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s CreateInstanceSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInstanceSnapshotOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *CreateInstanceSnapshotOutput) SetOperations(v []*Operation) *CreateInstanceSnapshotOutput { + s.Operations = v + return s +} + +type CreateInstancesFromSnapshotInput struct { + _ struct{} `type:"structure"` + + // An object containing information about one or more disk mappings. + AttachedDiskMapping map[string][]*DiskMap `locationName:"attachedDiskMapping" type:"map"` + + // The Availability Zone where you want to create your instances. Use the following + // formatting: us-east-2a (case sensitive). You can get a list of Availability + // Zones by using the get regions (http://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetRegions.html) + // operation. Be sure to add the include Availability Zones parameter to your + // request. + // + // AvailabilityZone is a required field + AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` + + // The bundle of specification information for your virtual private server (or + // instance), including the pricing plan (e.g., micro_1_0). + // + // BundleId is a required field + BundleId *string `locationName:"bundleId" type:"string" required:"true"` + + // The names for your new instances. + // + // InstanceNames is a required field + InstanceNames []*string `locationName:"instanceNames" type:"list" required:"true"` + + // The name of the instance snapshot on which you are basing your new instances. + // Use the get instance snapshots operation to return information about your + // existing snapshots. + // + // InstanceSnapshotName is a required field + InstanceSnapshotName *string `locationName:"instanceSnapshotName" type:"string" required:"true"` + + // The name for your key pair. + KeyPairName *string `locationName:"keyPairName" type:"string"` + + // The tag keys and optional values to add to the resource during create. + // + // To tag a resource after it has been created, see the tag resource operation. + Tags []*Tag `locationName:"tags" type:"list"` + + // You can create a launch script that configures a server with additional user + // data. For example, apt-get -y update. + // + // Depending on the machine image you choose, the command to get software on + // your instance varies. Amazon Linux and CentOS use yum, Debian and Ubuntu + // use apt-get, and FreeBSD uses pkg. For a complete list, see the Dev Guide + // (https://lightsail.aws.amazon.com/ls/docs/getting-started/article/compare-options-choose-lightsail-instance-image). + UserData *string `locationName:"userData" type:"string"` +} + +// String returns the string representation +func (s CreateInstancesFromSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInstancesFromSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateInstancesFromSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateInstancesFromSnapshotInput"} + if s.AvailabilityZone == nil { + invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) + } + if s.BundleId == nil { + invalidParams.Add(request.NewErrParamRequired("BundleId")) + } + if s.InstanceNames == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceNames")) + } + if s.InstanceSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceSnapshotName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAttachedDiskMapping sets the AttachedDiskMapping field's value. +func (s *CreateInstancesFromSnapshotInput) SetAttachedDiskMapping(v map[string][]*DiskMap) *CreateInstancesFromSnapshotInput { + s.AttachedDiskMapping = v + return s +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *CreateInstancesFromSnapshotInput) SetAvailabilityZone(v string) *CreateInstancesFromSnapshotInput { + s.AvailabilityZone = &v + return s +} + +// SetBundleId sets the BundleId field's value. +func (s *CreateInstancesFromSnapshotInput) SetBundleId(v string) *CreateInstancesFromSnapshotInput { + s.BundleId = &v + return s +} + +// SetInstanceNames sets the InstanceNames field's value. +func (s *CreateInstancesFromSnapshotInput) SetInstanceNames(v []*string) *CreateInstancesFromSnapshotInput { + s.InstanceNames = v + return s +} + +// SetInstanceSnapshotName sets the InstanceSnapshotName field's value. +func (s *CreateInstancesFromSnapshotInput) SetInstanceSnapshotName(v string) *CreateInstancesFromSnapshotInput { + s.InstanceSnapshotName = &v + return s +} + +// SetKeyPairName sets the KeyPairName field's value. +func (s *CreateInstancesFromSnapshotInput) SetKeyPairName(v string) *CreateInstancesFromSnapshotInput { + s.KeyPairName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateInstancesFromSnapshotInput) SetTags(v []*Tag) *CreateInstancesFromSnapshotInput { + s.Tags = v + return s +} + +// SetUserData sets the UserData field's value. +func (s *CreateInstancesFromSnapshotInput) SetUserData(v string) *CreateInstancesFromSnapshotInput { + s.UserData = &v + return s +} + +type CreateInstancesFromSnapshotOutput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs containing information about the results of your + // create instances from snapshot request. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s CreateInstancesFromSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInstancesFromSnapshotOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *CreateInstancesFromSnapshotOutput) SetOperations(v []*Operation) *CreateInstancesFromSnapshotOutput { + s.Operations = v + return s +} + +type CreateInstancesInput struct { + _ struct{} `type:"structure"` + + // The Availability Zone in which to create your instance. Use the following + // format: us-east-2a (case sensitive). You can get a list of Availability Zones + // by using the get regions (http://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetRegions.html) + // operation. Be sure to add the include Availability Zones parameter to your + // request. + // + // AvailabilityZone is a required field + AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` + + // The ID for a virtual private server image (e.g., app_wordpress_4_4 or app_lamp_7_0). + // Use the get blueprints operation to return a list of available images (or + // blueprints). + // + // BlueprintId is a required field + BlueprintId *string `locationName:"blueprintId" type:"string" required:"true"` + + // The bundle of specification information for your virtual private server (or + // instance), including the pricing plan (e.g., micro_1_0). + // + // BundleId is a required field + BundleId *string `locationName:"bundleId" type:"string" required:"true"` + + // (Deprecated) The name for your custom image. + // + // In releases prior to June 12, 2017, this parameter was ignored by the API. + // It is now deprecated. + // + // Deprecated: CustomImageName has been deprecated + CustomImageName *string `locationName:"customImageName" deprecated:"true" type:"string"` + + // The names to use for your new Lightsail instances. Separate multiple values + // using quotation marks and commas, for example: ["MyFirstInstance","MySecondInstance"] + // + // InstanceNames is a required field + InstanceNames []*string `locationName:"instanceNames" type:"list" required:"true"` + + // The name of your key pair. + KeyPairName *string `locationName:"keyPairName" type:"string"` + + // The tag keys and optional values to add to the resource during create. + // + // To tag a resource after it has been created, see the tag resource operation. + Tags []*Tag `locationName:"tags" type:"list"` + + // A launch script you can create that configures a server with additional user + // data. For example, you might want to run apt-get -y update. + // + // Depending on the machine image you choose, the command to get software on + // your instance varies. Amazon Linux and CentOS use yum, Debian and Ubuntu + // use apt-get, and FreeBSD uses pkg. For a complete list, see the Dev Guide + // (https://lightsail.aws.amazon.com/ls/docs/getting-started/article/compare-options-choose-lightsail-instance-image). + UserData *string `locationName:"userData" type:"string"` +} + +// String returns the string representation +func (s CreateInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInstancesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateInstancesInput"} + if s.AvailabilityZone == nil { + invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) + } + if s.BlueprintId == nil { + invalidParams.Add(request.NewErrParamRequired("BlueprintId")) + } + if s.BundleId == nil { + invalidParams.Add(request.NewErrParamRequired("BundleId")) + } + if s.InstanceNames == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceNames")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *CreateInstancesInput) SetAvailabilityZone(v string) *CreateInstancesInput { + s.AvailabilityZone = &v + return s +} + +// SetBlueprintId sets the BlueprintId field's value. +func (s *CreateInstancesInput) SetBlueprintId(v string) *CreateInstancesInput { + s.BlueprintId = &v + return s +} + +// SetBundleId sets the BundleId field's value. +func (s *CreateInstancesInput) SetBundleId(v string) *CreateInstancesInput { + s.BundleId = &v + return s +} + +// SetCustomImageName sets the CustomImageName field's value. +func (s *CreateInstancesInput) SetCustomImageName(v string) *CreateInstancesInput { + s.CustomImageName = &v + return s +} + +// SetInstanceNames sets the InstanceNames field's value. +func (s *CreateInstancesInput) SetInstanceNames(v []*string) *CreateInstancesInput { + s.InstanceNames = v + return s +} + +// SetKeyPairName sets the KeyPairName field's value. +func (s *CreateInstancesInput) SetKeyPairName(v string) *CreateInstancesInput { + s.KeyPairName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateInstancesInput) SetTags(v []*Tag) *CreateInstancesInput { + s.Tags = v + return s +} + +// SetUserData sets the UserData field's value. +func (s *CreateInstancesInput) SetUserData(v string) *CreateInstancesInput { + s.UserData = &v + return s +} + +type CreateInstancesOutput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs containing information about the results of your + // create instances request. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s CreateInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInstancesOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *CreateInstancesOutput) SetOperations(v []*Operation) *CreateInstancesOutput { + s.Operations = v + return s +} + +type CreateKeyPairInput struct { + _ struct{} `type:"structure"` + + // The name for your new key pair. + // + // KeyPairName is a required field + KeyPairName *string `locationName:"keyPairName" type:"string" required:"true"` + + // The tag keys and optional values to add to the resource during create. + // + // To tag a resource after it has been created, see the tag resource operation. + Tags []*Tag `locationName:"tags" type:"list"` +} + +// String returns the string representation +func (s CreateKeyPairInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateKeyPairInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateKeyPairInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateKeyPairInput"} + if s.KeyPairName == nil { + invalidParams.Add(request.NewErrParamRequired("KeyPairName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKeyPairName sets the KeyPairName field's value. +func (s *CreateKeyPairInput) SetKeyPairName(v string) *CreateKeyPairInput { + s.KeyPairName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateKeyPairInput) SetTags(v []*Tag) *CreateKeyPairInput { + s.Tags = v + return s +} + +type CreateKeyPairOutput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs containing information about the new key pair + // you just created. + KeyPair *KeyPair `locationName:"keyPair" type:"structure"` + + // An array of key-value pairs containing information about the results of your + // create key pair request. + Operation *Operation `locationName:"operation" type:"structure"` + + // A base64-encoded RSA private key. + PrivateKeyBase64 *string `locationName:"privateKeyBase64" type:"string"` + + // A base64-encoded public key of the ssh-rsa type. + PublicKeyBase64 *string `locationName:"publicKeyBase64" type:"string"` +} + +// String returns the string representation +func (s CreateKeyPairOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateKeyPairOutput) GoString() string { + return s.String() +} + +// SetKeyPair sets the KeyPair field's value. +func (s *CreateKeyPairOutput) SetKeyPair(v *KeyPair) *CreateKeyPairOutput { + s.KeyPair = v + return s +} + +// SetOperation sets the Operation field's value. +func (s *CreateKeyPairOutput) SetOperation(v *Operation) *CreateKeyPairOutput { + s.Operation = v + return s +} + +// SetPrivateKeyBase64 sets the PrivateKeyBase64 field's value. +func (s *CreateKeyPairOutput) SetPrivateKeyBase64(v string) *CreateKeyPairOutput { + s.PrivateKeyBase64 = &v + return s +} + +// SetPublicKeyBase64 sets the PublicKeyBase64 field's value. +func (s *CreateKeyPairOutput) SetPublicKeyBase64(v string) *CreateKeyPairOutput { + s.PublicKeyBase64 = &v + return s +} + +type CreateLoadBalancerInput struct { + _ struct{} `type:"structure"` + + // The optional alternative domains and subdomains to use with your SSL/TLS + // certificate (e.g., www.example.com, example.com, m.example.com, blog.example.com). + CertificateAlternativeNames []*string `locationName:"certificateAlternativeNames" type:"list"` + + // The domain name with which your certificate is associated (e.g., example.com). + // + // If you specify certificateDomainName, then certificateName is required (and + // vice-versa). + CertificateDomainName *string `locationName:"certificateDomainName" type:"string"` + + // The name of the SSL/TLS certificate. + // + // If you specify certificateName, then certificateDomainName is required (and + // vice-versa). + CertificateName *string `locationName:"certificateName" type:"string"` + + // The path you provided to perform the load balancer health check. If you didn't + // specify a health check path, Lightsail uses the root path of your website + // (e.g., "/"). + // + // You may want to specify a custom health check path other than the root of + // your application if your home page loads slowly or has a lot of media or + // scripting on it. + HealthCheckPath *string `locationName:"healthCheckPath" type:"string"` + + // The instance port where you're creating your load balancer. + // + // InstancePort is a required field + InstancePort *int64 `locationName:"instancePort" type:"integer" required:"true"` + + // The name of your load balancer. + // + // LoadBalancerName is a required field + LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` + + // The tag keys and optional values to add to the resource during create. + // + // To tag a resource after it has been created, see the tag resource operation. + Tags []*Tag `locationName:"tags" type:"list"` +} + +// String returns the string representation +func (s CreateLoadBalancerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLoadBalancerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateLoadBalancerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateLoadBalancerInput"} + if s.InstancePort == nil { + invalidParams.Add(request.NewErrParamRequired("InstancePort")) + } + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateAlternativeNames sets the CertificateAlternativeNames field's value. +func (s *CreateLoadBalancerInput) SetCertificateAlternativeNames(v []*string) *CreateLoadBalancerInput { + s.CertificateAlternativeNames = v + return s +} + +// SetCertificateDomainName sets the CertificateDomainName field's value. +func (s *CreateLoadBalancerInput) SetCertificateDomainName(v string) *CreateLoadBalancerInput { + s.CertificateDomainName = &v + return s +} + +// SetCertificateName sets the CertificateName field's value. +func (s *CreateLoadBalancerInput) SetCertificateName(v string) *CreateLoadBalancerInput { + s.CertificateName = &v + return s +} + +// SetHealthCheckPath sets the HealthCheckPath field's value. +func (s *CreateLoadBalancerInput) SetHealthCheckPath(v string) *CreateLoadBalancerInput { + s.HealthCheckPath = &v + return s +} + +// SetInstancePort sets the InstancePort field's value. +func (s *CreateLoadBalancerInput) SetInstancePort(v int64) *CreateLoadBalancerInput { + s.InstancePort = &v + return s +} + +// SetLoadBalancerName sets the LoadBalancerName field's value. +func (s *CreateLoadBalancerInput) SetLoadBalancerName(v string) *CreateLoadBalancerInput { + s.LoadBalancerName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateLoadBalancerInput) SetTags(v []*Tag) *CreateLoadBalancerInput { + s.Tags = v + return s +} + +type CreateLoadBalancerOutput struct { + _ struct{} `type:"structure"` + + // An object containing information about the API operations. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s CreateLoadBalancerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLoadBalancerOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *CreateLoadBalancerOutput) SetOperations(v []*Operation) *CreateLoadBalancerOutput { + s.Operations = v + return s +} + +type CreateLoadBalancerTlsCertificateInput struct { + _ struct{} `type:"structure"` + + // An array of strings listing alternative domains and subdomains for your SSL/TLS + // certificate. Lightsail will de-dupe the names for you. You can have a maximum + // of 9 alternative names (in addition to the 1 primary domain). We do not support + // wildcards (e.g., *.example.com). + CertificateAlternativeNames []*string `locationName:"certificateAlternativeNames" type:"list"` + + // The domain name (e.g., example.com) for your SSL/TLS certificate. + // + // CertificateDomainName is a required field + CertificateDomainName *string `locationName:"certificateDomainName" type:"string" required:"true"` + + // The SSL/TLS certificate name. + // + // You can have up to 10 certificates in your account at one time. Each Lightsail + // load balancer can have up to 2 certificates associated with it at one time. + // There is also an overall limit to the number of certificates that can be + // issue in a 365-day period. For more information, see Limits (http://docs.aws.amazon.com/acm/latest/userguide/acm-limits.html). + // + // CertificateName is a required field + CertificateName *string `locationName:"certificateName" type:"string" required:"true"` + + // The load balancer name where you want to create the SSL/TLS certificate. + // + // LoadBalancerName is a required field + LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` + + // The tag keys and optional values to add to the resource during create. + // + // To tag a resource after it has been created, see the tag resource operation. + Tags []*Tag `locationName:"tags" type:"list"` +} + +// String returns the string representation +func (s CreateLoadBalancerTlsCertificateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLoadBalancerTlsCertificateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateLoadBalancerTlsCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateLoadBalancerTlsCertificateInput"} + if s.CertificateDomainName == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateDomainName")) + } + if s.CertificateName == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateName")) + } + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCertificateAlternativeNames sets the CertificateAlternativeNames field's value. +func (s *CreateLoadBalancerTlsCertificateInput) SetCertificateAlternativeNames(v []*string) *CreateLoadBalancerTlsCertificateInput { + s.CertificateAlternativeNames = v + return s +} + +// SetCertificateDomainName sets the CertificateDomainName field's value. +func (s *CreateLoadBalancerTlsCertificateInput) SetCertificateDomainName(v string) *CreateLoadBalancerTlsCertificateInput { + s.CertificateDomainName = &v + return s +} + +// SetCertificateName sets the CertificateName field's value. +func (s *CreateLoadBalancerTlsCertificateInput) SetCertificateName(v string) *CreateLoadBalancerTlsCertificateInput { + s.CertificateName = &v + return s +} + +// SetLoadBalancerName sets the LoadBalancerName field's value. +func (s *CreateLoadBalancerTlsCertificateInput) SetLoadBalancerName(v string) *CreateLoadBalancerTlsCertificateInput { + s.LoadBalancerName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateLoadBalancerTlsCertificateInput) SetTags(v []*Tag) *CreateLoadBalancerTlsCertificateInput { + s.Tags = v + return s +} + +type CreateLoadBalancerTlsCertificateOutput struct { + _ struct{} `type:"structure"` + + // An object containing information about the API operations. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s CreateLoadBalancerTlsCertificateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateLoadBalancerTlsCertificateOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *CreateLoadBalancerTlsCertificateOutput) SetOperations(v []*Operation) *CreateLoadBalancerTlsCertificateOutput { + s.Operations = v + return s +} + +type CreateRelationalDatabaseFromSnapshotInput struct { + _ struct{} `type:"structure"` + + // The Availability Zone in which to create your new database. Use the us-east-2a + // case-sensitive format. + // + // You can get a list of Availability Zones by using the get regions operation. + // Be sure to add the include relational database Availability Zones parameter + // to your request. + AvailabilityZone *string `locationName:"availabilityZone" type:"string"` + + // Specifies the accessibility options for your new database. A value of true + // specifies a database that is available to resources outside of your Lightsail + // account. A value of false specifies a database that is available only to + // your Lightsail resources in the same region as your database. + PubliclyAccessible *bool `locationName:"publiclyAccessible" type:"boolean"` + + // The bundle ID for your new database. A bundle describes the performance specifications + // for your database. + // + // You can get a list of database bundle IDs by using the get relational database + // bundles operation. + // + // When creating a new database from a snapshot, you cannot choose a bundle + // that is smaller than the bundle of the source database. + RelationalDatabaseBundleId *string `locationName:"relationalDatabaseBundleId" type:"string"` + + // The name to use for your new database. + // + // Constraints: + // + // * Must contain from 2 to 255 alphanumeric characters, or hyphens. + // + // * The first and last character must be a letter or number. + // + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` + + // The name of the database snapshot from which to create your new database. + RelationalDatabaseSnapshotName *string `locationName:"relationalDatabaseSnapshotName" type:"string"` + + // The date and time to restore your database from. + // + // Constraints: + // + // * Must be before the latest restorable time for the database. + // + // * Cannot be specified if the use latest restorable time parameter is true. + // + // * Specified in Universal Coordinated Time (UTC). + // + // * Specified in the Unix time format. + // + // For example, if you wish to use a restore time of October 1, 2018, at 8 PM + // UTC, then you input 1538424000 as the restore time. + RestoreTime *time.Time `locationName:"restoreTime" type:"timestamp"` + + // The name of the source database. + SourceRelationalDatabaseName *string `locationName:"sourceRelationalDatabaseName" type:"string"` + + // The tag keys and optional values to add to the resource during create. + // + // To tag a resource after it has been created, see the tag resource operation. + Tags []*Tag `locationName:"tags" type:"list"` + + // Specifies whether your database is restored from the latest backup time. + // A value of true restores from the latest backup time. + // + // Default: false + // + // Constraints: Cannot be specified if the restore time parameter is provided. + UseLatestRestorableTime *bool `locationName:"useLatestRestorableTime" type:"boolean"` +} + +// String returns the string representation +func (s CreateRelationalDatabaseFromSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateRelationalDatabaseFromSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateRelationalDatabaseFromSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateRelationalDatabaseFromSnapshotInput"} + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *CreateRelationalDatabaseFromSnapshotInput) SetAvailabilityZone(v string) *CreateRelationalDatabaseFromSnapshotInput { + s.AvailabilityZone = &v + return s +} + +// SetPubliclyAccessible sets the PubliclyAccessible field's value. +func (s *CreateRelationalDatabaseFromSnapshotInput) SetPubliclyAccessible(v bool) *CreateRelationalDatabaseFromSnapshotInput { + s.PubliclyAccessible = &v + return s +} + +// SetRelationalDatabaseBundleId sets the RelationalDatabaseBundleId field's value. +func (s *CreateRelationalDatabaseFromSnapshotInput) SetRelationalDatabaseBundleId(v string) *CreateRelationalDatabaseFromSnapshotInput { + s.RelationalDatabaseBundleId = &v + return s +} + +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *CreateRelationalDatabaseFromSnapshotInput) SetRelationalDatabaseName(v string) *CreateRelationalDatabaseFromSnapshotInput { + s.RelationalDatabaseName = &v + return s +} + +// SetRelationalDatabaseSnapshotName sets the RelationalDatabaseSnapshotName field's value. +func (s *CreateRelationalDatabaseFromSnapshotInput) SetRelationalDatabaseSnapshotName(v string) *CreateRelationalDatabaseFromSnapshotInput { + s.RelationalDatabaseSnapshotName = &v + return s +} + +// SetRestoreTime sets the RestoreTime field's value. +func (s *CreateRelationalDatabaseFromSnapshotInput) SetRestoreTime(v time.Time) *CreateRelationalDatabaseFromSnapshotInput { + s.RestoreTime = &v + return s +} + +// SetSourceRelationalDatabaseName sets the SourceRelationalDatabaseName field's value. +func (s *CreateRelationalDatabaseFromSnapshotInput) SetSourceRelationalDatabaseName(v string) *CreateRelationalDatabaseFromSnapshotInput { + s.SourceRelationalDatabaseName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateRelationalDatabaseFromSnapshotInput) SetTags(v []*Tag) *CreateRelationalDatabaseFromSnapshotInput { + s.Tags = v + return s +} + +// SetUseLatestRestorableTime sets the UseLatestRestorableTime field's value. +func (s *CreateRelationalDatabaseFromSnapshotInput) SetUseLatestRestorableTime(v bool) *CreateRelationalDatabaseFromSnapshotInput { + s.UseLatestRestorableTime = &v + return s +} + +type CreateRelationalDatabaseFromSnapshotOutput struct { + _ struct{} `type:"structure"` + + // An object describing the result of your create relational database from snapshot + // request. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s CreateRelationalDatabaseFromSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateRelationalDatabaseFromSnapshotOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *CreateRelationalDatabaseFromSnapshotOutput) SetOperations(v []*Operation) *CreateRelationalDatabaseFromSnapshotOutput { + s.Operations = v + return s +} + +type CreateRelationalDatabaseInput struct { + _ struct{} `type:"structure"` + + // The Availability Zone in which to create your new database. Use the us-east-2a + // case-sensitive format. + // + // You can get a list of Availability Zones by using the get regions operation. + // Be sure to add the include relational database Availability Zones parameter + // to your request. + AvailabilityZone *string `locationName:"availabilityZone" type:"string"` + + // The name of the master database created when the Lightsail database resource + // is created. + // + // Constraints: + // + // * Must contain from 1 to 64 alphanumeric characters. + // + // * Cannot be a word reserved by the specified database engine + // + // MasterDatabaseName is a required field + MasterDatabaseName *string `locationName:"masterDatabaseName" type:"string" required:"true"` + + // The password for the master user of your new database. The password can include + // any printable ASCII character except "/", """, or "@". + // + // Constraints: Must contain 8 to 41 characters. + MasterUserPassword *string `locationName:"masterUserPassword" type:"string" sensitive:"true"` + + // The master user name for your new database. + // + // Constraints: + // + // * Master user name is required. + // + // * Must contain from 1 to 16 alphanumeric characters. + // + // * The first character must be a letter. + // + // * Cannot be a reserved word for the database engine you choose. + // + // For more information about reserved words in MySQL 5.6 or 5.7, see the Keywords + // and Reserved Words articles for MySQL 5.6 (https://dev.mysql.com/doc/refman/5.6/en/keywords.html) + // or MySQL 5.7 (https://dev.mysql.com/doc/refman/5.7/en/keywords.html) respectively. + // + // MasterUsername is a required field + MasterUsername *string `locationName:"masterUsername" type:"string" required:"true"` + + // The daily time range during which automated backups are created for your + // new database if automated backups are enabled. + // + // The default is a 30-minute window selected at random from an 8-hour block + // of time for each AWS Region. For more information about the preferred backup + // window time blocks for each region, see the Working With Backups (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html#USER_WorkingWithAutomatedBackups.BackupWindow) + // guide in the Amazon Relational Database Service (Amazon RDS) documentation. + // + // Constraints: + // + // * Must be in the hh24:mi-hh24:mi format. + // + // Example: 16:00-16:30 + // + // * Specified in Universal Coordinated Time (UTC). + // + // * Must not conflict with the preferred maintenance window. + // + // * Must be at least 30 minutes. + PreferredBackupWindow *string `locationName:"preferredBackupWindow" type:"string"` + + // The weekly time range during which system maintenance can occur on your new + // database. + // + // The default is a 30-minute window selected at random from an 8-hour block + // of time for each AWS Region, occurring on a random day of the week. + // + // Constraints: + // + // * Must be in the ddd:hh24:mi-ddd:hh24:mi format. + // + // * Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun. + // + // * Must be at least 30 minutes. + // + // * Specified in Universal Coordinated Time (UTC). + // + // * Example: Tue:17:00-Tue:17:30 + PreferredMaintenanceWindow *string `locationName:"preferredMaintenanceWindow" type:"string"` + + // Specifies the accessibility options for your new database. A value of true + // specifies a database that is available to resources outside of your Lightsail + // account. A value of false specifies a database that is available only to + // your Lightsail resources in the same region as your database. + PubliclyAccessible *bool `locationName:"publiclyAccessible" type:"boolean"` + + // The blueprint ID for your new database. A blueprint describes the major engine + // version of a database. + // + // You can get a list of database blueprints IDs by using the get relational + // database blueprints operation. + // + // RelationalDatabaseBlueprintId is a required field + RelationalDatabaseBlueprintId *string `locationName:"relationalDatabaseBlueprintId" type:"string" required:"true"` + + // The bundle ID for your new database. A bundle describes the performance specifications + // for your database. + // + // You can get a list of database bundle IDs by using the get relational database + // bundles operation. + // + // RelationalDatabaseBundleId is a required field + RelationalDatabaseBundleId *string `locationName:"relationalDatabaseBundleId" type:"string" required:"true"` + + // The name to use for your new database. + // + // Constraints: + // + // * Must contain from 2 to 255 alphanumeric characters, or hyphens. + // + // * The first and last character must be a letter or number. + // + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` + + // The tag keys and optional values to add to the resource during create. + // + // To tag a resource after it has been created, see the tag resource operation. + Tags []*Tag `locationName:"tags" type:"list"` +} + +// String returns the string representation +func (s CreateRelationalDatabaseInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateRelationalDatabaseInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateRelationalDatabaseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateRelationalDatabaseInput"} + if s.MasterDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("MasterDatabaseName")) + } + if s.MasterUsername == nil { + invalidParams.Add(request.NewErrParamRequired("MasterUsername")) + } + if s.RelationalDatabaseBlueprintId == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseBlueprintId")) + } + if s.RelationalDatabaseBundleId == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseBundleId")) + } + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *CreateRelationalDatabaseInput) SetAvailabilityZone(v string) *CreateRelationalDatabaseInput { + s.AvailabilityZone = &v + return s +} + +// SetMasterDatabaseName sets the MasterDatabaseName field's value. +func (s *CreateRelationalDatabaseInput) SetMasterDatabaseName(v string) *CreateRelationalDatabaseInput { + s.MasterDatabaseName = &v + return s +} + +// SetMasterUserPassword sets the MasterUserPassword field's value. +func (s *CreateRelationalDatabaseInput) SetMasterUserPassword(v string) *CreateRelationalDatabaseInput { + s.MasterUserPassword = &v + return s +} + +// SetMasterUsername sets the MasterUsername field's value. +func (s *CreateRelationalDatabaseInput) SetMasterUsername(v string) *CreateRelationalDatabaseInput { + s.MasterUsername = &v + return s +} + +// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. +func (s *CreateRelationalDatabaseInput) SetPreferredBackupWindow(v string) *CreateRelationalDatabaseInput { + s.PreferredBackupWindow = &v + return s +} + +// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. +func (s *CreateRelationalDatabaseInput) SetPreferredMaintenanceWindow(v string) *CreateRelationalDatabaseInput { + s.PreferredMaintenanceWindow = &v + return s +} + +// SetPubliclyAccessible sets the PubliclyAccessible field's value. +func (s *CreateRelationalDatabaseInput) SetPubliclyAccessible(v bool) *CreateRelationalDatabaseInput { + s.PubliclyAccessible = &v + return s +} + +// SetRelationalDatabaseBlueprintId sets the RelationalDatabaseBlueprintId field's value. +func (s *CreateRelationalDatabaseInput) SetRelationalDatabaseBlueprintId(v string) *CreateRelationalDatabaseInput { + s.RelationalDatabaseBlueprintId = &v + return s +} + +// SetRelationalDatabaseBundleId sets the RelationalDatabaseBundleId field's value. +func (s *CreateRelationalDatabaseInput) SetRelationalDatabaseBundleId(v string) *CreateRelationalDatabaseInput { + s.RelationalDatabaseBundleId = &v + return s +} + +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *CreateRelationalDatabaseInput) SetRelationalDatabaseName(v string) *CreateRelationalDatabaseInput { + s.RelationalDatabaseName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateRelationalDatabaseInput) SetTags(v []*Tag) *CreateRelationalDatabaseInput { + s.Tags = v + return s +} + +type CreateRelationalDatabaseOutput struct { + _ struct{} `type:"structure"` + + // An object describing the result of your create relational database request. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s CreateRelationalDatabaseOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateRelationalDatabaseOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *CreateRelationalDatabaseOutput) SetOperations(v []*Operation) *CreateRelationalDatabaseOutput { + s.Operations = v + return s +} + +type CreateRelationalDatabaseSnapshotInput struct { + _ struct{} `type:"structure"` + + // The name of the database on which to base your new snapshot. + // + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` + + // The name for your new database snapshot. + // + // Constraints: + // + // * Must contain from 2 to 255 alphanumeric characters, or hyphens. + // + // * The first and last character must be a letter or number. + // + // RelationalDatabaseSnapshotName is a required field + RelationalDatabaseSnapshotName *string `locationName:"relationalDatabaseSnapshotName" type:"string" required:"true"` + + // The tag keys and optional values to add to the resource during create. + // + // To tag a resource after it has been created, see the tag resource operation. + Tags []*Tag `locationName:"tags" type:"list"` +} + +// String returns the string representation +func (s CreateRelationalDatabaseSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateRelationalDatabaseSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateRelationalDatabaseSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateRelationalDatabaseSnapshotInput"} + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) + } + if s.RelationalDatabaseSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseSnapshotName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *CreateRelationalDatabaseSnapshotInput) SetRelationalDatabaseName(v string) *CreateRelationalDatabaseSnapshotInput { + s.RelationalDatabaseName = &v + return s +} + +// SetRelationalDatabaseSnapshotName sets the RelationalDatabaseSnapshotName field's value. +func (s *CreateRelationalDatabaseSnapshotInput) SetRelationalDatabaseSnapshotName(v string) *CreateRelationalDatabaseSnapshotInput { + s.RelationalDatabaseSnapshotName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateRelationalDatabaseSnapshotInput) SetTags(v []*Tag) *CreateRelationalDatabaseSnapshotInput { + s.Tags = v + return s +} + +type CreateRelationalDatabaseSnapshotOutput struct { + _ struct{} `type:"structure"` + + // An object describing the result of your create relational database snapshot + // request. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s CreateRelationalDatabaseSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateRelationalDatabaseSnapshotOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *CreateRelationalDatabaseSnapshotOutput) SetOperations(v []*Operation) *CreateRelationalDatabaseSnapshotOutput { + s.Operations = v + return s +} + +type DeleteDiskInput struct { + _ struct{} `type:"structure"` + + // The unique name of the disk you want to delete (e.g., my-disk). + // + // DiskName is a required field + DiskName *string `locationName:"diskName" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDiskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDiskInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDiskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDiskInput"} + if s.DiskName == nil { + invalidParams.Add(request.NewErrParamRequired("DiskName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDiskName sets the DiskName field's value. +func (s *DeleteDiskInput) SetDiskName(v string) *DeleteDiskInput { + s.DiskName = &v + return s +} + +type DeleteDiskOutput struct { + _ struct{} `type:"structure"` + + // An object describing the API operations. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s DeleteDiskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDiskOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *DeleteDiskOutput) SetOperations(v []*Operation) *DeleteDiskOutput { + s.Operations = v + return s +} + +type DeleteDiskSnapshotInput struct { + _ struct{} `type:"structure"` + + // The name of the disk snapshot you want to delete (e.g., my-disk-snapshot). + // + // DiskSnapshotName is a required field + DiskSnapshotName *string `locationName:"diskSnapshotName" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDiskSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDiskSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDiskSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDiskSnapshotInput"} + if s.DiskSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("DiskSnapshotName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDiskSnapshotName sets the DiskSnapshotName field's value. +func (s *DeleteDiskSnapshotInput) SetDiskSnapshotName(v string) *DeleteDiskSnapshotInput { + s.DiskSnapshotName = &v + return s +} + +type DeleteDiskSnapshotOutput struct { + _ struct{} `type:"structure"` + + // An object describing the API operations. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s DeleteDiskSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDiskSnapshotOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *DeleteDiskSnapshotOutput) SetOperations(v []*Operation) *DeleteDiskSnapshotOutput { + s.Operations = v + return s +} + +type DeleteDomainEntryInput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs containing information about your domain entries. + // + // DomainEntry is a required field + DomainEntry *DomainEntry `locationName:"domainEntry" type:"structure" required:"true"` + + // The name of the domain entry to delete. + // + // DomainName is a required field + DomainName *string `locationName:"domainName" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDomainEntryInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDomainEntryInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDomainEntryInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDomainEntryInput"} + if s.DomainEntry == nil { + invalidParams.Add(request.NewErrParamRequired("DomainEntry")) + } + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainEntry sets the DomainEntry field's value. +func (s *DeleteDomainEntryInput) SetDomainEntry(v *DomainEntry) *DeleteDomainEntryInput { + s.DomainEntry = v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *DeleteDomainEntryInput) SetDomainName(v string) *DeleteDomainEntryInput { + s.DomainName = &v + return s +} + +type DeleteDomainEntryOutput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs containing information about the results of your + // delete domain entry request. + Operation *Operation `locationName:"operation" type:"structure"` +} + +// String returns the string representation +func (s DeleteDomainEntryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDomainEntryOutput) GoString() string { + return s.String() +} + +// SetOperation sets the Operation field's value. +func (s *DeleteDomainEntryOutput) SetOperation(v *Operation) *DeleteDomainEntryOutput { + s.Operation = v + return s +} + +type DeleteDomainInput struct { + _ struct{} `type:"structure"` + + // The specific domain name to delete. + // + // DomainName is a required field + DomainName *string `locationName:"domainName" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDomainInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDomainInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDomainInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDomainInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomainName sets the DomainName field's value. +func (s *DeleteDomainInput) SetDomainName(v string) *DeleteDomainInput { + s.DomainName = &v + return s +} + +type DeleteDomainOutput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs containing information about the results of your + // delete domain request. + Operation *Operation `locationName:"operation" type:"structure"` +} + +// String returns the string representation +func (s DeleteDomainOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDomainOutput) GoString() string { + return s.String() +} + +// SetOperation sets the Operation field's value. +func (s *DeleteDomainOutput) SetOperation(v *Operation) *DeleteDomainOutput { + s.Operation = v + return s +} + +type DeleteInstanceInput struct { + _ struct{} `type:"structure"` + + // The name of the instance to delete. + // + // InstanceName is a required field + InstanceName *string `locationName:"instanceName" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteInstanceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteInstanceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteInstanceInput"} + if s.InstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInstanceName sets the InstanceName field's value. +func (s *DeleteInstanceInput) SetInstanceName(v string) *DeleteInstanceInput { + s.InstanceName = &v return s } -type AllocateStaticIpOutput struct { +type DeleteInstanceOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the static IP address - // you allocated. + // An array of key-value pairs containing information about the results of your + // delete instance request. Operations []*Operation `locationName:"operations" type:"list"` } // String returns the string representation -func (s AllocateStaticIpOutput) String() string { +func (s DeleteInstanceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AllocateStaticIpOutput) GoString() string { +func (s DeleteInstanceOutput) GoString() string { return s.String() } // SetOperations sets the Operations field's value. -func (s *AllocateStaticIpOutput) SetOperations(v []*Operation) *AllocateStaticIpOutput { +func (s *DeleteInstanceOutput) SetOperations(v []*Operation) *DeleteInstanceOutput { s.Operations = v return s } -type AttachDiskInput struct { +type DeleteInstanceSnapshotInput struct { _ struct{} `type:"structure"` - // The unique Lightsail disk name (e.g., my-disk). + // The name of the snapshot to delete. // - // DiskName is a required field - DiskName *string `locationName:"diskName" type:"string" required:"true"` + // InstanceSnapshotName is a required field + InstanceSnapshotName *string `locationName:"instanceSnapshotName" type:"string" required:"true"` +} - // The disk path to expose to the instance (e.g., /dev/xvdf). +// String returns the string representation +func (s DeleteInstanceSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteInstanceSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteInstanceSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteInstanceSnapshotInput"} + if s.InstanceSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceSnapshotName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInstanceSnapshotName sets the InstanceSnapshotName field's value. +func (s *DeleteInstanceSnapshotInput) SetInstanceSnapshotName(v string) *DeleteInstanceSnapshotInput { + s.InstanceSnapshotName = &v + return s +} + +type DeleteInstanceSnapshotOutput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs containing information about the results of your + // delete instance snapshot request. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s DeleteInstanceSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteInstanceSnapshotOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *DeleteInstanceSnapshotOutput) SetOperations(v []*Operation) *DeleteInstanceSnapshotOutput { + s.Operations = v + return s +} + +type DeleteKeyPairInput struct { + _ struct{} `type:"structure"` + + // The name of the key pair to delete. // - // DiskPath is a required field - DiskPath *string `locationName:"diskPath" type:"string" required:"true"` + // KeyPairName is a required field + KeyPairName *string `locationName:"keyPairName" type:"string" required:"true"` +} - // The name of the Lightsail instance where you want to utilize the storage - // disk. +// String returns the string representation +func (s DeleteKeyPairInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteKeyPairInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteKeyPairInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteKeyPairInput"} + if s.KeyPairName == nil { + invalidParams.Add(request.NewErrParamRequired("KeyPairName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKeyPairName sets the KeyPairName field's value. +func (s *DeleteKeyPairInput) SetKeyPairName(v string) *DeleteKeyPairInput { + s.KeyPairName = &v + return s +} + +type DeleteKeyPairOutput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs containing information about the results of your + // delete key pair request. + Operation *Operation `locationName:"operation" type:"structure"` +} + +// String returns the string representation +func (s DeleteKeyPairOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteKeyPairOutput) GoString() string { + return s.String() +} + +// SetOperation sets the Operation field's value. +func (s *DeleteKeyPairOutput) SetOperation(v *Operation) *DeleteKeyPairOutput { + s.Operation = v + return s +} + +type DeleteLoadBalancerInput struct { + _ struct{} `type:"structure"` + + // The name of the load balancer you want to delete. // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` + // LoadBalancerName is a required field + LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` } // String returns the string representation -func (s AttachDiskInput) String() string { +func (s DeleteLoadBalancerInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AttachDiskInput) GoString() string { +func (s DeleteLoadBalancerInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *AttachDiskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachDiskInput"} - if s.DiskName == nil { - invalidParams.Add(request.NewErrParamRequired("DiskName")) +func (s *DeleteLoadBalancerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLoadBalancerInput"} + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) } - if s.DiskPath == nil { - invalidParams.Add(request.NewErrParamRequired("DiskPath")) + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLoadBalancerName sets the LoadBalancerName field's value. +func (s *DeleteLoadBalancerInput) SetLoadBalancerName(v string) *DeleteLoadBalancerInput { + s.LoadBalancerName = &v + return s +} + +type DeleteLoadBalancerOutput struct { + _ struct{} `type:"structure"` + + // An object describing the API operations. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s DeleteLoadBalancerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLoadBalancerOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *DeleteLoadBalancerOutput) SetOperations(v []*Operation) *DeleteLoadBalancerOutput { + s.Operations = v + return s +} + +type DeleteLoadBalancerTlsCertificateInput struct { + _ struct{} `type:"structure"` + + // The SSL/TLS certificate name. + // + // CertificateName is a required field + CertificateName *string `locationName:"certificateName" type:"string" required:"true"` + + // When true, forces the deletion of an SSL/TLS certificate. + // + // There can be two certificates associated with a Lightsail load balancer: + // the primary and the backup. The force parameter is required when the primary + // SSL/TLS certificate is in use by an instance attached to the load balancer. + Force *bool `locationName:"force" type:"boolean"` + + // The load balancer name. + // + // LoadBalancerName is a required field + LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteLoadBalancerTlsCertificateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLoadBalancerTlsCertificateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteLoadBalancerTlsCertificateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLoadBalancerTlsCertificateInput"} + if s.CertificateName == nil { + invalidParams.Add(request.NewErrParamRequired("CertificateName")) } - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) } if invalidParams.Len() > 0 { @@ -7605,25 +14115,25 @@ func (s *AttachDiskInput) Validate() error { return nil } -// SetDiskName sets the DiskName field's value. -func (s *AttachDiskInput) SetDiskName(v string) *AttachDiskInput { - s.DiskName = &v +// SetCertificateName sets the CertificateName field's value. +func (s *DeleteLoadBalancerTlsCertificateInput) SetCertificateName(v string) *DeleteLoadBalancerTlsCertificateInput { + s.CertificateName = &v return s } -// SetDiskPath sets the DiskPath field's value. -func (s *AttachDiskInput) SetDiskPath(v string) *AttachDiskInput { - s.DiskPath = &v +// SetForce sets the Force field's value. +func (s *DeleteLoadBalancerTlsCertificateInput) SetForce(v bool) *DeleteLoadBalancerTlsCertificateInput { + s.Force = &v return s } -// SetInstanceName sets the InstanceName field's value. -func (s *AttachDiskInput) SetInstanceName(v string) *AttachDiskInput { - s.InstanceName = &v +// SetLoadBalancerName sets the LoadBalancerName field's value. +func (s *DeleteLoadBalancerTlsCertificateInput) SetLoadBalancerName(v string) *DeleteLoadBalancerTlsCertificateInput { + s.LoadBalancerName = &v return s } -type AttachDiskOutput struct { +type DeleteLoadBalancerTlsCertificateOutput struct { _ struct{} `type:"structure"` // An object describing the API operations. @@ -7631,60 +14141,68 @@ type AttachDiskOutput struct { } // String returns the string representation -func (s AttachDiskOutput) String() string { +func (s DeleteLoadBalancerTlsCertificateOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AttachDiskOutput) GoString() string { +func (s DeleteLoadBalancerTlsCertificateOutput) GoString() string { return s.String() } // SetOperations sets the Operations field's value. -func (s *AttachDiskOutput) SetOperations(v []*Operation) *AttachDiskOutput { +func (s *DeleteLoadBalancerTlsCertificateOutput) SetOperations(v []*Operation) *DeleteLoadBalancerTlsCertificateOutput { s.Operations = v return s } -type AttachInstancesToLoadBalancerInput struct { +type DeleteRelationalDatabaseInput struct { _ struct{} `type:"structure"` - // An array of strings representing the instance name(s) you want to attach - // to your load balancer. + // The name of the database snapshot created if skip final snapshot is false, + // which is the default value for that parameter. // - // An instance must be running before you can attach it to your load balancer. + // Specifying this parameter and also specifying the skip final snapshot parameter + // to true results in an error. // - // There are no additional limits on the number of instances you can attach - // to your load balancer, aside from the limit of Lightsail instances you can - // create in your account (20). + // Constraints: // - // InstanceNames is a required field - InstanceNames []*string `locationName:"instanceNames" type:"list" required:"true"` + // * Must contain from 2 to 255 alphanumeric characters, or hyphens. + // + // * The first and last character must be a letter or number. + FinalRelationalDatabaseSnapshotName *string `locationName:"finalRelationalDatabaseSnapshotName" type:"string"` - // The name of the load balancer. + // The name of the database that you are deleting. // - // LoadBalancerName is a required field - LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` + + // Determines whether a final database snapshot is created before your database + // is deleted. If true is specified, no database snapshot is created. If false + // is specified, a database snapshot is created before your database is deleted. + // + // You must specify the final relational database snapshot name parameter if + // the skip final snapshot parameter is false. + // + // Default: false + SkipFinalSnapshot *bool `locationName:"skipFinalSnapshot" type:"boolean"` } // String returns the string representation -func (s AttachInstancesToLoadBalancerInput) String() string { +func (s DeleteRelationalDatabaseInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AttachInstancesToLoadBalancerInput) GoString() string { +func (s DeleteRelationalDatabaseInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *AttachInstancesToLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachInstancesToLoadBalancerInput"} - if s.InstanceNames == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceNames")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) +func (s *DeleteRelationalDatabaseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRelationalDatabaseInput"} + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) } if invalidParams.Len() > 0 { @@ -7693,74 +14211,71 @@ func (s *AttachInstancesToLoadBalancerInput) Validate() error { return nil } -// SetInstanceNames sets the InstanceNames field's value. -func (s *AttachInstancesToLoadBalancerInput) SetInstanceNames(v []*string) *AttachInstancesToLoadBalancerInput { - s.InstanceNames = v +// SetFinalRelationalDatabaseSnapshotName sets the FinalRelationalDatabaseSnapshotName field's value. +func (s *DeleteRelationalDatabaseInput) SetFinalRelationalDatabaseSnapshotName(v string) *DeleteRelationalDatabaseInput { + s.FinalRelationalDatabaseSnapshotName = &v return s } -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *AttachInstancesToLoadBalancerInput) SetLoadBalancerName(v string) *AttachInstancesToLoadBalancerInput { - s.LoadBalancerName = &v +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *DeleteRelationalDatabaseInput) SetRelationalDatabaseName(v string) *DeleteRelationalDatabaseInput { + s.RelationalDatabaseName = &v return s } -type AttachInstancesToLoadBalancerOutput struct { +// SetSkipFinalSnapshot sets the SkipFinalSnapshot field's value. +func (s *DeleteRelationalDatabaseInput) SetSkipFinalSnapshot(v bool) *DeleteRelationalDatabaseInput { + s.SkipFinalSnapshot = &v + return s +} + +type DeleteRelationalDatabaseOutput struct { _ struct{} `type:"structure"` - // An object representing the API operations. + // An object describing the result of your delete relational database request. Operations []*Operation `locationName:"operations" type:"list"` } // String returns the string representation -func (s AttachInstancesToLoadBalancerOutput) String() string { +func (s DeleteRelationalDatabaseOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AttachInstancesToLoadBalancerOutput) GoString() string { +func (s DeleteRelationalDatabaseOutput) GoString() string { return s.String() } // SetOperations sets the Operations field's value. -func (s *AttachInstancesToLoadBalancerOutput) SetOperations(v []*Operation) *AttachInstancesToLoadBalancerOutput { +func (s *DeleteRelationalDatabaseOutput) SetOperations(v []*Operation) *DeleteRelationalDatabaseOutput { s.Operations = v return s } -type AttachLoadBalancerTlsCertificateInput struct { +type DeleteRelationalDatabaseSnapshotInput struct { _ struct{} `type:"structure"` - // The name of your SSL/TLS certificate. - // - // CertificateName is a required field - CertificateName *string `locationName:"certificateName" type:"string" required:"true"` - - // The name of the load balancer to which you want to associate the SSL/TLS - // certificate. + // The name of the database snapshot that you are deleting. // - // LoadBalancerName is a required field - LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` + // RelationalDatabaseSnapshotName is a required field + RelationalDatabaseSnapshotName *string `locationName:"relationalDatabaseSnapshotName" type:"string" required:"true"` } // String returns the string representation -func (s AttachLoadBalancerTlsCertificateInput) String() string { +func (s DeleteRelationalDatabaseSnapshotInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AttachLoadBalancerTlsCertificateInput) GoString() string { +func (s DeleteRelationalDatabaseSnapshotInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *AttachLoadBalancerTlsCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachLoadBalancerTlsCertificateInput"} - if s.CertificateName == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateName")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) +func (s *DeleteRelationalDatabaseSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteRelationalDatabaseSnapshotInput"} + if s.RelationalDatabaseSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseSnapshotName")) } if invalidParams.Len() > 0 { @@ -7769,76 +14284,94 @@ func (s *AttachLoadBalancerTlsCertificateInput) Validate() error { return nil } -// SetCertificateName sets the CertificateName field's value. -func (s *AttachLoadBalancerTlsCertificateInput) SetCertificateName(v string) *AttachLoadBalancerTlsCertificateInput { - s.CertificateName = &v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *AttachLoadBalancerTlsCertificateInput) SetLoadBalancerName(v string) *AttachLoadBalancerTlsCertificateInput { - s.LoadBalancerName = &v +// SetRelationalDatabaseSnapshotName sets the RelationalDatabaseSnapshotName field's value. +func (s *DeleteRelationalDatabaseSnapshotInput) SetRelationalDatabaseSnapshotName(v string) *DeleteRelationalDatabaseSnapshotInput { + s.RelationalDatabaseSnapshotName = &v return s } -type AttachLoadBalancerTlsCertificateOutput struct { +type DeleteRelationalDatabaseSnapshotOutput struct { _ struct{} `type:"structure"` - // An object representing the API operations. - // - // These SSL/TLS certificates are only usable by Lightsail load balancers. You - // can't get the certificate and use it for another purpose. + // An object describing the result of your delete relational database snapshot + // request. Operations []*Operation `locationName:"operations" type:"list"` } // String returns the string representation -func (s AttachLoadBalancerTlsCertificateOutput) String() string { +func (s DeleteRelationalDatabaseSnapshotOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AttachLoadBalancerTlsCertificateOutput) GoString() string { +func (s DeleteRelationalDatabaseSnapshotOutput) GoString() string { return s.String() } // SetOperations sets the Operations field's value. -func (s *AttachLoadBalancerTlsCertificateOutput) SetOperations(v []*Operation) *AttachLoadBalancerTlsCertificateOutput { +func (s *DeleteRelationalDatabaseSnapshotOutput) SetOperations(v []*Operation) *DeleteRelationalDatabaseSnapshotOutput { s.Operations = v return s } -type AttachStaticIpInput struct { +// Describes the destination of a record. +type DestinationInfo struct { _ struct{} `type:"structure"` - // The instance name to which you want to attach the static IP address. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` + // The ID of the resource created at the destination. + Id *string `locationName:"id" type:"string"` - // The name of the static IP. + // The destination service of the record. + Service *string `locationName:"service" type:"string"` +} + +// String returns the string representation +func (s DestinationInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DestinationInfo) GoString() string { + return s.String() +} + +// SetId sets the Id field's value. +func (s *DestinationInfo) SetId(v string) *DestinationInfo { + s.Id = &v + return s +} + +// SetService sets the Service field's value. +func (s *DestinationInfo) SetService(v string) *DestinationInfo { + s.Service = &v + return s +} + +type DetachDiskInput struct { + _ struct{} `type:"structure"` + + // The unique name of the disk you want to detach from your instance (e.g., + // my-disk). // - // StaticIpName is a required field - StaticIpName *string `locationName:"staticIpName" type:"string" required:"true"` + // DiskName is a required field + DiskName *string `locationName:"diskName" type:"string" required:"true"` } // String returns the string representation -func (s AttachStaticIpInput) String() string { +func (s DetachDiskInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AttachStaticIpInput) GoString() string { +func (s DetachDiskInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *AttachStaticIpInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachStaticIpInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } - if s.StaticIpName == nil { - invalidParams.Add(request.NewErrParamRequired("StaticIpName")) +func (s *DetachDiskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DetachDiskInput"} + if s.DiskName == nil { + invalidParams.Add(request.NewErrParamRequired("DiskName")) } if invalidParams.Len() > 0 { @@ -7847,786 +14380,824 @@ func (s *AttachStaticIpInput) Validate() error { return nil } -// SetInstanceName sets the InstanceName field's value. -func (s *AttachStaticIpInput) SetInstanceName(v string) *AttachStaticIpInput { - s.InstanceName = &v - return s -} - -// SetStaticIpName sets the StaticIpName field's value. -func (s *AttachStaticIpInput) SetStaticIpName(v string) *AttachStaticIpInput { - s.StaticIpName = &v +// SetDiskName sets the DiskName field's value. +func (s *DetachDiskInput) SetDiskName(v string) *DetachDiskInput { + s.DiskName = &v return s } -type AttachStaticIpOutput struct { +type DetachDiskOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about your API operations. + // An object describing the API operations. Operations []*Operation `locationName:"operations" type:"list"` } // String returns the string representation -func (s AttachStaticIpOutput) String() string { +func (s DetachDiskOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AttachStaticIpOutput) GoString() string { +func (s DetachDiskOutput) GoString() string { return s.String() } // SetOperations sets the Operations field's value. -func (s *AttachStaticIpOutput) SetOperations(v []*Operation) *AttachStaticIpOutput { +func (s *DetachDiskOutput) SetOperations(v []*Operation) *DetachDiskOutput { s.Operations = v return s } -// Describes an Availability Zone. -type AvailabilityZone struct { +type DetachInstancesFromLoadBalancerInput struct { _ struct{} `type:"structure"` - // The state of the Availability Zone. - State *string `locationName:"state" type:"string"` + // An array of strings containing the names of the instances you want to detach + // from the load balancer. + // + // InstanceNames is a required field + InstanceNames []*string `locationName:"instanceNames" type:"list" required:"true"` - // The name of the Availability Zone. The format is us-east-2a (case-sensitive). - ZoneName *string `locationName:"zoneName" type:"string"` + // The name of the Lightsail load balancer. + // + // LoadBalancerName is a required field + LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` } // String returns the string representation -func (s AvailabilityZone) String() string { +func (s DetachInstancesFromLoadBalancerInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AvailabilityZone) GoString() string { +func (s DetachInstancesFromLoadBalancerInput) GoString() string { return s.String() } -// SetState sets the State field's value. -func (s *AvailabilityZone) SetState(v string) *AvailabilityZone { - s.State = &v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *DetachInstancesFromLoadBalancerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DetachInstancesFromLoadBalancerInput"} + if s.InstanceNames == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceNames")) + } + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } -// SetZoneName sets the ZoneName field's value. -func (s *AvailabilityZone) SetZoneName(v string) *AvailabilityZone { - s.ZoneName = &v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// Describes a blueprint (a virtual private server image). -type Blueprint struct { - _ struct{} `type:"structure"` - - // The ID for the virtual private server image (e.g., app_wordpress_4_4 or app_lamp_7_0). - BlueprintId *string `locationName:"blueprintId" type:"string"` - - // The description of the blueprint. - Description *string `locationName:"description" type:"string"` - - // The group name of the blueprint (e.g., amazon-linux). - Group *string `locationName:"group" type:"string"` - - // A Boolean value indicating whether the blueprint is active. When you update - // your blueprints, you will inactivate old blueprints and keep the most recent - // versions active. - IsActive *bool `locationName:"isActive" type:"boolean"` - - // The end-user license agreement URL for the image or blueprint. - LicenseUrl *string `locationName:"licenseUrl" type:"string"` - - // The minimum bundle power required to run this blueprint. For example, you - // need a bundle with a power value of 500 or more to create an instance that - // uses a blueprint with a minimum power value of 500. 0 indicates that the - // blueprint runs on all instance sizes. - MinPower *int64 `locationName:"minPower" type:"integer"` - - // The friendly name of the blueprint (e.g., Amazon Linux). - Name *string `locationName:"name" type:"string"` - - // The operating system platform (either Linux/Unix-based or Windows Server-based) - // of the blueprint. - Platform *string `locationName:"platform" type:"string" enum:"InstancePlatform"` - - // The product URL to learn more about the image or blueprint. - ProductUrl *string `locationName:"productUrl" type:"string"` +// SetInstanceNames sets the InstanceNames field's value. +func (s *DetachInstancesFromLoadBalancerInput) SetInstanceNames(v []*string) *DetachInstancesFromLoadBalancerInput { + s.InstanceNames = v + return s +} - // The type of the blueprint (e.g., os or app). - Type *string `locationName:"type" type:"string" enum:"BlueprintType"` +// SetLoadBalancerName sets the LoadBalancerName field's value. +func (s *DetachInstancesFromLoadBalancerInput) SetLoadBalancerName(v string) *DetachInstancesFromLoadBalancerInput { + s.LoadBalancerName = &v + return s +} - // The version number of the operating system, application, or stack (e.g., - // 2016.03.0). - Version *string `locationName:"version" type:"string"` +type DetachInstancesFromLoadBalancerOutput struct { + _ struct{} `type:"structure"` - // The version code. - VersionCode *string `locationName:"versionCode" type:"string"` + // An object describing the API operations. + Operations []*Operation `locationName:"operations" type:"list"` } // String returns the string representation -func (s Blueprint) String() string { +func (s DetachInstancesFromLoadBalancerOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Blueprint) GoString() string { +func (s DetachInstancesFromLoadBalancerOutput) GoString() string { return s.String() } -// SetBlueprintId sets the BlueprintId field's value. -func (s *Blueprint) SetBlueprintId(v string) *Blueprint { - s.BlueprintId = &v +// SetOperations sets the Operations field's value. +func (s *DetachInstancesFromLoadBalancerOutput) SetOperations(v []*Operation) *DetachInstancesFromLoadBalancerOutput { + s.Operations = v return s } -// SetDescription sets the Description field's value. -func (s *Blueprint) SetDescription(v string) *Blueprint { - s.Description = &v - return s -} +type DetachStaticIpInput struct { + _ struct{} `type:"structure"` -// SetGroup sets the Group field's value. -func (s *Blueprint) SetGroup(v string) *Blueprint { - s.Group = &v - return s + // The name of the static IP to detach from the instance. + // + // StaticIpName is a required field + StaticIpName *string `locationName:"staticIpName" type:"string" required:"true"` } -// SetIsActive sets the IsActive field's value. -func (s *Blueprint) SetIsActive(v bool) *Blueprint { - s.IsActive = &v - return s +// String returns the string representation +func (s DetachStaticIpInput) String() string { + return awsutil.Prettify(s) } -// SetLicenseUrl sets the LicenseUrl field's value. -func (s *Blueprint) SetLicenseUrl(v string) *Blueprint { - s.LicenseUrl = &v - return s +// GoString returns the string representation +func (s DetachStaticIpInput) GoString() string { + return s.String() } -// SetMinPower sets the MinPower field's value. -func (s *Blueprint) SetMinPower(v int64) *Blueprint { - s.MinPower = &v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *DetachStaticIpInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DetachStaticIpInput"} + if s.StaticIpName == nil { + invalidParams.Add(request.NewErrParamRequired("StaticIpName")) + } -// SetName sets the Name field's value. -func (s *Blueprint) SetName(v string) *Blueprint { - s.Name = &v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetPlatform sets the Platform field's value. -func (s *Blueprint) SetPlatform(v string) *Blueprint { - s.Platform = &v +// SetStaticIpName sets the StaticIpName field's value. +func (s *DetachStaticIpInput) SetStaticIpName(v string) *DetachStaticIpInput { + s.StaticIpName = &v return s } -// SetProductUrl sets the ProductUrl field's value. -func (s *Blueprint) SetProductUrl(v string) *Blueprint { - s.ProductUrl = &v - return s +type DetachStaticIpOutput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs containing information about the results of your + // detach static IP request. + Operations []*Operation `locationName:"operations" type:"list"` } -// SetType sets the Type field's value. -func (s *Blueprint) SetType(v string) *Blueprint { - s.Type = &v - return s +// String returns the string representation +func (s DetachStaticIpOutput) String() string { + return awsutil.Prettify(s) } -// SetVersion sets the Version field's value. -func (s *Blueprint) SetVersion(v string) *Blueprint { - s.Version = &v - return s +// GoString returns the string representation +func (s DetachStaticIpOutput) GoString() string { + return s.String() } -// SetVersionCode sets the VersionCode field's value. -func (s *Blueprint) SetVersionCode(v string) *Blueprint { - s.VersionCode = &v +// SetOperations sets the Operations field's value. +func (s *DetachStaticIpOutput) SetOperations(v []*Operation) *DetachStaticIpOutput { + s.Operations = v return s } -// Describes a bundle, which is a set of specs describing your virtual private -// server (or instance). -type Bundle struct { +// Describes a system disk or an block storage disk. +type Disk struct { _ struct{} `type:"structure"` - // The bundle ID (e.g., micro_1_0). - BundleId *string `locationName:"bundleId" type:"string"` + // The Amazon Resource Name (ARN) of the disk. + Arn *string `locationName:"arn" type:"string"` - // The number of vCPUs included in the bundle (e.g., 2). - CpuCount *int64 `locationName:"cpuCount" type:"integer"` + // The resources to which the disk is attached. + AttachedTo *string `locationName:"attachedTo" type:"string"` - // The size of the SSD (e.g., 30). - DiskSizeInGb *int64 `locationName:"diskSizeInGb" type:"integer"` + // (Deprecated) The attachment state of the disk. + // + // In releases prior to November 14, 2017, this parameter returned attached + // for system disks in the API response. It is now deprecated, but still included + // in the response. Use isAttached instead. + // + // Deprecated: AttachmentState has been deprecated + AttachmentState *string `locationName:"attachmentState" deprecated:"true" type:"string"` - // The Amazon EC2 instance type (e.g., t2.micro). - InstanceType *string `locationName:"instanceType" type:"string"` + // The date when the disk was created. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - // A Boolean value indicating whether the bundle is active. - IsActive *bool `locationName:"isActive" type:"boolean"` + // (Deprecated) The number of GB in use by the disk. + // + // In releases prior to November 14, 2017, this parameter was not included in + // the API response. It is now deprecated. + // + // Deprecated: GbInUse has been deprecated + GbInUse *int64 `locationName:"gbInUse" deprecated:"true" type:"integer"` - // A friendly name for the bundle (e.g., Micro). + // The input/output operations per second (IOPS) of the disk. + Iops *int64 `locationName:"iops" type:"integer"` + + // A Boolean value indicating whether the disk is attached. + IsAttached *bool `locationName:"isAttached" type:"boolean"` + + // A Boolean value indicating whether this disk is a system disk (has an operating + // system loaded on it). + IsSystemDisk *bool `locationName:"isSystemDisk" type:"boolean"` + + // The AWS Region and Availability Zone where the disk is located. + Location *ResourceLocation `locationName:"location" type:"structure"` + + // The unique name of the disk. Name *string `locationName:"name" type:"string"` - // A numeric value that represents the power of the bundle (e.g., 500). You - // can use the bundle's power value in conjunction with a blueprint's minimum - // power value to determine whether the blueprint will run on the bundle. For - // example, you need a bundle with a power value of 500 or more to create an - // instance that uses a blueprint with a minimum power value of 500. - Power *int64 `locationName:"power" type:"integer"` + // The disk path. + Path *string `locationName:"path" type:"string"` - // The price in US dollars (e.g., 5.0). - Price *float64 `locationName:"price" type:"float"` + // The Lightsail resource type (e.g., Disk). + ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - // The amount of RAM in GB (e.g., 2.0). - RamSizeInGb *float64 `locationName:"ramSizeInGb" type:"float"` + // The size of the disk in GB. + SizeInGb *int64 `locationName:"sizeInGb" type:"integer"` - // The operating system platform (Linux/Unix-based or Windows Server-based) - // that the bundle supports. You can only launch a WINDOWS bundle on a blueprint - // that supports the WINDOWS platform. LINUX_UNIX blueprints require a LINUX_UNIX - // bundle. - SupportedPlatforms []*string `locationName:"supportedPlatforms" type:"list"` + // Describes the status of the disk. + State *string `locationName:"state" type:"string" enum:"DiskState"` - // The data transfer rate per month in GB (e.g., 2000). - TransferPerMonthInGb *int64 `locationName:"transferPerMonthInGb" type:"integer"` + // The support code. Include this code in your email to support when you have + // questions about an instance or another resource in Lightsail. This code enables + // our support team to look up your Lightsail information more easily. + SupportCode *string `locationName:"supportCode" type:"string"` + + // The tag keys and optional values for the resource. For more information about + // tags in Lightsail, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-tags). + Tags []*Tag `locationName:"tags" type:"list"` } // String returns the string representation -func (s Bundle) String() string { +func (s Disk) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Bundle) GoString() string { +func (s Disk) GoString() string { return s.String() } -// SetBundleId sets the BundleId field's value. -func (s *Bundle) SetBundleId(v string) *Bundle { - s.BundleId = &v +// SetArn sets the Arn field's value. +func (s *Disk) SetArn(v string) *Disk { + s.Arn = &v return s } -// SetCpuCount sets the CpuCount field's value. -func (s *Bundle) SetCpuCount(v int64) *Bundle { - s.CpuCount = &v +// SetAttachedTo sets the AttachedTo field's value. +func (s *Disk) SetAttachedTo(v string) *Disk { + s.AttachedTo = &v return s } -// SetDiskSizeInGb sets the DiskSizeInGb field's value. -func (s *Bundle) SetDiskSizeInGb(v int64) *Bundle { - s.DiskSizeInGb = &v +// SetAttachmentState sets the AttachmentState field's value. +func (s *Disk) SetAttachmentState(v string) *Disk { + s.AttachmentState = &v return s } -// SetInstanceType sets the InstanceType field's value. -func (s *Bundle) SetInstanceType(v string) *Bundle { - s.InstanceType = &v +// SetCreatedAt sets the CreatedAt field's value. +func (s *Disk) SetCreatedAt(v time.Time) *Disk { + s.CreatedAt = &v return s } -// SetIsActive sets the IsActive field's value. -func (s *Bundle) SetIsActive(v bool) *Bundle { - s.IsActive = &v +// SetGbInUse sets the GbInUse field's value. +func (s *Disk) SetGbInUse(v int64) *Disk { + s.GbInUse = &v + return s +} + +// SetIops sets the Iops field's value. +func (s *Disk) SetIops(v int64) *Disk { + s.Iops = &v + return s +} + +// SetIsAttached sets the IsAttached field's value. +func (s *Disk) SetIsAttached(v bool) *Disk { + s.IsAttached = &v + return s +} + +// SetIsSystemDisk sets the IsSystemDisk field's value. +func (s *Disk) SetIsSystemDisk(v bool) *Disk { + s.IsSystemDisk = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *Disk) SetLocation(v *ResourceLocation) *Disk { + s.Location = v return s } // SetName sets the Name field's value. -func (s *Bundle) SetName(v string) *Bundle { +func (s *Disk) SetName(v string) *Disk { s.Name = &v return s } -// SetPower sets the Power field's value. -func (s *Bundle) SetPower(v int64) *Bundle { - s.Power = &v +// SetPath sets the Path field's value. +func (s *Disk) SetPath(v string) *Disk { + s.Path = &v return s } -// SetPrice sets the Price field's value. -func (s *Bundle) SetPrice(v float64) *Bundle { - s.Price = &v +// SetResourceType sets the ResourceType field's value. +func (s *Disk) SetResourceType(v string) *Disk { + s.ResourceType = &v return s } -// SetRamSizeInGb sets the RamSizeInGb field's value. -func (s *Bundle) SetRamSizeInGb(v float64) *Bundle { - s.RamSizeInGb = &v +// SetSizeInGb sets the SizeInGb field's value. +func (s *Disk) SetSizeInGb(v int64) *Disk { + s.SizeInGb = &v return s } -// SetSupportedPlatforms sets the SupportedPlatforms field's value. -func (s *Bundle) SetSupportedPlatforms(v []*string) *Bundle { - s.SupportedPlatforms = v +// SetState sets the State field's value. +func (s *Disk) SetState(v string) *Disk { + s.State = &v return s } -// SetTransferPerMonthInGb sets the TransferPerMonthInGb field's value. -func (s *Bundle) SetTransferPerMonthInGb(v int64) *Bundle { - s.TransferPerMonthInGb = &v +// SetSupportCode sets the SupportCode field's value. +func (s *Disk) SetSupportCode(v string) *Disk { + s.SupportCode = &v return s } -type CloseInstancePublicPortsInput struct { +// SetTags sets the Tags field's value. +func (s *Disk) SetTags(v []*Tag) *Disk { + s.Tags = v + return s +} + +// Describes a disk. +type DiskInfo struct { _ struct{} `type:"structure"` - // The name of the instance on which you're attempting to close the public ports. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` + // A Boolean value indicating whether this disk is a system disk (has an operating + // system loaded on it). + IsSystemDisk *bool `locationName:"isSystemDisk" type:"boolean"` - // Information about the public port you are trying to close. - // - // PortInfo is a required field - PortInfo *PortInfo `locationName:"portInfo" type:"structure" required:"true"` + // The disk name. + Name *string `locationName:"name" type:"string"` + + // The disk path. + Path *string `locationName:"path" type:"string"` + + // The size of the disk in GB (e.g., 32). + SizeInGb *int64 `locationName:"sizeInGb" type:"integer"` } // String returns the string representation -func (s CloseInstancePublicPortsInput) String() string { +func (s DiskInfo) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CloseInstancePublicPortsInput) GoString() string { +func (s DiskInfo) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CloseInstancePublicPortsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CloseInstancePublicPortsInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } - if s.PortInfo == nil { - invalidParams.Add(request.NewErrParamRequired("PortInfo")) - } +// SetIsSystemDisk sets the IsSystemDisk field's value. +func (s *DiskInfo) SetIsSystemDisk(v bool) *DiskInfo { + s.IsSystemDisk = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetName sets the Name field's value. +func (s *DiskInfo) SetName(v string) *DiskInfo { + s.Name = &v + return s } -// SetInstanceName sets the InstanceName field's value. -func (s *CloseInstancePublicPortsInput) SetInstanceName(v string) *CloseInstancePublicPortsInput { - s.InstanceName = &v +// SetPath sets the Path field's value. +func (s *DiskInfo) SetPath(v string) *DiskInfo { + s.Path = &v return s } -// SetPortInfo sets the PortInfo field's value. -func (s *CloseInstancePublicPortsInput) SetPortInfo(v *PortInfo) *CloseInstancePublicPortsInput { - s.PortInfo = v +// SetSizeInGb sets the SizeInGb field's value. +func (s *DiskInfo) SetSizeInGb(v int64) *DiskInfo { + s.SizeInGb = &v return s } -type CloseInstancePublicPortsOutput struct { +// Describes a block storage disk mapping. +type DiskMap struct { _ struct{} `type:"structure"` - // An array of key-value pairs that contains information about the operation. - Operation *Operation `locationName:"operation" type:"structure"` + // The new disk name (e.g., my-new-disk). + NewDiskName *string `locationName:"newDiskName" type:"string"` + + // The original disk path exposed to the instance (for example, /dev/sdh). + OriginalDiskPath *string `locationName:"originalDiskPath" type:"string"` } // String returns the string representation -func (s CloseInstancePublicPortsOutput) String() string { +func (s DiskMap) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CloseInstancePublicPortsOutput) GoString() string { +func (s DiskMap) GoString() string { return s.String() } -// SetOperation sets the Operation field's value. -func (s *CloseInstancePublicPortsOutput) SetOperation(v *Operation) *CloseInstancePublicPortsOutput { - s.Operation = v +// SetNewDiskName sets the NewDiskName field's value. +func (s *DiskMap) SetNewDiskName(v string) *DiskMap { + s.NewDiskName = &v return s } -type CreateDiskFromSnapshotInput struct { - _ struct{} `type:"structure"` - - // The Availability Zone where you want to create the disk (e.g., us-east-2a). - // Choose the same Availability Zone as the Lightsail instance where you want - // to create the disk. - // - // Use the GetRegions operation to list the Availability Zones where Lightsail - // is currently available. - // - // AvailabilityZone is a required field - AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` +// SetOriginalDiskPath sets the OriginalDiskPath field's value. +func (s *DiskMap) SetOriginalDiskPath(v string) *DiskMap { + s.OriginalDiskPath = &v + return s +} - // The unique Lightsail disk name (e.g., my-disk). - // - // DiskName is a required field - DiskName *string `locationName:"diskName" type:"string" required:"true"` +// Describes a block storage disk snapshot. +type DiskSnapshot struct { + _ struct{} `type:"structure"` - // The name of the disk snapshot (e.g., my-snapshot) from which to create the - // new storage disk. - // - // DiskSnapshotName is a required field - DiskSnapshotName *string `locationName:"diskSnapshotName" type:"string" required:"true"` + // The Amazon Resource Name (ARN) of the disk snapshot. + Arn *string `locationName:"arn" type:"string"` - // The size of the disk in GB (e.g., 32). - // - // SizeInGb is a required field - SizeInGb *int64 `locationName:"sizeInGb" type:"integer" required:"true"` -} + // The date when the disk snapshot was created. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` -// String returns the string representation -func (s CreateDiskFromSnapshotInput) String() string { - return awsutil.Prettify(s) -} + // The Amazon Resource Name (ARN) of the source disk from which you are creating + // the disk snapshot. + FromDiskArn *string `locationName:"fromDiskArn" type:"string"` -// GoString returns the string representation -func (s CreateDiskFromSnapshotInput) GoString() string { - return s.String() -} + // The unique name of the source disk from which you are creating the disk snapshot. + FromDiskName *string `locationName:"fromDiskName" type:"string"` -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDiskFromSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDiskFromSnapshotInput"} - if s.AvailabilityZone == nil { - invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) - } - if s.DiskName == nil { - invalidParams.Add(request.NewErrParamRequired("DiskName")) - } - if s.DiskSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("DiskSnapshotName")) - } - if s.SizeInGb == nil { - invalidParams.Add(request.NewErrParamRequired("SizeInGb")) - } + // The AWS Region and Availability Zone where the disk snapshot was created. + Location *ResourceLocation `locationName:"location" type:"structure"` - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} + // The name of the disk snapshot (e.g., my-disk-snapshot). + Name *string `locationName:"name" type:"string"` -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateDiskFromSnapshotInput) SetAvailabilityZone(v string) *CreateDiskFromSnapshotInput { - s.AvailabilityZone = &v - return s -} + // The progress of the disk snapshot operation. + Progress *string `locationName:"progress" type:"string"` -// SetDiskName sets the DiskName field's value. -func (s *CreateDiskFromSnapshotInput) SetDiskName(v string) *CreateDiskFromSnapshotInput { - s.DiskName = &v - return s -} + // The Lightsail resource type (e.g., DiskSnapshot). + ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` -// SetDiskSnapshotName sets the DiskSnapshotName field's value. -func (s *CreateDiskFromSnapshotInput) SetDiskSnapshotName(v string) *CreateDiskFromSnapshotInput { - s.DiskSnapshotName = &v - return s -} + // The size of the disk in GB. + SizeInGb *int64 `locationName:"sizeInGb" type:"integer"` -// SetSizeInGb sets the SizeInGb field's value. -func (s *CreateDiskFromSnapshotInput) SetSizeInGb(v int64) *CreateDiskFromSnapshotInput { - s.SizeInGb = &v - return s -} + // The status of the disk snapshot operation. + State *string `locationName:"state" type:"string" enum:"DiskSnapshotState"` -type CreateDiskFromSnapshotOutput struct { - _ struct{} `type:"structure"` + // The support code. Include this code in your email to support when you have + // questions about an instance or another resource in Lightsail. This code enables + // our support team to look up your Lightsail information more easily. + SupportCode *string `locationName:"supportCode" type:"string"` - // An object describing the API operations. - Operations []*Operation `locationName:"operations" type:"list"` + // The tag keys and optional values for the resource. For more information about + // tags in Lightsail, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-tags). + Tags []*Tag `locationName:"tags" type:"list"` } // String returns the string representation -func (s CreateDiskFromSnapshotOutput) String() string { +func (s DiskSnapshot) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateDiskFromSnapshotOutput) GoString() string { +func (s DiskSnapshot) GoString() string { return s.String() } -// SetOperations sets the Operations field's value. -func (s *CreateDiskFromSnapshotOutput) SetOperations(v []*Operation) *CreateDiskFromSnapshotOutput { - s.Operations = v +// SetArn sets the Arn field's value. +func (s *DiskSnapshot) SetArn(v string) *DiskSnapshot { + s.Arn = &v return s } -type CreateDiskInput struct { - _ struct{} `type:"structure"` - - // The Availability Zone where you want to create the disk (e.g., us-east-2a). - // Choose the same Availability Zone as the Lightsail instance where you want - // to create the disk. - // - // Use the GetRegions operation to list the Availability Zones where Lightsail - // is currently available. - // - // AvailabilityZone is a required field - AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` - - // The unique Lightsail disk name (e.g., my-disk). - // - // DiskName is a required field - DiskName *string `locationName:"diskName" type:"string" required:"true"` +// SetCreatedAt sets the CreatedAt field's value. +func (s *DiskSnapshot) SetCreatedAt(v time.Time) *DiskSnapshot { + s.CreatedAt = &v + return s +} - // The size of the disk in GB (e.g., 32). - // - // SizeInGb is a required field - SizeInGb *int64 `locationName:"sizeInGb" type:"integer" required:"true"` +// SetFromDiskArn sets the FromDiskArn field's value. +func (s *DiskSnapshot) SetFromDiskArn(v string) *DiskSnapshot { + s.FromDiskArn = &v + return s } -// String returns the string representation -func (s CreateDiskInput) String() string { - return awsutil.Prettify(s) +// SetFromDiskName sets the FromDiskName field's value. +func (s *DiskSnapshot) SetFromDiskName(v string) *DiskSnapshot { + s.FromDiskName = &v + return s } -// GoString returns the string representation -func (s CreateDiskInput) GoString() string { - return s.String() +// SetLocation sets the Location field's value. +func (s *DiskSnapshot) SetLocation(v *ResourceLocation) *DiskSnapshot { + s.Location = v + return s } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDiskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDiskInput"} - if s.AvailabilityZone == nil { - invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) - } - if s.DiskName == nil { - invalidParams.Add(request.NewErrParamRequired("DiskName")) - } - if s.SizeInGb == nil { - invalidParams.Add(request.NewErrParamRequired("SizeInGb")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetName sets the Name field's value. +func (s *DiskSnapshot) SetName(v string) *DiskSnapshot { + s.Name = &v + return s } -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateDiskInput) SetAvailabilityZone(v string) *CreateDiskInput { - s.AvailabilityZone = &v +// SetProgress sets the Progress field's value. +func (s *DiskSnapshot) SetProgress(v string) *DiskSnapshot { + s.Progress = &v return s } -// SetDiskName sets the DiskName field's value. -func (s *CreateDiskInput) SetDiskName(v string) *CreateDiskInput { - s.DiskName = &v +// SetResourceType sets the ResourceType field's value. +func (s *DiskSnapshot) SetResourceType(v string) *DiskSnapshot { + s.ResourceType = &v return s } // SetSizeInGb sets the SizeInGb field's value. -func (s *CreateDiskInput) SetSizeInGb(v int64) *CreateDiskInput { +func (s *DiskSnapshot) SetSizeInGb(v int64) *DiskSnapshot { s.SizeInGb = &v return s } -type CreateDiskOutput struct { +// SetState sets the State field's value. +func (s *DiskSnapshot) SetState(v string) *DiskSnapshot { + s.State = &v + return s +} + +// SetSupportCode sets the SupportCode field's value. +func (s *DiskSnapshot) SetSupportCode(v string) *DiskSnapshot { + s.SupportCode = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *DiskSnapshot) SetTags(v []*Tag) *DiskSnapshot { + s.Tags = v + return s +} + +// Describes a disk snapshot. +type DiskSnapshotInfo struct { _ struct{} `type:"structure"` - // An object describing the API operations. - Operations []*Operation `locationName:"operations" type:"list"` + // The size of the disk in GB (e.g., 32). + SizeInGb *int64 `locationName:"sizeInGb" type:"integer"` } // String returns the string representation -func (s CreateDiskOutput) String() string { +func (s DiskSnapshotInfo) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateDiskOutput) GoString() string { +func (s DiskSnapshotInfo) GoString() string { return s.String() } -// SetOperations sets the Operations field's value. -func (s *CreateDiskOutput) SetOperations(v []*Operation) *CreateDiskOutput { - s.Operations = v +// SetSizeInGb sets the SizeInGb field's value. +func (s *DiskSnapshotInfo) SetSizeInGb(v int64) *DiskSnapshotInfo { + s.SizeInGb = &v return s } -type CreateDiskSnapshotInput struct { +// Describes a domain where you are storing recordsets in Lightsail. +type Domain struct { _ struct{} `type:"structure"` - // The unique name of the source disk (e.g., my-source-disk). - // - // DiskName is a required field - DiskName *string `locationName:"diskName" type:"string" required:"true"` + // The Amazon Resource Name (ARN) of the domain recordset (e.g., arn:aws:lightsail:global:123456789101:Domain/824cede0-abc7-4f84-8dbc-12345EXAMPLE). + Arn *string `locationName:"arn" type:"string"` - // The name of the destination disk snapshot (e.g., my-disk-snapshot) based - // on the source disk. - // - // DiskSnapshotName is a required field - DiskSnapshotName *string `locationName:"diskSnapshotName" type:"string" required:"true"` + // The date when the domain recordset was created. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` + + // An array of key-value pairs containing information about the domain entries. + DomainEntries []*DomainEntry `locationName:"domainEntries" type:"list"` + + // The AWS Region and Availability Zones where the domain recordset was created. + Location *ResourceLocation `locationName:"location" type:"structure"` + + // The name of the domain. + Name *string `locationName:"name" type:"string"` + + // The resource type. + ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` + + // The support code. Include this code in your email to support when you have + // questions about an instance or another resource in Lightsail. This code enables + // our support team to look up your Lightsail information more easily. + SupportCode *string `locationName:"supportCode" type:"string"` + + // The tag keys and optional values for the resource. For more information about + // tags in Lightsail, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-tags). + Tags []*Tag `locationName:"tags" type:"list"` } // String returns the string representation -func (s CreateDiskSnapshotInput) String() string { +func (s Domain) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateDiskSnapshotInput) GoString() string { +func (s Domain) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDiskSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDiskSnapshotInput"} - if s.DiskName == nil { - invalidParams.Add(request.NewErrParamRequired("DiskName")) - } - if s.DiskSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("DiskSnapshotName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetArn sets the Arn field's value. +func (s *Domain) SetArn(v string) *Domain { + s.Arn = &v + return s } -// SetDiskName sets the DiskName field's value. -func (s *CreateDiskSnapshotInput) SetDiskName(v string) *CreateDiskSnapshotInput { - s.DiskName = &v +// SetCreatedAt sets the CreatedAt field's value. +func (s *Domain) SetCreatedAt(v time.Time) *Domain { + s.CreatedAt = &v return s } -// SetDiskSnapshotName sets the DiskSnapshotName field's value. -func (s *CreateDiskSnapshotInput) SetDiskSnapshotName(v string) *CreateDiskSnapshotInput { - s.DiskSnapshotName = &v +// SetDomainEntries sets the DomainEntries field's value. +func (s *Domain) SetDomainEntries(v []*DomainEntry) *Domain { + s.DomainEntries = v return s } -type CreateDiskSnapshotOutput struct { - _ struct{} `type:"structure"` +// SetLocation sets the Location field's value. +func (s *Domain) SetLocation(v *ResourceLocation) *Domain { + s.Location = v + return s +} - // An object describing the API operations. - Operations []*Operation `locationName:"operations" type:"list"` +// SetName sets the Name field's value. +func (s *Domain) SetName(v string) *Domain { + s.Name = &v + return s } -// String returns the string representation -func (s CreateDiskSnapshotOutput) String() string { - return awsutil.Prettify(s) +// SetResourceType sets the ResourceType field's value. +func (s *Domain) SetResourceType(v string) *Domain { + s.ResourceType = &v + return s } -// GoString returns the string representation -func (s CreateDiskSnapshotOutput) GoString() string { - return s.String() +// SetSupportCode sets the SupportCode field's value. +func (s *Domain) SetSupportCode(v string) *Domain { + s.SupportCode = &v + return s } -// SetOperations sets the Operations field's value. -func (s *CreateDiskSnapshotOutput) SetOperations(v []*Operation) *CreateDiskSnapshotOutput { - s.Operations = v +// SetTags sets the Tags field's value. +func (s *Domain) SetTags(v []*Tag) *Domain { + s.Tags = v return s } -type CreateDomainEntryInput struct { +// Describes a domain recordset entry. +type DomainEntry struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the domain entry - // request. + // The ID of the domain recordset entry. + Id *string `locationName:"id" type:"string"` + + // When true, specifies whether the domain entry is an alias used by the Lightsail + // load balancer. You can include an alias (A type) record in your request, + // which points to a load balancer DNS name and routes traffic to your load + // balancer + IsAlias *bool `locationName:"isAlias" type:"boolean"` + + // The name of the domain. + Name *string `locationName:"name" type:"string"` + + // (Deprecated) The options for the domain entry. // - // DomainEntry is a required field - DomainEntry *DomainEntry `locationName:"domainEntry" type:"structure" required:"true"` + // In releases prior to November 29, 2017, this parameter was not included in + // the API response. It is now deprecated. + // + // Deprecated: Options has been deprecated + Options map[string]*string `locationName:"options" deprecated:"true" type:"map"` - // The domain name (e.g., example.com) for which you want to create the domain - // entry. + // The target AWS name server (e.g., ns-111.awsdns-22.com.). // - // DomainName is a required field - DomainName *string `locationName:"domainName" type:"string" required:"true"` + // For Lightsail load balancers, the value looks like ab1234c56789c6b86aba6fb203d443bc-123456789.us-east-2.elb.amazonaws.com. + // Be sure to also set isAlias to true when setting up an A record for a load + // balancer. + Target *string `locationName:"target" type:"string"` + + // The type of domain entry (e.g., SOA or NS). + Type *string `locationName:"type" type:"string"` } // String returns the string representation -func (s CreateDomainEntryInput) String() string { +func (s DomainEntry) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateDomainEntryInput) GoString() string { +func (s DomainEntry) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDomainEntryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDomainEntryInput"} - if s.DomainEntry == nil { - invalidParams.Add(request.NewErrParamRequired("DomainEntry")) - } - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } +// SetId sets the Id field's value. +func (s *DomainEntry) SetId(v string) *DomainEntry { + s.Id = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetIsAlias sets the IsAlias field's value. +func (s *DomainEntry) SetIsAlias(v bool) *DomainEntry { + s.IsAlias = &v + return s +} + +// SetName sets the Name field's value. +func (s *DomainEntry) SetName(v string) *DomainEntry { + s.Name = &v + return s +} + +// SetOptions sets the Options field's value. +func (s *DomainEntry) SetOptions(v map[string]*string) *DomainEntry { + s.Options = v + return s +} + +// SetTarget sets the Target field's value. +func (s *DomainEntry) SetTarget(v string) *DomainEntry { + s.Target = &v + return s } -// SetDomainEntry sets the DomainEntry field's value. -func (s *CreateDomainEntryInput) SetDomainEntry(v *DomainEntry) *CreateDomainEntryInput { - s.DomainEntry = v +// SetType sets the Type field's value. +func (s *DomainEntry) SetType(v string) *DomainEntry { + s.Type = &v return s } -// SetDomainName sets the DomainName field's value. -func (s *CreateDomainEntryInput) SetDomainName(v string) *CreateDomainEntryInput { - s.DomainName = &v - return s +type DownloadDefaultKeyPairInput struct { + _ struct{} `type:"structure"` } -type CreateDomainEntryOutput struct { +// String returns the string representation +func (s DownloadDefaultKeyPairInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DownloadDefaultKeyPairInput) GoString() string { + return s.String() +} + +type DownloadDefaultKeyPairOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the operation. - Operation *Operation `locationName:"operation" type:"structure"` + // A base64-encoded RSA private key. + PrivateKeyBase64 *string `locationName:"privateKeyBase64" type:"string"` + + // A base64-encoded public key of the ssh-rsa type. + PublicKeyBase64 *string `locationName:"publicKeyBase64" type:"string"` } // String returns the string representation -func (s CreateDomainEntryOutput) String() string { +func (s DownloadDefaultKeyPairOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateDomainEntryOutput) GoString() string { +func (s DownloadDefaultKeyPairOutput) GoString() string { return s.String() } -// SetOperation sets the Operation field's value. -func (s *CreateDomainEntryOutput) SetOperation(v *Operation) *CreateDomainEntryOutput { - s.Operation = v +// SetPrivateKeyBase64 sets the PrivateKeyBase64 field's value. +func (s *DownloadDefaultKeyPairOutput) SetPrivateKeyBase64(v string) *DownloadDefaultKeyPairOutput { + s.PrivateKeyBase64 = &v return s } -type CreateDomainInput struct { +// SetPublicKeyBase64 sets the PublicKeyBase64 field's value. +func (s *DownloadDefaultKeyPairOutput) SetPublicKeyBase64(v string) *DownloadDefaultKeyPairOutput { + s.PublicKeyBase64 = &v + return s +} + +type ExportSnapshotInput struct { _ struct{} `type:"structure"` - // The domain name to manage (e.g., example.com). - // - // You cannot register a new domain name using Lightsail. You must register - // a domain name using Amazon Route 53 or another domain name registrar. If - // you have already registered your domain, you can enter its name in this parameter - // to manage the DNS records for that domain. + // The name of the instance or disk snapshot to be exported to Amazon EC2. // - // DomainName is a required field - DomainName *string `locationName:"domainName" type:"string" required:"true"` + // SourceSnapshotName is a required field + SourceSnapshotName *string `locationName:"sourceSnapshotName" type:"string" required:"true"` } // String returns the string representation -func (s CreateDomainInput) String() string { +func (s ExportSnapshotInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateDomainInput) GoString() string { +func (s ExportSnapshotInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateDomainInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateDomainInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) +func (s *ExportSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ExportSnapshotInput"} + if s.SourceSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("SourceSnapshotName")) } if invalidParams.Len() > 0 { @@ -8635,553 +15206,482 @@ func (s *CreateDomainInput) Validate() error { return nil } -// SetDomainName sets the DomainName field's value. -func (s *CreateDomainInput) SetDomainName(v string) *CreateDomainInput { - s.DomainName = &v +// SetSourceSnapshotName sets the SourceSnapshotName field's value. +func (s *ExportSnapshotInput) SetSourceSnapshotName(v string) *ExportSnapshotInput { + s.SourceSnapshotName = &v return s } -type CreateDomainOutput struct { +type ExportSnapshotOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the domain resource - // you created. - Operation *Operation `locationName:"operation" type:"structure"` + // A list of objects describing the API operation. + Operations []*Operation `locationName:"operations" type:"list"` } // String returns the string representation -func (s CreateDomainOutput) String() string { +func (s ExportSnapshotOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateDomainOutput) GoString() string { +func (s ExportSnapshotOutput) GoString() string { return s.String() } -// SetOperation sets the Operation field's value. -func (s *CreateDomainOutput) SetOperation(v *Operation) *CreateDomainOutput { - s.Operation = v +// SetOperations sets the Operations field's value. +func (s *ExportSnapshotOutput) SetOperations(v []*Operation) *ExportSnapshotOutput { + s.Operations = v return s } -type CreateInstanceSnapshotInput struct { +// Describes an export snapshot record. +type ExportSnapshotRecord struct { _ struct{} `type:"structure"` - // The Lightsail instance on which to base your snapshot. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` + // The Amazon Resource Name (ARN) of the export snapshot record. + Arn *string `locationName:"arn" type:"string"` - // The name for your new snapshot. - // - // InstanceSnapshotName is a required field - InstanceSnapshotName *string `locationName:"instanceSnapshotName" type:"string" required:"true"` + // The date when the export snapshot record was created. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` + + // A list of objects describing the destination of the export snapshot record. + DestinationInfo *DestinationInfo `locationName:"destinationInfo" type:"structure"` + + // The AWS Region and Availability Zone where the export snapshot record is + // located. + Location *ResourceLocation `locationName:"location" type:"structure"` + + // The export snapshot record name. + Name *string `locationName:"name" type:"string"` + + // The Lightsail resource type (e.g., ExportSnapshotRecord). + ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` + + // A list of objects describing the source of the export snapshot record. + SourceInfo *ExportSnapshotRecordSourceInfo `locationName:"sourceInfo" type:"structure"` + + // The state of the export snapshot record. + State *string `locationName:"state" type:"string" enum:"RecordState"` } // String returns the string representation -func (s CreateInstanceSnapshotInput) String() string { +func (s ExportSnapshotRecord) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateInstanceSnapshotInput) GoString() string { +func (s ExportSnapshotRecord) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateInstanceSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateInstanceSnapshotInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } - if s.InstanceSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceSnapshotName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetArn sets the Arn field's value. +func (s *ExportSnapshotRecord) SetArn(v string) *ExportSnapshotRecord { + s.Arn = &v + return s } -// SetInstanceName sets the InstanceName field's value. -func (s *CreateInstanceSnapshotInput) SetInstanceName(v string) *CreateInstanceSnapshotInput { - s.InstanceName = &v +// SetCreatedAt sets the CreatedAt field's value. +func (s *ExportSnapshotRecord) SetCreatedAt(v time.Time) *ExportSnapshotRecord { + s.CreatedAt = &v return s } -// SetInstanceSnapshotName sets the InstanceSnapshotName field's value. -func (s *CreateInstanceSnapshotInput) SetInstanceSnapshotName(v string) *CreateInstanceSnapshotInput { - s.InstanceSnapshotName = &v +// SetDestinationInfo sets the DestinationInfo field's value. +func (s *ExportSnapshotRecord) SetDestinationInfo(v *DestinationInfo) *ExportSnapshotRecord { + s.DestinationInfo = v return s } -type CreateInstanceSnapshotOutput struct { - _ struct{} `type:"structure"` +// SetLocation sets the Location field's value. +func (s *ExportSnapshotRecord) SetLocation(v *ResourceLocation) *ExportSnapshotRecord { + s.Location = v + return s +} - // An array of key-value pairs containing information about the results of your - // create instances snapshot request. - Operations []*Operation `locationName:"operations" type:"list"` +// SetName sets the Name field's value. +func (s *ExportSnapshotRecord) SetName(v string) *ExportSnapshotRecord { + s.Name = &v + return s } -// String returns the string representation -func (s CreateInstanceSnapshotOutput) String() string { - return awsutil.Prettify(s) +// SetResourceType sets the ResourceType field's value. +func (s *ExportSnapshotRecord) SetResourceType(v string) *ExportSnapshotRecord { + s.ResourceType = &v + return s } -// GoString returns the string representation -func (s CreateInstanceSnapshotOutput) GoString() string { - return s.String() +// SetSourceInfo sets the SourceInfo field's value. +func (s *ExportSnapshotRecord) SetSourceInfo(v *ExportSnapshotRecordSourceInfo) *ExportSnapshotRecord { + s.SourceInfo = v + return s } -// SetOperations sets the Operations field's value. -func (s *CreateInstanceSnapshotOutput) SetOperations(v []*Operation) *CreateInstanceSnapshotOutput { - s.Operations = v +// SetState sets the State field's value. +func (s *ExportSnapshotRecord) SetState(v string) *ExportSnapshotRecord { + s.State = &v return s } -type CreateInstancesFromSnapshotInput struct { +// Describes the source of an export snapshot record. +type ExportSnapshotRecordSourceInfo struct { _ struct{} `type:"structure"` - // An object containing information about one or more disk mappings. - AttachedDiskMapping map[string][]*DiskMap `locationName:"attachedDiskMapping" type:"map"` + // The Amazon Resource Name (ARN) of the source instance or disk snapshot. + Arn *string `locationName:"arn" type:"string"` - // The Availability Zone where you want to create your instances. Use the following - // formatting: us-east-2a (case sensitive). You can get a list of availability - // zones by using the get regions (http://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetRegions.html) - // operation. Be sure to add the include availability zones parameter to your - // request. - // - // AvailabilityZone is a required field - AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` + // The date when the source instance or disk snapshot was created. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - // The bundle of specification information for your virtual private server (or - // instance), including the pricing plan (e.g., micro_1_0). - // - // BundleId is a required field - BundleId *string `locationName:"bundleId" type:"string" required:"true"` + // A list of objects describing a disk snapshot. + DiskSnapshotInfo *DiskSnapshotInfo `locationName:"diskSnapshotInfo" type:"structure"` - // The names for your new instances. - // - // InstanceNames is a required field - InstanceNames []*string `locationName:"instanceNames" type:"list" required:"true"` + // The Amazon Resource Name (ARN) of the snapshot's source instance or disk. + FromResourceArn *string `locationName:"fromResourceArn" type:"string"` - // The name of the instance snapshot on which you are basing your new instances. - // Use the get instance snapshots operation to return information about your - // existing snapshots. - // - // InstanceSnapshotName is a required field - InstanceSnapshotName *string `locationName:"instanceSnapshotName" type:"string" required:"true"` + // The name of the snapshot's source instance or disk. + FromResourceName *string `locationName:"fromResourceName" type:"string"` - // The name for your key pair. - KeyPairName *string `locationName:"keyPairName" type:"string"` + // A list of objects describing an instance snapshot. + InstanceSnapshotInfo *InstanceSnapshotInfo `locationName:"instanceSnapshotInfo" type:"structure"` - // You can create a launch script that configures a server with additional user - // data. For example, apt-get -y update. - // - // Depending on the machine image you choose, the command to get software on - // your instance varies. Amazon Linux and CentOS use yum, Debian and Ubuntu - // use apt-get, and FreeBSD uses pkg. For a complete list, see the Dev Guide - // (http://lightsail.aws.amazon.com/ls/docs/getting-started/articles/pre-installed-apps). - UserData *string `locationName:"userData" type:"string"` + // The name of the source instance or disk snapshot. + Name *string `locationName:"name" type:"string"` + + // The Lightsail resource type (e.g., InstanceSnapshot or DiskSnapshot). + ResourceType *string `locationName:"resourceType" type:"string" enum:"ExportSnapshotRecordSourceType"` } // String returns the string representation -func (s CreateInstancesFromSnapshotInput) String() string { +func (s ExportSnapshotRecordSourceInfo) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateInstancesFromSnapshotInput) GoString() string { +func (s ExportSnapshotRecordSourceInfo) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateInstancesFromSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateInstancesFromSnapshotInput"} - if s.AvailabilityZone == nil { - invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) - } - if s.BundleId == nil { - invalidParams.Add(request.NewErrParamRequired("BundleId")) - } - if s.InstanceNames == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceNames")) - } - if s.InstanceSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceSnapshotName")) - } +// SetArn sets the Arn field's value. +func (s *ExportSnapshotRecordSourceInfo) SetArn(v string) *ExportSnapshotRecordSourceInfo { + s.Arn = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetCreatedAt sets the CreatedAt field's value. +func (s *ExportSnapshotRecordSourceInfo) SetCreatedAt(v time.Time) *ExportSnapshotRecordSourceInfo { + s.CreatedAt = &v + return s } -// SetAttachedDiskMapping sets the AttachedDiskMapping field's value. -func (s *CreateInstancesFromSnapshotInput) SetAttachedDiskMapping(v map[string][]*DiskMap) *CreateInstancesFromSnapshotInput { - s.AttachedDiskMapping = v +// SetDiskSnapshotInfo sets the DiskSnapshotInfo field's value. +func (s *ExportSnapshotRecordSourceInfo) SetDiskSnapshotInfo(v *DiskSnapshotInfo) *ExportSnapshotRecordSourceInfo { + s.DiskSnapshotInfo = v return s } -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateInstancesFromSnapshotInput) SetAvailabilityZone(v string) *CreateInstancesFromSnapshotInput { - s.AvailabilityZone = &v +// SetFromResourceArn sets the FromResourceArn field's value. +func (s *ExportSnapshotRecordSourceInfo) SetFromResourceArn(v string) *ExportSnapshotRecordSourceInfo { + s.FromResourceArn = &v return s } -// SetBundleId sets the BundleId field's value. -func (s *CreateInstancesFromSnapshotInput) SetBundleId(v string) *CreateInstancesFromSnapshotInput { - s.BundleId = &v +// SetFromResourceName sets the FromResourceName field's value. +func (s *ExportSnapshotRecordSourceInfo) SetFromResourceName(v string) *ExportSnapshotRecordSourceInfo { + s.FromResourceName = &v return s } -// SetInstanceNames sets the InstanceNames field's value. -func (s *CreateInstancesFromSnapshotInput) SetInstanceNames(v []*string) *CreateInstancesFromSnapshotInput { - s.InstanceNames = v +// SetInstanceSnapshotInfo sets the InstanceSnapshotInfo field's value. +func (s *ExportSnapshotRecordSourceInfo) SetInstanceSnapshotInfo(v *InstanceSnapshotInfo) *ExportSnapshotRecordSourceInfo { + s.InstanceSnapshotInfo = v return s } -// SetInstanceSnapshotName sets the InstanceSnapshotName field's value. -func (s *CreateInstancesFromSnapshotInput) SetInstanceSnapshotName(v string) *CreateInstancesFromSnapshotInput { - s.InstanceSnapshotName = &v +// SetName sets the Name field's value. +func (s *ExportSnapshotRecordSourceInfo) SetName(v string) *ExportSnapshotRecordSourceInfo { + s.Name = &v return s } -// SetKeyPairName sets the KeyPairName field's value. -func (s *CreateInstancesFromSnapshotInput) SetKeyPairName(v string) *CreateInstancesFromSnapshotInput { - s.KeyPairName = &v +// SetResourceType sets the ResourceType field's value. +func (s *ExportSnapshotRecordSourceInfo) SetResourceType(v string) *ExportSnapshotRecordSourceInfo { + s.ResourceType = &v return s } -// SetUserData sets the UserData field's value. -func (s *CreateInstancesFromSnapshotInput) SetUserData(v string) *CreateInstancesFromSnapshotInput { - s.UserData = &v +type GetActiveNamesInput struct { + _ struct{} `type:"structure"` + + // A token used for paginating results from your get active names request. + PageToken *string `locationName:"pageToken" type:"string"` +} + +// String returns the string representation +func (s GetActiveNamesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetActiveNamesInput) GoString() string { + return s.String() +} + +// SetPageToken sets the PageToken field's value. +func (s *GetActiveNamesInput) SetPageToken(v string) *GetActiveNamesInput { + s.PageToken = &v return s } -type CreateInstancesFromSnapshotOutput struct { +type GetActiveNamesOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the results of your - // create instances from snapshot request. - Operations []*Operation `locationName:"operations" type:"list"` + // The list of active names returned by the get active names request. + ActiveNames []*string `locationName:"activeNames" type:"list"` + + // A token used for advancing to the next page of results from your get active + // names request. + NextPageToken *string `locationName:"nextPageToken" type:"string"` } // String returns the string representation -func (s CreateInstancesFromSnapshotOutput) String() string { +func (s GetActiveNamesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateInstancesFromSnapshotOutput) GoString() string { +func (s GetActiveNamesOutput) GoString() string { return s.String() } -// SetOperations sets the Operations field's value. -func (s *CreateInstancesFromSnapshotOutput) SetOperations(v []*Operation) *CreateInstancesFromSnapshotOutput { - s.Operations = v +// SetActiveNames sets the ActiveNames field's value. +func (s *GetActiveNamesOutput) SetActiveNames(v []*string) *GetActiveNamesOutput { + s.ActiveNames = v return s } -type CreateInstancesInput struct { - _ struct{} `type:"structure"` - - // The Availability Zone in which to create your instance. Use the following - // format: us-east-2a (case sensitive). You can get a list of availability zones - // by using the get regions (http://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetRegions.html) - // operation. Be sure to add the include availability zones parameter to your - // request. - // - // AvailabilityZone is a required field - AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` - - // The ID for a virtual private server image (e.g., app_wordpress_4_4 or app_lamp_7_0). - // Use the get blueprints operation to return a list of available images (or - // blueprints). - // - // BlueprintId is a required field - BlueprintId *string `locationName:"blueprintId" type:"string" required:"true"` - - // The bundle of specification information for your virtual private server (or - // instance), including the pricing plan (e.g., micro_1_0). - // - // BundleId is a required field - BundleId *string `locationName:"bundleId" type:"string" required:"true"` - - // (Deprecated) The name for your custom image. - // - // In releases prior to June 12, 2017, this parameter was ignored by the API. - // It is now deprecated. - // - // Deprecated: CustomImageName has been deprecated - CustomImageName *string `locationName:"customImageName" deprecated:"true" type:"string"` +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetActiveNamesOutput) SetNextPageToken(v string) *GetActiveNamesOutput { + s.NextPageToken = &v + return s +} - // The names to use for your new Lightsail instances. Separate multiple values - // using quotation marks and commas, for example: ["MyFirstInstance","MySecondInstance"] - // - // InstanceNames is a required field - InstanceNames []*string `locationName:"instanceNames" type:"list" required:"true"` +type GetBlueprintsInput struct { + _ struct{} `type:"structure"` - // The name of your key pair. - KeyPairName *string `locationName:"keyPairName" type:"string"` + // A Boolean value indicating whether to include inactive results in your request. + IncludeInactive *bool `locationName:"includeInactive" type:"boolean"` - // A launch script you can create that configures a server with additional user - // data. For example, you might want to run apt-get -y update. - // - // Depending on the machine image you choose, the command to get software on - // your instance varies. Amazon Linux and CentOS use yum, Debian and Ubuntu - // use apt-get, and FreeBSD uses pkg. For a complete list, see the Dev Guide - // (https://lightsail.aws.amazon.com/ls/docs/getting-started/article/compare-options-choose-lightsail-instance-image). - UserData *string `locationName:"userData" type:"string"` + // A token used for advancing to the next page of results from your get blueprints + // request. + PageToken *string `locationName:"pageToken" type:"string"` } // String returns the string representation -func (s CreateInstancesInput) String() string { +func (s GetBlueprintsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateInstancesInput) GoString() string { +func (s GetBlueprintsInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateInstancesInput"} - if s.AvailabilityZone == nil { - invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) - } - if s.BlueprintId == nil { - invalidParams.Add(request.NewErrParamRequired("BlueprintId")) - } - if s.BundleId == nil { - invalidParams.Add(request.NewErrParamRequired("BundleId")) - } - if s.InstanceNames == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceNames")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *CreateInstancesInput) SetAvailabilityZone(v string) *CreateInstancesInput { - s.AvailabilityZone = &v +// SetIncludeInactive sets the IncludeInactive field's value. +func (s *GetBlueprintsInput) SetIncludeInactive(v bool) *GetBlueprintsInput { + s.IncludeInactive = &v return s } -// SetBlueprintId sets the BlueprintId field's value. -func (s *CreateInstancesInput) SetBlueprintId(v string) *CreateInstancesInput { - s.BlueprintId = &v +// SetPageToken sets the PageToken field's value. +func (s *GetBlueprintsInput) SetPageToken(v string) *GetBlueprintsInput { + s.PageToken = &v return s } -// SetBundleId sets the BundleId field's value. -func (s *CreateInstancesInput) SetBundleId(v string) *CreateInstancesInput { - s.BundleId = &v - return s +type GetBlueprintsOutput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs that contains information about the available + // blueprints. + Blueprints []*Blueprint `locationName:"blueprints" type:"list"` + + // A token used for advancing to the next page of results from your get blueprints + // request. + NextPageToken *string `locationName:"nextPageToken" type:"string"` } -// SetCustomImageName sets the CustomImageName field's value. -func (s *CreateInstancesInput) SetCustomImageName(v string) *CreateInstancesInput { - s.CustomImageName = &v - return s +// String returns the string representation +func (s GetBlueprintsOutput) String() string { + return awsutil.Prettify(s) } -// SetInstanceNames sets the InstanceNames field's value. -func (s *CreateInstancesInput) SetInstanceNames(v []*string) *CreateInstancesInput { - s.InstanceNames = v - return s +// GoString returns the string representation +func (s GetBlueprintsOutput) GoString() string { + return s.String() } -// SetKeyPairName sets the KeyPairName field's value. -func (s *CreateInstancesInput) SetKeyPairName(v string) *CreateInstancesInput { - s.KeyPairName = &v +// SetBlueprints sets the Blueprints field's value. +func (s *GetBlueprintsOutput) SetBlueprints(v []*Blueprint) *GetBlueprintsOutput { + s.Blueprints = v return s } -// SetUserData sets the UserData field's value. -func (s *CreateInstancesInput) SetUserData(v string) *CreateInstancesInput { - s.UserData = &v +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetBlueprintsOutput) SetNextPageToken(v string) *GetBlueprintsOutput { + s.NextPageToken = &v return s } -type CreateInstancesOutput struct { +type GetBundlesInput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the results of your - // create instances request. - Operations []*Operation `locationName:"operations" type:"list"` + // A Boolean value that indicates whether to include inactive bundle results + // in your request. + IncludeInactive *bool `locationName:"includeInactive" type:"boolean"` + + // A token used for advancing to the next page of results from your get bundles + // request. + PageToken *string `locationName:"pageToken" type:"string"` } // String returns the string representation -func (s CreateInstancesOutput) String() string { +func (s GetBundlesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateInstancesOutput) GoString() string { +func (s GetBundlesInput) GoString() string { return s.String() } -// SetOperations sets the Operations field's value. -func (s *CreateInstancesOutput) SetOperations(v []*Operation) *CreateInstancesOutput { - s.Operations = v +// SetIncludeInactive sets the IncludeInactive field's value. +func (s *GetBundlesInput) SetIncludeInactive(v bool) *GetBundlesInput { + s.IncludeInactive = &v return s } -type CreateKeyPairInput struct { +// SetPageToken sets the PageToken field's value. +func (s *GetBundlesInput) SetPageToken(v string) *GetBundlesInput { + s.PageToken = &v + return s +} + +type GetBundlesOutput struct { _ struct{} `type:"structure"` - // The name for your new key pair. - // - // KeyPairName is a required field - KeyPairName *string `locationName:"keyPairName" type:"string" required:"true"` + // An array of key-value pairs that contains information about the available + // bundles. + Bundles []*Bundle `locationName:"bundles" type:"list"` + + // A token used for advancing to the next page of results from your get active + // names request. + NextPageToken *string `locationName:"nextPageToken" type:"string"` } // String returns the string representation -func (s CreateKeyPairInput) String() string { +func (s GetBundlesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateKeyPairInput) GoString() string { +func (s GetBundlesOutput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateKeyPairInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateKeyPairInput"} - if s.KeyPairName == nil { - invalidParams.Add(request.NewErrParamRequired("KeyPairName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetBundles sets the Bundles field's value. +func (s *GetBundlesOutput) SetBundles(v []*Bundle) *GetBundlesOutput { + s.Bundles = v + return s } -// SetKeyPairName sets the KeyPairName field's value. -func (s *CreateKeyPairInput) SetKeyPairName(v string) *CreateKeyPairInput { - s.KeyPairName = &v +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetBundlesOutput) SetNextPageToken(v string) *GetBundlesOutput { + s.NextPageToken = &v return s } -type CreateKeyPairOutput struct { +type GetCloudFormationStackRecordsInput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the new key pair - // you just created. - KeyPair *KeyPair `locationName:"keyPair" type:"structure"` - - // An array of key-value pairs containing information about the results of your - // create key pair request. - Operation *Operation `locationName:"operation" type:"structure"` - - // A base64-encoded RSA private key. - PrivateKeyBase64 *string `locationName:"privateKeyBase64" type:"string"` - - // A base64-encoded public key of the ssh-rsa type. - PublicKeyBase64 *string `locationName:"publicKeyBase64" type:"string"` + // A token used for advancing to a specific page of results for your get cloud + // formation stack records request. + PageToken *string `locationName:"pageToken" type:"string"` } // String returns the string representation -func (s CreateKeyPairOutput) String() string { +func (s GetCloudFormationStackRecordsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateKeyPairOutput) GoString() string { +func (s GetCloudFormationStackRecordsInput) GoString() string { return s.String() } -// SetKeyPair sets the KeyPair field's value. -func (s *CreateKeyPairOutput) SetKeyPair(v *KeyPair) *CreateKeyPairOutput { - s.KeyPair = v +// SetPageToken sets the PageToken field's value. +func (s *GetCloudFormationStackRecordsInput) SetPageToken(v string) *GetCloudFormationStackRecordsInput { + s.PageToken = &v return s } -// SetOperation sets the Operation field's value. -func (s *CreateKeyPairOutput) SetOperation(v *Operation) *CreateKeyPairOutput { - s.Operation = v - return s +type GetCloudFormationStackRecordsOutput struct { + _ struct{} `type:"structure"` + + // A list of objects describing the CloudFormation stack records. + CloudFormationStackRecords []*CloudFormationStackRecord `locationName:"cloudFormationStackRecords" type:"list"` + + // A token used for advancing to the next page of results of your get relational + // database bundles request. + NextPageToken *string `locationName:"nextPageToken" type:"string"` +} + +// String returns the string representation +func (s GetCloudFormationStackRecordsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCloudFormationStackRecordsOutput) GoString() string { + return s.String() } -// SetPrivateKeyBase64 sets the PrivateKeyBase64 field's value. -func (s *CreateKeyPairOutput) SetPrivateKeyBase64(v string) *CreateKeyPairOutput { - s.PrivateKeyBase64 = &v +// SetCloudFormationStackRecords sets the CloudFormationStackRecords field's value. +func (s *GetCloudFormationStackRecordsOutput) SetCloudFormationStackRecords(v []*CloudFormationStackRecord) *GetCloudFormationStackRecordsOutput { + s.CloudFormationStackRecords = v return s } -// SetPublicKeyBase64 sets the PublicKeyBase64 field's value. -func (s *CreateKeyPairOutput) SetPublicKeyBase64(v string) *CreateKeyPairOutput { - s.PublicKeyBase64 = &v +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetCloudFormationStackRecordsOutput) SetNextPageToken(v string) *GetCloudFormationStackRecordsOutput { + s.NextPageToken = &v return s } -type CreateLoadBalancerInput struct { +type GetDiskInput struct { _ struct{} `type:"structure"` - // The optional alternative domains and subdomains to use with your SSL/TLS - // certificate (e.g., www.example.com, example.com, m.example.com, blog.example.com). - CertificateAlternativeNames []*string `locationName:"certificateAlternativeNames" type:"list"` - - // The domain name with which your certificate is associated (e.g., example.com). - // - // If you specify certificateDomainName, then certificateName is required (and - // vice-versa). - CertificateDomainName *string `locationName:"certificateDomainName" type:"string"` - - // The name of the SSL/TLS certificate. - // - // If you specify certificateName, then certificateDomainName is required (and - // vice-versa). - CertificateName *string `locationName:"certificateName" type:"string"` - - // The path you provided to perform the load balancer health check. If you didn't - // specify a health check path, Lightsail uses the root path of your website - // (e.g., "/"). - // - // You may want to specify a custom health check path other than the root of - // your application if your home page loads slowly or has a lot of media or - // scripting on it. - HealthCheckPath *string `locationName:"healthCheckPath" type:"string"` - - // The instance port where you're creating your load balancer. - // - // InstancePort is a required field - InstancePort *int64 `locationName:"instancePort" type:"integer" required:"true"` - - // The name of your load balancer. + // The name of the disk (e.g., my-disk). // - // LoadBalancerName is a required field - LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` + // DiskName is a required field + DiskName *string `locationName:"diskName" type:"string" required:"true"` } // String returns the string representation -func (s CreateLoadBalancerInput) String() string { +func (s GetDiskInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateLoadBalancerInput) GoString() string { +func (s GetDiskInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLoadBalancerInput"} - if s.InstancePort == nil { - invalidParams.Add(request.NewErrParamRequired("InstancePort")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) +func (s *GetDiskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDiskInput"} + if s.DiskName == nil { + invalidParams.Add(request.NewErrParamRequired("DiskName")) } if invalidParams.Len() > 0 { @@ -9190,116 +15690,59 @@ func (s *CreateLoadBalancerInput) Validate() error { return nil } -// SetCertificateAlternativeNames sets the CertificateAlternativeNames field's value. -func (s *CreateLoadBalancerInput) SetCertificateAlternativeNames(v []*string) *CreateLoadBalancerInput { - s.CertificateAlternativeNames = v - return s -} - -// SetCertificateDomainName sets the CertificateDomainName field's value. -func (s *CreateLoadBalancerInput) SetCertificateDomainName(v string) *CreateLoadBalancerInput { - s.CertificateDomainName = &v - return s -} - -// SetCertificateName sets the CertificateName field's value. -func (s *CreateLoadBalancerInput) SetCertificateName(v string) *CreateLoadBalancerInput { - s.CertificateName = &v - return s -} - -// SetHealthCheckPath sets the HealthCheckPath field's value. -func (s *CreateLoadBalancerInput) SetHealthCheckPath(v string) *CreateLoadBalancerInput { - s.HealthCheckPath = &v - return s -} - -// SetInstancePort sets the InstancePort field's value. -func (s *CreateLoadBalancerInput) SetInstancePort(v int64) *CreateLoadBalancerInput { - s.InstancePort = &v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *CreateLoadBalancerInput) SetLoadBalancerName(v string) *CreateLoadBalancerInput { - s.LoadBalancerName = &v +// SetDiskName sets the DiskName field's value. +func (s *GetDiskInput) SetDiskName(v string) *GetDiskInput { + s.DiskName = &v return s } -type CreateLoadBalancerOutput struct { +type GetDiskOutput struct { _ struct{} `type:"structure"` - // An object containing information about the API operations. - Operations []*Operation `locationName:"operations" type:"list"` + // An object containing information about the disk. + Disk *Disk `locationName:"disk" type:"structure"` } // String returns the string representation -func (s CreateLoadBalancerOutput) String() string { +func (s GetDiskOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateLoadBalancerOutput) GoString() string { +func (s GetDiskOutput) GoString() string { return s.String() } -// SetOperations sets the Operations field's value. -func (s *CreateLoadBalancerOutput) SetOperations(v []*Operation) *CreateLoadBalancerOutput { - s.Operations = v +// SetDisk sets the Disk field's value. +func (s *GetDiskOutput) SetDisk(v *Disk) *GetDiskOutput { + s.Disk = v return s } -type CreateLoadBalancerTlsCertificateInput struct { +type GetDiskSnapshotInput struct { _ struct{} `type:"structure"` - // An array of strings listing alternative domains and subdomains for your SSL/TLS - // certificate. Lightsail will de-dupe the names for you. You can have a maximum - // of 9 alternative names (in addition to the 1 primary domain). We do not support - // wildcards (e.g., *.example.com). - CertificateAlternativeNames []*string `locationName:"certificateAlternativeNames" type:"list"` - - // The domain name (e.g., example.com) for your SSL/TLS certificate. - // - // CertificateDomainName is a required field - CertificateDomainName *string `locationName:"certificateDomainName" type:"string" required:"true"` - - // The SSL/TLS certificate name. - // - // You can have up to 10 certificates in your account at one time. Each Lightsail - // load balancer can have up to 2 certificates associated with it at one time. - // There is also an overall limit to the number of certificates that can be - // issue in a 365-day period. For more information, see Limits (http://docs.aws.amazon.com/acm/latest/userguide/acm-limits.html). - // - // CertificateName is a required field - CertificateName *string `locationName:"certificateName" type:"string" required:"true"` - - // The load balancer name where you want to create the SSL/TLS certificate. + // The name of the disk snapshot (e.g., my-disk-snapshot). // - // LoadBalancerName is a required field - LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` + // DiskSnapshotName is a required field + DiskSnapshotName *string `locationName:"diskSnapshotName" type:"string" required:"true"` } // String returns the string representation -func (s CreateLoadBalancerTlsCertificateInput) String() string { +func (s GetDiskSnapshotInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateLoadBalancerTlsCertificateInput) GoString() string { +func (s GetDiskSnapshotInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLoadBalancerTlsCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLoadBalancerTlsCertificateInput"} - if s.CertificateDomainName == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateDomainName")) - } - if s.CertificateName == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateName")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) +func (s *GetDiskSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDiskSnapshotInput"} + if s.DiskSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("DiskSnapshotName")) } if invalidParams.Len() > 0 { @@ -9308,138 +15751,173 @@ func (s *CreateLoadBalancerTlsCertificateInput) Validate() error { return nil } -// SetCertificateAlternativeNames sets the CertificateAlternativeNames field's value. -func (s *CreateLoadBalancerTlsCertificateInput) SetCertificateAlternativeNames(v []*string) *CreateLoadBalancerTlsCertificateInput { - s.CertificateAlternativeNames = v +// SetDiskSnapshotName sets the DiskSnapshotName field's value. +func (s *GetDiskSnapshotInput) SetDiskSnapshotName(v string) *GetDiskSnapshotInput { + s.DiskSnapshotName = &v return s } -// SetCertificateDomainName sets the CertificateDomainName field's value. -func (s *CreateLoadBalancerTlsCertificateInput) SetCertificateDomainName(v string) *CreateLoadBalancerTlsCertificateInput { - s.CertificateDomainName = &v - return s +type GetDiskSnapshotOutput struct { + _ struct{} `type:"structure"` + + // An object containing information about the disk snapshot. + DiskSnapshot *DiskSnapshot `locationName:"diskSnapshot" type:"structure"` } -// SetCertificateName sets the CertificateName field's value. -func (s *CreateLoadBalancerTlsCertificateInput) SetCertificateName(v string) *CreateLoadBalancerTlsCertificateInput { - s.CertificateName = &v - return s +// String returns the string representation +func (s GetDiskSnapshotOutput) String() string { + return awsutil.Prettify(s) } -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *CreateLoadBalancerTlsCertificateInput) SetLoadBalancerName(v string) *CreateLoadBalancerTlsCertificateInput { - s.LoadBalancerName = &v +// GoString returns the string representation +func (s GetDiskSnapshotOutput) GoString() string { + return s.String() +} + +// SetDiskSnapshot sets the DiskSnapshot field's value. +func (s *GetDiskSnapshotOutput) SetDiskSnapshot(v *DiskSnapshot) *GetDiskSnapshotOutput { + s.DiskSnapshot = v return s } -type CreateLoadBalancerTlsCertificateOutput struct { +type GetDiskSnapshotsInput struct { _ struct{} `type:"structure"` - // An object containing information about the API operations. - Operations []*Operation `locationName:"operations" type:"list"` + // A token used for advancing to the next page of results from your GetDiskSnapshots + // request. + PageToken *string `locationName:"pageToken" type:"string"` } // String returns the string representation -func (s CreateLoadBalancerTlsCertificateOutput) String() string { +func (s GetDiskSnapshotsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateLoadBalancerTlsCertificateOutput) GoString() string { +func (s GetDiskSnapshotsInput) GoString() string { return s.String() } -// SetOperations sets the Operations field's value. -func (s *CreateLoadBalancerTlsCertificateOutput) SetOperations(v []*Operation) *CreateLoadBalancerTlsCertificateOutput { - s.Operations = v +// SetPageToken sets the PageToken field's value. +func (s *GetDiskSnapshotsInput) SetPageToken(v string) *GetDiskSnapshotsInput { + s.PageToken = &v return s } -type DeleteDiskInput struct { +type GetDiskSnapshotsOutput struct { _ struct{} `type:"structure"` - // The unique name of the disk you want to delete (e.g., my-disk). - // - // DiskName is a required field - DiskName *string `locationName:"diskName" type:"string" required:"true"` + // An array of objects containing information about all block storage disk snapshots. + DiskSnapshots []*DiskSnapshot `locationName:"diskSnapshots" type:"list"` + + // A token used for advancing to the next page of results from your GetDiskSnapshots + // request. + NextPageToken *string `locationName:"nextPageToken" type:"string"` +} + +// String returns the string representation +func (s GetDiskSnapshotsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetDiskSnapshotsOutput) GoString() string { + return s.String() +} + +// SetDiskSnapshots sets the DiskSnapshots field's value. +func (s *GetDiskSnapshotsOutput) SetDiskSnapshots(v []*DiskSnapshot) *GetDiskSnapshotsOutput { + s.DiskSnapshots = v + return s +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetDiskSnapshotsOutput) SetNextPageToken(v string) *GetDiskSnapshotsOutput { + s.NextPageToken = &v + return s +} + +type GetDisksInput struct { + _ struct{} `type:"structure"` + + // A token used for advancing to the next page of results from your GetDisks + // request. + PageToken *string `locationName:"pageToken" type:"string"` } // String returns the string representation -func (s DeleteDiskInput) String() string { +func (s GetDisksInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteDiskInput) GoString() string { +func (s GetDisksInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDiskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDiskInput"} - if s.DiskName == nil { - invalidParams.Add(request.NewErrParamRequired("DiskName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDiskName sets the DiskName field's value. -func (s *DeleteDiskInput) SetDiskName(v string) *DeleteDiskInput { - s.DiskName = &v +// SetPageToken sets the PageToken field's value. +func (s *GetDisksInput) SetPageToken(v string) *GetDisksInput { + s.PageToken = &v return s } -type DeleteDiskOutput struct { +type GetDisksOutput struct { _ struct{} `type:"structure"` - // An object describing the API operations. - Operations []*Operation `locationName:"operations" type:"list"` + // An array of objects containing information about all block storage disks. + Disks []*Disk `locationName:"disks" type:"list"` + + // A token used for advancing to the next page of results from your GetDisks + // request. + NextPageToken *string `locationName:"nextPageToken" type:"string"` } // String returns the string representation -func (s DeleteDiskOutput) String() string { +func (s GetDisksOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteDiskOutput) GoString() string { +func (s GetDisksOutput) GoString() string { return s.String() } -// SetOperations sets the Operations field's value. -func (s *DeleteDiskOutput) SetOperations(v []*Operation) *DeleteDiskOutput { - s.Operations = v +// SetDisks sets the Disks field's value. +func (s *GetDisksOutput) SetDisks(v []*Disk) *GetDisksOutput { + s.Disks = v return s } -type DeleteDiskSnapshotInput struct { +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetDisksOutput) SetNextPageToken(v string) *GetDisksOutput { + s.NextPageToken = &v + return s +} + +type GetDomainInput struct { _ struct{} `type:"structure"` - // The name of the disk snapshot you want to delete (e.g., my-disk-snapshot). + // The domain name for which your want to return information about. // - // DiskSnapshotName is a required field - DiskSnapshotName *string `locationName:"diskSnapshotName" type:"string" required:"true"` + // DomainName is a required field + DomainName *string `locationName:"domainName" type:"string" required:"true"` } // String returns the string representation -func (s DeleteDiskSnapshotInput) String() string { +func (s GetDomainInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteDiskSnapshotInput) GoString() string { +func (s GetDomainInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDiskSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDiskSnapshotInput"} - if s.DiskSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("DiskSnapshotName")) +func (s *GetDomainInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetDomainInput"} + if s.DomainName == nil { + invalidParams.Add(request.NewErrParamRequired("DomainName")) } if invalidParams.Len() > 0 { @@ -9448,195 +15926,176 @@ func (s *DeleteDiskSnapshotInput) Validate() error { return nil } -// SetDiskSnapshotName sets the DiskSnapshotName field's value. -func (s *DeleteDiskSnapshotInput) SetDiskSnapshotName(v string) *DeleteDiskSnapshotInput { - s.DiskSnapshotName = &v +// SetDomainName sets the DomainName field's value. +func (s *GetDomainInput) SetDomainName(v string) *GetDomainInput { + s.DomainName = &v return s } -type DeleteDiskSnapshotOutput struct { +type GetDomainOutput struct { _ struct{} `type:"structure"` - // An object describing the API operations. - Operations []*Operation `locationName:"operations" type:"list"` + // An array of key-value pairs containing information about your get domain + // request. + Domain *Domain `locationName:"domain" type:"structure"` } // String returns the string representation -func (s DeleteDiskSnapshotOutput) String() string { +func (s GetDomainOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteDiskSnapshotOutput) GoString() string { +func (s GetDomainOutput) GoString() string { return s.String() } -// SetOperations sets the Operations field's value. -func (s *DeleteDiskSnapshotOutput) SetOperations(v []*Operation) *DeleteDiskSnapshotOutput { - s.Operations = v +// SetDomain sets the Domain field's value. +func (s *GetDomainOutput) SetDomain(v *Domain) *GetDomainOutput { + s.Domain = v return s } -type DeleteDomainEntryInput struct { +type GetDomainsInput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about your domain entries. - // - // DomainEntry is a required field - DomainEntry *DomainEntry `locationName:"domainEntry" type:"structure" required:"true"` - - // The name of the domain entry to delete. - // - // DomainName is a required field - DomainName *string `locationName:"domainName" type:"string" required:"true"` + // A token used for advancing to the next page of results from your get domains + // request. + PageToken *string `locationName:"pageToken" type:"string"` } // String returns the string representation -func (s DeleteDomainEntryInput) String() string { +func (s GetDomainsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteDomainEntryInput) GoString() string { +func (s GetDomainsInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDomainEntryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDomainEntryInput"} - if s.DomainEntry == nil { - invalidParams.Add(request.NewErrParamRequired("DomainEntry")) - } - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainEntry sets the DomainEntry field's value. -func (s *DeleteDomainEntryInput) SetDomainEntry(v *DomainEntry) *DeleteDomainEntryInput { - s.DomainEntry = v - return s -} - -// SetDomainName sets the DomainName field's value. -func (s *DeleteDomainEntryInput) SetDomainName(v string) *DeleteDomainEntryInput { - s.DomainName = &v +// SetPageToken sets the PageToken field's value. +func (s *GetDomainsInput) SetPageToken(v string) *GetDomainsInput { + s.PageToken = &v return s } -type DeleteDomainEntryOutput struct { +type GetDomainsOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the results of your - // delete domain entry request. - Operation *Operation `locationName:"operation" type:"structure"` + // An array of key-value pairs containing information about each of the domain + // entries in the user's account. + Domains []*Domain `locationName:"domains" type:"list"` + + // A token used for advancing to the next page of results from your get active + // names request. + NextPageToken *string `locationName:"nextPageToken" type:"string"` } // String returns the string representation -func (s DeleteDomainEntryOutput) String() string { +func (s GetDomainsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteDomainEntryOutput) GoString() string { +func (s GetDomainsOutput) GoString() string { return s.String() } -// SetOperation sets the Operation field's value. -func (s *DeleteDomainEntryOutput) SetOperation(v *Operation) *DeleteDomainEntryOutput { - s.Operation = v +// SetDomains sets the Domains field's value. +func (s *GetDomainsOutput) SetDomains(v []*Domain) *GetDomainsOutput { + s.Domains = v return s } -type DeleteDomainInput struct { +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetDomainsOutput) SetNextPageToken(v string) *GetDomainsOutput { + s.NextPageToken = &v + return s +} + +type GetExportSnapshotRecordsInput struct { _ struct{} `type:"structure"` - // The specific domain name to delete. - // - // DomainName is a required field - DomainName *string `locationName:"domainName" type:"string" required:"true"` + // A token used for advancing to a specific page of results for your get export + // snapshot records request. + PageToken *string `locationName:"pageToken" type:"string"` } // String returns the string representation -func (s DeleteDomainInput) String() string { +func (s GetExportSnapshotRecordsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteDomainInput) GoString() string { +func (s GetExportSnapshotRecordsInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteDomainInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteDomainInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDomainName sets the DomainName field's value. -func (s *DeleteDomainInput) SetDomainName(v string) *DeleteDomainInput { - s.DomainName = &v +// SetPageToken sets the PageToken field's value. +func (s *GetExportSnapshotRecordsInput) SetPageToken(v string) *GetExportSnapshotRecordsInput { + s.PageToken = &v return s } -type DeleteDomainOutput struct { +type GetExportSnapshotRecordsOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the results of your - // delete domain request. - Operation *Operation `locationName:"operation" type:"structure"` + // A list of objects describing the export snapshot records. + ExportSnapshotRecords []*ExportSnapshotRecord `locationName:"exportSnapshotRecords" type:"list"` + + // A token used for advancing to the next page of results of your get relational + // database bundles request. + NextPageToken *string `locationName:"nextPageToken" type:"string"` } // String returns the string representation -func (s DeleteDomainOutput) String() string { +func (s GetExportSnapshotRecordsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteDomainOutput) GoString() string { +func (s GetExportSnapshotRecordsOutput) GoString() string { return s.String() } -// SetOperation sets the Operation field's value. -func (s *DeleteDomainOutput) SetOperation(v *Operation) *DeleteDomainOutput { - s.Operation = v +// SetExportSnapshotRecords sets the ExportSnapshotRecords field's value. +func (s *GetExportSnapshotRecordsOutput) SetExportSnapshotRecords(v []*ExportSnapshotRecord) *GetExportSnapshotRecordsOutput { + s.ExportSnapshotRecords = v return s } -type DeleteInstanceInput struct { +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetExportSnapshotRecordsOutput) SetNextPageToken(v string) *GetExportSnapshotRecordsOutput { + s.NextPageToken = &v + return s +} + +type GetInstanceAccessDetailsInput struct { _ struct{} `type:"structure"` - // The name of the instance to delete. + // The name of the instance to access. // // InstanceName is a required field InstanceName *string `locationName:"instanceName" type:"string" required:"true"` + + // The protocol to use to connect to your instance. Defaults to ssh. + Protocol *string `locationName:"protocol" type:"string" enum:"InstanceAccessProtocol"` } // String returns the string representation -func (s DeleteInstanceInput) String() string { +func (s GetInstanceAccessDetailsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteInstanceInput) GoString() string { +func (s GetInstanceAccessDetailsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteInstanceInput"} +func (s *GetInstanceAccessDetailsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetInstanceAccessDetailsInput"} if s.InstanceName == nil { invalidParams.Add(request.NewErrParamRequired("InstanceName")) } @@ -9648,59 +16107,65 @@ func (s *DeleteInstanceInput) Validate() error { } // SetInstanceName sets the InstanceName field's value. -func (s *DeleteInstanceInput) SetInstanceName(v string) *DeleteInstanceInput { +func (s *GetInstanceAccessDetailsInput) SetInstanceName(v string) *GetInstanceAccessDetailsInput { s.InstanceName = &v return s } -type DeleteInstanceOutput struct { +// SetProtocol sets the Protocol field's value. +func (s *GetInstanceAccessDetailsInput) SetProtocol(v string) *GetInstanceAccessDetailsInput { + s.Protocol = &v + return s +} + +type GetInstanceAccessDetailsOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the results of your - // delete instance request. - Operations []*Operation `locationName:"operations" type:"list"` + // An array of key-value pairs containing information about a get instance access + // request. + AccessDetails *InstanceAccessDetails `locationName:"accessDetails" type:"structure"` } // String returns the string representation -func (s DeleteInstanceOutput) String() string { +func (s GetInstanceAccessDetailsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteInstanceOutput) GoString() string { +func (s GetInstanceAccessDetailsOutput) GoString() string { return s.String() } -// SetOperations sets the Operations field's value. -func (s *DeleteInstanceOutput) SetOperations(v []*Operation) *DeleteInstanceOutput { - s.Operations = v +// SetAccessDetails sets the AccessDetails field's value. +func (s *GetInstanceAccessDetailsOutput) SetAccessDetails(v *InstanceAccessDetails) *GetInstanceAccessDetailsOutput { + s.AccessDetails = v return s } -type DeleteInstanceSnapshotInput struct { +type GetInstanceInput struct { _ struct{} `type:"structure"` - // The name of the snapshot to delete. + // The name of the instance. // - // InstanceSnapshotName is a required field - InstanceSnapshotName *string `locationName:"instanceSnapshotName" type:"string" required:"true"` + // InstanceName is a required field + InstanceName *string `locationName:"instanceName" type:"string" required:"true"` } // String returns the string representation -func (s DeleteInstanceSnapshotInput) String() string { +func (s GetInstanceInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteInstanceSnapshotInput) GoString() string { +func (s GetInstanceInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteInstanceSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteInstanceSnapshotInput"} - if s.InstanceSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceSnapshotName")) +func (s *GetInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetInstanceInput"} + if s.InstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceName")) } if invalidParams.Len() > 0 { @@ -9709,60 +16174,87 @@ func (s *DeleteInstanceSnapshotInput) Validate() error { return nil } -// SetInstanceSnapshotName sets the InstanceSnapshotName field's value. -func (s *DeleteInstanceSnapshotInput) SetInstanceSnapshotName(v string) *DeleteInstanceSnapshotInput { - s.InstanceSnapshotName = &v +// SetInstanceName sets the InstanceName field's value. +func (s *GetInstanceInput) SetInstanceName(v string) *GetInstanceInput { + s.InstanceName = &v return s } -type DeleteInstanceSnapshotOutput struct { +type GetInstanceMetricDataInput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the results of your - // delete instance snapshot request. - Operations []*Operation `locationName:"operations" type:"list"` -} + // The end time of the time period. + // + // EndTime is a required field + EndTime *time.Time `locationName:"endTime" type:"timestamp" required:"true"` -// String returns the string representation -func (s DeleteInstanceSnapshotOutput) String() string { - return awsutil.Prettify(s) -} + // The name of the instance for which you want to get metrics data. + // + // InstanceName is a required field + InstanceName *string `locationName:"instanceName" type:"string" required:"true"` -// GoString returns the string representation -func (s DeleteInstanceSnapshotOutput) GoString() string { - return s.String() -} + // The metric name to get data about. + // + // MetricName is a required field + MetricName *string `locationName:"metricName" type:"string" required:"true" enum:"InstanceMetricName"` -// SetOperations sets the Operations field's value. -func (s *DeleteInstanceSnapshotOutput) SetOperations(v []*Operation) *DeleteInstanceSnapshotOutput { - s.Operations = v - return s -} + // The granularity, in seconds, of the returned data points. + // + // Period is a required field + Period *int64 `locationName:"period" min:"60" type:"integer" required:"true"` -type DeleteKeyPairInput struct { - _ struct{} `type:"structure"` + // The start time of the time period. + // + // StartTime is a required field + StartTime *time.Time `locationName:"startTime" type:"timestamp" required:"true"` - // The name of the key pair to delete. + // The instance statistics. // - // KeyPairName is a required field - KeyPairName *string `locationName:"keyPairName" type:"string" required:"true"` + // Statistics is a required field + Statistics []*string `locationName:"statistics" type:"list" required:"true"` + + // The unit. The list of valid values is below. + // + // Unit is a required field + Unit *string `locationName:"unit" type:"string" required:"true" enum:"MetricUnit"` } // String returns the string representation -func (s DeleteKeyPairInput) String() string { +func (s GetInstanceMetricDataInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteKeyPairInput) GoString() string { +func (s GetInstanceMetricDataInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteKeyPairInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteKeyPairInput"} - if s.KeyPairName == nil { - invalidParams.Add(request.NewErrParamRequired("KeyPairName")) +func (s *GetInstanceMetricDataInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetInstanceMetricDataInput"} + if s.EndTime == nil { + invalidParams.Add(request.NewErrParamRequired("EndTime")) + } + if s.InstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceName")) + } + if s.MetricName == nil { + invalidParams.Add(request.NewErrParamRequired("MetricName")) + } + if s.Period == nil { + invalidParams.Add(request.NewErrParamRequired("Period")) + } + if s.Period != nil && *s.Period < 60 { + invalidParams.Add(request.NewErrParamMinValue("Period", 60)) + } + if s.StartTime == nil { + invalidParams.Add(request.NewErrParamRequired("StartTime")) + } + if s.Statistics == nil { + invalidParams.Add(request.NewErrParamRequired("Statistics")) + } + if s.Unit == nil { + invalidParams.Add(request.NewErrParamRequired("Unit")) } if invalidParams.Len() > 0 { @@ -9771,136 +16263,128 @@ func (s *DeleteKeyPairInput) Validate() error { return nil } -// SetKeyPairName sets the KeyPairName field's value. -func (s *DeleteKeyPairInput) SetKeyPairName(v string) *DeleteKeyPairInput { - s.KeyPairName = &v +// SetEndTime sets the EndTime field's value. +func (s *GetInstanceMetricDataInput) SetEndTime(v time.Time) *GetInstanceMetricDataInput { + s.EndTime = &v return s } -type DeleteKeyPairOutput struct { - _ struct{} `type:"structure"` +// SetInstanceName sets the InstanceName field's value. +func (s *GetInstanceMetricDataInput) SetInstanceName(v string) *GetInstanceMetricDataInput { + s.InstanceName = &v + return s +} - // An array of key-value pairs containing information about the results of your - // delete key pair request. - Operation *Operation `locationName:"operation" type:"structure"` +// SetMetricName sets the MetricName field's value. +func (s *GetInstanceMetricDataInput) SetMetricName(v string) *GetInstanceMetricDataInput { + s.MetricName = &v + return s } -// String returns the string representation -func (s DeleteKeyPairOutput) String() string { - return awsutil.Prettify(s) +// SetPeriod sets the Period field's value. +func (s *GetInstanceMetricDataInput) SetPeriod(v int64) *GetInstanceMetricDataInput { + s.Period = &v + return s } -// GoString returns the string representation -func (s DeleteKeyPairOutput) GoString() string { - return s.String() +// SetStartTime sets the StartTime field's value. +func (s *GetInstanceMetricDataInput) SetStartTime(v time.Time) *GetInstanceMetricDataInput { + s.StartTime = &v + return s } -// SetOperation sets the Operation field's value. -func (s *DeleteKeyPairOutput) SetOperation(v *Operation) *DeleteKeyPairOutput { - s.Operation = v +// SetStatistics sets the Statistics field's value. +func (s *GetInstanceMetricDataInput) SetStatistics(v []*string) *GetInstanceMetricDataInput { + s.Statistics = v return s } -type DeleteLoadBalancerInput struct { +// SetUnit sets the Unit field's value. +func (s *GetInstanceMetricDataInput) SetUnit(v string) *GetInstanceMetricDataInput { + s.Unit = &v + return s +} + +type GetInstanceMetricDataOutput struct { _ struct{} `type:"structure"` - // The name of the load balancer you want to delete. - // - // LoadBalancerName is a required field - LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` + // An array of key-value pairs containing information about the results of your + // get instance metric data request. + MetricData []*MetricDatapoint `locationName:"metricData" type:"list"` + + // The metric name to return data for. + MetricName *string `locationName:"metricName" type:"string" enum:"InstanceMetricName"` } // String returns the string representation -func (s DeleteLoadBalancerInput) String() string { +func (s GetInstanceMetricDataOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteLoadBalancerInput) GoString() string { +func (s GetInstanceMetricDataOutput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLoadBalancerInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetMetricData sets the MetricData field's value. +func (s *GetInstanceMetricDataOutput) SetMetricData(v []*MetricDatapoint) *GetInstanceMetricDataOutput { + s.MetricData = v + return s } -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *DeleteLoadBalancerInput) SetLoadBalancerName(v string) *DeleteLoadBalancerInput { - s.LoadBalancerName = &v +// SetMetricName sets the MetricName field's value. +func (s *GetInstanceMetricDataOutput) SetMetricName(v string) *GetInstanceMetricDataOutput { + s.MetricName = &v return s } -type DeleteLoadBalancerOutput struct { +type GetInstanceOutput struct { _ struct{} `type:"structure"` - // An object describing the API operations. - Operations []*Operation `locationName:"operations" type:"list"` + // An array of key-value pairs containing information about the specified instance. + Instance *Instance `locationName:"instance" type:"structure"` } // String returns the string representation -func (s DeleteLoadBalancerOutput) String() string { +func (s GetInstanceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteLoadBalancerOutput) GoString() string { +func (s GetInstanceOutput) GoString() string { return s.String() } -// SetOperations sets the Operations field's value. -func (s *DeleteLoadBalancerOutput) SetOperations(v []*Operation) *DeleteLoadBalancerOutput { - s.Operations = v +// SetInstance sets the Instance field's value. +func (s *GetInstanceOutput) SetInstance(v *Instance) *GetInstanceOutput { + s.Instance = v return s } -type DeleteLoadBalancerTlsCertificateInput struct { +type GetInstancePortStatesInput struct { _ struct{} `type:"structure"` - // The SSL/TLS certificate name. - // - // CertificateName is a required field - CertificateName *string `locationName:"certificateName" type:"string" required:"true"` - - // When true, forces the deletion of an SSL/TLS certificate. - // - // There can be two certificates associated with a Lightsail load balancer: - // the primary and the backup. The force parameter is required when the primary - // SSL/TLS certificate is in use by an instance attached to the load balancer. - Force *bool `locationName:"force" type:"boolean"` - - // The load balancer name. + // The name of the instance. // - // LoadBalancerName is a required field - LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` + // InstanceName is a required field + InstanceName *string `locationName:"instanceName" type:"string" required:"true"` } // String returns the string representation -func (s DeleteLoadBalancerTlsCertificateInput) String() string { +func (s GetInstancePortStatesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteLoadBalancerTlsCertificateInput) GoString() string { +func (s GetInstancePortStatesInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLoadBalancerTlsCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLoadBalancerTlsCertificateInput"} - if s.CertificateName == nil { - invalidParams.Add(request.NewErrParamRequired("CertificateName")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) +func (s *GetInstancePortStatesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetInstancePortStatesInput"} + if s.InstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceName")) } if invalidParams.Len() > 0 { @@ -9909,72 +16393,59 @@ func (s *DeleteLoadBalancerTlsCertificateInput) Validate() error { return nil } -// SetCertificateName sets the CertificateName field's value. -func (s *DeleteLoadBalancerTlsCertificateInput) SetCertificateName(v string) *DeleteLoadBalancerTlsCertificateInput { - s.CertificateName = &v - return s -} - -// SetForce sets the Force field's value. -func (s *DeleteLoadBalancerTlsCertificateInput) SetForce(v bool) *DeleteLoadBalancerTlsCertificateInput { - s.Force = &v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *DeleteLoadBalancerTlsCertificateInput) SetLoadBalancerName(v string) *DeleteLoadBalancerTlsCertificateInput { - s.LoadBalancerName = &v +// SetInstanceName sets the InstanceName field's value. +func (s *GetInstancePortStatesInput) SetInstanceName(v string) *GetInstancePortStatesInput { + s.InstanceName = &v return s } -type DeleteLoadBalancerTlsCertificateOutput struct { +type GetInstancePortStatesOutput struct { _ struct{} `type:"structure"` - // An object describing the API operations. - Operations []*Operation `locationName:"operations" type:"list"` + // Information about the port states resulting from your request. + PortStates []*InstancePortState `locationName:"portStates" type:"list"` } // String returns the string representation -func (s DeleteLoadBalancerTlsCertificateOutput) String() string { +func (s GetInstancePortStatesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteLoadBalancerTlsCertificateOutput) GoString() string { +func (s GetInstancePortStatesOutput) GoString() string { return s.String() } -// SetOperations sets the Operations field's value. -func (s *DeleteLoadBalancerTlsCertificateOutput) SetOperations(v []*Operation) *DeleteLoadBalancerTlsCertificateOutput { - s.Operations = v +// SetPortStates sets the PortStates field's value. +func (s *GetInstancePortStatesOutput) SetPortStates(v []*InstancePortState) *GetInstancePortStatesOutput { + s.PortStates = v return s } -type DetachDiskInput struct { +type GetInstanceSnapshotInput struct { _ struct{} `type:"structure"` - // The unique name of the disk you want to detach from your instance (e.g., - // my-disk). + // The name of the snapshot for which you are requesting information. // - // DiskName is a required field - DiskName *string `locationName:"diskName" type:"string" required:"true"` + // InstanceSnapshotName is a required field + InstanceSnapshotName *string `locationName:"instanceSnapshotName" type:"string" required:"true"` } // String returns the string representation -func (s DetachDiskInput) String() string { +func (s GetInstanceSnapshotInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DetachDiskInput) GoString() string { +func (s GetInstanceSnapshotInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DetachDiskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachDiskInput"} - if s.DiskName == nil { - invalidParams.Add(request.NewErrParamRequired("DiskName")) +func (s *GetInstanceSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetInstanceSnapshotInput"} + if s.InstanceSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceSnapshotName")) } if invalidParams.Len() > 0 { @@ -9983,135 +16454,118 @@ func (s *DetachDiskInput) Validate() error { return nil } -// SetDiskName sets the DiskName field's value. -func (s *DetachDiskInput) SetDiskName(v string) *DetachDiskInput { - s.DiskName = &v +// SetInstanceSnapshotName sets the InstanceSnapshotName field's value. +func (s *GetInstanceSnapshotInput) SetInstanceSnapshotName(v string) *GetInstanceSnapshotInput { + s.InstanceSnapshotName = &v return s } -type DetachDiskOutput struct { +type GetInstanceSnapshotOutput struct { _ struct{} `type:"structure"` - // An object describing the API operations. - Operations []*Operation `locationName:"operations" type:"list"` + // An array of key-value pairs containing information about the results of your + // get instance snapshot request. + InstanceSnapshot *InstanceSnapshot `locationName:"instanceSnapshot" type:"structure"` } // String returns the string representation -func (s DetachDiskOutput) String() string { +func (s GetInstanceSnapshotOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DetachDiskOutput) GoString() string { +func (s GetInstanceSnapshotOutput) GoString() string { return s.String() } -// SetOperations sets the Operations field's value. -func (s *DetachDiskOutput) SetOperations(v []*Operation) *DetachDiskOutput { - s.Operations = v +// SetInstanceSnapshot sets the InstanceSnapshot field's value. +func (s *GetInstanceSnapshotOutput) SetInstanceSnapshot(v *InstanceSnapshot) *GetInstanceSnapshotOutput { + s.InstanceSnapshot = v return s } -type DetachInstancesFromLoadBalancerInput struct { +type GetInstanceSnapshotsInput struct { _ struct{} `type:"structure"` - // An array of strings containing the names of the instances you want to detach - // from the load balancer. - // - // InstanceNames is a required field - InstanceNames []*string `locationName:"instanceNames" type:"list" required:"true"` - - // The name of the Lightsail load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` + // A token used for advancing to the next page of results from your get instance + // snapshots request. + PageToken *string `locationName:"pageToken" type:"string"` } // String returns the string representation -func (s DetachInstancesFromLoadBalancerInput) String() string { +func (s GetInstanceSnapshotsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DetachInstancesFromLoadBalancerInput) GoString() string { +func (s GetInstanceSnapshotsInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetachInstancesFromLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachInstancesFromLoadBalancerInput"} - if s.InstanceNames == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceNames")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceNames sets the InstanceNames field's value. -func (s *DetachInstancesFromLoadBalancerInput) SetInstanceNames(v []*string) *DetachInstancesFromLoadBalancerInput { - s.InstanceNames = v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *DetachInstancesFromLoadBalancerInput) SetLoadBalancerName(v string) *DetachInstancesFromLoadBalancerInput { - s.LoadBalancerName = &v +// SetPageToken sets the PageToken field's value. +func (s *GetInstanceSnapshotsInput) SetPageToken(v string) *GetInstanceSnapshotsInput { + s.PageToken = &v return s } -type DetachInstancesFromLoadBalancerOutput struct { +type GetInstanceSnapshotsOutput struct { _ struct{} `type:"structure"` - // An object describing the API operations. - Operations []*Operation `locationName:"operations" type:"list"` + // An array of key-value pairs containing information about the results of your + // get instance snapshots request. + InstanceSnapshots []*InstanceSnapshot `locationName:"instanceSnapshots" type:"list"` + + // A token used for advancing to the next page of results from your get instance + // snapshots request. + NextPageToken *string `locationName:"nextPageToken" type:"string"` } // String returns the string representation -func (s DetachInstancesFromLoadBalancerOutput) String() string { +func (s GetInstanceSnapshotsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DetachInstancesFromLoadBalancerOutput) GoString() string { +func (s GetInstanceSnapshotsOutput) GoString() string { return s.String() } -// SetOperations sets the Operations field's value. -func (s *DetachInstancesFromLoadBalancerOutput) SetOperations(v []*Operation) *DetachInstancesFromLoadBalancerOutput { - s.Operations = v +// SetInstanceSnapshots sets the InstanceSnapshots field's value. +func (s *GetInstanceSnapshotsOutput) SetInstanceSnapshots(v []*InstanceSnapshot) *GetInstanceSnapshotsOutput { + s.InstanceSnapshots = v return s } -type DetachStaticIpInput struct { +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetInstanceSnapshotsOutput) SetNextPageToken(v string) *GetInstanceSnapshotsOutput { + s.NextPageToken = &v + return s +} + +type GetInstanceStateInput struct { _ struct{} `type:"structure"` - // The name of the static IP to detach from the instance. + // The name of the instance to get state information about. // - // StaticIpName is a required field - StaticIpName *string `locationName:"staticIpName" type:"string" required:"true"` + // InstanceName is a required field + InstanceName *string `locationName:"instanceName" type:"string" required:"true"` } // String returns the string representation -func (s DetachStaticIpInput) String() string { +func (s GetInstanceStateInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DetachStaticIpInput) GoString() string { +func (s GetInstanceStateInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DetachStaticIpInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachStaticIpInput"} - if s.StaticIpName == nil { - invalidParams.Add(request.NewErrParamRequired("StaticIpName")) +func (s *GetInstanceStateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetInstanceStateInput"} + if s.InstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceName")) } if invalidParams.Len() > 0 { @@ -10120,1008 +16574,1234 @@ func (s *DetachStaticIpInput) Validate() error { return nil } -// SetStaticIpName sets the StaticIpName field's value. -func (s *DetachStaticIpInput) SetStaticIpName(v string) *DetachStaticIpInput { - s.StaticIpName = &v +// SetInstanceName sets the InstanceName field's value. +func (s *GetInstanceStateInput) SetInstanceName(v string) *GetInstanceStateInput { + s.InstanceName = &v return s } -type DetachStaticIpOutput struct { +type GetInstanceStateOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the results of your - // detach static IP request. - Operations []*Operation `locationName:"operations" type:"list"` + // The state of the instance. + State *InstanceState `locationName:"state" type:"structure"` } // String returns the string representation -func (s DetachStaticIpOutput) String() string { +func (s GetInstanceStateOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DetachStaticIpOutput) GoString() string { +func (s GetInstanceStateOutput) GoString() string { return s.String() } -// SetOperations sets the Operations field's value. -func (s *DetachStaticIpOutput) SetOperations(v []*Operation) *DetachStaticIpOutput { - s.Operations = v +// SetState sets the State field's value. +func (s *GetInstanceStateOutput) SetState(v *InstanceState) *GetInstanceStateOutput { + s.State = v return s } -// Describes a system disk or an block storage disk. -type Disk struct { +type GetInstancesInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the disk. - Arn *string `locationName:"arn" type:"string"` - - // The resources to which the disk is attached. - AttachedTo *string `locationName:"attachedTo" type:"string"` - - // (Deprecated) The attachment state of the disk. - // - // In releases prior to November 14, 2017, this parameter returned attached - // for system disks in the API response. It is now deprecated, but still included - // in the response. Use isAttached instead. - // - // Deprecated: AttachmentState has been deprecated - AttachmentState *string `locationName:"attachmentState" deprecated:"true" type:"string"` - - // The date when the disk was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // (Deprecated) The number of GB in use by the disk. - // - // In releases prior to November 14, 2017, this parameter was not included in - // the API response. It is now deprecated. - // - // Deprecated: GbInUse has been deprecated - GbInUse *int64 `locationName:"gbInUse" deprecated:"true" type:"integer"` - - // The input/output operations per second (IOPS) of the disk. - Iops *int64 `locationName:"iops" type:"integer"` - - // A Boolean value indicating whether the disk is attached. - IsAttached *bool `locationName:"isAttached" type:"boolean"` - - // A Boolean value indicating whether this disk is a system disk (has an operating - // system loaded on it). - IsSystemDisk *bool `locationName:"isSystemDisk" type:"boolean"` - - // The AWS Region and Availability Zone where the disk is located. - Location *ResourceLocation `locationName:"location" type:"structure"` - - // The unique name of the disk. - Name *string `locationName:"name" type:"string"` + // A token used for advancing to the next page of results from your get instances + // request. + PageToken *string `locationName:"pageToken" type:"string"` +} - // The disk path. - Path *string `locationName:"path" type:"string"` +// String returns the string representation +func (s GetInstancesInput) String() string { + return awsutil.Prettify(s) +} - // The Lightsail resource type (e.g., Disk). - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` +// GoString returns the string representation +func (s GetInstancesInput) GoString() string { + return s.String() +} - // The size of the disk in GB. - SizeInGb *int64 `locationName:"sizeInGb" type:"integer"` +// SetPageToken sets the PageToken field's value. +func (s *GetInstancesInput) SetPageToken(v string) *GetInstancesInput { + s.PageToken = &v + return s +} - // Describes the status of the disk. - State *string `locationName:"state" type:"string" enum:"DiskState"` +type GetInstancesOutput struct { + _ struct{} `type:"structure"` - // The support code. Include this code in your email to support when you have - // questions about an instance or another resource in Lightsail. This code enables - // our support team to look up your Lightsail information more easily. - SupportCode *string `locationName:"supportCode" type:"string"` + // An array of key-value pairs containing information about your instances. + Instances []*Instance `locationName:"instances" type:"list"` + + // A token used for advancing to the next page of results from your get instances + // request. + NextPageToken *string `locationName:"nextPageToken" type:"string"` } // String returns the string representation -func (s Disk) String() string { +func (s GetInstancesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Disk) GoString() string { +func (s GetInstancesOutput) GoString() string { return s.String() } -// SetArn sets the Arn field's value. -func (s *Disk) SetArn(v string) *Disk { - s.Arn = &v +// SetInstances sets the Instances field's value. +func (s *GetInstancesOutput) SetInstances(v []*Instance) *GetInstancesOutput { + s.Instances = v return s } -// SetAttachedTo sets the AttachedTo field's value. -func (s *Disk) SetAttachedTo(v string) *Disk { - s.AttachedTo = &v +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetInstancesOutput) SetNextPageToken(v string) *GetInstancesOutput { + s.NextPageToken = &v return s } -// SetAttachmentState sets the AttachmentState field's value. -func (s *Disk) SetAttachmentState(v string) *Disk { - s.AttachmentState = &v - return s +type GetKeyPairInput struct { + _ struct{} `type:"structure"` + + // The name of the key pair for which you are requesting information. + // + // KeyPairName is a required field + KeyPairName *string `locationName:"keyPairName" type:"string" required:"true"` } -// SetCreatedAt sets the CreatedAt field's value. -func (s *Disk) SetCreatedAt(v time.Time) *Disk { - s.CreatedAt = &v - return s +// String returns the string representation +func (s GetKeyPairInput) String() string { + return awsutil.Prettify(s) } -// SetGbInUse sets the GbInUse field's value. -func (s *Disk) SetGbInUse(v int64) *Disk { - s.GbInUse = &v - return s +// GoString returns the string representation +func (s GetKeyPairInput) GoString() string { + return s.String() } -// SetIops sets the Iops field's value. -func (s *Disk) SetIops(v int64) *Disk { - s.Iops = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetKeyPairInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetKeyPairInput"} + if s.KeyPairName == nil { + invalidParams.Add(request.NewErrParamRequired("KeyPairName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetIsAttached sets the IsAttached field's value. -func (s *Disk) SetIsAttached(v bool) *Disk { - s.IsAttached = &v +// SetKeyPairName sets the KeyPairName field's value. +func (s *GetKeyPairInput) SetKeyPairName(v string) *GetKeyPairInput { + s.KeyPairName = &v return s } -// SetIsSystemDisk sets the IsSystemDisk field's value. -func (s *Disk) SetIsSystemDisk(v bool) *Disk { - s.IsSystemDisk = &v - return s +type GetKeyPairOutput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs containing information about the key pair. + KeyPair *KeyPair `locationName:"keyPair" type:"structure"` } -// SetLocation sets the Location field's value. -func (s *Disk) SetLocation(v *ResourceLocation) *Disk { - s.Location = v - return s +// String returns the string representation +func (s GetKeyPairOutput) String() string { + return awsutil.Prettify(s) } -// SetName sets the Name field's value. -func (s *Disk) SetName(v string) *Disk { - s.Name = &v - return s +// GoString returns the string representation +func (s GetKeyPairOutput) GoString() string { + return s.String() } -// SetPath sets the Path field's value. -func (s *Disk) SetPath(v string) *Disk { - s.Path = &v +// SetKeyPair sets the KeyPair field's value. +func (s *GetKeyPairOutput) SetKeyPair(v *KeyPair) *GetKeyPairOutput { + s.KeyPair = v return s } -// SetResourceType sets the ResourceType field's value. -func (s *Disk) SetResourceType(v string) *Disk { - s.ResourceType = &v - return s +type GetKeyPairsInput struct { + _ struct{} `type:"structure"` + + // A token used for advancing to the next page of results from your get key + // pairs request. + PageToken *string `locationName:"pageToken" type:"string"` } -// SetSizeInGb sets the SizeInGb field's value. -func (s *Disk) SetSizeInGb(v int64) *Disk { - s.SizeInGb = &v - return s +// String returns the string representation +func (s GetKeyPairsInput) String() string { + return awsutil.Prettify(s) } -// SetState sets the State field's value. -func (s *Disk) SetState(v string) *Disk { - s.State = &v - return s +// GoString returns the string representation +func (s GetKeyPairsInput) GoString() string { + return s.String() } -// SetSupportCode sets the SupportCode field's value. -func (s *Disk) SetSupportCode(v string) *Disk { - s.SupportCode = &v +// SetPageToken sets the PageToken field's value. +func (s *GetKeyPairsInput) SetPageToken(v string) *GetKeyPairsInput { + s.PageToken = &v return s } -// Describes a block storage disk mapping. -type DiskMap struct { +type GetKeyPairsOutput struct { _ struct{} `type:"structure"` - // The new disk name (e.g., my-new-disk). - NewDiskName *string `locationName:"newDiskName" type:"string"` + // An array of key-value pairs containing information about the key pairs. + KeyPairs []*KeyPair `locationName:"keyPairs" type:"list"` - // The original disk path exposed to the instance (for example, /dev/sdh). - OriginalDiskPath *string `locationName:"originalDiskPath" type:"string"` + // A token used for advancing to the next page of results from your get key + // pairs request. + NextPageToken *string `locationName:"nextPageToken" type:"string"` } // String returns the string representation -func (s DiskMap) String() string { +func (s GetKeyPairsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DiskMap) GoString() string { +func (s GetKeyPairsOutput) GoString() string { return s.String() } -// SetNewDiskName sets the NewDiskName field's value. -func (s *DiskMap) SetNewDiskName(v string) *DiskMap { - s.NewDiskName = &v +// SetKeyPairs sets the KeyPairs field's value. +func (s *GetKeyPairsOutput) SetKeyPairs(v []*KeyPair) *GetKeyPairsOutput { + s.KeyPairs = v return s } -// SetOriginalDiskPath sets the OriginalDiskPath field's value. -func (s *DiskMap) SetOriginalDiskPath(v string) *DiskMap { - s.OriginalDiskPath = &v +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetKeyPairsOutput) SetNextPageToken(v string) *GetKeyPairsOutput { + s.NextPageToken = &v return s } -// Describes a block storage disk snapshot. -type DiskSnapshot struct { +type GetLoadBalancerInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the disk snapshot. - Arn *string `locationName:"arn" type:"string"` + // The name of the load balancer. + // + // LoadBalancerName is a required field + LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` +} - // The date when the disk snapshot was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` +// String returns the string representation +func (s GetLoadBalancerInput) String() string { + return awsutil.Prettify(s) +} - // The Amazon Resource Name (ARN) of the source disk from which you are creating - // the disk snapshot. - FromDiskArn *string `locationName:"fromDiskArn" type:"string"` +// GoString returns the string representation +func (s GetLoadBalancerInput) GoString() string { + return s.String() +} - // The unique name of the source disk from which you are creating the disk snapshot. - FromDiskName *string `locationName:"fromDiskName" type:"string"` +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetLoadBalancerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetLoadBalancerInput"} + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } - // The AWS Region and Availability Zone where the disk snapshot was created. - Location *ResourceLocation `locationName:"location" type:"structure"` + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} - // The name of the disk snapshot (e.g., my-disk-snapshot). - Name *string `locationName:"name" type:"string"` +// SetLoadBalancerName sets the LoadBalancerName field's value. +func (s *GetLoadBalancerInput) SetLoadBalancerName(v string) *GetLoadBalancerInput { + s.LoadBalancerName = &v + return s +} - // The progress of the disk snapshot operation. - Progress *string `locationName:"progress" type:"string"` +type GetLoadBalancerMetricDataInput struct { + _ struct{} `type:"structure"` + + // The end time of the period. + // + // EndTime is a required field + EndTime *time.Time `locationName:"endTime" type:"timestamp" required:"true"` + + // The name of the load balancer. + // + // LoadBalancerName is a required field + LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` + + // The metric about which you want to return information. Valid values are listed + // below, along with the most useful statistics to include in your request. + // + // * ClientTLSNegotiationErrorCount - The number of TLS connections initiated + // by the client that did not establish a session with the load balancer. + // Possible causes include a mismatch of ciphers or protocols. + // + // Statistics: The most useful statistic is Sum. + // + // * HealthyHostCount - The number of target instances that are considered + // healthy. + // + // Statistics: The most useful statistic are Average, Minimum, and Maximum. + // + // * UnhealthyHostCount - The number of target instances that are considered + // unhealthy. + // + // Statistics: The most useful statistic are Average, Minimum, and Maximum. + // + // * HTTPCode_LB_4XX_Count - The number of HTTP 4XX client error codes that + // originate from the load balancer. Client errors are generated when requests + // are malformed or incomplete. These requests have not been received by + // the target instance. This count does not include any response codes generated + // by the target instances. + // + // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, + // and Average all return 1. + // + // * HTTPCode_LB_5XX_Count - The number of HTTP 5XX server error codes that + // originate from the load balancer. This count does not include any response + // codes generated by the target instances. + // + // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, + // and Average all return 1. Note that Minimum, Maximum, and Average all + // return 1. + // + // * HTTPCode_Instance_2XX_Count - The number of HTTP response codes generated + // by the target instances. This does not include any response codes generated + // by the load balancer. + // + // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, + // and Average all return 1. + // + // * HTTPCode_Instance_3XX_Count - The number of HTTP response codes generated + // by the target instances. This does not include any response codes generated + // by the load balancer. + // + // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, + // and Average all return 1. + // + // * HTTPCode_Instance_4XX_Count - The number of HTTP response codes generated + // by the target instances. This does not include any response codes generated + // by the load balancer. + // + // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, + // and Average all return 1. + // + // * HTTPCode_Instance_5XX_Count - The number of HTTP response codes generated + // by the target instances. This does not include any response codes generated + // by the load balancer. + // + // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, + // and Average all return 1. + // + // * InstanceResponseTime - The time elapsed, in seconds, after the request + // leaves the load balancer until a response from the target instance is + // received. + // + // Statistics: The most useful statistic is Average. + // + // * RejectedConnectionCount - The number of connections that were rejected + // because the load balancer had reached its maximum number of connections. + // + // Statistics: The most useful statistic is Sum. + // + // * RequestCount - The number of requests processed over IPv4. This count + // includes only the requests with a response generated by a target instance + // of the load balancer. + // + // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, + // and Average all return 1. + // + // MetricName is a required field + MetricName *string `locationName:"metricName" type:"string" required:"true" enum:"LoadBalancerMetricName"` - // The Lightsail resource type (e.g., DiskSnapshot). - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` + // The granularity, in seconds, of the returned data points. + // + // Period is a required field + Period *int64 `locationName:"period" min:"60" type:"integer" required:"true"` - // The size of the disk in GB. - SizeInGb *int64 `locationName:"sizeInGb" type:"integer"` + // The start time of the period. + // + // StartTime is a required field + StartTime *time.Time `locationName:"startTime" type:"timestamp" required:"true"` - // The status of the disk snapshot operation. - State *string `locationName:"state" type:"string" enum:"DiskSnapshotState"` + // An array of statistics that you want to request metrics for. Valid values + // are listed below. + // + // * SampleCount - The count (number) of data points used for the statistical + // calculation. + // + // * Average - The value of Sum / SampleCount during the specified period. + // By comparing this statistic with the Minimum and Maximum, you can determine + // the full scope of a metric and how close the average use is to the Minimum + // and Maximum. This comparison helps you to know when to increase or decrease + // your resources as needed. + // + // * Sum - All values submitted for the matching metric added together. This + // statistic can be useful for determining the total volume of a metric. + // + // * Minimum - The lowest value observed during the specified period. You + // can use this value to determine low volumes of activity for your application. + // + // * Maximum - The highest value observed during the specified period. You + // can use this value to determine high volumes of activity for your application. + // + // Statistics is a required field + Statistics []*string `locationName:"statistics" type:"list" required:"true"` - // The support code. Include this code in your email to support when you have - // questions about an instance or another resource in Lightsail. This code enables - // our support team to look up your Lightsail information more easily. - SupportCode *string `locationName:"supportCode" type:"string"` + // The unit for the time period request. Valid values are listed below. + // + // Unit is a required field + Unit *string `locationName:"unit" type:"string" required:"true" enum:"MetricUnit"` } // String returns the string representation -func (s DiskSnapshot) String() string { +func (s GetLoadBalancerMetricDataInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DiskSnapshot) GoString() string { +func (s GetLoadBalancerMetricDataInput) GoString() string { return s.String() } -// SetArn sets the Arn field's value. -func (s *DiskSnapshot) SetArn(v string) *DiskSnapshot { - s.Arn = &v - return s -} - -// SetCreatedAt sets the CreatedAt field's value. -func (s *DiskSnapshot) SetCreatedAt(v time.Time) *DiskSnapshot { - s.CreatedAt = &v - return s -} - -// SetFromDiskArn sets the FromDiskArn field's value. -func (s *DiskSnapshot) SetFromDiskArn(v string) *DiskSnapshot { - s.FromDiskArn = &v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetLoadBalancerMetricDataInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetLoadBalancerMetricDataInput"} + if s.EndTime == nil { + invalidParams.Add(request.NewErrParamRequired("EndTime")) + } + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + if s.MetricName == nil { + invalidParams.Add(request.NewErrParamRequired("MetricName")) + } + if s.Period == nil { + invalidParams.Add(request.NewErrParamRequired("Period")) + } + if s.Period != nil && *s.Period < 60 { + invalidParams.Add(request.NewErrParamMinValue("Period", 60)) + } + if s.StartTime == nil { + invalidParams.Add(request.NewErrParamRequired("StartTime")) + } + if s.Statistics == nil { + invalidParams.Add(request.NewErrParamRequired("Statistics")) + } + if s.Unit == nil { + invalidParams.Add(request.NewErrParamRequired("Unit")) + } -// SetFromDiskName sets the FromDiskName field's value. -func (s *DiskSnapshot) SetFromDiskName(v string) *DiskSnapshot { - s.FromDiskName = &v - return s + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetLocation sets the Location field's value. -func (s *DiskSnapshot) SetLocation(v *ResourceLocation) *DiskSnapshot { - s.Location = v +// SetEndTime sets the EndTime field's value. +func (s *GetLoadBalancerMetricDataInput) SetEndTime(v time.Time) *GetLoadBalancerMetricDataInput { + s.EndTime = &v return s } -// SetName sets the Name field's value. -func (s *DiskSnapshot) SetName(v string) *DiskSnapshot { - s.Name = &v +// SetLoadBalancerName sets the LoadBalancerName field's value. +func (s *GetLoadBalancerMetricDataInput) SetLoadBalancerName(v string) *GetLoadBalancerMetricDataInput { + s.LoadBalancerName = &v return s } -// SetProgress sets the Progress field's value. -func (s *DiskSnapshot) SetProgress(v string) *DiskSnapshot { - s.Progress = &v +// SetMetricName sets the MetricName field's value. +func (s *GetLoadBalancerMetricDataInput) SetMetricName(v string) *GetLoadBalancerMetricDataInput { + s.MetricName = &v return s } -// SetResourceType sets the ResourceType field's value. -func (s *DiskSnapshot) SetResourceType(v string) *DiskSnapshot { - s.ResourceType = &v +// SetPeriod sets the Period field's value. +func (s *GetLoadBalancerMetricDataInput) SetPeriod(v int64) *GetLoadBalancerMetricDataInput { + s.Period = &v return s } -// SetSizeInGb sets the SizeInGb field's value. -func (s *DiskSnapshot) SetSizeInGb(v int64) *DiskSnapshot { - s.SizeInGb = &v +// SetStartTime sets the StartTime field's value. +func (s *GetLoadBalancerMetricDataInput) SetStartTime(v time.Time) *GetLoadBalancerMetricDataInput { + s.StartTime = &v return s } -// SetState sets the State field's value. -func (s *DiskSnapshot) SetState(v string) *DiskSnapshot { - s.State = &v +// SetStatistics sets the Statistics field's value. +func (s *GetLoadBalancerMetricDataInput) SetStatistics(v []*string) *GetLoadBalancerMetricDataInput { + s.Statistics = v return s } -// SetSupportCode sets the SupportCode field's value. -func (s *DiskSnapshot) SetSupportCode(v string) *DiskSnapshot { - s.SupportCode = &v +// SetUnit sets the Unit field's value. +func (s *GetLoadBalancerMetricDataInput) SetUnit(v string) *GetLoadBalancerMetricDataInput { + s.Unit = &v return s } -// Describes a domain where you are storing recordsets in Lightsail. -type Domain struct { +type GetLoadBalancerMetricDataOutput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the domain recordset (e.g., arn:aws:lightsail:global:123456789101:Domain/824cede0-abc7-4f84-8dbc-12345EXAMPLE). - Arn *string `locationName:"arn" type:"string"` - - // The date when the domain recordset was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // An array of key-value pairs containing information about the domain entries. - DomainEntries []*DomainEntry `locationName:"domainEntries" type:"list"` - - // The AWS Region and Availability Zones where the domain recordset was created. - Location *ResourceLocation `locationName:"location" type:"structure"` - - // The name of the domain. - Name *string `locationName:"name" type:"string"` - - // The resource type. - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` + // An array of metric datapoint objects. + MetricData []*MetricDatapoint `locationName:"metricData" type:"list"` - // The support code. Include this code in your email to support when you have - // questions about an instance or another resource in Lightsail. This code enables - // our support team to look up your Lightsail information more easily. - SupportCode *string `locationName:"supportCode" type:"string"` + // The metric about which you are receiving information. Valid values are listed + // below, along with the most useful statistics to include in your request. + // + // * ClientTLSNegotiationErrorCount - The number of TLS connections initiated + // by the client that did not establish a session with the load balancer. + // Possible causes include a mismatch of ciphers or protocols. + // + // Statistics: The most useful statistic is Sum. + // + // * HealthyHostCount - The number of target instances that are considered + // healthy. + // + // Statistics: The most useful statistic are Average, Minimum, and Maximum. + // + // * UnhealthyHostCount - The number of target instances that are considered + // unhealthy. + // + // Statistics: The most useful statistic are Average, Minimum, and Maximum. + // + // * HTTPCode_LB_4XX_Count - The number of HTTP 4XX client error codes that + // originate from the load balancer. Client errors are generated when requests + // are malformed or incomplete. These requests have not been received by + // the target instance. This count does not include any response codes generated + // by the target instances. + // + // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, + // and Average all return 1. + // + // * HTTPCode_LB_5XX_Count - The number of HTTP 5XX server error codes that + // originate from the load balancer. This count does not include any response + // codes generated by the target instances. + // + // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, + // and Average all return 1. Note that Minimum, Maximum, and Average all + // return 1. + // + // * HTTPCode_Instance_2XX_Count - The number of HTTP response codes generated + // by the target instances. This does not include any response codes generated + // by the load balancer. + // + // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, + // and Average all return 1. + // + // * HTTPCode_Instance_3XX_Count - The number of HTTP response codes generated + // by the target instances. This does not include any response codes generated + // by the load balancer. + // + // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, + // and Average all return 1. + // + // * HTTPCode_Instance_4XX_Count - The number of HTTP response codes generated + // by the target instances. This does not include any response codes generated + // by the load balancer. + // + // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, + // and Average all return 1. + // + // * HTTPCode_Instance_5XX_Count - The number of HTTP response codes generated + // by the target instances. This does not include any response codes generated + // by the load balancer. + // + // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, + // and Average all return 1. + // + // * InstanceResponseTime - The time elapsed, in seconds, after the request + // leaves the load balancer until a response from the target instance is + // received. + // + // Statistics: The most useful statistic is Average. + // + // * RejectedConnectionCount - The number of connections that were rejected + // because the load balancer had reached its maximum number of connections. + // + // Statistics: The most useful statistic is Sum. + // + // * RequestCount - The number of requests processed over IPv4. This count + // includes only the requests with a response generated by a target instance + // of the load balancer. + // + // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, + // and Average all return 1. + MetricName *string `locationName:"metricName" type:"string" enum:"LoadBalancerMetricName"` } // String returns the string representation -func (s Domain) String() string { +func (s GetLoadBalancerMetricDataOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Domain) GoString() string { +func (s GetLoadBalancerMetricDataOutput) GoString() string { return s.String() } -// SetArn sets the Arn field's value. -func (s *Domain) SetArn(v string) *Domain { - s.Arn = &v +// SetMetricData sets the MetricData field's value. +func (s *GetLoadBalancerMetricDataOutput) SetMetricData(v []*MetricDatapoint) *GetLoadBalancerMetricDataOutput { + s.MetricData = v return s } -// SetCreatedAt sets the CreatedAt field's value. -func (s *Domain) SetCreatedAt(v time.Time) *Domain { - s.CreatedAt = &v +// SetMetricName sets the MetricName field's value. +func (s *GetLoadBalancerMetricDataOutput) SetMetricName(v string) *GetLoadBalancerMetricDataOutput { + s.MetricName = &v return s } -// SetDomainEntries sets the DomainEntries field's value. -func (s *Domain) SetDomainEntries(v []*DomainEntry) *Domain { - s.DomainEntries = v - return s -} +type GetLoadBalancerOutput struct { + _ struct{} `type:"structure"` -// SetLocation sets the Location field's value. -func (s *Domain) SetLocation(v *ResourceLocation) *Domain { - s.Location = v - return s + // An object containing information about your load balancer. + LoadBalancer *LoadBalancer `locationName:"loadBalancer" type:"structure"` } -// SetName sets the Name field's value. -func (s *Domain) SetName(v string) *Domain { - s.Name = &v - return s +// String returns the string representation +func (s GetLoadBalancerOutput) String() string { + return awsutil.Prettify(s) } -// SetResourceType sets the ResourceType field's value. -func (s *Domain) SetResourceType(v string) *Domain { - s.ResourceType = &v - return s +// GoString returns the string representation +func (s GetLoadBalancerOutput) GoString() string { + return s.String() } -// SetSupportCode sets the SupportCode field's value. -func (s *Domain) SetSupportCode(v string) *Domain { - s.SupportCode = &v +// SetLoadBalancer sets the LoadBalancer field's value. +func (s *GetLoadBalancerOutput) SetLoadBalancer(v *LoadBalancer) *GetLoadBalancerOutput { + s.LoadBalancer = v return s } -// Describes a domain recordset entry. -type DomainEntry struct { +type GetLoadBalancerTlsCertificatesInput struct { _ struct{} `type:"structure"` - // The ID of the domain recordset entry. - Id *string `locationName:"id" type:"string"` - - // When true, specifies whether the domain entry is an alias used by the Lightsail - // load balancer. You can include an alias (A type) record in your request, - // which points to a load balancer DNS name and routes traffic to your load - // balancer - IsAlias *bool `locationName:"isAlias" type:"boolean"` - - // The name of the domain. - Name *string `locationName:"name" type:"string"` - - // (Deprecated) The options for the domain entry. - // - // In releases prior to November 29, 2017, this parameter was not included in - // the API response. It is now deprecated. - // - // Deprecated: Options has been deprecated - Options map[string]*string `locationName:"options" deprecated:"true" type:"map"` - - // The target AWS name server (e.g., ns-111.awsdns-22.com.). + // The name of the load balancer you associated with your SSL/TLS certificate. // - // For Lightsail load balancers, the value looks like ab1234c56789c6b86aba6fb203d443bc-123456789.us-east-2.elb.amazonaws.com. - // Be sure to also set isAlias to true when setting up an A record for a load - // balancer. - Target *string `locationName:"target" type:"string"` - - // The type of domain entry (e.g., SOA or NS). - Type *string `locationName:"type" type:"string"` + // LoadBalancerName is a required field + LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` } // String returns the string representation -func (s DomainEntry) String() string { +func (s GetLoadBalancerTlsCertificatesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DomainEntry) GoString() string { +func (s GetLoadBalancerTlsCertificatesInput) GoString() string { return s.String() } -// SetId sets the Id field's value. -func (s *DomainEntry) SetId(v string) *DomainEntry { - s.Id = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetLoadBalancerTlsCertificatesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetLoadBalancerTlsCertificatesInput"} + if s.LoadBalancerName == nil { + invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetIsAlias sets the IsAlias field's value. -func (s *DomainEntry) SetIsAlias(v bool) *DomainEntry { - s.IsAlias = &v +// SetLoadBalancerName sets the LoadBalancerName field's value. +func (s *GetLoadBalancerTlsCertificatesInput) SetLoadBalancerName(v string) *GetLoadBalancerTlsCertificatesInput { + s.LoadBalancerName = &v return s } -// SetName sets the Name field's value. -func (s *DomainEntry) SetName(v string) *DomainEntry { - s.Name = &v - return s +type GetLoadBalancerTlsCertificatesOutput struct { + _ struct{} `type:"structure"` + + // An array of LoadBalancerTlsCertificate objects describing your SSL/TLS certificates. + TlsCertificates []*LoadBalancerTlsCertificate `locationName:"tlsCertificates" type:"list"` } -// SetOptions sets the Options field's value. -func (s *DomainEntry) SetOptions(v map[string]*string) *DomainEntry { - s.Options = v - return s +// String returns the string representation +func (s GetLoadBalancerTlsCertificatesOutput) String() string { + return awsutil.Prettify(s) } -// SetTarget sets the Target field's value. -func (s *DomainEntry) SetTarget(v string) *DomainEntry { - s.Target = &v - return s +// GoString returns the string representation +func (s GetLoadBalancerTlsCertificatesOutput) GoString() string { + return s.String() } -// SetType sets the Type field's value. -func (s *DomainEntry) SetType(v string) *DomainEntry { - s.Type = &v +// SetTlsCertificates sets the TlsCertificates field's value. +func (s *GetLoadBalancerTlsCertificatesOutput) SetTlsCertificates(v []*LoadBalancerTlsCertificate) *GetLoadBalancerTlsCertificatesOutput { + s.TlsCertificates = v return s } -type DownloadDefaultKeyPairInput struct { +type GetLoadBalancersInput struct { _ struct{} `type:"structure"` + + // A token used for paginating the results from your GetLoadBalancers request. + PageToken *string `locationName:"pageToken" type:"string"` } // String returns the string representation -func (s DownloadDefaultKeyPairInput) String() string { +func (s GetLoadBalancersInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DownloadDefaultKeyPairInput) GoString() string { +func (s GetLoadBalancersInput) GoString() string { return s.String() } -type DownloadDefaultKeyPairOutput struct { +// SetPageToken sets the PageToken field's value. +func (s *GetLoadBalancersInput) SetPageToken(v string) *GetLoadBalancersInput { + s.PageToken = &v + return s +} + +type GetLoadBalancersOutput struct { _ struct{} `type:"structure"` - // A base64-encoded RSA private key. - PrivateKeyBase64 *string `locationName:"privateKeyBase64" type:"string"` + // An array of LoadBalancer objects describing your load balancers. + LoadBalancers []*LoadBalancer `locationName:"loadBalancers" type:"list"` - // A base64-encoded public key of the ssh-rsa type. - PublicKeyBase64 *string `locationName:"publicKeyBase64" type:"string"` + // A token used for advancing to the next page of results from your GetLoadBalancers + // request. + NextPageToken *string `locationName:"nextPageToken" type:"string"` } // String returns the string representation -func (s DownloadDefaultKeyPairOutput) String() string { +func (s GetLoadBalancersOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DownloadDefaultKeyPairOutput) GoString() string { +func (s GetLoadBalancersOutput) GoString() string { return s.String() } -// SetPrivateKeyBase64 sets the PrivateKeyBase64 field's value. -func (s *DownloadDefaultKeyPairOutput) SetPrivateKeyBase64(v string) *DownloadDefaultKeyPairOutput { - s.PrivateKeyBase64 = &v +// SetLoadBalancers sets the LoadBalancers field's value. +func (s *GetLoadBalancersOutput) SetLoadBalancers(v []*LoadBalancer) *GetLoadBalancersOutput { + s.LoadBalancers = v return s } -// SetPublicKeyBase64 sets the PublicKeyBase64 field's value. -func (s *DownloadDefaultKeyPairOutput) SetPublicKeyBase64(v string) *DownloadDefaultKeyPairOutput { - s.PublicKeyBase64 = &v +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetLoadBalancersOutput) SetNextPageToken(v string) *GetLoadBalancersOutput { + s.NextPageToken = &v return s } -type GetActiveNamesInput struct { +type GetOperationInput struct { _ struct{} `type:"structure"` - // A token used for paginating results from your get active names request. - PageToken *string `locationName:"pageToken" type:"string"` + // A GUID used to identify the operation. + // + // OperationId is a required field + OperationId *string `locationName:"operationId" type:"string" required:"true"` } // String returns the string representation -func (s GetActiveNamesInput) String() string { +func (s GetOperationInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetActiveNamesInput) GoString() string { +func (s GetOperationInput) GoString() string { return s.String() } -// SetPageToken sets the PageToken field's value. -func (s *GetActiveNamesInput) SetPageToken(v string) *GetActiveNamesInput { - s.PageToken = &v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetOperationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetOperationInput"} + if s.OperationId == nil { + invalidParams.Add(request.NewErrParamRequired("OperationId")) + } -type GetActiveNamesOutput struct { - _ struct{} `type:"structure"` + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} - // The list of active names returned by the get active names request. - ActiveNames []*string `locationName:"activeNames" type:"list"` +// SetOperationId sets the OperationId field's value. +func (s *GetOperationInput) SetOperationId(v string) *GetOperationInput { + s.OperationId = &v + return s +} - // A token used for advancing to the next page of results from your get active - // names request. - NextPageToken *string `locationName:"nextPageToken" type:"string"` +type GetOperationOutput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs containing information about the results of your + // get operation request. + Operation *Operation `locationName:"operation" type:"structure"` } // String returns the string representation -func (s GetActiveNamesOutput) String() string { +func (s GetOperationOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetActiveNamesOutput) GoString() string { +func (s GetOperationOutput) GoString() string { return s.String() } -// SetActiveNames sets the ActiveNames field's value. -func (s *GetActiveNamesOutput) SetActiveNames(v []*string) *GetActiveNamesOutput { - s.ActiveNames = v - return s -} - -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetActiveNamesOutput) SetNextPageToken(v string) *GetActiveNamesOutput { - s.NextPageToken = &v +// SetOperation sets the Operation field's value. +func (s *GetOperationOutput) SetOperation(v *Operation) *GetOperationOutput { + s.Operation = v return s } -type GetBlueprintsInput struct { +type GetOperationsForResourceInput struct { _ struct{} `type:"structure"` - // A Boolean value indicating whether to include inactive results in your request. - IncludeInactive *bool `locationName:"includeInactive" type:"boolean"` - - // A token used for advancing to the next page of results from your get blueprints - // request. + // A token used for advancing to the next page of results from your get operations + // for resource request. PageToken *string `locationName:"pageToken" type:"string"` + + // The name of the resource for which you are requesting information. + // + // ResourceName is a required field + ResourceName *string `locationName:"resourceName" type:"string" required:"true"` } // String returns the string representation -func (s GetBlueprintsInput) String() string { +func (s GetOperationsForResourceInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetBlueprintsInput) GoString() string { +func (s GetOperationsForResourceInput) GoString() string { return s.String() } -// SetIncludeInactive sets the IncludeInactive field's value. -func (s *GetBlueprintsInput) SetIncludeInactive(v bool) *GetBlueprintsInput { - s.IncludeInactive = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetOperationsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetOperationsForResourceInput"} + if s.ResourceName == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } // SetPageToken sets the PageToken field's value. -func (s *GetBlueprintsInput) SetPageToken(v string) *GetBlueprintsInput { +func (s *GetOperationsForResourceInput) SetPageToken(v string) *GetOperationsForResourceInput { s.PageToken = &v return s } -type GetBlueprintsOutput struct { +// SetResourceName sets the ResourceName field's value. +func (s *GetOperationsForResourceInput) SetResourceName(v string) *GetOperationsForResourceInput { + s.ResourceName = &v + return s +} + +type GetOperationsForResourceOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs that contains information about the available - // blueprints. - Blueprints []*Blueprint `locationName:"blueprints" type:"list"` + // (Deprecated) Returns the number of pages of results that remain. + // + // In releases prior to June 12, 2017, this parameter returned null by the API. + // It is now deprecated, and the API returns the next page token parameter instead. + // + // Deprecated: NextPageCount has been deprecated + NextPageCount *string `locationName:"nextPageCount" deprecated:"true" type:"string"` - // A token used for advancing to the next page of results from your get blueprints - // request. + // An identifier that was returned from the previous call to this operation, + // which can be used to return the next set of items in the list. NextPageToken *string `locationName:"nextPageToken" type:"string"` + + // An array of key-value pairs containing information about the results of your + // get operations for resource request. + Operations []*Operation `locationName:"operations" type:"list"` } // String returns the string representation -func (s GetBlueprintsOutput) String() string { +func (s GetOperationsForResourceOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetBlueprintsOutput) GoString() string { +func (s GetOperationsForResourceOutput) GoString() string { return s.String() } -// SetBlueprints sets the Blueprints field's value. -func (s *GetBlueprintsOutput) SetBlueprints(v []*Blueprint) *GetBlueprintsOutput { - s.Blueprints = v +// SetNextPageCount sets the NextPageCount field's value. +func (s *GetOperationsForResourceOutput) SetNextPageCount(v string) *GetOperationsForResourceOutput { + s.NextPageCount = &v return s } // SetNextPageToken sets the NextPageToken field's value. -func (s *GetBlueprintsOutput) SetNextPageToken(v string) *GetBlueprintsOutput { +func (s *GetOperationsForResourceOutput) SetNextPageToken(v string) *GetOperationsForResourceOutput { s.NextPageToken = &v return s } -type GetBundlesInput struct { - _ struct{} `type:"structure"` +// SetOperations sets the Operations field's value. +func (s *GetOperationsForResourceOutput) SetOperations(v []*Operation) *GetOperationsForResourceOutput { + s.Operations = v + return s +} - // A Boolean value that indicates whether to include inactive bundle results - // in your request. - IncludeInactive *bool `locationName:"includeInactive" type:"boolean"` +type GetOperationsInput struct { + _ struct{} `type:"structure"` - // A token used for advancing to the next page of results from your get bundles + // A token used for advancing to the next page of results from your get operations // request. PageToken *string `locationName:"pageToken" type:"string"` } // String returns the string representation -func (s GetBundlesInput) String() string { +func (s GetOperationsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetBundlesInput) GoString() string { +func (s GetOperationsInput) GoString() string { return s.String() } -// SetIncludeInactive sets the IncludeInactive field's value. -func (s *GetBundlesInput) SetIncludeInactive(v bool) *GetBundlesInput { - s.IncludeInactive = &v - return s -} - // SetPageToken sets the PageToken field's value. -func (s *GetBundlesInput) SetPageToken(v string) *GetBundlesInput { +func (s *GetOperationsInput) SetPageToken(v string) *GetOperationsInput { s.PageToken = &v return s } -type GetBundlesOutput struct { +type GetOperationsOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs that contains information about the available - // bundles. - Bundles []*Bundle `locationName:"bundles" type:"list"` - - // A token used for advancing to the next page of results from your get active - // names request. + // A token used for advancing to the next page of results from your get operations + // request. NextPageToken *string `locationName:"nextPageToken" type:"string"` + + // An array of key-value pairs containing information about the results of your + // get operations request. + Operations []*Operation `locationName:"operations" type:"list"` } // String returns the string representation -func (s GetBundlesOutput) String() string { +func (s GetOperationsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetBundlesOutput) GoString() string { +func (s GetOperationsOutput) GoString() string { return s.String() } -// SetBundles sets the Bundles field's value. -func (s *GetBundlesOutput) SetBundles(v []*Bundle) *GetBundlesOutput { - s.Bundles = v +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetOperationsOutput) SetNextPageToken(v string) *GetOperationsOutput { + s.NextPageToken = &v return s } -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetBundlesOutput) SetNextPageToken(v string) *GetBundlesOutput { - s.NextPageToken = &v +// SetOperations sets the Operations field's value. +func (s *GetOperationsOutput) SetOperations(v []*Operation) *GetOperationsOutput { + s.Operations = v return s } -type GetDiskInput struct { +type GetRegionsInput struct { _ struct{} `type:"structure"` - // The name of the disk (e.g., my-disk). - // - // DiskName is a required field - DiskName *string `locationName:"diskName" type:"string" required:"true"` + // A Boolean value indicating whether to also include Availability Zones in + // your get regions request. Availability Zones are indicated with a letter: + // e.g., us-east-2a. + IncludeAvailabilityZones *bool `locationName:"includeAvailabilityZones" type:"boolean"` + + // >A Boolean value indicating whether to also include Availability Zones for + // databases in your get regions request. Availability Zones are indicated with + // a letter (e.g., us-east-2a). + IncludeRelationalDatabaseAvailabilityZones *bool `locationName:"includeRelationalDatabaseAvailabilityZones" type:"boolean"` } // String returns the string representation -func (s GetDiskInput) String() string { +func (s GetRegionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDiskInput) GoString() string { +func (s GetRegionsInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDiskInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDiskInput"} - if s.DiskName == nil { - invalidParams.Add(request.NewErrParamRequired("DiskName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetIncludeAvailabilityZones sets the IncludeAvailabilityZones field's value. +func (s *GetRegionsInput) SetIncludeAvailabilityZones(v bool) *GetRegionsInput { + s.IncludeAvailabilityZones = &v + return s } -// SetDiskName sets the DiskName field's value. -func (s *GetDiskInput) SetDiskName(v string) *GetDiskInput { - s.DiskName = &v +// SetIncludeRelationalDatabaseAvailabilityZones sets the IncludeRelationalDatabaseAvailabilityZones field's value. +func (s *GetRegionsInput) SetIncludeRelationalDatabaseAvailabilityZones(v bool) *GetRegionsInput { + s.IncludeRelationalDatabaseAvailabilityZones = &v return s } -type GetDiskOutput struct { +type GetRegionsOutput struct { _ struct{} `type:"structure"` - // An object containing information about the disk. - Disk *Disk `locationName:"disk" type:"structure"` + // An array of key-value pairs containing information about your get regions + // request. + Regions []*Region `locationName:"regions" type:"list"` } // String returns the string representation -func (s GetDiskOutput) String() string { +func (s GetRegionsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDiskOutput) GoString() string { +func (s GetRegionsOutput) GoString() string { return s.String() } -// SetDisk sets the Disk field's value. -func (s *GetDiskOutput) SetDisk(v *Disk) *GetDiskOutput { - s.Disk = v +// SetRegions sets the Regions field's value. +func (s *GetRegionsOutput) SetRegions(v []*Region) *GetRegionsOutput { + s.Regions = v return s } -type GetDiskSnapshotInput struct { +type GetRelationalDatabaseBlueprintsInput struct { _ struct{} `type:"structure"` - // The name of the disk snapshot (e.g., my-disk-snapshot). - // - // DiskSnapshotName is a required field - DiskSnapshotName *string `locationName:"diskSnapshotName" type:"string" required:"true"` + // A token used for advancing to a specific page of results for your get relational + // database blueprints request. + PageToken *string `locationName:"pageToken" type:"string"` } // String returns the string representation -func (s GetDiskSnapshotInput) String() string { +func (s GetRelationalDatabaseBlueprintsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDiskSnapshotInput) GoString() string { +func (s GetRelationalDatabaseBlueprintsInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetDiskSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDiskSnapshotInput"} - if s.DiskSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("DiskSnapshotName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDiskSnapshotName sets the DiskSnapshotName field's value. -func (s *GetDiskSnapshotInput) SetDiskSnapshotName(v string) *GetDiskSnapshotInput { - s.DiskSnapshotName = &v +// SetPageToken sets the PageToken field's value. +func (s *GetRelationalDatabaseBlueprintsInput) SetPageToken(v string) *GetRelationalDatabaseBlueprintsInput { + s.PageToken = &v return s } -type GetDiskSnapshotOutput struct { +type GetRelationalDatabaseBlueprintsOutput struct { _ struct{} `type:"structure"` - // An object containing information about the disk snapshot. - DiskSnapshot *DiskSnapshot `locationName:"diskSnapshot" type:"structure"` + // An object describing the result of your get relational database blueprints + // request. + Blueprints []*RelationalDatabaseBlueprint `locationName:"blueprints" type:"list"` + + // A token used for advancing to the next page of results of your get relational + // database blueprints request. + NextPageToken *string `locationName:"nextPageToken" type:"string"` } // String returns the string representation -func (s GetDiskSnapshotOutput) String() string { +func (s GetRelationalDatabaseBlueprintsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDiskSnapshotOutput) GoString() string { +func (s GetRelationalDatabaseBlueprintsOutput) GoString() string { return s.String() } -// SetDiskSnapshot sets the DiskSnapshot field's value. -func (s *GetDiskSnapshotOutput) SetDiskSnapshot(v *DiskSnapshot) *GetDiskSnapshotOutput { - s.DiskSnapshot = v +// SetBlueprints sets the Blueprints field's value. +func (s *GetRelationalDatabaseBlueprintsOutput) SetBlueprints(v []*RelationalDatabaseBlueprint) *GetRelationalDatabaseBlueprintsOutput { + s.Blueprints = v return s } -type GetDiskSnapshotsInput struct { +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetRelationalDatabaseBlueprintsOutput) SetNextPageToken(v string) *GetRelationalDatabaseBlueprintsOutput { + s.NextPageToken = &v + return s +} + +type GetRelationalDatabaseBundlesInput struct { _ struct{} `type:"structure"` - // A token used for advancing to the next page of results from your GetDiskSnapshots - // request. + // A token used for advancing to a specific page of results for your get relational + // database bundles request. PageToken *string `locationName:"pageToken" type:"string"` } // String returns the string representation -func (s GetDiskSnapshotsInput) String() string { +func (s GetRelationalDatabaseBundlesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDiskSnapshotsInput) GoString() string { +func (s GetRelationalDatabaseBundlesInput) GoString() string { return s.String() } // SetPageToken sets the PageToken field's value. -func (s *GetDiskSnapshotsInput) SetPageToken(v string) *GetDiskSnapshotsInput { +func (s *GetRelationalDatabaseBundlesInput) SetPageToken(v string) *GetRelationalDatabaseBundlesInput { s.PageToken = &v return s } -type GetDiskSnapshotsOutput struct { +type GetRelationalDatabaseBundlesOutput struct { _ struct{} `type:"structure"` - // An array of objects containing information about all block storage disk snapshots. - DiskSnapshots []*DiskSnapshot `locationName:"diskSnapshots" type:"list"` + // An object describing the result of your get relational database bundles request. + Bundles []*RelationalDatabaseBundle `locationName:"bundles" type:"list"` - // A token used for advancing to the next page of results from your GetDiskSnapshots - // request. + // A token used for advancing to the next page of results of your get relational + // database bundles request. NextPageToken *string `locationName:"nextPageToken" type:"string"` } // String returns the string representation -func (s GetDiskSnapshotsOutput) String() string { +func (s GetRelationalDatabaseBundlesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDiskSnapshotsOutput) GoString() string { +func (s GetRelationalDatabaseBundlesOutput) GoString() string { return s.String() } -// SetDiskSnapshots sets the DiskSnapshots field's value. -func (s *GetDiskSnapshotsOutput) SetDiskSnapshots(v []*DiskSnapshot) *GetDiskSnapshotsOutput { - s.DiskSnapshots = v +// SetBundles sets the Bundles field's value. +func (s *GetRelationalDatabaseBundlesOutput) SetBundles(v []*RelationalDatabaseBundle) *GetRelationalDatabaseBundlesOutput { + s.Bundles = v return s } // SetNextPageToken sets the NextPageToken field's value. -func (s *GetDiskSnapshotsOutput) SetNextPageToken(v string) *GetDiskSnapshotsOutput { +func (s *GetRelationalDatabaseBundlesOutput) SetNextPageToken(v string) *GetRelationalDatabaseBundlesOutput { s.NextPageToken = &v return s } -type GetDisksInput struct { +type GetRelationalDatabaseEventsInput struct { _ struct{} `type:"structure"` - // A token used for advancing to the next page of results from your GetDisks - // request. + // The number of minutes in the past from which to retrieve events. For example, + // to get all events from the past 2 hours, enter 120. + // + // Default: 60 + // + // The minimum is 1 and the maximum is 14 days (20160 minutes). + DurationInMinutes *int64 `locationName:"durationInMinutes" type:"integer"` + + // A token used for advancing to a specific page of results from for get relational + // database events request. PageToken *string `locationName:"pageToken" type:"string"` + + // The name of the database from which to get events. + // + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` } // String returns the string representation -func (s GetDisksInput) String() string { +func (s GetRelationalDatabaseEventsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDisksInput) GoString() string { +func (s GetRelationalDatabaseEventsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetRelationalDatabaseEventsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRelationalDatabaseEventsInput"} + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDurationInMinutes sets the DurationInMinutes field's value. +func (s *GetRelationalDatabaseEventsInput) SetDurationInMinutes(v int64) *GetRelationalDatabaseEventsInput { + s.DurationInMinutes = &v + return s +} + // SetPageToken sets the PageToken field's value. -func (s *GetDisksInput) SetPageToken(v string) *GetDisksInput { +func (s *GetRelationalDatabaseEventsInput) SetPageToken(v string) *GetRelationalDatabaseEventsInput { s.PageToken = &v return s } -type GetDisksOutput struct { - _ struct{} `type:"structure"` +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *GetRelationalDatabaseEventsInput) SetRelationalDatabaseName(v string) *GetRelationalDatabaseEventsInput { + s.RelationalDatabaseName = &v + return s +} - // An array of objects containing information about all block storage disks. - Disks []*Disk `locationName:"disks" type:"list"` +type GetRelationalDatabaseEventsOutput struct { + _ struct{} `type:"structure"` - // A token used for advancing to the next page of results from your GetDisks - // request. + // A token used for advancing to the next page of results from your get relational + // database events request. NextPageToken *string `locationName:"nextPageToken" type:"string"` + + // An object describing the result of your get relational database events request. + RelationalDatabaseEvents []*RelationalDatabaseEvent `locationName:"relationalDatabaseEvents" type:"list"` } // String returns the string representation -func (s GetDisksOutput) String() string { +func (s GetRelationalDatabaseEventsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDisksOutput) GoString() string { +func (s GetRelationalDatabaseEventsOutput) GoString() string { return s.String() } -// SetDisks sets the Disks field's value. -func (s *GetDisksOutput) SetDisks(v []*Disk) *GetDisksOutput { - s.Disks = v +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetRelationalDatabaseEventsOutput) SetNextPageToken(v string) *GetRelationalDatabaseEventsOutput { + s.NextPageToken = &v return s } -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetDisksOutput) SetNextPageToken(v string) *GetDisksOutput { - s.NextPageToken = &v +// SetRelationalDatabaseEvents sets the RelationalDatabaseEvents field's value. +func (s *GetRelationalDatabaseEventsOutput) SetRelationalDatabaseEvents(v []*RelationalDatabaseEvent) *GetRelationalDatabaseEventsOutput { + s.RelationalDatabaseEvents = v return s } -type GetDomainInput struct { +type GetRelationalDatabaseInput struct { _ struct{} `type:"structure"` - // The domain name for which your want to return information about. + // The name of the database that you are looking up. // - // DomainName is a required field - DomainName *string `locationName:"domainName" type:"string" required:"true"` + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` } // String returns the string representation -func (s GetDomainInput) String() string { +func (s GetRelationalDatabaseInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDomainInput) GoString() string { +func (s GetRelationalDatabaseInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetDomainInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetDomainInput"} - if s.DomainName == nil { - invalidParams.Add(request.NewErrParamRequired("DomainName")) +func (s *GetRelationalDatabaseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRelationalDatabaseInput"} + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) } if invalidParams.Len() > 0 { @@ -11130,121 +17810,194 @@ func (s *GetDomainInput) Validate() error { return nil } -// SetDomainName sets the DomainName field's value. -func (s *GetDomainInput) SetDomainName(v string) *GetDomainInput { - s.DomainName = &v +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *GetRelationalDatabaseInput) SetRelationalDatabaseName(v string) *GetRelationalDatabaseInput { + s.RelationalDatabaseName = &v return s } -type GetDomainOutput struct { +type GetRelationalDatabaseLogEventsInput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about your get domain - // request. - Domain *Domain `locationName:"domain" type:"structure"` + // The end of the time interval from which to get log events. + // + // Constraints: + // + // * Specified in Universal Coordinated Time (UTC). + // + // * Specified in the Unix time format. + // + // For example, if you wish to use an end time of October 1, 2018, at 8 PM UTC, + // then you input 1538424000 as the end time. + EndTime *time.Time `locationName:"endTime" type:"timestamp"` + + // The name of the log stream. + // + // Use the get relational database log streams operation to get a list of available + // log streams. + // + // LogStreamName is a required field + LogStreamName *string `locationName:"logStreamName" type:"string" required:"true"` + + // A token used for advancing to a specific page of results for your get relational + // database log events request. + PageToken *string `locationName:"pageToken" type:"string"` + + // The name of your database for which to get log events. + // + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` + + // Parameter to specify if the log should start from head or tail. If true is + // specified, the log event starts from the head of the log. If false is specified, + // the log event starts from the tail of the log. + // + // Default: false + StartFromHead *bool `locationName:"startFromHead" type:"boolean"` + + // The start of the time interval from which to get log events. + // + // Constraints: + // + // * Specified in Universal Coordinated Time (UTC). + // + // * Specified in the Unix time format. + // + // For example, if you wish to use a start time of October 1, 2018, at 8 PM + // UTC, then you input 1538424000 as the start time. + StartTime *time.Time `locationName:"startTime" type:"timestamp"` } // String returns the string representation -func (s GetDomainOutput) String() string { +func (s GetRelationalDatabaseLogEventsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDomainOutput) GoString() string { +func (s GetRelationalDatabaseLogEventsInput) GoString() string { return s.String() } -// SetDomain sets the Domain field's value. -func (s *GetDomainOutput) SetDomain(v *Domain) *GetDomainOutput { - s.Domain = v +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetRelationalDatabaseLogEventsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRelationalDatabaseLogEventsInput"} + if s.LogStreamName == nil { + invalidParams.Add(request.NewErrParamRequired("LogStreamName")) + } + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEndTime sets the EndTime field's value. +func (s *GetRelationalDatabaseLogEventsInput) SetEndTime(v time.Time) *GetRelationalDatabaseLogEventsInput { + s.EndTime = &v return s } -type GetDomainsInput struct { - _ struct{} `type:"structure"` +// SetLogStreamName sets the LogStreamName field's value. +func (s *GetRelationalDatabaseLogEventsInput) SetLogStreamName(v string) *GetRelationalDatabaseLogEventsInput { + s.LogStreamName = &v + return s +} - // A token used for advancing to the next page of results from your get domains - // request. - PageToken *string `locationName:"pageToken" type:"string"` +// SetPageToken sets the PageToken field's value. +func (s *GetRelationalDatabaseLogEventsInput) SetPageToken(v string) *GetRelationalDatabaseLogEventsInput { + s.PageToken = &v + return s } -// String returns the string representation -func (s GetDomainsInput) String() string { - return awsutil.Prettify(s) +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *GetRelationalDatabaseLogEventsInput) SetRelationalDatabaseName(v string) *GetRelationalDatabaseLogEventsInput { + s.RelationalDatabaseName = &v + return s } -// GoString returns the string representation -func (s GetDomainsInput) GoString() string { - return s.String() +// SetStartFromHead sets the StartFromHead field's value. +func (s *GetRelationalDatabaseLogEventsInput) SetStartFromHead(v bool) *GetRelationalDatabaseLogEventsInput { + s.StartFromHead = &v + return s } -// SetPageToken sets the PageToken field's value. -func (s *GetDomainsInput) SetPageToken(v string) *GetDomainsInput { - s.PageToken = &v +// SetStartTime sets the StartTime field's value. +func (s *GetRelationalDatabaseLogEventsInput) SetStartTime(v time.Time) *GetRelationalDatabaseLogEventsInput { + s.StartTime = &v return s } -type GetDomainsOutput struct { +type GetRelationalDatabaseLogEventsOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about each of the domain - // entries in the user's account. - Domains []*Domain `locationName:"domains" type:"list"` + // A token used for advancing to the previous page of results from your get + // relational database log events request. + NextBackwardToken *string `locationName:"nextBackwardToken" type:"string"` - // A token used for advancing to the next page of results from your get active - // names request. - NextPageToken *string `locationName:"nextPageToken" type:"string"` + // A token used for advancing to the next page of results from your get relational + // database log events request. + NextForwardToken *string `locationName:"nextForwardToken" type:"string"` + + // An object describing the result of your get relational database log events + // request. + ResourceLogEvents []*LogEvent `locationName:"resourceLogEvents" type:"list"` } // String returns the string representation -func (s GetDomainsOutput) String() string { +func (s GetRelationalDatabaseLogEventsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetDomainsOutput) GoString() string { +func (s GetRelationalDatabaseLogEventsOutput) GoString() string { return s.String() } -// SetDomains sets the Domains field's value. -func (s *GetDomainsOutput) SetDomains(v []*Domain) *GetDomainsOutput { - s.Domains = v +// SetNextBackwardToken sets the NextBackwardToken field's value. +func (s *GetRelationalDatabaseLogEventsOutput) SetNextBackwardToken(v string) *GetRelationalDatabaseLogEventsOutput { + s.NextBackwardToken = &v return s } -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetDomainsOutput) SetNextPageToken(v string) *GetDomainsOutput { - s.NextPageToken = &v +// SetNextForwardToken sets the NextForwardToken field's value. +func (s *GetRelationalDatabaseLogEventsOutput) SetNextForwardToken(v string) *GetRelationalDatabaseLogEventsOutput { + s.NextForwardToken = &v return s } -type GetInstanceAccessDetailsInput struct { +// SetResourceLogEvents sets the ResourceLogEvents field's value. +func (s *GetRelationalDatabaseLogEventsOutput) SetResourceLogEvents(v []*LogEvent) *GetRelationalDatabaseLogEventsOutput { + s.ResourceLogEvents = v + return s +} + +type GetRelationalDatabaseLogStreamsInput struct { _ struct{} `type:"structure"` - // The name of the instance to access. + // The name of your database for which to get log streams. // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` - - // The protocol to use to connect to your instance. Defaults to ssh. - Protocol *string `locationName:"protocol" type:"string" enum:"InstanceAccessProtocol"` + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` } // String returns the string representation -func (s GetInstanceAccessDetailsInput) String() string { +func (s GetRelationalDatabaseLogStreamsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetInstanceAccessDetailsInput) GoString() string { +func (s GetRelationalDatabaseLogStreamsInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetInstanceAccessDetailsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInstanceAccessDetailsInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) +func (s *GetRelationalDatabaseLogStreamsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRelationalDatabaseLogStreamsInput"} + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) } if invalidParams.Len() > 0 { @@ -11253,66 +18006,70 @@ func (s *GetInstanceAccessDetailsInput) Validate() error { return nil } -// SetInstanceName sets the InstanceName field's value. -func (s *GetInstanceAccessDetailsInput) SetInstanceName(v string) *GetInstanceAccessDetailsInput { - s.InstanceName = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *GetInstanceAccessDetailsInput) SetProtocol(v string) *GetInstanceAccessDetailsInput { - s.Protocol = &v +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *GetRelationalDatabaseLogStreamsInput) SetRelationalDatabaseName(v string) *GetRelationalDatabaseLogStreamsInput { + s.RelationalDatabaseName = &v return s } -type GetInstanceAccessDetailsOutput struct { +type GetRelationalDatabaseLogStreamsOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about a get instance access + // An object describing the result of your get relational database log streams // request. - AccessDetails *InstanceAccessDetails `locationName:"accessDetails" type:"structure"` + LogStreams []*string `locationName:"logStreams" type:"list"` } // String returns the string representation -func (s GetInstanceAccessDetailsOutput) String() string { +func (s GetRelationalDatabaseLogStreamsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetInstanceAccessDetailsOutput) GoString() string { +func (s GetRelationalDatabaseLogStreamsOutput) GoString() string { return s.String() } -// SetAccessDetails sets the AccessDetails field's value. -func (s *GetInstanceAccessDetailsOutput) SetAccessDetails(v *InstanceAccessDetails) *GetInstanceAccessDetailsOutput { - s.AccessDetails = v +// SetLogStreams sets the LogStreams field's value. +func (s *GetRelationalDatabaseLogStreamsOutput) SetLogStreams(v []*string) *GetRelationalDatabaseLogStreamsOutput { + s.LogStreams = v return s } -type GetInstanceInput struct { +type GetRelationalDatabaseMasterUserPasswordInput struct { _ struct{} `type:"structure"` - // The name of the instance. + // The password version to return. // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` + // Specifying CURRENT or PREVIOUS returns the current or previous passwords + // respectively. Specifying PENDING returns the newest version of the password + // that will rotate to CURRENT. After the PENDING password rotates to CURRENT, + // the PENDING password is no longer available. + // + // Default: CURRENT + PasswordVersion *string `locationName:"passwordVersion" type:"string" enum:"RelationalDatabasePasswordVersion"` + + // The name of your database for which to get the master user password. + // + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` } // String returns the string representation -func (s GetInstanceInput) String() string { +func (s GetRelationalDatabaseMasterUserPasswordInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetInstanceInput) GoString() string { +func (s GetRelationalDatabaseMasterUserPasswordInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInstanceInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) +func (s *GetRelationalDatabaseMasterUserPasswordInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRelationalDatabaseMasterUserPasswordInput"} + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) } if invalidParams.Len() > 0 { @@ -11321,70 +18078,124 @@ func (s *GetInstanceInput) Validate() error { return nil } -// SetInstanceName sets the InstanceName field's value. -func (s *GetInstanceInput) SetInstanceName(v string) *GetInstanceInput { - s.InstanceName = &v +// SetPasswordVersion sets the PasswordVersion field's value. +func (s *GetRelationalDatabaseMasterUserPasswordInput) SetPasswordVersion(v string) *GetRelationalDatabaseMasterUserPasswordInput { + s.PasswordVersion = &v return s } -type GetInstanceMetricDataInput struct { +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *GetRelationalDatabaseMasterUserPasswordInput) SetRelationalDatabaseName(v string) *GetRelationalDatabaseMasterUserPasswordInput { + s.RelationalDatabaseName = &v + return s +} + +type GetRelationalDatabaseMasterUserPasswordOutput struct { _ struct{} `type:"structure"` - // The end time of the time period. + // The timestamp when the specified version of the master user password was + // created. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` + + // The master user password for the password version specified. + MasterUserPassword *string `locationName:"masterUserPassword" type:"string" sensitive:"true"` +} + +// String returns the string representation +func (s GetRelationalDatabaseMasterUserPasswordOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRelationalDatabaseMasterUserPasswordOutput) GoString() string { + return s.String() +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *GetRelationalDatabaseMasterUserPasswordOutput) SetCreatedAt(v time.Time) *GetRelationalDatabaseMasterUserPasswordOutput { + s.CreatedAt = &v + return s +} + +// SetMasterUserPassword sets the MasterUserPassword field's value. +func (s *GetRelationalDatabaseMasterUserPasswordOutput) SetMasterUserPassword(v string) *GetRelationalDatabaseMasterUserPasswordOutput { + s.MasterUserPassword = &v + return s +} + +type GetRelationalDatabaseMetricDataInput struct { + _ struct{} `type:"structure"` + + // The end of the time interval from which to get metric data. + // + // Constraints: + // + // * Specified in Universal Coordinated Time (UTC). + // + // * Specified in the Unix time format. + // + // For example, if you wish to use an end time of October 1, 2018, at 8 PM UTC, + // then you input 1538424000 as the end time. // // EndTime is a required field EndTime *time.Time `locationName:"endTime" type:"timestamp" required:"true"` - // The name of the instance for which you want to get metrics data. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` - - // The metric name to get data about. + // The name of the metric data to return. // // MetricName is a required field - MetricName *string `locationName:"metricName" type:"string" required:"true" enum:"InstanceMetricName"` + MetricName *string `locationName:"metricName" type:"string" required:"true" enum:"RelationalDatabaseMetricName"` - // The time period for which you are requesting data. + // The granularity, in seconds, of the returned data points. // // Period is a required field Period *int64 `locationName:"period" min:"60" type:"integer" required:"true"` - // The start time of the time period. + // The name of your database from which to get metric data. + // + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` + + // The start of the time interval from which to get metric data. + // + // Constraints: + // + // * Specified in Universal Coordinated Time (UTC). + // + // * Specified in the Unix time format. + // + // For example, if you wish to use a start time of October 1, 2018, at 8 PM + // UTC, then you input 1538424000 as the start time. // // StartTime is a required field StartTime *time.Time `locationName:"startTime" type:"timestamp" required:"true"` - // The instance statistics. + // The array of statistics for your metric data request. // // Statistics is a required field Statistics []*string `locationName:"statistics" type:"list" required:"true"` - // The unit. The list of valid values is below. + // The unit for the metric data request. // // Unit is a required field Unit *string `locationName:"unit" type:"string" required:"true" enum:"MetricUnit"` } // String returns the string representation -func (s GetInstanceMetricDataInput) String() string { +func (s GetRelationalDatabaseMetricDataInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetInstanceMetricDataInput) GoString() string { +func (s GetRelationalDatabaseMetricDataInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetInstanceMetricDataInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInstanceMetricDataInput"} +func (s *GetRelationalDatabaseMetricDataInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRelationalDatabaseMetricDataInput"} if s.EndTime == nil { invalidParams.Add(request.NewErrParamRequired("EndTime")) } - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } if s.MetricName == nil { invalidParams.Add(request.NewErrParamRequired("MetricName")) } @@ -11394,6 +18205,9 @@ func (s *GetInstanceMetricDataInput) Validate() error { if s.Period != nil && *s.Period < 60 { invalidParams.Add(request.NewErrParamMinValue("Period", 60)) } + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) + } if s.StartTime == nil { invalidParams.Add(request.NewErrParamRequired("StartTime")) } @@ -11411,127 +18225,131 @@ func (s *GetInstanceMetricDataInput) Validate() error { } // SetEndTime sets the EndTime field's value. -func (s *GetInstanceMetricDataInput) SetEndTime(v time.Time) *GetInstanceMetricDataInput { +func (s *GetRelationalDatabaseMetricDataInput) SetEndTime(v time.Time) *GetRelationalDatabaseMetricDataInput { s.EndTime = &v return s } -// SetInstanceName sets the InstanceName field's value. -func (s *GetInstanceMetricDataInput) SetInstanceName(v string) *GetInstanceMetricDataInput { - s.InstanceName = &v - return s -} - // SetMetricName sets the MetricName field's value. -func (s *GetInstanceMetricDataInput) SetMetricName(v string) *GetInstanceMetricDataInput { +func (s *GetRelationalDatabaseMetricDataInput) SetMetricName(v string) *GetRelationalDatabaseMetricDataInput { s.MetricName = &v return s } // SetPeriod sets the Period field's value. -func (s *GetInstanceMetricDataInput) SetPeriod(v int64) *GetInstanceMetricDataInput { +func (s *GetRelationalDatabaseMetricDataInput) SetPeriod(v int64) *GetRelationalDatabaseMetricDataInput { s.Period = &v return s } +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *GetRelationalDatabaseMetricDataInput) SetRelationalDatabaseName(v string) *GetRelationalDatabaseMetricDataInput { + s.RelationalDatabaseName = &v + return s +} + // SetStartTime sets the StartTime field's value. -func (s *GetInstanceMetricDataInput) SetStartTime(v time.Time) *GetInstanceMetricDataInput { +func (s *GetRelationalDatabaseMetricDataInput) SetStartTime(v time.Time) *GetRelationalDatabaseMetricDataInput { s.StartTime = &v return s } // SetStatistics sets the Statistics field's value. -func (s *GetInstanceMetricDataInput) SetStatistics(v []*string) *GetInstanceMetricDataInput { +func (s *GetRelationalDatabaseMetricDataInput) SetStatistics(v []*string) *GetRelationalDatabaseMetricDataInput { s.Statistics = v return s } // SetUnit sets the Unit field's value. -func (s *GetInstanceMetricDataInput) SetUnit(v string) *GetInstanceMetricDataInput { +func (s *GetRelationalDatabaseMetricDataInput) SetUnit(v string) *GetRelationalDatabaseMetricDataInput { s.Unit = &v return s } -type GetInstanceMetricDataOutput struct { +type GetRelationalDatabaseMetricDataOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the results of your - // get instance metric data request. + // An object describing the result of your get relational database metric data + // request. MetricData []*MetricDatapoint `locationName:"metricData" type:"list"` - // The metric name to return data for. - MetricName *string `locationName:"metricName" type:"string" enum:"InstanceMetricName"` + // The name of the metric. + MetricName *string `locationName:"metricName" type:"string" enum:"RelationalDatabaseMetricName"` } // String returns the string representation -func (s GetInstanceMetricDataOutput) String() string { +func (s GetRelationalDatabaseMetricDataOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetInstanceMetricDataOutput) GoString() string { +func (s GetRelationalDatabaseMetricDataOutput) GoString() string { return s.String() } // SetMetricData sets the MetricData field's value. -func (s *GetInstanceMetricDataOutput) SetMetricData(v []*MetricDatapoint) *GetInstanceMetricDataOutput { +func (s *GetRelationalDatabaseMetricDataOutput) SetMetricData(v []*MetricDatapoint) *GetRelationalDatabaseMetricDataOutput { s.MetricData = v return s } // SetMetricName sets the MetricName field's value. -func (s *GetInstanceMetricDataOutput) SetMetricName(v string) *GetInstanceMetricDataOutput { +func (s *GetRelationalDatabaseMetricDataOutput) SetMetricName(v string) *GetRelationalDatabaseMetricDataOutput { s.MetricName = &v return s } -type GetInstanceOutput struct { +type GetRelationalDatabaseOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the specified instance. - Instance *Instance `locationName:"instance" type:"structure"` + // An object describing the specified database. + RelationalDatabase *RelationalDatabase `locationName:"relationalDatabase" type:"structure"` } // String returns the string representation -func (s GetInstanceOutput) String() string { +func (s GetRelationalDatabaseOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetInstanceOutput) GoString() string { +func (s GetRelationalDatabaseOutput) GoString() string { return s.String() } -// SetInstance sets the Instance field's value. -func (s *GetInstanceOutput) SetInstance(v *Instance) *GetInstanceOutput { - s.Instance = v +// SetRelationalDatabase sets the RelationalDatabase field's value. +func (s *GetRelationalDatabaseOutput) SetRelationalDatabase(v *RelationalDatabase) *GetRelationalDatabaseOutput { + s.RelationalDatabase = v return s } -type GetInstancePortStatesInput struct { +type GetRelationalDatabaseParametersInput struct { _ struct{} `type:"structure"` - // The name of the instance. + // A token used for advancing to a specific page of results for your get relational + // database parameters request. + PageToken *string `locationName:"pageToken" type:"string"` + + // The name of your database for which to get parameters. // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` } // String returns the string representation -func (s GetInstancePortStatesInput) String() string { +func (s GetRelationalDatabaseParametersInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetInstancePortStatesInput) GoString() string { +func (s GetRelationalDatabaseParametersInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetInstancePortStatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInstancePortStatesInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) +func (s *GetRelationalDatabaseParametersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRelationalDatabaseParametersInput"} + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) } if invalidParams.Len() > 0 { @@ -11540,59 +18358,76 @@ func (s *GetInstancePortStatesInput) Validate() error { return nil } -// SetInstanceName sets the InstanceName field's value. -func (s *GetInstancePortStatesInput) SetInstanceName(v string) *GetInstancePortStatesInput { - s.InstanceName = &v +// SetPageToken sets the PageToken field's value. +func (s *GetRelationalDatabaseParametersInput) SetPageToken(v string) *GetRelationalDatabaseParametersInput { + s.PageToken = &v return s } -type GetInstancePortStatesOutput struct { +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *GetRelationalDatabaseParametersInput) SetRelationalDatabaseName(v string) *GetRelationalDatabaseParametersInput { + s.RelationalDatabaseName = &v + return s +} + +type GetRelationalDatabaseParametersOutput struct { _ struct{} `type:"structure"` - // Information about the port states resulting from your request. - PortStates []*InstancePortState `locationName:"portStates" type:"list"` + // A token used for advancing to the next page of results from your get static + // IPs request. + NextPageToken *string `locationName:"nextPageToken" type:"string"` + + // An object describing the result of your get relational database parameters + // request. + Parameters []*RelationalDatabaseParameter `locationName:"parameters" type:"list"` } // String returns the string representation -func (s GetInstancePortStatesOutput) String() string { +func (s GetRelationalDatabaseParametersOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetInstancePortStatesOutput) GoString() string { +func (s GetRelationalDatabaseParametersOutput) GoString() string { return s.String() } -// SetPortStates sets the PortStates field's value. -func (s *GetInstancePortStatesOutput) SetPortStates(v []*InstancePortState) *GetInstancePortStatesOutput { - s.PortStates = v +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetRelationalDatabaseParametersOutput) SetNextPageToken(v string) *GetRelationalDatabaseParametersOutput { + s.NextPageToken = &v return s } -type GetInstanceSnapshotInput struct { +// SetParameters sets the Parameters field's value. +func (s *GetRelationalDatabaseParametersOutput) SetParameters(v []*RelationalDatabaseParameter) *GetRelationalDatabaseParametersOutput { + s.Parameters = v + return s +} + +type GetRelationalDatabaseSnapshotInput struct { _ struct{} `type:"structure"` - // The name of the snapshot for which you are requesting information. + // The name of the database snapshot for which to get information. // - // InstanceSnapshotName is a required field - InstanceSnapshotName *string `locationName:"instanceSnapshotName" type:"string" required:"true"` + // RelationalDatabaseSnapshotName is a required field + RelationalDatabaseSnapshotName *string `locationName:"relationalDatabaseSnapshotName" type:"string" required:"true"` } // String returns the string representation -func (s GetInstanceSnapshotInput) String() string { +func (s GetRelationalDatabaseSnapshotInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetInstanceSnapshotInput) GoString() string { +func (s GetRelationalDatabaseSnapshotInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetInstanceSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInstanceSnapshotInput"} - if s.InstanceSnapshotName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceSnapshotName")) +func (s *GetRelationalDatabaseSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRelationalDatabaseSnapshotInput"} + if s.RelationalDatabaseSnapshotName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseSnapshotName")) } if invalidParams.Len() > 0 { @@ -11601,236 +18436,174 @@ func (s *GetInstanceSnapshotInput) Validate() error { return nil } -// SetInstanceSnapshotName sets the InstanceSnapshotName field's value. -func (s *GetInstanceSnapshotInput) SetInstanceSnapshotName(v string) *GetInstanceSnapshotInput { - s.InstanceSnapshotName = &v +// SetRelationalDatabaseSnapshotName sets the RelationalDatabaseSnapshotName field's value. +func (s *GetRelationalDatabaseSnapshotInput) SetRelationalDatabaseSnapshotName(v string) *GetRelationalDatabaseSnapshotInput { + s.RelationalDatabaseSnapshotName = &v return s } -type GetInstanceSnapshotOutput struct { +type GetRelationalDatabaseSnapshotOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the results of your - // get instance snapshot request. - InstanceSnapshot *InstanceSnapshot `locationName:"instanceSnapshot" type:"structure"` + // An object describing the specified database snapshot. + RelationalDatabaseSnapshot *RelationalDatabaseSnapshot `locationName:"relationalDatabaseSnapshot" type:"structure"` } // String returns the string representation -func (s GetInstanceSnapshotOutput) String() string { +func (s GetRelationalDatabaseSnapshotOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetInstanceSnapshotOutput) GoString() string { +func (s GetRelationalDatabaseSnapshotOutput) GoString() string { return s.String() } -// SetInstanceSnapshot sets the InstanceSnapshot field's value. -func (s *GetInstanceSnapshotOutput) SetInstanceSnapshot(v *InstanceSnapshot) *GetInstanceSnapshotOutput { - s.InstanceSnapshot = v +// SetRelationalDatabaseSnapshot sets the RelationalDatabaseSnapshot field's value. +func (s *GetRelationalDatabaseSnapshotOutput) SetRelationalDatabaseSnapshot(v *RelationalDatabaseSnapshot) *GetRelationalDatabaseSnapshotOutput { + s.RelationalDatabaseSnapshot = v return s } -type GetInstanceSnapshotsInput struct { +type GetRelationalDatabaseSnapshotsInput struct { _ struct{} `type:"structure"` - // A token used for advancing to the next page of results from your get instance - // snapshots request. + // A token used for advancing to a specific page of results for your get relational + // database snapshots request. PageToken *string `locationName:"pageToken" type:"string"` } // String returns the string representation -func (s GetInstanceSnapshotsInput) String() string { +func (s GetRelationalDatabaseSnapshotsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetInstanceSnapshotsInput) GoString() string { +func (s GetRelationalDatabaseSnapshotsInput) GoString() string { return s.String() } // SetPageToken sets the PageToken field's value. -func (s *GetInstanceSnapshotsInput) SetPageToken(v string) *GetInstanceSnapshotsInput { +func (s *GetRelationalDatabaseSnapshotsInput) SetPageToken(v string) *GetRelationalDatabaseSnapshotsInput { s.PageToken = &v return s } -type GetInstanceSnapshotsOutput struct { +type GetRelationalDatabaseSnapshotsOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the results of your - // get instance snapshots request. - InstanceSnapshots []*InstanceSnapshot `locationName:"instanceSnapshots" type:"list"` - - // A token used for advancing to the next page of results from your get instance - // snapshots request. + // A token used for advancing to the next page of results from your get relational + // database snapshots request. NextPageToken *string `locationName:"nextPageToken" type:"string"` + + // An object describing the result of your get relational database snapshots + // request. + RelationalDatabaseSnapshots []*RelationalDatabaseSnapshot `locationName:"relationalDatabaseSnapshots" type:"list"` } // String returns the string representation -func (s GetInstanceSnapshotsOutput) String() string { +func (s GetRelationalDatabaseSnapshotsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetInstanceSnapshotsOutput) GoString() string { +func (s GetRelationalDatabaseSnapshotsOutput) GoString() string { return s.String() } -// SetInstanceSnapshots sets the InstanceSnapshots field's value. -func (s *GetInstanceSnapshotsOutput) SetInstanceSnapshots(v []*InstanceSnapshot) *GetInstanceSnapshotsOutput { - s.InstanceSnapshots = v - return s -} - // SetNextPageToken sets the NextPageToken field's value. -func (s *GetInstanceSnapshotsOutput) SetNextPageToken(v string) *GetInstanceSnapshotsOutput { +func (s *GetRelationalDatabaseSnapshotsOutput) SetNextPageToken(v string) *GetRelationalDatabaseSnapshotsOutput { s.NextPageToken = &v return s } -type GetInstanceStateInput struct { - _ struct{} `type:"structure"` - - // The name of the instance to get state information about. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` -} - -// String returns the string representation -func (s GetInstanceStateInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInstanceStateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetInstanceStateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetInstanceStateInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceName sets the InstanceName field's value. -func (s *GetInstanceStateInput) SetInstanceName(v string) *GetInstanceStateInput { - s.InstanceName = &v - return s -} - -type GetInstanceStateOutput struct { - _ struct{} `type:"structure"` - - // The state of the instance. - State *InstanceState `locationName:"state" type:"structure"` -} - -// String returns the string representation -func (s GetInstanceStateOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetInstanceStateOutput) GoString() string { - return s.String() -} - -// SetState sets the State field's value. -func (s *GetInstanceStateOutput) SetState(v *InstanceState) *GetInstanceStateOutput { - s.State = v +// SetRelationalDatabaseSnapshots sets the RelationalDatabaseSnapshots field's value. +func (s *GetRelationalDatabaseSnapshotsOutput) SetRelationalDatabaseSnapshots(v []*RelationalDatabaseSnapshot) *GetRelationalDatabaseSnapshotsOutput { + s.RelationalDatabaseSnapshots = v return s } -type GetInstancesInput struct { +type GetRelationalDatabasesInput struct { _ struct{} `type:"structure"` - // A token used for advancing to the next page of results from your get instances - // request. + // A token used for advancing to a specific page of results for your get relational + // database request. PageToken *string `locationName:"pageToken" type:"string"` } // String returns the string representation -func (s GetInstancesInput) String() string { +func (s GetRelationalDatabasesInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetInstancesInput) GoString() string { +func (s GetRelationalDatabasesInput) GoString() string { return s.String() } // SetPageToken sets the PageToken field's value. -func (s *GetInstancesInput) SetPageToken(v string) *GetInstancesInput { +func (s *GetRelationalDatabasesInput) SetPageToken(v string) *GetRelationalDatabasesInput { s.PageToken = &v return s } -type GetInstancesOutput struct { +type GetRelationalDatabasesOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about your instances. - Instances []*Instance `locationName:"instances" type:"list"` - - // A token used for advancing to the next page of results from your get instances - // request. + // A token used for advancing to the next page of results from your get relational + // databases request. NextPageToken *string `locationName:"nextPageToken" type:"string"` + + // An object describing the result of your get relational databases request. + RelationalDatabases []*RelationalDatabase `locationName:"relationalDatabases" type:"list"` } // String returns the string representation -func (s GetInstancesOutput) String() string { +func (s GetRelationalDatabasesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetInstancesOutput) GoString() string { +func (s GetRelationalDatabasesOutput) GoString() string { return s.String() } -// SetInstances sets the Instances field's value. -func (s *GetInstancesOutput) SetInstances(v []*Instance) *GetInstancesOutput { - s.Instances = v +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetRelationalDatabasesOutput) SetNextPageToken(v string) *GetRelationalDatabasesOutput { + s.NextPageToken = &v return s } -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetInstancesOutput) SetNextPageToken(v string) *GetInstancesOutput { - s.NextPageToken = &v +// SetRelationalDatabases sets the RelationalDatabases field's value. +func (s *GetRelationalDatabasesOutput) SetRelationalDatabases(v []*RelationalDatabase) *GetRelationalDatabasesOutput { + s.RelationalDatabases = v return s } -type GetKeyPairInput struct { +type GetStaticIpInput struct { _ struct{} `type:"structure"` - // The name of the key pair for which you are requesting information. + // The name of the static IP in Lightsail. // - // KeyPairName is a required field - KeyPairName *string `locationName:"keyPairName" type:"string" required:"true"` + // StaticIpName is a required field + StaticIpName *string `locationName:"staticIpName" type:"string" required:"true"` } // String returns the string representation -func (s GetKeyPairInput) String() string { +func (s GetStaticIpInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetKeyPairInput) GoString() string { +func (s GetStaticIpInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetKeyPairInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetKeyPairInput"} - if s.KeyPairName == nil { - invalidParams.Add(request.NewErrParamRequired("KeyPairName")) +func (s *GetStaticIpInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetStaticIpInput"} + if s.StaticIpName == nil { + invalidParams.Add(request.NewErrParamRequired("StaticIpName")) } if invalidParams.Len() > 0 { @@ -11839,116 +18612,126 @@ func (s *GetKeyPairInput) Validate() error { return nil } -// SetKeyPairName sets the KeyPairName field's value. -func (s *GetKeyPairInput) SetKeyPairName(v string) *GetKeyPairInput { - s.KeyPairName = &v +// SetStaticIpName sets the StaticIpName field's value. +func (s *GetStaticIpInput) SetStaticIpName(v string) *GetStaticIpInput { + s.StaticIpName = &v return s } -type GetKeyPairOutput struct { +type GetStaticIpOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the key pair. - KeyPair *KeyPair `locationName:"keyPair" type:"structure"` + // An array of key-value pairs containing information about the requested static + // IP. + StaticIp *StaticIp `locationName:"staticIp" type:"structure"` } // String returns the string representation -func (s GetKeyPairOutput) String() string { +func (s GetStaticIpOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetKeyPairOutput) GoString() string { +func (s GetStaticIpOutput) GoString() string { return s.String() } -// SetKeyPair sets the KeyPair field's value. -func (s *GetKeyPairOutput) SetKeyPair(v *KeyPair) *GetKeyPairOutput { - s.KeyPair = v +// SetStaticIp sets the StaticIp field's value. +func (s *GetStaticIpOutput) SetStaticIp(v *StaticIp) *GetStaticIpOutput { + s.StaticIp = v return s } -type GetKeyPairsInput struct { +type GetStaticIpsInput struct { _ struct{} `type:"structure"` - // A token used for advancing to the next page of results from your get key - // pairs request. + // A token used for advancing to the next page of results from your get static + // IPs request. PageToken *string `locationName:"pageToken" type:"string"` } // String returns the string representation -func (s GetKeyPairsInput) String() string { +func (s GetStaticIpsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetKeyPairsInput) GoString() string { +func (s GetStaticIpsInput) GoString() string { return s.String() } // SetPageToken sets the PageToken field's value. -func (s *GetKeyPairsInput) SetPageToken(v string) *GetKeyPairsInput { +func (s *GetStaticIpsInput) SetPageToken(v string) *GetStaticIpsInput { s.PageToken = &v return s } -type GetKeyPairsOutput struct { +type GetStaticIpsOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the key pairs. - KeyPairs []*KeyPair `locationName:"keyPairs" type:"list"` - - // A token used for advancing to the next page of results from your get key - // pairs request. + // A token used for advancing to the next page of results from your get static + // IPs request. NextPageToken *string `locationName:"nextPageToken" type:"string"` + + // An array of key-value pairs containing information about your get static + // IPs request. + StaticIps []*StaticIp `locationName:"staticIps" type:"list"` } // String returns the string representation -func (s GetKeyPairsOutput) String() string { +func (s GetStaticIpsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetKeyPairsOutput) GoString() string { +func (s GetStaticIpsOutput) GoString() string { return s.String() } -// SetKeyPairs sets the KeyPairs field's value. -func (s *GetKeyPairsOutput) SetKeyPairs(v []*KeyPair) *GetKeyPairsOutput { - s.KeyPairs = v +// SetNextPageToken sets the NextPageToken field's value. +func (s *GetStaticIpsOutput) SetNextPageToken(v string) *GetStaticIpsOutput { + s.NextPageToken = &v return s } -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetKeyPairsOutput) SetNextPageToken(v string) *GetKeyPairsOutput { - s.NextPageToken = &v +// SetStaticIps sets the StaticIps field's value. +func (s *GetStaticIpsOutput) SetStaticIps(v []*StaticIp) *GetStaticIpsOutput { + s.StaticIps = v return s } -type GetLoadBalancerInput struct { +type ImportKeyPairInput struct { _ struct{} `type:"structure"` - // The name of the load balancer. + // The name of the key pair for which you want to import the public key. // - // LoadBalancerName is a required field - LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` + // KeyPairName is a required field + KeyPairName *string `locationName:"keyPairName" type:"string" required:"true"` + + // A base64-encoded public key of the ssh-rsa type. + // + // PublicKeyBase64 is a required field + PublicKeyBase64 *string `locationName:"publicKeyBase64" type:"string" required:"true"` } // String returns the string representation -func (s GetLoadBalancerInput) String() string { +func (s ImportKeyPairInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetLoadBalancerInput) GoString() string { +func (s ImportKeyPairInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetLoadBalancerInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) +func (s *ImportKeyPairInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ImportKeyPairInput"} + if s.KeyPairName == nil { + invalidParams.Add(request.NewErrParamRequired("KeyPairName")) + } + if s.PublicKeyBase64 == nil { + invalidParams.Add(request.NewErrParamRequired("PublicKeyBase64")) } if invalidParams.Len() > 0 { @@ -11957,395 +18740,415 @@ func (s *GetLoadBalancerInput) Validate() error { return nil } -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *GetLoadBalancerInput) SetLoadBalancerName(v string) *GetLoadBalancerInput { - s.LoadBalancerName = &v +// SetKeyPairName sets the KeyPairName field's value. +func (s *ImportKeyPairInput) SetKeyPairName(v string) *ImportKeyPairInput { + s.KeyPairName = &v return s } -type GetLoadBalancerMetricDataInput struct { +// SetPublicKeyBase64 sets the PublicKeyBase64 field's value. +func (s *ImportKeyPairInput) SetPublicKeyBase64(v string) *ImportKeyPairInput { + s.PublicKeyBase64 = &v + return s +} + +type ImportKeyPairOutput struct { _ struct{} `type:"structure"` - // The end time of the period. - // - // EndTime is a required field - EndTime *time.Time `locationName:"endTime" type:"timestamp" required:"true"` + // An array of key-value pairs containing information about the request operation. + Operation *Operation `locationName:"operation" type:"structure"` +} - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` +// String returns the string representation +func (s ImportKeyPairOutput) String() string { + return awsutil.Prettify(s) +} - // The metric about which you want to return information. Valid values are listed - // below, along with the most useful statistics to include in your request. - // - // * ClientTLSNegotiationErrorCount - The number of TLS connections initiated - // by the client that did not establish a session with the load balancer. - // Possible causes include a mismatch of ciphers or protocols. - // - // Statistics: The most useful statistic is Sum. - // - // * HealthyHostCount - The number of target instances that are considered - // healthy. - // - // Statistics: The most useful statistic are Average, Minimum, and Maximum. - // - // * UnhealthyHostCount - The number of target instances that are considered - // unhealthy. - // - // Statistics: The most useful statistic are Average, Minimum, and Maximum. - // - // * HTTPCode_LB_4XX_Count - The number of HTTP 4XX client error codes that - // originate from the load balancer. Client errors are generated when requests - // are malformed or incomplete. These requests have not been received by - // the target instance. This count does not include any response codes generated - // by the target instances. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // * HTTPCode_LB_5XX_Count - The number of HTTP 5XX server error codes that - // originate from the load balancer. This count does not include any response - // codes generated by the target instances. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. Note that Minimum, Maximum, and Average all - // return 1. - // - // * HTTPCode_Instance_2XX_Count - The number of HTTP response codes generated - // by the target instances. This does not include any response codes generated - // by the load balancer. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // * HTTPCode_Instance_3XX_Count - The number of HTTP response codes generated - // by the target instances. This does not include any response codes generated - // by the load balancer. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // * HTTPCode_Instance_4XX_Count - The number of HTTP response codes generated - // by the target instances. This does not include any response codes generated - // by the load balancer. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // * HTTPCode_Instance_5XX_Count - The number of HTTP response codes generated - // by the target instances. This does not include any response codes generated - // by the load balancer. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // * InstanceResponseTime - The time elapsed, in seconds, after the request - // leaves the load balancer until a response from the target instance is - // received. - // - // Statistics: The most useful statistic is Average. - // - // * RejectedConnectionCount - The number of connections that were rejected - // because the load balancer had reached its maximum number of connections. - // - // Statistics: The most useful statistic is Sum. - // - // * RequestCount - The number of requests processed over IPv4. This count - // includes only the requests with a response generated by a target instance - // of the load balancer. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // MetricName is a required field - MetricName *string `locationName:"metricName" type:"string" required:"true" enum:"LoadBalancerMetricName"` +// GoString returns the string representation +func (s ImportKeyPairOutput) GoString() string { + return s.String() +} - // The time period duration for your health data request. - // - // Period is a required field - Period *int64 `locationName:"period" min:"60" type:"integer" required:"true"` +// SetOperation sets the Operation field's value. +func (s *ImportKeyPairOutput) SetOperation(v *Operation) *ImportKeyPairOutput { + s.Operation = v + return s +} - // The start time of the period. - // - // StartTime is a required field - StartTime *time.Time `locationName:"startTime" type:"timestamp" required:"true"` +// Describes an instance (a virtual private server). +type Instance struct { + _ struct{} `type:"structure"` - // An array of statistics that you want to request metrics for. Valid values - // are listed below. - // - // * SampleCount - The count (number) of data points used for the statistical - // calculation. - // - // * Average - The value of Sum / SampleCount during the specified period. - // By comparing this statistic with the Minimum and Maximum, you can determine - // the full scope of a metric and how close the average use is to the Minimum - // and Maximum. This comparison helps you to know when to increase or decrease - // your resources as needed. - // - // * Sum - All values submitted for the matching metric added together. This - // statistic can be useful for determining the total volume of a metric. - // - // * Minimum - The lowest value observed during the specified period. You - // can use this value to determine low volumes of activity for your application. - // - // * Maximum - The highest value observed during the specified period. You - // can use this value to determine high volumes of activity for your application. - // - // Statistics is a required field - Statistics []*string `locationName:"statistics" type:"list" required:"true"` + // The Amazon Resource Name (ARN) of the instance (e.g., arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE). + Arn *string `locationName:"arn" type:"string"` - // The unit for the time period request. Valid values are listed below. - // - // Unit is a required field - Unit *string `locationName:"unit" type:"string" required:"true" enum:"MetricUnit"` + // The blueprint ID (e.g., os_amlinux_2016_03). + BlueprintId *string `locationName:"blueprintId" type:"string"` + + // The friendly name of the blueprint (e.g., Amazon Linux). + BlueprintName *string `locationName:"blueprintName" type:"string"` + + // The bundle for the instance (e.g., micro_1_0). + BundleId *string `locationName:"bundleId" type:"string"` + + // The timestamp when the instance was created (e.g., 1479734909.17). + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` + + // The size of the vCPU and the amount of RAM for the instance. + Hardware *InstanceHardware `locationName:"hardware" type:"structure"` + + // The IPv6 address of the instance. + Ipv6Address *string `locationName:"ipv6Address" type:"string"` + + // A Boolean value indicating whether this instance has a static IP assigned + // to it. + IsStaticIp *bool `locationName:"isStaticIp" type:"boolean"` + + // The region name and Availability Zone where the instance is located. + Location *ResourceLocation `locationName:"location" type:"structure"` + + // The name the user gave the instance (e.g., Amazon_Linux-1GB-Ohio-1). + Name *string `locationName:"name" type:"string"` + + // Information about the public ports and monthly data transfer rates for the + // instance. + Networking *InstanceNetworking `locationName:"networking" type:"structure"` + + // The private IP address of the instance. + PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` + + // The public IP address of the instance. + PublicIpAddress *string `locationName:"publicIpAddress" type:"string"` + + // The type of resource (usually Instance). + ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` + + // The name of the SSH key being used to connect to the instance (e.g., LightsailDefaultKeyPair). + SshKeyName *string `locationName:"sshKeyName" type:"string"` + + // The status code and the state (e.g., running) for the instance. + State *InstanceState `locationName:"state" type:"structure"` + + // The support code. Include this code in your email to support when you have + // questions about an instance or another resource in Lightsail. This code enables + // our support team to look up your Lightsail information more easily. + SupportCode *string `locationName:"supportCode" type:"string"` + + // The tag keys and optional values for the resource. For more information about + // tags in Lightsail, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-tags). + Tags []*Tag `locationName:"tags" type:"list"` + + // The user name for connecting to the instance (e.g., ec2-user). + Username *string `locationName:"username" type:"string"` } // String returns the string representation -func (s GetLoadBalancerMetricDataInput) String() string { +func (s Instance) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetLoadBalancerMetricDataInput) GoString() string { +func (s Instance) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetLoadBalancerMetricDataInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetLoadBalancerMetricDataInput"} - if s.EndTime == nil { - invalidParams.Add(request.NewErrParamRequired("EndTime")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.MetricName == nil { - invalidParams.Add(request.NewErrParamRequired("MetricName")) - } - if s.Period == nil { - invalidParams.Add(request.NewErrParamRequired("Period")) - } - if s.Period != nil && *s.Period < 60 { - invalidParams.Add(request.NewErrParamMinValue("Period", 60)) - } - if s.StartTime == nil { - invalidParams.Add(request.NewErrParamRequired("StartTime")) - } - if s.Statistics == nil { - invalidParams.Add(request.NewErrParamRequired("Statistics")) - } - if s.Unit == nil { - invalidParams.Add(request.NewErrParamRequired("Unit")) - } +// SetArn sets the Arn field's value. +func (s *Instance) SetArn(v string) *Instance { + s.Arn = &v + return s +} - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetBlueprintId sets the BlueprintId field's value. +func (s *Instance) SetBlueprintId(v string) *Instance { + s.BlueprintId = &v + return s } -// SetEndTime sets the EndTime field's value. -func (s *GetLoadBalancerMetricDataInput) SetEndTime(v time.Time) *GetLoadBalancerMetricDataInput { - s.EndTime = &v +// SetBlueprintName sets the BlueprintName field's value. +func (s *Instance) SetBlueprintName(v string) *Instance { + s.BlueprintName = &v return s } -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *GetLoadBalancerMetricDataInput) SetLoadBalancerName(v string) *GetLoadBalancerMetricDataInput { - s.LoadBalancerName = &v +// SetBundleId sets the BundleId field's value. +func (s *Instance) SetBundleId(v string) *Instance { + s.BundleId = &v return s } -// SetMetricName sets the MetricName field's value. -func (s *GetLoadBalancerMetricDataInput) SetMetricName(v string) *GetLoadBalancerMetricDataInput { - s.MetricName = &v +// SetCreatedAt sets the CreatedAt field's value. +func (s *Instance) SetCreatedAt(v time.Time) *Instance { + s.CreatedAt = &v return s } -// SetPeriod sets the Period field's value. -func (s *GetLoadBalancerMetricDataInput) SetPeriod(v int64) *GetLoadBalancerMetricDataInput { - s.Period = &v +// SetHardware sets the Hardware field's value. +func (s *Instance) SetHardware(v *InstanceHardware) *Instance { + s.Hardware = v return s } -// SetStartTime sets the StartTime field's value. -func (s *GetLoadBalancerMetricDataInput) SetStartTime(v time.Time) *GetLoadBalancerMetricDataInput { - s.StartTime = &v +// SetIpv6Address sets the Ipv6Address field's value. +func (s *Instance) SetIpv6Address(v string) *Instance { + s.Ipv6Address = &v return s } -// SetStatistics sets the Statistics field's value. -func (s *GetLoadBalancerMetricDataInput) SetStatistics(v []*string) *GetLoadBalancerMetricDataInput { - s.Statistics = v +// SetIsStaticIp sets the IsStaticIp field's value. +func (s *Instance) SetIsStaticIp(v bool) *Instance { + s.IsStaticIp = &v return s } -// SetUnit sets the Unit field's value. -func (s *GetLoadBalancerMetricDataInput) SetUnit(v string) *GetLoadBalancerMetricDataInput { - s.Unit = &v +// SetLocation sets the Location field's value. +func (s *Instance) SetLocation(v *ResourceLocation) *Instance { + s.Location = v return s } -type GetLoadBalancerMetricDataOutput struct { +// SetName sets the Name field's value. +func (s *Instance) SetName(v string) *Instance { + s.Name = &v + return s +} + +// SetNetworking sets the Networking field's value. +func (s *Instance) SetNetworking(v *InstanceNetworking) *Instance { + s.Networking = v + return s +} + +// SetPrivateIpAddress sets the PrivateIpAddress field's value. +func (s *Instance) SetPrivateIpAddress(v string) *Instance { + s.PrivateIpAddress = &v + return s +} + +// SetPublicIpAddress sets the PublicIpAddress field's value. +func (s *Instance) SetPublicIpAddress(v string) *Instance { + s.PublicIpAddress = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *Instance) SetResourceType(v string) *Instance { + s.ResourceType = &v + return s +} + +// SetSshKeyName sets the SshKeyName field's value. +func (s *Instance) SetSshKeyName(v string) *Instance { + s.SshKeyName = &v + return s +} + +// SetState sets the State field's value. +func (s *Instance) SetState(v *InstanceState) *Instance { + s.State = v + return s +} + +// SetSupportCode sets the SupportCode field's value. +func (s *Instance) SetSupportCode(v string) *Instance { + s.SupportCode = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *Instance) SetTags(v []*Tag) *Instance { + s.Tags = v + return s +} + +// SetUsername sets the Username field's value. +func (s *Instance) SetUsername(v string) *Instance { + s.Username = &v + return s +} + +// The parameters for gaining temporary access to one of your Amazon Lightsail +// instances. +type InstanceAccessDetails struct { _ struct{} `type:"structure"` - // An array of metric datapoint objects. - MetricData []*MetricDatapoint `locationName:"metricData" type:"list"` + // For SSH access, the public key to use when accessing your instance For OpenSSH + // clients (e.g., command line SSH), you should save this value to tempkey-cert.pub. + CertKey *string `locationName:"certKey" type:"string"` - // The metric about which you are receiving information. Valid values are listed - // below, along with the most useful statistics to include in your request. - // - // * ClientTLSNegotiationErrorCount - The number of TLS connections initiated - // by the client that did not establish a session with the load balancer. - // Possible causes include a mismatch of ciphers or protocols. - // - // Statistics: The most useful statistic is Sum. - // - // * HealthyHostCount - The number of target instances that are considered - // healthy. - // - // Statistics: The most useful statistic are Average, Minimum, and Maximum. - // - // * UnhealthyHostCount - The number of target instances that are considered - // unhealthy. - // - // Statistics: The most useful statistic are Average, Minimum, and Maximum. - // - // * HTTPCode_LB_4XX_Count - The number of HTTP 4XX client error codes that - // originate from the load balancer. Client errors are generated when requests - // are malformed or incomplete. These requests have not been received by - // the target instance. This count does not include any response codes generated - // by the target instances. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // * HTTPCode_LB_5XX_Count - The number of HTTP 5XX server error codes that - // originate from the load balancer. This count does not include any response - // codes generated by the target instances. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. Note that Minimum, Maximum, and Average all - // return 1. - // - // * HTTPCode_Instance_2XX_Count - The number of HTTP response codes generated - // by the target instances. This does not include any response codes generated - // by the load balancer. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // * HTTPCode_Instance_3XX_Count - The number of HTTP response codes generated - // by the target instances. This does not include any response codes generated - // by the load balancer. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // * HTTPCode_Instance_4XX_Count - The number of HTTP response codes generated - // by the target instances. This does not include any response codes generated - // by the load balancer. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // * HTTPCode_Instance_5XX_Count - The number of HTTP response codes generated - // by the target instances. This does not include any response codes generated - // by the load balancer. - // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - // - // * InstanceResponseTime - The time elapsed, in seconds, after the request - // leaves the load balancer until a response from the target instance is - // received. - // - // Statistics: The most useful statistic is Average. - // - // * RejectedConnectionCount - The number of connections that were rejected - // because the load balancer had reached its maximum number of connections. - // - // Statistics: The most useful statistic is Sum. + // For SSH access, the date on which the temporary keys expire. + ExpiresAt *time.Time `locationName:"expiresAt" type:"timestamp"` + + // The name of this Amazon Lightsail instance. + InstanceName *string `locationName:"instanceName" type:"string"` + + // The public IP address of the Amazon Lightsail instance. + IpAddress *string `locationName:"ipAddress" type:"string"` + + // For RDP access, the password for your Amazon Lightsail instance. Password + // will be an empty string if the password for your new instance is not ready + // yet. When you create an instance, it can take up to 15 minutes for the instance + // to be ready. // - // * RequestCount - The number of requests processed over IPv4. This count - // includes only the requests with a response generated by a target instance - // of the load balancer. + // If you create an instance using any key pair other than the default (LightsailDefaultKeyPair), + // password will always be an empty string. // - // Statistics: The most useful statistic is Sum. Note that Minimum, Maximum, - // and Average all return 1. - MetricName *string `locationName:"metricName" type:"string" enum:"LoadBalancerMetricName"` + // If you change the Administrator password on the instance, Lightsail will + // continue to return the original password value. When accessing the instance + // using RDP, you need to manually enter the Administrator password after changing + // it from the default. + Password *string `locationName:"password" type:"string"` + + // For a Windows Server-based instance, an object with the data you can use + // to retrieve your password. This is only needed if password is empty and the + // instance is not new (and therefore the password is not ready yet). When you + // create an instance, it can take up to 15 minutes for the instance to be ready. + PasswordData *PasswordData `locationName:"passwordData" type:"structure"` + + // For SSH access, the temporary private key. For OpenSSH clients (e.g., command + // line SSH), you should save this value to tempkey). + PrivateKey *string `locationName:"privateKey" type:"string"` + + // The protocol for these Amazon Lightsail instance access details. + Protocol *string `locationName:"protocol" type:"string" enum:"InstanceAccessProtocol"` + + // The user name to use when logging in to the Amazon Lightsail instance. + Username *string `locationName:"username" type:"string"` } // String returns the string representation -func (s GetLoadBalancerMetricDataOutput) String() string { +func (s InstanceAccessDetails) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetLoadBalancerMetricDataOutput) GoString() string { +func (s InstanceAccessDetails) GoString() string { return s.String() } -// SetMetricData sets the MetricData field's value. -func (s *GetLoadBalancerMetricDataOutput) SetMetricData(v []*MetricDatapoint) *GetLoadBalancerMetricDataOutput { - s.MetricData = v +// SetCertKey sets the CertKey field's value. +func (s *InstanceAccessDetails) SetCertKey(v string) *InstanceAccessDetails { + s.CertKey = &v return s } -// SetMetricName sets the MetricName field's value. -func (s *GetLoadBalancerMetricDataOutput) SetMetricName(v string) *GetLoadBalancerMetricDataOutput { - s.MetricName = &v +// SetExpiresAt sets the ExpiresAt field's value. +func (s *InstanceAccessDetails) SetExpiresAt(v time.Time) *InstanceAccessDetails { + s.ExpiresAt = &v return s } -type GetLoadBalancerOutput struct { - _ struct{} `type:"structure"` +// SetInstanceName sets the InstanceName field's value. +func (s *InstanceAccessDetails) SetInstanceName(v string) *InstanceAccessDetails { + s.InstanceName = &v + return s +} - // An object containing information about your load balancer. - LoadBalancer *LoadBalancer `locationName:"loadBalancer" type:"structure"` +// SetIpAddress sets the IpAddress field's value. +func (s *InstanceAccessDetails) SetIpAddress(v string) *InstanceAccessDetails { + s.IpAddress = &v + return s } -// String returns the string representation -func (s GetLoadBalancerOutput) String() string { - return awsutil.Prettify(s) +// SetPassword sets the Password field's value. +func (s *InstanceAccessDetails) SetPassword(v string) *InstanceAccessDetails { + s.Password = &v + return s } -// GoString returns the string representation -func (s GetLoadBalancerOutput) GoString() string { - return s.String() +// SetPasswordData sets the PasswordData field's value. +func (s *InstanceAccessDetails) SetPasswordData(v *PasswordData) *InstanceAccessDetails { + s.PasswordData = v + return s } -// SetLoadBalancer sets the LoadBalancer field's value. -func (s *GetLoadBalancerOutput) SetLoadBalancer(v *LoadBalancer) *GetLoadBalancerOutput { - s.LoadBalancer = v +// SetPrivateKey sets the PrivateKey field's value. +func (s *InstanceAccessDetails) SetPrivateKey(v string) *InstanceAccessDetails { + s.PrivateKey = &v return s } -type GetLoadBalancerTlsCertificatesInput struct { +// SetProtocol sets the Protocol field's value. +func (s *InstanceAccessDetails) SetProtocol(v string) *InstanceAccessDetails { + s.Protocol = &v + return s +} + +// SetUsername sets the Username field's value. +func (s *InstanceAccessDetails) SetUsername(v string) *InstanceAccessDetails { + s.Username = &v + return s +} + +// Describes the Amazon Elastic Compute Cloud instance and related resources +// to be created using the create cloud formation stack operation. +type InstanceEntry struct { _ struct{} `type:"structure"` - // The name of the load balancer you associated with your SSL/TLS certificate. + // The Availability Zone for the new Amazon EC2 instance. // - // LoadBalancerName is a required field - LoadBalancerName *string `locationName:"loadBalancerName" type:"string" required:"true"` + // AvailabilityZone is a required field + AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` + + // The instance type (e.g., t2.micro) to use for the new Amazon EC2 instance. + // + // InstanceType is a required field + InstanceType *string `locationName:"instanceType" type:"string" required:"true"` + + // The port configuration to use for the new Amazon EC2 instance. + // + // The following configuration options are available: + // + // * DEFAULT — Use the default firewall settings from the image. + // + // * INSTANCE — Use the firewall settings from the source Lightsail instance. + // + // * NONE — Default to Amazon EC2. + // + // PortInfoSource is a required field + PortInfoSource *string `locationName:"portInfoSource" type:"string" required:"true" enum:"PortInfoSourceType"` + + // The name of the export snapshot record, which contains the exported Lightsail + // instance snapshot that will be used as the source of the new Amazon EC2 instance. + // + // Use the get export snapshot records operation to get a list of export snapshot + // records that you can use to create a CloudFormation stack. + // + // SourceName is a required field + SourceName *string `locationName:"sourceName" type:"string" required:"true"` + + // A launch script you can create that configures a server with additional user + // data. For example, you might want to run apt-get -y update. + // + // Depending on the machine image you choose, the command to get software on + // your instance varies. Amazon Linux and CentOS use yum, Debian and Ubuntu + // use apt-get, and FreeBSD uses pkg. + UserData *string `locationName:"userData" type:"string"` } // String returns the string representation -func (s GetLoadBalancerTlsCertificatesInput) String() string { +func (s InstanceEntry) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetLoadBalancerTlsCertificatesInput) GoString() string { +func (s InstanceEntry) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetLoadBalancerTlsCertificatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetLoadBalancerTlsCertificatesInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) +func (s *InstanceEntry) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InstanceEntry"} + if s.AvailabilityZone == nil { + invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) + } + if s.InstanceType == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceType")) + } + if s.PortInfoSource == nil { + invalidParams.Add(request.NewErrParamRequired("PortInfoSource")) + } + if s.SourceName == nil { + invalidParams.Add(request.NewErrParamRequired("SourceName")) } if invalidParams.Len() > 0 { @@ -12354,2687 +19157,2940 @@ func (s *GetLoadBalancerTlsCertificatesInput) Validate() error { return nil } -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *GetLoadBalancerTlsCertificatesInput) SetLoadBalancerName(v string) *GetLoadBalancerTlsCertificatesInput { - s.LoadBalancerName = &v +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *InstanceEntry) SetAvailabilityZone(v string) *InstanceEntry { + s.AvailabilityZone = &v return s } -type GetLoadBalancerTlsCertificatesOutput struct { - _ struct{} `type:"structure"` - - // An array of LoadBalancerTlsCertificate objects describing your SSL/TLS certificates. - TlsCertificates []*LoadBalancerTlsCertificate `locationName:"tlsCertificates" type:"list"` +// SetInstanceType sets the InstanceType field's value. +func (s *InstanceEntry) SetInstanceType(v string) *InstanceEntry { + s.InstanceType = &v + return s } -// String returns the string representation -func (s GetLoadBalancerTlsCertificatesOutput) String() string { - return awsutil.Prettify(s) +// SetPortInfoSource sets the PortInfoSource field's value. +func (s *InstanceEntry) SetPortInfoSource(v string) *InstanceEntry { + s.PortInfoSource = &v + return s } -// GoString returns the string representation -func (s GetLoadBalancerTlsCertificatesOutput) GoString() string { - return s.String() +// SetSourceName sets the SourceName field's value. +func (s *InstanceEntry) SetSourceName(v string) *InstanceEntry { + s.SourceName = &v + return s } -// SetTlsCertificates sets the TlsCertificates field's value. -func (s *GetLoadBalancerTlsCertificatesOutput) SetTlsCertificates(v []*LoadBalancerTlsCertificate) *GetLoadBalancerTlsCertificatesOutput { - s.TlsCertificates = v +// SetUserData sets the UserData field's value. +func (s *InstanceEntry) SetUserData(v string) *InstanceEntry { + s.UserData = &v return s } -type GetLoadBalancersInput struct { +// Describes the hardware for the instance. +type InstanceHardware struct { _ struct{} `type:"structure"` - // A token used for paginating the results from your GetLoadBalancers request. - PageToken *string `locationName:"pageToken" type:"string"` + // The number of vCPUs the instance has. + CpuCount *int64 `locationName:"cpuCount" type:"integer"` + + // The disks attached to the instance. + Disks []*Disk `locationName:"disks" type:"list"` + + // The amount of RAM in GB on the instance (e.g., 1.0). + RamSizeInGb *float64 `locationName:"ramSizeInGb" type:"float"` } // String returns the string representation -func (s GetLoadBalancersInput) String() string { +func (s InstanceHardware) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetLoadBalancersInput) GoString() string { +func (s InstanceHardware) GoString() string { return s.String() } -// SetPageToken sets the PageToken field's value. -func (s *GetLoadBalancersInput) SetPageToken(v string) *GetLoadBalancersInput { - s.PageToken = &v +// SetCpuCount sets the CpuCount field's value. +func (s *InstanceHardware) SetCpuCount(v int64) *InstanceHardware { + s.CpuCount = &v return s } -type GetLoadBalancersOutput struct { +// SetDisks sets the Disks field's value. +func (s *InstanceHardware) SetDisks(v []*Disk) *InstanceHardware { + s.Disks = v + return s +} + +// SetRamSizeInGb sets the RamSizeInGb field's value. +func (s *InstanceHardware) SetRamSizeInGb(v float64) *InstanceHardware { + s.RamSizeInGb = &v + return s +} + +// Describes information about the health of the instance. +type InstanceHealthSummary struct { _ struct{} `type:"structure"` - // An array of LoadBalancer objects describing your load balancers. - LoadBalancers []*LoadBalancer `locationName:"loadBalancers" type:"list"` + // Describes the overall instance health. Valid values are below. + InstanceHealth *string `locationName:"instanceHealth" type:"string" enum:"InstanceHealthState"` - // A token used for advancing to the next page of results from your GetLoadBalancers - // request. - NextPageToken *string `locationName:"nextPageToken" type:"string"` + // More information about the instance health. If the instanceHealth is healthy, + // then an instanceHealthReason value is not provided. + // + // If instanceHealth is initial, the instanceHealthReason value can be one of + // the following: + // + // * Lb.RegistrationInProgress - The target instance is in the process of + // being registered with the load balancer. + // + // * Lb.InitialHealthChecking - The Lightsail load balancer is still sending + // the target instance the minimum number of health checks required to determine + // its health status. + // + // If instanceHealth is unhealthy, the instanceHealthReason value can be one + // of the following: + // + // * Instance.ResponseCodeMismatch - The health checks did not return an + // expected HTTP code. + // + // * Instance.Timeout - The health check requests timed out. + // + // * Instance.FailedHealthChecks - The health checks failed because the connection + // to the target instance timed out, the target instance response was malformed, + // or the target instance failed the health check for an unknown reason. + // + // * Lb.InternalError - The health checks failed due to an internal error. + // + // If instanceHealth is unused, the instanceHealthReason value can be one of + // the following: + // + // * Instance.NotRegistered - The target instance is not registered with + // the target group. + // + // * Instance.NotInUse - The target group is not used by any load balancer, + // or the target instance is in an Availability Zone that is not enabled + // for its load balancer. + // + // * Instance.IpUnusable - The target IP address is reserved for use by a + // Lightsail load balancer. + // + // * Instance.InvalidState - The target is in the stopped or terminated state. + // + // If instanceHealth is draining, the instanceHealthReason value can be one + // of the following: + // + // * Instance.DeregistrationInProgress - The target instance is in the process + // of being deregistered and the deregistration delay period has not expired. + InstanceHealthReason *string `locationName:"instanceHealthReason" type:"string" enum:"InstanceHealthReason"` + + // The name of the Lightsail instance for which you are requesting health check + // data. + InstanceName *string `locationName:"instanceName" type:"string"` } // String returns the string representation -func (s GetLoadBalancersOutput) String() string { +func (s InstanceHealthSummary) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetLoadBalancersOutput) GoString() string { +func (s InstanceHealthSummary) GoString() string { return s.String() } -// SetLoadBalancers sets the LoadBalancers field's value. -func (s *GetLoadBalancersOutput) SetLoadBalancers(v []*LoadBalancer) *GetLoadBalancersOutput { - s.LoadBalancers = v +// SetInstanceHealth sets the InstanceHealth field's value. +func (s *InstanceHealthSummary) SetInstanceHealth(v string) *InstanceHealthSummary { + s.InstanceHealth = &v return s } -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetLoadBalancersOutput) SetNextPageToken(v string) *GetLoadBalancersOutput { - s.NextPageToken = &v +// SetInstanceHealthReason sets the InstanceHealthReason field's value. +func (s *InstanceHealthSummary) SetInstanceHealthReason(v string) *InstanceHealthSummary { + s.InstanceHealthReason = &v return s } -type GetOperationInput struct { +// SetInstanceName sets the InstanceName field's value. +func (s *InstanceHealthSummary) SetInstanceName(v string) *InstanceHealthSummary { + s.InstanceName = &v + return s +} + +// Describes monthly data transfer rates and port information for an instance. +type InstanceNetworking struct { _ struct{} `type:"structure"` - // A GUID used to identify the operation. - // - // OperationId is a required field - OperationId *string `locationName:"operationId" type:"string" required:"true"` + // The amount of data in GB allocated for monthly data transfers. + MonthlyTransfer *MonthlyTransfer `locationName:"monthlyTransfer" type:"structure"` + + // An array of key-value pairs containing information about the ports on the + // instance. + Ports []*InstancePortInfo `locationName:"ports" type:"list"` } // String returns the string representation -func (s GetOperationInput) String() string { +func (s InstanceNetworking) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetOperationInput) GoString() string { +func (s InstanceNetworking) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetOperationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetOperationInput"} - if s.OperationId == nil { - invalidParams.Add(request.NewErrParamRequired("OperationId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetMonthlyTransfer sets the MonthlyTransfer field's value. +func (s *InstanceNetworking) SetMonthlyTransfer(v *MonthlyTransfer) *InstanceNetworking { + s.MonthlyTransfer = v + return s } -// SetOperationId sets the OperationId field's value. -func (s *GetOperationInput) SetOperationId(v string) *GetOperationInput { - s.OperationId = &v +// SetPorts sets the Ports field's value. +func (s *InstanceNetworking) SetPorts(v []*InstancePortInfo) *InstanceNetworking { + s.Ports = v return s } -type GetOperationOutput struct { +// Describes information about the instance ports. +type InstancePortInfo struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the results of your - // get operation request. - Operation *Operation `locationName:"operation" type:"structure"` + // The access direction (inbound or outbound). + AccessDirection *string `locationName:"accessDirection" type:"string" enum:"AccessDirection"` + + // The location from which access is allowed (e.g., Anywhere (0.0.0.0/0)). + AccessFrom *string `locationName:"accessFrom" type:"string"` + + // The type of access (Public or Private). + AccessType *string `locationName:"accessType" type:"string" enum:"PortAccessType"` + + // The common name. + CommonName *string `locationName:"commonName" type:"string"` + + // The first port in the range. + FromPort *int64 `locationName:"fromPort" type:"integer"` + + // The protocol being used. Can be one of the following. + // + // * tcp - Transmission Control Protocol (TCP) provides reliable, ordered, + // and error-checked delivery of streamed data between applications running + // on hosts communicating by an IP network. If you have an application that + // doesn't require reliable data stream service, use UDP instead. + // + // * all - All transport layer protocol types. For more general information, + // see Transport layer (https://en.wikipedia.org/wiki/Transport_layer) on + // Wikipedia. + // + // * udp - With User Datagram Protocol (UDP), computer applications can send + // messages (or datagrams) to other hosts on an Internet Protocol (IP) network. + // Prior communications are not required to set up transmission channels + // or data paths. Applications that don't require reliable data stream service + // can use UDP, which provides a connectionless datagram service that emphasizes + // reduced latency over reliability. If you do require reliable data stream + // service, use TCP instead. + Protocol *string `locationName:"protocol" type:"string" enum:"NetworkProtocol"` + + // The last port in the range. + ToPort *int64 `locationName:"toPort" type:"integer"` } // String returns the string representation -func (s GetOperationOutput) String() string { +func (s InstancePortInfo) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetOperationOutput) GoString() string { +func (s InstancePortInfo) GoString() string { return s.String() } -// SetOperation sets the Operation field's value. -func (s *GetOperationOutput) SetOperation(v *Operation) *GetOperationOutput { - s.Operation = v +// SetAccessDirection sets the AccessDirection field's value. +func (s *InstancePortInfo) SetAccessDirection(v string) *InstancePortInfo { + s.AccessDirection = &v return s } -type GetOperationsForResourceInput struct { - _ struct{} `type:"structure"` - - // A token used for advancing to the next page of results from your get operations - // for resource request. - PageToken *string `locationName:"pageToken" type:"string"` - - // The name of the resource for which you are requesting information. - // - // ResourceName is a required field - ResourceName *string `locationName:"resourceName" type:"string" required:"true"` +// SetAccessFrom sets the AccessFrom field's value. +func (s *InstancePortInfo) SetAccessFrom(v string) *InstancePortInfo { + s.AccessFrom = &v + return s } -// String returns the string representation -func (s GetOperationsForResourceInput) String() string { - return awsutil.Prettify(s) +// SetAccessType sets the AccessType field's value. +func (s *InstancePortInfo) SetAccessType(v string) *InstancePortInfo { + s.AccessType = &v + return s } -// GoString returns the string representation -func (s GetOperationsForResourceInput) GoString() string { - return s.String() +// SetCommonName sets the CommonName field's value. +func (s *InstancePortInfo) SetCommonName(v string) *InstancePortInfo { + s.CommonName = &v + return s } -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetOperationsForResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetOperationsForResourceInput"} - if s.ResourceName == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetFromPort sets the FromPort field's value. +func (s *InstancePortInfo) SetFromPort(v int64) *InstancePortInfo { + s.FromPort = &v + return s } -// SetPageToken sets the PageToken field's value. -func (s *GetOperationsForResourceInput) SetPageToken(v string) *GetOperationsForResourceInput { - s.PageToken = &v +// SetProtocol sets the Protocol field's value. +func (s *InstancePortInfo) SetProtocol(v string) *InstancePortInfo { + s.Protocol = &v return s } -// SetResourceName sets the ResourceName field's value. -func (s *GetOperationsForResourceInput) SetResourceName(v string) *GetOperationsForResourceInput { - s.ResourceName = &v +// SetToPort sets the ToPort field's value. +func (s *InstancePortInfo) SetToPort(v int64) *InstancePortInfo { + s.ToPort = &v return s } -type GetOperationsForResourceOutput struct { +// Describes the port state. +type InstancePortState struct { _ struct{} `type:"structure"` - // (Deprecated) Returns the number of pages of results that remain. + // The first port in the range. + FromPort *int64 `locationName:"fromPort" type:"integer"` + + // The protocol being used. Can be one of the following. // - // In releases prior to June 12, 2017, this parameter returned null by the API. - // It is now deprecated, and the API returns the nextPageToken parameter instead. + // * tcp - Transmission Control Protocol (TCP) provides reliable, ordered, + // and error-checked delivery of streamed data between applications running + // on hosts communicating by an IP network. If you have an application that + // doesn't require reliable data stream service, use UDP instead. // - // Deprecated: NextPageCount has been deprecated - NextPageCount *string `locationName:"nextPageCount" deprecated:"true" type:"string"` + // * all - All transport layer protocol types. For more general information, + // see Transport layer (https://en.wikipedia.org/wiki/Transport_layer) on + // Wikipedia. + // + // * udp - With User Datagram Protocol (UDP), computer applications can send + // messages (or datagrams) to other hosts on an Internet Protocol (IP) network. + // Prior communications are not required to set up transmission channels + // or data paths. Applications that don't require reliable data stream service + // can use UDP, which provides a connectionless datagram service that emphasizes + // reduced latency over reliability. If you do require reliable data stream + // service, use TCP instead. + Protocol *string `locationName:"protocol" type:"string" enum:"NetworkProtocol"` - // An identifier that was returned from the previous call to this operation, - // which can be used to return the next set of items in the list. - NextPageToken *string `locationName:"nextPageToken" type:"string"` + // Specifies whether the instance port is open or closed. + State *string `locationName:"state" type:"string" enum:"PortState"` - // An array of key-value pairs containing information about the results of your - // get operations for resource request. - Operations []*Operation `locationName:"operations" type:"list"` + // The last port in the range. + ToPort *int64 `locationName:"toPort" type:"integer"` } // String returns the string representation -func (s GetOperationsForResourceOutput) String() string { +func (s InstancePortState) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetOperationsForResourceOutput) GoString() string { +func (s InstancePortState) GoString() string { return s.String() } -// SetNextPageCount sets the NextPageCount field's value. -func (s *GetOperationsForResourceOutput) SetNextPageCount(v string) *GetOperationsForResourceOutput { - s.NextPageCount = &v +// SetFromPort sets the FromPort field's value. +func (s *InstancePortState) SetFromPort(v int64) *InstancePortState { + s.FromPort = &v return s } -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetOperationsForResourceOutput) SetNextPageToken(v string) *GetOperationsForResourceOutput { - s.NextPageToken = &v +// SetProtocol sets the Protocol field's value. +func (s *InstancePortState) SetProtocol(v string) *InstancePortState { + s.Protocol = &v return s } -// SetOperations sets the Operations field's value. -func (s *GetOperationsForResourceOutput) SetOperations(v []*Operation) *GetOperationsForResourceOutput { - s.Operations = v +// SetState sets the State field's value. +func (s *InstancePortState) SetState(v string) *InstancePortState { + s.State = &v return s } -type GetOperationsInput struct { +// SetToPort sets the ToPort field's value. +func (s *InstancePortState) SetToPort(v int64) *InstancePortState { + s.ToPort = &v + return s +} + +// Describes the snapshot of the virtual private server, or instance. +type InstanceSnapshot struct { _ struct{} `type:"structure"` - // A token used for advancing to the next page of results from your get operations - // request. - PageToken *string `locationName:"pageToken" type:"string"` -} + // The Amazon Resource Name (ARN) of the snapshot (e.g., arn:aws:lightsail:us-east-2:123456789101:InstanceSnapshot/d23b5706-3322-4d83-81e5-12345EXAMPLE). + Arn *string `locationName:"arn" type:"string"` -// String returns the string representation -func (s GetOperationsInput) String() string { - return awsutil.Prettify(s) -} + // The timestamp when the snapshot was created (e.g., 1479907467.024). + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` -// GoString returns the string representation -func (s GetOperationsInput) GoString() string { - return s.String() -} + // An array of disk objects containing information about all block storage disks. + FromAttachedDisks []*Disk `locationName:"fromAttachedDisks" type:"list"` + + // The blueprint ID from which you created the snapshot (e.g., os_debian_8_3). + // A blueprint is a virtual private server (or instance) image used to create + // instances quickly. + FromBlueprintId *string `locationName:"fromBlueprintId" type:"string"` + + // The bundle ID from which you created the snapshot (e.g., micro_1_0). + FromBundleId *string `locationName:"fromBundleId" type:"string"` + + // The Amazon Resource Name (ARN) of the instance from which the snapshot was + // created (e.g., arn:aws:lightsail:us-east-2:123456789101:Instance/64b8404c-ccb1-430b-8daf-12345EXAMPLE). + FromInstanceArn *string `locationName:"fromInstanceArn" type:"string"` + + // The instance from which the snapshot was created. + FromInstanceName *string `locationName:"fromInstanceName" type:"string"` + + // The region name and Availability Zone where you created the snapshot. + Location *ResourceLocation `locationName:"location" type:"structure"` + + // The name of the snapshot. + Name *string `locationName:"name" type:"string"` + + // The progress of the snapshot. + Progress *string `locationName:"progress" type:"string"` + + // The type of resource (usually InstanceSnapshot). + ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` -// SetPageToken sets the PageToken field's value. -func (s *GetOperationsInput) SetPageToken(v string) *GetOperationsInput { - s.PageToken = &v - return s -} + // The size in GB of the SSD. + SizeInGb *int64 `locationName:"sizeInGb" type:"integer"` -type GetOperationsOutput struct { - _ struct{} `type:"structure"` + // The state the snapshot is in. + State *string `locationName:"state" type:"string" enum:"InstanceSnapshotState"` - // A token used for advancing to the next page of results from your get operations - // request. - NextPageToken *string `locationName:"nextPageToken" type:"string"` + // The support code. Include this code in your email to support when you have + // questions about an instance or another resource in Lightsail. This code enables + // our support team to look up your Lightsail information more easily. + SupportCode *string `locationName:"supportCode" type:"string"` - // An array of key-value pairs containing information about the results of your - // get operations request. - Operations []*Operation `locationName:"operations" type:"list"` + // The tag keys and optional values for the resource. For more information about + // tags in Lightsail, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-tags). + Tags []*Tag `locationName:"tags" type:"list"` } // String returns the string representation -func (s GetOperationsOutput) String() string { +func (s InstanceSnapshot) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetOperationsOutput) GoString() string { +func (s InstanceSnapshot) GoString() string { return s.String() } -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetOperationsOutput) SetNextPageToken(v string) *GetOperationsOutput { - s.NextPageToken = &v +// SetArn sets the Arn field's value. +func (s *InstanceSnapshot) SetArn(v string) *InstanceSnapshot { + s.Arn = &v return s } -// SetOperations sets the Operations field's value. -func (s *GetOperationsOutput) SetOperations(v []*Operation) *GetOperationsOutput { - s.Operations = v +// SetCreatedAt sets the CreatedAt field's value. +func (s *InstanceSnapshot) SetCreatedAt(v time.Time) *InstanceSnapshot { + s.CreatedAt = &v return s } -type GetRegionsInput struct { - _ struct{} `type:"structure"` - - // A Boolean value indicating whether to also include Availability Zones in - // your get regions request. Availability Zones are indicated with a letter: - // e.g., us-east-2a. - IncludeAvailabilityZones *bool `locationName:"includeAvailabilityZones" type:"boolean"` +// SetFromAttachedDisks sets the FromAttachedDisks field's value. +func (s *InstanceSnapshot) SetFromAttachedDisks(v []*Disk) *InstanceSnapshot { + s.FromAttachedDisks = v + return s } -// String returns the string representation -func (s GetRegionsInput) String() string { - return awsutil.Prettify(s) +// SetFromBlueprintId sets the FromBlueprintId field's value. +func (s *InstanceSnapshot) SetFromBlueprintId(v string) *InstanceSnapshot { + s.FromBlueprintId = &v + return s } -// GoString returns the string representation -func (s GetRegionsInput) GoString() string { - return s.String() +// SetFromBundleId sets the FromBundleId field's value. +func (s *InstanceSnapshot) SetFromBundleId(v string) *InstanceSnapshot { + s.FromBundleId = &v + return s } -// SetIncludeAvailabilityZones sets the IncludeAvailabilityZones field's value. -func (s *GetRegionsInput) SetIncludeAvailabilityZones(v bool) *GetRegionsInput { - s.IncludeAvailabilityZones = &v +// SetFromInstanceArn sets the FromInstanceArn field's value. +func (s *InstanceSnapshot) SetFromInstanceArn(v string) *InstanceSnapshot { + s.FromInstanceArn = &v return s } -type GetRegionsOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about your get regions - // request. - Regions []*Region `locationName:"regions" type:"list"` +// SetFromInstanceName sets the FromInstanceName field's value. +func (s *InstanceSnapshot) SetFromInstanceName(v string) *InstanceSnapshot { + s.FromInstanceName = &v + return s } -// String returns the string representation -func (s GetRegionsOutput) String() string { - return awsutil.Prettify(s) +// SetLocation sets the Location field's value. +func (s *InstanceSnapshot) SetLocation(v *ResourceLocation) *InstanceSnapshot { + s.Location = v + return s } -// GoString returns the string representation -func (s GetRegionsOutput) GoString() string { - return s.String() +// SetName sets the Name field's value. +func (s *InstanceSnapshot) SetName(v string) *InstanceSnapshot { + s.Name = &v + return s } -// SetRegions sets the Regions field's value. -func (s *GetRegionsOutput) SetRegions(v []*Region) *GetRegionsOutput { - s.Regions = v +// SetProgress sets the Progress field's value. +func (s *InstanceSnapshot) SetProgress(v string) *InstanceSnapshot { + s.Progress = &v return s } -type GetStaticIpInput struct { - _ struct{} `type:"structure"` - - // The name of the static IP in Lightsail. - // - // StaticIpName is a required field - StaticIpName *string `locationName:"staticIpName" type:"string" required:"true"` +// SetResourceType sets the ResourceType field's value. +func (s *InstanceSnapshot) SetResourceType(v string) *InstanceSnapshot { + s.ResourceType = &v + return s } -// String returns the string representation -func (s GetStaticIpInput) String() string { - return awsutil.Prettify(s) +// SetSizeInGb sets the SizeInGb field's value. +func (s *InstanceSnapshot) SetSizeInGb(v int64) *InstanceSnapshot { + s.SizeInGb = &v + return s } -// GoString returns the string representation -func (s GetStaticIpInput) GoString() string { - return s.String() +// SetState sets the State field's value. +func (s *InstanceSnapshot) SetState(v string) *InstanceSnapshot { + s.State = &v + return s } -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetStaticIpInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetStaticIpInput"} - if s.StaticIpName == nil { - invalidParams.Add(request.NewErrParamRequired("StaticIpName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetSupportCode sets the SupportCode field's value. +func (s *InstanceSnapshot) SetSupportCode(v string) *InstanceSnapshot { + s.SupportCode = &v + return s } -// SetStaticIpName sets the StaticIpName field's value. -func (s *GetStaticIpInput) SetStaticIpName(v string) *GetStaticIpInput { - s.StaticIpName = &v +// SetTags sets the Tags field's value. +func (s *InstanceSnapshot) SetTags(v []*Tag) *InstanceSnapshot { + s.Tags = v return s } -type GetStaticIpOutput struct { +// Describes an instance snapshot. +type InstanceSnapshotInfo struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the requested static - // IP. - StaticIp *StaticIp `locationName:"staticIp" type:"structure"` + // The blueprint ID from which the source instance (e.g., os_debian_8_3). + FromBlueprintId *string `locationName:"fromBlueprintId" type:"string"` + + // The bundle ID from which the source instance was created (e.g., micro_1_0). + FromBundleId *string `locationName:"fromBundleId" type:"string"` + + // A list of objects describing the disks that were attached to the source instance. + FromDiskInfo []*DiskInfo `locationName:"fromDiskInfo" type:"list"` } // String returns the string representation -func (s GetStaticIpOutput) String() string { +func (s InstanceSnapshotInfo) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetStaticIpOutput) GoString() string { +func (s InstanceSnapshotInfo) GoString() string { return s.String() } -// SetStaticIp sets the StaticIp field's value. -func (s *GetStaticIpOutput) SetStaticIp(v *StaticIp) *GetStaticIpOutput { - s.StaticIp = v +// SetFromBlueprintId sets the FromBlueprintId field's value. +func (s *InstanceSnapshotInfo) SetFromBlueprintId(v string) *InstanceSnapshotInfo { + s.FromBlueprintId = &v return s } -type GetStaticIpsInput struct { - _ struct{} `type:"structure"` - - // A token used for advancing to the next page of results from your get static - // IPs request. - PageToken *string `locationName:"pageToken" type:"string"` -} - -// String returns the string representation -func (s GetStaticIpsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s GetStaticIpsInput) GoString() string { - return s.String() +// SetFromBundleId sets the FromBundleId field's value. +func (s *InstanceSnapshotInfo) SetFromBundleId(v string) *InstanceSnapshotInfo { + s.FromBundleId = &v + return s } -// SetPageToken sets the PageToken field's value. -func (s *GetStaticIpsInput) SetPageToken(v string) *GetStaticIpsInput { - s.PageToken = &v +// SetFromDiskInfo sets the FromDiskInfo field's value. +func (s *InstanceSnapshotInfo) SetFromDiskInfo(v []*DiskInfo) *InstanceSnapshotInfo { + s.FromDiskInfo = v return s } -type GetStaticIpsOutput struct { +// Describes the virtual private server (or instance) status. +type InstanceState struct { _ struct{} `type:"structure"` - // A token used for advancing to the next page of results from your get static - // IPs request. - NextPageToken *string `locationName:"nextPageToken" type:"string"` + // The status code for the instance. + Code *int64 `locationName:"code" type:"integer"` - // An array of key-value pairs containing information about your get static - // IPs request. - StaticIps []*StaticIp `locationName:"staticIps" type:"list"` + // The state of the instance (e.g., running or pending). + Name *string `locationName:"name" type:"string"` } // String returns the string representation -func (s GetStaticIpsOutput) String() string { +func (s InstanceState) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetStaticIpsOutput) GoString() string { +func (s InstanceState) GoString() string { return s.String() } -// SetNextPageToken sets the NextPageToken field's value. -func (s *GetStaticIpsOutput) SetNextPageToken(v string) *GetStaticIpsOutput { - s.NextPageToken = &v +// SetCode sets the Code field's value. +func (s *InstanceState) SetCode(v int64) *InstanceState { + s.Code = &v return s } -// SetStaticIps sets the StaticIps field's value. -func (s *GetStaticIpsOutput) SetStaticIps(v []*StaticIp) *GetStaticIpsOutput { - s.StaticIps = v +// SetName sets the Name field's value. +func (s *InstanceState) SetName(v string) *InstanceState { + s.Name = &v return s } -type ImportKeyPairInput struct { +type IsVpcPeeredInput struct { _ struct{} `type:"structure"` - - // The name of the key pair for which you want to import the public key. - // - // KeyPairName is a required field - KeyPairName *string `locationName:"keyPairName" type:"string" required:"true"` - - // A base64-encoded public key of the ssh-rsa type. - // - // PublicKeyBase64 is a required field - PublicKeyBase64 *string `locationName:"publicKeyBase64" type:"string" required:"true"` } // String returns the string representation -func (s ImportKeyPairInput) String() string { +func (s IsVpcPeeredInput) String() string { return awsutil.Prettify(s) } -// GoString returns the string representation -func (s ImportKeyPairInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ImportKeyPairInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ImportKeyPairInput"} - if s.KeyPairName == nil { - invalidParams.Add(request.NewErrParamRequired("KeyPairName")) - } - if s.PublicKeyBase64 == nil { - invalidParams.Add(request.NewErrParamRequired("PublicKeyBase64")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKeyPairName sets the KeyPairName field's value. -func (s *ImportKeyPairInput) SetKeyPairName(v string) *ImportKeyPairInput { - s.KeyPairName = &v - return s -} - -// SetPublicKeyBase64 sets the PublicKeyBase64 field's value. -func (s *ImportKeyPairInput) SetPublicKeyBase64(v string) *ImportKeyPairInput { - s.PublicKeyBase64 = &v - return s -} - -type ImportKeyPairOutput struct { +// GoString returns the string representation +func (s IsVpcPeeredInput) GoString() string { + return s.String() +} + +type IsVpcPeeredOutput struct { _ struct{} `type:"structure"` - // An array of key-value pairs containing information about the request operation. - Operation *Operation `locationName:"operation" type:"structure"` + // Returns true if the Lightsail VPC is peered; otherwise, false. + IsPeered *bool `locationName:"isPeered" type:"boolean"` } // String returns the string representation -func (s ImportKeyPairOutput) String() string { +func (s IsVpcPeeredOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ImportKeyPairOutput) GoString() string { +func (s IsVpcPeeredOutput) GoString() string { return s.String() } -// SetOperation sets the Operation field's value. -func (s *ImportKeyPairOutput) SetOperation(v *Operation) *ImportKeyPairOutput { - s.Operation = v +// SetIsPeered sets the IsPeered field's value. +func (s *IsVpcPeeredOutput) SetIsPeered(v bool) *IsVpcPeeredOutput { + s.IsPeered = &v return s } -// Describes an instance (a virtual private server). -type Instance struct { +// Describes the SSH key pair. +type KeyPair struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the instance (e.g., arn:aws:lightsail:us-east-2:123456789101:Instance/244ad76f-8aad-4741-809f-12345EXAMPLE). + // The Amazon Resource Name (ARN) of the key pair (e.g., arn:aws:lightsail:us-east-2:123456789101:KeyPair/05859e3d-331d-48ba-9034-12345EXAMPLE). Arn *string `locationName:"arn" type:"string"` - // The blueprint ID (e.g., os_amlinux_2016_03). - BlueprintId *string `locationName:"blueprintId" type:"string"` - - // The friendly name of the blueprint (e.g., Amazon Linux). - BlueprintName *string `locationName:"blueprintName" type:"string"` - - // The bundle for the instance (e.g., micro_1_0). - BundleId *string `locationName:"bundleId" type:"string"` - - // The timestamp when the instance was created (e.g., 1479734909.17). + // The timestamp when the key pair was created (e.g., 1479816991.349). CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - // The size of the vCPU and the amount of RAM for the instance. - Hardware *InstanceHardware `locationName:"hardware" type:"structure"` - - // The IPv6 address of the instance. - Ipv6Address *string `locationName:"ipv6Address" type:"string"` - - // A Boolean value indicating whether this instance has a static IP assigned - // to it. - IsStaticIp *bool `locationName:"isStaticIp" type:"boolean"` + // The RSA fingerprint of the key pair. + Fingerprint *string `locationName:"fingerprint" type:"string"` - // The region name and availability zone where the instance is located. + // The region name and Availability Zone where the key pair was created. Location *ResourceLocation `locationName:"location" type:"structure"` - // The name the user gave the instance (e.g., Amazon_Linux-1GB-Ohio-1). + // The friendly name of the SSH key pair. Name *string `locationName:"name" type:"string"` - // Information about the public ports and monthly data transfer rates for the - // instance. - Networking *InstanceNetworking `locationName:"networking" type:"structure"` - - // The private IP address of the instance. - PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` - - // The public IP address of the instance. - PublicIpAddress *string `locationName:"publicIpAddress" type:"string"` - - // The type of resource (usually Instance). + // The resource type (usually KeyPair). ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - // The name of the SSH key being used to connect to the instance (e.g., LightsailDefaultKeyPair). - SshKeyName *string `locationName:"sshKeyName" type:"string"` - - // The status code and the state (e.g., running) for the instance. - State *InstanceState `locationName:"state" type:"structure"` - // The support code. Include this code in your email to support when you have // questions about an instance or another resource in Lightsail. This code enables // our support team to look up your Lightsail information more easily. SupportCode *string `locationName:"supportCode" type:"string"` - // The user name for connecting to the instance (e.g., ec2-user). - Username *string `locationName:"username" type:"string"` + // The tag keys and optional values for the resource. For more information about + // tags in Lightsail, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-tags). + Tags []*Tag `locationName:"tags" type:"list"` } // String returns the string representation -func (s Instance) String() string { +func (s KeyPair) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Instance) GoString() string { +func (s KeyPair) GoString() string { return s.String() } // SetArn sets the Arn field's value. -func (s *Instance) SetArn(v string) *Instance { +func (s *KeyPair) SetArn(v string) *KeyPair { s.Arn = &v return s } -// SetBlueprintId sets the BlueprintId field's value. -func (s *Instance) SetBlueprintId(v string) *Instance { - s.BlueprintId = &v - return s -} - -// SetBlueprintName sets the BlueprintName field's value. -func (s *Instance) SetBlueprintName(v string) *Instance { - s.BlueprintName = &v - return s -} - -// SetBundleId sets the BundleId field's value. -func (s *Instance) SetBundleId(v string) *Instance { - s.BundleId = &v - return s -} - // SetCreatedAt sets the CreatedAt field's value. -func (s *Instance) SetCreatedAt(v time.Time) *Instance { +func (s *KeyPair) SetCreatedAt(v time.Time) *KeyPair { s.CreatedAt = &v return s } -// SetHardware sets the Hardware field's value. -func (s *Instance) SetHardware(v *InstanceHardware) *Instance { - s.Hardware = v - return s -} - -// SetIpv6Address sets the Ipv6Address field's value. -func (s *Instance) SetIpv6Address(v string) *Instance { - s.Ipv6Address = &v - return s -} - -// SetIsStaticIp sets the IsStaticIp field's value. -func (s *Instance) SetIsStaticIp(v bool) *Instance { - s.IsStaticIp = &v +// SetFingerprint sets the Fingerprint field's value. +func (s *KeyPair) SetFingerprint(v string) *KeyPair { + s.Fingerprint = &v return s } // SetLocation sets the Location field's value. -func (s *Instance) SetLocation(v *ResourceLocation) *Instance { +func (s *KeyPair) SetLocation(v *ResourceLocation) *KeyPair { s.Location = v return s } // SetName sets the Name field's value. -func (s *Instance) SetName(v string) *Instance { +func (s *KeyPair) SetName(v string) *KeyPair { s.Name = &v return s } -// SetNetworking sets the Networking field's value. -func (s *Instance) SetNetworking(v *InstanceNetworking) *Instance { - s.Networking = v - return s -} - -// SetPrivateIpAddress sets the PrivateIpAddress field's value. -func (s *Instance) SetPrivateIpAddress(v string) *Instance { - s.PrivateIpAddress = &v - return s -} - -// SetPublicIpAddress sets the PublicIpAddress field's value. -func (s *Instance) SetPublicIpAddress(v string) *Instance { - s.PublicIpAddress = &v - return s -} - // SetResourceType sets the ResourceType field's value. -func (s *Instance) SetResourceType(v string) *Instance { +func (s *KeyPair) SetResourceType(v string) *KeyPair { s.ResourceType = &v return s } -// SetSshKeyName sets the SshKeyName field's value. -func (s *Instance) SetSshKeyName(v string) *Instance { - s.SshKeyName = &v - return s -} - -// SetState sets the State field's value. -func (s *Instance) SetState(v *InstanceState) *Instance { - s.State = v - return s -} - // SetSupportCode sets the SupportCode field's value. -func (s *Instance) SetSupportCode(v string) *Instance { +func (s *KeyPair) SetSupportCode(v string) *KeyPair { s.SupportCode = &v return s } -// SetUsername sets the Username field's value. -func (s *Instance) SetUsername(v string) *Instance { - s.Username = &v +// SetTags sets the Tags field's value. +func (s *KeyPair) SetTags(v []*Tag) *KeyPair { + s.Tags = v return s } -// The parameters for gaining temporary access to one of your Amazon Lightsail -// instances. -type InstanceAccessDetails struct { +// Describes the Lightsail load balancer. +type LoadBalancer struct { _ struct{} `type:"structure"` - // For SSH access, the public key to use when accessing your instance For OpenSSH - // clients (e.g., command line SSH), you should save this value to tempkey-cert.pub. - CertKey *string `locationName:"certKey" type:"string"` + // The Amazon Resource Name (ARN) of the load balancer. + Arn *string `locationName:"arn" type:"string"` - // For SSH access, the date on which the temporary keys expire. - ExpiresAt *time.Time `locationName:"expiresAt" type:"timestamp"` + // A string to string map of the configuration options for your load balancer. + // Valid values are listed below. + ConfigurationOptions map[string]*string `locationName:"configurationOptions" type:"map"` - // The name of this Amazon Lightsail instance. - InstanceName *string `locationName:"instanceName" type:"string"` + // The date when your load balancer was created. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - // The public IP address of the Amazon Lightsail instance. - IpAddress *string `locationName:"ipAddress" type:"string"` + // The DNS name of your Lightsail load balancer. + DnsName *string `locationName:"dnsName" type:"string"` - // For RDP access, the password for your Amazon Lightsail instance. Password - // will be an empty string if the password for your new instance is not ready - // yet. When you create an instance, it can take up to 15 minutes for the instance - // to be ready. - // - // If you create an instance using any key pair other than the default (LightsailDefaultKeyPair), - // password will always be an empty string. + // The path you specified to perform your health checks. If no path is specified, + // the load balancer tries to make a request to the default (root) page. + HealthCheckPath *string `locationName:"healthCheckPath" type:"string"` + + // An array of InstanceHealthSummary objects describing the health of the load + // balancer. + InstanceHealthSummary []*InstanceHealthSummary `locationName:"instanceHealthSummary" type:"list"` + + // The port where the load balancer will direct traffic to your Lightsail instances. + // For HTTP traffic, it's port 80. For HTTPS traffic, it's port 443. + InstancePort *int64 `locationName:"instancePort" type:"integer"` + + // The AWS Region where your load balancer was created (e.g., us-east-2a). Lightsail + // automatically creates your load balancer across Availability Zones. + Location *ResourceLocation `locationName:"location" type:"structure"` + + // The name of the load balancer (e.g., my-load-balancer). + Name *string `locationName:"name" type:"string"` + + // The protocol you have enabled for your load balancer. Valid values are below. // - // If you change the Administrator password on the instance, Lightsail will - // continue to return the original password value. When accessing the instance - // using RDP, you need to manually enter the Administrator password after changing - // it from the default. - Password *string `locationName:"password" type:"string"` + // You can't just have HTTP_HTTPS, but you can have just HTTP. + Protocol *string `locationName:"protocol" type:"string" enum:"LoadBalancerProtocol"` - // For a Windows Server-based instance, an object with the data you can use - // to retrieve your password. This is only needed if password is empty and the - // instance is not new (and therefore the password is not ready yet). When you - // create an instance, it can take up to 15 minutes for the instance to be ready. - PasswordData *PasswordData `locationName:"passwordData" type:"structure"` + // An array of public port settings for your load balancer. For HTTP, use port + // 80. For HTTPS, use port 443. + PublicPorts []*int64 `locationName:"publicPorts" type:"list"` - // For SSH access, the temporary private key. For OpenSSH clients (e.g., command - // line SSH), you should save this value to tempkey). - PrivateKey *string `locationName:"privateKey" type:"string"` + // The resource type (e.g., LoadBalancer. + ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - // The protocol for these Amazon Lightsail instance access details. - Protocol *string `locationName:"protocol" type:"string" enum:"InstanceAccessProtocol"` + // The status of your load balancer. Valid values are below. + State *string `locationName:"state" type:"string" enum:"LoadBalancerState"` - // The user name to use when logging in to the Amazon Lightsail instance. - Username *string `locationName:"username" type:"string"` + // The support code. Include this code in your email to support when you have + // questions about your Lightsail load balancer. This code enables our support + // team to look up your Lightsail information more easily. + SupportCode *string `locationName:"supportCode" type:"string"` + + // The tag keys and optional values for the resource. For more information about + // tags in Lightsail, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-tags). + Tags []*Tag `locationName:"tags" type:"list"` + + // An array of LoadBalancerTlsCertificateSummary objects that provide additional + // information about the SSL/TLS certificates. For example, if true, the certificate + // is attached to the load balancer. + TlsCertificateSummaries []*LoadBalancerTlsCertificateSummary `locationName:"tlsCertificateSummaries" type:"list"` } // String returns the string representation -func (s InstanceAccessDetails) String() string { +func (s LoadBalancer) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s InstanceAccessDetails) GoString() string { +func (s LoadBalancer) GoString() string { return s.String() } -// SetCertKey sets the CertKey field's value. -func (s *InstanceAccessDetails) SetCertKey(v string) *InstanceAccessDetails { - s.CertKey = &v +// SetArn sets the Arn field's value. +func (s *LoadBalancer) SetArn(v string) *LoadBalancer { + s.Arn = &v + return s +} + +// SetConfigurationOptions sets the ConfigurationOptions field's value. +func (s *LoadBalancer) SetConfigurationOptions(v map[string]*string) *LoadBalancer { + s.ConfigurationOptions = v + return s +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *LoadBalancer) SetCreatedAt(v time.Time) *LoadBalancer { + s.CreatedAt = &v return s } -// SetExpiresAt sets the ExpiresAt field's value. -func (s *InstanceAccessDetails) SetExpiresAt(v time.Time) *InstanceAccessDetails { - s.ExpiresAt = &v +// SetDnsName sets the DnsName field's value. +func (s *LoadBalancer) SetDnsName(v string) *LoadBalancer { + s.DnsName = &v return s } -// SetInstanceName sets the InstanceName field's value. -func (s *InstanceAccessDetails) SetInstanceName(v string) *InstanceAccessDetails { - s.InstanceName = &v +// SetHealthCheckPath sets the HealthCheckPath field's value. +func (s *LoadBalancer) SetHealthCheckPath(v string) *LoadBalancer { + s.HealthCheckPath = &v return s } -// SetIpAddress sets the IpAddress field's value. -func (s *InstanceAccessDetails) SetIpAddress(v string) *InstanceAccessDetails { - s.IpAddress = &v +// SetInstanceHealthSummary sets the InstanceHealthSummary field's value. +func (s *LoadBalancer) SetInstanceHealthSummary(v []*InstanceHealthSummary) *LoadBalancer { + s.InstanceHealthSummary = v return s } -// SetPassword sets the Password field's value. -func (s *InstanceAccessDetails) SetPassword(v string) *InstanceAccessDetails { - s.Password = &v +// SetInstancePort sets the InstancePort field's value. +func (s *LoadBalancer) SetInstancePort(v int64) *LoadBalancer { + s.InstancePort = &v return s } -// SetPasswordData sets the PasswordData field's value. -func (s *InstanceAccessDetails) SetPasswordData(v *PasswordData) *InstanceAccessDetails { - s.PasswordData = v +// SetLocation sets the Location field's value. +func (s *LoadBalancer) SetLocation(v *ResourceLocation) *LoadBalancer { + s.Location = v return s } -// SetPrivateKey sets the PrivateKey field's value. -func (s *InstanceAccessDetails) SetPrivateKey(v string) *InstanceAccessDetails { - s.PrivateKey = &v +// SetName sets the Name field's value. +func (s *LoadBalancer) SetName(v string) *LoadBalancer { + s.Name = &v return s } // SetProtocol sets the Protocol field's value. -func (s *InstanceAccessDetails) SetProtocol(v string) *InstanceAccessDetails { +func (s *LoadBalancer) SetProtocol(v string) *LoadBalancer { s.Protocol = &v return s } -// SetUsername sets the Username field's value. -func (s *InstanceAccessDetails) SetUsername(v string) *InstanceAccessDetails { - s.Username = &v +// SetPublicPorts sets the PublicPorts field's value. +func (s *LoadBalancer) SetPublicPorts(v []*int64) *LoadBalancer { + s.PublicPorts = v return s } -// Describes the hardware for the instance. -type InstanceHardware struct { - _ struct{} `type:"structure"` - - // The number of vCPUs the instance has. - CpuCount *int64 `locationName:"cpuCount" type:"integer"` - - // The disks attached to the instance. - Disks []*Disk `locationName:"disks" type:"list"` - - // The amount of RAM in GB on the instance (e.g., 1.0). - RamSizeInGb *float64 `locationName:"ramSizeInGb" type:"float"` -} - -// String returns the string representation -func (s InstanceHardware) String() string { - return awsutil.Prettify(s) +// SetResourceType sets the ResourceType field's value. +func (s *LoadBalancer) SetResourceType(v string) *LoadBalancer { + s.ResourceType = &v + return s } -// GoString returns the string representation -func (s InstanceHardware) GoString() string { - return s.String() +// SetState sets the State field's value. +func (s *LoadBalancer) SetState(v string) *LoadBalancer { + s.State = &v + return s } -// SetCpuCount sets the CpuCount field's value. -func (s *InstanceHardware) SetCpuCount(v int64) *InstanceHardware { - s.CpuCount = &v +// SetSupportCode sets the SupportCode field's value. +func (s *LoadBalancer) SetSupportCode(v string) *LoadBalancer { + s.SupportCode = &v return s } -// SetDisks sets the Disks field's value. -func (s *InstanceHardware) SetDisks(v []*Disk) *InstanceHardware { - s.Disks = v +// SetTags sets the Tags field's value. +func (s *LoadBalancer) SetTags(v []*Tag) *LoadBalancer { + s.Tags = v return s } -// SetRamSizeInGb sets the RamSizeInGb field's value. -func (s *InstanceHardware) SetRamSizeInGb(v float64) *InstanceHardware { - s.RamSizeInGb = &v +// SetTlsCertificateSummaries sets the TlsCertificateSummaries field's value. +func (s *LoadBalancer) SetTlsCertificateSummaries(v []*LoadBalancerTlsCertificateSummary) *LoadBalancer { + s.TlsCertificateSummaries = v return s } -// Describes information about the health of the instance. -type InstanceHealthSummary struct { +// Describes a load balancer SSL/TLS certificate. +// +// TLS is just an updated, more secure version of Secure Socket Layer (SSL). +type LoadBalancerTlsCertificate struct { _ struct{} `type:"structure"` - // Describes the overall instance health. Valid values are below. - InstanceHealth *string `locationName:"instanceHealth" type:"string" enum:"InstanceHealthState"` + // The Amazon Resource Name (ARN) of the SSL/TLS certificate. + Arn *string `locationName:"arn" type:"string"` - // More information about the instance health. If the instanceHealth is healthy, - // then an instanceHealthReason value is not provided. - // - // If instanceHealth is initial, the instanceHealthReason value can be one of - // the following: - // - // * Lb.RegistrationInProgress - The target instance is in the process of - // being registered with the load balancer. - // - // * Lb.InitialHealthChecking - The Lightsail load balancer is still sending - // the target instance the minimum number of health checks required to determine - // its health status. - // - // If instanceHealth is unhealthy, the instanceHealthReason value can be one - // of the following: - // - // * Instance.ResponseCodeMismatch - The health checks did not return an - // expected HTTP code. + // The time when you created your SSL/TLS certificate. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` + + // The domain name for your SSL/TLS certificate. + DomainName *string `locationName:"domainName" type:"string"` + + // An array of LoadBalancerTlsCertificateDomainValidationRecord objects describing + // the records. + DomainValidationRecords []*LoadBalancerTlsCertificateDomainValidationRecord `locationName:"domainValidationRecords" type:"list"` + + // The reason for the SSL/TLS certificate validation failure. + FailureReason *string `locationName:"failureReason" type:"string" enum:"LoadBalancerTlsCertificateFailureReason"` + + // When true, the SSL/TLS certificate is attached to the Lightsail load balancer. + IsAttached *bool `locationName:"isAttached" type:"boolean"` + + // The time when the SSL/TLS certificate was issued. + IssuedAt *time.Time `locationName:"issuedAt" type:"timestamp"` + + // The issuer of the certificate. + Issuer *string `locationName:"issuer" type:"string"` + + // The algorithm that was used to generate the key pair (the public and private + // key). + KeyAlgorithm *string `locationName:"keyAlgorithm" type:"string"` + + // The load balancer name where your SSL/TLS certificate is attached. + LoadBalancerName *string `locationName:"loadBalancerName" type:"string"` + + // The AWS Region and Availability Zone where you created your certificate. + Location *ResourceLocation `locationName:"location" type:"structure"` + + // The name of the SSL/TLS certificate (e.g., my-certificate). + Name *string `locationName:"name" type:"string"` + + // The timestamp when the SSL/TLS certificate expires. + NotAfter *time.Time `locationName:"notAfter" type:"timestamp"` + + // The timestamp when the SSL/TLS certificate is first valid. + NotBefore *time.Time `locationName:"notBefore" type:"timestamp"` + + // An object containing information about the status of Lightsail's managed + // renewal for the certificate. + RenewalSummary *LoadBalancerTlsCertificateRenewalSummary `locationName:"renewalSummary" type:"structure"` + + // The resource type (e.g., LoadBalancerTlsCertificate). // - // * Instance.Timeout - The health check requests timed out. + // * Instance - A Lightsail instance (a virtual private server) // - // * Instance.FailedHealthChecks - The health checks failed because the connection - // to the target instance timed out, the target instance response was malformed, - // or the target instance failed the health check for an unknown reason. + // * StaticIp - A static IP address // - // * Lb.InternalError - The health checks failed due to an internal error. + // * KeyPair - The key pair used to connect to a Lightsail instance // - // If instanceHealth is unused, the instanceHealthReason value can be one of - // the following: + // * InstanceSnapshot - A Lightsail instance snapshot // - // * Instance.NotRegistered - The target instance is not registered with - // the target group. + // * Domain - A DNS zone // - // * Instance.NotInUse - The target group is not used by any load balancer, - // or the target instance is in an Availability Zone that is not enabled - // for its load balancer. + // * PeeredVpc - A peered VPC // - // * Instance.IpUnusable - The target IP address is reserved for use by a - // Lightsail load balancer. + // * LoadBalancer - A Lightsail load balancer // - // * Instance.InvalidState - The target is in the stopped or terminated state. + // * LoadBalancerTlsCertificate - An SSL/TLS certificate associated with + // a Lightsail load balancer // - // If instanceHealth is draining, the instanceHealthReason value can be one - // of the following: + // * Disk - A Lightsail block storage disk // - // * Instance.DeregistrationInProgress - The target instance is in the process - // of being deregistered and the deregistration delay period has not expired. - InstanceHealthReason *string `locationName:"instanceHealthReason" type:"string" enum:"InstanceHealthReason"` + // * DiskSnapshot - A block storage disk snapshot + ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - // The name of the Lightsail instance for which you are requesting health check - // data. - InstanceName *string `locationName:"instanceName" type:"string"` + // The reason the certificate was revoked. Valid values are below. + RevocationReason *string `locationName:"revocationReason" type:"string" enum:"LoadBalancerTlsCertificateRevocationReason"` + + // The timestamp when the SSL/TLS certificate was revoked. + RevokedAt *time.Time `locationName:"revokedAt" type:"timestamp"` + + // The serial number of the certificate. + Serial *string `locationName:"serial" type:"string"` + + // The algorithm that was used to sign the certificate. + SignatureAlgorithm *string `locationName:"signatureAlgorithm" type:"string"` + + // The status of the SSL/TLS certificate. Valid values are below. + Status *string `locationName:"status" type:"string" enum:"LoadBalancerTlsCertificateStatus"` + + // The name of the entity that is associated with the public key contained in + // the certificate. + Subject *string `locationName:"subject" type:"string"` + + // One or more domains or subdomains included in the certificate. This list + // contains the domain names that are bound to the public key that is contained + // in the certificate. The subject alternative names include the canonical domain + // name (CNAME) of the certificate and additional domain names that can be used + // to connect to the website, such as example.com, www.example.com, or m.example.com. + SubjectAlternativeNames []*string `locationName:"subjectAlternativeNames" type:"list"` + + // The support code. Include this code in your email to support when you have + // questions about your Lightsail load balancer or SSL/TLS certificate. This + // code enables our support team to look up your Lightsail information more + // easily. + SupportCode *string `locationName:"supportCode" type:"string"` + + // The tag keys and optional values for the resource. For more information about + // tags in Lightsail, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-tags). + Tags []*Tag `locationName:"tags" type:"list"` } // String returns the string representation -func (s InstanceHealthSummary) String() string { +func (s LoadBalancerTlsCertificate) String() string { return awsutil.Prettify(s) } -// GoString returns the string representation -func (s InstanceHealthSummary) GoString() string { - return s.String() +// GoString returns the string representation +func (s LoadBalancerTlsCertificate) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *LoadBalancerTlsCertificate) SetArn(v string) *LoadBalancerTlsCertificate { + s.Arn = &v + return s +} + +// SetCreatedAt sets the CreatedAt field's value. +func (s *LoadBalancerTlsCertificate) SetCreatedAt(v time.Time) *LoadBalancerTlsCertificate { + s.CreatedAt = &v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *LoadBalancerTlsCertificate) SetDomainName(v string) *LoadBalancerTlsCertificate { + s.DomainName = &v + return s } -// SetInstanceHealth sets the InstanceHealth field's value. -func (s *InstanceHealthSummary) SetInstanceHealth(v string) *InstanceHealthSummary { - s.InstanceHealth = &v +// SetDomainValidationRecords sets the DomainValidationRecords field's value. +func (s *LoadBalancerTlsCertificate) SetDomainValidationRecords(v []*LoadBalancerTlsCertificateDomainValidationRecord) *LoadBalancerTlsCertificate { + s.DomainValidationRecords = v return s } -// SetInstanceHealthReason sets the InstanceHealthReason field's value. -func (s *InstanceHealthSummary) SetInstanceHealthReason(v string) *InstanceHealthSummary { - s.InstanceHealthReason = &v +// SetFailureReason sets the FailureReason field's value. +func (s *LoadBalancerTlsCertificate) SetFailureReason(v string) *LoadBalancerTlsCertificate { + s.FailureReason = &v return s } -// SetInstanceName sets the InstanceName field's value. -func (s *InstanceHealthSummary) SetInstanceName(v string) *InstanceHealthSummary { - s.InstanceName = &v +// SetIsAttached sets the IsAttached field's value. +func (s *LoadBalancerTlsCertificate) SetIsAttached(v bool) *LoadBalancerTlsCertificate { + s.IsAttached = &v return s } -// Describes monthly data transfer rates and port information for an instance. -type InstanceNetworking struct { - _ struct{} `type:"structure"` - - // The amount of data in GB allocated for monthly data transfers. - MonthlyTransfer *MonthlyTransfer `locationName:"monthlyTransfer" type:"structure"` - - // An array of key-value pairs containing information about the ports on the - // instance. - Ports []*InstancePortInfo `locationName:"ports" type:"list"` +// SetIssuedAt sets the IssuedAt field's value. +func (s *LoadBalancerTlsCertificate) SetIssuedAt(v time.Time) *LoadBalancerTlsCertificate { + s.IssuedAt = &v + return s } -// String returns the string representation -func (s InstanceNetworking) String() string { - return awsutil.Prettify(s) +// SetIssuer sets the Issuer field's value. +func (s *LoadBalancerTlsCertificate) SetIssuer(v string) *LoadBalancerTlsCertificate { + s.Issuer = &v + return s } -// GoString returns the string representation -func (s InstanceNetworking) GoString() string { - return s.String() +// SetKeyAlgorithm sets the KeyAlgorithm field's value. +func (s *LoadBalancerTlsCertificate) SetKeyAlgorithm(v string) *LoadBalancerTlsCertificate { + s.KeyAlgorithm = &v + return s } -// SetMonthlyTransfer sets the MonthlyTransfer field's value. -func (s *InstanceNetworking) SetMonthlyTransfer(v *MonthlyTransfer) *InstanceNetworking { - s.MonthlyTransfer = v +// SetLoadBalancerName sets the LoadBalancerName field's value. +func (s *LoadBalancerTlsCertificate) SetLoadBalancerName(v string) *LoadBalancerTlsCertificate { + s.LoadBalancerName = &v return s } -// SetPorts sets the Ports field's value. -func (s *InstanceNetworking) SetPorts(v []*InstancePortInfo) *InstanceNetworking { - s.Ports = v +// SetLocation sets the Location field's value. +func (s *LoadBalancerTlsCertificate) SetLocation(v *ResourceLocation) *LoadBalancerTlsCertificate { + s.Location = v return s } -// Describes information about the instance ports. -type InstancePortInfo struct { - _ struct{} `type:"structure"` - - // The access direction (inbound or outbound). - AccessDirection *string `locationName:"accessDirection" type:"string" enum:"AccessDirection"` +// SetName sets the Name field's value. +func (s *LoadBalancerTlsCertificate) SetName(v string) *LoadBalancerTlsCertificate { + s.Name = &v + return s +} - // The location from which access is allowed (e.g., Anywhere (0.0.0.0/0)). - AccessFrom *string `locationName:"accessFrom" type:"string"` +// SetNotAfter sets the NotAfter field's value. +func (s *LoadBalancerTlsCertificate) SetNotAfter(v time.Time) *LoadBalancerTlsCertificate { + s.NotAfter = &v + return s +} - // The type of access (Public or Private). - AccessType *string `locationName:"accessType" type:"string" enum:"PortAccessType"` +// SetNotBefore sets the NotBefore field's value. +func (s *LoadBalancerTlsCertificate) SetNotBefore(v time.Time) *LoadBalancerTlsCertificate { + s.NotBefore = &v + return s +} - // The common name. - CommonName *string `locationName:"commonName" type:"string"` +// SetRenewalSummary sets the RenewalSummary field's value. +func (s *LoadBalancerTlsCertificate) SetRenewalSummary(v *LoadBalancerTlsCertificateRenewalSummary) *LoadBalancerTlsCertificate { + s.RenewalSummary = v + return s +} - // The first port in the range. - FromPort *int64 `locationName:"fromPort" type:"integer"` +// SetResourceType sets the ResourceType field's value. +func (s *LoadBalancerTlsCertificate) SetResourceType(v string) *LoadBalancerTlsCertificate { + s.ResourceType = &v + return s +} - // The protocol being used. Can be one of the following. - // - // * tcp - Transmission Control Protocol (TCP) provides reliable, ordered, - // and error-checked delivery of streamed data between applications running - // on hosts communicating by an IP network. If you have an application that - // doesn't require reliable data stream service, use UDP instead. - // - // * all - All transport layer protocol types. For more general information, - // see Transport layer (https://en.wikipedia.org/wiki/Transport_layer) on - // Wikipedia. - // - // * udp - With User Datagram Protocol (UDP), computer applications can send - // messages (or datagrams) to other hosts on an Internet Protocol (IP) network. - // Prior communications are not required to set up transmission channels - // or data paths. Applications that don't require reliable data stream service - // can use UDP, which provides a connectionless datagram service that emphasizes - // reduced latency over reliability. If you do require reliable data stream - // service, use TCP instead. - Protocol *string `locationName:"protocol" type:"string" enum:"NetworkProtocol"` +// SetRevocationReason sets the RevocationReason field's value. +func (s *LoadBalancerTlsCertificate) SetRevocationReason(v string) *LoadBalancerTlsCertificate { + s.RevocationReason = &v + return s +} - // The last port in the range. - ToPort *int64 `locationName:"toPort" type:"integer"` +// SetRevokedAt sets the RevokedAt field's value. +func (s *LoadBalancerTlsCertificate) SetRevokedAt(v time.Time) *LoadBalancerTlsCertificate { + s.RevokedAt = &v + return s } -// String returns the string representation -func (s InstancePortInfo) String() string { - return awsutil.Prettify(s) +// SetSerial sets the Serial field's value. +func (s *LoadBalancerTlsCertificate) SetSerial(v string) *LoadBalancerTlsCertificate { + s.Serial = &v + return s } -// GoString returns the string representation -func (s InstancePortInfo) GoString() string { - return s.String() +// SetSignatureAlgorithm sets the SignatureAlgorithm field's value. +func (s *LoadBalancerTlsCertificate) SetSignatureAlgorithm(v string) *LoadBalancerTlsCertificate { + s.SignatureAlgorithm = &v + return s } -// SetAccessDirection sets the AccessDirection field's value. -func (s *InstancePortInfo) SetAccessDirection(v string) *InstancePortInfo { - s.AccessDirection = &v +// SetStatus sets the Status field's value. +func (s *LoadBalancerTlsCertificate) SetStatus(v string) *LoadBalancerTlsCertificate { + s.Status = &v return s } -// SetAccessFrom sets the AccessFrom field's value. -func (s *InstancePortInfo) SetAccessFrom(v string) *InstancePortInfo { - s.AccessFrom = &v +// SetSubject sets the Subject field's value. +func (s *LoadBalancerTlsCertificate) SetSubject(v string) *LoadBalancerTlsCertificate { + s.Subject = &v return s } -// SetAccessType sets the AccessType field's value. -func (s *InstancePortInfo) SetAccessType(v string) *InstancePortInfo { - s.AccessType = &v +// SetSubjectAlternativeNames sets the SubjectAlternativeNames field's value. +func (s *LoadBalancerTlsCertificate) SetSubjectAlternativeNames(v []*string) *LoadBalancerTlsCertificate { + s.SubjectAlternativeNames = v return s } -// SetCommonName sets the CommonName field's value. -func (s *InstancePortInfo) SetCommonName(v string) *InstancePortInfo { - s.CommonName = &v +// SetSupportCode sets the SupportCode field's value. +func (s *LoadBalancerTlsCertificate) SetSupportCode(v string) *LoadBalancerTlsCertificate { + s.SupportCode = &v return s } -// SetFromPort sets the FromPort field's value. -func (s *InstancePortInfo) SetFromPort(v int64) *InstancePortInfo { - s.FromPort = &v +// SetTags sets the Tags field's value. +func (s *LoadBalancerTlsCertificate) SetTags(v []*Tag) *LoadBalancerTlsCertificate { + s.Tags = v return s } -// SetProtocol sets the Protocol field's value. -func (s *InstancePortInfo) SetProtocol(v string) *InstancePortInfo { - s.Protocol = &v +// Contains information about the domain names on an SSL/TLS certificate that +// you will use to validate domain ownership. +type LoadBalancerTlsCertificateDomainValidationOption struct { + _ struct{} `type:"structure"` + + // The fully qualified domain name in the certificate request. + DomainName *string `locationName:"domainName" type:"string"` + + // The status of the domain validation. Valid values are listed below. + ValidationStatus *string `locationName:"validationStatus" type:"string" enum:"LoadBalancerTlsCertificateDomainStatus"` +} + +// String returns the string representation +func (s LoadBalancerTlsCertificateDomainValidationOption) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LoadBalancerTlsCertificateDomainValidationOption) GoString() string { + return s.String() +} + +// SetDomainName sets the DomainName field's value. +func (s *LoadBalancerTlsCertificateDomainValidationOption) SetDomainName(v string) *LoadBalancerTlsCertificateDomainValidationOption { + s.DomainName = &v return s } -// SetToPort sets the ToPort field's value. -func (s *InstancePortInfo) SetToPort(v int64) *InstancePortInfo { - s.ToPort = &v +// SetValidationStatus sets the ValidationStatus field's value. +func (s *LoadBalancerTlsCertificateDomainValidationOption) SetValidationStatus(v string) *LoadBalancerTlsCertificateDomainValidationOption { + s.ValidationStatus = &v return s } -// Describes the port state. -type InstancePortState struct { +// Describes the validation record of each domain name in the SSL/TLS certificate. +type LoadBalancerTlsCertificateDomainValidationRecord struct { _ struct{} `type:"structure"` - // The first port in the range. - FromPort *int64 `locationName:"fromPort" type:"integer"` + // The domain name against which your SSL/TLS certificate was validated. + DomainName *string `locationName:"domainName" type:"string"` - // The protocol being used. Can be one of the following. - // - // * tcp - Transmission Control Protocol (TCP) provides reliable, ordered, - // and error-checked delivery of streamed data between applications running - // on hosts communicating by an IP network. If you have an application that - // doesn't require reliable data stream service, use UDP instead. - // - // * all - All transport layer protocol types. For more general information, - // see Transport layer (https://en.wikipedia.org/wiki/Transport_layer) on - // Wikipedia. - // - // * udp - With User Datagram Protocol (UDP), computer applications can send - // messages (or datagrams) to other hosts on an Internet Protocol (IP) network. - // Prior communications are not required to set up transmission channels - // or data paths. Applications that don't require reliable data stream service - // can use UDP, which provides a connectionless datagram service that emphasizes - // reduced latency over reliability. If you do require reliable data stream - // service, use TCP instead. - Protocol *string `locationName:"protocol" type:"string" enum:"NetworkProtocol"` + // A fully qualified domain name in the certificate. For example, example.com. + Name *string `locationName:"name" type:"string"` - // Specifies whether the instance port is open or closed. - State *string `locationName:"state" type:"string" enum:"PortState"` + // The type of validation record. For example, CNAME for domain validation. + Type *string `locationName:"type" type:"string"` - // The last port in the range. - ToPort *int64 `locationName:"toPort" type:"integer"` + // The validation status. Valid values are listed below. + ValidationStatus *string `locationName:"validationStatus" type:"string" enum:"LoadBalancerTlsCertificateDomainStatus"` + + // The value for that type. + Value *string `locationName:"value" type:"string"` } // String returns the string representation -func (s InstancePortState) String() string { +func (s LoadBalancerTlsCertificateDomainValidationRecord) String() string { return awsutil.Prettify(s) } -// GoString returns the string representation -func (s InstancePortState) GoString() string { - return s.String() +// GoString returns the string representation +func (s LoadBalancerTlsCertificateDomainValidationRecord) GoString() string { + return s.String() +} + +// SetDomainName sets the DomainName field's value. +func (s *LoadBalancerTlsCertificateDomainValidationRecord) SetDomainName(v string) *LoadBalancerTlsCertificateDomainValidationRecord { + s.DomainName = &v + return s } -// SetFromPort sets the FromPort field's value. -func (s *InstancePortState) SetFromPort(v int64) *InstancePortState { - s.FromPort = &v +// SetName sets the Name field's value. +func (s *LoadBalancerTlsCertificateDomainValidationRecord) SetName(v string) *LoadBalancerTlsCertificateDomainValidationRecord { + s.Name = &v return s } -// SetProtocol sets the Protocol field's value. -func (s *InstancePortState) SetProtocol(v string) *InstancePortState { - s.Protocol = &v +// SetType sets the Type field's value. +func (s *LoadBalancerTlsCertificateDomainValidationRecord) SetType(v string) *LoadBalancerTlsCertificateDomainValidationRecord { + s.Type = &v return s } -// SetState sets the State field's value. -func (s *InstancePortState) SetState(v string) *InstancePortState { - s.State = &v +// SetValidationStatus sets the ValidationStatus field's value. +func (s *LoadBalancerTlsCertificateDomainValidationRecord) SetValidationStatus(v string) *LoadBalancerTlsCertificateDomainValidationRecord { + s.ValidationStatus = &v return s } -// SetToPort sets the ToPort field's value. -func (s *InstancePortState) SetToPort(v int64) *InstancePortState { - s.ToPort = &v +// SetValue sets the Value field's value. +func (s *LoadBalancerTlsCertificateDomainValidationRecord) SetValue(v string) *LoadBalancerTlsCertificateDomainValidationRecord { + s.Value = &v return s } -// Describes the snapshot of the virtual private server, or instance. -type InstanceSnapshot struct { +// Contains information about the status of Lightsail's managed renewal for +// the certificate. +type LoadBalancerTlsCertificateRenewalSummary struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the snapshot (e.g., arn:aws:lightsail:us-east-2:123456789101:InstanceSnapshot/d23b5706-3322-4d83-81e5-12345EXAMPLE). - Arn *string `locationName:"arn" type:"string"` + // Contains information about the validation of each domain name in the certificate, + // as it pertains to Lightsail's managed renewal. This is different from the + // initial validation that occurs as a result of the RequestCertificate request. + DomainValidationOptions []*LoadBalancerTlsCertificateDomainValidationOption `locationName:"domainValidationOptions" type:"list"` - // The timestamp when the snapshot was created (e.g., 1479907467.024). - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` + // The status of Lightsail's managed renewal of the certificate. Valid values + // are listed below. + RenewalStatus *string `locationName:"renewalStatus" type:"string" enum:"LoadBalancerTlsCertificateRenewalStatus"` +} - // An array of disk objects containing information about all block storage disks. - FromAttachedDisks []*Disk `locationName:"fromAttachedDisks" type:"list"` +// String returns the string representation +func (s LoadBalancerTlsCertificateRenewalSummary) String() string { + return awsutil.Prettify(s) +} - // The blueprint ID from which you created the snapshot (e.g., os_debian_8_3). - // A blueprint is a virtual private server (or instance) image used to create - // instances quickly. - FromBlueprintId *string `locationName:"fromBlueprintId" type:"string"` +// GoString returns the string representation +func (s LoadBalancerTlsCertificateRenewalSummary) GoString() string { + return s.String() +} - // The bundle ID from which you created the snapshot (e.g., micro_1_0). - FromBundleId *string `locationName:"fromBundleId" type:"string"` +// SetDomainValidationOptions sets the DomainValidationOptions field's value. +func (s *LoadBalancerTlsCertificateRenewalSummary) SetDomainValidationOptions(v []*LoadBalancerTlsCertificateDomainValidationOption) *LoadBalancerTlsCertificateRenewalSummary { + s.DomainValidationOptions = v + return s +} - // The Amazon Resource Name (ARN) of the instance from which the snapshot was - // created (e.g., arn:aws:lightsail:us-east-2:123456789101:Instance/64b8404c-ccb1-430b-8daf-12345EXAMPLE). - FromInstanceArn *string `locationName:"fromInstanceArn" type:"string"` +// SetRenewalStatus sets the RenewalStatus field's value. +func (s *LoadBalancerTlsCertificateRenewalSummary) SetRenewalStatus(v string) *LoadBalancerTlsCertificateRenewalSummary { + s.RenewalStatus = &v + return s +} - // The instance from which the snapshot was created. - FromInstanceName *string `locationName:"fromInstanceName" type:"string"` +// Provides a summary of SSL/TLS certificate metadata. +type LoadBalancerTlsCertificateSummary struct { + _ struct{} `type:"structure"` - // The region name and availability zone where you created the snapshot. - Location *ResourceLocation `locationName:"location" type:"structure"` + // When true, the SSL/TLS certificate is attached to the Lightsail load balancer. + IsAttached *bool `locationName:"isAttached" type:"boolean"` - // The name of the snapshot. + // The name of the SSL/TLS certificate. Name *string `locationName:"name" type:"string"` +} - // The progress of the snapshot. - Progress *string `locationName:"progress" type:"string"` +// String returns the string representation +func (s LoadBalancerTlsCertificateSummary) String() string { + return awsutil.Prettify(s) +} - // The type of resource (usually InstanceSnapshot). - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` +// GoString returns the string representation +func (s LoadBalancerTlsCertificateSummary) GoString() string { + return s.String() +} - // The size in GB of the SSD. - SizeInGb *int64 `locationName:"sizeInGb" type:"integer"` +// SetIsAttached sets the IsAttached field's value. +func (s *LoadBalancerTlsCertificateSummary) SetIsAttached(v bool) *LoadBalancerTlsCertificateSummary { + s.IsAttached = &v + return s +} - // The state the snapshot is in. - State *string `locationName:"state" type:"string" enum:"InstanceSnapshotState"` +// SetName sets the Name field's value. +func (s *LoadBalancerTlsCertificateSummary) SetName(v string) *LoadBalancerTlsCertificateSummary { + s.Name = &v + return s +} - // The support code. Include this code in your email to support when you have - // questions about an instance or another resource in Lightsail. This code enables - // our support team to look up your Lightsail information more easily. - SupportCode *string `locationName:"supportCode" type:"string"` +// Describes a database log event. +type LogEvent struct { + _ struct{} `type:"structure"` + + // The timestamp when the database log event was created. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` + + // The message of the database log event. + Message *string `locationName:"message" type:"string"` } // String returns the string representation -func (s InstanceSnapshot) String() string { +func (s LogEvent) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s InstanceSnapshot) GoString() string { +func (s LogEvent) GoString() string { return s.String() } -// SetArn sets the Arn field's value. -func (s *InstanceSnapshot) SetArn(v string) *InstanceSnapshot { - s.Arn = &v - return s -} - // SetCreatedAt sets the CreatedAt field's value. -func (s *InstanceSnapshot) SetCreatedAt(v time.Time) *InstanceSnapshot { +func (s *LogEvent) SetCreatedAt(v time.Time) *LogEvent { s.CreatedAt = &v return s } -// SetFromAttachedDisks sets the FromAttachedDisks field's value. -func (s *InstanceSnapshot) SetFromAttachedDisks(v []*Disk) *InstanceSnapshot { - s.FromAttachedDisks = v +// SetMessage sets the Message field's value. +func (s *LogEvent) SetMessage(v string) *LogEvent { + s.Message = &v return s } -// SetFromBlueprintId sets the FromBlueprintId field's value. -func (s *InstanceSnapshot) SetFromBlueprintId(v string) *InstanceSnapshot { - s.FromBlueprintId = &v - return s -} +// Describes the metric data point. +type MetricDatapoint struct { + _ struct{} `type:"structure"` -// SetFromBundleId sets the FromBundleId field's value. -func (s *InstanceSnapshot) SetFromBundleId(v string) *InstanceSnapshot { - s.FromBundleId = &v - return s + // The average. + Average *float64 `locationName:"average" type:"double"` + + // The maximum. + Maximum *float64 `locationName:"maximum" type:"double"` + + // The minimum. + Minimum *float64 `locationName:"minimum" type:"double"` + + // The sample count. + SampleCount *float64 `locationName:"sampleCount" type:"double"` + + // The sum. + Sum *float64 `locationName:"sum" type:"double"` + + // The timestamp (e.g., 1479816991.349). + Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` + + // The unit. + Unit *string `locationName:"unit" type:"string" enum:"MetricUnit"` } -// SetFromInstanceArn sets the FromInstanceArn field's value. -func (s *InstanceSnapshot) SetFromInstanceArn(v string) *InstanceSnapshot { - s.FromInstanceArn = &v - return s +// String returns the string representation +func (s MetricDatapoint) String() string { + return awsutil.Prettify(s) } -// SetFromInstanceName sets the FromInstanceName field's value. -func (s *InstanceSnapshot) SetFromInstanceName(v string) *InstanceSnapshot { - s.FromInstanceName = &v - return s +// GoString returns the string representation +func (s MetricDatapoint) GoString() string { + return s.String() } -// SetLocation sets the Location field's value. -func (s *InstanceSnapshot) SetLocation(v *ResourceLocation) *InstanceSnapshot { - s.Location = v +// SetAverage sets the Average field's value. +func (s *MetricDatapoint) SetAverage(v float64) *MetricDatapoint { + s.Average = &v return s } -// SetName sets the Name field's value. -func (s *InstanceSnapshot) SetName(v string) *InstanceSnapshot { - s.Name = &v +// SetMaximum sets the Maximum field's value. +func (s *MetricDatapoint) SetMaximum(v float64) *MetricDatapoint { + s.Maximum = &v return s } -// SetProgress sets the Progress field's value. -func (s *InstanceSnapshot) SetProgress(v string) *InstanceSnapshot { - s.Progress = &v +// SetMinimum sets the Minimum field's value. +func (s *MetricDatapoint) SetMinimum(v float64) *MetricDatapoint { + s.Minimum = &v return s } -// SetResourceType sets the ResourceType field's value. -func (s *InstanceSnapshot) SetResourceType(v string) *InstanceSnapshot { - s.ResourceType = &v +// SetSampleCount sets the SampleCount field's value. +func (s *MetricDatapoint) SetSampleCount(v float64) *MetricDatapoint { + s.SampleCount = &v return s } -// SetSizeInGb sets the SizeInGb field's value. -func (s *InstanceSnapshot) SetSizeInGb(v int64) *InstanceSnapshot { - s.SizeInGb = &v +// SetSum sets the Sum field's value. +func (s *MetricDatapoint) SetSum(v float64) *MetricDatapoint { + s.Sum = &v return s } -// SetState sets the State field's value. -func (s *InstanceSnapshot) SetState(v string) *InstanceSnapshot { - s.State = &v +// SetTimestamp sets the Timestamp field's value. +func (s *MetricDatapoint) SetTimestamp(v time.Time) *MetricDatapoint { + s.Timestamp = &v return s } -// SetSupportCode sets the SupportCode field's value. -func (s *InstanceSnapshot) SetSupportCode(v string) *InstanceSnapshot { - s.SupportCode = &v +// SetUnit sets the Unit field's value. +func (s *MetricDatapoint) SetUnit(v string) *MetricDatapoint { + s.Unit = &v return s } -// Describes the virtual private server (or instance) status. -type InstanceState struct { +// Describes the monthly data transfer in and out of your virtual private server +// (or instance). +type MonthlyTransfer struct { _ struct{} `type:"structure"` - // The status code for the instance. - Code *int64 `locationName:"code" type:"integer"` - - // The state of the instance (e.g., running or pending). - Name *string `locationName:"name" type:"string"` + // The amount allocated per month (in GB). + GbPerMonthAllocated *int64 `locationName:"gbPerMonthAllocated" type:"integer"` } // String returns the string representation -func (s InstanceState) String() string { +func (s MonthlyTransfer) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s InstanceState) GoString() string { +func (s MonthlyTransfer) GoString() string { return s.String() } -// SetCode sets the Code field's value. -func (s *InstanceState) SetCode(v int64) *InstanceState { - s.Code = &v +// SetGbPerMonthAllocated sets the GbPerMonthAllocated field's value. +func (s *MonthlyTransfer) SetGbPerMonthAllocated(v int64) *MonthlyTransfer { + s.GbPerMonthAllocated = &v return s } -// SetName sets the Name field's value. -func (s *InstanceState) SetName(v string) *InstanceState { - s.Name = &v - return s -} +type OpenInstancePublicPortsInput struct { + _ struct{} `type:"structure"` + + // The name of the instance for which you want to open the public ports. + // + // InstanceName is a required field + InstanceName *string `locationName:"instanceName" type:"string" required:"true"` -type IsVpcPeeredInput struct { - _ struct{} `type:"structure"` + // An array of key-value pairs containing information about the port mappings. + // + // PortInfo is a required field + PortInfo *PortInfo `locationName:"portInfo" type:"structure" required:"true"` } // String returns the string representation -func (s IsVpcPeeredInput) String() string { +func (s OpenInstancePublicPortsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s IsVpcPeeredInput) GoString() string { +func (s OpenInstancePublicPortsInput) GoString() string { return s.String() } -type IsVpcPeeredOutput struct { +// Validate inspects the fields of the type to determine if they are valid. +func (s *OpenInstancePublicPortsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OpenInstancePublicPortsInput"} + if s.InstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceName")) + } + if s.PortInfo == nil { + invalidParams.Add(request.NewErrParamRequired("PortInfo")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetInstanceName sets the InstanceName field's value. +func (s *OpenInstancePublicPortsInput) SetInstanceName(v string) *OpenInstancePublicPortsInput { + s.InstanceName = &v + return s +} + +// SetPortInfo sets the PortInfo field's value. +func (s *OpenInstancePublicPortsInput) SetPortInfo(v *PortInfo) *OpenInstancePublicPortsInput { + s.PortInfo = v + return s +} + +type OpenInstancePublicPortsOutput struct { _ struct{} `type:"structure"` - // Returns true if the Lightsail VPC is peered; otherwise, false. - IsPeered *bool `locationName:"isPeered" type:"boolean"` + // An array of key-value pairs containing information about the request operation. + Operation *Operation `locationName:"operation" type:"structure"` } // String returns the string representation -func (s IsVpcPeeredOutput) String() string { +func (s OpenInstancePublicPortsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s IsVpcPeeredOutput) GoString() string { +func (s OpenInstancePublicPortsOutput) GoString() string { return s.String() } -// SetIsPeered sets the IsPeered field's value. -func (s *IsVpcPeeredOutput) SetIsPeered(v bool) *IsVpcPeeredOutput { - s.IsPeered = &v +// SetOperation sets the Operation field's value. +func (s *OpenInstancePublicPortsOutput) SetOperation(v *Operation) *OpenInstancePublicPortsOutput { + s.Operation = v return s } -// Describes the SSH key pair. -type KeyPair struct { +// Describes the API operation. +type Operation struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the key pair (e.g., arn:aws:lightsail:us-east-2:123456789101:KeyPair/05859e3d-331d-48ba-9034-12345EXAMPLE). - Arn *string `locationName:"arn" type:"string"` - - // The timestamp when the key pair was created (e.g., 1479816991.349). + // The timestamp when the operation was initialized (e.g., 1479816991.349). CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - // The RSA fingerprint of the key pair. - Fingerprint *string `locationName:"fingerprint" type:"string"` + // The error code. + ErrorCode *string `locationName:"errorCode" type:"string"` - // The region name and Availability Zone where the key pair was created. + // The error details. + ErrorDetails *string `locationName:"errorDetails" type:"string"` + + // The ID of the operation. + Id *string `locationName:"id" type:"string"` + + // A Boolean value indicating whether the operation is terminal. + IsTerminal *bool `locationName:"isTerminal" type:"boolean"` + + // The region and Availability Zone. Location *ResourceLocation `locationName:"location" type:"structure"` - // The friendly name of the SSH key pair. - Name *string `locationName:"name" type:"string"` + // Details about the operation (e.g., Debian-1GB-Ohio-1). + OperationDetails *string `locationName:"operationDetails" type:"string"` - // The resource type (usually KeyPair). + // The type of operation. + OperationType *string `locationName:"operationType" type:"string" enum:"OperationType"` + + // The resource name. + ResourceName *string `locationName:"resourceName" type:"string"` + + // The resource type. ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - // The support code. Include this code in your email to support when you have - // questions about an instance or another resource in Lightsail. This code enables - // our support team to look up your Lightsail information more easily. - SupportCode *string `locationName:"supportCode" type:"string"` + // The status of the operation. + Status *string `locationName:"status" type:"string" enum:"OperationStatus"` + + // The timestamp when the status was changed (e.g., 1479816991.349). + StatusChangedAt *time.Time `locationName:"statusChangedAt" type:"timestamp"` } // String returns the string representation -func (s KeyPair) String() string { +func (s Operation) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s KeyPair) GoString() string { +func (s Operation) GoString() string { return s.String() } -// SetArn sets the Arn field's value. -func (s *KeyPair) SetArn(v string) *KeyPair { - s.Arn = &v - return s -} - // SetCreatedAt sets the CreatedAt field's value. -func (s *KeyPair) SetCreatedAt(v time.Time) *KeyPair { +func (s *Operation) SetCreatedAt(v time.Time) *Operation { s.CreatedAt = &v return s } -// SetFingerprint sets the Fingerprint field's value. -func (s *KeyPair) SetFingerprint(v string) *KeyPair { - s.Fingerprint = &v +// SetErrorCode sets the ErrorCode field's value. +func (s *Operation) SetErrorCode(v string) *Operation { + s.ErrorCode = &v return s } -// SetLocation sets the Location field's value. -func (s *KeyPair) SetLocation(v *ResourceLocation) *KeyPair { - s.Location = v +// SetErrorDetails sets the ErrorDetails field's value. +func (s *Operation) SetErrorDetails(v string) *Operation { + s.ErrorDetails = &v return s } -// SetName sets the Name field's value. -func (s *KeyPair) SetName(v string) *KeyPair { - s.Name = &v +// SetId sets the Id field's value. +func (s *Operation) SetId(v string) *Operation { + s.Id = &v return s } -// SetResourceType sets the ResourceType field's value. -func (s *KeyPair) SetResourceType(v string) *KeyPair { - s.ResourceType = &v +// SetIsTerminal sets the IsTerminal field's value. +func (s *Operation) SetIsTerminal(v bool) *Operation { + s.IsTerminal = &v return s } -// SetSupportCode sets the SupportCode field's value. -func (s *KeyPair) SetSupportCode(v string) *KeyPair { - s.SupportCode = &v +// SetLocation sets the Location field's value. +func (s *Operation) SetLocation(v *ResourceLocation) *Operation { + s.Location = v return s } -// Describes the Lightsail load balancer. -type LoadBalancer struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the load balancer. - Arn *string `locationName:"arn" type:"string"` - - // A string to string map of the configuration options for your load balancer. - // Valid values are listed below. - ConfigurationOptions map[string]*string `locationName:"configurationOptions" type:"map"` +// SetOperationDetails sets the OperationDetails field's value. +func (s *Operation) SetOperationDetails(v string) *Operation { + s.OperationDetails = &v + return s +} - // The date when your load balancer was created. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` +// SetOperationType sets the OperationType field's value. +func (s *Operation) SetOperationType(v string) *Operation { + s.OperationType = &v + return s +} - // The DNS name of your Lightsail load balancer. - DnsName *string `locationName:"dnsName" type:"string"` +// SetResourceName sets the ResourceName field's value. +func (s *Operation) SetResourceName(v string) *Operation { + s.ResourceName = &v + return s +} - // The path you specified to perform your health checks. If no path is specified, - // the load balancer tries to make a request to the default (root) page. - HealthCheckPath *string `locationName:"healthCheckPath" type:"string"` +// SetResourceType sets the ResourceType field's value. +func (s *Operation) SetResourceType(v string) *Operation { + s.ResourceType = &v + return s +} - // An array of InstanceHealthSummary objects describing the health of the load - // balancer. - InstanceHealthSummary []*InstanceHealthSummary `locationName:"instanceHealthSummary" type:"list"` +// SetStatus sets the Status field's value. +func (s *Operation) SetStatus(v string) *Operation { + s.Status = &v + return s +} - // The port where the load balancer will direct traffic to your Lightsail instances. - // For HTTP traffic, it's port 80. For HTTPS traffic, it's port 443. - InstancePort *int64 `locationName:"instancePort" type:"integer"` +// SetStatusChangedAt sets the StatusChangedAt field's value. +func (s *Operation) SetStatusChangedAt(v time.Time) *Operation { + s.StatusChangedAt = &v + return s +} - // The AWS Region where your load balancer was created (e.g., us-east-2a). Lightsail - // automatically creates your load balancer across Availability Zones. - Location *ResourceLocation `locationName:"location" type:"structure"` +// The password data for the Windows Server-based instance, including the ciphertext +// and the key pair name. +type PasswordData struct { + _ struct{} `type:"structure"` - // The name of the load balancer (e.g., my-load-balancer). - Name *string `locationName:"name" type:"string"` + // The encrypted password. Ciphertext will be an empty string if access to your + // new instance is not ready yet. When you create an instance, it can take up + // to 15 minutes for the instance to be ready. + // + // If you use the default key pair (LightsailDefaultKeyPair), the decrypted + // password will be available in the password field. + // + // If you are using a custom key pair, you need to use your own means of decryption. + // + // If you change the Administrator password on the instance, Lightsail will + // continue to return the original ciphertext value. When accessing the instance + // using RDP, you need to manually enter the Administrator password after changing + // it from the default. + Ciphertext *string `locationName:"ciphertext" type:"string"` - // The protocol you have enabled for your load balancer. Valid values are below. + // The name of the key pair that you used when creating your instance. If no + // key pair name was specified when creating the instance, Lightsail uses the + // default key pair (LightsailDefaultKeyPair). // - // You can't just have HTTP_HTTPS, but you can have just HTTP. - Protocol *string `locationName:"protocol" type:"string" enum:"LoadBalancerProtocol"` + // If you are using a custom key pair, you need to use your own means of decrypting + // your password using the ciphertext. Lightsail creates the ciphertext by encrypting + // your password with the public key part of this key pair. + KeyPairName *string `locationName:"keyPairName" type:"string"` +} - // An array of public port settings for your load balancer. For HTTP, use port - // 80. For HTTPS, use port 443. - PublicPorts []*int64 `locationName:"publicPorts" type:"list"` +// String returns the string representation +func (s PasswordData) String() string { + return awsutil.Prettify(s) +} - // The resource type (e.g., LoadBalancer. - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` +// GoString returns the string representation +func (s PasswordData) GoString() string { + return s.String() +} - // The status of your load balancer. Valid values are below. - State *string `locationName:"state" type:"string" enum:"LoadBalancerState"` +// SetCiphertext sets the Ciphertext field's value. +func (s *PasswordData) SetCiphertext(v string) *PasswordData { + s.Ciphertext = &v + return s +} - // The support code. Include this code in your email to support when you have - // questions about your Lightsail load balancer. This code enables our support - // team to look up your Lightsail information more easily. - SupportCode *string `locationName:"supportCode" type:"string"` +// SetKeyPairName sets the KeyPairName field's value. +func (s *PasswordData) SetKeyPairName(v string) *PasswordData { + s.KeyPairName = &v + return s +} - // An array of LoadBalancerTlsCertificateSummary objects that provide additional - // information about the SSL/TLS certificates. For example, if true, the certificate - // is attached to the load balancer. - TlsCertificateSummaries []*LoadBalancerTlsCertificateSummary `locationName:"tlsCertificateSummaries" type:"list"` +type PeerVpcInput struct { + _ struct{} `type:"structure"` } // String returns the string representation -func (s LoadBalancer) String() string { +func (s PeerVpcInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LoadBalancer) GoString() string { +func (s PeerVpcInput) GoString() string { return s.String() } -// SetArn sets the Arn field's value. -func (s *LoadBalancer) SetArn(v string) *LoadBalancer { - s.Arn = &v - return s +type PeerVpcOutput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs containing information about the request operation. + Operation *Operation `locationName:"operation" type:"structure"` } -// SetConfigurationOptions sets the ConfigurationOptions field's value. -func (s *LoadBalancer) SetConfigurationOptions(v map[string]*string) *LoadBalancer { - s.ConfigurationOptions = v - return s +// String returns the string representation +func (s PeerVpcOutput) String() string { + return awsutil.Prettify(s) } -// SetCreatedAt sets the CreatedAt field's value. -func (s *LoadBalancer) SetCreatedAt(v time.Time) *LoadBalancer { - s.CreatedAt = &v - return s +// GoString returns the string representation +func (s PeerVpcOutput) GoString() string { + return s.String() } -// SetDnsName sets the DnsName field's value. -func (s *LoadBalancer) SetDnsName(v string) *LoadBalancer { - s.DnsName = &v +// SetOperation sets the Operation field's value. +func (s *PeerVpcOutput) SetOperation(v *Operation) *PeerVpcOutput { + s.Operation = v return s } -// SetHealthCheckPath sets the HealthCheckPath field's value. -func (s *LoadBalancer) SetHealthCheckPath(v string) *LoadBalancer { - s.HealthCheckPath = &v - return s +// Describes a pending database maintenance action. +type PendingMaintenanceAction struct { + _ struct{} `type:"structure"` + + // The type of pending database maintenance action. + Action *string `locationName:"action" type:"string"` + + // The effective date of the pending database maintenance action. + CurrentApplyDate *time.Time `locationName:"currentApplyDate" type:"timestamp"` + + // Additional detail about the pending database maintenance action. + Description *string `locationName:"description" type:"string"` } -// SetInstanceHealthSummary sets the InstanceHealthSummary field's value. -func (s *LoadBalancer) SetInstanceHealthSummary(v []*InstanceHealthSummary) *LoadBalancer { - s.InstanceHealthSummary = v - return s +// String returns the string representation +func (s PendingMaintenanceAction) String() string { + return awsutil.Prettify(s) } -// SetInstancePort sets the InstancePort field's value. -func (s *LoadBalancer) SetInstancePort(v int64) *LoadBalancer { - s.InstancePort = &v - return s +// GoString returns the string representation +func (s PendingMaintenanceAction) GoString() string { + return s.String() } -// SetLocation sets the Location field's value. -func (s *LoadBalancer) SetLocation(v *ResourceLocation) *LoadBalancer { - s.Location = v +// SetAction sets the Action field's value. +func (s *PendingMaintenanceAction) SetAction(v string) *PendingMaintenanceAction { + s.Action = &v return s } -// SetName sets the Name field's value. -func (s *LoadBalancer) SetName(v string) *LoadBalancer { - s.Name = &v +// SetCurrentApplyDate sets the CurrentApplyDate field's value. +func (s *PendingMaintenanceAction) SetCurrentApplyDate(v time.Time) *PendingMaintenanceAction { + s.CurrentApplyDate = &v return s } -// SetProtocol sets the Protocol field's value. -func (s *LoadBalancer) SetProtocol(v string) *LoadBalancer { - s.Protocol = &v +// SetDescription sets the Description field's value. +func (s *PendingMaintenanceAction) SetDescription(v string) *PendingMaintenanceAction { + s.Description = &v return s } -// SetPublicPorts sets the PublicPorts field's value. -func (s *LoadBalancer) SetPublicPorts(v []*int64) *LoadBalancer { - s.PublicPorts = v - return s +// Describes a pending database value modification. +type PendingModifiedRelationalDatabaseValues struct { + _ struct{} `type:"structure"` + + // A Boolean value indicating whether automated backup retention is enabled. + BackupRetentionEnabled *bool `locationName:"backupRetentionEnabled" type:"boolean"` + + // The database engine version. + EngineVersion *string `locationName:"engineVersion" type:"string"` + + // The password for the master user of the database. + MasterUserPassword *string `locationName:"masterUserPassword" type:"string"` } -// SetResourceType sets the ResourceType field's value. -func (s *LoadBalancer) SetResourceType(v string) *LoadBalancer { - s.ResourceType = &v - return s +// String returns the string representation +func (s PendingModifiedRelationalDatabaseValues) String() string { + return awsutil.Prettify(s) } -// SetState sets the State field's value. -func (s *LoadBalancer) SetState(v string) *LoadBalancer { - s.State = &v +// GoString returns the string representation +func (s PendingModifiedRelationalDatabaseValues) GoString() string { + return s.String() +} + +// SetBackupRetentionEnabled sets the BackupRetentionEnabled field's value. +func (s *PendingModifiedRelationalDatabaseValues) SetBackupRetentionEnabled(v bool) *PendingModifiedRelationalDatabaseValues { + s.BackupRetentionEnabled = &v return s } -// SetSupportCode sets the SupportCode field's value. -func (s *LoadBalancer) SetSupportCode(v string) *LoadBalancer { - s.SupportCode = &v +// SetEngineVersion sets the EngineVersion field's value. +func (s *PendingModifiedRelationalDatabaseValues) SetEngineVersion(v string) *PendingModifiedRelationalDatabaseValues { + s.EngineVersion = &v return s } -// SetTlsCertificateSummaries sets the TlsCertificateSummaries field's value. -func (s *LoadBalancer) SetTlsCertificateSummaries(v []*LoadBalancerTlsCertificateSummary) *LoadBalancer { - s.TlsCertificateSummaries = v +// SetMasterUserPassword sets the MasterUserPassword field's value. +func (s *PendingModifiedRelationalDatabaseValues) SetMasterUserPassword(v string) *PendingModifiedRelationalDatabaseValues { + s.MasterUserPassword = &v return s } -// Describes a load balancer SSL/TLS certificate. -// -// TLS is just an updated, more secure version of Secure Socket Layer (SSL). -type LoadBalancerTlsCertificate struct { +// Describes information about the ports on your virtual private server (or +// instance). +type PortInfo struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the SSL/TLS certificate. - Arn *string `locationName:"arn" type:"string"` + // The first port in the range. + FromPort *int64 `locationName:"fromPort" type:"integer"` - // The time when you created your SSL/TLS certificate. - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` + // The protocol. + Protocol *string `locationName:"protocol" type:"string" enum:"NetworkProtocol"` - // The domain name for your SSL/TLS certificate. - DomainName *string `locationName:"domainName" type:"string"` + // The last port in the range. + ToPort *int64 `locationName:"toPort" type:"integer"` +} - // An array of LoadBalancerTlsCertificateDomainValidationRecord objects describing - // the records. - DomainValidationRecords []*LoadBalancerTlsCertificateDomainValidationRecord `locationName:"domainValidationRecords" type:"list"` +// String returns the string representation +func (s PortInfo) String() string { + return awsutil.Prettify(s) +} - // The reason for the SSL/TLS certificate validation failure. - FailureReason *string `locationName:"failureReason" type:"string" enum:"LoadBalancerTlsCertificateFailureReason"` +// GoString returns the string representation +func (s PortInfo) GoString() string { + return s.String() +} - // When true, the SSL/TLS certificate is attached to the Lightsail load balancer. - IsAttached *bool `locationName:"isAttached" type:"boolean"` +// SetFromPort sets the FromPort field's value. +func (s *PortInfo) SetFromPort(v int64) *PortInfo { + s.FromPort = &v + return s +} - // The time when the SSL/TLS certificate was issued. - IssuedAt *time.Time `locationName:"issuedAt" type:"timestamp"` +// SetProtocol sets the Protocol field's value. +func (s *PortInfo) SetProtocol(v string) *PortInfo { + s.Protocol = &v + return s +} - // The issuer of the certificate. - Issuer *string `locationName:"issuer" type:"string"` +// SetToPort sets the ToPort field's value. +func (s *PortInfo) SetToPort(v int64) *PortInfo { + s.ToPort = &v + return s +} - // The algorithm that was used to generate the key pair (the public and private - // key). - KeyAlgorithm *string `locationName:"keyAlgorithm" type:"string"` +type PutInstancePublicPortsInput struct { + _ struct{} `type:"structure"` - // The load balancer name where your SSL/TLS certificate is attached. - LoadBalancerName *string `locationName:"loadBalancerName" type:"string"` + // The Lightsail instance name of the public port(s) you are setting. + // + // InstanceName is a required field + InstanceName *string `locationName:"instanceName" type:"string" required:"true"` - // The AWS Region and Availability Zone where you created your certificate. - Location *ResourceLocation `locationName:"location" type:"structure"` + // Specifies information about the public port(s). + // + // PortInfos is a required field + PortInfos []*PortInfo `locationName:"portInfos" type:"list" required:"true"` +} - // The name of the SSL/TLS certificate (e.g., my-certificate). - Name *string `locationName:"name" type:"string"` +// String returns the string representation +func (s PutInstancePublicPortsInput) String() string { + return awsutil.Prettify(s) +} - // The timestamp when the SSL/TLS certificate expires. - NotAfter *time.Time `locationName:"notAfter" type:"timestamp"` +// GoString returns the string representation +func (s PutInstancePublicPortsInput) GoString() string { + return s.String() +} - // The timestamp when the SSL/TLS certificate is first valid. - NotBefore *time.Time `locationName:"notBefore" type:"timestamp"` +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutInstancePublicPortsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutInstancePublicPortsInput"} + if s.InstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceName")) + } + if s.PortInfos == nil { + invalidParams.Add(request.NewErrParamRequired("PortInfos")) + } - // An object containing information about the status of Lightsail's managed - // renewal for the certificate. - RenewalSummary *LoadBalancerTlsCertificateRenewalSummary `locationName:"renewalSummary" type:"structure"` + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} - // The resource type (e.g., LoadBalancerTlsCertificate). - // - // * Instance - A Lightsail instance (a virtual private server) - // - // * StaticIp - A static IP address - // - // * KeyPair - The key pair used to connect to a Lightsail instance - // - // * InstanceSnapshot - A Lightsail instance snapshot - // - // * Domain - A DNS zone - // - // * PeeredVpc - A peered VPC - // - // * LoadBalancer - A Lightsail load balancer - // - // * LoadBalancerTlsCertificate - An SSL/TLS certificate associated with - // a Lightsail load balancer - // - // * Disk - A Lightsail block storage disk - // - // * DiskSnapshot - A block storage disk snapshot - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` +// SetInstanceName sets the InstanceName field's value. +func (s *PutInstancePublicPortsInput) SetInstanceName(v string) *PutInstancePublicPortsInput { + s.InstanceName = &v + return s +} - // The reason the certificate was revoked. Valid values are below. - RevocationReason *string `locationName:"revocationReason" type:"string" enum:"LoadBalancerTlsCertificateRevocationReason"` +// SetPortInfos sets the PortInfos field's value. +func (s *PutInstancePublicPortsInput) SetPortInfos(v []*PortInfo) *PutInstancePublicPortsInput { + s.PortInfos = v + return s +} - // The timestamp when the SSL/TLS certificate was revoked. - RevokedAt *time.Time `locationName:"revokedAt" type:"timestamp"` +type PutInstancePublicPortsOutput struct { + _ struct{} `type:"structure"` - // The serial number of the certificate. - Serial *string `locationName:"serial" type:"string"` + // Describes metadata about the operation you just executed. + Operation *Operation `locationName:"operation" type:"structure"` +} - // The algorithm that was used to sign the certificate. - SignatureAlgorithm *string `locationName:"signatureAlgorithm" type:"string"` +// String returns the string representation +func (s PutInstancePublicPortsOutput) String() string { + return awsutil.Prettify(s) +} - // The status of the SSL/TLS certificate. Valid values are below. - Status *string `locationName:"status" type:"string" enum:"LoadBalancerTlsCertificateStatus"` +// GoString returns the string representation +func (s PutInstancePublicPortsOutput) GoString() string { + return s.String() +} - // The name of the entity that is associated with the public key contained in - // the certificate. - Subject *string `locationName:"subject" type:"string"` +// SetOperation sets the Operation field's value. +func (s *PutInstancePublicPortsOutput) SetOperation(v *Operation) *PutInstancePublicPortsOutput { + s.Operation = v + return s +} - // One or more domains or subdomains included in the certificate. This list - // contains the domain names that are bound to the public key that is contained - // in the certificate. The subject alternative names include the canonical domain - // name (CNAME) of the certificate and additional domain names that can be used - // to connect to the website, such as example.com, www.example.com, or m.example.com. - SubjectAlternativeNames []*string `locationName:"subjectAlternativeNames" type:"list"` +type RebootInstanceInput struct { + _ struct{} `type:"structure"` - // The support code. Include this code in your email to support when you have - // questions about your Lightsail load balancer or SSL/TLS certificate. This - // code enables our support team to look up your Lightsail information more - // easily. - SupportCode *string `locationName:"supportCode" type:"string"` + // The name of the instance to reboot. + // + // InstanceName is a required field + InstanceName *string `locationName:"instanceName" type:"string" required:"true"` } // String returns the string representation -func (s LoadBalancerTlsCertificate) String() string { +func (s RebootInstanceInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LoadBalancerTlsCertificate) GoString() string { +func (s RebootInstanceInput) GoString() string { return s.String() } -// SetArn sets the Arn field's value. -func (s *LoadBalancerTlsCertificate) SetArn(v string) *LoadBalancerTlsCertificate { - s.Arn = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *RebootInstanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RebootInstanceInput"} + if s.InstanceName == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetCreatedAt sets the CreatedAt field's value. -func (s *LoadBalancerTlsCertificate) SetCreatedAt(v time.Time) *LoadBalancerTlsCertificate { - s.CreatedAt = &v +// SetInstanceName sets the InstanceName field's value. +func (s *RebootInstanceInput) SetInstanceName(v string) *RebootInstanceInput { + s.InstanceName = &v return s } -// SetDomainName sets the DomainName field's value. -func (s *LoadBalancerTlsCertificate) SetDomainName(v string) *LoadBalancerTlsCertificate { - s.DomainName = &v - return s +type RebootInstanceOutput struct { + _ struct{} `type:"structure"` + + // An array of key-value pairs containing information about the request operations. + Operations []*Operation `locationName:"operations" type:"list"` } -// SetDomainValidationRecords sets the DomainValidationRecords field's value. -func (s *LoadBalancerTlsCertificate) SetDomainValidationRecords(v []*LoadBalancerTlsCertificateDomainValidationRecord) *LoadBalancerTlsCertificate { - s.DomainValidationRecords = v - return s +// String returns the string representation +func (s RebootInstanceOutput) String() string { + return awsutil.Prettify(s) } -// SetFailureReason sets the FailureReason field's value. -func (s *LoadBalancerTlsCertificate) SetFailureReason(v string) *LoadBalancerTlsCertificate { - s.FailureReason = &v - return s +// GoString returns the string representation +func (s RebootInstanceOutput) GoString() string { + return s.String() } -// SetIsAttached sets the IsAttached field's value. -func (s *LoadBalancerTlsCertificate) SetIsAttached(v bool) *LoadBalancerTlsCertificate { - s.IsAttached = &v +// SetOperations sets the Operations field's value. +func (s *RebootInstanceOutput) SetOperations(v []*Operation) *RebootInstanceOutput { + s.Operations = v return s } -// SetIssuedAt sets the IssuedAt field's value. -func (s *LoadBalancerTlsCertificate) SetIssuedAt(v time.Time) *LoadBalancerTlsCertificate { - s.IssuedAt = &v - return s +type RebootRelationalDatabaseInput struct { + _ struct{} `type:"structure"` + + // The name of your database to reboot. + // + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` } -// SetIssuer sets the Issuer field's value. -func (s *LoadBalancerTlsCertificate) SetIssuer(v string) *LoadBalancerTlsCertificate { - s.Issuer = &v - return s +// String returns the string representation +func (s RebootRelationalDatabaseInput) String() string { + return awsutil.Prettify(s) } -// SetKeyAlgorithm sets the KeyAlgorithm field's value. -func (s *LoadBalancerTlsCertificate) SetKeyAlgorithm(v string) *LoadBalancerTlsCertificate { - s.KeyAlgorithm = &v - return s +// GoString returns the string representation +func (s RebootRelationalDatabaseInput) GoString() string { + return s.String() } -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *LoadBalancerTlsCertificate) SetLoadBalancerName(v string) *LoadBalancerTlsCertificate { - s.LoadBalancerName = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *RebootRelationalDatabaseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RebootRelationalDatabaseInput"} + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetLocation sets the Location field's value. -func (s *LoadBalancerTlsCertificate) SetLocation(v *ResourceLocation) *LoadBalancerTlsCertificate { - s.Location = v +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *RebootRelationalDatabaseInput) SetRelationalDatabaseName(v string) *RebootRelationalDatabaseInput { + s.RelationalDatabaseName = &v return s } -// SetName sets the Name field's value. -func (s *LoadBalancerTlsCertificate) SetName(v string) *LoadBalancerTlsCertificate { - s.Name = &v - return s +type RebootRelationalDatabaseOutput struct { + _ struct{} `type:"structure"` + + // An object describing the result of your reboot relational database request. + Operations []*Operation `locationName:"operations" type:"list"` } -// SetNotAfter sets the NotAfter field's value. -func (s *LoadBalancerTlsCertificate) SetNotAfter(v time.Time) *LoadBalancerTlsCertificate { - s.NotAfter = &v - return s +// String returns the string representation +func (s RebootRelationalDatabaseOutput) String() string { + return awsutil.Prettify(s) } -// SetNotBefore sets the NotBefore field's value. -func (s *LoadBalancerTlsCertificate) SetNotBefore(v time.Time) *LoadBalancerTlsCertificate { - s.NotBefore = &v - return s +// GoString returns the string representation +func (s RebootRelationalDatabaseOutput) GoString() string { + return s.String() } -// SetRenewalSummary sets the RenewalSummary field's value. -func (s *LoadBalancerTlsCertificate) SetRenewalSummary(v *LoadBalancerTlsCertificateRenewalSummary) *LoadBalancerTlsCertificate { - s.RenewalSummary = v +// SetOperations sets the Operations field's value. +func (s *RebootRelationalDatabaseOutput) SetOperations(v []*Operation) *RebootRelationalDatabaseOutput { + s.Operations = v return s } -// SetResourceType sets the ResourceType field's value. -func (s *LoadBalancerTlsCertificate) SetResourceType(v string) *LoadBalancerTlsCertificate { - s.ResourceType = &v - return s +// Describes the AWS Region. +type Region struct { + _ struct{} `type:"structure"` + + // The Availability Zones. Follows the format us-east-2a (case-sensitive). + AvailabilityZones []*AvailabilityZone `locationName:"availabilityZones" type:"list"` + + // The continent code (e.g., NA, meaning North America). + ContinentCode *string `locationName:"continentCode" type:"string"` + + // The description of the AWS Region (e.g., This region is recommended to serve + // users in the eastern United States and eastern Canada). + Description *string `locationName:"description" type:"string"` + + // The display name (e.g., Ohio). + DisplayName *string `locationName:"displayName" type:"string"` + + // The region name (e.g., us-east-2). + Name *string `locationName:"name" type:"string" enum:"RegionName"` + + // The Availability Zones for databases. Follows the format us-east-2a (case-sensitive). + RelationalDatabaseAvailabilityZones []*AvailabilityZone `locationName:"relationalDatabaseAvailabilityZones" type:"list"` } -// SetRevocationReason sets the RevocationReason field's value. -func (s *LoadBalancerTlsCertificate) SetRevocationReason(v string) *LoadBalancerTlsCertificate { - s.RevocationReason = &v - return s +// String returns the string representation +func (s Region) String() string { + return awsutil.Prettify(s) } -// SetRevokedAt sets the RevokedAt field's value. -func (s *LoadBalancerTlsCertificate) SetRevokedAt(v time.Time) *LoadBalancerTlsCertificate { - s.RevokedAt = &v - return s +// GoString returns the string representation +func (s Region) GoString() string { + return s.String() } -// SetSerial sets the Serial field's value. -func (s *LoadBalancerTlsCertificate) SetSerial(v string) *LoadBalancerTlsCertificate { - s.Serial = &v +// SetAvailabilityZones sets the AvailabilityZones field's value. +func (s *Region) SetAvailabilityZones(v []*AvailabilityZone) *Region { + s.AvailabilityZones = v return s } -// SetSignatureAlgorithm sets the SignatureAlgorithm field's value. -func (s *LoadBalancerTlsCertificate) SetSignatureAlgorithm(v string) *LoadBalancerTlsCertificate { - s.SignatureAlgorithm = &v +// SetContinentCode sets the ContinentCode field's value. +func (s *Region) SetContinentCode(v string) *Region { + s.ContinentCode = &v return s } -// SetStatus sets the Status field's value. -func (s *LoadBalancerTlsCertificate) SetStatus(v string) *LoadBalancerTlsCertificate { - s.Status = &v +// SetDescription sets the Description field's value. +func (s *Region) SetDescription(v string) *Region { + s.Description = &v return s } -// SetSubject sets the Subject field's value. -func (s *LoadBalancerTlsCertificate) SetSubject(v string) *LoadBalancerTlsCertificate { - s.Subject = &v +// SetDisplayName sets the DisplayName field's value. +func (s *Region) SetDisplayName(v string) *Region { + s.DisplayName = &v return s } -// SetSubjectAlternativeNames sets the SubjectAlternativeNames field's value. -func (s *LoadBalancerTlsCertificate) SetSubjectAlternativeNames(v []*string) *LoadBalancerTlsCertificate { - s.SubjectAlternativeNames = v +// SetName sets the Name field's value. +func (s *Region) SetName(v string) *Region { + s.Name = &v return s } -// SetSupportCode sets the SupportCode field's value. -func (s *LoadBalancerTlsCertificate) SetSupportCode(v string) *LoadBalancerTlsCertificate { - s.SupportCode = &v +// SetRelationalDatabaseAvailabilityZones sets the RelationalDatabaseAvailabilityZones field's value. +func (s *Region) SetRelationalDatabaseAvailabilityZones(v []*AvailabilityZone) *Region { + s.RelationalDatabaseAvailabilityZones = v return s } -// Contains information about the domain names on an SSL/TLS certificate that -// you will use to validate domain ownership. -type LoadBalancerTlsCertificateDomainValidationOption struct { +// Describes a database. +type RelationalDatabase struct { _ struct{} `type:"structure"` - // The fully qualified domain name in the certificate request. - DomainName *string `locationName:"domainName" type:"string"` + // The Amazon Resource Name (ARN) of the database. + Arn *string `locationName:"arn" type:"string"` - // The status of the domain validation. Valid values are listed below. - ValidationStatus *string `locationName:"validationStatus" type:"string" enum:"LoadBalancerTlsCertificateDomainStatus"` -} + // A Boolean value indicating whether automated backup retention is enabled + // for the database. + BackupRetentionEnabled *bool `locationName:"backupRetentionEnabled" type:"boolean"` -// String returns the string representation -func (s LoadBalancerTlsCertificateDomainValidationOption) String() string { - return awsutil.Prettify(s) -} + // The timestamp when the database was created. Formatted in Unix time. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` -// GoString returns the string representation -func (s LoadBalancerTlsCertificateDomainValidationOption) GoString() string { - return s.String() -} + // The database software (for example, MySQL). + Engine *string `locationName:"engine" type:"string"` -// SetDomainName sets the DomainName field's value. -func (s *LoadBalancerTlsCertificateDomainValidationOption) SetDomainName(v string) *LoadBalancerTlsCertificateDomainValidationOption { - s.DomainName = &v - return s -} + // The database engine version (for example, 5.7.23). + EngineVersion *string `locationName:"engineVersion" type:"string"` -// SetValidationStatus sets the ValidationStatus field's value. -func (s *LoadBalancerTlsCertificateDomainValidationOption) SetValidationStatus(v string) *LoadBalancerTlsCertificateDomainValidationOption { - s.ValidationStatus = &v - return s -} + // Describes the hardware of the database. + Hardware *RelationalDatabaseHardware `locationName:"hardware" type:"structure"` -// Describes the validation record of each domain name in the SSL/TLS certificate. -type LoadBalancerTlsCertificateDomainValidationRecord struct { - _ struct{} `type:"structure"` + // The latest point in time to which the database can be restored. Formatted + // in Unix time. + LatestRestorableTime *time.Time `locationName:"latestRestorableTime" type:"timestamp"` + + // The Region name and Availability Zone where the database is located. + Location *ResourceLocation `locationName:"location" type:"structure"` + + // The name of the master database created when the Lightsail database resource + // is created. + MasterDatabaseName *string `locationName:"masterDatabaseName" type:"string"` + + // The master endpoint for the database. + MasterEndpoint *RelationalDatabaseEndpoint `locationName:"masterEndpoint" type:"structure"` + + // The master user name of the database. + MasterUsername *string `locationName:"masterUsername" type:"string"` + + // The unique name of the database resource in Lightsail. + Name *string `locationName:"name" type:"string"` + + // The status of parameter updates for the database. + ParameterApplyStatus *string `locationName:"parameterApplyStatus" type:"string"` + + // Describes the pending maintenance actions for the database. + PendingMaintenanceActions []*PendingMaintenanceAction `locationName:"pendingMaintenanceActions" type:"list"` + + // Describes pending database value modifications. + PendingModifiedValues *PendingModifiedRelationalDatabaseValues `locationName:"pendingModifiedValues" type:"structure"` + + // The daily time range during which automated backups are created for the database + // (for example, 16:00-16:30). + PreferredBackupWindow *string `locationName:"preferredBackupWindow" type:"string"` + + // The weekly time range during which system maintenance can occur on the database. + // + // In the format ddd:hh24:mi-ddd:hh24:mi. For example, Tue:17:00-Tue:17:30. + PreferredMaintenanceWindow *string `locationName:"preferredMaintenanceWindow" type:"string"` + + // A Boolean value indicating whether the database is publicly accessible. + PubliclyAccessible *bool `locationName:"publiclyAccessible" type:"boolean"` + + // The blueprint ID for the database. A blueprint describes the major engine + // version of a database. + RelationalDatabaseBlueprintId *string `locationName:"relationalDatabaseBlueprintId" type:"string"` + + // The bundle ID for the database. A bundle describes the performance specifications + // for your database. + RelationalDatabaseBundleId *string `locationName:"relationalDatabaseBundleId" type:"string"` - // The domain name against which your SSL/TLS certificate was validated. - DomainName *string `locationName:"domainName" type:"string"` + // The Lightsail resource type for the database (for example, RelationalDatabase). + ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` - // A fully qualified domain name in the certificate. For example, example.com. - Name *string `locationName:"name" type:"string"` + // Describes the secondary Availability Zone of a high availability database. + // + // The secondary database is used for failover support of a high availability + // database. + SecondaryAvailabilityZone *string `locationName:"secondaryAvailabilityZone" type:"string"` - // The type of validation record. For example, CNAME for domain validation. - Type *string `locationName:"type" type:"string"` + // Describes the current state of the database. + State *string `locationName:"state" type:"string"` - // The validation status. Valid values are listed below. - ValidationStatus *string `locationName:"validationStatus" type:"string" enum:"LoadBalancerTlsCertificateDomainStatus"` + // The support code for the database. Include this code in your email to support + // when you have questions about a database in Lightsail. This code enables + // our support team to look up your Lightsail information more easily. + SupportCode *string `locationName:"supportCode" type:"string"` - // The value for that type. - Value *string `locationName:"value" type:"string"` + // The tag keys and optional values for the resource. For more information about + // tags in Lightsail, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-tags). + Tags []*Tag `locationName:"tags" type:"list"` } // String returns the string representation -func (s LoadBalancerTlsCertificateDomainValidationRecord) String() string { +func (s RelationalDatabase) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LoadBalancerTlsCertificateDomainValidationRecord) GoString() string { +func (s RelationalDatabase) GoString() string { return s.String() } -// SetDomainName sets the DomainName field's value. -func (s *LoadBalancerTlsCertificateDomainValidationRecord) SetDomainName(v string) *LoadBalancerTlsCertificateDomainValidationRecord { - s.DomainName = &v +// SetArn sets the Arn field's value. +func (s *RelationalDatabase) SetArn(v string) *RelationalDatabase { + s.Arn = &v return s } -// SetName sets the Name field's value. -func (s *LoadBalancerTlsCertificateDomainValidationRecord) SetName(v string) *LoadBalancerTlsCertificateDomainValidationRecord { - s.Name = &v +// SetBackupRetentionEnabled sets the BackupRetentionEnabled field's value. +func (s *RelationalDatabase) SetBackupRetentionEnabled(v bool) *RelationalDatabase { + s.BackupRetentionEnabled = &v return s } -// SetType sets the Type field's value. -func (s *LoadBalancerTlsCertificateDomainValidationRecord) SetType(v string) *LoadBalancerTlsCertificateDomainValidationRecord { - s.Type = &v +// SetCreatedAt sets the CreatedAt field's value. +func (s *RelationalDatabase) SetCreatedAt(v time.Time) *RelationalDatabase { + s.CreatedAt = &v return s } -// SetValidationStatus sets the ValidationStatus field's value. -func (s *LoadBalancerTlsCertificateDomainValidationRecord) SetValidationStatus(v string) *LoadBalancerTlsCertificateDomainValidationRecord { - s.ValidationStatus = &v +// SetEngine sets the Engine field's value. +func (s *RelationalDatabase) SetEngine(v string) *RelationalDatabase { + s.Engine = &v return s } -// SetValue sets the Value field's value. -func (s *LoadBalancerTlsCertificateDomainValidationRecord) SetValue(v string) *LoadBalancerTlsCertificateDomainValidationRecord { - s.Value = &v +// SetEngineVersion sets the EngineVersion field's value. +func (s *RelationalDatabase) SetEngineVersion(v string) *RelationalDatabase { + s.EngineVersion = &v return s } -// Contains information about the status of Lightsail's managed renewal for -// the certificate. -type LoadBalancerTlsCertificateRenewalSummary struct { - _ struct{} `type:"structure"` - - // Contains information about the validation of each domain name in the certificate, - // as it pertains to Lightsail's managed renewal. This is different from the - // initial validation that occurs as a result of the RequestCertificate request. - DomainValidationOptions []*LoadBalancerTlsCertificateDomainValidationOption `locationName:"domainValidationOptions" type:"list"` - - // The status of Lightsail's managed renewal of the certificate. Valid values - // are listed below. - RenewalStatus *string `locationName:"renewalStatus" type:"string" enum:"LoadBalancerTlsCertificateRenewalStatus"` +// SetHardware sets the Hardware field's value. +func (s *RelationalDatabase) SetHardware(v *RelationalDatabaseHardware) *RelationalDatabase { + s.Hardware = v + return s } -// String returns the string representation -func (s LoadBalancerTlsCertificateRenewalSummary) String() string { - return awsutil.Prettify(s) +// SetLatestRestorableTime sets the LatestRestorableTime field's value. +func (s *RelationalDatabase) SetLatestRestorableTime(v time.Time) *RelationalDatabase { + s.LatestRestorableTime = &v + return s } -// GoString returns the string representation -func (s LoadBalancerTlsCertificateRenewalSummary) GoString() string { - return s.String() +// SetLocation sets the Location field's value. +func (s *RelationalDatabase) SetLocation(v *ResourceLocation) *RelationalDatabase { + s.Location = v + return s } -// SetDomainValidationOptions sets the DomainValidationOptions field's value. -func (s *LoadBalancerTlsCertificateRenewalSummary) SetDomainValidationOptions(v []*LoadBalancerTlsCertificateDomainValidationOption) *LoadBalancerTlsCertificateRenewalSummary { - s.DomainValidationOptions = v +// SetMasterDatabaseName sets the MasterDatabaseName field's value. +func (s *RelationalDatabase) SetMasterDatabaseName(v string) *RelationalDatabase { + s.MasterDatabaseName = &v return s } -// SetRenewalStatus sets the RenewalStatus field's value. -func (s *LoadBalancerTlsCertificateRenewalSummary) SetRenewalStatus(v string) *LoadBalancerTlsCertificateRenewalSummary { - s.RenewalStatus = &v +// SetMasterEndpoint sets the MasterEndpoint field's value. +func (s *RelationalDatabase) SetMasterEndpoint(v *RelationalDatabaseEndpoint) *RelationalDatabase { + s.MasterEndpoint = v return s } -// Provides a summary of SSL/TLS certificate metadata. -type LoadBalancerTlsCertificateSummary struct { - _ struct{} `type:"structure"` - - // When true, the SSL/TLS certificate is attached to the Lightsail load balancer. - IsAttached *bool `locationName:"isAttached" type:"boolean"` - - // The name of the SSL/TLS certificate. - Name *string `locationName:"name" type:"string"` +// SetMasterUsername sets the MasterUsername field's value. +func (s *RelationalDatabase) SetMasterUsername(v string) *RelationalDatabase { + s.MasterUsername = &v + return s } -// String returns the string representation -func (s LoadBalancerTlsCertificateSummary) String() string { - return awsutil.Prettify(s) +// SetName sets the Name field's value. +func (s *RelationalDatabase) SetName(v string) *RelationalDatabase { + s.Name = &v + return s } -// GoString returns the string representation -func (s LoadBalancerTlsCertificateSummary) GoString() string { - return s.String() +// SetParameterApplyStatus sets the ParameterApplyStatus field's value. +func (s *RelationalDatabase) SetParameterApplyStatus(v string) *RelationalDatabase { + s.ParameterApplyStatus = &v + return s } -// SetIsAttached sets the IsAttached field's value. -func (s *LoadBalancerTlsCertificateSummary) SetIsAttached(v bool) *LoadBalancerTlsCertificateSummary { - s.IsAttached = &v +// SetPendingMaintenanceActions sets the PendingMaintenanceActions field's value. +func (s *RelationalDatabase) SetPendingMaintenanceActions(v []*PendingMaintenanceAction) *RelationalDatabase { + s.PendingMaintenanceActions = v return s } -// SetName sets the Name field's value. -func (s *LoadBalancerTlsCertificateSummary) SetName(v string) *LoadBalancerTlsCertificateSummary { - s.Name = &v +// SetPendingModifiedValues sets the PendingModifiedValues field's value. +func (s *RelationalDatabase) SetPendingModifiedValues(v *PendingModifiedRelationalDatabaseValues) *RelationalDatabase { + s.PendingModifiedValues = v return s } -// Describes the metric data point. -type MetricDatapoint struct { - _ struct{} `type:"structure"` - - // The average. - Average *float64 `locationName:"average" type:"double"` - - // The maximum. - Maximum *float64 `locationName:"maximum" type:"double"` - - // The minimum. - Minimum *float64 `locationName:"minimum" type:"double"` - - // The sample count. - SampleCount *float64 `locationName:"sampleCount" type:"double"` - - // The sum. - Sum *float64 `locationName:"sum" type:"double"` - - // The timestamp (e.g., 1479816991.349). - Timestamp *time.Time `locationName:"timestamp" type:"timestamp"` - - // The unit. - Unit *string `locationName:"unit" type:"string" enum:"MetricUnit"` +// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. +func (s *RelationalDatabase) SetPreferredBackupWindow(v string) *RelationalDatabase { + s.PreferredBackupWindow = &v + return s } -// String returns the string representation -func (s MetricDatapoint) String() string { - return awsutil.Prettify(s) +// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. +func (s *RelationalDatabase) SetPreferredMaintenanceWindow(v string) *RelationalDatabase { + s.PreferredMaintenanceWindow = &v + return s } -// GoString returns the string representation -func (s MetricDatapoint) GoString() string { - return s.String() +// SetPubliclyAccessible sets the PubliclyAccessible field's value. +func (s *RelationalDatabase) SetPubliclyAccessible(v bool) *RelationalDatabase { + s.PubliclyAccessible = &v + return s } -// SetAverage sets the Average field's value. -func (s *MetricDatapoint) SetAverage(v float64) *MetricDatapoint { - s.Average = &v +// SetRelationalDatabaseBlueprintId sets the RelationalDatabaseBlueprintId field's value. +func (s *RelationalDatabase) SetRelationalDatabaseBlueprintId(v string) *RelationalDatabase { + s.RelationalDatabaseBlueprintId = &v return s } -// SetMaximum sets the Maximum field's value. -func (s *MetricDatapoint) SetMaximum(v float64) *MetricDatapoint { - s.Maximum = &v +// SetRelationalDatabaseBundleId sets the RelationalDatabaseBundleId field's value. +func (s *RelationalDatabase) SetRelationalDatabaseBundleId(v string) *RelationalDatabase { + s.RelationalDatabaseBundleId = &v return s } -// SetMinimum sets the Minimum field's value. -func (s *MetricDatapoint) SetMinimum(v float64) *MetricDatapoint { - s.Minimum = &v +// SetResourceType sets the ResourceType field's value. +func (s *RelationalDatabase) SetResourceType(v string) *RelationalDatabase { + s.ResourceType = &v return s } -// SetSampleCount sets the SampleCount field's value. -func (s *MetricDatapoint) SetSampleCount(v float64) *MetricDatapoint { - s.SampleCount = &v +// SetSecondaryAvailabilityZone sets the SecondaryAvailabilityZone field's value. +func (s *RelationalDatabase) SetSecondaryAvailabilityZone(v string) *RelationalDatabase { + s.SecondaryAvailabilityZone = &v return s } -// SetSum sets the Sum field's value. -func (s *MetricDatapoint) SetSum(v float64) *MetricDatapoint { - s.Sum = &v +// SetState sets the State field's value. +func (s *RelationalDatabase) SetState(v string) *RelationalDatabase { + s.State = &v return s } -// SetTimestamp sets the Timestamp field's value. -func (s *MetricDatapoint) SetTimestamp(v time.Time) *MetricDatapoint { - s.Timestamp = &v +// SetSupportCode sets the SupportCode field's value. +func (s *RelationalDatabase) SetSupportCode(v string) *RelationalDatabase { + s.SupportCode = &v return s } -// SetUnit sets the Unit field's value. -func (s *MetricDatapoint) SetUnit(v string) *MetricDatapoint { - s.Unit = &v +// SetTags sets the Tags field's value. +func (s *RelationalDatabase) SetTags(v []*Tag) *RelationalDatabase { + s.Tags = v return s } -// Describes the monthly data transfer in and out of your virtual private server -// (or instance). -type MonthlyTransfer struct { +// Describes a database image, or blueprint. A blueprint describes the major +// engine version of a database. +type RelationalDatabaseBlueprint struct { _ struct{} `type:"structure"` - // The amount allocated per month (in GB). - GbPerMonthAllocated *int64 `locationName:"gbPerMonthAllocated" type:"integer"` -} - -// String returns the string representation -func (s MonthlyTransfer) String() string { - return awsutil.Prettify(s) -} + // The ID for the database blueprint. + BlueprintId *string `locationName:"blueprintId" type:"string"` -// GoString returns the string representation -func (s MonthlyTransfer) GoString() string { - return s.String() -} + // The database software of the database blueprint (for example, MySQL). + Engine *string `locationName:"engine" type:"string" enum:"RelationalDatabaseEngine"` -// SetGbPerMonthAllocated sets the GbPerMonthAllocated field's value. -func (s *MonthlyTransfer) SetGbPerMonthAllocated(v int64) *MonthlyTransfer { - s.GbPerMonthAllocated = &v - return s -} + // The description of the database engine for the database blueprint. + EngineDescription *string `locationName:"engineDescription" type:"string"` -type OpenInstancePublicPortsInput struct { - _ struct{} `type:"structure"` + // The database engine version for the database blueprint (for example, 5.7.23). + EngineVersion *string `locationName:"engineVersion" type:"string"` - // The name of the instance for which you want to open the public ports. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` + // The description of the database engine version for the database blueprint. + EngineVersionDescription *string `locationName:"engineVersionDescription" type:"string"` - // An array of key-value pairs containing information about the port mappings. - // - // PortInfo is a required field - PortInfo *PortInfo `locationName:"portInfo" type:"structure" required:"true"` + // A Boolean value indicating whether the engine version is the default for + // the database blueprint. + IsEngineDefault *bool `locationName:"isEngineDefault" type:"boolean"` } // String returns the string representation -func (s OpenInstancePublicPortsInput) String() string { +func (s RelationalDatabaseBlueprint) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s OpenInstancePublicPortsInput) GoString() string { +func (s RelationalDatabaseBlueprint) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *OpenInstancePublicPortsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "OpenInstancePublicPortsInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } - if s.PortInfo == nil { - invalidParams.Add(request.NewErrParamRequired("PortInfo")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstanceName sets the InstanceName field's value. -func (s *OpenInstancePublicPortsInput) SetInstanceName(v string) *OpenInstancePublicPortsInput { - s.InstanceName = &v +// SetBlueprintId sets the BlueprintId field's value. +func (s *RelationalDatabaseBlueprint) SetBlueprintId(v string) *RelationalDatabaseBlueprint { + s.BlueprintId = &v return s } -// SetPortInfo sets the PortInfo field's value. -func (s *OpenInstancePublicPortsInput) SetPortInfo(v *PortInfo) *OpenInstancePublicPortsInput { - s.PortInfo = v +// SetEngine sets the Engine field's value. +func (s *RelationalDatabaseBlueprint) SetEngine(v string) *RelationalDatabaseBlueprint { + s.Engine = &v return s } -type OpenInstancePublicPortsOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the request operation. - Operation *Operation `locationName:"operation" type:"structure"` +// SetEngineDescription sets the EngineDescription field's value. +func (s *RelationalDatabaseBlueprint) SetEngineDescription(v string) *RelationalDatabaseBlueprint { + s.EngineDescription = &v + return s } -// String returns the string representation -func (s OpenInstancePublicPortsOutput) String() string { - return awsutil.Prettify(s) +// SetEngineVersion sets the EngineVersion field's value. +func (s *RelationalDatabaseBlueprint) SetEngineVersion(v string) *RelationalDatabaseBlueprint { + s.EngineVersion = &v + return s } -// GoString returns the string representation -func (s OpenInstancePublicPortsOutput) GoString() string { - return s.String() +// SetEngineVersionDescription sets the EngineVersionDescription field's value. +func (s *RelationalDatabaseBlueprint) SetEngineVersionDescription(v string) *RelationalDatabaseBlueprint { + s.EngineVersionDescription = &v + return s } -// SetOperation sets the Operation field's value. -func (s *OpenInstancePublicPortsOutput) SetOperation(v *Operation) *OpenInstancePublicPortsOutput { - s.Operation = v +// SetIsEngineDefault sets the IsEngineDefault field's value. +func (s *RelationalDatabaseBlueprint) SetIsEngineDefault(v bool) *RelationalDatabaseBlueprint { + s.IsEngineDefault = &v return s } -// Describes the API operation. -type Operation struct { +// Describes a database bundle. A bundle describes the performance specifications +// of the database. +type RelationalDatabaseBundle struct { _ struct{} `type:"structure"` - // The timestamp when the operation was initialized (e.g., 1479816991.349). - CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` - - // The error code. - ErrorCode *string `locationName:"errorCode" type:"string"` - - // The error details. - ErrorDetails *string `locationName:"errorDetails" type:"string"` - - // The ID of the operation. - Id *string `locationName:"id" type:"string"` + // The ID for the database bundle. + BundleId *string `locationName:"bundleId" type:"string"` - // A Boolean value indicating whether the operation is terminal. - IsTerminal *bool `locationName:"isTerminal" type:"boolean"` + // The number of virtual CPUs (vCPUs) for the database bundle. + CpuCount *int64 `locationName:"cpuCount" type:"integer"` - // The region and Availability Zone. - Location *ResourceLocation `locationName:"location" type:"structure"` + // The size of the disk for the database bundle. + DiskSizeInGb *int64 `locationName:"diskSizeInGb" type:"integer"` - // Details about the operation (e.g., Debian-1GB-Ohio-1). - OperationDetails *string `locationName:"operationDetails" type:"string"` + // A Boolean value indicating whether the database bundle is active. + IsActive *bool `locationName:"isActive" type:"boolean"` - // The type of operation. - OperationType *string `locationName:"operationType" type:"string" enum:"OperationType"` + // A Boolean value indicating whether the database bundle is encrypted. + IsEncrypted *bool `locationName:"isEncrypted" type:"boolean"` - // The resource name. - ResourceName *string `locationName:"resourceName" type:"string"` + // The name for the database bundle. + Name *string `locationName:"name" type:"string"` - // The resource type. - ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` + // The cost of the database bundle in US currency. + Price *float64 `locationName:"price" type:"float"` - // The status of the operation. - Status *string `locationName:"status" type:"string" enum:"OperationStatus"` + // The amount of RAM in GB (for example, 2.0) for the database bundle. + RamSizeInGb *float64 `locationName:"ramSizeInGb" type:"float"` - // The timestamp when the status was changed (e.g., 1479816991.349). - StatusChangedAt *time.Time `locationName:"statusChangedAt" type:"timestamp"` + // The data transfer rate per month in GB for the database bundle. + TransferPerMonthInGb *int64 `locationName:"transferPerMonthInGb" type:"integer"` } // String returns the string representation -func (s Operation) String() string { +func (s RelationalDatabaseBundle) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s Operation) GoString() string { +func (s RelationalDatabaseBundle) GoString() string { return s.String() } -// SetCreatedAt sets the CreatedAt field's value. -func (s *Operation) SetCreatedAt(v time.Time) *Operation { - s.CreatedAt = &v - return s -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *Operation) SetErrorCode(v string) *Operation { - s.ErrorCode = &v - return s -} - -// SetErrorDetails sets the ErrorDetails field's value. -func (s *Operation) SetErrorDetails(v string) *Operation { - s.ErrorDetails = &v - return s -} - -// SetId sets the Id field's value. -func (s *Operation) SetId(v string) *Operation { - s.Id = &v +// SetBundleId sets the BundleId field's value. +func (s *RelationalDatabaseBundle) SetBundleId(v string) *RelationalDatabaseBundle { + s.BundleId = &v return s } -// SetIsTerminal sets the IsTerminal field's value. -func (s *Operation) SetIsTerminal(v bool) *Operation { - s.IsTerminal = &v +// SetCpuCount sets the CpuCount field's value. +func (s *RelationalDatabaseBundle) SetCpuCount(v int64) *RelationalDatabaseBundle { + s.CpuCount = &v return s } -// SetLocation sets the Location field's value. -func (s *Operation) SetLocation(v *ResourceLocation) *Operation { - s.Location = v +// SetDiskSizeInGb sets the DiskSizeInGb field's value. +func (s *RelationalDatabaseBundle) SetDiskSizeInGb(v int64) *RelationalDatabaseBundle { + s.DiskSizeInGb = &v return s } -// SetOperationDetails sets the OperationDetails field's value. -func (s *Operation) SetOperationDetails(v string) *Operation { - s.OperationDetails = &v +// SetIsActive sets the IsActive field's value. +func (s *RelationalDatabaseBundle) SetIsActive(v bool) *RelationalDatabaseBundle { + s.IsActive = &v return s } -// SetOperationType sets the OperationType field's value. -func (s *Operation) SetOperationType(v string) *Operation { - s.OperationType = &v +// SetIsEncrypted sets the IsEncrypted field's value. +func (s *RelationalDatabaseBundle) SetIsEncrypted(v bool) *RelationalDatabaseBundle { + s.IsEncrypted = &v return s } -// SetResourceName sets the ResourceName field's value. -func (s *Operation) SetResourceName(v string) *Operation { - s.ResourceName = &v +// SetName sets the Name field's value. +func (s *RelationalDatabaseBundle) SetName(v string) *RelationalDatabaseBundle { + s.Name = &v return s } -// SetResourceType sets the ResourceType field's value. -func (s *Operation) SetResourceType(v string) *Operation { - s.ResourceType = &v +// SetPrice sets the Price field's value. +func (s *RelationalDatabaseBundle) SetPrice(v float64) *RelationalDatabaseBundle { + s.Price = &v return s } -// SetStatus sets the Status field's value. -func (s *Operation) SetStatus(v string) *Operation { - s.Status = &v +// SetRamSizeInGb sets the RamSizeInGb field's value. +func (s *RelationalDatabaseBundle) SetRamSizeInGb(v float64) *RelationalDatabaseBundle { + s.RamSizeInGb = &v return s } -// SetStatusChangedAt sets the StatusChangedAt field's value. -func (s *Operation) SetStatusChangedAt(v time.Time) *Operation { - s.StatusChangedAt = &v +// SetTransferPerMonthInGb sets the TransferPerMonthInGb field's value. +func (s *RelationalDatabaseBundle) SetTransferPerMonthInGb(v int64) *RelationalDatabaseBundle { + s.TransferPerMonthInGb = &v return s } -// The password data for the Windows Server-based instance, including the ciphertext -// and the key pair name. -type PasswordData struct { +// Describes an endpoint for a database. +type RelationalDatabaseEndpoint struct { _ struct{} `type:"structure"` - // The encrypted password. Ciphertext will be an empty string if access to your - // new instance is not ready yet. When you create an instance, it can take up - // to 15 minutes for the instance to be ready. - // - // If you use the default key pair (LightsailDefaultKeyPair), the decrypted - // password will be available in the password field. - // - // If you are using a custom key pair, you need to use your own means of decryption. - // - // If you change the Administrator password on the instance, Lightsail will - // continue to return the original ciphertext value. When accessing the instance - // using RDP, you need to manually enter the Administrator password after changing - // it from the default. - Ciphertext *string `locationName:"ciphertext" type:"string"` + // Specifies the DNS address of the database. + Address *string `locationName:"address" type:"string"` - // The name of the key pair that you used when creating your instance. If no - // key pair name was specified when creating the instance, Lightsail uses the - // default key pair (LightsailDefaultKeyPair). - // - // If you are using a custom key pair, you need to use your own means of decrypting - // your password using the ciphertext. Lightsail creates the ciphertext by encrypting - // your password with the public key part of this key pair. - KeyPairName *string `locationName:"keyPairName" type:"string"` + // Specifies the port that the database is listening on. + Port *int64 `locationName:"port" type:"integer"` } // String returns the string representation -func (s PasswordData) String() string { +func (s RelationalDatabaseEndpoint) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s PasswordData) GoString() string { +func (s RelationalDatabaseEndpoint) GoString() string { return s.String() } -// SetCiphertext sets the Ciphertext field's value. -func (s *PasswordData) SetCiphertext(v string) *PasswordData { - s.Ciphertext = &v +// SetAddress sets the Address field's value. +func (s *RelationalDatabaseEndpoint) SetAddress(v string) *RelationalDatabaseEndpoint { + s.Address = &v return s } -// SetKeyPairName sets the KeyPairName field's value. -func (s *PasswordData) SetKeyPairName(v string) *PasswordData { - s.KeyPairName = &v +// SetPort sets the Port field's value. +func (s *RelationalDatabaseEndpoint) SetPort(v int64) *RelationalDatabaseEndpoint { + s.Port = &v return s } -type PeerVpcInput struct { +// Describes an event for a database. +type RelationalDatabaseEvent struct { _ struct{} `type:"structure"` + + // The timestamp when the database event was created. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` + + // The category that the database event belongs to. + EventCategories []*string `locationName:"eventCategories" type:"list"` + + // The message of the database event. + Message *string `locationName:"message" type:"string"` + + // The database that the database event relates to. + Resource *string `locationName:"resource" type:"string"` } // String returns the string representation -func (s PeerVpcInput) String() string { +func (s RelationalDatabaseEvent) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s PeerVpcInput) GoString() string { +func (s RelationalDatabaseEvent) GoString() string { return s.String() } -type PeerVpcOutput struct { - _ struct{} `type:"structure"` - - // An array of key-value pairs containing information about the request operation. - Operation *Operation `locationName:"operation" type:"structure"` +// SetCreatedAt sets the CreatedAt field's value. +func (s *RelationalDatabaseEvent) SetCreatedAt(v time.Time) *RelationalDatabaseEvent { + s.CreatedAt = &v + return s } -// String returns the string representation -func (s PeerVpcOutput) String() string { - return awsutil.Prettify(s) +// SetEventCategories sets the EventCategories field's value. +func (s *RelationalDatabaseEvent) SetEventCategories(v []*string) *RelationalDatabaseEvent { + s.EventCategories = v + return s } -// GoString returns the string representation -func (s PeerVpcOutput) GoString() string { - return s.String() +// SetMessage sets the Message field's value. +func (s *RelationalDatabaseEvent) SetMessage(v string) *RelationalDatabaseEvent { + s.Message = &v + return s } -// SetOperation sets the Operation field's value. -func (s *PeerVpcOutput) SetOperation(v *Operation) *PeerVpcOutput { - s.Operation = v +// SetResource sets the Resource field's value. +func (s *RelationalDatabaseEvent) SetResource(v string) *RelationalDatabaseEvent { + s.Resource = &v return s } -// Describes information about the ports on your virtual private server (or -// instance). -type PortInfo struct { +// Describes the hardware of a database. +type RelationalDatabaseHardware struct { _ struct{} `type:"structure"` - // The first port in the range. - FromPort *int64 `locationName:"fromPort" type:"integer"` + // The number of vCPUs for the database. + CpuCount *int64 `locationName:"cpuCount" type:"integer"` - // The protocol. - Protocol *string `locationName:"protocol" type:"string" enum:"NetworkProtocol"` + // The size of the disk for the database. + DiskSizeInGb *int64 `locationName:"diskSizeInGb" type:"integer"` - // The last port in the range. - ToPort *int64 `locationName:"toPort" type:"integer"` + // The amount of RAM in GB for the database. + RamSizeInGb *float64 `locationName:"ramSizeInGb" type:"float"` } // String returns the string representation -func (s PortInfo) String() string { +func (s RelationalDatabaseHardware) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s PortInfo) GoString() string { +func (s RelationalDatabaseHardware) GoString() string { return s.String() } -// SetFromPort sets the FromPort field's value. -func (s *PortInfo) SetFromPort(v int64) *PortInfo { - s.FromPort = &v +// SetCpuCount sets the CpuCount field's value. +func (s *RelationalDatabaseHardware) SetCpuCount(v int64) *RelationalDatabaseHardware { + s.CpuCount = &v return s } -// SetProtocol sets the Protocol field's value. -func (s *PortInfo) SetProtocol(v string) *PortInfo { - s.Protocol = &v +// SetDiskSizeInGb sets the DiskSizeInGb field's value. +func (s *RelationalDatabaseHardware) SetDiskSizeInGb(v int64) *RelationalDatabaseHardware { + s.DiskSizeInGb = &v return s } -// SetToPort sets the ToPort field's value. -func (s *PortInfo) SetToPort(v int64) *PortInfo { - s.ToPort = &v +// SetRamSizeInGb sets the RamSizeInGb field's value. +func (s *RelationalDatabaseHardware) SetRamSizeInGb(v float64) *RelationalDatabaseHardware { + s.RamSizeInGb = &v return s } -type PutInstancePublicPortsInput struct { +// Describes the parameters of a database. +type RelationalDatabaseParameter struct { _ struct{} `type:"structure"` - // The Lightsail instance name of the public port(s) you are setting. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` + // Specifies the valid range of values for the parameter. + AllowedValues *string `locationName:"allowedValues" type:"string"` - // Specifies information about the public port(s). + // Indicates when parameter updates are applied. // - // PortInfos is a required field - PortInfos []*PortInfo `locationName:"portInfos" type:"list" required:"true"` + // Can be immediate or pending-reboot. + ApplyMethod *string `locationName:"applyMethod" type:"string"` + + // Specifies the engine-specific parameter type. + ApplyType *string `locationName:"applyType" type:"string"` + + // Specifies the valid data type for the parameter. + DataType *string `locationName:"dataType" type:"string"` + + // Provides a description of the parameter. + Description *string `locationName:"description" type:"string"` + + // A Boolean value indicating whether the parameter can be modified. + IsModifiable *bool `locationName:"isModifiable" type:"boolean"` + + // Specifies the name of the parameter. + ParameterName *string `locationName:"parameterName" type:"string"` + + // Specifies the value of the parameter. + ParameterValue *string `locationName:"parameterValue" type:"string"` } // String returns the string representation -func (s PutInstancePublicPortsInput) String() string { +func (s RelationalDatabaseParameter) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s PutInstancePublicPortsInput) GoString() string { +func (s RelationalDatabaseParameter) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutInstancePublicPortsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutInstancePublicPortsInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } - if s.PortInfos == nil { - invalidParams.Add(request.NewErrParamRequired("PortInfos")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetAllowedValues sets the AllowedValues field's value. +func (s *RelationalDatabaseParameter) SetAllowedValues(v string) *RelationalDatabaseParameter { + s.AllowedValues = &v + return s } -// SetInstanceName sets the InstanceName field's value. -func (s *PutInstancePublicPortsInput) SetInstanceName(v string) *PutInstancePublicPortsInput { - s.InstanceName = &v +// SetApplyMethod sets the ApplyMethod field's value. +func (s *RelationalDatabaseParameter) SetApplyMethod(v string) *RelationalDatabaseParameter { + s.ApplyMethod = &v return s } -// SetPortInfos sets the PortInfos field's value. -func (s *PutInstancePublicPortsInput) SetPortInfos(v []*PortInfo) *PutInstancePublicPortsInput { - s.PortInfos = v +// SetApplyType sets the ApplyType field's value. +func (s *RelationalDatabaseParameter) SetApplyType(v string) *RelationalDatabaseParameter { + s.ApplyType = &v return s } -type PutInstancePublicPortsOutput struct { - _ struct{} `type:"structure"` +// SetDataType sets the DataType field's value. +func (s *RelationalDatabaseParameter) SetDataType(v string) *RelationalDatabaseParameter { + s.DataType = &v + return s +} - // Describes metadata about the operation you just executed. - Operation *Operation `locationName:"operation" type:"structure"` +// SetDescription sets the Description field's value. +func (s *RelationalDatabaseParameter) SetDescription(v string) *RelationalDatabaseParameter { + s.Description = &v + return s } -// String returns the string representation -func (s PutInstancePublicPortsOutput) String() string { - return awsutil.Prettify(s) +// SetIsModifiable sets the IsModifiable field's value. +func (s *RelationalDatabaseParameter) SetIsModifiable(v bool) *RelationalDatabaseParameter { + s.IsModifiable = &v + return s } -// GoString returns the string representation -func (s PutInstancePublicPortsOutput) GoString() string { - return s.String() +// SetParameterName sets the ParameterName field's value. +func (s *RelationalDatabaseParameter) SetParameterName(v string) *RelationalDatabaseParameter { + s.ParameterName = &v + return s } -// SetOperation sets the Operation field's value. -func (s *PutInstancePublicPortsOutput) SetOperation(v *Operation) *PutInstancePublicPortsOutput { - s.Operation = v +// SetParameterValue sets the ParameterValue field's value. +func (s *RelationalDatabaseParameter) SetParameterValue(v string) *RelationalDatabaseParameter { + s.ParameterValue = &v return s } -type RebootInstanceInput struct { +// Describes a database snapshot. +type RelationalDatabaseSnapshot struct { _ struct{} `type:"structure"` - // The name of the instance to reboot. - // - // InstanceName is a required field - InstanceName *string `locationName:"instanceName" type:"string" required:"true"` -} + // The Amazon Resource Name (ARN) of the database snapshot. + Arn *string `locationName:"arn" type:"string"` -// String returns the string representation -func (s RebootInstanceInput) String() string { - return awsutil.Prettify(s) -} + // The timestamp when the database snapshot was created. + CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` -// GoString returns the string representation -func (s RebootInstanceInput) GoString() string { - return s.String() -} + // The software of the database snapshot (for example, MySQL) + Engine *string `locationName:"engine" type:"string"` -// Validate inspects the fields of the type to determine if they are valid. -func (s *RebootInstanceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RebootInstanceInput"} - if s.InstanceName == nil { - invalidParams.Add(request.NewErrParamRequired("InstanceName")) - } + // The database engine version for the database snapshot (for example, 5.7.23). + EngineVersion *string `locationName:"engineVersion" type:"string"` - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} + // The Amazon Resource Name (ARN) of the database from which the database snapshot + // was created. + FromRelationalDatabaseArn *string `locationName:"fromRelationalDatabaseArn" type:"string"` + + // The blueprint ID of the database from which the database snapshot was created. + // A blueprint describes the major engine version of a database. + FromRelationalDatabaseBlueprintId *string `locationName:"fromRelationalDatabaseBlueprintId" type:"string"` + + // The bundle ID of the database from which the database snapshot was created. + FromRelationalDatabaseBundleId *string `locationName:"fromRelationalDatabaseBundleId" type:"string"` + + // The name of the source database from which the database snapshot was created. + FromRelationalDatabaseName *string `locationName:"fromRelationalDatabaseName" type:"string"` + + // The Region name and Availability Zone where the database snapshot is located. + Location *ResourceLocation `locationName:"location" type:"structure"` + + // The name of the database snapshot. + Name *string `locationName:"name" type:"string"` + + // The Lightsail resource type. + ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` + + // The size of the disk in GB (for example, 32) for the database snapshot. + SizeInGb *int64 `locationName:"sizeInGb" type:"integer"` -// SetInstanceName sets the InstanceName field's value. -func (s *RebootInstanceInput) SetInstanceName(v string) *RebootInstanceInput { - s.InstanceName = &v - return s -} + // The state of the database snapshot. + State *string `locationName:"state" type:"string"` -type RebootInstanceOutput struct { - _ struct{} `type:"structure"` + // The support code for the database snapshot. Include this code in your email + // to support when you have questions about a database snapshot in Lightsail. + // This code enables our support team to look up your Lightsail information + // more easily. + SupportCode *string `locationName:"supportCode" type:"string"` - // An array of key-value pairs containing information about the request operations. - Operations []*Operation `locationName:"operations" type:"list"` + // The tag keys and optional values for the resource. For more information about + // tags in Lightsail, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-tags). + Tags []*Tag `locationName:"tags" type:"list"` } // String returns the string representation -func (s RebootInstanceOutput) String() string { +func (s RelationalDatabaseSnapshot) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s RebootInstanceOutput) GoString() string { +func (s RelationalDatabaseSnapshot) GoString() string { return s.String() } -// SetOperations sets the Operations field's value. -func (s *RebootInstanceOutput) SetOperations(v []*Operation) *RebootInstanceOutput { - s.Operations = v +// SetArn sets the Arn field's value. +func (s *RelationalDatabaseSnapshot) SetArn(v string) *RelationalDatabaseSnapshot { + s.Arn = &v return s } -// Describes the AWS Region. -type Region struct { - _ struct{} `type:"structure"` +// SetCreatedAt sets the CreatedAt field's value. +func (s *RelationalDatabaseSnapshot) SetCreatedAt(v time.Time) *RelationalDatabaseSnapshot { + s.CreatedAt = &v + return s +} - // The Availability Zones. Follows the format us-east-2a (case-sensitive). - AvailabilityZones []*AvailabilityZone `locationName:"availabilityZones" type:"list"` +// SetEngine sets the Engine field's value. +func (s *RelationalDatabaseSnapshot) SetEngine(v string) *RelationalDatabaseSnapshot { + s.Engine = &v + return s +} - // The continent code (e.g., NA, meaning North America). - ContinentCode *string `locationName:"continentCode" type:"string"` +// SetEngineVersion sets the EngineVersion field's value. +func (s *RelationalDatabaseSnapshot) SetEngineVersion(v string) *RelationalDatabaseSnapshot { + s.EngineVersion = &v + return s +} - // The description of the AWS Region (e.g., This region is recommended to serve - // users in the eastern United States and eastern Canada). - Description *string `locationName:"description" type:"string"` +// SetFromRelationalDatabaseArn sets the FromRelationalDatabaseArn field's value. +func (s *RelationalDatabaseSnapshot) SetFromRelationalDatabaseArn(v string) *RelationalDatabaseSnapshot { + s.FromRelationalDatabaseArn = &v + return s +} - // The display name (e.g., Ohio). - DisplayName *string `locationName:"displayName" type:"string"` +// SetFromRelationalDatabaseBlueprintId sets the FromRelationalDatabaseBlueprintId field's value. +func (s *RelationalDatabaseSnapshot) SetFromRelationalDatabaseBlueprintId(v string) *RelationalDatabaseSnapshot { + s.FromRelationalDatabaseBlueprintId = &v + return s +} - // The region name (e.g., us-east-2). - Name *string `locationName:"name" type:"string" enum:"RegionName"` +// SetFromRelationalDatabaseBundleId sets the FromRelationalDatabaseBundleId field's value. +func (s *RelationalDatabaseSnapshot) SetFromRelationalDatabaseBundleId(v string) *RelationalDatabaseSnapshot { + s.FromRelationalDatabaseBundleId = &v + return s } -// String returns the string representation -func (s Region) String() string { - return awsutil.Prettify(s) +// SetFromRelationalDatabaseName sets the FromRelationalDatabaseName field's value. +func (s *RelationalDatabaseSnapshot) SetFromRelationalDatabaseName(v string) *RelationalDatabaseSnapshot { + s.FromRelationalDatabaseName = &v + return s } -// GoString returns the string representation -func (s Region) GoString() string { - return s.String() +// SetLocation sets the Location field's value. +func (s *RelationalDatabaseSnapshot) SetLocation(v *ResourceLocation) *RelationalDatabaseSnapshot { + s.Location = v + return s } -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *Region) SetAvailabilityZones(v []*AvailabilityZone) *Region { - s.AvailabilityZones = v +// SetName sets the Name field's value. +func (s *RelationalDatabaseSnapshot) SetName(v string) *RelationalDatabaseSnapshot { + s.Name = &v return s } -// SetContinentCode sets the ContinentCode field's value. -func (s *Region) SetContinentCode(v string) *Region { - s.ContinentCode = &v +// SetResourceType sets the ResourceType field's value. +func (s *RelationalDatabaseSnapshot) SetResourceType(v string) *RelationalDatabaseSnapshot { + s.ResourceType = &v return s } -// SetDescription sets the Description field's value. -func (s *Region) SetDescription(v string) *Region { - s.Description = &v +// SetSizeInGb sets the SizeInGb field's value. +func (s *RelationalDatabaseSnapshot) SetSizeInGb(v int64) *RelationalDatabaseSnapshot { + s.SizeInGb = &v return s } -// SetDisplayName sets the DisplayName field's value. -func (s *Region) SetDisplayName(v string) *Region { - s.DisplayName = &v +// SetState sets the State field's value. +func (s *RelationalDatabaseSnapshot) SetState(v string) *RelationalDatabaseSnapshot { + s.State = &v return s } -// SetName sets the Name field's value. -func (s *Region) SetName(v string) *Region { - s.Name = &v +// SetSupportCode sets the SupportCode field's value. +func (s *RelationalDatabaseSnapshot) SetSupportCode(v string) *RelationalDatabaseSnapshot { + s.SupportCode = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *RelationalDatabaseSnapshot) SetTags(v []*Tag) *RelationalDatabaseSnapshot { + s.Tags = v return s } @@ -15193,6 +22249,67 @@ func (s *StartInstanceOutput) SetOperations(v []*Operation) *StartInstanceOutput return s } +type StartRelationalDatabaseInput struct { + _ struct{} `type:"structure"` + + // The name of your database to start. + // + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` +} + +// String returns the string representation +func (s StartRelationalDatabaseInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartRelationalDatabaseInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartRelationalDatabaseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartRelationalDatabaseInput"} + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *StartRelationalDatabaseInput) SetRelationalDatabaseName(v string) *StartRelationalDatabaseInput { + s.RelationalDatabaseName = &v + return s +} + +type StartRelationalDatabaseOutput struct { + _ struct{} `type:"structure"` + + // An object describing the result of your start relational database request. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s StartRelationalDatabaseOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartRelationalDatabaseOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *StartRelationalDatabaseOutput) SetOperations(v []*Operation) *StartRelationalDatabaseOutput { + s.Operations = v + return s +} + // Describes the static IP. type StaticIp struct { _ struct{} `type:"structure"` @@ -15356,12 +22473,200 @@ func (s StopInstanceOutput) String() string { } // GoString returns the string representation -func (s StopInstanceOutput) GoString() string { +func (s StopInstanceOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *StopInstanceOutput) SetOperations(v []*Operation) *StopInstanceOutput { + s.Operations = v + return s +} + +type StopRelationalDatabaseInput struct { + _ struct{} `type:"structure"` + + // The name of your database to stop. + // + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` + + // The name of your new database snapshot to be created before stopping your + // database. + RelationalDatabaseSnapshotName *string `locationName:"relationalDatabaseSnapshotName" type:"string"` +} + +// String returns the string representation +func (s StopRelationalDatabaseInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopRelationalDatabaseInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopRelationalDatabaseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopRelationalDatabaseInput"} + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *StopRelationalDatabaseInput) SetRelationalDatabaseName(v string) *StopRelationalDatabaseInput { + s.RelationalDatabaseName = &v + return s +} + +// SetRelationalDatabaseSnapshotName sets the RelationalDatabaseSnapshotName field's value. +func (s *StopRelationalDatabaseInput) SetRelationalDatabaseSnapshotName(v string) *StopRelationalDatabaseInput { + s.RelationalDatabaseSnapshotName = &v + return s +} + +type StopRelationalDatabaseOutput struct { + _ struct{} `type:"structure"` + + // An object describing the result of your stop relational database request. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s StopRelationalDatabaseOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopRelationalDatabaseOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *StopRelationalDatabaseOutput) SetOperations(v []*Operation) *StopRelationalDatabaseOutput { + s.Operations = v + return s +} + +// Describes a tag key and optional value assigned to an Amazon Lightsail resource. +// +// For more information about tags in Lightsail, see the Lightsail Dev Guide +// (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-tags). +type Tag struct { + _ struct{} `type:"structure"` + + // The key of the tag. + // + // Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in + // UTF-8, or the following characters: + - = . _ : / @ + Key *string `locationName:"key" type:"string"` + + // The value of the tag. + // + // Constraints: Tag values accept a maximum of 256 letters, numbers, spaces + // in UTF-8, or the following characters: + - = . _ : / @ + Value *string `locationName:"value" type:"string"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // The name of the resource to which you are adding tags. + // + // ResourceName is a required field + ResourceName *string `locationName:"resourceName" type:"string" required:"true"` + + // The tag key and optional value. + // + // Tags is a required field + Tags []*Tag `locationName:"tags" type:"list" required:"true"` +} + +// String returns the string representation +func (s TagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} + if s.ResourceName == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceName")) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceName sets the ResourceName field's value. +func (s *TagResourceInput) SetResourceName(v string) *TagResourceInput { + s.ResourceName = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { + s.Tags = v + return s +} + +type TagResourceOutput struct { + _ struct{} `type:"structure"` + + // A list of objects describing the API operation. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s TagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceOutput) GoString() string { return s.String() } // SetOperations sets the Operations field's value. -func (s *StopInstanceOutput) SetOperations(v []*Operation) *StopInstanceOutput { +func (s *TagResourceOutput) SetOperations(v []*Operation) *TagResourceOutput { s.Operations = v return s } @@ -15403,6 +22708,81 @@ func (s *UnpeerVpcOutput) SetOperation(v *Operation) *UnpeerVpcOutput { return s } +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // The name of the resource from which you are removing a tag. + // + // ResourceName is a required field + ResourceName *string `locationName:"resourceName" type:"string" required:"true"` + + // The tag keys to delete from the specified resource. + // + // TagKeys is a required field + TagKeys []*string `locationName:"tagKeys" type:"list" required:"true"` +} + +// String returns the string representation +func (s UntagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} + if s.ResourceName == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceName")) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceName sets the ResourceName field's value. +func (s *UntagResourceInput) SetResourceName(v string) *UntagResourceInput { + s.ResourceName = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { + s.TagKeys = v + return s +} + +type UntagResourceOutput struct { + _ struct{} `type:"structure"` + + // A list of objects describing the API operation. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s UntagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *UntagResourceOutput) SetOperations(v []*Operation) *UntagResourceOutput { + s.Operations = v + return s +} + type UpdateDomainEntryInput struct { _ struct{} `type:"structure"` @@ -15570,6 +22950,266 @@ func (s *UpdateLoadBalancerAttributeOutput) SetOperations(v []*Operation) *Updat return s } +type UpdateRelationalDatabaseInput struct { + _ struct{} `type:"structure"` + + // When true, applies changes immediately. When false, applies changes during + // the preferred maintenance window. Some changes may cause an outage. + // + // Default: false + ApplyImmediately *bool `locationName:"applyImmediately" type:"boolean"` + + // When true, disables automated backup retention for your database. + // + // Disabling backup retention deletes all automated database backups. Before + // disabling this, you may want to create a snapshot of your database using + // the create relational database snapshot operation. + // + // Updates are applied during the next maintenance window because this can result + // in an outage. + DisableBackupRetention *bool `locationName:"disableBackupRetention" type:"boolean"` + + // When true, enables automated backup retention for your database. + // + // Updates are applied during the next maintenance window because this can result + // in an outage. + EnableBackupRetention *bool `locationName:"enableBackupRetention" type:"boolean"` + + // The password for the master user of your database. The password can include + // any printable ASCII character except "/", """, or "@". + // + // Constraints: Must contain 8 to 41 characters. + MasterUserPassword *string `locationName:"masterUserPassword" type:"string" sensitive:"true"` + + // The daily time range during which automated backups are created for your + // database if automated backups are enabled. + // + // Constraints: + // + // * Must be in the hh24:mi-hh24:mi format. + // + // Example: 16:00-16:30 + // + // * Specified in Universal Coordinated Time (UTC). + // + // * Must not conflict with the preferred maintenance window. + // + // * Must be at least 30 minutes. + PreferredBackupWindow *string `locationName:"preferredBackupWindow" type:"string"` + + // The weekly time range during which system maintenance can occur on your database. + // + // The default is a 30-minute window selected at random from an 8-hour block + // of time for each AWS Region, occurring on a random day of the week. + // + // Constraints: + // + // * Must be in the ddd:hh24:mi-ddd:hh24:mi format. + // + // * Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun. + // + // * Must be at least 30 minutes. + // + // * Specified in Universal Coordinated Time (UTC). + // + // * Example: Tue:17:00-Tue:17:30 + PreferredMaintenanceWindow *string `locationName:"preferredMaintenanceWindow" type:"string"` + + // Specifies the accessibility options for your database. A value of true specifies + // a database that is available to resources outside of your Lightsail account. + // A value of false specifies a database that is available only to your Lightsail + // resources in the same region as your database. + PubliclyAccessible *bool `locationName:"publiclyAccessible" type:"boolean"` + + // The name of your database to update. + // + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` + + // When true, the master user password is changed to a new strong password generated + // by Lightsail. + // + // Use the get relational database master user password operation to get the + // new password. + RotateMasterUserPassword *bool `locationName:"rotateMasterUserPassword" type:"boolean"` +} + +// String returns the string representation +func (s UpdateRelationalDatabaseInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateRelationalDatabaseInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateRelationalDatabaseInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateRelationalDatabaseInput"} + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplyImmediately sets the ApplyImmediately field's value. +func (s *UpdateRelationalDatabaseInput) SetApplyImmediately(v bool) *UpdateRelationalDatabaseInput { + s.ApplyImmediately = &v + return s +} + +// SetDisableBackupRetention sets the DisableBackupRetention field's value. +func (s *UpdateRelationalDatabaseInput) SetDisableBackupRetention(v bool) *UpdateRelationalDatabaseInput { + s.DisableBackupRetention = &v + return s +} + +// SetEnableBackupRetention sets the EnableBackupRetention field's value. +func (s *UpdateRelationalDatabaseInput) SetEnableBackupRetention(v bool) *UpdateRelationalDatabaseInput { + s.EnableBackupRetention = &v + return s +} + +// SetMasterUserPassword sets the MasterUserPassword field's value. +func (s *UpdateRelationalDatabaseInput) SetMasterUserPassword(v string) *UpdateRelationalDatabaseInput { + s.MasterUserPassword = &v + return s +} + +// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. +func (s *UpdateRelationalDatabaseInput) SetPreferredBackupWindow(v string) *UpdateRelationalDatabaseInput { + s.PreferredBackupWindow = &v + return s +} + +// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. +func (s *UpdateRelationalDatabaseInput) SetPreferredMaintenanceWindow(v string) *UpdateRelationalDatabaseInput { + s.PreferredMaintenanceWindow = &v + return s +} + +// SetPubliclyAccessible sets the PubliclyAccessible field's value. +func (s *UpdateRelationalDatabaseInput) SetPubliclyAccessible(v bool) *UpdateRelationalDatabaseInput { + s.PubliclyAccessible = &v + return s +} + +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *UpdateRelationalDatabaseInput) SetRelationalDatabaseName(v string) *UpdateRelationalDatabaseInput { + s.RelationalDatabaseName = &v + return s +} + +// SetRotateMasterUserPassword sets the RotateMasterUserPassword field's value. +func (s *UpdateRelationalDatabaseInput) SetRotateMasterUserPassword(v bool) *UpdateRelationalDatabaseInput { + s.RotateMasterUserPassword = &v + return s +} + +type UpdateRelationalDatabaseOutput struct { + _ struct{} `type:"structure"` + + // An object describing the result of your update relational database request. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s UpdateRelationalDatabaseOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateRelationalDatabaseOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *UpdateRelationalDatabaseOutput) SetOperations(v []*Operation) *UpdateRelationalDatabaseOutput { + s.Operations = v + return s +} + +type UpdateRelationalDatabaseParametersInput struct { + _ struct{} `type:"structure"` + + // The database parameters to update. + // + // Parameters is a required field + Parameters []*RelationalDatabaseParameter `locationName:"parameters" type:"list" required:"true"` + + // The name of your database for which to update parameters. + // + // RelationalDatabaseName is a required field + RelationalDatabaseName *string `locationName:"relationalDatabaseName" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateRelationalDatabaseParametersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateRelationalDatabaseParametersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateRelationalDatabaseParametersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateRelationalDatabaseParametersInput"} + if s.Parameters == nil { + invalidParams.Add(request.NewErrParamRequired("Parameters")) + } + if s.RelationalDatabaseName == nil { + invalidParams.Add(request.NewErrParamRequired("RelationalDatabaseName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetParameters sets the Parameters field's value. +func (s *UpdateRelationalDatabaseParametersInput) SetParameters(v []*RelationalDatabaseParameter) *UpdateRelationalDatabaseParametersInput { + s.Parameters = v + return s +} + +// SetRelationalDatabaseName sets the RelationalDatabaseName field's value. +func (s *UpdateRelationalDatabaseParametersInput) SetRelationalDatabaseName(v string) *UpdateRelationalDatabaseParametersInput { + s.RelationalDatabaseName = &v + return s +} + +type UpdateRelationalDatabaseParametersOutput struct { + _ struct{} `type:"structure"` + + // An object describing the result of your update relational database parameters + // request. + Operations []*Operation `locationName:"operations" type:"list"` +} + +// String returns the string representation +func (s UpdateRelationalDatabaseParametersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateRelationalDatabaseParametersOutput) GoString() string { + return s.String() +} + +// SetOperations sets the Operations field's value. +func (s *UpdateRelationalDatabaseParametersOutput) SetOperations(v []*Operation) *UpdateRelationalDatabaseParametersOutput { + s.Operations = v + return s +} + const ( // AccessDirectionInbound is a AccessDirection enum value AccessDirectionInbound = "inbound" @@ -15586,6 +23226,11 @@ const ( BlueprintTypeApp = "app" ) +const ( + // CloudFormationStackRecordSourceTypeExportSnapshotRecord is a CloudFormationStackRecordSourceType enum value + CloudFormationStackRecordSourceTypeExportSnapshotRecord = "ExportSnapshotRecord" +) + const ( // DiskSnapshotStatePending is a DiskSnapshotState enum value DiskSnapshotStatePending = "pending" @@ -15617,6 +23262,14 @@ const ( DiskStateUnknown = "unknown" ) +const ( + // ExportSnapshotRecordSourceTypeInstanceSnapshot is a ExportSnapshotRecordSourceType enum value + ExportSnapshotRecordSourceTypeInstanceSnapshot = "InstanceSnapshot" + + // ExportSnapshotRecordSourceTypeDiskSnapshot is a ExportSnapshotRecordSourceType enum value + ExportSnapshotRecordSourceTypeDiskSnapshot = "DiskSnapshot" +) + const ( // InstanceAccessProtocolSsh is a InstanceAccessProtocol enum value InstanceAccessProtocolSsh = "ssh" @@ -16123,6 +23776,36 @@ const ( // OperationTypeCreateDiskFromSnapshot is a OperationType enum value OperationTypeCreateDiskFromSnapshot = "CreateDiskFromSnapshot" + + // OperationTypeCreateRelationalDatabase is a OperationType enum value + OperationTypeCreateRelationalDatabase = "CreateRelationalDatabase" + + // OperationTypeUpdateRelationalDatabase is a OperationType enum value + OperationTypeUpdateRelationalDatabase = "UpdateRelationalDatabase" + + // OperationTypeDeleteRelationalDatabase is a OperationType enum value + OperationTypeDeleteRelationalDatabase = "DeleteRelationalDatabase" + + // OperationTypeCreateRelationalDatabaseFromSnapshot is a OperationType enum value + OperationTypeCreateRelationalDatabaseFromSnapshot = "CreateRelationalDatabaseFromSnapshot" + + // OperationTypeCreateRelationalDatabaseSnapshot is a OperationType enum value + OperationTypeCreateRelationalDatabaseSnapshot = "CreateRelationalDatabaseSnapshot" + + // OperationTypeDeleteRelationalDatabaseSnapshot is a OperationType enum value + OperationTypeDeleteRelationalDatabaseSnapshot = "DeleteRelationalDatabaseSnapshot" + + // OperationTypeUpdateRelationalDatabaseParameters is a OperationType enum value + OperationTypeUpdateRelationalDatabaseParameters = "UpdateRelationalDatabaseParameters" + + // OperationTypeStartRelationalDatabase is a OperationType enum value + OperationTypeStartRelationalDatabase = "StartRelationalDatabase" + + // OperationTypeRebootRelationalDatabase is a OperationType enum value + OperationTypeRebootRelationalDatabase = "RebootRelationalDatabase" + + // OperationTypeStopRelationalDatabase is a OperationType enum value + OperationTypeStopRelationalDatabase = "StopRelationalDatabase" ) const ( @@ -16133,6 +23816,17 @@ const ( PortAccessTypePrivate = "Private" ) +const ( + // PortInfoSourceTypeDefault is a PortInfoSourceType enum value + PortInfoSourceTypeDefault = "DEFAULT" + + // PortInfoSourceTypeInstance is a PortInfoSourceType enum value + PortInfoSourceTypeInstance = "INSTANCE" + + // PortInfoSourceTypeNone is a PortInfoSourceType enum value + PortInfoSourceTypeNone = "NONE" +) + const ( // PortStateOpen is a PortState enum value PortStateOpen = "open" @@ -16141,6 +23835,17 @@ const ( PortStateClosed = "closed" ) +const ( + // RecordStateStarted is a RecordState enum value + RecordStateStarted = "Started" + + // RecordStateSucceeded is a RecordState enum value + RecordStateSucceeded = "Succeeded" + + // RecordStateFailed is a RecordState enum value + RecordStateFailed = "Failed" +) + const ( // RegionNameUsEast1 is a RegionName enum value RegionNameUsEast1 = "us-east-1" @@ -16154,15 +23859,21 @@ const ( // RegionNameUsWest2 is a RegionName enum value RegionNameUsWest2 = "us-west-2" - // RegionNameEuCentral1 is a RegionName enum value - RegionNameEuCentral1 = "eu-central-1" - // RegionNameEuWest1 is a RegionName enum value RegionNameEuWest1 = "eu-west-1" // RegionNameEuWest2 is a RegionName enum value RegionNameEuWest2 = "eu-west-2" + // RegionNameEuWest3 is a RegionName enum value + RegionNameEuWest3 = "eu-west-3" + + // RegionNameEuCentral1 is a RegionName enum value + RegionNameEuCentral1 = "eu-central-1" + + // RegionNameCaCentral1 is a RegionName enum value + RegionNameCaCentral1 = "ca-central-1" + // RegionNameApSouth1 is a RegionName enum value RegionNameApSouth1 = "ap-south-1" @@ -16179,6 +23890,42 @@ const ( RegionNameApNortheast2 = "ap-northeast-2" ) +const ( + // RelationalDatabaseEngineMysql is a RelationalDatabaseEngine enum value + RelationalDatabaseEngineMysql = "mysql" +) + +const ( + // RelationalDatabaseMetricNameCpuutilization is a RelationalDatabaseMetricName enum value + RelationalDatabaseMetricNameCpuutilization = "CPUUtilization" + + // RelationalDatabaseMetricNameDatabaseConnections is a RelationalDatabaseMetricName enum value + RelationalDatabaseMetricNameDatabaseConnections = "DatabaseConnections" + + // RelationalDatabaseMetricNameDiskQueueDepth is a RelationalDatabaseMetricName enum value + RelationalDatabaseMetricNameDiskQueueDepth = "DiskQueueDepth" + + // RelationalDatabaseMetricNameFreeStorageSpace is a RelationalDatabaseMetricName enum value + RelationalDatabaseMetricNameFreeStorageSpace = "FreeStorageSpace" + + // RelationalDatabaseMetricNameNetworkReceiveThroughput is a RelationalDatabaseMetricName enum value + RelationalDatabaseMetricNameNetworkReceiveThroughput = "NetworkReceiveThroughput" + + // RelationalDatabaseMetricNameNetworkTransmitThroughput is a RelationalDatabaseMetricName enum value + RelationalDatabaseMetricNameNetworkTransmitThroughput = "NetworkTransmitThroughput" +) + +const ( + // RelationalDatabasePasswordVersionCurrent is a RelationalDatabasePasswordVersion enum value + RelationalDatabasePasswordVersionCurrent = "CURRENT" + + // RelationalDatabasePasswordVersionPrevious is a RelationalDatabasePasswordVersion enum value + RelationalDatabasePasswordVersionPrevious = "PREVIOUS" + + // RelationalDatabasePasswordVersionPending is a RelationalDatabasePasswordVersion enum value + RelationalDatabasePasswordVersionPending = "PENDING" +) + const ( // ResourceTypeInstance is a ResourceType enum value ResourceTypeInstance = "Instance" @@ -16209,4 +23956,16 @@ const ( // ResourceTypeDiskSnapshot is a ResourceType enum value ResourceTypeDiskSnapshot = "DiskSnapshot" + + // ResourceTypeRelationalDatabase is a ResourceType enum value + ResourceTypeRelationalDatabase = "RelationalDatabase" + + // ResourceTypeRelationalDatabaseSnapshot is a ResourceType enum value + ResourceTypeRelationalDatabaseSnapshot = "RelationalDatabaseSnapshot" + + // ResourceTypeExportSnapshotRecord is a ResourceType enum value + ResourceTypeExportSnapshotRecord = "ExportSnapshotRecord" + + // ResourceTypeCloudFormationStackRecord is a ResourceType enum value + ResourceTypeCloudFormationStackRecord = "CloudFormationStackRecord" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/macie/api.go b/vendor/github.com/aws/aws-sdk-go/service/macie/api.go index 62a12b0c1a..d09b97380f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/macie/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/macie/api.go @@ -17,7 +17,7 @@ const opAssociateMemberAccount = "AssociateMemberAccount" // AssociateMemberAccountRequest generates a "aws/request.Request" representing the // client's request for the AssociateMemberAccount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -51,8 +51,7 @@ func (c *Macie) AssociateMemberAccountRequest(input *AssociateMemberAccountInput output = &AssociateMemberAccountOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -106,7 +105,7 @@ const opAssociateS3Resources = "AssociateS3Resources" // AssociateS3ResourcesRequest generates a "aws/request.Request" representing the // client's request for the AssociateS3Resources operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -200,7 +199,7 @@ const opDisassociateMemberAccount = "DisassociateMemberAccount" // DisassociateMemberAccountRequest generates a "aws/request.Request" representing the // client's request for the DisassociateMemberAccount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -234,8 +233,7 @@ func (c *Macie) DisassociateMemberAccountRequest(input *DisassociateMemberAccoun output = &DisassociateMemberAccountOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -285,7 +283,7 @@ const opDisassociateS3Resources = "DisassociateS3Resources" // DisassociateS3ResourcesRequest generates a "aws/request.Request" representing the // client's request for the DisassociateS3Resources operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -374,7 +372,7 @@ const opListMemberAccounts = "ListMemberAccounts" // ListMemberAccountsRequest generates a "aws/request.Request" representing the // client's request for the ListMemberAccounts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -514,7 +512,7 @@ const opListS3Resources = "ListS3Resources" // ListS3ResourcesRequest generates a "aws/request.Request" representing the // client's request for the ListS3Resources operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -660,7 +658,7 @@ const opUpdateS3Resources = "UpdateS3Resources" // UpdateS3ResourcesRequest generates a "aws/request.Request" representing the // client's request for the UpdateS3Resources operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediastore/api.go b/vendor/github.com/aws/aws-sdk-go/service/mediastore/api.go index 5d6baf7edd..fdce6d30b1 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mediastore/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mediastore/api.go @@ -3,11 +3,14 @@ package mediastore import ( + "fmt" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) const opCreateContainer = "CreateContainer" @@ -15,7 +18,7 @@ const opCreateContainer = "CreateContainer" // CreateContainerRequest generates a "aws/request.Request" representing the // client's request for the CreateContainer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -66,7 +69,8 @@ func (c *MediaStore) CreateContainerRequest(input *CreateContainerInput) (req *r // // Returned Error Codes: // * ErrCodeContainerInUseException "ContainerInUseException" -// Resource already exists or is being updated. +// The container that you specified in the request already exists or is being +// updated. // // * ErrCodeLimitExceededException "LimitExceededException" // A service limit has been exceeded. @@ -101,7 +105,7 @@ const opDeleteContainer = "DeleteContainer" // DeleteContainerRequest generates a "aws/request.Request" representing the // client's request for the DeleteContainer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -135,6 +139,7 @@ func (c *MediaStore) DeleteContainerRequest(input *DeleteContainerInput) (req *r output = &DeleteContainerOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -153,10 +158,11 @@ func (c *MediaStore) DeleteContainerRequest(input *DeleteContainerInput) (req *r // // Returned Error Codes: // * ErrCodeContainerInUseException "ContainerInUseException" -// Resource already exists or is being updated. +// The container that you specified in the request already exists or is being +// updated. // // * ErrCodeContainerNotFoundException "ContainerNotFoundException" -// Could not perform an operation on a container that does not exist. +// The container that you specified in the request does not exist. // // * ErrCodeInternalServerError "InternalServerError" // The service is temporarily unavailable. @@ -188,7 +194,7 @@ const opDeleteContainerPolicy = "DeleteContainerPolicy" // DeleteContainerPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteContainerPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -222,6 +228,7 @@ func (c *MediaStore) DeleteContainerPolicyRequest(input *DeleteContainerPolicyIn output = &DeleteContainerPolicyOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -238,13 +245,14 @@ func (c *MediaStore) DeleteContainerPolicyRequest(input *DeleteContainerPolicyIn // // Returned Error Codes: // * ErrCodeContainerInUseException "ContainerInUseException" -// Resource already exists or is being updated. +// The container that you specified in the request already exists or is being +// updated. // // * ErrCodeContainerNotFoundException "ContainerNotFoundException" -// Could not perform an operation on a container that does not exist. +// The container that you specified in the request does not exist. // // * ErrCodePolicyNotFoundException "PolicyNotFoundException" -// Could not perform an operation on a policy that does not exist. +// The policy that you specified in the request does not exist. // // * ErrCodeInternalServerError "InternalServerError" // The service is temporarily unavailable. @@ -276,7 +284,7 @@ const opDeleteCorsPolicy = "DeleteCorsPolicy" // DeleteCorsPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteCorsPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -310,6 +318,7 @@ func (c *MediaStore) DeleteCorsPolicyRequest(input *DeleteCorsPolicyInput) (req output = &DeleteCorsPolicyOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -331,13 +340,14 @@ func (c *MediaStore) DeleteCorsPolicyRequest(input *DeleteCorsPolicyInput) (req // // Returned Error Codes: // * ErrCodeContainerInUseException "ContainerInUseException" -// Resource already exists or is being updated. +// The container that you specified in the request already exists or is being +// updated. // // * ErrCodeContainerNotFoundException "ContainerNotFoundException" -// Could not perform an operation on a container that does not exist. +// The container that you specified in the request does not exist. // // * ErrCodeCorsPolicyNotFoundException "CorsPolicyNotFoundException" -// Could not perform an operation on a policy that does not exist. +// The CORS policy that you specified in the request does not exist. // // * ErrCodeInternalServerError "InternalServerError" // The service is temporarily unavailable. @@ -364,12 +374,102 @@ func (c *MediaStore) DeleteCorsPolicyWithContext(ctx aws.Context, input *DeleteC return out, req.Send() } +const opDeleteLifecyclePolicy = "DeleteLifecyclePolicy" + +// DeleteLifecyclePolicyRequest generates a "aws/request.Request" representing the +// client's request for the DeleteLifecyclePolicy 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 DeleteLifecyclePolicy for more information on using the DeleteLifecyclePolicy +// 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 DeleteLifecyclePolicyRequest method. +// req, resp := client.DeleteLifecyclePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteLifecyclePolicy +func (c *MediaStore) DeleteLifecyclePolicyRequest(input *DeleteLifecyclePolicyInput) (req *request.Request, output *DeleteLifecyclePolicyOutput) { + op := &request.Operation{ + Name: opDeleteLifecyclePolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteLifecyclePolicyInput{} + } + + output = &DeleteLifecyclePolicyOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteLifecyclePolicy API operation for AWS Elemental MediaStore. +// +// Removes an object lifecycle policy from a container. +// +// 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 Elemental MediaStore's +// API operation DeleteLifecyclePolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeContainerInUseException "ContainerInUseException" +// The container that you specified in the request already exists or is being +// updated. +// +// * ErrCodeContainerNotFoundException "ContainerNotFoundException" +// The container that you specified in the request does not exist. +// +// * ErrCodePolicyNotFoundException "PolicyNotFoundException" +// The policy that you specified in the request does not exist. +// +// * ErrCodeInternalServerError "InternalServerError" +// The service is temporarily unavailable. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteLifecyclePolicy +func (c *MediaStore) DeleteLifecyclePolicy(input *DeleteLifecyclePolicyInput) (*DeleteLifecyclePolicyOutput, error) { + req, out := c.DeleteLifecyclePolicyRequest(input) + return out, req.Send() +} + +// DeleteLifecyclePolicyWithContext is the same as DeleteLifecyclePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteLifecyclePolicy 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 *MediaStore) DeleteLifecyclePolicyWithContext(ctx aws.Context, input *DeleteLifecyclePolicyInput, opts ...request.Option) (*DeleteLifecyclePolicyOutput, error) { + req, out := c.DeleteLifecyclePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeContainer = "DescribeContainer" // DescribeContainerRequest generates a "aws/request.Request" representing the // client's request for the DescribeContainer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -424,7 +524,7 @@ func (c *MediaStore) DescribeContainerRequest(input *DescribeContainerInput) (re // // Returned Error Codes: // * ErrCodeContainerNotFoundException "ContainerNotFoundException" -// Could not perform an operation on a container that does not exist. +// The container that you specified in the request does not exist. // // * ErrCodeInternalServerError "InternalServerError" // The service is temporarily unavailable. @@ -456,7 +556,7 @@ const opGetContainerPolicy = "GetContainerPolicy" // GetContainerPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetContainerPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -508,13 +608,14 @@ func (c *MediaStore) GetContainerPolicyRequest(input *GetContainerPolicyInput) ( // // Returned Error Codes: // * ErrCodeContainerInUseException "ContainerInUseException" -// Resource already exists or is being updated. +// The container that you specified in the request already exists or is being +// updated. // // * ErrCodeContainerNotFoundException "ContainerNotFoundException" -// Could not perform an operation on a container that does not exist. +// The container that you specified in the request does not exist. // // * ErrCodePolicyNotFoundException "PolicyNotFoundException" -// Could not perform an operation on a policy that does not exist. +// The policy that you specified in the request does not exist. // // * ErrCodeInternalServerError "InternalServerError" // The service is temporarily unavailable. @@ -546,7 +647,7 @@ const opGetCorsPolicy = "GetCorsPolicy" // GetCorsPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetCorsPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -601,13 +702,14 @@ func (c *MediaStore) GetCorsPolicyRequest(input *GetCorsPolicyInput) (req *reque // // Returned Error Codes: // * ErrCodeContainerInUseException "ContainerInUseException" -// Resource already exists or is being updated. +// The container that you specified in the request already exists or is being +// updated. // // * ErrCodeContainerNotFoundException "ContainerNotFoundException" -// Could not perform an operation on a container that does not exist. +// The container that you specified in the request does not exist. // // * ErrCodeCorsPolicyNotFoundException "CorsPolicyNotFoundException" -// Could not perform an operation on a policy that does not exist. +// The CORS policy that you specified in the request does not exist. // // * ErrCodeInternalServerError "InternalServerError" // The service is temporarily unavailable. @@ -634,12 +736,101 @@ func (c *MediaStore) GetCorsPolicyWithContext(ctx aws.Context, input *GetCorsPol return out, req.Send() } +const opGetLifecyclePolicy = "GetLifecyclePolicy" + +// GetLifecyclePolicyRequest generates a "aws/request.Request" representing the +// client's request for the GetLifecyclePolicy 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 GetLifecyclePolicy for more information on using the GetLifecyclePolicy +// 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 GetLifecyclePolicyRequest method. +// req, resp := client.GetLifecyclePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetLifecyclePolicy +func (c *MediaStore) GetLifecyclePolicyRequest(input *GetLifecyclePolicyInput) (req *request.Request, output *GetLifecyclePolicyOutput) { + op := &request.Operation{ + Name: opGetLifecyclePolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetLifecyclePolicyInput{} + } + + output = &GetLifecyclePolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetLifecyclePolicy API operation for AWS Elemental MediaStore. +// +// Retrieves the object lifecycle policy that is assigned to a container. +// +// 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 Elemental MediaStore's +// API operation GetLifecyclePolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeContainerInUseException "ContainerInUseException" +// The container that you specified in the request already exists or is being +// updated. +// +// * ErrCodeContainerNotFoundException "ContainerNotFoundException" +// The container that you specified in the request does not exist. +// +// * ErrCodePolicyNotFoundException "PolicyNotFoundException" +// The policy that you specified in the request does not exist. +// +// * ErrCodeInternalServerError "InternalServerError" +// The service is temporarily unavailable. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetLifecyclePolicy +func (c *MediaStore) GetLifecyclePolicy(input *GetLifecyclePolicyInput) (*GetLifecyclePolicyOutput, error) { + req, out := c.GetLifecyclePolicyRequest(input) + return out, req.Send() +} + +// GetLifecyclePolicyWithContext is the same as GetLifecyclePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See GetLifecyclePolicy 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 *MediaStore) GetLifecyclePolicyWithContext(ctx aws.Context, input *GetLifecyclePolicyInput, opts ...request.Option) (*GetLifecyclePolicyOutput, error) { + req, out := c.GetLifecyclePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListContainers = "ListContainers" // ListContainersRequest generates a "aws/request.Request" representing the // client's request for the ListContainers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -727,7 +918,7 @@ const opPutContainerPolicy = "PutContainerPolicy" // PutContainerPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutContainerPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -761,6 +952,7 @@ func (c *MediaStore) PutContainerPolicyRequest(input *PutContainerPolicyInput) ( output = &PutContainerPolicyOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -784,10 +976,11 @@ func (c *MediaStore) PutContainerPolicyRequest(input *PutContainerPolicyInput) ( // // Returned Error Codes: // * ErrCodeContainerNotFoundException "ContainerNotFoundException" -// Could not perform an operation on a container that does not exist. +// The container that you specified in the request does not exist. // // * ErrCodeContainerInUseException "ContainerInUseException" -// Resource already exists or is being updated. +// The container that you specified in the request already exists or is being +// updated. // // * ErrCodeInternalServerError "InternalServerError" // The service is temporarily unavailable. @@ -819,7 +1012,7 @@ const opPutCorsPolicy = "PutCorsPolicy" // PutCorsPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutCorsPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -853,6 +1046,7 @@ func (c *MediaStore) PutCorsPolicyRequest(input *PutCorsPolicyInput) (req *reque output = &PutCorsPolicyOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -879,10 +1073,11 @@ func (c *MediaStore) PutCorsPolicyRequest(input *PutCorsPolicyInput) (req *reque // // Returned Error Codes: // * ErrCodeContainerNotFoundException "ContainerNotFoundException" -// Could not perform an operation on a container that does not exist. +// The container that you specified in the request does not exist. // // * ErrCodeContainerInUseException "ContainerInUseException" -// Resource already exists or is being updated. +// The container that you specified in the request already exists or is being +// updated. // // * ErrCodeInternalServerError "InternalServerError" // The service is temporarily unavailable. @@ -909,6 +1104,95 @@ func (c *MediaStore) PutCorsPolicyWithContext(ctx aws.Context, input *PutCorsPol return out, req.Send() } +const opPutLifecyclePolicy = "PutLifecyclePolicy" + +// PutLifecyclePolicyRequest generates a "aws/request.Request" representing the +// client's request for the PutLifecyclePolicy 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 PutLifecyclePolicy for more information on using the PutLifecyclePolicy +// 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 PutLifecyclePolicyRequest method. +// req, resp := client.PutLifecyclePolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutLifecyclePolicy +func (c *MediaStore) PutLifecyclePolicyRequest(input *PutLifecyclePolicyInput) (req *request.Request, output *PutLifecyclePolicyOutput) { + op := &request.Operation{ + Name: opPutLifecyclePolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutLifecyclePolicyInput{} + } + + output = &PutLifecyclePolicyOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// PutLifecyclePolicy API operation for AWS Elemental MediaStore. +// +// Writes an object lifecycle policy to a container. If the container already +// has an object lifecycle policy, the service replaces the existing policy +// with the new policy. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS Elemental MediaStore's +// API operation PutLifecyclePolicy for usage and error information. +// +// Returned Error Codes: +// * ErrCodeContainerInUseException "ContainerInUseException" +// The container that you specified in the request already exists or is being +// updated. +// +// * ErrCodeContainerNotFoundException "ContainerNotFoundException" +// The container that you specified in the request does not exist. +// +// * ErrCodeInternalServerError "InternalServerError" +// The service is temporarily unavailable. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutLifecyclePolicy +func (c *MediaStore) PutLifecyclePolicy(input *PutLifecyclePolicyInput) (*PutLifecyclePolicyOutput, error) { + req, out := c.PutLifecyclePolicyRequest(input) + return out, req.Send() +} + +// PutLifecyclePolicyWithContext is the same as PutLifecyclePolicy with the addition of +// the ability to pass a context and additional request options. +// +// See PutLifecyclePolicy 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 *MediaStore) PutLifecyclePolicyWithContext(ctx aws.Context, input *PutLifecyclePolicyInput, opts ...request.Option) (*PutLifecyclePolicyOutput, error) { + req, out := c.PutLifecyclePolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + // This section describes operations that you can perform on an AWS Elemental // MediaStore container. type Container struct { @@ -992,23 +1276,27 @@ type CorsRule struct { // rule. Only the headers that were requested are sent back. // // This element can contain only one wildcard character (*). - AllowedHeaders []*string `type:"list"` + // + // AllowedHeaders is a required field + AllowedHeaders []*string `type:"list" required:"true"` // Identifies an HTTP method that the origin that is specified in the rule is // allowed to execute. // - // Each CORS rule must contain at least one AllowedMethod and one AllowedOrigin + // Each CORS rule must contain at least one AllowedMethods and one AllowedOrigins // element. - AllowedMethods []*string `type:"list"` + AllowedMethods []*string `min:"1" type:"list"` // One or more response headers that you want users to be able to access from // their applications (for example, from a JavaScript XMLHttpRequest object). // - // Each CORS rule must have at least one AllowedOrigin element. The string value - // can include only one wildcard character (*), for example, http://*.example.com. + // Each CORS rule must have at least one AllowedOrigins element. The string + // value can include only one wildcard character (*), for example, http://*.example.com. // Additionally, you can specify only one wildcard character to allow cross-origin // access for all origins. - AllowedOrigins []*string `type:"list"` + // + // AllowedOrigins is a required field + AllowedOrigins []*string `min:"1" type:"list" required:"true"` // One or more headers in the response that you want users to be able to access // from their applications (for example, from a JavaScript XMLHttpRequest object). @@ -1033,6 +1321,28 @@ func (s CorsRule) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *CorsRule) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CorsRule"} + if s.AllowedHeaders == nil { + invalidParams.Add(request.NewErrParamRequired("AllowedHeaders")) + } + if s.AllowedMethods != nil && len(s.AllowedMethods) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AllowedMethods", 1)) + } + if s.AllowedOrigins == nil { + invalidParams.Add(request.NewErrParamRequired("AllowedOrigins")) + } + if s.AllowedOrigins != nil && len(s.AllowedOrigins) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AllowedOrigins", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetAllowedHeaders sets the AllowedHeaders field's value. func (s *CorsRule) SetAllowedHeaders(v []*string) *CorsRule { s.AllowedHeaders = v @@ -1311,6 +1621,61 @@ func (s DeleteCorsPolicyOutput) GoString() string { return s.String() } +type DeleteLifecyclePolicyInput struct { + _ struct{} `type:"structure"` + + // The name of the container that holds the object lifecycle policy. + // + // ContainerName is a required field + ContainerName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteLifecyclePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLifecyclePolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteLifecyclePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteLifecyclePolicyInput"} + if s.ContainerName == nil { + invalidParams.Add(request.NewErrParamRequired("ContainerName")) + } + if s.ContainerName != nil && len(*s.ContainerName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetContainerName sets the ContainerName field's value. +func (s *DeleteLifecyclePolicyInput) SetContainerName(v string) *DeleteLifecyclePolicyInput { + s.ContainerName = &v + return s +} + +type DeleteLifecyclePolicyOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteLifecyclePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteLifecyclePolicyOutput) GoString() string { + return s.String() +} + type DescribeContainerInput struct { _ struct{} `type:"structure"` @@ -1480,7 +1845,7 @@ func (s *GetCorsPolicyInput) SetContainerName(v string) *GetCorsPolicyInput { type GetCorsPolicyOutput struct { _ struct{} `type:"structure"` - // The CORS policy of the container. + // The CORS policy assigned to the container. // // CorsPolicy is a required field CorsPolicy []*CorsRule `min:"1" type:"list" required:"true"` @@ -1502,6 +1867,72 @@ func (s *GetCorsPolicyOutput) SetCorsPolicy(v []*CorsRule) *GetCorsPolicyOutput return s } +type GetLifecyclePolicyInput struct { + _ struct{} `type:"structure"` + + // The name of the container that the object lifecycle policy is assigned to. + // + // ContainerName is a required field + ContainerName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetLifecyclePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLifecyclePolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetLifecyclePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetLifecyclePolicyInput"} + if s.ContainerName == nil { + invalidParams.Add(request.NewErrParamRequired("ContainerName")) + } + if s.ContainerName != nil && len(*s.ContainerName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetContainerName sets the ContainerName field's value. +func (s *GetLifecyclePolicyInput) SetContainerName(v string) *GetLifecyclePolicyInput { + s.ContainerName = &v + return s +} + +type GetLifecyclePolicyOutput struct { + _ struct{} `type:"structure"` + + // The object lifecycle policy that is assigned to the container. + // + // LifecyclePolicy is a required field + LifecyclePolicy *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s GetLifecyclePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetLifecyclePolicyOutput) GoString() string { + return s.String() +} + +// SetLifecyclePolicy sets the LifecyclePolicy field's value. +func (s *GetLifecyclePolicyOutput) SetLifecyclePolicy(v string) *GetLifecyclePolicyOutput { + s.LifecyclePolicy = &v + return s +} + type ListContainersInput struct { _ struct{} `type:"structure"` @@ -1705,6 +2136,16 @@ func (s *PutCorsPolicyInput) Validate() error { if s.CorsPolicy != nil && len(s.CorsPolicy) < 1 { invalidParams.Add(request.NewErrParamMinLen("CorsPolicy", 1)) } + if s.CorsPolicy != nil { + for i, v := range s.CorsPolicy { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CorsPolicy", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -1738,6 +2179,76 @@ func (s PutCorsPolicyOutput) GoString() string { return s.String() } +type PutLifecyclePolicyInput struct { + _ struct{} `type:"structure"` + + // The name of the container that you want to assign the object lifecycle policy + // to. + // + // ContainerName is a required field + ContainerName *string `min:"1" type:"string" required:"true"` + + // The object lifecycle policy to apply to the container. + // + // LifecyclePolicy is a required field + LifecyclePolicy *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s PutLifecyclePolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutLifecyclePolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutLifecyclePolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutLifecyclePolicyInput"} + if s.ContainerName == nil { + invalidParams.Add(request.NewErrParamRequired("ContainerName")) + } + if s.ContainerName != nil && len(*s.ContainerName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) + } + if s.LifecyclePolicy == nil { + invalidParams.Add(request.NewErrParamRequired("LifecyclePolicy")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetContainerName sets the ContainerName field's value. +func (s *PutLifecyclePolicyInput) SetContainerName(v string) *PutLifecyclePolicyInput { + s.ContainerName = &v + return s +} + +// SetLifecyclePolicy sets the LifecyclePolicy field's value. +func (s *PutLifecyclePolicyInput) SetLifecyclePolicy(v string) *PutLifecyclePolicyInput { + s.LifecyclePolicy = &v + return s +} + +type PutLifecyclePolicyOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s PutLifecyclePolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutLifecyclePolicyOutput) GoString() string { + return s.String() +} + const ( // ContainerStatusActive is a ContainerStatus enum value ContainerStatusActive = "ACTIVE" diff --git a/vendor/github.com/aws/aws-sdk-go/service/mediastore/errors.go b/vendor/github.com/aws/aws-sdk-go/service/mediastore/errors.go index 11ebf2e517..f64caedd3b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mediastore/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mediastore/errors.go @@ -7,19 +7,20 @@ const ( // ErrCodeContainerInUseException for service response error code // "ContainerInUseException". // - // Resource already exists or is being updated. + // The container that you specified in the request already exists or is being + // updated. ErrCodeContainerInUseException = "ContainerInUseException" // ErrCodeContainerNotFoundException for service response error code // "ContainerNotFoundException". // - // Could not perform an operation on a container that does not exist. + // The container that you specified in the request does not exist. ErrCodeContainerNotFoundException = "ContainerNotFoundException" // ErrCodeCorsPolicyNotFoundException for service response error code // "CorsPolicyNotFoundException". // - // Could not perform an operation on a policy that does not exist. + // The CORS policy that you specified in the request does not exist. ErrCodeCorsPolicyNotFoundException = "CorsPolicyNotFoundException" // ErrCodeInternalServerError for service response error code @@ -37,6 +38,6 @@ const ( // ErrCodePolicyNotFoundException for service response error code // "PolicyNotFoundException". // - // Could not perform an operation on a policy that does not exist. + // The policy that you specified in the request does not exist. ErrCodePolicyNotFoundException = "PolicyNotFoundException" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/mq/api.go b/vendor/github.com/aws/aws-sdk-go/service/mq/api.go index f20f1286d8..7f030ac730 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/mq/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/mq/api.go @@ -8,6 +8,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "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 opCreateBroker = "CreateBroker" @@ -15,7 +17,7 @@ const opCreateBroker = "CreateBroker" // CreateBrokerRequest generates a "aws/request.Request" representing the // client's request for the CreateBroker operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -106,7 +108,7 @@ const opCreateConfiguration = "CreateConfiguration" // CreateConfigurationRequest generates a "aws/request.Request" representing the // client's request for the CreateConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -190,12 +192,101 @@ func (c *MQ) CreateConfigurationWithContext(ctx aws.Context, input *CreateConfig return out, req.Send() } +const opCreateTags = "CreateTags" + +// CreateTagsRequest generates a "aws/request.Request" representing the +// client's request for the CreateTags 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 CreateTags for more information on using the CreateTags +// 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 CreateTagsRequest method. +// req, resp := client.CreateTagsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/CreateTags +func (c *MQ) CreateTagsRequest(input *CreateTagsInput) (req *request.Request, output *CreateTagsOutput) { + op := &request.Operation{ + Name: opCreateTags, + HTTPMethod: "POST", + HTTPPath: "/v1/tags/{resource-arn}", + } + + if input == nil { + input = &CreateTagsInput{} + } + + output = &CreateTagsOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// CreateTags API operation for AmazonMQ. +// +// Add a tag to a resource. +// +// 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 AmazonMQ's +// API operation CreateTags for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// Returns information about an error. +// +// * ErrCodeBadRequestException "BadRequestException" +// Returns information about an error. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Returns information about an error. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Returns information about an error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/CreateTags +func (c *MQ) CreateTags(input *CreateTagsInput) (*CreateTagsOutput, error) { + req, out := c.CreateTagsRequest(input) + return out, req.Send() +} + +// CreateTagsWithContext is the same as CreateTags with the addition of +// the ability to pass a context and additional request options. +// +// See CreateTags 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 *MQ) CreateTagsWithContext(ctx aws.Context, input *CreateTagsInput, opts ...request.Option) (*CreateTagsOutput, error) { + req, out := c.CreateTagsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateUser = "CreateUser" // CreateUserRequest generates a "aws/request.Request" representing the // client's request for the CreateUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -229,6 +320,7 @@ func (c *MQ) CreateUserRequest(input *CreateUserRequest) (req *request.Request, output = &CreateUserOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -286,7 +378,7 @@ const opDeleteBroker = "DeleteBroker" // DeleteBrokerRequest generates a "aws/request.Request" representing the // client's request for the DeleteBroker operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -369,12 +461,101 @@ func (c *MQ) DeleteBrokerWithContext(ctx aws.Context, input *DeleteBrokerInput, return out, req.Send() } +const opDeleteTags = "DeleteTags" + +// DeleteTagsRequest generates a "aws/request.Request" representing the +// client's request for the DeleteTags 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 DeleteTags for more information on using the DeleteTags +// 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 DeleteTagsRequest method. +// req, resp := client.DeleteTagsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/DeleteTags +func (c *MQ) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, output *DeleteTagsOutput) { + op := &request.Operation{ + Name: opDeleteTags, + HTTPMethod: "DELETE", + HTTPPath: "/v1/tags/{resource-arn}", + } + + if input == nil { + input = &DeleteTagsInput{} + } + + output = &DeleteTagsOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteTags API operation for AmazonMQ. +// +// Remove a tag from a resource. +// +// 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 AmazonMQ's +// API operation DeleteTags for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// Returns information about an error. +// +// * ErrCodeBadRequestException "BadRequestException" +// Returns information about an error. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Returns information about an error. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Returns information about an error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/DeleteTags +func (c *MQ) DeleteTags(input *DeleteTagsInput) (*DeleteTagsOutput, error) { + req, out := c.DeleteTagsRequest(input) + return out, req.Send() +} + +// DeleteTagsWithContext is the same as DeleteTags with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteTags 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 *MQ) DeleteTagsWithContext(ctx aws.Context, input *DeleteTagsInput, opts ...request.Option) (*DeleteTagsOutput, error) { + req, out := c.DeleteTagsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteUser = "DeleteUser" // DeleteUserRequest generates a "aws/request.Request" representing the // client's request for the DeleteUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -408,6 +589,7 @@ func (c *MQ) DeleteUserRequest(input *DeleteUserInput) (req *request.Request, ou output = &DeleteUserOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -462,7 +644,7 @@ const opDescribeBroker = "DescribeBroker" // DescribeBrokerRequest generates a "aws/request.Request" representing the // client's request for the DescribeBroker operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -550,7 +732,7 @@ const opDescribeConfiguration = "DescribeConfiguration" // DescribeConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -638,7 +820,7 @@ const opDescribeConfigurationRevision = "DescribeConfigurationRevision" // DescribeConfigurationRevisionRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigurationRevision operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -726,7 +908,7 @@ const opDescribeUser = "DescribeUser" // DescribeUserRequest generates a "aws/request.Request" representing the // client's request for the DescribeUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -814,7 +996,7 @@ const opListBrokers = "ListBrokers" // ListBrokersRequest generates a "aws/request.Request" representing the // client's request for the ListBrokers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -899,7 +1081,7 @@ const opListConfigurationRevisions = "ListConfigurationRevisions" // ListConfigurationRevisionsRequest generates a "aws/request.Request" representing the // client's request for the ListConfigurationRevisions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -987,7 +1169,7 @@ const opListConfigurations = "ListConfigurations" // ListConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the ListConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1067,12 +1249,100 @@ func (c *MQ) ListConfigurationsWithContext(ctx aws.Context, input *ListConfigura return out, req.Send() } +const opListTags = "ListTags" + +// ListTagsRequest generates a "aws/request.Request" representing the +// client's request for the ListTags 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 ListTags for more information on using the ListTags +// 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 ListTagsRequest method. +// req, resp := client.ListTagsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/ListTags +func (c *MQ) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) { + op := &request.Operation{ + Name: opListTags, + HTTPMethod: "GET", + HTTPPath: "/v1/tags/{resource-arn}", + } + + if input == nil { + input = &ListTagsInput{} + } + + output = &ListTagsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTags API operation for AmazonMQ. +// +// Lists tags for a resource. +// +// 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 AmazonMQ's +// API operation ListTags for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNotFoundException "NotFoundException" +// Returns information about an error. +// +// * ErrCodeBadRequestException "BadRequestException" +// Returns information about an error. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Returns information about an error. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Returns information about an error. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/mq-2017-11-27/ListTags +func (c *MQ) ListTags(input *ListTagsInput) (*ListTagsOutput, error) { + req, out := c.ListTagsRequest(input) + return out, req.Send() +} + +// ListTagsWithContext is the same as ListTags with the addition of +// the ability to pass a context and additional request options. +// +// See ListTags 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 *MQ) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) { + req, out := c.ListTagsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListUsers = "ListUsers" // ListUsersRequest generates a "aws/request.Request" representing the // client's request for the ListUsers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1160,7 +1430,7 @@ const opRebootBroker = "RebootBroker" // RebootBrokerRequest generates a "aws/request.Request" representing the // client's request for the RebootBroker operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1194,6 +1464,7 @@ func (c *MQ) RebootBrokerRequest(input *RebootBrokerInput) (req *request.Request output = &RebootBrokerOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1248,7 +1519,7 @@ const opUpdateBroker = "UpdateBroker" // UpdateBrokerRequest generates a "aws/request.Request" representing the // client's request for the UpdateBroker operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1306,6 +1577,9 @@ func (c *MQ) UpdateBrokerRequest(input *UpdateBrokerRequest) (req *request.Reque // * ErrCodeInternalServerErrorException "InternalServerErrorException" // Returns information about an error. // +// * ErrCodeConflictException "ConflictException" +// Returns information about an error. +// // * ErrCodeForbiddenException "ForbiddenException" // Returns information about an error. // @@ -1336,7 +1610,7 @@ const opUpdateConfiguration = "UpdateConfiguration" // UpdateConfigurationRequest generates a "aws/request.Request" representing the // client's request for the UpdateConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1427,7 +1701,7 @@ const opUpdateUser = "UpdateUser" // UpdateUserRequest generates a "aws/request.Request" representing the // client's request for the UpdateUser operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1461,6 +1735,7 @@ func (c *MQ) UpdateUserRequest(input *UpdateUserRequest) (req *request.Request, output = &UpdateUserOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1523,7 +1798,7 @@ type BrokerInstance struct { // The broker's wire-level protocol endpoints. Endpoints []*string `locationName:"endpoints" type:"list"` - // The IP address of the ENI attached to the broker. + // The IP address of the Elastic Network Interface (ENI) attached to the broker. IpAddress *string `locationName:"ipAddress" type:"string"` } @@ -1653,7 +1928,8 @@ type Configuration struct { // only ACTIVEMQ. EngineType *string `locationName:"engineType" type:"string" enum:"EngineType"` - // Required. The version of the broker engine. + // Required. The version of the broker engine. For a list of supported engine + // versions, see https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/broker-engine.html EngineVersion *string `locationName:"engineVersion" type:"string"` // Required. The unique ID that Amazon MQ generates for the configuration. @@ -1666,6 +1942,9 @@ type Configuration struct { // characters, dashes, periods, underscores, and tildes (- . _ ~). This value // must be 1-150 characters long. Name *string `locationName:"name" type:"string"` + + // The list of all tags associated with this configuration. + Tags map[string]*string `locationName:"tags" type:"map"` } // String returns the string representation @@ -1726,6 +2005,12 @@ func (s *Configuration) SetName(v string) *Configuration { return s } +// SetTags sets the Tags field's value. +func (s *Configuration) SetTags(v map[string]*string) *Configuration { + s.Tags = v + return s +} + // A list of information about the configuration. type ConfigurationId struct { _ struct{} `type:"structure"` @@ -1878,6 +2163,8 @@ type CreateBrokerRequest struct { SubnetIds []*string `locationName:"subnetIds" type:"list"` + Tags map[string]*string `locationName:"tags" type:"map"` + Users []*User `locationName:"users" type:"list"` } @@ -1969,6 +2256,12 @@ func (s *CreateBrokerRequest) SetSubnetIds(v []*string) *CreateBrokerRequest { return s } +// SetTags sets the Tags field's value. +func (s *CreateBrokerRequest) SetTags(v map[string]*string) *CreateBrokerRequest { + s.Tags = v + return s +} + // SetUsers sets the Users field's value. func (s *CreateBrokerRequest) SetUsers(v []*User) *CreateBrokerRequest { s.Users = v @@ -2014,6 +2307,8 @@ type CreateConfigurationRequest struct { EngineVersion *string `locationName:"engineVersion" type:"string"` Name *string `locationName:"name" type:"string"` + + Tags map[string]*string `locationName:"tags" type:"map"` } // String returns the string representation @@ -2044,6 +2339,12 @@ func (s *CreateConfigurationRequest) SetName(v string) *CreateConfigurationReque return s } +// SetTags sets the Tags field's value. +func (s *CreateConfigurationRequest) SetTags(v map[string]*string) *CreateConfigurationRequest { + s.Tags = v + return s +} + type CreateConfigurationResponse struct { _ struct{} `type:"structure"` @@ -2099,6 +2400,67 @@ func (s *CreateConfigurationResponse) SetName(v string) *CreateConfigurationResp return s } +type CreateTagsInput struct { + _ struct{} `type:"structure"` + + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resource-arn" type:"string" required:"true"` + + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// String returns the string representation +func (s CreateTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTagsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTagsInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *CreateTagsInput) SetResourceArn(v string) *CreateTagsInput { + s.ResourceArn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateTagsInput) SetTags(v map[string]*string) *CreateTagsInput { + s.Tags = v + return s +} + +type CreateTagsOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s CreateTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTagsOutput) GoString() string { + return s.String() +} + type CreateUserOutput struct { _ struct{} `type:"structure"` } @@ -2145,9 +2507,15 @@ func (s *CreateUserRequest) Validate() error { if s.BrokerId == nil { invalidParams.Add(request.NewErrParamRequired("BrokerId")) } + if s.BrokerId != nil && len(*s.BrokerId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BrokerId", 1)) + } if s.Username == nil { invalidParams.Add(request.NewErrParamRequired("Username")) } + if s.Username != nil && len(*s.Username) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Username", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -2208,6 +2576,9 @@ func (s *DeleteBrokerInput) Validate() error { if s.BrokerId == nil { invalidParams.Add(request.NewErrParamRequired("BrokerId")) } + if s.BrokerId != nil && len(*s.BrokerId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BrokerId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -2243,6 +2614,71 @@ func (s *DeleteBrokerResponse) SetBrokerId(v string) *DeleteBrokerResponse { return s } +type DeleteTagsInput struct { + _ struct{} `type:"structure"` + + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resource-arn" type:"string" required:"true"` + + // TagKeys is a required field + TagKeys []*string `location:"querystring" locationName:"tagKeys" type:"list" required:"true"` +} + +// String returns the string representation +func (s DeleteTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTagsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTagsInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *DeleteTagsInput) SetResourceArn(v string) *DeleteTagsInput { + s.ResourceArn = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *DeleteTagsInput) SetTagKeys(v []*string) *DeleteTagsInput { + s.TagKeys = v + return s +} + +type DeleteTagsOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTagsOutput) GoString() string { + return s.String() +} + type DeleteUserInput struct { _ struct{} `type:"structure"` @@ -2269,9 +2705,15 @@ func (s *DeleteUserInput) Validate() error { if s.BrokerId == nil { invalidParams.Add(request.NewErrParamRequired("BrokerId")) } + if s.BrokerId != nil && len(*s.BrokerId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BrokerId", 1)) + } if s.Username == nil { invalidParams.Add(request.NewErrParamRequired("Username")) } + if s.Username != nil && len(*s.Username) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Username", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -2328,6 +2770,9 @@ func (s *DescribeBrokerInput) Validate() error { if s.BrokerId == nil { invalidParams.Add(request.NewErrParamRequired("BrokerId")) } + if s.BrokerId != nil && len(*s.BrokerId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BrokerId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -2380,12 +2825,16 @@ type DescribeBrokerResponse struct { // apply pending updates or patches to the broker. MaintenanceWindowStartTime *WeeklyStartTime `locationName:"maintenanceWindowStartTime" type:"structure"` + PendingEngineVersion *string `locationName:"pendingEngineVersion" type:"string"` + PubliclyAccessible *bool `locationName:"publiclyAccessible" type:"boolean"` SecurityGroups []*string `locationName:"securityGroups" type:"list"` SubnetIds []*string `locationName:"subnetIds" type:"list"` + Tags map[string]*string `locationName:"tags" type:"map"` + Users []*UserSummary `locationName:"users" type:"list"` } @@ -2483,6 +2932,12 @@ func (s *DescribeBrokerResponse) SetMaintenanceWindowStartTime(v *WeeklyStartTim return s } +// SetPendingEngineVersion sets the PendingEngineVersion field's value. +func (s *DescribeBrokerResponse) SetPendingEngineVersion(v string) *DescribeBrokerResponse { + s.PendingEngineVersion = &v + return s +} + // SetPubliclyAccessible sets the PubliclyAccessible field's value. func (s *DescribeBrokerResponse) SetPubliclyAccessible(v bool) *DescribeBrokerResponse { s.PubliclyAccessible = &v @@ -2501,6 +2956,12 @@ func (s *DescribeBrokerResponse) SetSubnetIds(v []*string) *DescribeBrokerRespon return s } +// SetTags sets the Tags field's value. +func (s *DescribeBrokerResponse) SetTags(v map[string]*string) *DescribeBrokerResponse { + s.Tags = v + return s +} + // SetUsers sets the Users field's value. func (s *DescribeBrokerResponse) SetUsers(v []*UserSummary) *DescribeBrokerResponse { s.Users = v @@ -2530,6 +2991,9 @@ func (s *DescribeConfigurationInput) Validate() error { if s.ConfigurationId == nil { invalidParams.Add(request.NewErrParamRequired("ConfigurationId")) } + if s.ConfigurationId != nil && len(*s.ConfigurationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConfigurationId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -2563,6 +3027,8 @@ type DescribeConfigurationOutput struct { LatestRevision *ConfigurationRevision `locationName:"latestRevision" type:"structure"` Name *string `locationName:"name" type:"string"` + + Tags map[string]*string `locationName:"tags" type:"map"` } // String returns the string representation @@ -2623,6 +3089,12 @@ func (s *DescribeConfigurationOutput) SetName(v string) *DescribeConfigurationOu return s } +// SetTags sets the Tags field's value. +func (s *DescribeConfigurationOutput) SetTags(v map[string]*string) *DescribeConfigurationOutput { + s.Tags = v + return s +} + type DescribeConfigurationRevisionInput struct { _ struct{} `type:"structure"` @@ -2649,9 +3121,15 @@ func (s *DescribeConfigurationRevisionInput) Validate() error { if s.ConfigurationId == nil { invalidParams.Add(request.NewErrParamRequired("ConfigurationId")) } + if s.ConfigurationId != nil && len(*s.ConfigurationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConfigurationId", 1)) + } if s.ConfigurationRevision == nil { invalidParams.Add(request.NewErrParamRequired("ConfigurationRevision")) } + if s.ConfigurationRevision != nil && len(*s.ConfigurationRevision) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConfigurationRevision", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -2743,9 +3221,15 @@ func (s *DescribeUserInput) Validate() error { if s.BrokerId == nil { invalidParams.Add(request.NewErrParamRequired("BrokerId")) } + if s.BrokerId != nil && len(*s.BrokerId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BrokerId", 1)) + } if s.Username == nil { invalidParams.Add(request.NewErrParamRequired("Username")) } + if s.Username != nil && len(*s.Username) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Username", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -2921,6 +3405,9 @@ func (s *ListConfigurationRevisionsInput) Validate() error { if s.ConfigurationId == nil { invalidParams.Add(request.NewErrParamRequired("ConfigurationId")) } + if s.ConfigurationId != nil && len(*s.ConfigurationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConfigurationId", 1)) + } if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } @@ -3076,6 +3563,67 @@ func (s *ListConfigurationsResponse) SetNextToken(v string) *ListConfigurationsR return s } +type ListTagsInput struct { + _ struct{} `type:"structure"` + + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resource-arn" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *ListTagsInput) SetResourceArn(v string) *ListTagsInput { + s.ResourceArn = &v + return s +} + +type ListTagsOutput struct { + _ struct{} `type:"structure"` + + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// String returns the string representation +func (s ListTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsOutput) GoString() string { + return s.String() +} + +// SetTags sets the Tags field's value. +func (s *ListTagsOutput) SetTags(v map[string]*string) *ListTagsOutput { + s.Tags = v + return s +} + type ListUsersInput struct { _ struct{} `type:"structure"` @@ -3103,6 +3651,9 @@ func (s *ListUsersInput) Validate() error { if s.BrokerId == nil { invalidParams.Add(request.NewErrParamRequired("BrokerId")) } + if s.BrokerId != nil && len(*s.BrokerId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BrokerId", 1)) + } if s.MaxResults != nil && *s.MaxResults < 1 { invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) } @@ -3220,13 +3771,13 @@ type LogsSummary struct { // ActiveMQ Web Console is logged. Audit *bool `locationName:"audit" type:"boolean"` - // Location of CloudWatch Log group where audit logs will be sent. + // The location of the CloudWatch Logs log group where audit logs are sent. AuditLogGroup *string `locationName:"auditLogGroup" type:"string"` // Enables general logging. General *bool `locationName:"general" type:"boolean"` - // Location of CloudWatch Log group where general logs will be sent. + // The location of the CloudWatch Logs log group where general logs are sent. GeneralLogGroup *string `locationName:"generalLogGroup" type:"string"` // The list of information about logs pending to be deployed for the specified @@ -3331,6 +3882,9 @@ func (s *RebootBrokerInput) Validate() error { if s.BrokerId == nil { invalidParams.Add(request.NewErrParamRequired("BrokerId")) } + if s.BrokerId != nil && len(*s.BrokerId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BrokerId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -3404,12 +3958,16 @@ func (s *SanitizationWarning) SetReason(v string) *SanitizationWarning { type UpdateBrokerRequest struct { _ struct{} `type:"structure"` + AutoMinorVersionUpgrade *bool `locationName:"autoMinorVersionUpgrade" type:"boolean"` + // BrokerId is a required field BrokerId *string `location:"uri" locationName:"broker-id" type:"string" required:"true"` // A list of information about the configuration. Configuration *ConfigurationId `locationName:"configuration" type:"structure"` + EngineVersion *string `locationName:"engineVersion" type:"string"` + // The list of information about logs to be enabled for the specified broker. Logs *Logs `locationName:"logs" type:"structure"` } @@ -3430,6 +3988,9 @@ func (s *UpdateBrokerRequest) Validate() error { if s.BrokerId == nil { invalidParams.Add(request.NewErrParamRequired("BrokerId")) } + if s.BrokerId != nil && len(*s.BrokerId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BrokerId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -3437,6 +3998,12 @@ func (s *UpdateBrokerRequest) Validate() error { return nil } +// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. +func (s *UpdateBrokerRequest) SetAutoMinorVersionUpgrade(v bool) *UpdateBrokerRequest { + s.AutoMinorVersionUpgrade = &v + return s +} + // SetBrokerId sets the BrokerId field's value. func (s *UpdateBrokerRequest) SetBrokerId(v string) *UpdateBrokerRequest { s.BrokerId = &v @@ -3449,6 +4016,12 @@ func (s *UpdateBrokerRequest) SetConfiguration(v *ConfigurationId) *UpdateBroker return s } +// SetEngineVersion sets the EngineVersion field's value. +func (s *UpdateBrokerRequest) SetEngineVersion(v string) *UpdateBrokerRequest { + s.EngineVersion = &v + return s +} + // SetLogs sets the Logs field's value. func (s *UpdateBrokerRequest) SetLogs(v *Logs) *UpdateBrokerRequest { s.Logs = v @@ -3458,11 +4031,15 @@ func (s *UpdateBrokerRequest) SetLogs(v *Logs) *UpdateBrokerRequest { type UpdateBrokerResponse struct { _ struct{} `type:"structure"` + AutoMinorVersionUpgrade *bool `locationName:"autoMinorVersionUpgrade" type:"boolean"` + BrokerId *string `locationName:"brokerId" type:"string"` // A list of information about the configuration. Configuration *ConfigurationId `locationName:"configuration" type:"structure"` + EngineVersion *string `locationName:"engineVersion" type:"string"` + // The list of information about logs to be enabled for the specified broker. Logs *Logs `locationName:"logs" type:"structure"` } @@ -3477,6 +4054,12 @@ func (s UpdateBrokerResponse) GoString() string { return s.String() } +// SetAutoMinorVersionUpgrade sets the AutoMinorVersionUpgrade field's value. +func (s *UpdateBrokerResponse) SetAutoMinorVersionUpgrade(v bool) *UpdateBrokerResponse { + s.AutoMinorVersionUpgrade = &v + return s +} + // SetBrokerId sets the BrokerId field's value. func (s *UpdateBrokerResponse) SetBrokerId(v string) *UpdateBrokerResponse { s.BrokerId = &v @@ -3489,6 +4072,12 @@ func (s *UpdateBrokerResponse) SetConfiguration(v *ConfigurationId) *UpdateBroke return s } +// SetEngineVersion sets the EngineVersion field's value. +func (s *UpdateBrokerResponse) SetEngineVersion(v string) *UpdateBrokerResponse { + s.EngineVersion = &v + return s +} + // SetLogs sets the Logs field's value. func (s *UpdateBrokerResponse) SetLogs(v *Logs) *UpdateBrokerResponse { s.Logs = v @@ -3522,6 +4111,9 @@ func (s *UpdateConfigurationRequest) Validate() error { if s.ConfigurationId == nil { invalidParams.Add(request.NewErrParamRequired("ConfigurationId")) } + if s.ConfigurationId != nil && len(*s.ConfigurationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ConfigurationId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -3656,9 +4248,15 @@ func (s *UpdateUserRequest) Validate() error { if s.BrokerId == nil { invalidParams.Add(request.NewErrParamRequired("BrokerId")) } + if s.BrokerId != nil && len(*s.BrokerId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BrokerId", 1)) + } if s.Username == nil { invalidParams.Add(request.NewErrParamRequired("Username")) } + if s.Username != nil && len(*s.Username) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Username", 1)) + } if invalidParams.Len() > 0 { return invalidParams diff --git a/vendor/github.com/aws/aws-sdk-go/service/neptune/api.go b/vendor/github.com/aws/aws-sdk-go/service/neptune/api.go index be502aa909..93179fe42b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/neptune/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/neptune/api.go @@ -18,7 +18,7 @@ const opAddRoleToDBCluster = "AddRoleToDBCluster" // AddRoleToDBClusterRequest generates a "aws/request.Request" representing the // client's request for the AddRoleToDBCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -52,8 +52,7 @@ func (c *Neptune) AddRoleToDBClusterRequest(input *AddRoleToDBClusterInput) (req output = &AddRoleToDBClusterOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -111,7 +110,7 @@ const opAddSourceIdentifierToSubscription = "AddSourceIdentifierToSubscription" // AddSourceIdentifierToSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the AddSourceIdentifierToSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -191,7 +190,7 @@ const opAddTagsToResource = "AddTagsToResource" // AddTagsToResourceRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -225,8 +224,7 @@ func (c *Neptune) AddTagsToResourceRequest(input *AddTagsToResourceInput) (req * output = &AddTagsToResourceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -281,7 +279,7 @@ const opApplyPendingMaintenanceAction = "ApplyPendingMaintenanceAction" // ApplyPendingMaintenanceActionRequest generates a "aws/request.Request" representing the // client's request for the ApplyPendingMaintenanceAction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -361,7 +359,7 @@ const opCopyDBClusterParameterGroup = "CopyDBClusterParameterGroup" // CopyDBClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the CopyDBClusterParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -447,7 +445,7 @@ const opCopyDBClusterSnapshot = "CopyDBClusterSnapshot" // CopyDBClusterSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CopyDBClusterSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -595,7 +593,7 @@ const opCopyDBParameterGroup = "CopyDBParameterGroup" // CopyDBParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the CopyDBParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -681,7 +679,7 @@ const opCreateDBCluster = "CreateDBCluster" // CreateDBClusterRequest generates a "aws/request.Request" representing the // client's request for the CreateDBCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -815,7 +813,7 @@ const opCreateDBClusterParameterGroup = "CreateDBClusterParameterGroup" // CreateDBClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateDBClusterParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -922,7 +920,7 @@ const opCreateDBClusterSnapshot = "CreateDBClusterSnapshot" // CreateDBClusterSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateDBClusterSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1013,7 +1011,7 @@ const opCreateDBInstance = "CreateDBInstance" // CreateDBInstanceRequest generates a "aws/request.Request" representing the // client's request for the CreateDBInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1151,7 +1149,7 @@ const opCreateDBParameterGroup = "CreateDBParameterGroup" // CreateDBParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateDBParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1254,7 +1252,7 @@ const opCreateDBSubnetGroup = "CreateDBSubnetGroup" // CreateDBSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateDBSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1349,7 +1347,7 @@ const opCreateEventSubscription = "CreateEventSubscription" // CreateEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the CreateEventSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1458,7 +1456,7 @@ const opDeleteDBCluster = "DeleteDBCluster" // DeleteDBClusterRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1552,7 +1550,7 @@ const opDeleteDBClusterParameterGroup = "DeleteDBClusterParameterGroup" // DeleteDBClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBClusterParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1586,8 +1584,7 @@ func (c *Neptune) DeleteDBClusterParameterGroupRequest(input *DeleteDBClusterPar output = &DeleteDBClusterParameterGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1639,7 +1636,7 @@ const opDeleteDBClusterSnapshot = "DeleteDBClusterSnapshot" // DeleteDBClusterSnapshotRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBClusterSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1724,7 +1721,7 @@ const opDeleteDBInstance = "DeleteDBInstance" // DeleteDBInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1839,7 +1836,7 @@ const opDeleteDBParameterGroup = "DeleteDBParameterGroup" // DeleteDBParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1873,8 +1870,7 @@ func (c *Neptune) DeleteDBParameterGroupRequest(input *DeleteDBParameterGroupInp output = &DeleteDBParameterGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1926,7 +1922,7 @@ const opDeleteDBSubnetGroup = "DeleteDBSubnetGroup" // DeleteDBSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1960,8 +1956,7 @@ func (c *Neptune) DeleteDBSubnetGroupRequest(input *DeleteDBSubnetGroupInput) (r output = &DeleteDBSubnetGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2015,7 +2010,7 @@ const opDeleteEventSubscription = "DeleteEventSubscription" // DeleteEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the DeleteEventSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2095,7 +2090,7 @@ const opDescribeDBClusterParameterGroups = "DescribeDBClusterParameterGroups" // DescribeDBClusterParameterGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBClusterParameterGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2176,7 +2171,7 @@ const opDescribeDBClusterParameters = "DescribeDBClusterParameters" // DescribeDBClusterParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBClusterParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2256,7 +2251,7 @@ const opDescribeDBClusterSnapshotAttributes = "DescribeDBClusterSnapshotAttribut // DescribeDBClusterSnapshotAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBClusterSnapshotAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2346,7 +2341,7 @@ const opDescribeDBClusterSnapshots = "DescribeDBClusterSnapshots" // DescribeDBClusterSnapshotsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBClusterSnapshots operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2426,7 +2421,7 @@ const opDescribeDBClusters = "DescribeDBClusters" // DescribeDBClustersRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBClusters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2505,7 +2500,7 @@ const opDescribeDBEngineVersions = "DescribeDBEngineVersions" // DescribeDBEngineVersionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBEngineVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2635,7 +2630,7 @@ const opDescribeDBInstances = "DescribeDBInstances" // DescribeDBInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2770,7 +2765,7 @@ const opDescribeDBParameterGroups = "DescribeDBParameterGroups" // DescribeDBParameterGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBParameterGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2907,7 +2902,7 @@ const opDescribeDBParameters = "DescribeDBParameters" // DescribeDBParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3042,7 +3037,7 @@ const opDescribeDBSubnetGroups = "DescribeDBSubnetGroups" // DescribeDBSubnetGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBSubnetGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3180,7 +3175,7 @@ const opDescribeEngineDefaultClusterParameters = "DescribeEngineDefaultClusterPa // DescribeEngineDefaultClusterParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeEngineDefaultClusterParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3255,7 +3250,7 @@ const opDescribeEngineDefaultParameters = "DescribeEngineDefaultParameters" // DescribeEngineDefaultParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeEngineDefaultParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3386,7 +3381,7 @@ const opDescribeEventCategories = "DescribeEventCategories" // DescribeEventCategoriesRequest generates a "aws/request.Request" representing the // client's request for the DescribeEventCategories operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3461,7 +3456,7 @@ const opDescribeEventSubscriptions = "DescribeEventSubscriptions" // DescribeEventSubscriptionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEventSubscriptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3599,7 +3594,7 @@ const opDescribeEvents = "DescribeEvents" // DescribeEventsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3733,7 +3728,7 @@ const opDescribeOrderableDBInstanceOptions = "DescribeOrderableDBInstanceOptions // DescribeOrderableDBInstanceOptionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeOrderableDBInstanceOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3863,7 +3858,7 @@ const opDescribePendingMaintenanceActions = "DescribePendingMaintenanceActions" // DescribePendingMaintenanceActionsRequest generates a "aws/request.Request" representing the // client's request for the DescribePendingMaintenanceActions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3943,7 +3938,7 @@ const opDescribeValidDBInstanceModifications = "DescribeValidDBInstanceModificat // DescribeValidDBInstanceModificationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeValidDBInstanceModifications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4027,7 +4022,7 @@ const opFailoverDBCluster = "FailoverDBCluster" // FailoverDBClusterRequest generates a "aws/request.Request" representing the // client's request for the FailoverDBCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4122,7 +4117,7 @@ const opListTagsForResource = "ListTagsForResource" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4207,7 +4202,7 @@ const opModifyDBCluster = "ModifyDBCluster" // ModifyDBClusterRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4321,7 +4316,7 @@ const opModifyDBClusterParameterGroup = "ModifyDBClusterParameterGroup" // ModifyDBClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBClusterParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4422,7 +4417,7 @@ const opModifyDBClusterSnapshotAttribute = "ModifyDBClusterSnapshotAttribute" // ModifyDBClusterSnapshotAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBClusterSnapshotAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4524,7 +4519,7 @@ const opModifyDBInstance = "ModifyDBInstance" // ModifyDBInstanceRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4657,7 +4652,7 @@ const opModifyDBParameterGroup = "ModifyDBParameterGroup" // ModifyDBParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4758,7 +4753,7 @@ const opModifyDBSubnetGroup = "ModifyDBSubnetGroup" // ModifyDBSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4853,7 +4848,7 @@ const opModifyEventSubscription = "ModifyEventSubscription" // ModifyEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the ModifyEventSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4947,7 +4942,7 @@ const opPromoteReadReplicaDBCluster = "PromoteReadReplicaDBCluster" // PromoteReadReplicaDBClusterRequest generates a "aws/request.Request" representing the // client's request for the PromoteReadReplicaDBCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5029,7 +5024,7 @@ const opRebootDBInstance = "RebootDBInstance" // RebootDBInstanceRequest generates a "aws/request.Request" representing the // client's request for the RebootDBInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5118,7 +5113,7 @@ const opRemoveRoleFromDBCluster = "RemoveRoleFromDBCluster" // RemoveRoleFromDBClusterRequest generates a "aws/request.Request" representing the // client's request for the RemoveRoleFromDBCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5152,8 +5147,7 @@ func (c *Neptune) RemoveRoleFromDBClusterRequest(input *RemoveRoleFromDBClusterI output = &RemoveRoleFromDBClusterOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5206,7 +5200,7 @@ const opRemoveSourceIdentifierFromSubscription = "RemoveSourceIdentifierFromSubs // RemoveSourceIdentifierFromSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the RemoveSourceIdentifierFromSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5286,7 +5280,7 @@ const opRemoveTagsFromResource = "RemoveTagsFromResource" // RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5320,8 +5314,7 @@ func (c *Neptune) RemoveTagsFromResourceRequest(input *RemoveTagsFromResourceInp output = &RemoveTagsFromResourceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5373,7 +5366,7 @@ const opResetDBClusterParameterGroup = "ResetDBClusterParameterGroup" // ResetDBClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the ResetDBClusterParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5466,7 +5459,7 @@ const opResetDBParameterGroup = "ResetDBParameterGroup" // ResetDBParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the ResetDBParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5556,7 +5549,7 @@ const opRestoreDBClusterFromSnapshot = "RestoreDBClusterFromSnapshot" // RestoreDBClusterFromSnapshotRequest generates a "aws/request.Request" representing the // client's request for the RestoreDBClusterFromSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5697,7 +5690,7 @@ const opRestoreDBClusterToPointInTime = "RestoreDBClusterToPointInTime" // RestoreDBClusterToPointInTimeRequest generates a "aws/request.Request" representing the // client's request for the RestoreDBClusterToPointInTime operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. diff --git a/vendor/github.com/aws/aws-sdk-go/service/opsworks/api.go b/vendor/github.com/aws/aws-sdk-go/service/opsworks/api.go index 9fac484cfe..e2ea62709e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/opsworks/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/opsworks/api.go @@ -17,7 +17,7 @@ const opAssignInstance = "AssignInstance" // AssignInstanceRequest generates a "aws/request.Request" representing the // client's request for the AssignInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -51,8 +51,7 @@ func (c *OpsWorks) AssignInstanceRequest(input *AssignInstanceInput) (req *reque output = &AssignInstanceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -113,7 +112,7 @@ const opAssignVolume = "AssignVolume" // AssignVolumeRequest generates a "aws/request.Request" representing the // client's request for the AssignVolume operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -147,8 +146,7 @@ func (c *OpsWorks) AssignVolumeRequest(input *AssignVolumeInput) (req *request.R output = &AssignVolumeOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -206,7 +204,7 @@ const opAssociateElasticIp = "AssociateElasticIp" // AssociateElasticIpRequest generates a "aws/request.Request" representing the // client's request for the AssociateElasticIp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -240,8 +238,7 @@ func (c *OpsWorks) AssociateElasticIpRequest(input *AssociateElasticIpInput) (re output = &AssociateElasticIpOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -297,7 +294,7 @@ const opAttachElasticLoadBalancer = "AttachElasticLoadBalancer" // AttachElasticLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the AttachElasticLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -331,8 +328,7 @@ func (c *OpsWorks) AttachElasticLoadBalancerRequest(input *AttachElasticLoadBala output = &AttachElasticLoadBalancerOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -393,7 +389,7 @@ const opCloneStack = "CloneStack" // CloneStackRequest generates a "aws/request.Request" representing the // client's request for the CloneStack operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -481,7 +477,7 @@ const opCreateApp = "CreateApp" // CreateAppRequest generates a "aws/request.Request" representing the // client's request for the CreateApp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -569,7 +565,7 @@ const opCreateDeployment = "CreateDeployment" // CreateDeploymentRequest generates a "aws/request.Request" representing the // client's request for the CreateDeployment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -658,7 +654,7 @@ const opCreateInstance = "CreateInstance" // CreateInstanceRequest generates a "aws/request.Request" representing the // client's request for the CreateInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -746,7 +742,7 @@ const opCreateLayer = "CreateLayer" // CreateLayerRequest generates a "aws/request.Request" representing the // client's request for the CreateLayer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -840,7 +836,7 @@ const opCreateStack = "CreateStack" // CreateStackRequest generates a "aws/request.Request" representing the // client's request for the CreateStack operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -923,7 +919,7 @@ const opCreateUserProfile = "CreateUserProfile" // CreateUserProfileRequest generates a "aws/request.Request" representing the // client's request for the CreateUserProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1006,7 +1002,7 @@ const opDeleteApp = "DeleteApp" // DeleteAppRequest generates a "aws/request.Request" representing the // client's request for the DeleteApp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1040,8 +1036,7 @@ func (c *OpsWorks) DeleteAppRequest(input *DeleteAppInput) (req *request.Request output = &DeleteAppOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1095,7 +1090,7 @@ const opDeleteInstance = "DeleteInstance" // DeleteInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeleteInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1129,8 +1124,7 @@ func (c *OpsWorks) DeleteInstanceRequest(input *DeleteInstanceInput) (req *reque output = &DeleteInstanceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1187,7 +1181,7 @@ const opDeleteLayer = "DeleteLayer" // DeleteLayerRequest generates a "aws/request.Request" representing the // client's request for the DeleteLayer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1221,8 +1215,7 @@ func (c *OpsWorks) DeleteLayerRequest(input *DeleteLayerInput) (req *request.Req output = &DeleteLayerOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1278,7 +1271,7 @@ const opDeleteStack = "DeleteStack" // DeleteStackRequest generates a "aws/request.Request" representing the // client's request for the DeleteStack operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1312,8 +1305,7 @@ func (c *OpsWorks) DeleteStackRequest(input *DeleteStackInput) (req *request.Req output = &DeleteStackOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1369,7 +1361,7 @@ const opDeleteUserProfile = "DeleteUserProfile" // DeleteUserProfileRequest generates a "aws/request.Request" representing the // client's request for the DeleteUserProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1403,8 +1395,7 @@ func (c *OpsWorks) DeleteUserProfileRequest(input *DeleteUserProfileInput) (req output = &DeleteUserProfileOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1457,7 +1448,7 @@ const opDeregisterEcsCluster = "DeregisterEcsCluster" // DeregisterEcsClusterRequest generates a "aws/request.Request" representing the // client's request for the DeregisterEcsCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1491,8 +1482,7 @@ func (c *OpsWorks) DeregisterEcsClusterRequest(input *DeregisterEcsClusterInput) output = &DeregisterEcsClusterOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1547,7 +1537,7 @@ const opDeregisterElasticIp = "DeregisterElasticIp" // DeregisterElasticIpRequest generates a "aws/request.Request" representing the // client's request for the DeregisterElasticIp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1581,8 +1571,7 @@ func (c *OpsWorks) DeregisterElasticIpRequest(input *DeregisterElasticIpInput) ( output = &DeregisterElasticIpOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1637,7 +1626,7 @@ const opDeregisterInstance = "DeregisterInstance" // DeregisterInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeregisterInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1671,8 +1660,7 @@ func (c *OpsWorks) DeregisterInstanceRequest(input *DeregisterInstanceInput) (re output = &DeregisterInstanceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1728,7 +1716,7 @@ const opDeregisterRdsDbInstance = "DeregisterRdsDbInstance" // DeregisterRdsDbInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeregisterRdsDbInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1762,8 +1750,7 @@ func (c *OpsWorks) DeregisterRdsDbInstanceRequest(input *DeregisterRdsDbInstance output = &DeregisterRdsDbInstanceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1817,7 +1804,7 @@ const opDeregisterVolume = "DeregisterVolume" // DeregisterVolumeRequest generates a "aws/request.Request" representing the // client's request for the DeregisterVolume operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1851,8 +1838,7 @@ func (c *OpsWorks) DeregisterVolumeRequest(input *DeregisterVolumeInput) (req *r output = &DeregisterVolumeOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1907,7 +1893,7 @@ const opDescribeAgentVersions = "DescribeAgentVersions" // DescribeAgentVersionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAgentVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1991,7 +1977,7 @@ const opDescribeApps = "DescribeApps" // DescribeAppsRequest generates a "aws/request.Request" representing the // client's request for the DescribeApps operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2080,7 +2066,7 @@ const opDescribeCommands = "DescribeCommands" // DescribeCommandsRequest generates a "aws/request.Request" representing the // client's request for the DescribeCommands operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2169,7 +2155,7 @@ const opDescribeDeployments = "DescribeDeployments" // DescribeDeploymentsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDeployments operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2258,7 +2244,7 @@ const opDescribeEcsClusters = "DescribeEcsClusters" // DescribeEcsClustersRequest generates a "aws/request.Request" representing the // client's request for the DescribeEcsClusters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2406,7 +2392,7 @@ const opDescribeElasticIps = "DescribeElasticIps" // DescribeElasticIpsRequest generates a "aws/request.Request" representing the // client's request for the DescribeElasticIps operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2495,7 +2481,7 @@ const opDescribeElasticLoadBalancers = "DescribeElasticLoadBalancers" // DescribeElasticLoadBalancersRequest generates a "aws/request.Request" representing the // client's request for the DescribeElasticLoadBalancers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2584,7 +2570,7 @@ const opDescribeInstances = "DescribeInstances" // DescribeInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2673,7 +2659,7 @@ const opDescribeLayers = "DescribeLayers" // DescribeLayersRequest generates a "aws/request.Request" representing the // client's request for the DescribeLayers operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2762,7 +2748,7 @@ const opDescribeLoadBasedAutoScaling = "DescribeLoadBasedAutoScaling" // DescribeLoadBasedAutoScalingRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoadBasedAutoScaling operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2851,7 +2837,7 @@ const opDescribeMyUserProfile = "DescribeMyUserProfile" // DescribeMyUserProfileRequest generates a "aws/request.Request" representing the // client's request for the DescribeMyUserProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2929,7 +2915,7 @@ const opDescribeOperatingSystems = "DescribeOperatingSystems" // DescribeOperatingSystemsRequest generates a "aws/request.Request" representing the // client's request for the DescribeOperatingSystems operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3003,7 +2989,7 @@ const opDescribePermissions = "DescribePermissions" // DescribePermissionsRequest generates a "aws/request.Request" representing the // client's request for the DescribePermissions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3090,7 +3076,7 @@ const opDescribeRaidArrays = "DescribeRaidArrays" // DescribeRaidArraysRequest generates a "aws/request.Request" representing the // client's request for the DescribeRaidArrays operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3179,7 +3165,7 @@ const opDescribeRdsDbInstances = "DescribeRdsDbInstances" // DescribeRdsDbInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeRdsDbInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3268,7 +3254,7 @@ const opDescribeServiceErrors = "DescribeServiceErrors" // DescribeServiceErrorsRequest generates a "aws/request.Request" representing the // client's request for the DescribeServiceErrors operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3357,7 +3343,7 @@ const opDescribeStackProvisioningParameters = "DescribeStackProvisioningParamete // DescribeStackProvisioningParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeStackProvisioningParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3444,7 +3430,7 @@ const opDescribeStackSummary = "DescribeStackSummary" // DescribeStackSummaryRequest generates a "aws/request.Request" representing the // client's request for the DescribeStackSummary operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3532,7 +3518,7 @@ const opDescribeStacks = "DescribeStacks" // DescribeStacksRequest generates a "aws/request.Request" representing the // client's request for the DescribeStacks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3619,7 +3605,7 @@ const opDescribeTimeBasedAutoScaling = "DescribeTimeBasedAutoScaling" // DescribeTimeBasedAutoScalingRequest generates a "aws/request.Request" representing the // client's request for the DescribeTimeBasedAutoScaling operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3708,7 +3694,7 @@ const opDescribeUserProfiles = "DescribeUserProfiles" // DescribeUserProfilesRequest generates a "aws/request.Request" representing the // client's request for the DescribeUserProfiles operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3794,7 +3780,7 @@ const opDescribeVolumes = "DescribeVolumes" // DescribeVolumesRequest generates a "aws/request.Request" representing the // client's request for the DescribeVolumes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3883,7 +3869,7 @@ const opDetachElasticLoadBalancer = "DetachElasticLoadBalancer" // DetachElasticLoadBalancerRequest generates a "aws/request.Request" representing the // client's request for the DetachElasticLoadBalancer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3917,8 +3903,7 @@ func (c *OpsWorks) DetachElasticLoadBalancerRequest(input *DetachElasticLoadBala output = &DetachElasticLoadBalancerOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3969,7 +3954,7 @@ const opDisassociateElasticIp = "DisassociateElasticIp" // DisassociateElasticIpRequest generates a "aws/request.Request" representing the // client's request for the DisassociateElasticIp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4003,8 +3988,7 @@ func (c *OpsWorks) DisassociateElasticIpRequest(input *DisassociateElasticIpInpu output = &DisassociateElasticIpOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4060,7 +4044,7 @@ const opGetHostnameSuggestion = "GetHostnameSuggestion" // GetHostnameSuggestionRequest generates a "aws/request.Request" representing the // client's request for the GetHostnameSuggestion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4148,7 +4132,7 @@ const opGrantAccess = "GrantAccess" // GrantAccessRequest generates a "aws/request.Request" representing the // client's request for the GrantAccess operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4232,7 +4216,7 @@ const opListTags = "ListTags" // ListTagsRequest generates a "aws/request.Request" representing the // client's request for the ListTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4314,7 +4298,7 @@ const opRebootInstance = "RebootInstance" // RebootInstanceRequest generates a "aws/request.Request" representing the // client's request for the RebootInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4348,8 +4332,7 @@ func (c *OpsWorks) RebootInstanceRequest(input *RebootInstanceInput) (req *reque output = &RebootInstanceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4404,7 +4387,7 @@ const opRegisterEcsCluster = "RegisterEcsCluster" // RegisterEcsClusterRequest generates a "aws/request.Request" representing the // client's request for the RegisterEcsCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4493,7 +4476,7 @@ const opRegisterElasticIp = "RegisterElasticIp" // RegisterElasticIpRequest generates a "aws/request.Request" representing the // client's request for the RegisterElasticIp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4583,7 +4566,7 @@ const opRegisterInstance = "RegisterInstance" // RegisterInstanceRequest generates a "aws/request.Request" representing the // client's request for the RegisterInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4684,7 +4667,7 @@ const opRegisterRdsDbInstance = "RegisterRdsDbInstance" // RegisterRdsDbInstanceRequest generates a "aws/request.Request" representing the // client's request for the RegisterRdsDbInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4718,8 +4701,7 @@ func (c *OpsWorks) RegisterRdsDbInstanceRequest(input *RegisterRdsDbInstanceInpu output = &RegisterRdsDbInstanceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4773,7 +4755,7 @@ const opRegisterVolume = "RegisterVolume" // RegisterVolumeRequest generates a "aws/request.Request" representing the // client's request for the RegisterVolume operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4863,7 +4845,7 @@ const opSetLoadBasedAutoScaling = "SetLoadBasedAutoScaling" // SetLoadBasedAutoScalingRequest generates a "aws/request.Request" representing the // client's request for the SetLoadBasedAutoScaling operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4897,8 +4879,7 @@ func (c *OpsWorks) SetLoadBasedAutoScalingRequest(input *SetLoadBasedAutoScaling output = &SetLoadBasedAutoScalingOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4959,7 +4940,7 @@ const opSetPermission = "SetPermission" // SetPermissionRequest generates a "aws/request.Request" representing the // client's request for the SetPermission operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4993,8 +4974,7 @@ func (c *OpsWorks) SetPermissionRequest(input *SetPermissionInput) (req *request output = &SetPermissionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5049,7 +5029,7 @@ const opSetTimeBasedAutoScaling = "SetTimeBasedAutoScaling" // SetTimeBasedAutoScalingRequest generates a "aws/request.Request" representing the // client's request for the SetTimeBasedAutoScaling operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5083,8 +5063,7 @@ func (c *OpsWorks) SetTimeBasedAutoScalingRequest(input *SetTimeBasedAutoScaling output = &SetTimeBasedAutoScalingOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5140,7 +5119,7 @@ const opStartInstance = "StartInstance" // StartInstanceRequest generates a "aws/request.Request" representing the // client's request for the StartInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5174,8 +5153,7 @@ func (c *OpsWorks) StartInstanceRequest(input *StartInstanceInput) (req *request output = &StartInstanceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5230,7 +5208,7 @@ const opStartStack = "StartStack" // StartStackRequest generates a "aws/request.Request" representing the // client's request for the StartStack operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5264,8 +5242,7 @@ func (c *OpsWorks) StartStackRequest(input *StartStackInput) (req *request.Reque output = &StartStackOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5319,7 +5296,7 @@ const opStopInstance = "StopInstance" // StopInstanceRequest generates a "aws/request.Request" representing the // client's request for the StopInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5353,8 +5330,7 @@ func (c *OpsWorks) StopInstanceRequest(input *StopInstanceInput) (req *request.R output = &StopInstanceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5411,7 +5387,7 @@ const opStopStack = "StopStack" // StopStackRequest generates a "aws/request.Request" representing the // client's request for the StopStack operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5445,8 +5421,7 @@ func (c *OpsWorks) StopStackRequest(input *StopStackInput) (req *request.Request output = &StopStackOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5500,7 +5475,7 @@ const opTagResource = "TagResource" // TagResourceRequest generates a "aws/request.Request" representing the // client's request for the TagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5534,8 +5509,7 @@ func (c *OpsWorks) TagResourceRequest(input *TagResourceInput) (req *request.Req output = &TagResourceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5586,7 +5560,7 @@ const opUnassignInstance = "UnassignInstance" // UnassignInstanceRequest generates a "aws/request.Request" representing the // client's request for the UnassignInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5620,8 +5594,7 @@ func (c *OpsWorks) UnassignInstanceRequest(input *UnassignInstanceInput) (req *r output = &UnassignInstanceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5678,7 +5651,7 @@ const opUnassignVolume = "UnassignVolume" // UnassignVolumeRequest generates a "aws/request.Request" representing the // client's request for the UnassignVolume operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5712,8 +5685,7 @@ func (c *OpsWorks) UnassignVolumeRequest(input *UnassignVolumeInput) (req *reque output = &UnassignVolumeOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5768,7 +5740,7 @@ const opUntagResource = "UntagResource" // UntagResourceRequest generates a "aws/request.Request" representing the // client's request for the UntagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5802,8 +5774,7 @@ func (c *OpsWorks) UntagResourceRequest(input *UntagResourceInput) (req *request output = &UntagResourceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5852,7 +5823,7 @@ const opUpdateApp = "UpdateApp" // UpdateAppRequest generates a "aws/request.Request" representing the // client's request for the UpdateApp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5886,8 +5857,7 @@ func (c *OpsWorks) UpdateAppRequest(input *UpdateAppInput) (req *request.Request output = &UpdateAppOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5941,7 +5911,7 @@ const opUpdateElasticIp = "UpdateElasticIp" // UpdateElasticIpRequest generates a "aws/request.Request" representing the // client's request for the UpdateElasticIp operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5975,8 +5945,7 @@ func (c *OpsWorks) UpdateElasticIpRequest(input *UpdateElasticIpInput) (req *req output = &UpdateElasticIpOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -6031,7 +6000,7 @@ const opUpdateInstance = "UpdateInstance" // UpdateInstanceRequest generates a "aws/request.Request" representing the // client's request for the UpdateInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6065,8 +6034,7 @@ func (c *OpsWorks) UpdateInstanceRequest(input *UpdateInstanceInput) (req *reque output = &UpdateInstanceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -6120,7 +6088,7 @@ const opUpdateLayer = "UpdateLayer" // UpdateLayerRequest generates a "aws/request.Request" representing the // client's request for the UpdateLayer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6154,8 +6122,7 @@ func (c *OpsWorks) UpdateLayerRequest(input *UpdateLayerInput) (req *request.Req output = &UpdateLayerOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -6209,7 +6176,7 @@ const opUpdateMyUserProfile = "UpdateMyUserProfile" // UpdateMyUserProfileRequest generates a "aws/request.Request" representing the // client's request for the UpdateMyUserProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6243,8 +6210,7 @@ func (c *OpsWorks) UpdateMyUserProfileRequest(input *UpdateMyUserProfileInput) ( output = &UpdateMyUserProfileOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -6294,7 +6260,7 @@ const opUpdateRdsDbInstance = "UpdateRdsDbInstance" // UpdateRdsDbInstanceRequest generates a "aws/request.Request" representing the // client's request for the UpdateRdsDbInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6328,8 +6294,7 @@ func (c *OpsWorks) UpdateRdsDbInstanceRequest(input *UpdateRdsDbInstanceInput) ( output = &UpdateRdsDbInstanceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -6383,7 +6348,7 @@ const opUpdateStack = "UpdateStack" // UpdateStackRequest generates a "aws/request.Request" representing the // client's request for the UpdateStack operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6417,8 +6382,7 @@ func (c *OpsWorks) UpdateStackRequest(input *UpdateStackInput) (req *request.Req output = &UpdateStackOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -6472,7 +6436,7 @@ const opUpdateUserProfile = "UpdateUserProfile" // UpdateUserProfileRequest generates a "aws/request.Request" representing the // client's request for the UpdateUserProfile operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6506,8 +6470,7 @@ func (c *OpsWorks) UpdateUserProfileRequest(input *UpdateUserProfileInput) (req output = &UpdateUserProfileOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -6560,7 +6523,7 @@ const opUpdateVolume = "UpdateVolume" // UpdateVolumeRequest generates a "aws/request.Request" representing the // client's request for the UpdateVolume operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6594,8 +6557,7 @@ func (c *OpsWorks) UpdateVolumeRequest(input *UpdateVolumeInput) (req *request.R output = &UpdateVolumeOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } diff --git a/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go b/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go index 104582b80f..f37a867f07 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go @@ -17,7 +17,7 @@ const opAcceptHandshake = "AcceptHandshake" // AcceptHandshakeRequest generates a "aws/request.Request" representing the // client's request for the AcceptHandshake operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -68,7 +68,7 @@ func (c *Organizations) AcceptHandshakeRequest(input *AcceptHandshakeInput) (req // The user who calls the API for an invitation to join must have the organizations:AcceptHandshake // permission. If you enabled all features in the organization, then the // user must also have the iam:CreateServiceLinkedRole permission so that -// Organizations can create the required service-linked role named OrgsServiceLinkedRoleName. +// Organizations can create the required service-linked role named AWSServiceRoleForOrganizations. // For more information, see AWS Organizations and Service-Linked Roles (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_integration_services.html#orgs_integration_service-linked-roles) // in the AWS Organizations User Guide. // @@ -101,7 +101,7 @@ func (c *Organizations) AcceptHandshakeRequest(input *AcceptHandshakeInput) (req // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeHandshakeConstraintViolationException "HandshakeConstraintViolationException" @@ -112,15 +112,15 @@ func (c *Organizations) AcceptHandshakeRequest(input *AcceptHandshakeInput) (req // specific API or operation: // // * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on -// the number of accounts in an organization. Note: deleted and closed accounts -// still count toward your limit. +// the number of accounts in an organization. Note that deleted and closed +// accounts still count toward your limit. // // If you get this exception immediately after creating the organization, wait // one hour and try again. If after an hour it continues to fail with this -// error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // // * ALREADY_IN_AN_ORGANIZATION: The handshake request is invalid because // the invited account is already a member of an organization. @@ -128,13 +128,13 @@ func (c *Organizations) AcceptHandshakeRequest(input *AcceptHandshakeInput) (req // * ORGANIZATION_ALREADY_HAS_ALL_FEATURES: The handshake request is invalid // because the organization has already enabled all features. // -// * INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You cannot issue new invitations -// to join an organization while it is in the process of enabling all features. +// * INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You can't issue new invitations +// to join an organization while it's in the process of enabling all features. // You can resume inviting accounts after you finalize the process when all // accounts have agreed to the change. // -// * PAYMENT_INSTRUMENT_REQUIRED: You cannot complete the operation with -// an account that does not have a payment instrument, such as a credit card, +// * PAYMENT_INSTRUMENT_REQUIRED: You can't complete the operation with an +// account that doesn't have a payment instrument, such as a credit card, // associated with it. // // * ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD: The request failed because @@ -151,7 +151,7 @@ func (c *Organizations) AcceptHandshakeRequest(input *AcceptHandshakeInput) (req // // * ErrCodeInvalidHandshakeTransitionException "InvalidHandshakeTransitionException" // You can't perform the operation on the handshake in its current state. For -// example, you can't cancel a handshake that was already accepted, or accept +// example, you can't cancel a handshake that was already accepted or accept // a handshake that was already declined. // // * ErrCodeHandshakeAlreadyInStateException "HandshakeAlreadyInStateException" @@ -167,11 +167,11 @@ func (c *Organizations) AcceptHandshakeRequest(input *AcceptHandshakeInput) (req // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -191,11 +191,11 @@ func (c *Organizations) AcceptHandshakeRequest(input *AcceptHandshakeInput) (req // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -230,9 +230,9 @@ func (c *Organizations) AcceptHandshakeRequest(input *AcceptHandshakeInput) (req // protect against denial-of-service attacks. Try again later. // // * ErrCodeAccessDeniedForDependencyException "AccessDeniedForDependencyException" -// The operation you attempted requires you to have the iam:CreateServiceLinkedRole -// so that Organizations can create the required service-linked role. You do -// not have that permission. +// The operation that you attempted requires you to have the iam:CreateServiceLinkedRole +// so that AWS Organizations can create the required service-linked role. You +// don't have that permission. // // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/AcceptHandshake func (c *Organizations) AcceptHandshake(input *AcceptHandshakeInput) (*AcceptHandshakeOutput, error) { @@ -261,7 +261,7 @@ const opAttachPolicy = "AttachPolicy" // AttachPolicyRequest generates a "aws/request.Request" representing the // client's request for the AttachPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -295,8 +295,7 @@ func (c *Organizations) AttachPolicyRequest(input *AttachPolicyInput) (req *requ output = &AttachPolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -358,7 +357,7 @@ func (c *Organizations) AttachPolicyRequest(input *AttachPolicyInput) (req *requ // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -367,40 +366,42 @@ func (c *Organizations) AttachPolicyRequest(input *AttachPolicyInput) (req *requ // // * ErrCodeConstraintViolationException "ConstraintViolationException" // Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last SCP from an OU or root, inviting -// or creating too many accounts to the organization, or attaching too many -// policies to an account, OU, or root. This exception includes a reason that -// contains additional information about the violated limit: +// example, attempting to removing the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: // -// ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number -// of accounts in an organization. If you need more accounts, contact AWS Support -// to request an increase in your limit. +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contactAWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. // -// Or, The number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations, or contact -// AWS Support to request an increase in the number of accounts. +// Or the number of invitations that you tried to send would cause you to exceed +// the limit of accounts in your organization. Send fewer invitations or +// contact AWS Support to request an increase in the number of accounts. // -// Note: deleted and closed accounts still count toward your limit. +// Deleted and closed accounts still count toward your limit. // // If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of organizational -// units you can have in an organization. +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. // -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit -// tree that is too many levels deep. +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. // // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation // that requires the organization to be configured to support all features. -// An organization that supports consolidated billing features only cannot +// An organization that supports only consolidated billing features can't // perform this operation. // // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of @@ -415,23 +416,24 @@ func (c *Organizations) AttachPolicyRequest(input *AttachPolicyInput) (req *requ // minimum number of policies of a certain type required. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that does not yet have enough information to exist -// as a stand-alone account. This account requires you to first agree to -// the AWS Customer Agreement. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that does not yet have enough information -// to exist as a stand-alone account. This account requires you to first -// complete phone verification. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this account, you first must associate a payment instrument, such -// as a credit card, with the account. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// with this master account, you first must associate a payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation @@ -467,11 +469,11 @@ func (c *Organizations) AttachPolicyRequest(input *AttachPolicyInput) (req *requ // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -491,11 +493,11 @@ func (c *Organizations) AttachPolicyRequest(input *AttachPolicyInput) (req *requ // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -521,7 +523,7 @@ func (c *Organizations) AttachPolicyRequest(input *AttachPolicyInput) (req *requ // We can't find a policy with the PolicyId that you specified. // // * ErrCodePolicyTypeNotEnabledException "PolicyTypeNotEnabledException" -// The specified policy type is not currently enabled in this root. You cannot +// The specified policy type isn't currently enabled in this root. You can't // attach policies of the specified type to entities in a root until you enable // that type in the root. For more information, see Enabling All Features in // Your Organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html) @@ -565,7 +567,7 @@ const opCancelHandshake = "CancelHandshake" // CancelHandshakeRequest generates a "aws/request.Request" representing the // client's request for the CancelHandshake operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -638,7 +640,7 @@ func (c *Organizations) CancelHandshakeRequest(input *CancelHandshakeInput) (req // // * ErrCodeInvalidHandshakeTransitionException "InvalidHandshakeTransitionException" // You can't perform the operation on the handshake in its current state. For -// example, you can't cancel a handshake that was already accepted, or accept +// example, you can't cancel a handshake that was already accepted or accept // a handshake that was already declined. // // * ErrCodeHandshakeAlreadyInStateException "HandshakeAlreadyInStateException" @@ -654,11 +656,11 @@ func (c *Organizations) CancelHandshakeRequest(input *CancelHandshakeInput) (req // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -678,11 +680,11 @@ func (c *Organizations) CancelHandshakeRequest(input *CancelHandshakeInput) (req // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -739,7 +741,7 @@ const opCreateAccount = "CreateAccount" // CreateAccountRequest generates a "aws/request.Request" representing the // client's request for the CreateAccount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -780,57 +782,63 @@ func (c *Organizations) CreateAccountRequest(input *CreateAccountInput) (req *re // // Creates an AWS account that is automatically a member of the organization // whose credentials made the request. This is an asynchronous request that -// AWS performs in the background. If you want to check the status of the request -// later, you need the OperationId response element from this operation to provide -// as a parameter to the DescribeCreateAccountStatus operation. -// -// The user who calls the API for an invitation to join must have the organizations:CreateAccount -// permission. If you enabled all features in the organization, then the user -// must also have the iam:CreateServiceLinkedRole permission so that Organizations -// can create the required service-linked role named OrgsServiceLinkedRoleName. -// For more information, see AWS Organizations and Service-Linked Roles (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_integration_services.html#orgs_integration_service-linked-roles) -// in the AWS Organizations User Guide. +// AWS performs in the background. Because CreateAccount operates asynchronously, +// it can return a successful completion message even though account initialization +// might still be in progress. You might need to wait a few minutes before you +// can successfully access the account. To check the status of the request, +// do one of the following: +// +// * Use the OperationId response element from this operation to provide +// as a parameter to the DescribeCreateAccountStatus operation. +// +// * Check the AWS CloudTrail log for the CreateAccountResult event. For +// information on using AWS CloudTrail with Organizations, see Monitoring +// the Activity in Your Organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_monitoring.html) +// in the AWS Organizations User Guide. +// +// The user who calls the API to create an account must have the organizations:CreateAccountpermission. If you enabled all features in the organization, AWS Organizations +// will create the required service-linked role named AWSServiceRoleForOrganizations. For more information, see AWS Organizations and Service-Linked Roles (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html#orgs_integrate_services-using_slrs)in the AWS Organizations User Guide. // -// The user in the master account who calls this API must also have the iam:CreateRole -// permission because AWS Organizations preconfigures the new member account -// with a role (named OrganizationAccountAccessRole by default) that grants -// users in the master account administrator permissions in the new member account. -// Principals in the master account can assume the role. AWS Organizations clones -// the company name and address information for the new account from the organization's -// master account. +// AWS Organizations preconfigures the new member account with a role (named +// OrganizationAccountAccessRoleby default) that grants users in the master account administrator permissions +// in the new member account. Principals in the master account can assume the +// role. AWS Organizations clones the company name and address information for +// the new account from the organization's master account. // // This operation can be called only from the organization's master account. // // For more information about creating accounts, see Creating an AWS Account -// in Your Organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_create.html) -// in the AWS Organizations User Guide. +// in Your Organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_create.html)in the AWS Organizations User Guide. // // When you create an account in an organization using the AWS Organizations // console, API, or CLI commands, the information required for the account to // operate as a standalone account, such as a payment method and signing the -// End User Licence Agreement (EULA) is not automatically collected. If you +// end user license agreement (EULA) is not automatically collected. If you // must remove an account from your organization later, you can do so only after // you provide the missing information. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// as a member account (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // If you get an exception that indicates that you exceeded your account limits -// for the organization or that the operation failed because your organization -// is still initializing, wait one hour and then try again. If the error persists -// after an hour, then contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// for the organization, contact AWS Support (https://console.aws.amazon.com/support/home#/). // -// Because CreateAccount operates asynchronously, it can return a successful -// completion message even though account initialization might still be in progress. -// You might need to wait a few minutes before you can successfully access the -// account. +// If you get an exception that indicates that the operation failed because +// your organization is still initializing, wait one hour and then try again. +// If the error persists, contact AWS Support (https://console.aws.amazon.com/support/home#/). +// +// Using CreateAccount to create multiple temporary accounts is not recommended. +// You can only close an account from the Billing and Cost Management Console, +// and you must be signed in as the root user. For information on the requirements +// and process for closing an account, see Closing an AWS Account (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_close.html) +// in the AWS Organizations User Guide. // // When you create a member account with this operation, you can choose whether // to create the account with the IAM User and Role Access to Billing Information // switch enabled. If you enable it, IAM users and roles that have appropriate // permissions can view billing information for the account. If you disable -// this, then only the account root user can access billing information. For -// information about how to disable this for an account, see Granting Access -// to Your Billing Information and Tools (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html). +// it, only the account root user can access billing information. For information +// about how to disable this switch for an account, see Granting Access to Your +// Billing Information and Tools (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.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 @@ -848,7 +856,7 @@ func (c *Organizations) CreateAccountRequest(input *CreateAccountInput) (req *re // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -857,40 +865,42 @@ func (c *Organizations) CreateAccountRequest(input *CreateAccountInput) (req *re // // * ErrCodeConstraintViolationException "ConstraintViolationException" // Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last SCP from an OU or root, inviting -// or creating too many accounts to the organization, or attaching too many -// policies to an account, OU, or root. This exception includes a reason that -// contains additional information about the violated limit: +// example, attempting to removing the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: // -// ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number -// of accounts in an organization. If you need more accounts, contact AWS Support -// to request an increase in your limit. +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contactAWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. // -// Or, The number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations, or contact -// AWS Support to request an increase in the number of accounts. +// Or the number of invitations that you tried to send would cause you to exceed +// the limit of accounts in your organization. Send fewer invitations or +// contact AWS Support to request an increase in the number of accounts. // -// Note: deleted and closed accounts still count toward your limit. +// Deleted and closed accounts still count toward your limit. // // If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of organizational -// units you can have in an organization. +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. // -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit -// tree that is too many levels deep. +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. // // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation // that requires the organization to be configured to support all features. -// An organization that supports consolidated billing features only cannot +// An organization that supports only consolidated billing features can't // perform this operation. // // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of @@ -905,23 +915,24 @@ func (c *Organizations) CreateAccountRequest(input *CreateAccountInput) (req *re // minimum number of policies of a certain type required. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that does not yet have enough information to exist -// as a stand-alone account. This account requires you to first agree to -// the AWS Customer Agreement. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that does not yet have enough information -// to exist as a stand-alone account. This account requires you to first -// complete phone verification. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this account, you first must associate a payment instrument, such -// as a credit card, with the account. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// with this master account, you first must associate a payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation @@ -954,11 +965,11 @@ func (c *Organizations) CreateAccountRequest(input *CreateAccountInput) (req *re // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -978,11 +989,11 @@ func (c *Organizations) CreateAccountRequest(input *CreateAccountInput) (req *re // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -1005,10 +1016,10 @@ func (c *Organizations) CreateAccountRequest(input *CreateAccountInput) (req *re // between entities in the same root. // // * ErrCodeFinalizingOrganizationException "FinalizingOrganizationException" -// AWS Organizations could not perform the operation because your organization -// has not finished initializing. This can take up to an hour. Try again later. -// If after one hour you continue to receive this error, contact AWS Customer -// Support (https://console.aws.amazon.com/support/home#/). +// AWS Organizations couldn't perform the operation because your organization +// hasn't finished initializing. This can take up to an hour. Try again later. +// If after one hour you continue to receive this error, contact AWS Support +// (https://console.aws.amazon.com/support/home#/). // // * ErrCodeServiceException "ServiceException" // AWS Organizations can't complete your request because of an internal service @@ -1045,7 +1056,7 @@ const opCreateOrganization = "CreateOrganization" // CreateOrganizationRequest generates a "aws/request.Request" representing the // client's request for the CreateOrganization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1124,40 +1135,42 @@ func (c *Organizations) CreateOrganizationRequest(input *CreateOrganizationInput // // * ErrCodeConstraintViolationException "ConstraintViolationException" // Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last SCP from an OU or root, inviting -// or creating too many accounts to the organization, or attaching too many -// policies to an account, OU, or root. This exception includes a reason that -// contains additional information about the violated limit: +// example, attempting to removing the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: // -// ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number -// of accounts in an organization. If you need more accounts, contact AWS Support -// to request an increase in your limit. +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contactAWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. // -// Or, The number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations, or contact -// AWS Support to request an increase in the number of accounts. +// Or the number of invitations that you tried to send would cause you to exceed +// the limit of accounts in your organization. Send fewer invitations or +// contact AWS Support to request an increase in the number of accounts. // -// Note: deleted and closed accounts still count toward your limit. +// Deleted and closed accounts still count toward your limit. // // If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of organizational -// units you can have in an organization. +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. // -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit -// tree that is too many levels deep. +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. // // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation // that requires the organization to be configured to support all features. -// An organization that supports consolidated billing features only cannot +// An organization that supports only consolidated billing features can't // perform this operation. // // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of @@ -1172,23 +1185,24 @@ func (c *Organizations) CreateOrganizationRequest(input *CreateOrganizationInput // minimum number of policies of a certain type required. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that does not yet have enough information to exist -// as a stand-alone account. This account requires you to first agree to -// the AWS Customer Agreement. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that does not yet have enough information -// to exist as a stand-alone account. This account requires you to first -// complete phone verification. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this account, you first must associate a payment instrument, such -// as a credit card, with the account. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// with this master account, you first must associate a payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation @@ -1221,11 +1235,11 @@ func (c *Organizations) CreateOrganizationRequest(input *CreateOrganizationInput // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -1245,11 +1259,11 @@ func (c *Organizations) CreateOrganizationRequest(input *CreateOrganizationInput // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -1280,9 +1294,9 @@ func (c *Organizations) CreateOrganizationRequest(input *CreateOrganizationInput // protect against denial-of-service attacks. Try again later. // // * ErrCodeAccessDeniedForDependencyException "AccessDeniedForDependencyException" -// The operation you attempted requires you to have the iam:CreateServiceLinkedRole -// so that Organizations can create the required service-linked role. You do -// not have that permission. +// The operation that you attempted requires you to have the iam:CreateServiceLinkedRole +// so that AWS Organizations can create the required service-linked role. You +// don't have that permission. // // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CreateOrganization func (c *Organizations) CreateOrganization(input *CreateOrganizationInput) (*CreateOrganizationOutput, error) { @@ -1311,7 +1325,7 @@ const opCreateOrganizationalUnit = "CreateOrganizationalUnit" // CreateOrganizationalUnitRequest generates a "aws/request.Request" representing the // client's request for the CreateOrganizationalUnit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1377,7 +1391,7 @@ func (c *Organizations) CreateOrganizationalUnitRequest(input *CreateOrganizatio // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -1386,40 +1400,42 @@ func (c *Organizations) CreateOrganizationalUnitRequest(input *CreateOrganizatio // // * ErrCodeConstraintViolationException "ConstraintViolationException" // Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last SCP from an OU or root, inviting -// or creating too many accounts to the organization, or attaching too many -// policies to an account, OU, or root. This exception includes a reason that -// contains additional information about the violated limit: +// example, attempting to removing the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: // -// ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number -// of accounts in an organization. If you need more accounts, contact AWS Support -// to request an increase in your limit. +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contactAWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. // -// Or, The number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations, or contact -// AWS Support to request an increase in the number of accounts. +// Or the number of invitations that you tried to send would cause you to exceed +// the limit of accounts in your organization. Send fewer invitations or +// contact AWS Support to request an increase in the number of accounts. // -// Note: deleted and closed accounts still count toward your limit. +// Deleted and closed accounts still count toward your limit. // // If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of organizational -// units you can have in an organization. +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. // -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit -// tree that is too many levels deep. +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. // // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation // that requires the organization to be configured to support all features. -// An organization that supports consolidated billing features only cannot +// An organization that supports only consolidated billing features can't // perform this operation. // // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of @@ -1434,23 +1450,24 @@ func (c *Organizations) CreateOrganizationalUnitRequest(input *CreateOrganizatio // minimum number of policies of a certain type required. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that does not yet have enough information to exist -// as a stand-alone account. This account requires you to first agree to -// the AWS Customer Agreement. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that does not yet have enough information -// to exist as a stand-alone account. This account requires you to first -// complete phone verification. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this account, you first must associate a payment instrument, such -// as a credit card, with the account. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// with this master account, you first must associate a payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation @@ -1475,7 +1492,7 @@ func (c *Organizations) CreateOrganizationalUnitRequest(input *CreateOrganizatio // account. Then try the operation again. // // * ErrCodeDuplicateOrganizationalUnitException "DuplicateOrganizationalUnitException" -// An organizational unit (OU) with the same name already exists. +// An OU with the same name already exists. // // * ErrCodeInvalidInputException "InvalidInputException" // The requested operation failed because you provided invalid values for one @@ -1486,11 +1503,11 @@ func (c *Organizations) CreateOrganizationalUnitRequest(input *CreateOrganizatio // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -1510,11 +1527,11 @@ func (c *Organizations) CreateOrganizationalUnitRequest(input *CreateOrganizatio // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -1537,8 +1554,7 @@ func (c *Organizations) CreateOrganizationalUnitRequest(input *CreateOrganizatio // between entities in the same root. // // * ErrCodeParentNotFoundException "ParentNotFoundException" -// We can't find a root or organizational unit (OU) with the ParentId that you -// specified. +// We can't find a root or OU with the ParentId that you specified. // // * ErrCodeServiceException "ServiceException" // AWS Organizations can't complete your request because of an internal service @@ -1575,7 +1591,7 @@ const opCreatePolicy = "CreatePolicy" // CreatePolicyRequest generates a "aws/request.Request" representing the // client's request for the CreatePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1638,7 +1654,7 @@ func (c *Organizations) CreatePolicyRequest(input *CreatePolicyInput) (req *requ // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -1647,40 +1663,42 @@ func (c *Organizations) CreatePolicyRequest(input *CreatePolicyInput) (req *requ // // * ErrCodeConstraintViolationException "ConstraintViolationException" // Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last SCP from an OU or root, inviting -// or creating too many accounts to the organization, or attaching too many -// policies to an account, OU, or root. This exception includes a reason that -// contains additional information about the violated limit: +// example, attempting to removing the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: // -// ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number -// of accounts in an organization. If you need more accounts, contact AWS Support -// to request an increase in your limit. +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contactAWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. // -// Or, The number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations, or contact -// AWS Support to request an increase in the number of accounts. +// Or the number of invitations that you tried to send would cause you to exceed +// the limit of accounts in your organization. Send fewer invitations or +// contact AWS Support to request an increase in the number of accounts. // -// Note: deleted and closed accounts still count toward your limit. +// Deleted and closed accounts still count toward your limit. // // If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of organizational -// units you can have in an organization. +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. // -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit -// tree that is too many levels deep. +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. // // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation // that requires the organization to be configured to support all features. -// An organization that supports consolidated billing features only cannot +// An organization that supports only consolidated billing features can't // perform this operation. // // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of @@ -1695,23 +1713,24 @@ func (c *Organizations) CreatePolicyRequest(input *CreatePolicyInput) (req *requ // minimum number of policies of a certain type required. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that does not yet have enough information to exist -// as a stand-alone account. This account requires you to first agree to -// the AWS Customer Agreement. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that does not yet have enough information -// to exist as a stand-alone account. This account requires you to first -// complete phone verification. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this account, you first must associate a payment instrument, such -// as a credit card, with the account. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// with this master account, you first must associate a payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation @@ -1747,11 +1766,11 @@ func (c *Organizations) CreatePolicyRequest(input *CreatePolicyInput) (req *requ // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -1771,11 +1790,11 @@ func (c *Organizations) CreatePolicyRequest(input *CreatePolicyInput) (req *requ // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -1798,16 +1817,16 @@ func (c *Organizations) CreatePolicyRequest(input *CreatePolicyInput) (req *requ // between entities in the same root. // // * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocumentException" -// The provided policy document does not meet the requirements of the specified +// The provided policy document doesn't meet the requirements of the specified // policy type. For example, the syntax might be incorrect. For details about // service control policy syntax, see Service Control Policy Syntax (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html) // in the AWS Organizations User Guide. // // * ErrCodePolicyTypeNotAvailableForOrganizationException "PolicyTypeNotAvailableForOrganizationException" // You can't use the specified policy type with the feature set currently enabled -// for this organization. For example, you can enable service control policies -// (SCPs) only after you enable all features in the organization. For more information, -// see Enabling and Disabling a Policy Type on a Root (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html#enable_policies_on_root) +// for this organization. For example, you can enable SCPs only after you enable +// all features in the organization. For more information, see Enabling and +// Disabling a Policy Type on a Root (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html#enable_policies_on_root) // in the AWS Organizations User Guide. // // * ErrCodeServiceException "ServiceException" @@ -1845,7 +1864,7 @@ const opDeclineHandshake = "DeclineHandshake" // DeclineHandshakeRequest generates a "aws/request.Request" representing the // client's request for the DeclineHandshake operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1919,7 +1938,7 @@ func (c *Organizations) DeclineHandshakeRequest(input *DeclineHandshakeInput) (r // // * ErrCodeInvalidHandshakeTransitionException "InvalidHandshakeTransitionException" // You can't perform the operation on the handshake in its current state. For -// example, you can't cancel a handshake that was already accepted, or accept +// example, you can't cancel a handshake that was already accepted or accept // a handshake that was already declined. // // * ErrCodeHandshakeAlreadyInStateException "HandshakeAlreadyInStateException" @@ -1935,11 +1954,11 @@ func (c *Organizations) DeclineHandshakeRequest(input *DeclineHandshakeInput) (r // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -1959,11 +1978,11 @@ func (c *Organizations) DeclineHandshakeRequest(input *DeclineHandshakeInput) (r // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -2020,7 +2039,7 @@ const opDeleteOrganization = "DeleteOrganization" // DeleteOrganizationRequest generates a "aws/request.Request" representing the // client's request for the DeleteOrganization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2054,16 +2073,14 @@ func (c *Organizations) DeleteOrganizationRequest(input *DeleteOrganizationInput output = &DeleteOrganizationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteOrganization API operation for AWS Organizations. // // Deletes the organization. You can delete an organization only by using credentials -// from the master account. The organization must be empty of member accounts, -// organizational units (OUs), and policies. +// from the master account. The organization must be empty of member accounts. // // 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 @@ -2081,7 +2098,7 @@ func (c *Organizations) DeleteOrganizationRequest(input *DeleteOrganizationInput // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -2097,11 +2114,11 @@ func (c *Organizations) DeleteOrganizationRequest(input *DeleteOrganizationInput // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -2121,11 +2138,11 @@ func (c *Organizations) DeleteOrganizationRequest(input *DeleteOrganizationInput // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -2149,8 +2166,7 @@ func (c *Organizations) DeleteOrganizationRequest(input *DeleteOrganizationInput // // * ErrCodeOrganizationNotEmptyException "OrganizationNotEmptyException" // The organization isn't empty. To delete an organization, you must first remove -// all accounts except the master account, delete all organizational units (OUs), -// and delete all policies. +// all accounts except the master account, delete all OUs, and delete all policies. // // * ErrCodeServiceException "ServiceException" // AWS Organizations can't complete your request because of an internal service @@ -2187,7 +2203,7 @@ const opDeleteOrganizationalUnit = "DeleteOrganizationalUnit" // DeleteOrganizationalUnitRequest generates a "aws/request.Request" representing the // client's request for the DeleteOrganizationalUnit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2221,8 +2237,7 @@ func (c *Organizations) DeleteOrganizationalUnitRequest(input *DeleteOrganizatio output = &DeleteOrganizationalUnitOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2249,7 +2264,7 @@ func (c *Organizations) DeleteOrganizationalUnitRequest(input *DeleteOrganizatio // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -2265,11 +2280,11 @@ func (c *Organizations) DeleteOrganizationalUnitRequest(input *DeleteOrganizatio // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -2289,11 +2304,11 @@ func (c *Organizations) DeleteOrganizationalUnitRequest(input *DeleteOrganizatio // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -2316,13 +2331,11 @@ func (c *Organizations) DeleteOrganizationalUnitRequest(input *DeleteOrganizatio // between entities in the same root. // // * ErrCodeOrganizationalUnitNotEmptyException "OrganizationalUnitNotEmptyException" -// The specified organizational unit (OU) is not empty. Move all accounts to -// another root or to other OUs, remove all child OUs, and then try the operation -// again. +// The specified OU is not empty. Move all accounts to another root or to other +// OUs, remove all child OUs, and try the operation again. // // * ErrCodeOrganizationalUnitNotFoundException "OrganizationalUnitNotFoundException" -// We can't find an organizational unit (OU) with the OrganizationalUnitId that -// you specified. +// We can't find an OU with the OrganizationalUnitId that you specified. // // * ErrCodeServiceException "ServiceException" // AWS Organizations can't complete your request because of an internal service @@ -2359,7 +2372,7 @@ const opDeletePolicy = "DeletePolicy" // DeletePolicyRequest generates a "aws/request.Request" representing the // client's request for the DeletePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2393,8 +2406,7 @@ func (c *Organizations) DeletePolicyRequest(input *DeletePolicyInput) (req *requ output = &DeletePolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2422,7 +2434,7 @@ func (c *Organizations) DeletePolicyRequest(input *DeletePolicyInput) (req *requ // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -2438,11 +2450,11 @@ func (c *Organizations) DeletePolicyRequest(input *DeletePolicyInput) (req *requ // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -2462,11 +2474,11 @@ func (c *Organizations) DeletePolicyRequest(input *DeletePolicyInput) (req *requ // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -2490,7 +2502,7 @@ func (c *Organizations) DeletePolicyRequest(input *DeletePolicyInput) (req *requ // // * ErrCodePolicyInUseException "PolicyInUseException" // The policy is attached to one or more entities. You must detach it from all -// roots, organizational units (OUs), and accounts before performing this operation. +// roots, OUs, and accounts before performing this operation. // // * ErrCodePolicyNotFoundException "PolicyNotFoundException" // We can't find a policy with the PolicyId that you specified. @@ -2530,7 +2542,7 @@ const opDescribeAccount = "DescribeAccount" // DescribeAccountRequest generates a "aws/request.Request" representing the // client's request for the DescribeAccount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2590,11 +2602,11 @@ func (c *Organizations) DescribeAccountRequest(input *DescribeAccountInput) (req // // * ErrCodeAccountNotFoundException "AccountNotFoundException" // We can't find an AWS account with the AccountId that you specified, or the -// account whose credentials you used to make this request is not a member of +// account whose credentials you used to make this request isn't a member of // an organization. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeInvalidInputException "InvalidInputException" @@ -2606,11 +2618,11 @@ func (c *Organizations) DescribeAccountRequest(input *DescribeAccountInput) (req // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -2630,11 +2642,11 @@ func (c *Organizations) DescribeAccountRequest(input *DescribeAccountInput) (req // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -2691,7 +2703,7 @@ const opDescribeCreateAccountStatus = "DescribeCreateAccountStatus" // DescribeCreateAccountStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeCreateAccountStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2750,7 +2762,7 @@ func (c *Organizations) DescribeCreateAccountStatusRequest(input *DescribeCreate // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeCreateAccountStatusNotFoundException "CreateAccountStatusNotFoundException" @@ -2766,11 +2778,11 @@ func (c *Organizations) DescribeCreateAccountStatusRequest(input *DescribeCreate // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -2790,11 +2802,11 @@ func (c *Organizations) DescribeCreateAccountStatusRequest(input *DescribeCreate // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -2851,7 +2863,7 @@ const opDescribeHandshake = "DescribeHandshake" // DescribeHandshakeRequest generates a "aws/request.Request" representing the // client's request for the DescribeHandshake operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2931,11 +2943,11 @@ func (c *Organizations) DescribeHandshakeRequest(input *DescribeHandshakeInput) // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -2955,11 +2967,11 @@ func (c *Organizations) DescribeHandshakeRequest(input *DescribeHandshakeInput) // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -3016,7 +3028,7 @@ const opDescribeOrganization = "DescribeOrganization" // DescribeOrganizationRequest generates a "aws/request.Request" representing the // client's request for the DescribeOrganization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3080,7 +3092,7 @@ func (c *Organizations) DescribeOrganizationRequest(input *DescribeOrganizationI // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -3122,7 +3134,7 @@ const opDescribeOrganizationalUnit = "DescribeOrganizationalUnit" // DescribeOrganizationalUnitRequest generates a "aws/request.Request" representing the // client's request for the DescribeOrganizationalUnit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3181,7 +3193,7 @@ func (c *Organizations) DescribeOrganizationalUnitRequest(input *DescribeOrganiz // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeInvalidInputException "InvalidInputException" @@ -3193,11 +3205,11 @@ func (c *Organizations) DescribeOrganizationalUnitRequest(input *DescribeOrganiz // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -3217,11 +3229,11 @@ func (c *Organizations) DescribeOrganizationalUnitRequest(input *DescribeOrganiz // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -3244,8 +3256,7 @@ func (c *Organizations) DescribeOrganizationalUnitRequest(input *DescribeOrganiz // between entities in the same root. // // * ErrCodeOrganizationalUnitNotFoundException "OrganizationalUnitNotFoundException" -// We can't find an organizational unit (OU) with the OrganizationalUnitId that -// you specified. +// We can't find an OU with the OrganizationalUnitId that you specified. // // * ErrCodeServiceException "ServiceException" // AWS Organizations can't complete your request because of an internal service @@ -3282,7 +3293,7 @@ const opDescribePolicy = "DescribePolicy" // DescribePolicyRequest generates a "aws/request.Request" representing the // client's request for the DescribePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3341,7 +3352,7 @@ func (c *Organizations) DescribePolicyRequest(input *DescribePolicyInput) (req * // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeInvalidInputException "InvalidInputException" @@ -3353,11 +3364,11 @@ func (c *Organizations) DescribePolicyRequest(input *DescribePolicyInput) (req * // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -3377,11 +3388,11 @@ func (c *Organizations) DescribePolicyRequest(input *DescribePolicyInput) (req * // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -3441,7 +3452,7 @@ const opDetachPolicy = "DetachPolicy" // DetachPolicyRequest generates a "aws/request.Request" representing the // client's request for the DetachPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3475,8 +3486,7 @@ func (c *Organizations) DetachPolicyRequest(input *DetachPolicyInput) (req *requ output = &DetachPolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3514,7 +3524,7 @@ func (c *Organizations) DetachPolicyRequest(input *DetachPolicyInput) (req *requ // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -3523,40 +3533,42 @@ func (c *Organizations) DetachPolicyRequest(input *DetachPolicyInput) (req *requ // // * ErrCodeConstraintViolationException "ConstraintViolationException" // Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last SCP from an OU or root, inviting -// or creating too many accounts to the organization, or attaching too many -// policies to an account, OU, or root. This exception includes a reason that -// contains additional information about the violated limit: +// example, attempting to removing the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: // -// ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number -// of accounts in an organization. If you need more accounts, contact AWS Support -// to request an increase in your limit. +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contactAWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. // -// Or, The number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations, or contact -// AWS Support to request an increase in the number of accounts. +// Or the number of invitations that you tried to send would cause you to exceed +// the limit of accounts in your organization. Send fewer invitations or +// contact AWS Support to request an increase in the number of accounts. // -// Note: deleted and closed accounts still count toward your limit. +// Deleted and closed accounts still count toward your limit. // // If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of organizational -// units you can have in an organization. +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. // -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit -// tree that is too many levels deep. +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. // // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation // that requires the organization to be configured to support all features. -// An organization that supports consolidated billing features only cannot +// An organization that supports only consolidated billing features can't // perform this operation. // // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of @@ -3571,23 +3583,24 @@ func (c *Organizations) DetachPolicyRequest(input *DetachPolicyInput) (req *requ // minimum number of policies of a certain type required. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that does not yet have enough information to exist -// as a stand-alone account. This account requires you to first agree to -// the AWS Customer Agreement. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that does not yet have enough information -// to exist as a stand-alone account. This account requires you to first -// complete phone verification. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this account, you first must associate a payment instrument, such -// as a credit card, with the account. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// with this master account, you first must associate a payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation @@ -3620,11 +3633,11 @@ func (c *Organizations) DetachPolicyRequest(input *DetachPolicyInput) (req *requ // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -3644,11 +3657,11 @@ func (c *Organizations) DetachPolicyRequest(input *DetachPolicyInput) (req *requ // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -3714,7 +3727,7 @@ const opDisableAWSServiceAccess = "DisableAWSServiceAccess" // DisableAWSServiceAccessRequest generates a "aws/request.Request" representing the // client's request for the DisableAWSServiceAccess operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3748,8 +3761,7 @@ func (c *Organizations) DisableAWSServiceAccessRequest(input *DisableAWSServiceA output = &DisableAWSServiceAccessOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3795,7 +3807,7 @@ func (c *Organizations) DisableAWSServiceAccessRequest(input *DisableAWSServiceA // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -3804,40 +3816,42 @@ func (c *Organizations) DisableAWSServiceAccessRequest(input *DisableAWSServiceA // // * ErrCodeConstraintViolationException "ConstraintViolationException" // Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last SCP from an OU or root, inviting -// or creating too many accounts to the organization, or attaching too many -// policies to an account, OU, or root. This exception includes a reason that -// contains additional information about the violated limit: +// example, attempting to removing the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: // -// ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number -// of accounts in an organization. If you need more accounts, contact AWS Support -// to request an increase in your limit. +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contactAWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. // -// Or, The number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations, or contact -// AWS Support to request an increase in the number of accounts. +// Or the number of invitations that you tried to send would cause you to exceed +// the limit of accounts in your organization. Send fewer invitations or +// contact AWS Support to request an increase in the number of accounts. // -// Note: deleted and closed accounts still count toward your limit. +// Deleted and closed accounts still count toward your limit. // // If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of organizational -// units you can have in an organization. +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. // -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit -// tree that is too many levels deep. +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. // // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation // that requires the organization to be configured to support all features. -// An organization that supports consolidated billing features only cannot +// An organization that supports only consolidated billing features can't // perform this operation. // // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of @@ -3852,23 +3866,24 @@ func (c *Organizations) DisableAWSServiceAccessRequest(input *DisableAWSServiceA // minimum number of policies of a certain type required. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that does not yet have enough information to exist -// as a stand-alone account. This account requires you to first agree to -// the AWS Customer Agreement. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that does not yet have enough information -// to exist as a stand-alone account. This account requires you to first -// complete phone verification. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this account, you first must associate a payment instrument, such -// as a credit card, with the account. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// with this master account, you first must associate a payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation @@ -3901,11 +3916,11 @@ func (c *Organizations) DisableAWSServiceAccessRequest(input *DisableAWSServiceA // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -3925,11 +3940,11 @@ func (c *Organizations) DisableAWSServiceAccessRequest(input *DisableAWSServiceA // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -3986,7 +4001,7 @@ const opDisablePolicyType = "DisablePolicyType" // DisablePolicyTypeRequest generates a "aws/request.Request" representing the // client's request for the DisablePolicyType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4054,7 +4069,7 @@ func (c *Organizations) DisablePolicyTypeRequest(input *DisablePolicyTypeInput) // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -4063,40 +4078,42 @@ func (c *Organizations) DisablePolicyTypeRequest(input *DisablePolicyTypeInput) // // * ErrCodeConstraintViolationException "ConstraintViolationException" // Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last SCP from an OU or root, inviting -// or creating too many accounts to the organization, or attaching too many -// policies to an account, OU, or root. This exception includes a reason that -// contains additional information about the violated limit: +// example, attempting to removing the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: // -// ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number -// of accounts in an organization. If you need more accounts, contact AWS Support -// to request an increase in your limit. +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contactAWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. // -// Or, The number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations, or contact -// AWS Support to request an increase in the number of accounts. +// Or the number of invitations that you tried to send would cause you to exceed +// the limit of accounts in your organization. Send fewer invitations or +// contact AWS Support to request an increase in the number of accounts. // -// Note: deleted and closed accounts still count toward your limit. +// Deleted and closed accounts still count toward your limit. // // If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of organizational -// units you can have in an organization. +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. // -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit -// tree that is too many levels deep. +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. // // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation // that requires the organization to be configured to support all features. -// An organization that supports consolidated billing features only cannot +// An organization that supports only consolidated billing features can't // perform this operation. // // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of @@ -4111,23 +4128,24 @@ func (c *Organizations) DisablePolicyTypeRequest(input *DisablePolicyTypeInput) // minimum number of policies of a certain type required. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that does not yet have enough information to exist -// as a stand-alone account. This account requires you to first agree to -// the AWS Customer Agreement. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that does not yet have enough information -// to exist as a stand-alone account. This account requires you to first -// complete phone verification. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this account, you first must associate a payment instrument, such -// as a credit card, with the account. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// with this master account, you first must associate a payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation @@ -4160,11 +4178,11 @@ func (c *Organizations) DisablePolicyTypeRequest(input *DisablePolicyTypeInput) // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -4184,11 +4202,11 @@ func (c *Organizations) DisablePolicyTypeRequest(input *DisablePolicyTypeInput) // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -4211,7 +4229,7 @@ func (c *Organizations) DisablePolicyTypeRequest(input *DisablePolicyTypeInput) // between entities in the same root. // // * ErrCodePolicyTypeNotEnabledException "PolicyTypeNotEnabledException" -// The specified policy type is not currently enabled in this root. You cannot +// The specified policy type isn't currently enabled in this root. You can't // attach policies of the specified type to entities in a root until you enable // that type in the root. For more information, see Enabling All Features in // Your Organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html) @@ -4255,7 +4273,7 @@ const opEnableAWSServiceAccess = "EnableAWSServiceAccess" // EnableAWSServiceAccessRequest generates a "aws/request.Request" representing the // client's request for the EnableAWSServiceAccess operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4289,8 +4307,7 @@ func (c *Organizations) EnableAWSServiceAccessRequest(input *EnableAWSServiceAcc output = &EnableAWSServiceAccessOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4333,7 +4350,7 @@ func (c *Organizations) EnableAWSServiceAccessRequest(input *EnableAWSServiceAcc // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -4342,40 +4359,42 @@ func (c *Organizations) EnableAWSServiceAccessRequest(input *EnableAWSServiceAcc // // * ErrCodeConstraintViolationException "ConstraintViolationException" // Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last SCP from an OU or root, inviting -// or creating too many accounts to the organization, or attaching too many -// policies to an account, OU, or root. This exception includes a reason that -// contains additional information about the violated limit: +// example, attempting to removing the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: // -// ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number -// of accounts in an organization. If you need more accounts, contact AWS Support -// to request an increase in your limit. +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contactAWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. // -// Or, The number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations, or contact -// AWS Support to request an increase in the number of accounts. +// Or the number of invitations that you tried to send would cause you to exceed +// the limit of accounts in your organization. Send fewer invitations or +// contact AWS Support to request an increase in the number of accounts. // -// Note: deleted and closed accounts still count toward your limit. +// Deleted and closed accounts still count toward your limit. // // If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of organizational -// units you can have in an organization. +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. // -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit -// tree that is too many levels deep. +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. // // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation // that requires the organization to be configured to support all features. -// An organization that supports consolidated billing features only cannot +// An organization that supports only consolidated billing features can't // perform this operation. // // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of @@ -4390,23 +4409,24 @@ func (c *Organizations) EnableAWSServiceAccessRequest(input *EnableAWSServiceAcc // minimum number of policies of a certain type required. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that does not yet have enough information to exist -// as a stand-alone account. This account requires you to first agree to -// the AWS Customer Agreement. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that does not yet have enough information -// to exist as a stand-alone account. This account requires you to first -// complete phone verification. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this account, you first must associate a payment instrument, such -// as a credit card, with the account. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// with this master account, you first must associate a payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation @@ -4439,11 +4459,11 @@ func (c *Organizations) EnableAWSServiceAccessRequest(input *EnableAWSServiceAcc // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -4463,11 +4483,11 @@ func (c *Organizations) EnableAWSServiceAccessRequest(input *EnableAWSServiceAcc // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -4524,7 +4544,7 @@ const opEnableAllFeatures = "EnableAllFeatures" // EnableAllFeaturesRequest generates a "aws/request.Request" representing the // client's request for the EnableAllFeatures operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4610,7 +4630,7 @@ func (c *Organizations) EnableAllFeaturesRequest(input *EnableAllFeaturesInput) // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -4625,15 +4645,15 @@ func (c *Organizations) EnableAllFeaturesRequest(input *EnableAllFeaturesInput) // specific API or operation: // // * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on -// the number of accounts in an organization. Note: deleted and closed accounts -// still count toward your limit. +// the number of accounts in an organization. Note that deleted and closed +// accounts still count toward your limit. // // If you get this exception immediately after creating the organization, wait // one hour and try again. If after an hour it continues to fail with this -// error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // // * ALREADY_IN_AN_ORGANIZATION: The handshake request is invalid because // the invited account is already a member of an organization. @@ -4641,13 +4661,13 @@ func (c *Organizations) EnableAllFeaturesRequest(input *EnableAllFeaturesInput) // * ORGANIZATION_ALREADY_HAS_ALL_FEATURES: The handshake request is invalid // because the organization has already enabled all features. // -// * INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You cannot issue new invitations -// to join an organization while it is in the process of enabling all features. +// * INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You can't issue new invitations +// to join an organization while it's in the process of enabling all features. // You can resume inviting accounts after you finalize the process when all // accounts have agreed to the change. // -// * PAYMENT_INSTRUMENT_REQUIRED: You cannot complete the operation with -// an account that does not have a payment instrument, such as a credit card, +// * PAYMENT_INSTRUMENT_REQUIRED: You can't complete the operation with an +// account that doesn't have a payment instrument, such as a credit card, // associated with it. // // * ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD: The request failed because @@ -4668,11 +4688,11 @@ func (c *Organizations) EnableAllFeaturesRequest(input *EnableAllFeaturesInput) // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -4692,11 +4712,11 @@ func (c *Organizations) EnableAllFeaturesRequest(input *EnableAllFeaturesInput) // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -4753,7 +4773,7 @@ const opEnablePolicyType = "EnablePolicyType" // EnablePolicyTypeRequest generates a "aws/request.Request" representing the // client's request for the EnablePolicyType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4821,7 +4841,7 @@ func (c *Organizations) EnablePolicyTypeRequest(input *EnablePolicyTypeInput) (r // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -4830,40 +4850,42 @@ func (c *Organizations) EnablePolicyTypeRequest(input *EnablePolicyTypeInput) (r // // * ErrCodeConstraintViolationException "ConstraintViolationException" // Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last SCP from an OU or root, inviting -// or creating too many accounts to the organization, or attaching too many -// policies to an account, OU, or root. This exception includes a reason that -// contains additional information about the violated limit: +// example, attempting to removing the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: // -// ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number -// of accounts in an organization. If you need more accounts, contact AWS Support -// to request an increase in your limit. +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contactAWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. // -// Or, The number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations, or contact -// AWS Support to request an increase in the number of accounts. +// Or the number of invitations that you tried to send would cause you to exceed +// the limit of accounts in your organization. Send fewer invitations or +// contact AWS Support to request an increase in the number of accounts. // -// Note: deleted and closed accounts still count toward your limit. +// Deleted and closed accounts still count toward your limit. // // If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of organizational -// units you can have in an organization. +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. // -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit -// tree that is too many levels deep. +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. // // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation // that requires the organization to be configured to support all features. -// An organization that supports consolidated billing features only cannot +// An organization that supports only consolidated billing features can't // perform this operation. // // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of @@ -4878,23 +4900,24 @@ func (c *Organizations) EnablePolicyTypeRequest(input *EnablePolicyTypeInput) (r // minimum number of policies of a certain type required. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that does not yet have enough information to exist -// as a stand-alone account. This account requires you to first agree to -// the AWS Customer Agreement. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that does not yet have enough information -// to exist as a stand-alone account. This account requires you to first -// complete phone verification. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this account, you first must associate a payment instrument, such -// as a credit card, with the account. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// with this master account, you first must associate a payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation @@ -4927,11 +4950,11 @@ func (c *Organizations) EnablePolicyTypeRequest(input *EnablePolicyTypeInput) (r // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -4951,11 +4974,11 @@ func (c *Organizations) EnablePolicyTypeRequest(input *EnablePolicyTypeInput) (r // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -4993,9 +5016,9 @@ func (c *Organizations) EnablePolicyTypeRequest(input *EnablePolicyTypeInput) (r // // * ErrCodePolicyTypeNotAvailableForOrganizationException "PolicyTypeNotAvailableForOrganizationException" // You can't use the specified policy type with the feature set currently enabled -// for this organization. For example, you can enable service control policies -// (SCPs) only after you enable all features in the organization. For more information, -// see Enabling and Disabling a Policy Type on a Root (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html#enable_policies_on_root) +// for this organization. For example, you can enable SCPs only after you enable +// all features in the organization. For more information, see Enabling and +// Disabling a Policy Type on a Root (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html#enable_policies_on_root) // in the AWS Organizations User Guide. // // See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/EnablePolicyType @@ -5025,7 +5048,7 @@ const opInviteAccountToOrganization = "InviteAccountToOrganization" // InviteAccountToOrganizationRequest generates a "aws/request.Request" representing the // client's request for the InviteAccountToOrganization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5099,9 +5122,15 @@ func (c *Organizations) InviteAccountToOrganizationRequest(input *InviteAccountT // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // +// * ErrCodeAccountOwnerNotVerifiedException "AccountOwnerNotVerifiedException" +// You can't invite an existing account to your organization until you verify +// that you own the email address associated with the master account. For more +// information, see Email Address Verification (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_create.html#about-email-verification) +// in the AWS Organizations User Guide. +// // * ErrCodeConcurrentModificationException "ConcurrentModificationException" // The target of the operation is currently being modified by a different request. // Try again later. @@ -5114,15 +5143,15 @@ func (c *Organizations) InviteAccountToOrganizationRequest(input *InviteAccountT // specific API or operation: // // * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on -// the number of accounts in an organization. Note: deleted and closed accounts -// still count toward your limit. +// the number of accounts in an organization. Note that deleted and closed +// accounts still count toward your limit. // // If you get this exception immediately after creating the organization, wait // one hour and try again. If after an hour it continues to fail with this -// error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // // * ALREADY_IN_AN_ORGANIZATION: The handshake request is invalid because // the invited account is already a member of an organization. @@ -5130,13 +5159,13 @@ func (c *Organizations) InviteAccountToOrganizationRequest(input *InviteAccountT // * ORGANIZATION_ALREADY_HAS_ALL_FEATURES: The handshake request is invalid // because the organization has already enabled all features. // -// * INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You cannot issue new invitations -// to join an organization while it is in the process of enabling all features. +// * INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You can't issue new invitations +// to join an organization while it's in the process of enabling all features. // You can resume inviting accounts after you finalize the process when all // accounts have agreed to the change. // -// * PAYMENT_INSTRUMENT_REQUIRED: You cannot complete the operation with -// an account that does not have a payment instrument, such as a credit card, +// * PAYMENT_INSTRUMENT_REQUIRED: You can't complete the operation with an +// account that doesn't have a payment instrument, such as a credit card, // associated with it. // // * ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD: The request failed because @@ -5164,11 +5193,11 @@ func (c *Organizations) InviteAccountToOrganizationRequest(input *InviteAccountT // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -5188,11 +5217,11 @@ func (c *Organizations) InviteAccountToOrganizationRequest(input *InviteAccountT // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -5215,10 +5244,10 @@ func (c *Organizations) InviteAccountToOrganizationRequest(input *InviteAccountT // between entities in the same root. // // * ErrCodeFinalizingOrganizationException "FinalizingOrganizationException" -// AWS Organizations could not perform the operation because your organization -// has not finished initializing. This can take up to an hour. Try again later. -// If after one hour you continue to receive this error, contact AWS Customer -// Support (https://console.aws.amazon.com/support/home#/). +// AWS Organizations couldn't perform the operation because your organization +// hasn't finished initializing. This can take up to an hour. Try again later. +// If after one hour you continue to receive this error, contact AWS Support +// (https://console.aws.amazon.com/support/home#/). // // * ErrCodeServiceException "ServiceException" // AWS Organizations can't complete your request because of an internal service @@ -5255,7 +5284,7 @@ const opLeaveOrganization = "LeaveOrganization" // LeaveOrganizationRequest generates a "aws/request.Request" representing the // client's request for the LeaveOrganization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5289,8 +5318,7 @@ func (c *Organizations) LeaveOrganizationRequest(input *LeaveOrganizationInput) output = &LeaveOrganizationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5343,11 +5371,11 @@ func (c *Organizations) LeaveOrganizationRequest(input *LeaveOrganizationInput) // // * ErrCodeAccountNotFoundException "AccountNotFoundException" // We can't find an AWS account with the AccountId that you specified, or the -// account whose credentials you used to make this request is not a member of +// account whose credentials you used to make this request isn't a member of // an organization. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -5356,40 +5384,42 @@ func (c *Organizations) LeaveOrganizationRequest(input *LeaveOrganizationInput) // // * ErrCodeConstraintViolationException "ConstraintViolationException" // Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last SCP from an OU or root, inviting -// or creating too many accounts to the organization, or attaching too many -// policies to an account, OU, or root. This exception includes a reason that -// contains additional information about the violated limit: +// example, attempting to removing the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: // -// ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number -// of accounts in an organization. If you need more accounts, contact AWS Support -// to request an increase in your limit. +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contactAWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. // -// Or, The number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations, or contact -// AWS Support to request an increase in the number of accounts. +// Or the number of invitations that you tried to send would cause you to exceed +// the limit of accounts in your organization. Send fewer invitations or +// contact AWS Support to request an increase in the number of accounts. // -// Note: deleted and closed accounts still count toward your limit. +// Deleted and closed accounts still count toward your limit. // // If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of organizational -// units you can have in an organization. +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. // -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit -// tree that is too many levels deep. +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. // // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation // that requires the organization to be configured to support all features. -// An organization that supports consolidated billing features only cannot +// An organization that supports only consolidated billing features can't // perform this operation. // // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of @@ -5404,23 +5434,24 @@ func (c *Organizations) LeaveOrganizationRequest(input *LeaveOrganizationInput) // minimum number of policies of a certain type required. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that does not yet have enough information to exist -// as a stand-alone account. This account requires you to first agree to -// the AWS Customer Agreement. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that does not yet have enough information -// to exist as a stand-alone account. This account requires you to first -// complete phone verification. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this account, you first must associate a payment instrument, such -// as a credit card, with the account. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// with this master account, you first must associate a payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation @@ -5453,11 +5484,11 @@ func (c *Organizations) LeaveOrganizationRequest(input *LeaveOrganizationInput) // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -5477,11 +5508,11 @@ func (c *Organizations) LeaveOrganizationRequest(input *LeaveOrganizationInput) // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -5543,7 +5574,7 @@ const opListAWSServiceAccessForOrganization = "ListAWSServiceAccessForOrganizati // ListAWSServiceAccessForOrganizationRequest generates a "aws/request.Request" representing the // client's request for the ListAWSServiceAccessForOrganization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5616,45 +5647,47 @@ func (c *Organizations) ListAWSServiceAccessForOrganizationRequest(input *ListAW // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConstraintViolationException "ConstraintViolationException" // Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last SCP from an OU or root, inviting -// or creating too many accounts to the organization, or attaching too many -// policies to an account, OU, or root. This exception includes a reason that -// contains additional information about the violated limit: +// example, attempting to removing the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: // -// ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number -// of accounts in an organization. If you need more accounts, contact AWS Support -// to request an increase in your limit. +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contactAWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. // -// Or, The number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations, or contact -// AWS Support to request an increase in the number of accounts. +// Or the number of invitations that you tried to send would cause you to exceed +// the limit of accounts in your organization. Send fewer invitations or +// contact AWS Support to request an increase in the number of accounts. // -// Note: deleted and closed accounts still count toward your limit. +// Deleted and closed accounts still count toward your limit. // // If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of organizational -// units you can have in an organization. +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. // -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit -// tree that is too many levels deep. +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. // // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation // that requires the organization to be configured to support all features. -// An organization that supports consolidated billing features only cannot +// An organization that supports only consolidated billing features can't // perform this operation. // // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of @@ -5669,23 +5702,24 @@ func (c *Organizations) ListAWSServiceAccessForOrganizationRequest(input *ListAW // minimum number of policies of a certain type required. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that does not yet have enough information to exist -// as a stand-alone account. This account requires you to first agree to -// the AWS Customer Agreement. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that does not yet have enough information -// to exist as a stand-alone account. This account requires you to first -// complete phone verification. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this account, you first must associate a payment instrument, such -// as a credit card, with the account. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// with this master account, you first must associate a payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation @@ -5718,11 +5752,11 @@ func (c *Organizations) ListAWSServiceAccessForOrganizationRequest(input *ListAW // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -5742,11 +5776,11 @@ func (c *Organizations) ListAWSServiceAccessForOrganizationRequest(input *ListAW // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -5853,7 +5887,7 @@ 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 -// successfuly. +// 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. @@ -5925,7 +5959,7 @@ func (c *Organizations) ListAccountsRequest(input *ListAccountsInput) (req *requ // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeInvalidInputException "InvalidInputException" @@ -5937,11 +5971,11 @@ func (c *Organizations) ListAccountsRequest(input *ListAccountsInput) (req *requ // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -5961,11 +5995,11 @@ func (c *Organizations) ListAccountsRequest(input *ListAccountsInput) (req *requ // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -6072,7 +6106,7 @@ const opListAccountsForParent = "ListAccountsForParent" // ListAccountsForParentRequest generates a "aws/request.Request" representing the // client's request for the ListAccountsForParent operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6147,7 +6181,7 @@ func (c *Organizations) ListAccountsForParentRequest(input *ListAccountsForParen // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeInvalidInputException "InvalidInputException" @@ -6159,11 +6193,11 @@ func (c *Organizations) ListAccountsForParentRequest(input *ListAccountsForParen // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -6183,11 +6217,11 @@ func (c *Organizations) ListAccountsForParentRequest(input *ListAccountsForParen // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -6210,8 +6244,7 @@ func (c *Organizations) ListAccountsForParentRequest(input *ListAccountsForParen // between entities in the same root. // // * ErrCodeParentNotFoundException "ParentNotFoundException" -// We can't find a root or organizational unit (OU) with the ParentId that you -// specified. +// We can't find a root or OU with the ParentId that you specified. // // * ErrCodeServiceException "ServiceException" // AWS Organizations can't complete your request because of an internal service @@ -6298,7 +6331,7 @@ const opListChildren = "ListChildren" // ListChildrenRequest generates a "aws/request.Request" representing the // client's request for the ListChildren operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6370,7 +6403,7 @@ func (c *Organizations) ListChildrenRequest(input *ListChildrenInput) (req *requ // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeInvalidInputException "InvalidInputException" @@ -6382,11 +6415,11 @@ func (c *Organizations) ListChildrenRequest(input *ListChildrenInput) (req *requ // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -6406,11 +6439,11 @@ func (c *Organizations) ListChildrenRequest(input *ListChildrenInput) (req *requ // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -6433,8 +6466,7 @@ func (c *Organizations) ListChildrenRequest(input *ListChildrenInput) (req *requ // between entities in the same root. // // * ErrCodeParentNotFoundException "ParentNotFoundException" -// We can't find a root or organizational unit (OU) with the ParentId that you -// specified. +// We can't find a root or OU with the ParentId that you specified. // // * ErrCodeServiceException "ServiceException" // AWS Organizations can't complete your request because of an internal service @@ -6521,7 +6553,7 @@ const opListCreateAccountStatus = "ListCreateAccountStatus" // ListCreateAccountStatusRequest generates a "aws/request.Request" representing the // client's request for the ListCreateAccountStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6592,7 +6624,7 @@ func (c *Organizations) ListCreateAccountStatusRequest(input *ListCreateAccountS // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeInvalidInputException "InvalidInputException" @@ -6604,11 +6636,11 @@ func (c *Organizations) ListCreateAccountStatusRequest(input *ListCreateAccountS // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -6628,11 +6660,11 @@ func (c *Organizations) ListCreateAccountStatusRequest(input *ListCreateAccountS // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -6739,7 +6771,7 @@ const opListHandshakesForAccount = "ListHandshakesForAccount" // ListHandshakesForAccountRequest generates a "aws/request.Request" representing the // client's request for the ListHandshakesForAccount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6826,11 +6858,11 @@ func (c *Organizations) ListHandshakesForAccountRequest(input *ListHandshakesFor // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -6850,11 +6882,11 @@ func (c *Organizations) ListHandshakesForAccountRequest(input *ListHandshakesFor // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -6961,7 +6993,7 @@ const opListHandshakesForOrganization = "ListHandshakesForOrganization" // ListHandshakesForOrganizationRequest generates a "aws/request.Request" representing the // client's request for the ListHandshakesForOrganization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7038,7 +7070,7 @@ func (c *Organizations) ListHandshakesForOrganizationRequest(input *ListHandshak // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -7054,11 +7086,11 @@ func (c *Organizations) ListHandshakesForOrganizationRequest(input *ListHandshak // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -7078,11 +7110,11 @@ func (c *Organizations) ListHandshakesForOrganizationRequest(input *ListHandshak // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -7189,7 +7221,7 @@ const opListOrganizationalUnitsForParent = "ListOrganizationalUnitsForParent" // ListOrganizationalUnitsForParentRequest generates a "aws/request.Request" representing the // client's request for the ListOrganizationalUnitsForParent operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7259,7 +7291,7 @@ func (c *Organizations) ListOrganizationalUnitsForParentRequest(input *ListOrgan // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeInvalidInputException "InvalidInputException" @@ -7271,11 +7303,11 @@ func (c *Organizations) ListOrganizationalUnitsForParentRequest(input *ListOrgan // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -7295,11 +7327,11 @@ func (c *Organizations) ListOrganizationalUnitsForParentRequest(input *ListOrgan // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -7322,8 +7354,7 @@ func (c *Organizations) ListOrganizationalUnitsForParentRequest(input *ListOrgan // between entities in the same root. // // * ErrCodeParentNotFoundException "ParentNotFoundException" -// We can't find a root or organizational unit (OU) with the ParentId that you -// specified. +// We can't find a root or OU with the ParentId that you specified. // // * ErrCodeServiceException "ServiceException" // AWS Organizations can't complete your request because of an internal service @@ -7410,7 +7441,7 @@ const opListParents = "ListParents" // ListParentsRequest generates a "aws/request.Request" representing the // client's request for the ListParents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7484,7 +7515,7 @@ func (c *Organizations) ListParentsRequest(input *ListParentsInput) (req *reques // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeChildNotFoundException "ChildNotFoundException" @@ -7500,11 +7531,11 @@ func (c *Organizations) ListParentsRequest(input *ListParentsInput) (req *reques // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -7524,11 +7555,11 @@ func (c *Organizations) ListParentsRequest(input *ListParentsInput) (req *reques // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -7635,7 +7666,7 @@ const opListPolicies = "ListPolicies" // ListPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7705,7 +7736,7 @@ func (c *Organizations) ListPoliciesRequest(input *ListPoliciesInput) (req *requ // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeInvalidInputException "InvalidInputException" @@ -7717,11 +7748,11 @@ func (c *Organizations) ListPoliciesRequest(input *ListPoliciesInput) (req *requ // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -7741,11 +7772,11 @@ func (c *Organizations) ListPoliciesRequest(input *ListPoliciesInput) (req *requ // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -7852,7 +7883,7 @@ const opListPoliciesForTarget = "ListPoliciesForTarget" // ListPoliciesForTargetRequest generates a "aws/request.Request" representing the // client's request for the ListPoliciesForTarget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7924,7 +7955,7 @@ func (c *Organizations) ListPoliciesForTargetRequest(input *ListPoliciesForTarge // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeInvalidInputException "InvalidInputException" @@ -7936,11 +7967,11 @@ func (c *Organizations) ListPoliciesForTargetRequest(input *ListPoliciesForTarge // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -7960,11 +7991,11 @@ func (c *Organizations) ListPoliciesForTargetRequest(input *ListPoliciesForTarge // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -8074,7 +8105,7 @@ const opListRoots = "ListRoots" // ListRootsRequest generates a "aws/request.Request" representing the // client's request for the ListRoots operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8150,7 +8181,7 @@ func (c *Organizations) ListRootsRequest(input *ListRootsInput) (req *request.Re // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeInvalidInputException "InvalidInputException" @@ -8162,11 +8193,11 @@ func (c *Organizations) ListRootsRequest(input *ListRootsInput) (req *request.Re // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -8186,11 +8217,11 @@ func (c *Organizations) ListRootsRequest(input *ListRootsInput) (req *request.Re // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -8297,7 +8328,7 @@ const opListTargetsForPolicy = "ListTargetsForPolicy" // ListTargetsForPolicyRequest generates a "aws/request.Request" representing the // client's request for the ListTargetsForPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8368,7 +8399,7 @@ func (c *Organizations) ListTargetsForPolicyRequest(input *ListTargetsForPolicyI // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeInvalidInputException "InvalidInputException" @@ -8380,11 +8411,11 @@ func (c *Organizations) ListTargetsForPolicyRequest(input *ListTargetsForPolicyI // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -8404,11 +8435,11 @@ func (c *Organizations) ListTargetsForPolicyRequest(input *ListTargetsForPolicyI // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -8518,7 +8549,7 @@ const opMoveAccount = "MoveAccount" // MoveAccountRequest generates a "aws/request.Request" representing the // client's request for the MoveAccount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8552,8 +8583,7 @@ func (c *Organizations) MoveAccountRequest(input *MoveAccountInput) (req *reques output = &MoveAccountOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -8588,11 +8618,11 @@ func (c *Organizations) MoveAccountRequest(input *MoveAccountInput) (req *reques // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -8612,11 +8642,11 @@ func (c *Organizations) MoveAccountRequest(input *MoveAccountInput) (req *reques // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -8650,7 +8680,7 @@ func (c *Organizations) MoveAccountRequest(input *MoveAccountInput) (req *reques // // * ErrCodeAccountNotFoundException "AccountNotFoundException" // We can't find an AWS account with the AccountId that you specified, or the -// account whose credentials you used to make this request is not a member of +// account whose credentials you used to make this request isn't a member of // an organization. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" @@ -8662,7 +8692,7 @@ func (c *Organizations) MoveAccountRequest(input *MoveAccountInput) (req *reques // Try again later. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeServiceException "ServiceException" @@ -8696,7 +8726,7 @@ const opRemoveAccountFromOrganization = "RemoveAccountFromOrganization" // RemoveAccountFromOrganizationRequest generates a "aws/request.Request" representing the // client's request for the RemoveAccountFromOrganization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8730,8 +8760,7 @@ func (c *Organizations) RemoveAccountFromOrganizationRequest(input *RemoveAccoun output = &RemoveAccountFromOrganizationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -8780,11 +8809,11 @@ func (c *Organizations) RemoveAccountFromOrganizationRequest(input *RemoveAccoun // // * ErrCodeAccountNotFoundException "AccountNotFoundException" // We can't find an AWS account with the AccountId that you specified, or the -// account whose credentials you used to make this request is not a member of +// account whose credentials you used to make this request isn't a member of // an organization. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -8793,40 +8822,42 @@ func (c *Organizations) RemoveAccountFromOrganizationRequest(input *RemoveAccoun // // * ErrCodeConstraintViolationException "ConstraintViolationException" // Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last SCP from an OU or root, inviting -// or creating too many accounts to the organization, or attaching too many -// policies to an account, OU, or root. This exception includes a reason that -// contains additional information about the violated limit: +// example, attempting to removing the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: // -// ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number -// of accounts in an organization. If you need more accounts, contact AWS Support -// to request an increase in your limit. +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contactAWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. // -// Or, The number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations, or contact -// AWS Support to request an increase in the number of accounts. +// Or the number of invitations that you tried to send would cause you to exceed +// the limit of accounts in your organization. Send fewer invitations or +// contact AWS Support to request an increase in the number of accounts. // -// Note: deleted and closed accounts still count toward your limit. +// Deleted and closed accounts still count toward your limit. // // If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of organizational -// units you can have in an organization. +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. // -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit -// tree that is too many levels deep. +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. // // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation // that requires the organization to be configured to support all features. -// An organization that supports consolidated billing features only cannot +// An organization that supports only consolidated billing features can't // perform this operation. // // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of @@ -8841,23 +8872,24 @@ func (c *Organizations) RemoveAccountFromOrganizationRequest(input *RemoveAccoun // minimum number of policies of a certain type required. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that does not yet have enough information to exist -// as a stand-alone account. This account requires you to first agree to -// the AWS Customer Agreement. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that does not yet have enough information -// to exist as a stand-alone account. This account requires you to first -// complete phone verification. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this account, you first must associate a payment instrument, such -// as a credit card, with the account. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// with this master account, you first must associate a payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation @@ -8890,11 +8922,11 @@ func (c *Organizations) RemoveAccountFromOrganizationRequest(input *RemoveAccoun // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -8914,11 +8946,11 @@ func (c *Organizations) RemoveAccountFromOrganizationRequest(input *RemoveAccoun // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -8980,7 +9012,7 @@ const opUpdateOrganizationalUnit = "UpdateOrganizationalUnit" // UpdateOrganizationalUnitRequest generates a "aws/request.Request" representing the // client's request for the UpdateOrganizationalUnit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9041,7 +9073,7 @@ func (c *Organizations) UpdateOrganizationalUnitRequest(input *UpdateOrganizatio // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -9049,7 +9081,7 @@ func (c *Organizations) UpdateOrganizationalUnitRequest(input *UpdateOrganizatio // Try again later. // // * ErrCodeDuplicateOrganizationalUnitException "DuplicateOrganizationalUnitException" -// An organizational unit (OU) with the same name already exists. +// An OU with the same name already exists. // // * ErrCodeInvalidInputException "InvalidInputException" // The requested operation failed because you provided invalid values for one @@ -9060,11 +9092,11 @@ func (c *Organizations) UpdateOrganizationalUnitRequest(input *UpdateOrganizatio // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -9084,11 +9116,11 @@ func (c *Organizations) UpdateOrganizationalUnitRequest(input *UpdateOrganizatio // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -9111,8 +9143,7 @@ func (c *Organizations) UpdateOrganizationalUnitRequest(input *UpdateOrganizatio // between entities in the same root. // // * ErrCodeOrganizationalUnitNotFoundException "OrganizationalUnitNotFoundException" -// We can't find an organizational unit (OU) with the OrganizationalUnitId that -// you specified. +// We can't find an OU with the OrganizationalUnitId that you specified. // // * ErrCodeServiceException "ServiceException" // AWS Organizations can't complete your request because of an internal service @@ -9149,7 +9180,7 @@ const opUpdatePolicy = "UpdatePolicy" // UpdatePolicyRequest generates a "aws/request.Request" representing the // client's request for the UpdatePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9210,7 +9241,7 @@ func (c *Organizations) UpdatePolicyRequest(input *UpdatePolicyInput) (req *requ // in the IAM User Guide. // // * ErrCodeAWSOrganizationsNotInUseException "AWSOrganizationsNotInUseException" -// Your account is not a member of an organization. To make this request, you +// Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. // // * ErrCodeConcurrentModificationException "ConcurrentModificationException" @@ -9219,40 +9250,42 @@ func (c *Organizations) UpdatePolicyRequest(input *UpdatePolicyInput) (req *requ // // * ErrCodeConstraintViolationException "ConstraintViolationException" // Performing this operation violates a minimum or maximum value limit. For -// example, attempting to removing the last SCP from an OU or root, inviting -// or creating too many accounts to the organization, or attaching too many -// policies to an account, OU, or root. This exception includes a reason that -// contains additional information about the violated limit: +// example, attempting to removing the last service control policy (SCP) from +// an OU or root, inviting or creating too many accounts to the organization, +// or attaching too many policies to an account, OU, or root. This exception +// includes a reason that contains additional information about the violated +// limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: // -// ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number -// of accounts in an organization. If you need more accounts, contact AWS Support -// to request an increase in your limit. +// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on +// the number of accounts in an organization. If you need more accounts, +// contactAWS Support (https://console.aws.amazon.com/support/home#/) to +// request an increase in your limit. // -// Or, The number of invitations that you tried to send would cause you to exceed -// the limit of accounts in your organization. Send fewer invitations, or contact -// AWS Support to request an increase in the number of accounts. +// Or the number of invitations that you tried to send would cause you to exceed +// the limit of accounts in your organization. Send fewer invitations or +// contact AWS Support to request an increase in the number of accounts. // -// Note: deleted and closed accounts still count toward your limit. +// Deleted and closed accounts still count toward your limit. // // If you get receive this exception when running a command immediately after -// creating the organization, wait one hour and try again. If after an hour -// it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). +// creating the organization, wait one hour and try again. If after an hour +// it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of -// handshakes you can send in one day. +// handshakes that you can send in one day. // -// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of organizational -// units you can have in an organization. +// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs +// that you can have in an organization. // -// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit -// tree that is too many levels deep. +// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is +// too many levels deep. // // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation // that requires the organization to be configured to support all features. -// An organization that supports consolidated billing features only cannot +// An organization that supports only consolidated billing features can't // perform this operation. // // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of @@ -9267,23 +9300,24 @@ func (c *Organizations) UpdatePolicyRequest(input *UpdatePolicyInput) (req *requ // minimum number of policies of a certain type required. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account -// from the organization that does not yet have enough information to exist -// as a stand-alone account. This account requires you to first agree to -// the AWS Customer Agreement. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// from the organization that doesn't yet have enough information to exist +// as a standalone account. This account requires you to first agree to the +// AWS Customer Agreement. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove -// an account from the organization that does not yet have enough information -// to exist as a stand-alone account. This account requires you to first -// complete phone verification. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// an account from the organization that doesn't yet have enough information +// to exist as a standalone account. This account requires you to first complete +// phone verification. Follow the steps at To leave an organization when +// all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization -// with this account, you first must associate a payment instrument, such -// as a credit card, with the account. Follow the steps at To leave an organization -// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) +// with this master account, you first must associate a payment instrument, +// such as a credit card, with the account. Follow the steps at To leave +// an organization when all required account information has not yet been +// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation @@ -9319,11 +9353,11 @@ func (c *Organizations) UpdatePolicyRequest(input *UpdatePolicyInput) (req *requ // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and -// cannot be modified. +// can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // -// * INVALID_ENUM: You specified a value that is not valid for that parameter. +// * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -9343,11 +9377,11 @@ func (c *Organizations) UpdatePolicyRequest(input *UpdatePolicyInput) (req *requ // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // -// * INVALID_ROLE_NAME: You provided a role name that is not valid. A role -// name can’t begin with the reserved prefix 'AWSServiceRoleFor'. +// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role +// name can't begin with the reserved prefix AWSServiceRoleFor. // -// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the -// organization. +// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource +// Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -9370,7 +9404,7 @@ func (c *Organizations) UpdatePolicyRequest(input *UpdatePolicyInput) (req *requ // between entities in the same root. // // * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocumentException" -// The provided policy document does not meet the requirements of the specified +// The provided policy document doesn't meet the requirements of the specified // policy type. For example, the syntax might be incorrect. For details about // service control policy syntax, see Service Control Policy Syntax (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html) // in the AWS Organizations User Guide. @@ -9487,7 +9521,7 @@ type Account struct { // // The regex pattern (http://wikipedia.org/wiki/regex) for this parameter is // a string of characters that represents a standard Internet email address. - Email *string `min:"6" type:"string"` + Email *string `min:"6" type:"string" sensitive:"true"` // The unique identifier (ID) of the account. // @@ -9506,7 +9540,7 @@ type Account struct { // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate // this parameter is a string of any of the characters in the ASCII character // range. - Name *string `min:"1" type:"string"` + Name *string `min:"1" type:"string" sensitive:"true"` // The status of the account in the organization. Status *string `type:"string" enum:"AccountStatus"` @@ -9763,37 +9797,38 @@ type CreateAccountInput struct { // The friendly name of the member account. // // AccountName is a required field - AccountName *string `min:"1" type:"string" required:"true"` + AccountName *string `min:"1" type:"string" required:"true" sensitive:"true"` // The email address of the owner to assign to the new member account. This // email address must not already be associated with another AWS account. You - // must use a valid email address to complete account creation. You cannot access + // must use a valid email address to complete account creation. You can't access // the root user of the account or remove an account that was created with an // invalid email address. // // Email is a required field - Email *string `min:"6" type:"string" required:"true"` + Email *string `min:"6" type:"string" required:"true" sensitive:"true"` // If set to ALLOW, the new account enables IAM users to access account billing - // information if they have the required permissions. If set to DENY, then only - // the root user of the new account can access account billing information. - // For more information, see Activating Access to the Billing and Cost Management + // information if they have the required permissions. If set to DENY, only the + // root user of the new account can access account billing information. For + // more information, see Activating Access to the Billing and Cost Management // Console (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html#ControllingAccessWebsite-Activate) // in the AWS Billing and Cost Management User Guide. // - // If you do not specify this parameter, the value defaults to ALLOW, and IAM + // If you don't specify this parameter, the value defaults to ALLOW, and IAM // users and roles with the required permissions can access billing information // for the new account. IamUserAccessToBilling *string `type:"string" enum:"IAMUserAccessToBilling"` // (Optional) // - // The name of an IAM role that Organizations automatically preconfigures in - // the new member account. This role trusts the master account, allowing users - // in the master account to assume the role, as permitted by the master account - // administrator. The role has administrator permissions in the new member account. + // The name of an IAM role that AWS Organizations automatically preconfigures + // in the new member account. This role trusts the master account, allowing + // users in the master account to assume the role, as permitted by the master + // account administrator. The role has administrator permissions in the new + // member account. // - // If you do not specify this parameter, the role name defaults to OrganizationAccountAccessRole. + // If you don't specify this parameter, the role name defaults to OrganizationAccountAccessRole. // // For more information about how to use this role to access the member account, // see Accessing and Administering the Member Accounts in Your Organization @@ -9872,7 +9907,10 @@ type CreateAccountOutput struct { // This response structure might not be fully populated when you first receive // it because account creation is an asynchronous process. You can pass the // returned CreateAccountStatus ID as a parameter to DescribeCreateAccountStatus - // to get status about the progress of the request at later times. + // to get status about the progress of the request at later times. You can also + // check the AWS CloudTrail log for the CreateAccountResult event. For more + // information, see Monitoring the Activity in Your Organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_monitoring.html) + // in the AWS Organizations User Guide. CreateAccountStatus *CreateAccountStatus `type:"structure"` } @@ -9905,7 +9943,7 @@ type CreateAccountStatus struct { AccountId *string `type:"string"` // The account name given to the account when it was created. - AccountName *string `min:"1" type:"string"` + AccountName *string `min:"1" type:"string" sensitive:"true"` // The date and time that the account was created and the request completed. CompletedTimestamp *time.Time `type:"timestamp"` @@ -10003,7 +10041,7 @@ type CreateOrganizationInput struct { // // * CONSOLIDATED_BILLING: All member accounts have their bills consolidated // to and paid by the master account. For more information, see Consolidated - // Billing (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#feature-set-cb-only) + // billing (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#feature-set-cb-only) // in the AWS Organizations User Guide. // // * ALL: In addition to all the features supported by the consolidated billing @@ -11464,7 +11502,7 @@ type HandshakeParty struct { // requires "h-" followed by from 8 to 32 lower-case letters or digits. // // Id is a required field - Id *string `min:"1" type:"string" required:"true"` + Id *string `min:"1" type:"string" required:"true" sensitive:"true"` // The type of party. // @@ -11542,7 +11580,7 @@ type HandshakeResource struct { // The information that is passed to the other party in the handshake. The format // of the value string must match the requirements of the specified type. - Value *string `type:"string"` + Value *string `type:"string" sensitive:"true"` } // String returns the string representation @@ -11578,7 +11616,7 @@ type InviteAccountToOrganizationInput struct { // Additional information that you want to include in the generated email to // the recipient account owner. - Notes *string `type:"string"` + Notes *string `type:"string" sensitive:"true"` // The identifier (ID) of the AWS account that you want to invite to join your // organization. This is a JSON object that contains the following elements: @@ -11594,7 +11632,7 @@ type InviteAccountToOrganizationInput struct { // number as the Id. If you specify "Type": "EMAIL", then you must specify the // email address that is associated with the account. // - // --target Id=bill@example.com,Type=EMAIL + // --target Id=diego@example.com,Type=EMAIL // // Target is a required field Target *HandshakeParty `type:"structure" required:"true"` @@ -11695,15 +11733,15 @@ func (s LeaveOrganizationOutput) GoString() string { type ListAWSServiceAccessForOrganizationInput struct { _ struct{} `type:"structure"` - // (Optional) Use this to limit the number of results you want included in the - // response. If you do not include this parameter, it defaults to a value that - // is specific to the operation. If additional items exist beyond the maximum - // you specify, the NextToken response element is present and has a value (is - // not null). Include that value as the NextToken request parameter in the next - // call to the operation to get the next part of the results. Note that Organizations - // might return fewer results than the maximum even when there are more results - // available. You should check NextToken after every operation to ensure that - // you receive all of the results. + // (Optional) Use this to limit the number of results you want included per + // page in the response. If you do not include this parameter, it defaults to + // a value that is specific to the operation. If additional items exist beyond + // the maximum you specify, the NextToken response element is present and has + // a value (is not null). Include that value as the NextToken request parameter + // in the next call to the operation to get the next part of the results. Note + // that Organizations might return fewer results than the maximum even when + // there are more results available. You should check NextToken after every + // operation to ensure that you receive all of the results. MaxResults *int64 `min:"1" type:"integer"` // Use this parameter if you receive a NextToken response in a previous request @@ -11789,15 +11827,15 @@ func (s *ListAWSServiceAccessForOrganizationOutput) SetNextToken(v string) *List type ListAccountsForParentInput struct { _ struct{} `type:"structure"` - // (Optional) Use this to limit the number of results you want included in the - // response. If you do not include this parameter, it defaults to a value that - // is specific to the operation. If additional items exist beyond the maximum - // you specify, the NextToken response element is present and has a value (is - // not null). Include that value as the NextToken request parameter in the next - // call to the operation to get the next part of the results. Note that Organizations - // might return fewer results than the maximum even when there are more results - // available. You should check NextToken after every operation to ensure that - // you receive all of the results. + // (Optional) Use this to limit the number of results you want included per + // page in the response. If you do not include this parameter, it defaults to + // a value that is specific to the operation. If additional items exist beyond + // the maximum you specify, the NextToken response element is present and has + // a value (is not null). Include that value as the NextToken request parameter + // in the next call to the operation to get the next part of the results. Note + // that Organizations might return fewer results than the maximum even when + // there are more results available. You should check NextToken after every + // operation to ensure that you receive all of the results. MaxResults *int64 `min:"1" type:"integer"` // Use this parameter if you receive a NextToken response in a previous request @@ -11896,15 +11934,15 @@ func (s *ListAccountsForParentOutput) SetNextToken(v string) *ListAccountsForPar type ListAccountsInput struct { _ struct{} `type:"structure"` - // (Optional) Use this to limit the number of results you want included in the - // response. If you do not include this parameter, it defaults to a value that - // is specific to the operation. If additional items exist beyond the maximum - // you specify, the NextToken response element is present and has a value (is - // not null). Include that value as the NextToken request parameter in the next - // call to the operation to get the next part of the results. Note that Organizations - // might return fewer results than the maximum even when there are more results - // available. You should check NextToken after every operation to ensure that - // you receive all of the results. + // (Optional) Use this to limit the number of results you want included per + // page in the response. If you do not include this parameter, it defaults to + // a value that is specific to the operation. If additional items exist beyond + // the maximum you specify, the NextToken response element is present and has + // a value (is not null). Include that value as the NextToken request parameter + // in the next call to the operation to get the next part of the results. Note + // that Organizations might return fewer results than the maximum even when + // there are more results available. You should check NextToken after every + // operation to ensure that you receive all of the results. MaxResults *int64 `min:"1" type:"integer"` // Use this parameter if you receive a NextToken response in a previous request @@ -11993,15 +12031,15 @@ type ListChildrenInput struct { // ChildType is a required field ChildType *string `type:"string" required:"true" enum:"ChildType"` - // (Optional) Use this to limit the number of results you want included in the - // response. If you do not include this parameter, it defaults to a value that - // is specific to the operation. If additional items exist beyond the maximum - // you specify, the NextToken response element is present and has a value (is - // not null). Include that value as the NextToken request parameter in the next - // call to the operation to get the next part of the results. Note that Organizations - // might return fewer results than the maximum even when there are more results - // available. You should check NextToken after every operation to ensure that - // you receive all of the results. + // (Optional) Use this to limit the number of results you want included per + // page in the response. If you do not include this parameter, it defaults to + // a value that is specific to the operation. If additional items exist beyond + // the maximum you specify, the NextToken response element is present and has + // a value (is not null). Include that value as the NextToken request parameter + // in the next call to the operation to get the next part of the results. Note + // that Organizations might return fewer results than the maximum even when + // there are more results available. You should check NextToken after every + // operation to ensure that you receive all of the results. MaxResults *int64 `min:"1" type:"integer"` // Use this parameter if you receive a NextToken response in a previous request @@ -12120,15 +12158,15 @@ func (s *ListChildrenOutput) SetNextToken(v string) *ListChildrenOutput { type ListCreateAccountStatusInput struct { _ struct{} `type:"structure"` - // (Optional) Use this to limit the number of results you want included in the - // response. If you do not include this parameter, it defaults to a value that - // is specific to the operation. If additional items exist beyond the maximum - // you specify, the NextToken response element is present and has a value (is - // not null). Include that value as the NextToken request parameter in the next - // call to the operation to get the next part of the results. Note that Organizations - // might return fewer results than the maximum even when there are more results - // available. You should check NextToken after every operation to ensure that - // you receive all of the results. + // (Optional) Use this to limit the number of results you want included per + // page in the response. If you do not include this parameter, it defaults to + // a value that is specific to the operation. If additional items exist beyond + // the maximum you specify, the NextToken response element is present and has + // a value (is not null). Include that value as the NextToken request parameter + // in the next call to the operation to get the next part of the results. Note + // that Organizations might return fewer results than the maximum even when + // there are more results available. You should check NextToken after every + // operation to ensure that you receive all of the results. MaxResults *int64 `min:"1" type:"integer"` // Use this parameter if you receive a NextToken response in a previous request @@ -12232,15 +12270,15 @@ type ListHandshakesForAccountInput struct { // handshakes that were generated by that parent request. Filter *HandshakeFilter `type:"structure"` - // (Optional) Use this to limit the number of results you want included in the - // response. If you do not include this parameter, it defaults to a value that - // is specific to the operation. If additional items exist beyond the maximum - // you specify, the NextToken response element is present and has a value (is - // not null). Include that value as the NextToken request parameter in the next - // call to the operation to get the next part of the results. Note that Organizations - // might return fewer results than the maximum even when there are more results - // available. You should check NextToken after every operation to ensure that - // you receive all of the results. + // (Optional) Use this to limit the number of results you want included per + // page in the response. If you do not include this parameter, it defaults to + // a value that is specific to the operation. If additional items exist beyond + // the maximum you specify, the NextToken response element is present and has + // a value (is not null). Include that value as the NextToken request parameter + // in the next call to the operation to get the next part of the results. Note + // that Organizations might return fewer results than the maximum even when + // there are more results available. You should check NextToken after every + // operation to ensure that you receive all of the results. MaxResults *int64 `min:"1" type:"integer"` // Use this parameter if you receive a NextToken response in a previous request @@ -12339,15 +12377,15 @@ type ListHandshakesForOrganizationInput struct { // the handshakes that were generated by that parent request. Filter *HandshakeFilter `type:"structure"` - // (Optional) Use this to limit the number of results you want included in the - // response. If you do not include this parameter, it defaults to a value that - // is specific to the operation. If additional items exist beyond the maximum - // you specify, the NextToken response element is present and has a value (is - // not null). Include that value as the NextToken request parameter in the next - // call to the operation to get the next part of the results. Note that Organizations - // might return fewer results than the maximum even when there are more results - // available. You should check NextToken after every operation to ensure that - // you receive all of the results. + // (Optional) Use this to limit the number of results you want included per + // page in the response. If you do not include this parameter, it defaults to + // a value that is specific to the operation. If additional items exist beyond + // the maximum you specify, the NextToken response element is present and has + // a value (is not null). Include that value as the NextToken request parameter + // in the next call to the operation to get the next part of the results. Note + // that Organizations might return fewer results than the maximum even when + // there are more results available. You should check NextToken after every + // operation to ensure that you receive all of the results. MaxResults *int64 `min:"1" type:"integer"` // Use this parameter if you receive a NextToken response in a previous request @@ -12438,15 +12476,15 @@ func (s *ListHandshakesForOrganizationOutput) SetNextToken(v string) *ListHandsh type ListOrganizationalUnitsForParentInput struct { _ struct{} `type:"structure"` - // (Optional) Use this to limit the number of results you want included in the - // response. If you do not include this parameter, it defaults to a value that - // is specific to the operation. If additional items exist beyond the maximum - // you specify, the NextToken response element is present and has a value (is - // not null). Include that value as the NextToken request parameter in the next - // call to the operation to get the next part of the results. Note that Organizations - // might return fewer results than the maximum even when there are more results - // available. You should check NextToken after every operation to ensure that - // you receive all of the results. + // (Optional) Use this to limit the number of results you want included per + // page in the response. If you do not include this parameter, it defaults to + // a value that is specific to the operation. If additional items exist beyond + // the maximum you specify, the NextToken response element is present and has + // a value (is not null). Include that value as the NextToken request parameter + // in the next call to the operation to get the next part of the results. Note + // that Organizations might return fewer results than the maximum even when + // there are more results available. You should check NextToken after every + // operation to ensure that you receive all of the results. MaxResults *int64 `min:"1" type:"integer"` // Use this parameter if you receive a NextToken response in a previous request @@ -12572,15 +12610,15 @@ type ListParentsInput struct { // ChildId is a required field ChildId *string `type:"string" required:"true"` - // (Optional) Use this to limit the number of results you want included in the - // response. If you do not include this parameter, it defaults to a value that - // is specific to the operation. If additional items exist beyond the maximum - // you specify, the NextToken response element is present and has a value (is - // not null). Include that value as the NextToken request parameter in the next - // call to the operation to get the next part of the results. Note that Organizations - // might return fewer results than the maximum even when there are more results - // available. You should check NextToken after every operation to ensure that - // you receive all of the results. + // (Optional) Use this to limit the number of results you want included per + // page in the response. If you do not include this parameter, it defaults to + // a value that is specific to the operation. If additional items exist beyond + // the maximum you specify, the NextToken response element is present and has + // a value (is not null). Include that value as the NextToken request parameter + // in the next call to the operation to get the next part of the results. Note + // that Organizations might return fewer results than the maximum even when + // there are more results available. You should check NextToken after every + // operation to ensure that you receive all of the results. MaxResults *int64 `min:"1" type:"integer"` // Use this parameter if you receive a NextToken response in a previous request @@ -12678,15 +12716,15 @@ type ListPoliciesForTargetInput struct { // Filter is a required field Filter *string `type:"string" required:"true" enum:"PolicyType"` - // (Optional) Use this to limit the number of results you want included in the - // response. If you do not include this parameter, it defaults to a value that - // is specific to the operation. If additional items exist beyond the maximum - // you specify, the NextToken response element is present and has a value (is - // not null). Include that value as the NextToken request parameter in the next - // call to the operation to get the next part of the results. Note that Organizations - // might return fewer results than the maximum even when there are more results - // available. You should check NextToken after every operation to ensure that - // you receive all of the results. + // (Optional) Use this to limit the number of results you want included per + // page in the response. If you do not include this parameter, it defaults to + // a value that is specific to the operation. If additional items exist beyond + // the maximum you specify, the NextToken response element is present and has + // a value (is not null). Include that value as the NextToken request parameter + // in the next call to the operation to get the next part of the results. Note + // that Organizations might return fewer results than the maximum even when + // there are more results available. You should check NextToken after every + // operation to ensure that you receive all of the results. MaxResults *int64 `min:"1" type:"integer"` // Use this parameter if you receive a NextToken response in a previous request @@ -12812,15 +12850,15 @@ type ListPoliciesInput struct { // Filter is a required field Filter *string `type:"string" required:"true" enum:"PolicyType"` - // (Optional) Use this to limit the number of results you want included in the - // response. If you do not include this parameter, it defaults to a value that - // is specific to the operation. If additional items exist beyond the maximum - // you specify, the NextToken response element is present and has a value (is - // not null). Include that value as the NextToken request parameter in the next - // call to the operation to get the next part of the results. Note that Organizations - // might return fewer results than the maximum even when there are more results - // available. You should check NextToken after every operation to ensure that - // you receive all of the results. + // (Optional) Use this to limit the number of results you want included per + // page in the response. If you do not include this parameter, it defaults to + // a value that is specific to the operation. If additional items exist beyond + // the maximum you specify, the NextToken response element is present and has + // a value (is not null). Include that value as the NextToken request parameter + // in the next call to the operation to get the next part of the results. Note + // that Organizations might return fewer results than the maximum even when + // there are more results available. You should check NextToken after every + // operation to ensure that you receive all of the results. MaxResults *int64 `min:"1" type:"integer"` // Use this parameter if you receive a NextToken response in a previous request @@ -12915,15 +12953,15 @@ func (s *ListPoliciesOutput) SetPolicies(v []*PolicySummary) *ListPoliciesOutput type ListRootsInput struct { _ struct{} `type:"structure"` - // (Optional) Use this to limit the number of results you want included in the - // response. If you do not include this parameter, it defaults to a value that - // is specific to the operation. If additional items exist beyond the maximum - // you specify, the NextToken response element is present and has a value (is - // not null). Include that value as the NextToken request parameter in the next - // call to the operation to get the next part of the results. Note that Organizations - // might return fewer results than the maximum even when there are more results - // available. You should check NextToken after every operation to ensure that - // you receive all of the results. + // (Optional) Use this to limit the number of results you want included per + // page in the response. If you do not include this parameter, it defaults to + // a value that is specific to the operation. If additional items exist beyond + // the maximum you specify, the NextToken response element is present and has + // a value (is not null). Include that value as the NextToken request parameter + // in the next call to the operation to get the next part of the results. Note + // that Organizations might return fewer results than the maximum even when + // there are more results available. You should check NextToken after every + // operation to ensure that you receive all of the results. MaxResults *int64 `min:"1" type:"integer"` // Use this parameter if you receive a NextToken response in a previous request @@ -13007,15 +13045,15 @@ func (s *ListRootsOutput) SetRoots(v []*Root) *ListRootsOutput { type ListTargetsForPolicyInput struct { _ struct{} `type:"structure"` - // (Optional) Use this to limit the number of results you want included in the - // response. If you do not include this parameter, it defaults to a value that - // is specific to the operation. If additional items exist beyond the maximum - // you specify, the NextToken response element is present and has a value (is - // not null). Include that value as the NextToken request parameter in the next - // call to the operation to get the next part of the results. Note that Organizations - // might return fewer results than the maximum even when there are more results - // available. You should check NextToken after every operation to ensure that - // you receive all of the results. + // (Optional) Use this to limit the number of results you want included per + // page in the response. If you do not include this parameter, it defaults to + // a value that is specific to the operation. If additional items exist beyond + // the maximum you specify, the NextToken response element is present and has + // a value (is not null). Include that value as the NextToken request parameter + // in the next call to the operation to get the next part of the results. Note + // that Organizations might return fewer results than the maximum even when + // there are more results available. You should check NextToken after every + // operation to ensure that you receive all of the results. MaxResults *int64 `min:"1" type:"integer"` // Use this parameter if you receive a NextToken response in a previous request @@ -13269,7 +13307,7 @@ type Organization struct { // The email address that is associated with the AWS account that is designated // as the master account for the organization. - MasterAccountEmail *string `min:"6" type:"string"` + MasterAccountEmail *string `min:"6" type:"string" sensitive:"true"` // The unique identifier (ID) of the master account of an organization. // @@ -14067,6 +14105,12 @@ const ( // ConstraintViolationExceptionReasonOrganizationNotInAllFeaturesMode is a ConstraintViolationExceptionReason enum value ConstraintViolationExceptionReasonOrganizationNotInAllFeaturesMode = "ORGANIZATION_NOT_IN_ALL_FEATURES_MODE" + + // ConstraintViolationExceptionReasonEmailVerificationCodeExpired is a ConstraintViolationExceptionReason enum value + ConstraintViolationExceptionReasonEmailVerificationCodeExpired = "EMAIL_VERIFICATION_CODE_EXPIRED" + + // ConstraintViolationExceptionReasonWaitPeriodActive is a ConstraintViolationExceptionReason enum value + ConstraintViolationExceptionReasonWaitPeriodActive = "WAIT_PERIOD_ACTIVE" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/organizations/errors.go b/vendor/github.com/aws/aws-sdk-go/service/organizations/errors.go index fe4011c056..5d886170ef 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/organizations/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/organizations/errors.go @@ -7,7 +7,7 @@ const ( // ErrCodeAWSOrganizationsNotInUseException for service response error code // "AWSOrganizationsNotInUseException". // - // Your account is not a member of an organization. To make this request, you + // Your account isn't a member of an organization. To make this request, you // must use the credentials of an account that belongs to an organization. ErrCodeAWSOrganizationsNotInUseException = "AWSOrganizationsNotInUseException" @@ -24,19 +24,28 @@ const ( // ErrCodeAccessDeniedForDependencyException for service response error code // "AccessDeniedForDependencyException". // - // The operation you attempted requires you to have the iam:CreateServiceLinkedRole - // so that Organizations can create the required service-linked role. You do - // not have that permission. + // The operation that you attempted requires you to have the iam:CreateServiceLinkedRole + // so that AWS Organizations can create the required service-linked role. You + // don't have that permission. ErrCodeAccessDeniedForDependencyException = "AccessDeniedForDependencyException" // ErrCodeAccountNotFoundException for service response error code // "AccountNotFoundException". // // We can't find an AWS account with the AccountId that you specified, or the - // account whose credentials you used to make this request is not a member of + // account whose credentials you used to make this request isn't a member of // an organization. ErrCodeAccountNotFoundException = "AccountNotFoundException" + // ErrCodeAccountOwnerNotVerifiedException for service response error code + // "AccountOwnerNotVerifiedException". + // + // You can't invite an existing account to your organization until you verify + // that you own the email address associated with the master account. For more + // information, see Email Address Verification (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_create.html#about-email-verification) + // in the AWS Organizations User Guide. + ErrCodeAccountOwnerNotVerifiedException = "AccountOwnerNotVerifiedException" + // ErrCodeAlreadyInOrganizationException for service response error code // "AlreadyInOrganizationException". // @@ -62,40 +71,42 @@ const ( // "ConstraintViolationException". // // Performing this operation violates a minimum or maximum value limit. For - // example, attempting to removing the last SCP from an OU or root, inviting - // or creating too many accounts to the organization, or attaching too many - // policies to an account, OU, or root. This exception includes a reason that - // contains additional information about the violated limit: + // example, attempting to removing the last service control policy (SCP) from + // an OU or root, inviting or creating too many accounts to the organization, + // or attaching too many policies to an account, OU, or root. This exception + // includes a reason that contains additional information about the violated + // limit. // // Some of the reasons in the following list might not be applicable to this // specific API or operation: // - // ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the number - // of accounts in an organization. If you need more accounts, contact AWS Support - // to request an increase in your limit. + // * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on + // the number of accounts in an organization. If you need more accounts, + // contactAWS Support (https://console.aws.amazon.com/support/home#/) to + // request an increase in your limit. // - // Or, The number of invitations that you tried to send would cause you to exceed - // the limit of accounts in your organization. Send fewer invitations, or contact - // AWS Support to request an increase in the number of accounts. + // Or the number of invitations that you tried to send would cause you to exceed + // the limit of accounts in your organization. Send fewer invitations or + // contact AWS Support to request an increase in the number of accounts. // - // Note: deleted and closed accounts still count toward your limit. + // Deleted and closed accounts still count toward your limit. // // If you get receive this exception when running a command immediately after - // creating the organization, wait one hour and try again. If after an hour - // it continues to fail with this error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). + // creating the organization, wait one hour and try again. If after an hour + // it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of - // handshakes you can send in one day. + // handshakes that you can send in one day. // - // * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of organizational - // units you can have in an organization. + // * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs + // that you can have in an organization. // - // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an organizational unit - // tree that is too many levels deep. + // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is + // too many levels deep. // // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation // that requires the organization to be configured to support all features. - // An organization that supports consolidated billing features only cannot + // An organization that supports only consolidated billing features can't // perform this operation. // // * POLICY_NUMBER_LIMIT_EXCEEDED. You attempted to exceed the number of @@ -110,23 +121,24 @@ const ( // minimum number of policies of a certain type required. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account - // from the organization that does not yet have enough information to exist - // as a stand-alone account. This account requires you to first agree to - // the AWS Customer Agreement. Follow the steps at To leave an organization - // when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) + // from the organization that doesn't yet have enough information to exist + // as a standalone account. This account requires you to first agree to the + // AWS Customer Agreement. Follow the steps at To leave an organization when + // all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove - // an account from the organization that does not yet have enough information - // to exist as a stand-alone account. This account requires you to first - // complete phone verification. Follow the steps at To leave an organization - // when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) + // an account from the organization that doesn't yet have enough information + // to exist as a standalone account. This account requires you to first complete + // phone verification. Follow the steps at To leave an organization when + // all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization - // with this account, you first must associate a payment instrument, such - // as a credit card, with the account. Follow the steps at To leave an organization - // when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) + // with this master account, you first must associate a payment instrument, + // such as a credit card, with the account. Follow the steps at To leave + // an organization when all required account information has not yet been + // provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info) // in the AWS Organizations User Guide. // // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation @@ -184,7 +196,7 @@ const ( // ErrCodeDuplicateOrganizationalUnitException for service response error code // "DuplicateOrganizationalUnitException". // - // An organizational unit (OU) with the same name already exists. + // An OU with the same name already exists. ErrCodeDuplicateOrganizationalUnitException = "DuplicateOrganizationalUnitException" // ErrCodeDuplicatePolicyAttachmentException for service response error code @@ -202,10 +214,10 @@ const ( // ErrCodeFinalizingOrganizationException for service response error code // "FinalizingOrganizationException". // - // AWS Organizations could not perform the operation because your organization - // has not finished initializing. This can take up to an hour. Try again later. - // If after one hour you continue to receive this error, contact AWS Customer - // Support (https://console.aws.amazon.com/support/home#/). + // AWS Organizations couldn't perform the operation because your organization + // hasn't finished initializing. This can take up to an hour. Try again later. + // If after one hour you continue to receive this error, contact AWS Support + // (https://console.aws.amazon.com/support/home#/). ErrCodeFinalizingOrganizationException = "FinalizingOrganizationException" // ErrCodeHandshakeAlreadyInStateException for service response error code @@ -225,15 +237,15 @@ const ( // specific API or operation: // // * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on - // the number of accounts in an organization. Note: deleted and closed accounts - // still count toward your limit. + // the number of accounts in an organization. Note that deleted and closed + // accounts still count toward your limit. // // If you get this exception immediately after creating the organization, wait // one hour and try again. If after an hour it continues to fail with this - // error, contact AWS Customer Support (https://console.aws.amazon.com/support/home#/). + // error, contact AWS Support (https://console.aws.amazon.com/support/home#/). // // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of - // handshakes you can send in one day. + // handshakes that you can send in one day. // // * ALREADY_IN_AN_ORGANIZATION: The handshake request is invalid because // the invited account is already a member of an organization. @@ -241,13 +253,13 @@ const ( // * ORGANIZATION_ALREADY_HAS_ALL_FEATURES: The handshake request is invalid // because the organization has already enabled all features. // - // * INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You cannot issue new invitations - // to join an organization while it is in the process of enabling all features. + // * INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You can't issue new invitations + // to join an organization while it's in the process of enabling all features. // You can resume inviting accounts after you finalize the process when all // accounts have agreed to the change. // - // * PAYMENT_INSTRUMENT_REQUIRED: You cannot complete the operation with - // an account that does not have a payment instrument, such as a credit card, + // * PAYMENT_INSTRUMENT_REQUIRED: You can't complete the operation with an + // account that doesn't have a payment instrument, such as a credit card, // associated with it. // // * ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD: The request failed because @@ -270,7 +282,7 @@ const ( // "InvalidHandshakeTransitionException". // // You can't perform the operation on the handshake in its current state. For - // example, you can't cancel a handshake that was already accepted, or accept + // example, you can't cancel a handshake that was already accepted or accept // a handshake that was already declined. ErrCodeInvalidHandshakeTransitionException = "InvalidHandshakeTransitionException" @@ -285,11 +297,11 @@ const ( // specific API or operation: // // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and - // cannot be modified. + // can't be modified. // // * INPUT_REQUIRED: You must include a value for all required parameters. // - // * INVALID_ENUM: You specified a value that is not valid for that parameter. + // * INVALID_ENUM: You specified a value that isn't valid for that parameter. // // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid // characters. @@ -309,11 +321,11 @@ const ( // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't // match the required pattern. // - // * INVALID_ROLE_NAME: You provided a role name that is not valid. A role - // name can’t begin with the reserved prefix 'AWSServiceRoleFor'. + // * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role + // name can't begin with the reserved prefix AWSServiceRoleFor. // - // * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid ARN for the - // organization. + // * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource + // Name (ARN) for the organization. // // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID. // @@ -339,7 +351,7 @@ const ( // ErrCodeMalformedPolicyDocumentException for service response error code // "MalformedPolicyDocumentException". // - // The provided policy document does not meet the requirements of the specified + // The provided policy document doesn't meet the requirements of the specified // policy type. For example, the syntax might be incorrect. For details about // service control policy syntax, see Service Control Policy Syntax (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html) // in the AWS Organizations User Guide. @@ -357,37 +369,33 @@ const ( // "OrganizationNotEmptyException". // // The organization isn't empty. To delete an organization, you must first remove - // all accounts except the master account, delete all organizational units (OUs), - // and delete all policies. + // all accounts except the master account, delete all OUs, and delete all policies. ErrCodeOrganizationNotEmptyException = "OrganizationNotEmptyException" // ErrCodeOrganizationalUnitNotEmptyException for service response error code // "OrganizationalUnitNotEmptyException". // - // The specified organizational unit (OU) is not empty. Move all accounts to - // another root or to other OUs, remove all child OUs, and then try the operation - // again. + // The specified OU is not empty. Move all accounts to another root or to other + // OUs, remove all child OUs, and try the operation again. ErrCodeOrganizationalUnitNotEmptyException = "OrganizationalUnitNotEmptyException" // ErrCodeOrganizationalUnitNotFoundException for service response error code // "OrganizationalUnitNotFoundException". // - // We can't find an organizational unit (OU) with the OrganizationalUnitId that - // you specified. + // We can't find an OU with the OrganizationalUnitId that you specified. ErrCodeOrganizationalUnitNotFoundException = "OrganizationalUnitNotFoundException" // ErrCodeParentNotFoundException for service response error code // "ParentNotFoundException". // - // We can't find a root or organizational unit (OU) with the ParentId that you - // specified. + // We can't find a root or OU with the ParentId that you specified. ErrCodeParentNotFoundException = "ParentNotFoundException" // ErrCodePolicyInUseException for service response error code // "PolicyInUseException". // // The policy is attached to one or more entities. You must detach it from all - // roots, organizational units (OUs), and accounts before performing this operation. + // roots, OUs, and accounts before performing this operation. ErrCodePolicyInUseException = "PolicyInUseException" // ErrCodePolicyNotAttachedException for service response error code @@ -412,16 +420,16 @@ const ( // "PolicyTypeNotAvailableForOrganizationException". // // You can't use the specified policy type with the feature set currently enabled - // for this organization. For example, you can enable service control policies - // (SCPs) only after you enable all features in the organization. For more information, - // see Enabling and Disabling a Policy Type on a Root (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html#enable_policies_on_root) + // for this organization. For example, you can enable SCPs only after you enable + // all features in the organization. For more information, see Enabling and + // Disabling a Policy Type on a Root (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html#enable_policies_on_root) // in the AWS Organizations User Guide. ErrCodePolicyTypeNotAvailableForOrganizationException = "PolicyTypeNotAvailableForOrganizationException" // ErrCodePolicyTypeNotEnabledException for service response error code // "PolicyTypeNotEnabledException". // - // The specified policy type is not currently enabled in this root. You cannot + // The specified policy type isn't currently enabled in this root. You can't // attach policies of the specified type to entities in a root until you enable // that type in the root. For more information, see Enabling All Features in // Your Organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html) diff --git a/vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go new file mode 100644 index 0000000000..76152a5e38 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/api.go @@ -0,0 +1,21003 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package pinpoint + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" +) + +const opCreateApp = "CreateApp" + +// CreateAppRequest generates a "aws/request.Request" representing the +// client's request for the CreateApp 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 CreateApp for more information on using the CreateApp +// 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 CreateAppRequest method. +// req, resp := client.CreateAppRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateApp +func (c *Pinpoint) CreateAppRequest(input *CreateAppInput) (req *request.Request, output *CreateAppOutput) { + op := &request.Operation{ + Name: opCreateApp, + HTTPMethod: "POST", + HTTPPath: "/v1/apps", + } + + if input == nil { + input = &CreateAppInput{} + } + + output = &CreateAppOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateApp API operation for Amazon Pinpoint. +// +// Creates or updates an app. +// +// 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 Pinpoint's +// API operation CreateApp for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateApp +func (c *Pinpoint) CreateApp(input *CreateAppInput) (*CreateAppOutput, error) { + req, out := c.CreateAppRequest(input) + return out, req.Send() +} + +// CreateAppWithContext is the same as CreateApp with the addition of +// the ability to pass a context and additional request options. +// +// See CreateApp 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 *Pinpoint) CreateAppWithContext(ctx aws.Context, input *CreateAppInput, opts ...request.Option) (*CreateAppOutput, error) { + req, out := c.CreateAppRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateCampaign = "CreateCampaign" + +// CreateCampaignRequest generates a "aws/request.Request" representing the +// client's request for the CreateCampaign 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 CreateCampaign for more information on using the CreateCampaign +// 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 CreateCampaignRequest method. +// req, resp := client.CreateCampaignRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateCampaign +func (c *Pinpoint) CreateCampaignRequest(input *CreateCampaignInput) (req *request.Request, output *CreateCampaignOutput) { + op := &request.Operation{ + Name: opCreateCampaign, + HTTPMethod: "POST", + HTTPPath: "/v1/apps/{application-id}/campaigns", + } + + if input == nil { + input = &CreateCampaignInput{} + } + + output = &CreateCampaignOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateCampaign API operation for Amazon Pinpoint. +// +// Creates or updates a campaign. +// +// 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 Pinpoint's +// API operation CreateCampaign for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateCampaign +func (c *Pinpoint) CreateCampaign(input *CreateCampaignInput) (*CreateCampaignOutput, error) { + req, out := c.CreateCampaignRequest(input) + return out, req.Send() +} + +// CreateCampaignWithContext is the same as CreateCampaign with the addition of +// the ability to pass a context and additional request options. +// +// See CreateCampaign 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 *Pinpoint) CreateCampaignWithContext(ctx aws.Context, input *CreateCampaignInput, opts ...request.Option) (*CreateCampaignOutput, error) { + req, out := c.CreateCampaignRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateExportJob = "CreateExportJob" + +// CreateExportJobRequest generates a "aws/request.Request" representing the +// client's request for the CreateExportJob 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 CreateExportJob for more information on using the CreateExportJob +// 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 CreateExportJobRequest method. +// req, resp := client.CreateExportJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateExportJob +func (c *Pinpoint) CreateExportJobRequest(input *CreateExportJobInput) (req *request.Request, output *CreateExportJobOutput) { + op := &request.Operation{ + Name: opCreateExportJob, + HTTPMethod: "POST", + HTTPPath: "/v1/apps/{application-id}/jobs/export", + } + + if input == nil { + input = &CreateExportJobInput{} + } + + output = &CreateExportJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateExportJob API operation for Amazon Pinpoint. +// +// Creates an export job. +// +// 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 Pinpoint's +// API operation CreateExportJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateExportJob +func (c *Pinpoint) CreateExportJob(input *CreateExportJobInput) (*CreateExportJobOutput, error) { + req, out := c.CreateExportJobRequest(input) + return out, req.Send() +} + +// CreateExportJobWithContext is the same as CreateExportJob with the addition of +// the ability to pass a context and additional request options. +// +// See CreateExportJob 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 *Pinpoint) CreateExportJobWithContext(ctx aws.Context, input *CreateExportJobInput, opts ...request.Option) (*CreateExportJobOutput, error) { + req, out := c.CreateExportJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateImportJob = "CreateImportJob" + +// CreateImportJobRequest generates a "aws/request.Request" representing the +// client's request for the CreateImportJob 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 CreateImportJob for more information on using the CreateImportJob +// 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 CreateImportJobRequest method. +// req, resp := client.CreateImportJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateImportJob +func (c *Pinpoint) CreateImportJobRequest(input *CreateImportJobInput) (req *request.Request, output *CreateImportJobOutput) { + op := &request.Operation{ + Name: opCreateImportJob, + HTTPMethod: "POST", + HTTPPath: "/v1/apps/{application-id}/jobs/import", + } + + if input == nil { + input = &CreateImportJobInput{} + } + + output = &CreateImportJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateImportJob API operation for Amazon Pinpoint. +// +// Creates or updates an import job. +// +// 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 Pinpoint's +// API operation CreateImportJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateImportJob +func (c *Pinpoint) CreateImportJob(input *CreateImportJobInput) (*CreateImportJobOutput, error) { + req, out := c.CreateImportJobRequest(input) + return out, req.Send() +} + +// CreateImportJobWithContext is the same as CreateImportJob with the addition of +// the ability to pass a context and additional request options. +// +// See CreateImportJob 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 *Pinpoint) CreateImportJobWithContext(ctx aws.Context, input *CreateImportJobInput, opts ...request.Option) (*CreateImportJobOutput, error) { + req, out := c.CreateImportJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateSegment = "CreateSegment" + +// CreateSegmentRequest generates a "aws/request.Request" representing the +// client's request for the CreateSegment 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 CreateSegment for more information on using the CreateSegment +// 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 CreateSegmentRequest method. +// req, resp := client.CreateSegmentRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateSegment +func (c *Pinpoint) CreateSegmentRequest(input *CreateSegmentInput) (req *request.Request, output *CreateSegmentOutput) { + op := &request.Operation{ + Name: opCreateSegment, + HTTPMethod: "POST", + HTTPPath: "/v1/apps/{application-id}/segments", + } + + if input == nil { + input = &CreateSegmentInput{} + } + + output = &CreateSegmentOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateSegment API operation for Amazon Pinpoint. +// +// Used to create or update a segment. +// +// 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 Pinpoint's +// API operation CreateSegment for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/CreateSegment +func (c *Pinpoint) CreateSegment(input *CreateSegmentInput) (*CreateSegmentOutput, error) { + req, out := c.CreateSegmentRequest(input) + return out, req.Send() +} + +// CreateSegmentWithContext is the same as CreateSegment with the addition of +// the ability to pass a context and additional request options. +// +// See CreateSegment 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 *Pinpoint) CreateSegmentWithContext(ctx aws.Context, input *CreateSegmentInput, opts ...request.Option) (*CreateSegmentOutput, error) { + req, out := c.CreateSegmentRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteAdmChannel = "DeleteAdmChannel" + +// DeleteAdmChannelRequest generates a "aws/request.Request" representing the +// client's request for the DeleteAdmChannel 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 DeleteAdmChannel for more information on using the DeleteAdmChannel +// 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 DeleteAdmChannelRequest method. +// req, resp := client.DeleteAdmChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteAdmChannel +func (c *Pinpoint) DeleteAdmChannelRequest(input *DeleteAdmChannelInput) (req *request.Request, output *DeleteAdmChannelOutput) { + op := &request.Operation{ + Name: opDeleteAdmChannel, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apps/{application-id}/channels/adm", + } + + if input == nil { + input = &DeleteAdmChannelInput{} + } + + output = &DeleteAdmChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteAdmChannel API operation for Amazon Pinpoint. +// +// Delete an ADM channel. +// +// 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 Pinpoint's +// API operation DeleteAdmChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteAdmChannel +func (c *Pinpoint) DeleteAdmChannel(input *DeleteAdmChannelInput) (*DeleteAdmChannelOutput, error) { + req, out := c.DeleteAdmChannelRequest(input) + return out, req.Send() +} + +// DeleteAdmChannelWithContext is the same as DeleteAdmChannel with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteAdmChannel 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 *Pinpoint) DeleteAdmChannelWithContext(ctx aws.Context, input *DeleteAdmChannelInput, opts ...request.Option) (*DeleteAdmChannelOutput, error) { + req, out := c.DeleteAdmChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteApnsChannel = "DeleteApnsChannel" + +// DeleteApnsChannelRequest generates a "aws/request.Request" representing the +// client's request for the DeleteApnsChannel 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 DeleteApnsChannel for more information on using the DeleteApnsChannel +// 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 DeleteApnsChannelRequest method. +// req, resp := client.DeleteApnsChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsChannel +func (c *Pinpoint) DeleteApnsChannelRequest(input *DeleteApnsChannelInput) (req *request.Request, output *DeleteApnsChannelOutput) { + op := &request.Operation{ + Name: opDeleteApnsChannel, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apps/{application-id}/channels/apns", + } + + if input == nil { + input = &DeleteApnsChannelInput{} + } + + output = &DeleteApnsChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteApnsChannel API operation for Amazon Pinpoint. +// +// Deletes the APNs channel for an app. +// +// 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 Pinpoint's +// API operation DeleteApnsChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsChannel +func (c *Pinpoint) DeleteApnsChannel(input *DeleteApnsChannelInput) (*DeleteApnsChannelOutput, error) { + req, out := c.DeleteApnsChannelRequest(input) + return out, req.Send() +} + +// DeleteApnsChannelWithContext is the same as DeleteApnsChannel with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteApnsChannel 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 *Pinpoint) DeleteApnsChannelWithContext(ctx aws.Context, input *DeleteApnsChannelInput, opts ...request.Option) (*DeleteApnsChannelOutput, error) { + req, out := c.DeleteApnsChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteApnsSandboxChannel = "DeleteApnsSandboxChannel" + +// DeleteApnsSandboxChannelRequest generates a "aws/request.Request" representing the +// client's request for the DeleteApnsSandboxChannel 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 DeleteApnsSandboxChannel for more information on using the DeleteApnsSandboxChannel +// 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 DeleteApnsSandboxChannelRequest method. +// req, resp := client.DeleteApnsSandboxChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsSandboxChannel +func (c *Pinpoint) DeleteApnsSandboxChannelRequest(input *DeleteApnsSandboxChannelInput) (req *request.Request, output *DeleteApnsSandboxChannelOutput) { + op := &request.Operation{ + Name: opDeleteApnsSandboxChannel, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apps/{application-id}/channels/apns_sandbox", + } + + if input == nil { + input = &DeleteApnsSandboxChannelInput{} + } + + output = &DeleteApnsSandboxChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteApnsSandboxChannel API operation for Amazon Pinpoint. +// +// Delete an APNS sandbox channel. +// +// 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 Pinpoint's +// API operation DeleteApnsSandboxChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsSandboxChannel +func (c *Pinpoint) DeleteApnsSandboxChannel(input *DeleteApnsSandboxChannelInput) (*DeleteApnsSandboxChannelOutput, error) { + req, out := c.DeleteApnsSandboxChannelRequest(input) + return out, req.Send() +} + +// DeleteApnsSandboxChannelWithContext is the same as DeleteApnsSandboxChannel with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteApnsSandboxChannel 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 *Pinpoint) DeleteApnsSandboxChannelWithContext(ctx aws.Context, input *DeleteApnsSandboxChannelInput, opts ...request.Option) (*DeleteApnsSandboxChannelOutput, error) { + req, out := c.DeleteApnsSandboxChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteApnsVoipChannel = "DeleteApnsVoipChannel" + +// DeleteApnsVoipChannelRequest generates a "aws/request.Request" representing the +// client's request for the DeleteApnsVoipChannel 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 DeleteApnsVoipChannel for more information on using the DeleteApnsVoipChannel +// 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 DeleteApnsVoipChannelRequest method. +// req, resp := client.DeleteApnsVoipChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsVoipChannel +func (c *Pinpoint) DeleteApnsVoipChannelRequest(input *DeleteApnsVoipChannelInput) (req *request.Request, output *DeleteApnsVoipChannelOutput) { + op := &request.Operation{ + Name: opDeleteApnsVoipChannel, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apps/{application-id}/channels/apns_voip", + } + + if input == nil { + input = &DeleteApnsVoipChannelInput{} + } + + output = &DeleteApnsVoipChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteApnsVoipChannel API operation for Amazon Pinpoint. +// +// Delete an APNS VoIP channel +// +// 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 Pinpoint's +// API operation DeleteApnsVoipChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsVoipChannel +func (c *Pinpoint) DeleteApnsVoipChannel(input *DeleteApnsVoipChannelInput) (*DeleteApnsVoipChannelOutput, error) { + req, out := c.DeleteApnsVoipChannelRequest(input) + return out, req.Send() +} + +// DeleteApnsVoipChannelWithContext is the same as DeleteApnsVoipChannel with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteApnsVoipChannel 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 *Pinpoint) DeleteApnsVoipChannelWithContext(ctx aws.Context, input *DeleteApnsVoipChannelInput, opts ...request.Option) (*DeleteApnsVoipChannelOutput, error) { + req, out := c.DeleteApnsVoipChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteApnsVoipSandboxChannel = "DeleteApnsVoipSandboxChannel" + +// DeleteApnsVoipSandboxChannelRequest generates a "aws/request.Request" representing the +// client's request for the DeleteApnsVoipSandboxChannel 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 DeleteApnsVoipSandboxChannel for more information on using the DeleteApnsVoipSandboxChannel +// 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 DeleteApnsVoipSandboxChannelRequest method. +// req, resp := client.DeleteApnsVoipSandboxChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsVoipSandboxChannel +func (c *Pinpoint) DeleteApnsVoipSandboxChannelRequest(input *DeleteApnsVoipSandboxChannelInput) (req *request.Request, output *DeleteApnsVoipSandboxChannelOutput) { + op := &request.Operation{ + Name: opDeleteApnsVoipSandboxChannel, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apps/{application-id}/channels/apns_voip_sandbox", + } + + if input == nil { + input = &DeleteApnsVoipSandboxChannelInput{} + } + + output = &DeleteApnsVoipSandboxChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteApnsVoipSandboxChannel API operation for Amazon Pinpoint. +// +// Delete an APNS VoIP sandbox channel +// +// 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 Pinpoint's +// API operation DeleteApnsVoipSandboxChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApnsVoipSandboxChannel +func (c *Pinpoint) DeleteApnsVoipSandboxChannel(input *DeleteApnsVoipSandboxChannelInput) (*DeleteApnsVoipSandboxChannelOutput, error) { + req, out := c.DeleteApnsVoipSandboxChannelRequest(input) + return out, req.Send() +} + +// DeleteApnsVoipSandboxChannelWithContext is the same as DeleteApnsVoipSandboxChannel with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteApnsVoipSandboxChannel 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 *Pinpoint) DeleteApnsVoipSandboxChannelWithContext(ctx aws.Context, input *DeleteApnsVoipSandboxChannelInput, opts ...request.Option) (*DeleteApnsVoipSandboxChannelOutput, error) { + req, out := c.DeleteApnsVoipSandboxChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteApp = "DeleteApp" + +// DeleteAppRequest generates a "aws/request.Request" representing the +// client's request for the DeleteApp 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 DeleteApp for more information on using the DeleteApp +// 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 DeleteAppRequest method. +// req, resp := client.DeleteAppRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApp +func (c *Pinpoint) DeleteAppRequest(input *DeleteAppInput) (req *request.Request, output *DeleteAppOutput) { + op := &request.Operation{ + Name: opDeleteApp, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apps/{application-id}", + } + + if input == nil { + input = &DeleteAppInput{} + } + + output = &DeleteAppOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteApp API operation for Amazon Pinpoint. +// +// Deletes an app. +// +// 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 Pinpoint's +// API operation DeleteApp for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteApp +func (c *Pinpoint) DeleteApp(input *DeleteAppInput) (*DeleteAppOutput, error) { + req, out := c.DeleteAppRequest(input) + return out, req.Send() +} + +// DeleteAppWithContext is the same as DeleteApp with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteApp 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 *Pinpoint) DeleteAppWithContext(ctx aws.Context, input *DeleteAppInput, opts ...request.Option) (*DeleteAppOutput, error) { + req, out := c.DeleteAppRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteBaiduChannel = "DeleteBaiduChannel" + +// DeleteBaiduChannelRequest generates a "aws/request.Request" representing the +// client's request for the DeleteBaiduChannel 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 DeleteBaiduChannel for more information on using the DeleteBaiduChannel +// 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 DeleteBaiduChannelRequest method. +// req, resp := client.DeleteBaiduChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteBaiduChannel +func (c *Pinpoint) DeleteBaiduChannelRequest(input *DeleteBaiduChannelInput) (req *request.Request, output *DeleteBaiduChannelOutput) { + op := &request.Operation{ + Name: opDeleteBaiduChannel, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apps/{application-id}/channels/baidu", + } + + if input == nil { + input = &DeleteBaiduChannelInput{} + } + + output = &DeleteBaiduChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteBaiduChannel API operation for Amazon Pinpoint. +// +// Delete a BAIDU GCM channel +// +// 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 Pinpoint's +// API operation DeleteBaiduChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteBaiduChannel +func (c *Pinpoint) DeleteBaiduChannel(input *DeleteBaiduChannelInput) (*DeleteBaiduChannelOutput, error) { + req, out := c.DeleteBaiduChannelRequest(input) + return out, req.Send() +} + +// DeleteBaiduChannelWithContext is the same as DeleteBaiduChannel with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteBaiduChannel 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 *Pinpoint) DeleteBaiduChannelWithContext(ctx aws.Context, input *DeleteBaiduChannelInput, opts ...request.Option) (*DeleteBaiduChannelOutput, error) { + req, out := c.DeleteBaiduChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteCampaign = "DeleteCampaign" + +// DeleteCampaignRequest generates a "aws/request.Request" representing the +// client's request for the DeleteCampaign 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 DeleteCampaign for more information on using the DeleteCampaign +// 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 DeleteCampaignRequest method. +// req, resp := client.DeleteCampaignRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteCampaign +func (c *Pinpoint) DeleteCampaignRequest(input *DeleteCampaignInput) (req *request.Request, output *DeleteCampaignOutput) { + op := &request.Operation{ + Name: opDeleteCampaign, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apps/{application-id}/campaigns/{campaign-id}", + } + + if input == nil { + input = &DeleteCampaignInput{} + } + + output = &DeleteCampaignOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteCampaign API operation for Amazon Pinpoint. +// +// Deletes a campaign. +// +// 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 Pinpoint's +// API operation DeleteCampaign for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteCampaign +func (c *Pinpoint) DeleteCampaign(input *DeleteCampaignInput) (*DeleteCampaignOutput, error) { + req, out := c.DeleteCampaignRequest(input) + return out, req.Send() +} + +// DeleteCampaignWithContext is the same as DeleteCampaign with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteCampaign 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 *Pinpoint) DeleteCampaignWithContext(ctx aws.Context, input *DeleteCampaignInput, opts ...request.Option) (*DeleteCampaignOutput, error) { + req, out := c.DeleteCampaignRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteEmailChannel = "DeleteEmailChannel" + +// DeleteEmailChannelRequest generates a "aws/request.Request" representing the +// client's request for the DeleteEmailChannel 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 DeleteEmailChannel for more information on using the DeleteEmailChannel +// 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 DeleteEmailChannelRequest method. +// req, resp := client.DeleteEmailChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteEmailChannel +func (c *Pinpoint) DeleteEmailChannelRequest(input *DeleteEmailChannelInput) (req *request.Request, output *DeleteEmailChannelOutput) { + op := &request.Operation{ + Name: opDeleteEmailChannel, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apps/{application-id}/channels/email", + } + + if input == nil { + input = &DeleteEmailChannelInput{} + } + + output = &DeleteEmailChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteEmailChannel API operation for Amazon Pinpoint. +// +// Delete an email channel. +// +// 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 Pinpoint's +// API operation DeleteEmailChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteEmailChannel +func (c *Pinpoint) DeleteEmailChannel(input *DeleteEmailChannelInput) (*DeleteEmailChannelOutput, error) { + req, out := c.DeleteEmailChannelRequest(input) + return out, req.Send() +} + +// DeleteEmailChannelWithContext is the same as DeleteEmailChannel with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteEmailChannel 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 *Pinpoint) DeleteEmailChannelWithContext(ctx aws.Context, input *DeleteEmailChannelInput, opts ...request.Option) (*DeleteEmailChannelOutput, error) { + req, out := c.DeleteEmailChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteEndpoint = "DeleteEndpoint" + +// DeleteEndpointRequest generates a "aws/request.Request" representing the +// client's request for the DeleteEndpoint 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 DeleteEndpoint for more information on using the DeleteEndpoint +// 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 DeleteEndpointRequest method. +// req, resp := client.DeleteEndpointRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteEndpoint +func (c *Pinpoint) DeleteEndpointRequest(input *DeleteEndpointInput) (req *request.Request, output *DeleteEndpointOutput) { + op := &request.Operation{ + Name: opDeleteEndpoint, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apps/{application-id}/endpoints/{endpoint-id}", + } + + if input == nil { + input = &DeleteEndpointInput{} + } + + output = &DeleteEndpointOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteEndpoint API operation for Amazon Pinpoint. +// +// Deletes an endpoint. +// +// 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 Pinpoint's +// API operation DeleteEndpoint for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteEndpoint +func (c *Pinpoint) DeleteEndpoint(input *DeleteEndpointInput) (*DeleteEndpointOutput, error) { + req, out := c.DeleteEndpointRequest(input) + return out, req.Send() +} + +// DeleteEndpointWithContext is the same as DeleteEndpoint with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteEndpoint 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 *Pinpoint) DeleteEndpointWithContext(ctx aws.Context, input *DeleteEndpointInput, opts ...request.Option) (*DeleteEndpointOutput, error) { + req, out := c.DeleteEndpointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteEventStream = "DeleteEventStream" + +// DeleteEventStreamRequest generates a "aws/request.Request" representing the +// client's request for the DeleteEventStream 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 DeleteEventStream for more information on using the DeleteEventStream +// 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 DeleteEventStreamRequest method. +// req, resp := client.DeleteEventStreamRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteEventStream +func (c *Pinpoint) DeleteEventStreamRequest(input *DeleteEventStreamInput) (req *request.Request, output *DeleteEventStreamOutput) { + op := &request.Operation{ + Name: opDeleteEventStream, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apps/{application-id}/eventstream", + } + + if input == nil { + input = &DeleteEventStreamInput{} + } + + output = &DeleteEventStreamOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteEventStream API operation for Amazon Pinpoint. +// +// Deletes the event stream for an app. +// +// 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 Pinpoint's +// API operation DeleteEventStream for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteEventStream +func (c *Pinpoint) DeleteEventStream(input *DeleteEventStreamInput) (*DeleteEventStreamOutput, error) { + req, out := c.DeleteEventStreamRequest(input) + return out, req.Send() +} + +// DeleteEventStreamWithContext is the same as DeleteEventStream with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteEventStream 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 *Pinpoint) DeleteEventStreamWithContext(ctx aws.Context, input *DeleteEventStreamInput, opts ...request.Option) (*DeleteEventStreamOutput, error) { + req, out := c.DeleteEventStreamRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteGcmChannel = "DeleteGcmChannel" + +// DeleteGcmChannelRequest generates a "aws/request.Request" representing the +// client's request for the DeleteGcmChannel 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 DeleteGcmChannel for more information on using the DeleteGcmChannel +// 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 DeleteGcmChannelRequest method. +// req, resp := client.DeleteGcmChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteGcmChannel +func (c *Pinpoint) DeleteGcmChannelRequest(input *DeleteGcmChannelInput) (req *request.Request, output *DeleteGcmChannelOutput) { + op := &request.Operation{ + Name: opDeleteGcmChannel, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apps/{application-id}/channels/gcm", + } + + if input == nil { + input = &DeleteGcmChannelInput{} + } + + output = &DeleteGcmChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteGcmChannel API operation for Amazon Pinpoint. +// +// Deletes the GCM channel for an app. +// +// 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 Pinpoint's +// API operation DeleteGcmChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteGcmChannel +func (c *Pinpoint) DeleteGcmChannel(input *DeleteGcmChannelInput) (*DeleteGcmChannelOutput, error) { + req, out := c.DeleteGcmChannelRequest(input) + return out, req.Send() +} + +// DeleteGcmChannelWithContext is the same as DeleteGcmChannel with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteGcmChannel 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 *Pinpoint) DeleteGcmChannelWithContext(ctx aws.Context, input *DeleteGcmChannelInput, opts ...request.Option) (*DeleteGcmChannelOutput, error) { + req, out := c.DeleteGcmChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteSegment = "DeleteSegment" + +// DeleteSegmentRequest generates a "aws/request.Request" representing the +// client's request for the DeleteSegment 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 DeleteSegment for more information on using the DeleteSegment +// 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 DeleteSegmentRequest method. +// req, resp := client.DeleteSegmentRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteSegment +func (c *Pinpoint) DeleteSegmentRequest(input *DeleteSegmentInput) (req *request.Request, output *DeleteSegmentOutput) { + op := &request.Operation{ + Name: opDeleteSegment, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apps/{application-id}/segments/{segment-id}", + } + + if input == nil { + input = &DeleteSegmentInput{} + } + + output = &DeleteSegmentOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteSegment API operation for Amazon Pinpoint. +// +// Deletes a segment. +// +// 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 Pinpoint's +// API operation DeleteSegment for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteSegment +func (c *Pinpoint) DeleteSegment(input *DeleteSegmentInput) (*DeleteSegmentOutput, error) { + req, out := c.DeleteSegmentRequest(input) + return out, req.Send() +} + +// DeleteSegmentWithContext is the same as DeleteSegment with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteSegment 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 *Pinpoint) DeleteSegmentWithContext(ctx aws.Context, input *DeleteSegmentInput, opts ...request.Option) (*DeleteSegmentOutput, error) { + req, out := c.DeleteSegmentRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteSmsChannel = "DeleteSmsChannel" + +// DeleteSmsChannelRequest generates a "aws/request.Request" representing the +// client's request for the DeleteSmsChannel 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 DeleteSmsChannel for more information on using the DeleteSmsChannel +// 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 DeleteSmsChannelRequest method. +// req, resp := client.DeleteSmsChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteSmsChannel +func (c *Pinpoint) DeleteSmsChannelRequest(input *DeleteSmsChannelInput) (req *request.Request, output *DeleteSmsChannelOutput) { + op := &request.Operation{ + Name: opDeleteSmsChannel, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apps/{application-id}/channels/sms", + } + + if input == nil { + input = &DeleteSmsChannelInput{} + } + + output = &DeleteSmsChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteSmsChannel API operation for Amazon Pinpoint. +// +// Delete an SMS channel. +// +// 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 Pinpoint's +// API operation DeleteSmsChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteSmsChannel +func (c *Pinpoint) DeleteSmsChannel(input *DeleteSmsChannelInput) (*DeleteSmsChannelOutput, error) { + req, out := c.DeleteSmsChannelRequest(input) + return out, req.Send() +} + +// DeleteSmsChannelWithContext is the same as DeleteSmsChannel with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteSmsChannel 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 *Pinpoint) DeleteSmsChannelWithContext(ctx aws.Context, input *DeleteSmsChannelInput, opts ...request.Option) (*DeleteSmsChannelOutput, error) { + req, out := c.DeleteSmsChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteUserEndpoints = "DeleteUserEndpoints" + +// DeleteUserEndpointsRequest generates a "aws/request.Request" representing the +// client's request for the DeleteUserEndpoints 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 DeleteUserEndpoints for more information on using the DeleteUserEndpoints +// 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 DeleteUserEndpointsRequest method. +// req, resp := client.DeleteUserEndpointsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteUserEndpoints +func (c *Pinpoint) DeleteUserEndpointsRequest(input *DeleteUserEndpointsInput) (req *request.Request, output *DeleteUserEndpointsOutput) { + op := &request.Operation{ + Name: opDeleteUserEndpoints, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apps/{application-id}/users/{user-id}", + } + + if input == nil { + input = &DeleteUserEndpointsInput{} + } + + output = &DeleteUserEndpointsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteUserEndpoints API operation for Amazon Pinpoint. +// +// Deletes endpoints that are associated with a User ID. +// +// 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 Pinpoint's +// API operation DeleteUserEndpoints for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteUserEndpoints +func (c *Pinpoint) DeleteUserEndpoints(input *DeleteUserEndpointsInput) (*DeleteUserEndpointsOutput, error) { + req, out := c.DeleteUserEndpointsRequest(input) + return out, req.Send() +} + +// DeleteUserEndpointsWithContext is the same as DeleteUserEndpoints with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteUserEndpoints 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 *Pinpoint) DeleteUserEndpointsWithContext(ctx aws.Context, input *DeleteUserEndpointsInput, opts ...request.Option) (*DeleteUserEndpointsOutput, error) { + req, out := c.DeleteUserEndpointsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteVoiceChannel = "DeleteVoiceChannel" + +// DeleteVoiceChannelRequest generates a "aws/request.Request" representing the +// client's request for the DeleteVoiceChannel 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 DeleteVoiceChannel for more information on using the DeleteVoiceChannel +// 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 DeleteVoiceChannelRequest method. +// req, resp := client.DeleteVoiceChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteVoiceChannel +func (c *Pinpoint) DeleteVoiceChannelRequest(input *DeleteVoiceChannelInput) (req *request.Request, output *DeleteVoiceChannelOutput) { + op := &request.Operation{ + Name: opDeleteVoiceChannel, + HTTPMethod: "DELETE", + HTTPPath: "/v1/apps/{application-id}/channels/voice", + } + + if input == nil { + input = &DeleteVoiceChannelInput{} + } + + output = &DeleteVoiceChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteVoiceChannel API operation for Amazon Pinpoint. +// +// Delete an Voice channel +// +// 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 Pinpoint's +// API operation DeleteVoiceChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/DeleteVoiceChannel +func (c *Pinpoint) DeleteVoiceChannel(input *DeleteVoiceChannelInput) (*DeleteVoiceChannelOutput, error) { + req, out := c.DeleteVoiceChannelRequest(input) + return out, req.Send() +} + +// DeleteVoiceChannelWithContext is the same as DeleteVoiceChannel with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteVoiceChannel 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 *Pinpoint) DeleteVoiceChannelWithContext(ctx aws.Context, input *DeleteVoiceChannelInput, opts ...request.Option) (*DeleteVoiceChannelOutput, error) { + req, out := c.DeleteVoiceChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetAdmChannel = "GetAdmChannel" + +// GetAdmChannelRequest generates a "aws/request.Request" representing the +// client's request for the GetAdmChannel 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 GetAdmChannel for more information on using the GetAdmChannel +// 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 GetAdmChannelRequest method. +// req, resp := client.GetAdmChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetAdmChannel +func (c *Pinpoint) GetAdmChannelRequest(input *GetAdmChannelInput) (req *request.Request, output *GetAdmChannelOutput) { + op := &request.Operation{ + Name: opGetAdmChannel, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/channels/adm", + } + + if input == nil { + input = &GetAdmChannelInput{} + } + + output = &GetAdmChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetAdmChannel API operation for Amazon Pinpoint. +// +// Get an ADM channel. +// +// 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 Pinpoint's +// API operation GetAdmChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetAdmChannel +func (c *Pinpoint) GetAdmChannel(input *GetAdmChannelInput) (*GetAdmChannelOutput, error) { + req, out := c.GetAdmChannelRequest(input) + return out, req.Send() +} + +// GetAdmChannelWithContext is the same as GetAdmChannel with the addition of +// the ability to pass a context and additional request options. +// +// See GetAdmChannel 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 *Pinpoint) GetAdmChannelWithContext(ctx aws.Context, input *GetAdmChannelInput, opts ...request.Option) (*GetAdmChannelOutput, error) { + req, out := c.GetAdmChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetApnsChannel = "GetApnsChannel" + +// GetApnsChannelRequest generates a "aws/request.Request" representing the +// client's request for the GetApnsChannel 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 GetApnsChannel for more information on using the GetApnsChannel +// 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 GetApnsChannelRequest method. +// req, resp := client.GetApnsChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsChannel +func (c *Pinpoint) GetApnsChannelRequest(input *GetApnsChannelInput) (req *request.Request, output *GetApnsChannelOutput) { + op := &request.Operation{ + Name: opGetApnsChannel, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/channels/apns", + } + + if input == nil { + input = &GetApnsChannelInput{} + } + + output = &GetApnsChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetApnsChannel API operation for Amazon Pinpoint. +// +// Returns information about the APNs channel for an app. +// +// 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 Pinpoint's +// API operation GetApnsChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsChannel +func (c *Pinpoint) GetApnsChannel(input *GetApnsChannelInput) (*GetApnsChannelOutput, error) { + req, out := c.GetApnsChannelRequest(input) + return out, req.Send() +} + +// GetApnsChannelWithContext is the same as GetApnsChannel with the addition of +// the ability to pass a context and additional request options. +// +// See GetApnsChannel 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 *Pinpoint) GetApnsChannelWithContext(ctx aws.Context, input *GetApnsChannelInput, opts ...request.Option) (*GetApnsChannelOutput, error) { + req, out := c.GetApnsChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetApnsSandboxChannel = "GetApnsSandboxChannel" + +// GetApnsSandboxChannelRequest generates a "aws/request.Request" representing the +// client's request for the GetApnsSandboxChannel 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 GetApnsSandboxChannel for more information on using the GetApnsSandboxChannel +// 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 GetApnsSandboxChannelRequest method. +// req, resp := client.GetApnsSandboxChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsSandboxChannel +func (c *Pinpoint) GetApnsSandboxChannelRequest(input *GetApnsSandboxChannelInput) (req *request.Request, output *GetApnsSandboxChannelOutput) { + op := &request.Operation{ + Name: opGetApnsSandboxChannel, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/channels/apns_sandbox", + } + + if input == nil { + input = &GetApnsSandboxChannelInput{} + } + + output = &GetApnsSandboxChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetApnsSandboxChannel API operation for Amazon Pinpoint. +// +// Get an APNS sandbox channel. +// +// 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 Pinpoint's +// API operation GetApnsSandboxChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsSandboxChannel +func (c *Pinpoint) GetApnsSandboxChannel(input *GetApnsSandboxChannelInput) (*GetApnsSandboxChannelOutput, error) { + req, out := c.GetApnsSandboxChannelRequest(input) + return out, req.Send() +} + +// GetApnsSandboxChannelWithContext is the same as GetApnsSandboxChannel with the addition of +// the ability to pass a context and additional request options. +// +// See GetApnsSandboxChannel 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 *Pinpoint) GetApnsSandboxChannelWithContext(ctx aws.Context, input *GetApnsSandboxChannelInput, opts ...request.Option) (*GetApnsSandboxChannelOutput, error) { + req, out := c.GetApnsSandboxChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetApnsVoipChannel = "GetApnsVoipChannel" + +// GetApnsVoipChannelRequest generates a "aws/request.Request" representing the +// client's request for the GetApnsVoipChannel 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 GetApnsVoipChannel for more information on using the GetApnsVoipChannel +// 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 GetApnsVoipChannelRequest method. +// req, resp := client.GetApnsVoipChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsVoipChannel +func (c *Pinpoint) GetApnsVoipChannelRequest(input *GetApnsVoipChannelInput) (req *request.Request, output *GetApnsVoipChannelOutput) { + op := &request.Operation{ + Name: opGetApnsVoipChannel, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/channels/apns_voip", + } + + if input == nil { + input = &GetApnsVoipChannelInput{} + } + + output = &GetApnsVoipChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetApnsVoipChannel API operation for Amazon Pinpoint. +// +// Get an APNS VoIP channel +// +// 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 Pinpoint's +// API operation GetApnsVoipChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsVoipChannel +func (c *Pinpoint) GetApnsVoipChannel(input *GetApnsVoipChannelInput) (*GetApnsVoipChannelOutput, error) { + req, out := c.GetApnsVoipChannelRequest(input) + return out, req.Send() +} + +// GetApnsVoipChannelWithContext is the same as GetApnsVoipChannel with the addition of +// the ability to pass a context and additional request options. +// +// See GetApnsVoipChannel 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 *Pinpoint) GetApnsVoipChannelWithContext(ctx aws.Context, input *GetApnsVoipChannelInput, opts ...request.Option) (*GetApnsVoipChannelOutput, error) { + req, out := c.GetApnsVoipChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetApnsVoipSandboxChannel = "GetApnsVoipSandboxChannel" + +// GetApnsVoipSandboxChannelRequest generates a "aws/request.Request" representing the +// client's request for the GetApnsVoipSandboxChannel 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 GetApnsVoipSandboxChannel for more information on using the GetApnsVoipSandboxChannel +// 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 GetApnsVoipSandboxChannelRequest method. +// req, resp := client.GetApnsVoipSandboxChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsVoipSandboxChannel +func (c *Pinpoint) GetApnsVoipSandboxChannelRequest(input *GetApnsVoipSandboxChannelInput) (req *request.Request, output *GetApnsVoipSandboxChannelOutput) { + op := &request.Operation{ + Name: opGetApnsVoipSandboxChannel, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/channels/apns_voip_sandbox", + } + + if input == nil { + input = &GetApnsVoipSandboxChannelInput{} + } + + output = &GetApnsVoipSandboxChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetApnsVoipSandboxChannel API operation for Amazon Pinpoint. +// +// Get an APNS VoIPSandbox channel +// +// 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 Pinpoint's +// API operation GetApnsVoipSandboxChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApnsVoipSandboxChannel +func (c *Pinpoint) GetApnsVoipSandboxChannel(input *GetApnsVoipSandboxChannelInput) (*GetApnsVoipSandboxChannelOutput, error) { + req, out := c.GetApnsVoipSandboxChannelRequest(input) + return out, req.Send() +} + +// GetApnsVoipSandboxChannelWithContext is the same as GetApnsVoipSandboxChannel with the addition of +// the ability to pass a context and additional request options. +// +// See GetApnsVoipSandboxChannel 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 *Pinpoint) GetApnsVoipSandboxChannelWithContext(ctx aws.Context, input *GetApnsVoipSandboxChannelInput, opts ...request.Option) (*GetApnsVoipSandboxChannelOutput, error) { + req, out := c.GetApnsVoipSandboxChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetApp = "GetApp" + +// GetAppRequest generates a "aws/request.Request" representing the +// client's request for the GetApp 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 GetApp for more information on using the GetApp +// 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 GetAppRequest method. +// req, resp := client.GetAppRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApp +func (c *Pinpoint) GetAppRequest(input *GetAppInput) (req *request.Request, output *GetAppOutput) { + op := &request.Operation{ + Name: opGetApp, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}", + } + + if input == nil { + input = &GetAppInput{} + } + + output = &GetAppOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetApp API operation for Amazon Pinpoint. +// +// Returns information about an app. +// +// 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 Pinpoint's +// API operation GetApp for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApp +func (c *Pinpoint) GetApp(input *GetAppInput) (*GetAppOutput, error) { + req, out := c.GetAppRequest(input) + return out, req.Send() +} + +// GetAppWithContext is the same as GetApp with the addition of +// the ability to pass a context and additional request options. +// +// See GetApp 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 *Pinpoint) GetAppWithContext(ctx aws.Context, input *GetAppInput, opts ...request.Option) (*GetAppOutput, error) { + req, out := c.GetAppRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetApplicationSettings = "GetApplicationSettings" + +// GetApplicationSettingsRequest generates a "aws/request.Request" representing the +// client's request for the GetApplicationSettings 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 GetApplicationSettings for more information on using the GetApplicationSettings +// 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 GetApplicationSettingsRequest method. +// req, resp := client.GetApplicationSettingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApplicationSettings +func (c *Pinpoint) GetApplicationSettingsRequest(input *GetApplicationSettingsInput) (req *request.Request, output *GetApplicationSettingsOutput) { + op := &request.Operation{ + Name: opGetApplicationSettings, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/settings", + } + + if input == nil { + input = &GetApplicationSettingsInput{} + } + + output = &GetApplicationSettingsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetApplicationSettings API operation for Amazon Pinpoint. +// +// Used to request the settings for an app. +// +// 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 Pinpoint's +// API operation GetApplicationSettings for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApplicationSettings +func (c *Pinpoint) GetApplicationSettings(input *GetApplicationSettingsInput) (*GetApplicationSettingsOutput, error) { + req, out := c.GetApplicationSettingsRequest(input) + return out, req.Send() +} + +// GetApplicationSettingsWithContext is the same as GetApplicationSettings with the addition of +// the ability to pass a context and additional request options. +// +// See GetApplicationSettings 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 *Pinpoint) GetApplicationSettingsWithContext(ctx aws.Context, input *GetApplicationSettingsInput, opts ...request.Option) (*GetApplicationSettingsOutput, error) { + req, out := c.GetApplicationSettingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetApps = "GetApps" + +// GetAppsRequest generates a "aws/request.Request" representing the +// client's request for the GetApps 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 GetApps for more information on using the GetApps +// 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 GetAppsRequest method. +// req, resp := client.GetAppsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApps +func (c *Pinpoint) GetAppsRequest(input *GetAppsInput) (req *request.Request, output *GetAppsOutput) { + op := &request.Operation{ + Name: opGetApps, + HTTPMethod: "GET", + HTTPPath: "/v1/apps", + } + + if input == nil { + input = &GetAppsInput{} + } + + output = &GetAppsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetApps API operation for Amazon Pinpoint. +// +// Returns information about your apps. +// +// 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 Pinpoint's +// API operation GetApps for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetApps +func (c *Pinpoint) GetApps(input *GetAppsInput) (*GetAppsOutput, error) { + req, out := c.GetAppsRequest(input) + return out, req.Send() +} + +// GetAppsWithContext is the same as GetApps with the addition of +// the ability to pass a context and additional request options. +// +// See GetApps 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 *Pinpoint) GetAppsWithContext(ctx aws.Context, input *GetAppsInput, opts ...request.Option) (*GetAppsOutput, error) { + req, out := c.GetAppsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetBaiduChannel = "GetBaiduChannel" + +// GetBaiduChannelRequest generates a "aws/request.Request" representing the +// client's request for the GetBaiduChannel 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 GetBaiduChannel for more information on using the GetBaiduChannel +// 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 GetBaiduChannelRequest method. +// req, resp := client.GetBaiduChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetBaiduChannel +func (c *Pinpoint) GetBaiduChannelRequest(input *GetBaiduChannelInput) (req *request.Request, output *GetBaiduChannelOutput) { + op := &request.Operation{ + Name: opGetBaiduChannel, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/channels/baidu", + } + + if input == nil { + input = &GetBaiduChannelInput{} + } + + output = &GetBaiduChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetBaiduChannel API operation for Amazon Pinpoint. +// +// Get a BAIDU GCM channel +// +// 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 Pinpoint's +// API operation GetBaiduChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetBaiduChannel +func (c *Pinpoint) GetBaiduChannel(input *GetBaiduChannelInput) (*GetBaiduChannelOutput, error) { + req, out := c.GetBaiduChannelRequest(input) + return out, req.Send() +} + +// GetBaiduChannelWithContext is the same as GetBaiduChannel with the addition of +// the ability to pass a context and additional request options. +// +// See GetBaiduChannel 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 *Pinpoint) GetBaiduChannelWithContext(ctx aws.Context, input *GetBaiduChannelInput, opts ...request.Option) (*GetBaiduChannelOutput, error) { + req, out := c.GetBaiduChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetCampaign = "GetCampaign" + +// GetCampaignRequest generates a "aws/request.Request" representing the +// client's request for the GetCampaign 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 GetCampaign for more information on using the GetCampaign +// 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 GetCampaignRequest method. +// req, resp := client.GetCampaignRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaign +func (c *Pinpoint) GetCampaignRequest(input *GetCampaignInput) (req *request.Request, output *GetCampaignOutput) { + op := &request.Operation{ + Name: opGetCampaign, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/campaigns/{campaign-id}", + } + + if input == nil { + input = &GetCampaignInput{} + } + + output = &GetCampaignOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetCampaign API operation for Amazon Pinpoint. +// +// Returns information about a campaign. +// +// 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 Pinpoint's +// API operation GetCampaign for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaign +func (c *Pinpoint) GetCampaign(input *GetCampaignInput) (*GetCampaignOutput, error) { + req, out := c.GetCampaignRequest(input) + return out, req.Send() +} + +// GetCampaignWithContext is the same as GetCampaign with the addition of +// the ability to pass a context and additional request options. +// +// See GetCampaign 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 *Pinpoint) GetCampaignWithContext(ctx aws.Context, input *GetCampaignInput, opts ...request.Option) (*GetCampaignOutput, error) { + req, out := c.GetCampaignRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetCampaignActivities = "GetCampaignActivities" + +// GetCampaignActivitiesRequest generates a "aws/request.Request" representing the +// client's request for the GetCampaignActivities 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 GetCampaignActivities for more information on using the GetCampaignActivities +// 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 GetCampaignActivitiesRequest method. +// req, resp := client.GetCampaignActivitiesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignActivities +func (c *Pinpoint) GetCampaignActivitiesRequest(input *GetCampaignActivitiesInput) (req *request.Request, output *GetCampaignActivitiesOutput) { + op := &request.Operation{ + Name: opGetCampaignActivities, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/campaigns/{campaign-id}/activities", + } + + if input == nil { + input = &GetCampaignActivitiesInput{} + } + + output = &GetCampaignActivitiesOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetCampaignActivities API operation for Amazon Pinpoint. +// +// Returns information about the activity performed by a campaign. +// +// 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 Pinpoint's +// API operation GetCampaignActivities for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignActivities +func (c *Pinpoint) GetCampaignActivities(input *GetCampaignActivitiesInput) (*GetCampaignActivitiesOutput, error) { + req, out := c.GetCampaignActivitiesRequest(input) + return out, req.Send() +} + +// GetCampaignActivitiesWithContext is the same as GetCampaignActivities with the addition of +// the ability to pass a context and additional request options. +// +// See GetCampaignActivities 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 *Pinpoint) GetCampaignActivitiesWithContext(ctx aws.Context, input *GetCampaignActivitiesInput, opts ...request.Option) (*GetCampaignActivitiesOutput, error) { + req, out := c.GetCampaignActivitiesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetCampaignVersion = "GetCampaignVersion" + +// GetCampaignVersionRequest generates a "aws/request.Request" representing the +// client's request for the GetCampaignVersion 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 GetCampaignVersion for more information on using the GetCampaignVersion +// 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 GetCampaignVersionRequest method. +// req, resp := client.GetCampaignVersionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignVersion +func (c *Pinpoint) GetCampaignVersionRequest(input *GetCampaignVersionInput) (req *request.Request, output *GetCampaignVersionOutput) { + op := &request.Operation{ + Name: opGetCampaignVersion, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/campaigns/{campaign-id}/versions/{version}", + } + + if input == nil { + input = &GetCampaignVersionInput{} + } + + output = &GetCampaignVersionOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetCampaignVersion API operation for Amazon Pinpoint. +// +// Returns information about a specific version of a campaign. +// +// 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 Pinpoint's +// API operation GetCampaignVersion for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignVersion +func (c *Pinpoint) GetCampaignVersion(input *GetCampaignVersionInput) (*GetCampaignVersionOutput, error) { + req, out := c.GetCampaignVersionRequest(input) + return out, req.Send() +} + +// GetCampaignVersionWithContext is the same as GetCampaignVersion with the addition of +// the ability to pass a context and additional request options. +// +// See GetCampaignVersion 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 *Pinpoint) GetCampaignVersionWithContext(ctx aws.Context, input *GetCampaignVersionInput, opts ...request.Option) (*GetCampaignVersionOutput, error) { + req, out := c.GetCampaignVersionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetCampaignVersions = "GetCampaignVersions" + +// GetCampaignVersionsRequest generates a "aws/request.Request" representing the +// client's request for the GetCampaignVersions 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 GetCampaignVersions for more information on using the GetCampaignVersions +// 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 GetCampaignVersionsRequest method. +// req, resp := client.GetCampaignVersionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignVersions +func (c *Pinpoint) GetCampaignVersionsRequest(input *GetCampaignVersionsInput) (req *request.Request, output *GetCampaignVersionsOutput) { + op := &request.Operation{ + Name: opGetCampaignVersions, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/campaigns/{campaign-id}/versions", + } + + if input == nil { + input = &GetCampaignVersionsInput{} + } + + output = &GetCampaignVersionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetCampaignVersions API operation for Amazon Pinpoint. +// +// Returns information about your campaign versions. +// +// 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 Pinpoint's +// API operation GetCampaignVersions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaignVersions +func (c *Pinpoint) GetCampaignVersions(input *GetCampaignVersionsInput) (*GetCampaignVersionsOutput, error) { + req, out := c.GetCampaignVersionsRequest(input) + return out, req.Send() +} + +// GetCampaignVersionsWithContext is the same as GetCampaignVersions with the addition of +// the ability to pass a context and additional request options. +// +// See GetCampaignVersions 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 *Pinpoint) GetCampaignVersionsWithContext(ctx aws.Context, input *GetCampaignVersionsInput, opts ...request.Option) (*GetCampaignVersionsOutput, error) { + req, out := c.GetCampaignVersionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetCampaigns = "GetCampaigns" + +// GetCampaignsRequest generates a "aws/request.Request" representing the +// client's request for the GetCampaigns 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 GetCampaigns for more information on using the GetCampaigns +// 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 GetCampaignsRequest method. +// req, resp := client.GetCampaignsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaigns +func (c *Pinpoint) GetCampaignsRequest(input *GetCampaignsInput) (req *request.Request, output *GetCampaignsOutput) { + op := &request.Operation{ + Name: opGetCampaigns, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/campaigns", + } + + if input == nil { + input = &GetCampaignsInput{} + } + + output = &GetCampaignsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetCampaigns API operation for Amazon Pinpoint. +// +// Returns information about your campaigns. +// +// 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 Pinpoint's +// API operation GetCampaigns for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetCampaigns +func (c *Pinpoint) GetCampaigns(input *GetCampaignsInput) (*GetCampaignsOutput, error) { + req, out := c.GetCampaignsRequest(input) + return out, req.Send() +} + +// GetCampaignsWithContext is the same as GetCampaigns with the addition of +// the ability to pass a context and additional request options. +// +// See GetCampaigns 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 *Pinpoint) GetCampaignsWithContext(ctx aws.Context, input *GetCampaignsInput, opts ...request.Option) (*GetCampaignsOutput, error) { + req, out := c.GetCampaignsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetChannels = "GetChannels" + +// GetChannelsRequest generates a "aws/request.Request" representing the +// client's request for the GetChannels 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 GetChannels for more information on using the GetChannels +// 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 GetChannelsRequest method. +// req, resp := client.GetChannelsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetChannels +func (c *Pinpoint) GetChannelsRequest(input *GetChannelsInput) (req *request.Request, output *GetChannelsOutput) { + op := &request.Operation{ + Name: opGetChannels, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/channels", + } + + if input == nil { + input = &GetChannelsInput{} + } + + output = &GetChannelsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetChannels API operation for Amazon Pinpoint. +// +// Get all channels. +// +// 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 Pinpoint's +// API operation GetChannels for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetChannels +func (c *Pinpoint) GetChannels(input *GetChannelsInput) (*GetChannelsOutput, error) { + req, out := c.GetChannelsRequest(input) + return out, req.Send() +} + +// GetChannelsWithContext is the same as GetChannels with the addition of +// the ability to pass a context and additional request options. +// +// See GetChannels 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 *Pinpoint) GetChannelsWithContext(ctx aws.Context, input *GetChannelsInput, opts ...request.Option) (*GetChannelsOutput, error) { + req, out := c.GetChannelsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetEmailChannel = "GetEmailChannel" + +// GetEmailChannelRequest generates a "aws/request.Request" representing the +// client's request for the GetEmailChannel 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 GetEmailChannel for more information on using the GetEmailChannel +// 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 GetEmailChannelRequest method. +// req, resp := client.GetEmailChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetEmailChannel +func (c *Pinpoint) GetEmailChannelRequest(input *GetEmailChannelInput) (req *request.Request, output *GetEmailChannelOutput) { + op := &request.Operation{ + Name: opGetEmailChannel, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/channels/email", + } + + if input == nil { + input = &GetEmailChannelInput{} + } + + output = &GetEmailChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetEmailChannel API operation for Amazon Pinpoint. +// +// Get an email channel. +// +// 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 Pinpoint's +// API operation GetEmailChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetEmailChannel +func (c *Pinpoint) GetEmailChannel(input *GetEmailChannelInput) (*GetEmailChannelOutput, error) { + req, out := c.GetEmailChannelRequest(input) + return out, req.Send() +} + +// GetEmailChannelWithContext is the same as GetEmailChannel with the addition of +// the ability to pass a context and additional request options. +// +// See GetEmailChannel 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 *Pinpoint) GetEmailChannelWithContext(ctx aws.Context, input *GetEmailChannelInput, opts ...request.Option) (*GetEmailChannelOutput, error) { + req, out := c.GetEmailChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetEndpoint = "GetEndpoint" + +// GetEndpointRequest generates a "aws/request.Request" representing the +// client's request for the GetEndpoint 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 GetEndpoint for more information on using the GetEndpoint +// 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 GetEndpointRequest method. +// req, resp := client.GetEndpointRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetEndpoint +func (c *Pinpoint) GetEndpointRequest(input *GetEndpointInput) (req *request.Request, output *GetEndpointOutput) { + op := &request.Operation{ + Name: opGetEndpoint, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/endpoints/{endpoint-id}", + } + + if input == nil { + input = &GetEndpointInput{} + } + + output = &GetEndpointOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetEndpoint API operation for Amazon Pinpoint. +// +// Returns information about an endpoint. +// +// 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 Pinpoint's +// API operation GetEndpoint for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetEndpoint +func (c *Pinpoint) GetEndpoint(input *GetEndpointInput) (*GetEndpointOutput, error) { + req, out := c.GetEndpointRequest(input) + return out, req.Send() +} + +// GetEndpointWithContext is the same as GetEndpoint with the addition of +// the ability to pass a context and additional request options. +// +// See GetEndpoint 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 *Pinpoint) GetEndpointWithContext(ctx aws.Context, input *GetEndpointInput, opts ...request.Option) (*GetEndpointOutput, error) { + req, out := c.GetEndpointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetEventStream = "GetEventStream" + +// GetEventStreamRequest generates a "aws/request.Request" representing the +// client's request for the GetEventStream 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 GetEventStream for more information on using the GetEventStream +// 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 GetEventStreamRequest method. +// req, resp := client.GetEventStreamRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetEventStream +func (c *Pinpoint) GetEventStreamRequest(input *GetEventStreamInput) (req *request.Request, output *GetEventStreamOutput) { + op := &request.Operation{ + Name: opGetEventStream, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/eventstream", + } + + if input == nil { + input = &GetEventStreamInput{} + } + + output = &GetEventStreamOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetEventStream API operation for Amazon Pinpoint. +// +// Returns the event stream for an app. +// +// 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 Pinpoint's +// API operation GetEventStream for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetEventStream +func (c *Pinpoint) GetEventStream(input *GetEventStreamInput) (*GetEventStreamOutput, error) { + req, out := c.GetEventStreamRequest(input) + return out, req.Send() +} + +// GetEventStreamWithContext is the same as GetEventStream with the addition of +// the ability to pass a context and additional request options. +// +// See GetEventStream 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 *Pinpoint) GetEventStreamWithContext(ctx aws.Context, input *GetEventStreamInput, opts ...request.Option) (*GetEventStreamOutput, error) { + req, out := c.GetEventStreamRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetExportJob = "GetExportJob" + +// GetExportJobRequest generates a "aws/request.Request" representing the +// client's request for the GetExportJob 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 GetExportJob for more information on using the GetExportJob +// 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 GetExportJobRequest method. +// req, resp := client.GetExportJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetExportJob +func (c *Pinpoint) GetExportJobRequest(input *GetExportJobInput) (req *request.Request, output *GetExportJobOutput) { + op := &request.Operation{ + Name: opGetExportJob, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/jobs/export/{job-id}", + } + + if input == nil { + input = &GetExportJobInput{} + } + + output = &GetExportJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetExportJob API operation for Amazon Pinpoint. +// +// Returns information about an export job. +// +// 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 Pinpoint's +// API operation GetExportJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetExportJob +func (c *Pinpoint) GetExportJob(input *GetExportJobInput) (*GetExportJobOutput, error) { + req, out := c.GetExportJobRequest(input) + return out, req.Send() +} + +// GetExportJobWithContext is the same as GetExportJob with the addition of +// the ability to pass a context and additional request options. +// +// See GetExportJob 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 *Pinpoint) GetExportJobWithContext(ctx aws.Context, input *GetExportJobInput, opts ...request.Option) (*GetExportJobOutput, error) { + req, out := c.GetExportJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetExportJobs = "GetExportJobs" + +// GetExportJobsRequest generates a "aws/request.Request" representing the +// client's request for the GetExportJobs 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 GetExportJobs for more information on using the GetExportJobs +// 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 GetExportJobsRequest method. +// req, resp := client.GetExportJobsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetExportJobs +func (c *Pinpoint) GetExportJobsRequest(input *GetExportJobsInput) (req *request.Request, output *GetExportJobsOutput) { + op := &request.Operation{ + Name: opGetExportJobs, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/jobs/export", + } + + if input == nil { + input = &GetExportJobsInput{} + } + + output = &GetExportJobsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetExportJobs API operation for Amazon Pinpoint. +// +// Returns information about your export jobs. +// +// 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 Pinpoint's +// API operation GetExportJobs for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetExportJobs +func (c *Pinpoint) GetExportJobs(input *GetExportJobsInput) (*GetExportJobsOutput, error) { + req, out := c.GetExportJobsRequest(input) + return out, req.Send() +} + +// GetExportJobsWithContext is the same as GetExportJobs with the addition of +// the ability to pass a context and additional request options. +// +// See GetExportJobs 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 *Pinpoint) GetExportJobsWithContext(ctx aws.Context, input *GetExportJobsInput, opts ...request.Option) (*GetExportJobsOutput, error) { + req, out := c.GetExportJobsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetGcmChannel = "GetGcmChannel" + +// GetGcmChannelRequest generates a "aws/request.Request" representing the +// client's request for the GetGcmChannel 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 GetGcmChannel for more information on using the GetGcmChannel +// 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 GetGcmChannelRequest method. +// req, resp := client.GetGcmChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetGcmChannel +func (c *Pinpoint) GetGcmChannelRequest(input *GetGcmChannelInput) (req *request.Request, output *GetGcmChannelOutput) { + op := &request.Operation{ + Name: opGetGcmChannel, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/channels/gcm", + } + + if input == nil { + input = &GetGcmChannelInput{} + } + + output = &GetGcmChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetGcmChannel API operation for Amazon Pinpoint. +// +// Returns information about the GCM channel for an app. +// +// 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 Pinpoint's +// API operation GetGcmChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetGcmChannel +func (c *Pinpoint) GetGcmChannel(input *GetGcmChannelInput) (*GetGcmChannelOutput, error) { + req, out := c.GetGcmChannelRequest(input) + return out, req.Send() +} + +// GetGcmChannelWithContext is the same as GetGcmChannel with the addition of +// the ability to pass a context and additional request options. +// +// See GetGcmChannel 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 *Pinpoint) GetGcmChannelWithContext(ctx aws.Context, input *GetGcmChannelInput, opts ...request.Option) (*GetGcmChannelOutput, error) { + req, out := c.GetGcmChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetImportJob = "GetImportJob" + +// GetImportJobRequest generates a "aws/request.Request" representing the +// client's request for the GetImportJob 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 GetImportJob for more information on using the GetImportJob +// 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 GetImportJobRequest method. +// req, resp := client.GetImportJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetImportJob +func (c *Pinpoint) GetImportJobRequest(input *GetImportJobInput) (req *request.Request, output *GetImportJobOutput) { + op := &request.Operation{ + Name: opGetImportJob, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/jobs/import/{job-id}", + } + + if input == nil { + input = &GetImportJobInput{} + } + + output = &GetImportJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetImportJob API operation for Amazon Pinpoint. +// +// Returns information about an import job. +// +// 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 Pinpoint's +// API operation GetImportJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetImportJob +func (c *Pinpoint) GetImportJob(input *GetImportJobInput) (*GetImportJobOutput, error) { + req, out := c.GetImportJobRequest(input) + return out, req.Send() +} + +// GetImportJobWithContext is the same as GetImportJob with the addition of +// the ability to pass a context and additional request options. +// +// See GetImportJob 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 *Pinpoint) GetImportJobWithContext(ctx aws.Context, input *GetImportJobInput, opts ...request.Option) (*GetImportJobOutput, error) { + req, out := c.GetImportJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetImportJobs = "GetImportJobs" + +// GetImportJobsRequest generates a "aws/request.Request" representing the +// client's request for the GetImportJobs 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 GetImportJobs for more information on using the GetImportJobs +// 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 GetImportJobsRequest method. +// req, resp := client.GetImportJobsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetImportJobs +func (c *Pinpoint) GetImportJobsRequest(input *GetImportJobsInput) (req *request.Request, output *GetImportJobsOutput) { + op := &request.Operation{ + Name: opGetImportJobs, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/jobs/import", + } + + if input == nil { + input = &GetImportJobsInput{} + } + + output = &GetImportJobsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetImportJobs API operation for Amazon Pinpoint. +// +// Returns information about your import jobs. +// +// 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 Pinpoint's +// API operation GetImportJobs for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetImportJobs +func (c *Pinpoint) GetImportJobs(input *GetImportJobsInput) (*GetImportJobsOutput, error) { + req, out := c.GetImportJobsRequest(input) + return out, req.Send() +} + +// GetImportJobsWithContext is the same as GetImportJobs with the addition of +// the ability to pass a context and additional request options. +// +// See GetImportJobs 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 *Pinpoint) GetImportJobsWithContext(ctx aws.Context, input *GetImportJobsInput, opts ...request.Option) (*GetImportJobsOutput, error) { + req, out := c.GetImportJobsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetSegment = "GetSegment" + +// GetSegmentRequest generates a "aws/request.Request" representing the +// client's request for the GetSegment 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 GetSegment for more information on using the GetSegment +// 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 GetSegmentRequest method. +// req, resp := client.GetSegmentRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegment +func (c *Pinpoint) GetSegmentRequest(input *GetSegmentInput) (req *request.Request, output *GetSegmentOutput) { + op := &request.Operation{ + Name: opGetSegment, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/segments/{segment-id}", + } + + if input == nil { + input = &GetSegmentInput{} + } + + output = &GetSegmentOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetSegment API operation for Amazon Pinpoint. +// +// Returns information about a segment. +// +// 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 Pinpoint's +// API operation GetSegment for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegment +func (c *Pinpoint) GetSegment(input *GetSegmentInput) (*GetSegmentOutput, error) { + req, out := c.GetSegmentRequest(input) + return out, req.Send() +} + +// GetSegmentWithContext is the same as GetSegment with the addition of +// the ability to pass a context and additional request options. +// +// See GetSegment 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 *Pinpoint) GetSegmentWithContext(ctx aws.Context, input *GetSegmentInput, opts ...request.Option) (*GetSegmentOutput, error) { + req, out := c.GetSegmentRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetSegmentExportJobs = "GetSegmentExportJobs" + +// GetSegmentExportJobsRequest generates a "aws/request.Request" representing the +// client's request for the GetSegmentExportJobs 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 GetSegmentExportJobs for more information on using the GetSegmentExportJobs +// 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 GetSegmentExportJobsRequest method. +// req, resp := client.GetSegmentExportJobsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentExportJobs +func (c *Pinpoint) GetSegmentExportJobsRequest(input *GetSegmentExportJobsInput) (req *request.Request, output *GetSegmentExportJobsOutput) { + op := &request.Operation{ + Name: opGetSegmentExportJobs, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/segments/{segment-id}/jobs/export", + } + + if input == nil { + input = &GetSegmentExportJobsInput{} + } + + output = &GetSegmentExportJobsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetSegmentExportJobs API operation for Amazon Pinpoint. +// +// Returns a list of export jobs for a specific segment. +// +// 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 Pinpoint's +// API operation GetSegmentExportJobs for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentExportJobs +func (c *Pinpoint) GetSegmentExportJobs(input *GetSegmentExportJobsInput) (*GetSegmentExportJobsOutput, error) { + req, out := c.GetSegmentExportJobsRequest(input) + return out, req.Send() +} + +// GetSegmentExportJobsWithContext is the same as GetSegmentExportJobs with the addition of +// the ability to pass a context and additional request options. +// +// See GetSegmentExportJobs 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 *Pinpoint) GetSegmentExportJobsWithContext(ctx aws.Context, input *GetSegmentExportJobsInput, opts ...request.Option) (*GetSegmentExportJobsOutput, error) { + req, out := c.GetSegmentExportJobsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetSegmentImportJobs = "GetSegmentImportJobs" + +// GetSegmentImportJobsRequest generates a "aws/request.Request" representing the +// client's request for the GetSegmentImportJobs 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 GetSegmentImportJobs for more information on using the GetSegmentImportJobs +// 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 GetSegmentImportJobsRequest method. +// req, resp := client.GetSegmentImportJobsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentImportJobs +func (c *Pinpoint) GetSegmentImportJobsRequest(input *GetSegmentImportJobsInput) (req *request.Request, output *GetSegmentImportJobsOutput) { + op := &request.Operation{ + Name: opGetSegmentImportJobs, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/segments/{segment-id}/jobs/import", + } + + if input == nil { + input = &GetSegmentImportJobsInput{} + } + + output = &GetSegmentImportJobsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetSegmentImportJobs API operation for Amazon Pinpoint. +// +// Returns a list of import jobs for a specific segment. +// +// 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 Pinpoint's +// API operation GetSegmentImportJobs for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentImportJobs +func (c *Pinpoint) GetSegmentImportJobs(input *GetSegmentImportJobsInput) (*GetSegmentImportJobsOutput, error) { + req, out := c.GetSegmentImportJobsRequest(input) + return out, req.Send() +} + +// GetSegmentImportJobsWithContext is the same as GetSegmentImportJobs with the addition of +// the ability to pass a context and additional request options. +// +// See GetSegmentImportJobs 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 *Pinpoint) GetSegmentImportJobsWithContext(ctx aws.Context, input *GetSegmentImportJobsInput, opts ...request.Option) (*GetSegmentImportJobsOutput, error) { + req, out := c.GetSegmentImportJobsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetSegmentVersion = "GetSegmentVersion" + +// GetSegmentVersionRequest generates a "aws/request.Request" representing the +// client's request for the GetSegmentVersion 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 GetSegmentVersion for more information on using the GetSegmentVersion +// 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 GetSegmentVersionRequest method. +// req, resp := client.GetSegmentVersionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentVersion +func (c *Pinpoint) GetSegmentVersionRequest(input *GetSegmentVersionInput) (req *request.Request, output *GetSegmentVersionOutput) { + op := &request.Operation{ + Name: opGetSegmentVersion, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/segments/{segment-id}/versions/{version}", + } + + if input == nil { + input = &GetSegmentVersionInput{} + } + + output = &GetSegmentVersionOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetSegmentVersion API operation for Amazon Pinpoint. +// +// Returns information about a segment version. +// +// 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 Pinpoint's +// API operation GetSegmentVersion for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentVersion +func (c *Pinpoint) GetSegmentVersion(input *GetSegmentVersionInput) (*GetSegmentVersionOutput, error) { + req, out := c.GetSegmentVersionRequest(input) + return out, req.Send() +} + +// GetSegmentVersionWithContext is the same as GetSegmentVersion with the addition of +// the ability to pass a context and additional request options. +// +// See GetSegmentVersion 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 *Pinpoint) GetSegmentVersionWithContext(ctx aws.Context, input *GetSegmentVersionInput, opts ...request.Option) (*GetSegmentVersionOutput, error) { + req, out := c.GetSegmentVersionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetSegmentVersions = "GetSegmentVersions" + +// GetSegmentVersionsRequest generates a "aws/request.Request" representing the +// client's request for the GetSegmentVersions 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 GetSegmentVersions for more information on using the GetSegmentVersions +// 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 GetSegmentVersionsRequest method. +// req, resp := client.GetSegmentVersionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentVersions +func (c *Pinpoint) GetSegmentVersionsRequest(input *GetSegmentVersionsInput) (req *request.Request, output *GetSegmentVersionsOutput) { + op := &request.Operation{ + Name: opGetSegmentVersions, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/segments/{segment-id}/versions", + } + + if input == nil { + input = &GetSegmentVersionsInput{} + } + + output = &GetSegmentVersionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetSegmentVersions API operation for Amazon Pinpoint. +// +// Returns information about your segment versions. +// +// 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 Pinpoint's +// API operation GetSegmentVersions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegmentVersions +func (c *Pinpoint) GetSegmentVersions(input *GetSegmentVersionsInput) (*GetSegmentVersionsOutput, error) { + req, out := c.GetSegmentVersionsRequest(input) + return out, req.Send() +} + +// GetSegmentVersionsWithContext is the same as GetSegmentVersions with the addition of +// the ability to pass a context and additional request options. +// +// See GetSegmentVersions 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 *Pinpoint) GetSegmentVersionsWithContext(ctx aws.Context, input *GetSegmentVersionsInput, opts ...request.Option) (*GetSegmentVersionsOutput, error) { + req, out := c.GetSegmentVersionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetSegments = "GetSegments" + +// GetSegmentsRequest generates a "aws/request.Request" representing the +// client's request for the GetSegments 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 GetSegments for more information on using the GetSegments +// 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 GetSegmentsRequest method. +// req, resp := client.GetSegmentsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegments +func (c *Pinpoint) GetSegmentsRequest(input *GetSegmentsInput) (req *request.Request, output *GetSegmentsOutput) { + op := &request.Operation{ + Name: opGetSegments, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/segments", + } + + if input == nil { + input = &GetSegmentsInput{} + } + + output = &GetSegmentsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetSegments API operation for Amazon Pinpoint. +// +// Used to get information about your segments. +// +// 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 Pinpoint's +// API operation GetSegments for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSegments +func (c *Pinpoint) GetSegments(input *GetSegmentsInput) (*GetSegmentsOutput, error) { + req, out := c.GetSegmentsRequest(input) + return out, req.Send() +} + +// GetSegmentsWithContext is the same as GetSegments with the addition of +// the ability to pass a context and additional request options. +// +// See GetSegments 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 *Pinpoint) GetSegmentsWithContext(ctx aws.Context, input *GetSegmentsInput, opts ...request.Option) (*GetSegmentsOutput, error) { + req, out := c.GetSegmentsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetSmsChannel = "GetSmsChannel" + +// GetSmsChannelRequest generates a "aws/request.Request" representing the +// client's request for the GetSmsChannel 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 GetSmsChannel for more information on using the GetSmsChannel +// 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 GetSmsChannelRequest method. +// req, resp := client.GetSmsChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSmsChannel +func (c *Pinpoint) GetSmsChannelRequest(input *GetSmsChannelInput) (req *request.Request, output *GetSmsChannelOutput) { + op := &request.Operation{ + Name: opGetSmsChannel, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/channels/sms", + } + + if input == nil { + input = &GetSmsChannelInput{} + } + + output = &GetSmsChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetSmsChannel API operation for Amazon Pinpoint. +// +// Get an SMS channel. +// +// 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 Pinpoint's +// API operation GetSmsChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetSmsChannel +func (c *Pinpoint) GetSmsChannel(input *GetSmsChannelInput) (*GetSmsChannelOutput, error) { + req, out := c.GetSmsChannelRequest(input) + return out, req.Send() +} + +// GetSmsChannelWithContext is the same as GetSmsChannel with the addition of +// the ability to pass a context and additional request options. +// +// See GetSmsChannel 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 *Pinpoint) GetSmsChannelWithContext(ctx aws.Context, input *GetSmsChannelInput, opts ...request.Option) (*GetSmsChannelOutput, error) { + req, out := c.GetSmsChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetUserEndpoints = "GetUserEndpoints" + +// GetUserEndpointsRequest generates a "aws/request.Request" representing the +// client's request for the GetUserEndpoints 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 GetUserEndpoints for more information on using the GetUserEndpoints +// 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 GetUserEndpointsRequest method. +// req, resp := client.GetUserEndpointsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetUserEndpoints +func (c *Pinpoint) GetUserEndpointsRequest(input *GetUserEndpointsInput) (req *request.Request, output *GetUserEndpointsOutput) { + op := &request.Operation{ + Name: opGetUserEndpoints, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/users/{user-id}", + } + + if input == nil { + input = &GetUserEndpointsInput{} + } + + output = &GetUserEndpointsOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetUserEndpoints API operation for Amazon Pinpoint. +// +// Returns information about the endpoints that are associated with a User ID. +// +// 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 Pinpoint's +// API operation GetUserEndpoints for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetUserEndpoints +func (c *Pinpoint) GetUserEndpoints(input *GetUserEndpointsInput) (*GetUserEndpointsOutput, error) { + req, out := c.GetUserEndpointsRequest(input) + return out, req.Send() +} + +// GetUserEndpointsWithContext is the same as GetUserEndpoints with the addition of +// the ability to pass a context and additional request options. +// +// See GetUserEndpoints 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 *Pinpoint) GetUserEndpointsWithContext(ctx aws.Context, input *GetUserEndpointsInput, opts ...request.Option) (*GetUserEndpointsOutput, error) { + req, out := c.GetUserEndpointsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetVoiceChannel = "GetVoiceChannel" + +// GetVoiceChannelRequest generates a "aws/request.Request" representing the +// client's request for the GetVoiceChannel 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 GetVoiceChannel for more information on using the GetVoiceChannel +// 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 GetVoiceChannelRequest method. +// req, resp := client.GetVoiceChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetVoiceChannel +func (c *Pinpoint) GetVoiceChannelRequest(input *GetVoiceChannelInput) (req *request.Request, output *GetVoiceChannelOutput) { + op := &request.Operation{ + Name: opGetVoiceChannel, + HTTPMethod: "GET", + HTTPPath: "/v1/apps/{application-id}/channels/voice", + } + + if input == nil { + input = &GetVoiceChannelInput{} + } + + output = &GetVoiceChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetVoiceChannel API operation for Amazon Pinpoint. +// +// Get a Voice Channel +// +// 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 Pinpoint's +// API operation GetVoiceChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/GetVoiceChannel +func (c *Pinpoint) GetVoiceChannel(input *GetVoiceChannelInput) (*GetVoiceChannelOutput, error) { + req, out := c.GetVoiceChannelRequest(input) + return out, req.Send() +} + +// GetVoiceChannelWithContext is the same as GetVoiceChannel with the addition of +// the ability to pass a context and additional request options. +// +// See GetVoiceChannel 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 *Pinpoint) GetVoiceChannelWithContext(ctx aws.Context, input *GetVoiceChannelInput, opts ...request.Option) (*GetVoiceChannelOutput, error) { + req, out := c.GetVoiceChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPhoneNumberValidate = "PhoneNumberValidate" + +// PhoneNumberValidateRequest generates a "aws/request.Request" representing the +// client's request for the PhoneNumberValidate 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 PhoneNumberValidate for more information on using the PhoneNumberValidate +// 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 PhoneNumberValidateRequest method. +// req, resp := client.PhoneNumberValidateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/PhoneNumberValidate +func (c *Pinpoint) PhoneNumberValidateRequest(input *PhoneNumberValidateInput) (req *request.Request, output *PhoneNumberValidateOutput) { + op := &request.Operation{ + Name: opPhoneNumberValidate, + HTTPMethod: "POST", + HTTPPath: "/v1/phone/number/validate", + } + + if input == nil { + input = &PhoneNumberValidateInput{} + } + + output = &PhoneNumberValidateOutput{} + req = c.newRequest(op, input, output) + return +} + +// PhoneNumberValidate API operation for Amazon Pinpoint. +// +// Returns information about the specified phone number. +// +// 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 Pinpoint's +// API operation PhoneNumberValidate for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/PhoneNumberValidate +func (c *Pinpoint) PhoneNumberValidate(input *PhoneNumberValidateInput) (*PhoneNumberValidateOutput, error) { + req, out := c.PhoneNumberValidateRequest(input) + return out, req.Send() +} + +// PhoneNumberValidateWithContext is the same as PhoneNumberValidate with the addition of +// the ability to pass a context and additional request options. +// +// See PhoneNumberValidate 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 *Pinpoint) PhoneNumberValidateWithContext(ctx aws.Context, input *PhoneNumberValidateInput, opts ...request.Option) (*PhoneNumberValidateOutput, error) { + req, out := c.PhoneNumberValidateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutEventStream = "PutEventStream" + +// PutEventStreamRequest generates a "aws/request.Request" representing the +// client's request for the PutEventStream 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 PutEventStream for more information on using the PutEventStream +// 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 PutEventStreamRequest method. +// req, resp := client.PutEventStreamRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/PutEventStream +func (c *Pinpoint) PutEventStreamRequest(input *PutEventStreamInput) (req *request.Request, output *PutEventStreamOutput) { + op := &request.Operation{ + Name: opPutEventStream, + HTTPMethod: "POST", + HTTPPath: "/v1/apps/{application-id}/eventstream", + } + + if input == nil { + input = &PutEventStreamInput{} + } + + output = &PutEventStreamOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutEventStream API operation for Amazon Pinpoint. +// +// Use to create or update the event stream for an app. +// +// 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 Pinpoint's +// API operation PutEventStream for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/PutEventStream +func (c *Pinpoint) PutEventStream(input *PutEventStreamInput) (*PutEventStreamOutput, error) { + req, out := c.PutEventStreamRequest(input) + return out, req.Send() +} + +// PutEventStreamWithContext is the same as PutEventStream with the addition of +// the ability to pass a context and additional request options. +// +// See PutEventStream 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 *Pinpoint) PutEventStreamWithContext(ctx aws.Context, input *PutEventStreamInput, opts ...request.Option) (*PutEventStreamOutput, error) { + req, out := c.PutEventStreamRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutEvents = "PutEvents" + +// PutEventsRequest generates a "aws/request.Request" representing the +// client's request for the PutEvents 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 PutEvents for more information on using the PutEvents +// 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 PutEventsRequest method. +// req, resp := client.PutEventsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/PutEvents +func (c *Pinpoint) PutEventsRequest(input *PutEventsInput) (req *request.Request, output *PutEventsOutput) { + op := &request.Operation{ + Name: opPutEvents, + HTTPMethod: "POST", + HTTPPath: "/v1/apps/{application-id}/events", + } + + if input == nil { + input = &PutEventsInput{} + } + + output = &PutEventsOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutEvents API operation for Amazon Pinpoint. +// +// Use to record events for endpoints. This method creates events and creates +// or updates the endpoints that those events are associated with. +// +// 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 Pinpoint's +// API operation PutEvents for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/PutEvents +func (c *Pinpoint) PutEvents(input *PutEventsInput) (*PutEventsOutput, error) { + req, out := c.PutEventsRequest(input) + return out, req.Send() +} + +// PutEventsWithContext is the same as PutEvents with the addition of +// the ability to pass a context and additional request options. +// +// See PutEvents 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 *Pinpoint) PutEventsWithContext(ctx aws.Context, input *PutEventsInput, opts ...request.Option) (*PutEventsOutput, error) { + req, out := c.PutEventsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRemoveAttributes = "RemoveAttributes" + +// RemoveAttributesRequest generates a "aws/request.Request" representing the +// client's request for the RemoveAttributes 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 RemoveAttributes for more information on using the RemoveAttributes +// 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 RemoveAttributesRequest method. +// req, resp := client.RemoveAttributesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/RemoveAttributes +func (c *Pinpoint) RemoveAttributesRequest(input *RemoveAttributesInput) (req *request.Request, output *RemoveAttributesOutput) { + op := &request.Operation{ + Name: opRemoveAttributes, + HTTPMethod: "PUT", + HTTPPath: "/v1/apps/{application-id}/attributes/{attribute-type}", + } + + if input == nil { + input = &RemoveAttributesInput{} + } + + output = &RemoveAttributesOutput{} + req = c.newRequest(op, input, output) + return +} + +// RemoveAttributes API operation for Amazon Pinpoint. +// +// Used to remove the attributes for an app +// +// 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 Pinpoint's +// API operation RemoveAttributes for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/RemoveAttributes +func (c *Pinpoint) RemoveAttributes(input *RemoveAttributesInput) (*RemoveAttributesOutput, error) { + req, out := c.RemoveAttributesRequest(input) + return out, req.Send() +} + +// RemoveAttributesWithContext is the same as RemoveAttributes with the addition of +// the ability to pass a context and additional request options. +// +// See RemoveAttributes 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 *Pinpoint) RemoveAttributesWithContext(ctx aws.Context, input *RemoveAttributesInput, opts ...request.Option) (*RemoveAttributesOutput, error) { + req, out := c.RemoveAttributesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opSendMessages = "SendMessages" + +// SendMessagesRequest generates a "aws/request.Request" representing the +// client's request for the SendMessages 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 SendMessages for more information on using the SendMessages +// 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 SendMessagesRequest method. +// req, resp := client.SendMessagesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SendMessages +func (c *Pinpoint) SendMessagesRequest(input *SendMessagesInput) (req *request.Request, output *SendMessagesOutput) { + op := &request.Operation{ + Name: opSendMessages, + HTTPMethod: "POST", + HTTPPath: "/v1/apps/{application-id}/messages", + } + + if input == nil { + input = &SendMessagesInput{} + } + + output = &SendMessagesOutput{} + req = c.newRequest(op, input, output) + return +} + +// SendMessages API operation for Amazon Pinpoint. +// +// Used to send a direct message. +// +// 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 Pinpoint's +// API operation SendMessages for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SendMessages +func (c *Pinpoint) SendMessages(input *SendMessagesInput) (*SendMessagesOutput, error) { + req, out := c.SendMessagesRequest(input) + return out, req.Send() +} + +// SendMessagesWithContext is the same as SendMessages with the addition of +// the ability to pass a context and additional request options. +// +// See SendMessages 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 *Pinpoint) SendMessagesWithContext(ctx aws.Context, input *SendMessagesInput, opts ...request.Option) (*SendMessagesOutput, error) { + req, out := c.SendMessagesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opSendUsersMessages = "SendUsersMessages" + +// SendUsersMessagesRequest generates a "aws/request.Request" representing the +// client's request for the SendUsersMessages 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 SendUsersMessages for more information on using the SendUsersMessages +// 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 SendUsersMessagesRequest method. +// req, resp := client.SendUsersMessagesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SendUsersMessages +func (c *Pinpoint) SendUsersMessagesRequest(input *SendUsersMessagesInput) (req *request.Request, output *SendUsersMessagesOutput) { + op := &request.Operation{ + Name: opSendUsersMessages, + HTTPMethod: "POST", + HTTPPath: "/v1/apps/{application-id}/users-messages", + } + + if input == nil { + input = &SendUsersMessagesInput{} + } + + output = &SendUsersMessagesOutput{} + req = c.newRequest(op, input, output) + return +} + +// SendUsersMessages API operation for Amazon Pinpoint. +// +// Used to send a message to a list of users. +// +// 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 Pinpoint's +// API operation SendUsersMessages for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/SendUsersMessages +func (c *Pinpoint) SendUsersMessages(input *SendUsersMessagesInput) (*SendUsersMessagesOutput, error) { + req, out := c.SendUsersMessagesRequest(input) + return out, req.Send() +} + +// SendUsersMessagesWithContext is the same as SendUsersMessages with the addition of +// the ability to pass a context and additional request options. +// +// See SendUsersMessages 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 *Pinpoint) SendUsersMessagesWithContext(ctx aws.Context, input *SendUsersMessagesInput, opts ...request.Option) (*SendUsersMessagesOutput, error) { + req, out := c.SendUsersMessagesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateAdmChannel = "UpdateAdmChannel" + +// UpdateAdmChannelRequest generates a "aws/request.Request" representing the +// client's request for the UpdateAdmChannel 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 UpdateAdmChannel for more information on using the UpdateAdmChannel +// 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 UpdateAdmChannelRequest method. +// req, resp := client.UpdateAdmChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateAdmChannel +func (c *Pinpoint) UpdateAdmChannelRequest(input *UpdateAdmChannelInput) (req *request.Request, output *UpdateAdmChannelOutput) { + op := &request.Operation{ + Name: opUpdateAdmChannel, + HTTPMethod: "PUT", + HTTPPath: "/v1/apps/{application-id}/channels/adm", + } + + if input == nil { + input = &UpdateAdmChannelInput{} + } + + output = &UpdateAdmChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateAdmChannel API operation for Amazon Pinpoint. +// +// Update an ADM channel. +// +// 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 Pinpoint's +// API operation UpdateAdmChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateAdmChannel +func (c *Pinpoint) UpdateAdmChannel(input *UpdateAdmChannelInput) (*UpdateAdmChannelOutput, error) { + req, out := c.UpdateAdmChannelRequest(input) + return out, req.Send() +} + +// UpdateAdmChannelWithContext is the same as UpdateAdmChannel with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateAdmChannel 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 *Pinpoint) UpdateAdmChannelWithContext(ctx aws.Context, input *UpdateAdmChannelInput, opts ...request.Option) (*UpdateAdmChannelOutput, error) { + req, out := c.UpdateAdmChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateApnsChannel = "UpdateApnsChannel" + +// UpdateApnsChannelRequest generates a "aws/request.Request" representing the +// client's request for the UpdateApnsChannel 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 UpdateApnsChannel for more information on using the UpdateApnsChannel +// 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 UpdateApnsChannelRequest method. +// req, resp := client.UpdateApnsChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsChannel +func (c *Pinpoint) UpdateApnsChannelRequest(input *UpdateApnsChannelInput) (req *request.Request, output *UpdateApnsChannelOutput) { + op := &request.Operation{ + Name: opUpdateApnsChannel, + HTTPMethod: "PUT", + HTTPPath: "/v1/apps/{application-id}/channels/apns", + } + + if input == nil { + input = &UpdateApnsChannelInput{} + } + + output = &UpdateApnsChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateApnsChannel API operation for Amazon Pinpoint. +// +// Use to update the APNs channel for an app. +// +// 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 Pinpoint's +// API operation UpdateApnsChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsChannel +func (c *Pinpoint) UpdateApnsChannel(input *UpdateApnsChannelInput) (*UpdateApnsChannelOutput, error) { + req, out := c.UpdateApnsChannelRequest(input) + return out, req.Send() +} + +// UpdateApnsChannelWithContext is the same as UpdateApnsChannel with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateApnsChannel 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 *Pinpoint) UpdateApnsChannelWithContext(ctx aws.Context, input *UpdateApnsChannelInput, opts ...request.Option) (*UpdateApnsChannelOutput, error) { + req, out := c.UpdateApnsChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateApnsSandboxChannel = "UpdateApnsSandboxChannel" + +// UpdateApnsSandboxChannelRequest generates a "aws/request.Request" representing the +// client's request for the UpdateApnsSandboxChannel 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 UpdateApnsSandboxChannel for more information on using the UpdateApnsSandboxChannel +// 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 UpdateApnsSandboxChannelRequest method. +// req, resp := client.UpdateApnsSandboxChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsSandboxChannel +func (c *Pinpoint) UpdateApnsSandboxChannelRequest(input *UpdateApnsSandboxChannelInput) (req *request.Request, output *UpdateApnsSandboxChannelOutput) { + op := &request.Operation{ + Name: opUpdateApnsSandboxChannel, + HTTPMethod: "PUT", + HTTPPath: "/v1/apps/{application-id}/channels/apns_sandbox", + } + + if input == nil { + input = &UpdateApnsSandboxChannelInput{} + } + + output = &UpdateApnsSandboxChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateApnsSandboxChannel API operation for Amazon Pinpoint. +// +// Update an APNS sandbox channel. +// +// 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 Pinpoint's +// API operation UpdateApnsSandboxChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsSandboxChannel +func (c *Pinpoint) UpdateApnsSandboxChannel(input *UpdateApnsSandboxChannelInput) (*UpdateApnsSandboxChannelOutput, error) { + req, out := c.UpdateApnsSandboxChannelRequest(input) + return out, req.Send() +} + +// UpdateApnsSandboxChannelWithContext is the same as UpdateApnsSandboxChannel with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateApnsSandboxChannel 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 *Pinpoint) UpdateApnsSandboxChannelWithContext(ctx aws.Context, input *UpdateApnsSandboxChannelInput, opts ...request.Option) (*UpdateApnsSandboxChannelOutput, error) { + req, out := c.UpdateApnsSandboxChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateApnsVoipChannel = "UpdateApnsVoipChannel" + +// UpdateApnsVoipChannelRequest generates a "aws/request.Request" representing the +// client's request for the UpdateApnsVoipChannel 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 UpdateApnsVoipChannel for more information on using the UpdateApnsVoipChannel +// 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 UpdateApnsVoipChannelRequest method. +// req, resp := client.UpdateApnsVoipChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsVoipChannel +func (c *Pinpoint) UpdateApnsVoipChannelRequest(input *UpdateApnsVoipChannelInput) (req *request.Request, output *UpdateApnsVoipChannelOutput) { + op := &request.Operation{ + Name: opUpdateApnsVoipChannel, + HTTPMethod: "PUT", + HTTPPath: "/v1/apps/{application-id}/channels/apns_voip", + } + + if input == nil { + input = &UpdateApnsVoipChannelInput{} + } + + output = &UpdateApnsVoipChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateApnsVoipChannel API operation for Amazon Pinpoint. +// +// Update an APNS VoIP channel +// +// 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 Pinpoint's +// API operation UpdateApnsVoipChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsVoipChannel +func (c *Pinpoint) UpdateApnsVoipChannel(input *UpdateApnsVoipChannelInput) (*UpdateApnsVoipChannelOutput, error) { + req, out := c.UpdateApnsVoipChannelRequest(input) + return out, req.Send() +} + +// UpdateApnsVoipChannelWithContext is the same as UpdateApnsVoipChannel with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateApnsVoipChannel 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 *Pinpoint) UpdateApnsVoipChannelWithContext(ctx aws.Context, input *UpdateApnsVoipChannelInput, opts ...request.Option) (*UpdateApnsVoipChannelOutput, error) { + req, out := c.UpdateApnsVoipChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateApnsVoipSandboxChannel = "UpdateApnsVoipSandboxChannel" + +// UpdateApnsVoipSandboxChannelRequest generates a "aws/request.Request" representing the +// client's request for the UpdateApnsVoipSandboxChannel 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 UpdateApnsVoipSandboxChannel for more information on using the UpdateApnsVoipSandboxChannel +// 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 UpdateApnsVoipSandboxChannelRequest method. +// req, resp := client.UpdateApnsVoipSandboxChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsVoipSandboxChannel +func (c *Pinpoint) UpdateApnsVoipSandboxChannelRequest(input *UpdateApnsVoipSandboxChannelInput) (req *request.Request, output *UpdateApnsVoipSandboxChannelOutput) { + op := &request.Operation{ + Name: opUpdateApnsVoipSandboxChannel, + HTTPMethod: "PUT", + HTTPPath: "/v1/apps/{application-id}/channels/apns_voip_sandbox", + } + + if input == nil { + input = &UpdateApnsVoipSandboxChannelInput{} + } + + output = &UpdateApnsVoipSandboxChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateApnsVoipSandboxChannel API operation for Amazon Pinpoint. +// +// Update an APNS VoIP sandbox channel +// +// 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 Pinpoint's +// API operation UpdateApnsVoipSandboxChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApnsVoipSandboxChannel +func (c *Pinpoint) UpdateApnsVoipSandboxChannel(input *UpdateApnsVoipSandboxChannelInput) (*UpdateApnsVoipSandboxChannelOutput, error) { + req, out := c.UpdateApnsVoipSandboxChannelRequest(input) + return out, req.Send() +} + +// UpdateApnsVoipSandboxChannelWithContext is the same as UpdateApnsVoipSandboxChannel with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateApnsVoipSandboxChannel 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 *Pinpoint) UpdateApnsVoipSandboxChannelWithContext(ctx aws.Context, input *UpdateApnsVoipSandboxChannelInput, opts ...request.Option) (*UpdateApnsVoipSandboxChannelOutput, error) { + req, out := c.UpdateApnsVoipSandboxChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateApplicationSettings = "UpdateApplicationSettings" + +// UpdateApplicationSettingsRequest generates a "aws/request.Request" representing the +// client's request for the UpdateApplicationSettings 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 UpdateApplicationSettings for more information on using the UpdateApplicationSettings +// 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 UpdateApplicationSettingsRequest method. +// req, resp := client.UpdateApplicationSettingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApplicationSettings +func (c *Pinpoint) UpdateApplicationSettingsRequest(input *UpdateApplicationSettingsInput) (req *request.Request, output *UpdateApplicationSettingsOutput) { + op := &request.Operation{ + Name: opUpdateApplicationSettings, + HTTPMethod: "PUT", + HTTPPath: "/v1/apps/{application-id}/settings", + } + + if input == nil { + input = &UpdateApplicationSettingsInput{} + } + + output = &UpdateApplicationSettingsOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateApplicationSettings API operation for Amazon Pinpoint. +// +// Used to update the settings for an app. +// +// 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 Pinpoint's +// API operation UpdateApplicationSettings for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateApplicationSettings +func (c *Pinpoint) UpdateApplicationSettings(input *UpdateApplicationSettingsInput) (*UpdateApplicationSettingsOutput, error) { + req, out := c.UpdateApplicationSettingsRequest(input) + return out, req.Send() +} + +// UpdateApplicationSettingsWithContext is the same as UpdateApplicationSettings with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateApplicationSettings 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 *Pinpoint) UpdateApplicationSettingsWithContext(ctx aws.Context, input *UpdateApplicationSettingsInput, opts ...request.Option) (*UpdateApplicationSettingsOutput, error) { + req, out := c.UpdateApplicationSettingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateBaiduChannel = "UpdateBaiduChannel" + +// UpdateBaiduChannelRequest generates a "aws/request.Request" representing the +// client's request for the UpdateBaiduChannel 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 UpdateBaiduChannel for more information on using the UpdateBaiduChannel +// 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 UpdateBaiduChannelRequest method. +// req, resp := client.UpdateBaiduChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateBaiduChannel +func (c *Pinpoint) UpdateBaiduChannelRequest(input *UpdateBaiduChannelInput) (req *request.Request, output *UpdateBaiduChannelOutput) { + op := &request.Operation{ + Name: opUpdateBaiduChannel, + HTTPMethod: "PUT", + HTTPPath: "/v1/apps/{application-id}/channels/baidu", + } + + if input == nil { + input = &UpdateBaiduChannelInput{} + } + + output = &UpdateBaiduChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateBaiduChannel API operation for Amazon Pinpoint. +// +// Update a BAIDU GCM channel +// +// 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 Pinpoint's +// API operation UpdateBaiduChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateBaiduChannel +func (c *Pinpoint) UpdateBaiduChannel(input *UpdateBaiduChannelInput) (*UpdateBaiduChannelOutput, error) { + req, out := c.UpdateBaiduChannelRequest(input) + return out, req.Send() +} + +// UpdateBaiduChannelWithContext is the same as UpdateBaiduChannel with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateBaiduChannel 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 *Pinpoint) UpdateBaiduChannelWithContext(ctx aws.Context, input *UpdateBaiduChannelInput, opts ...request.Option) (*UpdateBaiduChannelOutput, error) { + req, out := c.UpdateBaiduChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateCampaign = "UpdateCampaign" + +// UpdateCampaignRequest generates a "aws/request.Request" representing the +// client's request for the UpdateCampaign 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 UpdateCampaign for more information on using the UpdateCampaign +// 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 UpdateCampaignRequest method. +// req, resp := client.UpdateCampaignRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateCampaign +func (c *Pinpoint) UpdateCampaignRequest(input *UpdateCampaignInput) (req *request.Request, output *UpdateCampaignOutput) { + op := &request.Operation{ + Name: opUpdateCampaign, + HTTPMethod: "PUT", + HTTPPath: "/v1/apps/{application-id}/campaigns/{campaign-id}", + } + + if input == nil { + input = &UpdateCampaignInput{} + } + + output = &UpdateCampaignOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateCampaign API operation for Amazon Pinpoint. +// +// Use to update a campaign. +// +// 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 Pinpoint's +// API operation UpdateCampaign for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateCampaign +func (c *Pinpoint) UpdateCampaign(input *UpdateCampaignInput) (*UpdateCampaignOutput, error) { + req, out := c.UpdateCampaignRequest(input) + return out, req.Send() +} + +// UpdateCampaignWithContext is the same as UpdateCampaign with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateCampaign 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 *Pinpoint) UpdateCampaignWithContext(ctx aws.Context, input *UpdateCampaignInput, opts ...request.Option) (*UpdateCampaignOutput, error) { + req, out := c.UpdateCampaignRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateEmailChannel = "UpdateEmailChannel" + +// UpdateEmailChannelRequest generates a "aws/request.Request" representing the +// client's request for the UpdateEmailChannel 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 UpdateEmailChannel for more information on using the UpdateEmailChannel +// 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 UpdateEmailChannelRequest method. +// req, resp := client.UpdateEmailChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateEmailChannel +func (c *Pinpoint) UpdateEmailChannelRequest(input *UpdateEmailChannelInput) (req *request.Request, output *UpdateEmailChannelOutput) { + op := &request.Operation{ + Name: opUpdateEmailChannel, + HTTPMethod: "PUT", + HTTPPath: "/v1/apps/{application-id}/channels/email", + } + + if input == nil { + input = &UpdateEmailChannelInput{} + } + + output = &UpdateEmailChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateEmailChannel API operation for Amazon Pinpoint. +// +// Update an email channel. +// +// 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 Pinpoint's +// API operation UpdateEmailChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateEmailChannel +func (c *Pinpoint) UpdateEmailChannel(input *UpdateEmailChannelInput) (*UpdateEmailChannelOutput, error) { + req, out := c.UpdateEmailChannelRequest(input) + return out, req.Send() +} + +// UpdateEmailChannelWithContext is the same as UpdateEmailChannel with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateEmailChannel 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 *Pinpoint) UpdateEmailChannelWithContext(ctx aws.Context, input *UpdateEmailChannelInput, opts ...request.Option) (*UpdateEmailChannelOutput, error) { + req, out := c.UpdateEmailChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateEndpoint = "UpdateEndpoint" + +// UpdateEndpointRequest generates a "aws/request.Request" representing the +// client's request for the UpdateEndpoint 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 UpdateEndpoint for more information on using the UpdateEndpoint +// 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 UpdateEndpointRequest method. +// req, resp := client.UpdateEndpointRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateEndpoint +func (c *Pinpoint) UpdateEndpointRequest(input *UpdateEndpointInput) (req *request.Request, output *UpdateEndpointOutput) { + op := &request.Operation{ + Name: opUpdateEndpoint, + HTTPMethod: "PUT", + HTTPPath: "/v1/apps/{application-id}/endpoints/{endpoint-id}", + } + + if input == nil { + input = &UpdateEndpointInput{} + } + + output = &UpdateEndpointOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateEndpoint API operation for Amazon Pinpoint. +// +// Creates or updates an endpoint. +// +// 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 Pinpoint's +// API operation UpdateEndpoint for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateEndpoint +func (c *Pinpoint) UpdateEndpoint(input *UpdateEndpointInput) (*UpdateEndpointOutput, error) { + req, out := c.UpdateEndpointRequest(input) + return out, req.Send() +} + +// UpdateEndpointWithContext is the same as UpdateEndpoint with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateEndpoint 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 *Pinpoint) UpdateEndpointWithContext(ctx aws.Context, input *UpdateEndpointInput, opts ...request.Option) (*UpdateEndpointOutput, error) { + req, out := c.UpdateEndpointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateEndpointsBatch = "UpdateEndpointsBatch" + +// UpdateEndpointsBatchRequest generates a "aws/request.Request" representing the +// client's request for the UpdateEndpointsBatch 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 UpdateEndpointsBatch for more information on using the UpdateEndpointsBatch +// 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 UpdateEndpointsBatchRequest method. +// req, resp := client.UpdateEndpointsBatchRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateEndpointsBatch +func (c *Pinpoint) UpdateEndpointsBatchRequest(input *UpdateEndpointsBatchInput) (req *request.Request, output *UpdateEndpointsBatchOutput) { + op := &request.Operation{ + Name: opUpdateEndpointsBatch, + HTTPMethod: "PUT", + HTTPPath: "/v1/apps/{application-id}/endpoints", + } + + if input == nil { + input = &UpdateEndpointsBatchInput{} + } + + output = &UpdateEndpointsBatchOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateEndpointsBatch API operation for Amazon Pinpoint. +// +// Use to update a batch of endpoints. +// +// 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 Pinpoint's +// API operation UpdateEndpointsBatch for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateEndpointsBatch +func (c *Pinpoint) UpdateEndpointsBatch(input *UpdateEndpointsBatchInput) (*UpdateEndpointsBatchOutput, error) { + req, out := c.UpdateEndpointsBatchRequest(input) + return out, req.Send() +} + +// UpdateEndpointsBatchWithContext is the same as UpdateEndpointsBatch with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateEndpointsBatch 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 *Pinpoint) UpdateEndpointsBatchWithContext(ctx aws.Context, input *UpdateEndpointsBatchInput, opts ...request.Option) (*UpdateEndpointsBatchOutput, error) { + req, out := c.UpdateEndpointsBatchRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateGcmChannel = "UpdateGcmChannel" + +// UpdateGcmChannelRequest generates a "aws/request.Request" representing the +// client's request for the UpdateGcmChannel 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 UpdateGcmChannel for more information on using the UpdateGcmChannel +// 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 UpdateGcmChannelRequest method. +// req, resp := client.UpdateGcmChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateGcmChannel +func (c *Pinpoint) UpdateGcmChannelRequest(input *UpdateGcmChannelInput) (req *request.Request, output *UpdateGcmChannelOutput) { + op := &request.Operation{ + Name: opUpdateGcmChannel, + HTTPMethod: "PUT", + HTTPPath: "/v1/apps/{application-id}/channels/gcm", + } + + if input == nil { + input = &UpdateGcmChannelInput{} + } + + output = &UpdateGcmChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateGcmChannel API operation for Amazon Pinpoint. +// +// Use to update the GCM channel for an app. +// +// 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 Pinpoint's +// API operation UpdateGcmChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateGcmChannel +func (c *Pinpoint) UpdateGcmChannel(input *UpdateGcmChannelInput) (*UpdateGcmChannelOutput, error) { + req, out := c.UpdateGcmChannelRequest(input) + return out, req.Send() +} + +// UpdateGcmChannelWithContext is the same as UpdateGcmChannel with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateGcmChannel 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 *Pinpoint) UpdateGcmChannelWithContext(ctx aws.Context, input *UpdateGcmChannelInput, opts ...request.Option) (*UpdateGcmChannelOutput, error) { + req, out := c.UpdateGcmChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateSegment = "UpdateSegment" + +// UpdateSegmentRequest generates a "aws/request.Request" representing the +// client's request for the UpdateSegment 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 UpdateSegment for more information on using the UpdateSegment +// 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 UpdateSegmentRequest method. +// req, resp := client.UpdateSegmentRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateSegment +func (c *Pinpoint) UpdateSegmentRequest(input *UpdateSegmentInput) (req *request.Request, output *UpdateSegmentOutput) { + op := &request.Operation{ + Name: opUpdateSegment, + HTTPMethod: "PUT", + HTTPPath: "/v1/apps/{application-id}/segments/{segment-id}", + } + + if input == nil { + input = &UpdateSegmentInput{} + } + + output = &UpdateSegmentOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateSegment API operation for Amazon Pinpoint. +// +// Used to update a segment. +// +// 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 Pinpoint's +// API operation UpdateSegment for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateSegment +func (c *Pinpoint) UpdateSegment(input *UpdateSegmentInput) (*UpdateSegmentOutput, error) { + req, out := c.UpdateSegmentRequest(input) + return out, req.Send() +} + +// UpdateSegmentWithContext is the same as UpdateSegment with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateSegment 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 *Pinpoint) UpdateSegmentWithContext(ctx aws.Context, input *UpdateSegmentInput, opts ...request.Option) (*UpdateSegmentOutput, error) { + req, out := c.UpdateSegmentRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateSmsChannel = "UpdateSmsChannel" + +// UpdateSmsChannelRequest generates a "aws/request.Request" representing the +// client's request for the UpdateSmsChannel 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 UpdateSmsChannel for more information on using the UpdateSmsChannel +// 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 UpdateSmsChannelRequest method. +// req, resp := client.UpdateSmsChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateSmsChannel +func (c *Pinpoint) UpdateSmsChannelRequest(input *UpdateSmsChannelInput) (req *request.Request, output *UpdateSmsChannelOutput) { + op := &request.Operation{ + Name: opUpdateSmsChannel, + HTTPMethod: "PUT", + HTTPPath: "/v1/apps/{application-id}/channels/sms", + } + + if input == nil { + input = &UpdateSmsChannelInput{} + } + + output = &UpdateSmsChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateSmsChannel API operation for Amazon Pinpoint. +// +// Update an SMS channel. +// +// 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 Pinpoint's +// API operation UpdateSmsChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateSmsChannel +func (c *Pinpoint) UpdateSmsChannel(input *UpdateSmsChannelInput) (*UpdateSmsChannelOutput, error) { + req, out := c.UpdateSmsChannelRequest(input) + return out, req.Send() +} + +// UpdateSmsChannelWithContext is the same as UpdateSmsChannel with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateSmsChannel 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 *Pinpoint) UpdateSmsChannelWithContext(ctx aws.Context, input *UpdateSmsChannelInput, opts ...request.Option) (*UpdateSmsChannelOutput, error) { + req, out := c.UpdateSmsChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateVoiceChannel = "UpdateVoiceChannel" + +// UpdateVoiceChannelRequest generates a "aws/request.Request" representing the +// client's request for the UpdateVoiceChannel 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 UpdateVoiceChannel for more information on using the UpdateVoiceChannel +// 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 UpdateVoiceChannelRequest method. +// req, resp := client.UpdateVoiceChannelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateVoiceChannel +func (c *Pinpoint) UpdateVoiceChannelRequest(input *UpdateVoiceChannelInput) (req *request.Request, output *UpdateVoiceChannelOutput) { + op := &request.Operation{ + Name: opUpdateVoiceChannel, + HTTPMethod: "PUT", + HTTPPath: "/v1/apps/{application-id}/channels/voice", + } + + if input == nil { + input = &UpdateVoiceChannelInput{} + } + + output = &UpdateVoiceChannelOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateVoiceChannel API operation for Amazon Pinpoint. +// +// Update an Voice channel +// +// 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 Pinpoint's +// API operation UpdateVoiceChannel for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBadRequestException "BadRequestException" +// Simple message object. +// +// * ErrCodeInternalServerErrorException "InternalServerErrorException" +// Simple message object. +// +// * ErrCodeForbiddenException "ForbiddenException" +// Simple message object. +// +// * ErrCodeNotFoundException "NotFoundException" +// Simple message object. +// +// * ErrCodeMethodNotAllowedException "MethodNotAllowedException" +// Simple message object. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// Simple message object. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/UpdateVoiceChannel +func (c *Pinpoint) UpdateVoiceChannel(input *UpdateVoiceChannelInput) (*UpdateVoiceChannelOutput, error) { + req, out := c.UpdateVoiceChannelRequest(input) + return out, req.Send() +} + +// UpdateVoiceChannelWithContext is the same as UpdateVoiceChannel with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateVoiceChannel 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 *Pinpoint) UpdateVoiceChannelWithContext(ctx aws.Context, input *UpdateVoiceChannelInput, opts ...request.Option) (*UpdateVoiceChannelOutput, error) { + req, out := c.UpdateVoiceChannelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// Amazon Device Messaging channel definition. +type ADMChannelRequest struct { + _ struct{} `type:"structure"` + + // The Client ID that you obtained from the Amazon App Distribution Portal. + ClientId *string `type:"string"` + + // The Client Secret that you obtained from the Amazon App Distribution Portal. + ClientSecret *string `type:"string"` + + // Indicates whether or not the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` +} + +// String returns the string representation +func (s ADMChannelRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ADMChannelRequest) GoString() string { + return s.String() +} + +// SetClientId sets the ClientId field's value. +func (s *ADMChannelRequest) SetClientId(v string) *ADMChannelRequest { + s.ClientId = &v + return s +} + +// SetClientSecret sets the ClientSecret field's value. +func (s *ADMChannelRequest) SetClientSecret(v string) *ADMChannelRequest { + s.ClientSecret = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *ADMChannelRequest) SetEnabled(v bool) *ADMChannelRequest { + s.Enabled = &v + return s +} + +// Amazon Device Messaging channel definition. +type ADMChannelResponse struct { + _ struct{} `type:"structure"` + + // The ID of the application to which the channel applies. + ApplicationId *string `type:"string"` + + // The date and time when this channel was created. + CreationDate *string `type:"string"` + + // Indicates whether or not the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // Not used. Retained for backwards compatibility. + HasCredential *bool `type:"boolean"` + + // (Deprecated) An identifier for the channel. Retained for backwards compatibility. + Id *string `type:"string"` + + // Indicates whether or not the channel is archived. + IsArchived *bool `type:"boolean"` + + // The user who last updated this channel. + LastModifiedBy *string `type:"string"` + + // The date and time when this channel was last modified. + LastModifiedDate *string `type:"string"` + + // The platform type. For this channel, the value is always "ADM." + Platform *string `type:"string"` + + // The channel version. + Version *int64 `type:"integer"` +} + +// String returns the string representation +func (s ADMChannelResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ADMChannelResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *ADMChannelResponse) SetApplicationId(v string) *ADMChannelResponse { + s.ApplicationId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *ADMChannelResponse) SetCreationDate(v string) *ADMChannelResponse { + s.CreationDate = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *ADMChannelResponse) SetEnabled(v bool) *ADMChannelResponse { + s.Enabled = &v + return s +} + +// SetHasCredential sets the HasCredential field's value. +func (s *ADMChannelResponse) SetHasCredential(v bool) *ADMChannelResponse { + s.HasCredential = &v + return s +} + +// SetId sets the Id field's value. +func (s *ADMChannelResponse) SetId(v string) *ADMChannelResponse { + s.Id = &v + return s +} + +// SetIsArchived sets the IsArchived field's value. +func (s *ADMChannelResponse) SetIsArchived(v bool) *ADMChannelResponse { + s.IsArchived = &v + return s +} + +// SetLastModifiedBy sets the LastModifiedBy field's value. +func (s *ADMChannelResponse) SetLastModifiedBy(v string) *ADMChannelResponse { + s.LastModifiedBy = &v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *ADMChannelResponse) SetLastModifiedDate(v string) *ADMChannelResponse { + s.LastModifiedDate = &v + return s +} + +// SetPlatform sets the Platform field's value. +func (s *ADMChannelResponse) SetPlatform(v string) *ADMChannelResponse { + s.Platform = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *ADMChannelResponse) SetVersion(v int64) *ADMChannelResponse { + s.Version = &v + return s +} + +// ADM Message. +type ADMMessage struct { + _ struct{} `type:"structure"` + + // The action that occurs if the user taps a push notification delivered by + // the campaign: OPEN_APP - Your app launches, or it becomes the foreground + // app if it has been sent to the background. This is the default action. DEEP_LINK + // - Uses deep linking features in iOS and Android to open your app and display + // a designated user interface within the app. URL - The default mobile browser + // on the user's device launches and opens a web page at the URL you specify. + // Possible values include: OPEN_APP | DEEP_LINK | URL + Action *string `type:"string" enum:"Action"` + + // The message body of the notification. + Body *string `type:"string"` + + // Optional. Arbitrary string used to indicate multiple messages are logically + // the same and that ADM is allowed to drop previously enqueued messages in + // favor of this one. + ConsolidationKey *string `type:"string"` + + // The data payload used for a silent push. This payload is added to the notifications' + // data.pinpoint.jsonBody' object + Data map[string]*string `type:"map"` + + // Optional. Number of seconds ADM should retain the message if the device is + // offline + ExpiresAfter *string `type:"string"` + + // The icon image name of the asset saved in your application. + IconReference *string `type:"string"` + + // The URL that points to an image used as the large icon to the notification + // content view. + ImageIconUrl *string `type:"string"` + + // The URL that points to an image used in the push notification. + ImageUrl *string `type:"string"` + + // Optional. Base-64-encoded MD5 checksum of the data parameter. Used to verify + // data integrity + MD5 *string `type:"string"` + + // The Raw JSON formatted string to be used as the payload. This value overrides + // the message. + RawContent *string `type:"string"` + + // Indicates if the message should display on the users device. Silent pushes + // can be used for Remote Configuration and Phone Home use cases. + SilentPush *bool `type:"boolean"` + + // The URL that points to an image used as the small icon for the notification + // which will be used to represent the notification in the status bar and content + // view + SmallImageIconUrl *string `type:"string"` + + // Indicates a sound to play when the device receives the notification. Supports + // default, or the filename of a sound resource bundled in the app. Android + // sound files must reside in /res/raw/ + Sound *string `type:"string"` + + // Default message substitutions. Can be overridden by individual address substitutions. + Substitutions map[string][]*string `type:"map"` + + // The message title that displays above the message on the user's device. + Title *string `type:"string"` + + // The URL to open in the user's mobile browser. Used if the value for Action + // is URL. + Url *string `type:"string"` +} + +// String returns the string representation +func (s ADMMessage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ADMMessage) GoString() string { + return s.String() +} + +// SetAction sets the Action field's value. +func (s *ADMMessage) SetAction(v string) *ADMMessage { + s.Action = &v + return s +} + +// SetBody sets the Body field's value. +func (s *ADMMessage) SetBody(v string) *ADMMessage { + s.Body = &v + return s +} + +// SetConsolidationKey sets the ConsolidationKey field's value. +func (s *ADMMessage) SetConsolidationKey(v string) *ADMMessage { + s.ConsolidationKey = &v + return s +} + +// SetData sets the Data field's value. +func (s *ADMMessage) SetData(v map[string]*string) *ADMMessage { + s.Data = v + return s +} + +// SetExpiresAfter sets the ExpiresAfter field's value. +func (s *ADMMessage) SetExpiresAfter(v string) *ADMMessage { + s.ExpiresAfter = &v + return s +} + +// SetIconReference sets the IconReference field's value. +func (s *ADMMessage) SetIconReference(v string) *ADMMessage { + s.IconReference = &v + return s +} + +// SetImageIconUrl sets the ImageIconUrl field's value. +func (s *ADMMessage) SetImageIconUrl(v string) *ADMMessage { + s.ImageIconUrl = &v + return s +} + +// SetImageUrl sets the ImageUrl field's value. +func (s *ADMMessage) SetImageUrl(v string) *ADMMessage { + s.ImageUrl = &v + return s +} + +// SetMD5 sets the MD5 field's value. +func (s *ADMMessage) SetMD5(v string) *ADMMessage { + s.MD5 = &v + return s +} + +// SetRawContent sets the RawContent field's value. +func (s *ADMMessage) SetRawContent(v string) *ADMMessage { + s.RawContent = &v + return s +} + +// SetSilentPush sets the SilentPush field's value. +func (s *ADMMessage) SetSilentPush(v bool) *ADMMessage { + s.SilentPush = &v + return s +} + +// SetSmallImageIconUrl sets the SmallImageIconUrl field's value. +func (s *ADMMessage) SetSmallImageIconUrl(v string) *ADMMessage { + s.SmallImageIconUrl = &v + return s +} + +// SetSound sets the Sound field's value. +func (s *ADMMessage) SetSound(v string) *ADMMessage { + s.Sound = &v + return s +} + +// SetSubstitutions sets the Substitutions field's value. +func (s *ADMMessage) SetSubstitutions(v map[string][]*string) *ADMMessage { + s.Substitutions = v + return s +} + +// SetTitle sets the Title field's value. +func (s *ADMMessage) SetTitle(v string) *ADMMessage { + s.Title = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *ADMMessage) SetUrl(v string) *ADMMessage { + s.Url = &v + return s +} + +// Apple Push Notification Service channel definition. +type APNSChannelRequest struct { + _ struct{} `type:"structure"` + + // The bundle id used for APNs Tokens. + BundleId *string `type:"string"` + + // The distribution certificate from Apple. + Certificate *string `type:"string"` + + // The default authentication method used for APNs. + DefaultAuthenticationMethod *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // The certificate private key. + PrivateKey *string `type:"string"` + + // The team id used for APNs Tokens. + TeamId *string `type:"string"` + + // The token key used for APNs Tokens. + TokenKey *string `type:"string"` + + // The token key used for APNs Tokens. + TokenKeyId *string `type:"string"` +} + +// String returns the string representation +func (s APNSChannelRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s APNSChannelRequest) GoString() string { + return s.String() +} + +// SetBundleId sets the BundleId field's value. +func (s *APNSChannelRequest) SetBundleId(v string) *APNSChannelRequest { + s.BundleId = &v + return s +} + +// SetCertificate sets the Certificate field's value. +func (s *APNSChannelRequest) SetCertificate(v string) *APNSChannelRequest { + s.Certificate = &v + return s +} + +// SetDefaultAuthenticationMethod sets the DefaultAuthenticationMethod field's value. +func (s *APNSChannelRequest) SetDefaultAuthenticationMethod(v string) *APNSChannelRequest { + s.DefaultAuthenticationMethod = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *APNSChannelRequest) SetEnabled(v bool) *APNSChannelRequest { + s.Enabled = &v + return s +} + +// SetPrivateKey sets the PrivateKey field's value. +func (s *APNSChannelRequest) SetPrivateKey(v string) *APNSChannelRequest { + s.PrivateKey = &v + return s +} + +// SetTeamId sets the TeamId field's value. +func (s *APNSChannelRequest) SetTeamId(v string) *APNSChannelRequest { + s.TeamId = &v + return s +} + +// SetTokenKey sets the TokenKey field's value. +func (s *APNSChannelRequest) SetTokenKey(v string) *APNSChannelRequest { + s.TokenKey = &v + return s +} + +// SetTokenKeyId sets the TokenKeyId field's value. +func (s *APNSChannelRequest) SetTokenKeyId(v string) *APNSChannelRequest { + s.TokenKeyId = &v + return s +} + +// Apple Distribution Push Notification Service channel definition. +type APNSChannelResponse struct { + _ struct{} `type:"structure"` + + // The ID of the application that the channel applies to. + ApplicationId *string `type:"string"` + + // The date and time when this channel was created. + CreationDate *string `type:"string"` + + // The default authentication method used for APNs. + DefaultAuthenticationMethod *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // Not used. Retained for backwards compatibility. + HasCredential *bool `type:"boolean"` + + // Indicates whether the channel is configured with a key for APNs token authentication. + // Provide a token key by setting the TokenKey attribute. + HasTokenKey *bool `type:"boolean"` + + // (Deprecated) An identifier for the channel. Retained for backwards compatibility. + Id *string `type:"string"` + + // Indicates whether or not the channel is archived. + IsArchived *bool `type:"boolean"` + + // The user who last updated this channel. + LastModifiedBy *string `type:"string"` + + // The date and time when this channel was last modified. + LastModifiedDate *string `type:"string"` + + // The platform type. For this channel, the value is always "ADM." + Platform *string `type:"string"` + + // The channel version. + Version *int64 `type:"integer"` +} + +// String returns the string representation +func (s APNSChannelResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s APNSChannelResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *APNSChannelResponse) SetApplicationId(v string) *APNSChannelResponse { + s.ApplicationId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *APNSChannelResponse) SetCreationDate(v string) *APNSChannelResponse { + s.CreationDate = &v + return s +} + +// SetDefaultAuthenticationMethod sets the DefaultAuthenticationMethod field's value. +func (s *APNSChannelResponse) SetDefaultAuthenticationMethod(v string) *APNSChannelResponse { + s.DefaultAuthenticationMethod = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *APNSChannelResponse) SetEnabled(v bool) *APNSChannelResponse { + s.Enabled = &v + return s +} + +// SetHasCredential sets the HasCredential field's value. +func (s *APNSChannelResponse) SetHasCredential(v bool) *APNSChannelResponse { + s.HasCredential = &v + return s +} + +// SetHasTokenKey sets the HasTokenKey field's value. +func (s *APNSChannelResponse) SetHasTokenKey(v bool) *APNSChannelResponse { + s.HasTokenKey = &v + return s +} + +// SetId sets the Id field's value. +func (s *APNSChannelResponse) SetId(v string) *APNSChannelResponse { + s.Id = &v + return s +} + +// SetIsArchived sets the IsArchived field's value. +func (s *APNSChannelResponse) SetIsArchived(v bool) *APNSChannelResponse { + s.IsArchived = &v + return s +} + +// SetLastModifiedBy sets the LastModifiedBy field's value. +func (s *APNSChannelResponse) SetLastModifiedBy(v string) *APNSChannelResponse { + s.LastModifiedBy = &v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *APNSChannelResponse) SetLastModifiedDate(v string) *APNSChannelResponse { + s.LastModifiedDate = &v + return s +} + +// SetPlatform sets the Platform field's value. +func (s *APNSChannelResponse) SetPlatform(v string) *APNSChannelResponse { + s.Platform = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *APNSChannelResponse) SetVersion(v int64) *APNSChannelResponse { + s.Version = &v + return s +} + +// APNS Message. +type APNSMessage struct { + _ struct{} `type:"structure"` + + // The action that occurs if the user taps a push notification delivered by + // the campaign: OPEN_APP - Your app launches, or it becomes the foreground + // app if it has been sent to the background. This is the default action. DEEP_LINK + // - Uses deep linking features in iOS and Android to open your app and display + // a designated user interface within the app. URL - The default mobile browser + // on the user's device launches and opens a web page at the URL you specify. + // Possible values include: OPEN_APP | DEEP_LINK | URL + Action *string `type:"string" enum:"Action"` + + // Include this key when you want the system to modify the badge of your app + // icon. If this key is not included in the dictionary, the badge is not changed. + // To remove the badge, set the value of this key to 0. + Badge *int64 `type:"integer"` + + // The message body of the notification. + Body *string `type:"string"` + + // Provide this key with a string value that represents the notification's type. + // This value corresponds to the value in the identifier property of one of + // your app's registered categories. + Category *string `type:"string"` + + // An ID that, if assigned to multiple messages, causes APNs to coalesce the + // messages into a single push notification instead of delivering each message + // individually. The value must not exceed 64 bytes. Amazon Pinpoint uses this + // value to set the apns-collapse-id request header when it sends the message + // to APNs. + CollapseId *string `type:"string"` + + // The data payload used for a silent push. This payload is added to the notifications' + // data.pinpoint.jsonBody' object + Data map[string]*string `type:"map"` + + // A URL that refers to the location of an image or video that you want to display + // in the push notification. + MediaUrl *string `type:"string"` + + // The preferred authentication method, either "CERTIFICATE" or "TOKEN" + PreferredAuthenticationMethod *string `type:"string"` + + // The message priority. Amazon Pinpoint uses this value to set the apns-priority + // request header when it sends the message to APNs. Accepts the following values:"5" + // - Low priority. Messages might be delayed, delivered in groups, and throttled."10" + // - High priority. Messages are sent immediately. High priority messages must + // cause an alert, sound, or badge on the receiving device.The default value + // is "10".The equivalent values for FCM or GCM messages are "normal" and "high". + // Amazon Pinpoint accepts these values for APNs messages and converts them.For + // more information about the apns-priority parameter, see Communicating with + // APNs in the APNs Local and Remote Notification Programming Guide. + Priority *string `type:"string"` + + // The Raw JSON formatted string to be used as the payload. This value overrides + // the message. + RawContent *string `type:"string"` + + // Indicates if the message should display on the users device. Silent pushes + // can be used for Remote Configuration and Phone Home use cases. + SilentPush *bool `type:"boolean"` + + // Include this key when you want the system to play a sound. The value of this + // key is the name of a sound file in your app's main bundle or in the Library/Sounds + // folder of your app's data container. If the sound file cannot be found, or + // if you specify defaultfor the value, the system plays the default alert sound. + Sound *string `type:"string"` + + // Default message substitutions. Can be overridden by individual address substitutions. + Substitutions map[string][]*string `type:"map"` + + // Provide this key with a string value that represents the app-specific identifier + // for grouping notifications. If you provide a Notification Content app extension, + // you can use this value to group your notifications together. + ThreadId *string `type:"string"` + + // The length of time (in seconds) that APNs stores and attempts to deliver + // the message. If the value is 0, APNs does not store the message or attempt + // to deliver it more than once. Amazon Pinpoint uses this value to set the + // apns-expiration request header when it sends the message to APNs. + TimeToLive *int64 `type:"integer"` + + // The message title that displays above the message on the user's device. + Title *string `type:"string"` + + // The URL to open in the user's mobile browser. Used if the value for Action + // is URL. + Url *string `type:"string"` +} + +// String returns the string representation +func (s APNSMessage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s APNSMessage) GoString() string { + return s.String() +} + +// SetAction sets the Action field's value. +func (s *APNSMessage) SetAction(v string) *APNSMessage { + s.Action = &v + return s +} + +// SetBadge sets the Badge field's value. +func (s *APNSMessage) SetBadge(v int64) *APNSMessage { + s.Badge = &v + return s +} + +// SetBody sets the Body field's value. +func (s *APNSMessage) SetBody(v string) *APNSMessage { + s.Body = &v + return s +} + +// SetCategory sets the Category field's value. +func (s *APNSMessage) SetCategory(v string) *APNSMessage { + s.Category = &v + return s +} + +// SetCollapseId sets the CollapseId field's value. +func (s *APNSMessage) SetCollapseId(v string) *APNSMessage { + s.CollapseId = &v + return s +} + +// SetData sets the Data field's value. +func (s *APNSMessage) SetData(v map[string]*string) *APNSMessage { + s.Data = v + return s +} + +// SetMediaUrl sets the MediaUrl field's value. +func (s *APNSMessage) SetMediaUrl(v string) *APNSMessage { + s.MediaUrl = &v + return s +} + +// SetPreferredAuthenticationMethod sets the PreferredAuthenticationMethod field's value. +func (s *APNSMessage) SetPreferredAuthenticationMethod(v string) *APNSMessage { + s.PreferredAuthenticationMethod = &v + return s +} + +// SetPriority sets the Priority field's value. +func (s *APNSMessage) SetPriority(v string) *APNSMessage { + s.Priority = &v + return s +} + +// SetRawContent sets the RawContent field's value. +func (s *APNSMessage) SetRawContent(v string) *APNSMessage { + s.RawContent = &v + return s +} + +// SetSilentPush sets the SilentPush field's value. +func (s *APNSMessage) SetSilentPush(v bool) *APNSMessage { + s.SilentPush = &v + return s +} + +// SetSound sets the Sound field's value. +func (s *APNSMessage) SetSound(v string) *APNSMessage { + s.Sound = &v + return s +} + +// SetSubstitutions sets the Substitutions field's value. +func (s *APNSMessage) SetSubstitutions(v map[string][]*string) *APNSMessage { + s.Substitutions = v + return s +} + +// SetThreadId sets the ThreadId field's value. +func (s *APNSMessage) SetThreadId(v string) *APNSMessage { + s.ThreadId = &v + return s +} + +// SetTimeToLive sets the TimeToLive field's value. +func (s *APNSMessage) SetTimeToLive(v int64) *APNSMessage { + s.TimeToLive = &v + return s +} + +// SetTitle sets the Title field's value. +func (s *APNSMessage) SetTitle(v string) *APNSMessage { + s.Title = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *APNSMessage) SetUrl(v string) *APNSMessage { + s.Url = &v + return s +} + +// Apple Development Push Notification Service channel definition. +type APNSSandboxChannelRequest struct { + _ struct{} `type:"structure"` + + // The bundle id used for APNs Tokens. + BundleId *string `type:"string"` + + // The distribution certificate from Apple. + Certificate *string `type:"string"` + + // The default authentication method used for APNs. + DefaultAuthenticationMethod *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // The certificate private key. + PrivateKey *string `type:"string"` + + // The team id used for APNs Tokens. + TeamId *string `type:"string"` + + // The token key used for APNs Tokens. + TokenKey *string `type:"string"` + + // The token key used for APNs Tokens. + TokenKeyId *string `type:"string"` +} + +// String returns the string representation +func (s APNSSandboxChannelRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s APNSSandboxChannelRequest) GoString() string { + return s.String() +} + +// SetBundleId sets the BundleId field's value. +func (s *APNSSandboxChannelRequest) SetBundleId(v string) *APNSSandboxChannelRequest { + s.BundleId = &v + return s +} + +// SetCertificate sets the Certificate field's value. +func (s *APNSSandboxChannelRequest) SetCertificate(v string) *APNSSandboxChannelRequest { + s.Certificate = &v + return s +} + +// SetDefaultAuthenticationMethod sets the DefaultAuthenticationMethod field's value. +func (s *APNSSandboxChannelRequest) SetDefaultAuthenticationMethod(v string) *APNSSandboxChannelRequest { + s.DefaultAuthenticationMethod = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *APNSSandboxChannelRequest) SetEnabled(v bool) *APNSSandboxChannelRequest { + s.Enabled = &v + return s +} + +// SetPrivateKey sets the PrivateKey field's value. +func (s *APNSSandboxChannelRequest) SetPrivateKey(v string) *APNSSandboxChannelRequest { + s.PrivateKey = &v + return s +} + +// SetTeamId sets the TeamId field's value. +func (s *APNSSandboxChannelRequest) SetTeamId(v string) *APNSSandboxChannelRequest { + s.TeamId = &v + return s +} + +// SetTokenKey sets the TokenKey field's value. +func (s *APNSSandboxChannelRequest) SetTokenKey(v string) *APNSSandboxChannelRequest { + s.TokenKey = &v + return s +} + +// SetTokenKeyId sets the TokenKeyId field's value. +func (s *APNSSandboxChannelRequest) SetTokenKeyId(v string) *APNSSandboxChannelRequest { + s.TokenKeyId = &v + return s +} + +// Apple Development Push Notification Service channel definition. +type APNSSandboxChannelResponse struct { + _ struct{} `type:"structure"` + + // The ID of the application to which the channel applies. + ApplicationId *string `type:"string"` + + // When was this segment created + CreationDate *string `type:"string"` + + // The default authentication method used for APNs. + DefaultAuthenticationMethod *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // Not used. Retained for backwards compatibility. + HasCredential *bool `type:"boolean"` + + // Indicates whether the channel is configured with a key for APNs token authentication. + // Provide a token key by setting the TokenKey attribute. + HasTokenKey *bool `type:"boolean"` + + // Channel ID. Not used, only for backwards compatibility. + Id *string `type:"string"` + + // Is this channel archived + IsArchived *bool `type:"boolean"` + + // Who last updated this entry + LastModifiedBy *string `type:"string"` + + // Last date this was updated + LastModifiedDate *string `type:"string"` + + // The platform type. Will be APNS_SANDBOX. + Platform *string `type:"string"` + + // Version of channel + Version *int64 `type:"integer"` +} + +// String returns the string representation +func (s APNSSandboxChannelResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s APNSSandboxChannelResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *APNSSandboxChannelResponse) SetApplicationId(v string) *APNSSandboxChannelResponse { + s.ApplicationId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *APNSSandboxChannelResponse) SetCreationDate(v string) *APNSSandboxChannelResponse { + s.CreationDate = &v + return s +} + +// SetDefaultAuthenticationMethod sets the DefaultAuthenticationMethod field's value. +func (s *APNSSandboxChannelResponse) SetDefaultAuthenticationMethod(v string) *APNSSandboxChannelResponse { + s.DefaultAuthenticationMethod = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *APNSSandboxChannelResponse) SetEnabled(v bool) *APNSSandboxChannelResponse { + s.Enabled = &v + return s +} + +// SetHasCredential sets the HasCredential field's value. +func (s *APNSSandboxChannelResponse) SetHasCredential(v bool) *APNSSandboxChannelResponse { + s.HasCredential = &v + return s +} + +// SetHasTokenKey sets the HasTokenKey field's value. +func (s *APNSSandboxChannelResponse) SetHasTokenKey(v bool) *APNSSandboxChannelResponse { + s.HasTokenKey = &v + return s +} + +// SetId sets the Id field's value. +func (s *APNSSandboxChannelResponse) SetId(v string) *APNSSandboxChannelResponse { + s.Id = &v + return s +} + +// SetIsArchived sets the IsArchived field's value. +func (s *APNSSandboxChannelResponse) SetIsArchived(v bool) *APNSSandboxChannelResponse { + s.IsArchived = &v + return s +} + +// SetLastModifiedBy sets the LastModifiedBy field's value. +func (s *APNSSandboxChannelResponse) SetLastModifiedBy(v string) *APNSSandboxChannelResponse { + s.LastModifiedBy = &v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *APNSSandboxChannelResponse) SetLastModifiedDate(v string) *APNSSandboxChannelResponse { + s.LastModifiedDate = &v + return s +} + +// SetPlatform sets the Platform field's value. +func (s *APNSSandboxChannelResponse) SetPlatform(v string) *APNSSandboxChannelResponse { + s.Platform = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *APNSSandboxChannelResponse) SetVersion(v int64) *APNSSandboxChannelResponse { + s.Version = &v + return s +} + +// Apple VoIP Push Notification Service channel definition. +type APNSVoipChannelRequest struct { + _ struct{} `type:"structure"` + + // The bundle id used for APNs Tokens. + BundleId *string `type:"string"` + + // The distribution certificate from Apple. + Certificate *string `type:"string"` + + // The default authentication method used for APNs. + DefaultAuthenticationMethod *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // The certificate private key. + PrivateKey *string `type:"string"` + + // The team id used for APNs Tokens. + TeamId *string `type:"string"` + + // The token key used for APNs Tokens. + TokenKey *string `type:"string"` + + // The token key used for APNs Tokens. + TokenKeyId *string `type:"string"` +} + +// String returns the string representation +func (s APNSVoipChannelRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s APNSVoipChannelRequest) GoString() string { + return s.String() +} + +// SetBundleId sets the BundleId field's value. +func (s *APNSVoipChannelRequest) SetBundleId(v string) *APNSVoipChannelRequest { + s.BundleId = &v + return s +} + +// SetCertificate sets the Certificate field's value. +func (s *APNSVoipChannelRequest) SetCertificate(v string) *APNSVoipChannelRequest { + s.Certificate = &v + return s +} + +// SetDefaultAuthenticationMethod sets the DefaultAuthenticationMethod field's value. +func (s *APNSVoipChannelRequest) SetDefaultAuthenticationMethod(v string) *APNSVoipChannelRequest { + s.DefaultAuthenticationMethod = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *APNSVoipChannelRequest) SetEnabled(v bool) *APNSVoipChannelRequest { + s.Enabled = &v + return s +} + +// SetPrivateKey sets the PrivateKey field's value. +func (s *APNSVoipChannelRequest) SetPrivateKey(v string) *APNSVoipChannelRequest { + s.PrivateKey = &v + return s +} + +// SetTeamId sets the TeamId field's value. +func (s *APNSVoipChannelRequest) SetTeamId(v string) *APNSVoipChannelRequest { + s.TeamId = &v + return s +} + +// SetTokenKey sets the TokenKey field's value. +func (s *APNSVoipChannelRequest) SetTokenKey(v string) *APNSVoipChannelRequest { + s.TokenKey = &v + return s +} + +// SetTokenKeyId sets the TokenKeyId field's value. +func (s *APNSVoipChannelRequest) SetTokenKeyId(v string) *APNSVoipChannelRequest { + s.TokenKeyId = &v + return s +} + +// Apple VoIP Push Notification Service channel definition. +type APNSVoipChannelResponse struct { + _ struct{} `type:"structure"` + + // Application id + ApplicationId *string `type:"string"` + + // When was this segment created + CreationDate *string `type:"string"` + + // The default authentication method used for APNs. + DefaultAuthenticationMethod *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // Not used. Retained for backwards compatibility. + HasCredential *bool `type:"boolean"` + + // If the channel is registered with a token key for authentication. + HasTokenKey *bool `type:"boolean"` + + // Channel ID. Not used, only for backwards compatibility. + Id *string `type:"string"` + + // Is this channel archived + IsArchived *bool `type:"boolean"` + + // Who made the last change + LastModifiedBy *string `type:"string"` + + // Last date this was updated + LastModifiedDate *string `type:"string"` + + // The platform type. Will be APNS. + Platform *string `type:"string"` + + // Version of channel + Version *int64 `type:"integer"` +} + +// String returns the string representation +func (s APNSVoipChannelResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s APNSVoipChannelResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *APNSVoipChannelResponse) SetApplicationId(v string) *APNSVoipChannelResponse { + s.ApplicationId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *APNSVoipChannelResponse) SetCreationDate(v string) *APNSVoipChannelResponse { + s.CreationDate = &v + return s +} + +// SetDefaultAuthenticationMethod sets the DefaultAuthenticationMethod field's value. +func (s *APNSVoipChannelResponse) SetDefaultAuthenticationMethod(v string) *APNSVoipChannelResponse { + s.DefaultAuthenticationMethod = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *APNSVoipChannelResponse) SetEnabled(v bool) *APNSVoipChannelResponse { + s.Enabled = &v + return s +} + +// SetHasCredential sets the HasCredential field's value. +func (s *APNSVoipChannelResponse) SetHasCredential(v bool) *APNSVoipChannelResponse { + s.HasCredential = &v + return s +} + +// SetHasTokenKey sets the HasTokenKey field's value. +func (s *APNSVoipChannelResponse) SetHasTokenKey(v bool) *APNSVoipChannelResponse { + s.HasTokenKey = &v + return s +} + +// SetId sets the Id field's value. +func (s *APNSVoipChannelResponse) SetId(v string) *APNSVoipChannelResponse { + s.Id = &v + return s +} + +// SetIsArchived sets the IsArchived field's value. +func (s *APNSVoipChannelResponse) SetIsArchived(v bool) *APNSVoipChannelResponse { + s.IsArchived = &v + return s +} + +// SetLastModifiedBy sets the LastModifiedBy field's value. +func (s *APNSVoipChannelResponse) SetLastModifiedBy(v string) *APNSVoipChannelResponse { + s.LastModifiedBy = &v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *APNSVoipChannelResponse) SetLastModifiedDate(v string) *APNSVoipChannelResponse { + s.LastModifiedDate = &v + return s +} + +// SetPlatform sets the Platform field's value. +func (s *APNSVoipChannelResponse) SetPlatform(v string) *APNSVoipChannelResponse { + s.Platform = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *APNSVoipChannelResponse) SetVersion(v int64) *APNSVoipChannelResponse { + s.Version = &v + return s +} + +// Apple VoIP Developer Push Notification Service channel definition. +type APNSVoipSandboxChannelRequest struct { + _ struct{} `type:"structure"` + + // The bundle id used for APNs Tokens. + BundleId *string `type:"string"` + + // The distribution certificate from Apple. + Certificate *string `type:"string"` + + // The default authentication method used for APNs. + DefaultAuthenticationMethod *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // The certificate private key. + PrivateKey *string `type:"string"` + + // The team id used for APNs Tokens. + TeamId *string `type:"string"` + + // The token key used for APNs Tokens. + TokenKey *string `type:"string"` + + // The token key used for APNs Tokens. + TokenKeyId *string `type:"string"` +} + +// String returns the string representation +func (s APNSVoipSandboxChannelRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s APNSVoipSandboxChannelRequest) GoString() string { + return s.String() +} + +// SetBundleId sets the BundleId field's value. +func (s *APNSVoipSandboxChannelRequest) SetBundleId(v string) *APNSVoipSandboxChannelRequest { + s.BundleId = &v + return s +} + +// SetCertificate sets the Certificate field's value. +func (s *APNSVoipSandboxChannelRequest) SetCertificate(v string) *APNSVoipSandboxChannelRequest { + s.Certificate = &v + return s +} + +// SetDefaultAuthenticationMethod sets the DefaultAuthenticationMethod field's value. +func (s *APNSVoipSandboxChannelRequest) SetDefaultAuthenticationMethod(v string) *APNSVoipSandboxChannelRequest { + s.DefaultAuthenticationMethod = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *APNSVoipSandboxChannelRequest) SetEnabled(v bool) *APNSVoipSandboxChannelRequest { + s.Enabled = &v + return s +} + +// SetPrivateKey sets the PrivateKey field's value. +func (s *APNSVoipSandboxChannelRequest) SetPrivateKey(v string) *APNSVoipSandboxChannelRequest { + s.PrivateKey = &v + return s +} + +// SetTeamId sets the TeamId field's value. +func (s *APNSVoipSandboxChannelRequest) SetTeamId(v string) *APNSVoipSandboxChannelRequest { + s.TeamId = &v + return s +} + +// SetTokenKey sets the TokenKey field's value. +func (s *APNSVoipSandboxChannelRequest) SetTokenKey(v string) *APNSVoipSandboxChannelRequest { + s.TokenKey = &v + return s +} + +// SetTokenKeyId sets the TokenKeyId field's value. +func (s *APNSVoipSandboxChannelRequest) SetTokenKeyId(v string) *APNSVoipSandboxChannelRequest { + s.TokenKeyId = &v + return s +} + +// Apple VoIP Developer Push Notification Service channel definition. +type APNSVoipSandboxChannelResponse struct { + _ struct{} `type:"structure"` + + // Application id + ApplicationId *string `type:"string"` + + // When was this segment created + CreationDate *string `type:"string"` + + // The default authentication method used for APNs. + DefaultAuthenticationMethod *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // Not used. Retained for backwards compatibility. + HasCredential *bool `type:"boolean"` + + // If the channel is registered with a token key for authentication. + HasTokenKey *bool `type:"boolean"` + + // Channel ID. Not used, only for backwards compatibility. + Id *string `type:"string"` + + // Is this channel archived + IsArchived *bool `type:"boolean"` + + // Who made the last change + LastModifiedBy *string `type:"string"` + + // Last date this was updated + LastModifiedDate *string `type:"string"` + + // The platform type. Will be APNS. + Platform *string `type:"string"` + + // Version of channel + Version *int64 `type:"integer"` +} + +// String returns the string representation +func (s APNSVoipSandboxChannelResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s APNSVoipSandboxChannelResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *APNSVoipSandboxChannelResponse) SetApplicationId(v string) *APNSVoipSandboxChannelResponse { + s.ApplicationId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *APNSVoipSandboxChannelResponse) SetCreationDate(v string) *APNSVoipSandboxChannelResponse { + s.CreationDate = &v + return s +} + +// SetDefaultAuthenticationMethod sets the DefaultAuthenticationMethod field's value. +func (s *APNSVoipSandboxChannelResponse) SetDefaultAuthenticationMethod(v string) *APNSVoipSandboxChannelResponse { + s.DefaultAuthenticationMethod = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *APNSVoipSandboxChannelResponse) SetEnabled(v bool) *APNSVoipSandboxChannelResponse { + s.Enabled = &v + return s +} + +// SetHasCredential sets the HasCredential field's value. +func (s *APNSVoipSandboxChannelResponse) SetHasCredential(v bool) *APNSVoipSandboxChannelResponse { + s.HasCredential = &v + return s +} + +// SetHasTokenKey sets the HasTokenKey field's value. +func (s *APNSVoipSandboxChannelResponse) SetHasTokenKey(v bool) *APNSVoipSandboxChannelResponse { + s.HasTokenKey = &v + return s +} + +// SetId sets the Id field's value. +func (s *APNSVoipSandboxChannelResponse) SetId(v string) *APNSVoipSandboxChannelResponse { + s.Id = &v + return s +} + +// SetIsArchived sets the IsArchived field's value. +func (s *APNSVoipSandboxChannelResponse) SetIsArchived(v bool) *APNSVoipSandboxChannelResponse { + s.IsArchived = &v + return s +} + +// SetLastModifiedBy sets the LastModifiedBy field's value. +func (s *APNSVoipSandboxChannelResponse) SetLastModifiedBy(v string) *APNSVoipSandboxChannelResponse { + s.LastModifiedBy = &v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *APNSVoipSandboxChannelResponse) SetLastModifiedDate(v string) *APNSVoipSandboxChannelResponse { + s.LastModifiedDate = &v + return s +} + +// SetPlatform sets the Platform field's value. +func (s *APNSVoipSandboxChannelResponse) SetPlatform(v string) *APNSVoipSandboxChannelResponse { + s.Platform = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *APNSVoipSandboxChannelResponse) SetVersion(v int64) *APNSVoipSandboxChannelResponse { + s.Version = &v + return s +} + +// Activities for campaign. +type ActivitiesResponse struct { + _ struct{} `type:"structure"` + + // List of campaign activities + Item []*ActivityResponse `type:"list"` + + // The string that you use in a subsequent request to get the next page of results + // in a paginated response. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ActivitiesResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActivitiesResponse) GoString() string { + return s.String() +} + +// SetItem sets the Item field's value. +func (s *ActivitiesResponse) SetItem(v []*ActivityResponse) *ActivitiesResponse { + s.Item = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ActivitiesResponse) SetNextToken(v string) *ActivitiesResponse { + s.NextToken = &v + return s +} + +// Activity definition +type ActivityResponse struct { + _ struct{} `type:"structure"` + + // The ID of the application to which the campaign applies. + ApplicationId *string `type:"string"` + + // The ID of the campaign to which the activity applies. + CampaignId *string `type:"string"` + + // The actual time the activity was marked CANCELLED or COMPLETED. Provided + // in ISO 8601 format. + End *string `type:"string"` + + // The unique activity ID. + Id *string `type:"string"` + + // Indicates whether the activity succeeded.Valid values: SUCCESS, FAIL + Result *string `type:"string"` + + // The scheduled start time for the activity in ISO 8601 format. + ScheduledStart *string `type:"string"` + + // The actual start time of the activity in ISO 8601 format. + Start *string `type:"string"` + + // The state of the activity.Valid values: PENDING, INITIALIZING, RUNNING, PAUSED, + // CANCELLED, COMPLETED + State *string `type:"string"` + + // The total number of endpoints to which the campaign successfully delivered + // messages. + SuccessfulEndpointCount *int64 `type:"integer"` + + // The total number of timezones completed. + TimezonesCompletedCount *int64 `type:"integer"` + + // The total number of unique timezones present in the segment. + TimezonesTotalCount *int64 `type:"integer"` + + // The total number of endpoints to which the campaign attempts to deliver messages. + TotalEndpointCount *int64 `type:"integer"` + + // The ID of a variation of the campaign used for A/B testing. + TreatmentId *string `type:"string"` +} + +// String returns the string representation +func (s ActivityResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ActivityResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *ActivityResponse) SetApplicationId(v string) *ActivityResponse { + s.ApplicationId = &v + return s +} + +// SetCampaignId sets the CampaignId field's value. +func (s *ActivityResponse) SetCampaignId(v string) *ActivityResponse { + s.CampaignId = &v + return s +} + +// SetEnd sets the End field's value. +func (s *ActivityResponse) SetEnd(v string) *ActivityResponse { + s.End = &v + return s +} + +// SetId sets the Id field's value. +func (s *ActivityResponse) SetId(v string) *ActivityResponse { + s.Id = &v + return s +} + +// SetResult sets the Result field's value. +func (s *ActivityResponse) SetResult(v string) *ActivityResponse { + s.Result = &v + return s +} + +// SetScheduledStart sets the ScheduledStart field's value. +func (s *ActivityResponse) SetScheduledStart(v string) *ActivityResponse { + s.ScheduledStart = &v + return s +} + +// SetStart sets the Start field's value. +func (s *ActivityResponse) SetStart(v string) *ActivityResponse { + s.Start = &v + return s +} + +// SetState sets the State field's value. +func (s *ActivityResponse) SetState(v string) *ActivityResponse { + s.State = &v + return s +} + +// SetSuccessfulEndpointCount sets the SuccessfulEndpointCount field's value. +func (s *ActivityResponse) SetSuccessfulEndpointCount(v int64) *ActivityResponse { + s.SuccessfulEndpointCount = &v + return s +} + +// SetTimezonesCompletedCount sets the TimezonesCompletedCount field's value. +func (s *ActivityResponse) SetTimezonesCompletedCount(v int64) *ActivityResponse { + s.TimezonesCompletedCount = &v + return s +} + +// SetTimezonesTotalCount sets the TimezonesTotalCount field's value. +func (s *ActivityResponse) SetTimezonesTotalCount(v int64) *ActivityResponse { + s.TimezonesTotalCount = &v + return s +} + +// SetTotalEndpointCount sets the TotalEndpointCount field's value. +func (s *ActivityResponse) SetTotalEndpointCount(v int64) *ActivityResponse { + s.TotalEndpointCount = &v + return s +} + +// SetTreatmentId sets the TreatmentId field's value. +func (s *ActivityResponse) SetTreatmentId(v string) *ActivityResponse { + s.TreatmentId = &v + return s +} + +// Address configuration. +type AddressConfiguration struct { + _ struct{} `type:"structure"` + + // Body override. If specified will override default body. + BodyOverride *string `type:"string"` + + // The channel type.Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX + // | ADM | SMS | EMAIL | BAIDU + ChannelType *string `type:"string" enum:"ChannelType"` + + // A map of custom attributes to attributes to be attached to the message for + // this address. This payload is added to the push notification's 'data.pinpoint' + // object or added to the email/sms delivery receipt event attributes. + Context map[string]*string `type:"map"` + + // The Raw JSON formatted string to be used as the payload. This value overrides + // the message. + RawContent *string `type:"string"` + + // A map of substitution values for the message to be merged with the DefaultMessage's + // substitutions. Substitutions on this map take precedence over the all other + // substitutions. + Substitutions map[string][]*string `type:"map"` + + // Title override. If specified will override default title if applicable. + TitleOverride *string `type:"string"` +} + +// String returns the string representation +func (s AddressConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddressConfiguration) GoString() string { + return s.String() +} + +// SetBodyOverride sets the BodyOverride field's value. +func (s *AddressConfiguration) SetBodyOverride(v string) *AddressConfiguration { + s.BodyOverride = &v + return s +} + +// SetChannelType sets the ChannelType field's value. +func (s *AddressConfiguration) SetChannelType(v string) *AddressConfiguration { + s.ChannelType = &v + return s +} + +// SetContext sets the Context field's value. +func (s *AddressConfiguration) SetContext(v map[string]*string) *AddressConfiguration { + s.Context = v + return s +} + +// SetRawContent sets the RawContent field's value. +func (s *AddressConfiguration) SetRawContent(v string) *AddressConfiguration { + s.RawContent = &v + return s +} + +// SetSubstitutions sets the Substitutions field's value. +func (s *AddressConfiguration) SetSubstitutions(v map[string][]*string) *AddressConfiguration { + s.Substitutions = v + return s +} + +// SetTitleOverride sets the TitleOverride field's value. +func (s *AddressConfiguration) SetTitleOverride(v string) *AddressConfiguration { + s.TitleOverride = &v + return s +} + +// Application Response. +type ApplicationResponse struct { + _ struct{} `type:"structure"` + + // The unique application ID. + Id *string `type:"string"` + + // The display name of the application. + Name *string `type:"string"` +} + +// String returns the string representation +func (s ApplicationResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ApplicationResponse) GoString() string { + return s.String() +} + +// SetId sets the Id field's value. +func (s *ApplicationResponse) SetId(v string) *ApplicationResponse { + s.Id = &v + return s +} + +// SetName sets the Name field's value. +func (s *ApplicationResponse) SetName(v string) *ApplicationResponse { + s.Name = &v + return s +} + +// Application settings. +type ApplicationSettingsResource struct { + _ struct{} `type:"structure"` + + // The unique ID for the application. + ApplicationId *string `type:"string"` + + // Default campaign hook. + CampaignHook *CampaignHook `type:"structure"` + + // The date that the settings were last updated in ISO 8601 format. + LastModifiedDate *string `type:"string"` + + // The default campaign limits for the app. These limits apply to each campaign + // for the app, unless the campaign overrides the default with limits of its + // own. + Limits *CampaignLimits `type:"structure"` + + // The default quiet time for the app. Campaigns in the app don't send messages + // to endpoints during the quiet time.Note: Make sure that your endpoints include + // the Demographics.Timezone attribute if you plan to enable a quiet time for + // your app. If your endpoints don't include this attribute, they'll receive + // the messages that you send them, even if quiet time is enabled.When you set + // up an app to use quiet time, campaigns in that app don't send messages during + // the time range you specified, as long as all of the following are true:- + // The endpoint includes a valid Demographic.Timezone attribute.- The current + // time in the endpoint's time zone is later than or equal to the time specified + // in the QuietTime.Start attribute for the app (or campaign, if applicable).- + // The current time in the endpoint's time zone is earlier than or equal to + // the time specified in the QuietTime.End attribute for the app (or campaign, + // if applicable).Individual campaigns within the app can have their own quiet + // time settings, which override the quiet time settings at the app level. + QuietTime *QuietTime `type:"structure"` +} + +// String returns the string representation +func (s ApplicationSettingsResource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ApplicationSettingsResource) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *ApplicationSettingsResource) SetApplicationId(v string) *ApplicationSettingsResource { + s.ApplicationId = &v + return s +} + +// SetCampaignHook sets the CampaignHook field's value. +func (s *ApplicationSettingsResource) SetCampaignHook(v *CampaignHook) *ApplicationSettingsResource { + s.CampaignHook = v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *ApplicationSettingsResource) SetLastModifiedDate(v string) *ApplicationSettingsResource { + s.LastModifiedDate = &v + return s +} + +// SetLimits sets the Limits field's value. +func (s *ApplicationSettingsResource) SetLimits(v *CampaignLimits) *ApplicationSettingsResource { + s.Limits = v + return s +} + +// SetQuietTime sets the QuietTime field's value. +func (s *ApplicationSettingsResource) SetQuietTime(v *QuietTime) *ApplicationSettingsResource { + s.QuietTime = v + return s +} + +// Get Applications Result. +type ApplicationsResponse struct { + _ struct{} `type:"structure"` + + // List of applications returned in this page. + Item []*ApplicationResponse `type:"list"` + + // The string that you use in a subsequent request to get the next page of results + // in a paginated response. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ApplicationsResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ApplicationsResponse) GoString() string { + return s.String() +} + +// SetItem sets the Item field's value. +func (s *ApplicationsResponse) SetItem(v []*ApplicationResponse) *ApplicationsResponse { + s.Item = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ApplicationsResponse) SetNextToken(v string) *ApplicationsResponse { + s.NextToken = &v + return s +} + +// Custom attibute dimension +type AttributeDimension struct { + _ struct{} `type:"structure"` + + // The type of dimension:INCLUSIVE - Endpoints that match the criteria are included + // in the segment.EXCLUSIVE - Endpoints that match the criteria are excluded + // from the segment. + AttributeType *string `type:"string" enum:"AttributeType"` + + // The criteria values for the segment dimension. Endpoints with matching attribute + // values are included or excluded from the segment, depending on the setting + // for Type. + Values []*string `type:"list"` +} + +// String returns the string representation +func (s AttributeDimension) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttributeDimension) GoString() string { + return s.String() +} + +// SetAttributeType sets the AttributeType field's value. +func (s *AttributeDimension) SetAttributeType(v string) *AttributeDimension { + s.AttributeType = &v + return s +} + +// SetValues sets the Values field's value. +func (s *AttributeDimension) SetValues(v []*string) *AttributeDimension { + s.Values = v + return s +} + +// Attributes. +type AttributesResource struct { + _ struct{} `type:"structure"` + + // The unique ID for the application. + ApplicationId *string `type:"string"` + + // The attribute type for the application. + AttributeType *string `type:"string"` + + // The attributes for the application. + Attributes []*string `type:"list"` +} + +// String returns the string representation +func (s AttributesResource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttributesResource) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *AttributesResource) SetApplicationId(v string) *AttributesResource { + s.ApplicationId = &v + return s +} + +// SetAttributeType sets the AttributeType field's value. +func (s *AttributesResource) SetAttributeType(v string) *AttributesResource { + s.AttributeType = &v + return s +} + +// SetAttributes sets the Attributes field's value. +func (s *AttributesResource) SetAttributes(v []*string) *AttributesResource { + s.Attributes = v + return s +} + +// Baidu Cloud Push credentials +type BaiduChannelRequest struct { + _ struct{} `type:"structure"` + + // Platform credential API key from Baidu. + ApiKey *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // Platform credential Secret key from Baidu. + SecretKey *string `type:"string"` +} + +// String returns the string representation +func (s BaiduChannelRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BaiduChannelRequest) GoString() string { + return s.String() +} + +// SetApiKey sets the ApiKey field's value. +func (s *BaiduChannelRequest) SetApiKey(v string) *BaiduChannelRequest { + s.ApiKey = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *BaiduChannelRequest) SetEnabled(v bool) *BaiduChannelRequest { + s.Enabled = &v + return s +} + +// SetSecretKey sets the SecretKey field's value. +func (s *BaiduChannelRequest) SetSecretKey(v string) *BaiduChannelRequest { + s.SecretKey = &v + return s +} + +// Baidu Cloud Messaging channel definition +type BaiduChannelResponse struct { + _ struct{} `type:"structure"` + + // Application id + ApplicationId *string `type:"string"` + + // When was this segment created + CreationDate *string `type:"string"` + + // The Baidu API key from Baidu. + Credential *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // Not used. Retained for backwards compatibility. + HasCredential *bool `type:"boolean"` + + // Channel ID. Not used, only for backwards compatibility. + Id *string `type:"string"` + + // Is this channel archived + IsArchived *bool `type:"boolean"` + + // Who made the last change + LastModifiedBy *string `type:"string"` + + // Last date this was updated + LastModifiedDate *string `type:"string"` + + // The platform type. Will be BAIDU + Platform *string `type:"string"` + + // Version of channel + Version *int64 `type:"integer"` +} + +// String returns the string representation +func (s BaiduChannelResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BaiduChannelResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *BaiduChannelResponse) SetApplicationId(v string) *BaiduChannelResponse { + s.ApplicationId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *BaiduChannelResponse) SetCreationDate(v string) *BaiduChannelResponse { + s.CreationDate = &v + return s +} + +// SetCredential sets the Credential field's value. +func (s *BaiduChannelResponse) SetCredential(v string) *BaiduChannelResponse { + s.Credential = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *BaiduChannelResponse) SetEnabled(v bool) *BaiduChannelResponse { + s.Enabled = &v + return s +} + +// SetHasCredential sets the HasCredential field's value. +func (s *BaiduChannelResponse) SetHasCredential(v bool) *BaiduChannelResponse { + s.HasCredential = &v + return s +} + +// SetId sets the Id field's value. +func (s *BaiduChannelResponse) SetId(v string) *BaiduChannelResponse { + s.Id = &v + return s +} + +// SetIsArchived sets the IsArchived field's value. +func (s *BaiduChannelResponse) SetIsArchived(v bool) *BaiduChannelResponse { + s.IsArchived = &v + return s +} + +// SetLastModifiedBy sets the LastModifiedBy field's value. +func (s *BaiduChannelResponse) SetLastModifiedBy(v string) *BaiduChannelResponse { + s.LastModifiedBy = &v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *BaiduChannelResponse) SetLastModifiedDate(v string) *BaiduChannelResponse { + s.LastModifiedDate = &v + return s +} + +// SetPlatform sets the Platform field's value. +func (s *BaiduChannelResponse) SetPlatform(v string) *BaiduChannelResponse { + s.Platform = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *BaiduChannelResponse) SetVersion(v int64) *BaiduChannelResponse { + s.Version = &v + return s +} + +// Baidu Message. +type BaiduMessage struct { + _ struct{} `type:"structure"` + + // The action that occurs if the user taps a push notification delivered by + // the campaign: OPEN_APP - Your app launches, or it becomes the foreground + // app if it has been sent to the background. This is the default action. DEEP_LINK + // - Uses deep linking features in iOS and Android to open your app and display + // a designated user interface within the app. URL - The default mobile browser + // on the user's device launches and opens a web page at the URL you specify. + // Possible values include: OPEN_APP | DEEP_LINK | URL + Action *string `type:"string" enum:"Action"` + + // The message body of the notification. + Body *string `type:"string"` + + // The data payload used for a silent push. This payload is added to the notifications' + // data.pinpoint.jsonBody' object + Data map[string]*string `type:"map"` + + // The icon image name of the asset saved in your application. + IconReference *string `type:"string"` + + // The URL that points to an image used as the large icon to the notification + // content view. + ImageIconUrl *string `type:"string"` + + // The URL that points to an image used in the push notification. + ImageUrl *string `type:"string"` + + // The Raw JSON formatted string to be used as the payload. This value overrides + // the message. + RawContent *string `type:"string"` + + // Indicates if the message should display on the users device. Silent pushes + // can be used for Remote Configuration and Phone Home use cases. + SilentPush *bool `type:"boolean"` + + // The URL that points to an image used as the small icon for the notification + // which will be used to represent the notification in the status bar and content + // view + SmallImageIconUrl *string `type:"string"` + + // Indicates a sound to play when the device receives the notification. Supports + // default, or the filename of a sound resource bundled in the app. Android + // sound files must reside in /res/raw/ + Sound *string `type:"string"` + + // Default message substitutions. Can be overridden by individual address substitutions. + Substitutions map[string][]*string `type:"map"` + + // This parameter specifies how long (in seconds) the message should be kept + // in Baidu storage if the device is offline. The and the default value and + // the maximum time to live supported is 7 days (604800 seconds) + TimeToLive *int64 `type:"integer"` + + // The message title that displays above the message on the user's device. + Title *string `type:"string"` + + // The URL to open in the user's mobile browser. Used if the value for Action + // is URL. + Url *string `type:"string"` +} + +// String returns the string representation +func (s BaiduMessage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BaiduMessage) GoString() string { + return s.String() +} + +// SetAction sets the Action field's value. +func (s *BaiduMessage) SetAction(v string) *BaiduMessage { + s.Action = &v + return s +} + +// SetBody sets the Body field's value. +func (s *BaiduMessage) SetBody(v string) *BaiduMessage { + s.Body = &v + return s +} + +// SetData sets the Data field's value. +func (s *BaiduMessage) SetData(v map[string]*string) *BaiduMessage { + s.Data = v + return s +} + +// SetIconReference sets the IconReference field's value. +func (s *BaiduMessage) SetIconReference(v string) *BaiduMessage { + s.IconReference = &v + return s +} + +// SetImageIconUrl sets the ImageIconUrl field's value. +func (s *BaiduMessage) SetImageIconUrl(v string) *BaiduMessage { + s.ImageIconUrl = &v + return s +} + +// SetImageUrl sets the ImageUrl field's value. +func (s *BaiduMessage) SetImageUrl(v string) *BaiduMessage { + s.ImageUrl = &v + return s +} + +// SetRawContent sets the RawContent field's value. +func (s *BaiduMessage) SetRawContent(v string) *BaiduMessage { + s.RawContent = &v + return s +} + +// SetSilentPush sets the SilentPush field's value. +func (s *BaiduMessage) SetSilentPush(v bool) *BaiduMessage { + s.SilentPush = &v + return s +} + +// SetSmallImageIconUrl sets the SmallImageIconUrl field's value. +func (s *BaiduMessage) SetSmallImageIconUrl(v string) *BaiduMessage { + s.SmallImageIconUrl = &v + return s +} + +// SetSound sets the Sound field's value. +func (s *BaiduMessage) SetSound(v string) *BaiduMessage { + s.Sound = &v + return s +} + +// SetSubstitutions sets the Substitutions field's value. +func (s *BaiduMessage) SetSubstitutions(v map[string][]*string) *BaiduMessage { + s.Substitutions = v + return s +} + +// SetTimeToLive sets the TimeToLive field's value. +func (s *BaiduMessage) SetTimeToLive(v int64) *BaiduMessage { + s.TimeToLive = &v + return s +} + +// SetTitle sets the Title field's value. +func (s *BaiduMessage) SetTitle(v string) *BaiduMessage { + s.Title = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *BaiduMessage) SetUrl(v string) *BaiduMessage { + s.Url = &v + return s +} + +// The email message configuration. +type CampaignEmailMessage struct { + _ struct{} `type:"structure"` + + // The email text body. + Body *string `type:"string"` + + // The email address used to send the email from. Defaults to use FromAddress + // specified in the Email Channel. + FromAddress *string `type:"string"` + + // The email html body. + HtmlBody *string `type:"string"` + + // The email title (Or subject). + Title *string `type:"string"` +} + +// String returns the string representation +func (s CampaignEmailMessage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CampaignEmailMessage) GoString() string { + return s.String() +} + +// SetBody sets the Body field's value. +func (s *CampaignEmailMessage) SetBody(v string) *CampaignEmailMessage { + s.Body = &v + return s +} + +// SetFromAddress sets the FromAddress field's value. +func (s *CampaignEmailMessage) SetFromAddress(v string) *CampaignEmailMessage { + s.FromAddress = &v + return s +} + +// SetHtmlBody sets the HtmlBody field's value. +func (s *CampaignEmailMessage) SetHtmlBody(v string) *CampaignEmailMessage { + s.HtmlBody = &v + return s +} + +// SetTitle sets the Title field's value. +func (s *CampaignEmailMessage) SetTitle(v string) *CampaignEmailMessage { + s.Title = &v + return s +} + +// An object that defines the events that cause the campaign to be sent. +type CampaignEventFilter struct { + _ struct{} `type:"structure"` + + // An object that defines the dimensions for the event filter. + Dimensions *EventDimensions `type:"structure"` + + // The type of event that causes the campaign to be sent. Possible values:SYSTEM + // - Send the campaign when a system event occurs. See the System resource for + // more information.ENDPOINT - Send the campaign when an endpoint event occurs. + // See the Event resource for more information. + FilterType *string `type:"string" enum:"FilterType"` +} + +// String returns the string representation +func (s CampaignEventFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CampaignEventFilter) GoString() string { + return s.String() +} + +// SetDimensions sets the Dimensions field's value. +func (s *CampaignEventFilter) SetDimensions(v *EventDimensions) *CampaignEventFilter { + s.Dimensions = v + return s +} + +// SetFilterType sets the FilterType field's value. +func (s *CampaignEventFilter) SetFilterType(v string) *CampaignEventFilter { + s.FilterType = &v + return s +} + +// Campaign hook information. +type CampaignHook struct { + _ struct{} `type:"structure"` + + // Lambda function name or arn to be called for delivery + LambdaFunctionName *string `type:"string"` + + // What mode Lambda should be invoked in. + Mode *string `type:"string" enum:"Mode"` + + // Web URL to call for hook. If the URL has authentication specified it will + // be added as authentication to the request + WebUrl *string `type:"string"` +} + +// String returns the string representation +func (s CampaignHook) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CampaignHook) GoString() string { + return s.String() +} + +// SetLambdaFunctionName sets the LambdaFunctionName field's value. +func (s *CampaignHook) SetLambdaFunctionName(v string) *CampaignHook { + s.LambdaFunctionName = &v + return s +} + +// SetMode sets the Mode field's value. +func (s *CampaignHook) SetMode(v string) *CampaignHook { + s.Mode = &v + return s +} + +// SetWebUrl sets the WebUrl field's value. +func (s *CampaignHook) SetWebUrl(v string) *CampaignHook { + s.WebUrl = &v + return s +} + +// Campaign Limits are used to limit the number of messages that can be sent +// to a single endpoint. +type CampaignLimits struct { + _ struct{} `type:"structure"` + + // The maximum number of messages that each campaign can send to a single endpoint + // in a 24-hour period. + Daily *int64 `type:"integer"` + + // The length of time (in seconds) that the campaign can run before it ends + // and message deliveries stop. This duration begins at the scheduled start + // time for the campaign. The minimum value is 60. + MaximumDuration *int64 `type:"integer"` + + // The number of messages that the campaign can send per second. The minimum + // value is 50, and the maximum is 20000. + MessagesPerSecond *int64 `type:"integer"` + + // The maximum number of messages that an individual campaign can send to a + // single endpoint over the course of the campaign. + Total *int64 `type:"integer"` +} + +// String returns the string representation +func (s CampaignLimits) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CampaignLimits) GoString() string { + return s.String() +} + +// SetDaily sets the Daily field's value. +func (s *CampaignLimits) SetDaily(v int64) *CampaignLimits { + s.Daily = &v + return s +} + +// SetMaximumDuration sets the MaximumDuration field's value. +func (s *CampaignLimits) SetMaximumDuration(v int64) *CampaignLimits { + s.MaximumDuration = &v + return s +} + +// SetMessagesPerSecond sets the MessagesPerSecond field's value. +func (s *CampaignLimits) SetMessagesPerSecond(v int64) *CampaignLimits { + s.MessagesPerSecond = &v + return s +} + +// SetTotal sets the Total field's value. +func (s *CampaignLimits) SetTotal(v int64) *CampaignLimits { + s.Total = &v + return s +} + +// Campaign definition +type CampaignResponse struct { + _ struct{} `type:"structure"` + + // Treatments that are defined in addition to the default treatment. + AdditionalTreatments []*TreatmentResource `type:"list"` + + // The ID of the application to which the campaign applies. + ApplicationId *string `type:"string"` + + // The date the campaign was created in ISO 8601 format. + CreationDate *string `type:"string"` + + // The status of the campaign's default treatment. Only present for A/B test + // campaigns. + DefaultState *CampaignState `type:"structure"` + + // A description of the campaign. + Description *string `type:"string"` + + // The allocated percentage of end users who will not receive messages from + // this campaign. + HoldoutPercent *int64 `type:"integer"` + + // Campaign hook information. + Hook *CampaignHook `type:"structure"` + + // The unique campaign ID. + Id *string `type:"string"` + + // Indicates whether the campaign is paused. A paused campaign does not send + // messages unless you resume it by setting IsPaused to false. + IsPaused *bool `type:"boolean"` + + // The date the campaign was last updated in ISO 8601 format. + LastModifiedDate *string `type:"string"` + + // The campaign limits settings. + Limits *CampaignLimits `type:"structure"` + + // The message configuration settings. + MessageConfiguration *MessageConfiguration `type:"structure"` + + // The custom name of the campaign. + Name *string `type:"string"` + + // The campaign schedule. + Schedule *Schedule `type:"structure"` + + // The ID of the segment to which the campaign sends messages. + SegmentId *string `type:"string"` + + // The version of the segment to which the campaign sends messages. + SegmentVersion *int64 `type:"integer"` + + // The campaign status.An A/B test campaign will have a status of COMPLETED + // only when all treatments have a status of COMPLETED. + State *CampaignState `type:"structure"` + + // A custom description for the treatment. + TreatmentDescription *string `type:"string"` + + // The custom name of a variation of the campaign used for A/B testing. + TreatmentName *string `type:"string"` + + // The campaign version number. + Version *int64 `type:"integer"` +} + +// String returns the string representation +func (s CampaignResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CampaignResponse) GoString() string { + return s.String() +} + +// SetAdditionalTreatments sets the AdditionalTreatments field's value. +func (s *CampaignResponse) SetAdditionalTreatments(v []*TreatmentResource) *CampaignResponse { + s.AdditionalTreatments = v + return s +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *CampaignResponse) SetApplicationId(v string) *CampaignResponse { + s.ApplicationId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *CampaignResponse) SetCreationDate(v string) *CampaignResponse { + s.CreationDate = &v + return s +} + +// SetDefaultState sets the DefaultState field's value. +func (s *CampaignResponse) SetDefaultState(v *CampaignState) *CampaignResponse { + s.DefaultState = v + return s +} + +// SetDescription sets the Description field's value. +func (s *CampaignResponse) SetDescription(v string) *CampaignResponse { + s.Description = &v + return s +} + +// SetHoldoutPercent sets the HoldoutPercent field's value. +func (s *CampaignResponse) SetHoldoutPercent(v int64) *CampaignResponse { + s.HoldoutPercent = &v + return s +} + +// SetHook sets the Hook field's value. +func (s *CampaignResponse) SetHook(v *CampaignHook) *CampaignResponse { + s.Hook = v + return s +} + +// SetId sets the Id field's value. +func (s *CampaignResponse) SetId(v string) *CampaignResponse { + s.Id = &v + return s +} + +// SetIsPaused sets the IsPaused field's value. +func (s *CampaignResponse) SetIsPaused(v bool) *CampaignResponse { + s.IsPaused = &v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *CampaignResponse) SetLastModifiedDate(v string) *CampaignResponse { + s.LastModifiedDate = &v + return s +} + +// SetLimits sets the Limits field's value. +func (s *CampaignResponse) SetLimits(v *CampaignLimits) *CampaignResponse { + s.Limits = v + return s +} + +// SetMessageConfiguration sets the MessageConfiguration field's value. +func (s *CampaignResponse) SetMessageConfiguration(v *MessageConfiguration) *CampaignResponse { + s.MessageConfiguration = v + return s +} + +// SetName sets the Name field's value. +func (s *CampaignResponse) SetName(v string) *CampaignResponse { + s.Name = &v + return s +} + +// SetSchedule sets the Schedule field's value. +func (s *CampaignResponse) SetSchedule(v *Schedule) *CampaignResponse { + s.Schedule = v + return s +} + +// SetSegmentId sets the SegmentId field's value. +func (s *CampaignResponse) SetSegmentId(v string) *CampaignResponse { + s.SegmentId = &v + return s +} + +// SetSegmentVersion sets the SegmentVersion field's value. +func (s *CampaignResponse) SetSegmentVersion(v int64) *CampaignResponse { + s.SegmentVersion = &v + return s +} + +// SetState sets the State field's value. +func (s *CampaignResponse) SetState(v *CampaignState) *CampaignResponse { + s.State = v + return s +} + +// SetTreatmentDescription sets the TreatmentDescription field's value. +func (s *CampaignResponse) SetTreatmentDescription(v string) *CampaignResponse { + s.TreatmentDescription = &v + return s +} + +// SetTreatmentName sets the TreatmentName field's value. +func (s *CampaignResponse) SetTreatmentName(v string) *CampaignResponse { + s.TreatmentName = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *CampaignResponse) SetVersion(v int64) *CampaignResponse { + s.Version = &v + return s +} + +// SMS message configuration. +type CampaignSmsMessage struct { + _ struct{} `type:"structure"` + + // The SMS text body. + Body *string `type:"string"` + + // Is this is a transactional SMS message, otherwise a promotional message. + MessageType *string `type:"string" enum:"MessageType"` + + // Sender ID of sent message. + SenderId *string `type:"string"` +} + +// String returns the string representation +func (s CampaignSmsMessage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CampaignSmsMessage) GoString() string { + return s.String() +} + +// SetBody sets the Body field's value. +func (s *CampaignSmsMessage) SetBody(v string) *CampaignSmsMessage { + s.Body = &v + return s +} + +// SetMessageType sets the MessageType field's value. +func (s *CampaignSmsMessage) SetMessageType(v string) *CampaignSmsMessage { + s.MessageType = &v + return s +} + +// SetSenderId sets the SenderId field's value. +func (s *CampaignSmsMessage) SetSenderId(v string) *CampaignSmsMessage { + s.SenderId = &v + return s +} + +// State of the Campaign +type CampaignState struct { + _ struct{} `type:"structure"` + + // The status of the campaign, or the status of a treatment that belongs to + // an A/B test campaign.Valid values: SCHEDULED, EXECUTING, PENDING_NEXT_RUN, + // COMPLETED, PAUSED + CampaignStatus *string `type:"string" enum:"CampaignStatus"` +} + +// String returns the string representation +func (s CampaignState) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CampaignState) GoString() string { + return s.String() +} + +// SetCampaignStatus sets the CampaignStatus field's value. +func (s *CampaignState) SetCampaignStatus(v string) *CampaignState { + s.CampaignStatus = &v + return s +} + +// List of available campaigns. +type CampaignsResponse struct { + _ struct{} `type:"structure"` + + // A list of campaigns. + Item []*CampaignResponse `type:"list"` + + // The string that you use in a subsequent request to get the next page of results + // in a paginated response. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s CampaignsResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CampaignsResponse) GoString() string { + return s.String() +} + +// SetItem sets the Item field's value. +func (s *CampaignsResponse) SetItem(v []*CampaignResponse) *CampaignsResponse { + s.Item = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *CampaignsResponse) SetNextToken(v string) *CampaignsResponse { + s.NextToken = &v + return s +} + +// Base definition for channel response. +type ChannelResponse struct { + _ struct{} `type:"structure"` + + // Application id + ApplicationId *string `type:"string"` + + // When was this segment created + CreationDate *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // Not used. Retained for backwards compatibility. + HasCredential *bool `type:"boolean"` + + // Channel ID. Not used, only for backwards compatibility. + Id *string `type:"string"` + + // Is this channel archived + IsArchived *bool `type:"boolean"` + + // Who made the last change + LastModifiedBy *string `type:"string"` + + // Last date this was updated + LastModifiedDate *string `type:"string"` + + // Version of channel + Version *int64 `type:"integer"` +} + +// String returns the string representation +func (s ChannelResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ChannelResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *ChannelResponse) SetApplicationId(v string) *ChannelResponse { + s.ApplicationId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *ChannelResponse) SetCreationDate(v string) *ChannelResponse { + s.CreationDate = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *ChannelResponse) SetEnabled(v bool) *ChannelResponse { + s.Enabled = &v + return s +} + +// SetHasCredential sets the HasCredential field's value. +func (s *ChannelResponse) SetHasCredential(v bool) *ChannelResponse { + s.HasCredential = &v + return s +} + +// SetId sets the Id field's value. +func (s *ChannelResponse) SetId(v string) *ChannelResponse { + s.Id = &v + return s +} + +// SetIsArchived sets the IsArchived field's value. +func (s *ChannelResponse) SetIsArchived(v bool) *ChannelResponse { + s.IsArchived = &v + return s +} + +// SetLastModifiedBy sets the LastModifiedBy field's value. +func (s *ChannelResponse) SetLastModifiedBy(v string) *ChannelResponse { + s.LastModifiedBy = &v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *ChannelResponse) SetLastModifiedDate(v string) *ChannelResponse { + s.LastModifiedDate = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *ChannelResponse) SetVersion(v int64) *ChannelResponse { + s.Version = &v + return s +} + +// Get channels definition +type ChannelsResponse struct { + _ struct{} `type:"structure"` + + // A map of channels, with the ChannelType as the key and the Channel as the + // value. + Channels map[string]*ChannelResponse `type:"map"` +} + +// String returns the string representation +func (s ChannelsResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ChannelsResponse) GoString() string { + return s.String() +} + +// SetChannels sets the Channels field's value. +func (s *ChannelsResponse) SetChannels(v map[string]*ChannelResponse) *ChannelsResponse { + s.Channels = v + return s +} + +type CreateAppInput struct { + _ struct{} `type:"structure" payload:"CreateApplicationRequest"` + + // Application Request. + // + // CreateApplicationRequest is a required field + CreateApplicationRequest *CreateApplicationRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreateAppInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateAppInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateAppInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateAppInput"} + if s.CreateApplicationRequest == nil { + invalidParams.Add(request.NewErrParamRequired("CreateApplicationRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCreateApplicationRequest sets the CreateApplicationRequest field's value. +func (s *CreateAppInput) SetCreateApplicationRequest(v *CreateApplicationRequest) *CreateAppInput { + s.CreateApplicationRequest = v + return s +} + +type CreateAppOutput struct { + _ struct{} `type:"structure" payload:"ApplicationResponse"` + + // Application Response. + // + // ApplicationResponse is a required field + ApplicationResponse *ApplicationResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreateAppOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateAppOutput) GoString() string { + return s.String() +} + +// SetApplicationResponse sets the ApplicationResponse field's value. +func (s *CreateAppOutput) SetApplicationResponse(v *ApplicationResponse) *CreateAppOutput { + s.ApplicationResponse = v + return s +} + +// Application Request. +type CreateApplicationRequest struct { + _ struct{} `type:"structure"` + + // The display name of the application. Used in the Amazon Pinpoint console. + Name *string `type:"string"` +} + +// String returns the string representation +func (s CreateApplicationRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateApplicationRequest) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *CreateApplicationRequest) SetName(v string) *CreateApplicationRequest { + s.Name = &v + return s +} + +type CreateCampaignInput struct { + _ struct{} `type:"structure" payload:"WriteCampaignRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // Used to create a campaign. + // + // WriteCampaignRequest is a required field + WriteCampaignRequest *WriteCampaignRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreateCampaignInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCampaignInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateCampaignInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCampaignInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.WriteCampaignRequest == nil { + invalidParams.Add(request.NewErrParamRequired("WriteCampaignRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *CreateCampaignInput) SetApplicationId(v string) *CreateCampaignInput { + s.ApplicationId = &v + return s +} + +// SetWriteCampaignRequest sets the WriteCampaignRequest field's value. +func (s *CreateCampaignInput) SetWriteCampaignRequest(v *WriteCampaignRequest) *CreateCampaignInput { + s.WriteCampaignRequest = v + return s +} + +type CreateCampaignOutput struct { + _ struct{} `type:"structure" payload:"CampaignResponse"` + + // Campaign definition + // + // CampaignResponse is a required field + CampaignResponse *CampaignResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreateCampaignOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCampaignOutput) GoString() string { + return s.String() +} + +// SetCampaignResponse sets the CampaignResponse field's value. +func (s *CreateCampaignOutput) SetCampaignResponse(v *CampaignResponse) *CreateCampaignOutput { + s.CampaignResponse = v + return s +} + +type CreateExportJobInput struct { + _ struct{} `type:"structure" payload:"ExportJobRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // Export job request. + // + // ExportJobRequest is a required field + ExportJobRequest *ExportJobRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreateExportJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateExportJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateExportJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateExportJobInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.ExportJobRequest == nil { + invalidParams.Add(request.NewErrParamRequired("ExportJobRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *CreateExportJobInput) SetApplicationId(v string) *CreateExportJobInput { + s.ApplicationId = &v + return s +} + +// SetExportJobRequest sets the ExportJobRequest field's value. +func (s *CreateExportJobInput) SetExportJobRequest(v *ExportJobRequest) *CreateExportJobInput { + s.ExportJobRequest = v + return s +} + +type CreateExportJobOutput struct { + _ struct{} `type:"structure" payload:"ExportJobResponse"` + + // Export job response. + // + // ExportJobResponse is a required field + ExportJobResponse *ExportJobResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreateExportJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateExportJobOutput) GoString() string { + return s.String() +} + +// SetExportJobResponse sets the ExportJobResponse field's value. +func (s *CreateExportJobOutput) SetExportJobResponse(v *ExportJobResponse) *CreateExportJobOutput { + s.ExportJobResponse = v + return s +} + +type CreateImportJobInput struct { + _ struct{} `type:"structure" payload:"ImportJobRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // Import job request. + // + // ImportJobRequest is a required field + ImportJobRequest *ImportJobRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreateImportJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateImportJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateImportJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateImportJobInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.ImportJobRequest == nil { + invalidParams.Add(request.NewErrParamRequired("ImportJobRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *CreateImportJobInput) SetApplicationId(v string) *CreateImportJobInput { + s.ApplicationId = &v + return s +} + +// SetImportJobRequest sets the ImportJobRequest field's value. +func (s *CreateImportJobInput) SetImportJobRequest(v *ImportJobRequest) *CreateImportJobInput { + s.ImportJobRequest = v + return s +} + +type CreateImportJobOutput struct { + _ struct{} `type:"structure" payload:"ImportJobResponse"` + + // Import job response. + // + // ImportJobResponse is a required field + ImportJobResponse *ImportJobResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreateImportJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateImportJobOutput) GoString() string { + return s.String() +} + +// SetImportJobResponse sets the ImportJobResponse field's value. +func (s *CreateImportJobOutput) SetImportJobResponse(v *ImportJobResponse) *CreateImportJobOutput { + s.ImportJobResponse = v + return s +} + +type CreateSegmentInput struct { + _ struct{} `type:"structure" payload:"WriteSegmentRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // Segment definition. + // + // WriteSegmentRequest is a required field + WriteSegmentRequest *WriteSegmentRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreateSegmentInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSegmentInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateSegmentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateSegmentInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.WriteSegmentRequest == nil { + invalidParams.Add(request.NewErrParamRequired("WriteSegmentRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *CreateSegmentInput) SetApplicationId(v string) *CreateSegmentInput { + s.ApplicationId = &v + return s +} + +// SetWriteSegmentRequest sets the WriteSegmentRequest field's value. +func (s *CreateSegmentInput) SetWriteSegmentRequest(v *WriteSegmentRequest) *CreateSegmentInput { + s.WriteSegmentRequest = v + return s +} + +type CreateSegmentOutput struct { + _ struct{} `type:"structure" payload:"SegmentResponse"` + + // Segment definition. + // + // SegmentResponse is a required field + SegmentResponse *SegmentResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreateSegmentOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSegmentOutput) GoString() string { + return s.String() +} + +// SetSegmentResponse sets the SegmentResponse field's value. +func (s *CreateSegmentOutput) SetSegmentResponse(v *SegmentResponse) *CreateSegmentOutput { + s.SegmentResponse = v + return s +} + +// The default message to use across all channels. +type DefaultMessage struct { + _ struct{} `type:"structure"` + + // The message body of the notification, the email body or the text message. + Body *string `type:"string"` + + // Default message substitutions. Can be overridden by individual address substitutions. + Substitutions map[string][]*string `type:"map"` +} + +// String returns the string representation +func (s DefaultMessage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DefaultMessage) GoString() string { + return s.String() +} + +// SetBody sets the Body field's value. +func (s *DefaultMessage) SetBody(v string) *DefaultMessage { + s.Body = &v + return s +} + +// SetSubstitutions sets the Substitutions field's value. +func (s *DefaultMessage) SetSubstitutions(v map[string][]*string) *DefaultMessage { + s.Substitutions = v + return s +} + +// Default Push Notification Message. +type DefaultPushNotificationMessage struct { + _ struct{} `type:"structure"` + + // The action that occurs if the user taps a push notification delivered by + // the campaign: OPEN_APP - Your app launches, or it becomes the foreground + // app if it has been sent to the background. This is the default action. DEEP_LINK + // - Uses deep linking features in iOS and Android to open your app and display + // a designated user interface within the app. URL - The default mobile browser + // on the user's device launches and opens a web page at the URL you specify. + // Possible values include: OPEN_APP | DEEP_LINK | URL + Action *string `type:"string" enum:"Action"` + + // The message body of the notification. + Body *string `type:"string"` + + // The data payload used for a silent push. This payload is added to the notifications' + // data.pinpoint.jsonBody' object + Data map[string]*string `type:"map"` + + // Indicates if the message should display on the recipient's device. You can + // use silent pushes for remote configuration or to deliver messages to in-app + // notification centers. + SilentPush *bool `type:"boolean"` + + // Default message substitutions. Can be overridden by individual address substitutions. + Substitutions map[string][]*string `type:"map"` + + // The message title that displays above the message on the user's device. + Title *string `type:"string"` + + // The URL to open in the user's mobile browser. Used if the value for Action + // is URL. + Url *string `type:"string"` +} + +// String returns the string representation +func (s DefaultPushNotificationMessage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DefaultPushNotificationMessage) GoString() string { + return s.String() +} + +// SetAction sets the Action field's value. +func (s *DefaultPushNotificationMessage) SetAction(v string) *DefaultPushNotificationMessage { + s.Action = &v + return s +} + +// SetBody sets the Body field's value. +func (s *DefaultPushNotificationMessage) SetBody(v string) *DefaultPushNotificationMessage { + s.Body = &v + return s +} + +// SetData sets the Data field's value. +func (s *DefaultPushNotificationMessage) SetData(v map[string]*string) *DefaultPushNotificationMessage { + s.Data = v + return s +} + +// SetSilentPush sets the SilentPush field's value. +func (s *DefaultPushNotificationMessage) SetSilentPush(v bool) *DefaultPushNotificationMessage { + s.SilentPush = &v + return s +} + +// SetSubstitutions sets the Substitutions field's value. +func (s *DefaultPushNotificationMessage) SetSubstitutions(v map[string][]*string) *DefaultPushNotificationMessage { + s.Substitutions = v + return s +} + +// SetTitle sets the Title field's value. +func (s *DefaultPushNotificationMessage) SetTitle(v string) *DefaultPushNotificationMessage { + s.Title = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *DefaultPushNotificationMessage) SetUrl(v string) *DefaultPushNotificationMessage { + s.Url = &v + return s +} + +type DeleteAdmChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteAdmChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAdmChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteAdmChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteAdmChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteAdmChannelInput) SetApplicationId(v string) *DeleteAdmChannelInput { + s.ApplicationId = &v + return s +} + +type DeleteAdmChannelOutput struct { + _ struct{} `type:"structure" payload:"ADMChannelResponse"` + + // Amazon Device Messaging channel definition. + // + // ADMChannelResponse is a required field + ADMChannelResponse *ADMChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteAdmChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAdmChannelOutput) GoString() string { + return s.String() +} + +// SetADMChannelResponse sets the ADMChannelResponse field's value. +func (s *DeleteAdmChannelOutput) SetADMChannelResponse(v *ADMChannelResponse) *DeleteAdmChannelOutput { + s.ADMChannelResponse = v + return s +} + +type DeleteApnsChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteApnsChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApnsChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteApnsChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteApnsChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteApnsChannelInput) SetApplicationId(v string) *DeleteApnsChannelInput { + s.ApplicationId = &v + return s +} + +type DeleteApnsChannelOutput struct { + _ struct{} `type:"structure" payload:"APNSChannelResponse"` + + // Apple Distribution Push Notification Service channel definition. + // + // APNSChannelResponse is a required field + APNSChannelResponse *APNSChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteApnsChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApnsChannelOutput) GoString() string { + return s.String() +} + +// SetAPNSChannelResponse sets the APNSChannelResponse field's value. +func (s *DeleteApnsChannelOutput) SetAPNSChannelResponse(v *APNSChannelResponse) *DeleteApnsChannelOutput { + s.APNSChannelResponse = v + return s +} + +type DeleteApnsSandboxChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteApnsSandboxChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApnsSandboxChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteApnsSandboxChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteApnsSandboxChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteApnsSandboxChannelInput) SetApplicationId(v string) *DeleteApnsSandboxChannelInput { + s.ApplicationId = &v + return s +} + +type DeleteApnsSandboxChannelOutput struct { + _ struct{} `type:"structure" payload:"APNSSandboxChannelResponse"` + + // Apple Development Push Notification Service channel definition. + // + // APNSSandboxChannelResponse is a required field + APNSSandboxChannelResponse *APNSSandboxChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteApnsSandboxChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApnsSandboxChannelOutput) GoString() string { + return s.String() +} + +// SetAPNSSandboxChannelResponse sets the APNSSandboxChannelResponse field's value. +func (s *DeleteApnsSandboxChannelOutput) SetAPNSSandboxChannelResponse(v *APNSSandboxChannelResponse) *DeleteApnsSandboxChannelOutput { + s.APNSSandboxChannelResponse = v + return s +} + +type DeleteApnsVoipChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteApnsVoipChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApnsVoipChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteApnsVoipChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteApnsVoipChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteApnsVoipChannelInput) SetApplicationId(v string) *DeleteApnsVoipChannelInput { + s.ApplicationId = &v + return s +} + +type DeleteApnsVoipChannelOutput struct { + _ struct{} `type:"structure" payload:"APNSVoipChannelResponse"` + + // Apple VoIP Push Notification Service channel definition. + // + // APNSVoipChannelResponse is a required field + APNSVoipChannelResponse *APNSVoipChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteApnsVoipChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApnsVoipChannelOutput) GoString() string { + return s.String() +} + +// SetAPNSVoipChannelResponse sets the APNSVoipChannelResponse field's value. +func (s *DeleteApnsVoipChannelOutput) SetAPNSVoipChannelResponse(v *APNSVoipChannelResponse) *DeleteApnsVoipChannelOutput { + s.APNSVoipChannelResponse = v + return s +} + +type DeleteApnsVoipSandboxChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteApnsVoipSandboxChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApnsVoipSandboxChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteApnsVoipSandboxChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteApnsVoipSandboxChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteApnsVoipSandboxChannelInput) SetApplicationId(v string) *DeleteApnsVoipSandboxChannelInput { + s.ApplicationId = &v + return s +} + +type DeleteApnsVoipSandboxChannelOutput struct { + _ struct{} `type:"structure" payload:"APNSVoipSandboxChannelResponse"` + + // Apple VoIP Developer Push Notification Service channel definition. + // + // APNSVoipSandboxChannelResponse is a required field + APNSVoipSandboxChannelResponse *APNSVoipSandboxChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteApnsVoipSandboxChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteApnsVoipSandboxChannelOutput) GoString() string { + return s.String() +} + +// SetAPNSVoipSandboxChannelResponse sets the APNSVoipSandboxChannelResponse field's value. +func (s *DeleteApnsVoipSandboxChannelOutput) SetAPNSVoipSandboxChannelResponse(v *APNSVoipSandboxChannelResponse) *DeleteApnsVoipSandboxChannelOutput { + s.APNSVoipSandboxChannelResponse = v + return s +} + +type DeleteAppInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteAppInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAppInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteAppInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteAppInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteAppInput) SetApplicationId(v string) *DeleteAppInput { + s.ApplicationId = &v + return s +} + +type DeleteAppOutput struct { + _ struct{} `type:"structure" payload:"ApplicationResponse"` + + // Application Response. + // + // ApplicationResponse is a required field + ApplicationResponse *ApplicationResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteAppOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteAppOutput) GoString() string { + return s.String() +} + +// SetApplicationResponse sets the ApplicationResponse field's value. +func (s *DeleteAppOutput) SetApplicationResponse(v *ApplicationResponse) *DeleteAppOutput { + s.ApplicationResponse = v + return s +} + +type DeleteBaiduChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteBaiduChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBaiduChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteBaiduChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteBaiduChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteBaiduChannelInput) SetApplicationId(v string) *DeleteBaiduChannelInput { + s.ApplicationId = &v + return s +} + +type DeleteBaiduChannelOutput struct { + _ struct{} `type:"structure" payload:"BaiduChannelResponse"` + + // Baidu Cloud Messaging channel definition + // + // BaiduChannelResponse is a required field + BaiduChannelResponse *BaiduChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteBaiduChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteBaiduChannelOutput) GoString() string { + return s.String() +} + +// SetBaiduChannelResponse sets the BaiduChannelResponse field's value. +func (s *DeleteBaiduChannelOutput) SetBaiduChannelResponse(v *BaiduChannelResponse) *DeleteBaiduChannelOutput { + s.BaiduChannelResponse = v + return s +} + +type DeleteCampaignInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // CampaignId is a required field + CampaignId *string `location:"uri" locationName:"campaign-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteCampaignInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteCampaignInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteCampaignInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteCampaignInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.CampaignId == nil { + invalidParams.Add(request.NewErrParamRequired("CampaignId")) + } + if s.CampaignId != nil && len(*s.CampaignId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CampaignId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteCampaignInput) SetApplicationId(v string) *DeleteCampaignInput { + s.ApplicationId = &v + return s +} + +// SetCampaignId sets the CampaignId field's value. +func (s *DeleteCampaignInput) SetCampaignId(v string) *DeleteCampaignInput { + s.CampaignId = &v + return s +} + +type DeleteCampaignOutput struct { + _ struct{} `type:"structure" payload:"CampaignResponse"` + + // Campaign definition + // + // CampaignResponse is a required field + CampaignResponse *CampaignResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteCampaignOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteCampaignOutput) GoString() string { + return s.String() +} + +// SetCampaignResponse sets the CampaignResponse field's value. +func (s *DeleteCampaignOutput) SetCampaignResponse(v *CampaignResponse) *DeleteCampaignOutput { + s.CampaignResponse = v + return s +} + +type DeleteEmailChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteEmailChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteEmailChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteEmailChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteEmailChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteEmailChannelInput) SetApplicationId(v string) *DeleteEmailChannelInput { + s.ApplicationId = &v + return s +} + +type DeleteEmailChannelOutput struct { + _ struct{} `type:"structure" payload:"EmailChannelResponse"` + + // Email Channel Response. + // + // EmailChannelResponse is a required field + EmailChannelResponse *EmailChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteEmailChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteEmailChannelOutput) GoString() string { + return s.String() +} + +// SetEmailChannelResponse sets the EmailChannelResponse field's value. +func (s *DeleteEmailChannelOutput) SetEmailChannelResponse(v *EmailChannelResponse) *DeleteEmailChannelOutput { + s.EmailChannelResponse = v + return s +} + +type DeleteEndpointInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // EndpointId is a required field + EndpointId *string `location:"uri" locationName:"endpoint-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteEndpointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteEndpointInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteEndpointInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.EndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("EndpointId")) + } + if s.EndpointId != nil && len(*s.EndpointId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EndpointId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteEndpointInput) SetApplicationId(v string) *DeleteEndpointInput { + s.ApplicationId = &v + return s +} + +// SetEndpointId sets the EndpointId field's value. +func (s *DeleteEndpointInput) SetEndpointId(v string) *DeleteEndpointInput { + s.EndpointId = &v + return s +} + +type DeleteEndpointOutput struct { + _ struct{} `type:"structure" payload:"EndpointResponse"` + + // Endpoint response + // + // EndpointResponse is a required field + EndpointResponse *EndpointResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteEndpointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteEndpointOutput) GoString() string { + return s.String() +} + +// SetEndpointResponse sets the EndpointResponse field's value. +func (s *DeleteEndpointOutput) SetEndpointResponse(v *EndpointResponse) *DeleteEndpointOutput { + s.EndpointResponse = v + return s +} + +type DeleteEventStreamInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteEventStreamInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteEventStreamInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteEventStreamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteEventStreamInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteEventStreamInput) SetApplicationId(v string) *DeleteEventStreamInput { + s.ApplicationId = &v + return s +} + +type DeleteEventStreamOutput struct { + _ struct{} `type:"structure" payload:"EventStream"` + + // Model for an event publishing subscription export. + // + // EventStream is a required field + EventStream *EventStream `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteEventStreamOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteEventStreamOutput) GoString() string { + return s.String() +} + +// SetEventStream sets the EventStream field's value. +func (s *DeleteEventStreamOutput) SetEventStream(v *EventStream) *DeleteEventStreamOutput { + s.EventStream = v + return s +} + +type DeleteGcmChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteGcmChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteGcmChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteGcmChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteGcmChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteGcmChannelInput) SetApplicationId(v string) *DeleteGcmChannelInput { + s.ApplicationId = &v + return s +} + +type DeleteGcmChannelOutput struct { + _ struct{} `type:"structure" payload:"GCMChannelResponse"` + + // Google Cloud Messaging channel definition + // + // GCMChannelResponse is a required field + GCMChannelResponse *GCMChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteGcmChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteGcmChannelOutput) GoString() string { + return s.String() +} + +// SetGCMChannelResponse sets the GCMChannelResponse field's value. +func (s *DeleteGcmChannelOutput) SetGCMChannelResponse(v *GCMChannelResponse) *DeleteGcmChannelOutput { + s.GCMChannelResponse = v + return s +} + +type DeleteSegmentInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // SegmentId is a required field + SegmentId *string `location:"uri" locationName:"segment-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteSegmentInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSegmentInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteSegmentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSegmentInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.SegmentId == nil { + invalidParams.Add(request.NewErrParamRequired("SegmentId")) + } + if s.SegmentId != nil && len(*s.SegmentId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SegmentId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteSegmentInput) SetApplicationId(v string) *DeleteSegmentInput { + s.ApplicationId = &v + return s +} + +// SetSegmentId sets the SegmentId field's value. +func (s *DeleteSegmentInput) SetSegmentId(v string) *DeleteSegmentInput { + s.SegmentId = &v + return s +} + +type DeleteSegmentOutput struct { + _ struct{} `type:"structure" payload:"SegmentResponse"` + + // Segment definition. + // + // SegmentResponse is a required field + SegmentResponse *SegmentResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteSegmentOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSegmentOutput) GoString() string { + return s.String() +} + +// SetSegmentResponse sets the SegmentResponse field's value. +func (s *DeleteSegmentOutput) SetSegmentResponse(v *SegmentResponse) *DeleteSegmentOutput { + s.SegmentResponse = v + return s +} + +type DeleteSmsChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteSmsChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSmsChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteSmsChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSmsChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteSmsChannelInput) SetApplicationId(v string) *DeleteSmsChannelInput { + s.ApplicationId = &v + return s +} + +type DeleteSmsChannelOutput struct { + _ struct{} `type:"structure" payload:"SMSChannelResponse"` + + // SMS Channel Response. + // + // SMSChannelResponse is a required field + SMSChannelResponse *SMSChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteSmsChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSmsChannelOutput) GoString() string { + return s.String() +} + +// SetSMSChannelResponse sets the SMSChannelResponse field's value. +func (s *DeleteSmsChannelOutput) SetSMSChannelResponse(v *SMSChannelResponse) *DeleteSmsChannelOutput { + s.SMSChannelResponse = v + return s +} + +type DeleteUserEndpointsInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // UserId is a required field + UserId *string `location:"uri" locationName:"user-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteUserEndpointsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteUserEndpointsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteUserEndpointsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteUserEndpointsInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.UserId == nil { + invalidParams.Add(request.NewErrParamRequired("UserId")) + } + if s.UserId != nil && len(*s.UserId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteUserEndpointsInput) SetApplicationId(v string) *DeleteUserEndpointsInput { + s.ApplicationId = &v + return s +} + +// SetUserId sets the UserId field's value. +func (s *DeleteUserEndpointsInput) SetUserId(v string) *DeleteUserEndpointsInput { + s.UserId = &v + return s +} + +type DeleteUserEndpointsOutput struct { + _ struct{} `type:"structure" payload:"EndpointsResponse"` + + // List of endpoints + // + // EndpointsResponse is a required field + EndpointsResponse *EndpointsResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteUserEndpointsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteUserEndpointsOutput) GoString() string { + return s.String() +} + +// SetEndpointsResponse sets the EndpointsResponse field's value. +func (s *DeleteUserEndpointsOutput) SetEndpointsResponse(v *EndpointsResponse) *DeleteUserEndpointsOutput { + s.EndpointsResponse = v + return s +} + +type DeleteVoiceChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteVoiceChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVoiceChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteVoiceChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteVoiceChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *DeleteVoiceChannelInput) SetApplicationId(v string) *DeleteVoiceChannelInput { + s.ApplicationId = &v + return s +} + +type DeleteVoiceChannelOutput struct { + _ struct{} `type:"structure" payload:"VoiceChannelResponse"` + + // Voice Channel Response. + // + // VoiceChannelResponse is a required field + VoiceChannelResponse *VoiceChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s DeleteVoiceChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteVoiceChannelOutput) GoString() string { + return s.String() +} + +// SetVoiceChannelResponse sets the VoiceChannelResponse field's value. +func (s *DeleteVoiceChannelOutput) SetVoiceChannelResponse(v *VoiceChannelResponse) *DeleteVoiceChannelOutput { + s.VoiceChannelResponse = v + return s +} + +// Message definitions for the default message and any messages that are tailored +// for specific channels. +type DirectMessageConfiguration struct { + _ struct{} `type:"structure"` + + // The message to ADM channels. Overrides the default push notification message. + ADMMessage *ADMMessage `type:"structure"` + + // The message to APNS channels. Overrides the default push notification message. + APNSMessage *APNSMessage `type:"structure"` + + // The message to Baidu GCM channels. Overrides the default push notification + // message. + BaiduMessage *BaiduMessage `type:"structure"` + + // The default message for all channels. + DefaultMessage *DefaultMessage `type:"structure"` + + // The default push notification message for all push channels. + DefaultPushNotificationMessage *DefaultPushNotificationMessage `type:"structure"` + + // The message to Email channels. Overrides the default message. + EmailMessage *EmailMessage `type:"structure"` + + // The message to GCM channels. Overrides the default push notification message. + GCMMessage *GCMMessage `type:"structure"` + + // The message to SMS channels. Overrides the default message. + SMSMessage *SMSMessage `type:"structure"` + + // The message to Voice channels. Overrides the default message. + VoiceMessage *VoiceMessage `type:"structure"` +} + +// String returns the string representation +func (s DirectMessageConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DirectMessageConfiguration) GoString() string { + return s.String() +} + +// SetADMMessage sets the ADMMessage field's value. +func (s *DirectMessageConfiguration) SetADMMessage(v *ADMMessage) *DirectMessageConfiguration { + s.ADMMessage = v + return s +} + +// SetAPNSMessage sets the APNSMessage field's value. +func (s *DirectMessageConfiguration) SetAPNSMessage(v *APNSMessage) *DirectMessageConfiguration { + s.APNSMessage = v + return s +} + +// SetBaiduMessage sets the BaiduMessage field's value. +func (s *DirectMessageConfiguration) SetBaiduMessage(v *BaiduMessage) *DirectMessageConfiguration { + s.BaiduMessage = v + return s +} + +// SetDefaultMessage sets the DefaultMessage field's value. +func (s *DirectMessageConfiguration) SetDefaultMessage(v *DefaultMessage) *DirectMessageConfiguration { + s.DefaultMessage = v + return s +} + +// SetDefaultPushNotificationMessage sets the DefaultPushNotificationMessage field's value. +func (s *DirectMessageConfiguration) SetDefaultPushNotificationMessage(v *DefaultPushNotificationMessage) *DirectMessageConfiguration { + s.DefaultPushNotificationMessage = v + return s +} + +// SetEmailMessage sets the EmailMessage field's value. +func (s *DirectMessageConfiguration) SetEmailMessage(v *EmailMessage) *DirectMessageConfiguration { + s.EmailMessage = v + return s +} + +// SetGCMMessage sets the GCMMessage field's value. +func (s *DirectMessageConfiguration) SetGCMMessage(v *GCMMessage) *DirectMessageConfiguration { + s.GCMMessage = v + return s +} + +// SetSMSMessage sets the SMSMessage field's value. +func (s *DirectMessageConfiguration) SetSMSMessage(v *SMSMessage) *DirectMessageConfiguration { + s.SMSMessage = v + return s +} + +// SetVoiceMessage sets the VoiceMessage field's value. +func (s *DirectMessageConfiguration) SetVoiceMessage(v *VoiceMessage) *DirectMessageConfiguration { + s.VoiceMessage = v + return s +} + +// Email Channel Request +type EmailChannelRequest struct { + _ struct{} `type:"structure"` + + // The configuration set that you want to use when you send email using the + // Pinpoint Email API. + ConfigurationSet *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // The email address used to send emails from. + FromAddress *string `type:"string"` + + // The ARN of an identity verified with SES. + Identity *string `type:"string"` + + // The ARN of an IAM Role used to submit events to Mobile Analytics' event ingestion + // service + RoleArn *string `type:"string"` +} + +// String returns the string representation +func (s EmailChannelRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EmailChannelRequest) GoString() string { + return s.String() +} + +// SetConfigurationSet sets the ConfigurationSet field's value. +func (s *EmailChannelRequest) SetConfigurationSet(v string) *EmailChannelRequest { + s.ConfigurationSet = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *EmailChannelRequest) SetEnabled(v bool) *EmailChannelRequest { + s.Enabled = &v + return s +} + +// SetFromAddress sets the FromAddress field's value. +func (s *EmailChannelRequest) SetFromAddress(v string) *EmailChannelRequest { + s.FromAddress = &v + return s +} + +// SetIdentity sets the Identity field's value. +func (s *EmailChannelRequest) SetIdentity(v string) *EmailChannelRequest { + s.Identity = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *EmailChannelRequest) SetRoleArn(v string) *EmailChannelRequest { + s.RoleArn = &v + return s +} + +// Email Channel Response. +type EmailChannelResponse struct { + _ struct{} `type:"structure"` + + // The unique ID of the application to which the email channel belongs. + ApplicationId *string `type:"string"` + + // The configuration set that you want to use when you send email using the + // Pinpoint Email API. + ConfigurationSet *string `type:"string"` + + // The date that the settings were last updated in ISO 8601 format. + CreationDate *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // The email address used to send emails from. + FromAddress *string `type:"string"` + + // Not used. Retained for backwards compatibility. + HasCredential *bool `type:"boolean"` + + // Channel ID. Not used, only for backwards compatibility. + Id *string `type:"string"` + + // The ARN of an identity verified with SES. + Identity *string `type:"string"` + + // Is this channel archived + IsArchived *bool `type:"boolean"` + + // Who last updated this entry + LastModifiedBy *string `type:"string"` + + // Last date this was updated + LastModifiedDate *string `type:"string"` + + // Messages per second that can be sent + MessagesPerSecond *int64 `type:"integer"` + + // Platform type. Will be "EMAIL" + Platform *string `type:"string"` + + // The ARN of an IAM Role used to submit events to Mobile Analytics' event ingestion + // service + RoleArn *string `type:"string"` + + // Version of channel + Version *int64 `type:"integer"` +} + +// String returns the string representation +func (s EmailChannelResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EmailChannelResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *EmailChannelResponse) SetApplicationId(v string) *EmailChannelResponse { + s.ApplicationId = &v + return s +} + +// SetConfigurationSet sets the ConfigurationSet field's value. +func (s *EmailChannelResponse) SetConfigurationSet(v string) *EmailChannelResponse { + s.ConfigurationSet = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *EmailChannelResponse) SetCreationDate(v string) *EmailChannelResponse { + s.CreationDate = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *EmailChannelResponse) SetEnabled(v bool) *EmailChannelResponse { + s.Enabled = &v + return s +} + +// SetFromAddress sets the FromAddress field's value. +func (s *EmailChannelResponse) SetFromAddress(v string) *EmailChannelResponse { + s.FromAddress = &v + return s +} + +// SetHasCredential sets the HasCredential field's value. +func (s *EmailChannelResponse) SetHasCredential(v bool) *EmailChannelResponse { + s.HasCredential = &v + return s +} + +// SetId sets the Id field's value. +func (s *EmailChannelResponse) SetId(v string) *EmailChannelResponse { + s.Id = &v + return s +} + +// SetIdentity sets the Identity field's value. +func (s *EmailChannelResponse) SetIdentity(v string) *EmailChannelResponse { + s.Identity = &v + return s +} + +// SetIsArchived sets the IsArchived field's value. +func (s *EmailChannelResponse) SetIsArchived(v bool) *EmailChannelResponse { + s.IsArchived = &v + return s +} + +// SetLastModifiedBy sets the LastModifiedBy field's value. +func (s *EmailChannelResponse) SetLastModifiedBy(v string) *EmailChannelResponse { + s.LastModifiedBy = &v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *EmailChannelResponse) SetLastModifiedDate(v string) *EmailChannelResponse { + s.LastModifiedDate = &v + return s +} + +// SetMessagesPerSecond sets the MessagesPerSecond field's value. +func (s *EmailChannelResponse) SetMessagesPerSecond(v int64) *EmailChannelResponse { + s.MessagesPerSecond = &v + return s +} + +// SetPlatform sets the Platform field's value. +func (s *EmailChannelResponse) SetPlatform(v string) *EmailChannelResponse { + s.Platform = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *EmailChannelResponse) SetRoleArn(v string) *EmailChannelResponse { + s.RoleArn = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *EmailChannelResponse) SetVersion(v int64) *EmailChannelResponse { + s.Version = &v + return s +} + +// Email Message. +type EmailMessage struct { + _ struct{} `type:"structure"` + + // The body of the email message. + Body *string `type:"string"` + + // The email address that bounces and complaints will be forwarded to when feedback + // forwarding is enabled. + FeedbackForwardingAddress *string `type:"string"` + + // The email address used to send the email from. Defaults to use FromAddress + // specified in the Email Channel. + FromAddress *string `type:"string"` + + // An email represented as a raw MIME message. + RawEmail *RawEmail `type:"structure"` + + // The reply-to email address(es) for the email. If the recipient replies to + // the email, each reply-to address will receive the reply. + ReplyToAddresses []*string `type:"list"` + + // An email composed of a subject, a text part and a html part. + SimpleEmail *SimpleEmail `type:"structure"` + + // Default message substitutions. Can be overridden by individual address substitutions. + Substitutions map[string][]*string `type:"map"` +} + +// String returns the string representation +func (s EmailMessage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EmailMessage) GoString() string { + return s.String() +} + +// SetBody sets the Body field's value. +func (s *EmailMessage) SetBody(v string) *EmailMessage { + s.Body = &v + return s +} + +// SetFeedbackForwardingAddress sets the FeedbackForwardingAddress field's value. +func (s *EmailMessage) SetFeedbackForwardingAddress(v string) *EmailMessage { + s.FeedbackForwardingAddress = &v + return s +} + +// SetFromAddress sets the FromAddress field's value. +func (s *EmailMessage) SetFromAddress(v string) *EmailMessage { + s.FromAddress = &v + return s +} + +// SetRawEmail sets the RawEmail field's value. +func (s *EmailMessage) SetRawEmail(v *RawEmail) *EmailMessage { + s.RawEmail = v + return s +} + +// SetReplyToAddresses sets the ReplyToAddresses field's value. +func (s *EmailMessage) SetReplyToAddresses(v []*string) *EmailMessage { + s.ReplyToAddresses = v + return s +} + +// SetSimpleEmail sets the SimpleEmail field's value. +func (s *EmailMessage) SetSimpleEmail(v *SimpleEmail) *EmailMessage { + s.SimpleEmail = v + return s +} + +// SetSubstitutions sets the Substitutions field's value. +func (s *EmailMessage) SetSubstitutions(v map[string][]*string) *EmailMessage { + s.Substitutions = v + return s +} + +// Endpoint update request +type EndpointBatchItem struct { + _ struct{} `type:"structure"` + + // The destination for messages that you send to this endpoint. The address + // varies by channel. For mobile push channels, use the token provided by the + // push notification service, such as the APNs device token or the FCM registration + // token. For the SMS channel, use a phone number in E.164 format, such as +12065550100. + // For the email channel, use an email address. + Address *string `type:"string"` + + // Custom attributes that describe the endpoint by associating a name with an + // array of values. For example, an attribute named "interests" might have the + // values ["science", "politics", "travel"]. You can use these attributes as + // selection criteria when you create a segment of users to engage with a messaging + // campaign.The following characters are not recommended in attribute names: + // # : ? \ /. The Amazon Pinpoint console does not display attributes that include + // these characters in the name. This limitation does not apply to attribute + // values. + Attributes map[string][]*string `type:"map"` + + // The channel type.Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX + // | ADM | SMS | EMAIL | BAIDU + ChannelType *string `type:"string" enum:"ChannelType"` + + // The endpoint demographic attributes. + Demographic *EndpointDemographic `type:"structure"` + + // The last time the endpoint was updated. Provided in ISO 8601 format. + EffectiveDate *string `type:"string"` + + // Unused. + EndpointStatus *string `type:"string"` + + // The unique Id for the Endpoint in the batch. + Id *string `type:"string"` + + // The endpoint location attributes. + Location *EndpointLocation `type:"structure"` + + // Custom metrics that your app reports to Amazon Pinpoint. + Metrics map[string]*float64 `type:"map"` + + // Indicates whether a user has opted out of receiving messages with one of + // the following values:ALL - User has opted out of all messages.NONE - Users + // has not opted out and receives all messages. + OptOut *string `type:"string"` + + // The unique ID for the most recent request to update the endpoint. + RequestId *string `type:"string"` + + // Custom user-specific attributes that your app reports to Amazon Pinpoint. + User *EndpointUser `type:"structure"` +} + +// String returns the string representation +func (s EndpointBatchItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EndpointBatchItem) GoString() string { + return s.String() +} + +// SetAddress sets the Address field's value. +func (s *EndpointBatchItem) SetAddress(v string) *EndpointBatchItem { + s.Address = &v + return s +} + +// SetAttributes sets the Attributes field's value. +func (s *EndpointBatchItem) SetAttributes(v map[string][]*string) *EndpointBatchItem { + s.Attributes = v + return s +} + +// SetChannelType sets the ChannelType field's value. +func (s *EndpointBatchItem) SetChannelType(v string) *EndpointBatchItem { + s.ChannelType = &v + return s +} + +// SetDemographic sets the Demographic field's value. +func (s *EndpointBatchItem) SetDemographic(v *EndpointDemographic) *EndpointBatchItem { + s.Demographic = v + return s +} + +// SetEffectiveDate sets the EffectiveDate field's value. +func (s *EndpointBatchItem) SetEffectiveDate(v string) *EndpointBatchItem { + s.EffectiveDate = &v + return s +} + +// SetEndpointStatus sets the EndpointStatus field's value. +func (s *EndpointBatchItem) SetEndpointStatus(v string) *EndpointBatchItem { + s.EndpointStatus = &v + return s +} + +// SetId sets the Id field's value. +func (s *EndpointBatchItem) SetId(v string) *EndpointBatchItem { + s.Id = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *EndpointBatchItem) SetLocation(v *EndpointLocation) *EndpointBatchItem { + s.Location = v + return s +} + +// SetMetrics sets the Metrics field's value. +func (s *EndpointBatchItem) SetMetrics(v map[string]*float64) *EndpointBatchItem { + s.Metrics = v + return s +} + +// SetOptOut sets the OptOut field's value. +func (s *EndpointBatchItem) SetOptOut(v string) *EndpointBatchItem { + s.OptOut = &v + return s +} + +// SetRequestId sets the RequestId field's value. +func (s *EndpointBatchItem) SetRequestId(v string) *EndpointBatchItem { + s.RequestId = &v + return s +} + +// SetUser sets the User field's value. +func (s *EndpointBatchItem) SetUser(v *EndpointUser) *EndpointBatchItem { + s.User = v + return s +} + +// Endpoint batch update request. +type EndpointBatchRequest struct { + _ struct{} `type:"structure"` + + // List of items to update. Maximum 100 items + Item []*EndpointBatchItem `type:"list"` +} + +// String returns the string representation +func (s EndpointBatchRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EndpointBatchRequest) GoString() string { + return s.String() +} + +// SetItem sets the Item field's value. +func (s *EndpointBatchRequest) SetItem(v []*EndpointBatchItem) *EndpointBatchRequest { + s.Item = v + return s +} + +// Demographic information about the endpoint. +type EndpointDemographic struct { + _ struct{} `type:"structure"` + + // The version of the application associated with the endpoint. + AppVersion *string `type:"string"` + + // The endpoint locale in the following format: The ISO 639-1 alpha-2 code, + // followed by an underscore, followed by an ISO 3166-1 alpha-2 value. + Locale *string `type:"string"` + + // The manufacturer of the endpoint device, such as Apple or Samsung. + Make *string `type:"string"` + + // The model name or number of the endpoint device, such as iPhone. + Model *string `type:"string"` + + // The model version of the endpoint device. + ModelVersion *string `type:"string"` + + // The platform of the endpoint device, such as iOS or Android. + Platform *string `type:"string"` + + // The platform version of the endpoint device. + PlatformVersion *string `type:"string"` + + // The timezone of the endpoint. Specified as a tz database value, such as Americas/Los_Angeles. + Timezone *string `type:"string"` +} + +// String returns the string representation +func (s EndpointDemographic) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EndpointDemographic) GoString() string { + return s.String() +} + +// SetAppVersion sets the AppVersion field's value. +func (s *EndpointDemographic) SetAppVersion(v string) *EndpointDemographic { + s.AppVersion = &v + return s +} + +// SetLocale sets the Locale field's value. +func (s *EndpointDemographic) SetLocale(v string) *EndpointDemographic { + s.Locale = &v + return s +} + +// SetMake sets the Make field's value. +func (s *EndpointDemographic) SetMake(v string) *EndpointDemographic { + s.Make = &v + return s +} + +// SetModel sets the Model field's value. +func (s *EndpointDemographic) SetModel(v string) *EndpointDemographic { + s.Model = &v + return s +} + +// SetModelVersion sets the ModelVersion field's value. +func (s *EndpointDemographic) SetModelVersion(v string) *EndpointDemographic { + s.ModelVersion = &v + return s +} + +// SetPlatform sets the Platform field's value. +func (s *EndpointDemographic) SetPlatform(v string) *EndpointDemographic { + s.Platform = &v + return s +} + +// SetPlatformVersion sets the PlatformVersion field's value. +func (s *EndpointDemographic) SetPlatformVersion(v string) *EndpointDemographic { + s.PlatformVersion = &v + return s +} + +// SetTimezone sets the Timezone field's value. +func (s *EndpointDemographic) SetTimezone(v string) *EndpointDemographic { + s.Timezone = &v + return s +} + +// A complex object that holds the status code and message as a result of processing +// an endpoint. +type EndpointItemResponse struct { + _ struct{} `type:"structure"` + + // A custom message associated with the registration of an endpoint when issuing + // a response. + Message *string `type:"string"` + + // The status code associated with the merging of an endpoint when issuing a + // response. + StatusCode *int64 `type:"integer"` +} + +// String returns the string representation +func (s EndpointItemResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EndpointItemResponse) GoString() string { + return s.String() +} + +// SetMessage sets the Message field's value. +func (s *EndpointItemResponse) SetMessage(v string) *EndpointItemResponse { + s.Message = &v + return s +} + +// SetStatusCode sets the StatusCode field's value. +func (s *EndpointItemResponse) SetStatusCode(v int64) *EndpointItemResponse { + s.StatusCode = &v + return s +} + +// Location data for the endpoint. +type EndpointLocation struct { + _ struct{} `type:"structure"` + + // The city where the endpoint is located. + City *string `type:"string"` + + // The two-letter code for the country or region of the endpoint. Specified + // as an ISO 3166-1 alpha-2 code, such as "US" for the United States. + Country *string `type:"string"` + + // The latitude of the endpoint location, rounded to one decimal place. + Latitude *float64 `type:"double"` + + // The longitude of the endpoint location, rounded to one decimal place. + Longitude *float64 `type:"double"` + + // The postal code or zip code of the endpoint. + PostalCode *string `type:"string"` + + // The region of the endpoint location. For example, in the United States, this + // corresponds to a state. + Region *string `type:"string"` +} + +// String returns the string representation +func (s EndpointLocation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EndpointLocation) GoString() string { + return s.String() +} + +// SetCity sets the City field's value. +func (s *EndpointLocation) SetCity(v string) *EndpointLocation { + s.City = &v + return s +} + +// SetCountry sets the Country field's value. +func (s *EndpointLocation) SetCountry(v string) *EndpointLocation { + s.Country = &v + return s +} + +// SetLatitude sets the Latitude field's value. +func (s *EndpointLocation) SetLatitude(v float64) *EndpointLocation { + s.Latitude = &v + return s +} + +// SetLongitude sets the Longitude field's value. +func (s *EndpointLocation) SetLongitude(v float64) *EndpointLocation { + s.Longitude = &v + return s +} + +// SetPostalCode sets the PostalCode field's value. +func (s *EndpointLocation) SetPostalCode(v string) *EndpointLocation { + s.PostalCode = &v + return s +} + +// SetRegion sets the Region field's value. +func (s *EndpointLocation) SetRegion(v string) *EndpointLocation { + s.Region = &v + return s +} + +// The result from sending a message to an endpoint. +type EndpointMessageResult struct { + _ struct{} `type:"structure"` + + // Address that endpoint message was delivered to. + Address *string `type:"string"` + + // The delivery status of the message. Possible values:SUCCESS - The message + // was successfully delivered to the endpoint.TRANSIENT_FAILURE - A temporary + // error occurred. Amazon Pinpoint will attempt to deliver the message again + // later.FAILURE_PERMANENT - An error occurred when delivering the message to + // the endpoint. Amazon Pinpoint won't attempt to send the message again.TIMEOUT + // - The message couldn't be sent within the timeout period.QUIET_TIME - The + // local time for the endpoint was within the QuietTime for the campaign or + // app.DAILY_CAP - The endpoint has received the maximum number of messages + // it can receive within a 24-hour period.HOLDOUT - The endpoint was in a hold + // out treatment for the campaign.THROTTLED - Amazon Pinpoint throttled sending + // to this endpoint.EXPIRED - The endpoint address is expired.CAMPAIGN_CAP - + // The endpoint received the maximum number of messages allowed by the campaign.SERVICE_FAILURE + // - A service-level failure prevented Amazon Pinpoint from delivering the message.UNKNOWN + // - An unknown error occurred. + DeliveryStatus *string `type:"string" enum:"DeliveryStatus"` + + // Unique message identifier associated with the message that was sent. + MessageId *string `type:"string"` + + // Downstream service status code. + StatusCode *int64 `type:"integer"` + + // Status message for message delivery. + StatusMessage *string `type:"string"` + + // If token was updated as part of delivery. (This is GCM Specific) + UpdatedToken *string `type:"string"` +} + +// String returns the string representation +func (s EndpointMessageResult) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EndpointMessageResult) GoString() string { + return s.String() +} + +// SetAddress sets the Address field's value. +func (s *EndpointMessageResult) SetAddress(v string) *EndpointMessageResult { + s.Address = &v + return s +} + +// SetDeliveryStatus sets the DeliveryStatus field's value. +func (s *EndpointMessageResult) SetDeliveryStatus(v string) *EndpointMessageResult { + s.DeliveryStatus = &v + return s +} + +// SetMessageId sets the MessageId field's value. +func (s *EndpointMessageResult) SetMessageId(v string) *EndpointMessageResult { + s.MessageId = &v + return s +} + +// SetStatusCode sets the StatusCode field's value. +func (s *EndpointMessageResult) SetStatusCode(v int64) *EndpointMessageResult { + s.StatusCode = &v + return s +} + +// SetStatusMessage sets the StatusMessage field's value. +func (s *EndpointMessageResult) SetStatusMessage(v string) *EndpointMessageResult { + s.StatusMessage = &v + return s +} + +// SetUpdatedToken sets the UpdatedToken field's value. +func (s *EndpointMessageResult) SetUpdatedToken(v string) *EndpointMessageResult { + s.UpdatedToken = &v + return s +} + +// An endpoint update request. +type EndpointRequest struct { + _ struct{} `type:"structure"` + + // The destination for messages that you send to this endpoint. The address + // varies by channel. For mobile push channels, use the token provided by the + // push notification service, such as the APNs device token or the FCM registration + // token. For the SMS channel, use a phone number in E.164 format, such as +12065550100. + // For the email channel, use an email address. + Address *string `type:"string"` + + // Custom attributes that describe the endpoint by associating a name with an + // array of values. For example, an attribute named "interests" might have the + // values ["science", "politics", "travel"]. You can use these attributes as + // selection criteria when you create a segment of users to engage with a messaging + // campaign.The following characters are not recommended in attribute names: + // # : ? \ /. The Amazon Pinpoint console does not display attributes that include + // these characters in the name. This limitation does not apply to attribute + // values. + Attributes map[string][]*string `type:"map"` + + // The channel type.Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX + // | ADM | SMS | EMAIL | BAIDU + ChannelType *string `type:"string" enum:"ChannelType"` + + // Demographic attributes for the endpoint. + Demographic *EndpointDemographic `type:"structure"` + + // The date and time when the endpoint was updated, shown in ISO 8601 format. + EffectiveDate *string `type:"string"` + + // Unused. + EndpointStatus *string `type:"string"` + + // The endpoint location attributes. + Location *EndpointLocation `type:"structure"` + + // Custom metrics that your app reports to Amazon Pinpoint. + Metrics map[string]*float64 `type:"map"` + + // Indicates whether a user has opted out of receiving messages with one of + // the following values:ALL - User has opted out of all messages.NONE - Users + // has not opted out and receives all messages. + OptOut *string `type:"string"` + + // The unique ID for the most recent request to update the endpoint. + RequestId *string `type:"string"` + + // Custom user-specific attributes that your app reports to Amazon Pinpoint. + User *EndpointUser `type:"structure"` +} + +// String returns the string representation +func (s EndpointRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EndpointRequest) GoString() string { + return s.String() +} + +// SetAddress sets the Address field's value. +func (s *EndpointRequest) SetAddress(v string) *EndpointRequest { + s.Address = &v + return s +} + +// SetAttributes sets the Attributes field's value. +func (s *EndpointRequest) SetAttributes(v map[string][]*string) *EndpointRequest { + s.Attributes = v + return s +} + +// SetChannelType sets the ChannelType field's value. +func (s *EndpointRequest) SetChannelType(v string) *EndpointRequest { + s.ChannelType = &v + return s +} + +// SetDemographic sets the Demographic field's value. +func (s *EndpointRequest) SetDemographic(v *EndpointDemographic) *EndpointRequest { + s.Demographic = v + return s +} + +// SetEffectiveDate sets the EffectiveDate field's value. +func (s *EndpointRequest) SetEffectiveDate(v string) *EndpointRequest { + s.EffectiveDate = &v + return s +} + +// SetEndpointStatus sets the EndpointStatus field's value. +func (s *EndpointRequest) SetEndpointStatus(v string) *EndpointRequest { + s.EndpointStatus = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *EndpointRequest) SetLocation(v *EndpointLocation) *EndpointRequest { + s.Location = v + return s +} + +// SetMetrics sets the Metrics field's value. +func (s *EndpointRequest) SetMetrics(v map[string]*float64) *EndpointRequest { + s.Metrics = v + return s +} + +// SetOptOut sets the OptOut field's value. +func (s *EndpointRequest) SetOptOut(v string) *EndpointRequest { + s.OptOut = &v + return s +} + +// SetRequestId sets the RequestId field's value. +func (s *EndpointRequest) SetRequestId(v string) *EndpointRequest { + s.RequestId = &v + return s +} + +// SetUser sets the User field's value. +func (s *EndpointRequest) SetUser(v *EndpointUser) *EndpointRequest { + s.User = v + return s +} + +// Endpoint response +type EndpointResponse struct { + _ struct{} `type:"structure"` + + // The address of the endpoint as provided by your push provider. For example, + // the DeviceToken or RegistrationId. + Address *string `type:"string"` + + // The ID of the application that is associated with the endpoint. + ApplicationId *string `type:"string"` + + // Custom attributes that describe the endpoint by associating a name with an + // array of values. For example, an attribute named "interests" might have the + // following values: ["science", "politics", "travel"]. You can use these attributes + // as selection criteria when you create segments.The Amazon Pinpoint console + // can't display attribute names that include the following characters: hash/pound + // sign (#), colon (:), question mark (?), backslash (\), and forward slash + // (/). For this reason, you should avoid using these characters in the names + // of custom attributes. + Attributes map[string][]*string `type:"map"` + + // The channel type.Valid values: GCM | APNS | APNS_SANDBOX | APNS_VOIP | APNS_VOIP_SANDBOX + // | ADM | SMS | EMAIL | BAIDU + ChannelType *string `type:"string" enum:"ChannelType"` + + // A number from 0-99 that represents the cohort the endpoint is assigned to. + // Endpoints are grouped into cohorts randomly, and each cohort contains approximately + // 1 percent of the endpoints for an app. Amazon Pinpoint assigns cohorts to + // the holdout or treatment allocations for a campaign. + CohortId *string `type:"string"` + + // The date and time when the endpoint was created, shown in ISO 8601 format. + CreationDate *string `type:"string"` + + // The endpoint demographic attributes. + Demographic *EndpointDemographic `type:"structure"` + + // The date and time when the endpoint was last updated, shown in ISO 8601 format. + EffectiveDate *string `type:"string"` + + // Unused. + EndpointStatus *string `type:"string"` + + // The unique ID that you assigned to the endpoint. The ID should be a globally + // unique identifier (GUID) to ensure that it doesn't conflict with other endpoint + // IDs associated with the application. + Id *string `type:"string"` + + // The endpoint location attributes. + Location *EndpointLocation `type:"structure"` + + // Custom metrics that your app reports to Amazon Pinpoint. + Metrics map[string]*float64 `type:"map"` + + // Indicates whether a user has opted out of receiving messages with one of + // the following values:ALL - User has opted out of all messages.NONE - Users + // has not opted out and receives all messages. + OptOut *string `type:"string"` + + // The unique ID for the most recent request to update the endpoint. + RequestId *string `type:"string"` + + // Custom user-specific attributes that your app reports to Amazon Pinpoint. + User *EndpointUser `type:"structure"` +} + +// String returns the string representation +func (s EndpointResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EndpointResponse) GoString() string { + return s.String() +} + +// SetAddress sets the Address field's value. +func (s *EndpointResponse) SetAddress(v string) *EndpointResponse { + s.Address = &v + return s +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *EndpointResponse) SetApplicationId(v string) *EndpointResponse { + s.ApplicationId = &v + return s +} + +// SetAttributes sets the Attributes field's value. +func (s *EndpointResponse) SetAttributes(v map[string][]*string) *EndpointResponse { + s.Attributes = v + return s +} + +// SetChannelType sets the ChannelType field's value. +func (s *EndpointResponse) SetChannelType(v string) *EndpointResponse { + s.ChannelType = &v + return s +} + +// SetCohortId sets the CohortId field's value. +func (s *EndpointResponse) SetCohortId(v string) *EndpointResponse { + s.CohortId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *EndpointResponse) SetCreationDate(v string) *EndpointResponse { + s.CreationDate = &v + return s +} + +// SetDemographic sets the Demographic field's value. +func (s *EndpointResponse) SetDemographic(v *EndpointDemographic) *EndpointResponse { + s.Demographic = v + return s +} + +// SetEffectiveDate sets the EffectiveDate field's value. +func (s *EndpointResponse) SetEffectiveDate(v string) *EndpointResponse { + s.EffectiveDate = &v + return s +} + +// SetEndpointStatus sets the EndpointStatus field's value. +func (s *EndpointResponse) SetEndpointStatus(v string) *EndpointResponse { + s.EndpointStatus = &v + return s +} + +// SetId sets the Id field's value. +func (s *EndpointResponse) SetId(v string) *EndpointResponse { + s.Id = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *EndpointResponse) SetLocation(v *EndpointLocation) *EndpointResponse { + s.Location = v + return s +} + +// SetMetrics sets the Metrics field's value. +func (s *EndpointResponse) SetMetrics(v map[string]*float64) *EndpointResponse { + s.Metrics = v + return s +} + +// SetOptOut sets the OptOut field's value. +func (s *EndpointResponse) SetOptOut(v string) *EndpointResponse { + s.OptOut = &v + return s +} + +// SetRequestId sets the RequestId field's value. +func (s *EndpointResponse) SetRequestId(v string) *EndpointResponse { + s.RequestId = &v + return s +} + +// SetUser sets the User field's value. +func (s *EndpointResponse) SetUser(v *EndpointUser) *EndpointResponse { + s.User = v + return s +} + +// Endpoint send configuration. +type EndpointSendConfiguration struct { + _ struct{} `type:"structure"` + + // Body override. If specified will override default body. + BodyOverride *string `type:"string"` + + // A map of custom attributes to attributes to be attached to the message for + // this address. This payload is added to the push notification's 'data.pinpoint' + // object or added to the email/sms delivery receipt event attributes. + Context map[string]*string `type:"map"` + + // The Raw JSON formatted string to be used as the payload. This value overrides + // the message. + RawContent *string `type:"string"` + + // A map of substitution values for the message to be merged with the DefaultMessage's + // substitutions. Substitutions on this map take precedence over the all other + // substitutions. + Substitutions map[string][]*string `type:"map"` + + // Title override. If specified will override default title if applicable. + TitleOverride *string `type:"string"` +} + +// String returns the string representation +func (s EndpointSendConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EndpointSendConfiguration) GoString() string { + return s.String() +} + +// SetBodyOverride sets the BodyOverride field's value. +func (s *EndpointSendConfiguration) SetBodyOverride(v string) *EndpointSendConfiguration { + s.BodyOverride = &v + return s +} + +// SetContext sets the Context field's value. +func (s *EndpointSendConfiguration) SetContext(v map[string]*string) *EndpointSendConfiguration { + s.Context = v + return s +} + +// SetRawContent sets the RawContent field's value. +func (s *EndpointSendConfiguration) SetRawContent(v string) *EndpointSendConfiguration { + s.RawContent = &v + return s +} + +// SetSubstitutions sets the Substitutions field's value. +func (s *EndpointSendConfiguration) SetSubstitutions(v map[string][]*string) *EndpointSendConfiguration { + s.Substitutions = v + return s +} + +// SetTitleOverride sets the TitleOverride field's value. +func (s *EndpointSendConfiguration) SetTitleOverride(v string) *EndpointSendConfiguration { + s.TitleOverride = &v + return s +} + +// Endpoint user specific custom userAttributes +type EndpointUser struct { + _ struct{} `type:"structure"` + + // Custom attributes that describe the user by associating a name with an array + // of values. For example, an attribute named "interests" might have the following + // values: ["science", "politics", "travel"]. You can use these attributes as + // selection criteria when you create segments.The Amazon Pinpoint console can't + // display attribute names that include the following characters: hash/pound + // sign (#), colon (:), question mark (?), backslash (\), and forward slash + // (/). For this reason, you should avoid using these characters in the names + // of custom attributes. + UserAttributes map[string][]*string `type:"map"` + + // The unique ID of the user. + UserId *string `type:"string"` +} + +// String returns the string representation +func (s EndpointUser) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EndpointUser) GoString() string { + return s.String() +} + +// SetUserAttributes sets the UserAttributes field's value. +func (s *EndpointUser) SetUserAttributes(v map[string][]*string) *EndpointUser { + s.UserAttributes = v + return s +} + +// SetUserId sets the UserId field's value. +func (s *EndpointUser) SetUserId(v string) *EndpointUser { + s.UserId = &v + return s +} + +// List of endpoints +type EndpointsResponse struct { + _ struct{} `type:"structure"` + + // The list of endpoints. + Item []*EndpointResponse `type:"list"` +} + +// String returns the string representation +func (s EndpointsResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EndpointsResponse) GoString() string { + return s.String() +} + +// SetItem sets the Item field's value. +func (s *EndpointsResponse) SetItem(v []*EndpointResponse) *EndpointsResponse { + s.Item = v + return s +} + +// Model for creating or updating events. +type Event struct { + _ struct{} `type:"structure"` + + // Custom attributes that are associated with the event you're adding or updating. + Attributes map[string]*string `type:"map"` + + // The version of the SDK that's running on the client device. + ClientSdkVersion *string `type:"string"` + + // The name of the custom event that you're recording. + EventType *string `type:"string"` + + // Custom metrics related to the event. + Metrics map[string]*float64 `type:"map"` + + // Information about the session in which the event occurred. + Session *Session `type:"structure"` + + // The date and time when the event occurred, in ISO 8601 format. + Timestamp *string `type:"string"` +} + +// String returns the string representation +func (s Event) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Event) GoString() string { + return s.String() +} + +// SetAttributes sets the Attributes field's value. +func (s *Event) SetAttributes(v map[string]*string) *Event { + s.Attributes = v + return s +} + +// SetClientSdkVersion sets the ClientSdkVersion field's value. +func (s *Event) SetClientSdkVersion(v string) *Event { + s.ClientSdkVersion = &v + return s +} + +// SetEventType sets the EventType field's value. +func (s *Event) SetEventType(v string) *Event { + s.EventType = &v + return s +} + +// SetMetrics sets the Metrics field's value. +func (s *Event) SetMetrics(v map[string]*float64) *Event { + s.Metrics = v + return s +} + +// SetSession sets the Session field's value. +func (s *Event) SetSession(v *Session) *Event { + s.Session = v + return s +} + +// SetTimestamp sets the Timestamp field's value. +func (s *Event) SetTimestamp(v string) *Event { + s.Timestamp = &v + return s +} + +// Event dimensions. +type EventDimensions struct { + _ struct{} `type:"structure"` + + // Custom attributes that your app reports to Amazon Pinpoint. You can use these + // attributes as selection criteria when you create an event filter. + Attributes map[string]*AttributeDimension `type:"map"` + + // The name of the event that causes the campaign to be sent. This can be a + // standard event type that Amazon Pinpoint generates, such as _session.start, + // or a custom event that's specific to your app. + EventType *SetDimension `type:"structure"` + + // Custom metrics that your app reports to Amazon Pinpoint. You can use these + // attributes as selection criteria when you create an event filter. + Metrics map[string]*MetricDimension `type:"map"` +} + +// String returns the string representation +func (s EventDimensions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EventDimensions) GoString() string { + return s.String() +} + +// SetAttributes sets the Attributes field's value. +func (s *EventDimensions) SetAttributes(v map[string]*AttributeDimension) *EventDimensions { + s.Attributes = v + return s +} + +// SetEventType sets the EventType field's value. +func (s *EventDimensions) SetEventType(v *SetDimension) *EventDimensions { + s.EventType = v + return s +} + +// SetMetrics sets the Metrics field's value. +func (s *EventDimensions) SetMetrics(v map[string]*MetricDimension) *EventDimensions { + s.Metrics = v + return s +} + +// A complex object that holds the status code and message as a result of processing +// an event. +type EventItemResponse struct { + _ struct{} `type:"structure"` + + // A custom message that is associated with the processing of an event. + Message *string `type:"string"` + + // The status returned in the response as a result of processing the event.Possible + // values: 400 (for invalid events) and 202 (for events that were accepted). + StatusCode *int64 `type:"integer"` +} + +// String returns the string representation +func (s EventItemResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EventItemResponse) GoString() string { + return s.String() +} + +// SetMessage sets the Message field's value. +func (s *EventItemResponse) SetMessage(v string) *EventItemResponse { + s.Message = &v + return s +} + +// SetStatusCode sets the StatusCode field's value. +func (s *EventItemResponse) SetStatusCode(v int64) *EventItemResponse { + s.StatusCode = &v + return s +} + +// Model for an event publishing subscription export. +type EventStream struct { + _ struct{} `type:"structure"` + + // The ID of the application from which events should be published. + ApplicationId *string `type:"string"` + + // The Amazon Resource Name (ARN) of the Amazon Kinesis stream or Firehose delivery + // stream to which you want to publish events. Firehose ARN: arn:aws:firehose:REGION:ACCOUNT_ID:deliverystream/STREAM_NAME + // Kinesis ARN: arn:aws:kinesis:REGION:ACCOUNT_ID:stream/STREAM_NAME + DestinationStreamArn *string `type:"string"` + + // (Deprecated) Your AWS account ID, which you assigned to the ExternalID key + // in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This + // requirement is removed, and external IDs are not recommended for IAM roles + // assumed by Amazon Pinpoint. + ExternalId *string `type:"string"` + + // The date the event stream was last updated in ISO 8601 format. + LastModifiedDate *string `type:"string"` + + // The IAM user who last modified the event stream. + LastUpdatedBy *string `type:"string"` + + // The IAM role that authorizes Amazon Pinpoint to publish events to the stream + // in your account. + RoleArn *string `type:"string"` +} + +// String returns the string representation +func (s EventStream) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EventStream) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *EventStream) SetApplicationId(v string) *EventStream { + s.ApplicationId = &v + return s +} + +// SetDestinationStreamArn sets the DestinationStreamArn field's value. +func (s *EventStream) SetDestinationStreamArn(v string) *EventStream { + s.DestinationStreamArn = &v + return s +} + +// SetExternalId sets the ExternalId field's value. +func (s *EventStream) SetExternalId(v string) *EventStream { + s.ExternalId = &v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *EventStream) SetLastModifiedDate(v string) *EventStream { + s.LastModifiedDate = &v + return s +} + +// SetLastUpdatedBy sets the LastUpdatedBy field's value. +func (s *EventStream) SetLastUpdatedBy(v string) *EventStream { + s.LastUpdatedBy = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *EventStream) SetRoleArn(v string) *EventStream { + s.RoleArn = &v + return s +} + +// A batch of PublicEndpoints and Events to process. +type EventsBatch struct { + _ struct{} `type:"structure"` + + // The PublicEndpoint attached to the EndpointId from the request. + Endpoint *PublicEndpoint `type:"structure"` + + // An object that contains a set of events associated with the endpoint. + Events map[string]*Event `type:"map"` +} + +// String returns the string representation +func (s EventsBatch) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EventsBatch) GoString() string { + return s.String() +} + +// SetEndpoint sets the Endpoint field's value. +func (s *EventsBatch) SetEndpoint(v *PublicEndpoint) *EventsBatch { + s.Endpoint = v + return s +} + +// SetEvents sets the Events field's value. +func (s *EventsBatch) SetEvents(v map[string]*Event) *EventsBatch { + s.Events = v + return s +} + +// A set of events to process. +type EventsRequest struct { + _ struct{} `type:"structure"` + + // A batch of events to process. Each BatchItem consists of an endpoint ID as + // the key, and an EventsBatch object as the value. + BatchItem map[string]*EventsBatch `type:"map"` +} + +// String returns the string representation +func (s EventsRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EventsRequest) GoString() string { + return s.String() +} + +// SetBatchItem sets the BatchItem field's value. +func (s *EventsRequest) SetBatchItem(v map[string]*EventsBatch) *EventsRequest { + s.BatchItem = v + return s +} + +// Custom messages associated with events. +type EventsResponse struct { + _ struct{} `type:"structure"` + + // A map that contains a multipart response for each endpoint. Each item in + // this object uses the endpoint ID as the key, and the item response as the + // value.If no item response exists, the value can also be one of the following: + // 202 (if the request was processed successfully) or 400 (if the payload was + // invalid, or required fields were missing). + Results map[string]*ItemResponse `type:"map"` +} + +// String returns the string representation +func (s EventsResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EventsResponse) GoString() string { + return s.String() +} + +// SetResults sets the Results field's value. +func (s *EventsResponse) SetResults(v map[string]*ItemResponse) *EventsResponse { + s.Results = v + return s +} + +// Export job request. +type ExportJobRequest struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint + // access to the Amazon S3 location that endpoints will be exported to. + RoleArn *string `type:"string"` + + // A URL that points to the location within an Amazon S3 bucket that will receive + // the export. The location is typically a folder with multiple files.The URL + // should follow this format: s3://bucket-name/folder-name/Amazon Pinpoint will + // export endpoints to this location. + S3UrlPrefix *string `type:"string"` + + // The ID of the segment to export endpoints from. If not present, Amazon Pinpoint + // exports all of the endpoints that belong to the application. + SegmentId *string `type:"string"` + + // The version of the segment to export if specified. + SegmentVersion *int64 `type:"integer"` +} + +// String returns the string representation +func (s ExportJobRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportJobRequest) GoString() string { + return s.String() +} + +// SetRoleArn sets the RoleArn field's value. +func (s *ExportJobRequest) SetRoleArn(v string) *ExportJobRequest { + s.RoleArn = &v + return s +} + +// SetS3UrlPrefix sets the S3UrlPrefix field's value. +func (s *ExportJobRequest) SetS3UrlPrefix(v string) *ExportJobRequest { + s.S3UrlPrefix = &v + return s +} + +// SetSegmentId sets the SegmentId field's value. +func (s *ExportJobRequest) SetSegmentId(v string) *ExportJobRequest { + s.SegmentId = &v + return s +} + +// SetSegmentVersion sets the SegmentVersion field's value. +func (s *ExportJobRequest) SetSegmentVersion(v int64) *ExportJobRequest { + s.SegmentVersion = &v + return s +} + +// Export job resource. +type ExportJobResource struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint + // access to the Amazon S3 location that endpoints will be exported to. + RoleArn *string `type:"string"` + + // A URL that points to the location within an Amazon S3 bucket that will receive + // the export. The location is typically a folder with multiple files.The URL + // should follow this format: s3://bucket-name/folder-name/Amazon Pinpoint will + // export endpoints to this location. + S3UrlPrefix *string `type:"string"` + + // The ID of the segment to export endpoints from. If not present, Amazon Pinpoint + // exports all of the endpoints that belong to the application. + SegmentId *string `type:"string"` + + // The version of the segment to export if specified. + SegmentVersion *int64 `type:"integer"` +} + +// String returns the string representation +func (s ExportJobResource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportJobResource) GoString() string { + return s.String() +} + +// SetRoleArn sets the RoleArn field's value. +func (s *ExportJobResource) SetRoleArn(v string) *ExportJobResource { + s.RoleArn = &v + return s +} + +// SetS3UrlPrefix sets the S3UrlPrefix field's value. +func (s *ExportJobResource) SetS3UrlPrefix(v string) *ExportJobResource { + s.S3UrlPrefix = &v + return s +} + +// SetSegmentId sets the SegmentId field's value. +func (s *ExportJobResource) SetSegmentId(v string) *ExportJobResource { + s.SegmentId = &v + return s +} + +// SetSegmentVersion sets the SegmentVersion field's value. +func (s *ExportJobResource) SetSegmentVersion(v int64) *ExportJobResource { + s.SegmentVersion = &v + return s +} + +// Export job response. +type ExportJobResponse struct { + _ struct{} `type:"structure"` + + // The unique ID of the application associated with the export job. + ApplicationId *string `type:"string"` + + // The number of pieces that have successfully completed as of the time of the + // request. + CompletedPieces *int64 `type:"integer"` + + // The date the job completed in ISO 8601 format. + CompletionDate *string `type:"string"` + + // The date the job was created in ISO 8601 format. + CreationDate *string `type:"string"` + + // The export job settings. + Definition *ExportJobResource `type:"structure"` + + // The number of pieces that failed to be processed as of the time of the request. + FailedPieces *int64 `type:"integer"` + + // Provides up to 100 of the first failed entries for the job, if any exist. + Failures []*string `type:"list"` + + // The unique ID of the job. + Id *string `type:"string"` + + // The status of the job.Valid values: CREATED, INITIALIZING, PROCESSING, COMPLETING, + // COMPLETED, FAILING, FAILEDThe job status is FAILED if one or more pieces + // failed. + JobStatus *string `type:"string" enum:"JobStatus"` + + // The number of endpoints that were not processed; for example, because of + // syntax errors. + TotalFailures *int64 `type:"integer"` + + // The total number of pieces that must be processed to finish the job. Each + // piece is an approximately equal portion of the endpoints. + TotalPieces *int64 `type:"integer"` + + // The number of endpoints that were processed by the job. + TotalProcessed *int64 `type:"integer"` + + // The job type. Will be 'EXPORT'. + Type *string `type:"string"` +} + +// String returns the string representation +func (s ExportJobResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportJobResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *ExportJobResponse) SetApplicationId(v string) *ExportJobResponse { + s.ApplicationId = &v + return s +} + +// SetCompletedPieces sets the CompletedPieces field's value. +func (s *ExportJobResponse) SetCompletedPieces(v int64) *ExportJobResponse { + s.CompletedPieces = &v + return s +} + +// SetCompletionDate sets the CompletionDate field's value. +func (s *ExportJobResponse) SetCompletionDate(v string) *ExportJobResponse { + s.CompletionDate = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *ExportJobResponse) SetCreationDate(v string) *ExportJobResponse { + s.CreationDate = &v + return s +} + +// SetDefinition sets the Definition field's value. +func (s *ExportJobResponse) SetDefinition(v *ExportJobResource) *ExportJobResponse { + s.Definition = v + return s +} + +// SetFailedPieces sets the FailedPieces field's value. +func (s *ExportJobResponse) SetFailedPieces(v int64) *ExportJobResponse { + s.FailedPieces = &v + return s +} + +// SetFailures sets the Failures field's value. +func (s *ExportJobResponse) SetFailures(v []*string) *ExportJobResponse { + s.Failures = v + return s +} + +// SetId sets the Id field's value. +func (s *ExportJobResponse) SetId(v string) *ExportJobResponse { + s.Id = &v + return s +} + +// SetJobStatus sets the JobStatus field's value. +func (s *ExportJobResponse) SetJobStatus(v string) *ExportJobResponse { + s.JobStatus = &v + return s +} + +// SetTotalFailures sets the TotalFailures field's value. +func (s *ExportJobResponse) SetTotalFailures(v int64) *ExportJobResponse { + s.TotalFailures = &v + return s +} + +// SetTotalPieces sets the TotalPieces field's value. +func (s *ExportJobResponse) SetTotalPieces(v int64) *ExportJobResponse { + s.TotalPieces = &v + return s +} + +// SetTotalProcessed sets the TotalProcessed field's value. +func (s *ExportJobResponse) SetTotalProcessed(v int64) *ExportJobResponse { + s.TotalProcessed = &v + return s +} + +// SetType sets the Type field's value. +func (s *ExportJobResponse) SetType(v string) *ExportJobResponse { + s.Type = &v + return s +} + +// Export job list. +type ExportJobsResponse struct { + _ struct{} `type:"structure"` + + // A list of export jobs for the application. + Item []*ExportJobResponse `type:"list"` + + // The string that you use in a subsequent request to get the next page of results + // in a paginated response. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ExportJobsResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExportJobsResponse) GoString() string { + return s.String() +} + +// SetItem sets the Item field's value. +func (s *ExportJobsResponse) SetItem(v []*ExportJobResponse) *ExportJobsResponse { + s.Item = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ExportJobsResponse) SetNextToken(v string) *ExportJobsResponse { + s.NextToken = &v + return s +} + +// Google Cloud Messaging credentials +type GCMChannelRequest struct { + _ struct{} `type:"structure"` + + // Platform credential API key from Google. + ApiKey *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` +} + +// String returns the string representation +func (s GCMChannelRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GCMChannelRequest) GoString() string { + return s.String() +} + +// SetApiKey sets the ApiKey field's value. +func (s *GCMChannelRequest) SetApiKey(v string) *GCMChannelRequest { + s.ApiKey = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *GCMChannelRequest) SetEnabled(v bool) *GCMChannelRequest { + s.Enabled = &v + return s +} + +// Google Cloud Messaging channel definition +type GCMChannelResponse struct { + _ struct{} `type:"structure"` + + // The ID of the application to which the channel applies. + ApplicationId *string `type:"string"` + + // When was this segment created + CreationDate *string `type:"string"` + + // The GCM API key from Google. + Credential *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // Not used. Retained for backwards compatibility. + HasCredential *bool `type:"boolean"` + + // Channel ID. Not used. Present only for backwards compatibility. + Id *string `type:"string"` + + // Is this channel archived + IsArchived *bool `type:"boolean"` + + // Who last updated this entry + LastModifiedBy *string `type:"string"` + + // Last date this was updated + LastModifiedDate *string `type:"string"` + + // The platform type. Will be GCM + Platform *string `type:"string"` + + // Version of channel + Version *int64 `type:"integer"` +} + +// String returns the string representation +func (s GCMChannelResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GCMChannelResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GCMChannelResponse) SetApplicationId(v string) *GCMChannelResponse { + s.ApplicationId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *GCMChannelResponse) SetCreationDate(v string) *GCMChannelResponse { + s.CreationDate = &v + return s +} + +// SetCredential sets the Credential field's value. +func (s *GCMChannelResponse) SetCredential(v string) *GCMChannelResponse { + s.Credential = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *GCMChannelResponse) SetEnabled(v bool) *GCMChannelResponse { + s.Enabled = &v + return s +} + +// SetHasCredential sets the HasCredential field's value. +func (s *GCMChannelResponse) SetHasCredential(v bool) *GCMChannelResponse { + s.HasCredential = &v + return s +} + +// SetId sets the Id field's value. +func (s *GCMChannelResponse) SetId(v string) *GCMChannelResponse { + s.Id = &v + return s +} + +// SetIsArchived sets the IsArchived field's value. +func (s *GCMChannelResponse) SetIsArchived(v bool) *GCMChannelResponse { + s.IsArchived = &v + return s +} + +// SetLastModifiedBy sets the LastModifiedBy field's value. +func (s *GCMChannelResponse) SetLastModifiedBy(v string) *GCMChannelResponse { + s.LastModifiedBy = &v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *GCMChannelResponse) SetLastModifiedDate(v string) *GCMChannelResponse { + s.LastModifiedDate = &v + return s +} + +// SetPlatform sets the Platform field's value. +func (s *GCMChannelResponse) SetPlatform(v string) *GCMChannelResponse { + s.Platform = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *GCMChannelResponse) SetVersion(v int64) *GCMChannelResponse { + s.Version = &v + return s +} + +// GCM Message. +type GCMMessage struct { + _ struct{} `type:"structure"` + + // The action that occurs if the user taps a push notification delivered by + // the campaign: OPEN_APP - Your app launches, or it becomes the foreground + // app if it has been sent to the background. This is the default action. DEEP_LINK + // - Uses deep linking features in iOS and Android to open your app and display + // a designated user interface within the app. URL - The default mobile browser + // on the user's device launches and opens a web page at the URL you specify. + // Possible values include: OPEN_APP | DEEP_LINK | URL + Action *string `type:"string" enum:"Action"` + + // The message body of the notification. + Body *string `type:"string"` + + // This parameter identifies a group of messages (e.g., with collapse_key: "Updates + // Available") that can be collapsed, so that only the last message gets sent + // when delivery can be resumed. This is intended to avoid sending too many + // of the same messages when the device comes back online or becomes active. + CollapseKey *string `type:"string"` + + // The data payload used for a silent push. This payload is added to the notifications' + // data.pinpoint.jsonBody' object + Data map[string]*string `type:"map"` + + // The icon image name of the asset saved in your application. + IconReference *string `type:"string"` + + // The URL that points to an image used as the large icon to the notification + // content view. + ImageIconUrl *string `type:"string"` + + // The URL that points to an image used in the push notification. + ImageUrl *string `type:"string"` + + // The message priority. Amazon Pinpoint uses this value to set the FCM or GCM + // priority parameter when it sends the message. Accepts the following values:"Normal" + // - Messages might be delayed. Delivery is optimized for battery usage on the + // receiving device. Use normal priority unless immediate delivery is required."High" + // - Messages are sent immediately and might wake a sleeping device.The equivalent + // values for APNs messages are "5" and "10". Amazon Pinpoint accepts these + // values here and converts them.For more information, see About FCM Messages + // in the Firebase documentation. + Priority *string `type:"string"` + + // The Raw JSON formatted string to be used as the payload. This value overrides + // the message. + RawContent *string `type:"string"` + + // This parameter specifies the package name of the application where the registration + // tokens must match in order to receive the message. + RestrictedPackageName *string `type:"string"` + + // Indicates if the message should display on the users device. Silent pushes + // can be used for Remote Configuration and Phone Home use cases. + SilentPush *bool `type:"boolean"` + + // The URL that points to an image used as the small icon for the notification + // which will be used to represent the notification in the status bar and content + // view + SmallImageIconUrl *string `type:"string"` + + // Indicates a sound to play when the device receives the notification. Supports + // default, or the filename of a sound resource bundled in the app. Android + // sound files must reside in /res/raw/ + Sound *string `type:"string"` + + // Default message substitutions. Can be overridden by individual address substitutions. + Substitutions map[string][]*string `type:"map"` + + // The length of time (in seconds) that FCM or GCM stores and attempts to deliver + // the message. If unspecified, the value defaults to the maximum, which is + // 2,419,200 seconds (28 days). Amazon Pinpoint uses this value to set the FCM + // or GCM time_to_live parameter. + TimeToLive *int64 `type:"integer"` + + // The message title that displays above the message on the user's device. + Title *string `type:"string"` + + // The URL to open in the user's mobile browser. Used if the value for Action + // is URL. + Url *string `type:"string"` +} + +// String returns the string representation +func (s GCMMessage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GCMMessage) GoString() string { + return s.String() +} + +// SetAction sets the Action field's value. +func (s *GCMMessage) SetAction(v string) *GCMMessage { + s.Action = &v + return s +} + +// SetBody sets the Body field's value. +func (s *GCMMessage) SetBody(v string) *GCMMessage { + s.Body = &v + return s +} + +// SetCollapseKey sets the CollapseKey field's value. +func (s *GCMMessage) SetCollapseKey(v string) *GCMMessage { + s.CollapseKey = &v + return s +} + +// SetData sets the Data field's value. +func (s *GCMMessage) SetData(v map[string]*string) *GCMMessage { + s.Data = v + return s +} + +// SetIconReference sets the IconReference field's value. +func (s *GCMMessage) SetIconReference(v string) *GCMMessage { + s.IconReference = &v + return s +} + +// SetImageIconUrl sets the ImageIconUrl field's value. +func (s *GCMMessage) SetImageIconUrl(v string) *GCMMessage { + s.ImageIconUrl = &v + return s +} + +// SetImageUrl sets the ImageUrl field's value. +func (s *GCMMessage) SetImageUrl(v string) *GCMMessage { + s.ImageUrl = &v + return s +} + +// SetPriority sets the Priority field's value. +func (s *GCMMessage) SetPriority(v string) *GCMMessage { + s.Priority = &v + return s +} + +// SetRawContent sets the RawContent field's value. +func (s *GCMMessage) SetRawContent(v string) *GCMMessage { + s.RawContent = &v + return s +} + +// SetRestrictedPackageName sets the RestrictedPackageName field's value. +func (s *GCMMessage) SetRestrictedPackageName(v string) *GCMMessage { + s.RestrictedPackageName = &v + return s +} + +// SetSilentPush sets the SilentPush field's value. +func (s *GCMMessage) SetSilentPush(v bool) *GCMMessage { + s.SilentPush = &v + return s +} + +// SetSmallImageIconUrl sets the SmallImageIconUrl field's value. +func (s *GCMMessage) SetSmallImageIconUrl(v string) *GCMMessage { + s.SmallImageIconUrl = &v + return s +} + +// SetSound sets the Sound field's value. +func (s *GCMMessage) SetSound(v string) *GCMMessage { + s.Sound = &v + return s +} + +// SetSubstitutions sets the Substitutions field's value. +func (s *GCMMessage) SetSubstitutions(v map[string][]*string) *GCMMessage { + s.Substitutions = v + return s +} + +// SetTimeToLive sets the TimeToLive field's value. +func (s *GCMMessage) SetTimeToLive(v int64) *GCMMessage { + s.TimeToLive = &v + return s +} + +// SetTitle sets the Title field's value. +func (s *GCMMessage) SetTitle(v string) *GCMMessage { + s.Title = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *GCMMessage) SetUrl(v string) *GCMMessage { + s.Url = &v + return s +} + +// GPS coordinates +type GPSCoordinates struct { + _ struct{} `type:"structure"` + + // Latitude + Latitude *float64 `type:"double"` + + // Longitude + Longitude *float64 `type:"double"` +} + +// String returns the string representation +func (s GPSCoordinates) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GPSCoordinates) GoString() string { + return s.String() +} + +// SetLatitude sets the Latitude field's value. +func (s *GPSCoordinates) SetLatitude(v float64) *GPSCoordinates { + s.Latitude = &v + return s +} + +// SetLongitude sets the Longitude field's value. +func (s *GPSCoordinates) SetLongitude(v float64) *GPSCoordinates { + s.Longitude = &v + return s +} + +// GPS point location dimension +type GPSPointDimension struct { + _ struct{} `type:"structure"` + + // Coordinate to measure distance from. + Coordinates *GPSCoordinates `type:"structure"` + + // Range in kilometers from the coordinate. + RangeInKilometers *float64 `type:"double"` +} + +// String returns the string representation +func (s GPSPointDimension) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GPSPointDimension) GoString() string { + return s.String() +} + +// SetCoordinates sets the Coordinates field's value. +func (s *GPSPointDimension) SetCoordinates(v *GPSCoordinates) *GPSPointDimension { + s.Coordinates = v + return s +} + +// SetRangeInKilometers sets the RangeInKilometers field's value. +func (s *GPSPointDimension) SetRangeInKilometers(v float64) *GPSPointDimension { + s.RangeInKilometers = &v + return s +} + +type GetAdmChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetAdmChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAdmChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetAdmChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetAdmChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetAdmChannelInput) SetApplicationId(v string) *GetAdmChannelInput { + s.ApplicationId = &v + return s +} + +type GetAdmChannelOutput struct { + _ struct{} `type:"structure" payload:"ADMChannelResponse"` + + // Amazon Device Messaging channel definition. + // + // ADMChannelResponse is a required field + ADMChannelResponse *ADMChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetAdmChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAdmChannelOutput) GoString() string { + return s.String() +} + +// SetADMChannelResponse sets the ADMChannelResponse field's value. +func (s *GetAdmChannelOutput) SetADMChannelResponse(v *ADMChannelResponse) *GetAdmChannelOutput { + s.ADMChannelResponse = v + return s +} + +type GetApnsChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetApnsChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApnsChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetApnsChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetApnsChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetApnsChannelInput) SetApplicationId(v string) *GetApnsChannelInput { + s.ApplicationId = &v + return s +} + +type GetApnsChannelOutput struct { + _ struct{} `type:"structure" payload:"APNSChannelResponse"` + + // Apple Distribution Push Notification Service channel definition. + // + // APNSChannelResponse is a required field + APNSChannelResponse *APNSChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetApnsChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApnsChannelOutput) GoString() string { + return s.String() +} + +// SetAPNSChannelResponse sets the APNSChannelResponse field's value. +func (s *GetApnsChannelOutput) SetAPNSChannelResponse(v *APNSChannelResponse) *GetApnsChannelOutput { + s.APNSChannelResponse = v + return s +} + +type GetApnsSandboxChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetApnsSandboxChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApnsSandboxChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetApnsSandboxChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetApnsSandboxChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetApnsSandboxChannelInput) SetApplicationId(v string) *GetApnsSandboxChannelInput { + s.ApplicationId = &v + return s +} + +type GetApnsSandboxChannelOutput struct { + _ struct{} `type:"structure" payload:"APNSSandboxChannelResponse"` + + // Apple Development Push Notification Service channel definition. + // + // APNSSandboxChannelResponse is a required field + APNSSandboxChannelResponse *APNSSandboxChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetApnsSandboxChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApnsSandboxChannelOutput) GoString() string { + return s.String() +} + +// SetAPNSSandboxChannelResponse sets the APNSSandboxChannelResponse field's value. +func (s *GetApnsSandboxChannelOutput) SetAPNSSandboxChannelResponse(v *APNSSandboxChannelResponse) *GetApnsSandboxChannelOutput { + s.APNSSandboxChannelResponse = v + return s +} + +type GetApnsVoipChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetApnsVoipChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApnsVoipChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetApnsVoipChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetApnsVoipChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetApnsVoipChannelInput) SetApplicationId(v string) *GetApnsVoipChannelInput { + s.ApplicationId = &v + return s +} + +type GetApnsVoipChannelOutput struct { + _ struct{} `type:"structure" payload:"APNSVoipChannelResponse"` + + // Apple VoIP Push Notification Service channel definition. + // + // APNSVoipChannelResponse is a required field + APNSVoipChannelResponse *APNSVoipChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetApnsVoipChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApnsVoipChannelOutput) GoString() string { + return s.String() +} + +// SetAPNSVoipChannelResponse sets the APNSVoipChannelResponse field's value. +func (s *GetApnsVoipChannelOutput) SetAPNSVoipChannelResponse(v *APNSVoipChannelResponse) *GetApnsVoipChannelOutput { + s.APNSVoipChannelResponse = v + return s +} + +type GetApnsVoipSandboxChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetApnsVoipSandboxChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApnsVoipSandboxChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetApnsVoipSandboxChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetApnsVoipSandboxChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetApnsVoipSandboxChannelInput) SetApplicationId(v string) *GetApnsVoipSandboxChannelInput { + s.ApplicationId = &v + return s +} + +type GetApnsVoipSandboxChannelOutput struct { + _ struct{} `type:"structure" payload:"APNSVoipSandboxChannelResponse"` + + // Apple VoIP Developer Push Notification Service channel definition. + // + // APNSVoipSandboxChannelResponse is a required field + APNSVoipSandboxChannelResponse *APNSVoipSandboxChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetApnsVoipSandboxChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApnsVoipSandboxChannelOutput) GoString() string { + return s.String() +} + +// SetAPNSVoipSandboxChannelResponse sets the APNSVoipSandboxChannelResponse field's value. +func (s *GetApnsVoipSandboxChannelOutput) SetAPNSVoipSandboxChannelResponse(v *APNSVoipSandboxChannelResponse) *GetApnsVoipSandboxChannelOutput { + s.APNSVoipSandboxChannelResponse = v + return s +} + +type GetAppInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetAppInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAppInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetAppInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetAppInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetAppInput) SetApplicationId(v string) *GetAppInput { + s.ApplicationId = &v + return s +} + +type GetAppOutput struct { + _ struct{} `type:"structure" payload:"ApplicationResponse"` + + // Application Response. + // + // ApplicationResponse is a required field + ApplicationResponse *ApplicationResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetAppOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAppOutput) GoString() string { + return s.String() +} + +// SetApplicationResponse sets the ApplicationResponse field's value. +func (s *GetAppOutput) SetApplicationResponse(v *ApplicationResponse) *GetAppOutput { + s.ApplicationResponse = v + return s +} + +type GetApplicationSettingsInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetApplicationSettingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApplicationSettingsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetApplicationSettingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetApplicationSettingsInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetApplicationSettingsInput) SetApplicationId(v string) *GetApplicationSettingsInput { + s.ApplicationId = &v + return s +} + +type GetApplicationSettingsOutput struct { + _ struct{} `type:"structure" payload:"ApplicationSettingsResource"` + + // Application settings. + // + // ApplicationSettingsResource is a required field + ApplicationSettingsResource *ApplicationSettingsResource `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetApplicationSettingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetApplicationSettingsOutput) GoString() string { + return s.String() +} + +// SetApplicationSettingsResource sets the ApplicationSettingsResource field's value. +func (s *GetApplicationSettingsOutput) SetApplicationSettingsResource(v *ApplicationSettingsResource) *GetApplicationSettingsOutput { + s.ApplicationSettingsResource = v + return s +} + +type GetAppsInput struct { + _ struct{} `type:"structure"` + + PageSize *string `location:"querystring" locationName:"page-size" type:"string"` + + Token *string `location:"querystring" locationName:"token" type:"string"` +} + +// String returns the string representation +func (s GetAppsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAppsInput) GoString() string { + return s.String() +} + +// SetPageSize sets the PageSize field's value. +func (s *GetAppsInput) SetPageSize(v string) *GetAppsInput { + s.PageSize = &v + return s +} + +// SetToken sets the Token field's value. +func (s *GetAppsInput) SetToken(v string) *GetAppsInput { + s.Token = &v + return s +} + +type GetAppsOutput struct { + _ struct{} `type:"structure" payload:"ApplicationsResponse"` + + // Get Applications Result. + // + // ApplicationsResponse is a required field + ApplicationsResponse *ApplicationsResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetAppsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAppsOutput) GoString() string { + return s.String() +} + +// SetApplicationsResponse sets the ApplicationsResponse field's value. +func (s *GetAppsOutput) SetApplicationsResponse(v *ApplicationsResponse) *GetAppsOutput { + s.ApplicationsResponse = v + return s +} + +type GetBaiduChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetBaiduChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetBaiduChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetBaiduChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetBaiduChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetBaiduChannelInput) SetApplicationId(v string) *GetBaiduChannelInput { + s.ApplicationId = &v + return s +} + +type GetBaiduChannelOutput struct { + _ struct{} `type:"structure" payload:"BaiduChannelResponse"` + + // Baidu Cloud Messaging channel definition + // + // BaiduChannelResponse is a required field + BaiduChannelResponse *BaiduChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetBaiduChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetBaiduChannelOutput) GoString() string { + return s.String() +} + +// SetBaiduChannelResponse sets the BaiduChannelResponse field's value. +func (s *GetBaiduChannelOutput) SetBaiduChannelResponse(v *BaiduChannelResponse) *GetBaiduChannelOutput { + s.BaiduChannelResponse = v + return s +} + +type GetCampaignActivitiesInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // CampaignId is a required field + CampaignId *string `location:"uri" locationName:"campaign-id" type:"string" required:"true"` + + PageSize *string `location:"querystring" locationName:"page-size" type:"string"` + + Token *string `location:"querystring" locationName:"token" type:"string"` +} + +// String returns the string representation +func (s GetCampaignActivitiesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCampaignActivitiesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCampaignActivitiesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCampaignActivitiesInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.CampaignId == nil { + invalidParams.Add(request.NewErrParamRequired("CampaignId")) + } + if s.CampaignId != nil && len(*s.CampaignId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CampaignId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetCampaignActivitiesInput) SetApplicationId(v string) *GetCampaignActivitiesInput { + s.ApplicationId = &v + return s +} + +// SetCampaignId sets the CampaignId field's value. +func (s *GetCampaignActivitiesInput) SetCampaignId(v string) *GetCampaignActivitiesInput { + s.CampaignId = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *GetCampaignActivitiesInput) SetPageSize(v string) *GetCampaignActivitiesInput { + s.PageSize = &v + return s +} + +// SetToken sets the Token field's value. +func (s *GetCampaignActivitiesInput) SetToken(v string) *GetCampaignActivitiesInput { + s.Token = &v + return s +} + +type GetCampaignActivitiesOutput struct { + _ struct{} `type:"structure" payload:"ActivitiesResponse"` + + // Activities for campaign. + // + // ActivitiesResponse is a required field + ActivitiesResponse *ActivitiesResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetCampaignActivitiesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCampaignActivitiesOutput) GoString() string { + return s.String() +} + +// SetActivitiesResponse sets the ActivitiesResponse field's value. +func (s *GetCampaignActivitiesOutput) SetActivitiesResponse(v *ActivitiesResponse) *GetCampaignActivitiesOutput { + s.ActivitiesResponse = v + return s +} + +type GetCampaignInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // CampaignId is a required field + CampaignId *string `location:"uri" locationName:"campaign-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetCampaignInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCampaignInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCampaignInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCampaignInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.CampaignId == nil { + invalidParams.Add(request.NewErrParamRequired("CampaignId")) + } + if s.CampaignId != nil && len(*s.CampaignId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CampaignId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetCampaignInput) SetApplicationId(v string) *GetCampaignInput { + s.ApplicationId = &v + return s +} + +// SetCampaignId sets the CampaignId field's value. +func (s *GetCampaignInput) SetCampaignId(v string) *GetCampaignInput { + s.CampaignId = &v + return s +} + +type GetCampaignOutput struct { + _ struct{} `type:"structure" payload:"CampaignResponse"` + + // Campaign definition + // + // CampaignResponse is a required field + CampaignResponse *CampaignResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetCampaignOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCampaignOutput) GoString() string { + return s.String() +} + +// SetCampaignResponse sets the CampaignResponse field's value. +func (s *GetCampaignOutput) SetCampaignResponse(v *CampaignResponse) *GetCampaignOutput { + s.CampaignResponse = v + return s +} + +type GetCampaignVersionInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // CampaignId is a required field + CampaignId *string `location:"uri" locationName:"campaign-id" type:"string" required:"true"` + + // Version is a required field + Version *string `location:"uri" locationName:"version" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetCampaignVersionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCampaignVersionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCampaignVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCampaignVersionInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.CampaignId == nil { + invalidParams.Add(request.NewErrParamRequired("CampaignId")) + } + if s.CampaignId != nil && len(*s.CampaignId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CampaignId", 1)) + } + if s.Version == nil { + invalidParams.Add(request.NewErrParamRequired("Version")) + } + if s.Version != nil && len(*s.Version) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Version", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetCampaignVersionInput) SetApplicationId(v string) *GetCampaignVersionInput { + s.ApplicationId = &v + return s +} + +// SetCampaignId sets the CampaignId field's value. +func (s *GetCampaignVersionInput) SetCampaignId(v string) *GetCampaignVersionInput { + s.CampaignId = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *GetCampaignVersionInput) SetVersion(v string) *GetCampaignVersionInput { + s.Version = &v + return s +} + +type GetCampaignVersionOutput struct { + _ struct{} `type:"structure" payload:"CampaignResponse"` + + // Campaign definition + // + // CampaignResponse is a required field + CampaignResponse *CampaignResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetCampaignVersionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCampaignVersionOutput) GoString() string { + return s.String() +} + +// SetCampaignResponse sets the CampaignResponse field's value. +func (s *GetCampaignVersionOutput) SetCampaignResponse(v *CampaignResponse) *GetCampaignVersionOutput { + s.CampaignResponse = v + return s +} + +type GetCampaignVersionsInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // CampaignId is a required field + CampaignId *string `location:"uri" locationName:"campaign-id" type:"string" required:"true"` + + PageSize *string `location:"querystring" locationName:"page-size" type:"string"` + + Token *string `location:"querystring" locationName:"token" type:"string"` +} + +// String returns the string representation +func (s GetCampaignVersionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCampaignVersionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCampaignVersionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCampaignVersionsInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.CampaignId == nil { + invalidParams.Add(request.NewErrParamRequired("CampaignId")) + } + if s.CampaignId != nil && len(*s.CampaignId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CampaignId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetCampaignVersionsInput) SetApplicationId(v string) *GetCampaignVersionsInput { + s.ApplicationId = &v + return s +} + +// SetCampaignId sets the CampaignId field's value. +func (s *GetCampaignVersionsInput) SetCampaignId(v string) *GetCampaignVersionsInput { + s.CampaignId = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *GetCampaignVersionsInput) SetPageSize(v string) *GetCampaignVersionsInput { + s.PageSize = &v + return s +} + +// SetToken sets the Token field's value. +func (s *GetCampaignVersionsInput) SetToken(v string) *GetCampaignVersionsInput { + s.Token = &v + return s +} + +type GetCampaignVersionsOutput struct { + _ struct{} `type:"structure" payload:"CampaignsResponse"` + + // List of available campaigns. + // + // CampaignsResponse is a required field + CampaignsResponse *CampaignsResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetCampaignVersionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCampaignVersionsOutput) GoString() string { + return s.String() +} + +// SetCampaignsResponse sets the CampaignsResponse field's value. +func (s *GetCampaignVersionsOutput) SetCampaignsResponse(v *CampaignsResponse) *GetCampaignVersionsOutput { + s.CampaignsResponse = v + return s +} + +type GetCampaignsInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + PageSize *string `location:"querystring" locationName:"page-size" type:"string"` + + Token *string `location:"querystring" locationName:"token" type:"string"` +} + +// String returns the string representation +func (s GetCampaignsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCampaignsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCampaignsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCampaignsInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetCampaignsInput) SetApplicationId(v string) *GetCampaignsInput { + s.ApplicationId = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *GetCampaignsInput) SetPageSize(v string) *GetCampaignsInput { + s.PageSize = &v + return s +} + +// SetToken sets the Token field's value. +func (s *GetCampaignsInput) SetToken(v string) *GetCampaignsInput { + s.Token = &v + return s +} + +type GetCampaignsOutput struct { + _ struct{} `type:"structure" payload:"CampaignsResponse"` + + // List of available campaigns. + // + // CampaignsResponse is a required field + CampaignsResponse *CampaignsResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetCampaignsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetCampaignsOutput) GoString() string { + return s.String() +} + +// SetCampaignsResponse sets the CampaignsResponse field's value. +func (s *GetCampaignsOutput) SetCampaignsResponse(v *CampaignsResponse) *GetCampaignsOutput { + s.CampaignsResponse = v + return s +} + +type GetChannelsInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetChannelsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetChannelsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetChannelsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetChannelsInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetChannelsInput) SetApplicationId(v string) *GetChannelsInput { + s.ApplicationId = &v + return s +} + +type GetChannelsOutput struct { + _ struct{} `type:"structure" payload:"ChannelsResponse"` + + // Get channels definition + // + // ChannelsResponse is a required field + ChannelsResponse *ChannelsResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetChannelsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetChannelsOutput) GoString() string { + return s.String() +} + +// SetChannelsResponse sets the ChannelsResponse field's value. +func (s *GetChannelsOutput) SetChannelsResponse(v *ChannelsResponse) *GetChannelsOutput { + s.ChannelsResponse = v + return s +} + +type GetEmailChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetEmailChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetEmailChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetEmailChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetEmailChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetEmailChannelInput) SetApplicationId(v string) *GetEmailChannelInput { + s.ApplicationId = &v + return s +} + +type GetEmailChannelOutput struct { + _ struct{} `type:"structure" payload:"EmailChannelResponse"` + + // Email Channel Response. + // + // EmailChannelResponse is a required field + EmailChannelResponse *EmailChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetEmailChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetEmailChannelOutput) GoString() string { + return s.String() +} + +// SetEmailChannelResponse sets the EmailChannelResponse field's value. +func (s *GetEmailChannelOutput) SetEmailChannelResponse(v *EmailChannelResponse) *GetEmailChannelOutput { + s.EmailChannelResponse = v + return s +} + +type GetEndpointInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // EndpointId is a required field + EndpointId *string `location:"uri" locationName:"endpoint-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetEndpointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetEndpointInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetEndpointInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.EndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("EndpointId")) + } + if s.EndpointId != nil && len(*s.EndpointId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EndpointId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetEndpointInput) SetApplicationId(v string) *GetEndpointInput { + s.ApplicationId = &v + return s +} + +// SetEndpointId sets the EndpointId field's value. +func (s *GetEndpointInput) SetEndpointId(v string) *GetEndpointInput { + s.EndpointId = &v + return s +} + +type GetEndpointOutput struct { + _ struct{} `type:"structure" payload:"EndpointResponse"` + + // Endpoint response + // + // EndpointResponse is a required field + EndpointResponse *EndpointResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetEndpointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetEndpointOutput) GoString() string { + return s.String() +} + +// SetEndpointResponse sets the EndpointResponse field's value. +func (s *GetEndpointOutput) SetEndpointResponse(v *EndpointResponse) *GetEndpointOutput { + s.EndpointResponse = v + return s +} + +type GetEventStreamInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetEventStreamInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetEventStreamInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetEventStreamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetEventStreamInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetEventStreamInput) SetApplicationId(v string) *GetEventStreamInput { + s.ApplicationId = &v + return s +} + +type GetEventStreamOutput struct { + _ struct{} `type:"structure" payload:"EventStream"` + + // Model for an event publishing subscription export. + // + // EventStream is a required field + EventStream *EventStream `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetEventStreamOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetEventStreamOutput) GoString() string { + return s.String() +} + +// SetEventStream sets the EventStream field's value. +func (s *GetEventStreamOutput) SetEventStream(v *EventStream) *GetEventStreamOutput { + s.EventStream = v + return s +} + +type GetExportJobInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // JobId is a required field + JobId *string `location:"uri" locationName:"job-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetExportJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetExportJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetExportJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetExportJobInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.JobId == nil { + invalidParams.Add(request.NewErrParamRequired("JobId")) + } + if s.JobId != nil && len(*s.JobId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetExportJobInput) SetApplicationId(v string) *GetExportJobInput { + s.ApplicationId = &v + return s +} + +// SetJobId sets the JobId field's value. +func (s *GetExportJobInput) SetJobId(v string) *GetExportJobInput { + s.JobId = &v + return s +} + +type GetExportJobOutput struct { + _ struct{} `type:"structure" payload:"ExportJobResponse"` + + // Export job response. + // + // ExportJobResponse is a required field + ExportJobResponse *ExportJobResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetExportJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetExportJobOutput) GoString() string { + return s.String() +} + +// SetExportJobResponse sets the ExportJobResponse field's value. +func (s *GetExportJobOutput) SetExportJobResponse(v *ExportJobResponse) *GetExportJobOutput { + s.ExportJobResponse = v + return s +} + +type GetExportJobsInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + PageSize *string `location:"querystring" locationName:"page-size" type:"string"` + + Token *string `location:"querystring" locationName:"token" type:"string"` +} + +// String returns the string representation +func (s GetExportJobsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetExportJobsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetExportJobsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetExportJobsInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetExportJobsInput) SetApplicationId(v string) *GetExportJobsInput { + s.ApplicationId = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *GetExportJobsInput) SetPageSize(v string) *GetExportJobsInput { + s.PageSize = &v + return s +} + +// SetToken sets the Token field's value. +func (s *GetExportJobsInput) SetToken(v string) *GetExportJobsInput { + s.Token = &v + return s +} + +type GetExportJobsOutput struct { + _ struct{} `type:"structure" payload:"ExportJobsResponse"` + + // Export job list. + // + // ExportJobsResponse is a required field + ExportJobsResponse *ExportJobsResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetExportJobsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetExportJobsOutput) GoString() string { + return s.String() +} + +// SetExportJobsResponse sets the ExportJobsResponse field's value. +func (s *GetExportJobsOutput) SetExportJobsResponse(v *ExportJobsResponse) *GetExportJobsOutput { + s.ExportJobsResponse = v + return s +} + +type GetGcmChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetGcmChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetGcmChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetGcmChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetGcmChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetGcmChannelInput) SetApplicationId(v string) *GetGcmChannelInput { + s.ApplicationId = &v + return s +} + +type GetGcmChannelOutput struct { + _ struct{} `type:"structure" payload:"GCMChannelResponse"` + + // Google Cloud Messaging channel definition + // + // GCMChannelResponse is a required field + GCMChannelResponse *GCMChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetGcmChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetGcmChannelOutput) GoString() string { + return s.String() +} + +// SetGCMChannelResponse sets the GCMChannelResponse field's value. +func (s *GetGcmChannelOutput) SetGCMChannelResponse(v *GCMChannelResponse) *GetGcmChannelOutput { + s.GCMChannelResponse = v + return s +} + +type GetImportJobInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // JobId is a required field + JobId *string `location:"uri" locationName:"job-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetImportJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetImportJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetImportJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetImportJobInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.JobId == nil { + invalidParams.Add(request.NewErrParamRequired("JobId")) + } + if s.JobId != nil && len(*s.JobId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetImportJobInput) SetApplicationId(v string) *GetImportJobInput { + s.ApplicationId = &v + return s +} + +// SetJobId sets the JobId field's value. +func (s *GetImportJobInput) SetJobId(v string) *GetImportJobInput { + s.JobId = &v + return s +} + +type GetImportJobOutput struct { + _ struct{} `type:"structure" payload:"ImportJobResponse"` + + // Import job response. + // + // ImportJobResponse is a required field + ImportJobResponse *ImportJobResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetImportJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetImportJobOutput) GoString() string { + return s.String() +} + +// SetImportJobResponse sets the ImportJobResponse field's value. +func (s *GetImportJobOutput) SetImportJobResponse(v *ImportJobResponse) *GetImportJobOutput { + s.ImportJobResponse = v + return s +} + +type GetImportJobsInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + PageSize *string `location:"querystring" locationName:"page-size" type:"string"` + + Token *string `location:"querystring" locationName:"token" type:"string"` +} + +// String returns the string representation +func (s GetImportJobsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetImportJobsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetImportJobsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetImportJobsInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetImportJobsInput) SetApplicationId(v string) *GetImportJobsInput { + s.ApplicationId = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *GetImportJobsInput) SetPageSize(v string) *GetImportJobsInput { + s.PageSize = &v + return s +} + +// SetToken sets the Token field's value. +func (s *GetImportJobsInput) SetToken(v string) *GetImportJobsInput { + s.Token = &v + return s +} + +type GetImportJobsOutput struct { + _ struct{} `type:"structure" payload:"ImportJobsResponse"` + + // Import job list. + // + // ImportJobsResponse is a required field + ImportJobsResponse *ImportJobsResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetImportJobsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetImportJobsOutput) GoString() string { + return s.String() +} + +// SetImportJobsResponse sets the ImportJobsResponse field's value. +func (s *GetImportJobsOutput) SetImportJobsResponse(v *ImportJobsResponse) *GetImportJobsOutput { + s.ImportJobsResponse = v + return s +} + +type GetSegmentExportJobsInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + PageSize *string `location:"querystring" locationName:"page-size" type:"string"` + + // SegmentId is a required field + SegmentId *string `location:"uri" locationName:"segment-id" type:"string" required:"true"` + + Token *string `location:"querystring" locationName:"token" type:"string"` +} + +// String returns the string representation +func (s GetSegmentExportJobsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSegmentExportJobsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetSegmentExportJobsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetSegmentExportJobsInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.SegmentId == nil { + invalidParams.Add(request.NewErrParamRequired("SegmentId")) + } + if s.SegmentId != nil && len(*s.SegmentId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SegmentId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetSegmentExportJobsInput) SetApplicationId(v string) *GetSegmentExportJobsInput { + s.ApplicationId = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *GetSegmentExportJobsInput) SetPageSize(v string) *GetSegmentExportJobsInput { + s.PageSize = &v + return s +} + +// SetSegmentId sets the SegmentId field's value. +func (s *GetSegmentExportJobsInput) SetSegmentId(v string) *GetSegmentExportJobsInput { + s.SegmentId = &v + return s +} + +// SetToken sets the Token field's value. +func (s *GetSegmentExportJobsInput) SetToken(v string) *GetSegmentExportJobsInput { + s.Token = &v + return s +} + +type GetSegmentExportJobsOutput struct { + _ struct{} `type:"structure" payload:"ExportJobsResponse"` + + // Export job list. + // + // ExportJobsResponse is a required field + ExportJobsResponse *ExportJobsResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetSegmentExportJobsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSegmentExportJobsOutput) GoString() string { + return s.String() +} + +// SetExportJobsResponse sets the ExportJobsResponse field's value. +func (s *GetSegmentExportJobsOutput) SetExportJobsResponse(v *ExportJobsResponse) *GetSegmentExportJobsOutput { + s.ExportJobsResponse = v + return s +} + +type GetSegmentImportJobsInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + PageSize *string `location:"querystring" locationName:"page-size" type:"string"` + + // SegmentId is a required field + SegmentId *string `location:"uri" locationName:"segment-id" type:"string" required:"true"` + + Token *string `location:"querystring" locationName:"token" type:"string"` +} + +// String returns the string representation +func (s GetSegmentImportJobsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSegmentImportJobsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetSegmentImportJobsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetSegmentImportJobsInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.SegmentId == nil { + invalidParams.Add(request.NewErrParamRequired("SegmentId")) + } + if s.SegmentId != nil && len(*s.SegmentId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SegmentId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetSegmentImportJobsInput) SetApplicationId(v string) *GetSegmentImportJobsInput { + s.ApplicationId = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *GetSegmentImportJobsInput) SetPageSize(v string) *GetSegmentImportJobsInput { + s.PageSize = &v + return s +} + +// SetSegmentId sets the SegmentId field's value. +func (s *GetSegmentImportJobsInput) SetSegmentId(v string) *GetSegmentImportJobsInput { + s.SegmentId = &v + return s +} + +// SetToken sets the Token field's value. +func (s *GetSegmentImportJobsInput) SetToken(v string) *GetSegmentImportJobsInput { + s.Token = &v + return s +} + +type GetSegmentImportJobsOutput struct { + _ struct{} `type:"structure" payload:"ImportJobsResponse"` + + // Import job list. + // + // ImportJobsResponse is a required field + ImportJobsResponse *ImportJobsResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetSegmentImportJobsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSegmentImportJobsOutput) GoString() string { + return s.String() +} + +// SetImportJobsResponse sets the ImportJobsResponse field's value. +func (s *GetSegmentImportJobsOutput) SetImportJobsResponse(v *ImportJobsResponse) *GetSegmentImportJobsOutput { + s.ImportJobsResponse = v + return s +} + +type GetSegmentInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // SegmentId is a required field + SegmentId *string `location:"uri" locationName:"segment-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetSegmentInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSegmentInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetSegmentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetSegmentInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.SegmentId == nil { + invalidParams.Add(request.NewErrParamRequired("SegmentId")) + } + if s.SegmentId != nil && len(*s.SegmentId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SegmentId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetSegmentInput) SetApplicationId(v string) *GetSegmentInput { + s.ApplicationId = &v + return s +} + +// SetSegmentId sets the SegmentId field's value. +func (s *GetSegmentInput) SetSegmentId(v string) *GetSegmentInput { + s.SegmentId = &v + return s +} + +type GetSegmentOutput struct { + _ struct{} `type:"structure" payload:"SegmentResponse"` + + // Segment definition. + // + // SegmentResponse is a required field + SegmentResponse *SegmentResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetSegmentOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSegmentOutput) GoString() string { + return s.String() +} + +// SetSegmentResponse sets the SegmentResponse field's value. +func (s *GetSegmentOutput) SetSegmentResponse(v *SegmentResponse) *GetSegmentOutput { + s.SegmentResponse = v + return s +} + +type GetSegmentVersionInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // SegmentId is a required field + SegmentId *string `location:"uri" locationName:"segment-id" type:"string" required:"true"` + + // Version is a required field + Version *string `location:"uri" locationName:"version" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetSegmentVersionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSegmentVersionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetSegmentVersionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetSegmentVersionInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.SegmentId == nil { + invalidParams.Add(request.NewErrParamRequired("SegmentId")) + } + if s.SegmentId != nil && len(*s.SegmentId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SegmentId", 1)) + } + if s.Version == nil { + invalidParams.Add(request.NewErrParamRequired("Version")) + } + if s.Version != nil && len(*s.Version) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Version", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetSegmentVersionInput) SetApplicationId(v string) *GetSegmentVersionInput { + s.ApplicationId = &v + return s +} + +// SetSegmentId sets the SegmentId field's value. +func (s *GetSegmentVersionInput) SetSegmentId(v string) *GetSegmentVersionInput { + s.SegmentId = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *GetSegmentVersionInput) SetVersion(v string) *GetSegmentVersionInput { + s.Version = &v + return s +} + +type GetSegmentVersionOutput struct { + _ struct{} `type:"structure" payload:"SegmentResponse"` + + // Segment definition. + // + // SegmentResponse is a required field + SegmentResponse *SegmentResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetSegmentVersionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSegmentVersionOutput) GoString() string { + return s.String() +} + +// SetSegmentResponse sets the SegmentResponse field's value. +func (s *GetSegmentVersionOutput) SetSegmentResponse(v *SegmentResponse) *GetSegmentVersionOutput { + s.SegmentResponse = v + return s +} + +type GetSegmentVersionsInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + PageSize *string `location:"querystring" locationName:"page-size" type:"string"` + + // SegmentId is a required field + SegmentId *string `location:"uri" locationName:"segment-id" type:"string" required:"true"` + + Token *string `location:"querystring" locationName:"token" type:"string"` +} + +// String returns the string representation +func (s GetSegmentVersionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSegmentVersionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetSegmentVersionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetSegmentVersionsInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.SegmentId == nil { + invalidParams.Add(request.NewErrParamRequired("SegmentId")) + } + if s.SegmentId != nil && len(*s.SegmentId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SegmentId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetSegmentVersionsInput) SetApplicationId(v string) *GetSegmentVersionsInput { + s.ApplicationId = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *GetSegmentVersionsInput) SetPageSize(v string) *GetSegmentVersionsInput { + s.PageSize = &v + return s +} + +// SetSegmentId sets the SegmentId field's value. +func (s *GetSegmentVersionsInput) SetSegmentId(v string) *GetSegmentVersionsInput { + s.SegmentId = &v + return s +} + +// SetToken sets the Token field's value. +func (s *GetSegmentVersionsInput) SetToken(v string) *GetSegmentVersionsInput { + s.Token = &v + return s +} + +type GetSegmentVersionsOutput struct { + _ struct{} `type:"structure" payload:"SegmentsResponse"` + + // Segments in your account. + // + // SegmentsResponse is a required field + SegmentsResponse *SegmentsResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetSegmentVersionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSegmentVersionsOutput) GoString() string { + return s.String() +} + +// SetSegmentsResponse sets the SegmentsResponse field's value. +func (s *GetSegmentVersionsOutput) SetSegmentsResponse(v *SegmentsResponse) *GetSegmentVersionsOutput { + s.SegmentsResponse = v + return s +} + +type GetSegmentsInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + PageSize *string `location:"querystring" locationName:"page-size" type:"string"` + + Token *string `location:"querystring" locationName:"token" type:"string"` +} + +// String returns the string representation +func (s GetSegmentsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSegmentsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetSegmentsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetSegmentsInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetSegmentsInput) SetApplicationId(v string) *GetSegmentsInput { + s.ApplicationId = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *GetSegmentsInput) SetPageSize(v string) *GetSegmentsInput { + s.PageSize = &v + return s +} + +// SetToken sets the Token field's value. +func (s *GetSegmentsInput) SetToken(v string) *GetSegmentsInput { + s.Token = &v + return s +} + +type GetSegmentsOutput struct { + _ struct{} `type:"structure" payload:"SegmentsResponse"` + + // Segments in your account. + // + // SegmentsResponse is a required field + SegmentsResponse *SegmentsResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetSegmentsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSegmentsOutput) GoString() string { + return s.String() +} + +// SetSegmentsResponse sets the SegmentsResponse field's value. +func (s *GetSegmentsOutput) SetSegmentsResponse(v *SegmentsResponse) *GetSegmentsOutput { + s.SegmentsResponse = v + return s +} + +type GetSmsChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetSmsChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSmsChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetSmsChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetSmsChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetSmsChannelInput) SetApplicationId(v string) *GetSmsChannelInput { + s.ApplicationId = &v + return s +} + +type GetSmsChannelOutput struct { + _ struct{} `type:"structure" payload:"SMSChannelResponse"` + + // SMS Channel Response. + // + // SMSChannelResponse is a required field + SMSChannelResponse *SMSChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetSmsChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSmsChannelOutput) GoString() string { + return s.String() +} + +// SetSMSChannelResponse sets the SMSChannelResponse field's value. +func (s *GetSmsChannelOutput) SetSMSChannelResponse(v *SMSChannelResponse) *GetSmsChannelOutput { + s.SMSChannelResponse = v + return s +} + +type GetUserEndpointsInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // UserId is a required field + UserId *string `location:"uri" locationName:"user-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetUserEndpointsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetUserEndpointsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetUserEndpointsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetUserEndpointsInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.UserId == nil { + invalidParams.Add(request.NewErrParamRequired("UserId")) + } + if s.UserId != nil && len(*s.UserId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetUserEndpointsInput) SetApplicationId(v string) *GetUserEndpointsInput { + s.ApplicationId = &v + return s +} + +// SetUserId sets the UserId field's value. +func (s *GetUserEndpointsInput) SetUserId(v string) *GetUserEndpointsInput { + s.UserId = &v + return s +} + +type GetUserEndpointsOutput struct { + _ struct{} `type:"structure" payload:"EndpointsResponse"` + + // List of endpoints + // + // EndpointsResponse is a required field + EndpointsResponse *EndpointsResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetUserEndpointsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetUserEndpointsOutput) GoString() string { + return s.String() +} + +// SetEndpointsResponse sets the EndpointsResponse field's value. +func (s *GetUserEndpointsOutput) SetEndpointsResponse(v *EndpointsResponse) *GetUserEndpointsOutput { + s.EndpointsResponse = v + return s +} + +type GetVoiceChannelInput struct { + _ struct{} `type:"structure"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetVoiceChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetVoiceChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetVoiceChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetVoiceChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *GetVoiceChannelInput) SetApplicationId(v string) *GetVoiceChannelInput { + s.ApplicationId = &v + return s +} + +type GetVoiceChannelOutput struct { + _ struct{} `type:"structure" payload:"VoiceChannelResponse"` + + // Voice Channel Response. + // + // VoiceChannelResponse is a required field + VoiceChannelResponse *VoiceChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetVoiceChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetVoiceChannelOutput) GoString() string { + return s.String() +} + +// SetVoiceChannelResponse sets the VoiceChannelResponse field's value. +func (s *GetVoiceChannelOutput) SetVoiceChannelResponse(v *VoiceChannelResponse) *GetVoiceChannelOutput { + s.VoiceChannelResponse = v + return s +} + +// Import job request. +type ImportJobRequest struct { + _ struct{} `type:"structure"` + + // Sets whether the endpoints create a segment when they are imported. + DefineSegment *bool `type:"boolean"` + + // (Deprecated) Your AWS account ID, which you assigned to the ExternalID key + // in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This + // requirement is removed, and external IDs are not recommended for IAM roles + // assumed by Amazon Pinpoint. + ExternalId *string `type:"string"` + + // The format of the files that contain the endpoint definitions.Valid values: + // CSV, JSON + Format *string `type:"string" enum:"Format"` + + // Sets whether the endpoints are registered with Amazon Pinpoint when they + // are imported. + RegisterEndpoints *bool `type:"boolean"` + + // The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint + // access to the Amazon S3 location that contains the endpoints to import. + RoleArn *string `type:"string"` + + // The URL of the S3 bucket that contains the segment information to import. + // The location can be a folder or a single file. The URL should use the following + // format: s3://bucket-name/folder-name/file-nameAmazon Pinpoint imports endpoints + // from this location and any subfolders it contains. + S3Url *string `type:"string"` + + // The ID of the segment to update if the import job is meant to update an existing + // segment. + SegmentId *string `type:"string"` + + // A custom name for the segment created by the import job. Use if DefineSegment + // is true. + SegmentName *string `type:"string"` +} + +// String returns the string representation +func (s ImportJobRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportJobRequest) GoString() string { + return s.String() +} + +// SetDefineSegment sets the DefineSegment field's value. +func (s *ImportJobRequest) SetDefineSegment(v bool) *ImportJobRequest { + s.DefineSegment = &v + return s +} + +// SetExternalId sets the ExternalId field's value. +func (s *ImportJobRequest) SetExternalId(v string) *ImportJobRequest { + s.ExternalId = &v + return s +} + +// SetFormat sets the Format field's value. +func (s *ImportJobRequest) SetFormat(v string) *ImportJobRequest { + s.Format = &v + return s +} + +// SetRegisterEndpoints sets the RegisterEndpoints field's value. +func (s *ImportJobRequest) SetRegisterEndpoints(v bool) *ImportJobRequest { + s.RegisterEndpoints = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *ImportJobRequest) SetRoleArn(v string) *ImportJobRequest { + s.RoleArn = &v + return s +} + +// SetS3Url sets the S3Url field's value. +func (s *ImportJobRequest) SetS3Url(v string) *ImportJobRequest { + s.S3Url = &v + return s +} + +// SetSegmentId sets the SegmentId field's value. +func (s *ImportJobRequest) SetSegmentId(v string) *ImportJobRequest { + s.SegmentId = &v + return s +} + +// SetSegmentName sets the SegmentName field's value. +func (s *ImportJobRequest) SetSegmentName(v string) *ImportJobRequest { + s.SegmentName = &v + return s +} + +// Import job resource +type ImportJobResource struct { + _ struct{} `type:"structure"` + + // Sets whether the endpoints create a segment when they are imported. + DefineSegment *bool `type:"boolean"` + + // (Deprecated) Your AWS account ID, which you assigned to the ExternalID key + // in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This + // requirement is removed, and external IDs are not recommended for IAM roles + // assumed by Amazon Pinpoint. + ExternalId *string `type:"string"` + + // The format of the files that contain the endpoint definitions.Valid values: + // CSV, JSON + Format *string `type:"string" enum:"Format"` + + // Sets whether the endpoints are registered with Amazon Pinpoint when they + // are imported. + RegisterEndpoints *bool `type:"boolean"` + + // The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint + // access to the Amazon S3 location that contains the endpoints to import. + RoleArn *string `type:"string"` + + // The URL of the S3 bucket that contains the segment information to import. + // The location can be a folder or a single file. The URL should use the following + // format: s3://bucket-name/folder-name/file-nameAmazon Pinpoint imports endpoints + // from this location and any subfolders it contains. + S3Url *string `type:"string"` + + // The ID of the segment to update if the import job is meant to update an existing + // segment. + SegmentId *string `type:"string"` + + // A custom name for the segment created by the import job. Use if DefineSegment + // is true. + SegmentName *string `type:"string"` +} + +// String returns the string representation +func (s ImportJobResource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportJobResource) GoString() string { + return s.String() +} + +// SetDefineSegment sets the DefineSegment field's value. +func (s *ImportJobResource) SetDefineSegment(v bool) *ImportJobResource { + s.DefineSegment = &v + return s +} + +// SetExternalId sets the ExternalId field's value. +func (s *ImportJobResource) SetExternalId(v string) *ImportJobResource { + s.ExternalId = &v + return s +} + +// SetFormat sets the Format field's value. +func (s *ImportJobResource) SetFormat(v string) *ImportJobResource { + s.Format = &v + return s +} + +// SetRegisterEndpoints sets the RegisterEndpoints field's value. +func (s *ImportJobResource) SetRegisterEndpoints(v bool) *ImportJobResource { + s.RegisterEndpoints = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *ImportJobResource) SetRoleArn(v string) *ImportJobResource { + s.RoleArn = &v + return s +} + +// SetS3Url sets the S3Url field's value. +func (s *ImportJobResource) SetS3Url(v string) *ImportJobResource { + s.S3Url = &v + return s +} + +// SetSegmentId sets the SegmentId field's value. +func (s *ImportJobResource) SetSegmentId(v string) *ImportJobResource { + s.SegmentId = &v + return s +} + +// SetSegmentName sets the SegmentName field's value. +func (s *ImportJobResource) SetSegmentName(v string) *ImportJobResource { + s.SegmentName = &v + return s +} + +// Import job response. +type ImportJobResponse struct { + _ struct{} `type:"structure"` + + // The unique ID of the application to which the import job applies. + ApplicationId *string `type:"string"` + + // The number of pieces that have successfully imported as of the time of the + // request. + CompletedPieces *int64 `type:"integer"` + + // The date the import job completed in ISO 8601 format. + CompletionDate *string `type:"string"` + + // The date the import job was created in ISO 8601 format. + CreationDate *string `type:"string"` + + // The import job settings. + Definition *ImportJobResource `type:"structure"` + + // The number of pieces that have failed to import as of the time of the request. + FailedPieces *int64 `type:"integer"` + + // Provides up to 100 of the first failed entries for the job, if any exist. + Failures []*string `type:"list"` + + // The unique ID of the import job. + Id *string `type:"string"` + + // The status of the import job.Valid values: CREATED, INITIALIZING, PROCESSING, + // COMPLETING, COMPLETED, FAILING, FAILEDThe job status is FAILED if one or + // more pieces failed to import. + JobStatus *string `type:"string" enum:"JobStatus"` + + // The number of endpoints that failed to import; for example, because of syntax + // errors. + TotalFailures *int64 `type:"integer"` + + // The total number of pieces that must be imported to finish the job. Each + // piece is an approximately equal portion of the endpoints to import. + TotalPieces *int64 `type:"integer"` + + // The number of endpoints that were processed by the import job. + TotalProcessed *int64 `type:"integer"` + + // The job type. Will be Import. + Type *string `type:"string"` +} + +// String returns the string representation +func (s ImportJobResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportJobResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *ImportJobResponse) SetApplicationId(v string) *ImportJobResponse { + s.ApplicationId = &v + return s +} + +// SetCompletedPieces sets the CompletedPieces field's value. +func (s *ImportJobResponse) SetCompletedPieces(v int64) *ImportJobResponse { + s.CompletedPieces = &v + return s +} + +// SetCompletionDate sets the CompletionDate field's value. +func (s *ImportJobResponse) SetCompletionDate(v string) *ImportJobResponse { + s.CompletionDate = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *ImportJobResponse) SetCreationDate(v string) *ImportJobResponse { + s.CreationDate = &v + return s +} + +// SetDefinition sets the Definition field's value. +func (s *ImportJobResponse) SetDefinition(v *ImportJobResource) *ImportJobResponse { + s.Definition = v + return s +} + +// SetFailedPieces sets the FailedPieces field's value. +func (s *ImportJobResponse) SetFailedPieces(v int64) *ImportJobResponse { + s.FailedPieces = &v + return s +} + +// SetFailures sets the Failures field's value. +func (s *ImportJobResponse) SetFailures(v []*string) *ImportJobResponse { + s.Failures = v + return s +} + +// SetId sets the Id field's value. +func (s *ImportJobResponse) SetId(v string) *ImportJobResponse { + s.Id = &v + return s +} + +// SetJobStatus sets the JobStatus field's value. +func (s *ImportJobResponse) SetJobStatus(v string) *ImportJobResponse { + s.JobStatus = &v + return s +} + +// SetTotalFailures sets the TotalFailures field's value. +func (s *ImportJobResponse) SetTotalFailures(v int64) *ImportJobResponse { + s.TotalFailures = &v + return s +} + +// SetTotalPieces sets the TotalPieces field's value. +func (s *ImportJobResponse) SetTotalPieces(v int64) *ImportJobResponse { + s.TotalPieces = &v + return s +} + +// SetTotalProcessed sets the TotalProcessed field's value. +func (s *ImportJobResponse) SetTotalProcessed(v int64) *ImportJobResponse { + s.TotalProcessed = &v + return s +} + +// SetType sets the Type field's value. +func (s *ImportJobResponse) SetType(v string) *ImportJobResponse { + s.Type = &v + return s +} + +// Import job list. +type ImportJobsResponse struct { + _ struct{} `type:"structure"` + + // A list of import jobs for the application. + Item []*ImportJobResponse `type:"list"` + + // The string that you use in a subsequent request to get the next page of results + // in a paginated response. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ImportJobsResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportJobsResponse) GoString() string { + return s.String() +} + +// SetItem sets the Item field's value. +func (s *ImportJobsResponse) SetItem(v []*ImportJobResponse) *ImportJobsResponse { + s.Item = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ImportJobsResponse) SetNextToken(v string) *ImportJobsResponse { + s.NextToken = &v + return s +} + +// The response that's provided after registering the endpoint. +type ItemResponse struct { + _ struct{} `type:"structure"` + + // The response received after the endpoint was accepted. + EndpointItemResponse *EndpointItemResponse `type:"structure"` + + // A multipart response object that contains a key and value for each event + // ID in the request. In each object, the event ID is the key, and an EventItemResponse + // object is the value. + EventsItemResponse map[string]*EventItemResponse `type:"map"` +} + +// String returns the string representation +func (s ItemResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ItemResponse) GoString() string { + return s.String() +} + +// SetEndpointItemResponse sets the EndpointItemResponse field's value. +func (s *ItemResponse) SetEndpointItemResponse(v *EndpointItemResponse) *ItemResponse { + s.EndpointItemResponse = v + return s +} + +// SetEventsItemResponse sets the EventsItemResponse field's value. +func (s *ItemResponse) SetEventsItemResponse(v map[string]*EventItemResponse) *ItemResponse { + s.EventsItemResponse = v + return s +} + +// Message to send +type Message struct { + _ struct{} `type:"structure"` + + // The action that occurs if the user taps a push notification delivered by + // the campaign:OPEN_APP - Your app launches, or it becomes the foreground app + // if it has been sent to the background. This is the default action.DEEP_LINK + // - Uses deep linking features in iOS and Android to open your app and display + // a designated user interface within the app.URL - The default mobile browser + // on the user's device launches and opens a web page at the URL you specify. + Action *string `type:"string" enum:"Action"` + + // The message body. Can include up to 140 characters. + Body *string `type:"string"` + + // The URL that points to the icon image for the push notification icon, for + // example, the app icon. + ImageIconUrl *string `type:"string"` + + // The URL that points to the small icon image for the push notification icon, + // for example, the app icon. + ImageSmallIconUrl *string `type:"string"` + + // The URL that points to an image used in the push notification. + ImageUrl *string `type:"string"` + + // The JSON payload used for a silent push. + JsonBody *string `type:"string"` + + // A URL that refers to the location of an image or video that you want to display + // in the push notification. + MediaUrl *string `type:"string"` + + // The Raw JSON formatted string to be used as the payload. This value overrides + // the message. + RawContent *string `type:"string"` + + // Indicates if the message should display on the users device.Silent pushes + // can be used for Remote Configuration and Phone Home use cases. + SilentPush *bool `type:"boolean"` + + // This parameter specifies how long (in seconds) the message should be kept + // if the service is unable to deliver the notification the first time. If the + // value is 0, it treats the notification as if it expires immediately and does + // not store the notification or attempt to redeliver it. This value is converted + // to the expiration field when sent to the service. It only applies to APNs + // and GCM + TimeToLive *int64 `type:"integer"` + + // The message title that displays above the message on the user's device. + Title *string `type:"string"` + + // The URL to open in the user's mobile browser. Used if the value for Action + // is URL. + Url *string `type:"string"` +} + +// String returns the string representation +func (s Message) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Message) GoString() string { + return s.String() +} + +// SetAction sets the Action field's value. +func (s *Message) SetAction(v string) *Message { + s.Action = &v + return s +} + +// SetBody sets the Body field's value. +func (s *Message) SetBody(v string) *Message { + s.Body = &v + return s +} + +// SetImageIconUrl sets the ImageIconUrl field's value. +func (s *Message) SetImageIconUrl(v string) *Message { + s.ImageIconUrl = &v + return s +} + +// SetImageSmallIconUrl sets the ImageSmallIconUrl field's value. +func (s *Message) SetImageSmallIconUrl(v string) *Message { + s.ImageSmallIconUrl = &v + return s +} + +// SetImageUrl sets the ImageUrl field's value. +func (s *Message) SetImageUrl(v string) *Message { + s.ImageUrl = &v + return s +} + +// SetJsonBody sets the JsonBody field's value. +func (s *Message) SetJsonBody(v string) *Message { + s.JsonBody = &v + return s +} + +// SetMediaUrl sets the MediaUrl field's value. +func (s *Message) SetMediaUrl(v string) *Message { + s.MediaUrl = &v + return s +} + +// SetRawContent sets the RawContent field's value. +func (s *Message) SetRawContent(v string) *Message { + s.RawContent = &v + return s +} + +// SetSilentPush sets the SilentPush field's value. +func (s *Message) SetSilentPush(v bool) *Message { + s.SilentPush = &v + return s +} + +// SetTimeToLive sets the TimeToLive field's value. +func (s *Message) SetTimeToLive(v int64) *Message { + s.TimeToLive = &v + return s +} + +// SetTitle sets the Title field's value. +func (s *Message) SetTitle(v string) *Message { + s.Title = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *Message) SetUrl(v string) *Message { + s.Url = &v + return s +} + +// Simple message object. +type MessageBody struct { + _ struct{} `type:"structure"` + + // The error message that's returned from the API. + Message *string `type:"string"` + + // The unique message body ID. + RequestID *string `type:"string"` +} + +// String returns the string representation +func (s MessageBody) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MessageBody) GoString() string { + return s.String() +} + +// SetMessage sets the Message field's value. +func (s *MessageBody) SetMessage(v string) *MessageBody { + s.Message = &v + return s +} + +// SetRequestID sets the RequestID field's value. +func (s *MessageBody) SetRequestID(v string) *MessageBody { + s.RequestID = &v + return s +} + +// Message configuration for a campaign. +type MessageConfiguration struct { + _ struct{} `type:"structure"` + + // The message that the campaign delivers to ADM channels. Overrides the default + // message. + ADMMessage *Message `type:"structure"` + + // The message that the campaign delivers to APNS channels. Overrides the default + // message. + APNSMessage *Message `type:"structure"` + + // The message that the campaign delivers to Baidu channels. Overrides the default + // message. + BaiduMessage *Message `type:"structure"` + + // The default message for all channels. + DefaultMessage *Message `type:"structure"` + + // The email message configuration. + EmailMessage *CampaignEmailMessage `type:"structure"` + + // The message that the campaign delivers to GCM channels. Overrides the default + // message. + GCMMessage *Message `type:"structure"` + + // The SMS message configuration. + SMSMessage *CampaignSmsMessage `type:"structure"` +} + +// String returns the string representation +func (s MessageConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MessageConfiguration) GoString() string { + return s.String() +} + +// SetADMMessage sets the ADMMessage field's value. +func (s *MessageConfiguration) SetADMMessage(v *Message) *MessageConfiguration { + s.ADMMessage = v + return s +} + +// SetAPNSMessage sets the APNSMessage field's value. +func (s *MessageConfiguration) SetAPNSMessage(v *Message) *MessageConfiguration { + s.APNSMessage = v + return s +} + +// SetBaiduMessage sets the BaiduMessage field's value. +func (s *MessageConfiguration) SetBaiduMessage(v *Message) *MessageConfiguration { + s.BaiduMessage = v + return s +} + +// SetDefaultMessage sets the DefaultMessage field's value. +func (s *MessageConfiguration) SetDefaultMessage(v *Message) *MessageConfiguration { + s.DefaultMessage = v + return s +} + +// SetEmailMessage sets the EmailMessage field's value. +func (s *MessageConfiguration) SetEmailMessage(v *CampaignEmailMessage) *MessageConfiguration { + s.EmailMessage = v + return s +} + +// SetGCMMessage sets the GCMMessage field's value. +func (s *MessageConfiguration) SetGCMMessage(v *Message) *MessageConfiguration { + s.GCMMessage = v + return s +} + +// SetSMSMessage sets the SMSMessage field's value. +func (s *MessageConfiguration) SetSMSMessage(v *CampaignSmsMessage) *MessageConfiguration { + s.SMSMessage = v + return s +} + +// Send message request. +type MessageRequest struct { + _ struct{} `type:"structure"` + + // A map of key-value pairs, where each key is an address and each value is + // an AddressConfiguration object. An address can be a push notification token, + // a phone number, or an email address. + Addresses map[string]*AddressConfiguration `type:"map"` + + // A map of custom attributes to attributes to be attached to the message. This + // payload is added to the push notification's 'data.pinpoint' object or added + // to the email/sms delivery receipt event attributes. + Context map[string]*string `type:"map"` + + // A map of key-value pairs, where each key is an endpoint ID and each value + // is an EndpointSendConfiguration object. Within an EndpointSendConfiguration + // object, you can tailor the message for an endpoint by specifying message + // overrides or substitutions. + Endpoints map[string]*EndpointSendConfiguration `type:"map"` + + // Message configuration. + MessageConfiguration *DirectMessageConfiguration `type:"structure"` + + // A unique ID that you can use to trace a message. This ID is visible to recipients. + TraceId *string `type:"string"` +} + +// String returns the string representation +func (s MessageRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MessageRequest) GoString() string { + return s.String() +} + +// SetAddresses sets the Addresses field's value. +func (s *MessageRequest) SetAddresses(v map[string]*AddressConfiguration) *MessageRequest { + s.Addresses = v + return s +} + +// SetContext sets the Context field's value. +func (s *MessageRequest) SetContext(v map[string]*string) *MessageRequest { + s.Context = v + return s +} + +// SetEndpoints sets the Endpoints field's value. +func (s *MessageRequest) SetEndpoints(v map[string]*EndpointSendConfiguration) *MessageRequest { + s.Endpoints = v + return s +} + +// SetMessageConfiguration sets the MessageConfiguration field's value. +func (s *MessageRequest) SetMessageConfiguration(v *DirectMessageConfiguration) *MessageRequest { + s.MessageConfiguration = v + return s +} + +// SetTraceId sets the TraceId field's value. +func (s *MessageRequest) SetTraceId(v string) *MessageRequest { + s.TraceId = &v + return s +} + +// Send message response. +type MessageResponse struct { + _ struct{} `type:"structure"` + + // Application id of the message. + ApplicationId *string `type:"string"` + + // A map containing a multi part response for each address, with the endpointId + // as the key and the result as the value. + EndpointResult map[string]*EndpointMessageResult `type:"map"` + + // Original request Id for which this message was delivered. + RequestId *string `type:"string"` + + // A map containing a multi part response for each address, with the address + // as the key(Email address, phone number or push token) and the result as the + // value. + Result map[string]*MessageResult `type:"map"` +} + +// String returns the string representation +func (s MessageResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MessageResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *MessageResponse) SetApplicationId(v string) *MessageResponse { + s.ApplicationId = &v + return s +} + +// SetEndpointResult sets the EndpointResult field's value. +func (s *MessageResponse) SetEndpointResult(v map[string]*EndpointMessageResult) *MessageResponse { + s.EndpointResult = v + return s +} + +// SetRequestId sets the RequestId field's value. +func (s *MessageResponse) SetRequestId(v string) *MessageResponse { + s.RequestId = &v + return s +} + +// SetResult sets the Result field's value. +func (s *MessageResponse) SetResult(v map[string]*MessageResult) *MessageResponse { + s.Result = v + return s +} + +// The result from sending a message to an address. +type MessageResult struct { + _ struct{} `type:"structure"` + + // The delivery status of the message. Possible values:SUCCESS - The message + // was successfully delivered to the endpoint.TRANSIENT_FAILURE - A temporary + // error occurred. Amazon Pinpoint will attempt to deliver the message again + // later.FAILURE_PERMANENT - An error occurred when delivering the message to + // the endpoint. Amazon Pinpoint won't attempt to send the message again.TIMEOUT + // - The message couldn't be sent within the timeout period.QUIET_TIME - The + // local time for the endpoint was within the QuietTime for the campaign or + // app.DAILY_CAP - The endpoint has received the maximum number of messages + // it can receive within a 24-hour period.HOLDOUT - The endpoint was in a hold + // out treatment for the campaign.THROTTLED - Amazon Pinpoint throttled sending + // to this endpoint.EXPIRED - The endpoint address is expired.CAMPAIGN_CAP - + // The endpoint received the maximum number of messages allowed by the campaign.SERVICE_FAILURE + // - A service-level failure prevented Amazon Pinpoint from delivering the message.UNKNOWN + // - An unknown error occurred. + DeliveryStatus *string `type:"string" enum:"DeliveryStatus"` + + // Unique message identifier associated with the message that was sent. + MessageId *string `type:"string"` + + // Downstream service status code. + StatusCode *int64 `type:"integer"` + + // Status message for message delivery. + StatusMessage *string `type:"string"` + + // If token was updated as part of delivery. (This is GCM Specific) + UpdatedToken *string `type:"string"` +} + +// String returns the string representation +func (s MessageResult) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MessageResult) GoString() string { + return s.String() +} + +// SetDeliveryStatus sets the DeliveryStatus field's value. +func (s *MessageResult) SetDeliveryStatus(v string) *MessageResult { + s.DeliveryStatus = &v + return s +} + +// SetMessageId sets the MessageId field's value. +func (s *MessageResult) SetMessageId(v string) *MessageResult { + s.MessageId = &v + return s +} + +// SetStatusCode sets the StatusCode field's value. +func (s *MessageResult) SetStatusCode(v int64) *MessageResult { + s.StatusCode = &v + return s +} + +// SetStatusMessage sets the StatusMessage field's value. +func (s *MessageResult) SetStatusMessage(v string) *MessageResult { + s.StatusMessage = &v + return s +} + +// SetUpdatedToken sets the UpdatedToken field's value. +func (s *MessageResult) SetUpdatedToken(v string) *MessageResult { + s.UpdatedToken = &v + return s +} + +// Custom metric dimension +type MetricDimension struct { + _ struct{} `type:"structure"` + + // The operator that you're using to compare metric values. Possible values: + // GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL, or EQUAL + ComparisonOperator *string `type:"string"` + + // The value to be compared. + Value *float64 `type:"double"` +} + +// String returns the string representation +func (s MetricDimension) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MetricDimension) GoString() string { + return s.String() +} + +// SetComparisonOperator sets the ComparisonOperator field's value. +func (s *MetricDimension) SetComparisonOperator(v string) *MetricDimension { + s.ComparisonOperator = &v + return s +} + +// SetValue sets the Value field's value. +func (s *MetricDimension) SetValue(v float64) *MetricDimension { + s.Value = &v + return s +} + +// Phone Number Validate request. +type NumberValidateRequest struct { + _ struct{} `type:"structure"` + + // (Optional) The two-character ISO country code for the country or region where + // the phone number was originally registered. + IsoCountryCode *string `type:"string"` + + // The phone number to get information about. The phone number that you provide + // should include a country code. If the number doesn't include a valid country + // code, the operation might result in an error. + PhoneNumber *string `type:"string"` +} + +// String returns the string representation +func (s NumberValidateRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NumberValidateRequest) GoString() string { + return s.String() +} + +// SetIsoCountryCode sets the IsoCountryCode field's value. +func (s *NumberValidateRequest) SetIsoCountryCode(v string) *NumberValidateRequest { + s.IsoCountryCode = &v + return s +} + +// SetPhoneNumber sets the PhoneNumber field's value. +func (s *NumberValidateRequest) SetPhoneNumber(v string) *NumberValidateRequest { + s.PhoneNumber = &v + return s +} + +// Phone Number Validate response. +type NumberValidateResponse struct { + _ struct{} `type:"structure"` + + // The carrier or servive provider that the phone number is currently registered + // with. + Carrier *string `type:"string"` + + // The city where the phone number was originally registered. + City *string `type:"string"` + + // The cleansed phone number, shown in E.164 format. + CleansedPhoneNumberE164 *string `type:"string"` + + // The cleansed phone number, shown in the local phone number format. + CleansedPhoneNumberNational *string `type:"string"` + + // The country or region where the phone number was originally registered. + Country *string `type:"string"` + + // The two-character ISO code for the country or region where the phone number + // was originally registered. + CountryCodeIso2 *string `type:"string"` + + // The numeric code for the country or region where the phone number was originally + // registered. + CountryCodeNumeric *string `type:"string"` + + // The county where the phone number was originally registered. + County *string `type:"string"` + + // The two-character code (in ISO 3166-1 alpha-2 format) for the country or + // region in the request body. + OriginalCountryCodeIso2 *string `type:"string"` + + // The phone number that you included in the request body. + OriginalPhoneNumber *string `type:"string"` + + // A description of the phone type. Possible values are MOBILE, LANDLINE, VOIP, + // INVALID, PREPAID, and OTHER. + PhoneType *string `type:"string"` + + // The phone type, represented by an integer. Possible values include 0 (MOBILE), + // 1 (LANDLINE), 2 (VOIP), 3 (INVALID), 4 (OTHER), and 5 (PREPAID). + PhoneTypeCode *int64 `type:"integer"` + + // The time zone for the location where the phone number was originally registered. + Timezone *string `type:"string"` + + // The postal code for the location where the phone number was originally registered. + ZipCode *string `type:"string"` +} + +// String returns the string representation +func (s NumberValidateResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NumberValidateResponse) GoString() string { + return s.String() +} + +// SetCarrier sets the Carrier field's value. +func (s *NumberValidateResponse) SetCarrier(v string) *NumberValidateResponse { + s.Carrier = &v + return s +} + +// SetCity sets the City field's value. +func (s *NumberValidateResponse) SetCity(v string) *NumberValidateResponse { + s.City = &v + return s +} + +// SetCleansedPhoneNumberE164 sets the CleansedPhoneNumberE164 field's value. +func (s *NumberValidateResponse) SetCleansedPhoneNumberE164(v string) *NumberValidateResponse { + s.CleansedPhoneNumberE164 = &v + return s +} + +// SetCleansedPhoneNumberNational sets the CleansedPhoneNumberNational field's value. +func (s *NumberValidateResponse) SetCleansedPhoneNumberNational(v string) *NumberValidateResponse { + s.CleansedPhoneNumberNational = &v + return s +} + +// SetCountry sets the Country field's value. +func (s *NumberValidateResponse) SetCountry(v string) *NumberValidateResponse { + s.Country = &v + return s +} + +// SetCountryCodeIso2 sets the CountryCodeIso2 field's value. +func (s *NumberValidateResponse) SetCountryCodeIso2(v string) *NumberValidateResponse { + s.CountryCodeIso2 = &v + return s +} + +// SetCountryCodeNumeric sets the CountryCodeNumeric field's value. +func (s *NumberValidateResponse) SetCountryCodeNumeric(v string) *NumberValidateResponse { + s.CountryCodeNumeric = &v + return s +} + +// SetCounty sets the County field's value. +func (s *NumberValidateResponse) SetCounty(v string) *NumberValidateResponse { + s.County = &v + return s +} + +// SetOriginalCountryCodeIso2 sets the OriginalCountryCodeIso2 field's value. +func (s *NumberValidateResponse) SetOriginalCountryCodeIso2(v string) *NumberValidateResponse { + s.OriginalCountryCodeIso2 = &v + return s +} + +// SetOriginalPhoneNumber sets the OriginalPhoneNumber field's value. +func (s *NumberValidateResponse) SetOriginalPhoneNumber(v string) *NumberValidateResponse { + s.OriginalPhoneNumber = &v + return s +} + +// SetPhoneType sets the PhoneType field's value. +func (s *NumberValidateResponse) SetPhoneType(v string) *NumberValidateResponse { + s.PhoneType = &v + return s +} + +// SetPhoneTypeCode sets the PhoneTypeCode field's value. +func (s *NumberValidateResponse) SetPhoneTypeCode(v int64) *NumberValidateResponse { + s.PhoneTypeCode = &v + return s +} + +// SetTimezone sets the Timezone field's value. +func (s *NumberValidateResponse) SetTimezone(v string) *NumberValidateResponse { + s.Timezone = &v + return s +} + +// SetZipCode sets the ZipCode field's value. +func (s *NumberValidateResponse) SetZipCode(v string) *NumberValidateResponse { + s.ZipCode = &v + return s +} + +type PhoneNumberValidateInput struct { + _ struct{} `type:"structure" payload:"NumberValidateRequest"` + + // Phone Number Validate request. + // + // NumberValidateRequest is a required field + NumberValidateRequest *NumberValidateRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s PhoneNumberValidateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PhoneNumberValidateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PhoneNumberValidateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PhoneNumberValidateInput"} + if s.NumberValidateRequest == nil { + invalidParams.Add(request.NewErrParamRequired("NumberValidateRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNumberValidateRequest sets the NumberValidateRequest field's value. +func (s *PhoneNumberValidateInput) SetNumberValidateRequest(v *NumberValidateRequest) *PhoneNumberValidateInput { + s.NumberValidateRequest = v + return s +} + +type PhoneNumberValidateOutput struct { + _ struct{} `type:"structure" payload:"NumberValidateResponse"` + + // Phone Number Validate response. + // + // NumberValidateResponse is a required field + NumberValidateResponse *NumberValidateResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s PhoneNumberValidateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PhoneNumberValidateOutput) GoString() string { + return s.String() +} + +// SetNumberValidateResponse sets the NumberValidateResponse field's value. +func (s *PhoneNumberValidateOutput) SetNumberValidateResponse(v *NumberValidateResponse) *PhoneNumberValidateOutput { + s.NumberValidateResponse = v + return s +} + +// Public endpoint attributes. +type PublicEndpoint struct { + _ struct{} `type:"structure"` + + // The unique identifier for the recipient. For example, an address could be + // a device token, email address, or mobile phone number. + Address *string `type:"string"` + + // Custom attributes that your app reports to Amazon Pinpoint. You can use these + // attributes as selection criteria when you create a segment. + Attributes map[string][]*string `type:"map"` + + // The channel type.Valid values: APNS, GCM + ChannelType *string `type:"string" enum:"ChannelType"` + + // The endpoint demographic attributes. + Demographic *EndpointDemographic `type:"structure"` + + // The date and time when the endpoint was last updated, in ISO 8601 format. + EffectiveDate *string `type:"string"` + + // The status of the endpoint. If the update fails, the value is INACTIVE. If + // the endpoint is updated successfully, the value is ACTIVE. + EndpointStatus *string `type:"string"` + + // The endpoint location attributes. + Location *EndpointLocation `type:"structure"` + + // Custom metrics that your app reports to Amazon Pinpoint. + Metrics map[string]*float64 `type:"map"` + + // Indicates whether a user has opted out of receiving messages with one of + // the following values:ALL - User has opted out of all messages.NONE - Users + // has not opted out and receives all messages. + OptOut *string `type:"string"` + + // A unique identifier that is generated each time the endpoint is updated. + RequestId *string `type:"string"` + + // Custom user-specific attributes that your app reports to Amazon Pinpoint. + User *EndpointUser `type:"structure"` +} + +// String returns the string representation +func (s PublicEndpoint) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PublicEndpoint) GoString() string { + return s.String() +} + +// SetAddress sets the Address field's value. +func (s *PublicEndpoint) SetAddress(v string) *PublicEndpoint { + s.Address = &v + return s +} + +// SetAttributes sets the Attributes field's value. +func (s *PublicEndpoint) SetAttributes(v map[string][]*string) *PublicEndpoint { + s.Attributes = v + return s +} + +// SetChannelType sets the ChannelType field's value. +func (s *PublicEndpoint) SetChannelType(v string) *PublicEndpoint { + s.ChannelType = &v + return s +} + +// SetDemographic sets the Demographic field's value. +func (s *PublicEndpoint) SetDemographic(v *EndpointDemographic) *PublicEndpoint { + s.Demographic = v + return s +} + +// SetEffectiveDate sets the EffectiveDate field's value. +func (s *PublicEndpoint) SetEffectiveDate(v string) *PublicEndpoint { + s.EffectiveDate = &v + return s +} + +// SetEndpointStatus sets the EndpointStatus field's value. +func (s *PublicEndpoint) SetEndpointStatus(v string) *PublicEndpoint { + s.EndpointStatus = &v + return s +} + +// SetLocation sets the Location field's value. +func (s *PublicEndpoint) SetLocation(v *EndpointLocation) *PublicEndpoint { + s.Location = v + return s +} + +// SetMetrics sets the Metrics field's value. +func (s *PublicEndpoint) SetMetrics(v map[string]*float64) *PublicEndpoint { + s.Metrics = v + return s +} + +// SetOptOut sets the OptOut field's value. +func (s *PublicEndpoint) SetOptOut(v string) *PublicEndpoint { + s.OptOut = &v + return s +} + +// SetRequestId sets the RequestId field's value. +func (s *PublicEndpoint) SetRequestId(v string) *PublicEndpoint { + s.RequestId = &v + return s +} + +// SetUser sets the User field's value. +func (s *PublicEndpoint) SetUser(v *EndpointUser) *PublicEndpoint { + s.User = v + return s +} + +type PutEventStreamInput struct { + _ struct{} `type:"structure" payload:"WriteEventStream"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // Request to save an EventStream. + // + // WriteEventStream is a required field + WriteEventStream *WriteEventStream `type:"structure" required:"true"` +} + +// String returns the string representation +func (s PutEventStreamInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutEventStreamInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutEventStreamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutEventStreamInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.WriteEventStream == nil { + invalidParams.Add(request.NewErrParamRequired("WriteEventStream")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *PutEventStreamInput) SetApplicationId(v string) *PutEventStreamInput { + s.ApplicationId = &v + return s +} + +// SetWriteEventStream sets the WriteEventStream field's value. +func (s *PutEventStreamInput) SetWriteEventStream(v *WriteEventStream) *PutEventStreamInput { + s.WriteEventStream = v + return s +} + +type PutEventStreamOutput struct { + _ struct{} `type:"structure" payload:"EventStream"` + + // Model for an event publishing subscription export. + // + // EventStream is a required field + EventStream *EventStream `type:"structure" required:"true"` +} + +// String returns the string representation +func (s PutEventStreamOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutEventStreamOutput) GoString() string { + return s.String() +} + +// SetEventStream sets the EventStream field's value. +func (s *PutEventStreamOutput) SetEventStream(v *EventStream) *PutEventStreamOutput { + s.EventStream = v + return s +} + +type PutEventsInput struct { + _ struct{} `type:"structure" payload:"EventsRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // A set of events to process. + // + // EventsRequest is a required field + EventsRequest *EventsRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s PutEventsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutEventsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutEventsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutEventsInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.EventsRequest == nil { + invalidParams.Add(request.NewErrParamRequired("EventsRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *PutEventsInput) SetApplicationId(v string) *PutEventsInput { + s.ApplicationId = &v + return s +} + +// SetEventsRequest sets the EventsRequest field's value. +func (s *PutEventsInput) SetEventsRequest(v *EventsRequest) *PutEventsInput { + s.EventsRequest = v + return s +} + +type PutEventsOutput struct { + _ struct{} `type:"structure" payload:"EventsResponse"` + + // Custom messages associated with events. + // + // EventsResponse is a required field + EventsResponse *EventsResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s PutEventsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutEventsOutput) GoString() string { + return s.String() +} + +// SetEventsResponse sets the EventsResponse field's value. +func (s *PutEventsOutput) SetEventsResponse(v *EventsResponse) *PutEventsOutput { + s.EventsResponse = v + return s +} + +// Quiet Time +type QuietTime struct { + _ struct{} `type:"structure"` + + // The time at which quiet time should end. The value that you specify has to + // be in HH:mm format, where HH is the hour in 24-hour format (with a leading + // zero, if applicable), and mm is the minutes. For example, use 02:30 to represent + // 2:30 AM, or 14:30 to represent 2:30 PM. + End *string `type:"string"` + + // The time at which quiet time should begin. The value that you specify has + // to be in HH:mm format, where HH is the hour in 24-hour format (with a leading + // zero, if applicable), and mm is the minutes. For example, use 02:30 to represent + // 2:30 AM, or 14:30 to represent 2:30 PM. + Start *string `type:"string"` +} + +// String returns the string representation +func (s QuietTime) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s QuietTime) GoString() string { + return s.String() +} + +// SetEnd sets the End field's value. +func (s *QuietTime) SetEnd(v string) *QuietTime { + s.End = &v + return s +} + +// SetStart sets the Start field's value. +func (s *QuietTime) SetStart(v string) *QuietTime { + s.Start = &v + return s +} + +// An email represented as a raw MIME message. +type RawEmail struct { + _ struct{} `type:"structure"` + + // The raw email message itself. Then entire message must be base64-encoded. + // + // Data is automatically base64 encoded/decoded by the SDK. + Data []byte `type:"blob"` +} + +// String returns the string representation +func (s RawEmail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RawEmail) GoString() string { + return s.String() +} + +// SetData sets the Data field's value. +func (s *RawEmail) SetData(v []byte) *RawEmail { + s.Data = v + return s +} + +// Define how a segment based on recency of use. +type RecencyDimension struct { + _ struct{} `type:"structure"` + + // The length of time during which users have been active or inactive with your + // app.Valid values: HR_24, DAY_7, DAY_14, DAY_30 + Duration *string `type:"string" enum:"Duration"` + + // The recency dimension type:ACTIVE - Users who have used your app within the + // specified duration are included in the segment.INACTIVE - Users who have + // not used your app within the specified duration are included in the segment. + RecencyType *string `type:"string" enum:"RecencyType"` +} + +// String returns the string representation +func (s RecencyDimension) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RecencyDimension) GoString() string { + return s.String() +} + +// SetDuration sets the Duration field's value. +func (s *RecencyDimension) SetDuration(v string) *RecencyDimension { + s.Duration = &v + return s +} + +// SetRecencyType sets the RecencyType field's value. +func (s *RecencyDimension) SetRecencyType(v string) *RecencyDimension { + s.RecencyType = &v + return s +} + +type RemoveAttributesInput struct { + _ struct{} `type:"structure" payload:"UpdateAttributesRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // AttributeType is a required field + AttributeType *string `location:"uri" locationName:"attribute-type" type:"string" required:"true"` + + // Update attributes request + // + // UpdateAttributesRequest is a required field + UpdateAttributesRequest *UpdateAttributesRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s RemoveAttributesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveAttributesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemoveAttributesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveAttributesInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.AttributeType == nil { + invalidParams.Add(request.NewErrParamRequired("AttributeType")) + } + if s.AttributeType != nil && len(*s.AttributeType) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AttributeType", 1)) + } + if s.UpdateAttributesRequest == nil { + invalidParams.Add(request.NewErrParamRequired("UpdateAttributesRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *RemoveAttributesInput) SetApplicationId(v string) *RemoveAttributesInput { + s.ApplicationId = &v + return s +} + +// SetAttributeType sets the AttributeType field's value. +func (s *RemoveAttributesInput) SetAttributeType(v string) *RemoveAttributesInput { + s.AttributeType = &v + return s +} + +// SetUpdateAttributesRequest sets the UpdateAttributesRequest field's value. +func (s *RemoveAttributesInput) SetUpdateAttributesRequest(v *UpdateAttributesRequest) *RemoveAttributesInput { + s.UpdateAttributesRequest = v + return s +} + +type RemoveAttributesOutput struct { + _ struct{} `type:"structure" payload:"AttributesResource"` + + // Attributes. + // + // AttributesResource is a required field + AttributesResource *AttributesResource `type:"structure" required:"true"` +} + +// String returns the string representation +func (s RemoveAttributesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveAttributesOutput) GoString() string { + return s.String() +} + +// SetAttributesResource sets the AttributesResource field's value. +func (s *RemoveAttributesOutput) SetAttributesResource(v *AttributesResource) *RemoveAttributesOutput { + s.AttributesResource = v + return s +} + +// SMS Channel Request +type SMSChannelRequest struct { + _ struct{} `type:"structure"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // Sender identifier of your messages. + SenderId *string `type:"string"` + + // ShortCode registered with phone provider. + ShortCode *string `type:"string"` +} + +// String returns the string representation +func (s SMSChannelRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SMSChannelRequest) GoString() string { + return s.String() +} + +// SetEnabled sets the Enabled field's value. +func (s *SMSChannelRequest) SetEnabled(v bool) *SMSChannelRequest { + s.Enabled = &v + return s +} + +// SetSenderId sets the SenderId field's value. +func (s *SMSChannelRequest) SetSenderId(v string) *SMSChannelRequest { + s.SenderId = &v + return s +} + +// SetShortCode sets the ShortCode field's value. +func (s *SMSChannelRequest) SetShortCode(v string) *SMSChannelRequest { + s.ShortCode = &v + return s +} + +// SMS Channel Response. +type SMSChannelResponse struct { + _ struct{} `type:"structure"` + + // The unique ID of the application to which the SMS channel belongs. + ApplicationId *string `type:"string"` + + // The date that the settings were last updated in ISO 8601 format. + CreationDate *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + // Not used. Retained for backwards compatibility. + HasCredential *bool `type:"boolean"` + + // Channel ID. Not used, only for backwards compatibility. + Id *string `type:"string"` + + // Is this channel archived + IsArchived *bool `type:"boolean"` + + // Who last updated this entry + LastModifiedBy *string `type:"string"` + + // Last date this was updated + LastModifiedDate *string `type:"string"` + + // Platform type. Will be "SMS" + Platform *string `type:"string"` + + // Promotional messages per second that can be sent + PromotionalMessagesPerSecond *int64 `type:"integer"` + + // Sender identifier of your messages. + SenderId *string `type:"string"` + + // The short code registered with the phone provider. + ShortCode *string `type:"string"` + + // Transactional messages per second that can be sent + TransactionalMessagesPerSecond *int64 `type:"integer"` + + // Version of channel + Version *int64 `type:"integer"` +} + +// String returns the string representation +func (s SMSChannelResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SMSChannelResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *SMSChannelResponse) SetApplicationId(v string) *SMSChannelResponse { + s.ApplicationId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *SMSChannelResponse) SetCreationDate(v string) *SMSChannelResponse { + s.CreationDate = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *SMSChannelResponse) SetEnabled(v bool) *SMSChannelResponse { + s.Enabled = &v + return s +} + +// SetHasCredential sets the HasCredential field's value. +func (s *SMSChannelResponse) SetHasCredential(v bool) *SMSChannelResponse { + s.HasCredential = &v + return s +} + +// SetId sets the Id field's value. +func (s *SMSChannelResponse) SetId(v string) *SMSChannelResponse { + s.Id = &v + return s +} + +// SetIsArchived sets the IsArchived field's value. +func (s *SMSChannelResponse) SetIsArchived(v bool) *SMSChannelResponse { + s.IsArchived = &v + return s +} + +// SetLastModifiedBy sets the LastModifiedBy field's value. +func (s *SMSChannelResponse) SetLastModifiedBy(v string) *SMSChannelResponse { + s.LastModifiedBy = &v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *SMSChannelResponse) SetLastModifiedDate(v string) *SMSChannelResponse { + s.LastModifiedDate = &v + return s +} + +// SetPlatform sets the Platform field's value. +func (s *SMSChannelResponse) SetPlatform(v string) *SMSChannelResponse { + s.Platform = &v + return s +} + +// SetPromotionalMessagesPerSecond sets the PromotionalMessagesPerSecond field's value. +func (s *SMSChannelResponse) SetPromotionalMessagesPerSecond(v int64) *SMSChannelResponse { + s.PromotionalMessagesPerSecond = &v + return s +} + +// SetSenderId sets the SenderId field's value. +func (s *SMSChannelResponse) SetSenderId(v string) *SMSChannelResponse { + s.SenderId = &v + return s +} + +// SetShortCode sets the ShortCode field's value. +func (s *SMSChannelResponse) SetShortCode(v string) *SMSChannelResponse { + s.ShortCode = &v + return s +} + +// SetTransactionalMessagesPerSecond sets the TransactionalMessagesPerSecond field's value. +func (s *SMSChannelResponse) SetTransactionalMessagesPerSecond(v int64) *SMSChannelResponse { + s.TransactionalMessagesPerSecond = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *SMSChannelResponse) SetVersion(v int64) *SMSChannelResponse { + s.Version = &v + return s +} + +// SMS Message. +type SMSMessage struct { + _ struct{} `type:"structure"` + + // The body of the SMS message. + Body *string `type:"string"` + + // The SMS program name that you provided to AWS Support when you requested + // your dedicated number. + Keyword *string `type:"string"` + + // Is this a transaction priority message or lower priority. + MessageType *string `type:"string" enum:"MessageType"` + + // The phone number that the SMS message originates from. Specify one of the + // dedicated long codes or short codes that you requested from AWS Support and + // that is assigned to your account. If this attribute is not specified, Amazon + // Pinpoint randomly assigns a long code. + OriginationNumber *string `type:"string"` + + // The sender ID that is shown as the message sender on the recipient's device. + // Support for sender IDs varies by country or region. + SenderId *string `type:"string"` + + // Default message substitutions. Can be overridden by individual address substitutions. + Substitutions map[string][]*string `type:"map"` +} + +// String returns the string representation +func (s SMSMessage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SMSMessage) GoString() string { + return s.String() +} + +// SetBody sets the Body field's value. +func (s *SMSMessage) SetBody(v string) *SMSMessage { + s.Body = &v + return s +} + +// SetKeyword sets the Keyword field's value. +func (s *SMSMessage) SetKeyword(v string) *SMSMessage { + s.Keyword = &v + return s +} + +// SetMessageType sets the MessageType field's value. +func (s *SMSMessage) SetMessageType(v string) *SMSMessage { + s.MessageType = &v + return s +} + +// SetOriginationNumber sets the OriginationNumber field's value. +func (s *SMSMessage) SetOriginationNumber(v string) *SMSMessage { + s.OriginationNumber = &v + return s +} + +// SetSenderId sets the SenderId field's value. +func (s *SMSMessage) SetSenderId(v string) *SMSMessage { + s.SenderId = &v + return s +} + +// SetSubstitutions sets the Substitutions field's value. +func (s *SMSMessage) SetSubstitutions(v map[string][]*string) *SMSMessage { + s.Substitutions = v + return s +} + +// Shcedule that defines when a campaign is run. +type Schedule struct { + _ struct{} `type:"structure"` + + // The scheduled time that the campaign ends in ISO 8601 format. + EndTime *string `type:"string"` + + // Defines the type of events that can trigger the campaign. Used when the Frequency + // is set to EVENT. + EventFilter *CampaignEventFilter `type:"structure"` + + // How often the campaign delivers messages.Valid values:ONCEHOURLYDAILYWEEKLYMONTHLYEVENT + Frequency *string `type:"string" enum:"Frequency"` + + // Indicates whether the campaign schedule takes effect according to each user's + // local time. + IsLocalTime *bool `type:"boolean"` + + // The default quiet time for the campaign. The campaign doesn't send messages + // to endpoints during the quiet time.Note: Make sure that your endpoints include + // the Demographics.Timezone attribute if you plan to enable a quiet time for + // your campaign. If your endpoints don't include this attribute, they'll receive + // the messages that you send them, even if quiet time is enabled.When you set + // up a campaign to use quiet time, the campaign doesn't send messages during + // the time range you specified, as long as all of the following are true:- + // The endpoint includes a valid Demographic.Timezone attribute.- The current + // time in the endpoint's time zone is later than or equal to the time specified + // in the QuietTime.Start attribute for the campaign.- The current time in the + // endpoint's time zone is earlier than or equal to the time specified in the + // QuietTime.End attribute for the campaign. + QuietTime *QuietTime `type:"structure"` + + // The scheduled time that the campaign begins in ISO 8601 format. + StartTime *string `type:"string"` + + // The starting UTC offset for the schedule if the value for isLocalTime is + // trueValid values: UTCUTC+01UTC+02UTC+03UTC+03:30UTC+04UTC+04:30UTC+05UTC+05:30UTC+05:45UTC+06UTC+06:30UTC+07UTC+08UTC+09UTC+09:30UTC+10UTC+10:30UTC+11UTC+12UTC+13UTC-02UTC-03UTC-04UTC-05UTC-06UTC-07UTC-08UTC-09UTC-10UTC-11 + Timezone *string `type:"string"` +} + +// String returns the string representation +func (s Schedule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Schedule) GoString() string { + return s.String() +} + +// SetEndTime sets the EndTime field's value. +func (s *Schedule) SetEndTime(v string) *Schedule { + s.EndTime = &v + return s +} + +// SetEventFilter sets the EventFilter field's value. +func (s *Schedule) SetEventFilter(v *CampaignEventFilter) *Schedule { + s.EventFilter = v + return s +} + +// SetFrequency sets the Frequency field's value. +func (s *Schedule) SetFrequency(v string) *Schedule { + s.Frequency = &v + return s +} + +// SetIsLocalTime sets the IsLocalTime field's value. +func (s *Schedule) SetIsLocalTime(v bool) *Schedule { + s.IsLocalTime = &v + return s +} + +// SetQuietTime sets the QuietTime field's value. +func (s *Schedule) SetQuietTime(v *QuietTime) *Schedule { + s.QuietTime = v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *Schedule) SetStartTime(v string) *Schedule { + s.StartTime = &v + return s +} + +// SetTimezone sets the Timezone field's value. +func (s *Schedule) SetTimezone(v string) *Schedule { + s.Timezone = &v + return s +} + +// Segment behavior dimensions +type SegmentBehaviors struct { + _ struct{} `type:"structure"` + + // The recency of use. + Recency *RecencyDimension `type:"structure"` +} + +// String returns the string representation +func (s SegmentBehaviors) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SegmentBehaviors) GoString() string { + return s.String() +} + +// SetRecency sets the Recency field's value. +func (s *SegmentBehaviors) SetRecency(v *RecencyDimension) *SegmentBehaviors { + s.Recency = v + return s +} + +// Segment demographic dimensions +type SegmentDemographics struct { + _ struct{} `type:"structure"` + + // The app version criteria for the segment. + AppVersion *SetDimension `type:"structure"` + + // The channel criteria for the segment. + Channel *SetDimension `type:"structure"` + + // The device type criteria for the segment. + DeviceType *SetDimension `type:"structure"` + + // The device make criteria for the segment. + Make *SetDimension `type:"structure"` + + // The device model criteria for the segment. + Model *SetDimension `type:"structure"` + + // The device platform criteria for the segment. + Platform *SetDimension `type:"structure"` +} + +// String returns the string representation +func (s SegmentDemographics) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SegmentDemographics) GoString() string { + return s.String() +} + +// SetAppVersion sets the AppVersion field's value. +func (s *SegmentDemographics) SetAppVersion(v *SetDimension) *SegmentDemographics { + s.AppVersion = v + return s +} + +// SetChannel sets the Channel field's value. +func (s *SegmentDemographics) SetChannel(v *SetDimension) *SegmentDemographics { + s.Channel = v + return s +} + +// SetDeviceType sets the DeviceType field's value. +func (s *SegmentDemographics) SetDeviceType(v *SetDimension) *SegmentDemographics { + s.DeviceType = v + return s +} + +// SetMake sets the Make field's value. +func (s *SegmentDemographics) SetMake(v *SetDimension) *SegmentDemographics { + s.Make = v + return s +} + +// SetModel sets the Model field's value. +func (s *SegmentDemographics) SetModel(v *SetDimension) *SegmentDemographics { + s.Model = v + return s +} + +// SetPlatform sets the Platform field's value. +func (s *SegmentDemographics) SetPlatform(v *SetDimension) *SegmentDemographics { + s.Platform = v + return s +} + +// Segment dimensions +type SegmentDimensions struct { + _ struct{} `type:"structure"` + + // Custom segment attributes. + Attributes map[string]*AttributeDimension `type:"map"` + + // The segment behaviors attributes. + Behavior *SegmentBehaviors `type:"structure"` + + // The segment demographics attributes. + Demographic *SegmentDemographics `type:"structure"` + + // The segment location attributes. + Location *SegmentLocation `type:"structure"` + + // Custom segment metrics. + Metrics map[string]*MetricDimension `type:"map"` + + // Custom segment user attributes. + UserAttributes map[string]*AttributeDimension `type:"map"` +} + +// String returns the string representation +func (s SegmentDimensions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SegmentDimensions) GoString() string { + return s.String() +} + +// SetAttributes sets the Attributes field's value. +func (s *SegmentDimensions) SetAttributes(v map[string]*AttributeDimension) *SegmentDimensions { + s.Attributes = v + return s +} + +// SetBehavior sets the Behavior field's value. +func (s *SegmentDimensions) SetBehavior(v *SegmentBehaviors) *SegmentDimensions { + s.Behavior = v + return s +} + +// SetDemographic sets the Demographic field's value. +func (s *SegmentDimensions) SetDemographic(v *SegmentDemographics) *SegmentDimensions { + s.Demographic = v + return s +} + +// SetLocation sets the Location field's value. +func (s *SegmentDimensions) SetLocation(v *SegmentLocation) *SegmentDimensions { + s.Location = v + return s +} + +// SetMetrics sets the Metrics field's value. +func (s *SegmentDimensions) SetMetrics(v map[string]*MetricDimension) *SegmentDimensions { + s.Metrics = v + return s +} + +// SetUserAttributes sets the UserAttributes field's value. +func (s *SegmentDimensions) SetUserAttributes(v map[string]*AttributeDimension) *SegmentDimensions { + s.UserAttributes = v + return s +} + +// Segment group definition. +type SegmentGroup struct { + _ struct{} `type:"structure"` + + // List of dimensions to include or exclude. + Dimensions []*SegmentDimensions `type:"list"` + + // The base segment that you build your segment on. The source segment defines + // the starting "universe" of endpoints. When you add dimensions to the segment, + // it filters the source segment based on the dimensions that you specify. You + // can specify more than one dimensional segment. You can only specify one imported + // segment.NOTE: If you specify an imported segment for this attribute, the + // segment size estimate that appears in the Amazon Pinpoint console shows the + // size of the imported segment, without any filters applied to it. + SourceSegments []*SegmentReference `type:"list"` + + // Specify how to handle multiple source segments. For example, if you specify + // three source segments, should the resulting segment be based on any or all + // of the segments? Acceptable values: ANY or ALL. + SourceType *string `type:"string" enum:"SourceType"` + + // Specify how to handle multiple segment dimensions. For example, if you specify + // three dimensions, should the resulting segment include endpoints that are + // matched by all, any, or none of the dimensions? Acceptable values: ALL, ANY, + // or NONE. + Type *string `type:"string" enum:"Type"` +} + +// String returns the string representation +func (s SegmentGroup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SegmentGroup) GoString() string { + return s.String() +} + +// SetDimensions sets the Dimensions field's value. +func (s *SegmentGroup) SetDimensions(v []*SegmentDimensions) *SegmentGroup { + s.Dimensions = v + return s +} + +// SetSourceSegments sets the SourceSegments field's value. +func (s *SegmentGroup) SetSourceSegments(v []*SegmentReference) *SegmentGroup { + s.SourceSegments = v + return s +} + +// SetSourceType sets the SourceType field's value. +func (s *SegmentGroup) SetSourceType(v string) *SegmentGroup { + s.SourceType = &v + return s +} + +// SetType sets the Type field's value. +func (s *SegmentGroup) SetType(v string) *SegmentGroup { + s.Type = &v + return s +} + +// Segment group definition. +type SegmentGroupList struct { + _ struct{} `type:"structure"` + + // A set of segment criteria to evaluate. + Groups []*SegmentGroup `type:"list"` + + // Specify how to handle multiple segment groups. For example, if the segment + // includes three segment groups, should the resulting segment include endpoints + // that are matched by all, any, or none of the segment groups you created. + // Acceptable values: ALL, ANY, or NONE. + Include *string `type:"string" enum:"Include"` +} + +// String returns the string representation +func (s SegmentGroupList) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SegmentGroupList) GoString() string { + return s.String() +} + +// SetGroups sets the Groups field's value. +func (s *SegmentGroupList) SetGroups(v []*SegmentGroup) *SegmentGroupList { + s.Groups = v + return s +} + +// SetInclude sets the Include field's value. +func (s *SegmentGroupList) SetInclude(v string) *SegmentGroupList { + s.Include = &v + return s +} + +// Segment import definition. +type SegmentImportResource struct { + _ struct{} `type:"structure"` + + // The number of channel types in the imported segment. + ChannelCounts map[string]*int64 `type:"map"` + + // (Deprecated) Your AWS account ID, which you assigned to the ExternalID key + // in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This + // requirement is removed, and external IDs are not recommended for IAM roles + // assumed by Amazon Pinpoint. + ExternalId *string `type:"string"` + + // The format of the endpoint files that were imported to create this segment.Valid + // values: CSV, JSON + Format *string `type:"string" enum:"Format"` + + // The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint + // access to the endpoints in Amazon S3. + RoleArn *string `type:"string"` + + // The URL of the S3 bucket that the segment was imported from. + S3Url *string `type:"string"` + + // The number of endpoints that were successfully imported to create this segment. + Size *int64 `type:"integer"` +} + +// String returns the string representation +func (s SegmentImportResource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SegmentImportResource) GoString() string { + return s.String() +} + +// SetChannelCounts sets the ChannelCounts field's value. +func (s *SegmentImportResource) SetChannelCounts(v map[string]*int64) *SegmentImportResource { + s.ChannelCounts = v + return s +} + +// SetExternalId sets the ExternalId field's value. +func (s *SegmentImportResource) SetExternalId(v string) *SegmentImportResource { + s.ExternalId = &v + return s +} + +// SetFormat sets the Format field's value. +func (s *SegmentImportResource) SetFormat(v string) *SegmentImportResource { + s.Format = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *SegmentImportResource) SetRoleArn(v string) *SegmentImportResource { + s.RoleArn = &v + return s +} + +// SetS3Url sets the S3Url field's value. +func (s *SegmentImportResource) SetS3Url(v string) *SegmentImportResource { + s.S3Url = &v + return s +} + +// SetSize sets the Size field's value. +func (s *SegmentImportResource) SetSize(v int64) *SegmentImportResource { + s.Size = &v + return s +} + +// Segment location dimensions +type SegmentLocation struct { + _ struct{} `type:"structure"` + + // The country or region, in ISO 3166-1 alpha-2 format. + Country *SetDimension `type:"structure"` + + // The GPS Point dimension. + GPSPoint *GPSPointDimension `type:"structure"` +} + +// String returns the string representation +func (s SegmentLocation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SegmentLocation) GoString() string { + return s.String() +} + +// SetCountry sets the Country field's value. +func (s *SegmentLocation) SetCountry(v *SetDimension) *SegmentLocation { + s.Country = v + return s +} + +// SetGPSPoint sets the GPSPoint field's value. +func (s *SegmentLocation) SetGPSPoint(v *GPSPointDimension) *SegmentLocation { + s.GPSPoint = v + return s +} + +// Segment reference. +type SegmentReference struct { + _ struct{} `type:"structure"` + + // A unique identifier for the segment. + Id *string `type:"string"` + + // If specified contains a specific version of the segment included. + Version *int64 `type:"integer"` +} + +// String returns the string representation +func (s SegmentReference) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SegmentReference) GoString() string { + return s.String() +} + +// SetId sets the Id field's value. +func (s *SegmentReference) SetId(v string) *SegmentReference { + s.Id = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *SegmentReference) SetVersion(v int64) *SegmentReference { + s.Version = &v + return s +} + +// Segment definition. +type SegmentResponse struct { + _ struct{} `type:"structure"` + + // The ID of the application that the segment applies to. + ApplicationId *string `type:"string"` + + // The date and time when the segment was created. + CreationDate *string `type:"string"` + + // The segment dimensions attributes. + Dimensions *SegmentDimensions `type:"structure"` + + // The unique segment ID. + Id *string `type:"string"` + + // The import job settings. + ImportDefinition *SegmentImportResource `type:"structure"` + + // The date and time when the segment was last modified. + LastModifiedDate *string `type:"string"` + + // The name of the segment. + Name *string `type:"string"` + + // A segment group, which consists of zero or more source segments, plus dimensions + // that are applied to those source segments. + SegmentGroups *SegmentGroupList `type:"structure"` + + // The segment type:DIMENSIONAL - A dynamic segment built from selection criteria + // based on endpoint data reported by your app. You create this type of segment + // by using the segment builder in the Amazon Pinpoint console or by making + // a POST request to the segments resource.IMPORT - A static segment built from + // an imported set of endpoint definitions. You create this type of segment + // by importing a segment in the Amazon Pinpoint console or by making a POST + // request to the jobs/import resource. + SegmentType *string `type:"string" enum:"SegmentType"` + + // The segment version number. + Version *int64 `type:"integer"` +} + +// String returns the string representation +func (s SegmentResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SegmentResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *SegmentResponse) SetApplicationId(v string) *SegmentResponse { + s.ApplicationId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *SegmentResponse) SetCreationDate(v string) *SegmentResponse { + s.CreationDate = &v + return s +} + +// SetDimensions sets the Dimensions field's value. +func (s *SegmentResponse) SetDimensions(v *SegmentDimensions) *SegmentResponse { + s.Dimensions = v + return s +} + +// SetId sets the Id field's value. +func (s *SegmentResponse) SetId(v string) *SegmentResponse { + s.Id = &v + return s +} + +// SetImportDefinition sets the ImportDefinition field's value. +func (s *SegmentResponse) SetImportDefinition(v *SegmentImportResource) *SegmentResponse { + s.ImportDefinition = v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *SegmentResponse) SetLastModifiedDate(v string) *SegmentResponse { + s.LastModifiedDate = &v + return s +} + +// SetName sets the Name field's value. +func (s *SegmentResponse) SetName(v string) *SegmentResponse { + s.Name = &v + return s +} + +// SetSegmentGroups sets the SegmentGroups field's value. +func (s *SegmentResponse) SetSegmentGroups(v *SegmentGroupList) *SegmentResponse { + s.SegmentGroups = v + return s +} + +// SetSegmentType sets the SegmentType field's value. +func (s *SegmentResponse) SetSegmentType(v string) *SegmentResponse { + s.SegmentType = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *SegmentResponse) SetVersion(v int64) *SegmentResponse { + s.Version = &v + return s +} + +// Segments in your account. +type SegmentsResponse struct { + _ struct{} `type:"structure"` + + // The list of segments. + Item []*SegmentResponse `type:"list"` + + // An identifier used to retrieve the next page of results. The token is null + // if no additional pages exist. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s SegmentsResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SegmentsResponse) GoString() string { + return s.String() +} + +// SetItem sets the Item field's value. +func (s *SegmentsResponse) SetItem(v []*SegmentResponse) *SegmentsResponse { + s.Item = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *SegmentsResponse) SetNextToken(v string) *SegmentsResponse { + s.NextToken = &v + return s +} + +type SendMessagesInput struct { + _ struct{} `type:"structure" payload:"MessageRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // Send message request. + // + // MessageRequest is a required field + MessageRequest *MessageRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s SendMessagesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SendMessagesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SendMessagesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SendMessagesInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.MessageRequest == nil { + invalidParams.Add(request.NewErrParamRequired("MessageRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *SendMessagesInput) SetApplicationId(v string) *SendMessagesInput { + s.ApplicationId = &v + return s +} + +// SetMessageRequest sets the MessageRequest field's value. +func (s *SendMessagesInput) SetMessageRequest(v *MessageRequest) *SendMessagesInput { + s.MessageRequest = v + return s +} + +type SendMessagesOutput struct { + _ struct{} `type:"structure" payload:"MessageResponse"` + + // Send message response. + // + // MessageResponse is a required field + MessageResponse *MessageResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s SendMessagesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SendMessagesOutput) GoString() string { + return s.String() +} + +// SetMessageResponse sets the MessageResponse field's value. +func (s *SendMessagesOutput) SetMessageResponse(v *MessageResponse) *SendMessagesOutput { + s.MessageResponse = v + return s +} + +// Send message request. +type SendUsersMessageRequest struct { + _ struct{} `type:"structure"` + + // A map of custom attribute-value pairs. Amazon Pinpoint adds these attributes + // to the data.pinpoint object in the body of the push notification payload. + // Amazon Pinpoint also provides these attributes in the events that it generates + // for users-messages deliveries. + Context map[string]*string `type:"map"` + + // Message definitions for the default message and any messages that are tailored + // for specific channels. + MessageConfiguration *DirectMessageConfiguration `type:"structure"` + + // A unique ID that you can use to trace a message. This ID is visible to recipients. + TraceId *string `type:"string"` + + // A map that associates user IDs with EndpointSendConfiguration objects. Within + // an EndpointSendConfiguration object, you can tailor the message for a user + // by specifying message overrides or substitutions. + Users map[string]*EndpointSendConfiguration `type:"map"` +} + +// String returns the string representation +func (s SendUsersMessageRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SendUsersMessageRequest) GoString() string { + return s.String() +} + +// SetContext sets the Context field's value. +func (s *SendUsersMessageRequest) SetContext(v map[string]*string) *SendUsersMessageRequest { + s.Context = v + return s +} + +// SetMessageConfiguration sets the MessageConfiguration field's value. +func (s *SendUsersMessageRequest) SetMessageConfiguration(v *DirectMessageConfiguration) *SendUsersMessageRequest { + s.MessageConfiguration = v + return s +} + +// SetTraceId sets the TraceId field's value. +func (s *SendUsersMessageRequest) SetTraceId(v string) *SendUsersMessageRequest { + s.TraceId = &v + return s +} + +// SetUsers sets the Users field's value. +func (s *SendUsersMessageRequest) SetUsers(v map[string]*EndpointSendConfiguration) *SendUsersMessageRequest { + s.Users = v + return s +} + +// User send message response. +type SendUsersMessageResponse struct { + _ struct{} `type:"structure"` + + // The unique ID of the Amazon Pinpoint project used to send the message. + ApplicationId *string `type:"string"` + + // The unique ID assigned to the users-messages request. + RequestId *string `type:"string"` + + // An object that shows the endpoints that were messaged for each user. The + // object provides a list of user IDs. For each user ID, it provides the endpoint + // IDs that were messaged. For each endpoint ID, it provides an EndpointMessageResult + // object. + Result map[string]map[string]*EndpointMessageResult `type:"map"` +} + +// String returns the string representation +func (s SendUsersMessageResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SendUsersMessageResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *SendUsersMessageResponse) SetApplicationId(v string) *SendUsersMessageResponse { + s.ApplicationId = &v + return s +} + +// SetRequestId sets the RequestId field's value. +func (s *SendUsersMessageResponse) SetRequestId(v string) *SendUsersMessageResponse { + s.RequestId = &v + return s +} + +// SetResult sets the Result field's value. +func (s *SendUsersMessageResponse) SetResult(v map[string]map[string]*EndpointMessageResult) *SendUsersMessageResponse { + s.Result = v + return s +} + +type SendUsersMessagesInput struct { + _ struct{} `type:"structure" payload:"SendUsersMessageRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // Send message request. + // + // SendUsersMessageRequest is a required field + SendUsersMessageRequest *SendUsersMessageRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s SendUsersMessagesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SendUsersMessagesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SendUsersMessagesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SendUsersMessagesInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.SendUsersMessageRequest == nil { + invalidParams.Add(request.NewErrParamRequired("SendUsersMessageRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *SendUsersMessagesInput) SetApplicationId(v string) *SendUsersMessagesInput { + s.ApplicationId = &v + return s +} + +// SetSendUsersMessageRequest sets the SendUsersMessageRequest field's value. +func (s *SendUsersMessagesInput) SetSendUsersMessageRequest(v *SendUsersMessageRequest) *SendUsersMessagesInput { + s.SendUsersMessageRequest = v + return s +} + +type SendUsersMessagesOutput struct { + _ struct{} `type:"structure" payload:"SendUsersMessageResponse"` + + // User send message response. + // + // SendUsersMessageResponse is a required field + SendUsersMessageResponse *SendUsersMessageResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s SendUsersMessagesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SendUsersMessagesOutput) GoString() string { + return s.String() +} + +// SetSendUsersMessageResponse sets the SendUsersMessageResponse field's value. +func (s *SendUsersMessagesOutput) SetSendUsersMessageResponse(v *SendUsersMessageResponse) *SendUsersMessagesOutput { + s.SendUsersMessageResponse = v + return s +} + +// Information about a session. +type Session struct { + _ struct{} `type:"structure"` + + // The duration of the session, in milliseconds. + Duration *int64 `type:"integer"` + + // A unique identifier for the session. + Id *string `type:"string"` + + // The date and time when the session began. + StartTimestamp *string `type:"string"` + + // The date and time when the session ended. + StopTimestamp *string `type:"string"` +} + +// String returns the string representation +func (s Session) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Session) GoString() string { + return s.String() +} + +// SetDuration sets the Duration field's value. +func (s *Session) SetDuration(v int64) *Session { + s.Duration = &v + return s +} + +// SetId sets the Id field's value. +func (s *Session) SetId(v string) *Session { + s.Id = &v + return s +} + +// SetStartTimestamp sets the StartTimestamp field's value. +func (s *Session) SetStartTimestamp(v string) *Session { + s.StartTimestamp = &v + return s +} + +// SetStopTimestamp sets the StopTimestamp field's value. +func (s *Session) SetStopTimestamp(v string) *Session { + s.StopTimestamp = &v + return s +} + +// Dimension specification of a segment. +type SetDimension struct { + _ struct{} `type:"structure"` + + // The type of dimension:INCLUSIVE - Endpoints that match the criteria are included + // in the segment.EXCLUSIVE - Endpoints that match the criteria are excluded + // from the segment. + DimensionType *string `type:"string" enum:"DimensionType"` + + // The criteria values for the segment dimension. Endpoints with matching attribute + // values are included or excluded from the segment, depending on the setting + // for Type. + Values []*string `type:"list"` +} + +// String returns the string representation +func (s SetDimension) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SetDimension) GoString() string { + return s.String() +} + +// SetDimensionType sets the DimensionType field's value. +func (s *SetDimension) SetDimensionType(v string) *SetDimension { + s.DimensionType = &v + return s +} + +// SetValues sets the Values field's value. +func (s *SetDimension) SetValues(v []*string) *SetDimension { + s.Values = v + return s +} + +// An email composed of a subject, a text part and a html part. +type SimpleEmail struct { + _ struct{} `type:"structure"` + + // The content of the message, in HTML format. Use this for email clients that + // can process HTML. You can include clickable links, formatted text, and much + // more in an HTML message. + HtmlPart *SimpleEmailPart `type:"structure"` + + // The subject of the message: A short summary of the content, which will appear + // in the recipient's inbox. + Subject *SimpleEmailPart `type:"structure"` + + // The content of the message, in text format. Use this for text-based email + // clients, or clients on high-latency networks (such as mobile devices). + TextPart *SimpleEmailPart `type:"structure"` +} + +// String returns the string representation +func (s SimpleEmail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SimpleEmail) GoString() string { + return s.String() +} + +// SetHtmlPart sets the HtmlPart field's value. +func (s *SimpleEmail) SetHtmlPart(v *SimpleEmailPart) *SimpleEmail { + s.HtmlPart = v + return s +} + +// SetSubject sets the Subject field's value. +func (s *SimpleEmail) SetSubject(v *SimpleEmailPart) *SimpleEmail { + s.Subject = v + return s +} + +// SetTextPart sets the TextPart field's value. +func (s *SimpleEmail) SetTextPart(v *SimpleEmailPart) *SimpleEmail { + s.TextPart = v + return s +} + +// Textual email data, plus an optional character set specification. +type SimpleEmailPart struct { + _ struct{} `type:"structure"` + + // The character set of the content. + Charset *string `type:"string"` + + // The textual data of the content. + Data *string `type:"string"` +} + +// String returns the string representation +func (s SimpleEmailPart) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SimpleEmailPart) GoString() string { + return s.String() +} + +// SetCharset sets the Charset field's value. +func (s *SimpleEmailPart) SetCharset(v string) *SimpleEmailPart { + s.Charset = &v + return s +} + +// SetData sets the Data field's value. +func (s *SimpleEmailPart) SetData(v string) *SimpleEmailPart { + s.Data = &v + return s +} + +// Treatment resource +type TreatmentResource struct { + _ struct{} `type:"structure"` + + // The unique treatment ID. + Id *string `type:"string"` + + // The message configuration settings. + MessageConfiguration *MessageConfiguration `type:"structure"` + + // The campaign schedule. + Schedule *Schedule `type:"structure"` + + // The allocated percentage of users for this treatment. + SizePercent *int64 `type:"integer"` + + // The treatment status. + State *CampaignState `type:"structure"` + + // A custom description for the treatment. + TreatmentDescription *string `type:"string"` + + // The custom name of a variation of the campaign used for A/B testing. + TreatmentName *string `type:"string"` +} + +// String returns the string representation +func (s TreatmentResource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TreatmentResource) GoString() string { + return s.String() +} + +// SetId sets the Id field's value. +func (s *TreatmentResource) SetId(v string) *TreatmentResource { + s.Id = &v + return s +} + +// SetMessageConfiguration sets the MessageConfiguration field's value. +func (s *TreatmentResource) SetMessageConfiguration(v *MessageConfiguration) *TreatmentResource { + s.MessageConfiguration = v + return s +} + +// SetSchedule sets the Schedule field's value. +func (s *TreatmentResource) SetSchedule(v *Schedule) *TreatmentResource { + s.Schedule = v + return s +} + +// SetSizePercent sets the SizePercent field's value. +func (s *TreatmentResource) SetSizePercent(v int64) *TreatmentResource { + s.SizePercent = &v + return s +} + +// SetState sets the State field's value. +func (s *TreatmentResource) SetState(v *CampaignState) *TreatmentResource { + s.State = v + return s +} + +// SetTreatmentDescription sets the TreatmentDescription field's value. +func (s *TreatmentResource) SetTreatmentDescription(v string) *TreatmentResource { + s.TreatmentDescription = &v + return s +} + +// SetTreatmentName sets the TreatmentName field's value. +func (s *TreatmentResource) SetTreatmentName(v string) *TreatmentResource { + s.TreatmentName = &v + return s +} + +type UpdateAdmChannelInput struct { + _ struct{} `type:"structure" payload:"ADMChannelRequest"` + + // Amazon Device Messaging channel definition. + // + // ADMChannelRequest is a required field + ADMChannelRequest *ADMChannelRequest `type:"structure" required:"true"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateAdmChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateAdmChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateAdmChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateAdmChannelInput"} + if s.ADMChannelRequest == nil { + invalidParams.Add(request.NewErrParamRequired("ADMChannelRequest")) + } + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetADMChannelRequest sets the ADMChannelRequest field's value. +func (s *UpdateAdmChannelInput) SetADMChannelRequest(v *ADMChannelRequest) *UpdateAdmChannelInput { + s.ADMChannelRequest = v + return s +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateAdmChannelInput) SetApplicationId(v string) *UpdateAdmChannelInput { + s.ApplicationId = &v + return s +} + +type UpdateAdmChannelOutput struct { + _ struct{} `type:"structure" payload:"ADMChannelResponse"` + + // Amazon Device Messaging channel definition. + // + // ADMChannelResponse is a required field + ADMChannelResponse *ADMChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateAdmChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateAdmChannelOutput) GoString() string { + return s.String() +} + +// SetADMChannelResponse sets the ADMChannelResponse field's value. +func (s *UpdateAdmChannelOutput) SetADMChannelResponse(v *ADMChannelResponse) *UpdateAdmChannelOutput { + s.ADMChannelResponse = v + return s +} + +type UpdateApnsChannelInput struct { + _ struct{} `type:"structure" payload:"APNSChannelRequest"` + + // Apple Push Notification Service channel definition. + // + // APNSChannelRequest is a required field + APNSChannelRequest *APNSChannelRequest `type:"structure" required:"true"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateApnsChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateApnsChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateApnsChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateApnsChannelInput"} + if s.APNSChannelRequest == nil { + invalidParams.Add(request.NewErrParamRequired("APNSChannelRequest")) + } + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAPNSChannelRequest sets the APNSChannelRequest field's value. +func (s *UpdateApnsChannelInput) SetAPNSChannelRequest(v *APNSChannelRequest) *UpdateApnsChannelInput { + s.APNSChannelRequest = v + return s +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateApnsChannelInput) SetApplicationId(v string) *UpdateApnsChannelInput { + s.ApplicationId = &v + return s +} + +type UpdateApnsChannelOutput struct { + _ struct{} `type:"structure" payload:"APNSChannelResponse"` + + // Apple Distribution Push Notification Service channel definition. + // + // APNSChannelResponse is a required field + APNSChannelResponse *APNSChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateApnsChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateApnsChannelOutput) GoString() string { + return s.String() +} + +// SetAPNSChannelResponse sets the APNSChannelResponse field's value. +func (s *UpdateApnsChannelOutput) SetAPNSChannelResponse(v *APNSChannelResponse) *UpdateApnsChannelOutput { + s.APNSChannelResponse = v + return s +} + +type UpdateApnsSandboxChannelInput struct { + _ struct{} `type:"structure" payload:"APNSSandboxChannelRequest"` + + // Apple Development Push Notification Service channel definition. + // + // APNSSandboxChannelRequest is a required field + APNSSandboxChannelRequest *APNSSandboxChannelRequest `type:"structure" required:"true"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateApnsSandboxChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateApnsSandboxChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateApnsSandboxChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateApnsSandboxChannelInput"} + if s.APNSSandboxChannelRequest == nil { + invalidParams.Add(request.NewErrParamRequired("APNSSandboxChannelRequest")) + } + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAPNSSandboxChannelRequest sets the APNSSandboxChannelRequest field's value. +func (s *UpdateApnsSandboxChannelInput) SetAPNSSandboxChannelRequest(v *APNSSandboxChannelRequest) *UpdateApnsSandboxChannelInput { + s.APNSSandboxChannelRequest = v + return s +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateApnsSandboxChannelInput) SetApplicationId(v string) *UpdateApnsSandboxChannelInput { + s.ApplicationId = &v + return s +} + +type UpdateApnsSandboxChannelOutput struct { + _ struct{} `type:"structure" payload:"APNSSandboxChannelResponse"` + + // Apple Development Push Notification Service channel definition. + // + // APNSSandboxChannelResponse is a required field + APNSSandboxChannelResponse *APNSSandboxChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateApnsSandboxChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateApnsSandboxChannelOutput) GoString() string { + return s.String() +} + +// SetAPNSSandboxChannelResponse sets the APNSSandboxChannelResponse field's value. +func (s *UpdateApnsSandboxChannelOutput) SetAPNSSandboxChannelResponse(v *APNSSandboxChannelResponse) *UpdateApnsSandboxChannelOutput { + s.APNSSandboxChannelResponse = v + return s +} + +type UpdateApnsVoipChannelInput struct { + _ struct{} `type:"structure" payload:"APNSVoipChannelRequest"` + + // Apple VoIP Push Notification Service channel definition. + // + // APNSVoipChannelRequest is a required field + APNSVoipChannelRequest *APNSVoipChannelRequest `type:"structure" required:"true"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateApnsVoipChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateApnsVoipChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateApnsVoipChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateApnsVoipChannelInput"} + if s.APNSVoipChannelRequest == nil { + invalidParams.Add(request.NewErrParamRequired("APNSVoipChannelRequest")) + } + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAPNSVoipChannelRequest sets the APNSVoipChannelRequest field's value. +func (s *UpdateApnsVoipChannelInput) SetAPNSVoipChannelRequest(v *APNSVoipChannelRequest) *UpdateApnsVoipChannelInput { + s.APNSVoipChannelRequest = v + return s +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateApnsVoipChannelInput) SetApplicationId(v string) *UpdateApnsVoipChannelInput { + s.ApplicationId = &v + return s +} + +type UpdateApnsVoipChannelOutput struct { + _ struct{} `type:"structure" payload:"APNSVoipChannelResponse"` + + // Apple VoIP Push Notification Service channel definition. + // + // APNSVoipChannelResponse is a required field + APNSVoipChannelResponse *APNSVoipChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateApnsVoipChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateApnsVoipChannelOutput) GoString() string { + return s.String() +} + +// SetAPNSVoipChannelResponse sets the APNSVoipChannelResponse field's value. +func (s *UpdateApnsVoipChannelOutput) SetAPNSVoipChannelResponse(v *APNSVoipChannelResponse) *UpdateApnsVoipChannelOutput { + s.APNSVoipChannelResponse = v + return s +} + +type UpdateApnsVoipSandboxChannelInput struct { + _ struct{} `type:"structure" payload:"APNSVoipSandboxChannelRequest"` + + // Apple VoIP Developer Push Notification Service channel definition. + // + // APNSVoipSandboxChannelRequest is a required field + APNSVoipSandboxChannelRequest *APNSVoipSandboxChannelRequest `type:"structure" required:"true"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdateApnsVoipSandboxChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateApnsVoipSandboxChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateApnsVoipSandboxChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateApnsVoipSandboxChannelInput"} + if s.APNSVoipSandboxChannelRequest == nil { + invalidParams.Add(request.NewErrParamRequired("APNSVoipSandboxChannelRequest")) + } + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAPNSVoipSandboxChannelRequest sets the APNSVoipSandboxChannelRequest field's value. +func (s *UpdateApnsVoipSandboxChannelInput) SetAPNSVoipSandboxChannelRequest(v *APNSVoipSandboxChannelRequest) *UpdateApnsVoipSandboxChannelInput { + s.APNSVoipSandboxChannelRequest = v + return s +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateApnsVoipSandboxChannelInput) SetApplicationId(v string) *UpdateApnsVoipSandboxChannelInput { + s.ApplicationId = &v + return s +} + +type UpdateApnsVoipSandboxChannelOutput struct { + _ struct{} `type:"structure" payload:"APNSVoipSandboxChannelResponse"` + + // Apple VoIP Developer Push Notification Service channel definition. + // + // APNSVoipSandboxChannelResponse is a required field + APNSVoipSandboxChannelResponse *APNSVoipSandboxChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateApnsVoipSandboxChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateApnsVoipSandboxChannelOutput) GoString() string { + return s.String() +} + +// SetAPNSVoipSandboxChannelResponse sets the APNSVoipSandboxChannelResponse field's value. +func (s *UpdateApnsVoipSandboxChannelOutput) SetAPNSVoipSandboxChannelResponse(v *APNSVoipSandboxChannelResponse) *UpdateApnsVoipSandboxChannelOutput { + s.APNSVoipSandboxChannelResponse = v + return s +} + +type UpdateApplicationSettingsInput struct { + _ struct{} `type:"structure" payload:"WriteApplicationSettingsRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // Creating application setting request + // + // WriteApplicationSettingsRequest is a required field + WriteApplicationSettingsRequest *WriteApplicationSettingsRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateApplicationSettingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateApplicationSettingsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateApplicationSettingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateApplicationSettingsInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.WriteApplicationSettingsRequest == nil { + invalidParams.Add(request.NewErrParamRequired("WriteApplicationSettingsRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateApplicationSettingsInput) SetApplicationId(v string) *UpdateApplicationSettingsInput { + s.ApplicationId = &v + return s +} + +// SetWriteApplicationSettingsRequest sets the WriteApplicationSettingsRequest field's value. +func (s *UpdateApplicationSettingsInput) SetWriteApplicationSettingsRequest(v *WriteApplicationSettingsRequest) *UpdateApplicationSettingsInput { + s.WriteApplicationSettingsRequest = v + return s +} + +type UpdateApplicationSettingsOutput struct { + _ struct{} `type:"structure" payload:"ApplicationSettingsResource"` + + // Application settings. + // + // ApplicationSettingsResource is a required field + ApplicationSettingsResource *ApplicationSettingsResource `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateApplicationSettingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateApplicationSettingsOutput) GoString() string { + return s.String() +} + +// SetApplicationSettingsResource sets the ApplicationSettingsResource field's value. +func (s *UpdateApplicationSettingsOutput) SetApplicationSettingsResource(v *ApplicationSettingsResource) *UpdateApplicationSettingsOutput { + s.ApplicationSettingsResource = v + return s +} + +// Update attributes request +type UpdateAttributesRequest struct { + _ struct{} `type:"structure"` + + // The GLOB wildcard for removing the attributes in the application + Blacklist []*string `type:"list"` +} + +// String returns the string representation +func (s UpdateAttributesRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateAttributesRequest) GoString() string { + return s.String() +} + +// SetBlacklist sets the Blacklist field's value. +func (s *UpdateAttributesRequest) SetBlacklist(v []*string) *UpdateAttributesRequest { + s.Blacklist = v + return s +} + +type UpdateBaiduChannelInput struct { + _ struct{} `type:"structure" payload:"BaiduChannelRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // Baidu Cloud Push credentials + // + // BaiduChannelRequest is a required field + BaiduChannelRequest *BaiduChannelRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateBaiduChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateBaiduChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateBaiduChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateBaiduChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.BaiduChannelRequest == nil { + invalidParams.Add(request.NewErrParamRequired("BaiduChannelRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateBaiduChannelInput) SetApplicationId(v string) *UpdateBaiduChannelInput { + s.ApplicationId = &v + return s +} + +// SetBaiduChannelRequest sets the BaiduChannelRequest field's value. +func (s *UpdateBaiduChannelInput) SetBaiduChannelRequest(v *BaiduChannelRequest) *UpdateBaiduChannelInput { + s.BaiduChannelRequest = v + return s +} + +type UpdateBaiduChannelOutput struct { + _ struct{} `type:"structure" payload:"BaiduChannelResponse"` + + // Baidu Cloud Messaging channel definition + // + // BaiduChannelResponse is a required field + BaiduChannelResponse *BaiduChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateBaiduChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateBaiduChannelOutput) GoString() string { + return s.String() +} + +// SetBaiduChannelResponse sets the BaiduChannelResponse field's value. +func (s *UpdateBaiduChannelOutput) SetBaiduChannelResponse(v *BaiduChannelResponse) *UpdateBaiduChannelOutput { + s.BaiduChannelResponse = v + return s +} + +type UpdateCampaignInput struct { + _ struct{} `type:"structure" payload:"WriteCampaignRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // CampaignId is a required field + CampaignId *string `location:"uri" locationName:"campaign-id" type:"string" required:"true"` + + // Used to create a campaign. + // + // WriteCampaignRequest is a required field + WriteCampaignRequest *WriteCampaignRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateCampaignInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateCampaignInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateCampaignInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateCampaignInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.CampaignId == nil { + invalidParams.Add(request.NewErrParamRequired("CampaignId")) + } + if s.CampaignId != nil && len(*s.CampaignId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CampaignId", 1)) + } + if s.WriteCampaignRequest == nil { + invalidParams.Add(request.NewErrParamRequired("WriteCampaignRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateCampaignInput) SetApplicationId(v string) *UpdateCampaignInput { + s.ApplicationId = &v + return s +} + +// SetCampaignId sets the CampaignId field's value. +func (s *UpdateCampaignInput) SetCampaignId(v string) *UpdateCampaignInput { + s.CampaignId = &v + return s +} + +// SetWriteCampaignRequest sets the WriteCampaignRequest field's value. +func (s *UpdateCampaignInput) SetWriteCampaignRequest(v *WriteCampaignRequest) *UpdateCampaignInput { + s.WriteCampaignRequest = v + return s +} + +type UpdateCampaignOutput struct { + _ struct{} `type:"structure" payload:"CampaignResponse"` + + // Campaign definition + // + // CampaignResponse is a required field + CampaignResponse *CampaignResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateCampaignOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateCampaignOutput) GoString() string { + return s.String() +} + +// SetCampaignResponse sets the CampaignResponse field's value. +func (s *UpdateCampaignOutput) SetCampaignResponse(v *CampaignResponse) *UpdateCampaignOutput { + s.CampaignResponse = v + return s +} + +type UpdateEmailChannelInput struct { + _ struct{} `type:"structure" payload:"EmailChannelRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // Email Channel Request + // + // EmailChannelRequest is a required field + EmailChannelRequest *EmailChannelRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateEmailChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateEmailChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateEmailChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateEmailChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.EmailChannelRequest == nil { + invalidParams.Add(request.NewErrParamRequired("EmailChannelRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateEmailChannelInput) SetApplicationId(v string) *UpdateEmailChannelInput { + s.ApplicationId = &v + return s +} + +// SetEmailChannelRequest sets the EmailChannelRequest field's value. +func (s *UpdateEmailChannelInput) SetEmailChannelRequest(v *EmailChannelRequest) *UpdateEmailChannelInput { + s.EmailChannelRequest = v + return s +} + +type UpdateEmailChannelOutput struct { + _ struct{} `type:"structure" payload:"EmailChannelResponse"` + + // Email Channel Response. + // + // EmailChannelResponse is a required field + EmailChannelResponse *EmailChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateEmailChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateEmailChannelOutput) GoString() string { + return s.String() +} + +// SetEmailChannelResponse sets the EmailChannelResponse field's value. +func (s *UpdateEmailChannelOutput) SetEmailChannelResponse(v *EmailChannelResponse) *UpdateEmailChannelOutput { + s.EmailChannelResponse = v + return s +} + +type UpdateEndpointInput struct { + _ struct{} `type:"structure" payload:"EndpointRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // EndpointId is a required field + EndpointId *string `location:"uri" locationName:"endpoint-id" type:"string" required:"true"` + + // An endpoint update request. + // + // EndpointRequest is a required field + EndpointRequest *EndpointRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateEndpointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateEndpointInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateEndpointInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.EndpointId == nil { + invalidParams.Add(request.NewErrParamRequired("EndpointId")) + } + if s.EndpointId != nil && len(*s.EndpointId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("EndpointId", 1)) + } + if s.EndpointRequest == nil { + invalidParams.Add(request.NewErrParamRequired("EndpointRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateEndpointInput) SetApplicationId(v string) *UpdateEndpointInput { + s.ApplicationId = &v + return s +} + +// SetEndpointId sets the EndpointId field's value. +func (s *UpdateEndpointInput) SetEndpointId(v string) *UpdateEndpointInput { + s.EndpointId = &v + return s +} + +// SetEndpointRequest sets the EndpointRequest field's value. +func (s *UpdateEndpointInput) SetEndpointRequest(v *EndpointRequest) *UpdateEndpointInput { + s.EndpointRequest = v + return s +} + +type UpdateEndpointOutput struct { + _ struct{} `type:"structure" payload:"MessageBody"` + + // Simple message object. + // + // MessageBody is a required field + MessageBody *MessageBody `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateEndpointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateEndpointOutput) GoString() string { + return s.String() +} + +// SetMessageBody sets the MessageBody field's value. +func (s *UpdateEndpointOutput) SetMessageBody(v *MessageBody) *UpdateEndpointOutput { + s.MessageBody = v + return s +} + +type UpdateEndpointsBatchInput struct { + _ struct{} `type:"structure" payload:"EndpointBatchRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // Endpoint batch update request. + // + // EndpointBatchRequest is a required field + EndpointBatchRequest *EndpointBatchRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateEndpointsBatchInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateEndpointsBatchInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateEndpointsBatchInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateEndpointsBatchInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.EndpointBatchRequest == nil { + invalidParams.Add(request.NewErrParamRequired("EndpointBatchRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateEndpointsBatchInput) SetApplicationId(v string) *UpdateEndpointsBatchInput { + s.ApplicationId = &v + return s +} + +// SetEndpointBatchRequest sets the EndpointBatchRequest field's value. +func (s *UpdateEndpointsBatchInput) SetEndpointBatchRequest(v *EndpointBatchRequest) *UpdateEndpointsBatchInput { + s.EndpointBatchRequest = v + return s +} + +type UpdateEndpointsBatchOutput struct { + _ struct{} `type:"structure" payload:"MessageBody"` + + // Simple message object. + // + // MessageBody is a required field + MessageBody *MessageBody `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateEndpointsBatchOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateEndpointsBatchOutput) GoString() string { + return s.String() +} + +// SetMessageBody sets the MessageBody field's value. +func (s *UpdateEndpointsBatchOutput) SetMessageBody(v *MessageBody) *UpdateEndpointsBatchOutput { + s.MessageBody = v + return s +} + +type UpdateGcmChannelInput struct { + _ struct{} `type:"structure" payload:"GCMChannelRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // Google Cloud Messaging credentials + // + // GCMChannelRequest is a required field + GCMChannelRequest *GCMChannelRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateGcmChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGcmChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateGcmChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateGcmChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.GCMChannelRequest == nil { + invalidParams.Add(request.NewErrParamRequired("GCMChannelRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateGcmChannelInput) SetApplicationId(v string) *UpdateGcmChannelInput { + s.ApplicationId = &v + return s +} + +// SetGCMChannelRequest sets the GCMChannelRequest field's value. +func (s *UpdateGcmChannelInput) SetGCMChannelRequest(v *GCMChannelRequest) *UpdateGcmChannelInput { + s.GCMChannelRequest = v + return s +} + +type UpdateGcmChannelOutput struct { + _ struct{} `type:"structure" payload:"GCMChannelResponse"` + + // Google Cloud Messaging channel definition + // + // GCMChannelResponse is a required field + GCMChannelResponse *GCMChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateGcmChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateGcmChannelOutput) GoString() string { + return s.String() +} + +// SetGCMChannelResponse sets the GCMChannelResponse field's value. +func (s *UpdateGcmChannelOutput) SetGCMChannelResponse(v *GCMChannelResponse) *UpdateGcmChannelOutput { + s.GCMChannelResponse = v + return s +} + +type UpdateSegmentInput struct { + _ struct{} `type:"structure" payload:"WriteSegmentRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // SegmentId is a required field + SegmentId *string `location:"uri" locationName:"segment-id" type:"string" required:"true"` + + // Segment definition. + // + // WriteSegmentRequest is a required field + WriteSegmentRequest *WriteSegmentRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateSegmentInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSegmentInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateSegmentInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateSegmentInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.SegmentId == nil { + invalidParams.Add(request.NewErrParamRequired("SegmentId")) + } + if s.SegmentId != nil && len(*s.SegmentId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SegmentId", 1)) + } + if s.WriteSegmentRequest == nil { + invalidParams.Add(request.NewErrParamRequired("WriteSegmentRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateSegmentInput) SetApplicationId(v string) *UpdateSegmentInput { + s.ApplicationId = &v + return s +} + +// SetSegmentId sets the SegmentId field's value. +func (s *UpdateSegmentInput) SetSegmentId(v string) *UpdateSegmentInput { + s.SegmentId = &v + return s +} + +// SetWriteSegmentRequest sets the WriteSegmentRequest field's value. +func (s *UpdateSegmentInput) SetWriteSegmentRequest(v *WriteSegmentRequest) *UpdateSegmentInput { + s.WriteSegmentRequest = v + return s +} + +type UpdateSegmentOutput struct { + _ struct{} `type:"structure" payload:"SegmentResponse"` + + // Segment definition. + // + // SegmentResponse is a required field + SegmentResponse *SegmentResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateSegmentOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSegmentOutput) GoString() string { + return s.String() +} + +// SetSegmentResponse sets the SegmentResponse field's value. +func (s *UpdateSegmentOutput) SetSegmentResponse(v *SegmentResponse) *UpdateSegmentOutput { + s.SegmentResponse = v + return s +} + +type UpdateSmsChannelInput struct { + _ struct{} `type:"structure" payload:"SMSChannelRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // SMS Channel Request + // + // SMSChannelRequest is a required field + SMSChannelRequest *SMSChannelRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateSmsChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSmsChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateSmsChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateSmsChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.SMSChannelRequest == nil { + invalidParams.Add(request.NewErrParamRequired("SMSChannelRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateSmsChannelInput) SetApplicationId(v string) *UpdateSmsChannelInput { + s.ApplicationId = &v + return s +} + +// SetSMSChannelRequest sets the SMSChannelRequest field's value. +func (s *UpdateSmsChannelInput) SetSMSChannelRequest(v *SMSChannelRequest) *UpdateSmsChannelInput { + s.SMSChannelRequest = v + return s +} + +type UpdateSmsChannelOutput struct { + _ struct{} `type:"structure" payload:"SMSChannelResponse"` + + // SMS Channel Response. + // + // SMSChannelResponse is a required field + SMSChannelResponse *SMSChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateSmsChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateSmsChannelOutput) GoString() string { + return s.String() +} + +// SetSMSChannelResponse sets the SMSChannelResponse field's value. +func (s *UpdateSmsChannelOutput) SetSMSChannelResponse(v *SMSChannelResponse) *UpdateSmsChannelOutput { + s.SMSChannelResponse = v + return s +} + +type UpdateVoiceChannelInput struct { + _ struct{} `type:"structure" payload:"VoiceChannelRequest"` + + // ApplicationId is a required field + ApplicationId *string `location:"uri" locationName:"application-id" type:"string" required:"true"` + + // Voice Channel Request + // + // VoiceChannelRequest is a required field + VoiceChannelRequest *VoiceChannelRequest `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateVoiceChannelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateVoiceChannelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateVoiceChannelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateVoiceChannelInput"} + if s.ApplicationId == nil { + invalidParams.Add(request.NewErrParamRequired("ApplicationId")) + } + if s.ApplicationId != nil && len(*s.ApplicationId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ApplicationId", 1)) + } + if s.VoiceChannelRequest == nil { + invalidParams.Add(request.NewErrParamRequired("VoiceChannelRequest")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *UpdateVoiceChannelInput) SetApplicationId(v string) *UpdateVoiceChannelInput { + s.ApplicationId = &v + return s +} + +// SetVoiceChannelRequest sets the VoiceChannelRequest field's value. +func (s *UpdateVoiceChannelInput) SetVoiceChannelRequest(v *VoiceChannelRequest) *UpdateVoiceChannelInput { + s.VoiceChannelRequest = v + return s +} + +type UpdateVoiceChannelOutput struct { + _ struct{} `type:"structure" payload:"VoiceChannelResponse"` + + // Voice Channel Response. + // + // VoiceChannelResponse is a required field + VoiceChannelResponse *VoiceChannelResponse `type:"structure" required:"true"` +} + +// String returns the string representation +func (s UpdateVoiceChannelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateVoiceChannelOutput) GoString() string { + return s.String() +} + +// SetVoiceChannelResponse sets the VoiceChannelResponse field's value. +func (s *UpdateVoiceChannelOutput) SetVoiceChannelResponse(v *VoiceChannelResponse) *UpdateVoiceChannelOutput { + s.VoiceChannelResponse = v + return s +} + +// Voice Channel Request +type VoiceChannelRequest struct { + _ struct{} `type:"structure"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` +} + +// String returns the string representation +func (s VoiceChannelRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VoiceChannelRequest) GoString() string { + return s.String() +} + +// SetEnabled sets the Enabled field's value. +func (s *VoiceChannelRequest) SetEnabled(v bool) *VoiceChannelRequest { + s.Enabled = &v + return s +} + +// Voice Channel Response. +type VoiceChannelResponse struct { + _ struct{} `type:"structure"` + + // Application id + ApplicationId *string `type:"string"` + + // The date that the settings were last updated in ISO 8601 format. + CreationDate *string `type:"string"` + + // If the channel is enabled for sending messages. + Enabled *bool `type:"boolean"` + + HasCredential *bool `type:"boolean"` + + // Channel ID. Not used, only for backwards compatibility. + Id *string `type:"string"` + + // Is this channel archived + IsArchived *bool `type:"boolean"` + + // Who made the last change + LastModifiedBy *string `type:"string"` + + // Last date this was updated + LastModifiedDate *string `type:"string"` + + // Platform type. Will be "Voice" + Platform *string `type:"string"` + + // Version of channel + Version *int64 `type:"integer"` +} + +// String returns the string representation +func (s VoiceChannelResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VoiceChannelResponse) GoString() string { + return s.String() +} + +// SetApplicationId sets the ApplicationId field's value. +func (s *VoiceChannelResponse) SetApplicationId(v string) *VoiceChannelResponse { + s.ApplicationId = &v + return s +} + +// SetCreationDate sets the CreationDate field's value. +func (s *VoiceChannelResponse) SetCreationDate(v string) *VoiceChannelResponse { + s.CreationDate = &v + return s +} + +// SetEnabled sets the Enabled field's value. +func (s *VoiceChannelResponse) SetEnabled(v bool) *VoiceChannelResponse { + s.Enabled = &v + return s +} + +// SetHasCredential sets the HasCredential field's value. +func (s *VoiceChannelResponse) SetHasCredential(v bool) *VoiceChannelResponse { + s.HasCredential = &v + return s +} + +// SetId sets the Id field's value. +func (s *VoiceChannelResponse) SetId(v string) *VoiceChannelResponse { + s.Id = &v + return s +} + +// SetIsArchived sets the IsArchived field's value. +func (s *VoiceChannelResponse) SetIsArchived(v bool) *VoiceChannelResponse { + s.IsArchived = &v + return s +} + +// SetLastModifiedBy sets the LastModifiedBy field's value. +func (s *VoiceChannelResponse) SetLastModifiedBy(v string) *VoiceChannelResponse { + s.LastModifiedBy = &v + return s +} + +// SetLastModifiedDate sets the LastModifiedDate field's value. +func (s *VoiceChannelResponse) SetLastModifiedDate(v string) *VoiceChannelResponse { + s.LastModifiedDate = &v + return s +} + +// SetPlatform sets the Platform field's value. +func (s *VoiceChannelResponse) SetPlatform(v string) *VoiceChannelResponse { + s.Platform = &v + return s +} + +// SetVersion sets the Version field's value. +func (s *VoiceChannelResponse) SetVersion(v int64) *VoiceChannelResponse { + s.Version = &v + return s +} + +// Voice Message. +type VoiceMessage struct { + _ struct{} `type:"structure"` + + // The message body of the notification, the email body or the text message. + Body *string `type:"string"` + + // Language of sent message + LanguageCode *string `type:"string"` + + // Is the number from the pool or messaging service to send from. + OriginationNumber *string `type:"string"` + + // Default message substitutions. Can be overridden by individual address substitutions. + Substitutions map[string][]*string `type:"map"` + + // Voice ID of sent message. + VoiceId *string `type:"string"` +} + +// String returns the string representation +func (s VoiceMessage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s VoiceMessage) GoString() string { + return s.String() +} + +// SetBody sets the Body field's value. +func (s *VoiceMessage) SetBody(v string) *VoiceMessage { + s.Body = &v + return s +} + +// SetLanguageCode sets the LanguageCode field's value. +func (s *VoiceMessage) SetLanguageCode(v string) *VoiceMessage { + s.LanguageCode = &v + return s +} + +// SetOriginationNumber sets the OriginationNumber field's value. +func (s *VoiceMessage) SetOriginationNumber(v string) *VoiceMessage { + s.OriginationNumber = &v + return s +} + +// SetSubstitutions sets the Substitutions field's value. +func (s *VoiceMessage) SetSubstitutions(v map[string][]*string) *VoiceMessage { + s.Substitutions = v + return s +} + +// SetVoiceId sets the VoiceId field's value. +func (s *VoiceMessage) SetVoiceId(v string) *VoiceMessage { + s.VoiceId = &v + return s +} + +// Creating application setting request +type WriteApplicationSettingsRequest struct { + _ struct{} `type:"structure"` + + // Default campaign hook information. + CampaignHook *CampaignHook `type:"structure"` + + // The CloudWatchMetrics settings for the app. + CloudWatchMetricsEnabled *bool `type:"boolean"` + + // The limits that apply to each campaign in the project by default. Campaigns + // can also have their own limits, which override the settings at the project + // level. + Limits *CampaignLimits `type:"structure"` + + // The default quiet time for the app. Campaigns in the app don't send messages + // to endpoints during the quiet time.Note: Make sure that your endpoints include + // the Demographics.Timezone attribute if you plan to enable a quiet time for + // your app. If your endpoints don't include this attribute, they'll receive + // the messages that you send them, even if quiet time is enabled.When you set + // up an app to use quiet time, campaigns in that app don't send messages during + // the time range you specified, as long as all of the following are true:- + // The endpoint includes a valid Demographic.Timezone attribute.- The current + // time in the endpoint's time zone is later than or equal to the time specified + // in the QuietTime.Start attribute for the app (or campaign, if applicable).- + // The current time in the endpoint's time zone is earlier than or equal to + // the time specified in the QuietTime.End attribute for the app (or campaign, + // if applicable).Individual campaigns within the app can have their own quiet + // time settings, which override the quiet time settings at the app level. + QuietTime *QuietTime `type:"structure"` +} + +// String returns the string representation +func (s WriteApplicationSettingsRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WriteApplicationSettingsRequest) GoString() string { + return s.String() +} + +// SetCampaignHook sets the CampaignHook field's value. +func (s *WriteApplicationSettingsRequest) SetCampaignHook(v *CampaignHook) *WriteApplicationSettingsRequest { + s.CampaignHook = v + return s +} + +// SetCloudWatchMetricsEnabled sets the CloudWatchMetricsEnabled field's value. +func (s *WriteApplicationSettingsRequest) SetCloudWatchMetricsEnabled(v bool) *WriteApplicationSettingsRequest { + s.CloudWatchMetricsEnabled = &v + return s +} + +// SetLimits sets the Limits field's value. +func (s *WriteApplicationSettingsRequest) SetLimits(v *CampaignLimits) *WriteApplicationSettingsRequest { + s.Limits = v + return s +} + +// SetQuietTime sets the QuietTime field's value. +func (s *WriteApplicationSettingsRequest) SetQuietTime(v *QuietTime) *WriteApplicationSettingsRequest { + s.QuietTime = v + return s +} + +// Used to create a campaign. +type WriteCampaignRequest struct { + _ struct{} `type:"structure"` + + // Treatments that are defined in addition to the default treatment. + AdditionalTreatments []*WriteTreatmentResource `type:"list"` + + // A description of the campaign. + Description *string `type:"string"` + + // The allocated percentage of end users who will not receive messages from + // this campaign. + HoldoutPercent *int64 `type:"integer"` + + // Campaign hook information. + Hook *CampaignHook `type:"structure"` + + // Indicates whether the campaign is paused. A paused campaign does not send + // messages unless you resume it by setting IsPaused to false. + IsPaused *bool `type:"boolean"` + + // The campaign limits settings. + Limits *CampaignLimits `type:"structure"` + + // The message configuration settings. + MessageConfiguration *MessageConfiguration `type:"structure"` + + // The custom name of the campaign. + Name *string `type:"string"` + + // The campaign schedule. + Schedule *Schedule `type:"structure"` + + // The ID of the segment to which the campaign sends messages. + SegmentId *string `type:"string"` + + // The version of the segment to which the campaign sends messages. + SegmentVersion *int64 `type:"integer"` + + // A custom description for the treatment. + TreatmentDescription *string `type:"string"` + + // The custom name of a variation of the campaign used for A/B testing. + TreatmentName *string `type:"string"` +} + +// String returns the string representation +func (s WriteCampaignRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WriteCampaignRequest) GoString() string { + return s.String() +} + +// SetAdditionalTreatments sets the AdditionalTreatments field's value. +func (s *WriteCampaignRequest) SetAdditionalTreatments(v []*WriteTreatmentResource) *WriteCampaignRequest { + s.AdditionalTreatments = v + return s +} + +// SetDescription sets the Description field's value. +func (s *WriteCampaignRequest) SetDescription(v string) *WriteCampaignRequest { + s.Description = &v + return s +} + +// SetHoldoutPercent sets the HoldoutPercent field's value. +func (s *WriteCampaignRequest) SetHoldoutPercent(v int64) *WriteCampaignRequest { + s.HoldoutPercent = &v + return s +} + +// SetHook sets the Hook field's value. +func (s *WriteCampaignRequest) SetHook(v *CampaignHook) *WriteCampaignRequest { + s.Hook = v + return s +} + +// SetIsPaused sets the IsPaused field's value. +func (s *WriteCampaignRequest) SetIsPaused(v bool) *WriteCampaignRequest { + s.IsPaused = &v + return s +} + +// SetLimits sets the Limits field's value. +func (s *WriteCampaignRequest) SetLimits(v *CampaignLimits) *WriteCampaignRequest { + s.Limits = v + return s +} + +// SetMessageConfiguration sets the MessageConfiguration field's value. +func (s *WriteCampaignRequest) SetMessageConfiguration(v *MessageConfiguration) *WriteCampaignRequest { + s.MessageConfiguration = v + return s +} + +// SetName sets the Name field's value. +func (s *WriteCampaignRequest) SetName(v string) *WriteCampaignRequest { + s.Name = &v + return s +} + +// SetSchedule sets the Schedule field's value. +func (s *WriteCampaignRequest) SetSchedule(v *Schedule) *WriteCampaignRequest { + s.Schedule = v + return s +} + +// SetSegmentId sets the SegmentId field's value. +func (s *WriteCampaignRequest) SetSegmentId(v string) *WriteCampaignRequest { + s.SegmentId = &v + return s +} + +// SetSegmentVersion sets the SegmentVersion field's value. +func (s *WriteCampaignRequest) SetSegmentVersion(v int64) *WriteCampaignRequest { + s.SegmentVersion = &v + return s +} + +// SetTreatmentDescription sets the TreatmentDescription field's value. +func (s *WriteCampaignRequest) SetTreatmentDescription(v string) *WriteCampaignRequest { + s.TreatmentDescription = &v + return s +} + +// SetTreatmentName sets the TreatmentName field's value. +func (s *WriteCampaignRequest) SetTreatmentName(v string) *WriteCampaignRequest { + s.TreatmentName = &v + return s +} + +// Request to save an EventStream. +type WriteEventStream struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the Amazon Kinesis stream or Firehose delivery + // stream to which you want to publish events. Firehose ARN: arn:aws:firehose:REGION:ACCOUNT_ID:deliverystream/STREAM_NAME + // Kinesis ARN: arn:aws:kinesis:REGION:ACCOUNT_ID:stream/STREAM_NAME + DestinationStreamArn *string `type:"string"` + + // The IAM role that authorizes Amazon Pinpoint to publish events to the stream + // in your account. + RoleArn *string `type:"string"` +} + +// String returns the string representation +func (s WriteEventStream) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WriteEventStream) GoString() string { + return s.String() +} + +// SetDestinationStreamArn sets the DestinationStreamArn field's value. +func (s *WriteEventStream) SetDestinationStreamArn(v string) *WriteEventStream { + s.DestinationStreamArn = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *WriteEventStream) SetRoleArn(v string) *WriteEventStream { + s.RoleArn = &v + return s +} + +// Segment definition. +type WriteSegmentRequest struct { + _ struct{} `type:"structure"` + + // The segment dimensions attributes. + Dimensions *SegmentDimensions `type:"structure"` + + // The name of segment + Name *string `type:"string"` + + // A segment group, which consists of zero or more source segments, plus dimensions + // that are applied to those source segments. Your request can only include + // one segment group. Your request can include either a SegmentGroups object + // or a Dimensions object, but not both. + SegmentGroups *SegmentGroupList `type:"structure"` +} + +// String returns the string representation +func (s WriteSegmentRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WriteSegmentRequest) GoString() string { + return s.String() +} + +// SetDimensions sets the Dimensions field's value. +func (s *WriteSegmentRequest) SetDimensions(v *SegmentDimensions) *WriteSegmentRequest { + s.Dimensions = v + return s +} + +// SetName sets the Name field's value. +func (s *WriteSegmentRequest) SetName(v string) *WriteSegmentRequest { + s.Name = &v + return s +} + +// SetSegmentGroups sets the SegmentGroups field's value. +func (s *WriteSegmentRequest) SetSegmentGroups(v *SegmentGroupList) *WriteSegmentRequest { + s.SegmentGroups = v + return s +} + +// Used to create a campaign treatment. +type WriteTreatmentResource struct { + _ struct{} `type:"structure"` + + // The message configuration settings. + MessageConfiguration *MessageConfiguration `type:"structure"` + + // The campaign schedule. + Schedule *Schedule `type:"structure"` + + // The allocated percentage of users for this treatment. + SizePercent *int64 `type:"integer"` + + // A custom description for the treatment. + TreatmentDescription *string `type:"string"` + + // The custom name of a variation of the campaign used for A/B testing. + TreatmentName *string `type:"string"` +} + +// String returns the string representation +func (s WriteTreatmentResource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WriteTreatmentResource) GoString() string { + return s.String() +} + +// SetMessageConfiguration sets the MessageConfiguration field's value. +func (s *WriteTreatmentResource) SetMessageConfiguration(v *MessageConfiguration) *WriteTreatmentResource { + s.MessageConfiguration = v + return s +} + +// SetSchedule sets the Schedule field's value. +func (s *WriteTreatmentResource) SetSchedule(v *Schedule) *WriteTreatmentResource { + s.Schedule = v + return s +} + +// SetSizePercent sets the SizePercent field's value. +func (s *WriteTreatmentResource) SetSizePercent(v int64) *WriteTreatmentResource { + s.SizePercent = &v + return s +} + +// SetTreatmentDescription sets the TreatmentDescription field's value. +func (s *WriteTreatmentResource) SetTreatmentDescription(v string) *WriteTreatmentResource { + s.TreatmentDescription = &v + return s +} + +// SetTreatmentName sets the TreatmentName field's value. +func (s *WriteTreatmentResource) SetTreatmentName(v string) *WriteTreatmentResource { + s.TreatmentName = &v + return s +} + +const ( + // ActionOpenApp is a Action enum value + ActionOpenApp = "OPEN_APP" + + // ActionDeepLink is a Action enum value + ActionDeepLink = "DEEP_LINK" + + // ActionUrl is a Action enum value + ActionUrl = "URL" +) + +const ( + // AttributeTypeInclusive is a AttributeType enum value + AttributeTypeInclusive = "INCLUSIVE" + + // AttributeTypeExclusive is a AttributeType enum value + AttributeTypeExclusive = "EXCLUSIVE" +) + +const ( + // CampaignStatusScheduled is a CampaignStatus enum value + CampaignStatusScheduled = "SCHEDULED" + + // CampaignStatusExecuting is a CampaignStatus enum value + CampaignStatusExecuting = "EXECUTING" + + // CampaignStatusPendingNextRun is a CampaignStatus enum value + CampaignStatusPendingNextRun = "PENDING_NEXT_RUN" + + // CampaignStatusCompleted is a CampaignStatus enum value + CampaignStatusCompleted = "COMPLETED" + + // CampaignStatusPaused is a CampaignStatus enum value + CampaignStatusPaused = "PAUSED" + + // CampaignStatusDeleted is a CampaignStatus enum value + CampaignStatusDeleted = "DELETED" +) + +const ( + // ChannelTypeGcm is a ChannelType enum value + ChannelTypeGcm = "GCM" + + // ChannelTypeApns is a ChannelType enum value + ChannelTypeApns = "APNS" + + // ChannelTypeApnsSandbox is a ChannelType enum value + ChannelTypeApnsSandbox = "APNS_SANDBOX" + + // ChannelTypeApnsVoip is a ChannelType enum value + ChannelTypeApnsVoip = "APNS_VOIP" + + // ChannelTypeApnsVoipSandbox is a ChannelType enum value + ChannelTypeApnsVoipSandbox = "APNS_VOIP_SANDBOX" + + // ChannelTypeAdm is a ChannelType enum value + ChannelTypeAdm = "ADM" + + // ChannelTypeSms is a ChannelType enum value + ChannelTypeSms = "SMS" + + // ChannelTypeVoice is a ChannelType enum value + ChannelTypeVoice = "VOICE" + + // ChannelTypeEmail is a ChannelType enum value + ChannelTypeEmail = "EMAIL" + + // ChannelTypeBaidu is a ChannelType enum value + ChannelTypeBaidu = "BAIDU" + + // ChannelTypeCustom is a ChannelType enum value + ChannelTypeCustom = "CUSTOM" +) + +const ( + // DeliveryStatusSuccessful is a DeliveryStatus enum value + DeliveryStatusSuccessful = "SUCCESSFUL" + + // DeliveryStatusThrottled is a DeliveryStatus enum value + DeliveryStatusThrottled = "THROTTLED" + + // DeliveryStatusTemporaryFailure is a DeliveryStatus enum value + DeliveryStatusTemporaryFailure = "TEMPORARY_FAILURE" + + // DeliveryStatusPermanentFailure is a DeliveryStatus enum value + DeliveryStatusPermanentFailure = "PERMANENT_FAILURE" + + // DeliveryStatusUnknownFailure is a DeliveryStatus enum value + DeliveryStatusUnknownFailure = "UNKNOWN_FAILURE" + + // DeliveryStatusOptOut is a DeliveryStatus enum value + DeliveryStatusOptOut = "OPT_OUT" + + // DeliveryStatusDuplicate is a DeliveryStatus enum value + DeliveryStatusDuplicate = "DUPLICATE" +) + +const ( + // DimensionTypeInclusive is a DimensionType enum value + DimensionTypeInclusive = "INCLUSIVE" + + // DimensionTypeExclusive is a DimensionType enum value + DimensionTypeExclusive = "EXCLUSIVE" +) + +const ( + // DurationHr24 is a Duration enum value + DurationHr24 = "HR_24" + + // DurationDay7 is a Duration enum value + DurationDay7 = "DAY_7" + + // DurationDay14 is a Duration enum value + DurationDay14 = "DAY_14" + + // DurationDay30 is a Duration enum value + DurationDay30 = "DAY_30" +) + +const ( + // FilterTypeSystem is a FilterType enum value + FilterTypeSystem = "SYSTEM" + + // FilterTypeEndpoint is a FilterType enum value + FilterTypeEndpoint = "ENDPOINT" +) + +const ( + // FormatCsv is a Format enum value + FormatCsv = "CSV" + + // FormatJson is a Format enum value + FormatJson = "JSON" +) + +const ( + // FrequencyOnce is a Frequency enum value + FrequencyOnce = "ONCE" + + // FrequencyHourly is a Frequency enum value + FrequencyHourly = "HOURLY" + + // FrequencyDaily is a Frequency enum value + FrequencyDaily = "DAILY" + + // FrequencyWeekly is a Frequency enum value + FrequencyWeekly = "WEEKLY" + + // FrequencyMonthly is a Frequency enum value + FrequencyMonthly = "MONTHLY" + + // FrequencyEvent is a Frequency enum value + FrequencyEvent = "EVENT" +) + +const ( + // IncludeAll is a Include enum value + IncludeAll = "ALL" + + // IncludeAny is a Include enum value + IncludeAny = "ANY" + + // IncludeNone is a Include enum value + IncludeNone = "NONE" +) + +const ( + // JobStatusCreated is a JobStatus enum value + JobStatusCreated = "CREATED" + + // JobStatusInitializing is a JobStatus enum value + JobStatusInitializing = "INITIALIZING" + + // JobStatusProcessing is a JobStatus enum value + JobStatusProcessing = "PROCESSING" + + // JobStatusCompleting is a JobStatus enum value + JobStatusCompleting = "COMPLETING" + + // JobStatusCompleted is a JobStatus enum value + JobStatusCompleted = "COMPLETED" + + // JobStatusFailing is a JobStatus enum value + JobStatusFailing = "FAILING" + + // JobStatusFailed is a JobStatus enum value + JobStatusFailed = "FAILED" +) + +const ( + // MessageTypeTransactional is a MessageType enum value + MessageTypeTransactional = "TRANSACTIONAL" + + // MessageTypePromotional is a MessageType enum value + MessageTypePromotional = "PROMOTIONAL" +) + +const ( + // ModeDelivery is a Mode enum value + ModeDelivery = "DELIVERY" + + // ModeFilter is a Mode enum value + ModeFilter = "FILTER" +) + +const ( + // RecencyTypeActive is a RecencyType enum value + RecencyTypeActive = "ACTIVE" + + // RecencyTypeInactive is a RecencyType enum value + RecencyTypeInactive = "INACTIVE" +) + +const ( + // SegmentTypeDimensional is a SegmentType enum value + SegmentTypeDimensional = "DIMENSIONAL" + + // SegmentTypeImport is a SegmentType enum value + SegmentTypeImport = "IMPORT" +) + +const ( + // SourceTypeAll is a SourceType enum value + SourceTypeAll = "ALL" + + // SourceTypeAny is a SourceType enum value + SourceTypeAny = "ANY" + + // SourceTypeNone is a SourceType enum value + SourceTypeNone = "NONE" +) + +const ( + // TypeAll is a Type enum value + TypeAll = "ALL" + + // TypeAny is a Type enum value + TypeAny = "ANY" + + // TypeNone is a Type enum value + TypeNone = "NONE" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/pinpoint/doc.go b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/doc.go new file mode 100644 index 0000000000..f41551af66 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/doc.go @@ -0,0 +1,26 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package pinpoint provides the client and types for making API +// requests to Amazon Pinpoint. +// +// See https://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01 for more information on this service. +// +// See pinpoint package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/pinpoint/ +// +// Using the Client +// +// To contact Amazon Pinpoint 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 Amazon Pinpoint client Pinpoint for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/pinpoint/#New +package pinpoint diff --git a/vendor/github.com/aws/aws-sdk-go/service/pinpoint/errors.go b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/errors.go new file mode 100644 index 0000000000..7bd7525b6a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/errors.go @@ -0,0 +1,42 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package pinpoint + +const ( + + // ErrCodeBadRequestException for service response error code + // "BadRequestException". + // + // Simple message object. + ErrCodeBadRequestException = "BadRequestException" + + // ErrCodeForbiddenException for service response error code + // "ForbiddenException". + // + // Simple message object. + ErrCodeForbiddenException = "ForbiddenException" + + // ErrCodeInternalServerErrorException for service response error code + // "InternalServerErrorException". + // + // Simple message object. + ErrCodeInternalServerErrorException = "InternalServerErrorException" + + // ErrCodeMethodNotAllowedException for service response error code + // "MethodNotAllowedException". + // + // Simple message object. + ErrCodeMethodNotAllowedException = "MethodNotAllowedException" + + // ErrCodeNotFoundException for service response error code + // "NotFoundException". + // + // Simple message object. + ErrCodeNotFoundException = "NotFoundException" + + // ErrCodeTooManyRequestsException for service response error code + // "TooManyRequestsException". + // + // Simple message object. + ErrCodeTooManyRequestsException = "TooManyRequestsException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/pinpoint/service.go b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/service.go new file mode 100644 index 0000000000..9bee611da8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/pinpoint/service.go @@ -0,0 +1,99 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package pinpoint + +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/restjson" +) + +// Pinpoint provides the API operation methods for making requests to +// Amazon Pinpoint. See this package's package overview docs +// for details on the service. +// +// Pinpoint methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type Pinpoint 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 = "pinpoint" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "Pinpoint" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the Pinpoint 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: +// // Create a Pinpoint client from just a session. +// svc := pinpoint.New(mySession) +// +// // Create a Pinpoint client with additional configuration +// svc := pinpoint.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *Pinpoint { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "mobiletargeting" + } + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *Pinpoint { + svc := &Pinpoint{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2016-12-01", + JSONVersion: "1.1", + }, + 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(restjson.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a Pinpoint operation and runs any +// custom request initialization. +func (c *Pinpoint) 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/pricing/api.go b/vendor/github.com/aws/aws-sdk-go/service/pricing/api.go index f5be2db265..395d8c6e50 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/pricing/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/pricing/api.go @@ -15,7 +15,7 @@ const opDescribeServices = "DescribeServices" // DescribeServicesRequest generates a "aws/request.Request" representing the // client's request for the DescribeServices operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -168,7 +168,7 @@ const opGetAttributeValues = "GetAttributeValues" // GetAttributeValuesRequest generates a "aws/request.Request" representing the // client's request for the GetAttributeValues operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -319,7 +319,7 @@ const opGetProducts = "GetProducts" // GetProductsRequest generates a "aws/request.Request" representing the // client's request for the GetProducts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. diff --git a/vendor/github.com/aws/aws-sdk-go/service/rds/api.go b/vendor/github.com/aws/aws-sdk-go/service/rds/api.go index 2b6787b398..89bf316df0 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/rds/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/rds/api.go @@ -18,7 +18,7 @@ const opAddRoleToDBCluster = "AddRoleToDBCluster" // AddRoleToDBClusterRequest generates a "aws/request.Request" representing the // client's request for the AddRoleToDBCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -52,8 +52,7 @@ func (c *RDS) AddRoleToDBClusterRequest(input *AddRoleToDBClusterInput) (req *re output = &AddRoleToDBClusterOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -80,7 +79,7 @@ func (c *RDS) AddRoleToDBClusterRequest(input *AddRoleToDBClusterInput) (req *re // the specified DB cluster. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster isn't in a valid state. +// The requested operation can't be performed while the cluster is in this state. // // * ErrCodeDBClusterRoleQuotaExceededFault "DBClusterRoleQuotaExceeded" // You have exceeded the maximum number of IAM roles that can be associated @@ -113,7 +112,7 @@ const opAddSourceIdentifierToSubscription = "AddSourceIdentifierToSubscription" // AddSourceIdentifierToSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the AddSourceIdentifierToSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -195,7 +194,7 @@ const opAddTagsToResource = "AddTagsToResource" // AddTagsToResourceRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -229,8 +228,7 @@ func (c *RDS) AddTagsToResourceRequest(input *AddTagsToResourceInput) (req *requ output = &AddTagsToResourceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -287,7 +285,7 @@ const opApplyPendingMaintenanceAction = "ApplyPendingMaintenanceAction" // ApplyPendingMaintenanceActionRequest generates a "aws/request.Request" representing the // client's request for the ApplyPendingMaintenanceAction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -340,6 +338,12 @@ func (c *RDS) ApplyPendingMaintenanceActionRequest(input *ApplyPendingMaintenanc // * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" // The specified resource ID was not found. // +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The requested operation can't be performed while the cluster is in this state. +// +// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" +// The DB instance isn't in a valid state. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ApplyPendingMaintenanceAction func (c *RDS) ApplyPendingMaintenanceAction(input *ApplyPendingMaintenanceActionInput) (*ApplyPendingMaintenanceActionOutput, error) { req, out := c.ApplyPendingMaintenanceActionRequest(input) @@ -367,7 +371,7 @@ const opAuthorizeDBSecurityGroupIngress = "AuthorizeDBSecurityGroupIngress" // AuthorizeDBSecurityGroupIngressRequest generates a "aws/request.Request" representing the // client's request for the AuthorizeDBSecurityGroupIngress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -468,7 +472,7 @@ const opBacktrackDBCluster = "BacktrackDBCluster" // BacktrackDBClusterRequest generates a "aws/request.Request" representing the // client's request for the BacktrackDBCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -525,7 +529,7 @@ func (c *RDS) BacktrackDBClusterRequest(input *BacktrackDBClusterInput) (req *re // DBClusterIdentifier doesn't refer to an existing DB cluster. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster isn't in a valid state. +// The requested operation can't be performed while the cluster is in this state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/BacktrackDBCluster func (c *RDS) BacktrackDBCluster(input *BacktrackDBClusterInput) (*BacktrackDBClusterOutput, error) { @@ -554,7 +558,7 @@ const opCopyDBClusterParameterGroup = "CopyDBClusterParameterGroup" // CopyDBClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the CopyDBClusterParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -640,7 +644,7 @@ const opCopyDBClusterSnapshot = "CopyDBClusterSnapshot" // CopyDBClusterSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CopyDBClusterSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -757,7 +761,7 @@ func (c *RDS) CopyDBClusterSnapshotRequest(input *CopyDBClusterSnapshotInput) (r // DBClusterSnapshotIdentifier doesn't refer to an existing DB cluster snapshot. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster isn't in a valid state. +// The requested operation can't be performed while the cluster is in this state. // // * ErrCodeInvalidDBClusterSnapshotStateFault "InvalidDBClusterSnapshotStateFault" // The supplied value isn't a valid DB cluster snapshot state. @@ -795,7 +799,7 @@ const opCopyDBParameterGroup = "CopyDBParameterGroup" // CopyDBParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the CopyDBParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -881,7 +885,7 @@ const opCopyDBSnapshot = "CopyDBSnapshot" // CopyDBSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CopyDBSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -980,7 +984,7 @@ const opCopyOptionGroup = "CopyOptionGroup" // CopyOptionGroupRequest generates a "aws/request.Request" representing the // client's request for the CopyOptionGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1065,7 +1069,7 @@ const opCreateDBCluster = "CreateDBCluster" // CreateDBClusterRequest generates a "aws/request.Request" representing the // client's request for the CreateDBCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1146,7 +1150,7 @@ func (c *RDS) CreateDBClusterRequest(input *CreateDBClusterInput) (req *request. // because of users' change. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster isn't in a valid state. +// The requested operation can't be performed while the cluster is in this state. // // * ErrCodeInvalidDBSubnetGroupStateFault "InvalidDBSubnetGroupStateFault" // The DB subnet group cannot be deleted because it's in use. @@ -1156,7 +1160,7 @@ func (c *RDS) CreateDBClusterRequest(input *CreateDBClusterInput) (req *request. // are not all in a common VPC. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. +// The DB instance isn't in a valid state. // // * ErrCodeDBClusterParameterGroupNotFoundFault "DBClusterParameterGroupNotFound" // DBClusterParameterGroupName doesn't refer to an existing DB cluster parameter @@ -1175,6 +1179,10 @@ func (c *RDS) CreateDBClusterRequest(input *CreateDBClusterInput) (req *request. // Subnets in the DB subnet group should cover at least two Availability Zones // unless there is only one Availability Zone. // +// * ErrCodeGlobalClusterNotFoundFault "GlobalClusterNotFoundFault" +// +// * ErrCodeInvalidGlobalClusterStateFault "InvalidGlobalClusterStateFault" +// // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBCluster func (c *RDS) CreateDBCluster(input *CreateDBClusterInput) (*CreateDBClusterOutput, error) { req, out := c.CreateDBClusterRequest(input) @@ -1197,12 +1205,107 @@ func (c *RDS) CreateDBClusterWithContext(ctx aws.Context, input *CreateDBCluster return out, req.Send() } +const opCreateDBClusterEndpoint = "CreateDBClusterEndpoint" + +// CreateDBClusterEndpointRequest generates a "aws/request.Request" representing the +// client's request for the CreateDBClusterEndpoint 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 CreateDBClusterEndpoint for more information on using the CreateDBClusterEndpoint +// 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 CreateDBClusterEndpointRequest method. +// req, resp := client.CreateDBClusterEndpointRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBClusterEndpoint +func (c *RDS) CreateDBClusterEndpointRequest(input *CreateDBClusterEndpointInput) (req *request.Request, output *CreateDBClusterEndpointOutput) { + op := &request.Operation{ + Name: opCreateDBClusterEndpoint, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateDBClusterEndpointInput{} + } + + output = &CreateDBClusterEndpointOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateDBClusterEndpoint API operation for Amazon Relational Database Service. +// +// Creates a new custom endpoint and associates it with an Amazon Aurora DB +// cluster. +// +// 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 Relational Database Service's +// API operation CreateDBClusterEndpoint for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterEndpointQuotaExceededFault "DBClusterEndpointQuotaExceededFault" +// The cluster already has the maximum number of custom endpoints. +// +// * ErrCodeDBClusterEndpointAlreadyExistsFault "DBClusterEndpointAlreadyExistsFault" +// The specified custom endpoint can't be created because it already exists. +// +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier doesn't refer to an existing DB cluster. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The requested operation can't be performed while the cluster is in this state. +// +// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" +// DBInstanceIdentifier doesn't refer to an existing DB instance. +// +// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" +// The DB instance isn't in a valid state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateDBClusterEndpoint +func (c *RDS) CreateDBClusterEndpoint(input *CreateDBClusterEndpointInput) (*CreateDBClusterEndpointOutput, error) { + req, out := c.CreateDBClusterEndpointRequest(input) + return out, req.Send() +} + +// CreateDBClusterEndpointWithContext is the same as CreateDBClusterEndpoint with the addition of +// the ability to pass a context and additional request options. +// +// See CreateDBClusterEndpoint 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 *RDS) CreateDBClusterEndpointWithContext(ctx aws.Context, input *CreateDBClusterEndpointInput, opts ...request.Option) (*CreateDBClusterEndpointOutput, error) { + req, out := c.CreateDBClusterEndpointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateDBClusterParameterGroup = "CreateDBClusterParameterGroup" // CreateDBClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateDBClusterParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1312,7 +1415,7 @@ const opCreateDBClusterSnapshot = "CreateDBClusterSnapshot" // CreateDBClusterSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateDBClusterSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1367,7 +1470,7 @@ func (c *RDS) CreateDBClusterSnapshotRequest(input *CreateDBClusterSnapshotInput // The user already has a DB cluster snapshot with the given identifier. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster isn't in a valid state. +// The requested operation can't be performed while the cluster is in this state. // // * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" // DBClusterIdentifier doesn't refer to an existing DB cluster. @@ -1405,7 +1508,7 @@ const opCreateDBInstance = "CreateDBInstance" // CreateDBInstanceRequest generates a "aws/request.Request" representing the // client's request for the CreateDBInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1482,7 +1585,7 @@ func (c *RDS) CreateDBInstanceRequest(input *CreateDBInstanceInput) (req *reques // unless there is only one Availability Zone. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster isn't in a valid state. +// The requested operation can't be performed while the cluster is in this state. // // * ErrCodeInvalidSubnet "InvalidSubnet" // The requested subnet is invalid, or multiple subnets were requested that @@ -1546,7 +1649,7 @@ const opCreateDBInstanceReadReplica = "CreateDBInstanceReadReplica" // CreateDBInstanceReadReplicaRequest generates a "aws/request.Request" representing the // client's request for the CreateDBInstanceReadReplica operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1632,7 +1735,7 @@ func (c *RDS) CreateDBInstanceReadReplicaRequest(input *CreateDBInstanceReadRepl // DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. +// The DB instance isn't in a valid state. // // * ErrCodeDBSubnetGroupNotFoundFault "DBSubnetGroupNotFoundFault" // DBSubnetGroupName doesn't refer to an existing DB subnet group. @@ -1696,7 +1799,7 @@ const opCreateDBParameterGroup = "CreateDBParameterGroup" // CreateDBParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateDBParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1799,7 +1902,7 @@ const opCreateDBSecurityGroup = "CreateDBSecurityGroup" // CreateDBSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateDBSecurityGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1890,7 +1993,7 @@ const opCreateDBSnapshot = "CreateDBSnapshot" // CreateDBSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateDBSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1943,7 +2046,7 @@ func (c *RDS) CreateDBSnapshotRequest(input *CreateDBSnapshotInput) (req *reques // DBSnapshotIdentifier is already used by an existing snapshot. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. +// The DB instance isn't in a valid state. // // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" // DBInstanceIdentifier doesn't refer to an existing DB instance. @@ -1978,7 +2081,7 @@ const opCreateDBSubnetGroup = "CreateDBSubnetGroup" // CreateDBSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateDBSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2074,7 +2177,7 @@ const opCreateEventSubscription = "CreateEventSubscription" // CreateEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the CreateEventSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2183,12 +2286,106 @@ func (c *RDS) CreateEventSubscriptionWithContext(ctx aws.Context, input *CreateE return out, req.Send() } +const opCreateGlobalCluster = "CreateGlobalCluster" + +// CreateGlobalClusterRequest generates a "aws/request.Request" representing the +// client's request for the CreateGlobalCluster 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 CreateGlobalCluster for more information on using the CreateGlobalCluster +// 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 CreateGlobalClusterRequest method. +// req, resp := client.CreateGlobalClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateGlobalCluster +func (c *RDS) CreateGlobalClusterRequest(input *CreateGlobalClusterInput) (req *request.Request, output *CreateGlobalClusterOutput) { + op := &request.Operation{ + Name: opCreateGlobalCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateGlobalClusterInput{} + } + + output = &CreateGlobalClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateGlobalCluster API operation for Amazon Relational Database Service. +// +// Creates an Aurora global database spread across multiple regions. The global +// database contains a single primary cluster with read-write capability, and +// a read-only secondary cluster that receives data from the primary cluster +// through high-speed replication performed by the Aurora storage subsystem. +// +// You can create a global database that is initially empty, and then add a +// primary cluster and a secondary cluster to it. Or you can specify an existing +// Aurora cluster during the create operation, and this cluster becomes the +// primary cluster of the global database. +// +// 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 Relational Database Service's +// API operation CreateGlobalCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeGlobalClusterAlreadyExistsFault "GlobalClusterAlreadyExistsFault" +// +// * ErrCodeGlobalClusterQuotaExceededFault "GlobalClusterQuotaExceededFault" +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The requested operation can't be performed while the cluster is in this state. +// +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier doesn't refer to an existing DB cluster. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/CreateGlobalCluster +func (c *RDS) CreateGlobalCluster(input *CreateGlobalClusterInput) (*CreateGlobalClusterOutput, error) { + req, out := c.CreateGlobalClusterRequest(input) + return out, req.Send() +} + +// CreateGlobalClusterWithContext is the same as CreateGlobalCluster with the addition of +// the ability to pass a context and additional request options. +// +// See CreateGlobalCluster 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 *RDS) CreateGlobalClusterWithContext(ctx aws.Context, input *CreateGlobalClusterInput, opts ...request.Option) (*CreateGlobalClusterOutput, error) { + req, out := c.CreateGlobalClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateOptionGroup = "CreateOptionGroup" // CreateOptionGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateOptionGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2270,7 +2467,7 @@ const opDeleteDBCluster = "DeleteDBCluster" // DeleteDBClusterRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2328,7 +2525,7 @@ func (c *RDS) DeleteDBClusterRequest(input *DeleteDBClusterInput) (req *request. // DBClusterIdentifier doesn't refer to an existing DB cluster. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster isn't in a valid state. +// The requested operation can't be performed while the cluster is in this state. // // * ErrCodeDBClusterSnapshotAlreadyExistsFault "DBClusterSnapshotAlreadyExistsFault" // The user already has a DB cluster snapshot with the given identifier. @@ -2361,12 +2558,98 @@ func (c *RDS) DeleteDBClusterWithContext(ctx aws.Context, input *DeleteDBCluster return out, req.Send() } +const opDeleteDBClusterEndpoint = "DeleteDBClusterEndpoint" + +// DeleteDBClusterEndpointRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDBClusterEndpoint 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 DeleteDBClusterEndpoint for more information on using the DeleteDBClusterEndpoint +// 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 DeleteDBClusterEndpointRequest method. +// req, resp := client.DeleteDBClusterEndpointRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBClusterEndpoint +func (c *RDS) DeleteDBClusterEndpointRequest(input *DeleteDBClusterEndpointInput) (req *request.Request, output *DeleteDBClusterEndpointOutput) { + op := &request.Operation{ + Name: opDeleteDBClusterEndpoint, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteDBClusterEndpointInput{} + } + + output = &DeleteDBClusterEndpointOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteDBClusterEndpoint API operation for Amazon Relational Database Service. +// +// Deletes a custom endpoint and removes it from an Amazon Aurora DB cluster. +// +// 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 Relational Database Service's +// API operation DeleteDBClusterEndpoint for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidDBClusterEndpointStateFault "InvalidDBClusterEndpointStateFault" +// The requested operation can't be performed on the endpoint while the endpoint +// is in this state. +// +// * ErrCodeDBClusterEndpointNotFoundFault "DBClusterEndpointNotFoundFault" +// The specified custom endpoint doesn't exist. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The requested operation can't be performed while the cluster is in this state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBClusterEndpoint +func (c *RDS) DeleteDBClusterEndpoint(input *DeleteDBClusterEndpointInput) (*DeleteDBClusterEndpointOutput, error) { + req, out := c.DeleteDBClusterEndpointRequest(input) + return out, req.Send() +} + +// DeleteDBClusterEndpointWithContext is the same as DeleteDBClusterEndpoint with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteDBClusterEndpoint 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 *RDS) DeleteDBClusterEndpointWithContext(ctx aws.Context, input *DeleteDBClusterEndpointInput, opts ...request.Option) (*DeleteDBClusterEndpointOutput, error) { + req, out := c.DeleteDBClusterEndpointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteDBClusterParameterGroup = "DeleteDBClusterParameterGroup" // DeleteDBClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBClusterParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2400,8 +2683,7 @@ func (c *RDS) DeleteDBClusterParameterGroupRequest(input *DeleteDBClusterParamet output = &DeleteDBClusterParameterGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2456,7 +2738,7 @@ const opDeleteDBClusterSnapshot = "DeleteDBClusterSnapshot" // DeleteDBClusterSnapshotRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBClusterSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2544,7 +2826,7 @@ const opDeleteDBInstance = "DeleteDBInstance" // DeleteDBInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2621,7 +2903,7 @@ func (c *RDS) DeleteDBInstanceRequest(input *DeleteDBInstanceInput) (req *reques // DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. +// The DB instance isn't in a valid state. // // * ErrCodeDBSnapshotAlreadyExistsFault "DBSnapshotAlreadyExists" // DBSnapshotIdentifier is already used by an existing snapshot. @@ -2630,7 +2912,12 @@ func (c *RDS) DeleteDBInstanceRequest(input *DeleteDBInstanceInput) (req *reques // The request would result in the user exceeding the allowed number of DB snapshots. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster isn't in a valid state. +// The requested operation can't be performed while the cluster is in this state. +// +// * ErrCodeDBInstanceAutomatedBackupQuotaExceededFault "DBInstanceAutomatedBackupQuotaExceeded" +// The quota for retained automated backups was exceeded. This prevents you +// from retaining any additional automated backups. The retained automated backups +// quota is the same as your DB Instance quota. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBInstance func (c *RDS) DeleteDBInstance(input *DeleteDBInstanceInput) (*DeleteDBInstanceOutput, error) { @@ -2654,12 +2941,96 @@ func (c *RDS) DeleteDBInstanceWithContext(ctx aws.Context, input *DeleteDBInstan return out, req.Send() } +const opDeleteDBInstanceAutomatedBackup = "DeleteDBInstanceAutomatedBackup" + +// DeleteDBInstanceAutomatedBackupRequest generates a "aws/request.Request" representing the +// client's request for the DeleteDBInstanceAutomatedBackup 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 DeleteDBInstanceAutomatedBackup for more information on using the DeleteDBInstanceAutomatedBackup +// 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 DeleteDBInstanceAutomatedBackupRequest method. +// req, resp := client.DeleteDBInstanceAutomatedBackupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBInstanceAutomatedBackup +func (c *RDS) DeleteDBInstanceAutomatedBackupRequest(input *DeleteDBInstanceAutomatedBackupInput) (req *request.Request, output *DeleteDBInstanceAutomatedBackupOutput) { + op := &request.Operation{ + Name: opDeleteDBInstanceAutomatedBackup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteDBInstanceAutomatedBackupInput{} + } + + output = &DeleteDBInstanceAutomatedBackupOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteDBInstanceAutomatedBackup API operation for Amazon Relational Database Service. +// +// Deletes automated backups based on the source instance's DbiResourceId value +// or the restorable instance's resource ID. +// +// 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 Relational Database Service's +// API operation DeleteDBInstanceAutomatedBackup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidDBInstanceAutomatedBackupStateFault "InvalidDBInstanceAutomatedBackupState" +// The automated backup is in an invalid state. For example, this automated +// backup is associated with an active instance. +// +// * ErrCodeDBInstanceAutomatedBackupNotFoundFault "DBInstanceAutomatedBackupNotFound" +// No automated backup for this DB instance was found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteDBInstanceAutomatedBackup +func (c *RDS) DeleteDBInstanceAutomatedBackup(input *DeleteDBInstanceAutomatedBackupInput) (*DeleteDBInstanceAutomatedBackupOutput, error) { + req, out := c.DeleteDBInstanceAutomatedBackupRequest(input) + return out, req.Send() +} + +// DeleteDBInstanceAutomatedBackupWithContext is the same as DeleteDBInstanceAutomatedBackup with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteDBInstanceAutomatedBackup 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 *RDS) DeleteDBInstanceAutomatedBackupWithContext(ctx aws.Context, input *DeleteDBInstanceAutomatedBackupInput, opts ...request.Option) (*DeleteDBInstanceAutomatedBackupOutput, error) { + req, out := c.DeleteDBInstanceAutomatedBackupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteDBParameterGroup = "DeleteDBParameterGroup" // DeleteDBParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2693,14 +3064,13 @@ func (c *RDS) DeleteDBParameterGroupRequest(input *DeleteDBParameterGroupInput) output = &DeleteDBParameterGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteDBParameterGroup API operation for Amazon Relational Database Service. // -// Deletes a specified DBParameterGroup. The DBParameterGroup to be deleted +// Deletes a specified DB parameter group. The DB parameter group to be deleted // can't be associated with any DB instances. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2746,7 +3116,7 @@ const opDeleteDBSecurityGroup = "DeleteDBSecurityGroup" // DeleteDBSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBSecurityGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2780,8 +3150,7 @@ func (c *RDS) DeleteDBSecurityGroupRequest(input *DeleteDBSecurityGroupInput) (r output = &DeleteDBSecurityGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2832,7 +3201,7 @@ const opDeleteDBSnapshot = "DeleteDBSnapshot" // DeleteDBSnapshotRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2871,10 +3240,10 @@ func (c *RDS) DeleteDBSnapshotRequest(input *DeleteDBSnapshotInput) (req *reques // DeleteDBSnapshot API operation for Amazon Relational Database Service. // -// Deletes a DBSnapshot. If the snapshot is being copied, the copy operation +// Deletes a DB snapshot. If the snapshot is being copied, the copy operation // is terminated. // -// The DBSnapshot must be in the available state to be deleted. +// The DB snapshot must be in the available state to be deleted. // // 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 @@ -2917,7 +3286,7 @@ const opDeleteDBSubnetGroup = "DeleteDBSubnetGroup" // DeleteDBSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteDBSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2951,8 +3320,7 @@ func (c *RDS) DeleteDBSubnetGroupRequest(input *DeleteDBSubnetGroupInput) (req * output = &DeleteDBSubnetGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3006,7 +3374,7 @@ const opDeleteEventSubscription = "DeleteEventSubscription" // DeleteEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the DeleteEventSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3084,25 +3452,106 @@ func (c *RDS) DeleteEventSubscriptionWithContext(ctx aws.Context, input *DeleteE return out, req.Send() } -const opDeleteOptionGroup = "DeleteOptionGroup" +const opDeleteGlobalCluster = "DeleteGlobalCluster" -// DeleteOptionGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteOptionGroup operation. The "output" return +// DeleteGlobalClusterRequest generates a "aws/request.Request" representing the +// client's request for the DeleteGlobalCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 DeleteOptionGroup for more information on using the DeleteOptionGroup +// See DeleteGlobalCluster for more information on using the DeleteGlobalCluster // 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 DeleteOptionGroupRequest method. -// req, resp := client.DeleteOptionGroupRequest(params) +// // Example sending a request using the DeleteGlobalClusterRequest method. +// req, resp := client.DeleteGlobalClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteGlobalCluster +func (c *RDS) DeleteGlobalClusterRequest(input *DeleteGlobalClusterInput) (req *request.Request, output *DeleteGlobalClusterOutput) { + op := &request.Operation{ + Name: opDeleteGlobalCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteGlobalClusterInput{} + } + + output = &DeleteGlobalClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteGlobalCluster API operation for Amazon Relational Database Service. +// +// Deletes a global database cluster. The primary and secondary clusters must +// already be detached or destroyed first. +// +// 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 Relational Database Service's +// API operation DeleteGlobalCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeGlobalClusterNotFoundFault "GlobalClusterNotFoundFault" +// +// * ErrCodeInvalidGlobalClusterStateFault "InvalidGlobalClusterStateFault" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DeleteGlobalCluster +func (c *RDS) DeleteGlobalCluster(input *DeleteGlobalClusterInput) (*DeleteGlobalClusterOutput, error) { + req, out := c.DeleteGlobalClusterRequest(input) + return out, req.Send() +} + +// DeleteGlobalClusterWithContext is the same as DeleteGlobalCluster with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteGlobalCluster 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 *RDS) DeleteGlobalClusterWithContext(ctx aws.Context, input *DeleteGlobalClusterInput, opts ...request.Option) (*DeleteGlobalClusterOutput, error) { + req, out := c.DeleteGlobalClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteOptionGroup = "DeleteOptionGroup" + +// DeleteOptionGroupRequest generates a "aws/request.Request" representing the +// client's request for the DeleteOptionGroup 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 DeleteOptionGroup for more information on using the DeleteOptionGroup +// 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 DeleteOptionGroupRequest method. +// req, resp := client.DeleteOptionGroupRequest(params) // // err := req.Send() // if err == nil { // resp is now filled @@ -3123,8 +3572,7 @@ func (c *RDS) DeleteOptionGroupRequest(input *DeleteOptionGroupInput) (req *requ output = &DeleteOptionGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3173,7 +3621,7 @@ const opDescribeAccountAttributes = "DescribeAccountAttributes" // DescribeAccountAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAccountAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3252,7 +3700,7 @@ const opDescribeCertificates = "DescribeCertificates" // DescribeCertificatesRequest generates a "aws/request.Request" representing the // client's request for the DescribeCertificates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3331,7 +3779,7 @@ const opDescribeDBClusterBacktracks = "DescribeDBClusterBacktracks" // DescribeDBClusterBacktracksRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBClusterBacktracks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3411,12 +3859,91 @@ func (c *RDS) DescribeDBClusterBacktracksWithContext(ctx aws.Context, input *Des return out, req.Send() } +const opDescribeDBClusterEndpoints = "DescribeDBClusterEndpoints" + +// DescribeDBClusterEndpointsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDBClusterEndpoints 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 DescribeDBClusterEndpoints for more information on using the DescribeDBClusterEndpoints +// 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 DescribeDBClusterEndpointsRequest method. +// req, resp := client.DescribeDBClusterEndpointsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterEndpoints +func (c *RDS) DescribeDBClusterEndpointsRequest(input *DescribeDBClusterEndpointsInput) (req *request.Request, output *DescribeDBClusterEndpointsOutput) { + op := &request.Operation{ + Name: opDescribeDBClusterEndpoints, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeDBClusterEndpointsInput{} + } + + output = &DescribeDBClusterEndpointsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDBClusterEndpoints API operation for Amazon Relational Database Service. +// +// Returns information about endpoints for an Amazon Aurora DB cluster. +// +// 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 Relational Database Service's +// API operation DescribeDBClusterEndpoints for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier doesn't refer to an existing DB cluster. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBClusterEndpoints +func (c *RDS) DescribeDBClusterEndpoints(input *DescribeDBClusterEndpointsInput) (*DescribeDBClusterEndpointsOutput, error) { + req, out := c.DescribeDBClusterEndpointsRequest(input) + return out, req.Send() +} + +// DescribeDBClusterEndpointsWithContext is the same as DescribeDBClusterEndpoints with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDBClusterEndpoints 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 *RDS) DescribeDBClusterEndpointsWithContext(ctx aws.Context, input *DescribeDBClusterEndpointsInput, opts ...request.Option) (*DescribeDBClusterEndpointsOutput, error) { + req, out := c.DescribeDBClusterEndpointsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeDBClusterParameterGroups = "DescribeDBClusterParameterGroups" // DescribeDBClusterParameterGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBClusterParameterGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3500,7 +4027,7 @@ const opDescribeDBClusterParameters = "DescribeDBClusterParameters" // DescribeDBClusterParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBClusterParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3583,7 +4110,7 @@ const opDescribeDBClusterSnapshotAttributes = "DescribeDBClusterSnapshotAttribut // DescribeDBClusterSnapshotAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBClusterSnapshotAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3673,7 +4200,7 @@ const opDescribeDBClusterSnapshots = "DescribeDBClusterSnapshots" // DescribeDBClusterSnapshotsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBClusterSnapshots operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3756,7 +4283,7 @@ const opDescribeDBClusters = "DescribeDBClusters" // DescribeDBClustersRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBClusters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3895,7 +4422,7 @@ const opDescribeDBEngineVersions = "DescribeDBEngineVersions" // DescribeDBEngineVersionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBEngineVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4020,12 +4547,153 @@ func (c *RDS) DescribeDBEngineVersionsPagesWithContext(ctx aws.Context, input *D return p.Err() } +const opDescribeDBInstanceAutomatedBackups = "DescribeDBInstanceAutomatedBackups" + +// DescribeDBInstanceAutomatedBackupsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeDBInstanceAutomatedBackups 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 DescribeDBInstanceAutomatedBackups for more information on using the DescribeDBInstanceAutomatedBackups +// 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 DescribeDBInstanceAutomatedBackupsRequest method. +// req, resp := client.DescribeDBInstanceAutomatedBackupsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBInstanceAutomatedBackups +func (c *RDS) DescribeDBInstanceAutomatedBackupsRequest(input *DescribeDBInstanceAutomatedBackupsInput) (req *request.Request, output *DescribeDBInstanceAutomatedBackupsOutput) { + op := &request.Operation{ + Name: opDescribeDBInstanceAutomatedBackups, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "MaxRecords", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeDBInstanceAutomatedBackupsInput{} + } + + output = &DescribeDBInstanceAutomatedBackupsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeDBInstanceAutomatedBackups API operation for Amazon Relational Database Service. +// +// Displays backups for both current and deleted instances. For example, use +// this operation to find details about automated backups for previously deleted +// instances. Current instances with retention periods greater than zero (0) +// are returned for both the DescribeDBInstanceAutomatedBackups and DescribeDBInstances +// operations. +// +// All parameters are optional. +// +// 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 Relational Database Service's +// API operation DescribeDBInstanceAutomatedBackups for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBInstanceAutomatedBackupNotFoundFault "DBInstanceAutomatedBackupNotFound" +// No automated backup for this DB instance was found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBInstanceAutomatedBackups +func (c *RDS) DescribeDBInstanceAutomatedBackups(input *DescribeDBInstanceAutomatedBackupsInput) (*DescribeDBInstanceAutomatedBackupsOutput, error) { + req, out := c.DescribeDBInstanceAutomatedBackupsRequest(input) + return out, req.Send() +} + +// DescribeDBInstanceAutomatedBackupsWithContext is the same as DescribeDBInstanceAutomatedBackups with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeDBInstanceAutomatedBackups 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 *RDS) DescribeDBInstanceAutomatedBackupsWithContext(ctx aws.Context, input *DescribeDBInstanceAutomatedBackupsInput, opts ...request.Option) (*DescribeDBInstanceAutomatedBackupsOutput, error) { + req, out := c.DescribeDBInstanceAutomatedBackupsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeDBInstanceAutomatedBackupsPages iterates over the pages of a DescribeDBInstanceAutomatedBackups operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeDBInstanceAutomatedBackups 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 DescribeDBInstanceAutomatedBackups operation. +// pageNum := 0 +// err := client.DescribeDBInstanceAutomatedBackupsPages(params, +// func(page *DescribeDBInstanceAutomatedBackupsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *RDS) DescribeDBInstanceAutomatedBackupsPages(input *DescribeDBInstanceAutomatedBackupsInput, fn func(*DescribeDBInstanceAutomatedBackupsOutput, bool) bool) error { + return c.DescribeDBInstanceAutomatedBackupsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeDBInstanceAutomatedBackupsPagesWithContext same as DescribeDBInstanceAutomatedBackupsPages 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 *RDS) DescribeDBInstanceAutomatedBackupsPagesWithContext(ctx aws.Context, input *DescribeDBInstanceAutomatedBackupsInput, fn func(*DescribeDBInstanceAutomatedBackupsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeDBInstanceAutomatedBackupsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeDBInstanceAutomatedBackupsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeDBInstanceAutomatedBackupsOutput), !p.HasNextPage()) + } + return p.Err() +} + const opDescribeDBInstances = "DescribeDBInstances" // DescribeDBInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4160,7 +4828,7 @@ const opDescribeDBLogFiles = "DescribeDBLogFiles" // DescribeDBLogFilesRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBLogFiles operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4295,7 +4963,7 @@ const opDescribeDBParameterGroups = "DescribeDBParameterGroups" // DescribeDBParameterGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBParameterGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4432,7 +5100,7 @@ const opDescribeDBParameters = "DescribeDBParameters" // DescribeDBParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4567,7 +5235,7 @@ const opDescribeDBSecurityGroups = "DescribeDBSecurityGroups" // DescribeDBSecurityGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBSecurityGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4704,7 +5372,7 @@ const opDescribeDBSnapshotAttributes = "DescribeDBSnapshotAttributes" // DescribeDBSnapshotAttributesRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBSnapshotAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4794,7 +5462,7 @@ const opDescribeDBSnapshots = "DescribeDBSnapshots" // DescribeDBSnapshotsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBSnapshots operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4929,7 +5597,7 @@ const opDescribeDBSubnetGroups = "DescribeDBSubnetGroups" // DescribeDBSubnetGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeDBSubnetGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5067,7 +5735,7 @@ const opDescribeEngineDefaultClusterParameters = "DescribeEngineDefaultClusterPa // DescribeEngineDefaultClusterParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeEngineDefaultClusterParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5145,7 +5813,7 @@ const opDescribeEngineDefaultParameters = "DescribeEngineDefaultParameters" // DescribeEngineDefaultParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeEngineDefaultParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5276,7 +5944,7 @@ const opDescribeEventCategories = "DescribeEventCategories" // DescribeEventCategoriesRequest generates a "aws/request.Request" representing the // client's request for the DescribeEventCategories operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5353,7 +6021,7 @@ const opDescribeEventSubscriptions = "DescribeEventSubscriptions" // DescribeEventSubscriptionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEventSubscriptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5492,7 +6160,7 @@ const opDescribeEvents = "DescribeEvents" // DescribeEventsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5621,35 +6289,35 @@ func (c *RDS) DescribeEventsPagesWithContext(ctx aws.Context, input *DescribeEve return p.Err() } -const opDescribeOptionGroupOptions = "DescribeOptionGroupOptions" +const opDescribeGlobalClusters = "DescribeGlobalClusters" -// DescribeOptionGroupOptionsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeOptionGroupOptions operation. The "output" return +// DescribeGlobalClustersRequest generates a "aws/request.Request" representing the +// client's request for the DescribeGlobalClusters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 DescribeOptionGroupOptions for more information on using the DescribeOptionGroupOptions +// See DescribeGlobalClusters for more information on using the DescribeGlobalClusters // 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 DescribeOptionGroupOptionsRequest method. -// req, resp := client.DescribeOptionGroupOptionsRequest(params) +// // Example sending a request using the DescribeGlobalClustersRequest method. +// req, resp := client.DescribeGlobalClustersRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeOptionGroupOptions -func (c *RDS) DescribeOptionGroupOptionsRequest(input *DescribeOptionGroupOptionsInput) (req *request.Request, output *DescribeOptionGroupOptionsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeGlobalClusters +func (c *RDS) DescribeGlobalClustersRequest(input *DescribeGlobalClustersInput) (req *request.Request, output *DescribeGlobalClustersOutput) { op := &request.Operation{ - Name: opDescribeOptionGroupOptions, + Name: opDescribeGlobalClusters, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ @@ -5661,75 +6329,213 @@ func (c *RDS) DescribeOptionGroupOptionsRequest(input *DescribeOptionGroupOption } if input == nil { - input = &DescribeOptionGroupOptionsInput{} + input = &DescribeGlobalClustersInput{} } - output = &DescribeOptionGroupOptionsOutput{} + output = &DescribeGlobalClustersOutput{} req = c.newRequest(op, input, output) return } -// DescribeOptionGroupOptions API operation for Amazon Relational Database Service. +// DescribeGlobalClusters API operation for Amazon Relational Database Service. // -// Describes all available options. +// Returns information about Aurora global database clusters. This API supports +// pagination. +// +// For more information on Amazon Aurora, see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) +// in the Amazon Aurora 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 Relational Database Service's -// API operation DescribeOptionGroupOptions for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeOptionGroupOptions -func (c *RDS) DescribeOptionGroupOptions(input *DescribeOptionGroupOptionsInput) (*DescribeOptionGroupOptionsOutput, error) { - req, out := c.DescribeOptionGroupOptionsRequest(input) +// API operation DescribeGlobalClusters for usage and error information. +// +// Returned Error Codes: +// * ErrCodeGlobalClusterNotFoundFault "GlobalClusterNotFoundFault" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeGlobalClusters +func (c *RDS) DescribeGlobalClusters(input *DescribeGlobalClustersInput) (*DescribeGlobalClustersOutput, error) { + req, out := c.DescribeGlobalClustersRequest(input) return out, req.Send() } -// DescribeOptionGroupOptionsWithContext is the same as DescribeOptionGroupOptions with the addition of +// DescribeGlobalClustersWithContext is the same as DescribeGlobalClusters with the addition of // the ability to pass a context and additional request options. // -// See DescribeOptionGroupOptions for details on how to use this API operation. +// See DescribeGlobalClusters 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 *RDS) DescribeOptionGroupOptionsWithContext(ctx aws.Context, input *DescribeOptionGroupOptionsInput, opts ...request.Option) (*DescribeOptionGroupOptionsOutput, error) { - req, out := c.DescribeOptionGroupOptionsRequest(input) +func (c *RDS) DescribeGlobalClustersWithContext(ctx aws.Context, input *DescribeGlobalClustersInput, opts ...request.Option) (*DescribeGlobalClustersOutput, error) { + req, out := c.DescribeGlobalClustersRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// DescribeOptionGroupOptionsPages iterates over the pages of a DescribeOptionGroupOptions operation, +// DescribeGlobalClustersPages iterates over the pages of a DescribeGlobalClusters operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // -// See DescribeOptionGroupOptions method for more information on how to use this operation. +// See DescribeGlobalClusters 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 DescribeOptionGroupOptions operation. +// // Example iterating over at most 3 pages of a DescribeGlobalClusters operation. // pageNum := 0 -// err := client.DescribeOptionGroupOptionsPages(params, -// func(page *DescribeOptionGroupOptionsOutput, lastPage bool) bool { +// err := client.DescribeGlobalClustersPages(params, +// func(page *DescribeGlobalClustersOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) // -func (c *RDS) DescribeOptionGroupOptionsPages(input *DescribeOptionGroupOptionsInput, fn func(*DescribeOptionGroupOptionsOutput, bool) bool) error { - return c.DescribeOptionGroupOptionsPagesWithContext(aws.BackgroundContext(), input, fn) +func (c *RDS) DescribeGlobalClustersPages(input *DescribeGlobalClustersInput, fn func(*DescribeGlobalClustersOutput, bool) bool) error { + return c.DescribeGlobalClustersPagesWithContext(aws.BackgroundContext(), input, fn) } -// DescribeOptionGroupOptionsPagesWithContext same as DescribeOptionGroupOptionsPages except +// DescribeGlobalClustersPagesWithContext same as DescribeGlobalClustersPages 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 *RDS) DescribeOptionGroupOptionsPagesWithContext(ctx aws.Context, input *DescribeOptionGroupOptionsInput, fn func(*DescribeOptionGroupOptionsOutput, bool) bool, opts ...request.Option) error { +func (c *RDS) DescribeGlobalClustersPagesWithContext(ctx aws.Context, input *DescribeGlobalClustersInput, fn func(*DescribeGlobalClustersOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeGlobalClustersInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeGlobalClustersRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeGlobalClustersOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeOptionGroupOptions = "DescribeOptionGroupOptions" + +// DescribeOptionGroupOptionsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeOptionGroupOptions 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 DescribeOptionGroupOptions for more information on using the DescribeOptionGroupOptions +// 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 DescribeOptionGroupOptionsRequest method. +// req, resp := client.DescribeOptionGroupOptionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeOptionGroupOptions +func (c *RDS) DescribeOptionGroupOptionsRequest(input *DescribeOptionGroupOptionsInput) (req *request.Request, output *DescribeOptionGroupOptionsOutput) { + op := &request.Operation{ + Name: opDescribeOptionGroupOptions, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"Marker"}, + OutputTokens: []string{"Marker"}, + LimitToken: "MaxRecords", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeOptionGroupOptionsInput{} + } + + output = &DescribeOptionGroupOptionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeOptionGroupOptions API operation for Amazon Relational Database Service. +// +// Describes all available options. +// +// 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 Relational Database Service's +// API operation DescribeOptionGroupOptions for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeOptionGroupOptions +func (c *RDS) DescribeOptionGroupOptions(input *DescribeOptionGroupOptionsInput) (*DescribeOptionGroupOptionsOutput, error) { + req, out := c.DescribeOptionGroupOptionsRequest(input) + return out, req.Send() +} + +// DescribeOptionGroupOptionsWithContext is the same as DescribeOptionGroupOptions with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeOptionGroupOptions 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 *RDS) DescribeOptionGroupOptionsWithContext(ctx aws.Context, input *DescribeOptionGroupOptionsInput, opts ...request.Option) (*DescribeOptionGroupOptionsOutput, error) { + req, out := c.DescribeOptionGroupOptionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeOptionGroupOptionsPages iterates over the pages of a DescribeOptionGroupOptions operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeOptionGroupOptions 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 DescribeOptionGroupOptions operation. +// pageNum := 0 +// err := client.DescribeOptionGroupOptionsPages(params, +// func(page *DescribeOptionGroupOptionsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *RDS) DescribeOptionGroupOptionsPages(input *DescribeOptionGroupOptionsInput, fn func(*DescribeOptionGroupOptionsOutput, bool) bool) error { + return c.DescribeOptionGroupOptionsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeOptionGroupOptionsPagesWithContext same as DescribeOptionGroupOptionsPages 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 *RDS) DescribeOptionGroupOptionsPagesWithContext(ctx aws.Context, input *DescribeOptionGroupOptionsInput, fn func(*DescribeOptionGroupOptionsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { var inCpy *DescribeOptionGroupOptionsInput @@ -5756,7 +6562,7 @@ const opDescribeOptionGroups = "DescribeOptionGroups" // DescribeOptionGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeOptionGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5891,7 +6697,7 @@ const opDescribeOrderableDBInstanceOptions = "DescribeOrderableDBInstanceOptions // DescribeOrderableDBInstanceOptionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeOrderableDBInstanceOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6021,7 +6827,7 @@ const opDescribePendingMaintenanceActions = "DescribePendingMaintenanceActions" // DescribePendingMaintenanceActionsRequest generates a "aws/request.Request" representing the // client's request for the DescribePendingMaintenanceActions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6101,7 +6907,7 @@ const opDescribeReservedDBInstances = "DescribeReservedDBInstances" // DescribeReservedDBInstancesRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedDBInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6237,7 +7043,7 @@ const opDescribeReservedDBInstancesOfferings = "DescribeReservedDBInstancesOffer // DescribeReservedDBInstancesOfferingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedDBInstancesOfferings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6372,7 +7178,7 @@ const opDescribeSourceRegions = "DescribeSourceRegions" // DescribeSourceRegionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSourceRegions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6448,7 +7254,7 @@ const opDescribeValidDBInstanceModifications = "DescribeValidDBInstanceModificat // DescribeValidDBInstanceModificationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeValidDBInstanceModifications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6503,7 +7309,7 @@ func (c *RDS) DescribeValidDBInstanceModificationsRequest(input *DescribeValidDB // DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. +// The DB instance isn't in a valid state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeValidDBInstanceModifications func (c *RDS) DescribeValidDBInstanceModifications(input *DescribeValidDBInstanceModificationsInput) (*DescribeValidDBInstanceModificationsOutput, error) { @@ -6532,7 +7338,7 @@ const opDownloadDBLogFilePortion = "DownloadDBLogFilePortion" // DownloadDBLogFilePortionRequest generates a "aws/request.Request" representing the // client's request for the DownloadDBLogFilePortion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6670,7 +7476,7 @@ const opFailoverDBCluster = "FailoverDBCluster" // FailoverDBClusterRequest generates a "aws/request.Request" representing the // client's request for the FailoverDBCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6736,10 +7542,10 @@ func (c *RDS) FailoverDBClusterRequest(input *FailoverDBClusterInput) (req *requ // DBClusterIdentifier doesn't refer to an existing DB cluster. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster isn't in a valid state. +// The requested operation can't be performed while the cluster is in this state. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. +// The DB instance isn't in a valid state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/FailoverDBCluster func (c *RDS) FailoverDBCluster(input *FailoverDBClusterInput) (*FailoverDBClusterOutput, error) { @@ -6768,7 +7574,7 @@ const opListTagsForResource = "ListTagsForResource" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6857,7 +7663,7 @@ const opModifyCurrentDBClusterCapacity = "ModifyCurrentDBClusterCapacity" // ModifyCurrentDBClusterCapacityRequest generates a "aws/request.Request" representing the // client's request for the ModifyCurrentDBClusterCapacity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6929,7 +7735,7 @@ func (c *RDS) ModifyCurrentDBClusterCapacityRequest(input *ModifyCurrentDBCluste // DBClusterIdentifier doesn't refer to an existing DB cluster. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster isn't in a valid state. +// The requested operation can't be performed while the cluster is in this state. // // * ErrCodeInvalidDBClusterCapacityFault "InvalidDBClusterCapacityFault" // Capacity isn't a valid Aurora Serverless DB cluster capacity. Valid capacity @@ -6962,7 +7768,7 @@ const opModifyDBCluster = "ModifyDBCluster" // ModifyDBClusterRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7019,7 +7825,7 @@ func (c *RDS) ModifyDBClusterRequest(input *ModifyDBClusterInput) (req *request. // DBClusterIdentifier doesn't refer to an existing DB cluster. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster isn't in a valid state. +// The requested operation can't be performed while the cluster is in this state. // // * ErrCodeStorageQuotaExceededFault "StorageQuotaExceeded" // The request would result in the user exceeding the allowed amount of storage @@ -7047,7 +7853,7 @@ func (c *RDS) ModifyDBClusterRequest(input *ModifyDBClusterInput) (req *request. // The state of the DB security group doesn't allow deletion. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. +// The DB instance isn't in a valid state. // // * ErrCodeDBClusterAlreadyExistsFault "DBClusterAlreadyExistsFault" // The user already has a DB cluster with the given identifier. @@ -7074,12 +7880,104 @@ func (c *RDS) ModifyDBClusterWithContext(ctx aws.Context, input *ModifyDBCluster return out, req.Send() } +const opModifyDBClusterEndpoint = "ModifyDBClusterEndpoint" + +// ModifyDBClusterEndpointRequest generates a "aws/request.Request" representing the +// client's request for the ModifyDBClusterEndpoint 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 ModifyDBClusterEndpoint for more information on using the ModifyDBClusterEndpoint +// 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 ModifyDBClusterEndpointRequest method. +// req, resp := client.ModifyDBClusterEndpointRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBClusterEndpoint +func (c *RDS) ModifyDBClusterEndpointRequest(input *ModifyDBClusterEndpointInput) (req *request.Request, output *ModifyDBClusterEndpointOutput) { + op := &request.Operation{ + Name: opModifyDBClusterEndpoint, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyDBClusterEndpointInput{} + } + + output = &ModifyDBClusterEndpointOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyDBClusterEndpoint API operation for Amazon Relational Database Service. +// +// Modifies the properties of an endpoint in an Amazon Aurora DB cluster. +// +// 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 Relational Database Service's +// API operation ModifyDBClusterEndpoint for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The requested operation can't be performed while the cluster is in this state. +// +// * ErrCodeInvalidDBClusterEndpointStateFault "InvalidDBClusterEndpointStateFault" +// The requested operation can't be performed on the endpoint while the endpoint +// is in this state. +// +// * ErrCodeDBClusterEndpointNotFoundFault "DBClusterEndpointNotFoundFault" +// The specified custom endpoint doesn't exist. +// +// * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" +// DBInstanceIdentifier doesn't refer to an existing DB instance. +// +// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" +// The DB instance isn't in a valid state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyDBClusterEndpoint +func (c *RDS) ModifyDBClusterEndpoint(input *ModifyDBClusterEndpointInput) (*ModifyDBClusterEndpointOutput, error) { + req, out := c.ModifyDBClusterEndpointRequest(input) + return out, req.Send() +} + +// ModifyDBClusterEndpointWithContext is the same as ModifyDBClusterEndpoint with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyDBClusterEndpoint 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 *RDS) ModifyDBClusterEndpointWithContext(ctx aws.Context, input *ModifyDBClusterEndpointInput, opts ...request.Option) (*ModifyDBClusterEndpointOutput, error) { + req, out := c.ModifyDBClusterEndpointRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opModifyDBClusterParameterGroup = "ModifyDBClusterParameterGroup" // ModifyDBClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBClusterParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7183,7 +8081,7 @@ const opModifyDBClusterSnapshotAttribute = "ModifyDBClusterSnapshotAttribute" // ModifyDBClusterSnapshotAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBClusterSnapshotAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7285,7 +8183,7 @@ const opModifyDBInstance = "ModifyDBInstance" // ModifyDBInstanceRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7338,7 +8236,7 @@ func (c *RDS) ModifyDBInstanceRequest(input *ModifyDBInstanceInput) (req *reques // // Returned Error Codes: // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. +// The DB instance isn't in a valid state. // // * ErrCodeInvalidDBSecurityGroupStateFault "InvalidDBSecurityGroupState" // The state of the DB security group doesn't allow deletion. @@ -7421,7 +8319,7 @@ const opModifyDBParameterGroup = "ModifyDBParameterGroup" // ModifyDBParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7522,7 +8420,7 @@ const opModifyDBSnapshot = "ModifyDBSnapshot" // ModifyDBSnapshotRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7604,7 +8502,7 @@ const opModifyDBSnapshotAttribute = "ModifyDBSnapshotAttribute" // ModifyDBSnapshotAttributeRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBSnapshotAttribute operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7706,7 +8604,7 @@ const opModifyDBSubnetGroup = "ModifyDBSubnetGroup" // ModifyDBSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyDBSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7801,7 +8699,7 @@ const opModifyEventSubscription = "ModifyEventSubscription" // ModifyEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the ModifyEventSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7898,12 +8796,96 @@ func (c *RDS) ModifyEventSubscriptionWithContext(ctx aws.Context, input *ModifyE return out, req.Send() } +const opModifyGlobalCluster = "ModifyGlobalCluster" + +// ModifyGlobalClusterRequest generates a "aws/request.Request" representing the +// client's request for the ModifyGlobalCluster 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 ModifyGlobalCluster for more information on using the ModifyGlobalCluster +// 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 ModifyGlobalClusterRequest method. +// req, resp := client.ModifyGlobalClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyGlobalCluster +func (c *RDS) ModifyGlobalClusterRequest(input *ModifyGlobalClusterInput) (req *request.Request, output *ModifyGlobalClusterOutput) { + op := &request.Operation{ + Name: opModifyGlobalCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyGlobalClusterInput{} + } + + output = &ModifyGlobalClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyGlobalCluster API operation for Amazon Relational Database Service. +// +// Modify a setting for an Amazon Aurora global cluster. You can change one +// or more database configuration parameters by specifying these parameters +// and the new values in the request. For more information on Amazon Aurora, +// see What Is Amazon Aurora? (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) +// in the Amazon Aurora 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 Relational Database Service's +// API operation ModifyGlobalCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeGlobalClusterNotFoundFault "GlobalClusterNotFoundFault" +// +// * ErrCodeInvalidGlobalClusterStateFault "InvalidGlobalClusterStateFault" +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/ModifyGlobalCluster +func (c *RDS) ModifyGlobalCluster(input *ModifyGlobalClusterInput) (*ModifyGlobalClusterOutput, error) { + req, out := c.ModifyGlobalClusterRequest(input) + return out, req.Send() +} + +// ModifyGlobalClusterWithContext is the same as ModifyGlobalCluster with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyGlobalCluster 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 *RDS) ModifyGlobalClusterWithContext(ctx aws.Context, input *ModifyGlobalClusterInput, opts ...request.Option) (*ModifyGlobalClusterOutput, error) { + req, out := c.ModifyGlobalClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opModifyOptionGroup = "ModifyOptionGroup" // ModifyOptionGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyOptionGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7985,7 +8967,7 @@ const opPromoteReadReplica = "PromoteReadReplica" // PromoteReadReplicaRequest generates a "aws/request.Request" representing the // client's request for the PromoteReadReplica operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8045,7 +9027,7 @@ func (c *RDS) PromoteReadReplicaRequest(input *PromoteReadReplicaInput) (req *re // // Returned Error Codes: // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. +// The DB instance isn't in a valid state. // // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" // DBInstanceIdentifier doesn't refer to an existing DB instance. @@ -8077,7 +9059,7 @@ const opPromoteReadReplicaDBCluster = "PromoteReadReplicaDBCluster" // PromoteReadReplicaDBClusterRequest generates a "aws/request.Request" representing the // client's request for the PromoteReadReplicaDBCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8130,7 +9112,7 @@ func (c *RDS) PromoteReadReplicaDBClusterRequest(input *PromoteReadReplicaDBClus // DBClusterIdentifier doesn't refer to an existing DB cluster. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster isn't in a valid state. +// The requested operation can't be performed while the cluster is in this state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/PromoteReadReplicaDBCluster func (c *RDS) PromoteReadReplicaDBCluster(input *PromoteReadReplicaDBClusterInput) (*PromoteReadReplicaDBClusterOutput, error) { @@ -8159,7 +9141,7 @@ const opPurchaseReservedDBInstancesOffering = "PurchaseReservedDBInstancesOfferi // PurchaseReservedDBInstancesOfferingRequest generates a "aws/request.Request" representing the // client's request for the PurchaseReservedDBInstancesOffering operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8244,7 +9226,7 @@ const opRebootDBInstance = "RebootDBInstance" // RebootDBInstanceRequest generates a "aws/request.Request" representing the // client's request for the RebootDBInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8304,7 +9286,7 @@ func (c *RDS) RebootDBInstanceRequest(input *RebootDBInstanceInput) (req *reques // // Returned Error Codes: // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. +// The DB instance isn't in a valid state. // // * ErrCodeDBInstanceNotFoundFault "DBInstanceNotFound" // DBInstanceIdentifier doesn't refer to an existing DB instance. @@ -8331,33 +9313,119 @@ func (c *RDS) RebootDBInstanceWithContext(ctx aws.Context, input *RebootDBInstan return out, req.Send() } -const opRemoveRoleFromDBCluster = "RemoveRoleFromDBCluster" +const opRemoveFromGlobalCluster = "RemoveFromGlobalCluster" -// RemoveRoleFromDBClusterRequest generates a "aws/request.Request" representing the -// client's request for the RemoveRoleFromDBCluster operation. The "output" return +// RemoveFromGlobalClusterRequest generates a "aws/request.Request" representing the +// client's request for the RemoveFromGlobalCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 RemoveRoleFromDBCluster for more information on using the RemoveRoleFromDBCluster +// See RemoveFromGlobalCluster for more information on using the RemoveFromGlobalCluster // 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 RemoveRoleFromDBClusterRequest method. -// req, resp := client.RemoveRoleFromDBClusterRequest(params) +// // Example sending a request using the RemoveFromGlobalClusterRequest method. +// req, resp := client.RemoveFromGlobalClusterRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveRoleFromDBCluster -func (c *RDS) RemoveRoleFromDBClusterRequest(input *RemoveRoleFromDBClusterInput) (req *request.Request, output *RemoveRoleFromDBClusterOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveFromGlobalCluster +func (c *RDS) RemoveFromGlobalClusterRequest(input *RemoveFromGlobalClusterInput) (req *request.Request, output *RemoveFromGlobalClusterOutput) { + op := &request.Operation{ + Name: opRemoveFromGlobalCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RemoveFromGlobalClusterInput{} + } + + output = &RemoveFromGlobalClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// RemoveFromGlobalCluster API operation for Amazon Relational Database Service. +// +// Detaches an Aurora secondary cluster from an Aurora global database cluster. +// The cluster becomes a standalone cluster with read-write capability instead +// of being read-only and receiving data from a primary cluster in a different +// 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. +// +// See the AWS API reference guide for Amazon Relational Database Service's +// API operation RemoveFromGlobalCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeGlobalClusterNotFoundFault "GlobalClusterNotFoundFault" +// +// * ErrCodeInvalidGlobalClusterStateFault "InvalidGlobalClusterStateFault" +// +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier doesn't refer to an existing DB cluster. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveFromGlobalCluster +func (c *RDS) RemoveFromGlobalCluster(input *RemoveFromGlobalClusterInput) (*RemoveFromGlobalClusterOutput, error) { + req, out := c.RemoveFromGlobalClusterRequest(input) + return out, req.Send() +} + +// RemoveFromGlobalClusterWithContext is the same as RemoveFromGlobalCluster with the addition of +// the ability to pass a context and additional request options. +// +// See RemoveFromGlobalCluster 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 *RDS) RemoveFromGlobalClusterWithContext(ctx aws.Context, input *RemoveFromGlobalClusterInput, opts ...request.Option) (*RemoveFromGlobalClusterOutput, error) { + req, out := c.RemoveFromGlobalClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRemoveRoleFromDBCluster = "RemoveRoleFromDBCluster" + +// RemoveRoleFromDBClusterRequest generates a "aws/request.Request" representing the +// client's request for the RemoveRoleFromDBCluster 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 RemoveRoleFromDBCluster for more information on using the RemoveRoleFromDBCluster +// 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 RemoveRoleFromDBClusterRequest method. +// req, resp := client.RemoveRoleFromDBClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveRoleFromDBCluster +func (c *RDS) RemoveRoleFromDBClusterRequest(input *RemoveRoleFromDBClusterInput) (req *request.Request, output *RemoveRoleFromDBClusterOutput) { op := &request.Operation{ Name: opRemoveRoleFromDBCluster, HTTPMethod: "POST", @@ -8370,8 +9438,7 @@ func (c *RDS) RemoveRoleFromDBClusterRequest(input *RemoveRoleFromDBClusterInput output = &RemoveRoleFromDBClusterOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -8398,7 +9465,7 @@ func (c *RDS) RemoveRoleFromDBClusterRequest(input *RemoveRoleFromDBClusterInput // specified DB cluster. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster isn't in a valid state. +// The requested operation can't be performed while the cluster is in this state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RemoveRoleFromDBCluster func (c *RDS) RemoveRoleFromDBCluster(input *RemoveRoleFromDBClusterInput) (*RemoveRoleFromDBClusterOutput, error) { @@ -8427,7 +9494,7 @@ const opRemoveSourceIdentifierFromSubscription = "RemoveSourceIdentifierFromSubs // RemoveSourceIdentifierFromSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the RemoveSourceIdentifierFromSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8509,7 +9576,7 @@ const opRemoveTagsFromResource = "RemoveTagsFromResource" // RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8543,8 +9610,7 @@ func (c *RDS) RemoveTagsFromResourceRequest(input *RemoveTagsFromResourceInput) output = &RemoveTagsFromResourceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -8600,7 +9666,7 @@ const opResetDBClusterParameterGroup = "ResetDBClusterParameterGroup" // ResetDBClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the ResetDBClusterParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8696,7 +9762,7 @@ const opResetDBParameterGroup = "ResetDBParameterGroup" // ResetDBParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the ResetDBParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8786,7 +9852,7 @@ const opRestoreDBClusterFromS3 = "RestoreDBClusterFromS3" // RestoreDBClusterFromS3Request generates a "aws/request.Request" representing the // client's request for the RestoreDBClusterFromS3 operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8858,7 +9924,7 @@ func (c *RDS) RestoreDBClusterFromS3Request(input *RestoreDBClusterFromS3Input) // because of users' change. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster isn't in a valid state. +// The requested operation can't be performed while the cluster is in this state. // // * ErrCodeInvalidDBSubnetGroupStateFault "InvalidDBSubnetGroupStateFault" // The DB subnet group cannot be deleted because it's in use. @@ -8914,7 +9980,7 @@ const opRestoreDBClusterFromSnapshot = "RestoreDBClusterFromSnapshot" // RestoreDBClusterFromSnapshotRequest generates a "aws/request.Request" representing the // client's request for the RestoreDBClusterFromSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9063,7 +10129,7 @@ const opRestoreDBClusterToPointInTime = "RestoreDBClusterToPointInTime" // RestoreDBClusterToPointInTimeRequest generates a "aws/request.Request" representing the // client's request for the RestoreDBClusterToPointInTime operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9154,7 +10220,7 @@ func (c *RDS) RestoreDBClusterToPointInTimeRequest(input *RestoreDBClusterToPoin // The supplied value isn't a valid DB cluster snapshot state. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster isn't in a valid state. +// The requested operation can't be performed while the cluster is in this state. // // * ErrCodeInvalidDBSnapshotStateFault "InvalidDBSnapshotState" // The state of the DB snapshot doesn't allow deletion. @@ -9211,7 +10277,7 @@ const opRestoreDBInstanceFromDBSnapshot = "RestoreDBInstanceFromDBSnapshot" // RestoreDBInstanceFromDBSnapshotRequest generates a "aws/request.Request" representing the // client's request for the RestoreDBInstanceFromDBSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9376,7 +10442,7 @@ const opRestoreDBInstanceFromS3 = "RestoreDBInstanceFromS3" // RestoreDBInstanceFromS3Request generates a "aws/request.Request" representing the // client's request for the RestoreDBInstanceFromS3 operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9519,7 +10585,7 @@ const opRestoreDBInstanceToPointInTime = "RestoreDBInstanceToPointInTime" // RestoreDBInstanceToPointInTimeRequest generates a "aws/request.Request" representing the // client's request for the RestoreDBInstanceToPointInTime operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9596,7 +10662,7 @@ func (c *RDS) RestoreDBInstanceToPointInTimeRequest(input *RestoreDBInstanceToPo // Zone. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. +// The DB instance isn't in a valid state. // // * ErrCodePointInTimeRestoreNotEnabledFault "PointInTimeRestoreNotEnabled" // SourceDBInstanceIdentifier refers to a DB instance with BackupRetentionPeriod @@ -9649,10 +10715,13 @@ func (c *RDS) RestoreDBInstanceToPointInTimeRequest(input *RestoreDBInstanceToPo // * ErrCodeDomainNotFoundFault "DomainNotFoundFault" // Domain doesn't refer to an existing Active Directory domain. // +// * ErrCodeBackupPolicyNotFoundFault "BackupPolicyNotFoundFault" +// // * ErrCodeDBParameterGroupNotFoundFault "DBParameterGroupNotFound" // DBParameterGroupName doesn't refer to an existing DB parameter group. // -// * ErrCodeBackupPolicyNotFoundFault "BackupPolicyNotFoundFault" +// * ErrCodeDBInstanceAutomatedBackupNotFoundFault "DBInstanceAutomatedBackupNotFound" +// No automated backup for this DB instance was found. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/RestoreDBInstanceToPointInTime func (c *RDS) RestoreDBInstanceToPointInTime(input *RestoreDBInstanceToPointInTimeInput) (*RestoreDBInstanceToPointInTimeOutput, error) { @@ -9681,7 +10750,7 @@ const opRevokeDBSecurityGroupIngress = "RevokeDBSecurityGroupIngress" // RevokeDBSecurityGroupIngressRequest generates a "aws/request.Request" representing the // client's request for the RevokeDBSecurityGroupIngress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9768,12 +10837,101 @@ func (c *RDS) RevokeDBSecurityGroupIngressWithContext(ctx aws.Context, input *Re return out, req.Send() } +const opStartDBCluster = "StartDBCluster" + +// StartDBClusterRequest generates a "aws/request.Request" representing the +// client's request for the StartDBCluster 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 StartDBCluster for more information on using the StartDBCluster +// 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 StartDBClusterRequest method. +// req, resp := client.StartDBClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartDBCluster +func (c *RDS) StartDBClusterRequest(input *StartDBClusterInput) (req *request.Request, output *StartDBClusterOutput) { + op := &request.Operation{ + Name: opStartDBCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartDBClusterInput{} + } + + output = &StartDBClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartDBCluster API operation for Amazon Relational Database Service. +// +// Starts an Amazon Aurora DB cluster that was stopped using the AWS console, +// the stop-db-cluster AWS CLI command, or the StopDBCluster action. +// +// For more information, see Stopping and Starting an Aurora Cluster (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-cluster-stop-start.html) +// in the Amazon Aurora 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 Relational Database Service's +// API operation StartDBCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier doesn't refer to an existing DB cluster. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The requested operation can't be performed while the cluster is in this state. +// +// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" +// The DB instance isn't in a valid state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StartDBCluster +func (c *RDS) StartDBCluster(input *StartDBClusterInput) (*StartDBClusterOutput, error) { + req, out := c.StartDBClusterRequest(input) + return out, req.Send() +} + +// StartDBClusterWithContext is the same as StartDBCluster with the addition of +// the ability to pass a context and additional request options. +// +// See StartDBCluster 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 *RDS) StartDBClusterWithContext(ctx aws.Context, input *StartDBClusterInput, opts ...request.Option) (*StartDBClusterOutput, error) { + req, out := c.StartDBClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opStartDBInstance = "StartDBInstance" // StartDBInstanceRequest generates a "aws/request.Request" representing the // client's request for the StartDBInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9812,11 +10970,15 @@ func (c *RDS) StartDBInstanceRequest(input *StartDBInstanceInput) (req *request. // StartDBInstance API operation for Amazon Relational Database Service. // -// Starts a DB instance that was stopped using the AWS console, the stop-db-instance -// AWS CLI command, or the StopDBInstance action. For more information, see -// Stopping and Starting a DB instance in the AWS RDS user guide. +// Starts an Amazon RDS DB instance that was stopped using the AWS console, +// the stop-db-instance AWS CLI command, or the StopDBInstance action. // -// This command doesn't apply to Aurora MySQL and Aurora PostgreSQL. +// For more information, see Starting an Amazon RDS DB instance That Was Previously +// Stopped (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_StartInstance.html) +// in the Amazon RDS User Guide. +// +// This command doesn't apply to Aurora MySQL and Aurora PostgreSQL. For Aurora +// DB clusters, use StartDBCluster instead. // // 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 @@ -9830,7 +10992,7 @@ func (c *RDS) StartDBInstanceRequest(input *StartDBInstanceInput) (req *request. // DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. +// The DB instance isn't in a valid state. // // * ErrCodeInsufficientDBInstanceCapacityFault "InsufficientDBInstanceCapacity" // The specified DB instance class isn't available in the specified Availability @@ -9844,7 +11006,7 @@ func (c *RDS) StartDBInstanceRequest(input *StartDBInstanceInput) (req *request. // unless there is only one Availability Zone. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster isn't in a valid state. +// The requested operation can't be performed while the cluster is in this state. // // * ErrCodeInvalidSubnet "InvalidSubnet" // The requested subnet is invalid, or multiple subnets were requested that @@ -9889,12 +11051,103 @@ func (c *RDS) StartDBInstanceWithContext(ctx aws.Context, input *StartDBInstance return out, req.Send() } +const opStopDBCluster = "StopDBCluster" + +// StopDBClusterRequest generates a "aws/request.Request" representing the +// client's request for the StopDBCluster 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 StopDBCluster for more information on using the StopDBCluster +// 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 StopDBClusterRequest method. +// req, resp := client.StopDBClusterRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBCluster +func (c *RDS) StopDBClusterRequest(input *StopDBClusterInput) (req *request.Request, output *StopDBClusterOutput) { + op := &request.Operation{ + Name: opStopDBCluster, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StopDBClusterInput{} + } + + output = &StopDBClusterOutput{} + req = c.newRequest(op, input, output) + return +} + +// StopDBCluster API operation for Amazon Relational Database Service. +// +// Stops an Amazon Aurora DB cluster. When you stop a DB cluster, Aurora retains +// the DB cluster's metadata, including its endpoints and DB parameter groups. +// Aurora also retains the transaction logs so you can do a point-in-time restore +// if necessary. +// +// For more information, see Stopping and Starting an Aurora Cluster (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-cluster-stop-start.html) +// in the Amazon Aurora 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 Relational Database Service's +// API operation StopDBCluster for usage and error information. +// +// Returned Error Codes: +// * ErrCodeDBClusterNotFoundFault "DBClusterNotFoundFault" +// DBClusterIdentifier doesn't refer to an existing DB cluster. +// +// * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" +// The requested operation can't be performed while the cluster is in this state. +// +// * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" +// The DB instance isn't in a valid state. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBCluster +func (c *RDS) StopDBCluster(input *StopDBClusterInput) (*StopDBClusterOutput, error) { + req, out := c.StopDBClusterRequest(input) + return out, req.Send() +} + +// StopDBClusterWithContext is the same as StopDBCluster with the addition of +// the ability to pass a context and additional request options. +// +// See StopDBCluster 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 *RDS) StopDBClusterWithContext(ctx aws.Context, input *StopDBClusterInput, opts ...request.Option) (*StopDBClusterOutput, error) { + req, out := c.StopDBClusterRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opStopDBInstance = "StopDBInstance" // StopDBInstanceRequest generates a "aws/request.Request" representing the // client's request for the StopDBInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9933,13 +11186,17 @@ func (c *RDS) StopDBInstanceRequest(input *StopDBInstanceInput) (req *request.Re // StopDBInstance API operation for Amazon Relational Database Service. // -// Stops a DB instance. When you stop a DB instance, Amazon RDS retains the -// DB instance's metadata, including its endpoint, DB parameter group, and option -// group membership. Amazon RDS also retains the transaction logs so you can -// do a point-in-time restore if necessary. For more information, see Stopping -// and Starting a DB instance in the AWS RDS user guide. +// Stops an Amazon RDS DB instance. When you stop a DB instance, Amazon RDS +// retains the DB instance's metadata, including its endpoint, DB parameter +// group, and option group membership. Amazon RDS also retains the transaction +// logs so you can do a point-in-time restore if necessary. // -// This command doesn't apply to Aurora MySQL and Aurora PostgreSQL. +// For more information, see Stopping an Amazon RDS DB Instance Temporarily +// (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_StopInstance.html) +// in the Amazon RDS User Guide. +// +// This command doesn't apply to Aurora MySQL and Aurora PostgreSQL. For Aurora +// clusters, use StopDBCluster instead. // // 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 @@ -9953,7 +11210,7 @@ func (c *RDS) StopDBInstanceRequest(input *StopDBInstanceInput) (req *request.Re // DBInstanceIdentifier doesn't refer to an existing DB instance. // // * ErrCodeInvalidDBInstanceStateFault "InvalidDBInstanceState" -// The specified DB instance isn't in the available state. +// The DB instance isn't in a valid state. // // * ErrCodeDBSnapshotAlreadyExistsFault "DBSnapshotAlreadyExists" // DBSnapshotIdentifier is already used by an existing snapshot. @@ -9962,7 +11219,7 @@ func (c *RDS) StopDBInstanceRequest(input *StopDBInstanceInput) (req *request.Re // The request would result in the user exceeding the allowed number of DB snapshots. // // * ErrCodeInvalidDBClusterStateFault "InvalidDBClusterStateFault" -// The DB cluster isn't in a valid state. +// The requested operation can't be performed while the cluster is in this state. // // See also, https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/StopDBInstance func (c *RDS) StopDBInstance(input *StopDBInstanceInput) (*StopDBInstanceOutput, error) { @@ -10555,7 +11812,7 @@ type BacktrackDBClusterInput struct { // // * Must contain a valid ISO 8601 timestamp. // - // * Cannot contain a timestamp set in the future. + // * Can't contain a timestamp set in the future. // // Example: 2017-07-08T18:00Z // @@ -10571,7 +11828,7 @@ type BacktrackDBClusterInput struct { // // * First character must be a letter. // - // * Cannot end with a hyphen or contain two consecutive hyphens. + // * Can't end with a hyphen or contain two consecutive hyphens. // // Example: my-cluster1 // @@ -10898,13 +12155,13 @@ type CopyDBClusterParameterGroupInput struct { // // Constraints: // - // * Cannot be null, empty, or blank + // * Can't be null, empty, or blank // // * Must contain from 1 to 255 letters, numbers, or hyphens // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens // // Example: my-cluster-param-group1 // @@ -11095,7 +12352,7 @@ type CopyDBClusterSnapshotInput struct { // // * First character must be a letter. // - // * Cannot end with a hyphen or contain two consecutive hyphens. + // * Can't end with a hyphen or contain two consecutive hyphens. // // Example: my-cluster-snapshot2 // @@ -11233,13 +12490,13 @@ type CopyDBParameterGroupInput struct { // // Constraints: // - // * Cannot be null, empty, or blank + // * Can't be null, empty, or blank // // * Must contain from 1 to 255 letters, numbers, or hyphens // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens // // Example: my-db-parameter-group // @@ -11449,13 +12706,13 @@ type CopyDBSnapshotInput struct { // // Constraints: // - // * Cannot be null, empty, or blank + // * Can't be null, empty, or blank // // * Must contain from 1 to 255 letters, numbers, or hyphens // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens // // Example: my-db-snapshot // @@ -11602,13 +12859,13 @@ type CopyOptionGroupInput struct { // // Constraints: // - // * Cannot be null, empty, or blank + // * Can't be null, empty, or blank // // * Must contain from 1 to 255 letters, numbers, or hyphens // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens // // Example: my-option-group // @@ -11691,76 +12948,294 @@ func (s *CopyOptionGroupOutput) SetOptionGroup(v *OptionGroup) *CopyOptionGroupO return s } -type CreateDBClusterInput struct { +type CreateDBClusterEndpointInput struct { _ struct{} `type:"structure"` - // A list of EC2 Availability Zones that instances in the DB cluster can be - // created in. For information on AWS Regions and Availability Zones, see Choosing - // the Regions and Availability Zones (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.RegionsAndAvailabilityZones.html) - // in the Amazon Aurora User Guide. - AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` - - // The target backtrack window, in seconds. To disable backtracking, set this - // value to 0. - // - // Default: 0 - // - // Constraints: - // - // * If specified, this value must be set to a number from 0 to 259,200 (72 - // hours). - BacktrackWindow *int64 `type:"long"` - - // The number of days for which automated backups are retained. You must specify - // a minimum value of 1. - // - // Default: 1 - // - // Constraints: + // The identifier to use for the new endpoint. This parameter is stored as a + // lowercase string. // - // * Must be a value from 1 to 35 - BackupRetentionPeriod *int64 `type:"integer"` - - // A value that indicates that the DB cluster should be associated with the - // specified CharacterSet. - CharacterSetName *string `type:"string"` + // DBClusterEndpointIdentifier is a required field + DBClusterEndpointIdentifier *string `type:"string" required:"true"` - // The DB cluster identifier. This parameter is stored as a lowercase string. - // - // Constraints: - // - // * Must contain from 1 to 63 letters, numbers, or hyphens. - // - // * First character must be a letter. - // - // * Cannot end with a hyphen or contain two consecutive hyphens. - // - // Example: my-cluster1 + // The DB cluster identifier of the DB cluster associated with the endpoint. + // This parameter is stored as a lowercase string. // // DBClusterIdentifier is a required field DBClusterIdentifier *string `type:"string" required:"true"` - // The name of the DB cluster parameter group to associate with this DB cluster. - // If this argument is omitted, default.aurora5.6 is used. - // - // Constraints: + // The type of the endpoint. One of: READER, ANY. // - // * If supplied, must match the name of an existing DBClusterParameterGroup. - DBClusterParameterGroupName *string `type:"string"` + // EndpointType is a required field + EndpointType *string `type:"string" required:"true"` - // A DB subnet group to associate with this DB cluster. - // - // Constraints: Must match the name of an existing DBSubnetGroup. Must not be - // default. - // - // Example: mySubnetgroup - DBSubnetGroupName *string `type:"string"` + // List of DB instance identifiers that aren't part of the custom endpoint group. + // All other eligible instances are reachable through the custom endpoint. Only + // relevant if the list of static members is empty. + ExcludedMembers []*string `type:"list"` + + // List of DB instance identifiers that are part of the custom endpoint group. + StaticMembers []*string `type:"list"` +} + +// String returns the string representation +func (s CreateDBClusterEndpointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDBClusterEndpointInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateDBClusterEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateDBClusterEndpointInput"} + if s.DBClusterEndpointIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterEndpointIdentifier")) + } + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + if s.EndpointType == nil { + invalidParams.Add(request.NewErrParamRequired("EndpointType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterEndpointIdentifier sets the DBClusterEndpointIdentifier field's value. +func (s *CreateDBClusterEndpointInput) SetDBClusterEndpointIdentifier(v string) *CreateDBClusterEndpointInput { + s.DBClusterEndpointIdentifier = &v + return s +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *CreateDBClusterEndpointInput) SetDBClusterIdentifier(v string) *CreateDBClusterEndpointInput { + s.DBClusterIdentifier = &v + return s +} + +// SetEndpointType sets the EndpointType field's value. +func (s *CreateDBClusterEndpointInput) SetEndpointType(v string) *CreateDBClusterEndpointInput { + s.EndpointType = &v + return s +} + +// SetExcludedMembers sets the ExcludedMembers field's value. +func (s *CreateDBClusterEndpointInput) SetExcludedMembers(v []*string) *CreateDBClusterEndpointInput { + s.ExcludedMembers = v + return s +} + +// SetStaticMembers sets the StaticMembers field's value. +func (s *CreateDBClusterEndpointInput) SetStaticMembers(v []*string) *CreateDBClusterEndpointInput { + s.StaticMembers = v + return s +} + +// This data type represents the information you need to connect to an Amazon +// Aurora DB cluster. This data type is used as a response element in the following +// actions: +// +// * CreateDBClusterEndpoint +// +// * DescribeDBClusterEndpoints +// +// * ModifyDBClusterEndpoint +// +// * DeleteDBClusterEndpoint +// +// For the data structure that represents Amazon RDS DB instance endpoints, +// see Endpoint. +type CreateDBClusterEndpointOutput struct { + _ struct{} `type:"structure"` + + // The type associated with a custom endpoint. One of: READER, ANY. + CustomEndpointType *string `type:"string"` + + // The Amazon Resource Name (ARN) for the endpoint. + DBClusterEndpointArn *string `type:"string"` + + // The identifier associated with the endpoint. This parameter is stored as + // a lowercase string. + DBClusterEndpointIdentifier *string `type:"string"` + + // A unique system-generated identifier for an endpoint. It remains the same + // for the whole life of the endpoint. + DBClusterEndpointResourceIdentifier *string `type:"string"` + + // The DB cluster identifier of the DB cluster associated with the endpoint. + // This parameter is stored as a lowercase string. + DBClusterIdentifier *string `type:"string"` + + // The DNS address of the endpoint. + Endpoint *string `type:"string"` + + // The type of the endpoint. One of: READER, WRITER, CUSTOM. + EndpointType *string `type:"string"` + + // List of DB instance identifiers that aren't part of the custom endpoint group. + // All other eligible instances are reachable through the custom endpoint. Only + // relevant if the list of static members is empty. + ExcludedMembers []*string `type:"list"` + + // List of DB instance identifiers that are part of the custom endpoint group. + StaticMembers []*string `type:"list"` + + // The current status of the endpoint. One of: creating, available, deleting, + // modifying. + Status *string `type:"string"` +} + +// String returns the string representation +func (s CreateDBClusterEndpointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateDBClusterEndpointOutput) GoString() string { + return s.String() +} + +// SetCustomEndpointType sets the CustomEndpointType field's value. +func (s *CreateDBClusterEndpointOutput) SetCustomEndpointType(v string) *CreateDBClusterEndpointOutput { + s.CustomEndpointType = &v + return s +} + +// SetDBClusterEndpointArn sets the DBClusterEndpointArn field's value. +func (s *CreateDBClusterEndpointOutput) SetDBClusterEndpointArn(v string) *CreateDBClusterEndpointOutput { + s.DBClusterEndpointArn = &v + return s +} + +// SetDBClusterEndpointIdentifier sets the DBClusterEndpointIdentifier field's value. +func (s *CreateDBClusterEndpointOutput) SetDBClusterEndpointIdentifier(v string) *CreateDBClusterEndpointOutput { + s.DBClusterEndpointIdentifier = &v + return s +} + +// SetDBClusterEndpointResourceIdentifier sets the DBClusterEndpointResourceIdentifier field's value. +func (s *CreateDBClusterEndpointOutput) SetDBClusterEndpointResourceIdentifier(v string) *CreateDBClusterEndpointOutput { + s.DBClusterEndpointResourceIdentifier = &v + return s +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *CreateDBClusterEndpointOutput) SetDBClusterIdentifier(v string) *CreateDBClusterEndpointOutput { + s.DBClusterIdentifier = &v + return s +} + +// SetEndpoint sets the Endpoint field's value. +func (s *CreateDBClusterEndpointOutput) SetEndpoint(v string) *CreateDBClusterEndpointOutput { + s.Endpoint = &v + return s +} + +// SetEndpointType sets the EndpointType field's value. +func (s *CreateDBClusterEndpointOutput) SetEndpointType(v string) *CreateDBClusterEndpointOutput { + s.EndpointType = &v + return s +} + +// SetExcludedMembers sets the ExcludedMembers field's value. +func (s *CreateDBClusterEndpointOutput) SetExcludedMembers(v []*string) *CreateDBClusterEndpointOutput { + s.ExcludedMembers = v + return s +} + +// SetStaticMembers sets the StaticMembers field's value. +func (s *CreateDBClusterEndpointOutput) SetStaticMembers(v []*string) *CreateDBClusterEndpointOutput { + s.StaticMembers = v + return s +} + +// SetStatus sets the Status field's value. +func (s *CreateDBClusterEndpointOutput) SetStatus(v string) *CreateDBClusterEndpointOutput { + s.Status = &v + return s +} + +type CreateDBClusterInput struct { + _ struct{} `type:"structure"` + + // A list of EC2 Availability Zones that instances in the DB cluster can be + // created in. For information on AWS Regions and Availability Zones, see Choosing + // the Regions and Availability Zones (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.RegionsAndAvailabilityZones.html) + // in the Amazon Aurora User Guide. + AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` + + // The target backtrack window, in seconds. To disable backtracking, set this + // value to 0. + // + // Default: 0 + // + // Constraints: + // + // * If specified, this value must be set to a number from 0 to 259,200 (72 + // hours). + BacktrackWindow *int64 `type:"long"` + + // The number of days for which automated backups are retained. You must specify + // a minimum value of 1. + // + // Default: 1 + // + // Constraints: + // + // * Must be a value from 1 to 35 + BackupRetentionPeriod *int64 `type:"integer"` + + // A value that indicates that the DB cluster should be associated with the + // specified CharacterSet. + CharacterSetName *string `type:"string"` + + // The DB cluster identifier. This parameter is stored as a lowercase string. + // + // Constraints: + // + // * Must contain from 1 to 63 letters, numbers, or hyphens. + // + // * First character must be a letter. + // + // * Can't end with a hyphen or contain two consecutive hyphens. + // + // Example: my-cluster1 + // + // DBClusterIdentifier is a required field + DBClusterIdentifier *string `type:"string" required:"true"` + + // The name of the DB cluster parameter group to associate with this DB cluster. + // If this argument is omitted, default.aurora5.6 is used. + // + // Constraints: + // + // * If supplied, must match the name of an existing DB cluster parameter + // group. + DBClusterParameterGroupName *string `type:"string"` + + // A DB subnet group to associate with this DB cluster. + // + // Constraints: Must match the name of an existing DBSubnetGroup. Must not be + // default. + // + // Example: mySubnetgroup + DBSubnetGroupName *string `type:"string"` // The name for your database of up to 64 alpha-numeric characters. If you do // not provide a name, Amazon RDS will not create a database in the DB cluster // you are creating. DatabaseName *string `type:"string"` + // Indicates if the DB cluster should have deletion protection enabled. The + // database can't be deleted when this value is set to true. The default is + // false. + DeletionProtection *bool `type:"boolean"` + // DestinationRegion is used for presigning the request to a given region. DestinationRegion *string `type:"string"` @@ -11784,7 +13259,8 @@ type CreateDBClusterInput struct { // Engine is a required field Engine *string `type:"string" required:"true"` - // The DB engine mode of the DB cluster, either provisioned or serverless. + // The DB engine mode of the DB cluster, either provisioned, serverless, parallelquery, + // or global. EngineMode *string `type:"string"` // The version number of the database engine to use. @@ -11798,6 +13274,10 @@ type CreateDBClusterInput struct { // Example: 9.6.3 EngineVersion *string `type:"string"` + // The global cluster ID of an Aurora cluster that becomes the primary cluster + // in the new global database cluster. + GlobalClusterIdentifier *string `type:"string"` + // The AWS KMS key identifier for an encrypted DB cluster. // // The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption @@ -11836,7 +13316,7 @@ type CreateDBClusterInput struct { // // * First character must be a letter. // - // * Cannot be a reserved word for the chosen database engine. + // * Can't be a reserved word for the chosen database engine. MasterUsername *string `type:"string"` // A value that indicates that the DB cluster should be associated with the @@ -12015,6 +13495,12 @@ func (s *CreateDBClusterInput) SetDatabaseName(v string) *CreateDBClusterInput { return s } +// SetDeletionProtection sets the DeletionProtection field's value. +func (s *CreateDBClusterInput) SetDeletionProtection(v bool) *CreateDBClusterInput { + s.DeletionProtection = &v + return s +} + // SetDestinationRegion sets the DestinationRegion field's value. func (s *CreateDBClusterInput) SetDestinationRegion(v string) *CreateDBClusterInput { s.DestinationRegion = &v @@ -12051,6 +13537,12 @@ func (s *CreateDBClusterInput) SetEngineVersion(v string) *CreateDBClusterInput return s } +// SetGlobalClusterIdentifier sets the GlobalClusterIdentifier field's value. +func (s *CreateDBClusterInput) SetGlobalClusterIdentifier(v string) *CreateDBClusterInput { + s.GlobalClusterIdentifier = &v + return s +} + // SetKmsKeyId sets the KmsKeyId field's value. func (s *CreateDBClusterInput) SetKmsKeyId(v string) *CreateDBClusterInput { s.KmsKeyId = &v @@ -12138,9 +13630,10 @@ func (s *CreateDBClusterInput) SetVpcSecurityGroupIds(v []*string) *CreateDBClus type CreateDBClusterOutput struct { _ struct{} `type:"structure"` - // Contains the details of an Amazon RDS DB cluster. + // Contains the details of an Amazon Aurora DB cluster. // - // This data type is used as a response element in the DescribeDBClusters action. + // This data type is used as a response element in the DescribeDBClusters, StopDBCluster, + // and StartDBCluster actions. DBCluster *DBCluster `type:"structure"` } @@ -12167,7 +13660,7 @@ type CreateDBClusterParameterGroupInput struct { // // Constraints: // - // * Must match the name of an existing DBClusterParameterGroup. + // * Must match the name of an existing DB cluster parameter group. // // This value is stored as a lowercase string. // @@ -12303,7 +13796,7 @@ type CreateDBClusterSnapshotInput struct { // // * First character must be a letter. // - // * Cannot end with a hyphen or contain two consecutive hyphens. + // * Can't end with a hyphen or contain two consecutive hyphens. // // Example: my-cluster1-snapshot1 // @@ -12431,9 +13924,9 @@ type CreateDBInstanceInput struct { // // Constraints to the amount of storage for each storage type are the following: // - // * General Purpose (SSD) storage (gp2): Must be an integer from 20 to 16384. + // * General Purpose (SSD) storage (gp2): Must be an integer from 20 to 32768. // - // * Provisioned IOPS storage (io1): Must be an integer from 100 to 16384. + // * Provisioned IOPS storage (io1): Must be an integer from 100 to 32768. // // * Magnetic storage (standard): Must be an integer from 10 to 3072. // @@ -12495,7 +13988,7 @@ type CreateDBInstanceInput struct { // // * Must be a value from 0 to 35 // - // * Cannot be set to 0 if the DB instance is a source to Read Replicas + // * Can't be set to 0 if the DB instance is a source to Read Replicas BackupRetentionPeriod *int64 `type:"integer"` // For supported engines, indicates that the DB instance should be associated @@ -12535,7 +14028,7 @@ type CreateDBInstanceInput struct { // // * First character must be a letter. // - // * Cannot end with a hyphen or contain two consecutive hyphens. + // * Can't end with a hyphen or contain two consecutive hyphens. // // Example: mydbinstance // @@ -12556,7 +14049,7 @@ type CreateDBInstanceInput struct { // // * Must contain 1 to 64 letters or numbers. // - // * Cannot be a word reserved by the specified database engine + // * Can't be a word reserved by the specified database engine // // MariaDB // @@ -12567,7 +14060,7 @@ type CreateDBInstanceInput struct { // // * Must contain 1 to 64 letters or numbers. // - // * Cannot be a word reserved by the specified database engine + // * Can't be a word reserved by the specified database engine // // PostgreSQL // @@ -12582,7 +14075,7 @@ type CreateDBInstanceInput struct { // * Must begin with a letter or an underscore. Subsequent characters can // be letters, underscores, or digits (0-9). // - // * Cannot be a word reserved by the specified database engine + // * Can't be a word reserved by the specified database engine // // Oracle // @@ -12594,7 +14087,7 @@ type CreateDBInstanceInput struct { // // Constraints: // - // * Cannot be longer than 8 characters + // * Can't be longer than 8 characters // // SQL Server // @@ -12610,7 +14103,7 @@ type CreateDBInstanceInput struct { // // * Must contain 1 to 64 letters or numbers. // - // * Cannot be a word reserved by the specified database engine + // * Can't be a word reserved by the specified database engine DBName *string `type:"string"` // The name of the DB parameter group to associate with this DB instance. If @@ -12623,7 +14116,7 @@ type CreateDBInstanceInput struct { // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens DBParameterGroupName *string `type:"string"` // A list of DB security groups to associate with this DB instance. @@ -12636,6 +14129,11 @@ type CreateDBInstanceInput struct { // If there is no DB subnet group, then it is a non-VPC DB instance. DBSubnetGroupName *string `type:"string"` + // Indicates if the DB instance should have deletion protection enabled. The + // database can't be deleted when this value is set to true. The default is + // false. For more information, see Deleting a DB Instance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html). + DeletionProtection *bool `type:"boolean"` + // Specify the Active Directory Domain to create the instance in. Domain *string `type:"string"` @@ -12757,9 +14255,7 @@ type CreateDBInstanceInput struct { // in the Amazon RDS User Guide. // // Constraints: Must be a multiple between 1 and 50 of the storage amount for - // the DB instance. Must also be an integer multiple of 1000. For example, if - // the size of your DB instance is 500 GiB, then your Iops value can be 2000, - // 3000, 4000, or 5000. + // the DB instance. Iops *int64 `type:"integer"` // The AWS KMS key identifier for an encrypted DB instance. @@ -12829,7 +14325,7 @@ type CreateDBInstanceInput struct { // // * Must be 1 to 16 letters or numbers. // - // * Cannot be a reserved word for the chosen database engine. + // * Can't be a reserved word for the chosen database engine. // // Microsoft SQL Server // @@ -12841,7 +14337,7 @@ type CreateDBInstanceInput struct { // // * The first character must be a letter. // - // * Cannot be a reserved word for the chosen database engine. + // * Can't be a reserved word for the chosen database engine. // // MySQL // @@ -12853,7 +14349,7 @@ type CreateDBInstanceInput struct { // // * First character must be a letter. // - // * Cannot be a reserved word for the chosen database engine. + // * Can't be a reserved word for the chosen database engine. // // Oracle // @@ -12865,7 +14361,7 @@ type CreateDBInstanceInput struct { // // * First character must be a letter. // - // * Cannot be a reserved word for the chosen database engine. + // * Can't be a reserved word for the chosen database engine. // // PostgreSQL // @@ -12877,7 +14373,7 @@ type CreateDBInstanceInput struct { // // * First character must be a letter. // - // * Cannot be a reserved word for the chosen database engine. + // * Can't be a reserved word for the chosen database engine. MasterUsername *string `type:"string"` // The interval, in seconds, between points when Enhanced Monitoring metrics @@ -12900,8 +14396,9 @@ type CreateDBInstanceInput struct { // a MonitoringRoleArn value. MonitoringRoleArn *string `type:"string"` - // Specifies if the DB instance is a Multi-AZ deployment. You can't set the - // AvailabilityZone parameter if the MultiAZ parameter is set to true. + // A value that specifies whether the DB instance is a Multi-AZ deployment. + // You can't set the AvailabilityZone parameter if the MultiAZ parameter is + // set to true. MultiAZ *bool `type:"boolean"` // Indicates that the DB instance should be associated with the specified option @@ -13084,7 +14581,7 @@ type CreateDBInstanceInput struct { // only by Microsoft SQL Server (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SQLServer.html#SQLServer.Concepts.General.TimeZone). Timezone *string `type:"string"` - // A list of EC2 VPC security groups to associate with this DB instance. + // A list of Amazon EC2 VPC security groups to associate with this DB instance. // // Amazon Aurora // @@ -13202,6 +14699,12 @@ func (s *CreateDBInstanceInput) SetDBSubnetGroupName(v string) *CreateDBInstance return s } +// SetDeletionProtection sets the DeletionProtection field's value. +func (s *CreateDBInstanceInput) SetDeletionProtection(v bool) *CreateDBInstanceInput { + s.DeletionProtection = &v + return s +} + // SetDomain sets the Domain field's value. func (s *CreateDBInstanceInput) SetDomain(v string) *CreateDBInstanceInput { s.Domain = &v @@ -13476,6 +14979,11 @@ type CreateDBInstanceReadReplicaInput struct { // Example: mySubnetgroup DBSubnetGroupName *string `type:"string"` + // Indicates if the DB instance should have deletion protection enabled. The + // database can't be deleted when this value is set to true. The default is + // false. For more information, see Deleting a DB Instance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html). + DeletionProtection *bool `type:"boolean"` + // DestinationRegion is used for presigning the request to a given region. DestinationRegion *string `type:"string"` @@ -13494,7 +15002,7 @@ type CreateDBInstanceReadReplicaInput struct { // // * For MySQL 5.7, minor version 5.7.16 or higher // - // * Aurora 5.6 or higher. + // * Aurora MySQL 5.6 or higher // // Default: false EnableIAMDatabaseAuthentication *bool `type:"boolean"` @@ -13513,9 +15021,6 @@ type CreateDBInstanceReadReplicaInput struct { // Resource Name (ARN), KMS key identifier, or the KMS key alias for the KMS // encryption key. // - // If you specify this parameter when you create a Read Replica from an unencrypted - // DB instance, the Read Replica is encrypted. - // // If you create an encrypted Read Replica in the same AWS Region as the source // DB instance, then you do not have to specify a value for this parameter. // The Read Replica is encrypted with the same KMS key as the source DB instance. @@ -13524,6 +15029,8 @@ type CreateDBInstanceReadReplicaInput struct { // must specify a KMS key for the destination AWS Region. KMS encryption keys // are specific to the AWS Region that they are created in, and you can't use // encryption keys from one AWS Region in another AWS Region. + // + // You can't create an encrypted Read Replica from an unencrypted DB instance. KmsKeyId *string `type:"string"` // The interval, in seconds, between points when Enhanced Monitoring metrics @@ -13637,7 +15144,7 @@ type CreateDBInstanceReadReplicaInput struct { // DB instance. // // * Can specify a DB instance that is a MySQL Read Replica only if the source - // is running MySQL 5.6. + // is running MySQL 5.6 or later. // // * Can specify a DB instance that is a PostgreSQL DB instance only if the // source is running PostgreSQL 9.3.5 or later (9.4.7 and higher for cross-region @@ -13678,6 +15185,11 @@ type CreateDBInstanceReadReplicaInput struct { // A value that specifies that the DB instance class of the DB instance uses // its default processor features. UseDefaultProcessorFeatures *bool `type:"boolean"` + + // A list of EC2 VPC security groups to associate with the Read Replica. + // + // Default: The default EC2 VPC security group for the DB subnet group's VPC. + VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` } // String returns the string representation @@ -13742,6 +15254,12 @@ func (s *CreateDBInstanceReadReplicaInput) SetDBSubnetGroupName(v string) *Creat return s } +// SetDeletionProtection sets the DeletionProtection field's value. +func (s *CreateDBInstanceReadReplicaInput) SetDeletionProtection(v bool) *CreateDBInstanceReadReplicaInput { + s.DeletionProtection = &v + return s +} + // SetDestinationRegion sets the DestinationRegion field's value. func (s *CreateDBInstanceReadReplicaInput) SetDestinationRegion(v string) *CreateDBInstanceReadReplicaInput { s.DestinationRegion = &v @@ -13868,6 +15386,12 @@ func (s *CreateDBInstanceReadReplicaInput) SetUseDefaultProcessorFeatures(v bool return s } +// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. +func (s *CreateDBInstanceReadReplicaInput) SetVpcSecurityGroupIds(v []*string) *CreateDBInstanceReadReplicaInput { + s.VpcSecurityGroupIds = v + return s +} + type CreateDBInstanceReadReplicaOutput struct { _ struct{} `type:"structure"` @@ -13919,7 +15443,7 @@ type CreateDBParameterGroupInput struct { // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens // // This value is stored as a lowercase string. // @@ -14031,7 +15555,7 @@ type CreateDBSecurityGroupInput struct { // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens // // * Must not be "Default" // @@ -14131,13 +15655,13 @@ type CreateDBSnapshotInput struct { // // Constraints: // - // * Cannot be null, empty, or blank + // * Can't be null, empty, or blank // // * Must contain from 1 to 255 letters, numbers, or hyphens // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens // // Example: my-snapshot-id // @@ -14480,71 +16004,175 @@ func (s *CreateEventSubscriptionOutput) SetEventSubscription(v *EventSubscriptio return s } -type CreateOptionGroupInput struct { +type CreateGlobalClusterInput struct { _ struct{} `type:"structure"` - // Specifies the name of the engine that this option group should be associated - // with. - // - // EngineName is a required field - EngineName *string `type:"string" required:"true"` + // The name for your database of up to 64 alpha-numeric characters. If you do + // not provide a name, Amazon Aurora will not create a database in the global + // database cluster you are creating. + DatabaseName *string `type:"string"` - // Specifies the major version of the engine that this option group should be - // associated with. - // - // MajorEngineVersion is a required field - MajorEngineVersion *string `type:"string" required:"true"` + // The deletion protection setting for the new global database. The global database + // can't be deleted when this value is set to true. + DeletionProtection *bool `type:"boolean"` - // The description of the option group. - // - // OptionGroupDescription is a required field - OptionGroupDescription *string `type:"string" required:"true"` + // Provides the name of the database engine to be used for this DB cluster. + Engine *string `type:"string"` - // Specifies the name of the option group to be created. - // - // Constraints: - // - // * Must be 1 to 255 letters, numbers, or hyphens - // - // * First character must be a letter - // - // * Cannot end with a hyphen or contain two consecutive hyphens - // - // Example: myoptiongroup - // - // OptionGroupName is a required field - OptionGroupName *string `type:"string" required:"true"` + // The engine version of the Aurora global database. + EngineVersion *string `type:"string"` - // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) - // in the Amazon RDS User Guide. - Tags []*Tag `locationNameList:"Tag" type:"list"` + // The cluster identifier of the new global database cluster. + GlobalClusterIdentifier *string `type:"string"` + + // The Amazon Resource Name (ARN) to use as the primary cluster of the global + // database. This parameter is optional. + SourceDBClusterIdentifier *string `type:"string"` + + // The storage encryption setting for the new global database cluster. + StorageEncrypted *bool `type:"boolean"` } // String returns the string representation -func (s CreateOptionGroupInput) String() string { +func (s CreateGlobalClusterInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateOptionGroupInput) GoString() string { +func (s CreateGlobalClusterInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateOptionGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateOptionGroupInput"} - if s.EngineName == nil { - invalidParams.Add(request.NewErrParamRequired("EngineName")) - } - if s.MajorEngineVersion == nil { - invalidParams.Add(request.NewErrParamRequired("MajorEngineVersion")) - } - if s.OptionGroupDescription == nil { - invalidParams.Add(request.NewErrParamRequired("OptionGroupDescription")) - } - if s.OptionGroupName == nil { - invalidParams.Add(request.NewErrParamRequired("OptionGroupName")) - } +// SetDatabaseName sets the DatabaseName field's value. +func (s *CreateGlobalClusterInput) SetDatabaseName(v string) *CreateGlobalClusterInput { + s.DatabaseName = &v + return s +} + +// SetDeletionProtection sets the DeletionProtection field's value. +func (s *CreateGlobalClusterInput) SetDeletionProtection(v bool) *CreateGlobalClusterInput { + s.DeletionProtection = &v + return s +} + +// SetEngine sets the Engine field's value. +func (s *CreateGlobalClusterInput) SetEngine(v string) *CreateGlobalClusterInput { + s.Engine = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *CreateGlobalClusterInput) SetEngineVersion(v string) *CreateGlobalClusterInput { + s.EngineVersion = &v + return s +} + +// SetGlobalClusterIdentifier sets the GlobalClusterIdentifier field's value. +func (s *CreateGlobalClusterInput) SetGlobalClusterIdentifier(v string) *CreateGlobalClusterInput { + s.GlobalClusterIdentifier = &v + return s +} + +// SetSourceDBClusterIdentifier sets the SourceDBClusterIdentifier field's value. +func (s *CreateGlobalClusterInput) SetSourceDBClusterIdentifier(v string) *CreateGlobalClusterInput { + s.SourceDBClusterIdentifier = &v + return s +} + +// SetStorageEncrypted sets the StorageEncrypted field's value. +func (s *CreateGlobalClusterInput) SetStorageEncrypted(v bool) *CreateGlobalClusterInput { + s.StorageEncrypted = &v + return s +} + +type CreateGlobalClusterOutput struct { + _ struct{} `type:"structure"` + + // A data type representing an Aurora global database. + GlobalCluster *GlobalCluster `type:"structure"` +} + +// String returns the string representation +func (s CreateGlobalClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateGlobalClusterOutput) GoString() string { + return s.String() +} + +// SetGlobalCluster sets the GlobalCluster field's value. +func (s *CreateGlobalClusterOutput) SetGlobalCluster(v *GlobalCluster) *CreateGlobalClusterOutput { + s.GlobalCluster = v + return s +} + +type CreateOptionGroupInput struct { + _ struct{} `type:"structure"` + + // Specifies the name of the engine that this option group should be associated + // with. + // + // EngineName is a required field + EngineName *string `type:"string" required:"true"` + + // Specifies the major version of the engine that this option group should be + // associated with. + // + // MajorEngineVersion is a required field + MajorEngineVersion *string `type:"string" required:"true"` + + // The description of the option group. + // + // OptionGroupDescription is a required field + OptionGroupDescription *string `type:"string" required:"true"` + + // Specifies the name of the option group to be created. + // + // Constraints: + // + // * Must be 1 to 255 letters, numbers, or hyphens + // + // * First character must be a letter + // + // * Can't end with a hyphen or contain two consecutive hyphens + // + // Example: myoptiongroup + // + // OptionGroupName is a required field + OptionGroupName *string `type:"string" required:"true"` + + // A list of tags. For more information, see Tagging Amazon RDS Resources (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) + // in the Amazon RDS User Guide. + Tags []*Tag `locationNameList:"Tag" type:"list"` +} + +// String returns the string representation +func (s CreateOptionGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateOptionGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateOptionGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateOptionGroupInput"} + if s.EngineName == nil { + invalidParams.Add(request.NewErrParamRequired("EngineName")) + } + if s.MajorEngineVersion == nil { + invalidParams.Add(request.NewErrParamRequired("MajorEngineVersion")) + } + if s.OptionGroupDescription == nil { + invalidParams.Add(request.NewErrParamRequired("OptionGroupDescription")) + } + if s.OptionGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("OptionGroupName")) + } if invalidParams.Len() > 0 { return invalidParams @@ -14604,9 +16232,10 @@ func (s *CreateOptionGroupOutput) SetOptionGroup(v *OptionGroup) *CreateOptionGr return s } -// Contains the details of an Amazon RDS DB cluster. +// Contains the details of an Amazon Aurora DB cluster. // -// This data type is used as a response element in the DescribeDBClusters action. +// This data type is used as a response element in the DescribeDBClusters, StopDBCluster, +// and StartDBCluster actions. type DBCluster struct { _ struct{} `type:"structure"` @@ -14636,6 +16265,12 @@ type DBCluster struct { // Specifies the number of days for which automatic DB snapshots are retained. BackupRetentionPeriod *int64 `type:"integer"` + // The current capacity of an Aurora Serverless DB cluster. The capacity is + // 0 (zero) when the cluster is paused. + // + // For more information about Aurora Serverless, see Using Amazon Aurora Serverless + // (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html) + // in the Amazon Aurora User Guide. Capacity *int64 `type:"integer"` // If present, specifies the name of the character set that this cluster is @@ -14649,6 +16284,9 @@ type DBCluster struct { // Time (UTC). ClusterCreateTime *time.Time `type:"timestamp"` + // Identifies all custom endpoints associated with the cluster. + CustomEndpoints []*string `type:"list"` + // The Amazon Resource Name (ARN) for the DB cluster. DBClusterArn *string `type:"string"` @@ -14679,6 +16317,10 @@ type DBCluster struct { // cluster is accessed. DbClusterResourceId *string `type:"string"` + // Indicates if the DB cluster has deletion protection enabled. The database + // can't be deleted when this value is set to true. + DeletionProtection *bool `type:"boolean"` + // The earliest time to which a DB cluster can be backtracked. EarliestBacktrackTime *time.Time `type:"timestamp"` @@ -14700,7 +16342,8 @@ type DBCluster struct { // Provides the name of the database engine to be used for this DB cluster. Engine *string `type:"string"` - // The DB engine mode of the DB cluster, either provisioned or serverless. + // The DB engine mode of the DB cluster, either provisioned, serverless, or + // parallelquery. EngineMode *string `type:"string"` // Indicates the database engine version. @@ -14709,6 +16352,21 @@ type DBCluster struct { // Specifies the ID that Amazon Route 53 assigns when you create a hosted zone. HostedZoneId *string `type:"string"` + // HTTP endpoint functionality is in beta for Aurora Serverless and is subject + // to change. + // + // Value that is true if the HTTP endpoint for an Aurora Serverless DB cluster + // is enabled and false otherwise. + // + // When enabled, the HTTP endpoint provides a connectionless web service API + // for running SQL queries on the Aurora Serverless DB cluster. You can also + // query your database from inside the RDS console with the query editor. + // + // For more information about Aurora Serverless, see Using Amazon Aurora Serverless + // (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html) + // in the Amazon Aurora User Guide. + HttpEndpointEnabled *bool `type:"boolean"` + // True if mapping of AWS Identity and Access Management (IAM) accounts to database // accounts is enabled, and otherwise false. IAMDatabaseAuthenticationEnabled *bool `type:"boolean"` @@ -14849,6 +16507,12 @@ func (s *DBCluster) SetClusterCreateTime(v time.Time) *DBCluster { return s } +// SetCustomEndpoints sets the CustomEndpoints field's value. +func (s *DBCluster) SetCustomEndpoints(v []*string) *DBCluster { + s.CustomEndpoints = v + return s +} + // SetDBClusterArn sets the DBClusterArn field's value. func (s *DBCluster) SetDBClusterArn(v string) *DBCluster { s.DBClusterArn = &v @@ -14897,6 +16561,12 @@ func (s *DBCluster) SetDbClusterResourceId(v string) *DBCluster { return s } +// SetDeletionProtection sets the DeletionProtection field's value. +func (s *DBCluster) SetDeletionProtection(v bool) *DBCluster { + s.DeletionProtection = &v + return s +} + // SetEarliestBacktrackTime sets the EarliestBacktrackTime field's value. func (s *DBCluster) SetEarliestBacktrackTime(v time.Time) *DBCluster { s.EarliestBacktrackTime = &v @@ -14945,6 +16615,12 @@ func (s *DBCluster) SetHostedZoneId(v string) *DBCluster { return s } +// SetHttpEndpointEnabled sets the HttpEndpointEnabled field's value. +func (s *DBCluster) SetHttpEndpointEnabled(v bool) *DBCluster { + s.HttpEndpointEnabled = &v + return s +} + // SetIAMDatabaseAuthenticationEnabled sets the IAMDatabaseAuthenticationEnabled field's value. func (s *DBCluster) SetIAMDatabaseAuthenticationEnabled(v bool) *DBCluster { s.IAMDatabaseAuthenticationEnabled = &v @@ -15041,6 +16717,130 @@ func (s *DBCluster) SetVpcSecurityGroups(v []*VpcSecurityGroupMembership) *DBClu return s } +// This data type represents the information you need to connect to an Amazon +// Aurora DB cluster. This data type is used as a response element in the following +// actions: +// +// * CreateDBClusterEndpoint +// +// * DescribeDBClusterEndpoints +// +// * ModifyDBClusterEndpoint +// +// * DeleteDBClusterEndpoint +// +// For the data structure that represents Amazon RDS DB instance endpoints, +// see Endpoint. +type DBClusterEndpoint struct { + _ struct{} `type:"structure"` + + // The type associated with a custom endpoint. One of: READER, ANY. + CustomEndpointType *string `type:"string"` + + // The Amazon Resource Name (ARN) for the endpoint. + DBClusterEndpointArn *string `type:"string"` + + // The identifier associated with the endpoint. This parameter is stored as + // a lowercase string. + DBClusterEndpointIdentifier *string `type:"string"` + + // A unique system-generated identifier for an endpoint. It remains the same + // for the whole life of the endpoint. + DBClusterEndpointResourceIdentifier *string `type:"string"` + + // The DB cluster identifier of the DB cluster associated with the endpoint. + // This parameter is stored as a lowercase string. + DBClusterIdentifier *string `type:"string"` + + // The DNS address of the endpoint. + Endpoint *string `type:"string"` + + // The type of the endpoint. One of: READER, WRITER, CUSTOM. + EndpointType *string `type:"string"` + + // List of DB instance identifiers that aren't part of the custom endpoint group. + // All other eligible instances are reachable through the custom endpoint. Only + // relevant if the list of static members is empty. + ExcludedMembers []*string `type:"list"` + + // List of DB instance identifiers that are part of the custom endpoint group. + StaticMembers []*string `type:"list"` + + // The current status of the endpoint. One of: creating, available, deleting, + // modifying. + Status *string `type:"string"` +} + +// String returns the string representation +func (s DBClusterEndpoint) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DBClusterEndpoint) GoString() string { + return s.String() +} + +// SetCustomEndpointType sets the CustomEndpointType field's value. +func (s *DBClusterEndpoint) SetCustomEndpointType(v string) *DBClusterEndpoint { + s.CustomEndpointType = &v + return s +} + +// SetDBClusterEndpointArn sets the DBClusterEndpointArn field's value. +func (s *DBClusterEndpoint) SetDBClusterEndpointArn(v string) *DBClusterEndpoint { + s.DBClusterEndpointArn = &v + return s +} + +// SetDBClusterEndpointIdentifier sets the DBClusterEndpointIdentifier field's value. +func (s *DBClusterEndpoint) SetDBClusterEndpointIdentifier(v string) *DBClusterEndpoint { + s.DBClusterEndpointIdentifier = &v + return s +} + +// SetDBClusterEndpointResourceIdentifier sets the DBClusterEndpointResourceIdentifier field's value. +func (s *DBClusterEndpoint) SetDBClusterEndpointResourceIdentifier(v string) *DBClusterEndpoint { + s.DBClusterEndpointResourceIdentifier = &v + return s +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *DBClusterEndpoint) SetDBClusterIdentifier(v string) *DBClusterEndpoint { + s.DBClusterIdentifier = &v + return s +} + +// SetEndpoint sets the Endpoint field's value. +func (s *DBClusterEndpoint) SetEndpoint(v string) *DBClusterEndpoint { + s.Endpoint = &v + return s +} + +// SetEndpointType sets the EndpointType field's value. +func (s *DBClusterEndpoint) SetEndpointType(v string) *DBClusterEndpoint { + s.EndpointType = &v + return s +} + +// SetExcludedMembers sets the ExcludedMembers field's value. +func (s *DBClusterEndpoint) SetExcludedMembers(v []*string) *DBClusterEndpoint { + s.ExcludedMembers = v + return s +} + +// SetStaticMembers sets the StaticMembers field's value. +func (s *DBClusterEndpoint) SetStaticMembers(v []*string) *DBClusterEndpoint { + s.StaticMembers = v + return s +} + +// SetStatus sets the Status field's value. +func (s *DBClusterEndpoint) SetStatus(v string) *DBClusterEndpoint { + s.Status = &v + return s +} + // Contains information about an instance that is part of a DB cluster. type DBClusterMember struct { _ struct{} `type:"structure"` @@ -15197,7 +16997,7 @@ type DBClusterParameterGroupNameMessage struct { // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens // // This value is stored as a lowercase string. DBClusterParameterGroupName *string `type:"string"` @@ -15788,6 +17588,11 @@ type DBInstance struct { // instance is accessed. DbiResourceId *string `type:"string"` + // Indicates if the DB instance has deletion protection enabled. The database + // can't be deleted when this value is set to true. For more information, see + // Deleting a DB Instance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html). + DeletionProtection *bool `type:"boolean"` + // The Active Directory Domain membership records associated with the DB instance. DomainMemberships []*DomainMembership `locationNameList:"DomainMembership" type:"list"` @@ -15842,6 +17647,9 @@ type DBInstance struct { // License model information for this DB instance. LicenseModel *string `type:"string"` + // Specifies the listener connection endpoint for SQL Server Always On. + ListenerEndpoint *Endpoint `type:"structure"` + // Contains the master username for the DB instance. MasterUsername *string `type:"string"` @@ -15905,6 +17713,8 @@ type DBInstance struct { // Aurora Read Replica of an RDS MySQL DB instance, the Aurora MySQL DB cluster // for the Aurora Read Replica is shown. This output does not contain information // about cross region Aurora Read Replicas. + // + // Currently, each RDS DB instance can have only one Aurora Read Replica. ReadReplicaDBClusterIdentifiers []*string `locationNameList:"ReadReplicaDBClusterIdentifier" type:"list"` // Contains one or more identifiers of the Read Replicas associated with this @@ -16061,6 +17871,12 @@ func (s *DBInstance) SetDbiResourceId(v string) *DBInstance { return s } +// SetDeletionProtection sets the DeletionProtection field's value. +func (s *DBInstance) SetDeletionProtection(v bool) *DBInstance { + s.DeletionProtection = &v + return s +} + // SetDomainMemberships sets the DomainMemberships field's value. func (s *DBInstance) SetDomainMemberships(v []*DomainMembership) *DBInstance { s.DomainMemberships = v @@ -16133,6 +17949,12 @@ func (s *DBInstance) SetLicenseModel(v string) *DBInstance { return s } +// SetListenerEndpoint sets the ListenerEndpoint field's value. +func (s *DBInstance) SetListenerEndpoint(v *Endpoint) *DBInstance { + s.ListenerEndpoint = v + return s +} + // SetMasterUsername sets the MasterUsername field's value. func (s *DBInstance) SetMasterUsername(v string) *DBInstance { s.MasterUsername = &v @@ -16277,57 +18099,303 @@ func (s *DBInstance) SetVpcSecurityGroups(v []*VpcSecurityGroupMembership) *DBIn return s } -// Provides a list of status information for a DB instance. -type DBInstanceStatusInfo struct { +// An automated backup of a DB instance. It it consists of system backups, transaction +// logs, and the database instance properties that existed at the time you deleted +// the source instance. +type DBInstanceAutomatedBackup struct { _ struct{} `type:"structure"` - // Details of the error if there is an error for the instance. If the instance - // is not in an error state, this value is blank. - Message *string `type:"string"` + // Specifies the allocated storage size in gibibytes (GiB). + AllocatedStorage *int64 `type:"integer"` - // Boolean value that is true if the instance is operating normally, or false - // if the instance is in an error state. - Normal *bool `type:"boolean"` + // The Availability Zone that the automated backup was created in. For information + // on AWS Regions and Availability Zones, see Regions and Availability Zones + // (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html). + AvailabilityZone *string `type:"string"` - // Status of the DB instance. For a StatusType of read replica, the values can - // be replicating, replication stop point set, replication stop point reached, - // error, stopped, or terminated. - Status *string `type:"string"` + // The Amazon Resource Name (ARN) for the automated backup. + DBInstanceArn *string `type:"string"` - // This value is currently "read replication." - StatusType *string `type:"string"` -} + // The customer id of the instance that is/was associated with the automated + // backup. + DBInstanceIdentifier *string `type:"string"` -// String returns the string representation -func (s DBInstanceStatusInfo) String() string { - return awsutil.Prettify(s) -} + // The identifier for the source DB instance, which can't be changed and which + // is unique to an AWS Region. + DbiResourceId *string `type:"string"` -// GoString returns the string representation -func (s DBInstanceStatusInfo) GoString() string { - return s.String() -} + // Specifies whether the automated backup is encrypted. + Encrypted *bool `type:"boolean"` -// SetMessage sets the Message field's value. -func (s *DBInstanceStatusInfo) SetMessage(v string) *DBInstanceStatusInfo { - s.Message = &v - return s -} + // The name of the database engine for this automated backup. + Engine *string `type:"string"` -// SetNormal sets the Normal field's value. -func (s *DBInstanceStatusInfo) SetNormal(v bool) *DBInstanceStatusInfo { - s.Normal = &v - return s -} + // The version of the database engine for the automated backup. + EngineVersion *string `type:"string"` -// SetStatus sets the Status field's value. -func (s *DBInstanceStatusInfo) SetStatus(v string) *DBInstanceStatusInfo { - s.Status = &v - return s -} + // True if mapping of AWS Identity and Access Management (IAM) accounts to database + // accounts is enabled, and otherwise false. + IAMDatabaseAuthenticationEnabled *bool `type:"boolean"` -// SetStatusType sets the StatusType field's value. -func (s *DBInstanceStatusInfo) SetStatusType(v string) *DBInstanceStatusInfo { + // Provides the date and time that the DB instance was created. + InstanceCreateTime *time.Time `type:"timestamp"` + + // The IOPS (I/O operations per second) value for the automated backup. + Iops *int64 `type:"integer"` + + // The AWS KMS key ID for an automated backup. The KMS key ID is the Amazon + // Resource Name (ARN), KMS key identifier, or the KMS key alias for the KMS + // encryption key. + KmsKeyId *string `type:"string"` + + // License model information for the automated backup. + LicenseModel *string `type:"string"` + + // The license model of an automated backup. + MasterUsername *string `type:"string"` + + // The option group the automated backup is associated with. If omitted, the + // default option group for the engine specified is used. + OptionGroupName *string `type:"string"` + + // The port number that the automated backup used for connections. + // + // Default: Inherits from the source DB instance + // + // Valid Values: 1150-65535 + Port *int64 `type:"integer"` + + // The AWS Region associated with the automated backup. + Region *string `type:"string"` + + // Earliest and latest time an instance can be restored to. + RestoreWindow *RestoreWindow `type:"structure"` + + // Provides a list of status information for an automated backup: + // + // * active - automated backups for current instances + // + // * retained - automated backups for deleted instances + // + // * creating - automated backups that are waiting for the first automated + // snapshot to be available. + Status *string `type:"string"` + + // Specifies the storage type associated with the automated backup. + StorageType *string `type:"string"` + + // The ARN from the key store with which the automated backup is associated + // for TDE encryption. + TdeCredentialArn *string `type:"string"` + + // The time zone of the automated backup. In most cases, the Timezone element + // is empty. Timezone content appears only for Microsoft SQL Server DB instances + // that were created with a time zone specified. + Timezone *string `type:"string"` + + // Provides the VPC ID associated with the DB instance + VpcId *string `type:"string"` +} + +// String returns the string representation +func (s DBInstanceAutomatedBackup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DBInstanceAutomatedBackup) GoString() string { + return s.String() +} + +// SetAllocatedStorage sets the AllocatedStorage field's value. +func (s *DBInstanceAutomatedBackup) SetAllocatedStorage(v int64) *DBInstanceAutomatedBackup { + s.AllocatedStorage = &v + return s +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *DBInstanceAutomatedBackup) SetAvailabilityZone(v string) *DBInstanceAutomatedBackup { + s.AvailabilityZone = &v + return s +} + +// SetDBInstanceArn sets the DBInstanceArn field's value. +func (s *DBInstanceAutomatedBackup) SetDBInstanceArn(v string) *DBInstanceAutomatedBackup { + s.DBInstanceArn = &v + return s +} + +// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. +func (s *DBInstanceAutomatedBackup) SetDBInstanceIdentifier(v string) *DBInstanceAutomatedBackup { + s.DBInstanceIdentifier = &v + return s +} + +// SetDbiResourceId sets the DbiResourceId field's value. +func (s *DBInstanceAutomatedBackup) SetDbiResourceId(v string) *DBInstanceAutomatedBackup { + s.DbiResourceId = &v + return s +} + +// SetEncrypted sets the Encrypted field's value. +func (s *DBInstanceAutomatedBackup) SetEncrypted(v bool) *DBInstanceAutomatedBackup { + s.Encrypted = &v + return s +} + +// SetEngine sets the Engine field's value. +func (s *DBInstanceAutomatedBackup) SetEngine(v string) *DBInstanceAutomatedBackup { + s.Engine = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *DBInstanceAutomatedBackup) SetEngineVersion(v string) *DBInstanceAutomatedBackup { + s.EngineVersion = &v + return s +} + +// SetIAMDatabaseAuthenticationEnabled sets the IAMDatabaseAuthenticationEnabled field's value. +func (s *DBInstanceAutomatedBackup) SetIAMDatabaseAuthenticationEnabled(v bool) *DBInstanceAutomatedBackup { + s.IAMDatabaseAuthenticationEnabled = &v + return s +} + +// SetInstanceCreateTime sets the InstanceCreateTime field's value. +func (s *DBInstanceAutomatedBackup) SetInstanceCreateTime(v time.Time) *DBInstanceAutomatedBackup { + s.InstanceCreateTime = &v + return s +} + +// SetIops sets the Iops field's value. +func (s *DBInstanceAutomatedBackup) SetIops(v int64) *DBInstanceAutomatedBackup { + s.Iops = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *DBInstanceAutomatedBackup) SetKmsKeyId(v string) *DBInstanceAutomatedBackup { + s.KmsKeyId = &v + return s +} + +// SetLicenseModel sets the LicenseModel field's value. +func (s *DBInstanceAutomatedBackup) SetLicenseModel(v string) *DBInstanceAutomatedBackup { + s.LicenseModel = &v + return s +} + +// SetMasterUsername sets the MasterUsername field's value. +func (s *DBInstanceAutomatedBackup) SetMasterUsername(v string) *DBInstanceAutomatedBackup { + s.MasterUsername = &v + return s +} + +// SetOptionGroupName sets the OptionGroupName field's value. +func (s *DBInstanceAutomatedBackup) SetOptionGroupName(v string) *DBInstanceAutomatedBackup { + s.OptionGroupName = &v + return s +} + +// SetPort sets the Port field's value. +func (s *DBInstanceAutomatedBackup) SetPort(v int64) *DBInstanceAutomatedBackup { + s.Port = &v + return s +} + +// SetRegion sets the Region field's value. +func (s *DBInstanceAutomatedBackup) SetRegion(v string) *DBInstanceAutomatedBackup { + s.Region = &v + return s +} + +// SetRestoreWindow sets the RestoreWindow field's value. +func (s *DBInstanceAutomatedBackup) SetRestoreWindow(v *RestoreWindow) *DBInstanceAutomatedBackup { + s.RestoreWindow = v + return s +} + +// SetStatus sets the Status field's value. +func (s *DBInstanceAutomatedBackup) SetStatus(v string) *DBInstanceAutomatedBackup { + s.Status = &v + return s +} + +// SetStorageType sets the StorageType field's value. +func (s *DBInstanceAutomatedBackup) SetStorageType(v string) *DBInstanceAutomatedBackup { + s.StorageType = &v + return s +} + +// SetTdeCredentialArn sets the TdeCredentialArn field's value. +func (s *DBInstanceAutomatedBackup) SetTdeCredentialArn(v string) *DBInstanceAutomatedBackup { + s.TdeCredentialArn = &v + return s +} + +// SetTimezone sets the Timezone field's value. +func (s *DBInstanceAutomatedBackup) SetTimezone(v string) *DBInstanceAutomatedBackup { + s.Timezone = &v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *DBInstanceAutomatedBackup) SetVpcId(v string) *DBInstanceAutomatedBackup { + s.VpcId = &v + return s +} + +// Provides a list of status information for a DB instance. +type DBInstanceStatusInfo struct { + _ struct{} `type:"structure"` + + // Details of the error if there is an error for the instance. If the instance + // is not in an error state, this value is blank. + Message *string `type:"string"` + + // Boolean value that is true if the instance is operating normally, or false + // if the instance is in an error state. + Normal *bool `type:"boolean"` + + // Status of the DB instance. For a StatusType of read replica, the values can + // be replicating, replication stop point set, replication stop point reached, + // error, stopped, or terminated. + Status *string `type:"string"` + + // This value is currently "read replication." + StatusType *string `type:"string"` +} + +// String returns the string representation +func (s DBInstanceStatusInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DBInstanceStatusInfo) GoString() string { + return s.String() +} + +// SetMessage sets the Message field's value. +func (s *DBInstanceStatusInfo) SetMessage(v string) *DBInstanceStatusInfo { + s.Message = &v + return s +} + +// SetNormal sets the Normal field's value. +func (s *DBInstanceStatusInfo) SetNormal(v bool) *DBInstanceStatusInfo { + s.Normal = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *DBInstanceStatusInfo) SetStatus(v string) *DBInstanceStatusInfo { + s.Status = &v + return s +} + +// SetStatusType sets the StatusType field's value. +func (s *DBInstanceStatusInfo) SetStatusType(v string) *DBInstanceStatusInfo { s.StatusType = &v return s } @@ -16604,6 +18672,10 @@ type DBSnapshot struct { // Specifies the identifier for the DB snapshot. DBSnapshotIdentifier *string `type:"string"` + // The identifier for the source DB instance, which can't be changed and which + // is unique to an AWS Region. + DbiResourceId *string `type:"string"` + // Specifies whether the DB snapshot is encrypted. Encrypted *bool `type:"boolean"` @@ -16720,6 +18792,12 @@ func (s *DBSnapshot) SetDBSnapshotIdentifier(v string) *DBSnapshot { return s } +// SetDbiResourceId sets the DbiResourceId field's value. +func (s *DBSnapshot) SetDbiResourceId(v string) *DBSnapshot { + s.DbiResourceId = &v + return s +} + // SetEncrypted sets the Encrypted field's value. func (s *DBSnapshot) SetEncrypted(v bool) *DBSnapshot { s.Encrypted = &v @@ -17008,6 +19086,169 @@ func (s *DBSubnetGroup) SetVpcId(v string) *DBSubnetGroup { return s } +type DeleteDBClusterEndpointInput struct { + _ struct{} `type:"structure"` + + // The identifier associated with the custom endpoint. This parameter is stored + // as a lowercase string. + // + // DBClusterEndpointIdentifier is a required field + DBClusterEndpointIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDBClusterEndpointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDBClusterEndpointInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDBClusterEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDBClusterEndpointInput"} + if s.DBClusterEndpointIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterEndpointIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterEndpointIdentifier sets the DBClusterEndpointIdentifier field's value. +func (s *DeleteDBClusterEndpointInput) SetDBClusterEndpointIdentifier(v string) *DeleteDBClusterEndpointInput { + s.DBClusterEndpointIdentifier = &v + return s +} + +// This data type represents the information you need to connect to an Amazon +// Aurora DB cluster. This data type is used as a response element in the following +// actions: +// +// * CreateDBClusterEndpoint +// +// * DescribeDBClusterEndpoints +// +// * ModifyDBClusterEndpoint +// +// * DeleteDBClusterEndpoint +// +// For the data structure that represents Amazon RDS DB instance endpoints, +// see Endpoint. +type DeleteDBClusterEndpointOutput struct { + _ struct{} `type:"structure"` + + // The type associated with a custom endpoint. One of: READER, ANY. + CustomEndpointType *string `type:"string"` + + // The Amazon Resource Name (ARN) for the endpoint. + DBClusterEndpointArn *string `type:"string"` + + // The identifier associated with the endpoint. This parameter is stored as + // a lowercase string. + DBClusterEndpointIdentifier *string `type:"string"` + + // A unique system-generated identifier for an endpoint. It remains the same + // for the whole life of the endpoint. + DBClusterEndpointResourceIdentifier *string `type:"string"` + + // The DB cluster identifier of the DB cluster associated with the endpoint. + // This parameter is stored as a lowercase string. + DBClusterIdentifier *string `type:"string"` + + // The DNS address of the endpoint. + Endpoint *string `type:"string"` + + // The type of the endpoint. One of: READER, WRITER, CUSTOM. + EndpointType *string `type:"string"` + + // List of DB instance identifiers that aren't part of the custom endpoint group. + // All other eligible instances are reachable through the custom endpoint. Only + // relevant if the list of static members is empty. + ExcludedMembers []*string `type:"list"` + + // List of DB instance identifiers that are part of the custom endpoint group. + StaticMembers []*string `type:"list"` + + // The current status of the endpoint. One of: creating, available, deleting, + // modifying. + Status *string `type:"string"` +} + +// String returns the string representation +func (s DeleteDBClusterEndpointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDBClusterEndpointOutput) GoString() string { + return s.String() +} + +// SetCustomEndpointType sets the CustomEndpointType field's value. +func (s *DeleteDBClusterEndpointOutput) SetCustomEndpointType(v string) *DeleteDBClusterEndpointOutput { + s.CustomEndpointType = &v + return s +} + +// SetDBClusterEndpointArn sets the DBClusterEndpointArn field's value. +func (s *DeleteDBClusterEndpointOutput) SetDBClusterEndpointArn(v string) *DeleteDBClusterEndpointOutput { + s.DBClusterEndpointArn = &v + return s +} + +// SetDBClusterEndpointIdentifier sets the DBClusterEndpointIdentifier field's value. +func (s *DeleteDBClusterEndpointOutput) SetDBClusterEndpointIdentifier(v string) *DeleteDBClusterEndpointOutput { + s.DBClusterEndpointIdentifier = &v + return s +} + +// SetDBClusterEndpointResourceIdentifier sets the DBClusterEndpointResourceIdentifier field's value. +func (s *DeleteDBClusterEndpointOutput) SetDBClusterEndpointResourceIdentifier(v string) *DeleteDBClusterEndpointOutput { + s.DBClusterEndpointResourceIdentifier = &v + return s +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *DeleteDBClusterEndpointOutput) SetDBClusterIdentifier(v string) *DeleteDBClusterEndpointOutput { + s.DBClusterIdentifier = &v + return s +} + +// SetEndpoint sets the Endpoint field's value. +func (s *DeleteDBClusterEndpointOutput) SetEndpoint(v string) *DeleteDBClusterEndpointOutput { + s.Endpoint = &v + return s +} + +// SetEndpointType sets the EndpointType field's value. +func (s *DeleteDBClusterEndpointOutput) SetEndpointType(v string) *DeleteDBClusterEndpointOutput { + s.EndpointType = &v + return s +} + +// SetExcludedMembers sets the ExcludedMembers field's value. +func (s *DeleteDBClusterEndpointOutput) SetExcludedMembers(v []*string) *DeleteDBClusterEndpointOutput { + s.ExcludedMembers = v + return s +} + +// SetStaticMembers sets the StaticMembers field's value. +func (s *DeleteDBClusterEndpointOutput) SetStaticMembers(v []*string) *DeleteDBClusterEndpointOutput { + s.StaticMembers = v + return s +} + +// SetStatus sets the Status field's value. +func (s *DeleteDBClusterEndpointOutput) SetStatus(v string) *DeleteDBClusterEndpointOutput { + s.Status = &v + return s +} + type DeleteDBClusterInput struct { _ struct{} `type:"structure"` @@ -17033,7 +19274,7 @@ type DeleteDBClusterInput struct { // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens FinalDBSnapshotIdentifier *string `type:"string"` // Determines whether a final DB cluster snapshot is created before the DB cluster @@ -17091,9 +19332,10 @@ func (s *DeleteDBClusterInput) SetSkipFinalSnapshot(v bool) *DeleteDBClusterInpu type DeleteDBClusterOutput struct { _ struct{} `type:"structure"` - // Contains the details of an Amazon RDS DB cluster. + // Contains the details of an Amazon Aurora DB cluster. // - // This data type is used as a response element in the DescribeDBClusters action. + // This data type is used as a response element in the DescribeDBClusters, StopDBCluster, + // and StartDBCluster actions. DBCluster *DBCluster `type:"structure"` } @@ -17124,7 +19366,7 @@ type DeleteDBClusterParameterGroupInput struct { // // * You can't delete a default DB cluster parameter group. // - // * Cannot be associated with any DB clusters. + // * Can't be associated with any DB clusters. // // DBClusterParameterGroupName is a required field DBClusterParameterGroupName *string `type:"string" required:"true"` @@ -17240,6 +19482,71 @@ func (s *DeleteDBClusterSnapshotOutput) SetDBClusterSnapshot(v *DBClusterSnapsho return s } +// Parameter input for the DeleteDBInstanceAutomatedBackup operation. +type DeleteDBInstanceAutomatedBackupInput struct { + _ struct{} `type:"structure"` + + // The identifier for the source DB instance, which can't be changed and which + // is unique to an AWS Region. + // + // DbiResourceId is a required field + DbiResourceId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteDBInstanceAutomatedBackupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDBInstanceAutomatedBackupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteDBInstanceAutomatedBackupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteDBInstanceAutomatedBackupInput"} + if s.DbiResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("DbiResourceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDbiResourceId sets the DbiResourceId field's value. +func (s *DeleteDBInstanceAutomatedBackupInput) SetDbiResourceId(v string) *DeleteDBInstanceAutomatedBackupInput { + s.DbiResourceId = &v + return s +} + +type DeleteDBInstanceAutomatedBackupOutput struct { + _ struct{} `type:"structure"` + + // An automated backup of a DB instance. It it consists of system backups, transaction + // logs, and the database instance properties that existed at the time you deleted + // the source instance. + DBInstanceAutomatedBackup *DBInstanceAutomatedBackup `type:"structure"` +} + +// String returns the string representation +func (s DeleteDBInstanceAutomatedBackupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteDBInstanceAutomatedBackupOutput) GoString() string { + return s.String() +} + +// SetDBInstanceAutomatedBackup sets the DBInstanceAutomatedBackup field's value. +func (s *DeleteDBInstanceAutomatedBackupOutput) SetDBInstanceAutomatedBackup(v *DBInstanceAutomatedBackup) *DeleteDBInstanceAutomatedBackupOutput { + s.DBInstanceAutomatedBackup = v + return s +} + type DeleteDBInstanceInput struct { _ struct{} `type:"structure"` @@ -17253,7 +19560,12 @@ type DeleteDBInstanceInput struct { // DBInstanceIdentifier is a required field DBInstanceIdentifier *string `type:"string" required:"true"` - // The DBSnapshotIdentifier of the new DBSnapshot created when SkipFinalSnapshot + // A value that indicates whether to remove automated backups immediately after + // the DB instance is deleted. This parameter isn't case-sensitive. This parameter + // defaults to true. + DeleteAutomatedBackups *bool `type:"boolean"` + + // The DBSnapshotIdentifier of the new DB snapshot created when SkipFinalSnapshot // is set to false. // // Specifying this parameter and also setting the SkipFinalShapshot parameter @@ -17263,20 +19575,21 @@ type DeleteDBInstanceInput struct { // // * Must be 1 to 255 letters or numbers. // - // * First character must be a letter + // * First character must be a letter. // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens. // - // * Cannot be specified when deleting a Read Replica. + // * Can't be specified when deleting a Read Replica. FinalDBSnapshotIdentifier *string `type:"string"` - // Determines whether a final DB snapshot is created before the DB instance - // is deleted. If true is specified, no DBSnapshot is created. If false is specified, - // a DB snapshot is created before the DB instance is deleted. + // A value that indicates whether a final DB snapshot is created before the + // DB instance is deleted. If true is specified, no DB snapshot is created. + // If false is specified, a DB snapshot is created before the DB instance is + // deleted. // - // Note that when a DB instance is in a failure state and has a status of 'failed', - // 'incompatible-restore', or 'incompatible-network', it can only be deleted - // when the SkipFinalSnapshot parameter is set to "true". + // When a DB instance is in a failure state and has a status of failed, incompatible-restore, + // or incompatible-network, you can only delete it when the SkipFinalSnapshot + // parameter is set to true. // // Specify true when deleting a Read Replica. // @@ -17316,6 +19629,12 @@ func (s *DeleteDBInstanceInput) SetDBInstanceIdentifier(v string) *DeleteDBInsta return s } +// SetDeleteAutomatedBackups sets the DeleteAutomatedBackups field's value. +func (s *DeleteDBInstanceInput) SetDeleteAutomatedBackups(v bool) *DeleteDBInstanceInput { + s.DeleteAutomatedBackups = &v + return s +} + // SetFinalDBSnapshotIdentifier sets the FinalDBSnapshotIdentifier field's value. func (s *DeleteDBInstanceInput) SetFinalDBSnapshotIdentifier(v string) *DeleteDBInstanceInput { s.FinalDBSnapshotIdentifier = &v @@ -17364,7 +19683,7 @@ type DeleteDBParameterGroupInput struct { // // * You can't delete a default DB parameter group // - // * Cannot be associated with any DB instances + // * Can't be associated with any DB instances // // DBParameterGroupName is a required field DBParameterGroupName *string `type:"string" required:"true"` @@ -17426,7 +19745,7 @@ type DeleteDBSecurityGroupInput struct { // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens // // * Must not be "Default" // @@ -17480,7 +19799,7 @@ func (s DeleteDBSecurityGroupOutput) GoString() string { type DeleteDBSnapshotInput struct { _ struct{} `type:"structure"` - // The DBSnapshot identifier. + // The DB snapshot identifier. // // Constraints: Must be the name of an existing DB snapshot in the available // state. @@ -17666,6 +19985,67 @@ func (s *DeleteEventSubscriptionOutput) SetEventSubscription(v *EventSubscriptio return s } +type DeleteGlobalClusterInput struct { + _ struct{} `type:"structure"` + + // The cluster identifier of the global database cluster being deleted. + // + // GlobalClusterIdentifier is a required field + GlobalClusterIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteGlobalClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteGlobalClusterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteGlobalClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteGlobalClusterInput"} + if s.GlobalClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("GlobalClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGlobalClusterIdentifier sets the GlobalClusterIdentifier field's value. +func (s *DeleteGlobalClusterInput) SetGlobalClusterIdentifier(v string) *DeleteGlobalClusterInput { + s.GlobalClusterIdentifier = &v + return s +} + +type DeleteGlobalClusterOutput struct { + _ struct{} `type:"structure"` + + // A data type representing an Aurora global database. + GlobalCluster *GlobalCluster `type:"structure"` +} + +// String returns the string representation +func (s DeleteGlobalClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteGlobalClusterOutput) GoString() string { + return s.String() +} + +// SetGlobalCluster sets the GlobalCluster field's value. +func (s *DeleteGlobalClusterOutput) SetGlobalCluster(v *GlobalCluster) *DeleteGlobalClusterOutput { + s.GlobalCluster = v + return s +} + type DeleteOptionGroupInput struct { _ struct{} `type:"structure"` @@ -17902,7 +20282,7 @@ type DescribeDBClusterBacktracksInput struct { // // * First character must be a letter. // - // * Cannot end with a hyphen or contain two consecutive hyphens. + // * Can't end with a hyphen or contain two consecutive hyphens. // // Example: my-cluster1 // @@ -18045,6 +20425,136 @@ func (s *DescribeDBClusterBacktracksOutput) SetMarker(v string) *DescribeDBClust return s } +type DescribeDBClusterEndpointsInput struct { + _ struct{} `type:"structure"` + + // The identifier of the endpoint to describe. This parameter is stored as a + // lowercase string. + DBClusterEndpointIdentifier *string `type:"string"` + + // The DB cluster identifier of the DB cluster associated with the endpoint. + // This parameter is stored as a lowercase string. + DBClusterIdentifier *string `type:"string"` + + // A set of name-value pairs that define which endpoints to include in the output. + // The filters are specified as name-value pairs, in the format Name=endpoint_type,Values=endpoint_type1,endpoint_type2,.... + // Name can be one of: db-cluster-endpoint-type, db-cluster-endpoint-custom-type, + // db-cluster-endpoint-id, db-cluster-endpoint-status. Values for the db-cluster-endpoint-type + // filter can be one or more of: reader, writer, custom. Values for the db-cluster-endpoint-custom-type + // filter can be one or more of: reader, any. Values for the db-cluster-endpoint-status + // filter can be one or more of: available, creating, deleting, modifying. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // An optional pagination token provided by a previous DescribeDBClusterEndpoints + // request. If this parameter is specified, the response includes only records + // beyond the marker, up to the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token called a marker + // is included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` +} + +// String returns the string representation +func (s DescribeDBClusterEndpointsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBClusterEndpointsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBClusterEndpointsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBClusterEndpointsInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterEndpointIdentifier sets the DBClusterEndpointIdentifier field's value. +func (s *DescribeDBClusterEndpointsInput) SetDBClusterEndpointIdentifier(v string) *DescribeDBClusterEndpointsInput { + s.DBClusterEndpointIdentifier = &v + return s +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *DescribeDBClusterEndpointsInput) SetDBClusterIdentifier(v string) *DescribeDBClusterEndpointsInput { + s.DBClusterIdentifier = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeDBClusterEndpointsInput) SetFilters(v []*Filter) *DescribeDBClusterEndpointsInput { + s.Filters = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBClusterEndpointsInput) SetMarker(v string) *DescribeDBClusterEndpointsInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeDBClusterEndpointsInput) SetMaxRecords(v int64) *DescribeDBClusterEndpointsInput { + s.MaxRecords = &v + return s +} + +type DescribeDBClusterEndpointsOutput struct { + _ struct{} `type:"structure"` + + // Contains the details of the endpoints associated with the cluster and matching + // any filter conditions. + DBClusterEndpoints []*DBClusterEndpoint `locationNameList:"DBClusterEndpointList" type:"list"` + + // An optional pagination token provided by a previous DescribeDBClusterEndpoints + // request. If this parameter is specified, the response includes only records + // beyond the marker, up to the value specified by MaxRecords. + Marker *string `type:"string"` +} + +// String returns the string representation +func (s DescribeDBClusterEndpointsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBClusterEndpointsOutput) GoString() string { + return s.String() +} + +// SetDBClusterEndpoints sets the DBClusterEndpoints field's value. +func (s *DescribeDBClusterEndpointsOutput) SetDBClusterEndpoints(v []*DBClusterEndpoint) *DescribeDBClusterEndpointsOutput { + s.DBClusterEndpoints = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBClusterEndpointsOutput) SetMarker(v string) *DescribeDBClusterEndpointsOutput { + s.Marker = &v + return s +} + type DescribeDBClusterParameterGroupsInput struct { _ struct{} `type:"structure"` @@ -18799,56 +21309,201 @@ func (s *DescribeDBEngineVersionsInput) SetListSupportedCharacterSets(v bool) *D return s } -// SetListSupportedTimezones sets the ListSupportedTimezones field's value. -func (s *DescribeDBEngineVersionsInput) SetListSupportedTimezones(v bool) *DescribeDBEngineVersionsInput { - s.ListSupportedTimezones = &v +// SetListSupportedTimezones sets the ListSupportedTimezones field's value. +func (s *DescribeDBEngineVersionsInput) SetListSupportedTimezones(v bool) *DescribeDBEngineVersionsInput { + s.ListSupportedTimezones = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBEngineVersionsInput) SetMarker(v string) *DescribeDBEngineVersionsInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeDBEngineVersionsInput) SetMaxRecords(v int64) *DescribeDBEngineVersionsInput { + s.MaxRecords = &v + return s +} + +// Contains the result of a successful invocation of the DescribeDBEngineVersions +// action. +type DescribeDBEngineVersionsOutput struct { + _ struct{} `type:"structure"` + + // A list of DBEngineVersion elements. + DBEngineVersions []*DBEngineVersion `locationNameList:"DBEngineVersion" type:"list"` + + // An optional pagination token provided by a previous request. If this parameter + // is specified, the response includes only records beyond the marker, up to + // the value specified by MaxRecords. + Marker *string `type:"string"` +} + +// String returns the string representation +func (s DescribeDBEngineVersionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBEngineVersionsOutput) GoString() string { + return s.String() +} + +// SetDBEngineVersions sets the DBEngineVersions field's value. +func (s *DescribeDBEngineVersionsOutput) SetDBEngineVersions(v []*DBEngineVersion) *DescribeDBEngineVersionsOutput { + s.DBEngineVersions = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeDBEngineVersionsOutput) SetMarker(v string) *DescribeDBEngineVersionsOutput { + s.Marker = &v + return s +} + +// Parameter input for DescribeDBInstanceAutomatedBackups. +type DescribeDBInstanceAutomatedBackupsInput struct { + _ struct{} `type:"structure"` + + // (Optional) The user-supplied instance identifier. If this parameter is specified, + // it must match the identifier of an existing DB instance. It returns information + // from the specific DB instance' automated backup. This parameter isn't case-sensitive. + DBInstanceIdentifier *string `type:"string"` + + // The resource ID of the DB instance that is the source of the automated backup. + // This parameter isn't case-sensitive. + DbiResourceId *string `type:"string"` + + // A filter that specifies which resources to return based on status. + // + // Supported filters are the following: + // + // * status + // + // active - automated backups for current instances + // + // retained - automated backups for deleted instances + // + // creating - automated backups that are waiting for the first automated snapshot + // to be available + // + // * db-instance-id - Accepts DB instance identifiers and Amazon Resource + // Names (ARNs) for DB instances. The results list includes only information + // about the DB instance automated backupss identified by these ARNs. + // + // * dbi-resource-id - Accepts DB instance resource identifiers and DB Amazon + // Resource Names (ARNs) for DB instances. The results list includes only + // information about the DB instance resources identified by these ARNs. + // + // Returns all resources by default. The status for each resource is specified + // in the response. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // The pagination token provided in the previous request. If this parameter + // is specified the response includes only records beyond the marker, up to + // MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token called a marker + // is included in the response so that the remaining results can be retrieved. + MaxRecords *int64 `type:"integer"` +} + +// String returns the string representation +func (s DescribeDBInstanceAutomatedBackupsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeDBInstanceAutomatedBackupsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeDBInstanceAutomatedBackupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeDBInstanceAutomatedBackupsInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBInstanceIdentifier sets the DBInstanceIdentifier field's value. +func (s *DescribeDBInstanceAutomatedBackupsInput) SetDBInstanceIdentifier(v string) *DescribeDBInstanceAutomatedBackupsInput { + s.DBInstanceIdentifier = &v + return s +} + +// SetDbiResourceId sets the DbiResourceId field's value. +func (s *DescribeDBInstanceAutomatedBackupsInput) SetDbiResourceId(v string) *DescribeDBInstanceAutomatedBackupsInput { + s.DbiResourceId = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeDBInstanceAutomatedBackupsInput) SetFilters(v []*Filter) *DescribeDBInstanceAutomatedBackupsInput { + s.Filters = v return s } // SetMarker sets the Marker field's value. -func (s *DescribeDBEngineVersionsInput) SetMarker(v string) *DescribeDBEngineVersionsInput { +func (s *DescribeDBInstanceAutomatedBackupsInput) SetMarker(v string) *DescribeDBInstanceAutomatedBackupsInput { s.Marker = &v return s } // SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeDBEngineVersionsInput) SetMaxRecords(v int64) *DescribeDBEngineVersionsInput { +func (s *DescribeDBInstanceAutomatedBackupsInput) SetMaxRecords(v int64) *DescribeDBInstanceAutomatedBackupsInput { s.MaxRecords = &v return s } -// Contains the result of a successful invocation of the DescribeDBEngineVersions +// Contains the result of a successful invocation of the DescribeDBInstanceAutomatedBackups // action. -type DescribeDBEngineVersionsOutput struct { +type DescribeDBInstanceAutomatedBackupsOutput struct { _ struct{} `type:"structure"` - // A list of DBEngineVersion elements. - DBEngineVersions []*DBEngineVersion `locationNameList:"DBEngineVersion" type:"list"` + // A list of DBInstanceAutomatedBackup instances. + DBInstanceAutomatedBackups []*DBInstanceAutomatedBackup `locationNameList:"DBInstanceAutomatedBackup" type:"list"` // An optional pagination token provided by a previous request. If this parameter // is specified, the response includes only records beyond the marker, up to - // the value specified by MaxRecords. + // the value specified by MaxRecords . Marker *string `type:"string"` } // String returns the string representation -func (s DescribeDBEngineVersionsOutput) String() string { +func (s DescribeDBInstanceAutomatedBackupsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeDBEngineVersionsOutput) GoString() string { +func (s DescribeDBInstanceAutomatedBackupsOutput) GoString() string { return s.String() } -// SetDBEngineVersions sets the DBEngineVersions field's value. -func (s *DescribeDBEngineVersionsOutput) SetDBEngineVersions(v []*DBEngineVersion) *DescribeDBEngineVersionsOutput { - s.DBEngineVersions = v +// SetDBInstanceAutomatedBackups sets the DBInstanceAutomatedBackups field's value. +func (s *DescribeDBInstanceAutomatedBackupsOutput) SetDBInstanceAutomatedBackups(v []*DBInstanceAutomatedBackup) *DescribeDBInstanceAutomatedBackupsOutput { + s.DBInstanceAutomatedBackups = v return s } // SetMarker sets the Marker field's value. -func (s *DescribeDBEngineVersionsOutput) SetMarker(v string) *DescribeDBEngineVersionsOutput { +func (s *DescribeDBInstanceAutomatedBackupsOutput) SetMarker(v string) *DescribeDBInstanceAutomatedBackupsOutput { s.Marker = &v return s } @@ -19629,6 +22284,9 @@ type DescribeDBSnapshotsInput struct { // must also be specified. DBSnapshotIdentifier *string `type:"string"` + // A specific DB resource ID to describe. + DbiResourceId *string `type:"string"` + // This parameter is not currently supported. Filters []*Filter `locationNameList:"Filter" type:"list"` @@ -19729,6 +22387,12 @@ func (s *DescribeDBSnapshotsInput) SetDBSnapshotIdentifier(v string) *DescribeDB return s } +// SetDbiResourceId sets the DbiResourceId field's value. +func (s *DescribeDBSnapshotsInput) SetDbiResourceId(v string) *DescribeDBSnapshotsInput { + s.DbiResourceId = &v + return s +} + // SetFilters sets the Filters field's value. func (s *DescribeDBSnapshotsInput) SetFilters(v []*Filter) *DescribeDBSnapshotsInput { s.Filters = v @@ -20375,7 +23039,7 @@ type DescribeEventsInput struct { // // * If the source type is DBSnapshot, a DBSnapshotIdentifier must be supplied. // - // * Cannot end with a hyphen or contain two consecutive hyphens. + // * Can't end with a hyphen or contain two consecutive hyphens. SourceIdentifier *string `type:"string"` // The event source to retrieve events for. If no value is specified, all events @@ -20509,6 +23173,130 @@ func (s *DescribeEventsOutput) SetMarker(v string) *DescribeEventsOutput { return s } +type DescribeGlobalClustersInput struct { + _ struct{} `type:"structure"` + + // A filter that specifies one or more global DB clusters to describe. + // + // Supported filters: + // + // * db-cluster-id - Accepts DB cluster identifiers and DB cluster Amazon + // Resource Names (ARNs). The results list will only include information + // about the DB clusters identified by these ARNs. + Filters []*Filter `locationNameList:"Filter" type:"list"` + + // The user-supplied DB cluster identifier. If this parameter is specified, + // information from only the specific DB cluster is returned. This parameter + // isn't case-sensitive. + // + // Constraints: + // + // * If supplied, must match an existing DBClusterIdentifier. + GlobalClusterIdentifier *string `type:"string"` + + // An optional pagination token provided by a previous DescribeGlobalClusters + // request. If this parameter is specified, the response includes only records + // beyond the marker, up to the value specified by MaxRecords. + Marker *string `type:"string"` + + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token called a marker + // is included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + MaxRecords *int64 `type:"integer"` +} + +// String returns the string representation +func (s DescribeGlobalClustersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeGlobalClustersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeGlobalClustersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeGlobalClustersInput"} + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *DescribeGlobalClustersInput) SetFilters(v []*Filter) *DescribeGlobalClustersInput { + s.Filters = v + return s +} + +// SetGlobalClusterIdentifier sets the GlobalClusterIdentifier field's value. +func (s *DescribeGlobalClustersInput) SetGlobalClusterIdentifier(v string) *DescribeGlobalClustersInput { + s.GlobalClusterIdentifier = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeGlobalClustersInput) SetMarker(v string) *DescribeGlobalClustersInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeGlobalClustersInput) SetMaxRecords(v int64) *DescribeGlobalClustersInput { + s.MaxRecords = &v + return s +} + +type DescribeGlobalClustersOutput struct { + _ struct{} `type:"structure"` + + // The list of global clusters returned by this request. + GlobalClusters []*GlobalCluster `locationNameList:"GlobalClusterMember" type:"list"` + + // An optional pagination token provided by a previous DescribeGlobalClusters + // request. If this parameter is specified, the response includes only records + // beyond the marker, up to the value specified by MaxRecords. + Marker *string `type:"string"` +} + +// String returns the string representation +func (s DescribeGlobalClustersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeGlobalClustersOutput) GoString() string { + return s.String() +} + +// SetGlobalClusters sets the GlobalClusters field's value. +func (s *DescribeGlobalClustersOutput) SetGlobalClusters(v []*GlobalCluster) *DescribeGlobalClustersOutput { + s.GlobalClusters = v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeGlobalClustersOutput) SetMarker(v string) *DescribeGlobalClustersOutput { + s.Marker = &v + return s +} + type DescribeOptionGroupOptionsInput struct { _ struct{} `type:"structure"` @@ -20665,7 +23453,7 @@ type DescribeOptionGroupsInput struct { // Constraints: Minimum 20, maximum 100. MaxRecords *int64 `type:"integer"` - // The name of the option group to describe. Cannot be supplied together with + // The name of the option group to describe. Can't be supplied together with // EngineName or MajorEngineVersion. OptionGroupName *string `type:"string"` } @@ -21875,13 +24663,18 @@ func (s *EC2SecurityGroup) SetStatus(v string) *EC2SecurityGroup { return s } -// This data type is used as a response element in the following actions: +// This data type represents the information you need to connect to an Amazon +// RDS DB instance. This data type is used as a response element in the following +// actions: // // * CreateDBInstance // // * DescribeDBInstances // // * DeleteDBInstance +// +// For the data structure that represents Amazon Aurora DB cluster endpoints, +// see DBClusterEndpoint. type Endpoint struct { _ struct{} `type:"structure"` @@ -22196,7 +24989,9 @@ type FailoverDBClusterInput struct { // Constraints: // // * Must match the identifier of an existing DBCluster. - DBClusterIdentifier *string `type:"string"` + // + // DBClusterIdentifier is a required field + DBClusterIdentifier *string `type:"string" required:"true"` // The name of the instance to promote to the primary instance. // @@ -22215,6 +25010,19 @@ func (s FailoverDBClusterInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *FailoverDBClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "FailoverDBClusterInput"} + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetDBClusterIdentifier sets the DBClusterIdentifier field's value. func (s *FailoverDBClusterInput) SetDBClusterIdentifier(v string) *FailoverDBClusterInput { s.DBClusterIdentifier = &v @@ -22230,9 +25038,10 @@ func (s *FailoverDBClusterInput) SetTargetDBInstanceIdentifier(v string) *Failov type FailoverDBClusterOutput struct { _ struct{} `type:"structure"` - // Contains the details of an Amazon RDS DB cluster. + // Contains the details of an Amazon Aurora DB cluster. // - // This data type is used as a response element in the DescribeDBClusters action. + // This data type is used as a response element in the DescribeDBClusters, StopDBCluster, + // and StartDBCluster actions. DBCluster *DBCluster `type:"structure"` } @@ -22263,6 +25072,8 @@ func (s *FailoverDBClusterOutput) SetDBCluster(v *DBCluster) *FailoverDBClusterO // // * DescribeDBClusterBacktracks // +// * DescribeDBClusterEndpoints +// // * DescribeDBClusters // // * DescribeDBInstances @@ -22292,31 +25103,185 @@ func (s Filter) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *Filter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Filter"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Values == nil { - invalidParams.Add(request.NewErrParamRequired("Values")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// Validate inspects the fields of the type to determine if they are valid. +func (s *Filter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Filter"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Values == nil { + invalidParams.Add(request.NewErrParamRequired("Values")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetName sets the Name field's value. +func (s *Filter) SetName(v string) *Filter { + s.Name = &v + return s +} + +// SetValues sets the Values field's value. +func (s *Filter) SetValues(v []*string) *Filter { + s.Values = v + return s +} + +// A data type representing an Aurora global database. +type GlobalCluster struct { + _ struct{} `type:"structure"` + + // The default database name within the new global database cluster. + DatabaseName *string `type:"string"` + + // The deletion protection setting for the new global database cluster. + DeletionProtection *bool `type:"boolean"` + + // The Aurora database engine used by the global database cluster. + Engine *string `type:"string"` + + // Indicates the database engine version. + EngineVersion *string `type:"string"` + + // The Amazon Resource Name (ARN) for the global database cluster. + GlobalClusterArn *string `type:"string"` + + // Contains a user-supplied global database cluster identifier. This identifier + // is the unique key that identifies a global database cluster. + GlobalClusterIdentifier *string `type:"string"` + + // The list of cluster IDs for secondary clusters within the global database + // cluster. Currently limited to 1 item. + GlobalClusterMembers []*GlobalClusterMember `locationNameList:"GlobalClusterMember" type:"list"` + + // The AWS Region-unique, immutable identifier for the global database cluster. + // This identifier is found in AWS CloudTrail log entries whenever the AWS KMS + // key for the DB cluster is accessed. + GlobalClusterResourceId *string `type:"string"` + + // Specifies the current state of this global database cluster. + Status *string `type:"string"` + + // The storage encryption setting for the global database cluster. + StorageEncrypted *bool `type:"boolean"` +} + +// String returns the string representation +func (s GlobalCluster) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GlobalCluster) GoString() string { + return s.String() +} + +// SetDatabaseName sets the DatabaseName field's value. +func (s *GlobalCluster) SetDatabaseName(v string) *GlobalCluster { + s.DatabaseName = &v + return s +} + +// SetDeletionProtection sets the DeletionProtection field's value. +func (s *GlobalCluster) SetDeletionProtection(v bool) *GlobalCluster { + s.DeletionProtection = &v + return s +} + +// SetEngine sets the Engine field's value. +func (s *GlobalCluster) SetEngine(v string) *GlobalCluster { + s.Engine = &v + return s +} + +// SetEngineVersion sets the EngineVersion field's value. +func (s *GlobalCluster) SetEngineVersion(v string) *GlobalCluster { + s.EngineVersion = &v + return s +} + +// SetGlobalClusterArn sets the GlobalClusterArn field's value. +func (s *GlobalCluster) SetGlobalClusterArn(v string) *GlobalCluster { + s.GlobalClusterArn = &v + return s +} + +// SetGlobalClusterIdentifier sets the GlobalClusterIdentifier field's value. +func (s *GlobalCluster) SetGlobalClusterIdentifier(v string) *GlobalCluster { + s.GlobalClusterIdentifier = &v + return s +} + +// SetGlobalClusterMembers sets the GlobalClusterMembers field's value. +func (s *GlobalCluster) SetGlobalClusterMembers(v []*GlobalClusterMember) *GlobalCluster { + s.GlobalClusterMembers = v + return s +} + +// SetGlobalClusterResourceId sets the GlobalClusterResourceId field's value. +func (s *GlobalCluster) SetGlobalClusterResourceId(v string) *GlobalCluster { + s.GlobalClusterResourceId = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *GlobalCluster) SetStatus(v string) *GlobalCluster { + s.Status = &v + return s +} + +// SetStorageEncrypted sets the StorageEncrypted field's value. +func (s *GlobalCluster) SetStorageEncrypted(v bool) *GlobalCluster { + s.StorageEncrypted = &v + return s +} + +// A data structure with information about any primary and secondary clusters +// associated with an Aurora global database. +type GlobalClusterMember struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) for each Aurora cluster. + DBClusterArn *string `type:"string"` + + // Specifies whether the Aurora cluster is the primary cluster (that is, has + // read-write capability) for the Aurora global database with which it is associated. + IsWriter *bool `type:"boolean"` + + // The Amazon Resource Name (ARN) for each read-only secondary cluster associated + // with the Aurora global database. + Readers []*string `type:"list"` +} + +// String returns the string representation +func (s GlobalClusterMember) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GlobalClusterMember) GoString() string { + return s.String() +} + +// SetDBClusterArn sets the DBClusterArn field's value. +func (s *GlobalClusterMember) SetDBClusterArn(v string) *GlobalClusterMember { + s.DBClusterArn = &v + return s } -// SetName sets the Name field's value. -func (s *Filter) SetName(v string) *Filter { - s.Name = &v +// SetIsWriter sets the IsWriter field's value. +func (s *GlobalClusterMember) SetIsWriter(v bool) *GlobalClusterMember { + s.IsWriter = &v return s } -// SetValues sets the Values field's value. -func (s *Filter) SetValues(v []*string) *Filter { - s.Values = v +// SetReaders sets the Readers field's value. +func (s *GlobalClusterMember) SetReaders(v []*string) *GlobalClusterMember { + s.Readers = v return s } @@ -22438,6 +25403,40 @@ func (s *ListTagsForResourceOutput) SetTagList(v []*Tag) *ListTagsForResourceOut return s } +// The minimum DB engine version required for each corresponding allowed value +// for an option setting. +type MinimumEngineVersionPerAllowedValue struct { + _ struct{} `type:"structure"` + + // The allowed value for an option setting. + AllowedValue *string `type:"string"` + + // The minimum DB engine version required for the allowed value. + MinimumEngineVersion *string `type:"string"` +} + +// String returns the string representation +func (s MinimumEngineVersionPerAllowedValue) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MinimumEngineVersionPerAllowedValue) GoString() string { + return s.String() +} + +// SetAllowedValue sets the AllowedValue field's value. +func (s *MinimumEngineVersionPerAllowedValue) SetAllowedValue(v string) *MinimumEngineVersionPerAllowedValue { + s.AllowedValue = &v + return s +} + +// SetMinimumEngineVersion sets the MinimumEngineVersion field's value. +func (s *MinimumEngineVersionPerAllowedValue) SetMinimumEngineVersion(v string) *MinimumEngineVersionPerAllowedValue { + s.MinimumEngineVersion = &v + return s +} + type ModifyCurrentDBClusterCapacityInput struct { _ struct{} `type:"structure"` @@ -22585,6 +25584,198 @@ func (s *ModifyCurrentDBClusterCapacityOutput) SetTimeoutAction(v string) *Modif return s } +type ModifyDBClusterEndpointInput struct { + _ struct{} `type:"structure"` + + // The identifier of the endpoint to modify. This parameter is stored as a lowercase + // string. + // + // DBClusterEndpointIdentifier is a required field + DBClusterEndpointIdentifier *string `type:"string" required:"true"` + + // The type of the endpoint. One of: READER, ANY. + EndpointType *string `type:"string"` + + // List of DB instance identifiers that aren't part of the custom endpoint group. + // All other eligible instances are reachable through the custom endpoint. Only + // relevant if the list of static members is empty. + ExcludedMembers []*string `type:"list"` + + // List of DB instance identifiers that are part of the custom endpoint group. + StaticMembers []*string `type:"list"` +} + +// String returns the string representation +func (s ModifyDBClusterEndpointInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyDBClusterEndpointInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyDBClusterEndpointInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyDBClusterEndpointInput"} + if s.DBClusterEndpointIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterEndpointIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterEndpointIdentifier sets the DBClusterEndpointIdentifier field's value. +func (s *ModifyDBClusterEndpointInput) SetDBClusterEndpointIdentifier(v string) *ModifyDBClusterEndpointInput { + s.DBClusterEndpointIdentifier = &v + return s +} + +// SetEndpointType sets the EndpointType field's value. +func (s *ModifyDBClusterEndpointInput) SetEndpointType(v string) *ModifyDBClusterEndpointInput { + s.EndpointType = &v + return s +} + +// SetExcludedMembers sets the ExcludedMembers field's value. +func (s *ModifyDBClusterEndpointInput) SetExcludedMembers(v []*string) *ModifyDBClusterEndpointInput { + s.ExcludedMembers = v + return s +} + +// SetStaticMembers sets the StaticMembers field's value. +func (s *ModifyDBClusterEndpointInput) SetStaticMembers(v []*string) *ModifyDBClusterEndpointInput { + s.StaticMembers = v + return s +} + +// This data type represents the information you need to connect to an Amazon +// Aurora DB cluster. This data type is used as a response element in the following +// actions: +// +// * CreateDBClusterEndpoint +// +// * DescribeDBClusterEndpoints +// +// * ModifyDBClusterEndpoint +// +// * DeleteDBClusterEndpoint +// +// For the data structure that represents Amazon RDS DB instance endpoints, +// see Endpoint. +type ModifyDBClusterEndpointOutput struct { + _ struct{} `type:"structure"` + + // The type associated with a custom endpoint. One of: READER, ANY. + CustomEndpointType *string `type:"string"` + + // The Amazon Resource Name (ARN) for the endpoint. + DBClusterEndpointArn *string `type:"string"` + + // The identifier associated with the endpoint. This parameter is stored as + // a lowercase string. + DBClusterEndpointIdentifier *string `type:"string"` + + // A unique system-generated identifier for an endpoint. It remains the same + // for the whole life of the endpoint. + DBClusterEndpointResourceIdentifier *string `type:"string"` + + // The DB cluster identifier of the DB cluster associated with the endpoint. + // This parameter is stored as a lowercase string. + DBClusterIdentifier *string `type:"string"` + + // The DNS address of the endpoint. + Endpoint *string `type:"string"` + + // The type of the endpoint. One of: READER, WRITER, CUSTOM. + EndpointType *string `type:"string"` + + // List of DB instance identifiers that aren't part of the custom endpoint group. + // All other eligible instances are reachable through the custom endpoint. Only + // relevant if the list of static members is empty. + ExcludedMembers []*string `type:"list"` + + // List of DB instance identifiers that are part of the custom endpoint group. + StaticMembers []*string `type:"list"` + + // The current status of the endpoint. One of: creating, available, deleting, + // modifying. + Status *string `type:"string"` +} + +// String returns the string representation +func (s ModifyDBClusterEndpointOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyDBClusterEndpointOutput) GoString() string { + return s.String() +} + +// SetCustomEndpointType sets the CustomEndpointType field's value. +func (s *ModifyDBClusterEndpointOutput) SetCustomEndpointType(v string) *ModifyDBClusterEndpointOutput { + s.CustomEndpointType = &v + return s +} + +// SetDBClusterEndpointArn sets the DBClusterEndpointArn field's value. +func (s *ModifyDBClusterEndpointOutput) SetDBClusterEndpointArn(v string) *ModifyDBClusterEndpointOutput { + s.DBClusterEndpointArn = &v + return s +} + +// SetDBClusterEndpointIdentifier sets the DBClusterEndpointIdentifier field's value. +func (s *ModifyDBClusterEndpointOutput) SetDBClusterEndpointIdentifier(v string) *ModifyDBClusterEndpointOutput { + s.DBClusterEndpointIdentifier = &v + return s +} + +// SetDBClusterEndpointResourceIdentifier sets the DBClusterEndpointResourceIdentifier field's value. +func (s *ModifyDBClusterEndpointOutput) SetDBClusterEndpointResourceIdentifier(v string) *ModifyDBClusterEndpointOutput { + s.DBClusterEndpointResourceIdentifier = &v + return s +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *ModifyDBClusterEndpointOutput) SetDBClusterIdentifier(v string) *ModifyDBClusterEndpointOutput { + s.DBClusterIdentifier = &v + return s +} + +// SetEndpoint sets the Endpoint field's value. +func (s *ModifyDBClusterEndpointOutput) SetEndpoint(v string) *ModifyDBClusterEndpointOutput { + s.Endpoint = &v + return s +} + +// SetEndpointType sets the EndpointType field's value. +func (s *ModifyDBClusterEndpointOutput) SetEndpointType(v string) *ModifyDBClusterEndpointOutput { + s.EndpointType = &v + return s +} + +// SetExcludedMembers sets the ExcludedMembers field's value. +func (s *ModifyDBClusterEndpointOutput) SetExcludedMembers(v []*string) *ModifyDBClusterEndpointOutput { + s.ExcludedMembers = v + return s +} + +// SetStaticMembers sets the StaticMembers field's value. +func (s *ModifyDBClusterEndpointOutput) SetStaticMembers(v []*string) *ModifyDBClusterEndpointOutput { + s.StaticMembers = v + return s +} + +// SetStatus sets the Status field's value. +func (s *ModifyDBClusterEndpointOutput) SetStatus(v string) *ModifyDBClusterEndpointOutput { + s.Status = &v + return s +} + type ModifyDBClusterInput struct { _ struct{} `type:"structure"` @@ -22642,6 +25833,25 @@ type ModifyDBClusterInput struct { // The name of the DB cluster parameter group to use for the DB cluster. DBClusterParameterGroupName *string `type:"string"` + // Indicates if the DB cluster has deletion protection enabled. The database + // can't be deleted when this value is set to true. + DeletionProtection *bool `type:"boolean"` + + // HTTP endpoint functionality is in beta for Aurora Serverless and is subject + // to change. + // + // A value that indicates whether to enable the HTTP endpoint for an Aurora + // Serverless DB cluster. By default, the HTTP endpoint is disabled. + // + // When enabled, the HTTP endpoint provides a connectionless web service API + // for running SQL queries on the Aurora Serverless DB cluster. You can also + // query your database from inside the RDS console with the query editor. + // + // For more information about Aurora Serverless, see Using Amazon Aurora Serverless + // (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html) + // in the Amazon Aurora User Guide. + EnableHttpEndpoint *bool `type:"boolean"` + // True to enable mapping of AWS Identity and Access Management (IAM) accounts // to database accounts, and otherwise false. // @@ -22670,7 +25880,7 @@ type ModifyDBClusterInput struct { // // * The first character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens // // Example: my-cluster2 NewDBClusterIdentifier *string `type:"string"` @@ -22796,6 +26006,18 @@ func (s *ModifyDBClusterInput) SetDBClusterParameterGroupName(v string) *ModifyD return s } +// SetDeletionProtection sets the DeletionProtection field's value. +func (s *ModifyDBClusterInput) SetDeletionProtection(v bool) *ModifyDBClusterInput { + s.DeletionProtection = &v + return s +} + +// SetEnableHttpEndpoint sets the EnableHttpEndpoint field's value. +func (s *ModifyDBClusterInput) SetEnableHttpEndpoint(v bool) *ModifyDBClusterInput { + s.EnableHttpEndpoint = &v + return s +} + // SetEnableIAMDatabaseAuthentication sets the EnableIAMDatabaseAuthentication field's value. func (s *ModifyDBClusterInput) SetEnableIAMDatabaseAuthentication(v bool) *ModifyDBClusterInput { s.EnableIAMDatabaseAuthentication = &v @@ -22859,9 +26081,10 @@ func (s *ModifyDBClusterInput) SetVpcSecurityGroupIds(v []*string) *ModifyDBClus type ModifyDBClusterOutput struct { _ struct{} `type:"structure"` - // Contains the details of an Amazon RDS DB cluster. + // Contains the details of an Amazon Aurora DB cluster. // - // This data type is used as a response element in the DescribeDBClusters action. + // This data type is used as a response element in the DescribeDBClusters, StopDBCluster, + // and StartDBCluster actions. DBCluster *DBCluster `type:"structure"` } @@ -23118,12 +26341,12 @@ type ModifyDBInstanceInput struct { // * Must be a value from 0 to 35 // // * Can be specified for a MySQL Read Replica only if the source is running - // MySQL 5.6 + // MySQL 5.6 or later // // * Can be specified for a PostgreSQL Read Replica only if the source is // running PostgreSQL 9.3.5 // - // * Cannot be set to 0 if the DB instance is a source to Read Replicas + // * Can't be set to 0 if the DB instance is a source to Read Replicas BackupRetentionPeriod *int64 `type:"integer"` // Indicates the certificate that needs to be associated with the instance. @@ -23244,6 +26467,11 @@ type ModifyDBInstanceInput struct { // Example: mySubnetGroup DBSubnetGroupName *string `type:"string"` + // Indicates if the DB instance has deletion protection enabled. The database + // can't be deleted when this value is set to true. For more information, see + // Deleting a DB Instance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html). + DeletionProtection *bool `type:"boolean"` + // The Active Directory Domain to move the instance to. Specify none to remove // the instance from its current domain. The domain must be created prior to // this operation. Currently only a Microsoft SQL Server instance can be created @@ -23402,7 +26630,7 @@ type ModifyDBInstanceInput struct { // // * The first character must be a letter. // - // * Cannot end with a hyphen or contain two consecutive hyphens. + // * Can't end with a hyphen or contain two consecutive hyphens. // // Example: mydbinstance NewDBInstanceIdentifier *string `type:"string"` @@ -23653,6 +26881,12 @@ func (s *ModifyDBInstanceInput) SetDBSubnetGroupName(v string) *ModifyDBInstance return s } +// SetDeletionProtection sets the DeletionProtection field's value. +func (s *ModifyDBInstanceInput) SetDeletionProtection(v bool) *ModifyDBInstanceInput { + s.DeletionProtection = &v + return s +} + // SetDomain sets the Domain field's value. func (s *ModifyDBInstanceInput) SetDomain(v string) *ModifyDBInstanceInput { s.Domain = &v @@ -24310,6 +27544,87 @@ func (s *ModifyEventSubscriptionOutput) SetEventSubscription(v *EventSubscriptio return s } +type ModifyGlobalClusterInput struct { + _ struct{} `type:"structure"` + + // Indicates if the global database cluster has deletion protection enabled. + // The global database cluster can't be deleted when this value is set to true. + DeletionProtection *bool `type:"boolean"` + + // The DB cluster identifier for the global cluster being modified. This parameter + // is not case-sensitive. + // + // Constraints: + // + // * Must match the identifier of an existing global database cluster. + GlobalClusterIdentifier *string `type:"string"` + + // The new cluster identifier for the global database cluster when modifying + // a global database cluster. This value is stored as a lowercase string. + // + // Constraints: + // + // * Must contain from 1 to 63 letters, numbers, or hyphens + // + // * The first character must be a letter + // + // * Can't end with a hyphen or contain two consecutive hyphens + // + // Example: my-cluster2 + NewGlobalClusterIdentifier *string `type:"string"` +} + +// String returns the string representation +func (s ModifyGlobalClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyGlobalClusterInput) GoString() string { + return s.String() +} + +// SetDeletionProtection sets the DeletionProtection field's value. +func (s *ModifyGlobalClusterInput) SetDeletionProtection(v bool) *ModifyGlobalClusterInput { + s.DeletionProtection = &v + return s +} + +// SetGlobalClusterIdentifier sets the GlobalClusterIdentifier field's value. +func (s *ModifyGlobalClusterInput) SetGlobalClusterIdentifier(v string) *ModifyGlobalClusterInput { + s.GlobalClusterIdentifier = &v + return s +} + +// SetNewGlobalClusterIdentifier sets the NewGlobalClusterIdentifier field's value. +func (s *ModifyGlobalClusterInput) SetNewGlobalClusterIdentifier(v string) *ModifyGlobalClusterInput { + s.NewGlobalClusterIdentifier = &v + return s +} + +type ModifyGlobalClusterOutput struct { + _ struct{} `type:"structure"` + + // A data type representing an Aurora global database. + GlobalCluster *GlobalCluster `type:"structure"` +} + +// String returns the string representation +func (s ModifyGlobalClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyGlobalClusterOutput) GoString() string { + return s.String() +} + +// SetGlobalCluster sets the GlobalCluster field's value. +func (s *ModifyGlobalClusterOutput) SetGlobalCluster(v *GlobalCluster) *ModifyGlobalClusterOutput { + s.GlobalCluster = v + return s +} + type ModifyOptionGroupInput struct { _ struct{} `type:"structure"` @@ -24909,6 +28224,14 @@ type OptionGroupOptionSetting struct { // from the default value. IsModifiable *bool `type:"boolean"` + // Boolean value where true indicates that a value must be specified for this + // option setting of the option group option. + IsRequired *bool `type:"boolean"` + + // The minimum DB engine version required for the corresponding allowed value + // for this option setting. + MinimumEngineVersionPerAllowedValue []*MinimumEngineVersionPerAllowedValue `locationNameList:"MinimumEngineVersionPerAllowedValue" type:"list"` + // The description of the option group option. SettingDescription *string `type:"string"` @@ -24950,6 +28273,18 @@ func (s *OptionGroupOptionSetting) SetIsModifiable(v bool) *OptionGroupOptionSet return s } +// SetIsRequired sets the IsRequired field's value. +func (s *OptionGroupOptionSetting) SetIsRequired(v bool) *OptionGroupOptionSetting { + s.IsRequired = &v + return s +} + +// SetMinimumEngineVersionPerAllowedValue sets the MinimumEngineVersionPerAllowedValue field's value. +func (s *OptionGroupOptionSetting) SetMinimumEngineVersionPerAllowedValue(v []*MinimumEngineVersionPerAllowedValue) *OptionGroupOptionSetting { + s.MinimumEngineVersionPerAllowedValue = v + return s +} + // SetSettingDescription sets the SettingDescription field's value. func (s *OptionGroupOptionSetting) SetSettingDescription(v string) *OptionGroupOptionSetting { s.SettingDescription = &v @@ -25823,9 +29158,10 @@ func (s *PromoteReadReplicaDBClusterInput) SetDBClusterIdentifier(v string) *Pro type PromoteReadReplicaDBClusterOutput struct { _ struct{} `type:"structure"` - // Contains the details of an Amazon RDS DB cluster. + // Contains the details of an Amazon Aurora DB cluster. // - // This data type is used as a response element in the DescribeDBClusters action. + // This data type is used as a response element in the DescribeDBClusters, StopDBCluster, + // and StartDBCluster actions. DBCluster *DBCluster `type:"structure"` } @@ -26204,9 +29540,65 @@ func (s *RecurringCharge) SetRecurringChargeAmount(v float64) *RecurringCharge { return s } -// SetRecurringChargeFrequency sets the RecurringChargeFrequency field's value. -func (s *RecurringCharge) SetRecurringChargeFrequency(v string) *RecurringCharge { - s.RecurringChargeFrequency = &v +// SetRecurringChargeFrequency sets the RecurringChargeFrequency field's value. +func (s *RecurringCharge) SetRecurringChargeFrequency(v string) *RecurringCharge { + s.RecurringChargeFrequency = &v + return s +} + +type RemoveFromGlobalClusterInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) identifying the cluster that was detached + // from the Aurora global database cluster. + DbClusterIdentifier *string `type:"string"` + + // The cluster identifier to detach from the Aurora global database cluster. + GlobalClusterIdentifier *string `type:"string"` +} + +// String returns the string representation +func (s RemoveFromGlobalClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveFromGlobalClusterInput) GoString() string { + return s.String() +} + +// SetDbClusterIdentifier sets the DbClusterIdentifier field's value. +func (s *RemoveFromGlobalClusterInput) SetDbClusterIdentifier(v string) *RemoveFromGlobalClusterInput { + s.DbClusterIdentifier = &v + return s +} + +// SetGlobalClusterIdentifier sets the GlobalClusterIdentifier field's value. +func (s *RemoveFromGlobalClusterInput) SetGlobalClusterIdentifier(v string) *RemoveFromGlobalClusterInput { + s.GlobalClusterIdentifier = &v + return s +} + +type RemoveFromGlobalClusterOutput struct { + _ struct{} `type:"structure"` + + // A data type representing an Aurora global database. + GlobalCluster *GlobalCluster `type:"structure"` +} + +// String returns the string representation +func (s RemoveFromGlobalClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveFromGlobalClusterOutput) GoString() string { + return s.String() +} + +// SetGlobalCluster sets the GlobalCluster field's value. +func (s *RemoveFromGlobalClusterOutput) SetGlobalCluster(v *GlobalCluster) *RemoveFromGlobalClusterOutput { + s.GlobalCluster = v return s } @@ -26902,7 +30294,7 @@ type RestoreDBClusterFromS3Input struct { // // * First character must be a letter. // - // * Cannot end with a hyphen or contain two consecutive hyphens. + // * Can't end with a hyphen or contain two consecutive hyphens. // // Example: my-cluster1 // @@ -26927,6 +30319,11 @@ type RestoreDBClusterFromS3Input struct { // The database name for the restored DB cluster. DatabaseName *string `type:"string"` + // Indicates if the DB cluster should have deletion protection enabled. The + // database can't be deleted when this value is set to true. The default is + // false. + DeletionProtection *bool `type:"boolean"` + // The list of logs that the restored DB cluster is to export to CloudWatch // Logs. The values in the list depend on the DB engine being used. For more // information, see Publishing Database Logs to Amazon CloudWatch Logs (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) @@ -26986,7 +30383,7 @@ type RestoreDBClusterFromS3Input struct { // // * First character must be a letter. // - // * Cannot be a reserved word for the chosen database engine. + // * Can't be a reserved word for the chosen database engine. // // MasterUsername is a required field MasterUsername *string `type:"string" required:"true"` @@ -27178,6 +30575,12 @@ func (s *RestoreDBClusterFromS3Input) SetDatabaseName(v string) *RestoreDBCluste return s } +// SetDeletionProtection sets the DeletionProtection field's value. +func (s *RestoreDBClusterFromS3Input) SetDeletionProtection(v bool) *RestoreDBClusterFromS3Input { + s.DeletionProtection = &v + return s +} + // SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value. func (s *RestoreDBClusterFromS3Input) SetEnableCloudwatchLogsExports(v []*string) *RestoreDBClusterFromS3Input { s.EnableCloudwatchLogsExports = v @@ -27295,9 +30698,10 @@ func (s *RestoreDBClusterFromS3Input) SetVpcSecurityGroupIds(v []*string) *Resto type RestoreDBClusterFromS3Output struct { _ struct{} `type:"structure"` - // Contains the details of an Amazon RDS DB cluster. + // Contains the details of an Amazon Aurora DB cluster. // - // This data type is used as a response element in the DescribeDBClusters action. + // This data type is used as a response element in the DescribeDBClusters, StopDBCluster, + // and StartDBCluster actions. DBCluster *DBCluster `type:"structure"` } @@ -27320,8 +30724,8 @@ func (s *RestoreDBClusterFromS3Output) SetDBCluster(v *DBCluster) *RestoreDBClus type RestoreDBClusterFromSnapshotInput struct { _ struct{} `type:"structure"` - // Provides the list of EC2 Availability Zones that instances in the restored - // DB cluster can be created in. + // Provides the list of Amazon EC2 Availability Zones that instances in the + // restored DB cluster can be created in. AvailabilityZones []*string `locationNameList:"AvailabilityZone" type:"list"` // The target backtrack window, in seconds. To disable backtracking, set this @@ -27344,16 +30748,32 @@ type RestoreDBClusterFromSnapshotInput struct { // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens // // Example: my-snapshot-id // // DBClusterIdentifier is a required field DBClusterIdentifier *string `type:"string" required:"true"` + // The name of the DB cluster parameter group to associate with this DB cluster. + // If this argument is omitted, the default DB cluster parameter group for the + // specified engine is used. + // + // Constraints: + // + // * If supplied, must match the name of an existing default DB cluster parameter + // group. + // + // * Must be 1 to 255 letters, numbers, or hyphens. + // + // * First character must be a letter. + // + // * Can't end with a hyphen or contain two consecutive hyphens. + DBClusterParameterGroupName *string `type:"string"` + // The name of the DB subnet group to use for the new DB cluster. // - // Constraints: If supplied, must match the name of an existing DBSubnetGroup. + // Constraints: If supplied, must match the name of an existing DB subnet group. // // Example: mySubnetgroup DBSubnetGroupName *string `type:"string"` @@ -27361,7 +30781,12 @@ type RestoreDBClusterFromSnapshotInput struct { // The database name for the restored DB cluster. DatabaseName *string `type:"string"` - // The list of logs that the restored DB cluster is to export to CloudWatch + // Indicates if the DB cluster should have deletion protection enabled. The + // database can't be deleted when this value is set to true. The default is + // false. + DeletionProtection *bool `type:"boolean"` + + // The list of logs that the restored DB cluster is to export to Amazon CloudWatch // Logs. The values in the list depend on the DB engine being used. For more // information, see Publishing Database Logs to Amazon CloudWatch Logs (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) // in the Amazon Aurora User Guide. @@ -27382,7 +30807,8 @@ type RestoreDBClusterFromSnapshotInput struct { // Engine is a required field Engine *string `type:"string" required:"true"` - // The DB engine mode of the DB cluster, either provisioned or serverless. + // The DB engine mode of the DB cluster, either provisioned, serverless, or + // parallelquery. EngineMode *string `type:"string"` // The version of the database engine to use for the new DB cluster. @@ -27396,8 +30822,8 @@ type RestoreDBClusterFromSnapshotInput struct { // the KMS encryption key used to encrypt the new DB cluster, then you can use // the KMS key alias instead of the ARN for the KMS encryption key. // - // If you do not specify a value for the KmsKeyId parameter, then the following - // will occur: + // If you don't specify a value for the KmsKeyId parameter, then the following + // occurs: // // * If the DB snapshot or DB cluster snapshot in SnapshotIdentifier is encrypted, // then the restored DB cluster is encrypted using the KMS key that was used @@ -27412,7 +30838,7 @@ type RestoreDBClusterFromSnapshotInput struct { // The port number on which the new DB cluster accepts connections. // - // Constraints: Value must be 1150-65535 + // Constraints: This value must be 1150-65535 // // Default: The same port as the original DB cluster. Port *int64 `type:"integer"` @@ -27488,6 +30914,12 @@ func (s *RestoreDBClusterFromSnapshotInput) SetDBClusterIdentifier(v string) *Re return s } +// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetDBClusterParameterGroupName(v string) *RestoreDBClusterFromSnapshotInput { + s.DBClusterParameterGroupName = &v + return s +} + // SetDBSubnetGroupName sets the DBSubnetGroupName field's value. func (s *RestoreDBClusterFromSnapshotInput) SetDBSubnetGroupName(v string) *RestoreDBClusterFromSnapshotInput { s.DBSubnetGroupName = &v @@ -27500,6 +30932,12 @@ func (s *RestoreDBClusterFromSnapshotInput) SetDatabaseName(v string) *RestoreDB return s } +// SetDeletionProtection sets the DeletionProtection field's value. +func (s *RestoreDBClusterFromSnapshotInput) SetDeletionProtection(v bool) *RestoreDBClusterFromSnapshotInput { + s.DeletionProtection = &v + return s +} + // SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value. func (s *RestoreDBClusterFromSnapshotInput) SetEnableCloudwatchLogsExports(v []*string) *RestoreDBClusterFromSnapshotInput { s.EnableCloudwatchLogsExports = v @@ -27575,9 +31013,10 @@ func (s *RestoreDBClusterFromSnapshotInput) SetVpcSecurityGroupIds(v []*string) type RestoreDBClusterFromSnapshotOutput struct { _ struct{} `type:"structure"` - // Contains the details of an Amazon RDS DB cluster. + // Contains the details of an Amazon Aurora DB cluster. // - // This data type is used as a response element in the DescribeDBClusters action. + // This data type is used as a response element in the DescribeDBClusters, StopDBCluster, + // and StartDBCluster actions. DBCluster *DBCluster `type:"structure"` } @@ -27619,11 +31058,27 @@ type RestoreDBClusterToPointInTimeInput struct { // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens // // DBClusterIdentifier is a required field DBClusterIdentifier *string `type:"string" required:"true"` + // The name of the DB cluster parameter group to associate with this DB cluster. + // If this argument is omitted, the default DB cluster parameter group for the + // specified engine is used. + // + // Constraints: + // + // * If supplied, must match the name of an existing DB cluster parameter + // group. + // + // * Must be 1 to 255 letters, numbers, or hyphens. + // + // * First character must be a letter. + // + // * Can't end with a hyphen or contain two consecutive hyphens. + DBClusterParameterGroupName *string `type:"string"` + // The DB subnet group name to use for the new DB cluster. // // Constraints: If supplied, must match the name of an existing DBSubnetGroup. @@ -27631,6 +31086,11 @@ type RestoreDBClusterToPointInTimeInput struct { // Example: mySubnetgroup DBSubnetGroupName *string `type:"string"` + // Indicates if the DB cluster should have deletion protection enabled. The + // database can't be deleted when this value is set to true. The default is + // false. + DeletionProtection *bool `type:"boolean"` + // The list of logs that the restored DB cluster is to export to CloudWatch // Logs. The values in the list depend on the DB engine being used. For more // information, see Publishing Database Logs to Amazon CloudWatch Logs (http://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) @@ -27656,8 +31116,8 @@ type RestoreDBClusterToPointInTimeInput struct { // cluster. The new DB cluster is encrypted with the KMS key identified by the // KmsKeyId parameter. // - // If you do not specify a value for the KmsKeyId parameter, then the following - // will occur: + // If you don't specify a value for the KmsKeyId parameter, then the following + // occurs: // // * If the DB cluster is encrypted, then the restored DB cluster is encrypted // using the KMS key that was used to encrypt the source DB cluster. @@ -27689,9 +31149,9 @@ type RestoreDBClusterToPointInTimeInput struct { // // * Must be specified if UseLatestRestorableTime parameter is not provided // - // * Cannot be specified if UseLatestRestorableTime parameter is true + // * Can't be specified if UseLatestRestorableTime parameter is true // - // * Cannot be specified if RestoreType parameter is copy-on-write + // * Can't be specified if RestoreType parameter is copy-on-write // // Example: 2015-03-07T23:45:00Z RestoreToTime *time.Time `type:"timestamp"` @@ -27730,7 +31190,7 @@ type RestoreDBClusterToPointInTimeInput struct { // // Default: false // - // Constraints: Cannot be specified if RestoreToTime parameter is provided. + // Constraints: Can't be specified if RestoreToTime parameter is provided. UseLatestRestorableTime *bool `type:"boolean"` // A list of VPC security groups that the new DB cluster belongs to. @@ -27775,12 +31235,24 @@ func (s *RestoreDBClusterToPointInTimeInput) SetDBClusterIdentifier(v string) *R return s } +// SetDBClusterParameterGroupName sets the DBClusterParameterGroupName field's value. +func (s *RestoreDBClusterToPointInTimeInput) SetDBClusterParameterGroupName(v string) *RestoreDBClusterToPointInTimeInput { + s.DBClusterParameterGroupName = &v + return s +} + // SetDBSubnetGroupName sets the DBSubnetGroupName field's value. func (s *RestoreDBClusterToPointInTimeInput) SetDBSubnetGroupName(v string) *RestoreDBClusterToPointInTimeInput { s.DBSubnetGroupName = &v return s } +// SetDeletionProtection sets the DeletionProtection field's value. +func (s *RestoreDBClusterToPointInTimeInput) SetDeletionProtection(v bool) *RestoreDBClusterToPointInTimeInput { + s.DeletionProtection = &v + return s +} + // SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value. func (s *RestoreDBClusterToPointInTimeInput) SetEnableCloudwatchLogsExports(v []*string) *RestoreDBClusterToPointInTimeInput { s.EnableCloudwatchLogsExports = v @@ -27850,9 +31322,10 @@ func (s *RestoreDBClusterToPointInTimeInput) SetVpcSecurityGroupIds(v []*string) type RestoreDBClusterToPointInTimeOutput struct { _ struct{} `type:"structure"` - // Contains the details of an Amazon RDS DB cluster. + // Contains the details of an Amazon Aurora DB cluster. // - // This data type is used as a response element in the DescribeDBClusters action. + // This data type is used as a response element in the DescribeDBClusters, StopDBCluster, + // and StartDBCluster actions. DBCluster *DBCluster `type:"structure"` } @@ -27911,7 +31384,7 @@ type RestoreDBInstanceFromDBSnapshotInput struct { // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens // // Example: my-snapshot-id // @@ -27923,6 +31396,21 @@ type RestoreDBInstanceFromDBSnapshotInput struct { // This parameter doesn't apply to the MySQL, PostgreSQL, or MariaDB engines. DBName *string `type:"string"` + // The name of the DB parameter group to associate with this DB instance. If + // this argument is omitted, the default DBParameterGroup for the specified + // engine is used. + // + // Constraints: + // + // * If supplied, must match the name of an existing DBParameterGroup. + // + // * Must be 1 to 255 letters, numbers, or hyphens. + // + // * First character must be a letter. + // + // * Can't end with a hyphen or contain two consecutive hyphens. + DBParameterGroupName *string `type:"string"` + // The identifier for the DB snapshot to restore from. // // Constraints: @@ -27942,6 +31430,11 @@ type RestoreDBInstanceFromDBSnapshotInput struct { // Example: mySubnetgroup DBSubnetGroupName *string `type:"string"` + // Indicates if the DB instance should have deletion protection enabled. The + // database can't be deleted when this value is set to true. The default is + // false. For more information, see Deleting a DB Instance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html). + DeletionProtection *bool `type:"boolean"` + // Specify the Active Directory Domain to restore the instance in. Domain *string `type:"string"` @@ -28075,6 +31568,11 @@ type RestoreDBInstanceFromDBSnapshotInput struct { // A value that specifies that the DB instance class of the DB instance uses // its default processor features. UseDefaultProcessorFeatures *bool `type:"boolean"` + + // A list of EC2 VPC security groups to associate with this DB instance. + // + // Default: The default EC2 VPC security group for the DB subnet group's VPC. + VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` } // String returns the string representation @@ -28139,6 +31637,12 @@ func (s *RestoreDBInstanceFromDBSnapshotInput) SetDBName(v string) *RestoreDBIns return s } +// SetDBParameterGroupName sets the DBParameterGroupName field's value. +func (s *RestoreDBInstanceFromDBSnapshotInput) SetDBParameterGroupName(v string) *RestoreDBInstanceFromDBSnapshotInput { + s.DBParameterGroupName = &v + return s +} + // SetDBSnapshotIdentifier sets the DBSnapshotIdentifier field's value. func (s *RestoreDBInstanceFromDBSnapshotInput) SetDBSnapshotIdentifier(v string) *RestoreDBInstanceFromDBSnapshotInput { s.DBSnapshotIdentifier = &v @@ -28151,6 +31655,12 @@ func (s *RestoreDBInstanceFromDBSnapshotInput) SetDBSubnetGroupName(v string) *R return s } +// SetDeletionProtection sets the DeletionProtection field's value. +func (s *RestoreDBInstanceFromDBSnapshotInput) SetDeletionProtection(v bool) *RestoreDBInstanceFromDBSnapshotInput { + s.DeletionProtection = &v + return s +} + // SetDomain sets the Domain field's value. func (s *RestoreDBInstanceFromDBSnapshotInput) SetDomain(v string) *RestoreDBInstanceFromDBSnapshotInput { s.Domain = &v @@ -28253,6 +31763,12 @@ func (s *RestoreDBInstanceFromDBSnapshotInput) SetUseDefaultProcessorFeatures(v return s } +// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. +func (s *RestoreDBInstanceFromDBSnapshotInput) SetVpcSecurityGroupIds(v []*string) *RestoreDBInstanceFromDBSnapshotInput { + s.VpcSecurityGroupIds = v + return s +} + type RestoreDBInstanceFromDBSnapshotOutput struct { _ struct{} `type:"structure"` @@ -28341,7 +31857,7 @@ type RestoreDBInstanceFromS3Input struct { // // * First character must be a letter. // - // * Cannot end with a hyphen or contain two consecutive hyphens. + // * Can't end with a hyphen or contain two consecutive hyphens. // // Example: mydbinstance // @@ -28365,6 +31881,11 @@ type RestoreDBInstanceFromS3Input struct { // A DB subnet group to associate with this DB instance. DBSubnetGroupName *string `type:"string"` + // Indicates if the DB instance should have deletion protection enabled. The + // database can't be deleted when this value is set to true. The default is + // false. For more information, see Deleting a DB Instance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html). + DeletionProtection *bool `type:"boolean"` + // The list of logs that the restored DB instance is to export to CloudWatch // Logs. The values in the list depend on the DB engine being used. For more // information, see Publishing Database Logs to Amazon CloudWatch Logs (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) @@ -28431,7 +31952,7 @@ type RestoreDBInstanceFromS3Input struct { // // * First character must be a letter. // - // * Cannot be a reserved word for the chosen database engine. + // * Can't be a reserved word for the chosen database engine. MasterUsername *string `type:"string"` // The interval, in seconds, between points when Enhanced Monitoring metrics @@ -28687,6 +32208,12 @@ func (s *RestoreDBInstanceFromS3Input) SetDBSubnetGroupName(v string) *RestoreDB return s } +// SetDeletionProtection sets the DeletionProtection field's value. +func (s *RestoreDBInstanceFromS3Input) SetDeletionProtection(v bool) *RestoreDBInstanceFromS3Input { + s.DeletionProtection = &v + return s +} + // SetEnableCloudwatchLogsExports sets the EnableCloudwatchLogsExports field's value. func (s *RestoreDBInstanceFromS3Input) SetEnableCloudwatchLogsExports(v []*string) *RestoreDBInstanceFromS3Input { s.EnableCloudwatchLogsExports = v @@ -28933,6 +32460,21 @@ type RestoreDBInstanceToPointInTimeInput struct { // This parameter is not used for the MySQL or MariaDB engines. DBName *string `type:"string"` + // The name of the DB parameter group to associate with this DB instance. If + // this argument is omitted, the default DBParameterGroup for the specified + // engine is used. + // + // Constraints: + // + // * If supplied, must match the name of an existing DBParameterGroup. + // + // * Must be 1 to 255 letters, numbers, or hyphens. + // + // * First character must be a letter. + // + // * Can't end with a hyphen or contain two consecutive hyphens. + DBParameterGroupName *string `type:"string"` + // The DB subnet group name to use for the new instance. // // Constraints: If supplied, must match the name of an existing DBSubnetGroup. @@ -28940,6 +32482,11 @@ type RestoreDBInstanceToPointInTimeInput struct { // Example: mySubnetgroup DBSubnetGroupName *string `type:"string"` + // Indicates if the DB instance should have deletion protection enabled. The + // database can't be deleted when this value is set to true. The default is + // false. For more information, see Deleting a DB Instance (http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html). + DeletionProtection *bool `type:"boolean"` + // Specify the Active Directory Domain to restore the instance in. Domain *string `type:"string"` @@ -29052,7 +32599,7 @@ type RestoreDBInstanceToPointInTimeInput struct { // // * Must be before the latest restorable time for the DB instance // - // * Cannot be specified if UseLatestRestorableTime parameter is true + // * Can't be specified if UseLatestRestorableTime parameter is true // // Example: 2009-09-07T23:45:00Z RestoreTime *time.Time `type:"timestamp"` @@ -29062,9 +32609,10 @@ type RestoreDBInstanceToPointInTimeInput struct { // Constraints: // // * Must match the identifier of an existing DB instance. - // - // SourceDBInstanceIdentifier is a required field - SourceDBInstanceIdentifier *string `type:"string" required:"true"` + SourceDBInstanceIdentifier *string `type:"string"` + + // The resource ID of the source DB instance from which to restore. + SourceDbiResourceId *string `type:"string"` // Specifies the storage type to be associated with the DB instance. // @@ -29087,7 +32635,7 @@ type RestoreDBInstanceToPointInTimeInput struct { // // * First character must be a letter // - // * Cannot end with a hyphen or contain two consecutive hyphens + // * Can't end with a hyphen or contain two consecutive hyphens // // TargetDBInstanceIdentifier is a required field TargetDBInstanceIdentifier *string `type:"string" required:"true"` @@ -29108,8 +32656,13 @@ type RestoreDBInstanceToPointInTimeInput struct { // // Default: false // - // Constraints: Cannot be specified if RestoreTime parameter is provided. + // Constraints: Can't be specified if RestoreTime parameter is provided. UseLatestRestorableTime *bool `type:"boolean"` + + // A list of EC2 VPC security groups to associate with this DB instance. + // + // Default: The default EC2 VPC security group for the DB subnet group's VPC. + VpcSecurityGroupIds []*string `locationNameList:"VpcSecurityGroupId" type:"list"` } // String returns the string representation @@ -29125,9 +32678,6 @@ func (s RestoreDBInstanceToPointInTimeInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *RestoreDBInstanceToPointInTimeInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "RestoreDBInstanceToPointInTimeInput"} - if s.SourceDBInstanceIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SourceDBInstanceIdentifier")) - } if s.TargetDBInstanceIdentifier == nil { invalidParams.Add(request.NewErrParamRequired("TargetDBInstanceIdentifier")) } @@ -29168,12 +32718,24 @@ func (s *RestoreDBInstanceToPointInTimeInput) SetDBName(v string) *RestoreDBInst return s } +// SetDBParameterGroupName sets the DBParameterGroupName field's value. +func (s *RestoreDBInstanceToPointInTimeInput) SetDBParameterGroupName(v string) *RestoreDBInstanceToPointInTimeInput { + s.DBParameterGroupName = &v + return s +} + // SetDBSubnetGroupName sets the DBSubnetGroupName field's value. func (s *RestoreDBInstanceToPointInTimeInput) SetDBSubnetGroupName(v string) *RestoreDBInstanceToPointInTimeInput { s.DBSubnetGroupName = &v return s } +// SetDeletionProtection sets the DeletionProtection field's value. +func (s *RestoreDBInstanceToPointInTimeInput) SetDeletionProtection(v bool) *RestoreDBInstanceToPointInTimeInput { + s.DeletionProtection = &v + return s +} + // SetDomain sets the Domain field's value. func (s *RestoreDBInstanceToPointInTimeInput) SetDomain(v string) *RestoreDBInstanceToPointInTimeInput { s.Domain = &v @@ -29258,6 +32820,12 @@ func (s *RestoreDBInstanceToPointInTimeInput) SetSourceDBInstanceIdentifier(v st return s } +// SetSourceDbiResourceId sets the SourceDbiResourceId field's value. +func (s *RestoreDBInstanceToPointInTimeInput) SetSourceDbiResourceId(v string) *RestoreDBInstanceToPointInTimeInput { + s.SourceDbiResourceId = &v + return s +} + // SetStorageType sets the StorageType field's value. func (s *RestoreDBInstanceToPointInTimeInput) SetStorageType(v string) *RestoreDBInstanceToPointInTimeInput { s.StorageType = &v @@ -29300,6 +32868,12 @@ func (s *RestoreDBInstanceToPointInTimeInput) SetUseLatestRestorableTime(v bool) return s } +// SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. +func (s *RestoreDBInstanceToPointInTimeInput) SetVpcSecurityGroupIds(v []*string) *RestoreDBInstanceToPointInTimeInput { + s.VpcSecurityGroupIds = v + return s +} + type RestoreDBInstanceToPointInTimeOutput struct { _ struct{} `type:"structure"` @@ -29325,6 +32899,39 @@ func (s *RestoreDBInstanceToPointInTimeOutput) SetDBInstance(v *DBInstance) *Res return s } +// Earliest and latest time an instance can be restored to: +type RestoreWindow struct { + _ struct{} `type:"structure"` + + // The earliest time you can restore an instance to. + EarliestTime *time.Time `type:"timestamp"` + + // The latest time you can restore an instance to. + LatestTime *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s RestoreWindow) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RestoreWindow) GoString() string { + return s.String() +} + +// SetEarliestTime sets the EarliestTime field's value. +func (s *RestoreWindow) SetEarliestTime(v time.Time) *RestoreWindow { + s.EarliestTime = &v + return s +} + +// SetLatestTime sets the LatestTime field's value. +func (s *RestoreWindow) SetLatestTime(v time.Time) *RestoreWindow { + s.LatestTime = &v + return s +} + type RevokeDBSecurityGroupIngressInput struct { _ struct{} `type:"structure"` @@ -29604,6 +33211,71 @@ func (s *SourceRegion) SetStatus(v string) *SourceRegion { return s } +type StartDBClusterInput struct { + _ struct{} `type:"structure"` + + // The DB cluster identifier of the Amazon Aurora DB cluster to be started. + // This parameter is stored as a lowercase string. + // + // DBClusterIdentifier is a required field + DBClusterIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s StartDBClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartDBClusterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartDBClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartDBClusterInput"} + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *StartDBClusterInput) SetDBClusterIdentifier(v string) *StartDBClusterInput { + s.DBClusterIdentifier = &v + return s +} + +type StartDBClusterOutput struct { + _ struct{} `type:"structure"` + + // Contains the details of an Amazon Aurora DB cluster. + // + // This data type is used as a response element in the DescribeDBClusters, StopDBCluster, + // and StartDBCluster actions. + DBCluster *DBCluster `type:"structure"` +} + +// String returns the string representation +func (s StartDBClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartDBClusterOutput) GoString() string { + return s.String() +} + +// SetDBCluster sets the DBCluster field's value. +func (s *StartDBClusterOutput) SetDBCluster(v *DBCluster) *StartDBClusterOutput { + s.DBCluster = v + return s +} + type StartDBInstanceInput struct { _ struct{} `type:"structure"` @@ -29667,6 +33339,71 @@ func (s *StartDBInstanceOutput) SetDBInstance(v *DBInstance) *StartDBInstanceOut return s } +type StopDBClusterInput struct { + _ struct{} `type:"structure"` + + // The DB cluster identifier of the Amazon Aurora DB cluster to be stopped. + // This parameter is stored as a lowercase string. + // + // DBClusterIdentifier is a required field + DBClusterIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s StopDBClusterInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopDBClusterInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopDBClusterInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopDBClusterInput"} + if s.DBClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("DBClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDBClusterIdentifier sets the DBClusterIdentifier field's value. +func (s *StopDBClusterInput) SetDBClusterIdentifier(v string) *StopDBClusterInput { + s.DBClusterIdentifier = &v + return s +} + +type StopDBClusterOutput struct { + _ struct{} `type:"structure"` + + // Contains the details of an Amazon Aurora DB cluster. + // + // This data type is used as a response element in the DescribeDBClusters, StopDBCluster, + // and StartDBCluster actions. + DBCluster *DBCluster `type:"structure"` +} + +// String returns the string representation +func (s StopDBClusterOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopDBClusterOutput) GoString() string { + return s.String() +} + +// SetDBCluster sets the DBCluster field's value. +func (s *StopDBClusterOutput) SetDBCluster(v *DBCluster) *StopDBClusterOutput { + s.DBCluster = v + return s +} + type StopDBInstanceInput struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/rds/errors.go b/vendor/github.com/aws/aws-sdk-go/service/rds/errors.go index 397179121e..2bfd712936 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/rds/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/rds/errors.go @@ -49,6 +49,24 @@ const ( // BacktrackIdentifier doesn't refer to an existing backtrack. ErrCodeDBClusterBacktrackNotFoundFault = "DBClusterBacktrackNotFoundFault" + // ErrCodeDBClusterEndpointAlreadyExistsFault for service response error code + // "DBClusterEndpointAlreadyExistsFault". + // + // The specified custom endpoint can't be created because it already exists. + ErrCodeDBClusterEndpointAlreadyExistsFault = "DBClusterEndpointAlreadyExistsFault" + + // ErrCodeDBClusterEndpointNotFoundFault for service response error code + // "DBClusterEndpointNotFoundFault". + // + // The specified custom endpoint doesn't exist. + ErrCodeDBClusterEndpointNotFoundFault = "DBClusterEndpointNotFoundFault" + + // ErrCodeDBClusterEndpointQuotaExceededFault for service response error code + // "DBClusterEndpointQuotaExceededFault". + // + // The cluster already has the maximum number of custom endpoints. + ErrCodeDBClusterEndpointQuotaExceededFault = "DBClusterEndpointQuotaExceededFault" + // ErrCodeDBClusterNotFoundFault for service response error code // "DBClusterNotFoundFault". // @@ -108,6 +126,20 @@ const ( // The user already has a DB instance with the given identifier. ErrCodeDBInstanceAlreadyExistsFault = "DBInstanceAlreadyExists" + // ErrCodeDBInstanceAutomatedBackupNotFoundFault for service response error code + // "DBInstanceAutomatedBackupNotFound". + // + // No automated backup for this DB instance was found. + ErrCodeDBInstanceAutomatedBackupNotFoundFault = "DBInstanceAutomatedBackupNotFound" + + // ErrCodeDBInstanceAutomatedBackupQuotaExceededFault for service response error code + // "DBInstanceAutomatedBackupQuotaExceeded". + // + // The quota for retained automated backups was exceeded. This prevents you + // from retaining any additional automated backups. The retained automated backups + // quota is the same as your DB Instance quota. + ErrCodeDBInstanceAutomatedBackupQuotaExceededFault = "DBInstanceAutomatedBackupQuotaExceeded" + // ErrCodeDBInstanceNotFoundFault for service response error code // "DBInstanceNotFound". // @@ -235,6 +267,18 @@ const ( // You have reached the maximum number of event subscriptions. ErrCodeEventSubscriptionQuotaExceededFault = "EventSubscriptionQuotaExceeded" + // ErrCodeGlobalClusterAlreadyExistsFault for service response error code + // "GlobalClusterAlreadyExistsFault". + ErrCodeGlobalClusterAlreadyExistsFault = "GlobalClusterAlreadyExistsFault" + + // ErrCodeGlobalClusterNotFoundFault for service response error code + // "GlobalClusterNotFoundFault". + ErrCodeGlobalClusterNotFoundFault = "GlobalClusterNotFoundFault" + + // ErrCodeGlobalClusterQuotaExceededFault for service response error code + // "GlobalClusterQuotaExceededFault". + ErrCodeGlobalClusterQuotaExceededFault = "GlobalClusterQuotaExceededFault" + // ErrCodeInstanceQuotaExceededFault for service response error code // "InstanceQuotaExceeded". // @@ -269,6 +313,13 @@ const ( // values are 2, 4, 8, 16, 32, 64, 128, and 256. ErrCodeInvalidDBClusterCapacityFault = "InvalidDBClusterCapacityFault" + // ErrCodeInvalidDBClusterEndpointStateFault for service response error code + // "InvalidDBClusterEndpointStateFault". + // + // The requested operation can't be performed on the endpoint while the endpoint + // is in this state. + ErrCodeInvalidDBClusterEndpointStateFault = "InvalidDBClusterEndpointStateFault" + // ErrCodeInvalidDBClusterSnapshotStateFault for service response error code // "InvalidDBClusterSnapshotStateFault". // @@ -278,13 +329,20 @@ const ( // ErrCodeInvalidDBClusterStateFault for service response error code // "InvalidDBClusterStateFault". // - // The DB cluster isn't in a valid state. + // The requested operation can't be performed while the cluster is in this state. ErrCodeInvalidDBClusterStateFault = "InvalidDBClusterStateFault" + // ErrCodeInvalidDBInstanceAutomatedBackupStateFault for service response error code + // "InvalidDBInstanceAutomatedBackupState". + // + // The automated backup is in an invalid state. For example, this automated + // backup is associated with an active instance. + ErrCodeInvalidDBInstanceAutomatedBackupStateFault = "InvalidDBInstanceAutomatedBackupState" + // ErrCodeInvalidDBInstanceStateFault for service response error code // "InvalidDBInstanceState". // - // The specified DB instance isn't in the available state. + // The DB instance isn't in a valid state. ErrCodeInvalidDBInstanceStateFault = "InvalidDBInstanceState" // ErrCodeInvalidDBParameterGroupStateFault for service response error code @@ -333,6 +391,10 @@ const ( // retry the action. ErrCodeInvalidEventSubscriptionStateFault = "InvalidEventSubscriptionState" + // ErrCodeInvalidGlobalClusterStateFault for service response error code + // "InvalidGlobalClusterStateFault". + ErrCodeInvalidGlobalClusterStateFault = "InvalidGlobalClusterStateFault" + // ErrCodeInvalidOptionGroupStateFault for service response error code // "InvalidOptionGroupStateFault". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go b/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go index c57085cf46..8e4ad1925d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/redshift/api.go @@ -3,6 +3,7 @@ package redshift import ( + "fmt" "time" "github.com/aws/aws-sdk-go/aws" @@ -17,7 +18,7 @@ const opAcceptReservedNodeExchange = "AcceptReservedNodeExchange" // AcceptReservedNodeExchangeRequest generates a "aws/request.Request" representing the // client's request for the AcceptReservedNodeExchange operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -117,7 +118,7 @@ const opAuthorizeClusterSecurityGroupIngress = "AuthorizeClusterSecurityGroupIng // AuthorizeClusterSecurityGroupIngressRequest generates a "aws/request.Request" representing the // client's request for the AuthorizeClusterSecurityGroupIngress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -165,7 +166,7 @@ func (c *Redshift) AuthorizeClusterSecurityGroupIngressRequest(input *AuthorizeC // // If you authorize access to an Amazon EC2 security group, specify EC2SecurityGroupName // and EC2SecurityGroupOwnerId. The Amazon EC2 security group and Amazon Redshift -// cluster must be in the same AWS region. +// cluster must be in the same AWS Region. // // If you authorize access to a CIDR/IP address range, specify CIDRIP. For an // overview of CIDR blocks, see the Wikipedia article on Classless Inter-Domain @@ -226,7 +227,7 @@ const opAuthorizeSnapshotAccess = "AuthorizeSnapshotAccess" // AuthorizeSnapshotAccessRequest generates a "aws/request.Request" representing the // client's request for the AuthorizeSnapshotAccess operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -322,12 +323,265 @@ func (c *Redshift) AuthorizeSnapshotAccessWithContext(ctx aws.Context, input *Au return out, req.Send() } +const opBatchDeleteClusterSnapshots = "BatchDeleteClusterSnapshots" + +// BatchDeleteClusterSnapshotsRequest generates a "aws/request.Request" representing the +// client's request for the BatchDeleteClusterSnapshots 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 BatchDeleteClusterSnapshots for more information on using the BatchDeleteClusterSnapshots +// 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 BatchDeleteClusterSnapshotsRequest method. +// req, resp := client.BatchDeleteClusterSnapshotsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/BatchDeleteClusterSnapshots +func (c *Redshift) BatchDeleteClusterSnapshotsRequest(input *BatchDeleteClusterSnapshotsInput) (req *request.Request, output *BatchDeleteClusterSnapshotsOutput) { + op := &request.Operation{ + Name: opBatchDeleteClusterSnapshots, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &BatchDeleteClusterSnapshotsInput{} + } + + output = &BatchDeleteClusterSnapshotsOutput{} + req = c.newRequest(op, input, output) + return +} + +// BatchDeleteClusterSnapshots API operation for Amazon Redshift. +// +// Deletes a set of cluster snapshots. +// +// 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 Redshift's +// API operation BatchDeleteClusterSnapshots for usage and error information. +// +// Returned Error Codes: +// * ErrCodeBatchDeleteRequestSizeExceededFault "BatchDeleteRequestSizeExceeded" +// The maximum number for a batch delete of snapshots has been reached. The +// limit is 100. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/BatchDeleteClusterSnapshots +func (c *Redshift) BatchDeleteClusterSnapshots(input *BatchDeleteClusterSnapshotsInput) (*BatchDeleteClusterSnapshotsOutput, error) { + req, out := c.BatchDeleteClusterSnapshotsRequest(input) + return out, req.Send() +} + +// BatchDeleteClusterSnapshotsWithContext is the same as BatchDeleteClusterSnapshots with the addition of +// the ability to pass a context and additional request options. +// +// See BatchDeleteClusterSnapshots 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 *Redshift) BatchDeleteClusterSnapshotsWithContext(ctx aws.Context, input *BatchDeleteClusterSnapshotsInput, opts ...request.Option) (*BatchDeleteClusterSnapshotsOutput, error) { + req, out := c.BatchDeleteClusterSnapshotsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opBatchModifyClusterSnapshots = "BatchModifyClusterSnapshots" + +// BatchModifyClusterSnapshotsRequest generates a "aws/request.Request" representing the +// client's request for the BatchModifyClusterSnapshots 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 BatchModifyClusterSnapshots for more information on using the BatchModifyClusterSnapshots +// 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 BatchModifyClusterSnapshotsRequest method. +// req, resp := client.BatchModifyClusterSnapshotsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/BatchModifyClusterSnapshots +func (c *Redshift) BatchModifyClusterSnapshotsRequest(input *BatchModifyClusterSnapshotsInput) (req *request.Request, output *BatchModifyClusterSnapshotsOutput) { + op := &request.Operation{ + Name: opBatchModifyClusterSnapshots, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &BatchModifyClusterSnapshotsInput{} + } + + output = &BatchModifyClusterSnapshotsOutput{} + req = c.newRequest(op, input, output) + return +} + +// BatchModifyClusterSnapshots API operation for Amazon Redshift. +// +// Modifies the settings for a list of snapshots. +// +// 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 Redshift's +// API operation BatchModifyClusterSnapshots for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRetentionPeriodFault "InvalidRetentionPeriodFault" +// The retention period specified is either in the past or is not a valid value. +// +// The value must be either -1 or an integer between 1 and 3,653. +// +// * ErrCodeBatchModifyClusterSnapshotsLimitExceededFault "BatchModifyClusterSnapshotsLimitExceededFault" +// The maximum number for snapshot identifiers has been reached. The limit is +// 100. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/BatchModifyClusterSnapshots +func (c *Redshift) BatchModifyClusterSnapshots(input *BatchModifyClusterSnapshotsInput) (*BatchModifyClusterSnapshotsOutput, error) { + req, out := c.BatchModifyClusterSnapshotsRequest(input) + return out, req.Send() +} + +// BatchModifyClusterSnapshotsWithContext is the same as BatchModifyClusterSnapshots with the addition of +// the ability to pass a context and additional request options. +// +// See BatchModifyClusterSnapshots 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 *Redshift) BatchModifyClusterSnapshotsWithContext(ctx aws.Context, input *BatchModifyClusterSnapshotsInput, opts ...request.Option) (*BatchModifyClusterSnapshotsOutput, error) { + req, out := c.BatchModifyClusterSnapshotsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCancelResize = "CancelResize" + +// CancelResizeRequest generates a "aws/request.Request" representing the +// client's request for the CancelResize 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 CancelResize for more information on using the CancelResize +// 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 CancelResizeRequest method. +// req, resp := client.CancelResizeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CancelResize +func (c *Redshift) CancelResizeRequest(input *CancelResizeInput) (req *request.Request, output *CancelResizeOutput) { + op := &request.Operation{ + Name: opCancelResize, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CancelResizeInput{} + } + + output = &CancelResizeOutput{} + req = c.newRequest(op, input, output) + return +} + +// CancelResize API operation for Amazon Redshift. +// +// Cancels a resize operation. +// +// 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 Redshift's +// API operation CancelResize for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClusterNotFoundFault "ClusterNotFound" +// The ClusterIdentifier parameter does not refer to an existing cluster. +// +// * ErrCodeResizeNotFoundFault "ResizeNotFound" +// A resize operation for the specified cluster is not found. +// +// * ErrCodeInvalidClusterStateFault "InvalidClusterState" +// The specified cluster is not in the available state. +// +// * ErrCodeUnsupportedOperationFault "UnsupportedOperation" +// The requested operation isn't supported. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CancelResize +func (c *Redshift) CancelResize(input *CancelResizeInput) (*CancelResizeOutput, error) { + req, out := c.CancelResizeRequest(input) + return out, req.Send() +} + +// CancelResizeWithContext is the same as CancelResize with the addition of +// the ability to pass a context and additional request options. +// +// See CancelResize 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 *Redshift) CancelResizeWithContext(ctx aws.Context, input *CancelResizeInput, opts ...request.Option) (*CancelResizeOutput, error) { + req, out := c.CancelResizeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCopyClusterSnapshot = "CopyClusterSnapshot" // CopyClusterSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CopyClusterSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -403,6 +657,11 @@ func (c *Redshift) CopyClusterSnapshotRequest(input *CopyClusterSnapshotInput) ( // The request would result in the user exceeding the allowed number of cluster // snapshots. // +// * ErrCodeInvalidRetentionPeriodFault "InvalidRetentionPeriodFault" +// The retention period specified is either in the past or is not a valid value. +// +// The value must be either -1 or an integer between 1 and 3,653. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CopyClusterSnapshot func (c *Redshift) CopyClusterSnapshot(input *CopyClusterSnapshotInput) (*CopyClusterSnapshotOutput, error) { req, out := c.CopyClusterSnapshotRequest(input) @@ -430,7 +689,7 @@ const opCreateCluster = "CreateCluster" // CreateClusterRequest generates a "aws/request.Request" representing the // client's request for the CreateCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -540,8 +799,7 @@ func (c *Redshift) CreateClusterRequest(input *CreateClusterInput) (req *request // The Elastic IP (EIP) is invalid or cannot be found. // // * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// The number of tables in your source cluster exceeds the limit for the target -// cluster. Resize to a larger cluster node type. +// You have exceeded the number of tags allowed. // // * ErrCodeInvalidTagFault "InvalidTagFault" // The tag is invalid. @@ -556,6 +814,14 @@ func (c *Redshift) CreateClusterRequest(input *CreateClusterInput) (req *request // * ErrCodeInvalidClusterTrackFault "InvalidClusterTrack" // The provided cluster track name is not valid. // +// * ErrCodeSnapshotScheduleNotFoundFault "SnapshotScheduleNotFound" +// We could not find the specified snapshot schedule. +// +// * ErrCodeInvalidRetentionPeriodFault "InvalidRetentionPeriodFault" +// The retention period specified is either in the past or is not a valid value. +// +// The value must be either -1 or an integer between 1 and 3,653. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CreateCluster func (c *Redshift) CreateCluster(input *CreateClusterInput) (*CreateClusterOutput, error) { req, out := c.CreateClusterRequest(input) @@ -583,7 +849,7 @@ const opCreateClusterParameterGroup = "CreateClusterParameterGroup" // CreateClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateClusterParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -652,8 +918,7 @@ func (c *Redshift) CreateClusterParameterGroupRequest(input *CreateClusterParame // A cluster parameter group with the same name already exists. // // * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// The number of tables in your source cluster exceeds the limit for the target -// cluster. Resize to a larger cluster node type. +// You have exceeded the number of tags allowed. // // * ErrCodeInvalidTagFault "InvalidTagFault" // The tag is invalid. @@ -685,7 +950,7 @@ const opCreateClusterSecurityGroup = "CreateClusterSecurityGroup" // CreateClusterSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateClusterSecurityGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -749,8 +1014,7 @@ func (c *Redshift) CreateClusterSecurityGroupRequest(input *CreateClusterSecurit // in the Amazon Redshift Cluster Management Guide. // // * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// The number of tables in your source cluster exceeds the limit for the target -// cluster. Resize to a larger cluster node type. +// You have exceeded the number of tags allowed. // // * ErrCodeInvalidTagFault "InvalidTagFault" // The tag is invalid. @@ -782,7 +1046,7 @@ const opCreateClusterSnapshot = "CreateClusterSnapshot" // CreateClusterSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateClusterSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -851,12 +1115,16 @@ func (c *Redshift) CreateClusterSnapshotRequest(input *CreateClusterSnapshotInpu // snapshots. // // * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// The number of tables in your source cluster exceeds the limit for the target -// cluster. Resize to a larger cluster node type. +// You have exceeded the number of tags allowed. // // * ErrCodeInvalidTagFault "InvalidTagFault" // The tag is invalid. // +// * ErrCodeInvalidRetentionPeriodFault "InvalidRetentionPeriodFault" +// The retention period specified is either in the past or is not a valid value. +// +// The value must be either -1 or an integer between 1 and 3,653. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CreateClusterSnapshot func (c *Redshift) CreateClusterSnapshot(input *CreateClusterSnapshotInput) (*CreateClusterSnapshotOutput, error) { req, out := c.CreateClusterSnapshotRequest(input) @@ -884,7 +1152,7 @@ const opCreateClusterSubnetGroup = "CreateClusterSubnetGroup" // CreateClusterSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateClusterSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -962,8 +1230,7 @@ func (c *Redshift) CreateClusterSubnetGroupRequest(input *CreateClusterSubnetGro // Your account is not authorized to perform the requested operation. // // * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// The number of tables in your source cluster exceeds the limit for the target -// cluster. Resize to a larger cluster node type. +// You have exceeded the number of tags allowed. // // * ErrCodeInvalidTagFault "InvalidTagFault" // The tag is invalid. @@ -999,7 +1266,7 @@ const opCreateEventSubscription = "CreateEventSubscription" // CreateEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the CreateEventSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1107,8 +1374,7 @@ func (c *Redshift) CreateEventSubscriptionRequest(input *CreateEventSubscription // The specified Amazon Redshift event source could not be found. // // * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// The number of tables in your source cluster exceeds the limit for the target -// cluster. Resize to a larger cluster node type. +// You have exceeded the number of tags allowed. // // * ErrCodeInvalidTagFault "InvalidTagFault" // The tag is invalid. @@ -1140,7 +1406,7 @@ const opCreateHsmClientCertificate = "CreateHsmClientCertificate" // CreateHsmClientCertificateRequest generates a "aws/request.Request" representing the // client's request for the CreateHsmClientCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1207,8 +1473,7 @@ func (c *Redshift) CreateHsmClientCertificateRequest(input *CreateHsmClientCerti // in the Amazon Redshift Cluster Management Guide. // // * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// The number of tables in your source cluster exceeds the limit for the target -// cluster. Resize to a larger cluster node type. +// You have exceeded the number of tags allowed. // // * ErrCodeInvalidTagFault "InvalidTagFault" // The tag is invalid. @@ -1240,7 +1505,7 @@ const opCreateHsmConfiguration = "CreateHsmConfiguration" // CreateHsmConfigurationRequest generates a "aws/request.Request" representing the // client's request for the CreateHsmConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1308,8 +1573,7 @@ func (c *Redshift) CreateHsmConfigurationRequest(input *CreateHsmConfigurationIn // in the Amazon Redshift Cluster Management Guide. // // * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// The number of tables in your source cluster exceeds the limit for the target -// cluster. Resize to a larger cluster node type. +// You have exceeded the number of tags allowed. // // * ErrCodeInvalidTagFault "InvalidTagFault" // The tag is invalid. @@ -1341,7 +1605,7 @@ const opCreateSnapshotCopyGrant = "CreateSnapshotCopyGrant" // CreateSnapshotCopyGrantRequest generates a "aws/request.Request" representing the // client's request for the CreateSnapshotCopyGrant operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1408,8 +1672,7 @@ func (c *Redshift) CreateSnapshotCopyGrantRequest(input *CreateSnapshotCopyGrant // The encryption key has exceeded its grant limit in AWS KMS. // // * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// The number of tables in your source cluster exceeds the limit for the target -// cluster. Resize to a larger cluster node type. +// You have exceeded the number of tags allowed. // // * ErrCodeInvalidTagFault "InvalidTagFault" // The tag is invalid. @@ -1440,12 +1703,103 @@ func (c *Redshift) CreateSnapshotCopyGrantWithContext(ctx aws.Context, input *Cr return out, req.Send() } +const opCreateSnapshotSchedule = "CreateSnapshotSchedule" + +// CreateSnapshotScheduleRequest generates a "aws/request.Request" representing the +// client's request for the CreateSnapshotSchedule 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 CreateSnapshotSchedule for more information on using the CreateSnapshotSchedule +// 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 CreateSnapshotScheduleRequest method. +// req, resp := client.CreateSnapshotScheduleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CreateSnapshotSchedule +func (c *Redshift) CreateSnapshotScheduleRequest(input *CreateSnapshotScheduleInput) (req *request.Request, output *CreateSnapshotScheduleOutput) { + op := &request.Operation{ + Name: opCreateSnapshotSchedule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateSnapshotScheduleInput{} + } + + output = &CreateSnapshotScheduleOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateSnapshotSchedule API operation for Amazon Redshift. +// +// Creates a new snapshot schedule. +// +// 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 Redshift's +// API operation CreateSnapshotSchedule for usage and error information. +// +// Returned Error Codes: +// * ErrCodeSnapshotScheduleAlreadyExistsFault "SnapshotScheduleAlreadyExists" +// The specified snapshot schedule already exists. +// +// * ErrCodeInvalidScheduleFault "InvalidSchedule" +// The schedule you submitted isn't valid. +// +// * ErrCodeSnapshotScheduleQuotaExceededFault "SnapshotScheduleQuotaExceeded" +// You have exceeded the quota of snapshot schedules. +// +// * ErrCodeTagLimitExceededFault "TagLimitExceededFault" +// You have exceeded the number of tags allowed. +// +// * ErrCodeScheduleDefinitionTypeUnsupportedFault "ScheduleDefinitionTypeUnsupported" +// The definition you submitted is not supported. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/CreateSnapshotSchedule +func (c *Redshift) CreateSnapshotSchedule(input *CreateSnapshotScheduleInput) (*CreateSnapshotScheduleOutput, error) { + req, out := c.CreateSnapshotScheduleRequest(input) + return out, req.Send() +} + +// CreateSnapshotScheduleWithContext is the same as CreateSnapshotSchedule with the addition of +// the ability to pass a context and additional request options. +// +// See CreateSnapshotSchedule 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 *Redshift) CreateSnapshotScheduleWithContext(ctx aws.Context, input *CreateSnapshotScheduleInput, opts ...request.Option) (*CreateSnapshotScheduleOutput, error) { + req, out := c.CreateSnapshotScheduleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateTags = "CreateTags" // CreateTagsRequest generates a "aws/request.Request" representing the // client's request for the CreateTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1479,8 +1833,7 @@ func (c *Redshift) CreateTagsRequest(input *CreateTagsInput) (req *request.Reque output = &CreateTagsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1503,8 +1856,7 @@ func (c *Redshift) CreateTagsRequest(input *CreateTagsInput) (req *request.Reque // // Returned Error Codes: // * ErrCodeTagLimitExceededFault "TagLimitExceededFault" -// The number of tables in your source cluster exceeds the limit for the target -// cluster. Resize to a larger cluster node type. +// You have exceeded the number of tags allowed. // // * ErrCodeResourceNotFoundFault "ResourceNotFoundFault" // The resource could not be found. @@ -1539,7 +1891,7 @@ const opDeleteCluster = "DeleteCluster" // DeleteClusterRequest generates a "aws/request.Request" representing the // client's request for the DeleteCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1618,6 +1970,11 @@ func (c *Redshift) DeleteClusterRequest(input *DeleteClusterInput) (req *request // The request would result in the user exceeding the allowed number of cluster // snapshots. // +// * ErrCodeInvalidRetentionPeriodFault "InvalidRetentionPeriodFault" +// The retention period specified is either in the past or is not a valid value. +// +// The value must be either -1 or an integer between 1 and 3,653. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DeleteCluster func (c *Redshift) DeleteCluster(input *DeleteClusterInput) (*DeleteClusterOutput, error) { req, out := c.DeleteClusterRequest(input) @@ -1645,7 +2002,7 @@ const opDeleteClusterParameterGroup = "DeleteClusterParameterGroup" // DeleteClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteClusterParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1679,8 +2036,7 @@ func (c *Redshift) DeleteClusterParameterGroupRequest(input *DeleteClusterParame output = &DeleteClusterParameterGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1733,7 +2089,7 @@ const opDeleteClusterSecurityGroup = "DeleteClusterSecurityGroup" // DeleteClusterSecurityGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteClusterSecurityGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1767,8 +2123,7 @@ func (c *Redshift) DeleteClusterSecurityGroupRequest(input *DeleteClusterSecurit output = &DeleteClusterSecurityGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1825,7 +2180,7 @@ const opDeleteClusterSnapshot = "DeleteClusterSnapshot" // DeleteClusterSnapshotRequest generates a "aws/request.Request" representing the // client's request for the DeleteClusterSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1915,7 +2270,7 @@ const opDeleteClusterSubnetGroup = "DeleteClusterSubnetGroup" // DeleteClusterSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteClusterSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1949,8 +2304,7 @@ func (c *Redshift) DeleteClusterSubnetGroupRequest(input *DeleteClusterSubnetGro output = &DeleteClusterSubnetGroupOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2003,7 +2357,7 @@ const opDeleteEventSubscription = "DeleteEventSubscription" // DeleteEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the DeleteEventSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2037,8 +2391,7 @@ func (c *Redshift) DeleteEventSubscriptionRequest(input *DeleteEventSubscription output = &DeleteEventSubscriptionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2089,7 +2442,7 @@ const opDeleteHsmClientCertificate = "DeleteHsmClientCertificate" // DeleteHsmClientCertificateRequest generates a "aws/request.Request" representing the // client's request for the DeleteHsmClientCertificate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2123,8 +2476,7 @@ func (c *Redshift) DeleteHsmClientCertificateRequest(input *DeleteHsmClientCerti output = &DeleteHsmClientCertificateOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2174,7 +2526,7 @@ const opDeleteHsmConfiguration = "DeleteHsmConfiguration" // DeleteHsmConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteHsmConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2208,8 +2560,7 @@ func (c *Redshift) DeleteHsmConfigurationRequest(input *DeleteHsmConfigurationIn output = &DeleteHsmConfigurationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2259,7 +2610,7 @@ const opDeleteSnapshotCopyGrant = "DeleteSnapshotCopyGrant" // DeleteSnapshotCopyGrantRequest generates a "aws/request.Request" representing the // client's request for the DeleteSnapshotCopyGrant operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2293,8 +2644,7 @@ func (c *Redshift) DeleteSnapshotCopyGrantRequest(input *DeleteSnapshotCopyGrant output = &DeleteSnapshotCopyGrantOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2340,35 +2690,118 @@ func (c *Redshift) DeleteSnapshotCopyGrantWithContext(ctx aws.Context, input *De return out, req.Send() } -const opDeleteTags = "DeleteTags" +const opDeleteSnapshotSchedule = "DeleteSnapshotSchedule" -// DeleteTagsRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTags operation. The "output" return +// DeleteSnapshotScheduleRequest generates a "aws/request.Request" representing the +// client's request for the DeleteSnapshotSchedule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 DeleteTags for more information on using the DeleteTags +// See DeleteSnapshotSchedule for more information on using the DeleteSnapshotSchedule // 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 DeleteTagsRequest method. -// req, resp := client.DeleteTagsRequest(params) +// // Example sending a request using the DeleteSnapshotScheduleRequest method. +// req, resp := client.DeleteSnapshotScheduleRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DeleteTags -func (c *Redshift) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, output *DeleteTagsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DeleteSnapshotSchedule +func (c *Redshift) DeleteSnapshotScheduleRequest(input *DeleteSnapshotScheduleInput) (req *request.Request, output *DeleteSnapshotScheduleOutput) { op := &request.Operation{ - Name: opDeleteTags, + Name: opDeleteSnapshotSchedule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteSnapshotScheduleInput{} + } + + output = &DeleteSnapshotScheduleOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteSnapshotSchedule API operation for Amazon Redshift. +// +// Deletes a snapshot schedule. +// +// 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 Redshift's +// API operation DeleteSnapshotSchedule for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidClusterSnapshotScheduleStateFault "InvalidClusterSnapshotScheduleState" +// The cluster snapshot schedule state is not valid. +// +// * ErrCodeSnapshotScheduleNotFoundFault "SnapshotScheduleNotFound" +// We could not find the specified snapshot schedule. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DeleteSnapshotSchedule +func (c *Redshift) DeleteSnapshotSchedule(input *DeleteSnapshotScheduleInput) (*DeleteSnapshotScheduleOutput, error) { + req, out := c.DeleteSnapshotScheduleRequest(input) + return out, req.Send() +} + +// DeleteSnapshotScheduleWithContext is the same as DeleteSnapshotSchedule with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteSnapshotSchedule 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 *Redshift) DeleteSnapshotScheduleWithContext(ctx aws.Context, input *DeleteSnapshotScheduleInput, opts ...request.Option) (*DeleteSnapshotScheduleOutput, error) { + req, out := c.DeleteSnapshotScheduleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteTags = "DeleteTags" + +// DeleteTagsRequest generates a "aws/request.Request" representing the +// client's request for the DeleteTags 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 DeleteTags for more information on using the DeleteTags +// 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 DeleteTagsRequest method. +// req, resp := client.DeleteTagsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DeleteTags +func (c *Redshift) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, output *DeleteTagsOutput) { + op := &request.Operation{ + Name: opDeleteTags, HTTPMethod: "POST", HTTPPath: "/", } @@ -2379,8 +2812,7 @@ func (c *Redshift) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Reque output = &DeleteTagsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2425,12 +2857,86 @@ func (c *Redshift) DeleteTagsWithContext(ctx aws.Context, input *DeleteTagsInput return out, req.Send() } +const opDescribeAccountAttributes = "DescribeAccountAttributes" + +// DescribeAccountAttributesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeAccountAttributes 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 DescribeAccountAttributes for more information on using the DescribeAccountAttributes +// 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 DescribeAccountAttributesRequest method. +// req, resp := client.DescribeAccountAttributesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeAccountAttributes +func (c *Redshift) DescribeAccountAttributesRequest(input *DescribeAccountAttributesInput) (req *request.Request, output *DescribeAccountAttributesOutput) { + op := &request.Operation{ + Name: opDescribeAccountAttributes, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeAccountAttributesInput{} + } + + output = &DescribeAccountAttributesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeAccountAttributes API operation for Amazon Redshift. +// +// Returns a list of attributes attached to an 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 Amazon Redshift's +// API operation DescribeAccountAttributes for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeAccountAttributes +func (c *Redshift) DescribeAccountAttributes(input *DescribeAccountAttributesInput) (*DescribeAccountAttributesOutput, error) { + req, out := c.DescribeAccountAttributesRequest(input) + return out, req.Send() +} + +// DescribeAccountAttributesWithContext is the same as DescribeAccountAttributes with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeAccountAttributes 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 *Redshift) DescribeAccountAttributesWithContext(ctx aws.Context, input *DescribeAccountAttributesInput, opts ...request.Option) (*DescribeAccountAttributesOutput, error) { + req, out := c.DescribeAccountAttributesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeClusterDbRevisions = "DescribeClusterDbRevisions" // DescribeClusterDbRevisionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusterDbRevisions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2482,6 +2988,9 @@ func (c *Redshift) DescribeClusterDbRevisionsRequest(input *DescribeClusterDbRev // * ErrCodeClusterNotFoundFault "ClusterNotFound" // The ClusterIdentifier parameter does not refer to an existing cluster. // +// * ErrCodeInvalidClusterStateFault "InvalidClusterState" +// The specified cluster is not in the available state. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeClusterDbRevisions func (c *Redshift) DescribeClusterDbRevisions(input *DescribeClusterDbRevisionsInput) (*DescribeClusterDbRevisionsOutput, error) { req, out := c.DescribeClusterDbRevisionsRequest(input) @@ -2509,7 +3018,7 @@ const opDescribeClusterParameterGroups = "DescribeClusterParameterGroups" // DescribeClusterParameterGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusterParameterGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2665,7 +3174,7 @@ const opDescribeClusterParameters = "DescribeClusterParameters" // DescribeClusterParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusterParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2811,7 +3320,7 @@ const opDescribeClusterSecurityGroups = "DescribeClusterSecurityGroups" // DescribeClusterSecurityGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusterSecurityGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2966,7 +3475,7 @@ const opDescribeClusterSnapshots = "DescribeClusterSnapshots" // DescribeClusterSnapshotsRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusterSnapshots operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3121,7 +3630,7 @@ const opDescribeClusterSubnetGroups = "DescribeClusterSubnetGroups" // DescribeClusterSubnetGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusterSubnetGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3272,7 +3781,7 @@ const opDescribeClusterTracks = "DescribeClusterTracks" // DescribeClusterTracksRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusterTracks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3354,7 +3863,7 @@ const opDescribeClusterVersions = "DescribeClusterVersions" // DescribeClusterVersionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusterVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3488,7 +3997,7 @@ const opDescribeClusters = "DescribeClusters" // DescribeClustersRequest generates a "aws/request.Request" representing the // client's request for the DescribeClusters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3639,7 +4148,7 @@ const opDescribeDefaultClusterParameters = "DescribeDefaultClusterParameters" // DescribeDefaultClusterParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeDefaultClusterParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3773,7 +4282,7 @@ const opDescribeEventCategories = "DescribeEventCategories" // DescribeEventCategoriesRequest generates a "aws/request.Request" representing the // client's request for the DescribeEventCategories operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3849,7 +4358,7 @@ const opDescribeEventSubscriptions = "DescribeEventSubscriptions" // DescribeEventSubscriptionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEventSubscriptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4000,7 +4509,7 @@ const opDescribeEvents = "DescribeEvents" // DescribeEventsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEvents operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4133,7 +4642,7 @@ const opDescribeHsmClientCertificates = "DescribeHsmClientCertificates" // DescribeHsmClientCertificatesRequest generates a "aws/request.Request" representing the // client's request for the DescribeHsmClientCertificates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4283,7 +4792,7 @@ const opDescribeHsmConfigurations = "DescribeHsmConfigurations" // DescribeHsmConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeHsmConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4433,7 +4942,7 @@ const opDescribeLoggingStatus = "DescribeLoggingStatus" // DescribeLoggingStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeLoggingStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4513,7 +5022,7 @@ const opDescribeOrderableClusterOptions = "DescribeOrderableClusterOptions" // DescribeOrderableClusterOptionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeOrderableClusterOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4560,7 +5069,7 @@ func (c *Redshift) DescribeOrderableClusterOptionsRequest(input *DescribeOrderab // // Returns a list of orderable cluster options. Before you create a new cluster // you can use this operation to find what options are available, such as the -// EC2 Availability Zones (AZ) in the specific AWS region that you can specify, +// EC2 Availability Zones (AZ) in the specific AWS Region that you can specify, // and the node types you can request. The node types differ by available storage, // memory, CPU and price. With the cost involved you might want to obtain a // list of cluster options in the specific region and specify values when creating @@ -4651,7 +5160,7 @@ const opDescribeReservedNodeOfferings = "DescribeReservedNodeOfferings" // DescribeReservedNodeOfferingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedNodeOfferings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4802,7 +5311,7 @@ const opDescribeReservedNodes = "DescribeReservedNodes" // DescribeReservedNodesRequest generates a "aws/request.Request" representing the // client's request for the DescribeReservedNodes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4941,7 +5450,7 @@ const opDescribeResize = "DescribeResize" // DescribeResizeRequest generates a "aws/request.Request" representing the // client's request for the DescribeResize operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5029,7 +5538,7 @@ const opDescribeSnapshotCopyGrants = "DescribeSnapshotCopyGrants" // DescribeSnapshotCopyGrantsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSnapshotCopyGrants operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5112,12 +5621,161 @@ func (c *Redshift) DescribeSnapshotCopyGrantsWithContext(ctx aws.Context, input return out, req.Send() } +const opDescribeSnapshotSchedules = "DescribeSnapshotSchedules" + +// DescribeSnapshotSchedulesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeSnapshotSchedules 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 DescribeSnapshotSchedules for more information on using the DescribeSnapshotSchedules +// 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 DescribeSnapshotSchedulesRequest method. +// req, resp := client.DescribeSnapshotSchedulesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeSnapshotSchedules +func (c *Redshift) DescribeSnapshotSchedulesRequest(input *DescribeSnapshotSchedulesInput) (req *request.Request, output *DescribeSnapshotSchedulesOutput) { + op := &request.Operation{ + Name: opDescribeSnapshotSchedules, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeSnapshotSchedulesInput{} + } + + output = &DescribeSnapshotSchedulesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeSnapshotSchedules API operation for Amazon Redshift. +// +// Returns a list of snapshot schedules. +// +// 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 Redshift's +// API operation DescribeSnapshotSchedules for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeSnapshotSchedules +func (c *Redshift) DescribeSnapshotSchedules(input *DescribeSnapshotSchedulesInput) (*DescribeSnapshotSchedulesOutput, error) { + req, out := c.DescribeSnapshotSchedulesRequest(input) + return out, req.Send() +} + +// DescribeSnapshotSchedulesWithContext is the same as DescribeSnapshotSchedules with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeSnapshotSchedules 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 *Redshift) DescribeSnapshotSchedulesWithContext(ctx aws.Context, input *DescribeSnapshotSchedulesInput, opts ...request.Option) (*DescribeSnapshotSchedulesOutput, error) { + req, out := c.DescribeSnapshotSchedulesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeStorage = "DescribeStorage" + +// DescribeStorageRequest generates a "aws/request.Request" representing the +// client's request for the DescribeStorage 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 DescribeStorage for more information on using the DescribeStorage +// 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 DescribeStorageRequest method. +// req, resp := client.DescribeStorageRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeStorage +func (c *Redshift) DescribeStorageRequest(input *DescribeStorageInput) (req *request.Request, output *DescribeStorageOutput) { + op := &request.Operation{ + Name: opDescribeStorage, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeStorageInput{} + } + + output = &DescribeStorageOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeStorage API operation for Amazon Redshift. +// +// Returns the total amount of snapshot usage and provisioned storage for a +// user in megabytes. +// +// 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 Redshift's +// API operation DescribeStorage for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DescribeStorage +func (c *Redshift) DescribeStorage(input *DescribeStorageInput) (*DescribeStorageOutput, error) { + req, out := c.DescribeStorageRequest(input) + return out, req.Send() +} + +// DescribeStorageWithContext is the same as DescribeStorage with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeStorage 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 *Redshift) DescribeStorageWithContext(ctx aws.Context, input *DescribeStorageInput, opts ...request.Option) (*DescribeStorageOutput, error) { + req, out := c.DescribeStorageRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeTableRestoreStatus = "DescribeTableRestoreStatus" // DescribeTableRestoreStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeTableRestoreStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5203,7 +5861,7 @@ const opDescribeTags = "DescribeTags" // DescribeTagsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5307,7 +5965,7 @@ const opDisableLogging = "DisableLogging" // DisableLoggingRequest generates a "aws/request.Request" representing the // client's request for the DisableLogging operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5387,7 +6045,7 @@ const opDisableSnapshotCopy = "DisableSnapshotCopy" // DisableSnapshotCopyRequest generates a "aws/request.Request" representing the // client's request for the DisableSnapshotCopy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5480,7 +6138,7 @@ const opEnableLogging = "EnableLogging" // EnableLoggingRequest generates a "aws/request.Request" representing the // client's request for the EnableLogging operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5576,7 +6234,7 @@ const opEnableSnapshotCopy = "EnableSnapshotCopy" // EnableSnapshotCopyRequest generates a "aws/request.Request" representing the // client's request for the EnableSnapshotCopy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5658,6 +6316,11 @@ func (c *Redshift) EnableSnapshotCopyRequest(input *EnableSnapshotCopyInput) (re // The request cannot be completed because a dependent service is throttling // requests made by Amazon Redshift on your behalf. Wait and retry the request. // +// * ErrCodeInvalidRetentionPeriodFault "InvalidRetentionPeriodFault" +// The retention period specified is either in the past or is not a valid value. +// +// The value must be either -1 or an integer between 1 and 3,653. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/EnableSnapshotCopy func (c *Redshift) EnableSnapshotCopy(input *EnableSnapshotCopyInput) (*EnableSnapshotCopyOutput, error) { req, out := c.EnableSnapshotCopyRequest(input) @@ -5685,7 +6348,7 @@ const opGetClusterCredentials = "GetClusterCredentials" // GetClusterCredentialsRequest generates a "aws/request.Request" representing the // client's request for the GetClusterCredentials operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5790,7 +6453,7 @@ const opGetReservedNodeExchangeOfferings = "GetReservedNodeExchangeOfferings" // GetReservedNodeExchangeOfferingsRequest generates a "aws/request.Request" representing the // client's request for the GetReservedNodeExchangeOfferings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5886,7 +6549,7 @@ const opModifyCluster = "ModifyCluster" // ModifyClusterRequest generates a "aws/request.Request" representing the // client's request for the ModifyCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6005,6 +6668,11 @@ func (c *Redshift) ModifyClusterRequest(input *ModifyClusterInput) (req *request // * ErrCodeInvalidClusterTrackFault "InvalidClusterTrack" // The provided cluster track name is not valid. // +// * ErrCodeInvalidRetentionPeriodFault "InvalidRetentionPeriodFault" +// The retention period specified is either in the past or is not a valid value. +// +// The value must be either -1 or an integer between 1 and 3,653. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyCluster func (c *Redshift) ModifyCluster(input *ModifyClusterInput) (*ModifyClusterOutput, error) { req, out := c.ModifyClusterRequest(input) @@ -6032,7 +6700,7 @@ const opModifyClusterDbRevision = "ModifyClusterDbRevision" // ModifyClusterDbRevisionRequest generates a "aws/request.Request" representing the // client's request for the ModifyClusterDbRevision operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6118,7 +6786,7 @@ const opModifyClusterIamRoles = "ModifyClusterIamRoles" // ModifyClusterIamRolesRequest generates a "aws/request.Request" representing the // client's request for the ModifyClusterIamRoles operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6198,73 +6866,153 @@ func (c *Redshift) ModifyClusterIamRolesWithContext(ctx aws.Context, input *Modi return out, req.Send() } -const opModifyClusterParameterGroup = "ModifyClusterParameterGroup" +const opModifyClusterMaintenance = "ModifyClusterMaintenance" -// ModifyClusterParameterGroupRequest generates a "aws/request.Request" representing the -// client's request for the ModifyClusterParameterGroup operation. The "output" return +// ModifyClusterMaintenanceRequest generates a "aws/request.Request" representing the +// client's request for the ModifyClusterMaintenance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 ModifyClusterParameterGroup for more information on using the ModifyClusterParameterGroup +// See ModifyClusterMaintenance for more information on using the ModifyClusterMaintenance // 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 ModifyClusterParameterGroupRequest method. -// req, resp := client.ModifyClusterParameterGroupRequest(params) +// // Example sending a request using the ModifyClusterMaintenanceRequest method. +// req, resp := client.ModifyClusterMaintenanceRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyClusterParameterGroup -func (c *Redshift) ModifyClusterParameterGroupRequest(input *ModifyClusterParameterGroupInput) (req *request.Request, output *ClusterParameterGroupNameMessage) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyClusterMaintenance +func (c *Redshift) ModifyClusterMaintenanceRequest(input *ModifyClusterMaintenanceInput) (req *request.Request, output *ModifyClusterMaintenanceOutput) { op := &request.Operation{ - Name: opModifyClusterParameterGroup, + Name: opModifyClusterMaintenance, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &ModifyClusterParameterGroupInput{} + input = &ModifyClusterMaintenanceInput{} } - output = &ClusterParameterGroupNameMessage{} + output = &ModifyClusterMaintenanceOutput{} req = c.newRequest(op, input, output) return } -// ModifyClusterParameterGroup API operation for Amazon Redshift. +// ModifyClusterMaintenance API operation for Amazon Redshift. // -// Modifies the parameters of a parameter group. -// -// For more information about parameters and parameter groups, go to Amazon -// Redshift Parameter Groups (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html) -// in the Amazon Redshift Cluster Management Guide. +// Modifies the maintenance settings of a cluster. For example, you can defer +// a maintenance window. You can also update or cancel a deferment. // // 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 Redshift's -// API operation ModifyClusterParameterGroup for usage and error information. +// API operation ModifyClusterMaintenance for usage and error information. // // Returned Error Codes: -// * ErrCodeClusterParameterGroupNotFoundFault "ClusterParameterGroupNotFound" -// The parameter group name does not refer to an existing parameter group. -// -// * ErrCodeInvalidClusterParameterGroupStateFault "InvalidClusterParameterGroupState" -// The cluster parameter group action can not be completed because another task -// is in progress that involves the parameter group. Wait a few moments and -// try the operation again. +// * ErrCodeClusterNotFoundFault "ClusterNotFound" +// The ClusterIdentifier parameter does not refer to an existing cluster. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyClusterParameterGroup +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyClusterMaintenance +func (c *Redshift) ModifyClusterMaintenance(input *ModifyClusterMaintenanceInput) (*ModifyClusterMaintenanceOutput, error) { + req, out := c.ModifyClusterMaintenanceRequest(input) + return out, req.Send() +} + +// ModifyClusterMaintenanceWithContext is the same as ModifyClusterMaintenance with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyClusterMaintenance 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 *Redshift) ModifyClusterMaintenanceWithContext(ctx aws.Context, input *ModifyClusterMaintenanceInput, opts ...request.Option) (*ModifyClusterMaintenanceOutput, error) { + req, out := c.ModifyClusterMaintenanceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opModifyClusterParameterGroup = "ModifyClusterParameterGroup" + +// ModifyClusterParameterGroupRequest generates a "aws/request.Request" representing the +// client's request for the ModifyClusterParameterGroup 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 ModifyClusterParameterGroup for more information on using the ModifyClusterParameterGroup +// 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 ModifyClusterParameterGroupRequest method. +// req, resp := client.ModifyClusterParameterGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyClusterParameterGroup +func (c *Redshift) ModifyClusterParameterGroupRequest(input *ModifyClusterParameterGroupInput) (req *request.Request, output *ClusterParameterGroupNameMessage) { + op := &request.Operation{ + Name: opModifyClusterParameterGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyClusterParameterGroupInput{} + } + + output = &ClusterParameterGroupNameMessage{} + req = c.newRequest(op, input, output) + return +} + +// ModifyClusterParameterGroup API operation for Amazon Redshift. +// +// Modifies the parameters of a parameter group. +// +// For more information about parameters and parameter groups, go to Amazon +// Redshift Parameter Groups (http://docs.aws.amazon.com/redshift/latest/mgmt/working-with-parameter-groups.html) +// in the Amazon Redshift Cluster Management 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 Redshift's +// API operation ModifyClusterParameterGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClusterParameterGroupNotFoundFault "ClusterParameterGroupNotFound" +// The parameter group name does not refer to an existing parameter group. +// +// * ErrCodeInvalidClusterParameterGroupStateFault "InvalidClusterParameterGroupState" +// The cluster parameter group action can not be completed because another task +// is in progress that involves the parameter group. Wait a few moments and +// try the operation again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyClusterParameterGroup func (c *Redshift) ModifyClusterParameterGroup(input *ModifyClusterParameterGroupInput) (*ClusterParameterGroupNameMessage, error) { req, out := c.ModifyClusterParameterGroupRequest(input) return out, req.Send() @@ -6286,12 +7034,186 @@ func (c *Redshift) ModifyClusterParameterGroupWithContext(ctx aws.Context, input return out, req.Send() } +const opModifyClusterSnapshot = "ModifyClusterSnapshot" + +// ModifyClusterSnapshotRequest generates a "aws/request.Request" representing the +// client's request for the ModifyClusterSnapshot 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 ModifyClusterSnapshot for more information on using the ModifyClusterSnapshot +// 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 ModifyClusterSnapshotRequest method. +// req, resp := client.ModifyClusterSnapshotRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyClusterSnapshot +func (c *Redshift) ModifyClusterSnapshotRequest(input *ModifyClusterSnapshotInput) (req *request.Request, output *ModifyClusterSnapshotOutput) { + op := &request.Operation{ + Name: opModifyClusterSnapshot, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyClusterSnapshotInput{} + } + + output = &ModifyClusterSnapshotOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyClusterSnapshot API operation for Amazon Redshift. +// +// Modifies the settings for a snapshot. +// +// 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 Redshift's +// API operation ModifyClusterSnapshot for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidClusterSnapshotStateFault "InvalidClusterSnapshotState" +// The specified cluster snapshot is not in the available state, or other accounts +// are authorized to access the snapshot. +// +// * ErrCodeClusterSnapshotNotFoundFault "ClusterSnapshotNotFound" +// The snapshot identifier does not refer to an existing cluster snapshot. +// +// * ErrCodeInvalidRetentionPeriodFault "InvalidRetentionPeriodFault" +// The retention period specified is either in the past or is not a valid value. +// +// The value must be either -1 or an integer between 1 and 3,653. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyClusterSnapshot +func (c *Redshift) ModifyClusterSnapshot(input *ModifyClusterSnapshotInput) (*ModifyClusterSnapshotOutput, error) { + req, out := c.ModifyClusterSnapshotRequest(input) + return out, req.Send() +} + +// ModifyClusterSnapshotWithContext is the same as ModifyClusterSnapshot with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyClusterSnapshot 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 *Redshift) ModifyClusterSnapshotWithContext(ctx aws.Context, input *ModifyClusterSnapshotInput, opts ...request.Option) (*ModifyClusterSnapshotOutput, error) { + req, out := c.ModifyClusterSnapshotRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opModifyClusterSnapshotSchedule = "ModifyClusterSnapshotSchedule" + +// ModifyClusterSnapshotScheduleRequest generates a "aws/request.Request" representing the +// client's request for the ModifyClusterSnapshotSchedule 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 ModifyClusterSnapshotSchedule for more information on using the ModifyClusterSnapshotSchedule +// 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 ModifyClusterSnapshotScheduleRequest method. +// req, resp := client.ModifyClusterSnapshotScheduleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyClusterSnapshotSchedule +func (c *Redshift) ModifyClusterSnapshotScheduleRequest(input *ModifyClusterSnapshotScheduleInput) (req *request.Request, output *ModifyClusterSnapshotScheduleOutput) { + op := &request.Operation{ + Name: opModifyClusterSnapshotSchedule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyClusterSnapshotScheduleInput{} + } + + output = &ModifyClusterSnapshotScheduleOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// ModifyClusterSnapshotSchedule API operation for Amazon Redshift. +// +// Modifies a snapshot schedule for a cluster. +// +// 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 Redshift's +// API operation ModifyClusterSnapshotSchedule for usage and error information. +// +// Returned Error Codes: +// * ErrCodeClusterNotFoundFault "ClusterNotFound" +// The ClusterIdentifier parameter does not refer to an existing cluster. +// +// * ErrCodeSnapshotScheduleNotFoundFault "SnapshotScheduleNotFound" +// We could not find the specified snapshot schedule. +// +// * ErrCodeInvalidClusterSnapshotScheduleStateFault "InvalidClusterSnapshotScheduleState" +// The cluster snapshot schedule state is not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifyClusterSnapshotSchedule +func (c *Redshift) ModifyClusterSnapshotSchedule(input *ModifyClusterSnapshotScheduleInput) (*ModifyClusterSnapshotScheduleOutput, error) { + req, out := c.ModifyClusterSnapshotScheduleRequest(input) + return out, req.Send() +} + +// ModifyClusterSnapshotScheduleWithContext is the same as ModifyClusterSnapshotSchedule with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyClusterSnapshotSchedule 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 *Redshift) ModifyClusterSnapshotScheduleWithContext(ctx aws.Context, input *ModifyClusterSnapshotScheduleInput, opts ...request.Option) (*ModifyClusterSnapshotScheduleOutput, error) { + req, out := c.ModifyClusterSnapshotScheduleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opModifyClusterSubnetGroup = "ModifyClusterSubnetGroup" // ModifyClusterSubnetGroupRequest generates a "aws/request.Request" representing the // client's request for the ModifyClusterSubnetGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6393,7 +7315,7 @@ const opModifyEventSubscription = "ModifyEventSubscription" // ModifyEventSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the ModifyEventSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6504,7 +7426,7 @@ const opModifySnapshotCopyRetentionPeriod = "ModifySnapshotCopyRetentionPeriod" // ModifySnapshotCopyRetentionPeriodRequest generates a "aws/request.Request" representing the // client's request for the ModifySnapshotCopyRetentionPeriod operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6543,8 +7465,13 @@ func (c *Redshift) ModifySnapshotCopyRetentionPeriodRequest(input *ModifySnapsho // ModifySnapshotCopyRetentionPeriod API operation for Amazon Redshift. // -// Modifies the number of days to retain automated snapshots in the destination -// region after they are copied from the source region. +// Modifies the number of days to retain snapshots in the destination AWS Region +// after they are copied from the source AWS Region. By default, this operation +// only changes the retention period of copied automated snapshots. The retention +// periods for both new and existing copied automated snapshots are updated +// with the new retention period. You can set the manual option to change only +// the retention periods of copied manual snapshots. If you set this option, +// only newly copied manual snapshots have the new retention period. // // 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 @@ -6566,6 +7493,11 @@ func (c *Redshift) ModifySnapshotCopyRetentionPeriodRequest(input *ModifySnapsho // * ErrCodeInvalidClusterStateFault "InvalidClusterState" // The specified cluster is not in the available state. // +// * ErrCodeInvalidRetentionPeriodFault "InvalidRetentionPeriodFault" +// The retention period specified is either in the past or is not a valid value. +// +// The value must be either -1 or an integer between 1 and 3,653. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifySnapshotCopyRetentionPeriod func (c *Redshift) ModifySnapshotCopyRetentionPeriod(input *ModifySnapshotCopyRetentionPeriodInput) (*ModifySnapshotCopyRetentionPeriodOutput, error) { req, out := c.ModifySnapshotCopyRetentionPeriodRequest(input) @@ -6588,124 +7520,210 @@ func (c *Redshift) ModifySnapshotCopyRetentionPeriodWithContext(ctx aws.Context, return out, req.Send() } -const opPurchaseReservedNodeOffering = "PurchaseReservedNodeOffering" +const opModifySnapshotSchedule = "ModifySnapshotSchedule" -// PurchaseReservedNodeOfferingRequest generates a "aws/request.Request" representing the -// client's request for the PurchaseReservedNodeOffering operation. The "output" return +// ModifySnapshotScheduleRequest generates a "aws/request.Request" representing the +// client's request for the ModifySnapshotSchedule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 PurchaseReservedNodeOffering for more information on using the PurchaseReservedNodeOffering +// See ModifySnapshotSchedule for more information on using the ModifySnapshotSchedule // 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 PurchaseReservedNodeOfferingRequest method. -// req, resp := client.PurchaseReservedNodeOfferingRequest(params) +// // Example sending a request using the ModifySnapshotScheduleRequest method. +// req, resp := client.ModifySnapshotScheduleRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/PurchaseReservedNodeOffering -func (c *Redshift) PurchaseReservedNodeOfferingRequest(input *PurchaseReservedNodeOfferingInput) (req *request.Request, output *PurchaseReservedNodeOfferingOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifySnapshotSchedule +func (c *Redshift) ModifySnapshotScheduleRequest(input *ModifySnapshotScheduleInput) (req *request.Request, output *ModifySnapshotScheduleOutput) { op := &request.Operation{ - Name: opPurchaseReservedNodeOffering, + Name: opModifySnapshotSchedule, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &PurchaseReservedNodeOfferingInput{} + input = &ModifySnapshotScheduleInput{} } - output = &PurchaseReservedNodeOfferingOutput{} + output = &ModifySnapshotScheduleOutput{} req = c.newRequest(op, input, output) return } -// PurchaseReservedNodeOffering API operation for Amazon Redshift. -// -// Allows you to purchase reserved nodes. Amazon Redshift offers a predefined -// set of reserved node offerings. You can purchase one or more of the offerings. -// You can call the DescribeReservedNodeOfferings API to obtain the available -// reserved node offerings. You can call this API by providing a specific reserved -// node offering and the number of nodes you want to reserve. +// ModifySnapshotSchedule API operation for Amazon Redshift. // -// For more information about reserved node offerings, go to Purchasing Reserved -// Nodes (http://docs.aws.amazon.com/redshift/latest/mgmt/purchase-reserved-node-instance.html) -// in the Amazon Redshift Cluster Management Guide. +// Modifies a snapshot schedule. Any schedule associated with a cluster is modified +// asynchronously. // // 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 Redshift's -// API operation PurchaseReservedNodeOffering for usage and error information. +// API operation ModifySnapshotSchedule for usage and error information. // // Returned Error Codes: -// * ErrCodeReservedNodeOfferingNotFoundFault "ReservedNodeOfferingNotFound" -// Specified offering does not exist. -// -// * ErrCodeReservedNodeAlreadyExistsFault "ReservedNodeAlreadyExists" -// User already has a reservation with the given identifier. +// * ErrCodeInvalidScheduleFault "InvalidSchedule" +// The schedule you submitted isn't valid. // -// * ErrCodeReservedNodeQuotaExceededFault "ReservedNodeQuotaExceeded" -// Request would exceed the user's compute node quota. For information about -// increasing your quota, go to Limits in Amazon Redshift (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html) -// in the Amazon Redshift Cluster Management Guide. +// * ErrCodeSnapshotScheduleNotFoundFault "SnapshotScheduleNotFound" +// We could not find the specified snapshot schedule. // -// * ErrCodeUnsupportedOperationFault "UnsupportedOperation" -// The requested operation isn't supported. +// * ErrCodeSnapshotScheduleUpdateInProgressFault "SnapshotScheduleUpdateInProgress" +// The specified snapshot schedule is already being updated. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/PurchaseReservedNodeOffering -func (c *Redshift) PurchaseReservedNodeOffering(input *PurchaseReservedNodeOfferingInput) (*PurchaseReservedNodeOfferingOutput, error) { - req, out := c.PurchaseReservedNodeOfferingRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ModifySnapshotSchedule +func (c *Redshift) ModifySnapshotSchedule(input *ModifySnapshotScheduleInput) (*ModifySnapshotScheduleOutput, error) { + req, out := c.ModifySnapshotScheduleRequest(input) return out, req.Send() } -// PurchaseReservedNodeOfferingWithContext is the same as PurchaseReservedNodeOffering with the addition of +// ModifySnapshotScheduleWithContext is the same as ModifySnapshotSchedule with the addition of // the ability to pass a context and additional request options. // -// See PurchaseReservedNodeOffering for details on how to use this API operation. +// See ModifySnapshotSchedule 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 *Redshift) PurchaseReservedNodeOfferingWithContext(ctx aws.Context, input *PurchaseReservedNodeOfferingInput, opts ...request.Option) (*PurchaseReservedNodeOfferingOutput, error) { - req, out := c.PurchaseReservedNodeOfferingRequest(input) +func (c *Redshift) ModifySnapshotScheduleWithContext(ctx aws.Context, input *ModifySnapshotScheduleInput, opts ...request.Option) (*ModifySnapshotScheduleOutput, error) { + req, out := c.ModifySnapshotScheduleRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opRebootCluster = "RebootCluster" +const opPurchaseReservedNodeOffering = "PurchaseReservedNodeOffering" -// RebootClusterRequest generates a "aws/request.Request" representing the -// client's request for the RebootCluster operation. The "output" return +// PurchaseReservedNodeOfferingRequest generates a "aws/request.Request" representing the +// client's request for the PurchaseReservedNodeOffering operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 RebootCluster for more information on using the RebootCluster +// See PurchaseReservedNodeOffering for more information on using the PurchaseReservedNodeOffering // 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 RebootClusterRequest method. -// req, resp := client.RebootClusterRequest(params) -// +// // Example sending a request using the PurchaseReservedNodeOfferingRequest method. +// req, resp := client.PurchaseReservedNodeOfferingRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/PurchaseReservedNodeOffering +func (c *Redshift) PurchaseReservedNodeOfferingRequest(input *PurchaseReservedNodeOfferingInput) (req *request.Request, output *PurchaseReservedNodeOfferingOutput) { + op := &request.Operation{ + Name: opPurchaseReservedNodeOffering, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PurchaseReservedNodeOfferingInput{} + } + + output = &PurchaseReservedNodeOfferingOutput{} + req = c.newRequest(op, input, output) + return +} + +// PurchaseReservedNodeOffering API operation for Amazon Redshift. +// +// Allows you to purchase reserved nodes. Amazon Redshift offers a predefined +// set of reserved node offerings. You can purchase one or more of the offerings. +// You can call the DescribeReservedNodeOfferings API to obtain the available +// reserved node offerings. You can call this API by providing a specific reserved +// node offering and the number of nodes you want to reserve. +// +// For more information about reserved node offerings, go to Purchasing Reserved +// Nodes (http://docs.aws.amazon.com/redshift/latest/mgmt/purchase-reserved-node-instance.html) +// in the Amazon Redshift Cluster Management 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 Redshift's +// API operation PurchaseReservedNodeOffering for usage and error information. +// +// Returned Error Codes: +// * ErrCodeReservedNodeOfferingNotFoundFault "ReservedNodeOfferingNotFound" +// Specified offering does not exist. +// +// * ErrCodeReservedNodeAlreadyExistsFault "ReservedNodeAlreadyExists" +// User already has a reservation with the given identifier. +// +// * ErrCodeReservedNodeQuotaExceededFault "ReservedNodeQuotaExceeded" +// Request would exceed the user's compute node quota. For information about +// increasing your quota, go to Limits in Amazon Redshift (http://docs.aws.amazon.com/redshift/latest/mgmt/amazon-redshift-limits.html) +// in the Amazon Redshift Cluster Management Guide. +// +// * ErrCodeUnsupportedOperationFault "UnsupportedOperation" +// The requested operation isn't supported. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/PurchaseReservedNodeOffering +func (c *Redshift) PurchaseReservedNodeOffering(input *PurchaseReservedNodeOfferingInput) (*PurchaseReservedNodeOfferingOutput, error) { + req, out := c.PurchaseReservedNodeOfferingRequest(input) + return out, req.Send() +} + +// PurchaseReservedNodeOfferingWithContext is the same as PurchaseReservedNodeOffering with the addition of +// the ability to pass a context and additional request options. +// +// See PurchaseReservedNodeOffering 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 *Redshift) PurchaseReservedNodeOfferingWithContext(ctx aws.Context, input *PurchaseReservedNodeOfferingInput, opts ...request.Option) (*PurchaseReservedNodeOfferingOutput, error) { + req, out := c.PurchaseReservedNodeOfferingRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRebootCluster = "RebootCluster" + +// RebootClusterRequest generates a "aws/request.Request" representing the +// client's request for the RebootCluster 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 RebootCluster for more information on using the RebootCluster +// 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 RebootClusterRequest method. +// req, resp := client.RebootClusterRequest(params) +// // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) @@ -6779,7 +7797,7 @@ const opResetClusterParameterGroup = "ResetClusterParameterGroup" // ResetClusterParameterGroupRequest generates a "aws/request.Request" representing the // client's request for the ResetClusterParameterGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6866,7 +7884,7 @@ const opResizeCluster = "ResizeCluster" // ResizeClusterRequest generates a "aws/request.Request" representing the // client's request for the ResizeCluster operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6907,7 +7925,7 @@ func (c *Redshift) ResizeClusterRequest(input *ResizeClusterInput) (req *request // // Changes the size of the cluster. You can change the cluster's type, or change // the number or type of nodes. The default behavior is to use the elastic resize -// method. With an elastic resize your cluster is avaialble for read and write +// method. With an elastic resize, your cluster is available for read and write // operations more quickly than with the classic resize method. // // Elastic resize operations have the following restrictions: @@ -6922,7 +7940,7 @@ func (c *Redshift) ResizeClusterRequest(input *ResizeClusterInput) (req *request // // ds2.8xlarge // -// * The type of nodes you add must match the node type for the cluster. +// * The type of nodes that you add must match the node type for the cluster. // // 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 @@ -6989,7 +8007,7 @@ const opRestoreFromClusterSnapshot = "RestoreFromClusterSnapshot" // RestoreFromClusterSnapshotRequest generates a "aws/request.Request" representing the // client's request for the RestoreFromClusterSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7130,6 +8148,9 @@ func (c *Redshift) RestoreFromClusterSnapshotRequest(input *RestoreFromClusterSn // * ErrCodeInvalidClusterTrackFault "InvalidClusterTrack" // The provided cluster track name is not valid. // +// * ErrCodeSnapshotScheduleNotFoundFault "SnapshotScheduleNotFound" +// We could not find the specified snapshot schedule. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/RestoreFromClusterSnapshot func (c *Redshift) RestoreFromClusterSnapshot(input *RestoreFromClusterSnapshotInput) (*RestoreFromClusterSnapshotOutput, error) { req, out := c.RestoreFromClusterSnapshotRequest(input) @@ -7157,7 +8178,7 @@ const opRestoreTableFromClusterSnapshot = "RestoreTableFromClusterSnapshot" // RestoreTableFromClusterSnapshotRequest generates a "aws/request.Request" representing the // client's request for the RestoreTableFromClusterSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7269,7 +8290,7 @@ const opRevokeClusterSecurityGroupIngress = "RevokeClusterSecurityGroupIngress" // RevokeClusterSecurityGroupIngressRequest generates a "aws/request.Request" representing the // client's request for the RevokeClusterSecurityGroupIngress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7360,7 +8381,7 @@ const opRevokeSnapshotAccess = "RevokeSnapshotAccess" // RevokeSnapshotAccessRequest generates a "aws/request.Request" representing the // client's request for the RevokeSnapshotAccess operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7453,7 +8474,7 @@ const opRotateEncryptionKey = "RotateEncryptionKey" // RotateEncryptionKeyRequest generates a "aws/request.Request" representing the // client's request for the RotateEncryptionKey operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7612,6 +8633,39 @@ func (s *AcceptReservedNodeExchangeOutput) SetExchangedReservedNode(v *ReservedN return s } +// A name value pair that describes an aspect of an account. +type AccountAttribute struct { + _ struct{} `type:"structure"` + + // The name of the attribute. + AttributeName *string `type:"string"` + + // A list of attribute values. + AttributeValues []*AttributeValueTarget `locationNameList:"AttributeValueTarget" type:"list"` +} + +// String returns the string representation +func (s AccountAttribute) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AccountAttribute) GoString() string { + return s.String() +} + +// SetAttributeName sets the AttributeName field's value. +func (s *AccountAttribute) SetAttributeName(v string) *AccountAttribute { + s.AttributeName = &v + return s +} + +// SetAttributeValues sets the AttributeValues field's value. +func (s *AccountAttribute) SetAttributeValues(v []*AttributeValueTarget) *AccountAttribute { + s.AttributeValues = v + return s +} + // Describes an AWS customer account authorized to restore a snapshot. type AccountWithRestoreAccess struct { _ struct{} `type:"structure"` @@ -7646,6 +8700,30 @@ func (s *AccountWithRestoreAccess) SetAccountId(v string) *AccountWithRestoreAcc return s } +// Describes an attribute value. +type AttributeValueTarget struct { + _ struct{} `type:"structure"` + + // The value of the attribute. + AttributeValue *string `type:"string"` +} + +// String returns the string representation +func (s AttributeValueTarget) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttributeValueTarget) GoString() string { + return s.String() +} + +// SetAttributeValue sets the AttributeValue field's value. +func (s *AttributeValueTarget) SetAttributeValue(v string) *AttributeValueTarget { + s.AttributeValue = &v + return s +} + type AuthorizeClusterSecurityGroupIngressInput struct { _ struct{} `type:"structure"` @@ -7697,87 +8775,370 @@ func (s *AuthorizeClusterSecurityGroupIngressInput) SetCIDRIP(v string) *Authori return s } -// SetClusterSecurityGroupName sets the ClusterSecurityGroupName field's value. -func (s *AuthorizeClusterSecurityGroupIngressInput) SetClusterSecurityGroupName(v string) *AuthorizeClusterSecurityGroupIngressInput { - s.ClusterSecurityGroupName = &v +// SetClusterSecurityGroupName sets the ClusterSecurityGroupName field's value. +func (s *AuthorizeClusterSecurityGroupIngressInput) SetClusterSecurityGroupName(v string) *AuthorizeClusterSecurityGroupIngressInput { + s.ClusterSecurityGroupName = &v + return s +} + +// SetEC2SecurityGroupName sets the EC2SecurityGroupName field's value. +func (s *AuthorizeClusterSecurityGroupIngressInput) SetEC2SecurityGroupName(v string) *AuthorizeClusterSecurityGroupIngressInput { + s.EC2SecurityGroupName = &v + return s +} + +// SetEC2SecurityGroupOwnerId sets the EC2SecurityGroupOwnerId field's value. +func (s *AuthorizeClusterSecurityGroupIngressInput) SetEC2SecurityGroupOwnerId(v string) *AuthorizeClusterSecurityGroupIngressInput { + s.EC2SecurityGroupOwnerId = &v + return s +} + +type AuthorizeClusterSecurityGroupIngressOutput struct { + _ struct{} `type:"structure"` + + // Describes a security group. + ClusterSecurityGroup *ClusterSecurityGroup `type:"structure"` +} + +// String returns the string representation +func (s AuthorizeClusterSecurityGroupIngressOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AuthorizeClusterSecurityGroupIngressOutput) GoString() string { + return s.String() +} + +// SetClusterSecurityGroup sets the ClusterSecurityGroup field's value. +func (s *AuthorizeClusterSecurityGroupIngressOutput) SetClusterSecurityGroup(v *ClusterSecurityGroup) *AuthorizeClusterSecurityGroupIngressOutput { + s.ClusterSecurityGroup = v + return s +} + +type AuthorizeSnapshotAccessInput struct { + _ struct{} `type:"structure"` + + // The identifier of the AWS customer account authorized to restore the specified + // snapshot. + // + // To share a snapshot with AWS support, specify amazon-redshift-support. + // + // AccountWithRestoreAccess is a required field + AccountWithRestoreAccess *string `type:"string" required:"true"` + + // The identifier of the cluster the snapshot was created from. This parameter + // is required if your IAM user has a policy containing a snapshot resource + // element that specifies anything other than * for the cluster name. + SnapshotClusterIdentifier *string `type:"string"` + + // The identifier of the snapshot the account is authorized to restore. + // + // SnapshotIdentifier is a required field + SnapshotIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s AuthorizeSnapshotAccessInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AuthorizeSnapshotAccessInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AuthorizeSnapshotAccessInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AuthorizeSnapshotAccessInput"} + if s.AccountWithRestoreAccess == nil { + invalidParams.Add(request.NewErrParamRequired("AccountWithRestoreAccess")) + } + if s.SnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccountWithRestoreAccess sets the AccountWithRestoreAccess field's value. +func (s *AuthorizeSnapshotAccessInput) SetAccountWithRestoreAccess(v string) *AuthorizeSnapshotAccessInput { + s.AccountWithRestoreAccess = &v + return s +} + +// SetSnapshotClusterIdentifier sets the SnapshotClusterIdentifier field's value. +func (s *AuthorizeSnapshotAccessInput) SetSnapshotClusterIdentifier(v string) *AuthorizeSnapshotAccessInput { + s.SnapshotClusterIdentifier = &v + return s +} + +// SetSnapshotIdentifier sets the SnapshotIdentifier field's value. +func (s *AuthorizeSnapshotAccessInput) SetSnapshotIdentifier(v string) *AuthorizeSnapshotAccessInput { + s.SnapshotIdentifier = &v + return s +} + +type AuthorizeSnapshotAccessOutput struct { + _ struct{} `type:"structure"` + + // Describes a snapshot. + Snapshot *Snapshot `type:"structure"` +} + +// String returns the string representation +func (s AuthorizeSnapshotAccessOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AuthorizeSnapshotAccessOutput) GoString() string { + return s.String() +} + +// SetSnapshot sets the Snapshot field's value. +func (s *AuthorizeSnapshotAccessOutput) SetSnapshot(v *Snapshot) *AuthorizeSnapshotAccessOutput { + s.Snapshot = v + return s +} + +// Describes an availability zone. +type AvailabilityZone struct { + _ struct{} `type:"structure"` + + // The name of the availability zone. + Name *string `type:"string"` + + SupportedPlatforms []*SupportedPlatform `locationNameList:"SupportedPlatform" type:"list"` +} + +// String returns the string representation +func (s AvailabilityZone) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AvailabilityZone) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *AvailabilityZone) SetName(v string) *AvailabilityZone { + s.Name = &v + return s +} + +// SetSupportedPlatforms sets the SupportedPlatforms field's value. +func (s *AvailabilityZone) SetSupportedPlatforms(v []*SupportedPlatform) *AvailabilityZone { + s.SupportedPlatforms = v + return s +} + +type BatchDeleteClusterSnapshotsInput struct { + _ struct{} `type:"structure"` + + // A list of identifiers for the snapshots that you want to delete. + // + // Identifiers is a required field + Identifiers []*DeleteClusterSnapshotMessage `locationNameList:"DeleteClusterSnapshotMessage" type:"list" required:"true"` +} + +// String returns the string representation +func (s BatchDeleteClusterSnapshotsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchDeleteClusterSnapshotsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchDeleteClusterSnapshotsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchDeleteClusterSnapshotsInput"} + if s.Identifiers == nil { + invalidParams.Add(request.NewErrParamRequired("Identifiers")) + } + if s.Identifiers != nil { + for i, v := range s.Identifiers { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Identifiers", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetIdentifiers sets the Identifiers field's value. +func (s *BatchDeleteClusterSnapshotsInput) SetIdentifiers(v []*DeleteClusterSnapshotMessage) *BatchDeleteClusterSnapshotsInput { + s.Identifiers = v + return s +} + +type BatchDeleteClusterSnapshotsOutput struct { + _ struct{} `type:"structure"` + + // A list of any errors returned. + Errors []*SnapshotErrorMessage `locationNameList:"SnapshotErrorMessage" type:"list"` + + // A list of the snapshot identifiers that were deleted. + Resources []*string `locationNameList:"String" type:"list"` +} + +// String returns the string representation +func (s BatchDeleteClusterSnapshotsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchDeleteClusterSnapshotsOutput) GoString() string { + return s.String() +} + +// SetErrors sets the Errors field's value. +func (s *BatchDeleteClusterSnapshotsOutput) SetErrors(v []*SnapshotErrorMessage) *BatchDeleteClusterSnapshotsOutput { + s.Errors = v + return s +} + +// SetResources sets the Resources field's value. +func (s *BatchDeleteClusterSnapshotsOutput) SetResources(v []*string) *BatchDeleteClusterSnapshotsOutput { + s.Resources = v + return s +} + +type BatchModifyClusterSnapshotsInput struct { + _ struct{} `type:"structure"` + + // A boolean value indicating whether to override an exception if the retention + // period has passed. + Force *bool `type:"boolean"` + + // The number of days that a manual snapshot is retained. If you specify the + // value -1, the manual snapshot is retained indefinitely. + // + // The number must be either -1 or an integer between 1 and 3,653. + // + // If you decrease the manual snapshot retention period from its current value, + // existing manual snapshots that fall outside of the new retention period will + // return an error. If you want to suppress the errors and delete the snapshots, + // use the force option. + ManualSnapshotRetentionPeriod *int64 `type:"integer"` + + // A list of snapshot identifiers you want to modify. + // + // SnapshotIdentifierList is a required field + SnapshotIdentifierList []*string `locationNameList:"String" type:"list" required:"true"` +} + +// String returns the string representation +func (s BatchModifyClusterSnapshotsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchModifyClusterSnapshotsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchModifyClusterSnapshotsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchModifyClusterSnapshotsInput"} + if s.SnapshotIdentifierList == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotIdentifierList")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetForce sets the Force field's value. +func (s *BatchModifyClusterSnapshotsInput) SetForce(v bool) *BatchModifyClusterSnapshotsInput { + s.Force = &v return s } -// SetEC2SecurityGroupName sets the EC2SecurityGroupName field's value. -func (s *AuthorizeClusterSecurityGroupIngressInput) SetEC2SecurityGroupName(v string) *AuthorizeClusterSecurityGroupIngressInput { - s.EC2SecurityGroupName = &v +// SetManualSnapshotRetentionPeriod sets the ManualSnapshotRetentionPeriod field's value. +func (s *BatchModifyClusterSnapshotsInput) SetManualSnapshotRetentionPeriod(v int64) *BatchModifyClusterSnapshotsInput { + s.ManualSnapshotRetentionPeriod = &v return s } -// SetEC2SecurityGroupOwnerId sets the EC2SecurityGroupOwnerId field's value. -func (s *AuthorizeClusterSecurityGroupIngressInput) SetEC2SecurityGroupOwnerId(v string) *AuthorizeClusterSecurityGroupIngressInput { - s.EC2SecurityGroupOwnerId = &v +// SetSnapshotIdentifierList sets the SnapshotIdentifierList field's value. +func (s *BatchModifyClusterSnapshotsInput) SetSnapshotIdentifierList(v []*string) *BatchModifyClusterSnapshotsInput { + s.SnapshotIdentifierList = v return s } -type AuthorizeClusterSecurityGroupIngressOutput struct { +type BatchModifyClusterSnapshotsOutput struct { _ struct{} `type:"structure"` - // Describes a security group. - ClusterSecurityGroup *ClusterSecurityGroup `type:"structure"` + // A list of any errors returned. + Errors []*SnapshotErrorMessage `locationNameList:"SnapshotErrorMessage" type:"list"` + + // A list of the snapshots that were modified. + Resources []*string `locationNameList:"String" type:"list"` } // String returns the string representation -func (s AuthorizeClusterSecurityGroupIngressOutput) String() string { +func (s BatchModifyClusterSnapshotsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AuthorizeClusterSecurityGroupIngressOutput) GoString() string { +func (s BatchModifyClusterSnapshotsOutput) GoString() string { return s.String() } -// SetClusterSecurityGroup sets the ClusterSecurityGroup field's value. -func (s *AuthorizeClusterSecurityGroupIngressOutput) SetClusterSecurityGroup(v *ClusterSecurityGroup) *AuthorizeClusterSecurityGroupIngressOutput { - s.ClusterSecurityGroup = v +// SetErrors sets the Errors field's value. +func (s *BatchModifyClusterSnapshotsOutput) SetErrors(v []*SnapshotErrorMessage) *BatchModifyClusterSnapshotsOutput { + s.Errors = v return s } -type AuthorizeSnapshotAccessInput struct { - _ struct{} `type:"structure"` - - // The identifier of the AWS customer account authorized to restore the specified - // snapshot. - // - // To share a snapshot with AWS support, specify amazon-redshift-support. - // - // AccountWithRestoreAccess is a required field - AccountWithRestoreAccess *string `type:"string" required:"true"` +// SetResources sets the Resources field's value. +func (s *BatchModifyClusterSnapshotsOutput) SetResources(v []*string) *BatchModifyClusterSnapshotsOutput { + s.Resources = v + return s +} - // The identifier of the cluster the snapshot was created from. This parameter - // is required if your IAM user has a policy containing a snapshot resource - // element that specifies anything other than * for the cluster name. - SnapshotClusterIdentifier *string `type:"string"` +type CancelResizeInput struct { + _ struct{} `type:"structure"` - // The identifier of the snapshot the account is authorized to restore. + // The unique identifier for the cluster that you want to cancel a resize operation + // for. // - // SnapshotIdentifier is a required field - SnapshotIdentifier *string `type:"string" required:"true"` + // ClusterIdentifier is a required field + ClusterIdentifier *string `type:"string" required:"true"` } // String returns the string representation -func (s AuthorizeSnapshotAccessInput) String() string { +func (s CancelResizeInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AuthorizeSnapshotAccessInput) GoString() string { +func (s CancelResizeInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *AuthorizeSnapshotAccessInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AuthorizeSnapshotAccessInput"} - if s.AccountWithRestoreAccess == nil { - invalidParams.Add(request.NewErrParamRequired("AccountWithRestoreAccess")) - } - if s.SnapshotIdentifier == nil { - invalidParams.Add(request.NewErrParamRequired("SnapshotIdentifier")) +func (s *CancelResizeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelResizeInput"} + if s.ClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) } if invalidParams.Len() > 0 { @@ -7786,76 +9147,186 @@ func (s *AuthorizeSnapshotAccessInput) Validate() error { return nil } -// SetAccountWithRestoreAccess sets the AccountWithRestoreAccess field's value. -func (s *AuthorizeSnapshotAccessInput) SetAccountWithRestoreAccess(v string) *AuthorizeSnapshotAccessInput { - s.AccountWithRestoreAccess = &v +// SetClusterIdentifier sets the ClusterIdentifier field's value. +func (s *CancelResizeInput) SetClusterIdentifier(v string) *CancelResizeInput { + s.ClusterIdentifier = &v return s } -// SetSnapshotClusterIdentifier sets the SnapshotClusterIdentifier field's value. -func (s *AuthorizeSnapshotAccessInput) SetSnapshotClusterIdentifier(v string) *AuthorizeSnapshotAccessInput { - s.SnapshotClusterIdentifier = &v - return s -} +// Describes the result of a cluster resize operation. +type CancelResizeOutput struct { + _ struct{} `type:"structure"` -// SetSnapshotIdentifier sets the SnapshotIdentifier field's value. -func (s *AuthorizeSnapshotAccessInput) SetSnapshotIdentifier(v string) *AuthorizeSnapshotAccessInput { - s.SnapshotIdentifier = &v - return s -} + // The average rate of the resize operation over the last few minutes, measured + // in megabytes per second. After the resize operation completes, this value + // shows the average rate of the entire resize operation. + AvgResizeRateInMegaBytesPerSecond *float64 `type:"double"` -type AuthorizeSnapshotAccessOutput struct { - _ struct{} `type:"structure"` + // The amount of seconds that have elapsed since the resize operation began. + // After the resize operation completes, this value shows the total actual time, + // in seconds, for the resize operation. + ElapsedTimeInSeconds *int64 `type:"long"` - // Describes a snapshot. - Snapshot *Snapshot `type:"structure"` + // The estimated time remaining, in seconds, until the resize operation is complete. + // This value is calculated based on the average resize rate and the estimated + // amount of data remaining to be processed. Once the resize operation is complete, + // this value will be 0. + EstimatedTimeToCompletionInSeconds *int64 `type:"long"` + + // The names of tables that have been completely imported . + // + // Valid Values: List of table names. + ImportTablesCompleted []*string `type:"list"` + + // The names of tables that are being currently imported. + // + // Valid Values: List of table names. + ImportTablesInProgress []*string `type:"list"` + + // The names of tables that have not been yet imported. + // + // Valid Values: List of table names + ImportTablesNotStarted []*string `type:"list"` + + // An optional string to provide additional details about the resize action. + Message *string `type:"string"` + + // While the resize operation is in progress, this value shows the current amount + // of data, in megabytes, that has been processed so far. When the resize operation + // is complete, this value shows the total amount of data, in megabytes, on + // the cluster, which may be more or less than TotalResizeDataInMegaBytes (the + // estimated total amount of data before resize). + ProgressInMegaBytes *int64 `type:"long"` + + // An enum with possible values of ClassicResize and ElasticResize. These values + // describe the type of resize operation being performed. + ResizeType *string `type:"string"` + + // The status of the resize operation. + // + // Valid Values: NONE | IN_PROGRESS | FAILED | SUCCEEDED | CANCELLING + Status *string `type:"string"` + + // The cluster type after the resize operation is complete. + // + // Valid Values: multi-node | single-node + TargetClusterType *string `type:"string"` + + // The type of encryption for the cluster after the resize is complete. + // + // Possible values are KMS and None. In the China region possible values are: + // Legacy and None. + TargetEncryptionType *string `type:"string"` + + // The node type that the cluster will have after the resize operation is complete. + TargetNodeType *string `type:"string"` + + // The number of nodes that the cluster will have after the resize operation + // is complete. + TargetNumberOfNodes *int64 `type:"integer"` + + // The estimated total amount of data, in megabytes, on the cluster before the + // resize operation began. + TotalResizeDataInMegaBytes *int64 `type:"long"` } // String returns the string representation -func (s AuthorizeSnapshotAccessOutput) String() string { +func (s CancelResizeOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s AuthorizeSnapshotAccessOutput) GoString() string { +func (s CancelResizeOutput) GoString() string { return s.String() } -// SetSnapshot sets the Snapshot field's value. -func (s *AuthorizeSnapshotAccessOutput) SetSnapshot(v *Snapshot) *AuthorizeSnapshotAccessOutput { - s.Snapshot = v +// SetAvgResizeRateInMegaBytesPerSecond sets the AvgResizeRateInMegaBytesPerSecond field's value. +func (s *CancelResizeOutput) SetAvgResizeRateInMegaBytesPerSecond(v float64) *CancelResizeOutput { + s.AvgResizeRateInMegaBytesPerSecond = &v return s } -// Describes an availability zone. -type AvailabilityZone struct { - _ struct{} `type:"structure"` +// SetElapsedTimeInSeconds sets the ElapsedTimeInSeconds field's value. +func (s *CancelResizeOutput) SetElapsedTimeInSeconds(v int64) *CancelResizeOutput { + s.ElapsedTimeInSeconds = &v + return s +} - // The name of the availability zone. - Name *string `type:"string"` +// SetEstimatedTimeToCompletionInSeconds sets the EstimatedTimeToCompletionInSeconds field's value. +func (s *CancelResizeOutput) SetEstimatedTimeToCompletionInSeconds(v int64) *CancelResizeOutput { + s.EstimatedTimeToCompletionInSeconds = &v + return s +} - SupportedPlatforms []*SupportedPlatform `locationNameList:"SupportedPlatform" type:"list"` +// SetImportTablesCompleted sets the ImportTablesCompleted field's value. +func (s *CancelResizeOutput) SetImportTablesCompleted(v []*string) *CancelResizeOutput { + s.ImportTablesCompleted = v + return s } -// String returns the string representation -func (s AvailabilityZone) String() string { - return awsutil.Prettify(s) +// SetImportTablesInProgress sets the ImportTablesInProgress field's value. +func (s *CancelResizeOutput) SetImportTablesInProgress(v []*string) *CancelResizeOutput { + s.ImportTablesInProgress = v + return s } -// GoString returns the string representation -func (s AvailabilityZone) GoString() string { - return s.String() +// SetImportTablesNotStarted sets the ImportTablesNotStarted field's value. +func (s *CancelResizeOutput) SetImportTablesNotStarted(v []*string) *CancelResizeOutput { + s.ImportTablesNotStarted = v + return s } -// SetName sets the Name field's value. -func (s *AvailabilityZone) SetName(v string) *AvailabilityZone { - s.Name = &v +// SetMessage sets the Message field's value. +func (s *CancelResizeOutput) SetMessage(v string) *CancelResizeOutput { + s.Message = &v return s } -// SetSupportedPlatforms sets the SupportedPlatforms field's value. -func (s *AvailabilityZone) SetSupportedPlatforms(v []*SupportedPlatform) *AvailabilityZone { - s.SupportedPlatforms = v +// SetProgressInMegaBytes sets the ProgressInMegaBytes field's value. +func (s *CancelResizeOutput) SetProgressInMegaBytes(v int64) *CancelResizeOutput { + s.ProgressInMegaBytes = &v + return s +} + +// SetResizeType sets the ResizeType field's value. +func (s *CancelResizeOutput) SetResizeType(v string) *CancelResizeOutput { + s.ResizeType = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *CancelResizeOutput) SetStatus(v string) *CancelResizeOutput { + s.Status = &v + return s +} + +// SetTargetClusterType sets the TargetClusterType field's value. +func (s *CancelResizeOutput) SetTargetClusterType(v string) *CancelResizeOutput { + s.TargetClusterType = &v + return s +} + +// SetTargetEncryptionType sets the TargetEncryptionType field's value. +func (s *CancelResizeOutput) SetTargetEncryptionType(v string) *CancelResizeOutput { + s.TargetEncryptionType = &v + return s +} + +// SetTargetNodeType sets the TargetNodeType field's value. +func (s *CancelResizeOutput) SetTargetNodeType(v string) *CancelResizeOutput { + s.TargetNodeType = &v + return s +} + +// SetTargetNumberOfNodes sets the TargetNumberOfNodes field's value. +func (s *CancelResizeOutput) SetTargetNumberOfNodes(v int64) *CancelResizeOutput { + s.TargetNumberOfNodes = &v + return s +} + +// SetTotalResizeDataInMegaBytes sets the TotalResizeDataInMegaBytes field's value. +func (s *CancelResizeOutput) SetTotalResizeDataInMegaBytes(v int64) *CancelResizeOutput { + s.TotalResizeDataInMegaBytes = &v return s } @@ -7863,7 +9334,7 @@ func (s *AvailabilityZone) SetSupportedPlatforms(v []*SupportedPlatform) *Availa type Cluster struct { _ struct{} `type:"structure"` - // A Boolean value that, if true, indicates that major version upgrades will + // A boolean value that, if true, indicates that major version upgrades will // be applied automatically to the cluster during the maintenance window. AllowVersionUpgrade *bool `type:"boolean"` @@ -7909,6 +9380,12 @@ type Cluster struct { // // * available // + // * available, prep-for-resize + // + // * available, resize-cleanup + // + // * cancelling-resize + // // * creating // // * deleting @@ -7952,14 +9429,21 @@ type Cluster struct { // was not specified, a database named devdev was created by default. DBName *string `type:"string"` + // Describes the status of a cluster while it is in the process of resizing + // with an incremental resize. + DataTransferProgress *DataTransferProgress `type:"structure"` + + // Describes a group of DeferredMaintenanceWindow objects. + DeferredMaintenanceWindows []*DeferredMaintenanceWindow `locationNameList:"DeferredMaintenanceWindow" type:"list"` + // The status of the elastic IP (EIP) address. ElasticIpStatus *ElasticIpStatus `type:"structure"` - // Indicates the number of nodes the cluster can be resized to with the elastic - // resize method. + // The number of nodes that you can resize the cluster to with the elastic resize + // method. ElasticResizeNumberOfNodeOptions *string `type:"string"` - // A Boolean value that, if true, indicates that data in the cluster is encrypted + // A boolean value that, if true, indicates that data in the cluster is encrypted // at rest. Encrypted *bool `type:"boolean"` @@ -7995,6 +9479,13 @@ type Cluster struct { // The name of the maintenance track for the cluster. MaintenanceTrackName *string `type:"string"` + // The default number of days to retain a manual snapshot. If the value is -1, + // the snapshot is retained indefinitely. This setting doesn't change the retention + // period of existing snapshots. + // + // The value must be either -1 or an integer between 1 and 3,653. + ManualSnapshotRetentionPeriod *int64 `type:"integer"` + // The master user name for the cluster. This name is used to connect to the // database that is specified in the DBName parameter. MasterUsername *string `type:"string"` @@ -8019,14 +9510,28 @@ type Cluster struct { // system maintenance can occur. PreferredMaintenanceWindow *string `type:"string"` - // A Boolean value that, if true, indicates that the cluster can be accessed + // A boolean value that, if true, indicates that the cluster can be accessed // from a public network. PubliclyAccessible *bool `type:"boolean"` + // Returns the following: + // + // * AllowCancelResize: a boolean value indicating if the resize operation + // can be cancelled. + // + // * ResizeType: Returns ClassicResize + ResizeInfo *ResizeInfo `type:"structure"` + // A value that describes the status of a cluster restore action. This parameter // returns null if the cluster was not created by restoring a snapshot. RestoreStatus *RestoreStatus `type:"structure"` + // A unique identifier for the cluster snapshot schedule. + SnapshotScheduleIdentifier *string `type:"string"` + + // The current state of the cluster snapshot schedule. + SnapshotScheduleState *string `type:"string" enum:"ScheduleState"` + // The list of tags for the cluster. Tags []*Tag `locationNameList:"Tag" type:"list"` @@ -8139,6 +9644,18 @@ func (s *Cluster) SetDBName(v string) *Cluster { return s } +// SetDataTransferProgress sets the DataTransferProgress field's value. +func (s *Cluster) SetDataTransferProgress(v *DataTransferProgress) *Cluster { + s.DataTransferProgress = v + return s +} + +// SetDeferredMaintenanceWindows sets the DeferredMaintenanceWindows field's value. +func (s *Cluster) SetDeferredMaintenanceWindows(v []*DeferredMaintenanceWindow) *Cluster { + s.DeferredMaintenanceWindows = v + return s +} + // SetElasticIpStatus sets the ElasticIpStatus field's value. func (s *Cluster) SetElasticIpStatus(v *ElasticIpStatus) *Cluster { s.ElasticIpStatus = v @@ -8193,6 +9710,12 @@ func (s *Cluster) SetMaintenanceTrackName(v string) *Cluster { return s } +// SetManualSnapshotRetentionPeriod sets the ManualSnapshotRetentionPeriod field's value. +func (s *Cluster) SetManualSnapshotRetentionPeriod(v int64) *Cluster { + s.ManualSnapshotRetentionPeriod = &v + return s +} + // SetMasterUsername sets the MasterUsername field's value. func (s *Cluster) SetMasterUsername(v string) *Cluster { s.MasterUsername = &v @@ -8241,9 +9764,27 @@ func (s *Cluster) SetPubliclyAccessible(v bool) *Cluster { return s } -// SetRestoreStatus sets the RestoreStatus field's value. -func (s *Cluster) SetRestoreStatus(v *RestoreStatus) *Cluster { - s.RestoreStatus = v +// SetResizeInfo sets the ResizeInfo field's value. +func (s *Cluster) SetResizeInfo(v *ResizeInfo) *Cluster { + s.ResizeInfo = v + return s +} + +// SetRestoreStatus sets the RestoreStatus field's value. +func (s *Cluster) SetRestoreStatus(v *RestoreStatus) *Cluster { + s.RestoreStatus = v + return s +} + +// SetSnapshotScheduleIdentifier sets the SnapshotScheduleIdentifier field's value. +func (s *Cluster) SetSnapshotScheduleIdentifier(v string) *Cluster { + s.SnapshotScheduleIdentifier = &v + return s +} + +// SetSnapshotScheduleState sets the SnapshotScheduleState field's value. +func (s *Cluster) SetSnapshotScheduleState(v string) *Cluster { + s.SnapshotScheduleState = &v return s } @@ -8265,6 +9806,36 @@ func (s *Cluster) SetVpcSecurityGroups(v []*VpcSecurityGroupMembership) *Cluster return s } +type ClusterAssociatedToSchedule struct { + _ struct{} `type:"structure"` + + ClusterIdentifier *string `type:"string"` + + ScheduleAssociationState *string `type:"string" enum:"ScheduleState"` +} + +// String returns the string representation +func (s ClusterAssociatedToSchedule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ClusterAssociatedToSchedule) GoString() string { + return s.String() +} + +// SetClusterIdentifier sets the ClusterIdentifier field's value. +func (s *ClusterAssociatedToSchedule) SetClusterIdentifier(v string) *ClusterAssociatedToSchedule { + s.ClusterIdentifier = &v + return s +} + +// SetScheduleAssociationState sets the ScheduleAssociationState field's value. +func (s *ClusterAssociatedToSchedule) SetScheduleAssociationState(v string) *ClusterAssociatedToSchedule { + s.ScheduleAssociationState = &v + return s +} + // Describes a ClusterDbRevision. type ClusterDbRevision struct { _ struct{} `type:"structure"` @@ -8704,6 +10275,13 @@ type ClusterSnapshotCopyStatus struct { // snapshot copy is enabled. DestinationRegion *string `type:"string"` + // The number of days that automated snapshots are retained in the destination + // region after they are copied from a source region. If the value is -1, the + // manual snapshot is retained indefinitely. + // + // The value must be either -1 or an integer between 1 and 3,653. + ManualSnapshotRetentionPeriod *int64 `type:"integer"` + // The number of days that automated snapshots are retained in the destination // region after they are copied from a source region. RetentionPeriod *int64 `type:"long"` @@ -8728,6 +10306,12 @@ func (s *ClusterSnapshotCopyStatus) SetDestinationRegion(v string) *ClusterSnaps return s } +// SetManualSnapshotRetentionPeriod sets the ManualSnapshotRetentionPeriod field's value. +func (s *ClusterSnapshotCopyStatus) SetManualSnapshotRetentionPeriod(v int64) *ClusterSnapshotCopyStatus { + s.ManualSnapshotRetentionPeriod = &v + return s +} + // SetRetentionPeriod sets the RetentionPeriod field's value. func (s *ClusterSnapshotCopyStatus) SetRetentionPeriod(v int64) *ClusterSnapshotCopyStatus { s.RetentionPeriod = &v @@ -8856,6 +10440,14 @@ func (s *ClusterVersion) SetDescription(v string) *ClusterVersion { type CopyClusterSnapshotInput struct { _ struct{} `type:"structure"` + // The number of days that a manual snapshot is retained. If the value is -1, + // the manual snapshot is retained indefinitely. + // + // The value must be either -1 or an integer between 1 and 3,653. + // + // The default value is -1. + ManualSnapshotRetentionPeriod *int64 `type:"integer"` + // The identifier of the cluster the source snapshot was created from. This // parameter is required if your IAM user has a policy containing a snapshot // resource element that specifies anything other than * for the cluster name. @@ -8919,6 +10511,12 @@ func (s *CopyClusterSnapshotInput) Validate() error { return nil } +// SetManualSnapshotRetentionPeriod sets the ManualSnapshotRetentionPeriod field's value. +func (s *CopyClusterSnapshotInput) SetManualSnapshotRetentionPeriod(v int64) *CopyClusterSnapshotInput { + s.ManualSnapshotRetentionPeriod = &v + return s +} + // SetSourceSnapshotClusterIdentifier sets the SourceSnapshotClusterIdentifier field's value. func (s *CopyClusterSnapshotInput) SetSourceSnapshotClusterIdentifier(v string) *CopyClusterSnapshotInput { s.SourceSnapshotClusterIdentifier = &v @@ -9136,6 +10734,13 @@ type CreateClusterInput struct { // the current track. MaintenanceTrackName *string `type:"string"` + // The default number of days to retain a manual snapshot. If the value is -1, + // the snapshot is retained indefinitely. This setting doesn't change the retention + // period of existing snapshots. + // + // The value must be either -1 or an integer between 1 and 3,653. + ManualSnapshotRetentionPeriod *int64 `type:"integer"` + // The password associated with the master user account for the cluster that // is being created. // @@ -9226,6 +10831,9 @@ type CreateClusterInput struct { // If true, the cluster can be accessed from a public network. PubliclyAccessible *bool `type:"boolean"` + // A unique identifier for the snapshot schedule. + SnapshotScheduleIdentifier *string `type:"string"` + // A list of tag instances. Tags []*Tag `locationNameList:"Tag" type:"list"` @@ -9382,6 +10990,12 @@ func (s *CreateClusterInput) SetMaintenanceTrackName(v string) *CreateClusterInp return s } +// SetManualSnapshotRetentionPeriod sets the ManualSnapshotRetentionPeriod field's value. +func (s *CreateClusterInput) SetManualSnapshotRetentionPeriod(v int64) *CreateClusterInput { + s.ManualSnapshotRetentionPeriod = &v + return s +} + // SetMasterUserPassword sets the MasterUserPassword field's value. func (s *CreateClusterInput) SetMasterUserPassword(v string) *CreateClusterInput { s.MasterUserPassword = &v @@ -9424,6 +11038,12 @@ func (s *CreateClusterInput) SetPubliclyAccessible(v bool) *CreateClusterInput { return s } +// SetSnapshotScheduleIdentifier sets the SnapshotScheduleIdentifier field's value. +func (s *CreateClusterInput) SetSnapshotScheduleIdentifier(v string) *CreateClusterInput { + s.SnapshotScheduleIdentifier = &v + return s +} + // SetTags sets the Tags field's value. func (s *CreateClusterInput) SetTags(v []*Tag) *CreateClusterInput { s.Tags = v @@ -9681,6 +11301,14 @@ type CreateClusterSnapshotInput struct { // ClusterIdentifier is a required field ClusterIdentifier *string `type:"string" required:"true"` + // The number of days that a manual snapshot is retained. If the value is -1, + // the manual snapshot is retained indefinitely. + // + // The value must be either -1 or an integer between 1 and 3,653. + // + // The default value is -1. + ManualSnapshotRetentionPeriod *int64 `type:"integer"` + // A unique identifier for the snapshot that you are requesting. This identifier // must be unique for all snapshots within the AWS account. // @@ -9735,6 +11363,12 @@ func (s *CreateClusterSnapshotInput) SetClusterIdentifier(v string) *CreateClust return s } +// SetManualSnapshotRetentionPeriod sets the ManualSnapshotRetentionPeriod field's value. +func (s *CreateClusterSnapshotInput) SetManualSnapshotRetentionPeriod(v int64) *CreateClusterSnapshotInput { + s.ManualSnapshotRetentionPeriod = &v + return s +} + // SetSnapshotIdentifier sets the SnapshotIdentifier field's value. func (s *CreateClusterSnapshotInput) SetSnapshotIdentifier(v string) *CreateClusterSnapshotInput { s.SnapshotIdentifier = &v @@ -9883,14 +11517,14 @@ func (s *CreateClusterSubnetGroupOutput) SetClusterSubnetGroup(v *ClusterSubnetG type CreateEventSubscriptionInput struct { _ struct{} `type:"structure"` - // A Boolean value; set to true to activate the subscription, set to false to - // create the subscription but not active it. + // A boolean value; set to true to activate the subscription, and set to false + // to create the subscription but not activate it. Enabled *bool `type:"boolean"` // Specifies the Amazon Redshift event categories to be published by the event // notification subscription. // - // Values: Configuration, Management, Monitoring, Security + // Values: configuration, management, monitoring, security EventCategories []*string `locationNameList:"EventCategory" type:"list"` // Specifies the Amazon Redshift event severity to be published by the event @@ -10360,6 +11994,149 @@ func (s *CreateSnapshotCopyGrantOutput) SetSnapshotCopyGrant(v *SnapshotCopyGran return s } +type CreateSnapshotScheduleInput struct { + _ struct{} `type:"structure"` + + DryRun *bool `type:"boolean"` + + NextInvocations *int64 `type:"integer"` + + // The definition of the snapshot schedule. The definition is made up of schedule + // expressions, for example "cron(30 12 *)" or "rate(12 hours)". + ScheduleDefinitions []*string `locationNameList:"ScheduleDefinition" type:"list"` + + // The description of the snapshot schedule. + ScheduleDescription *string `type:"string"` + + // A unique identifier for a snapshot schedule. Only alphanumeric characters + // are allowed for the identifier. + ScheduleIdentifier *string `type:"string"` + + Tags []*Tag `locationNameList:"Tag" type:"list"` +} + +// String returns the string representation +func (s CreateSnapshotScheduleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSnapshotScheduleInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *CreateSnapshotScheduleInput) SetDryRun(v bool) *CreateSnapshotScheduleInput { + s.DryRun = &v + return s +} + +// SetNextInvocations sets the NextInvocations field's value. +func (s *CreateSnapshotScheduleInput) SetNextInvocations(v int64) *CreateSnapshotScheduleInput { + s.NextInvocations = &v + return s +} + +// SetScheduleDefinitions sets the ScheduleDefinitions field's value. +func (s *CreateSnapshotScheduleInput) SetScheduleDefinitions(v []*string) *CreateSnapshotScheduleInput { + s.ScheduleDefinitions = v + return s +} + +// SetScheduleDescription sets the ScheduleDescription field's value. +func (s *CreateSnapshotScheduleInput) SetScheduleDescription(v string) *CreateSnapshotScheduleInput { + s.ScheduleDescription = &v + return s +} + +// SetScheduleIdentifier sets the ScheduleIdentifier field's value. +func (s *CreateSnapshotScheduleInput) SetScheduleIdentifier(v string) *CreateSnapshotScheduleInput { + s.ScheduleIdentifier = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateSnapshotScheduleInput) SetTags(v []*Tag) *CreateSnapshotScheduleInput { + s.Tags = v + return s +} + +// Describes a snapshot schedule. You can set a regular interval for creating +// snapshots of a cluster. You can also schedule snapshots for specific dates. +type CreateSnapshotScheduleOutput struct { + _ struct{} `type:"structure"` + + AssociatedClusterCount *int64 `type:"integer"` + + AssociatedClusters []*ClusterAssociatedToSchedule `locationNameList:"ClusterAssociatedToSchedule" type:"list"` + + NextInvocations []*time.Time `locationNameList:"SnapshotTime" type:"list"` + + // A list of ScheduleDefinitions + ScheduleDefinitions []*string `locationNameList:"ScheduleDefinition" type:"list"` + + // The description of the schedule. + ScheduleDescription *string `type:"string"` + + // A unique identifier for the schedule. + ScheduleIdentifier *string `type:"string"` + + // An optional set of tags describing the schedule. + Tags []*Tag `locationNameList:"Tag" type:"list"` +} + +// String returns the string representation +func (s CreateSnapshotScheduleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateSnapshotScheduleOutput) GoString() string { + return s.String() +} + +// SetAssociatedClusterCount sets the AssociatedClusterCount field's value. +func (s *CreateSnapshotScheduleOutput) SetAssociatedClusterCount(v int64) *CreateSnapshotScheduleOutput { + s.AssociatedClusterCount = &v + return s +} + +// SetAssociatedClusters sets the AssociatedClusters field's value. +func (s *CreateSnapshotScheduleOutput) SetAssociatedClusters(v []*ClusterAssociatedToSchedule) *CreateSnapshotScheduleOutput { + s.AssociatedClusters = v + return s +} + +// SetNextInvocations sets the NextInvocations field's value. +func (s *CreateSnapshotScheduleOutput) SetNextInvocations(v []*time.Time) *CreateSnapshotScheduleOutput { + s.NextInvocations = v + return s +} + +// SetScheduleDefinitions sets the ScheduleDefinitions field's value. +func (s *CreateSnapshotScheduleOutput) SetScheduleDefinitions(v []*string) *CreateSnapshotScheduleOutput { + s.ScheduleDefinitions = v + return s +} + +// SetScheduleDescription sets the ScheduleDescription field's value. +func (s *CreateSnapshotScheduleOutput) SetScheduleDescription(v string) *CreateSnapshotScheduleOutput { + s.ScheduleDescription = &v + return s +} + +// SetScheduleIdentifier sets the ScheduleIdentifier field's value. +func (s *CreateSnapshotScheduleOutput) SetScheduleIdentifier(v string) *CreateSnapshotScheduleOutput { + s.ScheduleIdentifier = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateSnapshotScheduleOutput) SetTags(v []*Tag) *CreateSnapshotScheduleOutput { + s.Tags = v + return s +} + // Contains the output from the CreateTags action. type CreateTagsInput struct { _ struct{} `type:"structure"` @@ -10432,6 +12209,77 @@ func (s CreateTagsOutput) GoString() string { return s.String() } +// Describes the status of a cluster while it is in the process of resizing +// with an incremental resize. +type DataTransferProgress struct { + _ struct{} `type:"structure"` + + // Describes the data transfer rate in MB's per second. + CurrentRateInMegaBytesPerSecond *float64 `type:"double"` + + // Describes the total amount of data that has been transfered in MB's. + DataTransferredInMegaBytes *int64 `type:"long"` + + // Describes the number of seconds that have elapsed during the data transfer. + ElapsedTimeInSeconds *int64 `type:"long"` + + // Describes the estimated number of seconds remaining to complete the transfer. + EstimatedTimeToCompletionInSeconds *int64 `type:"long"` + + // Describes the status of the cluster. While the transfer is in progress the + // status is transferringdata. + Status *string `type:"string"` + + // Describes the total amount of data to be transfered in megabytes. + TotalDataInMegaBytes *int64 `type:"long"` +} + +// String returns the string representation +func (s DataTransferProgress) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DataTransferProgress) GoString() string { + return s.String() +} + +// SetCurrentRateInMegaBytesPerSecond sets the CurrentRateInMegaBytesPerSecond field's value. +func (s *DataTransferProgress) SetCurrentRateInMegaBytesPerSecond(v float64) *DataTransferProgress { + s.CurrentRateInMegaBytesPerSecond = &v + return s +} + +// SetDataTransferredInMegaBytes sets the DataTransferredInMegaBytes field's value. +func (s *DataTransferProgress) SetDataTransferredInMegaBytes(v int64) *DataTransferProgress { + s.DataTransferredInMegaBytes = &v + return s +} + +// SetElapsedTimeInSeconds sets the ElapsedTimeInSeconds field's value. +func (s *DataTransferProgress) SetElapsedTimeInSeconds(v int64) *DataTransferProgress { + s.ElapsedTimeInSeconds = &v + return s +} + +// SetEstimatedTimeToCompletionInSeconds sets the EstimatedTimeToCompletionInSeconds field's value. +func (s *DataTransferProgress) SetEstimatedTimeToCompletionInSeconds(v int64) *DataTransferProgress { + s.EstimatedTimeToCompletionInSeconds = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *DataTransferProgress) SetStatus(v string) *DataTransferProgress { + s.Status = &v + return s +} + +// SetTotalDataInMegaBytes sets the TotalDataInMegaBytes field's value. +func (s *DataTransferProgress) SetTotalDataInMegaBytes(v int64) *DataTransferProgress { + s.TotalDataInMegaBytes = &v + return s +} + // Describes the default cluster parameters for a parameter group family. type DefaultClusterParameters struct { _ struct{} `type:"structure"` @@ -10479,6 +12327,48 @@ func (s *DefaultClusterParameters) SetParameters(v []*Parameter) *DefaultCluster return s } +// Describes a deferred maintenance window +type DeferredMaintenanceWindow struct { + _ struct{} `type:"structure"` + + // A timestamp for the end of the time period when we defer maintenance. + DeferMaintenanceEndTime *time.Time `type:"timestamp"` + + // A unique identifier for the maintenance window. + DeferMaintenanceIdentifier *string `type:"string"` + + // A timestamp for the beginning of the time period when we defer maintenance. + DeferMaintenanceStartTime *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s DeferredMaintenanceWindow) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeferredMaintenanceWindow) GoString() string { + return s.String() +} + +// SetDeferMaintenanceEndTime sets the DeferMaintenanceEndTime field's value. +func (s *DeferredMaintenanceWindow) SetDeferMaintenanceEndTime(v time.Time) *DeferredMaintenanceWindow { + s.DeferMaintenanceEndTime = &v + return s +} + +// SetDeferMaintenanceIdentifier sets the DeferMaintenanceIdentifier field's value. +func (s *DeferredMaintenanceWindow) SetDeferMaintenanceIdentifier(v string) *DeferredMaintenanceWindow { + s.DeferMaintenanceIdentifier = &v + return s +} + +// SetDeferMaintenanceStartTime sets the DeferMaintenanceStartTime field's value. +func (s *DeferredMaintenanceWindow) SetDeferMaintenanceStartTime(v time.Time) *DeferredMaintenanceWindow { + s.DeferMaintenanceStartTime = &v + return s +} + type DeleteClusterInput struct { _ struct{} `type:"structure"` @@ -10510,6 +12400,14 @@ type DeleteClusterInput struct { // * Cannot end with a hyphen or contain two consecutive hyphens. FinalClusterSnapshotIdentifier *string `type:"string"` + // The number of days that a manual snapshot is retained. If the value is -1, + // the manual snapshot is retained indefinitely. + // + // The value must be either -1 or an integer between 1 and 3,653. + // + // The default value is -1. + FinalClusterSnapshotRetentionPeriod *int64 `type:"integer"` + // Determines whether a final snapshot of the cluster is created before Amazon // Redshift deletes the cluster. If true, a final cluster snapshot is not created. // If false, a final cluster snapshot is created before the cluster is deleted. @@ -10556,6 +12454,12 @@ func (s *DeleteClusterInput) SetFinalClusterSnapshotIdentifier(v string) *Delete return s } +// SetFinalClusterSnapshotRetentionPeriod sets the FinalClusterSnapshotRetentionPeriod field's value. +func (s *DeleteClusterInput) SetFinalClusterSnapshotRetentionPeriod(v int64) *DeleteClusterInput { + s.FinalClusterSnapshotRetentionPeriod = &v + return s +} + // SetSkipFinalClusterSnapshot sets the SkipFinalClusterSnapshot field's value. func (s *DeleteClusterInput) SetSkipFinalClusterSnapshot(v bool) *DeleteClusterInput { s.SkipFinalClusterSnapshot = &v @@ -10690,12 +12594,66 @@ func (s DeleteClusterSecurityGroupOutput) String() string { return awsutil.Prettify(s) } -// GoString returns the string representation -func (s DeleteClusterSecurityGroupOutput) GoString() string { - return s.String() +// GoString returns the string representation +func (s DeleteClusterSecurityGroupOutput) GoString() string { + return s.String() +} + +type DeleteClusterSnapshotInput struct { + _ struct{} `type:"structure"` + + // The unique identifier of the cluster the snapshot was created from. This + // parameter is required if your IAM user has a policy containing a snapshot + // resource element that specifies anything other than * for the cluster name. + // + // Constraints: Must be the name of valid cluster. + SnapshotClusterIdentifier *string `type:"string"` + + // The unique identifier of the manual snapshot to be deleted. + // + // Constraints: Must be the name of an existing snapshot that is in the available, + // failed, or cancelled state. + // + // SnapshotIdentifier is a required field + SnapshotIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteClusterSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteClusterSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteClusterSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteClusterSnapshotInput"} + if s.SnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSnapshotClusterIdentifier sets the SnapshotClusterIdentifier field's value. +func (s *DeleteClusterSnapshotInput) SetSnapshotClusterIdentifier(v string) *DeleteClusterSnapshotInput { + s.SnapshotClusterIdentifier = &v + return s } -type DeleteClusterSnapshotInput struct { +// SetSnapshotIdentifier sets the SnapshotIdentifier field's value. +func (s *DeleteClusterSnapshotInput) SetSnapshotIdentifier(v string) *DeleteClusterSnapshotInput { + s.SnapshotIdentifier = &v + return s +} + +type DeleteClusterSnapshotMessage struct { _ struct{} `type:"structure"` // The unique identifier of the cluster the snapshot was created from. This @@ -10707,26 +12665,26 @@ type DeleteClusterSnapshotInput struct { // The unique identifier of the manual snapshot to be deleted. // - // Constraints: Must be the name of an existing snapshot that is in the available - // state. + // Constraints: Must be the name of an existing snapshot that is in the available, + // failed, or cancelled state. // // SnapshotIdentifier is a required field SnapshotIdentifier *string `type:"string" required:"true"` } // String returns the string representation -func (s DeleteClusterSnapshotInput) String() string { +func (s DeleteClusterSnapshotMessage) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DeleteClusterSnapshotInput) GoString() string { +func (s DeleteClusterSnapshotMessage) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteClusterSnapshotInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteClusterSnapshotInput"} +func (s *DeleteClusterSnapshotMessage) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteClusterSnapshotMessage"} if s.SnapshotIdentifier == nil { invalidParams.Add(request.NewErrParamRequired("SnapshotIdentifier")) } @@ -10738,13 +12696,13 @@ func (s *DeleteClusterSnapshotInput) Validate() error { } // SetSnapshotClusterIdentifier sets the SnapshotClusterIdentifier field's value. -func (s *DeleteClusterSnapshotInput) SetSnapshotClusterIdentifier(v string) *DeleteClusterSnapshotInput { +func (s *DeleteClusterSnapshotMessage) SetSnapshotClusterIdentifier(v string) *DeleteClusterSnapshotMessage { s.SnapshotClusterIdentifier = &v return s } // SetSnapshotIdentifier sets the SnapshotIdentifier field's value. -func (s *DeleteClusterSnapshotInput) SetSnapshotIdentifier(v string) *DeleteClusterSnapshotInput { +func (s *DeleteClusterSnapshotMessage) SetSnapshotIdentifier(v string) *DeleteClusterSnapshotMessage { s.SnapshotIdentifier = &v return s } @@ -11033,6 +12991,58 @@ func (s DeleteSnapshotCopyGrantOutput) GoString() string { return s.String() } +type DeleteSnapshotScheduleInput struct { + _ struct{} `type:"structure"` + + // A unique identifier of the snapshot schedule to delete. + // + // ScheduleIdentifier is a required field + ScheduleIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteSnapshotScheduleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSnapshotScheduleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteSnapshotScheduleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteSnapshotScheduleInput"} + if s.ScheduleIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ScheduleIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetScheduleIdentifier sets the ScheduleIdentifier field's value. +func (s *DeleteSnapshotScheduleInput) SetScheduleIdentifier(v string) *DeleteSnapshotScheduleInput { + s.ScheduleIdentifier = &v + return s +} + +type DeleteSnapshotScheduleOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteSnapshotScheduleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteSnapshotScheduleOutput) GoString() string { + return s.String() +} + // Contains the output from the DeleteTags action. type DeleteTagsInput struct { _ struct{} `type:"structure"` @@ -11101,6 +13111,52 @@ func (s DeleteTagsOutput) GoString() string { return s.String() } +type DescribeAccountAttributesInput struct { + _ struct{} `type:"structure"` + + // A list of attribute names. + AttributeNames []*string `locationNameList:"AttributeName" type:"list"` +} + +// String returns the string representation +func (s DescribeAccountAttributesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAccountAttributesInput) GoString() string { + return s.String() +} + +// SetAttributeNames sets the AttributeNames field's value. +func (s *DescribeAccountAttributesInput) SetAttributeNames(v []*string) *DescribeAccountAttributesInput { + s.AttributeNames = v + return s +} + +type DescribeAccountAttributesOutput struct { + _ struct{} `type:"structure"` + + // A list of attributes assigned to an account. + AccountAttributes []*AccountAttribute `locationNameList:"AccountAttribute" type:"list"` +} + +// String returns the string representation +func (s DescribeAccountAttributesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAccountAttributesOutput) GoString() string { + return s.String() +} + +// SetAccountAttributes sets the AccountAttributes field's value. +func (s *DescribeAccountAttributesOutput) SetAccountAttributes(v []*AccountAttribute) *DescribeAccountAttributesOutput { + s.AccountAttributes = v + return s +} + type DescribeClusterDbRevisionsInput struct { _ struct{} `type:"structure"` @@ -11612,6 +13668,8 @@ type DescribeClusterSnapshotsInput struct { // Valid Values: automated | manual SnapshotType *string `type:"string"` + SortingEntities []*SnapshotSortingEntity `locationNameList:"SnapshotSortingEntity" type:"list"` + // A value that requests only snapshots created at or after the specified time. // The time value is specified in ISO 8601 format. For more information about // ISO 8601, go to the ISO8601 Wikipedia page. (http://en.wikipedia.org/wiki/ISO_8601) @@ -11646,6 +13704,26 @@ func (s DescribeClusterSnapshotsInput) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeClusterSnapshotsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeClusterSnapshotsInput"} + if s.SortingEntities != nil { + for i, v := range s.SortingEntities { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "SortingEntities", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetClusterExists sets the ClusterExists field's value. func (s *DescribeClusterSnapshotsInput) SetClusterExists(v bool) *DescribeClusterSnapshotsInput { s.ClusterExists = &v @@ -11694,6 +13772,12 @@ func (s *DescribeClusterSnapshotsInput) SetSnapshotType(v string) *DescribeClust return s } +// SetSortingEntities sets the SortingEntities field's value. +func (s *DescribeClusterSnapshotsInput) SetSortingEntities(v []*SnapshotSortingEntity) *DescribeClusterSnapshotsInput { + s.SortingEntities = v + return s +} + // SetStartTime sets the StartTime field's value. func (s *DescribeClusterSnapshotsInput) SetStartTime(v time.Time) *DescribeClusterSnapshotsInput { s.StartTime = &v @@ -13256,7 +15340,7 @@ type DescribeResizeOutput struct { // The status of the resize operation. // - // Valid Values: NONE | IN_PROGRESS | FAILED | SUCCEEDED + // Valid Values: NONE | IN_PROGRESS | FAILED | SUCCEEDED | CANCELLING Status *string `type:"string"` // The cluster type after the resize operation is complete. @@ -13418,92 +15502,250 @@ type DescribeSnapshotCopyGrantsInput struct { // with them. TagKeys []*string `locationNameList:"TagKey" type:"list"` - // A tag value or values for which you want to return all matching resources - // that are associated with the specified value or values. For example, suppose - // that you have resources tagged with values called admin and test. If you - // specify both of these tag values in the request, Amazon Redshift returns - // a response with all resources that have either or both of these tag values - // associated with them. - TagValues []*string `locationNameList:"TagValue" type:"list"` + // A tag value or values for which you want to return all matching resources + // that are associated with the specified value or values. For example, suppose + // that you have resources tagged with values called admin and test. If you + // specify both of these tag values in the request, Amazon Redshift returns + // a response with all resources that have either or both of these tag values + // associated with them. + TagValues []*string `locationNameList:"TagValue" type:"list"` +} + +// String returns the string representation +func (s DescribeSnapshotCopyGrantsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSnapshotCopyGrantsInput) GoString() string { + return s.String() +} + +// SetMarker sets the Marker field's value. +func (s *DescribeSnapshotCopyGrantsInput) SetMarker(v string) *DescribeSnapshotCopyGrantsInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeSnapshotCopyGrantsInput) SetMaxRecords(v int64) *DescribeSnapshotCopyGrantsInput { + s.MaxRecords = &v + return s +} + +// SetSnapshotCopyGrantName sets the SnapshotCopyGrantName field's value. +func (s *DescribeSnapshotCopyGrantsInput) SetSnapshotCopyGrantName(v string) *DescribeSnapshotCopyGrantsInput { + s.SnapshotCopyGrantName = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *DescribeSnapshotCopyGrantsInput) SetTagKeys(v []*string) *DescribeSnapshotCopyGrantsInput { + s.TagKeys = v + return s +} + +// SetTagValues sets the TagValues field's value. +func (s *DescribeSnapshotCopyGrantsInput) SetTagValues(v []*string) *DescribeSnapshotCopyGrantsInput { + s.TagValues = v + return s +} + +type DescribeSnapshotCopyGrantsOutput struct { + _ struct{} `type:"structure"` + + // An optional parameter that specifies the starting point to return a set of + // response records. When the results of a DescribeSnapshotCopyGrant request + // exceed the value specified in MaxRecords, AWS returns a value in the Marker + // field of the response. You can retrieve the next set of response records + // by providing the returned marker value in the Marker parameter and retrying + // the request. + // + // Constraints: You can specify either the SnapshotCopyGrantName parameter or + // the Marker parameter, but not both. + Marker *string `type:"string"` + + // The list of SnapshotCopyGrant objects. + SnapshotCopyGrants []*SnapshotCopyGrant `locationNameList:"SnapshotCopyGrant" type:"list"` +} + +// String returns the string representation +func (s DescribeSnapshotCopyGrantsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSnapshotCopyGrantsOutput) GoString() string { + return s.String() +} + +// SetMarker sets the Marker field's value. +func (s *DescribeSnapshotCopyGrantsOutput) SetMarker(v string) *DescribeSnapshotCopyGrantsOutput { + s.Marker = &v + return s +} + +// SetSnapshotCopyGrants sets the SnapshotCopyGrants field's value. +func (s *DescribeSnapshotCopyGrantsOutput) SetSnapshotCopyGrants(v []*SnapshotCopyGrant) *DescribeSnapshotCopyGrantsOutput { + s.SnapshotCopyGrants = v + return s +} + +type DescribeSnapshotSchedulesInput struct { + _ struct{} `type:"structure"` + + // The unique identifier for the cluster whose snapshot schedules you want to + // view. + ClusterIdentifier *string `type:"string"` + + // A value that indicates the starting point for the next set of response records + // in a subsequent request. If a value is returned in a response, you can retrieve + // the next set of records by providing this returned marker value in the marker + // parameter and retrying the command. If the marker field is empty, all response + // records have been retrieved for the request. + Marker *string `type:"string"` + + // The maximum number or response records to return in each call. If the number + // of remaining response records exceeds the specified MaxRecords value, a value + // is returned in a marker field of the response. You can retrieve the next + // set of records by retrying the command with the returned marker value. + MaxRecords *int64 `type:"integer"` + + // A unique identifier for a snapshot schedule. + ScheduleIdentifier *string `type:"string"` + + // The key value for a snapshot schedule tag. + TagKeys []*string `locationNameList:"TagKey" type:"list"` + + // The value corresponding to the key of the snapshot schedule tag. + TagValues []*string `locationNameList:"TagValue" type:"list"` +} + +// String returns the string representation +func (s DescribeSnapshotSchedulesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSnapshotSchedulesInput) GoString() string { + return s.String() +} + +// SetClusterIdentifier sets the ClusterIdentifier field's value. +func (s *DescribeSnapshotSchedulesInput) SetClusterIdentifier(v string) *DescribeSnapshotSchedulesInput { + s.ClusterIdentifier = &v + return s +} + +// SetMarker sets the Marker field's value. +func (s *DescribeSnapshotSchedulesInput) SetMarker(v string) *DescribeSnapshotSchedulesInput { + s.Marker = &v + return s +} + +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeSnapshotSchedulesInput) SetMaxRecords(v int64) *DescribeSnapshotSchedulesInput { + s.MaxRecords = &v + return s +} + +// SetScheduleIdentifier sets the ScheduleIdentifier field's value. +func (s *DescribeSnapshotSchedulesInput) SetScheduleIdentifier(v string) *DescribeSnapshotSchedulesInput { + s.ScheduleIdentifier = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *DescribeSnapshotSchedulesInput) SetTagKeys(v []*string) *DescribeSnapshotSchedulesInput { + s.TagKeys = v + return s +} + +// SetTagValues sets the TagValues field's value. +func (s *DescribeSnapshotSchedulesInput) SetTagValues(v []*string) *DescribeSnapshotSchedulesInput { + s.TagValues = v + return s +} + +type DescribeSnapshotSchedulesOutput struct { + _ struct{} `type:"structure"` + + // A value that indicates the starting point for the next set of response records + // in a subsequent request. If a value is returned in a response, you can retrieve + // the next set of records by providing this returned marker value in the marker + // parameter and retrying the command. If the marker field is empty, all response + // records have been retrieved for the request. + Marker *string `type:"string"` + + // A list of SnapshotSchedules. + SnapshotSchedules []*SnapshotSchedule `locationNameList:"SnapshotSchedule" type:"list"` } // String returns the string representation -func (s DescribeSnapshotCopyGrantsInput) String() string { +func (s DescribeSnapshotSchedulesOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeSnapshotCopyGrantsInput) GoString() string { +func (s DescribeSnapshotSchedulesOutput) GoString() string { return s.String() } // SetMarker sets the Marker field's value. -func (s *DescribeSnapshotCopyGrantsInput) SetMarker(v string) *DescribeSnapshotCopyGrantsInput { +func (s *DescribeSnapshotSchedulesOutput) SetMarker(v string) *DescribeSnapshotSchedulesOutput { s.Marker = &v return s } -// SetMaxRecords sets the MaxRecords field's value. -func (s *DescribeSnapshotCopyGrantsInput) SetMaxRecords(v int64) *DescribeSnapshotCopyGrantsInput { - s.MaxRecords = &v +// SetSnapshotSchedules sets the SnapshotSchedules field's value. +func (s *DescribeSnapshotSchedulesOutput) SetSnapshotSchedules(v []*SnapshotSchedule) *DescribeSnapshotSchedulesOutput { + s.SnapshotSchedules = v return s } -// SetSnapshotCopyGrantName sets the SnapshotCopyGrantName field's value. -func (s *DescribeSnapshotCopyGrantsInput) SetSnapshotCopyGrantName(v string) *DescribeSnapshotCopyGrantsInput { - s.SnapshotCopyGrantName = &v - return s +type DescribeStorageInput struct { + _ struct{} `type:"structure"` } -// SetTagKeys sets the TagKeys field's value. -func (s *DescribeSnapshotCopyGrantsInput) SetTagKeys(v []*string) *DescribeSnapshotCopyGrantsInput { - s.TagKeys = v - return s +// String returns the string representation +func (s DescribeStorageInput) String() string { + return awsutil.Prettify(s) } -// SetTagValues sets the TagValues field's value. -func (s *DescribeSnapshotCopyGrantsInput) SetTagValues(v []*string) *DescribeSnapshotCopyGrantsInput { - s.TagValues = v - return s +// GoString returns the string representation +func (s DescribeStorageInput) GoString() string { + return s.String() } -type DescribeSnapshotCopyGrantsOutput struct { +type DescribeStorageOutput struct { _ struct{} `type:"structure"` - // An optional parameter that specifies the starting point to return a set of - // response records. When the results of a DescribeSnapshotCopyGrant request - // exceed the value specified in MaxRecords, AWS returns a value in the Marker - // field of the response. You can retrieve the next set of response records - // by providing the returned marker value in the Marker parameter and retrying - // the request. - // - // Constraints: You can specify either the SnapshotCopyGrantName parameter or - // the Marker parameter, but not both. - Marker *string `type:"string"` + // The total amount of storage currently used for snapshots. + TotalBackupSizeInMegaBytes *float64 `type:"double"` - // The list of SnapshotCopyGrant objects. - SnapshotCopyGrants []*SnapshotCopyGrant `locationNameList:"SnapshotCopyGrant" type:"list"` + // The total amount of storage currently provisioned. + TotalProvisionedStorageInMegaBytes *float64 `type:"double"` } // String returns the string representation -func (s DescribeSnapshotCopyGrantsOutput) String() string { +func (s DescribeStorageOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeSnapshotCopyGrantsOutput) GoString() string { +func (s DescribeStorageOutput) GoString() string { return s.String() } -// SetMarker sets the Marker field's value. -func (s *DescribeSnapshotCopyGrantsOutput) SetMarker(v string) *DescribeSnapshotCopyGrantsOutput { - s.Marker = &v +// SetTotalBackupSizeInMegaBytes sets the TotalBackupSizeInMegaBytes field's value. +func (s *DescribeStorageOutput) SetTotalBackupSizeInMegaBytes(v float64) *DescribeStorageOutput { + s.TotalBackupSizeInMegaBytes = &v return s } -// SetSnapshotCopyGrants sets the SnapshotCopyGrants field's value. -func (s *DescribeSnapshotCopyGrantsOutput) SetSnapshotCopyGrants(v []*SnapshotCopyGrant) *DescribeSnapshotCopyGrantsOutput { - s.SnapshotCopyGrants = v +// SetTotalProvisionedStorageInMegaBytes sets the TotalProvisionedStorageInMegaBytes field's value. +func (s *DescribeStorageOutput) SetTotalProvisionedStorageInMegaBytes(v float64) *DescribeStorageOutput { + s.TotalProvisionedStorageInMegaBytes = &v return s } @@ -14032,15 +16274,22 @@ type EnableSnapshotCopyInput struct { // ClusterIdentifier is a required field ClusterIdentifier *string `type:"string" required:"true"` - // The destination region that you want to copy snapshots to. + // The destination AWS Region that you want to copy snapshots to. // - // Constraints: Must be the name of a valid region. For more information, see - // Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#redshift_region) + // Constraints: Must be the name of a valid AWS Region. For more information, + // see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#redshift_region) // in the Amazon Web Services General Reference. // // DestinationRegion is a required field DestinationRegion *string `type:"string" required:"true"` + // The number of days to retain newly copied snapshots in the destination AWS + // Region after they are copied from the source AWS Region. If the value is + // -1, the manual snapshot is retained indefinitely. + // + // The value must be either -1 or an integer between 1 and 3,653. + ManualSnapshotRetentionPeriod *int64 `type:"integer"` + // The number of days to retain automated snapshots in the destination region // after they are copied from the source region. // @@ -14092,6 +16341,12 @@ func (s *EnableSnapshotCopyInput) SetDestinationRegion(v string) *EnableSnapshot return s } +// SetManualSnapshotRetentionPeriod sets the ManualSnapshotRetentionPeriod field's value. +func (s *EnableSnapshotCopyInput) SetManualSnapshotRetentionPeriod(v int64) *EnableSnapshotCopyInput { + s.ManualSnapshotRetentionPeriod = &v + return s +} + // SetRetentionPeriod sets the RetentionPeriod field's value. func (s *EnableSnapshotCopyInput) SetRetentionPeriod(v int64) *EnableSnapshotCopyInput { s.RetentionPeriod = &v @@ -14340,8 +16595,8 @@ type EventSubscription struct { // subscription. CustomerAwsId *string `type:"string"` - // A Boolean value indicating whether the subscription is enabled. true indicates - // the subscription is enabled. + // A boolean value indicating whether the subscription is enabled; true indicates + // that the subscription is enabled. Enabled *bool `type:"boolean"` // The list of Amazon Redshift event categories specified in the event notification @@ -14622,7 +16877,7 @@ type GetClusterCredentialsOutput struct { // A temporary password that authorizes the user name returned by DbUser to // log on to the database DbName. - DbPassword *string `type:"string"` + DbPassword *string `type:"string" sensitive:"true"` // A database user name that is authorized to log on to the database DbName // using the password DbPassword. If the specified DbUser exists in the database, @@ -15353,6 +17608,15 @@ type ModifyClusterInput struct { // for the maintenance track. At this point, the maintenance track name is applied. MaintenanceTrackName *string `type:"string"` + // The default for number of days that a newly created manual snapshot is retained. + // If the value is -1, the manual snapshot is retained indefinitely. This value + // doesn't retroactively change the retention periods of existing manual snapshots. + // + // The value must be either -1 or an integer between 1 and 3,653. + // + // The default value is -1. + ManualSnapshotRetentionPeriod *int64 `type:"integer"` + // The new password for the cluster master user. This change is asynchronously // applied as soon as possible. Between the time of the request and the completion // of the request, the MasterUserPassword element exists in the PendingModifiedValues @@ -15558,6 +17822,12 @@ func (s *ModifyClusterInput) SetMaintenanceTrackName(v string) *ModifyClusterInp return s } +// SetManualSnapshotRetentionPeriod sets the ManualSnapshotRetentionPeriod field's value. +func (s *ModifyClusterInput) SetManualSnapshotRetentionPeriod(v int64) *ModifyClusterInput { + s.ManualSnapshotRetentionPeriod = &v + return s +} + // SetMasterUserPassword sets the MasterUserPassword field's value. func (s *ModifyClusterInput) SetMasterUserPassword(v string) *ModifyClusterInput { s.MasterUserPassword = &v @@ -15600,6 +17870,115 @@ func (s *ModifyClusterInput) SetVpcSecurityGroupIds(v []*string) *ModifyClusterI return s } +type ModifyClusterMaintenanceInput struct { + _ struct{} `type:"structure"` + + // A unique identifier for the cluster. + // + // ClusterIdentifier is a required field + ClusterIdentifier *string `type:"string" required:"true"` + + // A boolean indicating whether to enable the deferred maintenance window. + DeferMaintenance *bool `type:"boolean"` + + // An integer indicating the duration of the maintenance window in days. If + // you specify a duration, you can't specify an end time. The duration must + // be 14 days or less. + DeferMaintenanceDuration *int64 `type:"integer"` + + // A timestamp indicating end time for the deferred maintenance window. If you + // specify an end time, you can't specify a duration. + DeferMaintenanceEndTime *time.Time `type:"timestamp"` + + // A unique identifier for the deferred maintenance window. + DeferMaintenanceIdentifier *string `type:"string"` + + // A timestamp indicating the start time for the deferred maintenance window. + DeferMaintenanceStartTime *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s ModifyClusterMaintenanceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyClusterMaintenanceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyClusterMaintenanceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyClusterMaintenanceInput"} + if s.ClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClusterIdentifier sets the ClusterIdentifier field's value. +func (s *ModifyClusterMaintenanceInput) SetClusterIdentifier(v string) *ModifyClusterMaintenanceInput { + s.ClusterIdentifier = &v + return s +} + +// SetDeferMaintenance sets the DeferMaintenance field's value. +func (s *ModifyClusterMaintenanceInput) SetDeferMaintenance(v bool) *ModifyClusterMaintenanceInput { + s.DeferMaintenance = &v + return s +} + +// SetDeferMaintenanceDuration sets the DeferMaintenanceDuration field's value. +func (s *ModifyClusterMaintenanceInput) SetDeferMaintenanceDuration(v int64) *ModifyClusterMaintenanceInput { + s.DeferMaintenanceDuration = &v + return s +} + +// SetDeferMaintenanceEndTime sets the DeferMaintenanceEndTime field's value. +func (s *ModifyClusterMaintenanceInput) SetDeferMaintenanceEndTime(v time.Time) *ModifyClusterMaintenanceInput { + s.DeferMaintenanceEndTime = &v + return s +} + +// SetDeferMaintenanceIdentifier sets the DeferMaintenanceIdentifier field's value. +func (s *ModifyClusterMaintenanceInput) SetDeferMaintenanceIdentifier(v string) *ModifyClusterMaintenanceInput { + s.DeferMaintenanceIdentifier = &v + return s +} + +// SetDeferMaintenanceStartTime sets the DeferMaintenanceStartTime field's value. +func (s *ModifyClusterMaintenanceInput) SetDeferMaintenanceStartTime(v time.Time) *ModifyClusterMaintenanceInput { + s.DeferMaintenanceStartTime = &v + return s +} + +type ModifyClusterMaintenanceOutput struct { + _ struct{} `type:"structure"` + + // Describes a cluster. + Cluster *Cluster `type:"structure"` +} + +// String returns the string representation +func (s ModifyClusterMaintenanceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyClusterMaintenanceOutput) GoString() string { + return s.String() +} + +// SetCluster sets the Cluster field's value. +func (s *ModifyClusterMaintenanceOutput) SetCluster(v *Cluster) *ModifyClusterMaintenanceOutput { + s.Cluster = v + return s +} + type ModifyClusterOutput struct { _ struct{} `type:"structure"` @@ -15682,6 +18061,164 @@ func (s *ModifyClusterParameterGroupInput) SetParameters(v []*Parameter) *Modify return s } +type ModifyClusterSnapshotInput struct { + _ struct{} `type:"structure"` + + // A Boolean option to override an exception if the retention period has already + // passed. + Force *bool `type:"boolean"` + + // The number of days that a manual snapshot is retained. If the value is -1, + // the manual snapshot is retained indefinitely. + // + // If the manual snapshot falls outside of the new retention period, you can + // specify the force option to immediately delete the snapshot. + // + // The value must be either -1 or an integer between 1 and 3,653. + ManualSnapshotRetentionPeriod *int64 `type:"integer"` + + // The identifier of the snapshot whose setting you want to modify. + // + // SnapshotIdentifier is a required field + SnapshotIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ModifyClusterSnapshotInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyClusterSnapshotInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyClusterSnapshotInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyClusterSnapshotInput"} + if s.SnapshotIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("SnapshotIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetForce sets the Force field's value. +func (s *ModifyClusterSnapshotInput) SetForce(v bool) *ModifyClusterSnapshotInput { + s.Force = &v + return s +} + +// SetManualSnapshotRetentionPeriod sets the ManualSnapshotRetentionPeriod field's value. +func (s *ModifyClusterSnapshotInput) SetManualSnapshotRetentionPeriod(v int64) *ModifyClusterSnapshotInput { + s.ManualSnapshotRetentionPeriod = &v + return s +} + +// SetSnapshotIdentifier sets the SnapshotIdentifier field's value. +func (s *ModifyClusterSnapshotInput) SetSnapshotIdentifier(v string) *ModifyClusterSnapshotInput { + s.SnapshotIdentifier = &v + return s +} + +type ModifyClusterSnapshotOutput struct { + _ struct{} `type:"structure"` + + // Describes a snapshot. + Snapshot *Snapshot `type:"structure"` +} + +// String returns the string representation +func (s ModifyClusterSnapshotOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyClusterSnapshotOutput) GoString() string { + return s.String() +} + +// SetSnapshot sets the Snapshot field's value. +func (s *ModifyClusterSnapshotOutput) SetSnapshot(v *Snapshot) *ModifyClusterSnapshotOutput { + s.Snapshot = v + return s +} + +type ModifyClusterSnapshotScheduleInput struct { + _ struct{} `type:"structure"` + + // A unique identifier for the cluster whose snapshot schedule you want to modify. + // + // ClusterIdentifier is a required field + ClusterIdentifier *string `type:"string" required:"true"` + + // A boolean to indicate whether to remove the assoiciation between the cluster + // and the schedule. + DisassociateSchedule *bool `type:"boolean"` + + // A unique alphanumeric identifier for the schedule that you want to associate + // with the cluster. + ScheduleIdentifier *string `type:"string"` +} + +// String returns the string representation +func (s ModifyClusterSnapshotScheduleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyClusterSnapshotScheduleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyClusterSnapshotScheduleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyClusterSnapshotScheduleInput"} + if s.ClusterIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClusterIdentifier sets the ClusterIdentifier field's value. +func (s *ModifyClusterSnapshotScheduleInput) SetClusterIdentifier(v string) *ModifyClusterSnapshotScheduleInput { + s.ClusterIdentifier = &v + return s +} + +// SetDisassociateSchedule sets the DisassociateSchedule field's value. +func (s *ModifyClusterSnapshotScheduleInput) SetDisassociateSchedule(v bool) *ModifyClusterSnapshotScheduleInput { + s.DisassociateSchedule = &v + return s +} + +// SetScheduleIdentifier sets the ScheduleIdentifier field's value. +func (s *ModifyClusterSnapshotScheduleInput) SetScheduleIdentifier(v string) *ModifyClusterSnapshotScheduleInput { + s.ScheduleIdentifier = &v + return s +} + +type ModifyClusterSnapshotScheduleOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s ModifyClusterSnapshotScheduleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyClusterSnapshotScheduleOutput) GoString() string { + return s.String() +} + type ModifyClusterSubnetGroupInput struct { _ struct{} `type:"structure"` @@ -15777,7 +18314,7 @@ type ModifyEventSubscriptionInput struct { // Specifies the Amazon Redshift event categories to be published by the event // notification subscription. // - // Values: Configuration, Management, Monitoring, Security + // Values: configuration, management, monitoring, security EventCategories []*string `locationNameList:"EventCategory" type:"list"` // Specifies the Amazon Redshift event severity to be published by the event @@ -15909,7 +18446,8 @@ type ModifySnapshotCopyRetentionPeriodInput struct { _ struct{} `type:"structure"` // The unique identifier of the cluster for which you want to change the retention - // period for automated snapshots that are copied to a destination region. + // period for either automated or manual snapshots that are copied to a destination + // AWS Region. // // Constraints: Must be the valid name of an existing cluster that has cross-region // snapshot copy enabled. @@ -15917,15 +18455,30 @@ type ModifySnapshotCopyRetentionPeriodInput struct { // ClusterIdentifier is a required field ClusterIdentifier *string `type:"string" required:"true"` - // The number of days to retain automated snapshots in the destination region - // after they are copied from the source region. + // Indicates whether to apply the snapshot retention period to newly copied + // manual snapshots instead of automated snapshots. + Manual *bool `type:"boolean"` + + // The number of days to retain automated snapshots in the destination AWS Region + // after they are copied from the source AWS Region. + // + // By default, this only changes the retention period of copied automated snapshots. // // If you decrease the retention period for automated snapshots that are copied - // to a destination region, Amazon Redshift will delete any existing automated - // snapshots that were copied to the destination region and that fall outside + // to a destination AWS Region, Amazon Redshift deletes any existing automated + // snapshots that were copied to the destination AWS Region and that fall outside // of the new retention period. // - // Constraints: Must be at least 1 and no more than 35. + // Constraints: Must be at least 1 and no more than 35 for automated snapshots. + // + // If you specify the manual option, only newly copied manual snapshots will + // have the new retention period. + // + // If you specify the value of -1 newly copied manual snapshots are retained + // indefinitely. + // + // Constraints: The number of days must be either -1 or an integer between 1 + // and 3,653 for manual snapshots. // // RetentionPeriod is a required field RetentionPeriod *int64 `type:"integer" required:"true"` @@ -15963,6 +18516,12 @@ func (s *ModifySnapshotCopyRetentionPeriodInput) SetClusterIdentifier(v string) return s } +// SetManual sets the Manual field's value. +func (s *ModifySnapshotCopyRetentionPeriodInput) SetManual(v bool) *ModifySnapshotCopyRetentionPeriodInput { + s.Manual = &v + return s +} + // SetRetentionPeriod sets the RetentionPeriod field's value. func (s *ModifySnapshotCopyRetentionPeriodInput) SetRetentionPeriod(v int64) *ModifySnapshotCopyRetentionPeriodInput { s.RetentionPeriod = &v @@ -15992,6 +18551,135 @@ func (s *ModifySnapshotCopyRetentionPeriodOutput) SetCluster(v *Cluster) *Modify return s } +type ModifySnapshotScheduleInput struct { + _ struct{} `type:"structure"` + + // An updated list of schedule definitions. A schedule definition is made up + // of schedule expressions, for example, "cron(30 12 *)" or "rate(12 hours)". + // + // ScheduleDefinitions is a required field + ScheduleDefinitions []*string `locationNameList:"ScheduleDefinition" type:"list" required:"true"` + + // A unique alphanumeric identifier of the schedule to modify. + // + // ScheduleIdentifier is a required field + ScheduleIdentifier *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s ModifySnapshotScheduleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifySnapshotScheduleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifySnapshotScheduleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifySnapshotScheduleInput"} + if s.ScheduleDefinitions == nil { + invalidParams.Add(request.NewErrParamRequired("ScheduleDefinitions")) + } + if s.ScheduleIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ScheduleIdentifier")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetScheduleDefinitions sets the ScheduleDefinitions field's value. +func (s *ModifySnapshotScheduleInput) SetScheduleDefinitions(v []*string) *ModifySnapshotScheduleInput { + s.ScheduleDefinitions = v + return s +} + +// SetScheduleIdentifier sets the ScheduleIdentifier field's value. +func (s *ModifySnapshotScheduleInput) SetScheduleIdentifier(v string) *ModifySnapshotScheduleInput { + s.ScheduleIdentifier = &v + return s +} + +// Describes a snapshot schedule. You can set a regular interval for creating +// snapshots of a cluster. You can also schedule snapshots for specific dates. +type ModifySnapshotScheduleOutput struct { + _ struct{} `type:"structure"` + + AssociatedClusterCount *int64 `type:"integer"` + + AssociatedClusters []*ClusterAssociatedToSchedule `locationNameList:"ClusterAssociatedToSchedule" type:"list"` + + NextInvocations []*time.Time `locationNameList:"SnapshotTime" type:"list"` + + // A list of ScheduleDefinitions + ScheduleDefinitions []*string `locationNameList:"ScheduleDefinition" type:"list"` + + // The description of the schedule. + ScheduleDescription *string `type:"string"` + + // A unique identifier for the schedule. + ScheduleIdentifier *string `type:"string"` + + // An optional set of tags describing the schedule. + Tags []*Tag `locationNameList:"Tag" type:"list"` +} + +// String returns the string representation +func (s ModifySnapshotScheduleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifySnapshotScheduleOutput) GoString() string { + return s.String() +} + +// SetAssociatedClusterCount sets the AssociatedClusterCount field's value. +func (s *ModifySnapshotScheduleOutput) SetAssociatedClusterCount(v int64) *ModifySnapshotScheduleOutput { + s.AssociatedClusterCount = &v + return s +} + +// SetAssociatedClusters sets the AssociatedClusters field's value. +func (s *ModifySnapshotScheduleOutput) SetAssociatedClusters(v []*ClusterAssociatedToSchedule) *ModifySnapshotScheduleOutput { + s.AssociatedClusters = v + return s +} + +// SetNextInvocations sets the NextInvocations field's value. +func (s *ModifySnapshotScheduleOutput) SetNextInvocations(v []*time.Time) *ModifySnapshotScheduleOutput { + s.NextInvocations = v + return s +} + +// SetScheduleDefinitions sets the ScheduleDefinitions field's value. +func (s *ModifySnapshotScheduleOutput) SetScheduleDefinitions(v []*string) *ModifySnapshotScheduleOutput { + s.ScheduleDefinitions = v + return s +} + +// SetScheduleDescription sets the ScheduleDescription field's value. +func (s *ModifySnapshotScheduleOutput) SetScheduleDescription(v string) *ModifySnapshotScheduleOutput { + s.ScheduleDescription = &v + return s +} + +// SetScheduleIdentifier sets the ScheduleIdentifier field's value. +func (s *ModifySnapshotScheduleOutput) SetScheduleIdentifier(v string) *ModifySnapshotScheduleOutput { + s.ScheduleIdentifier = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *ModifySnapshotScheduleOutput) SetTags(v []*Tag) *ModifySnapshotScheduleOutput { + s.Tags = v + return s +} + // Describes an orderable cluster option. type OrderableClusterOption struct { _ struct{} `type:"structure"` @@ -16754,7 +19442,7 @@ type ResizeClusterInput struct { _ struct{} `type:"structure"` // A boolean value indicating whether the resize operation is using the classic - // resize process. If you don't provide this parameter or set the value to false + // resize process. If you don't provide this parameter or set the value to false, // the resize type is elastic. Classic *bool `type:"boolean"` @@ -16854,6 +19542,39 @@ func (s *ResizeClusterOutput) SetCluster(v *Cluster) *ResizeClusterOutput { return s } +// Describes a resize operation. +type ResizeInfo struct { + _ struct{} `type:"structure"` + + // A boolean value indicating if the resize operation can be cancelled. + AllowCancelResize *bool `type:"boolean"` + + // Returns the value ClassicResize. + ResizeType *string `type:"string"` +} + +// String returns the string representation +func (s ResizeInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResizeInfo) GoString() string { + return s.String() +} + +// SetAllowCancelResize sets the AllowCancelResize field's value. +func (s *ResizeInfo) SetAllowCancelResize(v bool) *ResizeInfo { + s.AllowCancelResize = &v + return s +} + +// SetResizeType sets the ResizeType field's value. +func (s *ResizeInfo) SetResizeType(v string) *ResizeInfo { + s.ResizeType = &v + return s +} + type RestoreFromClusterSnapshotInput struct { _ struct{} `type:"structure"` @@ -16971,6 +19692,8 @@ type RestoreFromClusterSnapshotInput struct { // are on different tracks. MaintenanceTrackName *string `type:"string"` + ManualSnapshotRetentionPeriod *int64 `type:"integer"` + // The node type that the restored cluster will be provisioned with. // // Default: The node type of the cluster from which the snapshot was taken. @@ -17028,6 +19751,9 @@ type RestoreFromClusterSnapshotInput struct { // SnapshotIdentifier is a required field SnapshotIdentifier *string `type:"string" required:"true"` + // A unique identifier for the snapshot schedule. + SnapshotScheduleIdentifier *string `type:"string"` + // A list of Virtual Private Cloud (VPC) security groups to be associated with // the cluster. // @@ -17153,6 +19879,12 @@ func (s *RestoreFromClusterSnapshotInput) SetMaintenanceTrackName(v string) *Res return s } +// SetManualSnapshotRetentionPeriod sets the ManualSnapshotRetentionPeriod field's value. +func (s *RestoreFromClusterSnapshotInput) SetManualSnapshotRetentionPeriod(v int64) *RestoreFromClusterSnapshotInput { + s.ManualSnapshotRetentionPeriod = &v + return s +} + // SetNodeType sets the NodeType field's value. func (s *RestoreFromClusterSnapshotInput) SetNodeType(v string) *RestoreFromClusterSnapshotInput { s.NodeType = &v @@ -17195,6 +19927,12 @@ func (s *RestoreFromClusterSnapshotInput) SetSnapshotIdentifier(v string) *Resto return s } +// SetSnapshotScheduleIdentifier sets the SnapshotScheduleIdentifier field's value. +func (s *RestoreFromClusterSnapshotInput) SetSnapshotScheduleIdentifier(v string) *RestoreFromClusterSnapshotInput { + s.SnapshotScheduleIdentifier = &v + return s +} + // SetVpcSecurityGroupIds sets the VpcSecurityGroupIds field's value. func (s *RestoreFromClusterSnapshotInput) SetVpcSecurityGroupIds(v []*string) *RestoreFromClusterSnapshotInput { s.VpcSecurityGroupIds = v @@ -17804,6 +20542,15 @@ type Snapshot struct { // The name of the maintenance track for the snapshot. MaintenanceTrackName *string `type:"string"` + // The number of days until a manual snapshot will pass its retention period. + ManualSnapshotRemainingDays *int64 `type:"integer"` + + // The number of days that a manual snapshot is retained. If the value is -1, + // the manual snapshot is retained indefinitely. + // + // The value must be either -1 or an integer between 1 and 3,653. + ManualSnapshotRetentionPeriod *int64 `type:"integer"` + // The master user name for the cluster. MasterUsername *string `type:"string"` @@ -17824,22 +20571,25 @@ type Snapshot struct { // The list of node types that this cluster snapshot is able to restore into. RestorableNodeTypes []*string `locationNameList:"NodeType" type:"list"` - // The time (UTC) when Amazon Redshift began the snapshot. A snapshot contains - // a copy of the cluster data as of this exact time. + // The time (in UTC format) when Amazon Redshift began the snapshot. A snapshot + // contains a copy of the cluster data as of this exact time. SnapshotCreateTime *time.Time `type:"timestamp"` // The snapshot identifier that is provided in the request. SnapshotIdentifier *string `type:"string"` + // A timestamp representing the start of the retention period for the snapshot. + SnapshotRetentionStartTime *time.Time `type:"timestamp"` + // The snapshot type. Snapshots created using CreateClusterSnapshot and CopyClusterSnapshot - // will be of type "manual". + // are of type "manual". SnapshotType *string `type:"string"` // The source region from which the snapshot was copied. SourceRegion *string `type:"string"` // The snapshot status. The value of the status depends on the API operation - // used. + // used: // // * CreateClusterSnapshot and CopyClusterSnapshot returns status as "creating". // @@ -17968,6 +20718,18 @@ func (s *Snapshot) SetMaintenanceTrackName(v string) *Snapshot { return s } +// SetManualSnapshotRemainingDays sets the ManualSnapshotRemainingDays field's value. +func (s *Snapshot) SetManualSnapshotRemainingDays(v int64) *Snapshot { + s.ManualSnapshotRemainingDays = &v + return s +} + +// SetManualSnapshotRetentionPeriod sets the ManualSnapshotRetentionPeriod field's value. +func (s *Snapshot) SetManualSnapshotRetentionPeriod(v int64) *Snapshot { + s.ManualSnapshotRetentionPeriod = &v + return s +} + // SetMasterUsername sets the MasterUsername field's value. func (s *Snapshot) SetMasterUsername(v string) *Snapshot { s.MasterUsername = &v @@ -18016,6 +20778,12 @@ func (s *Snapshot) SetSnapshotIdentifier(v string) *Snapshot { return s } +// SetSnapshotRetentionStartTime sets the SnapshotRetentionStartTime field's value. +func (s *Snapshot) SetSnapshotRetentionStartTime(v time.Time) *Snapshot { + s.SnapshotRetentionStartTime = &v + return s +} + // SetSnapshotType sets the SnapshotType field's value. func (s *Snapshot) SetSnapshotType(v string) *Snapshot { s.SnapshotType = &v @@ -18101,6 +20869,181 @@ func (s *SnapshotCopyGrant) SetTags(v []*Tag) *SnapshotCopyGrant { return s } +// Describes the errors returned by a snapshot. +type SnapshotErrorMessage struct { + _ struct{} `type:"structure"` + + // The failure code for the error. + FailureCode *string `type:"string"` + + // The text message describing the error. + FailureReason *string `type:"string"` + + // A unique identifier for the cluster. + SnapshotClusterIdentifier *string `type:"string"` + + // A unique identifier for the snapshot returning the error. + SnapshotIdentifier *string `type:"string"` +} + +// String returns the string representation +func (s SnapshotErrorMessage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SnapshotErrorMessage) GoString() string { + return s.String() +} + +// SetFailureCode sets the FailureCode field's value. +func (s *SnapshotErrorMessage) SetFailureCode(v string) *SnapshotErrorMessage { + s.FailureCode = &v + return s +} + +// SetFailureReason sets the FailureReason field's value. +func (s *SnapshotErrorMessage) SetFailureReason(v string) *SnapshotErrorMessage { + s.FailureReason = &v + return s +} + +// SetSnapshotClusterIdentifier sets the SnapshotClusterIdentifier field's value. +func (s *SnapshotErrorMessage) SetSnapshotClusterIdentifier(v string) *SnapshotErrorMessage { + s.SnapshotClusterIdentifier = &v + return s +} + +// SetSnapshotIdentifier sets the SnapshotIdentifier field's value. +func (s *SnapshotErrorMessage) SetSnapshotIdentifier(v string) *SnapshotErrorMessage { + s.SnapshotIdentifier = &v + return s +} + +// Describes a snapshot schedule. You can set a regular interval for creating +// snapshots of a cluster. You can also schedule snapshots for specific dates. +type SnapshotSchedule struct { + _ struct{} `type:"structure"` + + AssociatedClusterCount *int64 `type:"integer"` + + AssociatedClusters []*ClusterAssociatedToSchedule `locationNameList:"ClusterAssociatedToSchedule" type:"list"` + + NextInvocations []*time.Time `locationNameList:"SnapshotTime" type:"list"` + + // A list of ScheduleDefinitions + ScheduleDefinitions []*string `locationNameList:"ScheduleDefinition" type:"list"` + + // The description of the schedule. + ScheduleDescription *string `type:"string"` + + // A unique identifier for the schedule. + ScheduleIdentifier *string `type:"string"` + + // An optional set of tags describing the schedule. + Tags []*Tag `locationNameList:"Tag" type:"list"` +} + +// String returns the string representation +func (s SnapshotSchedule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SnapshotSchedule) GoString() string { + return s.String() +} + +// SetAssociatedClusterCount sets the AssociatedClusterCount field's value. +func (s *SnapshotSchedule) SetAssociatedClusterCount(v int64) *SnapshotSchedule { + s.AssociatedClusterCount = &v + return s +} + +// SetAssociatedClusters sets the AssociatedClusters field's value. +func (s *SnapshotSchedule) SetAssociatedClusters(v []*ClusterAssociatedToSchedule) *SnapshotSchedule { + s.AssociatedClusters = v + return s +} + +// SetNextInvocations sets the NextInvocations field's value. +func (s *SnapshotSchedule) SetNextInvocations(v []*time.Time) *SnapshotSchedule { + s.NextInvocations = v + return s +} + +// SetScheduleDefinitions sets the ScheduleDefinitions field's value. +func (s *SnapshotSchedule) SetScheduleDefinitions(v []*string) *SnapshotSchedule { + s.ScheduleDefinitions = v + return s +} + +// SetScheduleDescription sets the ScheduleDescription field's value. +func (s *SnapshotSchedule) SetScheduleDescription(v string) *SnapshotSchedule { + s.ScheduleDescription = &v + return s +} + +// SetScheduleIdentifier sets the ScheduleIdentifier field's value. +func (s *SnapshotSchedule) SetScheduleIdentifier(v string) *SnapshotSchedule { + s.ScheduleIdentifier = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *SnapshotSchedule) SetTags(v []*Tag) *SnapshotSchedule { + s.Tags = v + return s +} + +// Describes a sorting entity +type SnapshotSortingEntity struct { + _ struct{} `type:"structure"` + + // The category for sorting the snapshots. + // + // Attribute is a required field + Attribute *string `type:"string" required:"true" enum:"SnapshotAttributeToSortBy"` + + // The order for listing the attributes. + SortOrder *string `type:"string" enum:"SortByOrder"` +} + +// String returns the string representation +func (s SnapshotSortingEntity) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SnapshotSortingEntity) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *SnapshotSortingEntity) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "SnapshotSortingEntity"} + if s.Attribute == nil { + invalidParams.Add(request.NewErrParamRequired("Attribute")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAttribute sets the Attribute field's value. +func (s *SnapshotSortingEntity) SetAttribute(v string) *SnapshotSortingEntity { + s.Attribute = &v + return s +} + +// SetSortOrder sets the SortOrder field's value. +func (s *SnapshotSortingEntity) SetSortOrder(v string) *SnapshotSortingEntity { + s.SortOrder = &v + return s +} + // Describes a subnet. type Subnet struct { _ struct{} `type:"structure"` @@ -18143,6 +21086,30 @@ func (s *Subnet) SetSubnetStatus(v string) *Subnet { return s } +// Describes the operations that are allowed on a maintenance track. +type SupportedOperation struct { + _ struct{} `type:"structure"` + + // A list of the supported operations. + OperationName *string `type:"string"` +} + +// String returns the string representation +func (s SupportedOperation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SupportedOperation) GoString() string { + return s.String() +} + +// SetOperationName sets the OperationName field's value. +func (s *SupportedOperation) SetOperationName(v string) *SupportedOperation { + s.OperationName = &v + return s +} + // A list of supported platforms for orderable clusters. type SupportedPlatform struct { _ struct{} `type:"structure"` @@ -18349,7 +21316,7 @@ func (s *Tag) SetValue(v string) *Tag { type TaggedResource struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) with which the tag is associated. For example, + // The Amazon Resource Name (ARN) with which the tag is associated, for example: // arn:aws:redshift:us-east-1:123456789:cluster:t1. ResourceName *string `type:"string"` @@ -18420,6 +21387,9 @@ type UpdateTarget struct { // The name of the new maintenance track. MaintenanceTrackName *string `type:"string"` + + // A list of operations supported by the maintenance track. + SupportedOperations []*SupportedOperation `locationNameList:"SupportedOperation" type:"list"` } // String returns the string representation @@ -18444,6 +21414,12 @@ func (s *UpdateTarget) SetMaintenanceTrackName(v string) *UpdateTarget { return s } +// SetSupportedOperations sets the SupportedOperations field's value. +func (s *UpdateTarget) SetSupportedOperations(v []*SupportedOperation) *UpdateTarget { + s.SupportedOperations = v + return s +} + // Describes the members of a VPC security group. type VpcSecurityGroupMembership struct { _ struct{} `type:"structure"` @@ -18493,6 +21469,36 @@ const ( ReservedNodeOfferingTypeUpgradable = "Upgradable" ) +const ( + // ScheduleStateModifying is a ScheduleState enum value + ScheduleStateModifying = "MODIFYING" + + // ScheduleStateActive is a ScheduleState enum value + ScheduleStateActive = "ACTIVE" + + // ScheduleStateFailed is a ScheduleState enum value + ScheduleStateFailed = "FAILED" +) + +const ( + // SnapshotAttributeToSortBySourceType is a SnapshotAttributeToSortBy enum value + SnapshotAttributeToSortBySourceType = "SOURCE_TYPE" + + // SnapshotAttributeToSortByTotalSize is a SnapshotAttributeToSortBy enum value + SnapshotAttributeToSortByTotalSize = "TOTAL_SIZE" + + // SnapshotAttributeToSortByCreateTime is a SnapshotAttributeToSortBy enum value + SnapshotAttributeToSortByCreateTime = "CREATE_TIME" +) + +const ( + // SortByOrderAsc is a SortByOrder enum value + SortByOrderAsc = "ASC" + + // SortByOrderDesc is a SortByOrder enum value + SortByOrderDesc = "DESC" +) + const ( // SourceTypeCluster is a SourceType enum value SourceTypeCluster = "cluster" diff --git a/vendor/github.com/aws/aws-sdk-go/service/redshift/errors.go b/vendor/github.com/aws/aws-sdk-go/service/redshift/errors.go index 00fb70dae2..4cb2a67786 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/redshift/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/redshift/errors.go @@ -31,6 +31,20 @@ const ( // The authorization quota for the cluster security group has been reached. ErrCodeAuthorizationQuotaExceededFault = "AuthorizationQuotaExceeded" + // ErrCodeBatchDeleteRequestSizeExceededFault for service response error code + // "BatchDeleteRequestSizeExceeded". + // + // The maximum number for a batch delete of snapshots has been reached. The + // limit is 100. + ErrCodeBatchDeleteRequestSizeExceededFault = "BatchDeleteRequestSizeExceeded" + + // ErrCodeBatchModifyClusterSnapshotsLimitExceededFault for service response error code + // "BatchModifyClusterSnapshotsLimitExceededFault". + // + // The maximum number for snapshot identifiers has been reached. The limit is + // 100. + ErrCodeBatchModifyClusterSnapshotsLimitExceededFault = "BatchModifyClusterSnapshotsLimitExceededFault" + // ErrCodeBucketNotFoundFault for service response error code // "BucketNotFoundFault". // @@ -269,6 +283,12 @@ const ( // The state of the cluster security group is not available. ErrCodeInvalidClusterSecurityGroupStateFault = "InvalidClusterSecurityGroupState" + // ErrCodeInvalidClusterSnapshotScheduleStateFault for service response error code + // "InvalidClusterSnapshotScheduleState". + // + // The cluster snapshot schedule state is not valid. + ErrCodeInvalidClusterSnapshotScheduleStateFault = "InvalidClusterSnapshotScheduleState" + // ErrCodeInvalidClusterSnapshotStateFault for service response error code // "InvalidClusterSnapshotState". // @@ -332,6 +352,14 @@ const ( // The restore is invalid. ErrCodeInvalidRestoreFault = "InvalidRestore" + // ErrCodeInvalidRetentionPeriodFault for service response error code + // "InvalidRetentionPeriodFault". + // + // The retention period specified is either in the past or is not a valid value. + // + // The value must be either -1 or an integer between 1 and 3,653. + ErrCodeInvalidRetentionPeriodFault = "InvalidRetentionPeriodFault" + // ErrCodeInvalidS3BucketNameFault for service response error code // "InvalidS3BucketNameFault". // @@ -347,6 +375,12 @@ const ( // documented constraints. ErrCodeInvalidS3KeyPrefixFault = "InvalidS3KeyPrefixFault" + // ErrCodeInvalidScheduleFault for service response error code + // "InvalidSchedule". + // + // The schedule you submitted isn't valid. + ErrCodeInvalidScheduleFault = "InvalidSchedule" + // ErrCodeInvalidSnapshotCopyGrantStateFault for service response error code // "InvalidSnapshotCopyGrantStateFault". // @@ -472,6 +506,12 @@ const ( // exist. ErrCodeSNSTopicArnNotFoundFault = "SNSTopicArnNotFound" + // ErrCodeScheduleDefinitionTypeUnsupportedFault for service response error code + // "ScheduleDefinitionTypeUnsupported". + // + // The definition you submitted is not supported. + ErrCodeScheduleDefinitionTypeUnsupportedFault = "ScheduleDefinitionTypeUnsupported" + // ErrCodeSnapshotCopyAlreadyDisabledFault for service response error code // "SnapshotCopyAlreadyDisabledFault". // @@ -511,6 +551,30 @@ const ( // this region. ErrCodeSnapshotCopyGrantQuotaExceededFault = "SnapshotCopyGrantQuotaExceededFault" + // ErrCodeSnapshotScheduleAlreadyExistsFault for service response error code + // "SnapshotScheduleAlreadyExists". + // + // The specified snapshot schedule already exists. + ErrCodeSnapshotScheduleAlreadyExistsFault = "SnapshotScheduleAlreadyExists" + + // ErrCodeSnapshotScheduleNotFoundFault for service response error code + // "SnapshotScheduleNotFound". + // + // We could not find the specified snapshot schedule. + ErrCodeSnapshotScheduleNotFoundFault = "SnapshotScheduleNotFound" + + // ErrCodeSnapshotScheduleQuotaExceededFault for service response error code + // "SnapshotScheduleQuotaExceeded". + // + // You have exceeded the quota of snapshot schedules. + ErrCodeSnapshotScheduleQuotaExceededFault = "SnapshotScheduleQuotaExceeded" + + // ErrCodeSnapshotScheduleUpdateInProgressFault for service response error code + // "SnapshotScheduleUpdateInProgress". + // + // The specified snapshot schedule is already being updated. + ErrCodeSnapshotScheduleUpdateInProgressFault = "SnapshotScheduleUpdateInProgress" + // ErrCodeSourceNotFoundFault for service response error code // "SourceNotFound". // @@ -575,8 +639,7 @@ const ( // ErrCodeTagLimitExceededFault for service response error code // "TagLimitExceededFault". // - // The number of tables in your source cluster exceeds the limit for the target - // cluster. Resize to a larger cluster node type. + // You have exceeded the number of tags allowed. ErrCodeTagLimitExceededFault = "TagLimitExceededFault" // ErrCodeUnauthorizedOperation for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53/api.go b/vendor/github.com/aws/aws-sdk-go/service/route53/api.go index 97351a76f0..b73e0deb50 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/route53/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/route53/api.go @@ -9,6 +9,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/restxml" ) const opAssociateVPCWithHostedZone = "AssociateVPCWithHostedZone" @@ -16,7 +18,7 @@ const opAssociateVPCWithHostedZone = "AssociateVPCWithHostedZone" // AssociateVPCWithHostedZoneRequest generates a "aws/request.Request" representing the // client's request for the AssociateVPCWithHostedZone operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -147,7 +149,7 @@ const opChangeResourceRecordSets = "ChangeResourceRecordSets" // ChangeResourceRecordSetsRequest generates a "aws/request.Request" representing the // client's request for the ChangeResourceRecordSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -197,28 +199,28 @@ func (c *Route53) ChangeResourceRecordSetsRequest(input *ChangeResourceRecordSet // The request body must include a document with a ChangeResourceRecordSetsRequest // element. The request body contains a list of change items, known as a change // batch. Change batches are considered transactional changes. When using the -// Amazon Route 53 API to change resource record sets, Amazon Route 53 either -// makes all or none of the changes in a change batch request. This ensures -// that Amazon Route 53 never partially implements the intended changes to the -// resource record sets in a hosted zone. +// Amazon Route 53 API to change resource record sets, Route 53 either makes +// all or none of the changes in a change batch request. This ensures that Route +// 53 never partially implements the intended changes to the resource record +// sets in a hosted zone. // // For example, a change batch request that deletes the CNAME record for www.example.com -// and creates an alias resource record set for www.example.com. Amazon Route -// 53 deletes the first resource record set and creates the second resource -// record set in a single operation. If either the DELETE or the CREATE action -// fails, then both changes (plus any other changes in the batch) fail, and -// the original CNAME record continues to exist. +// and creates an alias resource record set for www.example.com. Route 53 deletes +// the first resource record set and creates the second resource record set +// in a single operation. If either the DELETE or the CREATE action fails, then +// both changes (plus any other changes in the batch) fail, and the original +// CNAME record continues to exist. // // Due to the nature of transactional changes, you can't delete the same resource // record set more than once in a single change batch. If you attempt to delete -// the same change batch more than once, Amazon Route 53 returns an InvalidChangeBatch +// the same change batch more than once, Route 53 returns an InvalidChangeBatch // error. // // Traffic Flow // // To create resource record sets for complex routing configurations, use either -// the traffic flow visual editor in the Amazon Route 53 console or the API -// actions for traffic policies and traffic policy instances. Save the configuration +// the traffic flow visual editor in the Route 53 console or the API actions +// for traffic policies and traffic policy instances. Save the configuration // as a traffic policy, then associate the traffic policy with one or more domain // names (such as example.com) or subdomain names (such as www.example.com), // in the same hosted zone or in multiple hosted zones. You can roll back the @@ -236,8 +238,8 @@ func (c *Route53) ChangeResourceRecordSetsRequest(input *ChangeResourceRecordSet // values. // // * UPSERT: If a resource record set does not already exist, AWS creates -// it. If a resource set does exist, Amazon Route 53 updates it with the -// values in the request. +// it. If a resource set does exist, Route 53 updates it with the values +// in the request. // // Syntaxes for Creating, Updating, and Deleting Resource Record Sets // @@ -251,14 +253,14 @@ func (c *Route53) ChangeResourceRecordSetsRequest(input *ChangeResourceRecordSet // all of the elements for every kind of resource record set that you can create, // delete, or update by using ChangeResourceRecordSets. // -// Change Propagation to Amazon Route 53 DNS Servers +// Change Propagation to Route 53 DNS Servers // -// When you submit a ChangeResourceRecordSets request, Amazon Route 53 propagates -// your changes to all of the Amazon Route 53 authoritative DNS servers. While -// your changes are propagating, GetChange returns a status of PENDING. When -// propagation is complete, GetChange returns a status of INSYNC. Changes generally -// propagate to all Amazon Route 53 name servers within 60 seconds. For more -// information, see GetChange. +// When you submit a ChangeResourceRecordSets request, Route 53 propagates your +// changes to all of the Route 53 authoritative DNS servers. While your changes +// are propagating, GetChange returns a status of PENDING. When propagation +// is complete, GetChange returns a status of INSYNC. Changes generally propagate +// to all Route 53 name servers within 60 seconds. For more information, see +// GetChange. // // Limits on ChangeResourceRecordSets Requests // @@ -278,8 +280,7 @@ func (c *Route53) ChangeResourceRecordSetsRequest(input *ChangeResourceRecordSet // No hosted zone exists with the ID that you specified. // // * ErrCodeNoSuchHealthCheck "NoSuchHealthCheck" -// No health check exists with the ID that you specified in the DeleteHealthCheck -// request. +// No health check exists with the specified ID. // // * ErrCodeInvalidChangeBatch "InvalidChangeBatch" // This exception contains a list of messages that might contain one or more @@ -291,8 +292,8 @@ func (c *Route53) ChangeResourceRecordSetsRequest(input *ChangeResourceRecordSet // * ErrCodePriorRequestNotComplete "PriorRequestNotComplete" // If Amazon Route 53 can't process a request before the next request arrives, // it will reject subsequent requests for the same hosted zone and return an -// HTTP 400 error (Bad request). If Amazon Route 53 returns this error repeatedly -// for the same request, we recommend that you wait, in intervals of increasing +// HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for +// the same request, we recommend that you wait, in intervals of increasing // duration, before you try the request again. // // See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/ChangeResourceRecordSets @@ -322,7 +323,7 @@ const opChangeTagsForResource = "ChangeTagsForResource" // ChangeTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ChangeTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -356,6 +357,7 @@ func (c *Route53) ChangeTagsForResourceRequest(input *ChangeTagsForResourceInput output = &ChangeTagsForResourceOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -379,8 +381,7 @@ func (c *Route53) ChangeTagsForResourceRequest(input *ChangeTagsForResourceInput // The input is not valid. // // * ErrCodeNoSuchHealthCheck "NoSuchHealthCheck" -// No health check exists with the ID that you specified in the DeleteHealthCheck -// request. +// No health check exists with the specified ID. // // * ErrCodeNoSuchHostedZone "NoSuchHostedZone" // No hosted zone exists with the ID that you specified. @@ -388,8 +389,8 @@ func (c *Route53) ChangeTagsForResourceRequest(input *ChangeTagsForResourceInput // * ErrCodePriorRequestNotComplete "PriorRequestNotComplete" // If Amazon Route 53 can't process a request before the next request arrives, // it will reject subsequent requests for the same hosted zone and return an -// HTTP 400 error (Bad request). If Amazon Route 53 returns this error repeatedly -// for the same request, we recommend that you wait, in intervals of increasing +// HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for +// the same request, we recommend that you wait, in intervals of increasing // duration, before you try the request again. // // * ErrCodeThrottlingException "ThrottlingException" @@ -422,7 +423,7 @@ const opCreateHealthCheck = "CreateHealthCheck" // CreateHealthCheckRequest generates a "aws/request.Request" representing the // client's request for the CreateHealthCheck operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -471,17 +472,17 @@ func (c *Route53) CreateHealthCheckRequest(input *CreateHealthCheckInput) (req * // If you're registering EC2 instances with an Elastic Load Balancing (ELB) // load balancer, do not create Amazon Route 53 health checks for the EC2 instances. // When you register an EC2 instance with a load balancer, you configure settings -// for an ELB health check, which performs a similar function to an Amazon Route -// 53 health check. +// for an ELB health check, which performs a similar function to a Route 53 +// health check. // // Private Hosted Zones // // You can associate health checks with failover resource record sets in a private // hosted zone. Note the following: // -// * Amazon Route 53 health checkers are outside the VPC. To check the health -// of an endpoint within a VPC by IP address, you must assign a public IP -// address to the instance in the VPC. +// * Route 53 health checkers are outside the VPC. To check the health of +// an endpoint within a VPC by IP address, you must assign a public IP address +// to the instance in the VPC. // // * You can configure a health checker to check the health of an external // resource that the instance relies on, such as a database server. @@ -558,7 +559,7 @@ const opCreateHostedZone = "CreateHostedZone" // CreateHostedZoneRequest generates a "aws/request.Request" representing the // client's request for the CreateHostedZone operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -597,41 +598,45 @@ func (c *Route53) CreateHostedZoneRequest(input *CreateHostedZoneInput) (req *re // CreateHostedZone API operation for Amazon Route 53. // -// Creates a new public hosted zone, which you use to specify how the Domain -// Name System (DNS) routes traffic on the Internet for a domain, such as example.com, -// and its subdomains. +// Creates a new public or private hosted zone. You create records in a public +// hosted zone to define how you want to route traffic on the internet for a +// domain, such as example.com, and its subdomains (apex.example.com, acme.example.com). +// You create records in a private hosted zone to define how you want to route +// traffic for a domain and its subdomains within one or more Amazon Virtual +// Private Clouds (Amazon VPCs). // -// You can't convert a public hosted zones to a private hosted zone or vice -// versa. Instead, you must create a new hosted zone with the same name and -// create new resource record sets. +// You can't convert a public hosted zone to a private hosted zone or vice versa. +// Instead, you must create a new hosted zone with the same name and create +// new resource record sets. // // For more information about charges for hosted zones, see Amazon Route 53 // Pricing (http://aws.amazon.com/route53/pricing/). // // Note the following: // -// * You can't create a hosted zone for a top-level domain (TLD). +// * You can't create a hosted zone for a top-level domain (TLD) such as +// .com. // -// * Amazon Route 53 automatically creates a default SOA record and four -// NS records for the zone. For more information about SOA and NS records, -// see NS and SOA Records that Amazon Route 53 Creates for a Hosted Zone -// (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/SOA-NSrecords.html) +// * For public hosted zones, Amazon Route 53 automatically creates a default +// SOA record and four NS records for the zone. For more information about +// SOA and NS records, see NS and SOA Records that Route 53 Creates for a +// Hosted Zone (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/SOA-NSrecords.html) // in the Amazon Route 53 Developer Guide. // -// If you want to use the same name servers for multiple hosted zones, you can -// optionally associate a reusable delegation set with the hosted zone. See -// the DelegationSetId element. +// If you want to use the same name servers for multiple public hosted zones, +// you can optionally associate a reusable delegation set with the hosted +// zone. See the DelegationSetId element. // -// * If your domain is registered with a registrar other than Amazon Route -// 53, you must update the name servers with your registrar to make Amazon -// Route 53 your DNS service. For more information, see Configuring Amazon -// Route 53 as your DNS Service (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/creating-migrating.html) +// * If your domain is registered with a registrar other than Route 53, you +// must update the name servers with your registrar to make Route 53 the +// DNS service for the domain. For more information, see Migrating DNS Service +// for an Existing Domain to Amazon Route 53 (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/MigratingDNS.html) // in the Amazon Route 53 Developer Guide. // // When you submit a CreateHostedZone request, the initial status of the hosted -// zone is PENDING. This means that the NS and SOA records are not yet available -// on all Amazon Route 53 DNS servers. When the NS and SOA records are available, -// the status of the zone changes to INSYNC. +// zone is PENDING. For public hosted zones, this means that the NS and SOA +// records are not yet available on all Route 53 DNS servers. When the NS and +// SOA records are available, the status of the zone changes to INSYNC. // // 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 @@ -678,8 +683,8 @@ func (c *Route53) CreateHostedZoneRequest(input *CreateHostedZoneInput) (req *re // You can create a hosted zone that has the same name as an existing hosted // zone (example.com is common), but there is a limit to the number of hosted // zones that have the same name. If you get this error, Amazon Route 53 has -// reached that limit. If you own the domain name and Amazon Route 53 generates -// this error, contact Customer Support. +// reached that limit. If you own the domain name and Route 53 generates this +// error, contact Customer Support. // // * ErrCodeConflictingDomainExists "ConflictingDomainExists" // The cause of this error depends on whether you're trying to create a public @@ -732,7 +737,7 @@ const opCreateQueryLoggingConfig = "CreateQueryLoggingConfig" // CreateQueryLoggingConfigRequest generates a "aws/request.Request" representing the // client's request for the CreateQueryLoggingConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -775,10 +780,10 @@ func (c *Route53) CreateQueryLoggingConfigRequest(input *CreateQueryLoggingConfi // configuration, Amazon Route 53 begins to publish log data to an Amazon CloudWatch // Logs log group. // -// DNS query logs contain information about the queries that Amazon Route 53 -// receives for a specified public hosted zone, such as the following: +// DNS query logs contain information about the queries that Route 53 receives +// for a specified public hosted zone, such as the following: // -// * Amazon Route 53 edge location that responded to the DNS query +// * Route 53 edge location that responded to the DNS query // // * Domain or subdomain that was requested // @@ -789,8 +794,8 @@ func (c *Route53) CreateQueryLoggingConfigRequest(input *CreateQueryLoggingConfi // Log Group and Resource PolicyBefore you create a query logging configuration, // perform the following operations. // -// If you create a query logging configuration using the Amazon Route 53 console, -// Amazon Route 53 performs these operations automatically. +// If you create a query logging configuration using the Route 53 console, Route +// 53 performs these operations automatically. // // Create a CloudWatch Logs log group, and make note of the ARN, which you specify // when you create a query logging configuration. Note the following: @@ -806,30 +811,30 @@ func (c *Route53) CreateQueryLoggingConfigRequest(input *CreateQueryLoggingConfi // /aws/route53/hosted zone name // // In the next step, you'll create a resource policy, which controls access -// to one or more log groups and the associated AWS resources, such as Amazon -// Route 53 hosted zones. There's a limit on the number of resource policies -// that you can create, so we recommend that you use a consistent prefix so -// you can use the same resource policy for all the log groups that you create -// for query logging. +// to one or more log groups and the associated AWS resources, such as Route +// 53 hosted zones. There's a limit on the number of resource policies that +// you can create, so we recommend that you use a consistent prefix so you can +// use the same resource policy for all the log groups that you create for query +// logging. // // Create a CloudWatch Logs resource policy, and give it the permissions that -// Amazon Route 53 needs to create log streams and to send query logs to log -// streams. For the value of Resource, specify the ARN for the log group that -// you created in the previous step. To use the same resource policy for all -// the CloudWatch Logs log groups that you created for query logging configurations, -// replace the hosted zone name with *, for example: +// Route 53 needs to create log streams and to send query logs to log streams. +// For the value of Resource, specify the ARN for the log group that you created +// in the previous step. To use the same resource policy for all the CloudWatch +// Logs log groups that you created for query logging configurations, replace +// the hosted zone name with *, for example: // // arn:aws:logs:us-east-1:123412341234:log-group:/aws/route53/* // // You can't use the CloudWatch console to create or edit a resource policy. // You must use the CloudWatch API, one of the AWS SDKs, or the AWS CLI. // -// Log Streams and Edge LocationsWhen Amazon Route 53 finishes creating the -// configuration for DNS query logging, it does the following: +// Log Streams and Edge LocationsWhen Route 53 finishes creating the configuration +// for DNS query logging, it does the following: // // Creates a log stream for an edge location the first time that the edge location // responds to DNS queries for the specified hosted zone. That log stream is -// used to log all queries that Amazon Route 53 responds to for that edge location. +// used to log all queries that Route 53 responds to for that edge location. // // Begins to send query logs to the applicable log stream. // @@ -841,18 +846,17 @@ func (c *Route53) CreateQueryLoggingConfigRequest(input *CreateQueryLoggingConfi // number, for example, DFW3. The three-letter code typically corresponds with // the International Air Transport Association airport code for an airport near // the edge location. (These abbreviations might change in the future.) For -// a list of edge locations, see "The Amazon Route 53 Global Network" on the -// Amazon Route 53 Product Details (http://aws.amazon.com/route53/details/) -// page. +// a list of edge locations, see "The Route 53 Global Network" on the Route +// 53 Product Details (http://aws.amazon.com/route53/details/) page. // // Queries That Are LoggedQuery logs contain only the queries that DNS resolvers -// forward to Amazon Route 53. If a DNS resolver has already cached the response -// to a query (such as the IP address for a load balancer for example.com), -// the resolver will continue to return the cached response. It doesn't forward -// another query to Amazon Route 53 until the TTL for the corresponding resource -// record set expires. Depending on how many DNS queries are submitted for a -// resource record set, and depending on the TTL for that resource record set, -// query logs might contain information about only one query out of every several +// forward to Route 53. If a DNS resolver has already cached the response to +// a query (such as the IP address for a load balancer for example.com), the +// resolver will continue to return the cached response. It doesn't forward +// another query to Route 53 until the TTL for the corresponding resource record +// set expires. Depending on how many DNS queries are submitted for a resource +// record set, and depending on the TTL for that resource record set, query +// logs might contain information about only one query out of every several // thousand queries that are submitted to DNS. For more information about how // DNS works, see Routing Internet Traffic to Your Website or Web Application // (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/welcome-dns-service.html) @@ -865,9 +869,8 @@ func (c *Route53) CreateQueryLoggingConfigRequest(input *CreateQueryLoggingConfi // PricingFor information about charges for query logs, see Amazon CloudWatch // Pricing (http://aws.amazon.com/cloudwatch/pricing/). // -// How to Stop LoggingIf you want Amazon Route 53 to stop sending query logs -// to CloudWatch Logs, delete the query logging configuration. For more information, -// see DeleteQueryLoggingConfig. +// How to Stop LoggingIf you want Route 53 to stop sending query logs to CloudWatch +// Logs, delete the query logging configuration. For more information, see DeleteQueryLoggingConfig. // // 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 @@ -933,7 +936,7 @@ const opCreateReusableDelegationSet = "CreateReusableDelegationSet" // CreateReusableDelegationSetRequest generates a "aws/request.Request" representing the // client's request for the CreateReusableDelegationSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1052,8 +1055,8 @@ func (c *Route53) CreateReusableDelegationSetRequest(input *CreateReusableDelega // You can create a hosted zone that has the same name as an existing hosted // zone (example.com is common), but there is a limit to the number of hosted // zones that have the same name. If you get this error, Amazon Route 53 has -// reached that limit. If you own the domain name and Amazon Route 53 generates -// this error, contact Customer Support. +// reached that limit. If you own the domain name and Route 53 generates this +// error, contact Customer Support. // // * ErrCodeDelegationSetAlreadyReusable "DelegationSetAlreadyReusable" // The specified delegation set has already been marked as reusable. @@ -1085,7 +1088,7 @@ const opCreateTrafficPolicy = "CreateTrafficPolicy" // CreateTrafficPolicyRequest generates a "aws/request.Request" representing the // client's request for the CreateTrafficPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1185,7 +1188,7 @@ const opCreateTrafficPolicyInstance = "CreateTrafficPolicyInstance" // CreateTrafficPolicyInstanceRequest generates a "aws/request.Request" representing the // client's request for the CreateTrafficPolicyInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1290,7 +1293,7 @@ const opCreateTrafficPolicyVersion = "CreateTrafficPolicyVersion" // CreateTrafficPolicyVersionRequest generates a "aws/request.Request" representing the // client's request for the CreateTrafficPolicyVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1397,7 +1400,7 @@ const opCreateVPCAssociationAuthorization = "CreateVPCAssociationAuthorization" // CreateVPCAssociationAuthorizationRequest generates a "aws/request.Request" representing the // client's request for the CreateVPCAssociationAuthorization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1503,7 +1506,7 @@ const opDeleteHealthCheck = "DeleteHealthCheck" // DeleteHealthCheckRequest generates a "aws/request.Request" representing the // client's request for the DeleteHealthCheck operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1537,6 +1540,7 @@ func (c *Route53) DeleteHealthCheckRequest(input *DeleteHealthCheckInput) (req * output = &DeleteHealthCheckOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1561,8 +1565,7 @@ func (c *Route53) DeleteHealthCheckRequest(input *DeleteHealthCheckInput) (req * // // Returned Error Codes: // * ErrCodeNoSuchHealthCheck "NoSuchHealthCheck" -// No health check exists with the ID that you specified in the DeleteHealthCheck -// request. +// No health check exists with the specified ID. // // * ErrCodeHealthCheckInUse "HealthCheckInUse" // This error code is not in use. @@ -1597,7 +1600,7 @@ const opDeleteHostedZone = "DeleteHostedZone" // DeleteHostedZoneRequest generates a "aws/request.Request" representing the // client's request for the DeleteHostedZone operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1656,8 +1659,8 @@ func (c *Route53) DeleteHostedZoneRequest(input *DeleteHostedZoneInput) (req *re // and NS resource record sets. If the hosted zone contains other resource record // sets, you must delete them before you can delete the hosted zone. If you // try to delete a hosted zone that contains other resource record sets, the -// request fails, and Amazon Route 53 returns a HostedZoneNotEmpty error. For -// information about deleting records from your hosted zone, see ChangeResourceRecordSets. +// request fails, and Route 53 returns a HostedZoneNotEmpty error. For information +// about deleting records from your hosted zone, see ChangeResourceRecordSets. // // To verify that the hosted zone has been deleted, do one of the following: // @@ -1684,8 +1687,8 @@ func (c *Route53) DeleteHostedZoneRequest(input *DeleteHostedZoneInput) (req *re // * ErrCodePriorRequestNotComplete "PriorRequestNotComplete" // If Amazon Route 53 can't process a request before the next request arrives, // it will reject subsequent requests for the same hosted zone and return an -// HTTP 400 error (Bad request). If Amazon Route 53 returns this error repeatedly -// for the same request, we recommend that you wait, in intervals of increasing +// HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for +// the same request, we recommend that you wait, in intervals of increasing // duration, before you try the request again. // // * ErrCodeInvalidInput "InvalidInput" @@ -1721,7 +1724,7 @@ const opDeleteQueryLoggingConfig = "DeleteQueryLoggingConfig" // DeleteQueryLoggingConfigRequest generates a "aws/request.Request" representing the // client's request for the DeleteQueryLoggingConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1755,14 +1758,15 @@ func (c *Route53) DeleteQueryLoggingConfigRequest(input *DeleteQueryLoggingConfi output = &DeleteQueryLoggingConfigOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteQueryLoggingConfig API operation for Amazon Route 53. // // Deletes a configuration for DNS query logging. If you delete a configuration, -// Amazon Route 53 stops sending query logs to CloudWatch Logs. Amazon Route -// 53 doesn't delete any logs that are already in CloudWatch Logs. +// Amazon Route 53 stops sending query logs to CloudWatch Logs. Route 53 doesn't +// delete any logs that are already in CloudWatch Logs. // // For more information about DNS query logs, see CreateQueryLoggingConfig. // @@ -1811,7 +1815,7 @@ const opDeleteReusableDelegationSet = "DeleteReusableDelegationSet" // DeleteReusableDelegationSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteReusableDelegationSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1845,6 +1849,7 @@ func (c *Route53) DeleteReusableDelegationSetRequest(input *DeleteReusableDelega output = &DeleteReusableDelegationSetOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1907,7 +1912,7 @@ const opDeleteTrafficPolicy = "DeleteTrafficPolicy" // DeleteTrafficPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteTrafficPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1941,6 +1946,7 @@ func (c *Route53) DeleteTrafficPolicyRequest(input *DeleteTrafficPolicyInput) (r output = &DeleteTrafficPolicyOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1997,7 +2003,7 @@ const opDeleteTrafficPolicyInstance = "DeleteTrafficPolicyInstance" // DeleteTrafficPolicyInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeleteTrafficPolicyInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2031,6 +2037,7 @@ func (c *Route53) DeleteTrafficPolicyInstanceRequest(input *DeleteTrafficPolicyI output = &DeleteTrafficPolicyInstanceOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2039,8 +2046,7 @@ func (c *Route53) DeleteTrafficPolicyInstanceRequest(input *DeleteTrafficPolicyI // Deletes a traffic policy instance and all of the resource record sets that // Amazon Route 53 created when you created the instance. // -// In the Amazon Route 53 console, traffic policy instances are known as policy -// records. +// In the Route 53 console, traffic policy instances are known as policy records. // // 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 @@ -2059,8 +2065,8 @@ func (c *Route53) DeleteTrafficPolicyInstanceRequest(input *DeleteTrafficPolicyI // * ErrCodePriorRequestNotComplete "PriorRequestNotComplete" // If Amazon Route 53 can't process a request before the next request arrives, // it will reject subsequent requests for the same hosted zone and return an -// HTTP 400 error (Bad request). If Amazon Route 53 returns this error repeatedly -// for the same request, we recommend that you wait, in intervals of increasing +// HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for +// the same request, we recommend that you wait, in intervals of increasing // duration, before you try the request again. // // See also, https://docs.aws.amazon.com/goto/WebAPI/route53-2013-04-01/DeleteTrafficPolicyInstance @@ -2090,7 +2096,7 @@ const opDeleteVPCAssociationAuthorization = "DeleteVPCAssociationAuthorization" // DeleteVPCAssociationAuthorizationRequest generates a "aws/request.Request" representing the // client's request for the DeleteVPCAssociationAuthorization operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2124,6 +2130,7 @@ func (c *Route53) DeleteVPCAssociationAuthorizationRequest(input *DeleteVPCAssoc output = &DeleteVPCAssociationAuthorizationOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2193,7 +2200,7 @@ const opDisassociateVPCFromHostedZone = "DisassociateVPCFromHostedZone" // DisassociateVPCFromHostedZoneRequest generates a "aws/request.Request" representing the // client's request for the DisassociateVPCFromHostedZone operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2232,13 +2239,16 @@ func (c *Route53) DisassociateVPCFromHostedZoneRequest(input *DisassociateVPCFro // DisassociateVPCFromHostedZone API operation for Amazon Route 53. // -// Disassociates a VPC from a Amazon Route 53 private hosted zone. +// Disassociates a VPC from a Amazon Route 53 private hosted zone. Note the +// following: +// +// * You can't disassociate the last VPC from a private hosted zone. // -// You can't disassociate the last VPC from a private hosted zone. +// * You can't convert a private hosted zone into a public hosted zone. // -// You can't disassociate a VPC from a private hosted zone when only one VPC -// is associated with the hosted zone. You also can't convert a private hosted -// zone into a public hosted zone. +// * You can submit a DisassociateVPCFromHostedZone request using either +// the account that created the hosted zone or the account that created the +// VPC. // // 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 @@ -2293,7 +2303,7 @@ const opGetAccountLimit = "GetAccountLimit" // GetAccountLimitRequest generates a "aws/request.Request" representing the // client's request for the GetAccountLimit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2377,7 +2387,7 @@ const opGetChange = "GetChange" // GetChangeRequest generates a "aws/request.Request" representing the // client's request for the GetChange operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2423,8 +2433,8 @@ func (c *Route53) GetChangeRequest(input *GetChangeInput) (req *request.Request, // to all Amazon Route 53 DNS servers. This is the initial status of all // change batch requests. // -// * INSYNC indicates that the changes have propagated to all Amazon Route -// 53 DNS servers. +// * INSYNC indicates that the changes have propagated to all Route 53 DNS +// servers. // // 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 @@ -2467,7 +2477,7 @@ const opGetCheckerIpRanges = "GetCheckerIpRanges" // GetCheckerIpRangesRequest generates a "aws/request.Request" representing the // client's request for the GetCheckerIpRanges operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2544,7 +2554,7 @@ const opGetGeoLocation = "GetGeoLocation" // GetGeoLocationRequest generates a "aws/request.Request" representing the // client's request for the GetGeoLocation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2589,17 +2599,17 @@ func (c *Route53) GetGeoLocationRequest(input *GetGeoLocationInput) (req *reques // Use the following syntax to determine whether a continent is supported for // geolocation: // -// GET /2013-04-01/geolocation?ContinentCode=two-letter abbreviation for a continent +// GET /2013-04-01/geolocation?continentcode=two-letter abbreviation for a continent // // Use the following syntax to determine whether a country is supported for // geolocation: // -// GET /2013-04-01/geolocation?CountryCode=two-character country code +// GET /2013-04-01/geolocation?countrycode=two-character country code // // Use the following syntax to determine whether a subdivision of a country // is supported for geolocation: // -// GET /2013-04-01/geolocation?CountryCode=two-character country code&SubdivisionCode=subdivision +// GET /2013-04-01/geolocation?countrycode=two-character country code&subdivisioncode=subdivision // code // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2611,7 +2621,7 @@ func (c *Route53) GetGeoLocationRequest(input *GetGeoLocationInput) (req *reques // // Returned Error Codes: // * ErrCodeNoSuchGeoLocation "NoSuchGeoLocation" -// Amazon Route 53 doesn't support the specified geolocation. +// Amazon Route 53 doesn't support the specified geographic location. // // * ErrCodeInvalidInput "InvalidInput" // The input is not valid. @@ -2643,7 +2653,7 @@ const opGetHealthCheck = "GetHealthCheck" // GetHealthCheckRequest generates a "aws/request.Request" representing the // client's request for the GetHealthCheck operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2693,8 +2703,7 @@ func (c *Route53) GetHealthCheckRequest(input *GetHealthCheckInput) (req *reques // // Returned Error Codes: // * ErrCodeNoSuchHealthCheck "NoSuchHealthCheck" -// No health check exists with the ID that you specified in the DeleteHealthCheck -// request. +// No health check exists with the specified ID. // // * ErrCodeInvalidInput "InvalidInput" // The input is not valid. @@ -2730,7 +2739,7 @@ const opGetHealthCheckCount = "GetHealthCheckCount" // GetHealthCheckCountRequest generates a "aws/request.Request" representing the // client's request for the GetHealthCheckCount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2805,7 +2814,7 @@ const opGetHealthCheckLastFailureReason = "GetHealthCheckLastFailureReason" // GetHealthCheckLastFailureReasonRequest generates a "aws/request.Request" representing the // client's request for the GetHealthCheckLastFailureReason operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2855,8 +2864,7 @@ func (c *Route53) GetHealthCheckLastFailureReasonRequest(input *GetHealthCheckLa // // Returned Error Codes: // * ErrCodeNoSuchHealthCheck "NoSuchHealthCheck" -// No health check exists with the ID that you specified in the DeleteHealthCheck -// request. +// No health check exists with the specified ID. // // * ErrCodeInvalidInput "InvalidInput" // The input is not valid. @@ -2888,7 +2896,7 @@ const opGetHealthCheckStatus = "GetHealthCheckStatus" // GetHealthCheckStatusRequest generates a "aws/request.Request" representing the // client's request for the GetHealthCheckStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2938,8 +2946,7 @@ func (c *Route53) GetHealthCheckStatusRequest(input *GetHealthCheckStatusInput) // // Returned Error Codes: // * ErrCodeNoSuchHealthCheck "NoSuchHealthCheck" -// No health check exists with the ID that you specified in the DeleteHealthCheck -// request. +// No health check exists with the specified ID. // // * ErrCodeInvalidInput "InvalidInput" // The input is not valid. @@ -2971,7 +2978,7 @@ const opGetHostedZone = "GetHostedZone" // GetHostedZoneRequest generates a "aws/request.Request" representing the // client's request for the GetHostedZone operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3054,7 +3061,7 @@ const opGetHostedZoneCount = "GetHostedZoneCount" // GetHostedZoneCountRequest generates a "aws/request.Request" representing the // client's request for the GetHostedZoneCount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3134,7 +3141,7 @@ const opGetHostedZoneLimit = "GetHostedZoneLimit" // GetHostedZoneLimitRequest generates a "aws/request.Request" representing the // client's request for the GetHostedZoneLimit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3224,7 +3231,7 @@ const opGetQueryLoggingConfig = "GetQueryLoggingConfig" // GetQueryLoggingConfigRequest generates a "aws/request.Request" representing the // client's request for the GetQueryLoggingConfig operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3309,7 +3316,7 @@ const opGetReusableDelegationSet = "GetReusableDelegationSet" // GetReusableDelegationSetRequest generates a "aws/request.Request" representing the // client's request for the GetReusableDelegationSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3395,7 +3402,7 @@ const opGetReusableDelegationSetLimit = "GetReusableDelegationSetLimit" // GetReusableDelegationSetLimitRequest generates a "aws/request.Request" representing the // client's request for the GetReusableDelegationSetLimit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3482,7 +3489,7 @@ const opGetTrafficPolicy = "GetTrafficPolicy" // GetTrafficPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetTrafficPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3564,7 +3571,7 @@ const opGetTrafficPolicyInstance = "GetTrafficPolicyInstance" // GetTrafficPolicyInstanceRequest generates a "aws/request.Request" representing the // client's request for the GetTrafficPolicyInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3610,8 +3617,7 @@ func (c *Route53) GetTrafficPolicyInstanceRequest(input *GetTrafficPolicyInstanc // record sets that are specified in the traffic policy definition. For more // information, see the State response element. // -// In the Amazon Route 53 console, traffic policy instances are known as policy -// records. +// In the Route 53 console, traffic policy instances are known as policy records. // // 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 @@ -3654,7 +3660,7 @@ const opGetTrafficPolicyInstanceCount = "GetTrafficPolicyInstanceCount" // GetTrafficPolicyInstanceCountRequest generates a "aws/request.Request" representing the // client's request for the GetTrafficPolicyInstanceCount operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3729,7 +3735,7 @@ const opListGeoLocations = "ListGeoLocations" // ListGeoLocationsRequest generates a "aws/request.Request" representing the // client's request for the ListGeoLocations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3768,7 +3774,7 @@ func (c *Route53) ListGeoLocationsRequest(input *ListGeoLocationsInput) (req *re // ListGeoLocations API operation for Amazon Route 53. // -// Retrieves a list of supported geo locations. +// Retrieves a list of supported geographic locations. // // Countries are listed first, and continents are listed last. If Amazon Route // 53 supports subdivisions for a country (for example, states or provinces), @@ -3813,7 +3819,7 @@ const opListHealthChecks = "ListHealthChecks" // ListHealthChecksRequest generates a "aws/request.Request" representing the // client's request for the ListHealthChecks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3953,7 +3959,7 @@ const opListHostedZones = "ListHostedZones" // ListHostedZonesRequest generates a "aws/request.Request" representing the // client's request for the ListHostedZones operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4100,7 +4106,7 @@ const opListHostedZonesByName = "ListHostedZonesByName" // ListHostedZonesByNameRequest generates a "aws/request.Request" representing the // client's request for the ListHostedZonesByName operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4163,10 +4169,10 @@ func (c *Route53) ListHostedZonesByNameRequest(input *ListHostedZonesByNameInput // domain names, see DNS Domain Name Format (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DomainNameFormat.html) // in the Amazon Route 53 Developer Guide. // -// Amazon Route 53 returns up to 100 items in each response. If you have a lot -// of hosted zones, use the MaxItems parameter to list them in groups of up -// to 100. The response includes values that help navigate from one group of -// MaxItems hosted zones to the next: +// Route 53 returns up to 100 items in each response. If you have a lot of hosted +// zones, use the MaxItems parameter to list them in groups of up to 100. The +// response includes values that help navigate from one group of MaxItems hosted +// zones to the next: // // * The DNSName and HostedZoneId elements in the response contain the values, // if any, specified for the dnsname and hostedzoneid parameters in the request @@ -4231,7 +4237,7 @@ const opListQueryLoggingConfigs = "ListQueryLoggingConfigs" // ListQueryLoggingConfigsRequest generates a "aws/request.Request" representing the // client's request for the ListQueryLoggingConfigs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4324,7 +4330,7 @@ const opListResourceRecordSets = "ListResourceRecordSets" // ListResourceRecordSetsRequest generates a "aws/request.Request" representing the // client's request for the ListResourceRecordSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4373,18 +4379,25 @@ func (c *Route53) ListResourceRecordSetsRequest(input *ListResourceRecordSetsInp // // ListResourceRecordSets returns up to 100 resource record sets at a time in // ASCII order, beginning at a position specified by the name and type elements. -// The action sorts results first by DNS name with the labels reversed, for -// example: +// +// Sort order +// +// ListResourceRecordSets sorts results first by DNS name with the labels reversed, +// for example: // // com.example.www. // -// Note the trailing dot, which can change the sort order in some circumstances. +// Note the trailing dot, which can change the sort order when the record name +// contains characters that appear before . (decimal 46) in the ASCII table. +// These characters include the following: ! " # $ % & ' ( ) * + , - // -// When multiple records have the same DNS name, the action sorts results by -// the record type. +// When multiple records have the same DNS name, ListResourceRecordSets sorts +// results by the record type. // -// You can use the name and type elements to adjust the beginning position of -// the list of resource record sets returned: +// Specifying where to start listing records +// +// You can use the name and type elements to specify the resource record set +// that the list begins with: // // If you do not specify Name or TypeThe results begin with the first resource // record set that the hosted zone contains. @@ -4399,9 +4412,13 @@ func (c *Route53) ListResourceRecordSetsRequest(input *ListResourceRecordSetsInp // record set in the list whose name is greater than or equal to Name, and whose // type is greater than or equal to Type. // +// Resource record sets that are PENDING +// // This action returns the most current version of the records. This includes -// records that are PENDING, and that are not yet available on all Amazon Route -// 53 DNS servers. +// records that are PENDING, and that are not yet available on all Route 53 +// DNS servers. +// +// Changing resource record sets // // To ensure that you get an accurate listing of the resource record sets for // a hosted zone at a point in time, do not submit a ChangeResourceRecordSets @@ -4409,6 +4426,14 @@ func (c *Route53) ListResourceRecordSetsRequest(input *ListResourceRecordSetsInp // request. If you do, some pages may display results without the latest changes // while other pages display results with the latest changes. // +// Displaying the next page of results +// +// If a ListResourceRecordSets command returns more than one page of results, +// the value of IsTruncated is true. To display the next page of results, get +// the values of NextRecordName, NextRecordType, and NextRecordIdentifier (if +// any) from the response. Then submit another ListResourceRecordSets request, +// and specify those values for StartRecordName, StartRecordType, and StartRecordIdentifier. +// // 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. @@ -4500,7 +4525,7 @@ const opListReusableDelegationSets = "ListReusableDelegationSets" // ListReusableDelegationSetsRequest generates a "aws/request.Request" representing the // client's request for the ListReusableDelegationSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4580,7 +4605,7 @@ const opListTagsForResource = "ListTagsForResource" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4637,8 +4662,7 @@ func (c *Route53) ListTagsForResourceRequest(input *ListTagsForResourceInput) (r // The input is not valid. // // * ErrCodeNoSuchHealthCheck "NoSuchHealthCheck" -// No health check exists with the ID that you specified in the DeleteHealthCheck -// request. +// No health check exists with the specified ID. // // * ErrCodeNoSuchHostedZone "NoSuchHostedZone" // No hosted zone exists with the ID that you specified. @@ -4646,8 +4670,8 @@ func (c *Route53) ListTagsForResourceRequest(input *ListTagsForResourceInput) (r // * ErrCodePriorRequestNotComplete "PriorRequestNotComplete" // If Amazon Route 53 can't process a request before the next request arrives, // it will reject subsequent requests for the same hosted zone and return an -// HTTP 400 error (Bad request). If Amazon Route 53 returns this error repeatedly -// for the same request, we recommend that you wait, in intervals of increasing +// HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for +// the same request, we recommend that you wait, in intervals of increasing // duration, before you try the request again. // // * ErrCodeThrottlingException "ThrottlingException" @@ -4680,7 +4704,7 @@ const opListTagsForResources = "ListTagsForResources" // ListTagsForResourcesRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResources operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4737,8 +4761,7 @@ func (c *Route53) ListTagsForResourcesRequest(input *ListTagsForResourcesInput) // The input is not valid. // // * ErrCodeNoSuchHealthCheck "NoSuchHealthCheck" -// No health check exists with the ID that you specified in the DeleteHealthCheck -// request. +// No health check exists with the specified ID. // // * ErrCodeNoSuchHostedZone "NoSuchHostedZone" // No hosted zone exists with the ID that you specified. @@ -4746,8 +4769,8 @@ func (c *Route53) ListTagsForResourcesRequest(input *ListTagsForResourcesInput) // * ErrCodePriorRequestNotComplete "PriorRequestNotComplete" // If Amazon Route 53 can't process a request before the next request arrives, // it will reject subsequent requests for the same hosted zone and return an -// HTTP 400 error (Bad request). If Amazon Route 53 returns this error repeatedly -// for the same request, we recommend that you wait, in intervals of increasing +// HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for +// the same request, we recommend that you wait, in intervals of increasing // duration, before you try the request again. // // * ErrCodeThrottlingException "ThrottlingException" @@ -4780,7 +4803,7 @@ const opListTrafficPolicies = "ListTrafficPolicies" // ListTrafficPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListTrafficPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4821,7 +4844,7 @@ func (c *Route53) ListTrafficPoliciesRequest(input *ListTrafficPoliciesInput) (r // // Gets information about the latest version for every traffic policy that is // associated with the current AWS account. Policies are listed in the order -// in which they were created. +// that they were created in. // // 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 @@ -4861,7 +4884,7 @@ const opListTrafficPolicyInstances = "ListTrafficPolicyInstances" // ListTrafficPolicyInstancesRequest generates a "aws/request.Request" representing the // client's request for the ListTrafficPolicyInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4908,9 +4931,9 @@ func (c *Route53) ListTrafficPolicyInstancesRequest(input *ListTrafficPolicyInst // in the traffic policy definition. For more information, see the State response // element. // -// Amazon Route 53 returns a maximum of 100 items in each response. If you have -// a lot of traffic policy instances, you can use the MaxItems parameter to -// list them in groups of up to 100. +// Route 53 returns a maximum of 100 items in each response. If you have a lot +// of traffic policy instances, you can use the MaxItems parameter to list them +// in groups of up to 100. // // 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 @@ -4953,7 +4976,7 @@ const opListTrafficPolicyInstancesByHostedZone = "ListTrafficPolicyInstancesByHo // ListTrafficPolicyInstancesByHostedZoneRequest generates a "aws/request.Request" representing the // client's request for the ListTrafficPolicyInstancesByHostedZone operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5000,9 +5023,9 @@ func (c *Route53) ListTrafficPolicyInstancesByHostedZoneRequest(input *ListTraff // record sets that are specified in the traffic policy definition. For more // information, see the State response element. // -// Amazon Route 53 returns a maximum of 100 items in each response. If you have -// a lot of traffic policy instances, you can use the MaxItems parameter to -// list them in groups of up to 100. +// Route 53 returns a maximum of 100 items in each response. If you have a lot +// of traffic policy instances, you can use the MaxItems parameter to list them +// in groups of up to 100. // // 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 @@ -5048,7 +5071,7 @@ const opListTrafficPolicyInstancesByPolicy = "ListTrafficPolicyInstancesByPolicy // ListTrafficPolicyInstancesByPolicyRequest generates a "aws/request.Request" representing the // client's request for the ListTrafficPolicyInstancesByPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5095,9 +5118,9 @@ func (c *Route53) ListTrafficPolicyInstancesByPolicyRequest(input *ListTrafficPo // record sets that are specified in the traffic policy definition. For more // information, see the State response element. // -// Amazon Route 53 returns a maximum of 100 items in each response. If you have -// a lot of traffic policy instances, you can use the MaxItems parameter to -// list them in groups of up to 100. +// Route 53 returns a maximum of 100 items in each response. If you have a lot +// of traffic policy instances, you can use the MaxItems parameter to list them +// in groups of up to 100. // // 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 @@ -5143,7 +5166,7 @@ const opListTrafficPolicyVersions = "ListTrafficPolicyVersions" // ListTrafficPolicyVersionsRequest generates a "aws/request.Request" representing the // client's request for the ListTrafficPolicyVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5227,7 +5250,7 @@ const opListVPCAssociationAuthorizations = "ListVPCAssociationAuthorizations" // ListVPCAssociationAuthorizationsRequest generates a "aws/request.Request" representing the // client's request for the ListVPCAssociationAuthorizations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5318,7 +5341,7 @@ const opTestDNSAnswer = "TestDNSAnswer" // TestDNSAnswerRequest generates a "aws/request.Request" representing the // client's request for the TestDNSAnswer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5402,7 +5425,7 @@ const opUpdateHealthCheck = "UpdateHealthCheck" // UpdateHealthCheckRequest generates a "aws/request.Request" representing the // client's request for the UpdateHealthCheck operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5456,8 +5479,7 @@ func (c *Route53) UpdateHealthCheckRequest(input *UpdateHealthCheckInput) (req * // // Returned Error Codes: // * ErrCodeNoSuchHealthCheck "NoSuchHealthCheck" -// No health check exists with the ID that you specified in the DeleteHealthCheck -// request. +// No health check exists with the specified ID. // // * ErrCodeInvalidInput "InvalidInput" // The input is not valid. @@ -5493,7 +5515,7 @@ const opUpdateHostedZoneComment = "UpdateHostedZoneComment" // UpdateHostedZoneCommentRequest generates a "aws/request.Request" representing the // client's request for the UpdateHostedZoneComment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5575,7 +5597,7 @@ const opUpdateTrafficPolicyComment = "UpdateTrafficPolicyComment" // UpdateTrafficPolicyCommentRequest generates a "aws/request.Request" representing the // client's request for the UpdateTrafficPolicyComment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5661,7 +5683,7 @@ const opUpdateTrafficPolicyInstance = "UpdateTrafficPolicyInstance" // UpdateTrafficPolicyInstanceRequest generates a "aws/request.Request" representing the // client's request for the UpdateTrafficPolicyInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5705,19 +5727,19 @@ func (c *Route53) UpdateTrafficPolicyInstanceRequest(input *UpdateTrafficPolicyI // // When you update a traffic policy instance, Amazon Route 53 continues to respond // to DNS queries for the root resource record set name (such as example.com) -// while it replaces one group of resource record sets with another. Amazon -// Route 53 performs the following operations: +// while it replaces one group of resource record sets with another. Route 53 +// performs the following operations: // -// Amazon Route 53 creates a new group of resource record sets based on the -// specified traffic policy. This is true regardless of how significant the -// differences are between the existing resource record sets and the new resource -// record sets. +// Route 53 creates a new group of resource record sets based on the specified +// traffic policy. This is true regardless of how significant the differences +// are between the existing resource record sets and the new resource record +// sets. // -// When all of the new resource record sets have been created, Amazon Route -// 53 starts to respond to DNS queries for the root resource record set name -// (such as example.com) by using the new resource record sets. +// When all of the new resource record sets have been created, Route 53 starts +// to respond to DNS queries for the root resource record set name (such as +// example.com) by using the new resource record sets. // -// Amazon Route 53 deletes the old group of resource record sets that are associated +// Route 53 deletes the old group of resource record sets that are associated // with the root resource record set name. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5740,8 +5762,8 @@ func (c *Route53) UpdateTrafficPolicyInstanceRequest(input *UpdateTrafficPolicyI // * ErrCodePriorRequestNotComplete "PriorRequestNotComplete" // If Amazon Route 53 can't process a request before the next request arrives, // it will reject subsequent requests for the same hosted zone and return an -// HTTP 400 error (Bad request). If Amazon Route 53 returns this error repeatedly -// for the same request, we recommend that you wait, in intervals of increasing +// HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for +// the same request, we recommend that you wait, in intervals of increasing // duration, before you try the request again. // // * ErrCodeConflictingTypes "ConflictingTypes" @@ -5827,20 +5849,29 @@ func (s *AccountLimit) SetValue(v int64) *AccountLimit { } // A complex type that identifies the CloudWatch alarm that you want Amazon -// Route 53 health checkers to use to determine whether this health check is -// healthy. +// Route 53 health checkers to use to determine whether the specified health +// check is healthy. type AlarmIdentifier struct { _ struct{} `type:"structure"` // The name of the CloudWatch alarm that you want Amazon Route 53 health checkers // to use to determine whether this health check is healthy. // + // Route 53 supports CloudWatch alarms with the following features: + // + // Standard-resolution metrics. High-resolution metrics aren't supported. For + // more information, see High-Resolution Metrics (http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/publishingMetrics.html#high-resolution-metrics) + // in the Amazon CloudWatch User Guide. + // + // Statistics: Average, Minimum, Maximum, Sum, and SampleCount. Extended statistics + // aren't supported. + // // Name is a required field Name *string `min:"1" type:"string" required:"true"` - // A complex type that identifies the CloudWatch alarm that you want Amazon - // Route 53 health checkers to use to determine whether this health check is - // healthy. + // For the CloudWatch alarm that you want Route 53 health checkers to use to + // determine whether this health check is healthy, the region that the alarm + // was created in. // // For the current list of CloudWatch regions, see Amazon CloudWatch (http://docs.aws.amazon.com/general/latest/gr/rande.html#cw_region) // in the AWS Regions and Endpoints chapter of the Amazon Web Services General @@ -5925,9 +5956,29 @@ type AliasTarget struct { // see Using Alternate Domain Names (CNAMEs) (http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html) // in the Amazon CloudFront Developer Guide. // - // Elastic Beanstalk environmentSpecify the CNAME attribute for the environment. - // (The environment must have a regionalized domain name.) You can use the following - // methods to get the value of the CNAME attribute: + // For failover alias records, you can't specify a CloudFront distribution for + // both the primary and secondary records. A distribution must include an alternate + // domain name that matches the name of the record. However, the primary and + // secondary records have the same name, and you can't include the same alternate + // domain name in more than one distribution. + // + // Elastic Beanstalk environmentIf the domain name for your Elastic Beanstalk + // environment includes the region that you deployed the environment in, you + // can create an alias record that routes traffic to the environment. For example, + // the domain name my-environment.us-west-2.elasticbeanstalk.com is a regionalized + // domain name. + // + // For environments that were created before early 2016, the domain name doesn't + // include the region. To route traffic to these environments, you must create + // a CNAME record instead of an alias record. Note that you can't create a CNAME + // record for the root domain name. For example, if your domain name is example.com, + // you can create a record that routes traffic for acme.example.com to your + // Elastic Beanstalk environment, but you can't create a record that routes + // traffic for example.com to your Elastic Beanstalk environment. + // + // For Elastic Beanstalk environments that have regionalized subdomains, specify + // the CNAME attribute for the environment. You can use the following methods + // to get the value of the CNAME attribute: // // AWS Management Console: For information about how to get the value by using // the console, see Using Custom Domains with AWS Elastic Beanstalk (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customdomains.html) @@ -5947,8 +5998,11 @@ type AliasTarget struct { // // AWS Management Console: Go to the EC2 page, choose Load Balancers in the // navigation pane, choose the load balancer, choose the Description tab, and - // get the value of the DNS name field. (If you're routing traffic to a Classic - // Load Balancer, get the value that begins with dualstack.) + // get the value of the DNS name field. + // + // If you're routing traffic to a Classic Load Balancer, get the value that + // begins with dualstack. If you're routing traffic to another type of load + // balancer, get the value that applies to the record type, A or AAAA. // // Elastic Load Balancing API: Use DescribeLoadBalancers to get the value of // DNSName. For more information, see the applicable guide: @@ -5965,16 +6019,22 @@ type AliasTarget struct { // Application and Network Load Balancers: describe-load-balancers (http://docs.aws.amazon.com/cli/latest/reference/elbv2/describe-load-balancers.html) // // Amazon S3 bucket that is configured as a static websiteSpecify the domain - // name of the Amazon S3 website endpoint in which you created the bucket, for - // example, s3-website-us-east-2.amazonaws.com. For more information about valid + // name of the Amazon S3 website endpoint that you created the bucket in, for + // example, s3-website.us-east-2.amazonaws.com. For more information about valid // values, see the table Amazon Simple Storage Service (S3) Website Endpoints // (http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) in the // Amazon Web Services General Reference. For more information about using S3 // buckets for websites, see Getting Started with Amazon Route 53 (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/getting-started.html) // in the Amazon Route 53 Developer Guide. // - // Another Amazon Route 53 resource record setSpecify the value of the Name - // element for a resource record set in the current hosted zone. + // Another Route 53 resource record setSpecify the value of the Name element + // for a resource record set in the current hosted zone. + // + // If you're creating an alias record that has the same name as the hosted zone + // (known as the zone apex), you can't specify the domain name for a record + // for which the value of Type is CNAME. This is because the alias record must + // have the same type as the record that you're routing traffic to, and creating + // a CNAME record for the zone apex isn't supported even for an alias record. // // DNSName is a required field DNSName *string `type:"string" required:"true"` @@ -5982,48 +6042,61 @@ type AliasTarget struct { // Applies only to alias, failover alias, geolocation alias, latency alias, // and weighted alias resource record sets: When EvaluateTargetHealth is true, // an alias resource record set inherits the health of the referenced AWS resource, - // such as an ELB load balancer, or the referenced resource record set. + // such as an ELB load balancer or another resource record set in the hosted + // zone. // // Note the following: // - // * You can't set EvaluateTargetHealth to true when the alias target is - // a CloudFront distribution. - // - // * If the AWS resource that you specify in AliasTarget is a resource record - // set or a group of resource record sets (for example, a group of weighted - // resource record sets), but it is not another alias resource record set, - // we recommend that you associate a health check with all of the resource - // record sets in the alias target. For more information, see What Happens - // When You Omit Health Checks? (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-complex-configs.html#dns-failover-complex-configs-hc-omitting) - // in the Amazon Route 53 Developer Guide. - // - // * If you specify an Elastic Beanstalk environment in HostedZoneId and - // DNSName, and if the environment contains an ELB load balancer, Elastic - // Load Balancing routes queries only to the healthy Amazon EC2 instances - // that are registered with the load balancer. (An environment automatically - // contains an ELB load balancer if it includes more than one EC2 instance.) - // If you set EvaluateTargetHealth to true and either no EC2 instances are - // healthy or the load balancer itself is unhealthy, Amazon Route 53 routes - // queries to other available resources that are healthy, if any. - // - // If the environment contains a single EC2 instance, there are no special requirements. - // - // * If you specify an ELB load balancer in AliasTarget, ELB routes queries - // only to the healthy EC2 instances that are registered with the load balancer. - // If no EC2 instances are healthy or if the load balancer itself is unhealthy, - // and if EvaluateTargetHealth is true for the corresponding alias resource - // record set, Amazon Route 53 routes queries to other resources. When you - // create a load balancer, you configure settings for ELB health checks; - // they're not Amazon Route 53 health checks, but they perform a similar - // function. Do not create Amazon Route 53 health checks for the EC2 instances - // that you register with an ELB load balancer. - // - // For more information, see How Health Checks Work in More Complex Amazon Route - // 53 Configurations (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-complex-configs.html) - // in the Amazon Route 53 Developer Guide. - // - // * We recommend that you set EvaluateTargetHealth to true only when you - // have enough idle capacity to handle the failure of one or more endpoints. + // CloudFront distributionsYou can't set EvaluateTargetHealth to true when the + // alias target is a CloudFront distribution. + // + // Elastic Beanstalk environments that have regionalized subdomainsIf you specify + // an Elastic Beanstalk environment in DNSName and the environment contains + // an ELB load balancer, Elastic Load Balancing routes queries only to the healthy + // Amazon EC2 instances that are registered with the load balancer. (An environment + // automatically contains an ELB load balancer if it includes more than one + // Amazon EC2 instance.) If you set EvaluateTargetHealth to true and either + // no Amazon EC2 instances are healthy or the load balancer itself is unhealthy, + // Route 53 routes queries to other available resources that are healthy, if + // any. + // + // If the environment contains a single Amazon EC2 instance, there are no special + // requirements. + // + // ELB load balancersHealth checking behavior depends on the type of load balancer: + // + // Classic Load Balancers: If you specify an ELB Classic Load Balancer in DNSName, + // Elastic Load Balancing routes queries only to the healthy Amazon EC2 instances + // that are registered with the load balancer. If you set EvaluateTargetHealth + // to true and either no EC2 instances are healthy or the load balancer itself + // is unhealthy, Route 53 routes queries to other resources. + // + // Application and Network Load Balancers: If you specify an ELB Application + // or Network Load Balancer and you set EvaluateTargetHealth to true, Route + // 53 routes queries to the load balancer based on the health of the target + // groups that are associated with the load balancer: + // + // For an Application or Network Load Balancer to be considered healthy, every + // target group that contains targets must contain at least one healthy target. + // If any target group contains only unhealthy targets, the load balancer is + // considered unhealthy, and Route 53 routes queries to other resources. + // + // A target group that has no registered targets is considered healthy. + // + // When you create a load balancer, you configure settings for Elastic Load + // Balancing health checks; they're not Route 53 health checks, but they perform + // a similar function. Do not create Route 53 health checks for the EC2 instances + // that you register with an ELB load balancer. + // + // S3 bucketsThere are no special requirements for setting EvaluateTargetHealth + // to true when the alias target is an S3 bucket. + // + // Other records in the same hosted zoneIf the AWS resource that you specify + // in DNSName is a record or a group of records (for example, a group of weighted + // records) but is not another alias record, we recommend that you associate + // a health check with all of the records in the alias target. For more information, + // see What Happens When You Omit Health Checks? (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-complex-configs.html#dns-failover-complex-configs-hc-omitting) + // in the Amazon Route 53 Developer Guide. // // For more information and examples, see Amazon Route 53 Health Checks and // DNS Failover (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html) @@ -6039,8 +6112,8 @@ type AliasTarget struct { // // Alias resource record sets for CloudFront can't be created in a private zone. // - // Elastic Beanstalk environmentSpecify the hosted zone ID for the region in - // which you created the environment. The environment must have a regionalized + // Elastic Beanstalk environmentSpecify the hosted zone ID for the region that + // you created the environment in. The environment must have a regionalized // subdomain. For a list of regions and the corresponding hosted zone IDs, see // AWS Elastic Beanstalk (http://docs.aws.amazon.com/general/latest/gr/rande.html#elasticbeanstalk_region) // in the "AWS Regions and Endpoints" chapter of the Amazon Web Services General @@ -6083,8 +6156,8 @@ type AliasTarget struct { // table in the "AWS Regions and Endpoints" chapter of the Amazon Web Services // General Reference. // - // Another Amazon Route 53 resource record set in your hosted zoneSpecify the - // hosted zone ID of your hosted zone. (An alias resource record set can't reference + // Another Route 53 resource record set in your hosted zoneSpecify the hosted + // zone ID of your hosted zone. (An alias resource record set can't reference // a resource record set in a different hosted zone.) // // HostedZoneId is a required field @@ -6178,6 +6251,9 @@ func (s *AssociateVPCWithHostedZoneInput) Validate() error { if s.HostedZoneId == nil { invalidParams.Add(request.NewErrParamRequired("HostedZoneId")) } + if s.HostedZoneId != nil && len(*s.HostedZoneId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HostedZoneId", 1)) + } if s.VPC == nil { invalidParams.Add(request.NewErrParamRequired("VPC")) } @@ -6251,13 +6327,13 @@ type Change struct { // To delete the resource record set that is associated with a traffic policy // instance, use DeleteTrafficPolicyInstance. Amazon Route 53 will delete // the resource record set automatically. If you delete the resource record - // set by using ChangeResourceRecordSets, Amazon Route 53 doesn't automatically + // set by using ChangeResourceRecordSets, Route 53 doesn't automatically // delete the traffic policy instance, and you'll continue to be charged // for it even though it's no longer in use. // - // * UPSERT: If a resource record set doesn't already exist, Amazon Route - // 53 creates it. If a resource record set does exist, Amazon Route 53 updates - // it with the values in the request. + // * UPSERT: If a resource record set doesn't already exist, Route 53 creates + // it. If a resource record set does exist, Route 53 updates it with the + // values in the request. // // Action is a required field Action *string `type:"string" required:"true" enum:"ChangeAction"` @@ -6473,6 +6549,9 @@ func (s *ChangeResourceRecordSetsInput) Validate() error { if s.HostedZoneId == nil { invalidParams.Add(request.NewErrParamRequired("HostedZoneId")) } + if s.HostedZoneId != nil && len(*s.HostedZoneId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HostedZoneId", 1)) + } if s.ChangeBatch != nil { if err := s.ChangeBatch.Validate(); err != nil { invalidParams.AddNested("ChangeBatch", err.(request.ErrInvalidParams)) @@ -6580,9 +6659,15 @@ func (s *ChangeTagsForResourceInput) Validate() error { if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } if s.ResourceType == nil { invalidParams.Add(request.NewErrParamRequired("ResourceType")) } + if s.ResourceType != nil && len(*s.ResourceType) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceType", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -6752,24 +6837,24 @@ type CreateHealthCheckInput struct { // * If you send a CreateHealthCheck request with the same CallerReference // and settings as a previous request, and if the health check doesn't exist, // Amazon Route 53 creates the health check. If the health check does exist, - // Amazon Route 53 returns the settings for the existing health check. + // Route 53 returns the settings for the existing health check. // // * If you send a CreateHealthCheck request with the same CallerReference - // as a deleted health check, regardless of the settings, Amazon Route 53 - // returns a HealthCheckAlreadyExists error. + // as a deleted health check, regardless of the settings, Route 53 returns + // a HealthCheckAlreadyExists error. // // * If you send a CreateHealthCheck request with the same CallerReference - // as an existing health check but with different settings, Amazon Route - // 53 returns a HealthCheckAlreadyExists error. + // as an existing health check but with different settings, Route 53 returns + // a HealthCheckAlreadyExists error. // // * If you send a CreateHealthCheck request with a unique CallerReference - // but settings identical to an existing health check, Amazon Route 53 creates - // the health check. + // but settings identical to an existing health check, Route 53 creates the + // health check. // // CallerReference is a required field CallerReference *string `min:"1" type:"string" required:"true"` - // A complex type that contains the response to a CreateHealthCheck request. + // A complex type that contains settings for a new health check. // // HealthCheckConfig is a required field HealthCheckConfig *HealthCheckConfig `type:"structure" required:"true"` @@ -6858,8 +6943,8 @@ func (s *CreateHealthCheckOutput) SetLocation(v string) *CreateHealthCheckOutput return s } -// A complex type that contains information about the request to create a hosted -// zone. +// A complex type that contains information about the request to create a public +// or private hosted zone. type CreateHostedZoneInput struct { _ struct{} `locationName:"CreateHostedZoneRequest" type:"structure" xmlURI:"https://route53.amazonaws.com/doc/2013-04-01/"` @@ -6888,16 +6973,15 @@ type CreateHostedZoneInput struct { // and the other elements. HostedZoneConfig *HostedZoneConfig `type:"structure"` - // The name of the domain. For resource record types that include a domain name, - // specify a fully qualified domain name, for example, www.example.com. The - // trailing dot is optional; Amazon Route 53 assumes that the domain name is - // fully qualified. This means that Amazon Route 53 treats www.example.com (without - // a trailing dot) and www.example.com. (with a trailing dot) as identical. + // The name of the domain. Specify a fully qualified domain name, for example, + // www.example.com. The trailing dot is optional; Amazon Route 53 assumes that + // the domain name is fully qualified. This means that Route 53 treats www.example.com + // (without a trailing dot) and www.example.com. (with a trailing dot) as identical. // // If you're creating a public hosted zone, this is the name you have registered // with your DNS registrar. If your domain name is registered with a registrar - // other than Amazon Route 53, change the name servers for your domain to the - // set of NameServers that CreateHostedZone returns in DelegationSet. + // other than Route 53, change the name servers for your domain to the set of + // NameServers that CreateHostedZone returns in DelegationSet. // // Name is a required field Name *string `type:"string" required:"true"` @@ -7303,15 +7387,15 @@ func (s *CreateTrafficPolicyInput) SetName(v string) *CreateTrafficPolicyInput { type CreateTrafficPolicyInstanceInput struct { _ struct{} `locationName:"CreateTrafficPolicyInstanceRequest" type:"structure" xmlURI:"https://route53.amazonaws.com/doc/2013-04-01/"` - // The ID of the hosted zone in which you want Amazon Route 53 to create resource - // record sets by using the configuration in a traffic policy. + // The ID of the hosted zone that you want Amazon Route 53 to create resource + // record sets in by using the configuration in a traffic policy. // // HostedZoneId is a required field HostedZoneId *string `type:"string" required:"true"` // The domain name (such as example.com) or subdomain name (such as www.example.com) // for which Amazon Route 53 responds to DNS queries by using the resource record - // sets that Amazon Route 53 creates for this traffic policy instance. + // sets that Route 53 creates for this traffic policy instance. // // Name is a required field Name *string `type:"string" required:"true"` @@ -7625,6 +7709,9 @@ func (s *CreateVPCAssociationAuthorizationInput) Validate() error { if s.HostedZoneId == nil { invalidParams.Add(request.NewErrParamRequired("HostedZoneId")) } + if s.HostedZoneId != nil && len(*s.HostedZoneId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HostedZoneId", 1)) + } if s.VPC == nil { invalidParams.Add(request.NewErrParamRequired("VPC")) } @@ -7763,6 +7850,9 @@ func (s *DeleteHealthCheckInput) Validate() error { if s.HealthCheckId == nil { invalidParams.Add(request.NewErrParamRequired("HealthCheckId")) } + if s.HealthCheckId != nil && len(*s.HealthCheckId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HealthCheckId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -7817,6 +7907,9 @@ func (s *DeleteHostedZoneInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -7938,6 +8031,9 @@ func (s *DeleteReusableDelegationSetInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -8138,6 +8234,9 @@ func (s *DeleteVPCAssociationAuthorizationInput) Validate() error { if s.HostedZoneId == nil { invalidParams.Add(request.NewErrParamRequired("HostedZoneId")) } + if s.HostedZoneId != nil && len(*s.HostedZoneId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HostedZoneId", 1)) + } if s.VPC == nil { invalidParams.Add(request.NewErrParamRequired("VPC")) } @@ -8256,6 +8355,9 @@ func (s *DisassociateVPCFromHostedZoneInput) Validate() error { if s.HostedZoneId == nil { invalidParams.Add(request.NewErrParamRequired("HostedZoneId")) } + if s.HostedZoneId != nil && len(*s.HostedZoneId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HostedZoneId", 1)) + } if s.VPC == nil { invalidParams.Add(request.NewErrParamRequired("VPC")) } @@ -8317,7 +8419,7 @@ func (s *DisassociateVPCFromHostedZoneOutput) SetChangeInfo(v *ChangeInfo) *Disa return s } -// A complex type that contains information about a geo location. +// A complex type that contains information about a geographic location. type GeoLocation struct { _ struct{} `type:"structure"` @@ -8332,8 +8434,8 @@ type GeoLocation struct { // The two-letter code for the country. CountryCode *string `min:"1" type:"string"` - // The code for the subdivision, for example, a state in the United States or - // a province in Canada. + // The code for the subdivision. Route 53 currently supports only states in + // the United States. SubdivisionCode *string `min:"1" type:"string"` } @@ -8401,12 +8503,12 @@ type GeoLocationDetails struct { // The name of the country. CountryName *string `min:"1" type:"string"` - // The code for the subdivision, for example, a state in the United States or - // a province in Canada. + // The code for the subdivision. Route 53 currently supports only states in + // the United States. SubdivisionCode *string `min:"1" type:"string"` - // The full name of the subdivision, for example, a state in the United States - // or a province in Canada. + // The full name of the subdivision. Route 53 currently supports only states + // in the United States. SubdivisionName *string `min:"1" type:"string"` } @@ -8500,6 +8602,9 @@ func (s *GetAccountLimitInput) Validate() error { if s.Type == nil { invalidParams.Add(request.NewErrParamRequired("Type")) } + if s.Type != nil && len(*s.Type) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Type", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -8584,6 +8689,9 @@ func (s *GetChangeInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -8688,8 +8796,8 @@ type GetGeoLocationInput struct { // Amazon Route 53 uses the one- to three-letter subdivision codes that are // specified in ISO standard 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). - // Amazon Route 53 doesn't support subdivision codes for all countries. If you - // specify SubdivisionCode, you must also specify CountryCode. + // Route 53 doesn't support subdivision codes for all countries. If you specify + // subdivisioncode, you must also specify countrycode. SubdivisionCode *string `location:"querystring" locationName:"subdivisioncode" min:"1" type:"string"` } @@ -8839,6 +8947,9 @@ func (s *GetHealthCheckInput) Validate() error { if s.HealthCheckId == nil { invalidParams.Add(request.NewErrParamRequired("HealthCheckId")) } + if s.HealthCheckId != nil && len(*s.HealthCheckId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HealthCheckId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -8884,6 +8995,9 @@ func (s *GetHealthCheckLastFailureReasonInput) Validate() error { if s.HealthCheckId == nil { invalidParams.Add(request.NewErrParamRequired("HealthCheckId")) } + if s.HealthCheckId != nil && len(*s.HealthCheckId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HealthCheckId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -8984,6 +9098,9 @@ func (s *GetHealthCheckStatusInput) Validate() error { if s.HealthCheckId == nil { invalidParams.Add(request.NewErrParamRequired("HealthCheckId")) } + if s.HealthCheckId != nil && len(*s.HealthCheckId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HealthCheckId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -9093,6 +9210,9 @@ func (s *GetHostedZoneInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -9144,9 +9264,15 @@ func (s *GetHostedZoneLimitInput) Validate() error { if s.HostedZoneId == nil { invalidParams.Add(request.NewErrParamRequired("HostedZoneId")) } + if s.HostedZoneId != nil && len(*s.HostedZoneId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HostedZoneId", 1)) + } if s.Type == nil { invalidParams.Add(request.NewErrParamRequired("Type")) } + if s.Type != nil && len(*s.Type) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Type", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -9351,6 +9477,9 @@ func (s *GetReusableDelegationSetInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -9398,9 +9527,15 @@ func (s *GetReusableDelegationSetLimitInput) Validate() error { if s.DelegationSetId == nil { invalidParams.Add(request.NewErrParamRequired("DelegationSetId")) } + if s.DelegationSetId != nil && len(*s.DelegationSetId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DelegationSetId", 1)) + } if s.Type == nil { invalidParams.Add(request.NewErrParamRequired("Type")) } + if s.Type != nil && len(*s.Type) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Type", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -9776,8 +9911,8 @@ type HealthCheckConfig struct { _ struct{} `type:"structure"` // A complex type that identifies the CloudWatch alarm that you want Amazon - // Route 53 health checkers to use to determine whether this health check is - // healthy. + // Route 53 health checkers to use to determine whether the specified health + // check is healthy. AlarmIdentifier *AlarmIdentifier `type:"structure"` // (CALCULATED Health Checks Only) A complex type that contains one ChildHealthCheck @@ -9785,6 +9920,27 @@ type HealthCheckConfig struct { // health check. ChildHealthChecks []*string `locationNameList:"ChildHealthCheck" type:"list"` + // Stops Route 53 from performing health checks. When you disable a health check, + // here's what happens: + // + // * Health checks that check the health of endpoints: Route 53 stops submitting + // requests to your application, server, or other resource. + // + // * Calculated health checks: Route 53 stops aggregating the status of the + // referenced health checks. + // + // * Health checks that monitor CloudWatch alarms: Route 53 stops monitoring + // the corresponding CloudWatch metrics. + // + // After you disable a health check, Route 53 considers the status of the health + // check to always be healthy. If you configured DNS failover, Route 53 continues + // to route traffic to the corresponding resources. If you want to stop routing + // traffic to a resource, change the value of UpdateHealthCheckRequest$Inverted. + // + // Charges for a health check still apply when the health check is disabled. + // For more information, see Amazon Route 53 Pricing (http://aws.amazon.com/route53/pricing/). + Disabled *bool `type:"boolean"` + // Specify whether you want Amazon Route 53 to send the value of FullyQualifiedDomainName // to the endpoint in the client_hello message during TLS negotiation. This // allows the endpoint to respond to HTTPS health check requests with the applicable @@ -9824,38 +9980,37 @@ type HealthCheckConfig struct { // Amazon Route 53 sends health check requests to the specified IPv4 or IPv6 // address and passes the value of FullyQualifiedDomainName in the Host header // for all health checks except TCP health checks. This is typically the fully - // qualified DNS name of the endpoint on which you want Amazon Route 53 to perform + // qualified DNS name of the endpoint on which you want Route 53 to perform // health checks. // - // When Amazon Route 53 checks the health of an endpoint, here is how it constructs + // When Route 53 checks the health of an endpoint, here is how it constructs // the Host header: // // * If you specify a value of 80 for Port and HTTP or HTTP_STR_MATCH for - // Type, Amazon Route 53 passes the value of FullyQualifiedDomainName to - // the endpoint in the Host header. + // Type, Route 53 passes the value of FullyQualifiedDomainName to the endpoint + // in the Host header. // // * If you specify a value of 443 for Port and HTTPS or HTTPS_STR_MATCH - // for Type, Amazon Route 53 passes the value of FullyQualifiedDomainName - // to the endpoint in the Host header. + // for Type, Route 53 passes the value of FullyQualifiedDomainName to the + // endpoint in the Host header. // // * If you specify another value for Port and any value except TCP for Type, - // Amazon Route 53 passes FullyQualifiedDomainName:Port to the endpoint in - // the Host header. + // Route 53 passes FullyQualifiedDomainName:Port to the endpoint in the Host + // header. // - // If you don't specify a value for FullyQualifiedDomainName, Amazon Route 53 - // substitutes the value of IPAddress in the Host header in each of the preceding - // cases. + // If you don't specify a value for FullyQualifiedDomainName, Route 53 substitutes + // the value of IPAddress in the Host header in each of the preceding cases. // // If you don't specify a value for IPAddress: // - // Amazon Route 53 sends a DNS request to the domain that you specify for FullyQualifiedDomainName + // Route 53 sends a DNS request to the domain that you specify for FullyQualifiedDomainName // at the interval that you specify for RequestInterval. Using an IPv4 address - // that DNS returns, Amazon Route 53 then checks the health of the endpoint. + // that DNS returns, Route 53 then checks the health of the endpoint. // - // If you don't specify a value for IPAddress, Amazon Route 53 uses only IPv4 - // to send health checks to the endpoint. If there's no resource record set - // with a type of A for the name that you specify for FullyQualifiedDomainName, - // the health check fails with a "DNS resolution failed" error. + // If you don't specify a value for IPAddress, Route 53 uses only IPv4 to send + // health checks to the endpoint. If there's no resource record set with a type + // of A for the name that you specify for FullyQualifiedDomainName, the health + // check fails with a "DNS resolution failed" error. // // If you want to check the health of weighted, latency, or failover resource // record sets and you choose to specify the endpoint only by FullyQualifiedDomainName, @@ -9871,9 +10026,9 @@ type HealthCheckConfig struct { // check results will be unpredictable. // // In addition, if the value that you specify for Type is HTTP, HTTPS, HTTP_STR_MATCH, - // or HTTPS_STR_MATCH, Amazon Route 53 passes the value of FullyQualifiedDomainName + // or HTTPS_STR_MATCH, Route 53 passes the value of FullyQualifiedDomainName // in the Host header, as it does when you specify a value for IPAddress. If - // the value of Type is TCP, Amazon Route 53 doesn't pass a Host header. + // the value of Type is TCP, Route 53 doesn't pass a Host header. FullyQualifiedDomainName *string `type:"string"` // The number of child health checks that are associated with a CALCULATED health @@ -9885,18 +10040,18 @@ type HealthCheckConfig struct { // Note the following: // // * If you specify a number greater than the number of child health checks, - // Amazon Route 53 always considers this health check to be unhealthy. + // Route 53 always considers this health check to be unhealthy. // - // * If you specify 0, Amazon Route 53 always considers this health check - // to be healthy. + // * If you specify 0, Route 53 always considers this health check to be + // healthy. HealthThreshold *int64 `type:"integer"` // The IPv4 or IPv6 IP address of the endpoint that you want Amazon Route 53 // to perform health checks on. If you don't specify a value for IPAddress, - // Amazon Route 53 sends a DNS request to resolve the domain name that you specify + // Route 53 sends a DNS request to resolve the domain name that you specify // in FullyQualifiedDomainName at the interval that you specify in RequestInterval. - // Using an IP address returned by DNS, Amazon Route 53 then checks the health - // of the endpoint. + // Using an IP address returned by DNS, Route 53 then checks the health of the + // endpoint. // // Use one of the following formats for the value of IPAddress: // @@ -9915,9 +10070,9 @@ type HealthCheckConfig struct { // // For more information, see HealthCheckConfig$FullyQualifiedDomainName. // - // Constraints: Amazon Route 53 can't check the health of endpoints for which - // the IP address is in local, private, non-routable, or multicast ranges. For - // more information about IP addresses for which you can't create health checks, + // Constraints: Route 53 can't check the health of endpoints for which the IP + // address is in local, private, non-routable, or multicast ranges. For more + // information about IP addresses for which you can't create health checks, // see the following documents: // // * RFC 5735, Special Use IPv4 Addresses (https://tools.ietf.org/html/rfc5735) @@ -9932,14 +10087,14 @@ type HealthCheckConfig struct { // When CloudWatch has insufficient data about the metric to determine the alarm // state, the status that you want Amazon Route 53 to assign to the health check: // - // * Healthy: Amazon Route 53 considers the health check to be healthy. + // * Healthy: Route 53 considers the health check to be healthy. // - // * Unhealthy: Amazon Route 53 considers the health check to be unhealthy. + // * Unhealthy: Route 53 considers the health check to be unhealthy. // - // * LastKnownStatus: Amazon Route 53 uses the status of the health check - // from the last time that CloudWatch had sufficient data to determine the - // alarm state. For new health checks that have no last known status, the - // default status for the health check is healthy. + // * LastKnownStatus: Route 53 uses the status of the health check from the + // last time that CloudWatch had sufficient data to determine the alarm state. + // For new health checks that have no last known status, the default status + // for the health check is healthy. InsufficientDataHealthStatus *string `type:"string" enum:"InsufficientDataHealthStatus"` // Specify whether you want Amazon Route 53 to invert the status of a health @@ -9949,7 +10104,7 @@ type HealthCheckConfig struct { // Specify whether you want Amazon Route 53 to measure the latency between health // checkers in multiple AWS regions and your endpoint, and to display CloudWatch - // latency graphs on the Health Checks page in the Amazon Route 53 console. + // latency graphs on the Health Checks page in the Route 53 console. // // You can't change the value of MeasureLatency after you create a health check. MeasureLatency *bool `type:"boolean"` @@ -9961,18 +10116,18 @@ type HealthCheckConfig struct { // A complex type that contains one Region element for each region from which // you want Amazon Route 53 health checkers to check the specified endpoint. // - // If you don't specify any regions, Amazon Route 53 health checkers automatically + // If you don't specify any regions, Route 53 health checkers automatically // performs checks from all of the regions that are listed under Valid Values. // // If you update a health check to remove a region that has been performing - // health checks, Amazon Route 53 will briefly continue to perform checks from - // that region to ensure that some health checkers are always checking the endpoint + // health checks, Route 53 will briefly continue to perform checks from that + // region to ensure that some health checkers are always checking the endpoint // (for example, if you replace three regions with four different regions). Regions []*string `locationNameList:"Region" min:"3" type:"list"` // The number of seconds between the time that Amazon Route 53 gets a response // from your endpoint and the time that it sends the next health check request. - // Each Amazon Route 53 health checker makes requests at this interval. + // Each Route 53 health checker makes requests at this interval. // // You can't change the value of RequestInterval after you create a health check. // @@ -9983,16 +10138,16 @@ type HealthCheckConfig struct { // The path, if any, that you want Amazon Route 53 to request when performing // health checks. The path can be any value for which your endpoint will return // an HTTP status code of 2xx or 3xx when the endpoint is healthy, for example, - // the file /docs/route53-health-check.html. + // the file /docs/route53-health-check.html. You can also include query string + // parameters, for example, /welcome.html?language=jp&login=y. ResourcePath *string `type:"string"` // If the value of Type is HTTP_STR_MATCH or HTTP_STR_MATCH, the string that // you want Amazon Route 53 to search for in the response body from the specified - // resource. If the string appears in the response body, Amazon Route 53 considers + // resource. If the string appears in the response body, Route 53 considers // the resource healthy. // - // Amazon Route 53 considers case when searching for SearchString in the response - // body. + // Route 53 considers case when searching for SearchString in the response body. SearchString *string `type:"string"` // The type of health check that you want to create, which indicates how Amazon @@ -10002,28 +10157,26 @@ type HealthCheckConfig struct { // // You can create the following types of health checks: // - // * HTTP: Amazon Route 53 tries to establish a TCP connection. If successful, - // Amazon Route 53 submits an HTTP request and waits for an HTTP status code - // of 200 or greater and less than 400. + // * HTTP: Route 53 tries to establish a TCP connection. If successful, Route + // 53 submits an HTTP request and waits for an HTTP status code of 200 or + // greater and less than 400. // - // * HTTPS: Amazon Route 53 tries to establish a TCP connection. If successful, - // Amazon Route 53 submits an HTTPS request and waits for an HTTP status - // code of 200 or greater and less than 400. + // * HTTPS: Route 53 tries to establish a TCP connection. If successful, + // Route 53 submits an HTTPS request and waits for an HTTP status code of + // 200 or greater and less than 400. // // If you specify HTTPS for the value of Type, the endpoint must support TLS // v1.0 or later. // - // * HTTP_STR_MATCH: Amazon Route 53 tries to establish a TCP connection. - // If successful, Amazon Route 53 submits an HTTP request and searches the - // first 5,120 bytes of the response body for the string that you specify - // in SearchString. + // * HTTP_STR_MATCH: Route 53 tries to establish a TCP connection. If successful, + // Route 53 submits an HTTP request and searches the first 5,120 bytes of + // the response body for the string that you specify in SearchString. // - // * HTTPS_STR_MATCH: Amazon Route 53 tries to establish a TCP connection. - // If successful, Amazon Route 53 submits an HTTPS request and searches the - // first 5,120 bytes of the response body for the string that you specify - // in SearchString. + // * HTTPS_STR_MATCH: Route 53 tries to establish a TCP connection. If successful, + // Route 53 submits an HTTPS request and searches the first 5,120 bytes of + // the response body for the string that you specify in SearchString. // - // * TCP: Amazon Route 53 tries to establish a TCP connection. + // * TCP: Route 53 tries to establish a TCP connection. // // * CLOUDWATCH_METRIC: The health check is associated with a CloudWatch // alarm. If the state of the alarm is OK, the health check is considered @@ -10033,12 +10186,12 @@ type HealthCheckConfig struct { // Healthy, Unhealthy, or LastKnownStatus. // // * CALCULATED: For health checks that monitor the status of other health - // checks, Amazon Route 53 adds up the number of health checks that Amazon - // Route 53 health checkers consider to be healthy and compares that number - // with the value of HealthThreshold. + // checks, Route 53 adds up the number of health checks that Route 53 health + // checkers consider to be healthy and compares that number with the value + // of HealthThreshold. // - // For more information, see How Amazon Route 53 Determines Whether an Endpoint - // Is Healthy (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) + // For more information, see How Route 53 Determines Whether an Endpoint Is + // Healthy (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) // in the Amazon Route 53 Developer Guide. // // Type is a required field @@ -10097,6 +10250,12 @@ func (s *HealthCheckConfig) SetChildHealthChecks(v []*string) *HealthCheckConfig return s } +// SetDisabled sets the Disabled field's value. +func (s *HealthCheckConfig) SetDisabled(v bool) *HealthCheckConfig { + s.Disabled = &v + return s +} + // SetEnableSNI sets the EnableSNI field's value. func (s *HealthCheckConfig) SetEnableSNI(v bool) *HealthCheckConfig { s.EnableSNI = &v @@ -10250,7 +10409,7 @@ type HostedZone struct { // If the hosted zone was created by another service, the service that created // the hosted zone. When a hosted zone is created by another service, you can't - // edit or delete it using Amazon Route 53. + // edit or delete it using Route 53. LinkedService *LinkedService `type:"structure"` // The name of the domain. For public hosted zones, this is the name that you @@ -10438,39 +10597,39 @@ type ListGeoLocationsInput struct { _ struct{} `type:"structure"` // (Optional) The maximum number of geolocations to be included in the response - // body for this request. If more than MaxItems geolocations remain to be listed, + // body for this request. If more than maxitems geolocations remain to be listed, // then the value of the IsTruncated element in the response is true. MaxItems *string `location:"querystring" locationName:"maxitems" type:"string"` // The code for the continent with which you want to start listing locations - // that Amazon Route 53 supports for geolocation. If Amazon Route 53 has already - // returned a page or more of results, if IsTruncated is true, and if NextContinentCode - // from the previous response has a value, enter that value in StartContinentCode + // that Amazon Route 53 supports for geolocation. If Route 53 has already returned + // a page or more of results, if IsTruncated is true, and if NextContinentCode + // from the previous response has a value, enter that value in startcontinentcode // to return the next page of results. // - // Include StartContinentCode only if you want to list continents. Don't include - // StartContinentCode when you're listing countries or countries with their + // Include startcontinentcode only if you want to list continents. Don't include + // startcontinentcode when you're listing countries or countries with their // subdivisions. StartContinentCode *string `location:"querystring" locationName:"startcontinentcode" min:"2" type:"string"` // The code for the country with which you want to start listing locations that - // Amazon Route 53 supports for geolocation. If Amazon Route 53 has already - // returned a page or more of results, if IsTruncated is true, and if NextCountryCode - // from the previous response has a value, enter that value in StartCountryCode + // Amazon Route 53 supports for geolocation. If Route 53 has already returned + // a page or more of results, if IsTruncated is true, and if NextCountryCode + // from the previous response has a value, enter that value in startcountrycode // to return the next page of results. // - // Amazon Route 53 uses the two-letter country codes that are specified in ISO - // standard 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). + // Route 53 uses the two-letter country codes that are specified in ISO standard + // 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). StartCountryCode *string `location:"querystring" locationName:"startcountrycode" min:"1" type:"string"` // The code for the subdivision (for example, state or province) with which // you want to start listing locations that Amazon Route 53 supports for geolocation. - // If Amazon Route 53 has already returned a page or more of results, if IsTruncated + // If Route 53 has already returned a page or more of results, if IsTruncated // is true, and if NextSubdivisionCode from the previous response has a value, - // enter that value in StartSubdivisionCode to return the next page of results. + // enter that value in startsubdivisioncode to return the next page of results. // - // To list subdivisions of a country, you must include both StartCountryCode - // and StartSubdivisionCode. + // To list subdivisions of a country, you must include both startcountrycode + // and startsubdivisioncode. StartSubdivisionCode *string `location:"querystring" locationName:"startsubdivisioncode" min:"1" type:"string"` } @@ -10540,8 +10699,8 @@ type ListGeoLocationsOutput struct { // A value that indicates whether more locations remain to be listed after the // last location in this response. If so, the value of IsTruncated is true. // To get more values, submit another request and include the values of NextContinentCode, - // NextCountryCode, and NextSubdivisionCode in the StartContinentCode, StartCountryCode, - // and StartSubdivisionCode, as applicable. + // NextCountryCode, and NextSubdivisionCode in the startcontinentcode, startcountrycode, + // and startsubdivisioncode, as applicable. // // IsTruncated is a required field IsTruncated *bool `type:"boolean" required:"true"` @@ -10552,17 +10711,17 @@ type ListGeoLocationsOutput struct { MaxItems *string `type:"string" required:"true"` // If IsTruncated is true, you can make a follow-up request to display more - // locations. Enter the value of NextContinentCode in the StartContinentCode + // locations. Enter the value of NextContinentCode in the startcontinentcode // parameter in another ListGeoLocations request. NextContinentCode *string `min:"2" type:"string"` // If IsTruncated is true, you can make a follow-up request to display more - // locations. Enter the value of NextCountryCode in the StartCountryCode parameter + // locations. Enter the value of NextCountryCode in the startcountrycode parameter // in another ListGeoLocations request. NextCountryCode *string `min:"1" type:"string"` // If IsTruncated is true, you can make a follow-up request to display more - // locations. Enter the value of NextSubdivisionCode in the StartSubdivisionCode + // locations. Enter the value of NextSubdivisionCode in the startsubdivisioncode // parameter in another ListGeoLocations request. NextSubdivisionCode *string `min:"1" type:"string"` } @@ -10631,8 +10790,8 @@ type ListHealthChecksInput struct { // The maximum number of health checks that you want ListHealthChecks to return // in response to the current request. Amazon Route 53 returns a maximum of - // 100 items. If you set MaxItems to a value greater than 100, Amazon Route - // 53 returns only the first 100 health checks. + // 100 items. If you set MaxItems to a value greater than 100, Route 53 returns + // only the first 100 health checks. MaxItems *string `location:"querystring" locationName:"maxitems" type:"string"` } @@ -10920,7 +11079,7 @@ type ListHostedZonesInput struct { // (Optional) The maximum number of hosted zones that you want Amazon Route // 53 to return. If you have more than maxitems hosted zones, the value of IsTruncated // in the response is true, and the value of NextMarker is the hosted zone ID - // of the first hosted zone that Amazon Route 53 will return if you submit another + // of the first hosted zone that Route 53 will return if you submit another // request. MaxItems *string `location:"querystring" locationName:"maxitems" type:"string"` } @@ -11045,8 +11204,7 @@ type ListQueryLoggingConfigsInput struct { // AWS account has more than MaxResults configurations, use the value of ListQueryLoggingConfigsResponse$NextToken // in the response to get the next page of results. // - // If you don't specify a value for MaxResults, Amazon Route 53 returns up to - // 100 configurations. + // If you don't specify a value for MaxResults, Route 53 returns up to 100 configurations. MaxResults *string `location:"querystring" locationName:"maxresults" type:"string"` // (Optional) If the current AWS account has more than MaxResults query logging @@ -11163,8 +11321,8 @@ type ListResourceRecordSetsInput struct { // Valid values for basic resource record sets: A | AAAA | CAA | CNAME | MX // | NAPTR | NS | PTR | SOA | SPF | SRV | TXT // - // Values for weighted, latency, geo, and failover resource record sets: A | - // AAAA | CAA | CNAME | MX | NAPTR | PTR | SPF | SRV | TXT + // Values for weighted, latency, geolocation, and failover resource record sets: + // A | AAAA | CAA | CNAME | MX | NAPTR | PTR | SPF | SRV | TXT // // Values for alias resource record sets: // @@ -11200,6 +11358,9 @@ func (s *ListResourceRecordSetsInput) Validate() error { if s.HostedZoneId == nil { invalidParams.Add(request.NewErrParamRequired("HostedZoneId")) } + if s.HostedZoneId != nil && len(*s.HostedZoneId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HostedZoneId", 1)) + } if s.StartRecordIdentifier != nil && len(*s.StartRecordIdentifier) < 1 { invalidParams.Add(request.NewErrParamMinLen("StartRecordIdentifier", 1)) } @@ -11256,9 +11417,12 @@ type ListResourceRecordSetsOutput struct { // MaxItems is a required field MaxItems *string `type:"string" required:"true"` - // Weighted, latency, geolocation, and failover resource record sets only: If - // results were truncated for a given DNS name and type, the value of SetIdentifier + // Resource record sets that have a routing policy other than simple: If results + // were truncated for a given DNS name and type, the value of SetIdentifier // for the next resource record set that has the current DNS name and type. + // + // For information about routing policies, see Choosing a Routing Policy (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html) + // in the Amazon Route 53 Developer Guide. NextRecordIdentifier *string `min:"1" type:"string"` // If the results were truncated, the name of the next record in the list. @@ -11342,7 +11506,7 @@ type ListReusableDelegationSetsInput struct { // The number of reusable delegation sets that you want Amazon Route 53 to return // in the response to this request. If you specify a value greater than 100, - // Amazon Route 53 returns only the first 100 reusable delegation sets. + // Route 53 returns only the first 100 reusable delegation sets. MaxItems *string `location:"querystring" locationName:"maxitems" type:"string"` } @@ -11480,9 +11644,15 @@ func (s *ListTagsForResourceInput) Validate() error { if s.ResourceId == nil { invalidParams.Add(request.NewErrParamRequired("ResourceId")) } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } if s.ResourceType == nil { invalidParams.Add(request.NewErrParamRequired("ResourceType")) } + if s.ResourceType != nil && len(*s.ResourceType) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceType", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -11572,6 +11742,9 @@ func (s *ListTagsForResourcesInput) Validate() error { if s.ResourceType == nil { invalidParams.Add(request.NewErrParamRequired("ResourceType")) } + if s.ResourceType != nil && len(*s.ResourceType) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceType", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -11626,7 +11799,7 @@ type ListTrafficPoliciesInput struct { // 53 to return in response to this request. If you have more than MaxItems // traffic policies, the value of IsTruncated in the response is true, and the // value of TrafficPolicyIdMarker is the ID of the first traffic policy that - // Amazon Route 53 will return if you submit another request. + // Route 53 will return if you submit another request. MaxItems *string `location:"querystring" locationName:"maxitems" type:"string"` // (Conditional) For your first request to ListTrafficPolicies, don't include @@ -12207,8 +12380,8 @@ type ListTrafficPolicyInstancesOutput struct { _ struct{} `type:"structure"` // If IsTruncated is true, HostedZoneIdMarker is the ID of the hosted zone of - // the first traffic policy instance that Amazon Route 53 will return if you - // submit another ListTrafficPolicyInstances request. + // the first traffic policy instance that Route 53 will return if you submit + // another ListTrafficPolicyInstances request. HostedZoneIdMarker *string `type:"string"` // A flag that indicates whether there are more traffic policy instances to @@ -12227,8 +12400,8 @@ type ListTrafficPolicyInstancesOutput struct { MaxItems *string `type:"string" required:"true"` // If IsTruncated is true, TrafficPolicyInstanceNameMarker is the name of the - // first traffic policy instance that Amazon Route 53 will return if you submit - // another ListTrafficPolicyInstances request. + // first traffic policy instance that Route 53 will return if you submit another + // ListTrafficPolicyInstances request. TrafficPolicyInstanceNameMarker *string `type:"string"` // If IsTruncated is true, TrafficPolicyInstanceTypeMarker is the DNS type of @@ -12305,8 +12478,7 @@ type ListTrafficPolicyVersionsInput struct { // 53 to include in the response body for this request. If the specified traffic // policy has more than MaxItems versions, the value of IsTruncated in the response // is true, and the value of the TrafficPolicyVersionMarker element is the ID - // of the first version that Amazon Route 53 will return if you submit another - // request. + // of the first version that Route 53 will return if you submit another request. MaxItems *string `location:"querystring" locationName:"maxitems" type:"string"` // For your first request to ListTrafficPolicyVersions, don't include the TrafficPolicyVersionMarker @@ -12445,8 +12617,8 @@ type ListVPCAssociationAuthorizationsInput struct { HostedZoneId *string `location:"uri" locationName:"Id" type:"string" required:"true"` // Optional: An integer that specifies the maximum number of VPCs that you want - // Amazon Route 53 to return. If you don't specify a value for MaxResults, Amazon - // Route 53 returns up to 50 VPCs per page. + // Amazon Route 53 to return. If you don't specify a value for MaxResults, Route + // 53 returns up to 50 VPCs per page. MaxResults *string `location:"querystring" locationName:"maxresults" type:"string"` // Optional: If a response includes a NextToken element, there are more VPCs @@ -12473,6 +12645,9 @@ func (s *ListVPCAssociationAuthorizationsInput) Validate() error { if s.HostedZoneId == nil { invalidParams.Add(request.NewErrParamRequired("HostedZoneId")) } + if s.HostedZoneId != nil && len(*s.HostedZoneId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HostedZoneId", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -12682,23 +12857,22 @@ type ResourceRecordSet struct { // Except where noted, the following failover behaviors assume that you have // included the HealthCheckId element in both resource record sets: // - // * When the primary resource record set is healthy, Amazon Route 53 responds - // to DNS queries with the applicable value from the primary resource record + // * When the primary resource record set is healthy, Route 53 responds to + // DNS queries with the applicable value from the primary resource record // set regardless of the health of the secondary resource record set. // // * When the primary resource record set is unhealthy and the secondary - // resource record set is healthy, Amazon Route 53 responds to DNS queries - // with the applicable value from the secondary resource record set. + // resource record set is healthy, Route 53 responds to DNS queries with + // the applicable value from the secondary resource record set. // - // * When the secondary resource record set is unhealthy, Amazon Route 53 - // responds to DNS queries with the applicable value from the primary resource - // record set regardless of the health of the primary resource record set. + // * When the secondary resource record set is unhealthy, Route 53 responds + // to DNS queries with the applicable value from the primary resource record + // set regardless of the health of the primary resource record set. // // * If you omit the HealthCheckId element for the secondary resource record - // set, and if the primary resource record set is unhealthy, Amazon Route - // 53 always responds to DNS queries with the applicable value from the secondary - // resource record set. This is true regardless of the health of the associated - // endpoint. + // set, and if the primary resource record set is unhealthy, Route 53 always + // responds to DNS queries with the applicable value from the secondary resource + // record set. This is true regardless of the health of the associated endpoint. // // You can't create non-failover resource record sets that have the same values // for the Name and Type elements as failover resource record sets. @@ -12706,15 +12880,15 @@ type ResourceRecordSet struct { // For failover alias resource record sets, you must also include the EvaluateTargetHealth // element and set the value to true. // - // For more information about configuring failover for Amazon Route 53, see - // the following topics in the Amazon Route 53 Developer Guide: + // For more information about configuring failover for Route 53, see the following + // topics in the Amazon Route 53 Developer Guide: // - // * Amazon Route 53 Health Checks and DNS Failover (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html) + // * Route 53 Health Checks and DNS Failover (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html) // // * Configuring Failover in a Private Hosted Zone (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-private-hosted-zones.html) Failover *string `type:"string" enum:"ResourceRecordSetFailover"` - // Geo location resource record sets only: A complex type that lets you control + // Geolocation resource record sets only: A complex type that lets you control // how Amazon Route 53 responds to DNS queries based on the geographic origin // of the query. For example, if you want all queries from Africa to be routed // to a web server with an IP address of 192.0.2.111, create a resource record @@ -12738,24 +12912,24 @@ type ResourceRecordSet struct { // // Geolocation works by mapping IP addresses to locations. However, some IP // addresses aren't mapped to geographic locations, so even if you create geolocation - // resource record sets that cover all seven continents, Amazon Route 53 will - // receive some DNS queries from locations that it can't identify. We recommend - // that you create a resource record set for which the value of CountryCode - // is *, which handles both queries that come from locations for which you haven't + // resource record sets that cover all seven continents, Route 53 will receive + // some DNS queries from locations that it can't identify. We recommend that + // you create a resource record set for which the value of CountryCode is *, + // which handles both queries that come from locations for which you haven't // created geolocation resource record sets and queries from IP addresses that // aren't mapped to a location. If you don't create a * resource record set, - // Amazon Route 53 returns a "no answer" response for queries from those locations. + // Route 53 returns a "no answer" response for queries from those locations. // // You can't create non-geolocation resource record sets that have the same // values for the Name and Type elements as geolocation resource record sets. GeoLocation *GeoLocation `type:"structure"` // If you want Amazon Route 53 to return this resource record set in response - // to a DNS query only when a health check is passing, include the HealthCheckId - // element and specify the ID of the applicable health check. + // to a DNS query only when the status of a health check is healthy, include + // the HealthCheckId element and specify the ID of the applicable health check. // - // Amazon Route 53 determines whether a resource record set is healthy based - // on one of the following: + // Route 53 determines whether a resource record set is healthy based on one + // of the following: // // * By periodically sending a request to the endpoint that is specified // in the health check @@ -12766,61 +12940,102 @@ type ResourceRecordSet struct { // * By determining the current state of a CloudWatch alarm (CloudWatch metric // health checks) // - // For more information, see How Amazon Route 53 Determines Whether an Endpoint - // Is Healthy (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html). - // - // The HealthCheckId element is only useful when Amazon Route 53 is choosing - // between two or more resource record sets to respond to a DNS query, and you - // want Amazon Route 53 to base the choice in part on the status of a health - // check. Configuring health checks only makes sense in the following configurations: - // - // * You're checking the health of the resource record sets in a group of - // weighted, latency, geolocation, or failover resource record sets, and - // you specify health check IDs for all of the resource record sets. If the - // health check for one resource record set specifies an endpoint that is - // not healthy, Amazon Route 53 stops responding to queries using the value - // for that resource record set. - // - // * You set EvaluateTargetHealth to true for the resource record sets in - // a group of alias, weighted alias, latency alias, geolocation alias, or - // failover alias resource record sets, and you specify health check IDs - // for all of the resource record sets that are referenced by the alias resource - // record sets. - // - // Amazon Route 53 doesn't check the health of the endpoint specified in the + // Route 53 doesn't check the health of the endpoint that is specified in the // resource record set, for example, the endpoint specified by the IP address // in the Value element. When you add a HealthCheckId element to a resource - // record set, Amazon Route 53 checks the health of the endpoint that you specified + // record set, Route 53 checks the health of the endpoint that you specified // in the health check. // - // For geolocation resource record sets, if an endpoint is unhealthy, Amazon - // Route 53 looks for a resource record set for the larger, associated geographic + // For more information, see the following topics in the Amazon Route 53 Developer + // Guide: + // + // * How Amazon Route 53 Determines Whether an Endpoint Is Healthy (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) + // + // * Route 53 Health Checks and DNS Failover (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html) + // + // * Configuring Failover in a Private Hosted Zone (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-private-hosted-zones.html) + // + // When to Specify HealthCheckId + // + // Specifying a value for HealthCheckId is useful only when Route 53 is choosing + // between two or more resource record sets to respond to a DNS query, and you + // want Route 53 to base the choice in part on the status of a health check. + // Configuring health checks makes sense only in the following configurations: + // + // * Non-alias resource record sets: You're checking the health of a group + // of non-alias resource record sets that have the same routing policy, name, + // and type (such as multiple weighted records named www.example.com with + // a type of A) and you specify health check IDs for all the resource record + // sets. + // + // If the health check status for a resource record set is healthy, Route 53 + // includes the record among the records that it responds to DNS queries + // with. + // + // If the health check status for a resource record set is unhealthy, Route + // 53 stops responding to DNS queries using the value for that resource record + // set. + // + // If the health check status for all resource record sets in the group is unhealthy, + // Route 53 considers all resource record sets in the group healthy and responds + // to DNS queries accordingly. + // + // * Alias resource record sets: You specify the following settings: + // + // You set EvaluateTargetHealth to true for an alias resource record set in + // a group of resource record sets that have the same routing policy, name, + // and type (such as multiple weighted records named www.example.com with + // a type of A). + // + // You configure the alias resource record set to route traffic to a non-alias + // resource record set in the same hosted zone. + // + // You specify a health check ID for the non-alias resource record set. + // + // If the health check status is healthy, Route 53 considers the alias resource + // record set to be healthy and includes the alias record among the records + // that it responds to DNS queries with. + // + // If the health check status is unhealthy, Route 53 stops responding to DNS + // queries using the alias resource record set. + // + // The alias resource record set can also route traffic to a group of non-alias + // resource record sets that have the same routing policy, name, and type. + // In that configuration, associate health checks with all of the resource + // record sets in the group of non-alias resource record sets. + // + // Geolocation Routing + // + // For geolocation resource record sets, if an endpoint is unhealthy, Route + // 53 looks for a resource record set for the larger, associated geographic // region. For example, suppose you have resource record sets for a state in - // the United States, for the United States, for North America, and for all + // the United States, for the entire United States, for North America, and a + // resource record set that has * for CountryCode is *, which applies to all // locations. If the endpoint for the state resource record set is unhealthy, - // Amazon Route 53 checks the resource record sets for the United States, for - // North America, and for all locations (a resource record set for which the - // value of CountryCode is *), in that order, until it finds a resource record - // set for which the endpoint is healthy. + // Route 53 checks for healthy resource record sets in the following order until + // it finds a resource record set for which the endpoint is healthy: + // + // * The United States + // + // * North America + // + // * The default resource record set + // + // Specifying the Health Check Endpoint by Domain Name // // If your health checks specify the endpoint only by domain name, we recommend // that you create a separate health check for each endpoint. For example, create // a health check for each HTTP server that is serving content for www.example.com. // For the value of FullyQualifiedDomainName, specify the domain name of the // server (such as us-east-2-www.example.com), not the name of the resource - // record sets (example.com). + // record sets (www.example.com). // - // n this configuration, if you create a health check for which the value of - // FullyQualifiedDomainName matches the name of the resource record sets and - // then associate the health check with those resource record sets, health check - // results will be unpredictable. + // Health check results will be unpredictable if you do the following: // - // For more information, see the following topics in the Amazon Route 53 Developer - // Guide: + // Create a health check that has the same value for FullyQualifiedDomainName + // as the name of a resource record set. // - // * Amazon Route 53 Health Checks and DNS Failover (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html) - // - // * Configuring Failover in a Private Hosted Zone (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-private-hosted-zones.html) + // Associate that health check with the resource record set. HealthCheckId *string `type:"string"` // Multivalue answer resource record sets only: To route traffic approximately @@ -12833,17 +13048,17 @@ type ResourceRecordSet struct { // address only when the health check is healthy. // // * If you don't associate a health check with a multivalue answer record, - // Amazon Route 53 always considers the record to be healthy. + // Route 53 always considers the record to be healthy. // - // * Amazon Route 53 responds to DNS queries with up to eight healthy records; - // if you have eight or fewer healthy records, Amazon Route 53 responds to - // all DNS queries with all the healthy records. + // * Route 53 responds to DNS queries with up to eight healthy records; if + // you have eight or fewer healthy records, Route 53 responds to all DNS + // queries with all the healthy records. // - // * If you have more than eight healthy records, Amazon Route 53 responds - // to different DNS resolvers with different combinations of healthy records. + // * If you have more than eight healthy records, Route 53 responds to different + // DNS resolvers with different combinations of healthy records. // - // * When all records are unhealthy, Amazon Route 53 responds to DNS queries - // with up to eight unhealthy records. + // * When all records are unhealthy, Route 53 responds to DNS queries with + // up to eight unhealthy records. // // * If a resource becomes unavailable after a resolver caches a response, // client software typically tries another of the IP addresses in the response. @@ -12851,13 +13066,17 @@ type ResourceRecordSet struct { // You can't create multivalue answer alias records. MultiValueAnswer *bool `type:"boolean"` - // The name of the domain you want to perform the action on. + // For ChangeResourceRecordSets requests, the name of the record that you want + // to create, update, or delete. For ListResourceRecordSets responses, the name + // of a record in the specified hosted zone. + // + // ChangeResourceRecordSets Only // // Enter a fully qualified domain name, for example, www.example.com. You can // optionally include a trailing dot. If you omit the trailing dot, Amazon Route - // 53 still assumes that the domain name that you specify is fully qualified. - // This means that Amazon Route 53 treats www.example.com (without a trailing - // dot) and www.example.com. (with a trailing dot) as identical. + // 53 assumes that the domain name that you specify is fully qualified. This + // means that Route 53 treats www.example.com (without a trailing dot) and www.example.com. + // (with a trailing dot) as identical. // // For information about how to specify characters other than a-z, 0-9, and // - (hyphen) and how to specify internationalized domain names, see DNS Domain @@ -12896,10 +13115,10 @@ type ResourceRecordSet struct { // zones is not supported. // // When Amazon Route 53 receives a DNS query for a domain name and type for - // which you have created latency resource record sets, Amazon Route 53 selects - // the latency resource record set that has the lowest latency between the end - // user and the associated Amazon EC2 Region. Amazon Route 53 then returns the - // value that is associated with the selected resource record set. + // which you have created latency resource record sets, Route 53 selects the + // latency resource record set that has the lowest latency between the end user + // and the associated Amazon EC2 Region. Route 53 then returns the value that + // is associated with the selected resource record set. // // Note the following: // @@ -12910,8 +13129,8 @@ type ResourceRecordSet struct { // EC2 Region. // // * You aren't required to create latency resource record sets for all Amazon - // EC2 Regions. Amazon Route 53 will choose the region with the best latency - // from among the regions that you create latency resource record sets for. + // EC2 Regions. Route 53 will choose the region with the best latency from + // among the regions that you create latency resource record sets for. // // * You can't create non-latency resource record sets that have the same // values for the Name and Type elements as latency resource record sets. @@ -12922,11 +13141,15 @@ type ResourceRecordSet struct { // If you're creating an alias resource record set, omit ResourceRecords. ResourceRecords []*ResourceRecord `locationNameList:"ResourceRecord" min:"1" type:"list"` - // Weighted, Latency, Geo, and Failover resource record sets only: An identifier + // Resource record sets that have a routing policy other than simple: An identifier // that differentiates among multiple resource record sets that have the same - // combination of DNS name and type. The value of SetIdentifier must be unique - // for each resource record set that has the same combination of DNS name and - // type. Omit SetIdentifier for any other types of record sets. + // combination of name and type, such as multiple weighted resource record sets + // named acme.example.com that have a type of A. In a group of resource record + // sets that have the same name and type, the value of SetIdentifier must be + // unique for each resource record set. + // + // For information about routing policies, see Choosing a Routing Policy (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html) + // in the Amazon Route 53 Developer Guide. SetIdentifier *string `min:"1" type:"string"` // The resource record cache time to live (TTL), in seconds. Note the following: @@ -12952,14 +13175,14 @@ type ResourceRecordSet struct { // When you create a traffic policy instance, Amazon Route 53 automatically // creates a resource record set. TrafficPolicyInstanceId is the ID of the traffic - // policy instance that Amazon Route 53 created this resource record set for. + // policy instance that Route 53 created this resource record set for. // // To delete the resource record set that is associated with a traffic policy - // instance, use DeleteTrafficPolicyInstance. Amazon Route 53 will delete the - // resource record set automatically. If you delete the resource record set - // by using ChangeResourceRecordSets, Amazon Route 53 doesn't automatically - // delete the traffic policy instance, and you'll continue to be charged for - // it even though it's no longer in use. + // instance, use DeleteTrafficPolicyInstance. Route 53 will delete the resource + // record set automatically. If you delete the resource record set by using + // ChangeResourceRecordSets, Route 53 doesn't automatically delete the traffic + // policy instance, and you'll continue to be charged for it even though it's + // no longer in use. TrafficPolicyInstanceId *string `min:"1" type:"string"` // The DNS record type. For information about different record types and how @@ -13005,16 +13228,22 @@ type ResourceRecordSet struct { // the resource record set that you're creating the alias for. All values // are supported except NS and SOA. // + // If you're creating an alias record that has the same name as the hosted zone + // (known as the zone apex), you can't route traffic to a record for which + // the value of Type is CNAME. This is because the alias record must have + // the same type as the record you're routing traffic to, and creating a + // CNAME record for the zone apex isn't supported even for an alias record. + // // Type is a required field Type *string `type:"string" required:"true" enum:"RRType"` // Weighted resource record sets only: Among resource record sets that have // the same combination of DNS name and type, a value that determines the proportion // of DNS queries that Amazon Route 53 responds to using the current resource - // record set. Amazon Route 53 calculates the sum of the weights for the resource - // record sets that have the same combination of DNS name and type. Amazon Route - // 53 then responds to queries based on the ratio of a resource's weight to - // the total. Note the following: + // record set. Route 53 calculates the sum of the weights for the resource record + // sets that have the same combination of DNS name and type. Route 53 then responds + // to queries based on the ratio of a resource's weight to the total. Note the + // following: // // * You must specify a value for the Weight element for every weighted resource // record set. @@ -13030,16 +13259,14 @@ type ResourceRecordSet struct { // the same values for the Name and Type elements. // // * For weighted (but not weighted alias) resource record sets, if you set - // Weight to 0 for a resource record set, Amazon Route 53 never responds - // to queries with the applicable value for that resource record set. However, - // if you set Weight to 0 for all resource record sets that have the same - // combination of DNS name and type, traffic is routed to all resources with - // equal probability. + // Weight to 0 for a resource record set, Route 53 never responds to queries + // with the applicable value for that resource record set. However, if you + // set Weight to 0 for all resource record sets that have the same combination + // of DNS name and type, traffic is routed to all resources with equal probability. // // The effect of setting Weight to 0 is different when you associate health // checks with weighted resource record sets. For more information, see Options - // for Configuring Amazon Route 53 Active-Active and Active-Passive Failover - // (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-configuring-options.html) + // for Configuring Route 53 Active-Active and Active-Passive Failover (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-configuring-options.html) // in the Amazon Route 53 Developer Guide. Weight *int64 `type:"long"` } @@ -13372,6 +13599,13 @@ type TestDNSAnswerInput struct { // and 24 for edns0clientsubnetmask, the checking tool will simulate a request // from 192.0.2.0/24. The default value is 24 bits for IPv4 addresses and 64 // bits for IPv6 addresses. + // + // The range of valid values depends on whether edns0clientsubnetip is an IPv4 + // or an IPv6 address: + // + // * IPv4: Specify a value between 0 and 32 + // + // * IPv6: Specify a value between 0 and 128 EDNS0ClientSubnetMask *string `location:"querystring" locationName:"edns0clientsubnetmask" type:"string"` // The ID of the hosted zone that you want Amazon Route 53 to simulate a query @@ -13665,14 +13899,14 @@ type TrafficPolicyInstance struct { // The value of State is one of the following values: // // AppliedAmazon Route 53 has finished creating resource record sets, and changes - // have propagated to all Amazon Route 53 edge locations. + // have propagated to all Route 53 edge locations. // - // CreatingAmazon Route 53 is creating the resource record sets. Use GetTrafficPolicyInstance + // CreatingRoute 53 is creating the resource record sets. Use GetTrafficPolicyInstance // to confirm that the CreateTrafficPolicyInstance request completed successfully. // - // FailedAmazon Route 53 wasn't able to create or update the resource record - // sets. When the value of State is Failed, see Message for an explanation of - // what caused the request to fail. + // FailedRoute 53 wasn't able to create or update the resource record sets. + // When the value of State is Failed, see Message for an explanation of what + // caused the request to fail. // // State is a required field State *string `type:"string" required:"true"` @@ -13845,14 +14079,35 @@ type UpdateHealthCheckInput struct { _ struct{} `locationName:"UpdateHealthCheckRequest" type:"structure" xmlURI:"https://route53.amazonaws.com/doc/2013-04-01/"` // A complex type that identifies the CloudWatch alarm that you want Amazon - // Route 53 health checkers to use to determine whether this health check is - // healthy. + // Route 53 health checkers to use to determine whether the specified health + // check is healthy. AlarmIdentifier *AlarmIdentifier `type:"structure"` // A complex type that contains one ChildHealthCheck element for each health // check that you want to associate with a CALCULATED health check. ChildHealthChecks []*string `locationNameList:"ChildHealthCheck" type:"list"` + // Stops Route 53 from performing health checks. When you disable a health check, + // here's what happens: + // + // * Health checks that check the health of endpoints: Route 53 stops submitting + // requests to your application, server, or other resource. + // + // * Calculated health checks: Route 53 stops aggregating the status of the + // referenced health checks. + // + // * Health checks that monitor CloudWatch alarms: Route 53 stops monitoring + // the corresponding CloudWatch metrics. + // + // After you disable a health check, Route 53 considers the status of the health + // check to always be healthy. If you configured DNS failover, Route 53 continues + // to route traffic to the corresponding resources. If you want to stop routing + // traffic to a resource, change the value of UpdateHealthCheckRequest$Inverted. + // + // Charges for a health check still apply when the health check is disabled. + // For more information, see Amazon Route 53 Pricing (http://aws.amazon.com/route53/pricing/). + Disabled *bool `type:"boolean"` + // Specify whether you want Amazon Route 53 to send the value of FullyQualifiedDomainName // to the endpoint in the client_hello message during TLS negotiation. This // allows the endpoint to respond to HTTPS health check requests with the applicable @@ -13893,42 +14148,40 @@ type UpdateHealthCheckInput struct { // // If you specify a value forIPAddress: // - // Amazon Route 53 sends health check requests to the specified IPv4 or IPv6 - // address and passes the value of FullyQualifiedDomainName in the Host header - // for all health checks except TCP health checks. This is typically the fully - // qualified DNS name of the endpoint on which you want Amazon Route 53 to perform - // health checks. + // Route 53 sends health check requests to the specified IPv4 or IPv6 address + // and passes the value of FullyQualifiedDomainName in the Host header for all + // health checks except TCP health checks. This is typically the fully qualified + // DNS name of the endpoint on which you want Route 53 to perform health checks. // - // When Amazon Route 53 checks the health of an endpoint, here is how it constructs + // When Route 53 checks the health of an endpoint, here is how it constructs // the Host header: // // * If you specify a value of 80 for Port and HTTP or HTTP_STR_MATCH for - // Type, Amazon Route 53 passes the value of FullyQualifiedDomainName to - // the endpoint in the Host header. + // Type, Route 53 passes the value of FullyQualifiedDomainName to the endpoint + // in the Host header. // // * If you specify a value of 443 for Port and HTTPS or HTTPS_STR_MATCH - // for Type, Amazon Route 53 passes the value of FullyQualifiedDomainName - // to the endpoint in the Host header. + // for Type, Route 53 passes the value of FullyQualifiedDomainName to the + // endpoint in the Host header. // // * If you specify another value for Port and any value except TCP for Type, - // Amazon Route 53 passes FullyQualifiedDomainName:Port to the endpoint in - // the Host header. + // Route 53 passes FullyQualifiedDomainName:Port to the endpoint in the Host + // header. // - // If you don't specify a value for FullyQualifiedDomainName, Amazon Route 53 - // substitutes the value of IPAddress in the Host header in each of the above - // cases. + // If you don't specify a value for FullyQualifiedDomainName, Route 53 substitutes + // the value of IPAddress in the Host header in each of the above cases. // // If you don't specify a value forIPAddress: // - // If you don't specify a value for IPAddress, Amazon Route 53 sends a DNS request + // If you don't specify a value for IPAddress, Route 53 sends a DNS request // to the domain that you specify in FullyQualifiedDomainName at the interval // you specify in RequestInterval. Using an IPv4 address that is returned by - // DNS, Amazon Route 53 then checks the health of the endpoint. + // DNS, Route 53 then checks the health of the endpoint. // - // If you don't specify a value for IPAddress, Amazon Route 53 uses only IPv4 - // to send health checks to the endpoint. If there's no resource record set - // with a type of A for the name that you specify for FullyQualifiedDomainName, - // the health check fails with a "DNS resolution failed" error. + // If you don't specify a value for IPAddress, Route 53 uses only IPv4 to send + // health checks to the endpoint. If there's no resource record set with a type + // of A for the name that you specify for FullyQualifiedDomainName, the health + // check fails with a "DNS resolution failed" error. // // If you want to check the health of weighted, latency, or failover resource // record sets and you choose to specify the endpoint only by FullyQualifiedDomainName, @@ -13943,9 +14196,9 @@ type UpdateHealthCheckInput struct { // with those resource record sets, health check results will be unpredictable. // // In addition, if the value of Type is HTTP, HTTPS, HTTP_STR_MATCH, or HTTPS_STR_MATCH, - // Amazon Route 53 passes the value of FullyQualifiedDomainName in the Host - // header, as it does when you specify a value for IPAddress. If the value of - // Type is TCP, Amazon Route 53 doesn't pass a Host header. + // Route 53 passes the value of FullyQualifiedDomainName in the Host header, + // as it does when you specify a value for IPAddress. If the value of Type is + // TCP, Route 53 doesn't pass a Host header. FullyQualifiedDomainName *string `type:"string"` // The ID for the health check for which you want detailed information. When @@ -13961,15 +14214,14 @@ type UpdateHealthCheckInput struct { // We recommend that you use GetHealthCheck or ListHealthChecks to get the current // value of HealthCheckVersion for the health check that you want to update, // and that you include that value in your UpdateHealthCheck request. This prevents - // Amazon Route 53 from overwriting an intervening update: + // Route 53 from overwriting an intervening update: // // * If the value in the UpdateHealthCheck request matches the value of HealthCheckVersion - // in the health check, Amazon Route 53 updates the health check with the - // new settings. + // in the health check, Route 53 updates the health check with the new settings. // // * If the value of HealthCheckVersion in the health check is greater, the - // health check was changed after you got the version number. Amazon Route - // 53 does not update the health check, and it returns a HealthCheckVersionMismatch + // health check was changed after you got the version number. Route 53 does + // not update the health check, and it returns a HealthCheckVersionMismatch // error. HealthCheckVersion *int64 `min:"1" type:"long"` @@ -13982,18 +14234,18 @@ type UpdateHealthCheckInput struct { // Note the following: // // * If you specify a number greater than the number of child health checks, - // Amazon Route 53 always considers this health check to be unhealthy. + // Route 53 always considers this health check to be unhealthy. // - // * If you specify 0, Amazon Route 53 always considers this health check - // to be healthy. + // * If you specify 0, Route 53 always considers this health check to be + // healthy. HealthThreshold *int64 `type:"integer"` // The IPv4 or IPv6 IP address for the endpoint that you want Amazon Route 53 // to perform health checks on. If you don't specify a value for IPAddress, - // Amazon Route 53 sends a DNS request to resolve the domain name that you specify + // Route 53 sends a DNS request to resolve the domain name that you specify // in FullyQualifiedDomainName at the interval that you specify in RequestInterval. - // Using an IP address that is returned by DNS, Amazon Route 53 then checks - // the health of the endpoint. + // Using an IP address that is returned by DNS, Route 53 then checks the health + // of the endpoint. // // Use one of the following formats for the value of IPAddress: // @@ -14022,9 +14274,9 @@ type UpdateHealthCheckInput struct { // // For more information, see UpdateHealthCheckRequest$FullyQualifiedDomainName. // - // Constraints: Amazon Route 53 can't check the health of endpoints for which - // the IP address is in local, private, non-routable, or multicast ranges. For - // more information about IP addresses for which you can't create health checks, + // Constraints: Route 53 can't check the health of endpoints for which the IP + // address is in local, private, non-routable, or multicast ranges. For more + // information about IP addresses for which you can't create health checks, // see the following documents: // // * RFC 5735, Special Use IPv4 Addresses (https://tools.ietf.org/html/rfc5735) @@ -14037,14 +14289,14 @@ type UpdateHealthCheckInput struct { // When CloudWatch has insufficient data about the metric to determine the alarm // state, the status that you want Amazon Route 53 to assign to the health check: // - // * Healthy: Amazon Route 53 considers the health check to be healthy. + // * Healthy: Route 53 considers the health check to be healthy. // - // * Unhealthy: Amazon Route 53 considers the health check to be unhealthy. + // * Unhealthy: Route 53 considers the health check to be unhealthy. // - // * LastKnownStatus: Amazon Route 53 uses the status of the health check - // from the last time CloudWatch had sufficient data to determine the alarm - // state. For new health checks that have no last known status, the default - // status for the health check is healthy. + // * LastKnownStatus: Route 53 uses the status of the health check from the + // last time CloudWatch had sufficient data to determine the alarm state. + // For new health checks that have no last known status, the default status + // for the health check is healthy. InsufficientDataHealthStatus *string `type:"string" enum:"InsufficientDataHealthStatus"` // Specify whether you want Amazon Route 53 to invert the status of a health @@ -14067,27 +14319,27 @@ type UpdateHealthCheckInput struct { // * ChildHealthChecks: Amazon Route 53 resets HealthCheckConfig$ChildHealthChecks // to null. // - // * FullyQualifiedDomainName: Amazon Route 53 resets HealthCheckConfig$FullyQualifiedDomainName + // * FullyQualifiedDomainName: Route 53 resets HealthCheckConfig$FullyQualifiedDomainName // to null. // - // * Regions: Amazon Route 53 resets the HealthCheckConfig$Regions list to - // the default set of regions. + // * Regions: Route 53 resets the HealthCheckConfig$Regions list to the default + // set of regions. // - // * ResourcePath: Amazon Route 53 resets HealthCheckConfig$ResourcePath - // to null. + // * ResourcePath: Route 53 resets HealthCheckConfig$ResourcePath to null. ResetElements []*string `locationNameList:"ResettableElementName" type:"list"` // The path that you want Amazon Route 53 to request when performing health // checks. The path can be any value for which your endpoint will return an // HTTP status code of 2xx or 3xx when the endpoint is healthy, for example - // the file /docs/route53-health-check.html. + // the file /docs/route53-health-check.html. You can also include query string + // parameters, for example, /welcome.html?language=jp&login=y. // // Specify this value only if you want to change it. ResourcePath *string `type:"string"` // If the value of Type is HTTP_STR_MATCH or HTTP_STR_MATCH, the string that // you want Amazon Route 53 to search for in the response body from the specified - // resource. If the string appears in the response body, Amazon Route 53 considers + // resource. If the string appears in the response body, Route 53 considers // the resource healthy. (You can't change the value of Type when you update // a health check.) SearchString *string `type:"string"` @@ -14112,6 +14364,9 @@ func (s *UpdateHealthCheckInput) Validate() error { if s.HealthCheckId == nil { invalidParams.Add(request.NewErrParamRequired("HealthCheckId")) } + if s.HealthCheckId != nil && len(*s.HealthCheckId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HealthCheckId", 1)) + } if s.HealthCheckVersion != nil && *s.HealthCheckVersion < 1 { invalidParams.Add(request.NewErrParamMinValue("HealthCheckVersion", 1)) } @@ -14145,6 +14400,12 @@ func (s *UpdateHealthCheckInput) SetChildHealthChecks(v []*string) *UpdateHealth return s } +// SetDisabled sets the Disabled field's value. +func (s *UpdateHealthCheckInput) SetDisabled(v bool) *UpdateHealthCheckInput { + s.Disabled = &v + return s +} + // SetEnableSNI sets the EnableSNI field's value. func (s *UpdateHealthCheckInput) SetEnableSNI(v bool) *UpdateHealthCheckInput { s.EnableSNI = &v @@ -14232,8 +14493,7 @@ func (s *UpdateHealthCheckInput) SetSearchString(v string) *UpdateHealthCheckInp type UpdateHealthCheckOutput struct { _ struct{} `type:"structure"` - // A complex type that contains information about one health check that is associated - // with the current AWS account. + // A complex type that contains the response to an UpdateHealthCheck request. // // HealthCheck is a required field HealthCheck *HealthCheck `type:"structure" required:"true"` @@ -14285,6 +14545,9 @@ func (s *UpdateHostedZoneCommentInput) Validate() error { if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -14309,7 +14572,8 @@ func (s *UpdateHostedZoneCommentInput) SetId(v string) *UpdateHostedZoneCommentI type UpdateHostedZoneCommentOutput struct { _ struct{} `type:"structure"` - // A complex type that contains general information about the hosted zone. + // A complex type that contains the response to the UpdateHostedZoneComment + // request. // // HostedZone is a required field HostedZone *HostedZone `type:"structure" required:"true"` @@ -14562,7 +14826,7 @@ type VPC struct { // (Private hosted zones only) The ID of an Amazon VPC. VPCId *string `type:"string"` - // (Private hosted zones only) The region in which you created an Amazon VPC. + // (Private hosted zones only) The region that an Amazon VPC was created in. VPCRegion *string `min:"1" type:"string" enum:"VPCRegion"` } @@ -14683,6 +14947,9 @@ const ( // CloudWatchRegionApNortheast3 is a CloudWatchRegion enum value CloudWatchRegionApNortheast3 = "ap-northeast-3" + // CloudWatchRegionEuNorth1 is a CloudWatchRegion enum value + CloudWatchRegionEuNorth1 = "eu-north-1" + // CloudWatchRegionSaEast1 is a CloudWatchRegion enum value CloudWatchRegionSaEast1 = "sa-east-1" ) @@ -14872,6 +15139,9 @@ const ( // ResourceRecordSetRegionApNortheast3 is a ResourceRecordSetRegion enum value ResourceRecordSetRegionApNortheast3 = "ap-northeast-3" + // ResourceRecordSetRegionEuNorth1 is a ResourceRecordSetRegion enum value + ResourceRecordSetRegionEuNorth1 = "eu-north-1" + // ResourceRecordSetRegionSaEast1 is a ResourceRecordSetRegion enum value ResourceRecordSetRegionSaEast1 = "sa-east-1" @@ -14958,6 +15228,9 @@ const ( // VPCRegionApNortheast3 is a VPCRegion enum value VPCRegionApNortheast3 = "ap-northeast-3" + // VPCRegionEuNorth1 is a VPCRegion enum value + VPCRegionEuNorth1 = "eu-north-1" + // VPCRegionSaEast1 is a VPCRegion enum value VPCRegionSaEast1 = "sa-east-1" diff --git a/vendor/github.com/aws/aws-sdk-go/service/route53/errors.go b/vendor/github.com/aws/aws-sdk-go/service/route53/errors.go index d37e10cdeb..a2e70bfc62 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/route53/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/route53/errors.go @@ -66,8 +66,8 @@ const ( // You can create a hosted zone that has the same name as an existing hosted // zone (example.com is common), but there is a limit to the number of hosted // zones that have the same name. If you get this error, Amazon Route 53 has - // reached that limit. If you own the domain name and Amazon Route 53 generates - // this error, contact Customer Support. + // reached that limit. If you own the domain name and Route 53 generates this + // error, contact Customer Support. ErrCodeDelegationSetNotAvailable = "DelegationSetNotAvailable" // ErrCodeDelegationSetNotReusable for service response error code @@ -239,14 +239,13 @@ const ( // ErrCodeNoSuchGeoLocation for service response error code // "NoSuchGeoLocation". // - // Amazon Route 53 doesn't support the specified geolocation. + // Amazon Route 53 doesn't support the specified geographic location. ErrCodeNoSuchGeoLocation = "NoSuchGeoLocation" // ErrCodeNoSuchHealthCheck for service response error code // "NoSuchHealthCheck". // - // No health check exists with the ID that you specified in the DeleteHealthCheck - // request. + // No health check exists with the specified ID. ErrCodeNoSuchHealthCheck = "NoSuchHealthCheck" // ErrCodeNoSuchHostedZone for service response error code @@ -285,8 +284,8 @@ const ( // // If Amazon Route 53 can't process a request before the next request arrives, // it will reject subsequent requests for the same hosted zone and return an - // HTTP 400 error (Bad request). If Amazon Route 53 returns this error repeatedly - // for the same request, we recommend that you wait, in intervals of increasing + // HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for + // the same request, we recommend that you wait, in intervals of increasing // duration, before you try the request again. ErrCodePriorRequestNotComplete = "PriorRequestNotComplete" diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go index 0279d92d9d..3b3c2e380c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go @@ -27,7 +27,7 @@ const opAbortMultipartUpload = "AbortMultipartUpload" // AbortMultipartUploadRequest generates a "aws/request.Request" representing the // client's request for the AbortMultipartUpload operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -110,7 +110,7 @@ const opCompleteMultipartUpload = "CompleteMultipartUpload" // CompleteMultipartUploadRequest generates a "aws/request.Request" representing the // client's request for the CompleteMultipartUpload operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -184,7 +184,7 @@ const opCopyObject = "CopyObject" // CopyObjectRequest generates a "aws/request.Request" representing the // client's request for the CopyObject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -264,7 +264,7 @@ const opCreateBucket = "CreateBucket" // CreateBucketRequest generates a "aws/request.Request" representing the // client's request for the CreateBucket operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -346,7 +346,7 @@ const opCreateMultipartUpload = "CreateMultipartUpload" // CreateMultipartUploadRequest generates a "aws/request.Request" representing the // client's request for the CreateMultipartUpload operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -426,7 +426,7 @@ const opDeleteBucket = "DeleteBucket" // DeleteBucketRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucket operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -460,8 +460,7 @@ func (c *S3) DeleteBucketRequest(input *DeleteBucketInput) (req *request.Request output = &DeleteBucketOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -503,7 +502,7 @@ const opDeleteBucketAnalyticsConfiguration = "DeleteBucketAnalyticsConfiguration // DeleteBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucketAnalyticsConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -537,8 +536,7 @@ func (c *S3) DeleteBucketAnalyticsConfigurationRequest(input *DeleteBucketAnalyt output = &DeleteBucketAnalyticsConfigurationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -580,7 +578,7 @@ const opDeleteBucketCors = "DeleteBucketCors" // DeleteBucketCorsRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucketCors operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -614,14 +612,13 @@ func (c *S3) DeleteBucketCorsRequest(input *DeleteBucketCorsInput) (req *request output = &DeleteBucketCorsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteBucketCors API operation for Amazon Simple Storage Service. // -// Deletes the cors configuration information set for the bucket. +// Deletes the CORS configuration information set for the bucket. // // 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 @@ -656,7 +653,7 @@ const opDeleteBucketEncryption = "DeleteBucketEncryption" // DeleteBucketEncryptionRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucketEncryption operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -690,8 +687,7 @@ func (c *S3) DeleteBucketEncryptionRequest(input *DeleteBucketEncryptionInput) ( output = &DeleteBucketEncryptionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -732,7 +728,7 @@ const opDeleteBucketInventoryConfiguration = "DeleteBucketInventoryConfiguration // DeleteBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucketInventoryConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -766,8 +762,7 @@ func (c *S3) DeleteBucketInventoryConfigurationRequest(input *DeleteBucketInvent output = &DeleteBucketInventoryConfigurationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -809,7 +804,7 @@ const opDeleteBucketLifecycle = "DeleteBucketLifecycle" // DeleteBucketLifecycleRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucketLifecycle operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -843,8 +838,7 @@ func (c *S3) DeleteBucketLifecycleRequest(input *DeleteBucketLifecycleInput) (re output = &DeleteBucketLifecycleOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -885,7 +879,7 @@ const opDeleteBucketMetricsConfiguration = "DeleteBucketMetricsConfiguration" // DeleteBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucketMetricsConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -919,8 +913,7 @@ func (c *S3) DeleteBucketMetricsConfigurationRequest(input *DeleteBucketMetricsC output = &DeleteBucketMetricsConfigurationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -962,7 +955,7 @@ const opDeleteBucketPolicy = "DeleteBucketPolicy" // DeleteBucketPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucketPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -996,8 +989,7 @@ func (c *S3) DeleteBucketPolicyRequest(input *DeleteBucketPolicyInput) (req *req output = &DeleteBucketPolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1038,7 +1030,7 @@ const opDeleteBucketReplication = "DeleteBucketReplication" // DeleteBucketReplicationRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucketReplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1072,14 +1064,15 @@ func (c *S3) DeleteBucketReplicationRequest(input *DeleteBucketReplicationInput) output = &DeleteBucketReplicationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteBucketReplication API operation for Amazon Simple Storage Service. // -// Deletes the replication configuration from the bucket. +// Deletes the replication configuration from the bucket. For information about +// replication configuration, see Cross-Region Replication (CRR) ( https://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html) +// in the Amazon S3 Developer 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 @@ -1114,7 +1107,7 @@ const opDeleteBucketTagging = "DeleteBucketTagging" // DeleteBucketTaggingRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucketTagging operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1148,8 +1141,7 @@ func (c *S3) DeleteBucketTaggingRequest(input *DeleteBucketTaggingInput) (req *r output = &DeleteBucketTaggingOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1190,7 +1182,7 @@ const opDeleteBucketWebsite = "DeleteBucketWebsite" // DeleteBucketWebsiteRequest generates a "aws/request.Request" representing the // client's request for the DeleteBucketWebsite operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1224,8 +1216,7 @@ func (c *S3) DeleteBucketWebsiteRequest(input *DeleteBucketWebsiteInput) (req *r output = &DeleteBucketWebsiteOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1266,7 +1257,7 @@ const opDeleteObject = "DeleteObject" // DeleteObjectRequest generates a "aws/request.Request" representing the // client's request for the DeleteObject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1342,7 +1333,7 @@ const opDeleteObjectTagging = "DeleteObjectTagging" // DeleteObjectTaggingRequest generates a "aws/request.Request" representing the // client's request for the DeleteObjectTagging operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1416,7 +1407,7 @@ const opDeleteObjects = "DeleteObjects" // DeleteObjectsRequest generates a "aws/request.Request" representing the // client's request for the DeleteObjects operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1486,12 +1477,87 @@ func (c *S3) DeleteObjectsWithContext(ctx aws.Context, input *DeleteObjectsInput return out, req.Send() } +const opDeletePublicAccessBlock = "DeletePublicAccessBlock" + +// DeletePublicAccessBlockRequest generates a "aws/request.Request" representing the +// client's request for the DeletePublicAccessBlock 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 DeletePublicAccessBlock for more information on using the DeletePublicAccessBlock +// 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 DeletePublicAccessBlockRequest method. +// req, resp := client.DeletePublicAccessBlockRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeletePublicAccessBlock +func (c *S3) DeletePublicAccessBlockRequest(input *DeletePublicAccessBlockInput) (req *request.Request, output *DeletePublicAccessBlockOutput) { + op := &request.Operation{ + Name: opDeletePublicAccessBlock, + HTTPMethod: "DELETE", + HTTPPath: "/{Bucket}?publicAccessBlock", + } + + if input == nil { + input = &DeletePublicAccessBlockInput{} + } + + output = &DeletePublicAccessBlockOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeletePublicAccessBlock API operation for Amazon Simple Storage Service. +// +// Removes the PublicAccessBlock configuration from an Amazon S3 bucket. +// +// 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 Simple Storage Service's +// API operation DeletePublicAccessBlock for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeletePublicAccessBlock +func (c *S3) DeletePublicAccessBlock(input *DeletePublicAccessBlockInput) (*DeletePublicAccessBlockOutput, error) { + req, out := c.DeletePublicAccessBlockRequest(input) + return out, req.Send() +} + +// DeletePublicAccessBlockWithContext is the same as DeletePublicAccessBlock with the addition of +// the ability to pass a context and additional request options. +// +// See DeletePublicAccessBlock 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 *S3) DeletePublicAccessBlockWithContext(ctx aws.Context, input *DeletePublicAccessBlockInput, opts ...request.Option) (*DeletePublicAccessBlockOutput, error) { + req, out := c.DeletePublicAccessBlockRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetBucketAccelerateConfiguration = "GetBucketAccelerateConfiguration" // GetBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetBucketAccelerateConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1565,7 +1631,7 @@ const opGetBucketAcl = "GetBucketAcl" // GetBucketAclRequest generates a "aws/request.Request" representing the // client's request for the GetBucketAcl operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1639,7 +1705,7 @@ const opGetBucketAnalyticsConfiguration = "GetBucketAnalyticsConfiguration" // GetBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetBucketAnalyticsConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1714,7 +1780,7 @@ const opGetBucketCors = "GetBucketCors" // GetBucketCorsRequest generates a "aws/request.Request" representing the // client's request for the GetBucketCors operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1753,7 +1819,7 @@ func (c *S3) GetBucketCorsRequest(input *GetBucketCorsInput) (req *request.Reque // GetBucketCors API operation for Amazon Simple Storage Service. // -// Returns the cors configuration for the bucket. +// Returns the CORS configuration for the bucket. // // 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 @@ -1788,7 +1854,7 @@ const opGetBucketEncryption = "GetBucketEncryption" // GetBucketEncryptionRequest generates a "aws/request.Request" representing the // client's request for the GetBucketEncryption operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1862,7 +1928,7 @@ const opGetBucketInventoryConfiguration = "GetBucketInventoryConfiguration" // GetBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetBucketInventoryConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1937,7 +2003,7 @@ const opGetBucketLifecycle = "GetBucketLifecycle" // GetBucketLifecycleRequest generates a "aws/request.Request" representing the // client's request for the GetBucketLifecycle operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2020,7 +2086,7 @@ const opGetBucketLifecycleConfiguration = "GetBucketLifecycleConfiguration" // GetBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetBucketLifecycleConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2094,7 +2160,7 @@ const opGetBucketLocation = "GetBucketLocation" // GetBucketLocationRequest generates a "aws/request.Request" representing the // client's request for the GetBucketLocation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2168,7 +2234,7 @@ const opGetBucketLogging = "GetBucketLogging" // GetBucketLoggingRequest generates a "aws/request.Request" representing the // client's request for the GetBucketLogging operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2243,7 +2309,7 @@ const opGetBucketMetricsConfiguration = "GetBucketMetricsConfiguration" // GetBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetBucketMetricsConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2318,7 +2384,7 @@ const opGetBucketNotification = "GetBucketNotification" // GetBucketNotificationRequest generates a "aws/request.Request" representing the // client's request for the GetBucketNotification operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2401,7 +2467,7 @@ const opGetBucketNotificationConfiguration = "GetBucketNotificationConfiguration // GetBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetBucketNotificationConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2475,7 +2541,7 @@ const opGetBucketPolicy = "GetBucketPolicy" // GetBucketPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetBucketPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2544,12 +2610,87 @@ func (c *S3) GetBucketPolicyWithContext(ctx aws.Context, input *GetBucketPolicyI return out, req.Send() } +const opGetBucketPolicyStatus = "GetBucketPolicyStatus" + +// GetBucketPolicyStatusRequest generates a "aws/request.Request" representing the +// client's request for the GetBucketPolicyStatus 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 GetBucketPolicyStatus for more information on using the GetBucketPolicyStatus +// 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 GetBucketPolicyStatusRequest method. +// req, resp := client.GetBucketPolicyStatusRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyStatus +func (c *S3) GetBucketPolicyStatusRequest(input *GetBucketPolicyStatusInput) (req *request.Request, output *GetBucketPolicyStatusOutput) { + op := &request.Operation{ + Name: opGetBucketPolicyStatus, + HTTPMethod: "GET", + HTTPPath: "/{Bucket}?policyStatus", + } + + if input == nil { + input = &GetBucketPolicyStatusInput{} + } + + output = &GetBucketPolicyStatusOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetBucketPolicyStatus API operation for Amazon Simple Storage Service. +// +// Retrieves the policy status for an Amazon S3 bucket, indicating whether the +// bucket is public. +// +// 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 Simple Storage Service's +// API operation GetBucketPolicyStatus for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyStatus +func (c *S3) GetBucketPolicyStatus(input *GetBucketPolicyStatusInput) (*GetBucketPolicyStatusOutput, error) { + req, out := c.GetBucketPolicyStatusRequest(input) + return out, req.Send() +} + +// GetBucketPolicyStatusWithContext is the same as GetBucketPolicyStatus with the addition of +// the ability to pass a context and additional request options. +// +// See GetBucketPolicyStatus 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 *S3) GetBucketPolicyStatusWithContext(ctx aws.Context, input *GetBucketPolicyStatusInput, opts ...request.Option) (*GetBucketPolicyStatusOutput, error) { + req, out := c.GetBucketPolicyStatusRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetBucketReplication = "GetBucketReplication" // GetBucketReplicationRequest generates a "aws/request.Request" representing the // client's request for the GetBucketReplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2590,6 +2731,10 @@ func (c *S3) GetBucketReplicationRequest(input *GetBucketReplicationInput) (req // // Returns the replication configuration of a bucket. // +// It can take a while to propagate the put or delete a replication configuration +// to all Amazon S3 systems. Therefore, a get request soon after put or delete +// can return a wrong result. +// // 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. @@ -2623,7 +2768,7 @@ const opGetBucketRequestPayment = "GetBucketRequestPayment" // GetBucketRequestPaymentRequest generates a "aws/request.Request" representing the // client's request for the GetBucketRequestPayment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2697,7 +2842,7 @@ const opGetBucketTagging = "GetBucketTagging" // GetBucketTaggingRequest generates a "aws/request.Request" representing the // client's request for the GetBucketTagging operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2771,7 +2916,7 @@ const opGetBucketVersioning = "GetBucketVersioning" // GetBucketVersioningRequest generates a "aws/request.Request" representing the // client's request for the GetBucketVersioning operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2845,7 +2990,7 @@ const opGetBucketWebsite = "GetBucketWebsite" // GetBucketWebsiteRequest generates a "aws/request.Request" representing the // client's request for the GetBucketWebsite operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2919,7 +3064,7 @@ const opGetObject = "GetObject" // GetObjectRequest generates a "aws/request.Request" representing the // client's request for the GetObject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2998,7 +3143,7 @@ const opGetObjectAcl = "GetObjectAcl" // GetObjectAclRequest generates a "aws/request.Request" representing the // client's request for the GetObjectAcl operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3072,769 +3217,1066 @@ func (c *S3) GetObjectAclWithContext(ctx aws.Context, input *GetObjectAclInput, return out, req.Send() } -const opGetObjectTagging = "GetObjectTagging" +const opGetObjectLegalHold = "GetObjectLegalHold" -// GetObjectTaggingRequest generates a "aws/request.Request" representing the -// client's request for the GetObjectTagging operation. The "output" return +// GetObjectLegalHoldRequest generates a "aws/request.Request" representing the +// client's request for the GetObjectLegalHold operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetObjectTagging for more information on using the GetObjectTagging +// See GetObjectLegalHold for more information on using the GetObjectLegalHold // 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 GetObjectTaggingRequest method. -// req, resp := client.GetObjectTaggingRequest(params) +// // Example sending a request using the GetObjectLegalHoldRequest method. +// req, resp := client.GetObjectLegalHoldRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging -func (c *S3) GetObjectTaggingRequest(input *GetObjectTaggingInput) (req *request.Request, output *GetObjectTaggingOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLegalHold +func (c *S3) GetObjectLegalHoldRequest(input *GetObjectLegalHoldInput) (req *request.Request, output *GetObjectLegalHoldOutput) { op := &request.Operation{ - Name: opGetObjectTagging, + Name: opGetObjectLegalHold, HTTPMethod: "GET", - HTTPPath: "/{Bucket}/{Key+}?tagging", + HTTPPath: "/{Bucket}/{Key+}?legal-hold", } if input == nil { - input = &GetObjectTaggingInput{} + input = &GetObjectLegalHoldInput{} } - output = &GetObjectTaggingOutput{} + output = &GetObjectLegalHoldOutput{} req = c.newRequest(op, input, output) return } -// GetObjectTagging API operation for Amazon Simple Storage Service. +// GetObjectLegalHold API operation for Amazon Simple Storage Service. // -// Returns the tag-set of an object. +// Gets an object's current Legal Hold status. // // 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 Simple Storage Service's -// API operation GetObjectTagging for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging -func (c *S3) GetObjectTagging(input *GetObjectTaggingInput) (*GetObjectTaggingOutput, error) { - req, out := c.GetObjectTaggingRequest(input) +// API operation GetObjectLegalHold for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLegalHold +func (c *S3) GetObjectLegalHold(input *GetObjectLegalHoldInput) (*GetObjectLegalHoldOutput, error) { + req, out := c.GetObjectLegalHoldRequest(input) return out, req.Send() } -// GetObjectTaggingWithContext is the same as GetObjectTagging with the addition of +// GetObjectLegalHoldWithContext is the same as GetObjectLegalHold with the addition of // the ability to pass a context and additional request options. // -// See GetObjectTagging for details on how to use this API operation. +// See GetObjectLegalHold 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 *S3) GetObjectTaggingWithContext(ctx aws.Context, input *GetObjectTaggingInput, opts ...request.Option) (*GetObjectTaggingOutput, error) { - req, out := c.GetObjectTaggingRequest(input) +func (c *S3) GetObjectLegalHoldWithContext(ctx aws.Context, input *GetObjectLegalHoldInput, opts ...request.Option) (*GetObjectLegalHoldOutput, error) { + req, out := c.GetObjectLegalHoldRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opGetObjectTorrent = "GetObjectTorrent" +const opGetObjectLockConfiguration = "GetObjectLockConfiguration" -// GetObjectTorrentRequest generates a "aws/request.Request" representing the -// client's request for the GetObjectTorrent operation. The "output" return +// GetObjectLockConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the GetObjectLockConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 GetObjectTorrent for more information on using the GetObjectTorrent +// See GetObjectLockConfiguration for more information on using the GetObjectLockConfiguration // 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 GetObjectTorrentRequest method. -// req, resp := client.GetObjectTorrentRequest(params) +// // Example sending a request using the GetObjectLockConfigurationRequest method. +// req, resp := client.GetObjectLockConfigurationRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent -func (c *S3) GetObjectTorrentRequest(input *GetObjectTorrentInput) (req *request.Request, output *GetObjectTorrentOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLockConfiguration +func (c *S3) GetObjectLockConfigurationRequest(input *GetObjectLockConfigurationInput) (req *request.Request, output *GetObjectLockConfigurationOutput) { op := &request.Operation{ - Name: opGetObjectTorrent, + Name: opGetObjectLockConfiguration, HTTPMethod: "GET", - HTTPPath: "/{Bucket}/{Key+}?torrent", + HTTPPath: "/{Bucket}?object-lock", } if input == nil { - input = &GetObjectTorrentInput{} + input = &GetObjectLockConfigurationInput{} } - output = &GetObjectTorrentOutput{} + output = &GetObjectLockConfigurationOutput{} req = c.newRequest(op, input, output) return } -// GetObjectTorrent API operation for Amazon Simple Storage Service. +// GetObjectLockConfiguration API operation for Amazon Simple Storage Service. // -// Return torrent files from a bucket. +// Gets the Object Lock configuration for a bucket. The rule specified in the +// Object Lock configuration will be applied by default to every new object +// placed in the specified bucket. // // 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 Simple Storage Service's -// API operation GetObjectTorrent for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent -func (c *S3) GetObjectTorrent(input *GetObjectTorrentInput) (*GetObjectTorrentOutput, error) { - req, out := c.GetObjectTorrentRequest(input) +// API operation GetObjectLockConfiguration for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLockConfiguration +func (c *S3) GetObjectLockConfiguration(input *GetObjectLockConfigurationInput) (*GetObjectLockConfigurationOutput, error) { + req, out := c.GetObjectLockConfigurationRequest(input) return out, req.Send() } -// GetObjectTorrentWithContext is the same as GetObjectTorrent with the addition of +// GetObjectLockConfigurationWithContext is the same as GetObjectLockConfiguration with the addition of // the ability to pass a context and additional request options. // -// See GetObjectTorrent for details on how to use this API operation. +// See GetObjectLockConfiguration 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 *S3) GetObjectTorrentWithContext(ctx aws.Context, input *GetObjectTorrentInput, opts ...request.Option) (*GetObjectTorrentOutput, error) { - req, out := c.GetObjectTorrentRequest(input) +func (c *S3) GetObjectLockConfigurationWithContext(ctx aws.Context, input *GetObjectLockConfigurationInput, opts ...request.Option) (*GetObjectLockConfigurationOutput, error) { + req, out := c.GetObjectLockConfigurationRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opHeadBucket = "HeadBucket" +const opGetObjectRetention = "GetObjectRetention" -// HeadBucketRequest generates a "aws/request.Request" representing the -// client's request for the HeadBucket operation. The "output" return +// GetObjectRetentionRequest generates a "aws/request.Request" representing the +// client's request for the GetObjectRetention operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 HeadBucket for more information on using the HeadBucket +// See GetObjectRetention for more information on using the GetObjectRetention // 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 HeadBucketRequest method. -// req, resp := client.HeadBucketRequest(params) +// // Example sending a request using the GetObjectRetentionRequest method. +// req, resp := client.GetObjectRetentionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket -func (c *S3) HeadBucketRequest(input *HeadBucketInput) (req *request.Request, output *HeadBucketOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectRetention +func (c *S3) GetObjectRetentionRequest(input *GetObjectRetentionInput) (req *request.Request, output *GetObjectRetentionOutput) { op := &request.Operation{ - Name: opHeadBucket, - HTTPMethod: "HEAD", - HTTPPath: "/{Bucket}", + Name: opGetObjectRetention, + HTTPMethod: "GET", + HTTPPath: "/{Bucket}/{Key+}?retention", } if input == nil { - input = &HeadBucketInput{} + input = &GetObjectRetentionInput{} } - output = &HeadBucketOutput{} + output = &GetObjectRetentionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) return } -// HeadBucket API operation for Amazon Simple Storage Service. +// GetObjectRetention API operation for Amazon Simple Storage Service. // -// This operation is useful to determine if a bucket exists and you have permission -// to access it. +// Retrieves an object's retention settings. // // 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 Simple Storage Service's -// API operation HeadBucket for usage and error information. -// -// Returned Error Codes: -// * ErrCodeNoSuchBucket "NoSuchBucket" -// The specified bucket does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket -func (c *S3) HeadBucket(input *HeadBucketInput) (*HeadBucketOutput, error) { - req, out := c.HeadBucketRequest(input) +// API operation GetObjectRetention for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectRetention +func (c *S3) GetObjectRetention(input *GetObjectRetentionInput) (*GetObjectRetentionOutput, error) { + req, out := c.GetObjectRetentionRequest(input) return out, req.Send() } -// HeadBucketWithContext is the same as HeadBucket with the addition of +// GetObjectRetentionWithContext is the same as GetObjectRetention with the addition of // the ability to pass a context and additional request options. // -// See HeadBucket for details on how to use this API operation. +// See GetObjectRetention 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 *S3) HeadBucketWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.Option) (*HeadBucketOutput, error) { - req, out := c.HeadBucketRequest(input) +func (c *S3) GetObjectRetentionWithContext(ctx aws.Context, input *GetObjectRetentionInput, opts ...request.Option) (*GetObjectRetentionOutput, error) { + req, out := c.GetObjectRetentionRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opHeadObject = "HeadObject" +const opGetObjectTagging = "GetObjectTagging" -// HeadObjectRequest generates a "aws/request.Request" representing the -// client's request for the HeadObject operation. The "output" return +// GetObjectTaggingRequest generates a "aws/request.Request" representing the +// client's request for the GetObjectTagging operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 HeadObject for more information on using the HeadObject +// See GetObjectTagging for more information on using the GetObjectTagging // 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 HeadObjectRequest method. -// req, resp := client.HeadObjectRequest(params) +// // Example sending a request using the GetObjectTaggingRequest method. +// req, resp := client.GetObjectTaggingRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject -func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, output *HeadObjectOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging +func (c *S3) GetObjectTaggingRequest(input *GetObjectTaggingInput) (req *request.Request, output *GetObjectTaggingOutput) { op := &request.Operation{ - Name: opHeadObject, - HTTPMethod: "HEAD", - HTTPPath: "/{Bucket}/{Key+}", + Name: opGetObjectTagging, + HTTPMethod: "GET", + HTTPPath: "/{Bucket}/{Key+}?tagging", } if input == nil { - input = &HeadObjectInput{} + input = &GetObjectTaggingInput{} } - output = &HeadObjectOutput{} + output = &GetObjectTaggingOutput{} req = c.newRequest(op, input, output) return } -// HeadObject API operation for Amazon Simple Storage Service. -// -// The HEAD operation retrieves metadata from an object without returning the -// object itself. This operation is useful if you're only interested in an object's -// metadata. To use HEAD, you must have READ access to the object. +// GetObjectTagging API operation for Amazon Simple Storage Service. // -// See http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#RESTErrorResponses -// for more information on returned errors. +// Returns the tag-set of an object. // // 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 Simple Storage Service's -// API operation HeadObject for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject -func (c *S3) HeadObject(input *HeadObjectInput) (*HeadObjectOutput, error) { - req, out := c.HeadObjectRequest(input) +// API operation GetObjectTagging for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging +func (c *S3) GetObjectTagging(input *GetObjectTaggingInput) (*GetObjectTaggingOutput, error) { + req, out := c.GetObjectTaggingRequest(input) return out, req.Send() } -// HeadObjectWithContext is the same as HeadObject with the addition of +// GetObjectTaggingWithContext is the same as GetObjectTagging with the addition of // the ability to pass a context and additional request options. // -// See HeadObject for details on how to use this API operation. +// See GetObjectTagging 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 *S3) HeadObjectWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.Option) (*HeadObjectOutput, error) { - req, out := c.HeadObjectRequest(input) +func (c *S3) GetObjectTaggingWithContext(ctx aws.Context, input *GetObjectTaggingInput, opts ...request.Option) (*GetObjectTaggingOutput, error) { + req, out := c.GetObjectTaggingRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opListBucketAnalyticsConfigurations = "ListBucketAnalyticsConfigurations" +const opGetObjectTorrent = "GetObjectTorrent" -// ListBucketAnalyticsConfigurationsRequest generates a "aws/request.Request" representing the -// client's request for the ListBucketAnalyticsConfigurations operation. The "output" return +// GetObjectTorrentRequest generates a "aws/request.Request" representing the +// client's request for the GetObjectTorrent operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 ListBucketAnalyticsConfigurations for more information on using the ListBucketAnalyticsConfigurations +// See GetObjectTorrent for more information on using the GetObjectTorrent // 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 ListBucketAnalyticsConfigurationsRequest method. -// req, resp := client.ListBucketAnalyticsConfigurationsRequest(params) +// // Example sending a request using the GetObjectTorrentRequest method. +// req, resp := client.GetObjectTorrentRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations -func (c *S3) ListBucketAnalyticsConfigurationsRequest(input *ListBucketAnalyticsConfigurationsInput) (req *request.Request, output *ListBucketAnalyticsConfigurationsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent +func (c *S3) GetObjectTorrentRequest(input *GetObjectTorrentInput) (req *request.Request, output *GetObjectTorrentOutput) { op := &request.Operation{ - Name: opListBucketAnalyticsConfigurations, + Name: opGetObjectTorrent, HTTPMethod: "GET", - HTTPPath: "/{Bucket}?analytics", + HTTPPath: "/{Bucket}/{Key+}?torrent", } if input == nil { - input = &ListBucketAnalyticsConfigurationsInput{} + input = &GetObjectTorrentInput{} } - output = &ListBucketAnalyticsConfigurationsOutput{} + output = &GetObjectTorrentOutput{} req = c.newRequest(op, input, output) return } -// ListBucketAnalyticsConfigurations API operation for Amazon Simple Storage Service. +// GetObjectTorrent API operation for Amazon Simple Storage Service. // -// Lists the analytics configurations for the bucket. +// Return torrent files from a bucket. // // 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 Simple Storage Service's -// API operation ListBucketAnalyticsConfigurations for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations -func (c *S3) ListBucketAnalyticsConfigurations(input *ListBucketAnalyticsConfigurationsInput) (*ListBucketAnalyticsConfigurationsOutput, error) { - req, out := c.ListBucketAnalyticsConfigurationsRequest(input) +// API operation GetObjectTorrent for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent +func (c *S3) GetObjectTorrent(input *GetObjectTorrentInput) (*GetObjectTorrentOutput, error) { + req, out := c.GetObjectTorrentRequest(input) return out, req.Send() } -// ListBucketAnalyticsConfigurationsWithContext is the same as ListBucketAnalyticsConfigurations with the addition of +// GetObjectTorrentWithContext is the same as GetObjectTorrent with the addition of // the ability to pass a context and additional request options. // -// See ListBucketAnalyticsConfigurations for details on how to use this API operation. +// See GetObjectTorrent 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 *S3) ListBucketAnalyticsConfigurationsWithContext(ctx aws.Context, input *ListBucketAnalyticsConfigurationsInput, opts ...request.Option) (*ListBucketAnalyticsConfigurationsOutput, error) { - req, out := c.ListBucketAnalyticsConfigurationsRequest(input) +func (c *S3) GetObjectTorrentWithContext(ctx aws.Context, input *GetObjectTorrentInput, opts ...request.Option) (*GetObjectTorrentOutput, error) { + req, out := c.GetObjectTorrentRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opListBucketInventoryConfigurations = "ListBucketInventoryConfigurations" +const opGetPublicAccessBlock = "GetPublicAccessBlock" -// ListBucketInventoryConfigurationsRequest generates a "aws/request.Request" representing the -// client's request for the ListBucketInventoryConfigurations operation. The "output" return +// GetPublicAccessBlockRequest generates a "aws/request.Request" representing the +// client's request for the GetPublicAccessBlock operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 ListBucketInventoryConfigurations for more information on using the ListBucketInventoryConfigurations +// See GetPublicAccessBlock for more information on using the GetPublicAccessBlock // 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 ListBucketInventoryConfigurationsRequest method. -// req, resp := client.ListBucketInventoryConfigurationsRequest(params) +// // Example sending a request using the GetPublicAccessBlockRequest method. +// req, resp := client.GetPublicAccessBlockRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations -func (c *S3) ListBucketInventoryConfigurationsRequest(input *ListBucketInventoryConfigurationsInput) (req *request.Request, output *ListBucketInventoryConfigurationsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetPublicAccessBlock +func (c *S3) GetPublicAccessBlockRequest(input *GetPublicAccessBlockInput) (req *request.Request, output *GetPublicAccessBlockOutput) { op := &request.Operation{ - Name: opListBucketInventoryConfigurations, + Name: opGetPublicAccessBlock, HTTPMethod: "GET", - HTTPPath: "/{Bucket}?inventory", + HTTPPath: "/{Bucket}?publicAccessBlock", } if input == nil { - input = &ListBucketInventoryConfigurationsInput{} + input = &GetPublicAccessBlockInput{} } - output = &ListBucketInventoryConfigurationsOutput{} + output = &GetPublicAccessBlockOutput{} req = c.newRequest(op, input, output) return } -// ListBucketInventoryConfigurations API operation for Amazon Simple Storage Service. +// GetPublicAccessBlock API operation for Amazon Simple Storage Service. // -// Returns a list of inventory configurations for the bucket. +// Retrieves the PublicAccessBlock configuration for an Amazon S3 bucket. // // 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 Simple Storage Service's -// API operation ListBucketInventoryConfigurations for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations -func (c *S3) ListBucketInventoryConfigurations(input *ListBucketInventoryConfigurationsInput) (*ListBucketInventoryConfigurationsOutput, error) { - req, out := c.ListBucketInventoryConfigurationsRequest(input) +// API operation GetPublicAccessBlock for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetPublicAccessBlock +func (c *S3) GetPublicAccessBlock(input *GetPublicAccessBlockInput) (*GetPublicAccessBlockOutput, error) { + req, out := c.GetPublicAccessBlockRequest(input) return out, req.Send() } -// ListBucketInventoryConfigurationsWithContext is the same as ListBucketInventoryConfigurations with the addition of +// GetPublicAccessBlockWithContext is the same as GetPublicAccessBlock with the addition of // the ability to pass a context and additional request options. // -// See ListBucketInventoryConfigurations for details on how to use this API operation. +// See GetPublicAccessBlock 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 *S3) ListBucketInventoryConfigurationsWithContext(ctx aws.Context, input *ListBucketInventoryConfigurationsInput, opts ...request.Option) (*ListBucketInventoryConfigurationsOutput, error) { - req, out := c.ListBucketInventoryConfigurationsRequest(input) +func (c *S3) GetPublicAccessBlockWithContext(ctx aws.Context, input *GetPublicAccessBlockInput, opts ...request.Option) (*GetPublicAccessBlockOutput, error) { + req, out := c.GetPublicAccessBlockRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opListBucketMetricsConfigurations = "ListBucketMetricsConfigurations" +const opHeadBucket = "HeadBucket" -// ListBucketMetricsConfigurationsRequest generates a "aws/request.Request" representing the -// client's request for the ListBucketMetricsConfigurations operation. The "output" return +// HeadBucketRequest generates a "aws/request.Request" representing the +// client's request for the HeadBucket operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 ListBucketMetricsConfigurations for more information on using the ListBucketMetricsConfigurations +// See HeadBucket for more information on using the HeadBucket // 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 ListBucketMetricsConfigurationsRequest method. -// req, resp := client.ListBucketMetricsConfigurationsRequest(params) +// // Example sending a request using the HeadBucketRequest method. +// req, resp := client.HeadBucketRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations -func (c *S3) ListBucketMetricsConfigurationsRequest(input *ListBucketMetricsConfigurationsInput) (req *request.Request, output *ListBucketMetricsConfigurationsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket +func (c *S3) HeadBucketRequest(input *HeadBucketInput) (req *request.Request, output *HeadBucketOutput) { op := &request.Operation{ - Name: opListBucketMetricsConfigurations, - HTTPMethod: "GET", - HTTPPath: "/{Bucket}?metrics", + Name: opHeadBucket, + HTTPMethod: "HEAD", + HTTPPath: "/{Bucket}", } if input == nil { - input = &ListBucketMetricsConfigurationsInput{} + input = &HeadBucketInput{} } - output = &ListBucketMetricsConfigurationsOutput{} + output = &HeadBucketOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// ListBucketMetricsConfigurations API operation for Amazon Simple Storage Service. +// HeadBucket API operation for Amazon Simple Storage Service. // -// Lists the metrics configurations for the bucket. +// This operation is useful to determine if a bucket exists and you have permission +// to access it. // // 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 Simple Storage Service's -// API operation ListBucketMetricsConfigurations for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations -func (c *S3) ListBucketMetricsConfigurations(input *ListBucketMetricsConfigurationsInput) (*ListBucketMetricsConfigurationsOutput, error) { - req, out := c.ListBucketMetricsConfigurationsRequest(input) +// API operation HeadBucket for usage and error information. +// +// Returned Error Codes: +// * ErrCodeNoSuchBucket "NoSuchBucket" +// The specified bucket does not exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket +func (c *S3) HeadBucket(input *HeadBucketInput) (*HeadBucketOutput, error) { + req, out := c.HeadBucketRequest(input) return out, req.Send() } -// ListBucketMetricsConfigurationsWithContext is the same as ListBucketMetricsConfigurations with the addition of +// HeadBucketWithContext is the same as HeadBucket with the addition of // the ability to pass a context and additional request options. // -// See ListBucketMetricsConfigurations for details on how to use this API operation. +// See HeadBucket 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 *S3) ListBucketMetricsConfigurationsWithContext(ctx aws.Context, input *ListBucketMetricsConfigurationsInput, opts ...request.Option) (*ListBucketMetricsConfigurationsOutput, error) { - req, out := c.ListBucketMetricsConfigurationsRequest(input) +func (c *S3) HeadBucketWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.Option) (*HeadBucketOutput, error) { + req, out := c.HeadBucketRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opListBuckets = "ListBuckets" +const opHeadObject = "HeadObject" -// ListBucketsRequest generates a "aws/request.Request" representing the -// client's request for the ListBuckets operation. The "output" return +// HeadObjectRequest generates a "aws/request.Request" representing the +// client's request for the HeadObject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 ListBuckets for more information on using the ListBuckets +// See HeadObject for more information on using the HeadObject // 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 ListBucketsRequest method. -// req, resp := client.ListBucketsRequest(params) +// // Example sending a request using the HeadObjectRequest method. +// req, resp := client.HeadObjectRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets -func (c *S3) ListBucketsRequest(input *ListBucketsInput) (req *request.Request, output *ListBucketsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject +func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, output *HeadObjectOutput) { op := &request.Operation{ - Name: opListBuckets, - HTTPMethod: "GET", - HTTPPath: "/", + Name: opHeadObject, + HTTPMethod: "HEAD", + HTTPPath: "/{Bucket}/{Key+}", } if input == nil { - input = &ListBucketsInput{} + input = &HeadObjectInput{} } - output = &ListBucketsOutput{} + output = &HeadObjectOutput{} req = c.newRequest(op, input, output) return } -// ListBuckets API operation for Amazon Simple Storage Service. +// HeadObject API operation for Amazon Simple Storage Service. // -// Returns a list of all buckets owned by the authenticated sender of the request. +// The HEAD operation retrieves metadata from an object without returning the +// object itself. This operation is useful if you're only interested in an object's +// metadata. To use HEAD, you must have READ access to the object. +// +// See http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#RESTErrorResponses +// for more information on returned errors. // // 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 Simple Storage Service's -// API operation ListBuckets for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets -func (c *S3) ListBuckets(input *ListBucketsInput) (*ListBucketsOutput, error) { - req, out := c.ListBucketsRequest(input) +// API operation HeadObject for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject +func (c *S3) HeadObject(input *HeadObjectInput) (*HeadObjectOutput, error) { + req, out := c.HeadObjectRequest(input) return out, req.Send() } -// ListBucketsWithContext is the same as ListBuckets with the addition of +// HeadObjectWithContext is the same as HeadObject with the addition of // the ability to pass a context and additional request options. // -// See ListBuckets for details on how to use this API operation. +// See HeadObject 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 *S3) ListBucketsWithContext(ctx aws.Context, input *ListBucketsInput, opts ...request.Option) (*ListBucketsOutput, error) { - req, out := c.ListBucketsRequest(input) +func (c *S3) HeadObjectWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.Option) (*HeadObjectOutput, error) { + req, out := c.HeadObjectRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opListMultipartUploads = "ListMultipartUploads" +const opListBucketAnalyticsConfigurations = "ListBucketAnalyticsConfigurations" -// ListMultipartUploadsRequest generates a "aws/request.Request" representing the -// client's request for the ListMultipartUploads operation. The "output" return +// ListBucketAnalyticsConfigurationsRequest generates a "aws/request.Request" representing the +// client's request for the ListBucketAnalyticsConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 ListMultipartUploads for more information on using the ListMultipartUploads +// See ListBucketAnalyticsConfigurations for more information on using the ListBucketAnalyticsConfigurations // 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 ListMultipartUploadsRequest method. -// req, resp := client.ListMultipartUploadsRequest(params) +// // Example sending a request using the ListBucketAnalyticsConfigurationsRequest method. +// req, resp := client.ListBucketAnalyticsConfigurationsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads -func (c *S3) ListMultipartUploadsRequest(input *ListMultipartUploadsInput) (req *request.Request, output *ListMultipartUploadsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations +func (c *S3) ListBucketAnalyticsConfigurationsRequest(input *ListBucketAnalyticsConfigurationsInput) (req *request.Request, output *ListBucketAnalyticsConfigurationsOutput) { op := &request.Operation{ - Name: opListMultipartUploads, + Name: opListBucketAnalyticsConfigurations, HTTPMethod: "GET", - HTTPPath: "/{Bucket}?uploads", - Paginator: &request.Paginator{ - InputTokens: []string{"KeyMarker", "UploadIdMarker"}, - OutputTokens: []string{"NextKeyMarker", "NextUploadIdMarker"}, - LimitToken: "MaxUploads", - TruncationToken: "IsTruncated", - }, + HTTPPath: "/{Bucket}?analytics", } if input == nil { - input = &ListMultipartUploadsInput{} + input = &ListBucketAnalyticsConfigurationsInput{} } - output = &ListMultipartUploadsOutput{} + output = &ListBucketAnalyticsConfigurationsOutput{} req = c.newRequest(op, input, output) return } -// ListMultipartUploads API operation for Amazon Simple Storage Service. +// ListBucketAnalyticsConfigurations API operation for Amazon Simple Storage Service. // -// This operation lists in-progress multipart uploads. +// Lists the analytics configurations for the bucket. // // 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 Simple Storage Service's -// API operation ListMultipartUploads for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads -func (c *S3) ListMultipartUploads(input *ListMultipartUploadsInput) (*ListMultipartUploadsOutput, error) { - req, out := c.ListMultipartUploadsRequest(input) +// API operation ListBucketAnalyticsConfigurations for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations +func (c *S3) ListBucketAnalyticsConfigurations(input *ListBucketAnalyticsConfigurationsInput) (*ListBucketAnalyticsConfigurationsOutput, error) { + req, out := c.ListBucketAnalyticsConfigurationsRequest(input) return out, req.Send() } -// ListMultipartUploadsWithContext is the same as ListMultipartUploads with the addition of +// ListBucketAnalyticsConfigurationsWithContext is the same as ListBucketAnalyticsConfigurations with the addition of // the ability to pass a context and additional request options. // -// See ListMultipartUploads for details on how to use this API operation. +// See ListBucketAnalyticsConfigurations 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 *S3) ListMultipartUploadsWithContext(ctx aws.Context, input *ListMultipartUploadsInput, opts ...request.Option) (*ListMultipartUploadsOutput, error) { - req, out := c.ListMultipartUploadsRequest(input) +func (c *S3) ListBucketAnalyticsConfigurationsWithContext(ctx aws.Context, input *ListBucketAnalyticsConfigurationsInput, opts ...request.Option) (*ListBucketAnalyticsConfigurationsOutput, error) { + req, out := c.ListBucketAnalyticsConfigurationsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// ListMultipartUploadsPages iterates over the pages of a ListMultipartUploads operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListMultipartUploads 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 ListMultipartUploads operation. -// pageNum := 0 -// err := client.ListMultipartUploadsPages(params, -// func(page *ListMultipartUploadsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -func (c *S3) ListMultipartUploadsPages(input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool) error { - return c.ListMultipartUploadsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListMultipartUploadsPagesWithContext same as ListMultipartUploadsPages 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 *S3) ListMultipartUploadsPagesWithContext(ctx aws.Context, input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListMultipartUploadsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListMultipartUploadsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - cont := true - for p.Next() && cont { - cont = fn(p.Page().(*ListMultipartUploadsOutput), !p.HasNextPage()) - } - return p.Err() -} - -const opListObjectVersions = "ListObjectVersions" +const opListBucketInventoryConfigurations = "ListBucketInventoryConfigurations" -// ListObjectVersionsRequest generates a "aws/request.Request" representing the -// client's request for the ListObjectVersions operation. The "output" return +// ListBucketInventoryConfigurationsRequest generates a "aws/request.Request" representing the +// client's request for the ListBucketInventoryConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 ListObjectVersions for more information on using the ListObjectVersions +// See ListBucketInventoryConfigurations for more information on using the ListBucketInventoryConfigurations // 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 ListObjectVersionsRequest method. -// req, resp := client.ListObjectVersionsRequest(params) +// // Example sending a request using the ListBucketInventoryConfigurationsRequest method. +// req, resp := client.ListBucketInventoryConfigurationsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions -func (c *S3) ListObjectVersionsRequest(input *ListObjectVersionsInput) (req *request.Request, output *ListObjectVersionsOutput) { - op := &request.Operation{ +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations +func (c *S3) ListBucketInventoryConfigurationsRequest(input *ListBucketInventoryConfigurationsInput) (req *request.Request, output *ListBucketInventoryConfigurationsOutput) { + op := &request.Operation{ + Name: opListBucketInventoryConfigurations, + HTTPMethod: "GET", + HTTPPath: "/{Bucket}?inventory", + } + + if input == nil { + input = &ListBucketInventoryConfigurationsInput{} + } + + output = &ListBucketInventoryConfigurationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListBucketInventoryConfigurations API operation for Amazon Simple Storage Service. +// +// Returns a list of inventory configurations for the bucket. +// +// 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 Simple Storage Service's +// API operation ListBucketInventoryConfigurations for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations +func (c *S3) ListBucketInventoryConfigurations(input *ListBucketInventoryConfigurationsInput) (*ListBucketInventoryConfigurationsOutput, error) { + req, out := c.ListBucketInventoryConfigurationsRequest(input) + return out, req.Send() +} + +// ListBucketInventoryConfigurationsWithContext is the same as ListBucketInventoryConfigurations with the addition of +// the ability to pass a context and additional request options. +// +// See ListBucketInventoryConfigurations 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 *S3) ListBucketInventoryConfigurationsWithContext(ctx aws.Context, input *ListBucketInventoryConfigurationsInput, opts ...request.Option) (*ListBucketInventoryConfigurationsOutput, error) { + req, out := c.ListBucketInventoryConfigurationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListBucketMetricsConfigurations = "ListBucketMetricsConfigurations" + +// ListBucketMetricsConfigurationsRequest generates a "aws/request.Request" representing the +// client's request for the ListBucketMetricsConfigurations 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 ListBucketMetricsConfigurations for more information on using the ListBucketMetricsConfigurations +// 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 ListBucketMetricsConfigurationsRequest method. +// req, resp := client.ListBucketMetricsConfigurationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations +func (c *S3) ListBucketMetricsConfigurationsRequest(input *ListBucketMetricsConfigurationsInput) (req *request.Request, output *ListBucketMetricsConfigurationsOutput) { + op := &request.Operation{ + Name: opListBucketMetricsConfigurations, + HTTPMethod: "GET", + HTTPPath: "/{Bucket}?metrics", + } + + if input == nil { + input = &ListBucketMetricsConfigurationsInput{} + } + + output = &ListBucketMetricsConfigurationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListBucketMetricsConfigurations API operation for Amazon Simple Storage Service. +// +// Lists the metrics configurations for the bucket. +// +// 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 Simple Storage Service's +// API operation ListBucketMetricsConfigurations for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations +func (c *S3) ListBucketMetricsConfigurations(input *ListBucketMetricsConfigurationsInput) (*ListBucketMetricsConfigurationsOutput, error) { + req, out := c.ListBucketMetricsConfigurationsRequest(input) + return out, req.Send() +} + +// ListBucketMetricsConfigurationsWithContext is the same as ListBucketMetricsConfigurations with the addition of +// the ability to pass a context and additional request options. +// +// See ListBucketMetricsConfigurations 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 *S3) ListBucketMetricsConfigurationsWithContext(ctx aws.Context, input *ListBucketMetricsConfigurationsInput, opts ...request.Option) (*ListBucketMetricsConfigurationsOutput, error) { + req, out := c.ListBucketMetricsConfigurationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListBuckets = "ListBuckets" + +// ListBucketsRequest generates a "aws/request.Request" representing the +// client's request for the ListBuckets 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 ListBuckets for more information on using the ListBuckets +// 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 ListBucketsRequest method. +// req, resp := client.ListBucketsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets +func (c *S3) ListBucketsRequest(input *ListBucketsInput) (req *request.Request, output *ListBucketsOutput) { + op := &request.Operation{ + Name: opListBuckets, + HTTPMethod: "GET", + HTTPPath: "/", + } + + if input == nil { + input = &ListBucketsInput{} + } + + output = &ListBucketsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListBuckets API operation for Amazon Simple Storage Service. +// +// Returns a list of all buckets owned by the authenticated sender of 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 +// the error. +// +// See the AWS API reference guide for Amazon Simple Storage Service's +// API operation ListBuckets for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets +func (c *S3) ListBuckets(input *ListBucketsInput) (*ListBucketsOutput, error) { + req, out := c.ListBucketsRequest(input) + return out, req.Send() +} + +// ListBucketsWithContext is the same as ListBuckets with the addition of +// the ability to pass a context and additional request options. +// +// See ListBuckets 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 *S3) ListBucketsWithContext(ctx aws.Context, input *ListBucketsInput, opts ...request.Option) (*ListBucketsOutput, error) { + req, out := c.ListBucketsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListMultipartUploads = "ListMultipartUploads" + +// ListMultipartUploadsRequest generates a "aws/request.Request" representing the +// client's request for the ListMultipartUploads 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 ListMultipartUploads for more information on using the ListMultipartUploads +// 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 ListMultipartUploadsRequest method. +// req, resp := client.ListMultipartUploadsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads +func (c *S3) ListMultipartUploadsRequest(input *ListMultipartUploadsInput) (req *request.Request, output *ListMultipartUploadsOutput) { + op := &request.Operation{ + Name: opListMultipartUploads, + HTTPMethod: "GET", + HTTPPath: "/{Bucket}?uploads", + Paginator: &request.Paginator{ + InputTokens: []string{"KeyMarker", "UploadIdMarker"}, + OutputTokens: []string{"NextKeyMarker", "NextUploadIdMarker"}, + LimitToken: "MaxUploads", + TruncationToken: "IsTruncated", + }, + } + + if input == nil { + input = &ListMultipartUploadsInput{} + } + + output = &ListMultipartUploadsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListMultipartUploads API operation for Amazon Simple Storage Service. +// +// This operation lists in-progress multipart uploads. +// +// 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 Simple Storage Service's +// API operation ListMultipartUploads for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads +func (c *S3) ListMultipartUploads(input *ListMultipartUploadsInput) (*ListMultipartUploadsOutput, error) { + req, out := c.ListMultipartUploadsRequest(input) + return out, req.Send() +} + +// ListMultipartUploadsWithContext is the same as ListMultipartUploads with the addition of +// the ability to pass a context and additional request options. +// +// See ListMultipartUploads 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 *S3) ListMultipartUploadsWithContext(ctx aws.Context, input *ListMultipartUploadsInput, opts ...request.Option) (*ListMultipartUploadsOutput, error) { + req, out := c.ListMultipartUploadsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListMultipartUploadsPages iterates over the pages of a ListMultipartUploads operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListMultipartUploads 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 ListMultipartUploads operation. +// pageNum := 0 +// err := client.ListMultipartUploadsPages(params, +// func(page *ListMultipartUploadsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *S3) ListMultipartUploadsPages(input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool) error { + return c.ListMultipartUploadsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListMultipartUploadsPagesWithContext same as ListMultipartUploadsPages 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 *S3) ListMultipartUploadsPagesWithContext(ctx aws.Context, input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListMultipartUploadsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListMultipartUploadsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListMultipartUploadsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListObjectVersions = "ListObjectVersions" + +// ListObjectVersionsRequest generates a "aws/request.Request" representing the +// client's request for the ListObjectVersions 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 ListObjectVersions for more information on using the ListObjectVersions +// 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 ListObjectVersionsRequest method. +// req, resp := client.ListObjectVersionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions +func (c *S3) ListObjectVersionsRequest(input *ListObjectVersionsInput) (req *request.Request, output *ListObjectVersionsOutput) { + op := &request.Operation{ Name: opListObjectVersions, HTTPMethod: "GET", HTTPPath: "/{Bucket}?versions", @@ -3942,7 +4384,7 @@ const opListObjects = "ListObjects" // ListObjectsRequest generates a "aws/request.Request" representing the // client's request for the ListObjects operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4079,7 +4521,7 @@ const opListObjectsV2 = "ListObjectsV2" // ListObjectsV2Request generates a "aws/request.Request" representing the // client's request for the ListObjectsV2 operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4217,7 +4659,7 @@ const opListParts = "ListParts" // ListPartsRequest generates a "aws/request.Request" representing the // client's request for the ListParts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4347,7 +4789,7 @@ const opPutBucketAccelerateConfiguration = "PutBucketAccelerateConfiguration" // PutBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the // client's request for the PutBucketAccelerateConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4381,8 +4823,7 @@ func (c *S3) PutBucketAccelerateConfigurationRequest(input *PutBucketAccelerateC output = &PutBucketAccelerateConfigurationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4423,7 +4864,7 @@ const opPutBucketAcl = "PutBucketAcl" // PutBucketAclRequest generates a "aws/request.Request" representing the // client's request for the PutBucketAcl operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4457,8 +4898,7 @@ func (c *S3) PutBucketAclRequest(input *PutBucketAclInput) (req *request.Request output = &PutBucketAclOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4499,7 +4939,7 @@ const opPutBucketAnalyticsConfiguration = "PutBucketAnalyticsConfiguration" // PutBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the // client's request for the PutBucketAnalyticsConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4533,8 +4973,7 @@ func (c *S3) PutBucketAnalyticsConfigurationRequest(input *PutBucketAnalyticsCon output = &PutBucketAnalyticsConfigurationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4576,7 +5015,7 @@ const opPutBucketCors = "PutBucketCors" // PutBucketCorsRequest generates a "aws/request.Request" representing the // client's request for the PutBucketCors operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4610,14 +5049,13 @@ func (c *S3) PutBucketCorsRequest(input *PutBucketCorsInput) (req *request.Reque output = &PutBucketCorsOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // PutBucketCors API operation for Amazon Simple Storage Service. // -// Sets the cors configuration for a bucket. +// Sets the CORS configuration for a bucket. // // 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 @@ -4652,7 +5090,7 @@ const opPutBucketEncryption = "PutBucketEncryption" // PutBucketEncryptionRequest generates a "aws/request.Request" representing the // client's request for the PutBucketEncryption operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4686,8 +5124,7 @@ func (c *S3) PutBucketEncryptionRequest(input *PutBucketEncryptionInput) (req *r output = &PutBucketEncryptionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4729,7 +5166,7 @@ const opPutBucketInventoryConfiguration = "PutBucketInventoryConfiguration" // PutBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the // client's request for the PutBucketInventoryConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4763,8 +5200,7 @@ func (c *S3) PutBucketInventoryConfigurationRequest(input *PutBucketInventoryCon output = &PutBucketInventoryConfigurationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4806,7 +5242,7 @@ const opPutBucketLifecycle = "PutBucketLifecycle" // PutBucketLifecycleRequest generates a "aws/request.Request" representing the // client's request for the PutBucketLifecycle operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4845,8 +5281,7 @@ func (c *S3) PutBucketLifecycleRequest(input *PutBucketLifecycleInput) (req *req output = &PutBucketLifecycleOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4891,7 +5326,7 @@ const opPutBucketLifecycleConfiguration = "PutBucketLifecycleConfiguration" // PutBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the // client's request for the PutBucketLifecycleConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4925,8 +5360,7 @@ func (c *S3) PutBucketLifecycleConfigurationRequest(input *PutBucketLifecycleCon output = &PutBucketLifecycleConfigurationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4968,7 +5402,7 @@ const opPutBucketLogging = "PutBucketLogging" // PutBucketLoggingRequest generates a "aws/request.Request" representing the // client's request for the PutBucketLogging operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5002,8 +5436,7 @@ func (c *S3) PutBucketLoggingRequest(input *PutBucketLoggingInput) (req *request output = &PutBucketLoggingOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5046,7 +5479,7 @@ const opPutBucketMetricsConfiguration = "PutBucketMetricsConfiguration" // PutBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the // client's request for the PutBucketMetricsConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5080,8 +5513,7 @@ func (c *S3) PutBucketMetricsConfigurationRequest(input *PutBucketMetricsConfigu output = &PutBucketMetricsConfigurationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5123,7 +5555,7 @@ const opPutBucketNotification = "PutBucketNotification" // PutBucketNotificationRequest generates a "aws/request.Request" representing the // client's request for the PutBucketNotification operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5162,8 +5594,7 @@ func (c *S3) PutBucketNotificationRequest(input *PutBucketNotificationInput) (re output = &PutBucketNotificationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5208,7 +5639,7 @@ const opPutBucketNotificationConfiguration = "PutBucketNotificationConfiguration // PutBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the // client's request for the PutBucketNotificationConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5242,8 +5673,7 @@ func (c *S3) PutBucketNotificationConfigurationRequest(input *PutBucketNotificat output = &PutBucketNotificationConfigurationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5284,7 +5714,7 @@ const opPutBucketPolicy = "PutBucketPolicy" // PutBucketPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutBucketPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5318,8 +5748,7 @@ func (c *S3) PutBucketPolicyRequest(input *PutBucketPolicyInput) (req *request.R output = &PutBucketPolicyOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5361,7 +5790,7 @@ const opPutBucketReplication = "PutBucketReplication" // PutBucketReplicationRequest generates a "aws/request.Request" representing the // client's request for the PutBucketReplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5395,15 +5824,15 @@ func (c *S3) PutBucketReplicationRequest(input *PutBucketReplicationInput) (req output = &PutBucketReplicationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // PutBucketReplication API operation for Amazon Simple Storage Service. // -// Creates a new replication configuration (or replaces an existing one, if -// present). +// Creates a replication configuration or replaces an existing one. For more +// information, see Cross-Region Replication (CRR) ( https://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html) +// in the Amazon S3 Developer 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 @@ -5438,7 +5867,7 @@ const opPutBucketRequestPayment = "PutBucketRequestPayment" // PutBucketRequestPaymentRequest generates a "aws/request.Request" representing the // client's request for the PutBucketRequestPayment operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5472,8 +5901,7 @@ func (c *S3) PutBucketRequestPaymentRequest(input *PutBucketRequestPaymentInput) output = &PutBucketRequestPaymentOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5518,7 +5946,7 @@ const opPutBucketTagging = "PutBucketTagging" // PutBucketTaggingRequest generates a "aws/request.Request" representing the // client's request for the PutBucketTagging operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5552,8 +5980,7 @@ func (c *S3) PutBucketTaggingRequest(input *PutBucketTaggingInput) (req *request output = &PutBucketTaggingOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5594,7 +6021,7 @@ const opPutBucketVersioning = "PutBucketVersioning" // PutBucketVersioningRequest generates a "aws/request.Request" representing the // client's request for the PutBucketVersioning operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5628,8 +6055,7 @@ func (c *S3) PutBucketVersioningRequest(input *PutBucketVersioningInput) (req *r output = &PutBucketVersioningOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5671,7 +6097,7 @@ const opPutBucketWebsite = "PutBucketWebsite" // PutBucketWebsiteRequest generates a "aws/request.Request" representing the // client's request for the PutBucketWebsite operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5705,8 +6131,7 @@ func (c *S3) PutBucketWebsiteRequest(input *PutBucketWebsiteInput) (req *request output = &PutBucketWebsiteOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5747,7 +6172,7 @@ const opPutObject = "PutObject" // PutObjectRequest generates a "aws/request.Request" representing the // client's request for the PutObject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5821,7 +6246,7 @@ const opPutObjectAcl = "PutObjectAcl" // PutObjectAclRequest generates a "aws/request.Request" representing the // client's request for the PutObjectAcl operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5896,12 +6321,236 @@ func (c *S3) PutObjectAclWithContext(ctx aws.Context, input *PutObjectAclInput, return out, req.Send() } +const opPutObjectLegalHold = "PutObjectLegalHold" + +// PutObjectLegalHoldRequest generates a "aws/request.Request" representing the +// client's request for the PutObjectLegalHold 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 PutObjectLegalHold for more information on using the PutObjectLegalHold +// 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 PutObjectLegalHoldRequest method. +// req, resp := client.PutObjectLegalHoldRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLegalHold +func (c *S3) PutObjectLegalHoldRequest(input *PutObjectLegalHoldInput) (req *request.Request, output *PutObjectLegalHoldOutput) { + op := &request.Operation{ + Name: opPutObjectLegalHold, + HTTPMethod: "PUT", + HTTPPath: "/{Bucket}/{Key+}?legal-hold", + } + + if input == nil { + input = &PutObjectLegalHoldInput{} + } + + output = &PutObjectLegalHoldOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutObjectLegalHold API operation for Amazon Simple Storage Service. +// +// Applies a Legal Hold configuration to the specified object. +// +// 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 Simple Storage Service's +// API operation PutObjectLegalHold for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLegalHold +func (c *S3) PutObjectLegalHold(input *PutObjectLegalHoldInput) (*PutObjectLegalHoldOutput, error) { + req, out := c.PutObjectLegalHoldRequest(input) + return out, req.Send() +} + +// PutObjectLegalHoldWithContext is the same as PutObjectLegalHold with the addition of +// the ability to pass a context and additional request options. +// +// See PutObjectLegalHold 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 *S3) PutObjectLegalHoldWithContext(ctx aws.Context, input *PutObjectLegalHoldInput, opts ...request.Option) (*PutObjectLegalHoldOutput, error) { + req, out := c.PutObjectLegalHoldRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutObjectLockConfiguration = "PutObjectLockConfiguration" + +// PutObjectLockConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the PutObjectLockConfiguration 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 PutObjectLockConfiguration for more information on using the PutObjectLockConfiguration +// 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 PutObjectLockConfigurationRequest method. +// req, resp := client.PutObjectLockConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLockConfiguration +func (c *S3) PutObjectLockConfigurationRequest(input *PutObjectLockConfigurationInput) (req *request.Request, output *PutObjectLockConfigurationOutput) { + op := &request.Operation{ + Name: opPutObjectLockConfiguration, + HTTPMethod: "PUT", + HTTPPath: "/{Bucket}?object-lock", + } + + if input == nil { + input = &PutObjectLockConfigurationInput{} + } + + output = &PutObjectLockConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutObjectLockConfiguration API operation for Amazon Simple Storage Service. +// +// Places an Object Lock configuration on the specified bucket. The rule specified +// in the Object Lock configuration will be applied by default to every new +// object placed in the specified bucket. +// +// 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 Simple Storage Service's +// API operation PutObjectLockConfiguration for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLockConfiguration +func (c *S3) PutObjectLockConfiguration(input *PutObjectLockConfigurationInput) (*PutObjectLockConfigurationOutput, error) { + req, out := c.PutObjectLockConfigurationRequest(input) + return out, req.Send() +} + +// PutObjectLockConfigurationWithContext is the same as PutObjectLockConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See PutObjectLockConfiguration 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 *S3) PutObjectLockConfigurationWithContext(ctx aws.Context, input *PutObjectLockConfigurationInput, opts ...request.Option) (*PutObjectLockConfigurationOutput, error) { + req, out := c.PutObjectLockConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutObjectRetention = "PutObjectRetention" + +// PutObjectRetentionRequest generates a "aws/request.Request" representing the +// client's request for the PutObjectRetention 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 PutObjectRetention for more information on using the PutObjectRetention +// 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 PutObjectRetentionRequest method. +// req, resp := client.PutObjectRetentionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectRetention +func (c *S3) PutObjectRetentionRequest(input *PutObjectRetentionInput) (req *request.Request, output *PutObjectRetentionOutput) { + op := &request.Operation{ + Name: opPutObjectRetention, + HTTPMethod: "PUT", + HTTPPath: "/{Bucket}/{Key+}?retention", + } + + if input == nil { + input = &PutObjectRetentionInput{} + } + + output = &PutObjectRetentionOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutObjectRetention API operation for Amazon Simple Storage Service. +// +// Places an Object Retention configuration on an object. +// +// 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 Simple Storage Service's +// API operation PutObjectRetention for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectRetention +func (c *S3) PutObjectRetention(input *PutObjectRetentionInput) (*PutObjectRetentionOutput, error) { + req, out := c.PutObjectRetentionRequest(input) + return out, req.Send() +} + +// PutObjectRetentionWithContext is the same as PutObjectRetention with the addition of +// the ability to pass a context and additional request options. +// +// See PutObjectRetention 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 *S3) PutObjectRetentionWithContext(ctx aws.Context, input *PutObjectRetentionInput, opts ...request.Option) (*PutObjectRetentionOutput, error) { + req, out := c.PutObjectRetentionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPutObjectTagging = "PutObjectTagging" // PutObjectTaggingRequest generates a "aws/request.Request" representing the // client's request for the PutObjectTagging operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5921,50 +6570,126 @@ const opPutObjectTagging = "PutObjectTagging" // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging -func (c *S3) PutObjectTaggingRequest(input *PutObjectTaggingInput) (req *request.Request, output *PutObjectTaggingOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging +func (c *S3) PutObjectTaggingRequest(input *PutObjectTaggingInput) (req *request.Request, output *PutObjectTaggingOutput) { + op := &request.Operation{ + Name: opPutObjectTagging, + HTTPMethod: "PUT", + HTTPPath: "/{Bucket}/{Key+}?tagging", + } + + if input == nil { + input = &PutObjectTaggingInput{} + } + + output = &PutObjectTaggingOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutObjectTagging API operation for Amazon Simple Storage Service. +// +// Sets the supplied tag-set to an object that already exists in a bucket +// +// 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 Simple Storage Service's +// API operation PutObjectTagging for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging +func (c *S3) PutObjectTagging(input *PutObjectTaggingInput) (*PutObjectTaggingOutput, error) { + req, out := c.PutObjectTaggingRequest(input) + return out, req.Send() +} + +// PutObjectTaggingWithContext is the same as PutObjectTagging with the addition of +// the ability to pass a context and additional request options. +// +// See PutObjectTagging 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 *S3) PutObjectTaggingWithContext(ctx aws.Context, input *PutObjectTaggingInput, opts ...request.Option) (*PutObjectTaggingOutput, error) { + req, out := c.PutObjectTaggingRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutPublicAccessBlock = "PutPublicAccessBlock" + +// PutPublicAccessBlockRequest generates a "aws/request.Request" representing the +// client's request for the PutPublicAccessBlock 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 PutPublicAccessBlock for more information on using the PutPublicAccessBlock +// 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 PutPublicAccessBlockRequest method. +// req, resp := client.PutPublicAccessBlockRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutPublicAccessBlock +func (c *S3) PutPublicAccessBlockRequest(input *PutPublicAccessBlockInput) (req *request.Request, output *PutPublicAccessBlockOutput) { op := &request.Operation{ - Name: opPutObjectTagging, + Name: opPutPublicAccessBlock, HTTPMethod: "PUT", - HTTPPath: "/{Bucket}/{Key+}?tagging", + HTTPPath: "/{Bucket}?publicAccessBlock", } if input == nil { - input = &PutObjectTaggingInput{} + input = &PutPublicAccessBlockInput{} } - output = &PutObjectTaggingOutput{} + output = &PutPublicAccessBlockOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// PutObjectTagging API operation for Amazon Simple Storage Service. +// PutPublicAccessBlock API operation for Amazon Simple Storage Service. // -// Sets the supplied tag-set to an object that already exists in a bucket +// Creates or modifies the PublicAccessBlock configuration for an Amazon S3 +// bucket. // // 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 Simple Storage Service's -// API operation PutObjectTagging for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging -func (c *S3) PutObjectTagging(input *PutObjectTaggingInput) (*PutObjectTaggingOutput, error) { - req, out := c.PutObjectTaggingRequest(input) +// API operation PutPublicAccessBlock for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutPublicAccessBlock +func (c *S3) PutPublicAccessBlock(input *PutPublicAccessBlockInput) (*PutPublicAccessBlockOutput, error) { + req, out := c.PutPublicAccessBlockRequest(input) return out, req.Send() } -// PutObjectTaggingWithContext is the same as PutObjectTagging with the addition of +// PutPublicAccessBlockWithContext is the same as PutPublicAccessBlock with the addition of // the ability to pass a context and additional request options. // -// See PutObjectTagging for details on how to use this API operation. +// See PutPublicAccessBlock 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 *S3) PutObjectTaggingWithContext(ctx aws.Context, input *PutObjectTaggingInput, opts ...request.Option) (*PutObjectTaggingOutput, error) { - req, out := c.PutObjectTaggingRequest(input) +func (c *S3) PutPublicAccessBlockWithContext(ctx aws.Context, input *PutPublicAccessBlockInput, opts ...request.Option) (*PutPublicAccessBlockOutput, error) { + req, out := c.PutPublicAccessBlockRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() @@ -5975,7 +6700,7 @@ const opRestoreObject = "RestoreObject" // RestoreObjectRequest generates a "aws/request.Request" representing the // client's request for the RestoreObject operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6054,7 +6779,7 @@ const opSelectObjectContent = "SelectObjectContent" // SelectObjectContentRequest generates a "aws/request.Request" representing the // client's request for the SelectObjectContent operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6136,7 +6861,7 @@ const opUploadPart = "UploadPart" // UploadPartRequest generates a "aws/request.Request" representing the // client's request for the UploadPart operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6216,7 +6941,7 @@ const opUploadPartCopy = "UploadPartCopy" // UploadPartCopyRequest generates a "aws/request.Request" representing the // client's request for the UploadPartCopy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6346,6 +7071,9 @@ func (s *AbortMultipartUploadInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } @@ -6491,7 +7219,7 @@ func (s *AccessControlPolicy) SetOwner(v *Owner) *AccessControlPolicy { return s } -// Container for information regarding the access control for replicas. +// A container for information about access control for replicas. type AccessControlTranslation struct { _ struct{} `type:"structure"` @@ -7096,11 +7824,11 @@ type CSVInput struct { // to TRUE may lower performance. AllowQuotedRecordDelimiter *bool `type:"boolean"` - // Single character used to indicate a row should be ignored when present at - // the start of a row. + // The single character used to indicate a row should be ignored when present + // at the start of a row. Comments *string `type:"string"` - // Value used to separate individual fields in a record. + // The value used to separate individual fields in a record. FieldDelimiter *string `type:"string"` // Describes the first line of input. Valid values: None, Ignore, Use. @@ -7109,11 +7837,11 @@ type CSVInput struct { // Value used for escaping where the field delimiter is part of the value. QuoteCharacter *string `type:"string"` - // Single character used for escaping the quote character inside an already + // The single character used for escaping the quote character inside an already // escaped value. QuoteEscapeCharacter *string `type:"string"` - // Value used to separate individual records. + // The value used to separate individual records. RecordDelimiter *string `type:"string"` } @@ -7173,20 +7901,20 @@ func (s *CSVInput) SetRecordDelimiter(v string) *CSVInput { type CSVOutput struct { _ struct{} `type:"structure"` - // Value used to separate individual fields in a record. + // The value used to separate individual fields in a record. FieldDelimiter *string `type:"string"` - // Value used for escaping where the field delimiter is part of the value. + // The value used for escaping where the field delimiter is part of the value. QuoteCharacter *string `type:"string"` - // Single character used for escaping the quote character inside an already + // Th single character used for escaping the quote character inside an already // escaped value. QuoteEscapeCharacter *string `type:"string"` // Indicates whether or not all output fields should be quoted. QuoteFields *string `type:"string" enum:"QuoteFields"` - // Value used to separate individual records. + // The value used to separate individual records. RecordDelimiter *string `type:"string"` } @@ -7235,14 +7963,14 @@ type CloudFunctionConfiguration struct { CloudFunction *string `type:"string"` - // Bucket event for which to send notifications. + // The bucket event for which to send notifications. // // Deprecated: Event has been deprecated Event *string `deprecated:"true" type:"string" enum:"Event"` Events []*string `locationName:"Event" type:"list" flattened:"true"` - // Optional unique identifier for configurations in a notification configuration. + // An optional unique identifier for configurations in a notification configuration. // If you don't provide one, Amazon S3 will assign an ID. Id *string `type:"string"` @@ -7348,6 +8076,9 @@ func (s *CompleteMultipartUploadInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } @@ -7423,7 +8154,7 @@ type CompleteMultipartUploadOutput struct { // If present, specifies the ID of the AWS Key Management Service (KMS) master // encryption key that was used for the object. - SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"` + SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` // The Server-side encryption algorithm used when storing this object in S3 // (e.g., AES256, aws:kms). @@ -7678,7 +8409,7 @@ type CopyObjectInput struct { // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt // the source object. The encryption key provided in this header must be one // that was used when the source object was created. - CopySourceSSECustomerKey *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string"` + CopySourceSSECustomerKey *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string" sensitive:"true"` // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. // Amazon S3 uses this header for a message integrity check to ensure the encryption @@ -7710,6 +8441,15 @@ type CopyObjectInput struct { // with metadata provided in the request. MetadataDirective *string `location:"header" locationName:"x-amz-metadata-directive" type:"string" enum:"MetadataDirective"` + // Specifies whether you want to apply a Legal Hold to the copied object. + ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"` + + // The Object Lock mode that you want to apply to the copied object. + ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"` + + // The date and time when you want the copied object's Object Lock to expire. + ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"` + // Confirms that the requester knows that she or he will be charged for the // request. Bucket owners need not specify this parameter in their requests. // Documentation on downloading objects from requester pays buckets can be found @@ -7724,7 +8464,7 @@ type CopyObjectInput struct { // does not store the encryption key. The key must be appropriate for use with // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm // header. - SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"` + SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"` // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. // Amazon S3 uses this header for a message integrity check to ensure the encryption @@ -7735,7 +8475,7 @@ type CopyObjectInput struct { // requests for an object protected by AWS KMS will fail if not made via SSL // or using SigV4. Documentation on configuring any of the officially supported // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version - SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"` + SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` // The Server-side encryption algorithm used when storing this object in S3 // (e.g., AES256, aws:kms). @@ -7775,6 +8515,9 @@ func (s *CopyObjectInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.CopySource == nil { invalidParams.Add(request.NewErrParamRequired("CopySource")) } @@ -7943,6 +8686,24 @@ func (s *CopyObjectInput) SetMetadataDirective(v string) *CopyObjectInput { return s } +// SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value. +func (s *CopyObjectInput) SetObjectLockLegalHoldStatus(v string) *CopyObjectInput { + s.ObjectLockLegalHoldStatus = &v + return s +} + +// SetObjectLockMode sets the ObjectLockMode field's value. +func (s *CopyObjectInput) SetObjectLockMode(v string) *CopyObjectInput { + s.ObjectLockMode = &v + return s +} + +// SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value. +func (s *CopyObjectInput) SetObjectLockRetainUntilDate(v time.Time) *CopyObjectInput { + s.ObjectLockRetainUntilDate = &v + return s +} + // SetRequestPayer sets the RequestPayer field's value. func (s *CopyObjectInput) SetRequestPayer(v string) *CopyObjectInput { s.RequestPayer = &v @@ -8036,7 +8797,7 @@ type CopyObjectOutput struct { // If present, specifies the ID of the AWS Key Management Service (KMS) master // encryption key that was used for the object. - SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"` + SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` // The Server-side encryption algorithm used when storing this object in S3 // (e.g., AES256, aws:kms). @@ -8222,6 +8983,9 @@ type CreateBucketInput struct { // Allows grantee to write the ACL for the applicable bucket. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"` + + // Specifies whether you want S3 Object Lock to be enabled for the new bucket. + ObjectLockEnabledForBucket *bool `location:"header" locationName:"x-amz-bucket-object-lock-enabled" type:"boolean"` } // String returns the string representation @@ -8240,6 +9004,9 @@ func (s *CreateBucketInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -8302,6 +9069,12 @@ func (s *CreateBucketInput) SetGrantWriteACP(v string) *CreateBucketInput { return s } +// SetObjectLockEnabledForBucket sets the ObjectLockEnabledForBucket field's value. +func (s *CreateBucketInput) SetObjectLockEnabledForBucket(v bool) *CreateBucketInput { + s.ObjectLockEnabledForBucket = &v + return s +} + type CreateBucketOutput struct { _ struct{} `type:"structure"` @@ -8371,6 +9144,15 @@ type CreateMultipartUploadInput struct { // A map of metadata to store with the object in S3. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"` + // Specifies whether you want to apply a Legal Hold to the uploaded object. + ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"` + + // Specifies the Object Lock mode that you want to apply to the uploaded object. + ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"` + + // Specifies the date and time when you want the Object Lock to expire. + ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"` + // Confirms that the requester knows that she or he will be charged for the // request. Bucket owners need not specify this parameter in their requests. // Documentation on downloading objects from requester pays buckets can be found @@ -8385,7 +9167,7 @@ type CreateMultipartUploadInput struct { // does not store the encryption key. The key must be appropriate for use with // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm // header. - SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"` + SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"` // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. // Amazon S3 uses this header for a message integrity check to ensure the encryption @@ -8396,7 +9178,7 @@ type CreateMultipartUploadInput struct { // requests for an object protected by AWS KMS will fail if not made via SSL // or using SigV4. Documentation on configuring any of the officially supported // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version - SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"` + SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` // The Server-side encryption algorithm used when storing this object in S3 // (e.g., AES256, aws:kms). @@ -8430,6 +9212,9 @@ func (s *CreateMultipartUploadInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } @@ -8534,6 +9319,24 @@ func (s *CreateMultipartUploadInput) SetMetadata(v map[string]*string) *CreateMu return s } +// SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value. +func (s *CreateMultipartUploadInput) SetObjectLockLegalHoldStatus(v string) *CreateMultipartUploadInput { + s.ObjectLockLegalHoldStatus = &v + return s +} + +// SetObjectLockMode sets the ObjectLockMode field's value. +func (s *CreateMultipartUploadInput) SetObjectLockMode(v string) *CreateMultipartUploadInput { + s.ObjectLockMode = &v + return s +} + +// SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value. +func (s *CreateMultipartUploadInput) SetObjectLockRetainUntilDate(v time.Time) *CreateMultipartUploadInput { + s.ObjectLockRetainUntilDate = &v + return s +} + // SetRequestPayer sets the RequestPayer field's value. func (s *CreateMultipartUploadInput) SetRequestPayer(v string) *CreateMultipartUploadInput { s.RequestPayer = &v @@ -8627,7 +9430,7 @@ type CreateMultipartUploadOutput struct { // If present, specifies the ID of the AWS Key Management Service (KMS) master // encryption key that was used for the object. - SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"` + SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` // The Server-side encryption algorithm used when storing this object in S3 // (e.g., AES256, aws:kms). @@ -8714,6 +9517,50 @@ func (s *CreateMultipartUploadOutput) SetUploadId(v string) *CreateMultipartUplo return s } +// The container element for specifying the default Object Lock retention settings +// for new objects placed in the specified bucket. +type DefaultRetention struct { + _ struct{} `type:"structure"` + + // The number of days that you want to specify for the default retention period. + Days *int64 `type:"integer"` + + // The default Object Lock retention mode you want to apply to new objects placed + // in the specified bucket. + Mode *string `type:"string" enum:"ObjectLockRetentionMode"` + + // The number of years that you want to specify for the default retention period. + Years *int64 `type:"integer"` +} + +// String returns the string representation +func (s DefaultRetention) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DefaultRetention) GoString() string { + return s.String() +} + +// SetDays sets the Days field's value. +func (s *DefaultRetention) SetDays(v int64) *DefaultRetention { + s.Days = &v + return s +} + +// SetMode sets the Mode field's value. +func (s *DefaultRetention) SetMode(v string) *DefaultRetention { + s.Mode = &v + return s +} + +// SetYears sets the Years field's value. +func (s *DefaultRetention) SetYears(v int64) *DefaultRetention { + s.Years = &v + return s +} + type Delete struct { _ struct{} `type:"structure"` @@ -8800,6 +9647,9 @@ func (s *DeleteBucketAnalyticsConfigurationInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } @@ -8866,6 +9716,9 @@ func (s *DeleteBucketCorsInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -8926,6 +9779,9 @@ func (s *DeleteBucketEncryptionInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -8983,6 +9839,9 @@ func (s *DeleteBucketInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -9033,6 +9892,9 @@ func (s *DeleteBucketInventoryConfigurationInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } @@ -9099,6 +9961,9 @@ func (s *DeleteBucketLifecycleInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -9163,6 +10028,9 @@ func (s *DeleteBucketMetricsConfigurationInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } @@ -9243,6 +10111,9 @@ func (s *DeleteBucketPolicyInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -9280,6 +10151,11 @@ func (s DeleteBucketPolicyOutput) GoString() string { type DeleteBucketReplicationInput struct { _ struct{} `type:"structure"` + // The bucket name. + // + // It can take a while to propagate the deletion of a replication configuration + // to all Amazon S3 systems. + // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` } @@ -9300,6 +10176,9 @@ func (s *DeleteBucketReplicationInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -9357,6 +10236,9 @@ func (s *DeleteBucketTaggingInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -9414,6 +10296,9 @@ func (s *DeleteBucketWebsiteInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -9507,12 +10392,43 @@ func (s *DeleteMarkerEntry) SetVersionId(v string) *DeleteMarkerEntry { return s } +// Specifies whether Amazon S3 should replicate delete makers. +type DeleteMarkerReplication struct { + _ struct{} `type:"structure"` + + // The status of the delete marker replication. + // + // In the current implementation, Amazon S3 doesn't replicate the delete markers. + // The status must be Disabled. + Status *string `type:"string" enum:"DeleteMarkerReplicationStatus"` +} + +// String returns the string representation +func (s DeleteMarkerReplication) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteMarkerReplication) GoString() string { + return s.String() +} + +// SetStatus sets the Status field's value. +func (s *DeleteMarkerReplication) SetStatus(v string) *DeleteMarkerReplication { + s.Status = &v + return s +} + type DeleteObjectInput struct { _ struct{} `type:"structure"` // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` + // Indicates whether S3 Object Lock should bypass Governance-mode restrictions + // to process this operation. + BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"` + // Key is a required field Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` @@ -9546,6 +10462,9 @@ func (s *DeleteObjectInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } @@ -9572,6 +10491,12 @@ func (s *DeleteObjectInput) getBucket() (v string) { return *s.Bucket } +// SetBypassGovernanceRetention sets the BypassGovernanceRetention field's value. +func (s *DeleteObjectInput) SetBypassGovernanceRetention(v bool) *DeleteObjectInput { + s.BypassGovernanceRetention = &v + return s +} + // SetKey sets the Key field's value. func (s *DeleteObjectInput) SetKey(v string) *DeleteObjectInput { s.Key = &v @@ -9669,6 +10594,9 @@ func (s *DeleteObjectTaggingInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } @@ -9736,6 +10664,11 @@ type DeleteObjectsInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` + // Specifies whether you want to delete this object even if it has a Governance-type + // Object Lock in place. You must have sufficient permissions to perform this + // operation. + BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"` + // Delete is a required field Delete *Delete `locationName:"Delete" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` @@ -9766,6 +10699,9 @@ func (s *DeleteObjectsInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.Delete == nil { invalidParams.Add(request.NewErrParamRequired("Delete")) } @@ -9794,6 +10730,12 @@ func (s *DeleteObjectsInput) getBucket() (v string) { return *s.Bucket } +// SetBypassGovernanceRetention sets the BypassGovernanceRetention field's value. +func (s *DeleteObjectsInput) SetBypassGovernanceRetention(v bool) *DeleteObjectsInput { + s.BypassGovernanceRetention = &v + return s +} + // SetDelete sets the Delete field's value. func (s *DeleteObjectsInput) SetDelete(v *Delete) *DeleteObjectsInput { s.Delete = v @@ -9852,6 +10794,68 @@ func (s *DeleteObjectsOutput) SetRequestCharged(v string) *DeleteObjectsOutput { return s } +type DeletePublicAccessBlockInput struct { + _ struct{} `type:"structure"` + + // The Amazon S3 bucket whose PublicAccessBlock configuration you want to delete. + // + // Bucket is a required field + Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeletePublicAccessBlockInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePublicAccessBlockInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeletePublicAccessBlockInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeletePublicAccessBlockInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBucket sets the Bucket field's value. +func (s *DeletePublicAccessBlockInput) SetBucket(v string) *DeletePublicAccessBlockInput { + s.Bucket = &v + return s +} + +func (s *DeletePublicAccessBlockInput) getBucket() (v string) { + if s.Bucket == nil { + return v + } + return *s.Bucket +} + +type DeletePublicAccessBlockOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeletePublicAccessBlockOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeletePublicAccessBlockOutput) GoString() string { + return s.String() +} + type DeletedObject struct { _ struct{} `type:"structure"` @@ -9898,27 +10902,43 @@ func (s *DeletedObject) SetVersionId(v string) *DeletedObject { return s } -// Container for replication destination information. +// A container for information about the replication destination. type Destination struct { _ struct{} `type:"structure"` - // Container for information regarding the access control for replicas. + // A container for information about access control for replicas. + // + // Use this element only in a cross-account scenario where source and destination + // bucket owners are not the same to change replica ownership to the AWS account + // that owns the destination bucket. If you don't add this element to the replication + // configuration, the replicas are owned by same AWS account that owns the source + // object. AccessControlTranslation *AccessControlTranslation `type:"structure"` - // Account ID of the destination bucket. Currently this is only being verified - // if Access Control Translation is enabled + // The account ID of the destination bucket. Currently, Amazon S3 verifies this + // value only if Access Control Translation is enabled. + // + // In a cross-account scenario, if you change replica ownership to the AWS account + // that owns the destination bucket by adding the AccessControlTranslation element, + // this is the account ID of the owner of the destination bucket. Account *string `type:"string"` - // Amazon resource name (ARN) of the bucket where you want Amazon S3 to store - // replicas of the object identified by the rule. + // The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to + // store replicas of the object identified by the rule. + // + // If there are multiple rules in your replication configuration, all rules + // must specify the same bucket as the destination. A replication configuration + // can replicate objects to only one destination bucket. // // Bucket is a required field Bucket *string `type:"string" required:"true"` - // Container for information regarding encryption based configuration for replicas. + // A container that provides information about encryption. If SourceSelectionCriteria + // is specified, you must specify this element. EncryptionConfiguration *EncryptionConfiguration `type:"structure"` - // The class of storage used to store the object. + // The class of storage used to store the object. By default Amazon S3 uses + // storage class of the source object when creating a replica. StorageClass *string `type:"string" enum:"StorageClass"` } @@ -10004,7 +11024,7 @@ type Encryption struct { // If the encryption type is aws:kms, this optional value specifies the AWS // KMS key ID to use for encryption of job results. - KMSKeyId *string `type:"string"` + KMSKeyId *string `type:"string" sensitive:"true"` } // String returns the string representation @@ -10048,11 +11068,13 @@ func (s *Encryption) SetKMSKeyId(v string) *Encryption { return s } -// Container for information regarding encryption based configuration for replicas. +// A container for information about the encryption-based configuration for +// replicas. type EncryptionConfiguration struct { _ struct{} `type:"structure"` - // The id of the KMS key used to encrypt the replica object. + // The ID of the AWS KMS key for the AWS Region where the destination bucket + // resides. Amazon S3 uses this key to encrypt the replica object. ReplicaKmsKeyID *string `type:"string"` } @@ -10185,14 +11207,15 @@ func (s *ErrorDocument) SetKey(v string) *ErrorDocument { return s } -// Container for key value pair that defines the criteria for the filter rule. +// A container for a key value pair that defines the criteria for the filter +// rule. type FilterRule struct { _ struct{} `type:"structure"` - // Object key name prefix or suffix identifying one or more objects to which - // the filtering rule applies. Maximum prefix length can be up to 1,024 characters. + // The object key name prefix or suffix identifying one or more objects to which + // the filtering rule applies. The maximum prefix length is 1,024 characters. // Overlapping prefixes and suffixes are not supported. For more information, - // go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) + // see Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) // in the Amazon Simple Storage Service Developer Guide. Name *string `type:"string" enum:"FilterRuleName"` @@ -10246,6 +11269,9 @@ func (s *GetBucketAccelerateConfigurationInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -10312,6 +11338,9 @@ func (s *GetBucketAclInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -10393,6 +11422,9 @@ func (s *GetBucketAnalyticsConfigurationInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } @@ -10468,6 +11500,9 @@ func (s *GetBucketCorsInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -10536,6 +11571,9 @@ func (s *GetBucketEncryptionInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -10610,6 +11648,9 @@ func (s *GetBucketInventoryConfigurationInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } @@ -10685,6 +11726,9 @@ func (s *GetBucketLifecycleConfigurationInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -10750,6 +11794,9 @@ func (s *GetBucketLifecycleInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -10815,6 +11862,9 @@ func (s *GetBucketLocationInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -10880,6 +11930,9 @@ func (s *GetBucketLoggingInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -10955,6 +12008,9 @@ func (s *GetBucketMetricsConfigurationInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } @@ -11032,6 +12088,9 @@ func (s *GetBucketNotificationConfigurationRequest) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -11045,36 +12104,110 @@ func (s *GetBucketNotificationConfigurationRequest) SetBucket(v string) *GetBuck return s } -func (s *GetBucketNotificationConfigurationRequest) getBucket() (v string) { - if s.Bucket == nil { - return v - } - return *s.Bucket +func (s *GetBucketNotificationConfigurationRequest) getBucket() (v string) { + if s.Bucket == nil { + return v + } + return *s.Bucket +} + +type GetBucketPolicyInput struct { + _ struct{} `type:"structure"` + + // Bucket is a required field + Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetBucketPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetBucketPolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetBucketPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetBucketPolicyInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBucket sets the Bucket field's value. +func (s *GetBucketPolicyInput) SetBucket(v string) *GetBucketPolicyInput { + s.Bucket = &v + return s +} + +func (s *GetBucketPolicyInput) getBucket() (v string) { + if s.Bucket == nil { + return v + } + return *s.Bucket +} + +type GetBucketPolicyOutput struct { + _ struct{} `type:"structure" payload:"Policy"` + + // The bucket policy as a JSON document. + Policy *string `type:"string"` +} + +// String returns the string representation +func (s GetBucketPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetBucketPolicyOutput) GoString() string { + return s.String() +} + +// SetPolicy sets the Policy field's value. +func (s *GetBucketPolicyOutput) SetPolicy(v string) *GetBucketPolicyOutput { + s.Policy = &v + return s } -type GetBucketPolicyInput struct { +type GetBucketPolicyStatusInput struct { _ struct{} `type:"structure"` + // The name of the Amazon S3 bucket whose policy status you want to retrieve. + // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` } // String returns the string representation -func (s GetBucketPolicyInput) String() string { +func (s GetBucketPolicyStatusInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetBucketPolicyInput) GoString() string { +func (s GetBucketPolicyStatusInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *GetBucketPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetBucketPolicyInput"} +func (s *GetBucketPolicyStatusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetBucketPolicyStatusInput"} if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -11083,38 +12216,38 @@ func (s *GetBucketPolicyInput) Validate() error { } // SetBucket sets the Bucket field's value. -func (s *GetBucketPolicyInput) SetBucket(v string) *GetBucketPolicyInput { +func (s *GetBucketPolicyStatusInput) SetBucket(v string) *GetBucketPolicyStatusInput { s.Bucket = &v return s } -func (s *GetBucketPolicyInput) getBucket() (v string) { +func (s *GetBucketPolicyStatusInput) getBucket() (v string) { if s.Bucket == nil { return v } return *s.Bucket } -type GetBucketPolicyOutput struct { - _ struct{} `type:"structure" payload:"Policy"` +type GetBucketPolicyStatusOutput struct { + _ struct{} `type:"structure" payload:"PolicyStatus"` - // The bucket policy as a JSON document. - Policy *string `type:"string"` + // The policy status for the specified bucket. + PolicyStatus *PolicyStatus `type:"structure"` } // String returns the string representation -func (s GetBucketPolicyOutput) String() string { +func (s GetBucketPolicyStatusOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s GetBucketPolicyOutput) GoString() string { +func (s GetBucketPolicyStatusOutput) GoString() string { return s.String() } -// SetPolicy sets the Policy field's value. -func (s *GetBucketPolicyOutput) SetPolicy(v string) *GetBucketPolicyOutput { - s.Policy = &v +// SetPolicyStatus sets the PolicyStatus field's value. +func (s *GetBucketPolicyStatusOutput) SetPolicyStatus(v *PolicyStatus) *GetBucketPolicyStatusOutput { + s.PolicyStatus = v return s } @@ -11141,6 +12274,9 @@ func (s *GetBucketReplicationInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -11164,8 +12300,8 @@ func (s *GetBucketReplicationInput) getBucket() (v string) { type GetBucketReplicationOutput struct { _ struct{} `type:"structure" payload:"ReplicationConfiguration"` - // Container for replication rules. You can add as many as 1,000 rules. Total - // replication configuration size can be up to 2 MB. + // A container for replication rules. You can add up to 1,000 rules. The maximum + // size of a replication configuration is 2 MB. ReplicationConfiguration *ReplicationConfiguration `type:"structure"` } @@ -11208,6 +12344,9 @@ func (s *GetBucketRequestPaymentInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -11274,6 +12413,9 @@ func (s *GetBucketTaggingInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -11340,6 +12482,9 @@ func (s *GetBucketVersioningInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -11417,6 +12562,9 @@ func (s *GetBucketWebsiteInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -11518,6 +12666,9 @@ func (s *GetObjectAclInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } @@ -11669,7 +12820,7 @@ type GetObjectInput struct { // does not store the encryption key. The key must be appropriate for use with // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm // header. - SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"` + SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"` // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. // Amazon S3 uses this header for a message integrity check to ensure the encryption @@ -11696,6 +12847,9 @@ func (s *GetObjectInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } @@ -11837,6 +12991,186 @@ func (s *GetObjectInput) SetVersionId(v string) *GetObjectInput { return s } +type GetObjectLegalHoldInput struct { + _ struct{} `type:"structure"` + + // The bucket containing the object whose Legal Hold status you want to retrieve. + // + // Bucket is a required field + Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` + + // The key name for the object whose Legal Hold status you want to retrieve. + // + // Key is a required field + Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` + + // Confirms that the requester knows that she or he will be charged for the + // request. Bucket owners need not specify this parameter in their requests. + // Documentation on downloading objects from requester pays buckets can be found + // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html + RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` + + // The version ID of the object whose Legal Hold status you want to retrieve. + VersionId *string `location:"querystring" locationName:"versionId" type:"string"` +} + +// String returns the string representation +func (s GetObjectLegalHoldInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetObjectLegalHoldInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetObjectLegalHoldInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetObjectLegalHoldInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBucket sets the Bucket field's value. +func (s *GetObjectLegalHoldInput) SetBucket(v string) *GetObjectLegalHoldInput { + s.Bucket = &v + return s +} + +func (s *GetObjectLegalHoldInput) getBucket() (v string) { + if s.Bucket == nil { + return v + } + return *s.Bucket +} + +// SetKey sets the Key field's value. +func (s *GetObjectLegalHoldInput) SetKey(v string) *GetObjectLegalHoldInput { + s.Key = &v + return s +} + +// SetRequestPayer sets the RequestPayer field's value. +func (s *GetObjectLegalHoldInput) SetRequestPayer(v string) *GetObjectLegalHoldInput { + s.RequestPayer = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *GetObjectLegalHoldInput) SetVersionId(v string) *GetObjectLegalHoldInput { + s.VersionId = &v + return s +} + +type GetObjectLegalHoldOutput struct { + _ struct{} `type:"structure" payload:"LegalHold"` + + // The current Legal Hold status for the specified object. + LegalHold *ObjectLockLegalHold `type:"structure"` +} + +// String returns the string representation +func (s GetObjectLegalHoldOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetObjectLegalHoldOutput) GoString() string { + return s.String() +} + +// SetLegalHold sets the LegalHold field's value. +func (s *GetObjectLegalHoldOutput) SetLegalHold(v *ObjectLockLegalHold) *GetObjectLegalHoldOutput { + s.LegalHold = v + return s +} + +type GetObjectLockConfigurationInput struct { + _ struct{} `type:"structure"` + + // The bucket whose Object Lock configuration you want to retrieve. + // + // Bucket is a required field + Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetObjectLockConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetObjectLockConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetObjectLockConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetObjectLockConfigurationInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBucket sets the Bucket field's value. +func (s *GetObjectLockConfigurationInput) SetBucket(v string) *GetObjectLockConfigurationInput { + s.Bucket = &v + return s +} + +func (s *GetObjectLockConfigurationInput) getBucket() (v string) { + if s.Bucket == nil { + return v + } + return *s.Bucket +} + +type GetObjectLockConfigurationOutput struct { + _ struct{} `type:"structure" payload:"ObjectLockConfiguration"` + + // The specified bucket's Object Lock configuration. + ObjectLockConfiguration *ObjectLockConfiguration `type:"structure"` +} + +// String returns the string representation +func (s GetObjectLockConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetObjectLockConfigurationOutput) GoString() string { + return s.String() +} + +// SetObjectLockConfiguration sets the ObjectLockConfiguration field's value. +func (s *GetObjectLockConfigurationOutput) SetObjectLockConfiguration(v *ObjectLockConfiguration) *GetObjectLockConfigurationOutput { + s.ObjectLockConfiguration = v + return s +} + type GetObjectOutput struct { _ struct{} `type:"structure" payload:"Body"` @@ -11897,6 +13231,16 @@ type GetObjectOutput struct { // you can create metadata whose values are not legal HTTP headers. MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"` + // Indicates whether this object has an active legal hold. This field is only + // returned if you have permission to view an object's legal hold status. + ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"` + + // The Object Lock mode currently in place for this object. + ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"` + + // The date and time when this object's Object Lock will expire. + ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"` + // The count of parts this object has. PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"` @@ -11922,7 +13266,7 @@ type GetObjectOutput struct { // If present, specifies the ID of the AWS Key Management Service (KMS) master // encryption key that was used for the object. - SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"` + SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` // The Server-side encryption algorithm used when storing this object in S3 // (e.g., AES256, aws:kms). @@ -12048,6 +13392,24 @@ func (s *GetObjectOutput) SetMissingMeta(v int64) *GetObjectOutput { return s } +// SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value. +func (s *GetObjectOutput) SetObjectLockLegalHoldStatus(v string) *GetObjectOutput { + s.ObjectLockLegalHoldStatus = &v + return s +} + +// SetObjectLockMode sets the ObjectLockMode field's value. +func (s *GetObjectOutput) SetObjectLockMode(v string) *GetObjectOutput { + s.ObjectLockMode = &v + return s +} + +// SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value. +func (s *GetObjectOutput) SetObjectLockRetainUntilDate(v time.Time) *GetObjectOutput { + s.ObjectLockRetainUntilDate = &v + return s +} + // SetPartsCount sets the PartsCount field's value. func (s *GetObjectOutput) SetPartsCount(v int64) *GetObjectOutput { s.PartsCount = &v @@ -12066,57 +13428,166 @@ func (s *GetObjectOutput) SetRequestCharged(v string) *GetObjectOutput { return s } -// SetRestore sets the Restore field's value. -func (s *GetObjectOutput) SetRestore(v string) *GetObjectOutput { - s.Restore = &v - return s +// SetRestore sets the Restore field's value. +func (s *GetObjectOutput) SetRestore(v string) *GetObjectOutput { + s.Restore = &v + return s +} + +// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. +func (s *GetObjectOutput) SetSSECustomerAlgorithm(v string) *GetObjectOutput { + s.SSECustomerAlgorithm = &v + return s +} + +// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. +func (s *GetObjectOutput) SetSSECustomerKeyMD5(v string) *GetObjectOutput { + s.SSECustomerKeyMD5 = &v + return s +} + +// SetSSEKMSKeyId sets the SSEKMSKeyId field's value. +func (s *GetObjectOutput) SetSSEKMSKeyId(v string) *GetObjectOutput { + s.SSEKMSKeyId = &v + return s +} + +// SetServerSideEncryption sets the ServerSideEncryption field's value. +func (s *GetObjectOutput) SetServerSideEncryption(v string) *GetObjectOutput { + s.ServerSideEncryption = &v + return s +} + +// SetStorageClass sets the StorageClass field's value. +func (s *GetObjectOutput) SetStorageClass(v string) *GetObjectOutput { + s.StorageClass = &v + return s +} + +// SetTagCount sets the TagCount field's value. +func (s *GetObjectOutput) SetTagCount(v int64) *GetObjectOutput { + s.TagCount = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *GetObjectOutput) SetVersionId(v string) *GetObjectOutput { + s.VersionId = &v + return s +} + +// SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value. +func (s *GetObjectOutput) SetWebsiteRedirectLocation(v string) *GetObjectOutput { + s.WebsiteRedirectLocation = &v + return s +} + +type GetObjectRetentionInput struct { + _ struct{} `type:"structure"` + + // The bucket containing the object whose retention settings you want to retrieve. + // + // Bucket is a required field + Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` + + // The key name for the object whose retention settings you want to retrieve. + // + // Key is a required field + Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` + + // Confirms that the requester knows that she or he will be charged for the + // request. Bucket owners need not specify this parameter in their requests. + // Documentation on downloading objects from requester pays buckets can be found + // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html + RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` + + // The version ID for the object whose retention settings you want to retrieve. + VersionId *string `location:"querystring" locationName:"versionId" type:"string"` +} + +// String returns the string representation +func (s GetObjectRetentionInput) String() string { + return awsutil.Prettify(s) } -// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. -func (s *GetObjectOutput) SetSSECustomerAlgorithm(v string) *GetObjectOutput { - s.SSECustomerAlgorithm = &v - return s +// GoString returns the string representation +func (s GetObjectRetentionInput) GoString() string { + return s.String() } -// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. -func (s *GetObjectOutput) SetSSECustomerKeyMD5(v string) *GetObjectOutput { - s.SSECustomerKeyMD5 = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetObjectRetentionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetObjectRetentionInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetSSEKMSKeyId sets the SSEKMSKeyId field's value. -func (s *GetObjectOutput) SetSSEKMSKeyId(v string) *GetObjectOutput { - s.SSEKMSKeyId = &v +// SetBucket sets the Bucket field's value. +func (s *GetObjectRetentionInput) SetBucket(v string) *GetObjectRetentionInput { + s.Bucket = &v return s } -// SetServerSideEncryption sets the ServerSideEncryption field's value. -func (s *GetObjectOutput) SetServerSideEncryption(v string) *GetObjectOutput { - s.ServerSideEncryption = &v - return s +func (s *GetObjectRetentionInput) getBucket() (v string) { + if s.Bucket == nil { + return v + } + return *s.Bucket } -// SetStorageClass sets the StorageClass field's value. -func (s *GetObjectOutput) SetStorageClass(v string) *GetObjectOutput { - s.StorageClass = &v +// SetKey sets the Key field's value. +func (s *GetObjectRetentionInput) SetKey(v string) *GetObjectRetentionInput { + s.Key = &v return s } -// SetTagCount sets the TagCount field's value. -func (s *GetObjectOutput) SetTagCount(v int64) *GetObjectOutput { - s.TagCount = &v +// SetRequestPayer sets the RequestPayer field's value. +func (s *GetObjectRetentionInput) SetRequestPayer(v string) *GetObjectRetentionInput { + s.RequestPayer = &v return s } // SetVersionId sets the VersionId field's value. -func (s *GetObjectOutput) SetVersionId(v string) *GetObjectOutput { +func (s *GetObjectRetentionInput) SetVersionId(v string) *GetObjectRetentionInput { s.VersionId = &v return s } -// SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value. -func (s *GetObjectOutput) SetWebsiteRedirectLocation(v string) *GetObjectOutput { - s.WebsiteRedirectLocation = &v +type GetObjectRetentionOutput struct { + _ struct{} `type:"structure" payload:"Retention"` + + // The container element for an object's retention settings. + Retention *ObjectLockRetention `type:"structure"` +} + +// String returns the string representation +func (s GetObjectRetentionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetObjectRetentionOutput) GoString() string { + return s.String() +} + +// SetRetention sets the Retention field's value. +func (s *GetObjectRetentionOutput) SetRetention(v *ObjectLockRetention) *GetObjectRetentionOutput { + s.Retention = v return s } @@ -12148,6 +13619,9 @@ func (s *GetObjectTaggingInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } @@ -12249,6 +13723,9 @@ func (s *GetObjectTorrentInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } @@ -12319,6 +13796,79 @@ func (s *GetObjectTorrentOutput) SetRequestCharged(v string) *GetObjectTorrentOu return s } +type GetPublicAccessBlockInput struct { + _ struct{} `type:"structure"` + + // The name of the Amazon S3 bucket whose PublicAccessBlock configuration you + // want to retrieve. + // + // Bucket is a required field + Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetPublicAccessBlockInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetPublicAccessBlockInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetPublicAccessBlockInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetPublicAccessBlockInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBucket sets the Bucket field's value. +func (s *GetPublicAccessBlockInput) SetBucket(v string) *GetPublicAccessBlockInput { + s.Bucket = &v + return s +} + +func (s *GetPublicAccessBlockInput) getBucket() (v string) { + if s.Bucket == nil { + return v + } + return *s.Bucket +} + +type GetPublicAccessBlockOutput struct { + _ struct{} `type:"structure" payload:"PublicAccessBlockConfiguration"` + + // The PublicAccessBlock configuration currently in effect for this Amazon S3 + // bucket. + PublicAccessBlockConfiguration *PublicAccessBlockConfiguration `type:"structure"` +} + +// String returns the string representation +func (s GetPublicAccessBlockOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetPublicAccessBlockOutput) GoString() string { + return s.String() +} + +// SetPublicAccessBlockConfiguration sets the PublicAccessBlockConfiguration field's value. +func (s *GetPublicAccessBlockOutput) SetPublicAccessBlockConfiguration(v *PublicAccessBlockConfiguration) *GetPublicAccessBlockOutput { + s.PublicAccessBlockConfiguration = v + return s +} + type GlacierJobParameters struct { _ struct{} `type:"structure"` @@ -12500,6 +14050,9 @@ func (s *HeadBucketInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -12583,7 +14136,7 @@ type HeadObjectInput struct { // does not store the encryption key. The key must be appropriate for use with // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm // header. - SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"` + SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"` // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. // Amazon S3 uses this header for a message integrity check to ensure the encryption @@ -12610,6 +14163,9 @@ func (s *HeadObjectInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } @@ -12769,6 +14325,15 @@ type HeadObjectOutput struct { // you can create metadata whose values are not legal HTTP headers. MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"` + // The Legal Hold status for the specified object. + ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"` + + // The Object Lock mode currently in place for this object. + ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"` + + // The date and time when this object's Object Lock will expire. + ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"` + // The count of parts this object has. PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"` @@ -12794,7 +14359,7 @@ type HeadObjectOutput struct { // If present, specifies the ID of the AWS Key Management Service (KMS) master // encryption key that was used for the object. - SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"` + SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` // The Server-side encryption algorithm used when storing this object in S3 // (e.g., AES256, aws:kms). @@ -12905,6 +14470,24 @@ func (s *HeadObjectOutput) SetMissingMeta(v int64) *HeadObjectOutput { return s } +// SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value. +func (s *HeadObjectOutput) SetObjectLockLegalHoldStatus(v string) *HeadObjectOutput { + s.ObjectLockLegalHoldStatus = &v + return s +} + +// SetObjectLockMode sets the ObjectLockMode field's value. +func (s *HeadObjectOutput) SetObjectLockMode(v string) *HeadObjectOutput { + s.ObjectLockMode = &v + return s +} + +// SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value. +func (s *HeadObjectOutput) SetObjectLockRetainUntilDate(v time.Time) *HeadObjectOutput { + s.ObjectLockRetainUntilDate = &v + return s +} + // SetPartsCount sets the PartsCount field's value. func (s *HeadObjectOutput) SetPartsCount(v int64) *HeadObjectOutput { s.PartsCount = &v @@ -13274,10 +14857,10 @@ func (s *InventoryDestination) SetS3BucketDestination(v *InventoryS3BucketDestin type InventoryEncryption struct { _ struct{} `type:"structure"` - // Specifies the use of SSE-KMS to encrypt delievered Inventory reports. + // Specifies the use of SSE-KMS to encrypt delivered Inventory reports. SSEKMS *SSEKMS `locationName:"SSE-KMS" type:"structure"` - // Specifies the use of SSE-S3 to encrypt delievered Inventory reports. + // Specifies the use of SSE-S3 to encrypt delivered Inventory reports. SSES3 *SSES3 `locationName:"SSE-S3" type:"structure"` } @@ -13533,12 +15116,12 @@ func (s *JSONOutput) SetRecordDelimiter(v string) *JSONOutput { return s } -// Container for object key name prefix and suffix filtering rules. +// A container for object key name prefix and suffix filtering rules. type KeyFilter struct { _ struct{} `type:"structure"` - // A list of containers for key value pair that defines the criteria for the - // filter rule. + // A list of containers for the key value pair that defines the criteria for + // the filter rule. FilterRules []*FilterRule `locationName:"FilterRule" type:"list" flattened:"true"` } @@ -13558,24 +15141,24 @@ func (s *KeyFilter) SetFilterRules(v []*FilterRule) *KeyFilter { return s } -// Container for specifying the AWS Lambda notification configuration. +// A container for specifying the configuration for AWS Lambda notifications. type LambdaFunctionConfiguration struct { _ struct{} `type:"structure"` // Events is a required field Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"` - // Container for object key name filtering rules. For information about key - // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) + // A container for object key name filtering rules. For information about key + // name filtering, see Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) // in the Amazon Simple Storage Service Developer Guide. Filter *NotificationConfigurationFilter `type:"structure"` - // Optional unique identifier for configurations in a notification configuration. + // An optional unique identifier for configurations in a notification configuration. // If you don't provide one, Amazon S3 will assign an ID. Id *string `type:"string"` - // Lambda cloud function ARN that Amazon S3 can invoke when it detects events - // of the specified type. + // The Amazon Resource Name (ARN) of the Lambda cloud function that Amazon S3 + // can invoke when it detects events of the specified type. // // LambdaFunctionArn is a required field LambdaFunctionArn *string `locationName:"CloudFunction" type:"string" required:"true"` @@ -13994,6 +15577,9 @@ func (s *ListBucketAnalyticsConfigurationsInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -14105,6 +15691,9 @@ func (s *ListBucketInventoryConfigurationsInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -14216,6 +15805,9 @@ func (s *ListBucketMetricsConfigurationsInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -14394,6 +15986,9 @@ func (s *ListMultipartUploadsInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -14630,6 +16225,9 @@ func (s *ListObjectVersionsInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -14862,6 +16460,9 @@ func (s *ListObjectsInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -15079,6 +16680,9 @@ func (s *ListObjectsV2Input) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -15324,6 +16928,9 @@ func (s *ListPartsInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } @@ -16039,11 +17646,11 @@ func (s *NoncurrentVersionExpiration) SetNoncurrentDays(v int64) *NoncurrentVers } // Container for the transition rule that describes when noncurrent objects -// transition to the STANDARD_IA, ONEZONE_IA or GLACIER storage class. If your -// bucket is versioning-enabled (or versioning is suspended), you can set this -// action to request that Amazon S3 transition noncurrent object versions to -// the STANDARD_IA, ONEZONE_IA or GLACIER storage class at a specific period -// in the object's lifetime. +// transition to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING or GLACIER +// storage class. If your bucket is versioning-enabled (or versioning is suspended), +// you can set this action to request that Amazon S3 transition noncurrent object +// versions to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING or GLACIER storage +// class at a specific period in the object's lifetime. type NoncurrentVersionTransition struct { _ struct{} `type:"structure"` @@ -16080,8 +17687,8 @@ func (s *NoncurrentVersionTransition) SetStorageClass(v string) *NoncurrentVersi return s } -// Container for specifying the notification configuration of the bucket. If -// this element is empty, notifications are turned off on the bucket. +// A container for specifying the notification configuration of the bucket. +// If this element is empty, notifications are turned off for the bucket. type NotificationConfiguration struct { _ struct{} `type:"structure"` @@ -16198,13 +17805,13 @@ func (s *NotificationConfigurationDeprecated) SetTopicConfiguration(v *TopicConf return s } -// Container for object key name filtering rules. For information about key -// name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) +// A container for object key name filtering rules. For information about key +// name filtering, see Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) // in the Amazon Simple Storage Service Developer Guide. type NotificationConfigurationFilter struct { _ struct{} `type:"structure"` - // Container for object key name prefix and suffix filtering rules. + // A container for object key name prefix and suffix filtering rules. Key *KeyFilter `locationName:"S3Key" type:"structure"` } @@ -16337,6 +17944,121 @@ func (s *ObjectIdentifier) SetVersionId(v string) *ObjectIdentifier { return s } +// The container element for Object Lock configuration parameters. +type ObjectLockConfiguration struct { + _ struct{} `type:"structure"` + + // Indicates whether this bucket has an Object Lock configuration enabled. + ObjectLockEnabled *string `type:"string" enum:"ObjectLockEnabled"` + + // The Object Lock rule in place for the specified object. + Rule *ObjectLockRule `type:"structure"` +} + +// String returns the string representation +func (s ObjectLockConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ObjectLockConfiguration) GoString() string { + return s.String() +} + +// SetObjectLockEnabled sets the ObjectLockEnabled field's value. +func (s *ObjectLockConfiguration) SetObjectLockEnabled(v string) *ObjectLockConfiguration { + s.ObjectLockEnabled = &v + return s +} + +// SetRule sets the Rule field's value. +func (s *ObjectLockConfiguration) SetRule(v *ObjectLockRule) *ObjectLockConfiguration { + s.Rule = v + return s +} + +// A Legal Hold configuration for an object. +type ObjectLockLegalHold struct { + _ struct{} `type:"structure"` + + // Indicates whether the specified object has a Legal Hold in place. + Status *string `type:"string" enum:"ObjectLockLegalHoldStatus"` +} + +// String returns the string representation +func (s ObjectLockLegalHold) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ObjectLockLegalHold) GoString() string { + return s.String() +} + +// SetStatus sets the Status field's value. +func (s *ObjectLockLegalHold) SetStatus(v string) *ObjectLockLegalHold { + s.Status = &v + return s +} + +// A Retention configuration for an object. +type ObjectLockRetention struct { + _ struct{} `type:"structure"` + + // Indicates the Retention mode for the specified object. + Mode *string `type:"string" enum:"ObjectLockRetentionMode"` + + // The date on which this Object Lock Retention will expire. + RetainUntilDate *time.Time `type:"timestamp" timestampFormat:"iso8601"` +} + +// String returns the string representation +func (s ObjectLockRetention) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ObjectLockRetention) GoString() string { + return s.String() +} + +// SetMode sets the Mode field's value. +func (s *ObjectLockRetention) SetMode(v string) *ObjectLockRetention { + s.Mode = &v + return s +} + +// SetRetainUntilDate sets the RetainUntilDate field's value. +func (s *ObjectLockRetention) SetRetainUntilDate(v time.Time) *ObjectLockRetention { + s.RetainUntilDate = &v + return s +} + +// The container element for an Object Lock rule. +type ObjectLockRule struct { + _ struct{} `type:"structure"` + + // The default retention period that you want to apply to new objects placed + // in the specified bucket. + DefaultRetention *DefaultRetention `type:"structure"` +} + +// String returns the string representation +func (s ObjectLockRule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ObjectLockRule) GoString() string { + return s.String() +} + +// SetDefaultRetention sets the DefaultRetention field's value. +func (s *ObjectLockRule) SetDefaultRetention(v *DefaultRetention) *ObjectLockRule { + s.DefaultRetention = v + return s +} + type ObjectVersion struct { _ struct{} `type:"structure"` @@ -16551,7 +18273,7 @@ type Part struct { // 10,000. PartNumber *int64 `type:"integer"` - // Size of the uploaded part data. + // Size in bytes of the uploaded part data. Size *int64 `type:"integer"` } @@ -16589,16 +18311,41 @@ func (s *Part) SetSize(v int64) *Part { return s } +// The container element for a bucket's policy status. +type PolicyStatus struct { + _ struct{} `type:"structure"` + + // The policy status for this bucket. TRUE indicates that this bucket is public. + // FALSE indicates that the bucket is not public. + IsPublic *bool `locationName:"IsPublic" type:"boolean"` +} + +// String returns the string representation +func (s PolicyStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PolicyStatus) GoString() string { + return s.String() +} + +// SetIsPublic sets the IsPublic field's value. +func (s *PolicyStatus) SetIsPublic(v bool) *PolicyStatus { + s.IsPublic = &v + return s +} + type Progress struct { _ struct{} `type:"structure"` - // Current number of uncompressed object bytes processed. + // The current number of uncompressed object bytes processed. BytesProcessed *int64 `type:"long"` - // Current number of bytes of records payload data returned. + // The current number of bytes of records payload data returned. BytesReturned *int64 `type:"long"` - // Current number of object bytes scanned. + // The current number of object bytes scanned. BytesScanned *int64 `type:"long"` } @@ -16670,6 +18417,81 @@ func (s *ProgressEvent) UnmarshalEvent( return nil } +type PublicAccessBlockConfiguration struct { + _ struct{} `type:"structure"` + + // Specifies whether Amazon S3 should block public access control lists (ACLs) + // for this bucket and objects in this bucket. Setting this element to TRUE + // causes the following behavior: + // + // * PUT Bucket acl and PUT Object acl calls fail if the specified ACL is + // public. + // + // * PUT Object calls fail if the request includes a public ACL. + // + // Enabling this setting doesn't affect existing policies or ACLs. + BlockPublicAcls *bool `locationName:"BlockPublicAcls" type:"boolean"` + + // Specifies whether Amazon S3 should block public bucket policies for this + // bucket. Setting this element to TRUE causes Amazon S3 to reject calls to + // PUT Bucket policy if the specified bucket policy allows public access. + // + // Enabling this setting doesn't affect existing bucket policies. + BlockPublicPolicy *bool `locationName:"BlockPublicPolicy" type:"boolean"` + + // Specifies whether Amazon S3 should ignore public ACLs for this bucket and + // objects in this bucket. Setting this element to TRUE causes Amazon S3 to + // ignore all public ACLs on this bucket and objects in this bucket. + // + // Enabling this setting doesn't affect the persistence of any existing ACLs + // and doesn't prevent new public ACLs from being set. + IgnorePublicAcls *bool `locationName:"IgnorePublicAcls" type:"boolean"` + + // Specifies whether Amazon S3 should restrict public bucket policies for this + // bucket. Setting this element to TRUE restricts access to this bucket to only + // AWS services and authorized users within this account if the bucket has a + // public policy. + // + // Enabling this setting doesn't affect previously stored bucket policies, except + // that public and cross-account access within any public bucket policy, including + // non-public delegation to specific accounts, is blocked. + RestrictPublicBuckets *bool `locationName:"RestrictPublicBuckets" type:"boolean"` +} + +// String returns the string representation +func (s PublicAccessBlockConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PublicAccessBlockConfiguration) GoString() string { + return s.String() +} + +// SetBlockPublicAcls sets the BlockPublicAcls field's value. +func (s *PublicAccessBlockConfiguration) SetBlockPublicAcls(v bool) *PublicAccessBlockConfiguration { + s.BlockPublicAcls = &v + return s +} + +// SetBlockPublicPolicy sets the BlockPublicPolicy field's value. +func (s *PublicAccessBlockConfiguration) SetBlockPublicPolicy(v bool) *PublicAccessBlockConfiguration { + s.BlockPublicPolicy = &v + return s +} + +// SetIgnorePublicAcls sets the IgnorePublicAcls field's value. +func (s *PublicAccessBlockConfiguration) SetIgnorePublicAcls(v bool) *PublicAccessBlockConfiguration { + s.IgnorePublicAcls = &v + return s +} + +// SetRestrictPublicBuckets sets the RestrictPublicBuckets field's value. +func (s *PublicAccessBlockConfiguration) SetRestrictPublicBuckets(v bool) *PublicAccessBlockConfiguration { + s.RestrictPublicBuckets = &v + return s +} + type PutBucketAccelerateConfigurationInput struct { _ struct{} `type:"structure" payload:"AccelerateConfiguration"` @@ -16703,6 +18525,9 @@ func (s *PutBucketAccelerateConfigurationInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -16787,6 +18612,9 @@ func (s *PutBucketAclInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.AccessControlPolicy != nil { if err := s.AccessControlPolicy.Validate(); err != nil { invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams)) @@ -16906,6 +18734,9 @@ func (s *PutBucketAnalyticsConfigurationInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } @@ -16986,6 +18817,9 @@ func (s *PutBucketCorsInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.CORSConfiguration == nil { invalidParams.Add(request.NewErrParamRequired("CORSConfiguration")) } @@ -17066,6 +18900,9 @@ func (s *PutBucketEncryptionInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.ServerSideEncryptionConfiguration == nil { invalidParams.Add(request.NewErrParamRequired("ServerSideEncryptionConfiguration")) } @@ -17149,6 +18986,9 @@ func (s *PutBucketInventoryConfigurationInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } @@ -17231,6 +19071,9 @@ func (s *PutBucketLifecycleConfigurationInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.LifecycleConfiguration != nil { if err := s.LifecycleConfiguration.Validate(); err != nil { invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams)) @@ -17301,6 +19144,9 @@ func (s *PutBucketLifecycleInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.LifecycleConfiguration != nil { if err := s.LifecycleConfiguration.Validate(); err != nil { invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams)) @@ -17372,6 +19218,9 @@ func (s *PutBucketLoggingInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.BucketLoggingStatus == nil { invalidParams.Add(request.NewErrParamRequired("BucketLoggingStatus")) } @@ -17455,6 +19304,9 @@ func (s *PutBucketMetricsConfigurationInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } @@ -17518,8 +19370,8 @@ type PutBucketNotificationConfigurationInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // Container for specifying the notification configuration of the bucket. If - // this element is empty, notifications are turned off on the bucket. + // A container for specifying the notification configuration of the bucket. + // If this element is empty, notifications are turned off for the bucket. // // NotificationConfiguration is a required field NotificationConfiguration *NotificationConfiguration `locationName:"NotificationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` @@ -17541,6 +19393,9 @@ func (s *PutBucketNotificationConfigurationInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.NotificationConfiguration == nil { invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration")) } @@ -17615,6 +19470,9 @@ func (s *PutBucketNotificationInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.NotificationConfiguration == nil { invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration")) } @@ -17690,6 +19548,9 @@ func (s *PutBucketPolicyInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.Policy == nil { invalidParams.Add(request.NewErrParamRequired("Policy")) } @@ -17745,8 +19606,8 @@ type PutBucketReplicationInput struct { // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` - // Container for replication rules. You can add as many as 1,000 rules. Total - // replication configuration size can be up to 2 MB. + // A container for replication rules. You can add up to 1,000 rules. The maximum + // size of a replication configuration is 2 MB. // // ReplicationConfiguration is a required field ReplicationConfiguration *ReplicationConfiguration `locationName:"ReplicationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` @@ -17768,6 +19629,9 @@ func (s *PutBucketReplicationInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.ReplicationConfiguration == nil { invalidParams.Add(request.NewErrParamRequired("ReplicationConfiguration")) } @@ -17842,6 +19706,9 @@ func (s *PutBucketRequestPaymentInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.RequestPaymentConfiguration == nil { invalidParams.Add(request.NewErrParamRequired("RequestPaymentConfiguration")) } @@ -17916,6 +19783,9 @@ func (s *PutBucketTaggingInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.Tagging == nil { invalidParams.Add(request.NewErrParamRequired("Tagging")) } @@ -17994,6 +19864,9 @@ func (s *PutBucketVersioningInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.VersioningConfiguration == nil { invalidParams.Add(request.NewErrParamRequired("VersioningConfiguration")) } @@ -18069,6 +19942,9 @@ func (s *PutBucketWebsiteInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.WebsiteConfiguration == nil { invalidParams.Add(request.NewErrParamRequired("WebsiteConfiguration")) } @@ -18173,6 +20049,9 @@ func (s *PutObjectAclInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } @@ -18349,6 +20228,15 @@ type PutObjectInput struct { // A map of metadata to store with the object in S3. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"` + // The Legal Hold status that you want to apply to the specified object. + ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"` + + // The Object Lock mode that you want to apply to this object. + ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"` + + // The date and time when you want this object's Object Lock to expire. + ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"` + // Confirms that the requester knows that she or he will be charged for the // request. Bucket owners need not specify this parameter in their requests. // Documentation on downloading objects from requester pays buckets can be found @@ -18363,7 +20251,7 @@ type PutObjectInput struct { // does not store the encryption key. The key must be appropriate for use with // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm // header. - SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"` + SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"` // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. // Amazon S3 uses this header for a message integrity check to ensure the encryption @@ -18374,7 +20262,7 @@ type PutObjectInput struct { // requests for an object protected by AWS KMS will fail if not made via SSL // or using SigV4. Documentation on configuring any of the officially supported // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version - SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"` + SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` // The Server-side encryption algorithm used when storing this object in S3 // (e.g., AES256, aws:kms). @@ -18383,7 +20271,8 @@ type PutObjectInput struct { // The type of storage to use for the object. Defaults to 'STANDARD'. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"` - // The tag-set for the object. The tag-set must be encoded as URL Query parameters + // The tag-set for the object. The tag-set must be encoded as URL Query parameters. + // (For example, "Key1=Value1") Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"` // If the bucket is configured as a website, redirects requests for this object @@ -18393,21 +20282,271 @@ type PutObjectInput struct { } // String returns the string representation -func (s PutObjectInput) String() string { +func (s PutObjectInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutObjectInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutObjectInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutObjectInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetACL sets the ACL field's value. +func (s *PutObjectInput) SetACL(v string) *PutObjectInput { + s.ACL = &v + return s +} + +// SetBody sets the Body field's value. +func (s *PutObjectInput) SetBody(v io.ReadSeeker) *PutObjectInput { + s.Body = v + return s +} + +// SetBucket sets the Bucket field's value. +func (s *PutObjectInput) SetBucket(v string) *PutObjectInput { + s.Bucket = &v + return s +} + +func (s *PutObjectInput) getBucket() (v string) { + if s.Bucket == nil { + return v + } + return *s.Bucket +} + +// SetCacheControl sets the CacheControl field's value. +func (s *PutObjectInput) SetCacheControl(v string) *PutObjectInput { + s.CacheControl = &v + return s +} + +// SetContentDisposition sets the ContentDisposition field's value. +func (s *PutObjectInput) SetContentDisposition(v string) *PutObjectInput { + s.ContentDisposition = &v + return s +} + +// SetContentEncoding sets the ContentEncoding field's value. +func (s *PutObjectInput) SetContentEncoding(v string) *PutObjectInput { + s.ContentEncoding = &v + return s +} + +// SetContentLanguage sets the ContentLanguage field's value. +func (s *PutObjectInput) SetContentLanguage(v string) *PutObjectInput { + s.ContentLanguage = &v + return s +} + +// SetContentLength sets the ContentLength field's value. +func (s *PutObjectInput) SetContentLength(v int64) *PutObjectInput { + s.ContentLength = &v + return s +} + +// SetContentMD5 sets the ContentMD5 field's value. +func (s *PutObjectInput) SetContentMD5(v string) *PutObjectInput { + s.ContentMD5 = &v + return s +} + +// SetContentType sets the ContentType field's value. +func (s *PutObjectInput) SetContentType(v string) *PutObjectInput { + s.ContentType = &v + return s +} + +// SetExpires sets the Expires field's value. +func (s *PutObjectInput) SetExpires(v time.Time) *PutObjectInput { + s.Expires = &v + return s +} + +// SetGrantFullControl sets the GrantFullControl field's value. +func (s *PutObjectInput) SetGrantFullControl(v string) *PutObjectInput { + s.GrantFullControl = &v + return s +} + +// SetGrantRead sets the GrantRead field's value. +func (s *PutObjectInput) SetGrantRead(v string) *PutObjectInput { + s.GrantRead = &v + return s +} + +// SetGrantReadACP sets the GrantReadACP field's value. +func (s *PutObjectInput) SetGrantReadACP(v string) *PutObjectInput { + s.GrantReadACP = &v + return s +} + +// SetGrantWriteACP sets the GrantWriteACP field's value. +func (s *PutObjectInput) SetGrantWriteACP(v string) *PutObjectInput { + s.GrantWriteACP = &v + return s +} + +// SetKey sets the Key field's value. +func (s *PutObjectInput) SetKey(v string) *PutObjectInput { + s.Key = &v + return s +} + +// SetMetadata sets the Metadata field's value. +func (s *PutObjectInput) SetMetadata(v map[string]*string) *PutObjectInput { + s.Metadata = v + return s +} + +// SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value. +func (s *PutObjectInput) SetObjectLockLegalHoldStatus(v string) *PutObjectInput { + s.ObjectLockLegalHoldStatus = &v + return s +} + +// SetObjectLockMode sets the ObjectLockMode field's value. +func (s *PutObjectInput) SetObjectLockMode(v string) *PutObjectInput { + s.ObjectLockMode = &v + return s +} + +// SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value. +func (s *PutObjectInput) SetObjectLockRetainUntilDate(v time.Time) *PutObjectInput { + s.ObjectLockRetainUntilDate = &v + return s +} + +// SetRequestPayer sets the RequestPayer field's value. +func (s *PutObjectInput) SetRequestPayer(v string) *PutObjectInput { + s.RequestPayer = &v + return s +} + +// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. +func (s *PutObjectInput) SetSSECustomerAlgorithm(v string) *PutObjectInput { + s.SSECustomerAlgorithm = &v + return s +} + +// SetSSECustomerKey sets the SSECustomerKey field's value. +func (s *PutObjectInput) SetSSECustomerKey(v string) *PutObjectInput { + s.SSECustomerKey = &v + return s +} + +func (s *PutObjectInput) getSSECustomerKey() (v string) { + if s.SSECustomerKey == nil { + return v + } + return *s.SSECustomerKey +} + +// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. +func (s *PutObjectInput) SetSSECustomerKeyMD5(v string) *PutObjectInput { + s.SSECustomerKeyMD5 = &v + return s +} + +// SetSSEKMSKeyId sets the SSEKMSKeyId field's value. +func (s *PutObjectInput) SetSSEKMSKeyId(v string) *PutObjectInput { + s.SSEKMSKeyId = &v + return s +} + +// SetServerSideEncryption sets the ServerSideEncryption field's value. +func (s *PutObjectInput) SetServerSideEncryption(v string) *PutObjectInput { + s.ServerSideEncryption = &v + return s +} + +// SetStorageClass sets the StorageClass field's value. +func (s *PutObjectInput) SetStorageClass(v string) *PutObjectInput { + s.StorageClass = &v + return s +} + +// SetTagging sets the Tagging field's value. +func (s *PutObjectInput) SetTagging(v string) *PutObjectInput { + s.Tagging = &v + return s +} + +// SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value. +func (s *PutObjectInput) SetWebsiteRedirectLocation(v string) *PutObjectInput { + s.WebsiteRedirectLocation = &v + return s +} + +type PutObjectLegalHoldInput struct { + _ struct{} `type:"structure" payload:"LegalHold"` + + // The bucket containing the object that you want to place a Legal Hold on. + // + // Bucket is a required field + Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` + + // The key name for the object that you want to place a Legal Hold on. + // + // Key is a required field + Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` + + // Container element for the Legal Hold configuration you want to apply to the + // specified object. + LegalHold *ObjectLockLegalHold `locationName:"LegalHold" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` + + // Confirms that the requester knows that she or he will be charged for the + // request. Bucket owners need not specify this parameter in their requests. + // Documentation on downloading objects from requester pays buckets can be found + // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html + RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` + + // The version ID of the object that you want to place a Legal Hold on. + VersionId *string `location:"querystring" locationName:"versionId" type:"string"` +} + +// String returns the string representation +func (s PutObjectLegalHoldInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s PutObjectInput) GoString() string { +func (s PutObjectLegalHoldInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *PutObjectInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutObjectInput"} +func (s *PutObjectLegalHoldInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutObjectLegalHoldInput"} if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } @@ -18421,173 +20560,165 @@ func (s *PutObjectInput) Validate() error { return nil } -// SetACL sets the ACL field's value. -func (s *PutObjectInput) SetACL(v string) *PutObjectInput { - s.ACL = &v - return s -} - -// SetBody sets the Body field's value. -func (s *PutObjectInput) SetBody(v io.ReadSeeker) *PutObjectInput { - s.Body = v - return s -} - // SetBucket sets the Bucket field's value. -func (s *PutObjectInput) SetBucket(v string) *PutObjectInput { +func (s *PutObjectLegalHoldInput) SetBucket(v string) *PutObjectLegalHoldInput { s.Bucket = &v return s } -func (s *PutObjectInput) getBucket() (v string) { +func (s *PutObjectLegalHoldInput) getBucket() (v string) { if s.Bucket == nil { return v } return *s.Bucket } -// SetCacheControl sets the CacheControl field's value. -func (s *PutObjectInput) SetCacheControl(v string) *PutObjectInput { - s.CacheControl = &v +// SetKey sets the Key field's value. +func (s *PutObjectLegalHoldInput) SetKey(v string) *PutObjectLegalHoldInput { + s.Key = &v return s } -// SetContentDisposition sets the ContentDisposition field's value. -func (s *PutObjectInput) SetContentDisposition(v string) *PutObjectInput { - s.ContentDisposition = &v +// SetLegalHold sets the LegalHold field's value. +func (s *PutObjectLegalHoldInput) SetLegalHold(v *ObjectLockLegalHold) *PutObjectLegalHoldInput { + s.LegalHold = v return s } -// SetContentEncoding sets the ContentEncoding field's value. -func (s *PutObjectInput) SetContentEncoding(v string) *PutObjectInput { - s.ContentEncoding = &v +// SetRequestPayer sets the RequestPayer field's value. +func (s *PutObjectLegalHoldInput) SetRequestPayer(v string) *PutObjectLegalHoldInput { + s.RequestPayer = &v return s } -// SetContentLanguage sets the ContentLanguage field's value. -func (s *PutObjectInput) SetContentLanguage(v string) *PutObjectInput { - s.ContentLanguage = &v +// SetVersionId sets the VersionId field's value. +func (s *PutObjectLegalHoldInput) SetVersionId(v string) *PutObjectLegalHoldInput { + s.VersionId = &v return s } -// SetContentLength sets the ContentLength field's value. -func (s *PutObjectInput) SetContentLength(v int64) *PutObjectInput { - s.ContentLength = &v - return s -} +type PutObjectLegalHoldOutput struct { + _ struct{} `type:"structure"` -// SetContentMD5 sets the ContentMD5 field's value. -func (s *PutObjectInput) SetContentMD5(v string) *PutObjectInput { - s.ContentMD5 = &v - return s + // If present, indicates that the requester was successfully charged for the + // request. + RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` } -// SetContentType sets the ContentType field's value. -func (s *PutObjectInput) SetContentType(v string) *PutObjectInput { - s.ContentType = &v - return s +// String returns the string representation +func (s PutObjectLegalHoldOutput) String() string { + return awsutil.Prettify(s) } -// SetExpires sets the Expires field's value. -func (s *PutObjectInput) SetExpires(v time.Time) *PutObjectInput { - s.Expires = &v - return s +// GoString returns the string representation +func (s PutObjectLegalHoldOutput) GoString() string { + return s.String() } -// SetGrantFullControl sets the GrantFullControl field's value. -func (s *PutObjectInput) SetGrantFullControl(v string) *PutObjectInput { - s.GrantFullControl = &v +// SetRequestCharged sets the RequestCharged field's value. +func (s *PutObjectLegalHoldOutput) SetRequestCharged(v string) *PutObjectLegalHoldOutput { + s.RequestCharged = &v return s } -// SetGrantRead sets the GrantRead field's value. -func (s *PutObjectInput) SetGrantRead(v string) *PutObjectInput { - s.GrantRead = &v - return s -} +type PutObjectLockConfigurationInput struct { + _ struct{} `type:"structure" payload:"ObjectLockConfiguration"` -// SetGrantReadACP sets the GrantReadACP field's value. -func (s *PutObjectInput) SetGrantReadACP(v string) *PutObjectInput { - s.GrantReadACP = &v - return s -} + // The bucket whose Object Lock configuration you want to create or replace. + // + // Bucket is a required field + Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` -// SetGrantWriteACP sets the GrantWriteACP field's value. -func (s *PutObjectInput) SetGrantWriteACP(v string) *PutObjectInput { - s.GrantWriteACP = &v - return s -} + // The Object Lock configuration that you want to apply to the specified bucket. + ObjectLockConfiguration *ObjectLockConfiguration `locationName:"ObjectLockConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` -// SetKey sets the Key field's value. -func (s *PutObjectInput) SetKey(v string) *PutObjectInput { - s.Key = &v - return s + // Confirms that the requester knows that she or he will be charged for the + // request. Bucket owners need not specify this parameter in their requests. + // Documentation on downloading objects from requester pays buckets can be found + // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html + RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` + + Token *string `location:"header" locationName:"x-amz-bucket-object-lock-token" type:"string"` } -// SetMetadata sets the Metadata field's value. -func (s *PutObjectInput) SetMetadata(v map[string]*string) *PutObjectInput { - s.Metadata = v - return s +// String returns the string representation +func (s PutObjectLockConfigurationInput) String() string { + return awsutil.Prettify(s) } -// SetRequestPayer sets the RequestPayer field's value. -func (s *PutObjectInput) SetRequestPayer(v string) *PutObjectInput { - s.RequestPayer = &v - return s +// GoString returns the string representation +func (s PutObjectLockConfigurationInput) GoString() string { + return s.String() } -// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. -func (s *PutObjectInput) SetSSECustomerAlgorithm(v string) *PutObjectInput { - s.SSECustomerAlgorithm = &v - return s +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutObjectLockConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutObjectLockConfigurationInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil } -// SetSSECustomerKey sets the SSECustomerKey field's value. -func (s *PutObjectInput) SetSSECustomerKey(v string) *PutObjectInput { - s.SSECustomerKey = &v +// SetBucket sets the Bucket field's value. +func (s *PutObjectLockConfigurationInput) SetBucket(v string) *PutObjectLockConfigurationInput { + s.Bucket = &v return s } -func (s *PutObjectInput) getSSECustomerKey() (v string) { - if s.SSECustomerKey == nil { +func (s *PutObjectLockConfigurationInput) getBucket() (v string) { + if s.Bucket == nil { return v } - return *s.SSECustomerKey + return *s.Bucket } -// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. -func (s *PutObjectInput) SetSSECustomerKeyMD5(v string) *PutObjectInput { - s.SSECustomerKeyMD5 = &v +// SetObjectLockConfiguration sets the ObjectLockConfiguration field's value. +func (s *PutObjectLockConfigurationInput) SetObjectLockConfiguration(v *ObjectLockConfiguration) *PutObjectLockConfigurationInput { + s.ObjectLockConfiguration = v return s } -// SetSSEKMSKeyId sets the SSEKMSKeyId field's value. -func (s *PutObjectInput) SetSSEKMSKeyId(v string) *PutObjectInput { - s.SSEKMSKeyId = &v +// SetRequestPayer sets the RequestPayer field's value. +func (s *PutObjectLockConfigurationInput) SetRequestPayer(v string) *PutObjectLockConfigurationInput { + s.RequestPayer = &v return s } -// SetServerSideEncryption sets the ServerSideEncryption field's value. -func (s *PutObjectInput) SetServerSideEncryption(v string) *PutObjectInput { - s.ServerSideEncryption = &v +// SetToken sets the Token field's value. +func (s *PutObjectLockConfigurationInput) SetToken(v string) *PutObjectLockConfigurationInput { + s.Token = &v return s } -// SetStorageClass sets the StorageClass field's value. -func (s *PutObjectInput) SetStorageClass(v string) *PutObjectInput { - s.StorageClass = &v - return s +type PutObjectLockConfigurationOutput struct { + _ struct{} `type:"structure"` + + // If present, indicates that the requester was successfully charged for the + // request. + RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` } -// SetTagging sets the Tagging field's value. -func (s *PutObjectInput) SetTagging(v string) *PutObjectInput { - s.Tagging = &v - return s +// String returns the string representation +func (s PutObjectLockConfigurationOutput) String() string { + return awsutil.Prettify(s) } -// SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value. -func (s *PutObjectInput) SetWebsiteRedirectLocation(v string) *PutObjectInput { - s.WebsiteRedirectLocation = &v +// GoString returns the string representation +func (s PutObjectLockConfigurationOutput) GoString() string { + return s.String() +} + +// SetRequestCharged sets the RequestCharged field's value. +func (s *PutObjectLockConfigurationOutput) SetRequestCharged(v string) *PutObjectLockConfigurationOutput { + s.RequestCharged = &v return s } @@ -18617,7 +20748,7 @@ type PutObjectOutput struct { // If present, specifies the ID of the AWS Key Management Service (KMS) master // encryption key that was used for the object. - SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"` + SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` // The Server-side encryption algorithm used when storing this object in S3 // (e.g., AES256, aws:kms). @@ -18655,36 +20786,167 @@ func (s *PutObjectOutput) SetRequestCharged(v string) *PutObjectOutput { return s } -// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. -func (s *PutObjectOutput) SetSSECustomerAlgorithm(v string) *PutObjectOutput { - s.SSECustomerAlgorithm = &v +// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value. +func (s *PutObjectOutput) SetSSECustomerAlgorithm(v string) *PutObjectOutput { + s.SSECustomerAlgorithm = &v + return s +} + +// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. +func (s *PutObjectOutput) SetSSECustomerKeyMD5(v string) *PutObjectOutput { + s.SSECustomerKeyMD5 = &v + return s +} + +// SetSSEKMSKeyId sets the SSEKMSKeyId field's value. +func (s *PutObjectOutput) SetSSEKMSKeyId(v string) *PutObjectOutput { + s.SSEKMSKeyId = &v + return s +} + +// SetServerSideEncryption sets the ServerSideEncryption field's value. +func (s *PutObjectOutput) SetServerSideEncryption(v string) *PutObjectOutput { + s.ServerSideEncryption = &v + return s +} + +// SetVersionId sets the VersionId field's value. +func (s *PutObjectOutput) SetVersionId(v string) *PutObjectOutput { + s.VersionId = &v + return s +} + +type PutObjectRetentionInput struct { + _ struct{} `type:"structure" payload:"Retention"` + + // The bucket that contains the object you want to apply this Object Retention + // configuration to. + // + // Bucket is a required field + Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` + + // Indicates whether this operation should bypass Governance-mode restrictions.j + BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"` + + // The key name for the object that you want to apply this Object Retention + // configuration to. + // + // Key is a required field + Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` + + // Confirms that the requester knows that she or he will be charged for the + // request. Bucket owners need not specify this parameter in their requests. + // Documentation on downloading objects from requester pays buckets can be found + // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html + RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` + + // The container element for the Object Retention configuration. + Retention *ObjectLockRetention `locationName:"Retention" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` + + // The version ID for the object that you want to apply this Object Retention + // configuration to. + VersionId *string `location:"querystring" locationName:"versionId" type:"string"` +} + +// String returns the string representation +func (s PutObjectRetentionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutObjectRetentionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutObjectRetentionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutObjectRetentionInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBucket sets the Bucket field's value. +func (s *PutObjectRetentionInput) SetBucket(v string) *PutObjectRetentionInput { + s.Bucket = &v + return s +} + +func (s *PutObjectRetentionInput) getBucket() (v string) { + if s.Bucket == nil { + return v + } + return *s.Bucket +} + +// SetBypassGovernanceRetention sets the BypassGovernanceRetention field's value. +func (s *PutObjectRetentionInput) SetBypassGovernanceRetention(v bool) *PutObjectRetentionInput { + s.BypassGovernanceRetention = &v return s } -// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value. -func (s *PutObjectOutput) SetSSECustomerKeyMD5(v string) *PutObjectOutput { - s.SSECustomerKeyMD5 = &v +// SetKey sets the Key field's value. +func (s *PutObjectRetentionInput) SetKey(v string) *PutObjectRetentionInput { + s.Key = &v return s } -// SetSSEKMSKeyId sets the SSEKMSKeyId field's value. -func (s *PutObjectOutput) SetSSEKMSKeyId(v string) *PutObjectOutput { - s.SSEKMSKeyId = &v +// SetRequestPayer sets the RequestPayer field's value. +func (s *PutObjectRetentionInput) SetRequestPayer(v string) *PutObjectRetentionInput { + s.RequestPayer = &v return s } -// SetServerSideEncryption sets the ServerSideEncryption field's value. -func (s *PutObjectOutput) SetServerSideEncryption(v string) *PutObjectOutput { - s.ServerSideEncryption = &v +// SetRetention sets the Retention field's value. +func (s *PutObjectRetentionInput) SetRetention(v *ObjectLockRetention) *PutObjectRetentionInput { + s.Retention = v return s } // SetVersionId sets the VersionId field's value. -func (s *PutObjectOutput) SetVersionId(v string) *PutObjectOutput { +func (s *PutObjectRetentionInput) SetVersionId(v string) *PutObjectRetentionInput { s.VersionId = &v return s } +type PutObjectRetentionOutput struct { + _ struct{} `type:"structure"` + + // If present, indicates that the requester was successfully charged for the + // request. + RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"` +} + +// String returns the string representation +func (s PutObjectRetentionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutObjectRetentionOutput) GoString() string { + return s.String() +} + +// SetRequestCharged sets the RequestCharged field's value. +func (s *PutObjectRetentionOutput) SetRequestCharged(v string) *PutObjectRetentionOutput { + s.RequestCharged = &v + return s +} + type PutObjectTaggingInput struct { _ struct{} `type:"structure" payload:"Tagging"` @@ -18716,6 +20978,9 @@ func (s *PutObjectTaggingInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } @@ -18790,25 +21055,107 @@ func (s *PutObjectTaggingOutput) SetVersionId(v string) *PutObjectTaggingOutput return s } -// Container for specifying an configuration when you want Amazon S3 to publish -// events to an Amazon Simple Queue Service (Amazon SQS) queue. +type PutPublicAccessBlockInput struct { + _ struct{} `type:"structure" payload:"PublicAccessBlockConfiguration"` + + // The name of the Amazon S3 bucket whose PublicAccessBlock configuration you + // want to set. + // + // Bucket is a required field + Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` + + // The PublicAccessBlock configuration that you want to apply to this Amazon + // S3 bucket. You can enable the configuration options in any combination. For + // more information about when Amazon S3 considers a bucket or object public, + // see The Meaning of "Public" (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status) + // in the Amazon Simple Storage Service Developer Guide. + // + // PublicAccessBlockConfiguration is a required field + PublicAccessBlockConfiguration *PublicAccessBlockConfiguration `locationName:"PublicAccessBlockConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` +} + +// String returns the string representation +func (s PutPublicAccessBlockInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutPublicAccessBlockInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutPublicAccessBlockInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutPublicAccessBlockInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } + if s.PublicAccessBlockConfiguration == nil { + invalidParams.Add(request.NewErrParamRequired("PublicAccessBlockConfiguration")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBucket sets the Bucket field's value. +func (s *PutPublicAccessBlockInput) SetBucket(v string) *PutPublicAccessBlockInput { + s.Bucket = &v + return s +} + +func (s *PutPublicAccessBlockInput) getBucket() (v string) { + if s.Bucket == nil { + return v + } + return *s.Bucket +} + +// SetPublicAccessBlockConfiguration sets the PublicAccessBlockConfiguration field's value. +func (s *PutPublicAccessBlockInput) SetPublicAccessBlockConfiguration(v *PublicAccessBlockConfiguration) *PutPublicAccessBlockInput { + s.PublicAccessBlockConfiguration = v + return s +} + +type PutPublicAccessBlockOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s PutPublicAccessBlockOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutPublicAccessBlockOutput) GoString() string { + return s.String() +} + +// A container for specifying the configuration for publication of messages +// to an Amazon Simple Queue Service (Amazon SQS) queue.when Amazon S3 detects +// specified events. type QueueConfiguration struct { _ struct{} `type:"structure"` // Events is a required field Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"` - // Container for object key name filtering rules. For information about key - // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) + // A container for object key name filtering rules. For information about key + // name filtering, see Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) // in the Amazon Simple Storage Service Developer Guide. Filter *NotificationConfigurationFilter `type:"structure"` - // Optional unique identifier for configurations in a notification configuration. + // An optional unique identifier for configurations in a notification configuration. // If you don't provide one, Amazon S3 will assign an ID. Id *string `type:"string"` - // Amazon SQS queue ARN to which Amazon S3 will publish a message when it detects - // events of specified type. + // The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3 + // will publish a message when it detects events of the specified type. // // QueueArn is a required field QueueArn *string `locationName:"Queue" type:"string" required:"true"` @@ -18867,14 +21214,14 @@ func (s *QueueConfiguration) SetQueueArn(v string) *QueueConfiguration { type QueueConfigurationDeprecated struct { _ struct{} `type:"structure"` - // Bucket event for which to send notifications. + // The bucket event for which to send notifications. // // Deprecated: Event has been deprecated Event *string `deprecated:"true" type:"string" enum:"Event"` Events []*string `locationName:"Event" type:"list" flattened:"true"` - // Optional unique identifier for configurations in a notification configuration. + // An optional unique identifier for configurations in a notification configuration. // If you don't provide one, Amazon S3 will assign an ID. Id *string `type:"string"` @@ -19070,19 +21417,19 @@ func (s *RedirectAllRequestsTo) SetProtocol(v string) *RedirectAllRequestsTo { return s } -// Container for replication rules. You can add as many as 1,000 rules. Total -// replication configuration size can be up to 2 MB. +// A container for replication rules. You can add up to 1,000 rules. The maximum +// size of a replication configuration is 2 MB. type ReplicationConfiguration struct { _ struct{} `type:"structure"` - // Amazon Resource Name (ARN) of an IAM role for Amazon S3 to assume when replicating - // the objects. + // The Amazon Resource Name (ARN) of the AWS Identity and Access Management + // (IAM) role that Amazon S3 can assume when replicating the objects. // // Role is a required field Role *string `type:"string" required:"true"` - // Container for information about a particular replication rule. Replication - // configuration must have at least one rule and can contain up to 1,000 rules. + // A container for one or more replication rules. A replication configuration + // must have at least one rule and can contain a maximum of 1,000 rules. // // Rules is a required field Rules []*ReplicationRule `locationName:"Rule" type:"list" flattened:"true" required:"true"` @@ -19136,29 +21483,57 @@ func (s *ReplicationConfiguration) SetRules(v []*ReplicationRule) *ReplicationCo return s } -// Container for information about a particular replication rule. +// A container for information about a specific replication rule. type ReplicationRule struct { _ struct{} `type:"structure"` - // Container for replication destination information. + // Specifies whether Amazon S3 should replicate delete makers. + DeleteMarkerReplication *DeleteMarkerReplication `type:"structure"` + + // A container for information about the replication destination. // // Destination is a required field Destination *Destination `type:"structure" required:"true"` - // Unique identifier for the rule. The value cannot be longer than 255 characters. + // A filter that identifies the subset of objects to which the replication rule + // applies. A Filter must specify exactly one Prefix, Tag, or an And child element. + Filter *ReplicationRuleFilter `type:"structure"` + + // A unique identifier for the rule. The maximum value is 255 characters. ID *string `type:"string"` - // Object keyname prefix identifying one or more objects to which the rule applies. - // Maximum prefix length can be up to 1,024 characters. Overlapping prefixes - // are not supported. + // An object keyname prefix that identifies the object or objects to which the + // rule applies. The maximum prefix length is 1,024 characters. // - // Prefix is a required field - Prefix *string `type:"string" required:"true"` + // Deprecated: Prefix has been deprecated + Prefix *string `deprecated:"true" type:"string"` - // Container for filters that define which source objects should be replicated. + // The priority associated with the rule. If you specify multiple rules in a + // replication configuration, Amazon S3 prioritizes the rules to prevent conflicts + // when filtering. If two or more rules identify the same object based on a + // specified filter, the rule with higher priority takes precedence. For example: + // + // * Same object quality prefix based filter criteria If prefixes you specified + // in multiple rules overlap + // + // * Same object qualify tag based filter criteria specified in multiple + // rules + // + // For more information, see Cross-Region Replication (CRR) ( https://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html) + // in the Amazon S3 Developer Guide. + Priority *int64 `type:"integer"` + + // A container that describes additional filters for identifying the source + // objects that you want to replicate. You can choose to enable or disable the + // replication of these objects. Currently, Amazon S3 supports only the filter + // that you can specify for objects created with server-side encryption using + // an AWS KMS-Managed Key (SSE-KMS). + // + // If you want Amazon S3 to replicate objects created with server-side encryption + // using AWS KMS-Managed Keys. SourceSelectionCriteria *SourceSelectionCriteria `type:"structure"` - // The rule is ignored if status is not Enabled. + // If status isn't enabled, the rule is ignored. // // Status is a required field Status *string `type:"string" required:"true" enum:"ReplicationRuleStatus"` @@ -19180,9 +21555,6 @@ func (s *ReplicationRule) Validate() error { if s.Destination == nil { invalidParams.Add(request.NewErrParamRequired("Destination")) } - if s.Prefix == nil { - invalidParams.Add(request.NewErrParamRequired("Prefix")) - } if s.Status == nil { invalidParams.Add(request.NewErrParamRequired("Status")) } @@ -19191,6 +21563,11 @@ func (s *ReplicationRule) Validate() error { invalidParams.AddNested("Destination", err.(request.ErrInvalidParams)) } } + if s.Filter != nil { + if err := s.Filter.Validate(); err != nil { + invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) + } + } if s.SourceSelectionCriteria != nil { if err := s.SourceSelectionCriteria.Validate(); err != nil { invalidParams.AddNested("SourceSelectionCriteria", err.(request.ErrInvalidParams)) @@ -19203,12 +21580,24 @@ func (s *ReplicationRule) Validate() error { return nil } +// SetDeleteMarkerReplication sets the DeleteMarkerReplication field's value. +func (s *ReplicationRule) SetDeleteMarkerReplication(v *DeleteMarkerReplication) *ReplicationRule { + s.DeleteMarkerReplication = v + return s +} + // SetDestination sets the Destination field's value. func (s *ReplicationRule) SetDestination(v *Destination) *ReplicationRule { s.Destination = v return s } +// SetFilter sets the Filter field's value. +func (s *ReplicationRule) SetFilter(v *ReplicationRuleFilter) *ReplicationRule { + s.Filter = v + return s +} + // SetID sets the ID field's value. func (s *ReplicationRule) SetID(v string) *ReplicationRule { s.ID = &v @@ -19221,6 +21610,12 @@ func (s *ReplicationRule) SetPrefix(v string) *ReplicationRule { return s } +// SetPriority sets the Priority field's value. +func (s *ReplicationRule) SetPriority(v int64) *ReplicationRule { + s.Priority = &v + return s +} + // SetSourceSelectionCriteria sets the SourceSelectionCriteria field's value. func (s *ReplicationRule) SetSourceSelectionCriteria(v *SourceSelectionCriteria) *ReplicationRule { s.SourceSelectionCriteria = v @@ -19233,6 +21628,130 @@ func (s *ReplicationRule) SetStatus(v string) *ReplicationRule { return s } +type ReplicationRuleAndOperator struct { + _ struct{} `type:"structure"` + + Prefix *string `type:"string"` + + Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"` +} + +// String returns the string representation +func (s ReplicationRuleAndOperator) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReplicationRuleAndOperator) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ReplicationRuleAndOperator) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReplicationRuleAndOperator"} + 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 +} + +// SetPrefix sets the Prefix field's value. +func (s *ReplicationRuleAndOperator) SetPrefix(v string) *ReplicationRuleAndOperator { + s.Prefix = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *ReplicationRuleAndOperator) SetTags(v []*Tag) *ReplicationRuleAndOperator { + s.Tags = v + return s +} + +// A filter that identifies the subset of objects to which the replication rule +// applies. A Filter must specify exactly one Prefix, Tag, or an And child element. +type ReplicationRuleFilter struct { + _ struct{} `type:"structure"` + + // A container for specifying rule filters. The filters determine the subset + // of objects to which the rule applies. This element is required only if you + // specify more than one filter. For example: + // + // * If you specify both a Prefix and a Tag filter, wrap these filters in + // an And tag. + // + // * If you specify a filter based on multiple tags, wrap the Tag elements + // in an And tag. + And *ReplicationRuleAndOperator `type:"structure"` + + // An object keyname prefix that identifies the subset of objects to which the + // rule applies. + Prefix *string `type:"string"` + + // A container for specifying a tag key and value. + // + // The rule applies only to objects that have the tag in their tag set. + Tag *Tag `type:"structure"` +} + +// String returns the string representation +func (s ReplicationRuleFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReplicationRuleFilter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ReplicationRuleFilter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReplicationRuleFilter"} + if s.And != nil { + if err := s.And.Validate(); err != nil { + invalidParams.AddNested("And", err.(request.ErrInvalidParams)) + } + } + if s.Tag != nil { + if err := s.Tag.Validate(); err != nil { + invalidParams.AddNested("Tag", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAnd sets the And field's value. +func (s *ReplicationRuleFilter) SetAnd(v *ReplicationRuleAndOperator) *ReplicationRuleFilter { + s.And = v + return s +} + +// SetPrefix sets the Prefix field's value. +func (s *ReplicationRuleFilter) SetPrefix(v string) *ReplicationRuleFilter { + s.Prefix = &v + return s +} + +// SetTag sets the Tag field's value. +func (s *ReplicationRuleFilter) SetTag(v *Tag) *ReplicationRuleFilter { + s.Tag = v + return s +} + type RequestPaymentConfiguration struct { _ struct{} `type:"structure"` @@ -19332,6 +21851,9 @@ func (s *RestoreObjectInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } @@ -19537,7 +22059,7 @@ type RoutingRule struct { // Container for redirect information. You can redirect requests to another // host, to another page, or with another protocol. In the event of an error, - // you can can specify a different error code to return. + // you can specify a different error code to return. // // Redirect is a required field Redirect *Redirect `type:"structure" required:"true"` @@ -19598,11 +22120,11 @@ type Rule struct { NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"` // Container for the transition rule that describes when noncurrent objects - // transition to the STANDARD_IA, ONEZONE_IA or GLACIER storage class. If your - // bucket is versioning-enabled (or versioning is suspended), you can set this - // action to request that Amazon S3 transition noncurrent object versions to - // the STANDARD_IA, ONEZONE_IA or GLACIER storage class at a specific period - // in the object's lifetime. + // transition to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING or GLACIER + // storage class. If your bucket is versioning-enabled (or versioning is suspended), + // you can set this action to request that Amazon S3 transition noncurrent object + // versions to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING or GLACIER storage + // class at a specific period in the object's lifetime. NoncurrentVersionTransition *NoncurrentVersionTransition `type:"structure"` // Prefix identifying one or more objects to which the rule applies. @@ -19693,7 +22215,7 @@ func (s *Rule) SetTransition(v *Transition) *Rule { return s } -// Specifies the use of SSE-KMS to encrypt delievered Inventory reports. +// Specifies the use of SSE-KMS to encrypt delivered Inventory reports. type SSEKMS struct { _ struct{} `locationName:"SSE-KMS" type:"structure"` @@ -19701,7 +22223,7 @@ type SSEKMS struct { // key to use for encrypting Inventory reports. // // KeyId is a required field - KeyId *string `type:"string" required:"true"` + KeyId *string `type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -19733,7 +22255,7 @@ func (s *SSEKMS) SetKeyId(v string) *SSEKMS { return s } -// Specifies the use of SSE-S3 to encrypt delievered Inventory reports. +// Specifies the use of SSE-S3 to encrypt delivered Inventory reports. type SSES3 struct { _ struct{} `locationName:"SSE-S3" type:"structure"` } @@ -19850,7 +22372,7 @@ type SelectObjectContentEventStreamReader interface { // HTTP this will also close the HTTP connection. Close() error - // Returns any error that has occured while reading from the event stream. + // Returns any error that has occurred while reading from the event stream. Err() error } @@ -19970,15 +22492,15 @@ func (r *readSelectObjectContentEventStream) unmarshalerForEventType( // Request to filter the contents of an Amazon S3 object based on a simple Structured // Query Language (SQL) statement. In the request, along with the SQL expression, -// you must also specify a data serialization format (JSON or CSV) of the object. -// Amazon S3 uses this to parse object data into records, and returns only records +// you must specify a data serialization format (JSON or CSV) of the object. +// Amazon S3 uses this to parse object data into records. It returns only records // that match the specified SQL expression. You must also specify the data serialization -// format for the response. For more information, go to S3Select API Documentation +// format for the response. For more information, see S3Select API Documentation // (http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectSELECTContent.html). type SelectObjectContentInput struct { _ struct{} `locationName:"SelectObjectContentRequest" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"` - // The S3 Bucket. + // The S3 bucket. // // Bucket is a required field Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` @@ -19988,7 +22510,7 @@ type SelectObjectContentInput struct { // Expression is a required field Expression *string `type:"string" required:"true"` - // The type of the provided expression (e.g., SQL). + // The type of the provided expression (for example., SQL). // // ExpressionType is a required field ExpressionType *string `type:"string" required:"true" enum:"ExpressionType"` @@ -19998,7 +22520,7 @@ type SelectObjectContentInput struct { // InputSerialization is a required field InputSerialization *InputSerialization `type:"structure" required:"true"` - // The Object Key. + // The object key. // // Key is a required field Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"` @@ -20011,15 +22533,15 @@ type SelectObjectContentInput struct { // Specifies if periodic request progress information should be enabled. RequestProgress *RequestProgress `type:"structure"` - // The SSE Algorithm used to encrypt the object. For more information, go to - // Server-Side Encryption (Using Customer-Provided Encryption Keys (http://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html). + // The SSE Algorithm used to encrypt the object. For more information, see + // Server-Side Encryption (Using Customer-Provided Encryption Keys (http://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html). SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` - // The SSE Customer Key. For more information, go to Server-Side Encryption - // (Using Customer-Provided Encryption Keys (http://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html). - SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"` + // The SSE Customer Key. For more information, see Server-Side Encryption (Using + // Customer-Provided Encryption Keys (http://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html). + SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"` - // The SSE Customer Key MD5. For more information, go to Server-Side Encryption + // The SSE Customer Key MD5. For more information, see Server-Side Encryption // (Using Customer-Provided Encryption Keys (http://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html). SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"` } @@ -20040,6 +22562,9 @@ func (s *SelectObjectContentInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.Expression == nil { invalidParams.Add(request.NewErrParamRequired("Expression")) } @@ -20270,7 +22795,7 @@ type ServerSideEncryptionByDefault struct { // KMS master key ID to use for the default encryption. This parameter is allowed // if SSEAlgorithm is aws:kms. - KMSMasterKeyID *string `type:"string"` + KMSMasterKeyID *string `type:"string" sensitive:"true"` // Server-side encryption algorithm to use for the default encryption. // @@ -20406,11 +22931,13 @@ func (s *ServerSideEncryptionRule) SetApplyServerSideEncryptionByDefault(v *Serv return s } -// Container for filters that define which source objects should be replicated. +// A container for filters that define which source objects should be replicated. type SourceSelectionCriteria struct { _ struct{} `type:"structure"` - // Container for filter information of selection of KMS Encrypted S3 objects. + // A container for filter information for the selection of S3 objects encrypted + // with AWS KMS. If you include SourceSelectionCriteria in the replication configuration, + // this element is required. SseKmsEncryptedObjects *SseKmsEncryptedObjects `type:"structure"` } @@ -20445,12 +22972,13 @@ func (s *SourceSelectionCriteria) SetSseKmsEncryptedObjects(v *SseKmsEncryptedOb return s } -// Container for filter information of selection of KMS Encrypted S3 objects. +// A container for filter information for the selection of S3 objects encrypted +// with AWS KMS. type SseKmsEncryptedObjects struct { _ struct{} `type:"structure"` - // The replication for KMS encrypted S3 objects is disabled if status is not - // Enabled. + // If the status is not Enabled, replication for S3 objects encrypted with AWS + // KMS is disabled. // // Status is a required field Status *string `type:"string" required:"true" enum:"SseKmsEncryptedObjectsStatus"` @@ -20488,13 +23016,13 @@ func (s *SseKmsEncryptedObjects) SetStatus(v string) *SseKmsEncryptedObjects { type Stats struct { _ struct{} `type:"structure"` - // Total number of uncompressed object bytes processed. + // The total number of uncompressed object bytes processed. BytesProcessed *int64 `type:"long"` - // Total number of bytes of records payload data returned. + // The total number of bytes of records payload data returned. BytesReturned *int64 `type:"long"` - // Total number of object bytes scanned. + // The total number of object bytes scanned. BytesScanned *int64 `type:"long"` } @@ -20809,25 +23337,26 @@ func (s *TargetGrant) SetPermission(v string) *TargetGrant { return s } -// Container for specifying the configuration when you want Amazon S3 to publish -// events to an Amazon Simple Notification Service (Amazon SNS) topic. +// A container for specifying the configuration for publication of messages +// to an Amazon Simple Notification Service (Amazon SNS) topic.when Amazon S3 +// detects specified events. type TopicConfiguration struct { _ struct{} `type:"structure"` // Events is a required field Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"` - // Container for object key name filtering rules. For information about key - // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) + // A container for object key name filtering rules. For information about key + // name filtering, see Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) // in the Amazon Simple Storage Service Developer Guide. Filter *NotificationConfigurationFilter `type:"structure"` - // Optional unique identifier for configurations in a notification configuration. + // An optional unique identifier for configurations in a notification configuration. // If you don't provide one, Amazon S3 will assign an ID. Id *string `type:"string"` - // Amazon SNS topic ARN to which Amazon S3 will publish a message when it detects - // events of specified type. + // The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3 + // will publish a message when it detects events of the specified type. // // TopicArn is a required field TopicArn *string `locationName:"Topic" type:"string" required:"true"` @@ -20893,7 +23422,7 @@ type TopicConfigurationDeprecated struct { Events []*string `locationName:"Event" type:"list" flattened:"true"` - // Optional unique identifier for configurations in a notification configuration. + // An optional unique identifier for configurations in a notification configuration. // If you don't provide one, Amazon S3 will assign an ID. Id *string `type:"string"` @@ -21017,7 +23546,7 @@ type UploadPartCopyInput struct { // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt // the source object. The encryption key provided in this header must be one // that was used when the source object was created. - CopySourceSSECustomerKey *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string"` + CopySourceSSECustomerKey *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string" sensitive:"true"` // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. // Amazon S3 uses this header for a message integrity check to ensure the encryption @@ -21048,7 +23577,7 @@ type UploadPartCopyInput struct { // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm // header. This must be the same encryption key specified in the initiate multipart // upload request. - SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"` + SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"` // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. // Amazon S3 uses this header for a message integrity check to ensure the encryption @@ -21077,6 +23606,9 @@ func (s *UploadPartCopyInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.CopySource == nil { invalidParams.Add(request.NewErrParamRequired("CopySource")) } @@ -21247,7 +23779,7 @@ type UploadPartCopyOutput struct { // If present, specifies the ID of the AWS Key Management Service (KMS) master // encryption key that was used for the object. - SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"` + SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` // The Server-side encryption algorithm used when storing this object in S3 // (e.g., AES256, aws:kms). @@ -21350,7 +23882,7 @@ type UploadPartInput struct { // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm // header. This must be the same encryption key specified in the initiate multipart // upload request. - SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"` + SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"` // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. // Amazon S3 uses this header for a message integrity check to ensure the encryption @@ -21379,6 +23911,9 @@ func (s *UploadPartInput) Validate() error { if s.Bucket == nil { invalidParams.Add(request.NewErrParamRequired("Bucket")) } + if s.Bucket != nil && len(*s.Bucket) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Bucket", 1)) + } if s.Key == nil { invalidParams.Add(request.NewErrParamRequired("Key")) } @@ -21500,7 +24035,7 @@ type UploadPartOutput struct { // If present, specifies the ID of the AWS Key Management Service (KMS) master // encryption key that was used for the object. - SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"` + SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"` // The Server-side encryption algorithm used when storing this object in S3 // (e.g., AES256, aws:kms). @@ -21760,6 +24295,14 @@ const ( CompressionTypeBzip2 = "BZIP2" ) +const ( + // DeleteMarkerReplicationStatusEnabled is a DeleteMarkerReplicationStatus enum value + DeleteMarkerReplicationStatusEnabled = "Enabled" + + // DeleteMarkerReplicationStatusDisabled is a DeleteMarkerReplicationStatus enum value + DeleteMarkerReplicationStatusDisabled = "Disabled" +) + // Requests Amazon S3 to encode the object keys in the response and specifies // the encoding method to use. An object key may contain any Unicode character; // however, XML 1.0 parser cannot parse some characters, such as characters @@ -21771,7 +24314,7 @@ const ( EncodingTypeUrl = "url" ) -// Bucket event for which to send notifications. +// The bucket event for which to send notifications. const ( // EventS3ReducedRedundancyLostObject is a Event enum value EventS3ReducedRedundancyLostObject = "s3:ReducedRedundancyLostObject" @@ -21799,6 +24342,12 @@ const ( // EventS3ObjectRemovedDeleteMarkerCreated is a Event enum value EventS3ObjectRemovedDeleteMarkerCreated = "s3:ObjectRemoved:DeleteMarkerCreated" + + // EventS3ObjectRestorePost is a Event enum value + EventS3ObjectRestorePost = "s3:ObjectRestore:Post" + + // EventS3ObjectRestoreCompleted is a Event enum value + EventS3ObjectRestoreCompleted = "s3:ObjectRestore:Completed" ) const ( @@ -21839,6 +24388,9 @@ const ( // InventoryFormatOrc is a InventoryFormat enum value InventoryFormatOrc = "ORC" + + // InventoryFormatParquet is a InventoryFormat enum value + InventoryFormatParquet = "Parquet" ) const ( @@ -21878,6 +24430,15 @@ const ( // InventoryOptionalFieldEncryptionStatus is a InventoryOptionalField enum value InventoryOptionalFieldEncryptionStatus = "EncryptionStatus" + + // InventoryOptionalFieldObjectLockRetainUntilDate is a InventoryOptionalField enum value + InventoryOptionalFieldObjectLockRetainUntilDate = "ObjectLockRetainUntilDate" + + // InventoryOptionalFieldObjectLockMode is a InventoryOptionalField enum value + InventoryOptionalFieldObjectLockMode = "ObjectLockMode" + + // InventoryOptionalFieldObjectLockLegalHoldStatus is a InventoryOptionalField enum value + InventoryOptionalFieldObjectLockLegalHoldStatus = "ObjectLockLegalHoldStatus" ) const ( @@ -21935,6 +24496,35 @@ const ( ObjectCannedACLBucketOwnerFullControl = "bucket-owner-full-control" ) +const ( + // ObjectLockEnabledEnabled is a ObjectLockEnabled enum value + ObjectLockEnabledEnabled = "Enabled" +) + +const ( + // ObjectLockLegalHoldStatusOn is a ObjectLockLegalHoldStatus enum value + ObjectLockLegalHoldStatusOn = "ON" + + // ObjectLockLegalHoldStatusOff is a ObjectLockLegalHoldStatus enum value + ObjectLockLegalHoldStatusOff = "OFF" +) + +const ( + // ObjectLockModeGovernance is a ObjectLockMode enum value + ObjectLockModeGovernance = "GOVERNANCE" + + // ObjectLockModeCompliance is a ObjectLockMode enum value + ObjectLockModeCompliance = "COMPLIANCE" +) + +const ( + // ObjectLockRetentionModeGovernance is a ObjectLockRetentionMode enum value + ObjectLockRetentionModeGovernance = "GOVERNANCE" + + // ObjectLockRetentionModeCompliance is a ObjectLockRetentionMode enum value + ObjectLockRetentionModeCompliance = "COMPLIANCE" +) + const ( // ObjectStorageClassStandard is a ObjectStorageClass enum value ObjectStorageClassStandard = "STANDARD" @@ -21950,6 +24540,9 @@ const ( // ObjectStorageClassOnezoneIa is a ObjectStorageClass enum value ObjectStorageClassOnezoneIa = "ONEZONE_IA" + + // ObjectStorageClassIntelligentTiering is a ObjectStorageClass enum value + ObjectStorageClassIntelligentTiering = "INTELLIGENT_TIERING" ) const ( @@ -22074,6 +24667,12 @@ const ( // StorageClassOnezoneIa is a StorageClass enum value StorageClassOnezoneIa = "ONEZONE_IA" + + // StorageClassIntelligentTiering is a StorageClass enum value + StorageClassIntelligentTiering = "INTELLIGENT_TIERING" + + // StorageClassGlacier is a StorageClass enum value + StorageClassGlacier = "GLACIER" ) const ( @@ -22109,6 +24708,9 @@ const ( // TransitionStorageClassOnezoneIa is a TransitionStorageClass enum value TransitionStorageClassOnezoneIa = "ONEZONE_IA" + + // TransitionStorageClassIntelligentTiering is a TransitionStorageClass enum value + TransitionStorageClassIntelligentTiering = "INTELLIGENT_TIERING" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go b/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go index a55beab96d..95f2456363 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go @@ -3,6 +3,7 @@ package s3 import ( "github.com/aws/aws-sdk-go/aws/client" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/internal/s3err" ) func init() { @@ -21,6 +22,7 @@ func defaultInitClientFn(c *client.Client) { // S3 uses custom error unmarshaling logic c.Handlers.UnmarshalError.Clear() c.Handlers.UnmarshalError.PushBack(unmarshalError) + c.Handlers.UnmarshalError.PushBackNamed(s3err.RequestFailureWrapperHandler()) } func defaultInitRequestFn(r *request.Request) { @@ -31,6 +33,7 @@ func defaultInitRequestFn(r *request.Request) { switch r.Operation.Name { case opPutBucketCors, opPutBucketLifecycle, opPutBucketPolicy, opPutBucketTagging, opDeleteObjects, opPutBucketLifecycleConfiguration, + opPutObjectLegalHold, opPutObjectRetention, opPutObjectLockConfiguration, opPutBucketReplication: // These S3 operations require Content-MD5 to be set r.Handlers.Build.PushBack(contentMD5) @@ -42,6 +45,7 @@ func defaultInitRequestFn(r *request.Request) { r.Handlers.Validate.PushFront(populateLocationConstraint) case opCopyObject, opUploadPartCopy, opCompleteMultipartUpload: r.Handlers.Unmarshal.PushFront(copyMultipartStatusOKUnmarhsalError) + r.Handlers.Unmarshal.PushBackNamed(s3err.RequestFailureWrapperHandler()) case opPutObject, opUploadPart: r.Handlers.Build.PushBack(computeBodyHashes) // Disabled until #1837 root issue is resolved. diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/service.go b/vendor/github.com/aws/aws-sdk-go/service/s3/service.go index 20de53f29d..d17dcc9dad 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/service.go @@ -67,7 +67,9 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio } // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Sign.PushBackNamed(v4.BuildNamedHandler(v4.SignRequestHandler.Name, func(s *v4.Signer) { + s.DisableURIPathEscaping = true + })) svc.Handlers.Build.PushBackNamed(restxml.BuildHandler) svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler) svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler) diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/statusok_error.go b/vendor/github.com/aws/aws-sdk-go/service/s3/statusok_error.go index 9f33efc6ca..fde3050f95 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/statusok_error.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/statusok_error.go @@ -13,7 +13,11 @@ import ( func copyMultipartStatusOKUnmarhsalError(r *request.Request) { b, err := ioutil.ReadAll(r.HTTPResponse.Body) if err != nil { - r.Error = awserr.New("SerializationError", "unable to read response body", err) + r.Error = awserr.NewRequestFailure( + awserr.New("SerializationError", "unable to read response body", err), + r.HTTPResponse.StatusCode, + r.RequestID, + ) return } body := bytes.NewReader(b) diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go b/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go index bcca8627af..12c0612c8d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go @@ -23,22 +23,17 @@ func unmarshalError(r *request.Request) { defer r.HTTPResponse.Body.Close() defer io.Copy(ioutil.Discard, r.HTTPResponse.Body) - hostID := r.HTTPResponse.Header.Get("X-Amz-Id-2") - // Bucket exists in a different region, and request needs // to be made to the correct region. if r.HTTPResponse.StatusCode == http.StatusMovedPermanently { - r.Error = requestFailure{ - RequestFailure: awserr.NewRequestFailure( - awserr.New("BucketRegionError", - fmt.Sprintf("incorrect region, the bucket is not in '%s' region", - aws.StringValue(r.Config.Region)), - nil), - r.HTTPResponse.StatusCode, - r.RequestID, - ), - hostID: hostID, - } + r.Error = awserr.NewRequestFailure( + awserr.New("BucketRegionError", + fmt.Sprintf("incorrect region, the bucket is not in '%s' region", + aws.StringValue(r.Config.Region)), + nil), + r.HTTPResponse.StatusCode, + r.RequestID, + ) return } @@ -63,14 +58,11 @@ func unmarshalError(r *request.Request) { errMsg = statusText } - r.Error = requestFailure{ - RequestFailure: awserr.NewRequestFailure( - awserr.New(errCode, errMsg, err), - r.HTTPResponse.StatusCode, - r.RequestID, - ), - hostID: hostID, - } + r.Error = awserr.NewRequestFailure( + awserr.New(errCode, errMsg, err), + r.HTTPResponse.StatusCode, + r.RequestID, + ) } // A RequestFailure provides access to the S3 Request ID and Host ID values @@ -83,21 +75,3 @@ type RequestFailure interface { // Host ID is the S3 Host ID needed for debug, and contacting support HostID() string } - -type requestFailure struct { - awserr.RequestFailure - - hostID string -} - -func (r requestFailure) Error() string { - extra := fmt.Sprintf("status code: %d, request id: %s, host id: %s", - r.StatusCode(), r.RequestID(), r.hostID) - return awserr.SprintError(r.Code(), r.Message(), extra, r.OrigErr()) -} -func (r requestFailure) String() string { - return r.Error() -} -func (r requestFailure) HostID() string { - return r.hostID -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go index 9060cef94b..1019d6f65f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/secretsmanager/api.go @@ -18,7 +18,7 @@ const opCancelRotateSecret = "CancelRotateSecret" // CancelRotateSecretRequest generates a "aws/request.Request" representing the // client's request for the CancelRotateSecret operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -157,7 +157,7 @@ const opCreateSecret = "CreateSecret" // CreateSecretRequest generates a "aws/request.Request" representing the // client's request for the CreateSecret operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -218,10 +218,11 @@ func (c *SecretsManager) CreateSecretRequest(input *CreateSecretInput) (req *req // that secret doesn't specify a AWS KMS encryption key, Secrets Manager uses // the account's default AWS managed customer master key (CMK) with the alias // aws/secretsmanager. If this key doesn't already exist in your account then -// Secrets Manager creates it for you automatically. All users in the same AWS -// account automatically have access to use the default CMK. Note that if an -// Secrets Manager API call results in AWS having to create the account's AWS-managed -// CMK, it can result in a one-time significant delay in returning the result. +// Secrets Manager creates it for you automatically. All users and roles in +// the same AWS account automatically have access to use the default CMK. Note +// that if an Secrets Manager API call results in AWS having to create the account's +// AWS-managed CMK, it can result in a one-time significant delay in returning +// the result. // // If the secret is in a different AWS account from the credentials calling // an API that requires encryption or decryption of the secret value then you @@ -248,6 +249,9 @@ func (c *SecretsManager) CreateSecretRequest(input *CreateSecretInput) (req *req // to encrypt the secret. You do not need this permission to use the account's // default AWS managed CMK for Secrets Manager. // +// * secretsmanager:TagResource - needed only if you include the Tags parameter. +// +// // Related operations // // * To delete a secret, use DeleteSecret. @@ -342,7 +346,7 @@ const opDeleteResourcePolicy = "DeleteResourcePolicy" // DeleteResourcePolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteResourcePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -452,7 +456,7 @@ const opDeleteSecret = "DeleteSecret" // DeleteSecretRequest generates a "aws/request.Request" representing the // client's request for the DeleteSecret operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -585,7 +589,7 @@ const opDescribeSecret = "DescribeSecret" // DescribeSecretRequest generates a "aws/request.Request" representing the // client's request for the DescribeSecret operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -685,7 +689,7 @@ const opGetRandomPassword = "GetRandomPassword" // GetRandomPasswordRequest generates a "aws/request.Request" representing the // client's request for the GetRandomPassword operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -789,7 +793,7 @@ const opGetResourcePolicy = "GetResourcePolicy" // GetResourcePolicyRequest generates a "aws/request.Request" representing the // client's request for the GetResourcePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -902,7 +906,7 @@ const opGetSecretValue = "GetSecretValue" // GetSecretValueRequest generates a "aws/request.Request" representing the // client's request for the GetSecretValue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1022,7 +1026,7 @@ const opListSecretVersionIds = "ListSecretVersionIds" // ListSecretVersionIdsRequest generates a "aws/request.Request" representing the // client's request for the ListSecretVersionIds operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1182,7 +1186,7 @@ const opListSecrets = "ListSecrets" // ListSecretsRequest generates a "aws/request.Request" representing the // client's request for the ListSecrets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1342,7 +1346,7 @@ const opPutResourcePolicy = "PutResourcePolicy" // PutResourcePolicyRequest generates a "aws/request.Request" representing the // client's request for the PutResourcePolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1468,7 +1472,7 @@ const opPutSecretValue = "PutSecretValue" // PutSecretValueRequest generates a "aws/request.Request" representing the // client's request for the PutSecretValue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1540,10 +1544,11 @@ func (c *SecretsManager) PutSecretValueRequest(input *PutSecretValueInput) (req // that secret doesn't specify a AWS KMS encryption key, Secrets Manager uses // the account's default AWS managed customer master key (CMK) with the alias // aws/secretsmanager. If this key doesn't already exist in your account then -// Secrets Manager creates it for you automatically. All users in the same AWS -// account automatically have access to use the default CMK. Note that if an -// Secrets Manager API call results in AWS having to create the account's AWS-managed -// CMK, it can result in a one-time significant delay in returning the result. +// Secrets Manager creates it for you automatically. All users and roles in +// the same AWS account automatically have access to use the default CMK. Note +// that if an Secrets Manager API call results in AWS having to create the account's +// AWS-managed CMK, it can result in a one-time significant delay in returning +// the result. // // If the secret is in a different AWS account from the credentials calling // an API that requires encryption or decryption of the secret value then you @@ -1647,7 +1652,7 @@ const opRestoreSecret = "RestoreSecret" // RestoreSecretRequest generates a "aws/request.Request" representing the // client's request for the RestoreSecret operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1756,7 +1761,7 @@ const opRotateSecret = "RotateSecret" // RotateSecretRequest generates a "aws/request.Request" representing the // client's request for the RotateSecret operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1909,7 +1914,7 @@ const opTagResource = "TagResource" // TagResourceRequest generates a "aws/request.Request" representing the // client's request for the TagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1943,8 +1948,7 @@ func (c *SecretsManager) TagResourceRequest(input *TagResourceInput) (req *reque output = &TagResourceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2051,7 +2055,7 @@ const opUntagResource = "UntagResource" // UntagResourceRequest generates a "aws/request.Request" representing the // client's request for the UntagResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2085,8 +2089,7 @@ func (c *SecretsManager) UntagResourceRequest(input *UntagResourceInput) (req *r output = &UntagResourceOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2172,7 +2175,7 @@ const opUpdateSecret = "UpdateSecret" // UpdateSecretRequest generates a "aws/request.Request" representing the // client's request for the UpdateSecret operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2235,10 +2238,11 @@ func (c *SecretsManager) UpdateSecretRequest(input *UpdateSecretInput) (req *req // that secret doesn't specify a AWS KMS encryption key, Secrets Manager uses // the account's default AWS managed customer master key (CMK) with the alias // aws/secretsmanager. If this key doesn't already exist in your account then -// Secrets Manager creates it for you automatically. All users in the same AWS -// account automatically have access to use the default CMK. Note that if an -// Secrets Manager API call results in AWS having to create the account's AWS-managed -// CMK, it can result in a one-time significant delay in returning the result. +// Secrets Manager creates it for you automatically. All users and roles in +// the same AWS account automatically have access to use the default CMK. Note +// that if an Secrets Manager API call results in AWS having to create the account's +// AWS-managed CMK, it can result in a one-time significant delay in returning +// the result. // // If the secret is in a different AWS account from the credentials calling // an API that requires encryption or decryption of the secret value then you @@ -2351,7 +2355,7 @@ const opUpdateSecretVersionStage = "UpdateSecretVersionStage" // UpdateSecretVersionStageRequest generates a "aws/request.Request" representing the // client's request for the UpdateSecretVersionStage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2487,6 +2491,18 @@ type CancelRotateSecretInput struct { // can specify either the Amazon Resource Name (ARN) or the friendly name of // the secret. // + // If you specify an ARN, we generally recommend that you specify a complete + // ARN. You can specify a partial ARN too—for example, if you don’t include + // the final hyphen and six random characters that Secrets Manager adds at the + // end of the ARN when you created the secret. A partial ARN match can work + // as long as it uniquely matches only one secret. However, if your secret has + // a name that ends in a hyphen followed by six characters (before Secrets Manager + // adds the hyphen and six characters to the ARN) and you try to use that as + // a partial ARN, then those characters cause Secrets Manager to assume that + // you’re specifying a complete ARN. This confusion can cause unexpected results. + // To avoid this situation, we recommend that you don’t create secret names + // that end with a hyphen followed by six characters. + // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` } @@ -2630,6 +2646,11 @@ type CreateSecretInput struct { // The secret name must be ASCII letters, digits, or the following characters // : /_+=.@- // + // Don't end your secret name with a hyphen followed by six characters. If you + // do so, you risk confusion and unexpected results when searching for a secret + // by partial ARN. This is because Secrets Manager automatically adds a hyphen + // and six random characters at the end of the ARN. + // // Name is a required field Name *string `min:"1" type:"string" required:"true"` @@ -2645,7 +2666,7 @@ type CreateSecretInput struct { // be accessed only by using the AWS CLI or one of the AWS SDKs. // // SecretBinary is automatically base64 encoded/decoded by the SDK. - SecretBinary []byte `type:"blob"` + SecretBinary []byte `type:"blob" sensitive:"true"` // (Optional) Specifies text data that you want to encrypt and store in this // new version of the secret. @@ -2669,7 +2690,7 @@ type CreateSecretInput struct { // If your command-line tool or SDK requires quotation marks around the parameter, // you should use single quotes to avoid confusion with the double quotes required // in the JSON text. - SecretString *string `type:"string"` + SecretString *string `type:"string" sensitive:"true"` // (Optional) Specifies a list of user-defined tags that are attached to the // secret. Each tag is a "Key" and "Value" pair of strings. This operation only @@ -2854,6 +2875,18 @@ type DeleteResourcePolicyInput struct { // policy for. You can specify either the Amazon Resource Name (ARN) or the // friendly name of the secret. // + // If you specify an ARN, we generally recommend that you specify a complete + // ARN. You can specify a partial ARN too—for example, if you don’t include + // the final hyphen and six random characters that Secrets Manager adds at the + // end of the ARN when you created the secret. A partial ARN match can work + // as long as it uniquely matches only one secret. However, if your secret has + // a name that ends in a hyphen followed by six characters (before Secrets Manager + // adds the hyphen and six characters to the ARN) and you try to use that as + // a partial ARN, then those characters cause Secrets Manager to assume that + // you’re specifying a complete ARN. This confusion can cause unexpected results. + // To avoid this situation, we recommend that you don’t create secret names + // that end with a hyphen followed by six characters. + // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` } @@ -2952,6 +2985,18 @@ type DeleteSecretInput struct { // Specifies the secret that you want to delete. You can specify either the // Amazon Resource Name (ARN) or the friendly name of the secret. // + // If you specify an ARN, we generally recommend that you specify a complete + // ARN. You can specify a partial ARN too—for example, if you don’t include + // the final hyphen and six random characters that Secrets Manager adds at the + // end of the ARN when you created the secret. A partial ARN match can work + // as long as it uniquely matches only one secret. However, if your secret has + // a name that ends in a hyphen followed by six characters (before Secrets Manager + // adds the hyphen and six characters to the ARN) and you try to use that as + // a partial ARN, then those characters cause Secrets Manager to assume that + // you’re specifying a complete ARN. This confusion can cause unexpected results. + // To avoid this situation, we recommend that you don’t create secret names + // that end with a hyphen followed by six characters. + // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` } @@ -3050,6 +3095,18 @@ type DescribeSecretInput struct { // specify either the Amazon Resource Name (ARN) or the friendly name of the // secret. // + // If you specify an ARN, we generally recommend that you specify a complete + // ARN. You can specify a partial ARN too—for example, if you don’t include + // the final hyphen and six random characters that Secrets Manager adds at the + // end of the ARN when you created the secret. A partial ARN match can work + // as long as it uniquely matches only one secret. However, if your secret has + // a name that ends in a hyphen followed by six characters (before Secrets Manager + // adds the hyphen and six characters to the ARN) and you try to use that as + // a partial ARN, then those characters cause Secrets Manager to assume that + // you’re specifying a complete ARN. This confusion can cause unexpected results. + // To avoid this situation, we recommend that you don’t create secret names + // that end with a hyphen followed by six characters. + // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` } @@ -3389,6 +3446,18 @@ type GetResourcePolicyInput struct { // policy for. You can specify either the Amazon Resource Name (ARN) or the // friendly name of the secret. // + // If you specify an ARN, we generally recommend that you specify a complete + // ARN. You can specify a partial ARN too—for example, if you don’t include + // the final hyphen and six random characters that Secrets Manager adds at the + // end of the ARN when you created the secret. A partial ARN match can work + // as long as it uniquely matches only one secret. However, if your secret has + // a name that ends in a hyphen followed by six characters (before Secrets Manager + // adds the hyphen and six characters to the ARN) and you try to use that as + // a partial ARN, then those characters cause Secrets Manager to assume that + // you’re specifying a complete ARN. This confusion can cause unexpected results. + // To avoid this situation, we recommend that you don’t create secret names + // that end with a hyphen followed by six characters. + // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` } @@ -3480,6 +3549,18 @@ type GetSecretValueInput struct { // can specify either the Amazon Resource Name (ARN) or the friendly name of // the secret. // + // If you specify an ARN, we generally recommend that you specify a complete + // ARN. You can specify a partial ARN too—for example, if you don’t include + // the final hyphen and six random characters that Secrets Manager adds at the + // end of the ARN when you created the secret. A partial ARN match can work + // as long as it uniquely matches only one secret. However, if your secret has + // a name that ends in a hyphen followed by six characters (before Secrets Manager + // adds the hyphen and six characters to the ARN) and you try to use that as + // a partial ARN, then those characters cause Secrets Manager to assume that + // you’re specifying a complete ARN. This confusion can cause unexpected results. + // To avoid this situation, we recommend that you don’t create secret names + // that end with a hyphen followed by six characters. + // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` @@ -3578,7 +3659,7 @@ type GetSecretValueOutput struct { // in the SecretString or SecretBinary fields. // // SecretBinary is automatically base64 encoded/decoded by the SDK. - SecretBinary []byte `type:"blob"` + SecretBinary []byte `type:"blob" sensitive:"true"` // The decrypted part of the protected secret information that was originally // provided as a string. @@ -3592,7 +3673,7 @@ type GetSecretValueOutput struct { // UpdateSecret, or PutSecretValue API operations instead of the Secrets Manager // console, or by using the Other secret type in the console, then you must // code your Lambda rotation function to parse and interpret those values. - SecretString *string `type:"string"` + SecretString *string `type:"string" sensitive:"true"` // The unique identifier of this version of the secret. VersionId *string `min:"32" type:"string"` @@ -3683,6 +3764,18 @@ type ListSecretVersionIdsInput struct { // can specify either the Amazon Resource Name (ARN) or the friendly name of // the secret. // + // If you specify an ARN, we generally recommend that you specify a complete + // ARN. You can specify a partial ARN too—for example, if you don’t include + // the final hyphen and six random characters that Secrets Manager adds at the + // end of the ARN when you created the secret. A partial ARN match can work + // as long as it uniquely matches only one secret. However, if your secret has + // a name that ends in a hyphen followed by six characters (before Secrets Manager + // adds the hyphen and six characters to the ARN) and you try to use that as + // a partial ARN, then those characters cause Secrets Manager to assume that + // you’re specifying a complete ARN. This confusion can cause unexpected results. + // To avoid this situation, we recommend that you don’t create secret names + // that end with a hyphen followed by six characters. + // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` } @@ -3919,6 +4012,18 @@ type PutResourcePolicyInput struct { // Specifies the secret that you want to attach the resource-based policy to. // You can specify either the ARN or the friendly name of the secret. // + // If you specify an ARN, we generally recommend that you specify a complete + // ARN. You can specify a partial ARN too—for example, if you don’t include + // the final hyphen and six random characters that Secrets Manager adds at the + // end of the ARN when you created the secret. A partial ARN match can work + // as long as it uniquely matches only one secret. However, if your secret has + // a name that ends in a hyphen followed by six characters (before Secrets Manager + // adds the hyphen and six characters to the ARN) and you try to use that as + // a partial ARN, then those characters cause Secrets Manager to assume that + // you’re specifying a complete ARN. This confusion can cause unexpected results. + // To avoid this situation, we recommend that you don’t create secret names + // that end with a hyphen followed by six characters. + // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` } @@ -4044,12 +4149,24 @@ type PutSecretValueInput struct { // console. // // SecretBinary is automatically base64 encoded/decoded by the SDK. - SecretBinary []byte `type:"blob"` + SecretBinary []byte `type:"blob" sensitive:"true"` // Specifies the secret to which you want to add a new version. You can specify // either the Amazon Resource Name (ARN) or the friendly name of the secret. // The secret must already exist. // + // If you specify an ARN, we generally recommend that you specify a complete + // ARN. You can specify a partial ARN too—for example, if you don’t include + // the final hyphen and six random characters that Secrets Manager adds at the + // end of the ARN when you created the secret. A partial ARN match can work + // as long as it uniquely matches only one secret. However, if your secret has + // a name that ends in a hyphen followed by six characters (before Secrets Manager + // adds the hyphen and six characters to the ARN) and you try to use that as + // a partial ARN, then those characters cause Secrets Manager to assume that + // you’re specifying a complete ARN. This confusion can cause unexpected results. + // To avoid this situation, we recommend that you don’t create secret names + // that end with a hyphen followed by six characters. + // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` @@ -4075,7 +4192,7 @@ type PutSecretValueInput struct { // If your command-line tool or SDK requires quotation marks around the parameter, // you should use single quotes to avoid confusion with the double quotes required // in the JSON text. - SecretString *string `type:"string"` + SecretString *string `type:"string" sensitive:"true"` // (Optional) Specifies a list of staging labels that are attached to this version // of the secret. These staging labels are used to track the versions through @@ -4213,6 +4330,18 @@ type RestoreSecretInput struct { // deletion. You can specify either the Amazon Resource Name (ARN) or the friendly // name of the secret. // + // If you specify an ARN, we generally recommend that you specify a complete + // ARN. You can specify a partial ARN too—for example, if you don’t include + // the final hyphen and six random characters that Secrets Manager adds at the + // end of the ARN when you created the secret. A partial ARN match can work + // as long as it uniquely matches only one secret. However, if your secret has + // a name that ends in a hyphen followed by six characters (before Secrets Manager + // adds the hyphen and six characters to the ARN) and you try to use that as + // a partial ARN, then those characters cause Secrets Manager to assume that + // you’re specifying a complete ARN. This confusion can cause unexpected results. + // To avoid this situation, we recommend that you don’t create secret names + // that end with a hyphen followed by six characters. + // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` } @@ -4313,6 +4442,18 @@ type RotateSecretInput struct { // Specifies the secret that you want to rotate. You can specify either the // Amazon Resource Name (ARN) or the friendly name of the secret. // + // If you specify an ARN, we generally recommend that you specify a complete + // ARN. You can specify a partial ARN too—for example, if you don’t include + // the final hyphen and six random characters that Secrets Manager adds at the + // end of the ARN when you created the secret. A partial ARN match can work + // as long as it uniquely matches only one secret. However, if your secret has + // a name that ends in a hyphen followed by six characters (before Secrets Manager + // adds the hyphen and six characters to the ARN) and you try to use that as + // a partial ARN, then those characters cause Secrets Manager to assume that + // you’re specifying a complete ARN. This confusion can cause unexpected results. + // To avoid this situation, we recommend that you don’t create secret names + // that end with a hyphen followed by six characters. + // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` } @@ -4724,6 +4865,18 @@ type TagResourceInput struct { // The identifier for the secret that you want to attach tags to. You can specify // either the Amazon Resource Name (ARN) or the friendly name of the secret. // + // If you specify an ARN, we generally recommend that you specify a complete + // ARN. You can specify a partial ARN too—for example, if you don’t include + // the final hyphen and six random characters that Secrets Manager adds at the + // end of the ARN when you created the secret. A partial ARN match can work + // as long as it uniquely matches only one secret. However, if your secret has + // a name that ends in a hyphen followed by six characters (before Secrets Manager + // adds the hyphen and six characters to the ARN) and you try to use that as + // a partial ARN, then those characters cause Secrets Manager to assume that + // you’re specifying a complete ARN. This confusion can cause unexpected results. + // To avoid this situation, we recommend that you don’t create secret names + // that end with a hyphen followed by six characters. + // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` @@ -4812,6 +4965,18 @@ type UntagResourceInput struct { // specify either the Amazon Resource Name (ARN) or the friendly name of the // secret. // + // If you specify an ARN, we generally recommend that you specify a complete + // ARN. You can specify a partial ARN too—for example, if you don’t include + // the final hyphen and six random characters that Secrets Manager adds at the + // end of the ARN when you created the secret. A partial ARN match can work + // as long as it uniquely matches only one secret. However, if your secret has + // a name that ends in a hyphen followed by six characters (before Secrets Manager + // adds the hyphen and six characters to the ARN) and you try to use that as + // a partial ARN, then those characters cause Secrets Manager to assume that + // you’re specifying a complete ARN. This confusion can cause unexpected results. + // To avoid this situation, we recommend that you don’t create secret names + // that end with a hyphen followed by six characters. + // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` @@ -4943,12 +5108,24 @@ type UpdateSecretInput struct { // This parameter is not accessible using the Secrets Manager console. // // SecretBinary is automatically base64 encoded/decoded by the SDK. - SecretBinary []byte `type:"blob"` + SecretBinary []byte `type:"blob" sensitive:"true"` // Specifies the secret that you want to modify or to which you want to add // a new version. You can specify either the Amazon Resource Name (ARN) or the // friendly name of the secret. // + // If you specify an ARN, we generally recommend that you specify a complete + // ARN. You can specify a partial ARN too—for example, if you don’t include + // the final hyphen and six random characters that Secrets Manager adds at the + // end of the ARN when you created the secret. A partial ARN match can work + // as long as it uniquely matches only one secret. However, if your secret has + // a name that ends in a hyphen followed by six characters (before Secrets Manager + // adds the hyphen and six characters to the ARN) and you try to use that as + // a partial ARN, then those characters cause Secrets Manager to assume that + // you’re specifying a complete ARN. This confusion can cause unexpected results. + // To avoid this situation, we recommend that you don’t create secret names + // that end with a hyphen followed by six characters. + // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` @@ -4977,7 +5154,7 @@ type UpdateSecretInput struct { // are escaped: // // "[{\"username\":\"bob\"},{\"password\":\"abc123xyz456\"}]" - SecretString *string `type:"string"` + SecretString *string `type:"string" sensitive:"true"` } // String returns the string representation @@ -5097,34 +5274,41 @@ func (s *UpdateSecretOutput) SetVersionId(v string) *UpdateSecretOutput { type UpdateSecretVersionStageInput struct { _ struct{} `type:"structure"` - // (Optional) The secret version ID that you want to add the staging labels - // to. + // (Optional) The secret version ID that you want to add the staging label to. + // If you want to remove a label from a version, then do not specify this parameter. // - // If any of the staging labels are already attached to a different version - // of the secret, then they are automatically removed from that version before - // adding them to this version. + // If the staging label is already attached to a different version of the secret, + // then you must also specify the RemoveFromVersionId parameter. MoveToVersionId *string `min:"32" type:"string"` - // (Optional) Specifies the secret version ID of the version that the staging - // labels are to be removed from. - // - // If you want to move a label to a new version, you do not have to explicitly - // remove it with this parameter. Adding a label using the MoveToVersionId parameter - // automatically removes it from the old version. However, if you do include - // both the "MoveTo" and "RemoveFrom" parameters, then the move is successful - // only if the staging labels are actually present on the "RemoveFrom" version. - // If a staging label was on a different version than "RemoveFrom", then the - // request fails. + // Specifies the secret version ID of the version that the staging label is + // to be removed from. If the staging label you are trying to attach to one + // version is already attached to a different version, then you must include + // this parameter and specify the version that the label is to be removed from. + // If the label is attached and you either do not specify this parameter, or + // the version ID does not match, then the operation fails. RemoveFromVersionId *string `min:"32" type:"string"` // Specifies the secret with the version whose list of staging labels you want // to modify. You can specify either the Amazon Resource Name (ARN) or the friendly // name of the secret. // + // If you specify an ARN, we generally recommend that you specify a complete + // ARN. You can specify a partial ARN too—for example, if you don’t include + // the final hyphen and six random characters that Secrets Manager adds at the + // end of the ARN when you created the secret. A partial ARN match can work + // as long as it uniquely matches only one secret. However, if your secret has + // a name that ends in a hyphen followed by six characters (before Secrets Manager + // adds the hyphen and six characters to the ARN) and you try to use that as + // a partial ARN, then those characters cause Secrets Manager to assume that + // you’re specifying a complete ARN. This confusion can cause unexpected results. + // To avoid this situation, we recommend that you don’t create secret names + // that end with a hyphen followed by six characters. + // // SecretId is a required field SecretId *string `min:"1" type:"string" required:"true"` - // The list of staging labels to add to this version. + // The staging label to add to this version. // // VersionStage is a required field VersionStage *string `min:"1" type:"string" required:"true"` @@ -5195,10 +5379,10 @@ func (s *UpdateSecretVersionStageInput) SetVersionStage(v string) *UpdateSecretV type UpdateSecretVersionStageOutput struct { _ struct{} `type:"structure"` - // The ARN of the secret with the staging labels that were modified. + // The ARN of the secret with the staging label that was modified. ARN *string `min:"20" type:"string"` - // The friendly name of the secret with the staging labels that were modified. + // The friendly name of the secret with the staging label that was modified. Name *string `min:"1" type:"string"` } diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go index 79d3abf8ab..cd3bf71796 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/api.go @@ -9,6 +9,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) const opAcceptPortfolioShare = "AcceptPortfolioShare" @@ -16,7 +18,7 @@ const opAcceptPortfolioShare = "AcceptPortfolioShare" // AcceptPortfolioShareRequest generates a "aws/request.Request" representing the // client's request for the AcceptPortfolioShare operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -50,6 +52,7 @@ func (c *ServiceCatalog) AcceptPortfolioShareRequest(input *AcceptPortfolioShare output = &AcceptPortfolioShareOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -103,7 +106,7 @@ const opAssociatePrincipalWithPortfolio = "AssociatePrincipalWithPortfolio" // AssociatePrincipalWithPortfolioRequest generates a "aws/request.Request" representing the // client's request for the AssociatePrincipalWithPortfolio operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -137,6 +140,7 @@ func (c *ServiceCatalog) AssociatePrincipalWithPortfolioRequest(input *Associate output = &AssociatePrincipalWithPortfolioOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -190,7 +194,7 @@ const opAssociateProductWithPortfolio = "AssociateProductWithPortfolio" // AssociateProductWithPortfolioRequest generates a "aws/request.Request" representing the // client's request for the AssociateProductWithPortfolio operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -224,6 +228,7 @@ func (c *ServiceCatalog) AssociateProductWithPortfolioRequest(input *AssociatePr output = &AssociateProductWithPortfolioOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -272,12 +277,100 @@ func (c *ServiceCatalog) AssociateProductWithPortfolioWithContext(ctx aws.Contex return out, req.Send() } +const opAssociateServiceActionWithProvisioningArtifact = "AssociateServiceActionWithProvisioningArtifact" + +// AssociateServiceActionWithProvisioningArtifactRequest generates a "aws/request.Request" representing the +// client's request for the AssociateServiceActionWithProvisioningArtifact 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 AssociateServiceActionWithProvisioningArtifact for more information on using the AssociateServiceActionWithProvisioningArtifact +// 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 AssociateServiceActionWithProvisioningArtifactRequest method. +// req, resp := client.AssociateServiceActionWithProvisioningArtifactRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/AssociateServiceActionWithProvisioningArtifact +func (c *ServiceCatalog) AssociateServiceActionWithProvisioningArtifactRequest(input *AssociateServiceActionWithProvisioningArtifactInput) (req *request.Request, output *AssociateServiceActionWithProvisioningArtifactOutput) { + op := &request.Operation{ + Name: opAssociateServiceActionWithProvisioningArtifact, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AssociateServiceActionWithProvisioningArtifactInput{} + } + + output = &AssociateServiceActionWithProvisioningArtifactOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// AssociateServiceActionWithProvisioningArtifact API operation for AWS Service Catalog. +// +// Associates a self-service action with a provisioning artifact. +// +// 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 Service Catalog's +// API operation AssociateServiceActionWithProvisioningArtifact for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeDuplicateResourceException "DuplicateResourceException" +// The specified resource is a duplicate. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The current limits of the service would have been exceeded by this operation. +// Decrease your resource use or increase your service limits and retry the +// operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/AssociateServiceActionWithProvisioningArtifact +func (c *ServiceCatalog) AssociateServiceActionWithProvisioningArtifact(input *AssociateServiceActionWithProvisioningArtifactInput) (*AssociateServiceActionWithProvisioningArtifactOutput, error) { + req, out := c.AssociateServiceActionWithProvisioningArtifactRequest(input) + return out, req.Send() +} + +// AssociateServiceActionWithProvisioningArtifactWithContext is the same as AssociateServiceActionWithProvisioningArtifact with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateServiceActionWithProvisioningArtifact 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 *ServiceCatalog) AssociateServiceActionWithProvisioningArtifactWithContext(ctx aws.Context, input *AssociateServiceActionWithProvisioningArtifactInput, opts ...request.Option) (*AssociateServiceActionWithProvisioningArtifactOutput, error) { + req, out := c.AssociateServiceActionWithProvisioningArtifactRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opAssociateTagOptionWithResource = "AssociateTagOptionWithResource" // AssociateTagOptionWithResourceRequest generates a "aws/request.Request" representing the // client's request for the AssociateTagOptionWithResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -311,6 +404,7 @@ func (c *ServiceCatalog) AssociateTagOptionWithResourceRequest(input *AssociateT output = &AssociateTagOptionWithResourceOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -372,12 +466,171 @@ func (c *ServiceCatalog) AssociateTagOptionWithResourceWithContext(ctx aws.Conte return out, req.Send() } +const opBatchAssociateServiceActionWithProvisioningArtifact = "BatchAssociateServiceActionWithProvisioningArtifact" + +// BatchAssociateServiceActionWithProvisioningArtifactRequest generates a "aws/request.Request" representing the +// client's request for the BatchAssociateServiceActionWithProvisioningArtifact 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 BatchAssociateServiceActionWithProvisioningArtifact for more information on using the BatchAssociateServiceActionWithProvisioningArtifact +// 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 BatchAssociateServiceActionWithProvisioningArtifactRequest method. +// req, resp := client.BatchAssociateServiceActionWithProvisioningArtifactRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/BatchAssociateServiceActionWithProvisioningArtifact +func (c *ServiceCatalog) BatchAssociateServiceActionWithProvisioningArtifactRequest(input *BatchAssociateServiceActionWithProvisioningArtifactInput) (req *request.Request, output *BatchAssociateServiceActionWithProvisioningArtifactOutput) { + op := &request.Operation{ + Name: opBatchAssociateServiceActionWithProvisioningArtifact, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &BatchAssociateServiceActionWithProvisioningArtifactInput{} + } + + output = &BatchAssociateServiceActionWithProvisioningArtifactOutput{} + req = c.newRequest(op, input, output) + return +} + +// BatchAssociateServiceActionWithProvisioningArtifact API operation for AWS Service Catalog. +// +// Associates multiple self-service actions with provisioning artifacts. +// +// 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 Service Catalog's +// API operation BatchAssociateServiceActionWithProvisioningArtifact for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/BatchAssociateServiceActionWithProvisioningArtifact +func (c *ServiceCatalog) BatchAssociateServiceActionWithProvisioningArtifact(input *BatchAssociateServiceActionWithProvisioningArtifactInput) (*BatchAssociateServiceActionWithProvisioningArtifactOutput, error) { + req, out := c.BatchAssociateServiceActionWithProvisioningArtifactRequest(input) + return out, req.Send() +} + +// BatchAssociateServiceActionWithProvisioningArtifactWithContext is the same as BatchAssociateServiceActionWithProvisioningArtifact with the addition of +// the ability to pass a context and additional request options. +// +// See BatchAssociateServiceActionWithProvisioningArtifact 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 *ServiceCatalog) BatchAssociateServiceActionWithProvisioningArtifactWithContext(ctx aws.Context, input *BatchAssociateServiceActionWithProvisioningArtifactInput, opts ...request.Option) (*BatchAssociateServiceActionWithProvisioningArtifactOutput, error) { + req, out := c.BatchAssociateServiceActionWithProvisioningArtifactRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opBatchDisassociateServiceActionFromProvisioningArtifact = "BatchDisassociateServiceActionFromProvisioningArtifact" + +// BatchDisassociateServiceActionFromProvisioningArtifactRequest generates a "aws/request.Request" representing the +// client's request for the BatchDisassociateServiceActionFromProvisioningArtifact 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 BatchDisassociateServiceActionFromProvisioningArtifact for more information on using the BatchDisassociateServiceActionFromProvisioningArtifact +// 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 BatchDisassociateServiceActionFromProvisioningArtifactRequest method. +// req, resp := client.BatchDisassociateServiceActionFromProvisioningArtifactRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/BatchDisassociateServiceActionFromProvisioningArtifact +func (c *ServiceCatalog) BatchDisassociateServiceActionFromProvisioningArtifactRequest(input *BatchDisassociateServiceActionFromProvisioningArtifactInput) (req *request.Request, output *BatchDisassociateServiceActionFromProvisioningArtifactOutput) { + op := &request.Operation{ + Name: opBatchDisassociateServiceActionFromProvisioningArtifact, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &BatchDisassociateServiceActionFromProvisioningArtifactInput{} + } + + output = &BatchDisassociateServiceActionFromProvisioningArtifactOutput{} + req = c.newRequest(op, input, output) + return +} + +// BatchDisassociateServiceActionFromProvisioningArtifact API operation for AWS Service Catalog. +// +// Disassociates a batch of self-service actions from the specified provisioning +// artifact. +// +// 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 Service Catalog's +// API operation BatchDisassociateServiceActionFromProvisioningArtifact for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/BatchDisassociateServiceActionFromProvisioningArtifact +func (c *ServiceCatalog) BatchDisassociateServiceActionFromProvisioningArtifact(input *BatchDisassociateServiceActionFromProvisioningArtifactInput) (*BatchDisassociateServiceActionFromProvisioningArtifactOutput, error) { + req, out := c.BatchDisassociateServiceActionFromProvisioningArtifactRequest(input) + return out, req.Send() +} + +// BatchDisassociateServiceActionFromProvisioningArtifactWithContext is the same as BatchDisassociateServiceActionFromProvisioningArtifact with the addition of +// the ability to pass a context and additional request options. +// +// See BatchDisassociateServiceActionFromProvisioningArtifact 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 *ServiceCatalog) BatchDisassociateServiceActionFromProvisioningArtifactWithContext(ctx aws.Context, input *BatchDisassociateServiceActionFromProvisioningArtifactInput, opts ...request.Option) (*BatchDisassociateServiceActionFromProvisioningArtifactOutput, error) { + req, out := c.BatchDisassociateServiceActionFromProvisioningArtifactRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCopyProduct = "CopyProduct" // CopyProductRequest generates a "aws/request.Request" representing the // client's request for the CopyProduct operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -466,7 +719,7 @@ const opCreateConstraint = "CreateConstraint" // CreateConstraintRequest generates a "aws/request.Request" representing the // client's request for the CreateConstraint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -556,7 +809,7 @@ const opCreatePortfolio = "CreatePortfolio" // CreatePortfolioRequest generates a "aws/request.Request" representing the // client's request for the CreatePortfolio operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -645,7 +898,7 @@ const opCreatePortfolioShare = "CreatePortfolioShare" // CreatePortfolioShareRequest generates a "aws/request.Request" representing the // client's request for the CreatePortfolioShare operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -684,7 +937,10 @@ func (c *ServiceCatalog) CreatePortfolioShareRequest(input *CreatePortfolioShare // CreatePortfolioShare API operation for AWS Service Catalog. // -// Shares the specified portfolio with the specified account. +// Shares the specified portfolio with the specified account or organization +// node. Shares to an organization node can only be created by the master account +// of an Organization. AWSOrganizationsAccess must be enabled in order to create +// a portfolio share to an organization node. // // 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 @@ -705,6 +961,9 @@ func (c *ServiceCatalog) CreatePortfolioShareRequest(input *CreatePortfolioShare // * ErrCodeInvalidParametersException "InvalidParametersException" // One or more parameters provided to the operation are not valid. // +// * ErrCodeOperationNotSupportedException "OperationNotSupportedException" +// The operation is not supported. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreatePortfolioShare func (c *ServiceCatalog) CreatePortfolioShare(input *CreatePortfolioShareInput) (*CreatePortfolioShareOutput, error) { req, out := c.CreatePortfolioShareRequest(input) @@ -732,7 +991,7 @@ const opCreateProduct = "CreateProduct" // CreateProductRequest generates a "aws/request.Request" representing the // client's request for the CreateProduct operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -821,7 +1080,7 @@ const opCreateProvisionedProductPlan = "CreateProvisionedProductPlan" // CreateProvisionedProductPlanRequest generates a "aws/request.Request" representing the // client's request for the CreateProvisionedProductPlan operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -916,7 +1175,7 @@ const opCreateProvisioningArtifact = "CreateProvisioningArtifact" // CreateProvisioningArtifactRequest generates a "aws/request.Request" representing the // client's request for the CreateProvisioningArtifact operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1002,12 +1261,96 @@ func (c *ServiceCatalog) CreateProvisioningArtifactWithContext(ctx aws.Context, return out, req.Send() } +const opCreateServiceAction = "CreateServiceAction" + +// CreateServiceActionRequest generates a "aws/request.Request" representing the +// client's request for the CreateServiceAction 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 CreateServiceAction for more information on using the CreateServiceAction +// 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 CreateServiceActionRequest method. +// req, resp := client.CreateServiceActionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateServiceAction +func (c *ServiceCatalog) CreateServiceActionRequest(input *CreateServiceActionInput) (req *request.Request, output *CreateServiceActionOutput) { + op := &request.Operation{ + Name: opCreateServiceAction, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateServiceActionInput{} + } + + output = &CreateServiceActionOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateServiceAction API operation for AWS Service Catalog. +// +// Creates a self-service action. +// +// 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 Service Catalog's +// API operation CreateServiceAction for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are not valid. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The current limits of the service would have been exceeded by this operation. +// Decrease your resource use or increase your service limits and retry the +// operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/CreateServiceAction +func (c *ServiceCatalog) CreateServiceAction(input *CreateServiceActionInput) (*CreateServiceActionOutput, error) { + req, out := c.CreateServiceActionRequest(input) + return out, req.Send() +} + +// CreateServiceActionWithContext is the same as CreateServiceAction with the addition of +// the ability to pass a context and additional request options. +// +// See CreateServiceAction 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 *ServiceCatalog) CreateServiceActionWithContext(ctx aws.Context, input *CreateServiceActionInput, opts ...request.Option) (*CreateServiceActionOutput, error) { + req, out := c.CreateServiceActionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateTagOption = "CreateTagOption" // CreateTagOptionRequest generates a "aws/request.Request" representing the // client's request for the CreateTagOption operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1096,7 +1439,7 @@ const opDeleteConstraint = "DeleteConstraint" // DeleteConstraintRequest generates a "aws/request.Request" representing the // client's request for the DeleteConstraint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1130,6 +1473,7 @@ func (c *ServiceCatalog) DeleteConstraintRequest(input *DeleteConstraintInput) ( output = &DeleteConstraintOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1178,7 +1522,7 @@ const opDeletePortfolio = "DeletePortfolio" // DeletePortfolioRequest generates a "aws/request.Request" representing the // client's request for the DeletePortfolio operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1212,6 +1556,7 @@ func (c *ServiceCatalog) DeletePortfolioRequest(input *DeletePortfolioInput) (re output = &DeletePortfolioOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1272,7 +1617,7 @@ const opDeletePortfolioShare = "DeletePortfolioShare" // DeletePortfolioShareRequest generates a "aws/request.Request" representing the // client's request for the DeletePortfolioShare operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1311,7 +1656,9 @@ func (c *ServiceCatalog) DeletePortfolioShareRequest(input *DeletePortfolioShare // DeletePortfolioShare API operation for AWS Service Catalog. // -// Stops sharing the specified portfolio with the specified account. +// Stops sharing the specified portfolio with the specified account or organization +// node. Shares to an organization node can only be deleted by the master account +// of an Organization. // // 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 @@ -1324,6 +1671,12 @@ func (c *ServiceCatalog) DeletePortfolioShareRequest(input *DeletePortfolioShare // * ErrCodeResourceNotFoundException "ResourceNotFoundException" // The specified resource was not found. // +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are not valid. +// +// * ErrCodeOperationNotSupportedException "OperationNotSupportedException" +// The operation is not supported. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeletePortfolioShare func (c *ServiceCatalog) DeletePortfolioShare(input *DeletePortfolioShareInput) (*DeletePortfolioShareOutput, error) { req, out := c.DeletePortfolioShareRequest(input) @@ -1351,7 +1704,7 @@ const opDeleteProduct = "DeleteProduct" // DeleteProductRequest generates a "aws/request.Request" representing the // client's request for the DeleteProduct operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1385,6 +1738,7 @@ func (c *ServiceCatalog) DeleteProductRequest(input *DeleteProductInput) (req *r output = &DeleteProductOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1445,7 +1799,7 @@ const opDeleteProvisionedProductPlan = "DeleteProvisionedProductPlan" // DeleteProvisionedProductPlanRequest generates a "aws/request.Request" representing the // client's request for the DeleteProvisionedProductPlan operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1479,6 +1833,7 @@ func (c *ServiceCatalog) DeleteProvisionedProductPlanRequest(input *DeleteProvis output = &DeleteProvisionedProductPlanOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1527,7 +1882,7 @@ const opDeleteProvisioningArtifact = "DeleteProvisioningArtifact" // DeleteProvisioningArtifactRequest generates a "aws/request.Request" representing the // client's request for the DeleteProvisioningArtifact operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1561,6 +1916,7 @@ func (c *ServiceCatalog) DeleteProvisioningArtifactRequest(input *DeleteProvisio output = &DeleteProvisioningArtifactOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1613,45 +1969,130 @@ func (c *ServiceCatalog) DeleteProvisioningArtifactWithContext(ctx aws.Context, return out, req.Send() } -const opDeleteTagOption = "DeleteTagOption" +const opDeleteServiceAction = "DeleteServiceAction" -// DeleteTagOptionRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTagOption operation. The "output" return +// DeleteServiceActionRequest generates a "aws/request.Request" representing the +// client's request for the DeleteServiceAction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 DeleteTagOption for more information on using the DeleteTagOption +// See DeleteServiceAction for more information on using the DeleteServiceAction // 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 DeleteTagOptionRequest method. -// req, resp := client.DeleteTagOptionRequest(params) +// // Example sending a request using the DeleteServiceActionRequest method. +// req, resp := client.DeleteServiceActionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteTagOption -func (c *ServiceCatalog) DeleteTagOptionRequest(input *DeleteTagOptionInput) (req *request.Request, output *DeleteTagOptionOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteServiceAction +func (c *ServiceCatalog) DeleteServiceActionRequest(input *DeleteServiceActionInput) (req *request.Request, output *DeleteServiceActionOutput) { op := &request.Operation{ - Name: opDeleteTagOption, + Name: opDeleteServiceAction, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &DeleteTagOptionInput{} + input = &DeleteServiceActionInput{} + } + + output = &DeleteServiceActionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteServiceAction API operation for AWS Service Catalog. +// +// Deletes a self-service action. +// +// 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 Service Catalog's +// API operation DeleteServiceAction for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeResourceInUseException "ResourceInUseException" +// A resource that is currently in use. Ensure that the resource is not in use +// and retry the operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteServiceAction +func (c *ServiceCatalog) DeleteServiceAction(input *DeleteServiceActionInput) (*DeleteServiceActionOutput, error) { + req, out := c.DeleteServiceActionRequest(input) + return out, req.Send() +} + +// DeleteServiceActionWithContext is the same as DeleteServiceAction with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteServiceAction 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 *ServiceCatalog) DeleteServiceActionWithContext(ctx aws.Context, input *DeleteServiceActionInput, opts ...request.Option) (*DeleteServiceActionOutput, error) { + req, out := c.DeleteServiceActionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteTagOption = "DeleteTagOption" + +// DeleteTagOptionRequest generates a "aws/request.Request" representing the +// client's request for the DeleteTagOption 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 DeleteTagOption for more information on using the DeleteTagOption +// 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 DeleteTagOptionRequest method. +// req, resp := client.DeleteTagOptionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DeleteTagOption +func (c *ServiceCatalog) DeleteTagOptionRequest(input *DeleteTagOptionInput) (req *request.Request, output *DeleteTagOptionOutput) { + op := &request.Operation{ + Name: opDeleteTagOption, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteTagOptionInput{} } output = &DeleteTagOptionOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1708,7 +2149,7 @@ const opDescribeConstraint = "DescribeConstraint" // DescribeConstraintRequest generates a "aws/request.Request" representing the // client's request for the DescribeConstraint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1787,7 +2228,7 @@ const opDescribeCopyProductStatus = "DescribeCopyProductStatus" // DescribeCopyProductStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeCopyProductStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1866,7 +2307,7 @@ const opDescribePortfolio = "DescribePortfolio" // DescribePortfolioRequest generates a "aws/request.Request" representing the // client's request for the DescribePortfolio operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1940,12 +2381,98 @@ func (c *ServiceCatalog) DescribePortfolioWithContext(ctx aws.Context, input *De return out, req.Send() } +const opDescribePortfolioShareStatus = "DescribePortfolioShareStatus" + +// DescribePortfolioShareStatusRequest generates a "aws/request.Request" representing the +// client's request for the DescribePortfolioShareStatus 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 DescribePortfolioShareStatus for more information on using the DescribePortfolioShareStatus +// 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 DescribePortfolioShareStatusRequest method. +// req, resp := client.DescribePortfolioShareStatusRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribePortfolioShareStatus +func (c *ServiceCatalog) DescribePortfolioShareStatusRequest(input *DescribePortfolioShareStatusInput) (req *request.Request, output *DescribePortfolioShareStatusOutput) { + op := &request.Operation{ + Name: opDescribePortfolioShareStatus, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribePortfolioShareStatusInput{} + } + + output = &DescribePortfolioShareStatusOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribePortfolioShareStatus API operation for AWS Service Catalog. +// +// Gets the status of the specified portfolio share operation. This API can +// only be called by the master account in the organization. +// +// 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 Service Catalog's +// API operation DescribePortfolioShareStatus for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are not valid. +// +// * ErrCodeOperationNotSupportedException "OperationNotSupportedException" +// The operation is not supported. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribePortfolioShareStatus +func (c *ServiceCatalog) DescribePortfolioShareStatus(input *DescribePortfolioShareStatusInput) (*DescribePortfolioShareStatusOutput, error) { + req, out := c.DescribePortfolioShareStatusRequest(input) + return out, req.Send() +} + +// DescribePortfolioShareStatusWithContext is the same as DescribePortfolioShareStatus with the addition of +// the ability to pass a context and additional request options. +// +// See DescribePortfolioShareStatus 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 *ServiceCatalog) DescribePortfolioShareStatusWithContext(ctx aws.Context, input *DescribePortfolioShareStatusInput, opts ...request.Option) (*DescribePortfolioShareStatusOutput, error) { + req, out := c.DescribePortfolioShareStatusRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeProduct = "DescribeProduct" // DescribeProductRequest generates a "aws/request.Request" representing the // client's request for the DescribeProduct operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2027,7 +2554,7 @@ const opDescribeProductAsAdmin = "DescribeProductAsAdmin" // DescribeProductAsAdminRequest generates a "aws/request.Request" representing the // client's request for the DescribeProductAsAdmin operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2107,7 +2634,7 @@ const opDescribeProductView = "DescribeProductView" // DescribeProductViewRequest generates a "aws/request.Request" representing the // client's request for the DescribeProductView operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2189,7 +2716,7 @@ const opDescribeProvisionedProduct = "DescribeProvisionedProduct" // DescribeProvisionedProductRequest generates a "aws/request.Request" representing the // client's request for the DescribeProvisionedProduct operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2268,7 +2795,7 @@ const opDescribeProvisionedProductPlan = "DescribeProvisionedProductPlan" // DescribeProvisionedProductPlanRequest generates a "aws/request.Request" representing the // client's request for the DescribeProvisionedProductPlan operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2350,7 +2877,7 @@ const opDescribeProvisioningArtifact = "DescribeProvisioningArtifact" // DescribeProvisioningArtifactRequest generates a "aws/request.Request" representing the // client's request for the DescribeProvisioningArtifact operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2430,7 +2957,7 @@ const opDescribeProvisioningParameters = "DescribeProvisioningParameters" // DescribeProvisioningParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeProvisioningParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2520,7 +3047,7 @@ const opDescribeRecord = "DescribeRecord" // DescribeRecordRequest generates a "aws/request.Request" representing the // client's request for the DescribeRecord operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2597,12 +3124,91 @@ func (c *ServiceCatalog) DescribeRecordWithContext(ctx aws.Context, input *Descr return out, req.Send() } +const opDescribeServiceAction = "DescribeServiceAction" + +// DescribeServiceActionRequest generates a "aws/request.Request" representing the +// client's request for the DescribeServiceAction 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 DescribeServiceAction for more information on using the DescribeServiceAction +// 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 DescribeServiceActionRequest method. +// req, resp := client.DescribeServiceActionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeServiceAction +func (c *ServiceCatalog) DescribeServiceActionRequest(input *DescribeServiceActionInput) (req *request.Request, output *DescribeServiceActionOutput) { + op := &request.Operation{ + Name: opDescribeServiceAction, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeServiceActionInput{} + } + + output = &DescribeServiceActionOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeServiceAction API operation for AWS Service Catalog. +// +// Describes a self-service action. +// +// 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 Service Catalog's +// API operation DescribeServiceAction for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DescribeServiceAction +func (c *ServiceCatalog) DescribeServiceAction(input *DescribeServiceActionInput) (*DescribeServiceActionOutput, error) { + req, out := c.DescribeServiceActionRequest(input) + return out, req.Send() +} + +// DescribeServiceActionWithContext is the same as DescribeServiceAction with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeServiceAction 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 *ServiceCatalog) DescribeServiceActionWithContext(ctx aws.Context, input *DescribeServiceActionInput, opts ...request.Option) (*DescribeServiceActionOutput, error) { + req, out := c.DescribeServiceActionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeTagOption = "DescribeTagOption" // DescribeTagOptionRequest generates a "aws/request.Request" representing the // client's request for the DescribeTagOption operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2681,12 +3287,104 @@ func (c *ServiceCatalog) DescribeTagOptionWithContext(ctx aws.Context, input *De return out, req.Send() } +const opDisableAWSOrganizationsAccess = "DisableAWSOrganizationsAccess" + +// DisableAWSOrganizationsAccessRequest generates a "aws/request.Request" representing the +// client's request for the DisableAWSOrganizationsAccess 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 DisableAWSOrganizationsAccess for more information on using the DisableAWSOrganizationsAccess +// 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 DisableAWSOrganizationsAccessRequest method. +// req, resp := client.DisableAWSOrganizationsAccessRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DisableAWSOrganizationsAccess +func (c *ServiceCatalog) DisableAWSOrganizationsAccessRequest(input *DisableAWSOrganizationsAccessInput) (req *request.Request, output *DisableAWSOrganizationsAccessOutput) { + op := &request.Operation{ + Name: opDisableAWSOrganizationsAccess, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisableAWSOrganizationsAccessInput{} + } + + output = &DisableAWSOrganizationsAccessOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DisableAWSOrganizationsAccess API operation for AWS Service Catalog. +// +// Disable portfolio sharing through AWS Organizations feature. This feature +// will not delete your current shares but it will prevent you from creating +// new shares throughout your organization. Current shares will not be in sync +// with your organization structure if it changes after calling this API. This +// API can only be called by the master account in the organization. +// +// 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 Service Catalog's +// API operation DisableAWSOrganizationsAccess for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidStateException "InvalidStateException" +// An attempt was made to modify a resource that is in a state that is not valid. +// Check your resources to ensure that they are in valid states before retrying +// the operation. +// +// * ErrCodeOperationNotSupportedException "OperationNotSupportedException" +// The operation is not supported. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DisableAWSOrganizationsAccess +func (c *ServiceCatalog) DisableAWSOrganizationsAccess(input *DisableAWSOrganizationsAccessInput) (*DisableAWSOrganizationsAccessOutput, error) { + req, out := c.DisableAWSOrganizationsAccessRequest(input) + return out, req.Send() +} + +// DisableAWSOrganizationsAccessWithContext is the same as DisableAWSOrganizationsAccess with the addition of +// the ability to pass a context and additional request options. +// +// See DisableAWSOrganizationsAccess 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 *ServiceCatalog) DisableAWSOrganizationsAccessWithContext(ctx aws.Context, input *DisableAWSOrganizationsAccessInput, opts ...request.Option) (*DisableAWSOrganizationsAccessOutput, error) { + req, out := c.DisableAWSOrganizationsAccessRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDisassociatePrincipalFromPortfolio = "DisassociatePrincipalFromPortfolio" // DisassociatePrincipalFromPortfolioRequest generates a "aws/request.Request" representing the // client's request for the DisassociatePrincipalFromPortfolio operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2720,6 +3418,7 @@ func (c *ServiceCatalog) DisassociatePrincipalFromPortfolioRequest(input *Disass output = &DisassociatePrincipalFromPortfolioOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2768,7 +3467,7 @@ const opDisassociateProductFromPortfolio = "DisassociateProductFromPortfolio" // DisassociateProductFromPortfolioRequest generates a "aws/request.Request" representing the // client's request for the DisassociateProductFromPortfolio operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2802,6 +3501,7 @@ func (c *ServiceCatalog) DisassociateProductFromPortfolioRequest(input *Disassoc output = &DisassociateProductFromPortfolioOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2849,17 +3549,98 @@ func (c *ServiceCatalog) DisassociateProductFromPortfolioWithContext(ctx aws.Con return out, req.Send() } -const opDisassociateTagOptionFromResource = "DisassociateTagOptionFromResource" +const opDisassociateServiceActionFromProvisioningArtifact = "DisassociateServiceActionFromProvisioningArtifact" -// DisassociateTagOptionFromResourceRequest generates a "aws/request.Request" representing the -// client's request for the DisassociateTagOptionFromResource operation. The "output" return +// DisassociateServiceActionFromProvisioningArtifactRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateServiceActionFromProvisioningArtifact operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 DisassociateTagOptionFromResource for more information on using the DisassociateTagOptionFromResource +// See DisassociateServiceActionFromProvisioningArtifact for more information on using the DisassociateServiceActionFromProvisioningArtifact +// 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 DisassociateServiceActionFromProvisioningArtifactRequest method. +// req, resp := client.DisassociateServiceActionFromProvisioningArtifactRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DisassociateServiceActionFromProvisioningArtifact +func (c *ServiceCatalog) DisassociateServiceActionFromProvisioningArtifactRequest(input *DisassociateServiceActionFromProvisioningArtifactInput) (req *request.Request, output *DisassociateServiceActionFromProvisioningArtifactOutput) { + op := &request.Operation{ + Name: opDisassociateServiceActionFromProvisioningArtifact, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisassociateServiceActionFromProvisioningArtifactInput{} + } + + output = &DisassociateServiceActionFromProvisioningArtifactOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DisassociateServiceActionFromProvisioningArtifact API operation for AWS Service Catalog. +// +// Disassociates the specified self-service action association from the specified +// provisioning artifact. +// +// 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 Service Catalog's +// API operation DisassociateServiceActionFromProvisioningArtifact for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/DisassociateServiceActionFromProvisioningArtifact +func (c *ServiceCatalog) DisassociateServiceActionFromProvisioningArtifact(input *DisassociateServiceActionFromProvisioningArtifactInput) (*DisassociateServiceActionFromProvisioningArtifactOutput, error) { + req, out := c.DisassociateServiceActionFromProvisioningArtifactRequest(input) + return out, req.Send() +} + +// DisassociateServiceActionFromProvisioningArtifactWithContext is the same as DisassociateServiceActionFromProvisioningArtifact with the addition of +// the ability to pass a context and additional request options. +// +// See DisassociateServiceActionFromProvisioningArtifact 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 *ServiceCatalog) DisassociateServiceActionFromProvisioningArtifactWithContext(ctx aws.Context, input *DisassociateServiceActionFromProvisioningArtifactInput, opts ...request.Option) (*DisassociateServiceActionFromProvisioningArtifactOutput, error) { + req, out := c.DisassociateServiceActionFromProvisioningArtifactRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDisassociateTagOptionFromResource = "DisassociateTagOptionFromResource" + +// DisassociateTagOptionFromResourceRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateTagOptionFromResource 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 DisassociateTagOptionFromResource for more information on using the DisassociateTagOptionFromResource // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration @@ -2888,6 +3669,7 @@ func (c *ServiceCatalog) DisassociateTagOptionFromResourceRequest(input *Disasso output = &DisassociateTagOptionFromResourceOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2933,12 +3715,107 @@ func (c *ServiceCatalog) DisassociateTagOptionFromResourceWithContext(ctx aws.Co return out, req.Send() } +const opEnableAWSOrganizationsAccess = "EnableAWSOrganizationsAccess" + +// EnableAWSOrganizationsAccessRequest generates a "aws/request.Request" representing the +// client's request for the EnableAWSOrganizationsAccess 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 EnableAWSOrganizationsAccess for more information on using the EnableAWSOrganizationsAccess +// 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 EnableAWSOrganizationsAccessRequest method. +// req, resp := client.EnableAWSOrganizationsAccessRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/EnableAWSOrganizationsAccess +func (c *ServiceCatalog) EnableAWSOrganizationsAccessRequest(input *EnableAWSOrganizationsAccessInput) (req *request.Request, output *EnableAWSOrganizationsAccessOutput) { + op := &request.Operation{ + Name: opEnableAWSOrganizationsAccess, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &EnableAWSOrganizationsAccessInput{} + } + + output = &EnableAWSOrganizationsAccessOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// EnableAWSOrganizationsAccess API operation for AWS Service Catalog. +// +// Enable portfolio sharing feature through AWS Organizations. This API will +// allow Service Catalog to receive updates on your organization in order to +// sync your shares with the current structure. This API can only be called +// by the master account in the organization. +// +// By calling this API Service Catalog will make a call to organizations:EnableAWSServiceAccess +// on your behalf so that your shares can be in sync with any changes in your +// AWS Organizations structure. +// +// 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 Service Catalog's +// API operation EnableAWSOrganizationsAccess for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidStateException "InvalidStateException" +// An attempt was made to modify a resource that is in a state that is not valid. +// Check your resources to ensure that they are in valid states before retrying +// the operation. +// +// * ErrCodeOperationNotSupportedException "OperationNotSupportedException" +// The operation is not supported. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/EnableAWSOrganizationsAccess +func (c *ServiceCatalog) EnableAWSOrganizationsAccess(input *EnableAWSOrganizationsAccessInput) (*EnableAWSOrganizationsAccessOutput, error) { + req, out := c.EnableAWSOrganizationsAccessRequest(input) + return out, req.Send() +} + +// EnableAWSOrganizationsAccessWithContext is the same as EnableAWSOrganizationsAccess with the addition of +// the ability to pass a context and additional request options. +// +// See EnableAWSOrganizationsAccess 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 *ServiceCatalog) EnableAWSOrganizationsAccessWithContext(ctx aws.Context, input *EnableAWSOrganizationsAccessInput, opts ...request.Option) (*EnableAWSOrganizationsAccessOutput, error) { + req, out := c.EnableAWSOrganizationsAccessRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opExecuteProvisionedProductPlan = "ExecuteProvisionedProductPlan" // ExecuteProvisionedProductPlanRequest generates a "aws/request.Request" representing the // client's request for the ExecuteProvisionedProductPlan operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3021,12 +3898,182 @@ func (c *ServiceCatalog) ExecuteProvisionedProductPlanWithContext(ctx aws.Contex return out, req.Send() } +const opExecuteProvisionedProductServiceAction = "ExecuteProvisionedProductServiceAction" + +// ExecuteProvisionedProductServiceActionRequest generates a "aws/request.Request" representing the +// client's request for the ExecuteProvisionedProductServiceAction 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 ExecuteProvisionedProductServiceAction for more information on using the ExecuteProvisionedProductServiceAction +// 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 ExecuteProvisionedProductServiceActionRequest method. +// req, resp := client.ExecuteProvisionedProductServiceActionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ExecuteProvisionedProductServiceAction +func (c *ServiceCatalog) ExecuteProvisionedProductServiceActionRequest(input *ExecuteProvisionedProductServiceActionInput) (req *request.Request, output *ExecuteProvisionedProductServiceActionOutput) { + op := &request.Operation{ + Name: opExecuteProvisionedProductServiceAction, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ExecuteProvisionedProductServiceActionInput{} + } + + output = &ExecuteProvisionedProductServiceActionOutput{} + req = c.newRequest(op, input, output) + return +} + +// ExecuteProvisionedProductServiceAction API operation for AWS Service Catalog. +// +// Executes a self-service action against a provisioned product. +// +// 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 Service Catalog's +// API operation ExecuteProvisionedProductServiceAction for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidStateException "InvalidStateException" +// An attempt was made to modify a resource that is in a state that is not valid. +// Check your resources to ensure that they are in valid states before retrying +// the operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ExecuteProvisionedProductServiceAction +func (c *ServiceCatalog) ExecuteProvisionedProductServiceAction(input *ExecuteProvisionedProductServiceActionInput) (*ExecuteProvisionedProductServiceActionOutput, error) { + req, out := c.ExecuteProvisionedProductServiceActionRequest(input) + return out, req.Send() +} + +// ExecuteProvisionedProductServiceActionWithContext is the same as ExecuteProvisionedProductServiceAction with the addition of +// the ability to pass a context and additional request options. +// +// See ExecuteProvisionedProductServiceAction 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 *ServiceCatalog) ExecuteProvisionedProductServiceActionWithContext(ctx aws.Context, input *ExecuteProvisionedProductServiceActionInput, opts ...request.Option) (*ExecuteProvisionedProductServiceActionOutput, error) { + req, out := c.ExecuteProvisionedProductServiceActionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetAWSOrganizationsAccessStatus = "GetAWSOrganizationsAccessStatus" + +// GetAWSOrganizationsAccessStatusRequest generates a "aws/request.Request" representing the +// client's request for the GetAWSOrganizationsAccessStatus 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 GetAWSOrganizationsAccessStatus for more information on using the GetAWSOrganizationsAccessStatus +// 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 GetAWSOrganizationsAccessStatusRequest method. +// req, resp := client.GetAWSOrganizationsAccessStatusRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/GetAWSOrganizationsAccessStatus +func (c *ServiceCatalog) GetAWSOrganizationsAccessStatusRequest(input *GetAWSOrganizationsAccessStatusInput) (req *request.Request, output *GetAWSOrganizationsAccessStatusOutput) { + op := &request.Operation{ + Name: opGetAWSOrganizationsAccessStatus, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetAWSOrganizationsAccessStatusInput{} + } + + output = &GetAWSOrganizationsAccessStatusOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetAWSOrganizationsAccessStatus API operation for AWS Service Catalog. +// +// Get the Access Status for AWS Organization portfolio share feature. This +// API can only be called by the master account in the organization. +// +// 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 Service Catalog's +// API operation GetAWSOrganizationsAccessStatus for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeOperationNotSupportedException "OperationNotSupportedException" +// The operation is not supported. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/GetAWSOrganizationsAccessStatus +func (c *ServiceCatalog) GetAWSOrganizationsAccessStatus(input *GetAWSOrganizationsAccessStatusInput) (*GetAWSOrganizationsAccessStatusOutput, error) { + req, out := c.GetAWSOrganizationsAccessStatusRequest(input) + return out, req.Send() +} + +// GetAWSOrganizationsAccessStatusWithContext is the same as GetAWSOrganizationsAccessStatus with the addition of +// the ability to pass a context and additional request options. +// +// See GetAWSOrganizationsAccessStatus 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 *ServiceCatalog) GetAWSOrganizationsAccessStatusWithContext(ctx aws.Context, input *GetAWSOrganizationsAccessStatusInput, opts ...request.Option) (*GetAWSOrganizationsAccessStatusOutput, error) { + req, out := c.GetAWSOrganizationsAccessStatusRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opListAcceptedPortfolioShares = "ListAcceptedPortfolioShares" // ListAcceptedPortfolioSharesRequest generates a "aws/request.Request" representing the // client's request for the ListAcceptedPortfolioShares operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3084,6 +4131,9 @@ func (c *ServiceCatalog) ListAcceptedPortfolioSharesRequest(input *ListAcceptedP // * ErrCodeInvalidParametersException "InvalidParametersException" // One or more parameters provided to the operation are not valid. // +// * ErrCodeOperationNotSupportedException "OperationNotSupportedException" +// The operation is not supported. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListAcceptedPortfolioShares func (c *ServiceCatalog) ListAcceptedPortfolioShares(input *ListAcceptedPortfolioSharesInput) (*ListAcceptedPortfolioSharesOutput, error) { req, out := c.ListAcceptedPortfolioSharesRequest(input) @@ -3161,7 +4211,7 @@ const opListConstraintsForPortfolio = "ListConstraintsForPortfolio" // ListConstraintsForPortfolioRequest generates a "aws/request.Request" representing the // client's request for the ListConstraintsForPortfolio operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3299,7 +4349,7 @@ const opListLaunchPaths = "ListLaunchPaths" // ListLaunchPathsRequest generates a "aws/request.Request" representing the // client's request for the ListLaunchPaths operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3434,32 +4484,174 @@ func (c *ServiceCatalog) ListLaunchPathsPagesWithContext(ctx aws.Context, input return p.Err() } -const opListPortfolioAccess = "ListPortfolioAccess" +const opListOrganizationPortfolioAccess = "ListOrganizationPortfolioAccess" -// ListPortfolioAccessRequest generates a "aws/request.Request" representing the -// client's request for the ListPortfolioAccess operation. The "output" return +// ListOrganizationPortfolioAccessRequest generates a "aws/request.Request" representing the +// client's request for the ListOrganizationPortfolioAccess operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 ListPortfolioAccess for more information on using the ListPortfolioAccess +// See ListOrganizationPortfolioAccess for more information on using the ListOrganizationPortfolioAccess // 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 ListPortfolioAccessRequest method. -// req, resp := client.ListPortfolioAccessRequest(params) +// // Example sending a request using the ListOrganizationPortfolioAccessRequest method. +// req, resp := client.ListOrganizationPortfolioAccessRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListPortfolioAccess +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListOrganizationPortfolioAccess +func (c *ServiceCatalog) ListOrganizationPortfolioAccessRequest(input *ListOrganizationPortfolioAccessInput) (req *request.Request, output *ListOrganizationPortfolioAccessOutput) { + op := &request.Operation{ + Name: opListOrganizationPortfolioAccess, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"PageToken"}, + OutputTokens: []string{"NextPageToken"}, + LimitToken: "PageSize", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListOrganizationPortfolioAccessInput{} + } + + output = &ListOrganizationPortfolioAccessOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListOrganizationPortfolioAccess API operation for AWS Service Catalog. +// +// Lists the organization nodes that have access to the specified portfolio. +// This API can only be called by the master account in the organization. +// +// 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 Service Catalog's +// API operation ListOrganizationPortfolioAccess for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are not valid. +// +// * ErrCodeOperationNotSupportedException "OperationNotSupportedException" +// The operation is not supported. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListOrganizationPortfolioAccess +func (c *ServiceCatalog) ListOrganizationPortfolioAccess(input *ListOrganizationPortfolioAccessInput) (*ListOrganizationPortfolioAccessOutput, error) { + req, out := c.ListOrganizationPortfolioAccessRequest(input) + return out, req.Send() +} + +// ListOrganizationPortfolioAccessWithContext is the same as ListOrganizationPortfolioAccess with the addition of +// the ability to pass a context and additional request options. +// +// See ListOrganizationPortfolioAccess 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 *ServiceCatalog) ListOrganizationPortfolioAccessWithContext(ctx aws.Context, input *ListOrganizationPortfolioAccessInput, opts ...request.Option) (*ListOrganizationPortfolioAccessOutput, error) { + req, out := c.ListOrganizationPortfolioAccessRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListOrganizationPortfolioAccessPages iterates over the pages of a ListOrganizationPortfolioAccess operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListOrganizationPortfolioAccess 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 ListOrganizationPortfolioAccess operation. +// pageNum := 0 +// err := client.ListOrganizationPortfolioAccessPages(params, +// func(page *ListOrganizationPortfolioAccessOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ServiceCatalog) ListOrganizationPortfolioAccessPages(input *ListOrganizationPortfolioAccessInput, fn func(*ListOrganizationPortfolioAccessOutput, bool) bool) error { + return c.ListOrganizationPortfolioAccessPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListOrganizationPortfolioAccessPagesWithContext same as ListOrganizationPortfolioAccessPages 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 *ServiceCatalog) ListOrganizationPortfolioAccessPagesWithContext(ctx aws.Context, input *ListOrganizationPortfolioAccessInput, fn func(*ListOrganizationPortfolioAccessOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListOrganizationPortfolioAccessInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListOrganizationPortfolioAccessRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListOrganizationPortfolioAccessOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListPortfolioAccess = "ListPortfolioAccess" + +// ListPortfolioAccessRequest generates a "aws/request.Request" representing the +// client's request for the ListPortfolioAccess 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 ListPortfolioAccess for more information on using the ListPortfolioAccess +// 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 ListPortfolioAccessRequest method. +// req, resp := client.ListPortfolioAccessRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListPortfolioAccess func (c *ServiceCatalog) ListPortfolioAccessRequest(input *ListPortfolioAccessInput) (req *request.Request, output *ListPortfolioAccessOutput) { op := &request.Operation{ Name: opListPortfolioAccess, @@ -3518,7 +4710,7 @@ const opListPortfolios = "ListPortfolios" // ListPortfoliosRequest generates a "aws/request.Request" representing the // client's request for the ListPortfolios operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3653,7 +4845,7 @@ const opListPortfoliosForProduct = "ListPortfoliosForProduct" // ListPortfoliosForProductRequest generates a "aws/request.Request" representing the // client's request for the ListPortfoliosForProduct operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3791,7 +4983,7 @@ const opListPrincipalsForPortfolio = "ListPrincipalsForPortfolio" // ListPrincipalsForPortfolioRequest generates a "aws/request.Request" representing the // client's request for the ListPrincipalsForPortfolio operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3929,7 +5121,7 @@ const opListProvisionedProductPlans = "ListProvisionedProductPlans" // ListProvisionedProductPlansRequest generates a "aws/request.Request" representing the // client's request for the ListProvisionedProductPlans operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4012,7 +5204,7 @@ const opListProvisioningArtifacts = "ListProvisioningArtifacts" // ListProvisioningArtifactsRequest generates a "aws/request.Request" representing the // client's request for the ListProvisioningArtifacts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4090,12 +5282,151 @@ func (c *ServiceCatalog) ListProvisioningArtifactsWithContext(ctx aws.Context, i return out, req.Send() } +const opListProvisioningArtifactsForServiceAction = "ListProvisioningArtifactsForServiceAction" + +// ListProvisioningArtifactsForServiceActionRequest generates a "aws/request.Request" representing the +// client's request for the ListProvisioningArtifactsForServiceAction 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 ListProvisioningArtifactsForServiceAction for more information on using the ListProvisioningArtifactsForServiceAction +// 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 ListProvisioningArtifactsForServiceActionRequest method. +// req, resp := client.ListProvisioningArtifactsForServiceActionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListProvisioningArtifactsForServiceAction +func (c *ServiceCatalog) ListProvisioningArtifactsForServiceActionRequest(input *ListProvisioningArtifactsForServiceActionInput) (req *request.Request, output *ListProvisioningArtifactsForServiceActionOutput) { + op := &request.Operation{ + Name: opListProvisioningArtifactsForServiceAction, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"PageToken"}, + OutputTokens: []string{"NextPageToken"}, + LimitToken: "PageSize", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListProvisioningArtifactsForServiceActionInput{} + } + + output = &ListProvisioningArtifactsForServiceActionOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListProvisioningArtifactsForServiceAction API operation for AWS Service Catalog. +// +// Lists all provisioning artifacts (also known as versions) for the specified +// self-service action. +// +// 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 Service Catalog's +// API operation ListProvisioningArtifactsForServiceAction for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListProvisioningArtifactsForServiceAction +func (c *ServiceCatalog) ListProvisioningArtifactsForServiceAction(input *ListProvisioningArtifactsForServiceActionInput) (*ListProvisioningArtifactsForServiceActionOutput, error) { + req, out := c.ListProvisioningArtifactsForServiceActionRequest(input) + return out, req.Send() +} + +// ListProvisioningArtifactsForServiceActionWithContext is the same as ListProvisioningArtifactsForServiceAction with the addition of +// the ability to pass a context and additional request options. +// +// See ListProvisioningArtifactsForServiceAction 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 *ServiceCatalog) ListProvisioningArtifactsForServiceActionWithContext(ctx aws.Context, input *ListProvisioningArtifactsForServiceActionInput, opts ...request.Option) (*ListProvisioningArtifactsForServiceActionOutput, error) { + req, out := c.ListProvisioningArtifactsForServiceActionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListProvisioningArtifactsForServiceActionPages iterates over the pages of a ListProvisioningArtifactsForServiceAction operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListProvisioningArtifactsForServiceAction 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 ListProvisioningArtifactsForServiceAction operation. +// pageNum := 0 +// err := client.ListProvisioningArtifactsForServiceActionPages(params, +// func(page *ListProvisioningArtifactsForServiceActionOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ServiceCatalog) ListProvisioningArtifactsForServiceActionPages(input *ListProvisioningArtifactsForServiceActionInput, fn func(*ListProvisioningArtifactsForServiceActionOutput, bool) bool) error { + return c.ListProvisioningArtifactsForServiceActionPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListProvisioningArtifactsForServiceActionPagesWithContext same as ListProvisioningArtifactsForServiceActionPages 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 *ServiceCatalog) ListProvisioningArtifactsForServiceActionPagesWithContext(ctx aws.Context, input *ListProvisioningArtifactsForServiceActionInput, fn func(*ListProvisioningArtifactsForServiceActionOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListProvisioningArtifactsForServiceActionInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListProvisioningArtifactsForServiceActionRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListProvisioningArtifactsForServiceActionOutput), !p.HasNextPage()) + } + return p.Err() +} + const opListRecordHistory = "ListRecordHistory" // ListRecordHistoryRequest generates a "aws/request.Request" representing the // client's request for the ListRecordHistory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4174,7 +5505,7 @@ const opListResourcesForTagOption = "ListResourcesForTagOption" // ListResourcesForTagOptionRequest generates a "aws/request.Request" representing the // client's request for the ListResourcesForTagOption operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4312,133 +5643,407 @@ func (c *ServiceCatalog) ListResourcesForTagOptionPagesWithContext(ctx aws.Conte return p.Err() } -const opListTagOptions = "ListTagOptions" +const opListServiceActions = "ListServiceActions" -// ListTagOptionsRequest generates a "aws/request.Request" representing the -// client's request for the ListTagOptions operation. The "output" return +// ListServiceActionsRequest generates a "aws/request.Request" representing the +// client's request for the ListServiceActions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 ListTagOptions for more information on using the ListTagOptions +// See ListServiceActions for more information on using the ListServiceActions // 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 ListTagOptionsRequest method. -// req, resp := client.ListTagOptionsRequest(params) +// // Example sending a request using the ListServiceActionsRequest method. +// req, resp := client.ListServiceActionsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListTagOptions -func (c *ServiceCatalog) ListTagOptionsRequest(input *ListTagOptionsInput) (req *request.Request, output *ListTagOptionsOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListServiceActions +func (c *ServiceCatalog) ListServiceActionsRequest(input *ListServiceActionsInput) (req *request.Request, output *ListServiceActionsOutput) { op := &request.Operation{ - Name: opListTagOptions, + Name: opListServiceActions, HTTPMethod: "POST", HTTPPath: "/", Paginator: &request.Paginator{ InputTokens: []string{"PageToken"}, - OutputTokens: []string{"PageToken"}, + OutputTokens: []string{"NextPageToken"}, LimitToken: "PageSize", TruncationToken: "", }, } if input == nil { - input = &ListTagOptionsInput{} + input = &ListServiceActionsInput{} } - output = &ListTagOptionsOutput{} + output = &ListServiceActionsOutput{} req = c.newRequest(op, input, output) return } -// ListTagOptions API operation for AWS Service Catalog. +// ListServiceActions API operation for AWS Service Catalog. // -// Lists the specified TagOptions or all TagOptions. +// Lists all self-service actions. // // 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 Service Catalog's -// API operation ListTagOptions for usage and error information. +// API operation ListServiceActions for usage and error information. // // Returned Error Codes: -// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" -// An operation requiring TagOptions failed because the TagOptions migration -// process has not been performed for this account. Please use the AWS console -// to perform the migration process before retrying the operation. -// // * ErrCodeInvalidParametersException "InvalidParametersException" // One or more parameters provided to the operation are not valid. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListTagOptions -func (c *ServiceCatalog) ListTagOptions(input *ListTagOptionsInput) (*ListTagOptionsOutput, error) { - req, out := c.ListTagOptionsRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListServiceActions +func (c *ServiceCatalog) ListServiceActions(input *ListServiceActionsInput) (*ListServiceActionsOutput, error) { + req, out := c.ListServiceActionsRequest(input) return out, req.Send() } -// ListTagOptionsWithContext is the same as ListTagOptions with the addition of +// ListServiceActionsWithContext is the same as ListServiceActions with the addition of // the ability to pass a context and additional request options. // -// See ListTagOptions for details on how to use this API operation. +// See ListServiceActions 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 *ServiceCatalog) ListTagOptionsWithContext(ctx aws.Context, input *ListTagOptionsInput, opts ...request.Option) (*ListTagOptionsOutput, error) { - req, out := c.ListTagOptionsRequest(input) +func (c *ServiceCatalog) ListServiceActionsWithContext(ctx aws.Context, input *ListServiceActionsInput, opts ...request.Option) (*ListServiceActionsOutput, error) { + req, out := c.ListServiceActionsRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// ListTagOptionsPages iterates over the pages of a ListTagOptions operation, +// ListServiceActionsPages iterates over the pages of a ListServiceActions operation, // calling the "fn" function with the response data for each page. To stop // iterating, return false from the fn function. // -// See ListTagOptions method for more information on how to use this operation. +// See ListServiceActions 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 ListTagOptions operation. +// // Example iterating over at most 3 pages of a ListServiceActions operation. // pageNum := 0 -// err := client.ListTagOptionsPages(params, -// func(page *ListTagOptionsOutput, lastPage bool) bool { +// err := client.ListServiceActionsPages(params, +// func(page *ListServiceActionsOutput, lastPage bool) bool { // pageNum++ // fmt.Println(page) // return pageNum <= 3 // }) // -func (c *ServiceCatalog) ListTagOptionsPages(input *ListTagOptionsInput, fn func(*ListTagOptionsOutput, bool) bool) error { - return c.ListTagOptionsPagesWithContext(aws.BackgroundContext(), input, fn) +func (c *ServiceCatalog) ListServiceActionsPages(input *ListServiceActionsInput, fn func(*ListServiceActionsOutput, bool) bool) error { + return c.ListServiceActionsPagesWithContext(aws.BackgroundContext(), input, fn) } -// ListTagOptionsPagesWithContext same as ListTagOptionsPages except +// ListServiceActionsPagesWithContext same as ListServiceActionsPages 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 *ServiceCatalog) ListTagOptionsPagesWithContext(ctx aws.Context, input *ListTagOptionsInput, fn func(*ListTagOptionsOutput, bool) bool, opts ...request.Option) error { +func (c *ServiceCatalog) ListServiceActionsPagesWithContext(ctx aws.Context, input *ListServiceActionsInput, fn func(*ListServiceActionsOutput, bool) bool, opts ...request.Option) error { p := request.Pagination{ NewRequest: func() (*request.Request, error) { - var inCpy *ListTagOptionsInput + var inCpy *ListServiceActionsInput if input != nil { tmp := *input inCpy = &tmp } - req, _ := c.ListTagOptionsRequest(inCpy) + req, _ := c.ListServiceActionsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListServiceActionsOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListServiceActionsForProvisioningArtifact = "ListServiceActionsForProvisioningArtifact" + +// ListServiceActionsForProvisioningArtifactRequest generates a "aws/request.Request" representing the +// client's request for the ListServiceActionsForProvisioningArtifact 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 ListServiceActionsForProvisioningArtifact for more information on using the ListServiceActionsForProvisioningArtifact +// 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 ListServiceActionsForProvisioningArtifactRequest method. +// req, resp := client.ListServiceActionsForProvisioningArtifactRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListServiceActionsForProvisioningArtifact +func (c *ServiceCatalog) ListServiceActionsForProvisioningArtifactRequest(input *ListServiceActionsForProvisioningArtifactInput) (req *request.Request, output *ListServiceActionsForProvisioningArtifactOutput) { + op := &request.Operation{ + Name: opListServiceActionsForProvisioningArtifact, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"PageToken"}, + OutputTokens: []string{"NextPageToken"}, + LimitToken: "PageSize", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListServiceActionsForProvisioningArtifactInput{} + } + + output = &ListServiceActionsForProvisioningArtifactOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListServiceActionsForProvisioningArtifact API operation for AWS Service Catalog. +// +// Returns a paginated list of self-service actions associated with the specified +// Product ID and Provisioning Artifact ID. +// +// 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 Service Catalog's +// API operation ListServiceActionsForProvisioningArtifact for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListServiceActionsForProvisioningArtifact +func (c *ServiceCatalog) ListServiceActionsForProvisioningArtifact(input *ListServiceActionsForProvisioningArtifactInput) (*ListServiceActionsForProvisioningArtifactOutput, error) { + req, out := c.ListServiceActionsForProvisioningArtifactRequest(input) + return out, req.Send() +} + +// ListServiceActionsForProvisioningArtifactWithContext is the same as ListServiceActionsForProvisioningArtifact with the addition of +// the ability to pass a context and additional request options. +// +// See ListServiceActionsForProvisioningArtifact 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 *ServiceCatalog) ListServiceActionsForProvisioningArtifactWithContext(ctx aws.Context, input *ListServiceActionsForProvisioningArtifactInput, opts ...request.Option) (*ListServiceActionsForProvisioningArtifactOutput, error) { + req, out := c.ListServiceActionsForProvisioningArtifactRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListServiceActionsForProvisioningArtifactPages iterates over the pages of a ListServiceActionsForProvisioningArtifact operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListServiceActionsForProvisioningArtifact 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 ListServiceActionsForProvisioningArtifact operation. +// pageNum := 0 +// err := client.ListServiceActionsForProvisioningArtifactPages(params, +// func(page *ListServiceActionsForProvisioningArtifactOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ServiceCatalog) ListServiceActionsForProvisioningArtifactPages(input *ListServiceActionsForProvisioningArtifactInput, fn func(*ListServiceActionsForProvisioningArtifactOutput, bool) bool) error { + return c.ListServiceActionsForProvisioningArtifactPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListServiceActionsForProvisioningArtifactPagesWithContext same as ListServiceActionsForProvisioningArtifactPages 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 *ServiceCatalog) ListServiceActionsForProvisioningArtifactPagesWithContext(ctx aws.Context, input *ListServiceActionsForProvisioningArtifactInput, fn func(*ListServiceActionsForProvisioningArtifactOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListServiceActionsForProvisioningArtifactInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListServiceActionsForProvisioningArtifactRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*ListServiceActionsForProvisioningArtifactOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opListTagOptions = "ListTagOptions" + +// ListTagOptionsRequest generates a "aws/request.Request" representing the +// client's request for the ListTagOptions 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 ListTagOptions for more information on using the ListTagOptions +// 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 ListTagOptionsRequest method. +// req, resp := client.ListTagOptionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListTagOptions +func (c *ServiceCatalog) ListTagOptionsRequest(input *ListTagOptionsInput) (req *request.Request, output *ListTagOptionsOutput) { + op := &request.Operation{ + Name: opListTagOptions, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"PageToken"}, + OutputTokens: []string{"PageToken"}, + LimitToken: "PageSize", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListTagOptionsInput{} + } + + output = &ListTagOptionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagOptions API operation for AWS Service Catalog. +// +// Lists the specified TagOptions or all TagOptions. +// +// 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 Service Catalog's +// API operation ListTagOptions for usage and error information. +// +// Returned Error Codes: +// * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" +// An operation requiring TagOptions failed because the TagOptions migration +// process has not been performed for this account. Please use the AWS console +// to perform the migration process before retrying the operation. +// +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/ListTagOptions +func (c *ServiceCatalog) ListTagOptions(input *ListTagOptionsInput) (*ListTagOptionsOutput, error) { + req, out := c.ListTagOptionsRequest(input) + return out, req.Send() +} + +// ListTagOptionsWithContext is the same as ListTagOptions with the addition of +// the ability to pass a context and additional request options. +// +// See ListTagOptions 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 *ServiceCatalog) ListTagOptionsWithContext(ctx aws.Context, input *ListTagOptionsInput, opts ...request.Option) (*ListTagOptionsOutput, error) { + req, out := c.ListTagOptionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListTagOptionsPages iterates over the pages of a ListTagOptions operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListTagOptions 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 ListTagOptions operation. +// pageNum := 0 +// err := client.ListTagOptionsPages(params, +// func(page *ListTagOptionsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ServiceCatalog) ListTagOptionsPages(input *ListTagOptionsInput, fn func(*ListTagOptionsOutput, bool) bool) error { + return c.ListTagOptionsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListTagOptionsPagesWithContext same as ListTagOptionsPages 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 *ServiceCatalog) ListTagOptionsPagesWithContext(ctx aws.Context, input *ListTagOptionsInput, fn func(*ListTagOptionsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListTagOptionsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListTagOptionsRequest(inCpy) req.SetContext(ctx) req.ApplyOptions(opts...) return req, nil @@ -4457,7 +6062,7 @@ const opProvisionProduct = "ProvisionProduct" // ProvisionProductRequest generates a "aws/request.Request" representing the // client's request for the ProvisionProduct operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4552,7 +6157,7 @@ const opRejectPortfolioShare = "RejectPortfolioShare" // RejectPortfolioShareRequest generates a "aws/request.Request" representing the // client's request for the RejectPortfolioShare operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4586,6 +6191,7 @@ func (c *ServiceCatalog) RejectPortfolioShareRequest(input *RejectPortfolioShare output = &RejectPortfolioShareOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4631,7 +6237,7 @@ const opScanProvisionedProducts = "ScanProvisionedProducts" // ScanProvisionedProductsRequest generates a "aws/request.Request" representing the // client's request for the ScanProvisionedProducts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4712,7 +6318,7 @@ const opSearchProducts = "SearchProducts" // SearchProductsRequest generates a "aws/request.Request" representing the // client's request for the SearchProducts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4847,7 +6453,7 @@ const opSearchProductsAsAdmin = "SearchProductsAsAdmin" // SearchProductsAsAdminRequest generates a "aws/request.Request" representing the // client's request for the SearchProductsAsAdmin operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4985,7 +6591,7 @@ const opSearchProvisionedProducts = "SearchProvisionedProducts" // SearchProvisionedProductsRequest generates a "aws/request.Request" representing the // client's request for the SearchProvisionedProducts operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5120,7 +6726,7 @@ const opTerminateProvisionedProduct = "TerminateProvisionedProduct" // TerminateProvisionedProductRequest generates a "aws/request.Request" representing the // client's request for the TerminateProvisionedProduct operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5204,7 +6810,7 @@ const opUpdateConstraint = "UpdateConstraint" // UpdateConstraintRequest generates a "aws/request.Request" representing the // client's request for the UpdateConstraint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5286,7 +6892,7 @@ const opUpdatePortfolio = "UpdatePortfolio" // UpdatePortfolioRequest generates a "aws/request.Request" representing the // client's request for the UpdatePortfolio operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5380,7 +6986,7 @@ const opUpdateProduct = "UpdateProduct" // UpdateProductRequest generates a "aws/request.Request" representing the // client's request for the UpdateProduct operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5467,7 +7073,7 @@ const opUpdateProvisionedProduct = "UpdateProvisionedProduct" // UpdateProvisionedProductRequest generates a "aws/request.Request" representing the // client's request for the UpdateProvisionedProduct operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5556,7 +7162,7 @@ const opUpdateProvisioningArtifact = "UpdateProvisioningArtifact" // UpdateProvisioningArtifactRequest generates a "aws/request.Request" representing the // client's request for the UpdateProvisioningArtifact operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5637,58 +7243,140 @@ func (c *ServiceCatalog) UpdateProvisioningArtifactWithContext(ctx aws.Context, return out, req.Send() } -const opUpdateTagOption = "UpdateTagOption" +const opUpdateServiceAction = "UpdateServiceAction" -// UpdateTagOptionRequest generates a "aws/request.Request" representing the -// client's request for the UpdateTagOption operation. The "output" return +// UpdateServiceActionRequest generates a "aws/request.Request" representing the +// client's request for the UpdateServiceAction operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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 UpdateTagOption for more information on using the UpdateTagOption +// See UpdateServiceAction for more information on using the UpdateServiceAction // 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 UpdateTagOptionRequest method. -// req, resp := client.UpdateTagOptionRequest(params) +// // Example sending a request using the UpdateServiceActionRequest method. +// req, resp := client.UpdateServiceActionRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateTagOption -func (c *ServiceCatalog) UpdateTagOptionRequest(input *UpdateTagOptionInput) (req *request.Request, output *UpdateTagOptionOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateServiceAction +func (c *ServiceCatalog) UpdateServiceActionRequest(input *UpdateServiceActionInput) (req *request.Request, output *UpdateServiceActionOutput) { op := &request.Operation{ - Name: opUpdateTagOption, + Name: opUpdateServiceAction, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &UpdateTagOptionInput{} + input = &UpdateServiceActionInput{} } - output = &UpdateTagOptionOutput{} + output = &UpdateServiceActionOutput{} req = c.newRequest(op, input, output) return } -// UpdateTagOption API operation for AWS Service Catalog. +// UpdateServiceAction API operation for AWS Service Catalog. // -// Updates the specified TagOption. +// Updates a self-service action. // // 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 Service Catalog's -// API operation UpdateTagOption for usage and error information. +// API operation UpdateServiceAction for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidParametersException "InvalidParametersException" +// One or more parameters provided to the operation are not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateServiceAction +func (c *ServiceCatalog) UpdateServiceAction(input *UpdateServiceActionInput) (*UpdateServiceActionOutput, error) { + req, out := c.UpdateServiceActionRequest(input) + return out, req.Send() +} + +// UpdateServiceActionWithContext is the same as UpdateServiceAction with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateServiceAction 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 *ServiceCatalog) UpdateServiceActionWithContext(ctx aws.Context, input *UpdateServiceActionInput, opts ...request.Option) (*UpdateServiceActionOutput, error) { + req, out := c.UpdateServiceActionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateTagOption = "UpdateTagOption" + +// UpdateTagOptionRequest generates a "aws/request.Request" representing the +// client's request for the UpdateTagOption 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 UpdateTagOption for more information on using the UpdateTagOption +// 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 UpdateTagOptionRequest method. +// req, resp := client.UpdateTagOptionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicecatalog-2015-12-10/UpdateTagOption +func (c *ServiceCatalog) UpdateTagOptionRequest(input *UpdateTagOptionInput) (req *request.Request, output *UpdateTagOptionOutput) { + op := &request.Operation{ + Name: opUpdateTagOption, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateTagOptionInput{} + } + + output = &UpdateTagOptionOutput{} + req = c.newRequest(op, input, output) + return +} + +// UpdateTagOption API operation for AWS Service Catalog. +// +// Updates the specified TagOption. +// +// 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 Service Catalog's +// API operation UpdateTagOption for usage and error information. // // Returned Error Codes: // * ErrCodeTagOptionNotMigratedException "TagOptionNotMigratedException" @@ -5743,6 +7431,20 @@ type AcceptPortfolioShareInput struct { // // PortfolioId is a required field PortfolioId *string `min:"1" type:"string" required:"true"` + + // The type of shared portfolios to accept. The default is to accept imported + // portfolios. + // + // * AWS_ORGANIZATIONS - Accept portfolios shared by the master account of + // your organization. + // + // * IMPORTED - Accept imported portfolios. + // + // * AWS_SERVICECATALOG - Not supported. (Throws ResourceNotFoundException.) + // + // For example, aws servicecatalog accept-portfolio-share --portfolio-id "port-2qwzkwxt3y5fk" + // --portfolio-share-type AWS_ORGANIZATIONS + PortfolioShareType *string `type:"string" enum:"PortfolioShareType"` } // String returns the string representation @@ -5783,6 +7485,12 @@ func (s *AcceptPortfolioShareInput) SetPortfolioId(v string) *AcceptPortfolioSha return s } +// SetPortfolioShareType sets the PortfolioShareType field's value. +func (s *AcceptPortfolioShareInput) SetPortfolioShareType(v string) *AcceptPortfolioShareInput { + s.PortfolioShareType = &v + return s +} + type AcceptPortfolioShareOutput struct { _ struct{} `type:"structure"` } @@ -6036,6 +7744,110 @@ func (s AssociateProductWithPortfolioOutput) GoString() string { return s.String() } +type AssociateServiceActionWithProvisioningArtifactInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The product identifier. For example, prod-abcdzk7xy33qa. + // + // ProductId is a required field + ProductId *string `min:"1" type:"string" required:"true"` + + // The identifier of the provisioning artifact. For example, pa-4abcdjnxjj6ne. + // + // ProvisioningArtifactId is a required field + ProvisioningArtifactId *string `min:"1" type:"string" required:"true"` + + // The self-service action identifier. For example, act-fs7abcd89wxyz. + // + // ServiceActionId is a required field + ServiceActionId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s AssociateServiceActionWithProvisioningArtifactInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateServiceActionWithProvisioningArtifactInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateServiceActionWithProvisioningArtifactInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateServiceActionWithProvisioningArtifactInput"} + if s.ProductId == nil { + invalidParams.Add(request.NewErrParamRequired("ProductId")) + } + if s.ProductId != nil && len(*s.ProductId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) + } + if s.ProvisioningArtifactId == nil { + invalidParams.Add(request.NewErrParamRequired("ProvisioningArtifactId")) + } + if s.ProvisioningArtifactId != nil && len(*s.ProvisioningArtifactId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProvisioningArtifactId", 1)) + } + if s.ServiceActionId == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceActionId")) + } + if s.ServiceActionId != nil && len(*s.ServiceActionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ServiceActionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *AssociateServiceActionWithProvisioningArtifactInput) SetAcceptLanguage(v string) *AssociateServiceActionWithProvisioningArtifactInput { + s.AcceptLanguage = &v + return s +} + +// SetProductId sets the ProductId field's value. +func (s *AssociateServiceActionWithProvisioningArtifactInput) SetProductId(v string) *AssociateServiceActionWithProvisioningArtifactInput { + s.ProductId = &v + return s +} + +// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. +func (s *AssociateServiceActionWithProvisioningArtifactInput) SetProvisioningArtifactId(v string) *AssociateServiceActionWithProvisioningArtifactInput { + s.ProvisioningArtifactId = &v + return s +} + +// SetServiceActionId sets the ServiceActionId field's value. +func (s *AssociateServiceActionWithProvisioningArtifactInput) SetServiceActionId(v string) *AssociateServiceActionWithProvisioningArtifactInput { + s.ServiceActionId = &v + return s +} + +type AssociateServiceActionWithProvisioningArtifactOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AssociateServiceActionWithProvisioningArtifactOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateServiceActionWithProvisioningArtifactOutput) GoString() string { + return s.String() +} + type AssociateTagOptionWithResourceInput struct { _ struct{} `type:"structure"` @@ -6105,88 +7917,272 @@ func (s AssociateTagOptionWithResourceOutput) GoString() string { return s.String() } -// Information about a CloudWatch dashboard. -type CloudWatchDashboard struct { +type BatchAssociateServiceActionWithProvisioningArtifactInput struct { _ struct{} `type:"structure"` - // The name of the CloudWatch dashboard. - Name *string `type:"string"` + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // One or more associations, each consisting of the Action ID, the Product ID, + // and the Provisioning Artifact ID. + // + // ServiceActionAssociations is a required field + ServiceActionAssociations []*ServiceActionAssociation `min:"1" type:"list" required:"true"` } // String returns the string representation -func (s CloudWatchDashboard) String() string { +func (s BatchAssociateServiceActionWithProvisioningArtifactInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CloudWatchDashboard) GoString() string { +func (s BatchAssociateServiceActionWithProvisioningArtifactInput) GoString() string { return s.String() } -// SetName sets the Name field's value. -func (s *CloudWatchDashboard) SetName(v string) *CloudWatchDashboard { - s.Name = &v - return s -} +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchAssociateServiceActionWithProvisioningArtifactInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchAssociateServiceActionWithProvisioningArtifactInput"} + if s.ServiceActionAssociations == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceActionAssociations")) + } + if s.ServiceActionAssociations != nil && len(s.ServiceActionAssociations) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ServiceActionAssociations", 1)) + } + if s.ServiceActionAssociations != nil { + for i, v := range s.ServiceActionAssociations { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ServiceActionAssociations", i), err.(request.ErrInvalidParams)) + } + } + } -// Information about a constraint. -type ConstraintDetail struct { - _ struct{} `type:"structure"` + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} - // The identifier of the constraint. - ConstraintId *string `min:"1" type:"string"` +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *BatchAssociateServiceActionWithProvisioningArtifactInput) SetAcceptLanguage(v string) *BatchAssociateServiceActionWithProvisioningArtifactInput { + s.AcceptLanguage = &v + return s +} - // The description of the constraint. - Description *string `type:"string"` +// SetServiceActionAssociations sets the ServiceActionAssociations field's value. +func (s *BatchAssociateServiceActionWithProvisioningArtifactInput) SetServiceActionAssociations(v []*ServiceActionAssociation) *BatchAssociateServiceActionWithProvisioningArtifactInput { + s.ServiceActionAssociations = v + return s +} - // The owner of the constraint. - Owner *string `type:"string"` +type BatchAssociateServiceActionWithProvisioningArtifactOutput struct { + _ struct{} `type:"structure"` - // The type of constraint. - // - // * LAUNCH - // - // * NOTIFICATION - // - // * TEMPLATE - Type *string `min:"1" type:"string"` + // An object that contains a list of errors, along with information to help + // you identify the self-service action. + FailedServiceActionAssociations []*FailedServiceActionAssociation `type:"list"` } // String returns the string representation -func (s ConstraintDetail) String() string { +func (s BatchAssociateServiceActionWithProvisioningArtifactOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ConstraintDetail) GoString() string { +func (s BatchAssociateServiceActionWithProvisioningArtifactOutput) GoString() string { return s.String() } -// SetConstraintId sets the ConstraintId field's value. -func (s *ConstraintDetail) SetConstraintId(v string) *ConstraintDetail { - s.ConstraintId = &v +// SetFailedServiceActionAssociations sets the FailedServiceActionAssociations field's value. +func (s *BatchAssociateServiceActionWithProvisioningArtifactOutput) SetFailedServiceActionAssociations(v []*FailedServiceActionAssociation) *BatchAssociateServiceActionWithProvisioningArtifactOutput { + s.FailedServiceActionAssociations = v return s } -// SetDescription sets the Description field's value. -func (s *ConstraintDetail) SetDescription(v string) *ConstraintDetail { - s.Description = &v - return s -} +type BatchDisassociateServiceActionFromProvisioningArtifactInput struct { + _ struct{} `type:"structure"` -// SetOwner sets the Owner field's value. -func (s *ConstraintDetail) SetOwner(v string) *ConstraintDetail { - s.Owner = &v - return s -} + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` -// SetType sets the Type field's value. -func (s *ConstraintDetail) SetType(v string) *ConstraintDetail { - s.Type = &v - return s + // One or more associations, each consisting of the Action ID, the Product ID, + // and the Provisioning Artifact ID. + // + // ServiceActionAssociations is a required field + ServiceActionAssociations []*ServiceActionAssociation `min:"1" type:"list" required:"true"` } -// Summary information about a constraint. +// String returns the string representation +func (s BatchDisassociateServiceActionFromProvisioningArtifactInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchDisassociateServiceActionFromProvisioningArtifactInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *BatchDisassociateServiceActionFromProvisioningArtifactInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "BatchDisassociateServiceActionFromProvisioningArtifactInput"} + if s.ServiceActionAssociations == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceActionAssociations")) + } + if s.ServiceActionAssociations != nil && len(s.ServiceActionAssociations) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ServiceActionAssociations", 1)) + } + if s.ServiceActionAssociations != nil { + for i, v := range s.ServiceActionAssociations { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ServiceActionAssociations", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *BatchDisassociateServiceActionFromProvisioningArtifactInput) SetAcceptLanguage(v string) *BatchDisassociateServiceActionFromProvisioningArtifactInput { + s.AcceptLanguage = &v + return s +} + +// SetServiceActionAssociations sets the ServiceActionAssociations field's value. +func (s *BatchDisassociateServiceActionFromProvisioningArtifactInput) SetServiceActionAssociations(v []*ServiceActionAssociation) *BatchDisassociateServiceActionFromProvisioningArtifactInput { + s.ServiceActionAssociations = v + return s +} + +type BatchDisassociateServiceActionFromProvisioningArtifactOutput struct { + _ struct{} `type:"structure"` + + // An object that contains a list of errors, along with information to help + // you identify the self-service action. + FailedServiceActionAssociations []*FailedServiceActionAssociation `type:"list"` +} + +// String returns the string representation +func (s BatchDisassociateServiceActionFromProvisioningArtifactOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s BatchDisassociateServiceActionFromProvisioningArtifactOutput) GoString() string { + return s.String() +} + +// SetFailedServiceActionAssociations sets the FailedServiceActionAssociations field's value. +func (s *BatchDisassociateServiceActionFromProvisioningArtifactOutput) SetFailedServiceActionAssociations(v []*FailedServiceActionAssociation) *BatchDisassociateServiceActionFromProvisioningArtifactOutput { + s.FailedServiceActionAssociations = v + return s +} + +// Information about a CloudWatch dashboard. +type CloudWatchDashboard struct { + _ struct{} `type:"structure"` + + // The name of the CloudWatch dashboard. + Name *string `type:"string"` +} + +// String returns the string representation +func (s CloudWatchDashboard) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CloudWatchDashboard) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *CloudWatchDashboard) SetName(v string) *CloudWatchDashboard { + s.Name = &v + return s +} + +// Information about a constraint. +type ConstraintDetail struct { + _ struct{} `type:"structure"` + + // The identifier of the constraint. + ConstraintId *string `min:"1" type:"string"` + + // The description of the constraint. + Description *string `type:"string"` + + // The owner of the constraint. + Owner *string `type:"string"` + + // The type of constraint. + // + // * LAUNCH + // + // * NOTIFICATION + // + // * STACKSET + // + // * TEMPLATE + Type *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ConstraintDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ConstraintDetail) GoString() string { + return s.String() +} + +// SetConstraintId sets the ConstraintId field's value. +func (s *ConstraintDetail) SetConstraintId(v string) *ConstraintDetail { + s.ConstraintId = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *ConstraintDetail) SetDescription(v string) *ConstraintDetail { + s.Description = &v + return s +} + +// SetOwner sets the Owner field's value. +func (s *ConstraintDetail) SetOwner(v string) *ConstraintDetail { + s.Owner = &v + return s +} + +// SetType sets the Type field's value. +func (s *ConstraintDetail) SetType(v string) *ConstraintDetail { + s.Type = &v + return s +} + +// Summary information about a constraint. type ConstraintSummary struct { _ struct{} `type:"structure"` @@ -6199,6 +8195,8 @@ type ConstraintSummary struct { // // * NOTIFICATION // + // * STACKSET + // // * TEMPLATE Type *string `min:"1" type:"string"` } @@ -6244,9 +8242,7 @@ type CopyProductInput struct { // A unique identifier that you provide to ensure idempotency. If multiple requests // differ only by the idempotency token, the same response is returned for each // repeated request. - // - // IdempotencyToken is a required field - IdempotencyToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` + IdempotencyToken *string `min:"1" type:"string" idempotencyToken:"true"` // The Amazon Resource Name (ARN) of the source product. // @@ -6277,9 +8273,6 @@ func (s CopyProductInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CopyProductInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CopyProductInput"} - if s.IdempotencyToken == nil { - invalidParams.Add(request.NewErrParamRequired("IdempotencyToken")) - } if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) } @@ -6382,20 +8375,34 @@ type CreateConstraintInput struct { // A unique identifier that you provide to ensure idempotency. If multiple requests // differ only by the idempotency token, the same response is returned for each // repeated request. - // - // IdempotencyToken is a required field - IdempotencyToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` + IdempotencyToken *string `min:"1" type:"string" idempotencyToken:"true"` // The constraint parameters, in JSON format. The syntax depends on the constraint // type as follows: // // LAUNCHSpecify the RoleArn property as follows: // - // \"RoleArn\" : \"arn:aws:iam::123456789012:role/LaunchRole\" + // {"RoleArn" : "arn:aws:iam::123456789012:role/LaunchRole"} + // + // You cannot have both a LAUNCH and a STACKSET constraint. + // + // You also cannot have more than one LAUNCH constraint on a product and portfolio. // // NOTIFICATIONSpecify the NotificationArns property as follows: // - // \"NotificationArns\" : [\"arn:aws:sns:us-east-1:123456789012:Topic\"] + // {"NotificationArns" : ["arn:aws:sns:us-east-1:123456789012:Topic"]} + // + // STACKSETSpecify the Parameters property as follows: + // + // {"Version": "String", "Properties": {"AccountList": [ "String" ], "RegionList": + // [ "String" ], "AdminRole": "String", "ExecutionRole": "String"}} + // + // You cannot have both a LAUNCH and a STACKSET constraint. + // + // You also cannot have more than one STACKSET constraint on a product and portfolio. + // + // Products with a STACKSET constraint will launch an AWS CloudFormation stack + // set. // // TEMPLATESpecify the Rules property. For more information, see Template Constraint // Rules (http://docs.aws.amazon.com/servicecatalog/latest/adminguide/reference-template_constraint_rules.html). @@ -6419,6 +8426,8 @@ type CreateConstraintInput struct { // // * NOTIFICATION // + // * STACKSET + // // * TEMPLATE // // Type is a required field @@ -6438,9 +8447,6 @@ func (s CreateConstraintInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateConstraintInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateConstraintInput"} - if s.IdempotencyToken == nil { - invalidParams.Add(request.NewErrParamRequired("IdempotencyToken")) - } if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) } @@ -6578,9 +8584,7 @@ type CreatePortfolioInput struct { // A unique identifier that you provide to ensure idempotency. If multiple requests // differ only by the idempotency token, the same response is returned for each // repeated request. - // - // IdempotencyToken is a required field - IdempotencyToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` + IdempotencyToken *string `min:"1" type:"string" idempotencyToken:"true"` // The name of the portfolio provider. // @@ -6610,9 +8614,6 @@ func (s *CreatePortfolioInput) Validate() error { if s.DisplayName != nil && len(*s.DisplayName) < 1 { invalidParams.Add(request.NewErrParamMinLen("DisplayName", 1)) } - if s.IdempotencyToken == nil { - invalidParams.Add(request.NewErrParamRequired("IdempotencyToken")) - } if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) } @@ -6719,10 +8720,15 @@ type CreatePortfolioShareInput struct { // * zh - Chinese AcceptLanguage *string `type:"string"` - // The AWS account ID. - // - // AccountId is a required field - AccountId *string `type:"string" required:"true"` + // The AWS account ID. For example, 123456789012. + AccountId *string `type:"string"` + + // The organization node to whom you are going to share. If OrganizationNode + // is passed in, PortfolioShare will be created for the node and its children + // (when applies), and a PortfolioShareToken will be returned in the output + // in order for the administrator to monitor the status of the PortfolioShare + // creation process. + OrganizationNode *OrganizationNode `type:"structure"` // The portfolio identifier. // @@ -6743,9 +8749,6 @@ func (s CreatePortfolioShareInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreatePortfolioShareInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreatePortfolioShareInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } if s.PortfolioId == nil { invalidParams.Add(request.NewErrParamRequired("PortfolioId")) } @@ -6771,6 +8774,12 @@ func (s *CreatePortfolioShareInput) SetAccountId(v string) *CreatePortfolioShare return s } +// SetOrganizationNode sets the OrganizationNode field's value. +func (s *CreatePortfolioShareInput) SetOrganizationNode(v *OrganizationNode) *CreatePortfolioShareInput { + s.OrganizationNode = v + return s +} + // SetPortfolioId sets the PortfolioId field's value. func (s *CreatePortfolioShareInput) SetPortfolioId(v string) *CreatePortfolioShareInput { s.PortfolioId = &v @@ -6779,6 +8788,10 @@ func (s *CreatePortfolioShareInput) SetPortfolioId(v string) *CreatePortfolioSha type CreatePortfolioShareOutput struct { _ struct{} `type:"structure"` + + // The portfolio share unique identifier. This will only be returned if portfolio + // is shared to an organization node. + PortfolioShareToken *string `type:"string"` } // String returns the string representation @@ -6791,6 +8804,12 @@ func (s CreatePortfolioShareOutput) GoString() string { return s.String() } +// SetPortfolioShareToken sets the PortfolioShareToken field's value. +func (s *CreatePortfolioShareOutput) SetPortfolioShareToken(v string) *CreatePortfolioShareOutput { + s.PortfolioShareToken = &v + return s +} + type CreateProductInput struct { _ struct{} `type:"structure"` @@ -6812,9 +8831,7 @@ type CreateProductInput struct { // A unique identifier that you provide to ensure idempotency. If multiple requests // differ only by the idempotency token, the same response is returned for each // repeated request. - // - // IdempotencyToken is a required field - IdempotencyToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` + IdempotencyToken *string `min:"1" type:"string" idempotencyToken:"true"` // The name of the product. // @@ -6862,9 +8879,6 @@ func (s CreateProductInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateProductInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateProductInput"} - if s.IdempotencyToken == nil { - invalidParams.Add(request.NewErrParamRequired("IdempotencyToken")) - } if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) } @@ -7030,9 +9044,7 @@ type CreateProvisionedProductPlanInput struct { // A unique identifier that you provide to ensure idempotency. If multiple requests // differ only by the idempotency token, the same response is returned for each // repeated request. - // - // IdempotencyToken is a required field - IdempotencyToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` + IdempotencyToken *string `min:"1" type:"string" idempotencyToken:"true"` // Passed to CloudFormation. The SNS topic ARNs to which to publish stack-related // events. @@ -7090,9 +9102,6 @@ func (s CreateProvisionedProductPlanInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateProvisionedProductPlanInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateProvisionedProductPlanInput"} - if s.IdempotencyToken == nil { - invalidParams.Add(request.NewErrParamRequired("IdempotencyToken")) - } if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) } @@ -7290,9 +9299,7 @@ type CreateProvisioningArtifactInput struct { // A unique identifier that you provide to ensure idempotency. If multiple requests // differ only by the idempotency token, the same response is returned for each // repeated request. - // - // IdempotencyToken is a required field - IdempotencyToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` + IdempotencyToken *string `min:"1" type:"string" idempotencyToken:"true"` // The configuration for the provisioning artifact. // @@ -7318,9 +9325,6 @@ func (s CreateProvisioningArtifactInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateProvisioningArtifactInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateProvisioningArtifactInput"} - if s.IdempotencyToken == nil { - invalidParams.Add(request.NewErrParamRequired("IdempotencyToken")) - } if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) } @@ -7410,44 +9414,86 @@ func (s *CreateProvisioningArtifactOutput) SetStatus(v string) *CreateProvisioni return s } -type CreateTagOptionInput struct { +type CreateServiceActionInput struct { _ struct{} `type:"structure"` - // The TagOption key. + // The language code. // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` - // The TagOption value. + // The self-service action definition. Can be one of the following: // - // Value is a required field - Value *string `min:"1" type:"string" required:"true"` + // NameThe name of the AWS Systems Manager Document. For example, AWS-RestartEC2Instance. + // + // VersionThe AWS Systems Manager automation document version. For example, + // "Version": "1" + // + // AssumeRoleThe Amazon Resource Name (ARN) of the role that performs the self-service + // actions on your behalf. For example, "AssumeRole": "arn:aws:iam::12345678910:role/ActionRole". + // + // To reuse the provisioned product launch role, set to "AssumeRole": "LAUNCH_ROLE". + // + // ParametersThe list of parameters in JSON format. + // + // For example: [{\"Name\":\"InstanceId\",\"Type\":\"TARGET\"}]. + // + // Definition is a required field + Definition map[string]*string `min:"1" type:"map" required:"true"` + + // The service action definition type. For example, SSM_AUTOMATION. + // + // DefinitionType is a required field + DefinitionType *string `type:"string" required:"true" enum:"ServiceActionDefinitionType"` + + // The self-service action description. + Description *string `type:"string"` + + // A unique identifier that you provide to ensure idempotency. If multiple requests + // differ only by the idempotency token, the same response is returned for each + // repeated request. + IdempotencyToken *string `min:"1" type:"string" idempotencyToken:"true"` + + // The self-service action name. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` } // String returns the string representation -func (s CreateTagOptionInput) String() string { +func (s CreateServiceActionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateTagOptionInput) GoString() string { +func (s CreateServiceActionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *CreateTagOptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateTagOptionInput"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) +func (s *CreateServiceActionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateServiceActionInput"} + if s.Definition == nil { + invalidParams.Add(request.NewErrParamRequired("Definition")) } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + if s.Definition != nil && len(s.Definition) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Definition", 1)) } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) + if s.DefinitionType == nil { + invalidParams.Add(request.NewErrParamRequired("DefinitionType")) } - if s.Value != nil && len(*s.Value) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Value", 1)) + if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) } if invalidParams.Len() > 0 { @@ -7456,49 +9502,154 @@ func (s *CreateTagOptionInput) Validate() error { return nil } -// SetKey sets the Key field's value. -func (s *CreateTagOptionInput) SetKey(v string) *CreateTagOptionInput { - s.Key = &v +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *CreateServiceActionInput) SetAcceptLanguage(v string) *CreateServiceActionInput { + s.AcceptLanguage = &v return s } -// SetValue sets the Value field's value. -func (s *CreateTagOptionInput) SetValue(v string) *CreateTagOptionInput { - s.Value = &v +// SetDefinition sets the Definition field's value. +func (s *CreateServiceActionInput) SetDefinition(v map[string]*string) *CreateServiceActionInput { + s.Definition = v return s } -type CreateTagOptionOutput struct { +// SetDefinitionType sets the DefinitionType field's value. +func (s *CreateServiceActionInput) SetDefinitionType(v string) *CreateServiceActionInput { + s.DefinitionType = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateServiceActionInput) SetDescription(v string) *CreateServiceActionInput { + s.Description = &v + return s +} + +// SetIdempotencyToken sets the IdempotencyToken field's value. +func (s *CreateServiceActionInput) SetIdempotencyToken(v string) *CreateServiceActionInput { + s.IdempotencyToken = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateServiceActionInput) SetName(v string) *CreateServiceActionInput { + s.Name = &v + return s +} + +type CreateServiceActionOutput struct { _ struct{} `type:"structure"` - // Information about the TagOption. - TagOptionDetail *TagOptionDetail `type:"structure"` + // An object containing information about the self-service action. + ServiceActionDetail *ServiceActionDetail `type:"structure"` } // String returns the string representation -func (s CreateTagOptionOutput) String() string { +func (s CreateServiceActionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s CreateTagOptionOutput) GoString() string { +func (s CreateServiceActionOutput) GoString() string { return s.String() } -// SetTagOptionDetail sets the TagOptionDetail field's value. -func (s *CreateTagOptionOutput) SetTagOptionDetail(v *TagOptionDetail) *CreateTagOptionOutput { - s.TagOptionDetail = v +// SetServiceActionDetail sets the ServiceActionDetail field's value. +func (s *CreateServiceActionOutput) SetServiceActionDetail(v *ServiceActionDetail) *CreateServiceActionOutput { + s.ServiceActionDetail = v return s } -type DeleteConstraintInput struct { +type CreateTagOptionInput struct { _ struct{} `type:"structure"` - // The language code. + // The TagOption key. // - // * en - English (default) + // Key is a required field + Key *string `min:"1" type:"string" required:"true"` + + // The TagOption value. // - // * jp - Japanese + // Value is a required field + Value *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateTagOptionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTagOptionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTagOptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTagOptionInput"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + if s.Value != nil && len(*s.Value) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Value", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *CreateTagOptionInput) SetKey(v string) *CreateTagOptionInput { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *CreateTagOptionInput) SetValue(v string) *CreateTagOptionInput { + s.Value = &v + return s +} + +type CreateTagOptionOutput struct { + _ struct{} `type:"structure"` + + // Information about the TagOption. + TagOptionDetail *TagOptionDetail `type:"structure"` +} + +// String returns the string representation +func (s CreateTagOptionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTagOptionOutput) GoString() string { + return s.String() +} + +// SetTagOptionDetail sets the TagOptionDetail field's value. +func (s *CreateTagOptionOutput) SetTagOptionDetail(v *TagOptionDetail) *CreateTagOptionOutput { + s.TagOptionDetail = v + return s +} + +type DeleteConstraintInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese // // * zh - Chinese AcceptLanguage *string `type:"string"` @@ -7644,9 +9795,10 @@ type DeletePortfolioShareInput struct { AcceptLanguage *string `type:"string"` // The AWS account ID. - // - // AccountId is a required field - AccountId *string `type:"string" required:"true"` + AccountId *string `type:"string"` + + // The organization node to whom you are going to stop sharing. + OrganizationNode *OrganizationNode `type:"structure"` // The portfolio identifier. // @@ -7667,9 +9819,6 @@ func (s DeletePortfolioShareInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *DeletePortfolioShareInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "DeletePortfolioShareInput"} - if s.AccountId == nil { - invalidParams.Add(request.NewErrParamRequired("AccountId")) - } if s.PortfolioId == nil { invalidParams.Add(request.NewErrParamRequired("PortfolioId")) } @@ -7695,6 +9844,12 @@ func (s *DeletePortfolioShareInput) SetAccountId(v string) *DeletePortfolioShare return s } +// SetOrganizationNode sets the OrganizationNode field's value. +func (s *DeletePortfolioShareInput) SetOrganizationNode(v *OrganizationNode) *DeletePortfolioShareInput { + s.OrganizationNode = v + return s +} + // SetPortfolioId sets the PortfolioId field's value. func (s *DeletePortfolioShareInput) SetPortfolioId(v string) *DeletePortfolioShareInput { s.PortfolioId = &v @@ -7703,6 +9858,10 @@ func (s *DeletePortfolioShareInput) SetPortfolioId(v string) *DeletePortfolioSha type DeletePortfolioShareOutput struct { _ struct{} `type:"structure"` + + // The portfolio share unique identifier. This will only be returned if delete + // is made to an organization node. + PortfolioShareToken *string `type:"string"` } // String returns the string representation @@ -7715,6 +9874,12 @@ func (s DeletePortfolioShareOutput) GoString() string { return s.String() } +// SetPortfolioShareToken sets the PortfolioShareToken field's value. +func (s *DeletePortfolioShareOutput) SetPortfolioShareToken(v string) *DeletePortfolioShareOutput { + s.PortfolioShareToken = &v + return s +} + type DeleteProductInput struct { _ struct{} `type:"structure"` @@ -7952,6 +10117,76 @@ func (s DeleteProvisioningArtifactOutput) GoString() string { return s.String() } +type DeleteServiceActionInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The self-service action identifier. For example, act-fs7abcd89wxyz. + // + // Id is a required field + Id *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteServiceActionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteServiceActionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteServiceActionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteServiceActionInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *DeleteServiceActionInput) SetAcceptLanguage(v string) *DeleteServiceActionInput { + s.AcceptLanguage = &v + return s +} + +// SetId sets the Id field's value. +func (s *DeleteServiceActionInput) SetId(v string) *DeleteServiceActionInput { + s.Id = &v + return s +} + +type DeleteServiceActionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteServiceActionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteServiceActionOutput) GoString() string { + return s.String() +} + type DeleteTagOptionInput struct { _ struct{} `type:"structure"` @@ -8298,6 +10533,105 @@ func (s *DescribePortfolioOutput) SetTags(v []*Tag) *DescribePortfolioOutput { return s } +type DescribePortfolioShareStatusInput struct { + _ struct{} `type:"structure"` + + // The token for the portfolio share operation. This token is returned either + // by CreatePortfolioShare or by DeletePortfolioShare. + // + // PortfolioShareToken is a required field + PortfolioShareToken *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribePortfolioShareStatusInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePortfolioShareStatusInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribePortfolioShareStatusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribePortfolioShareStatusInput"} + if s.PortfolioShareToken == nil { + invalidParams.Add(request.NewErrParamRequired("PortfolioShareToken")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPortfolioShareToken sets the PortfolioShareToken field's value. +func (s *DescribePortfolioShareStatusInput) SetPortfolioShareToken(v string) *DescribePortfolioShareStatusInput { + s.PortfolioShareToken = &v + return s +} + +type DescribePortfolioShareStatusOutput struct { + _ struct{} `type:"structure"` + + // Organization node identifier. It can be either account id, organizational + // unit id or organization id. + OrganizationNodeValue *string `type:"string"` + + // The portfolio identifier. + PortfolioId *string `min:"1" type:"string"` + + // The token for the portfolio share operation. For example, share-6v24abcdefghi. + PortfolioShareToken *string `type:"string"` + + // Information about the portfolio share operation. + ShareDetails *ShareDetails `type:"structure"` + + // Status of the portfolio share operation. + Status *string `type:"string" enum:"ShareStatus"` +} + +// String returns the string representation +func (s DescribePortfolioShareStatusOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribePortfolioShareStatusOutput) GoString() string { + return s.String() +} + +// SetOrganizationNodeValue sets the OrganizationNodeValue field's value. +func (s *DescribePortfolioShareStatusOutput) SetOrganizationNodeValue(v string) *DescribePortfolioShareStatusOutput { + s.OrganizationNodeValue = &v + return s +} + +// SetPortfolioId sets the PortfolioId field's value. +func (s *DescribePortfolioShareStatusOutput) SetPortfolioId(v string) *DescribePortfolioShareStatusOutput { + s.PortfolioId = &v + return s +} + +// SetPortfolioShareToken sets the PortfolioShareToken field's value. +func (s *DescribePortfolioShareStatusOutput) SetPortfolioShareToken(v string) *DescribePortfolioShareStatusOutput { + s.PortfolioShareToken = &v + return s +} + +// SetShareDetails sets the ShareDetails field's value. +func (s *DescribePortfolioShareStatusOutput) SetShareDetails(v *ShareDetails) *DescribePortfolioShareStatusOutput { + s.ShareDetails = v + return s +} + +// SetStatus sets the Status field's value. +func (s *DescribePortfolioShareStatusOutput) SetStatus(v string) *DescribePortfolioShareStatusOutput { + s.Status = &v + return s +} + type DescribeProductAsAdminInput struct { _ struct{} `type:"structure"` @@ -9005,6 +11339,10 @@ type DescribeProvisioningParametersOutput struct { // Information about the parameters used to provision the product. ProvisioningArtifactParameters []*ProvisioningArtifactParameter `type:"list"` + // An object that contains information about preferences, such as regions and + // accounts, for the provisioning artifact. + ProvisioningArtifactPreferences *ProvisioningArtifactPreferences `type:"structure"` + // Information about the TagOptions associated with the resource. TagOptions []*TagOptionSummary `type:"list"` @@ -9035,6 +11373,12 @@ func (s *DescribeProvisioningParametersOutput) SetProvisioningArtifactParameters return s } +// SetProvisioningArtifactPreferences sets the ProvisioningArtifactPreferences field's value. +func (s *DescribeProvisioningParametersOutput) SetProvisioningArtifactPreferences(v *ProvisioningArtifactPreferences) *DescribeProvisioningParametersOutput { + s.ProvisioningArtifactPreferences = v + return s +} + // SetTagOptions sets the TagOptions field's value. func (s *DescribeProvisioningParametersOutput) SetTagOptions(v []*TagOptionSummary) *DescribeProvisioningParametersOutput { s.TagOptions = v @@ -9167,28 +11511,37 @@ func (s *DescribeRecordOutput) SetRecordOutputs(v []*RecordOutput) *DescribeReco return s } -type DescribeTagOptionInput struct { +type DescribeServiceActionInput struct { _ struct{} `type:"structure"` - // The TagOption identifier. + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The self-service action identifier. // // Id is a required field Id *string `min:"1" type:"string" required:"true"` } // String returns the string representation -func (s DescribeTagOptionInput) String() string { +func (s DescribeServiceActionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeTagOptionInput) GoString() string { +func (s DescribeServiceActionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTagOptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTagOptionInput"} +func (s *DescribeServiceActionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeServiceActionInput"} if s.Id == nil { invalidParams.Add(request.NewErrParamRequired("Id")) } @@ -9202,46 +11555,144 @@ func (s *DescribeTagOptionInput) Validate() error { return nil } +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *DescribeServiceActionInput) SetAcceptLanguage(v string) *DescribeServiceActionInput { + s.AcceptLanguage = &v + return s +} + // SetId sets the Id field's value. -func (s *DescribeTagOptionInput) SetId(v string) *DescribeTagOptionInput { +func (s *DescribeServiceActionInput) SetId(v string) *DescribeServiceActionInput { s.Id = &v return s } -type DescribeTagOptionOutput struct { +type DescribeServiceActionOutput struct { _ struct{} `type:"structure"` - // Information about the TagOption. - TagOptionDetail *TagOptionDetail `type:"structure"` + // Detailed information about the self-service action. + ServiceActionDetail *ServiceActionDetail `type:"structure"` } // String returns the string representation -func (s DescribeTagOptionOutput) String() string { +func (s DescribeServiceActionOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DescribeTagOptionOutput) GoString() string { +func (s DescribeServiceActionOutput) GoString() string { return s.String() } -// SetTagOptionDetail sets the TagOptionDetail field's value. -func (s *DescribeTagOptionOutput) SetTagOptionDetail(v *TagOptionDetail) *DescribeTagOptionOutput { - s.TagOptionDetail = v +// SetServiceActionDetail sets the ServiceActionDetail field's value. +func (s *DescribeServiceActionOutput) SetServiceActionDetail(v *ServiceActionDetail) *DescribeServiceActionOutput { + s.ServiceActionDetail = v return s } -type DisassociatePrincipalFromPortfolioInput struct { +type DescribeTagOptionInput struct { _ struct{} `type:"structure"` - // The language code. - // - // * en - English (default) - // - // * jp - Japanese + // The TagOption identifier. // - // * zh - Chinese - AcceptLanguage *string `type:"string"` + // Id is a required field + Id *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeTagOptionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTagOptionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTagOptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTagOptionInput"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetId sets the Id field's value. +func (s *DescribeTagOptionInput) SetId(v string) *DescribeTagOptionInput { + s.Id = &v + return s +} + +type DescribeTagOptionOutput struct { + _ struct{} `type:"structure"` + + // Information about the TagOption. + TagOptionDetail *TagOptionDetail `type:"structure"` +} + +// String returns the string representation +func (s DescribeTagOptionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTagOptionOutput) GoString() string { + return s.String() +} + +// SetTagOptionDetail sets the TagOptionDetail field's value. +func (s *DescribeTagOptionOutput) SetTagOptionDetail(v *TagOptionDetail) *DescribeTagOptionOutput { + s.TagOptionDetail = v + return s +} + +type DisableAWSOrganizationsAccessInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisableAWSOrganizationsAccessInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableAWSOrganizationsAccessInput) GoString() string { + return s.String() +} + +type DisableAWSOrganizationsAccessOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisableAWSOrganizationsAccessOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableAWSOrganizationsAccessOutput) GoString() string { + return s.String() +} + +type DisassociatePrincipalFromPortfolioInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` // The portfolio identifier. // @@ -9405,6 +11856,110 @@ func (s DisassociateProductFromPortfolioOutput) GoString() string { return s.String() } +type DisassociateServiceActionFromProvisioningArtifactInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The product identifier. For example, prod-abcdzk7xy33qa. + // + // ProductId is a required field + ProductId *string `min:"1" type:"string" required:"true"` + + // The identifier of the provisioning artifact. For example, pa-4abcdjnxjj6ne. + // + // ProvisioningArtifactId is a required field + ProvisioningArtifactId *string `min:"1" type:"string" required:"true"` + + // The self-service action identifier. For example, act-fs7abcd89wxyz. + // + // ServiceActionId is a required field + ServiceActionId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DisassociateServiceActionFromProvisioningArtifactInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateServiceActionFromProvisioningArtifactInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateServiceActionFromProvisioningArtifactInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateServiceActionFromProvisioningArtifactInput"} + if s.ProductId == nil { + invalidParams.Add(request.NewErrParamRequired("ProductId")) + } + if s.ProductId != nil && len(*s.ProductId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) + } + if s.ProvisioningArtifactId == nil { + invalidParams.Add(request.NewErrParamRequired("ProvisioningArtifactId")) + } + if s.ProvisioningArtifactId != nil && len(*s.ProvisioningArtifactId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProvisioningArtifactId", 1)) + } + if s.ServiceActionId == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceActionId")) + } + if s.ServiceActionId != nil && len(*s.ServiceActionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ServiceActionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *DisassociateServiceActionFromProvisioningArtifactInput) SetAcceptLanguage(v string) *DisassociateServiceActionFromProvisioningArtifactInput { + s.AcceptLanguage = &v + return s +} + +// SetProductId sets the ProductId field's value. +func (s *DisassociateServiceActionFromProvisioningArtifactInput) SetProductId(v string) *DisassociateServiceActionFromProvisioningArtifactInput { + s.ProductId = &v + return s +} + +// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. +func (s *DisassociateServiceActionFromProvisioningArtifactInput) SetProvisioningArtifactId(v string) *DisassociateServiceActionFromProvisioningArtifactInput { + s.ProvisioningArtifactId = &v + return s +} + +// SetServiceActionId sets the ServiceActionId field's value. +func (s *DisassociateServiceActionFromProvisioningArtifactInput) SetServiceActionId(v string) *DisassociateServiceActionFromProvisioningArtifactInput { + s.ServiceActionId = &v + return s +} + +type DisassociateServiceActionFromProvisioningArtifactOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisassociateServiceActionFromProvisioningArtifactOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateServiceActionFromProvisioningArtifactOutput) GoString() string { + return s.String() +} + type DisassociateTagOptionFromResourceInput struct { _ struct{} `type:"structure"` @@ -9474,6 +12029,34 @@ func (s DisassociateTagOptionFromResourceOutput) GoString() string { return s.String() } +type EnableAWSOrganizationsAccessInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s EnableAWSOrganizationsAccessInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableAWSOrganizationsAccessInput) GoString() string { + return s.String() +} + +type EnableAWSOrganizationsAccessOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s EnableAWSOrganizationsAccessOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableAWSOrganizationsAccessOutput) GoString() string { + return s.String() +} + type ExecuteProvisionedProductPlanInput struct { _ struct{} `type:"structure"` @@ -9489,9 +12072,7 @@ type ExecuteProvisionedProductPlanInput struct { // A unique identifier that you provide to ensure idempotency. If multiple requests // differ only by the idempotency token, the same response is returned for each // repeated request. - // - // IdempotencyToken is a required field - IdempotencyToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` + IdempotencyToken *string `min:"1" type:"string" idempotencyToken:"true"` // The plan identifier. // @@ -9512,9 +12093,6 @@ func (s ExecuteProvisionedProductPlanInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *ExecuteProvisionedProductPlanInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ExecuteProvisionedProductPlanInput"} - if s.IdempotencyToken == nil { - invalidParams.Add(request.NewErrParamRequired("IdempotencyToken")) - } if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1)) } @@ -9572,67 +12150,274 @@ func (s *ExecuteProvisionedProductPlanOutput) SetRecordDetail(v *RecordDetail) * return s } -// Summary information about a product path for a user. -type LaunchPathSummary struct { +type ExecuteProvisionedProductServiceActionInput struct { _ struct{} `type:"structure"` - // The constraints on the portfolio-product relationship. - ConstraintSummaries []*ConstraintSummary `type:"list"` + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` - // The identifier of the product path. - Id *string `min:"1" type:"string"` + // An idempotency token that uniquely identifies the execute request. + ExecuteToken *string `min:"1" type:"string" idempotencyToken:"true"` - // The name of the portfolio to which the user was assigned. - Name *string `type:"string"` + // The identifier of the provisioned product. + // + // ProvisionedProductId is a required field + ProvisionedProductId *string `min:"1" type:"string" required:"true"` - // The tags associated with this product path. - Tags []*Tag `type:"list"` + // The self-service action identifier. For example, act-fs7abcd89wxyz. + // + // ServiceActionId is a required field + ServiceActionId *string `min:"1" type:"string" required:"true"` } // String returns the string representation -func (s LaunchPathSummary) String() string { +func (s ExecuteProvisionedProductServiceActionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s LaunchPathSummary) GoString() string { +func (s ExecuteProvisionedProductServiceActionInput) GoString() string { return s.String() } -// SetConstraintSummaries sets the ConstraintSummaries field's value. -func (s *LaunchPathSummary) SetConstraintSummaries(v []*ConstraintSummary) *LaunchPathSummary { - s.ConstraintSummaries = v +// Validate inspects the fields of the type to determine if they are valid. +func (s *ExecuteProvisionedProductServiceActionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ExecuteProvisionedProductServiceActionInput"} + if s.ExecuteToken != nil && len(*s.ExecuteToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ExecuteToken", 1)) + } + if s.ProvisionedProductId == nil { + invalidParams.Add(request.NewErrParamRequired("ProvisionedProductId")) + } + if s.ProvisionedProductId != nil && len(*s.ProvisionedProductId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProvisionedProductId", 1)) + } + if s.ServiceActionId == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceActionId")) + } + if s.ServiceActionId != nil && len(*s.ServiceActionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ServiceActionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *ExecuteProvisionedProductServiceActionInput) SetAcceptLanguage(v string) *ExecuteProvisionedProductServiceActionInput { + s.AcceptLanguage = &v return s } -// SetId sets the Id field's value. -func (s *LaunchPathSummary) SetId(v string) *LaunchPathSummary { - s.Id = &v +// SetExecuteToken sets the ExecuteToken field's value. +func (s *ExecuteProvisionedProductServiceActionInput) SetExecuteToken(v string) *ExecuteProvisionedProductServiceActionInput { + s.ExecuteToken = &v return s } -// SetName sets the Name field's value. -func (s *LaunchPathSummary) SetName(v string) *LaunchPathSummary { - s.Name = &v +// SetProvisionedProductId sets the ProvisionedProductId field's value. +func (s *ExecuteProvisionedProductServiceActionInput) SetProvisionedProductId(v string) *ExecuteProvisionedProductServiceActionInput { + s.ProvisionedProductId = &v return s } -// SetTags sets the Tags field's value. -func (s *LaunchPathSummary) SetTags(v []*Tag) *LaunchPathSummary { - s.Tags = v +// SetServiceActionId sets the ServiceActionId field's value. +func (s *ExecuteProvisionedProductServiceActionInput) SetServiceActionId(v string) *ExecuteProvisionedProductServiceActionInput { + s.ServiceActionId = &v return s } -type ListAcceptedPortfolioSharesInput struct { +type ExecuteProvisionedProductServiceActionOutput struct { _ struct{} `type:"structure"` - // The language code. - // - // * en - English (default) - // - // * jp - Japanese - // - // * zh - Chinese + // An object containing detailed information about the result of provisioning + // the product. + RecordDetail *RecordDetail `type:"structure"` +} + +// String returns the string representation +func (s ExecuteProvisionedProductServiceActionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExecuteProvisionedProductServiceActionOutput) GoString() string { + return s.String() +} + +// SetRecordDetail sets the RecordDetail field's value. +func (s *ExecuteProvisionedProductServiceActionOutput) SetRecordDetail(v *RecordDetail) *ExecuteProvisionedProductServiceActionOutput { + s.RecordDetail = v + return s +} + +// An object containing information about the error, along with identifying +// information about the self-service action and its associations. +type FailedServiceActionAssociation struct { + _ struct{} `type:"structure"` + + // The error code. Valid values are listed below. + ErrorCode *string `type:"string" enum:"ServiceActionAssociationErrorCode"` + + // A text description of the error. + ErrorMessage *string `min:"1" type:"string"` + + // The product identifier. For example, prod-abcdzk7xy33qa. + ProductId *string `min:"1" type:"string"` + + // The identifier of the provisioning artifact. For example, pa-4abcdjnxjj6ne. + ProvisioningArtifactId *string `min:"1" type:"string"` + + // The self-service action identifier. For example, act-fs7abcd89wxyz. + ServiceActionId *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s FailedServiceActionAssociation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FailedServiceActionAssociation) GoString() string { + return s.String() +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *FailedServiceActionAssociation) SetErrorCode(v string) *FailedServiceActionAssociation { + s.ErrorCode = &v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *FailedServiceActionAssociation) SetErrorMessage(v string) *FailedServiceActionAssociation { + s.ErrorMessage = &v + return s +} + +// SetProductId sets the ProductId field's value. +func (s *FailedServiceActionAssociation) SetProductId(v string) *FailedServiceActionAssociation { + s.ProductId = &v + return s +} + +// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. +func (s *FailedServiceActionAssociation) SetProvisioningArtifactId(v string) *FailedServiceActionAssociation { + s.ProvisioningArtifactId = &v + return s +} + +// SetServiceActionId sets the ServiceActionId field's value. +func (s *FailedServiceActionAssociation) SetServiceActionId(v string) *FailedServiceActionAssociation { + s.ServiceActionId = &v + return s +} + +type GetAWSOrganizationsAccessStatusInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s GetAWSOrganizationsAccessStatusInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAWSOrganizationsAccessStatusInput) GoString() string { + return s.String() +} + +type GetAWSOrganizationsAccessStatusOutput struct { + _ struct{} `type:"structure"` + + // The status of the portfolio share feature. + AccessStatus *string `type:"string" enum:"AccessStatus"` +} + +// String returns the string representation +func (s GetAWSOrganizationsAccessStatusOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAWSOrganizationsAccessStatusOutput) GoString() string { + return s.String() +} + +// SetAccessStatus sets the AccessStatus field's value. +func (s *GetAWSOrganizationsAccessStatusOutput) SetAccessStatus(v string) *GetAWSOrganizationsAccessStatusOutput { + s.AccessStatus = &v + return s +} + +// Summary information about a product path for a user. +type LaunchPathSummary struct { + _ struct{} `type:"structure"` + + // The constraints on the portfolio-product relationship. + ConstraintSummaries []*ConstraintSummary `type:"list"` + + // The identifier of the product path. + Id *string `min:"1" type:"string"` + + // The name of the portfolio to which the user was assigned. + Name *string `type:"string"` + + // The tags associated with this product path. + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s LaunchPathSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LaunchPathSummary) GoString() string { + return s.String() +} + +// SetConstraintSummaries sets the ConstraintSummaries field's value. +func (s *LaunchPathSummary) SetConstraintSummaries(v []*ConstraintSummary) *LaunchPathSummary { + s.ConstraintSummaries = v + return s +} + +// SetId sets the Id field's value. +func (s *LaunchPathSummary) SetId(v string) *LaunchPathSummary { + s.Id = &v + return s +} + +// SetName sets the Name field's value. +func (s *LaunchPathSummary) SetName(v string) *LaunchPathSummary { + s.Name = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *LaunchPathSummary) SetTags(v []*Tag) *LaunchPathSummary { + s.Tags = v + return s +} + +type ListAcceptedPortfolioSharesInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese AcceptLanguage *string `type:"string"` // The maximum number of items to return with this call. @@ -9644,6 +12429,9 @@ type ListAcceptedPortfolioSharesInput struct { // The type of shared portfolios to list. The default is to list imported portfolios. // + // * AWS_ORGANIZATIONS - List portfolios shared by the master account of + // your organization + // // * AWS_SERVICECATALOG - List default portfolios // // * IMPORTED - List imported portfolios @@ -9945,6 +12733,135 @@ func (s *ListLaunchPathsOutput) SetNextPageToken(v string) *ListLaunchPathsOutpu return s } +type ListOrganizationPortfolioAccessInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The organization node type that will be returned in the output. + // + // * ORGANIZATION - Organization that has access to the portfolio. + // + // * ORGANIZATIONAL_UNIT - Organizational unit that has access to the portfolio + // within your organization. + // + // * ACCOUNT - Account that has access to the portfolio within your organization. + // + // OrganizationNodeType is a required field + OrganizationNodeType *string `type:"string" required:"true" enum:"OrganizationNodeType"` + + // The maximum number of items to return with this call. + PageSize *int64 `type:"integer"` + + // The page token for the next set of results. To retrieve the first set of + // results, use null. + PageToken *string `type:"string"` + + // The portfolio identifier. For example, port-2abcdext3y5fk. + // + // PortfolioId is a required field + PortfolioId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListOrganizationPortfolioAccessInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListOrganizationPortfolioAccessInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListOrganizationPortfolioAccessInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListOrganizationPortfolioAccessInput"} + if s.OrganizationNodeType == nil { + invalidParams.Add(request.NewErrParamRequired("OrganizationNodeType")) + } + if s.PortfolioId == nil { + invalidParams.Add(request.NewErrParamRequired("PortfolioId")) + } + if s.PortfolioId != nil && len(*s.PortfolioId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PortfolioId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *ListOrganizationPortfolioAccessInput) SetAcceptLanguage(v string) *ListOrganizationPortfolioAccessInput { + s.AcceptLanguage = &v + return s +} + +// SetOrganizationNodeType sets the OrganizationNodeType field's value. +func (s *ListOrganizationPortfolioAccessInput) SetOrganizationNodeType(v string) *ListOrganizationPortfolioAccessInput { + s.OrganizationNodeType = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *ListOrganizationPortfolioAccessInput) SetPageSize(v int64) *ListOrganizationPortfolioAccessInput { + s.PageSize = &v + return s +} + +// SetPageToken sets the PageToken field's value. +func (s *ListOrganizationPortfolioAccessInput) SetPageToken(v string) *ListOrganizationPortfolioAccessInput { + s.PageToken = &v + return s +} + +// SetPortfolioId sets the PortfolioId field's value. +func (s *ListOrganizationPortfolioAccessInput) SetPortfolioId(v string) *ListOrganizationPortfolioAccessInput { + s.PortfolioId = &v + return s +} + +type ListOrganizationPortfolioAccessOutput struct { + _ struct{} `type:"structure"` + + // The page token to use to retrieve the next set of results. If there are no + // additional results, this value is null. + NextPageToken *string `type:"string"` + + // Displays information about the organization nodes. + OrganizationNodes []*OrganizationNode `type:"list"` +} + +// String returns the string representation +func (s ListOrganizationPortfolioAccessOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListOrganizationPortfolioAccessOutput) GoString() string { + return s.String() +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *ListOrganizationPortfolioAccessOutput) SetNextPageToken(v string) *ListOrganizationPortfolioAccessOutput { + s.NextPageToken = &v + return s +} + +// SetOrganizationNodes sets the OrganizationNodes field's value. +func (s *ListOrganizationPortfolioAccessOutput) SetOrganizationNodes(v []*OrganizationNode) *ListOrganizationPortfolioAccessOutput { + s.OrganizationNodes = v + return s +} + type ListPortfolioAccessInput struct { _ struct{} `type:"structure"` @@ -10443,7 +13360,7 @@ func (s *ListProvisionedProductPlansOutput) SetProvisionedProductPlans(v []*Prov return s } -type ListProvisioningArtifactsInput struct { +type ListProvisioningArtifactsForServiceActionInput struct { _ struct{} `type:"structure"` // The language code. @@ -10455,26 +13372,135 @@ type ListProvisioningArtifactsInput struct { // * zh - Chinese AcceptLanguage *string `type:"string"` - // The product identifier. + // The maximum number of items to return with this call. + PageSize *int64 `type:"integer"` + + // The page token for the next set of results. To retrieve the first set of + // results, use null. + PageToken *string `type:"string"` + + // The self-service action identifier. For example, act-fs7abcd89wxyz. // - // ProductId is a required field - ProductId *string `min:"1" type:"string" required:"true"` + // ServiceActionId is a required field + ServiceActionId *string `min:"1" type:"string" required:"true"` } // String returns the string representation -func (s ListProvisioningArtifactsInput) String() string { +func (s ListProvisioningArtifactsForServiceActionInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListProvisioningArtifactsInput) GoString() string { +func (s ListProvisioningArtifactsForServiceActionInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ListProvisioningArtifactsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListProvisioningArtifactsInput"} - if s.ProductId == nil { +func (s *ListProvisioningArtifactsForServiceActionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListProvisioningArtifactsForServiceActionInput"} + if s.ServiceActionId == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceActionId")) + } + if s.ServiceActionId != nil && len(*s.ServiceActionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ServiceActionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *ListProvisioningArtifactsForServiceActionInput) SetAcceptLanguage(v string) *ListProvisioningArtifactsForServiceActionInput { + s.AcceptLanguage = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *ListProvisioningArtifactsForServiceActionInput) SetPageSize(v int64) *ListProvisioningArtifactsForServiceActionInput { + s.PageSize = &v + return s +} + +// SetPageToken sets the PageToken field's value. +func (s *ListProvisioningArtifactsForServiceActionInput) SetPageToken(v string) *ListProvisioningArtifactsForServiceActionInput { + s.PageToken = &v + return s +} + +// SetServiceActionId sets the ServiceActionId field's value. +func (s *ListProvisioningArtifactsForServiceActionInput) SetServiceActionId(v string) *ListProvisioningArtifactsForServiceActionInput { + s.ServiceActionId = &v + return s +} + +type ListProvisioningArtifactsForServiceActionOutput struct { + _ struct{} `type:"structure"` + + // The page token to use to retrieve the next set of results. If there are no + // additional results, this value is null. + NextPageToken *string `type:"string"` + + // An array of objects with information about product views and provisioning + // artifacts. + ProvisioningArtifactViews []*ProvisioningArtifactView `type:"list"` +} + +// String returns the string representation +func (s ListProvisioningArtifactsForServiceActionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListProvisioningArtifactsForServiceActionOutput) GoString() string { + return s.String() +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *ListProvisioningArtifactsForServiceActionOutput) SetNextPageToken(v string) *ListProvisioningArtifactsForServiceActionOutput { + s.NextPageToken = &v + return s +} + +// SetProvisioningArtifactViews sets the ProvisioningArtifactViews field's value. +func (s *ListProvisioningArtifactsForServiceActionOutput) SetProvisioningArtifactViews(v []*ProvisioningArtifactView) *ListProvisioningArtifactsForServiceActionOutput { + s.ProvisioningArtifactViews = v + return s +} + +type ListProvisioningArtifactsInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The product identifier. + // + // ProductId is a required field + ProductId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListProvisioningArtifactsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListProvisioningArtifactsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListProvisioningArtifactsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListProvisioningArtifactsInput"} + if s.ProductId == nil { invalidParams.Add(request.NewErrParamRequired("ProductId")) } if s.ProductId != nil && len(*s.ProductId) < 1 { @@ -10592,85 +13618,326 @@ func (s *ListRecordHistoryInput) SetPageToken(v string) *ListRecordHistoryInput return s } -// SetSearchFilter sets the SearchFilter field's value. -func (s *ListRecordHistoryInput) SetSearchFilter(v *ListRecordHistorySearchFilter) *ListRecordHistoryInput { - s.SearchFilter = v +// SetSearchFilter sets the SearchFilter field's value. +func (s *ListRecordHistoryInput) SetSearchFilter(v *ListRecordHistorySearchFilter) *ListRecordHistoryInput { + s.SearchFilter = v + return s +} + +type ListRecordHistoryOutput struct { + _ struct{} `type:"structure"` + + // The page token to use to retrieve the next set of results. If there are no + // additional results, this value is null. + NextPageToken *string `type:"string"` + + // The records, in reverse chronological order. + RecordDetails []*RecordDetail `type:"list"` +} + +// String returns the string representation +func (s ListRecordHistoryOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListRecordHistoryOutput) GoString() string { + return s.String() +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *ListRecordHistoryOutput) SetNextPageToken(v string) *ListRecordHistoryOutput { + s.NextPageToken = &v + return s +} + +// SetRecordDetails sets the RecordDetails field's value. +func (s *ListRecordHistoryOutput) SetRecordDetails(v []*RecordDetail) *ListRecordHistoryOutput { + s.RecordDetails = v + return s +} + +// The search filter to use when listing history records. +type ListRecordHistorySearchFilter struct { + _ struct{} `type:"structure"` + + // The filter key. + // + // * product - Filter results based on the specified product identifier. + // + // * provisionedproduct - Filter results based on the provisioned product + // identifier. + Key *string `type:"string"` + + // The filter value. + Value *string `type:"string"` +} + +// String returns the string representation +func (s ListRecordHistorySearchFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListRecordHistorySearchFilter) GoString() string { + return s.String() +} + +// SetKey sets the Key field's value. +func (s *ListRecordHistorySearchFilter) SetKey(v string) *ListRecordHistorySearchFilter { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *ListRecordHistorySearchFilter) SetValue(v string) *ListRecordHistorySearchFilter { + s.Value = &v + return s +} + +type ListResourcesForTagOptionInput struct { + _ struct{} `type:"structure"` + + // The maximum number of items to return with this call. + PageSize *int64 `type:"integer"` + + // The page token for the next set of results. To retrieve the first set of + // results, use null. + PageToken *string `type:"string"` + + // The resource type. + // + // * Portfolio + // + // * Product + ResourceType *string `type:"string"` + + // The TagOption identifier. + // + // TagOptionId is a required field + TagOptionId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListResourcesForTagOptionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListResourcesForTagOptionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListResourcesForTagOptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListResourcesForTagOptionInput"} + if s.TagOptionId == nil { + invalidParams.Add(request.NewErrParamRequired("TagOptionId")) + } + if s.TagOptionId != nil && len(*s.TagOptionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TagOptionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPageSize sets the PageSize field's value. +func (s *ListResourcesForTagOptionInput) SetPageSize(v int64) *ListResourcesForTagOptionInput { + s.PageSize = &v + return s +} + +// SetPageToken sets the PageToken field's value. +func (s *ListResourcesForTagOptionInput) SetPageToken(v string) *ListResourcesForTagOptionInput { + s.PageToken = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *ListResourcesForTagOptionInput) SetResourceType(v string) *ListResourcesForTagOptionInput { + s.ResourceType = &v + return s +} + +// SetTagOptionId sets the TagOptionId field's value. +func (s *ListResourcesForTagOptionInput) SetTagOptionId(v string) *ListResourcesForTagOptionInput { + s.TagOptionId = &v + return s +} + +type ListResourcesForTagOptionOutput struct { + _ struct{} `type:"structure"` + + // The page token for the next set of results. To retrieve the first set of + // results, use null. + PageToken *string `type:"string"` + + // Information about the resources. + ResourceDetails []*ResourceDetail `type:"list"` +} + +// String returns the string representation +func (s ListResourcesForTagOptionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListResourcesForTagOptionOutput) GoString() string { + return s.String() +} + +// SetPageToken sets the PageToken field's value. +func (s *ListResourcesForTagOptionOutput) SetPageToken(v string) *ListResourcesForTagOptionOutput { + s.PageToken = &v + return s +} + +// SetResourceDetails sets the ResourceDetails field's value. +func (s *ListResourcesForTagOptionOutput) SetResourceDetails(v []*ResourceDetail) *ListResourcesForTagOptionOutput { + s.ResourceDetails = v + return s +} + +type ListServiceActionsForProvisioningArtifactInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // The maximum number of items to return with this call. + PageSize *int64 `type:"integer"` + + // The page token for the next set of results. To retrieve the first set of + // results, use null. + PageToken *string `type:"string"` + + // The product identifier. For example, prod-abcdzk7xy33qa. + // + // ProductId is a required field + ProductId *string `min:"1" type:"string" required:"true"` + + // The identifier of the provisioning artifact. For example, pa-4abcdjnxjj6ne. + // + // ProvisioningArtifactId is a required field + ProvisioningArtifactId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListServiceActionsForProvisioningArtifactInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListServiceActionsForProvisioningArtifactInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListServiceActionsForProvisioningArtifactInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListServiceActionsForProvisioningArtifactInput"} + if s.ProductId == nil { + invalidParams.Add(request.NewErrParamRequired("ProductId")) + } + if s.ProductId != nil && len(*s.ProductId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) + } + if s.ProvisioningArtifactId == nil { + invalidParams.Add(request.NewErrParamRequired("ProvisioningArtifactId")) + } + if s.ProvisioningArtifactId != nil && len(*s.ProvisioningArtifactId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProvisioningArtifactId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *ListServiceActionsForProvisioningArtifactInput) SetAcceptLanguage(v string) *ListServiceActionsForProvisioningArtifactInput { + s.AcceptLanguage = &v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *ListServiceActionsForProvisioningArtifactInput) SetPageSize(v int64) *ListServiceActionsForProvisioningArtifactInput { + s.PageSize = &v + return s +} + +// SetPageToken sets the PageToken field's value. +func (s *ListServiceActionsForProvisioningArtifactInput) SetPageToken(v string) *ListServiceActionsForProvisioningArtifactInput { + s.PageToken = &v + return s +} + +// SetProductId sets the ProductId field's value. +func (s *ListServiceActionsForProvisioningArtifactInput) SetProductId(v string) *ListServiceActionsForProvisioningArtifactInput { + s.ProductId = &v + return s +} + +// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. +func (s *ListServiceActionsForProvisioningArtifactInput) SetProvisioningArtifactId(v string) *ListServiceActionsForProvisioningArtifactInput { + s.ProvisioningArtifactId = &v return s } -type ListRecordHistoryOutput struct { +type ListServiceActionsForProvisioningArtifactOutput struct { _ struct{} `type:"structure"` // The page token to use to retrieve the next set of results. If there are no // additional results, this value is null. NextPageToken *string `type:"string"` - // The records, in reverse chronological order. - RecordDetails []*RecordDetail `type:"list"` + // An object containing information about the self-service actions associated + // with the provisioning artifact. + ServiceActionSummaries []*ServiceActionSummary `type:"list"` } // String returns the string representation -func (s ListRecordHistoryOutput) String() string { +func (s ListServiceActionsForProvisioningArtifactOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListRecordHistoryOutput) GoString() string { +func (s ListServiceActionsForProvisioningArtifactOutput) GoString() string { return s.String() } // SetNextPageToken sets the NextPageToken field's value. -func (s *ListRecordHistoryOutput) SetNextPageToken(v string) *ListRecordHistoryOutput { +func (s *ListServiceActionsForProvisioningArtifactOutput) SetNextPageToken(v string) *ListServiceActionsForProvisioningArtifactOutput { s.NextPageToken = &v return s } -// SetRecordDetails sets the RecordDetails field's value. -func (s *ListRecordHistoryOutput) SetRecordDetails(v []*RecordDetail) *ListRecordHistoryOutput { - s.RecordDetails = v +// SetServiceActionSummaries sets the ServiceActionSummaries field's value. +func (s *ListServiceActionsForProvisioningArtifactOutput) SetServiceActionSummaries(v []*ServiceActionSummary) *ListServiceActionsForProvisioningArtifactOutput { + s.ServiceActionSummaries = v return s } -// The search filter to use when listing history records. -type ListRecordHistorySearchFilter struct { +type ListServiceActionsInput struct { _ struct{} `type:"structure"` - // The filter key. + // The language code. // - // * product - Filter results based on the specified product identifier. + // * en - English (default) // - // * provisionedproduct - Filter results based on the provisioned product - // identifier. - Key *string `type:"string"` - - // The filter value. - Value *string `type:"string"` -} - -// String returns the string representation -func (s ListRecordHistorySearchFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation -func (s ListRecordHistorySearchFilter) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *ListRecordHistorySearchFilter) SetKey(v string) *ListRecordHistorySearchFilter { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *ListRecordHistorySearchFilter) SetValue(v string) *ListRecordHistorySearchFilter { - s.Value = &v - return s -} - -type ListResourcesForTagOptionInput struct { - _ struct{} `type:"structure"` + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` // The maximum number of items to return with this call. PageSize *int64 `type:"integer"` @@ -10678,100 +13945,67 @@ type ListResourcesForTagOptionInput struct { // The page token for the next set of results. To retrieve the first set of // results, use null. PageToken *string `type:"string"` - - // The resource type. - // - // * Portfolio - // - // * Product - ResourceType *string `type:"string"` - - // The TagOption identifier. - // - // TagOptionId is a required field - TagOptionId *string `min:"1" type:"string" required:"true"` } // String returns the string representation -func (s ListResourcesForTagOptionInput) String() string { +func (s ListServiceActionsInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListResourcesForTagOptionInput) GoString() string { +func (s ListServiceActionsInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListResourcesForTagOptionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListResourcesForTagOptionInput"} - if s.TagOptionId == nil { - invalidParams.Add(request.NewErrParamRequired("TagOptionId")) - } - if s.TagOptionId != nil && len(*s.TagOptionId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TagOptionId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *ListServiceActionsInput) SetAcceptLanguage(v string) *ListServiceActionsInput { + s.AcceptLanguage = &v + return s } // SetPageSize sets the PageSize field's value. -func (s *ListResourcesForTagOptionInput) SetPageSize(v int64) *ListResourcesForTagOptionInput { +func (s *ListServiceActionsInput) SetPageSize(v int64) *ListServiceActionsInput { s.PageSize = &v return s } // SetPageToken sets the PageToken field's value. -func (s *ListResourcesForTagOptionInput) SetPageToken(v string) *ListResourcesForTagOptionInput { +func (s *ListServiceActionsInput) SetPageToken(v string) *ListServiceActionsInput { s.PageToken = &v return s } -// SetResourceType sets the ResourceType field's value. -func (s *ListResourcesForTagOptionInput) SetResourceType(v string) *ListResourcesForTagOptionInput { - s.ResourceType = &v - return s -} - -// SetTagOptionId sets the TagOptionId field's value. -func (s *ListResourcesForTagOptionInput) SetTagOptionId(v string) *ListResourcesForTagOptionInput { - s.TagOptionId = &v - return s -} - -type ListResourcesForTagOptionOutput struct { +type ListServiceActionsOutput struct { _ struct{} `type:"structure"` - // The page token for the next set of results. To retrieve the first set of - // results, use null. - PageToken *string `type:"string"` + // The page token to use to retrieve the next set of results. If there are no + // additional results, this value is null. + NextPageToken *string `type:"string"` - // Information about the resources. - ResourceDetails []*ResourceDetail `type:"list"` + // An object containing information about the service actions associated with + // the provisioning artifact. + ServiceActionSummaries []*ServiceActionSummary `type:"list"` } // String returns the string representation -func (s ListResourcesForTagOptionOutput) String() string { +func (s ListServiceActionsOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListResourcesForTagOptionOutput) GoString() string { +func (s ListServiceActionsOutput) GoString() string { return s.String() } -// SetPageToken sets the PageToken field's value. -func (s *ListResourcesForTagOptionOutput) SetPageToken(v string) *ListResourcesForTagOptionOutput { - s.PageToken = &v +// SetNextPageToken sets the NextPageToken field's value. +func (s *ListServiceActionsOutput) SetNextPageToken(v string) *ListServiceActionsOutput { + s.NextPageToken = &v return s } -// SetResourceDetails sets the ResourceDetails field's value. -func (s *ListResourcesForTagOptionOutput) SetResourceDetails(v []*ResourceDetail) *ListResourcesForTagOptionOutput { - s.ResourceDetails = v +// SetServiceActionSummaries sets the ServiceActionSummaries field's value. +func (s *ListServiceActionsOutput) SetServiceActionSummaries(v []*ServiceActionSummary) *ListServiceActionsOutput { + s.ServiceActionSummaries = v return s } @@ -10924,6 +14158,39 @@ func (s *ListTagOptionsOutput) SetTagOptionDetails(v []*TagOptionDetail) *ListTa return s } +// Information about the organization node. +type OrganizationNode struct { + _ struct{} `type:"structure"` + + // The organization node type. + Type *string `type:"string" enum:"OrganizationNodeType"` + + // The identifier of the organization node. + Value *string `type:"string"` +} + +// String returns the string representation +func (s OrganizationNode) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OrganizationNode) GoString() string { + return s.String() +} + +// SetType sets the Type field's value. +func (s *OrganizationNode) SetType(v string) *OrganizationNode { + s.Type = &v + return s +} + +// SetValue sets the Value field's value. +func (s *OrganizationNode) SetValue(v string) *OrganizationNode { + s.Value = &v + return s +} + // The constraints that the administrator has put on the parameter. type ParameterConstraints struct { _ struct{} `type:"structure"` @@ -11290,9 +14557,7 @@ type ProvisionProductInput struct { ProductId *string `min:"1" type:"string" required:"true"` // An idempotency token that uniquely identifies the provisioning request. - // - // ProvisionToken is a required field - ProvisionToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` + ProvisionToken *string `min:"1" type:"string" idempotencyToken:"true"` // A user-friendly name for the provisioned product. This value must be unique // for the AWS account and cannot be updated after the product is provisioned. @@ -11309,6 +14574,10 @@ type ProvisionProductInput struct { // the product. ProvisioningParameters []*ProvisioningParameter `type:"list"` + // An object that contains information about the provisioning preferences for + // a stack set. + ProvisioningPreferences *ProvisioningPreferences `type:"structure"` + // One or more tags. Tags []*Tag `type:"list"` } @@ -11335,9 +14604,6 @@ func (s *ProvisionProductInput) Validate() error { if s.ProductId != nil && len(*s.ProductId) < 1 { invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) } - if s.ProvisionToken == nil { - invalidParams.Add(request.NewErrParamRequired("ProvisionToken")) - } if s.ProvisionToken != nil && len(*s.ProvisionToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("ProvisionToken", 1)) } @@ -11363,6 +14629,11 @@ func (s *ProvisionProductInput) Validate() error { } } } + if s.ProvisioningPreferences != nil { + if err := s.ProvisioningPreferences.Validate(); err != nil { + invalidParams.AddNested("ProvisioningPreferences", err.(request.ErrInvalidParams)) + } + } if s.Tags != nil { for i, v := range s.Tags { if v == nil { @@ -11428,6 +14699,12 @@ func (s *ProvisionProductInput) SetProvisioningParameters(v []*ProvisioningParam return s } +// SetProvisioningPreferences sets the ProvisioningPreferences field's value. +func (s *ProvisionProductInput) SetProvisioningPreferences(v *ProvisioningPreferences) *ProvisionProductInput { + s.ProvisioningPreferences = v + return s +} + // SetTags sets the Tags field's value. func (s *ProvisionProductInput) SetTags(v []*Tag) *ProvisionProductInput { s.Tags = v @@ -11515,7 +14792,7 @@ type ProvisionedProductAttribute struct { // One or more tags. Tags []*Tag `type:"list"` - // The type of provisioned product. The supported value is CFN_STACK. + // The type of provisioned product. The supported values are CFN_STACK and CFN_STACKSET. Type *string `type:"string"` // The Amazon Resource Name (ARN) of the IAM user. @@ -11650,6 +14927,12 @@ type ProvisionedProductDetail struct { // The user-friendly name of the provisioned product. Name *string `min:"1" type:"string"` + // The product identifier. For example, prod-abcdzk7xy33qa. + ProductId *string `min:"1" type:"string"` + + // The identifier of the provisioning artifact. For example, pa-4abcdjnxjj6ne. + ProvisioningArtifactId *string `min:"1" type:"string"` + // The current status of the provisioned product. // // * AVAILABLE - Stable state, ready to perform any operation. The most recent @@ -11671,7 +14954,7 @@ type ProvisionedProductDetail struct { // The current status message of the provisioned product. StatusMessage *string `type:"string"` - // The type of provisioned product. The supported value is CFN_STACK. + // The type of provisioned product. The supported values are CFN_STACK and CFN_STACKSET. Type *string `type:"string"` } @@ -11721,6 +15004,18 @@ func (s *ProvisionedProductDetail) SetName(v string) *ProvisionedProductDetail { return s } +// SetProductId sets the ProductId field's value. +func (s *ProvisionedProductDetail) SetProductId(v string) *ProvisionedProductDetail { + s.ProductId = &v + return s +} + +// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. +func (s *ProvisionedProductDetail) SetProvisioningArtifactId(v string) *ProvisionedProductDetail { + s.ProvisioningArtifactId = &v + return s +} + // SetStatus sets the Status field's value. func (s *ProvisionedProductDetail) SetStatus(v string) *ProvisionedProductDetail { s.Status = &v @@ -12161,6 +15456,52 @@ func (s *ProvisioningArtifactParameter) SetParameterType(v string) *Provisioning return s } +// The user-defined preferences that will be applied during product provisioning, +// unless overridden by ProvisioningPreferences or UpdateProvisioningPreferences. +// +// For more information on maximum concurrent accounts and failure tolerance, +// see Stack set operation options (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-concepts.html#stackset-ops-options) +// in the AWS CloudFormation User Guide. +type ProvisioningArtifactPreferences struct { + _ struct{} `type:"structure"` + + // One or more AWS accounts where stack instances are deployed from the stack + // set. These accounts can be scoped in ProvisioningPreferences$StackSetAccounts + // and UpdateProvisioningPreferences$StackSetAccounts. + // + // Applicable only to a CFN_STACKSET provisioned product type. + StackSetAccounts []*string `type:"list"` + + // One or more AWS Regions where stack instances are deployed from the stack + // set. These regions can be scoped in ProvisioningPreferences$StackSetRegions + // and UpdateProvisioningPreferences$StackSetRegions. + // + // Applicable only to a CFN_STACKSET provisioned product type. + StackSetRegions []*string `type:"list"` +} + +// String returns the string representation +func (s ProvisioningArtifactPreferences) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProvisioningArtifactPreferences) GoString() string { + return s.String() +} + +// SetStackSetAccounts sets the StackSetAccounts field's value. +func (s *ProvisioningArtifactPreferences) SetStackSetAccounts(v []*string) *ProvisioningArtifactPreferences { + s.StackSetAccounts = v + return s +} + +// SetStackSetRegions sets the StackSetRegions field's value. +func (s *ProvisioningArtifactPreferences) SetStackSetRegions(v []*string) *ProvisioningArtifactPreferences { + s.StackSetRegions = v + return s +} + // Information about a provisioning artifact (also known as a version) for a // product. type ProvisioningArtifactProperties struct { @@ -12298,38 +15639,200 @@ func (s *ProvisioningArtifactSummary) SetName(v string) *ProvisioningArtifactSum return s } -// SetProvisioningArtifactMetadata sets the ProvisioningArtifactMetadata field's value. -func (s *ProvisioningArtifactSummary) SetProvisioningArtifactMetadata(v map[string]*string) *ProvisioningArtifactSummary { - s.ProvisioningArtifactMetadata = v +// SetProvisioningArtifactMetadata sets the ProvisioningArtifactMetadata field's value. +func (s *ProvisioningArtifactSummary) SetProvisioningArtifactMetadata(v map[string]*string) *ProvisioningArtifactSummary { + s.ProvisioningArtifactMetadata = v + return s +} + +// An object that contains summary information about a product view and a provisioning +// artifact. +type ProvisioningArtifactView struct { + _ struct{} `type:"structure"` + + // Summary information about a product view. + ProductViewSummary *ProductViewSummary `type:"structure"` + + // Information about a provisioning artifact. A provisioning artifact is also + // known as a product version. + ProvisioningArtifact *ProvisioningArtifact `type:"structure"` +} + +// String returns the string representation +func (s ProvisioningArtifactView) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProvisioningArtifactView) GoString() string { + return s.String() +} + +// SetProductViewSummary sets the ProductViewSummary field's value. +func (s *ProvisioningArtifactView) SetProductViewSummary(v *ProductViewSummary) *ProvisioningArtifactView { + s.ProductViewSummary = v + return s +} + +// SetProvisioningArtifact sets the ProvisioningArtifact field's value. +func (s *ProvisioningArtifactView) SetProvisioningArtifact(v *ProvisioningArtifact) *ProvisioningArtifactView { + s.ProvisioningArtifact = v + return s +} + +// Information about a parameter used to provision a product. +type ProvisioningParameter struct { + _ struct{} `type:"structure"` + + // The parameter key. + Key *string `min:"1" type:"string"` + + // The parameter value. + Value *string `type:"string"` +} + +// String returns the string representation +func (s ProvisioningParameter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProvisioningParameter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ProvisioningParameter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ProvisioningParameter"} + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *ProvisioningParameter) SetKey(v string) *ProvisioningParameter { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *ProvisioningParameter) SetValue(v string) *ProvisioningParameter { + s.Value = &v return s } -// Information about a parameter used to provision a product. -type ProvisioningParameter struct { +// The user-defined preferences that will be applied when updating a provisioned +// product. Not all preferences are applicable to all provisioned product types. +type ProvisioningPreferences struct { _ struct{} `type:"structure"` - // The parameter key. - Key *string `min:"1" type:"string"` + // One or more AWS accounts that will have access to the provisioned product. + // + // Applicable only to a CFN_STACKSET provisioned product type. + // + // The AWS accounts specified should be within the list of accounts in the STACKSET + // constraint. To get the list of accounts in the STACKSET constraint, use the + // DescribeProvisioningParameters operation. + // + // If no values are specified, the default value is all accounts from the STACKSET + // constraint. + StackSetAccounts []*string `type:"list"` - // The parameter value. - Value *string `type:"string"` + // The number of accounts, per region, for which this operation can fail before + // AWS Service Catalog stops the operation in that region. If the operation + // is stopped in a region, AWS Service Catalog doesn't attempt the operation + // in any subsequent regions. + // + // Applicable only to a CFN_STACKSET provisioned product type. + // + // Conditional: You must specify either StackSetFailureToleranceCount or StackSetFailureTolerancePercentage, + // but not both. + // + // The default value is 0 if no value is specified. + StackSetFailureToleranceCount *int64 `type:"integer"` + + // The percentage of accounts, per region, for which this stack operation can + // fail before AWS Service Catalog stops the operation in that region. If the + // operation is stopped in a region, AWS Service Catalog doesn't attempt the + // operation in any subsequent regions. + // + // When calculating the number of accounts based on the specified percentage, + // AWS Service Catalog rounds down to the next whole number. + // + // Applicable only to a CFN_STACKSET provisioned product type. + // + // Conditional: You must specify either StackSetFailureToleranceCount or StackSetFailureTolerancePercentage, + // but not both. + StackSetFailureTolerancePercentage *int64 `type:"integer"` + + // The maximum number of accounts in which to perform this operation at one + // time. This is dependent on the value of StackSetFailureToleranceCount. StackSetMaxConcurrentCount + // is at most one more than the StackSetFailureToleranceCount. + // + // Note that this setting lets you specify the maximum for operations. For large + // deployments, under certain circumstances the actual number of accounts acted + // upon concurrently may be lower due to service throttling. + // + // Applicable only to a CFN_STACKSET provisioned product type. + // + // Conditional: You must specify either StackSetMaxConcurrentCount or StackSetMaxConcurrentPercentage, + // but not both. + StackSetMaxConcurrencyCount *int64 `min:"1" type:"integer"` + + // The maximum percentage of accounts in which to perform this operation at + // one time. + // + // When calculating the number of accounts based on the specified percentage, + // AWS Service Catalog rounds down to the next whole number. This is true except + // in cases where rounding down would result is zero. In this case, AWS Service + // Catalog sets the number as 1 instead. + // + // Note that this setting lets you specify the maximum for operations. For large + // deployments, under certain circumstances the actual number of accounts acted + // upon concurrently may be lower due to service throttling. + // + // Applicable only to a CFN_STACKSET provisioned product type. + // + // Conditional: You must specify either StackSetMaxConcurrentCount or StackSetMaxConcurrentPercentage, + // but not both. + StackSetMaxConcurrencyPercentage *int64 `min:"1" type:"integer"` + + // One or more AWS Regions where the provisioned product will be available. + // + // Applicable only to a CFN_STACKSET provisioned product type. + // + // The specified regions should be within the list of regions from the STACKSET + // constraint. To get the list of regions in the STACKSET constraint, use the + // DescribeProvisioningParameters operation. + // + // If no values are specified, the default value is all regions from the STACKSET + // constraint. + StackSetRegions []*string `type:"list"` } // String returns the string representation -func (s ProvisioningParameter) String() string { +func (s ProvisioningPreferences) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ProvisioningParameter) GoString() string { +func (s ProvisioningPreferences) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ProvisioningParameter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ProvisioningParameter"} - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) +func (s *ProvisioningPreferences) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ProvisioningPreferences"} + if s.StackSetMaxConcurrencyCount != nil && *s.StackSetMaxConcurrencyCount < 1 { + invalidParams.Add(request.NewErrParamMinValue("StackSetMaxConcurrencyCount", 1)) + } + if s.StackSetMaxConcurrencyPercentage != nil && *s.StackSetMaxConcurrencyPercentage < 1 { + invalidParams.Add(request.NewErrParamMinValue("StackSetMaxConcurrencyPercentage", 1)) } if invalidParams.Len() > 0 { @@ -12338,15 +15841,39 @@ func (s *ProvisioningParameter) Validate() error { return nil } -// SetKey sets the Key field's value. -func (s *ProvisioningParameter) SetKey(v string) *ProvisioningParameter { - s.Key = &v +// SetStackSetAccounts sets the StackSetAccounts field's value. +func (s *ProvisioningPreferences) SetStackSetAccounts(v []*string) *ProvisioningPreferences { + s.StackSetAccounts = v return s } -// SetValue sets the Value field's value. -func (s *ProvisioningParameter) SetValue(v string) *ProvisioningParameter { - s.Value = &v +// SetStackSetFailureToleranceCount sets the StackSetFailureToleranceCount field's value. +func (s *ProvisioningPreferences) SetStackSetFailureToleranceCount(v int64) *ProvisioningPreferences { + s.StackSetFailureToleranceCount = &v + return s +} + +// SetStackSetFailureTolerancePercentage sets the StackSetFailureTolerancePercentage field's value. +func (s *ProvisioningPreferences) SetStackSetFailureTolerancePercentage(v int64) *ProvisioningPreferences { + s.StackSetFailureTolerancePercentage = &v + return s +} + +// SetStackSetMaxConcurrencyCount sets the StackSetMaxConcurrencyCount field's value. +func (s *ProvisioningPreferences) SetStackSetMaxConcurrencyCount(v int64) *ProvisioningPreferences { + s.StackSetMaxConcurrencyCount = &v + return s +} + +// SetStackSetMaxConcurrencyPercentage sets the StackSetMaxConcurrencyPercentage field's value. +func (s *ProvisioningPreferences) SetStackSetMaxConcurrencyPercentage(v int64) *ProvisioningPreferences { + s.StackSetMaxConcurrencyPercentage = &v + return s +} + +// SetStackSetRegions sets the StackSetRegions field's value. +func (s *ProvisioningPreferences) SetStackSetRegions(v []*string) *ProvisioningPreferences { + s.StackSetRegions = v return s } @@ -12369,7 +15896,7 @@ type RecordDetail struct { // The user-friendly name of the provisioned product. ProvisionedProductName *string `min:"1" type:"string"` - // The type of provisioned product. The supported value is CFN_STACK. + // The type of provisioned product. The supported values are CFN_STACK and CFN_STACKSET. ProvisionedProductType *string `type:"string"` // The identifier of the provisioning artifact. @@ -12627,6 +16154,20 @@ type RejectPortfolioShareInput struct { // // PortfolioId is a required field PortfolioId *string `min:"1" type:"string" required:"true"` + + // The type of shared portfolios to reject. The default is to reject imported + // portfolios. + // + // * AWS_ORGANIZATIONS - Reject portfolios shared by the master account of + // your organization. + // + // * IMPORTED - Reject imported portfolios. + // + // * AWS_SERVICECATALOG - Not supported. (Throws ResourceNotFoundException.) + // + // For example, aws servicecatalog reject-portfolio-share --portfolio-id "port-2qwzkwxt3y5fk" + // --portfolio-share-type AWS_ORGANIZATIONS + PortfolioShareType *string `type:"string" enum:"PortfolioShareType"` } // String returns the string representation @@ -12667,6 +16208,12 @@ func (s *RejectPortfolioShareInput) SetPortfolioId(v string) *RejectPortfolioSha return s } +// SetPortfolioShareType sets the PortfolioShareType field's value. +func (s *RejectPortfolioShareInput) SetPortfolioShareType(v string) *RejectPortfolioShareInput { + s.PortfolioShareType = &v + return s +} + type RejectPortfolioShareOutput struct { _ struct{} `type:"structure"` } @@ -13311,81 +16858,317 @@ func (s *SearchProvisionedProductsInput) SetAcceptLanguage(v string) *SearchProv return s } -// SetAccessLevelFilter sets the AccessLevelFilter field's value. -func (s *SearchProvisionedProductsInput) SetAccessLevelFilter(v *AccessLevelFilter) *SearchProvisionedProductsInput { - s.AccessLevelFilter = v +// SetAccessLevelFilter sets the AccessLevelFilter field's value. +func (s *SearchProvisionedProductsInput) SetAccessLevelFilter(v *AccessLevelFilter) *SearchProvisionedProductsInput { + s.AccessLevelFilter = v + return s +} + +// SetFilters sets the Filters field's value. +func (s *SearchProvisionedProductsInput) SetFilters(v map[string][]*string) *SearchProvisionedProductsInput { + s.Filters = v + return s +} + +// SetPageSize sets the PageSize field's value. +func (s *SearchProvisionedProductsInput) SetPageSize(v int64) *SearchProvisionedProductsInput { + s.PageSize = &v + return s +} + +// SetPageToken sets the PageToken field's value. +func (s *SearchProvisionedProductsInput) SetPageToken(v string) *SearchProvisionedProductsInput { + s.PageToken = &v + return s +} + +// SetSortBy sets the SortBy field's value. +func (s *SearchProvisionedProductsInput) SetSortBy(v string) *SearchProvisionedProductsInput { + s.SortBy = &v + return s +} + +// SetSortOrder sets the SortOrder field's value. +func (s *SearchProvisionedProductsInput) SetSortOrder(v string) *SearchProvisionedProductsInput { + s.SortOrder = &v + return s +} + +type SearchProvisionedProductsOutput struct { + _ struct{} `type:"structure"` + + // The page token to use to retrieve the next set of results. If there are no + // additional results, this value is null. + NextPageToken *string `type:"string"` + + // Information about the provisioned products. + ProvisionedProducts []*ProvisionedProductAttribute `type:"list"` + + // The number of provisioned products found. + TotalResultsCount *int64 `type:"integer"` +} + +// String returns the string representation +func (s SearchProvisionedProductsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SearchProvisionedProductsOutput) GoString() string { + return s.String() +} + +// SetNextPageToken sets the NextPageToken field's value. +func (s *SearchProvisionedProductsOutput) SetNextPageToken(v string) *SearchProvisionedProductsOutput { + s.NextPageToken = &v + return s +} + +// SetProvisionedProducts sets the ProvisionedProducts field's value. +func (s *SearchProvisionedProductsOutput) SetProvisionedProducts(v []*ProvisionedProductAttribute) *SearchProvisionedProductsOutput { + s.ProvisionedProducts = v + return s +} + +// SetTotalResultsCount sets the TotalResultsCount field's value. +func (s *SearchProvisionedProductsOutput) SetTotalResultsCount(v int64) *SearchProvisionedProductsOutput { + s.TotalResultsCount = &v + return s +} + +// A self-service action association consisting of the Action ID, the Product +// ID, and the Provisioning Artifact ID. +type ServiceActionAssociation struct { + _ struct{} `type:"structure"` + + // The product identifier. For example, prod-abcdzk7xy33qa. + // + // ProductId is a required field + ProductId *string `min:"1" type:"string" required:"true"` + + // The identifier of the provisioning artifact. For example, pa-4abcdjnxjj6ne. + // + // ProvisioningArtifactId is a required field + ProvisioningArtifactId *string `min:"1" type:"string" required:"true"` + + // The self-service action identifier. For example, act-fs7abcd89wxyz. + // + // ServiceActionId is a required field + ServiceActionId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ServiceActionAssociation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ServiceActionAssociation) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ServiceActionAssociation) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ServiceActionAssociation"} + if s.ProductId == nil { + invalidParams.Add(request.NewErrParamRequired("ProductId")) + } + if s.ProductId != nil && len(*s.ProductId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProductId", 1)) + } + if s.ProvisioningArtifactId == nil { + invalidParams.Add(request.NewErrParamRequired("ProvisioningArtifactId")) + } + if s.ProvisioningArtifactId != nil && len(*s.ProvisioningArtifactId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ProvisioningArtifactId", 1)) + } + if s.ServiceActionId == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceActionId")) + } + if s.ServiceActionId != nil && len(*s.ServiceActionId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ServiceActionId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetProductId sets the ProductId field's value. +func (s *ServiceActionAssociation) SetProductId(v string) *ServiceActionAssociation { + s.ProductId = &v + return s +} + +// SetProvisioningArtifactId sets the ProvisioningArtifactId field's value. +func (s *ServiceActionAssociation) SetProvisioningArtifactId(v string) *ServiceActionAssociation { + s.ProvisioningArtifactId = &v + return s +} + +// SetServiceActionId sets the ServiceActionId field's value. +func (s *ServiceActionAssociation) SetServiceActionId(v string) *ServiceActionAssociation { + s.ServiceActionId = &v + return s +} + +// An object containing detailed information about the self-service action. +type ServiceActionDetail struct { + _ struct{} `type:"structure"` + + // A map that defines the self-service action. + Definition map[string]*string `min:"1" type:"map"` + + // Summary information about the self-service action. + ServiceActionSummary *ServiceActionSummary `type:"structure"` +} + +// String returns the string representation +func (s ServiceActionDetail) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ServiceActionDetail) GoString() string { + return s.String() +} + +// SetDefinition sets the Definition field's value. +func (s *ServiceActionDetail) SetDefinition(v map[string]*string) *ServiceActionDetail { + s.Definition = v + return s +} + +// SetServiceActionSummary sets the ServiceActionSummary field's value. +func (s *ServiceActionDetail) SetServiceActionSummary(v *ServiceActionSummary) *ServiceActionDetail { + s.ServiceActionSummary = v + return s +} + +// Detailed information about the self-service action. +type ServiceActionSummary struct { + _ struct{} `type:"structure"` + + // The self-service action definition type. For example, SSM_AUTOMATION. + DefinitionType *string `type:"string" enum:"ServiceActionDefinitionType"` + + // The self-service action description. + Description *string `type:"string"` + + // The self-service action identifier. + Id *string `min:"1" type:"string"` + + // The self-service action name. + Name *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ServiceActionSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ServiceActionSummary) GoString() string { + return s.String() +} + +// SetDefinitionType sets the DefinitionType field's value. +func (s *ServiceActionSummary) SetDefinitionType(v string) *ServiceActionSummary { + s.DefinitionType = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *ServiceActionSummary) SetDescription(v string) *ServiceActionSummary { + s.Description = &v + return s +} + +// SetId sets the Id field's value. +func (s *ServiceActionSummary) SetId(v string) *ServiceActionSummary { + s.Id = &v + return s +} + +// SetName sets the Name field's value. +func (s *ServiceActionSummary) SetName(v string) *ServiceActionSummary { + s.Name = &v return s } -// SetFilters sets the Filters field's value. -func (s *SearchProvisionedProductsInput) SetFilters(v map[string][]*string) *SearchProvisionedProductsInput { - s.Filters = v - return s +// Information about the portfolio share operation. +type ShareDetails struct { + _ struct{} `type:"structure"` + + // List of errors. + ShareErrors []*ShareError `type:"list"` + + // List of accounts for whom the operation succeeded. + SuccessfulShares []*string `type:"list"` } -// SetPageSize sets the PageSize field's value. -func (s *SearchProvisionedProductsInput) SetPageSize(v int64) *SearchProvisionedProductsInput { - s.PageSize = &v - return s +// String returns the string representation +func (s ShareDetails) String() string { + return awsutil.Prettify(s) } -// SetPageToken sets the PageToken field's value. -func (s *SearchProvisionedProductsInput) SetPageToken(v string) *SearchProvisionedProductsInput { - s.PageToken = &v - return s +// GoString returns the string representation +func (s ShareDetails) GoString() string { + return s.String() } -// SetSortBy sets the SortBy field's value. -func (s *SearchProvisionedProductsInput) SetSortBy(v string) *SearchProvisionedProductsInput { - s.SortBy = &v +// SetShareErrors sets the ShareErrors field's value. +func (s *ShareDetails) SetShareErrors(v []*ShareError) *ShareDetails { + s.ShareErrors = v return s } -// SetSortOrder sets the SortOrder field's value. -func (s *SearchProvisionedProductsInput) SetSortOrder(v string) *SearchProvisionedProductsInput { - s.SortOrder = &v +// SetSuccessfulShares sets the SuccessfulShares field's value. +func (s *ShareDetails) SetSuccessfulShares(v []*string) *ShareDetails { + s.SuccessfulShares = v return s } -type SearchProvisionedProductsOutput struct { +// Errors that occurred during the portfolio share operation. +type ShareError struct { _ struct{} `type:"structure"` - // The page token to use to retrieve the next set of results. If there are no - // additional results, this value is null. - NextPageToken *string `type:"string"` + // List of accounts impacted by the error. + Accounts []*string `type:"list"` - // Information about the provisioned products. - ProvisionedProducts []*ProvisionedProductAttribute `type:"list"` + // Error type that happened when processing the operation. + Error *string `type:"string"` - // The number of provisioned products found. - TotalResultsCount *int64 `type:"integer"` + // Information about the error. + Message *string `type:"string"` } // String returns the string representation -func (s SearchProvisionedProductsOutput) String() string { +func (s ShareError) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s SearchProvisionedProductsOutput) GoString() string { +func (s ShareError) GoString() string { return s.String() } -// SetNextPageToken sets the NextPageToken field's value. -func (s *SearchProvisionedProductsOutput) SetNextPageToken(v string) *SearchProvisionedProductsOutput { - s.NextPageToken = &v +// SetAccounts sets the Accounts field's value. +func (s *ShareError) SetAccounts(v []*string) *ShareError { + s.Accounts = v return s } -// SetProvisionedProducts sets the ProvisionedProducts field's value. -func (s *SearchProvisionedProductsOutput) SetProvisionedProducts(v []*ProvisionedProductAttribute) *SearchProvisionedProductsOutput { - s.ProvisionedProducts = v +// SetError sets the Error field's value. +func (s *ShareError) SetError(v string) *ShareError { + s.Error = &v return s } -// SetTotalResultsCount sets the TotalResultsCount field's value. -func (s *SearchProvisionedProductsOutput) SetTotalResultsCount(v int64) *SearchProvisionedProductsOutput { - s.TotalResultsCount = &v +// SetMessage sets the Message field's value. +func (s *ShareError) SetMessage(v string) *ShareError { + s.Message = &v return s } @@ -13561,9 +17344,7 @@ type TerminateProvisionedProductInput struct { // token is only valid during the termination process. After the provisioned // product is terminated, subsequent requests to terminate the same provisioned // product always return ResourceNotFound. - // - // TerminateToken is a required field - TerminateToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` + TerminateToken *string `min:"1" type:"string" idempotencyToken:"true"` } // String returns the string representation @@ -13585,9 +17366,6 @@ func (s *TerminateProvisionedProductInput) Validate() error { if s.ProvisionedProductName != nil && len(*s.ProvisionedProductName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ProvisionedProductName", 1)) } - if s.TerminateToken == nil { - invalidParams.Add(request.NewErrParamRequired("TerminateToken")) - } if s.TerminateToken != nil && len(*s.TerminateToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("TerminateToken", 1)) } @@ -14101,7 +17879,7 @@ type UpdateProvisionedProductInput struct { // path, and required if the product has more than one path. PathId *string `min:"1" type:"string"` - // The identifier of the provisioned product. + // The identifier of the product. ProductId *string `min:"1" type:"string"` // The identifier of the provisioned product. You cannot specify both ProvisionedProductName @@ -14118,10 +17896,12 @@ type UpdateProvisionedProductInput struct { // The new parameters. ProvisioningParameters []*UpdateProvisioningParameter `type:"list"` + // An object that contains information about the provisioning preferences for + // a stack set. + ProvisioningPreferences *UpdateProvisioningPreferences `type:"structure"` + // The idempotency token that uniquely identifies the provisioning update request. - // - // UpdateToken is a required field - UpdateToken *string `min:"1" type:"string" required:"true" idempotencyToken:"true"` + UpdateToken *string `min:"1" type:"string" idempotencyToken:"true"` } // String returns the string representation @@ -14152,9 +17932,6 @@ func (s *UpdateProvisionedProductInput) Validate() error { if s.ProvisioningArtifactId != nil && len(*s.ProvisioningArtifactId) < 1 { invalidParams.Add(request.NewErrParamMinLen("ProvisioningArtifactId", 1)) } - if s.UpdateToken == nil { - invalidParams.Add(request.NewErrParamRequired("UpdateToken")) - } if s.UpdateToken != nil && len(*s.UpdateToken) < 1 { invalidParams.Add(request.NewErrParamMinLen("UpdateToken", 1)) } @@ -14168,6 +17945,11 @@ func (s *UpdateProvisionedProductInput) Validate() error { } } } + if s.ProvisioningPreferences != nil { + if err := s.ProvisioningPreferences.Validate(); err != nil { + invalidParams.AddNested("ProvisioningPreferences", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -14217,6 +17999,12 @@ func (s *UpdateProvisionedProductInput) SetProvisioningParameters(v []*UpdatePro return s } +// SetProvisioningPreferences sets the ProvisioningPreferences field's value. +func (s *UpdateProvisionedProductInput) SetProvisioningPreferences(v *UpdateProvisioningPreferences) *UpdateProvisionedProductInput { + s.ProvisioningPreferences = v + return s +} + // SetUpdateToken sets the UpdateToken field's value. func (s *UpdateProvisionedProductInput) SetUpdateToken(v string) *UpdateProvisionedProductInput { s.UpdateToken = &v @@ -14442,6 +18230,293 @@ func (s *UpdateProvisioningParameter) SetValue(v string) *UpdateProvisioningPara return s } +// The user-defined preferences that will be applied when updating a provisioned +// product. Not all preferences are applicable to all provisioned product types. +type UpdateProvisioningPreferences struct { + _ struct{} `type:"structure"` + + // One or more AWS accounts that will have access to the provisioned product. + // + // Applicable only to a CFN_STACKSET provisioned product type. + // + // The AWS accounts specified should be within the list of accounts in the STACKSET + // constraint. To get the list of accounts in the STACKSET constraint, use the + // DescribeProvisioningParameters operation. + // + // If no values are specified, the default value is all accounts from the STACKSET + // constraint. + StackSetAccounts []*string `type:"list"` + + // The number of accounts, per region, for which this operation can fail before + // AWS Service Catalog stops the operation in that region. If the operation + // is stopped in a region, AWS Service Catalog doesn't attempt the operation + // in any subsequent regions. + // + // Applicable only to a CFN_STACKSET provisioned product type. + // + // Conditional: You must specify either StackSetFailureToleranceCount or StackSetFailureTolerancePercentage, + // but not both. + // + // The default value is 0 if no value is specified. + StackSetFailureToleranceCount *int64 `type:"integer"` + + // The percentage of accounts, per region, for which this stack operation can + // fail before AWS Service Catalog stops the operation in that region. If the + // operation is stopped in a region, AWS Service Catalog doesn't attempt the + // operation in any subsequent regions. + // + // When calculating the number of accounts based on the specified percentage, + // AWS Service Catalog rounds down to the next whole number. + // + // Applicable only to a CFN_STACKSET provisioned product type. + // + // Conditional: You must specify either StackSetFailureToleranceCount or StackSetFailureTolerancePercentage, + // but not both. + StackSetFailureTolerancePercentage *int64 `type:"integer"` + + // The maximum number of accounts in which to perform this operation at one + // time. This is dependent on the value of StackSetFailureToleranceCount. StackSetMaxConcurrentCount + // is at most one more than the StackSetFailureToleranceCount. + // + // Note that this setting lets you specify the maximum for operations. For large + // deployments, under certain circumstances the actual number of accounts acted + // upon concurrently may be lower due to service throttling. + // + // Applicable only to a CFN_STACKSET provisioned product type. + // + // Conditional: You must specify either StackSetMaxConcurrentCount or StackSetMaxConcurrentPercentage, + // but not both. + StackSetMaxConcurrencyCount *int64 `min:"1" type:"integer"` + + // The maximum percentage of accounts in which to perform this operation at + // one time. + // + // When calculating the number of accounts based on the specified percentage, + // AWS Service Catalog rounds down to the next whole number. This is true except + // in cases where rounding down would result is zero. In this case, AWS Service + // Catalog sets the number as 1 instead. + // + // Note that this setting lets you specify the maximum for operations. For large + // deployments, under certain circumstances the actual number of accounts acted + // upon concurrently may be lower due to service throttling. + // + // Applicable only to a CFN_STACKSET provisioned product type. + // + // Conditional: You must specify either StackSetMaxConcurrentCount or StackSetMaxConcurrentPercentage, + // but not both. + StackSetMaxConcurrencyPercentage *int64 `min:"1" type:"integer"` + + // Determines what action AWS Service Catalog performs to a stack set or a stack + // instance represented by the provisioned product. The default value is UPDATE + // if nothing is specified. + // + // Applicable only to a CFN_STACKSET provisioned product type. + // + // CREATECreates a new stack instance in the stack set represented by the provisioned + // product. In this case, only new stack instances are created based on accounts + // and regions; if new ProductId or ProvisioningArtifactID are passed, they + // will be ignored. + // + // UPDATEUpdates the stack set represented by the provisioned product and also + // its stack instances. + // + // DELETEDeletes a stack instance in the stack set represented by the provisioned + // product. + StackSetOperationType *string `type:"string" enum:"StackSetOperationType"` + + // One or more AWS Regions where the provisioned product will be available. + // + // Applicable only to a CFN_STACKSET provisioned product type. + // + // The specified regions should be within the list of regions from the STACKSET + // constraint. To get the list of regions in the STACKSET constraint, use the + // DescribeProvisioningParameters operation. + // + // If no values are specified, the default value is all regions from the STACKSET + // constraint. + StackSetRegions []*string `type:"list"` +} + +// String returns the string representation +func (s UpdateProvisioningPreferences) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateProvisioningPreferences) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateProvisioningPreferences) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateProvisioningPreferences"} + if s.StackSetMaxConcurrencyCount != nil && *s.StackSetMaxConcurrencyCount < 1 { + invalidParams.Add(request.NewErrParamMinValue("StackSetMaxConcurrencyCount", 1)) + } + if s.StackSetMaxConcurrencyPercentage != nil && *s.StackSetMaxConcurrencyPercentage < 1 { + invalidParams.Add(request.NewErrParamMinValue("StackSetMaxConcurrencyPercentage", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetStackSetAccounts sets the StackSetAccounts field's value. +func (s *UpdateProvisioningPreferences) SetStackSetAccounts(v []*string) *UpdateProvisioningPreferences { + s.StackSetAccounts = v + return s +} + +// SetStackSetFailureToleranceCount sets the StackSetFailureToleranceCount field's value. +func (s *UpdateProvisioningPreferences) SetStackSetFailureToleranceCount(v int64) *UpdateProvisioningPreferences { + s.StackSetFailureToleranceCount = &v + return s +} + +// SetStackSetFailureTolerancePercentage sets the StackSetFailureTolerancePercentage field's value. +func (s *UpdateProvisioningPreferences) SetStackSetFailureTolerancePercentage(v int64) *UpdateProvisioningPreferences { + s.StackSetFailureTolerancePercentage = &v + return s +} + +// SetStackSetMaxConcurrencyCount sets the StackSetMaxConcurrencyCount field's value. +func (s *UpdateProvisioningPreferences) SetStackSetMaxConcurrencyCount(v int64) *UpdateProvisioningPreferences { + s.StackSetMaxConcurrencyCount = &v + return s +} + +// SetStackSetMaxConcurrencyPercentage sets the StackSetMaxConcurrencyPercentage field's value. +func (s *UpdateProvisioningPreferences) SetStackSetMaxConcurrencyPercentage(v int64) *UpdateProvisioningPreferences { + s.StackSetMaxConcurrencyPercentage = &v + return s +} + +// SetStackSetOperationType sets the StackSetOperationType field's value. +func (s *UpdateProvisioningPreferences) SetStackSetOperationType(v string) *UpdateProvisioningPreferences { + s.StackSetOperationType = &v + return s +} + +// SetStackSetRegions sets the StackSetRegions field's value. +func (s *UpdateProvisioningPreferences) SetStackSetRegions(v []*string) *UpdateProvisioningPreferences { + s.StackSetRegions = v + return s +} + +type UpdateServiceActionInput struct { + _ struct{} `type:"structure"` + + // The language code. + // + // * en - English (default) + // + // * jp - Japanese + // + // * zh - Chinese + AcceptLanguage *string `type:"string"` + + // A map that defines the self-service action. + Definition map[string]*string `min:"1" type:"map"` + + // The self-service action description. + Description *string `type:"string"` + + // The self-service action identifier. + // + // Id is a required field + Id *string `min:"1" type:"string" required:"true"` + + // The self-service action name. + Name *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s UpdateServiceActionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateServiceActionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateServiceActionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateServiceActionInput"} + if s.Definition != nil && len(s.Definition) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Definition", 1)) + } + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + if s.Id != nil && len(*s.Id) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Id", 1)) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAcceptLanguage sets the AcceptLanguage field's value. +func (s *UpdateServiceActionInput) SetAcceptLanguage(v string) *UpdateServiceActionInput { + s.AcceptLanguage = &v + return s +} + +// SetDefinition sets the Definition field's value. +func (s *UpdateServiceActionInput) SetDefinition(v map[string]*string) *UpdateServiceActionInput { + s.Definition = v + return s +} + +// SetDescription sets the Description field's value. +func (s *UpdateServiceActionInput) SetDescription(v string) *UpdateServiceActionInput { + s.Description = &v + return s +} + +// SetId sets the Id field's value. +func (s *UpdateServiceActionInput) SetId(v string) *UpdateServiceActionInput { + s.Id = &v + return s +} + +// SetName sets the Name field's value. +func (s *UpdateServiceActionInput) SetName(v string) *UpdateServiceActionInput { + s.Name = &v + return s +} + +type UpdateServiceActionOutput struct { + _ struct{} `type:"structure"` + + // Detailed information about the self-service action. + ServiceActionDetail *ServiceActionDetail `type:"structure"` +} + +// String returns the string representation +func (s UpdateServiceActionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateServiceActionOutput) GoString() string { + return s.String() +} + +// SetServiceActionDetail sets the ServiceActionDetail field's value. +func (s *UpdateServiceActionOutput) SetServiceActionDetail(v *ServiceActionDetail) *UpdateServiceActionOutput { + s.ServiceActionDetail = v + return s +} + type UpdateTagOptionInput struct { _ struct{} `type:"structure"` @@ -14571,6 +18646,17 @@ const ( AccessLevelFilterKeyUser = "User" ) +const ( + // AccessStatusEnabled is a AccessStatus enum value + AccessStatusEnabled = "ENABLED" + + // AccessStatusUnderChange is a AccessStatus enum value + AccessStatusUnderChange = "UNDER_CHANGE" + + // AccessStatusDisabled is a AccessStatus enum value + AccessStatusDisabled = "DISABLED" +) + const ( // ChangeActionAdd is a ChangeAction enum value ChangeActionAdd = "ADD" @@ -14606,12 +18692,26 @@ const ( EvaluationTypeDynamic = "DYNAMIC" ) +const ( + // OrganizationNodeTypeOrganization is a OrganizationNodeType enum value + OrganizationNodeTypeOrganization = "ORGANIZATION" + + // OrganizationNodeTypeOrganizationalUnit is a OrganizationNodeType enum value + OrganizationNodeTypeOrganizationalUnit = "ORGANIZATIONAL_UNIT" + + // OrganizationNodeTypeAccount is a OrganizationNodeType enum value + OrganizationNodeTypeAccount = "ACCOUNT" +) + const ( // PortfolioShareTypeImported is a PortfolioShareType enum value PortfolioShareTypeImported = "IMPORTED" // PortfolioShareTypeAwsServicecatalog is a PortfolioShareType enum value PortfolioShareTypeAwsServicecatalog = "AWS_SERVICECATALOG" + + // PortfolioShareTypeAwsOrganizations is a PortfolioShareType enum value + PortfolioShareTypeAwsOrganizations = "AWS_ORGANIZATIONS" ) const ( @@ -14779,6 +18879,59 @@ const ( ResourceAttributeTags = "TAGS" ) +const ( + // ServiceActionAssociationErrorCodeDuplicateResource is a ServiceActionAssociationErrorCode enum value + ServiceActionAssociationErrorCodeDuplicateResource = "DUPLICATE_RESOURCE" + + // ServiceActionAssociationErrorCodeInternalFailure is a ServiceActionAssociationErrorCode enum value + ServiceActionAssociationErrorCodeInternalFailure = "INTERNAL_FAILURE" + + // ServiceActionAssociationErrorCodeLimitExceeded is a ServiceActionAssociationErrorCode enum value + ServiceActionAssociationErrorCodeLimitExceeded = "LIMIT_EXCEEDED" + + // ServiceActionAssociationErrorCodeResourceNotFound is a ServiceActionAssociationErrorCode enum value + ServiceActionAssociationErrorCodeResourceNotFound = "RESOURCE_NOT_FOUND" + + // ServiceActionAssociationErrorCodeThrottling is a ServiceActionAssociationErrorCode enum value + ServiceActionAssociationErrorCodeThrottling = "THROTTLING" +) + +const ( + // ServiceActionDefinitionKeyName is a ServiceActionDefinitionKey enum value + ServiceActionDefinitionKeyName = "Name" + + // ServiceActionDefinitionKeyVersion is a ServiceActionDefinitionKey enum value + ServiceActionDefinitionKeyVersion = "Version" + + // ServiceActionDefinitionKeyAssumeRole is a ServiceActionDefinitionKey enum value + ServiceActionDefinitionKeyAssumeRole = "AssumeRole" + + // ServiceActionDefinitionKeyParameters is a ServiceActionDefinitionKey enum value + ServiceActionDefinitionKeyParameters = "Parameters" +) + +const ( + // ServiceActionDefinitionTypeSsmAutomation is a ServiceActionDefinitionType enum value + ServiceActionDefinitionTypeSsmAutomation = "SSM_AUTOMATION" +) + +const ( + // ShareStatusNotStarted is a ShareStatus enum value + ShareStatusNotStarted = "NOT_STARTED" + + // ShareStatusInProgress is a ShareStatus enum value + ShareStatusInProgress = "IN_PROGRESS" + + // ShareStatusCompleted is a ShareStatus enum value + ShareStatusCompleted = "COMPLETED" + + // ShareStatusCompletedWithErrors is a ShareStatus enum value + ShareStatusCompletedWithErrors = "COMPLETED_WITH_ERRORS" + + // ShareStatusError is a ShareStatus enum value + ShareStatusError = "ERROR" +) + const ( // SortOrderAscending is a SortOrder enum value SortOrderAscending = "ASCENDING" @@ -14787,6 +18940,17 @@ const ( SortOrderDescending = "DESCENDING" ) +const ( + // StackSetOperationTypeCreate is a StackSetOperationType enum value + StackSetOperationTypeCreate = "CREATE" + + // StackSetOperationTypeUpdate is a StackSetOperationType enum value + StackSetOperationTypeUpdate = "UPDATE" + + // StackSetOperationTypeDelete is a StackSetOperationType enum value + StackSetOperationTypeDelete = "DELETE" +) + const ( // StatusAvailable is a Status enum value StatusAvailable = "AVAILABLE" diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/errors.go b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/errors.go index 4142808247..357d9e52f5 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/servicecatalog/errors.go @@ -32,6 +32,12 @@ const ( // operation. ErrCodeLimitExceededException = "LimitExceededException" + // ErrCodeOperationNotSupportedException for service response error code + // "OperationNotSupportedException". + // + // The operation is not supported. + ErrCodeOperationNotSupportedException = "OperationNotSupportedException" + // ErrCodeResourceInUseException for service response error code // "ResourceInUseException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/api.go b/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/api.go index d5410ec6ea..bca3bcb654 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/api.go @@ -13,12 +13,109 @@ import ( "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) +const opCreateHttpNamespace = "CreateHttpNamespace" + +// CreateHttpNamespaceRequest generates a "aws/request.Request" representing the +// client's request for the CreateHttpNamespace 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 CreateHttpNamespace for more information on using the CreateHttpNamespace +// 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 CreateHttpNamespaceRequest method. +// req, resp := client.CreateHttpNamespaceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreateHttpNamespace +func (c *ServiceDiscovery) CreateHttpNamespaceRequest(input *CreateHttpNamespaceInput) (req *request.Request, output *CreateHttpNamespaceOutput) { + op := &request.Operation{ + Name: opCreateHttpNamespace, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateHttpNamespaceInput{} + } + + output = &CreateHttpNamespaceOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateHttpNamespace API operation for AWS Cloud Map. +// +// Creates an HTTP namespace. Service instances that you register using an HTTP +// namespace can be discovered using a DiscoverInstances request but can't be +// discovered using DNS. +// +// For the current limit on the number of namespaces that you can create using +// the same AWS account, see AWS Cloud Map Limits (http://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) +// in the AWS Cloud Map Developer 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 AWS Cloud Map's +// API operation CreateHttpNamespace for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidInput "InvalidInput" +// One or more specified values aren't valid. For example, a required value +// might be missing, a numeric value might be outside the allowed range, or +// a string value might exceed length constraints. +// +// * ErrCodeNamespaceAlreadyExists "NamespaceAlreadyExists" +// The namespace that you're trying to create already exists. +// +// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" +// The resource can't be created because you've reached the limit on the number +// of resources. +// +// * ErrCodeDuplicateRequest "DuplicateRequest" +// The operation is already in progress. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreateHttpNamespace +func (c *ServiceDiscovery) CreateHttpNamespace(input *CreateHttpNamespaceInput) (*CreateHttpNamespaceOutput, error) { + req, out := c.CreateHttpNamespaceRequest(input) + return out, req.Send() +} + +// CreateHttpNamespaceWithContext is the same as CreateHttpNamespace with the addition of +// the ability to pass a context and additional request options. +// +// See CreateHttpNamespace 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 *ServiceDiscovery) CreateHttpNamespaceWithContext(ctx aws.Context, input *CreateHttpNamespaceInput, opts ...request.Option) (*CreateHttpNamespaceOutput, error) { + req, out := c.CreateHttpNamespaceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreatePrivateDnsNamespace = "CreatePrivateDnsNamespace" // CreatePrivateDnsNamespaceRequest generates a "aws/request.Request" representing the // client's request for the CreatePrivateDnsNamespace operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -55,27 +152,28 @@ func (c *ServiceDiscovery) CreatePrivateDnsNamespaceRequest(input *CreatePrivate return } -// CreatePrivateDnsNamespace API operation for Amazon Route 53 Auto Naming. +// CreatePrivateDnsNamespace API operation for AWS Cloud Map. // // Creates a private namespace based on DNS, which will be visible only inside // a specified Amazon VPC. The namespace defines your service naming scheme. // For example, if you name your namespace example.com and name your service // backend, the resulting DNS name for the service will be backend.example.com. // For the current limit on the number of namespaces that you can create using -// the same AWS account, see Limits on Auto Naming (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html#limits-api-entities-autonaming) -// in the Route 53 Developer Guide. +// the same AWS account, see AWS Cloud Map Limits (http://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) +// in the AWS Cloud Map Developer 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 Route 53 Auto Naming's +// See the AWS API reference guide for AWS Cloud Map's // API operation CreatePrivateDnsNamespace for usage and error information. // // Returned Error Codes: // * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, when you're creating -// a namespace, the value of Name might not be a valid DNS name. +// One or more specified values aren't valid. For example, a required value +// might be missing, a numeric value might be outside the allowed range, or +// a string value might exceed length constraints. // // * ErrCodeNamespaceAlreadyExists "NamespaceAlreadyExists" // The namespace that you're trying to create already exists. @@ -114,7 +212,7 @@ const opCreatePublicDnsNamespace = "CreatePublicDnsNamespace" // CreatePublicDnsNamespaceRequest generates a "aws/request.Request" representing the // client's request for the CreatePublicDnsNamespace operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -151,27 +249,28 @@ func (c *ServiceDiscovery) CreatePublicDnsNamespaceRequest(input *CreatePublicDn return } -// CreatePublicDnsNamespace API operation for Amazon Route 53 Auto Naming. +// CreatePublicDnsNamespace API operation for AWS Cloud Map. // // Creates a public namespace based on DNS, which will be visible on the internet. // The namespace defines your service naming scheme. For example, if you name // your namespace example.com and name your service backend, the resulting DNS // name for the service will be backend.example.com. For the current limit on // the number of namespaces that you can create using the same AWS account, -// see Limits on Auto Naming (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html#limits-api-entities-autonaming) -// in the Route 53 Developer Guide. +// see AWS Cloud Map Limits (http://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) +// in the AWS Cloud Map Developer 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 Route 53 Auto Naming's +// See the AWS API reference guide for AWS Cloud Map's // API operation CreatePublicDnsNamespace for usage and error information. // // Returned Error Codes: // * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, when you're creating -// a namespace, the value of Name might not be a valid DNS name. +// One or more specified values aren't valid. For example, a required value +// might be missing, a numeric value might be outside the allowed range, or +// a string value might exceed length constraints. // // * ErrCodeNamespaceAlreadyExists "NamespaceAlreadyExists" // The namespace that you're trying to create already exists. @@ -210,7 +309,7 @@ const opCreateService = "CreateService" // CreateServiceRequest generates a "aws/request.Request" representing the // client's request for the CreateService operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -247,34 +346,45 @@ func (c *ServiceDiscovery) CreateServiceRequest(input *CreateServiceInput) (req return } -// CreateService API operation for Amazon Route 53 Auto Naming. +// CreateService API operation for AWS Cloud Map. // // Creates a service, which defines the configuration for the following entities: // -// * Up to three records (A, AAAA, and SRV) or one CNAME record +// * For public and private DNS namespaces, one of the following combinations +// of DNS records in Amazon Route 53: +// +// A +// +// AAAA +// +// A and AAAA +// +// SRV +// +// CNAME // // * Optionally, a health check // // After you create the service, you can submit a RegisterInstance request, -// and Amazon Route 53 uses the values in the configuration to create the specified +// and AWS Cloud Map uses the values in the configuration to create the specified // entities. // // For the current limit on the number of instances that you can register using -// the same namespace and using the same service, see Limits on Auto Naming -// (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html#limits-api-entities-autonaming) -// in the Route 53 Developer Guide. +// the same namespace and using the same service, see AWS Cloud Map Limits (http://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) +// in the AWS Cloud Map Developer 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 Route 53 Auto Naming's +// See the AWS API reference guide for AWS Cloud Map's // API operation CreateService for usage and error information. // // Returned Error Codes: // * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, when you're creating -// a namespace, the value of Name might not be a valid DNS name. +// One or more specified values aren't valid. For example, a required value +// might be missing, a numeric value might be outside the allowed range, or +// a string value might exceed length constraints. // // * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" // The resource can't be created because you've reached the limit on the number @@ -314,7 +424,7 @@ const opDeleteNamespace = "DeleteNamespace" // DeleteNamespaceRequest generates a "aws/request.Request" representing the // client's request for the DeleteNamespace operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -351,7 +461,7 @@ func (c *ServiceDiscovery) DeleteNamespaceRequest(input *DeleteNamespaceInput) ( return } -// DeleteNamespace API operation for Amazon Route 53 Auto Naming. +// DeleteNamespace API operation for AWS Cloud Map. // // Deletes a namespace from the current account. If the namespace still contains // one or more services, the request fails. @@ -360,13 +470,14 @@ func (c *ServiceDiscovery) DeleteNamespaceRequest(input *DeleteNamespaceInput) ( // with awserr.Error's Code and Message methods to get detailed information about // the error. // -// See the AWS API reference guide for Amazon Route 53 Auto Naming's +// See the AWS API reference guide for AWS Cloud Map's // API operation DeleteNamespace for usage and error information. // // Returned Error Codes: // * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, when you're creating -// a namespace, the value of Name might not be a valid DNS name. +// One or more specified values aren't valid. For example, a required value +// might be missing, a numeric value might be outside the allowed range, or +// a string value might exceed length constraints. // // * ErrCodeNamespaceNotFound "NamespaceNotFound" // No namespace exists with the specified ID. @@ -405,7 +516,7 @@ const opDeleteService = "DeleteService" // DeleteServiceRequest generates a "aws/request.Request" representing the // client's request for the DeleteService operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -439,10 +550,11 @@ func (c *ServiceDiscovery) DeleteServiceRequest(input *DeleteServiceInput) (req output = &DeleteServiceOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// DeleteService API operation for Amazon Route 53 Auto Naming. +// DeleteService API operation for AWS Cloud Map. // // Deletes a specified service. If the service still contains one or more registered // instances, the request fails. @@ -451,13 +563,14 @@ func (c *ServiceDiscovery) DeleteServiceRequest(input *DeleteServiceInput) (req // with awserr.Error's Code and Message methods to get detailed information about // the error. // -// See the AWS API reference guide for Amazon Route 53 Auto Naming's +// See the AWS API reference guide for AWS Cloud Map's // API operation DeleteService for usage and error information. // // Returned Error Codes: // * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, when you're creating -// a namespace, the value of Name might not be a valid DNS name. +// One or more specified values aren't valid. For example, a required value +// might be missing, a numeric value might be outside the allowed range, or +// a string value might exceed length constraints. // // * ErrCodeServiceNotFound "ServiceNotFound" // No service exists with the specified ID. @@ -493,7 +606,7 @@ const opDeregisterInstance = "DeregisterInstance" // DeregisterInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeregisterInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -530,16 +643,16 @@ func (c *ServiceDiscovery) DeregisterInstanceRequest(input *DeregisterInstanceIn return } -// DeregisterInstance API operation for Amazon Route 53 Auto Naming. +// DeregisterInstance API operation for AWS Cloud Map. // -// Deletes the records and the health check, if any, that Amazon Route 53 created -// for the specified instance. +// Deletes the Amazon Route 53 DNS records and health check, if any, that AWS +// Cloud Map created for the specified instance. // // 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 Route 53 Auto Naming's +// See the AWS API reference guide for AWS Cloud Map's // API operation DeregisterInstance for usage and error information. // // Returned Error Codes: @@ -547,8 +660,9 @@ func (c *ServiceDiscovery) DeregisterInstanceRequest(input *DeregisterInstanceIn // The operation is already in progress. // // * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, when you're creating -// a namespace, the value of Name might not be a valid DNS name. +// One or more specified values aren't valid. For example, a required value +// might be missing, a numeric value might be outside the allowed range, or +// a string value might exceed length constraints. // // * ErrCodeInstanceNotFound "InstanceNotFound" // No instance exists with the specified ID, or the instance was recently registered, @@ -583,12 +697,101 @@ func (c *ServiceDiscovery) DeregisterInstanceWithContext(ctx aws.Context, input return out, req.Send() } +const opDiscoverInstances = "DiscoverInstances" + +// DiscoverInstancesRequest generates a "aws/request.Request" representing the +// client's request for the DiscoverInstances 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 DiscoverInstances for more information on using the DiscoverInstances +// 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 DiscoverInstancesRequest method. +// req, resp := client.DiscoverInstancesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DiscoverInstances +func (c *ServiceDiscovery) DiscoverInstancesRequest(input *DiscoverInstancesInput) (req *request.Request, output *DiscoverInstancesOutput) { + op := &request.Operation{ + Name: opDiscoverInstances, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DiscoverInstancesInput{} + } + + output = &DiscoverInstancesOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("data-", nil)) + req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler) + return +} + +// DiscoverInstances API operation for AWS Cloud Map. +// +// Discovers registered instances for a specified namespace and service. +// +// 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 Cloud Map's +// API operation DiscoverInstances for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServiceNotFound "ServiceNotFound" +// No service exists with the specified ID. +// +// * ErrCodeNamespaceNotFound "NamespaceNotFound" +// No namespace exists with the specified ID. +// +// * ErrCodeInvalidInput "InvalidInput" +// One or more specified values aren't valid. For example, a required value +// might be missing, a numeric value might be outside the allowed range, or +// a string value might exceed length constraints. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DiscoverInstances +func (c *ServiceDiscovery) DiscoverInstances(input *DiscoverInstancesInput) (*DiscoverInstancesOutput, error) { + req, out := c.DiscoverInstancesRequest(input) + return out, req.Send() +} + +// DiscoverInstancesWithContext is the same as DiscoverInstances with the addition of +// the ability to pass a context and additional request options. +// +// See DiscoverInstances 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 *ServiceDiscovery) DiscoverInstancesWithContext(ctx aws.Context, input *DiscoverInstancesInput, opts ...request.Option) (*DiscoverInstancesOutput, error) { + req, out := c.DiscoverInstancesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetInstance = "GetInstance" // GetInstanceRequest generates a "aws/request.Request" representing the // client's request for the GetInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -625,7 +828,7 @@ func (c *ServiceDiscovery) GetInstanceRequest(input *GetInstanceInput) (req *req return } -// GetInstance API operation for Amazon Route 53 Auto Naming. +// GetInstance API operation for AWS Cloud Map. // // Gets information about a specified instance. // @@ -633,7 +836,7 @@ func (c *ServiceDiscovery) GetInstanceRequest(input *GetInstanceInput) (req *req // with awserr.Error's Code and Message methods to get detailed information about // the error. // -// See the AWS API reference guide for Amazon Route 53 Auto Naming's +// See the AWS API reference guide for AWS Cloud Map's // API operation GetInstance for usage and error information. // // Returned Error Codes: @@ -642,8 +845,9 @@ func (c *ServiceDiscovery) GetInstanceRequest(input *GetInstanceInput) (req *req // and information about the instance hasn't propagated yet. // // * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, when you're creating -// a namespace, the value of Name might not be a valid DNS name. +// One or more specified values aren't valid. For example, a required value +// might be missing, a numeric value might be outside the allowed range, or +// a string value might exceed length constraints. // // * ErrCodeServiceNotFound "ServiceNotFound" // No service exists with the specified ID. @@ -675,7 +879,7 @@ const opGetInstancesHealthStatus = "GetInstancesHealthStatus" // GetInstancesHealthStatusRequest generates a "aws/request.Request" representing the // client's request for the GetInstancesHealthStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -718,7 +922,7 @@ func (c *ServiceDiscovery) GetInstancesHealthStatusRequest(input *GetInstancesHe return } -// GetInstancesHealthStatus API operation for Amazon Route 53 Auto Naming. +// GetInstancesHealthStatus API operation for AWS Cloud Map. // // Gets the current health status (Healthy, Unhealthy, or Unknown) of one or // more instances that are associated with a specified service. @@ -730,7 +934,7 @@ func (c *ServiceDiscovery) GetInstancesHealthStatusRequest(input *GetInstancesHe // with awserr.Error's Code and Message methods to get detailed information about // the error. // -// See the AWS API reference guide for Amazon Route 53 Auto Naming's +// See the AWS API reference guide for AWS Cloud Map's // API operation GetInstancesHealthStatus for usage and error information. // // Returned Error Codes: @@ -739,8 +943,9 @@ func (c *ServiceDiscovery) GetInstancesHealthStatusRequest(input *GetInstancesHe // and information about the instance hasn't propagated yet. // // * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, when you're creating -// a namespace, the value of Name might not be a valid DNS name. +// One or more specified values aren't valid. For example, a required value +// might be missing, a numeric value might be outside the allowed range, or +// a string value might exceed length constraints. // // * ErrCodeServiceNotFound "ServiceNotFound" // No service exists with the specified ID. @@ -822,7 +1027,7 @@ const opGetNamespace = "GetNamespace" // GetNamespaceRequest generates a "aws/request.Request" representing the // client's request for the GetNamespace operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -859,7 +1064,7 @@ func (c *ServiceDiscovery) GetNamespaceRequest(input *GetNamespaceInput) (req *r return } -// GetNamespace API operation for Amazon Route 53 Auto Naming. +// GetNamespace API operation for AWS Cloud Map. // // Gets information about a namespace. // @@ -867,13 +1072,14 @@ func (c *ServiceDiscovery) GetNamespaceRequest(input *GetNamespaceInput) (req *r // with awserr.Error's Code and Message methods to get detailed information about // the error. // -// See the AWS API reference guide for Amazon Route 53 Auto Naming's +// See the AWS API reference guide for AWS Cloud Map's // API operation GetNamespace for usage and error information. // // Returned Error Codes: // * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, when you're creating -// a namespace, the value of Name might not be a valid DNS name. +// One or more specified values aren't valid. For example, a required value +// might be missing, a numeric value might be outside the allowed range, or +// a string value might exceed length constraints. // // * ErrCodeNamespaceNotFound "NamespaceNotFound" // No namespace exists with the specified ID. @@ -905,7 +1111,7 @@ const opGetOperation = "GetOperation" // GetOperationRequest generates a "aws/request.Request" representing the // client's request for the GetOperation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -942,7 +1148,7 @@ func (c *ServiceDiscovery) GetOperationRequest(input *GetOperationInput) (req *r return } -// GetOperation API operation for Amazon Route 53 Auto Naming. +// GetOperation API operation for AWS Cloud Map. // // Gets information about any operation that returns an operation ID in the // response, such as a CreateService request. @@ -953,10 +1159,15 @@ func (c *ServiceDiscovery) GetOperationRequest(input *GetOperationInput) (req *r // with awserr.Error's Code and Message methods to get detailed information about // the error. // -// See the AWS API reference guide for Amazon Route 53 Auto Naming's +// See the AWS API reference guide for AWS Cloud Map's // API operation GetOperation for usage and error information. // // Returned Error Codes: +// * ErrCodeInvalidInput "InvalidInput" +// One or more specified values aren't valid. For example, a required value +// might be missing, a numeric value might be outside the allowed range, or +// a string value might exceed length constraints. +// // * ErrCodeOperationNotFound "OperationNotFound" // No operation exists with the specified ID. // @@ -987,7 +1198,7 @@ const opGetService = "GetService" // GetServiceRequest generates a "aws/request.Request" representing the // client's request for the GetService operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1024,7 +1235,7 @@ func (c *ServiceDiscovery) GetServiceRequest(input *GetServiceInput) (req *reque return } -// GetService API operation for Amazon Route 53 Auto Naming. +// GetService API operation for AWS Cloud Map. // // Gets the settings for a specified service. // @@ -1032,13 +1243,14 @@ func (c *ServiceDiscovery) GetServiceRequest(input *GetServiceInput) (req *reque // with awserr.Error's Code and Message methods to get detailed information about // the error. // -// See the AWS API reference guide for Amazon Route 53 Auto Naming's +// See the AWS API reference guide for AWS Cloud Map's // API operation GetService for usage and error information. // // Returned Error Codes: // * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, when you're creating -// a namespace, the value of Name might not be a valid DNS name. +// One or more specified values aren't valid. For example, a required value +// might be missing, a numeric value might be outside the allowed range, or +// a string value might exceed length constraints. // // * ErrCodeServiceNotFound "ServiceNotFound" // No service exists with the specified ID. @@ -1070,7 +1282,7 @@ const opListInstances = "ListInstances" // ListInstancesRequest generates a "aws/request.Request" representing the // client's request for the ListInstances operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1113,7 +1325,7 @@ func (c *ServiceDiscovery) ListInstancesRequest(input *ListInstancesInput) (req return } -// ListInstances API operation for Amazon Route 53 Auto Naming. +// ListInstances API operation for AWS Cloud Map. // // Lists summary information about the instances that you registered by using // a specified service. @@ -1122,7 +1334,7 @@ func (c *ServiceDiscovery) ListInstancesRequest(input *ListInstancesInput) (req // with awserr.Error's Code and Message methods to get detailed information about // the error. // -// See the AWS API reference guide for Amazon Route 53 Auto Naming's +// See the AWS API reference guide for AWS Cloud Map's // API operation ListInstances for usage and error information. // // Returned Error Codes: @@ -1130,8 +1342,9 @@ func (c *ServiceDiscovery) ListInstancesRequest(input *ListInstancesInput) (req // No service exists with the specified ID. // // * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, when you're creating -// a namespace, the value of Name might not be a valid DNS name. +// One or more specified values aren't valid. For example, a required value +// might be missing, a numeric value might be outside the allowed range, or +// a string value might exceed length constraints. // // See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListInstances func (c *ServiceDiscovery) ListInstances(input *ListInstancesInput) (*ListInstancesOutput, error) { @@ -1210,7 +1423,7 @@ const opListNamespaces = "ListNamespaces" // ListNamespacesRequest generates a "aws/request.Request" representing the // client's request for the ListNamespaces operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1253,7 +1466,7 @@ func (c *ServiceDiscovery) ListNamespacesRequest(input *ListNamespacesInput) (re return } -// ListNamespaces API operation for Amazon Route 53 Auto Naming. +// ListNamespaces API operation for AWS Cloud Map. // // Lists summary information about the namespaces that were created by the current // AWS account. @@ -1262,13 +1475,14 @@ func (c *ServiceDiscovery) ListNamespacesRequest(input *ListNamespacesInput) (re // with awserr.Error's Code and Message methods to get detailed information about // the error. // -// See the AWS API reference guide for Amazon Route 53 Auto Naming's +// See the AWS API reference guide for AWS Cloud Map's // API operation ListNamespaces for usage and error information. // // Returned Error Codes: // * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, when you're creating -// a namespace, the value of Name might not be a valid DNS name. +// One or more specified values aren't valid. For example, a required value +// might be missing, a numeric value might be outside the allowed range, or +// a string value might exceed length constraints. // // See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListNamespaces func (c *ServiceDiscovery) ListNamespaces(input *ListNamespacesInput) (*ListNamespacesOutput, error) { @@ -1347,7 +1561,7 @@ const opListOperations = "ListOperations" // ListOperationsRequest generates a "aws/request.Request" representing the // client's request for the ListOperations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1390,7 +1604,7 @@ func (c *ServiceDiscovery) ListOperationsRequest(input *ListOperationsInput) (re return } -// ListOperations API operation for Amazon Route 53 Auto Naming. +// ListOperations API operation for AWS Cloud Map. // // Lists operations that match the criteria that you specify. // @@ -1398,13 +1612,14 @@ func (c *ServiceDiscovery) ListOperationsRequest(input *ListOperationsInput) (re // with awserr.Error's Code and Message methods to get detailed information about // the error. // -// See the AWS API reference guide for Amazon Route 53 Auto Naming's +// See the AWS API reference guide for AWS Cloud Map's // API operation ListOperations for usage and error information. // // Returned Error Codes: // * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, when you're creating -// a namespace, the value of Name might not be a valid DNS name. +// One or more specified values aren't valid. For example, a required value +// might be missing, a numeric value might be outside the allowed range, or +// a string value might exceed length constraints. // // See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListOperations func (c *ServiceDiscovery) ListOperations(input *ListOperationsInput) (*ListOperationsOutput, error) { @@ -1483,7 +1698,7 @@ const opListServices = "ListServices" // ListServicesRequest generates a "aws/request.Request" representing the // client's request for the ListServices operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1526,7 +1741,7 @@ func (c *ServiceDiscovery) ListServicesRequest(input *ListServicesInput) (req *r return } -// ListServices API operation for Amazon Route 53 Auto Naming. +// ListServices API operation for AWS Cloud Map. // // Lists summary information for all the services that are associated with one // or more specified namespaces. @@ -1535,13 +1750,14 @@ func (c *ServiceDiscovery) ListServicesRequest(input *ListServicesInput) (req *r // with awserr.Error's Code and Message methods to get detailed information about // the error. // -// See the AWS API reference guide for Amazon Route 53 Auto Naming's +// See the AWS API reference guide for AWS Cloud Map's // API operation ListServices for usage and error information. // // Returned Error Codes: // * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, when you're creating -// a namespace, the value of Name might not be a valid DNS name. +// One or more specified values aren't valid. For example, a required value +// might be missing, a numeric value might be outside the allowed range, or +// a string value might exceed length constraints. // // See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListServices func (c *ServiceDiscovery) ListServices(input *ListServicesInput) (*ListServicesOutput, error) { @@ -1620,7 +1836,7 @@ const opRegisterInstance = "RegisterInstance" // RegisterInstanceRequest generates a "aws/request.Request" representing the // client's request for the RegisterInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1657,27 +1873,28 @@ func (c *ServiceDiscovery) RegisterInstanceRequest(input *RegisterInstanceInput) return } -// RegisterInstance API operation for Amazon Route 53 Auto Naming. +// RegisterInstance API operation for AWS Cloud Map. // -// Creates or updates one or more records and optionally a health check based -// on the settings in a specified service. When you submit a RegisterInstance -// request, Amazon Route 53 does the following: +// Creates or updates one or more records and, optionally, creates a health +// check based on the settings in a specified service. When you submit a RegisterInstance +// request, the following occurs: // -// * For each DNS record that you define in the service specified by ServiceId, -// creates or updates a record in the hosted zone that is associated with -// the corresponding namespace +// * For each DNS record that you define in the service that is specified +// by ServiceId, a record is created or updated in the hosted zone that is +// associated with the corresponding namespace. // -// * If the service includes HealthCheckConfig, creates or updates a health -// check based on the settings in the health check configuration +// * If the service includes HealthCheckConfig, a health check is created +// based on the settings in the health check configuration. // -// * Associates the health check, if any, with each of the records +// * The health check, if any, is associated with each of the new or updated +// records. // // One RegisterInstance request must complete before you can submit another // request and specify the same service ID and instance ID. // // For more information, see CreateService. // -// When Route 53 receives a DNS query for the specified DNS name, it returns +// When AWS Cloud Map receives a DNS query for the specified DNS name, it returns // the applicable value: // // * If the health check is healthy: returns all the records @@ -1689,15 +1906,14 @@ func (c *ServiceDiscovery) RegisterInstanceRequest(input *RegisterInstanceInput) // records // // For the current limit on the number of instances that you can register using -// the same namespace and using the same service, see Limits on Auto Naming -// (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html#limits-api-entities-autonaming) -// in the Route 53 Developer Guide. +// the same namespace and using the same service, see AWS Cloud Map Limits (http://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) +// in the AWS Cloud Map Developer 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 Route 53 Auto Naming's +// See the AWS API reference guide for AWS Cloud Map's // API operation RegisterInstance for usage and error information. // // Returned Error Codes: @@ -1705,8 +1921,9 @@ func (c *ServiceDiscovery) RegisterInstanceRequest(input *RegisterInstanceInput) // The operation is already in progress. // // * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, when you're creating -// a namespace, the value of Name might not be a valid DNS name. +// One or more specified values aren't valid. For example, a required value +// might be missing, a numeric value might be outside the allowed range, or +// a string value might exceed length constraints. // // * ErrCodeResourceInUse "ResourceInUse" // The specified resource can't be deleted because it contains other resources. @@ -1746,7 +1963,7 @@ const opUpdateInstanceCustomHealthStatus = "UpdateInstanceCustomHealthStatus" // UpdateInstanceCustomHealthStatusRequest generates a "aws/request.Request" representing the // client's request for the UpdateInstanceCustomHealthStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1780,18 +1997,27 @@ func (c *ServiceDiscovery) UpdateInstanceCustomHealthStatusRequest(input *Update output = &UpdateInstanceCustomHealthStatusOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// UpdateInstanceCustomHealthStatus API operation for Amazon Route 53 Auto Naming. +// UpdateInstanceCustomHealthStatus API operation for AWS Cloud Map. +// +// Submits a request to change the health status of a custom health check to +// healthy or unhealthy. +// +// You can use UpdateInstanceCustomHealthStatus to change the status only for +// custom health checks, which you define using HealthCheckCustomConfig when +// you create a service. You can't use it to change the status for Route 53 +// health checks, which you define using HealthCheckConfig. +// +// For more information, see HealthCheckCustomConfig. // // 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 Route 53 Auto Naming's +// See the AWS API reference guide for AWS Cloud Map's // API operation UpdateInstanceCustomHealthStatus for usage and error information. // // Returned Error Codes: @@ -1803,10 +2029,13 @@ func (c *ServiceDiscovery) UpdateInstanceCustomHealthStatusRequest(input *Update // No service exists with the specified ID. // // * ErrCodeCustomHealthNotFound "CustomHealthNotFound" +// The health check for the instance that is specified by ServiceId and InstanceId +// is not a custom health check. // // * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, when you're creating -// a namespace, the value of Name might not be a valid DNS name. +// One or more specified values aren't valid. For example, a required value +// might be missing, a numeric value might be outside the allowed range, or +// a string value might exceed length constraints. // // See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/UpdateInstanceCustomHealthStatus func (c *ServiceDiscovery) UpdateInstanceCustomHealthStatus(input *UpdateInstanceCustomHealthStatusInput) (*UpdateInstanceCustomHealthStatusOutput, error) { @@ -1835,7 +2064,7 @@ const opUpdateService = "UpdateService" // UpdateServiceRequest generates a "aws/request.Request" representing the // client's request for the UpdateService operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1872,7 +2101,7 @@ func (c *ServiceDiscovery) UpdateServiceRequest(input *UpdateServiceInput) (req return } -// UpdateService API operation for Amazon Route 53 Auto Naming. +// UpdateService API operation for AWS Cloud Map. // // Submits a request to perform the following operations: // @@ -1882,11 +2111,12 @@ func (c *ServiceDiscovery) UpdateServiceRequest(input *UpdateServiceInput) (req // // * Add, update, or delete HealthCheckConfig for a specified service // -// You must specify all DnsRecords configurations (and, optionally, HealthCheckConfig) -// that you want to appear in the updated service. Any current configurations -// that don't appear in an UpdateService request are deleted. +// For public and private DNS namespaces, you must specify all DnsRecords configurations +// (and, optionally, HealthCheckConfig) that you want to appear in the updated +// service. Any current configurations that don't appear in an UpdateService +// request are deleted. // -// When you update the TTL setting for a service, Amazon Route 53 also updates +// When you update the TTL setting for a service, AWS Cloud Map also updates // the corresponding settings in all the records and health checks that were // created by using the specified service. // @@ -1894,7 +2124,7 @@ func (c *ServiceDiscovery) UpdateServiceRequest(input *UpdateServiceInput) (req // with awserr.Error's Code and Message methods to get detailed information about // the error. // -// See the AWS API reference guide for Amazon Route 53 Auto Naming's +// See the AWS API reference guide for AWS Cloud Map's // API operation UpdateService for usage and error information. // // Returned Error Codes: @@ -1902,8 +2132,9 @@ func (c *ServiceDiscovery) UpdateServiceRequest(input *UpdateServiceInput) (req // The operation is already in progress. // // * ErrCodeInvalidInput "InvalidInput" -// One or more specified values aren't valid. For example, when you're creating -// a namespace, the value of Name might not be a valid DNS name. +// One or more specified values aren't valid. For example, a required value +// might be missing, a numeric value might be outside the allowed range, or +// a string value might exceed length constraints. // // * ErrCodeServiceNotFound "ServiceNotFound" // No service exists with the specified ID. @@ -1930,6 +2161,88 @@ func (c *ServiceDiscovery) UpdateServiceWithContext(ctx aws.Context, input *Upda return out, req.Send() } +type CreateHttpNamespaceInput struct { + _ struct{} `type:"structure"` + + // A unique string that identifies the request and that allows failed CreateHttpNamespace + // requests to be retried without the risk of executing the operation twice. + // CreatorRequestId can be any unique string, for example, a date/time stamp. + CreatorRequestId *string `type:"string" idempotencyToken:"true"` + + // A description for the namespace. + Description *string `type:"string"` + + // The name that you want to assign to this namespace. + // + // Name is a required field + Name *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateHttpNamespaceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateHttpNamespaceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateHttpNamespaceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateHttpNamespaceInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCreatorRequestId sets the CreatorRequestId field's value. +func (s *CreateHttpNamespaceInput) SetCreatorRequestId(v string) *CreateHttpNamespaceInput { + s.CreatorRequestId = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *CreateHttpNamespaceInput) SetDescription(v string) *CreateHttpNamespaceInput { + s.Description = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateHttpNamespaceInput) SetName(v string) *CreateHttpNamespaceInput { + s.Name = &v + return s +} + +type CreateHttpNamespaceOutput struct { + _ struct{} `type:"structure"` + + // A value that you can use to determine whether the request completed successfully. + // To get the status of the operation, see GetOperation. + OperationId *string `type:"string"` +} + +// String returns the string representation +func (s CreateHttpNamespaceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateHttpNamespaceOutput) GoString() string { + return s.String() +} + +// SetOperationId sets the OperationId field's value. +func (s *CreateHttpNamespaceOutput) SetOperationId(v string) *CreateHttpNamespaceOutput { + s.OperationId = &v + return s +} + type CreatePrivateDnsNamespaceInput struct { _ struct{} `type:"structure"` @@ -1941,9 +2254,9 @@ type CreatePrivateDnsNamespaceInput struct { // A description for the namespace. Description *string `type:"string"` - // The name that you want to assign to this namespace. When you create a namespace, - // Amazon Route 53 automatically creates a hosted zone that has the same name - // as the namespace. + // The name that you want to assign to this namespace. When you create a private + // DNS namespace, AWS Cloud Map automatically creates an Amazon Route 53 private + // hosted zone that has the same name as the namespace. // // Name is a required field Name *string `type:"string" required:"true"` @@ -2121,26 +2434,36 @@ type CreateServiceInput struct { // A description for the service. Description *string `type:"string"` - // A complex type that contains information about the records that you want - // Route 53 to create when you register an instance. - // - // DnsConfig is a required field - DnsConfig *DnsConfig `type:"structure" required:"true"` + // A complex type that contains information about the Amazon Route 53 records + // that you want AWS Cloud Map to create when you register an instance. + DnsConfig *DnsConfig `type:"structure"` // Public DNS namespaces only. A complex type that contains settings for an - // optional health check. If you specify settings for a health check, Route - // 53 associates the health check with all the records that you specify in DnsConfig. + // optional Route 53 health check. If you specify settings for a health check, + // AWS Cloud Map associates the health check with all the Route 53 DNS records + // that you specify in DnsConfig. + // + // If you specify a health check configuration, you can specify either HealthCheckCustomConfig + // or HealthCheckConfig but not both. // - // For information about the charges for health checks, see Route 53 Pricing - // (http://aws.amazon.com/route53/pricing). + // For information about the charges for health checks, see AWS Cloud Map Pricing + // (http://aws.amazon.com/cloud-map/pricing/). HealthCheckConfig *HealthCheckConfig `type:"structure"` + // A complex type that contains information about an optional custom health + // check. + // + // If you specify a health check configuration, you can specify either HealthCheckCustomConfig + // or HealthCheckConfig but not both. HealthCheckCustomConfig *HealthCheckCustomConfig `type:"structure"` // The name that you want to assign to the service. // // Name is a required field Name *string `type:"string" required:"true"` + + // The ID of the namespace that you want to use to create the service. + NamespaceId *string `type:"string"` } // String returns the string representation @@ -2156,9 +2479,6 @@ func (s CreateServiceInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateServiceInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateServiceInput"} - if s.DnsConfig == nil { - invalidParams.Add(request.NewErrParamRequired("DnsConfig")) - } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } @@ -2220,6 +2540,12 @@ func (s *CreateServiceInput) SetName(v string) *CreateServiceInput { return s } +// SetNamespaceId sets the NamespaceId field's value. +func (s *CreateServiceInput) SetNamespaceId(v string) *CreateServiceInput { + s.NamespaceId = &v + return s +} + type CreateServiceOutput struct { _ struct{} `type:"structure"` @@ -2433,24 +2759,135 @@ func (s *DeregisterInstanceOutput) SetOperationId(v string) *DeregisterInstanceO return s } -// A complex type that contains information about the records that you want -// Amazon Route 53 to create when you register an instance. +type DiscoverInstancesInput struct { + _ struct{} `type:"structure"` + + // The health status of the instances that you want to discover. + HealthStatus *string `type:"string" enum:"HealthStatusFilter"` + + // The maximum number of instances that you want Cloud Map to return in the + // response to a DiscoverInstances request. If you don't specify a value for + // MaxResults, Cloud Map returns up to 100 instances. + MaxResults *int64 `min:"1" type:"integer"` + + // The name of the namespace that you specified when you registered the instance. + // + // NamespaceName is a required field + NamespaceName *string `type:"string" required:"true"` + + // A string map that contains attributes with values that you can use to filter + // instances by any custom attribute that you specified when you registered + // the instance. Only instances that match all the specified key/value pairs + // will be returned. + QueryParameters map[string]*string `type:"map"` + + // The name of the service that you specified when you registered the instance. + // + // ServiceName is a required field + ServiceName *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DiscoverInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DiscoverInstancesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DiscoverInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DiscoverInstancesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NamespaceName == nil { + invalidParams.Add(request.NewErrParamRequired("NamespaceName")) + } + if s.ServiceName == nil { + invalidParams.Add(request.NewErrParamRequired("ServiceName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetHealthStatus sets the HealthStatus field's value. +func (s *DiscoverInstancesInput) SetHealthStatus(v string) *DiscoverInstancesInput { + s.HealthStatus = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DiscoverInstancesInput) SetMaxResults(v int64) *DiscoverInstancesInput { + s.MaxResults = &v + return s +} + +// SetNamespaceName sets the NamespaceName field's value. +func (s *DiscoverInstancesInput) SetNamespaceName(v string) *DiscoverInstancesInput { + s.NamespaceName = &v + return s +} + +// SetQueryParameters sets the QueryParameters field's value. +func (s *DiscoverInstancesInput) SetQueryParameters(v map[string]*string) *DiscoverInstancesInput { + s.QueryParameters = v + return s +} + +// SetServiceName sets the ServiceName field's value. +func (s *DiscoverInstancesInput) SetServiceName(v string) *DiscoverInstancesInput { + s.ServiceName = &v + return s +} + +type DiscoverInstancesOutput struct { + _ struct{} `type:"structure"` + + // A complex type that contains one HttpInstanceSummary for each registered + // instance. + Instances []*HttpInstanceSummary `type:"list"` +} + +// String returns the string representation +func (s DiscoverInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DiscoverInstancesOutput) GoString() string { + return s.String() +} + +// SetInstances sets the Instances field's value. +func (s *DiscoverInstancesOutput) SetInstances(v []*HttpInstanceSummary) *DiscoverInstancesOutput { + s.Instances = v + return s +} + +// A complex type that contains information about the Amazon Route 53 DNS records +// that you want AWS Cloud Map to create when you register an instance. type DnsConfig struct { _ struct{} `type:"structure"` - // An array that contains one DnsRecord object for each record that you want - // Route 53 to create when you register an instance. + // An array that contains one DnsRecord object for each Route 53 DNS record + // that you want AWS Cloud Map to create when you register an instance. // // DnsRecords is a required field DnsRecords []*DnsRecord `type:"list" required:"true"` // The ID of the namespace to use for DNS configuration. // - // NamespaceId is a required field - NamespaceId *string `type:"string" required:"true"` + // Deprecated: Top level attribute in request should be used to reference namespace-id + NamespaceId *string `deprecated:"true" type:"string"` - // The routing policy that you want to apply to all records that Route 53 creates - // when you register an instance and specify this service. + // The routing policy that you want to apply to all Route 53 DNS records that + // AWS Cloud Map creates when you register an instance and specify this service. // // If you want to use this service to register instances that create alias records, // specify WEIGHTED for the routing policy. @@ -2514,9 +2951,6 @@ func (s *DnsConfig) Validate() error { if s.DnsRecords == nil { invalidParams.Add(request.NewErrParamRequired("DnsRecords")) } - if s.NamespaceId == nil { - invalidParams.Add(request.NewErrParamRequired("NamespaceId")) - } if s.DnsRecords != nil { for i, v := range s.DnsRecords { if v == nil { @@ -2552,13 +2986,13 @@ func (s *DnsConfig) SetRoutingPolicy(v string) *DnsConfig { return s } -// A complex type that contains information about changes to the records that -// Route 53 creates when you register an instance. +// A complex type that contains information about changes to the Route 53 DNS +// records that AWS Cloud Map creates when you register an instance. type DnsConfigChange struct { _ struct{} `type:"structure"` - // An array that contains one DnsRecord object for each record that you want - // Route 53 to create when you register an instance. + // An array that contains one DnsRecord object for each Route 53 record that + // you want AWS Cloud Map to create when you register an instance. // // DnsRecords is a required field DnsRecords []*DnsRecord `type:"list" required:"true"` @@ -2603,12 +3037,13 @@ func (s *DnsConfigChange) SetDnsRecords(v []*DnsRecord) *DnsConfigChange { return s } -// A complex type that contains the ID for the hosted zone that Route 53 creates -// when you create a namespace. +// A complex type that contains the ID for the Route 53 hosted zone that AWS +// Cloud Map creates when you create a namespace. type DnsProperties struct { _ struct{} `type:"structure"` - // The ID for the hosted zone that Route 53 creates when you create a namespace. + // The ID for the Route 53 hosted zone that AWS Cloud Map creates when you create + // a namespace. HostedZoneId *string `type:"string"` } @@ -2628,8 +3063,8 @@ func (s *DnsProperties) SetHostedZoneId(v string) *DnsProperties { return s } -// A complex type that contains information about the records that you want -// Route 53 to create when you register an instance. +// A complex type that contains information about the Route 53 DNS records that +// you want AWS Cloud Map to create when you register an instance. type DnsRecord struct { _ struct{} `type:"structure"` @@ -2654,11 +3089,11 @@ type DnsRecord struct { // one A, one AAAA, and one SRV record. You can specify them in any combination. // // * CNAME records: If you specify CNAME for Type, you can't define any other - // records. This is a limitation of DNS—you can't create a CNAME record and - // any other type of record that has the same name as a CNAME record. + // records. This is a limitation of DNS: you can't create a CNAME record + // and any other type of record that has the same name as a CNAME record. // - // * Alias records: If you want Route 53 to create an alias record when you - // register an instance, specify A or AAAA for Type. + // * Alias records: If you want AWS Cloud Map to create a Route 53 alias + // record when you register an instance, specify A or AAAA for Type. // // * All records: You specify settings other than TTL and Type when you register // an instance. @@ -2716,9 +3151,9 @@ type DnsRecord struct { // test.backend.example.com // // If you specify settings for an SRV record and if you specify values for AWS_INSTANCE_IPV4, - // AWS_INSTANCE_IPV6, or both in the RegisterInstance request, Route 53 automatically - // creates A and/or AAAA records that have the same name as the value of service-hostname - // in the SRV record. You can ignore these records. + // AWS_INSTANCE_IPV6, or both in the RegisterInstance request, AWS Cloud Map + // automatically creates A and/or AAAA records that have the same name as the + // value of service-hostname in the SRV record. You can ignore these records. // // Type is a required field Type *string `type:"string" required:"true" enum:"RecordType"` @@ -2843,16 +3278,16 @@ type GetInstancesHealthStatusInput struct { // An array that contains the IDs of all the instances that you want to get // the health status for. // - // If you omit Instances, Amazon Route 53 returns the health status for all - // the instances that are associated with the specified service. + // If you omit Instances, AWS Cloud Map returns the health status for all the + // instances that are associated with the specified service. // // To get the IDs for the instances that you've registered by using a specified // service, submit a ListInstances request. Instances []*string `min:"1" type:"list"` - // The maximum number of instances that you want Route 53 to return in the response - // to a GetInstancesHealthStatus request. If you don't specify a value for MaxResults, - // Route 53 returns up to 100 instances. + // The maximum number of instances that you want AWS Cloud Map to return in + // the response to a GetInstancesHealthStatus request. If you don't specify + // a value for MaxResults, AWS Cloud Map returns up to 100 instances. MaxResults *int64 `min:"1" type:"integer"` // For the first GetInstancesHealthStatus request, omit this value. @@ -3140,16 +3575,24 @@ func (s *GetServiceOutput) SetService(v *Service) *GetServiceOutput { } // Public DNS namespaces only. A complex type that contains settings for an -// optional health check. If you specify settings for a health check, Amazon -// Route 53 associates the health check with all the records that you specify -// in DnsConfig. +// optional health check. If you specify settings for a health check, AWS Cloud +// Map associates the health check with the records that you specify in DnsConfig. +// +// If you specify a health check configuration, you can specify either HealthCheckCustomConfig +// or HealthCheckConfig but not both. +// +// Health checks are basic Route 53 health checks that monitor an AWS endpoint. +// For information about pricing for health checks, see Amazon Route 53 Pricing +// (http://aws.amazon.com/route53/pricing/). +// +// Note the following about configuring health checks. // // A and AAAA records // -// If DnsConfig includes configurations for both A and AAAA records, Route 53 -// creates a health check that uses the IPv4 address to check the health of -// the resource. If the endpoint that is specified by the IPv4 address is unhealthy, -// Route 53 considers both the A and AAAA records to be unhealthy. +// If DnsConfig includes configurations for both A and AAAA records, AWS Cloud +// Map creates a health check that uses the IPv4 address to check the health +// of the resource. If the endpoint that is specified by the IPv4 address is +// unhealthy, Route 53 considers both the A and AAAA records to be unhealthy. // // CNAME records // @@ -3159,14 +3602,11 @@ func (s *GetServiceOutput) SetService(v *Service) *GetServiceOutput { // // Request interval // -// The health check uses 30 seconds as the request interval. This is the number -// of seconds between the time that each Route 53 health checker gets a response -// from your endpoint and the time that it sends the next health check request. -// A health checker in each data center around the world sends your endpoint -// a health check request every 30 seconds. On average, your endpoint receives -// a health check request about every two seconds. Health checkers in different -// data centers don't coordinate with one another, so you'll sometimes see several -// requests per second followed by a few seconds with no health checks at all. +// A Route 53 health checker in each health-checking region sends a health check +// request to an endpoint every 30 seconds. On average, your endpoint receives +// a health check request about every two seconds. However, health checkers +// don't coordinate with one another, so you'll sometimes see several requests +// per second followed by a few seconds with no health checks at all. // // Health checking regions // @@ -3176,7 +3616,7 @@ func (s *GetServiceOutput) SetService(v *Service) *GetServiceOutput { // Alias records // // When you register an instance, if you include the AWS_ALIAS_DNS_NAME attribute, -// Route 53 creates an alias record. Note the following: +// AWS Cloud Map creates a Route 53 alias record. Note the following: // // * Route 53 automatically sets EvaluateTargetHealth to true for alias records. // When EvaluateTargetHealth is true, the alias record inherits the health @@ -3187,8 +3627,11 @@ func (s *GetServiceOutput) SetService(v *Service) *GetServiceOutput { // an instance that creates an alias record, Route 53 doesn't create the // health check. // -// For information about the charges for health checks, see Route 53 Pricing -// (http://aws.amazon.com/route53/pricing). +// Charges for health checks +// +// Health checks are basic Route 53 health checks that monitor an AWS endpoint. +// For information about pricing for health checks, see Amazon Route 53 Pricing +// (http://aws.amazon.com/route53/pricing/). type HealthCheckConfig struct { _ struct{} `type:"structure"` @@ -3202,8 +3645,10 @@ type HealthCheckConfig struct { // The path that you want Route 53 to request when performing health checks. // The path can be any value for which your endpoint will return an HTTP status // code of 2xx or 3xx when the endpoint is healthy, such as the file /docs/route53-health-check.html. - // Route 53 automatically adds the DNS name for the service and a leading forward - // slash (/) character. + // Route 53 automatically adds the DNS name for the service. If you don't specify + // a value for ResourcePath, the default value is /. + // + // If you specify TCP for Type, you must not specify a value for ResourcePath. ResourcePath *string `type:"string"` // The type of health check that you want to create, which indicates how Route @@ -3226,10 +3671,14 @@ type HealthCheckConfig struct { // // * TCP: Route 53 tries to establish a TCP connection. // + // If you specify TCP for Type, don't specify a value for ResourcePath. + // // For more information, see How Route 53 Determines Whether an Endpoint Is // Healthy (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) // in the Route 53 Developer Guide. - Type *string `type:"string" enum:"HealthCheckType"` + // + // Type is a required field + Type *string `type:"string" required:"true" enum:"HealthCheckType"` } // String returns the string representation @@ -3248,6 +3697,9 @@ func (s *HealthCheckConfig) Validate() error { if s.FailureThreshold != nil && *s.FailureThreshold < 1 { invalidParams.Add(request.NewErrParamMinValue("FailureThreshold", 1)) } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } if invalidParams.Len() > 0 { return invalidParams @@ -3273,9 +3725,70 @@ func (s *HealthCheckConfig) SetType(v string) *HealthCheckConfig { return s } +// A complex type that contains information about an optional custom health +// check. A custom health check, which requires that you use a third-party health +// checker to evaluate the health of your resources, is useful in the following +// circumstances: +// +// * You can't use a health check that is defined by HealthCheckConfig because +// the resource isn't available over the internet. For example, you can use +// a custom health check when the instance is in an Amazon VPC. (To check +// the health of resources in a VPC, the health checker must also be in the +// VPC.) +// +// * You want to use a third-party health checker regardless of where your +// resources are. +// +// If you specify a health check configuration, you can specify either HealthCheckCustomConfig +// or HealthCheckConfig but not both. +// +// To change the status of a custom health check, submit an UpdateInstanceCustomHealthStatus +// request. Cloud Map doesn't monitor the status of the resource, it just keeps +// a record of the status specified in the most recent UpdateInstanceCustomHealthStatus +// request. +// +// Here's how custom health checks work: +// +// You create a service and specify a value for FailureThreshold. +// +// The failure threshold indicates the number of 30-second intervals you want +// AWS Cloud Map to wait between the time that your application sends an UpdateInstanceCustomHealthStatus +// request and the time that AWS Cloud Map stops routing internet traffic to +// the corresponding resource. +// +// You register an instance. +// +// You configure a third-party health checker to monitor the resource that is +// associated with the new instance. +// +// AWS Cloud Map doesn't check the health of the resource directly. +// +// The third-party health-checker determines that the resource is unhealthy +// and notifies your application. +// +// Your application submits an UpdateInstanceCustomHealthStatus request. +// +// AWS Cloud Map waits for (FailureThreshold x 30) seconds. +// +// If another UpdateInstanceCustomHealthStatus request doesn't arrive during +// that time to change the status back to healthy, AWS Cloud Map stops routing +// traffic to the resource. +// +// Note the following about configuring custom health checks. type HealthCheckCustomConfig struct { _ struct{} `type:"structure"` + // The number of 30-second intervals that you want Cloud Map to wait after receiving + // an UpdateInstanceCustomHealthStatus request before it changes the health + // status of a service instance. For example, suppose you specify a value of + // 2 for FailureTheshold, and then your application sends an UpdateInstanceCustomHealthStatus + // request. Cloud Map waits for approximately 60 seconds (2 x 30) before changing + // the status of the service instance based on that request. + // + // Sending a second or subsequent UpdateInstanceCustomHealthStatus request with + // the same value before FailureThreshold x 30 seconds has passed doesn't accelerate + // the change. Cloud Map still waits FailureThreshold x 30 seconds after the + // first request to make the change. FailureThreshold *int64 `min:"1" type:"integer"` } @@ -3308,8 +3821,96 @@ func (s *HealthCheckCustomConfig) SetFailureThreshold(v int64) *HealthCheckCusto return s } -// A complex type that contains information about an instance that Amazon Route -// 53 creates when you submit a RegisterInstance request. +// In a response to a DiscoverInstance request, HttpInstanceSummary contains +// information about one instance that matches the values that you specified +// in the request. +type HttpInstanceSummary struct { + _ struct{} `type:"structure"` + + // If you included any attributes when you registered the instance, the values + // of those attributes. + Attributes map[string]*string `type:"map"` + + // If you configured health checking in the service, the current health status + // of the service instance. + HealthStatus *string `type:"string" enum:"HealthStatus"` + + // The ID of an instance that matches the values that you specified in the request. + InstanceId *string `type:"string"` + + // The name of the namespace that you specified when you registered the instance. + NamespaceName *string `type:"string"` + + // The name of the service that you specified when you registered the instance. + ServiceName *string `type:"string"` +} + +// String returns the string representation +func (s HttpInstanceSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HttpInstanceSummary) GoString() string { + return s.String() +} + +// SetAttributes sets the Attributes field's value. +func (s *HttpInstanceSummary) SetAttributes(v map[string]*string) *HttpInstanceSummary { + s.Attributes = v + return s +} + +// SetHealthStatus sets the HealthStatus field's value. +func (s *HttpInstanceSummary) SetHealthStatus(v string) *HttpInstanceSummary { + s.HealthStatus = &v + return s +} + +// SetInstanceId sets the InstanceId field's value. +func (s *HttpInstanceSummary) SetInstanceId(v string) *HttpInstanceSummary { + s.InstanceId = &v + return s +} + +// SetNamespaceName sets the NamespaceName field's value. +func (s *HttpInstanceSummary) SetNamespaceName(v string) *HttpInstanceSummary { + s.NamespaceName = &v + return s +} + +// SetServiceName sets the ServiceName field's value. +func (s *HttpInstanceSummary) SetServiceName(v string) *HttpInstanceSummary { + s.ServiceName = &v + return s +} + +// A complex type that contains the name of an HTTP namespace. +type HttpProperties struct { + _ struct{} `type:"structure"` + + // The name of an HTTP namespace. + HttpName *string `type:"string"` +} + +// String returns the string representation +func (s HttpProperties) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HttpProperties) GoString() string { + return s.String() +} + +// SetHttpName sets the HttpName field's value. +func (s *HttpProperties) SetHttpName(v string) *HttpProperties { + s.HttpName = &v + return s +} + +// A complex type that contains information about an instance that AWS Cloud +// Map creates when you submit a RegisterInstance request. type Instance struct { _ struct{} `type:"structure"` @@ -3325,10 +3926,10 @@ type Instance struct { // // AWS_ALIAS_DNS_NAME // - // If you want Route 53 to create an alias record that routes traffic to an - // Elastic Load Balancing load balancer, specify the DNS name that is associated - // with the load balancer. For information about how to get the DNS name, see - // "DNSName" in the topic AliasTarget (http://docs.aws.amazon.com/http:/docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html). + // If you want AWS Cloud Map to create a Route 53 alias record that routes traffic + // to an Elastic Load Balancing load balancer, specify the DNS name that is + // associated with the load balancer. For information about how to get the DNS + // name, see "DNSName" in the topic AliasTarget (http://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html). // // Note the following: // @@ -3339,7 +3940,7 @@ type Instance struct { // must be WEIGHTED. // // * If the service that is specified by ServiceId includes HealthCheckConfig - // settings, Route 53 will create the health check, but it won't associate + // settings, AWS Cloud Map will create the health check, but it won't associate // the health check with the alias record. // // * Auto naming currently doesn't support creating alias records that route @@ -3398,9 +3999,9 @@ type Instance struct { // * To register a new instance, you must specify a value that is unique // among instances that you register by using the same service. // - // * If you specify an existing InstanceId and ServiceId, Route 53 updates - // the existing records. If there's also an existing health check, Route - // 53 deletes the old health check and creates a new one. + // * If you specify an existing InstanceId and ServiceId, AWS Cloud Map updates + // the existing DNS records. If there's also an existing health check, AWS + // Cloud Map deletes the old health check and creates a new one. // // The health check isn't deleted immediately, so it will still appear for a // while if you submit a ListHealthChecks request, for example. @@ -3497,9 +4098,9 @@ func (s *InstanceSummary) SetId(v string) *InstanceSummary { type ListInstancesInput struct { _ struct{} `type:"structure"` - // The maximum number of instances that you want Amazon Route 53 to return in + // The maximum number of instances that you want AWS Cloud Map to return in // the response to a ListInstances request. If you don't specify a value for - // MaxResults, Route 53 returns up to 100 instances. + // MaxResults, AWS Cloud Map returns up to 100 instances. MaxResults *int64 `min:"1" type:"integer"` // For the first ListInstances request, omit this value. @@ -3604,9 +4205,9 @@ type ListNamespacesInput struct { // be returned by ListNamespaces. Filters []*NamespaceFilter `type:"list"` - // The maximum number of namespaces that you want Amazon Route 53 to return - // in the response to a ListNamespaces request. If you don't specify a value - // for MaxResults, Route 53 returns up to 100 namespaces. + // The maximum number of namespaces that you want AWS Cloud Map to return in + // the response to a ListNamespaces request. If you don't specify a value for + // MaxResults, AWS Cloud Map returns up to 100 namespaces. MaxResults *int64 `min:"1" type:"integer"` // For the first ListNamespaces request, omit this value. @@ -3615,10 +4216,10 @@ type ListNamespacesInput struct { // to get the next group of results. Specify the value of NextToken from the // previous response in the next request. // - // Route 53 gets MaxResults namespaces and then filters them based on the specified - // criteria. It's possible that no namespaces in the first MaxResults namespaces - // matched the specified criteria but that subsequent groups of MaxResults namespaces - // do contain namespaces that match the criteria. + // AWS Cloud Map gets MaxResults namespaces and then filters them based on the + // specified criteria. It's possible that no namespaces in the first MaxResults + // namespaces matched the specified criteria but that subsequent groups of MaxResults + // namespaces do contain namespaces that match the criteria. NextToken *string `type:"string"` } @@ -3684,10 +4285,10 @@ type ListNamespacesOutput struct { // to get the next group of results. Specify the value of NextToken from the // previous response in the next request. // - // Route 53 gets MaxResults namespaces and then filters them based on the specified - // criteria. It's possible that no namespaces in the first MaxResults namespaces - // matched the specified criteria but that subsequent groups of MaxResults namespaces - // do contain namespaces that match the criteria. + // AWS Cloud Map gets MaxResults namespaces and then filters them based on the + // specified criteria. It's possible that no namespaces in the first MaxResults + // namespaces matched the specified criteria but that subsequent groups of MaxResults + // namespaces do contain namespaces that match the criteria. NextToken *string `type:"string"` } @@ -3724,9 +4325,9 @@ type ListOperationsInput struct { // to be returned by ListOperations. Filters []*OperationFilter `type:"list"` - // The maximum number of items that you want Amazon Route 53 to return in the + // The maximum number of items that you want AWS Cloud Map to return in the // response to a ListOperations request. If you don't specify a value for MaxResults, - // Route 53 returns up to 100 operations. + // AWS Cloud Map returns up to 100 operations. MaxResults *int64 `min:"1" type:"integer"` // For the first ListOperations request, omit this value. @@ -3735,10 +4336,10 @@ type ListOperationsInput struct { // to get the next group of results. Specify the value of NextToken from the // previous response in the next request. // - // Route 53 gets MaxResults operations and then filters them based on the specified - // criteria. It's possible that no operations in the first MaxResults operations - // matched the specified criteria but that subsequent groups of MaxResults operations - // do contain operations that match the criteria. + // AWS Cloud Map gets MaxResults operations and then filters them based on the + // specified criteria. It's possible that no operations in the first MaxResults + // operations matched the specified criteria but that subsequent groups of MaxResults + // operations do contain operations that match the criteria. NextToken *string `type:"string"` } @@ -3800,10 +4401,10 @@ type ListOperationsOutput struct { // to get the next group of results. Specify the value of NextToken from the // previous response in the next request. // - // Route 53 gets MaxResults operations and then filters them based on the specified - // criteria. It's possible that no operations in the first MaxResults operations - // matched the specified criteria but that subsequent groups of MaxResults operations - // do contain operations that match the criteria. + // AWS Cloud Map gets MaxResults operations and then filters them based on the + // specified criteria. It's possible that no operations in the first MaxResults + // operations matched the specified criteria but that subsequent groups of MaxResults + // operations do contain operations that match the criteria. NextToken *string `type:"string"` // Summary information about the operations that match the specified criteria. @@ -3842,9 +4443,9 @@ type ListServicesInput struct { // to be returned by ListServices. Filters []*ServiceFilter `type:"list"` - // The maximum number of services that you want Amazon Route 53 to return in - // the response to a ListServices request. If you don't specify a value for - // MaxResults, Route 53 returns up to 100 services. + // The maximum number of services that you want AWS Cloud Map to return in the + // response to a ListServices request. If you don't specify a value for MaxResults, + // AWS Cloud Map returns up to 100 services. MaxResults *int64 `min:"1" type:"integer"` // For the first ListServices request, omit this value. @@ -3853,10 +4454,10 @@ type ListServicesInput struct { // get the next group of results. Specify the value of NextToken from the previous // response in the next request. // - // Route 53 gets MaxResults services and then filters them based on the specified - // criteria. It's possible that no services in the first MaxResults services - // matched the specified criteria but that subsequent groups of MaxResults services - // do contain services that match the criteria. + // AWS Cloud Map gets MaxResults services and then filters them based on the + // specified criteria. It's possible that no services in the first MaxResults + // services matched the specified criteria but that subsequent groups of MaxResults + // services do contain services that match the criteria. NextToken *string `type:"string"` } @@ -3918,10 +4519,10 @@ type ListServicesOutput struct { // get the next group of results. Specify the value of NextToken from the previous // response in the next request. // - // Route 53 gets MaxResults services and then filters them based on the specified - // criteria. It's possible that no services in the first MaxResults services - // matched the specified criteria but that subsequent groups of MaxResults services - // do contain services that match the criteria. + // AWS Cloud Map gets MaxResults services and then filters them based on the + // specified criteria. It's possible that no services in the first MaxResults + // services matched the specified criteria but that subsequent groups of MaxResults + // services do contain services that match the criteria. NextToken *string `type:"string"` // An array that contains one ServiceSummary object for each service that matches @@ -3955,8 +4556,8 @@ func (s *ListServicesOutput) SetServices(v []*ServiceSummary) *ListServicesOutpu type Namespace struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) that Route 53 assigns to the namespace when - // you create it. + // The Amazon Resource Name (ARN) that AWS Cloud Map assigns to the namespace + // when you create it. Arn *string `type:"string"` // The date that the namespace was created, in Unix date/time format and Coordinated @@ -4134,9 +4735,12 @@ func (s *NamespaceFilter) SetValues(v []*string) *NamespaceFilter { type NamespaceProperties struct { _ struct{} `type:"structure"` - // A complex type that contains the ID for the hosted zone that Route 53 creates - // when you create a namespace. + // A complex type that contains the ID for the Route 53 hosted zone that AWS + // Cloud Map creates when you create a namespace. DnsProperties *DnsProperties `type:"structure"` + + // A complex type that contains the name of an HTTP namespace. + HttpProperties *HttpProperties `type:"structure"` } // String returns the string representation @@ -4155,21 +4759,40 @@ func (s *NamespaceProperties) SetDnsProperties(v *DnsProperties) *NamespacePrope return s } +// SetHttpProperties sets the HttpProperties field's value. +func (s *NamespaceProperties) SetHttpProperties(v *HttpProperties) *NamespaceProperties { + s.HttpProperties = v + return s +} + // A complex type that contains information about a namespace. type NamespaceSummary struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) that Route 53 assigns to the namespace when - // you create it. + // The Amazon Resource Name (ARN) that AWS Cloud Map assigns to the namespace + // when you create it. Arn *string `type:"string"` + // The date and time that the namespace was created. + CreateDate *time.Time `type:"timestamp"` + + // A description for the namespace. + Description *string `type:"string"` + // The ID of the namespace. Id *string `type:"string"` - // The name of the namespace. When you create a namespace, Route 53 automatically - // creates a hosted zone that has the same name as the namespace. + // The name of the namespace. When you create a namespace, AWS Cloud Map automatically + // creates a Route 53 hosted zone that has the same name as the namespace. Name *string `type:"string"` + // A complex type that contains information that is specific to the namespace + // type. + Properties *NamespaceProperties `type:"structure"` + + // The number of services that were created using the namespace. + ServiceCount *int64 `type:"integer"` + // The type of the namespace, either public or private. Type *string `type:"string" enum:"NamespaceType"` } @@ -4190,6 +4813,18 @@ func (s *NamespaceSummary) SetArn(v string) *NamespaceSummary { return s } +// SetCreateDate sets the CreateDate field's value. +func (s *NamespaceSummary) SetCreateDate(v time.Time) *NamespaceSummary { + s.CreateDate = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *NamespaceSummary) SetDescription(v string) *NamespaceSummary { + s.Description = &v + return s +} + // SetId sets the Id field's value. func (s *NamespaceSummary) SetId(v string) *NamespaceSummary { s.Id = &v @@ -4202,6 +4837,18 @@ func (s *NamespaceSummary) SetName(v string) *NamespaceSummary { return s } +// SetProperties sets the Properties field's value. +func (s *NamespaceSummary) SetProperties(v *NamespaceProperties) *NamespaceSummary { + s.Properties = v + return s +} + +// SetServiceCount sets the ServiceCount field's value. +func (s *NamespaceSummary) SetServiceCount(v int64) *NamespaceSummary { + s.ServiceCount = &v + return s +} + // SetType sets the Type field's value. func (s *NamespaceSummary) SetType(v string) *NamespaceSummary { s.Type = &v @@ -4246,7 +4893,7 @@ type Operation struct { // * SUBMITTED: This is the initial state immediately after you submit a // request. // - // * PENDING: Route 53 is performing the operation. + // * PENDING: AWS Cloud Map is performing the operation. // // * SUCCESS: The operation succeeded. // @@ -4444,7 +5091,7 @@ type OperationSummary struct { // * SUBMITTED: This is the initial state immediately after you submit a // request. // - // * PENDING: Route 53 is performing the operation. + // * PENDING: AWS Cloud Map is performing the operation. // // * SUCCESS: The operation succeeded. // @@ -4489,10 +5136,10 @@ type RegisterInstanceInput struct { // // AWS_ALIAS_DNS_NAME // - // If you want Route 53 to create an alias record that routes traffic to an - // Elastic Load Balancing load balancer, specify the DNS name that is associated - // with the load balancer. For information about how to get the DNS name, see - // "DNSName" in the topic AliasTarget (http://docs.aws.amazon.com/http:/docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html). + // If you want AWS Cloud Map to create an Amazon Route 53 alias record that + // routes traffic to an Elastic Load Balancing load balancer, specify the DNS + // name that is associated with the load balancer. For information about how + // to get the DNS name, see "DNSName" in the topic AliasTarget (http://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html)in the Route 53 API Reference. // // Note the following: // @@ -4503,8 +5150,8 @@ type RegisterInstanceInput struct { // must be WEIGHTED. // // * If the service that is specified by ServiceId includes HealthCheckConfig - // settings, Route 53 will create the health check, but it won't associate - // the health check with the alias record. + // settings, AWS Cloud Map will create the Route 53 health check, but it + // won't associate the health check with the alias record. // // * Auto naming currently doesn't support creating alias records that route // traffic to AWS resources other than ELB load balancers. @@ -4512,6 +5159,10 @@ type RegisterInstanceInput struct { // * If you specify a value for AWS_ALIAS_DNS_NAME, don't specify values // for any of the AWS_INSTANCE attributes. // + // AWS_INIT_HEALTH_STATUS + // + // If the service configuration includes HealthCheckCustomConfig, you can optionally use AWS_INIT_HEALTH_STATUSto specify the initial status of the custom health check, HEALTHYor UNHEALTHY. If you don't specify a value for AWS_INIT_HEALTH_STATUS, the initial status is HEALTHY. + // // AWS_INSTANCE_CNAME // // If the service configuration includes a CNAME record, the domain name that @@ -4540,7 +5191,12 @@ type RegisterInstanceInput struct { // If the service includes an SRV record, the value that you want Route 53 to // return for the port. // - // If the service includes HealthCheckConfig + // If the service includes HealthCheckConfig, the port on the endpoint that you want Route 53 to send requests to. + // + // This value is required if you specified settings for an SRV record when you + // created the service. + // + // Custom attributes // // Attributes is a required field Attributes map[string]*string `type:"map" required:"true"` @@ -4564,9 +5220,9 @@ type RegisterInstanceInput struct { // * To register a new instance, you must specify a value that is unique // among instances that you register by using the same service. // - // * If you specify an existing InstanceId and ServiceId, Route 53 updates - // the existing records. If there's also an existing health check, Route - // 53 deletes the old health check and creates a new one. + // * If you specify an existing InstanceId and ServiceId, AWS Cloud Map updates + // the existing DNS records, if any. If there's also an existing health check, + // AWS Cloud Map deletes the old health check and creates a new one. // // The health check isn't deleted immediately, so it will still appear for a // while if you submit a ListHealthChecks request, for example. @@ -4574,8 +5230,7 @@ type RegisterInstanceInput struct { // InstanceId is a required field InstanceId *string `type:"string" required:"true"` - // The ID of the service that you want to use for settings for the records and - // health check that Route 53 will create. + // The ID of the service that you want to use for settings for the instance. // // ServiceId is a required field ServiceId *string `type:"string" required:"true"` @@ -4662,8 +5317,8 @@ func (s *RegisterInstanceOutput) SetOperationId(v string) *RegisterInstanceOutpu type Service struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) that Route 53 assigns to the service when - // you create it. + // The Amazon Resource Name (ARN) that AWS Cloud Map assigns to the service + // when you create it. Arn *string `type:"string"` // The date and time that the service was created, in Unix format and Coordinated @@ -4680,21 +5335,26 @@ type Service struct { // The description of the service. Description *string `type:"string"` - // A complex type that contains information about the records that you want - // Route 53 to create when you register an instance. + // A complex type that contains information about the Route 53 DNS records that + // you want AWS Cloud Map to create when you register an instance. DnsConfig *DnsConfig `type:"structure"` // Public DNS namespaces only. A complex type that contains settings for an - // optional health check. If you specify settings for a health check, Route - // 53 associates the health check with all the records that you specify in DnsConfig. + // optional health check. If you specify settings for a health check, AWS Cloud + // Map associates the health check with the records that you specify in DnsConfig. // - // For information about the charges for health checks, see Route 53 Pricing - // (http://aws.amazon.com/route53/pricing). + // For information about the charges for health checks, see Amazon Route 53 + // Pricing (http://aws.amazon.com/route53/pricing/). HealthCheckConfig *HealthCheckConfig `type:"structure"` + // A complex type that contains information about an optional custom health + // check. + // + // If you specify a health check configuration, you can specify either HealthCheckCustomConfig + // or HealthCheckConfig but not both. HealthCheckCustomConfig *HealthCheckCustomConfig `type:"structure"` - // The ID that Route 53 assigned to the service when you created it. + // The ID that AWS Cloud Map assigned to the service when you created it. Id *string `type:"string"` // The number of instances that are currently associated with the service. Instances @@ -4704,6 +5364,9 @@ type Service struct { // The name of the service. Name *string `type:"string"` + + // The ID of the namespace that was used to create the service. + NamespaceId *string `type:"string"` } // String returns the string representation @@ -4776,6 +5439,12 @@ func (s *Service) SetName(v string) *Service { return s } +// SetNamespaceId sets the NamespaceId field's value. +func (s *Service) SetNamespaceId(v string) *Service { + s.NamespaceId = &v + return s +} + // A complex type that contains changes to an existing service. type ServiceChange struct { _ struct{} `type:"structure"` @@ -4783,23 +5452,31 @@ type ServiceChange struct { // A description for the service. Description *string `type:"string"` - // A complex type that contains information about the records that you want - // Route 53 to create when you register an instance. + // A complex type that contains information about the Route 53 DNS records that + // you want AWS Cloud Map to create when you register an instance. // // DnsConfig is a required field DnsConfig *DnsConfigChange `type:"structure" required:"true"` // Public DNS namespaces only. A complex type that contains settings for an - // optional health check. If you specify settings for a health check, Amazon - // Route 53 associates the health check with all the records that you specify - // in DnsConfig. + // optional health check. If you specify settings for a health check, AWS Cloud + // Map associates the health check with the records that you specify in DnsConfig. + // + // If you specify a health check configuration, you can specify either HealthCheckCustomConfig + // or HealthCheckConfig but not both. + // + // Health checks are basic Route 53 health checks that monitor an AWS endpoint. + // For information about pricing for health checks, see Amazon Route 53 Pricing + // (http://aws.amazon.com/route53/pricing/). + // + // Note the following about configuring health checks. // // A and AAAA records // - // If DnsConfig includes configurations for both A and AAAA records, Route 53 - // creates a health check that uses the IPv4 address to check the health of - // the resource. If the endpoint that is specified by the IPv4 address is unhealthy, - // Route 53 considers both the A and AAAA records to be unhealthy. + // If DnsConfig includes configurations for both A and AAAA records, AWS Cloud + // Map creates a health check that uses the IPv4 address to check the health + // of the resource. If the endpoint that is specified by the IPv4 address is + // unhealthy, Route 53 considers both the A and AAAA records to be unhealthy. // // CNAME records // @@ -4809,14 +5486,11 @@ type ServiceChange struct { // // Request interval // - // The health check uses 30 seconds as the request interval. This is the number - // of seconds between the time that each Route 53 health checker gets a response - // from your endpoint and the time that it sends the next health check request. - // A health checker in each data center around the world sends your endpoint - // a health check request every 30 seconds. On average, your endpoint receives - // a health check request about every two seconds. Health checkers in different - // data centers don't coordinate with one another, so you'll sometimes see several - // requests per second followed by a few seconds with no health checks at all. + // A Route 53 health checker in each health-checking region sends a health check + // request to an endpoint every 30 seconds. On average, your endpoint receives + // a health check request about every two seconds. However, health checkers + // don't coordinate with one another, so you'll sometimes see several requests + // per second followed by a few seconds with no health checks at all. // // Health checking regions // @@ -4826,7 +5500,7 @@ type ServiceChange struct { // Alias records // // When you register an instance, if you include the AWS_ALIAS_DNS_NAME attribute, - // Route 53 creates an alias record. Note the following: + // AWS Cloud Map creates a Route 53 alias record. Note the following: // // * Route 53 automatically sets EvaluateTargetHealth to true for alias records. // When EvaluateTargetHealth is true, the alias record inherits the health @@ -4837,8 +5511,11 @@ type ServiceChange struct { // an instance that creates an alias record, Route 53 doesn't create the // health check. // - // For information about the charges for health checks, see Route 53 Pricing - // (http://aws.amazon.com/route53/pricing). + // Charges for health checks + // + // Health checks are basic Route 53 health checks that monitor an AWS endpoint. + // For information about pricing for health checks, see Amazon Route 53 Pricing + // (http://aws.amazon.com/route53/pricing/). HealthCheckConfig *HealthCheckConfig `type:"structure"` } @@ -4970,14 +5647,133 @@ func (s *ServiceFilter) SetValues(v []*string) *ServiceFilter { type ServiceSummary struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) that Route 53 assigns to the service when - // you create it. + // The Amazon Resource Name (ARN) that AWS Cloud Map assigns to the service + // when you create it. Arn *string `type:"string"` + // The date and time that the service was created. + CreateDate *time.Time `type:"timestamp"` + // The description that you specify when you create the service. Description *string `type:"string"` - // The ID that Route 53 assigned to the service when you created it. + // A complex type that contains information about the Amazon Route 53 DNS records + // that you want AWS Cloud Map to create when you register an instance. + DnsConfig *DnsConfig `type:"structure"` + + // Public DNS namespaces only. A complex type that contains settings for an + // optional health check. If you specify settings for a health check, AWS Cloud + // Map associates the health check with the records that you specify in DnsConfig. + // + // If you specify a health check configuration, you can specify either HealthCheckCustomConfig + // or HealthCheckConfig but not both. + // + // Health checks are basic Route 53 health checks that monitor an AWS endpoint. + // For information about pricing for health checks, see Amazon Route 53 Pricing + // (http://aws.amazon.com/route53/pricing/). + // + // Note the following about configuring health checks. + // + // A and AAAA records + // + // If DnsConfig includes configurations for both A and AAAA records, AWS Cloud + // Map creates a health check that uses the IPv4 address to check the health + // of the resource. If the endpoint that is specified by the IPv4 address is + // unhealthy, Route 53 considers both the A and AAAA records to be unhealthy. + // + // CNAME records + // + // You can't specify settings for HealthCheckConfig when the DNSConfig includes + // CNAME for the value of Type. If you do, the CreateService request will fail + // with an InvalidInput error. + // + // Request interval + // + // A Route 53 health checker in each health-checking region sends a health check + // request to an endpoint every 30 seconds. On average, your endpoint receives + // a health check request about every two seconds. However, health checkers + // don't coordinate with one another, so you'll sometimes see several requests + // per second followed by a few seconds with no health checks at all. + // + // Health checking regions + // + // Health checkers perform checks from all Route 53 health-checking regions. + // For a list of the current regions, see Regions (http://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-Regions). + // + // Alias records + // + // When you register an instance, if you include the AWS_ALIAS_DNS_NAME attribute, + // AWS Cloud Map creates a Route 53 alias record. Note the following: + // + // * Route 53 automatically sets EvaluateTargetHealth to true for alias records. + // When EvaluateTargetHealth is true, the alias record inherits the health + // of the referenced AWS resource. such as an ELB load balancer. For more + // information, see EvaluateTargetHealth (http://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html#Route53-Type-AliasTarget-EvaluateTargetHealth). + // + // * If you include HealthCheckConfig and then use the service to register + // an instance that creates an alias record, Route 53 doesn't create the + // health check. + // + // Charges for health checks + // + // Health checks are basic Route 53 health checks that monitor an AWS endpoint. + // For information about pricing for health checks, see Amazon Route 53 Pricing + // (http://aws.amazon.com/route53/pricing/). + HealthCheckConfig *HealthCheckConfig `type:"structure"` + + // A complex type that contains information about an optional custom health + // check. A custom health check, which requires that you use a third-party health + // checker to evaluate the health of your resources, is useful in the following + // circumstances: + // + // * You can't use a health check that is defined by HealthCheckConfig because + // the resource isn't available over the internet. For example, you can use + // a custom health check when the instance is in an Amazon VPC. (To check + // the health of resources in a VPC, the health checker must also be in the + // VPC.) + // + // * You want to use a third-party health checker regardless of where your + // resources are. + // + // If you specify a health check configuration, you can specify either HealthCheckCustomConfig + // or HealthCheckConfig but not both. + // + // To change the status of a custom health check, submit an UpdateInstanceCustomHealthStatus + // request. Cloud Map doesn't monitor the status of the resource, it just keeps + // a record of the status specified in the most recent UpdateInstanceCustomHealthStatus + // request. + // + // Here's how custom health checks work: + // + // You create a service and specify a value for FailureThreshold. + // + // The failure threshold indicates the number of 30-second intervals you want + // AWS Cloud Map to wait between the time that your application sends an UpdateInstanceCustomHealthStatus + // request and the time that AWS Cloud Map stops routing internet traffic to + // the corresponding resource. + // + // You register an instance. + // + // You configure a third-party health checker to monitor the resource that is + // associated with the new instance. + // + // AWS Cloud Map doesn't check the health of the resource directly. + // + // The third-party health-checker determines that the resource is unhealthy + // and notifies your application. + // + // Your application submits an UpdateInstanceCustomHealthStatus request. + // + // AWS Cloud Map waits for (FailureThreshold x 30) seconds. + // + // If another UpdateInstanceCustomHealthStatus request doesn't arrive during + // that time to change the status back to healthy, AWS Cloud Map stops routing + // traffic to the resource. + // + // Note the following about configuring custom health checks. + HealthCheckCustomConfig *HealthCheckCustomConfig `type:"structure"` + + // The ID that AWS Cloud Map assigned to the service when you created it. Id *string `type:"string"` // The number of instances that are currently associated with the service. Instances @@ -5005,12 +5801,36 @@ func (s *ServiceSummary) SetArn(v string) *ServiceSummary { return s } +// SetCreateDate sets the CreateDate field's value. +func (s *ServiceSummary) SetCreateDate(v time.Time) *ServiceSummary { + s.CreateDate = &v + return s +} + // SetDescription sets the Description field's value. func (s *ServiceSummary) SetDescription(v string) *ServiceSummary { s.Description = &v return s } +// SetDnsConfig sets the DnsConfig field's value. +func (s *ServiceSummary) SetDnsConfig(v *DnsConfig) *ServiceSummary { + s.DnsConfig = v + return s +} + +// SetHealthCheckConfig sets the HealthCheckConfig field's value. +func (s *ServiceSummary) SetHealthCheckConfig(v *HealthCheckConfig) *ServiceSummary { + s.HealthCheckConfig = v + return s +} + +// SetHealthCheckCustomConfig sets the HealthCheckCustomConfig field's value. +func (s *ServiceSummary) SetHealthCheckCustomConfig(v *HealthCheckCustomConfig) *ServiceSummary { + s.HealthCheckCustomConfig = v + return s +} + // SetId sets the Id field's value. func (s *ServiceSummary) SetId(v string) *ServiceSummary { s.Id = &v @@ -5032,12 +5852,19 @@ func (s *ServiceSummary) SetName(v string) *ServiceSummary { type UpdateInstanceCustomHealthStatusInput struct { _ struct{} `type:"structure"` + // The ID of the instance that you want to change the health status for. + // // InstanceId is a required field InstanceId *string `type:"string" required:"true"` + // The ID of the service that includes the configuration for the custom health + // check that you want to change the status for. + // // ServiceId is a required field ServiceId *string `type:"string" required:"true"` + // The new status of the instance, HEALTHY or UNHEALTHY. + // // Status is a required field Status *string `type:"string" required:"true" enum:"CustomHealthStatus"` } @@ -5225,6 +6052,17 @@ const ( HealthStatusUnknown = "UNKNOWN" ) +const ( + // HealthStatusFilterHealthy is a HealthStatusFilter enum value + HealthStatusFilterHealthy = "HEALTHY" + + // HealthStatusFilterUnhealthy is a HealthStatusFilter enum value + HealthStatusFilterUnhealthy = "UNHEALTHY" + + // HealthStatusFilterAll is a HealthStatusFilter enum value + HealthStatusFilterAll = "ALL" +) + const ( // NamespaceFilterNameType is a NamespaceFilterName enum value NamespaceFilterNameType = "TYPE" @@ -5236,6 +6074,9 @@ const ( // NamespaceTypeDnsPrivate is a NamespaceType enum value NamespaceTypeDnsPrivate = "DNS_PRIVATE" + + // NamespaceTypeHttp is a NamespaceType enum value + NamespaceTypeHttp = "HTTP" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/doc.go b/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/doc.go index 0358f1217d..9ada164cfc 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/doc.go @@ -1,14 +1,15 @@ // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. // Package servicediscovery provides the client and types for making API -// requests to Amazon Route 53 Auto Naming. +// requests to AWS Cloud Map. // -// Amazon Route 53 auto naming lets you configure public or private namespaces -// that your microservice applications run in. When instances of the service -// become available, you can call the auto naming API to register the instance, -// and Route 53 automatically creates up to five DNS records and an optional -// health check. Clients that submit DNS queries for the service receive an -// answer that contains up to eight healthy records. +// AWS Cloud Map lets you configure public DNS, private DNS, or HTTP namespaces +// that your microservice applications run in. When an instance of the service +// becomes available, you can call the AWS Cloud Map API to register the instance +// with AWS Cloud Map. For public or private DNS namespaces, AWS Cloud Map automatically +// creates DNS records and an optional health check. Clients that submit public +// or private DNS queries, or HTTP requests, for the service receive an answer +// that contains up to eight healthy records. // // See https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14 for more information on this service. // @@ -17,7 +18,7 @@ // // Using the Client // -// To contact Amazon Route 53 Auto Naming with the SDK use the New function to create +// To contact AWS Cloud Map 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. // @@ -27,7 +28,7 @@ // See aws.Config documentation for more information on configuring SDK clients. // https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config // -// See the Amazon Route 53 Auto Naming client ServiceDiscovery for more +// See the AWS Cloud Map client ServiceDiscovery for more // information on creating client for this service. // https://docs.aws.amazon.com/sdk-for-go/api/service/servicediscovery/#New package servicediscovery diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/errors.go b/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/errors.go index d1f9f8dcd9..0238a42ba4 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/errors.go @@ -6,6 +6,9 @@ const ( // ErrCodeCustomHealthNotFound for service response error code // "CustomHealthNotFound". + // + // The health check for the instance that is specified by ServiceId and InstanceId + // is not a custom health check. ErrCodeCustomHealthNotFound = "CustomHealthNotFound" // ErrCodeDuplicateRequest for service response error code @@ -24,8 +27,9 @@ const ( // ErrCodeInvalidInput for service response error code // "InvalidInput". // - // One or more specified values aren't valid. For example, when you're creating - // a namespace, the value of Name might not be a valid DNS name. + // One or more specified values aren't valid. For example, a required value + // might be missing, a numeric value might be outside the allowed range, or + // a string value might exceed length constraints. ErrCodeInvalidInput = "InvalidInput" // ErrCodeNamespaceAlreadyExists for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/service.go b/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/service.go index b5c177a62d..3463e12c24 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/service.go +++ b/vendor/github.com/aws/aws-sdk-go/service/servicediscovery/service.go @@ -12,7 +12,7 @@ import ( ) // ServiceDiscovery provides the API operation methods for making requests to -// Amazon Route 53 Auto Naming. See this package's package overview docs +// AWS Cloud Map. See this package's package overview docs // for details on the service. // // ServiceDiscovery methods are safe to use concurrently. It is not safe to diff --git a/vendor/github.com/aws/aws-sdk-go/service/ses/api.go b/vendor/github.com/aws/aws-sdk-go/service/ses/api.go index f93a8b7329..691f57e582 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ses/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ses/api.go @@ -18,7 +18,7 @@ const opCloneReceiptRuleSet = "CloneReceiptRuleSet" // CloneReceiptRuleSetRequest generates a "aws/request.Request" representing the // client's request for the CloneReceiptRuleSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -52,6 +52,7 @@ func (c *SES) CloneReceiptRuleSetRequest(input *CloneReceiptRuleSetInput) (req * output = &CloneReceiptRuleSetOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -111,7 +112,7 @@ const opCreateConfigurationSet = "CreateConfigurationSet" // CreateConfigurationSetRequest generates a "aws/request.Request" representing the // client's request for the CreateConfigurationSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -145,6 +146,7 @@ func (c *SES) CreateConfigurationSetRequest(input *CreateConfigurationSetInput) output = &CreateConfigurationSetOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -204,7 +206,7 @@ const opCreateConfigurationSetEventDestination = "CreateConfigurationSetEventDes // CreateConfigurationSetEventDestinationRequest generates a "aws/request.Request" representing the // client's request for the CreateConfigurationSetEventDestination operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -238,6 +240,7 @@ func (c *SES) CreateConfigurationSetEventDestinationRequest(input *CreateConfigu output = &CreateConfigurationSetEventDestinationOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -313,7 +316,7 @@ const opCreateConfigurationSetTrackingOptions = "CreateConfigurationSetTrackingO // CreateConfigurationSetTrackingOptionsRequest generates a "aws/request.Request" representing the // client's request for the CreateConfigurationSetTrackingOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -347,6 +350,7 @@ func (c *SES) CreateConfigurationSetTrackingOptionsRequest(input *CreateConfigur output = &CreateConfigurationSetTrackingOptionsOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -410,7 +414,7 @@ const opCreateCustomVerificationEmailTemplate = "CreateCustomVerificationEmailTe // CreateCustomVerificationEmailTemplateRequest generates a "aws/request.Request" representing the // client's request for the CreateCustomVerificationEmailTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -444,8 +448,7 @@ func (c *SES) CreateCustomVerificationEmailTemplateRequest(input *CreateCustomVe output = &CreateCustomVerificationEmailTemplateOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -510,7 +513,7 @@ const opCreateReceiptFilter = "CreateReceiptFilter" // CreateReceiptFilterRequest generates a "aws/request.Request" representing the // client's request for the CreateReceiptFilter operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -544,6 +547,7 @@ func (c *SES) CreateReceiptFilterRequest(input *CreateReceiptFilterInput) (req * output = &CreateReceiptFilterOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -598,7 +602,7 @@ const opCreateReceiptRule = "CreateReceiptRule" // CreateReceiptRuleRequest generates a "aws/request.Request" representing the // client's request for the CreateReceiptRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -632,6 +636,7 @@ func (c *SES) CreateReceiptRuleRequest(input *CreateReceiptRuleInput) (req *requ output = &CreateReceiptRuleOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -709,7 +714,7 @@ const opCreateReceiptRuleSet = "CreateReceiptRuleSet" // CreateReceiptRuleSetRequest generates a "aws/request.Request" representing the // client's request for the CreateReceiptRuleSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -743,6 +748,7 @@ func (c *SES) CreateReceiptRuleSetRequest(input *CreateReceiptRuleSetInput) (req output = &CreateReceiptRuleSetOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -797,7 +803,7 @@ const opCreateTemplate = "CreateTemplate" // CreateTemplateRequest generates a "aws/request.Request" representing the // client's request for the CreateTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -831,6 +837,7 @@ func (c *SES) CreateTemplateRequest(input *CreateTemplateInput) (req *request.Re output = &CreateTemplateOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -888,7 +895,7 @@ const opDeleteConfigurationSet = "DeleteConfigurationSet" // DeleteConfigurationSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteConfigurationSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -922,6 +929,7 @@ func (c *SES) DeleteConfigurationSetRequest(input *DeleteConfigurationSetInput) output = &DeleteConfigurationSetOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -971,7 +979,7 @@ const opDeleteConfigurationSetEventDestination = "DeleteConfigurationSetEventDes // DeleteConfigurationSetEventDestinationRequest generates a "aws/request.Request" representing the // client's request for the DeleteConfigurationSetEventDestination operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1005,6 +1013,7 @@ func (c *SES) DeleteConfigurationSetEventDestinationRequest(input *DeleteConfigu output = &DeleteConfigurationSetEventDestinationOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1058,7 +1067,7 @@ const opDeleteConfigurationSetTrackingOptions = "DeleteConfigurationSetTrackingO // DeleteConfigurationSetTrackingOptionsRequest generates a "aws/request.Request" representing the // client's request for the DeleteConfigurationSetTrackingOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1092,6 +1101,7 @@ func (c *SES) DeleteConfigurationSetTrackingOptionsRequest(input *DeleteConfigur output = &DeleteConfigurationSetTrackingOptionsOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1150,7 +1160,7 @@ const opDeleteCustomVerificationEmailTemplate = "DeleteCustomVerificationEmailTe // DeleteCustomVerificationEmailTemplateRequest generates a "aws/request.Request" representing the // client's request for the DeleteCustomVerificationEmailTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1184,8 +1194,7 @@ func (c *SES) DeleteCustomVerificationEmailTemplateRequest(input *DeleteCustomVe output = &DeleteCustomVerificationEmailTemplateOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1232,7 +1241,7 @@ const opDeleteIdentity = "DeleteIdentity" // DeleteIdentityRequest generates a "aws/request.Request" representing the // client's request for the DeleteIdentity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1266,6 +1275,7 @@ func (c *SES) DeleteIdentityRequest(input *DeleteIdentityInput) (req *request.Re output = &DeleteIdentityOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1309,7 +1319,7 @@ const opDeleteIdentityPolicy = "DeleteIdentityPolicy" // DeleteIdentityPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeleteIdentityPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1343,6 +1353,7 @@ func (c *SES) DeleteIdentityPolicyRequest(input *DeleteIdentityPolicyInput) (req output = &DeleteIdentityPolicyOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1394,7 +1405,7 @@ const opDeleteReceiptFilter = "DeleteReceiptFilter" // DeleteReceiptFilterRequest generates a "aws/request.Request" representing the // client's request for the DeleteReceiptFilter operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1428,6 +1439,7 @@ func (c *SES) DeleteReceiptFilterRequest(input *DeleteReceiptFilterInput) (req * output = &DeleteReceiptFilterOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1473,7 +1485,7 @@ const opDeleteReceiptRule = "DeleteReceiptRule" // DeleteReceiptRuleRequest generates a "aws/request.Request" representing the // client's request for the DeleteReceiptRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1507,6 +1519,7 @@ func (c *SES) DeleteReceiptRuleRequest(input *DeleteReceiptRuleInput) (req *requ output = &DeleteReceiptRuleOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1557,7 +1570,7 @@ const opDeleteReceiptRuleSet = "DeleteReceiptRuleSet" // DeleteReceiptRuleSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteReceiptRuleSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1591,6 +1604,7 @@ func (c *SES) DeleteReceiptRuleSetRequest(input *DeleteReceiptRuleSetInput) (req output = &DeleteReceiptRuleSetOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1643,7 +1657,7 @@ const opDeleteTemplate = "DeleteTemplate" // DeleteTemplateRequest generates a "aws/request.Request" representing the // client's request for the DeleteTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1677,6 +1691,7 @@ func (c *SES) DeleteTemplateRequest(input *DeleteTemplateInput) (req *request.Re output = &DeleteTemplateOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1719,7 +1734,7 @@ const opDeleteVerifiedEmailAddress = "DeleteVerifiedEmailAddress" // DeleteVerifiedEmailAddressRequest generates a "aws/request.Request" representing the // client's request for the DeleteVerifiedEmailAddress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1753,8 +1768,7 @@ func (c *SES) DeleteVerifiedEmailAddressRequest(input *DeleteVerifiedEmailAddres output = &DeleteVerifiedEmailAddressOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1796,7 +1810,7 @@ const opDescribeActiveReceiptRuleSet = "DescribeActiveReceiptRuleSet" // DescribeActiveReceiptRuleSetRequest generates a "aws/request.Request" representing the // client's request for the DescribeActiveReceiptRuleSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1876,7 +1890,7 @@ const opDescribeConfigurationSet = "DescribeConfigurationSet" // DescribeConfigurationSetRequest generates a "aws/request.Request" representing the // client's request for the DescribeConfigurationSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1958,7 +1972,7 @@ const opDescribeReceiptRule = "DescribeReceiptRule" // DescribeReceiptRuleRequest generates a "aws/request.Request" representing the // client's request for the DescribeReceiptRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2045,7 +2059,7 @@ const opDescribeReceiptRuleSet = "DescribeReceiptRuleSet" // DescribeReceiptRuleSetRequest generates a "aws/request.Request" representing the // client's request for the DescribeReceiptRuleSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2129,7 +2143,7 @@ const opGetAccountSendingEnabled = "GetAccountSendingEnabled" // GetAccountSendingEnabledRequest generates a "aws/request.Request" representing the // client's request for the GetAccountSendingEnabled operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2206,7 +2220,7 @@ const opGetCustomVerificationEmailTemplate = "GetCustomVerificationEmailTemplate // GetCustomVerificationEmailTemplateRequest generates a "aws/request.Request" representing the // client's request for the GetCustomVerificationEmailTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2293,7 +2307,7 @@ const opGetIdentityDkimAttributes = "GetIdentityDkimAttributes" // GetIdentityDkimAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetIdentityDkimAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2388,7 +2402,7 @@ const opGetIdentityMailFromDomainAttributes = "GetIdentityMailFromDomainAttribut // GetIdentityMailFromDomainAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetIdentityMailFromDomainAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2466,7 +2480,7 @@ const opGetIdentityNotificationAttributes = "GetIdentityNotificationAttributes" // GetIdentityNotificationAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetIdentityNotificationAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2547,7 +2561,7 @@ const opGetIdentityPolicies = "GetIdentityPolicies" // GetIdentityPoliciesRequest generates a "aws/request.Request" representing the // client's request for the GetIdentityPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2633,7 +2647,7 @@ const opGetIdentityVerificationAttributes = "GetIdentityVerificationAttributes" // GetIdentityVerificationAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetIdentityVerificationAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2728,7 +2742,7 @@ const opGetSendQuota = "GetSendQuota" // GetSendQuotaRequest generates a "aws/request.Request" representing the // client's request for the GetSendQuota operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2804,7 +2818,7 @@ const opGetSendStatistics = "GetSendStatistics" // GetSendStatisticsRequest generates a "aws/request.Request" representing the // client's request for the GetSendStatistics operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2882,7 +2896,7 @@ const opGetTemplate = "GetTemplate" // GetTemplateRequest generates a "aws/request.Request" representing the // client's request for the GetTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2965,7 +2979,7 @@ const opListConfigurationSets = "ListConfigurationSets" // ListConfigurationSetsRequest generates a "aws/request.Request" representing the // client's request for the ListConfigurationSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3049,7 +3063,7 @@ const opListCustomVerificationEmailTemplates = "ListCustomVerificationEmailTempl // ListCustomVerificationEmailTemplatesRequest generates a "aws/request.Request" representing the // client's request for the ListCustomVerificationEmailTemplates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3186,7 +3200,7 @@ const opListIdentities = "ListIdentities" // ListIdentitiesRequest generates a "aws/request.Request" representing the // client's request for the ListIdentities operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3320,7 +3334,7 @@ const opListIdentityPolicies = "ListIdentityPolicies" // ListIdentityPoliciesRequest generates a "aws/request.Request" representing the // client's request for the ListIdentityPolicies operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3405,7 +3419,7 @@ const opListReceiptFilters = "ListReceiptFilters" // ListReceiptFiltersRequest generates a "aws/request.Request" representing the // client's request for the ListReceiptFilters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3485,7 +3499,7 @@ const opListReceiptRuleSets = "ListReceiptRuleSets" // ListReceiptRuleSetsRequest generates a "aws/request.Request" representing the // client's request for the ListReceiptRuleSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3567,7 +3581,7 @@ const opListTemplates = "ListTemplates" // ListTemplatesRequest generates a "aws/request.Request" representing the // client's request for the ListTemplates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3644,7 +3658,7 @@ const opListVerifiedEmailAddresses = "ListVerifiedEmailAddresses" // ListVerifiedEmailAddressesRequest generates a "aws/request.Request" representing the // client's request for the ListVerifiedEmailAddresses operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3719,7 +3733,7 @@ const opPutIdentityPolicy = "PutIdentityPolicy" // PutIdentityPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutIdentityPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3753,6 +3767,7 @@ func (c *SES) PutIdentityPolicyRequest(input *PutIdentityPolicyInput) (req *requ output = &PutIdentityPolicyOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3809,7 +3824,7 @@ const opReorderReceiptRuleSet = "ReorderReceiptRuleSet" // ReorderReceiptRuleSetRequest generates a "aws/request.Request" representing the // client's request for the ReorderReceiptRuleSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3843,6 +3858,7 @@ func (c *SES) ReorderReceiptRuleSetRequest(input *ReorderReceiptRuleSetInput) (r output = &ReorderReceiptRuleSetOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3900,7 +3916,7 @@ const opSendBounce = "SendBounce" // SendBounceRequest generates a "aws/request.Request" representing the // client's request for the SendBounce operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3990,7 +4006,7 @@ const opSendBulkTemplatedEmail = "SendBulkTemplatedEmail" // SendBulkTemplatedEmailRequest generates a "aws/request.Request" representing the // client's request for the SendBulkTemplatedEmail operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4046,8 +4062,7 @@ func (c *SES) SendBulkTemplatedEmailRequest(input *SendBulkTemplatedEmailInput) // Email Addresses and Domains (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html) // in the Amazon SES Developer Guide. // -// * The total size of the message, including attachments, must be less than -// 10 MB. +// * The maximum message size is 10 MB. // // * Each Destination parameter must include at least one recipient email // address. The recipient address can be a To: address, a CC: address, or @@ -4056,6 +4071,15 @@ func (c *SES) SendBulkTemplatedEmailRequest(input *SendBulkTemplatedEmailInput) // message will be rejected, even if the message contains other recipients // that are valid. // +// * The message may not include more than 50 recipients, across the To:, +// CC: and BCC: fields. If you need to send an email message to a larger +// audience, you can divide your recipient list into groups of 50 or fewer, +// and then call the SendBulkTemplatedEmail operation several times to send +// the message to each group. +// +// * The number of destinations you can contact in a single call to the API +// may be limited by your account's maximum sending rate. +// // 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. @@ -4119,7 +4143,7 @@ const opSendCustomVerificationEmail = "SendCustomVerificationEmail" // SendCustomVerificationEmailRequest generates a "aws/request.Request" representing the // client's request for the SendCustomVerificationEmail operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4224,7 +4248,7 @@ const opSendEmail = "SendEmail" // SendEmailRequest generates a "aws/request.Request" representing the // client's request for the SendEmail operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4277,8 +4301,7 @@ func (c *SES) SendEmailRequest(input *SendEmailInput) (req *request.Request, out // Email Addresses and Domains (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html) // in the Amazon SES Developer Guide. // -// * The total size of the message, including attachments, must be smaller -// than 10 MB. +// * The maximum message size is 10 MB. // // * The message must include at least one recipient email address. The recipient // address can be a To: address, a CC: address, or a BCC: address. If a recipient @@ -4358,7 +4381,7 @@ const opSendRawEmail = "SendRawEmail" // SendRawEmailRequest generates a "aws/request.Request" representing the // client's request for the SendRawEmail operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4397,45 +4420,49 @@ func (c *SES) SendRawEmailRequest(input *SendRawEmailInput) (req *request.Reques // SendRawEmail API operation for Amazon Simple Email Service. // -// Composes an email message and immediately queues it for sending. When calling -// this operation, you may specify the message headers as well as the content. -// The SendRawEmail operation is particularly useful for sending multipart MIME -// emails (such as those that contain both a plain-text and an HTML version). +// Composes an email message and immediately queues it for sending. // -// In order to send email using the SendRawEmail operation, your message must -// meet the following requirements: +// This operation is more flexible than the SendEmail API operation. When you +// use the SendRawEmail operation, you can specify the headers of the message +// as well as its content. This flexibility is useful, for example, when you +// want to send a multipart MIME email (such a message that contains both a +// text and an HTML version). You can also use this operation to send messages +// that include attachments. // -// * The message must be sent from a verified email address or domain. If -// you attempt to send email using a non-verified address or domain, the -// operation will result in an "Email address not verified" error. +// The SendRawEmail operation has the following requirements: // -// * If your account is still in the Amazon SES sandbox, you may only send -// to verified addresses or domains, or to email addresses associated with -// the Amazon SES Mailbox Simulator. For more information, see Verifying -// Email Addresses and Domains (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html) -// in the Amazon SES Developer Guide. +// * You can only send email from verified email addresses or domains (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html). +// If you try to send email from an address that isn't verified, the operation +// results in an "Email address not verified" error. // -// * The total size of the message, including attachments, must be smaller -// than 10 MB. +// * If your account is still in the Amazon SES sandbox (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/request-production-access.html), +// you can only send email to other verified addresses in your account, or +// to addresses that are associated with the Amazon SES mailbox simulator +// (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/mailbox-simulator.html). // -// * The message must include at least one recipient email address. The recipient -// address can be a To: address, a CC: address, or a BCC: address. If a recipient -// email address is invalid (that is, it is not in the format UserName@[SubDomain.]Domain.TopLevelDomain), -// the entire message will be rejected, even if the message contains other -// recipients that are valid. +// * The maximum message size, including attachments, is 10 MB. // -// * The message may not include more than 50 recipients, across the To:, -// CC: and BCC: fields. If you need to send an email message to a larger -// audience, you can divide your recipient list into groups of 50 or fewer, -// and then call the SendRawEmail operation several times to send the message -// to each group. +// * Each message has to include at least one recipient address. A recipient +// address includes any address on the To:, CC:, or BCC: lines. // -// For every message that you send, the total number of recipients (including -// each recipient in the To:, CC: and BCC: fields) is counted against the maximum -// number of emails you can send in a 24-hour period (your sending quota). For -// more information about sending quotas in Amazon SES, see Managing Your Amazon -// SES Sending Limits (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/manage-sending-limits.html) -// in the Amazon SES Developer Guide. +// * If you send a single message to more than one recipient address, and +// one of the recipient addresses isn't in a valid format (that is, it's +// not in the format UserName@[SubDomain.]Domain.TopLevelDomain), Amazon +// SES rejects the entire message, even if the other addresses are valid. +// +// * Each message can include up to 50 recipient addresses across the To:, +// CC:, or BCC: lines. If you need to send a single message to more than +// 50 recipients, you have to split the list of recipient addresses into +// groups of less than 50 recipients, and send separate messages to each +// group. +// +// * Amazon SES allows you to specify 8-bit Content-Transfer-Encoding for +// MIME message parts. However, if Amazon SES has to modify the contents +// of your message (for example, if you use open and click tracking), 8-bit +// content isn't preserved. For this reason, we highly recommend that you +// encode all content that isn't 7-bit ASCII. For more information, see MIME +// Encoding (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-raw.html#send-email-mime-encoding) +// in the Amazon SES Developer Guide. // // Additionally, keep the following considerations in mind when using the SendRawEmail // operation: @@ -4469,6 +4496,13 @@ func (c *SES) SendRawEmailRequest(input *SendRawEmailInput) (req *request.Reques // see the Using Sending Authorization with Amazon SES (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization.html) // in the Amazon SES Developer Guide. // +// * For every message that you send, the total number of recipients (including +// each recipient in the To:, CC: and BCC: fields) is counted against the +// maximum number of emails you can send in a 24-hour period (your sending +// quota). For more information about sending quotas in Amazon SES, see Managing +// Your Amazon SES Sending Limits (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/manage-sending-limits.html) +// in the Amazon SES Developer 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. @@ -4528,7 +4562,7 @@ const opSendTemplatedEmail = "SendTemplatedEmail" // SendTemplatedEmailRequest generates a "aws/request.Request" representing the // client's request for the SendTemplatedEmail operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4584,8 +4618,7 @@ func (c *SES) SendTemplatedEmailRequest(input *SendTemplatedEmailInput) (req *re // Email Addresses and Domains (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html) // in the Amazon SES Developer Guide. // -// * The total size of the message, including attachments, must be less than -// 10 MB. +// * The maximum message size is 10 MB. // // * Calls to the SendTemplatedEmail operation may only include one Destination // parameter. A destination is a set of recipients who will receive the same @@ -4673,7 +4706,7 @@ const opSetActiveReceiptRuleSet = "SetActiveReceiptRuleSet" // SetActiveReceiptRuleSetRequest generates a "aws/request.Request" representing the // client's request for the SetActiveReceiptRuleSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4707,6 +4740,7 @@ func (c *SES) SetActiveReceiptRuleSetRequest(input *SetActiveReceiptRuleSetInput output = &SetActiveReceiptRuleSetOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4760,7 +4794,7 @@ const opSetIdentityDkimEnabled = "SetIdentityDkimEnabled" // SetIdentityDkimEnabledRequest generates a "aws/request.Request" representing the // client's request for the SetIdentityDkimEnabled operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4794,6 +4828,7 @@ func (c *SES) SetIdentityDkimEnabledRequest(input *SetIdentityDkimEnabledInput) output = &SetIdentityDkimEnabledOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4851,7 +4886,7 @@ const opSetIdentityFeedbackForwardingEnabled = "SetIdentityFeedbackForwardingEna // SetIdentityFeedbackForwardingEnabledRequest generates a "aws/request.Request" representing the // client's request for the SetIdentityFeedbackForwardingEnabled operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4885,6 +4920,7 @@ func (c *SES) SetIdentityFeedbackForwardingEnabledRequest(input *SetIdentityFeed output = &SetIdentityFeedbackForwardingEnabledOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -4936,7 +4972,7 @@ const opSetIdentityHeadersInNotificationsEnabled = "SetIdentityHeadersInNotifica // SetIdentityHeadersInNotificationsEnabledRequest generates a "aws/request.Request" representing the // client's request for the SetIdentityHeadersInNotificationsEnabled operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4970,6 +5006,7 @@ func (c *SES) SetIdentityHeadersInNotificationsEnabledRequest(input *SetIdentity output = &SetIdentityHeadersInNotificationsEnabledOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5017,7 +5054,7 @@ const opSetIdentityMailFromDomain = "SetIdentityMailFromDomain" // SetIdentityMailFromDomainRequest generates a "aws/request.Request" representing the // client's request for the SetIdentityMailFromDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5051,6 +5088,7 @@ func (c *SES) SetIdentityMailFromDomainRequest(input *SetIdentityMailFromDomainI output = &SetIdentityMailFromDomainOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5099,7 +5137,7 @@ const opSetIdentityNotificationTopic = "SetIdentityNotificationTopic" // SetIdentityNotificationTopicRequest generates a "aws/request.Request" representing the // client's request for the SetIdentityNotificationTopic operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5133,18 +5171,18 @@ func (c *SES) SetIdentityNotificationTopicRequest(input *SetIdentityNotification output = &SetIdentityNotificationTopicOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // SetIdentityNotificationTopic API operation for Amazon Simple Email Service. // -// Given an identity (an email address or a domain), sets the Amazon Simple -// Notification Service (Amazon SNS) topic to which Amazon SES will publish -// bounce, complaint, and/or delivery notifications for emails sent with that -// identity as the Source. -// -// Unless feedback forwarding is enabled, you must specify Amazon SNS topics -// for bounce and complaint notifications. For more information, see SetIdentityFeedbackForwardingEnabled. +// Sets an Amazon Simple Notification Service (Amazon SNS) topic to use when +// delivering notifications. When you use this operation, you specify a verified +// identity, such as an email address or domain. When you send an email that +// uses the chosen identity in the Source field, Amazon SES sends notifications +// to the topic you specified. You can send bounce, complaint, or delivery notifications +// (or any combination of the three) to the Amazon SNS topic that you specify. // // You can execute this operation no more than once per second. // @@ -5184,7 +5222,7 @@ const opSetReceiptRulePosition = "SetReceiptRulePosition" // SetReceiptRulePositionRequest generates a "aws/request.Request" representing the // client's request for the SetReceiptRulePosition operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5218,6 +5256,7 @@ func (c *SES) SetReceiptRulePositionRequest(input *SetReceiptRulePositionInput) output = &SetReceiptRulePositionOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5271,7 +5310,7 @@ const opTestRenderTemplate = "TestRenderTemplate" // TestRenderTemplateRequest generates a "aws/request.Request" representing the // client's request for the TestRenderTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5363,7 +5402,7 @@ const opUpdateAccountSendingEnabled = "UpdateAccountSendingEnabled" // UpdateAccountSendingEnabledRequest generates a "aws/request.Request" representing the // client's request for the UpdateAccountSendingEnabled operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5397,8 +5436,7 @@ func (c *SES) UpdateAccountSendingEnabledRequest(input *UpdateAccountSendingEnab output = &UpdateAccountSendingEnabledOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5445,7 +5483,7 @@ const opUpdateConfigurationSetEventDestination = "UpdateConfigurationSetEventDes // UpdateConfigurationSetEventDestinationRequest generates a "aws/request.Request" representing the // client's request for the UpdateConfigurationSetEventDestination operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5479,6 +5517,7 @@ func (c *SES) UpdateConfigurationSetEventDestinationRequest(input *UpdateConfigu output = &UpdateConfigurationSetEventDestinationOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5550,7 +5589,7 @@ const opUpdateConfigurationSetReputationMetricsEnabled = "UpdateConfigurationSet // UpdateConfigurationSetReputationMetricsEnabledRequest generates a "aws/request.Request" representing the // client's request for the UpdateConfigurationSetReputationMetricsEnabled operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5584,8 +5623,7 @@ func (c *SES) UpdateConfigurationSetReputationMetricsEnabledRequest(input *Updat output = &UpdateConfigurationSetReputationMetricsEnabledOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5637,7 +5675,7 @@ const opUpdateConfigurationSetSendingEnabled = "UpdateConfigurationSetSendingEna // UpdateConfigurationSetSendingEnabledRequest generates a "aws/request.Request" representing the // client's request for the UpdateConfigurationSetSendingEnabled operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5671,8 +5709,7 @@ func (c *SES) UpdateConfigurationSetSendingEnabledRequest(input *UpdateConfigura output = &UpdateConfigurationSetSendingEnabledOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5724,7 +5761,7 @@ const opUpdateConfigurationSetTrackingOptions = "UpdateConfigurationSetTrackingO // UpdateConfigurationSetTrackingOptionsRequest generates a "aws/request.Request" representing the // client's request for the UpdateConfigurationSetTrackingOptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5758,6 +5795,7 @@ func (c *SES) UpdateConfigurationSetTrackingOptionsRequest(input *UpdateConfigur output = &UpdateConfigurationSetTrackingOptionsOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5820,7 +5858,7 @@ const opUpdateCustomVerificationEmailTemplate = "UpdateCustomVerificationEmailTe // UpdateCustomVerificationEmailTemplateRequest generates a "aws/request.Request" representing the // client's request for the UpdateCustomVerificationEmailTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5854,8 +5892,7 @@ func (c *SES) UpdateCustomVerificationEmailTemplateRequest(input *UpdateCustomVe output = &UpdateCustomVerificationEmailTemplateOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -5916,7 +5953,7 @@ const opUpdateReceiptRule = "UpdateReceiptRule" // UpdateReceiptRuleRequest generates a "aws/request.Request" representing the // client's request for the UpdateReceiptRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5950,6 +5987,7 @@ func (c *SES) UpdateReceiptRuleRequest(input *UpdateReceiptRuleInput) (req *requ output = &UpdateReceiptRuleOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -6024,7 +6062,7 @@ const opUpdateTemplate = "UpdateTemplate" // UpdateTemplateRequest generates a "aws/request.Request" representing the // client's request for the UpdateTemplate operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6058,6 +6096,7 @@ func (c *SES) UpdateTemplateRequest(input *UpdateTemplateInput) (req *request.Re output = &UpdateTemplateOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -6112,7 +6151,7 @@ const opVerifyDomainDkim = "VerifyDomainDkim" // VerifyDomainDkimRequest generates a "aws/request.Request" representing the // client's request for the VerifyDomainDkim operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6200,7 +6239,7 @@ const opVerifyDomainIdentity = "VerifyDomainIdentity" // VerifyDomainIdentityRequest generates a "aws/request.Request" representing the // client's request for the VerifyDomainIdentity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6279,7 +6318,7 @@ const opVerifyEmailAddress = "VerifyEmailAddress" // VerifyEmailAddressRequest generates a "aws/request.Request" representing the // client's request for the VerifyEmailAddress operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6313,8 +6352,7 @@ func (c *SES) VerifyEmailAddressRequest(input *VerifyEmailAddressInput) (req *re output = &VerifyEmailAddressOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -6355,7 +6393,7 @@ const opVerifyEmailIdentity = "VerifyEmailIdentity" // VerifyEmailIdentityRequest generates a "aws/request.Request" representing the // client's request for the VerifyEmailIdentity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6389,6 +6427,7 @@ func (c *SES) VerifyEmailIdentityRequest(input *VerifyEmailIdentityInput) (req * output = &VerifyEmailIdentityOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -12751,18 +12790,26 @@ type SendRawEmailInput struct { // SendRawEmail in this guide, or see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization-delegate-sender-tasks-email.html). FromArn *string `type:"string"` - // The raw text of the message. The client is responsible for ensuring the following: + // The raw email message itself. The message has to meet the following criteria: // - // * Message must contain a header and a body, separated by a blank line. + // * The message has to contain a header and a body, separated by a blank + // line. // - // * All required header fields must be present. + // * All of the required header fields must be present in the message. // // * Each part of a multipart MIME message must be formatted properly. // - // * MIME content types must be among those supported by Amazon SES. For - // more information, go to the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/mime-types.html). + // * Attachments must be of a content type that Amazon SES supports. For + // a list on unsupported content types, see Unsupported Attachment Types + // (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/mime-types.html) + // in the Amazon SES Developer Guide. // - // * Must be base64-encoded. + // * The entire message must be base64-encoded. + // + // * If any of the MIME parts in your message contain content that is outside + // of the 7-bit ASCII character range, we highly recommend that you encode + // that content. For more information, see Sending Raw Email (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-raw.html) + // in the Amazon SES Developer Guide. // // * Per RFC 5321 (https://tools.ietf.org/html/rfc5321#section-4.5.3.1.6), // the maximum length of each line of text, including the , must not @@ -13552,9 +13599,14 @@ func (s SetIdentityMailFromDomainOutput) GoString() string { type SetIdentityNotificationTopicInput struct { _ struct{} `type:"structure"` - // The identity for which the Amazon SNS topic will be set. You can specify - // an identity by using its name or by using its Amazon Resource Name (ARN). - // Examples: user@example.com, example.com, arn:aws:ses:us-east-1:123456789012:identity/example.com. + // The identity (email address or domain) that you want to set the Amazon SNS + // topic for. + // + // You can only specify a verified identity for this parameter. + // + // You can specify an identity by using its name or by using its Amazon Resource + // Name (ARN). The following examples are all valid identities: sender@example.com, + // example.com, arn:aws:ses:us-east-1:123456789012:identity/example.com. // // Identity is a required field Identity *string `type:"string" required:"true"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/sfn/api.go b/vendor/github.com/aws/aws-sdk-go/service/sfn/api.go index 9a1b78af77..fc6ffb5d28 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sfn/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sfn/api.go @@ -3,11 +3,14 @@ package sfn import ( + "fmt" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) const opCreateActivity = "CreateActivity" @@ -15,7 +18,7 @@ const opCreateActivity = "CreateActivity" // CreateActivityRequest generates a "aws/request.Request" representing the // client's request for the CreateActivity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -54,12 +57,12 @@ func (c *SFN) CreateActivityRequest(input *CreateActivityInput) (req *request.Re // CreateActivity API operation for AWS Step Functions. // -// Creates an activity. An activity is a task which you write in any programming -// language and host on any machine which has access to AWS Step Functions. -// Activities must poll Step Functions using the GetActivityTask API action -// and respond using SendTask* API actions. This function lets Step Functions -// know the existence of your activity and returns an identifier for use in -// a state machine and when polling from the activity. +// Creates an activity. An activity is a task that you write in any programming +// language and host on any machine that has access to AWS Step Functions. Activities +// must poll Step Functions using the GetActivityTask API action and respond +// using SendTask* API actions. This function lets Step Functions know the existence +// of your activity and returns an identifier for use in a state machine and +// when polling from the activity. // // 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 @@ -103,7 +106,7 @@ const opCreateStateMachine = "CreateStateMachine" // CreateStateMachineRequest generates a "aws/request.Request" representing the // client's request for the CreateStateMachine operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -202,7 +205,7 @@ const opDeleteActivity = "DeleteActivity" // DeleteActivityRequest generates a "aws/request.Request" representing the // client's request for the DeleteActivity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -236,6 +239,7 @@ func (c *SFN) DeleteActivityRequest(input *DeleteActivityInput) (req *request.Re output = &DeleteActivityOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -281,7 +285,7 @@ const opDeleteStateMachine = "DeleteStateMachine" // DeleteStateMachineRequest generates a "aws/request.Request" representing the // client's request for the DeleteStateMachine operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -315,6 +319,7 @@ func (c *SFN) DeleteStateMachineRequest(input *DeleteStateMachineInput) (req *re output = &DeleteStateMachineOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -365,7 +370,7 @@ const opDescribeActivity = "DescribeActivity" // DescribeActivityRequest generates a "aws/request.Request" representing the // client's request for the DescribeActivity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -406,6 +411,9 @@ func (c *SFN) DescribeActivityRequest(input *DescribeActivityInput) (req *reques // // Describes an activity. // +// This operation is eventually consistent. The results are best effort and +// may not reflect very recent updates and 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 // the error. @@ -447,7 +455,7 @@ const opDescribeExecution = "DescribeExecution" // DescribeExecutionRequest generates a "aws/request.Request" representing the // client's request for the DescribeExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -488,6 +496,9 @@ func (c *SFN) DescribeExecutionRequest(input *DescribeExecutionInput) (req *requ // // Describes an execution. // +// This operation is eventually consistent. The results are best effort and +// may not reflect very recent updates and 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 // the error. @@ -529,7 +540,7 @@ const opDescribeStateMachine = "DescribeStateMachine" // DescribeStateMachineRequest generates a "aws/request.Request" representing the // client's request for the DescribeStateMachine operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -570,6 +581,9 @@ func (c *SFN) DescribeStateMachineRequest(input *DescribeStateMachineInput) (req // // Describes a state machine. // +// This operation is eventually consistent. The results are best effort and +// may not reflect very recent updates and 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 // the error. @@ -611,7 +625,7 @@ const opDescribeStateMachineForExecution = "DescribeStateMachineForExecution" // DescribeStateMachineForExecutionRequest generates a "aws/request.Request" representing the // client's request for the DescribeStateMachineForExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -652,6 +666,9 @@ func (c *SFN) DescribeStateMachineForExecutionRequest(input *DescribeStateMachin // // Describes the state machine associated with a specific execution. // +// This operation is eventually consistent. The results are best effort and +// may not reflect very recent updates and 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 // the error. @@ -693,7 +710,7 @@ const opGetActivityTask = "GetActivityTask" // GetActivityTaskRequest generates a "aws/request.Request" representing the // client's request for the GetActivityTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -743,6 +760,10 @@ func (c *SFN) GetActivityTaskRequest(input *GetActivityTaskInput) (req *request. // Workers should set their client side socket timeout to at least 65 seconds // (5 seconds higher than the maximum time the service may hold the poll request). // +// Polling with GetActivityTask can cause latency in some implementations. See +// Avoid Latency When Polling for Activity Tasks (http://docs.aws.amazon.com/step-functions/latest/dg/bp-activity-pollers.html) +// in the Step Functions Developer 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. @@ -788,7 +809,7 @@ const opGetExecutionHistory = "GetExecutionHistory" // GetExecutionHistoryRequest generates a "aws/request.Request" representing the // client's request for the GetExecutionHistory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -837,9 +858,11 @@ func (c *SFN) GetExecutionHistoryRequest(input *GetExecutionHistoryInput) (req * // the results are returned in ascending order of the timeStamp of the events. // Use the reverseOrder parameter to get the latest events first. // -// If a nextToken is returned by a previous call, there are more results available. -// To retrieve the next page of results, make the call again using the returned -// token in nextToken. Keep all other arguments unchanged. +// If nextToken is returned, there are more results available. The value of +// nextToken is a unique pagination token for each page. Make the call again +// using the returned token to retrieve the next page. Keep all other arguments +// unchanged. Each pagination token expires after 24 hours. Using an expired +// pagination token will return an HTTP 400 InvalidToken error. // // 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 @@ -935,7 +958,7 @@ const opListActivities = "ListActivities" // ListActivitiesRequest generates a "aws/request.Request" representing the // client's request for the ListActivities operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -982,9 +1005,14 @@ func (c *SFN) ListActivitiesRequest(input *ListActivitiesInput) (req *request.Re // // Lists the existing activities. // -// If a nextToken is returned by a previous call, there are more results available. -// To retrieve the next page of results, make the call again using the returned -// token in nextToken. Keep all other arguments unchanged. +// If nextToken is returned, there are more results available. The value of +// nextToken is a unique pagination token for each page. Make the call again +// using the returned token to retrieve the next page. Keep all other arguments +// unchanged. Each pagination token expires after 24 hours. Using an expired +// pagination token will return an HTTP 400 InvalidToken error. +// +// This operation is eventually consistent. The results are best effort and +// may not reflect very recent updates and 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 @@ -1074,7 +1102,7 @@ const opListExecutions = "ListExecutions" // ListExecutionsRequest generates a "aws/request.Request" representing the // client's request for the ListExecutions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1120,10 +1148,16 @@ func (c *SFN) ListExecutionsRequest(input *ListExecutionsInput) (req *request.Re // ListExecutions API operation for AWS Step Functions. // // Lists the executions of a state machine that meet the filtering criteria. +// Results are sorted by time, with the most recent execution first. // -// If a nextToken is returned by a previous call, there are more results available. -// To retrieve the next page of results, make the call again using the returned -// token in nextToken. Keep all other arguments unchanged. +// If nextToken is returned, there are more results available. The value of +// nextToken is a unique pagination token for each page. Make the call again +// using the returned token to retrieve the next page. Keep all other arguments +// unchanged. Each pagination token expires after 24 hours. Using an expired +// pagination token will return an HTTP 400 InvalidToken error. +// +// This operation is eventually consistent. The results are best effort and +// may not reflect very recent updates and 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 @@ -1219,7 +1253,7 @@ const opListStateMachines = "ListStateMachines" // ListStateMachinesRequest generates a "aws/request.Request" representing the // client's request for the ListStateMachines operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1266,9 +1300,14 @@ func (c *SFN) ListStateMachinesRequest(input *ListStateMachinesInput) (req *requ // // Lists the existing state machines. // -// If a nextToken is returned by a previous call, there are more results available. -// To retrieve the next page of results, make the call again using the returned -// token in nextToken. Keep all other arguments unchanged. +// If nextToken is returned, there are more results available. The value of +// nextToken is a unique pagination token for each page. Make the call again +// using the returned token to retrieve the next page. Keep all other arguments +// unchanged. Each pagination token expires after 24 hours. Using an expired +// pagination token will return an HTTP 400 InvalidToken error. +// +// This operation is eventually consistent. The results are best effort and +// may not reflect very recent updates and 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 @@ -1353,12 +1392,95 @@ func (c *SFN) ListStateMachinesPagesWithContext(ctx aws.Context, input *ListStat return p.Err() } +const opListTagsForResource = "ListTagsForResource" + +// ListTagsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForResource 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 ListTagsForResource for more information on using the ListTagsForResource +// 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 ListTagsForResourceRequest method. +// req, resp := client.ListTagsForResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/ListTagsForResource +func (c *SFN) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { + op := &request.Operation{ + Name: opListTagsForResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListTagsForResourceInput{} + } + + output = &ListTagsForResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagsForResource API operation for AWS Step Functions. +// +// List tags for a given resource. +// +// 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 Step Functions's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidArn "InvalidArn" +// The provided Amazon Resource Name (ARN) is invalid. +// +// * ErrCodeResourceNotFound "ResourceNotFound" +// Could not fine the referenced resource. Only state machine and activity ARNs +// are supported. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/ListTagsForResource +func (c *SFN) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + return out, req.Send() +} + +// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of +// the ability to pass a context and additional request options. +// +// See ListTagsForResource 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 *SFN) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opSendTaskFailure = "SendTaskFailure" // SendTaskFailureRequest generates a "aws/request.Request" representing the // client's request for the SendTaskFailure operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1392,6 +1514,7 @@ func (c *SFN) SendTaskFailureRequest(input *SendTaskFailureInput) (req *request. output = &SendTaskFailureOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1441,7 +1564,7 @@ const opSendTaskHeartbeat = "SendTaskHeartbeat" // SendTaskHeartbeatRequest generates a "aws/request.Request" representing the // client's request for the SendTaskHeartbeat operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1475,6 +1598,7 @@ func (c *SFN) SendTaskHeartbeatRequest(input *SendTaskHeartbeatInput) (req *requ output = &SendTaskHeartbeatOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1536,7 +1660,7 @@ const opSendTaskSuccess = "SendTaskSuccess" // SendTaskSuccessRequest generates a "aws/request.Request" representing the // client's request for the SendTaskSuccess operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1570,6 +1694,7 @@ func (c *SFN) SendTaskSuccessRequest(input *SendTaskSuccessInput) (req *request. output = &SendTaskSuccessOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1623,7 +1748,7 @@ const opStartExecution = "StartExecution" // StartExecutionRequest generates a "aws/request.Request" representing the // client's request for the StartExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1664,6 +1789,12 @@ func (c *SFN) StartExecutionRequest(input *StartExecutionInput) (req *request.Re // // Starts a state machine execution. // +// StartExecution is idempotent. If StartExecution is called with the same name +// and input as a running execution, the call will succeed and return the same +// response as the original request. If the execution is closed or if the input +// is different, it will return a 400 ExecutionAlreadyExists error. Names can +// be reused after 90 days. +// // 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. @@ -1723,7 +1854,7 @@ const opStopExecution = "StopExecution" // StopExecutionRequest generates a "aws/request.Request" representing the // client's request for the StopExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1800,12 +1931,185 @@ func (c *SFN) StopExecutionWithContext(ctx aws.Context, input *StopExecutionInpu return out, req.Send() } +const opTagResource = "TagResource" + +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return +// 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 TagResource for more information on using the TagResource +// 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 TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/TagResource +func (c *SFN) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagResource API operation for AWS Step Functions. +// +// Add a tag to a Step Functions resource. +// +// 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 Step Functions's +// API operation TagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidArn "InvalidArn" +// The provided Amazon Resource Name (ARN) is invalid. +// +// * ErrCodeResourceNotFound "ResourceNotFound" +// Could not fine the referenced resource. Only state machine and activity ARNs +// are supported. +// +// * ErrCodeTooManyTags "TooManyTags" +// You've exceeded the number of tags allowed for a resource. See the Limits +// Topic (http://docs.aws.amazon.com/step-functions/latest/dg/limits.html) in +// the AWS Step Functions Developer Guide. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/TagResource +func (c *SFN) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + return out, req.Send() +} + +// TagResourceWithContext is the same as TagResource with the addition of +// the ability to pass a context and additional request options. +// +// See TagResource 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 *SFN) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagResource = "UntagResource" + +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource 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 UntagResource for more information on using the UntagResource +// 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 UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/UntagResource +func (c *SFN) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagResource API operation for AWS Step Functions. +// +// Remove a tag from a Step Functions resource +// +// 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 Step Functions's +// API operation UntagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidArn "InvalidArn" +// The provided Amazon Resource Name (ARN) is invalid. +// +// * ErrCodeResourceNotFound "ResourceNotFound" +// Could not fine the referenced resource. Only state machine and activity ARNs +// are supported. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/states-2016-11-23/UntagResource +func (c *SFN) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + return out, req.Send() +} + +// UntagResourceWithContext is the same as UntagResource with the addition of +// the ability to pass a context and additional request options. +// +// See UntagResource 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 *SFN) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opUpdateStateMachine = "UpdateStateMachine" // UpdateStateMachineRequest generates a "aws/request.Request" representing the // client's request for the UpdateStateMachine operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1846,12 +2150,12 @@ func (c *SFN) UpdateStateMachineRequest(input *UpdateStateMachineInput) (req *re // // Updates an existing state machine by modifying its definition and/or roleArn. // Running executions will continue to use the previous definition and roleArn. +// You must include at least one of definition or roleArn or you will receive +// a MissingRequiredParameter error. // // All StartExecution calls within a few seconds will use the updated definition // and roleArn. Executions started immediately after calling UpdateStateMachine -// may use the previous state machine definition and roleArn. You must include -// at least one of definition or roleArn or you will receive a MissingRequiredParameter -// error. +// may use the previous state machine definition and roleArn. // // 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 @@ -1899,15 +2203,15 @@ func (c *SFN) UpdateStateMachineWithContext(ctx aws.Context, input *UpdateStateM return out, req.Send() } -// Contains details about an activity which failed during an execution. +// Contains details about an activity that failed during an execution. type ActivityFailedEventDetails struct { _ struct{} `type:"structure"` // A more detailed explanation of the cause of the failure. - Cause *string `locationName:"cause" type:"string"` + Cause *string `locationName:"cause" type:"string" sensitive:"true"` // The error code of the failure. - Error *string `locationName:"error" type:"string"` + Error *string `locationName:"error" type:"string" sensitive:"true"` } // String returns the string representation @@ -1992,16 +2296,16 @@ func (s *ActivityListItem) SetName(v string) *ActivityListItem { return s } -// Contains details about an activity schedule failure which occurred during +// Contains details about an activity schedule failure that occurred during // an execution. type ActivityScheduleFailedEventDetails struct { _ struct{} `type:"structure"` // A more detailed explanation of the cause of the failure. - Cause *string `locationName:"cause" type:"string"` + Cause *string `locationName:"cause" type:"string" sensitive:"true"` // The error code of the failure. - Error *string `locationName:"error" type:"string"` + Error *string `locationName:"error" type:"string" sensitive:"true"` } // String returns the string representation @@ -2034,7 +2338,7 @@ type ActivityScheduledEventDetails struct { HeartbeatInSeconds *int64 `locationName:"heartbeatInSeconds" type:"long"` // The JSON data input to the activity task. - Input *string `locationName:"input" type:"string"` + Input *string `locationName:"input" type:"string" sensitive:"true"` // The Amazon Resource Name (ARN) of the scheduled activity. // @@ -2104,13 +2408,13 @@ func (s *ActivityStartedEventDetails) SetWorkerName(v string) *ActivityStartedEv return s } -// Contains details about an activity which successfully terminated during an +// Contains details about an activity that successfully terminated during an // execution. type ActivitySucceededEventDetails struct { _ struct{} `type:"structure"` // The JSON data output by the activity task. - Output *string `locationName:"output" type:"string"` + Output *string `locationName:"output" type:"string" sensitive:"true"` } // String returns the string representation @@ -2129,15 +2433,15 @@ func (s *ActivitySucceededEventDetails) SetOutput(v string) *ActivitySucceededEv return s } -// Contains details about an activity timeout which occurred during an execution. +// Contains details about an activity timeout that occurred during an execution. type ActivityTimedOutEventDetails struct { _ struct{} `type:"structure"` // A more detailed explanation of the cause of the timeout. - Cause *string `locationName:"cause" type:"string"` + Cause *string `locationName:"cause" type:"string" sensitive:"true"` // The error code of the failure. - Error *string `locationName:"error" type:"string"` + Error *string `locationName:"error" type:"string" sensitive:"true"` } // String returns the string representation @@ -2257,15 +2561,13 @@ func (s *CreateActivityOutput) SetCreationDate(v time.Time) *CreateActivityOutpu type CreateStateMachineInput struct { _ struct{} `type:"structure"` - // The Amazon States Language definition of the state machine. + // The Amazon States Language definition of the state machine. See Amazon States + // Language (http://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html). // // Definition is a required field - Definition *string `locationName:"definition" min:"1" type:"string" required:"true"` + Definition *string `locationName:"definition" min:"1" type:"string" required:"true" sensitive:"true"` - // The name of the state machine. This name must be unique for your AWS account - // and region for 90 days. For more information, see Limits Related to State - // Machine Executions (http://docs.aws.amazon.com/step-functions/latest/dg/limits.html#service-limits-state-machine-executions) - // in the AWS Step Functions Developer Guide. + // The name of the state machine. // // A name must not contain: // @@ -2642,7 +2944,7 @@ type DescribeExecutionOutput struct { // The string that contains the JSON input data of the execution. // // Input is a required field - Input *string `locationName:"input" type:"string" required:"true"` + Input *string `locationName:"input" type:"string" required:"true" sensitive:"true"` // The name of the execution. // @@ -2663,7 +2965,7 @@ type DescribeExecutionOutput struct { // // This field is set only if the execution succeeds. If the execution fails, // this field is null. - Output *string `locationName:"output" type:"string"` + Output *string `locationName:"output" type:"string" sensitive:"true"` // The date the execution is started. // @@ -2787,10 +3089,11 @@ func (s *DescribeStateMachineForExecutionInput) SetExecutionArn(v string) *Descr type DescribeStateMachineForExecutionOutput struct { _ struct{} `type:"structure"` - // The Amazon States Language definition of the state machine. + // The Amazon States Language definition of the state machine. See Amazon States + // Language (http://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html). // // Definition is a required field - Definition *string `locationName:"definition" min:"1" type:"string" required:"true"` + Definition *string `locationName:"definition" min:"1" type:"string" required:"true" sensitive:"true"` // The name of the state machine associated with the execution. // @@ -2904,10 +3207,11 @@ type DescribeStateMachineOutput struct { // CreationDate is a required field CreationDate *time.Time `locationName:"creationDate" type:"timestamp" required:"true"` - // The Amazon States Language definition of the state machine. + // The Amazon States Language definition of the state machine. See Amazon States + // Language (http://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html). // // Definition is a required field - Definition *string `locationName:"definition" min:"1" type:"string" required:"true"` + Definition *string `locationName:"definition" min:"1" type:"string" required:"true" sensitive:"true"` // The name of the state machine. // @@ -2993,10 +3297,10 @@ type ExecutionAbortedEventDetails struct { _ struct{} `type:"structure"` // A more detailed explanation of the cause of the failure. - Cause *string `locationName:"cause" type:"string"` + Cause *string `locationName:"cause" type:"string" sensitive:"true"` // The error code of the failure. - Error *string `locationName:"error" type:"string"` + Error *string `locationName:"error" type:"string" sensitive:"true"` } // String returns the string representation @@ -3026,10 +3330,10 @@ type ExecutionFailedEventDetails struct { _ struct{} `type:"structure"` // A more detailed explanation of the cause of the failure. - Cause *string `locationName:"cause" type:"string"` + Cause *string `locationName:"cause" type:"string" sensitive:"true"` // The error code of the failure. - Error *string `locationName:"error" type:"string"` + Error *string `locationName:"error" type:"string" sensitive:"true"` } // String returns the string representation @@ -3150,7 +3454,7 @@ type ExecutionStartedEventDetails struct { _ struct{} `type:"structure"` // The JSON data input to the execution. - Input *string `locationName:"input" type:"string"` + Input *string `locationName:"input" type:"string" sensitive:"true"` // The Amazon Resource Name (ARN) of the IAM role used for executing AWS Lambda // tasks. @@ -3184,7 +3488,7 @@ type ExecutionSucceededEventDetails struct { _ struct{} `type:"structure"` // The JSON data output by the execution. - Output *string `locationName:"output" type:"string"` + Output *string `locationName:"output" type:"string" sensitive:"true"` } // String returns the string representation @@ -3203,15 +3507,15 @@ func (s *ExecutionSucceededEventDetails) SetOutput(v string) *ExecutionSucceeded return s } -// Contains details about the execution timeout which occurred during the execution. +// Contains details about the execution timeout that occurred during the execution. type ExecutionTimedOutEventDetails struct { _ struct{} `type:"structure"` // A more detailed explanation of the cause of the timeout. - Cause *string `locationName:"cause" type:"string"` + Cause *string `locationName:"cause" type:"string" sensitive:"true"` // The error code of the failure. - Error *string `locationName:"error" type:"string"` + Error *string `locationName:"error" type:"string" sensitive:"true"` } // String returns the string representation @@ -3296,7 +3600,7 @@ type GetActivityTaskOutput struct { _ struct{} `type:"structure"` // The string that contains the JSON input data for the task. - Input *string `locationName:"input" type:"string"` + Input *string `locationName:"input" type:"string" sensitive:"true"` // A token that identifies the scheduled task. This token must be copied and // included in subsequent calls to SendTaskHeartbeat, SendTaskSuccess or SendTaskFailure @@ -3336,18 +3640,17 @@ type GetExecutionHistoryInput struct { // The maximum number of results that are returned per call. You can use nextToken // to obtain further pages of results. The default is 100 and the maximum allowed - // page size is 100. A value of 0 uses the default. + // page size is 1000. A value of 0 uses the default. // // This is only an upper limit. The actual number of results returned per call // might be fewer than the specified maximum. MaxResults *int64 `locationName:"maxResults" type:"integer"` - // If a nextToken is returned by a previous call, there are more results available. - // To retrieve the next page of results, make the call again using the returned - // token in nextToken. Keep all other arguments unchanged. - // - // The configured maxResults determines how many results can be returned in - // a single call. + // If nextToken is returned, there are more results available. The value of + // nextToken is a unique pagination token for each page. Make the call again + // using the returned token to retrieve the next page. Keep all other arguments + // unchanged. Each pagination token expires after 24 hours. Using an expired + // pagination token will return an HTTP 400 InvalidToken error. NextToken *string `locationName:"nextToken" min:"1" type:"string"` // Lists events in descending order of their timeStamp. @@ -3415,12 +3718,11 @@ type GetExecutionHistoryOutput struct { // Events is a required field Events []*HistoryEvent `locationName:"events" type:"list" required:"true"` - // If a nextToken is returned by a previous call, there are more results available. - // To retrieve the next page of results, make the call again using the returned - // token in nextToken. Keep all other arguments unchanged. - // - // The configured maxResults determines how many results can be returned in - // a single call. + // If nextToken is returned, there are more results available. The value of + // nextToken is a unique pagination token for each page. Make the call again + // using the returned token to retrieve the next page. Keep all other arguments + // unchanged. Each pagination token expires after 24 hours. Using an expired + // pagination token will return an HTTP 400 InvalidToken error. NextToken *string `locationName:"nextToken" min:"1" type:"string"` } @@ -3450,11 +3752,10 @@ func (s *GetExecutionHistoryOutput) SetNextToken(v string) *GetExecutionHistoryO type HistoryEvent struct { _ struct{} `type:"structure"` - // Contains details about an activity which failed during an execution. + // Contains details about an activity that failed during an execution. ActivityFailedEventDetails *ActivityFailedEventDetails `locationName:"activityFailedEventDetails" type:"structure"` - // Contains details about an activity schedule event which failed during an - // execution. + // Contains details about an activity schedule event that failed during an execution. ActivityScheduleFailedEventDetails *ActivityScheduleFailedEventDetails `locationName:"activityScheduleFailedEventDetails" type:"structure"` // Contains details about an activity scheduled during an execution. @@ -3463,11 +3764,11 @@ type HistoryEvent struct { // Contains details about the start of an activity during an execution. ActivityStartedEventDetails *ActivityStartedEventDetails `locationName:"activityStartedEventDetails" type:"structure"` - // Contains details about an activity which successfully terminated during an + // Contains details about an activity that successfully terminated during an // execution. ActivitySucceededEventDetails *ActivitySucceededEventDetails `locationName:"activitySucceededEventDetails" type:"structure"` - // Contains details about an activity timeout which occurred during an execution. + // Contains details about an activity timeout that occurred during an execution. ActivityTimedOutEventDetails *ActivityTimedOutEventDetails `locationName:"activityTimedOutEventDetails" type:"structure"` // Contains details about an abort of an execution. @@ -3482,7 +3783,7 @@ type HistoryEvent struct { // Contains details about the successful termination of the execution. ExecutionSucceededEventDetails *ExecutionSucceededEventDetails `locationName:"executionSucceededEventDetails" type:"structure"` - // Contains details about the execution timeout which occurred during the execution. + // Contains details about the execution timeout that occurred during the execution. ExecutionTimedOutEventDetails *ExecutionTimedOutEventDetails `locationName:"executionTimedOutEventDetails" type:"structure"` // The id of the event. Events are numbered sequentially, starting at one. @@ -3490,25 +3791,24 @@ type HistoryEvent struct { // Id is a required field Id *int64 `locationName:"id" type:"long" required:"true"` - // Contains details about a lambda function which failed during an execution. + // Contains details about a lambda function that failed during an execution. LambdaFunctionFailedEventDetails *LambdaFunctionFailedEventDetails `locationName:"lambdaFunctionFailedEventDetails" type:"structure"` - // Contains details about a failed lambda function schedule event which occurred + // Contains details about a failed lambda function schedule event that occurred // during an execution. LambdaFunctionScheduleFailedEventDetails *LambdaFunctionScheduleFailedEventDetails `locationName:"lambdaFunctionScheduleFailedEventDetails" type:"structure"` // Contains details about a lambda function scheduled during an execution. LambdaFunctionScheduledEventDetails *LambdaFunctionScheduledEventDetails `locationName:"lambdaFunctionScheduledEventDetails" type:"structure"` - // Contains details about a lambda function which failed to start during an - // execution. + // Contains details about a lambda function that failed to start during an execution. LambdaFunctionStartFailedEventDetails *LambdaFunctionStartFailedEventDetails `locationName:"lambdaFunctionStartFailedEventDetails" type:"structure"` - // Contains details about a lambda function which terminated successfully during + // Contains details about a lambda function that terminated successfully during // an execution. LambdaFunctionSucceededEventDetails *LambdaFunctionSucceededEventDetails `locationName:"lambdaFunctionSucceededEventDetails" type:"structure"` - // Contains details about a lambda function timeout which occurred during an + // Contains details about a lambda function timeout that occurred during an // execution. LambdaFunctionTimedOutEventDetails *LambdaFunctionTimedOutEventDetails `locationName:"lambdaFunctionTimedOutEventDetails" type:"structure"` @@ -3521,7 +3821,31 @@ type HistoryEvent struct { // Contains details about an exit from a state during an execution. StateExitedEventDetails *StateExitedEventDetails `locationName:"stateExitedEventDetails" type:"structure"` - // The date the event occurred. + // Contains details about a task failure event. + TaskFailedEventDetails *TaskFailedEventDetails `locationName:"taskFailedEventDetails" type:"structure"` + + // Contains details about a task scheduled during an execution. + TaskScheduledEventDetails *TaskScheduledEventDetails `locationName:"taskScheduledEventDetails" type:"structure"` + + // Contains details about a task that failed to start during an execution. + TaskStartFailedEventDetails *TaskStartFailedEventDetails `locationName:"taskStartFailedEventDetails" type:"structure"` + + // Contains details about the start of a task during an execution. + TaskStartedEventDetails *TaskStartedEventDetails `locationName:"taskStartedEventDetails" type:"structure"` + + // Contains details about a task that failed to submit during an execution. + TaskSubmitFailedEventDetails *TaskSubmitFailedEventDetails `locationName:"taskSubmitFailedEventDetails" type:"structure"` + + // Contains details about a task submitted to a resource . + TaskSubmittedEventDetails *TaskSubmittedEventDetails `locationName:"taskSubmittedEventDetails" type:"structure"` + + // Contains details about the successful completion of a task state. + TaskSucceededEventDetails *TaskSucceededEventDetails `locationName:"taskSucceededEventDetails" type:"structure"` + + // Contains details about a resource timeout that occurred during an execution. + TaskTimedOutEventDetails *TaskTimedOutEventDetails `locationName:"taskTimedOutEventDetails" type:"structure"` + + // The date and time the event occurred. // // Timestamp is a required field Timestamp *time.Time `locationName:"timestamp" type:"timestamp" required:"true"` @@ -3668,6 +3992,54 @@ func (s *HistoryEvent) SetStateExitedEventDetails(v *StateExitedEventDetails) *H return s } +// SetTaskFailedEventDetails sets the TaskFailedEventDetails field's value. +func (s *HistoryEvent) SetTaskFailedEventDetails(v *TaskFailedEventDetails) *HistoryEvent { + s.TaskFailedEventDetails = v + return s +} + +// SetTaskScheduledEventDetails sets the TaskScheduledEventDetails field's value. +func (s *HistoryEvent) SetTaskScheduledEventDetails(v *TaskScheduledEventDetails) *HistoryEvent { + s.TaskScheduledEventDetails = v + return s +} + +// SetTaskStartFailedEventDetails sets the TaskStartFailedEventDetails field's value. +func (s *HistoryEvent) SetTaskStartFailedEventDetails(v *TaskStartFailedEventDetails) *HistoryEvent { + s.TaskStartFailedEventDetails = v + return s +} + +// SetTaskStartedEventDetails sets the TaskStartedEventDetails field's value. +func (s *HistoryEvent) SetTaskStartedEventDetails(v *TaskStartedEventDetails) *HistoryEvent { + s.TaskStartedEventDetails = v + return s +} + +// SetTaskSubmitFailedEventDetails sets the TaskSubmitFailedEventDetails field's value. +func (s *HistoryEvent) SetTaskSubmitFailedEventDetails(v *TaskSubmitFailedEventDetails) *HistoryEvent { + s.TaskSubmitFailedEventDetails = v + return s +} + +// SetTaskSubmittedEventDetails sets the TaskSubmittedEventDetails field's value. +func (s *HistoryEvent) SetTaskSubmittedEventDetails(v *TaskSubmittedEventDetails) *HistoryEvent { + s.TaskSubmittedEventDetails = v + return s +} + +// SetTaskSucceededEventDetails sets the TaskSucceededEventDetails field's value. +func (s *HistoryEvent) SetTaskSucceededEventDetails(v *TaskSucceededEventDetails) *HistoryEvent { + s.TaskSucceededEventDetails = v + return s +} + +// SetTaskTimedOutEventDetails sets the TaskTimedOutEventDetails field's value. +func (s *HistoryEvent) SetTaskTimedOutEventDetails(v *TaskTimedOutEventDetails) *HistoryEvent { + s.TaskTimedOutEventDetails = v + return s +} + // SetTimestamp sets the Timestamp field's value. func (s *HistoryEvent) SetTimestamp(v time.Time) *HistoryEvent { s.Timestamp = &v @@ -3680,15 +4052,15 @@ func (s *HistoryEvent) SetType(v string) *HistoryEvent { return s } -// Contains details about a lambda function which failed during an execution. +// Contains details about a lambda function that failed during an execution. type LambdaFunctionFailedEventDetails struct { _ struct{} `type:"structure"` // A more detailed explanation of the cause of the failure. - Cause *string `locationName:"cause" type:"string"` + Cause *string `locationName:"cause" type:"string" sensitive:"true"` // The error code of the failure. - Error *string `locationName:"error" type:"string"` + Error *string `locationName:"error" type:"string" sensitive:"true"` } // String returns the string representation @@ -3713,16 +4085,16 @@ func (s *LambdaFunctionFailedEventDetails) SetError(v string) *LambdaFunctionFai return s } -// Contains details about a failed lambda function schedule event which occurred +// Contains details about a failed lambda function schedule event that occurred // during an execution. type LambdaFunctionScheduleFailedEventDetails struct { _ struct{} `type:"structure"` // A more detailed explanation of the cause of the failure. - Cause *string `locationName:"cause" type:"string"` + Cause *string `locationName:"cause" type:"string" sensitive:"true"` // The error code of the failure. - Error *string `locationName:"error" type:"string"` + Error *string `locationName:"error" type:"string" sensitive:"true"` } // String returns the string representation @@ -3752,7 +4124,7 @@ type LambdaFunctionScheduledEventDetails struct { _ struct{} `type:"structure"` // The JSON data input to the lambda function. - Input *string `locationName:"input" type:"string"` + Input *string `locationName:"input" type:"string" sensitive:"true"` // The Amazon Resource Name (ARN) of the scheduled lambda function. // @@ -3791,16 +4163,15 @@ func (s *LambdaFunctionScheduledEventDetails) SetTimeoutInSeconds(v int64) *Lamb return s } -// Contains details about a lambda function which failed to start during an -// execution. +// Contains details about a lambda function that failed to start during an execution. type LambdaFunctionStartFailedEventDetails struct { _ struct{} `type:"structure"` // A more detailed explanation of the cause of the failure. - Cause *string `locationName:"cause" type:"string"` + Cause *string `locationName:"cause" type:"string" sensitive:"true"` // The error code of the failure. - Error *string `locationName:"error" type:"string"` + Error *string `locationName:"error" type:"string" sensitive:"true"` } // String returns the string representation @@ -3825,13 +4196,13 @@ func (s *LambdaFunctionStartFailedEventDetails) SetError(v string) *LambdaFuncti return s } -// Contains details about a lambda function which successfully terminated during +// Contains details about a lambda function that successfully terminated during // an execution. type LambdaFunctionSucceededEventDetails struct { _ struct{} `type:"structure"` // The JSON data output by the lambda function. - Output *string `locationName:"output" type:"string"` + Output *string `locationName:"output" type:"string" sensitive:"true"` } // String returns the string representation @@ -3850,16 +4221,16 @@ func (s *LambdaFunctionSucceededEventDetails) SetOutput(v string) *LambdaFunctio return s } -// Contains details about a lambda function timeout which occurred during an +// Contains details about a lambda function timeout that occurred during an // execution. type LambdaFunctionTimedOutEventDetails struct { _ struct{} `type:"structure"` // A more detailed explanation of the cause of the timeout. - Cause *string `locationName:"cause" type:"string"` + Cause *string `locationName:"cause" type:"string" sensitive:"true"` // The error code of the failure. - Error *string `locationName:"error" type:"string"` + Error *string `locationName:"error" type:"string" sensitive:"true"` } // String returns the string representation @@ -3889,18 +4260,17 @@ type ListActivitiesInput struct { // The maximum number of results that are returned per call. You can use nextToken // to obtain further pages of results. The default is 100 and the maximum allowed - // page size is 100. A value of 0 uses the default. + // page size is 1000. A value of 0 uses the default. // // This is only an upper limit. The actual number of results returned per call // might be fewer than the specified maximum. MaxResults *int64 `locationName:"maxResults" type:"integer"` - // If a nextToken is returned by a previous call, there are more results available. - // To retrieve the next page of results, make the call again using the returned - // token in nextToken. Keep all other arguments unchanged. - // - // The configured maxResults determines how many results can be returned in - // a single call. + // If nextToken is returned, there are more results available. The value of + // nextToken is a unique pagination token for each page. Make the call again + // using the returned token to retrieve the next page. Keep all other arguments + // unchanged. Each pagination token expires after 24 hours. Using an expired + // pagination token will return an HTTP 400 InvalidToken error. NextToken *string `locationName:"nextToken" min:"1" type:"string"` } @@ -3947,12 +4317,11 @@ type ListActivitiesOutput struct { // Activities is a required field Activities []*ActivityListItem `locationName:"activities" type:"list" required:"true"` - // If a nextToken is returned by a previous call, there are more results available. - // To retrieve the next page of results, make the call again using the returned - // token in nextToken. Keep all other arguments unchanged. - // - // The configured maxResults determines how many results can be returned in - // a single call. + // If nextToken is returned, there are more results available. The value of + // nextToken is a unique pagination token for each page. Make the call again + // using the returned token to retrieve the next page. Keep all other arguments + // unchanged. Each pagination token expires after 24 hours. Using an expired + // pagination token will return an HTTP 400 InvalidToken error. NextToken *string `locationName:"nextToken" min:"1" type:"string"` } @@ -3983,18 +4352,17 @@ type ListExecutionsInput struct { // The maximum number of results that are returned per call. You can use nextToken // to obtain further pages of results. The default is 100 and the maximum allowed - // page size is 100. A value of 0 uses the default. + // page size is 1000. A value of 0 uses the default. // // This is only an upper limit. The actual number of results returned per call // might be fewer than the specified maximum. MaxResults *int64 `locationName:"maxResults" type:"integer"` - // If a nextToken is returned by a previous call, there are more results available. - // To retrieve the next page of results, make the call again using the returned - // token in nextToken. Keep all other arguments unchanged. - // - // The configured maxResults determines how many results can be returned in - // a single call. + // If nextToken is returned, there are more results available. The value of + // nextToken is a unique pagination token for each page. Make the call again + // using the returned token to retrieve the next page. Keep all other arguments + // unchanged. Each pagination token expires after 24 hours. Using an expired + // pagination token will return an HTTP 400 InvalidToken error. NextToken *string `locationName:"nextToken" min:"1" type:"string"` // The Amazon Resource Name (ARN) of the state machine whose executions is listed. @@ -4068,12 +4436,11 @@ type ListExecutionsOutput struct { // Executions is a required field Executions []*ExecutionListItem `locationName:"executions" type:"list" required:"true"` - // If a nextToken is returned by a previous call, there are more results available. - // To retrieve the next page of results, make the call again using the returned - // token in nextToken. Keep all other arguments unchanged. - // - // The configured maxResults determines how many results can be returned in - // a single call. + // If nextToken is returned, there are more results available. The value of + // nextToken is a unique pagination token for each page. Make the call again + // using the returned token to retrieve the next page. Keep all other arguments + // unchanged. Each pagination token expires after 24 hours. Using an expired + // pagination token will return an HTTP 400 InvalidToken error. NextToken *string `locationName:"nextToken" min:"1" type:"string"` } @@ -4104,18 +4471,17 @@ type ListStateMachinesInput struct { // The maximum number of results that are returned per call. You can use nextToken // to obtain further pages of results. The default is 100 and the maximum allowed - // page size is 100. A value of 0 uses the default. + // page size is 1000. A value of 0 uses the default. // // This is only an upper limit. The actual number of results returned per call // might be fewer than the specified maximum. MaxResults *int64 `locationName:"maxResults" type:"integer"` - // If a nextToken is returned by a previous call, there are more results available. - // To retrieve the next page of results, make the call again using the returned - // token in nextToken. Keep all other arguments unchanged. - // - // The configured maxResults determines how many results can be returned in - // a single call. + // If nextToken is returned, there are more results available. The value of + // nextToken is a unique pagination token for each page. Make the call again + // using the returned token to retrieve the next page. Keep all other arguments + // unchanged. Each pagination token expires after 24 hours. Using an expired + // pagination token will return an HTTP 400 InvalidToken error. NextToken *string `locationName:"nextToken" min:"1" type:"string"` } @@ -4157,12 +4523,11 @@ func (s *ListStateMachinesInput) SetNextToken(v string) *ListStateMachinesInput type ListStateMachinesOutput struct { _ struct{} `type:"structure"` - // If a nextToken is returned by a previous call, there are more results available. - // To retrieve the next page of results, make the call again using the returned - // token in nextToken. Keep all other arguments unchanged. - // - // The configured maxResults determines how many results can be returned in - // a single call. + // If nextToken is returned, there are more results available. The value of + // nextToken is a unique pagination token for each page. Make the call again + // using the returned token to retrieve the next page. Keep all other arguments + // unchanged. Each pagination token expires after 24 hours. Using an expired + // pagination token will return an HTTP 400 InvalidToken error. NextToken *string `locationName:"nextToken" min:"1" type:"string"` // StateMachines is a required field @@ -4191,14 +4556,78 @@ func (s *ListStateMachinesOutput) SetStateMachines(v []*StateMachineListItem) *L return s } -type SendTaskFailureInput struct { +type ListTagsForResourceInput struct { _ struct{} `type:"structure"` - // A more detailed explanation of the cause of the failure. - Cause *string `locationName:"cause" type:"string"` - - // An arbitrary error code that identifies the cause of the failure. - Error *string `locationName:"error" type:"string"` + // The Amazon Resource Name (ARN) for the Step Functions state machine or activity. + // + // ResourceArn is a required field + ResourceArn *string `locationName:"resourceArn" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTagsForResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { + s.ResourceArn = &v + return s +} + +type ListTagsForResourceOutput struct { + _ struct{} `type:"structure"` + + // An array of tags associated with the resource. + Tags []*Tag `locationName:"tags" type:"list"` +} + +// String returns the string representation +func (s ListTagsForResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceOutput) GoString() string { + return s.String() +} + +// SetTags sets the Tags field's value. +func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { + s.Tags = v + return s +} + +type SendTaskFailureInput struct { + _ struct{} `type:"structure"` + + // A more detailed explanation of the cause of the failure. + Cause *string `locationName:"cause" type:"string" sensitive:"true"` + + // The error code of the failure. + Error *string `locationName:"error" type:"string" sensitive:"true"` // The token that represents this task. Task tokens are generated by the service // when the tasks are assigned to a worker (see GetActivityTask::taskToken). @@ -4327,7 +4756,7 @@ type SendTaskSuccessInput struct { // The JSON output of the task. // // Output is a required field - Output *string `locationName:"output" type:"string" required:"true"` + Output *string `locationName:"output" type:"string" required:"true" sensitive:"true"` // The token that represents this task. Task tokens are generated by the service // when the tasks are assigned to a worker (see GetActivityTaskOutput$taskToken). @@ -4400,27 +4829,13 @@ type StartExecutionInput struct { // // If you don't include any JSON input data, you still must include the two // braces, for example: "input": "{}" - Input *string `locationName:"input" type:"string"` + Input *string `locationName:"input" type:"string" sensitive:"true"` // The name of the execution. This name must be unique for your AWS account // and region for 90 days. For more information, see Limits Related to State // Machine Executions (http://docs.aws.amazon.com/step-functions/latest/dg/limits.html#service-limits-state-machine-executions) // in the AWS Step Functions Developer Guide. // - // An execution can't use the name of another execution for 90 days. - // - // When you make multiple StartExecution calls with the same name, the new execution - // doesn't run and the following rules apply: - // - // When the original execution is open and the execution input from the new - // call is different, the ExecutionAlreadyExists message is returned. - // - // When the original execution is open and the execution input from the new - // call is identical, the Success message is returned. - // - // When the original execution is closed, the ExecutionAlreadyExists message - // is returned regardless of input. - // // A name must not contain: // // * whitespace @@ -4528,7 +4943,7 @@ type StateEnteredEventDetails struct { _ struct{} `type:"structure"` // The string that contains the JSON input data for the state. - Input *string `locationName:"input" type:"string"` + Input *string `locationName:"input" type:"string" sensitive:"true"` // The name of the state. // @@ -4580,7 +4995,7 @@ type StateExitedEventDetails struct { Name *string `locationName:"name" min:"1" type:"string" required:"true"` // The JSON output data of the state. - Output *string `locationName:"output" type:"string"` + Output *string `locationName:"output" type:"string" sensitive:"true"` } // String returns the string representation @@ -4668,11 +5083,11 @@ func (s *StateMachineListItem) SetStateMachineArn(v string) *StateMachineListIte type StopExecutionInput struct { _ struct{} `type:"structure"` - // A more detailed explanation of the cause of the termination. - Cause *string `locationName:"cause" type:"string"` + // A more detailed explanation of the cause of the failure. + Cause *string `locationName:"cause" type:"string" sensitive:"true"` - // An arbitrary error code that identifies the cause of the termination. - Error *string `locationName:"error" type:"string"` + // The error code of the failure. + Error *string `locationName:"error" type:"string" sensitive:"true"` // The Amazon Resource Name (ARN) of the execution to stop. // @@ -4749,11 +5164,628 @@ func (s *StopExecutionOutput) SetStopDate(v time.Time) *StopExecutionOutput { return s } +// Tags are key-value pairs that can be associated with Step Functions state +// machines and activities. +type Tag struct { + _ struct{} `type:"structure"` + + // The key of a tag. + Key *string `locationName:"key" min:"1" type:"string"` + + // The value of a tag. + Value *string `locationName:"value" type:"string"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Tag) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Tag"} + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) for the Step Functions state machine or activity. + // + // ResourceArn is a required field + ResourceArn *string `locationName:"resourceArn" min:"1" type:"string" required:"true"` + + // The list of tags to add to a resource. + // + // Tags may only contain unicode letters, digits, whitespace, or these symbols: + // _ . : / = + - @. + // + // Tags is a required field + Tags []*Tag `locationName:"tags" type:"list" required:"true"` +} + +// String returns the string representation +func (s TagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + 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 +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { + s.ResourceArn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { + s.Tags = v + return s +} + +type TagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceOutput) GoString() string { + return s.String() +} + +// Contains details about a task failure event. +type TaskFailedEventDetails struct { + _ struct{} `type:"structure"` + + // A more detailed explanation of the cause of the failure. + Cause *string `locationName:"cause" type:"string" sensitive:"true"` + + // The error code of the failure. + Error *string `locationName:"error" type:"string" sensitive:"true"` + + // The service name of the resource in a task state. + // + // Resource is a required field + Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` + + // The action of the resource called by a task state. + // + // ResourceType is a required field + ResourceType *string `locationName:"resourceType" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s TaskFailedEventDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TaskFailedEventDetails) GoString() string { + return s.String() +} + +// SetCause sets the Cause field's value. +func (s *TaskFailedEventDetails) SetCause(v string) *TaskFailedEventDetails { + s.Cause = &v + return s +} + +// SetError sets the Error field's value. +func (s *TaskFailedEventDetails) SetError(v string) *TaskFailedEventDetails { + s.Error = &v + return s +} + +// SetResource sets the Resource field's value. +func (s *TaskFailedEventDetails) SetResource(v string) *TaskFailedEventDetails { + s.Resource = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *TaskFailedEventDetails) SetResourceType(v string) *TaskFailedEventDetails { + s.ResourceType = &v + return s +} + +// Contains details about a task scheduled during an execution. +type TaskScheduledEventDetails struct { + _ struct{} `type:"structure"` + + // The JSON data passed to the resource referenced in a task state. + // + // Parameters is a required field + Parameters *string `locationName:"parameters" type:"string" required:"true" sensitive:"true"` + + // The region of the scheduled task + // + // Region is a required field + Region *string `locationName:"region" min:"1" type:"string" required:"true"` + + // The service name of the resource in a task state. + // + // Resource is a required field + Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` + + // The action of the resource called by a task state. + // + // ResourceType is a required field + ResourceType *string `locationName:"resourceType" min:"1" type:"string" required:"true"` + + // The maximum allowed duration of the task. + TimeoutInSeconds *int64 `locationName:"timeoutInSeconds" type:"long"` +} + +// String returns the string representation +func (s TaskScheduledEventDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TaskScheduledEventDetails) GoString() string { + return s.String() +} + +// SetParameters sets the Parameters field's value. +func (s *TaskScheduledEventDetails) SetParameters(v string) *TaskScheduledEventDetails { + s.Parameters = &v + return s +} + +// SetRegion sets the Region field's value. +func (s *TaskScheduledEventDetails) SetRegion(v string) *TaskScheduledEventDetails { + s.Region = &v + return s +} + +// SetResource sets the Resource field's value. +func (s *TaskScheduledEventDetails) SetResource(v string) *TaskScheduledEventDetails { + s.Resource = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *TaskScheduledEventDetails) SetResourceType(v string) *TaskScheduledEventDetails { + s.ResourceType = &v + return s +} + +// SetTimeoutInSeconds sets the TimeoutInSeconds field's value. +func (s *TaskScheduledEventDetails) SetTimeoutInSeconds(v int64) *TaskScheduledEventDetails { + s.TimeoutInSeconds = &v + return s +} + +// Contains details about a task that failed to start during an execution. +type TaskStartFailedEventDetails struct { + _ struct{} `type:"structure"` + + // A more detailed explanation of the cause of the failure. + Cause *string `locationName:"cause" type:"string" sensitive:"true"` + + // The error code of the failure. + Error *string `locationName:"error" type:"string" sensitive:"true"` + + // The service name of the resource in a task state. + // + // Resource is a required field + Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` + + // The action of the resource called by a task state. + // + // ResourceType is a required field + ResourceType *string `locationName:"resourceType" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s TaskStartFailedEventDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TaskStartFailedEventDetails) GoString() string { + return s.String() +} + +// SetCause sets the Cause field's value. +func (s *TaskStartFailedEventDetails) SetCause(v string) *TaskStartFailedEventDetails { + s.Cause = &v + return s +} + +// SetError sets the Error field's value. +func (s *TaskStartFailedEventDetails) SetError(v string) *TaskStartFailedEventDetails { + s.Error = &v + return s +} + +// SetResource sets the Resource field's value. +func (s *TaskStartFailedEventDetails) SetResource(v string) *TaskStartFailedEventDetails { + s.Resource = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *TaskStartFailedEventDetails) SetResourceType(v string) *TaskStartFailedEventDetails { + s.ResourceType = &v + return s +} + +// Contains details about the start of a task during an execution. +type TaskStartedEventDetails struct { + _ struct{} `type:"structure"` + + // The service name of the resource in a task state. + // + // Resource is a required field + Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` + + // The action of the resource called by a task state. + // + // ResourceType is a required field + ResourceType *string `locationName:"resourceType" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s TaskStartedEventDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TaskStartedEventDetails) GoString() string { + return s.String() +} + +// SetResource sets the Resource field's value. +func (s *TaskStartedEventDetails) SetResource(v string) *TaskStartedEventDetails { + s.Resource = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *TaskStartedEventDetails) SetResourceType(v string) *TaskStartedEventDetails { + s.ResourceType = &v + return s +} + +// Contains details about a task that failed to submit during an execution. +type TaskSubmitFailedEventDetails struct { + _ struct{} `type:"structure"` + + // A more detailed explanation of the cause of the failure. + Cause *string `locationName:"cause" type:"string" sensitive:"true"` + + // The error code of the failure. + Error *string `locationName:"error" type:"string" sensitive:"true"` + + // The service name of the resource in a task state. + // + // Resource is a required field + Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` + + // The action of the resource called by a task state. + // + // ResourceType is a required field + ResourceType *string `locationName:"resourceType" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s TaskSubmitFailedEventDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TaskSubmitFailedEventDetails) GoString() string { + return s.String() +} + +// SetCause sets the Cause field's value. +func (s *TaskSubmitFailedEventDetails) SetCause(v string) *TaskSubmitFailedEventDetails { + s.Cause = &v + return s +} + +// SetError sets the Error field's value. +func (s *TaskSubmitFailedEventDetails) SetError(v string) *TaskSubmitFailedEventDetails { + s.Error = &v + return s +} + +// SetResource sets the Resource field's value. +func (s *TaskSubmitFailedEventDetails) SetResource(v string) *TaskSubmitFailedEventDetails { + s.Resource = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *TaskSubmitFailedEventDetails) SetResourceType(v string) *TaskSubmitFailedEventDetails { + s.ResourceType = &v + return s +} + +// Contains details about a task submitted to a resource . +type TaskSubmittedEventDetails struct { + _ struct{} `type:"structure"` + + // The response from a resource when a task has started. + Output *string `locationName:"output" type:"string" sensitive:"true"` + + // The service name of the resource in a task state. + // + // Resource is a required field + Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` + + // The action of the resource called by a task state. + // + // ResourceType is a required field + ResourceType *string `locationName:"resourceType" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s TaskSubmittedEventDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TaskSubmittedEventDetails) GoString() string { + return s.String() +} + +// SetOutput sets the Output field's value. +func (s *TaskSubmittedEventDetails) SetOutput(v string) *TaskSubmittedEventDetails { + s.Output = &v + return s +} + +// SetResource sets the Resource field's value. +func (s *TaskSubmittedEventDetails) SetResource(v string) *TaskSubmittedEventDetails { + s.Resource = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *TaskSubmittedEventDetails) SetResourceType(v string) *TaskSubmittedEventDetails { + s.ResourceType = &v + return s +} + +// Contains details about the successful completion of a task state. +type TaskSucceededEventDetails struct { + _ struct{} `type:"structure"` + + // The full JSON response from a resource when a task has succeeded. This response + // becomes the output of the related task. + Output *string `locationName:"output" type:"string" sensitive:"true"` + + // The service name of the resource in a task state. + // + // Resource is a required field + Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` + + // The action of the resource called by a task state. + // + // ResourceType is a required field + ResourceType *string `locationName:"resourceType" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s TaskSucceededEventDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TaskSucceededEventDetails) GoString() string { + return s.String() +} + +// SetOutput sets the Output field's value. +func (s *TaskSucceededEventDetails) SetOutput(v string) *TaskSucceededEventDetails { + s.Output = &v + return s +} + +// SetResource sets the Resource field's value. +func (s *TaskSucceededEventDetails) SetResource(v string) *TaskSucceededEventDetails { + s.Resource = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *TaskSucceededEventDetails) SetResourceType(v string) *TaskSucceededEventDetails { + s.ResourceType = &v + return s +} + +// Contains details about a resource timeout that occurred during an execution. +type TaskTimedOutEventDetails struct { + _ struct{} `type:"structure"` + + // A more detailed explanation of the cause of the failure. + Cause *string `locationName:"cause" type:"string" sensitive:"true"` + + // The error code of the failure. + Error *string `locationName:"error" type:"string" sensitive:"true"` + + // The service name of the resource in a task state. + // + // Resource is a required field + Resource *string `locationName:"resource" min:"1" type:"string" required:"true"` + + // The action of the resource called by a task state. + // + // ResourceType is a required field + ResourceType *string `locationName:"resourceType" min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s TaskTimedOutEventDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TaskTimedOutEventDetails) GoString() string { + return s.String() +} + +// SetCause sets the Cause field's value. +func (s *TaskTimedOutEventDetails) SetCause(v string) *TaskTimedOutEventDetails { + s.Cause = &v + return s +} + +// SetError sets the Error field's value. +func (s *TaskTimedOutEventDetails) SetError(v string) *TaskTimedOutEventDetails { + s.Error = &v + return s +} + +// SetResource sets the Resource field's value. +func (s *TaskTimedOutEventDetails) SetResource(v string) *TaskTimedOutEventDetails { + s.Resource = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *TaskTimedOutEventDetails) SetResourceType(v string) *TaskTimedOutEventDetails { + s.ResourceType = &v + return s +} + +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) for the Step Functions state machine or activity. + // + // ResourceArn is a required field + ResourceArn *string `locationName:"resourceArn" min:"1" type:"string" required:"true"` + + // The list of tags to remove from the resource. + // + // TagKeys is a required field + TagKeys []*string `locationName:"tagKeys" type:"list" required:"true"` +} + +// String returns the string representation +func (s UntagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { + s.ResourceArn = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { + s.TagKeys = v + return s +} + +type UntagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UntagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceOutput) GoString() string { + return s.String() +} + type UpdateStateMachineInput struct { _ struct{} `type:"structure"` - // The Amazon States Language definition of the state machine. - Definition *string `locationName:"definition" min:"1" type:"string"` + // The Amazon States Language definition of the state machine. See Amazon States + // Language (http://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html). + Definition *string `locationName:"definition" min:"1" type:"string" sensitive:"true"` // The Amazon Resource Name (ARN) of the IAM role of the state machine. RoleArn *string `locationName:"roleArn" min:"1" type:"string"` @@ -4881,6 +5913,30 @@ const ( // HistoryEventTypeChoiceStateExited is a HistoryEventType enum value HistoryEventTypeChoiceStateExited = "ChoiceStateExited" + // HistoryEventTypeTaskFailed is a HistoryEventType enum value + HistoryEventTypeTaskFailed = "TaskFailed" + + // HistoryEventTypeTaskScheduled is a HistoryEventType enum value + HistoryEventTypeTaskScheduled = "TaskScheduled" + + // HistoryEventTypeTaskStartFailed is a HistoryEventType enum value + HistoryEventTypeTaskStartFailed = "TaskStartFailed" + + // HistoryEventTypeTaskStarted is a HistoryEventType enum value + HistoryEventTypeTaskStarted = "TaskStarted" + + // HistoryEventTypeTaskSubmitFailed is a HistoryEventType enum value + HistoryEventTypeTaskSubmitFailed = "TaskSubmitFailed" + + // HistoryEventTypeTaskSubmitted is a HistoryEventType enum value + HistoryEventTypeTaskSubmitted = "TaskSubmitted" + + // HistoryEventTypeTaskSucceeded is a HistoryEventType enum value + HistoryEventTypeTaskSucceeded = "TaskSucceeded" + + // HistoryEventTypeTaskTimedOut is a HistoryEventType enum value + HistoryEventTypeTaskTimedOut = "TaskTimedOut" + // HistoryEventTypeExecutionFailed is a HistoryEventType enum value HistoryEventTypeExecutionFailed = "ExecutionFailed" diff --git a/vendor/github.com/aws/aws-sdk-go/service/sfn/errors.go b/vendor/github.com/aws/aws-sdk-go/service/sfn/errors.go index 84cab27312..fcf27534ff 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sfn/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sfn/errors.go @@ -88,6 +88,13 @@ const ( // and roleArn are not specified. ErrCodeMissingRequiredParameter = "MissingRequiredParameter" + // ErrCodeResourceNotFound for service response error code + // "ResourceNotFound". + // + // Could not fine the referenced resource. Only state machine and activity ARNs + // are supported. + ErrCodeResourceNotFound = "ResourceNotFound" + // ErrCodeStateMachineAlreadyExists for service response error code // "StateMachineAlreadyExists". // @@ -121,4 +128,12 @@ const ( // ErrCodeTaskTimedOut for service response error code // "TaskTimedOut". ErrCodeTaskTimedOut = "TaskTimedOut" + + // ErrCodeTooManyTags for service response error code + // "TooManyTags". + // + // You've exceeded the number of tags allowed for a resource. See the Limits + // Topic (http://docs.aws.amazon.com/step-functions/latest/dg/limits.html) in + // the AWS Step Functions Developer Guide. + ErrCodeTooManyTags = "TooManyTags" ) diff --git a/vendor/github.com/aws/aws-sdk-go/service/simpledb/api.go b/vendor/github.com/aws/aws-sdk-go/service/simpledb/api.go index ea395b956e..8304b0635e 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/simpledb/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/simpledb/api.go @@ -17,7 +17,7 @@ const opBatchDeleteAttributes = "BatchDeleteAttributes" // BatchDeleteAttributesRequest generates a "aws/request.Request" representing the // client's request for the BatchDeleteAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -49,8 +49,7 @@ func (c *SimpleDB) BatchDeleteAttributesRequest(input *BatchDeleteAttributesInpu output = &BatchDeleteAttributesOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -113,7 +112,7 @@ const opBatchPutAttributes = "BatchPutAttributes" // BatchPutAttributesRequest generates a "aws/request.Request" representing the // client's request for the BatchPutAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -145,8 +144,7 @@ func (c *SimpleDB) BatchPutAttributesRequest(input *BatchPutAttributesInput) (re output = &BatchPutAttributesOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -257,7 +255,7 @@ const opCreateDomain = "CreateDomain" // CreateDomainRequest generates a "aws/request.Request" representing the // client's request for the CreateDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -289,8 +287,7 @@ func (c *SimpleDB) CreateDomainRequest(input *CreateDomainInput) (req *request.R output = &CreateDomainOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -349,7 +346,7 @@ const opDeleteAttributes = "DeleteAttributes" // DeleteAttributesRequest generates a "aws/request.Request" representing the // client's request for the DeleteAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -381,8 +378,7 @@ func (c *SimpleDB) DeleteAttributesRequest(input *DeleteAttributesInput) (req *r output = &DeleteAttributesOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -446,7 +442,7 @@ const opDeleteDomain = "DeleteDomain" // DeleteDomainRequest generates a "aws/request.Request" representing the // client's request for the DeleteDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -478,8 +474,7 @@ func (c *SimpleDB) DeleteDomainRequest(input *DeleteDomainInput) (req *request.R output = &DeleteDomainOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -529,7 +524,7 @@ const opDomainMetadata = "DomainMetadata" // DomainMetadataRequest generates a "aws/request.Request" representing the // client's request for the DomainMetadata operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -610,7 +605,7 @@ const opGetAttributes = "GetAttributes" // GetAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -701,7 +696,7 @@ const opListDomains = "ListDomains" // ListDomainsRequest generates a "aws/request.Request" representing the // client's request for the ListDomains operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -841,7 +836,7 @@ const opPutAttributes = "PutAttributes" // PutAttributesRequest generates a "aws/request.Request" representing the // client's request for the PutAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -873,8 +868,7 @@ func (c *SimpleDB) PutAttributesRequest(input *PutAttributesInput) (req *request output = &PutAttributesOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -967,7 +961,7 @@ const opSelect = "Select" // SelectRequest generates a "aws/request.Request" representing the // client's request for the Select operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. diff --git a/vendor/github.com/aws/aws-sdk-go/service/sns/api.go b/vendor/github.com/aws/aws-sdk-go/service/sns/api.go index b69a5ed8a1..f45a4a594c 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sns/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sns/api.go @@ -17,7 +17,7 @@ const opAddPermission = "AddPermission" // AddPermissionRequest generates a "aws/request.Request" representing the // client's request for the AddPermission operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -51,8 +51,7 @@ func (c *SNS) AddPermissionRequest(input *AddPermissionInput) (req *request.Requ output = &AddPermissionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -108,7 +107,7 @@ const opCheckIfPhoneNumberIsOptedOut = "CheckIfPhoneNumberIsOptedOut" // CheckIfPhoneNumberIsOptedOutRequest generates a "aws/request.Request" representing the // client's request for the CheckIfPhoneNumberIsOptedOut operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -202,7 +201,7 @@ const opConfirmSubscription = "ConfirmSubscription" // ConfirmSubscriptionRequest generates a "aws/request.Request" representing the // client's request for the ConfirmSubscription operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -297,7 +296,7 @@ const opCreatePlatformApplication = "CreatePlatformApplication" // CreatePlatformApplicationRequest generates a "aws/request.Request" representing the // client's request for the CreatePlatformApplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -407,7 +406,7 @@ const opCreatePlatformEndpoint = "CreatePlatformEndpoint" // CreatePlatformEndpointRequest generates a "aws/request.Request" representing the // client's request for the CreatePlatformEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -508,7 +507,7 @@ const opCreateTopic = "CreateTopic" // CreateTopicRequest generates a "aws/request.Request" representing the // client's request for the CreateTopic operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -573,6 +572,10 @@ func (c *SNS) CreateTopicRequest(input *CreateTopicInput) (req *request.Request, // * ErrCodeAuthorizationErrorException "AuthorizationError" // Indicates that the user has been denied access to the requested resource. // +// * ErrCodeInvalidSecurityException "InvalidSecurity" +// The credential signature isn't valid. You must use an HTTPS endpoint and +// sign your request using Signature Version 4. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/CreateTopic func (c *SNS) CreateTopic(input *CreateTopicInput) (*CreateTopicOutput, error) { req, out := c.CreateTopicRequest(input) @@ -600,7 +603,7 @@ const opDeleteEndpoint = "DeleteEndpoint" // DeleteEndpointRequest generates a "aws/request.Request" representing the // client's request for the DeleteEndpoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -634,8 +637,7 @@ func (c *SNS) DeleteEndpointRequest(input *DeleteEndpointInput) (req *request.Re output = &DeleteEndpointOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -692,7 +694,7 @@ const opDeletePlatformApplication = "DeletePlatformApplication" // DeletePlatformApplicationRequest generates a "aws/request.Request" representing the // client's request for the DeletePlatformApplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -726,8 +728,7 @@ func (c *SNS) DeletePlatformApplicationRequest(input *DeletePlatformApplicationI output = &DeletePlatformApplicationOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -781,7 +782,7 @@ const opDeleteTopic = "DeleteTopic" // DeleteTopicRequest generates a "aws/request.Request" representing the // client's request for the DeleteTopic operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -815,8 +816,7 @@ func (c *SNS) DeleteTopicRequest(input *DeleteTopicInput) (req *request.Request, output = &DeleteTopicOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -874,7 +874,7 @@ const opGetEndpointAttributes = "GetEndpointAttributes" // GetEndpointAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetEndpointAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -964,7 +964,7 @@ const opGetPlatformApplicationAttributes = "GetPlatformApplicationAttributes" // GetPlatformApplicationAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetPlatformApplicationAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1054,7 +1054,7 @@ const opGetSMSAttributes = "GetSMSAttributes" // GetSMSAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetSMSAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1145,7 +1145,7 @@ const opGetSubscriptionAttributes = "GetSubscriptionAttributes" // GetSubscriptionAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetSubscriptionAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1233,7 +1233,7 @@ const opGetTopicAttributes = "GetTopicAttributes" // GetTopicAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetTopicAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1295,6 +1295,10 @@ func (c *SNS) GetTopicAttributesRequest(input *GetTopicAttributesInput) (req *re // * ErrCodeAuthorizationErrorException "AuthorizationError" // Indicates that the user has been denied access to the requested resource. // +// * ErrCodeInvalidSecurityException "InvalidSecurity" +// The credential signature isn't valid. You must use an HTTPS endpoint and +// sign your request using Signature Version 4. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/GetTopicAttributes func (c *SNS) GetTopicAttributes(input *GetTopicAttributesInput) (*GetTopicAttributesOutput, error) { req, out := c.GetTopicAttributesRequest(input) @@ -1322,7 +1326,7 @@ const opListEndpointsByPlatformApplication = "ListEndpointsByPlatformApplication // ListEndpointsByPlatformApplicationRequest generates a "aws/request.Request" representing the // client's request for the ListEndpointsByPlatformApplication operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1475,7 +1479,7 @@ const opListPhoneNumbersOptedOut = "ListPhoneNumbersOptedOut" // ListPhoneNumbersOptedOutRequest generates a "aws/request.Request" representing the // client's request for the ListPhoneNumbersOptedOut operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1572,7 +1576,7 @@ const opListPlatformApplications = "ListPlatformApplications" // ListPlatformApplicationsRequest generates a "aws/request.Request" representing the // client's request for the ListPlatformApplications operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1722,7 +1726,7 @@ const opListSubscriptions = "ListSubscriptions" // ListSubscriptionsRequest generates a "aws/request.Request" representing the // client's request for the ListSubscriptions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1868,7 +1872,7 @@ const opListSubscriptionsByTopic = "ListSubscriptionsByTopic" // ListSubscriptionsByTopicRequest generates a "aws/request.Request" representing the // client's request for the ListSubscriptionsByTopic operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2017,7 +2021,7 @@ const opListTopics = "ListTopics" // ListTopicsRequest generates a "aws/request.Request" representing the // client's request for the ListTopics operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2162,7 +2166,7 @@ const opOptInPhoneNumber = "OptInPhoneNumber" // OptInPhoneNumberRequest generates a "aws/request.Request" representing the // client's request for the OptInPhoneNumber operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2196,6 +2200,7 @@ func (c *SNS) OptInPhoneNumberRequest(input *OptInPhoneNumberInput) (req *reques output = &OptInPhoneNumberOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2254,7 +2259,7 @@ const opPublish = "Publish" // PublishRequest generates a "aws/request.Request" representing the // client's request for the Publish operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2340,6 +2345,36 @@ func (c *SNS) PublishRequest(input *PublishInput) (req *request.Request, output // * ErrCodeAuthorizationErrorException "AuthorizationError" // Indicates that the user has been denied access to the requested resource. // +// * ErrCodeKMSDisabledException "KMSDisabled" +// The request was rejected because the specified customer master key (CMK) +// isn't enabled. +// +// * ErrCodeKMSInvalidStateException "KMSInvalidState" +// The request was rejected because the state of the specified resource isn't +// valid for this request. For more information, see How Key State Affects Use +// of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// in the AWS Key Management Service Developer Guide. +// +// * ErrCodeKMSNotFoundException "KMSNotFound" +// The request was rejected because the specified entity or resource can't be +// found. +// +// * ErrCodeKMSOptInRequired "KMSOptInRequired" +// The AWS access key ID needs a subscription for the service. +// +// * ErrCodeKMSThrottlingException "KMSThrottling" +// The request was denied due to request throttling. For more information about +// throttling, see Limits (http://docs.aws.amazon.com/kms/latest/developerguide/limits.html#requests-per-second) +// in the AWS Key Management Service Developer Guide. +// +// * ErrCodeKMSAccessDeniedException "KMSAccessDenied" +// The ciphertext references a key that doesn't exist or that you don't have +// access to. +// +// * ErrCodeInvalidSecurityException "InvalidSecurity" +// The credential signature isn't valid. You must use an HTTPS endpoint and +// sign your request using Signature Version 4. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/Publish func (c *SNS) Publish(input *PublishInput) (*PublishOutput, error) { req, out := c.PublishRequest(input) @@ -2367,7 +2402,7 @@ const opRemovePermission = "RemovePermission" // RemovePermissionRequest generates a "aws/request.Request" representing the // client's request for the RemovePermission operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2401,8 +2436,7 @@ func (c *SNS) RemovePermissionRequest(input *RemovePermissionInput) (req *reques output = &RemovePermissionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2457,7 +2491,7 @@ const opSetEndpointAttributes = "SetEndpointAttributes" // SetEndpointAttributesRequest generates a "aws/request.Request" representing the // client's request for the SetEndpointAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2491,8 +2525,7 @@ func (c *SNS) SetEndpointAttributesRequest(input *SetEndpointAttributesInput) (r output = &SetEndpointAttributesOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2549,7 +2582,7 @@ const opSetPlatformApplicationAttributes = "SetPlatformApplicationAttributes" // SetPlatformApplicationAttributesRequest generates a "aws/request.Request" representing the // client's request for the SetPlatformApplicationAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2583,8 +2616,7 @@ func (c *SNS) SetPlatformApplicationAttributesRequest(input *SetPlatformApplicat output = &SetPlatformApplicationAttributesOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2643,7 +2675,7 @@ const opSetSMSAttributes = "SetSMSAttributes" // SetSMSAttributesRequest generates a "aws/request.Request" representing the // client's request for the SetSMSAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2677,6 +2709,7 @@ func (c *SNS) SetSMSAttributesRequest(input *SetSMSAttributesInput) (req *reques output = &SetSMSAttributesOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2738,7 +2771,7 @@ const opSetSubscriptionAttributes = "SetSubscriptionAttributes" // SetSubscriptionAttributesRequest generates a "aws/request.Request" representing the // client's request for the SetSubscriptionAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2772,8 +2805,7 @@ func (c *SNS) SetSubscriptionAttributesRequest(input *SetSubscriptionAttributesI output = &SetSubscriptionAttributesOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2834,7 +2866,7 @@ const opSetTopicAttributes = "SetTopicAttributes" // SetTopicAttributesRequest generates a "aws/request.Request" representing the // client's request for the SetTopicAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2868,8 +2900,7 @@ func (c *SNS) SetTopicAttributesRequest(input *SetTopicAttributesInput) (req *re output = &SetTopicAttributesOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2897,6 +2928,10 @@ func (c *SNS) SetTopicAttributesRequest(input *SetTopicAttributesInput) (req *re // * ErrCodeAuthorizationErrorException "AuthorizationError" // Indicates that the user has been denied access to the requested resource. // +// * ErrCodeInvalidSecurityException "InvalidSecurity" +// The credential signature isn't valid. You must use an HTTPS endpoint and +// sign your request using Signature Version 4. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/SetTopicAttributes func (c *SNS) SetTopicAttributes(input *SetTopicAttributesInput) (*SetTopicAttributesOutput, error) { req, out := c.SetTopicAttributesRequest(input) @@ -2924,7 +2959,7 @@ const opSubscribe = "Subscribe" // SubscribeRequest generates a "aws/request.Request" representing the // client's request for the Subscribe operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2998,6 +3033,10 @@ func (c *SNS) SubscribeRequest(input *SubscribeInput) (req *request.Request, out // * ErrCodeAuthorizationErrorException "AuthorizationError" // Indicates that the user has been denied access to the requested resource. // +// * ErrCodeInvalidSecurityException "InvalidSecurity" +// The credential signature isn't valid. You must use an HTTPS endpoint and +// sign your request using Signature Version 4. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/Subscribe func (c *SNS) Subscribe(input *SubscribeInput) (*SubscribeOutput, error) { req, out := c.SubscribeRequest(input) @@ -3025,7 +3064,7 @@ const opUnsubscribe = "Unsubscribe" // UnsubscribeRequest generates a "aws/request.Request" representing the // client's request for the Unsubscribe operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3059,8 +3098,7 @@ func (c *SNS) UnsubscribeRequest(input *UnsubscribeInput) (req *request.Request, output = &UnsubscribeOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3095,6 +3133,10 @@ func (c *SNS) UnsubscribeRequest(input *UnsubscribeInput) (req *request.Request, // * ErrCodeNotFoundException "NotFound" // Indicates that the requested resource does not exist. // +// * ErrCodeInvalidSecurityException "InvalidSecurity" +// The credential signature isn't valid. You must use an HTTPS endpoint and +// sign your request using Signature Version 4. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/Unsubscribe func (c *SNS) Unsubscribe(input *UnsubscribeInput) (*UnsubscribeOutput, error) { req, out := c.UnsubscribeRequest(input) @@ -3572,6 +3614,20 @@ func (s *CreatePlatformEndpointOutput) SetEndpointArn(v string) *CreatePlatformE type CreateTopicInput struct { _ struct{} `type:"structure"` + // A map of attributes with their corresponding values. + // + // The following lists the names, descriptions, and values of the special request + // parameters that the CreateTopic action uses: + // + // * DeliveryPolicy – The policy that defines how Amazon SNS retries failed + // deliveries to HTTP/S endpoints. + // + // * DisplayName – The display name to use for a topic with SMS subscriptions. + // + // * Policy – The policy that defines who can access your topic. By default, + // only the topic owner can publish or subscribe to the topic. + Attributes map[string]*string `type:"map"` + // The name of the topic you want to create. // // Constraints: Topic names must be made up of only uppercase and lowercase @@ -3605,6 +3661,12 @@ func (s *CreateTopicInput) Validate() error { return nil } +// SetAttributes sets the Attributes field's value. +func (s *CreateTopicInput) SetAttributes(v map[string]*string) *CreateTopicInput { + s.Attributes = v + return s +} + // SetName sets the Name field's value. func (s *CreateTopicInput) SetName(v string) *CreateTopicInput { s.Name = &v @@ -3871,16 +3933,16 @@ type GetEndpointAttributesOutput struct { // Attributes include the following: // - // * CustomUserData -- arbitrary user data to associate with the endpoint. + // * CustomUserData – arbitrary user data to associate with the endpoint. // Amazon SNS does not use this data. The data must be in UTF-8 format and // less than 2KB. // - // * Enabled -- flag that enables/disables delivery to the endpoint. Amazon + // * Enabled – flag that enables/disables delivery to the endpoint. Amazon // SNS will set this to false when a notification service indicates to Amazon // SNS that the endpoint is invalid. Users can set it back to true, typically // after updating Token. // - // * Token -- device token, also referred to as a registration id, for an + // * Token – device token, also referred to as a registration id, for an // app and mobile device. This is returned from the notification service // when an app and mobile device are registered with the notification service. Attributes map[string]*string `type:"map"` @@ -3947,16 +4009,16 @@ type GetPlatformApplicationAttributesOutput struct { // Attributes include the following: // - // * EventEndpointCreated -- Topic ARN to which EndpointCreated event notifications + // * EventEndpointCreated – Topic ARN to which EndpointCreated event notifications // should be sent. // - // * EventEndpointDeleted -- Topic ARN to which EndpointDeleted event notifications + // * EventEndpointDeleted – Topic ARN to which EndpointDeleted event notifications // should be sent. // - // * EventEndpointUpdated -- Topic ARN to which EndpointUpdate event notifications + // * EventEndpointUpdated – Topic ARN to which EndpointUpdate event notifications // should be sent. // - // * EventDeliveryFailure -- Topic ARN to which DeliveryFailure event notifications + // * EventDeliveryFailure – Topic ARN to which DeliveryFailure event notifications // should be sent upon Direct Publish delivery failure (permanent) to one // of the application's endpoints. Attributes map[string]*string `type:"map"` @@ -4077,31 +4139,31 @@ type GetSubscriptionAttributesOutput struct { // A map of the subscription's attributes. Attributes in this map include the // following: // - // * ConfirmationWasAuthenticated -- true if the subscription confirmation + // * ConfirmationWasAuthenticated – true if the subscription confirmation // request was authenticated. // - // * DeliveryPolicy -- The JSON serialization of the subscription's delivery + // * DeliveryPolicy – The JSON serialization of the subscription's delivery // policy. // - // * EffectiveDeliveryPolicy -- The JSON serialization of the effective delivery + // * EffectiveDeliveryPolicy – The JSON serialization of the effective delivery // policy that takes into account the topic delivery policy and account system // defaults. // - // * FilterPolicy -- The filter policy JSON that is assigned to the subscription. + // * FilterPolicy – The filter policy JSON that is assigned to the subscription. // - // * Owner -- The AWS account ID of the subscription's owner. + // * Owner – The AWS account ID of the subscription's owner. // - // * PendingConfirmation -- true if the subscription hasn't been confirmed. + // * PendingConfirmation – true if the subscription hasn't been confirmed. // To confirm a pending subscription, call the ConfirmSubscription action // with a confirmation token. // - // * RawMessageDelivery -- true if raw message delivery is enabled for the + // * RawMessageDelivery – true if raw message delivery is enabled for the // subscription. Raw messages are free of JSON formatting and can be sent // to HTTP/S and Amazon SQS endpoints. // - // * SubscriptionArn -- The subscription's ARN. + // * SubscriptionArn – The subscription's ARN. // - // * TopicArn -- The topic ARN that the subscription is associated with. + // * TopicArn – The topic ARN that the subscription is associated with. Attributes map[string]*string `type:"map"` } @@ -4166,27 +4228,26 @@ type GetTopicAttributesOutput struct { // A map of the topic's attributes. Attributes in this map include the following: // - // * TopicArn -- the topic's ARN + // * TopicArn – the topic's ARN // - // * Owner -- the AWS account ID of the topic's owner + // * Owner – the AWS account ID of the topic's owner // - // * Policy -- the JSON serialization of the topic's access control policy + // * Policy – the JSON serialization of the topic's access control policy // - // * DisplayName -- the human-readable name used in the "From" field for - // notifications to email and email-json endpoints + // * DisplayName – the human-readable name used in the "From" field for notifications + // to email and email-json endpoints // - // * SubscriptionsPending -- the number of subscriptions pending confirmation + // * SubscriptionsPending – the number of subscriptions pending confirmation // on this topic // - // * SubscriptionsConfirmed -- the number of confirmed subscriptions on this + // * SubscriptionsConfirmed – the number of confirmed subscriptions on this // topic // - // * SubscriptionsDeleted -- the number of deleted subscriptions on this - // topic + // * SubscriptionsDeleted – the number of deleted subscriptions on this topic // - // * DeliveryPolicy -- the JSON serialization of the topic's delivery policy + // * DeliveryPolicy – the JSON serialization of the topic's delivery policy // - // * EffectiveDeliveryPolicy -- the JSON serialization of the effective delivery + // * EffectiveDeliveryPolicy – the JSON serialization of the effective delivery // policy that takes into account system defaults Attributes map[string]*string `type:"map"` } @@ -4772,6 +4833,9 @@ type PublishInput struct { // The message you want to send. // + // The Message parameter is always a string. If you set MessageStructure to + // json, you must string-encode the Message parameter. + // // If you are publishing to a topic and you want to send the same message to // all transport protocols, include the text of the message as a String value. // If you want to send different messages for each transport protocol, set the @@ -4781,15 +4845,17 @@ type PublishInput struct { // Constraints: // // With the exception of SMS, messages must be UTF-8 encoded strings and at - // most 256 KB in size (262144 bytes, not 262144 characters). + // most 256 KB in size (262,144 bytes, not 262,144 characters). // - // * For SMS, each message can contain up to 140 bytes, and the character - // limit depends on the encoding scheme. For example, an SMS message can + // * For SMS, each message can contain up to 140 characters. This character + // limit depends on the encoding schema. For example, an SMS message can // contain 160 GSM characters, 140 ASCII characters, or 70 UCS-2 characters. - // If you publish a message that exceeds the size limit, Amazon SNS sends - // it as multiple messages, each fitting within the size limit. Messages - // are not cut off in the middle of a word but on whole-word boundaries. - // The total size limit for a single SMS publish action is 1600 bytes. + // + // * If you publish a message that exceeds this size limit, Amazon SNS sends + // the message as multiple messages, each fitting within the size limit. + // Messages aren't truncated mid-word but are cut off at whole-word boundaries. + // + // * The total size limit for a single SMS Publish action is 1,600 characters. // // JSON-specific constraints: // @@ -5045,16 +5111,16 @@ type SetEndpointAttributesInput struct { // A map of the endpoint attributes. Attributes in this map include the following: // - // * CustomUserData -- arbitrary user data to associate with the endpoint. + // * CustomUserData – arbitrary user data to associate with the endpoint. // Amazon SNS does not use this data. The data must be in UTF-8 format and // less than 2KB. // - // * Enabled -- flag that enables/disables delivery to the endpoint. Amazon + // * Enabled – flag that enables/disables delivery to the endpoint. Amazon // SNS will set this to false when a notification service indicates to Amazon // SNS that the endpoint is invalid. Users can set it back to true, typically // after updating Token. // - // * Token -- device token, also referred to as a registration id, for an + // * Token – device token, also referred to as a registration id, for an // app and mobile device. This is returned from the notification service // when an app and mobile device are registered with the notification service. // @@ -5126,36 +5192,35 @@ type SetPlatformApplicationAttributesInput struct { // A map of the platform application attributes. Attributes in this map include // the following: // - // * PlatformCredential -- The credential received from the notification - // service. For APNS/APNS_SANDBOX, PlatformCredential is private key. For - // GCM, PlatformCredential is "API key". For ADM, PlatformCredential is "client - // secret". + // * PlatformCredential – The credential received from the notification service. + // For APNS/APNS_SANDBOX, PlatformCredential is private key. For GCM, PlatformCredential + // is "API key". For ADM, PlatformCredential is "client secret". // - // * PlatformPrincipal -- The principal received from the notification service. + // * PlatformPrincipal – The principal received from the notification service. // For APNS/APNS_SANDBOX, PlatformPrincipal is SSL certificate. For GCM, // PlatformPrincipal is not applicable. For ADM, PlatformPrincipal is "client // id". // - // * EventEndpointCreated -- Topic ARN to which EndpointCreated event notifications + // * EventEndpointCreated – Topic ARN to which EndpointCreated event notifications // should be sent. // - // * EventEndpointDeleted -- Topic ARN to which EndpointDeleted event notifications + // * EventEndpointDeleted – Topic ARN to which EndpointDeleted event notifications // should be sent. // - // * EventEndpointUpdated -- Topic ARN to which EndpointUpdate event notifications + // * EventEndpointUpdated – Topic ARN to which EndpointUpdate event notifications // should be sent. // - // * EventDeliveryFailure -- Topic ARN to which DeliveryFailure event notifications + // * EventDeliveryFailure – Topic ARN to which DeliveryFailure event notifications // should be sent upon Direct Publish delivery failure (permanent) to one // of the application's endpoints. // - // * SuccessFeedbackRoleArn -- IAM role ARN used to give Amazon SNS write + // * SuccessFeedbackRoleArn – IAM role ARN used to give Amazon SNS write // access to use CloudWatch Logs on your behalf. // - // * FailureFeedbackRoleArn -- IAM role ARN used to give Amazon SNS write + // * FailureFeedbackRoleArn – IAM role ARN used to give Amazon SNS write // access to use CloudWatch Logs on your behalf. // - // * SuccessFeedbackSampleRate -- Sample rate percentage (0-100) of successfully + // * SuccessFeedbackSampleRate – Sample rate percentage (0-100) of successfully // delivered messages. // // Attributes is a required field @@ -5350,10 +5415,22 @@ func (s SetSMSAttributesOutput) GoString() string { type SetSubscriptionAttributesInput struct { _ struct{} `type:"structure"` - // The name of the attribute you want to set. Only a subset of the subscriptions - // attributes are mutable. + // A map of attributes with their corresponding values. + // + // The following lists the names, descriptions, and values of the special request + // parameters that the SetTopicAttributes action uses: // - // Valid values: DeliveryPolicy | FilterPolicy | RawMessageDelivery + // * DeliveryPolicy – The policy that defines how Amazon SNS retries failed + // deliveries to HTTP/S endpoints. + // + // * FilterPolicy – The simple JSON object that lets your subscriber receive + // only a subset of messages, rather than receiving every message published + // to the topic. + // + // * RawMessageDelivery – When set to true, enables raw message delivery + // to Amazon SQS or HTTP/S endpoints. This eliminates the need for the endpoints + // to process JSON formatting, which is otherwise created for Amazon SNS + // metadata. // // AttributeName is a required field AttributeName *string `type:"string" required:"true"` @@ -5429,10 +5506,18 @@ func (s SetSubscriptionAttributesOutput) GoString() string { type SetTopicAttributesInput struct { _ struct{} `type:"structure"` - // The name of the attribute you want to set. Only a subset of the topic's attributes - // are mutable. + // A map of attributes with their corresponding values. + // + // The following lists the names, descriptions, and values of the special request + // parameters that the SetTopicAttributes action uses: + // + // * DeliveryPolicy – The policy that defines how Amazon SNS retries failed + // deliveries to HTTP/S endpoints. + // + // * DisplayName – The display name to use for a topic with SMS subscriptions. // - // Valid values: Policy | DisplayName | DeliveryPolicy + // * Policy – The policy that defines who can access your topic. By default, + // only the topic owner can publish or subscribe to the topic. // // AttributeName is a required field AttributeName *string `type:"string" required:"true"` @@ -5508,8 +5593,22 @@ func (s SetTopicAttributesOutput) GoString() string { type SubscribeInput struct { _ struct{} `type:"structure"` - // Assigns attributes to the subscription as a map of key-value pairs. You can - // assign any attribute that is supported by the SetSubscriptionAttributes action. + // A map of attributes with their corresponding values. + // + // The following lists the names, descriptions, and values of the special request + // parameters that the SetTopicAttributes action uses: + // + // * DeliveryPolicy – The policy that defines how Amazon SNS retries failed + // deliveries to HTTP/S endpoints. + // + // * FilterPolicy – The simple JSON object that lets your subscriber receive + // only a subset of messages, rather than receiving every message published + // to the topic. + // + // * RawMessageDelivery – When set to true, enables raw message delivery + // to Amazon SQS or HTTP/S endpoints. This eliminates the need for the endpoints + // to process JSON formatting, which is otherwise created for Amazon SNS + // metadata. Attributes map[string]*string `type:"map"` // The endpoint that you want to receive notifications. Endpoints vary by protocol: @@ -5535,22 +5634,22 @@ type SubscribeInput struct { // The protocol you want to use. Supported protocols include: // - // * http -- delivery of JSON-encoded message via HTTP POST + // * http – delivery of JSON-encoded message via HTTP POST // - // * https -- delivery of JSON-encoded message via HTTPS POST + // * https – delivery of JSON-encoded message via HTTPS POST // - // * email -- delivery of message via SMTP + // * email – delivery of message via SMTP // - // * email-json -- delivery of JSON-encoded message via SMTP + // * email-json – delivery of JSON-encoded message via SMTP // - // * sms -- delivery of message via SMS + // * sms – delivery of message via SMS // - // * sqs -- delivery of JSON-encoded message to an Amazon SQS queue + // * sqs – delivery of JSON-encoded message to an Amazon SQS queue // - // * application -- delivery of JSON-encoded message to an EndpointArn for + // * application – delivery of JSON-encoded message to an EndpointArn for // a mobile app and device. // - // * lambda -- delivery of JSON-encoded message to an AWS Lambda function. + // * lambda – delivery of JSON-encoded message to an AWS Lambda function. // // Protocol is a required field Protocol *string `type:"string" required:"true"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/sns/errors.go b/vendor/github.com/aws/aws-sdk-go/service/sns/errors.go index 9d2993bcc0..9a16c083fa 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sns/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sns/errors.go @@ -42,6 +42,57 @@ const ( // Indicates that a request parameter does not comply with the associated constraints. ErrCodeInvalidParameterValueException = "ParameterValueInvalid" + // ErrCodeInvalidSecurityException for service response error code + // "InvalidSecurity". + // + // The credential signature isn't valid. You must use an HTTPS endpoint and + // sign your request using Signature Version 4. + ErrCodeInvalidSecurityException = "InvalidSecurity" + + // ErrCodeKMSAccessDeniedException for service response error code + // "KMSAccessDenied". + // + // The ciphertext references a key that doesn't exist or that you don't have + // access to. + ErrCodeKMSAccessDeniedException = "KMSAccessDenied" + + // ErrCodeKMSDisabledException for service response error code + // "KMSDisabled". + // + // The request was rejected because the specified customer master key (CMK) + // isn't enabled. + ErrCodeKMSDisabledException = "KMSDisabled" + + // ErrCodeKMSInvalidStateException for service response error code + // "KMSInvalidState". + // + // The request was rejected because the state of the specified resource isn't + // valid for this request. For more information, see How Key State Affects Use + // of a Customer Master Key (http://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) + // in the AWS Key Management Service Developer Guide. + ErrCodeKMSInvalidStateException = "KMSInvalidState" + + // ErrCodeKMSNotFoundException for service response error code + // "KMSNotFound". + // + // The request was rejected because the specified entity or resource can't be + // found. + ErrCodeKMSNotFoundException = "KMSNotFound" + + // ErrCodeKMSOptInRequired for service response error code + // "KMSOptInRequired". + // + // The AWS access key ID needs a subscription for the service. + ErrCodeKMSOptInRequired = "KMSOptInRequired" + + // ErrCodeKMSThrottlingException for service response error code + // "KMSThrottling". + // + // The request was denied due to request throttling. For more information about + // throttling, see Limits (http://docs.aws.amazon.com/kms/latest/developerguide/limits.html#requests-per-second) + // in the AWS Key Management Service Developer Guide. + ErrCodeKMSThrottlingException = "KMSThrottling" + // ErrCodeNotFoundException for service response error code // "NotFound". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/sqs/api.go b/vendor/github.com/aws/aws-sdk-go/service/sqs/api.go index 1b42a7dd68..16f82a4b28 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sqs/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sqs/api.go @@ -17,7 +17,7 @@ const opAddPermission = "AddPermission" // AddPermissionRequest generates a "aws/request.Request" representing the // client's request for the AddPermission operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -51,8 +51,7 @@ func (c *SQS) AddPermissionRequest(input *AddPermissionInput) (req *request.Requ output = &AddPermissionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -63,21 +62,29 @@ func (c *SQS) AddPermissionRequest(input *AddPermissionInput) (req *request.Requ // // When you create a queue, you have full control access rights for the queue. // Only you, the owner of the queue, can grant or deny permissions to the queue. -// For more information about these permissions, see Shared Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/acp-overview.html) +// For more information about these permissions, see Allow Developers to Write +// Messages to a Shared Queue (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-writing-an-sqs-policy.html#write-messages-to-shared-queue) // in the Amazon Simple Queue Service Developer Guide. // // AddPermission writes an Amazon-SQS-generated policy. If you want to write // your own policy, use SetQueueAttributes to upload your policy. For more information -// about writing your own policy, see Using The Access Policy Language (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/AccessPolicyLanguage.html) +// about writing your own policy, see Using Custom Policies with the Amazon +// SQS Access Policy Language (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-creating-custom-policies.html) // in the Amazon Simple Queue Service Developer Guide. // +// An Amazon SQS policy can have a maximum of 7 actions. +// // Some actions take lists of parameters. These lists are specified using the // param.n notation. Values of n are integers starting from 1. For example, // a parameter list with two elements looks like this: // -// &Attribute.1=this +// &Attribute.1=first +// +// &Attribute.2=second // -// &Attribute.2=that +// Cross-account permissions don't apply to this action. For more information, +// see see Grant Cross-Account Permissions to a Role and a User Name (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) +// in the Amazon Simple Queue Service Developer 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 @@ -88,10 +95,10 @@ func (c *SQS) AddPermissionRequest(input *AddPermissionInput) (req *request.Requ // // Returned Error Codes: // * ErrCodeOverLimit "OverLimit" -// The action that you requested would violate a limit. For example, ReceiveMessage -// returns this error if the maximum number of inflight messages is reached. -// AddPermission returns this error if the maximum number of permissions for -// the queue is reached. +// The specified action violates a limit. For example, ReceiveMessage returns +// this error if the maximum number of inflight messages is reached and AddPermission +// returns this error if the maximum number of permissions for the queue is +// reached. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/AddPermission func (c *SQS) AddPermission(input *AddPermissionInput) (*AddPermissionOutput, error) { @@ -120,7 +127,7 @@ const opChangeMessageVisibility = "ChangeMessageVisibility" // ChangeMessageVisibilityRequest generates a "aws/request.Request" representing the // client's request for the ChangeMessageVisibility operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -154,26 +161,22 @@ func (c *SQS) ChangeMessageVisibilityRequest(input *ChangeMessageVisibilityInput output = &ChangeMessageVisibilityOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // ChangeMessageVisibility API operation for Amazon Simple Queue Service. // // Changes the visibility timeout of a specified message in a queue to a new -// value. The maximum allowed timeout value is 12 hours. Thus, you can't extend -// the timeout of a message in an existing queue to more than a total visibility -// timeout of 12 hours. For more information, see Visibility Timeout (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) +// value. The maximum allowed timeout value is 12 hours. For more information, +// see Visibility Timeout (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) // in the Amazon Simple Queue Service Developer Guide. // // For example, you have a message with a visibility timeout of 5 minutes. After -// 3 minutes, you call ChangeMessageVisiblity with a timeout of 10 minutes. -// At that time, the timeout for the message is extended by 10 minutes beyond -// the time of the ChangeMessageVisibility action. This results in a total visibility -// timeout of 13 minutes. You can continue to call the ChangeMessageVisibility -// to extend the visibility timeout to a maximum of 12 hours. If you try to -// extend the visibility timeout beyond 12 hours, your request is rejected. +// 3 minutes, you call ChangeMessageVisibility with a timeout of 10 minutes. +// You can continue to call ChangeMessageVisibility to extend the visibility +// timeout to a maximum of 12 hours. If you try to extend the visibility timeout +// beyond 12 hours, your request is rejected. // // A message is considered to be in flight after it's received from a queue // by a consumer, but not yet deleted from the queue. @@ -207,10 +210,10 @@ func (c *SQS) ChangeMessageVisibilityRequest(input *ChangeMessageVisibilityInput // // Returned Error Codes: // * ErrCodeMessageNotInflight "AWS.SimpleQueueService.MessageNotInflight" -// The message referred to isn't in flight. +// The specified message isn't in flight. // // * ErrCodeReceiptHandleIsInvalid "ReceiptHandleIsInvalid" -// The receipt handle provided isn't valid. +// The specified receipt handle isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/ChangeMessageVisibility func (c *SQS) ChangeMessageVisibility(input *ChangeMessageVisibilityInput) (*ChangeMessageVisibilityOutput, error) { @@ -239,7 +242,7 @@ const opChangeMessageVisibilityBatch = "ChangeMessageVisibilityBatch" // ChangeMessageVisibilityBatchRequest generates a "aws/request.Request" representing the // client's request for the ChangeMessageVisibilityBatch operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -291,9 +294,9 @@ func (c *SQS) ChangeMessageVisibilityBatchRequest(input *ChangeMessageVisibility // param.n notation. Values of n are integers starting from 1. For example, // a parameter list with two elements looks like this: // -// &Attribute.1=this +// &Attribute.1=first // -// &Attribute.2=that +// &Attribute.2=second // // 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 @@ -342,7 +345,7 @@ const opCreateQueue = "CreateQueue" // CreateQueueRequest generates a "aws/request.Request" representing the // client's request for the CreateQueue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -390,7 +393,7 @@ func (c *SQS) CreateQueueRequest(input *CreateQueueInput) (req *request.Request, // You can't change the queue type after you create it and you can't convert // an existing standard queue into a FIFO queue. You must either create a // new FIFO queue for your application or delete your existing standard queue -// and recreate it as a FIFO queue. For more information, see Moving From +// and recreate it as a FIFO queue. For more information, see Moving From // a Standard Queue to a FIFO Queue (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html#FIFO-queues-moving) // in the Amazon Simple Queue Service Developer Guide. // @@ -418,9 +421,13 @@ func (c *SQS) CreateQueueRequest(input *CreateQueueInput) (req *request.Request, // param.n notation. Values of n are integers starting from 1. For example, // a parameter list with two elements looks like this: // -// &Attribute.1=this +// &Attribute.1=first // -// &Attribute.2=that +// &Attribute.2=second +// +// Cross-account permissions don't apply to this action. For more information, +// see see Grant Cross-Account Permissions to a Role and a User Name (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) +// in the Amazon Simple Queue Service Developer 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 @@ -432,10 +439,10 @@ func (c *SQS) CreateQueueRequest(input *CreateQueueInput) (req *request.Request, // Returned Error Codes: // * ErrCodeQueueDeletedRecently "AWS.SimpleQueueService.QueueDeletedRecently" // You must wait 60 seconds after deleting a queue before you can create another -// one with the same name. +// queue with the same name. // // * ErrCodeQueueNameExists "QueueAlreadyExists" -// A queue already exists with this name. Amazon SQS returns this error only +// A queue with this name already exists. Amazon SQS returns this error only // if the request includes attributes whose values differ from those of the // existing queue. // @@ -466,7 +473,7 @@ const opDeleteMessage = "DeleteMessage" // DeleteMessageRequest generates a "aws/request.Request" representing the // client's request for the DeleteMessage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -500,33 +507,32 @@ func (c *SQS) DeleteMessageRequest(input *DeleteMessageInput) (req *request.Requ output = &DeleteMessageOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DeleteMessage API operation for Amazon Simple Queue Service. // -// Deletes the specified message from the specified queue. You specify the message -// by using the message's receipt handle and not the MessageId you receive when -// you send the message. Even if the message is locked by another reader due -// to the visibility timeout setting, it is still deleted from the queue. If -// you leave a message in the queue for longer than the queue's configured retention -// period, Amazon SQS automatically deletes the message. +// Deletes the specified message from the specified queue. To select the message +// to delete, use the ReceiptHandle of the message (not the MessageId which +// you receive when you send the message). Amazon SQS can delete a message from +// a queue even if a visibility timeout setting causes the message to be locked +// by another consumer. Amazon SQS automatically deletes messages left in a +// queue longer than the retention period configured for the queue. // -// The receipt handle is associated with a specific instance of receiving the -// message. If you receive a message more than once, the receipt handle you -// get each time you receive the message is different. If you don't provide -// the most recently received receipt handle for the message when you use the -// DeleteMessage action, the request succeeds, but the message might not be -// deleted. +// The ReceiptHandle is associated with a specific instance of receiving a message. +// If you receive a message more than once, the ReceiptHandle is different each +// time you receive a message. When you use the DeleteMessage action, you must +// provide the most recently received ReceiptHandle for the message (otherwise, +// the request succeeds, but the message might not be deleted). // // For standard queues, it is possible to receive a message even after you delete -// it. This might happen on rare occasions if one of the servers storing a copy -// of the message is unavailable when you send the request to delete the message. -// The copy remains on the server and might be returned to you on a subsequent -// receive request. You should ensure that your application is idempotent, so -// that receiving a message more than once does not cause issues. +// it. This might happen on rare occasions if one of the servers which stores +// a copy of the message is unavailable when you send the request to delete +// the message. The copy remains on the server and might be returned to you +// during a subsequent receive request. You should ensure that your application +// is idempotent, so that receiving a message more than once does not cause +// issues. // // 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 @@ -537,10 +543,10 @@ func (c *SQS) DeleteMessageRequest(input *DeleteMessageInput) (req *request.Requ // // Returned Error Codes: // * ErrCodeInvalidIdFormat "InvalidIdFormat" -// The receipt handle isn't valid for the current version. +// The specified receipt handle isn't valid for the current version. // // * ErrCodeReceiptHandleIsInvalid "ReceiptHandleIsInvalid" -// The receipt handle provided isn't valid. +// The specified receipt handle isn't valid. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/DeleteMessage func (c *SQS) DeleteMessage(input *DeleteMessageInput) (*DeleteMessageOutput, error) { @@ -569,7 +575,7 @@ const opDeleteMessageBatch = "DeleteMessageBatch" // DeleteMessageBatchRequest generates a "aws/request.Request" representing the // client's request for the DeleteMessageBatch operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -620,9 +626,9 @@ func (c *SQS) DeleteMessageBatchRequest(input *DeleteMessageBatchInput) (req *re // param.n notation. Values of n are integers starting from 1. For example, // a parameter list with two elements looks like this: // -// &Attribute.1=this +// &Attribute.1=first // -// &Attribute.2=that +// &Attribute.2=second // // 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 @@ -671,7 +677,7 @@ const opDeleteQueue = "DeleteQueue" // DeleteQueueRequest generates a "aws/request.Request" representing the // client's request for the DeleteQueue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -705,8 +711,7 @@ func (c *SQS) DeleteQueueRequest(input *DeleteQueueInput) (req *request.Request, output = &DeleteQueueOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -726,6 +731,10 @@ func (c *SQS) DeleteQueueRequest(input *DeleteQueueInput) (req *request.Request, // When you delete a queue, you must wait at least 60 seconds before creating // a queue with the same name. // +// Cross-account permissions don't apply to this action. For more information, +// see see Grant Cross-Account Permissions to a Role and a User Name (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) +// in the Amazon Simple Queue Service Developer 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. @@ -759,7 +768,7 @@ const opGetQueueAttributes = "GetQueueAttributes" // GetQueueAttributesRequest generates a "aws/request.Request" representing the // client's request for the GetQueueAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -807,9 +816,9 @@ func (c *SQS) GetQueueAttributesRequest(input *GetQueueAttributesInput) (req *re // param.n notation. Values of n are integers starting from 1. For example, // a parameter list with two elements looks like this: // -// &Attribute.1=this +// &Attribute.1=first // -// &Attribute.2=that +// &Attribute.2=second // // 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 @@ -820,7 +829,7 @@ func (c *SQS) GetQueueAttributesRequest(input *GetQueueAttributesInput) (req *re // // Returned Error Codes: // * ErrCodeInvalidAttributeName "InvalidAttributeName" -// The attribute referred to doesn't exist. +// The specified attribute doesn't exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/GetQueueAttributes func (c *SQS) GetQueueAttributes(input *GetQueueAttributesInput) (*GetQueueAttributesOutput, error) { @@ -849,7 +858,7 @@ const opGetQueueUrl = "GetQueueUrl" // GetQueueUrlRequest generates a "aws/request.Request" representing the // client's request for the GetQueueUrl operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -888,13 +897,13 @@ func (c *SQS) GetQueueUrlRequest(input *GetQueueUrlInput) (req *request.Request, // GetQueueUrl API operation for Amazon Simple Queue Service. // -// Returns the URL of an existing queue. This action provides a simple way to -// retrieve the URL of an Amazon SQS queue. +// Returns the URL of an existing Amazon SQS queue. // // To access a queue that belongs to another AWS account, use the QueueOwnerAWSAccountId // parameter to specify the account ID of the queue's owner. The queue's owner // must grant you permission to access the queue. For more information about -// shared queue access, see AddPermission or see Shared Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/acp-overview.html) +// shared queue access, see AddPermission or see Allow Developers to Write Messages +// to a Shared Queue (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-writing-an-sqs-policy.html#write-messages-to-shared-queue) // in the Amazon Simple Queue Service Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -906,7 +915,7 @@ func (c *SQS) GetQueueUrlRequest(input *GetQueueUrlInput) (req *request.Request, // // Returned Error Codes: // * ErrCodeQueueDoesNotExist "AWS.SimpleQueueService.NonExistentQueue" -// The queue referred to doesn't exist. +// The specified queue doesn't exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/GetQueueUrl func (c *SQS) GetQueueUrl(input *GetQueueUrlInput) (*GetQueueUrlOutput, error) { @@ -935,7 +944,7 @@ const opListDeadLetterSourceQueues = "ListDeadLetterSourceQueues" // ListDeadLetterSourceQueuesRequest generates a "aws/request.Request" representing the // client's request for the ListDeadLetterSourceQueues operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -990,7 +999,7 @@ func (c *SQS) ListDeadLetterSourceQueuesRequest(input *ListDeadLetterSourceQueue // // Returned Error Codes: // * ErrCodeQueueDoesNotExist "AWS.SimpleQueueService.NonExistentQueue" -// The queue referred to doesn't exist. +// The specified queue doesn't exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/ListDeadLetterSourceQueues func (c *SQS) ListDeadLetterSourceQueues(input *ListDeadLetterSourceQueuesInput) (*ListDeadLetterSourceQueuesOutput, error) { @@ -1019,7 +1028,7 @@ const opListQueueTags = "ListQueueTags" // ListQueueTagsRequest generates a "aws/request.Request" representing the // client's request for the ListQueueTags operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1059,7 +1068,7 @@ func (c *SQS) ListQueueTagsRequest(input *ListQueueTagsInput) (req *request.Requ // ListQueueTags API operation for Amazon Simple Queue Service. // // List all cost allocation tags added to the specified Amazon SQS queue. For -// an overview, see Tagging Amazon SQS Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-tagging-queues.html) +// an overview, see Tagging Your Amazon SQS Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-tags.html) // in the Amazon Simple Queue Service Developer Guide. // // When you use queue tags, keep the following guidelines in mind: @@ -1074,10 +1083,14 @@ func (c *SQS) ListQueueTagsRequest(input *ListQueueTagsInput) (req *request.Requ // * A new tag with a key identical to that of an existing tag overwrites // the existing tag. // -// * Tagging API actions are limited to 5 TPS per AWS account. If your application +// * Tagging actions are limited to 5 TPS per AWS account. If your application // requires a higher throughput, file a technical support request (https://console.aws.amazon.com/support/home#/case/create?issueType=technical). // -// For a full list of tag restrictions, see Limits Related to Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/limits-queues.html) +// For a full list of tag restrictions, see Limits Related to Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-limits.html#limits-queues) +// in the Amazon Simple Queue Service Developer Guide. +// +// Cross-account permissions don't apply to this action. For more information, +// see see Grant Cross-Account Permissions to a Role and a User Name (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) // in the Amazon Simple Queue Service Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -1113,7 +1126,7 @@ const opListQueues = "ListQueues" // ListQueuesRequest generates a "aws/request.Request" representing the // client's request for the ListQueues operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1156,6 +1169,10 @@ func (c *SQS) ListQueuesRequest(input *ListQueuesInput) (req *request.Request, o // is 1,000. If you specify a value for the optional QueueNamePrefix parameter, // only queues with a name that begins with the specified value are returned. // +// Cross-account permissions don't apply to this action. For more information, +// see see Grant Cross-Account Permissions to a Role and a User Name (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) +// in the Amazon Simple Queue Service Developer 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. @@ -1189,7 +1206,7 @@ const opPurgeQueue = "PurgeQueue" // PurgeQueueRequest generates a "aws/request.Request" representing the // client's request for the PurgeQueue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1223,8 +1240,7 @@ func (c *SQS) PurgeQueueRequest(input *PurgeQueueInput) (req *request.Request, o output = &PurgeQueueOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1232,14 +1248,17 @@ func (c *SQS) PurgeQueueRequest(input *PurgeQueueInput) (req *request.Request, o // // Deletes the messages in a queue specified by the QueueURL parameter. // -// When you use the PurgeQueue action, you can't retrieve a message deleted +// When you use the PurgeQueue action, you can't retrieve any messages deleted // from a queue. // -// When you purge a queue, the message deletion process takes up to 60 seconds. -// All messages sent to the queue before calling the PurgeQueue action are deleted. -// Messages sent to the queue while it is being purged might be deleted. While -// the queue is being purged, messages sent to the queue before PurgeQueue is -// called might be received, but are deleted within the next minute. +// The message deletion process takes up to 60 seconds. We recommend waiting +// for 60 seconds regardless of your queue's size. +// +// Messages sent to the queue before you call PurgeQueue might be received but +// are deleted within the next minute. +// +// Messages sent to the queue after you call PurgeQueue might be deleted while +// the queue is being purged. // // 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 @@ -1250,7 +1269,7 @@ func (c *SQS) PurgeQueueRequest(input *PurgeQueueInput) (req *request.Request, o // // Returned Error Codes: // * ErrCodeQueueDoesNotExist "AWS.SimpleQueueService.NonExistentQueue" -// The queue referred to doesn't exist. +// The specified queue doesn't exist. // // * ErrCodePurgeQueueInProgress "AWS.SimpleQueueService.PurgeQueueInProgress" // Indicates that the specified queue previously received a PurgeQueue request @@ -1284,7 +1303,7 @@ const opReceiveMessage = "ReceiveMessage" // ReceiveMessageRequest generates a "aws/request.Request" representing the // client's request for the ReceiveMessage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1380,10 +1399,10 @@ func (c *SQS) ReceiveMessageRequest(input *ReceiveMessageInput) (req *request.Re // // Returned Error Codes: // * ErrCodeOverLimit "OverLimit" -// The action that you requested would violate a limit. For example, ReceiveMessage -// returns this error if the maximum number of inflight messages is reached. -// AddPermission returns this error if the maximum number of permissions for -// the queue is reached. +// The specified action violates a limit. For example, ReceiveMessage returns +// this error if the maximum number of inflight messages is reached and AddPermission +// returns this error if the maximum number of permissions for the queue is +// reached. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/ReceiveMessage func (c *SQS) ReceiveMessage(input *ReceiveMessageInput) (*ReceiveMessageOutput, error) { @@ -1412,7 +1431,7 @@ const opRemovePermission = "RemovePermission" // RemovePermissionRequest generates a "aws/request.Request" representing the // client's request for the RemovePermission operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1446,15 +1465,20 @@ func (c *SQS) RemovePermissionRequest(input *RemovePermissionInput) (req *reques output = &RemovePermissionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // RemovePermission API operation for Amazon Simple Queue Service. // // Revokes any permissions in the queue policy that matches the specified Label -// parameter. Only the owner of the queue can remove permissions. +// parameter. +// +// Only the owner of a queue can remove permissions from it. +// +// Cross-account permissions don't apply to this action. For more information, +// see see Grant Cross-Account Permissions to a Role and a User Name (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) +// in the Amazon Simple Queue Service Developer 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 @@ -1489,7 +1513,7 @@ const opSendMessage = "SendMessage" // SendMessageRequest generates a "aws/request.Request" representing the // client's request for the SendMessage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1579,7 +1603,7 @@ const opSendMessageBatch = "SendMessageBatch" // SendMessageBatchRequest generates a "aws/request.Request" representing the // client's request for the SendMessageBatch operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1646,9 +1670,9 @@ func (c *SQS) SendMessageBatchRequest(input *SendMessageBatchInput) (req *reques // param.n notation. Values of n are integers starting from 1. For example, // a parameter list with two elements looks like this: // -// &Attribute.1=this +// &Attribute.1=first // -// &Attribute.2=that +// &Attribute.2=second // // 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 @@ -1703,7 +1727,7 @@ const opSetQueueAttributes = "SetQueueAttributes" // SetQueueAttributesRequest generates a "aws/request.Request" representing the // client's request for the SetQueueAttributes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1737,8 +1761,7 @@ func (c *SQS) SetQueueAttributesRequest(input *SetQueueAttributesInput) (req *re output = &SetQueueAttributesOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1753,6 +1776,10 @@ func (c *SQS) SetQueueAttributesRequest(input *SetQueueAttributesInput) (req *re // this action, we recommend that you structure your code so that it can handle // new attributes gracefully. // +// Cross-account permissions don't apply to this action. For more information, +// see see Grant Cross-Account Permissions to a Role and a User Name (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) +// in the Amazon Simple Queue Service Developer 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. @@ -1762,7 +1789,7 @@ func (c *SQS) SetQueueAttributesRequest(input *SetQueueAttributesInput) (req *re // // Returned Error Codes: // * ErrCodeInvalidAttributeName "InvalidAttributeName" -// The attribute referred to doesn't exist. +// The specified attribute doesn't exist. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05/SetQueueAttributes func (c *SQS) SetQueueAttributes(input *SetQueueAttributesInput) (*SetQueueAttributesOutput, error) { @@ -1791,7 +1818,7 @@ const opTagQueue = "TagQueue" // TagQueueRequest generates a "aws/request.Request" representing the // client's request for the TagQueue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1825,15 +1852,14 @@ func (c *SQS) TagQueueRequest(input *TagQueueInput) (req *request.Request, outpu output = &TagQueueOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // TagQueue API operation for Amazon Simple Queue Service. // // Add cost allocation tags to the specified Amazon SQS queue. For an overview, -// see Tagging Amazon SQS Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-tagging-queues.html) +// see Tagging Your Amazon SQS Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-tags.html) // in the Amazon Simple Queue Service Developer Guide. // // When you use queue tags, keep the following guidelines in mind: @@ -1848,10 +1874,14 @@ func (c *SQS) TagQueueRequest(input *TagQueueInput) (req *request.Request, outpu // * A new tag with a key identical to that of an existing tag overwrites // the existing tag. // -// * Tagging API actions are limited to 5 TPS per AWS account. If your application +// * Tagging actions are limited to 5 TPS per AWS account. If your application // requires a higher throughput, file a technical support request (https://console.aws.amazon.com/support/home#/case/create?issueType=technical). // -// For a full list of tag restrictions, see Limits Related to Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/limits-queues.html) +// For a full list of tag restrictions, see Limits Related to Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-limits.html#limits-queues) +// in the Amazon Simple Queue Service Developer Guide. +// +// Cross-account permissions don't apply to this action. For more information, +// see see Grant Cross-Account Permissions to a Role and a User Name (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) // in the Amazon Simple Queue Service Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -1887,7 +1917,7 @@ const opUntagQueue = "UntagQueue" // UntagQueueRequest generates a "aws/request.Request" representing the // client's request for the UntagQueue operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1921,15 +1951,14 @@ func (c *SQS) UntagQueueRequest(input *UntagQueueInput) (req *request.Request, o output = &UntagQueueOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(query.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // UntagQueue API operation for Amazon Simple Queue Service. // // Remove cost allocation tags from the specified Amazon SQS queue. For an overview, -// see Tagging Amazon SQS Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-tagging-queues.html) +// see Tagging Your Amazon SQS Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-tags.html) // in the Amazon Simple Queue Service Developer Guide. // // When you use queue tags, keep the following guidelines in mind: @@ -1944,10 +1973,14 @@ func (c *SQS) UntagQueueRequest(input *UntagQueueInput) (req *request.Request, o // * A new tag with a key identical to that of an existing tag overwrites // the existing tag. // -// * Tagging API actions are limited to 5 TPS per AWS account. If your application +// * Tagging actions are limited to 5 TPS per AWS account. If your application // requires a higher throughput, file a technical support request (https://console.aws.amazon.com/support/home#/case/create?issueType=technical). // -// For a full list of tag restrictions, see Limits Related to Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/limits-queues.html) +// For a full list of tag restrictions, see Limits Related to Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-limits.html#limits-queues) +// in the Amazon Simple Queue Service Developer Guide. +// +// Cross-account permissions don't apply to this action. For more information, +// see see Grant Cross-Account Permissions to a Role and a User Name (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) // in the Amazon Simple Queue Service Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -1984,30 +2017,17 @@ type AddPermissionInput struct { // The AWS account number of the principal (http://docs.aws.amazon.com/general/latest/gr/glos-chap.html#P) // who is given permission. The principal must have an AWS account, but does // not need to be signed up for Amazon SQS. For information about locating the - // AWS account identification, see Your AWS Identifiers (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/AWSCredentials.html) + // AWS account identification, see Your AWS Identifiers (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-making-api-requests.html#sqs-api-request-authentication) // in the Amazon Simple Queue Service Developer Guide. // // AWSAccountIds is a required field AWSAccountIds []*string `locationNameList:"AWSAccountId" type:"list" flattened:"true" required:"true"` - // The action the client wants to allow for the specified principal. The following - // values are valid: - // - // * * - // - // * ChangeMessageVisibility - // - // * DeleteMessage + // The action the client wants to allow for the specified principal. Valid values: + // the name of any action or *. // - // * GetQueueAttributes - // - // * GetQueueUrl - // - // * ReceiveMessage - // - // * SendMessage - // - // For more information about these actions, see Understanding Permissions (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/acp-overview.html#PermissionTypes) + // For more information about these actions, see Overview of Managing Access + // Permissions to Your Amazon Simple Queue Service Resource (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-overview-of-managing-access.html) // in the Amazon Simple Queue Service Developer Guide. // // Specifying SendMessage, DeleteMessage, or ChangeMessageVisibility for ActionName.n @@ -2026,7 +2046,7 @@ type AddPermissionInput struct { // The URL of the Amazon SQS queue to which permissions are added. // - // Queue URLs are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueUrl is a required field QueueUrl *string `type:"string" required:"true"` @@ -2102,8 +2122,8 @@ func (s AddPermissionOutput) GoString() string { return s.String() } -// This is used in the responses of batch API to give a detailed description -// of the result of an action on each entry in the request. +// Gives a detailed description of the result of an action on each entry in +// the request. type BatchResultErrorEntry struct { _ struct{} `type:"structure"` @@ -2120,7 +2140,7 @@ type BatchResultErrorEntry struct { // A message explaining why the action failed on this entry. Message *string `type:"string"` - // Specifies whether the error happened due to the sender's fault. + // Specifies whether the error happened due to the producer. // // SenderFault is a required field SenderFault *bool `type:"boolean" required:"true"` @@ -2171,7 +2191,7 @@ type ChangeMessageVisibilityBatchInput struct { // The URL of the Amazon SQS queue whose messages' visibility is changed. // - // Queue URLs are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueUrl is a required field QueueUrl *string `type:"string" required:"true"` @@ -2272,7 +2292,7 @@ func (s *ChangeMessageVisibilityBatchOutput) SetSuccessful(v []*ChangeMessageVis // // &ChangeMessageVisibilityBatchRequestEntry.1.Id=change_visibility_msg_2 // -// &ChangeMessageVisibilityBatchRequestEntry.1.ReceiptHandle=Your_Receipt_Handle +// &ChangeMessageVisibilityBatchRequestEntry.1.ReceiptHandle=your_receipt_handle // // &ChangeMessageVisibilityBatchRequestEntry.1.VisibilityTimeout=45 type ChangeMessageVisibilityBatchRequestEntry struct { @@ -2370,7 +2390,7 @@ type ChangeMessageVisibilityInput struct { // The URL of the Amazon SQS queue whose message's visibility is changed. // - // Queue URLs are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueUrl is a required field QueueUrl *string `type:"string" required:"true"` @@ -2459,16 +2479,15 @@ type CreateQueueInput struct { // // * DelaySeconds - The length of time, in seconds, for which the delivery // of all messages in the queue is delayed. Valid values: An integer from - // 0 to 900 seconds (15 minutes). The default is 0 (zero). + // 0 to 900 seconds (15 minutes). Default: 0. // // * MaximumMessageSize - The limit of how many bytes a message can contain // before Amazon SQS rejects it. Valid values: An integer from 1,024 bytes - // (1 KiB) to 262,144 bytes (256 KiB). The default is 262,144 (256 KiB). - // + // (1 KiB) to 262,144 bytes (256 KiB). Default: 262,144 (256 KiB). // // * MessageRetentionPeriod - The length of time, in seconds, for which Amazon // SQS retains a message. Valid values: An integer from 60 seconds (1 minute) - // to 1,209,600 seconds (14 days). The default is 345,600 (4 days). + // to 1,209,600 seconds (14 days). Default: 345,600 (4 days). // // * Policy - The queue's policy. A valid AWS policy. For more information // about policy structure, see Overview of AWS IAM Policies (http://docs.aws.amazon.com/IAM/latest/UserGuide/PoliciesOverview.html) @@ -2476,7 +2495,7 @@ type CreateQueueInput struct { // // * ReceiveMessageWaitTimeSeconds - The length of time, in seconds, for // which a ReceiveMessage action waits for a message to arrive. Valid values: - // An integer from 0 to 20 (seconds). The default is 0 (zero). + // An integer from 0 to 20 (seconds). Default: 0. // // * RedrivePolicy - The string that includes the parameters for the dead-letter // queue functionality of the source queue. For more information about the @@ -2489,14 +2508,17 @@ type CreateQueueInput struct { // is exceeded. // // maxReceiveCount - The number of times a message is delivered to the source - // queue before being moved to the dead-letter queue. + // queue before being moved to the dead-letter queue. When the ReceiveCount + // for a message exceeds the maxReceiveCount for a queue, Amazon SQS moves + // the message to the dead-letter-queue. // // The dead-letter queue of a FIFO queue must also be a FIFO queue. Similarly, // the dead-letter queue of a standard queue must also be a standard queue. // - // * VisibilityTimeout - The visibility timeout for the queue. Valid values: - // An integer from 0 to 43,200 (12 hours). The default is 30. For more information - // about the visibility timeout, see Visibility Timeout (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) + // * VisibilityTimeout - The visibility timeout for the queue, in seconds. + // Valid values: An integer from 0 to 43,200 (12 hours). Default: 30. For + // more information about the visibility timeout, see Visibility Timeout + // (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) // in the Amazon Simple Queue Service Developer Guide. // // The following attributes apply only to server-side-encryption (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html): @@ -2512,10 +2534,10 @@ type CreateQueueInput struct { // Amazon SQS can reuse a data key (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#data-keys) // to encrypt or decrypt messages before calling AWS KMS again. An integer // representing seconds, between 60 seconds (1 minute) and 86,400 seconds - // (24 hours). The default is 300 (5 minutes). A shorter time period provides - // better security but results in more calls to KMS which might incur charges - // after Free Tier. For more information, see How Does the Data Key Reuse - // Period Work? (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work). + // (24 hours). Default: 300 (5 minutes). A shorter time period provides better + // security but results in more calls to KMS which might incur charges after + // Free Tier. For more information, see How Does the Data Key Reuse Period + // Work? (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work). // // // The following attributes apply only to FIFO (first-in-first-out) queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html): @@ -2556,20 +2578,6 @@ type CreateQueueInput struct { // message with a MessageDeduplicationId that is the same as the one generated // for the first MessageDeduplicationId, the two messages are treated as // duplicates and only one copy of the message is delivered. - // - // Any other valid special request parameters (such as the following) are ignored: - // - // * ApproximateNumberOfMessages - // - // * ApproximateNumberOfMessagesDelayed - // - // * ApproximateNumberOfMessagesNotVisible - // - // * CreatedTimestamp - // - // * LastModifiedTimestamp - // - // * QueueArn Attributes map[string]*string `locationName:"Attribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true"` // The name of the new queue. The following limits apply to this name: @@ -2581,7 +2589,7 @@ type CreateQueueInput struct { // // * A FIFO queue name must end with the .fifo suffix. // - // Queue names are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueName is a required field QueueName *string `type:"string" required:"true"` @@ -2656,7 +2664,7 @@ type DeleteMessageBatchInput struct { // The URL of the Amazon SQS queue from which messages are deleted. // - // Queue URLs are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueUrl is a required field QueueUrl *string `type:"string" required:"true"` @@ -2836,7 +2844,7 @@ type DeleteMessageInput struct { // The URL of the Amazon SQS queue from which messages are deleted. // - // Queue URLs are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueUrl is a required field QueueUrl *string `type:"string" required:"true"` @@ -2904,7 +2912,7 @@ type DeleteQueueInput struct { // The URL of the Amazon SQS queue to delete. // - // Queue URLs are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueUrl is a required field QueueUrl *string `type:"string" required:"true"` @@ -2966,18 +2974,18 @@ type GetQueueAttributesInput struct { // // * All - Returns all values. // - // * ApproximateNumberOfMessages - Returns the approximate number of visible - // messages in a queue. For more information, see Resources Required to Process - // Messages (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-resources-required-process-messages.html) - // in the Amazon Simple Queue Service Developer Guide. + // * ApproximateNumberOfMessages - Returns the approximate number of messages + // available for retrieval from the queue. // // * ApproximateNumberOfMessagesDelayed - Returns the approximate number - // of messages that are waiting to be added to the queue. + // of messages in the queue that are delayed and not available for reading + // immediately. This can happen when the queue is configured as a delay queue + // or when a message has been sent with a delay parameter. // // * ApproximateNumberOfMessagesNotVisible - Returns the approximate number - // of messages that have not timed-out and aren't deleted. For more information, - // see Resources Required to Process Messages (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-resources-required-process-messages.html) - // in the Amazon Simple Queue Service Developer Guide. + // of messages that are in flight. Messages are considered to be in flight + // if they have been sent to a client but have not yet been deleted or have + // not yet reached the end of their visibility window. // // * CreatedTimestamp - Returns the time when the queue was created in seconds // (epoch time (http://en.wikipedia.org/wiki/Unix_time)). @@ -3011,7 +3019,9 @@ type GetQueueAttributesInput struct { // is exceeded. // // maxReceiveCount - The number of times a message is delivered to the source - // queue before being moved to the dead-letter queue. + // queue before being moved to the dead-letter queue. When the ReceiveCount + // for a message exceeds the maxReceiveCount for a queue, Amazon SQS moves + // the message to the dead-letter-queue. // // * VisibilityTimeout - Returns the visibility timeout for the queue. For // more information about the visibility timeout, see Visibility Timeout @@ -3048,7 +3058,7 @@ type GetQueueAttributesInput struct { // The URL of the Amazon SQS queue whose attribute information is retrieved. // - // Queue URLs are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueUrl is a required field QueueUrl *string `type:"string" required:"true"` @@ -3119,7 +3129,7 @@ type GetQueueUrlInput struct { // The name of the queue whose URL must be fetched. Maximum 80 characters. Valid // values: alphanumeric characters, hyphens (-), and underscores (_). // - // Queue names are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueName is a required field QueueName *string `type:"string" required:"true"` @@ -3163,7 +3173,7 @@ func (s *GetQueueUrlInput) SetQueueOwnerAWSAccountId(v string) *GetQueueUrlInput return s } -// For more information, see Responses (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/UnderstandingResponses.html) +// For more information, see Interpreting Responses (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-api-responses.html) // in the Amazon Simple Queue Service Developer Guide. type GetQueueUrlOutput struct { _ struct{} `type:"structure"` @@ -3193,7 +3203,7 @@ type ListDeadLetterSourceQueuesInput struct { // The URL of a dead-letter queue. // - // Queue URLs are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueUrl is a required field QueueUrl *string `type:"string" required:"true"` @@ -3322,7 +3332,7 @@ type ListQueuesInput struct { // A string to use for filtering the list results. Only those queues whose name // begins with the specified string are returned. // - // Queue names are case-sensitive. + // Queue URLs and names are case-sensitive. QueueNamePrefix *string `type:"string"` } @@ -3370,8 +3380,24 @@ func (s *ListQueuesOutput) SetQueueUrls(v []*string) *ListQueuesOutput { type Message struct { _ struct{} `type:"structure"` - // SenderId, SentTimestamp, ApproximateReceiveCount, and/or ApproximateFirstReceiveTimestamp. - // SentTimestamp and ApproximateFirstReceiveTimestamp are each returned as an + // A map of the attributes requested in ReceiveMessage to their respective values. + // Supported attributes: + // + // * ApproximateReceiveCount + // + // * ApproximateFirstReceiveTimestamp + // + // * MessageDeduplicationId + // + // * MessageGroupId + // + // * SenderId + // + // * SentTimestamp + // + // * SequenceNumber + // + // ApproximateFirstReceiveTimestamp and SentTimestamp are each returned as an // integer representing the epoch time (http://en.wikipedia.org/wiki/Unix_time) // in milliseconds. Attributes map[string]*string `locationName:"Attribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true"` @@ -3389,7 +3415,7 @@ type Message struct { MD5OfMessageAttributes *string `type:"string"` // Each message attribute consists of a Name, Type, and Value. For more information, - // see Message Attribute Items and Validation (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html#message-attributes-items-validation) + // see Amazon SQS Message Attributes (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html) // in the Amazon Simple Queue Service Developer Guide. MessageAttributes map[string]*MessageAttributeValue `locationName:"MessageAttribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true"` @@ -3477,8 +3503,8 @@ type MessageAttributeValue struct { // Amazon SQS supports the following logical data types: String, Number, and // Binary. For the Number data type, you must use StringValue. // - // You can also append custom labels. For more information, see Message Attribute - // Data Types and Validation (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html#message-attributes-data-types-validation) + // You can also append custom labels. For more information, see Amazon SQS Message + // Attributes (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html) // in the Amazon Simple Queue Service Developer Guide. // // DataType is a required field @@ -3550,7 +3576,7 @@ type PurgeQueueInput struct { // The URL of the queue from which the PurgeQueue action deletes messages. // - // Queue URLs are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueUrl is a required field QueueUrl *string `type:"string" required:"true"` @@ -3602,8 +3628,8 @@ func (s PurgeQueueOutput) GoString() string { type ReceiveMessageInput struct { _ struct{} `type:"structure"` - // A list of attributes that need to be returned along with each message. These - // attributes include: + // A list of s that need to be returned along with each message. These attributes + // include: // // * All - Returns all values. // @@ -3623,51 +3649,19 @@ type ReceiveMessageInput struct { // * SentTimestamp - Returns the time the message was sent to the queue (epoch // time (http://en.wikipedia.org/wiki/Unix_time) in milliseconds). // - // * MessageDeduplicationId - Returns the value provided by the sender that - // calls the SendMessage action. + // * MessageDeduplicationId - Returns the value provided by the producer + // that calls the SendMessage action. // - // * MessageGroupId - Returns the value provided by the sender that calls + // * MessageGroupId - Returns the value provided by the producer that calls // the SendMessage action. Messages with the same MessageGroupId are returned // in sequence. // // * SequenceNumber - Returns the value provided by Amazon SQS. - // - // Any other valid special request parameters (such as the following) are ignored: - // - // * ApproximateNumberOfMessages - // - // * ApproximateNumberOfMessagesDelayed - // - // * ApproximateNumberOfMessagesNotVisible - // - // * CreatedTimestamp - // - // * ContentBasedDeduplication - // - // * DelaySeconds - // - // * FifoQueue - // - // * LastModifiedTimestamp - // - // * MaximumMessageSize - // - // * MessageRetentionPeriod - // - // * Policy - // - // * QueueArn, - // - // * ReceiveMessageWaitTimeSeconds - // - // * RedrivePolicy - // - // * VisibilityTimeout AttributeNames []*string `locationNameList:"AttributeName" type:"list" flattened:"true"` // The maximum number of messages to return. Amazon SQS never returns more messages - // than this value (however, fewer messages might be returned). Valid values - // are 1 to 10. Default is 1. + // than this value (however, fewer messages might be returned). Valid values: + // 1 to 10. Default: 1. MaxNumberOfMessages *int64 `type:"integer"` // The name of the message attribute, where N is the index. @@ -3694,7 +3688,7 @@ type ReceiveMessageInput struct { // The URL of the Amazon SQS queue from which messages are received. // - // Queue URLs are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueUrl is a required field QueueUrl *string `type:"string" required:"true"` @@ -3726,11 +3720,11 @@ type ReceiveMessageInput struct { // information, see Visibility Timeout (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) // in the Amazon Simple Queue Service Developer Guide. // - // If a caller of the ReceiveMessage action is still processing messages when - // the visibility timeout expires and messages become visible, another worker - // reading from the same queue can receive the same messages and therefore - // process duplicates. Also, if a reader whose message processing time is - // longer than the visibility timeout tries to delete the processed messages, + // If a caller of the ReceiveMessage action still processes messages when the + // visibility timeout expires and messages become visible, another worker + // consuming from the same queue can receive the same messages and therefore + // process duplicates. Also, if a consumer whose message processing time + // is longer than the visibility timeout tries to delete the processed messages, // the action fails with an error. // // To mitigate this effect, ensure that your application observes a safe threshold @@ -3750,7 +3744,7 @@ type ReceiveMessageInput struct { // can contain alphanumeric characters (a-z, A-Z, 0-9) and punctuation (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~). // // For best practices of using ReceiveRequestAttemptId, see Using the ReceiveRequestAttemptId - // Request Parameter (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queue-recommendations.html#using-receiverequestattemptid-request-parameter) + // Request Parameter (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-receiverequestattemptid-request-parameter.html) // in the Amazon Simple Queue Service Developer Guide. ReceiveRequestAttemptId *string `type:"string"` @@ -3865,7 +3859,7 @@ type RemovePermissionInput struct { // The URL of the Amazon SQS queue from which permissions are removed. // - // Queue URLs are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueUrl is a required field QueueUrl *string `type:"string" required:"true"` @@ -3933,7 +3927,7 @@ type SendMessageBatchInput struct { // The URL of the Amazon SQS queue to which batched messages are sent. // - // Queue URLs are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueUrl is a required field QueueUrl *string `type:"string" required:"true"` @@ -4044,11 +4038,14 @@ type SendMessageBatchRequestEntry struct { // // The Ids of a batch request need to be unique within a request // + // This identifier can have up to 80 characters. The following characters are + // accepted: alphanumeric characters, hyphens(-), and underscores (_). + // // Id is a required field Id *string `type:"string" required:"true"` // Each message attribute consists of a Name, Type, and Value. For more information, - // see Message Attribute Items and Validation (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html#message-attributes-items-validation) + // see Amazon SQS Message Attributes (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html) // in the Amazon Simple Queue Service Developer Guide. MessageAttributes map[string]*MessageAttributeValue `locationName:"MessageAttribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true"` @@ -4090,18 +4087,21 @@ type SendMessageBatchRequestEntry struct { // one generated for the first MessageDeduplicationId, the two messages are // treated as duplicates and only one copy of the message is delivered. // - // The MessageDeduplicationId is available to the recipient of the message (this + // The MessageDeduplicationId is available to the consumer of the message (this // can be useful for troubleshooting delivery issues). // // If a message is sent successfully but the acknowledgement is lost and the // message is resent with the same MessageDeduplicationId after the deduplication // interval, Amazon SQS can't detect duplicate messages. // + // Amazon SQS continues to keep track of the message deduplication ID even after + // the message is received and deleted. + // // The length of MessageDeduplicationId is 128 characters. MessageDeduplicationId // can contain alphanumeric characters (a-z, A-Z, 0-9) and punctuation (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~). // // For best practices of using MessageDeduplicationId, see Using the MessageDeduplicationId - // Property (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queue-recommendations.html#using-messagededuplicationid-property) + // Property (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-messagededuplicationid-property.html) // in the Amazon Simple Queue Service Developer Guide. MessageDeduplicationId *string `type:"string"` @@ -4112,8 +4112,8 @@ type SendMessageBatchRequestEntry struct { // (however, messages in different message groups might be processed out of // order). To interleave multiple ordered streams within a single queue, use // MessageGroupId values (for example, session data for multiple users). In - // this scenario, multiple readers can process the queue, but the session data - // of each user is processed in a FIFO fashion. + // this scenario, multiple consumers can process the queue, but the session + // data of each user is processed in a FIFO fashion. // // * You must associate a non-empty MessageGroupId with a message. If you // don't provide a MessageGroupId, the action fails. @@ -4122,11 +4122,11 @@ type SendMessageBatchRequestEntry struct { // For each MessageGroupId, the messages are sorted by time sent. The caller // can't specify a MessageGroupId. // - // The length of MessageGroupId is 128 characters. Valid values are alphanumeric + // The length of MessageGroupId is 128 characters. Valid values: alphanumeric // characters and punctuation (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~). // // For best practices of using MessageGroupId, see Using the MessageGroupId - // Property (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queue-recommendations.html#using-messagegroupid-property) + // Property (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-messagegroupid-property.html) // in the Amazon Simple Queue Service Developer Guide. // // MessageGroupId is required for FIFO queues. You can't use it for Standard @@ -4296,7 +4296,7 @@ type SendMessageInput struct { DelaySeconds *int64 `type:"integer"` // Each message attribute consists of a Name, Type, and Value. For more information, - // see Message Attribute Items and Validation (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html#message-attributes-items-validation) + // see Amazon SQS Message Attributes (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html) // in the Amazon Simple Queue Service Developer Guide. MessageAttributes map[string]*MessageAttributeValue `locationName:"MessageAttribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true"` @@ -4346,18 +4346,21 @@ type SendMessageInput struct { // one generated for the first MessageDeduplicationId, the two messages are // treated as duplicates and only one copy of the message is delivered. // - // The MessageDeduplicationId is available to the recipient of the message (this + // The MessageDeduplicationId is available to the consumer of the message (this // can be useful for troubleshooting delivery issues). // // If a message is sent successfully but the acknowledgement is lost and the // message is resent with the same MessageDeduplicationId after the deduplication // interval, Amazon SQS can't detect duplicate messages. // + // Amazon SQS continues to keep track of the message deduplication ID even after + // the message is received and deleted. + // // The length of MessageDeduplicationId is 128 characters. MessageDeduplicationId // can contain alphanumeric characters (a-z, A-Z, 0-9) and punctuation (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~). // // For best practices of using MessageDeduplicationId, see Using the MessageDeduplicationId - // Property (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queue-recommendations.html#using-messagededuplicationid-property) + // Property (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-messagededuplicationid-property.html) // in the Amazon Simple Queue Service Developer Guide. MessageDeduplicationId *string `type:"string"` @@ -4368,8 +4371,8 @@ type SendMessageInput struct { // (however, messages in different message groups might be processed out of // order). To interleave multiple ordered streams within a single queue, use // MessageGroupId values (for example, session data for multiple users). In - // this scenario, multiple readers can process the queue, but the session data - // of each user is processed in a FIFO fashion. + // this scenario, multiple consumers can process the queue, but the session + // data of each user is processed in a FIFO fashion. // // * You must associate a non-empty MessageGroupId with a message. If you // don't provide a MessageGroupId, the action fails. @@ -4378,11 +4381,11 @@ type SendMessageInput struct { // For each MessageGroupId, the messages are sorted by time sent. The caller // can't specify a MessageGroupId. // - // The length of MessageGroupId is 128 characters. Valid values are alphanumeric + // The length of MessageGroupId is 128 characters. Valid values: alphanumeric // characters and punctuation (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~). // // For best practices of using MessageGroupId, see Using the MessageGroupId - // Property (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queue-recommendations.html#using-messagegroupid-property) + // Property (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/using-messagegroupid-property.html) // in the Amazon Simple Queue Service Developer Guide. // // MessageGroupId is required for FIFO queues. You can't use it for Standard @@ -4391,7 +4394,7 @@ type SendMessageInput struct { // The URL of the Amazon SQS queue to which a message is sent. // - // Queue URLs are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueUrl is a required field QueueUrl *string `type:"string" required:"true"` @@ -4543,16 +4546,15 @@ type SetQueueAttributesInput struct { // // * DelaySeconds - The length of time, in seconds, for which the delivery // of all messages in the queue is delayed. Valid values: An integer from - // 0 to 900 (15 minutes). The default is 0 (zero). + // 0 to 900 (15 minutes). Default: 0. // // * MaximumMessageSize - The limit of how many bytes a message can contain // before Amazon SQS rejects it. Valid values: An integer from 1,024 bytes - // (1 KiB) up to 262,144 bytes (256 KiB). The default is 262,144 (256 KiB). - // + // (1 KiB) up to 262,144 bytes (256 KiB). Default: 262,144 (256 KiB). // // * MessageRetentionPeriod - The length of time, in seconds, for which Amazon // SQS retains a message. Valid values: An integer representing seconds, - // from 60 (1 minute) to 1,209,600 (14 days). The default is 345,600 (4 days). + // from 60 (1 minute) to 1,209,600 (14 days). Default: 345,600 (4 days). // // // * Policy - The queue's policy. A valid AWS policy. For more information @@ -4561,7 +4563,7 @@ type SetQueueAttributesInput struct { // // * ReceiveMessageWaitTimeSeconds - The length of time, in seconds, for // which a ReceiveMessage action waits for a message to arrive. Valid values: - // an integer from 0 to 20 (seconds). The default is 0. + // an integer from 0 to 20 (seconds). Default: 0. // // * RedrivePolicy - The string that includes the parameters for the dead-letter // queue functionality of the source queue. For more information about the @@ -4574,14 +4576,17 @@ type SetQueueAttributesInput struct { // is exceeded. // // maxReceiveCount - The number of times a message is delivered to the source - // queue before being moved to the dead-letter queue. + // queue before being moved to the dead-letter queue. When the ReceiveCount + // for a message exceeds the maxReceiveCount for a queue, Amazon SQS moves + // the message to the dead-letter-queue. // // The dead-letter queue of a FIFO queue must also be a FIFO queue. Similarly, // the dead-letter queue of a standard queue must also be a standard queue. // - // * VisibilityTimeout - The visibility timeout for the queue. Valid values: - // an integer from 0 to 43,200 (12 hours). The default is 30. For more information - // about the visibility timeout, see Visibility Timeout (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) + // * VisibilityTimeout - The visibility timeout for the queue, in seconds. + // Valid values: an integer from 0 to 43,200 (12 hours). Default: 30. For + // more information about the visibility timeout, see Visibility Timeout + // (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html) // in the Amazon Simple Queue Service Developer Guide. // // The following attributes apply only to server-side-encryption (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html): @@ -4597,10 +4602,10 @@ type SetQueueAttributesInput struct { // Amazon SQS can reuse a data key (http://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#data-keys) // to encrypt or decrypt messages before calling AWS KMS again. An integer // representing seconds, between 60 seconds (1 minute) and 86,400 seconds - // (24 hours). The default is 300 (5 minutes). A shorter time period provides - // better security but results in more calls to KMS which might incur charges - // after Free Tier. For more information, see How Does the Data Key Reuse - // Period Work? (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work). + // (24 hours). Default: 300 (5 minutes). A shorter time period provides better + // security but results in more calls to KMS which might incur charges after + // Free Tier. For more information, see How Does the Data Key Reuse Period + // Work? (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html#sqs-how-does-the-data-key-reuse-period-work). // // // The following attribute applies only to FIFO (first-in-first-out) queues @@ -4634,26 +4639,12 @@ type SetQueueAttributesInput struct { // for the first MessageDeduplicationId, the two messages are treated as // duplicates and only one copy of the message is delivered. // - // Any other valid special request parameters (such as the following) are ignored: - // - // * ApproximateNumberOfMessages - // - // * ApproximateNumberOfMessagesDelayed - // - // * ApproximateNumberOfMessagesNotVisible - // - // * CreatedTimestamp - // - // * LastModifiedTimestamp - // - // * QueueArn - // // Attributes is a required field Attributes map[string]*string `locationName:"Attribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true" required:"true"` // The URL of the Amazon SQS queue whose attributes are set. // - // Queue URLs are case-sensitive. + // Queue URLs and names are case-sensitive. // // QueueUrl is a required field QueueUrl *string `type:"string" required:"true"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/sqs/checksums.go b/vendor/github.com/aws/aws-sdk-go/service/sqs/checksums.go index 5dd17c4d96..e85e89a817 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sqs/checksums.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sqs/checksums.go @@ -54,9 +54,8 @@ func verifySendMessageBatch(r *request.Request) { in := r.Params.(*SendMessageBatchInput) for _, entry := range in.Entries { - if e := entries[*entry.Id]; e != nil { - err := checksumsMatch(entry.MessageBody, e.MD5OfMessageBody) - if err != nil { + if e, ok := entries[*entry.Id]; ok { + if err := checksumsMatch(entry.MessageBody, e.MD5OfMessageBody); err != nil { ids = append(ids, *e.MessageId) } } diff --git a/vendor/github.com/aws/aws-sdk-go/service/sqs/doc.go b/vendor/github.com/aws/aws-sdk-go/service/sqs/doc.go index 7f0c5799fb..6f33803596 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sqs/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sqs/doc.go @@ -31,11 +31,14 @@ // // * Amazon Simple Queue Service Developer Guide // -// Making API Requests (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/MakingRequestsArticle.html) +// Making API Requests (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-making-api-requests.html) // -// Using Amazon SQS Message Attributes (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html) +// Amazon SQS Message Attributes (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html) // -// Using Amazon SQS Dead-Letter Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html) +// Amazon SQS Dead-Letter Queues (http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html) +// +// * Amazon SQS in the (http://docs.aws.amazon.com/cli/latest/reference/sqs/index.html)AWS +// CLI Command Reference // // * Amazon Web Services General Reference // diff --git a/vendor/github.com/aws/aws-sdk-go/service/sqs/errors.go b/vendor/github.com/aws/aws-sdk-go/service/sqs/errors.go index 722867d329..89eb40d7fd 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sqs/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sqs/errors.go @@ -25,7 +25,7 @@ const ( // ErrCodeInvalidAttributeName for service response error code // "InvalidAttributeName". // - // The attribute referred to doesn't exist. + // The specified attribute doesn't exist. ErrCodeInvalidAttributeName = "InvalidAttributeName" // ErrCodeInvalidBatchEntryId for service response error code @@ -37,7 +37,7 @@ const ( // ErrCodeInvalidIdFormat for service response error code // "InvalidIdFormat". // - // The receipt handle isn't valid for the current version. + // The specified receipt handle isn't valid for the current version. ErrCodeInvalidIdFormat = "InvalidIdFormat" // ErrCodeInvalidMessageContents for service response error code @@ -49,16 +49,16 @@ const ( // ErrCodeMessageNotInflight for service response error code // "AWS.SimpleQueueService.MessageNotInflight". // - // The message referred to isn't in flight. + // The specified message isn't in flight. ErrCodeMessageNotInflight = "AWS.SimpleQueueService.MessageNotInflight" // ErrCodeOverLimit for service response error code // "OverLimit". // - // The action that you requested would violate a limit. For example, ReceiveMessage - // returns this error if the maximum number of inflight messages is reached. - // AddPermission returns this error if the maximum number of permissions for - // the queue is reached. + // The specified action violates a limit. For example, ReceiveMessage returns + // this error if the maximum number of inflight messages is reached and AddPermission + // returns this error if the maximum number of permissions for the queue is + // reached. ErrCodeOverLimit = "OverLimit" // ErrCodePurgeQueueInProgress for service response error code @@ -73,19 +73,19 @@ const ( // "AWS.SimpleQueueService.QueueDeletedRecently". // // You must wait 60 seconds after deleting a queue before you can create another - // one with the same name. + // queue with the same name. ErrCodeQueueDeletedRecently = "AWS.SimpleQueueService.QueueDeletedRecently" // ErrCodeQueueDoesNotExist for service response error code // "AWS.SimpleQueueService.NonExistentQueue". // - // The queue referred to doesn't exist. + // The specified queue doesn't exist. ErrCodeQueueDoesNotExist = "AWS.SimpleQueueService.NonExistentQueue" // ErrCodeQueueNameExists for service response error code // "QueueAlreadyExists". // - // A queue already exists with this name. Amazon SQS returns this error only + // A queue with this name already exists. Amazon SQS returns this error only // if the request includes attributes whose values differ from those of the // existing queue. ErrCodeQueueNameExists = "QueueAlreadyExists" @@ -93,7 +93,7 @@ const ( // ErrCodeReceiptHandleIsInvalid for service response error code // "ReceiptHandleIsInvalid". // - // The receipt handle provided isn't valid. + // The specified receipt handle isn't valid. ErrCodeReceiptHandleIsInvalid = "ReceiptHandleIsInvalid" // ErrCodeTooManyEntriesInBatchRequest for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go index ddfb5cd5b9..eac9dcdac2 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ssm/api.go @@ -9,6 +9,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) const opAddTagsToResource = "AddTagsToResource" @@ -16,7 +18,7 @@ const opAddTagsToResource = "AddTagsToResource" // AddTagsToResourceRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -50,6 +52,7 @@ func (c *SSM) AddTagsToResourceRequest(input *AddTagsToResourceInput) (req *requ output = &AddTagsToResourceOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -130,7 +133,7 @@ const opCancelCommand = "CancelCommand" // CancelCommandRequest generates a "aws/request.Request" representing the // client's request for the CancelCommand operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -164,6 +167,7 @@ func (c *SSM) CancelCommandRequest(input *CancelCommandInput) (req *request.Requ output = &CancelCommandOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -225,12 +229,100 @@ func (c *SSM) CancelCommandWithContext(ctx aws.Context, input *CancelCommandInpu return out, req.Send() } +const opCancelMaintenanceWindowExecution = "CancelMaintenanceWindowExecution" + +// CancelMaintenanceWindowExecutionRequest generates a "aws/request.Request" representing the +// client's request for the CancelMaintenanceWindowExecution 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 CancelMaintenanceWindowExecution for more information on using the CancelMaintenanceWindowExecution +// 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 CancelMaintenanceWindowExecutionRequest method. +// req, resp := client.CancelMaintenanceWindowExecutionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CancelMaintenanceWindowExecution +func (c *SSM) CancelMaintenanceWindowExecutionRequest(input *CancelMaintenanceWindowExecutionInput) (req *request.Request, output *CancelMaintenanceWindowExecutionOutput) { + op := &request.Operation{ + Name: opCancelMaintenanceWindowExecution, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CancelMaintenanceWindowExecutionInput{} + } + + output = &CancelMaintenanceWindowExecutionOutput{} + req = c.newRequest(op, input, output) + return +} + +// CancelMaintenanceWindowExecution API operation for Amazon Simple Systems Manager (SSM). +// +// Stops a Maintenance Window execution that is already in progress and cancels +// any tasks in the window that have not already starting running. (Tasks already +// in progress will continue to completion.) +// +// 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 Simple Systems Manager (SSM)'s +// API operation CancelMaintenanceWindowExecution for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// * ErrCodeDoesNotExistException "DoesNotExistException" +// Error returned when the ID specified for a resource, such as a Maintenance +// Window or Patch baseline, doesn't exist. +// +// For information about resource limits in Systems Manager, see AWS Systems +// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/CancelMaintenanceWindowExecution +func (c *SSM) CancelMaintenanceWindowExecution(input *CancelMaintenanceWindowExecutionInput) (*CancelMaintenanceWindowExecutionOutput, error) { + req, out := c.CancelMaintenanceWindowExecutionRequest(input) + return out, req.Send() +} + +// CancelMaintenanceWindowExecutionWithContext is the same as CancelMaintenanceWindowExecution with the addition of +// the ability to pass a context and additional request options. +// +// See CancelMaintenanceWindowExecution 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 *SSM) CancelMaintenanceWindowExecutionWithContext(ctx aws.Context, input *CancelMaintenanceWindowExecutionInput, opts ...request.Option) (*CancelMaintenanceWindowExecutionOutput, error) { + req, out := c.CancelMaintenanceWindowExecutionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateActivation = "CreateActivation" // CreateActivationRequest generates a "aws/request.Request" representing the // client's request for the CreateActivation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -313,7 +405,7 @@ const opCreateAssociation = "CreateAssociation" // CreateAssociationRequest generates a "aws/request.Request" representing the // client's request for the CreateAssociation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -360,7 +452,7 @@ func (c *SSM) CreateAssociationRequest(input *CreateAssociationInput) (req *requ // the instance as specified. // // If you associate a document with an instance that already has an associated -// document, the system throws the AssociationAlreadyExists exception. +// document, the system returns the AssociationAlreadyExists exception. // // 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 @@ -446,7 +538,7 @@ const opCreateAssociationBatch = "CreateAssociationBatch" // CreateAssociationBatchRequest generates a "aws/request.Request" representing the // client's request for the CreateAssociationBatch operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -493,7 +585,7 @@ func (c *SSM) CreateAssociationBatchRequest(input *CreateAssociationBatchInput) // the instance as specified. // // If you associate a document with an instance that already has an associated -// document, the system throws the AssociationAlreadyExists exception. +// document, the system returns the AssociationAlreadyExists exception. // // 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 @@ -579,7 +671,7 @@ const opCreateDocument = "CreateDocument" // CreateDocumentRequest generates a "aws/request.Request" representing the // client's request for the CreateDocument operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -676,7 +768,7 @@ const opCreateMaintenanceWindow = "CreateMaintenanceWindow" // CreateMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the CreateMaintenanceWindow operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -766,7 +858,7 @@ const opCreatePatchBaseline = "CreatePatchBaseline" // CreatePatchBaselineRequest generates a "aws/request.Request" representing the // client's request for the CreatePatchBaseline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -859,7 +951,7 @@ const opCreateResourceDataSync = "CreateResourceDataSync" // CreateResourceDataSyncRequest generates a "aws/request.Request" representing the // client's request for the CreateResourceDataSync operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -893,6 +985,7 @@ func (c *SSM) CreateResourceDataSyncRequest(input *CreateResourceDataSyncInput) output = &CreateResourceDataSyncOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -957,7 +1050,7 @@ const opDeleteActivation = "DeleteActivation" // DeleteActivationRequest generates a "aws/request.Request" representing the // client's request for the DeleteActivation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -991,6 +1084,7 @@ func (c *SSM) DeleteActivationRequest(input *DeleteActivationInput) (req *reques output = &DeleteActivationOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1051,7 +1145,7 @@ const opDeleteAssociation = "DeleteAssociation" // DeleteAssociationRequest generates a "aws/request.Request" representing the // client's request for the DeleteAssociation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1085,6 +1179,7 @@ func (c *SSM) DeleteAssociationRequest(input *DeleteAssociationInput) (req *requ output = &DeleteAssociationOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1160,7 +1255,7 @@ const opDeleteDocument = "DeleteDocument" // DeleteDocumentRequest generates a "aws/request.Request" representing the // client's request for the DeleteDocument operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1194,6 +1289,7 @@ func (c *SSM) DeleteDocumentRequest(input *DeleteDocumentInput) (req *request.Re output = &DeleteDocumentOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1254,7 +1350,7 @@ const opDeleteInventory = "DeleteInventory" // DeleteInventoryRequest generates a "aws/request.Request" representing the // client's request for the DeleteInventory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1349,7 +1445,7 @@ const opDeleteMaintenanceWindow = "DeleteMaintenanceWindow" // DeleteMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the DeleteMaintenanceWindow operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1428,7 +1524,7 @@ const opDeleteParameter = "DeleteParameter" // DeleteParameterRequest generates a "aws/request.Request" representing the // client's request for the DeleteParameter operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1462,6 +1558,7 @@ func (c *SSM) DeleteParameterRequest(input *DeleteParameterInput) (req *request. output = &DeleteParameterOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1510,7 +1607,7 @@ const opDeleteParameters = "DeleteParameters" // DeleteParametersRequest generates a "aws/request.Request" representing the // client's request for the DeleteParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1590,7 +1687,7 @@ const opDeletePatchBaseline = "DeletePatchBaseline" // DeletePatchBaselineRequest generates a "aws/request.Request" representing the // client's request for the DeletePatchBaseline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1673,7 +1770,7 @@ const opDeleteResourceDataSync = "DeleteResourceDataSync" // DeleteResourceDataSyncRequest generates a "aws/request.Request" representing the // client's request for the DeleteResourceDataSync operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1707,6 +1804,7 @@ func (c *SSM) DeleteResourceDataSyncRequest(input *DeleteResourceDataSyncInput) output = &DeleteResourceDataSyncOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1758,7 +1856,7 @@ const opDeregisterManagedInstance = "DeregisterManagedInstance" // DeregisterManagedInstanceRequest generates a "aws/request.Request" representing the // client's request for the DeregisterManagedInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1792,6 +1890,7 @@ func (c *SSM) DeregisterManagedInstanceRequest(input *DeregisterManagedInstanceI output = &DeregisterManagedInstanceOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -1854,7 +1953,7 @@ const opDeregisterPatchBaselineForPatchGroup = "DeregisterPatchBaselineForPatchG // DeregisterPatchBaselineForPatchGroupRequest generates a "aws/request.Request" representing the // client's request for the DeregisterPatchBaselineForPatchGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1937,7 +2036,7 @@ const opDeregisterTargetFromMaintenanceWindow = "DeregisterTargetFromMaintenance // DeregisterTargetFromMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the DeregisterTargetFromMaintenanceWindow operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2027,7 +2126,7 @@ const opDeregisterTaskFromMaintenanceWindow = "DeregisterTaskFromMaintenanceWind // DeregisterTaskFromMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the DeregisterTaskFromMaintenanceWindow operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2113,7 +2212,7 @@ const opDescribeActivations = "DescribeActivations" // DescribeActivationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeActivations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2257,7 +2356,7 @@ const opDescribeAssociation = "DescribeAssociation" // DescribeAssociationRequest generates a "aws/request.Request" representing the // client's request for the DescribeAssociation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2366,7 +2465,7 @@ const opDescribeAssociationExecutionTargets = "DescribeAssociationExecutionTarge // DescribeAssociationExecutionTargetsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAssociationExecutionTargets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2455,7 +2554,7 @@ const opDescribeAssociationExecutions = "DescribeAssociationExecutions" // DescribeAssociationExecutionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAssociationExecutions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2540,7 +2639,7 @@ const opDescribeAutomationExecutions = "DescribeAutomationExecutions" // DescribeAutomationExecutionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAutomationExecutions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2628,7 +2727,7 @@ const opDescribeAutomationStepExecutions = "DescribeAutomationStepExecutions" // DescribeAutomationStepExecutionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeAutomationStepExecutions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2721,7 +2820,7 @@ const opDescribeAvailablePatches = "DescribeAvailablePatches" // DescribeAvailablePatchesRequest generates a "aws/request.Request" representing the // client's request for the DescribeAvailablePatches operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2800,7 +2899,7 @@ const opDescribeDocument = "DescribeDocument" // DescribeDocumentRequest generates a "aws/request.Request" representing the // client's request for the DescribeDocument operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2885,7 +2984,7 @@ const opDescribeDocumentPermission = "DescribeDocumentPermission" // DescribeDocumentPermissionRequest generates a "aws/request.Request" representing the // client's request for the DescribeDocumentPermission operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2973,7 +3072,7 @@ const opDescribeEffectiveInstanceAssociations = "DescribeEffectiveInstanceAssoci // DescribeEffectiveInstanceAssociationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeEffectiveInstanceAssociations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3070,7 +3169,7 @@ const opDescribeEffectivePatchesForPatchBaseline = "DescribeEffectivePatchesForP // DescribeEffectivePatchesForPatchBaselineRequest generates a "aws/request.Request" representing the // client's request for the DescribeEffectivePatchesForPatchBaseline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3167,7 +3266,7 @@ const opDescribeInstanceAssociationsStatus = "DescribeInstanceAssociationsStatus // DescribeInstanceAssociationsStatusRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstanceAssociationsStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3264,7 +3363,7 @@ const opDescribeInstanceInformation = "DescribeInstanceInformation" // DescribeInstanceInformationRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstanceInformation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3432,7 +3531,7 @@ const opDescribeInstancePatchStates = "DescribeInstancePatchStates" // DescribeInstancePatchStatesRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstancePatchStates operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3514,7 +3613,7 @@ const opDescribeInstancePatchStatesForPatchGroup = "DescribeInstancePatchStatesF // DescribeInstancePatchStatesForPatchGroupRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstancePatchStatesForPatchGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3601,7 +3700,7 @@ const opDescribeInstancePatches = "DescribeInstancePatches" // DescribeInstancePatchesRequest generates a "aws/request.Request" representing the // client's request for the DescribeInstancePatches operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3703,7 +3802,7 @@ const opDescribeInventoryDeletions = "DescribeInventoryDeletions" // DescribeInventoryDeletionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeInventoryDeletions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3789,7 +3888,7 @@ const opDescribeMaintenanceWindowExecutionTaskInvocations = "DescribeMaintenance // DescribeMaintenanceWindowExecutionTaskInvocationsRequest generates a "aws/request.Request" representing the // client's request for the DescribeMaintenanceWindowExecutionTaskInvocations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3876,7 +3975,7 @@ const opDescribeMaintenanceWindowExecutionTasks = "DescribeMaintenanceWindowExec // DescribeMaintenanceWindowExecutionTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeMaintenanceWindowExecutionTasks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3962,7 +4061,7 @@ const opDescribeMaintenanceWindowExecutions = "DescribeMaintenanceWindowExecutio // DescribeMaintenanceWindowExecutionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeMaintenanceWindowExecutions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4038,12 +4137,98 @@ func (c *SSM) DescribeMaintenanceWindowExecutionsWithContext(ctx aws.Context, in return out, req.Send() } +const opDescribeMaintenanceWindowSchedule = "DescribeMaintenanceWindowSchedule" + +// DescribeMaintenanceWindowScheduleRequest generates a "aws/request.Request" representing the +// client's request for the DescribeMaintenanceWindowSchedule 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 DescribeMaintenanceWindowSchedule for more information on using the DescribeMaintenanceWindowSchedule +// 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 DescribeMaintenanceWindowScheduleRequest method. +// req, resp := client.DescribeMaintenanceWindowScheduleRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowSchedule +func (c *SSM) DescribeMaintenanceWindowScheduleRequest(input *DescribeMaintenanceWindowScheduleInput) (req *request.Request, output *DescribeMaintenanceWindowScheduleOutput) { + op := &request.Operation{ + Name: opDescribeMaintenanceWindowSchedule, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeMaintenanceWindowScheduleInput{} + } + + output = &DescribeMaintenanceWindowScheduleOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeMaintenanceWindowSchedule API operation for Amazon Simple Systems Manager (SSM). +// +// Retrieves information about upcoming executions of a Maintenance Window. +// +// 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 Simple Systems Manager (SSM)'s +// API operation DescribeMaintenanceWindowSchedule for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// * ErrCodeDoesNotExistException "DoesNotExistException" +// Error returned when the ID specified for a resource, such as a Maintenance +// Window or Patch baseline, doesn't exist. +// +// For information about resource limits in Systems Manager, see AWS Systems +// Manager Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_ssm). +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowSchedule +func (c *SSM) DescribeMaintenanceWindowSchedule(input *DescribeMaintenanceWindowScheduleInput) (*DescribeMaintenanceWindowScheduleOutput, error) { + req, out := c.DescribeMaintenanceWindowScheduleRequest(input) + return out, req.Send() +} + +// DescribeMaintenanceWindowScheduleWithContext is the same as DescribeMaintenanceWindowSchedule with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeMaintenanceWindowSchedule 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 *SSM) DescribeMaintenanceWindowScheduleWithContext(ctx aws.Context, input *DescribeMaintenanceWindowScheduleInput, opts ...request.Option) (*DescribeMaintenanceWindowScheduleOutput, error) { + req, out := c.DescribeMaintenanceWindowScheduleRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeMaintenanceWindowTargets = "DescribeMaintenanceWindowTargets" // DescribeMaintenanceWindowTargetsRequest generates a "aws/request.Request" representing the // client's request for the DescribeMaintenanceWindowTargets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4129,7 +4314,7 @@ const opDescribeMaintenanceWindowTasks = "DescribeMaintenanceWindowTasks" // DescribeMaintenanceWindowTasksRequest generates a "aws/request.Request" representing the // client's request for the DescribeMaintenanceWindowTasks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4215,7 +4400,7 @@ const opDescribeMaintenanceWindows = "DescribeMaintenanceWindows" // DescribeMaintenanceWindowsRequest generates a "aws/request.Request" representing the // client's request for the DescribeMaintenanceWindows operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4289,12 +4474,92 @@ func (c *SSM) DescribeMaintenanceWindowsWithContext(ctx aws.Context, input *Desc return out, req.Send() } +const opDescribeMaintenanceWindowsForTarget = "DescribeMaintenanceWindowsForTarget" + +// DescribeMaintenanceWindowsForTargetRequest generates a "aws/request.Request" representing the +// client's request for the DescribeMaintenanceWindowsForTarget 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 DescribeMaintenanceWindowsForTarget for more information on using the DescribeMaintenanceWindowsForTarget +// 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 DescribeMaintenanceWindowsForTargetRequest method. +// req, resp := client.DescribeMaintenanceWindowsForTargetRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowsForTarget +func (c *SSM) DescribeMaintenanceWindowsForTargetRequest(input *DescribeMaintenanceWindowsForTargetInput) (req *request.Request, output *DescribeMaintenanceWindowsForTargetOutput) { + op := &request.Operation{ + Name: opDescribeMaintenanceWindowsForTarget, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeMaintenanceWindowsForTargetInput{} + } + + output = &DescribeMaintenanceWindowsForTargetOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeMaintenanceWindowsForTarget API operation for Amazon Simple Systems Manager (SSM). +// +// Retrieves information about the Maintenance Windows targets or tasks that +// an instance is associated with. +// +// 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 Simple Systems Manager (SSM)'s +// API operation DescribeMaintenanceWindowsForTarget for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInternalServerError "InternalServerError" +// An error occurred on the server side. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/DescribeMaintenanceWindowsForTarget +func (c *SSM) DescribeMaintenanceWindowsForTarget(input *DescribeMaintenanceWindowsForTargetInput) (*DescribeMaintenanceWindowsForTargetOutput, error) { + req, out := c.DescribeMaintenanceWindowsForTargetRequest(input) + return out, req.Send() +} + +// DescribeMaintenanceWindowsForTargetWithContext is the same as DescribeMaintenanceWindowsForTarget with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeMaintenanceWindowsForTarget 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 *SSM) DescribeMaintenanceWindowsForTargetWithContext(ctx aws.Context, input *DescribeMaintenanceWindowsForTargetInput, opts ...request.Option) (*DescribeMaintenanceWindowsForTargetOutput, error) { + req, out := c.DescribeMaintenanceWindowsForTargetRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeParameters = "DescribeParameters" // DescribeParametersRequest generates a "aws/request.Request" representing the // client's request for the DescribeParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4450,7 +4715,7 @@ const opDescribePatchBaselines = "DescribePatchBaselines" // DescribePatchBaselinesRequest generates a "aws/request.Request" representing the // client's request for the DescribePatchBaselines operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4529,7 +4794,7 @@ const opDescribePatchGroupState = "DescribePatchGroupState" // DescribePatchGroupStateRequest generates a "aws/request.Request" representing the // client's request for the DescribePatchGroupState operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4611,7 +4876,7 @@ const opDescribePatchGroups = "DescribePatchGroups" // DescribePatchGroupsRequest generates a "aws/request.Request" representing the // client's request for the DescribePatchGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4690,7 +4955,7 @@ const opDescribeSessions = "DescribeSessions" // DescribeSessionsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSessions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4776,7 +5041,7 @@ const opGetAutomationExecution = "GetAutomationExecution" // GetAutomationExecutionRequest generates a "aws/request.Request" representing the // client's request for the GetAutomationExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4859,7 +5124,7 @@ const opGetCommandInvocation = "GetCommandInvocation" // GetCommandInvocationRequest generates a "aws/request.Request" representing the // client's request for the GetCommandInvocation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4963,7 +5228,7 @@ const opGetConnectionStatus = "GetConnectionStatus" // GetConnectionStatusRequest generates a "aws/request.Request" representing the // client's request for the GetConnectionStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5043,7 +5308,7 @@ const opGetDefaultPatchBaseline = "GetDefaultPatchBaseline" // GetDefaultPatchBaselineRequest generates a "aws/request.Request" representing the // client's request for the GetDefaultPatchBaseline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5127,7 +5392,7 @@ const opGetDeployablePatchSnapshotForInstance = "GetDeployablePatchSnapshotForIn // GetDeployablePatchSnapshotForInstanceRequest generates a "aws/request.Request" representing the // client's request for the GetDeployablePatchSnapshotForInstance operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5212,7 +5477,7 @@ const opGetDocument = "GetDocument" // GetDocumentRequest generates a "aws/request.Request" representing the // client's request for the GetDocument operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5297,7 +5562,7 @@ const opGetInventory = "GetInventory" // GetInventoryRequest generates a "aws/request.Request" representing the // client's request for the GetInventory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5396,7 +5661,7 @@ const opGetInventorySchema = "GetInventorySchema" // GetInventorySchemaRequest generates a "aws/request.Request" representing the // client's request for the GetInventorySchema operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5482,7 +5747,7 @@ const opGetMaintenanceWindow = "GetMaintenanceWindow" // GetMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the GetMaintenanceWindow operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5568,7 +5833,7 @@ const opGetMaintenanceWindowExecution = "GetMaintenanceWindowExecution" // GetMaintenanceWindowExecutionRequest generates a "aws/request.Request" representing the // client's request for the GetMaintenanceWindowExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5655,7 +5920,7 @@ const opGetMaintenanceWindowExecutionTask = "GetMaintenanceWindowExecutionTask" // GetMaintenanceWindowExecutionTaskRequest generates a "aws/request.Request" representing the // client's request for the GetMaintenanceWindowExecutionTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5742,7 +6007,7 @@ const opGetMaintenanceWindowExecutionTaskInvocation = "GetMaintenanceWindowExecu // GetMaintenanceWindowExecutionTaskInvocationRequest generates a "aws/request.Request" representing the // client's request for the GetMaintenanceWindowExecutionTaskInvocation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5829,7 +6094,7 @@ const opGetMaintenanceWindowTask = "GetMaintenanceWindowTask" // GetMaintenanceWindowTaskRequest generates a "aws/request.Request" representing the // client's request for the GetMaintenanceWindowTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5915,7 +6180,7 @@ const opGetParameter = "GetParameter" // GetParameterRequest generates a "aws/request.Request" representing the // client's request for the GetParameter operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6005,7 +6270,7 @@ const opGetParameterHistory = "GetParameterHistory" // GetParameterHistoryRequest generates a "aws/request.Request" representing the // client's request for the GetParameterHistory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6149,7 +6414,7 @@ const opGetParameters = "GetParameters" // GetParametersRequest generates a "aws/request.Request" representing the // client's request for the GetParameters operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6232,7 +6497,7 @@ const opGetParametersByPath = "GetParametersByPath" // GetParametersByPathRequest generates a "aws/request.Request" representing the // client's request for the GetParametersByPath operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6395,7 +6660,7 @@ const opGetPatchBaseline = "GetPatchBaseline" // GetPatchBaselineRequest generates a "aws/request.Request" representing the // client's request for the GetPatchBaseline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6485,7 +6750,7 @@ const opGetPatchBaselineForPatchGroup = "GetPatchBaselineForPatchGroup" // GetPatchBaselineForPatchGroupRequest generates a "aws/request.Request" representing the // client's request for the GetPatchBaselineForPatchGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6565,7 +6830,7 @@ const opLabelParameterVersion = "LabelParameterVersion" // LabelParameterVersionRequest generates a "aws/request.Request" representing the // client's request for the LabelParameterVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6686,7 +6951,7 @@ const opListAssociationVersions = "ListAssociationVersions" // ListAssociationVersionsRequest generates a "aws/request.Request" representing the // client's request for the ListAssociationVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6771,7 +7036,7 @@ const opListAssociations = "ListAssociations" // ListAssociationsRequest generates a "aws/request.Request" representing the // client's request for the ListAssociations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6909,7 +7174,7 @@ const opListCommandInvocations = "ListCommandInvocations" // ListCommandInvocationsRequest generates a "aws/request.Request" representing the // client's request for the ListCommandInvocations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7071,7 +7336,7 @@ const opListCommands = "ListCommands" // ListCommandsRequest generates a "aws/request.Request" representing the // client's request for the ListCommands operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7229,7 +7494,7 @@ const opListComplianceItems = "ListComplianceItems" // ListComplianceItemsRequest generates a "aws/request.Request" representing the // client's request for the ListComplianceItems operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7326,7 +7591,7 @@ const opListComplianceSummaries = "ListComplianceSummaries" // ListComplianceSummariesRequest generates a "aws/request.Request" representing the // client's request for the ListComplianceSummaries operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7414,7 +7679,7 @@ const opListDocumentVersions = "ListDocumentVersions" // ListDocumentVersionsRequest generates a "aws/request.Request" representing the // client's request for the ListDocumentVersions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7499,7 +7764,7 @@ const opListDocuments = "ListDocuments" // ListDocumentsRequest generates a "aws/request.Request" representing the // client's request for the ListDocuments operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7640,7 +7905,7 @@ const opListInventoryEntries = "ListInventoryEntries" // ListInventoryEntriesRequest generates a "aws/request.Request" representing the // client's request for the ListInventoryEntries operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7744,7 +8009,7 @@ const opListResourceComplianceSummaries = "ListResourceComplianceSummaries" // ListResourceComplianceSummariesRequest generates a "aws/request.Request" representing the // client's request for the ListResourceComplianceSummaries operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7832,7 +8097,7 @@ const opListResourceDataSync = "ListResourceDataSync" // ListResourceDataSyncRequest generates a "aws/request.Request" representing the // client's request for the ListResourceDataSync operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7923,7 +8188,7 @@ const opListTagsForResource = "ListTagsForResource" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8010,7 +8275,7 @@ const opModifyDocumentPermission = "ModifyDocumentPermission" // ModifyDocumentPermissionRequest generates a "aws/request.Request" representing the // client's request for the ModifyDocumentPermission operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8044,6 +8309,7 @@ func (c *SSM) ModifyDocumentPermissionRequest(input *ModifyDocumentPermissionInp output = &ModifyDocumentPermissionOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -8107,7 +8373,7 @@ const opPutComplianceItems = "PutComplianceItems" // PutComplianceItemsRequest generates a "aws/request.Request" representing the // client's request for the PutComplianceItems operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8141,6 +8407,7 @@ func (c *SSM) PutComplianceItemsRequest(input *PutComplianceItemsInput) (req *re output = &PutComplianceItemsOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -8248,7 +8515,7 @@ const opPutInventory = "PutInventory" // PutInventoryRequest generates a "aws/request.Request" representing the // client's request for the PutInventory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8380,7 +8647,7 @@ const opPutParameter = "PutParameter" // PutParameterRequest generates a "aws/request.Request" representing the // client's request for the PutParameter operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8495,7 +8762,7 @@ const opRegisterDefaultPatchBaseline = "RegisterDefaultPatchBaseline" // RegisterDefaultPatchBaselineRequest generates a "aws/request.Request" representing the // client's request for the RegisterDefaultPatchBaseline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8585,7 +8852,7 @@ const opRegisterPatchBaselineForPatchGroup = "RegisterPatchBaselineForPatchGroup // RegisterPatchBaselineForPatchGroupRequest generates a "aws/request.Request" representing the // client's request for the RegisterPatchBaselineForPatchGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8686,7 +8953,7 @@ const opRegisterTargetWithMaintenanceWindow = "RegisterTargetWithMaintenanceWind // RegisterTargetWithMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the RegisterTargetWithMaintenanceWindow operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8783,7 +9050,7 @@ const opRegisterTaskWithMaintenanceWindow = "RegisterTaskWithMaintenanceWindow" // RegisterTaskWithMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the RegisterTaskWithMaintenanceWindow operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8884,7 +9151,7 @@ const opRemoveTagsFromResource = "RemoveTagsFromResource" // RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8918,6 +9185,7 @@ func (c *SSM) RemoveTagsFromResourceRequest(input *RemoveTagsFromResourceInput) output = &RemoveTagsFromResourceOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -8975,7 +9243,7 @@ const opResumeSession = "ResumeSession" // ResumeSessionRequest generates a "aws/request.Request" representing the // client's request for the ResumeSession operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9065,7 +9333,7 @@ const opSendAutomationSignal = "SendAutomationSignal" // SendAutomationSignalRequest generates a "aws/request.Request" representing the // client's request for the SendAutomationSignal operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9099,6 +9367,7 @@ func (c *SSM) SendAutomationSignalRequest(input *SendAutomationSignalInput) (req output = &SendAutomationSignalOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -9156,7 +9425,7 @@ const opSendCommand = "SendCommand" // SendCommandRequest generates a "aws/request.Request" representing the // client's request for the SendCommand operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9285,7 +9554,7 @@ const opStartAssociationsOnce = "StartAssociationsOnce" // StartAssociationsOnceRequest generates a "aws/request.Request" representing the // client's request for the StartAssociationsOnce operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9319,6 +9588,7 @@ func (c *SSM) StartAssociationsOnceRequest(input *StartAssociationsOnceInput) (r output = &StartAssociationsOnceOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -9368,7 +9638,7 @@ const opStartAutomationExecution = "StartAutomationExecution" // StartAutomationExecutionRequest generates a "aws/request.Request" representing the // client's request for the StartAutomationExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9470,7 +9740,7 @@ const opStartSession = "StartSession" // StartSessionRequest generates a "aws/request.Request" representing the // client's request for the StartSession operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9566,7 +9836,7 @@ const opStopAutomationExecution = "StopAutomationExecution" // StopAutomationExecutionRequest generates a "aws/request.Request" representing the // client's request for the StopAutomationExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9600,6 +9870,7 @@ func (c *SSM) StopAutomationExecutionRequest(input *StopAutomationExecutionInput output = &StopAutomationExecutionOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -9652,7 +9923,7 @@ const opTerminateSession = "TerminateSession" // TerminateSessionRequest generates a "aws/request.Request" representing the // client's request for the TerminateSession operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9740,7 +10011,7 @@ const opUpdateAssociation = "UpdateAssociation" // UpdateAssociationRequest generates a "aws/request.Request" representing the // client's request for the UpdateAssociation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9860,7 +10131,7 @@ const opUpdateAssociationStatus = "UpdateAssociationStatus" // UpdateAssociationStatusRequest generates a "aws/request.Request" representing the // client's request for the UpdateAssociationStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9968,7 +10239,7 @@ const opUpdateDocument = "UpdateDocument" // UpdateDocumentRequest generates a "aws/request.Request" representing the // client's request for the UpdateDocument operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10031,6 +10302,10 @@ func (c *SSM) UpdateDocumentRequest(input *UpdateDocumentInput) (req *request.Re // The content of the association document matches another document. Change // the content of the document and try again. // +// * ErrCodeDuplicateDocumentVersionName "DuplicateDocumentVersionName" +// The version name has already been used in this document. Specify a different +// version name, and then try again. +// // * ErrCodeInvalidDocumentContent "InvalidDocumentContent" // The content for the document is not valid. // @@ -10043,6 +10318,10 @@ func (c *SSM) UpdateDocumentRequest(input *UpdateDocumentInput) (req *request.Re // * ErrCodeInvalidDocument "InvalidDocument" // The specified document does not exist. // +// * ErrCodeInvalidDocumentOperation "InvalidDocumentOperation" +// You attempted to delete a document while it is still shared. You must stop +// sharing the document before you can delete it. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdateDocument func (c *SSM) UpdateDocument(input *UpdateDocumentInput) (*UpdateDocumentOutput, error) { req, out := c.UpdateDocumentRequest(input) @@ -10070,7 +10349,7 @@ const opUpdateDocumentDefaultVersion = "UpdateDocumentDefaultVersion" // UpdateDocumentDefaultVersionRequest generates a "aws/request.Request" representing the // client's request for the UpdateDocumentDefaultVersion operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10158,7 +10437,7 @@ const opUpdateMaintenanceWindow = "UpdateMaintenanceWindow" // UpdateMaintenanceWindowRequest generates a "aws/request.Request" representing the // client's request for the UpdateMaintenanceWindow operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10244,7 +10523,7 @@ const opUpdateMaintenanceWindowTarget = "UpdateMaintenanceWindowTarget" // UpdateMaintenanceWindowTargetRequest generates a "aws/request.Request" representing the // client's request for the UpdateMaintenanceWindowTarget operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10346,7 +10625,7 @@ const opUpdateMaintenanceWindowTask = "UpdateMaintenanceWindowTask" // UpdateMaintenanceWindowTaskRequest generates a "aws/request.Request" representing the // client's request for the UpdateMaintenanceWindowTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10451,7 +10730,7 @@ const opUpdateManagedInstanceRole = "UpdateManagedInstanceRole" // UpdateManagedInstanceRoleRequest generates a "aws/request.Request" representing the // client's request for the UpdateManagedInstanceRole operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10485,6 +10764,7 @@ func (c *SSM) UpdateManagedInstanceRoleRequest(input *UpdateManagedInstanceRoleI output = &UpdateManagedInstanceRoleOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -10546,7 +10826,7 @@ const opUpdatePatchBaseline = "UpdatePatchBaseline" // UpdatePatchBaselineRequest generates a "aws/request.Request" representing the // client's request for the UpdatePatchBaseline operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -10962,6 +11242,9 @@ type AssociationDescription struct { // The association version. AssociationVersion *string `type:"string"` + // The severity level that is assigned to the association. + ComplianceSeverity *string `type:"string" enum:"AssociationComplianceSeverity"` + // The date when the association was made. Date *time.Time `type:"timestamp"` @@ -10980,6 +11263,32 @@ type AssociationDescription struct { // The date when the association was last updated. LastUpdateAssociationDate *time.Time `type:"timestamp"` + // The maximum number of targets allowed to run the association at the same + // time. You can specify a number, for example 10, or a percentage of the target + // set, for example 10%. The default value is 100%, which means all targets + // run the association at the same time. + // + // If a new instance starts and attempts to execute an association while Systems + // Manager is executing MaxConcurrency associations, the association is allowed + // to run. During the next association interval, the new instance will process + // its association within the limit specified for MaxConcurrency. + MaxConcurrency *string `min:"1" type:"string"` + + // The number of errors that are allowed before the system stops sending requests + // to run the association on additional targets. You can specify either an absolute + // number of errors, for example 10, or a percentage of the target set, for + // example 10%. If you specify 3, for example, the system stops sending requests + // when the fourth error is received. If you specify 0, then the system stops + // sending requests after the first error is returned. If you run an association + // on 50 instances and set MaxError to 10%, then the system stops sending the + // request when the sixth error is received. + // + // Executions that are already running an association when MaxErrors is reached + // are allowed to complete, but some of these executions may fail as well. If + // you need to ensure that there won't be more than max-errors failed executions, + // set MaxConcurrency to 1 so that executions proceed one at a time. + MaxErrors *string `min:"1" type:"string"` + // The name of the Systems Manager document. Name *string `type:"string"` @@ -11030,6 +11339,12 @@ func (s *AssociationDescription) SetAssociationVersion(v string) *AssociationDes return s } +// SetComplianceSeverity sets the ComplianceSeverity field's value. +func (s *AssociationDescription) SetComplianceSeverity(v string) *AssociationDescription { + s.ComplianceSeverity = &v + return s +} + // SetDate sets the Date field's value. func (s *AssociationDescription) SetDate(v time.Time) *AssociationDescription { s.Date = &v @@ -11066,6 +11381,18 @@ func (s *AssociationDescription) SetLastUpdateAssociationDate(v time.Time) *Asso return s } +// SetMaxConcurrency sets the MaxConcurrency field's value. +func (s *AssociationDescription) SetMaxConcurrency(v string) *AssociationDescription { + s.MaxConcurrency = &v + return s +} + +// SetMaxErrors sets the MaxErrors field's value. +func (s *AssociationDescription) SetMaxErrors(v string) *AssociationDescription { + s.MaxErrors = &v + return s +} + // SetName sets the Name field's value. func (s *AssociationDescription) SetName(v string) *AssociationDescription { s.Name = &v @@ -11614,6 +11941,9 @@ type AssociationVersionInfo struct { // The association version. AssociationVersion *string `type:"string"` + // The severity level that is assigned to the association. + ComplianceSeverity *string `type:"string" enum:"AssociationComplianceSeverity"` + // The date the association version was created. CreatedDate *time.Time `type:"timestamp"` @@ -11621,6 +11951,32 @@ type AssociationVersionInfo struct { // was created. DocumentVersion *string `type:"string"` + // The maximum number of targets allowed to run the association at the same + // time. You can specify a number, for example 10, or a percentage of the target + // set, for example 10%. The default value is 100%, which means all targets + // run the association at the same time. + // + // If a new instance starts and attempts to execute an association while Systems + // Manager is executing MaxConcurrency associations, the association is allowed + // to run. During the next association interval, the new instance will process + // its association within the limit specified for MaxConcurrency. + MaxConcurrency *string `min:"1" type:"string"` + + // The number of errors that are allowed before the system stops sending requests + // to run the association on additional targets. You can specify either an absolute + // number of errors, for example 10, or a percentage of the target set, for + // example 10%. If you specify 3, for example, the system stops sending requests + // when the fourth error is received. If you specify 0, then the system stops + // sending requests after the first error is returned. If you run an association + // on 50 instances and set MaxError to 10%, then the system stops sending the + // request when the sixth error is received. + // + // Executions that are already running an association when MaxErrors is reached + // are allowed to complete, but some of these executions may fail as well. If + // you need to ensure that there won't be more than max-errors failed executions, + // set MaxConcurrency to 1 so that executions proceed one at a time. + MaxErrors *string `min:"1" type:"string"` + // The name specified when the association was created. Name *string `type:"string"` @@ -11668,6 +12024,12 @@ func (s *AssociationVersionInfo) SetAssociationVersion(v string) *AssociationVer return s } +// SetComplianceSeverity sets the ComplianceSeverity field's value. +func (s *AssociationVersionInfo) SetComplianceSeverity(v string) *AssociationVersionInfo { + s.ComplianceSeverity = &v + return s +} + // SetCreatedDate sets the CreatedDate field's value. func (s *AssociationVersionInfo) SetCreatedDate(v time.Time) *AssociationVersionInfo { s.CreatedDate = &v @@ -11680,6 +12042,18 @@ func (s *AssociationVersionInfo) SetDocumentVersion(v string) *AssociationVersio return s } +// SetMaxConcurrency sets the MaxConcurrency field's value. +func (s *AssociationVersionInfo) SetMaxConcurrency(v string) *AssociationVersionInfo { + s.MaxConcurrency = &v + return s +} + +// SetMaxErrors sets the MaxErrors field's value. +func (s *AssociationVersionInfo) SetMaxErrors(v string) *AssociationVersionInfo { + s.MaxErrors = &v + return s +} + // SetName sets the Name field's value. func (s *AssociationVersionInfo) SetName(v string) *AssociationVersionInfo { s.Name = &v @@ -11710,6 +12084,137 @@ func (s *AssociationVersionInfo) SetTargets(v []*Target) *AssociationVersionInfo return s } +// A structure that includes attributes that describe a document attachment. +type AttachmentContent struct { + _ struct{} `type:"structure"` + + // The cryptographic hash value of the document content. + Hash *string `type:"string"` + + // The hash algorithm used to calculate the hash value. + HashType *string `type:"string" enum:"AttachmentHashType"` + + // The name of an attachment. + Name *string `type:"string"` + + // The size of an attachment in bytes. + Size *int64 `type:"long"` + + // The URL location of the attachment content. + Url *string `type:"string"` +} + +// String returns the string representation +func (s AttachmentContent) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachmentContent) GoString() string { + return s.String() +} + +// SetHash sets the Hash field's value. +func (s *AttachmentContent) SetHash(v string) *AttachmentContent { + s.Hash = &v + return s +} + +// SetHashType sets the HashType field's value. +func (s *AttachmentContent) SetHashType(v string) *AttachmentContent { + s.HashType = &v + return s +} + +// SetName sets the Name field's value. +func (s *AttachmentContent) SetName(v string) *AttachmentContent { + s.Name = &v + return s +} + +// SetSize sets the Size field's value. +func (s *AttachmentContent) SetSize(v int64) *AttachmentContent { + s.Size = &v + return s +} + +// SetUrl sets the Url field's value. +func (s *AttachmentContent) SetUrl(v string) *AttachmentContent { + s.Url = &v + return s +} + +// An attribute of an attachment, such as the attachment name or size. +type AttachmentInformation struct { + _ struct{} `type:"structure"` + + Name *string `type:"string"` +} + +// String returns the string representation +func (s AttachmentInformation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachmentInformation) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *AttachmentInformation) SetName(v string) *AttachmentInformation { + s.Name = &v + return s +} + +// A key and value pair that identifies the location of an attachment to a document. +type AttachmentsSource struct { + _ struct{} `type:"structure"` + + // The key of a key and value pair that identifies the location of an attachment + // to a document. + Key *string `type:"string" enum:"AttachmentsSourceKey"` + + // The URL of the location of a document attachment, such as the URL of an Amazon + // S3 bucket. + Values []*string `min:"1" type:"list"` +} + +// String returns the string representation +func (s AttachmentsSource) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachmentsSource) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AttachmentsSource) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AttachmentsSource"} + if s.Values != nil && len(s.Values) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Values", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *AttachmentsSource) SetKey(v string) *AttachmentsSource { + s.Key = &v + return s +} + +// SetValues sets the Values field's value. +func (s *AttachmentsSource) SetValues(v []*string) *AttachmentsSource { + s.Values = v + return s +} + // Detailed information about the current state of an individual Automation // execution. type AutomationExecution struct { @@ -11765,6 +12270,10 @@ type AutomationExecution struct { // The AutomationExecutionId of the parent automation. ParentAutomationExecutionId *string `min:"36" type:"string"` + // An aggregate of step execution statuses displayed in the AWS Console for + // a multi-Region and multi-account Automation execution. + ProgressCounters *ProgressCounters `type:"structure"` + // A list of resolved targets in the rate control execution. ResolvedTargets *ResolvedTargets `type:"structure"` @@ -11780,6 +12289,10 @@ type AutomationExecution struct { // The target of the execution. Target *string `type:"string"` + // The combination of AWS Regions and/or AWS accounts where you want to execute + // the Automation. + TargetLocations []*TargetLocation `min:"1" type:"list"` + // The specified key-value mapping of document parameters to target resources. TargetMaps []map[string][]*string `type:"list"` @@ -11896,6 +12409,12 @@ func (s *AutomationExecution) SetParentAutomationExecutionId(v string) *Automati return s } +// SetProgressCounters sets the ProgressCounters field's value. +func (s *AutomationExecution) SetProgressCounters(v *ProgressCounters) *AutomationExecution { + s.ProgressCounters = v + return s +} + // SetResolvedTargets sets the ResolvedTargets field's value. func (s *AutomationExecution) SetResolvedTargets(v *ResolvedTargets) *AutomationExecution { s.ResolvedTargets = v @@ -11920,6 +12439,12 @@ func (s *AutomationExecution) SetTarget(v string) *AutomationExecution { return s } +// SetTargetLocations sets the TargetLocations field's value. +func (s *AutomationExecution) SetTargetLocations(v []*TargetLocation) *AutomationExecution { + s.TargetLocations = v + return s +} + // SetTargetMaps sets the TargetMaps field's value. func (s *AutomationExecution) SetTargetMaps(v []map[string][]*string) *AutomationExecution { s.TargetMaps = v @@ -12009,6 +12534,13 @@ type AutomationExecutionMetadata struct { // Timed out, or Cancelled. AutomationExecutionStatus *string `type:"string" enum:"AutomationExecutionStatus"` + // Use this filter with DescribeAutomationExecution. Specify either Local of + // CrossAccount. CrossAccount is an Automation that executes in multiple AWS + // Regions and accounts. For more information, see Concurrently Executing Automations + // in Multiple AWS Regions and Accounts (http://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html) + // in the AWS Systems Manager User Guide. + AutomationType *string `type:"string" enum:"AutomationType"` + // The action of the currently executing step. CurrentAction *string `type:"string"` @@ -12090,6 +12622,12 @@ func (s *AutomationExecutionMetadata) SetAutomationExecutionStatus(v string) *Au return s } +// SetAutomationType sets the AutomationType field's value. +func (s *AutomationExecutionMetadata) SetAutomationType(v string) *AutomationExecutionMetadata { + s.AutomationType = &v + return s +} + // SetCurrentAction sets the CurrentAction field's value. func (s *AutomationExecutionMetadata) SetCurrentAction(v string) *AutomationExecutionMetadata { s.CurrentAction = &v @@ -12272,6 +12810,70 @@ func (s CancelCommandOutput) GoString() string { return s.String() } +type CancelMaintenanceWindowExecutionInput struct { + _ struct{} `type:"structure"` + + // The ID of the Maintenance Window execution to stop. + // + // WindowExecutionId is a required field + WindowExecutionId *string `min:"36" type:"string" required:"true"` +} + +// String returns the string representation +func (s CancelMaintenanceWindowExecutionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelMaintenanceWindowExecutionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CancelMaintenanceWindowExecutionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CancelMaintenanceWindowExecutionInput"} + if s.WindowExecutionId == nil { + invalidParams.Add(request.NewErrParamRequired("WindowExecutionId")) + } + if s.WindowExecutionId != nil && len(*s.WindowExecutionId) < 36 { + invalidParams.Add(request.NewErrParamMinLen("WindowExecutionId", 36)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetWindowExecutionId sets the WindowExecutionId field's value. +func (s *CancelMaintenanceWindowExecutionInput) SetWindowExecutionId(v string) *CancelMaintenanceWindowExecutionInput { + s.WindowExecutionId = &v + return s +} + +type CancelMaintenanceWindowExecutionOutput struct { + _ struct{} `type:"structure"` + + // The ID of the Maintenance Window execution that has been stopped. + WindowExecutionId *string `min:"36" type:"string"` +} + +// String returns the string representation +func (s CancelMaintenanceWindowExecutionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CancelMaintenanceWindowExecutionOutput) GoString() string { + return s.String() +} + +// SetWindowExecutionId sets the WindowExecutionId field's value. +func (s *CancelMaintenanceWindowExecutionOutput) SetWindowExecutionId(v string) *CancelMaintenanceWindowExecutionOutput { + s.WindowExecutionId = &v + return s +} + // Configuration options for sending command output to CloudWatch Logs. type CloudWatchOutputConfig struct { _ struct{} `type:"structure"` @@ -12610,11 +13212,13 @@ type CommandFilter struct { // The filter value. Valid values for each filter key are as follows: // - // * InvokedAfter: A timestamp to limit your results. For example, specify - // 2018-07-07T00:00:00Z to see results occurring July 7, 2018, and later. + // * InvokedAfter: Specify a timestamp to limit your results. For example, + // specify 2018-07-07T00:00:00Z to see a list of command executions occurring + // July 7, 2018, and later. // - // * InvokedBefore: A timestamp to limit your results. For example, specify - // 2018-07-07T00:00:00Z to see results before July 7, 2018. + // * InvokedBefore: Specify a timestamp to limit your results. For example, + // specify 2018-07-07T00:00:00Z to see a list of command executions from + // before July 7, 2018. // // * Status: Specify a valid command status to see a list of all command // executions with that status. Status values you can specify include: @@ -12633,19 +13237,17 @@ type CommandFilter struct { // // Cancelling // - // * DocumentName: The name of the SSM document for which you want to see - // command results. - // - // For example, specify AWS-RunPatchBaseline to see command executions that - // used this SSM document to perform security patching operations on instances. - // + // * DocumentName: Specify name of the SSM document for which you want to + // see command execution results. For example, specify AWS-RunPatchBaseline + // to see command executions that used this SSM document to perform security + // patching operations on instances. // - // * ExecutionStage: An enum whose value can be either Executing or Complete. + // * ExecutionStage: Specify one of the following values: // - // Specify Executing to see a list of command executions that are currently - // still running. + // Executing: Returns a list of command executions that are currently still + // running. // - // Specify Complete to see a list of command exeuctions that have already completed. + // Complete: Returns a list of command executions that have already completed. // // Value is a required field Value *string `locationName:"value" min:"1" type:"string" required:"true"` @@ -13697,19 +14299,48 @@ func (s *CreateAssociationBatchOutput) SetSuccessful(v []*AssociationDescription return s } -// Describes the association of a Systems Manager document and an instance. +// Describes the association of a Systems Manager SSM document and an instance. type CreateAssociationBatchRequestEntry struct { _ struct{} `type:"structure"` // Specify a descriptive name for the association. AssociationName *string `type:"string"` + // The severity level to assign to the association. + ComplianceSeverity *string `type:"string" enum:"AssociationComplianceSeverity"` + // The document version. DocumentVersion *string `type:"string"` // The ID of the instance. InstanceId *string `type:"string"` + // The maximum number of targets allowed to run the association at the same + // time. You can specify a number, for example 10, or a percentage of the target + // set, for example 10%. The default value is 100%, which means all targets + // run the association at the same time. + // + // If a new instance starts and attempts to execute an association while Systems + // Manager is executing MaxConcurrency associations, the association is allowed + // to run. During the next association interval, the new instance will process + // its association within the limit specified for MaxConcurrency. + MaxConcurrency *string `min:"1" type:"string"` + + // The number of errors that are allowed before the system stops sending requests + // to run the association on additional targets. You can specify either an absolute + // number of errors, for example 10, or a percentage of the target set, for + // example 10%. If you specify 3, for example, the system stops sending requests + // when the fourth error is received. If you specify 0, then the system stops + // sending requests after the first error is returned. If you run an association + // on 50 instances and set MaxError to 10%, then the system stops sending the + // request when the sixth error is received. + // + // Executions that are already running an association when MaxErrors is reached + // are allowed to complete, but some of these executions may fail as well. If + // you need to ensure that there won't be more than max-errors failed executions, + // set MaxConcurrency to 1 so that executions proceed one at a time. + MaxErrors *string `min:"1" type:"string"` + // The name of the configuration document. // // Name is a required field @@ -13741,6 +14372,12 @@ func (s CreateAssociationBatchRequestEntry) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateAssociationBatchRequestEntry) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateAssociationBatchRequestEntry"} + if s.MaxConcurrency != nil && len(*s.MaxConcurrency) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MaxConcurrency", 1)) + } + if s.MaxErrors != nil && len(*s.MaxErrors) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MaxErrors", 1)) + } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } @@ -13775,6 +14412,12 @@ func (s *CreateAssociationBatchRequestEntry) SetAssociationName(v string) *Creat return s } +// SetComplianceSeverity sets the ComplianceSeverity field's value. +func (s *CreateAssociationBatchRequestEntry) SetComplianceSeverity(v string) *CreateAssociationBatchRequestEntry { + s.ComplianceSeverity = &v + return s +} + // SetDocumentVersion sets the DocumentVersion field's value. func (s *CreateAssociationBatchRequestEntry) SetDocumentVersion(v string) *CreateAssociationBatchRequestEntry { s.DocumentVersion = &v @@ -13787,6 +14430,18 @@ func (s *CreateAssociationBatchRequestEntry) SetInstanceId(v string) *CreateAsso return s } +// SetMaxConcurrency sets the MaxConcurrency field's value. +func (s *CreateAssociationBatchRequestEntry) SetMaxConcurrency(v string) *CreateAssociationBatchRequestEntry { + s.MaxConcurrency = &v + return s +} + +// SetMaxErrors sets the MaxErrors field's value. +func (s *CreateAssociationBatchRequestEntry) SetMaxErrors(v string) *CreateAssociationBatchRequestEntry { + s.MaxErrors = &v + return s +} + // SetName sets the Name field's value. func (s *CreateAssociationBatchRequestEntry) SetName(v string) *CreateAssociationBatchRequestEntry { s.Name = &v @@ -13823,6 +14478,9 @@ type CreateAssociationInput struct { // Specify a descriptive name for the association. AssociationName *string `type:"string"` + // The severity level to assign to the association. + ComplianceSeverity *string `type:"string" enum:"AssociationComplianceSeverity"` + // The document version you want to associate with the target(s). Can be a specific // version or the default version. DocumentVersion *string `type:"string"` @@ -13830,6 +14488,32 @@ type CreateAssociationInput struct { // The instance ID. InstanceId *string `type:"string"` + // The maximum number of targets allowed to run the association at the same + // time. You can specify a number, for example 10, or a percentage of the target + // set, for example 10%. The default value is 100%, which means all targets + // run the association at the same time. + // + // If a new instance starts and attempts to execute an association while Systems + // Manager is executing MaxConcurrency associations, the association is allowed + // to run. During the next association interval, the new instance will process + // its association within the limit specified for MaxConcurrency. + MaxConcurrency *string `min:"1" type:"string"` + + // The number of errors that are allowed before the system stops sending requests + // to run the association on additional targets. You can specify either an absolute + // number of errors, for example 10, or a percentage of the target set, for + // example 10%. If you specify 3, for example, the system stops sending requests + // when the fourth error is received. If you specify 0, then the system stops + // sending requests after the first error is returned. If you run an association + // on 50 instances and set MaxError to 10%, then the system stops sending the + // request when the sixth error is received. + // + // Executions that are already running an association when MaxErrors is reached + // are allowed to complete, but some of these executions may fail as well. If + // you need to ensure that there won't be more than max-errors failed executions, + // set MaxConcurrency to 1 so that executions proceed one at a time. + MaxErrors *string `min:"1" type:"string"` + // The name of the Systems Manager document. // // Name is a required field @@ -13861,6 +14545,12 @@ func (s CreateAssociationInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateAssociationInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateAssociationInput"} + if s.MaxConcurrency != nil && len(*s.MaxConcurrency) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MaxConcurrency", 1)) + } + if s.MaxErrors != nil && len(*s.MaxErrors) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MaxErrors", 1)) + } if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } @@ -13895,6 +14585,12 @@ func (s *CreateAssociationInput) SetAssociationName(v string) *CreateAssociation return s } +// SetComplianceSeverity sets the ComplianceSeverity field's value. +func (s *CreateAssociationInput) SetComplianceSeverity(v string) *CreateAssociationInput { + s.ComplianceSeverity = &v + return s +} + // SetDocumentVersion sets the DocumentVersion field's value. func (s *CreateAssociationInput) SetDocumentVersion(v string) *CreateAssociationInput { s.DocumentVersion = &v @@ -13907,6 +14603,18 @@ func (s *CreateAssociationInput) SetInstanceId(v string) *CreateAssociationInput return s } +// SetMaxConcurrency sets the MaxConcurrency field's value. +func (s *CreateAssociationInput) SetMaxConcurrency(v string) *CreateAssociationInput { + s.MaxConcurrency = &v + return s +} + +// SetMaxErrors sets the MaxErrors field's value. +func (s *CreateAssociationInput) SetMaxErrors(v string) *CreateAssociationInput { + s.MaxErrors = &v + return s +} + // SetName sets the Name field's value. func (s *CreateAssociationInput) SetName(v string) *CreateAssociationInput { s.Name = &v @@ -13963,6 +14671,10 @@ func (s *CreateAssociationOutput) SetAssociationDescription(v *AssociationDescri type CreateDocumentInput struct { _ struct{} `type:"structure"` + // A list of key and value pairs that describe attachments to a version of a + // document. + Attachments []*AttachmentsSource `type:"list"` + // A valid JSON or YAML string. // // Content is a required field @@ -13972,8 +14684,8 @@ type CreateDocumentInput struct { // JSON or YAML. JSON is the default format. DocumentFormat *string `type:"string" enum:"DocumentFormat"` - // The type of document to create. Valid document types include: Policy, Automation, - // and Command. + // The type of document to create. Valid document types include: Command, Policy, + // Automation, Session, and Package. DocumentType *string `type:"string" enum:"DocumentType"` // A name for the Systems Manager document. @@ -13998,6 +14710,11 @@ type CreateDocumentInput struct { // Types Reference (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html) // in the AWS CloudFormation User Guide. TargetType *string `type:"string"` + + // An optional field specifying the version of the artifact you are creating + // with the document. For example, "Release 12, Update 6". This value is unique + // across all versions of a document, and cannot be changed. + VersionName *string `type:"string"` } // String returns the string representation @@ -14022,6 +14739,16 @@ func (s *CreateDocumentInput) Validate() error { if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } + if s.Attachments != nil { + for i, v := range s.Attachments { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attachments", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -14029,6 +14756,12 @@ func (s *CreateDocumentInput) Validate() error { return nil } +// SetAttachments sets the Attachments field's value. +func (s *CreateDocumentInput) SetAttachments(v []*AttachmentsSource) *CreateDocumentInput { + s.Attachments = v + return s +} + // SetContent sets the Content field's value. func (s *CreateDocumentInput) SetContent(v string) *CreateDocumentInput { s.Content = &v @@ -14059,6 +14792,12 @@ func (s *CreateDocumentInput) SetTargetType(v string) *CreateDocumentInput { return s } +// SetVersionName sets the VersionName field's value. +func (s *CreateDocumentInput) SetVersionName(v string) *CreateDocumentInput { + s.VersionName = &v + return s +} + type CreateDocumentOutput struct { _ struct{} `type:"structure"` @@ -14107,13 +14846,18 @@ type CreateMaintenanceWindowInput struct { // An optional description for the Maintenance Window. We recommend specifying // a description to help you organize your Maintenance Windows. - Description *string `min:"1" type:"string"` + Description *string `min:"1" type:"string" sensitive:"true"` // The duration of the Maintenance Window in hours. // // Duration is a required field Duration *int64 `min:"1" type:"integer" required:"true"` + // The date and time, in ISO-8601 Extended format, for when you want the Maintenance + // Window to become inactive. EndDate allows you to set a date and time in the + // future when the Maintenance Window will no longer run. + EndDate *string `type:"string"` + // The name of the Maintenance Window. // // Name is a required field @@ -14123,6 +14867,17 @@ type CreateMaintenanceWindowInput struct { // // Schedule is a required field Schedule *string `min:"1" type:"string" required:"true"` + + // The time zone that the scheduled Maintenance Window executions are based + // on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", + // "etc/UTC", or "Asia/Seoul". For more information, see the Time Zone Database + // (https://www.iana.org/time-zones) on the IANA website. + ScheduleTimezone *string `type:"string"` + + // The date and time, in ISO-8601 Extended format, for when you want the Maintenance + // Window to become active. StartDate allows you to delay activation of the + // Maintenance Window until the specified future date. + StartDate *string `type:"string"` } // String returns the string representation @@ -14205,6 +14960,12 @@ func (s *CreateMaintenanceWindowInput) SetDuration(v int64) *CreateMaintenanceWi return s } +// SetEndDate sets the EndDate field's value. +func (s *CreateMaintenanceWindowInput) SetEndDate(v string) *CreateMaintenanceWindowInput { + s.EndDate = &v + return s +} + // SetName sets the Name field's value. func (s *CreateMaintenanceWindowInput) SetName(v string) *CreateMaintenanceWindowInput { s.Name = &v @@ -14217,6 +14978,18 @@ func (s *CreateMaintenanceWindowInput) SetSchedule(v string) *CreateMaintenanceW return s } +// SetScheduleTimezone sets the ScheduleTimezone field's value. +func (s *CreateMaintenanceWindowInput) SetScheduleTimezone(v string) *CreateMaintenanceWindowInput { + s.ScheduleTimezone = &v + return s +} + +// SetStartDate sets the StartDate field's value. +func (s *CreateMaintenanceWindowInput) SetStartDate(v string) *CreateMaintenanceWindowInput { + s.StartDate = &v + return s +} + type CreateMaintenanceWindowOutput struct { _ struct{} `type:"structure"` @@ -14290,6 +15063,21 @@ type CreatePatchBaselineInput struct { // in the AWS Systems Manager User Guide. RejectedPatches []*string `type:"list"` + // The action for Patch Manager to take on patches included in the RejectedPackages + // list. + // + // * ALLOW_AS_DEPENDENCY: A package in the Rejected patches list is installed + // only if it is a dependency of another package. It is considered compliant + // with the patch baseline, and its status is reported as InstalledOther. + // This is the default action if no option is specified. + // + // * BLOCK: Packages in the RejectedPatches list, and packages that include + // them as dependencies, are not installed under any circumstances. If a + // package was installed before it was added to the Rejected patches list, + // it is considered non-compliant with the patch baseline, and its status + // is reported as InstalledRejected. + RejectedPatchesAction *string `type:"string" enum:"PatchAction"` + // Information about the patches to use to update the instances, including target // operating systems and source repositories. Applies to Linux instances only. Sources []*PatchSource `type:"list"` @@ -14407,6 +15195,12 @@ func (s *CreatePatchBaselineInput) SetRejectedPatches(v []*string) *CreatePatchB return s } +// SetRejectedPatchesAction sets the RejectedPatchesAction field's value. +func (s *CreatePatchBaselineInput) SetRejectedPatchesAction(v string) *CreatePatchBaselineInput { + s.RejectedPatchesAction = &v + return s +} + // SetSources sets the Sources field's value. func (s *CreatePatchBaselineInput) SetSources(v []*PatchSource) *CreatePatchBaselineInput { s.Sources = v @@ -16249,6 +17043,11 @@ type DescribeDocumentInput struct { // // Name is a required field Name *string `type:"string" required:"true"` + + // An optional field specifying the version of the artifact associated with + // the document. For example, "Release 12, Update 6". This value is unique across + // all versions of a document, and cannot be changed. + VersionName *string `type:"string"` } // String returns the string representation @@ -16286,6 +17085,12 @@ func (s *DescribeDocumentInput) SetName(v string) *DescribeDocumentInput { return s } +// SetVersionName sets the VersionName field's value. +func (s *DescribeDocumentInput) SetVersionName(v string) *DescribeDocumentInput { + s.VersionName = &v + return s +} + type DescribeDocumentOutput struct { _ struct{} `type:"structure"` @@ -16675,6 +17480,7 @@ type DescribeInstanceInformationInput struct { _ struct{} `type:"structure"` // One or more filters. Use a filter to return a more specific list of instances. + // You can filter on Amazon EC2 tag. Specify tags by using a key-value mapping. Filters []*InstanceInformationStringFilter `type:"list"` // This is a legacy method. We recommend that you don't use this method. Instead, @@ -17112,8 +17918,7 @@ type DescribeInstancePatchesOutput struct { // // Severity (string) // - // State (string: "INSTALLED", "INSTALLED OTHER", "MISSING", "NOT APPLICABLE", - // "FAILED") + // State (string, such as "INSTALLED" or "FAILED") // // InstalledTime (DateTime) // @@ -17614,6 +18419,150 @@ func (s *DescribeMaintenanceWindowExecutionsOutput) SetWindowExecutions(v []*Mai return s } +type DescribeMaintenanceWindowScheduleInput struct { + _ struct{} `type:"structure"` + + // Filters used to limit the range of results. For example, you can limit Maintenance + // Window executions to only those scheduled before or after a certain date + // and time. + Filters []*PatchOrchestratorFilter `type:"list"` + + // The maximum number of items to return for this call. The call also returns + // a token that you can specify in a subsequent call to get the next set of + // results. + MaxResults *int64 `min:"1" type:"integer"` + + // The token for the next set of items to return. (You received this token from + // a previous call.) + NextToken *string `type:"string"` + + // The type of resource you want to retrieve information about. For example, + // "INSTANCE". + ResourceType *string `type:"string" enum:"MaintenanceWindowResourceType"` + + // The instance ID or key/value pair to retrieve information about. + Targets []*Target `type:"list"` + + // The ID of the Maintenance Window to retrieve information about. + WindowId *string `min:"20" type:"string"` +} + +// String returns the string representation +func (s DescribeMaintenanceWindowScheduleInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeMaintenanceWindowScheduleInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeMaintenanceWindowScheduleInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeMaintenanceWindowScheduleInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.WindowId != nil && len(*s.WindowId) < 20 { + invalidParams.Add(request.NewErrParamMinLen("WindowId", 20)) + } + if s.Filters != nil { + for i, v := range s.Filters { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) + } + } + } + if s.Targets != nil { + for i, v := range s.Targets { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *DescribeMaintenanceWindowScheduleInput) SetFilters(v []*PatchOrchestratorFilter) *DescribeMaintenanceWindowScheduleInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeMaintenanceWindowScheduleInput) SetMaxResults(v int64) *DescribeMaintenanceWindowScheduleInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeMaintenanceWindowScheduleInput) SetNextToken(v string) *DescribeMaintenanceWindowScheduleInput { + s.NextToken = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *DescribeMaintenanceWindowScheduleInput) SetResourceType(v string) *DescribeMaintenanceWindowScheduleInput { + s.ResourceType = &v + return s +} + +// SetTargets sets the Targets field's value. +func (s *DescribeMaintenanceWindowScheduleInput) SetTargets(v []*Target) *DescribeMaintenanceWindowScheduleInput { + s.Targets = v + return s +} + +// SetWindowId sets the WindowId field's value. +func (s *DescribeMaintenanceWindowScheduleInput) SetWindowId(v string) *DescribeMaintenanceWindowScheduleInput { + s.WindowId = &v + return s +} + +type DescribeMaintenanceWindowScheduleOutput struct { + _ struct{} `type:"structure"` + + // The token for the next set of items to return. (You use this token in the + // next call.) + NextToken *string `type:"string"` + + // Information about Maintenance Window executions scheduled for the specified + // time range. + ScheduledWindowExecutions []*ScheduledWindowExecution `type:"list"` +} + +// String returns the string representation +func (s DescribeMaintenanceWindowScheduleOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeMaintenanceWindowScheduleOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeMaintenanceWindowScheduleOutput) SetNextToken(v string) *DescribeMaintenanceWindowScheduleOutput { + s.NextToken = &v + return s +} + +// SetScheduledWindowExecutions sets the ScheduledWindowExecutions field's value. +func (s *DescribeMaintenanceWindowScheduleOutput) SetScheduledWindowExecutions(v []*ScheduledWindowExecution) *DescribeMaintenanceWindowScheduleOutput { + s.ScheduledWindowExecutions = v + return s +} + type DescribeMaintenanceWindowTargetsInput struct { _ struct{} `type:"structure"` @@ -17850,6 +18799,127 @@ func (s *DescribeMaintenanceWindowTasksOutput) SetTasks(v []*MaintenanceWindowTa return s } +type DescribeMaintenanceWindowsForTargetInput struct { + _ struct{} `type:"structure"` + + // The maximum number of items to return for this call. The call also returns + // a token that you can specify in a subsequent call to get the next set of + // results. + MaxResults *int64 `min:"1" type:"integer"` + + // The token for the next set of items to return. (You received this token from + // a previous call.) + NextToken *string `type:"string"` + + // The type of resource you want to retrieve information about. For example, + // "INSTANCE". + // + // ResourceType is a required field + ResourceType *string `type:"string" required:"true" enum:"MaintenanceWindowResourceType"` + + // The instance ID or key/value pair to retrieve information about. + // + // Targets is a required field + Targets []*Target `type:"list" required:"true"` +} + +// String returns the string representation +func (s DescribeMaintenanceWindowsForTargetInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeMaintenanceWindowsForTargetInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeMaintenanceWindowsForTargetInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeMaintenanceWindowsForTargetInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.ResourceType == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceType")) + } + if s.Targets == nil { + invalidParams.Add(request.NewErrParamRequired("Targets")) + } + if s.Targets != nil { + for i, v := range s.Targets { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeMaintenanceWindowsForTargetInput) SetMaxResults(v int64) *DescribeMaintenanceWindowsForTargetInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeMaintenanceWindowsForTargetInput) SetNextToken(v string) *DescribeMaintenanceWindowsForTargetInput { + s.NextToken = &v + return s +} + +// SetResourceType sets the ResourceType field's value. +func (s *DescribeMaintenanceWindowsForTargetInput) SetResourceType(v string) *DescribeMaintenanceWindowsForTargetInput { + s.ResourceType = &v + return s +} + +// SetTargets sets the Targets field's value. +func (s *DescribeMaintenanceWindowsForTargetInput) SetTargets(v []*Target) *DescribeMaintenanceWindowsForTargetInput { + s.Targets = v + return s +} + +type DescribeMaintenanceWindowsForTargetOutput struct { + _ struct{} `type:"structure"` + + // The token for the next set of items to return. (You use this token in the + // next call.) + NextToken *string `type:"string"` + + // Information about the Maintenance Window targets and tasks an instance is + // associated with. + WindowIdentities []*MaintenanceWindowIdentityForTarget `type:"list"` +} + +// String returns the string representation +func (s DescribeMaintenanceWindowsForTargetOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeMaintenanceWindowsForTargetOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeMaintenanceWindowsForTargetOutput) SetNextToken(v string) *DescribeMaintenanceWindowsForTargetOutput { + s.NextToken = &v + return s +} + +// SetWindowIdentities sets the WindowIdentities field's value. +func (s *DescribeMaintenanceWindowsForTargetOutput) SetWindowIdentities(v []*MaintenanceWindowIdentityForTarget) *DescribeMaintenanceWindowsForTargetOutput { + s.WindowIdentities = v + return s +} + type DescribeMaintenanceWindowsInput struct { _ struct{} `type:"structure"` @@ -18230,6 +19300,14 @@ type DescribePatchGroupStateOutput struct { // The number of instances with installed patches. InstancesWithInstalledPatches *int64 `type:"integer"` + // The number of instances with patches installed that are specified in a RejectedPatches + // list. Patches with a status of INSTALLED_REJECTED were typically installed + // before they were added to a RejectedPatches list. + // + // If ALLOW_AS_DEPENDENCY is the specified option for RejectedPatchesAction, + // the value of InstancesWithInstalledRejectedPatches will always be 0 (zero). + InstancesWithInstalledRejectedPatches *int64 `type:"integer"` + // The number of instances with missing patches from the patch baseline. InstancesWithMissingPatches *int64 `type:"integer"` @@ -18271,6 +19349,12 @@ func (s *DescribePatchGroupStateOutput) SetInstancesWithInstalledPatches(v int64 return s } +// SetInstancesWithInstalledRejectedPatches sets the InstancesWithInstalledRejectedPatches field's value. +func (s *DescribePatchGroupStateOutput) SetInstancesWithInstalledRejectedPatches(v int64) *DescribePatchGroupStateOutput { + s.InstancesWithInstalledRejectedPatches = &v + return s +} + // SetInstancesWithMissingPatches sets the InstancesWithMissingPatches field's value. func (s *DescribePatchGroupStateOutput) SetInstancesWithMissingPatches(v int64) *DescribePatchGroupStateOutput { s.InstancesWithMissingPatches = &v @@ -18400,7 +19484,7 @@ type DescribeSessionsInput struct { // a previous call.) NextToken *string `type:"string"` - // The session status to retrieve a list of sessions for. For example, "active". + // The session status to retrieve a list of sessions for. For example, "Active". // // State is a required field State *string `type:"string" required:"true" enum:"SessionState"` @@ -18509,6 +19593,9 @@ type DocumentDefaultVersionDescription struct { // The default version of the document. DefaultVersion *string `type:"string"` + // The default version of the artifact associated with the document. + DefaultVersionName *string `type:"string"` + // The name of the document. Name *string `type:"string"` } @@ -18529,6 +19616,12 @@ func (s *DocumentDefaultVersionDescription) SetDefaultVersion(v string) *Documen return s } +// SetDefaultVersionName sets the DefaultVersionName field's value. +func (s *DocumentDefaultVersionDescription) SetDefaultVersionName(v string) *DocumentDefaultVersionDescription { + s.DefaultVersionName = &v + return s +} + // SetName sets the Name field's value. func (s *DocumentDefaultVersionDescription) SetName(v string) *DocumentDefaultVersionDescription { s.Name = &v @@ -18539,6 +19632,10 @@ func (s *DocumentDefaultVersionDescription) SetName(v string) *DocumentDefaultVe type DocumentDescription struct { _ struct{} `type:"structure"` + // Details about the document attachments, including names, locations, sizes, + // etc. + AttachmentsInformation []*AttachmentInformation `type:"list"` + // The date when the document was created. CreatedDate *time.Time `type:"timestamp"` @@ -18562,7 +19659,7 @@ type DocumentDescription struct { // Sha1 hashes have been deprecated. Hash *string `type:"string"` - // Sha256 or Sha1. + // The hash type of the document. Valid values include Sha256 or Sha1. // // Sha1 hashes have been deprecated. HashType *string `type:"string" enum:"DocumentHashType"` @@ -18591,6 +19688,12 @@ type DocumentDescription struct { // The status of the Systems Manager document. Status *string `type:"string" enum:"DocumentStatus"` + // A message returned by AWS Systems Manager that explains the Status value. + // For example, a Failed status might be explained by the StatusInformation + // message, "The specified S3 bucket does not exist. Verify that the URL of + // the S3 bucket is correct." + StatusInformation *string `type:"string"` + // The tags, or metadata, that have been applied to the document. Tags []*Tag `type:"list"` @@ -18599,6 +19702,9 @@ type DocumentDescription struct { // see AWS Resource Types Reference (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html) // in the AWS CloudFormation User Guide. TargetType *string `type:"string"` + + // The version of the artifact associated with the document. + VersionName *string `type:"string"` } // String returns the string representation @@ -18611,6 +19717,12 @@ func (s DocumentDescription) GoString() string { return s.String() } +// SetAttachmentsInformation sets the AttachmentsInformation field's value. +func (s *DocumentDescription) SetAttachmentsInformation(v []*AttachmentInformation) *DocumentDescription { + s.AttachmentsInformation = v + return s +} + // SetCreatedDate sets the CreatedDate field's value. func (s *DocumentDescription) SetCreatedDate(v time.Time) *DocumentDescription { s.CreatedDate = &v @@ -18707,6 +19819,12 @@ func (s *DocumentDescription) SetStatus(v string) *DocumentDescription { return s } +// SetStatusInformation sets the StatusInformation field's value. +func (s *DocumentDescription) SetStatusInformation(v string) *DocumentDescription { + s.StatusInformation = &v + return s +} + // SetTags sets the Tags field's value. func (s *DocumentDescription) SetTags(v []*Tag) *DocumentDescription { s.Tags = v @@ -18719,6 +19837,12 @@ func (s *DocumentDescription) SetTargetType(v string) *DocumentDescription { return s } +// SetVersionName sets the VersionName field's value. +func (s *DocumentDescription) SetVersionName(v string) *DocumentDescription { + s.VersionName = &v + return s +} + // Describes a filter. type DocumentFilter struct { _ struct{} `type:"structure"` @@ -18808,6 +19932,11 @@ type DocumentIdentifier struct { // see AWS Resource Types Reference (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html) // in the AWS CloudFormation User Guide. TargetType *string `type:"string"` + + // An optional field specifying the version of the artifact associated with + // the document. For example, "Release 12, Update 6". This value is unique across + // all versions of a document, and cannot be changed. + VersionName *string `type:"string"` } // String returns the string representation @@ -18874,6 +20003,12 @@ func (s *DocumentIdentifier) SetTargetType(v string) *DocumentIdentifier { return s } +// SetVersionName sets the VersionName field's value. +func (s *DocumentIdentifier) SetVersionName(v string) *DocumentIdentifier { + s.VersionName = &v + return s +} + // One or more filters. Use a filter to return a more specific list of documents. // // For keys, you can specify one or more tags that have been applied to a document. @@ -19016,6 +20151,21 @@ type DocumentVersionInfo struct { // The document name. Name *string `type:"string"` + + // The status of the Systems Manager document, such as Creating, Active, Failed, + // and Deleting. + Status *string `type:"string" enum:"DocumentStatus"` + + // A message returned by AWS Systems Manager that explains the Status value. + // For example, a Failed status might be explained by the StatusInformation + // message, "The specified S3 bucket does not exist. Verify that the URL of + // the S3 bucket is correct." + StatusInformation *string `type:"string"` + + // The version of the artifact associated with the document. For example, "Release + // 12, Update 6". This value is unique across all versions of a document, and + // cannot be changed. + VersionName *string `type:"string"` } // String returns the string representation @@ -19058,6 +20208,24 @@ func (s *DocumentVersionInfo) SetName(v string) *DocumentVersionInfo { return s } +// SetStatus sets the Status field's value. +func (s *DocumentVersionInfo) SetStatus(v string) *DocumentVersionInfo { + s.Status = &v + return s +} + +// SetStatusInformation sets the StatusInformation field's value. +func (s *DocumentVersionInfo) SetStatusInformation(v string) *DocumentVersionInfo { + s.StatusInformation = &v + return s +} + +// SetVersionName sets the VersionName field's value. +func (s *DocumentVersionInfo) SetVersionName(v string) *DocumentVersionInfo { + s.VersionName = &v + return s +} + // The EffectivePatch structure defines metadata about a patch along with the // approval state of the patch in a particular patch baseline. The approval // state includes information about whether the patch is currently approved, @@ -19808,6 +20976,11 @@ type GetDocumentInput struct { // // Name is a required field Name *string `type:"string" required:"true"` + + // An optional field specifying the version of the artifact associated with + // the document. For example, "Release 12, Update 6". This value is unique across + // all versions of a document, and cannot be changed. + VersionName *string `type:"string"` } // String returns the string representation @@ -19851,9 +21024,19 @@ func (s *GetDocumentInput) SetName(v string) *GetDocumentInput { return s } +// SetVersionName sets the VersionName field's value. +func (s *GetDocumentInput) SetVersionName(v string) *GetDocumentInput { + s.VersionName = &v + return s +} + type GetDocumentOutput struct { _ struct{} `type:"structure"` + // A description of the document attachments, including names, locations, sizes, + // etc. + AttachmentsContent []*AttachmentContent `type:"list"` + // The contents of the Systems Manager document. Content *string `min:"1" type:"string"` @@ -19868,6 +21051,21 @@ type GetDocumentOutput struct { // The name of the Systems Manager document. Name *string `type:"string"` + + // The status of the Systems Manager document, such as Creating, Active, Updating, + // Failed, and Deleting. + Status *string `type:"string" enum:"DocumentStatus"` + + // A message returned by AWS Systems Manager that explains the Status value. + // For example, a Failed status might be explained by the StatusInformation + // message, "The specified S3 bucket does not exist. Verify that the URL of + // the S3 bucket is correct." + StatusInformation *string `type:"string"` + + // The version of the artifact associated with the document. For example, "Release + // 12, Update 6". This value is unique across all versions of a document, and + // cannot be changed. + VersionName *string `type:"string"` } // String returns the string representation @@ -19880,6 +21078,12 @@ func (s GetDocumentOutput) GoString() string { return s.String() } +// SetAttachmentsContent sets the AttachmentsContent field's value. +func (s *GetDocumentOutput) SetAttachmentsContent(v []*AttachmentContent) *GetDocumentOutput { + s.AttachmentsContent = v + return s +} + // SetContent sets the Content field's value. func (s *GetDocumentOutput) SetContent(v string) *GetDocumentOutput { s.Content = &v @@ -19910,6 +21114,24 @@ func (s *GetDocumentOutput) SetName(v string) *GetDocumentOutput { return s } +// SetStatus sets the Status field's value. +func (s *GetDocumentOutput) SetStatus(v string) *GetDocumentOutput { + s.Status = &v + return s +} + +// SetStatusInformation sets the StatusInformation field's value. +func (s *GetDocumentOutput) SetStatusInformation(v string) *GetDocumentOutput { + s.StatusInformation = &v + return s +} + +// SetVersionName sets the VersionName field's value. +func (s *GetDocumentOutput) SetVersionName(v string) *GetDocumentOutput { + s.VersionName = &v + return s +} + type GetInventoryInput struct { _ struct{} `type:"structure"` @@ -20428,10 +21650,10 @@ type GetMaintenanceWindowExecutionTaskInvocationOutput struct { // User-provided value to be included in any CloudWatch events raised while // running tasks for these targets in this Maintenance Window. - OwnerInformation *string `min:"1" type:"string"` + OwnerInformation *string `min:"1" type:"string" sensitive:"true"` // The parameters used at the time that the task executed. - Parameters *string `type:"string"` + Parameters *string `type:"string" sensitive:"true"` // The time that the task started executing on the target. StartTime *time.Time `type:"timestamp"` @@ -20586,7 +21808,7 @@ type GetMaintenanceWindowExecutionTaskOutput struct { // Key: string, between 1 and 255 characters // // Value: an array of strings, each string is between 1 and 255 characters - TaskParameters []map[string]*MaintenanceWindowTaskParameterValueExpression `type:"list"` + TaskParameters []map[string]*MaintenanceWindowTaskParameterValueExpression `type:"list" sensitive:"true"` // The type of task executed. Type *string `type:"string" enum:"MaintenanceWindowTaskType"` @@ -20739,7 +21961,7 @@ type GetMaintenanceWindowOutput struct { Cutoff *int64 `type:"integer"` // The description of the Maintenance Window. - Description *string `min:"1" type:"string"` + Description *string `min:"1" type:"string" sensitive:"true"` // The duration of the Maintenance Window in hours. Duration *int64 `min:"1" type:"integer"` @@ -20747,15 +21969,35 @@ type GetMaintenanceWindowOutput struct { // Whether the Maintenance Windows is enabled. Enabled *bool `type:"boolean"` + // The date and time, in ISO-8601 Extended format, for when the Maintenance + // Window is scheduled to become inactive. The Maintenance Window will not run + // after this specified time. + EndDate *string `type:"string"` + // The date the Maintenance Window was last modified. ModifiedDate *time.Time `type:"timestamp"` // The name of the Maintenance Window. Name *string `min:"3" type:"string"` + // The next time the Maintenance Window will actually run, taking into account + // any specified times for the Maintenance Window to become active or inactive. + NextExecutionTime *string `type:"string"` + // The schedule of the Maintenance Window in the form of a cron or rate expression. Schedule *string `min:"1" type:"string"` + // The time zone that the scheduled Maintenance Window executions are based + // on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", + // "etc/UTC", or "Asia/Seoul". For more information, see the Time Zone Database + // (https://www.iana.org/time-zones) on the IANA website. + ScheduleTimezone *string `type:"string"` + + // The date and time, in ISO-8601 Extended format, for when the Maintenance + // Window is scheduled to become active. The Maintenance Window will not run + // before this specified time. + StartDate *string `type:"string"` + // The ID of the created Maintenance Window. WindowId *string `min:"20" type:"string"` } @@ -20806,6 +22048,12 @@ func (s *GetMaintenanceWindowOutput) SetEnabled(v bool) *GetMaintenanceWindowOut return s } +// SetEndDate sets the EndDate field's value. +func (s *GetMaintenanceWindowOutput) SetEndDate(v string) *GetMaintenanceWindowOutput { + s.EndDate = &v + return s +} + // SetModifiedDate sets the ModifiedDate field's value. func (s *GetMaintenanceWindowOutput) SetModifiedDate(v time.Time) *GetMaintenanceWindowOutput { s.ModifiedDate = &v @@ -20818,12 +22066,30 @@ func (s *GetMaintenanceWindowOutput) SetName(v string) *GetMaintenanceWindowOutp return s } +// SetNextExecutionTime sets the NextExecutionTime field's value. +func (s *GetMaintenanceWindowOutput) SetNextExecutionTime(v string) *GetMaintenanceWindowOutput { + s.NextExecutionTime = &v + return s +} + // SetSchedule sets the Schedule field's value. func (s *GetMaintenanceWindowOutput) SetSchedule(v string) *GetMaintenanceWindowOutput { s.Schedule = &v return s } +// SetScheduleTimezone sets the ScheduleTimezone field's value. +func (s *GetMaintenanceWindowOutput) SetScheduleTimezone(v string) *GetMaintenanceWindowOutput { + s.ScheduleTimezone = &v + return s +} + +// SetStartDate sets the StartDate field's value. +func (s *GetMaintenanceWindowOutput) SetStartDate(v string) *GetMaintenanceWindowOutput { + s.StartDate = &v + return s +} + // SetWindowId sets the WindowId field's value. func (s *GetMaintenanceWindowOutput) SetWindowId(v string) *GetMaintenanceWindowOutput { s.WindowId = &v @@ -20892,7 +22158,7 @@ type GetMaintenanceWindowTaskOutput struct { _ struct{} `type:"structure"` // The retrieved task description. - Description *string `min:"1" type:"string"` + Description *string `min:"1" type:"string" sensitive:"true"` // The location in Amazon S3 where the task results are logged. // @@ -20936,7 +22202,7 @@ type GetMaintenanceWindowTaskOutput struct { // when it runs, instead use the Parameters option in the TaskInvocationParameters // structure. For information about how Systems Manager handles these options // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. - TaskParameters map[string]*MaintenanceWindowTaskParameterValueExpression `type:"map"` + TaskParameters map[string]*MaintenanceWindowTaskParameterValueExpression `type:"map" sensitive:"true"` // The type of task to execute. TaskType *string `type:"string" enum:"MaintenanceWindowTaskType"` @@ -21631,6 +22897,11 @@ type GetPatchBaselineOutput struct { // A list of explicitly rejected patches for the baseline. RejectedPatches []*string `type:"list"` + // The action specified to take on patches included in the RejectedPatches list. + // A patch can be allowed only if it is a dependency of another package, or + // blocked entirely along with packages that include it as a dependency. + RejectedPatchesAction *string `type:"string" enum:"PatchAction"` + // Information about the patches to use to update the instances, including target // operating systems and source repositories. Applies to Linux instances only. Sources []*PatchSource `type:"list"` @@ -21724,6 +22995,12 @@ func (s *GetPatchBaselineOutput) SetRejectedPatches(v []*string) *GetPatchBaseli return s } +// SetRejectedPatchesAction sets the RejectedPatchesAction field's value. +func (s *GetPatchBaselineOutput) SetRejectedPatchesAction(v string) *GetPatchBaselineOutput { + s.RejectedPatchesAction = &v + return s +} + // SetSources sets the Sources field's value. func (s *GetPatchBaselineOutput) SetSources(v []*PatchSource) *GetPatchBaselineOutput { s.Sources = v @@ -22331,6 +23608,16 @@ type InstancePatchState struct { // during the last patching operation, but failed to install. FailedCount *int64 `type:"integer"` + // An https URL or an Amazon S3 path-style URL to a list of patches to be installed. + // This patch installation list, which you maintain in an Amazon S3 bucket in + // YAML format and specify in the SSM document AWS-RunPatchBaseline, overrides + // the patches specified by the default patch baseline. + // + // For more information about the InstallOverrideList parameter, see About the + // SSM Document AWS-RunPatchBaseline (http://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-about-aws-runpatchbaseline.html) + // in the AWS Systems Manager User Guide. + InstallOverrideList *string `min:"1" type:"string"` + // The number of patches from the patch baseline that are installed on the instance. InstalledCount *int64 `type:"integer"` @@ -22338,6 +23625,14 @@ type InstancePatchState struct { // on the instance. InstalledOtherCount *int64 `type:"integer"` + // The number of instances with patches installed that are specified in a RejectedPatches + // list. Patches with a status of InstalledRejected were typically installed + // before they were added to a RejectedPatches list. + // + // If ALLOW_AS_DEPENDENCY is the specified option for RejectedPatchesAction, + // the value of InstalledRejectedCount will always be 0 (zero). + InstalledRejectedCount *int64 `type:"integer"` + // The ID of the managed instance the high-level patch compliance information // was collected for. // @@ -22370,7 +23665,7 @@ type InstancePatchState struct { // Placeholder information. This field will always be empty in the current release // of the service. - OwnerInformation *string `min:"1" type:"string"` + OwnerInformation *string `min:"1" type:"string" sensitive:"true"` // The name of the patch group the managed instance belongs to. // @@ -22404,6 +23699,12 @@ func (s *InstancePatchState) SetFailedCount(v int64) *InstancePatchState { return s } +// SetInstallOverrideList sets the InstallOverrideList field's value. +func (s *InstancePatchState) SetInstallOverrideList(v string) *InstancePatchState { + s.InstallOverrideList = &v + return s +} + // SetInstalledCount sets the InstalledCount field's value. func (s *InstancePatchState) SetInstalledCount(v int64) *InstancePatchState { s.InstalledCount = &v @@ -22416,6 +23717,12 @@ func (s *InstancePatchState) SetInstalledOtherCount(v int64) *InstancePatchState return s } +// SetInstalledRejectedCount sets the InstalledRejectedCount field's value. +func (s *InstancePatchState) SetInstalledRejectedCount(v int64) *InstancePatchState { + s.InstalledRejectedCount = &v + return s +} + // SetInstanceId sets the InstanceId field's value. func (s *InstancePatchState) SetInstanceId(v string) *InstancePatchState { s.InstanceId = &v @@ -24982,10 +26289,10 @@ type MaintenanceWindowExecutionTaskInvocationIdentity struct { // User-provided value that was specified when the target was registered with // the Maintenance Window. This was also included in any CloudWatch events raised // during the task invocation. - OwnerInformation *string `min:"1" type:"string"` + OwnerInformation *string `min:"1" type:"string" sensitive:"true"` // The parameters that were provided for the invocation when it was executed. - Parameters *string `type:"string"` + Parameters *string `type:"string" sensitive:"true"` // The time the invocation started. StartTime *time.Time `type:"timestamp"` @@ -25093,7 +26400,7 @@ func (s *MaintenanceWindowExecutionTaskInvocationIdentity) SetWindowTargetId(v s return s } -// Filter used in the request. +// Filter used in the request. Supported filter keys are Name and Enabled. type MaintenanceWindowFilter struct { _ struct{} `type:"structure"` @@ -25148,7 +26455,7 @@ type MaintenanceWindowIdentity struct { Cutoff *int64 `type:"integer"` // A description of the Maintenance Window. - Description *string `min:"1" type:"string"` + Description *string `min:"1" type:"string" sensitive:"true"` // The duration of the Maintenance Window in hours. Duration *int64 `min:"1" type:"integer"` @@ -25156,9 +26463,28 @@ type MaintenanceWindowIdentity struct { // Whether the Maintenance Window is enabled. Enabled *bool `type:"boolean"` + // The date and time, in ISO-8601 Extended format, for when the Maintenance + // Window is scheduled to become inactive. + EndDate *string `type:"string"` + // The name of the Maintenance Window. Name *string `min:"3" type:"string"` + // The next time the Maintenance Window will actually run, taking into account + // any specified times for the Maintenance Window to become active or inactive. + NextExecutionTime *string `type:"string"` + + // The schedule of the Maintenance Window in the form of a cron or rate expression. + Schedule *string `min:"1" type:"string"` + + // The time zone that the scheduled Maintenance Window executions are based + // on, in Internet Assigned Numbers Authority (IANA) format. + ScheduleTimezone *string `type:"string"` + + // The date and time, in ISO-8601 Extended format, for when the Maintenance + // Window is scheduled to become active. + StartDate *string `type:"string"` + // The ID of the Maintenance Window. WindowId *string `min:"20" type:"string"` } @@ -25197,18 +26523,81 @@ func (s *MaintenanceWindowIdentity) SetEnabled(v bool) *MaintenanceWindowIdentit return s } +// SetEndDate sets the EndDate field's value. +func (s *MaintenanceWindowIdentity) SetEndDate(v string) *MaintenanceWindowIdentity { + s.EndDate = &v + return s +} + // SetName sets the Name field's value. func (s *MaintenanceWindowIdentity) SetName(v string) *MaintenanceWindowIdentity { s.Name = &v return s } +// SetNextExecutionTime sets the NextExecutionTime field's value. +func (s *MaintenanceWindowIdentity) SetNextExecutionTime(v string) *MaintenanceWindowIdentity { + s.NextExecutionTime = &v + return s +} + +// SetSchedule sets the Schedule field's value. +func (s *MaintenanceWindowIdentity) SetSchedule(v string) *MaintenanceWindowIdentity { + s.Schedule = &v + return s +} + +// SetScheduleTimezone sets the ScheduleTimezone field's value. +func (s *MaintenanceWindowIdentity) SetScheduleTimezone(v string) *MaintenanceWindowIdentity { + s.ScheduleTimezone = &v + return s +} + +// SetStartDate sets the StartDate field's value. +func (s *MaintenanceWindowIdentity) SetStartDate(v string) *MaintenanceWindowIdentity { + s.StartDate = &v + return s +} + // SetWindowId sets the WindowId field's value. func (s *MaintenanceWindowIdentity) SetWindowId(v string) *MaintenanceWindowIdentity { s.WindowId = &v return s } +// The Maintenance Window to which the specified target belongs. +type MaintenanceWindowIdentityForTarget struct { + _ struct{} `type:"structure"` + + // The name of the Maintenance Window. + Name *string `min:"3" type:"string"` + + // The ID of the Maintenance Window. + WindowId *string `min:"20" type:"string"` +} + +// String returns the string representation +func (s MaintenanceWindowIdentityForTarget) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MaintenanceWindowIdentityForTarget) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *MaintenanceWindowIdentityForTarget) SetName(v string) *MaintenanceWindowIdentityForTarget { + s.Name = &v + return s +} + +// SetWindowId sets the WindowId field's value. +func (s *MaintenanceWindowIdentityForTarget) SetWindowId(v string) *MaintenanceWindowIdentityForTarget { + s.WindowId = &v + return s +} + // The parameters for a LAMBDA task type. // // For information about specifying and updating task parameters, see RegisterTaskWithMaintenanceWindow @@ -25237,7 +26626,7 @@ type MaintenanceWindowLambdaParameters struct { // JSON to provide to your Lambda function as input. // // Payload is automatically base64 encoded/decoded by the SDK. - Payload []byte `type:"blob"` + Payload []byte `type:"blob" sensitive:"true"` // (Optional) Specify a Lambda function version or alias name. If you specify // a function version, the action uses the qualified function ARN to invoke @@ -25337,7 +26726,7 @@ type MaintenanceWindowRunCommandParameters struct { ServiceRoleArn *string `type:"string"` // If this time is reached and the command has not already started executing, - // it doesn not execute. + // it doesn't run. TimeoutSeconds *int64 `min:"30" type:"integer"` } @@ -25442,7 +26831,7 @@ type MaintenanceWindowStepFunctionsParameters struct { _ struct{} `type:"structure"` // The inputs for the STEP_FUNCTION task. - Input *string `type:"string"` + Input *string `type:"string" sensitive:"true"` // The name of the STEP_FUNCTION task. Name *string `min:"1" type:"string"` @@ -25488,14 +26877,14 @@ type MaintenanceWindowTarget struct { _ struct{} `type:"structure"` // A description of the target. - Description *string `min:"1" type:"string"` + Description *string `min:"1" type:"string" sensitive:"true"` // The target name. Name *string `min:"3" type:"string"` // User-provided value that will be included in any CloudWatch events raised // while running tasks for these targets in this Maintenance Window. - OwnerInformation *string `min:"1" type:"string"` + OwnerInformation *string `min:"1" type:"string" sensitive:"true"` // The type of target. ResourceType *string `type:"string" enum:"MaintenanceWindowResourceType"` @@ -25568,7 +26957,7 @@ type MaintenanceWindowTask struct { _ struct{} `type:"structure"` // A description of the task. - Description *string `min:"1" type:"string"` + Description *string `min:"1" type:"string" sensitive:"true"` // Information about an Amazon S3 bucket to write task-level logs to. // @@ -25611,7 +27000,7 @@ type MaintenanceWindowTask struct { // when it runs, instead use the Parameters option in the TaskInvocationParameters // structure. For information about how Systems Manager handles these options // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. - TaskParameters map[string]*MaintenanceWindowTaskParameterValueExpression `type:"map"` + TaskParameters map[string]*MaintenanceWindowTaskParameterValueExpression `type:"map" sensitive:"true"` // The type of task. The type can be one of the following: RUN_COMMAND, AUTOMATION, // LAMBDA, or STEP_FUNCTION. @@ -25795,11 +27184,11 @@ func (s *MaintenanceWindowTaskInvocationParameters) SetStepFunctions(v *Maintena // Defines the values for a task parameter. type MaintenanceWindowTaskParameterValueExpression struct { - _ struct{} `type:"structure"` + _ struct{} `type:"structure" sensitive:"true"` // This field contains an array of 0 or more strings, each 1 to 255 characters // in length. - Values []*string `type:"list"` + Values []*string `type:"list" sensitive:"true"` } // String returns the string representation @@ -26664,8 +28053,10 @@ type PatchComplianceData struct { // Severity is a required field Severity *string `type:"string" required:"true"` - // The state of the patch on the instance (INSTALLED, INSTALLED_OTHER, MISSING, - // NOT_APPLICABLE or FAILED). + // The state of the patch on the instance, such as INSTALLED or FAILED. + // + // For descriptions of each patch state, see About Patch Compliance (http://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-compliance-about.html#sysman-compliance-monitor-patch) + // in the AWS Systems Manager User Guide. // // State is a required field State *string `type:"string" required:"true" enum:"PatchComplianceDataState"` @@ -27468,7 +28859,7 @@ type PatchSource struct { // debuglevel=2 // // Configuration is a required field - Configuration *string `min:"1" type:"string" required:"true"` + Configuration *string `min:"1" type:"string" required:"true" sensitive:"true"` // The name specified to identify the patch source. // @@ -27579,6 +28970,72 @@ func (s *PatchStatus) SetDeploymentStatus(v string) *PatchStatus { return s } +// An aggregate of step execution statuses displayed in the AWS Console for +// a multi-Region and multi-account Automation execution. +type ProgressCounters struct { + _ struct{} `type:"structure"` + + // The total number of steps that the system cancelled in all specified AWS + // Regions and accounts for the current Automation execution. + CancelledSteps *int64 `type:"integer"` + + // The total number of steps that failed to execute in all specified AWS Regions + // and accounts for the current Automation execution. + FailedSteps *int64 `type:"integer"` + + // The total number of steps that successfully completed in all specified AWS + // Regions and accounts for the current Automation execution. + SuccessSteps *int64 `type:"integer"` + + // The total number of steps that timed out in all specified AWS Regions and + // accounts for the current Automation execution. + TimedOutSteps *int64 `type:"integer"` + + // The total number of steps executed in all specified AWS Regions and accounts + // for the current Automation execution. + TotalSteps *int64 `type:"integer"` +} + +// String returns the string representation +func (s ProgressCounters) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ProgressCounters) GoString() string { + return s.String() +} + +// SetCancelledSteps sets the CancelledSteps field's value. +func (s *ProgressCounters) SetCancelledSteps(v int64) *ProgressCounters { + s.CancelledSteps = &v + return s +} + +// SetFailedSteps sets the FailedSteps field's value. +func (s *ProgressCounters) SetFailedSteps(v int64) *ProgressCounters { + s.FailedSteps = &v + return s +} + +// SetSuccessSteps sets the SuccessSteps field's value. +func (s *ProgressCounters) SetSuccessSteps(v int64) *ProgressCounters { + s.SuccessSteps = &v + return s +} + +// SetTimedOutSteps sets the TimedOutSteps field's value. +func (s *ProgressCounters) SetTimedOutSteps(v int64) *ProgressCounters { + s.TimedOutSteps = &v + return s +} + +// SetTotalSteps sets the TotalSteps field's value. +func (s *ProgressCounters) SetTotalSteps(v int64) *ProgressCounters { + s.TotalSteps = &v + return s +} + type PutComplianceItemsInput struct { _ struct{} `type:"structure"` @@ -28167,14 +29624,14 @@ type RegisterTargetWithMaintenanceWindowInput struct { ClientToken *string `min:"1" type:"string" idempotencyToken:"true"` // An optional description for the target. - Description *string `min:"1" type:"string"` + Description *string `min:"1" type:"string" sensitive:"true"` // An optional name for the target. Name *string `min:"3" type:"string"` // User-provided value that will be included in any CloudWatch events raised // while running tasks for these targets in this Maintenance Window. - OwnerInformation *string `min:"1" type:"string"` + OwnerInformation *string `min:"1" type:"string" sensitive:"true"` // The type of target being registered with the Maintenance Window. // @@ -28328,7 +29785,7 @@ type RegisterTaskWithMaintenanceWindowInput struct { ClientToken *string `min:"1" type:"string" idempotencyToken:"true"` // An optional description for the task. - Description *string `min:"1" type:"string"` + Description *string `min:"1" type:"string" sensitive:"true"` // A structure containing information about an Amazon S3 bucket to write instance-level // logs to. @@ -28400,7 +29857,7 @@ type RegisterTaskWithMaintenanceWindowInput struct { // when it runs, instead use the Parameters option in the TaskInvocationParameters // structure. For information about how Systems Manager handles these options // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. - TaskParameters map[string]*MaintenanceWindowTaskParameterValueExpression `type:"map"` + TaskParameters map[string]*MaintenanceWindowTaskParameterValueExpression `type:"map" sensitive:"true"` // The type of task being registered. // @@ -28579,7 +30036,7 @@ func (s *RegisterTaskWithMaintenanceWindowInput) SetWindowId(v string) *Register type RegisterTaskWithMaintenanceWindowOutput struct { _ struct{} `type:"structure"` - // The id of the task in the Maintenance Window. + // The ID of the task in the Maintenance Window. WindowTaskId *string `min:"36" type:"string"` } @@ -29216,6 +30673,49 @@ func (s *S3OutputUrl) SetOutputUrl(v string) *S3OutputUrl { return s } +// Information about a scheduled execution for a Maintenance Window. +type ScheduledWindowExecution struct { + _ struct{} `type:"structure"` + + // The time, in ISO-8601 Extended format, that the Maintenance Window is scheduled + // to be run. + ExecutionTime *string `type:"string"` + + // The name of the Maintenance Window to be run. + Name *string `min:"3" type:"string"` + + // The ID of the Maintenance Window to be run. + WindowId *string `min:"20" type:"string"` +} + +// String returns the string representation +func (s ScheduledWindowExecution) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ScheduledWindowExecution) GoString() string { + return s.String() +} + +// SetExecutionTime sets the ExecutionTime field's value. +func (s *ScheduledWindowExecution) SetExecutionTime(v string) *ScheduledWindowExecution { + s.ExecutionTime = &v + return s +} + +// SetName sets the Name field's value. +func (s *ScheduledWindowExecution) SetName(v string) *ScheduledWindowExecution { + s.Name = &v + return s +} + +// SetWindowId sets the WindowId field's value. +func (s *ScheduledWindowExecution) SetWindowId(v string) *ScheduledWindowExecution { + s.WindowId = &v + return s +} + type SendAutomationSignalInput struct { _ struct{} `type:"structure"` @@ -29342,7 +30842,7 @@ type SendCommandInput struct { // The instance IDs where the command should execute. You can specify a maximum // of 50 IDs. If you prefer not to list individual instance IDs, you can instead // send commands to a fleet of instances using the Targets parameter, which - // accepts EC2 tags. For more information about how to use Targets, see Sending + // accepts EC2 tags. For more information about how to use targets, see Sending // Commands to a Fleet (http://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html) // in the AWS Systems Manager User Guide. InstanceIds []*string `type:"list"` @@ -29385,7 +30885,7 @@ type SendCommandInput struct { // (Optional) An array of search criteria that targets instances using a Key,Value // combination that you specify. Targets is required if you don't provide one - // or more instance IDs in the call. For more information about how to use Targets, + // or more instance IDs in the call. For more information about how to use targets, // see Sending Commands to a Fleet (http://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html) // in the AWS Systems Manager User Guide. Targets []*Target `type:"list"` @@ -29969,12 +31469,19 @@ type StartAutomationExecutionInput struct { // in the Automation document. Parameters map[string][]*string `min:"1" type:"map"` + // A location is a combination of AWS Regions and/or AWS accounts where you + // want to execute the Automation. Use this action to start an Automation in + // multiple Regions and multiple accounts. For more information, see Concurrently + // Executing Automations in Multiple AWS Regions and Accounts (http://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-automation-multiple-accounts-and-regions.html) + // in the AWS Systems Manager User Guide. + TargetLocations []*TargetLocation `min:"1" type:"list"` + // A key-value mapping of document parameters to target resources. Both Targets // and TargetMaps cannot be specified together. TargetMaps []map[string][]*string `type:"list"` // The name of the parameter used as the target resource for the rate-controlled - // execution. Required if you specify Targets. + // execution. Required if you specify targets. TargetParameterName *string `min:"1" type:"string"` // A key-value mapping to target resources. Required if you specify TargetParameterName. @@ -30009,9 +31516,22 @@ func (s *StartAutomationExecutionInput) Validate() error { if s.Parameters != nil && len(s.Parameters) < 1 { invalidParams.Add(request.NewErrParamMinLen("Parameters", 1)) } + if s.TargetLocations != nil && len(s.TargetLocations) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TargetLocations", 1)) + } if s.TargetParameterName != nil && len(*s.TargetParameterName) < 1 { invalidParams.Add(request.NewErrParamMinLen("TargetParameterName", 1)) } + if s.TargetLocations != nil { + for i, v := range s.TargetLocations { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetLocations", i), err.(request.ErrInvalidParams)) + } + } + } if s.Targets != nil { for i, v := range s.Targets { if v == nil { @@ -30071,6 +31591,12 @@ func (s *StartAutomationExecutionInput) SetParameters(v map[string][]*string) *S return s } +// SetTargetLocations sets the TargetLocations field's value. +func (s *StartAutomationExecutionInput) SetTargetLocations(v []*TargetLocation) *StartAutomationExecutionInput { + s.TargetLocations = v + return s +} + // SetTargetMaps sets the TargetMaps field's value. func (s *StartAutomationExecutionInput) SetTargetMaps(v []map[string][]*string) *StartAutomationExecutionInput { s.TargetMaps = v @@ -30289,6 +31815,13 @@ type StepExecution struct { // Success, Cancelled, Failed, and TimedOut. StepStatus *string `type:"string" enum:"AutomationExecutionStatus"` + // The combination of AWS Regions and accounts targeted by the current Automation + // execution. + TargetLocation *TargetLocation `type:"structure"` + + // The targets for the step execution. + Targets []*Target `type:"list"` + // The timeout seconds of the step. TimeoutSeconds *int64 `type:"long"` @@ -30418,6 +31951,18 @@ func (s *StepExecution) SetStepStatus(v string) *StepExecution { return s } +// SetTargetLocation sets the TargetLocation field's value. +func (s *StepExecution) SetTargetLocation(v *TargetLocation) *StepExecution { + s.TargetLocation = v + return s +} + +// SetTargets sets the Targets field's value. +func (s *StepExecution) SetTargets(v []*Target) *StepExecution { + s.Targets = v + return s +} + // SetTimeoutSeconds sets the TimeoutSeconds field's value. func (s *StepExecution) SetTimeoutSeconds(v int64) *StepExecution { s.TimeoutSeconds = &v @@ -30673,6 +32218,94 @@ func (s *Target) SetValues(v []*string) *Target { return s } +// The combination of AWS Regions and accounts targeted by the current Automation +// execution. +type TargetLocation struct { + _ struct{} `type:"structure"` + + // The AWS accounts targeted by the current Automation execution. + Accounts []*string `min:"1" type:"list"` + + // The Automation execution role used by the currently executing Automation. + ExecutionRoleName *string `min:"1" type:"string"` + + // The AWS Regions targeted by the current Automation execution. + Regions []*string `min:"1" type:"list"` + + // The maxium number of AWS accounts and AWS regions allowed to run the Automation + // concurrently + TargetLocationMaxConcurrency *string `min:"1" type:"string"` + + // The maxium number of errors allowed before the system stops queueing additional + // Automation executions for the currently executing Automation. + TargetLocationMaxErrors *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s TargetLocation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TargetLocation) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TargetLocation) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TargetLocation"} + if s.Accounts != nil && len(s.Accounts) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Accounts", 1)) + } + if s.ExecutionRoleName != nil && len(*s.ExecutionRoleName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ExecutionRoleName", 1)) + } + if s.Regions != nil && len(s.Regions) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Regions", 1)) + } + if s.TargetLocationMaxConcurrency != nil && len(*s.TargetLocationMaxConcurrency) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TargetLocationMaxConcurrency", 1)) + } + if s.TargetLocationMaxErrors != nil && len(*s.TargetLocationMaxErrors) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TargetLocationMaxErrors", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccounts sets the Accounts field's value. +func (s *TargetLocation) SetAccounts(v []*string) *TargetLocation { + s.Accounts = v + return s +} + +// SetExecutionRoleName sets the ExecutionRoleName field's value. +func (s *TargetLocation) SetExecutionRoleName(v string) *TargetLocation { + s.ExecutionRoleName = &v + return s +} + +// SetRegions sets the Regions field's value. +func (s *TargetLocation) SetRegions(v []*string) *TargetLocation { + s.Regions = v + return s +} + +// SetTargetLocationMaxConcurrency sets the TargetLocationMaxConcurrency field's value. +func (s *TargetLocation) SetTargetLocationMaxConcurrency(v string) *TargetLocation { + s.TargetLocationMaxConcurrency = &v + return s +} + +// SetTargetLocationMaxErrors sets the TargetLocationMaxErrors field's value. +func (s *TargetLocation) SetTargetLocationMaxErrors(v string) *TargetLocation { + s.TargetLocationMaxErrors = &v + return s +} + type TerminateSessionInput struct { _ struct{} `type:"structure"` @@ -30753,9 +32386,38 @@ type UpdateAssociationInput struct { // this request succeeds, either specify $LATEST, or omit this parameter. AssociationVersion *string `type:"string"` + // The severity level to assign to the association. + ComplianceSeverity *string `type:"string" enum:"AssociationComplianceSeverity"` + // The document version you want update for the association. DocumentVersion *string `type:"string"` + // The maximum number of targets allowed to run the association at the same + // time. You can specify a number, for example 10, or a percentage of the target + // set, for example 10%. The default value is 100%, which means all targets + // run the association at the same time. + // + // If a new instance starts and attempts to execute an association while Systems + // Manager is executing MaxConcurrency associations, the association is allowed + // to run. During the next association interval, the new instance will process + // its association within the limit specified for MaxConcurrency. + MaxConcurrency *string `min:"1" type:"string"` + + // The number of errors that are allowed before the system stops sending requests + // to run the association on additional targets. You can specify either an absolute + // number of errors, for example 10, or a percentage of the target set, for + // example 10%. If you specify 3, for example, the system stops sending requests + // when the fourth error is received. If you specify 0, then the system stops + // sending requests after the first error is returned. If you run an association + // on 50 instances and set MaxError to 10%, then the system stops sending the + // request when the sixth error is received. + // + // Executions that are already running an association when MaxErrors is reached + // are allowed to complete, but some of these executions may fail as well. If + // you need to ensure that there won't be more than max-errors failed executions, + // set MaxConcurrency to 1 so that executions proceed one at a time. + MaxErrors *string `min:"1" type:"string"` + // The name of the association document. Name *string `type:"string"` @@ -30789,6 +32451,12 @@ func (s *UpdateAssociationInput) Validate() error { if s.AssociationId == nil { invalidParams.Add(request.NewErrParamRequired("AssociationId")) } + if s.MaxConcurrency != nil && len(*s.MaxConcurrency) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MaxConcurrency", 1)) + } + if s.MaxErrors != nil && len(*s.MaxErrors) < 1 { + invalidParams.Add(request.NewErrParamMinLen("MaxErrors", 1)) + } if s.ScheduleExpression != nil && len(*s.ScheduleExpression) < 1 { invalidParams.Add(request.NewErrParamMinLen("ScheduleExpression", 1)) } @@ -30832,12 +32500,30 @@ func (s *UpdateAssociationInput) SetAssociationVersion(v string) *UpdateAssociat return s } +// SetComplianceSeverity sets the ComplianceSeverity field's value. +func (s *UpdateAssociationInput) SetComplianceSeverity(v string) *UpdateAssociationInput { + s.ComplianceSeverity = &v + return s +} + // SetDocumentVersion sets the DocumentVersion field's value. func (s *UpdateAssociationInput) SetDocumentVersion(v string) *UpdateAssociationInput { s.DocumentVersion = &v return s } +// SetMaxConcurrency sets the MaxConcurrency field's value. +func (s *UpdateAssociationInput) SetMaxConcurrency(v string) *UpdateAssociationInput { + s.MaxConcurrency = &v + return s +} + +// SetMaxErrors sets the MaxErrors field's value. +func (s *UpdateAssociationInput) SetMaxErrors(v string) *UpdateAssociationInput { + s.MaxErrors = &v + return s +} + // SetName sets the Name field's value. func (s *UpdateAssociationInput) SetName(v string) *UpdateAssociationInput { s.Name = &v @@ -31064,7 +32750,11 @@ func (s *UpdateDocumentDefaultVersionOutput) SetDescription(v *DocumentDefaultVe type UpdateDocumentInput struct { _ struct{} `type:"structure"` - // The content in a document that you want to update. + // A list of key and value pairs that describe attachments to a version of a + // document. + Attachments []*AttachmentsSource `type:"list"` + + // A valid JSON or YAML string. // // Content is a required field Content *string `min:"1" type:"string" required:"true"` @@ -31083,6 +32773,11 @@ type UpdateDocumentInput struct { // Specify a new target type for the document. TargetType *string `type:"string"` + + // An optional field specifying the version of the artifact you are updating + // with the document. For example, "Release 12, Update 6". This value is unique + // across all versions of a document, and cannot be changed. + VersionName *string `type:"string"` } // String returns the string representation @@ -31107,6 +32802,16 @@ func (s *UpdateDocumentInput) Validate() error { if s.Name == nil { invalidParams.Add(request.NewErrParamRequired("Name")) } + if s.Attachments != nil { + for i, v := range s.Attachments { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Attachments", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -31114,6 +32819,12 @@ func (s *UpdateDocumentInput) Validate() error { return nil } +// SetAttachments sets the Attachments field's value. +func (s *UpdateDocumentInput) SetAttachments(v []*AttachmentsSource) *UpdateDocumentInput { + s.Attachments = v + return s +} + // SetContent sets the Content field's value. func (s *UpdateDocumentInput) SetContent(v string) *UpdateDocumentInput { s.Content = &v @@ -31144,6 +32855,12 @@ func (s *UpdateDocumentInput) SetTargetType(v string) *UpdateDocumentInput { return s } +// SetVersionName sets the VersionName field's value. +func (s *UpdateDocumentInput) SetVersionName(v string) *UpdateDocumentInput { + s.VersionName = &v + return s +} + type UpdateDocumentOutput struct { _ struct{} `type:"structure"` @@ -31179,7 +32896,7 @@ type UpdateMaintenanceWindowInput struct { Cutoff *int64 `type:"integer"` // An optional description for the update request. - Description *string `min:"1" type:"string"` + Description *string `min:"1" type:"string" sensitive:"true"` // The duration of the Maintenance Window in hours. Duration *int64 `min:"1" type:"integer"` @@ -31187,6 +32904,11 @@ type UpdateMaintenanceWindowInput struct { // Whether the Maintenance Window is enabled. Enabled *bool `type:"boolean"` + // The date and time, in ISO-8601 Extended format, for when you want the Maintenance + // Window to become inactive. EndDate allows you to set a date and time in the + // future when the Maintenance Window will no longer run. + EndDate *string `type:"string"` + // The name of the Maintenance Window. Name *string `min:"3" type:"string"` @@ -31198,6 +32920,18 @@ type UpdateMaintenanceWindowInput struct { // The schedule of the Maintenance Window in the form of a cron or rate expression. Schedule *string `min:"1" type:"string"` + // The time zone that the scheduled Maintenance Window executions are based + // on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", + // "etc/UTC", or "Asia/Seoul". For more information, see the Time Zone Database + // (https://www.iana.org/time-zones) on the IANA website. + ScheduleTimezone *string `type:"string"` + + // The time zone that the scheduled Maintenance Window executions are based + // on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", + // "etc/UTC", or "Asia/Seoul". For more information, see the Time Zone Database + // (https://www.iana.org/time-zones) on the IANA website. + StartDate *string `type:"string"` + // The ID of the Maintenance Window to update. // // WindowId is a required field @@ -31272,6 +33006,12 @@ func (s *UpdateMaintenanceWindowInput) SetEnabled(v bool) *UpdateMaintenanceWind return s } +// SetEndDate sets the EndDate field's value. +func (s *UpdateMaintenanceWindowInput) SetEndDate(v string) *UpdateMaintenanceWindowInput { + s.EndDate = &v + return s +} + // SetName sets the Name field's value. func (s *UpdateMaintenanceWindowInput) SetName(v string) *UpdateMaintenanceWindowInput { s.Name = &v @@ -31290,6 +33030,18 @@ func (s *UpdateMaintenanceWindowInput) SetSchedule(v string) *UpdateMaintenanceW return s } +// SetScheduleTimezone sets the ScheduleTimezone field's value. +func (s *UpdateMaintenanceWindowInput) SetScheduleTimezone(v string) *UpdateMaintenanceWindowInput { + s.ScheduleTimezone = &v + return s +} + +// SetStartDate sets the StartDate field's value. +func (s *UpdateMaintenanceWindowInput) SetStartDate(v string) *UpdateMaintenanceWindowInput { + s.StartDate = &v + return s +} + // SetWindowId sets the WindowId field's value. func (s *UpdateMaintenanceWindowInput) SetWindowId(v string) *UpdateMaintenanceWindowInput { s.WindowId = &v @@ -31308,7 +33060,7 @@ type UpdateMaintenanceWindowOutput struct { Cutoff *int64 `type:"integer"` // An optional description of the update. - Description *string `min:"1" type:"string"` + Description *string `min:"1" type:"string" sensitive:"true"` // The duration of the Maintenance Window in hours. Duration *int64 `min:"1" type:"integer"` @@ -31316,12 +33068,28 @@ type UpdateMaintenanceWindowOutput struct { // Whether the Maintenance Window is enabled. Enabled *bool `type:"boolean"` + // The date and time, in ISO-8601 Extended format, for when the Maintenance + // Window is scheduled to become inactive. The Maintenance Window will not run + // after this specified time. + EndDate *string `type:"string"` + // The name of the Maintenance Window. Name *string `min:"3" type:"string"` // The schedule of the Maintenance Window in the form of a cron or rate expression. Schedule *string `min:"1" type:"string"` + // The time zone that the scheduled Maintenance Window executions are based + // on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", + // "etc/UTC", or "Asia/Seoul". For more information, see the Time Zone Database + // (https://www.iana.org/time-zones) on the IANA website. + ScheduleTimezone *string `type:"string"` + + // The date and time, in ISO-8601 Extended format, for when the Maintenance + // Window is scheduled to become active. The Maintenance Window will not run + // before this specified time. + StartDate *string `type:"string"` + // The ID of the created Maintenance Window. WindowId *string `min:"20" type:"string"` } @@ -31366,6 +33134,12 @@ func (s *UpdateMaintenanceWindowOutput) SetEnabled(v bool) *UpdateMaintenanceWin return s } +// SetEndDate sets the EndDate field's value. +func (s *UpdateMaintenanceWindowOutput) SetEndDate(v string) *UpdateMaintenanceWindowOutput { + s.EndDate = &v + return s +} + // SetName sets the Name field's value. func (s *UpdateMaintenanceWindowOutput) SetName(v string) *UpdateMaintenanceWindowOutput { s.Name = &v @@ -31378,6 +33152,18 @@ func (s *UpdateMaintenanceWindowOutput) SetSchedule(v string) *UpdateMaintenance return s } +// SetScheduleTimezone sets the ScheduleTimezone field's value. +func (s *UpdateMaintenanceWindowOutput) SetScheduleTimezone(v string) *UpdateMaintenanceWindowOutput { + s.ScheduleTimezone = &v + return s +} + +// SetStartDate sets the StartDate field's value. +func (s *UpdateMaintenanceWindowOutput) SetStartDate(v string) *UpdateMaintenanceWindowOutput { + s.StartDate = &v + return s +} + // SetWindowId sets the WindowId field's value. func (s *UpdateMaintenanceWindowOutput) SetWindowId(v string) *UpdateMaintenanceWindowOutput { s.WindowId = &v @@ -31388,14 +33174,14 @@ type UpdateMaintenanceWindowTargetInput struct { _ struct{} `type:"structure"` // An optional description for the update. - Description *string `min:"1" type:"string"` + Description *string `min:"1" type:"string" sensitive:"true"` // A name for the update. Name *string `min:"3" type:"string"` // User-provided value that will be included in any CloudWatch events raised // while running tasks for these targets in this Maintenance Window. - OwnerInformation *string `min:"1" type:"string"` + OwnerInformation *string `min:"1" type:"string" sensitive:"true"` // If True, then all fields that are required by the RegisterTargetWithMaintenanceWindow // action are also required for this API request. Optional fields that are not @@ -31513,13 +33299,13 @@ type UpdateMaintenanceWindowTargetOutput struct { _ struct{} `type:"structure"` // The updated description. - Description *string `min:"1" type:"string"` + Description *string `min:"1" type:"string" sensitive:"true"` // The updated name. Name *string `min:"3" type:"string"` // The updated owner. - OwnerInformation *string `min:"1" type:"string"` + OwnerInformation *string `min:"1" type:"string" sensitive:"true"` // The updated targets. Targets []*Target `type:"list"` @@ -31581,7 +33367,7 @@ type UpdateMaintenanceWindowTaskInput struct { _ struct{} `type:"structure"` // The new task description to specify. - Description *string `min:"1" type:"string"` + Description *string `min:"1" type:"string" sensitive:"true"` // The new logging location in Amazon S3 to specify. // @@ -31651,7 +33437,7 @@ type UpdateMaintenanceWindowTaskInput struct { // Key: string, between 1 and 255 characters // // Value: an array of strings, each string is between 1 and 255 characters - TaskParameters map[string]*MaintenanceWindowTaskParameterValueExpression `type:"map"` + TaskParameters map[string]*MaintenanceWindowTaskParameterValueExpression `type:"map" sensitive:"true"` // The Maintenance Window ID that contains the task to modify. // @@ -31819,7 +33605,7 @@ type UpdateMaintenanceWindowTaskOutput struct { _ struct{} `type:"structure"` // The updated task description. - Description *string `min:"1" type:"string"` + Description *string `min:"1" type:"string" sensitive:"true"` // The updated logging information in Amazon S3. // @@ -31859,7 +33645,7 @@ type UpdateMaintenanceWindowTaskOutput struct { // when it runs, instead use the Parameters option in the TaskInvocationParameters // structure. For information about how Systems Manager handles these options // for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters. - TaskParameters map[string]*MaintenanceWindowTaskParameterValueExpression `type:"map"` + TaskParameters map[string]*MaintenanceWindowTaskParameterValueExpression `type:"map" sensitive:"true"` // The ID of the Maintenance Window that was updated. WindowId *string `min:"20" type:"string"` @@ -32066,6 +33852,21 @@ type UpdatePatchBaselineInput struct { // in the AWS Systems Manager User Guide. RejectedPatches []*string `type:"list"` + // The action for Patch Manager to take on patches included in the RejectedPackages + // list. + // + // * ALLOW_AS_DEPENDENCY: A package in the Rejected patches list is installed + // only if it is a dependency of another package. It is considered compliant + // with the patch baseline, and its status is reported as InstalledOther. + // This is the default action if no option is specified. + // + // * BLOCK: Packages in the RejectedPatches list, and packages that include + // them as dependencies, are not installed under any circumstances. If a + // package was installed before it was added to the Rejected patches list, + // it is considered non-compliant with the patch baseline, and its status + // is reported as InstalledRejected. + RejectedPatchesAction *string `type:"string" enum:"PatchAction"` + // If True, then all fields that are required by the CreatePatchBaseline action // are also required for this API request. Optional fields that are not specified // are set to null. @@ -32182,6 +33983,12 @@ func (s *UpdatePatchBaselineInput) SetRejectedPatches(v []*string) *UpdatePatchB return s } +// SetRejectedPatchesAction sets the RejectedPatchesAction field's value. +func (s *UpdatePatchBaselineInput) SetRejectedPatchesAction(v string) *UpdatePatchBaselineInput { + s.RejectedPatchesAction = &v + return s +} + // SetReplace sets the Replace field's value. func (s *UpdatePatchBaselineInput) SetReplace(v bool) *UpdatePatchBaselineInput { s.Replace = &v @@ -32236,6 +34043,11 @@ type UpdatePatchBaselineOutput struct { // A list of explicitly rejected patches for the baseline. RejectedPatches []*string `type:"list"` + // The action specified to take on patches included in the RejectedPatches list. + // A patch can be allowed only if it is a dependency of another package, or + // blocked entirely along with packages that include it as a dependency. + RejectedPatchesAction *string `type:"string" enum:"PatchAction"` + // Information about the patches to use to update the instances, including target // operating systems and source repositories. Applies to Linux instances only. Sources []*PatchSource `type:"list"` @@ -32323,12 +34135,35 @@ func (s *UpdatePatchBaselineOutput) SetRejectedPatches(v []*string) *UpdatePatch return s } +// SetRejectedPatchesAction sets the RejectedPatchesAction field's value. +func (s *UpdatePatchBaselineOutput) SetRejectedPatchesAction(v string) *UpdatePatchBaselineOutput { + s.RejectedPatchesAction = &v + return s +} + // SetSources sets the Sources field's value. func (s *UpdatePatchBaselineOutput) SetSources(v []*PatchSource) *UpdatePatchBaselineOutput { s.Sources = v return s } +const ( + // AssociationComplianceSeverityCritical is a AssociationComplianceSeverity enum value + AssociationComplianceSeverityCritical = "CRITICAL" + + // AssociationComplianceSeverityHigh is a AssociationComplianceSeverity enum value + AssociationComplianceSeverityHigh = "HIGH" + + // AssociationComplianceSeverityMedium is a AssociationComplianceSeverity enum value + AssociationComplianceSeverityMedium = "MEDIUM" + + // AssociationComplianceSeverityLow is a AssociationComplianceSeverity enum value + AssociationComplianceSeverityLow = "LOW" + + // AssociationComplianceSeverityUnspecified is a AssociationComplianceSeverity enum value + AssociationComplianceSeverityUnspecified = "UNSPECIFIED" +) + const ( // AssociationExecutionFilterKeyExecutionId is a AssociationExecutionFilterKey enum value AssociationExecutionFilterKeyExecutionId = "ExecutionId" @@ -32396,6 +34231,16 @@ const ( AssociationStatusNameFailed = "Failed" ) +const ( + // AttachmentHashTypeSha256 is a AttachmentHashType enum value + AttachmentHashTypeSha256 = "Sha256" +) + +const ( + // AttachmentsSourceKeySourceUrl is a AttachmentsSourceKey enum value + AttachmentsSourceKeySourceUrl = "SourceUrl" +) + const ( // AutomationExecutionFilterKeyDocumentNamePrefix is a AutomationExecutionFilterKey enum value AutomationExecutionFilterKeyDocumentNamePrefix = "DocumentNamePrefix" @@ -32417,6 +34262,9 @@ const ( // AutomationExecutionFilterKeyStartTimeAfter is a AutomationExecutionFilterKey enum value AutomationExecutionFilterKeyStartTimeAfter = "StartTimeAfter" + + // AutomationExecutionFilterKeyAutomationType is a AutomationExecutionFilterKey enum value + AutomationExecutionFilterKeyAutomationType = "AutomationType" ) const ( @@ -32445,6 +34293,14 @@ const ( AutomationExecutionStatusFailed = "Failed" ) +const ( + // AutomationTypeCrossAccount is a AutomationType enum value + AutomationTypeCrossAccount = "CrossAccount" + + // AutomationTypeLocal is a AutomationType enum value + AutomationTypeLocal = "Local" +) + const ( // CommandFilterKeyInvokedAfter is a CommandFilterKey enum value CommandFilterKeyInvokedAfter = "InvokedAfter" @@ -32638,6 +34494,7 @@ const ( DocumentPermissionTypeShare = "Share" ) +// The status of a document. const ( // DocumentStatusCreating is a DocumentStatus enum value DocumentStatusCreating = "Creating" @@ -32650,6 +34507,9 @@ const ( // DocumentStatusDeleting is a DocumentStatus enum value DocumentStatusDeleting = "Deleting" + + // DocumentStatusFailed is a DocumentStatus enum value + DocumentStatusFailed = "Failed" ) const ( @@ -32664,6 +34524,9 @@ const ( // DocumentTypeSession is a DocumentType enum value DocumentTypeSession = "Session" + + // DocumentTypePackage is a DocumentType enum value + DocumentTypePackage = "Package" ) const ( @@ -32898,6 +34761,14 @@ const ( ParametersFilterKeyKeyId = "KeyId" ) +const ( + // PatchActionAllowAsDependency is a PatchAction enum value + PatchActionAllowAsDependency = "ALLOW_AS_DEPENDENCY" + + // PatchActionBlock is a PatchAction enum value + PatchActionBlock = "BLOCK" +) + const ( // PatchComplianceDataStateInstalled is a PatchComplianceDataState enum value PatchComplianceDataStateInstalled = "INSTALLED" @@ -32905,6 +34776,9 @@ const ( // PatchComplianceDataStateInstalledOther is a PatchComplianceDataState enum value PatchComplianceDataStateInstalledOther = "INSTALLED_OTHER" + // PatchComplianceDataStateInstalledRejected is a PatchComplianceDataState enum value + PatchComplianceDataStateInstalledRejected = "INSTALLED_REJECTED" + // PatchComplianceDataStateMissing is a PatchComplianceDataState enum value PatchComplianceDataStateMissing = "MISSING" diff --git a/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go b/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go index da7ff9e647..44d3bac89f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ssm/errors.go @@ -140,6 +140,13 @@ const ( // the content of the document and try again. ErrCodeDuplicateDocumentContent = "DuplicateDocumentContent" + // ErrCodeDuplicateDocumentVersionName for service response error code + // "DuplicateDocumentVersionName". + // + // The version name has already been used in this document. Specify a different + // version name, and then try again. + ErrCodeDuplicateDocumentVersionName = "DuplicateDocumentVersionName" + // ErrCodeDuplicateInstanceId for service response error code // "DuplicateInstanceId". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go index 688307869e..f1ba98b9b2 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/storagegateway/api.go @@ -16,7 +16,7 @@ const opActivateGateway = "ActivateGateway" // ActivateGatewayRequest generates a "aws/request.Request" representing the // client's request for the ActivateGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -107,7 +107,7 @@ const opAddCache = "AddCache" // AddCacheRequest generates a "aws/request.Request" representing the // client's request for the AddCache operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -197,7 +197,7 @@ const opAddTagsToResource = "AddTagsToResource" // AddTagsToResourceRequest generates a "aws/request.Request" representing the // client's request for the AddTagsToResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -294,7 +294,7 @@ const opAddUploadBuffer = "AddUploadBuffer" // AddUploadBufferRequest generates a "aws/request.Request" representing the // client's request for the AddUploadBuffer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -384,7 +384,7 @@ const opAddWorkingStorage = "AddWorkingStorage" // AddWorkingStorageRequest generates a "aws/request.Request" representing the // client's request for the AddWorkingStorage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -473,12 +473,100 @@ func (c *StorageGateway) AddWorkingStorageWithContext(ctx aws.Context, input *Ad return out, req.Send() } +const opAttachVolume = "AttachVolume" + +// AttachVolumeRequest generates a "aws/request.Request" representing the +// client's request for the AttachVolume 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 AttachVolume for more information on using the AttachVolume +// 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 AttachVolumeRequest method. +// req, resp := client.AttachVolumeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AttachVolume +func (c *StorageGateway) AttachVolumeRequest(input *AttachVolumeInput) (req *request.Request, output *AttachVolumeOutput) { + op := &request.Operation{ + Name: opAttachVolume, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AttachVolumeInput{} + } + + output = &AttachVolumeOutput{} + req = c.newRequest(op, input, output) + return +} + +// AttachVolume API operation for AWS Storage Gateway. +// +// Connects a volume to an iSCSI connection and then attaches the volume to +// the specified gateway. Detaching and attaching a volume enables you to recover +// your data from one gateway to a different gateway without creating a snapshot. +// It also makes it easier to move your volumes from an on-premises gateway +// to a gateway hosted on an Amazon EC2 instance. +// +// 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 Storage Gateway's +// API operation AttachVolume for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AttachVolume +func (c *StorageGateway) AttachVolume(input *AttachVolumeInput) (*AttachVolumeOutput, error) { + req, out := c.AttachVolumeRequest(input) + return out, req.Send() +} + +// AttachVolumeWithContext is the same as AttachVolume with the addition of +// the ability to pass a context and additional request options. +// +// See AttachVolume 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 *StorageGateway) AttachVolumeWithContext(ctx aws.Context, input *AttachVolumeInput, opts ...request.Option) (*AttachVolumeOutput, error) { + req, out := c.AttachVolumeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCancelArchival = "CancelArchival" // CancelArchivalRequest generates a "aws/request.Request" representing the // client's request for the CancelArchival operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -564,7 +652,7 @@ const opCancelRetrieval = "CancelRetrieval" // CancelRetrievalRequest generates a "aws/request.Request" representing the // client's request for the CancelRetrieval operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -650,7 +738,7 @@ const opCreateCachediSCSIVolume = "CreateCachediSCSIVolume" // CreateCachediSCSIVolumeRequest generates a "aws/request.Request" representing the // client's request for the CreateCachediSCSIVolume operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -750,7 +838,7 @@ const opCreateNFSFileShare = "CreateNFSFileShare" // CreateNFSFileShareRequest generates a "aws/request.Request" representing the // client's request for the CreateNFSFileShare operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -846,7 +934,7 @@ const opCreateSMBFileShare = "CreateSMBFileShare" // CreateSMBFileShareRequest generates a "aws/request.Request" representing the // client's request for the CreateSMBFileShare operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -942,7 +1030,7 @@ const opCreateSnapshot = "CreateSnapshot" // CreateSnapshotRequest generates a "aws/request.Request" representing the // client's request for the CreateSnapshot operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1053,7 +1141,7 @@ const opCreateSnapshotFromVolumeRecoveryPoint = "CreateSnapshotFromVolumeRecover // CreateSnapshotFromVolumeRecoveryPointRequest generates a "aws/request.Request" representing the // client's request for the CreateSnapshotFromVolumeRecoveryPoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1157,7 +1245,7 @@ const opCreateStorediSCSIVolume = "CreateStorediSCSIVolume" // CreateStorediSCSIVolumeRequest generates a "aws/request.Request" representing the // client's request for the CreateStorediSCSIVolume operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1253,7 +1341,7 @@ const opCreateTapeWithBarcode = "CreateTapeWithBarcode" // CreateTapeWithBarcodeRequest generates a "aws/request.Request" representing the // client's request for the CreateTapeWithBarcode operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1343,7 +1431,7 @@ const opCreateTapes = "CreateTapes" // CreateTapesRequest generates a "aws/request.Request" representing the // client's request for the CreateTapes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1432,7 +1520,7 @@ const opDeleteBandwidthRateLimit = "DeleteBandwidthRateLimit" // DeleteBandwidthRateLimitRequest generates a "aws/request.Request" representing the // client's request for the DeleteBandwidthRateLimit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1520,7 +1608,7 @@ const opDeleteChapCredentials = "DeleteChapCredentials" // DeleteChapCredentialsRequest generates a "aws/request.Request" representing the // client's request for the DeleteChapCredentials operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1605,7 +1693,7 @@ const opDeleteFileShare = "DeleteFileShare" // DeleteFileShareRequest generates a "aws/request.Request" representing the // client's request for the DeleteFileShare operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1690,7 +1778,7 @@ const opDeleteGateway = "DeleteGateway" // DeleteGatewayRequest generates a "aws/request.Request" representing the // client's request for the DeleteGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1789,7 +1877,7 @@ const opDeleteSnapshotSchedule = "DeleteSnapshotSchedule" // DeleteSnapshotScheduleRequest generates a "aws/request.Request" representing the // client's request for the DeleteSnapshotSchedule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1883,7 +1971,7 @@ const opDeleteTape = "DeleteTape" // DeleteTapeRequest generates a "aws/request.Request" representing the // client's request for the DeleteTape operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1968,7 +2056,7 @@ const opDeleteTapeArchive = "DeleteTapeArchive" // DeleteTapeArchiveRequest generates a "aws/request.Request" representing the // client's request for the DeleteTapeArchive operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2053,7 +2141,7 @@ const opDeleteVolume = "DeleteVolume" // DeleteVolumeRequest generates a "aws/request.Request" representing the // client's request for the DeleteVolume operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2151,7 +2239,7 @@ const opDescribeBandwidthRateLimit = "DescribeBandwidthRateLimit" // DescribeBandwidthRateLimitRequest generates a "aws/request.Request" representing the // client's request for the DescribeBandwidthRateLimit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2241,7 +2329,7 @@ const opDescribeCache = "DescribeCache" // DescribeCacheRequest generates a "aws/request.Request" representing the // client's request for the DescribeCache operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2329,7 +2417,7 @@ const opDescribeCachediSCSIVolumes = "DescribeCachediSCSIVolumes" // DescribeCachediSCSIVolumesRequest generates a "aws/request.Request" representing the // client's request for the DescribeCachediSCSIVolumes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2418,7 +2506,7 @@ const opDescribeChapCredentials = "DescribeChapCredentials" // DescribeChapCredentialsRequest generates a "aws/request.Request" representing the // client's request for the DescribeChapCredentials operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2503,7 +2591,7 @@ const opDescribeGatewayInformation = "DescribeGatewayInformation" // DescribeGatewayInformationRequest generates a "aws/request.Request" representing the // client's request for the DescribeGatewayInformation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2590,7 +2678,7 @@ const opDescribeMaintenanceStartTime = "DescribeMaintenanceStartTime" // DescribeMaintenanceStartTimeRequest generates a "aws/request.Request" representing the // client's request for the DescribeMaintenanceStartTime operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2675,7 +2763,7 @@ const opDescribeNFSFileShares = "DescribeNFSFileShares" // DescribeNFSFileSharesRequest generates a "aws/request.Request" representing the // client's request for the DescribeNFSFileShares operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2760,7 +2848,7 @@ const opDescribeSMBFileShares = "DescribeSMBFileShares" // DescribeSMBFileSharesRequest generates a "aws/request.Request" representing the // client's request for the DescribeSMBFileShares operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2845,7 +2933,7 @@ const opDescribeSMBSettings = "DescribeSMBSettings" // DescribeSMBSettingsRequest generates a "aws/request.Request" representing the // client's request for the DescribeSMBSettings operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2930,7 +3018,7 @@ const opDescribeSnapshotSchedule = "DescribeSnapshotSchedule" // DescribeSnapshotScheduleRequest generates a "aws/request.Request" representing the // client's request for the DescribeSnapshotSchedule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3017,7 +3105,7 @@ const opDescribeStorediSCSIVolumes = "DescribeStorediSCSIVolumes" // DescribeStorediSCSIVolumesRequest generates a "aws/request.Request" representing the // client's request for the DescribeStorediSCSIVolumes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3104,7 +3192,7 @@ const opDescribeTapeArchives = "DescribeTapeArchives" // DescribeTapeArchivesRequest generates a "aws/request.Request" representing the // client's request for the DescribeTapeArchives operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3248,7 +3336,7 @@ const opDescribeTapeRecoveryPoints = "DescribeTapeRecoveryPoints" // DescribeTapeRecoveryPointsRequest generates a "aws/request.Request" representing the // client's request for the DescribeTapeRecoveryPoints operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3394,7 +3482,7 @@ const opDescribeTapes = "DescribeTapes" // DescribeTapesRequest generates a "aws/request.Request" representing the // client's request for the DescribeTapes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3537,7 +3625,7 @@ const opDescribeUploadBuffer = "DescribeUploadBuffer" // DescribeUploadBufferRequest generates a "aws/request.Request" representing the // client's request for the DescribeUploadBuffer operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3625,7 +3713,7 @@ const opDescribeVTLDevices = "DescribeVTLDevices" // DescribeVTLDevicesRequest generates a "aws/request.Request" representing the // client's request for the DescribeVTLDevices operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3768,7 +3856,7 @@ const opDescribeWorkingStorage = "DescribeWorkingStorage" // DescribeWorkingStorageRequest generates a "aws/request.Request" representing the // client's request for the DescribeWorkingStorage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3855,12 +3943,100 @@ func (c *StorageGateway) DescribeWorkingStorageWithContext(ctx aws.Context, inpu return out, req.Send() } +const opDetachVolume = "DetachVolume" + +// DetachVolumeRequest generates a "aws/request.Request" representing the +// client's request for the DetachVolume 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 DetachVolume for more information on using the DetachVolume +// 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 DetachVolumeRequest method. +// req, resp := client.DetachVolumeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DetachVolume +func (c *StorageGateway) DetachVolumeRequest(input *DetachVolumeInput) (req *request.Request, output *DetachVolumeOutput) { + op := &request.Operation{ + Name: opDetachVolume, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DetachVolumeInput{} + } + + output = &DetachVolumeOutput{} + req = c.newRequest(op, input, output) + return +} + +// DetachVolume API operation for AWS Storage Gateway. +// +// Disconnects a volume from an iSCSI connection and then detaches the volume +// from the specified gateway. Detaching and attaching a volume enables you +// to recover your data from one gateway to a different gateway without creating +// a snapshot. It also makes it easier to move your volumes from an on-premises +// gateway to a gateway hosted on an Amazon EC2 instance. +// +// 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 Storage Gateway's +// API operation DetachVolume for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" +// An exception occurred because an invalid gateway request was issued to the +// service. For more information, see the error and message fields. +// +// * ErrCodeInternalServerError "InternalServerError" +// An internal server error has occurred during the request. For more information, +// see the error and message fields. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DetachVolume +func (c *StorageGateway) DetachVolume(input *DetachVolumeInput) (*DetachVolumeOutput, error) { + req, out := c.DetachVolumeRequest(input) + return out, req.Send() +} + +// DetachVolumeWithContext is the same as DetachVolume with the addition of +// the ability to pass a context and additional request options. +// +// See DetachVolume 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 *StorageGateway) DetachVolumeWithContext(ctx aws.Context, input *DetachVolumeInput, opts ...request.Option) (*DetachVolumeOutput, error) { + req, out := c.DetachVolumeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDisableGateway = "DisableGateway" // DisableGatewayRequest generates a "aws/request.Request" representing the // client's request for the DisableGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3951,7 +4127,7 @@ const opJoinDomain = "JoinDomain" // JoinDomainRequest generates a "aws/request.Request" representing the // client's request for the JoinDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4036,7 +4212,7 @@ const opListFileShares = "ListFileShares" // ListFileSharesRequest generates a "aws/request.Request" representing the // client's request for the ListFileShares operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4122,7 +4298,7 @@ const opListGateways = "ListGateways" // ListGatewaysRequest generates a "aws/request.Request" representing the // client's request for the ListGateways operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4272,7 +4448,7 @@ const opListLocalDisks = "ListLocalDisks" // ListLocalDisksRequest generates a "aws/request.Request" representing the // client's request for the ListLocalDisks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4365,7 +4541,7 @@ const opListTagsForResource = "ListTagsForResource" // ListTagsForResourceRequest generates a "aws/request.Request" representing the // client's request for the ListTagsForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4450,7 +4626,7 @@ const opListTapes = "ListTapes" // ListTapesRequest generates a "aws/request.Request" representing the // client's request for the ListTapes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4544,7 +4720,7 @@ const opListVolumeInitiators = "ListVolumeInitiators" // ListVolumeInitiatorsRequest generates a "aws/request.Request" representing the // client's request for the ListVolumeInitiators operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4630,7 +4806,7 @@ const opListVolumeRecoveryPoints = "ListVolumeRecoveryPoints" // ListVolumeRecoveryPointsRequest generates a "aws/request.Request" representing the // client's request for the ListVolumeRecoveryPoints operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4721,7 +4897,7 @@ const opListVolumes = "ListVolumes" // ListVolumesRequest generates a "aws/request.Request" representing the // client's request for the ListVolumes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4872,7 +5048,7 @@ const opNotifyWhenUploaded = "NotifyWhenUploaded" // NotifyWhenUploadedRequest generates a "aws/request.Request" representing the // client's request for the NotifyWhenUploaded operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4969,7 +5145,7 @@ const opRefreshCache = "RefreshCache" // RefreshCacheRequest generates a "aws/request.Request" representing the // client's request for the RefreshCache operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5011,7 +5187,9 @@ func (c *StorageGateway) RefreshCacheRequest(input *RefreshCacheInput) (req *req // Refreshes the cache for the specified file share. This operation finds objects // in the Amazon S3 bucket that were added, removed or replaced since the gateway // last listed the bucket's contents and cached the results. This operation -// is only supported in the file gateway type. +// is only supported in the file gateway type. You can subscribe to be notified +// through an Amazon CloudWatch event when your RefreshCache operation completes. +// For more information, see Getting Notified About File Operations (https://docs.aws.amazon.com/storagegateway/latest/userguide/monitoring-file-gateway.html#get-notification). // // 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 @@ -5056,7 +5234,7 @@ const opRemoveTagsFromResource = "RemoveTagsFromResource" // RemoveTagsFromResourceRequest generates a "aws/request.Request" representing the // client's request for the RemoveTagsFromResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5141,7 +5319,7 @@ const opResetCache = "ResetCache" // ResetCacheRequest generates a "aws/request.Request" representing the // client's request for the ResetCache operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5236,7 +5414,7 @@ const opRetrieveTapeArchive = "RetrieveTapeArchive" // RetrieveTapeArchiveRequest generates a "aws/request.Request" representing the // client's request for the RetrieveTapeArchive operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5329,7 +5507,7 @@ const opRetrieveTapeRecoveryPoint = "RetrieveTapeRecoveryPoint" // RetrieveTapeRecoveryPointRequest generates a "aws/request.Request" representing the // client's request for the RetrieveTapeRecoveryPoint operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5422,7 +5600,7 @@ const opSetLocalConsolePassword = "SetLocalConsolePassword" // SetLocalConsolePasswordRequest generates a "aws/request.Request" representing the // client's request for the SetLocalConsolePassword operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5509,7 +5687,7 @@ const opSetSMBGuestPassword = "SetSMBGuestPassword" // SetSMBGuestPasswordRequest generates a "aws/request.Request" representing the // client's request for the SetSMBGuestPassword operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5594,7 +5772,7 @@ const opShutdownGateway = "ShutdownGateway" // ShutdownGatewayRequest generates a "aws/request.Request" representing the // client's request for the ShutdownGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5698,7 +5876,7 @@ const opStartGateway = "StartGateway" // StartGatewayRequest generates a "aws/request.Request" representing the // client's request for the StartGateway operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5793,7 +5971,7 @@ const opUpdateBandwidthRateLimit = "UpdateBandwidthRateLimit" // UpdateBandwidthRateLimitRequest generates a "aws/request.Request" representing the // client's request for the UpdateBandwidthRateLimit operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5886,7 +6064,7 @@ const opUpdateChapCredentials = "UpdateChapCredentials" // UpdateChapCredentialsRequest generates a "aws/request.Request" representing the // client's request for the UpdateChapCredentials operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5975,7 +6153,7 @@ const opUpdateGatewayInformation = "UpdateGatewayInformation" // UpdateGatewayInformationRequest generates a "aws/request.Request" representing the // client's request for the UpdateGatewayInformation operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6065,7 +6243,7 @@ const opUpdateGatewaySoftwareNow = "UpdateGatewaySoftwareNow" // UpdateGatewaySoftwareNowRequest generates a "aws/request.Request" representing the // client's request for the UpdateGatewaySoftwareNow operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6163,7 +6341,7 @@ const opUpdateMaintenanceStartTime = "UpdateMaintenanceStartTime" // UpdateMaintenanceStartTimeRequest generates a "aws/request.Request" representing the // client's request for the UpdateMaintenanceStartTime operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6249,7 +6427,7 @@ const opUpdateNFSFileShare = "UpdateNFSFileShare" // UpdateNFSFileShareRequest generates a "aws/request.Request" representing the // client's request for the UpdateNFSFileShare operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6352,7 +6530,7 @@ const opUpdateSMBFileShare = "UpdateSMBFileShare" // UpdateSMBFileShareRequest generates a "aws/request.Request" representing the // client's request for the UpdateSMBFileShare operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6448,7 +6626,7 @@ const opUpdateSnapshotSchedule = "UpdateSnapshotSchedule" // UpdateSnapshotScheduleRequest generates a "aws/request.Request" representing the // client's request for the UpdateSnapshotSchedule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6541,7 +6719,7 @@ const opUpdateVTLDeviceType = "UpdateVTLDeviceType" // UpdateVTLDeviceTypeRequest generates a "aws/request.Request" representing the // client's request for the UpdateVTLDeviceType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6685,7 +6863,7 @@ type ActivateGatewayInput struct { // A value that defines the type of gateway to activate. The type specified // is critical to all later functions of the gateway and cannot be changed after - // activation. The default value is STORED. + // activation. The default value is CACHED. // // Valid Values: "STORED", "CACHED", "VTL", "FILE_S3" GatewayType *string `min:"2" type:"string"` @@ -7167,6 +7345,150 @@ func (s *AddWorkingStorageOutput) SetGatewayARN(v string) *AddWorkingStorageOutp return s } +// AttachVolumeInput +type AttachVolumeInput struct { + _ struct{} `type:"structure"` + + // The unique device ID or other distinguishing data that identifies the local + // disk used to create the volume. This value is only required when you are + // attaching a stored volume. + DiskId *string `min:"1" type:"string"` + + // The Amazon Resource Name (ARN) of the gateway that you want to attach the + // volume to. + // + // GatewayARN is a required field + GatewayARN *string `min:"50" type:"string" required:"true"` + + // The network interface of the gateway on which to expose the iSCSI target. + // Only IPv4 addresses are accepted. Use DescribeGatewayInformation to get a + // list of the network interfaces available on a gateway. + // + // Valid Values: A valid IP address. + // + // NetworkInterfaceId is a required field + NetworkInterfaceId *string `type:"string" required:"true"` + + // The name of the iSCSI target used by an initiator to connect to a volume + // and used as a suffix for the target ARN. For example, specifying TargetName + // as myvolume results in the target ARN of arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume. + // The target name must be unique across all volumes on a gateway. + // + // If you don't specify a value, Storage Gateway uses the value that was previously + // used for this volume as the new target name. + TargetName *string `min:"1" type:"string"` + + // The Amazon Resource Name (ARN) of the volume to attach to the specified gateway. + // + // VolumeARN is a required field + VolumeARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s AttachVolumeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachVolumeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AttachVolumeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AttachVolumeInput"} + if s.DiskId != nil && len(*s.DiskId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DiskId", 1)) + } + if s.GatewayARN == nil { + invalidParams.Add(request.NewErrParamRequired("GatewayARN")) + } + if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) + } + if s.NetworkInterfaceId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkInterfaceId")) + } + if s.TargetName != nil && len(*s.TargetName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TargetName", 1)) + } + if s.VolumeARN == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeARN")) + } + if s.VolumeARN != nil && len(*s.VolumeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("VolumeARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDiskId sets the DiskId field's value. +func (s *AttachVolumeInput) SetDiskId(v string) *AttachVolumeInput { + s.DiskId = &v + return s +} + +// SetGatewayARN sets the GatewayARN field's value. +func (s *AttachVolumeInput) SetGatewayARN(v string) *AttachVolumeInput { + s.GatewayARN = &v + return s +} + +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *AttachVolumeInput) SetNetworkInterfaceId(v string) *AttachVolumeInput { + s.NetworkInterfaceId = &v + return s +} + +// SetTargetName sets the TargetName field's value. +func (s *AttachVolumeInput) SetTargetName(v string) *AttachVolumeInput { + s.TargetName = &v + return s +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *AttachVolumeInput) SetVolumeARN(v string) *AttachVolumeInput { + s.VolumeARN = &v + return s +} + +// AttachVolumeOutput +type AttachVolumeOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the volume target, which includes the iSCSI + // name for the initiator that was used to connect to the target. + TargetARN *string `min:"50" type:"string"` + + // The Amazon Resource Name (ARN) of the volume that was attached to the gateway. + VolumeARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s AttachVolumeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AttachVolumeOutput) GoString() string { + return s.String() +} + +// SetTargetARN sets the TargetARN field's value. +func (s *AttachVolumeOutput) SetTargetARN(v string) *AttachVolumeOutput { + s.TargetARN = &v + return s +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *AttachVolumeOutput) SetVolumeARN(v string) *AttachVolumeOutput { + s.VolumeARN = &v + return s +} + // Describes an iSCSI cached volume. type CachediSCSIVolume struct { _ struct{} `type:"structure"` @@ -7183,9 +7505,18 @@ type CachediSCSIVolume struct { // snapshot ID used, e.g. snap-78e22663. Otherwise, this field is not included. SourceSnapshotId *string `type:"string"` + // The name of the iSCSI target that is used by an initiator to connect to a + // volume and used as a suffix for the target ARN. For example, specifying TargetName + // as myvolume results in the target ARN of arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume. + TargetName *string `min:"1" type:"string"` + // The Amazon Resource Name (ARN) of the storage volume. VolumeARN *string `min:"50" type:"string"` + // A value that indicates whether a storage volume is attached to or detached + // from a gateway. + VolumeAttachmentStatus *string `min:"3" type:"string"` + // The unique identifier of the volume, e.g. vol-AE4B946D. VolumeId *string `min:"12" type:"string"` @@ -7242,12 +7573,24 @@ func (s *CachediSCSIVolume) SetSourceSnapshotId(v string) *CachediSCSIVolume { return s } +// SetTargetName sets the TargetName field's value. +func (s *CachediSCSIVolume) SetTargetName(v string) *CachediSCSIVolume { + s.TargetName = &v + return s +} + // SetVolumeARN sets the VolumeARN field's value. func (s *CachediSCSIVolume) SetVolumeARN(v string) *CachediSCSIVolume { s.VolumeARN = &v return s } +// SetVolumeAttachmentStatus sets the VolumeAttachmentStatus field's value. +func (s *CachediSCSIVolume) SetVolumeAttachmentStatus(v string) *CachediSCSIVolume { + s.VolumeAttachmentStatus = &v + return s +} + // SetVolumeId sets the VolumeId field's value. func (s *CachediSCSIVolume) SetVolumeId(v string) *CachediSCSIVolume { s.VolumeId = &v @@ -7685,7 +8028,7 @@ func (s *CreateCachediSCSIVolumeInput) SetVolumeSizeInBytes(v int64) *CreateCach type CreateCachediSCSIVolumeOutput struct { _ struct{} `type:"structure"` - // he Amazon Resource Name (ARN) of the volume target that includes the iSCSI + // The Amazon Resource Name (ARN) of the volume target, which includes the iSCSI // name that initiators can use to connect to the target. TargetARN *string `min:"50" type:"string"` @@ -8552,7 +8895,7 @@ func (s *CreateStorediSCSIVolumeInput) SetTargetName(v string) *CreateStorediSCS type CreateStorediSCSIVolumeOutput struct { _ struct{} `type:"structure"` - // he Amazon Resource Name (ARN) of the volume target that includes the iSCSI + // The Amazon Resource Name (ARN) of the volume target, which includes the iSCSI // name that initiators can use to connect to the target. TargetARN *string `min:"50" type:"string"` @@ -10290,7 +10633,7 @@ type DescribeSMBSettingsOutput struct { _ struct{} `type:"structure"` // The name of the domain that the gateway is joined to. - DomainName *string `type:"string"` + DomainName *string `min:"1" type:"string"` // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation // to return a list of gateways for your account and region. @@ -11150,6 +11493,83 @@ func (s *DescribeWorkingStorageOutput) SetWorkingStorageUsedInBytes(v int64) *De return s } +// AttachVolumeInput +type DetachVolumeInput struct { + _ struct{} `type:"structure"` + + // Set to true to forcibly remove the iSCSI connection of the target volume + // and detach the volume. The default is false. If this value is set to false, + // you must manually disconnect the iSCSI connection from the target volume. + ForceDetach *bool `type:"boolean"` + + // The Amazon Resource Name (ARN) of the volume to detach from the gateway. + // + // VolumeARN is a required field + VolumeARN *string `min:"50" type:"string" required:"true"` +} + +// String returns the string representation +func (s DetachVolumeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachVolumeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DetachVolumeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DetachVolumeInput"} + if s.VolumeARN == nil { + invalidParams.Add(request.NewErrParamRequired("VolumeARN")) + } + if s.VolumeARN != nil && len(*s.VolumeARN) < 50 { + invalidParams.Add(request.NewErrParamMinLen("VolumeARN", 50)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetForceDetach sets the ForceDetach field's value. +func (s *DetachVolumeInput) SetForceDetach(v bool) *DetachVolumeInput { + s.ForceDetach = &v + return s +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *DetachVolumeInput) SetVolumeARN(v string) *DetachVolumeInput { + s.VolumeARN = &v + return s +} + +// AttachVolumeOutput +type DetachVolumeOutput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the volume that was detached. + VolumeARN *string `min:"50" type:"string"` +} + +// String returns the string representation +func (s DetachVolumeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachVolumeOutput) GoString() string { + return s.String() +} + +// SetVolumeARN sets the VolumeARN field's value. +func (s *DetachVolumeOutput) SetVolumeARN(v string) *DetachVolumeOutput { + s.VolumeARN = &v + return s +} + // Lists iSCSI information about a VTL device. type DeviceiSCSIAttributes struct { _ struct{} `type:"structure"` @@ -11269,21 +11689,36 @@ func (s *DisableGatewayOutput) SetGatewayARN(v string) *DisableGatewayOutput { return s } +// Represents a gateway's local disk. type Disk struct { _ struct{} `type:"structure"` + // The iSCSI qualified name (IQN) that is defined for a disk. This field is + // not included in the response if the local disk is not defined as an iSCSI + // target. The format of this field is targetIqn::LUNNumber::region-volumeId. DiskAllocationResource *string `type:"string"` + // One of the DiskAllocationType enumeration values that identifies how a local + // disk is used. Valid values: UPLOAD_BUFFER, CACHE_STORAGE DiskAllocationType *string `min:"3" type:"string"` + // A list of values that represents attributes of a local disk. + DiskAttributeList []*string `type:"list"` + + // The unique device ID or other distinguishing data that identifies a local + // disk. DiskId *string `min:"1" type:"string"` + // The device node of a local disk as assigned by the virtualization environment. DiskNode *string `type:"string"` + // The path of a local disk in the gateway virtual machine (VM). DiskPath *string `type:"string"` + // The local disk size in bytes. DiskSizeInBytes *int64 `type:"long"` + // A value that represents the status of a local disk. DiskStatus *string `type:"string"` } @@ -11309,6 +11744,12 @@ func (s *Disk) SetDiskAllocationType(v string) *Disk { return s } +// SetDiskAttributeList sets the DiskAttributeList field's value. +func (s *Disk) SetDiskAttributeList(v []*string) *Disk { + s.DiskAttributeList = v + return s +} + // SetDiskId sets the DiskId field's value. func (s *Disk) SetDiskId(v string) *Disk { s.DiskId = &v @@ -11505,28 +11946,38 @@ func (s *GatewayInfo) SetGatewayType(v string) *GatewayInfo { type JoinDomainInput struct { _ struct{} `type:"structure"` + // List of IPv4 addresses, NetBIOS names, or host names of your domain server. + // If you need to specify the port number include it after the colon (“:”). + // For example, mydc.mydomain.com:389. + DomainControllers []*string `type:"list"` + // The name of the domain that you want the gateway to join. // // DomainName is a required field - DomainName *string `type:"string" required:"true"` + DomainName *string `min:"1" type:"string" required:"true"` - // The unique Amazon Resource Name (ARN) of the file gateway you want to add - // to the Active Directory domain. + // The Amazon Resource Name (ARN) of the gateway. Use the ListGateways operation + // to return a list of gateways for your account and region. // // GatewayARN is a required field GatewayARN *string `min:"50" type:"string" required:"true"` + // The organizational unit (OU) is a container with an Active Directory that + // can hold users, groups, computers, and other OUs and this parameter specifies + // the OU that the gateway will join within the AD domain. + OrganizationalUnit *string `min:"1" type:"string"` + // Sets the password of the user who has permission to add the gateway to the // Active Directory domain. // // Password is a required field - Password *string `type:"string" required:"true"` + Password *string `min:"1" type:"string" required:"true" sensitive:"true"` // Sets the user name of user who has permission to add the gateway to the Active // Directory domain. // // UserName is a required field - UserName *string `type:"string" required:"true"` + UserName *string `min:"1" type:"string" required:"true"` } // String returns the string representation @@ -11545,18 +11996,30 @@ func (s *JoinDomainInput) Validate() error { if s.DomainName == nil { invalidParams.Add(request.NewErrParamRequired("DomainName")) } + if s.DomainName != nil && len(*s.DomainName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DomainName", 1)) + } if s.GatewayARN == nil { invalidParams.Add(request.NewErrParamRequired("GatewayARN")) } if s.GatewayARN != nil && len(*s.GatewayARN) < 50 { invalidParams.Add(request.NewErrParamMinLen("GatewayARN", 50)) } + if s.OrganizationalUnit != nil && len(*s.OrganizationalUnit) < 1 { + invalidParams.Add(request.NewErrParamMinLen("OrganizationalUnit", 1)) + } if s.Password == nil { invalidParams.Add(request.NewErrParamRequired("Password")) } + if s.Password != nil && len(*s.Password) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Password", 1)) + } if s.UserName == nil { invalidParams.Add(request.NewErrParamRequired("UserName")) } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -11564,6 +12027,12 @@ func (s *JoinDomainInput) Validate() error { return nil } +// SetDomainControllers sets the DomainControllers field's value. +func (s *JoinDomainInput) SetDomainControllers(v []*string) *JoinDomainInput { + s.DomainControllers = v + return s +} + // SetDomainName sets the DomainName field's value. func (s *JoinDomainInput) SetDomainName(v string) *JoinDomainInput { s.DomainName = &v @@ -11576,6 +12045,12 @@ func (s *JoinDomainInput) SetGatewayARN(v string) *JoinDomainInput { return s } +// SetOrganizationalUnit sets the OrganizationalUnit field's value. +func (s *JoinDomainInput) SetOrganizationalUnit(v string) *JoinDomainInput { + s.OrganizationalUnit = &v + return s +} + // SetPassword sets the Password field's value. func (s *JoinDomainInput) SetPassword(v string) *JoinDomainInput { s.Password = &v @@ -12745,13 +13220,29 @@ func (s *NotifyWhenUploadedOutput) SetNotificationId(v string) *NotifyWhenUpload return s } +// RefreshCacheInput type RefreshCacheInput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the file share. + // The Amazon Resource Name (ARN) of the file share you want to refresh. // // FileShareARN is a required field FileShareARN *string `min:"50" type:"string" required:"true"` + + // A comma-separated list of the paths of folders to refresh in the cache. The + // default is ["/"]. The default refreshes objects and folders at the root of + // the Amazon S3 bucket. If Recursive is set to "true", the entire S3 bucket + // that the file share has access to is refreshed. + FolderList []*string `min:"1" type:"list"` + + // A value that specifies whether to recursively refresh folders in the cache. + // The refresh includes folders that were in the cache the last time the gateway + // listed the folder's contents. If this value set to "true", each folder that + // is listed in FolderList is recursively updated. Otherwise, subfolders listed + // in FolderList are not refreshed. Only objects that are in folders listed + // directly under FolderList are found and used for the update. The default + // is "true". + Recursive *bool `type:"boolean"` } // String returns the string representation @@ -12773,6 +13264,9 @@ func (s *RefreshCacheInput) Validate() error { if s.FileShareARN != nil && len(*s.FileShareARN) < 50 { invalidParams.Add(request.NewErrParamMinLen("FileShareARN", 50)) } + if s.FolderList != nil && len(s.FolderList) < 1 { + invalidParams.Add(request.NewErrParamMinLen("FolderList", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -12786,11 +13280,28 @@ func (s *RefreshCacheInput) SetFileShareARN(v string) *RefreshCacheInput { return s } +// SetFolderList sets the FolderList field's value. +func (s *RefreshCacheInput) SetFolderList(v []*string) *RefreshCacheInput { + s.FolderList = v + return s +} + +// SetRecursive sets the Recursive field's value. +func (s *RefreshCacheInput) SetRecursive(v bool) *RefreshCacheInput { + s.Recursive = &v + return s +} + +// RefreshCacheOutput type RefreshCacheOutput struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of the file share. FileShareARN *string `min:"50" type:"string"` + + // The randomly generated ID of the notification that was sent. This ID is in + // UUID format. + NotificationId *string `min:"1" type:"string"` } // String returns the string representation @@ -12809,6 +13320,12 @@ func (s *RefreshCacheOutput) SetFileShareARN(v string) *RefreshCacheOutput { return s } +// SetNotificationId sets the NotificationId field's value. +func (s *RefreshCacheOutput) SetNotificationId(v string) *RefreshCacheOutput { + s.NotificationId = &v + return s +} + // RemoveTagsFromResourceInput type RemoveTagsFromResourceInput struct { _ struct{} `type:"structure"` @@ -13334,7 +13851,7 @@ type SetLocalConsolePasswordInput struct { // The password you want to set for your VM local console. // // LocalConsolePassword is a required field - LocalConsolePassword *string `min:"6" type:"string" required:"true"` + LocalConsolePassword *string `min:"6" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -13418,7 +13935,7 @@ type SetSMBGuestPasswordInput struct { // The password that you want to set for your SMB Server. // // Password is a required field - Password *string `min:"6" type:"string" required:"true"` + Password *string `min:"6" type:"string" required:"true" sensitive:"true"` } // String returns the string representation @@ -13647,9 +14164,18 @@ type StorediSCSIVolume struct { // snapshot ID used, e.g. snap-78e22663. Otherwise, this field is not included. SourceSnapshotId *string `type:"string"` + // The name of the iSCSI target that is used by an initiator to connect to a + // volume and used as a suffix for the target ARN. For example, specifying TargetName + // as myvolume results in the target ARN of arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume. + TargetName *string `min:"1" type:"string"` + // The Amazon Resource Name (ARN) of the storage volume. VolumeARN *string `min:"50" type:"string"` + // A value that indicates whether a storage volume is attached to, detached + // from, or is in the process of detaching from a gateway. + VolumeAttachmentStatus *string `min:"3" type:"string"` + // The ID of the local disk that was specified in the CreateStorediSCSIVolume // operation. VolumeDiskId *string `min:"1" type:"string"` @@ -13716,12 +14242,24 @@ func (s *StorediSCSIVolume) SetSourceSnapshotId(v string) *StorediSCSIVolume { return s } +// SetTargetName sets the TargetName field's value. +func (s *StorediSCSIVolume) SetTargetName(v string) *StorediSCSIVolume { + s.TargetName = &v + return s +} + // SetVolumeARN sets the VolumeARN field's value. func (s *StorediSCSIVolume) SetVolumeARN(v string) *StorediSCSIVolume { s.VolumeARN = &v return s } +// SetVolumeAttachmentStatus sets the VolumeAttachmentStatus field's value. +func (s *StorediSCSIVolume) SetVolumeAttachmentStatus(v string) *StorediSCSIVolume { + s.VolumeAttachmentStatus = &v + return s +} + // SetVolumeDiskId sets the VolumeDiskId field's value. func (s *StorediSCSIVolume) SetVolumeDiskId(v string) *StorediSCSIVolume { s.VolumeDiskId = &v @@ -15310,6 +15848,8 @@ type VolumeInfo struct { // (-). VolumeARN *string `min:"50" type:"string"` + VolumeAttachmentStatus *string `min:"3" type:"string"` + // The unique identifier assigned to the volume. This ID becomes part of the // volume Amazon Resource Name (ARN), which you use as input for other operations. // @@ -15354,6 +15894,12 @@ func (s *VolumeInfo) SetVolumeARN(v string) *VolumeInfo { return s } +// SetVolumeAttachmentStatus sets the VolumeAttachmentStatus field's value. +func (s *VolumeInfo) SetVolumeAttachmentStatus(v string) *VolumeInfo { + s.VolumeAttachmentStatus = &v + return s +} + // SetVolumeId sets the VolumeId field's value. func (s *VolumeInfo) SetVolumeId(v string) *VolumeInfo { s.VolumeId = &v 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 6f89a796e5..ee908f9167 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 @@ -15,7 +15,7 @@ const opAssumeRole = "AssumeRole" // AssumeRoleRequest generates a "aws/request.Request" representing the // client's request for the AssumeRole operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -209,7 +209,7 @@ const opAssumeRoleWithSAML = "AssumeRoleWithSAML" // AssumeRoleWithSAMLRequest generates a "aws/request.Request" representing the // client's request for the AssumeRoleWithSAML operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -391,7 +391,7 @@ const opAssumeRoleWithWebIdentity = "AssumeRoleWithWebIdentity" // AssumeRoleWithWebIdentityRequest generates a "aws/request.Request" representing the // client's request for the AssumeRoleWithWebIdentity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -602,7 +602,7 @@ const opDecodeAuthorizationMessage = "DecodeAuthorizationMessage" // DecodeAuthorizationMessageRequest generates a "aws/request.Request" representing the // client's request for the DecodeAuthorizationMessage operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -714,7 +714,7 @@ const opGetCallerIdentity = "GetCallerIdentity" // GetCallerIdentityRequest generates a "aws/request.Request" representing the // client's request for the GetCallerIdentity operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -789,7 +789,7 @@ const opGetFederationToken = "GetFederationToken" // GetFederationTokenRequest generates a "aws/request.Request" representing the // client's request for the GetFederationToken operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -958,7 +958,7 @@ const opGetSessionToken = "GetSessionToken" // GetSessionTokenRequest generates a "aws/request.Request" representing the // client's request for the GetSessionToken operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. diff --git a/vendor/github.com/aws/aws-sdk-go/service/swf/api.go b/vendor/github.com/aws/aws-sdk-go/service/swf/api.go index 66ac2df999..97f9b8228f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/swf/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/swf/api.go @@ -18,7 +18,7 @@ const opCountClosedWorkflowExecutions = "CountClosedWorkflowExecutions" // CountClosedWorkflowExecutionsRequest generates a "aws/request.Request" representing the // client's request for the CountClosedWorkflowExecutions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -130,7 +130,7 @@ const opCountOpenWorkflowExecutions = "CountOpenWorkflowExecutions" // CountOpenWorkflowExecutionsRequest generates a "aws/request.Request" representing the // client's request for the CountOpenWorkflowExecutions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -242,7 +242,7 @@ const opCountPendingActivityTasks = "CountPendingActivityTasks" // CountPendingActivityTasksRequest generates a "aws/request.Request" representing the // client's request for the CountPendingActivityTasks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -348,7 +348,7 @@ const opCountPendingDecisionTasks = "CountPendingDecisionTasks" // CountPendingDecisionTasksRequest generates a "aws/request.Request" representing the // client's request for the CountPendingDecisionTasks operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -454,7 +454,7 @@ const opDeprecateActivityType = "DeprecateActivityType" // DeprecateActivityTypeRequest generates a "aws/request.Request" representing the // client's request for the DeprecateActivityType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -486,8 +486,7 @@ func (c *SWF) DeprecateActivityTypeRequest(input *DeprecateActivityTypeInput) (r output = &DeprecateActivityTypeOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -570,7 +569,7 @@ const opDeprecateDomain = "DeprecateDomain" // DeprecateDomainRequest generates a "aws/request.Request" representing the // client's request for the DeprecateDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -602,8 +601,7 @@ func (c *SWF) DeprecateDomainRequest(input *DeprecateDomainInput) (req *request. output = &DeprecateDomainOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -684,7 +682,7 @@ const opDeprecateWorkflowType = "DeprecateWorkflowType" // DeprecateWorkflowTypeRequest generates a "aws/request.Request" representing the // client's request for the DeprecateWorkflowType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -716,8 +714,7 @@ func (c *SWF) DeprecateWorkflowTypeRequest(input *DeprecateWorkflowTypeInput) (r output = &DeprecateWorkflowTypeOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -801,7 +798,7 @@ const opDescribeActivityType = "DescribeActivityType" // DescribeActivityTypeRequest generates a "aws/request.Request" representing the // client's request for the DescribeActivityType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -909,7 +906,7 @@ const opDescribeDomain = "DescribeDomain" // DescribeDomainRequest generates a "aws/request.Request" representing the // client's request for the DescribeDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1011,7 +1008,7 @@ const opDescribeWorkflowExecution = "DescribeWorkflowExecution" // DescribeWorkflowExecutionRequest generates a "aws/request.Request" representing the // client's request for the DescribeWorkflowExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1116,7 +1113,7 @@ const opDescribeWorkflowType = "DescribeWorkflowType" // DescribeWorkflowTypeRequest generates a "aws/request.Request" representing the // client's request for the DescribeWorkflowType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1224,7 +1221,7 @@ const opGetWorkflowExecutionHistory = "GetWorkflowExecutionHistory" // GetWorkflowExecutionHistoryRequest generates a "aws/request.Request" representing the // client's request for the GetWorkflowExecutionHistory operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1386,7 +1383,7 @@ const opListActivityTypes = "ListActivityTypes" // ListActivityTypesRequest generates a "aws/request.Request" representing the // client's request for the ListActivityTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1547,7 +1544,7 @@ const opListClosedWorkflowExecutions = "ListClosedWorkflowExecutions" // ListClosedWorkflowExecutionsRequest generates a "aws/request.Request" representing the // client's request for the ListClosedWorkflowExecutions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1717,7 +1714,7 @@ const opListDomains = "ListDomains" // ListDomainsRequest generates a "aws/request.Request" representing the // client's request for the ListDomains operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1875,7 +1872,7 @@ const opListOpenWorkflowExecutions = "ListOpenWorkflowExecutions" // ListOpenWorkflowExecutionsRequest generates a "aws/request.Request" representing the // client's request for the ListOpenWorkflowExecutions operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2045,7 +2042,7 @@ const opListWorkflowTypes = "ListWorkflowTypes" // ListWorkflowTypesRequest generates a "aws/request.Request" representing the // client's request for the ListWorkflowTypes operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2204,7 +2201,7 @@ const opPollForActivityTask = "PollForActivityTask" // PollForActivityTaskRequest generates a "aws/request.Request" representing the // client's request for the PollForActivityTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2322,7 +2319,7 @@ const opPollForDecisionTask = "PollForDecisionTask" // PollForDecisionTaskRequest generates a "aws/request.Request" representing the // client's request for the PollForDecisionTask operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2506,7 +2503,7 @@ const opRecordActivityTaskHeartbeat = "RecordActivityTaskHeartbeat" // RecordActivityTaskHeartbeatRequest generates a "aws/request.Request" representing the // client's request for the RecordActivityTaskHeartbeat operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2632,7 +2629,7 @@ const opRegisterActivityType = "RegisterActivityType" // RegisterActivityTypeRequest generates a "aws/request.Request" representing the // client's request for the RegisterActivityType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2664,8 +2661,7 @@ func (c *SWF) RegisterActivityTypeRequest(input *RegisterActivityTypeInput) (req output = &RegisterActivityTypeOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2758,7 +2754,7 @@ const opRegisterDomain = "RegisterDomain" // RegisterDomainRequest generates a "aws/request.Request" representing the // client's request for the RegisterDomain operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2790,8 +2786,7 @@ func (c *SWF) RegisterDomainRequest(input *RegisterDomainInput) (req *request.Re output = &RegisterDomainOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2866,7 +2861,7 @@ const opRegisterWorkflowType = "RegisterWorkflowType" // RegisterWorkflowTypeRequest generates a "aws/request.Request" representing the // client's request for the RegisterWorkflowType operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2898,8 +2893,7 @@ func (c *SWF) RegisterWorkflowTypeRequest(input *RegisterWorkflowTypeInput) (req output = &RegisterWorkflowTypeOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2995,7 +2989,7 @@ const opRequestCancelWorkflowExecution = "RequestCancelWorkflowExecution" // RequestCancelWorkflowExecutionRequest generates a "aws/request.Request" representing the // client's request for the RequestCancelWorkflowExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3027,8 +3021,7 @@ func (c *SWF) RequestCancelWorkflowExecutionRequest(input *RequestCancelWorkflow output = &RequestCancelWorkflowExecutionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3109,7 +3102,7 @@ const opRespondActivityTaskCanceled = "RespondActivityTaskCanceled" // RespondActivityTaskCanceledRequest generates a "aws/request.Request" representing the // client's request for the RespondActivityTaskCanceled operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3141,8 +3134,7 @@ func (c *SWF) RespondActivityTaskCanceledRequest(input *RespondActivityTaskCance output = &RespondActivityTaskCanceledOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3226,7 +3218,7 @@ const opRespondActivityTaskCompleted = "RespondActivityTaskCompleted" // RespondActivityTaskCompletedRequest generates a "aws/request.Request" representing the // client's request for the RespondActivityTaskCompleted operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3258,8 +3250,7 @@ func (c *SWF) RespondActivityTaskCompletedRequest(input *RespondActivityTaskComp output = &RespondActivityTaskCompletedOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3342,7 +3333,7 @@ const opRespondActivityTaskFailed = "RespondActivityTaskFailed" // RespondActivityTaskFailedRequest generates a "aws/request.Request" representing the // client's request for the RespondActivityTaskFailed operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3374,8 +3365,7 @@ func (c *SWF) RespondActivityTaskFailedRequest(input *RespondActivityTaskFailedI output = &RespondActivityTaskFailedOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3453,7 +3443,7 @@ const opRespondDecisionTaskCompleted = "RespondDecisionTaskCompleted" // RespondDecisionTaskCompletedRequest generates a "aws/request.Request" representing the // client's request for the RespondDecisionTaskCompleted operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3485,8 +3475,7 @@ func (c *SWF) RespondDecisionTaskCompletedRequest(input *RespondDecisionTaskComp output = &RespondDecisionTaskCompletedOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3553,7 +3542,7 @@ const opSignalWorkflowExecution = "SignalWorkflowExecution" // SignalWorkflowExecutionRequest generates a "aws/request.Request" representing the // client's request for the SignalWorkflowExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3585,8 +3574,7 @@ func (c *SWF) SignalWorkflowExecutionRequest(input *SignalWorkflowExecutionInput output = &SignalWorkflowExecutionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -3665,7 +3653,7 @@ const opStartWorkflowExecution = "StartWorkflowExecution" // StartWorkflowExecutionRequest generates a "aws/request.Request" representing the // client's request for the StartWorkflowExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3811,7 +3799,7 @@ const opTerminateWorkflowExecution = "TerminateWorkflowExecution" // TerminateWorkflowExecutionRequest generates a "aws/request.Request" representing the // client's request for the TerminateWorkflowExecution operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3843,8 +3831,7 @@ func (c *SWF) TerminateWorkflowExecutionRequest(input *TerminateWorkflowExecutio output = &TerminateWorkflowExecutionOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler) - req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } diff --git a/vendor/github.com/aws/aws-sdk-go/service/waf/api.go b/vendor/github.com/aws/aws-sdk-go/service/waf/api.go index 0d9abe4d7f..1c62375bbc 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/waf/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/waf/api.go @@ -9,6 +9,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" ) const opCreateByteMatchSet = "CreateByteMatchSet" @@ -16,7 +18,7 @@ const opCreateByteMatchSet = "CreateByteMatchSet" // CreateByteMatchSetRequest generates a "aws/request.Request" representing the // client's request for the CreateByteMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -163,7 +165,7 @@ const opCreateGeoMatchSet = "CreateGeoMatchSet" // CreateGeoMatchSetRequest generates a "aws/request.Request" representing the // client's request for the CreateGeoMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -309,7 +311,7 @@ const opCreateIPSet = "CreateIPSet" // CreateIPSetRequest generates a "aws/request.Request" representing the // client's request for the CreateIPSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -348,8 +350,8 @@ func (c *WAF) CreateIPSetRequest(input *CreateIPSetInput) (req *request.Request, // CreateIPSet API operation for AWS WAF. // -// Creates an IPSet, which you use to specify which web requests you want to -// allow or block based on the IP addresses that the requests originate from. +// Creates an IPSet, which you use to specify which web requests that you want +// to allow or block based on the IP addresses that the requests originate from. // For example, if you're receiving a lot of requests from one or more individual // IP addresses or one or more ranges of IP addresses and you want to block // the requests, you can create an IPSet that contains those IP addresses and @@ -456,7 +458,7 @@ const opCreateRateBasedRule = "CreateRateBasedRule" // CreateRateBasedRuleRequest generates a "aws/request.Request" representing the // client's request for the CreateRateBasedRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -638,7 +640,7 @@ const opCreateRegexMatchSet = "CreateRegexMatchSet" // CreateRegexMatchSetRequest generates a "aws/request.Request" representing the // client's request for the CreateRegexMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -753,7 +755,7 @@ const opCreateRegexPatternSet = "CreateRegexPatternSet" // CreateRegexPatternSetRequest generates a "aws/request.Request" representing the // client's request for the CreateRegexPatternSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -864,7 +866,7 @@ const opCreateRule = "CreateRule" // CreateRuleRequest generates a "aws/request.Request" representing the // client's request for the CreateRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -906,8 +908,8 @@ func (c *WAF) CreateRuleRequest(input *CreateRuleInput) (req *request.Request, o // Creates a Rule, which contains the IPSet objects, ByteMatchSet objects, and // other predicates that identify the requests that you want to block. If you // add more than one predicate to a Rule, a request must match all of the specifications -// to be allowed or blocked. For example, suppose you add the following to a -// Rule: +// to be allowed or blocked. For example, suppose that you add the following +// to a Rule: // // * An IPSet that matches the IP address 192.0.2.44/32 // @@ -1021,7 +1023,7 @@ const opCreateRuleGroup = "CreateRuleGroup" // CreateRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateRuleGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1127,7 +1129,7 @@ const opCreateSizeConstraintSet = "CreateSizeConstraintSet" // CreateSizeConstraintSetRequest generates a "aws/request.Request" representing the // client's request for the CreateSizeConstraintSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1275,7 +1277,7 @@ const opCreateSqlInjectionMatchSet = "CreateSqlInjectionMatchSet" // CreateSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the // client's request for the CreateSqlInjectionMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1419,7 +1421,7 @@ const opCreateWebACL = "CreateWebACL" // CreateWebACLRequest generates a "aws/request.Request" representing the // client's request for the CreateWebACL operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1575,7 +1577,7 @@ const opCreateXssMatchSet = "CreateXssMatchSet" // CreateXssMatchSetRequest generates a "aws/request.Request" representing the // client's request for the CreateXssMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1720,7 +1722,7 @@ const opDeleteByteMatchSet = "DeleteByteMatchSet" // DeleteByteMatchSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteByteMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1847,7 +1849,7 @@ const opDeleteGeoMatchSet = "DeleteGeoMatchSet" // DeleteGeoMatchSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteGeoMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1973,7 +1975,7 @@ const opDeleteIPSet = "DeleteIPSet" // DeleteIPSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteIPSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2099,7 +2101,7 @@ const opDeleteLoggingConfiguration = "DeleteLoggingConfiguration" // DeleteLoggingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteLoggingConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2133,6 +2135,7 @@ func (c *WAF) DeleteLoggingConfigurationRequest(input *DeleteLoggingConfiguratio output = &DeleteLoggingConfigurationOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2186,7 +2189,7 @@ const opDeletePermissionPolicy = "DeletePermissionPolicy" // DeletePermissionPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeletePermissionPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2220,6 +2223,7 @@ func (c *WAF) DeletePermissionPolicyRequest(input *DeletePermissionPolicyInput) output = &DeletePermissionPolicyOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2275,7 +2279,7 @@ const opDeleteRateBasedRule = "DeleteRateBasedRule" // DeleteRateBasedRuleRequest generates a "aws/request.Request" representing the // client's request for the DeleteRateBasedRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2403,7 +2407,7 @@ const opDeleteRegexMatchSet = "DeleteRegexMatchSet" // DeleteRegexMatchSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteRegexMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2530,7 +2534,7 @@ const opDeleteRegexPatternSet = "DeleteRegexPatternSet" // DeleteRegexPatternSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteRegexPatternSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2645,7 +2649,7 @@ const opDeleteRule = "DeleteRule" // DeleteRuleRequest generates a "aws/request.Request" representing the // client's request for the DeleteRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2771,7 +2775,7 @@ const opDeleteRuleGroup = "DeleteRuleGroup" // DeleteRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteRuleGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2910,7 +2914,7 @@ const opDeleteSizeConstraintSet = "DeleteSizeConstraintSet" // DeleteSizeConstraintSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteSizeConstraintSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3037,7 +3041,7 @@ const opDeleteSqlInjectionMatchSet = "DeleteSqlInjectionMatchSet" // DeleteSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteSqlInjectionMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3165,7 +3169,7 @@ const opDeleteWebACL = "DeleteWebACL" // DeleteWebACLRequest generates a "aws/request.Request" representing the // client's request for the DeleteWebACL operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3288,7 +3292,7 @@ const opDeleteXssMatchSet = "DeleteXssMatchSet" // DeleteXssMatchSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteXssMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3415,7 +3419,7 @@ const opGetByteMatchSet = "GetByteMatchSet" // GetByteMatchSetRequest generates a "aws/request.Request" representing the // client's request for the GetByteMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3502,7 +3506,7 @@ const opGetChangeToken = "GetChangeToken" // GetChangeTokenRequest generates a "aws/request.Request" representing the // client's request for the GetChangeToken operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3596,7 +3600,7 @@ const opGetChangeTokenStatus = "GetChangeTokenStatus" // GetChangeTokenStatusRequest generates a "aws/request.Request" representing the // client's request for the GetChangeTokenStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3689,7 +3693,7 @@ const opGetGeoMatchSet = "GetGeoMatchSet" // GetGeoMatchSetRequest generates a "aws/request.Request" representing the // client's request for the GetGeoMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3776,7 +3780,7 @@ const opGetIPSet = "GetIPSet" // GetIPSetRequest generates a "aws/request.Request" representing the // client's request for the GetIPSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3863,7 +3867,7 @@ const opGetLoggingConfiguration = "GetLoggingConfiguration" // GetLoggingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetLoggingConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3946,7 +3950,7 @@ const opGetPermissionPolicy = "GetPermissionPolicy" // GetPermissionPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetPermissionPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4029,7 +4033,7 @@ const opGetRateBasedRule = "GetRateBasedRule" // GetRateBasedRuleRequest generates a "aws/request.Request" representing the // client's request for the GetRateBasedRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4117,7 +4121,7 @@ const opGetRateBasedRuleManagedKeys = "GetRateBasedRuleManagedKeys" // GetRateBasedRuleManagedKeysRequest generates a "aws/request.Request" representing the // client's request for the GetRateBasedRuleManagedKeys operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4236,7 +4240,7 @@ const opGetRegexMatchSet = "GetRegexMatchSet" // GetRegexMatchSetRequest generates a "aws/request.Request" representing the // client's request for the GetRegexMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4323,7 +4327,7 @@ const opGetRegexPatternSet = "GetRegexPatternSet" // GetRegexPatternSetRequest generates a "aws/request.Request" representing the // client's request for the GetRegexPatternSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4410,7 +4414,7 @@ const opGetRule = "GetRule" // GetRuleRequest generates a "aws/request.Request" representing the // client's request for the GetRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4498,7 +4502,7 @@ const opGetRuleGroup = "GetRuleGroup" // GetRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the GetRuleGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4584,7 +4588,7 @@ const opGetSampledRequests = "GetSampledRequests" // GetSampledRequestsRequest generates a "aws/request.Request" representing the // client's request for the GetSampledRequests operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4677,7 +4681,7 @@ const opGetSizeConstraintSet = "GetSizeConstraintSet" // GetSizeConstraintSetRequest generates a "aws/request.Request" representing the // client's request for the GetSizeConstraintSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4764,7 +4768,7 @@ const opGetSqlInjectionMatchSet = "GetSqlInjectionMatchSet" // GetSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the // client's request for the GetSqlInjectionMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4851,7 +4855,7 @@ const opGetWebACL = "GetWebACL" // GetWebACLRequest generates a "aws/request.Request" representing the // client's request for the GetWebACL operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4938,7 +4942,7 @@ const opGetXssMatchSet = "GetXssMatchSet" // GetXssMatchSetRequest generates a "aws/request.Request" representing the // client's request for the GetXssMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5025,7 +5029,7 @@ const opListActivatedRulesInRuleGroup = "ListActivatedRulesInRuleGroup" // ListActivatedRulesInRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the ListActivatedRulesInRuleGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5137,7 +5141,7 @@ const opListByteMatchSets = "ListByteMatchSets" // ListByteMatchSetsRequest generates a "aws/request.Request" representing the // client's request for the ListByteMatchSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5221,7 +5225,7 @@ const opListGeoMatchSets = "ListGeoMatchSets" // ListGeoMatchSetsRequest generates a "aws/request.Request" representing the // client's request for the ListGeoMatchSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5305,7 +5309,7 @@ const opListIPSets = "ListIPSets" // ListIPSetsRequest generates a "aws/request.Request" representing the // client's request for the ListIPSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5389,7 +5393,7 @@ const opListLoggingConfigurations = "ListLoggingConfigurations" // ListLoggingConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the ListLoggingConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5501,7 +5505,7 @@ const opListRateBasedRules = "ListRateBasedRules" // ListRateBasedRulesRequest generates a "aws/request.Request" representing the // client's request for the ListRateBasedRules operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5585,7 +5589,7 @@ const opListRegexMatchSets = "ListRegexMatchSets" // ListRegexMatchSetsRequest generates a "aws/request.Request" representing the // client's request for the ListRegexMatchSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5669,7 +5673,7 @@ const opListRegexPatternSets = "ListRegexPatternSets" // ListRegexPatternSetsRequest generates a "aws/request.Request" representing the // client's request for the ListRegexPatternSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5753,7 +5757,7 @@ const opListRuleGroups = "ListRuleGroups" // ListRuleGroupsRequest generates a "aws/request.Request" representing the // client's request for the ListRuleGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5833,7 +5837,7 @@ const opListRules = "ListRules" // ListRulesRequest generates a "aws/request.Request" representing the // client's request for the ListRules operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5917,7 +5921,7 @@ const opListSizeConstraintSets = "ListSizeConstraintSets" // ListSizeConstraintSetsRequest generates a "aws/request.Request" representing the // client's request for the ListSizeConstraintSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6001,7 +6005,7 @@ const opListSqlInjectionMatchSets = "ListSqlInjectionMatchSets" // ListSqlInjectionMatchSetsRequest generates a "aws/request.Request" representing the // client's request for the ListSqlInjectionMatchSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6085,7 +6089,7 @@ const opListSubscribedRuleGroups = "ListSubscribedRuleGroups" // ListSubscribedRuleGroupsRequest generates a "aws/request.Request" representing the // client's request for the ListSubscribedRuleGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6168,7 +6172,7 @@ const opListWebACLs = "ListWebACLs" // ListWebACLsRequest generates a "aws/request.Request" representing the // client's request for the ListWebACLs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6252,7 +6256,7 @@ const opListXssMatchSets = "ListXssMatchSets" // ListXssMatchSetsRequest generates a "aws/request.Request" representing the // client's request for the ListXssMatchSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6336,7 +6340,7 @@ const opPutLoggingConfiguration = "PutLoggingConfiguration" // PutLoggingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the PutLoggingConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6380,16 +6384,14 @@ func (c *WAF) PutLoggingConfigurationRequest(input *PutLoggingConfigurationInput // You can access information about all traffic that AWS WAF inspects using // the following steps: // -// Create an Amazon Kinesis Data Firehose delivery stream. For more information, -// see Creating an Amazon Kinesis Data Firehose Delivery Stream (https://docs.aws.amazon.com/firehose/latest/dev/what-is-this-service.html). +// Create an Amazon Kinesis Data Firehose . // -// Associate that delivery stream to your web ACL using a PutLoggingConfiguration -// request. +// Associate that firehose to your web ACL using a PutLoggingConfiguration request. // // When you successfully enable logging using a PutLoggingConfiguration request, // AWS WAF will create a service linked role with the necessary permissions -// to write logs to the Amazon Kinesis Data Firehose delivery stream. For more -// information, see Logging Web ACL Traffic Information (http://docs.aws.amazon.com/waf/latest/developerguide/logging.html) +// to write logs to the Amazon Kinesis Data Firehose. For more information, +// see Logging Web ACL Traffic Information (http://docs.aws.amazon.com/waf/latest/developerguide/logging.html) // in the AWS WAF Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -6411,6 +6413,16 @@ func (c *WAF) PutLoggingConfigurationRequest(input *PutLoggingConfigurationInput // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // +// * ErrCodeServiceLinkedRoleErrorException "WAFServiceLinkedRoleErrorException" +// AWS WAF is not able to access the service linked role. This can be caused +// by a previous PutLoggingConfiguration request, which can lock the service +// linked role for about 20 seconds. Please try your request again. The service +// linked role can also be locked by a previous DeleteServiceLinkedRole request, +// which can lock the role for 15 minutes or more. If you recently made a DeleteServiceLinkedRole, +// wait at least 15 minutes and try the request again. If you receive this same +// exception again, you will have to wait additional time until the role is +// unlocked. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/waf-2015-08-24/PutLoggingConfiguration func (c *WAF) PutLoggingConfiguration(input *PutLoggingConfigurationInput) (*PutLoggingConfigurationOutput, error) { req, out := c.PutLoggingConfigurationRequest(input) @@ -6438,7 +6450,7 @@ const opPutPermissionPolicy = "PutPermissionPolicy" // PutPermissionPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutPermissionPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6472,6 +6484,7 @@ func (c *WAF) PutPermissionPolicyRequest(input *PutPermissionPolicyInput) (req * output = &PutPermissionPolicyOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -6575,7 +6588,7 @@ const opUpdateByteMatchSet = "UpdateByteMatchSet" // UpdateByteMatchSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateByteMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6771,7 +6784,7 @@ const opUpdateGeoMatchSet = "UpdateGeoMatchSet" // UpdateGeoMatchSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateGeoMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6966,7 +6979,7 @@ const opUpdateIPSet = "UpdateIPSet" // UpdateIPSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateIPSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7185,7 +7198,7 @@ const opUpdateRateBasedRule = "UpdateRateBasedRule" // UpdateRateBasedRuleRequest generates a "aws/request.Request" representing the // client's request for the UpdateRateBasedRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7390,7 +7403,7 @@ const opUpdateRegexMatchSet = "UpdateRegexMatchSet" // UpdateRegexMatchSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateRegexMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7557,7 +7570,7 @@ const opUpdateRegexPatternSet = "UpdateRegexPatternSet" // UpdateRegexPatternSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateRegexPatternSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7721,7 +7734,7 @@ const opUpdateRule = "UpdateRule" // UpdateRuleRequest generates a "aws/request.Request" representing the // client's request for the UpdateRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7764,7 +7777,8 @@ func (c *WAF) UpdateRuleRequest(input *UpdateRuleInput) (req *request.Request, o // a predicate, such as a ByteMatchSet or an IPSet, that specifies the web requests // that you want to allow, block, or count. If you add more than one predicate // to a Rule, a request must match all of the specifications to be allowed, -// blocked, or counted. For example, suppose you add the following to a Rule: +// blocked, or counted. For example, suppose that you add the following to a +// Rule: // // * A ByteMatchSet that matches the value BadBot in the User-Agent header // @@ -7921,7 +7935,7 @@ const opUpdateRuleGroup = "UpdateRuleGroup" // UpdateRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the UpdateRuleGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8099,7 +8113,7 @@ const opUpdateSizeConstraintSet = "UpdateSizeConstraintSet" // UpdateSizeConstraintSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateSizeConstraintSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8307,7 +8321,7 @@ const opUpdateSqlInjectionMatchSet = "UpdateSqlInjectionMatchSet" // UpdateSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateSqlInjectionMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8364,10 +8378,10 @@ func (c *WAF) UpdateSqlInjectionMatchSetRequest(input *UpdateSqlInjectionMatchSe // You can only specify a single type of TextTransformation. // // You use SqlInjectionMatchSet objects to specify which CloudFront requests -// you want to allow, block, or count. For example, if you're receiving requests -// that contain snippets of SQL code in the query string and you want to block -// the requests, you can create a SqlInjectionMatchSet with the applicable settings, -// and then configure AWS WAF to block the requests. +// that you want to allow, block, or count. For example, if you're receiving +// requests that contain snippets of SQL code in the query string and you want +// to block the requests, you can create a SqlInjectionMatchSet with the applicable +// settings, and then configure AWS WAF to block the requests. // // To create and configure a SqlInjectionMatchSet, perform the following steps: // @@ -8501,7 +8515,7 @@ const opUpdateWebACL = "UpdateWebACL" // UpdateWebACLRequest generates a "aws/request.Request" representing the // client's request for the UpdateWebACL operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8548,8 +8562,8 @@ func (c *WAF) UpdateWebACLRequest(input *UpdateWebACLInput) (req *request.Reques // the default action if a request doesn't match the criteria in any of the // Rules in a WebACL. // -// * The Rules that you want to add and/or delete. If you want to replace -// one Rule with another, you delete the existing Rule and add the new one. +// * The Rules that you want to add or delete. If you want to replace one +// Rule with another, you delete the existing Rule and add the new one. // // * For each Rule, whether you want AWS WAF to allow requests, block requests, // or count requests that match the conditions in the Rule. @@ -8558,9 +8572,9 @@ func (c *WAF) UpdateWebACLRequest(input *UpdateWebACLInput) (req *request.Reques // If you add more than one Rule to a WebACL, AWS WAF evaluates each request // against the Rules in order based on the value of Priority. (The Rule that // has the lowest value for Priority is evaluated first.) When a web request -// matches all of the predicates (such as ByteMatchSets and IPSets) in a -// Rule, AWS WAF immediately takes the corresponding action, allow or block, -// and doesn't evaluate the request against the remaining Rules in the WebACL, +// matches all the predicates (such as ByteMatchSets and IPSets) in a Rule, +// AWS WAF immediately takes the corresponding action, allow or block, and +// doesn't evaluate the request against the remaining Rules in the WebACL, // if any. // // To create and configure a WebACL, perform the following steps: @@ -8581,6 +8595,14 @@ func (c *WAF) UpdateWebACLRequest(input *UpdateWebACLInput) (req *request.Reques // in the WebACL, to specify the default action, and to associate the WebACL // with a CloudFront distribution. // +// The ActivatedRule can be a rule group. If you specify a rule group as your +// ActivatedRule, you can exclude specific rules from that rule group. +// +// If you already have a rule group associated with a web ACL and want to submit +// an UpdateWebACL request to exclude certain rules from that rule group, you +// must first remove the rule group from the web ACL, the re-insert it again, +// specifying the excluded rules. For details, see ActivatedRule$ExcludedRules. +// // Be aware that if you try to add a RATE_BASED rule to a web ACL without setting // the rule type when first creating the rule, the UpdateWebACL request will // fail because the request tries to add a REGULAR rule (the default rule type) @@ -8719,7 +8741,7 @@ const opUpdateXssMatchSet = "UpdateXssMatchSet" // UpdateXssMatchSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateXssMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8762,8 +8784,8 @@ func (c *WAF) UpdateXssMatchSetRequest(input *UpdateXssMatchSetInput) (req *requ // each XssMatchTuple object, you specify the following values: // // * Action: Whether to insert the object into or delete the object from -// the array. To change a XssMatchTuple, you delete the existing object and -// add a new one. +// the array. To change an XssMatchTuple, you delete the existing object +// and add a new one. // // * FieldToMatch: The part of web requests that you want AWS WAF to inspect // and, if you want AWS WAF to inspect a header or custom query parameter, @@ -8775,11 +8797,11 @@ func (c *WAF) UpdateXssMatchSetRequest(input *UpdateXssMatchSetInput) (req *requ // // You can only specify a single type of TextTransformation. // -// You use XssMatchSet objects to specify which CloudFront requests you want -// to allow, block, or count. For example, if you're receiving requests that -// contain cross-site scripting attacks in the request body and you want to -// block the requests, you can create an XssMatchSet with the applicable settings, -// and then configure AWS WAF to block the requests. +// You use XssMatchSet objects to specify which CloudFront requests that you +// want to allow, block, or count. For example, if you're receiving requests +// that contain cross-site scripting attacks in the request body and you want +// to block the requests, you can create an XssMatchSet with the applicable +// settings, and then configure AWS WAF to block the requests. // // To create and configure an XssMatchSet, perform the following steps: // @@ -8930,10 +8952,45 @@ type ActivatedRule struct { // remaining rules in the web ACL. // // ActivatedRule|OverrideAction applies only when updating or adding a RuleGroup - // to a WebACL. In this case you do not use ActivatedRule|Action. For all other + // to a WebACL. In this case, you do not use ActivatedRule|Action. For all other // update requests, ActivatedRule|Action is used instead of ActivatedRule|OverrideAction. Action *WafAction `type:"structure"` + // An array of rules to exclude from a rule group. This is applicable only when + // the ActivatedRule refers to a RuleGroup. + // + // Sometimes it is necessary to troubleshoot rule groups that are blocking traffic + // unexpectedly (false positives). One troubleshooting technique is to identify + // the specific rule within the rule group that is blocking the legitimate traffic + // and then disable (exclude) that particular rule. You can exclude rules from + // both your own rule groups and AWS Marketplace rule groups that have been + // associated with a web ACL. + // + // Specifying ExcludedRules does not remove those rules from the rule group. + // Rather, it changes the action for the rules to COUNT. Therefore, requests + // that match an ExcludedRule are counted but not blocked. The RuleGroup owner + // will receive COUNT metrics for each ExcludedRule. + // + // If you want to exclude rules from a rule group that is already associated + // with a web ACL, perform the following steps: + // + // Use the AWS WAF logs to identify the IDs of the rules that you want to exclude. + // For more information about the logs, see Logging Web ACL Traffic Information + // (http://docs.aws.amazon.com/waf/latest/developerguide/logging.html). + // + // Submit an UpdateWebACL request that has two actions: + // + // The first action deletes the existing rule group from the web ACL. That is, + // in the UpdateWebACL request, the first Updates:Action should be DELETE and + // Updates:ActivatedRule:RuleId should be the rule group that contains the rules + // that you want to exclude. + // + // The second action inserts the same rule group back in, but specifying the + // rules to exclude. That is, the second Updates:Action should be INSERT, Updates:ActivatedRule:RuleId + // should be the rule group that you just removed, and ExcludedRules should + // contain the rules that you want to exclude. + ExcludedRules []*ExcludedRule `type:"list"` + // Use the OverrideAction to test your RuleGroup. // // Any rule in a RuleGroup can potentially block a request. If you set the OverrideAction @@ -9004,6 +9061,16 @@ func (s *ActivatedRule) Validate() error { invalidParams.AddNested("Action", err.(request.ErrInvalidParams)) } } + if s.ExcludedRules != nil { + for i, v := range s.ExcludedRules { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ExcludedRules", i), err.(request.ErrInvalidParams)) + } + } + } if s.OverrideAction != nil { if err := s.OverrideAction.Validate(); err != nil { invalidParams.AddNested("OverrideAction", err.(request.ErrInvalidParams)) @@ -9022,6 +9089,12 @@ func (s *ActivatedRule) SetAction(v *WafAction) *ActivatedRule { return s } +// SetExcludedRules sets the ExcludedRules field's value. +func (s *ActivatedRule) SetExcludedRules(v []*ExcludedRule) *ActivatedRule { + s.ExcludedRules = v + return s +} + // SetOverrideAction sets the OverrideAction field's value. func (s *ActivatedRule) SetOverrideAction(v *WafOverrideAction) *ActivatedRule { s.OverrideAction = v @@ -9320,7 +9393,7 @@ type ByteMatchTuple struct { // // For example, suppose the value of Type is HEADER and the value of Data is // User-Agent. If you want to search the User-Agent header for the value BadBot, - // you base64-encode BadBot using MIME base64 encoding and include the resulting + // you base64-encode BadBot using MIME base64-encoding and include the resulting // value, QmFkQm90, in the value of TargetString. // // If you're using the AWS CLI or one of the AWS SDKs @@ -10207,7 +10280,7 @@ type CreateRuleInput struct { // A friendly name or description for the metrics for this Rule. The name can // contain only alphanumeric characters (A-Z, a-z, 0-9); the name can't contain - // whitespace. You can't change the name of the metric after you create the + // white space. You can't change the name of the metric after you create the // Rule. // // MetricName is a required field @@ -10512,7 +10585,7 @@ type CreateWebACLInput struct { // A friendly name or description for the metrics for this WebACL. The name // can contain only alphanumeric characters (A-Z, a-z, 0-9); the name can't - // contain whitespace. You can't change MetricName after you create the WebACL. + // contain white space. You can't change MetricName after you create the WebACL. // // MetricName is a required field MetricName *string `type:"string" required:"true"` @@ -11846,6 +11919,50 @@ func (s *DeleteXssMatchSetOutput) SetChangeToken(v string) *DeleteXssMatchSetOut return s } +// The rule to exclude from a rule group. This is applicable only when the ActivatedRule +// refers to a RuleGroup. The rule must belong to the RuleGroup that is specified +// by the ActivatedRule. +type ExcludedRule struct { + _ struct{} `type:"structure"` + + // The unique identifier for the rule to exclude from the rule group. + // + // RuleId is a required field + RuleId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ExcludedRule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ExcludedRule) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ExcludedRule) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ExcludedRule"} + if s.RuleId == nil { + invalidParams.Add(request.NewErrParamRequired("RuleId")) + } + if s.RuleId != nil && len(*s.RuleId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RuleId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRuleId sets the RuleId field's value. +func (s *ExcludedRule) SetRuleId(v string) *ExcludedRule { + s.RuleId = &v + return s +} + // Specifies where in a web request to look for TargetString. type FieldToMatch struct { _ struct{} `type:"structure"` @@ -15148,19 +15265,19 @@ func (s *ListXssMatchSetsOutput) SetXssMatchSets(v []*XssMatchSetSummary) *ListX return s } -// The Amazon Kinesis Data Firehose delivery streams, RedactedFields information, -// and the web ACL Amazon Resource Name (ARN). +// The Amazon Kinesis Data Firehose, RedactedFields information, and the web +// ACL Amazon Resource Name (ARN). type LoggingConfiguration struct { _ struct{} `type:"structure"` - // An array of Amazon Kinesis Data Firehose delivery stream ARNs. + // An array of Amazon Kinesis Data Firehose ARNs. // // LogDestinationConfigs is a required field LogDestinationConfigs []*string `min:"1" type:"list" required:"true"` // The parts of the request that you want redacted from the logs. For example, - // if you redact the cookie field, the cookie field in the delivery stream will - // be xxx. + // if you redact the cookie field, the cookie field in the firehose will be + // xxx. RedactedFields []*FieldToMatch `type:"list"` // The Amazon Resource Name (ARN) of the web ACL that you want to associate @@ -15317,9 +15434,9 @@ func (s *Predicate) SetType(v string) *Predicate { type PutLoggingConfigurationInput struct { _ struct{} `type:"structure"` - // The Amazon Kinesis Data Firehose delivery streams that contains the inspected - // traffic information, the redacted fields details, and the Amazon Resource - // Name (ARN) of the web ACL to monitor. + // The Amazon Kinesis Data Firehose that contains the inspected traffic information, + // the redacted fields details, and the Amazon Resource Name (ARN) of the web + // ACL to monitor. // // LoggingConfiguration is a required field LoggingConfiguration *LoggingConfiguration `type:"structure" required:"true"` @@ -18445,7 +18562,7 @@ type UpdateWebACLInput struct { // // * ActivatedRule: Contains Action, OverrideAction, Priority, RuleId, and // Type. ActivatedRule|OverrideAction applies only when updating or adding - // a RuleGroup to a WebACL. In this case you do not use ActivatedRule|Action. + // a RuleGroup to a WebACL. In this case, you do not use ActivatedRule|Action. // For all other update requests, ActivatedRule|Action is used instead of // ActivatedRule|OverrideAction. // @@ -18565,7 +18682,7 @@ type UpdateXssMatchSetInput struct { ChangeToken *string `min:"1" type:"string" required:"true"` // An array of XssMatchSetUpdate objects that you want to insert into or delete - // from a XssMatchSet. For more information, see the applicable data types: + // from an XssMatchSet. For more information, see the applicable data types: // // * XssMatchSetUpdate: Contains Action and XssMatchTuple // @@ -18800,6 +18917,9 @@ type WebACL struct { // Rules is a required field Rules []*ActivatedRule `type:"list" required:"true"` + // Tha Amazon Resource Name (ARN) of the web ACL. + WebACLArn *string `min:"1" type:"string"` + // A unique identifier for a WebACL. You use WebACLId to get information about // a WebACL (see GetWebACL), update a WebACL (see UpdateWebACL), and delete // a WebACL from AWS WAF (see DeleteWebACL). @@ -18844,6 +18964,12 @@ func (s *WebACL) SetRules(v []*ActivatedRule) *WebACL { return s } +// SetWebACLArn sets the WebACLArn field's value. +func (s *WebACL) SetWebACLArn(v string) *WebACL { + s.WebACLArn = &v + return s +} + // SetWebACLId sets the WebACLId field's value. func (s *WebACL) SetWebACLId(v string) *WebACL { s.WebACLId = &v @@ -19058,8 +19184,8 @@ func (s *XssMatchSetSummary) SetXssMatchSetId(v string) *XssMatchSetSummary { type XssMatchSetUpdate struct { _ struct{} `type:"structure"` - // Specify INSERT to add a XssMatchSetUpdate to an XssMatchSet. Use DELETE to - // remove a XssMatchSetUpdate from an XssMatchSet. + // Specify INSERT to add an XssMatchSetUpdate to an XssMatchSet. Use DELETE + // to remove an XssMatchSetUpdate from an XssMatchSet. // // Action is a required field Action *string `type:"string" required:"true" enum:"ChangeAction"` @@ -20115,6 +20241,9 @@ const ( // ParameterExceptionFieldNextMarker is a ParameterExceptionField enum value ParameterExceptionFieldNextMarker = "NEXT_MARKER" + + // ParameterExceptionFieldResourceArn is a ParameterExceptionField enum value + ParameterExceptionFieldResourceArn = "RESOURCE_ARN" ) const ( @@ -20123,6 +20252,9 @@ const ( // ParameterExceptionReasonIllegalCombination is a ParameterExceptionReason enum value ParameterExceptionReasonIllegalCombination = "ILLEGAL_COMBINATION" + + // ParameterExceptionReasonIllegalArgument is a ParameterExceptionReason enum value + ParameterExceptionReasonIllegalArgument = "ILLEGAL_ARGUMENT" ) const ( diff --git a/vendor/github.com/aws/aws-sdk-go/service/waf/errors.go b/vendor/github.com/aws/aws-sdk-go/service/waf/errors.go index 02c9752b0b..3e9995d8de 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/waf/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/waf/errors.go @@ -172,6 +172,19 @@ const ( // * You tried to delete a Rule that is still referenced by a WebACL. ErrCodeReferencedItemException = "WAFReferencedItemException" + // ErrCodeServiceLinkedRoleErrorException for service response error code + // "WAFServiceLinkedRoleErrorException". + // + // AWS WAF is not able to access the service linked role. This can be caused + // by a previous PutLoggingConfiguration request, which can lock the service + // linked role for about 20 seconds. Please try your request again. The service + // linked role can also be locked by a previous DeleteServiceLinkedRole request, + // which can lock the role for 15 minutes or more. If you recently made a DeleteServiceLinkedRole, + // wait at least 15 minutes and try the request again. If you receive this same + // exception again, you will have to wait additional time until the role is + // unlocked. + ErrCodeServiceLinkedRoleErrorException = "WAFServiceLinkedRoleErrorException" + // ErrCodeStaleDataException for service response error code // "WAFStaleDataException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/wafregional/api.go b/vendor/github.com/aws/aws-sdk-go/service/wafregional/api.go index 470cefe499..2e5fb159c4 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/wafregional/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/wafregional/api.go @@ -6,6 +6,8 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" "github.com/aws/aws-sdk-go/service/waf" ) @@ -14,7 +16,7 @@ const opAssociateWebACL = "AssociateWebACL" // AssociateWebACLRequest generates a "aws/request.Request" representing the // client's request for the AssociateWebACL operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -48,12 +50,14 @@ func (c *WAFRegional) AssociateWebACLRequest(input *AssociateWebACLInput) (req * output = &AssociateWebACLOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // AssociateWebACL API operation for AWS WAF Regional. // -// Associates a web ACL with a resource. +// Associates a web ACL with a resource, either an application load balancer +// or Amazon API Gateway stage. // // 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 @@ -134,7 +138,7 @@ const opCreateByteMatchSet = "CreateByteMatchSet" // CreateByteMatchSetRequest generates a "aws/request.Request" representing the // client's request for the CreateByteMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -281,7 +285,7 @@ const opCreateGeoMatchSet = "CreateGeoMatchSet" // CreateGeoMatchSetRequest generates a "aws/request.Request" representing the // client's request for the CreateGeoMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -427,7 +431,7 @@ const opCreateIPSet = "CreateIPSet" // CreateIPSetRequest generates a "aws/request.Request" representing the // client's request for the CreateIPSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -466,8 +470,8 @@ func (c *WAFRegional) CreateIPSetRequest(input *waf.CreateIPSetInput) (req *requ // CreateIPSet API operation for AWS WAF Regional. // -// Creates an IPSet, which you use to specify which web requests you want to -// allow or block based on the IP addresses that the requests originate from. +// Creates an IPSet, which you use to specify which web requests that you want +// to allow or block based on the IP addresses that the requests originate from. // For example, if you're receiving a lot of requests from one or more individual // IP addresses or one or more ranges of IP addresses and you want to block // the requests, you can create an IPSet that contains those IP addresses and @@ -574,7 +578,7 @@ const opCreateRateBasedRule = "CreateRateBasedRule" // CreateRateBasedRuleRequest generates a "aws/request.Request" representing the // client's request for the CreateRateBasedRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -756,7 +760,7 @@ const opCreateRegexMatchSet = "CreateRegexMatchSet" // CreateRegexMatchSetRequest generates a "aws/request.Request" representing the // client's request for the CreateRegexMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -871,7 +875,7 @@ const opCreateRegexPatternSet = "CreateRegexPatternSet" // CreateRegexPatternSetRequest generates a "aws/request.Request" representing the // client's request for the CreateRegexPatternSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -982,7 +986,7 @@ const opCreateRule = "CreateRule" // CreateRuleRequest generates a "aws/request.Request" representing the // client's request for the CreateRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1024,8 +1028,8 @@ func (c *WAFRegional) CreateRuleRequest(input *waf.CreateRuleInput) (req *reques // Creates a Rule, which contains the IPSet objects, ByteMatchSet objects, and // other predicates that identify the requests that you want to block. If you // add more than one predicate to a Rule, a request must match all of the specifications -// to be allowed or blocked. For example, suppose you add the following to a -// Rule: +// to be allowed or blocked. For example, suppose that you add the following +// to a Rule: // // * An IPSet that matches the IP address 192.0.2.44/32 // @@ -1139,7 +1143,7 @@ const opCreateRuleGroup = "CreateRuleGroup" // CreateRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the CreateRuleGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1245,7 +1249,7 @@ const opCreateSizeConstraintSet = "CreateSizeConstraintSet" // CreateSizeConstraintSetRequest generates a "aws/request.Request" representing the // client's request for the CreateSizeConstraintSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1393,7 +1397,7 @@ const opCreateSqlInjectionMatchSet = "CreateSqlInjectionMatchSet" // CreateSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the // client's request for the CreateSqlInjectionMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1537,7 +1541,7 @@ const opCreateWebACL = "CreateWebACL" // CreateWebACLRequest generates a "aws/request.Request" representing the // client's request for the CreateWebACL operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1693,7 +1697,7 @@ const opCreateXssMatchSet = "CreateXssMatchSet" // CreateXssMatchSetRequest generates a "aws/request.Request" representing the // client's request for the CreateXssMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1838,7 +1842,7 @@ const opDeleteByteMatchSet = "DeleteByteMatchSet" // DeleteByteMatchSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteByteMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -1965,7 +1969,7 @@ const opDeleteGeoMatchSet = "DeleteGeoMatchSet" // DeleteGeoMatchSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteGeoMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2091,7 +2095,7 @@ const opDeleteIPSet = "DeleteIPSet" // DeleteIPSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteIPSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2217,7 +2221,7 @@ const opDeleteLoggingConfiguration = "DeleteLoggingConfiguration" // DeleteLoggingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the DeleteLoggingConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2251,6 +2255,7 @@ func (c *WAFRegional) DeleteLoggingConfigurationRequest(input *waf.DeleteLogging output = &waf.DeleteLoggingConfigurationOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2304,7 +2309,7 @@ const opDeletePermissionPolicy = "DeletePermissionPolicy" // DeletePermissionPolicyRequest generates a "aws/request.Request" representing the // client's request for the DeletePermissionPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2338,6 +2343,7 @@ func (c *WAFRegional) DeletePermissionPolicyRequest(input *waf.DeletePermissionP output = &waf.DeletePermissionPolicyOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -2393,7 +2399,7 @@ const opDeleteRateBasedRule = "DeleteRateBasedRule" // DeleteRateBasedRuleRequest generates a "aws/request.Request" representing the // client's request for the DeleteRateBasedRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2521,7 +2527,7 @@ const opDeleteRegexMatchSet = "DeleteRegexMatchSet" // DeleteRegexMatchSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteRegexMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2648,7 +2654,7 @@ const opDeleteRegexPatternSet = "DeleteRegexPatternSet" // DeleteRegexPatternSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteRegexPatternSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2763,7 +2769,7 @@ const opDeleteRule = "DeleteRule" // DeleteRuleRequest generates a "aws/request.Request" representing the // client's request for the DeleteRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -2889,7 +2895,7 @@ const opDeleteRuleGroup = "DeleteRuleGroup" // DeleteRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the DeleteRuleGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3028,7 +3034,7 @@ const opDeleteSizeConstraintSet = "DeleteSizeConstraintSet" // DeleteSizeConstraintSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteSizeConstraintSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3155,7 +3161,7 @@ const opDeleteSqlInjectionMatchSet = "DeleteSqlInjectionMatchSet" // DeleteSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteSqlInjectionMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3283,7 +3289,7 @@ const opDeleteWebACL = "DeleteWebACL" // DeleteWebACLRequest generates a "aws/request.Request" representing the // client's request for the DeleteWebACL operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3406,7 +3412,7 @@ const opDeleteXssMatchSet = "DeleteXssMatchSet" // DeleteXssMatchSetRequest generates a "aws/request.Request" representing the // client's request for the DeleteXssMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3533,7 +3539,7 @@ const opDisassociateWebACL = "DisassociateWebACL" // DisassociateWebACLRequest generates a "aws/request.Request" representing the // client's request for the DisassociateWebACL operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3567,12 +3573,14 @@ func (c *WAFRegional) DisassociateWebACLRequest(input *DisassociateWebACLInput) output = &DisassociateWebACLOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // DisassociateWebACL API operation for AWS WAF Regional. // -// Removes a web ACL from the specified resource. +// Removes a web ACL from the specified resource, either an application load +// balancer or Amazon API Gateway stage. // // 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 @@ -3649,7 +3657,7 @@ const opGetByteMatchSet = "GetByteMatchSet" // GetByteMatchSetRequest generates a "aws/request.Request" representing the // client's request for the GetByteMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3736,7 +3744,7 @@ const opGetChangeToken = "GetChangeToken" // GetChangeTokenRequest generates a "aws/request.Request" representing the // client's request for the GetChangeToken operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3830,7 +3838,7 @@ const opGetChangeTokenStatus = "GetChangeTokenStatus" // GetChangeTokenStatusRequest generates a "aws/request.Request" representing the // client's request for the GetChangeTokenStatus operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -3923,7 +3931,7 @@ const opGetGeoMatchSet = "GetGeoMatchSet" // GetGeoMatchSetRequest generates a "aws/request.Request" representing the // client's request for the GetGeoMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4010,7 +4018,7 @@ const opGetIPSet = "GetIPSet" // GetIPSetRequest generates a "aws/request.Request" representing the // client's request for the GetIPSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4097,7 +4105,7 @@ const opGetLoggingConfiguration = "GetLoggingConfiguration" // GetLoggingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the GetLoggingConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4180,7 +4188,7 @@ const opGetPermissionPolicy = "GetPermissionPolicy" // GetPermissionPolicyRequest generates a "aws/request.Request" representing the // client's request for the GetPermissionPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4263,7 +4271,7 @@ const opGetRateBasedRule = "GetRateBasedRule" // GetRateBasedRuleRequest generates a "aws/request.Request" representing the // client's request for the GetRateBasedRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4351,7 +4359,7 @@ const opGetRateBasedRuleManagedKeys = "GetRateBasedRuleManagedKeys" // GetRateBasedRuleManagedKeysRequest generates a "aws/request.Request" representing the // client's request for the GetRateBasedRuleManagedKeys operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4470,7 +4478,7 @@ const opGetRegexMatchSet = "GetRegexMatchSet" // GetRegexMatchSetRequest generates a "aws/request.Request" representing the // client's request for the GetRegexMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4557,7 +4565,7 @@ const opGetRegexPatternSet = "GetRegexPatternSet" // GetRegexPatternSetRequest generates a "aws/request.Request" representing the // client's request for the GetRegexPatternSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4644,7 +4652,7 @@ const opGetRule = "GetRule" // GetRuleRequest generates a "aws/request.Request" representing the // client's request for the GetRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4732,7 +4740,7 @@ const opGetRuleGroup = "GetRuleGroup" // GetRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the GetRuleGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4818,7 +4826,7 @@ const opGetSampledRequests = "GetSampledRequests" // GetSampledRequestsRequest generates a "aws/request.Request" representing the // client's request for the GetSampledRequests operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4911,7 +4919,7 @@ const opGetSizeConstraintSet = "GetSizeConstraintSet" // GetSizeConstraintSetRequest generates a "aws/request.Request" representing the // client's request for the GetSizeConstraintSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -4998,7 +5006,7 @@ const opGetSqlInjectionMatchSet = "GetSqlInjectionMatchSet" // GetSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the // client's request for the GetSqlInjectionMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5085,7 +5093,7 @@ const opGetWebACL = "GetWebACL" // GetWebACLRequest generates a "aws/request.Request" representing the // client's request for the GetWebACL operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5172,7 +5180,7 @@ const opGetWebACLForResource = "GetWebACLForResource" // GetWebACLForResourceRequest generates a "aws/request.Request" representing the // client's request for the GetWebACLForResource operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5211,7 +5219,8 @@ func (c *WAFRegional) GetWebACLForResourceRequest(input *GetWebACLForResourceInp // GetWebACLForResource API operation for AWS WAF Regional. // -// Returns the web ACL for the specified resource. +// Returns the web ACL for the specified resource, either an application load +// balancer or Amazon API Gateway stage. // // 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 @@ -5292,7 +5301,7 @@ const opGetXssMatchSet = "GetXssMatchSet" // GetXssMatchSetRequest generates a "aws/request.Request" representing the // client's request for the GetXssMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5379,7 +5388,7 @@ const opListActivatedRulesInRuleGroup = "ListActivatedRulesInRuleGroup" // ListActivatedRulesInRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the ListActivatedRulesInRuleGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5491,7 +5500,7 @@ const opListByteMatchSets = "ListByteMatchSets" // ListByteMatchSetsRequest generates a "aws/request.Request" representing the // client's request for the ListByteMatchSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5575,7 +5584,7 @@ const opListGeoMatchSets = "ListGeoMatchSets" // ListGeoMatchSetsRequest generates a "aws/request.Request" representing the // client's request for the ListGeoMatchSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5659,7 +5668,7 @@ const opListIPSets = "ListIPSets" // ListIPSetsRequest generates a "aws/request.Request" representing the // client's request for the ListIPSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5743,7 +5752,7 @@ const opListLoggingConfigurations = "ListLoggingConfigurations" // ListLoggingConfigurationsRequest generates a "aws/request.Request" representing the // client's request for the ListLoggingConfigurations operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5855,7 +5864,7 @@ const opListRateBasedRules = "ListRateBasedRules" // ListRateBasedRulesRequest generates a "aws/request.Request" representing the // client's request for the ListRateBasedRules operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -5939,7 +5948,7 @@ const opListRegexMatchSets = "ListRegexMatchSets" // ListRegexMatchSetsRequest generates a "aws/request.Request" representing the // client's request for the ListRegexMatchSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6023,7 +6032,7 @@ const opListRegexPatternSets = "ListRegexPatternSets" // ListRegexPatternSetsRequest generates a "aws/request.Request" representing the // client's request for the ListRegexPatternSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6107,7 +6116,7 @@ const opListResourcesForWebACL = "ListResourcesForWebACL" // ListResourcesForWebACLRequest generates a "aws/request.Request" representing the // client's request for the ListResourcesForWebACL operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6167,6 +6176,35 @@ func (c *WAFRegional) ListResourcesForWebACLRequest(input *ListResourcesForWebAC // * ErrCodeWAFNonexistentItemException "WAFNonexistentItemException" // The operation failed because the referenced object doesn't exist. // +// * ErrCodeWAFInvalidParameterException "WAFInvalidParameterException" +// The operation failed because AWS WAF didn't recognize a parameter in the +// request. For example: +// +// * You specified an invalid parameter name. +// +// * You specified an invalid value. +// +// * You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) +// using an action other than INSERT or DELETE. +// +// * You tried to create a WebACL with a DefaultActionType other than ALLOW, +// BLOCK, or COUNT. +// +// * You tried to create a RateBasedRule with a RateKey value other than +// IP. +// +// * You tried to update a WebACL with a WafActionType other than ALLOW, +// BLOCK, or COUNT. +// +// * You tried to update a ByteMatchSet with a FieldToMatchType other than +// HEADER, METHOD, QUERY_STRING, URI, or BODY. +// +// * You tried to update a ByteMatchSet with a Field of HEADER but no value +// for Data. +// +// * Your request references an ARN that is malformed, or corresponds to +// a resource with which a web ACL cannot be associated. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/ListResourcesForWebACL func (c *WAFRegional) ListResourcesForWebACL(input *ListResourcesForWebACLInput) (*ListResourcesForWebACLOutput, error) { req, out := c.ListResourcesForWebACLRequest(input) @@ -6194,7 +6232,7 @@ const opListRuleGroups = "ListRuleGroups" // ListRuleGroupsRequest generates a "aws/request.Request" representing the // client's request for the ListRuleGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6274,7 +6312,7 @@ const opListRules = "ListRules" // ListRulesRequest generates a "aws/request.Request" representing the // client's request for the ListRules operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6358,7 +6396,7 @@ const opListSizeConstraintSets = "ListSizeConstraintSets" // ListSizeConstraintSetsRequest generates a "aws/request.Request" representing the // client's request for the ListSizeConstraintSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6442,7 +6480,7 @@ const opListSqlInjectionMatchSets = "ListSqlInjectionMatchSets" // ListSqlInjectionMatchSetsRequest generates a "aws/request.Request" representing the // client's request for the ListSqlInjectionMatchSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6526,7 +6564,7 @@ const opListSubscribedRuleGroups = "ListSubscribedRuleGroups" // ListSubscribedRuleGroupsRequest generates a "aws/request.Request" representing the // client's request for the ListSubscribedRuleGroups operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6609,7 +6647,7 @@ const opListWebACLs = "ListWebACLs" // ListWebACLsRequest generates a "aws/request.Request" representing the // client's request for the ListWebACLs operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6693,7 +6731,7 @@ const opListXssMatchSets = "ListXssMatchSets" // ListXssMatchSetsRequest generates a "aws/request.Request" representing the // client's request for the ListXssMatchSets operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6777,7 +6815,7 @@ const opPutLoggingConfiguration = "PutLoggingConfiguration" // PutLoggingConfigurationRequest generates a "aws/request.Request" representing the // client's request for the PutLoggingConfiguration operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6821,16 +6859,14 @@ func (c *WAFRegional) PutLoggingConfigurationRequest(input *waf.PutLoggingConfig // You can access information about all traffic that AWS WAF inspects using // the following steps: // -// Create an Amazon Kinesis Data Firehose delivery stream. For more information, -// see Creating an Amazon Kinesis Data Firehose Delivery Stream (https://docs.aws.amazon.com/firehose/latest/dev/what-is-this-service.html). +// Create an Amazon Kinesis Data Firehose . // -// Associate that delivery stream to your web ACL using a PutLoggingConfiguration -// request. +// Associate that firehose to your web ACL using a PutLoggingConfiguration request. // // When you successfully enable logging using a PutLoggingConfiguration request, // AWS WAF will create a service linked role with the necessary permissions -// to write logs to the Amazon Kinesis Data Firehose delivery stream. For more -// information, see Logging Web ACL Traffic Information (http://docs.aws.amazon.com/waf/latest/developerguide/logging.html) +// to write logs to the Amazon Kinesis Data Firehose. For more information, +// see Logging Web ACL Traffic Information (http://docs.aws.amazon.com/waf/latest/developerguide/logging.html) // in the AWS WAF Developer Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -6852,6 +6888,16 @@ func (c *WAFRegional) PutLoggingConfigurationRequest(input *waf.PutLoggingConfig // The operation failed because you tried to create, update, or delete an object // by using a change token that has already been used. // +// * ErrCodeWAFServiceLinkedRoleErrorException "WAFServiceLinkedRoleErrorException" +// AWS WAF is not able to access the service linked role. This can be caused +// by a previous PutLoggingConfiguration request, which can lock the service +// linked role for about 20 seconds. Please try your request again. The service +// linked role can also be locked by a previous DeleteServiceLinkedRole request, +// which can lock the role for 15 minutes or more. If you recently made a DeleteServiceLinkedRole, +// wait at least 15 minutes and try the request again. If you receive this same +// exception again, you will have to wait additional time until the role is +// unlocked. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/waf-regional-2016-11-28/PutLoggingConfiguration func (c *WAFRegional) PutLoggingConfiguration(input *waf.PutLoggingConfigurationInput) (*waf.PutLoggingConfigurationOutput, error) { req, out := c.PutLoggingConfigurationRequest(input) @@ -6879,7 +6925,7 @@ const opPutPermissionPolicy = "PutPermissionPolicy" // PutPermissionPolicyRequest generates a "aws/request.Request" representing the // client's request for the PutPermissionPolicy operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -6913,6 +6959,7 @@ func (c *WAFRegional) PutPermissionPolicyRequest(input *waf.PutPermissionPolicyI output = &waf.PutPermissionPolicyOutput{} req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } @@ -7016,7 +7063,7 @@ const opUpdateByteMatchSet = "UpdateByteMatchSet" // UpdateByteMatchSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateByteMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7212,7 +7259,7 @@ const opUpdateGeoMatchSet = "UpdateGeoMatchSet" // UpdateGeoMatchSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateGeoMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7407,7 +7454,7 @@ const opUpdateIPSet = "UpdateIPSet" // UpdateIPSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateIPSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7626,7 +7673,7 @@ const opUpdateRateBasedRule = "UpdateRateBasedRule" // UpdateRateBasedRuleRequest generates a "aws/request.Request" representing the // client's request for the UpdateRateBasedRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7831,7 +7878,7 @@ const opUpdateRegexMatchSet = "UpdateRegexMatchSet" // UpdateRegexMatchSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateRegexMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -7998,7 +8045,7 @@ const opUpdateRegexPatternSet = "UpdateRegexPatternSet" // UpdateRegexPatternSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateRegexPatternSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8162,7 +8209,7 @@ const opUpdateRule = "UpdateRule" // UpdateRuleRequest generates a "aws/request.Request" representing the // client's request for the UpdateRule operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8205,7 +8252,8 @@ func (c *WAFRegional) UpdateRuleRequest(input *waf.UpdateRuleInput) (req *reques // a predicate, such as a ByteMatchSet or an IPSet, that specifies the web requests // that you want to allow, block, or count. If you add more than one predicate // to a Rule, a request must match all of the specifications to be allowed, -// blocked, or counted. For example, suppose you add the following to a Rule: +// blocked, or counted. For example, suppose that you add the following to a +// Rule: // // * A ByteMatchSet that matches the value BadBot in the User-Agent header // @@ -8362,7 +8410,7 @@ const opUpdateRuleGroup = "UpdateRuleGroup" // UpdateRuleGroupRequest generates a "aws/request.Request" representing the // client's request for the UpdateRuleGroup operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8540,7 +8588,7 @@ const opUpdateSizeConstraintSet = "UpdateSizeConstraintSet" // UpdateSizeConstraintSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateSizeConstraintSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8748,7 +8796,7 @@ const opUpdateSqlInjectionMatchSet = "UpdateSqlInjectionMatchSet" // UpdateSqlInjectionMatchSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateSqlInjectionMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8805,10 +8853,10 @@ func (c *WAFRegional) UpdateSqlInjectionMatchSetRequest(input *waf.UpdateSqlInje // You can only specify a single type of TextTransformation. // // You use SqlInjectionMatchSet objects to specify which CloudFront requests -// you want to allow, block, or count. For example, if you're receiving requests -// that contain snippets of SQL code in the query string and you want to block -// the requests, you can create a SqlInjectionMatchSet with the applicable settings, -// and then configure AWS WAF to block the requests. +// that you want to allow, block, or count. For example, if you're receiving +// requests that contain snippets of SQL code in the query string and you want +// to block the requests, you can create a SqlInjectionMatchSet with the applicable +// settings, and then configure AWS WAF to block the requests. // // To create and configure a SqlInjectionMatchSet, perform the following steps: // @@ -8942,7 +8990,7 @@ const opUpdateWebACL = "UpdateWebACL" // UpdateWebACLRequest generates a "aws/request.Request" representing the // client's request for the UpdateWebACL operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -8989,8 +9037,8 @@ func (c *WAFRegional) UpdateWebACLRequest(input *waf.UpdateWebACLInput) (req *re // the default action if a request doesn't match the criteria in any of the // Rules in a WebACL. // -// * The Rules that you want to add and/or delete. If you want to replace -// one Rule with another, you delete the existing Rule and add the new one. +// * The Rules that you want to add or delete. If you want to replace one +// Rule with another, you delete the existing Rule and add the new one. // // * For each Rule, whether you want AWS WAF to allow requests, block requests, // or count requests that match the conditions in the Rule. @@ -8999,9 +9047,9 @@ func (c *WAFRegional) UpdateWebACLRequest(input *waf.UpdateWebACLInput) (req *re // If you add more than one Rule to a WebACL, AWS WAF evaluates each request // against the Rules in order based on the value of Priority. (The Rule that // has the lowest value for Priority is evaluated first.) When a web request -// matches all of the predicates (such as ByteMatchSets and IPSets) in a -// Rule, AWS WAF immediately takes the corresponding action, allow or block, -// and doesn't evaluate the request against the remaining Rules in the WebACL, +// matches all the predicates (such as ByteMatchSets and IPSets) in a Rule, +// AWS WAF immediately takes the corresponding action, allow or block, and +// doesn't evaluate the request against the remaining Rules in the WebACL, // if any. // // To create and configure a WebACL, perform the following steps: @@ -9022,6 +9070,14 @@ func (c *WAFRegional) UpdateWebACLRequest(input *waf.UpdateWebACLInput) (req *re // in the WebACL, to specify the default action, and to associate the WebACL // with a CloudFront distribution. // +// The ActivatedRule can be a rule group. If you specify a rule group as your +// ActivatedRule, you can exclude specific rules from that rule group. +// +// If you already have a rule group associated with a web ACL and want to submit +// an UpdateWebACL request to exclude certain rules from that rule group, you +// must first remove the rule group from the web ACL, the re-insert it again, +// specifying the excluded rules. For details, see ActivatedRule$ExcludedRules. +// // Be aware that if you try to add a RATE_BASED rule to a web ACL without setting // the rule type when first creating the rule, the UpdateWebACL request will // fail because the request tries to add a REGULAR rule (the default rule type) @@ -9160,7 +9216,7 @@ const opUpdateXssMatchSet = "UpdateXssMatchSet" // UpdateXssMatchSetRequest generates a "aws/request.Request" representing the // client's request for the UpdateXssMatchSet operation. The "output" return // value will be populated with the request's response once the request completes -// successfuly. +// 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. @@ -9203,8 +9259,8 @@ func (c *WAFRegional) UpdateXssMatchSetRequest(input *waf.UpdateXssMatchSetInput // each XssMatchTuple object, you specify the following values: // // * Action: Whether to insert the object into or delete the object from -// the array. To change a XssMatchTuple, you delete the existing object and -// add a new one. +// the array. To change an XssMatchTuple, you delete the existing object +// and add a new one. // // * FieldToMatch: The part of web requests that you want AWS WAF to inspect // and, if you want AWS WAF to inspect a header or custom query parameter, @@ -9216,11 +9272,11 @@ func (c *WAFRegional) UpdateXssMatchSetRequest(input *waf.UpdateXssMatchSetInput // // You can only specify a single type of TextTransformation. // -// You use XssMatchSet objects to specify which CloudFront requests you want -// to allow, block, or count. For example, if you're receiving requests that -// contain cross-site scripting attacks in the request body and you want to -// block the requests, you can create an XssMatchSet with the applicable settings, -// and then configure AWS WAF to block the requests. +// You use XssMatchSet objects to specify which CloudFront requests that you +// want to allow, block, or count. For example, if you're receiving requests +// that contain cross-site scripting attacks in the request body and you want +// to block the requests, you can create an XssMatchSet with the applicable +// settings, and then configure AWS WAF to block the requests. // // To create and configure an XssMatchSet, perform the following steps: // @@ -9352,7 +9408,14 @@ func (c *WAFRegional) UpdateXssMatchSetWithContext(ctx aws.Context, input *waf.U type AssociateWebACLInput struct { _ struct{} `type:"structure"` - // The ARN (Amazon Resource Name) of the resource to be protected. + // The ARN (Amazon Resource Name) of the resource to be protected, either an + // application load balancer or Amazon API Gateway stage. + // + // The ARN should be in one of the following formats: + // + // * For an Application Load Balancer: arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id + // + // * For an Amazon API Gateway stage: arn:aws:apigateway:region::/restapis/api-id/stages/stage-name // // ResourceArn is a required field ResourceArn *string `min:"1" type:"string" required:"true"` @@ -9425,7 +9488,14 @@ type DisassociateWebACLInput struct { _ struct{} `type:"structure"` // The ARN (Amazon Resource Name) of the resource from which the web ACL is - // being removed. + // being removed, either an application load balancer or Amazon API Gateway + // stage. + // + // The ARN should be in one of the following formats: + // + // * For an Application Load Balancer: arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id + // + // * For an Amazon API Gateway stage: arn:aws:apigateway:region::/restapis/api-id/stages/stage-name // // ResourceArn is a required field ResourceArn *string `min:"1" type:"string" required:"true"` @@ -9480,7 +9550,14 @@ func (s DisassociateWebACLOutput) GoString() string { type GetWebACLForResourceInput struct { _ struct{} `type:"structure"` - // The ARN (Amazon Resource Name) of the resource for which to get the web ACL. + // The ARN (Amazon Resource Name) of the resource for which to get the web ACL, + // either an application load balancer or Amazon API Gateway stage. + // + // The ARN should be in one of the following formats: + // + // * For an Application Load Balancer: arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id + // + // * For an Amazon API Gateway stage: arn:aws:apigateway:region::/restapis/api-id/stages/stage-name // // ResourceArn is a required field ResourceArn *string `min:"1" type:"string" required:"true"` @@ -9545,6 +9622,10 @@ func (s *GetWebACLForResourceOutput) SetWebACLSummary(v *waf.WebACLSummary) *Get type ListResourcesForWebACLInput struct { _ struct{} `type:"structure"` + // The type of resource to list, either an application load balancer or Amazon + // API Gateway. + ResourceType *string `type:"string" enum:"ResourceType"` + // The unique identifier (ID) of the web ACL for which to list the associated // resources. // @@ -9578,6 +9659,12 @@ func (s *ListResourcesForWebACLInput) Validate() error { return nil } +// SetResourceType sets the ResourceType field's value. +func (s *ListResourcesForWebACLInput) SetResourceType(v string) *ListResourcesForWebACLInput { + s.ResourceType = &v + return s +} + // SetWebACLId sets the WebACLId field's value. func (s *ListResourcesForWebACLInput) SetWebACLId(v string) *ListResourcesForWebACLInput { s.WebACLId = &v @@ -10478,6 +10565,9 @@ const ( // ParameterExceptionFieldNextMarker is a ParameterExceptionField enum value ParameterExceptionFieldNextMarker = "NEXT_MARKER" + + // ParameterExceptionFieldResourceArn is a ParameterExceptionField enum value + ParameterExceptionFieldResourceArn = "RESOURCE_ARN" ) const ( @@ -10486,6 +10576,9 @@ const ( // ParameterExceptionReasonIllegalCombination is a ParameterExceptionReason enum value ParameterExceptionReasonIllegalCombination = "ILLEGAL_COMBINATION" + + // ParameterExceptionReasonIllegalArgument is a ParameterExceptionReason enum value + ParameterExceptionReasonIllegalArgument = "ILLEGAL_ARGUMENT" ) const ( @@ -10533,6 +10626,14 @@ const ( RateKeyIp = "IP" ) +const ( + // ResourceTypeApplicationLoadBalancer is a ResourceType enum value + ResourceTypeApplicationLoadBalancer = "APPLICATION_LOAD_BALANCER" + + // ResourceTypeApiGateway is a ResourceType enum value + ResourceTypeApiGateway = "API_GATEWAY" +) + const ( // TextTransformationNone is a TextTransformation enum value TextTransformationNone = "NONE" diff --git a/vendor/github.com/aws/aws-sdk-go/service/wafregional/errors.go b/vendor/github.com/aws/aws-sdk-go/service/wafregional/errors.go index fed17a9918..b82c80fc6f 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/wafregional/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/wafregional/errors.go @@ -172,6 +172,19 @@ const ( // * You tried to delete a Rule that is still referenced by a WebACL. ErrCodeWAFReferencedItemException = "WAFReferencedItemException" + // ErrCodeWAFServiceLinkedRoleErrorException for service response error code + // "WAFServiceLinkedRoleErrorException". + // + // AWS WAF is not able to access the service linked role. This can be caused + // by a previous PutLoggingConfiguration request, which can lock the service + // linked role for about 20 seconds. Please try your request again. The service + // linked role can also be locked by a previous DeleteServiceLinkedRole request, + // which can lock the role for 15 minutes or more. If you recently made a DeleteServiceLinkedRole, + // wait at least 15 minutes and try the request again. If you receive this same + // exception again, you will have to wait additional time until the role is + // unlocked. + ErrCodeWAFServiceLinkedRoleErrorException = "WAFServiceLinkedRoleErrorException" + // ErrCodeWAFStaleDataException for service response error code // "WAFStaleDataException". // diff --git a/vendor/github.com/aws/aws-sdk-go/service/workspaces/api.go b/vendor/github.com/aws/aws-sdk-go/service/workspaces/api.go new file mode 100644 index 0000000000..0892e7c78c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/workspaces/api.go @@ -0,0 +1,6938 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package workspaces + +import ( + "fmt" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" +) + +const opAssociateIpGroups = "AssociateIpGroups" + +// AssociateIpGroupsRequest generates a "aws/request.Request" representing the +// client's request for the AssociateIpGroups 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 AssociateIpGroups for more information on using the AssociateIpGroups +// 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 AssociateIpGroupsRequest method. +// req, resp := client.AssociateIpGroupsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/AssociateIpGroups +func (c *WorkSpaces) AssociateIpGroupsRequest(input *AssociateIpGroupsInput) (req *request.Request, output *AssociateIpGroupsOutput) { + op := &request.Operation{ + Name: opAssociateIpGroups, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AssociateIpGroupsInput{} + } + + output = &AssociateIpGroupsOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// AssociateIpGroups API operation for Amazon WorkSpaces. +// +// Associates the specified IP access control group with the specified directory. +// +// 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 WorkSpaces's +// API operation AssociateIpGroups for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" +// One or more parameter values are not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource could not be found. +// +// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException" +// Your resource limits have been exceeded. +// +// * ErrCodeInvalidResourceStateException "InvalidResourceStateException" +// The state of the resource is not valid for this operation. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// The user is not authorized to access a resource. +// +// * ErrCodeOperationNotSupportedException "OperationNotSupportedException" +// This operation is not supported. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/AssociateIpGroups +func (c *WorkSpaces) AssociateIpGroups(input *AssociateIpGroupsInput) (*AssociateIpGroupsOutput, error) { + req, out := c.AssociateIpGroupsRequest(input) + return out, req.Send() +} + +// AssociateIpGroupsWithContext is the same as AssociateIpGroups with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateIpGroups 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 *WorkSpaces) AssociateIpGroupsWithContext(ctx aws.Context, input *AssociateIpGroupsInput, opts ...request.Option) (*AssociateIpGroupsOutput, error) { + req, out := c.AssociateIpGroupsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opAuthorizeIpRules = "AuthorizeIpRules" + +// AuthorizeIpRulesRequest generates a "aws/request.Request" representing the +// client's request for the AuthorizeIpRules 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 AuthorizeIpRules for more information on using the AuthorizeIpRules +// 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 AuthorizeIpRulesRequest method. +// req, resp := client.AuthorizeIpRulesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/AuthorizeIpRules +func (c *WorkSpaces) AuthorizeIpRulesRequest(input *AuthorizeIpRulesInput) (req *request.Request, output *AuthorizeIpRulesOutput) { + op := &request.Operation{ + Name: opAuthorizeIpRules, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AuthorizeIpRulesInput{} + } + + output = &AuthorizeIpRulesOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// AuthorizeIpRules API operation for Amazon WorkSpaces. +// +// Adds one or more rules to the specified IP access control group. +// +// This action gives users permission to access their WorkSpaces from the CIDR +// address ranges specified in the 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 WorkSpaces's +// API operation AuthorizeIpRules for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" +// One or more parameter values are not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource could not be found. +// +// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException" +// Your resource limits have been exceeded. +// +// * ErrCodeInvalidResourceStateException "InvalidResourceStateException" +// The state of the resource is not valid for this operation. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// The user is not authorized to access a resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/AuthorizeIpRules +func (c *WorkSpaces) AuthorizeIpRules(input *AuthorizeIpRulesInput) (*AuthorizeIpRulesOutput, error) { + req, out := c.AuthorizeIpRulesRequest(input) + return out, req.Send() +} + +// AuthorizeIpRulesWithContext is the same as AuthorizeIpRules with the addition of +// the ability to pass a context and additional request options. +// +// See AuthorizeIpRules 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 *WorkSpaces) AuthorizeIpRulesWithContext(ctx aws.Context, input *AuthorizeIpRulesInput, opts ...request.Option) (*AuthorizeIpRulesOutput, error) { + req, out := c.AuthorizeIpRulesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateIpGroup = "CreateIpGroup" + +// CreateIpGroupRequest generates a "aws/request.Request" representing the +// client's request for the CreateIpGroup 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 CreateIpGroup for more information on using the CreateIpGroup +// 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 CreateIpGroupRequest method. +// req, resp := client.CreateIpGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/CreateIpGroup +func (c *WorkSpaces) CreateIpGroupRequest(input *CreateIpGroupInput) (req *request.Request, output *CreateIpGroupOutput) { + op := &request.Operation{ + Name: opCreateIpGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateIpGroupInput{} + } + + output = &CreateIpGroupOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateIpGroup API operation for Amazon WorkSpaces. +// +// Creates an IP access control group. +// +// An IP access control group provides you with the ability to control the IP +// addresses from which users are allowed to access their WorkSpaces. To specify +// the CIDR address ranges, add rules to your IP access control group and then +// associate the group with your directory. You can add rules when you create +// the group or at any time using AuthorizeIpRules. +// +// There is a default IP access control group associated with your directory. +// If you don't associate an IP access control group with your directory, the +// default group is used. The default group includes a default rule that allows +// users to access their WorkSpaces from anywhere. You cannot modify the default +// IP access control group for your directory. +// +// 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 WorkSpaces's +// API operation CreateIpGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" +// One or more parameter values are not valid. +// +// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException" +// Your resource limits have been exceeded. +// +// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" +// The specified resource already exists. +// +// * ErrCodeResourceCreationFailedException "ResourceCreationFailedException" +// The resource could not be created. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// The user is not authorized to access a resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/CreateIpGroup +func (c *WorkSpaces) CreateIpGroup(input *CreateIpGroupInput) (*CreateIpGroupOutput, error) { + req, out := c.CreateIpGroupRequest(input) + return out, req.Send() +} + +// CreateIpGroupWithContext is the same as CreateIpGroup with the addition of +// the ability to pass a context and additional request options. +// +// See CreateIpGroup 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 *WorkSpaces) CreateIpGroupWithContext(ctx aws.Context, input *CreateIpGroupInput, opts ...request.Option) (*CreateIpGroupOutput, error) { + req, out := c.CreateIpGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateTags = "CreateTags" + +// CreateTagsRequest generates a "aws/request.Request" representing the +// client's request for the CreateTags 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 CreateTags for more information on using the CreateTags +// 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 CreateTagsRequest method. +// req, resp := client.CreateTagsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/CreateTags +func (c *WorkSpaces) CreateTagsRequest(input *CreateTagsInput) (req *request.Request, output *CreateTagsOutput) { + op := &request.Operation{ + Name: opCreateTags, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateTagsInput{} + } + + output = &CreateTagsOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// CreateTags API operation for Amazon WorkSpaces. +// +// Creates the specified tags for the specified WorkSpace. +// +// 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 WorkSpaces's +// API operation CreateTags for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource could not be found. +// +// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" +// One or more parameter values are not valid. +// +// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException" +// Your resource limits have been exceeded. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/CreateTags +func (c *WorkSpaces) CreateTags(input *CreateTagsInput) (*CreateTagsOutput, error) { + req, out := c.CreateTagsRequest(input) + return out, req.Send() +} + +// CreateTagsWithContext is the same as CreateTags with the addition of +// the ability to pass a context and additional request options. +// +// See CreateTags 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 *WorkSpaces) CreateTagsWithContext(ctx aws.Context, input *CreateTagsInput, opts ...request.Option) (*CreateTagsOutput, error) { + req, out := c.CreateTagsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateWorkspaces = "CreateWorkspaces" + +// CreateWorkspacesRequest generates a "aws/request.Request" representing the +// client's request for the CreateWorkspaces 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 CreateWorkspaces for more information on using the CreateWorkspaces +// 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 CreateWorkspacesRequest method. +// req, resp := client.CreateWorkspacesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/CreateWorkspaces +func (c *WorkSpaces) CreateWorkspacesRequest(input *CreateWorkspacesInput) (req *request.Request, output *CreateWorkspacesOutput) { + op := &request.Operation{ + Name: opCreateWorkspaces, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateWorkspacesInput{} + } + + output = &CreateWorkspacesOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateWorkspaces API operation for Amazon WorkSpaces. +// +// Creates one or more WorkSpaces. +// +// This operation is asynchronous and returns before the WorkSpaces are created. +// +// 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 WorkSpaces's +// API operation CreateWorkspaces for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException" +// Your resource limits have been exceeded. +// +// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" +// One or more parameter values are not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/CreateWorkspaces +func (c *WorkSpaces) CreateWorkspaces(input *CreateWorkspacesInput) (*CreateWorkspacesOutput, error) { + req, out := c.CreateWorkspacesRequest(input) + return out, req.Send() +} + +// CreateWorkspacesWithContext is the same as CreateWorkspaces with the addition of +// the ability to pass a context and additional request options. +// +// See CreateWorkspaces 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 *WorkSpaces) CreateWorkspacesWithContext(ctx aws.Context, input *CreateWorkspacesInput, opts ...request.Option) (*CreateWorkspacesOutput, error) { + req, out := c.CreateWorkspacesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteIpGroup = "DeleteIpGroup" + +// DeleteIpGroupRequest generates a "aws/request.Request" representing the +// client's request for the DeleteIpGroup 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 DeleteIpGroup for more information on using the DeleteIpGroup +// 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 DeleteIpGroupRequest method. +// req, resp := client.DeleteIpGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DeleteIpGroup +func (c *WorkSpaces) DeleteIpGroupRequest(input *DeleteIpGroupInput) (req *request.Request, output *DeleteIpGroupOutput) { + op := &request.Operation{ + Name: opDeleteIpGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteIpGroupInput{} + } + + output = &DeleteIpGroupOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteIpGroup API operation for Amazon WorkSpaces. +// +// Deletes the specified IP access control group. +// +// You cannot delete an IP access control group that is associated with a directory. +// +// 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 WorkSpaces's +// API operation DeleteIpGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" +// One or more parameter values are not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource could not be found. +// +// * ErrCodeResourceAssociatedException "ResourceAssociatedException" +// The resource is associated with a directory. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// The user is not authorized to access a resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DeleteIpGroup +func (c *WorkSpaces) DeleteIpGroup(input *DeleteIpGroupInput) (*DeleteIpGroupOutput, error) { + req, out := c.DeleteIpGroupRequest(input) + return out, req.Send() +} + +// DeleteIpGroupWithContext is the same as DeleteIpGroup with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteIpGroup 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 *WorkSpaces) DeleteIpGroupWithContext(ctx aws.Context, input *DeleteIpGroupInput, opts ...request.Option) (*DeleteIpGroupOutput, error) { + req, out := c.DeleteIpGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteTags = "DeleteTags" + +// DeleteTagsRequest generates a "aws/request.Request" representing the +// client's request for the DeleteTags 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 DeleteTags for more information on using the DeleteTags +// 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 DeleteTagsRequest method. +// req, resp := client.DeleteTagsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DeleteTags +func (c *WorkSpaces) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, output *DeleteTagsOutput) { + op := &request.Operation{ + Name: opDeleteTags, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteTagsInput{} + } + + output = &DeleteTagsOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteTags API operation for Amazon WorkSpaces. +// +// Deletes the specified tags from the specified WorkSpace. +// +// 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 WorkSpaces's +// API operation DeleteTags for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource could not be found. +// +// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" +// One or more parameter values are not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DeleteTags +func (c *WorkSpaces) DeleteTags(input *DeleteTagsInput) (*DeleteTagsOutput, error) { + req, out := c.DeleteTagsRequest(input) + return out, req.Send() +} + +// DeleteTagsWithContext is the same as DeleteTags with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteTags 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 *WorkSpaces) DeleteTagsWithContext(ctx aws.Context, input *DeleteTagsInput, opts ...request.Option) (*DeleteTagsOutput, error) { + req, out := c.DeleteTagsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteWorkspaceImage = "DeleteWorkspaceImage" + +// DeleteWorkspaceImageRequest generates a "aws/request.Request" representing the +// client's request for the DeleteWorkspaceImage 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 DeleteWorkspaceImage for more information on using the DeleteWorkspaceImage +// 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 DeleteWorkspaceImageRequest method. +// req, resp := client.DeleteWorkspaceImageRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DeleteWorkspaceImage +func (c *WorkSpaces) DeleteWorkspaceImageRequest(input *DeleteWorkspaceImageInput) (req *request.Request, output *DeleteWorkspaceImageOutput) { + op := &request.Operation{ + Name: opDeleteWorkspaceImage, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteWorkspaceImageInput{} + } + + output = &DeleteWorkspaceImageOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteWorkspaceImage API operation for Amazon WorkSpaces. +// +// Deletes the specified image from your account. To delete an image, you must +// first delete any bundles that are associated with the image. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkSpaces's +// API operation DeleteWorkspaceImage for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceAssociatedException "ResourceAssociatedException" +// The resource is associated with a directory. +// +// * ErrCodeInvalidResourceStateException "InvalidResourceStateException" +// The state of the resource is not valid for this operation. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// The user is not authorized to access a resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DeleteWorkspaceImage +func (c *WorkSpaces) DeleteWorkspaceImage(input *DeleteWorkspaceImageInput) (*DeleteWorkspaceImageOutput, error) { + req, out := c.DeleteWorkspaceImageRequest(input) + return out, req.Send() +} + +// DeleteWorkspaceImageWithContext is the same as DeleteWorkspaceImage with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteWorkspaceImage 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 *WorkSpaces) DeleteWorkspaceImageWithContext(ctx aws.Context, input *DeleteWorkspaceImageInput, opts ...request.Option) (*DeleteWorkspaceImageOutput, error) { + req, out := c.DeleteWorkspaceImageRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeAccount = "DescribeAccount" + +// DescribeAccountRequest generates a "aws/request.Request" representing the +// client's request for the DescribeAccount 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 DescribeAccount for more information on using the DescribeAccount +// 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 DescribeAccountRequest method. +// req, resp := client.DescribeAccountRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeAccount +func (c *WorkSpaces) DescribeAccountRequest(input *DescribeAccountInput) (req *request.Request, output *DescribeAccountOutput) { + op := &request.Operation{ + Name: opDescribeAccount, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeAccountInput{} + } + + output = &DescribeAccountOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeAccount API operation for Amazon WorkSpaces. +// +// Retrieves a list that describes the configuration of bring your own license +// (BYOL) for the specified 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 Amazon WorkSpaces's +// API operation DescribeAccount for usage and error information. +// +// Returned Error Codes: +// * ErrCodeAccessDeniedException "AccessDeniedException" +// The user is not authorized to access a resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeAccount +func (c *WorkSpaces) DescribeAccount(input *DescribeAccountInput) (*DescribeAccountOutput, error) { + req, out := c.DescribeAccountRequest(input) + return out, req.Send() +} + +// DescribeAccountWithContext is the same as DescribeAccount with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeAccount 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 *WorkSpaces) DescribeAccountWithContext(ctx aws.Context, input *DescribeAccountInput, opts ...request.Option) (*DescribeAccountOutput, error) { + req, out := c.DescribeAccountRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeAccountModifications = "DescribeAccountModifications" + +// DescribeAccountModificationsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeAccountModifications 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 DescribeAccountModifications for more information on using the DescribeAccountModifications +// 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 DescribeAccountModificationsRequest method. +// req, resp := client.DescribeAccountModificationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeAccountModifications +func (c *WorkSpaces) DescribeAccountModificationsRequest(input *DescribeAccountModificationsInput) (req *request.Request, output *DescribeAccountModificationsOutput) { + op := &request.Operation{ + Name: opDescribeAccountModifications, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeAccountModificationsInput{} + } + + output = &DescribeAccountModificationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeAccountModifications API operation for Amazon WorkSpaces. +// +// Retrieves a list that describes modifications to the configuration of bring +// your own license (BYOL) for the specified 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 Amazon WorkSpaces's +// API operation DescribeAccountModifications for usage and error information. +// +// Returned Error Codes: +// * ErrCodeAccessDeniedException "AccessDeniedException" +// The user is not authorized to access a resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeAccountModifications +func (c *WorkSpaces) DescribeAccountModifications(input *DescribeAccountModificationsInput) (*DescribeAccountModificationsOutput, error) { + req, out := c.DescribeAccountModificationsRequest(input) + return out, req.Send() +} + +// DescribeAccountModificationsWithContext is the same as DescribeAccountModifications with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeAccountModifications 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 *WorkSpaces) DescribeAccountModificationsWithContext(ctx aws.Context, input *DescribeAccountModificationsInput, opts ...request.Option) (*DescribeAccountModificationsOutput, error) { + req, out := c.DescribeAccountModificationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeClientProperties = "DescribeClientProperties" + +// DescribeClientPropertiesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeClientProperties 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 DescribeClientProperties for more information on using the DescribeClientProperties +// 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 DescribeClientPropertiesRequest method. +// req, resp := client.DescribeClientPropertiesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeClientProperties +func (c *WorkSpaces) DescribeClientPropertiesRequest(input *DescribeClientPropertiesInput) (req *request.Request, output *DescribeClientPropertiesOutput) { + op := &request.Operation{ + Name: opDescribeClientProperties, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeClientPropertiesInput{} + } + + output = &DescribeClientPropertiesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeClientProperties API operation for Amazon WorkSpaces. +// +// Retrieves a list that describes one or more specified Amazon WorkSpaces clients. +// +// 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 WorkSpaces's +// API operation DescribeClientProperties for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" +// One or more parameter values are not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource could not be found. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// The user is not authorized to access a resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeClientProperties +func (c *WorkSpaces) DescribeClientProperties(input *DescribeClientPropertiesInput) (*DescribeClientPropertiesOutput, error) { + req, out := c.DescribeClientPropertiesRequest(input) + return out, req.Send() +} + +// DescribeClientPropertiesWithContext is the same as DescribeClientProperties with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeClientProperties 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 *WorkSpaces) DescribeClientPropertiesWithContext(ctx aws.Context, input *DescribeClientPropertiesInput, opts ...request.Option) (*DescribeClientPropertiesOutput, error) { + req, out := c.DescribeClientPropertiesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeIpGroups = "DescribeIpGroups" + +// DescribeIpGroupsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeIpGroups 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 DescribeIpGroups for more information on using the DescribeIpGroups +// 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 DescribeIpGroupsRequest method. +// req, resp := client.DescribeIpGroupsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeIpGroups +func (c *WorkSpaces) DescribeIpGroupsRequest(input *DescribeIpGroupsInput) (req *request.Request, output *DescribeIpGroupsOutput) { + op := &request.Operation{ + Name: opDescribeIpGroups, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeIpGroupsInput{} + } + + output = &DescribeIpGroupsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeIpGroups API operation for Amazon WorkSpaces. +// +// Describes one or more of your IP access control 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 +// the error. +// +// See the AWS API reference guide for Amazon WorkSpaces's +// API operation DescribeIpGroups for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" +// One or more parameter values are not valid. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// The user is not authorized to access a resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeIpGroups +func (c *WorkSpaces) DescribeIpGroups(input *DescribeIpGroupsInput) (*DescribeIpGroupsOutput, error) { + req, out := c.DescribeIpGroupsRequest(input) + return out, req.Send() +} + +// DescribeIpGroupsWithContext is the same as DescribeIpGroups with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeIpGroups 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 *WorkSpaces) DescribeIpGroupsWithContext(ctx aws.Context, input *DescribeIpGroupsInput, opts ...request.Option) (*DescribeIpGroupsOutput, error) { + req, out := c.DescribeIpGroupsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeTags = "DescribeTags" + +// DescribeTagsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeTags 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 DescribeTags for more information on using the DescribeTags +// 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 DescribeTagsRequest method. +// req, resp := client.DescribeTagsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeTags +func (c *WorkSpaces) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) { + op := &request.Operation{ + Name: opDescribeTags, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeTagsInput{} + } + + output = &DescribeTagsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeTags API operation for Amazon WorkSpaces. +// +// Describes the specified tags for the specified WorkSpace. +// +// 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 WorkSpaces's +// API operation DescribeTags for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource could not be found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeTags +func (c *WorkSpaces) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) { + req, out := c.DescribeTagsRequest(input) + return out, req.Send() +} + +// DescribeTagsWithContext is the same as DescribeTags with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeTags 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 *WorkSpaces) DescribeTagsWithContext(ctx aws.Context, input *DescribeTagsInput, opts ...request.Option) (*DescribeTagsOutput, error) { + req, out := c.DescribeTagsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeWorkspaceBundles = "DescribeWorkspaceBundles" + +// DescribeWorkspaceBundlesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeWorkspaceBundles 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 DescribeWorkspaceBundles for more information on using the DescribeWorkspaceBundles +// 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 DescribeWorkspaceBundlesRequest method. +// req, resp := client.DescribeWorkspaceBundlesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspaceBundles +func (c *WorkSpaces) DescribeWorkspaceBundlesRequest(input *DescribeWorkspaceBundlesInput) (req *request.Request, output *DescribeWorkspaceBundlesOutput) { + op := &request.Operation{ + Name: opDescribeWorkspaceBundles, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeWorkspaceBundlesInput{} + } + + output = &DescribeWorkspaceBundlesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeWorkspaceBundles API operation for Amazon WorkSpaces. +// +// Retrieves a list that describes the available WorkSpace bundles. +// +// You can filter the results using either bundle ID or owner, but not both. +// +// 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 WorkSpaces's +// API operation DescribeWorkspaceBundles for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" +// One or more parameter values are not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspaceBundles +func (c *WorkSpaces) DescribeWorkspaceBundles(input *DescribeWorkspaceBundlesInput) (*DescribeWorkspaceBundlesOutput, error) { + req, out := c.DescribeWorkspaceBundlesRequest(input) + return out, req.Send() +} + +// DescribeWorkspaceBundlesWithContext is the same as DescribeWorkspaceBundles with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeWorkspaceBundles 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 *WorkSpaces) DescribeWorkspaceBundlesWithContext(ctx aws.Context, input *DescribeWorkspaceBundlesInput, opts ...request.Option) (*DescribeWorkspaceBundlesOutput, error) { + req, out := c.DescribeWorkspaceBundlesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeWorkspaceBundlesPages iterates over the pages of a DescribeWorkspaceBundles operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeWorkspaceBundles 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 DescribeWorkspaceBundles operation. +// pageNum := 0 +// err := client.DescribeWorkspaceBundlesPages(params, +// func(page *DescribeWorkspaceBundlesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *WorkSpaces) DescribeWorkspaceBundlesPages(input *DescribeWorkspaceBundlesInput, fn func(*DescribeWorkspaceBundlesOutput, bool) bool) error { + return c.DescribeWorkspaceBundlesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeWorkspaceBundlesPagesWithContext same as DescribeWorkspaceBundlesPages 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 *WorkSpaces) DescribeWorkspaceBundlesPagesWithContext(ctx aws.Context, input *DescribeWorkspaceBundlesInput, fn func(*DescribeWorkspaceBundlesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeWorkspaceBundlesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeWorkspaceBundlesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeWorkspaceBundlesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeWorkspaceDirectories = "DescribeWorkspaceDirectories" + +// DescribeWorkspaceDirectoriesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeWorkspaceDirectories 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 DescribeWorkspaceDirectories for more information on using the DescribeWorkspaceDirectories +// 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 DescribeWorkspaceDirectoriesRequest method. +// req, resp := client.DescribeWorkspaceDirectoriesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspaceDirectories +func (c *WorkSpaces) DescribeWorkspaceDirectoriesRequest(input *DescribeWorkspaceDirectoriesInput) (req *request.Request, output *DescribeWorkspaceDirectoriesOutput) { + op := &request.Operation{ + Name: opDescribeWorkspaceDirectories, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeWorkspaceDirectoriesInput{} + } + + output = &DescribeWorkspaceDirectoriesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeWorkspaceDirectories API operation for Amazon WorkSpaces. +// +// Describes the available AWS Directory Service directories that are registered +// with Amazon WorkSpaces. +// +// 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 WorkSpaces's +// API operation DescribeWorkspaceDirectories for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" +// One or more parameter values are not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspaceDirectories +func (c *WorkSpaces) DescribeWorkspaceDirectories(input *DescribeWorkspaceDirectoriesInput) (*DescribeWorkspaceDirectoriesOutput, error) { + req, out := c.DescribeWorkspaceDirectoriesRequest(input) + return out, req.Send() +} + +// DescribeWorkspaceDirectoriesWithContext is the same as DescribeWorkspaceDirectories with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeWorkspaceDirectories 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 *WorkSpaces) DescribeWorkspaceDirectoriesWithContext(ctx aws.Context, input *DescribeWorkspaceDirectoriesInput, opts ...request.Option) (*DescribeWorkspaceDirectoriesOutput, error) { + req, out := c.DescribeWorkspaceDirectoriesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeWorkspaceDirectoriesPages iterates over the pages of a DescribeWorkspaceDirectories operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeWorkspaceDirectories 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 DescribeWorkspaceDirectories operation. +// pageNum := 0 +// err := client.DescribeWorkspaceDirectoriesPages(params, +// func(page *DescribeWorkspaceDirectoriesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *WorkSpaces) DescribeWorkspaceDirectoriesPages(input *DescribeWorkspaceDirectoriesInput, fn func(*DescribeWorkspaceDirectoriesOutput, bool) bool) error { + return c.DescribeWorkspaceDirectoriesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeWorkspaceDirectoriesPagesWithContext same as DescribeWorkspaceDirectoriesPages 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 *WorkSpaces) DescribeWorkspaceDirectoriesPagesWithContext(ctx aws.Context, input *DescribeWorkspaceDirectoriesInput, fn func(*DescribeWorkspaceDirectoriesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeWorkspaceDirectoriesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeWorkspaceDirectoriesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeWorkspaceDirectoriesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeWorkspaceImages = "DescribeWorkspaceImages" + +// DescribeWorkspaceImagesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeWorkspaceImages 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 DescribeWorkspaceImages for more information on using the DescribeWorkspaceImages +// 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 DescribeWorkspaceImagesRequest method. +// req, resp := client.DescribeWorkspaceImagesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspaceImages +func (c *WorkSpaces) DescribeWorkspaceImagesRequest(input *DescribeWorkspaceImagesInput) (req *request.Request, output *DescribeWorkspaceImagesOutput) { + op := &request.Operation{ + Name: opDescribeWorkspaceImages, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeWorkspaceImagesInput{} + } + + output = &DescribeWorkspaceImagesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeWorkspaceImages API operation for Amazon WorkSpaces. +// +// Retrieves a list that describes one or more specified images, if the image +// identifiers are provided. Otherwise, all images in the account are described. +// +// 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 WorkSpaces's +// API operation DescribeWorkspaceImages for usage and error information. +// +// Returned Error Codes: +// * ErrCodeAccessDeniedException "AccessDeniedException" +// The user is not authorized to access a resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspaceImages +func (c *WorkSpaces) DescribeWorkspaceImages(input *DescribeWorkspaceImagesInput) (*DescribeWorkspaceImagesOutput, error) { + req, out := c.DescribeWorkspaceImagesRequest(input) + return out, req.Send() +} + +// DescribeWorkspaceImagesWithContext is the same as DescribeWorkspaceImages with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeWorkspaceImages 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 *WorkSpaces) DescribeWorkspaceImagesWithContext(ctx aws.Context, input *DescribeWorkspaceImagesInput, opts ...request.Option) (*DescribeWorkspaceImagesOutput, error) { + req, out := c.DescribeWorkspaceImagesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDescribeWorkspaces = "DescribeWorkspaces" + +// DescribeWorkspacesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeWorkspaces 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 DescribeWorkspaces for more information on using the DescribeWorkspaces +// 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 DescribeWorkspacesRequest method. +// req, resp := client.DescribeWorkspacesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspaces +func (c *WorkSpaces) DescribeWorkspacesRequest(input *DescribeWorkspacesInput) (req *request.Request, output *DescribeWorkspacesOutput) { + op := &request.Operation{ + Name: opDescribeWorkspaces, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "Limit", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeWorkspacesInput{} + } + + output = &DescribeWorkspacesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeWorkspaces API operation for Amazon WorkSpaces. +// +// Describes the specified WorkSpaces. +// +// You can filter the results by using the bundle identifier, directory identifier, +// or owner, but you can specify only one filter 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 +// the error. +// +// See the AWS API reference guide for Amazon WorkSpaces's +// API operation DescribeWorkspaces for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" +// One or more parameter values are not valid. +// +// * ErrCodeResourceUnavailableException "ResourceUnavailableException" +// The specified resource is not available. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspaces +func (c *WorkSpaces) DescribeWorkspaces(input *DescribeWorkspacesInput) (*DescribeWorkspacesOutput, error) { + req, out := c.DescribeWorkspacesRequest(input) + return out, req.Send() +} + +// DescribeWorkspacesWithContext is the same as DescribeWorkspaces with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeWorkspaces 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 *WorkSpaces) DescribeWorkspacesWithContext(ctx aws.Context, input *DescribeWorkspacesInput, opts ...request.Option) (*DescribeWorkspacesOutput, error) { + req, out := c.DescribeWorkspacesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeWorkspacesPages iterates over the pages of a DescribeWorkspaces operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeWorkspaces 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 DescribeWorkspaces operation. +// pageNum := 0 +// err := client.DescribeWorkspacesPages(params, +// func(page *DescribeWorkspacesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *WorkSpaces) DescribeWorkspacesPages(input *DescribeWorkspacesInput, fn func(*DescribeWorkspacesOutput, bool) bool) error { + return c.DescribeWorkspacesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeWorkspacesPagesWithContext same as DescribeWorkspacesPages 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 *WorkSpaces) DescribeWorkspacesPagesWithContext(ctx aws.Context, input *DescribeWorkspacesInput, fn func(*DescribeWorkspacesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeWorkspacesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeWorkspacesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeWorkspacesOutput), !p.HasNextPage()) + } + return p.Err() +} + +const opDescribeWorkspacesConnectionStatus = "DescribeWorkspacesConnectionStatus" + +// DescribeWorkspacesConnectionStatusRequest generates a "aws/request.Request" representing the +// client's request for the DescribeWorkspacesConnectionStatus 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 DescribeWorkspacesConnectionStatus for more information on using the DescribeWorkspacesConnectionStatus +// 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 DescribeWorkspacesConnectionStatusRequest method. +// req, resp := client.DescribeWorkspacesConnectionStatusRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspacesConnectionStatus +func (c *WorkSpaces) DescribeWorkspacesConnectionStatusRequest(input *DescribeWorkspacesConnectionStatusInput) (req *request.Request, output *DescribeWorkspacesConnectionStatusOutput) { + op := &request.Operation{ + Name: opDescribeWorkspacesConnectionStatus, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeWorkspacesConnectionStatusInput{} + } + + output = &DescribeWorkspacesConnectionStatusOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeWorkspacesConnectionStatus API operation for Amazon WorkSpaces. +// +// Describes the connection status of the specified WorkSpaces. +// +// 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 WorkSpaces's +// API operation DescribeWorkspacesConnectionStatus for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" +// One or more parameter values are not valid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DescribeWorkspacesConnectionStatus +func (c *WorkSpaces) DescribeWorkspacesConnectionStatus(input *DescribeWorkspacesConnectionStatusInput) (*DescribeWorkspacesConnectionStatusOutput, error) { + req, out := c.DescribeWorkspacesConnectionStatusRequest(input) + return out, req.Send() +} + +// DescribeWorkspacesConnectionStatusWithContext is the same as DescribeWorkspacesConnectionStatus with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeWorkspacesConnectionStatus 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 *WorkSpaces) DescribeWorkspacesConnectionStatusWithContext(ctx aws.Context, input *DescribeWorkspacesConnectionStatusInput, opts ...request.Option) (*DescribeWorkspacesConnectionStatusOutput, error) { + req, out := c.DescribeWorkspacesConnectionStatusRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDisassociateIpGroups = "DisassociateIpGroups" + +// DisassociateIpGroupsRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateIpGroups 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 DisassociateIpGroups for more information on using the DisassociateIpGroups +// 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 DisassociateIpGroupsRequest method. +// req, resp := client.DisassociateIpGroupsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DisassociateIpGroups +func (c *WorkSpaces) DisassociateIpGroupsRequest(input *DisassociateIpGroupsInput) (req *request.Request, output *DisassociateIpGroupsOutput) { + op := &request.Operation{ + Name: opDisassociateIpGroups, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisassociateIpGroupsInput{} + } + + output = &DisassociateIpGroupsOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DisassociateIpGroups API operation for Amazon WorkSpaces. +// +// Disassociates the specified IP access control group from the specified directory. +// +// 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 WorkSpaces's +// API operation DisassociateIpGroups for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" +// One or more parameter values are not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource could not be found. +// +// * ErrCodeInvalidResourceStateException "InvalidResourceStateException" +// The state of the resource is not valid for this operation. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// The user is not authorized to access a resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/DisassociateIpGroups +func (c *WorkSpaces) DisassociateIpGroups(input *DisassociateIpGroupsInput) (*DisassociateIpGroupsOutput, error) { + req, out := c.DisassociateIpGroupsRequest(input) + return out, req.Send() +} + +// DisassociateIpGroupsWithContext is the same as DisassociateIpGroups with the addition of +// the ability to pass a context and additional request options. +// +// See DisassociateIpGroups 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 *WorkSpaces) DisassociateIpGroupsWithContext(ctx aws.Context, input *DisassociateIpGroupsInput, opts ...request.Option) (*DisassociateIpGroupsOutput, error) { + req, out := c.DisassociateIpGroupsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opImportWorkspaceImage = "ImportWorkspaceImage" + +// ImportWorkspaceImageRequest generates a "aws/request.Request" representing the +// client's request for the ImportWorkspaceImage 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 ImportWorkspaceImage for more information on using the ImportWorkspaceImage +// 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 ImportWorkspaceImageRequest method. +// req, resp := client.ImportWorkspaceImageRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ImportWorkspaceImage +func (c *WorkSpaces) ImportWorkspaceImageRequest(input *ImportWorkspaceImageInput) (req *request.Request, output *ImportWorkspaceImageOutput) { + op := &request.Operation{ + Name: opImportWorkspaceImage, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ImportWorkspaceImageInput{} + } + + output = &ImportWorkspaceImageOutput{} + req = c.newRequest(op, input, output) + return +} + +// ImportWorkspaceImage API operation for Amazon WorkSpaces. +// +// Imports the specified Windows 7 or Windows 10 bring your own license (BYOL) +// image into Amazon WorkSpaces. The image must be an already licensed EC2 image +// that is in your AWS account, and you must own the image. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon WorkSpaces's +// API operation ImportWorkspaceImage for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException" +// Your resource limits have been exceeded. +// +// * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException" +// The specified resource already exists. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource could not be found. +// +// * ErrCodeOperationNotSupportedException "OperationNotSupportedException" +// This operation is not supported. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// The user is not authorized to access a resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ImportWorkspaceImage +func (c *WorkSpaces) ImportWorkspaceImage(input *ImportWorkspaceImageInput) (*ImportWorkspaceImageOutput, error) { + req, out := c.ImportWorkspaceImageRequest(input) + return out, req.Send() +} + +// ImportWorkspaceImageWithContext is the same as ImportWorkspaceImage with the addition of +// the ability to pass a context and additional request options. +// +// See ImportWorkspaceImage 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 *WorkSpaces) ImportWorkspaceImageWithContext(ctx aws.Context, input *ImportWorkspaceImageInput, opts ...request.Option) (*ImportWorkspaceImageOutput, error) { + req, out := c.ImportWorkspaceImageRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListAvailableManagementCidrRanges = "ListAvailableManagementCidrRanges" + +// ListAvailableManagementCidrRangesRequest generates a "aws/request.Request" representing the +// client's request for the ListAvailableManagementCidrRanges 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 ListAvailableManagementCidrRanges for more information on using the ListAvailableManagementCidrRanges +// 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 ListAvailableManagementCidrRangesRequest method. +// req, resp := client.ListAvailableManagementCidrRangesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ListAvailableManagementCidrRanges +func (c *WorkSpaces) ListAvailableManagementCidrRangesRequest(input *ListAvailableManagementCidrRangesInput) (req *request.Request, output *ListAvailableManagementCidrRangesOutput) { + op := &request.Operation{ + Name: opListAvailableManagementCidrRanges, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListAvailableManagementCidrRangesInput{} + } + + output = &ListAvailableManagementCidrRangesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListAvailableManagementCidrRanges API operation for Amazon WorkSpaces. +// +// Retrieves a list of IP address ranges, specified as IPv4 CIDR blocks, that +// you can use for the network management interface when you enable bring your +// own license (BYOL). +// +// The management network interface is connected to a secure Amazon WorkSpaces +// management network. It is used for interactive streaming of the WorkSpace +// desktop to Amazon WorkSpaces clients, and to allow Amazon WorkSpaces to manage +// the WorkSpace. +// +// 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 WorkSpaces's +// API operation ListAvailableManagementCidrRanges for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" +// One or more parameter values are not valid. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// The user is not authorized to access a resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ListAvailableManagementCidrRanges +func (c *WorkSpaces) ListAvailableManagementCidrRanges(input *ListAvailableManagementCidrRangesInput) (*ListAvailableManagementCidrRangesOutput, error) { + req, out := c.ListAvailableManagementCidrRangesRequest(input) + return out, req.Send() +} + +// ListAvailableManagementCidrRangesWithContext is the same as ListAvailableManagementCidrRanges with the addition of +// the ability to pass a context and additional request options. +// +// See ListAvailableManagementCidrRanges 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 *WorkSpaces) ListAvailableManagementCidrRangesWithContext(ctx aws.Context, input *ListAvailableManagementCidrRangesInput, opts ...request.Option) (*ListAvailableManagementCidrRangesOutput, error) { + req, out := c.ListAvailableManagementCidrRangesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opModifyAccount = "ModifyAccount" + +// ModifyAccountRequest generates a "aws/request.Request" representing the +// client's request for the ModifyAccount 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 ModifyAccount for more information on using the ModifyAccount +// 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 ModifyAccountRequest method. +// req, resp := client.ModifyAccountRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ModifyAccount +func (c *WorkSpaces) ModifyAccountRequest(input *ModifyAccountInput) (req *request.Request, output *ModifyAccountOutput) { + op := &request.Operation{ + Name: opModifyAccount, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyAccountInput{} + } + + output = &ModifyAccountOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// ModifyAccount API operation for Amazon WorkSpaces. +// +// Modifies the configuration of bring your own license (BYOL) for the specified +// 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 Amazon WorkSpaces's +// API operation ModifyAccount for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" +// One or more parameter values are not valid. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// The user is not authorized to access a resource. +// +// * ErrCodeInvalidResourceStateException "InvalidResourceStateException" +// The state of the resource is not valid for this operation. +// +// * ErrCodeResourceUnavailableException "ResourceUnavailableException" +// The specified resource is not available. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource could not be found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ModifyAccount +func (c *WorkSpaces) ModifyAccount(input *ModifyAccountInput) (*ModifyAccountOutput, error) { + req, out := c.ModifyAccountRequest(input) + return out, req.Send() +} + +// ModifyAccountWithContext is the same as ModifyAccount with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyAccount 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 *WorkSpaces) ModifyAccountWithContext(ctx aws.Context, input *ModifyAccountInput, opts ...request.Option) (*ModifyAccountOutput, error) { + req, out := c.ModifyAccountRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opModifyClientProperties = "ModifyClientProperties" + +// ModifyClientPropertiesRequest generates a "aws/request.Request" representing the +// client's request for the ModifyClientProperties 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 ModifyClientProperties for more information on using the ModifyClientProperties +// 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 ModifyClientPropertiesRequest method. +// req, resp := client.ModifyClientPropertiesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ModifyClientProperties +func (c *WorkSpaces) ModifyClientPropertiesRequest(input *ModifyClientPropertiesInput) (req *request.Request, output *ModifyClientPropertiesOutput) { + op := &request.Operation{ + Name: opModifyClientProperties, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyClientPropertiesInput{} + } + + output = &ModifyClientPropertiesOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// ModifyClientProperties API operation for Amazon WorkSpaces. +// +// Modifies the properties of the specified Amazon WorkSpaces client. +// +// 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 WorkSpaces's +// API operation ModifyClientProperties for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" +// One or more parameter values are not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource could not be found. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// The user is not authorized to access a resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ModifyClientProperties +func (c *WorkSpaces) ModifyClientProperties(input *ModifyClientPropertiesInput) (*ModifyClientPropertiesOutput, error) { + req, out := c.ModifyClientPropertiesRequest(input) + return out, req.Send() +} + +// ModifyClientPropertiesWithContext is the same as ModifyClientProperties with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyClientProperties 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 *WorkSpaces) ModifyClientPropertiesWithContext(ctx aws.Context, input *ModifyClientPropertiesInput, opts ...request.Option) (*ModifyClientPropertiesOutput, error) { + req, out := c.ModifyClientPropertiesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opModifyWorkspaceProperties = "ModifyWorkspaceProperties" + +// ModifyWorkspacePropertiesRequest generates a "aws/request.Request" representing the +// client's request for the ModifyWorkspaceProperties 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 ModifyWorkspaceProperties for more information on using the ModifyWorkspaceProperties +// 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 ModifyWorkspacePropertiesRequest method. +// req, resp := client.ModifyWorkspacePropertiesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ModifyWorkspaceProperties +func (c *WorkSpaces) ModifyWorkspacePropertiesRequest(input *ModifyWorkspacePropertiesInput) (req *request.Request, output *ModifyWorkspacePropertiesOutput) { + op := &request.Operation{ + Name: opModifyWorkspaceProperties, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyWorkspacePropertiesInput{} + } + + output = &ModifyWorkspacePropertiesOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// ModifyWorkspaceProperties API operation for Amazon WorkSpaces. +// +// Modifies the specified WorkSpace properties. +// +// 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 WorkSpaces's +// API operation ModifyWorkspaceProperties for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" +// One or more parameter values are not valid. +// +// * ErrCodeInvalidResourceStateException "InvalidResourceStateException" +// The state of the resource is not valid for this operation. +// +// * ErrCodeOperationInProgressException "OperationInProgressException" +// The properties of this WorkSpace are currently being modified. Try again +// in a moment. +// +// * ErrCodeUnsupportedWorkspaceConfigurationException "UnsupportedWorkspaceConfigurationException" +// The configuration of this WorkSpace is not supported for this operation. +// For more information, see the Amazon WorkSpaces Administration Guide (http://docs.aws.amazon.com/workspaces/latest/adminguide/). +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource could not be found. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// The user is not authorized to access a resource. +// +// * ErrCodeResourceUnavailableException "ResourceUnavailableException" +// The specified resource is not available. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ModifyWorkspaceProperties +func (c *WorkSpaces) ModifyWorkspaceProperties(input *ModifyWorkspacePropertiesInput) (*ModifyWorkspacePropertiesOutput, error) { + req, out := c.ModifyWorkspacePropertiesRequest(input) + return out, req.Send() +} + +// ModifyWorkspacePropertiesWithContext is the same as ModifyWorkspaceProperties with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyWorkspaceProperties 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 *WorkSpaces) ModifyWorkspacePropertiesWithContext(ctx aws.Context, input *ModifyWorkspacePropertiesInput, opts ...request.Option) (*ModifyWorkspacePropertiesOutput, error) { + req, out := c.ModifyWorkspacePropertiesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opModifyWorkspaceState = "ModifyWorkspaceState" + +// ModifyWorkspaceStateRequest generates a "aws/request.Request" representing the +// client's request for the ModifyWorkspaceState 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 ModifyWorkspaceState for more information on using the ModifyWorkspaceState +// 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 ModifyWorkspaceStateRequest method. +// req, resp := client.ModifyWorkspaceStateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ModifyWorkspaceState +func (c *WorkSpaces) ModifyWorkspaceStateRequest(input *ModifyWorkspaceStateInput) (req *request.Request, output *ModifyWorkspaceStateOutput) { + op := &request.Operation{ + Name: opModifyWorkspaceState, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyWorkspaceStateInput{} + } + + output = &ModifyWorkspaceStateOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// ModifyWorkspaceState API operation for Amazon WorkSpaces. +// +// Sets the state of the specified WorkSpace. +// +// To maintain a WorkSpace without being interrupted, set the WorkSpace state +// to ADMIN_MAINTENANCE. WorkSpaces in this state do not respond to requests +// to reboot, stop, start, or rebuild. An AutoStop WorkSpace in this state is +// not stopped. Users can log into a WorkSpace in the ADMIN_MAINTENANCE state. +// +// 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 WorkSpaces's +// API operation ModifyWorkspaceState for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" +// One or more parameter values are not valid. +// +// * ErrCodeInvalidResourceStateException "InvalidResourceStateException" +// The state of the resource is not valid for this operation. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource could not be found. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ModifyWorkspaceState +func (c *WorkSpaces) ModifyWorkspaceState(input *ModifyWorkspaceStateInput) (*ModifyWorkspaceStateOutput, error) { + req, out := c.ModifyWorkspaceStateRequest(input) + return out, req.Send() +} + +// ModifyWorkspaceStateWithContext is the same as ModifyWorkspaceState with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyWorkspaceState 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 *WorkSpaces) ModifyWorkspaceStateWithContext(ctx aws.Context, input *ModifyWorkspaceStateInput, opts ...request.Option) (*ModifyWorkspaceStateOutput, error) { + req, out := c.ModifyWorkspaceStateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRebootWorkspaces = "RebootWorkspaces" + +// RebootWorkspacesRequest generates a "aws/request.Request" representing the +// client's request for the RebootWorkspaces 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 RebootWorkspaces for more information on using the RebootWorkspaces +// 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 RebootWorkspacesRequest method. +// req, resp := client.RebootWorkspacesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/RebootWorkspaces +func (c *WorkSpaces) RebootWorkspacesRequest(input *RebootWorkspacesInput) (req *request.Request, output *RebootWorkspacesOutput) { + op := &request.Operation{ + Name: opRebootWorkspaces, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RebootWorkspacesInput{} + } + + output = &RebootWorkspacesOutput{} + req = c.newRequest(op, input, output) + return +} + +// RebootWorkspaces API operation for Amazon WorkSpaces. +// +// Reboots the specified WorkSpaces. +// +// You cannot reboot a WorkSpace unless its state is AVAILABLE or UNHEALTHY. +// +// This operation is asynchronous and returns before the WorkSpaces have rebooted. +// +// 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 WorkSpaces's +// API operation RebootWorkspaces for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/RebootWorkspaces +func (c *WorkSpaces) RebootWorkspaces(input *RebootWorkspacesInput) (*RebootWorkspacesOutput, error) { + req, out := c.RebootWorkspacesRequest(input) + return out, req.Send() +} + +// RebootWorkspacesWithContext is the same as RebootWorkspaces with the addition of +// the ability to pass a context and additional request options. +// +// See RebootWorkspaces 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 *WorkSpaces) RebootWorkspacesWithContext(ctx aws.Context, input *RebootWorkspacesInput, opts ...request.Option) (*RebootWorkspacesOutput, error) { + req, out := c.RebootWorkspacesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRebuildWorkspaces = "RebuildWorkspaces" + +// RebuildWorkspacesRequest generates a "aws/request.Request" representing the +// client's request for the RebuildWorkspaces 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 RebuildWorkspaces for more information on using the RebuildWorkspaces +// 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 RebuildWorkspacesRequest method. +// req, resp := client.RebuildWorkspacesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/RebuildWorkspaces +func (c *WorkSpaces) RebuildWorkspacesRequest(input *RebuildWorkspacesInput) (req *request.Request, output *RebuildWorkspacesOutput) { + op := &request.Operation{ + Name: opRebuildWorkspaces, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RebuildWorkspacesInput{} + } + + output = &RebuildWorkspacesOutput{} + req = c.newRequest(op, input, output) + return +} + +// RebuildWorkspaces API operation for Amazon WorkSpaces. +// +// Rebuilds the specified WorkSpace. +// +// You cannot rebuild a WorkSpace unless its state is AVAILABLE, ERROR, or UNHEALTHY. +// +// Rebuilding a WorkSpace is a potentially destructive action that can result +// in the loss of data. For more information, see Rebuild a WorkSpace (http://docs.aws.amazon.com/workspaces/latest/adminguide/reset-workspace.html). +// +// This operation is asynchronous and returns before the WorkSpaces have been +// completely rebuilt. +// +// 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 WorkSpaces's +// API operation RebuildWorkspaces for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/RebuildWorkspaces +func (c *WorkSpaces) RebuildWorkspaces(input *RebuildWorkspacesInput) (*RebuildWorkspacesOutput, error) { + req, out := c.RebuildWorkspacesRequest(input) + return out, req.Send() +} + +// RebuildWorkspacesWithContext is the same as RebuildWorkspaces with the addition of +// the ability to pass a context and additional request options. +// +// See RebuildWorkspaces 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 *WorkSpaces) RebuildWorkspacesWithContext(ctx aws.Context, input *RebuildWorkspacesInput, opts ...request.Option) (*RebuildWorkspacesOutput, error) { + req, out := c.RebuildWorkspacesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRevokeIpRules = "RevokeIpRules" + +// RevokeIpRulesRequest generates a "aws/request.Request" representing the +// client's request for the RevokeIpRules 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 RevokeIpRules for more information on using the RevokeIpRules +// 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 RevokeIpRulesRequest method. +// req, resp := client.RevokeIpRulesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/RevokeIpRules +func (c *WorkSpaces) RevokeIpRulesRequest(input *RevokeIpRulesInput) (req *request.Request, output *RevokeIpRulesOutput) { + op := &request.Operation{ + Name: opRevokeIpRules, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RevokeIpRulesInput{} + } + + output = &RevokeIpRulesOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// RevokeIpRules API operation for Amazon WorkSpaces. +// +// Removes one or more rules from the specified IP access control 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 WorkSpaces's +// API operation RevokeIpRules for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" +// One or more parameter values are not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource could not be found. +// +// * ErrCodeInvalidResourceStateException "InvalidResourceStateException" +// The state of the resource is not valid for this operation. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// The user is not authorized to access a resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/RevokeIpRules +func (c *WorkSpaces) RevokeIpRules(input *RevokeIpRulesInput) (*RevokeIpRulesOutput, error) { + req, out := c.RevokeIpRulesRequest(input) + return out, req.Send() +} + +// RevokeIpRulesWithContext is the same as RevokeIpRules with the addition of +// the ability to pass a context and additional request options. +// +// See RevokeIpRules 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 *WorkSpaces) RevokeIpRulesWithContext(ctx aws.Context, input *RevokeIpRulesInput, opts ...request.Option) (*RevokeIpRulesOutput, error) { + req, out := c.RevokeIpRulesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStartWorkspaces = "StartWorkspaces" + +// StartWorkspacesRequest generates a "aws/request.Request" representing the +// client's request for the StartWorkspaces 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 StartWorkspaces for more information on using the StartWorkspaces +// 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 StartWorkspacesRequest method. +// req, resp := client.StartWorkspacesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/StartWorkspaces +func (c *WorkSpaces) StartWorkspacesRequest(input *StartWorkspacesInput) (req *request.Request, output *StartWorkspacesOutput) { + op := &request.Operation{ + Name: opStartWorkspaces, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartWorkspacesInput{} + } + + output = &StartWorkspacesOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartWorkspaces API operation for Amazon WorkSpaces. +// +// Starts the specified WorkSpaces. +// +// You cannot start a WorkSpace unless it has a running mode of AutoStop and +// a state of STOPPED. +// +// 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 WorkSpaces's +// API operation StartWorkspaces for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/StartWorkspaces +func (c *WorkSpaces) StartWorkspaces(input *StartWorkspacesInput) (*StartWorkspacesOutput, error) { + req, out := c.StartWorkspacesRequest(input) + return out, req.Send() +} + +// StartWorkspacesWithContext is the same as StartWorkspaces with the addition of +// the ability to pass a context and additional request options. +// +// See StartWorkspaces 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 *WorkSpaces) StartWorkspacesWithContext(ctx aws.Context, input *StartWorkspacesInput, opts ...request.Option) (*StartWorkspacesOutput, error) { + req, out := c.StartWorkspacesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStopWorkspaces = "StopWorkspaces" + +// StopWorkspacesRequest generates a "aws/request.Request" representing the +// client's request for the StopWorkspaces 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 StopWorkspaces for more information on using the StopWorkspaces +// 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 StopWorkspacesRequest method. +// req, resp := client.StopWorkspacesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/StopWorkspaces +func (c *WorkSpaces) StopWorkspacesRequest(input *StopWorkspacesInput) (req *request.Request, output *StopWorkspacesOutput) { + op := &request.Operation{ + Name: opStopWorkspaces, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StopWorkspacesInput{} + } + + output = &StopWorkspacesOutput{} + req = c.newRequest(op, input, output) + return +} + +// StopWorkspaces API operation for Amazon WorkSpaces. +// +// Stops the specified WorkSpaces. +// +// You cannot stop a WorkSpace unless it has a running mode of AutoStop and +// a state of AVAILABLE, IMPAIRED, UNHEALTHY, or ERROR. +// +// 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 WorkSpaces's +// API operation StopWorkspaces for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/StopWorkspaces +func (c *WorkSpaces) StopWorkspaces(input *StopWorkspacesInput) (*StopWorkspacesOutput, error) { + req, out := c.StopWorkspacesRequest(input) + return out, req.Send() +} + +// StopWorkspacesWithContext is the same as StopWorkspaces with the addition of +// the ability to pass a context and additional request options. +// +// See StopWorkspaces 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 *WorkSpaces) StopWorkspacesWithContext(ctx aws.Context, input *StopWorkspacesInput, opts ...request.Option) (*StopWorkspacesOutput, error) { + req, out := c.StopWorkspacesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTerminateWorkspaces = "TerminateWorkspaces" + +// TerminateWorkspacesRequest generates a "aws/request.Request" representing the +// client's request for the TerminateWorkspaces 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 TerminateWorkspaces for more information on using the TerminateWorkspaces +// 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 TerminateWorkspacesRequest method. +// req, resp := client.TerminateWorkspacesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/TerminateWorkspaces +func (c *WorkSpaces) TerminateWorkspacesRequest(input *TerminateWorkspacesInput) (req *request.Request, output *TerminateWorkspacesOutput) { + op := &request.Operation{ + Name: opTerminateWorkspaces, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TerminateWorkspacesInput{} + } + + output = &TerminateWorkspacesOutput{} + req = c.newRequest(op, input, output) + return +} + +// TerminateWorkspaces API operation for Amazon WorkSpaces. +// +// Terminates the specified WorkSpaces. +// +// Terminating a WorkSpace is a permanent action and cannot be undone. The user's +// data is destroyed. If you need to archive any user data, contact Amazon Web +// Services before terminating the WorkSpace. +// +// You can terminate a WorkSpace that is in any state except SUSPENDED. +// +// This operation is asynchronous and returns before the WorkSpaces have been +// completely terminated. +// +// 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 WorkSpaces's +// API operation TerminateWorkspaces for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/TerminateWorkspaces +func (c *WorkSpaces) TerminateWorkspaces(input *TerminateWorkspacesInput) (*TerminateWorkspacesOutput, error) { + req, out := c.TerminateWorkspacesRequest(input) + return out, req.Send() +} + +// TerminateWorkspacesWithContext is the same as TerminateWorkspaces with the addition of +// the ability to pass a context and additional request options. +// +// See TerminateWorkspaces 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 *WorkSpaces) TerminateWorkspacesWithContext(ctx aws.Context, input *TerminateWorkspacesInput, opts ...request.Option) (*TerminateWorkspacesOutput, error) { + req, out := c.TerminateWorkspacesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUpdateRulesOfIpGroup = "UpdateRulesOfIpGroup" + +// UpdateRulesOfIpGroupRequest generates a "aws/request.Request" representing the +// client's request for the UpdateRulesOfIpGroup 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 UpdateRulesOfIpGroup for more information on using the UpdateRulesOfIpGroup +// 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 UpdateRulesOfIpGroupRequest method. +// req, resp := client.UpdateRulesOfIpGroupRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/UpdateRulesOfIpGroup +func (c *WorkSpaces) UpdateRulesOfIpGroupRequest(input *UpdateRulesOfIpGroupInput) (req *request.Request, output *UpdateRulesOfIpGroupOutput) { + op := &request.Operation{ + Name: opUpdateRulesOfIpGroup, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdateRulesOfIpGroupInput{} + } + + output = &UpdateRulesOfIpGroupOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdateRulesOfIpGroup API operation for Amazon WorkSpaces. +// +// Replaces the current rules of the specified IP access control group with +// the specified 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 WorkSpaces's +// API operation UpdateRulesOfIpGroup for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidParameterValuesException "InvalidParameterValuesException" +// One or more parameter values are not valid. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource could not be found. +// +// * ErrCodeResourceLimitExceededException "ResourceLimitExceededException" +// Your resource limits have been exceeded. +// +// * ErrCodeInvalidResourceStateException "InvalidResourceStateException" +// The state of the resource is not valid for this operation. +// +// * ErrCodeAccessDeniedException "AccessDeniedException" +// The user is not authorized to access a resource. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/UpdateRulesOfIpGroup +func (c *WorkSpaces) UpdateRulesOfIpGroup(input *UpdateRulesOfIpGroupInput) (*UpdateRulesOfIpGroupOutput, error) { + req, out := c.UpdateRulesOfIpGroupRequest(input) + return out, req.Send() +} + +// UpdateRulesOfIpGroupWithContext is the same as UpdateRulesOfIpGroup with the addition of +// the ability to pass a context and additional request options. +// +// See UpdateRulesOfIpGroup 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 *WorkSpaces) UpdateRulesOfIpGroupWithContext(ctx aws.Context, input *UpdateRulesOfIpGroupInput, opts ...request.Option) (*UpdateRulesOfIpGroupOutput, error) { + req, out := c.UpdateRulesOfIpGroupRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// Describes a modification to the configuration of bring your own license (BYOL) +// for the specified account. +type AccountModification struct { + _ struct{} `type:"structure"` + + // The IP address range, specified as an IPv4 CIDR block, for the management + // network interface used for the account. + DedicatedTenancyManagementCidrRange *string `type:"string"` + + // The status of BYOL (whether BYOL is being enabled or disabled). + DedicatedTenancySupport *string `type:"string" enum:"DedicatedTenancySupportResultEnum"` + + // The error code that is returned if the configuration of BYOL cannot be modified. + ErrorCode *string `type:"string"` + + // The text of the error message that is returned if the configuration of BYOL + // cannot be modified. + ErrorMessage *string `type:"string"` + + // The state of the modification to the configuration of BYOL. + ModificationState *string `type:"string" enum:"DedicatedTenancyModificationStateEnum"` + + // The timestamp when the modification of the BYOL configuration was started. + StartTime *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s AccountModification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AccountModification) GoString() string { + return s.String() +} + +// SetDedicatedTenancyManagementCidrRange sets the DedicatedTenancyManagementCidrRange field's value. +func (s *AccountModification) SetDedicatedTenancyManagementCidrRange(v string) *AccountModification { + s.DedicatedTenancyManagementCidrRange = &v + return s +} + +// SetDedicatedTenancySupport sets the DedicatedTenancySupport field's value. +func (s *AccountModification) SetDedicatedTenancySupport(v string) *AccountModification { + s.DedicatedTenancySupport = &v + return s +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *AccountModification) SetErrorCode(v string) *AccountModification { + s.ErrorCode = &v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *AccountModification) SetErrorMessage(v string) *AccountModification { + s.ErrorMessage = &v + return s +} + +// SetModificationState sets the ModificationState field's value. +func (s *AccountModification) SetModificationState(v string) *AccountModification { + s.ModificationState = &v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *AccountModification) SetStartTime(v time.Time) *AccountModification { + s.StartTime = &v + return s +} + +type AssociateIpGroupsInput struct { + _ struct{} `type:"structure"` + + // The identifier of the directory. + // + // DirectoryId is a required field + DirectoryId *string `type:"string" required:"true"` + + // The identifiers of one or more IP access control groups. + // + // GroupIds is a required field + GroupIds []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s AssociateIpGroupsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateIpGroupsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateIpGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateIpGroupsInput"} + if s.DirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectoryId")) + } + if s.GroupIds == nil { + invalidParams.Add(request.NewErrParamRequired("GroupIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDirectoryId sets the DirectoryId field's value. +func (s *AssociateIpGroupsInput) SetDirectoryId(v string) *AssociateIpGroupsInput { + s.DirectoryId = &v + return s +} + +// SetGroupIds sets the GroupIds field's value. +func (s *AssociateIpGroupsInput) SetGroupIds(v []*string) *AssociateIpGroupsInput { + s.GroupIds = v + return s +} + +type AssociateIpGroupsOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AssociateIpGroupsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateIpGroupsOutput) GoString() string { + return s.String() +} + +type AuthorizeIpRulesInput struct { + _ struct{} `type:"structure"` + + // The identifier of the group. + // + // GroupId is a required field + GroupId *string `type:"string" required:"true"` + + // The rules to add to the group. + // + // UserRules is a required field + UserRules []*IpRuleItem `type:"list" required:"true"` +} + +// String returns the string representation +func (s AuthorizeIpRulesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AuthorizeIpRulesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AuthorizeIpRulesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AuthorizeIpRulesInput"} + if s.GroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupId")) + } + if s.UserRules == nil { + invalidParams.Add(request.NewErrParamRequired("UserRules")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroupId sets the GroupId field's value. +func (s *AuthorizeIpRulesInput) SetGroupId(v string) *AuthorizeIpRulesInput { + s.GroupId = &v + return s +} + +// SetUserRules sets the UserRules field's value. +func (s *AuthorizeIpRulesInput) SetUserRules(v []*IpRuleItem) *AuthorizeIpRulesInput { + s.UserRules = v + return s +} + +type AuthorizeIpRulesOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s AuthorizeIpRulesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AuthorizeIpRulesOutput) GoString() string { + return s.String() +} + +// Describes an Amazon WorkSpaces client. +type ClientProperties struct { + _ struct{} `type:"structure"` + + // Specifies whether users can cache their credentials on the Amazon WorkSpaces + // client. When enabled, users can choose to reconnect to their WorkSpaces without + // re-entering their credentials. + ReconnectEnabled *string `type:"string" enum:"ReconnectEnum"` +} + +// String returns the string representation +func (s ClientProperties) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ClientProperties) GoString() string { + return s.String() +} + +// SetReconnectEnabled sets the ReconnectEnabled field's value. +func (s *ClientProperties) SetReconnectEnabled(v string) *ClientProperties { + s.ReconnectEnabled = &v + return s +} + +// Information about the Amazon WorkSpaces client. +type ClientPropertiesResult struct { + _ struct{} `type:"structure"` + + // Information about the Amazon WorkSpaces client. + ClientProperties *ClientProperties `type:"structure"` + + // The resource identifier, in the form of a directory ID. + ResourceId *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ClientPropertiesResult) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ClientPropertiesResult) GoString() string { + return s.String() +} + +// SetClientProperties sets the ClientProperties field's value. +func (s *ClientPropertiesResult) SetClientProperties(v *ClientProperties) *ClientPropertiesResult { + s.ClientProperties = v + return s +} + +// SetResourceId sets the ResourceId field's value. +func (s *ClientPropertiesResult) SetResourceId(v string) *ClientPropertiesResult { + s.ResourceId = &v + return s +} + +// Describes the compute type. +type ComputeType struct { + _ struct{} `type:"structure"` + + // The compute type. + Name *string `type:"string" enum:"Compute"` +} + +// String returns the string representation +func (s ComputeType) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ComputeType) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *ComputeType) SetName(v string) *ComputeType { + s.Name = &v + return s +} + +type CreateIpGroupInput struct { + _ struct{} `type:"structure"` + + // The description of the group. + GroupDesc *string `type:"string"` + + // The name of the group. + // + // GroupName is a required field + GroupName *string `type:"string" required:"true"` + + // The rules to add to the group. + UserRules []*IpRuleItem `type:"list"` +} + +// String returns the string representation +func (s CreateIpGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateIpGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateIpGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateIpGroupInput"} + if s.GroupName == nil { + invalidParams.Add(request.NewErrParamRequired("GroupName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroupDesc sets the GroupDesc field's value. +func (s *CreateIpGroupInput) SetGroupDesc(v string) *CreateIpGroupInput { + s.GroupDesc = &v + return s +} + +// SetGroupName sets the GroupName field's value. +func (s *CreateIpGroupInput) SetGroupName(v string) *CreateIpGroupInput { + s.GroupName = &v + return s +} + +// SetUserRules sets the UserRules field's value. +func (s *CreateIpGroupInput) SetUserRules(v []*IpRuleItem) *CreateIpGroupInput { + s.UserRules = v + return s +} + +type CreateIpGroupOutput struct { + _ struct{} `type:"structure"` + + // The identifier of the group. + GroupId *string `type:"string"` +} + +// String returns the string representation +func (s CreateIpGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateIpGroupOutput) GoString() string { + return s.String() +} + +// SetGroupId sets the GroupId field's value. +func (s *CreateIpGroupOutput) SetGroupId(v string) *CreateIpGroupOutput { + s.GroupId = &v + return s +} + +type CreateTagsInput struct { + _ struct{} `type:"structure"` + + // The identifier of the WorkSpace. To find this ID, use DescribeWorkspaces. + // + // ResourceId is a required field + ResourceId *string `min:"1" type:"string" required:"true"` + + // The tags. Each WorkSpace can have a maximum of 50 tags. + // + // Tags is a required field + Tags []*Tag `type:"list" required:"true"` +} + +// String returns the string representation +func (s CreateTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTagsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTagsInput"} + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + 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 +} + +// SetResourceId sets the ResourceId field's value. +func (s *CreateTagsInput) SetResourceId(v string) *CreateTagsInput { + s.ResourceId = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *CreateTagsInput) SetTags(v []*Tag) *CreateTagsInput { + s.Tags = v + return s +} + +type CreateTagsOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s CreateTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTagsOutput) GoString() string { + return s.String() +} + +type CreateWorkspacesInput struct { + _ struct{} `type:"structure"` + + // The WorkSpaces to create. You can specify up to 25 WorkSpaces. + // + // Workspaces is a required field + Workspaces []*WorkspaceRequest `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s CreateWorkspacesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateWorkspacesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateWorkspacesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateWorkspacesInput"} + if s.Workspaces == nil { + invalidParams.Add(request.NewErrParamRequired("Workspaces")) + } + if s.Workspaces != nil && len(s.Workspaces) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Workspaces", 1)) + } + if s.Workspaces != nil { + for i, v := range s.Workspaces { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Workspaces", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetWorkspaces sets the Workspaces field's value. +func (s *CreateWorkspacesInput) SetWorkspaces(v []*WorkspaceRequest) *CreateWorkspacesInput { + s.Workspaces = v + return s +} + +type CreateWorkspacesOutput struct { + _ struct{} `type:"structure"` + + // Information about the WorkSpaces that could not be created. + FailedRequests []*FailedCreateWorkspaceRequest `type:"list"` + + // Information about the WorkSpaces that were created. + // + // Because this operation is asynchronous, the identifier returned is not immediately + // available for use with other operations. For example, if you call DescribeWorkspaces + // before the WorkSpace is created, the information returned can be incomplete. + PendingRequests []*Workspace `type:"list"` +} + +// String returns the string representation +func (s CreateWorkspacesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateWorkspacesOutput) GoString() string { + return s.String() +} + +// SetFailedRequests sets the FailedRequests field's value. +func (s *CreateWorkspacesOutput) SetFailedRequests(v []*FailedCreateWorkspaceRequest) *CreateWorkspacesOutput { + s.FailedRequests = v + return s +} + +// SetPendingRequests sets the PendingRequests field's value. +func (s *CreateWorkspacesOutput) SetPendingRequests(v []*Workspace) *CreateWorkspacesOutput { + s.PendingRequests = v + return s +} + +// Describes the default values used to create a WorkSpace. +type DefaultWorkspaceCreationProperties struct { + _ struct{} `type:"structure"` + + // The identifier of any security groups to apply to WorkSpaces when they are + // created. + CustomSecurityGroupId *string `type:"string"` + + // The organizational unit (OU) in the directory for the WorkSpace machine accounts. + DefaultOu *string `type:"string"` + + // The public IP address to attach to all WorkSpaces that are created or rebuilt. + EnableInternetAccess *bool `type:"boolean"` + + // Specifies whether the directory is enabled for Amazon WorkDocs. + EnableWorkDocs *bool `type:"boolean"` + + // Specifies whether the WorkSpace user is an administrator on the WorkSpace. + UserEnabledAsLocalAdministrator *bool `type:"boolean"` +} + +// String returns the string representation +func (s DefaultWorkspaceCreationProperties) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DefaultWorkspaceCreationProperties) GoString() string { + return s.String() +} + +// SetCustomSecurityGroupId sets the CustomSecurityGroupId field's value. +func (s *DefaultWorkspaceCreationProperties) SetCustomSecurityGroupId(v string) *DefaultWorkspaceCreationProperties { + s.CustomSecurityGroupId = &v + return s +} + +// SetDefaultOu sets the DefaultOu field's value. +func (s *DefaultWorkspaceCreationProperties) SetDefaultOu(v string) *DefaultWorkspaceCreationProperties { + s.DefaultOu = &v + return s +} + +// SetEnableInternetAccess sets the EnableInternetAccess field's value. +func (s *DefaultWorkspaceCreationProperties) SetEnableInternetAccess(v bool) *DefaultWorkspaceCreationProperties { + s.EnableInternetAccess = &v + return s +} + +// SetEnableWorkDocs sets the EnableWorkDocs field's value. +func (s *DefaultWorkspaceCreationProperties) SetEnableWorkDocs(v bool) *DefaultWorkspaceCreationProperties { + s.EnableWorkDocs = &v + return s +} + +// SetUserEnabledAsLocalAdministrator sets the UserEnabledAsLocalAdministrator field's value. +func (s *DefaultWorkspaceCreationProperties) SetUserEnabledAsLocalAdministrator(v bool) *DefaultWorkspaceCreationProperties { + s.UserEnabledAsLocalAdministrator = &v + return s +} + +type DeleteIpGroupInput struct { + _ struct{} `type:"structure"` + + // The identifier of the IP access control group. + // + // GroupId is a required field + GroupId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteIpGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteIpGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteIpGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteIpGroupInput"} + if s.GroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroupId sets the GroupId field's value. +func (s *DeleteIpGroupInput) SetGroupId(v string) *DeleteIpGroupInput { + s.GroupId = &v + return s +} + +type DeleteIpGroupOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteIpGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteIpGroupOutput) GoString() string { + return s.String() +} + +type DeleteTagsInput struct { + _ struct{} `type:"structure"` + + // The identifier of the WorkSpace. To find this ID, use DescribeWorkspaces. + // + // ResourceId is a required field + ResourceId *string `min:"1" type:"string" required:"true"` + + // The tag keys. + // + // TagKeys is a required field + TagKeys []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s DeleteTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTagsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTagsInput"} + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceId sets the ResourceId field's value. +func (s *DeleteTagsInput) SetResourceId(v string) *DeleteTagsInput { + s.ResourceId = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *DeleteTagsInput) SetTagKeys(v []*string) *DeleteTagsInput { + s.TagKeys = v + return s +} + +type DeleteTagsOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTagsOutput) GoString() string { + return s.String() +} + +type DeleteWorkspaceImageInput struct { + _ struct{} `type:"structure"` + + // The identifier of the image. + // + // ImageId is a required field + ImageId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteWorkspaceImageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteWorkspaceImageInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteWorkspaceImageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteWorkspaceImageInput"} + if s.ImageId == nil { + invalidParams.Add(request.NewErrParamRequired("ImageId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetImageId sets the ImageId field's value. +func (s *DeleteWorkspaceImageInput) SetImageId(v string) *DeleteWorkspaceImageInput { + s.ImageId = &v + return s +} + +type DeleteWorkspaceImageOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteWorkspaceImageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteWorkspaceImageOutput) GoString() string { + return s.String() +} + +type DescribeAccountInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DescribeAccountInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAccountInput) GoString() string { + return s.String() +} + +type DescribeAccountModificationsInput struct { + _ struct{} `type:"structure"` + + // If you received a NextToken from a previous call that was paginated, provide + // this token to receive the next set of results. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeAccountModificationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAccountModificationsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeAccountModificationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeAccountModificationsInput"} + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeAccountModificationsInput) SetNextToken(v string) *DescribeAccountModificationsInput { + s.NextToken = &v + return s +} + +type DescribeAccountModificationsOutput struct { + _ struct{} `type:"structure"` + + // The list of modifications to the configuration of BYOL. + AccountModifications []*AccountModification `type:"list"` + + // The token to use to retrieve the next set of results, or null if no more + // results are available. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeAccountModificationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAccountModificationsOutput) GoString() string { + return s.String() +} + +// SetAccountModifications sets the AccountModifications field's value. +func (s *DescribeAccountModificationsOutput) SetAccountModifications(v []*AccountModification) *DescribeAccountModificationsOutput { + s.AccountModifications = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeAccountModificationsOutput) SetNextToken(v string) *DescribeAccountModificationsOutput { + s.NextToken = &v + return s +} + +type DescribeAccountOutput struct { + _ struct{} `type:"structure"` + + // The IP address range, specified as an IPv4 CIDR block, used for the management + // network interface. + // + // The management network interface is connected to a secure Amazon WorkSpaces + // management network. It is used for interactive streaming of the WorkSpace + // desktop to Amazon WorkSpaces clients, and to allow Amazon WorkSpaces to manage + // the WorkSpace. + DedicatedTenancyManagementCidrRange *string `type:"string"` + + // The status of BYOL (whether BYOL is enabled or disabled). + DedicatedTenancySupport *string `type:"string" enum:"DedicatedTenancySupportResultEnum"` +} + +// String returns the string representation +func (s DescribeAccountOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAccountOutput) GoString() string { + return s.String() +} + +// SetDedicatedTenancyManagementCidrRange sets the DedicatedTenancyManagementCidrRange field's value. +func (s *DescribeAccountOutput) SetDedicatedTenancyManagementCidrRange(v string) *DescribeAccountOutput { + s.DedicatedTenancyManagementCidrRange = &v + return s +} + +// SetDedicatedTenancySupport sets the DedicatedTenancySupport field's value. +func (s *DescribeAccountOutput) SetDedicatedTenancySupport(v string) *DescribeAccountOutput { + s.DedicatedTenancySupport = &v + return s +} + +type DescribeClientPropertiesInput struct { + _ struct{} `type:"structure"` + + // The resource identifiers, in the form of directory IDs. + // + // ResourceIds is a required field + ResourceIds []*string `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s DescribeClientPropertiesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClientPropertiesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeClientPropertiesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeClientPropertiesInput"} + if s.ResourceIds == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceIds")) + } + if s.ResourceIds != nil && len(s.ResourceIds) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceIds", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceIds sets the ResourceIds field's value. +func (s *DescribeClientPropertiesInput) SetResourceIds(v []*string) *DescribeClientPropertiesInput { + s.ResourceIds = v + return s +} + +type DescribeClientPropertiesOutput struct { + _ struct{} `type:"structure"` + + // Information about the specified Amazon WorkSpaces clients. + ClientPropertiesList []*ClientPropertiesResult `type:"list"` +} + +// String returns the string representation +func (s DescribeClientPropertiesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeClientPropertiesOutput) GoString() string { + return s.String() +} + +// SetClientPropertiesList sets the ClientPropertiesList field's value. +func (s *DescribeClientPropertiesOutput) SetClientPropertiesList(v []*ClientPropertiesResult) *DescribeClientPropertiesOutput { + s.ClientPropertiesList = v + return s +} + +type DescribeIpGroupsInput struct { + _ struct{} `type:"structure"` + + // The identifiers of one or more IP access control groups. + GroupIds []*string `type:"list"` + + // The maximum number of items to return. + MaxResults *int64 `min:"1" type:"integer"` + + // If you received a NextToken from a previous call that was paginated, provide + // this token to receive the next set of results. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeIpGroupsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeIpGroupsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeIpGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeIpGroupsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroupIds sets the GroupIds field's value. +func (s *DescribeIpGroupsInput) SetGroupIds(v []*string) *DescribeIpGroupsInput { + s.GroupIds = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeIpGroupsInput) SetMaxResults(v int64) *DescribeIpGroupsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeIpGroupsInput) SetNextToken(v string) *DescribeIpGroupsInput { + s.NextToken = &v + return s +} + +type DescribeIpGroupsOutput struct { + _ struct{} `type:"structure"` + + // The token to use to retrieve the next set of results, or null if no more + // results are available. + NextToken *string `min:"1" type:"string"` + + // Information about the IP access control groups. + Result []*IpGroup `type:"list"` +} + +// String returns the string representation +func (s DescribeIpGroupsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeIpGroupsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeIpGroupsOutput) SetNextToken(v string) *DescribeIpGroupsOutput { + s.NextToken = &v + return s +} + +// SetResult sets the Result field's value. +func (s *DescribeIpGroupsOutput) SetResult(v []*IpGroup) *DescribeIpGroupsOutput { + s.Result = v + return s +} + +type DescribeTagsInput struct { + _ struct{} `type:"structure"` + + // The identifier of the WorkSpace. To find this ID, use DescribeWorkspaces. + // + // ResourceId is a required field + ResourceId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeTagsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTagsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTagsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTagsInput"} + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceId sets the ResourceId field's value. +func (s *DescribeTagsInput) SetResourceId(v string) *DescribeTagsInput { + s.ResourceId = &v + return s +} + +type DescribeTagsOutput struct { + _ struct{} `type:"structure"` + + // The tags. + TagList []*Tag `type:"list"` +} + +// String returns the string representation +func (s DescribeTagsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTagsOutput) GoString() string { + return s.String() +} + +// SetTagList sets the TagList field's value. +func (s *DescribeTagsOutput) SetTagList(v []*Tag) *DescribeTagsOutput { + s.TagList = v + return s +} + +type DescribeWorkspaceBundlesInput struct { + _ struct{} `type:"structure"` + + // The identifiers of the bundles. You cannot combine this parameter with any + // other filter. + BundleIds []*string `min:"1" type:"list"` + + // The token for the next set of results. (You received this token from a previous + // call.) + NextToken *string `min:"1" type:"string"` + + // The owner of the bundles. You cannot combine this parameter with any other + // filter. + // + // Specify AMAZON to describe the bundles provided by AWS or null to describe + // the bundles that belong to your account. + Owner *string `type:"string"` +} + +// String returns the string representation +func (s DescribeWorkspaceBundlesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeWorkspaceBundlesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeWorkspaceBundlesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeWorkspaceBundlesInput"} + if s.BundleIds != nil && len(s.BundleIds) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BundleIds", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBundleIds sets the BundleIds field's value. +func (s *DescribeWorkspaceBundlesInput) SetBundleIds(v []*string) *DescribeWorkspaceBundlesInput { + s.BundleIds = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeWorkspaceBundlesInput) SetNextToken(v string) *DescribeWorkspaceBundlesInput { + s.NextToken = &v + return s +} + +// SetOwner sets the Owner field's value. +func (s *DescribeWorkspaceBundlesInput) SetOwner(v string) *DescribeWorkspaceBundlesInput { + s.Owner = &v + return s +} + +type DescribeWorkspaceBundlesOutput struct { + _ struct{} `type:"structure"` + + // Information about the bundles. + Bundles []*WorkspaceBundle `type:"list"` + + // The token to use to retrieve the next set of results, or null if there are + // no more results available. This token is valid for one day and must be used + // within that time frame. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeWorkspaceBundlesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeWorkspaceBundlesOutput) GoString() string { + return s.String() +} + +// SetBundles sets the Bundles field's value. +func (s *DescribeWorkspaceBundlesOutput) SetBundles(v []*WorkspaceBundle) *DescribeWorkspaceBundlesOutput { + s.Bundles = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeWorkspaceBundlesOutput) SetNextToken(v string) *DescribeWorkspaceBundlesOutput { + s.NextToken = &v + return s +} + +type DescribeWorkspaceDirectoriesInput struct { + _ struct{} `type:"structure"` + + // The identifiers of the directories. If the value is null, all directories + // are retrieved. + DirectoryIds []*string `min:"1" type:"list"` + + // If you received a NextToken from a previous call that was paginated, provide + // this token to receive the next set of results. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeWorkspaceDirectoriesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeWorkspaceDirectoriesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeWorkspaceDirectoriesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeWorkspaceDirectoriesInput"} + if s.DirectoryIds != nil && len(s.DirectoryIds) < 1 { + invalidParams.Add(request.NewErrParamMinLen("DirectoryIds", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDirectoryIds sets the DirectoryIds field's value. +func (s *DescribeWorkspaceDirectoriesInput) SetDirectoryIds(v []*string) *DescribeWorkspaceDirectoriesInput { + s.DirectoryIds = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeWorkspaceDirectoriesInput) SetNextToken(v string) *DescribeWorkspaceDirectoriesInput { + s.NextToken = &v + return s +} + +type DescribeWorkspaceDirectoriesOutput struct { + _ struct{} `type:"structure"` + + // Information about the directories. + Directories []*WorkspaceDirectory `type:"list"` + + // The token to use to retrieve the next set of results, or null if no more + // results are available. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeWorkspaceDirectoriesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeWorkspaceDirectoriesOutput) GoString() string { + return s.String() +} + +// SetDirectories sets the Directories field's value. +func (s *DescribeWorkspaceDirectoriesOutput) SetDirectories(v []*WorkspaceDirectory) *DescribeWorkspaceDirectoriesOutput { + s.Directories = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeWorkspaceDirectoriesOutput) SetNextToken(v string) *DescribeWorkspaceDirectoriesOutput { + s.NextToken = &v + return s +} + +type DescribeWorkspaceImagesInput struct { + _ struct{} `type:"structure"` + + // The identifier of the image. + ImageIds []*string `min:"1" type:"list"` + + // The maximum number of items to return. + MaxResults *int64 `min:"1" type:"integer"` + + // If you received a NextToken from a previous call that was paginated, provide + // this token to receive the next set of results. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeWorkspaceImagesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeWorkspaceImagesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeWorkspaceImagesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeWorkspaceImagesInput"} + if s.ImageIds != nil && len(s.ImageIds) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ImageIds", 1)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetImageIds sets the ImageIds field's value. +func (s *DescribeWorkspaceImagesInput) SetImageIds(v []*string) *DescribeWorkspaceImagesInput { + s.ImageIds = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeWorkspaceImagesInput) SetMaxResults(v int64) *DescribeWorkspaceImagesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeWorkspaceImagesInput) SetNextToken(v string) *DescribeWorkspaceImagesInput { + s.NextToken = &v + return s +} + +type DescribeWorkspaceImagesOutput struct { + _ struct{} `type:"structure"` + + // Information about the images. + Images []*WorkspaceImage `type:"list"` + + // The token to use to retrieve the next set of results, or null if no more + // results are available. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s DescribeWorkspaceImagesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeWorkspaceImagesOutput) GoString() string { + return s.String() +} + +// SetImages sets the Images field's value. +func (s *DescribeWorkspaceImagesOutput) SetImages(v []*WorkspaceImage) *DescribeWorkspaceImagesOutput { + s.Images = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeWorkspaceImagesOutput) SetNextToken(v string) *DescribeWorkspaceImagesOutput { + s.NextToken = &v + return s +} + +type DescribeWorkspacesConnectionStatusInput struct { + _ struct{} `type:"structure"` + + // If you received a NextToken from a previous call that was paginated, provide + // this token to receive the next set of results. + NextToken *string `min:"1" type:"string"` + + // The identifiers of the WorkSpaces. You can specify up to 25 WorkSpaces. + WorkspaceIds []*string `min:"1" type:"list"` +} + +// String returns the string representation +func (s DescribeWorkspacesConnectionStatusInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeWorkspacesConnectionStatusInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeWorkspacesConnectionStatusInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeWorkspacesConnectionStatusInput"} + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + if s.WorkspaceIds != nil && len(s.WorkspaceIds) < 1 { + invalidParams.Add(request.NewErrParamMinLen("WorkspaceIds", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeWorkspacesConnectionStatusInput) SetNextToken(v string) *DescribeWorkspacesConnectionStatusInput { + s.NextToken = &v + return s +} + +// SetWorkspaceIds sets the WorkspaceIds field's value. +func (s *DescribeWorkspacesConnectionStatusInput) SetWorkspaceIds(v []*string) *DescribeWorkspacesConnectionStatusInput { + s.WorkspaceIds = v + return s +} + +type DescribeWorkspacesConnectionStatusOutput struct { + _ struct{} `type:"structure"` + + // The token to use to retrieve the next set of results, or null if no more + // results are available. + NextToken *string `min:"1" type:"string"` + + // Information about the connection status of the WorkSpace. + WorkspacesConnectionStatus []*WorkspaceConnectionStatus `type:"list"` +} + +// String returns the string representation +func (s DescribeWorkspacesConnectionStatusOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeWorkspacesConnectionStatusOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeWorkspacesConnectionStatusOutput) SetNextToken(v string) *DescribeWorkspacesConnectionStatusOutput { + s.NextToken = &v + return s +} + +// SetWorkspacesConnectionStatus sets the WorkspacesConnectionStatus field's value. +func (s *DescribeWorkspacesConnectionStatusOutput) SetWorkspacesConnectionStatus(v []*WorkspaceConnectionStatus) *DescribeWorkspacesConnectionStatusOutput { + s.WorkspacesConnectionStatus = v + return s +} + +type DescribeWorkspacesInput struct { + _ struct{} `type:"structure"` + + // The identifier of the bundle. All WorkSpaces that are created from this bundle + // are retrieved. You cannot combine this parameter with any other filter. + BundleId *string `type:"string"` + + // The identifier of the directory. In addition, you can optionally specify + // a specific directory user (see UserName). You cannot combine this parameter + // with any other filter. + DirectoryId *string `type:"string"` + + // The maximum number of items to return. + Limit *int64 `min:"1" type:"integer"` + + // If you received a NextToken from a previous call that was paginated, provide + // this token to receive the next set of results. + NextToken *string `min:"1" type:"string"` + + // The name of the directory user. You must specify this parameter with DirectoryId. + UserName *string `min:"1" type:"string"` + + // The identifiers of the WorkSpaces. You cannot combine this parameter with + // any other filter. + // + // Because the CreateWorkspaces operation is asynchronous, the identifier it + // returns is not immediately available. If you immediately call DescribeWorkspaces + // with this identifier, no information is returned. + WorkspaceIds []*string `min:"1" type:"list"` +} + +// String returns the string representation +func (s DescribeWorkspacesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeWorkspacesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeWorkspacesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeWorkspacesInput"} + if s.Limit != nil && *s.Limit < 1 { + invalidParams.Add(request.NewErrParamMinValue("Limit", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 1)) + } + if s.WorkspaceIds != nil && len(s.WorkspaceIds) < 1 { + invalidParams.Add(request.NewErrParamMinLen("WorkspaceIds", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBundleId sets the BundleId field's value. +func (s *DescribeWorkspacesInput) SetBundleId(v string) *DescribeWorkspacesInput { + s.BundleId = &v + return s +} + +// SetDirectoryId sets the DirectoryId field's value. +func (s *DescribeWorkspacesInput) SetDirectoryId(v string) *DescribeWorkspacesInput { + s.DirectoryId = &v + return s +} + +// SetLimit sets the Limit field's value. +func (s *DescribeWorkspacesInput) SetLimit(v int64) *DescribeWorkspacesInput { + s.Limit = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeWorkspacesInput) SetNextToken(v string) *DescribeWorkspacesInput { + s.NextToken = &v + return s +} + +// SetUserName sets the UserName field's value. +func (s *DescribeWorkspacesInput) SetUserName(v string) *DescribeWorkspacesInput { + s.UserName = &v + return s +} + +// SetWorkspaceIds sets the WorkspaceIds field's value. +func (s *DescribeWorkspacesInput) SetWorkspaceIds(v []*string) *DescribeWorkspacesInput { + s.WorkspaceIds = v + return s +} + +type DescribeWorkspacesOutput struct { + _ struct{} `type:"structure"` + + // The token to use to retrieve the next set of results, or null if no more + // results are available. + NextToken *string `min:"1" type:"string"` + + // Information about the WorkSpaces. + // + // Because CreateWorkspaces is an asynchronous operation, some of the returned + // information could be incomplete. + Workspaces []*Workspace `type:"list"` +} + +// String returns the string representation +func (s DescribeWorkspacesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeWorkspacesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeWorkspacesOutput) SetNextToken(v string) *DescribeWorkspacesOutput { + s.NextToken = &v + return s +} + +// SetWorkspaces sets the Workspaces field's value. +func (s *DescribeWorkspacesOutput) SetWorkspaces(v []*Workspace) *DescribeWorkspacesOutput { + s.Workspaces = v + return s +} + +type DisassociateIpGroupsInput struct { + _ struct{} `type:"structure"` + + // The identifier of the directory. + // + // DirectoryId is a required field + DirectoryId *string `type:"string" required:"true"` + + // The identifiers of one or more IP access control groups. + // + // GroupIds is a required field + GroupIds []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s DisassociateIpGroupsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateIpGroupsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateIpGroupsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateIpGroupsInput"} + if s.DirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectoryId")) + } + if s.GroupIds == nil { + invalidParams.Add(request.NewErrParamRequired("GroupIds")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDirectoryId sets the DirectoryId field's value. +func (s *DisassociateIpGroupsInput) SetDirectoryId(v string) *DisassociateIpGroupsInput { + s.DirectoryId = &v + return s +} + +// SetGroupIds sets the GroupIds field's value. +func (s *DisassociateIpGroupsInput) SetGroupIds(v []*string) *DisassociateIpGroupsInput { + s.GroupIds = v + return s +} + +type DisassociateIpGroupsOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DisassociateIpGroupsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateIpGroupsOutput) GoString() string { + return s.String() +} + +// Describes a WorkSpace that cannot be created. +type FailedCreateWorkspaceRequest struct { + _ struct{} `type:"structure"` + + // The error code that is returned if the WorkSpace cannot be created. + ErrorCode *string `type:"string"` + + // The text of the error message that is returned if the WorkSpace cannot be + // created. + ErrorMessage *string `type:"string"` + + // Information about the WorkSpace. + WorkspaceRequest *WorkspaceRequest `type:"structure"` +} + +// String returns the string representation +func (s FailedCreateWorkspaceRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FailedCreateWorkspaceRequest) GoString() string { + return s.String() +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *FailedCreateWorkspaceRequest) SetErrorCode(v string) *FailedCreateWorkspaceRequest { + s.ErrorCode = &v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *FailedCreateWorkspaceRequest) SetErrorMessage(v string) *FailedCreateWorkspaceRequest { + s.ErrorMessage = &v + return s +} + +// SetWorkspaceRequest sets the WorkspaceRequest field's value. +func (s *FailedCreateWorkspaceRequest) SetWorkspaceRequest(v *WorkspaceRequest) *FailedCreateWorkspaceRequest { + s.WorkspaceRequest = v + return s +} + +// Describes a WorkSpace that could not be rebooted. (RebootWorkspaces), rebuilt +// (RebuildWorkspaces), terminated (TerminateWorkspaces), started (StartWorkspaces), +// or stopped (StopWorkspaces). +type FailedWorkspaceChangeRequest struct { + _ struct{} `type:"structure"` + + // The error code that is returned if the WorkSpace cannot be rebooted. + ErrorCode *string `type:"string"` + + // The text of the error message that is returned if the WorkSpace cannot be + // rebooted. + ErrorMessage *string `type:"string"` + + // The identifier of the WorkSpace. + WorkspaceId *string `type:"string"` +} + +// String returns the string representation +func (s FailedWorkspaceChangeRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s FailedWorkspaceChangeRequest) GoString() string { + return s.String() +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *FailedWorkspaceChangeRequest) SetErrorCode(v string) *FailedWorkspaceChangeRequest { + s.ErrorCode = &v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *FailedWorkspaceChangeRequest) SetErrorMessage(v string) *FailedWorkspaceChangeRequest { + s.ErrorMessage = &v + return s +} + +// SetWorkspaceId sets the WorkspaceId field's value. +func (s *FailedWorkspaceChangeRequest) SetWorkspaceId(v string) *FailedWorkspaceChangeRequest { + s.WorkspaceId = &v + return s +} + +type ImportWorkspaceImageInput struct { + _ struct{} `type:"structure"` + + // The identifier of the EC2 image. + // + // Ec2ImageId is a required field + Ec2ImageId *string `type:"string" required:"true"` + + // The description of the WorkSpace image. + // + // ImageDescription is a required field + ImageDescription *string `min:"1" type:"string" required:"true"` + + // The name of the WorkSpace image. + // + // ImageName is a required field + ImageName *string `min:"1" type:"string" required:"true"` + + // The ingestion process to be used when importing the image. + // + // IngestionProcess is a required field + IngestionProcess *string `type:"string" required:"true" enum:"WorkspaceImageIngestionProcess"` +} + +// String returns the string representation +func (s ImportWorkspaceImageInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportWorkspaceImageInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ImportWorkspaceImageInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ImportWorkspaceImageInput"} + if s.Ec2ImageId == nil { + invalidParams.Add(request.NewErrParamRequired("Ec2ImageId")) + } + if s.ImageDescription == nil { + invalidParams.Add(request.NewErrParamRequired("ImageDescription")) + } + if s.ImageDescription != nil && len(*s.ImageDescription) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ImageDescription", 1)) + } + if s.ImageName == nil { + invalidParams.Add(request.NewErrParamRequired("ImageName")) + } + if s.ImageName != nil && len(*s.ImageName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ImageName", 1)) + } + if s.IngestionProcess == nil { + invalidParams.Add(request.NewErrParamRequired("IngestionProcess")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEc2ImageId sets the Ec2ImageId field's value. +func (s *ImportWorkspaceImageInput) SetEc2ImageId(v string) *ImportWorkspaceImageInput { + s.Ec2ImageId = &v + return s +} + +// SetImageDescription sets the ImageDescription field's value. +func (s *ImportWorkspaceImageInput) SetImageDescription(v string) *ImportWorkspaceImageInput { + s.ImageDescription = &v + return s +} + +// SetImageName sets the ImageName field's value. +func (s *ImportWorkspaceImageInput) SetImageName(v string) *ImportWorkspaceImageInput { + s.ImageName = &v + return s +} + +// SetIngestionProcess sets the IngestionProcess field's value. +func (s *ImportWorkspaceImageInput) SetIngestionProcess(v string) *ImportWorkspaceImageInput { + s.IngestionProcess = &v + return s +} + +type ImportWorkspaceImageOutput struct { + _ struct{} `type:"structure"` + + // The identifier of the WorkSpace image. + ImageId *string `type:"string"` +} + +// String returns the string representation +func (s ImportWorkspaceImageOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportWorkspaceImageOutput) GoString() string { + return s.String() +} + +// SetImageId sets the ImageId field's value. +func (s *ImportWorkspaceImageOutput) SetImageId(v string) *ImportWorkspaceImageOutput { + s.ImageId = &v + return s +} + +// Describes an IP access control group. +type IpGroup struct { + _ struct{} `type:"structure"` + + // The description of the group. + GroupDesc *string `locationName:"groupDesc" type:"string"` + + // The identifier of the group. + GroupId *string `locationName:"groupId" type:"string"` + + // The name of the group. + GroupName *string `locationName:"groupName" type:"string"` + + // The rules. + UserRules []*IpRuleItem `locationName:"userRules" type:"list"` +} + +// String returns the string representation +func (s IpGroup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IpGroup) GoString() string { + return s.String() +} + +// SetGroupDesc sets the GroupDesc field's value. +func (s *IpGroup) SetGroupDesc(v string) *IpGroup { + s.GroupDesc = &v + return s +} + +// SetGroupId sets the GroupId field's value. +func (s *IpGroup) SetGroupId(v string) *IpGroup { + s.GroupId = &v + return s +} + +// SetGroupName sets the GroupName field's value. +func (s *IpGroup) SetGroupName(v string) *IpGroup { + s.GroupName = &v + return s +} + +// SetUserRules sets the UserRules field's value. +func (s *IpGroup) SetUserRules(v []*IpRuleItem) *IpGroup { + s.UserRules = v + return s +} + +// Describes a rule for an IP access control group. +type IpRuleItem struct { + _ struct{} `type:"structure"` + + // The IP address range, in CIDR notation. + IpRule *string `locationName:"ipRule" type:"string"` + + // The description. + RuleDesc *string `locationName:"ruleDesc" type:"string"` +} + +// String returns the string representation +func (s IpRuleItem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IpRuleItem) GoString() string { + return s.String() +} + +// SetIpRule sets the IpRule field's value. +func (s *IpRuleItem) SetIpRule(v string) *IpRuleItem { + s.IpRule = &v + return s +} + +// SetRuleDesc sets the RuleDesc field's value. +func (s *IpRuleItem) SetRuleDesc(v string) *IpRuleItem { + s.RuleDesc = &v + return s +} + +type ListAvailableManagementCidrRangesInput struct { + _ struct{} `type:"structure"` + + // The IP address range to search. Specify an IP address range that is compatible + // with your network and in CIDR notation (that is, specify the range as an + // IPv4 CIDR block). + // + // ManagementCidrRangeConstraint is a required field + ManagementCidrRangeConstraint *string `type:"string" required:"true"` + + // The maximum number of items to return. + MaxResults *int64 `min:"1" type:"integer"` + + // If you received a NextToken from a previous call that was paginated, provide + // this token to receive the next set of results. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListAvailableManagementCidrRangesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListAvailableManagementCidrRangesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListAvailableManagementCidrRangesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListAvailableManagementCidrRangesInput"} + if s.ManagementCidrRangeConstraint == nil { + invalidParams.Add(request.NewErrParamRequired("ManagementCidrRangeConstraint")) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetManagementCidrRangeConstraint sets the ManagementCidrRangeConstraint field's value. +func (s *ListAvailableManagementCidrRangesInput) SetManagementCidrRangeConstraint(v string) *ListAvailableManagementCidrRangesInput { + s.ManagementCidrRangeConstraint = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListAvailableManagementCidrRangesInput) SetMaxResults(v int64) *ListAvailableManagementCidrRangesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListAvailableManagementCidrRangesInput) SetNextToken(v string) *ListAvailableManagementCidrRangesInput { + s.NextToken = &v + return s +} + +type ListAvailableManagementCidrRangesOutput struct { + _ struct{} `type:"structure"` + + // The list of available IP address ranges, specified as IPv4 CIDR blocks. + ManagementCidrRanges []*string `type:"list"` + + // The token to use to retrieve the next set of results, or null if no more + // results are available. + NextToken *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s ListAvailableManagementCidrRangesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListAvailableManagementCidrRangesOutput) GoString() string { + return s.String() +} + +// SetManagementCidrRanges sets the ManagementCidrRanges field's value. +func (s *ListAvailableManagementCidrRangesOutput) SetManagementCidrRanges(v []*string) *ListAvailableManagementCidrRangesOutput { + s.ManagementCidrRanges = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListAvailableManagementCidrRangesOutput) SetNextToken(v string) *ListAvailableManagementCidrRangesOutput { + s.NextToken = &v + return s +} + +// Describes a WorkSpace modification. +type ModificationState struct { + _ struct{} `type:"structure"` + + // The resource. + Resource *string `type:"string" enum:"ModificationResourceEnum"` + + // The modification state. + State *string `type:"string" enum:"ModificationStateEnum"` +} + +// String returns the string representation +func (s ModificationState) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModificationState) GoString() string { + return s.String() +} + +// SetResource sets the Resource field's value. +func (s *ModificationState) SetResource(v string) *ModificationState { + s.Resource = &v + return s +} + +// SetState sets the State field's value. +func (s *ModificationState) SetState(v string) *ModificationState { + s.State = &v + return s +} + +type ModifyAccountInput struct { + _ struct{} `type:"structure"` + + // The IP address range, specified as an IPv4 CIDR block, for the management + // network interface. Specify an IP address range that is compatible with your + // network and in CIDR notation (that is, specify the range as an IPv4 CIDR + // block). The CIDR block size must be /16 (for example, 203.0.113.25/16). It + // must also be specified as available by the ListAvailableManagementCidrRanges + // operation. + DedicatedTenancyManagementCidrRange *string `type:"string"` + + // The status of BYOL. + DedicatedTenancySupport *string `type:"string" enum:"DedicatedTenancySupportEnum"` +} + +// String returns the string representation +func (s ModifyAccountInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyAccountInput) GoString() string { + return s.String() +} + +// SetDedicatedTenancyManagementCidrRange sets the DedicatedTenancyManagementCidrRange field's value. +func (s *ModifyAccountInput) SetDedicatedTenancyManagementCidrRange(v string) *ModifyAccountInput { + s.DedicatedTenancyManagementCidrRange = &v + return s +} + +// SetDedicatedTenancySupport sets the DedicatedTenancySupport field's value. +func (s *ModifyAccountInput) SetDedicatedTenancySupport(v string) *ModifyAccountInput { + s.DedicatedTenancySupport = &v + return s +} + +type ModifyAccountOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s ModifyAccountOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyAccountOutput) GoString() string { + return s.String() +} + +type ModifyClientPropertiesInput struct { + _ struct{} `type:"structure"` + + // Information about the Amazon WorkSpaces client. + ClientProperties *ClientProperties `type:"structure"` + + // The resource identifiers, in the form of directory IDs. + // + // ResourceId is a required field + ResourceId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ModifyClientPropertiesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyClientPropertiesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyClientPropertiesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyClientPropertiesInput"} + if s.ResourceId == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceId")) + } + if s.ResourceId != nil && len(*s.ResourceId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientProperties sets the ClientProperties field's value. +func (s *ModifyClientPropertiesInput) SetClientProperties(v *ClientProperties) *ModifyClientPropertiesInput { + s.ClientProperties = v + return s +} + +// SetResourceId sets the ResourceId field's value. +func (s *ModifyClientPropertiesInput) SetResourceId(v string) *ModifyClientPropertiesInput { + s.ResourceId = &v + return s +} + +type ModifyClientPropertiesOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s ModifyClientPropertiesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyClientPropertiesOutput) GoString() string { + return s.String() +} + +type ModifyWorkspacePropertiesInput struct { + _ struct{} `type:"structure"` + + // The identifier of the WorkSpace. + // + // WorkspaceId is a required field + WorkspaceId *string `type:"string" required:"true"` + + // The properties of the WorkSpace. + // + // WorkspaceProperties is a required field + WorkspaceProperties *WorkspaceProperties `type:"structure" required:"true"` +} + +// String returns the string representation +func (s ModifyWorkspacePropertiesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyWorkspacePropertiesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyWorkspacePropertiesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyWorkspacePropertiesInput"} + if s.WorkspaceId == nil { + invalidParams.Add(request.NewErrParamRequired("WorkspaceId")) + } + if s.WorkspaceProperties == nil { + invalidParams.Add(request.NewErrParamRequired("WorkspaceProperties")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetWorkspaceId sets the WorkspaceId field's value. +func (s *ModifyWorkspacePropertiesInput) SetWorkspaceId(v string) *ModifyWorkspacePropertiesInput { + s.WorkspaceId = &v + return s +} + +// SetWorkspaceProperties sets the WorkspaceProperties field's value. +func (s *ModifyWorkspacePropertiesInput) SetWorkspaceProperties(v *WorkspaceProperties) *ModifyWorkspacePropertiesInput { + s.WorkspaceProperties = v + return s +} + +type ModifyWorkspacePropertiesOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s ModifyWorkspacePropertiesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyWorkspacePropertiesOutput) GoString() string { + return s.String() +} + +type ModifyWorkspaceStateInput struct { + _ struct{} `type:"structure"` + + // The identifier of the WorkSpace. + // + // WorkspaceId is a required field + WorkspaceId *string `type:"string" required:"true"` + + // The WorkSpace state. + // + // WorkspaceState is a required field + WorkspaceState *string `type:"string" required:"true" enum:"TargetWorkspaceState"` +} + +// String returns the string representation +func (s ModifyWorkspaceStateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyWorkspaceStateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyWorkspaceStateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyWorkspaceStateInput"} + if s.WorkspaceId == nil { + invalidParams.Add(request.NewErrParamRequired("WorkspaceId")) + } + if s.WorkspaceState == nil { + invalidParams.Add(request.NewErrParamRequired("WorkspaceState")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetWorkspaceId sets the WorkspaceId field's value. +func (s *ModifyWorkspaceStateInput) SetWorkspaceId(v string) *ModifyWorkspaceStateInput { + s.WorkspaceId = &v + return s +} + +// SetWorkspaceState sets the WorkspaceState field's value. +func (s *ModifyWorkspaceStateInput) SetWorkspaceState(v string) *ModifyWorkspaceStateInput { + s.WorkspaceState = &v + return s +} + +type ModifyWorkspaceStateOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s ModifyWorkspaceStateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyWorkspaceStateOutput) GoString() string { + return s.String() +} + +// The operating system that the image is running. +type OperatingSystem struct { + _ struct{} `type:"structure"` + + // The operating system. + Type *string `type:"string" enum:"OperatingSystemType"` +} + +// String returns the string representation +func (s OperatingSystem) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OperatingSystem) GoString() string { + return s.String() +} + +// SetType sets the Type field's value. +func (s *OperatingSystem) SetType(v string) *OperatingSystem { + s.Type = &v + return s +} + +// Describes the information used to reboot a WorkSpace. +type RebootRequest struct { + _ struct{} `type:"structure"` + + // The identifier of the WorkSpace. + // + // WorkspaceId is a required field + WorkspaceId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s RebootRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RebootRequest) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RebootRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RebootRequest"} + if s.WorkspaceId == nil { + invalidParams.Add(request.NewErrParamRequired("WorkspaceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetWorkspaceId sets the WorkspaceId field's value. +func (s *RebootRequest) SetWorkspaceId(v string) *RebootRequest { + s.WorkspaceId = &v + return s +} + +type RebootWorkspacesInput struct { + _ struct{} `type:"structure"` + + // The WorkSpaces to reboot. You can specify up to 25 WorkSpaces. + // + // RebootWorkspaceRequests is a required field + RebootWorkspaceRequests []*RebootRequest `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s RebootWorkspacesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RebootWorkspacesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RebootWorkspacesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RebootWorkspacesInput"} + if s.RebootWorkspaceRequests == nil { + invalidParams.Add(request.NewErrParamRequired("RebootWorkspaceRequests")) + } + if s.RebootWorkspaceRequests != nil && len(s.RebootWorkspaceRequests) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RebootWorkspaceRequests", 1)) + } + if s.RebootWorkspaceRequests != nil { + for i, v := range s.RebootWorkspaceRequests { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RebootWorkspaceRequests", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRebootWorkspaceRequests sets the RebootWorkspaceRequests field's value. +func (s *RebootWorkspacesInput) SetRebootWorkspaceRequests(v []*RebootRequest) *RebootWorkspacesInput { + s.RebootWorkspaceRequests = v + return s +} + +type RebootWorkspacesOutput struct { + _ struct{} `type:"structure"` + + // Information about the WorkSpaces that could not be rebooted. + FailedRequests []*FailedWorkspaceChangeRequest `type:"list"` +} + +// String returns the string representation +func (s RebootWorkspacesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RebootWorkspacesOutput) GoString() string { + return s.String() +} + +// SetFailedRequests sets the FailedRequests field's value. +func (s *RebootWorkspacesOutput) SetFailedRequests(v []*FailedWorkspaceChangeRequest) *RebootWorkspacesOutput { + s.FailedRequests = v + return s +} + +// Describes the information used to rebuild a WorkSpace. +type RebuildRequest struct { + _ struct{} `type:"structure"` + + // The identifier of the WorkSpace. + // + // WorkspaceId is a required field + WorkspaceId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s RebuildRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RebuildRequest) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RebuildRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RebuildRequest"} + if s.WorkspaceId == nil { + invalidParams.Add(request.NewErrParamRequired("WorkspaceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetWorkspaceId sets the WorkspaceId field's value. +func (s *RebuildRequest) SetWorkspaceId(v string) *RebuildRequest { + s.WorkspaceId = &v + return s +} + +type RebuildWorkspacesInput struct { + _ struct{} `type:"structure"` + + // The WorkSpace to rebuild. You can specify a single WorkSpace. + // + // RebuildWorkspaceRequests is a required field + RebuildWorkspaceRequests []*RebuildRequest `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s RebuildWorkspacesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RebuildWorkspacesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RebuildWorkspacesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RebuildWorkspacesInput"} + if s.RebuildWorkspaceRequests == nil { + invalidParams.Add(request.NewErrParamRequired("RebuildWorkspaceRequests")) + } + if s.RebuildWorkspaceRequests != nil && len(s.RebuildWorkspaceRequests) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RebuildWorkspaceRequests", 1)) + } + if s.RebuildWorkspaceRequests != nil { + for i, v := range s.RebuildWorkspaceRequests { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RebuildWorkspaceRequests", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRebuildWorkspaceRequests sets the RebuildWorkspaceRequests field's value. +func (s *RebuildWorkspacesInput) SetRebuildWorkspaceRequests(v []*RebuildRequest) *RebuildWorkspacesInput { + s.RebuildWorkspaceRequests = v + return s +} + +type RebuildWorkspacesOutput struct { + _ struct{} `type:"structure"` + + // Information about the WorkSpace that could not be rebuilt. + FailedRequests []*FailedWorkspaceChangeRequest `type:"list"` +} + +// String returns the string representation +func (s RebuildWorkspacesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RebuildWorkspacesOutput) GoString() string { + return s.String() +} + +// SetFailedRequests sets the FailedRequests field's value. +func (s *RebuildWorkspacesOutput) SetFailedRequests(v []*FailedWorkspaceChangeRequest) *RebuildWorkspacesOutput { + s.FailedRequests = v + return s +} + +type RevokeIpRulesInput struct { + _ struct{} `type:"structure"` + + // The identifier of the group. + // + // GroupId is a required field + GroupId *string `type:"string" required:"true"` + + // The rules to remove from the group. + // + // UserRules is a required field + UserRules []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s RevokeIpRulesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RevokeIpRulesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RevokeIpRulesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RevokeIpRulesInput"} + if s.GroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupId")) + } + if s.UserRules == nil { + invalidParams.Add(request.NewErrParamRequired("UserRules")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroupId sets the GroupId field's value. +func (s *RevokeIpRulesInput) SetGroupId(v string) *RevokeIpRulesInput { + s.GroupId = &v + return s +} + +// SetUserRules sets the UserRules field's value. +func (s *RevokeIpRulesInput) SetUserRules(v []*string) *RevokeIpRulesInput { + s.UserRules = v + return s +} + +type RevokeIpRulesOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s RevokeIpRulesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RevokeIpRulesOutput) GoString() string { + return s.String() +} + +// Describes the root volume for a WorkSpace bundle. +type RootStorage struct { + _ struct{} `type:"structure"` + + // The size of the root volume. + Capacity *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s RootStorage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RootStorage) GoString() string { + return s.String() +} + +// SetCapacity sets the Capacity field's value. +func (s *RootStorage) SetCapacity(v string) *RootStorage { + s.Capacity = &v + return s +} + +// Information used to start a WorkSpace. +type StartRequest struct { + _ struct{} `type:"structure"` + + // The identifier of the WorkSpace. + WorkspaceId *string `type:"string"` +} + +// String returns the string representation +func (s StartRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartRequest) GoString() string { + return s.String() +} + +// SetWorkspaceId sets the WorkspaceId field's value. +func (s *StartRequest) SetWorkspaceId(v string) *StartRequest { + s.WorkspaceId = &v + return s +} + +type StartWorkspacesInput struct { + _ struct{} `type:"structure"` + + // The WorkSpaces to start. You can specify up to 25 WorkSpaces. + // + // StartWorkspaceRequests is a required field + StartWorkspaceRequests []*StartRequest `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s StartWorkspacesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartWorkspacesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartWorkspacesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartWorkspacesInput"} + if s.StartWorkspaceRequests == nil { + invalidParams.Add(request.NewErrParamRequired("StartWorkspaceRequests")) + } + if s.StartWorkspaceRequests != nil && len(s.StartWorkspaceRequests) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StartWorkspaceRequests", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetStartWorkspaceRequests sets the StartWorkspaceRequests field's value. +func (s *StartWorkspacesInput) SetStartWorkspaceRequests(v []*StartRequest) *StartWorkspacesInput { + s.StartWorkspaceRequests = v + return s +} + +type StartWorkspacesOutput struct { + _ struct{} `type:"structure"` + + // Information about the WorkSpaces that could not be started. + FailedRequests []*FailedWorkspaceChangeRequest `type:"list"` +} + +// String returns the string representation +func (s StartWorkspacesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartWorkspacesOutput) GoString() string { + return s.String() +} + +// SetFailedRequests sets the FailedRequests field's value. +func (s *StartWorkspacesOutput) SetFailedRequests(v []*FailedWorkspaceChangeRequest) *StartWorkspacesOutput { + s.FailedRequests = v + return s +} + +// Describes the information used to stop a WorkSpace. +type StopRequest struct { + _ struct{} `type:"structure"` + + // The identifier of the WorkSpace. + WorkspaceId *string `type:"string"` +} + +// String returns the string representation +func (s StopRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopRequest) GoString() string { + return s.String() +} + +// SetWorkspaceId sets the WorkspaceId field's value. +func (s *StopRequest) SetWorkspaceId(v string) *StopRequest { + s.WorkspaceId = &v + return s +} + +type StopWorkspacesInput struct { + _ struct{} `type:"structure"` + + // The WorkSpaces to stop. You can specify up to 25 WorkSpaces. + // + // StopWorkspaceRequests is a required field + StopWorkspaceRequests []*StopRequest `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s StopWorkspacesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopWorkspacesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopWorkspacesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopWorkspacesInput"} + if s.StopWorkspaceRequests == nil { + invalidParams.Add(request.NewErrParamRequired("StopWorkspaceRequests")) + } + if s.StopWorkspaceRequests != nil && len(s.StopWorkspaceRequests) < 1 { + invalidParams.Add(request.NewErrParamMinLen("StopWorkspaceRequests", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetStopWorkspaceRequests sets the StopWorkspaceRequests field's value. +func (s *StopWorkspacesInput) SetStopWorkspaceRequests(v []*StopRequest) *StopWorkspacesInput { + s.StopWorkspaceRequests = v + return s +} + +type StopWorkspacesOutput struct { + _ struct{} `type:"structure"` + + // Information about the WorkSpaces that could not be stopped. + FailedRequests []*FailedWorkspaceChangeRequest `type:"list"` +} + +// String returns the string representation +func (s StopWorkspacesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StopWorkspacesOutput) GoString() string { + return s.String() +} + +// SetFailedRequests sets the FailedRequests field's value. +func (s *StopWorkspacesOutput) SetFailedRequests(v []*FailedWorkspaceChangeRequest) *StopWorkspacesOutput { + s.FailedRequests = v + return s +} + +// Describes a tag. +type Tag struct { + _ struct{} `type:"structure"` + + // The key of the tag. + // + // Key is a required field + Key *string `min:"1" type:"string" required:"true"` + + // The value of the tag. + Value *string `type:"string"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Tag) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Tag"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +// Describes the information used to terminate a WorkSpace. +type TerminateRequest struct { + _ struct{} `type:"structure"` + + // The identifier of the WorkSpace. + // + // WorkspaceId is a required field + WorkspaceId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s TerminateRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TerminateRequest) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TerminateRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TerminateRequest"} + if s.WorkspaceId == nil { + invalidParams.Add(request.NewErrParamRequired("WorkspaceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetWorkspaceId sets the WorkspaceId field's value. +func (s *TerminateRequest) SetWorkspaceId(v string) *TerminateRequest { + s.WorkspaceId = &v + return s +} + +type TerminateWorkspacesInput struct { + _ struct{} `type:"structure"` + + // The WorkSpaces to terminate. You can specify up to 25 WorkSpaces. + // + // TerminateWorkspaceRequests is a required field + TerminateWorkspaceRequests []*TerminateRequest `min:"1" type:"list" required:"true"` +} + +// String returns the string representation +func (s TerminateWorkspacesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TerminateWorkspacesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TerminateWorkspacesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TerminateWorkspacesInput"} + if s.TerminateWorkspaceRequests == nil { + invalidParams.Add(request.NewErrParamRequired("TerminateWorkspaceRequests")) + } + if s.TerminateWorkspaceRequests != nil && len(s.TerminateWorkspaceRequests) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TerminateWorkspaceRequests", 1)) + } + if s.TerminateWorkspaceRequests != nil { + for i, v := range s.TerminateWorkspaceRequests { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TerminateWorkspaceRequests", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetTerminateWorkspaceRequests sets the TerminateWorkspaceRequests field's value. +func (s *TerminateWorkspacesInput) SetTerminateWorkspaceRequests(v []*TerminateRequest) *TerminateWorkspacesInput { + s.TerminateWorkspaceRequests = v + return s +} + +type TerminateWorkspacesOutput struct { + _ struct{} `type:"structure"` + + // Information about the WorkSpaces that could not be terminated. + FailedRequests []*FailedWorkspaceChangeRequest `type:"list"` +} + +// String returns the string representation +func (s TerminateWorkspacesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TerminateWorkspacesOutput) GoString() string { + return s.String() +} + +// SetFailedRequests sets the FailedRequests field's value. +func (s *TerminateWorkspacesOutput) SetFailedRequests(v []*FailedWorkspaceChangeRequest) *TerminateWorkspacesOutput { + s.FailedRequests = v + return s +} + +type UpdateRulesOfIpGroupInput struct { + _ struct{} `type:"structure"` + + // The identifier of the group. + // + // GroupId is a required field + GroupId *string `type:"string" required:"true"` + + // One or more rules. + // + // UserRules is a required field + UserRules []*IpRuleItem `type:"list" required:"true"` +} + +// String returns the string representation +func (s UpdateRulesOfIpGroupInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateRulesOfIpGroupInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdateRulesOfIpGroupInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdateRulesOfIpGroupInput"} + if s.GroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupId")) + } + if s.UserRules == nil { + invalidParams.Add(request.NewErrParamRequired("UserRules")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetGroupId sets the GroupId field's value. +func (s *UpdateRulesOfIpGroupInput) SetGroupId(v string) *UpdateRulesOfIpGroupInput { + s.GroupId = &v + return s +} + +// SetUserRules sets the UserRules field's value. +func (s *UpdateRulesOfIpGroupInput) SetUserRules(v []*IpRuleItem) *UpdateRulesOfIpGroupInput { + s.UserRules = v + return s +} + +type UpdateRulesOfIpGroupOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdateRulesOfIpGroupOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdateRulesOfIpGroupOutput) GoString() string { + return s.String() +} + +// Describes the user storage for a WorkSpace bundle. +type UserStorage struct { + _ struct{} `type:"structure"` + + // The size of the user storage. + Capacity *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s UserStorage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UserStorage) GoString() string { + return s.String() +} + +// SetCapacity sets the Capacity field's value. +func (s *UserStorage) SetCapacity(v string) *UserStorage { + s.Capacity = &v + return s +} + +// Describes a WorkSpace. +type Workspace struct { + _ struct{} `type:"structure"` + + // The identifier of the bundle used to create the WorkSpace. + BundleId *string `type:"string"` + + // The name of the WorkSpace, as seen by the operating system. + ComputerName *string `type:"string"` + + // The identifier of the AWS Directory Service directory for the WorkSpace. + DirectoryId *string `type:"string"` + + // The error code that is returned if the WorkSpace cannot be created. + ErrorCode *string `type:"string"` + + // The text of the error message that is returned if the WorkSpace cannot be + // created. + ErrorMessage *string `type:"string"` + + // The IP address of the WorkSpace. + IpAddress *string `type:"string"` + + // The modification states of the WorkSpace. + ModificationStates []*ModificationState `type:"list"` + + // Indicates whether the data stored on the root volume is encrypted. + RootVolumeEncryptionEnabled *bool `type:"boolean"` + + // The operational state of the WorkSpace. + State *string `type:"string" enum:"WorkspaceState"` + + // The identifier of the subnet for the WorkSpace. + SubnetId *string `type:"string"` + + // The user for the WorkSpace. + UserName *string `min:"1" type:"string"` + + // Indicates whether the data stored on the user volume is encrypted. + UserVolumeEncryptionEnabled *bool `type:"boolean"` + + // The KMS key used to encrypt data stored on your WorkSpace. + VolumeEncryptionKey *string `type:"string"` + + // The identifier of the WorkSpace. + WorkspaceId *string `type:"string"` + + // The properties of the WorkSpace. + WorkspaceProperties *WorkspaceProperties `type:"structure"` +} + +// String returns the string representation +func (s Workspace) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Workspace) GoString() string { + return s.String() +} + +// SetBundleId sets the BundleId field's value. +func (s *Workspace) SetBundleId(v string) *Workspace { + s.BundleId = &v + return s +} + +// SetComputerName sets the ComputerName field's value. +func (s *Workspace) SetComputerName(v string) *Workspace { + s.ComputerName = &v + return s +} + +// SetDirectoryId sets the DirectoryId field's value. +func (s *Workspace) SetDirectoryId(v string) *Workspace { + s.DirectoryId = &v + return s +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *Workspace) SetErrorCode(v string) *Workspace { + s.ErrorCode = &v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *Workspace) SetErrorMessage(v string) *Workspace { + s.ErrorMessage = &v + return s +} + +// SetIpAddress sets the IpAddress field's value. +func (s *Workspace) SetIpAddress(v string) *Workspace { + s.IpAddress = &v + return s +} + +// SetModificationStates sets the ModificationStates field's value. +func (s *Workspace) SetModificationStates(v []*ModificationState) *Workspace { + s.ModificationStates = v + return s +} + +// SetRootVolumeEncryptionEnabled sets the RootVolumeEncryptionEnabled field's value. +func (s *Workspace) SetRootVolumeEncryptionEnabled(v bool) *Workspace { + s.RootVolumeEncryptionEnabled = &v + return s +} + +// SetState sets the State field's value. +func (s *Workspace) SetState(v string) *Workspace { + s.State = &v + return s +} + +// SetSubnetId sets the SubnetId field's value. +func (s *Workspace) SetSubnetId(v string) *Workspace { + s.SubnetId = &v + return s +} + +// SetUserName sets the UserName field's value. +func (s *Workspace) SetUserName(v string) *Workspace { + s.UserName = &v + return s +} + +// SetUserVolumeEncryptionEnabled sets the UserVolumeEncryptionEnabled field's value. +func (s *Workspace) SetUserVolumeEncryptionEnabled(v bool) *Workspace { + s.UserVolumeEncryptionEnabled = &v + return s +} + +// SetVolumeEncryptionKey sets the VolumeEncryptionKey field's value. +func (s *Workspace) SetVolumeEncryptionKey(v string) *Workspace { + s.VolumeEncryptionKey = &v + return s +} + +// SetWorkspaceId sets the WorkspaceId field's value. +func (s *Workspace) SetWorkspaceId(v string) *Workspace { + s.WorkspaceId = &v + return s +} + +// SetWorkspaceProperties sets the WorkspaceProperties field's value. +func (s *Workspace) SetWorkspaceProperties(v *WorkspaceProperties) *Workspace { + s.WorkspaceProperties = v + return s +} + +// Describes a WorkSpace bundle. +type WorkspaceBundle struct { + _ struct{} `type:"structure"` + + // The bundle identifier. + BundleId *string `type:"string"` + + // The compute type. For more information, see Amazon WorkSpaces Bundles (http://aws.amazon.com/workspaces/details/#Amazon_WorkSpaces_Bundles). + ComputeType *ComputeType `type:"structure"` + + // A description. + Description *string `type:"string"` + + // The name of the bundle. + Name *string `min:"1" type:"string"` + + // The owner of the bundle. This is the account identifier of the owner, or + // AMAZON if the bundle is provided by AWS. + Owner *string `type:"string"` + + // The size of the root volume. + RootStorage *RootStorage `type:"structure"` + + // The size of the user storage. + UserStorage *UserStorage `type:"structure"` +} + +// String returns the string representation +func (s WorkspaceBundle) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WorkspaceBundle) GoString() string { + return s.String() +} + +// SetBundleId sets the BundleId field's value. +func (s *WorkspaceBundle) SetBundleId(v string) *WorkspaceBundle { + s.BundleId = &v + return s +} + +// SetComputeType sets the ComputeType field's value. +func (s *WorkspaceBundle) SetComputeType(v *ComputeType) *WorkspaceBundle { + s.ComputeType = v + return s +} + +// SetDescription sets the Description field's value. +func (s *WorkspaceBundle) SetDescription(v string) *WorkspaceBundle { + s.Description = &v + return s +} + +// SetName sets the Name field's value. +func (s *WorkspaceBundle) SetName(v string) *WorkspaceBundle { + s.Name = &v + return s +} + +// SetOwner sets the Owner field's value. +func (s *WorkspaceBundle) SetOwner(v string) *WorkspaceBundle { + s.Owner = &v + return s +} + +// SetRootStorage sets the RootStorage field's value. +func (s *WorkspaceBundle) SetRootStorage(v *RootStorage) *WorkspaceBundle { + s.RootStorage = v + return s +} + +// SetUserStorage sets the UserStorage field's value. +func (s *WorkspaceBundle) SetUserStorage(v *UserStorage) *WorkspaceBundle { + s.UserStorage = v + return s +} + +// Describes the connection status of a WorkSpace. +type WorkspaceConnectionStatus struct { + _ struct{} `type:"structure"` + + // The connection state of the WorkSpace. The connection state is unknown if + // the WorkSpace is stopped. + ConnectionState *string `type:"string" enum:"ConnectionState"` + + // The timestamp of the connection status check. + ConnectionStateCheckTimestamp *time.Time `type:"timestamp"` + + // The timestamp of the last known user connection. + LastKnownUserConnectionTimestamp *time.Time `type:"timestamp"` + + // The identifier of the WorkSpace. + WorkspaceId *string `type:"string"` +} + +// String returns the string representation +func (s WorkspaceConnectionStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WorkspaceConnectionStatus) GoString() string { + return s.String() +} + +// SetConnectionState sets the ConnectionState field's value. +func (s *WorkspaceConnectionStatus) SetConnectionState(v string) *WorkspaceConnectionStatus { + s.ConnectionState = &v + return s +} + +// SetConnectionStateCheckTimestamp sets the ConnectionStateCheckTimestamp field's value. +func (s *WorkspaceConnectionStatus) SetConnectionStateCheckTimestamp(v time.Time) *WorkspaceConnectionStatus { + s.ConnectionStateCheckTimestamp = &v + return s +} + +// SetLastKnownUserConnectionTimestamp sets the LastKnownUserConnectionTimestamp field's value. +func (s *WorkspaceConnectionStatus) SetLastKnownUserConnectionTimestamp(v time.Time) *WorkspaceConnectionStatus { + s.LastKnownUserConnectionTimestamp = &v + return s +} + +// SetWorkspaceId sets the WorkspaceId field's value. +func (s *WorkspaceConnectionStatus) SetWorkspaceId(v string) *WorkspaceConnectionStatus { + s.WorkspaceId = &v + return s +} + +// Describes an AWS Directory Service directory that is used with Amazon WorkSpaces. +type WorkspaceDirectory struct { + _ struct{} `type:"structure"` + + // The directory alias. + Alias *string `type:"string"` + + // The user name for the service account. + CustomerUserName *string `min:"1" type:"string"` + + // The directory identifier. + DirectoryId *string `type:"string"` + + // The name of the directory. + DirectoryName *string `type:"string"` + + // The directory type. + DirectoryType *string `type:"string" enum:"WorkspaceDirectoryType"` + + // The IP addresses of the DNS servers for the directory. + DnsIpAddresses []*string `type:"list"` + + // The identifier of the IAM role. This is the role that allows Amazon WorkSpaces + // to make calls to other services, such as Amazon EC2, on your behalf. + IamRoleId *string `type:"string"` + + // The identifiers of the IP access control groups associated with the directory. + IpGroupIds []*string `locationName:"ipGroupIds" type:"list"` + + // The registration code for the directory. This is the code that users enter + // in their Amazon WorkSpaces client application to connect to the directory. + RegistrationCode *string `min:"1" type:"string"` + + // The state of the directory's registration with Amazon WorkSpaces + State *string `type:"string" enum:"WorkspaceDirectoryState"` + + // The identifiers of the subnets used with the directory. + SubnetIds []*string `type:"list"` + + // The default creation properties for all WorkSpaces in the directory. + WorkspaceCreationProperties *DefaultWorkspaceCreationProperties `type:"structure"` + + // The identifier of the security group that is assigned to new WorkSpaces. + WorkspaceSecurityGroupId *string `type:"string"` +} + +// String returns the string representation +func (s WorkspaceDirectory) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WorkspaceDirectory) GoString() string { + return s.String() +} + +// SetAlias sets the Alias field's value. +func (s *WorkspaceDirectory) SetAlias(v string) *WorkspaceDirectory { + s.Alias = &v + return s +} + +// SetCustomerUserName sets the CustomerUserName field's value. +func (s *WorkspaceDirectory) SetCustomerUserName(v string) *WorkspaceDirectory { + s.CustomerUserName = &v + return s +} + +// SetDirectoryId sets the DirectoryId field's value. +func (s *WorkspaceDirectory) SetDirectoryId(v string) *WorkspaceDirectory { + s.DirectoryId = &v + return s +} + +// SetDirectoryName sets the DirectoryName field's value. +func (s *WorkspaceDirectory) SetDirectoryName(v string) *WorkspaceDirectory { + s.DirectoryName = &v + return s +} + +// SetDirectoryType sets the DirectoryType field's value. +func (s *WorkspaceDirectory) SetDirectoryType(v string) *WorkspaceDirectory { + s.DirectoryType = &v + return s +} + +// SetDnsIpAddresses sets the DnsIpAddresses field's value. +func (s *WorkspaceDirectory) SetDnsIpAddresses(v []*string) *WorkspaceDirectory { + s.DnsIpAddresses = v + return s +} + +// SetIamRoleId sets the IamRoleId field's value. +func (s *WorkspaceDirectory) SetIamRoleId(v string) *WorkspaceDirectory { + s.IamRoleId = &v + return s +} + +// SetIpGroupIds sets the IpGroupIds field's value. +func (s *WorkspaceDirectory) SetIpGroupIds(v []*string) *WorkspaceDirectory { + s.IpGroupIds = v + return s +} + +// SetRegistrationCode sets the RegistrationCode field's value. +func (s *WorkspaceDirectory) SetRegistrationCode(v string) *WorkspaceDirectory { + s.RegistrationCode = &v + return s +} + +// SetState sets the State field's value. +func (s *WorkspaceDirectory) SetState(v string) *WorkspaceDirectory { + s.State = &v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *WorkspaceDirectory) SetSubnetIds(v []*string) *WorkspaceDirectory { + s.SubnetIds = v + return s +} + +// SetWorkspaceCreationProperties sets the WorkspaceCreationProperties field's value. +func (s *WorkspaceDirectory) SetWorkspaceCreationProperties(v *DefaultWorkspaceCreationProperties) *WorkspaceDirectory { + s.WorkspaceCreationProperties = v + return s +} + +// SetWorkspaceSecurityGroupId sets the WorkspaceSecurityGroupId field's value. +func (s *WorkspaceDirectory) SetWorkspaceSecurityGroupId(v string) *WorkspaceDirectory { + s.WorkspaceSecurityGroupId = &v + return s +} + +// Describes a WorkSpace image. +type WorkspaceImage struct { + _ struct{} `type:"structure"` + + // The description of the image. + Description *string `min:"1" type:"string"` + + // The error code that is returned for the image. + ErrorCode *string `type:"string"` + + // The text of the error message that is returned for the image. + ErrorMessage *string `type:"string"` + + // The identifier of the image. + ImageId *string `type:"string"` + + // The name of the image. + Name *string `min:"1" type:"string"` + + // The operating system that the image is running. + OperatingSystem *OperatingSystem `type:"structure"` + + // Specifies whether the image is running on dedicated hardware. When bring + // your own license (BYOL) is enabled, this value is set to DEDICATED. + RequiredTenancy *string `type:"string" enum:"WorkspaceImageRequiredTenancy"` + + // The status of the image. + State *string `type:"string" enum:"WorkspaceImageState"` +} + +// String returns the string representation +func (s WorkspaceImage) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WorkspaceImage) GoString() string { + return s.String() +} + +// SetDescription sets the Description field's value. +func (s *WorkspaceImage) SetDescription(v string) *WorkspaceImage { + s.Description = &v + return s +} + +// SetErrorCode sets the ErrorCode field's value. +func (s *WorkspaceImage) SetErrorCode(v string) *WorkspaceImage { + s.ErrorCode = &v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *WorkspaceImage) SetErrorMessage(v string) *WorkspaceImage { + s.ErrorMessage = &v + return s +} + +// SetImageId sets the ImageId field's value. +func (s *WorkspaceImage) SetImageId(v string) *WorkspaceImage { + s.ImageId = &v + return s +} + +// SetName sets the Name field's value. +func (s *WorkspaceImage) SetName(v string) *WorkspaceImage { + s.Name = &v + return s +} + +// SetOperatingSystem sets the OperatingSystem field's value. +func (s *WorkspaceImage) SetOperatingSystem(v *OperatingSystem) *WorkspaceImage { + s.OperatingSystem = v + return s +} + +// SetRequiredTenancy sets the RequiredTenancy field's value. +func (s *WorkspaceImage) SetRequiredTenancy(v string) *WorkspaceImage { + s.RequiredTenancy = &v + return s +} + +// SetState sets the State field's value. +func (s *WorkspaceImage) SetState(v string) *WorkspaceImage { + s.State = &v + return s +} + +// Describes a WorkSpace. +type WorkspaceProperties struct { + _ struct{} `type:"structure"` + + // The compute type. For more information, see Amazon WorkSpaces Bundles (http://aws.amazon.com/workspaces/details/#Amazon_WorkSpaces_Bundles). + ComputeTypeName *string `type:"string" enum:"Compute"` + + // The size of the root volume. + RootVolumeSizeGib *int64 `type:"integer"` + + // The running mode. For more information, see Manage the WorkSpace Running + // Mode (http://docs.aws.amazon.com/workspaces/latest/adminguide/running-mode.html). + RunningMode *string `type:"string" enum:"RunningMode"` + + // The time after a user logs off when WorkSpaces are automatically stopped. + // Configured in 60 minute intervals. + RunningModeAutoStopTimeoutInMinutes *int64 `type:"integer"` + + // The size of the user storage. + UserVolumeSizeGib *int64 `type:"integer"` +} + +// String returns the string representation +func (s WorkspaceProperties) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WorkspaceProperties) GoString() string { + return s.String() +} + +// SetComputeTypeName sets the ComputeTypeName field's value. +func (s *WorkspaceProperties) SetComputeTypeName(v string) *WorkspaceProperties { + s.ComputeTypeName = &v + return s +} + +// SetRootVolumeSizeGib sets the RootVolumeSizeGib field's value. +func (s *WorkspaceProperties) SetRootVolumeSizeGib(v int64) *WorkspaceProperties { + s.RootVolumeSizeGib = &v + return s +} + +// SetRunningMode sets the RunningMode field's value. +func (s *WorkspaceProperties) SetRunningMode(v string) *WorkspaceProperties { + s.RunningMode = &v + return s +} + +// SetRunningModeAutoStopTimeoutInMinutes sets the RunningModeAutoStopTimeoutInMinutes field's value. +func (s *WorkspaceProperties) SetRunningModeAutoStopTimeoutInMinutes(v int64) *WorkspaceProperties { + s.RunningModeAutoStopTimeoutInMinutes = &v + return s +} + +// SetUserVolumeSizeGib sets the UserVolumeSizeGib field's value. +func (s *WorkspaceProperties) SetUserVolumeSizeGib(v int64) *WorkspaceProperties { + s.UserVolumeSizeGib = &v + return s +} + +// Describes the information used to create a WorkSpace. +type WorkspaceRequest struct { + _ struct{} `type:"structure"` + + // The identifier of the bundle for the WorkSpace. You can use DescribeWorkspaceBundles + // to list the available bundles. + // + // BundleId is a required field + BundleId *string `type:"string" required:"true"` + + // The identifier of the AWS Directory Service directory for the WorkSpace. + // You can use DescribeWorkspaceDirectories to list the available directories. + // + // DirectoryId is a required field + DirectoryId *string `type:"string" required:"true"` + + // Indicates whether the data stored on the root volume is encrypted. + RootVolumeEncryptionEnabled *bool `type:"boolean"` + + // The tags for the WorkSpace. + Tags []*Tag `type:"list"` + + // The username of the user for the WorkSpace. This username must exist in the + // AWS Directory Service directory for the WorkSpace. + // + // UserName is a required field + UserName *string `min:"1" type:"string" required:"true"` + + // Indicates whether the data stored on the user volume is encrypted. + UserVolumeEncryptionEnabled *bool `type:"boolean"` + + // The KMS key used to encrypt data stored on your WorkSpace. + VolumeEncryptionKey *string `type:"string"` + + // The WorkSpace properties. + WorkspaceProperties *WorkspaceProperties `type:"structure"` +} + +// String returns the string representation +func (s WorkspaceRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WorkspaceRequest) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *WorkspaceRequest) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "WorkspaceRequest"} + if s.BundleId == nil { + invalidParams.Add(request.NewErrParamRequired("BundleId")) + } + if s.DirectoryId == nil { + invalidParams.Add(request.NewErrParamRequired("DirectoryId")) + } + if s.UserName == nil { + invalidParams.Add(request.NewErrParamRequired("UserName")) + } + if s.UserName != nil && len(*s.UserName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 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 +} + +// SetBundleId sets the BundleId field's value. +func (s *WorkspaceRequest) SetBundleId(v string) *WorkspaceRequest { + s.BundleId = &v + return s +} + +// SetDirectoryId sets the DirectoryId field's value. +func (s *WorkspaceRequest) SetDirectoryId(v string) *WorkspaceRequest { + s.DirectoryId = &v + return s +} + +// SetRootVolumeEncryptionEnabled sets the RootVolumeEncryptionEnabled field's value. +func (s *WorkspaceRequest) SetRootVolumeEncryptionEnabled(v bool) *WorkspaceRequest { + s.RootVolumeEncryptionEnabled = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *WorkspaceRequest) SetTags(v []*Tag) *WorkspaceRequest { + s.Tags = v + return s +} + +// SetUserName sets the UserName field's value. +func (s *WorkspaceRequest) SetUserName(v string) *WorkspaceRequest { + s.UserName = &v + return s +} + +// SetUserVolumeEncryptionEnabled sets the UserVolumeEncryptionEnabled field's value. +func (s *WorkspaceRequest) SetUserVolumeEncryptionEnabled(v bool) *WorkspaceRequest { + s.UserVolumeEncryptionEnabled = &v + return s +} + +// SetVolumeEncryptionKey sets the VolumeEncryptionKey field's value. +func (s *WorkspaceRequest) SetVolumeEncryptionKey(v string) *WorkspaceRequest { + s.VolumeEncryptionKey = &v + return s +} + +// SetWorkspaceProperties sets the WorkspaceProperties field's value. +func (s *WorkspaceRequest) SetWorkspaceProperties(v *WorkspaceProperties) *WorkspaceRequest { + s.WorkspaceProperties = v + return s +} + +const ( + // ComputeValue is a Compute enum value + ComputeValue = "VALUE" + + // ComputeStandard is a Compute enum value + ComputeStandard = "STANDARD" + + // ComputePerformance is a Compute enum value + ComputePerformance = "PERFORMANCE" + + // ComputePower is a Compute enum value + ComputePower = "POWER" + + // ComputeGraphics is a Compute enum value + ComputeGraphics = "GRAPHICS" + + // ComputePowerpro is a Compute enum value + ComputePowerpro = "POWERPRO" + + // ComputeGraphicspro is a Compute enum value + ComputeGraphicspro = "GRAPHICSPRO" +) + +const ( + // ConnectionStateConnected is a ConnectionState enum value + ConnectionStateConnected = "CONNECTED" + + // ConnectionStateDisconnected is a ConnectionState enum value + ConnectionStateDisconnected = "DISCONNECTED" + + // ConnectionStateUnknown is a ConnectionState enum value + ConnectionStateUnknown = "UNKNOWN" +) + +const ( + // DedicatedTenancyModificationStateEnumPending is a DedicatedTenancyModificationStateEnum enum value + DedicatedTenancyModificationStateEnumPending = "PENDING" + + // DedicatedTenancyModificationStateEnumCompleted is a DedicatedTenancyModificationStateEnum enum value + DedicatedTenancyModificationStateEnumCompleted = "COMPLETED" + + // DedicatedTenancyModificationStateEnumFailed is a DedicatedTenancyModificationStateEnum enum value + DedicatedTenancyModificationStateEnumFailed = "FAILED" +) + +const ( + // DedicatedTenancySupportEnumEnabled is a DedicatedTenancySupportEnum enum value + DedicatedTenancySupportEnumEnabled = "ENABLED" +) + +const ( + // DedicatedTenancySupportResultEnumEnabled is a DedicatedTenancySupportResultEnum enum value + DedicatedTenancySupportResultEnumEnabled = "ENABLED" + + // DedicatedTenancySupportResultEnumDisabled is a DedicatedTenancySupportResultEnum enum value + DedicatedTenancySupportResultEnumDisabled = "DISABLED" +) + +const ( + // ModificationResourceEnumRootVolume is a ModificationResourceEnum enum value + ModificationResourceEnumRootVolume = "ROOT_VOLUME" + + // ModificationResourceEnumUserVolume is a ModificationResourceEnum enum value + ModificationResourceEnumUserVolume = "USER_VOLUME" + + // ModificationResourceEnumComputeType is a ModificationResourceEnum enum value + ModificationResourceEnumComputeType = "COMPUTE_TYPE" +) + +const ( + // ModificationStateEnumUpdateInitiated is a ModificationStateEnum enum value + ModificationStateEnumUpdateInitiated = "UPDATE_INITIATED" + + // ModificationStateEnumUpdateInProgress is a ModificationStateEnum enum value + ModificationStateEnumUpdateInProgress = "UPDATE_IN_PROGRESS" +) + +const ( + // OperatingSystemTypeWindows is a OperatingSystemType enum value + OperatingSystemTypeWindows = "WINDOWS" + + // OperatingSystemTypeLinux is a OperatingSystemType enum value + OperatingSystemTypeLinux = "LINUX" +) + +const ( + // ReconnectEnumEnabled is a ReconnectEnum enum value + ReconnectEnumEnabled = "ENABLED" + + // ReconnectEnumDisabled is a ReconnectEnum enum value + ReconnectEnumDisabled = "DISABLED" +) + +const ( + // RunningModeAutoStop is a RunningMode enum value + RunningModeAutoStop = "AUTO_STOP" + + // RunningModeAlwaysOn is a RunningMode enum value + RunningModeAlwaysOn = "ALWAYS_ON" +) + +const ( + // TargetWorkspaceStateAvailable is a TargetWorkspaceState enum value + TargetWorkspaceStateAvailable = "AVAILABLE" + + // TargetWorkspaceStateAdminMaintenance is a TargetWorkspaceState enum value + TargetWorkspaceStateAdminMaintenance = "ADMIN_MAINTENANCE" +) + +const ( + // WorkspaceDirectoryStateRegistering is a WorkspaceDirectoryState enum value + WorkspaceDirectoryStateRegistering = "REGISTERING" + + // WorkspaceDirectoryStateRegistered is a WorkspaceDirectoryState enum value + WorkspaceDirectoryStateRegistered = "REGISTERED" + + // WorkspaceDirectoryStateDeregistering is a WorkspaceDirectoryState enum value + WorkspaceDirectoryStateDeregistering = "DEREGISTERING" + + // WorkspaceDirectoryStateDeregistered is a WorkspaceDirectoryState enum value + WorkspaceDirectoryStateDeregistered = "DEREGISTERED" + + // WorkspaceDirectoryStateError is a WorkspaceDirectoryState enum value + WorkspaceDirectoryStateError = "ERROR" +) + +const ( + // WorkspaceDirectoryTypeSimpleAd is a WorkspaceDirectoryType enum value + WorkspaceDirectoryTypeSimpleAd = "SIMPLE_AD" + + // WorkspaceDirectoryTypeAdConnector is a WorkspaceDirectoryType enum value + WorkspaceDirectoryTypeAdConnector = "AD_CONNECTOR" +) + +const ( + // WorkspaceImageIngestionProcessByolRegular is a WorkspaceImageIngestionProcess enum value + WorkspaceImageIngestionProcessByolRegular = "BYOL_REGULAR" + + // WorkspaceImageIngestionProcessByolGraphics is a WorkspaceImageIngestionProcess enum value + WorkspaceImageIngestionProcessByolGraphics = "BYOL_GRAPHICS" + + // WorkspaceImageIngestionProcessByolGraphicspro is a WorkspaceImageIngestionProcess enum value + WorkspaceImageIngestionProcessByolGraphicspro = "BYOL_GRAPHICSPRO" +) + +const ( + // WorkspaceImageRequiredTenancyDefault is a WorkspaceImageRequiredTenancy enum value + WorkspaceImageRequiredTenancyDefault = "DEFAULT" + + // WorkspaceImageRequiredTenancyDedicated is a WorkspaceImageRequiredTenancy enum value + WorkspaceImageRequiredTenancyDedicated = "DEDICATED" +) + +const ( + // WorkspaceImageStateAvailable is a WorkspaceImageState enum value + WorkspaceImageStateAvailable = "AVAILABLE" + + // WorkspaceImageStatePending is a WorkspaceImageState enum value + WorkspaceImageStatePending = "PENDING" + + // WorkspaceImageStateError is a WorkspaceImageState enum value + WorkspaceImageStateError = "ERROR" +) + +const ( + // WorkspaceStatePending is a WorkspaceState enum value + WorkspaceStatePending = "PENDING" + + // WorkspaceStateAvailable is a WorkspaceState enum value + WorkspaceStateAvailable = "AVAILABLE" + + // WorkspaceStateImpaired is a WorkspaceState enum value + WorkspaceStateImpaired = "IMPAIRED" + + // WorkspaceStateUnhealthy is a WorkspaceState enum value + WorkspaceStateUnhealthy = "UNHEALTHY" + + // WorkspaceStateRebooting is a WorkspaceState enum value + WorkspaceStateRebooting = "REBOOTING" + + // WorkspaceStateStarting is a WorkspaceState enum value + WorkspaceStateStarting = "STARTING" + + // WorkspaceStateRebuilding is a WorkspaceState enum value + WorkspaceStateRebuilding = "REBUILDING" + + // WorkspaceStateMaintenance is a WorkspaceState enum value + WorkspaceStateMaintenance = "MAINTENANCE" + + // WorkspaceStateAdminMaintenance is a WorkspaceState enum value + WorkspaceStateAdminMaintenance = "ADMIN_MAINTENANCE" + + // WorkspaceStateTerminating is a WorkspaceState enum value + WorkspaceStateTerminating = "TERMINATING" + + // WorkspaceStateTerminated is a WorkspaceState enum value + WorkspaceStateTerminated = "TERMINATED" + + // WorkspaceStateSuspended is a WorkspaceState enum value + WorkspaceStateSuspended = "SUSPENDED" + + // WorkspaceStateUpdating is a WorkspaceState enum value + WorkspaceStateUpdating = "UPDATING" + + // WorkspaceStateStopping is a WorkspaceState enum value + WorkspaceStateStopping = "STOPPING" + + // WorkspaceStateStopped is a WorkspaceState enum value + WorkspaceStateStopped = "STOPPED" + + // WorkspaceStateError is a WorkspaceState enum value + WorkspaceStateError = "ERROR" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/workspaces/doc.go b/vendor/github.com/aws/aws-sdk-go/service/workspaces/doc.go new file mode 100644 index 0000000000..882a1973f0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/workspaces/doc.go @@ -0,0 +1,29 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package workspaces provides the client and types for making API +// requests to Amazon WorkSpaces. +// +// Amazon WorkSpaces enables you to provision virtual, cloud-based Microsoft +// Windows and Amazon Linux desktops for your users. +// +// See https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08 for more information on this service. +// +// See workspaces package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/workspaces/ +// +// Using the Client +// +// To contact Amazon WorkSpaces 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 Amazon WorkSpaces client WorkSpaces for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/workspaces/#New +package workspaces diff --git a/vendor/github.com/aws/aws-sdk-go/service/workspaces/errors.go b/vendor/github.com/aws/aws-sdk-go/service/workspaces/errors.go new file mode 100644 index 0000000000..2083335b77 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/workspaces/errors.go @@ -0,0 +1,80 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package workspaces + +const ( + + // ErrCodeAccessDeniedException for service response error code + // "AccessDeniedException". + // + // The user is not authorized to access a resource. + ErrCodeAccessDeniedException = "AccessDeniedException" + + // ErrCodeInvalidParameterValuesException for service response error code + // "InvalidParameterValuesException". + // + // One or more parameter values are not valid. + ErrCodeInvalidParameterValuesException = "InvalidParameterValuesException" + + // ErrCodeInvalidResourceStateException for service response error code + // "InvalidResourceStateException". + // + // The state of the resource is not valid for this operation. + ErrCodeInvalidResourceStateException = "InvalidResourceStateException" + + // ErrCodeOperationInProgressException for service response error code + // "OperationInProgressException". + // + // The properties of this WorkSpace are currently being modified. Try again + // in a moment. + ErrCodeOperationInProgressException = "OperationInProgressException" + + // ErrCodeOperationNotSupportedException for service response error code + // "OperationNotSupportedException". + // + // This operation is not supported. + ErrCodeOperationNotSupportedException = "OperationNotSupportedException" + + // ErrCodeResourceAlreadyExistsException for service response error code + // "ResourceAlreadyExistsException". + // + // The specified resource already exists. + ErrCodeResourceAlreadyExistsException = "ResourceAlreadyExistsException" + + // ErrCodeResourceAssociatedException for service response error code + // "ResourceAssociatedException". + // + // The resource is associated with a directory. + ErrCodeResourceAssociatedException = "ResourceAssociatedException" + + // ErrCodeResourceCreationFailedException for service response error code + // "ResourceCreationFailedException". + // + // The resource could not be created. + ErrCodeResourceCreationFailedException = "ResourceCreationFailedException" + + // ErrCodeResourceLimitExceededException for service response error code + // "ResourceLimitExceededException". + // + // Your resource limits have been exceeded. + ErrCodeResourceLimitExceededException = "ResourceLimitExceededException" + + // ErrCodeResourceNotFoundException for service response error code + // "ResourceNotFoundException". + // + // The resource could not be found. + ErrCodeResourceNotFoundException = "ResourceNotFoundException" + + // ErrCodeResourceUnavailableException for service response error code + // "ResourceUnavailableException". + // + // The specified resource is not available. + ErrCodeResourceUnavailableException = "ResourceUnavailableException" + + // ErrCodeUnsupportedWorkspaceConfigurationException for service response error code + // "UnsupportedWorkspaceConfigurationException". + // + // The configuration of this WorkSpace is not supported for this operation. + // For more information, see the Amazon WorkSpaces Administration Guide (http://docs.aws.amazon.com/workspaces/latest/adminguide/). + ErrCodeUnsupportedWorkspaceConfigurationException = "UnsupportedWorkspaceConfigurationException" +) diff --git a/vendor/github.com/aws/aws-sdk-go/service/workspaces/service.go b/vendor/github.com/aws/aws-sdk-go/service/workspaces/service.go new file mode 100644 index 0000000000..38e1cc2ee1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/workspaces/service.go @@ -0,0 +1,97 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package workspaces + +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/jsonrpc" +) + +// WorkSpaces provides the API operation methods for making requests to +// Amazon WorkSpaces. See this package's package overview docs +// for details on the service. +// +// WorkSpaces methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type WorkSpaces 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 = "workspaces" // Name of service. + EndpointsID = ServiceName // ID to lookup a service endpoint with. + ServiceID = "WorkSpaces" // ServiceID is a unique identifer of a specific service. +) + +// New creates a new instance of the WorkSpaces 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: +// // Create a WorkSpaces client from just a session. +// svc := workspaces.New(mySession) +// +// // Create a WorkSpaces client with additional configuration +// svc := workspaces.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *WorkSpaces { + c := p.ClientConfig(EndpointsID, cfgs...) + return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *WorkSpaces { + svc := &WorkSpaces{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + Endpoint: endpoint, + APIVersion: "2015-04-08", + JSONVersion: "1.1", + TargetPrefix: "WorkspacesService", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a WorkSpaces operation and runs any +// custom request initialization. +func (c *WorkSpaces) 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/davecgh/go-spew/LICENSE b/vendor/github.com/davecgh/go-spew/LICENSE index c836416192..bc52e96f2b 100644 --- a/vendor/github.com/davecgh/go-spew/LICENSE +++ b/vendor/github.com/davecgh/go-spew/LICENSE @@ -2,7 +2,7 @@ ISC License Copyright (c) 2012-2016 Dave Collins -Permission to use, copy, modify, and distribute this software for any +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. diff --git a/vendor/github.com/davecgh/go-spew/spew/bypass.go b/vendor/github.com/davecgh/go-spew/spew/bypass.go index 8a4a6589a2..792994785e 100644 --- a/vendor/github.com/davecgh/go-spew/spew/bypass.go +++ b/vendor/github.com/davecgh/go-spew/spew/bypass.go @@ -16,7 +16,9 @@ // when the code is not running on Google App Engine, compiled by GopherJS, and // "-tags safe" is not added to the go build command line. The "disableunsafe" // tag is deprecated and thus should not be used. -// +build !js,!appengine,!safe,!disableunsafe +// Go versions prior to 1.4 are disabled because they use a different layout +// for interfaces which make the implementation of unsafeReflectValue more complex. +// +build !js,!appengine,!safe,!disableunsafe,go1.4 package spew @@ -34,80 +36,49 @@ const ( ptrSize = unsafe.Sizeof((*byte)(nil)) ) +type flag uintptr + var ( - // offsetPtr, offsetScalar, and offsetFlag are the offsets for the - // internal reflect.Value fields. These values are valid before golang - // commit ecccf07e7f9d which changed the format. The are also valid - // after commit 82f48826c6c7 which changed the format again to mirror - // the original format. Code in the init function updates these offsets - // as necessary. - offsetPtr = uintptr(ptrSize) - offsetScalar = uintptr(0) - offsetFlag = uintptr(ptrSize * 2) - - // flagKindWidth and flagKindShift indicate various bits that the - // reflect package uses internally to track kind information. - // - // flagRO indicates whether or not the value field of a reflect.Value is - // read-only. - // - // flagIndir indicates whether the value field of a reflect.Value is - // the actual data or a pointer to the data. - // - // These values are valid before golang commit 90a7c3c86944 which - // changed their positions. Code in the init function updates these - // flags as necessary. - flagKindWidth = uintptr(5) - flagKindShift = uintptr(flagKindWidth - 1) - flagRO = uintptr(1 << 0) - flagIndir = uintptr(1 << 1) + // flagRO indicates whether the value field of a reflect.Value + // is read-only. + flagRO flag + + // flagAddr indicates whether the address of the reflect.Value's + // value may be taken. + flagAddr flag ) -func init() { - // Older versions of reflect.Value stored small integers directly in the - // ptr field (which is named val in the older versions). Versions - // between commits ecccf07e7f9d and 82f48826c6c7 added a new field named - // scalar for this purpose which unfortunately came before the flag - // field, so the offset of the flag field is different for those - // versions. - // - // This code constructs a new reflect.Value from a known small integer - // and checks if the size of the reflect.Value struct indicates it has - // the scalar field. When it does, the offsets are updated accordingly. - vv := reflect.ValueOf(0xf00) - if unsafe.Sizeof(vv) == (ptrSize * 4) { - offsetScalar = ptrSize * 2 - offsetFlag = ptrSize * 3 - } +// flagKindMask holds the bits that make up the kind +// part of the flags field. In all the supported versions, +// it is in the lower 5 bits. +const flagKindMask = flag(0x1f) - // Commit 90a7c3c86944 changed the flag positions such that the low - // order bits are the kind. This code extracts the kind from the flags - // field and ensures it's the correct type. When it's not, the flag - // order has been changed to the newer format, so the flags are updated - // accordingly. - upf := unsafe.Pointer(uintptr(unsafe.Pointer(&vv)) + offsetFlag) - upfv := *(*uintptr)(upf) - flagKindMask := uintptr((1<>flagKindShift != uintptr(reflect.Int) { - flagKindShift = 0 - flagRO = 1 << 5 - flagIndir = 1 << 6 - - // Commit adf9b30e5594 modified the flags to separate the - // flagRO flag into two bits which specifies whether or not the - // field is embedded. This causes flagIndir to move over a bit - // and means that flagRO is the combination of either of the - // original flagRO bit and the new bit. - // - // This code detects the change by extracting what used to be - // the indirect bit to ensure it's set. When it's not, the flag - // order has been changed to the newer format, so the flags are - // updated accordingly. - if upfv&flagIndir == 0 { - flagRO = 3 << 5 - flagIndir = 1 << 7 - } +// Different versions of Go have used different +// bit layouts for the flags type. This table +// records the known combinations. +var okFlags = []struct { + ro, addr flag +}{{ + // From Go 1.4 to 1.5 + ro: 1 << 5, + addr: 1 << 7, +}, { + // Up to Go tip. + ro: 1<<5 | 1<<6, + addr: 1 << 8, +}} + +var flagValOffset = func() uintptr { + field, ok := reflect.TypeOf(reflect.Value{}).FieldByName("flag") + if !ok { + panic("reflect.Value has no flag field") } + return field.Offset +}() + +// flagField returns a pointer to the flag field of a reflect.Value. +func flagField(v *reflect.Value) *flag { + return (*flag)(unsafe.Pointer(uintptr(unsafe.Pointer(v)) + flagValOffset)) } // unsafeReflectValue converts the passed reflect.Value into a one that bypasses @@ -119,34 +90,56 @@ func init() { // This allows us to check for implementations of the Stringer and error // interfaces to be used for pretty printing ordinarily unaddressable and // inaccessible values such as unexported struct fields. -func unsafeReflectValue(v reflect.Value) (rv reflect.Value) { - indirects := 1 - vt := v.Type() - upv := unsafe.Pointer(uintptr(unsafe.Pointer(&v)) + offsetPtr) - rvf := *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&v)) + offsetFlag)) - if rvf&flagIndir != 0 { - vt = reflect.PtrTo(v.Type()) - indirects++ - } else if offsetScalar != 0 { - // The value is in the scalar field when it's not one of the - // reference types. - switch vt.Kind() { - case reflect.Uintptr: - case reflect.Chan: - case reflect.Func: - case reflect.Map: - case reflect.Ptr: - case reflect.UnsafePointer: - default: - upv = unsafe.Pointer(uintptr(unsafe.Pointer(&v)) + - offsetScalar) - } +func unsafeReflectValue(v reflect.Value) reflect.Value { + if !v.IsValid() || (v.CanInterface() && v.CanAddr()) { + return v } + flagFieldPtr := flagField(&v) + *flagFieldPtr &^= flagRO + *flagFieldPtr |= flagAddr + return v +} - pv := reflect.NewAt(vt, upv) - rv = pv - for i := 0; i < indirects; i++ { - rv = rv.Elem() +// Sanity checks against future reflect package changes +// to the type or semantics of the Value.flag field. +func init() { + field, ok := reflect.TypeOf(reflect.Value{}).FieldByName("flag") + if !ok { + panic("reflect.Value has no flag field") + } + if field.Type.Kind() != reflect.TypeOf(flag(0)).Kind() { + panic("reflect.Value flag field has changed kind") + } + type t0 int + var t struct { + A t0 + // t0 will have flagEmbedRO set. + t0 + // a will have flagStickyRO set + a t0 + } + vA := reflect.ValueOf(t).FieldByName("A") + va := reflect.ValueOf(t).FieldByName("a") + vt0 := reflect.ValueOf(t).FieldByName("t0") + + // Infer flagRO from the difference between the flags + // for the (otherwise identical) fields in t. + flagPublic := *flagField(&vA) + flagWithRO := *flagField(&va) | *flagField(&vt0) + flagRO = flagPublic ^ flagWithRO + + // Infer flagAddr from the difference between a value + // taken from a pointer and not. + vPtrA := reflect.ValueOf(&t).Elem().FieldByName("A") + flagNoPtr := *flagField(&vA) + flagPtr := *flagField(&vPtrA) + flagAddr = flagNoPtr ^ flagPtr + + // Check that the inferred flags tally with one of the known versions. + for _, f := range okFlags { + if flagRO == f.ro && flagAddr == f.addr { + return + } } - return rv + panic("reflect.Value read-only flag has changed semantics") } diff --git a/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go b/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go index 1fe3cf3d5d..205c28d68c 100644 --- a/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go +++ b/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go @@ -16,7 +16,7 @@ // when the code is running on Google App Engine, compiled by GopherJS, or // "-tags safe" is added to the go build command line. The "disableunsafe" // tag is deprecated and thus should not be used. -// +build js appengine safe disableunsafe +// +build js appengine safe disableunsafe !go1.4 package spew diff --git a/vendor/github.com/davecgh/go-spew/spew/common.go b/vendor/github.com/davecgh/go-spew/spew/common.go index 7c519ff47a..1be8ce9457 100644 --- a/vendor/github.com/davecgh/go-spew/spew/common.go +++ b/vendor/github.com/davecgh/go-spew/spew/common.go @@ -180,7 +180,7 @@ func printComplex(w io.Writer, c complex128, floatPrecision int) { w.Write(closeParenBytes) } -// printHexPtr outputs a uintptr formatted as hexidecimal with a leading '0x' +// printHexPtr outputs a uintptr formatted as hexadecimal with a leading '0x' // prefix to Writer w. func printHexPtr(w io.Writer, p uintptr) { // Null pointer. diff --git a/vendor/github.com/davecgh/go-spew/spew/dump.go b/vendor/github.com/davecgh/go-spew/spew/dump.go index df1d582a72..f78d89fc1f 100644 --- a/vendor/github.com/davecgh/go-spew/spew/dump.go +++ b/vendor/github.com/davecgh/go-spew/spew/dump.go @@ -35,16 +35,16 @@ var ( // cCharRE is a regular expression that matches a cgo char. // It is used to detect character arrays to hexdump them. - cCharRE = regexp.MustCompile("^.*\\._Ctype_char$") + cCharRE = regexp.MustCompile(`^.*\._Ctype_char$`) // cUnsignedCharRE is a regular expression that matches a cgo unsigned // char. It is used to detect unsigned character arrays to hexdump // them. - cUnsignedCharRE = regexp.MustCompile("^.*\\._Ctype_unsignedchar$") + cUnsignedCharRE = regexp.MustCompile(`^.*\._Ctype_unsignedchar$`) // cUint8tCharRE is a regular expression that matches a cgo uint8_t. // It is used to detect uint8_t arrays to hexdump them. - cUint8tCharRE = regexp.MustCompile("^.*\\._Ctype_uint8_t$") + cUint8tCharRE = regexp.MustCompile(`^.*\._Ctype_uint8_t$`) ) // dumpState contains information about the state of a dump operation. @@ -143,10 +143,10 @@ func (d *dumpState) dumpPtr(v reflect.Value) { // Display dereferenced value. d.w.Write(openParenBytes) switch { - case nilFound == true: + case nilFound: d.w.Write(nilAngleBytes) - case cycleFound == true: + case cycleFound: d.w.Write(circularBytes) default: diff --git a/vendor/github.com/davecgh/go-spew/spew/format.go b/vendor/github.com/davecgh/go-spew/spew/format.go index c49875bacb..b04edb7d7a 100644 --- a/vendor/github.com/davecgh/go-spew/spew/format.go +++ b/vendor/github.com/davecgh/go-spew/spew/format.go @@ -182,10 +182,10 @@ func (f *formatState) formatPtr(v reflect.Value) { // Display dereferenced value. switch { - case nilFound == true: + case nilFound: f.fs.Write(nilAngleBytes) - case cycleFound == true: + case cycleFound: f.fs.Write(circularShortBytes) default: diff --git a/vendor/github.com/go-ini/ini/LICENSE b/vendor/github.com/go-ini/ini/LICENSE deleted file mode 100644 index d361bbcdf5..0000000000 --- a/vendor/github.com/go-ini/ini/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - -"Object" form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was -submitted. If You institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work or a -Contribution incorporated within the Work constitutes direct or contributory -patent infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms and -conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms of -any separate license agreement you may have executed with Licensor regarding -such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the -Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, -including, without limitation, any warranties or conditions of TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are -solely responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your exercise of -permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not limited to -damages for loss of goodwill, work stoppage, computer failure or malfunction, or -any and all other commercial damages or losses), even if such Contributor has -been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to -offer, and charge a fee for, acceptance of support, warranty, indemnity, or -other liability obligations and/or rights consistent with this License. However, -in accepting such obligations, You may act only on Your own behalf and on Your -sole responsibility, not on behalf of any other Contributor, and only if You -agree to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own -identifying information. (Don't include the brackets!) The text should be -enclosed in the appropriate comment syntax for the file format. We also -recommend that a file or class name and description of purpose be included on -the same "printed page" as the copyright notice for easier identification within -third-party archives. - - Copyright 2014 Unknwon - - 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. diff --git a/vendor/github.com/go-ini/ini/error.go b/vendor/github.com/go-ini/ini/error.go deleted file mode 100644 index 80afe74315..0000000000 --- a/vendor/github.com/go-ini/ini/error.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2016 Unknwon -// -// 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 ini - -import ( - "fmt" -) - -type ErrDelimiterNotFound struct { - Line string -} - -func IsErrDelimiterNotFound(err error) bool { - _, ok := err.(ErrDelimiterNotFound) - return ok -} - -func (err ErrDelimiterNotFound) Error() string { - return fmt.Sprintf("key-value delimiter not found: %s", err.Line) -} diff --git a/vendor/github.com/go-ini/ini/file.go b/vendor/github.com/go-ini/ini/file.go deleted file mode 100644 index d7982c3235..0000000000 --- a/vendor/github.com/go-ini/ini/file.go +++ /dev/null @@ -1,407 +0,0 @@ -// Copyright 2017 Unknwon -// -// 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 ini - -import ( - "bytes" - "errors" - "fmt" - "io" - "io/ioutil" - "os" - "strings" - "sync" -) - -// File represents a combination of a or more INI file(s) in memory. -type File struct { - options LoadOptions - dataSources []dataSource - - // Should make things safe, but sometimes doesn't matter. - BlockMode bool - lock sync.RWMutex - - // To keep data in order. - sectionList []string - // Actual data is stored here. - sections map[string]*Section - - NameMapper - ValueMapper -} - -// newFile initializes File object with given data sources. -func newFile(dataSources []dataSource, opts LoadOptions) *File { - return &File{ - BlockMode: true, - dataSources: dataSources, - sections: make(map[string]*Section), - sectionList: make([]string, 0, 10), - options: opts, - } -} - -// Empty returns an empty file object. -func Empty() *File { - // Ignore error here, we sure our data is good. - f, _ := Load([]byte("")) - return f -} - -// NewSection creates a new section. -func (f *File) NewSection(name string) (*Section, error) { - if len(name) == 0 { - return nil, errors.New("error creating new section: empty section name") - } else if f.options.Insensitive && name != DEFAULT_SECTION { - name = strings.ToLower(name) - } - - if f.BlockMode { - f.lock.Lock() - defer f.lock.Unlock() - } - - if inSlice(name, f.sectionList) { - return f.sections[name], nil - } - - f.sectionList = append(f.sectionList, name) - f.sections[name] = newSection(f, name) - return f.sections[name], nil -} - -// NewRawSection creates a new section with an unparseable body. -func (f *File) NewRawSection(name, body string) (*Section, error) { - section, err := f.NewSection(name) - if err != nil { - return nil, err - } - - section.isRawSection = true - section.rawBody = body - return section, nil -} - -// NewSections creates a list of sections. -func (f *File) NewSections(names ...string) (err error) { - for _, name := range names { - if _, err = f.NewSection(name); err != nil { - return err - } - } - return nil -} - -// GetSection returns section by given name. -func (f *File) GetSection(name string) (*Section, error) { - if len(name) == 0 { - name = DEFAULT_SECTION - } - if f.options.Insensitive { - name = strings.ToLower(name) - } - - if f.BlockMode { - f.lock.RLock() - defer f.lock.RUnlock() - } - - sec := f.sections[name] - if sec == nil { - return nil, fmt.Errorf("section '%s' does not exist", name) - } - return sec, nil -} - -// Section assumes named section exists and returns a zero-value when not. -func (f *File) Section(name string) *Section { - sec, err := f.GetSection(name) - if err != nil { - // Note: It's OK here because the only possible error is empty section name, - // but if it's empty, this piece of code won't be executed. - sec, _ = f.NewSection(name) - return sec - } - return sec -} - -// Section returns list of Section. -func (f *File) Sections() []*Section { - if f.BlockMode { - f.lock.RLock() - defer f.lock.RUnlock() - } - - sections := make([]*Section, len(f.sectionList)) - for i, name := range f.sectionList { - sections[i] = f.sections[name] - } - return sections -} - -// ChildSections returns a list of child sections of given section name. -func (f *File) ChildSections(name string) []*Section { - return f.Section(name).ChildSections() -} - -// SectionStrings returns list of section names. -func (f *File) SectionStrings() []string { - list := make([]string, len(f.sectionList)) - copy(list, f.sectionList) - return list -} - -// DeleteSection deletes a section. -func (f *File) DeleteSection(name string) { - if f.BlockMode { - f.lock.Lock() - defer f.lock.Unlock() - } - - if len(name) == 0 { - name = DEFAULT_SECTION - } - - for i, s := range f.sectionList { - if s == name { - f.sectionList = append(f.sectionList[:i], f.sectionList[i+1:]...) - delete(f.sections, name) - return - } - } -} - -func (f *File) reload(s dataSource) error { - r, err := s.ReadCloser() - if err != nil { - return err - } - defer r.Close() - - return f.parse(r) -} - -// Reload reloads and parses all data sources. -func (f *File) Reload() (err error) { - for _, s := range f.dataSources { - if err = f.reload(s); err != nil { - // In loose mode, we create an empty default section for nonexistent files. - if os.IsNotExist(err) && f.options.Loose { - f.parse(bytes.NewBuffer(nil)) - continue - } - return err - } - } - return nil -} - -// Append appends one or more data sources and reloads automatically. -func (f *File) Append(source interface{}, others ...interface{}) error { - ds, err := parseDataSource(source) - if err != nil { - return err - } - f.dataSources = append(f.dataSources, ds) - for _, s := range others { - ds, err = parseDataSource(s) - if err != nil { - return err - } - f.dataSources = append(f.dataSources, ds) - } - return f.Reload() -} - -func (f *File) writeToBuffer(indent string) (*bytes.Buffer, error) { - equalSign := "=" - if PrettyFormat || PrettyEqual { - equalSign = " = " - } - - // Use buffer to make sure target is safe until finish encoding. - buf := bytes.NewBuffer(nil) - for i, sname := range f.sectionList { - sec := f.Section(sname) - if len(sec.Comment) > 0 { - if sec.Comment[0] != '#' && sec.Comment[0] != ';' { - sec.Comment = "; " + sec.Comment - } else { - sec.Comment = sec.Comment[:1] + " " + strings.TrimSpace(sec.Comment[1:]) - } - if _, err := buf.WriteString(sec.Comment + LineBreak); err != nil { - return nil, err - } - } - - if i > 0 || DefaultHeader { - if _, err := buf.WriteString("[" + sname + "]" + LineBreak); err != nil { - return nil, err - } - } else { - // Write nothing if default section is empty - if len(sec.keyList) == 0 { - continue - } - } - - if sec.isRawSection { - if _, err := buf.WriteString(sec.rawBody); err != nil { - return nil, err - } - - if PrettySection { - // Put a line between sections - if _, err := buf.WriteString(LineBreak); err != nil { - return nil, err - } - } - continue - } - - // Count and generate alignment length and buffer spaces using the - // longest key. Keys may be modifed if they contain certain characters so - // we need to take that into account in our calculation. - alignLength := 0 - if PrettyFormat { - for _, kname := range sec.keyList { - keyLength := len(kname) - // First case will surround key by ` and second by """ - if strings.ContainsAny(kname, "\"=:") { - keyLength += 2 - } else if strings.Contains(kname, "`") { - keyLength += 6 - } - - if keyLength > alignLength { - alignLength = keyLength - } - } - } - alignSpaces := bytes.Repeat([]byte(" "), alignLength) - - KEY_LIST: - for _, kname := range sec.keyList { - key := sec.Key(kname) - if len(key.Comment) > 0 { - if len(indent) > 0 && sname != DEFAULT_SECTION { - buf.WriteString(indent) - } - if key.Comment[0] != '#' && key.Comment[0] != ';' { - key.Comment = "; " + key.Comment - } else { - key.Comment = key.Comment[:1] + " " + strings.TrimSpace(key.Comment[1:]) - } - - // Support multiline comments - key.Comment = strings.Replace(key.Comment, "\n", "\n; ", -1) - - if _, err := buf.WriteString(key.Comment + LineBreak); err != nil { - return nil, err - } - } - - if len(indent) > 0 && sname != DEFAULT_SECTION { - buf.WriteString(indent) - } - - switch { - case key.isAutoIncrement: - kname = "-" - case strings.ContainsAny(kname, "\"=:"): - kname = "`" + kname + "`" - case strings.Contains(kname, "`"): - kname = `"""` + kname + `"""` - } - - for _, val := range key.ValueWithShadows() { - if _, err := buf.WriteString(kname); err != nil { - return nil, err - } - - if key.isBooleanType { - if kname != sec.keyList[len(sec.keyList)-1] { - buf.WriteString(LineBreak) - } - continue KEY_LIST - } - - // Write out alignment spaces before "=" sign - if PrettyFormat { - buf.Write(alignSpaces[:alignLength-len(kname)]) - } - - // In case key value contains "\n", "`", "\"", "#" or ";" - if strings.ContainsAny(val, "\n`") { - val = `"""` + val + `"""` - } else if !f.options.IgnoreInlineComment && strings.ContainsAny(val, "#;") { - val = "`" + val + "`" - } - if _, err := buf.WriteString(equalSign + val + LineBreak); err != nil { - return nil, err - } - } - - for _, val := range key.nestedValues { - if _, err := buf.WriteString(indent + " " + val + LineBreak); err != nil { - return nil, err - } - } - } - - if PrettySection { - // Put a line between sections - if _, err := buf.WriteString(LineBreak); err != nil { - return nil, err - } - } - } - - return buf, nil -} - -// WriteToIndent writes content into io.Writer with given indention. -// If PrettyFormat has been set to be true, -// it will align "=" sign with spaces under each section. -func (f *File) WriteToIndent(w io.Writer, indent string) (int64, error) { - buf, err := f.writeToBuffer(indent) - if err != nil { - return 0, err - } - return buf.WriteTo(w) -} - -// WriteTo writes file content into io.Writer. -func (f *File) WriteTo(w io.Writer) (int64, error) { - return f.WriteToIndent(w, "") -} - -// SaveToIndent writes content to file system with given value indention. -func (f *File) SaveToIndent(filename, indent string) error { - // Note: Because we are truncating with os.Create, - // so it's safer to save to a temporary file location and rename afte done. - buf, err := f.writeToBuffer(indent) - if err != nil { - return err - } - - return ioutil.WriteFile(filename, buf.Bytes(), 0666) -} - -// SaveTo writes content to file system. -func (f *File) SaveTo(filename string) error { - return f.SaveToIndent(filename, "") -} diff --git a/vendor/github.com/go-ini/ini/ini.go b/vendor/github.com/go-ini/ini/ini.go deleted file mode 100644 index 595f6002fc..0000000000 --- a/vendor/github.com/go-ini/ini/ini.go +++ /dev/null @@ -1,211 +0,0 @@ -// +build go1.6 - -// Copyright 2014 Unknwon -// -// 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 ini provides INI file read and write functionality in Go. -package ini - -import ( - "bytes" - "fmt" - "io" - "io/ioutil" - "os" - "regexp" - "runtime" -) - -const ( - // Name for default section. You can use this constant or the string literal. - // In most of cases, an empty string is all you need to access the section. - DEFAULT_SECTION = "DEFAULT" - - // Maximum allowed depth when recursively substituing variable names. - _DEPTH_VALUES = 99 - _VERSION = "1.38.1" -) - -// Version returns current package version literal. -func Version() string { - return _VERSION -} - -var ( - // Delimiter to determine or compose a new line. - // This variable will be changed to "\r\n" automatically on Windows - // at package init time. - LineBreak = "\n" - - // Variable regexp pattern: %(variable)s - varPattern = regexp.MustCompile(`%\(([^\)]+)\)s`) - - // Indicate whether to align "=" sign with spaces to produce pretty output - // or reduce all possible spaces for compact format. - PrettyFormat = true - - // Place spaces around "=" sign even when PrettyFormat is false - PrettyEqual = false - - // Explicitly write DEFAULT section header - DefaultHeader = false - - // Indicate whether to put a line between sections - PrettySection = true -) - -func init() { - if runtime.GOOS == "windows" { - LineBreak = "\r\n" - } -} - -func inSlice(str string, s []string) bool { - for _, v := range s { - if str == v { - return true - } - } - return false -} - -// dataSource is an interface that returns object which can be read and closed. -type dataSource interface { - ReadCloser() (io.ReadCloser, error) -} - -// sourceFile represents an object that contains content on the local file system. -type sourceFile struct { - name string -} - -func (s sourceFile) ReadCloser() (_ io.ReadCloser, err error) { - return os.Open(s.name) -} - -// sourceData represents an object that contains content in memory. -type sourceData struct { - data []byte -} - -func (s *sourceData) ReadCloser() (io.ReadCloser, error) { - return ioutil.NopCloser(bytes.NewReader(s.data)), nil -} - -// sourceReadCloser represents an input stream with Close method. -type sourceReadCloser struct { - reader io.ReadCloser -} - -func (s *sourceReadCloser) ReadCloser() (io.ReadCloser, error) { - return s.reader, nil -} - -func parseDataSource(source interface{}) (dataSource, error) { - switch s := source.(type) { - case string: - return sourceFile{s}, nil - case []byte: - return &sourceData{s}, nil - case io.ReadCloser: - return &sourceReadCloser{s}, nil - default: - return nil, fmt.Errorf("error parsing data source: unknown type '%s'", s) - } -} - -type LoadOptions struct { - // Loose indicates whether the parser should ignore nonexistent files or return error. - Loose bool - // Insensitive indicates whether the parser forces all section and key names to lowercase. - Insensitive bool - // IgnoreContinuation indicates whether to ignore continuation lines while parsing. - IgnoreContinuation bool - // IgnoreInlineComment indicates whether to ignore comments at the end of value and treat it as part of value. - IgnoreInlineComment bool - // SkipUnrecognizableLines indicates whether to skip unrecognizable lines that do not conform to key/value pairs. - SkipUnrecognizableLines bool - // AllowBooleanKeys indicates whether to allow boolean type keys or treat as value is missing. - // This type of keys are mostly used in my.cnf. - AllowBooleanKeys bool - // AllowShadows indicates whether to keep track of keys with same name under same section. - AllowShadows bool - // AllowNestedValues indicates whether to allow AWS-like nested values. - // Docs: http://docs.aws.amazon.com/cli/latest/topic/config-vars.html#nested-values - AllowNestedValues bool - // AllowPythonMultilineValues indicates whether to allow Python-like multi-line values. - // Docs: https://docs.python.org/3/library/configparser.html#supported-ini-file-structure - // Relevant quote: Values can also span multiple lines, as long as they are indented deeper - // than the first line of the value. - AllowPythonMultilineValues bool - // SpaceBeforeInlineComment indicates whether to allow comment symbols (\# and \;) inside value. - // Docs: https://docs.python.org/2/library/configparser.html - // Quote: Comments may appear on their own in an otherwise empty line, or may be entered in lines holding values or section names. - // In the latter case, they need to be preceded by a whitespace character to be recognized as a comment. - SpaceBeforeInlineComment bool - // UnescapeValueDoubleQuotes indicates whether to unescape double quotes inside value to regular format - // when value is surrounded by double quotes, e.g. key="a \"value\"" => key=a "value" - UnescapeValueDoubleQuotes bool - // UnescapeValueCommentSymbols indicates to unescape comment symbols (\# and \;) inside value to regular format - // when value is NOT surrounded by any quotes. - // Note: UNSTABLE, behavior might change to only unescape inside double quotes but may noy necessary at all. - UnescapeValueCommentSymbols bool - // UnparseableSections stores a list of blocks that are allowed with raw content which do not otherwise - // conform to key/value pairs. Specify the names of those blocks here. - UnparseableSections []string -} - -func LoadSources(opts LoadOptions, source interface{}, others ...interface{}) (_ *File, err error) { - sources := make([]dataSource, len(others)+1) - sources[0], err = parseDataSource(source) - if err != nil { - return nil, err - } - for i := range others { - sources[i+1], err = parseDataSource(others[i]) - if err != nil { - return nil, err - } - } - f := newFile(sources, opts) - if err = f.Reload(); err != nil { - return nil, err - } - return f, nil -} - -// Load loads and parses from INI data sources. -// Arguments can be mixed of file name with string type, or raw data in []byte. -// It will return error if list contains nonexistent files. -func Load(source interface{}, others ...interface{}) (*File, error) { - return LoadSources(LoadOptions{}, source, others...) -} - -// LooseLoad has exactly same functionality as Load function -// except it ignores nonexistent files instead of returning error. -func LooseLoad(source interface{}, others ...interface{}) (*File, error) { - return LoadSources(LoadOptions{Loose: true}, source, others...) -} - -// InsensitiveLoad has exactly same functionality as Load function -// except it forces all section and key names to be lowercased. -func InsensitiveLoad(source interface{}, others ...interface{}) (*File, error) { - return LoadSources(LoadOptions{Insensitive: true}, source, others...) -} - -// InsensitiveLoad has exactly same functionality as Load function -// except it allows have shadow keys. -func ShadowLoad(source interface{}, others ...interface{}) (*File, error) { - return LoadSources(LoadOptions{AllowShadows: true}, source, others...) -} diff --git a/vendor/github.com/go-ini/ini/key.go b/vendor/github.com/go-ini/ini/key.go deleted file mode 100644 index 7c8566a1b4..0000000000 --- a/vendor/github.com/go-ini/ini/key.go +++ /dev/null @@ -1,751 +0,0 @@ -// Copyright 2014 Unknwon -// -// 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 ini - -import ( - "bytes" - "errors" - "fmt" - "strconv" - "strings" - "time" -) - -// Key represents a key under a section. -type Key struct { - s *Section - Comment string - name string - value string - isAutoIncrement bool - isBooleanType bool - - isShadow bool - shadows []*Key - - nestedValues []string -} - -// newKey simply return a key object with given values. -func newKey(s *Section, name, val string) *Key { - return &Key{ - s: s, - name: name, - value: val, - } -} - -func (k *Key) addShadow(val string) error { - if k.isShadow { - return errors.New("cannot add shadow to another shadow key") - } else if k.isAutoIncrement || k.isBooleanType { - return errors.New("cannot add shadow to auto-increment or boolean key") - } - - shadow := newKey(k.s, k.name, val) - shadow.isShadow = true - k.shadows = append(k.shadows, shadow) - return nil -} - -// AddShadow adds a new shadow key to itself. -func (k *Key) AddShadow(val string) error { - if !k.s.f.options.AllowShadows { - return errors.New("shadow key is not allowed") - } - return k.addShadow(val) -} - -func (k *Key) addNestedValue(val string) error { - if k.isAutoIncrement || k.isBooleanType { - return errors.New("cannot add nested value to auto-increment or boolean key") - } - - k.nestedValues = append(k.nestedValues, val) - return nil -} - -func (k *Key) AddNestedValue(val string) error { - if !k.s.f.options.AllowNestedValues { - return errors.New("nested value is not allowed") - } - return k.addNestedValue(val) -} - -// ValueMapper represents a mapping function for values, e.g. os.ExpandEnv -type ValueMapper func(string) string - -// Name returns name of key. -func (k *Key) Name() string { - return k.name -} - -// Value returns raw value of key for performance purpose. -func (k *Key) Value() string { - return k.value -} - -// ValueWithShadows returns raw values of key and its shadows if any. -func (k *Key) ValueWithShadows() []string { - if len(k.shadows) == 0 { - return []string{k.value} - } - vals := make([]string, len(k.shadows)+1) - vals[0] = k.value - for i := range k.shadows { - vals[i+1] = k.shadows[i].value - } - return vals -} - -// NestedValues returns nested values stored in the key. -// It is possible returned value is nil if no nested values stored in the key. -func (k *Key) NestedValues() []string { - return k.nestedValues -} - -// transformValue takes a raw value and transforms to its final string. -func (k *Key) transformValue(val string) string { - if k.s.f.ValueMapper != nil { - val = k.s.f.ValueMapper(val) - } - - // Fail-fast if no indicate char found for recursive value - if !strings.Contains(val, "%") { - return val - } - for i := 0; i < _DEPTH_VALUES; i++ { - vr := varPattern.FindString(val) - if len(vr) == 0 { - break - } - - // Take off leading '%(' and trailing ')s'. - noption := strings.TrimLeft(vr, "%(") - noption = strings.TrimRight(noption, ")s") - - // Search in the same section. - nk, err := k.s.GetKey(noption) - if err != nil || k == nk { - // Search again in default section. - nk, _ = k.s.f.Section("").GetKey(noption) - } - - // Substitute by new value and take off leading '%(' and trailing ')s'. - val = strings.Replace(val, vr, nk.value, -1) - } - return val -} - -// String returns string representation of value. -func (k *Key) String() string { - return k.transformValue(k.value) -} - -// Validate accepts a validate function which can -// return modifed result as key value. -func (k *Key) Validate(fn func(string) string) string { - return fn(k.String()) -} - -// parseBool returns the boolean value represented by the string. -// -// It accepts 1, t, T, TRUE, true, True, YES, yes, Yes, y, ON, on, On, -// 0, f, F, FALSE, false, False, NO, no, No, n, OFF, off, Off. -// Any other value returns an error. -func parseBool(str string) (value bool, err error) { - switch str { - case "1", "t", "T", "true", "TRUE", "True", "YES", "yes", "Yes", "y", "ON", "on", "On": - return true, nil - case "0", "f", "F", "false", "FALSE", "False", "NO", "no", "No", "n", "OFF", "off", "Off": - return false, nil - } - return false, fmt.Errorf("parsing \"%s\": invalid syntax", str) -} - -// Bool returns bool type value. -func (k *Key) Bool() (bool, error) { - return parseBool(k.String()) -} - -// Float64 returns float64 type value. -func (k *Key) Float64() (float64, error) { - return strconv.ParseFloat(k.String(), 64) -} - -// Int returns int type value. -func (k *Key) Int() (int, error) { - return strconv.Atoi(k.String()) -} - -// Int64 returns int64 type value. -func (k *Key) Int64() (int64, error) { - return strconv.ParseInt(k.String(), 10, 64) -} - -// Uint returns uint type valued. -func (k *Key) Uint() (uint, error) { - u, e := strconv.ParseUint(k.String(), 10, 64) - return uint(u), e -} - -// Uint64 returns uint64 type value. -func (k *Key) Uint64() (uint64, error) { - return strconv.ParseUint(k.String(), 10, 64) -} - -// Duration returns time.Duration type value. -func (k *Key) Duration() (time.Duration, error) { - return time.ParseDuration(k.String()) -} - -// TimeFormat parses with given format and returns time.Time type value. -func (k *Key) TimeFormat(format string) (time.Time, error) { - return time.Parse(format, k.String()) -} - -// Time parses with RFC3339 format and returns time.Time type value. -func (k *Key) Time() (time.Time, error) { - return k.TimeFormat(time.RFC3339) -} - -// MustString returns default value if key value is empty. -func (k *Key) MustString(defaultVal string) string { - val := k.String() - if len(val) == 0 { - k.value = defaultVal - return defaultVal - } - return val -} - -// MustBool always returns value without error, -// it returns false if error occurs. -func (k *Key) MustBool(defaultVal ...bool) bool { - val, err := k.Bool() - if len(defaultVal) > 0 && err != nil { - k.value = strconv.FormatBool(defaultVal[0]) - return defaultVal[0] - } - return val -} - -// MustFloat64 always returns value without error, -// it returns 0.0 if error occurs. -func (k *Key) MustFloat64(defaultVal ...float64) float64 { - val, err := k.Float64() - if len(defaultVal) > 0 && err != nil { - k.value = strconv.FormatFloat(defaultVal[0], 'f', -1, 64) - return defaultVal[0] - } - return val -} - -// MustInt always returns value without error, -// it returns 0 if error occurs. -func (k *Key) MustInt(defaultVal ...int) int { - val, err := k.Int() - if len(defaultVal) > 0 && err != nil { - k.value = strconv.FormatInt(int64(defaultVal[0]), 10) - return defaultVal[0] - } - return val -} - -// MustInt64 always returns value without error, -// it returns 0 if error occurs. -func (k *Key) MustInt64(defaultVal ...int64) int64 { - val, err := k.Int64() - if len(defaultVal) > 0 && err != nil { - k.value = strconv.FormatInt(defaultVal[0], 10) - return defaultVal[0] - } - return val -} - -// MustUint always returns value without error, -// it returns 0 if error occurs. -func (k *Key) MustUint(defaultVal ...uint) uint { - val, err := k.Uint() - if len(defaultVal) > 0 && err != nil { - k.value = strconv.FormatUint(uint64(defaultVal[0]), 10) - return defaultVal[0] - } - return val -} - -// MustUint64 always returns value without error, -// it returns 0 if error occurs. -func (k *Key) MustUint64(defaultVal ...uint64) uint64 { - val, err := k.Uint64() - if len(defaultVal) > 0 && err != nil { - k.value = strconv.FormatUint(defaultVal[0], 10) - return defaultVal[0] - } - return val -} - -// MustDuration always returns value without error, -// it returns zero value if error occurs. -func (k *Key) MustDuration(defaultVal ...time.Duration) time.Duration { - val, err := k.Duration() - if len(defaultVal) > 0 && err != nil { - k.value = defaultVal[0].String() - return defaultVal[0] - } - return val -} - -// MustTimeFormat always parses with given format and returns value without error, -// it returns zero value if error occurs. -func (k *Key) MustTimeFormat(format string, defaultVal ...time.Time) time.Time { - val, err := k.TimeFormat(format) - if len(defaultVal) > 0 && err != nil { - k.value = defaultVal[0].Format(format) - return defaultVal[0] - } - return val -} - -// MustTime always parses with RFC3339 format and returns value without error, -// it returns zero value if error occurs. -func (k *Key) MustTime(defaultVal ...time.Time) time.Time { - return k.MustTimeFormat(time.RFC3339, defaultVal...) -} - -// In always returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) In(defaultVal string, candidates []string) string { - val := k.String() - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InFloat64 always returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InFloat64(defaultVal float64, candidates []float64) float64 { - val := k.MustFloat64() - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InInt always returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InInt(defaultVal int, candidates []int) int { - val := k.MustInt() - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InInt64 always returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InInt64(defaultVal int64, candidates []int64) int64 { - val := k.MustInt64() - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InUint always returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InUint(defaultVal uint, candidates []uint) uint { - val := k.MustUint() - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InUint64 always returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InUint64(defaultVal uint64, candidates []uint64) uint64 { - val := k.MustUint64() - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InTimeFormat always parses with given format and returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InTimeFormat(format string, defaultVal time.Time, candidates []time.Time) time.Time { - val := k.MustTimeFormat(format) - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InTime always parses with RFC3339 format and returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InTime(defaultVal time.Time, candidates []time.Time) time.Time { - return k.InTimeFormat(time.RFC3339, defaultVal, candidates) -} - -// RangeFloat64 checks if value is in given range inclusively, -// and returns default value if it's not. -func (k *Key) RangeFloat64(defaultVal, min, max float64) float64 { - val := k.MustFloat64() - if val < min || val > max { - return defaultVal - } - return val -} - -// RangeInt checks if value is in given range inclusively, -// and returns default value if it's not. -func (k *Key) RangeInt(defaultVal, min, max int) int { - val := k.MustInt() - if val < min || val > max { - return defaultVal - } - return val -} - -// RangeInt64 checks if value is in given range inclusively, -// and returns default value if it's not. -func (k *Key) RangeInt64(defaultVal, min, max int64) int64 { - val := k.MustInt64() - if val < min || val > max { - return defaultVal - } - return val -} - -// RangeTimeFormat checks if value with given format is in given range inclusively, -// and returns default value if it's not. -func (k *Key) RangeTimeFormat(format string, defaultVal, min, max time.Time) time.Time { - val := k.MustTimeFormat(format) - if val.Unix() < min.Unix() || val.Unix() > max.Unix() { - return defaultVal - } - return val -} - -// RangeTime checks if value with RFC3339 format is in given range inclusively, -// and returns default value if it's not. -func (k *Key) RangeTime(defaultVal, min, max time.Time) time.Time { - return k.RangeTimeFormat(time.RFC3339, defaultVal, min, max) -} - -// Strings returns list of string divided by given delimiter. -func (k *Key) Strings(delim string) []string { - str := k.String() - if len(str) == 0 { - return []string{} - } - - runes := []rune(str) - vals := make([]string, 0, 2) - var buf bytes.Buffer - escape := false - idx := 0 - for { - if escape { - escape = false - if runes[idx] != '\\' && !strings.HasPrefix(string(runes[idx:]), delim) { - buf.WriteRune('\\') - } - buf.WriteRune(runes[idx]) - } else { - if runes[idx] == '\\' { - escape = true - } else if strings.HasPrefix(string(runes[idx:]), delim) { - idx += len(delim) - 1 - vals = append(vals, strings.TrimSpace(buf.String())) - buf.Reset() - } else { - buf.WriteRune(runes[idx]) - } - } - idx += 1 - if idx == len(runes) { - break - } - } - - if buf.Len() > 0 { - vals = append(vals, strings.TrimSpace(buf.String())) - } - - return vals -} - -// StringsWithShadows returns list of string divided by given delimiter. -// Shadows will also be appended if any. -func (k *Key) StringsWithShadows(delim string) []string { - vals := k.ValueWithShadows() - results := make([]string, 0, len(vals)*2) - for i := range vals { - if len(vals) == 0 { - continue - } - - results = append(results, strings.Split(vals[i], delim)...) - } - - for i := range results { - results[i] = k.transformValue(strings.TrimSpace(results[i])) - } - return results -} - -// Float64s returns list of float64 divided by given delimiter. Any invalid input will be treated as zero value. -func (k *Key) Float64s(delim string) []float64 { - vals, _ := k.parseFloat64s(k.Strings(delim), true, false) - return vals -} - -// Ints returns list of int divided by given delimiter. Any invalid input will be treated as zero value. -func (k *Key) Ints(delim string) []int { - vals, _ := k.parseInts(k.Strings(delim), true, false) - return vals -} - -// Int64s returns list of int64 divided by given delimiter. Any invalid input will be treated as zero value. -func (k *Key) Int64s(delim string) []int64 { - vals, _ := k.parseInt64s(k.Strings(delim), true, false) - return vals -} - -// Uints returns list of uint divided by given delimiter. Any invalid input will be treated as zero value. -func (k *Key) Uints(delim string) []uint { - vals, _ := k.parseUints(k.Strings(delim), true, false) - return vals -} - -// Uint64s returns list of uint64 divided by given delimiter. Any invalid input will be treated as zero value. -func (k *Key) Uint64s(delim string) []uint64 { - vals, _ := k.parseUint64s(k.Strings(delim), true, false) - return vals -} - -// TimesFormat parses with given format and returns list of time.Time divided by given delimiter. -// Any invalid input will be treated as zero value (0001-01-01 00:00:00 +0000 UTC). -func (k *Key) TimesFormat(format, delim string) []time.Time { - vals, _ := k.parseTimesFormat(format, k.Strings(delim), true, false) - return vals -} - -// Times parses with RFC3339 format and returns list of time.Time divided by given delimiter. -// Any invalid input will be treated as zero value (0001-01-01 00:00:00 +0000 UTC). -func (k *Key) Times(delim string) []time.Time { - return k.TimesFormat(time.RFC3339, delim) -} - -// ValidFloat64s returns list of float64 divided by given delimiter. If some value is not float, then -// it will not be included to result list. -func (k *Key) ValidFloat64s(delim string) []float64 { - vals, _ := k.parseFloat64s(k.Strings(delim), false, false) - return vals -} - -// ValidInts returns list of int divided by given delimiter. If some value is not integer, then it will -// not be included to result list. -func (k *Key) ValidInts(delim string) []int { - vals, _ := k.parseInts(k.Strings(delim), false, false) - return vals -} - -// ValidInt64s returns list of int64 divided by given delimiter. If some value is not 64-bit integer, -// then it will not be included to result list. -func (k *Key) ValidInt64s(delim string) []int64 { - vals, _ := k.parseInt64s(k.Strings(delim), false, false) - return vals -} - -// ValidUints returns list of uint divided by given delimiter. If some value is not unsigned integer, -// then it will not be included to result list. -func (k *Key) ValidUints(delim string) []uint { - vals, _ := k.parseUints(k.Strings(delim), false, false) - return vals -} - -// ValidUint64s returns list of uint64 divided by given delimiter. If some value is not 64-bit unsigned -// integer, then it will not be included to result list. -func (k *Key) ValidUint64s(delim string) []uint64 { - vals, _ := k.parseUint64s(k.Strings(delim), false, false) - return vals -} - -// ValidTimesFormat parses with given format and returns list of time.Time divided by given delimiter. -func (k *Key) ValidTimesFormat(format, delim string) []time.Time { - vals, _ := k.parseTimesFormat(format, k.Strings(delim), false, false) - return vals -} - -// ValidTimes parses with RFC3339 format and returns list of time.Time divided by given delimiter. -func (k *Key) ValidTimes(delim string) []time.Time { - return k.ValidTimesFormat(time.RFC3339, delim) -} - -// StrictFloat64s returns list of float64 divided by given delimiter or error on first invalid input. -func (k *Key) StrictFloat64s(delim string) ([]float64, error) { - return k.parseFloat64s(k.Strings(delim), false, true) -} - -// StrictInts returns list of int divided by given delimiter or error on first invalid input. -func (k *Key) StrictInts(delim string) ([]int, error) { - return k.parseInts(k.Strings(delim), false, true) -} - -// StrictInt64s returns list of int64 divided by given delimiter or error on first invalid input. -func (k *Key) StrictInt64s(delim string) ([]int64, error) { - return k.parseInt64s(k.Strings(delim), false, true) -} - -// StrictUints returns list of uint divided by given delimiter or error on first invalid input. -func (k *Key) StrictUints(delim string) ([]uint, error) { - return k.parseUints(k.Strings(delim), false, true) -} - -// StrictUint64s returns list of uint64 divided by given delimiter or error on first invalid input. -func (k *Key) StrictUint64s(delim string) ([]uint64, error) { - return k.parseUint64s(k.Strings(delim), false, true) -} - -// StrictTimesFormat parses with given format and returns list of time.Time divided by given delimiter -// or error on first invalid input. -func (k *Key) StrictTimesFormat(format, delim string) ([]time.Time, error) { - return k.parseTimesFormat(format, k.Strings(delim), false, true) -} - -// StrictTimes parses with RFC3339 format and returns list of time.Time divided by given delimiter -// or error on first invalid input. -func (k *Key) StrictTimes(delim string) ([]time.Time, error) { - return k.StrictTimesFormat(time.RFC3339, delim) -} - -// parseFloat64s transforms strings to float64s. -func (k *Key) parseFloat64s(strs []string, addInvalid, returnOnInvalid bool) ([]float64, error) { - vals := make([]float64, 0, len(strs)) - for _, str := range strs { - val, err := strconv.ParseFloat(str, 64) - if err != nil && returnOnInvalid { - return nil, err - } - if err == nil || addInvalid { - vals = append(vals, val) - } - } - return vals, nil -} - -// parseInts transforms strings to ints. -func (k *Key) parseInts(strs []string, addInvalid, returnOnInvalid bool) ([]int, error) { - vals := make([]int, 0, len(strs)) - for _, str := range strs { - val, err := strconv.Atoi(str) - if err != nil && returnOnInvalid { - return nil, err - } - if err == nil || addInvalid { - vals = append(vals, val) - } - } - return vals, nil -} - -// parseInt64s transforms strings to int64s. -func (k *Key) parseInt64s(strs []string, addInvalid, returnOnInvalid bool) ([]int64, error) { - vals := make([]int64, 0, len(strs)) - for _, str := range strs { - val, err := strconv.ParseInt(str, 10, 64) - if err != nil && returnOnInvalid { - return nil, err - } - if err == nil || addInvalid { - vals = append(vals, val) - } - } - return vals, nil -} - -// parseUints transforms strings to uints. -func (k *Key) parseUints(strs []string, addInvalid, returnOnInvalid bool) ([]uint, error) { - vals := make([]uint, 0, len(strs)) - for _, str := range strs { - val, err := strconv.ParseUint(str, 10, 0) - if err != nil && returnOnInvalid { - return nil, err - } - if err == nil || addInvalid { - vals = append(vals, uint(val)) - } - } - return vals, nil -} - -// parseUint64s transforms strings to uint64s. -func (k *Key) parseUint64s(strs []string, addInvalid, returnOnInvalid bool) ([]uint64, error) { - vals := make([]uint64, 0, len(strs)) - for _, str := range strs { - val, err := strconv.ParseUint(str, 10, 64) - if err != nil && returnOnInvalid { - return nil, err - } - if err == nil || addInvalid { - vals = append(vals, val) - } - } - return vals, nil -} - -// parseTimesFormat transforms strings to times in given format. -func (k *Key) parseTimesFormat(format string, strs []string, addInvalid, returnOnInvalid bool) ([]time.Time, error) { - vals := make([]time.Time, 0, len(strs)) - for _, str := range strs { - val, err := time.Parse(format, str) - if err != nil && returnOnInvalid { - return nil, err - } - if err == nil || addInvalid { - vals = append(vals, val) - } - } - return vals, nil -} - -// SetValue changes key value. -func (k *Key) SetValue(v string) { - if k.s.f.BlockMode { - k.s.f.lock.Lock() - defer k.s.f.lock.Unlock() - } - - k.value = v - k.s.keysHash[k.name] = v -} diff --git a/vendor/github.com/go-ini/ini/parser.go b/vendor/github.com/go-ini/ini/parser.go deleted file mode 100644 index 3daf54c38a..0000000000 --- a/vendor/github.com/go-ini/ini/parser.go +++ /dev/null @@ -1,494 +0,0 @@ -// Copyright 2015 Unknwon -// -// 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 ini - -import ( - "bufio" - "bytes" - "fmt" - "io" - "regexp" - "strconv" - "strings" - "unicode" -) - -var pythonMultiline = regexp.MustCompile("^(\\s+)([^\n]+)") - -type tokenType int - -const ( - _TOKEN_INVALID tokenType = iota - _TOKEN_COMMENT - _TOKEN_SECTION - _TOKEN_KEY -) - -type parser struct { - buf *bufio.Reader - isEOF bool - count int - comment *bytes.Buffer -} - -func newParser(r io.Reader) *parser { - return &parser{ - buf: bufio.NewReader(r), - count: 1, - comment: &bytes.Buffer{}, - } -} - -// BOM handles header of UTF-8, UTF-16 LE and UTF-16 BE's BOM format. -// http://en.wikipedia.org/wiki/Byte_order_mark#Representations_of_byte_order_marks_by_encoding -func (p *parser) BOM() error { - mask, err := p.buf.Peek(2) - if err != nil && err != io.EOF { - return err - } else if len(mask) < 2 { - return nil - } - - switch { - case mask[0] == 254 && mask[1] == 255: - fallthrough - case mask[0] == 255 && mask[1] == 254: - p.buf.Read(mask) - case mask[0] == 239 && mask[1] == 187: - mask, err := p.buf.Peek(3) - if err != nil && err != io.EOF { - return err - } else if len(mask) < 3 { - return nil - } - if mask[2] == 191 { - p.buf.Read(mask) - } - } - return nil -} - -func (p *parser) readUntil(delim byte) ([]byte, error) { - data, err := p.buf.ReadBytes(delim) - if err != nil { - if err == io.EOF { - p.isEOF = true - } else { - return nil, err - } - } - return data, nil -} - -func cleanComment(in []byte) ([]byte, bool) { - i := bytes.IndexAny(in, "#;") - if i == -1 { - return nil, false - } - return in[i:], true -} - -func readKeyName(in []byte) (string, int, error) { - line := string(in) - - // Check if key name surrounded by quotes. - var keyQuote string - if line[0] == '"' { - if len(line) > 6 && string(line[0:3]) == `"""` { - keyQuote = `"""` - } else { - keyQuote = `"` - } - } else if line[0] == '`' { - keyQuote = "`" - } - - // Get out key name - endIdx := -1 - if len(keyQuote) > 0 { - startIdx := len(keyQuote) - // FIXME: fail case -> """"""name"""=value - pos := strings.Index(line[startIdx:], keyQuote) - if pos == -1 { - return "", -1, fmt.Errorf("missing closing key quote: %s", line) - } - pos += startIdx - - // Find key-value delimiter - i := strings.IndexAny(line[pos+startIdx:], "=:") - if i < 0 { - return "", -1, ErrDelimiterNotFound{line} - } - endIdx = pos + i - return strings.TrimSpace(line[startIdx:pos]), endIdx + startIdx + 1, nil - } - - endIdx = strings.IndexAny(line, "=:") - if endIdx < 0 { - return "", -1, ErrDelimiterNotFound{line} - } - return strings.TrimSpace(line[0:endIdx]), endIdx + 1, nil -} - -func (p *parser) readMultilines(line, val, valQuote string) (string, error) { - for { - data, err := p.readUntil('\n') - if err != nil { - return "", err - } - next := string(data) - - pos := strings.LastIndex(next, valQuote) - if pos > -1 { - val += next[:pos] - - comment, has := cleanComment([]byte(next[pos:])) - if has { - p.comment.Write(bytes.TrimSpace(comment)) - } - break - } - val += next - if p.isEOF { - return "", fmt.Errorf("missing closing key quote from '%s' to '%s'", line, next) - } - } - return val, nil -} - -func (p *parser) readContinuationLines(val string) (string, error) { - for { - data, err := p.readUntil('\n') - if err != nil { - return "", err - } - next := strings.TrimSpace(string(data)) - - if len(next) == 0 { - break - } - val += next - if val[len(val)-1] != '\\' { - break - } - val = val[:len(val)-1] - } - return val, nil -} - -// hasSurroundedQuote check if and only if the first and last characters -// are quotes \" or \'. -// It returns false if any other parts also contain same kind of quotes. -func hasSurroundedQuote(in string, quote byte) bool { - return len(in) >= 2 && in[0] == quote && in[len(in)-1] == quote && - strings.IndexByte(in[1:], quote) == len(in)-2 -} - -func (p *parser) readValue(in []byte, - parserBufferSize int, - ignoreContinuation, ignoreInlineComment, unescapeValueDoubleQuotes, unescapeValueCommentSymbols, allowPythonMultilines, spaceBeforeInlineComment bool) (string, error) { - - line := strings.TrimLeftFunc(string(in), unicode.IsSpace) - if len(line) == 0 { - return "", nil - } - - var valQuote string - if len(line) > 3 && string(line[0:3]) == `"""` { - valQuote = `"""` - } else if line[0] == '`' { - valQuote = "`" - } else if unescapeValueDoubleQuotes && line[0] == '"' { - valQuote = `"` - } - - if len(valQuote) > 0 { - startIdx := len(valQuote) - pos := strings.LastIndex(line[startIdx:], valQuote) - // Check for multi-line value - if pos == -1 { - return p.readMultilines(line, line[startIdx:], valQuote) - } - - if unescapeValueDoubleQuotes && valQuote == `"` { - return strings.Replace(line[startIdx:pos+startIdx], `\"`, `"`, -1), nil - } - return line[startIdx : pos+startIdx], nil - } - - lastChar := line[len(line)-1] - // Won't be able to reach here if value only contains whitespace - line = strings.TrimSpace(line) - trimmedLastChar := line[len(line)-1] - - // Check continuation lines when desired - if !ignoreContinuation && trimmedLastChar == '\\' { - return p.readContinuationLines(line[:len(line)-1]) - } - - // Check if ignore inline comment - if !ignoreInlineComment { - var i int - if spaceBeforeInlineComment { - i = strings.Index(line, " #") - if i == -1 { - i = strings.Index(line, " ;") - } - - } else { - i = strings.IndexAny(line, "#;") - } - - if i > -1 { - p.comment.WriteString(line[i:]) - line = strings.TrimSpace(line[:i]) - } - - } - - // Trim single and double quotes - if hasSurroundedQuote(line, '\'') || - hasSurroundedQuote(line, '"') { - line = line[1 : len(line)-1] - } else if len(valQuote) == 0 && unescapeValueCommentSymbols { - if strings.Contains(line, `\;`) { - line = strings.Replace(line, `\;`, ";", -1) - } - if strings.Contains(line, `\#`) { - line = strings.Replace(line, `\#`, "#", -1) - } - } else if allowPythonMultilines && lastChar == '\n' { - parserBufferPeekResult, _ := p.buf.Peek(parserBufferSize) - peekBuffer := bytes.NewBuffer(parserBufferPeekResult) - - identSize := -1 - val := line - - for { - peekData, peekErr := peekBuffer.ReadBytes('\n') - if peekErr != nil { - if peekErr == io.EOF { - return val, nil - } - return "", peekErr - } - - peekMatches := pythonMultiline.FindStringSubmatch(string(peekData)) - if len(peekMatches) != 3 { - return val, nil - } - - currentIdentSize := len(peekMatches[1]) - // NOTE: Return if not a python-ini multi-line value. - if currentIdentSize < 0 { - return val, nil - } - identSize = currentIdentSize - - // NOTE: Just advance the parser reader (buffer) in-sync with the peek buffer. - _, err := p.readUntil('\n') - if err != nil { - return "", err - } - - val += fmt.Sprintf("\n%s", peekMatches[2]) - } - - // NOTE: If it was a Python multi-line value, - // return the appended value. - if identSize > 0 { - return val, nil - } - } - - return line, nil -} - -// parse parses data through an io.Reader. -func (f *File) parse(reader io.Reader) (err error) { - p := newParser(reader) - if err = p.BOM(); err != nil { - return fmt.Errorf("BOM: %v", err) - } - - // Ignore error because default section name is never empty string. - name := DEFAULT_SECTION - if f.options.Insensitive { - name = strings.ToLower(DEFAULT_SECTION) - } - section, _ := f.NewSection(name) - - // This "last" is not strictly equivalent to "previous one" if current key is not the first nested key - var isLastValueEmpty bool - var lastRegularKey *Key - - var line []byte - var inUnparseableSection bool - - // NOTE: Iterate and increase `currentPeekSize` until - // the size of the parser buffer is found. - // TODO(unknwon): When Golang 1.10 is the lowest version supported, replace with `parserBufferSize := p.buf.Size()`. - parserBufferSize := 0 - // NOTE: Peek 1kb at a time. - currentPeekSize := 1024 - - if f.options.AllowPythonMultilineValues { - for { - peekBytes, _ := p.buf.Peek(currentPeekSize) - peekBytesLength := len(peekBytes) - - if parserBufferSize >= peekBytesLength { - break - } - - currentPeekSize *= 2 - parserBufferSize = peekBytesLength - } - } - - for !p.isEOF { - line, err = p.readUntil('\n') - if err != nil { - return err - } - - if f.options.AllowNestedValues && - isLastValueEmpty && len(line) > 0 { - if line[0] == ' ' || line[0] == '\t' { - lastRegularKey.addNestedValue(string(bytes.TrimSpace(line))) - continue - } - } - - line = bytes.TrimLeftFunc(line, unicode.IsSpace) - if len(line) == 0 { - continue - } - - // Comments - if line[0] == '#' || line[0] == ';' { - // Note: we do not care ending line break, - // it is needed for adding second line, - // so just clean it once at the end when set to value. - p.comment.Write(line) - continue - } - - // Section - if line[0] == '[' { - // Read to the next ']' (TODO: support quoted strings) - closeIdx := bytes.LastIndexByte(line, ']') - if closeIdx == -1 { - return fmt.Errorf("unclosed section: %s", line) - } - - name := string(line[1:closeIdx]) - section, err = f.NewSection(name) - if err != nil { - return err - } - - comment, has := cleanComment(line[closeIdx+1:]) - if has { - p.comment.Write(comment) - } - - section.Comment = strings.TrimSpace(p.comment.String()) - - // Reset aotu-counter and comments - p.comment.Reset() - p.count = 1 - - inUnparseableSection = false - for i := range f.options.UnparseableSections { - if f.options.UnparseableSections[i] == name || - (f.options.Insensitive && strings.ToLower(f.options.UnparseableSections[i]) == strings.ToLower(name)) { - inUnparseableSection = true - continue - } - } - continue - } - - if inUnparseableSection { - section.isRawSection = true - section.rawBody += string(line) - continue - } - - kname, offset, err := readKeyName(line) - if err != nil { - // Treat as boolean key when desired, and whole line is key name. - if IsErrDelimiterNotFound(err) { - switch { - case f.options.AllowBooleanKeys: - kname, err := p.readValue(line, - parserBufferSize, - f.options.IgnoreContinuation, - f.options.IgnoreInlineComment, - f.options.UnescapeValueDoubleQuotes, - f.options.UnescapeValueCommentSymbols, - f.options.AllowPythonMultilineValues, - f.options.SpaceBeforeInlineComment) - if err != nil { - return err - } - key, err := section.NewBooleanKey(kname) - if err != nil { - return err - } - key.Comment = strings.TrimSpace(p.comment.String()) - p.comment.Reset() - continue - - case f.options.SkipUnrecognizableLines: - continue - } - } - return err - } - - // Auto increment. - isAutoIncr := false - if kname == "-" { - isAutoIncr = true - kname = "#" + strconv.Itoa(p.count) - p.count++ - } - - value, err := p.readValue(line[offset:], - parserBufferSize, - f.options.IgnoreContinuation, - f.options.IgnoreInlineComment, - f.options.UnescapeValueDoubleQuotes, - f.options.UnescapeValueCommentSymbols, - f.options.AllowPythonMultilineValues, - f.options.SpaceBeforeInlineComment) - if err != nil { - return err - } - isLastValueEmpty = len(value) == 0 - - key, err := section.NewKey(kname, value) - if err != nil { - return err - } - key.isAutoIncrement = isAutoIncr - key.Comment = strings.TrimSpace(p.comment.String()) - p.comment.Reset() - lastRegularKey = key - } - return nil -} diff --git a/vendor/github.com/go-ini/ini/section.go b/vendor/github.com/go-ini/ini/section.go deleted file mode 100644 index 340a1efad7..0000000000 --- a/vendor/github.com/go-ini/ini/section.go +++ /dev/null @@ -1,258 +0,0 @@ -// Copyright 2014 Unknwon -// -// 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 ini - -import ( - "errors" - "fmt" - "strings" -) - -// Section represents a config section. -type Section struct { - f *File - Comment string - name string - keys map[string]*Key - keyList []string - keysHash map[string]string - - isRawSection bool - rawBody string -} - -func newSection(f *File, name string) *Section { - return &Section{ - f: f, - name: name, - keys: make(map[string]*Key), - keyList: make([]string, 0, 10), - keysHash: make(map[string]string), - } -} - -// Name returns name of Section. -func (s *Section) Name() string { - return s.name -} - -// Body returns rawBody of Section if the section was marked as unparseable. -// It still follows the other rules of the INI format surrounding leading/trailing whitespace. -func (s *Section) Body() string { - return strings.TrimSpace(s.rawBody) -} - -// SetBody updates body content only if section is raw. -func (s *Section) SetBody(body string) { - if !s.isRawSection { - return - } - s.rawBody = body -} - -// NewKey creates a new key to given section. -func (s *Section) NewKey(name, val string) (*Key, error) { - if len(name) == 0 { - return nil, errors.New("error creating new key: empty key name") - } else if s.f.options.Insensitive { - name = strings.ToLower(name) - } - - if s.f.BlockMode { - s.f.lock.Lock() - defer s.f.lock.Unlock() - } - - if inSlice(name, s.keyList) { - if s.f.options.AllowShadows { - if err := s.keys[name].addShadow(val); err != nil { - return nil, err - } - } else { - s.keys[name].value = val - s.keysHash[name] = val - } - return s.keys[name], nil - } - - s.keyList = append(s.keyList, name) - s.keys[name] = newKey(s, name, val) - s.keysHash[name] = val - return s.keys[name], nil -} - -// NewBooleanKey creates a new boolean type key to given section. -func (s *Section) NewBooleanKey(name string) (*Key, error) { - key, err := s.NewKey(name, "true") - if err != nil { - return nil, err - } - - key.isBooleanType = true - return key, nil -} - -// GetKey returns key in section by given name. -func (s *Section) GetKey(name string) (*Key, error) { - // FIXME: change to section level lock? - if s.f.BlockMode { - s.f.lock.RLock() - } - if s.f.options.Insensitive { - name = strings.ToLower(name) - } - key := s.keys[name] - if s.f.BlockMode { - s.f.lock.RUnlock() - } - - if key == nil { - // Check if it is a child-section. - sname := s.name - for { - if i := strings.LastIndex(sname, "."); i > -1 { - sname = sname[:i] - sec, err := s.f.GetSection(sname) - if err != nil { - continue - } - return sec.GetKey(name) - } else { - break - } - } - return nil, fmt.Errorf("error when getting key of section '%s': key '%s' not exists", s.name, name) - } - return key, nil -} - -// HasKey returns true if section contains a key with given name. -func (s *Section) HasKey(name string) bool { - key, _ := s.GetKey(name) - return key != nil -} - -// Haskey is a backwards-compatible name for HasKey. -// TODO: delete me in v2 -func (s *Section) Haskey(name string) bool { - return s.HasKey(name) -} - -// HasValue returns true if section contains given raw value. -func (s *Section) HasValue(value string) bool { - if s.f.BlockMode { - s.f.lock.RLock() - defer s.f.lock.RUnlock() - } - - for _, k := range s.keys { - if value == k.value { - return true - } - } - return false -} - -// Key assumes named Key exists in section and returns a zero-value when not. -func (s *Section) Key(name string) *Key { - key, err := s.GetKey(name) - if err != nil { - // It's OK here because the only possible error is empty key name, - // but if it's empty, this piece of code won't be executed. - key, _ = s.NewKey(name, "") - return key - } - return key -} - -// Keys returns list of keys of section. -func (s *Section) Keys() []*Key { - keys := make([]*Key, len(s.keyList)) - for i := range s.keyList { - keys[i] = s.Key(s.keyList[i]) - } - return keys -} - -// ParentKeys returns list of keys of parent section. -func (s *Section) ParentKeys() []*Key { - var parentKeys []*Key - sname := s.name - for { - if i := strings.LastIndex(sname, "."); i > -1 { - sname = sname[:i] - sec, err := s.f.GetSection(sname) - if err != nil { - continue - } - parentKeys = append(parentKeys, sec.Keys()...) - } else { - break - } - - } - return parentKeys -} - -// KeyStrings returns list of key names of section. -func (s *Section) KeyStrings() []string { - list := make([]string, len(s.keyList)) - copy(list, s.keyList) - return list -} - -// KeysHash returns keys hash consisting of names and values. -func (s *Section) KeysHash() map[string]string { - if s.f.BlockMode { - s.f.lock.RLock() - defer s.f.lock.RUnlock() - } - - hash := map[string]string{} - for key, value := range s.keysHash { - hash[key] = value - } - return hash -} - -// DeleteKey deletes a key from section. -func (s *Section) DeleteKey(name string) { - if s.f.BlockMode { - s.f.lock.Lock() - defer s.f.lock.Unlock() - } - - for i, k := range s.keyList { - if k == name { - s.keyList = append(s.keyList[:i], s.keyList[i+1:]...) - delete(s.keys, name) - return - } - } -} - -// ChildSections returns a list of child sections of current section. -// For example, "[parent.child1]" and "[parent.child12]" are child sections -// of section "[parent]". -func (s *Section) ChildSections() []*Section { - prefix := s.name + "." - children := make([]*Section, 0, 3) - for _, name := range s.f.sectionList { - if strings.HasPrefix(name, prefix) { - children = append(children, s.f.sections[name]) - } - } - return children -} diff --git a/vendor/github.com/go-ini/ini/struct.go b/vendor/github.com/go-ini/ini/struct.go deleted file mode 100644 index 9719dc6985..0000000000 --- a/vendor/github.com/go-ini/ini/struct.go +++ /dev/null @@ -1,512 +0,0 @@ -// Copyright 2014 Unknwon -// -// 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 ini - -import ( - "bytes" - "errors" - "fmt" - "reflect" - "strings" - "time" - "unicode" -) - -// NameMapper represents a ini tag name mapper. -type NameMapper func(string) string - -// Built-in name getters. -var ( - // AllCapsUnderscore converts to format ALL_CAPS_UNDERSCORE. - AllCapsUnderscore NameMapper = func(raw string) string { - newstr := make([]rune, 0, len(raw)) - for i, chr := range raw { - if isUpper := 'A' <= chr && chr <= 'Z'; isUpper { - if i > 0 { - newstr = append(newstr, '_') - } - } - newstr = append(newstr, unicode.ToUpper(chr)) - } - return string(newstr) - } - // TitleUnderscore converts to format title_underscore. - TitleUnderscore NameMapper = func(raw string) string { - newstr := make([]rune, 0, len(raw)) - for i, chr := range raw { - if isUpper := 'A' <= chr && chr <= 'Z'; isUpper { - if i > 0 { - newstr = append(newstr, '_') - } - chr -= ('A' - 'a') - } - newstr = append(newstr, chr) - } - return string(newstr) - } -) - -func (s *Section) parseFieldName(raw, actual string) string { - if len(actual) > 0 { - return actual - } - if s.f.NameMapper != nil { - return s.f.NameMapper(raw) - } - return raw -} - -func parseDelim(actual string) string { - if len(actual) > 0 { - return actual - } - return "," -} - -var reflectTime = reflect.TypeOf(time.Now()).Kind() - -// setSliceWithProperType sets proper values to slice based on its type. -func setSliceWithProperType(key *Key, field reflect.Value, delim string, allowShadow, isStrict bool) error { - var strs []string - if allowShadow { - strs = key.StringsWithShadows(delim) - } else { - strs = key.Strings(delim) - } - - numVals := len(strs) - if numVals == 0 { - return nil - } - - var vals interface{} - var err error - - sliceOf := field.Type().Elem().Kind() - switch sliceOf { - case reflect.String: - vals = strs - case reflect.Int: - vals, err = key.parseInts(strs, true, false) - case reflect.Int64: - vals, err = key.parseInt64s(strs, true, false) - case reflect.Uint: - vals, err = key.parseUints(strs, true, false) - case reflect.Uint64: - vals, err = key.parseUint64s(strs, true, false) - case reflect.Float64: - vals, err = key.parseFloat64s(strs, true, false) - case reflectTime: - vals, err = key.parseTimesFormat(time.RFC3339, strs, true, false) - default: - return fmt.Errorf("unsupported type '[]%s'", sliceOf) - } - if err != nil && isStrict { - return err - } - - slice := reflect.MakeSlice(field.Type(), numVals, numVals) - for i := 0; i < numVals; i++ { - switch sliceOf { - case reflect.String: - slice.Index(i).Set(reflect.ValueOf(vals.([]string)[i])) - case reflect.Int: - slice.Index(i).Set(reflect.ValueOf(vals.([]int)[i])) - case reflect.Int64: - slice.Index(i).Set(reflect.ValueOf(vals.([]int64)[i])) - case reflect.Uint: - slice.Index(i).Set(reflect.ValueOf(vals.([]uint)[i])) - case reflect.Uint64: - slice.Index(i).Set(reflect.ValueOf(vals.([]uint64)[i])) - case reflect.Float64: - slice.Index(i).Set(reflect.ValueOf(vals.([]float64)[i])) - case reflectTime: - slice.Index(i).Set(reflect.ValueOf(vals.([]time.Time)[i])) - } - } - field.Set(slice) - return nil -} - -func wrapStrictError(err error, isStrict bool) error { - if isStrict { - return err - } - return nil -} - -// setWithProperType sets proper value to field based on its type, -// but it does not return error for failing parsing, -// because we want to use default value that is already assigned to strcut. -func setWithProperType(t reflect.Type, key *Key, field reflect.Value, delim string, allowShadow, isStrict bool) error { - switch t.Kind() { - case reflect.String: - if len(key.String()) == 0 { - return nil - } - field.SetString(key.String()) - case reflect.Bool: - boolVal, err := key.Bool() - if err != nil { - return wrapStrictError(err, isStrict) - } - field.SetBool(boolVal) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - durationVal, err := key.Duration() - // Skip zero value - if err == nil && int64(durationVal) > 0 { - field.Set(reflect.ValueOf(durationVal)) - return nil - } - - intVal, err := key.Int64() - if err != nil { - return wrapStrictError(err, isStrict) - } - field.SetInt(intVal) - // byte is an alias for uint8, so supporting uint8 breaks support for byte - case reflect.Uint, reflect.Uint16, reflect.Uint32, reflect.Uint64: - durationVal, err := key.Duration() - // Skip zero value - if err == nil && int(durationVal) > 0 { - field.Set(reflect.ValueOf(durationVal)) - return nil - } - - uintVal, err := key.Uint64() - if err != nil { - return wrapStrictError(err, isStrict) - } - field.SetUint(uintVal) - - case reflect.Float32, reflect.Float64: - floatVal, err := key.Float64() - if err != nil { - return wrapStrictError(err, isStrict) - } - field.SetFloat(floatVal) - case reflectTime: - timeVal, err := key.Time() - if err != nil { - return wrapStrictError(err, isStrict) - } - field.Set(reflect.ValueOf(timeVal)) - case reflect.Slice: - return setSliceWithProperType(key, field, delim, allowShadow, isStrict) - default: - return fmt.Errorf("unsupported type '%s'", t) - } - return nil -} - -func parseTagOptions(tag string) (rawName string, omitEmpty bool, allowShadow bool) { - opts := strings.SplitN(tag, ",", 3) - rawName = opts[0] - if len(opts) > 1 { - omitEmpty = opts[1] == "omitempty" - } - if len(opts) > 2 { - allowShadow = opts[2] == "allowshadow" - } - return rawName, omitEmpty, allowShadow -} - -func (s *Section) mapTo(val reflect.Value, isStrict bool) error { - if val.Kind() == reflect.Ptr { - val = val.Elem() - } - typ := val.Type() - - for i := 0; i < typ.NumField(); i++ { - field := val.Field(i) - tpField := typ.Field(i) - - tag := tpField.Tag.Get("ini") - if tag == "-" { - continue - } - - rawName, _, allowShadow := parseTagOptions(tag) - fieldName := s.parseFieldName(tpField.Name, rawName) - if len(fieldName) == 0 || !field.CanSet() { - continue - } - - isAnonymous := tpField.Type.Kind() == reflect.Ptr && tpField.Anonymous - isStruct := tpField.Type.Kind() == reflect.Struct - if isAnonymous { - field.Set(reflect.New(tpField.Type.Elem())) - } - - if isAnonymous || isStruct { - if sec, err := s.f.GetSection(fieldName); err == nil { - if err = sec.mapTo(field, isStrict); err != nil { - return fmt.Errorf("error mapping field(%s): %v", fieldName, err) - } - continue - } - } - - if key, err := s.GetKey(fieldName); err == nil { - delim := parseDelim(tpField.Tag.Get("delim")) - if err = setWithProperType(tpField.Type, key, field, delim, allowShadow, isStrict); err != nil { - return fmt.Errorf("error mapping field(%s): %v", fieldName, err) - } - } - } - return nil -} - -// MapTo maps section to given struct. -func (s *Section) MapTo(v interface{}) error { - typ := reflect.TypeOf(v) - val := reflect.ValueOf(v) - if typ.Kind() == reflect.Ptr { - typ = typ.Elem() - val = val.Elem() - } else { - return errors.New("cannot map to non-pointer struct") - } - - return s.mapTo(val, false) -} - -// MapTo maps section to given struct in strict mode, -// which returns all possible error including value parsing error. -func (s *Section) StrictMapTo(v interface{}) error { - typ := reflect.TypeOf(v) - val := reflect.ValueOf(v) - if typ.Kind() == reflect.Ptr { - typ = typ.Elem() - val = val.Elem() - } else { - return errors.New("cannot map to non-pointer struct") - } - - return s.mapTo(val, true) -} - -// MapTo maps file to given struct. -func (f *File) MapTo(v interface{}) error { - return f.Section("").MapTo(v) -} - -// MapTo maps file to given struct in strict mode, -// which returns all possible error including value parsing error. -func (f *File) StrictMapTo(v interface{}) error { - return f.Section("").StrictMapTo(v) -} - -// MapTo maps data sources to given struct with name mapper. -func MapToWithMapper(v interface{}, mapper NameMapper, source interface{}, others ...interface{}) error { - cfg, err := Load(source, others...) - if err != nil { - return err - } - cfg.NameMapper = mapper - return cfg.MapTo(v) -} - -// StrictMapToWithMapper maps data sources to given struct with name mapper in strict mode, -// which returns all possible error including value parsing error. -func StrictMapToWithMapper(v interface{}, mapper NameMapper, source interface{}, others ...interface{}) error { - cfg, err := Load(source, others...) - if err != nil { - return err - } - cfg.NameMapper = mapper - return cfg.StrictMapTo(v) -} - -// MapTo maps data sources to given struct. -func MapTo(v, source interface{}, others ...interface{}) error { - return MapToWithMapper(v, nil, source, others...) -} - -// StrictMapTo maps data sources to given struct in strict mode, -// which returns all possible error including value parsing error. -func StrictMapTo(v, source interface{}, others ...interface{}) error { - return StrictMapToWithMapper(v, nil, source, others...) -} - -// reflectSliceWithProperType does the opposite thing as setSliceWithProperType. -func reflectSliceWithProperType(key *Key, field reflect.Value, delim string) error { - slice := field.Slice(0, field.Len()) - if field.Len() == 0 { - return nil - } - - var buf bytes.Buffer - sliceOf := field.Type().Elem().Kind() - for i := 0; i < field.Len(); i++ { - switch sliceOf { - case reflect.String: - buf.WriteString(slice.Index(i).String()) - case reflect.Int, reflect.Int64: - buf.WriteString(fmt.Sprint(slice.Index(i).Int())) - case reflect.Uint, reflect.Uint64: - buf.WriteString(fmt.Sprint(slice.Index(i).Uint())) - case reflect.Float64: - buf.WriteString(fmt.Sprint(slice.Index(i).Float())) - case reflectTime: - buf.WriteString(slice.Index(i).Interface().(time.Time).Format(time.RFC3339)) - default: - return fmt.Errorf("unsupported type '[]%s'", sliceOf) - } - buf.WriteString(delim) - } - key.SetValue(buf.String()[:buf.Len()-1]) - return nil -} - -// reflectWithProperType does the opposite thing as setWithProperType. -func reflectWithProperType(t reflect.Type, key *Key, field reflect.Value, delim string) error { - switch t.Kind() { - case reflect.String: - key.SetValue(field.String()) - case reflect.Bool: - key.SetValue(fmt.Sprint(field.Bool())) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - key.SetValue(fmt.Sprint(field.Int())) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - key.SetValue(fmt.Sprint(field.Uint())) - case reflect.Float32, reflect.Float64: - key.SetValue(fmt.Sprint(field.Float())) - case reflectTime: - key.SetValue(fmt.Sprint(field.Interface().(time.Time).Format(time.RFC3339))) - case reflect.Slice: - return reflectSliceWithProperType(key, field, delim) - default: - return fmt.Errorf("unsupported type '%s'", t) - } - return nil -} - -// CR: copied from encoding/json/encode.go with modifications of time.Time support. -// TODO: add more test coverage. -func isEmptyValue(v reflect.Value) bool { - switch v.Kind() { - case reflect.Array, reflect.Map, reflect.Slice, reflect.String: - return v.Len() == 0 - case reflect.Bool: - return !v.Bool() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.Interface, reflect.Ptr: - return v.IsNil() - case reflectTime: - t, ok := v.Interface().(time.Time) - return ok && t.IsZero() - } - return false -} - -func (s *Section) reflectFrom(val reflect.Value) error { - if val.Kind() == reflect.Ptr { - val = val.Elem() - } - typ := val.Type() - - for i := 0; i < typ.NumField(); i++ { - field := val.Field(i) - tpField := typ.Field(i) - - tag := tpField.Tag.Get("ini") - if tag == "-" { - continue - } - - opts := strings.SplitN(tag, ",", 2) - if len(opts) == 2 && opts[1] == "omitempty" && isEmptyValue(field) { - continue - } - - fieldName := s.parseFieldName(tpField.Name, opts[0]) - if len(fieldName) == 0 || !field.CanSet() { - continue - } - - if (tpField.Type.Kind() == reflect.Ptr && tpField.Anonymous) || - (tpField.Type.Kind() == reflect.Struct && tpField.Type.Name() != "Time") { - // Note: The only error here is section doesn't exist. - sec, err := s.f.GetSection(fieldName) - if err != nil { - // Note: fieldName can never be empty here, ignore error. - sec, _ = s.f.NewSection(fieldName) - } - - // Add comment from comment tag - if len(sec.Comment) == 0 { - sec.Comment = tpField.Tag.Get("comment") - } - - if err = sec.reflectFrom(field); err != nil { - return fmt.Errorf("error reflecting field (%s): %v", fieldName, err) - } - continue - } - - // Note: Same reason as secion. - key, err := s.GetKey(fieldName) - if err != nil { - key, _ = s.NewKey(fieldName, "") - } - - // Add comment from comment tag - if len(key.Comment) == 0 { - key.Comment = tpField.Tag.Get("comment") - } - - if err = reflectWithProperType(tpField.Type, key, field, parseDelim(tpField.Tag.Get("delim"))); err != nil { - return fmt.Errorf("error reflecting field (%s): %v", fieldName, err) - } - - } - return nil -} - -// ReflectFrom reflects secion from given struct. -func (s *Section) ReflectFrom(v interface{}) error { - typ := reflect.TypeOf(v) - val := reflect.ValueOf(v) - if typ.Kind() == reflect.Ptr { - typ = typ.Elem() - val = val.Elem() - } else { - return errors.New("cannot reflect from non-pointer struct") - } - - return s.reflectFrom(val) -} - -// ReflectFrom reflects file from given struct. -func (f *File) ReflectFrom(v interface{}) error { - return f.Section("").ReflectFrom(v) -} - -// ReflectFrom reflects data sources from given struct with name mapper. -func ReflectFromWithMapper(cfg *File, v interface{}, mapper NameMapper) error { - cfg.NameMapper = mapper - return cfg.ReflectFrom(v) -} - -// ReflectFrom reflects data sources from given struct. -func ReflectFrom(cfg *File, v interface{}) error { - return ReflectFromWithMapper(cfg, v, nil) -} diff --git a/vendor/github.com/jmespath/go-jmespath/api.go b/vendor/github.com/jmespath/go-jmespath/api.go index 9cfa988bc5..8e26ffeecf 100644 --- a/vendor/github.com/jmespath/go-jmespath/api.go +++ b/vendor/github.com/jmespath/go-jmespath/api.go @@ -2,7 +2,7 @@ package jmespath import "strconv" -// JmesPath is the epresentation of a compiled JMES path query. A JmesPath is +// JMESPath is the epresentation of a compiled JMES path query. A JMESPath is // safe for concurrent use by multiple goroutines. type JMESPath struct { ast ASTNode diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/autoscaling_tags.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/autoscaling_tags.go index 577ee22410..d94eb4a946 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/autoscaling_tags.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/autoscaling_tags.go @@ -58,8 +58,8 @@ func setAutoscalingTags(conn *autoscaling.AutoScaling, d *schema.ResourceData) e if d.HasChange("tag") || d.HasChange("tags") { oraw, nraw := d.GetChange("tag") - o := setToMapByKey(oraw.(*schema.Set), "key") - n := setToMapByKey(nraw.(*schema.Set), "key") + o := setToMapByKey(oraw.(*schema.Set)) + n := setToMapByKey(nraw.(*schema.Set)) old, err := autoscalingTagsFromMap(o, resourceID) if err != nil { @@ -248,36 +248,6 @@ func autoscalingTagFromMap(attr map[string]interface{}, resourceID string) (*aut return t, nil } -// autoscalingTagsToMap turns the list of tags into a map. -func autoscalingTagsToMap(ts []*autoscaling.Tag) map[string]interface{} { - tags := make(map[string]interface{}) - for _, t := range ts { - tag := map[string]interface{}{ - "key": *t.Key, - "value": *t.Value, - "propagate_at_launch": *t.PropagateAtLaunch, - } - tags[*t.Key] = tag - } - - return tags -} - -// autoscalingTagDescriptionsToMap turns the list of tags into a map. -func autoscalingTagDescriptionsToMap(ts *[]*autoscaling.TagDescription) map[string]map[string]interface{} { - tags := make(map[string]map[string]interface{}) - for _, t := range *ts { - tag := map[string]interface{}{ - "key": *t.Key, - "value": *t.Value, - "propagate_at_launch": *t.PropagateAtLaunch, - } - tags[*t.Key] = tag - } - - return tags -} - // autoscalingTagDescriptionsToSlice turns the list of tags into a slice. func autoscalingTagDescriptionsToSlice(ts []*autoscaling.TagDescription) []map[string]interface{} { tags := make([]map[string]interface{}, 0, len(ts)) @@ -292,11 +262,11 @@ func autoscalingTagDescriptionsToSlice(ts []*autoscaling.TagDescription) []map[s return tags } -func setToMapByKey(s *schema.Set, key string) map[string]interface{} { +func setToMapByKey(s *schema.Set) map[string]interface{} { result := make(map[string]interface{}) for _, rawData := range s.List() { data := rawData.(map[string]interface{}) - result[data[key].(string)] = data + result[data["key"].(string)] = data } return result diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/awserr.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/awserr.go index ae3cfa242e..7c944b923e 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/awserr.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/awserr.go @@ -19,12 +19,13 @@ func isAWSErr(err error, code string, message string) bool { return false } -// Returns true if the error matches all these conditions: +// IsAWSErrExtended returns true if the error matches all conditions // * err is of type awserr.Error // * Error.Code() matches code // * Error.Message() contains message // * Error.OrigErr() contains origErrMessage -func isAWSErrExtended(err error, code string, message string, origErrMessage string) bool { +// Note: This function will be moved out of the aws package in the future. +func IsAWSErrExtended(err error, code string, message string, origErrMessage string) bool { if !isAWSErr(err, code, message) { return false } @@ -48,7 +49,9 @@ func retryOnAwsCode(code string, f func() (interface{}, error)) (interface{}, er return resp, err } -func retryOnAwsCodes(codes []string, f func() (interface{}, error)) (interface{}, error) { +// RetryOnAwsCodes retries AWS error codes for one minute +// Note: This function will be moved out of the aws package in the future. +func RetryOnAwsCodes(codes []string, f func() (interface{}, error)) (interface{}, error) { var resp interface{} err := resource.Retry(1*time.Minute, func() *resource.RetryError { var err error diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/cloudfront_distribution_configuration_structure.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/cloudfront_distribution_configuration_structure.go index 55bdd3509d..f221418953 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/cloudfront_distribution_configuration_structure.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/cloudfront_distribution_configuration_structure.go @@ -56,7 +56,7 @@ func expandDistributionConfig(d *schema.ResourceData) *cloudfront.DistributionCo distributionConfig.CacheBehaviors = expandCacheBehaviorsDeprecated(d.Get("cache_behavior").(*schema.Set)) } // This sets CallerReference if it's still pending computation (ie: new resource) - if v, ok := d.GetOk("caller_reference"); ok == false { + if v, ok := d.GetOk("caller_reference"); !ok { distributionConfig.CallerReference = aws.String(time.Now().Format(time.RFC3339Nano)) } else { distributionConfig.CallerReference = aws.String(v.(string)) @@ -195,11 +195,10 @@ func expandDefaultCacheBehavior(m map[string]interface{}) *cloudfront.DefaultCac } func flattenDefaultCacheBehavior(dcb *cloudfront.DefaultCacheBehavior) *schema.Set { - m := make(map[string]interface{}) var cb cloudfront.CacheBehavior simpleCopyStruct(dcb, &cb) - m = flattenCacheBehaviorDeprecated(&cb) + m := flattenCacheBehaviorDeprecated(&cb) return schema.NewSet(defaultCacheBehaviorHash, []interface{}{m}) } @@ -525,7 +524,8 @@ func lambdaFunctionAssociationHash(v interface{}) int { var buf bytes.Buffer m := v.(map[string]interface{}) buf.WriteString(fmt.Sprintf("%s-", m["event_type"].(string))) - buf.WriteString(fmt.Sprintf("%s", m["lambda_arn"].(string))) + buf.WriteString(m["lambda_arn"].(string)) + buf.WriteString(fmt.Sprintf("%t", m["include_body"].(bool))) return hashcode.String(buf.String()) } @@ -554,6 +554,9 @@ func expandLambdaFunctionAssociation(lf map[string]interface{}) *cloudfront.Lamb if v, ok := lf["lambda_arn"]; ok { lfa.LambdaFunctionARN = aws.String(v.(string)) } + if v, ok := lf["include_body"]; ok { + lfa.IncludeBody = aws.Bool(v.(bool)) + } return &lfa } @@ -570,6 +573,7 @@ func flattenLambdaFunctionAssociation(lfa *cloudfront.LambdaFunctionAssociation) if lfa != nil { m["event_type"] = *lfa.EventType m["lambda_arn"] = *lfa.LambdaFunctionARN + m["include_body"] = *lfa.IncludeBody } return m } @@ -1255,7 +1259,7 @@ func simpleCopyStruct(src, dst interface{}) { d := reflect.ValueOf(dst).Elem() for i := 0; i < s.NumField(); i++ { - if s.Field(i).CanSet() == true { + if s.Field(i).CanSet() { if s.Field(i).Interface() != nil { for j := 0; j < d.NumField(); j++ { if d.Type().Field(j).Name == s.Type().Field(i).Name { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/config.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/config.go index ddc5d88570..8380a90ded 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/config.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/config.go @@ -27,6 +27,7 @@ import ( "github.com/aws/aws-sdk-go/service/cloud9" "github.com/aws/aws-sdk-go/service/cloudformation" "github.com/aws/aws-sdk-go/service/cloudfront" + "github.com/aws/aws-sdk-go/service/cloudhsmv2" "github.com/aws/aws-sdk-go/service/cloudtrail" "github.com/aws/aws-sdk-go/service/cloudwatch" "github.com/aws/aws-sdk-go/service/cloudwatchevents" @@ -43,6 +44,7 @@ import ( "github.com/aws/aws-sdk-go/service/devicefarm" "github.com/aws/aws-sdk-go/service/directconnect" "github.com/aws/aws-sdk-go/service/directoryservice" + "github.com/aws/aws-sdk-go/service/dlm" "github.com/aws/aws-sdk-go/service/dynamodb" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/ecr" @@ -66,6 +68,7 @@ import ( "github.com/aws/aws-sdk-go/service/inspector" "github.com/aws/aws-sdk-go/service/iot" "github.com/aws/aws-sdk-go/service/kinesis" + "github.com/aws/aws-sdk-go/service/kinesisanalytics" "github.com/aws/aws-sdk-go/service/kms" "github.com/aws/aws-sdk-go/service/lambda" "github.com/aws/aws-sdk-go/service/lexmodelbuildingservice" @@ -76,6 +79,7 @@ import ( "github.com/aws/aws-sdk-go/service/neptune" "github.com/aws/aws-sdk-go/service/opsworks" "github.com/aws/aws-sdk-go/service/organizations" + "github.com/aws/aws-sdk-go/service/pinpoint" "github.com/aws/aws-sdk-go/service/pricing" "github.com/aws/aws-sdk-go/service/rds" "github.com/aws/aws-sdk-go/service/redshift" @@ -95,8 +99,8 @@ import ( "github.com/aws/aws-sdk-go/service/swf" "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/wafregional" + "github.com/aws/aws-sdk-go/service/workspaces" "github.com/davecgh/go-spew/spew" - "github.com/hashicorp/errwrap" "github.com/hashicorp/go-cleanhttp" "github.com/hashicorp/terraform/helper/logging" "github.com/hashicorp/terraform/terraform" @@ -136,6 +140,7 @@ type Config struct { ElbEndpoint string IamEndpoint string KinesisEndpoint string + KinesisAnalyticsEndpoint string KmsEndpoint string LambdaEndpoint string RdsEndpoint string @@ -159,6 +164,7 @@ type AWSClient struct { cfconn *cloudformation.CloudFormation cloud9conn *cloud9.Cloud9 cloudfrontconn *cloudfront.CloudFront + cloudhsmv2conn *cloudhsmv2.CloudHSMV2 cloudtrailconn *cloudtrail.CloudTrail cloudwatchconn *cloudwatch.CloudWatch cloudwatchlogsconn *cloudwatchlogs.CloudWatchLogs @@ -168,6 +174,7 @@ type AWSClient struct { configconn *configservice.ConfigService daxconn *dax.DAX devicefarmconn *devicefarm.DeviceFarm + dlmconn *dlm.DLM dmsconn *databasemigrationservice.DatabaseMigrationService dsconn *directoryservice.DirectoryService dynamodbconn *dynamodb.DynamoDB @@ -202,6 +209,7 @@ type AWSClient struct { rdsconn *rds.RDS iamconn *iam.IAM kinesisconn *kinesis.Kinesis + kinesisanalyticsconn *kinesisanalytics.KinesisAnalytics kmsconn *kms.KMS gameliftconn *gamelift.GameLift firehoseconn *firehose.Firehose @@ -240,6 +248,8 @@ type AWSClient struct { budgetconn *budgets.Budgets neptuneconn *neptune.Neptune pricingconn *pricing.Pricing + pinpointconn *pinpoint.Pinpoint + workspacesconn *workspaces.WorkSpaces } func (c *AWSClient) S3() *s3.S3 { @@ -347,7 +357,7 @@ func (c *Config) Client() (interface{}, error) { Please see https://terraform.io/docs/providers/aws/index.html for more information on providing credentials for the AWS Provider`) } - return nil, errwrap.Wrapf("Error creating AWS session: {{err}}", err) + return nil, fmt.Errorf("Error creating AWS session: %s", err) } sess.Handlers.Build.PushBackNamed(addTerraformVersionToUserAgent) @@ -375,13 +385,13 @@ func (c *Config) Client() (interface{}, error) { } // RequestError: send request failed // caused by: Post https://FQDN/: dial tcp: lookup FQDN: no such host - if isAWSErrExtended(r.Error, "RequestError", "send request failed", "no such host") { + if IsAWSErrExtended(r.Error, "RequestError", "send request failed", "no such host") { log.Printf("[WARN] Disabling retries after next request due to networking issue") r.Retryable = aws.Bool(false) } // RequestError: send request failed // caused by: Post https://FQDN/: dial tcp IPADDRESS:443: connect: connection refused - if isAWSErrExtended(r.Error, "RequestError", "send request failed", "connection refused") { + if IsAWSErrExtended(r.Error, "RequestError", "send request failed", "connection refused") { log.Printf("[WARN] Disabling retries after next request due to networking issue") r.Retryable = aws.Bool(false) } @@ -411,6 +421,7 @@ func (c *Config) Client() (interface{}, error) { awsIamSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.IamEndpoint)}) awsLambdaSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.LambdaEndpoint)}) awsKinesisSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.KinesisEndpoint)}) + awsKinesisAnalyticsSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.KinesisAnalyticsEndpoint)}) awsKmsSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.KmsEndpoint)}) awsRdsSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.RdsEndpoint)}) awsS3Sess := sess.Copy(&aws.Config{Endpoint: aws.String(c.S3Endpoint)}) @@ -496,6 +507,7 @@ func (c *Config) Client() (interface{}, error) { client.cloud9conn = cloud9.New(sess) client.cfconn = cloudformation.New(awsCfSess) client.cloudfrontconn = cloudfront.New(sess) + client.cloudhsmv2conn = cloudhsmv2.New(sess) client.cloudtrailconn = cloudtrail.New(sess) client.cloudwatchconn = cloudwatch.New(awsCwSess) client.cloudwatcheventsconn = cloudwatchevents.New(awsCweSess) @@ -508,6 +520,7 @@ func (c *Config) Client() (interface{}, error) { client.cognitoidpconn = cognitoidentityprovider.New(sess) client.codepipelineconn = codepipeline.New(sess) client.daxconn = dax.New(awsDynamoSess) + client.dlmconn = dlm.New(sess) client.dmsconn = databasemigrationservice.New(sess) client.dsconn = directoryservice.New(sess) client.dynamodbconn = dynamodb.New(awsDynamoSess) @@ -530,6 +543,7 @@ func (c *Config) Client() (interface{}, error) { client.guarddutyconn = guardduty.New(sess) client.iotconn = iot.New(sess) client.kinesisconn = kinesis.New(awsKinesisSess) + client.kinesisanalyticsconn = kinesisanalytics.New(awsKinesisAnalyticsSess) client.kmsconn = kms.New(awsKmsSess) client.lambdaconn = lambda.New(awsLambdaSess) client.lexmodelconn = lexmodelbuildingservice.New(sess) @@ -564,6 +578,8 @@ func (c *Config) Client() (interface{}, error) { client.appsyncconn = appsync.New(sess) client.neptuneconn = neptune.New(sess) client.pricingconn = pricing.New(sess) + client.pinpointconn = pinpoint.New(sess) + client.workspacesconn = workspaces.New(sess) // Workaround for https://github.com/aws/aws-sdk-go/issues/1376 client.kinesisconn.Handlers.Retry.PushBack(func(r *request.Request) { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ami.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ami.go index e764e6e813..f5b8a01d0e 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ami.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ami.go @@ -5,6 +5,8 @@ import ( "fmt" "log" "regexp" + "sort" + "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" @@ -252,32 +254,23 @@ func dataSourceAwsAmiRead(d *schema.ResourceData, meta interface{}) error { filteredImages = resp.Images[:] } - var image *ec2.Image if len(filteredImages) < 1 { return fmt.Errorf("Your query returned no results. Please change your search criteria and try again.") } if len(filteredImages) > 1 { - recent := d.Get("most_recent").(bool) - log.Printf("[DEBUG] aws_ami - multiple results found and `most_recent` is set to: %t", recent) - if recent { - image = mostRecentAmi(filteredImages) - } else { + if !d.Get("most_recent").(bool) { return fmt.Errorf("Your query returned more than one result. Please try a more " + "specific search criteria, or set `most_recent` attribute to true.") } - } else { - // Query returned single result. - image = filteredImages[0] + sort.Slice(filteredImages, func(i, j int) bool { + itime, _ := time.Parse(time.RFC3339, aws.StringValue(filteredImages[i].CreationDate)) + jtime, _ := time.Parse(time.RFC3339, aws.StringValue(filteredImages[j].CreationDate)) + return itime.Unix() > jtime.Unix() + }) } - log.Printf("[DEBUG] aws_ami - Single AMI found: %s", *image.ImageId) - return amiDescriptionAttributes(d, image) -} - -// Returns the most recent AMI out of a slice of images. -func mostRecentAmi(images []*ec2.Image) *ec2.Image { - return sortImages(images)[0] + return amiDescriptionAttributes(d, filteredImages[0]) } // populate the numerous fields that the image description returns. @@ -341,31 +334,23 @@ func amiBlockDeviceMappings(m []*ec2.BlockDeviceMapping) *schema.Set { } for _, v := range m { mapping := map[string]interface{}{ - "device_name": *v.DeviceName, + "device_name": aws.StringValue(v.DeviceName), + "virtual_name": aws.StringValue(v.VirtualName), } + if v.Ebs != nil { ebs := map[string]interface{}{ - "delete_on_termination": fmt.Sprintf("%t", *v.Ebs.DeleteOnTermination), - "encrypted": fmt.Sprintf("%t", *v.Ebs.Encrypted), - "volume_size": fmt.Sprintf("%d", *v.Ebs.VolumeSize), - "volume_type": *v.Ebs.VolumeType, - } - // Iops is not always set - if v.Ebs.Iops != nil { - ebs["iops"] = fmt.Sprintf("%d", *v.Ebs.Iops) - } else { - ebs["iops"] = "0" - } - // snapshot id may not be set - if v.Ebs.SnapshotId != nil { - ebs["snapshot_id"] = *v.Ebs.SnapshotId + "delete_on_termination": fmt.Sprintf("%t", aws.BoolValue(v.Ebs.DeleteOnTermination)), + "encrypted": fmt.Sprintf("%t", aws.BoolValue(v.Ebs.Encrypted)), + "iops": fmt.Sprintf("%d", aws.Int64Value(v.Ebs.Iops)), + "volume_size": fmt.Sprintf("%d", aws.Int64Value(v.Ebs.VolumeSize)), + "snapshot_id": aws.StringValue(v.Ebs.SnapshotId), + "volume_type": aws.StringValue(v.Ebs.VolumeType), } mapping["ebs"] = ebs } - if v.VirtualName != nil { - mapping["virtual_name"] = *v.VirtualName - } + log.Printf("[DEBUG] aws_ami - adding block device mapping: %v", mapping) s.Add(mapping) } @@ -379,8 +364,8 @@ func amiProductCodes(m []*ec2.ProductCode) *schema.Set { } for _, v := range m { code := map[string]interface{}{ - "product_code_id": *v.ProductCodeId, - "product_code_type": *v.ProductCodeType, + "product_code_id": aws.StringValue(v.ProductCodeId), + "product_code_type": aws.StringValue(v.ProductCodeType), } s.Add(code) } @@ -407,8 +392,8 @@ func amiRootSnapshotId(image *ec2.Image) string { func amiStateReason(m *ec2.StateReason) map[string]interface{} { s := make(map[string]interface{}) if m != nil { - s["code"] = *m.Code - s["message"] = *m.Message + s["code"] = aws.StringValue(m.Code) + s["message"] = aws.StringValue(m.Message) } else { s["code"] = "UNSET" s["message"] = "UNSET" diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ami_ids.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ami_ids.go index e7e91d3a85..e75df9c736 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ami_ids.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ami_ids.go @@ -4,6 +4,8 @@ import ( "fmt" "log" "regexp" + "sort" + "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" @@ -41,6 +43,11 @@ func dataSourceAwsAmiIds() *schema.Resource { Computed: true, Elem: &schema.Schema{Type: schema.TypeString}, }, + "sort_ascending": { + Type: schema.TypeBool, + Default: false, + Optional: true, + }, }, } } @@ -52,6 +59,7 @@ func dataSourceAwsAmiIdsRead(d *schema.ResourceData, meta interface{}) error { filters, filtersOk := d.GetOk("filter") nameRegex, nameRegexOk := d.GetOk("name_regex") owners, ownersOk := d.GetOk("owners") + sortAscending := d.Get("sort_ascending").(bool) if executableUsersOk == false && filtersOk == false && nameRegexOk == false && ownersOk == false { return fmt.Errorf("One of executable_users, filters, name_regex, or owners must be assigned") @@ -123,7 +131,15 @@ func dataSourceAwsAmiIdsRead(d *schema.ResourceData, meta interface{}) error { filteredImages = resp.Images[:] } - for _, image := range sortImages(filteredImages) { + sort.Slice(filteredImages, func(i, j int) bool { + itime, _ := time.Parse(time.RFC3339, aws.StringValue(filteredImages[i].CreationDate)) + jtime, _ := time.Parse(time.RFC3339, aws.StringValue(filteredImages[j].CreationDate)) + if sortAscending { + return itime.Unix() < jtime.Unix() + } + return itime.Unix() > jtime.Unix() + }) + for _, image := range filteredImages { imageIds = append(imageIds, *image.ImageId) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_api_gateway_api_key.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_api_gateway_api_key.go new file mode 100644 index 0000000000..e9a7d7a973 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_api_gateway_api_key.go @@ -0,0 +1,45 @@ +package aws + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/apigateway" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsApiGatewayApiKey() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsApiGatewayApiKeyRead, + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Required: true, + }, + "name": { + Type: schema.TypeString, + Computed: true, + }, + "value": { + Type: schema.TypeString, + Computed: true, + Sensitive: true, + }, + }, + } +} + +func dataSourceAwsApiGatewayApiKeyRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).apigateway + apiKey, err := conn.GetApiKey(&apigateway.GetApiKeyInput{ + ApiKey: aws.String(d.Get("id").(string)), + IncludeValue: aws.Bool(true), + }) + + if err != nil { + return err + } + + d.SetId(aws.StringValue(apiKey.Id)) + d.Set("name", apiKey.Name) + d.Set("value", apiKey.Value) + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_autoscaling_groups.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_autoscaling_groups.go index 7bc4dc9c35..a3b8bb709f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_autoscaling_groups.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_autoscaling_groups.go @@ -21,6 +21,11 @@ func dataSourceAwsAutoscalingGroups() *schema.Resource { Computed: true, Elem: &schema.Schema{Type: schema.TypeString}, }, + "arns": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, "filter": { Type: schema.TypeSet, Optional: true, @@ -49,7 +54,8 @@ func dataSourceAwsAutoscalingGroupsRead(d *schema.ResourceData, meta interface{} log.Printf("[DEBUG] Reading Autoscaling Groups.") d.SetId(time.Now().UTC().String()) - var raw []string + var rawName []string + var rawArn []string var err error tf := d.Get("filter").(*schema.Set) @@ -59,14 +65,36 @@ func dataSourceAwsAutoscalingGroupsRead(d *schema.ResourceData, meta interface{} } err = conn.DescribeTagsPages(input, func(resp *autoscaling.DescribeTagsOutput, lastPage bool) bool { for _, v := range resp.Tags { - raw = append(raw, aws.StringValue(v.ResourceId)) + rawName = append(rawName, aws.StringValue(v.ResourceId)) } return !lastPage }) + + maxAutoScalingGroupNames := 1600 + for i := 0; i < len(rawName); i += maxAutoScalingGroupNames { + end := i + maxAutoScalingGroupNames + + if end > len(rawName) { + end = len(rawName) + } + + nameInput := &autoscaling.DescribeAutoScalingGroupsInput{ + AutoScalingGroupNames: aws.StringSlice(rawName[i:end]), + MaxRecords: aws.Int64(100), + } + + err = conn.DescribeAutoScalingGroupsPages(nameInput, func(resp *autoscaling.DescribeAutoScalingGroupsOutput, lastPage bool) bool { + for _, group := range resp.AutoScalingGroups { + rawArn = append(rawArn, aws.StringValue(group.AutoScalingGroupARN)) + } + return !lastPage + }) + } } else { err = conn.DescribeAutoScalingGroupsPages(&autoscaling.DescribeAutoScalingGroupsInput{}, func(resp *autoscaling.DescribeAutoScalingGroupsOutput, lastPage bool) bool { for _, group := range resp.AutoScalingGroups { - raw = append(raw, aws.StringValue(group.AutoScalingGroupName)) + rawName = append(rawName, aws.StringValue(group.AutoScalingGroupName)) + rawArn = append(rawArn, aws.StringValue(group.AutoScalingGroupARN)) } return !lastPage }) @@ -75,12 +103,17 @@ func dataSourceAwsAutoscalingGroupsRead(d *schema.ResourceData, meta interface{} return fmt.Errorf("Error fetching Autoscaling Groups: %s", err) } - sort.Strings(raw) + sort.Strings(rawName) + sort.Strings(rawArn) - if err := d.Set("names", raw); err != nil { + if err := d.Set("names", rawName); err != nil { return fmt.Errorf("[WARN] Error setting Autoscaling Group Names: %s", err) } + if err := d.Set("arns", rawArn); err != nil { + return fmt.Errorf("[WARN] Error setting Autoscaling Group Arns: %s", err) + } + return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_availability_zones.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_availability_zones.go index 3a6f387643..3d033de6dd 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_availability_zones.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_availability_zones.go @@ -67,7 +67,7 @@ func dataSourceAwsAvailabilityZonesRead(d *schema.ResourceData, meta interface{} sort.Strings(raw) if err := d.Set("names", raw); err != nil { - return fmt.Errorf("[WARN] Error setting Availability Zones: %s", err) + return fmt.Errorf("Error setting Availability Zones: %s", err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudformation_stack.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudformation_stack.go index b991c96862..84bc051fbc 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudformation_stack.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudformation_stack.go @@ -6,7 +6,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/cloudformation" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/schema" ) @@ -116,7 +115,7 @@ func dataSourceAwsCloudFormationStackRead(d *schema.ResourceData, meta interface template, err := normalizeCloudFormationTemplate(*tOut.TemplateBody) if err != nil { - return errwrap.Wrapf("template body contains an invalid JSON or YAML: {{err}}", err) + return fmt.Errorf("template body contains an invalid JSON or YAML: %s", err) } d.Set("template_body", template) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudhsm2_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudhsm2_cluster.go new file mode 100644 index 0000000000..57535f2c7c --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudhsm2_cluster.go @@ -0,0 +1,131 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/cloudhsmv2" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceCloudHsm2Cluster() *schema.Resource { + return &schema.Resource{ + Read: dataSourceCloudHsm2ClusterRead, + + Schema: map[string]*schema.Schema{ + "cluster_id": { + Type: schema.TypeString, + Required: true, + }, + + "cluster_state": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + + "vpc_id": { + Type: schema.TypeString, + Computed: true, + }, + + "security_group_id": { + Type: schema.TypeString, + Computed: true, + }, + + "cluster_certificates": { + Type: schema.TypeList, + MaxItems: 1, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cluster_certificate": { + Type: schema.TypeString, + Computed: true, + }, + "cluster_csr": { + Type: schema.TypeString, + Computed: true, + }, + "aws_hardware_certificate": { + Type: schema.TypeString, + Computed: true, + }, + "hsm_certificate": { + Type: schema.TypeString, + Computed: true, + }, + "manufacturer_hardware_certificate": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "subnet_ids": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + }, + } +} + +func dataSourceCloudHsm2ClusterRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).cloudhsmv2conn + + clusterId := d.Get("cluster_id").(string) + filters := []*string{&clusterId} + log.Printf("[DEBUG] Reading CloudHSM v2 Cluster %s", clusterId) + result := int64(1) + input := &cloudhsmv2.DescribeClustersInput{ + Filters: map[string][]*string{ + "clusterIds": filters, + }, + MaxResults: &result, + } + state := d.Get("cluster_state").(string) + states := []*string{&state} + if len(state) > 0 { + input.Filters["states"] = states + } + out, err := conn.DescribeClusters(input) + + if err != nil { + return fmt.Errorf("error describing CloudHSM v2 Cluster: %s", err) + } + + var cluster *cloudhsmv2.Cluster + for _, c := range out.Clusters { + if aws.StringValue(c.ClusterId) == clusterId { + cluster = c + break + } + } + + if cluster == nil { + return fmt.Errorf("cluster with id %s not found", clusterId) + } + + d.SetId(clusterId) + d.Set("vpc_id", cluster.VpcId) + d.Set("security_group_id", cluster.SecurityGroup) + d.Set("cluster_state", cluster.State) + if err := d.Set("cluster_certificates", readCloudHsm2ClusterCertificates(cluster)); err != nil { + return fmt.Errorf("error setting cluster_certificates: %s", err) + } + + var subnets []string + for _, sn := range cluster.SubnetMapping { + subnets = append(subnets, *sn) + } + + if err := d.Set("subnet_ids", subnets); err != nil { + return fmt.Errorf("[DEBUG] Error saving Subnet IDs to state for CloudHSM v2 Cluster (%s): %s", d.Id(), err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudwatch_log_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudwatch_log_group.go index b7285b686e..134f7f5dce 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudwatch_log_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_cloudwatch_log_group.go @@ -3,8 +3,6 @@ package aws import ( "fmt" - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/cloudwatchlogs" "github.com/hashicorp/terraform/helper/schema" ) @@ -33,27 +31,10 @@ func dataSourceAwsCloudwatchLogGroupRead(d *schema.ResourceData, meta interface{ name := d.Get("name").(string) conn := meta.(*AWSClient).cloudwatchlogsconn - input := &cloudwatchlogs.DescribeLogGroupsInput{ - LogGroupNamePrefix: aws.String(name), - } - - var logGroup *cloudwatchlogs.LogGroup - // iterate over the pages of log groups until we find the one we are looking for - err := conn.DescribeLogGroupsPages(input, - func(resp *cloudwatchlogs.DescribeLogGroupsOutput, _ bool) bool { - for _, lg := range resp.LogGroups { - if aws.StringValue(lg.LogGroupName) == name { - logGroup = lg - return false - } - } - return true - }) - + logGroup, err := lookupCloudWatchLogGroup(conn, name) if err != nil { return err } - if logGroup == nil { return fmt.Errorf("No log group named %s found\n", name) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_codecommit_repository.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_codecommit_repository.go index 163a4b2e3b..aec07a0e01 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_codecommit_repository.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_codecommit_repository.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/codecommit" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func dataSourceAwsCodeCommitRepository() *schema.Resource { @@ -18,7 +19,7 @@ func dataSourceAwsCodeCommitRepository() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: validateMaxLength(100), + ValidateFunc: validation.StringLenBetween(0, 100), }, "arn": { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_event_categories.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_event_categories.go new file mode 100644 index 0000000000..688e1deb33 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_event_categories.go @@ -0,0 +1,66 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/rds" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsDbEventCategories() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsDbEventCategoriesRead, + + Schema: map[string]*schema.Schema{ + "source_type": { + Type: schema.TypeString, + Optional: true, + }, + "event_categories": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + }, + } +} + +func dataSourceAwsDbEventCategoriesRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).rdsconn + + req := &rds.DescribeEventCategoriesInput{} + + if sourceType := d.Get("source_type").(string); sourceType != "" { + req.SourceType = aws.String(sourceType) + } + + log.Printf("[DEBUG] Describe Event Categories %s\n", req) + resp, err := conn.DescribeEventCategories(req) + if err != nil { + return err + } + + if resp == nil || len(resp.EventCategoriesMapList) == 0 { + return fmt.Errorf("Event Categories not found") + } + + eventCategories := make([]string, 0) + + for _, eventMap := range resp.EventCategoriesMapList { + for _, v := range eventMap.EventCategories { + eventCategories = append(eventCategories, aws.StringValue(v)) + } + } + + d.SetId(resource.UniqueId()) + if err := d.Set("event_categories", eventCategories); err != nil { + return fmt.Errorf("Error setting Event Categories: %s", err) + } + + return nil + +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_instance.go index bf8df80ec9..fe3fb8898d 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_instance.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_db_instance.go @@ -87,6 +87,12 @@ func dataSourceAwsDbInstance() *schema.Resource { Computed: true, }, + "enabled_cloudwatch_logs_exports": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "endpoint": { Type: schema.TypeString, Computed: true, @@ -241,7 +247,7 @@ func dataSourceAwsDbInstanceRead(d *schema.ResourceData, meta interface{}) error parameterGroups = append(parameterGroups, *v.DBParameterGroupName) } if err := d.Set("db_parameter_groups", parameterGroups); err != nil { - return fmt.Errorf("[DEBUG] Error setting db_parameter_groups attribute: %#v, error: %#v", parameterGroups, err) + return fmt.Errorf("Error setting db_parameter_groups attribute: %#v, error: %#v", parameterGroups, err) } var dbSecurityGroups []string @@ -249,7 +255,7 @@ func dataSourceAwsDbInstanceRead(d *schema.ResourceData, meta interface{}) error dbSecurityGroups = append(dbSecurityGroups, *v.DBSecurityGroupName) } if err := d.Set("db_security_groups", dbSecurityGroups); err != nil { - return fmt.Errorf("[DEBUG] Error setting db_security_groups attribute: %#v, error: %#v", dbSecurityGroups, err) + return fmt.Errorf("Error setting db_security_groups attribute: %#v, error: %#v", dbSecurityGroups, err) } if dbInstance.DBSubnetGroup != nil { @@ -272,12 +278,16 @@ func dataSourceAwsDbInstanceRead(d *schema.ResourceData, meta interface{}) error d.Set("hosted_zone_id", dbInstance.Endpoint.HostedZoneId) d.Set("endpoint", fmt.Sprintf("%s:%d", *dbInstance.Endpoint.Address, *dbInstance.Endpoint.Port)) + if err := d.Set("enabled_cloudwatch_logs_exports", aws.StringValueSlice(dbInstance.EnabledCloudwatchLogsExports)); err != nil { + return fmt.Errorf("error setting enabled_cloudwatch_logs_exports: %#v", err) + } + var optionGroups []string for _, v := range dbInstance.OptionGroupMemberships { optionGroups = append(optionGroups, *v.OptionGroupName) } if err := d.Set("option_group_memberships", optionGroups); err != nil { - return fmt.Errorf("[DEBUG] Error setting option_group_memberships attribute: %#v, error: %#v", optionGroups, err) + return fmt.Errorf("Error setting option_group_memberships attribute: %#v, error: %#v", optionGroups, err) } d.Set("preferred_backup_window", dbInstance.PreferredBackupWindow) @@ -294,7 +304,7 @@ func dataSourceAwsDbInstanceRead(d *schema.ResourceData, meta interface{}) error vpcSecurityGroups = append(vpcSecurityGroups, *v.VpcSecurityGroupId) } if err := d.Set("vpc_security_groups", vpcSecurityGroups); err != nil { - return fmt.Errorf("[DEBUG] Error setting vpc_security_groups attribute: %#v, error: %#v", vpcSecurityGroups, err) + return fmt.Errorf("Error setting vpc_security_groups attribute: %#v, error: %#v", vpcSecurityGroups, err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot.go index 7b7cb29d2d..cbcd941ec4 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot.go @@ -3,7 +3,9 @@ package aws import ( "fmt" "log" + "sort" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform/helper/schema" ) @@ -117,29 +119,22 @@ func dataSourceAwsEbsSnapshotRead(d *schema.ResourceData, meta interface{}) erro return err } - var snapshot *ec2.Snapshot if len(resp.Snapshots) < 1 { return fmt.Errorf("Your query returned no results. Please change your search criteria and try again.") } if len(resp.Snapshots) > 1 { - recent := d.Get("most_recent").(bool) - log.Printf("[DEBUG] aws_ebs_snapshot - multiple results found and `most_recent` is set to: %t", recent) - if recent { - snapshot = mostRecentSnapshot(resp.Snapshots) - } else { - return fmt.Errorf("Your query returned more than one result. Please try a more specific search criteria.") + if !d.Get("most_recent").(bool) { + return fmt.Errorf("Your query returned more than one result. Please try a more " + + "specific search criteria, or set `most_recent` attribute to true.") } - } else { - snapshot = resp.Snapshots[0] + sort.Slice(resp.Snapshots, func(i, j int) bool { + return aws.TimeValue(resp.Snapshots[i].StartTime).Unix() > aws.TimeValue(resp.Snapshots[j].StartTime).Unix() + }) } //Single Snapshot found so set to state - return snapshotDescriptionAttributes(d, snapshot) -} - -func mostRecentSnapshot(snapshots []*ec2.Snapshot) *ec2.Snapshot { - return sortSnapshots(snapshots)[0] + return snapshotDescriptionAttributes(d, resp.Snapshots[0]) } func snapshotDescriptionAttributes(d *schema.ResourceData, snapshot *ec2.Snapshot) error { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot_ids.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot_ids.go index 65a8ab1012..5041e25b31 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot_ids.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ebs_snapshot_ids.go @@ -3,7 +3,9 @@ package aws import ( "fmt" "log" + "sort" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/schema" @@ -67,7 +69,10 @@ func dataSourceAwsEbsSnapshotIdsRead(d *schema.ResourceData, meta interface{}) e snapshotIds := make([]string, 0) - for _, snapshot := range sortSnapshots(resp.Snapshots) { + sort.Slice(resp.Snapshots, func(i, j int) bool { + return aws.TimeValue(resp.Snapshots[i].StartTime).Unix() > aws.TimeValue(resp.Snapshots[j].StartTime).Unix() + }) + for _, snapshot := range resp.Snapshots { snapshotIds = append(snapshotIds, *snapshot.SnapshotId) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_efs_file_system.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_efs_file_system.go index ab518d6f80..9f35dab93a 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_efs_file_system.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_efs_file_system.go @@ -5,9 +5,10 @@ import ( "log" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/efs" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func dataSourceAwsEfsFileSystem() *schema.Resource { @@ -15,12 +16,16 @@ func dataSourceAwsEfsFileSystem() *schema.Resource { Read: dataSourceAwsEfsFileSystemRead, Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, "creation_token": { Type: schema.TypeString, Optional: true, Computed: true, ForceNew: true, - ValidateFunc: validateMaxLength(64), + ValidateFunc: validation.StringLenBetween(0, 64), }, "encrypted": { Type: schema.TypeBool, @@ -65,7 +70,7 @@ func dataSourceAwsEfsFileSystemRead(d *schema.ResourceData, meta interface{}) er log.Printf("[DEBUG] Reading EFS File System: %s", describeEfsOpts) describeResp, err := efsconn.DescribeFileSystems(describeEfsOpts) if err != nil { - return errwrap.Wrapf("Error retrieving EFS: {{err}}", err) + return fmt.Errorf("Error retrieving EFS: %s", err) } if len(describeResp.FileSystems) != 1 { return fmt.Errorf("Search returned %d results, please revise so only one is returned", len(describeResp.FileSystems)) @@ -120,6 +125,16 @@ func dataSourceAwsEfsFileSystemRead(d *schema.ResourceData, meta interface{}) er d.Set("creation_token", fs.CreationToken) d.Set("performance_mode", fs.PerformanceMode) + + fsARN := arn.ARN{ + AccountID: meta.(*AWSClient).accountid, + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Resource: fmt.Sprintf("file-system/%s", aws.StringValue(fs.FileSystemId)), + Service: "elasticfilesystem", + }.String() + + d.Set("arn", fsARN) d.Set("file_system_id", fs.FileSystemId) d.Set("encrypted", fs.Encrypted) d.Set("kms_key_id", fs.KmsKeyId) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_efs_mount_target.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_efs_mount_target.go index e2c6045d73..88e4dcf882 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_efs_mount_target.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_efs_mount_target.go @@ -5,8 +5,8 @@ import ( "log" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/efs" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/schema" ) @@ -20,7 +20,10 @@ func dataSourceAwsEfsMountTarget() *schema.Resource { Required: true, ForceNew: true, }, - + "file_system_arn": { + Type: schema.TypeString, + Computed: true, + }, "file_system_id": { Type: schema.TypeString, Computed: true, @@ -61,7 +64,7 @@ func dataSourceAwsEfsMountTargetRead(d *schema.ResourceData, meta interface{}) e log.Printf("[DEBUG] Reading EFS Mount Target: %s", describeEfsOpts) resp, err := efsconn.DescribeMountTargets(describeEfsOpts) if err != nil { - return errwrap.Wrapf("Error retrieving EFS Mount Target: {{err}}", err) + return fmt.Errorf("Error retrieving EFS Mount Target: %s", err) } if len(resp.MountTargets) != 1 { return fmt.Errorf("Search returned %d results, please revise so only one is returned", len(resp.MountTargets)) @@ -72,6 +75,16 @@ func dataSourceAwsEfsMountTargetRead(d *schema.ResourceData, meta interface{}) e log.Printf("[DEBUG] Found EFS mount target: %#v", mt) d.SetId(*mt.MountTargetId) + + fsARN := arn.ARN{ + AccountID: meta.(*AWSClient).accountid, + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Resource: fmt.Sprintf("file-system/%s", aws.StringValue(mt.FileSystemId)), + Service: "elasticfilesystem", + }.String() + + d.Set("file_system_arn", fsARN) d.Set("file_system_id", mt.FileSystemId) d.Set("ip_address", mt.IpAddress) d.Set("subnet_id", mt.SubnetId) @@ -89,7 +102,7 @@ func dataSourceAwsEfsMountTargetRead(d *schema.ResourceData, meta interface{}) e } if err := d.Set("dns_name", resourceAwsEfsMountTargetDnsName(*mt.FileSystemId, meta.(*AWSClient).region)); err != nil { - return fmt.Errorf("[DEBUG] Error setting dns_name error: %#v", err) + return fmt.Errorf("Error setting dns_name error: %#v", err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_eip.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_eip.go index f461a374e8..fe650108b1 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_eip.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_eip.go @@ -14,16 +14,46 @@ func dataSourceAwsEip() *schema.Resource { Read: dataSourceAwsEipRead, Schema: map[string]*schema.Schema{ + "association_id": { + Type: schema.TypeString, + Computed: true, + }, + "domain": { + Type: schema.TypeString, + Computed: true, + }, + "filter": ec2CustomFiltersSchema(), "id": { Type: schema.TypeString, Optional: true, Computed: true, }, + "instance_id": { + Type: schema.TypeString, + Computed: true, + }, + "network_interface_id": { + Type: schema.TypeString, + Computed: true, + }, + "network_interface_owner_id": { + Type: schema.TypeString, + Computed: true, + }, + "private_ip": { + Type: schema.TypeString, + Computed: true, + }, "public_ip": { Type: schema.TypeString, Optional: true, Computed: true, }, + "public_ipv4_pool": { + Type: schema.TypeString, + Computed: true, + }, + "tags": tagsSchemaComputed(), }, } } @@ -33,18 +63,33 @@ func dataSourceAwsEipRead(d *schema.ResourceData, meta interface{}) error { req := &ec2.DescribeAddressesInput{} - if id, ok := d.GetOk("id"); ok { - req.AllocationIds = []*string{aws.String(id.(string))} + if v, ok := d.GetOk("id"); ok { + req.AllocationIds = []*string{aws.String(v.(string))} } - if public_ip := d.Get("public_ip"); public_ip != "" { - req.PublicIps = []*string{aws.String(public_ip.(string))} + if v, ok := d.GetOk("public_ip"); ok { + req.PublicIps = []*string{aws.String(v.(string))} + } + + req.Filters = []*ec2.Filter{} + + req.Filters = append(req.Filters, buildEC2CustomFilterList( + d.Get("filter").(*schema.Set), + )...) + + req.Filters = append(req.Filters, buildEC2TagFilterList( + tagsFromMap(d.Get("tags").(map[string]interface{})), + )...) + + if len(req.Filters) == 0 { + // Don't send an empty filters list; the EC2 API won't accept it. + req.Filters = nil } log.Printf("[DEBUG] Reading EIP: %s", req) resp, err := conn.DescribeAddresses(req) if err != nil { - return err + return fmt.Errorf("error describing EC2 Address: %s", err) } if resp == nil || len(resp.Addresses) == 0 { return fmt.Errorf("no matching Elastic IP found") @@ -55,8 +100,22 @@ func dataSourceAwsEipRead(d *schema.ResourceData, meta interface{}) error { eip := resp.Addresses[0] - d.SetId(*eip.AllocationId) + if aws.StringValue(eip.Domain) == ec2.DomainTypeVpc { + d.SetId(aws.StringValue(eip.AllocationId)) + } else { + log.Printf("[DEBUG] Reading EIP, has no AllocationId, this means we have a Classic EIP, the id will also be the public ip : %s", req) + d.SetId(aws.StringValue(eip.PublicIp)) + } + + d.Set("association_id", eip.AssociationId) + d.Set("domain", eip.Domain) + d.Set("instance_id", eip.InstanceId) + d.Set("network_interface_id", eip.NetworkInterfaceId) + d.Set("network_interface_owner_id", eip.NetworkInterfaceOwnerId) + d.Set("private_ip", eip.PrivateIpAddress) d.Set("public_ip", eip.PublicIp) + d.Set("public_ipv4_pool", eip.PublicIpv4Pool) + d.Set("tags", tagsToMap(eip.Tags)) return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_group.go index 942f2a97de..9376caf4b1 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_group.go @@ -6,7 +6,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/iam" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/schema" ) @@ -47,7 +46,7 @@ func dataSourceAwsIAMGroupRead(d *schema.ResourceData, meta interface{}) error { log.Printf("[DEBUG] Reading IAM Group: %s", req) resp, err := iamconn.GetGroup(req) if err != nil { - return errwrap.Wrapf("Error getting group: {{err}}", err) + return fmt.Errorf("Error getting group: %s", err) } if resp == nil { return fmt.Errorf("no IAM group found") diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_instance_profile.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_instance_profile.go index 344f3b99de..de36b71893 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_instance_profile.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_instance_profile.go @@ -6,7 +6,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/iam" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/schema" ) @@ -59,7 +58,7 @@ func dataSourceAwsIAMInstanceProfileRead(d *schema.ResourceData, meta interface{ log.Printf("[DEBUG] Reading IAM Instance Profile: %s", req) resp, err := iamconn.GetInstanceProfile(req) if err != nil { - return errwrap.Wrapf("Error getting instance profiles: {{err}}", err) + return fmt.Errorf("Error getting instance profiles: %s", err) } if resp == nil { return fmt.Errorf("no IAM instance profile found") diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_policy_document.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_policy_document.go index 4f5c644317..776dbe19d8 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_policy_document.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_policy_document.go @@ -39,7 +39,7 @@ func dataSourceAwsIamPolicyDocument() *schema.Resource { }, "statement": { Type: schema.TypeList, - Required: true, + Optional: true, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "sid": { @@ -96,8 +96,8 @@ func dataSourceAwsIamPolicyDocumentRead(d *schema.ResourceData, meta interface{} mergedDoc := &IAMPolicyDoc{} // populate mergedDoc directly with any source_json - if sourceJson, hasSourceJson := d.GetOk("source_json"); hasSourceJson { - if err := json.Unmarshal([]byte(sourceJson.(string)), mergedDoc); err != nil { + if sourceJSON, hasSourceJSON := d.GetOk("source_json"); hasSourceJSON { + if err := json.Unmarshal([]byte(sourceJSON.(string)), mergedDoc); err != nil { return err } } @@ -107,64 +107,67 @@ func dataSourceAwsIamPolicyDocumentRead(d *schema.ResourceData, meta interface{} doc.Version = "2012-10-17" - if policyId, hasPolicyId := d.GetOk("policy_id"); hasPolicyId { - doc.Id = policyId.(string) + if policyID, hasPolicyID := d.GetOk("policy_id"); hasPolicyID { + doc.Id = policyID.(string) } - var cfgStmts = d.Get("statement").([]interface{}) - stmts := make([]*IAMPolicyStatement, len(cfgStmts)) - for i, stmtI := range cfgStmts { - cfgStmt := stmtI.(map[string]interface{}) - stmt := &IAMPolicyStatement{ - Effect: cfgStmt["effect"].(string), - } + if cfgStmts, hasCfgStmts := d.GetOk("statement"); hasCfgStmts { + var cfgStmtIntf = cfgStmts.([]interface{}) + stmts := make([]*IAMPolicyStatement, len(cfgStmtIntf)) + for i, stmtI := range cfgStmtIntf { + cfgStmt := stmtI.(map[string]interface{}) + stmt := &IAMPolicyStatement{ + Effect: cfgStmt["effect"].(string), + } - if sid, ok := cfgStmt["sid"]; ok { - stmt.Sid = sid.(string) - } + if sid, ok := cfgStmt["sid"]; ok { + stmt.Sid = sid.(string) + } - if actions := cfgStmt["actions"].(*schema.Set).List(); len(actions) > 0 { - stmt.Actions = iamPolicyDecodeConfigStringList(actions) - } - if actions := cfgStmt["not_actions"].(*schema.Set).List(); len(actions) > 0 { - stmt.NotActions = iamPolicyDecodeConfigStringList(actions) - } + if actions := cfgStmt["actions"].(*schema.Set).List(); len(actions) > 0 { + stmt.Actions = iamPolicyDecodeConfigStringList(actions) + } + if actions := cfgStmt["not_actions"].(*schema.Set).List(); len(actions) > 0 { + stmt.NotActions = iamPolicyDecodeConfigStringList(actions) + } - if resources := cfgStmt["resources"].(*schema.Set).List(); len(resources) > 0 { - stmt.Resources = dataSourceAwsIamPolicyDocumentReplaceVarsInList( - iamPolicyDecodeConfigStringList(resources), - ) - } - if resources := cfgStmt["not_resources"].(*schema.Set).List(); len(resources) > 0 { - stmt.NotResources = dataSourceAwsIamPolicyDocumentReplaceVarsInList( - iamPolicyDecodeConfigStringList(resources), - ) - } + if resources := cfgStmt["resources"].(*schema.Set).List(); len(resources) > 0 { + stmt.Resources = dataSourceAwsIamPolicyDocumentReplaceVarsInList( + iamPolicyDecodeConfigStringList(resources), + ) + } + if resources := cfgStmt["not_resources"].(*schema.Set).List(); len(resources) > 0 { + stmt.NotResources = dataSourceAwsIamPolicyDocumentReplaceVarsInList( + iamPolicyDecodeConfigStringList(resources), + ) + } - if principals := cfgStmt["principals"].(*schema.Set).List(); len(principals) > 0 { - stmt.Principals = dataSourceAwsIamPolicyDocumentMakePrincipals(principals) - } + if principals := cfgStmt["principals"].(*schema.Set).List(); len(principals) > 0 { + stmt.Principals = dataSourceAwsIamPolicyDocumentMakePrincipals(principals) + } - if principals := cfgStmt["not_principals"].(*schema.Set).List(); len(principals) > 0 { - stmt.NotPrincipals = dataSourceAwsIamPolicyDocumentMakePrincipals(principals) - } + if principals := cfgStmt["not_principals"].(*schema.Set).List(); len(principals) > 0 { + stmt.NotPrincipals = dataSourceAwsIamPolicyDocumentMakePrincipals(principals) + } - if conditions := cfgStmt["condition"].(*schema.Set).List(); len(conditions) > 0 { - stmt.Conditions = dataSourceAwsIamPolicyDocumentMakeConditions(conditions) + if conditions := cfgStmt["condition"].(*schema.Set).List(); len(conditions) > 0 { + stmt.Conditions = dataSourceAwsIamPolicyDocumentMakeConditions(conditions) + } + + stmts[i] = stmt } - stmts[i] = stmt - } + doc.Statements = stmts - doc.Statements = stmts + } // merge our current document into mergedDoc mergedDoc.Merge(doc) // merge in override_json - if overrideJson, hasOverrideJson := d.GetOk("override_json"); hasOverrideJson { + if overrideJSON, hasOverrideJSON := d.GetOk("override_json"); hasOverrideJSON { overrideDoc := &IAMPolicyDoc{} - if err := json.Unmarshal([]byte(overrideJson.(string)), overrideDoc); err != nil { + if err := json.Unmarshal([]byte(overrideJSON.(string)), overrideDoc); err != nil { return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_server_certificate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_server_certificate.go index a628806ed4..16403fbd15 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_server_certificate.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iam_server_certificate.go @@ -9,9 +9,9 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/iam" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func dataSourceAwsIAMServerCertificate() *schema.Resource { @@ -25,7 +25,7 @@ func dataSourceAwsIAMServerCertificate() *schema.Resource { Computed: true, ForceNew: true, ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validateMaxLength(128), + ValidateFunc: validation.StringLenBetween(0, 128), }, "name_prefix": { @@ -33,7 +33,7 @@ func dataSourceAwsIAMServerCertificate() *schema.Resource { Optional: true, ForceNew: true, ConflictsWith: []string{"name"}, - ValidateFunc: validateMaxLength(128 - resource.UniqueIDSuffixLength), + ValidateFunc: validation.StringLenBetween(0, 128-resource.UniqueIDSuffixLength), }, "path_prefix": { @@ -123,7 +123,7 @@ func dataSourceAwsIAMServerCertificateRead(d *schema.ResourceData, meta interfac return true }) if err != nil { - return errwrap.Wrapf("Error describing certificates: {{err}}", err) + return fmt.Errorf("Error describing certificates: %s", err) } if len(metadatas) == 0 { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iot_endpoint.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iot_endpoint.go index e9938bf8ee..2c5e943726 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iot_endpoint.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_iot_endpoint.go @@ -6,6 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/iot" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func dataSourceAwsIotEndpoint() *schema.Resource { @@ -16,6 +17,16 @@ func dataSourceAwsIotEndpoint() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "endpoint_type": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{ + "iot:CredentialProvider", + "iot:Data", + "iot:Data-ATS", + "iot:Jobs", + }, false), + }, }, } } @@ -24,6 +35,10 @@ func dataSourceAwsIotEndpointRead(d *schema.ResourceData, meta interface{}) erro conn := meta.(*AWSClient).iotconn input := &iot.DescribeEndpointInput{} + if v, ok := d.GetOk("endpoint_type"); ok { + input.EndpointType = aws.String(v.(string)) + } + output, err := conn.DescribeEndpoint(input) if err != nil { return fmt.Errorf("error while describing iot endpoint: %s", err) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_alias.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_alias.go index 91dfacb7ee..c002d1da8f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_alias.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_alias.go @@ -7,7 +7,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/kms" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/schema" ) @@ -54,7 +53,7 @@ func dataSourceAwsKmsAliasRead(d *schema.ResourceData, meta interface{}) error { return true }) if err != nil { - return errwrap.Wrapf("Error fetch KMS alias list: {{err}}", err) + return fmt.Errorf("Error fetch KMS alias list: %s", err) } if alias == nil { @@ -80,7 +79,7 @@ func dataSourceAwsKmsAliasRead(d *schema.ResourceData, meta interface{}) error { } resp, err := conn.DescribeKey(req) if err != nil { - return errwrap.Wrapf("Error calling KMS DescribeKey: {{err}}", err) + return fmt.Errorf("Error calling KMS DescribeKey: %s", err) } d.Set("target_key_arn", resp.KeyMetadata.Arn) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_key.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_key.go index 35c231ead1..a05f8edfd6 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_key.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_key.go @@ -2,10 +2,11 @@ package aws import ( "fmt" + "time" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/kms" "github.com/hashicorp/terraform/helper/schema" - "time" ) func dataSourceAwsKmsKey() *schema.Resource { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_secret.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_secret.go index caac900015..16772633e5 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_secret.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_secret.go @@ -70,7 +70,7 @@ func dataSourceAwsKmsSecretRead(d *schema.ResourceData, meta interface{}) error // build the kms decrypt params params := &kms.DecryptInput{ - CiphertextBlob: []byte(payload), + CiphertextBlob: payload, } if context, exists := secret["context"]; exists { params.EncryptionContext = make(map[string]*string) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_secrets.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_secrets.go index 97b6227220..63caf70413 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_secrets.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_kms_secrets.go @@ -72,7 +72,7 @@ func dataSourceAwsKmsSecretsRead(d *schema.ResourceData, meta interface{}) error // build the kms decrypt params params := &kms.DecryptInput{ - CiphertextBlob: []byte(payload), + CiphertextBlob: payload, } if context, exists := secret["context"]; exists { params.EncryptionContext = make(map[string]*string) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lambda_invocation.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lambda_invocation.go index 6e532686fa..f21b99af68 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lambda_invocation.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lambda_invocation.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/lambda" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func dataSourceAwsLambdaInvocation() *schema.Resource { @@ -33,7 +34,7 @@ func dataSourceAwsLambdaInvocation() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, }, "result": { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_launch_template.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_launch_template.go new file mode 100644 index 0000000000..c27f248150 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_launch_template.go @@ -0,0 +1,461 @@ +package aws + +import ( + "fmt" + "log" + "strconv" + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsLaunchTemplate() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsLaunchTemplateRead, + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + }, + "description": { + Type: schema.TypeString, + Computed: true, + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "default_version": { + Type: schema.TypeInt, + Computed: true, + }, + "latest_version": { + Type: schema.TypeInt, + Computed: true, + }, + "block_device_mappings": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "device_name": { + Type: schema.TypeString, + Computed: true, + }, + "no_device": { + Type: schema.TypeString, + Computed: true, + }, + "virtual_name": { + Type: schema.TypeString, + Computed: true, + }, + "ebs": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "delete_on_termination": { + Type: schema.TypeString, + Computed: true, + }, + "encrypted": { + Type: schema.TypeString, + Computed: true, + }, + "iops": { + Type: schema.TypeInt, + Computed: true, + }, + "kms_key_id": { + Type: schema.TypeString, + Computed: true, + }, + "snapshot_id": { + Type: schema.TypeString, + Computed: true, + }, + "volume_size": { + Type: schema.TypeInt, + Computed: true, + }, + "volume_type": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + }, + }, + "credit_specification": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cpu_credits": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "disable_api_termination": { + Type: schema.TypeBool, + Computed: true, + }, + "ebs_optimized": { + Type: schema.TypeString, + Computed: true, + }, + "elastic_gpu_specifications": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "type": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "iam_instance_profile": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "image_id": { + Type: schema.TypeString, + Computed: true, + }, + + "instance_initiated_shutdown_behavior": { + Type: schema.TypeString, + Computed: true, + }, + "instance_market_options": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "market_type": { + Type: schema.TypeString, + Computed: true, + }, + "spot_options": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "block_duration_minutes": { + Type: schema.TypeInt, + Computed: true, + }, + "instance_interruption_behavior": { + Type: schema.TypeString, + Computed: true, + }, + "max_price": { + Type: schema.TypeString, + Computed: true, + }, + "spot_instance_type": { + Type: schema.TypeString, + Computed: true, + }, + "valid_until": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + }, + }, + "instance_type": { + Type: schema.TypeString, + Computed: true, + }, + "kernel_id": { + Type: schema.TypeString, + Computed: true, + }, + "key_name": { + Type: schema.TypeString, + Computed: true, + }, + "monitoring": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "enabled": { + Type: schema.TypeBool, + Computed: true, + }, + }, + }, + }, + "network_interfaces": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "associate_public_ip_address": { + Type: schema.TypeBool, + Computed: true, + }, + "delete_on_termination": { + Type: schema.TypeBool, + Computed: true, + }, + "description": { + Type: schema.TypeString, + Computed: true, + }, + "device_index": { + Type: schema.TypeInt, + Computed: true, + }, + "security_groups": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "ipv6_address_count": { + Type: schema.TypeInt, + Computed: true, + }, + "ipv6_addresses": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "network_interface_id": { + Type: schema.TypeString, + Computed: true, + }, + "private_ip_address": { + Type: schema.TypeString, + Computed: true, + }, + "ipv4_addresses": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "ipv4_address_count": { + Type: schema.TypeInt, + Computed: true, + }, + "subnet_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "placement": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "affinity": { + Type: schema.TypeString, + Computed: true, + }, + "availability_zone": { + Type: schema.TypeString, + Computed: true, + }, + "group_name": { + Type: schema.TypeString, + Computed: true, + }, + "host_id": { + Type: schema.TypeString, + Computed: true, + }, + "spread_domain": { + Type: schema.TypeString, + Computed: true, + }, + "tenancy": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "ram_disk_id": { + Type: schema.TypeString, + Computed: true, + }, + "security_group_names": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "vpc_security_group_ids": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "tag_specifications": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "resource_type": { + Type: schema.TypeString, + Computed: true, + }, + "tags": tagsSchemaComputed(), + }, + }, + }, + "user_data": { + Type: schema.TypeString, + Computed: true, + }, + "tags": tagsSchemaComputed(), + }, + } +} + +func dataSourceAwsLaunchTemplateRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + log.Printf("[DEBUG] Reading launch template %s", d.Get("name")) + + dlt, err := conn.DescribeLaunchTemplates(&ec2.DescribeLaunchTemplatesInput{ + LaunchTemplateNames: []*string{aws.String(d.Get("name").(string))}, + }) + + if isAWSErr(err, ec2.LaunchTemplateErrorCodeLaunchTemplateIdDoesNotExist, "") { + log.Printf("[WARN] launch template (%s) not found - removing from state", d.Id()) + d.SetId("") + return nil + } + + // AWS SDK constant above is currently incorrect + if isAWSErr(err, "InvalidLaunchTemplateId.NotFound", "") { + log.Printf("[WARN] launch template (%s) not found - removing from state", d.Id()) + d.SetId("") + return nil + } + + if err != nil { + return fmt.Errorf("Error getting launch template: %s", err) + } + + if dlt == nil || len(dlt.LaunchTemplates) == 0 { + log.Printf("[WARN] launch template (%s) not found - removing from state", d.Id()) + d.SetId("") + return nil + } + + log.Printf("[DEBUG] Found launch template %s", d.Id()) + + lt := dlt.LaunchTemplates[0] + d.SetId(*lt.LaunchTemplateId) + d.Set("name", lt.LaunchTemplateName) + d.Set("latest_version", lt.LatestVersionNumber) + d.Set("default_version", lt.DefaultVersionNumber) + d.Set("tags", tagsToMap(lt.Tags)) + + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "ec2", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("launch-template/%s", d.Id()), + }.String() + d.Set("arn", arn) + + version := strconv.Itoa(int(*lt.LatestVersionNumber)) + dltv, err := conn.DescribeLaunchTemplateVersions(&ec2.DescribeLaunchTemplateVersionsInput{ + LaunchTemplateId: aws.String(d.Id()), + Versions: []*string{aws.String(version)}, + }) + if err != nil { + return err + } + + log.Printf("[DEBUG] Received launch template version %q (version %d)", d.Id(), *lt.LatestVersionNumber) + + ltData := dltv.LaunchTemplateVersions[0].LaunchTemplateData + + d.Set("disable_api_termination", ltData.DisableApiTermination) + d.Set("image_id", ltData.ImageId) + d.Set("instance_initiated_shutdown_behavior", ltData.InstanceInitiatedShutdownBehavior) + d.Set("instance_type", ltData.InstanceType) + d.Set("kernel_id", ltData.KernelId) + d.Set("key_name", ltData.KeyName) + d.Set("ram_disk_id", ltData.RamDiskId) + d.Set("security_group_names", aws.StringValueSlice(ltData.SecurityGroups)) + d.Set("user_data", ltData.UserData) + d.Set("vpc_security_group_ids", aws.StringValueSlice(ltData.SecurityGroupIds)) + d.Set("ebs_optimized", "") + + if ltData.EbsOptimized != nil { + d.Set("ebs_optimized", strconv.FormatBool(aws.BoolValue(ltData.EbsOptimized))) + } + + if err := d.Set("block_device_mappings", getBlockDeviceMappings(ltData.BlockDeviceMappings)); err != nil { + return err + } + + if strings.HasPrefix(aws.StringValue(ltData.InstanceType), "t2") || strings.HasPrefix(aws.StringValue(ltData.InstanceType), "t3") { + if err := d.Set("credit_specification", getCreditSpecification(ltData.CreditSpecification)); err != nil { + return err + } + } + + if err := d.Set("elastic_gpu_specifications", getElasticGpuSpecifications(ltData.ElasticGpuSpecifications)); err != nil { + return err + } + + if err := d.Set("iam_instance_profile", getIamInstanceProfile(ltData.IamInstanceProfile)); err != nil { + return err + } + + if err := d.Set("instance_market_options", getInstanceMarketOptions(ltData.InstanceMarketOptions)); err != nil { + return err + } + + if err := d.Set("monitoring", getMonitoring(ltData.Monitoring)); err != nil { + return err + } + + if err := d.Set("network_interfaces", getNetworkInterfaces(ltData.NetworkInterfaces)); err != nil { + return err + } + + if err := d.Set("placement", getPlacement(ltData.Placement)); err != nil { + return err + } + + if err := d.Set("tag_specifications", getTagSpecifications(ltData.TagSpecifications)); err != nil { + return err + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb_listener.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb_listener.go index 37ac1ef94d..0e54e0862d 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb_listener.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_lb_listener.go @@ -89,7 +89,7 @@ func dataSourceAwsLbListenerRead(d *schema.ResourceData, meta interface{}) error return err } if len(resp.Listeners) == 0 { - return fmt.Errorf("[DEBUG] no listener exists for load balancer: %s", lbArn) + return fmt.Errorf("no listener exists for load balancer: %s", lbArn) } for _, listener := range resp.Listeners { if *listener.Port == int64(port.(int)) { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_mq_broker.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_mq_broker.go index fa150808cc..0fe5ca6b6e 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_mq_broker.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_mq_broker.go @@ -76,6 +76,10 @@ func dataSourceAwsMqBroker() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "ip_address": { + Type: schema.TypeString, + Computed: true, + }, "endpoints": { Type: schema.TypeList, Computed: true, @@ -84,6 +88,30 @@ func dataSourceAwsMqBroker() *schema.Resource { }, }, }, + "logs": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + // Ignore missing configuration block + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if old == "1" && new == "0" { + return true + } + return false + }, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "general": { + Type: schema.TypeBool, + Computed: true, + }, + "audit": { + Type: schema.TypeBool, + Computed: true, + }, + }, + }, + }, "maintenance_window_start_time": { Type: schema.TypeList, MaxItems: 1, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_nat_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_nat_gateway.go index 98947f397c..a805694473 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_nat_gateway.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_nat_gateway.go @@ -89,6 +89,12 @@ func dataSourceAwsNatGatewayRead(d *schema.ResourceData, meta interface{}) error )...) } + if tags, ok := d.GetOk("tags"); ok { + req.Filter = append(req.Filter, buildEC2TagFilterList( + tagsFromMap(tags.(map[string]interface{})), + )...) + } + req.Filter = append(req.Filter, buildEC2CustomFilterList( d.Get("filter").(*schema.Set), )...) @@ -116,6 +122,7 @@ func dataSourceAwsNatGatewayRead(d *schema.ResourceData, meta interface{}) error d.Set("state", ngw.State) d.Set("subnet_id", ngw.SubnetId) d.Set("vpc_id", ngw.VpcId) + d.Set("tags", tagsToMap(ngw.Tags)) for _, address := range ngw.NatGatewayAddresses { if *address.AllocationId != "" { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_network_interface.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_network_interface.go index 8583457704..51b91b49a1 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_network_interface.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_network_interface.go @@ -175,7 +175,7 @@ func dataSourceAwsNetworkInterfaceRead(d *schema.ResourceData, meta interface{}) d.Set("mac_address", eni.MacAddress) d.Set("owner_id", eni.OwnerId) d.Set("private_dns_name", eni.PrivateDnsName) - d.Set("private_id", eni.PrivateIpAddress) + d.Set("private_ip", eni.PrivateIpAddress) d.Set("private_ips", flattenNetworkInterfacesPrivateIPAddresses(eni.PrivateIpAddresses)) d.Set("requester_id", eni.RequesterId) d.Set("subnet_id", eni.SubnetId) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_redshift_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_redshift_cluster.go index 41666e7fb6..4aaeeb251e 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_redshift_cluster.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_redshift_cluster.go @@ -207,7 +207,7 @@ func dataSourceAwsRedshiftClusterRead(d *schema.ResourceData, meta interface{}) csg = append(csg, *g.ClusterSecurityGroupName) } if err := d.Set("cluster_security_groups", csg); err != nil { - return fmt.Errorf("[DEBUG] Error saving Cluster Security Group Names to state for Redshift Cluster (%s): %s", cluster, err) + return fmt.Errorf("Error saving Cluster Security Group Names to state for Redshift Cluster (%s): %s", cluster, err) } d.Set("cluster_subnet_group_name", rsc.ClusterSubnetGroupName) @@ -238,7 +238,7 @@ func dataSourceAwsRedshiftClusterRead(d *schema.ResourceData, meta interface{}) iamRoles = append(iamRoles, *i.IamRoleArn) } if err := d.Set("iam_roles", iamRoles); err != nil { - return fmt.Errorf("[DEBUG] Error saving IAM Roles to state for Redshift Cluster (%s): %s", cluster, err) + return fmt.Errorf("Error saving IAM Roles to state for Redshift Cluster (%s): %s", cluster, err) } d.Set("kms_key_id", rsc.KmsKeyId) @@ -256,7 +256,7 @@ func dataSourceAwsRedshiftClusterRead(d *schema.ResourceData, meta interface{}) vpcg = append(vpcg, *g.VpcSecurityGroupId) } if err := d.Set("vpc_security_group_ids", vpcg); err != nil { - return fmt.Errorf("[DEBUG] Error saving VPC Security Group IDs to state for Redshift Cluster (%s): %s", cluster, err) + return fmt.Errorf("Error saving VPC Security Group IDs to state for Redshift Cluster (%s): %s", cluster, err) } log.Printf("[INFO] Reading Redshift Cluster Logging Status: %s", cluster) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route53_delegation_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route53_delegation_set.go new file mode 100644 index 0000000000..117fefc003 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_route53_delegation_set.go @@ -0,0 +1,64 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/route53" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsDelegationSet() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsDelegationSetRead, + + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Required: true, + }, + "caller_reference": { + Type: schema.TypeString, + Computed: true, + }, + "name_servers": { + Type: schema.TypeList, + Elem: &schema.Schema{Type: schema.TypeString}, + Computed: true, + }, + }, + } +} + +func dataSourceAwsDelegationSetRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).r53conn + + dSetID := d.Get("id").(string) + + input := &route53.GetReusableDelegationSetInput{ + Id: aws.String(dSetID), + } + + log.Printf("[DEBUG] Reading Route53 delegation set: %s", input) + + resp, err := conn.GetReusableDelegationSet(input) + if err != nil { + return fmt.Errorf("Failed getting Route53 delegation set: %s Set: %q", err, dSetID) + } + + d.SetId(dSetID) + d.Set("caller_reference", resp.DelegationSet.CallerReference) + + servers := []string{} + for _, server := range resp.DelegationSet.NameServers { + if server != nil { + servers = append(servers, *server) + } + } + if err := d.Set("name_servers", expandNameServers(resp.DelegationSet.NameServers)); err != nil { + return fmt.Errorf("error setting name_servers: %s", err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_secretsmanager_secret.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_secretsmanager_secret.go index b076b8d1cf..1cba15188c 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_secretsmanager_secret.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_secretsmanager_secret.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/secretsmanager" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/structure" ) func dataSourceAwsSecretsManagerSecret() *schema.Resource { @@ -34,6 +35,10 @@ func dataSourceAwsSecretsManagerSecret() *schema.Resource { Optional: true, Computed: true, }, + "policy": { + Type: schema.TypeString, + Computed: true, + }, "rotation_enabled": { Type: schema.TypeBool, Computed: true, @@ -103,6 +108,24 @@ func dataSourceAwsSecretsManagerSecretRead(d *schema.ResourceData, meta interfac d.Set("name", output.Name) d.Set("rotation_enabled", output.RotationEnabled) d.Set("rotation_lambda_arn", output.RotationLambdaARN) + d.Set("policy", "") + + pIn := &secretsmanager.GetResourcePolicyInput{ + SecretId: aws.String(d.Id()), + } + log.Printf("[DEBUG] Reading Secrets Manager Secret policy: %s", pIn) + pOut, err := conn.GetResourcePolicy(pIn) + if err != nil { + return fmt.Errorf("error reading Secrets Manager Secret policy: %s", err) + } + + if pOut != nil && pOut.ResourcePolicy != nil { + policy, err := structure.NormalizeJsonString(aws.StringValue(pOut.ResourcePolicy)) + if err != nil { + return fmt.Errorf("policy contains an invalid JSON: %s", err) + } + d.Set("policy", policy) + } if err := d.Set("rotation_rules", flattenSecretsManagerRotationRules(output.RotationRules)); err != nil { return fmt.Errorf("error setting rotation_rules: %s", err) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_secretsmanager_secret_version.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_secretsmanager_secret_version.go index 80a3827387..7bc4170de0 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_secretsmanager_secret_version.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_secretsmanager_secret_version.go @@ -28,6 +28,11 @@ func dataSourceAwsSecretsManagerSecretVersion() *schema.Resource { Computed: true, Sensitive: true, }, + "secret_binary": { + Type: schema.TypeString, + Computed: true, + Sensitive: true, + }, "version_id": { Type: schema.TypeString, Optional: true, @@ -82,6 +87,7 @@ func dataSourceAwsSecretsManagerSecretVersionRead(d *schema.ResourceData, meta i d.Set("secret_id", secretID) d.Set("secret_string", output.SecretString) d.Set("version_id", output.VersionId) + d.Set("secret_binary", fmt.Sprintf("%s", output.SecretBinary)) d.Set("arn", output.ARN) if err := d.Set("version_stages", flattenStringList(output.VersionStages)); err != nil { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_sns.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_sns.go index 19ce56d3e6..a28a118793 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_sns.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_sns.go @@ -7,7 +7,6 @@ import ( "time" "github.com/aws/aws-sdk-go/service/sns" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/schema" ) @@ -56,7 +55,7 @@ func dataSourceAwsSnsTopicsRead(d *schema.ResourceData, meta interface{}) error return true }) if err != nil { - return errwrap.Wrapf("Error describing topics: {{err}}", err) + return fmt.Errorf("Error describing topics: %s", err) } if len(arns) == 0 { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ssm_document.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ssm_document.go new file mode 100644 index 0000000000..6819233a4c --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ssm_document.go @@ -0,0 +1,90 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" + "github.com/aws/aws-sdk-go/service/ssm" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func dataSourceAwsSsmDocument() *schema.Resource { + return &schema.Resource{ + Read: dataAwsSsmDocumentRead, + Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "content": { + Type: schema.TypeString, + Computed: true, + }, + "document_format": { + Type: schema.TypeString, + Optional: true, + Default: ssm.DocumentFormatJson, + ValidateFunc: validation.StringInSlice([]string{ + ssm.DocumentFormatJson, + ssm.DocumentFormatYaml, + }, false), + }, + "document_type": { + Type: schema.TypeString, + Computed: true, + }, + "document_version": { + Type: schema.TypeString, + Optional: true, + }, + "name": { + Type: schema.TypeString, + Required: true, + }, + }, + } +} + +func dataAwsSsmDocumentRead(d *schema.ResourceData, meta interface{}) error { + ssmconn := meta.(*AWSClient).ssmconn + + name := d.Get("name").(string) + + docInput := &ssm.GetDocumentInput{ + Name: aws.String(name), + DocumentFormat: aws.String(d.Get("document_format").(string)), + } + + if docVersion, ok := d.GetOk("document_version"); ok { + docInput.DocumentVersion = aws.String(docVersion.(string)) + } + + log.Printf("[DEBUG] Reading SSM Document: %s", docInput) + resp, err := ssmconn.GetDocument(docInput) + + if err != nil { + return fmt.Errorf("Error reading SSM Document: %s", err) + } + + d.SetId(aws.StringValue(resp.Name)) + + arn := arn.ARN{ + Partition: meta.(*AWSClient).partition, + Service: "ssm", + Region: meta.(*AWSClient).region, + AccountID: meta.(*AWSClient).accountid, + Resource: fmt.Sprintf("document/%s", aws.StringValue(resp.Name)), + }.String() + + d.Set("arn", arn) + d.Set("name", resp.Name) + d.Set("content", resp.Content) + d.Set("document_version", resp.DocumentVersion) + d.Set("document_format", resp.DocumentFormat) + d.Set("document_type", resp.DocumentType) + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ssm_parameter.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ssm_parameter.go index 024eedd8f8..68df28df4c 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ssm_parameter.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_ssm_parameter.go @@ -8,7 +8,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/ssm" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/schema" ) @@ -56,7 +55,7 @@ func dataAwsSsmParameterRead(d *schema.ResourceData, meta interface{}) error { resp, err := ssmconn.GetParameter(paramInput) if err != nil { - return errwrap.Wrapf("[ERROR] Error describing SSM parameter: {{err}}", err) + return fmt.Errorf("Error describing SSM parameter: %s", err) } param := resp.Parameter diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc.go index b2ad03d196..87701c2f63 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_vpc.go @@ -15,6 +15,11 @@ func dataSourceAwsVpc() *schema.Resource { Read: dataSourceAwsVpcRead, Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, + "cidr_block": { Type: schema.TypeString, Optional: true, @@ -42,15 +47,25 @@ func dataSourceAwsVpc() *schema.Resource { }, }, + "default": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, + "dhcp_options_id": { Type: schema.TypeString, Optional: true, Computed: true, }, - "default": { + "enable_dns_hostnames": { + Type: schema.TypeBool, + Computed: true, + }, + + "enable_dns_support": { Type: schema.TypeBool, - Optional: true, Computed: true, }, @@ -77,24 +92,14 @@ func dataSourceAwsVpc() *schema.Resource { Computed: true, }, - "state": { + "main_route_table_id": { Type: schema.TypeString, - Optional: true, - Computed: true, - }, - - "enable_dns_hostnames": { - Type: schema.TypeBool, - Computed: true, - }, - - "enable_dns_support": { - Type: schema.TypeBool, Computed: true, }, - "arn": { + "state": { Type: schema.TypeString, + Optional: true, Computed: true, }, @@ -160,7 +165,7 @@ func dataSourceAwsVpcRead(d *schema.ResourceData, meta interface{}) error { vpc := resp.Vpcs[0] - d.SetId(*vpc.VpcId) + d.SetId(aws.StringValue(vpc.VpcId)) d.Set("cidr_block", vpc.CidrBlock) d.Set("dhcp_options_id", vpc.DhcpOptionsId) d.Set("instance_tenancy", vpc.InstanceTenancy) @@ -195,17 +200,23 @@ func dataSourceAwsVpcRead(d *schema.ResourceData, meta interface{}) error { d.Set("ipv6_cidr_block", vpc.Ipv6CidrBlockAssociationSet[0].Ipv6CidrBlock) } - attResp, err := awsVpcDescribeVpcAttribute("enableDnsSupport", *vpc.VpcId, conn) + attResp, err := awsVpcDescribeVpcAttribute("enableDnsSupport", aws.StringValue(vpc.VpcId), conn) if err != nil { return err } d.Set("enable_dns_support", attResp.EnableDnsSupport.Value) - attResp, err = awsVpcDescribeVpcAttribute("enableDnsHostnames", *vpc.VpcId, conn) + attResp, err = awsVpcDescribeVpcAttribute("enableDnsHostnames", aws.StringValue(vpc.VpcId), conn) if err != nil { return err } d.Set("enable_dns_hostnames", attResp.EnableDnsHostnames.Value) + routeTableId, err := resourceAwsVpcSetMainRouteTable(conn, aws.StringValue(vpc.VpcId)) + if err != nil { + log.Printf("[WARN] Unable to set Main Route Table: %s", err) + } + d.Set("main_route_table_id", routeTableId) + return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_workspaces_bundle.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_workspaces_bundle.go new file mode 100644 index 0000000000..0da1e52a1d --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_workspaces_bundle.go @@ -0,0 +1,126 @@ +package aws + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/workspaces" + "github.com/hashicorp/terraform/helper/schema" +) + +func dataSourceAwsWorkspaceBundle() *schema.Resource { + return &schema.Resource{ + Read: dataSourceAwsWorkspaceBundleRead, + + Schema: map[string]*schema.Schema{ + "bundle_id": { + Type: schema.TypeString, + Required: true, + }, + "description": { + Type: schema.TypeString, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Computed: true, + }, + "owner": { + Type: schema.TypeString, + Computed: true, + }, + "compute_type": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "user_storage": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "capacity": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "root_storage": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "capacity": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + } +} + +func dataSourceAwsWorkspaceBundleRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).workspacesconn + + bundleID := d.Get("bundle_id").(string) + input := &workspaces.DescribeWorkspaceBundlesInput{ + BundleIds: []*string{aws.String(bundleID)}, + } + + resp, err := conn.DescribeWorkspaceBundles(input) + if err != nil { + return err + } + + if len(resp.Bundles) != 1 { + return fmt.Errorf("The number of Workspace Bundle (%s) should be 1, but %d", bundleID, len(resp.Bundles)) + } + + bundle := resp.Bundles[0] + d.SetId(bundleID) + d.Set("description", bundle.Description) + d.Set("name", bundle.Name) + d.Set("owner", bundle.Owner) + + computeType := make([]map[string]interface{}, 1) + if bundle.ComputeType != nil { + computeType[0] = map[string]interface{}{ + "name": aws.StringValue(bundle.ComputeType.Name), + } + } + if err := d.Set("compute_type", computeType); err != nil { + return fmt.Errorf("error setting compute_type: %s", err) + } + + rootStorage := make([]map[string]interface{}, 1) + if bundle.RootStorage != nil { + rootStorage[0] = map[string]interface{}{ + "capacity": aws.StringValue(bundle.RootStorage.Capacity), + } + } + if err := d.Set("root_storage", rootStorage); err != nil { + return fmt.Errorf("error setting root_storage: %s", err) + } + + userStorage := make([]map[string]interface{}, 1) + if bundle.UserStorage != nil { + userStorage[0] = map[string]interface{}{ + "capacity": aws.StringValue(bundle.UserStorage.Capacity), + } + } + if err := d.Set("user_storage", userStorage); err != nil { + return fmt.Errorf("error setting user_storage: %s", err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/dx_vif.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/dx_vif.go index ea659c7b6c..ebf0a54e04 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/dx_vif.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/dx_vif.go @@ -26,6 +26,24 @@ func dxVirtualInterfaceRead(id string, conn *directconnect.DirectConnect) (*dire func dxVirtualInterfaceUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).dxconn + req := &directconnect.UpdateVirtualInterfaceAttributesInput{ + VirtualInterfaceId: aws.String(d.Id()), + } + + requestUpdate := false + if d.HasChange("mtu") { + req.Mtu = aws.Int64(int64(d.Get("mtu").(int))) + requestUpdate = true + } + + if requestUpdate { + log.Printf("[DEBUG] Modifying Direct Connect virtual interface attributes: %#v", req) + _, err := conn.UpdateVirtualInterfaceAttributes(req) + if err != nil { + return fmt.Errorf("Error modifying Direct Connect virtual interface (%s) attributes, error: %s", d.Id(), err) + } + } + if err := setTagsDX(conn, d, d.Get("arn").(string)); err != nil { return err } @@ -97,17 +115,17 @@ func dxVirtualInterfaceStateRefresh(conn *directconnect.DirectConnect, vifId str } } -func dxVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect, pending, target []string) error { +func dxVirtualInterfaceWaitUntilAvailable(conn *directconnect.DirectConnect, vifId string, timeout time.Duration, pending, target []string) error { stateConf := &resource.StateChangeConf{ Pending: pending, Target: target, - Refresh: dxVirtualInterfaceStateRefresh(conn, d.Id()), - Timeout: d.Timeout(schema.TimeoutCreate), + Refresh: dxVirtualInterfaceStateRefresh(conn, vifId), + Timeout: timeout, Delay: 10 * time.Second, MinTimeout: 5 * time.Second, } if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf("Error waiting for Direct Connect virtual interface (%s) to become available: %s", d.Id(), err) + return fmt.Errorf("Error waiting for Direct Connect virtual interface (%s) to become available: %s", vifId, err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/ecs_task_definition_equivalency.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/ecs_task_definition_equivalency.go index 52c5e38fe7..72791b76dd 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/ecs_task_definition_equivalency.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/ecs_task_definition_equivalency.go @@ -13,13 +13,15 @@ import ( "github.com/mitchellh/copystructure" ) -func ecsContainerDefinitionsAreEquivalent(def1, def2 string) (bool, error) { +// EcsContainerDefinitionsAreEquivalent determines equality between two ECS container definition JSON strings +// Note: This function will be moved out of the aws package in the future. +func EcsContainerDefinitionsAreEquivalent(def1, def2 string, isAWSVPC bool) (bool, error) { var obj1 containerDefinitions err := json.Unmarshal([]byte(def1), &obj1) if err != nil { return false, err } - err = obj1.Reduce() + err = obj1.Reduce(isAWSVPC) if err != nil { return false, err } @@ -33,7 +35,7 @@ func ecsContainerDefinitionsAreEquivalent(def1, def2 string) (bool, error) { if err != nil { return false, err } - err = obj2.Reduce() + err = obj2.Reduce(isAWSVPC) if err != nil { return false, err } @@ -53,7 +55,7 @@ func ecsContainerDefinitionsAreEquivalent(def1, def2 string) (bool, error) { type containerDefinitions []*ecs.ContainerDefinition -func (cd containerDefinitions) Reduce() error { +func (cd containerDefinitions) Reduce(isAWSVPC bool) error { for i, def := range cd { // Deal with special fields which have defaults if def.Cpu != nil && *def.Cpu == 0 { @@ -69,6 +71,9 @@ func (cd containerDefinitions) Reduce() error { if pm.HostPort != nil && *pm.HostPort == 0 { cd[i].PortMappings[j].HostPort = nil } + if isAWSVPC && cd[i].PortMappings[j].HostPort == nil { + cd[i].PortMappings[j].HostPort = cd[i].PortMappings[j].ContainerPort + } } // Deal with fields which may be re-ordered in the API diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_s3_bucket.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_s3_bucket.go index ba2129e1ff..d8d051b8bc 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_s3_bucket.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_s3_bucket.go @@ -1,10 +1,11 @@ package aws import ( + "fmt" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/s3" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/schema" ) @@ -24,7 +25,7 @@ func resourceAwsS3BucketImportState( // Bucket without policy return results, nil } - return nil, errwrap.Wrapf("Error importing AWS S3 bucket policy: {{err}}", err) + return nil, fmt.Errorf("Error importing AWS S3 bucket policy: %s", err) } policy := resourceAwsS3BucketPolicy() diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_security_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_security_group.go index d1a6341f06..bbae893d6b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_security_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/import_aws_security_group.go @@ -4,7 +4,6 @@ import ( "fmt" "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/schema" ) @@ -51,7 +50,7 @@ func resourceAwsSecurityGroupImportState( func resourceAwsSecurityGroupImportStatePerm(sg *ec2.SecurityGroup, ruleType string, perm *ec2.IpPermission) ([]*schema.ResourceData, error) { /* - Create a seperate Security Group Rule for: + Create a separate Security Group Rule for: * The collection of IpRanges (cidr_blocks) * The collection of Ipv6Ranges (ipv6_cidr_blocks) * Each individual UserIdGroupPair (source_security_group_id) @@ -179,7 +178,7 @@ func resourceAwsSecurityGroupImportStatePermPair(sg *ec2.SecurityGroup, ruleType } if err := setFromIPPerm(d, sg, perm); err != nil { - return nil, errwrap.Wrapf("Error importing AWS Security Group: {{err}}", err) + return nil, fmt.Errorf("Error importing AWS Security Group: %s", err) } return d, nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/network_acl_entry.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/network_acl_entry.go index 5b92c8d9f3..c08b68e78b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/network_acl_entry.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/network_acl_entry.go @@ -43,7 +43,7 @@ func expandNetworkAclEntries(configured []interface{}, entryType string) ([]*ec2 } // Specify additional required fields for ICMP - if p == 1 { + if p == 1 || p == 58 { e.IcmpTypeCode = &ec2.IcmpTypeCode{} if v, ok := data["icmp_code"]; ok { e.IcmpTypeCode.Code = aws.Int64(int64(v.(int))) @@ -58,34 +58,6 @@ func expandNetworkAclEntries(configured []interface{}, entryType string) ([]*ec2 return entries, nil } -func flattenNetworkAclEntries(list []*ec2.NetworkAclEntry) []map[string]interface{} { - entries := make([]map[string]interface{}, 0, len(list)) - - for _, entry := range list { - - newEntry := map[string]interface{}{ - "from_port": *entry.PortRange.From, - "to_port": *entry.PortRange.To, - "action": *entry.RuleAction, - "rule_no": *entry.RuleNumber, - "protocol": *entry.Protocol, - } - - if entry.CidrBlock != nil { - newEntry["cidr_block"] = *entry.CidrBlock - } - - if entry.Ipv6CidrBlock != nil { - newEntry["ipv6_cidr_block"] = *entry.Ipv6CidrBlock - } - - entries = append(entries, newEntry) - } - - return entries - -} - func protocolStrings(protocolIntegers map[string]int) map[int]string { protocolStrings := make(map[int]string, len(protocolIntegers)) for k, v := range protocolIntegers { @@ -96,8 +68,7 @@ func protocolStrings(protocolIntegers map[string]int) map[int]string { } func protocolIntegers() map[string]int { - var protocolIntegers = make(map[string]int) - protocolIntegers = map[string]int{ + return map[string]int{ // defined at https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml "all": -1, "hopopt": 0, @@ -245,7 +216,6 @@ func protocolIntegers() map[string]int { "253": 253, "254": 254, } - return protocolIntegers } // expectedPortPair stores a pair of ports we expect to see together. diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/provider.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/provider.go index bf80ad5738..73ebd59291 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/provider.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/provider.go @@ -164,6 +164,7 @@ func Provider() terraform.ResourceProvider { "aws_acmpca_certificate_authority": dataSourceAwsAcmpcaCertificateAuthority(), "aws_ami": dataSourceAwsAmi(), "aws_ami_ids": dataSourceAwsAmiIds(), + "aws_api_gateway_api_key": dataSourceAwsApiGatewayApiKey(), "aws_api_gateway_resource": dataSourceAwsApiGatewayResource(), "aws_api_gateway_rest_api": dataSourceAwsApiGatewayRestApi(), "aws_arn": dataSourceAwsArn(), @@ -177,11 +178,13 @@ func Provider() terraform.ResourceProvider { "aws_canonical_user_id": dataSourceAwsCanonicalUserId(), "aws_cloudformation_export": dataSourceAwsCloudFormationExport(), "aws_cloudformation_stack": dataSourceAwsCloudFormationStack(), + "aws_cloudhsm_v2_cluster": dataSourceCloudHsm2Cluster(), "aws_cloudtrail_service_account": dataSourceAwsCloudTrailServiceAccount(), "aws_cloudwatch_log_group": dataSourceAwsCloudwatchLogGroup(), "aws_cognito_user_pools": dataSourceAwsCognitoUserPools(), "aws_codecommit_repository": dataSourceAwsCodeCommitRepository(), "aws_db_cluster_snapshot": dataSourceAwsDbClusterSnapshot(), + "aws_db_event_categories": dataSourceAwsDbEventCategories(), "aws_db_instance": dataSourceAwsDbInstance(), "aws_db_snapshot": dataSourceAwsDbSnapshot(), "aws_dx_gateway": dataSourceAwsDxGateway(), @@ -229,6 +232,7 @@ func Provider() terraform.ResourceProvider { "aws_lambda_function": dataSourceAwsLambdaFunction(), "aws_lambda_invocation": dataSourceAwsLambdaInvocation(), "aws_launch_configuration": dataSourceAwsLaunchConfiguration(), + "aws_launch_template": dataSourceAwsLaunchTemplate(), "aws_mq_broker": dataSourceAwsMqBroker(), "aws_nat_gateway": dataSourceAwsNatGateway(), "aws_network_acls": dataSourceAwsNetworkAcls(), @@ -244,6 +248,7 @@ func Provider() terraform.ResourceProvider { "aws_route": dataSourceAwsRoute(), "aws_route_table": dataSourceAwsRouteTable(), "aws_route_tables": dataSourceAwsRouteTables(), + "aws_route53_delegation_set": dataSourceAwsDelegationSet(), "aws_route53_zone": dataSourceAwsRoute53Zone(), "aws_s3_bucket": dataSourceAwsS3Bucket(), "aws_s3_bucket_object": dataSourceAwsS3BucketObject(), @@ -251,6 +256,7 @@ func Provider() terraform.ResourceProvider { "aws_secretsmanager_secret_version": dataSourceAwsSecretsManagerSecretVersion(), "aws_sns_topic": dataSourceAwsSnsTopic(), "aws_sqs_queue": dataSourceAwsSqsQueue(), + "aws_ssm_document": dataSourceAwsSsmDocument(), "aws_ssm_parameter": dataSourceAwsSsmParameter(), "aws_storagegateway_local_disk": dataSourceAwsStorageGatewayLocalDisk(), "aws_subnet": dataSourceAwsSubnet(), @@ -264,6 +270,7 @@ func Provider() terraform.ResourceProvider { "aws_vpc_endpoint_service": dataSourceAwsVpcEndpointService(), "aws_vpc_peering_connection": dataSourceAwsVpcPeeringConnection(), "aws_vpn_gateway": dataSourceAwsVpnGateway(), + "aws_workspaces_bundle": dataSourceAwsWorkspaceBundle(), // Adding the Aliases for the ALB -> LB Rename "aws_lb": dataSourceAwsLb(), @@ -325,6 +332,7 @@ func Provider() terraform.ResourceProvider { "aws_cloudformation_stack": resourceAwsCloudFormationStack(), "aws_cloudfront_distribution": resourceAwsCloudFrontDistribution(), "aws_cloudfront_origin_access_identity": resourceAwsCloudFrontOriginAccessIdentity(), + "aws_cloudfront_public_key": resourceAwsCloudFrontPublicKey(), "aws_cloudtrail": resourceAwsCloudTrail(), "aws_cloudwatch_event_permission": resourceAwsCloudWatchEventPermission(), "aws_cloudwatch_event_rule": resourceAwsCloudWatchEventRule(), @@ -349,6 +357,8 @@ func Provider() terraform.ResourceProvider { "aws_cognito_user_pool": resourceAwsCognitoUserPool(), "aws_cognito_user_pool_client": resourceAwsCognitoUserPoolClient(), "aws_cognito_user_pool_domain": resourceAwsCognitoUserPoolDomain(), + "aws_cloudhsm_v2_cluster": resourceAwsCloudHsm2Cluster(), + "aws_cloudhsm_v2_hsm": resourceAwsCloudHsm2Hsm(), "aws_cognito_resource_server": resourceAwsCognitoResourceServer(), "aws_cloudwatch_metric_alarm": resourceAwsCloudWatchMetricAlarm(), "aws_cloudwatch_dashboard": resourceAwsCloudWatchDashboard(), @@ -360,6 +370,7 @@ func Provider() terraform.ResourceProvider { "aws_codebuild_project": resourceAwsCodeBuildProject(), "aws_codebuild_webhook": resourceAwsCodeBuildWebhook(), "aws_codepipeline": resourceAwsCodePipeline(), + "aws_codepipeline_webhook": resourceAwsCodePipelineWebhook(), "aws_customer_gateway": resourceAwsCustomerGateway(), "aws_dax_cluster": resourceAwsDaxCluster(), "aws_dax_parameter_group": resourceAwsDaxParameterGroup(), @@ -375,12 +386,13 @@ func Provider() terraform.ResourceProvider { "aws_devicefarm_project": resourceAwsDevicefarmProject(), "aws_directory_service_directory": resourceAwsDirectoryServiceDirectory(), "aws_directory_service_conditional_forwarder": resourceAwsDirectoryServiceConditionalForwarder(), + "aws_dlm_lifecycle_policy": resourceAwsDlmLifecyclePolicy(), "aws_dms_certificate": resourceAwsDmsCertificate(), "aws_dms_endpoint": resourceAwsDmsEndpoint(), "aws_dms_replication_instance": resourceAwsDmsReplicationInstance(), "aws_dms_replication_subnet_group": resourceAwsDmsReplicationSubnetGroup(), "aws_dms_replication_task": resourceAwsDmsReplicationTask(), - "aws_dx_lag": resourceAwsDxLag(), + "aws_dx_bgp_peer": resourceAwsDxBgpPeer(), "aws_dx_connection": resourceAwsDxConnection(), "aws_dx_connection_association": resourceAwsDxConnectionAssociation(), "aws_dx_gateway": resourceAwsDxGateway(), @@ -389,12 +401,16 @@ func Provider() terraform.ResourceProvider { "aws_dx_hosted_private_virtual_interface_accepter": resourceAwsDxHostedPrivateVirtualInterfaceAccepter(), "aws_dx_hosted_public_virtual_interface": resourceAwsDxHostedPublicVirtualInterface(), "aws_dx_hosted_public_virtual_interface_accepter": resourceAwsDxHostedPublicVirtualInterfaceAccepter(), + "aws_dx_lag": resourceAwsDxLag(), "aws_dx_private_virtual_interface": resourceAwsDxPrivateVirtualInterface(), "aws_dx_public_virtual_interface": resourceAwsDxPublicVirtualInterface(), "aws_dynamodb_table": resourceAwsDynamoDbTable(), "aws_dynamodb_table_item": resourceAwsDynamoDbTableItem(), "aws_dynamodb_global_table": resourceAwsDynamoDbGlobalTable(), + "aws_ec2_capacity_reservation": resourceAwsEc2CapacityReservation(), + "aws_ec2_fleet": resourceAwsEc2Fleet(), "aws_ebs_snapshot": resourceAwsEbsSnapshot(), + "aws_ebs_snapshot_copy": resourceAwsEbsSnapshotCopy(), "aws_ebs_volume": resourceAwsEbsVolume(), "aws_ecr_lifecycle_policy": resourceAwsEcrLifecyclePolicy(), "aws_ecr_repository": resourceAwsEcrRepository(), @@ -430,13 +446,16 @@ func Provider() terraform.ResourceProvider { "aws_gamelift_alias": resourceAwsGameliftAlias(), "aws_gamelift_build": resourceAwsGameliftBuild(), "aws_gamelift_fleet": resourceAwsGameliftFleet(), + "aws_gamelift_game_session_queue": resourceAwsGameliftGameSessionQueue(), "aws_glacier_vault": resourceAwsGlacierVault(), + "aws_glacier_vault_lock": resourceAwsGlacierVaultLock(), "aws_glue_catalog_database": resourceAwsGlueCatalogDatabase(), "aws_glue_catalog_table": resourceAwsGlueCatalogTable(), "aws_glue_classifier": resourceAwsGlueClassifier(), "aws_glue_connection": resourceAwsGlueConnection(), "aws_glue_crawler": resourceAwsGlueCrawler(), "aws_glue_job": resourceAwsGlueJob(), + "aws_glue_security_configuration": resourceAwsGlueSecurityConfiguration(), "aws_glue_trigger": resourceAwsGlueTrigger(), "aws_guardduty_detector": resourceAwsGuardDutyDetector(), "aws_guardduty_ipset": resourceAwsGuardDutyIpset(), @@ -472,12 +491,15 @@ func Provider() terraform.ResourceProvider { "aws_internet_gateway": resourceAwsInternetGateway(), "aws_iot_certificate": resourceAwsIotCertificate(), "aws_iot_policy": resourceAwsIotPolicy(), + "aws_iot_policy_attachment": resourceAwsIotPolicyAttachment(), "aws_iot_thing": resourceAwsIotThing(), + "aws_iot_thing_principal_attachment": resourceAwsIotThingPrincipalAttachment(), "aws_iot_thing_type": resourceAwsIotThingType(), "aws_iot_topic_rule": resourceAwsIotTopicRule(), "aws_key_pair": resourceAwsKeyPair(), "aws_kinesis_firehose_delivery_stream": resourceAwsKinesisFirehoseDeliveryStream(), "aws_kinesis_stream": resourceAwsKinesisStream(), + "aws_kinesis_analytics_application": resourceAwsKinesisAnalyticsApplication(), "aws_kms_alias": resourceAwsKmsAlias(), "aws_kms_grant": resourceAwsKmsGrant(), "aws_kms_key": resourceAwsKmsKey(), @@ -546,6 +568,8 @@ func Provider() terraform.ResourceProvider { "aws_redshift_security_group": resourceAwsRedshiftSecurityGroup(), "aws_redshift_parameter_group": resourceAwsRedshiftParameterGroup(), "aws_redshift_subnet_group": resourceAwsRedshiftSubnetGroup(), + "aws_redshift_snapshot_copy_grant": resourceAwsRedshiftSnapshotCopyGrant(), + "aws_redshift_event_subscription": resourceAwsRedshiftEventSubscription(), "aws_route53_delegation_set": resourceAwsRoute53DelegationSet(), "aws_route53_query_log": resourceAwsRoute53QueryLog(), "aws_route53_record": resourceAwsRoute53Record(), @@ -667,11 +691,22 @@ func Provider() terraform.ResourceProvider { "aws_batch_compute_environment": resourceAwsBatchComputeEnvironment(), "aws_batch_job_definition": resourceAwsBatchJobDefinition(), "aws_batch_job_queue": resourceAwsBatchJobQueue(), + "aws_pinpoint_app": resourceAwsPinpointApp(), + "aws_pinpoint_adm_channel": resourceAwsPinpointADMChannel(), + "aws_pinpoint_apns_channel": resourceAwsPinpointAPNSChannel(), + "aws_pinpoint_apns_sandbox_channel": resourceAwsPinpointAPNSSandboxChannel(), + "aws_pinpoint_apns_voip_channel": resourceAwsPinpointAPNSVoipChannel(), + "aws_pinpoint_apns_voip_sandbox_channel": resourceAwsPinpointAPNSVoipSandboxChannel(), + "aws_pinpoint_baidu_channel": resourceAwsPinpointBaiduChannel(), + "aws_pinpoint_email_channel": resourceAwsPinpointEmailChannel(), + "aws_pinpoint_event_stream": resourceAwsPinpointEventStream(), + "aws_pinpoint_gcm_channel": resourceAwsPinpointGCMChannel(), + "aws_pinpoint_sms_channel": resourceAwsPinpointSMSChannel(), // ALBs are actually LBs because they can be type `network` or `application` // To avoid regressions, we will add a new resource for each and they both point // back to the old ALB version. IF the Terraform supported aliases for resources - // this would be a whole lot simplier + // this would be a whole lot simpler "aws_alb": resourceAwsLb(), "aws_lb": resourceAwsLb(), "aws_alb_listener": resourceAwsLbListener(), @@ -733,6 +768,8 @@ func init() { "kinesis_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n" + "It's typically used to connect to kinesalite.", + "kinesis_analytics_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", + "kms_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", "iam_endpoint": "Use this to override the default endpoint URL constructed from the `region`.\n", @@ -858,6 +895,7 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) { config.EsEndpoint = endpoints["es"].(string) config.IamEndpoint = endpoints["iam"].(string) config.KinesisEndpoint = endpoints["kinesis"].(string) + config.KinesisAnalyticsEndpoint = endpoints["kinesis_analytics"].(string) config.KmsEndpoint = endpoints["kms"].(string) config.LambdaEndpoint = endpoints["lambda"].(string) config.R53Endpoint = endpoints["r53"].(string) @@ -1032,6 +1070,12 @@ func endpointsSchema() *schema.Schema { Default: "", Description: descriptions["kinesis_endpoint"], }, + "kinesis_analytics": { + Type: schema.TypeString, + Optional: true, + Default: "", + Description: descriptions["kinesis_analytics_endpoint"], + }, "kms": { Type: schema.TypeString, Optional: true, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate.go index 14beef1d3f..db49e7d097 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acm_certificate.go @@ -156,6 +156,9 @@ func resourceAwsAcmCertificateRead(d *schema.ResourceData, meta interface{}) err } tagResp, err := acmconn.ListTagsForCertificate(params) + if err != nil { + return resource.NonRetryableError(fmt.Errorf("error listing tags for certificate (%s): %s", d.Id(), err)) + } if err := d.Set("tags", tagsToMapACM(tagResp.Tags)); err != nil { return resource.NonRetryableError(err) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acmpca_certificate_authority.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acmpca_certificate_authority.go index e8158743c6..75bbc1460f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acmpca_certificate_authority.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_acmpca_certificate_authority.go @@ -691,27 +691,6 @@ func flattenAcmpcaRevocationConfiguration(config *acmpca.RevocationConfiguration return []interface{}{m} } -func listAcmpcaCertificateAuthorities(conn *acmpca.ACMPCA) ([]*acmpca.CertificateAuthority, error) { - certificateAuthorities := []*acmpca.CertificateAuthority{} - input := &acmpca.ListCertificateAuthoritiesInput{} - - for { - output, err := conn.ListCertificateAuthorities(input) - if err != nil { - return certificateAuthorities, err - } - for _, certificateAuthority := range output.CertificateAuthorities { - certificateAuthorities = append(certificateAuthorities, certificateAuthority) - } - if output.NextToken == nil { - break - } - input.NextToken = output.NextToken - } - - return certificateAuthorities, nil -} - func listAcmpcaTags(conn *acmpca.ACMPCA, certificateAuthorityArn string) ([]*acmpca.Tag, error) { tags := []*acmpca.Tag{} input := &acmpca.ListTagsInput{ diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami.go index 39e3c90205..f1e0ca9a3e 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami.go @@ -27,6 +27,16 @@ const ( func resourceAwsAmi() *schema.Resource { return &schema.Resource{ Create: resourceAwsAmiCreate, + // The Read, Update and Delete operations are shared with aws_ami_copy + // and aws_ami_from_instance, since they differ only in how the image + // is created. + Read: resourceAwsAmiRead, + Update: resourceAwsAmiUpdate, + Delete: resourceAwsAmiDelete, + + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Timeouts: &schema.ResourceTimeout{ Create: schema.DefaultTimeout(AWSAMIRetryTimeout), @@ -195,13 +205,6 @@ func resourceAwsAmi() *schema.Resource { Default: "paravirtual", }, }, - - // The Read, Update and Delete operations are shared with aws_ami_copy - // and aws_ami_from_instance, since they differ only in how the image - // is created. - Read: resourceAwsAmiRead, - Update: resourceAwsAmiUpdate, - Delete: resourceAwsAmiDelete, } } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami_launch_permission.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami_launch_permission.go index cbc6d1447e..9d075c3a42 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami_launch_permission.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ami_launch_permission.go @@ -106,7 +106,7 @@ func hasLaunchPermission(conn *ec2.EC2, image_id string, account_id string) (boo } for _, lp := range attrs.LaunchPermissions { - if *lp.UserId == account_id { + if aws.StringValue(lp.UserId) == account_id { return true, nil } } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_deployment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_deployment.go index f8fff84d46..b11f387065 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_deployment.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_deployment.go @@ -9,7 +9,6 @@ import ( "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/apigateway" - "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -173,32 +172,44 @@ func resourceAwsApiGatewayDeploymentDelete(d *schema.ResourceData, meta interfac conn := meta.(*AWSClient).apigateway log.Printf("[DEBUG] Deleting API Gateway Deployment: %s", d.Id()) - return resource.Retry(5*time.Minute, func() *resource.RetryError { - log.Printf("[DEBUG] schema is %#v", d) + // If the stage has been updated to point at a different deployment, then + // the stage should not be removed then this deployment is deleted. + shouldDeleteStage := false + + stage, err := conn.GetStage(&apigateway.GetStageInput{ + StageName: aws.String(d.Get("stage_name").(string)), + RestApiId: aws.String(d.Get("rest_api_id").(string)), + }) + + if err != nil && !isAWSErr(err, apigateway.ErrCodeNotFoundException, "") { + return fmt.Errorf("error getting referenced stage: %s", err) + } + + if stage != nil && aws.StringValue(stage.DeploymentId) == d.Id() { + shouldDeleteStage = true + } + + if shouldDeleteStage { if _, err := conn.DeleteStage(&apigateway.DeleteStageInput{ StageName: aws.String(d.Get("stage_name").(string)), RestApiId: aws.String(d.Get("rest_api_id").(string)), }); err == nil { return nil } + } - _, err := conn.DeleteDeployment(&apigateway.DeleteDeploymentInput{ - DeploymentId: aws.String(d.Id()), - RestApiId: aws.String(d.Get("rest_api_id").(string)), - }) - if err == nil { - return nil - } + _, err = conn.DeleteDeployment(&apigateway.DeleteDeploymentInput{ + DeploymentId: aws.String(d.Id()), + RestApiId: aws.String(d.Get("rest_api_id").(string)), + }) - apigatewayErr, ok := err.(awserr.Error) - if apigatewayErr.Code() == "NotFoundException" { - return nil - } + if isAWSErr(err, apigateway.ErrCodeNotFoundException, "") { + return nil + } - if !ok { - return resource.NonRetryableError(err) - } + if err != nil { + return fmt.Errorf("error deleting API Gateway Deployment (%s): %s", d.Id(), err) + } - return resource.NonRetryableError(err) - }) + return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_rest_api.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_rest_api.go index 5922f7f82e..7f304c8d7f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_rest_api.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_rest_api.go @@ -45,7 +45,7 @@ func resourceAwsApiGatewayRestApi() *schema.Resource { "policy": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, @@ -64,7 +64,7 @@ func resourceAwsApiGatewayRestApi() *schema.Resource { Type: schema.TypeInt, Optional: true, Default: -1, - ValidateFunc: validateIntegerInRange(-1, 10485760), + ValidateFunc: validation.IntBetween(-1, 10485760), }, "root_resource_id": { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_stage.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_stage.go index 8ad8315a27..a2c8e13479 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_stage.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_stage.go @@ -104,6 +104,10 @@ func resourceAwsApiGatewayStage() *schema.Resource { Optional: true, }, "tags": tagsSchema(), + "xray_tracing_enabled": { + Type: schema.TypeBool, + Optional: true, + }, }, } } @@ -131,6 +135,9 @@ func resourceAwsApiGatewayStageCreate(d *schema.ResourceData, meta interface{}) if v, ok := d.GetOk("description"); ok { input.Description = aws.String(v.(string)) } + if v, ok := d.GetOk("xray_tracing_enabled"); ok { + input.TracingEnabled = aws.Bool(v.(bool)) + } if v, ok := d.GetOk("documentation_version"); ok { input.DocumentationVersion = aws.String(v.(string)) } @@ -161,6 +168,7 @@ func resourceAwsApiGatewayStageCreate(d *schema.ResourceData, meta interface{}) d.SetPartial("deployment_id") d.SetPartial("description") d.SetPartial("variables") + d.SetPartial("xray_tracing_enabled") if waitForCache && *out.CacheClusterStatus != "NOT_AVAILABLE" { stateConf := &resource.StateChangeConf{ @@ -233,6 +241,7 @@ func resourceAwsApiGatewayStageRead(d *schema.ResourceData, meta interface{}) er d.Set("deployment_id", stage.DeploymentId) d.Set("description", stage.Description) d.Set("documentation_version", stage.DocumentationVersion) + d.Set("xray_tracing_enabled", stage.TracingEnabled) if err := d.Set("tags", aws.StringValueMap(stage.Tags)); err != nil { return fmt.Errorf("error setting tags: %s", err) @@ -312,6 +321,13 @@ func resourceAwsApiGatewayStageUpdate(d *schema.ResourceData, meta interface{}) Value: aws.String(d.Get("description").(string)), }) } + if d.HasChange("xray_tracing_enabled") { + operations = append(operations, &apigateway.PatchOperation{ + Op: aws.String("replace"), + Path: aws.String("/tracingEnabled"), + Value: aws.String(fmt.Sprintf("%t", d.Get("xray_tracing_enabled").(bool))), + }) + } if d.HasChange("documentation_version") { operations = append(operations, &apigateway.PatchOperation{ Op: aws.String("replace"), @@ -323,7 +339,7 @@ func resourceAwsApiGatewayStageUpdate(d *schema.ResourceData, meta interface{}) o, n := d.GetChange("variables") oldV := o.(map[string]interface{}) newV := n.(map[string]interface{}) - operations = append(operations, diffVariablesOps("/variables/", oldV, newV)...) + operations = append(operations, diffVariablesOps(oldV, newV)...) } if d.HasChange("access_log_settings") { accessLogSettings := d.Get("access_log_settings").([]interface{}) @@ -361,6 +377,7 @@ func resourceAwsApiGatewayStageUpdate(d *schema.ResourceData, meta interface{}) d.SetPartial("client_certificate_id") d.SetPartial("deployment_id") d.SetPartial("description") + d.SetPartial("xray_tracing_enabled") d.SetPartial("variables") if waitForCache && *out.CacheClusterStatus != "NOT_AVAILABLE" { @@ -394,8 +411,9 @@ func resourceAwsApiGatewayStageUpdate(d *schema.ResourceData, meta interface{}) return resourceAwsApiGatewayStageRead(d, meta) } -func diffVariablesOps(prefix string, oldVars, newVars map[string]interface{}) []*apigateway.PatchOperation { +func diffVariablesOps(oldVars, newVars map[string]interface{}) []*apigateway.PatchOperation { ops := make([]*apigateway.PatchOperation, 0) + prefix := "/variables/" for k := range oldVars { if _, ok := newVars[k]; !ok { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_usage_plan.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_usage_plan.go index e7786b0458..cf4653825c 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_usage_plan.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_usage_plan.go @@ -1,12 +1,12 @@ package aws import ( + "errors" "fmt" "log" "strconv" "time" - "errors" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/apigateway" @@ -251,19 +251,19 @@ func resourceAwsApiGatewayUsagePlanRead(d *schema.ResourceData, meta interface{} if up.ApiStages != nil { if err := d.Set("api_stages", flattenApiGatewayUsageApiStages(up.ApiStages)); err != nil { - return fmt.Errorf("[DEBUG] Error setting api_stages error: %#v", err) + return fmt.Errorf("Error setting api_stages error: %#v", err) } } if up.Throttle != nil { if err := d.Set("throttle_settings", flattenApiGatewayUsagePlanThrottling(up.Throttle)); err != nil { - return fmt.Errorf("[DEBUG] Error setting throttle_settings error: %#v", err) + return fmt.Errorf("Error setting throttle_settings error: %#v", err) } } if up.Quota != nil { if err := d.Set("quota_settings", flattenApiGatewayUsagePlanQuota(up.Quota)); err != nil { - return fmt.Errorf("[DEBUG] Error setting quota_settings error: %#v", err) + return fmt.Errorf("Error setting quota_settings error: %#v", err) } } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_vpc_link.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_vpc_link.go index ae7e455728..3d4f2676bd 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_vpc_link.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_api_gateway_vpc_link.go @@ -70,7 +70,7 @@ func resourceAwsApiGatewayVpcLinkCreate(d *schema.ResourceData, meta interface{} _, err = stateConf.WaitForState() if err != nil { d.SetId("") - return fmt.Errorf("[WARN] Error waiting for APIGateway Vpc Link status to be \"%s\": %s", apigateway.VpcLinkStatusAvailable, err) + return fmt.Errorf("Error waiting for APIGateway Vpc Link status to be \"%s\": %s", apigateway.VpcLinkStatusAvailable, err) } return nil @@ -145,7 +145,7 @@ func resourceAwsApiGatewayVpcLinkUpdate(d *schema.ResourceData, meta interface{} _, err = stateConf.WaitForState() if err != nil { - return fmt.Errorf("[WARN] Error waiting for APIGateway Vpc Link status to be \"%s\": %s", apigateway.VpcLinkStatusAvailable, err) + return fmt.Errorf("Error waiting for APIGateway Vpc Link status to be \"%s\": %s", apigateway.VpcLinkStatusAvailable, err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_policy.go index 4324b531e6..324223b122 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appautoscaling_policy.go @@ -28,7 +28,7 @@ func resourceAwsAppautoscalingPolicy() *schema.Resource { Required: true, ForceNew: true, // https://github.com/boto/botocore/blob/9f322b1/botocore/data/autoscaling/2011-01-01/service-2.json#L1862-L1873 - ValidateFunc: validateMaxLength(255), + ValidateFunc: validation.StringLenBetween(0, 255), }, "arn": { Type: schema.TypeString, @@ -80,14 +80,12 @@ func resourceAwsAppautoscalingPolicy() *schema.Resource { Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "metric_interval_lower_bound": { - Type: schema.TypeFloat, + Type: schema.TypeString, Optional: true, - Default: -1, }, "metric_interval_upper_bound": { - Type: schema.TypeFloat, + Type: schema.TypeString, Optional: true, - Default: -1, }, "scaling_adjustment": { Type: schema.TypeInt, @@ -217,7 +215,7 @@ func resourceAwsAppautoscalingPolicy() *schema.Resource { "resource_label": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateMaxLength(1023), + ValidateFunc: validation.StringLenBetween(0, 1023), }, }, }, @@ -402,10 +400,6 @@ func expandAppautoscalingStepAdjustments(configured []interface{}) ([]*applicati if data["metric_interval_lower_bound"] != "" { bound := data["metric_interval_lower_bound"] switch bound := bound.(type) { - case float64: - if bound >= 0 { - a.MetricIntervalLowerBound = aws.Float64(bound) - } case string: f, err := strconv.ParseFloat(bound, 64) if err != nil { @@ -421,10 +415,6 @@ func expandAppautoscalingStepAdjustments(configured []interface{}) ([]*applicati if data["metric_interval_upper_bound"] != "" { bound := data["metric_interval_upper_bound"] switch bound := bound.(type) { - case float64: - if bound >= 0 { - a.MetricIntervalUpperBound = aws.Float64(bound) - } case string: f, err := strconv.ParseFloat(bound, 64) if err != nil { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appsync_datasource.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appsync_datasource.go index 9d8d0bbd1e..5fdce8b9b2 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appsync_datasource.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appsync_datasource.go @@ -18,6 +18,9 @@ func resourceAwsAppsyncDatasource() *schema.Resource { Read: resourceAwsAppsyncDatasourceRead, Update: resourceAwsAppsyncDatasourceUpdate, Delete: resourceAwsAppsyncDatasourceDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "api_id": { @@ -42,6 +45,7 @@ func resourceAwsAppsyncDatasource() *schema.Resource { appsync.DataSourceTypeAwsLambda, appsync.DataSourceTypeAmazonDynamodb, appsync.DataSourceTypeAmazonElasticsearch, + appsync.DataSourceTypeHttp, appsync.DataSourceTypeNone, }, true), StateFunc: func(v interface{}) string { @@ -60,7 +64,8 @@ func resourceAwsAppsyncDatasource() *schema.Resource { Schema: map[string]*schema.Schema{ "region": { Type: schema.TypeString, - Required: true, + Optional: true, + Computed: true, }, "table_name": { Type: schema.TypeString, @@ -72,7 +77,7 @@ func resourceAwsAppsyncDatasource() *schema.Resource { }, }, }, - ConflictsWith: []string{"elasticsearch_config", "lambda_config"}, + ConflictsWith: []string{"elasticsearch_config", "http_config", "lambda_config"}, }, "elasticsearch_config": { Type: schema.TypeList, @@ -81,16 +86,31 @@ func resourceAwsAppsyncDatasource() *schema.Resource { Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "region": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "endpoint": { Type: schema.TypeString, Required: true, }, + }, + }, + ConflictsWith: []string{"dynamodb_config", "http_config", "lambda_config"}, + }, + "http_config": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ "endpoint": { Type: schema.TypeString, Required: true, }, }, }, - ConflictsWith: []string{"dynamodb_config", "lambda_config"}, + ConflictsWith: []string{"dynamodb_config", "elasticsearch_config", "lambda_config"}, }, "lambda_config": { Type: schema.TypeList, @@ -104,7 +124,7 @@ func resourceAwsAppsyncDatasource() *schema.Resource { }, }, }, - ConflictsWith: []string{"dynamodb_config", "elasticsearch_config"}, + ConflictsWith: []string{"dynamodb_config", "elasticsearch_config", "http_config"}, }, "service_role_arn": { Type: schema.TypeString, @@ -120,6 +140,7 @@ func resourceAwsAppsyncDatasource() *schema.Resource { func resourceAwsAppsyncDatasourceCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).appsyncconn + region := meta.(*AWSClient).region input := &appsync.CreateDataSourceInput{ ApiId: aws.String(d.Get("api_id").(string)), @@ -131,39 +152,48 @@ func resourceAwsAppsyncDatasourceCreate(d *schema.ResourceData, meta interface{} input.Description = aws.String(v.(string)) } - if v, ok := d.GetOk("service_role_arn"); ok { - input.ServiceRoleArn = aws.String(v.(string)) + if v, ok := d.GetOk("dynamodb_config"); ok { + input.DynamodbConfig = expandAppsyncDynamodbDataSourceConfig(v.([]interface{}), region) } - ddbconfig := d.Get("dynamodb_config").([]interface{}) - if len(ddbconfig) > 0 { - input.DynamodbConfig = expandAppsyncDynamodbDataSourceConfig(ddbconfig[0].(map[string]interface{})) + if v, ok := d.GetOk("elasticsearch_config"); ok { + input.ElasticsearchConfig = expandAppsyncElasticsearchDataSourceConfig(v.([]interface{}), region) } - esconfig := d.Get("elasticsearch_config").([]interface{}) - if len(esconfig) > 0 { - input.ElasticsearchConfig = expandAppsyncElasticsearchDataSourceConfig(esconfig[0].(map[string]interface{})) + + if v, ok := d.GetOk("http_config"); ok { + input.HttpConfig = expandAppsyncHTTPDataSourceConfig(v.([]interface{})) } - lambdaconfig := d.Get("lambda_config").([]interface{}) - if len(lambdaconfig) > 0 { - input.LambdaConfig = expandAppsyncLambdaDataSourceConfig(lambdaconfig[0].(map[string]interface{})) + + if v, ok := d.GetOk("lambda_config"); ok { + input.LambdaConfig = expandAppsyncLambdaDataSourceConfig(v.([]interface{})) + } + + if v, ok := d.GetOk("service_role_arn"); ok { + input.ServiceRoleArn = aws.String(v.(string)) } - resp, err := conn.CreateDataSource(input) + _, err := conn.CreateDataSource(input) if err != nil { return err } d.SetId(d.Get("api_id").(string) + "-" + d.Get("name").(string)) - d.Set("arn", resp.DataSource.DataSourceArn) - return nil + + return resourceAwsAppsyncDatasourceRead(d, meta) } func resourceAwsAppsyncDatasourceRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).appsyncconn + apiID, name, err := decodeAppsyncDataSourceID(d.Id()) + + if err != nil { + return err + } + input := &appsync.GetDataSourceInput{ - ApiId: aws.String(d.Get("api_id").(string)), - Name: aws.String(d.Get("name").(string)), + ApiId: aws.String(apiID), + Name: aws.String(name), } resp, err := conn.GetDataSource(input) @@ -176,11 +206,26 @@ func resourceAwsAppsyncDatasourceRead(d *schema.ResourceData, meta interface{}) return err } + d.Set("api_id", apiID) d.Set("arn", resp.DataSource.DataSourceArn) d.Set("description", resp.DataSource.Description) - d.Set("dynamodb_config", flattenAppsyncDynamodbDataSourceConfig(resp.DataSource.DynamodbConfig)) - d.Set("elasticsearch_config", flattenAppsyncElasticsearchDataSourceConfig(resp.DataSource.ElasticsearchConfig)) - d.Set("lambda_config", flattenAppsyncLambdaDataSourceConfig(resp.DataSource.LambdaConfig)) + + if err := d.Set("dynamodb_config", flattenAppsyncDynamodbDataSourceConfig(resp.DataSource.DynamodbConfig)); err != nil { + return fmt.Errorf("error setting dynamodb_config: %s", err) + } + + if err := d.Set("elasticsearch_config", flattenAppsyncElasticsearchDataSourceConfig(resp.DataSource.ElasticsearchConfig)); err != nil { + return fmt.Errorf("error setting elasticsearch_config: %s", err) + } + + if err := d.Set("http_config", flattenAppsyncHTTPDataSourceConfig(resp.DataSource.HttpConfig)); err != nil { + return fmt.Errorf("error setting http_config: %s", err) + } + + if err := d.Set("lambda_config", flattenAppsyncLambdaDataSourceConfig(resp.DataSource.LambdaConfig)); err != nil { + return fmt.Errorf("error setting lambda_config: %s", err) + } + d.Set("name", resp.DataSource.Name) d.Set("service_role_arn", resp.DataSource.ServiceRoleArn) d.Set("type", resp.DataSource.Type) @@ -190,42 +235,45 @@ func resourceAwsAppsyncDatasourceRead(d *schema.ResourceData, meta interface{}) func resourceAwsAppsyncDatasourceUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).appsyncconn + region := meta.(*AWSClient).region + + apiID, name, err := decodeAppsyncDataSourceID(d.Id()) + + if err != nil { + return err + } input := &appsync.UpdateDataSourceInput{ - ApiId: aws.String(d.Get("api_id").(string)), - Name: aws.String(d.Get("name").(string)), + ApiId: aws.String(apiID), + Name: aws.String(name), + Type: aws.String(d.Get("type").(string)), } - if d.HasChange("description") { - input.Description = aws.String(d.Get("description").(string)) + if v, ok := d.GetOk("description"); ok { + input.Description = aws.String(v.(string)) } - if d.HasChange("service_role_arn") { - input.ServiceRoleArn = aws.String(d.Get("service_role_arn").(string)) + + if v, ok := d.GetOk("dynamodb_config"); ok { + input.DynamodbConfig = expandAppsyncDynamodbDataSourceConfig(v.([]interface{}), region) } - if d.HasChange("type") { - input.Type = aws.String(d.Get("type").(string)) + + if v, ok := d.GetOk("elasticsearch_config"); ok { + input.ElasticsearchConfig = expandAppsyncElasticsearchDataSourceConfig(v.([]interface{}), region) } - if d.HasChange("dynamodb_config") { - ddbconfig := d.Get("dynamodb_config").([]interface{}) - if len(ddbconfig) > 0 { - input.DynamodbConfig = expandAppsyncDynamodbDataSourceConfig(ddbconfig[0].(map[string]interface{})) - } + if v, ok := d.GetOk("http_config"); ok { + input.HttpConfig = expandAppsyncHTTPDataSourceConfig(v.([]interface{})) } - if d.HasChange("elasticsearch_config") { - esconfig := d.Get("elasticsearch_config").([]interface{}) - if len(esconfig) > 0 { - input.ElasticsearchConfig = expandAppsyncElasticsearchDataSourceConfig(esconfig[0].(map[string]interface{})) - } + + if v, ok := d.GetOk("lambda_config"); ok { + input.LambdaConfig = expandAppsyncLambdaDataSourceConfig(v.([]interface{})) } - if d.HasChange("lambda_config") { - lambdaconfig := d.Get("lambda_config").([]interface{}) - if len(lambdaconfig) > 0 { - input.LambdaConfig = expandAppsyncLambdaDataSourceConfig(lambdaconfig[0].(map[string]interface{})) - } + + if v, ok := d.GetOk("service_role_arn"); ok { + input.ServiceRoleArn = aws.String(v.(string)) } - _, err := conn.UpdateDataSource(input) + _, err = conn.UpdateDataSource(input) if err != nil { return err } @@ -235,12 +283,18 @@ func resourceAwsAppsyncDatasourceUpdate(d *schema.ResourceData, meta interface{} func resourceAwsAppsyncDatasourceDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).appsyncconn + apiID, name, err := decodeAppsyncDataSourceID(d.Id()) + + if err != nil { + return err + } + input := &appsync.DeleteDataSourceInput{ - ApiId: aws.String(d.Get("api_id").(string)), - Name: aws.String(d.Get("name").(string)), + ApiId: aws.String(apiID), + Name: aws.String(name), } - _, err := conn.DeleteDataSource(input) + _, err = conn.DeleteDataSource(input) if err != nil { if isAWSErr(err, appsync.ErrCodeNotFoundException, "") { return nil @@ -251,12 +305,30 @@ func resourceAwsAppsyncDatasourceDelete(d *schema.ResourceData, meta interface{} return nil } -func expandAppsyncDynamodbDataSourceConfig(configured map[string]interface{}) *appsync.DynamodbDataSourceConfig { +func decodeAppsyncDataSourceID(id string) (string, string, error) { + idParts := strings.SplitN(id, "-", 2) + if len(idParts) != 2 { + return "", "", fmt.Errorf("expected ID in format ApiID-DataSourceName, received: %s", id) + } + return idParts[0], idParts[1], nil +} + +func expandAppsyncDynamodbDataSourceConfig(l []interface{}, currentRegion string) *appsync.DynamodbDataSourceConfig { + if len(l) == 0 || l[0] == nil { + return nil + } + + configured := l[0].(map[string]interface{}) + result := &appsync.DynamodbDataSourceConfig{ - AwsRegion: aws.String(configured["region"].(string)), + AwsRegion: aws.String(currentRegion), TableName: aws.String(configured["table_name"].(string)), } + if v, ok := configured["region"]; ok && v.(string) != "" { + result.AwsRegion = aws.String(v.(string)) + } + if v, ok := configured["use_caller_credentials"]; ok { result.UseCallerCredentials = aws.Bool(v.(bool)) } @@ -269,23 +341,34 @@ func flattenAppsyncDynamodbDataSourceConfig(config *appsync.DynamodbDataSourceCo return nil } - result := map[string]interface{}{} + result := map[string]interface{}{ + "region": aws.StringValue(config.AwsRegion), + "table_name": aws.StringValue(config.TableName), + } - result["region"] = *config.AwsRegion - result["table_name"] = *config.TableName if config.UseCallerCredentials != nil { - result["use_caller_credentials"] = *config.UseCallerCredentials + result["use_caller_credentials"] = aws.BoolValue(config.UseCallerCredentials) } return []map[string]interface{}{result} } -func expandAppsyncElasticsearchDataSourceConfig(configured map[string]interface{}) *appsync.ElasticsearchDataSourceConfig { +func expandAppsyncElasticsearchDataSourceConfig(l []interface{}, currentRegion string) *appsync.ElasticsearchDataSourceConfig { + if len(l) == 0 || l[0] == nil { + return nil + } + + configured := l[0].(map[string]interface{}) + result := &appsync.ElasticsearchDataSourceConfig{ - AwsRegion: aws.String(configured["region"].(string)), + AwsRegion: aws.String(currentRegion), Endpoint: aws.String(configured["endpoint"].(string)), } + if v, ok := configured["region"]; ok && v.(string) != "" { + result.AwsRegion = aws.String(v.(string)) + } + return result } @@ -294,15 +377,47 @@ func flattenAppsyncElasticsearchDataSourceConfig(config *appsync.ElasticsearchDa return nil } - result := map[string]interface{}{} + result := map[string]interface{}{ + "endpoint": aws.StringValue(config.Endpoint), + "region": aws.StringValue(config.AwsRegion), + } + + return []map[string]interface{}{result} +} + +func expandAppsyncHTTPDataSourceConfig(l []interface{}) *appsync.HttpDataSourceConfig { + if len(l) == 0 || l[0] == nil { + return nil + } + + configured := l[0].(map[string]interface{}) - result["region"] = *config.AwsRegion - result["endpoint"] = *config.Endpoint + result := &appsync.HttpDataSourceConfig{ + Endpoint: aws.String(configured["endpoint"].(string)), + } + + return result +} + +func flattenAppsyncHTTPDataSourceConfig(config *appsync.HttpDataSourceConfig) []map[string]interface{} { + if config == nil { + return nil + } + + result := map[string]interface{}{ + "endpoint": aws.StringValue(config.Endpoint), + } return []map[string]interface{}{result} } -func expandAppsyncLambdaDataSourceConfig(configured map[string]interface{}) *appsync.LambdaDataSourceConfig { +func expandAppsyncLambdaDataSourceConfig(l []interface{}) *appsync.LambdaDataSourceConfig { + if len(l) == 0 || l[0] == nil { + return nil + } + + configured := l[0].(map[string]interface{}) + result := &appsync.LambdaDataSourceConfig{ LambdaFunctionArn: aws.String(configured["function_arn"].(string)), } @@ -315,9 +430,9 @@ func flattenAppsyncLambdaDataSourceConfig(config *appsync.LambdaDataSourceConfig return nil } - result := map[string]interface{}{} - - result["function_arn"] = *config.LambdaFunctionArn + result := map[string]interface{}{ + "function_arn": aws.StringValue(config.LambdaFunctionArn), + } return []map[string]interface{}{result} } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appsync_graphql_api.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appsync_graphql_api.go index 5a6b8a1e5f..74d962eb6a 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appsync_graphql_api.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_appsync_graphql_api.go @@ -30,6 +30,7 @@ func resourceAwsAppsyncGraphqlApi() *schema.Resource { appsync.AuthenticationTypeApiKey, appsync.AuthenticationTypeAwsIam, appsync.AuthenticationTypeAmazonCognitoUserPools, + appsync.AuthenticationTypeOpenidConnect, }, false), }, "name": { @@ -43,6 +44,53 @@ func resourceAwsAppsyncGraphqlApi() *schema.Resource { return }, }, + "log_config": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cloudwatch_logs_role_arn": { + Type: schema.TypeString, + Required: true, + }, + "field_log_level": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{ + appsync.FieldLogLevelAll, + appsync.FieldLogLevelError, + appsync.FieldLogLevelNone, + }, false), + }, + }, + }, + }, + "openid_connect_config": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "auth_ttl": { + Type: schema.TypeInt, + Optional: true, + }, + "client_id": { + Type: schema.TypeString, + Optional: true, + }, + "iat_ttl": { + Type: schema.TypeInt, + Optional: true, + }, + "issuer": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, "user_pool_config": { Type: schema.TypeList, Optional: true, @@ -55,7 +103,8 @@ func resourceAwsAppsyncGraphqlApi() *schema.Resource { }, "aws_region": { Type: schema.TypeString, - Required: true, + Optional: true, + Computed: true, }, "default_action": { Type: schema.TypeString, @@ -76,6 +125,11 @@ func resourceAwsAppsyncGraphqlApi() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "uris": { + Type: schema.TypeMap, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, }, } } @@ -88,8 +142,16 @@ func resourceAwsAppsyncGraphqlApiCreate(d *schema.ResourceData, meta interface{} Name: aws.String(d.Get("name").(string)), } + if v, ok := d.GetOk("log_config"); ok { + input.LogConfig = expandAppsyncGraphqlApiLogConfig(v.([]interface{})) + } + + if v, ok := d.GetOk("openid_connect_config"); ok { + input.OpenIDConnectConfig = expandAppsyncGraphqlApiOpenIDConnectConfig(v.([]interface{})) + } + if v, ok := d.GetOk("user_pool_config"); ok { - input.UserPoolConfig = expandAppsyncGraphqlApiUserPoolConfig(v.([]interface{})) + input.UserPoolConfig = expandAppsyncGraphqlApiUserPoolConfig(v.([]interface{}), meta.(*AWSClient).region) } resp, err := conn.CreateGraphqlApi(input) @@ -98,8 +160,8 @@ func resourceAwsAppsyncGraphqlApiCreate(d *schema.ResourceData, meta interface{} } d.SetId(*resp.GraphqlApi.ApiId) - d.Set("arn", resp.GraphqlApi.Arn) - return nil + + return resourceAwsAppsyncGraphqlApiRead(d, meta) } func resourceAwsAppsyncGraphqlApiRead(d *schema.ResourceData, meta interface{}) error { @@ -119,10 +181,26 @@ func resourceAwsAppsyncGraphqlApiRead(d *schema.ResourceData, meta interface{}) return err } + d.Set("arn", resp.GraphqlApi.Arn) d.Set("authentication_type", resp.GraphqlApi.AuthenticationType) d.Set("name", resp.GraphqlApi.Name) - d.Set("user_pool_config", flattenAppsyncGraphqlApiUserPoolConfig(resp.GraphqlApi.UserPoolConfig)) - d.Set("arn", resp.GraphqlApi.Arn) + + if err := d.Set("log_config", flattenAppsyncGraphqlApiLogConfig(resp.GraphqlApi.LogConfig)); err != nil { + return fmt.Errorf("error setting log_config: %s", err) + } + + if err := d.Set("openid_connect_config", flattenAppsyncGraphqlApiOpenIDConnectConfig(resp.GraphqlApi.OpenIDConnectConfig)); err != nil { + return fmt.Errorf("error setting openid_connect_config: %s", err) + } + + if err := d.Set("user_pool_config", flattenAppsyncGraphqlApiUserPoolConfig(resp.GraphqlApi.UserPoolConfig)); err != nil { + return fmt.Errorf("error setting user_pool_config: %s", err) + } + + if err := d.Set("uris", aws.StringValueMap(resp.GraphqlApi.Uris)); err != nil { + return fmt.Errorf("error setting uris") + } + return nil } @@ -130,15 +208,21 @@ func resourceAwsAppsyncGraphqlApiUpdate(d *schema.ResourceData, meta interface{} conn := meta.(*AWSClient).appsyncconn input := &appsync.UpdateGraphqlApiInput{ - ApiId: aws.String(d.Id()), - Name: aws.String(d.Get("name").(string)), + ApiId: aws.String(d.Id()), + AuthenticationType: aws.String(d.Get("authentication_type").(string)), + Name: aws.String(d.Get("name").(string)), + } + + if v, ok := d.GetOk("log_config"); ok { + input.LogConfig = expandAppsyncGraphqlApiLogConfig(v.([]interface{})) } - if d.HasChange("authentication_type") { - input.AuthenticationType = aws.String(d.Get("authentication_type").(string)) + if v, ok := d.GetOk("openid_connect_config"); ok { + input.OpenIDConnectConfig = expandAppsyncGraphqlApiOpenIDConnectConfig(v.([]interface{})) } - if d.HasChange("user_pool_config") { - input.UserPoolConfig = expandAppsyncGraphqlApiUserPoolConfig(d.Get("user_pool_config").([]interface{})) + + if v, ok := d.GetOk("user_pool_config"); ok { + input.UserPoolConfig = expandAppsyncGraphqlApiUserPoolConfig(v.([]interface{}), meta.(*AWSClient).region) } _, err := conn.UpdateGraphqlApi(input) @@ -166,33 +250,112 @@ func resourceAwsAppsyncGraphqlApiDelete(d *schema.ResourceData, meta interface{} return nil } -func expandAppsyncGraphqlApiUserPoolConfig(config []interface{}) *appsync.UserPoolConfig { - if len(config) < 1 { +func expandAppsyncGraphqlApiLogConfig(l []interface{}) *appsync.LogConfig { + if len(l) < 1 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + logConfig := &appsync.LogConfig{ + CloudWatchLogsRoleArn: aws.String(m["cloudwatch_logs_role_arn"].(string)), + FieldLogLevel: aws.String(m["field_log_level"].(string)), + } + + return logConfig +} + +func expandAppsyncGraphqlApiOpenIDConnectConfig(l []interface{}) *appsync.OpenIDConnectConfig { + if len(l) < 1 || l[0] == nil { return nil } - cg := config[0].(map[string]interface{}) - upc := &appsync.UserPoolConfig{ - AwsRegion: aws.String(cg["aws_region"].(string)), - DefaultAction: aws.String(cg["default_action"].(string)), - UserPoolId: aws.String(cg["user_pool_id"].(string)), + + m := l[0].(map[string]interface{}) + + openIDConnectConfig := &appsync.OpenIDConnectConfig{ + Issuer: aws.String(m["issuer"].(string)), + } + + if v, ok := m["auth_ttl"].(int); ok && v != 0 { + openIDConnectConfig.AuthTTL = aws.Int64(int64(v)) + } + + if v, ok := m["client_id"].(string); ok && v != "" { + openIDConnectConfig.ClientId = aws.String(v) } - if v, ok := cg["app_id_client_regex"].(string); ok && v != "" { - upc.AppIdClientRegex = aws.String(v) + + if v, ok := m["iat_ttl"].(int); ok && v != 0 { + openIDConnectConfig.IatTTL = aws.Int64(int64(v)) } - return upc + + return openIDConnectConfig } -func flattenAppsyncGraphqlApiUserPoolConfig(upc *appsync.UserPoolConfig) []interface{} { - if upc == nil { +func expandAppsyncGraphqlApiUserPoolConfig(l []interface{}, currentRegion string) *appsync.UserPoolConfig { + if len(l) < 1 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + userPoolConfig := &appsync.UserPoolConfig{ + AwsRegion: aws.String(currentRegion), + DefaultAction: aws.String(m["default_action"].(string)), + UserPoolId: aws.String(m["user_pool_id"].(string)), + } + + if v, ok := m["app_id_client_regex"].(string); ok && v != "" { + userPoolConfig.AppIdClientRegex = aws.String(v) + } + + if v, ok := m["aws_region"].(string); ok && v != "" { + userPoolConfig.AwsRegion = aws.String(v) + } + + return userPoolConfig +} + +func flattenAppsyncGraphqlApiLogConfig(logConfig *appsync.LogConfig) []interface{} { + if logConfig == nil { return []interface{}{} } - m := make(map[string]interface{}, 1) - m["aws_region"] = *upc.AwsRegion - m["default_action"] = *upc.DefaultAction - m["user_pool_id"] = *upc.UserPoolId - if upc.AppIdClientRegex != nil { - m["app_id_client_regex"] = *upc.AppIdClientRegex + m := map[string]interface{}{ + "cloudwatch_logs_role_arn": aws.StringValue(logConfig.CloudWatchLogsRoleArn), + "field_log_level": aws.StringValue(logConfig.FieldLogLevel), + } + + return []interface{}{m} +} + +func flattenAppsyncGraphqlApiOpenIDConnectConfig(openIDConnectConfig *appsync.OpenIDConnectConfig) []interface{} { + if openIDConnectConfig == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "auth_ttl": aws.Int64Value(openIDConnectConfig.AuthTTL), + "client_id": aws.StringValue(openIDConnectConfig.ClientId), + "iat_ttl": aws.Int64Value(openIDConnectConfig.IatTTL), + "issuer": aws.StringValue(openIDConnectConfig.Issuer), + } + + return []interface{}{m} +} + +func flattenAppsyncGraphqlApiUserPoolConfig(userPoolConfig *appsync.UserPoolConfig) []interface{} { + if userPoolConfig == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "aws_region": aws.StringValue(userPoolConfig.AwsRegion), + "default_action": aws.StringValue(userPoolConfig.DefaultAction), + "user_pool_id": aws.StringValue(userPoolConfig.UserPoolId), + } + + if userPoolConfig.AppIdClientRegex != nil { + m["app_id_client_regex"] = aws.StringValue(userPoolConfig.AppIdClientRegex) } return []interface{}{m} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_athena_database.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_athena_database.go index b004893723..f440bcd47b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_athena_database.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_athena_database.go @@ -38,18 +38,69 @@ func resourceAwsAthenaDatabase() *schema.Resource { Optional: true, Default: false, }, + "encryption_configuration": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "kms_key": { + Type: schema.TypeString, + Optional: true, + }, + "encryption_option": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{ + athena.EncryptionOptionCseKms, + athena.EncryptionOptionSseKms, + athena.EncryptionOptionSseS3, + }, false), + }, + }, + }, + }, }, } } +func expandAthenaResultConfiguration(bucket string, encryptionConfigurationList []interface{}) (*athena.ResultConfiguration, error) { + resultConfig := athena.ResultConfiguration{ + OutputLocation: aws.String("s3://" + bucket), + } + + if len(encryptionConfigurationList) <= 0 { + return &resultConfig, nil + } + + data := encryptionConfigurationList[0].(map[string]interface{}) + keyType := data["encryption_option"].(string) + keyID := data["kms_key"].(string) + + encryptionConfig := athena.EncryptionConfiguration{ + EncryptionOption: aws.String(keyType), + } + + if len(keyID) > 0 { + encryptionConfig.KmsKey = aws.String(keyID) + } + + resultConfig.EncryptionConfiguration = &encryptionConfig + + return &resultConfig, nil +} + func resourceAwsAthenaDatabaseCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).athenaconn + resultConfig, err := expandAthenaResultConfiguration(d.Get("bucket").(string), d.Get("encryption_configuration").([]interface{})) + if err != nil { + return err + } + input := &athena.StartQueryExecutionInput{ - QueryString: aws.String(fmt.Sprintf("create database `%s`;", d.Get("name").(string))), - ResultConfiguration: &athena.ResultConfiguration{ - OutputLocation: aws.String("s3://" + d.Get("bucket").(string)), - }, + QueryString: aws.String(fmt.Sprintf("create database `%s`;", d.Get("name").(string))), + ResultConfiguration: resultConfig, } resp, err := conn.StartQueryExecution(input) @@ -57,7 +108,7 @@ func resourceAwsAthenaDatabaseCreate(d *schema.ResourceData, meta interface{}) e return err } - if err := executeAndExpectNoRowsWhenCreate(*resp.QueryExecutionId, d, conn); err != nil { + if err := executeAndExpectNoRowsWhenCreate(*resp.QueryExecutionId, conn); err != nil { return err } d.SetId(d.Get("name").(string)) @@ -67,12 +118,14 @@ func resourceAwsAthenaDatabaseCreate(d *schema.ResourceData, meta interface{}) e func resourceAwsAthenaDatabaseRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).athenaconn - bucket := d.Get("bucket").(string) + resultConfig, err := expandAthenaResultConfiguration(d.Get("bucket").(string), d.Get("encryption_configuration").([]interface{})) + if err != nil { + return err + } + input := &athena.StartQueryExecutionInput{ - QueryString: aws.String(fmt.Sprint("show databases;")), - ResultConfiguration: &athena.ResultConfiguration{ - OutputLocation: aws.String("s3://" + bucket), - }, + QueryString: aws.String(fmt.Sprint("show databases;")), + ResultConfiguration: resultConfig, } resp, err := conn.StartQueryExecution(input) @@ -93,8 +146,12 @@ func resourceAwsAthenaDatabaseUpdate(d *schema.ResourceData, meta interface{}) e func resourceAwsAthenaDatabaseDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).athenaconn + resultConfig, err := expandAthenaResultConfiguration(d.Get("bucket").(string), d.Get("encryption_configuration").([]interface{})) + if err != nil { + return err + } + name := d.Get("name").(string) - bucket := d.Get("bucket").(string) queryString := fmt.Sprintf("drop database `%s`", name) if d.Get("force_destroy").(bool) { @@ -103,10 +160,8 @@ func resourceAwsAthenaDatabaseDelete(d *schema.ResourceData, meta interface{}) e queryString += ";" input := &athena.StartQueryExecutionInput{ - QueryString: aws.String(queryString), - ResultConfiguration: &athena.ResultConfiguration{ - OutputLocation: aws.String("s3://" + bucket), - }, + QueryString: aws.String(queryString), + ResultConfiguration: resultConfig, } resp, err := conn.StartQueryExecution(input) @@ -114,19 +169,19 @@ func resourceAwsAthenaDatabaseDelete(d *schema.ResourceData, meta interface{}) e return err } - if err := executeAndExpectNoRowsWhenDrop(*resp.QueryExecutionId, d, conn); err != nil { + if err := executeAndExpectNoRowsWhenDrop(*resp.QueryExecutionId, conn); err != nil { return err } return nil } -func executeAndExpectNoRowsWhenCreate(qeid string, d *schema.ResourceData, conn *athena.Athena) error { +func executeAndExpectNoRowsWhenCreate(qeid string, conn *athena.Athena) error { rs, err := queryExecutionResult(qeid, conn) if err != nil { return err } if len(rs.Rows) != 0 { - return fmt.Errorf("[ERROR] Athena create database, unexpected query result: %s", flattenAthenaResultSet(rs)) + return fmt.Errorf("Athena create database, unexpected query result: %s", flattenAthenaResultSet(rs)) } return nil } @@ -143,16 +198,16 @@ func executeAndExpectMatchingRow(qeid string, dbName string, conn *athena.Athena } } } - return fmt.Errorf("[ERROR] Athena not found database: %s, query result: %s", dbName, flattenAthenaResultSet(rs)) + return fmt.Errorf("Athena not found database: %s, query result: %s", dbName, flattenAthenaResultSet(rs)) } -func executeAndExpectNoRowsWhenDrop(qeid string, d *schema.ResourceData, conn *athena.Athena) error { +func executeAndExpectNoRowsWhenDrop(qeid string, conn *athena.Athena) error { rs, err := queryExecutionResult(qeid, conn) if err != nil { return err } if len(rs.Rows) != 0 { - return fmt.Errorf("[ERROR] Athena drop database, unexpected query result: %s", flattenAthenaResultSet(rs)) + return fmt.Errorf("Athena drop database, unexpected query result: %s", flattenAthenaResultSet(rs)) } return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_attachment.go index 321a98c75b..8563abd0e0 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_attachment.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_attachment.go @@ -6,7 +6,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/autoscaling" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -52,7 +51,7 @@ func resourceAwsAutoscalingAttachmentCreate(d *schema.ResourceData, meta interfa log.Printf("[INFO] registering asg %s with ELBs %s", asgName, v.(string)) if _, err := asgconn.AttachLoadBalancers(attachOpts); err != nil { - return errwrap.Wrapf(fmt.Sprintf("Failure attaching AutoScaling Group %s with Elastic Load Balancer: %s: {{err}}", asgName, v.(string)), err) + return fmt.Errorf("Failure attaching AutoScaling Group %s with Elastic Load Balancer: %s: %s", asgName, v.(string), err) } } @@ -65,7 +64,7 @@ func resourceAwsAutoscalingAttachmentCreate(d *schema.ResourceData, meta interfa log.Printf("[INFO] registering asg %s with ALB Target Group %s", asgName, v.(string)) if _, err := asgconn.AttachLoadBalancerTargetGroups(attachOpts); err != nil { - return errwrap.Wrapf(fmt.Sprintf("Failure attaching AutoScaling Group %s with ALB Target Group: %s: {{err}}", asgName, v.(string)), err) + return fmt.Errorf("Failure attaching AutoScaling Group %s with ALB Target Group: %s: %s", asgName, v.(string), err) } } @@ -78,7 +77,7 @@ func resourceAwsAutoscalingAttachmentRead(d *schema.ResourceData, meta interface asgconn := meta.(*AWSClient).autoscalingconn asgName := d.Get("autoscaling_group_name").(string) - // Retrieve the ASG properites to get list of associated ELBs + // Retrieve the ASG properties to get list of associated ELBs asg, err := getAwsAutoscalingGroup(asgName, asgconn) if err != nil { @@ -101,7 +100,7 @@ func resourceAwsAutoscalingAttachmentRead(d *schema.ResourceData, meta interface } if !found { - log.Printf("[WARN] Association for %s was not found in ASG assocation", v.(string)) + log.Printf("[WARN] Association for %s was not found in ASG association", v.(string)) d.SetId("") } } @@ -117,7 +116,7 @@ func resourceAwsAutoscalingAttachmentRead(d *schema.ResourceData, meta interface } if !found { - log.Printf("[WARN] Association for %s was not found in ASG assocation", v.(string)) + log.Printf("[WARN] Association for %s was not found in ASG association", v.(string)) d.SetId("") } } @@ -137,7 +136,7 @@ func resourceAwsAutoscalingAttachmentDelete(d *schema.ResourceData, meta interfa log.Printf("[INFO] Deleting ELB %s association from: %s", v.(string), asgName) if _, err := asgconn.DetachLoadBalancers(detachOpts); err != nil { - return errwrap.Wrapf(fmt.Sprintf("Failure detaching AutoScaling Group %s with Elastic Load Balancer: %s: {{err}}", asgName, v.(string)), err) + return fmt.Errorf("Failure detaching AutoScaling Group %s with Elastic Load Balancer: %s: %s", asgName, v.(string), err) } } @@ -149,7 +148,7 @@ func resourceAwsAutoscalingAttachmentDelete(d *schema.ResourceData, meta interfa log.Printf("[INFO] Deleting ALB Target Group %s association from: %s", v.(string), asgName) if _, err := asgconn.DetachLoadBalancerTargetGroups(detachOpts); err != nil { - return errwrap.Wrapf(fmt.Sprintf("Failure detaching AutoScaling Group %s with ALB Target Group: %s: {{err}}", asgName, v.(string)), err) + return fmt.Errorf("Failure detaching AutoScaling Group %s with ALB Target Group: %s: %s", asgName, v.(string), err) } } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_group.go index dc35530aac..2871ef4fc1 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_group.go @@ -6,7 +6,6 @@ import ( "strings" "time" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/customdiff" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -40,13 +39,13 @@ func resourceAwsAutoscalingGroup() *schema.Resource { Computed: true, ForceNew: true, ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validateMaxLength(255), + ValidateFunc: validation.StringLenBetween(0, 255), }, "name_prefix": { Type: schema.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validateMaxLength(255 - resource.UniqueIDSuffixLength), + ValidateFunc: validation.StringLenBetween(0, 255-resource.UniqueIDSuffixLength), }, "launch_configuration": { @@ -85,6 +84,116 @@ func resourceAwsAutoscalingGroup() *schema.Resource { }, }, + "mixed_instances_policy": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "instances_distribution": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + // Ignore missing configuration block + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if old == "1" && new == "0" { + return true + } + return false + }, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "on_demand_allocation_strategy": { + Type: schema.TypeString, + Optional: true, + Default: "prioritized", + ValidateFunc: validation.StringInSlice([]string{ + "prioritized", + }, false), + }, + "on_demand_base_capacity": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntAtLeast(0), + }, + "on_demand_percentage_above_base_capacity": { + Type: schema.TypeInt, + Optional: true, + Default: 100, + ValidateFunc: validation.IntBetween(0, 100), + }, + "spot_allocation_strategy": { + Type: schema.TypeString, + Optional: true, + Default: "lowest-price", + ValidateFunc: validation.StringInSlice([]string{ + "lowest-price", + }, false), + }, + "spot_instance_pools": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + ValidateFunc: validation.IntAtLeast(0), + }, + "spot_max_price": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + "launch_template": { + Type: schema.TypeList, + Required: true, + MinItems: 1, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "launch_template_specification": { + Type: schema.TypeList, + Required: true, + MinItems: 1, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "launch_template_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "launch_template_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "version": { + Type: schema.TypeString, + Optional: true, + Default: "$Default", + }, + }, + }, + }, + "override": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "instance_type": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + "desired_capacity": { Type: schema.TypeInt, Optional: true, @@ -352,6 +461,7 @@ func resourceAwsAutoscalingGroupCreate(d *schema.ResourceData, meta interface{}) createOpts := autoscaling.CreateAutoScalingGroupInput{ AutoScalingGroupName: aws.String(asgName), + MixedInstancesPolicy: expandAutoScalingMixedInstancesPolicy(d.Get("mixed_instances_policy").([]interface{})), NewInstancesProtectedFromScaleIn: aws.Bool(d.Get("protect_from_scale_in").(bool)), } updateOpts := autoscaling.UpdateAutoScalingGroupInput{ @@ -386,8 +496,8 @@ func resourceAwsAutoscalingGroupCreate(d *schema.ResourceData, meta interface{}) launchConfigurationValue, launchConfigurationOk := d.GetOk("launch_configuration") launchTemplateValue, launchTemplateOk := d.GetOk("launch_template") - if !launchConfigurationOk && !launchTemplateOk { - return fmt.Errorf("One of `launch_configuration` or `launch_template` must be set for an autoscaling group") + if createOpts.MixedInstancesPolicy == nil && !launchConfigurationOk && !launchTemplateOk { + return fmt.Errorf("One of `launch_configuration`, `launch_template`, or `mixed_instances_policy` must be set for an autoscaling group") } if launchConfigurationOk { @@ -411,7 +521,7 @@ func resourceAwsAutoscalingGroupCreate(d *schema.ResourceData, meta interface{}) if v, ok := d.GetOk("tag"); ok { var err error createOpts.Tags, err = autoscalingTagsFromMap( - setToMapByKey(v.(*schema.Set), "key"), resourceID) + setToMapByKey(v.(*schema.Set)), resourceID) if err != nil { return err } @@ -550,6 +660,10 @@ func resourceAwsAutoscalingGroupRead(d *schema.ResourceData, meta interface{}) e d.Set("launch_template", nil) } + if err := d.Set("mixed_instances_policy", flattenAutoScalingMixedInstancesPolicy(g.MixedInstancesPolicy)); err != nil { + return fmt.Errorf("error setting mixed_instances_policy: %s", err) + } + if err := d.Set("suspended_processes", flattenAsgSuspendedProcesses(g.SuspendedProcesses)); err != nil { log.Printf("[WARN] Error setting suspended_processes for %q: %s", d.Id(), err) } @@ -567,7 +681,7 @@ func resourceAwsAutoscalingGroupRead(d *schema.ResourceData, meta interface{}) e var v interface{} if v, tagOk = d.GetOk("tag"); tagOk { - tags := setToMapByKey(v.(*schema.Set), "key") + tags := setToMapByKey(v.(*schema.Set)) for _, t := range g.Tags { if _, ok := tags[*t.Key]; ok { tagList = append(tagList, t) @@ -665,6 +779,10 @@ func resourceAwsAutoscalingGroupUpdate(d *schema.ResourceData, meta interface{}) } } + if d.HasChange("mixed_instances_policy") { + opts.MixedInstancesPolicy = expandAutoScalingMixedInstancesPolicy(d.Get("mixed_instances_policy").([]interface{})) + } + if d.HasChange("min_size") { opts.MinSize = aws.Int64(int64(d.Get("min_size").(int))) shouldWaitForCapacity = true @@ -752,7 +870,7 @@ func resourceAwsAutoscalingGroupUpdate(d *schema.ResourceData, meta interface{}) LoadBalancerNames: remove, }) if err != nil { - return fmt.Errorf("[WARN] Error updating Load Balancers for AutoScaling Group (%s), error: %s", d.Id(), err) + return fmt.Errorf("Error updating Load Balancers for AutoScaling Group (%s), error: %s", d.Id(), err) } } @@ -762,7 +880,7 @@ func resourceAwsAutoscalingGroupUpdate(d *schema.ResourceData, meta interface{}) LoadBalancerNames: add, }) if err != nil { - return fmt.Errorf("[WARN] Error updating Load Balancers for AutoScaling Group (%s), error: %s", d.Id(), err) + return fmt.Errorf("Error updating Load Balancers for AutoScaling Group (%s), error: %s", d.Id(), err) } } } @@ -788,7 +906,7 @@ func resourceAwsAutoscalingGroupUpdate(d *schema.ResourceData, meta interface{}) TargetGroupARNs: remove, }) if err != nil { - return fmt.Errorf("[WARN] Error updating Load Balancers Target Groups for AutoScaling Group (%s), error: %s", d.Id(), err) + return fmt.Errorf("Error updating Load Balancers Target Groups for AutoScaling Group (%s), error: %s", d.Id(), err) } } @@ -798,26 +916,26 @@ func resourceAwsAutoscalingGroupUpdate(d *schema.ResourceData, meta interface{}) TargetGroupARNs: add, }) if err != nil { - return fmt.Errorf("[WARN] Error updating Load Balancers Target Groups for AutoScaling Group (%s), error: %s", d.Id(), err) + return fmt.Errorf("Error updating Load Balancers Target Groups for AutoScaling Group (%s), error: %s", d.Id(), err) } } } if shouldWaitForCapacity { if err := waitForASGCapacity(d, meta, capacitySatisfiedUpdate); err != nil { - return errwrap.Wrapf("Error waiting for AutoScaling Group Capacity: {{err}}", err) + return fmt.Errorf("Error waiting for AutoScaling Group Capacity: %s", err) } } if d.HasChange("enabled_metrics") { if err := updateASGMetricsCollection(d, conn); err != nil { - return errwrap.Wrapf("Error updating AutoScaling Group Metrics collection: {{err}}", err) + return fmt.Errorf("Error updating AutoScaling Group Metrics collection: %s", err) } } if d.HasChange("suspended_processes") { if err := updateASGSuspendedProcesses(d, conn); err != nil { - return errwrap.Wrapf("Error updating AutoScaling Group Suspended Processes: {{err}}", err) + return fmt.Errorf("Error updating AutoScaling Group Suspended Processes: %s", err) } } @@ -1134,3 +1252,203 @@ func expandVpcZoneIdentifiers(list []interface{}) *string { } return aws.String(strings.Join(strs, ",")) } + +func expandAutoScalingInstancesDistribution(l []interface{}) *autoscaling.InstancesDistribution { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + instancesDistribution := &autoscaling.InstancesDistribution{} + + if v, ok := m["on_demand_allocation_strategy"]; ok && v.(string) != "" { + instancesDistribution.OnDemandAllocationStrategy = aws.String(v.(string)) + } + + if v, ok := m["on_demand_base_capacity"]; ok && v.(int) != 0 { + instancesDistribution.OnDemandBaseCapacity = aws.Int64(int64(v.(int))) + } + + if v, ok := m["on_demand_percentage_above_base_capacity"]; ok { + instancesDistribution.OnDemandPercentageAboveBaseCapacity = aws.Int64(int64(v.(int))) + } + + if v, ok := m["spot_allocation_strategy"]; ok && v.(string) != "" { + instancesDistribution.SpotAllocationStrategy = aws.String(v.(string)) + } + + if v, ok := m["spot_instance_pools"]; ok && v.(int) != 0 { + instancesDistribution.SpotInstancePools = aws.Int64(int64(v.(int))) + } + + if v, ok := m["spot_max_price"]; ok && v.(string) != "" { + instancesDistribution.SpotMaxPrice = aws.String(v.(string)) + } + + return instancesDistribution +} + +func expandAutoScalingLaunchTemplate(l []interface{}) *autoscaling.LaunchTemplate { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + launchTemplate := &autoscaling.LaunchTemplate{ + LaunchTemplateSpecification: expandAutoScalingLaunchTemplateSpecification(m["launch_template_specification"].([]interface{})), + } + + if v, ok := m["override"]; ok { + launchTemplate.Overrides = expandAutoScalingLaunchTemplateOverrides(v.([]interface{})) + } + + return launchTemplate +} + +func expandAutoScalingLaunchTemplateOverrides(l []interface{}) []*autoscaling.LaunchTemplateOverrides { + if len(l) == 0 { + return nil + } + + launchTemplateOverrides := make([]*autoscaling.LaunchTemplateOverrides, len(l)) + for i, m := range l { + if m == nil { + launchTemplateOverrides[i] = &autoscaling.LaunchTemplateOverrides{} + continue + } + + launchTemplateOverrides[i] = expandAutoScalingLaunchTemplateOverride(m.(map[string]interface{})) + } + return launchTemplateOverrides +} + +func expandAutoScalingLaunchTemplateOverride(m map[string]interface{}) *autoscaling.LaunchTemplateOverrides { + launchTemplateOverrides := &autoscaling.LaunchTemplateOverrides{} + + if v, ok := m["instance_type"]; ok && v.(string) != "" { + launchTemplateOverrides.InstanceType = aws.String(v.(string)) + } + + return launchTemplateOverrides +} + +func expandAutoScalingLaunchTemplateSpecification(l []interface{}) *autoscaling.LaunchTemplateSpecification { + launchTemplateSpecification := &autoscaling.LaunchTemplateSpecification{} + + if len(l) == 0 || l[0] == nil { + return launchTemplateSpecification + } + + m := l[0].(map[string]interface{}) + + if v, ok := m["launch_template_id"]; ok && v.(string) != "" { + launchTemplateSpecification.LaunchTemplateId = aws.String(v.(string)) + } + + // API returns both ID and name, which Terraform saves to state. Next update returns: + // ValidationError: Valid requests must contain either launchTemplateId or LaunchTemplateName + // Prefer the ID if we have both. + if v, ok := m["launch_template_name"]; ok && v.(string) != "" && launchTemplateSpecification.LaunchTemplateId == nil { + launchTemplateSpecification.LaunchTemplateName = aws.String(v.(string)) + } + + if v, ok := m["version"]; ok && v.(string) != "" { + launchTemplateSpecification.Version = aws.String(v.(string)) + } + + return launchTemplateSpecification +} + +func expandAutoScalingMixedInstancesPolicy(l []interface{}) *autoscaling.MixedInstancesPolicy { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + mixedInstancesPolicy := &autoscaling.MixedInstancesPolicy{ + LaunchTemplate: expandAutoScalingLaunchTemplate(m["launch_template"].([]interface{})), + } + + if v, ok := m["instances_distribution"]; ok { + mixedInstancesPolicy.InstancesDistribution = expandAutoScalingInstancesDistribution(v.([]interface{})) + } + + return mixedInstancesPolicy +} + +func flattenAutoScalingInstancesDistribution(instancesDistribution *autoscaling.InstancesDistribution) []interface{} { + if instancesDistribution == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "on_demand_allocation_strategy": aws.StringValue(instancesDistribution.OnDemandAllocationStrategy), + "on_demand_base_capacity": aws.Int64Value(instancesDistribution.OnDemandBaseCapacity), + "on_demand_percentage_above_base_capacity": aws.Int64Value(instancesDistribution.OnDemandPercentageAboveBaseCapacity), + "spot_allocation_strategy": aws.StringValue(instancesDistribution.SpotAllocationStrategy), + "spot_instance_pools": aws.Int64Value(instancesDistribution.SpotInstancePools), + "spot_max_price": aws.StringValue(instancesDistribution.SpotMaxPrice), + } + + return []interface{}{m} +} + +func flattenAutoScalingLaunchTemplate(launchTemplate *autoscaling.LaunchTemplate) []interface{} { + if launchTemplate == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "launch_template_specification": flattenAutoScalingLaunchTemplateSpecification(launchTemplate.LaunchTemplateSpecification), + "override": flattenAutoScalingLaunchTemplateOverrides(launchTemplate.Overrides), + } + + return []interface{}{m} +} + +func flattenAutoScalingLaunchTemplateOverrides(launchTemplateOverrides []*autoscaling.LaunchTemplateOverrides) []interface{} { + l := make([]interface{}, len(launchTemplateOverrides)) + + for i, launchTemplateOverride := range launchTemplateOverrides { + if launchTemplateOverride == nil { + l[i] = map[string]interface{}{} + continue + } + m := map[string]interface{}{ + "instance_type": aws.StringValue(launchTemplateOverride.InstanceType), + } + l[i] = m + } + + return l +} + +func flattenAutoScalingLaunchTemplateSpecification(launchTemplateSpecification *autoscaling.LaunchTemplateSpecification) []interface{} { + if launchTemplateSpecification == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "launch_template_id": aws.StringValue(launchTemplateSpecification.LaunchTemplateId), + "launch_template_name": aws.StringValue(launchTemplateSpecification.LaunchTemplateName), + "version": aws.StringValue(launchTemplateSpecification.Version), + } + + return []interface{}{m} +} + +func flattenAutoScalingMixedInstancesPolicy(mixedInstancesPolicy *autoscaling.MixedInstancesPolicy) []interface{} { + if mixedInstancesPolicy == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "instances_distribution": flattenAutoScalingInstancesDistribution(mixedInstancesPolicy.InstancesDistribution), + "launch_template": flattenAutoScalingLaunchTemplate(mixedInstancesPolicy.LaunchTemplate), + } + + return []interface{}{m} +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_group_waiting.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_group_waiting.go index daa8faa8aa..8bde39baba 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_group_waiting.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_group_waiting.go @@ -8,7 +8,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/autoscaling" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -46,6 +45,9 @@ func waitForASGCapacity( return nil } elbis, err := getELBInstanceStates(g, meta) + if err != nil { + return resource.NonRetryableError(err) + } albis, err := getTargetGroupInstanceStates(g, meta) if err != nil { return resource.NonRetryableError(err) @@ -121,8 +123,7 @@ func waitForASGCapacity( recentStatus = fmt.Sprintf("(Failed to describe scaling activities: %s)", aErr) } - msg := fmt.Sprintf("{{err}}. Most recent activity: %s", recentStatus) - return errwrap.Wrapf(msg, err) + return fmt.Errorf("%s. Most recent activity: %s", err, recentStatus) } type capacitySatisfiedFunc func(*schema.ResourceData, int, int) (bool, string) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_lifecycle_hook.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_lifecycle_hook.go index 0731511455..500924eac4 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_lifecycle_hook.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_lifecycle_hook.go @@ -1,6 +1,7 @@ package aws import ( + "fmt" "log" "strings" "time" @@ -8,7 +9,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/autoscaling" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -67,10 +67,10 @@ func resourceAwsAutoscalingLifecycleHookPutOp(conn *autoscaling.AutoScaling, par if err != nil { if awsErr, ok := err.(awserr.Error); ok { if strings.Contains(awsErr.Message(), "Unable to publish test message to notification target") { - return resource.RetryableError(errwrap.Wrapf("[DEBUG] Retrying AWS AutoScaling Lifecycle Hook: {{err}}", awsErr)) + return resource.RetryableError(fmt.Errorf("Retrying AWS AutoScaling Lifecycle Hook: %s", awsErr)) } } - return resource.NonRetryableError(errwrap.Wrapf("Error putting lifecycle hook: {{err}}", err)) + return resource.NonRetryableError(fmt.Errorf("Error putting lifecycle hook: %s", err)) } return nil }) @@ -128,7 +128,7 @@ func resourceAwsAutoscalingLifecycleHookDelete(d *schema.ResourceData, meta inte LifecycleHookName: aws.String(d.Get("name").(string)), } if _, err := autoscalingconn.DeleteLifecycleHook(¶ms); err != nil { - return errwrap.Wrapf("Autoscaling Lifecycle Hook: {{err}}", err) + return fmt.Errorf("Autoscaling Lifecycle Hook: %s", err) } return nil @@ -178,7 +178,7 @@ func getAwsAutoscalingLifecycleHook(d *schema.ResourceData, meta interface{}) (* log.Printf("[DEBUG] AutoScaling Lifecycle Hook Describe Params: %#v", params) resp, err := autoscalingconn.DescribeLifecycleHooks(¶ms) if err != nil { - return nil, errwrap.Wrapf("Error retrieving lifecycle hooks: {{err}}", err) + return nil, fmt.Errorf("Error retrieving lifecycle hooks: %s", err) } // find lifecycle hooks diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_notification.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_notification.go index 2c35ea5eb1..77fb744fee 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_notification.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_autoscaling_notification.go @@ -166,7 +166,7 @@ func addNotificationConfigToGroupsWithTopic(conn *autoscaling.AutoScaling, group _, err := conn.PutNotificationConfiguration(opts) if err != nil { if awsErr, ok := err.(awserr.Error); ok { - return fmt.Errorf("[WARN] Error creating Autoscaling Group Notification for Group %s, error: \"%s\", code: \"%s\"", *a, awsErr.Message(), awsErr.Code()) + return fmt.Errorf("Error creating Autoscaling Group Notification for Group %s, error: \"%s\", code: \"%s\"", *a, awsErr.Message(), awsErr.Code()) } return err } @@ -183,7 +183,7 @@ func removeNotificationConfigToGroupsWithTopic(conn *autoscaling.AutoScaling, gr _, err := conn.DeleteNotificationConfiguration(opts) if err != nil { - return fmt.Errorf("[WARN] Error deleting notification configuration for ASG \"%s\", Topic ARN \"%s\"", *r, topic) + return fmt.Errorf("Error deleting notification configuration for ASG \"%s\", Topic ARN \"%s\"", *r, topic) } } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_job_queue.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_job_queue.go index ab15da86c5..74eb37d74a 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_job_queue.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_batch_job_queue.go @@ -73,7 +73,7 @@ func resourceAwsBatchJobQueueCreate(d *schema.ResourceData, meta interface{}) er _, err = stateConf.WaitForState() if err != nil { - return fmt.Errorf("[WARN] Error waiting for JobQueue state to be \"VALID\": %s", err) + return fmt.Errorf("Error waiting for JobQueue state to be \"VALID\": %s", err) } arn := *out.JobQueueArn @@ -91,7 +91,9 @@ func resourceAwsBatchJobQueueRead(d *schema.ResourceData, meta interface{}) erro return err } if jq == nil { - return fmt.Errorf("[WARN] Error reading JobQueue: \"%s\"", err) + log.Printf("[WARN] Batch Job Queue (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil } d.Set("arn", jq.JobQueueArn) d.Set("compute_environments", jq.ComputeEnvironmentOrder) @@ -136,13 +138,13 @@ func resourceAwsBatchJobQueueDelete(d *schema.ResourceData, meta interface{}) er name := d.Get("name").(string) log.Printf("[DEBUG] Disabling Batch Job Queue %s", name) - err := disableBatchJobQueue(name, 10*time.Minute, conn) + err := disableBatchJobQueue(name, conn) if err != nil { return fmt.Errorf("error disabling Batch Job Queue (%s): %s", name, err) } log.Printf("[DEBUG] Deleting Batch Job Queue %s", name) - err = deleteBatchJobQueue(name, 10*time.Minute, conn) + err = deleteBatchJobQueue(name, conn) if err != nil { return fmt.Errorf("error deleting Batch Job Queue (%s): %s", name, err) } @@ -160,7 +162,7 @@ func createComputeEnvironmentOrder(order []interface{}) (envs []*batch.ComputeEn return } -func deleteBatchJobQueue(jobQueue string, timeout time.Duration, conn *batch.Batch) error { +func deleteBatchJobQueue(jobQueue string, conn *batch.Batch) error { _, err := conn.DeleteJobQueue(&batch.DeleteJobQueueInput{ JobQueue: aws.String(jobQueue), }) @@ -172,7 +174,7 @@ func deleteBatchJobQueue(jobQueue string, timeout time.Duration, conn *batch.Bat Pending: []string{batch.JQStateDisabled, batch.JQStatusDeleting}, Target: []string{batch.JQStatusDeleted}, Refresh: batchJobQueueRefreshStatusFunc(conn, jobQueue), - Timeout: timeout, + Timeout: 10 * time.Minute, Delay: 10 * time.Second, MinTimeout: 3 * time.Second, } @@ -181,7 +183,7 @@ func deleteBatchJobQueue(jobQueue string, timeout time.Duration, conn *batch.Bat return err } -func disableBatchJobQueue(jobQueue string, timeout time.Duration, conn *batch.Batch) error { +func disableBatchJobQueue(jobQueue string, conn *batch.Batch) error { _, err := conn.UpdateJobQueue(&batch.UpdateJobQueueInput{ JobQueue: aws.String(jobQueue), State: aws.String(batch.JQStateDisabled), @@ -194,7 +196,7 @@ func disableBatchJobQueue(jobQueue string, timeout time.Duration, conn *batch.Ba Pending: []string{batch.JQStatusUpdating}, Target: []string{batch.JQStatusValid}, Refresh: batchJobQueueRefreshStatusFunc(conn, jobQueue), - Timeout: timeout, + Timeout: 10 * time.Minute, Delay: 10 * time.Second, MinTimeout: 3 * time.Second, } @@ -236,16 +238,3 @@ func batchJobQueueRefreshStatusFunc(conn *batch.Batch, sn string) resource.State return ce, *ce.Status, nil } } - -func batchJobQueueRefreshStateFunc(conn *batch.Batch, sn string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - ce, err := getJobQueue(conn, sn) - if err != nil { - return nil, "failed", err - } - if ce == nil { - return 42, batch.JQStateDisabled, nil - } - return ce, *ce.State, nil - } -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_budgets_budget.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_budgets_budget.go index b38dc19bc3..d4c368d273 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_budgets_budget.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_budgets_budget.go @@ -135,6 +135,9 @@ func resourceAwsBudgetsBudget() *schema.Resource { Read: resourceAwsBudgetsBudgetRead, Update: resourceAwsBudgetsBudgetUpdate, Delete: resourceAwsBudgetsBudgetDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, } } @@ -221,8 +224,8 @@ func resourceAwsBudgetsBudgetRead(d *schema.ResourceData, meta interface{}) erro d.Set("name", budget.BudgetName) if budget.TimePeriod != nil { - d.Set("time_period_end", budget.TimePeriod.End) - d.Set("time_period_start", budget.TimePeriod.Start) + d.Set("time_period_end", aws.TimeValue(budget.TimePeriod.End).Format("2006-01-02_15:04")) + d.Set("time_period_start", aws.TimeValue(budget.TimePeriod.Start).Format("2006-01-02_15:04")) } d.Set("time_unit", budget.TimeUnit) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudformation_stack.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudformation_stack.go index db28c49839..50fb922575 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudformation_stack.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudformation_stack.go @@ -9,10 +9,10 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/cloudformation" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/structure" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsCloudFormationStack() *schema.Resource { @@ -87,7 +87,7 @@ func resourceAwsCloudFormationStack() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) return json @@ -123,7 +123,7 @@ func resourceAwsCloudFormationStackCreate(d *schema.ResourceData, meta interface if v, ok := d.GetOk("template_body"); ok { template, err := normalizeCloudFormationTemplate(v) if err != nil { - return errwrap.Wrapf("template body contains an invalid JSON or YAML: {{err}}", err) + return fmt.Errorf("template body contains an invalid JSON or YAML: %s", err) } input.TemplateBody = aws.String(template) } @@ -148,7 +148,7 @@ func resourceAwsCloudFormationStackCreate(d *schema.ResourceData, meta interface if v, ok := d.GetOk("policy_body"); ok { policy, err := structure.NormalizeJsonString(v) if err != nil { - return errwrap.Wrapf("policy body contains an invalid JSON: {{err}}", err) + return fmt.Errorf("policy body contains an invalid JSON: %s", err) } input.StackPolicyBody = aws.String(policy) } @@ -300,7 +300,7 @@ func resourceAwsCloudFormationStackRead(d *schema.ResourceData, meta interface{} template, err := normalizeCloudFormationTemplate(*out.TemplateBody) if err != nil { - return errwrap.Wrapf("template body contains an invalid JSON or YAML: {{err}}", err) + return fmt.Errorf("template body contains an invalid JSON or YAML: %s", err) } d.Set("template_body", template) @@ -366,7 +366,7 @@ func resourceAwsCloudFormationStackUpdate(d *schema.ResourceData, meta interface if v, ok := d.GetOk("template_body"); ok && input.TemplateURL == nil { template, err := normalizeCloudFormationTemplate(v) if err != nil { - return errwrap.Wrapf("template body contains an invalid JSON or YAML: {{err}}", err) + return fmt.Errorf("template body contains an invalid JSON or YAML: %s", err) } input.TemplateBody = aws.String(template) } @@ -392,7 +392,7 @@ func resourceAwsCloudFormationStackUpdate(d *schema.ResourceData, meta interface if d.HasChange("policy_body") { policy, err := structure.NormalizeJsonString(d.Get("policy_body")) if err != nil { - return errwrap.Wrapf("policy body contains an invalid JSON: {{err}}", err) + return fmt.Errorf("policy body contains an invalid JSON: %s", err) } input.StackPolicyBody = aws.String(policy) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_distribution.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_distribution.go index 640fe06ba3..1825ab02e2 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_distribution.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_distribution.go @@ -8,7 +8,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/cloudfront" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" @@ -124,6 +123,11 @@ func resourceAwsCloudFrontDistribution() *schema.Resource { Type: schema.TypeString, Required: true, }, + "include_body": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, }, }, Set: lambdaFunctionAssociationHash, @@ -249,6 +253,11 @@ func resourceAwsCloudFrontDistribution() *schema.Resource { Type: schema.TypeString, Required: true, }, + "include_body": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, }, }, Set: lambdaFunctionAssociationHash, @@ -404,6 +413,11 @@ func resourceAwsCloudFrontDistribution() *schema.Resource { Type: schema.TypeString, Required: true, }, + "include_body": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, }, }, Set: lambdaFunctionAssociationHash, @@ -764,9 +778,9 @@ func resourceAwsCloudFrontDistributionRead(d *schema.ResourceData, meta interfac }) if err != nil { - return errwrap.Wrapf(fmt.Sprintf( - "Error retrieving EC2 tags for CloudFront Distribution %q (ARN: %q): {{err}}", - d.Id(), d.Get("arn").(string)), err) + return fmt.Errorf( + "Error retrieving EC2 tags for CloudFront Distribution %q (ARN: %q): %s", + d.Id(), d.Get("arn").(string), err) } if err := d.Set("tags", tagsToMapCloudFront(tagResp.Tags)); err != nil { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_origin_access_identity.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_origin_access_identity.go index b82296763a..f568bf5dc1 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_origin_access_identity.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_origin_access_identity.go @@ -115,11 +115,8 @@ func resourceAwsCloudFrontOriginAccessIdentityDelete(d *schema.ResourceData, met } _, err := conn.DeleteCloudFrontOriginAccessIdentity(params) - if err != nil { - return err - } - return nil + return err } func expandOriginAccessIdentityConfig(d *schema.ResourceData) *cloudfront.OriginAccessIdentityConfig { @@ -127,7 +124,7 @@ func expandOriginAccessIdentityConfig(d *schema.ResourceData) *cloudfront.Origin Comment: aws.String(d.Get("comment").(string)), } // This sets CallerReference if it's still pending computation (ie: new resource) - if v, ok := d.GetOk("caller_reference"); ok == false { + if v, ok := d.GetOk("caller_reference"); !ok { originAccessIdentityConfig.CallerReference = aws.String(time.Now().Format(time.RFC3339Nano)) } else { originAccessIdentityConfig.CallerReference = aws.String(v.(string)) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_public_key.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_public_key.go new file mode 100644 index 0000000000..c0e20bcb7f --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudfront_public_key.go @@ -0,0 +1,170 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/cloudfront" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsCloudFrontPublicKey() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsCloudFrontPublicKeyCreate, + Read: resourceAwsCloudFrontPublicKeyRead, + Update: resourceAwsCloudFrontPublicKeyUpdate, + Delete: resourceAwsCloudFrontPublicKeyDelete, + + Schema: map[string]*schema.Schema{ + "caller_reference": { + Type: schema.TypeString, + Computed: true, + }, + "comment": { + Type: schema.TypeString, + Optional: true, + }, + "encoded_key": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "etag": { + Type: schema.TypeString, + Computed: true, + }, + "name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name_prefix"}, + ValidateFunc: validateCloudFrontPublicKeyName, + }, + "name_prefix": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateCloudFrontPublicKeyNamePrefix, + }, + }, + } +} + +func resourceAwsCloudFrontPublicKeyCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).cloudfrontconn + + if v, ok := d.GetOk("name"); ok { + d.Set("name", v.(string)) + } else if v, ok := d.GetOk("name_prefix"); ok { + d.Set("name", resource.PrefixedUniqueId(v.(string))) + } else { + d.Set("name", resource.PrefixedUniqueId("tf-")) + } + + request := &cloudfront.CreatePublicKeyInput{ + PublicKeyConfig: expandPublicKeyConfig(d), + } + + log.Println("[DEBUG] Create CloudFront PublicKey:", request) + + output, err := conn.CreatePublicKey(request) + if err != nil { + return fmt.Errorf("error creating CloudFront PublicKey: %s", err) + } + + d.SetId(aws.StringValue(output.PublicKey.Id)) + return resourceAwsCloudFrontPublicKeyRead(d, meta) +} + +func resourceAwsCloudFrontPublicKeyRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).cloudfrontconn + request := &cloudfront.GetPublicKeyInput{ + Id: aws.String(d.Id()), + } + + output, err := conn.GetPublicKey(request) + if err != nil { + if isAWSErr(err, cloudfront.ErrCodeNoSuchPublicKey, "") { + log.Printf("[WARN] No PublicKey found: %s, removing from state", d.Id()) + d.SetId("") + return nil + } + return err + } + + if output == nil || output.PublicKey == nil || output.PublicKey.PublicKeyConfig == nil { + log.Printf("[WARN] No PublicKey found: %s, removing from state", d.Id()) + d.SetId("") + return nil + } + publicKeyConfig := output.PublicKey.PublicKeyConfig + + d.Set("encoded_key", publicKeyConfig.EncodedKey) + d.Set("name", publicKeyConfig.Name) + d.Set("comment", publicKeyConfig.Comment) + d.Set("caller_reference", publicKeyConfig.CallerReference) + d.Set("etag", output.ETag) + + return nil +} + +func resourceAwsCloudFrontPublicKeyUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).cloudfrontconn + + request := &cloudfront.UpdatePublicKeyInput{ + Id: aws.String(d.Id()), + PublicKeyConfig: expandPublicKeyConfig(d), + IfMatch: aws.String(d.Get("etag").(string)), + } + + _, err := conn.UpdatePublicKey(request) + if err != nil { + return fmt.Errorf("error updating CloudFront PublicKey (%s): %s", d.Id(), err) + } + + return resourceAwsCloudFrontPublicKeyRead(d, meta) +} + +func resourceAwsCloudFrontPublicKeyDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).cloudfrontconn + + request := &cloudfront.DeletePublicKeyInput{ + Id: aws.String(d.Id()), + IfMatch: aws.String(d.Get("etag").(string)), + } + + _, err := conn.DeletePublicKey(request) + if err != nil { + if isAWSErr(err, cloudfront.ErrCodeNoSuchPublicKey, "") { + return nil + } + return err + } + + return nil +} + +func expandPublicKeyConfig(d *schema.ResourceData) *cloudfront.PublicKeyConfig { + publicKeyConfig := &cloudfront.PublicKeyConfig{ + EncodedKey: aws.String(d.Get("encoded_key").(string)), + Name: aws.String(d.Get("name").(string)), + } + + if v, ok := d.GetOk("comment"); ok { + publicKeyConfig.Comment = aws.String(v.(string)) + } + + if v, ok := d.GetOk("caller_reference"); ok { + publicKeyConfig.CallerReference = aws.String(v.(string)) + } else { + publicKeyConfig.CallerReference = aws.String(time.Now().Format(time.RFC3339Nano)) + } + + return publicKeyConfig +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudhsm2_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudhsm2_cluster.go new file mode 100644 index 0000000000..be666fef0d --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudhsm2_cluster.go @@ -0,0 +1,363 @@ +package aws + +import ( + "fmt" + "github.com/hashicorp/terraform/helper/validation" + "log" + "time" + + "github.com/hashicorp/terraform/helper/schema" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/cloudhsmv2" + "github.com/hashicorp/terraform/helper/resource" +) + +func resourceAwsCloudHsm2Cluster() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsCloudHsm2ClusterCreate, + Read: resourceAwsCloudHsm2ClusterRead, + Update: resourceAwsCloudHsm2ClusterUpdate, + Delete: resourceAwsCloudHsm2ClusterDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(120 * time.Minute), + Update: schema.DefaultTimeout(120 * time.Minute), + Delete: schema.DefaultTimeout(120 * time.Minute), + }, + + Schema: map[string]*schema.Schema{ + "source_backup_identifier": { + Type: schema.TypeString, + Computed: false, + Optional: true, + ForceNew: true, + }, + + "hsm_type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{"hsm1.medium"}, false), + }, + + "subnet_ids": { + Type: schema.TypeSet, + Required: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + ForceNew: true, + }, + + "cluster_id": { + Type: schema.TypeString, + Computed: true, + }, + + "vpc_id": { + Type: schema.TypeString, + Computed: true, + }, + + "cluster_certificates": { + Type: schema.TypeList, + MaxItems: 1, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cluster_certificate": { + Type: schema.TypeString, + Computed: true, + }, + "cluster_csr": { + Type: schema.TypeString, + Computed: true, + }, + "aws_hardware_certificate": { + Type: schema.TypeString, + Computed: true, + }, + "hsm_certificate": { + Type: schema.TypeString, + Computed: true, + }, + "manufacturer_hardware_certificate": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + + "security_group_id": { + Type: schema.TypeString, + Computed: true, + }, + + "cluster_state": { + Type: schema.TypeString, + Computed: true, + }, + + "tags": tagsSchema(), + }, + } +} + +func describeCloudHsm2Cluster(conn *cloudhsmv2.CloudHSMV2, clusterId string) (*cloudhsmv2.Cluster, error) { + filters := []*string{&clusterId} + result := int64(1) + out, err := conn.DescribeClusters(&cloudhsmv2.DescribeClustersInput{ + Filters: map[string][]*string{ + "clusterIds": filters, + }, + MaxResults: &result, + }) + if err != nil { + log.Printf("[WARN] Error on retrieving CloudHSMv2 Cluster (%s) when waiting: %s", clusterId, err) + return nil, err + } + + var cluster *cloudhsmv2.Cluster + + for _, c := range out.Clusters { + if aws.StringValue(c.ClusterId) == clusterId { + cluster = c + break + } + } + return cluster, nil +} + +func resourceAwsCloudHsm2ClusterRefreshFunc(conn *cloudhsmv2.CloudHSMV2, clusterId string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + cluster, err := describeCloudHsm2Cluster(conn, clusterId) + + if cluster == nil { + return 42, "destroyed", nil + } + + if cluster.State != nil { + log.Printf("[DEBUG] CloudHSMv2 Cluster status (%s): %s", clusterId, *cluster.State) + } + + return cluster, aws.StringValue(cluster.State), err + } +} + +func resourceAwsCloudHsm2ClusterCreate(d *schema.ResourceData, meta interface{}) error { + cloudhsm2 := meta.(*AWSClient).cloudhsmv2conn + + input := &cloudhsmv2.CreateClusterInput{ + HsmType: aws.String(d.Get("hsm_type").(string)), + SubnetIds: expandStringSet(d.Get("subnet_ids").(*schema.Set)), + } + + backupId := d.Get("source_backup_identifier").(string) + if len(backupId) != 0 { + input.SourceBackupId = aws.String(backupId) + } + + log.Printf("[DEBUG] CloudHSMv2 Cluster create %s", input) + + var output *cloudhsmv2.CreateClusterOutput + + err := resource.Retry(180*time.Second, func() *resource.RetryError { + var err error + output, err = cloudhsm2.CreateCluster(input) + if err != nil { + if isAWSErr(err, cloudhsmv2.ErrCodeCloudHsmInternalFailureException, "request was rejected because of an AWS CloudHSM internal failure") { + log.Printf("[DEBUG] CloudHSMv2 Cluster re-try creating %s", input) + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + + if err != nil { + return fmt.Errorf("error creating CloudHSMv2 Cluster: %s", err) + } + + d.SetId(aws.StringValue(output.Cluster.ClusterId)) + log.Printf("[INFO] CloudHSMv2 Cluster ID: %s", d.Id()) + log.Println("[INFO] Waiting for CloudHSMv2 Cluster to be available") + + targetState := cloudhsmv2.ClusterStateUninitialized + if len(backupId) > 0 { + targetState = cloudhsmv2.ClusterStateActive + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{cloudhsmv2.ClusterStateCreateInProgress, cloudhsmv2.ClusterStateInitializeInProgress}, + Target: []string{targetState}, + Refresh: resourceAwsCloudHsm2ClusterRefreshFunc(cloudhsm2, d.Id()), + Timeout: d.Timeout(schema.TimeoutCreate), + MinTimeout: 30 * time.Second, + Delay: 30 * time.Second, + } + + // Wait, catching any errors + _, errWait := stateConf.WaitForState() + if errWait != nil { + if len(backupId) == 0 { + return fmt.Errorf("[WARN] Error waiting for CloudHSMv2 Cluster state to be \"UNINITIALIZED\": %s", errWait) + } else { + return fmt.Errorf("[WARN] Error waiting for CloudHSMv2 Cluster state to be \"ACTIVE\": %s", errWait) + } + } + + if err := setTagsAwsCloudHsm2Cluster(cloudhsm2, d); err != nil { + return err + } + + return resourceAwsCloudHsm2ClusterRead(d, meta) +} + +func resourceAwsCloudHsm2ClusterRead(d *schema.ResourceData, meta interface{}) error { + + cluster, err := describeCloudHsm2Cluster(meta.(*AWSClient).cloudhsmv2conn, d.Id()) + + if cluster == nil { + log.Printf("[WARN] CloudHSMv2 Cluster (%s) not found", d.Id()) + d.SetId("") + return err + } + + log.Printf("[INFO] Reading CloudHSMv2 Cluster Information: %s", d.Id()) + + d.Set("cluster_id", cluster.ClusterId) + d.Set("cluster_state", cluster.State) + d.Set("security_group_id", cluster.SecurityGroup) + d.Set("vpc_id", cluster.VpcId) + d.Set("source_backup_identifier", cluster.SourceBackupId) + d.Set("hsm_type", cluster.HsmType) + if err := d.Set("cluster_certificates", readCloudHsm2ClusterCertificates(cluster)); err != nil { + return fmt.Errorf("error setting cluster_certificates: %s", err) + } + + var subnets []string + for _, sn := range cluster.SubnetMapping { + subnets = append(subnets, aws.StringValue(sn)) + } + if err := d.Set("subnet_ids", subnets); err != nil { + return fmt.Errorf("Error saving Subnet IDs to state for CloudHSMv2 Cluster (%s): %s", d.Id(), err) + } + + return nil +} + +func resourceAwsCloudHsm2ClusterUpdate(d *schema.ResourceData, meta interface{}) error { + cloudhsm2 := meta.(*AWSClient).cloudhsmv2conn + + if err := setTagsAwsCloudHsm2Cluster(cloudhsm2, d); err != nil { + return err + } + + return resourceAwsCloudHsm2ClusterRead(d, meta) +} + +func resourceAwsCloudHsm2ClusterDelete(d *schema.ResourceData, meta interface{}) error { + cloudhsm2 := meta.(*AWSClient).cloudhsmv2conn + + log.Printf("[DEBUG] CloudHSMv2 Delete cluster: %s", d.Id()) + err := resource.Retry(180*time.Second, func() *resource.RetryError { + var err error + _, err = cloudhsm2.DeleteCluster(&cloudhsmv2.DeleteClusterInput{ + ClusterId: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, cloudhsmv2.ErrCodeCloudHsmInternalFailureException, "request was rejected because of an AWS CloudHSM internal failure") { + log.Printf("[DEBUG] CloudHSMv2 Cluster re-try deleting %s", d.Id()) + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + + if err != nil { + return err + } + log.Println("[INFO] Waiting for CloudHSMv2 Cluster to be deleted") + + stateConf := &resource.StateChangeConf{ + Pending: []string{cloudhsmv2.ClusterStateDeleteInProgress}, + Target: []string{cloudhsmv2.ClusterStateDeleted}, + Refresh: resourceAwsCloudHsm2ClusterRefreshFunc(cloudhsm2, d.Id()), + Timeout: d.Timeout(schema.TimeoutCreate), + MinTimeout: 30 * time.Second, + Delay: 30 * time.Second, + } + + // Wait, catching any errors + _, errWait := stateConf.WaitForState() + if errWait != nil { + return fmt.Errorf("Error waiting for CloudHSMv2 Cluster state to be \"DELETED\": %s", errWait) + } + + return nil +} + +func setTagsAwsCloudHsm2Cluster(conn *cloudhsmv2.CloudHSMV2, d *schema.ResourceData) error { + if d.HasChange("tags") { + oraw, nraw := d.GetChange("tags") + create, remove := diffTagsGeneric(oraw.(map[string]interface{}), nraw.(map[string]interface{})) + + if len(remove) > 0 { + log.Printf("[DEBUG] Removing tags: %#v", remove) + keys := make([]*string, 0, len(remove)) + for k := range remove { + keys = append(keys, aws.String(k)) + } + + _, err := conn.UntagResource(&cloudhsmv2.UntagResourceInput{ + ResourceId: aws.String(d.Id()), + TagKeyList: keys, + }) + if err != nil { + return err + } + } + if len(create) > 0 { + log.Printf("[DEBUG] Creating tags: %#v", create) + tagList := make([]*cloudhsmv2.Tag, 0, len(create)) + for k, v := range create { + tagList = append(tagList, &cloudhsmv2.Tag{ + Key: &k, + Value: v, + }) + } + _, err := conn.TagResource(&cloudhsmv2.TagResourceInput{ + ResourceId: aws.String(d.Id()), + TagList: tagList, + }) + if err != nil { + return err + } + } + } + + return nil +} + +func readCloudHsm2ClusterCertificates(cluster *cloudhsmv2.Cluster) []map[string]interface{} { + certs := map[string]interface{}{} + if cluster.Certificates != nil { + if aws.StringValue(cluster.State) == "UNINITIALIZED" { + certs["cluster_csr"] = aws.StringValue(cluster.Certificates.ClusterCsr) + certs["aws_hardware_certificate"] = aws.StringValue(cluster.Certificates.AwsHardwareCertificate) + certs["hsm_certificate"] = aws.StringValue(cluster.Certificates.HsmCertificate) + certs["manufacturer_hardware_certificate"] = aws.StringValue(cluster.Certificates.ManufacturerHardwareCertificate) + } else if aws.StringValue(cluster.State) == "ACTIVE" { + certs["cluster_certificate"] = aws.StringValue(cluster.Certificates.ClusterCertificate) + } + } + if len(certs) > 0 { + return []map[string]interface{}{certs} + } + return []map[string]interface{}{} +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudhsm2_hsm.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudhsm2_hsm.go new file mode 100644 index 0000000000..0bb93ff97e --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudhsm2_hsm.go @@ -0,0 +1,261 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/hashicorp/terraform/helper/schema" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/cloudhsmv2" + "github.com/hashicorp/terraform/helper/resource" +) + +func resourceAwsCloudHsm2Hsm() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsCloudHsm2HsmCreate, + Read: resourceAwsCloudHsm2HsmRead, + Delete: resourceAwsCloudHsm2HsmDelete, + Importer: &schema.ResourceImporter{ + State: resourceAwsCloudHsm2HsmImport, + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(120 * time.Minute), + Update: schema.DefaultTimeout(120 * time.Minute), + Delete: schema.DefaultTimeout(120 * time.Minute), + }, + + Schema: map[string]*schema.Schema{ + "cluster_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + "subnet_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + + "availability_zone": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + + "ip_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + + "hsm_id": { + Type: schema.TypeString, + Computed: true, + }, + + "hsm_state": { + Type: schema.TypeString, + Computed: true, + }, + + "hsm_eni_id": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsCloudHsm2HsmImport( + d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + d.Set("hsm_id", d.Id()) + return []*schema.ResourceData{d}, nil +} + +func describeHsm(conn *cloudhsmv2.CloudHSMV2, hsmId string) (*cloudhsmv2.Hsm, error) { + out, err := conn.DescribeClusters(&cloudhsmv2.DescribeClustersInput{}) + if err != nil { + log.Printf("[WARN] Error on descibing CloudHSM v2 Cluster: %s", err) + return nil, err + } + + var hsm *cloudhsmv2.Hsm + + for _, c := range out.Clusters { + for _, h := range c.Hsms { + if aws.StringValue(h.HsmId) == hsmId { + hsm = h + break + } + } + } + + return hsm, nil +} + +func resourceAwsCloudHsm2HsmRefreshFunc( + d *schema.ResourceData, meta interface{}) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + hsm, err := describeHsm(meta.(*AWSClient).cloudhsmv2conn, d.Id()) + + if hsm == nil { + return 42, "destroyed", nil + } + + if hsm.State != nil { + log.Printf("[DEBUG] CloudHSMv2 Cluster status (%s): %s", d.Id(), *hsm.State) + } + + return hsm, aws.StringValue(hsm.State), err + } +} + +func resourceAwsCloudHsm2HsmCreate(d *schema.ResourceData, meta interface{}) error { + cloudhsm2 := meta.(*AWSClient).cloudhsmv2conn + + clusterId := d.Get("cluster_id").(string) + + cluster, err := describeCloudHsm2Cluster(cloudhsm2, clusterId) + + if cluster == nil { + log.Printf("[WARN] Error on retrieving CloudHSMv2 Cluster: %s %s", clusterId, err) + return err + } + + availabilityZone := d.Get("availability_zone").(string) + if len(availabilityZone) == 0 { + subnetId := d.Get("subnet_id").(string) + for az, sn := range cluster.SubnetMapping { + if aws.StringValue(sn) == subnetId { + availabilityZone = az + } + } + } + + input := &cloudhsmv2.CreateHsmInput{ + ClusterId: aws.String(clusterId), + AvailabilityZone: aws.String(availabilityZone), + } + + ipAddress := d.Get("ip_address").(string) + if len(ipAddress) != 0 { + input.IpAddress = aws.String(ipAddress) + } + + log.Printf("[DEBUG] CloudHSMv2 HSM create %s", input) + + var output *cloudhsmv2.CreateHsmOutput + + errRetry := resource.Retry(180*time.Second, func() *resource.RetryError { + var err error + output, err = cloudhsm2.CreateHsm(input) + if err != nil { + if isAWSErr(err, cloudhsmv2.ErrCodeCloudHsmInternalFailureException, "request was rejected because of an AWS CloudHSM internal failure") { + log.Printf("[DEBUG] CloudHSMv2 HSM re-try creating %s", input) + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + + if errRetry != nil { + return fmt.Errorf("error creating CloudHSM v2 HSM module: %s", errRetry) + } + + d.SetId(aws.StringValue(output.Hsm.HsmId)) + log.Printf("[INFO] CloudHSMv2 HSM Id: %s", d.Id()) + log.Println("[INFO] Waiting for CloudHSMv2 HSM to be available") + + stateConf := &resource.StateChangeConf{ + Pending: []string{cloudhsmv2.HsmStateCreateInProgress, "destroyed"}, + Target: []string{cloudhsmv2.HsmStateActive}, + Refresh: resourceAwsCloudHsm2HsmRefreshFunc(d, meta), + Timeout: d.Timeout(schema.TimeoutCreate), + MinTimeout: 30 * time.Second, + Delay: 30 * time.Second, + } + + // Wait, catching any errors + _, errWait := stateConf.WaitForState() + if errWait != nil { + return fmt.Errorf("Error waiting for CloudHSMv2 HSM state to be \"ACTIVE\": %s", errWait) + } + + return resourceAwsCloudHsm2HsmRead(d, meta) +} + +func resourceAwsCloudHsm2HsmRead(d *schema.ResourceData, meta interface{}) error { + + hsm, err := describeHsm(meta.(*AWSClient).cloudhsmv2conn, d.Id()) + + if hsm == nil { + log.Printf("[WARN] CloudHSMv2 HSM (%s) not found", d.Id()) + d.SetId("") + return err + } + + log.Printf("[INFO] Reading CloudHSMv2 HSM Information: %s", d.Id()) + + d.Set("cluster_id", hsm.ClusterId) + d.Set("subnet_id", hsm.SubnetId) + d.Set("availability_zone", hsm.AvailabilityZone) + d.Set("ip_address", hsm.EniIp) + d.Set("hsm_id", hsm.HsmId) + d.Set("hsm_state", hsm.State) + d.Set("hsm_eni_id", hsm.EniId) + + return nil +} + +func resourceAwsCloudHsm2HsmDelete(d *schema.ResourceData, meta interface{}) error { + cloudhsm2 := meta.(*AWSClient).cloudhsmv2conn + clusterId := d.Get("cluster_id").(string) + + log.Printf("[DEBUG] CloudHSMv2 HSM delete %s %s", clusterId, d.Id()) + + errRetry := resource.Retry(180*time.Second, func() *resource.RetryError { + var err error + _, err = cloudhsm2.DeleteHsm(&cloudhsmv2.DeleteHsmInput{ + ClusterId: aws.String(clusterId), + HsmId: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, cloudhsmv2.ErrCodeCloudHsmInternalFailureException, "request was rejected because of an AWS CloudHSM internal failure") { + log.Printf("[DEBUG] CloudHSMv2 HSM re-try deleting %s", d.Id()) + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + + if errRetry != nil { + return fmt.Errorf("error deleting CloudHSM v2 HSM module (%s): %s", d.Id(), errRetry) + } + log.Println("[INFO] Waiting for CloudHSMv2 HSM to be deleted") + + stateConf := &resource.StateChangeConf{ + Pending: []string{cloudhsmv2.HsmStateDeleteInProgress}, + Target: []string{"destroyed"}, + Refresh: resourceAwsCloudHsm2HsmRefreshFunc(d, meta), + Timeout: d.Timeout(schema.TimeoutCreate), + MinTimeout: 30 * time.Second, + Delay: 30 * time.Second, + } + + // Wait, catching any errors + _, errWait := stateConf.WaitForState() + if errWait != nil { + return fmt.Errorf("Error waiting for CloudHSMv2 HSM state to be \"DELETED\": %s", errWait) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_dashboard.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_dashboard.go index d203aead4b..2a60e595fd 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_dashboard.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_dashboard.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/service/cloudwatch" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/structure" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsCloudWatchDashboard() *schema.Resource { @@ -33,7 +34,7 @@ func resourceAwsCloudWatchDashboard() *schema.Resource { "dashboard_body": { Type: schema.TypeString, Required: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) return json diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_permission.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_permission.go index 7383c64752..8457bdf0e9 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_permission.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_permission.go @@ -12,6 +12,7 @@ import ( events "github.com/aws/aws-sdk-go/service/cloudwatchevents" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsCloudWatchEventPermission() *schema.Resource { @@ -31,6 +32,30 @@ func resourceAwsCloudWatchEventPermission() *schema.Resource { Default: "events:PutEvents", ValidateFunc: validateCloudWatchEventPermissionAction, }, + "condition": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "key": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{"aws:PrincipalOrgID"}, false), + }, + "type": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{"StringEquals"}, false), + }, + "value": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.NoZeroValues, + }, + }, + }, + }, "principal": { Type: schema.TypeString, Required: true, @@ -53,6 +78,7 @@ func resourceAwsCloudWatchEventPermissionCreate(d *schema.ResourceData, meta int input := events.PutPermissionInput{ Action: aws.String(d.Get("action").(string)), + Condition: expandCloudWatchEventsCondition(d.Get("condition").([]interface{})), Principal: aws.String(d.Get("principal").(string)), StatementId: aws.String(statementID), } @@ -108,6 +134,10 @@ func resourceAwsCloudWatchEventPermissionRead(d *schema.ResourceData, meta inter d.Set("action", policyStatement.Action) + if err := d.Set("condition", flattenCloudWatchEventPermissionPolicyStatementCondition(policyStatement.Condition)); err != nil { + return fmt.Errorf("error setting condition: %s", err) + } + principalString, ok := policyStatement.Principal.(string) if ok && (principalString == "*") { d.Set("principal", "*") @@ -129,6 +159,7 @@ func resourceAwsCloudWatchEventPermissionUpdate(d *schema.ResourceData, meta int input := events.PutPermissionInput{ Action: aws.String(d.Get("action").(string)), + Condition: expandCloudWatchEventsCondition(d.Get("condition").([]interface{})), Principal: aws.String(d.Get("principal").(string)), StatementId: aws.String(d.Get("statement_id").(string)), } @@ -205,10 +236,42 @@ type CloudWatchEventPermissionPolicyStatement struct { Sid string Effect string Action string - Principal interface{} // "*" or {"AWS": "arn:aws:iam::111111111111:root"} + Condition *CloudWatchEventPermissionPolicyStatementCondition `json:"Condition,omitempty"` + Principal interface{} // "*" or {"AWS": "arn:aws:iam::111111111111:root"} Resource string } +// CloudWatchEventPermissionPolicyStatementCondition represents the Condition attribute of CloudWatchEventPermissionPolicyStatement +// See also: https://docs.aws.amazon.com/AmazonCloudWatchEvents/latest/APIReference/API_DescribeEventBus.html +type CloudWatchEventPermissionPolicyStatementCondition struct { + Key string + Type string + Value string +} + +func (condition *CloudWatchEventPermissionPolicyStatementCondition) UnmarshalJSON(b []byte) error { + var out CloudWatchEventPermissionPolicyStatementCondition + + // JSON representation: \"Condition\":{\"StringEquals\":{\"aws:PrincipalOrgID\":\"o-0123456789\"}} + var data map[string]map[string]string + if err := json.Unmarshal(b, &data); err != nil { + return err + } + + for typeKey, typeValue := range data { + for conditionKey, conditionValue := range typeValue { + out = CloudWatchEventPermissionPolicyStatementCondition{ + Key: conditionKey, + Type: typeKey, + Value: conditionValue, + } + } + } + + *condition = out + return nil +} + func findCloudWatchEventPermissionPolicyStatementByID(policy *CloudWatchEventPermissionPolicyDoc, id string) ( *CloudWatchEventPermissionPolicyStatement, error) { @@ -225,3 +288,33 @@ func findCloudWatchEventPermissionPolicyStatementByID(policy *CloudWatchEventPer Message: fmt.Sprintf("Failed to find statement %q in CloudWatch Events permission policy:\n%s", id, policy.Statements), } } + +func expandCloudWatchEventsCondition(l []interface{}) *events.Condition { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + condition := &events.Condition{ + Key: aws.String(m["key"].(string)), + Type: aws.String(m["type"].(string)), + Value: aws.String(m["value"].(string)), + } + + return condition +} + +func flattenCloudWatchEventPermissionPolicyStatementCondition(condition *CloudWatchEventPermissionPolicyStatementCondition) []interface{} { + if condition == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "key": condition.Key, + "type": condition.Type, + "value": condition.Value, + } + + return []interface{}{m} +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_rule.go index 3ff15d37e9..16977cb1f8 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_rule.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_rule.go @@ -9,10 +9,10 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" events "github.com/aws/aws-sdk-go/service/cloudwatchevents" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/structure" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsCloudWatchEventRule() *schema.Resource { @@ -43,12 +43,12 @@ func resourceAwsCloudWatchEventRule() *schema.Resource { "schedule_expression": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateMaxLength(256), + ValidateFunc: validation.StringLenBetween(0, 256), }, "event_pattern": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateEventPatternValue(2048), + ValidateFunc: validateEventPatternValue(), StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v.(string)) return json @@ -57,12 +57,12 @@ func resourceAwsCloudWatchEventRule() *schema.Resource { "description": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateMaxLength(512), + ValidateFunc: validation.StringLenBetween(0, 512), }, "role_arn": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateMaxLength(1600), + ValidateFunc: validation.StringLenBetween(0, 1600), }, "is_enabled": { Type: schema.TypeBool, @@ -91,7 +91,7 @@ func resourceAwsCloudWatchEventRuleCreate(d *schema.ResourceData, meta interface input, err := buildPutRuleInputStruct(d, name) if err != nil { - return errwrap.Wrapf("Creating CloudWatch Event Rule failed: {{err}}", err) + return fmt.Errorf("Creating CloudWatch Event Rule failed: %s", err) } log.Printf("[DEBUG] Creating CloudWatch Event Rule: %s", input) @@ -113,7 +113,7 @@ func resourceAwsCloudWatchEventRuleCreate(d *schema.ResourceData, meta interface return nil }) if err != nil { - return errwrap.Wrapf("Creating CloudWatch Event Rule failed: {{err}}", err) + return fmt.Errorf("Creating CloudWatch Event Rule failed: %s", err) } d.Set("arn", out.RuleArn) @@ -149,7 +149,7 @@ func resourceAwsCloudWatchEventRuleRead(d *schema.ResourceData, meta interface{} if out.EventPattern != nil { pattern, err := structure.NormalizeJsonString(*out.EventPattern) if err != nil { - return errwrap.Wrapf("event pattern contains an invalid JSON: {{err}}", err) + return fmt.Errorf("event pattern contains an invalid JSON: %s", err) } d.Set("event_pattern", pattern) } @@ -183,7 +183,7 @@ func resourceAwsCloudWatchEventRuleUpdate(d *schema.ResourceData, meta interface input, err := buildPutRuleInputStruct(d, d.Id()) if err != nil { - return errwrap.Wrapf("Updating CloudWatch Event Rule failed: {{err}}", err) + return fmt.Errorf("Updating CloudWatch Event Rule failed: %s", err) } log.Printf("[DEBUG] Updating CloudWatch Event Rule: %s", input) @@ -203,7 +203,7 @@ func resourceAwsCloudWatchEventRuleUpdate(d *schema.ResourceData, meta interface return nil }) if err != nil { - return errwrap.Wrapf("Updating CloudWatch Event Rule failed: {{err}}", err) + return fmt.Errorf("Updating CloudWatch Event Rule failed: %s", err) } if d.HasChange("is_enabled") && !d.Get("is_enabled").(bool) { @@ -245,7 +245,7 @@ func buildPutRuleInputStruct(d *schema.ResourceData, name string) (*events.PutRu if v, ok := d.GetOk("event_pattern"); ok { pattern, err := structure.NormalizeJsonString(v) if err != nil { - return nil, errwrap.Wrapf("event pattern contains an invalid JSON: {{err}}", err) + return nil, fmt.Errorf("event pattern contains an invalid JSON: %s", err) } input.EventPattern = aws.String(pattern) } @@ -281,7 +281,7 @@ func getStringStateFromBoolean(isEnabled bool) string { return "DISABLED" } -func validateEventPatternValue(length int) schema.SchemaValidateFunc { +func validateEventPatternValue() schema.SchemaValidateFunc { return func(v interface{}, k string) (ws []string, errors []error) { json, err := structure.NormalizeJsonString(v) if err != nil { @@ -294,9 +294,9 @@ func validateEventPatternValue(length int) schema.SchemaValidateFunc { } // Check whether the normalized JSON is within the given length. - if len(json) > length { + if len(json) > 2048 { errors = append(errors, fmt.Errorf( - "%q cannot be longer than %d characters: %q", k, length, json)) + "%q cannot be longer than %d characters: %q", k, 2048, json)) } return } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_target.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_target.go index 4b9af0e93b..5dc979a5fa 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_target.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_event_target.go @@ -88,6 +88,47 @@ func resourceAwsCloudWatchEventTarget() *schema.Resource { MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ + "group": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringLenBetween(1, 255), + }, + "launch_type": { + Type: schema.TypeString, + Optional: true, + Default: "EC2", + }, + "network_configuration": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "security_groups": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + "subnets": { + Type: schema.TypeSet, + Required: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + "assign_public_ip": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + }, + }, + }, + "platform_version": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringLenBetween(0, 1600), + }, "task_count": { Type: schema.TypeInt, Optional: true, @@ -256,37 +297,37 @@ func resourceAwsCloudWatchEventTargetRead(d *schema.ResourceData, meta interface if t.RunCommandParameters != nil { if err := d.Set("run_command_targets", flattenAwsCloudWatchEventTargetRunParameters(t.RunCommandParameters)); err != nil { - return fmt.Errorf("[DEBUG] Error setting run_command_targets error: %#v", err) + return fmt.Errorf("Error setting run_command_targets error: %#v", err) } } if t.EcsParameters != nil { if err := d.Set("ecs_target", flattenAwsCloudWatchEventTargetEcsParameters(t.EcsParameters)); err != nil { - return fmt.Errorf("[DEBUG] Error setting ecs_target error: %#v", err) + return fmt.Errorf("Error setting ecs_target error: %#v", err) } } if t.BatchParameters != nil { if err := d.Set("batch_target", flattenAwsCloudWatchEventTargetBatchParameters(t.BatchParameters)); err != nil { - return fmt.Errorf("[DEBUG] Error setting batch_target error: %#v", err) + return fmt.Errorf("Error setting batch_target error: %#v", err) } } if t.KinesisParameters != nil { if err := d.Set("kinesis_target", flattenAwsCloudWatchEventTargetKinesisParameters(t.KinesisParameters)); err != nil { - return fmt.Errorf("[DEBUG] Error setting kinesis_target error: %#v", err) + return fmt.Errorf("Error setting kinesis_target error: %#v", err) } } if t.SqsParameters != nil { if err := d.Set("sqs_target", flattenAwsCloudWatchEventTargetSqsParameters(t.SqsParameters)); err != nil { - return fmt.Errorf("[DEBUG] Error setting sqs_target error: %#v", err) + return fmt.Errorf("Error setting sqs_target error: %#v", err) } } if t.InputTransformer != nil { if err := d.Set("input_transformer", flattenAwsCloudWatchInputTransformer(t.InputTransformer)); err != nil { - return fmt.Errorf("[DEBUG] Error setting input_transformer error: %#v", err) + return fmt.Errorf("Error setting input_transformer error: %#v", err) } } @@ -421,12 +462,43 @@ func expandAwsCloudWatchEventTargetEcsParameters(config []interface{}) *events.E ecsParameters := &events.EcsParameters{} for _, c := range config { param := c.(map[string]interface{}) + if val, ok := param["group"].(string); ok && val != "" { + ecsParameters.Group = aws.String(val) + } + if val, ok := param["launch_type"].(string); ok && val != "" { + ecsParameters.LaunchType = aws.String(val) + } + if val, ok := param["network_configuration"]; ok { + ecsParameters.NetworkConfiguration = expandAwsCloudWatchEventTargetEcsParametersNetworkConfiguration(val.([]interface{})) + } + if val, ok := param["platform_version"].(string); ok && val != "" { + ecsParameters.PlatformVersion = aws.String(val) + } ecsParameters.TaskCount = aws.Int64(int64(param["task_count"].(int))) ecsParameters.TaskDefinitionArn = aws.String(param["task_definition_arn"].(string)) } return ecsParameters } +func expandAwsCloudWatchEventTargetEcsParametersNetworkConfiguration(nc []interface{}) *events.NetworkConfiguration { + if len(nc) == 0 { + return nil + } + awsVpcConfig := &events.AwsVpcConfiguration{} + raw := nc[0].(map[string]interface{}) + if val, ok := raw["security_groups"]; ok { + awsVpcConfig.SecurityGroups = expandStringSet(val.(*schema.Set)) + } + awsVpcConfig.Subnets = expandStringSet(raw["subnets"].(*schema.Set)) + if val, ok := raw["assign_public_ip"].(bool); ok { + awsVpcConfig.AssignPublicIp = aws.String(events.AssignPublicIpDisabled) + if val { + awsVpcConfig.AssignPublicIp = aws.String(events.AssignPublicIpEnabled) + } + } + + return &events.NetworkConfiguration{AwsvpcConfiguration: awsVpcConfig} +} func expandAwsCloudWatchEventTargetBatchParameters(config []interface{}) *events.BatchParameters { batchParameters := &events.BatchParameters{} @@ -508,11 +580,36 @@ func flattenAwsCloudWatchEventTargetRunParameters(runCommand *events.RunCommandP } func flattenAwsCloudWatchEventTargetEcsParameters(ecsParameters *events.EcsParameters) []map[string]interface{} { config := make(map[string]interface{}) + if ecsParameters.Group != nil { + config["group"] = *ecsParameters.Group + } + if ecsParameters.LaunchType != nil { + config["launch_type"] = *ecsParameters.LaunchType + } + config["network_configuration"] = flattenAwsCloudWatchEventTargetEcsParametersNetworkConfiguration(ecsParameters.NetworkConfiguration) + if ecsParameters.PlatformVersion != nil { + config["platform_version"] = *ecsParameters.PlatformVersion + } config["task_count"] = *ecsParameters.TaskCount config["task_definition_arn"] = *ecsParameters.TaskDefinitionArn result := []map[string]interface{}{config} return result } +func flattenAwsCloudWatchEventTargetEcsParametersNetworkConfiguration(nc *events.NetworkConfiguration) []interface{} { + if nc == nil { + return nil + } + + result := make(map[string]interface{}) + result["security_groups"] = schema.NewSet(schema.HashString, flattenStringList(nc.AwsvpcConfiguration.SecurityGroups)) + result["subnets"] = schema.NewSet(schema.HashString, flattenStringList(nc.AwsvpcConfiguration.Subnets)) + + if nc.AwsvpcConfiguration.AssignPublicIp != nil { + result["assign_public_ip"] = *nc.AwsvpcConfiguration.AssignPublicIp == events.AssignPublicIpEnabled + } + + return []interface{}{result} +} func flattenAwsCloudWatchEventTargetBatchParameters(batchParameters *events.BatchParameters) []map[string]interface{} { config := make(map[string]interface{}) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_metric_filter.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_metric_filter.go index 80ea7cfdf6..92a361266a 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_metric_filter.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_metric_filter.go @@ -7,6 +7,7 @@ import ( "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" @@ -31,7 +32,7 @@ func resourceAwsCloudWatchLogMetricFilter() *schema.Resource { "pattern": { Type: schema.TypeString, Required: true, - ValidateFunc: validateMaxLength(1024), + ValidateFunc: validation.StringLenBetween(0, 1024), StateFunc: func(v interface{}) string { s, ok := v.(string) if !ok { @@ -67,11 +68,12 @@ func resourceAwsCloudWatchLogMetricFilter() *schema.Resource { "value": { Type: schema.TypeString, Required: true, - ValidateFunc: validateMaxLength(100), + ValidateFunc: validation.StringLenBetween(0, 100), }, "default_value": { - Type: schema.TypeFloat, - Optional: true, + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateTypeStringNullableFloat, }, }, }, @@ -91,14 +93,10 @@ func resourceAwsCloudWatchLogMetricFilterUpdate(d *schema.ResourceData, meta int transformations := d.Get("metric_transformation").([]interface{}) o := transformations[0].(map[string]interface{}) - metricsTransformations, err := expandCloudWachLogMetricTransformations(o) - if err != nil { - return err - } - input.MetricTransformations = metricsTransformations + input.MetricTransformations = expandCloudWatchLogMetricTransformations(o) log.Printf("[DEBUG] Creating/Updating CloudWatch Log Metric Filter: %s", input) - _, err = conn.PutMetricFilter(&input) + _, err := conn.PutMetricFilter(&input) if err != nil { return fmt.Errorf("Creating/Updating CloudWatch Log Metric Filter failed: %s", err) } @@ -129,7 +127,7 @@ func resourceAwsCloudWatchLogMetricFilterRead(d *schema.ResourceData, meta inter d.Set("name", mf.FilterName) d.Set("pattern", mf.FilterPattern) - d.Set("metric_transformation", flattenCloudWachLogMetricTransformations(mf.MetricTransformations)) + d.Set("metric_transformation", flattenCloudWatchLogMetricTransformations(mf.MetricTransformations)) return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_stream.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_stream.go index 6557787a7d..48b409967f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_stream.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_stream.go @@ -7,7 +7,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/schema" ) @@ -48,7 +47,7 @@ func resourceAwsCloudWatchLogStreamCreate(d *schema.ResourceData, meta interface LogStreamName: aws.String(d.Get("name").(string)), }) if err != nil { - return errwrap.Wrapf("Creating CloudWatch Log Stream failed: {{err}}", err) + return fmt.Errorf("Creating CloudWatch Log Stream failed: %s", err) } d.SetId(d.Get("name").(string)) @@ -86,7 +85,7 @@ func resourceAwsCloudWatchLogStreamDelete(d *schema.ResourceData, meta interface } _, err := conn.DeleteLogStream(params) if err != nil { - return errwrap.Wrapf("Error deleting CloudWatch Log Stream: {{err}}", err) + return fmt.Errorf("Error deleting CloudWatch Log Stream: %s", err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_subscription_filter.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_subscription_filter.go index 99e303020d..c5e1273391 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_subscription_filter.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_log_subscription_filter.go @@ -98,7 +98,7 @@ func resourceAwsCloudwatchLogSubscriptionFilterUpdate(d *schema.ResourceData, me _, err := conn.PutSubscriptionFilter(¶ms) if err != nil { if awsErr, ok := err.(awserr.Error); ok { - return fmt.Errorf("[WARN] Error updating SubscriptionFilter (%s) for LogGroup (%s), message: \"%s\", code: \"%s\"", + return fmt.Errorf("Error updating SubscriptionFilter (%s) for LogGroup (%s), message: \"%s\", code: \"%s\"", d.Get("name").(string), d.Get("log_group_name").(string), awsErr.Message(), awsErr.Code()) } return err diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_metric_alarm.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_metric_alarm.go index f15aa1b2e4..efdf80feb0 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_metric_alarm.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cloudwatch_metric_alarm.go @@ -72,8 +72,14 @@ func resourceAwsCloudWatchMetricAlarm() *schema.Resource { "alarm_actions": { Type: schema.TypeSet, Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, + Elem: &schema.Schema{ + Type: schema.TypeString, + ValidateFunc: validateAny( + validateArn, + validateEC2AutomateARN, + ), + }, + Set: schema.HashString, }, "alarm_description": { Type: schema.TypeString, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codebuild_project.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codebuild_project.go index c7a95f6f38..bf68e62dd8 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codebuild_project.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codebuild_project.go @@ -28,6 +28,10 @@ func resourceAwsCodeBuildProject() *schema.Resource { }, Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, "artifacts": { Type: schema.TypeSet, Required: true, @@ -108,7 +112,7 @@ func resourceAwsCodeBuildProject() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ValidateFunc: validateMaxLength(255), + ValidateFunc: validation.StringLenBetween(0, 255), }, "encryption_key": { Type: schema.TypeString, @@ -173,6 +177,11 @@ func resourceAwsCodeBuildProject() *schema.Resource { Optional: true, Default: false, }, + "certificate": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringMatch(regexp.MustCompile(`\.(pem|zip)$`), "must end in .pem or .zip"), + }, }, }, Set: resourceAwsCodeBuildProjectEnvironmentHash, @@ -183,6 +192,123 @@ func resourceAwsCodeBuildProject() *schema.Resource { ForceNew: true, ValidateFunc: validateAwsCodeBuildProjectName, }, + "secondary_artifacts": { + Type: schema.TypeSet, + Optional: true, + Set: resourceAwsCodeBuildProjectArtifactsHash, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Optional: true, + }, + "encryption_disabled": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + "location": { + Type: schema.TypeString, + Optional: true, + }, + "namespace_type": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{ + codebuild.ArtifactNamespaceNone, + codebuild.ArtifactNamespaceBuildId, + }, false), + }, + "packaging": { + Type: schema.TypeString, + Optional: true, + }, + "path": { + Type: schema.TypeString, + Optional: true, + }, + "artifact_identifier": { + Type: schema.TypeString, + Required: true, + }, + "type": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{ + codebuild.ArtifactsTypeCodepipeline, + codebuild.ArtifactsTypeS3, + codebuild.ArtifactsTypeNoArtifacts, + }, false), + }, + }, + }, + }, + "secondary_sources": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "auth": { + Type: schema.TypeSet, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "resource": { + Type: schema.TypeString, + Sensitive: true, + Optional: true, + }, + "type": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{ + codebuild.SourceAuthTypeOauth, + }, false), + }, + }, + }, + Optional: true, + Set: resourceAwsCodeBuildProjectSourceAuthHash, + }, + "buildspec": { + Type: schema.TypeString, + Optional: true, + }, + "location": { + Type: schema.TypeString, + Optional: true, + }, + "type": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{ + codebuild.SourceTypeCodecommit, + codebuild.SourceTypeCodepipeline, + codebuild.SourceTypeGithub, + codebuild.SourceTypeS3, + codebuild.SourceTypeBitbucket, + codebuild.SourceTypeGithubEnterprise, + }, false), + }, + "git_clone_depth": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntAtLeast(0), + }, + "insecure_ssl": { + Type: schema.TypeBool, + Optional: true, + }, + "report_build_status": { + Type: schema.TypeBool, + Optional: true, + }, + "source_identifier": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, "service_role": { Type: schema.TypeString, Required: true, @@ -230,6 +356,7 @@ func resourceAwsCodeBuildProject() *schema.Resource { codebuild.SourceTypeS3, codebuild.SourceTypeBitbucket, codebuild.SourceTypeGithubEnterprise, + codebuild.SourceTypeNoSource, }, false), }, "git_clone_depth": { @@ -324,12 +451,26 @@ func resourceAwsCodeBuildProjectCreate(d *schema.ResourceData, meta interface{}) projectEnv := expandProjectEnvironment(d) projectSource := expandProjectSource(d) projectArtifacts := expandProjectArtifacts(d) + projectSecondaryArtifacts := expandProjectSecondaryArtifacts(d) + projectSecondarySources := expandProjectSecondarySources(d) + + if aws.StringValue(projectSource.Type) == codebuild.SourceTypeNoSource { + if aws.StringValue(projectSource.Buildspec) == "" { + return fmt.Errorf("`build_spec` must be set when source's `type` is `NO_SOURCE`") + } + + if aws.StringValue(projectSource.Location) != "" { + return fmt.Errorf("`location` must be empty when source's `type` is `NO_SOURCE`") + } + } params := &codebuild.CreateProjectInput{ - Environment: projectEnv, - Name: aws.String(d.Get("name").(string)), - Source: &projectSource, - Artifacts: &projectArtifacts, + Environment: projectEnv, + Name: aws.String(d.Get("name").(string)), + Source: &projectSource, + Artifacts: &projectArtifacts, + SecondaryArtifacts: projectSecondaryArtifacts, + SecondarySources: projectSecondarySources, } if v, ok := d.GetOk("cache"); ok { @@ -385,7 +526,7 @@ func resourceAwsCodeBuildProjectCreate(d *schema.ResourceData, meta interface{}) }) if err != nil { - return fmt.Errorf("[ERROR] Error creating CodeBuild project: %s", err) + return fmt.Errorf("Error creating CodeBuild project: %s", err) } d.SetId(*resp.Project.Arn) @@ -393,10 +534,31 @@ func resourceAwsCodeBuildProjectCreate(d *schema.ResourceData, meta interface{}) return resourceAwsCodeBuildProjectRead(d, meta) } +func expandProjectSecondaryArtifacts(d *schema.ResourceData) []*codebuild.ProjectArtifacts { + artifacts := make([]*codebuild.ProjectArtifacts, 0) + + configsList := d.Get("secondary_artifacts").(*schema.Set).List() + + if len(configsList) == 0 { + return nil + } + + for _, config := range configsList { + art := expandProjectArtifactData(config.(map[string]interface{})) + artifacts = append(artifacts, &art) + } + + return artifacts +} + func expandProjectArtifacts(d *schema.ResourceData) codebuild.ProjectArtifacts { configs := d.Get("artifacts").(*schema.Set).List() data := configs[0].(map[string]interface{}) + return expandProjectArtifactData(data) +} + +func expandProjectArtifactData(data map[string]interface{}) codebuild.ProjectArtifacts { artifactType := data["type"].(string) projectArtifacts := codebuild.ProjectArtifacts{ @@ -409,6 +571,10 @@ func expandProjectArtifacts(d *schema.ResourceData) codebuild.ProjectArtifacts { projectArtifacts.EncryptionDisabled = aws.Bool(data["encryption_disabled"].(bool)) } + if data["artifact_identifier"] != nil && data["artifact_identifier"].(string) != "" { + projectArtifacts.ArtifactIdentifier = aws.String(data["artifact_identifier"].(string)) + } + if data["location"].(string) != "" { projectArtifacts.Location = aws.String(data["location"].(string)) } @@ -469,6 +635,10 @@ func expandProjectEnvironment(d *schema.ResourceData) *codebuild.ProjectEnvironm projectEnv.Type = aws.String(v.(string)) } + if v, ok := envConfig["certificate"]; ok && v.(string) != "" { + projectEnv.Certificate = aws.String(v.(string)) + } + if v := envConfig["environment_variable"]; v != nil { envVariables := v.([]interface{}) if len(envVariables) > 0 { @@ -515,37 +685,61 @@ func expandCodeBuildVpcConfig(rawVpcConfig []interface{}) *codebuild.VpcConfig { return &vpcConfig } +func expandProjectSecondarySources(d *schema.ResourceData) []*codebuild.ProjectSource { + configs := d.Get("secondary_sources").(*schema.Set).List() + + if len(configs) == 0 { + return nil + } + + sources := make([]*codebuild.ProjectSource, 0) + + for _, config := range configs { + source := expandProjectSourceData(config.(map[string]interface{})) + sources = append(sources, &source) + } + + return sources +} + func expandProjectSource(d *schema.ResourceData) codebuild.ProjectSource { configs := d.Get("source").(*schema.Set).List() - projectSource := codebuild.ProjectSource{} - for _, configRaw := range configs { - data := configRaw.(map[string]interface{}) + data := configs[0].(map[string]interface{}) + return expandProjectSourceData(data) +} - sourceType := data["type"].(string) +func expandProjectSourceData(data map[string]interface{}) codebuild.ProjectSource { + sourceType := data["type"].(string) - projectSource = codebuild.ProjectSource{ - Buildspec: aws.String(data["buildspec"].(string)), - GitCloneDepth: aws.Int64(int64(data["git_clone_depth"].(int))), - InsecureSsl: aws.Bool(data["insecure_ssl"].(bool)), - Location: aws.String(data["location"].(string)), - Type: aws.String(sourceType), - } + projectSource := codebuild.ProjectSource{ + Buildspec: aws.String(data["buildspec"].(string)), + GitCloneDepth: aws.Int64(int64(data["git_clone_depth"].(int))), + InsecureSsl: aws.Bool(data["insecure_ssl"].(bool)), + Type: aws.String(sourceType), + } - // Only valid for GITHUB source type, e.g. - // InvalidInputException: Source type GITHUB_ENTERPRISE does not support ReportBuildStatus - if sourceType == codebuild.SourceTypeGithub { - projectSource.ReportBuildStatus = aws.Bool(data["report_build_status"].(bool)) - } + if data["source_identifier"] != nil { + projectSource.SourceIdentifier = aws.String(data["source_identifier"].(string)) + } - if v, ok := data["auth"]; ok { - if len(v.(*schema.Set).List()) > 0 { - auth := v.(*schema.Set).List()[0].(map[string]interface{}) + if data["location"].(string) != "" { + projectSource.Location = aws.String(data["location"].(string)) + } - projectSource.Auth = &codebuild.SourceAuth{ - Type: aws.String(auth["type"].(string)), - Resource: aws.String(auth["resource"].(string)), - } + // Only valid for BITBUCKET and GITHUB source type, e.g. + // InvalidInputException: Source type GITHUB_ENTERPRISE does not support ReportBuildStatus + if sourceType == codebuild.SourceTypeBitbucket || sourceType == codebuild.SourceTypeGithub { + projectSource.ReportBuildStatus = aws.Bool(data["report_build_status"].(bool)) + } + + if v, ok := data["auth"]; ok { + if len(v.(*schema.Set).List()) > 0 { + auth := v.(*schema.Set).List()[0].(map[string]interface{}) + + projectSource.Auth = &codebuild.SourceAuth{ + Type: aws.String(auth["type"].(string)), + Resource: aws.String(auth["resource"].(string)), } } } @@ -563,7 +757,7 @@ func resourceAwsCodeBuildProjectRead(d *schema.ResourceData, meta interface{}) e }) if err != nil { - return fmt.Errorf("[ERROR] Error retreiving Projects: %q", err) + return fmt.Errorf("Error retreiving Projects: %q", err) } // if nothing was found, then return no state @@ -587,6 +781,14 @@ func resourceAwsCodeBuildProjectRead(d *schema.ResourceData, meta interface{}) e return err } + if err := d.Set("secondary_artifacts", flattenAwsCodeBuildProjectSecondaryArtifacts(project.SecondaryArtifacts)); err != nil { + return err + } + + if err := d.Set("secondary_sources", flattenAwsCodeBuildProjectSecondarySources(project.SecondarySources)); err != nil { + return err + } + if err := d.Set("source", flattenAwsCodeBuildProjectSource(project.Source)); err != nil { return err } @@ -595,6 +797,7 @@ func resourceAwsCodeBuildProjectRead(d *schema.ResourceData, meta interface{}) e return err } + d.Set("arn", project.Arn) d.Set("description", project.Description) d.Set("encryption_key", project.EncryptionKey) d.Set("name", project.Name) @@ -637,6 +840,16 @@ func resourceAwsCodeBuildProjectUpdate(d *schema.ResourceData, meta interface{}) params.Artifacts = &projectArtifacts } + if d.HasChange("secondary_sources") { + projectSecondarySources := expandProjectSecondarySources(d) + params.SecondarySources = projectSecondarySources + } + + if d.HasChange("secondary_artifacts") { + projectSecondaryArtifacts := expandProjectSecondaryArtifacts(d) + params.SecondaryArtifacts = projectSecondaryArtifacts + } + if d.HasChange("vpc_config") { params.VpcConfig = expandCodeBuildVpcConfig(d.Get("vpc_config").([]interface{})) } @@ -717,16 +930,39 @@ func resourceAwsCodeBuildProjectDelete(d *schema.ResourceData, meta interface{}) return nil } +func flattenAwsCodeBuildProjectSecondaryArtifacts(artifactsList []*codebuild.ProjectArtifacts) *schema.Set { + artifactSet := schema.Set{ + F: resourceAwsCodeBuildProjectArtifactsHash, + } + + for _, artifacts := range artifactsList { + artifactSet.Add(flattenAwsCodeBuildProjectArtifactsData(*artifacts)) + } + return &artifactSet +} + func flattenAwsCodeBuildProjectArtifacts(artifacts *codebuild.ProjectArtifacts) *schema.Set { artifactSet := schema.Set{ F: resourceAwsCodeBuildProjectArtifactsHash, } + values := flattenAwsCodeBuildProjectArtifactsData(*artifacts) + + artifactSet.Add(values) + + return &artifactSet +} + +func flattenAwsCodeBuildProjectArtifactsData(artifacts codebuild.ProjectArtifacts) map[string]interface{} { values := map[string]interface{}{} values["type"] = *artifacts.Type + if artifacts.ArtifactIdentifier != nil { + values["artifact_identifier"] = *artifacts.ArtifactIdentifier + } + if artifacts.EncryptionDisabled != nil { values["encryption_disabled"] = *artifacts.EncryptionDisabled } @@ -749,10 +985,7 @@ func flattenAwsCodeBuildProjectArtifacts(artifacts *codebuild.ProjectArtifacts) if artifacts.Path != nil { values["path"] = *artifacts.Path } - - artifactSet.Add(values) - - return &artifactSet + return values } func flattenAwsCodebuildProjectCache(cache *codebuild.ProjectCache) []interface{} { @@ -774,6 +1007,7 @@ func flattenAwsCodeBuildProjectEnvironment(environment *codebuild.ProjectEnviron envConfig["type"] = *environment.Type envConfig["compute_type"] = *environment.ComputeType envConfig["image"] = *environment.Image + envConfig["certificate"] = aws.StringValue(environment.Certificate) envConfig["privileged_mode"] = *environment.PrivilegedMode if environment.EnvironmentVariables != nil { @@ -784,8 +1018,25 @@ func flattenAwsCodeBuildProjectEnvironment(environment *codebuild.ProjectEnviron } +func flattenAwsCodeBuildProjectSecondarySources(sourceList []*codebuild.ProjectSource) []interface{} { + l := make([]interface{}, 0) + + for _, source := range sourceList { + l = append(l, flattenAwsCodeBuildProjectSourceData(source)) + } + + return l +} + func flattenAwsCodeBuildProjectSource(source *codebuild.ProjectSource) []interface{} { l := make([]interface{}, 1) + + l[0] = flattenAwsCodeBuildProjectSourceData(source) + + return l +} + +func flattenAwsCodeBuildProjectSourceData(source *codebuild.ProjectSource) interface{} { m := map[string]interface{}{ "buildspec": aws.StringValue(source.Buildspec), "location": aws.StringValue(source.Location), @@ -799,9 +1050,11 @@ func flattenAwsCodeBuildProjectSource(source *codebuild.ProjectSource) []interfa m["auth"] = schema.NewSet(resourceAwsCodeBuildProjectSourceAuthHash, []interface{}{sourceAuthToMap(source.Auth)}) } - l[0] = m + if source.SourceIdentifier != nil { + m["source_identifier"] = aws.StringValue(source.SourceIdentifier) + } - return l + return m } func flattenAwsCodeBuildVpcConfig(vpcConfig *codebuild.VpcConfig) []interface{} { @@ -823,6 +1076,9 @@ func resourceAwsCodeBuildProjectArtifactsHash(v interface{}) int { buf.WriteString(fmt.Sprintf("%s-", m["type"].(string))) + if v, ok := m["artifact_identifier"]; ok { + buf.WriteString(fmt.Sprintf("%s:", v.(string))) + } return hashcode.String(buf.String()) } @@ -839,6 +1095,9 @@ func resourceAwsCodeBuildProjectEnvironmentHash(v interface{}) int { buf.WriteString(fmt.Sprintf("%s-", computeType)) buf.WriteString(fmt.Sprintf("%s-", image)) buf.WriteString(fmt.Sprintf("%t-", privilegedMode)) + if v, ok := m["certificate"]; ok && v.(string) != "" { + buf.WriteString(fmt.Sprintf("%s-", v.(string))) + } for _, e := range environmentVariables { if e != nil { // Old statefiles might have nil values in them ev := e.(map[string]interface{}) @@ -859,6 +1118,9 @@ func resourceAwsCodeBuildProjectSourceHash(v interface{}) int { m := v.(map[string]interface{}) buf.WriteString(fmt.Sprintf("%s-", m["type"].(string))) + if v, ok := m["source_identifier"]; ok { + buf.WriteString(fmt.Sprintf("%s-", strconv.Itoa(v.(int)))) + } if v, ok := m["buildspec"]; ok { buf.WriteString(fmt.Sprintf("%s-", v.(string))) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codebuild_project_migrate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codebuild_project_migrate.go deleted file mode 100644 index 97d7a9ff24..0000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codebuild_project_migrate.go +++ /dev/null @@ -1,36 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/hashicorp/terraform/terraform" -) - -func resourceAwsCodebuildMigrateState( - v int, is *terraform.InstanceState, meta interface{}) (*terraform.InstanceState, error) { - switch v { - case 0: - log.Println("[INFO] Found AWS Codebuild State v0; migrating to v1") - return migrateCodebuildStateV0toV1(is) - default: - return is, fmt.Errorf("Unexpected schema version: %d", v) - } -} - -func migrateCodebuildStateV0toV1(is *terraform.InstanceState) (*terraform.InstanceState, error) { - if is.Empty() { - log.Println("[DEBUG] Empty InstanceState; nothing to migrate.") - return is, nil - } - - log.Printf("[DEBUG] Attributes before migration: %#v", is.Attributes) - - if is.Attributes["timeout"] != "" { - is.Attributes["build_timeout"] = strings.TrimSpace(is.Attributes["timeout"]) - } - - log.Printf("[DEBUG] Attributes after migration: %#v", is.Attributes) - return is, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codecommit_repository.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codecommit_repository.go index 57cdfb4a3e..1cb77a1d9f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codecommit_repository.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codecommit_repository.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/codecommit" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsCodeCommitRepository() *schema.Resource { @@ -24,13 +25,13 @@ func resourceAwsCodeCommitRepository() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: validateMaxLength(100), + ValidateFunc: validation.StringLenBetween(0, 100), }, "description": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateMaxLength(1000), + ValidateFunc: validation.StringLenBetween(0, 1000), }, "arn": { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codecommit_trigger.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codecommit_trigger.go index 9ac1f5fe19..bbb77ed254 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codecommit_trigger.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codecommit_trigger.go @@ -134,7 +134,7 @@ func resourceAwsCodeCommitTriggerDelete(d *schema.ResourceData, meta interface{} func expandAwsCodeCommitTriggers(configured []interface{}) []*codecommit.RepositoryTrigger { triggers := make([]*codecommit.RepositoryTrigger, 0, len(configured)) // Loop over our configured triggers and create - // an array of aws-sdk-go compatabile objects + // an array of aws-sdk-go compatible objects for _, lRaw := range configured { data := lRaw.(map[string]interface{}) t := &codecommit.RepositoryTrigger{ diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_app.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_app.go index 6c539c382b..97a129c216 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_app.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_app.go @@ -19,6 +19,38 @@ func resourceAwsCodeDeployApp() *schema.Resource { Read: resourceAwsCodeDeployAppRead, Update: resourceAwsCodeDeployUpdate, Delete: resourceAwsCodeDeployAppDelete, + Importer: &schema.ResourceImporter{ + State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + idParts := strings.Split(d.Id(), ":") + + if len(idParts) == 2 { + return []*schema.ResourceData{d}, nil + } + + applicationName := d.Id() + conn := meta.(*AWSClient).codedeployconn + + input := &codedeploy.GetApplicationInput{ + ApplicationName: aws.String(applicationName), + } + + log.Printf("[DEBUG] Reading CodeDeploy Application: %s", input) + output, err := conn.GetApplication(input) + + if err != nil { + return []*schema.ResourceData{}, err + } + + if output == nil || output.Application == nil { + return []*schema.ResourceData{}, fmt.Errorf("error reading CodeDeploy Application (%s): empty response", applicationName) + } + + d.SetId(fmt.Sprintf("%s:%s", aws.StringValue(output.Application.ApplicationId), applicationName)) + d.Set("name", applicationName) + + return []*schema.ResourceData{d}, nil + }, + }, Schema: map[string]*schema.Schema{ "name": { @@ -77,7 +109,7 @@ func resourceAwsCodeDeployAppCreate(d *schema.ResourceData, meta interface{}) er func resourceAwsCodeDeployAppRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).codedeployconn - _, application := resourceAwsCodeDeployAppParseId(d.Id()) + application := resourceAwsCodeDeployAppParseId(d.Id()) log.Printf("[DEBUG] Reading CodeDeploy application %s", application) resp, err := conn.GetApplication(&codedeploy.GetApplicationInput{ ApplicationName: aws.String(application), @@ -135,7 +167,8 @@ func resourceAwsCodeDeployAppDelete(d *schema.ResourceData, meta interface{}) er return nil } -func resourceAwsCodeDeployAppParseId(id string) (string, string) { +func resourceAwsCodeDeployAppParseId(id string) string { parts := strings.SplitN(id, ":", 2) - return parts[0], parts[1] + // We currently omit the application ID as it is not currently used anywhere + return parts[1] } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_config.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_config.go index 0c5e1fce79..e88bef0206 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_config.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_config.go @@ -16,6 +16,9 @@ func resourceAwsCodeDeployDeploymentConfig() *schema.Resource { Create: resourceAwsCodeDeployDeploymentConfigCreate, Read: resourceAwsCodeDeployDeploymentConfigRead, Delete: resourceAwsCodeDeployDeploymentConfigDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "deployment_config_name": { @@ -95,7 +98,7 @@ func resourceAwsCodeDeployDeploymentConfigRead(d *schema.ResourceData, meta inte } if resp.DeploymentConfigInfo == nil { - return fmt.Errorf("[ERROR] Cannot find DeploymentConfig %q", d.Id()) + return fmt.Errorf("Cannot find DeploymentConfig %q", d.Id()) } if err := d.Set("minimum_healthy_hosts", flattenAwsCodeDeployConfigMinimumHealthHosts(resp.DeploymentConfigInfo.MinimumHealthyHosts)); err != nil { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_group.go index cc28bd0529..5e034d3406 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codedeploy_deployment_group.go @@ -6,6 +6,7 @@ import ( "log" "regexp" "sort" + "strings" "time" "github.com/hashicorp/terraform/helper/hashcode" @@ -24,19 +25,54 @@ func resourceAwsCodeDeployDeploymentGroup() *schema.Resource { Read: resourceAwsCodeDeployDeploymentGroupRead, Update: resourceAwsCodeDeployDeploymentGroupUpdate, Delete: resourceAwsCodeDeployDeploymentGroupDelete, + Importer: &schema.ResourceImporter{ + State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + idParts := strings.Split(d.Id(), ":") + + if len(idParts) != 2 { + return []*schema.ResourceData{}, fmt.Errorf("expected ID in format ApplicationName:DeploymentGroupName, received: %s", d.Id()) + } + + applicationName := idParts[0] + deploymentGroupName := idParts[1] + conn := meta.(*AWSClient).codedeployconn + + input := &codedeploy.GetDeploymentGroupInput{ + ApplicationName: aws.String(applicationName), + DeploymentGroupName: aws.String(deploymentGroupName), + } + + log.Printf("[DEBUG] Reading CodeDeploy Application: %s", input) + output, err := conn.GetDeploymentGroup(input) + + if err != nil { + return []*schema.ResourceData{}, err + } + + if output == nil || output.DeploymentGroupInfo == nil { + return []*schema.ResourceData{}, fmt.Errorf("error reading CodeDeploy Application (%s): empty response", d.Id()) + } + + d.SetId(aws.StringValue(output.DeploymentGroupInfo.DeploymentGroupId)) + d.Set("app_name", applicationName) + d.Set("deployment_group_name", deploymentGroupName) + + return []*schema.ResourceData{d}, nil + }, + }, Schema: map[string]*schema.Schema{ "app_name": { Type: schema.TypeString, Required: true, - ValidateFunc: validateMaxLength(100), + ValidateFunc: validation.StringLenBetween(0, 100), }, "deployment_group_name": { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: validateMaxLength(100), + ValidateFunc: validation.StringLenBetween(0, 100), }, "deployment_style": { @@ -242,7 +278,7 @@ func resourceAwsCodeDeployDeploymentGroup() *schema.Resource { Type: schema.TypeString, Optional: true, Default: "CodeDeployDefault.OneAtATime", - ValidateFunc: validateMaxLength(100), + ValidateFunc: validation.StringLenBetween(0, 100), }, "ec2_tag_set": { @@ -375,13 +411,15 @@ func resourceAwsCodeDeployDeploymentGroup() *schema.Resource { func resourceAwsCodeDeployDeploymentGroupCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).codedeployconn - application := d.Get("app_name").(string) - deploymentGroup := d.Get("deployment_group_name").(string) + // required fields + applicationName := d.Get("app_name").(string) + deploymentGroupName := d.Get("deployment_group_name").(string) + serviceRoleArn := d.Get("service_role_arn").(string) input := codedeploy.CreateDeploymentGroupInput{ - ApplicationName: aws.String(application), - DeploymentGroupName: aws.String(deploymentGroup), - ServiceRoleArn: aws.String(d.Get("service_role_arn").(string)), + ApplicationName: aws.String(applicationName), + DeploymentGroupName: aws.String(deploymentGroupName), + ServiceRoleArn: aws.String(serviceRoleArn), } if attr, ok := d.GetOk("deployment_style"); ok { @@ -430,36 +468,15 @@ func resourceAwsCodeDeployDeploymentGroupCreate(d *schema.ResourceData, meta int input.BlueGreenDeploymentConfiguration = expandBlueGreenDeploymentConfig(attr.([]interface{})) } - // Retry to handle IAM role eventual consistency. + log.Printf("[DEBUG] Creating CodeDeploy DeploymentGroup %s", applicationName) + var resp *codedeploy.CreateDeploymentGroupOutput var err error err = resource.Retry(5*time.Minute, func() *resource.RetryError { resp, err = conn.CreateDeploymentGroup(&input) - if err != nil { - retry := false - codedeployErr, ok := err.(awserr.Error) - if !ok { - return resource.NonRetryableError(err) - } - if codedeployErr.Code() == "InvalidRoleException" { - retry = true - } - if codedeployErr.Code() == "InvalidTriggerConfigException" { - r := regexp.MustCompile("^Topic ARN .+ is not valid$") - if r.MatchString(codedeployErr.Message()) { - retry = true - } - } - if retry { - log.Printf("[DEBUG] Trying to create deployment group again: %q", - codedeployErr.Message()) - return resource.RetryableError(err) - } - - return resource.NonRetryableError(err) - } - return nil + return handleCreateError(err) }) + if err != nil { return err } @@ -473,10 +490,12 @@ func resourceAwsCodeDeployDeploymentGroupRead(d *schema.ResourceData, meta inter conn := meta.(*AWSClient).codedeployconn log.Printf("[DEBUG] Reading CodeDeploy DeploymentGroup %s", d.Id()) + resp, err := conn.GetDeploymentGroup(&codedeploy.GetDeploymentGroupInput{ ApplicationName: aws.String(d.Get("app_name").(string)), DeploymentGroupName: aws.String(d.Get("deployment_group_name").(string)), }) + if err != nil { if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "DeploymentGroupDoesNotExistException" { log.Printf("[INFO] CodeDeployment DeploymentGroup %s not found", d.Get("deployment_group_name").(string)) @@ -488,11 +507,18 @@ func resourceAwsCodeDeployDeploymentGroupRead(d *schema.ResourceData, meta inter } d.Set("app_name", resp.DeploymentGroupInfo.ApplicationName) - d.Set("autoscaling_groups", resp.DeploymentGroupInfo.AutoScalingGroups) d.Set("deployment_config_name", resp.DeploymentGroupInfo.DeploymentConfigName) d.Set("deployment_group_name", resp.DeploymentGroupInfo.DeploymentGroupName) d.Set("service_role_arn", resp.DeploymentGroupInfo.ServiceRoleArn) + autoScalingGroups := make([]string, len(resp.DeploymentGroupInfo.AutoScalingGroups)) + for i, autoScalingGroup := range resp.DeploymentGroupInfo.AutoScalingGroups { + autoScalingGroups[i] = aws.StringValue(autoScalingGroup.Name) + } + if err := d.Set("autoscaling_groups", autoScalingGroups); err != nil { + return fmt.Errorf("error setting autoscaling_groups: %s", err) + } + if err := d.Set("deployment_style", flattenDeploymentStyle(resp.DeploymentGroupInfo.DeploymentStyle)); err != nil { return err } @@ -535,20 +561,15 @@ func resourceAwsCodeDeployDeploymentGroupRead(d *schema.ResourceData, meta inter func resourceAwsCodeDeployDeploymentGroupUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).codedeployconn - input := codedeploy.UpdateDeploymentGroupInput{ - ApplicationName: aws.String(d.Get("app_name").(string)), - CurrentDeploymentGroupName: aws.String(d.Get("deployment_group_name").(string)), - ServiceRoleArn: aws.String(d.Get("service_role_arn").(string)), - } + // required fields + applicationName := d.Get("app_name").(string) + deploymentGroupName := d.Get("deployment_group_name").(string) + serviceRoleArn := d.Get("service_role_arn").(string) - if d.HasChange("autoscaling_groups") { - _, n := d.GetChange("autoscaling_groups") - input.AutoScalingGroups = expandStringList(n.(*schema.Set).List()) - } - - if d.HasChange("deployment_config_name") { - _, n := d.GetChange("deployment_config_name") - input.DeploymentConfigName = aws.String(n.(string)) + input := codedeploy.UpdateDeploymentGroupInput{ + ApplicationName: aws.String(applicationName), + CurrentDeploymentGroupName: aws.String(deploymentGroupName), + ServiceRoleArn: aws.String(serviceRoleArn), } if d.HasChange("deployment_group_name") { @@ -561,6 +582,17 @@ func resourceAwsCodeDeployDeploymentGroupUpdate(d *schema.ResourceData, meta int input.DeploymentStyle = expandDeploymentStyle(n.([]interface{})) } + if d.HasChange("deployment_config_name") { + _, n := d.GetChange("deployment_config_name") + input.DeploymentConfigName = aws.String(n.(string)) + } + + // include (original or new) autoscaling groups when blue_green_deployment_config changes + if d.HasChange("autoscaling_groups") || d.HasChange("blue_green_deployment_config") { + _, n := d.GetChange("autoscaling_groups") + input.AutoScalingGroups = expandStringList(n.(*schema.Set).List()) + } + // TagFilters aren't like tags. They don't append. They simply replace. if d.HasChange("on_premises_instance_tag_filter") { _, n := d.GetChange("on_premises_instance_tag_filter") @@ -607,33 +639,11 @@ func resourceAwsCodeDeployDeploymentGroupUpdate(d *schema.ResourceData, meta int } log.Printf("[DEBUG] Updating CodeDeploy DeploymentGroup %s", d.Id()) - // Retry to handle IAM role eventual consistency. - err := resource.Retry(5*time.Minute, func() *resource.RetryError { - _, err := conn.UpdateDeploymentGroup(&input) - if err != nil { - retry := false - codedeployErr, ok := err.(awserr.Error) - if !ok { - return resource.NonRetryableError(err) - } - if codedeployErr.Code() == "InvalidRoleException" { - retry = true - } - if codedeployErr.Code() == "InvalidTriggerConfigException" { - r := regexp.MustCompile("^Topic ARN .+ is not valid$") - if r.MatchString(codedeployErr.Message()) { - retry = true - } - } - if retry { - log.Printf("[DEBUG] Retrying Code Deployment Group Update: %q", - codedeployErr.Message()) - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil + var err error + err = resource.Retry(5*time.Minute, func() *resource.RetryError { + _, err = conn.UpdateDeploymentGroup(&input) + return handleUpdateError(err) }) if err != nil { @@ -651,6 +661,7 @@ func resourceAwsCodeDeployDeploymentGroupDelete(d *schema.ResourceData, meta int ApplicationName: aws.String(d.Get("app_name").(string)), DeploymentGroupName: aws.String(d.Get("deployment_group_name").(string)), }) + if err != nil { return err } @@ -658,6 +669,44 @@ func resourceAwsCodeDeployDeploymentGroupDelete(d *schema.ResourceData, meta int return nil } +func handleCreateError(err error) *resource.RetryError { + return handleCodeDeployApiError(err, "create") +} + +func handleUpdateError(err error) *resource.RetryError { + return handleCodeDeployApiError(err, "update") +} + +func handleCodeDeployApiError(err error, operation string) *resource.RetryError { + if err == nil { + return nil + } + + retry := false + codedeployErr, ok := err.(awserr.Error) + if !ok { + return resource.NonRetryableError(err) + } + + if codedeployErr.Code() == "InvalidRoleException" { + retry = true + } + + if codedeployErr.Code() == "InvalidTriggerConfigException" { + r := regexp.MustCompile("^Topic ARN .+ is not valid$") + if r.MatchString(codedeployErr.Message()) { + retry = true + } + } + + if retry { + log.Printf("[DEBUG] Trying to %s DeploymentGroup again: %q", operation, codedeployErr.Message()) + return resource.RetryableError(err) + } + + return resource.NonRetryableError(err) +} + // buildOnPremTagFilters converts raw schema lists into a list of // codedeploy.TagFilters. func buildOnPremTagFilters(configured []interface{}) []*codedeploy.TagFilter { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codepipeline.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codepipeline.go index b9148fff8c..654ef12c4b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codepipeline.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codepipeline.go @@ -165,15 +165,6 @@ func resourceAwsCodePipeline() *schema.Resource { } } -func validateAwsCodePipelineStageActionConfiguration(v interface{}, k string) (ws []string, errors []error) { - for k := range v.(map[string]interface{}) { - if k == "OAuthToken" { - errors = append(errors, fmt.Errorf("CodePipeline: OAuthToken should be set as environment variable 'GITHUB_TOKEN'")) - } - } - return -} - func resourceAwsCodePipelineCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).codepipelineconn params := &codepipeline.CreatePipelineInput{ @@ -193,10 +184,10 @@ func resourceAwsCodePipelineCreate(d *schema.ResourceData, meta interface{}) err return resource.NonRetryableError(err) }) if err != nil { - return fmt.Errorf("[ERROR] Error creating CodePipeline: %s", err) + return fmt.Errorf("Error creating CodePipeline: %s", err) } if resp.Pipeline == nil { - return fmt.Errorf("[ERROR] Error creating CodePipeline: invalid response from AWS") + return fmt.Errorf("Error creating CodePipeline: invalid response from AWS") } d.SetId(*resp.Pipeline.Name) @@ -440,7 +431,7 @@ func resourceAwsCodePipelineRead(d *schema.ResourceData, meta interface{}) error d.SetId("") return nil } - return fmt.Errorf("[ERROR] Error retreiving Pipeline: %q", err) + return fmt.Errorf("Error retreiving Pipeline: %q", err) } metadata := resp.Metadata pipeline := resp.Pipeline diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codepipeline_webhook.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codepipeline_webhook.go new file mode 100644 index 0000000000..99357ca1bb --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_codepipeline_webhook.go @@ -0,0 +1,287 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/codepipeline" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsCodePipelineWebhook() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsCodePipelineWebhookCreate, + Read: resourceAwsCodePipelineWebhookRead, + Update: nil, + Delete: resourceAwsCodePipelineWebhookDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "authentication": { + Type: schema.TypeString, + ForceNew: true, + Required: true, + ValidateFunc: validation.StringInSlice([]string{ + codepipeline.WebhookAuthenticationTypeGithubHmac, + codepipeline.WebhookAuthenticationTypeIp, + codepipeline.WebhookAuthenticationTypeUnauthenticated, + }, false), + }, + "authentication_configuration": { + Type: schema.TypeList, + MaxItems: 1, + MinItems: 1, + Optional: true, + ForceNew: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "secret_token": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "allowed_ip_range": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.CIDRNetwork(0, 32), + }, + }, + }, + }, + "filter": { + Type: schema.TypeSet, + ForceNew: true, + Required: true, + MinItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "json_path": { + Type: schema.TypeString, + Required: true, + }, + + "match_equals": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + "url": { + Type: schema.TypeString, + Computed: true, + }, + + "target_action": { + Type: schema.TypeString, + ForceNew: true, + Required: true, + }, + "target_pipeline": { + Type: schema.TypeString, + ForceNew: true, + Required: true, + }, + }, + } +} + +func extractCodePipelineWebhookRules(filters *schema.Set) []*codepipeline.WebhookFilterRule { + var rules []*codepipeline.WebhookFilterRule + + for _, f := range filters.List() { + r := f.(map[string]interface{}) + filter := codepipeline.WebhookFilterRule{ + JsonPath: aws.String(r["json_path"].(string)), + MatchEquals: aws.String(r["match_equals"].(string)), + } + + rules = append(rules, &filter) + } + + return rules +} + +func extractCodePipelineWebhookAuthConfig(authType string, authConfig map[string]interface{}) *codepipeline.WebhookAuthConfiguration { + var conf codepipeline.WebhookAuthConfiguration + switch authType { + case codepipeline.WebhookAuthenticationTypeIp: + conf.AllowedIPRange = aws.String(authConfig["allowed_ip_range"].(string)) + break + case codepipeline.WebhookAuthenticationTypeGithubHmac: + conf.SecretToken = aws.String(authConfig["secret_token"].(string)) + break + } + + return &conf +} + +func resourceAwsCodePipelineWebhookCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).codepipelineconn + authType := d.Get("authentication").(string) + + var authConfig map[string]interface{} + if v, ok := d.GetOk("authentication_configuration"); ok { + l := v.([]interface{}) + authConfig = l[0].(map[string]interface{}) + } + + request := &codepipeline.PutWebhookInput{ + Webhook: &codepipeline.WebhookDefinition{ + Authentication: aws.String(authType), + Filters: extractCodePipelineWebhookRules(d.Get("filter").(*schema.Set)), + Name: aws.String(d.Get("name").(string)), + TargetAction: aws.String(d.Get("target_action").(string)), + TargetPipeline: aws.String(d.Get("target_pipeline").(string)), + AuthenticationConfiguration: extractCodePipelineWebhookAuthConfig(authType, authConfig), + }, + } + + webhook, err := conn.PutWebhook(request) + if err != nil { + return fmt.Errorf("Error creating webhook: %s", err) + } + + d.SetId(aws.StringValue(webhook.Webhook.Arn)) + + return resourceAwsCodePipelineWebhookRead(d, meta) +} + +func getCodePipelineWebhook(conn *codepipeline.CodePipeline, arn string) (*codepipeline.ListWebhookItem, error) { + var nextToken string + + for { + input := &codepipeline.ListWebhooksInput{ + MaxResults: aws.Int64(int64(60)), + } + if nextToken != "" { + input.NextToken = aws.String(nextToken) + } + + out, err := conn.ListWebhooks(input) + if err != nil { + return nil, err + } + + for _, w := range out.Webhooks { + if arn == aws.StringValue(w.Arn) { + return w, nil + } + } + + if out.NextToken == nil { + break + } + + nextToken = aws.StringValue(out.NextToken) + } + + return nil, &resource.NotFoundError{ + Message: fmt.Sprintf("No webhook with ARN %s found", arn), + } +} + +func flattenCodePipelineWebhookFilters(filters []*codepipeline.WebhookFilterRule) []interface{} { + results := []interface{}{} + for _, filter := range filters { + f := map[string]interface{}{ + "json_path": aws.StringValue(filter.JsonPath), + "match_equals": aws.StringValue(filter.MatchEquals), + } + results = append(results, f) + } + + return results +} + +func flattenCodePipelineWebhookAuthenticationConfiguration(authConfig *codepipeline.WebhookAuthConfiguration) []interface{} { + conf := map[string]interface{}{} + if authConfig.AllowedIPRange != nil { + conf["allowed_ip_range"] = aws.StringValue(authConfig.AllowedIPRange) + } + + if authConfig.SecretToken != nil { + conf["secret_token"] = aws.StringValue(authConfig.SecretToken) + } + + var results []interface{} + if len(conf) > 0 { + results = append(results, conf) + } + + return results +} + +func resourceAwsCodePipelineWebhookRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).codepipelineconn + + arn := d.Id() + webhook, err := getCodePipelineWebhook(conn, arn) + + if isResourceNotFoundError(err) { + log.Printf("[WARN] CodePipeline Webhook (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if err != nil { + return fmt.Errorf("error getting CodePipeline Webhook (%s): %s", d.Id(), err) + } + + name := aws.StringValue(webhook.Definition.Name) + if name == "" { + return fmt.Errorf("Webhook not found: %s", arn) + } + + d.Set("name", name) + d.Set("url", aws.StringValue(webhook.Url)) + + if err := d.Set("target_action", aws.StringValue(webhook.Definition.TargetAction)); err != nil { + return err + } + + if err := d.Set("target_pipeline", aws.StringValue(webhook.Definition.TargetPipeline)); err != nil { + return err + } + + if err := d.Set("authentication", aws.StringValue(webhook.Definition.Authentication)); err != nil { + return err + } + + if err := d.Set("authentication_configuration", flattenCodePipelineWebhookAuthenticationConfiguration(webhook.Definition.AuthenticationConfiguration)); err != nil { + return fmt.Errorf("error setting authentication_configuration: %s", err) + } + + if err := d.Set("filter", flattenCodePipelineWebhookFilters(webhook.Definition.Filters)); err != nil { + return fmt.Errorf("error setting filter: %s", err) + } + + return nil +} + +func resourceAwsCodePipelineWebhookDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).codepipelineconn + name := d.Get("name").(string) + + input := codepipeline.DeleteWebhookInput{ + Name: &name, + } + _, err := conn.DeleteWebhook(&input) + + if err != nil { + return fmt.Errorf("Could not delete webhook: %s", err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_pool.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_pool.go index 8730192c9a..bc043d111c 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_pool.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_pool.go @@ -170,19 +170,19 @@ func resourceAwsCognitoIdentityPoolRead(d *schema.ResourceData, meta interface{} d.Set("developer_provider_name", ip.DeveloperProviderName) if err := d.Set("cognito_identity_providers", flattenCognitoIdentityProviders(ip.CognitoIdentityProviders)); err != nil { - return fmt.Errorf("[DEBUG] Error setting cognito_identity_providers error: %#v", err) + return fmt.Errorf("Error setting cognito_identity_providers error: %#v", err) } if err := d.Set("openid_connect_provider_arns", flattenStringList(ip.OpenIdConnectProviderARNs)); err != nil { - return fmt.Errorf("[DEBUG] Error setting openid_connect_provider_arns error: %#v", err) + return fmt.Errorf("Error setting openid_connect_provider_arns error: %#v", err) } if err := d.Set("saml_provider_arns", flattenStringList(ip.SamlProviderARNs)); err != nil { - return fmt.Errorf("[DEBUG] Error setting saml_provider_arns error: %#v", err) + return fmt.Errorf("Error setting saml_provider_arns error: %#v", err) } if err := d.Set("supported_login_providers", flattenCognitoSupportedLoginProviders(ip.SupportedLoginProviders)); err != nil { - return fmt.Errorf("[DEBUG] Error setting supported_login_providers error: %#v", err) + return fmt.Errorf("Error setting supported_login_providers error: %#v", err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_pool_roles_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_pool_roles_attachment.go index 5e1f5324d9..0b62891cd0 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_pool_roles_attachment.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_identity_pool_roles_attachment.go @@ -5,12 +5,9 @@ import ( "log" "time" - "bytes" - "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/cognitoidentity" - "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" @@ -121,7 +118,7 @@ func resourceAwsCognitoIdentityPoolRolesAttachmentCreate(d *schema.ResourceData, // Validates role keys to be either authenticated or unauthenticated, // since ValidateFunc validates only the value not the key. - if errors := validateCognitoRoles(d.Get("roles").(map[string]interface{}), "roles"); len(errors) > 0 { + if errors := validateCognitoRoles(d.Get("roles").(map[string]interface{})); len(errors) > 0 { return fmt.Errorf("Error validating Roles: %v", errors) } @@ -168,11 +165,11 @@ func resourceAwsCognitoIdentityPoolRolesAttachmentRead(d *schema.ResourceData, m } if err := d.Set("roles", flattenCognitoIdentityPoolRoles(ip.Roles)); err != nil { - return fmt.Errorf("[DEBUG] Error setting roles error: %#v", err) + return fmt.Errorf("Error setting roles error: %#v", err) } if err := d.Set("role_mapping", flattenCognitoIdentityPoolRoleMappingsAttachment(ip.RoleMappings)); err != nil { - return fmt.Errorf("[DEBUG] Error setting role mappings error: %#v", err) + return fmt.Errorf("Error setting role mappings error: %#v", err) } return nil @@ -183,7 +180,7 @@ func resourceAwsCognitoIdentityPoolRolesAttachmentUpdate(d *schema.ResourceData, // Validates role keys to be either authenticated or unauthenticated, // since ValidateFunc validates only the value not the key. - if errors := validateCognitoRoles(d.Get("roles").(map[string]interface{}), "roles"); len(errors) > 0 { + if errors := validateCognitoRoles(d.Get("roles").(map[string]interface{})); len(errors) > 0 { return fmt.Errorf("Error validating Roles: %v", errors) } @@ -263,35 +260,3 @@ func validateRoleMappings(roleMappings []interface{}) []error { return errors } - -func cognitoRoleMappingHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["identity_provider"].(string))) - - return hashcode.String(buf.String()) -} - -func cognitoRoleMappingValueHash(v interface{}) int { - var buf bytes.Buffer - m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["type"].(string))) - if d, ok := m["ambiguous_role_resolution"]; ok { - buf.WriteString(fmt.Sprintf("%s-", d.(string))) - } - - return hashcode.String(buf.String()) -} - -func cognitoRoleMappingRulesConfigurationHash(v interface{}) int { - var buf bytes.Buffer - for _, rule := range v.([]interface{}) { - r := rule.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", r["claim"].(string))) - buf.WriteString(fmt.Sprintf("%s-", r["match_type"].(string))) - buf.WriteString(fmt.Sprintf("%s-", r["role_arn"].(string))) - buf.WriteString(fmt.Sprintf("%s-", r["value"].(string))) - } - - return hashcode.String(buf.String()) -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_group.go index 98f9748ff3..c294665cd2 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_group.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsCognitoUserGroup() *schema.Resource { @@ -27,7 +28,7 @@ func resourceAwsCognitoUserGroup() *schema.Resource { "description": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateMaxLength(2048), + ValidateFunc: validation.StringLenBetween(0, 2048), }, "name": { Type: schema.TypeString, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool.go index 075e43e0d0..33c417f123 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool.go @@ -9,7 +9,6 @@ import ( "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" @@ -617,7 +616,7 @@ func resourceAwsCognitoUserPoolCreate(d *schema.ResourceData, meta interface{}) return resource.NonRetryableError(err) }) if err != nil { - return errwrap.Wrapf("Error creating Cognito User Pool: {{err}}", err) + return fmt.Errorf("Error creating Cognito User Pool: %s", err) } d.SetId(*resp.UserPool.Id) @@ -862,7 +861,7 @@ func resourceAwsCognitoUserPoolUpdate(d *schema.ResourceData, meta interface{}) return resource.NonRetryableError(err) }) if err != nil { - return errwrap.Wrapf("Error updating Cognito User pool: {{err}}", err) + return fmt.Errorf("Error updating Cognito User pool: %s", err) } return resourceAwsCognitoUserPoolRead(d, meta) @@ -880,7 +879,7 @@ func resourceAwsCognitoUserPoolDelete(d *schema.ResourceData, meta interface{}) _, err := conn.DeleteUserPool(params) if err != nil { - return errwrap.Wrapf("Error deleting user pool: {{err}}", err) + return fmt.Errorf("Error deleting user pool: %s", err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool_client.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool_client.go index f589e973b5..e4a3ae596e 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool_client.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool_client.go @@ -7,7 +7,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" ) @@ -214,7 +213,7 @@ func resourceAwsCognitoUserPoolClientCreate(d *schema.ResourceData, meta interfa resp, err := conn.CreateUserPoolClient(params) if err != nil { - return errwrap.Wrapf("Error creating Cognito User Pool Client: {{err}}", err) + return fmt.Errorf("Error creating Cognito User Pool Client: %s", err) } d.SetId(*resp.UserPoolClient.ClientId) @@ -318,7 +317,7 @@ func resourceAwsCognitoUserPoolClientUpdate(d *schema.ResourceData, meta interfa _, err := conn.UpdateUserPoolClient(params) if err != nil { - return errwrap.Wrapf("Error updating Cognito User Pool Client: {{err}}", err) + return fmt.Errorf("Error updating Cognito User Pool Client: %s", err) } return resourceAwsCognitoUserPoolClientRead(d, meta) @@ -337,7 +336,7 @@ func resourceAwsCognitoUserPoolClientDelete(d *schema.ResourceData, meta interfa _, err := conn.DeleteUserPoolClient(params) if err != nil { - return errwrap.Wrapf("Error deleting Cognito User Pool Client: {{err}}", err) + return fmt.Errorf("Error deleting Cognito User Pool Client: %s", err) } return nil @@ -345,7 +344,7 @@ func resourceAwsCognitoUserPoolClientDelete(d *schema.ResourceData, meta interfa func resourceAwsCognitoUserPoolClientImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { if len(strings.Split(d.Id(), "/")) != 2 || len(d.Id()) < 3 { - return []*schema.ResourceData{}, fmt.Errorf("[ERR] Wrong format of resource: %s. Please follow 'user-pool-id/client-id'", d.Id()) + return []*schema.ResourceData{}, fmt.Errorf("Wrong format of resource: %s. Please follow 'user-pool-id/client-id'", d.Id()) } userPoolId := strings.Split(d.Id(), "/")[0] clientId := strings.Split(d.Id(), "/")[1] diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool_domain.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool_domain.go index 08c70a478f..83a35b8c8d 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool_domain.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_cognito_user_pool_domain.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsCognitoUserPoolDomain() *schema.Resource { @@ -25,7 +26,13 @@ func resourceAwsCognitoUserPoolDomain() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: validateCognitoUserPoolDomain, + ValidateFunc: validation.StringLenBetween(1, 63), + }, + "certificate_arn": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validateArn, }, "user_pool_id": { Type: schema.TypeString, @@ -57,10 +64,21 @@ func resourceAwsCognitoUserPoolDomainCreate(d *schema.ResourceData, meta interfa domain := d.Get("domain").(string) + timeout := 1 * time.Minute //Default timeout for a basic domain + params := &cognitoidentityprovider.CreateUserPoolDomainInput{ Domain: aws.String(domain), UserPoolId: aws.String(d.Get("user_pool_id").(string)), } + + if v, ok := d.GetOk("certificate_arn"); ok { + customDomainConfig := &cognitoidentityprovider.CustomDomainConfigType{ + CertificateArn: aws.String(v.(string)), + } + params.CustomDomainConfig = customDomainConfig + timeout = 60 * time.Minute //Custom domains take more time to become active + } + log.Printf("[DEBUG] Creating Cognito User Pool Domain: %s", params) _, err := conn.CreateUserPoolDomain(params) @@ -78,7 +96,8 @@ func resourceAwsCognitoUserPoolDomainCreate(d *schema.ResourceData, meta interfa Target: []string{ cognitoidentityprovider.DomainStatusTypeActive, }, - Timeout: 1 * time.Minute, + MinTimeout: 1 * time.Minute, + Timeout: timeout, Refresh: func() (interface{}, string, error) { domain, err := conn.DescribeUserPoolDomain(&cognitoidentityprovider.DescribeUserPoolDomainInput{ Domain: aws.String(d.Get("domain").(string)), @@ -119,6 +138,10 @@ func resourceAwsCognitoUserPoolDomainRead(d *schema.ResourceData, meta interface desc := domain.DomainDescription d.Set("domain", d.Id()) + d.Set("certificate_arn", "") + if desc.CustomDomainConfig != nil { + d.Set("certificate_arn", desc.CustomDomainConfig.CertificateArn) + } d.Set("aws_account_id", desc.AWSAccountId) d.Set("cloudfront_distribution_arn", desc.CloudFrontDistribution) d.Set("s3_bucket", desc.S3Bucket) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_config_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_config_rule.go index 9f055b5b6d..50d4df7d32 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_config_rule.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_config_rule.go @@ -31,7 +31,7 @@ func resourceAwsConfigConfigRule() *schema.Resource { "name": { Type: schema.TypeString, Required: true, - ValidateFunc: validateMaxLength(64), + ValidateFunc: validation.StringLenBetween(0, 64), }, "rule_id": { Type: schema.TypeString, @@ -44,12 +44,12 @@ func resourceAwsConfigConfigRule() *schema.Resource { "description": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateMaxLength(256), + ValidateFunc: validation.StringLenBetween(0, 256), }, "input_parameters": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, }, "maximum_execution_frequency": { Type: schema.TypeString, @@ -65,7 +65,7 @@ func resourceAwsConfigConfigRule() *schema.Resource { "compliance_resource_id": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateMaxLength(256), + ValidateFunc: validation.StringLenBetween(0, 256), }, "compliance_resource_types": { Type: schema.TypeSet, @@ -73,19 +73,19 @@ func resourceAwsConfigConfigRule() *schema.Resource { MaxItems: 100, Elem: &schema.Schema{ Type: schema.TypeString, - ValidateFunc: validateMaxLength(256), + ValidateFunc: validation.StringLenBetween(0, 256), }, Set: schema.HashString, }, "tag_key": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateMaxLength(128), + ValidateFunc: validation.StringLenBetween(0, 128), }, "tag_value": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateMaxLength(256), + ValidateFunc: validation.StringLenBetween(0, 256), }, }, }, @@ -131,7 +131,7 @@ func resourceAwsConfigConfigRule() *schema.Resource { "source_identifier": { Type: schema.TypeString, Required: true, - ValidateFunc: validateMaxLength(256), + ValidateFunc: validation.StringLenBetween(0, 256), }, }, }, @@ -146,14 +146,10 @@ func resourceAwsConfigConfigRulePut(d *schema.ResourceData, meta interface{}) er name := d.Get("name").(string) ruleInput := configservice.ConfigRule{ ConfigRuleName: aws.String(name), + Scope: expandConfigRuleScope(d.Get("scope").([]interface{})), Source: expandConfigRuleSource(d.Get("source").([]interface{})), } - scopes := d.Get("scope").([]interface{}) - if len(scopes) > 0 { - ruleInput.Scope = expandConfigRuleScope(scopes[0].(map[string]interface{})) - } - if v, ok := d.GetOk("description"); ok { ruleInput.Description = aws.String(v.(string)) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_configuration_aggregator.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_configuration_aggregator.go index 7224331f98..0d48fc83f0 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_configuration_aggregator.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_configuration_aggregator.go @@ -10,6 +10,7 @@ import ( "github.com/hashicorp/terraform/helper/customdiff" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsConfigConfigurationAggregator() *schema.Resource { @@ -43,7 +44,7 @@ func resourceAwsConfigConfigurationAggregator() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: validateMaxLength(256), + ValidateFunc: validation.StringLenBetween(0, 256), }, "account_aggregation_source": { Type: schema.TypeList, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_configuration_recorder.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_configuration_recorder.go index df8319bce3..91dd99886f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_configuration_recorder.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_configuration_recorder.go @@ -5,6 +5,7 @@ import ( "log" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" @@ -28,7 +29,7 @@ func resourceAwsConfigConfigurationRecorder() *schema.Resource { Optional: true, ForceNew: true, Default: "default", - ValidateFunc: validateMaxLength(256), + ValidateFunc: validation.StringLenBetween(0, 256), }, "role_arn": { Type: schema.TypeString, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_delivery_channel.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_delivery_channel.go index f2fbe930ff..95bff5548d 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_delivery_channel.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_config_delivery_channel.go @@ -7,6 +7,7 @@ import ( "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" @@ -30,7 +31,7 @@ func resourceAwsConfigDeliveryChannel() *schema.Resource { Optional: true, ForceNew: true, Default: "default", - ValidateFunc: validateMaxLength(256), + ValidateFunc: validation.StringLenBetween(0, 256), }, "s3_bucket_name": { Type: schema.TypeString, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_customer_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_customer_gateway.go index 7e5dda3b0b..8c54bd8927 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_customer_gateway.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_customer_gateway.go @@ -189,7 +189,7 @@ func resourceAwsCustomerGatewayRead(d *schema.ResourceData, meta interface{}) er } if len(resp.CustomerGateways) != 1 { - return fmt.Errorf("[ERROR] Error finding CustomerGateway: %s", d.Id()) + return fmt.Errorf("Error finding CustomerGateway: %s", d.Id()) } if *resp.CustomerGateways[0].State == "deleted" { @@ -261,16 +261,16 @@ func resourceAwsCustomerGatewayDelete(d *schema.ResourceData, meta interface{}) } if len(resp.CustomerGateways) != 1 { - return resource.RetryableError(fmt.Errorf("[ERROR] Error finding CustomerGateway for delete: %s", d.Id())) + return resource.RetryableError(fmt.Errorf("Error finding CustomerGateway for delete: %s", d.Id())) } switch *resp.CustomerGateways[0].State { case "pending", "available", "deleting": - return resource.RetryableError(fmt.Errorf("[DEBUG] Gateway (%s) in state (%s), retrying", d.Id(), *resp.CustomerGateways[0].State)) + return resource.RetryableError(fmt.Errorf("Gateway (%s) in state (%s), retrying", d.Id(), *resp.CustomerGateways[0].State)) case "deleted": return nil default: - return resource.RetryableError(fmt.Errorf("[DEBUG] Unrecognized state (%s) for Customer Gateway delete on (%s)", *resp.CustomerGateways[0].State, d.Id())) + return resource.RetryableError(fmt.Errorf("Unrecognized state (%s) for Customer Gateway delete on (%s)", *resp.CustomerGateways[0].State, d.Id())) } }) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_cluster.go index f83f37d3e4..87ce086c14 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_cluster.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dax_cluster.go @@ -385,7 +385,7 @@ func resourceAwsDaxClusterUpdate(d *schema.ResourceData, meta interface{}) error log.Printf("[DEBUG] Modifying DAX Cluster (%s), opts:\n%s", d.Id(), req) _, err := conn.UpdateCluster(req) if err != nil { - return fmt.Errorf("[WARN] Error updating DAX cluster (%s), error: %s", d.Id(), err) + return fmt.Errorf("Error updating DAX cluster (%s), error: %s", d.Id(), err) } awaitUpdate = true } @@ -401,7 +401,7 @@ func resourceAwsDaxClusterUpdate(d *schema.ResourceData, meta interface{}) error NewReplicationFactor: aws.Int64(int64(nraw.(int))), }) if err != nil { - return fmt.Errorf("[WARN] Error increasing nodes in DAX cluster %s, error: %s", d.Id(), err) + return fmt.Errorf("Error increasing nodes in DAX cluster %s, error: %s", d.Id(), err) } awaitUpdate = true } @@ -412,7 +412,7 @@ func resourceAwsDaxClusterUpdate(d *schema.ResourceData, meta interface{}) error NewReplicationFactor: aws.Int64(int64(nraw.(int))), }) if err != nil { - return fmt.Errorf("[WARN] Error increasing nodes in DAX cluster %s, error: %s", d.Id(), err) + return fmt.Errorf("Error increasing nodes in DAX cluster %s, error: %s", d.Id(), err) } awaitUpdate = true } @@ -524,7 +524,7 @@ func daxClusterStateRefreshFunc(conn *dax.DAX, clusterID, givenState string, pen } if len(resp.Clusters) == 0 { - return nil, "", fmt.Errorf("[WARN] Error: no DAX clusters found for id (%s)", clusterID) + return nil, "", fmt.Errorf("Error: no DAX clusters found for id (%s)", clusterID) } var c *dax.Cluster @@ -536,7 +536,7 @@ func daxClusterStateRefreshFunc(conn *dax.DAX, clusterID, givenState string, pen } if c == nil { - return nil, "", fmt.Errorf("[WARN] Error: no matching DAX cluster for id (%s)", clusterID) + return nil, "", fmt.Errorf("Error: no matching DAX cluster for id (%s)", clusterID) } // DescribeCluster returns a response without status late on in the diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_instance.go index 9100d9518d..b7cd598ca2 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_instance.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_instance.go @@ -57,6 +57,11 @@ func resourceAwsDbInstance() *schema.Resource { Sensitive: true, }, + "deletion_protection": { + Type: schema.TypeBool, + Optional: true, + }, + "engine": { Type: schema.TypeString, Optional: true, @@ -407,6 +412,16 @@ func resourceAwsDbInstance() *schema.Resource { }, }, + "domain": { + Type: schema.TypeString, + Optional: true, + }, + + "domain_iam_role_name": { + Type: schema.TypeString, + Optional: true, + }, + "tags": tagsSchema(), }, } @@ -456,6 +471,7 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error opts := rds.CreateDBInstanceReadReplicaInput{ AutoMinorVersionUpgrade: aws.Bool(d.Get("auto_minor_version_upgrade").(bool)), CopyTagsToSnapshot: aws.Bool(d.Get("copy_tags_to_snapshot").(bool)), + DeletionProtection: aws.Bool(d.Get("deletion_protection").(bool)), DBInstanceClass: aws.String(d.Get("instance_class").(string)), DBInstanceIdentifier: aws.String(identifier), PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), @@ -583,6 +599,7 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error DBName: aws.String(d.Get("name").(string)), DBInstanceClass: aws.String(d.Get("instance_class").(string)), DBInstanceIdentifier: aws.String(d.Get("identifier").(string)), + DeletionProtection: aws.Bool(d.Get("deletion_protection").(bool)), Engine: aws.String(d.Get("engine").(string)), EngineVersion: aws.String(d.Get("engine_version").(string)), S3BucketName: aws.String(s3_bucket["bucket_name"].(string)), @@ -739,6 +756,7 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error DBInstanceClass: aws.String(d.Get("instance_class").(string)), DBInstanceIdentifier: aws.String(d.Get("identifier").(string)), DBSnapshotIdentifier: aws.String(d.Get("snapshot_identifier").(string)), + DeletionProtection: aws.Bool(d.Get("deletion_protection").(bool)), PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), Tags: tags, } @@ -763,7 +781,7 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error opts.AvailabilityZone = aws.String(attr.(string)) } - if attr, ok := d.GetOk("backup_retention_period"); ok { + if attr, ok := d.GetOkExists("backup_retention_period"); ok { modifyDbInstanceInput.BackupRetentionPeriod = aws.Int64(int64(attr.(int))) requiresModifyDbInstance = true } @@ -777,6 +795,14 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error opts.DBSubnetGroupName = aws.String(attr.(string)) } + if attr, ok := d.GetOk("domain"); ok { + opts.Domain = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("domain_iam_role_name"); ok { + opts.DomainIAMRoleName = aws.String(attr.(string)) + } + if attr, ok := d.GetOk("enabled_cloudwatch_logs_exports"); ok && len(attr.([]interface{})) > 0 { opts.EnableCloudwatchLogsExports = expandStringList(attr.([]interface{})) } @@ -832,9 +858,7 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error } if attr, ok := d.GetOk("parameter_group_name"); ok { - modifyDbInstanceInput.DBParameterGroupName = aws.String(attr.(string)) - requiresModifyDbInstance = true - requiresRebootDbInstance = true + opts.DBParameterGroupName = aws.String(attr.(string)) } if attr, ok := d.GetOk("password"); ok { @@ -903,6 +927,7 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error DBName: aws.String(d.Get("name").(string)), DBInstanceClass: aws.String(d.Get("instance_class").(string)), DBInstanceIdentifier: aws.String(d.Get("identifier").(string)), + DeletionProtection: aws.Bool(d.Get("deletion_protection").(bool)), MasterUsername: aws.String(d.Get("username").(string)), MasterUserPassword: aws.String(d.Get("password").(string)), Engine: aws.String(d.Get("engine").(string)), @@ -1003,6 +1028,14 @@ func resourceAwsDbInstanceCreate(d *schema.ResourceData, meta interface{}) error opts.EnableIAMDatabaseAuthentication = aws.Bool(attr.(bool)) } + if attr, ok := d.GetOk("domain"); ok { + opts.Domain = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("domain_iam_role_name"); ok { + opts.DomainIAMRoleName = aws.String(attr.(string)) + } + log.Printf("[DEBUG] DB Instance create configuration: %#v", opts) var err error err = resource.Retry(5*time.Minute, func() *resource.RetryError { @@ -1093,6 +1126,7 @@ func resourceAwsDbInstanceRead(d *schema.ResourceData, meta interface{}) error { d.Set("identifier", v.DBInstanceIdentifier) d.Set("resource_id", v.DbiResourceId) d.Set("username", v.MasterUsername) + d.Set("deletion_protection", v.DeletionProtection) d.Set("engine", v.Engine) d.Set("engine_version", v.EngineVersion) d.Set("allocated_storage", v.AllocatedStorage) @@ -1153,6 +1187,13 @@ func resourceAwsDbInstanceRead(d *schema.ResourceData, meta interface{}) error { return fmt.Errorf("error setting enabled_cloudwatch_logs_exports: %s", err) } + d.Set("domain", "") + d.Set("domain_iam_role_name", "") + if len(v.DomainMemberships) > 0 && v.DomainMemberships[0] != nil { + d.Set("domain", v.DomainMemberships[0].Domain) + d.Set("domain_iam_role_name", v.DomainMemberships[0].IAMRoleName) + } + // list tags for resource // set tags conn := meta.(*AWSClient).rdsconn @@ -1197,7 +1238,7 @@ func resourceAwsDbInstanceRead(d *schema.ResourceData, meta interface{}) error { replicas = append(replicas, *v) } if err := d.Set("replicas", replicas); err != nil { - return fmt.Errorf("[DEBUG] Error setting replicas attribute: %#v, error: %#v", replicas, err) + return fmt.Errorf("Error setting replicas attribute: %#v, error: %#v", replicas, err) } d.Set("replicate_source_db", v.ReadReplicaSourceDBInstanceIdentifier) @@ -1302,6 +1343,11 @@ func resourceAwsDbInstanceUpdate(d *schema.ResourceData, meta interface{}) error req.CopyTagsToSnapshot = aws.Bool(d.Get("copy_tags_to_snapshot").(bool)) requestUpdate = true } + if d.HasChange("deletion_protection") { + d.SetPartial("deletion_protection") + req.DeletionProtection = aws.Bool(d.Get("deletion_protection").(bool)) + requestUpdate = true + } if d.HasChange("instance_class") { d.SetPartial("instance_class") req.DBInstanceClass = aws.String(d.Get("instance_class").(string)) @@ -1412,6 +1458,14 @@ func resourceAwsDbInstanceUpdate(d *schema.ResourceData, meta interface{}) error requestUpdate = true } + if d.HasChange("domain") || d.HasChange("domain_iam_role_name") { + d.SetPartial("domain") + d.SetPartial("domain_iam_role_name") + req.Domain = aws.String(d.Get("domain").(string)) + req.DomainIAMRoleName = aws.String(d.Get("domain_iam_role_name").(string)) + requestUpdate = true + } + log.Printf("[DEBUG] Send DB Instance Modification request: %t", requestUpdate) if requestUpdate { log.Printf("[DEBUG] DB Instance Modification request: %s", req) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_parameter_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_parameter_group.go index faafcb3583..e95d0b4d4e 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_parameter_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_db_parameter_group.go @@ -276,7 +276,7 @@ func resourceAwsDbParameterGroupUpdate(d *schema.ResourceData, meta interface{}) // we've got them all. maxParams := 20 for parameters != nil { - paramsToModify := make([]*rds.Parameter, 0) + var paramsToModify []*rds.Parameter if len(parameters) <= maxParams { paramsToModify, parameters = parameters[:], nil } else { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_network_acl.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_network_acl.go index 138de0176b..16b4ae0c41 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_network_acl.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_network_acl.go @@ -261,7 +261,7 @@ func revokeAllNetworkACLEntries(netaclId string, meta interface{}) error { } if resp == nil { - return fmt.Errorf("[ERR] Error looking up Default Network ACL Entries: No results") + return fmt.Errorf("Error looking up Default Network ACL Entries: No results") } networkAcl := resp.NetworkAcls[0] diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_security_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_security_group.go index 15e9e3a571..0b3af038a6 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_security_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_default_security_group.go @@ -6,7 +6,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/schema" ) @@ -67,7 +66,7 @@ func resourceAwsDefaultSecurityGroupCreate(d *schema.ResourceData, meta interfac // returned, as default is a protected name for each VPC, and for each // Region on EC2 Classic if len(resp.SecurityGroups) != 1 { - return fmt.Errorf("[ERR] Error finding default security group; found (%d) groups: %s", len(resp.SecurityGroups), resp) + return fmt.Errorf("Error finding default security group; found (%d) groups: %s", len(resp.SecurityGroups), resp) } g = resp.SecurityGroups[0] } else { @@ -81,7 +80,7 @@ func resourceAwsDefaultSecurityGroupCreate(d *schema.ResourceData, meta interfac } if g == nil { - return fmt.Errorf("[ERR] Error finding default security group: no matching group found") + return fmt.Errorf("Error finding default security group: no matching group found") } d.SetId(*g.GroupId) @@ -93,7 +92,7 @@ func resourceAwsDefaultSecurityGroupCreate(d *schema.ResourceData, meta interfac } if err := revokeDefaultSecurityGroupRules(meta, g); err != nil { - return errwrap.Wrapf("{{err}}", err) + return fmt.Errorf("%s", err) } return resourceAwsSecurityGroupUpdate(d, meta) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_directory_service_directory.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_directory_service_directory.go index 8d4b8eae0e..d440d12671 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_directory_service_directory.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_directory_service_directory.go @@ -475,14 +475,22 @@ func resourceAwsDirectoryServiceDirectoryDelete(d *schema.ResourceData, meta int DirectoryId: aws.String(d.Id()), } - log.Printf("[DEBUG] Delete Directory input: %s", input) + log.Printf("[DEBUG] Deleting Directory Service Directory: %s", input) _, err := dsconn.DeleteDirectory(&input) if err != nil { - return err + return fmt.Errorf("error deleting Directory Service Directory (%s): %s", d.Id(), err) + } + + log.Printf("[DEBUG] Waiting for Directory Service Directory (%q) to be deleted", d.Id()) + err = waitForDirectoryServiceDirectoryDeletion(dsconn, d.Id()) + if err != nil { + return fmt.Errorf("error waiting for Directory Service (%s) to be deleted: %s", d.Id(), err) } - // Wait for deletion - log.Printf("[DEBUG] Waiting for DS (%q) to be deleted", d.Id()) + return nil +} + +func waitForDirectoryServiceDirectoryDeletion(conn *directoryservice.DirectoryService, directoryID string) error { stateConf := &resource.StateChangeConf{ Pending: []string{ directoryservice.DirectoryStageActive, @@ -490,8 +498,8 @@ func resourceAwsDirectoryServiceDirectoryDelete(d *schema.ResourceData, meta int }, Target: []string{directoryservice.DirectoryStageDeleted}, Refresh: func() (interface{}, string, error) { - resp, err := dsconn.DescribeDirectories(&directoryservice.DescribeDirectoriesInput{ - DirectoryIds: []*string{aws.String(d.Id())}, + resp, err := conn.DescribeDirectories(&directoryservice.DescribeDirectoriesInput{ + DirectoryIds: []*string{aws.String(directoryID)}, }) if err != nil { if isAWSErr(err, directoryservice.ErrCodeEntityDoesNotExistException, "") { @@ -500,22 +508,17 @@ func resourceAwsDirectoryServiceDirectoryDelete(d *schema.ResourceData, meta int return nil, "error", err } - if len(resp.DirectoryDescriptions) == 0 { + if len(resp.DirectoryDescriptions) == 0 || resp.DirectoryDescriptions[0] == nil { return 42, directoryservice.DirectoryStageDeleted, nil } ds := resp.DirectoryDescriptions[0] - log.Printf("[DEBUG] Deletion of DS %q is in following stage: %q.", - d.Id(), *ds.Stage) - return ds, *ds.Stage, nil + log.Printf("[DEBUG] Deletion of Directory Service Directory %q is in following stage: %q.", directoryID, aws.StringValue(ds.Stage)) + return ds, aws.StringValue(ds.Stage), nil }, Timeout: 60 * time.Minute, } - if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf( - "Error waiting for Directory Service (%s) to be deleted: %q", - d.Id(), err.Error()) - } + _, err := stateConf.WaitForState() - return nil + return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dlm_lifecycle_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dlm_lifecycle_policy.go new file mode 100644 index 0000000000..7211e3bfd9 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dlm_lifecycle_policy.go @@ -0,0 +1,367 @@ +package aws + +import ( + "fmt" + "log" + "regexp" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/dlm" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsDlmLifecyclePolicy() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDlmLifecyclePolicyCreate, + Read: resourceAwsDlmLifecyclePolicyRead, + Update: resourceAwsDlmLifecyclePolicyUpdate, + Delete: resourceAwsDlmLifecyclePolicyDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "description": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringMatch(regexp.MustCompile("^[0-9A-Za-z _-]+$"), "see https://docs.aws.amazon.com/cli/latest/reference/dlm/create-lifecycle-policy.html"), + // TODO: https://docs.aws.amazon.com/dlm/latest/APIReference/API_LifecyclePolicy.html#dlm-Type-LifecyclePolicy-Description says it has max length of 500 but doesn't mention the regex but SDK and CLI docs only mention the regex and not max length. Check this + }, + "execution_role_arn": { + // TODO: Make this not required and if it's not provided then use the default service role, creating it if necessary + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + "policy_details": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "resource_types": { + Type: schema.TypeList, + Required: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "schedule": { + Type: schema.TypeList, + Required: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "copy_tags": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + ForceNew: true, + }, + "create_rule": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "interval": { + Type: schema.TypeInt, + Required: true, + ValidateFunc: validateIntegerInSlice([]int{ + 12, + 24, + }), + }, + "interval_unit": { + Type: schema.TypeString, + Optional: true, + Default: dlm.IntervalUnitValuesHours, + ValidateFunc: validation.StringInSlice([]string{ + dlm.IntervalUnitValuesHours, + }, false), + }, + "times": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + Elem: &schema.Schema{ + Type: schema.TypeString, + ValidateFunc: validation.StringMatch(regexp.MustCompile("^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$"), "see https://docs.aws.amazon.com/dlm/latest/APIReference/API_CreateRule.html#dlm-Type-CreateRule-Times"), + }, + }, + }, + }, + }, + "name": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringLenBetween(0, 500), + }, + "retain_rule": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "count": { + Type: schema.TypeInt, + Required: true, + ValidateFunc: validation.IntBetween(1, 1000), + }, + }, + }, + }, + "tags_to_add": { + Type: schema.TypeMap, + Optional: true, + }, + }, + }, + }, + "target_tags": { + Type: schema.TypeMap, + Required: true, + }, + }, + }, + }, + "state": { + Type: schema.TypeString, + Optional: true, + Default: dlm.SettablePolicyStateValuesEnabled, + ValidateFunc: validation.StringInSlice([]string{ + dlm.SettablePolicyStateValuesDisabled, + dlm.SettablePolicyStateValuesEnabled, + }, false), + }, + }, + } +} + +func resourceAwsDlmLifecyclePolicyCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dlmconn + + input := dlm.CreateLifecyclePolicyInput{ + Description: aws.String(d.Get("description").(string)), + ExecutionRoleArn: aws.String(d.Get("execution_role_arn").(string)), + PolicyDetails: expandDlmPolicyDetails(d.Get("policy_details").([]interface{})), + State: aws.String(d.Get("state").(string)), + } + + log.Printf("[INFO] Creating DLM lifecycle policy: %s", input) + out, err := conn.CreateLifecyclePolicy(&input) + if err != nil { + return fmt.Errorf("error creating DLM Lifecycle Policy: %s", err) + } + + d.SetId(*out.PolicyId) + + return resourceAwsDlmLifecyclePolicyRead(d, meta) +} + +func resourceAwsDlmLifecyclePolicyRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dlmconn + + log.Printf("[INFO] Reading DLM lifecycle policy: %s", d.Id()) + out, err := conn.GetLifecyclePolicy(&dlm.GetLifecyclePolicyInput{ + PolicyId: aws.String(d.Id()), + }) + + if isAWSErr(err, dlm.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] DLM Lifecycle Policy (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if err != nil { + return fmt.Errorf("error reading DLM Lifecycle Policy (%s): %s", d.Id(), err) + } + + d.Set("description", out.Policy.Description) + d.Set("execution_role_arn", out.Policy.ExecutionRoleArn) + d.Set("state", out.Policy.State) + if err := d.Set("policy_details", flattenDlmPolicyDetails(out.Policy.PolicyDetails)); err != nil { + return fmt.Errorf("error setting policy details %s", err) + } + + return nil +} + +func resourceAwsDlmLifecyclePolicyUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dlmconn + + input := dlm.UpdateLifecyclePolicyInput{ + PolicyId: aws.String(d.Id()), + } + + if d.HasChange("description") { + input.Description = aws.String(d.Get("description").(string)) + } + if d.HasChange("execution_role_arn") { + input.ExecutionRoleArn = aws.String(d.Get("execution_role_arn").(string)) + } + if d.HasChange("state") { + input.State = aws.String(d.Get("state").(string)) + } + if d.HasChange("policy_details") { + input.PolicyDetails = expandDlmPolicyDetails(d.Get("policy_details").([]interface{})) + } + + log.Printf("[INFO] Updating lifecycle policy %s", d.Id()) + _, err := conn.UpdateLifecyclePolicy(&input) + if err != nil { + return fmt.Errorf("error updating DLM Lifecycle Policy (%s): %s", d.Id(), err) + } + + return resourceAwsDlmLifecyclePolicyRead(d, meta) +} + +func resourceAwsDlmLifecyclePolicyDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dlmconn + + log.Printf("[INFO] Deleting DLM lifecycle policy: %s", d.Id()) + _, err := conn.DeleteLifecyclePolicy(&dlm.DeleteLifecyclePolicyInput{ + PolicyId: aws.String(d.Id()), + }) + if err != nil { + return fmt.Errorf("error deleting DLM Lifecycle Policy (%s): %s", d.Id(), err) + } + + return nil +} + +func expandDlmPolicyDetails(cfg []interface{}) *dlm.PolicyDetails { + if len(cfg) == 0 || cfg[0] == nil { + return nil + } + + policyDetails := &dlm.PolicyDetails{} + m := cfg[0].(map[string]interface{}) + if v, ok := m["resource_types"]; ok { + policyDetails.ResourceTypes = expandStringList(v.([]interface{})) + } + if v, ok := m["schedule"]; ok { + policyDetails.Schedules = expandDlmSchedules(v.([]interface{})) + } + if v, ok := m["target_tags"]; ok { + policyDetails.TargetTags = expandDlmTags(v.(map[string]interface{})) + } + + return policyDetails +} + +func flattenDlmPolicyDetails(policyDetails *dlm.PolicyDetails) []map[string]interface{} { + result := make(map[string]interface{}, 0) + result["resource_types"] = flattenStringList(policyDetails.ResourceTypes) + result["schedule"] = flattenDlmSchedules(policyDetails.Schedules) + result["target_tags"] = flattenDlmTags(policyDetails.TargetTags) + + return []map[string]interface{}{result} +} + +func expandDlmSchedules(cfg []interface{}) []*dlm.Schedule { + schedules := make([]*dlm.Schedule, len(cfg)) + for i, c := range cfg { + schedule := &dlm.Schedule{} + m := c.(map[string]interface{}) + if v, ok := m["copy_tags"]; ok { + schedule.CopyTags = aws.Bool(v.(bool)) + } + if v, ok := m["create_rule"]; ok { + schedule.CreateRule = expandDlmCreateRule(v.([]interface{})) + } + if v, ok := m["name"]; ok { + schedule.Name = aws.String(v.(string)) + } + if v, ok := m["retain_rule"]; ok { + schedule.RetainRule = expandDlmRetainRule(v.([]interface{})) + } + if v, ok := m["tags_to_add"]; ok { + schedule.TagsToAdd = expandDlmTags(v.(map[string]interface{})) + } + schedules[i] = schedule + } + + return schedules +} + +func flattenDlmSchedules(schedules []*dlm.Schedule) []map[string]interface{} { + result := make([]map[string]interface{}, len(schedules)) + for i, s := range schedules { + m := make(map[string]interface{}) + m["copy_tags"] = aws.BoolValue(s.CopyTags) + m["create_rule"] = flattenDlmCreateRule(s.CreateRule) + m["name"] = aws.StringValue(s.Name) + m["retain_rule"] = flattenDlmRetainRule(s.RetainRule) + m["tags_to_add"] = flattenDlmTags(s.TagsToAdd) + result[i] = m + } + + return result +} + +func expandDlmCreateRule(cfg []interface{}) *dlm.CreateRule { + if len(cfg) == 0 || cfg[0] == nil { + return nil + } + c := cfg[0].(map[string]interface{}) + createRule := &dlm.CreateRule{ + Interval: aws.Int64(int64(c["interval"].(int))), + IntervalUnit: aws.String(c["interval_unit"].(string)), + } + if v, ok := c["times"]; ok { + createRule.Times = expandStringList(v.([]interface{})) + } + + return createRule +} + +func flattenDlmCreateRule(createRule *dlm.CreateRule) []map[string]interface{} { + if createRule == nil { + return []map[string]interface{}{} + } + + result := make(map[string]interface{}) + result["interval"] = aws.Int64Value(createRule.Interval) + result["interval_unit"] = aws.StringValue(createRule.IntervalUnit) + result["times"] = flattenStringList(createRule.Times) + + return []map[string]interface{}{result} +} + +func expandDlmRetainRule(cfg []interface{}) *dlm.RetainRule { + if len(cfg) == 0 || cfg[0] == nil { + return nil + } + m := cfg[0].(map[string]interface{}) + return &dlm.RetainRule{ + Count: aws.Int64(int64(m["count"].(int))), + } +} + +func flattenDlmRetainRule(retainRule *dlm.RetainRule) []map[string]interface{} { + result := make(map[string]interface{}) + result["count"] = aws.Int64Value(retainRule.Count) + + return []map[string]interface{}{result} +} + +func expandDlmTags(m map[string]interface{}) []*dlm.Tag { + var result []*dlm.Tag + for k, v := range m { + result = append(result, &dlm.Tag{ + Key: aws.String(k), + Value: aws.String(v.(string)), + }) + } + + return result +} + +func flattenDlmTags(tags []*dlm.Tag) map[string]string { + result := make(map[string]string) + for _, t := range tags { + result[aws.StringValue(t.Key)] = aws.StringValue(t.Value) + } + + return result +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_instance.go index 282451a7b0..9277b01710 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_instance.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_instance.go @@ -6,7 +6,6 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" dms "github.com/aws/aws-sdk-go/service/databasemigrationservice" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -134,6 +133,7 @@ func resourceAwsDmsReplicationInstanceCreate(d *schema.ResourceData, meta interf request := &dms.CreateReplicationInstanceInput{ AutoMinorVersionUpgrade: aws.Bool(d.Get("auto_minor_version_upgrade").(bool)), PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), + MultiAZ: aws.Bool(d.Get("multi_az").(bool)), ReplicationInstanceClass: aws.String(d.Get("replication_instance_class").(string)), ReplicationInstanceIdentifier: aws.String(d.Get("replication_instance_id").(string)), Tags: dmsTagsFromMap(d.Get("tags").(map[string]interface{})), @@ -146,6 +146,9 @@ func resourceAwsDmsReplicationInstanceCreate(d *schema.ResourceData, meta interf if v, ok := d.GetOk("allocated_storage"); ok { request.AllocatedStorage = aws.Int64(int64(v.(int))) } + if v, ok := d.GetOk("availability_zone"); ok { + request.AvailabilityZone = aws.String(v.(string)) + } if v, ok := d.GetOk("engine_version"); ok { request.EngineVersion = aws.String(v.(string)) } @@ -162,24 +165,11 @@ func resourceAwsDmsReplicationInstanceCreate(d *schema.ResourceData, meta interf request.VpcSecurityGroupIds = expandStringList(v.(*schema.Set).List()) } - az, azSet := d.GetOk("availability_zone") - if azSet { - request.AvailabilityZone = aws.String(az.(string)) - } - - if multiAz, ok := d.GetOk("multi_az"); ok { - request.MultiAZ = aws.Bool(multiAz.(bool)) - - if multiAz.(bool) && azSet { - return fmt.Errorf("Cannot set availability_zone if multi_az is set to true") - } - } - log.Println("[DEBUG] DMS create replication instance:", request) _, err := conn.CreateReplicationInstance(request) if err != nil { - return err + return fmt.Errorf("error creating DMS Replication Instance: %s", err) } d.SetId(d.Get("replication_instance_id").(string)) @@ -187,7 +177,7 @@ func resourceAwsDmsReplicationInstanceCreate(d *schema.ResourceData, meta interf stateConf := &resource.StateChangeConf{ Pending: []string{"creating", "modifying"}, Target: []string{"available"}, - Refresh: resourceAwsDmsReplicationInstanceStateRefreshFunc(d, meta), + Refresh: resourceAwsDmsReplicationInstanceStateRefreshFunc(conn, d.Id()), Timeout: d.Timeout(schema.TimeoutCreate), MinTimeout: 10 * time.Second, Delay: 30 * time.Second, // Wait 30 secs before starting @@ -196,7 +186,7 @@ func resourceAwsDmsReplicationInstanceCreate(d *schema.ResourceData, meta interf // Wait, catching any errors _, err = stateConf.WaitForState() if err != nil { - return err + return fmt.Errorf("error waiting for DMS Replication Instance (%s) creation: %s", d.Id(), err) } return resourceAwsDmsReplicationInstanceRead(d, meta) @@ -213,32 +203,73 @@ func resourceAwsDmsReplicationInstanceRead(d *schema.ResourceData, meta interfac }, }, }) - if err != nil { - if dmserr, ok := err.(awserr.Error); ok && dmserr.Code() == "ResourceNotFoundFault" { - log.Printf("[DEBUG] DMS Replication Instance %q Not Found", d.Id()) - d.SetId("") - return nil - } - return err + + if isAWSErr(err, dms.ErrCodeResourceNotFoundFault, "") { + log.Printf("[WARN] DMS Replication Instance (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil } - err = resourceAwsDmsReplicationInstanceSetState(d, response.ReplicationInstances[0]) if err != nil { - return err + return fmt.Errorf("error describing DMS Replication Instance (%s): %s", d.Id(), err) + } + + if response == nil || len(response.ReplicationInstances) == 0 || response.ReplicationInstances[0] == nil { + log.Printf("[WARN] DMS Replication Instance (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + instance := response.ReplicationInstances[0] + + d.Set("allocated_storage", instance.AllocatedStorage) + d.Set("auto_minor_version_upgrade", instance.AutoMinorVersionUpgrade) + d.Set("availability_zone", instance.AvailabilityZone) + d.Set("engine_version", instance.EngineVersion) + d.Set("kms_key_arn", instance.KmsKeyId) + d.Set("multi_az", instance.MultiAZ) + d.Set("preferred_maintenance_window", instance.PreferredMaintenanceWindow) + d.Set("publicly_accessible", instance.PubliclyAccessible) + d.Set("replication_instance_arn", instance.ReplicationInstanceArn) + d.Set("replication_instance_class", instance.ReplicationInstanceClass) + d.Set("replication_instance_id", instance.ReplicationInstanceIdentifier) + + if err := d.Set("replication_instance_private_ips", aws.StringValueSlice(instance.ReplicationInstancePrivateIpAddresses)); err != nil { + return fmt.Errorf("error setting replication_instance_private_ips: %s", err) + } + + if err := d.Set("replication_instance_public_ips", aws.StringValueSlice(instance.ReplicationInstancePublicIpAddresses)); err != nil { + return fmt.Errorf("error setting replication_instance_private_ips: %s", err) + } + + d.Set("replication_subnet_group_id", instance.ReplicationSubnetGroup.ReplicationSubnetGroupIdentifier) + + vpc_security_group_ids := []string{} + for _, sg := range instance.VpcSecurityGroups { + vpc_security_group_ids = append(vpc_security_group_ids, aws.StringValue(sg.VpcSecurityGroupId)) + } + + if err := d.Set("vpc_security_group_ids", vpc_security_group_ids); err != nil { + return fmt.Errorf("error setting vpc_security_group_ids: %s", err) } tagsResp, err := conn.ListTagsForResource(&dms.ListTagsForResourceInput{ ResourceArn: aws.String(d.Get("replication_instance_arn").(string)), }) if err != nil { - return err + return fmt.Errorf("error listing tags for DMS Replication Instance (%s): %s", d.Id(), err) + } + + if err := d.Set("tags", dmsTagsToMap(tagsResp.TagList)); err != nil { + return fmt.Errorf("error setting tags: %s", err) } - d.Set("tags", dmsTagsToMap(tagsResp.TagList)) return nil } func resourceAwsDmsReplicationInstanceUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dmsconn + request := &dms.ModifyReplicationInstanceInput{ ApplyImmediately: aws.Bool(d.Get("apply_immediately").(bool)), ReplicationInstanceArn: aws.String(d.Get("replication_instance_arn").(string)), @@ -259,16 +290,14 @@ func resourceAwsDmsReplicationInstanceUpdate(d *schema.ResourceData, meta interf if d.HasChange("engine_version") { if v, ok := d.GetOk("engine_version"); ok { - request.ReplicationInstanceClass = aws.String(v.(string)) + request.EngineVersion = aws.String(v.(string)) hasChanges = true } } if d.HasChange("multi_az") { - if v, ok := d.GetOk("multi_az"); ok { - request.MultiAZ = aws.Bool(v.(bool)) - hasChanges = true - } + request.MultiAZ = aws.Bool(d.Get("multi_az").(bool)) + hasChanges = true } if d.HasChange("preferred_maintenance_window") { @@ -279,10 +308,8 @@ func resourceAwsDmsReplicationInstanceUpdate(d *schema.ResourceData, meta interf } if d.HasChange("replication_instance_class") { - if v, ok := d.GetOk("replication_instance_class"); ok { - request.ReplicationInstanceClass = aws.String(v.(string)) - hasChanges = true - } + request.ReplicationInstanceClass = aws.String(d.Get("replication_instance_class").(string)) + hasChanges = true } if d.HasChange("vpc_security_group_ids") { @@ -300,17 +327,15 @@ func resourceAwsDmsReplicationInstanceUpdate(d *schema.ResourceData, meta interf } if hasChanges { - conn := meta.(*AWSClient).dmsconn - _, err := conn.ModifyReplicationInstance(request) if err != nil { - return err + return fmt.Errorf("error modifying DMS Replication Instance (%s): %s", d.Id(), err) } stateConf := &resource.StateChangeConf{ - Pending: []string{"modifying"}, + Pending: []string{"modifying", "upgrading"}, Target: []string{"available"}, - Refresh: resourceAwsDmsReplicationInstanceStateRefreshFunc(d, meta), + Refresh: resourceAwsDmsReplicationInstanceStateRefreshFunc(conn, d.Id()), Timeout: d.Timeout(schema.TimeoutUpdate), MinTimeout: 10 * time.Second, Delay: 30 * time.Second, // Wait 30 secs before starting @@ -319,13 +344,11 @@ func resourceAwsDmsReplicationInstanceUpdate(d *schema.ResourceData, meta interf // Wait, catching any errors _, err = stateConf.WaitForState() if err != nil { - return err + return fmt.Errorf("error waiting for DMS Replication Instance (%s) modification: %s", d.Id(), err) } - - return resourceAwsDmsReplicationInstanceRead(d, meta) } - return nil + return resourceAwsDmsReplicationInstanceRead(d, meta) } func resourceAwsDmsReplicationInstanceDelete(d *schema.ResourceData, meta interface{}) error { @@ -338,14 +361,19 @@ func resourceAwsDmsReplicationInstanceDelete(d *schema.ResourceData, meta interf log.Printf("[DEBUG] DMS delete replication instance: %#v", request) _, err := conn.DeleteReplicationInstance(request) + + if isAWSErr(err, dms.ErrCodeResourceNotFoundFault, "") { + return nil + } + if err != nil { - return err + return fmt.Errorf("error deleting DMS Replication Instance (%s): %s", d.Id(), err) } stateConf := &resource.StateChangeConf{ Pending: []string{"deleting"}, Target: []string{}, - Refresh: resourceAwsDmsReplicationInstanceStateRefreshFunc(d, meta), + Refresh: resourceAwsDmsReplicationInstanceStateRefreshFunc(conn, d.Id()), Timeout: d.Timeout(schema.TimeoutDelete), MinTimeout: 10 * time.Second, Delay: 30 * time.Second, // Wait 30 secs before starting @@ -354,81 +382,35 @@ func resourceAwsDmsReplicationInstanceDelete(d *schema.ResourceData, meta interf // Wait, catching any errors _, err = stateConf.WaitForState() if err != nil { - return err - } - - return nil -} - -func resourceAwsDmsReplicationInstanceSetState(d *schema.ResourceData, instance *dms.ReplicationInstance) error { - d.SetId(*instance.ReplicationInstanceIdentifier) - - d.Set("replication_instance_id", instance.ReplicationInstanceIdentifier) - d.Set("allocated_storage", instance.AllocatedStorage) - d.Set("auto_minor_version_upgrade", instance.AutoMinorVersionUpgrade) - d.Set("availability_zone", instance.AvailabilityZone) - d.Set("engine_version", instance.EngineVersion) - d.Set("kms_key_arn", instance.KmsKeyId) - d.Set("multi_az", instance.MultiAZ) - d.Set("preferred_maintenance_window", instance.PreferredMaintenanceWindow) - d.Set("publicly_accessible", instance.PubliclyAccessible) - d.Set("replication_instance_arn", instance.ReplicationInstanceArn) - d.Set("replication_instance_class", instance.ReplicationInstanceClass) - d.Set("replication_subnet_group_id", instance.ReplicationSubnetGroup.ReplicationSubnetGroupIdentifier) - - vpc_security_group_ids := []string{} - for _, sg := range instance.VpcSecurityGroups { - vpc_security_group_ids = append(vpc_security_group_ids, aws.StringValue(sg.VpcSecurityGroupId)) - } - - d.Set("vpc_security_group_ids", vpc_security_group_ids) - - private_ip_addresses := []string{} - for _, ip := range instance.ReplicationInstancePrivateIpAddresses { - private_ip_addresses = append(private_ip_addresses, aws.StringValue(ip)) + return fmt.Errorf("error waiting for DMS Replication Instance (%s) deletion: %s", d.Id(), err) } - d.Set("replication_instance_private_ips", private_ip_addresses) - - public_ip_addresses := []string{} - for _, ip := range instance.ReplicationInstancePublicIpAddresses { - public_ip_addresses = append(public_ip_addresses, aws.StringValue(ip)) - } - - d.Set("replication_instance_public_ips", public_ip_addresses) - return nil } -func resourceAwsDmsReplicationInstanceStateRefreshFunc( - d *schema.ResourceData, meta interface{}) resource.StateRefreshFunc { +func resourceAwsDmsReplicationInstanceStateRefreshFunc(conn *dms.DatabaseMigrationService, replicationInstanceID string) resource.StateRefreshFunc { return func() (interface{}, string, error) { - conn := meta.(*AWSClient).dmsconn - v, err := conn.DescribeReplicationInstances(&dms.DescribeReplicationInstancesInput{ Filters: []*dms.Filter{ { Name: aws.String("replication-instance-id"), - Values: []*string{aws.String(d.Id())}, // Must use d.Id() to work with import. + Values: []*string{aws.String(replicationInstanceID)}, }, }, }) + + if isAWSErr(err, dms.ErrCodeResourceNotFoundFault, "") { + return nil, "", nil + } + if err != nil { - if dmserr, ok := err.(awserr.Error); ok && dmserr.Code() == "ResourceNotFoundFault" { - return nil, "", nil - } - log.Printf("Error on retrieving DMS Replication Instance when waiting: %s", err) return nil, "", err } - if v == nil { + if v == nil || len(v.ReplicationInstances) == 0 || v.ReplicationInstances[0] == nil { return nil, "", nil } - if v.ReplicationInstances == nil { - return nil, "", fmt.Errorf("Error on retrieving DMS Replication Instance when waiting for State") - } - - return v, *v.ReplicationInstances[0].ReplicationInstanceStatus, nil + return v, aws.StringValue(v.ReplicationInstances[0].ReplicationInstanceStatus), nil } } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_task.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_task.go index 49bab71fa5..8b7574f040 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_task.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dms_replication_task.go @@ -59,7 +59,7 @@ func resourceAwsDmsReplicationTask() *schema.Resource { "replication_task_settings": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentJsonDiffs, }, "source_endpoint_arn": { @@ -71,7 +71,7 @@ func resourceAwsDmsReplicationTask() *schema.Resource { "table_mappings": { Type: schema.TypeString, Required: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentJsonDiffs, }, "tags": { @@ -104,7 +104,7 @@ func resourceAwsDmsReplicationTaskCreate(d *schema.ResourceData, meta interface{ if v, ok := d.GetOk("cdc_start_time"); ok { seconds, err := strconv.ParseInt(v.(string), 10, 64) if err != nil { - return fmt.Errorf("[ERROR] DMS create replication task. Invalid CDC Unix timestamp: %s", err) + return fmt.Errorf("DMS create replication task. Invalid CDC Unix timestamp: %s", err) } request.CdcStartTime = aws.Time(time.Unix(seconds, 0)) } @@ -188,7 +188,7 @@ func resourceAwsDmsReplicationTaskUpdate(d *schema.ResourceData, meta interface{ if d.HasChange("cdc_start_time") { seconds, err := strconv.ParseInt(d.Get("cdc_start_time").(string), 10, 64) if err != nil { - return fmt.Errorf("[ERROR] DMS update replication task. Invalid CRC Unix timestamp: %s", err) + return fmt.Errorf("DMS update replication task. Invalid CRC Unix timestamp: %s", err) } request.CdcStartTime = aws.Time(time.Unix(seconds, 0)) hasChanges = true diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_bgp_peer.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_bgp_peer.go new file mode 100644 index 0000000000..faed5acc58 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_bgp_peer.go @@ -0,0 +1,210 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/directconnect" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsDxBgpPeer() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsDxBgpPeerCreate, + Read: resourceAwsDxBgpPeerRead, + Delete: resourceAwsDxBgpPeerDelete, + + Schema: map[string]*schema.Schema{ + "address_family": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{directconnect.AddressFamilyIpv4, directconnect.AddressFamilyIpv6}, false), + }, + "bgp_asn": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + }, + "virtual_interface_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "amazon_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "bgp_auth_key": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "customer_address": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "bgp_status": { + Type: schema.TypeString, + Computed: true, + }, + }, + + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(10 * time.Minute), + Delete: schema.DefaultTimeout(10 * time.Minute), + }, + } +} + +func resourceAwsDxBgpPeerCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + vifId := d.Get("virtual_interface_id").(string) + addrFamily := d.Get("address_family").(string) + asn := int64(d.Get("bgp_asn").(int)) + + req := &directconnect.CreateBGPPeerInput{ + VirtualInterfaceId: aws.String(vifId), + NewBGPPeer: &directconnect.NewBGPPeer{ + AddressFamily: aws.String(addrFamily), + Asn: aws.Int64(asn), + }, + } + if v, ok := d.GetOk("amazon_address"); ok && v.(string) != "" { + req.NewBGPPeer.AmazonAddress = aws.String(v.(string)) + } + if v, ok := d.GetOk("bgp_auth_key"); ok && v.(string) != "" { + req.NewBGPPeer.AuthKey = aws.String(v.(string)) + } + if v, ok := d.GetOk("customer_address"); ok && v.(string) != "" { + req.NewBGPPeer.CustomerAddress = aws.String(v.(string)) + } + + log.Printf("[DEBUG] Creating Direct Connect BGP peer: %#v", req) + _, err := conn.CreateBGPPeer(req) + if err != nil { + return fmt.Errorf("Error creating Direct Connect BGP peer: %s", err) + } + + d.SetId(fmt.Sprintf("%s-%s-%d", vifId, addrFamily, asn)) + + stateConf := &resource.StateChangeConf{ + Pending: []string{ + directconnect.BGPPeerStatePending, + }, + Target: []string{ + directconnect.BGPPeerStateAvailable, + directconnect.BGPPeerStateVerifying, + }, + Refresh: dxBgpPeerStateRefresh(conn, vifId, addrFamily, asn), + Timeout: d.Timeout(schema.TimeoutDelete), + Delay: 10 * time.Second, + MinTimeout: 5 * time.Second, + } + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("Error waiting for Direct Connect BGP peer (%s) to be available: %s", d.Id(), err) + } + + return resourceAwsDxBgpPeerRead(d, meta) +} + +func resourceAwsDxBgpPeerRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + vifId := d.Get("virtual_interface_id").(string) + addrFamily := d.Get("address_family").(string) + asn := int64(d.Get("bgp_asn").(int)) + + bgpPeerRaw, state, err := dxBgpPeerStateRefresh(conn, vifId, addrFamily, asn)() + if err != nil { + return fmt.Errorf("Error reading Direct Connect BGP peer: %s", err) + } + if state == directconnect.BGPPeerStateDeleted { + log.Printf("[WARN] Direct Connect BGP peer (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + bgpPeer := bgpPeerRaw.(*directconnect.BGPPeer) + d.Set("amazon_address", bgpPeer.AmazonAddress) + d.Set("bgp_auth_key", bgpPeer.AuthKey) + d.Set("customer_address", bgpPeer.CustomerAddress) + d.Set("bgp_status", bgpPeer.BgpStatus) + + return nil +} + +func resourceAwsDxBgpPeerDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).dxconn + + vifId := d.Get("virtual_interface_id").(string) + addrFamily := d.Get("address_family").(string) + asn := int64(d.Get("bgp_asn").(int)) + + log.Printf("[DEBUG] Deleting Direct Connect BGP peer: %s", d.Id()) + _, err := conn.DeleteBGPPeer(&directconnect.DeleteBGPPeerInput{ + Asn: aws.Int64(asn), + CustomerAddress: aws.String(d.Get("customer_address").(string)), + VirtualInterfaceId: aws.String(vifId), + }) + if err != nil { + // This is the error returned if the BGP peering has already gone. + if isAWSErr(err, "DirectConnectClientException", "The last BGP Peer on a Virtual Interface cannot be deleted") { + return nil + } + return err + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{ + directconnect.BGPPeerStateAvailable, + directconnect.BGPPeerStateDeleting, + directconnect.BGPPeerStatePending, + directconnect.BGPPeerStateVerifying, + }, + Target: []string{ + directconnect.BGPPeerStateDeleted, + }, + Refresh: dxBgpPeerStateRefresh(conn, vifId, addrFamily, asn), + Timeout: d.Timeout(schema.TimeoutDelete), + Delay: 10 * time.Second, + MinTimeout: 5 * time.Second, + } + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("Error waiting for Direct Connect BGP peer (%s) to be deleted: %s", d.Id(), err) + } + + return nil +} + +func dxBgpPeerStateRefresh(conn *directconnect.DirectConnect, vifId, addrFamily string, asn int64) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + vif, err := dxVirtualInterfaceRead(vifId, conn) + if err != nil { + return nil, "", err + } + if vif == nil { + return "", directconnect.BGPPeerStateDeleted, nil + } + + for _, bgpPeer := range vif.BgpPeers { + if aws.StringValue(bgpPeer.AddressFamily) == addrFamily && aws.Int64Value(bgpPeer.Asn) == asn { + return bgpPeer, aws.StringValue(bgpPeer.BgpPeerState), nil + } + } + + return "", directconnect.BGPPeerStateDeleted, nil + } +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_connection.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_connection.go index 5e91e919ba..f2d9d69884 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_connection.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_connection.go @@ -43,6 +43,10 @@ func resourceAwsDxConnection() *schema.Resource { Required: true, ForceNew: true, }, + "jumbo_frame_capable": { + Type: schema.TypeBool, + Computed: true, + }, "tags": tagsSchema(), }, } @@ -88,11 +92,11 @@ func resourceAwsDxConnectionRead(d *schema.ResourceData, meta interface{}) error return nil } if len(resp.Connections) != 1 { - return fmt.Errorf("[ERROR] Number of Direct Connect connections (%s) isn't one, got %d", d.Id(), len(resp.Connections)) + return fmt.Errorf("Number of Direct Connect connections (%s) isn't one, got %d", d.Id(), len(resp.Connections)) } connection := resp.Connections[0] if d.Id() != aws.StringValue(connection.ConnectionId) { - return fmt.Errorf("[ERROR] Direct Connect connection (%s) not found", d.Id()) + return fmt.Errorf("Direct Connect connection (%s) not found", d.Id()) } if aws.StringValue(connection.ConnectionState) == directconnect.ConnectionStateDeleted { log.Printf("[WARN] Direct Connect connection (%s) not found, removing from state", d.Id()) @@ -111,6 +115,7 @@ func resourceAwsDxConnectionRead(d *schema.ResourceData, meta interface{}) error d.Set("name", connection.ConnectionName) d.Set("bandwidth", connection.Bandwidth) d.Set("location", connection.Location) + d.Set("jumbo_frame_capable", connection.JumboFrameCapable) if err := getTagsDX(conn, d, arn); err != nil { return err diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_gateway.go index c8c8cba21c..aa33602be3 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_gateway.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_gateway.go @@ -31,7 +31,7 @@ func resourceAwsDxGateway() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: validateDxGatewayAmazonSideAsn, + ValidateFunc: validateAmazonSideAsn, }, }, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_private_virtual_interface.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_private_virtual_interface.go index f0ce581ff7..56fc6f85a6 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_private_virtual_interface.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_private_virtual_interface.go @@ -77,10 +77,22 @@ func resourceAwsDxHostedPrivateVirtualInterface() *schema.Resource { ForceNew: true, ValidateFunc: validateAwsAccountId, }, + "mtu": { + Type: schema.TypeInt, + Default: 1500, + Optional: true, + ForceNew: true, + ValidateFunc: validateIntegerInSlice([]int{1500, 9001}), + }, + "jumbo_frame_capable": { + Type: schema.TypeBool, + Computed: true, + }, }, Timeouts: &schema.ResourceTimeout{ Create: schema.DefaultTimeout(10 * time.Minute), + Update: schema.DefaultTimeout(10 * time.Minute), Delete: schema.DefaultTimeout(10 * time.Minute), }, } @@ -97,6 +109,7 @@ func resourceAwsDxHostedPrivateVirtualInterfaceCreate(d *schema.ResourceData, me Vlan: aws.Int64(int64(d.Get("vlan").(int))), Asn: aws.Int64(int64(d.Get("bgp_asn").(int))), AddressFamily: aws.String(d.Get("address_family").(string)), + Mtu: aws.Int64(int64(d.Get("mtu").(int))), }, } if v, ok := d.GetOk("bgp_auth_key"); ok && v.(string) != "" { @@ -108,6 +121,9 @@ func resourceAwsDxHostedPrivateVirtualInterfaceCreate(d *schema.ResourceData, me if v, ok := d.GetOk("amazon_address"); ok && v.(string) != "" { req.NewPrivateVirtualInterfaceAllocation.AmazonAddress = aws.String(v.(string)) } + if v, ok := d.GetOk("mtu"); ok && v.(int) != 0 { + req.NewPrivateVirtualInterfaceAllocation.Mtu = aws.Int64(int64(v.(int))) + } log.Printf("[DEBUG] Creating Direct Connect hosted private virtual interface: %#v", req) resp, err := conn.AllocatePrivateVirtualInterface(req) @@ -125,7 +141,7 @@ func resourceAwsDxHostedPrivateVirtualInterfaceCreate(d *schema.ResourceData, me }.String() d.Set("arn", arn) - if err := dxHostedPrivateVirtualInterfaceWaitUntilAvailable(d, conn); err != nil { + if err := dxHostedPrivateVirtualInterfaceWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutCreate)); err != nil { return err } @@ -154,6 +170,8 @@ func resourceAwsDxHostedPrivateVirtualInterfaceRead(d *schema.ResourceData, meta d.Set("customer_address", vif.CustomerAddress) d.Set("amazon_address", vif.AmazonAddress) d.Set("owner_account_id", vif.OwnerAccount) + d.Set("mtu", vif.Mtu) + d.Set("jumbo_frame_capable", vif.JumboFrameCapable) return nil } @@ -175,10 +193,11 @@ func resourceAwsDxHostedPrivateVirtualInterfaceImport(d *schema.ResourceData, me return []*schema.ResourceData{d}, nil } -func dxHostedPrivateVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { +func dxHostedPrivateVirtualInterfaceWaitUntilAvailable(conn *directconnect.DirectConnect, vifId string, timeout time.Duration) error { return dxVirtualInterfaceWaitUntilAvailable( - d, conn, + vifId, + timeout, []string{ directconnect.VirtualInterfaceStatePending, }, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go index 855061c9ee..87ed7673b1 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_private_virtual_interface_accepter.go @@ -90,7 +90,7 @@ func resourceAwsDxHostedPrivateVirtualInterfaceAccepterCreate(d *schema.Resource }.String() d.Set("arn", arn) - if err := dxHostedPrivateVirtualInterfaceAccepterWaitUntilAvailable(d, conn); err != nil { + if err := dxHostedPrivateVirtualInterfaceAccepterWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutCreate)); err != nil { return err } @@ -153,10 +153,11 @@ func resourceAwsDxHostedPrivateVirtualInterfaceAccepterImport(d *schema.Resource return []*schema.ResourceData{d}, nil } -func dxHostedPrivateVirtualInterfaceAccepterWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { +func dxHostedPrivateVirtualInterfaceAccepterWaitUntilAvailable(conn *directconnect.DirectConnect, vifId string, timeout time.Duration) error { return dxVirtualInterfaceWaitUntilAvailable( - d, conn, + vifId, + timeout, []string{ directconnect.VirtualInterfaceStateConfirming, directconnect.VirtualInterfaceStatePending, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_public_virtual_interface.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_public_virtual_interface.go index a8cede3c7b..850acd898f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_public_virtual_interface.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_public_virtual_interface.go @@ -147,7 +147,7 @@ func resourceAwsDxHostedPublicVirtualInterfaceCreate(d *schema.ResourceData, met }.String() d.Set("arn", arn) - if err := dxHostedPublicVirtualInterfaceWaitUntilAvailable(d, conn); err != nil { + if err := dxHostedPublicVirtualInterfaceWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutCreate)); err != nil { return err } @@ -198,10 +198,11 @@ func resourceAwsDxHostedPublicVirtualInterfaceImport(d *schema.ResourceData, met return []*schema.ResourceData{d}, nil } -func dxHostedPublicVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { +func dxHostedPublicVirtualInterfaceWaitUntilAvailable(conn *directconnect.DirectConnect, vifId string, timeout time.Duration) error { return dxVirtualInterfaceWaitUntilAvailable( - d, conn, + vifId, + timeout, []string{ directconnect.VirtualInterfaceStatePending, }, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go index 46bafff591..b3cfc69635 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_hosted_public_virtual_interface_accepter.go @@ -65,7 +65,7 @@ func resourceAwsDxHostedPublicVirtualInterfaceAccepterCreate(d *schema.ResourceD }.String() d.Set("arn", arn) - if err := dxHostedPublicVirtualInterfaceAccepterWaitUntilAvailable(d, conn); err != nil { + if err := dxHostedPublicVirtualInterfaceAccepterWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutCreate)); err != nil { return err } @@ -127,10 +127,11 @@ func resourceAwsDxHostedPublicVirtualInterfaceAccepterImport(d *schema.ResourceD return []*schema.ResourceData{d}, nil } -func dxHostedPublicVirtualInterfaceAccepterWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { +func dxHostedPublicVirtualInterfaceAccepterWaitUntilAvailable(conn *directconnect.DirectConnect, vifId string, timeout time.Duration) error { return dxVirtualInterfaceWaitUntilAvailable( - d, conn, + vifId, + timeout, []string{ directconnect.VirtualInterfaceStateConfirming, directconnect.VirtualInterfaceStatePending, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_lag.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_lag.go index 6c0fbb2524..14e3b9a382 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_lag.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_lag.go @@ -111,11 +111,11 @@ func resourceAwsDxLagRead(d *schema.ResourceData, meta interface{}) error { return nil } if len(resp.Lags) != 1 { - return fmt.Errorf("[ERROR] Number of Direct Connect LAGs (%s) isn't one, got %d", d.Id(), len(resp.Lags)) + return fmt.Errorf("Number of Direct Connect LAGs (%s) isn't one, got %d", d.Id(), len(resp.Lags)) } lag := resp.Lags[0] if d.Id() != aws.StringValue(lag.LagId) { - return fmt.Errorf("[ERROR] Direct Connect LAG (%s) not found", d.Id()) + return fmt.Errorf("Direct Connect LAG (%s) not found", d.Id()) } if aws.StringValue(lag.LagState) == directconnect.LagStateDeleted { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_private_virtual_interface.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_private_virtual_interface.go index cd92f28b62..f5851bd9da 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_private_virtual_interface.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_private_virtual_interface.go @@ -84,11 +84,22 @@ func resourceAwsDxPrivateVirtualInterface() *schema.Resource { Computed: true, ForceNew: true, }, + "mtu": { + Type: schema.TypeInt, + Default: 1500, + Optional: true, + ValidateFunc: validateIntegerInSlice([]int{1500, 9001}), + }, + "jumbo_frame_capable": { + Type: schema.TypeBool, + Computed: true, + }, "tags": tagsSchema(), }, Timeouts: &schema.ResourceTimeout{ Create: schema.DefaultTimeout(10 * time.Minute), + Update: schema.DefaultTimeout(10 * time.Minute), Delete: schema.DefaultTimeout(10 * time.Minute), }, } @@ -111,6 +122,7 @@ func resourceAwsDxPrivateVirtualInterfaceCreate(d *schema.ResourceData, meta int Vlan: aws.Int64(int64(d.Get("vlan").(int))), Asn: aws.Int64(int64(d.Get("bgp_asn").(int))), AddressFamily: aws.String(d.Get("address_family").(string)), + Mtu: aws.Int64(int64(d.Get("mtu").(int))), }, } if vgwOk && vgwIdRaw.(string) != "" { @@ -145,7 +157,7 @@ func resourceAwsDxPrivateVirtualInterfaceCreate(d *schema.ResourceData, meta int }.String() d.Set("arn", arn) - if err := dxPrivateVirtualInterfaceWaitUntilAvailable(d, conn); err != nil { + if err := dxPrivateVirtualInterfaceWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutCreate)); err != nil { return err } @@ -175,6 +187,8 @@ func resourceAwsDxPrivateVirtualInterfaceRead(d *schema.ResourceData, meta inter d.Set("amazon_address", vif.AmazonAddress) d.Set("vpn_gateway_id", vif.VirtualGatewayId) d.Set("dx_gateway_id", vif.DirectConnectGatewayId) + d.Set("mtu", vif.Mtu) + d.Set("jumbo_frame_capable", vif.JumboFrameCapable) if err := getTagsDX(conn, d, d.Get("arn").(string)); err != nil { return err } @@ -187,6 +201,10 @@ func resourceAwsDxPrivateVirtualInterfaceUpdate(d *schema.ResourceData, meta int return err } + if err := dxPrivateVirtualInterfaceWaitUntilAvailable(meta.(*AWSClient).dxconn, d.Id(), d.Timeout(schema.TimeoutUpdate)); err != nil { + return err + } + return resourceAwsDxPrivateVirtualInterfaceRead(d, meta) } @@ -207,10 +225,11 @@ func resourceAwsDxPrivateVirtualInterfaceImport(d *schema.ResourceData, meta int return []*schema.ResourceData{d}, nil } -func dxPrivateVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { +func dxPrivateVirtualInterfaceWaitUntilAvailable(conn *directconnect.DirectConnect, vifId string, timeout time.Duration) error { return dxVirtualInterfaceWaitUntilAvailable( - d, conn, + vifId, + timeout, []string{ directconnect.VirtualInterfaceStatePending, }, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_public_virtual_interface.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_public_virtual_interface.go index bc072fe6d0..26d3cb3a1a 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_public_virtual_interface.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dx_public_virtual_interface.go @@ -131,7 +131,7 @@ func resourceAwsDxPublicVirtualInterfaceCreate(d *schema.ResourceData, meta inte }.String() d.Set("arn", arn) - if err := dxPublicVirtualInterfaceWaitUntilAvailable(d, conn); err != nil { + if err := dxPublicVirtualInterfaceWaitUntilAvailable(conn, d.Id(), d.Timeout(schema.TimeoutCreate)); err != nil { return err } @@ -208,10 +208,11 @@ func resourceAwsDxPublicVirtualInterfaceCustomizeDiff(diff *schema.ResourceDiff, return nil } -func dxPublicVirtualInterfaceWaitUntilAvailable(d *schema.ResourceData, conn *directconnect.DirectConnect) error { +func dxPublicVirtualInterfaceWaitUntilAvailable(conn *directconnect.DirectConnect, vifId string, timeout time.Duration) error { return dxVirtualInterfaceWaitUntilAvailable( - d, conn, + vifId, + timeout, []string{ directconnect.VirtualInterfaceStatePending, }, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table.go index 74997b1c3e..2fcc37d58c 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table.go @@ -688,7 +688,9 @@ func readDynamoDbTableTags(arn string, conn *dynamodb.DynamoDB) (map[string]stri output, err := conn.ListTagsOfResource(&dynamodb.ListTagsOfResourceInput{ ResourceArn: aws.String(arn), }) - if err != nil { + + // Do not fail if interfacing with dynamodb-local + if err != nil && !isAWSErr(err, "UnknownOperationException", "Tagging is not currently supported in DynamoDB Local.") { return nil, fmt.Errorf("Error reading tags from dynamodb resource: %s", err) } @@ -699,18 +701,6 @@ func readDynamoDbTableTags(arn string, conn *dynamodb.DynamoDB) (map[string]stri return result, nil } -func readDynamoDbPITR(table string, conn *dynamodb.DynamoDB) (bool, error) { - output, err := conn.DescribeContinuousBackups(&dynamodb.DescribeContinuousBackupsInput{ - TableName: aws.String(table), - }) - if err != nil { - return false, fmt.Errorf("Error reading backup status from dynamodb resource: %s", err) - } - - pitr := output.ContinuousBackupsDescription.PointInTimeRecoveryDescription - return *pitr.PointInTimeRecoveryStatus == dynamodb.PointInTimeRecoveryStatusEnabled, nil -} - // Waiters func waitForDynamoDbGSIToBeActive(tableName string, gsiName string, conn *dynamodb.DynamoDB) error { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table_migrate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table_migrate.go index 59865effc8..29eb38de47 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table_migrate.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_dynamodb_table_migrate.go @@ -3,10 +3,10 @@ package aws import ( "fmt" "log" + "strings" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/terraform" - "strings" ) func resourceAwsDynamoDbTableMigrateState( diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ebs_snapshot.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ebs_snapshot.go index 8e6eaba7fc..7821ece729 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ebs_snapshot.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ebs_snapshot.go @@ -73,9 +73,24 @@ func resourceAwsEbsSnapshotCreate(d *schema.ResourceData, meta interface{}) erro request.Description = aws.String(v.(string)) } - res, err := conn.CreateSnapshot(request) + var res *ec2.Snapshot + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + res, err = conn.CreateSnapshot(request) + + if isAWSErr(err, "SnapshotCreationPerVolumeRateExceeded", "The maximum per volume CreateSnapshot request rate has been exceeded") { + return resource.RetryableError(err) + } + + if err != nil { + return resource.NonRetryableError(err) + } + + return nil + }) + if err != nil { - return err + return fmt.Errorf("error creating EC2 EBS Snapshot: %s", err) } d.SetId(*res.SnapshotId) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ebs_snapshot_copy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ebs_snapshot_copy.go new file mode 100644 index 0000000000..f159541288 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ebs_snapshot_copy.go @@ -0,0 +1,176 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsEbsSnapshotCopy() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsEbsSnapshotCopyCreate, + Read: resourceAwsEbsSnapshotCopyRead, + Delete: resourceAwsEbsSnapshotCopyDelete, + + Schema: map[string]*schema.Schema{ + "volume_id": { + Type: schema.TypeString, + Computed: true, + }, + "description": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "owner_id": { + Type: schema.TypeString, + Computed: true, + }, + "owner_alias": { + Type: schema.TypeString, + Computed: true, + }, + "encrypted": { + Type: schema.TypeBool, + Optional: true, + ForceNew: true, + }, + "volume_size": { + Type: schema.TypeInt, + Computed: true, + }, + "kms_key_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "data_encryption_key_id": { + Type: schema.TypeString, + Computed: true, + }, + "source_region": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "source_snapshot_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "tags": { + Type: schema.TypeMap, + Optional: true, + ForceNew: true, + }, + }, + } +} + +func resourceAwsEbsSnapshotCopyCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + request := &ec2.CopySnapshotInput{ + SourceRegion: aws.String(d.Get("source_region").(string)), + SourceSnapshotId: aws.String(d.Get("source_snapshot_id").(string)), + } + if v, ok := d.GetOk("description"); ok { + request.Description = aws.String(v.(string)) + } + if v, ok := d.GetOk("encrypted"); ok { + request.Encrypted = aws.Bool(v.(bool)) + } + if v, ok := d.GetOk("kms_key_id"); ok { + request.KmsKeyId = aws.String(v.(string)) + } + + res, err := conn.CopySnapshot(request) + if err != nil { + return err + } + + d.SetId(*res.SnapshotId) + + err = resourceAwsEbsSnapshotCopyWaitForAvailable(d.Id(), conn) + if err != nil { + return err + } + + if err := setTags(conn, d); err != nil { + log.Printf("[WARN] error setting tags: %s", err) + } + + return resourceAwsEbsSnapshotCopyRead(d, meta) +} + +func resourceAwsEbsSnapshotCopyRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + req := &ec2.DescribeSnapshotsInput{ + SnapshotIds: []*string{aws.String(d.Id())}, + } + res, err := conn.DescribeSnapshots(req) + if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidSnapshotID.NotFound" { + log.Printf("Snapshot %q Not found - removing from state", d.Id()) + d.SetId("") + return nil + } + + snapshot := res.Snapshots[0] + + d.Set("description", snapshot.Description) + d.Set("owner_id", snapshot.OwnerId) + d.Set("encrypted", snapshot.Encrypted) + d.Set("owner_alias", snapshot.OwnerAlias) + d.Set("volume_id", snapshot.VolumeId) + d.Set("data_encryption_key_id", snapshot.DataEncryptionKeyId) + d.Set("kms_key_id", snapshot.KmsKeyId) + d.Set("volume_size", snapshot.VolumeSize) + + if err := d.Set("tags", tagsToMap(snapshot.Tags)); err != nil { + log.Printf("[WARN] error saving tags to state: %s", err) + } + + return nil +} + +func resourceAwsEbsSnapshotCopyDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + return resource.Retry(5*time.Minute, func() *resource.RetryError { + request := &ec2.DeleteSnapshotInput{ + SnapshotId: aws.String(d.Id()), + } + _, err := conn.DeleteSnapshot(request) + if err == nil { + return nil + } + + ebsErr, ok := err.(awserr.Error) + if ebsErr.Code() == "SnapshotInUse" { + return resource.RetryableError(fmt.Errorf("EBS SnapshotInUse - trying again while it detaches")) + } + + if !ok { + return resource.NonRetryableError(err) + } + + return resource.NonRetryableError(err) + }) +} + +func resourceAwsEbsSnapshotCopyWaitForAvailable(id string, conn *ec2.EC2) error { + log.Printf("Waiting for Snapshot %s to become available...", id) + + req := &ec2.DescribeSnapshotsInput{ + SnapshotIds: []*string{aws.String(id)}, + } + err := conn.WaitUntilSnapshotCompleted(req) + return err +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ebs_volume.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ebs_volume.go index 6b8d59775d..45dc65a89b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ebs_volume.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ebs_volume.go @@ -10,7 +10,6 @@ import ( "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -92,6 +91,14 @@ func resourceAwsEbsVolumeCreate(d *schema.ResourceData, meta interface{}) error if value, ok := d.GetOk("snapshot_id"); ok { request.SnapshotId = aws.String(value.(string)) } + if value, ok := d.GetOk("tags"); ok { + request.TagSpecifications = []*ec2.TagSpecification{ + { + ResourceType: aws.String(ec2.ResourceTypeVolume), + Tags: tagsFromMap(value.(map[string]interface{})), + }, + } + } // IOPs are only valid, and required for, storage type io1. The current minimu // is 100. Instead of a hard validation we we only apply the IOPs to the @@ -139,12 +146,6 @@ func resourceAwsEbsVolumeCreate(d *schema.ResourceData, meta interface{}) error d.SetId(*result.VolumeId) - if _, ok := d.GetOk("tags"); ok { - if err := setTags(conn, d); err != nil { - return errwrap.Wrapf("Error setting tags for EBS Volume: {{err}}", err) - } - } - return resourceAwsEbsVolumeRead(d, meta) } @@ -152,7 +153,7 @@ func resourceAWSEbsVolumeUpdate(d *schema.ResourceData, meta interface{}) error conn := meta.(*AWSClient).ec2conn if _, ok := d.GetOk("tags"); ok { if err := setTags(conn, d); err != nil { - return errwrap.Wrapf("Error updating tags for EBS Volume: {{err}}", err) + return fmt.Errorf("Error updating tags for EBS Volume: %s", err) } } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_capacity_reservation.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_capacity_reservation.go new file mode 100644 index 0000000000..46bae8a87a --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_capacity_reservation.go @@ -0,0 +1,260 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsEc2CapacityReservation() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsEc2CapacityReservationCreate, + Read: resourceAwsEc2CapacityReservationRead, + Update: resourceAwsEc2CapacityReservationUpdate, + Delete: resourceAwsEc2CapacityReservationDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "availability_zone": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "ebs_optimized": { + Type: schema.TypeBool, + Optional: true, + ForceNew: true, + Default: false, + }, + "end_date": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.ValidateRFC3339TimeString, + }, + "end_date_type": { + Type: schema.TypeString, + Optional: true, + Default: ec2.EndDateTypeUnlimited, + ValidateFunc: validation.StringInSlice([]string{ + ec2.EndDateTypeUnlimited, + ec2.EndDateTypeLimited, + }, false), + }, + "ephemeral_storage": { + Type: schema.TypeBool, + Optional: true, + ForceNew: true, + Default: false, + }, + "instance_count": { + Type: schema.TypeInt, + Required: true, + }, + "instance_match_criteria": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Default: ec2.InstanceMatchCriteriaOpen, + ValidateFunc: validation.StringInSlice([]string{ + ec2.InstanceMatchCriteriaOpen, + ec2.InstanceMatchCriteriaTargeted, + }, false), + }, + "instance_platform": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + ec2.CapacityReservationInstancePlatformLinuxUnix, + ec2.CapacityReservationInstancePlatformRedHatEnterpriseLinux, + ec2.CapacityReservationInstancePlatformSuselinux, + ec2.CapacityReservationInstancePlatformWindows, + ec2.CapacityReservationInstancePlatformWindowswithSqlserver, + ec2.CapacityReservationInstancePlatformWindowswithSqlserverEnterprise, + ec2.CapacityReservationInstancePlatformWindowswithSqlserverStandard, + ec2.CapacityReservationInstancePlatformWindowswithSqlserverWeb, + }, false), + }, + "instance_type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "tags": tagsSchema(), + "tenancy": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Default: ec2.CapacityReservationTenancyDefault, + ValidateFunc: validation.StringInSlice([]string{ + ec2.CapacityReservationTenancyDefault, + ec2.CapacityReservationTenancyDedicated, + }, false), + }, + }, + } +} + +func resourceAwsEc2CapacityReservationCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + opts := &ec2.CreateCapacityReservationInput{ + AvailabilityZone: aws.String(d.Get("availability_zone").(string)), + EndDateType: aws.String(d.Get("end_date_type").(string)), + InstanceCount: aws.Int64(int64(d.Get("instance_count").(int))), + InstancePlatform: aws.String(d.Get("instance_platform").(string)), + InstanceType: aws.String(d.Get("instance_type").(string)), + } + + if v, ok := d.GetOk("ebs_optimized"); ok { + opts.EbsOptimized = aws.Bool(v.(bool)) + } + + if v, ok := d.GetOk("end_date"); ok { + t, err := time.Parse(time.RFC3339, v.(string)) + if err != nil { + return fmt.Errorf("Error parsing EC2 Capacity Reservation end date: %s", err.Error()) + } + opts.EndDate = aws.Time(t) + } + + if v, ok := d.GetOk("ephemeral_storage"); ok { + opts.EphemeralStorage = aws.Bool(v.(bool)) + } + + if v, ok := d.GetOk("instance_match_criteria"); ok { + opts.InstanceMatchCriteria = aws.String(v.(string)) + } + + if v, ok := d.GetOk("tenancy"); ok { + opts.Tenancy = aws.String(v.(string)) + } + + if v, ok := d.GetOk("tags"); ok && len(v.(map[string]interface{})) > 0 { + opts.TagSpecifications = []*ec2.TagSpecification{ + { + // There is no constant in the SDK for this resource type + ResourceType: aws.String("capacity-reservation"), + Tags: tagsFromMap(v.(map[string]interface{})), + }, + } + } + + log.Printf("[DEBUG] Capacity reservation: %s", opts) + + out, err := conn.CreateCapacityReservation(opts) + if err != nil { + return fmt.Errorf("Error creating EC2 Capacity Reservation: %s", err) + } + d.SetId(*out.CapacityReservation.CapacityReservationId) + return resourceAwsEc2CapacityReservationRead(d, meta) +} + +func resourceAwsEc2CapacityReservationRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + resp, err := conn.DescribeCapacityReservations(&ec2.DescribeCapacityReservationsInput{ + CapacityReservationIds: []*string{aws.String(d.Id())}, + }) + + if err != nil { + return fmt.Errorf("Error describing EC2 Capacity Reservations: %s", err) + } + + // If nothing was found, then return no state + if len(resp.CapacityReservations) == 0 { + log.Printf("[WARN] EC2 Capacity Reservation (%s) not found, removing from state", d.Id()) + d.SetId("") + } + + reservation := resp.CapacityReservations[0] + + if aws.StringValue(reservation.State) == ec2.CapacityReservationStateCancelled || aws.StringValue(reservation.State) == ec2.CapacityReservationStateExpired { + log.Printf("[WARN] EC2 Capacity Reservation (%s) no longer active, removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("availability_zone", reservation.AvailabilityZone) + d.Set("ebs_optimized", reservation.EbsOptimized) + + d.Set("end_date", "") + if reservation.EndDate != nil { + d.Set("end_date", aws.TimeValue(reservation.EndDate).Format(time.RFC3339)) + } + + d.Set("end_date_type", reservation.EndDateType) + d.Set("ephemeral_storage", reservation.EphemeralStorage) + d.Set("instance_count", reservation.TotalInstanceCount) + d.Set("instance_match_criteria", reservation.InstanceMatchCriteria) + d.Set("instance_platform", reservation.InstancePlatform) + d.Set("instance_type", reservation.InstanceType) + + if err := d.Set("tags", tagsToMap(reservation.Tags)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + d.Set("tenancy", reservation.Tenancy) + + return nil +} + +func resourceAwsEc2CapacityReservationUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + d.Partial(true) + + if d.HasChange("tags") { + if err := setTags(conn, d); err != nil { + return err + } else { + d.SetPartial("tags") + } + } + + d.Partial(false) + + opts := &ec2.ModifyCapacityReservationInput{ + CapacityReservationId: aws.String(d.Id()), + EndDateType: aws.String(d.Get("end_date_type").(string)), + InstanceCount: aws.Int64(int64(d.Get("instance_count").(int))), + } + + if v, ok := d.GetOk("end_date"); ok { + t, err := time.Parse(time.RFC3339, v.(string)) + if err != nil { + return fmt.Errorf("Error parsing EC2 Capacity Reservation end date: %s", err.Error()) + } + opts.EndDate = aws.Time(t) + } + + log.Printf("[DEBUG] Capacity reservation: %s", opts) + + _, err := conn.ModifyCapacityReservation(opts) + if err != nil { + return fmt.Errorf("Error modifying EC2 Capacity Reservation: %s", err) + } + return resourceAwsEc2CapacityReservationRead(d, meta) +} + +func resourceAwsEc2CapacityReservationDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + opts := &ec2.CancelCapacityReservationInput{ + CapacityReservationId: aws.String(d.Id()), + } + + _, err := conn.CancelCapacityReservation(opts) + if err != nil { + return fmt.Errorf("Error cancelling EC2 Capacity Reservation: %s", err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_fleet.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_fleet.go new file mode 100644 index 0000000000..7e816cddef --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ec2_fleet.go @@ -0,0 +1,840 @@ +package aws + +import ( + "fmt" + "log" + "strconv" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ec2" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsEc2Fleet() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsEc2FleetCreate, + Read: resourceAwsEc2FleetRead, + Update: resourceAwsEc2FleetUpdate, + Delete: resourceAwsEc2FleetDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(10 * time.Minute), + Delete: schema.DefaultTimeout(10 * time.Minute), + Update: schema.DefaultTimeout(10 * time.Minute), + }, + + Schema: map[string]*schema.Schema{ + "excess_capacity_termination_policy": { + Type: schema.TypeString, + Optional: true, + Default: ec2.FleetExcessCapacityTerminationPolicyTermination, + ValidateFunc: validation.StringInSlice([]string{ + ec2.FleetExcessCapacityTerminationPolicyNoTermination, + ec2.FleetExcessCapacityTerminationPolicyTermination, + }, false), + }, + "launch_template_config": { + Type: schema.TypeList, + Required: true, + ForceNew: true, + MinItems: 1, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "launch_template_specification": { + Type: schema.TypeList, + Required: true, + ForceNew: true, + MinItems: 1, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "launch_template_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "launch_template_name": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "version": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + }, + }, + }, + "override": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + MaxItems: 50, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "availability_zone": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "instance_type": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "max_price": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "priority": { + Type: schema.TypeFloat, + Optional: true, + ForceNew: true, + }, + "subnet_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "weighted_capacity": { + Type: schema.TypeFloat, + Optional: true, + ForceNew: true, + }, + }, + }, + }, + }, + }, + }, + "on_demand_options": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if old == "1" && new == "0" { + return true + } + return false + }, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "allocation_strategy": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Default: "lowestPrice", + ValidateFunc: validation.StringInSlice([]string{ + // AWS SDK constant incorrect + // ec2.FleetOnDemandAllocationStrategyLowestPrice, + "lowestPrice", + ec2.FleetOnDemandAllocationStrategyPrioritized, + }, false), + }, + }, + }, + }, + "replace_unhealthy_instances": { + Type: schema.TypeBool, + Optional: true, + ForceNew: true, + }, + "spot_options": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if old == "1" && new == "0" { + return true + } + return false + }, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "allocation_strategy": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Default: "lowestPrice", + ValidateFunc: validation.StringInSlice([]string{ + ec2.SpotAllocationStrategyDiversified, + // AWS SDK constant incorrect + // ec2.SpotAllocationStrategyLowestPrice, + "lowestPrice", + }, false), + }, + "instance_interruption_behavior": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Default: ec2.SpotInstanceInterruptionBehaviorTerminate, + ValidateFunc: validation.StringInSlice([]string{ + ec2.SpotInstanceInterruptionBehaviorHibernate, + ec2.SpotInstanceInterruptionBehaviorStop, + ec2.SpotInstanceInterruptionBehaviorTerminate, + }, false), + }, + "instance_pools_to_use_count": { + Type: schema.TypeInt, + Optional: true, + ForceNew: true, + Default: 1, + ValidateFunc: validation.IntAtLeast(1), + }, + }, + }, + }, + "tags": { + Type: schema.TypeMap, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "target_capacity_specification": { + Type: schema.TypeList, + Required: true, + MinItems: 1, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "default_target_capacity_type": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + ec2.DefaultTargetCapacityTypeOnDemand, + ec2.DefaultTargetCapacityTypeSpot, + }, false), + }, + "on_demand_target_capacity": { + Type: schema.TypeInt, + Optional: true, + ForceNew: true, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + // Show difference for new resources + if d.Id() == "" { + return false + } + // Show difference if value is configured + if new != "0" { + return false + } + // Show difference if existing state reflects different default type + defaultTargetCapacityTypeO, _ := d.GetChange("target_capacity_specification.0.default_target_capacity_type") + if defaultTargetCapacityTypeO.(string) != ec2.DefaultTargetCapacityTypeOnDemand { + return false + } + // Show difference if existing state reflects different total capacity + oldInt, err := strconv.Atoi(old) + if err != nil { + log.Printf("[WARN] %s DiffSuppressFunc error converting %s to integer: %s", k, old, err) + return false + } + totalTargetCapacityO, _ := d.GetChange("target_capacity_specification.0.total_target_capacity") + if oldInt != totalTargetCapacityO.(int) { + return false + } + return true + }, + }, + "spot_target_capacity": { + Type: schema.TypeInt, + Optional: true, + ForceNew: true, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + // Show difference for new resources + if d.Id() == "" { + return false + } + // Show difference if value is configured + if new != "0" { + return false + } + // Show difference if existing state reflects different default type + defaultTargetCapacityTypeO, _ := d.GetChange("target_capacity_specification.0.default_target_capacity_type") + if defaultTargetCapacityTypeO.(string) != ec2.DefaultTargetCapacityTypeSpot { + return false + } + // Show difference if existing state reflects different total capacity + oldInt, err := strconv.Atoi(old) + if err != nil { + log.Printf("[WARN] %s DiffSuppressFunc error converting %s to integer: %s", k, old, err) + return false + } + totalTargetCapacityO, _ := d.GetChange("target_capacity_specification.0.total_target_capacity") + if oldInt != totalTargetCapacityO.(int) { + return false + } + return true + }, + }, + "total_target_capacity": { + Type: schema.TypeInt, + Required: true, + }, + }, + }, + }, + "terminate_instances": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + "terminate_instances_with_expiration": { + Type: schema.TypeBool, + Optional: true, + ForceNew: true, + }, + "type": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Default: ec2.FleetTypeMaintain, + ValidateFunc: validation.StringInSlice([]string{ + ec2.FleetTypeMaintain, + ec2.FleetTypeRequest, + }, false), + }, + }, + } +} + +func resourceAwsEc2FleetCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + input := &ec2.CreateFleetInput{ + ExcessCapacityTerminationPolicy: aws.String(d.Get("excess_capacity_termination_policy").(string)), + LaunchTemplateConfigs: expandEc2FleetLaunchTemplateConfigRequests(d.Get("launch_template_config").([]interface{})), + OnDemandOptions: expandEc2OnDemandOptionsRequest(d.Get("on_demand_options").([]interface{})), + ReplaceUnhealthyInstances: aws.Bool(d.Get("replace_unhealthy_instances").(bool)), + SpotOptions: expandEc2SpotOptionsRequest(d.Get("spot_options").([]interface{})), + TargetCapacitySpecification: expandEc2TargetCapacitySpecificationRequest(d.Get("target_capacity_specification").([]interface{})), + TerminateInstancesWithExpiration: aws.Bool(d.Get("terminate_instances_with_expiration").(bool)), + TagSpecifications: expandEc2TagSpecifications(d.Get("tags").(map[string]interface{})), + Type: aws.String(d.Get("type").(string)), + } + + log.Printf("[DEBUG] Creating EC2 Fleet: %s", input) + output, err := conn.CreateFleet(input) + if err != nil { + return fmt.Errorf("error creating EC2 Fleet: %s", err) + } + + d.SetId(aws.StringValue(output.FleetId)) + + // If a request type is fulfilled immediately, we can miss the transition from active to deleted + // Instead of an error here, allow the Read function to trigger recreation + target := []string{ec2.FleetStateCodeActive} + if d.Get("type").(string) == ec2.FleetTypeRequest { + target = append(target, ec2.FleetStateCodeDeleted) + target = append(target, ec2.FleetStateCodeDeletedRunning) + target = append(target, ec2.FleetStateCodeDeletedTerminating) + // AWS SDK constants incorrect + target = append(target, "deleted_running") + target = append(target, "deleted_terminating") + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{ec2.FleetStateCodeSubmitted}, + Target: target, + Refresh: ec2FleetRefreshFunc(conn, d.Id()), + Timeout: d.Timeout(schema.TimeoutCreate), + } + + log.Printf("[DEBUG] Waiting for EC2 Fleet (%s) activation", d.Id()) + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("error waiting for EC2 Fleet (%s) activation: %s", d.Id(), err) + } + + return resourceAwsEc2FleetRead(d, meta) +} + +func resourceAwsEc2FleetRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + input := &ec2.DescribeFleetsInput{ + FleetIds: []*string{aws.String(d.Id())}, + } + + log.Printf("[DEBUG] Reading EC2 Fleet (%s): %s", d.Id(), input) + output, err := conn.DescribeFleets(input) + + if isAWSErr(err, "InvalidFleetId.NotFound", "") { + log.Printf("[WARN] EC2 Fleet (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if err != nil { + return fmt.Errorf("error reading EC2 Fleet: %s", err) + } + + if output == nil || len(output.Fleets) == 0 { + log.Printf("[WARN] EC2 Fleet (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + var fleet *ec2.FleetData + for _, fleetData := range output.Fleets { + if fleetData == nil { + continue + } + if aws.StringValue(fleetData.FleetId) != d.Id() { + continue + } + fleet = fleetData + break + } + + if fleet == nil { + log.Printf("[WARN] EC2 Fleet (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + deletedStates := []string{ + ec2.FleetStateCodeDeleted, + ec2.FleetStateCodeDeletedRunning, + ec2.FleetStateCodeDeletedTerminating, + // AWS SDK constants are incorrect + "deleted_running", + "deleted_terminating", + } + for _, deletedState := range deletedStates { + if aws.StringValue(fleet.FleetState) == deletedState { + log.Printf("[WARN] EC2 Fleet (%s) in deleted state (%s), removing from state", d.Id(), aws.StringValue(fleet.FleetState)) + d.SetId("") + return nil + } + } + + d.Set("excess_capacity_termination_policy", fleet.ExcessCapacityTerminationPolicy) + + if err := d.Set("launch_template_config", flattenEc2FleetLaunchTemplateConfigs(fleet.LaunchTemplateConfigs)); err != nil { + return fmt.Errorf("error setting launch_template_config: %s", err) + } + + if err := d.Set("on_demand_options", flattenEc2OnDemandOptions(fleet.OnDemandOptions)); err != nil { + return fmt.Errorf("error setting on_demand_options: %s", err) + } + + d.Set("replace_unhealthy_instances", fleet.ReplaceUnhealthyInstances) + + if err := d.Set("spot_options", flattenEc2SpotOptions(fleet.SpotOptions)); err != nil { + return fmt.Errorf("error setting spot_options: %s", err) + } + + if err := d.Set("target_capacity_specification", flattenEc2TargetCapacitySpecification(fleet.TargetCapacitySpecification)); err != nil { + return fmt.Errorf("error setting target_capacity_specification: %s", err) + } + + d.Set("terminate_instances_with_expiration", fleet.TerminateInstancesWithExpiration) + d.Set("type", fleet.Type) + + if err := d.Set("tags", tagsToMap(fleet.Tags)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + return nil +} + +func resourceAwsEc2FleetUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + input := &ec2.ModifyFleetInput{ + ExcessCapacityTerminationPolicy: aws.String(d.Get("excess_capacity_termination_policy").(string)), + FleetId: aws.String(d.Id()), + // InvalidTargetCapacitySpecification: Currently we only support total target capacity modification. + // TargetCapacitySpecification: expandEc2TargetCapacitySpecificationRequest(d.Get("target_capacity_specification").([]interface{})), + TargetCapacitySpecification: &ec2.TargetCapacitySpecificationRequest{ + TotalTargetCapacity: aws.Int64(int64(d.Get("target_capacity_specification.0.total_target_capacity").(int))), + }, + } + + log.Printf("[DEBUG] Modifying EC2 Fleet (%s): %s", d.Id(), input) + _, err := conn.ModifyFleet(input) + + if err != nil { + return fmt.Errorf("error modifying EC2 Fleet: %s", err) + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{ec2.FleetStateCodeModifying}, + Target: []string{ec2.FleetStateCodeActive}, + Refresh: ec2FleetRefreshFunc(conn, d.Id()), + Timeout: d.Timeout(schema.TimeoutUpdate), + } + + log.Printf("[DEBUG] Waiting for EC2 Fleet (%s) modification", d.Id()) + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("error waiting for EC2 Fleet (%s) modification: %s", d.Id(), err) + } + + return resourceAwsEc2FleetRead(d, meta) +} + +func resourceAwsEc2FleetDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ec2conn + + input := &ec2.DeleteFleetsInput{ + FleetIds: []*string{aws.String(d.Id())}, + TerminateInstances: aws.Bool(d.Get("terminate_instances").(bool)), + } + + log.Printf("[DEBUG] Deleting EC2 Fleet (%s): %s", d.Id(), input) + _, err := conn.DeleteFleets(input) + + if isAWSErr(err, "InvalidFleetId.NotFound", "") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting EC2 Fleet: %s", err) + } + + pending := []string{ec2.FleetStateCodeActive} + target := []string{ec2.FleetStateCodeDeleted} + if d.Get("terminate_instances").(bool) { + pending = append(pending, ec2.FleetStateCodeDeletedTerminating) + // AWS SDK constant is incorrect: unexpected state 'deleted_terminating', wanted target 'deleted, deleted-terminating' + pending = append(pending, "deleted_terminating") + } else { + target = append(target, ec2.FleetStateCodeDeletedRunning) + // AWS SDK constant is incorrect: unexpected state 'deleted_running', wanted target 'deleted, deleted-running' + target = append(target, "deleted_running") + } + + stateConf := &resource.StateChangeConf{ + Pending: pending, + Target: target, + Refresh: ec2FleetRefreshFunc(conn, d.Id()), + Timeout: d.Timeout(schema.TimeoutDelete), + } + + log.Printf("[DEBUG] Waiting for EC2 Fleet (%s) deletion", d.Id()) + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("error waiting for EC2 Fleet (%s) deletion: %s", d.Id(), err) + } + + return nil +} + +func ec2FleetRefreshFunc(conn *ec2.EC2, fleetID string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + input := &ec2.DescribeFleetsInput{ + FleetIds: []*string{aws.String(fleetID)}, + } + + log.Printf("[DEBUG] Reading EC2 Fleet (%s): %s", fleetID, input) + output, err := conn.DescribeFleets(input) + + if isAWSErr(err, "InvalidFleetId.NotFound", "") { + return nil, ec2.FleetStateCodeDeleted, nil + } + + if err != nil { + return nil, "", fmt.Errorf("error reading EC2 Fleet: %s", err) + } + + if output == nil || len(output.Fleets) == 0 { + return nil, ec2.FleetStateCodeDeleted, nil + } + + var fleet *ec2.FleetData + for _, fleetData := range output.Fleets { + if fleetData == nil { + continue + } + if aws.StringValue(fleetData.FleetId) == fleetID { + fleet = fleetData + break + } + } + + if fleet == nil { + return nil, ec2.FleetStateCodeDeleted, nil + } + + return fleet, aws.StringValue(fleet.FleetState), nil + } +} + +func expandEc2FleetLaunchTemplateConfigRequests(l []interface{}) []*ec2.FleetLaunchTemplateConfigRequest { + fleetLaunchTemplateConfigRequests := make([]*ec2.FleetLaunchTemplateConfigRequest, len(l)) + for i, m := range l { + if m == nil { + fleetLaunchTemplateConfigRequests[i] = &ec2.FleetLaunchTemplateConfigRequest{} + continue + } + + fleetLaunchTemplateConfigRequests[i] = expandEc2FleetLaunchTemplateConfigRequest(m.(map[string]interface{})) + } + return fleetLaunchTemplateConfigRequests +} + +func expandEc2FleetLaunchTemplateConfigRequest(m map[string]interface{}) *ec2.FleetLaunchTemplateConfigRequest { + fleetLaunchTemplateConfigRequest := &ec2.FleetLaunchTemplateConfigRequest{ + LaunchTemplateSpecification: expandEc2LaunchTemplateSpecificationRequest(m["launch_template_specification"].([]interface{})), + } + + if v, ok := m["override"]; ok { + fleetLaunchTemplateConfigRequest.Overrides = expandEc2FleetLaunchTemplateOverridesRequests(v.([]interface{})) + } + + return fleetLaunchTemplateConfigRequest +} + +func expandEc2FleetLaunchTemplateOverridesRequests(l []interface{}) []*ec2.FleetLaunchTemplateOverridesRequest { + if len(l) == 0 { + return nil + } + + fleetLaunchTemplateOverridesRequests := make([]*ec2.FleetLaunchTemplateOverridesRequest, len(l)) + for i, m := range l { + if m == nil { + fleetLaunchTemplateOverridesRequests[i] = &ec2.FleetLaunchTemplateOverridesRequest{} + continue + } + + fleetLaunchTemplateOverridesRequests[i] = expandEc2FleetLaunchTemplateOverridesRequest(m.(map[string]interface{})) + } + return fleetLaunchTemplateOverridesRequests +} + +func expandEc2FleetLaunchTemplateOverridesRequest(m map[string]interface{}) *ec2.FleetLaunchTemplateOverridesRequest { + fleetLaunchTemplateOverridesRequest := &ec2.FleetLaunchTemplateOverridesRequest{} + + if v, ok := m["availability_zone"]; ok && v.(string) != "" { + fleetLaunchTemplateOverridesRequest.AvailabilityZone = aws.String(v.(string)) + } + + if v, ok := m["instance_type"]; ok && v.(string) != "" { + fleetLaunchTemplateOverridesRequest.InstanceType = aws.String(v.(string)) + } + + if v, ok := m["max_price"]; ok && v.(string) != "" { + fleetLaunchTemplateOverridesRequest.MaxPrice = aws.String(v.(string)) + } + + if v, ok := m["priority"]; ok && v.(float64) != 0.0 { + fleetLaunchTemplateOverridesRequest.Priority = aws.Float64(v.(float64)) + } + + if v, ok := m["subnet_id"]; ok && v.(string) != "" { + fleetLaunchTemplateOverridesRequest.SubnetId = aws.String(v.(string)) + } + + if v, ok := m["weighted_capacity"]; ok && v.(float64) != 0.0 { + fleetLaunchTemplateOverridesRequest.WeightedCapacity = aws.Float64(v.(float64)) + } + + return fleetLaunchTemplateOverridesRequest +} + +func expandEc2LaunchTemplateSpecificationRequest(l []interface{}) *ec2.FleetLaunchTemplateSpecificationRequest { + fleetLaunchTemplateSpecificationRequest := &ec2.FleetLaunchTemplateSpecificationRequest{} + + if len(l) == 0 || l[0] == nil { + return fleetLaunchTemplateSpecificationRequest + } + + m := l[0].(map[string]interface{}) + + if v, ok := m["launch_template_id"]; ok && v.(string) != "" { + fleetLaunchTemplateSpecificationRequest.LaunchTemplateId = aws.String(v.(string)) + } + + if v, ok := m["launch_template_name"]; ok && v.(string) != "" { + fleetLaunchTemplateSpecificationRequest.LaunchTemplateName = aws.String(v.(string)) + } + + if v, ok := m["version"]; ok && v.(string) != "" { + fleetLaunchTemplateSpecificationRequest.Version = aws.String(v.(string)) + } + + return fleetLaunchTemplateSpecificationRequest +} + +func expandEc2OnDemandOptionsRequest(l []interface{}) *ec2.OnDemandOptionsRequest { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + return &ec2.OnDemandOptionsRequest{ + AllocationStrategy: aws.String(m["allocation_strategy"].(string)), + } +} + +func expandEc2SpotOptionsRequest(l []interface{}) *ec2.SpotOptionsRequest { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + spotOptionsRequest := &ec2.SpotOptionsRequest{ + AllocationStrategy: aws.String(m["allocation_strategy"].(string)), + InstanceInterruptionBehavior: aws.String(m["instance_interruption_behavior"].(string)), + } + + // InvalidFleetConfig: InstancePoolsToUseCount option is only available with the lowestPrice allocation strategy. + if aws.StringValue(spotOptionsRequest.AllocationStrategy) == "lowestPrice" { + spotOptionsRequest.InstancePoolsToUseCount = aws.Int64(int64(m["instance_pools_to_use_count"].(int))) + } + + return spotOptionsRequest +} + +func expandEc2TagSpecifications(m map[string]interface{}) []*ec2.TagSpecification { + if len(m) == 0 { + return nil + } + + return []*ec2.TagSpecification{ + { + ResourceType: aws.String("fleet"), + Tags: tagsFromMap(m), + }, + } +} + +func expandEc2TargetCapacitySpecificationRequest(l []interface{}) *ec2.TargetCapacitySpecificationRequest { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + targetCapacitySpecificationrequest := &ec2.TargetCapacitySpecificationRequest{ + TotalTargetCapacity: aws.Int64(int64(m["total_target_capacity"].(int))), + } + + if v, ok := m["default_target_capacity_type"]; ok && v.(string) != "" { + targetCapacitySpecificationrequest.DefaultTargetCapacityType = aws.String(v.(string)) + } + + if v, ok := m["on_demand_target_capacity"]; ok && v.(int) != 0 { + targetCapacitySpecificationrequest.OnDemandTargetCapacity = aws.Int64(int64(v.(int))) + } + + if v, ok := m["spot_target_capacity"]; ok && v.(int) != 0 { + targetCapacitySpecificationrequest.SpotTargetCapacity = aws.Int64(int64(v.(int))) + } + + return targetCapacitySpecificationrequest +} + +func flattenEc2FleetLaunchTemplateConfigs(fleetLaunchTemplateConfigs []*ec2.FleetLaunchTemplateConfig) []interface{} { + l := make([]interface{}, len(fleetLaunchTemplateConfigs)) + + for i, fleetLaunchTemplateConfig := range fleetLaunchTemplateConfigs { + if fleetLaunchTemplateConfig == nil { + l[i] = map[string]interface{}{} + continue + } + m := map[string]interface{}{ + "launch_template_specification": flattenEc2FleetLaunchTemplateSpecification(fleetLaunchTemplateConfig.LaunchTemplateSpecification), + "override": flattenEc2FleetLaunchTemplateOverrides(fleetLaunchTemplateConfig.Overrides), + } + l[i] = m + } + + return l +} + +func flattenEc2FleetLaunchTemplateOverrides(fleetLaunchTemplateOverrides []*ec2.FleetLaunchTemplateOverrides) []interface{} { + l := make([]interface{}, len(fleetLaunchTemplateOverrides)) + + for i, fleetLaunchTemplateOverride := range fleetLaunchTemplateOverrides { + if fleetLaunchTemplateOverride == nil { + l[i] = map[string]interface{}{} + continue + } + m := map[string]interface{}{ + "availability_zone": aws.StringValue(fleetLaunchTemplateOverride.AvailabilityZone), + "instance_type": aws.StringValue(fleetLaunchTemplateOverride.InstanceType), + "max_price": aws.StringValue(fleetLaunchTemplateOverride.MaxPrice), + "priority": aws.Float64Value(fleetLaunchTemplateOverride.Priority), + "subnet_id": aws.StringValue(fleetLaunchTemplateOverride.SubnetId), + "weighted_capacity": aws.Float64Value(fleetLaunchTemplateOverride.WeightedCapacity), + } + l[i] = m + } + + return l +} + +func flattenEc2FleetLaunchTemplateSpecification(fleetLaunchTemplateSpecification *ec2.FleetLaunchTemplateSpecification) []interface{} { + if fleetLaunchTemplateSpecification == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "launch_template_id": aws.StringValue(fleetLaunchTemplateSpecification.LaunchTemplateId), + "launch_template_name": aws.StringValue(fleetLaunchTemplateSpecification.LaunchTemplateName), + "version": aws.StringValue(fleetLaunchTemplateSpecification.Version), + } + + return []interface{}{m} +} + +func flattenEc2OnDemandOptions(onDemandOptions *ec2.OnDemandOptions) []interface{} { + if onDemandOptions == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "allocation_strategy": aws.StringValue(onDemandOptions.AllocationStrategy), + } + + return []interface{}{m} +} + +func flattenEc2SpotOptions(spotOptions *ec2.SpotOptions) []interface{} { + if spotOptions == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "allocation_strategy": aws.StringValue(spotOptions.AllocationStrategy), + "instance_interruption_behavior": aws.StringValue(spotOptions.InstanceInterruptionBehavior), + "instance_pools_to_use_count": aws.Int64Value(spotOptions.InstancePoolsToUseCount), + } + + // API will omit InstancePoolsToUseCount if AllocationStrategy is diversified, which breaks our Default: 1 + // Here we just reset it to 1 to prevent removing the Default and setting up a special DiffSuppressFunc + if spotOptions.InstancePoolsToUseCount == nil && aws.StringValue(spotOptions.AllocationStrategy) == ec2.SpotAllocationStrategyDiversified { + m["instance_pools_to_use_count"] = 1 + } + + return []interface{}{m} +} + +func flattenEc2TargetCapacitySpecification(targetCapacitySpecification *ec2.TargetCapacitySpecification) []interface{} { + if targetCapacitySpecification == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "default_target_capacity_type": aws.StringValue(targetCapacitySpecification.DefaultTargetCapacityType), + "on_demand_target_capacity": aws.Int64Value(targetCapacitySpecification.OnDemandTargetCapacity), + "spot_target_capacity": aws.Int64Value(targetCapacitySpecification.SpotTargetCapacity), + "total_target_capacity": aws.Int64Value(targetCapacitySpecification.TotalTargetCapacity), + } + + return []interface{}{m} +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_lifecycle_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_lifecycle_policy.go index 6a2be9110f..31b73e6488 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_lifecycle_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_lifecycle_policy.go @@ -4,6 +4,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ecr" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsEcrLifecyclePolicy() *schema.Resource { @@ -26,7 +27,7 @@ func resourceAwsEcrLifecyclePolicy() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentJsonDiffs, }, "registry_id": { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_repository.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_repository.go index 20a1638734..8b540432b0 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_repository.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecr_repository.go @@ -22,6 +22,10 @@ func resourceAwsEcrRepository() *schema.Resource { State: schema.ImportStatePassthrough, }, + Timeouts: &schema.ResourceTimeout{ + Delete: schema.DefaultTimeout(20 * time.Minute), + }, + Schema: map[string]*schema.Schema{ "name": { Type: schema.TypeString, @@ -72,14 +76,30 @@ func resourceAwsEcrRepositoryRead(d *schema.ResourceData, meta interface{}) erro conn := meta.(*AWSClient).ecrconn log.Printf("[DEBUG] Reading repository %s", d.Id()) - out, err := conn.DescribeRepositories(&ecr.DescribeRepositoriesInput{ + var out *ecr.DescribeRepositoriesOutput + input := &ecr.DescribeRepositoriesInput{ RepositoryNames: []*string{aws.String(d.Id())}, + } + + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + out, err = conn.DescribeRepositories(input) + if d.IsNewResource() && isAWSErr(err, ecr.ErrCodeRepositoryNotFoundException, "") { + return resource.RetryableError(err) + } + if err != nil { + return resource.NonRetryableError(err) + } + return nil }) + + if isAWSErr(err, ecr.ErrCodeRepositoryNotFoundException, "") { + log.Printf("[WARN] ECR Repository (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + if err != nil { - if ecrerr, ok := err.(awserr.Error); ok && ecrerr.Code() == "RepositoryNotFoundException" { - d.SetId("") - return nil - } return err } @@ -109,7 +129,7 @@ func resourceAwsEcrRepositoryDelete(d *schema.ResourceData, meta interface{}) er } log.Printf("[DEBUG] Waiting for ECR Repository %q to be deleted", d.Id()) - err = resource.Retry(20*time.Minute, func() *resource.RetryError { + err = resource.Retry(d.Timeout(schema.TimeoutDelete), func() *resource.RetryError { _, err := conn.DescribeRepositories(&ecr.DescribeRepositoriesInput{ RepositoryNames: []*string{aws.String(d.Id())}, }) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_cluster.go index 5b25b9e6aa..032318ed24 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_cluster.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_cluster.go @@ -17,6 +17,7 @@ func resourceAwsEcsCluster() *schema.Resource { return &schema.Resource{ Create: resourceAwsEcsClusterCreate, Read: resourceAwsEcsClusterRead, + Update: resourceAwsEcsClusterUpdate, Delete: resourceAwsEcsClusterDelete, Importer: &schema.ResourceImporter{ State: resourceAwsEcsClusterImport, @@ -28,7 +29,7 @@ func resourceAwsEcsCluster() *schema.Resource { Required: true, ForceNew: true, }, - + "tags": tagsSchema(), "arn": { Type: schema.TypeString, Computed: true, @@ -57,6 +58,7 @@ func resourceAwsEcsClusterCreate(d *schema.ResourceData, meta interface{}) error out, err := conn.CreateCluster(&ecs.CreateClusterInput{ ClusterName: aws.String(clusterName), + Tags: tagsFromMapECS(d.Get("tags").(map[string]interface{})), }) if err != nil { return err @@ -64,42 +66,118 @@ func resourceAwsEcsClusterCreate(d *schema.ResourceData, meta interface{}) error log.Printf("[DEBUG] ECS cluster %s created", *out.Cluster.ClusterArn) d.SetId(*out.Cluster.ClusterArn) - d.Set("arn", out.Cluster.ClusterArn) - d.Set("name", out.Cluster.ClusterName) - return nil + + return resourceAwsEcsClusterRead(d, meta) } func resourceAwsEcsClusterRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ecsconn - clusterName := d.Get("name").(string) - log.Printf("[DEBUG] Reading ECS cluster %s", clusterName) - out, err := conn.DescribeClusters(&ecs.DescribeClustersInput{ - Clusters: []*string{aws.String(clusterName)}, + input := &ecs.DescribeClustersInput{ + Clusters: []*string{aws.String(d.Id())}, + Include: []*string{aws.String(ecs.ClusterFieldTags)}, + } + + log.Printf("[DEBUG] Reading ECS Cluster: %s", input) + var out *ecs.DescribeClustersOutput + err := resource.Retry(2*time.Minute, func() *resource.RetryError { + var err error + out, err = conn.DescribeClusters(input) + + if err != nil { + return resource.NonRetryableError(err) + } + + if out == nil || len(out.Failures) > 0 { + if d.IsNewResource() { + return resource.RetryableError(&resource.NotFoundError{}) + } + return resource.NonRetryableError(&resource.NotFoundError{}) + } + + return nil }) + + if isResourceNotFoundError(err) { + log.Printf("[WARN] ECS Cluster (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + if err != nil { - return err + return fmt.Errorf("error reading ECS Cluster (%s): %s", d.Id(), err) } - log.Printf("[DEBUG] Received ECS clusters: %s", out.Clusters) + var cluster *ecs.Cluster for _, c := range out.Clusters { - if *c.ClusterName == clusterName { - // Status==INACTIVE means deleted cluster - if *c.Status == "INACTIVE" { - log.Printf("[DEBUG] Removing ECS cluster %q because it's INACTIVE", *c.ClusterArn) - d.SetId("") - return nil + if aws.StringValue(c.ClusterArn) == d.Id() { + cluster = c + break + } + } + + if cluster == nil { + log.Printf("[WARN] ECS Cluster (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + // Status==INACTIVE means deleted cluster + if aws.StringValue(cluster.Status) == "INACTIVE" { + log.Printf("[WARN] ECS Cluster (%s) deleted, removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("arn", cluster.ClusterArn) + d.Set("name", cluster.ClusterName) + + if err := d.Set("tags", tagsToMapECS(cluster.Tags)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + + return nil +} + +func resourceAwsEcsClusterUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ecsconn + + if d.HasChange("tags") { + oldTagsRaw, newTagsRaw := d.GetChange("tags") + oldTagsMap := oldTagsRaw.(map[string]interface{}) + newTagsMap := newTagsRaw.(map[string]interface{}) + createTags, removeTags := diffTagsECS(tagsFromMapECS(oldTagsMap), tagsFromMapECS(newTagsMap)) + + if len(removeTags) > 0 { + removeTagKeys := make([]*string, len(removeTags)) + for i, removeTag := range removeTags { + removeTagKeys[i] = removeTag.Key } - d.SetId(*c.ClusterArn) - d.Set("arn", c.ClusterArn) - d.Set("name", c.ClusterName) - return nil + input := &ecs.UntagResourceInput{ + ResourceArn: aws.String(d.Id()), + TagKeys: removeTagKeys, + } + + log.Printf("[DEBUG] Untagging ECS Cluster: %s", input) + if _, err := conn.UntagResource(input); err != nil { + return fmt.Errorf("error untagging ECS Cluster (%s): %s", d.Id(), err) + } + } + + if len(createTags) > 0 { + input := &ecs.TagResourceInput{ + ResourceArn: aws.String(d.Id()), + Tags: createTags, + } + + log.Printf("[DEBUG] Tagging ECS Cluster: %s", input) + if _, err := conn.TagResource(input); err != nil { + return fmt.Errorf("error tagging ECS Cluster (%s): %s", d.Id(), err) + } } } - log.Printf("[ERR] No matching ECS Cluster found for (%s)", d.Id()) - d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_service.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_service.go index a8050269ba..99cef30153 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_service.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_service.go @@ -4,7 +4,6 @@ import ( "bytes" "fmt" "log" - "regexp" "strings" "time" @@ -17,8 +16,6 @@ import ( "github.com/hashicorp/terraform/helper/validation" ) -var taskDefinitionRE = regexp.MustCompile("^([a-zA-Z0-9_-]+):([0-9]+)$") - func resourceAwsEcsService() *schema.Resource { return &schema.Resource{ Create: resourceAwsEcsServiceCreate, @@ -59,6 +56,12 @@ func resourceAwsEcsService() *schema.Resource { }, }, + "enable_ecs_managed_tags": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + "health_check_grace_period_seconds": { Type: schema.TypeInt, Optional: true, @@ -95,7 +98,7 @@ func resourceAwsEcsService() *schema.Resource { Optional: true, Default: 200, DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if d.Get("scheduling_strategy").(string) == ecs.SchedulingStrategyDaemon { + if d.Get("scheduling_strategy").(string) == ecs.SchedulingStrategyDaemon && new == "200" { return true } return false @@ -107,7 +110,7 @@ func resourceAwsEcsService() *schema.Resource { Optional: true, Default: 100, DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if d.Get("scheduling_strategy").(string) == ecs.SchedulingStrategyDaemon { + if d.Get("scheduling_strategy").(string) == ecs.SchedulingStrategyDaemon && new == "100" { return true } return false @@ -300,13 +303,14 @@ func resourceAwsEcsService() *schema.Resource { }, }, }, + "tags": tagsSchema(), }, } } func resourceAwsEcsServiceImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { if len(strings.Split(d.Id(), "/")) != 2 { - return []*schema.ResourceData{}, fmt.Errorf("[ERR] Wrong format of resource: %s. Please follow 'cluster-name/service-name'", d.Id()) + return []*schema.ResourceData{}, fmt.Errorf("Wrong format of resource: %s. Please follow 'cluster-name/service-name'", d.Id()) } cluster := strings.Split(d.Id(), "/")[0] name := strings.Split(d.Id(), "/")[1] @@ -327,15 +331,28 @@ func resourceAwsEcsServiceImport(d *schema.ResourceData, meta interface{}) ([]*s func resourceAwsEcsServiceCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ecsconn + deploymentMinimumHealthyPercent := d.Get("deployment_minimum_healthy_percent").(int) + schedulingStrategy := d.Get("scheduling_strategy").(string) + input := ecs.CreateServiceInput{ - ServiceName: aws.String(d.Get("name").(string)), - TaskDefinition: aws.String(d.Get("task_definition").(string)), - DesiredCount: aws.Int64(int64(d.Get("desired_count").(int))), - ClientToken: aws.String(resource.UniqueId()), - DeploymentConfiguration: &ecs.DeploymentConfiguration{ + ClientToken: aws.String(resource.UniqueId()), + SchedulingStrategy: aws.String(schedulingStrategy), + ServiceName: aws.String(d.Get("name").(string)), + Tags: tagsFromMapECS(d.Get("tags").(map[string]interface{})), + TaskDefinition: aws.String(d.Get("task_definition").(string)), + EnableECSManagedTags: aws.Bool(d.Get("enable_ecs_managed_tags").(bool)), + } + + if schedulingStrategy == ecs.SchedulingStrategyDaemon && deploymentMinimumHealthyPercent != 100 { + input.DeploymentConfiguration = &ecs.DeploymentConfiguration{ + MinimumHealthyPercent: aws.Int64(int64(deploymentMinimumHealthyPercent)), + } + } else if schedulingStrategy == ecs.SchedulingStrategyReplica { + input.DeploymentConfiguration = &ecs.DeploymentConfiguration{ MaximumPercent: aws.Int64(int64(d.Get("deployment_maximum_percent").(int))), - MinimumHealthyPercent: aws.Int64(int64(d.Get("deployment_minimum_healthy_percent").(int))), - }, + MinimumHealthyPercent: aws.Int64(int64(deploymentMinimumHealthyPercent)), + } + input.DesiredCount = aws.Int64(int64(d.Get("desired_count").(int))) } if v, ok := d.GetOk("cluster"); ok { @@ -350,14 +367,6 @@ func resourceAwsEcsServiceCreate(d *schema.ResourceData, meta interface{}) error input.LaunchType = aws.String(v.(string)) } - schedulingStrategy := d.Get("scheduling_strategy").(string) - input.SchedulingStrategy = aws.String(schedulingStrategy) - if schedulingStrategy == ecs.SchedulingStrategyDaemon { - // unset these if DAEMON - input.DeploymentConfiguration = nil - input.DesiredCount = nil - } - loadBalancers := expandEcsLoadBalancers(d.Get("load_balancer").(*schema.Set).List()) if len(loadBalancers) > 0 { log.Printf("[DEBUG] Adding ECS load balancers: %s", loadBalancers) @@ -468,8 +477,9 @@ func resourceAwsEcsServiceRead(d *schema.ResourceData, meta interface{}) error { log.Printf("[DEBUG] Reading ECS service %s", d.Id()) input := ecs.DescribeServicesInput{ - Services: []*string{aws.String(d.Id())}, Cluster: aws.String(d.Get("cluster").(string)), + Include: []*string{aws.String(ecs.ServiceFieldTags)}, + Services: []*string{aws.String(d.Id())}, } var out *ecs.DescribeServicesOutput @@ -487,7 +497,9 @@ func resourceAwsEcsServiceRead(d *schema.ResourceData, meta interface{}) error { if d.IsNewResource() { return resource.RetryableError(fmt.Errorf("ECS service not created yet: %q", d.Id())) } - return resource.NonRetryableError(fmt.Errorf("No ECS service found: %q", d.Id())) + log.Printf("[WARN] ECS Service %s not found, removing from state.", d.Id()) + d.SetId("") + return nil } service := out.Services[0] @@ -533,6 +545,7 @@ func resourceAwsEcsServiceRead(d *schema.ResourceData, meta interface{}) error { d.Set("desired_count", service.DesiredCount) d.Set("health_check_grace_period_seconds", service.HealthCheckGracePeriodSeconds) d.Set("launch_type", service.LaunchType) + d.Set("enable_ecs_managed_tags", service.EnableECSManagedTags) // Save cluster in the same format if strings.HasPrefix(d.Get("cluster").(string), "arn:"+meta.(*AWSClient).partition+":ecs:") { @@ -575,11 +588,15 @@ func resourceAwsEcsServiceRead(d *schema.ResourceData, meta interface{}) error { } if err := d.Set("network_configuration", flattenEcsNetworkConfiguration(service.NetworkConfiguration)); err != nil { - return fmt.Errorf("[ERR] Error setting network_configuration for (%s): %s", d.Id(), err) + return fmt.Errorf("Error setting network_configuration for (%s): %s", d.Id(), err) } if err := d.Set("service_registries", flattenServiceRegistries(service.ServiceRegistries)); err != nil { - return fmt.Errorf("[ERR] Error setting service_registries for (%s): %s", d.Id(), err) + return fmt.Errorf("Error setting service_registries for (%s): %s", d.Id(), err) + } + + if err := d.Set("tags", tagsToMapECS(service.Tags)); err != nil { + return fmt.Errorf("error setting tags: %s", err) } return nil @@ -646,11 +663,14 @@ func flattenPlacementStrategyDeprecated(pss []*ecs.PlacementStrategy) []map[stri for _, ps := range pss { c := make(map[string]interface{}) c["type"] = *ps.Type - c["field"] = *ps.Field - // for some fields the API requires lowercase for creation but will return uppercase on query - if *ps.Field == "MEMORY" || *ps.Field == "CPU" { - c["field"] = strings.ToLower(*ps.Field) + if ps.Field != nil { + c["field"] = *ps.Field + + // for some fields the API requires lowercase for creation but will return uppercase on query + if *ps.Field == "MEMORY" || *ps.Field == "CPU" { + c["field"] = strings.ToLower(*ps.Field) + } } results = append(results, c) @@ -662,7 +682,7 @@ func expandPlacementStrategy(s []interface{}) ([]*ecs.PlacementStrategy, error) if len(s) == 0 { return nil, nil } - ps := make([]*ecs.PlacementStrategy, 0) + pss := make([]*ecs.PlacementStrategy, 0) for _, raw := range s { p := raw.(map[string]interface{}) t := p["type"].(string) @@ -670,19 +690,23 @@ func expandPlacementStrategy(s []interface{}) ([]*ecs.PlacementStrategy, error) if err := validateAwsEcsPlacementStrategy(t, f); err != nil { return nil, err } - ps = append(ps, &ecs.PlacementStrategy{ - Type: aws.String(t), - Field: aws.String(f), - }) + ps := &ecs.PlacementStrategy{ + Type: aws.String(t), + } + if f != "" { + // Field must be omitted (i.e. not empty string) for random strategy + ps.Field = aws.String(f) + } + pss = append(pss, ps) } - return ps, nil + return pss, nil } func expandPlacementStrategyDeprecated(s *schema.Set) ([]*ecs.PlacementStrategy, error) { if len(s.List()) == 0 { return nil, nil } - ps := make([]*ecs.PlacementStrategy, 0) + pss := make([]*ecs.PlacementStrategy, 0) for _, raw := range s.List() { p := raw.(map[string]interface{}) t := p["type"].(string) @@ -690,12 +714,16 @@ func expandPlacementStrategyDeprecated(s *schema.Set) ([]*ecs.PlacementStrategy, if err := validateAwsEcsPlacementStrategy(t, f); err != nil { return nil, err } - ps = append(ps, &ecs.PlacementStrategy{ - Type: aws.String(t), - Field: aws.String(f), - }) + ps := &ecs.PlacementStrategy{ + Type: aws.String(t), + } + if f != "" { + // Field must be omitted (i.e. not empty string) for random strategy + ps.Field = aws.String(f) + } + pss = append(pss, ps) } - return ps, nil + return pss, nil } func flattenPlacementStrategy(pss []*ecs.PlacementStrategy) []interface{} { @@ -706,11 +734,14 @@ func flattenPlacementStrategy(pss []*ecs.PlacementStrategy) []interface{} { for _, ps := range pss { c := make(map[string]interface{}) c["type"] = *ps.Type - c["field"] = *ps.Field - // for some fields the API requires lowercase for creation but will return uppercase on query - if *ps.Field == "MEMORY" || *ps.Field == "CPU" { - c["field"] = strings.ToLower(*ps.Field) + if ps.Field != nil { + c["field"] = *ps.Field + + // for some fields the API requires lowercase for creation but will return uppercase on query + if *ps.Field == "MEMORY" || *ps.Field == "CPU" { + c["field"] = strings.ToLower(*ps.Field) + } } results = append(results, c) @@ -743,57 +774,109 @@ func flattenServiceRegistries(srs []*ecs.ServiceRegistry) []map[string]interface func resourceAwsEcsServiceUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ecsconn + updateService := false - log.Printf("[DEBUG] Updating ECS service %s", d.Id()) input := ecs.UpdateServiceInput{ Service: aws.String(d.Id()), Cluster: aws.String(d.Get("cluster").(string)), } schedulingStrategy := d.Get("scheduling_strategy").(string) - // Automatically ignore desired count if DAEMON - if schedulingStrategy != ecs.SchedulingStrategyDaemon && d.HasChange("desired_count") { - _, n := d.GetChange("desired_count") - input.DesiredCount = aws.Int64(int64(n.(int))) + + if schedulingStrategy == ecs.SchedulingStrategyDaemon { + if d.HasChange("deployment_minimum_healthy_percent") { + updateService = true + input.DeploymentConfiguration = &ecs.DeploymentConfiguration{ + MinimumHealthyPercent: aws.Int64(int64(d.Get("deployment_minimum_healthy_percent").(int))), + } + } + } else if schedulingStrategy == ecs.SchedulingStrategyReplica { + if d.HasChange("desired_count") { + updateService = true + input.DesiredCount = aws.Int64(int64(d.Get("desired_count").(int))) + } + + if d.HasChange("deployment_maximum_percent") || d.HasChange("deployment_minimum_healthy_percent") { + updateService = true + input.DeploymentConfiguration = &ecs.DeploymentConfiguration{ + MaximumPercent: aws.Int64(int64(d.Get("deployment_maximum_percent").(int))), + MinimumHealthyPercent: aws.Int64(int64(d.Get("deployment_minimum_healthy_percent").(int))), + } + } } + if d.HasChange("health_check_grace_period_seconds") { - _, n := d.GetChange("health_check_grace_period_seconds") - input.HealthCheckGracePeriodSeconds = aws.Int64(int64(n.(int))) - } - if d.HasChange("task_definition") { - _, n := d.GetChange("task_definition") - input.TaskDefinition = aws.String(n.(string)) + updateService = true + input.HealthCheckGracePeriodSeconds = aws.Int64(int64(d.Get("health_check_grace_period_seconds").(int))) } - if schedulingStrategy != ecs.SchedulingStrategyDaemon && (d.HasChange("deployment_maximum_percent") || d.HasChange("deployment_minimum_healthy_percent")) { - input.DeploymentConfiguration = &ecs.DeploymentConfiguration{ - MaximumPercent: aws.Int64(int64(d.Get("deployment_maximum_percent").(int))), - MinimumHealthyPercent: aws.Int64(int64(d.Get("deployment_minimum_healthy_percent").(int))), - } + if d.HasChange("task_definition") { + updateService = true + input.TaskDefinition = aws.String(d.Get("task_definition").(string)) } if d.HasChange("network_configuration") { + updateService = true input.NetworkConfiguration = expandEcsNetworkConfiguration(d.Get("network_configuration").([]interface{})) } - // Retry due to IAM eventual consistency - err := resource.Retry(2*time.Minute, func() *resource.RetryError { - out, err := conn.UpdateService(&input) + if updateService { + log.Printf("[DEBUG] Updating ECS Service (%s): %s", d.Id(), input) + // Retry due to IAM eventual consistency + err := resource.Retry(2*time.Minute, func() *resource.RetryError { + out, err := conn.UpdateService(&input) + if err != nil { + if isAWSErr(err, ecs.ErrCodeInvalidParameterException, "Please verify that the ECS service role being passed has the proper permissions.") { + return resource.RetryableError(err) + } + if isAWSErr(err, ecs.ErrCodeInvalidParameterException, "does not have an associated load balancer") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + + log.Printf("[DEBUG] Updated ECS service %s", out.Service) + return nil + }) if err != nil { - if isAWSErr(err, ecs.ErrCodeInvalidParameterException, "Please verify that the ECS service role being passed has the proper permissions.") { - return resource.RetryableError(err) + return fmt.Errorf("error updating ECS Service (%s): %s", d.Id(), err) + } + } + + if d.HasChange("tags") { + oldTagsRaw, newTagsRaw := d.GetChange("tags") + oldTagsMap := oldTagsRaw.(map[string]interface{}) + newTagsMap := newTagsRaw.(map[string]interface{}) + createTags, removeTags := diffTagsECS(tagsFromMapECS(oldTagsMap), tagsFromMapECS(newTagsMap)) + + if len(removeTags) > 0 { + removeTagKeys := make([]*string, len(removeTags)) + for i, removeTag := range removeTags { + removeTagKeys[i] = removeTag.Key } - if isAWSErr(err, ecs.ErrCodeInvalidParameterException, "does not have an associated load balancer") { - return resource.RetryableError(err) + + input := &ecs.UntagResourceInput{ + ResourceArn: aws.String(d.Id()), + TagKeys: removeTagKeys, + } + + log.Printf("[DEBUG] Untagging ECS Cluster: %s", input) + if _, err := conn.UntagResource(input); err != nil { + return fmt.Errorf("error untagging ECS Cluster (%s): %s", d.Id(), err) } - return resource.NonRetryableError(err) } - log.Printf("[DEBUG] Updated ECS service %s", out.Service) - return nil - }) - if err != nil { - return err + if len(createTags) > 0 { + input := &ecs.TagResourceInput{ + ResourceArn: aws.String(d.Id()), + Tags: createTags, + } + + log.Printf("[DEBUG] Tagging ECS Cluster: %s", input) + if _, err := conn.TagResource(input); err != nil { + return fmt.Errorf("error tagging ECS Cluster (%s): %s", d.Id(), err) + } + } } return resourceAwsEcsServiceRead(d, meta) @@ -915,15 +998,3 @@ func buildFamilyAndRevisionFromARN(arn string) string { func getNameFromARN(arn string) string { return strings.Split(arn, "/")[1] } - -func parseTaskDefinition(taskDefinition string) (string, string, error) { - matches := taskDefinitionRE.FindAllStringSubmatch(taskDefinition, 2) - - if len(matches) == 0 || len(matches[0]) != 3 { - return "", "", fmt.Errorf( - "Invalid task definition format, family:rev or ARN expected (%#v)", - taskDefinition) - } - - return matches[0][1], matches[0][2], nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_task_definition.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_task_definition.go index fbf3a329c1..f58a4f5ab4 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_task_definition.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ecs_task_definition.go @@ -17,6 +17,7 @@ func resourceAwsEcsTaskDefinition() *schema.Resource { return &schema.Resource{ Create: resourceAwsEcsTaskDefinitionCreate, Read: resourceAwsEcsTaskDefinitionRead, + Update: resourceAwsEcsTaskDefinitionUpdate, Delete: resourceAwsEcsTaskDefinitionDelete, SchemaVersion: 1, @@ -54,7 +55,9 @@ func resourceAwsEcsTaskDefinition() *schema.Resource { return json }, DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - equal, _ := ecsContainerDefinitionsAreEquivalent(old, new) + networkMode, ok := d.GetOk("network_mode") + isAWSVPC := ok && networkMode.(string) == ecs.NetworkModeAwsvpc + equal, _ := EcsContainerDefinitionsAreEquivalent(old, new, isAWSVPC) return equal }, ValidateFunc: validateAwsEcsTaskDefinitionContainerDefinitions, @@ -108,6 +111,50 @@ func resourceAwsEcsTaskDefinition() *schema.Resource { Optional: true, ForceNew: true, }, + + "docker_volume_configuration": { + Type: schema.TypeList, + Optional: true, + ForceNew: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "scope": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + ecs.ScopeShared, + ecs.ScopeTask, + }, false), + }, + "autoprovision": { + Type: schema.TypeBool, + Optional: true, + ForceNew: true, + Default: false, + }, + "driver": { + Type: schema.TypeString, + ForceNew: true, + Optional: true, + }, + "driver_opts": { + Type: schema.TypeMap, + Elem: &schema.Schema{Type: schema.TypeString}, + ForceNew: true, + Optional: true, + }, + "labels": { + Type: schema.TypeMap, + Elem: &schema.Schema{Type: schema.TypeString}, + ForceNew: true, + Optional: true, + }, + }, + }, + }, }, }, Set: resourceAwsEcsTaskDefinitionVolumeHash, @@ -140,6 +187,29 @@ func resourceAwsEcsTaskDefinition() *schema.Resource { ForceNew: true, Elem: &schema.Schema{Type: schema.TypeString}, }, + + "ipc_mode": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + ecs.IpcModeHost, + ecs.IpcModeNone, + ecs.IpcModeTask, + }, false), + }, + + "pid_mode": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + ecs.PidModeHost, + ecs.PidModeTask, + }, false), + }, + + "tags": tagsSchema(), }, } } @@ -167,6 +237,11 @@ func resourceAwsEcsTaskDefinitionCreate(d *schema.ResourceData, meta interface{} Family: aws.String(d.Get("family").(string)), } + // ClientException: Tags can not be empty. + if v, ok := d.GetOk("tags"); ok { + input.Tags = tagsFromMapECS(v.(map[string]interface{})) + } + if v, ok := d.GetOk("task_role_arn"); ok { input.TaskRoleArn = aws.String(v.(string)) } @@ -187,6 +262,14 @@ func resourceAwsEcsTaskDefinitionCreate(d *schema.ResourceData, meta interface{} input.NetworkMode = aws.String(v.(string)) } + if v, ok := d.GetOk("ipc_mode"); ok { + input.IpcMode = aws.String(v.(string)) + } + + if v, ok := d.GetOk("pid_mode"); ok { + input.PidMode = aws.String(v.(string)) + } + if v, ok := d.GetOk("volume"); ok { volumes, err := expandEcsVolumes(v.(*schema.Set).List()) if err != nil { @@ -240,6 +323,7 @@ func resourceAwsEcsTaskDefinitionRead(d *schema.ResourceData, meta interface{}) log.Printf("[DEBUG] Reading task definition %s", d.Id()) out, err := conn.DescribeTaskDefinition(&ecs.DescribeTaskDefinitionInput{ TaskDefinition: aws.String(d.Get("arn").(string)), + Include: []*string{aws.String(ecs.TaskDefinitionFieldTags)}, }) if err != nil { return err @@ -275,6 +359,10 @@ func resourceAwsEcsTaskDefinitionRead(d *schema.ResourceData, meta interface{}) d.Set("memory", taskDefinition.Memory) d.Set("network_mode", taskDefinition.NetworkMode) + if err := d.Set("tags", tagsToMapECS(out.Tags)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } + if err := d.Set("volume", flattenEcsVolumes(taskDefinition.Volumes)); err != nil { return fmt.Errorf("error setting volume: %s", err) } @@ -304,6 +392,48 @@ func flattenPlacementConstraints(pcs []*ecs.TaskDefinitionPlacementConstraint) [ return results } +func resourceAwsEcsTaskDefinitionUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).ecsconn + + if d.HasChange("tags") { + oldTagsRaw, newTagsRaw := d.GetChange("tags") + oldTagsMap := oldTagsRaw.(map[string]interface{}) + newTagsMap := newTagsRaw.(map[string]interface{}) + createTags, removeTags := diffTagsECS(tagsFromMapECS(oldTagsMap), tagsFromMapECS(newTagsMap)) + + if len(removeTags) > 0 { + removeTagKeys := make([]*string, len(removeTags)) + for i, removeTag := range removeTags { + removeTagKeys[i] = removeTag.Key + } + + input := &ecs.UntagResourceInput{ + ResourceArn: aws.String(d.Get("arn").(string)), + TagKeys: removeTagKeys, + } + + log.Printf("[DEBUG] Untagging ECS Cluster: %s", input) + if _, err := conn.UntagResource(input); err != nil { + return fmt.Errorf("error untagging ECS Cluster (%s): %s", d.Get("arn").(string), err) + } + } + + if len(createTags) > 0 { + input := &ecs.TagResourceInput{ + ResourceArn: aws.String(d.Get("arn").(string)), + Tags: createTags, + } + + log.Printf("[DEBUG] Tagging ECS Cluster: %s", input) + if _, err := conn.TagResource(input); err != nil { + return fmt.Errorf("error tagging ECS Cluster (%s): %s", d.Get("arn").(string), err) + } + } + } + + return nil +} + func resourceAwsEcsTaskDefinitionDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ecsconn @@ -324,6 +454,5 @@ func resourceAwsEcsTaskDefinitionVolumeHash(v interface{}) int { m := v.(map[string]interface{}) buf.WriteString(fmt.Sprintf("%s-", m["name"].(string))) buf.WriteString(fmt.Sprintf("%s-", m["host_path"].(string))) - return hashcode.String(buf.String()) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_file_system.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_file_system.go index df70788150..4e06fe6e59 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_file_system.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_file_system.go @@ -7,6 +7,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/efs" "github.com/hashicorp/terraform/helper/resource" @@ -26,12 +27,16 @@ func resourceAwsEfsFileSystem() *schema.Resource { }, Schema: map[string]*schema.Schema{ + "arn": { + Type: schema.TypeString, + Computed: true, + }, "creation_token": { Type: schema.TypeString, Optional: true, Computed: true, ForceNew: true, - ValidateFunc: validateMaxLength(64), + ValidateFunc: validation.StringLenBetween(0, 64), }, "reference_name": { @@ -279,6 +284,15 @@ func resourceAwsEfsFileSystemRead(d *schema.ResourceData, meta interface{}) erro return nil } + fsARN := arn.ARN{ + AccountID: meta.(*AWSClient).accountid, + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Resource: fmt.Sprintf("file-system/%s", aws.StringValue(fs.FileSystemId)), + Service: "elasticfilesystem", + }.String() + + d.Set("arn", fsARN) d.Set("creation_token", fs.CreationToken) d.Set("encrypted", fs.Encrypted) d.Set("kms_key_id", fs.KmsKeyId) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_mount_target.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_mount_target.go index fe1d87bf18..ee1d8e0cb7 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_mount_target.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_efs_mount_target.go @@ -6,6 +6,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/efs" @@ -25,6 +26,10 @@ func resourceAwsEfsMountTarget() *schema.Resource { }, Schema: map[string]*schema.Schema{ + "file_system_arn": { + Type: schema.TypeString, + Computed: true, + }, "file_system_id": { Type: schema.TypeString, Required: true, @@ -182,6 +187,16 @@ func resourceAwsEfsMountTargetRead(d *schema.ResourceData, meta interface{}) err log.Printf("[DEBUG] Found EFS mount target: %#v", mt) d.SetId(*mt.MountTargetId) + + fsARN := arn.ARN{ + AccountID: meta.(*AWSClient).accountid, + Partition: meta.(*AWSClient).partition, + Region: meta.(*AWSClient).region, + Resource: fmt.Sprintf("file-system/%s", aws.StringValue(mt.FileSystemId)), + Service: "elasticfilesystem", + }.String() + + d.Set("file_system_arn", fsARN) d.Set("file_system_id", mt.FileSystemId) d.Set("ip_address", mt.IpAddress) d.Set("subnet_id", mt.SubnetId) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_egress_only_internet_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_egress_only_internet_gateway.go index 0d5256a159..bb4cd863a3 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_egress_only_internet_gateway.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_egress_only_internet_gateway.go @@ -6,9 +6,7 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -41,69 +39,42 @@ func resourceAwsEgressOnlyInternetGatewayCreate(d *schema.ResourceData, meta int d.SetId(*resp.EgressOnlyInternetGateway.EgressOnlyInternetGatewayId) - err = resource.Retry(5*time.Minute, func() *resource.RetryError { - igRaw, _, err := EIGWStateRefreshFunc(conn, d.Id())() - if igRaw != nil { - return nil - } - if err == nil { - return resource.RetryableError(err) - } else { - return resource.NonRetryableError(err) - } - }) - if err != nil { - return errwrap.Wrapf("{{err}}", err) + return fmt.Errorf("%s", err) } return resourceAwsEgressOnlyInternetGatewayRead(d, meta) } -func EIGWStateRefreshFunc(conn *ec2.EC2, id string) resource.StateRefreshFunc { - return func() (interface{}, string, error) { - resp, err := conn.DescribeEgressOnlyInternetGateways(&ec2.DescribeEgressOnlyInternetGatewaysInput{ - EgressOnlyInternetGatewayIds: []*string{aws.String(id)}, - }) - if err != nil { - ec2err, ok := err.(awserr.Error) - if ok && ec2err.Code() == "InvalidEgressInternetGatewayID.NotFound" { - resp = nil - } else { - log.Printf("[ERROR] Error on EIGWStateRefreshFunc: %s", err) - return nil, "", err - } - } - if len(resp.EgressOnlyInternetGateways) < 1 { - resp = nil - } - - if resp == nil { - // Sometimes AWS just has consistency issues and doesn't see - // our instance yet. Return an empty state. - return nil, "", nil - } - - ig := resp.EgressOnlyInternetGateways[0] - return ig, "available", nil - } -} - func resourceAwsEgressOnlyInternetGatewayRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - resp, err := conn.DescribeEgressOnlyInternetGateways(&ec2.DescribeEgressOnlyInternetGatewaysInput{ + var found bool + var req = &ec2.DescribeEgressOnlyInternetGatewaysInput{ EgressOnlyInternetGatewayIds: []*string{aws.String(d.Id())}, - }) - if err != nil { - return fmt.Errorf("Error describing egress internet gateway: %s", err) } - found := false - for _, igw := range resp.EgressOnlyInternetGateways { - if *igw.EgressOnlyInternetGatewayId == d.Id() { - found = true + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + resp, err := conn.DescribeEgressOnlyInternetGateways(req) + if err != nil { + return resource.NonRetryableError(err) + } + if resp != nil && len(resp.EgressOnlyInternetGateways) > 0 { + for _, igw := range resp.EgressOnlyInternetGateways { + if aws.StringValue(igw.EgressOnlyInternetGatewayId) == d.Id() { + found = true + break + } + } + } + if d.IsNewResource() && !found { + return resource.RetryableError(fmt.Errorf("Egress Only Internet Gateway (%s) not found.", d.Id())) } + return nil + }) + + if err != nil { + return fmt.Errorf("Error describing egress internet gateway: %s", err) } if !found { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_eip.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_eip.go index 16833166df..c3f8a1d580 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_eip.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_eip.go @@ -80,6 +80,13 @@ func resourceAwsEip() *schema.Resource { Optional: true, }, + "public_ipv4_pool": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Computed: true, + }, + "tags": tagsSchema(), }, } @@ -98,6 +105,10 @@ func resourceAwsEipCreate(d *schema.ResourceData, meta interface{}) error { Domain: aws.String(domainOpt), } + if v, ok := d.GetOk("public_ipv4_pool"); ok { + allocOpts.PublicIpv4Pool = aws.String(v.(string)) + } + log.Printf("[DEBUG] EIP create configuration: %#v", allocOpts) allocResp, err := ec2conn.AllocateAddress(allocOpts) if err != nil { @@ -211,6 +222,7 @@ func resourceAwsEipRead(d *schema.ResourceData, meta interface{}) error { } d.Set("private_ip", address.PrivateIpAddress) d.Set("public_ip", address.PublicIp) + d.Set("public_ipv4_pool", address.PublicIpv4Pool) // On import (domain never set, which it must've been if we created), // set the 'vpc' attribute depending on if we're in a VPC. diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_environment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_environment.go index 19aa4dffae..ae7ae16d51 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_environment.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_beanstalk_environment.go @@ -121,12 +121,18 @@ func resourceAwsElasticBeanstalkEnvironment() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ConflictsWith: []string{"template_name"}, + ConflictsWith: []string{"platform_arn", "template_name"}, + }, + "platform_arn": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ConflictsWith: []string{"solution_stack_name", "template_name"}, }, "template_name": { Type: schema.TypeString, Optional: true, - ConflictsWith: []string{"solution_stack_name"}, + ConflictsWith: []string{"solution_stack_name", "platform_arn"}, }, "wait_for_ready_timeout": { Type: schema.TypeString, @@ -211,6 +217,7 @@ func resourceAwsElasticBeanstalkEnvironmentCreate(d *schema.ResourceData, meta i version := d.Get("version_label").(string) settings := d.Get("setting").(*schema.Set) solutionStack := d.Get("solution_stack_name").(string) + platformArn := d.Get("platform_arn").(string) templateName := d.Get("template_name").(string) // TODO set tags @@ -254,6 +261,10 @@ func resourceAwsElasticBeanstalkEnvironmentCreate(d *schema.ResourceData, meta i createOpts.SolutionStackName = aws.String(solutionStack) } + if platformArn != "" { + createOpts.PlatformArn = aws.String(platformArn) + } + if templateName != "" { createOpts.TemplateName = aws.String(templateName) } @@ -400,6 +411,13 @@ func resourceAwsElasticBeanstalkEnvironmentUpdate(d *schema.ResourceData, meta i updateOpts.OptionSettings = add } + if d.HasChange("platform_arn") { + hasChange = true + if v, ok := d.GetOk("platform_arn"); ok { + updateOpts.PlatformArn = aws.String(v.(string)) + } + } + if d.HasChange("template_name") { hasChange = true if v, ok := d.GetOk("template_name"); ok { @@ -608,6 +626,10 @@ func resourceAwsElasticBeanstalkEnvironmentRead(d *schema.ResourceData, meta int return err } + if err := d.Set("platform_arn", env.PlatformArn); err != nil { + return err + } + if err := d.Set("autoscaling_groups", flattenBeanstalkAsg(resources.EnvironmentResources.AutoScalingGroups)); err != nil { return err } @@ -803,7 +825,7 @@ func environmentStateRefreshFunc(conn *elasticbeanstalk.ElasticBeanstalk, enviro }) if err != nil { log.Printf("[Err] Error waiting for Elastic Beanstalk Environment state: %s", err) - return -1, "failed", fmt.Errorf("[Err] Error waiting for Elastic Beanstalk Environment state: %s", err) + return -1, "failed", fmt.Errorf("Error waiting for Elastic Beanstalk Environment state: %s", err) } if resp == nil || len(resp.Environments) == 0 { @@ -820,7 +842,7 @@ func environmentStateRefreshFunc(conn *elasticbeanstalk.ElasticBeanstalk, enviro } if env == nil { - return -1, "failed", fmt.Errorf("[Err] Error finding Elastic Beanstalk Environment, environment not found") + return -1, "failed", fmt.Errorf("Error finding Elastic Beanstalk Environment, environment not found") } envErrors, err := getBeanstalkEnvironmentErrors(conn, environmentId, t) @@ -968,7 +990,7 @@ func getBeanstalkEnvironmentErrors(conn *elasticbeanstalk.ElasticBeanstalk, envi }) if err != nil { - return nil, fmt.Errorf("[Err] Unable to get Elastic Beanstalk Evironment events: %s", err) + return nil, fmt.Errorf("Unable to get Elastic Beanstalk Evironment events: %s", err) } var events beanstalkEnvironmentErrors @@ -980,7 +1002,7 @@ func getBeanstalkEnvironmentErrors(conn *elasticbeanstalk.ElasticBeanstalk, envi } events = append(events, e) } - sort.Sort(beanstalkEnvironmentErrors(events)) + sort.Sort(events) var result *multierror.Error for _, event := range events { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_transcoder_pipeline.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_transcoder_pipeline.go index 6a0d883528..d4954d29a2 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_transcoder_pipeline.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_transcoder_pipeline.go @@ -18,6 +18,9 @@ func resourceAwsElasticTranscoderPipeline() *schema.Resource { Read: resourceAwsElasticTranscoderPipelineRead, Update: resourceAwsElasticTranscoderPipelineUpdate, Delete: resourceAwsElasticTranscoderPipelineDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "arn": { @@ -210,7 +213,7 @@ func resourceAwsElasticTranscoderPipelineCreate(d *schema.ResourceData, meta int if (req.OutputBucket == nil && (req.ContentConfig == nil || req.ContentConfig.Bucket == nil)) || (req.OutputBucket != nil && req.ContentConfig != nil && req.ContentConfig.Bucket != nil) { - return fmt.Errorf("[ERROR] you must specify only one of output_bucket or content_config.bucket") + return fmt.Errorf("you must specify only one of output_bucket or content_config.bucket") } log.Printf("[DEBUG] Elastic Transcoder Pipeline create opts: %s", req) @@ -323,11 +326,18 @@ func expandETPermList(permissions *schema.Set) []*elastictranscoder.Permission { var perms []*elastictranscoder.Permission for _, p := range permissions.List() { + if p == nil { + continue + } + + m := p.(map[string]interface{}) + perm := &elastictranscoder.Permission{ - Access: getStringPtrList(p.(map[string]interface{}), "access"), + Access: expandStringList(m["access"].([]interface{})), Grantee: getStringPtr(p, "grantee"), GranteeType: getStringPtr(p, "grantee_type"), } + perms = append(perms, perm) } return perms diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_transcoder_preset.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_transcoder_preset.go index e74b5f429f..cea85f33cd 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_transcoder_preset.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elastic_transcoder_preset.go @@ -16,6 +16,9 @@ func resourceAwsElasticTranscoderPreset() *schema.Resource { Create: resourceAwsElasticTranscoderPresetCreate, Read: resourceAwsElasticTranscoderPresetRead, Delete: resourceAwsElasticTranscoderPresetDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "arn": { @@ -324,7 +327,7 @@ func resourceAwsElasticTranscoderPresetCreate(d *schema.ResourceData, meta inter Container: aws.String(d.Get("container").(string)), Description: getStringPtr(d, "description"), Thumbnails: expandETThumbnails(d), - Video: exapandETVideoParams(d), + Video: expandETVideoParams(d), } if name, ok := d.GetOk("name"); ok { @@ -415,7 +418,7 @@ func expandETAudioCodecOptions(d *schema.ResourceData) *elastictranscoder.AudioC return codecOpts } -func exapandETVideoParams(d *schema.ResourceData) *elastictranscoder.VideoParameters { +func expandETVideoParams(d *schema.ResourceData) *elastictranscoder.VideoParameters { s := d.Get("video").(*schema.Set) if s == nil || s.Len() == 0 { return nil @@ -500,6 +503,7 @@ func resourceAwsElasticTranscoderPresetRead(d *schema.ResourceData, meta interfa d.Set("container", *preset.Container) d.Set("name", *preset.Name) + d.Set("description", *preset.Description) if preset.Thumbnails != nil { err := d.Set("thumbnails", flattenETThumbnails(preset.Thumbnails)) @@ -590,14 +594,14 @@ func flattenETVideoParams(video *elastictranscoder.VideoParameters) []map[string return m.MapList() } -func flattenETVideoCodecOptions(opts map[string]*string) []map[string]interface{} { +func flattenETVideoCodecOptions(opts map[string]*string) map[string]interface{} { codecOpts := setMap(make(map[string]interface{})) for k, v := range opts { codecOpts.SetString(k, v) } - return codecOpts.MapList() + return codecOpts.Map() } func flattenETWatermarks(watermarks []*elastictranscoder.PresetWatermark) []map[string]interface{} { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_cluster.go index 49b0d42b78..5986e487ca 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_cluster.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_cluster.go @@ -18,238 +18,7 @@ import ( "github.com/hashicorp/terraform/helper/validation" ) -func resourceAwsElastiCacheCommonSchema() map[string]*schema.Schema { - - return map[string]*schema.Schema{ - "availability_zones": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "node_type": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "engine": { - Type: schema.TypeString, - Optional: true, - //Computed: true, Set in resourceAwsElasticacheCluster because this Schema is used in resource_aws_elasticache_replication_group with a default value. - ForceNew: true, - }, - "engine_version": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "parameter_group_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - }, - "subnet_group_name": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - }, - "security_group_names": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "security_group_ids": { - Type: schema.TypeSet, - Optional: true, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - // A single-element string list containing an Amazon Resource Name (ARN) that - // uniquely identifies a Redis RDB snapshot file stored in Amazon S3. The snapshot - // file will be used to populate the node group. - // - // See also: - // https://github.com/aws/aws-sdk-go/blob/4862a174f7fc92fb523fc39e68f00b87d91d2c3d/service/elasticache/api.go#L2079 - "snapshot_arns": { - Type: schema.TypeSet, - Optional: true, - ForceNew: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - }, - "snapshot_window": { - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validateOnceADayWindowFormat, - }, - "snapshot_name": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - }, - - "maintenance_window": { - Type: schema.TypeString, - Optional: true, - Computed: true, - StateFunc: func(val interface{}) string { - // Elasticache always changes the maintenance - // to lowercase - return strings.ToLower(val.(string)) - }, - ValidateFunc: validateOnceAWeekWindowFormat, - }, - "port": { - Type: schema.TypeInt, - Optional: true, - ForceNew: true, - DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - // Supress default memcached/redis ports when not defined - if !d.IsNewResource() && new == "0" && (old == "6379" || old == "11211") { - return true - } - return false - }, - }, - "notification_topic_arn": { - Type: schema.TypeString, - Optional: true, - }, - - "snapshot_retention_limit": { - Type: schema.TypeInt, - Optional: true, - ValidateFunc: validation.IntAtMost(35), - }, - - "apply_immediately": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - }, - - "tags": tagsSchema(), - } -} - func resourceAwsElasticacheCluster() *schema.Resource { - resourceSchema := resourceAwsElastiCacheCommonSchema() - - resourceSchema["engine"].Computed = true - - resourceSchema["cluster_id"] = &schema.Schema{ - Type: schema.TypeString, - Required: true, - ForceNew: true, - StateFunc: func(val interface{}) string { - // Elasticache normalizes cluster ids to lowercase, - // so we have to do this too or else we can end up - // with non-converging diffs. - return strings.ToLower(val.(string)) - }, - ValidateFunc: validateElastiCacheClusterId, - } - - resourceSchema["num_cache_nodes"] = &schema.Schema{ - Type: schema.TypeInt, - Optional: true, - Computed: true, - } - - resourceSchema["az_mode"] = &schema.Schema{ - Type: schema.TypeString, - Optional: true, - Computed: true, - ValidateFunc: validation.StringInSlice([]string{ - elasticache.AZModeCrossAz, - elasticache.AZModeSingleAz, - }, false), - } - - resourceSchema["availability_zone"] = &schema.Schema{ - Type: schema.TypeString, - Optional: true, - Computed: true, - ForceNew: true, - } - - resourceSchema["availability_zones"].ConflictsWith = []string{"preferred_availability_zones"} - resourceSchema["availability_zones"].Deprecated = "Use `preferred_availability_zones` instead" - - resourceSchema["configuration_endpoint"] = &schema.Schema{ - Type: schema.TypeString, - Computed: true, - } - - resourceSchema["cluster_address"] = &schema.Schema{ - Type: schema.TypeString, - Computed: true, - } - - resourceSchema["cache_nodes"] = &schema.Schema{ - Type: schema.TypeList, - Computed: true, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "id": { - Type: schema.TypeString, - Computed: true, - }, - "address": { - Type: schema.TypeString, - Computed: true, - }, - "port": { - Type: schema.TypeInt, - Computed: true, - }, - "availability_zone": { - Type: schema.TypeString, - Computed: true, - }, - }, - }, - } - - resourceSchema["preferred_availability_zones"] = &schema.Schema{ - Type: schema.TypeList, - Optional: true, - Elem: &schema.Schema{Type: schema.TypeString}, - } - - resourceSchema["replication_group_id"] = &schema.Schema{ - Type: schema.TypeString, - Optional: true, - ForceNew: true, - ConflictsWith: []string{ - "availability_zones", - "az_mode", - "engine_version", - "engine", - "maintenance_window", - "node_type", - "notification_topic_arn", - "num_cache_nodes", - "parameter_group_name", - "port", - "security_group_ids", - "security_group_names", - "snapshot_arns", - "snapshot_name", - "snapshot_retention_limit", - "snapshot_window", - "subnet_group_name", - }, - Computed: true, - } - return &schema.Resource{ Create: resourceAwsElasticacheClusterCreate, Read: resourceAwsElasticacheClusterRead, @@ -259,7 +28,215 @@ func resourceAwsElasticacheCluster() *schema.Resource { State: schema.ImportStatePassthrough, }, - Schema: resourceSchema, + Schema: map[string]*schema.Schema{ + "apply_immediately": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, + "availability_zone": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "availability_zones": { + Type: schema.TypeSet, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + ConflictsWith: []string{"preferred_availability_zones"}, + Deprecated: "Use `preferred_availability_zones` instead", + }, + "az_mode": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{ + elasticache.AZModeCrossAz, + elasticache.AZModeSingleAz, + }, false), + }, + "cache_nodes": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Computed: true, + }, + "address": { + Type: schema.TypeString, + Computed: true, + }, + "port": { + Type: schema.TypeInt, + Computed: true, + }, + "availability_zone": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + "cluster_address": { + Type: schema.TypeString, + Computed: true, + }, + "cluster_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + StateFunc: func(val interface{}) string { + // Elasticache normalizes cluster ids to lowercase, + // so we have to do this too or else we can end up + // with non-converging diffs. + return strings.ToLower(val.(string)) + }, + ValidateFunc: validateElastiCacheClusterId, + }, + "configuration_endpoint": { + Type: schema.TypeString, + Computed: true, + }, + "engine": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "engine_version": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "maintenance_window": { + Type: schema.TypeString, + Optional: true, + Computed: true, + StateFunc: func(val interface{}) string { + // Elasticache always changes the maintenance + // to lowercase + return strings.ToLower(val.(string)) + }, + ValidateFunc: validateOnceAWeekWindowFormat, + }, + "node_type": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "notification_topic_arn": { + Type: schema.TypeString, + Optional: true, + }, + "num_cache_nodes": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, + "parameter_group_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "port": { + Type: schema.TypeInt, + Optional: true, + ForceNew: true, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + // Suppress default memcached/redis ports when not defined + if !d.IsNewResource() && new == "0" && (old == "6379" || old == "11211") { + return true + } + return false + }, + }, + "preferred_availability_zones": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "replication_group_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ConflictsWith: []string{ + "availability_zones", + "az_mode", + "engine_version", + "engine", + "maintenance_window", + "node_type", + "notification_topic_arn", + "num_cache_nodes", + "parameter_group_name", + "port", + "security_group_ids", + "security_group_names", + "snapshot_arns", + "snapshot_name", + "snapshot_retention_limit", + "snapshot_window", + "subnet_group_name", + }, + Computed: true, + }, + "security_group_names": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + "security_group_ids": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + // A single-element string list containing an Amazon Resource Name (ARN) that + // uniquely identifies a Redis RDB snapshot file stored in Amazon S3. The snapshot + // file will be used to populate the node group. + // + // See also: + // https://github.com/aws/aws-sdk-go/blob/4862a174f7fc92fb523fc39e68f00b87d91d2c3d/service/elasticache/api.go#L2079 + "snapshot_arns": { + Type: schema.TypeSet, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + "snapshot_retention_limit": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntAtMost(35), + }, + "snapshot_window": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validateOnceADayWindowFormat, + }, + "snapshot_name": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "subnet_group_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "tags": tagsSchema(), + }, CustomizeDiff: customdiff.Sequence( func(diff *schema.ResourceDiff, v interface{}) error { @@ -599,7 +576,7 @@ func resourceAwsElasticacheClusterUpdate(d *schema.ResourceData, meta interface{ n := nraw.(int) if n < o { log.Printf("[INFO] Cluster %s is marked for Decreasing cache nodes from %d to %d", d.Id(), o, n) - nodesToRemove := getCacheNodesToRemove(d, o, o-n) + nodesToRemove := getCacheNodesToRemove(o, o-n) req.CacheNodeIdsToRemove = nodesToRemove } else { log.Printf("[INFO] Cluster %s is marked for increasing cache nodes from %d to %d", d.Id(), o, n) @@ -628,7 +605,7 @@ func resourceAwsElasticacheClusterUpdate(d *schema.ResourceData, meta interface{ log.Printf("[DEBUG] Modifying ElastiCache Cluster (%s), opts:\n%s", d.Id(), req) _, err := conn.ModifyCacheCluster(req) if err != nil { - return fmt.Errorf("[WARN] Error updating ElastiCache cluster (%s), error: %s", d.Id(), err) + return fmt.Errorf("Error updating ElastiCache cluster (%s), error: %s", d.Id(), err) } log.Printf("[DEBUG] Waiting for update: %s", d.Id()) @@ -651,7 +628,7 @@ func resourceAwsElasticacheClusterUpdate(d *schema.ResourceData, meta interface{ return resourceAwsElasticacheClusterRead(d, meta) } -func getCacheNodesToRemove(d *schema.ResourceData, oldNumberOfNodes int, cacheNodesToRemove int) []*string { +func getCacheNodesToRemove(oldNumberOfNodes int, cacheNodesToRemove int) []*string { nodesIdsToRemove := []*string{} for i := oldNumberOfNodes; i > oldNumberOfNodes-cacheNodesToRemove && i > 0; i-- { s := fmt.Sprintf("%04d", i) @@ -727,7 +704,7 @@ func cacheClusterStateRefreshFunc(conn *elasticache.ElastiCache, clusterID, give } if len(resp.CacheClusters) == 0 { - return nil, "", fmt.Errorf("[WARN] Error: no Cache Clusters found for id (%s)", clusterID) + return nil, "", fmt.Errorf("Error: no Cache Clusters found for id (%s)", clusterID) } var c *elasticache.CacheCluster @@ -739,7 +716,7 @@ func cacheClusterStateRefreshFunc(conn *elasticache.ElastiCache, clusterID, give } if c == nil { - return nil, "", fmt.Errorf("[WARN] Error: no matching Elastic Cache cluster for id (%s)", clusterID) + return nil, "", fmt.Errorf("Error: no matching Elastic Cache cluster for id (%s)", clusterID) } log.Printf("[DEBUG] ElastiCache Cluster (%s) status: %v", clusterID, *c.CacheClusterStatus) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_parameter_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_parameter_group.go index 6bf249c558..3b7b2f4caf 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_parameter_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_parameter_group.go @@ -166,7 +166,7 @@ func resourceAwsElasticacheParameterGroupUpdate(d *schema.ResourceData, meta int maxParams := 20 for len(toRemove) > 0 { - paramsToModify := make([]*elasticache.ParameterNameValue, 0) + var paramsToModify []*elasticache.ParameterNameValue if len(toRemove) <= maxParams { paramsToModify, toRemove = toRemove[:], nil } else { @@ -194,7 +194,7 @@ func resourceAwsElasticacheParameterGroupUpdate(d *schema.ResourceData, meta int } for len(toAdd) > 0 { - paramsToModify := make([]*elasticache.ParameterNameValue, 0) + var paramsToModify []*elasticache.ParameterNameValue if len(toAdd) <= maxParams { paramsToModify, toAdd = toAdd[:], nil } else { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_replication_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_replication_group.go index af8bee4472..5a127aafd6 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_replication_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_replication_group.go @@ -11,113 +11,10 @@ import ( "github.com/aws/aws-sdk-go/service/elasticache" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsElasticacheReplicationGroup() *schema.Resource { - - resourceSchema := resourceAwsElastiCacheCommonSchema() - - resourceSchema["replication_group_id"] = &schema.Schema{ - Type: schema.TypeString, - Required: true, - ForceNew: true, - ValidateFunc: validateAwsElastiCacheReplicationGroupId, - StateFunc: func(val interface{}) string { - return strings.ToLower(val.(string)) - }, - } - - resourceSchema["automatic_failover_enabled"] = &schema.Schema{ - Type: schema.TypeBool, - Optional: true, - Default: false, - } - - resourceSchema["auto_minor_version_upgrade"] = &schema.Schema{ - Type: schema.TypeBool, - Optional: true, - Default: true, - } - - resourceSchema["replication_group_description"] = &schema.Schema{ - Type: schema.TypeString, - Required: true, - } - - resourceSchema["number_cache_clusters"] = &schema.Schema{ - Type: schema.TypeInt, - Computed: true, - Optional: true, - } - - resourceSchema["member_clusters"] = &schema.Schema{ - Type: schema.TypeSet, - Computed: true, - Elem: &schema.Schema{Type: schema.TypeString}, - Set: schema.HashString, - } - - resourceSchema["primary_endpoint_address"] = &schema.Schema{ - Type: schema.TypeString, - Computed: true, - } - - resourceSchema["configuration_endpoint_address"] = &schema.Schema{ - Type: schema.TypeString, - Computed: true, - } - - resourceSchema["cluster_mode"] = &schema.Schema{ - Type: schema.TypeList, - Optional: true, - // We allow Computed: true here since using number_cache_clusters - // and a cluster mode enabled parameter_group_name will create - // a single shard replication group with number_cache_clusters - 1 - // read replicas. Otherwise, the resource is marked ForceNew. - Computed: true, - MaxItems: 1, - Elem: &schema.Resource{ - Schema: map[string]*schema.Schema{ - "replicas_per_node_group": { - Type: schema.TypeInt, - Required: true, - ForceNew: true, - }, - "num_node_groups": { - Type: schema.TypeInt, - Required: true, - }, - }, - }, - } - - resourceSchema["engine"].Required = false - resourceSchema["engine"].Optional = true - resourceSchema["engine"].Default = "redis" - resourceSchema["engine"].ValidateFunc = validateAwsElastiCacheReplicationGroupEngine - - resourceSchema["at_rest_encryption_enabled"] = &schema.Schema{ - Type: schema.TypeBool, - Optional: true, - Default: false, - ForceNew: true, - } - - resourceSchema["transit_encryption_enabled"] = &schema.Schema{ - Type: schema.TypeBool, - Optional: true, - Default: false, - ForceNew: true, - } - - resourceSchema["auth_token"] = &schema.Schema{ - Type: schema.TypeString, - Optional: true, - Sensitive: true, - ForceNew: true, - ValidateFunc: validateAwsElastiCacheReplicationGroupAuthToken, - } - return &schema.Resource{ Create: resourceAwsElasticacheReplicationGroupCreate, Read: resourceAwsElasticacheReplicationGroupRead, @@ -127,7 +24,204 @@ func resourceAwsElasticacheReplicationGroup() *schema.Resource { State: schema.ImportStatePassthrough, }, - Schema: resourceSchema, + Schema: map[string]*schema.Schema{ + "apply_immediately": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, + "at_rest_encryption_enabled": { + Type: schema.TypeBool, + Optional: true, + Default: false, + ForceNew: true, + }, + "auth_token": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + ForceNew: true, + ValidateFunc: validateAwsElastiCacheReplicationGroupAuthToken, + }, + "auto_minor_version_upgrade": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "automatic_failover_enabled": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + "availability_zones": { + Type: schema.TypeSet, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + "cluster_mode": { + Type: schema.TypeList, + Optional: true, + // We allow Computed: true here since using number_cache_clusters + // and a cluster mode enabled parameter_group_name will create + // a single shard replication group with number_cache_clusters - 1 + // read replicas. Otherwise, the resource is marked ForceNew. + Computed: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "replicas_per_node_group": { + Type: schema.TypeInt, + Required: true, + ForceNew: true, + }, + "num_node_groups": { + Type: schema.TypeInt, + Required: true, + }, + }, + }, + }, + "configuration_endpoint_address": { + Type: schema.TypeString, + Computed: true, + }, + "engine": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Default: "redis", + ValidateFunc: validateAwsElastiCacheReplicationGroupEngine, + }, + "engine_version": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "maintenance_window": { + Type: schema.TypeString, + Optional: true, + Computed: true, + StateFunc: func(val interface{}) string { + // Elasticache always changes the maintenance + // to lowercase + return strings.ToLower(val.(string)) + }, + ValidateFunc: validateOnceAWeekWindowFormat, + }, + "member_clusters": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + "node_type": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "notification_topic_arn": { + Type: schema.TypeString, + Optional: true, + }, + "number_cache_clusters": { + Type: schema.TypeInt, + Computed: true, + Optional: true, + }, + "parameter_group_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "port": { + Type: schema.TypeInt, + Optional: true, + ForceNew: true, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + // Suppress default memcached/redis ports when not defined + if !d.IsNewResource() && new == "0" && (old == "6379" || old == "11211") { + return true + } + return false + }, + }, + "primary_endpoint_address": { + Type: schema.TypeString, + Computed: true, + }, + "replication_group_description": { + Type: schema.TypeString, + Required: true, + }, + "replication_group_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validateAwsElastiCacheReplicationGroupId, + StateFunc: func(val interface{}) string { + return strings.ToLower(val.(string)) + }, + }, + "security_group_names": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + "security_group_ids": { + Type: schema.TypeSet, + Optional: true, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + // A single-element string list containing an Amazon Resource Name (ARN) that + // uniquely identifies a Redis RDB snapshot file stored in Amazon S3. The snapshot + // file will be used to populate the node group. + // + // See also: + // https://github.com/aws/aws-sdk-go/blob/4862a174f7fc92fb523fc39e68f00b87d91d2c3d/service/elasticache/api.go#L2079 + "snapshot_arns": { + Type: schema.TypeSet, + Optional: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + "snapshot_retention_limit": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntAtMost(35), + }, + "snapshot_window": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validateOnceADayWindowFormat, + }, + "snapshot_name": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "subnet_group_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + }, + "tags": tagsSchema(), + "transit_encryption_enabled": { + Type: schema.TypeBool, + Optional: true, + Default: false, + ForceNew: true, + }, + }, SchemaVersion: 1, Timeouts: &schema.ResourceTimeout{ @@ -256,7 +350,7 @@ func resourceAwsElasticacheReplicationGroupCreate(d *schema.ResourceData, meta i stateConf := &resource.StateChangeConf{ Pending: pending, Target: []string{"available"}, - Refresh: cacheReplicationGroupStateRefreshFunc(conn, d.Id(), "available", pending), + Refresh: cacheReplicationGroupStateRefreshFunc(conn, d.Id(), pending), Timeout: d.Timeout(schema.TimeoutCreate), MinTimeout: 10 * time.Second, Delay: 30 * time.Second, @@ -673,7 +767,7 @@ func resourceAwsElasticacheReplicationGroupUpdate(d *schema.ResourceData, meta i func resourceAwsElasticacheReplicationGroupDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).elasticacheconn - err := deleteElasticacheReplicationGroup(d.Id(), 40*time.Minute, conn) + err := deleteElasticacheReplicationGroup(d.Id(), conn) if err != nil { return fmt.Errorf("error deleting Elasticache Replication Group (%s): %s", d.Id(), err) } @@ -681,7 +775,7 @@ func resourceAwsElasticacheReplicationGroupDelete(d *schema.ResourceData, meta i return nil } -func cacheReplicationGroupStateRefreshFunc(conn *elasticache.ElastiCache, replicationGroupId, givenState string, pending []string) resource.StateRefreshFunc { +func cacheReplicationGroupStateRefreshFunc(conn *elasticache.ElastiCache, replicationGroupId string, pending []string) resource.StateRefreshFunc { return func() (interface{}, string, error) { resp, err := conn.DescribeReplicationGroups(&elasticache.DescribeReplicationGroupsInput{ ReplicationGroupId: aws.String(replicationGroupId), @@ -697,7 +791,7 @@ func cacheReplicationGroupStateRefreshFunc(conn *elasticache.ElastiCache, replic } if len(resp.ReplicationGroups) == 0 { - return nil, "", fmt.Errorf("[WARN] Error: no Cache Replication Groups found for id (%s)", replicationGroupId) + return nil, "", fmt.Errorf("Error: no Cache Replication Groups found for id (%s)", replicationGroupId) } var rg *elasticache.ReplicationGroup @@ -709,7 +803,7 @@ func cacheReplicationGroupStateRefreshFunc(conn *elasticache.ElastiCache, replic } if rg == nil { - return nil, "", fmt.Errorf("[WARN] Error: no matching ElastiCache Replication Group for id (%s)", replicationGroupId) + return nil, "", fmt.Errorf("Error: no matching ElastiCache Replication Group for id (%s)", replicationGroupId) } log.Printf("[DEBUG] ElastiCache Replication Group (%s) status: %v", replicationGroupId, *rg.Status) @@ -728,7 +822,7 @@ func cacheReplicationGroupStateRefreshFunc(conn *elasticache.ElastiCache, replic } } -func deleteElasticacheReplicationGroup(replicationGroupID string, timeout time.Duration, conn *elasticache.ElastiCache) error { +func deleteElasticacheReplicationGroup(replicationGroupID string, conn *elasticache.ElastiCache) error { input := &elasticache.DeleteReplicationGroupInput{ ReplicationGroupId: aws.String(replicationGroupID), } @@ -757,8 +851,8 @@ func deleteElasticacheReplicationGroup(replicationGroupID string, timeout time.D stateConf := &resource.StateChangeConf{ Pending: []string{"creating", "available", "deleting"}, Target: []string{}, - Refresh: cacheReplicationGroupStateRefreshFunc(conn, replicationGroupID, "", []string{}), - Timeout: timeout, + Refresh: cacheReplicationGroupStateRefreshFunc(conn, replicationGroupID, []string{}), + Timeout: 40 * time.Minute, MinTimeout: 10 * time.Second, Delay: 30 * time.Second, } @@ -791,7 +885,7 @@ func waitForModifyElasticacheReplicationGroup(conn *elasticache.ElastiCache, rep stateConf := &resource.StateChangeConf{ Pending: pending, Target: []string{"available"}, - Refresh: cacheReplicationGroupStateRefreshFunc(conn, replicationGroupID, "available", pending), + Refresh: cacheReplicationGroupStateRefreshFunc(conn, replicationGroupID, pending), Timeout: timeout, MinTimeout: 10 * time.Second, Delay: 30 * time.Second, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_replication_group_migrate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_replication_group_migrate.go deleted file mode 100644 index 0daf561f41..0000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticache_replication_group_migrate.go +++ /dev/null @@ -1,59 +0,0 @@ -package aws - -import ( - "fmt" - "log" - "strings" - - "github.com/hashicorp/terraform/terraform" -) - -func resourceAwsElasticacheReplicationGroupMigrateState(v int, is *terraform.InstanceState, meta interface{}) (*terraform.InstanceState, error) { - switch v { - case 0: - log.Println("[INFO] Found AWS Elasticache Replication Group State v0; migrating to v1") - return migrateAwsElasticacheReplicationGroupStateV0toV1(is) - default: - return is, fmt.Errorf("Unexpected schema version: %d", v) - } -} - -func migrateAwsElasticacheReplicationGroupStateV0toV1(is *terraform.InstanceState) (*terraform.InstanceState, error) { - if is.Empty() || is.Attributes == nil { - log.Println("[DEBUG] Empty InstanceState; nothing to migrate.") - return is, nil - } - - numCountStr, ok := is.Attributes["cluster_mode.#"] - if !ok || numCountStr == "0" { - log.Println("[DEBUG] Empty cluster_mode in InstanceState; no need to migrate.") - return is, nil - } - - for k, v := range is.Attributes { - if !strings.HasPrefix(k, "cluster_mode.") || strings.HasPrefix(k, "cluster_mode.#") { - continue - } - - // cluster_mode.HASHCODE.attr - path := strings.Split(k, ".") - if len(path) != 3 { - return is, fmt.Errorf("Found unexpected cluster_mode field: %#v", k) - } - hashcode, attr := path[1], path[2] - if hashcode == "0" { - // Skip already migrated attribute - continue - } - - if attr == "replicas_per_node_group" { - is.Attributes["cluster_mode.0.replicas_per_node_group"] = v - } - if attr == "num_node_groups" { - is.Attributes["cluster_mode.0.num_node_groups"] = v - } - delete(is.Attributes, k) - } - log.Printf("[DEBUG] Attributes after migration: %#v", is.Attributes) - return is, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain.go index e2f59082dd..06502feea2 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elasticsearch_domain.go @@ -11,7 +11,6 @@ import ( "github.com/aws/aws-sdk-go/aws/awserr" elasticsearch "github.com/aws/aws-sdk-go/service/elasticsearchservice" "github.com/aws/aws-sdk-go/service/iam" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/structure" @@ -33,7 +32,7 @@ func resourceAwsElasticSearchDomain() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, "advanced_options": { @@ -74,6 +73,7 @@ func resourceAwsElasticSearchDomain() *schema.Resource { Type: schema.TypeList, Optional: true, Computed: true, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "ebs_enabled": { @@ -118,10 +118,26 @@ func resourceAwsElasticSearchDomain() *schema.Resource { }, }, }, + "node_to_node_encryption": { + Type: schema.TypeList, + Optional: true, + Computed: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "enabled": { + Type: schema.TypeBool, + Required: true, + ForceNew: true, + }, + }, + }, + }, "cluster_config": { Type: schema.TypeList, Optional: true, Computed: true, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "dedicated_master_count": { @@ -159,6 +175,7 @@ func resourceAwsElasticSearchDomain() *schema.Resource { "snapshot_options": { Type: schema.TypeList, Optional: true, + MaxItems: 1, DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { if old == "1" && new == "0" { return true @@ -338,9 +355,7 @@ func resourceAwsElasticSearchDomainCreate(d *schema.ResourceData, meta interface if v, ok := d.GetOk("ebs_options"); ok { options := v.([]interface{}) - if len(options) > 1 { - return fmt.Errorf("Only a single ebs_options block is expected") - } else if len(options) == 1 { + if len(options) == 1 { if options[0] == nil { return fmt.Errorf("At least one field is expected inside ebs_options") } @@ -363,9 +378,7 @@ func resourceAwsElasticSearchDomainCreate(d *schema.ResourceData, meta interface if v, ok := d.GetOk("cluster_config"); ok { config := v.([]interface{}) - if len(config) > 1 { - return fmt.Errorf("Only a single cluster_config block is expected") - } else if len(config) == 1 { + if len(config) == 1 { if config[0] == nil { return fmt.Errorf("At least one field is expected inside cluster_config") } @@ -374,12 +387,17 @@ func resourceAwsElasticSearchDomainCreate(d *schema.ResourceData, meta interface } } + if v, ok := d.GetOk("node_to_node_encryption"); ok { + options := v.([]interface{}) + + s := options[0].(map[string]interface{}) + input.NodeToNodeEncryptionOptions = expandESNodeToNodeEncryptionOptions(s) + } + if v, ok := d.GetOk("snapshot_options"); ok { options := v.([]interface{}) - if len(options) > 1 { - return fmt.Errorf("Only a single snapshot_options block is expected") - } else if len(options) == 1 { + if len(options) == 1 { if options[0] == nil { return fmt.Errorf("At least one field is expected inside snapshot_options") } @@ -526,7 +544,7 @@ func resourceAwsElasticSearchDomainRead(d *schema.ResourceData, meta interface{} if ds.AccessPolicies != nil && aws.StringValue(ds.AccessPolicies) != "" { policies, err := structure.NormalizeJsonString(aws.StringValue(ds.AccessPolicies)) if err != nil { - return errwrap.Wrapf("access policies contain an invalid JSON: {{err}}", err) + return fmt.Errorf("access policies contain an invalid JSON: %s", err) } d.Set("access_policies", policies) } @@ -555,6 +573,10 @@ func resourceAwsElasticSearchDomainRead(d *schema.ResourceData, meta interface{} if err != nil { return err } + err = d.Set("node_to_node_encryption", flattenESNodeToNodeEncryptionOptions(ds.NodeToNodeEncryptionOptions)) + if err != nil { + return err + } if err := d.Set("snapshot_options", flattenESSnapshotOptions(ds.SnapshotOptions)); err != nil { return fmt.Errorf("error setting snapshot_options: %s", err) @@ -643,9 +665,7 @@ func resourceAwsElasticSearchDomainUpdate(d *schema.ResourceData, meta interface if d.HasChange("ebs_options") || d.HasChange("cluster_config") { options := d.Get("ebs_options").([]interface{}) - if len(options) > 1 { - return fmt.Errorf("Only a single ebs_options block is expected") - } else if len(options) == 1 { + if len(options) == 1 { s := options[0].(map[string]interface{}) input.EBSOptions = expandESEBSOptions(s) } @@ -653,9 +673,7 @@ func resourceAwsElasticSearchDomainUpdate(d *schema.ResourceData, meta interface if d.HasChange("cluster_config") { config := d.Get("cluster_config").([]interface{}) - if len(config) > 1 { - return fmt.Errorf("Only a single cluster_config block is expected") - } else if len(config) == 1 { + if len(config) == 1 { m := config[0].(map[string]interface{}) input.ElasticsearchClusterConfig = expandESClusterConfig(m) } @@ -666,9 +684,7 @@ func resourceAwsElasticSearchDomainUpdate(d *schema.ResourceData, meta interface if d.HasChange("snapshot_options") { options := d.Get("snapshot_options").([]interface{}) - if len(options) > 1 { - return fmt.Errorf("Only a single snapshot_options block is expected") - } else if len(options) == 1 { + if len(options) == 1 { o := options[0].(map[string]interface{}) snapshotOptions := elasticsearch.SnapshotOptions{ @@ -802,3 +818,25 @@ func isDedicatedMasterDisabled(k, old, new string, d *schema.ResourceData) bool } return false } + +func expandESNodeToNodeEncryptionOptions(s map[string]interface{}) *elasticsearch.NodeToNodeEncryptionOptions { + options := elasticsearch.NodeToNodeEncryptionOptions{} + + if v, ok := s["enabled"]; ok { + options.Enabled = aws.Bool(v.(bool)) + } + return &options +} + +func flattenESNodeToNodeEncryptionOptions(o *elasticsearch.NodeToNodeEncryptionOptions) []map[string]interface{} { + if o == nil { + return []map[string]interface{}{} + } + + m := map[string]interface{}{} + if o.Enabled != nil { + m["enabled"] = aws.BoolValue(o.Enabled) + } + + return []map[string]interface{}{m} +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elb.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elb.go index 57cbe56d34..38ca61e265 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elb.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_elb.go @@ -304,7 +304,7 @@ func resourceAwsElbCreate(d *schema.ResourceData, meta interface{}) error { // Check for IAM SSL Cert error, eventual consistancy issue if awsErr.Code() == "CertificateNotFound" { return resource.RetryableError( - fmt.Errorf("[WARN] Error creating ELB Listener with SSL Cert, retrying: %s", err)) + fmt.Errorf("Error creating ELB Listener with SSL Cert, retrying: %s", err)) } } return resource.NonRetryableError(err) @@ -407,7 +407,7 @@ func flattenAwsELbResource(d *schema.ResourceData, ec2conn *ec2.EC2, elbconn *el elbVpc = *lb.VPCId sgId, err := sourceSGIdByName(ec2conn, *lb.SourceSecurityGroup.GroupName, elbVpc) if err != nil { - return fmt.Errorf("[WARN] Error looking up ELB Security Group ID: %s", err) + return fmt.Errorf("Error looking up ELB Security Group ID: %s", err) } else { d.Set("source_security_group_id", sgId) } @@ -448,6 +448,9 @@ func flattenAwsELbResource(d *schema.ResourceData, ec2conn *ec2.EC2, elbconn *el resp, err := elbconn.DescribeTags(&elb.DescribeTagsInput{ LoadBalancerNames: []*string{lb.LoadBalancerName}, }) + if err != nil { + return fmt.Errorf("error describing tags for ELB (%s): %s", d.Id(), err) + } var et []*elb.Tag if len(resp.TagDescriptions) > 0 { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_cluster.go index a2d6142763..366b2ad7e7 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_cluster.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_cluster.go @@ -47,7 +47,7 @@ func resourceAwsEMRCluster() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentJsonDiffs, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) @@ -237,7 +237,7 @@ func resourceAwsEMRCluster() *schema.Resource { Type: schema.TypeString, Optional: true, DiffSuppressFunc: suppressEquivalentJsonDiffs, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, StateFunc: func(v interface{}) string { jsonString, _ := structure.NormalizeJsonString(v) return jsonString @@ -357,7 +357,7 @@ func resourceAwsEMRCluster() *schema.Resource { Optional: true, ForceNew: true, ConflictsWith: []string{"configurations"}, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentJsonDiffs, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) @@ -488,7 +488,13 @@ func resourceAwsEMRClusterCreate(d *schema.ResourceData, meta interface{}) error } if v, ok := d.GetOk("instance_group"); ok { instanceGroupConfigs := v.(*schema.Set).List() - instanceConfig.InstanceGroups = expandInstanceGroupConfigs(instanceGroupConfigs) + instanceGroups, err := expandInstanceGroupConfigs(instanceGroupConfigs) + + if err != nil { + return fmt.Errorf("error parsing EMR instance groups configuration: %s", err) + } + + instanceConfig.InstanceGroups = instanceGroups } emrApps := expandApplications(applications) @@ -615,7 +621,7 @@ func resourceAwsEMRClusterCreate(d *schema.ResourceData, meta interface{}) error _, err = stateConf.WaitForState() if err != nil { - return fmt.Errorf("[WARN] Error waiting for EMR Cluster state to be \"WAITING\" or \"RUNNING\": %s", err) + return fmt.Errorf("Error waiting for EMR Cluster state to be \"WAITING\" or \"RUNNING\": %s", err) } return resourceAwsEMRClusterRead(d, meta) @@ -655,7 +661,7 @@ func resourceAwsEMRClusterRead(d *schema.ResourceData, meta interface{}) error { instanceGroups, err := fetchAllEMRInstanceGroups(emrconn, d.Id()) if err == nil { - coreGroup := findGroup(instanceGroups, "CORE") + coreGroup := emrCoreInstanceGroup(instanceGroups) if coreGroup != nil { d.Set("core_instance_type", coreGroup.InstanceType) } @@ -765,9 +771,9 @@ func resourceAwsEMRClusterUpdate(d *schema.ResourceData, meta interface{}) error } coreInstanceCount := d.Get("core_instance_count").(int) - coreGroup := findGroup(groups, "CORE") + coreGroup := emrCoreInstanceGroup(groups) if coreGroup == nil { - return fmt.Errorf("[ERR] Error finding core group") + return fmt.Errorf("Error finding core group") } params := &emr.ModifyInstanceGroupsInput{ @@ -805,7 +811,7 @@ func resourceAwsEMRClusterUpdate(d *schema.ResourceData, meta interface{}) error _, err = stateConf.WaitForState() if err != nil { - return fmt.Errorf("[WARN] Error waiting for EMR Cluster state to be \"WAITING\" or \"RUNNING\" after modification: %s", err) + return fmt.Errorf("Error waiting for EMR Cluster state to be \"WAITING\" or \"RUNNING\" after modification: %s", err) } } @@ -891,7 +897,7 @@ func resourceAwsEMRClusterDelete(d *schema.ResourceData, meta interface{}) error log.Printf("[DEBUG] All (%d) EMR Cluster (%s) Instances terminated", instanceCount, d.Id()) return nil } - return resource.RetryableError(fmt.Errorf("[DEBUG] EMR Cluster (%s) has (%d) Instances remaining, retrying", d.Id(), len(resp.Instances))) + return resource.RetryableError(fmt.Errorf("EMR Cluster (%s) has (%d) Instances remaining, retrying", d.Id(), len(resp.Instances))) }) if err != nil { @@ -1093,25 +1099,10 @@ func flattenBootstrapArguments(actions []*emr.Command) []map[string]interface{} return result } -func loadGroups(d *schema.ResourceData, meta interface{}) ([]*emr.InstanceGroup, error) { - emrconn := meta.(*AWSClient).emrconn - reqGrps := &emr.ListInstanceGroupsInput{ - ClusterId: aws.String(d.Id()), - } - - respGrps, errGrps := emrconn.ListInstanceGroups(reqGrps) - if errGrps != nil { - return nil, fmt.Errorf("Error reading EMR cluster: %s", errGrps) - } - return respGrps.InstanceGroups, nil -} - -func findGroup(grps []*emr.InstanceGroup, typ string) *emr.InstanceGroup { +func emrCoreInstanceGroup(grps []*emr.InstanceGroup) *emr.InstanceGroup { for _, grp := range grps { - if grp.InstanceGroupType != nil { - if *grp.InstanceGroupType == typ { - return grp - } + if aws.StringValue(grp.InstanceGroupType) == emr.InstanceGroupTypeCore { + return grp } } return nil @@ -1293,7 +1284,7 @@ func expandEmrStepConfigs(l []interface{}) []*emr.StepConfig { return stepConfigs } -func expandInstanceGroupConfigs(instanceGroupConfigs []interface{}) []*emr.InstanceGroupConfig { +func expandInstanceGroupConfigs(instanceGroupConfigs []interface{}) ([]*emr.InstanceGroupConfig, error) { instanceGroupConfig := []*emr.InstanceGroupConfig{} for _, raw := range instanceGroupConfigs { @@ -1311,12 +1302,23 @@ func expandInstanceGroupConfigs(instanceGroupConfigs []interface{}) []*emr.Insta applyBidPrice(config, configAttributes) applyEbsConfig(configAttributes, config) - applyAutoScalingPolicy(configAttributes, config) + + if v, ok := configAttributes["autoscaling_policy"]; ok && v.(string) != "" { + var autoScalingPolicy *emr.AutoScalingPolicy + + err := json.Unmarshal([]byte(v.(string)), &autoScalingPolicy) + + if err != nil { + return []*emr.InstanceGroupConfig{}, fmt.Errorf("error parsing EMR Auto Scaling Policy JSON: %s", err) + } + + config.AutoScalingPolicy = autoScalingPolicy + } instanceGroupConfig = append(instanceGroupConfig, config) } - return instanceGroupConfig + return instanceGroupConfig, nil } func applyBidPrice(config *emr.InstanceGroupConfig, configAttributes map[string]interface{}) { @@ -1355,24 +1357,6 @@ func applyEbsConfig(configAttributes map[string]interface{}, config *emr.Instanc } } -func applyAutoScalingPolicy(configAttributes map[string]interface{}, config *emr.InstanceGroupConfig) { - if rawAutoScalingPolicy, ok := configAttributes["autoscaling_policy"]; ok { - autoScalingConfig, _ := expandAutoScalingPolicy(rawAutoScalingPolicy.(string)) - config.AutoScalingPolicy = autoScalingConfig - } -} - -func expandAutoScalingPolicy(rawDefinitions string) (*emr.AutoScalingPolicy, error) { - var policy *emr.AutoScalingPolicy - - err := json.Unmarshal([]byte(rawDefinitions), &policy) - if err != nil { - return nil, fmt.Errorf("Error decoding JSON: %s", err) - } - - return policy, nil -} - func expandConfigurationJson(input string) ([]*emr.Configuration, error) { configsOut := []*emr.Configuration{} err := json.Unmarshal([]byte(input), &configsOut) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_instance_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_instance_group.go index 49a70f355f..15758e229d 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_instance_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_instance_group.go @@ -198,10 +198,10 @@ func fetchAllEMRInstanceGroups(conn *emr.EMR, clusterId string) ([]*emr.Instance log.Printf("[DEBUG] EMR Cluster Instance Marker: %s", *marker) respGrps, errGrps := conn.ListInstanceGroups(req) if errGrps != nil { - return nil, fmt.Errorf("[ERR] Error reading EMR cluster (%s): %s", clusterId, errGrps) + return nil, fmt.Errorf("Error reading EMR cluster (%s): %s", clusterId, errGrps) } if respGrps == nil { - return nil, fmt.Errorf("[ERR] Error reading EMR Instance Group for cluster (%s)", clusterId) + return nil, fmt.Errorf("Error reading EMR Instance Group for cluster (%s)", clusterId) } if respGrps.InstanceGroups != nil { @@ -215,7 +215,7 @@ func fetchAllEMRInstanceGroups(conn *emr.EMR, clusterId string) ([]*emr.Instance } if len(groups) == 0 { - return nil, fmt.Errorf("[WARN] No instance groups found for EMR Cluster (%s)", clusterId) + return nil, fmt.Errorf("No instance groups found for EMR Cluster (%s)", clusterId) } return groups, nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_security_configuration.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_security_configuration.go index ff25619a36..caad7eed7d 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_security_configuration.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_emr_security_configuration.go @@ -7,6 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/emr" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsEMRSecurityConfiguration() *schema.Resource { @@ -25,21 +26,21 @@ func resourceAwsEMRSecurityConfiguration() *schema.Resource { Computed: true, ForceNew: true, ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validateMaxLength(10280), + ValidateFunc: validation.StringLenBetween(0, 10280), }, "name_prefix": { Type: schema.TypeString, Optional: true, ForceNew: true, ConflictsWith: []string{"name"}, - ValidateFunc: validateMaxLength(10280 - resource.UniqueIDSuffixLength), + ValidateFunc: validation.StringLenBetween(0, 10280-resource.UniqueIDSuffixLength), }, "configuration": { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, }, "creation_date": { @@ -85,7 +86,7 @@ func resourceAwsEmrSecurityConfigurationRead(d *schema.ResourceData, meta interf }) if err != nil { if isAWSErr(err, "InvalidRequestException", "does not exist") { - log.Printf("[WARN] EMR Security Configuraiton (%s) not found, removing from state", d.Id()) + log.Printf("[WARN] EMR Security Configuration (%s) not found, removing from state", d.Id()) d.SetId("") return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_flow_log.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_flow_log.go index d979f200af..ae0dd9dac0 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_flow_log.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_flow_log.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsFlowLog() *schema.Resource { @@ -22,14 +23,41 @@ func resourceAwsFlowLog() *schema.Resource { Schema: map[string]*schema.Schema{ "iam_role_arn": { Type: schema.TypeString, - Required: true, + Optional: true, ForceNew: true, }, - "log_group_name": { + "log_destination": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"log_group_name"}, + ValidateFunc: validateArn, + StateFunc: func(arn interface{}) string { + // aws_cloudwatch_log_group arn attribute references contain a trailing `:*`, which breaks functionality + return strings.TrimSuffix(arn.(string), ":*") + }, + }, + + "log_destination_type": { Type: schema.TypeString, - Required: true, + Optional: true, ForceNew: true, + Default: ec2.LogDestinationTypeCloudWatchLogs, + ValidateFunc: validation.StringInSlice([]string{ + ec2.LogDestinationTypeCloudWatchLogs, + ec2.LogDestinationTypeS3, + }, false), + }, + + "log_group_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"log_destination"}, + Deprecated: "use 'log_destination' argument instead", }, "vpc_id": { @@ -89,11 +117,22 @@ func resourceAwsLogFlowCreate(d *schema.ResourceData, meta interface{}) error { } opts := &ec2.CreateFlowLogsInput{ - DeliverLogsPermissionArn: aws.String(d.Get("iam_role_arn").(string)), - LogGroupName: aws.String(d.Get("log_group_name").(string)), - ResourceIds: []*string{aws.String(resourceId)}, - ResourceType: aws.String(resourceType), - TrafficType: aws.String(d.Get("traffic_type").(string)), + LogDestinationType: aws.String(d.Get("log_destination_type").(string)), + ResourceIds: []*string{aws.String(resourceId)}, + ResourceType: aws.String(resourceType), + TrafficType: aws.String(d.Get("traffic_type").(string)), + } + + if v, ok := d.GetOk("iam_role_arn"); ok && v != "" { + opts.DeliverLogsPermissionArn = aws.String(v.(string)) + } + + if v, ok := d.GetOk("log_destination"); ok && v != "" { + opts.LogDestination = aws.String(strings.TrimSuffix(v.(string), ":*")) + } + + if v, ok := d.GetOk("log_group_name"); ok && v != "" { + opts.LogGroupName = aws.String(v.(string)) } log.Printf( @@ -134,6 +173,8 @@ func resourceAwsLogFlowRead(d *schema.ResourceData, meta interface{}) error { fl := resp.FlowLogs[0] d.Set("traffic_type", fl.TrafficType) + d.Set("log_destination", fl.LogDestination) + d.Set("log_destination_type", fl.LogDestinationType) d.Set("log_group_name", fl.LogGroupName) d.Set("iam_role_arn", fl.DeliverLogsPermissionArn) @@ -162,7 +203,7 @@ func resourceAwsLogFlowDelete(d *schema.ResourceData, meta interface{}) error { }) if err != nil { - return fmt.Errorf("[WARN] Error deleting Flow Log with ID (%s), error: %s", d.Id(), err) + return fmt.Errorf("Error deleting Flow Log with ID (%s), error: %s", d.Id(), err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_fleet.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_fleet.go index 815b899d71..3d51b11542 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_fleet.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_fleet.go @@ -432,21 +432,6 @@ func expandGameliftIpPermission(cfg map[string]interface{}) *gamelift.IpPermissi } } -func flattenGameliftIpPermissions(ipps []*gamelift.IpPermission) []interface{} { - perms := make([]interface{}, len(ipps), len(ipps)) - - for i, ipp := range ipps { - m := make(map[string]interface{}, 0) - m["from_port"] = *ipp.FromPort - m["ip_range"] = *ipp.IpRange - m["protocol"] = *ipp.Protocol - m["to_port"] = *ipp.ToPort - perms[i] = m - } - - return perms -} - func expandGameliftResourceCreationLimitPolicy(cfg []interface{}) *gamelift.ResourceCreationLimitPolicy { if len(cfg) < 1 { return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_game_session_queue.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_game_session_queue.go new file mode 100644 index 0000000000..9cdfddbbce --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_gamelift_game_session_queue.go @@ -0,0 +1,218 @@ +package aws + +import ( + "fmt" + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/gamelift" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" + "log" +) + +func resourceAwsGameliftGameSessionQueue() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsGameliftGameSessionQueueCreate, + Read: resourceAwsGameliftGameSessionQueueRead, + Update: resourceAwsGameliftGameSessionQueueUpdate, + Delete: resourceAwsGameliftGameSessionQueueDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "destinations": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(1, 128), + }, + "player_latency_policy": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "maximum_individual_player_latency_milliseconds": { + Type: schema.TypeInt, + Required: true, + ValidateFunc: validation.IntAtLeast(0), + }, + "policy_duration_seconds": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntAtLeast(0), + }, + }, + }, + }, + "timeout_in_seconds": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntBetween(10, 600), + }, + "arn": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceAwsGameliftGameSessionQueueCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).gameliftconn + + input := gamelift.CreateGameSessionQueueInput{ + Name: aws.String(d.Get("name").(string)), + Destinations: expandGameliftGameSessionQueueDestinations(d.Get("destinations").([]interface{})), + PlayerLatencyPolicies: expandGameliftGameSessionPlayerLatencyPolicies(d.Get("player_latency_policy").([]interface{})), + TimeoutInSeconds: aws.Int64(int64(d.Get("timeout_in_seconds").(int))), + } + log.Printf("[INFO] Creating Gamelift Session Queue: %s", input) + out, err := conn.CreateGameSessionQueue(&input) + if err != nil { + return fmt.Errorf("error creating Gamelift Game Session Queue: %s", err) + } + + d.SetId(*out.GameSessionQueue.Name) + + return resourceAwsGameliftGameSessionQueueRead(d, meta) +} + +func resourceAwsGameliftGameSessionQueueRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).gameliftconn + log.Printf("[INFO] Describing Gamelift Session Queues: %s", d.Id()) + limit := int64(1) + out, err := conn.DescribeGameSessionQueues(&gamelift.DescribeGameSessionQueuesInput{ + Names: aws.StringSlice([]string{d.Id()}), + Limit: &limit, + }) + if err != nil { + if isAWSErr(err, gamelift.ErrCodeNotFoundException, "") { + log.Printf("[WARN] Gamelift Session Queues (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + return fmt.Errorf("error reading Gamelift Game Session Queue (%s): %s", d.Id(), err) + } + sessionQueues := out.GameSessionQueues + + if len(sessionQueues) < 1 { + log.Printf("[WARN] Gamelift Session Queue (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + if len(sessionQueues) != 1 { + return fmt.Errorf("expected exactly 1 Gamelift Session Queues, found %d under %q", + len(sessionQueues), d.Id()) + } + sessionQueue := sessionQueues[0] + + d.Set("arn", sessionQueue.GameSessionQueueArn) + d.Set("name", sessionQueue.Name) + d.Set("timeout_in_seconds", sessionQueue.TimeoutInSeconds) + if err := d.Set("destinations", flattenGameliftGameSessionQueueDestinations(sessionQueue.Destinations)); err != nil { + return fmt.Errorf("error setting destinations: %s", err) + } + if err := d.Set("player_latency_policy", flattenGameliftPlayerLatencyPolicies(sessionQueue.PlayerLatencyPolicies)); err != nil { + return fmt.Errorf("error setting player_latency_policy: %s", err) + } + + return nil +} + +func flattenGameliftGameSessionQueueDestinations(destinations []*gamelift.GameSessionQueueDestination) []interface{} { + l := make([]interface{}, 0) + + for _, destination := range destinations { + if destination == nil { + continue + } + l = append(l, aws.StringValue(destination.DestinationArn)) + } + + return l +} + +func flattenGameliftPlayerLatencyPolicies(playerLatencyPolicies []*gamelift.PlayerLatencyPolicy) []interface{} { + l := make([]interface{}, 0) + for _, policy := range playerLatencyPolicies { + m := map[string]interface{}{ + "maximum_individual_player_latency_milliseconds": aws.Int64Value(policy.MaximumIndividualPlayerLatencyMilliseconds), + "policy_duration_seconds": aws.Int64Value(policy.PolicyDurationSeconds), + } + l = append(l, m) + } + return l +} + +func resourceAwsGameliftGameSessionQueueUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).gameliftconn + + log.Printf("[INFO] Updating Gamelift Session Queue: %s", d.Id()) + + input := gamelift.UpdateGameSessionQueueInput{ + Name: aws.String(d.Id()), + Destinations: expandGameliftGameSessionQueueDestinations(d.Get("destinations").([]interface{})), + PlayerLatencyPolicies: expandGameliftGameSessionPlayerLatencyPolicies(d.Get("player_latency_policy").([]interface{})), + TimeoutInSeconds: aws.Int64(int64(d.Get("timeout_in_seconds").(int))), + } + + _, err := conn.UpdateGameSessionQueue(&input) + if err != nil { + return fmt.Errorf("error updating Gamelift Game Session Queue (%s): %s", d.Id(), err) + } + + return resourceAwsGameliftGameSessionQueueRead(d, meta) +} + +func resourceAwsGameliftGameSessionQueueDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).gameliftconn + log.Printf("[INFO] Deleting Gamelift Session Queue: %s", d.Id()) + _, err := conn.DeleteGameSessionQueue(&gamelift.DeleteGameSessionQueueInput{ + Name: aws.String(d.Id()), + }) + if isAWSErr(err, gamelift.ErrCodeNotFoundException, "") { + return nil + } + if err != nil { + return fmt.Errorf("error deleting Gamelift Game Session Queue (%s): %s", d.Id(), err) + } + + return nil +} + +func expandGameliftGameSessionQueueDestinations(destinationsMap []interface{}) []*gamelift.GameSessionQueueDestination { + if len(destinationsMap) < 1 { + return nil + } + var destinations []*gamelift.GameSessionQueueDestination + for _, destination := range destinationsMap { + destinations = append( + destinations, + &gamelift.GameSessionQueueDestination{ + DestinationArn: aws.String(destination.(string)), + }) + } + return destinations +} + +func expandGameliftGameSessionPlayerLatencyPolicies(destinationsPlayerLatencyPolicyMap []interface{}) []*gamelift.PlayerLatencyPolicy { + if len(destinationsPlayerLatencyPolicyMap) < 1 { + return nil + } + var playerLatencyPolicies []*gamelift.PlayerLatencyPolicy + for _, playerLatencyPolicy := range destinationsPlayerLatencyPolicyMap { + item := playerLatencyPolicy.(map[string]interface{}) + playerLatencyPolicies = append( + playerLatencyPolicies, + &gamelift.PlayerLatencyPolicy{ + MaximumIndividualPlayerLatencyMilliseconds: aws.Int64(int64(item["maximum_individual_player_latency_milliseconds"].(int))), + PolicyDurationSeconds: aws.Int64(int64(item["policy_duration_seconds"].(int))), + }) + } + return playerLatencyPolicies +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glacier_vault.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glacier_vault.go index 55de0a8fd1..587402f228 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glacier_vault.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glacier_vault.go @@ -6,13 +6,13 @@ import ( "log" "regexp" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/schema" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/glacier" "github.com/hashicorp/terraform/helper/structure" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsGlacierVault() *schema.Resource { @@ -58,7 +58,7 @@ func resourceAwsGlacierVault() *schema.Resource { "access_policy": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) return json @@ -167,7 +167,7 @@ func resourceAwsGlacierVaultRead(d *schema.ResourceData, meta interface{}) error } else if pol != nil { policy, err := structure.NormalizeJsonString(*pol.Policy.Policy) if err != nil { - return errwrap.Wrapf("access policy contains an invalid JSON: {{err}}", err) + return fmt.Errorf("access policy contains an invalid JSON: %s", err) } d.Set("access_policy", policy) } else { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glacier_vault_lock.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glacier_vault_lock.go new file mode 100644 index 0000000000..c181510cbb --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glacier_vault_lock.go @@ -0,0 +1,188 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/glacier" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsGlacierVaultLock() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsGlacierVaultLockCreate, + Read: resourceAwsGlacierVaultLockRead, + // Allow ignore_deletion_error update + Update: schema.Noop, + Delete: resourceAwsGlacierVaultLockDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "complete_lock": { + Type: schema.TypeBool, + Required: true, + ForceNew: true, + }, + "ignore_deletion_error": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + "policy": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, + ValidateFunc: validateIAMPolicyJson, + }, + "vault_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.NoZeroValues, + }, + }, + } +} + +func resourceAwsGlacierVaultLockCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).glacierconn + vaultName := d.Get("vault_name").(string) + + input := &glacier.InitiateVaultLockInput{ + AccountId: aws.String("-"), + Policy: &glacier.VaultLockPolicy{ + Policy: aws.String(d.Get("policy").(string)), + }, + VaultName: aws.String(vaultName), + } + + log.Printf("[DEBUG] Initiating Glacier Vault Lock: %s", input) + output, err := conn.InitiateVaultLock(input) + if err != nil { + return fmt.Errorf("error initiating Glacier Vault Lock: %s", err) + } + + d.SetId(vaultName) + + if !d.Get("complete_lock").(bool) { + return resourceAwsGlacierVaultLockRead(d, meta) + } + + completeLockInput := &glacier.CompleteVaultLockInput{ + LockId: output.LockId, + VaultName: aws.String(vaultName), + } + + log.Printf("[DEBUG] Completing Glacier Vault (%s) Lock: %s", vaultName, completeLockInput) + if _, err := conn.CompleteVaultLock(completeLockInput); err != nil { + return fmt.Errorf("error completing Glacier Vault (%s) Lock: %s", vaultName, err) + } + + if err := waitForGlacierVaultLockCompletion(conn, vaultName); err != nil { + return fmt.Errorf("error waiting for Glacier Vault Lock (%s) completion: %s", d.Id(), err) + } + + return resourceAwsGlacierVaultLockRead(d, meta) +} + +func resourceAwsGlacierVaultLockRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).glacierconn + + input := &glacier.GetVaultLockInput{ + AccountId: aws.String("-"), + VaultName: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Reading Glacier Vault Lock (%s): %s", d.Id(), input) + output, err := conn.GetVaultLock(input) + + if isAWSErr(err, glacier.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] Glacier Vault Lock (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if err != nil { + return fmt.Errorf("error reading Glacier Vault Lock (%s): %s", d.Id(), err) + } + + if output == nil { + log.Printf("[WARN] Glacier Vault Lock (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("complete_lock", aws.StringValue(output.State) == "Locked") + d.Set("policy", output.Policy) + d.Set("vault_name", d.Id()) + + return nil +} + +func resourceAwsGlacierVaultLockDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).glacierconn + + input := &glacier.AbortVaultLockInput{ + VaultName: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Aborting Glacier Vault Lock (%s): %s", d.Id(), input) + _, err := conn.AbortVaultLock(input) + + if isAWSErr(err, glacier.ErrCodeResourceNotFoundException, "") { + return nil + } + + if err != nil && !d.Get("ignore_deletion_error").(bool) { + return fmt.Errorf("error aborting Glacier Vault Lock (%s): %s", d.Id(), err) + } + + return nil +} + +func glacierVaultLockRefreshFunc(conn *glacier.Glacier, vaultName string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + input := &glacier.GetVaultLockInput{ + AccountId: aws.String("-"), + VaultName: aws.String(vaultName), + } + + log.Printf("[DEBUG] Reading Glacier Vault Lock (%s): %s", vaultName, input) + output, err := conn.GetVaultLock(input) + + if isAWSErr(err, glacier.ErrCodeResourceNotFoundException, "") { + return nil, "", nil + } + + if err != nil { + return nil, "", fmt.Errorf("error reading Glacier Vault Lock (%s): %s", vaultName, err) + } + + if output == nil { + return nil, "", nil + } + + return output, aws.StringValue(output.State), nil + } +} + +func waitForGlacierVaultLockCompletion(conn *glacier.Glacier, vaultName string) error { + stateConf := &resource.StateChangeConf{ + Pending: []string{"InProgress"}, + Target: []string{"Locked"}, + Refresh: glacierVaultLockRefreshFunc(conn, vaultName), + Timeout: 5 * time.Minute, + } + + log.Printf("[DEBUG] Waiting for Glacier Vault Lock (%s) completion", vaultName) + _, err := stateConf.WaitForState() + + return err +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_crawler.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_crawler.go index 957ba41a09..573e0c61ce 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_crawler.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_crawler.go @@ -3,9 +3,11 @@ package aws import ( "fmt" "log" + "strings" "time" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/service/glue" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -38,6 +40,16 @@ func resourceAwsGlueCrawler() *schema.Resource { "role": { Type: schema.TypeString, Required: true, + // Glue API always returns name + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + newARN, err := arn.Parse(new) + + if err != nil { + return false + } + + return old == strings.TrimPrefix(newARN.Resource, "role/") + }, }, "description": { Type: schema.TypeString, @@ -151,7 +163,7 @@ func resourceAwsGlueCrawler() *schema.Resource { json, _ := structure.NormalizeJsonString(v) return json }, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, }, }, } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_job.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_job.go index 5fd1df8637..3a296c393b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_job.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_job.go @@ -95,6 +95,10 @@ func resourceAwsGlueJob() *schema.Resource { Optional: true, Default: 2880, }, + "security_configuration": { + Type: schema.TypeString, + Optional: true, + }, }, } } @@ -140,6 +144,10 @@ func resourceAwsGlueJobCreate(d *schema.ResourceData, meta interface{}) error { input.MaxRetries = aws.Int64(int64(v.(int))) } + if v, ok := d.GetOk("security_configuration"); ok { + input.SecurityConfiguration = aws.String(v.(string)) + } + log.Printf("[DEBUG] Creating Glue Job: %s", input) _, err := conn.CreateJob(input) if err != nil { @@ -194,6 +202,9 @@ func resourceAwsGlueJobRead(d *schema.ResourceData, meta interface{}) error { d.Set("name", job.Name) d.Set("role_arn", job.Role) d.Set("timeout", int(aws.Int64Value(job.Timeout))) + if err := d.Set("security_configuration", job.SecurityConfiguration); err != nil { + return fmt.Errorf("error setting security_configuration: %s", err) + } return nil } @@ -237,6 +248,10 @@ func resourceAwsGlueJobUpdate(d *schema.ResourceData, meta interface{}) error { jobUpdate.MaxRetries = aws.Int64(int64(v.(int))) } + if v, ok := d.GetOk("security_configuration"); ok { + jobUpdate.SecurityConfiguration = aws.String(v.(string)) + } + input := &glue.UpdateJobInput{ JobName: aws.String(d.Id()), JobUpdate: jobUpdate, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_security_configuration.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_security_configuration.go new file mode 100644 index 0000000000..aa152ec6cb --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_glue_security_configuration.go @@ -0,0 +1,342 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/glue" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsGlueSecurityConfiguration() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsGlueSecurityConfigurationCreate, + Read: resourceAwsGlueSecurityConfigurationRead, + Delete: resourceAwsGlueSecurityConfigurationDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "encryption_configuration": { + Type: schema.TypeList, + Required: true, + ForceNew: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cloudwatch_encryption": { + Type: schema.TypeList, + Required: true, + ForceNew: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "cloudwatch_encryption_mode": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Default: glue.CloudWatchEncryptionModeDisabled, + ValidateFunc: validation.StringInSlice([]string{ + glue.CloudWatchEncryptionModeDisabled, + glue.CloudWatchEncryptionModeSseKms, + }, false), + }, + "kms_key_arn": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + }, + }, + }, + "job_bookmarks_encryption": { + Type: schema.TypeList, + Required: true, + ForceNew: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "job_bookmarks_encryption_mode": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Default: glue.JobBookmarksEncryptionModeDisabled, + ValidateFunc: validation.StringInSlice([]string{ + glue.JobBookmarksEncryptionModeCseKms, + glue.JobBookmarksEncryptionModeDisabled, + }, false), + }, + "kms_key_arn": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + }, + }, + }, + "s3_encryption": { + Type: schema.TypeList, + Required: true, + ForceNew: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "kms_key_arn": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "s3_encryption_mode": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Default: glue.S3EncryptionModeDisabled, + ValidateFunc: validation.StringInSlice([]string{ + glue.S3EncryptionModeDisabled, + glue.S3EncryptionModeSseKms, + glue.S3EncryptionModeSseS3, + }, false), + }, + }, + }, + }, + }, + }, + }, + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.NoZeroValues, + }, + }, + } +} + +func resourceAwsGlueSecurityConfigurationCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).glueconn + name := d.Get("name").(string) + + input := &glue.CreateSecurityConfigurationInput{ + EncryptionConfiguration: expandGlueEncryptionConfiguration(d.Get("encryption_configuration").([]interface{})), + Name: aws.String(name), + } + + log.Printf("[DEBUG] Creating Glue Security Configuration: %s", input) + _, err := conn.CreateSecurityConfiguration(input) + if err != nil { + return fmt.Errorf("error creating Glue Security Configuration (%s): %s", name, err) + } + + d.SetId(name) + + return resourceAwsGlueSecurityConfigurationRead(d, meta) +} + +func resourceAwsGlueSecurityConfigurationRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).glueconn + + input := &glue.GetSecurityConfigurationInput{ + Name: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Reading Glue Security Configuration: %s", input) + output, err := conn.GetSecurityConfiguration(input) + + if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { + log.Printf("[WARN] Glue Security Configuration (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if err != nil { + return fmt.Errorf("error reading Glue Security Configuration (%s): %s", d.Id(), err) + } + + securityConfiguration := output.SecurityConfiguration + if securityConfiguration == nil { + log.Printf("[WARN] Glue Security Configuration (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if err := d.Set("encryption_configuration", flattenGlueEncryptionConfiguration(securityConfiguration.EncryptionConfiguration)); err != nil { + return fmt.Errorf("error setting encryption_configuration: %s", err) + } + + d.Set("name", securityConfiguration.Name) + + return nil +} + +func resourceAwsGlueSecurityConfigurationDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).glueconn + + log.Printf("[DEBUG] Deleting Glue Security Configuration: %s", d.Id()) + err := deleteGlueSecurityConfiguration(conn, d.Id()) + if err != nil { + return fmt.Errorf("error deleting Glue Security Configuration (%s): %s", d.Id(), err) + } + + return nil +} + +func deleteGlueSecurityConfiguration(conn *glue.Glue, name string) error { + input := &glue.DeleteSecurityConfigurationInput{ + Name: aws.String(name), + } + + _, err := conn.DeleteSecurityConfiguration(input) + + if isAWSErr(err, glue.ErrCodeEntityNotFoundException, "") { + return nil + } + + if err != nil { + return err + } + + return nil +} + +func expandGlueCloudWatchEncryption(l []interface{}) *glue.CloudWatchEncryption { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + cloudwatchEncryption := &glue.CloudWatchEncryption{ + CloudWatchEncryptionMode: aws.String(m["cloudwatch_encryption_mode"].(string)), + } + + if v, ok := m["kms_key_arn"]; ok { + cloudwatchEncryption.KmsKeyArn = aws.String(v.(string)) + } + + return cloudwatchEncryption +} + +func expandGlueEncryptionConfiguration(l []interface{}) *glue.EncryptionConfiguration { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + encryptionConfiguration := &glue.EncryptionConfiguration{ + CloudWatchEncryption: expandGlueCloudWatchEncryption(m["cloudwatch_encryption"].([]interface{})), + JobBookmarksEncryption: expandGlueJobBookmarksEncryption(m["job_bookmarks_encryption"].([]interface{})), + S3Encryption: expandGlueS3Encryptions(m["s3_encryption"].([]interface{})), + } + + return encryptionConfiguration +} + +func expandGlueJobBookmarksEncryption(l []interface{}) *glue.JobBookmarksEncryption { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + jobBookmarksEncryption := &glue.JobBookmarksEncryption{ + JobBookmarksEncryptionMode: aws.String(m["job_bookmarks_encryption_mode"].(string)), + } + + if v, ok := m["kms_key_arn"]; ok { + jobBookmarksEncryption.KmsKeyArn = aws.String(v.(string)) + } + + return jobBookmarksEncryption +} + +func expandGlueS3Encryptions(l []interface{}) []*glue.S3Encryption { + s3Encryptions := make([]*glue.S3Encryption, 0) + + for _, s3Encryption := range l { + if s3Encryption == nil { + continue + } + s3Encryptions = append(s3Encryptions, expandGlueS3Encryption(s3Encryption.(map[string]interface{}))) + } + + return s3Encryptions +} + +func expandGlueS3Encryption(m map[string]interface{}) *glue.S3Encryption { + s3Encryption := &glue.S3Encryption{ + S3EncryptionMode: aws.String(m["s3_encryption_mode"].(string)), + } + + if v, ok := m["kms_key_arn"]; ok { + s3Encryption.KmsKeyArn = aws.String(v.(string)) + } + + return s3Encryption +} + +func flattenGlueCloudWatchEncryption(cloudwatchEncryption *glue.CloudWatchEncryption) []interface{} { + if cloudwatchEncryption == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "cloudwatch_encryption_mode": aws.StringValue(cloudwatchEncryption.CloudWatchEncryptionMode), + "kms_key_arn": aws.StringValue(cloudwatchEncryption.KmsKeyArn), + } + + return []interface{}{m} +} + +func flattenGlueEncryptionConfiguration(encryptionConfiguration *glue.EncryptionConfiguration) []interface{} { + if encryptionConfiguration == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "cloudwatch_encryption": flattenGlueCloudWatchEncryption(encryptionConfiguration.CloudWatchEncryption), + "job_bookmarks_encryption": flattenGlueJobBookmarksEncryption(encryptionConfiguration.JobBookmarksEncryption), + "s3_encryption": flattenGlueS3Encryptions(encryptionConfiguration.S3Encryption), + } + + return []interface{}{m} +} + +func flattenGlueJobBookmarksEncryption(jobBookmarksEncryption *glue.JobBookmarksEncryption) []interface{} { + if jobBookmarksEncryption == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "job_bookmarks_encryption_mode": aws.StringValue(jobBookmarksEncryption.JobBookmarksEncryptionMode), + "kms_key_arn": aws.StringValue(jobBookmarksEncryption.KmsKeyArn), + } + + return []interface{}{m} +} + +func flattenGlueS3Encryptions(s3Encryptions []*glue.S3Encryption) []interface{} { + l := make([]interface{}, 0) + + for _, s3Encryption := range s3Encryptions { + if s3Encryption == nil { + continue + } + l = append(l, flattenGlueS3Encryption(s3Encryption)) + } + + return l +} + +func flattenGlueS3Encryption(s3Encryption *glue.S3Encryption) map[string]interface{} { + m := map[string]interface{}{ + "kms_key_arn": aws.StringValue(s3Encryption.KmsKeyArn), + "s3_encryption_mode": aws.StringValue(s3Encryption.S3EncryptionMode), + } + + return m +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_ipset.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_ipset.go index 6627936b67..b6e0ab64c8 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_ipset.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_ipset.go @@ -86,7 +86,7 @@ func resourceAwsGuardDutyIpsetCreate(d *schema.ResourceData, meta interface{}) e _, err = stateConf.WaitForState() if err != nil { - return fmt.Errorf("[WARN] Error waiting for GuardDuty IpSet status to be \"%s\" or \"%s\": %s", guardduty.IpSetStatusActive, guardduty.IpSetStatusInactive, err) + return fmt.Errorf("Error waiting for GuardDuty IpSet status to be \"%s\" or \"%s\": %s", guardduty.IpSetStatusActive, guardduty.IpSetStatusInactive, err) } d.SetId(fmt.Sprintf("%s:%s", detectorID, *resp.IpSetId)) @@ -186,7 +186,7 @@ func resourceAwsGuardDutyIpsetDelete(d *schema.ResourceData, meta interface{}) e _, err = stateConf.WaitForState() if err != nil { - return fmt.Errorf("[WARN] Error waiting for GuardDuty IpSet status to be \"%s\": %s", guardduty.IpSetStatusDeleted, err) + return fmt.Errorf("Error waiting for GuardDuty IpSet status to be \"%s\": %s", guardduty.IpSetStatusDeleted, err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_threatintelset.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_threatintelset.go index 16351a51ee..75622cef5b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_threatintelset.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_guardduty_threatintelset.go @@ -86,7 +86,7 @@ func resourceAwsGuardDutyThreatintelsetCreate(d *schema.ResourceData, meta inter _, err = stateConf.WaitForState() if err != nil { - return fmt.Errorf("[WARN] Error waiting for GuardDuty ThreatIntelSet status to be \"%s\" or \"%s\": %s", + return fmt.Errorf("Error waiting for GuardDuty ThreatIntelSet status to be \"%s\" or \"%s\": %s", guardduty.ThreatIntelSetStatusActive, guardduty.ThreatIntelSetStatusInactive, err) } @@ -187,7 +187,7 @@ func resourceAwsGuardDutyThreatintelsetDelete(d *schema.ResourceData, meta inter _, err = stateConf.WaitForState() if err != nil { - return fmt.Errorf("[WARN] Error waiting for GuardDuty ThreatIntelSet status to be \"%s\": %s", guardduty.ThreatIntelSetStatusDeleted, err) + return fmt.Errorf("Error waiting for GuardDuty ThreatIntelSet status to be \"%s\": %s", guardduty.ThreatIntelSetStatusDeleted, err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_access_key.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_access_key.go index 16a42213c6..2f9cb681f5 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_access_key.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_access_key.go @@ -75,7 +75,7 @@ func resourceAwsIamAccessKeyCreate(d *schema.ResourceData, meta interface{}) err d.SetId(*createResp.AccessKey.AccessKeyId) if createResp.AccessKey == nil || createResp.AccessKey.SecretAccessKey == nil { - return fmt.Errorf("[ERR] CreateAccessKey response did not contain a Secret Access Key as expected") + return fmt.Errorf("CreateAccessKey response did not contain a Secret Access Key as expected") } if v, ok := d.GetOk("pgp_key"); ok { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_membership.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_membership.go index 4b735d650b..34a8f0b271 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_membership.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_membership.go @@ -88,7 +88,7 @@ func resourceAwsIamGroupMembershipRead(d *schema.ResourceData, meta interface{}) } if err := d.Set("users", ul); err != nil { - return fmt.Errorf("[WARN] Error setting user list from IAM Group Membership (%s), error: %s", group, err) + return fmt.Errorf("Error setting user list from IAM Group Membership (%s), error: %s", group, err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_policy_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_policy_attachment.go index a3526d91bd..26e620bace 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_policy_attachment.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_group_policy_attachment.go @@ -40,7 +40,7 @@ func resourceAwsIamGroupPolicyAttachmentCreate(d *schema.ResourceData, meta inte err := attachPolicyToGroup(conn, group, arn) if err != nil { - return fmt.Errorf("[WARN] Error attaching policy %s to IAM group %s: %v", arn, group, err) + return fmt.Errorf("Error attaching policy %s to IAM group %s: %v", arn, group, err) } d.SetId(resource.PrefixedUniqueId(fmt.Sprintf("%s-", group))) @@ -96,7 +96,7 @@ func resourceAwsIamGroupPolicyAttachmentDelete(d *schema.ResourceData, meta inte err := detachPolicyFromGroup(conn, group, arn) if err != nil { - return fmt.Errorf("[WARN] Error removing policy %s from IAM Group %s: %v", arn, group, err) + return fmt.Errorf("Error removing policy %s from IAM Group %s: %v", arn, group, err) } return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_instance_profile.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_instance_profile.go index 070614cb21..7414ddd29d 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_instance_profile.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_instance_profile.go @@ -160,7 +160,24 @@ func instanceProfileAddRole(iamconn *iam.IAM, profileName, roleName string) erro RoleName: aws.String(roleName), } - _, err := iamconn.AddRoleToInstanceProfile(request) + err := resource.Retry(30*time.Second, func() *resource.RetryError { + var err error + _, err = iamconn.AddRoleToInstanceProfile(request) + // IAM unfortunately does not provide a better error code or message for eventual consistency + // InvalidParameterValue: Value (XXX) for parameter iamInstanceProfile.name is invalid. Invalid IAM Instance Profile name + // NoSuchEntity: The request was rejected because it referenced an entity that does not exist. The error message describes the entity. HTTP Status Code: 404 + if isAWSErr(err, "InvalidParameterValue", "Invalid IAM Instance Profile name") || isAWSErr(err, "NoSuchEntity", "The role with name") { + return resource.RetryableError(err) + } + if err != nil { + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("Error adding IAM Role %s to Instance Profile %s: %s", roleName, profileName, err) + } + return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_policy.go index 7b208cf250..a5c8449ba3 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_policy.go @@ -2,13 +2,13 @@ package aws import ( "fmt" + "log" "net/url" "regexp" + "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/iam" - "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -112,7 +112,9 @@ func resourceAwsIamPolicyCreate(d *schema.ResourceData, meta interface{}) error return fmt.Errorf("Error creating IAM policy %s: %s", name, err) } - return readIamPolicy(d, response.Policy) + d.SetId(*response.Policy.Arn) + + return resourceAwsIamPolicyRead(d, meta) } func resourceAwsIamPolicyRead(d *schema.ResourceData, meta interface{}) error { @@ -121,39 +123,93 @@ func resourceAwsIamPolicyRead(d *schema.ResourceData, meta interface{}) error { getPolicyRequest := &iam.GetPolicyInput{ PolicyArn: aws.String(d.Id()), } + log.Printf("[DEBUG] Getting IAM Policy: %s", getPolicyRequest) - getPolicyResponse, err := iamconn.GetPolicy(getPolicyRequest) - if err != nil { - if iamerr, ok := err.(awserr.Error); ok && iamerr.Code() == "NoSuchEntity" { - d.SetId("") - return nil + // Handle IAM eventual consistency + var getPolicyResponse *iam.GetPolicyOutput + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + getPolicyResponse, err = iamconn.GetPolicy(getPolicyRequest) + + if d.IsNewResource() && isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + return resource.RetryableError(err) } + + if err != nil { + return resource.NonRetryableError(err) + } + + return nil + }) + + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + log.Printf("[WARN] IAM Policy (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if err != nil { return fmt.Errorf("Error reading IAM policy %s: %s", d.Id(), err) } + if getPolicyResponse == nil || getPolicyResponse.Policy == nil { + log.Printf("[WARN] IAM Policy (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + d.Set("arn", getPolicyResponse.Policy.Arn) + d.Set("description", getPolicyResponse.Policy.Description) + d.Set("name", getPolicyResponse.Policy.PolicyName) + d.Set("path", getPolicyResponse.Policy.Path) + + // Retrieve policy + getPolicyVersionRequest := &iam.GetPolicyVersionInput{ PolicyArn: aws.String(d.Id()), VersionId: getPolicyResponse.Policy.DefaultVersionId, } + log.Printf("[DEBUG] Getting IAM Policy Version: %s", getPolicyVersionRequest) - getPolicyVersionResponse, err := iamconn.GetPolicyVersion(getPolicyVersionRequest) - if err != nil { - if iamerr, ok := err.(awserr.Error); ok && iamerr.Code() == "NoSuchEntity" { - d.SetId("") - return nil + // Handle IAM eventual consistency + var getPolicyVersionResponse *iam.GetPolicyVersionOutput + err = resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + getPolicyVersionResponse, err = iamconn.GetPolicyVersion(getPolicyVersionRequest) + + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + return resource.RetryableError(err) } - return fmt.Errorf("Error reading IAM policy version %s: %s", d.Id(), err) + + if err != nil { + return resource.NonRetryableError(err) + } + + return nil + }) + + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + log.Printf("[WARN] IAM Policy (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil } - policy, err := url.QueryUnescape(*getPolicyVersionResponse.PolicyVersion.Document) if err != nil { - return err + return fmt.Errorf("Error reading IAM policy version %s: %s", d.Id(), err) } - if err := d.Set("policy", policy); err != nil { - return err + + policy := "" + if getPolicyVersionResponse != nil && getPolicyVersionResponse.PolicyVersion != nil { + var err error + policy, err = url.QueryUnescape(aws.StringValue(getPolicyVersionResponse.PolicyVersion.Document)) + if err != nil { + return fmt.Errorf("error parsing policy: %s", err) + } } - return readIamPolicy(d, getPolicyResponse.Policy) + d.Set("policy", policy) + + return nil } func resourceAwsIamPolicyUpdate(d *schema.ResourceData, meta interface{}) error { @@ -163,9 +219,6 @@ func resourceAwsIamPolicyUpdate(d *schema.ResourceData, meta interface{}) error return err } - if !d.HasChange("policy") { - return nil - } request := &iam.CreatePolicyVersionInput{ PolicyArn: aws.String(d.Id()), PolicyDocument: aws.String(d.Get("policy").(string)), @@ -175,7 +228,8 @@ func resourceAwsIamPolicyUpdate(d *schema.ResourceData, meta interface{}) error if _, err := iamconn.CreatePolicyVersion(request); err != nil { return fmt.Errorf("Error updating IAM policy %s: %s", d.Id(), err) } - return nil + + return resourceAwsIamPolicyRead(d, meta) } func resourceAwsIamPolicyDelete(d *schema.ResourceData, meta interface{}) error { @@ -190,12 +244,14 @@ func resourceAwsIamPolicyDelete(d *schema.ResourceData, meta interface{}) error } _, err := iamconn.DeletePolicy(request) + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + return nil + } + if err != nil { - if iamerr, ok := err.(awserr.Error); ok && iamerr.Code() == "NoSuchEntity" { - return nil - } return fmt.Errorf("Error deleting IAM policy %s: %#v", d.Id(), err) } + return nil } @@ -275,23 +331,3 @@ func iamPolicyListVersions(arn string, iamconn *iam.IAM) ([]*iam.PolicyVersion, } return response.Versions, nil } - -func readIamPolicy(d *schema.ResourceData, policy *iam.Policy) error { - d.SetId(*policy.Arn) - if policy.Description != nil { - // the description isn't present in the response to CreatePolicy. - if err := d.Set("description", policy.Description); err != nil { - return err - } - } - if err := d.Set("path", policy.Path); err != nil { - return err - } - if err := d.Set("name", policy.PolicyName); err != nil { - return err - } - if err := d.Set("arn", policy.Arn); err != nil { - return err - } - return nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_policy_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_policy_attachment.go index 219dc20a9b..5e1c922734 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_policy_attachment.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_policy_attachment.go @@ -65,7 +65,7 @@ func resourceAwsIamPolicyAttachmentCreate(d *schema.ResourceData, meta interface groups := expandStringList(d.Get("groups").(*schema.Set).List()) if len(users) == 0 && len(roles) == 0 && len(groups) == 0 { - return fmt.Errorf("[WARN] No Users, Roles, or Groups specified for IAM Policy Attachment %s", name) + return fmt.Errorf("No Users, Roles, or Groups specified for IAM Policy Attachment %s", name) } else { var userErr, roleErr, groupErr error if users != nil { @@ -146,13 +146,13 @@ func resourceAwsIamPolicyAttachmentUpdate(d *schema.ResourceData, meta interface var userErr, roleErr, groupErr error if d.HasChange("users") { - userErr = updateUsers(conn, d, meta) + userErr = updateUsers(conn, d) } if d.HasChange("roles") { - roleErr = updateRoles(conn, d, meta) + roleErr = updateRoles(conn, d) } if d.HasChange("groups") { - groupErr = updateGroups(conn, d, meta) + groupErr = updateGroups(conn, d) } if userErr != nil || roleErr != nil || groupErr != nil { return composeErrors(fmt.Sprint("[WARN] Error updating user, role, or group list from IAM Policy Attachment ", name, ":"), userErr, roleErr, groupErr) @@ -264,7 +264,7 @@ func attachPolicyToGroups(conn *iam.IAM, groups []*string, arn string) error { } return nil } -func updateUsers(conn *iam.IAM, d *schema.ResourceData, meta interface{}) error { +func updateUsers(conn *iam.IAM, d *schema.ResourceData) error { arn := d.Get("policy_arn").(string) o, n := d.GetChange("users") if o == nil { @@ -286,7 +286,7 @@ func updateUsers(conn *iam.IAM, d *schema.ResourceData, meta interface{}) error } return nil } -func updateRoles(conn *iam.IAM, d *schema.ResourceData, meta interface{}) error { +func updateRoles(conn *iam.IAM, d *schema.ResourceData) error { arn := d.Get("policy_arn").(string) o, n := d.GetChange("roles") if o == nil { @@ -308,7 +308,7 @@ func updateRoles(conn *iam.IAM, d *schema.ResourceData, meta interface{}) error } return nil } -func updateGroups(conn *iam.IAM, d *schema.ResourceData, meta interface{}) error { +func updateGroups(conn *iam.IAM, d *schema.ResourceData) error { arn := d.Get("policy_arn").(string) o, n := d.GetChange("groups") if o == nil { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role.go index fdbda1f766..08867eee14 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role.go @@ -87,7 +87,7 @@ func resourceAwsIamRole() *schema.Resource { "permissions_boundary": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateMaxLength(2048), + ValidateFunc: validation.StringLenBetween(0, 2048), }, "description": { @@ -100,7 +100,7 @@ func resourceAwsIamRole() *schema.Resource { Type: schema.TypeString, Required: true, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, }, "force_detach_policies": { @@ -120,6 +120,8 @@ func resourceAwsIamRole() *schema.Resource { Default: 3600, ValidateFunc: validation.IntBetween(3600, 43200), }, + + "tags": tagsSchema(), }, } } @@ -160,6 +162,10 @@ func resourceAwsIamRoleCreate(d *schema.ResourceData, meta interface{}) error { request.PermissionsBoundary = aws.String(v.(string)) } + if v, ok := d.GetOk("tags"); ok { + request.Tags = tagsFromMapIAM(v.(map[string]interface{})) + } + var createResp *iam.CreateRoleOutput err := resource.Retry(30*time.Second, func() *resource.RetryError { var err error @@ -215,6 +221,9 @@ func resourceAwsIamRoleRead(d *schema.ResourceData, meta interface{}) error { d.Set("permissions_boundary", role.PermissionsBoundary.PermissionsBoundaryArn) } d.Set("unique_id", role.RoleId) + if err := d.Set("tags", tagsToMapIAM(role.Tags)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } assumRolePolicy, err := url.QueryUnescape(*role.AssumeRolePolicyDocument) if err != nil { @@ -296,6 +305,35 @@ func resourceAwsIamRoleUpdate(d *schema.ResourceData, meta interface{}) error { } } + if d.HasChange("tags") { + // Reset all tags to empty set + oraw, nraw := d.GetChange("tags") + o := oraw.(map[string]interface{}) + n := nraw.(map[string]interface{}) + c, r := diffTagsIAM(tagsFromMapIAM(o), tagsFromMapIAM(n)) + + if len(r) > 0 { + _, err := iamconn.UntagRole(&iam.UntagRoleInput{ + RoleName: aws.String(d.Id()), + TagKeys: tagKeysIam(r), + }) + if err != nil { + return fmt.Errorf("error deleting IAM role tags: %s", err) + } + } + + if len(c) > 0 { + input := &iam.TagRoleInput{ + RoleName: aws.String(d.Id()), + Tags: c, + } + _, err := iamconn.TagRole(input) + if err != nil { + return fmt.Errorf("error update IAM role tags: %s", err) + } + } + } + return resourceAwsIamRoleRead(d, meta) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role_policy.go index 451e9211bf..5ca6096f4f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role_policy.go @@ -79,7 +79,7 @@ func resourceAwsIamRolePolicyPut(d *schema.ResourceData, meta interface{}) error } d.SetId(fmt.Sprintf("%s:%s", *request.RoleName, *request.PolicyName)) - return nil + return resourceAwsIamRolePolicyRead(d, meta) } func resourceAwsIamRolePolicyRead(d *schema.ResourceData, meta interface{}) error { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role_policy_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role_policy_attachment.go index cea391de97..48ac3e91a8 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role_policy_attachment.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_role_policy_attachment.go @@ -3,6 +3,7 @@ package aws import ( "fmt" "log" + "strings" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" @@ -16,6 +17,9 @@ func resourceAwsIamRolePolicyAttachment() *schema.Resource { Create: resourceAwsIamRolePolicyAttachmentCreate, Read: resourceAwsIamRolePolicyAttachmentRead, Delete: resourceAwsIamRolePolicyAttachmentDelete, + Importer: &schema.ResourceImporter{ + State: resourceAwsIamRolePolicyAttachmentImport, + }, Schema: map[string]*schema.Schema{ "role": { @@ -40,7 +44,7 @@ func resourceAwsIamRolePolicyAttachmentCreate(d *schema.ResourceData, meta inter err := attachPolicyToRole(conn, role, arn) if err != nil { - return fmt.Errorf("[WARN] Error attaching policy %s to IAM Role %s: %v", arn, role, err) + return fmt.Errorf("Error attaching policy %s to IAM Role %s: %v", arn, role, err) } d.SetId(resource.PrefixedUniqueId(fmt.Sprintf("%s-", role))) @@ -98,11 +102,27 @@ func resourceAwsIamRolePolicyAttachmentDelete(d *schema.ResourceData, meta inter err := detachPolicyFromRole(conn, role, arn) if err != nil { - return fmt.Errorf("[WARN] Error removing policy %s from IAM Role %s: %v", arn, role, err) + return fmt.Errorf("Error removing policy %s from IAM Role %s: %v", arn, role, err) } return nil } +func resourceAwsIamRolePolicyAttachmentImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + idParts := strings.SplitN(d.Id(), "/", 2) + if len(idParts) != 2 || idParts[0] == "" || idParts[1] == "" { + return nil, fmt.Errorf("unexpected format of ID (%q), expected /", d.Id()) + } + + roleName := idParts[0] + policyARN := idParts[1] + + d.Set("role", roleName) + d.Set("policy_arn", policyARN) + d.SetId(fmt.Sprintf("%s-%s", roleName, policyARN)) + + return []*schema.ResourceData{d}, nil +} + func attachPolicyToRole(conn *iam.IAM, role string, arn string) error { _, err := conn.AttachRolePolicy(&iam.AttachRolePolicyInput{ RoleName: aws.String(role), diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_server_certificate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_server_certificate.go index 2a14150ec5..c9c79297ee 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_server_certificate.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_server_certificate.go @@ -15,6 +15,7 @@ import ( "github.com/aws/aws-sdk-go/service/iam" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsIAMServerCertificate() *schema.Resource { @@ -62,7 +63,7 @@ func resourceAwsIAMServerCertificate() *schema.Resource { Computed: true, ForceNew: true, ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validateMaxLength(128), + ValidateFunc: validation.StringLenBetween(0, 128), }, "name_prefix": { @@ -70,7 +71,7 @@ func resourceAwsIAMServerCertificate() *schema.Resource { Optional: true, ForceNew: true, ConflictsWith: []string{"name"}, - ValidateFunc: validateMaxLength(128 - resource.UniqueIDSuffixLength), + ValidateFunc: validation.StringLenBetween(0, 128-resource.UniqueIDSuffixLength), }, "arn": { @@ -112,9 +113,9 @@ func resourceAwsIAMServerCertificateCreate(d *schema.ResourceData, meta interfac resp, err := conn.UploadServerCertificate(createOpts) if err != nil { if awsErr, ok := err.(awserr.Error); ok { - return fmt.Errorf("[WARN] Error uploading server certificate, error: %s: %s", awsErr.Code(), awsErr.Message()) + return fmt.Errorf("Error uploading server certificate, error: %s: %s", awsErr.Code(), awsErr.Message()) } - return fmt.Errorf("[WARN] Error uploading server certificate, error: %s", err) + return fmt.Errorf("Error uploading server certificate, error: %s", err) } d.SetId(*resp.ServerCertificateMetadata.ServerCertificateId) @@ -136,9 +137,9 @@ func resourceAwsIAMServerCertificateRead(d *schema.ResourceData, meta interface{ d.SetId("") return nil } - return fmt.Errorf("[WARN] Error reading IAM Server Certificate: %s: %s", awsErr.Code(), awsErr.Message()) + return fmt.Errorf("Error reading IAM Server Certificate: %s: %s", awsErr.Code(), awsErr.Message()) } - return fmt.Errorf("[WARN] Error reading IAM Server Certificate: %s", err) + return fmt.Errorf("Error reading IAM Server Certificate: %s", err) } d.SetId(*resp.ServerCertificate.ServerCertificateMetadata.ServerCertificateId) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user.go index 00595c91df..c3a622a921 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user.go @@ -54,7 +54,7 @@ func resourceAwsIamUser() *schema.Resource { "permissions_boundary": { Type: schema.TypeString, Optional: true, - ValidateFunc: validation.StringLenBetween(20, 2048), + ValidateFunc: validation.StringLenBetween(0, 2048), }, "force_destroy": { Type: schema.TypeBool, @@ -62,6 +62,7 @@ func resourceAwsIamUser() *schema.Resource { Default: false, Description: "Delete user even if it has non-Terraform-managed IAM access keys, login profile or MFA devices", }, + "tags": tagsSchema(), }, } } @@ -80,6 +81,11 @@ func resourceAwsIamUserCreate(d *schema.ResourceData, meta interface{}) error { request.PermissionsBoundary = aws.String(v.(string)) } + if v, ok := d.GetOk("tags"); ok { + tags := tagsFromMapIAM(v.(map[string]interface{})) + request.Tags = tags + } + log.Println("[DEBUG] Create IAM User request:", request) createResp, err := iamconn.CreateUser(request) if err != nil { @@ -121,6 +127,9 @@ func resourceAwsIamUserRead(d *schema.ResourceData, meta interface{}) error { d.Set("permissions_boundary", output.User.PermissionsBoundary.PermissionsBoundaryArn) } d.Set("unique_id", output.User.UserId) + if err := d.Set("tags", tagsToMapIAM(output.User.Tags)); err != nil { + return fmt.Errorf("error setting tags: %s", err) + } return nil } @@ -174,6 +183,35 @@ func resourceAwsIamUserUpdate(d *schema.ResourceData, meta interface{}) error { } } + if d.HasChange("tags") { + // Reset all tags to empty set + oraw, nraw := d.GetChange("tags") + o := oraw.(map[string]interface{}) + n := nraw.(map[string]interface{}) + c, r := diffTagsIAM(tagsFromMapIAM(o), tagsFromMapIAM(n)) + + if len(r) > 0 { + _, err := iamconn.UntagUser(&iam.UntagUserInput{ + UserName: aws.String(d.Id()), + TagKeys: tagKeysIam(r), + }) + if err != nil { + return fmt.Errorf("error deleting IAM user tags: %s", err) + } + } + + if len(c) > 0 { + input := &iam.TagUserInput{ + UserName: aws.String(d.Id()), + Tags: c, + } + _, err := iamconn.TagUser(input) + if err != nil { + return fmt.Errorf("error update IAM user tags: %s", err) + } + } + } + return resourceAwsIamUserRead(d, meta) } @@ -205,84 +243,26 @@ func resourceAwsIamUserDelete(d *schema.ResourceData, meta interface{}) error { // All access keys, MFA devices and login profile for the user must be removed if d.Get("force_destroy").(bool) { - var accessKeys []string - listAccessKeys := &iam.ListAccessKeysInput{ - UserName: aws.String(d.Id()), - } - pageOfAccessKeys := func(page *iam.ListAccessKeysOutput, lastPage bool) (shouldContinue bool) { - for _, k := range page.AccessKeyMetadata { - accessKeys = append(accessKeys, *k.AccessKeyId) - } - return !lastPage - } - err = iamconn.ListAccessKeysPages(listAccessKeys, pageOfAccessKeys) + + err = deleteAwsIamUserAccessKeys(iamconn, d.Id()) if err != nil { - return fmt.Errorf("Error removing access keys of user %s: %s", d.Id(), err) - } - for _, k := range accessKeys { - _, err := iamconn.DeleteAccessKey(&iam.DeleteAccessKeyInput{ - UserName: aws.String(d.Id()), - AccessKeyId: aws.String(k), - }) - if err != nil { - return fmt.Errorf("Error deleting access key %s: %s", k, err) - } + return err } - var MFADevices []string - listMFADevices := &iam.ListMFADevicesInput{ - UserName: aws.String(d.Id()), - } - pageOfMFADevices := func(page *iam.ListMFADevicesOutput, lastPage bool) (shouldContinue bool) { - for _, m := range page.MFADevices { - MFADevices = append(MFADevices, *m.SerialNumber) - } - return !lastPage - } - err = iamconn.ListMFADevicesPages(listMFADevices, pageOfMFADevices) + err = deleteAwsIamUserSSHKeys(iamconn, d.Id()) if err != nil { - return fmt.Errorf("Error removing MFA devices of user %s: %s", d.Id(), err) - } - for _, m := range MFADevices { - _, err := iamconn.DeactivateMFADevice(&iam.DeactivateMFADeviceInput{ - UserName: aws.String(d.Id()), - SerialNumber: aws.String(m), - }) - if err != nil { - return fmt.Errorf("Error deactivating MFA device %s: %s", m, err) - } + return err } - err = resource.Retry(1*time.Minute, func() *resource.RetryError { - _, err = iamconn.DeleteLoginProfile(&iam.DeleteLoginProfileInput{ - UserName: aws.String(d.Id()), - }) - if err != nil { - if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - return nil - } - // EntityTemporarilyUnmodifiable: Login Profile for User XXX cannot be modified while login profile is being created. - if isAWSErr(err, iam.ErrCodeEntityTemporarilyUnmodifiableException, "") { - return resource.RetryableError(err) - } - return resource.NonRetryableError(err) - } - return nil - }) - + err = deleteAwsIamUserMFADevices(iamconn, d.Id()) if err != nil { - return fmt.Errorf("Error deleting Account Login Profile: %s", err) + return err } - } - deleteUserPermissionsBoundaryInput := &iam.DeleteUserPermissionsBoundaryInput{ - UserName: aws.String(d.Id()), - } - - log.Println("[DEBUG] Delete IAM User Permissions Boundary request:", deleteUserPermissionsBoundaryInput) - _, err = iamconn.DeleteUserPermissionsBoundary(deleteUserPermissionsBoundaryInput) - if err != nil && !isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { - return fmt.Errorf("Error deleting IAM User %s Permissions Boundary: %s", d.Id(), err) + err = deleteAwsIamUserLoginProfile(iamconn, d.Id()) + if err != nil { + return err + } } deleteUserInput := &iam.DeleteUserInput{ @@ -310,3 +290,118 @@ func validateAwsIamUserName(v interface{}, k string) (ws []string, errors []erro } return } + +func deleteAwsIamUserSSHKeys(svc *iam.IAM, username string) error { + var publicKeys []string + var err error + + listSSHPublicKeys := &iam.ListSSHPublicKeysInput{ + UserName: aws.String(username), + } + pageOfListSSHPublicKeys := func(page *iam.ListSSHPublicKeysOutput, lastPage bool) (shouldContinue bool) { + for _, k := range page.SSHPublicKeys { + publicKeys = append(publicKeys, *k.SSHPublicKeyId) + } + return !lastPage + } + err = svc.ListSSHPublicKeysPages(listSSHPublicKeys, pageOfListSSHPublicKeys) + if err != nil { + return fmt.Errorf("Error removing public SSH keys of user %s: %s", username, err) + } + for _, k := range publicKeys { + _, err := svc.DeleteSSHPublicKey(&iam.DeleteSSHPublicKeyInput{ + UserName: aws.String(username), + SSHPublicKeyId: aws.String(k), + }) + if err != nil { + return fmt.Errorf("Error deleting public SSH key %s: %s", k, err) + } + } + + return nil +} + +func deleteAwsIamUserMFADevices(svc *iam.IAM, username string) error { + var MFADevices []string + var err error + + listMFADevices := &iam.ListMFADevicesInput{ + UserName: aws.String(username), + } + pageOfMFADevices := func(page *iam.ListMFADevicesOutput, lastPage bool) (shouldContinue bool) { + for _, m := range page.MFADevices { + MFADevices = append(MFADevices, *m.SerialNumber) + } + return !lastPage + } + err = svc.ListMFADevicesPages(listMFADevices, pageOfMFADevices) + if err != nil { + return fmt.Errorf("Error removing MFA devices of user %s: %s", username, err) + } + for _, m := range MFADevices { + _, err := svc.DeactivateMFADevice(&iam.DeactivateMFADeviceInput{ + UserName: aws.String(username), + SerialNumber: aws.String(m), + }) + if err != nil { + return fmt.Errorf("Error deactivating MFA device %s: %s", m, err) + } + } + + return nil +} + +func deleteAwsIamUserLoginProfile(svc *iam.IAM, username string) error { + var err error + err = resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err = svc.DeleteLoginProfile(&iam.DeleteLoginProfileInput{ + UserName: aws.String(username), + }) + if err != nil { + if isAWSErr(err, iam.ErrCodeNoSuchEntityException, "") { + return nil + } + // EntityTemporarilyUnmodifiable: Login Profile for User XXX cannot be modified while login profile is being created. + if isAWSErr(err, iam.ErrCodeEntityTemporarilyUnmodifiableException, "") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + + if err != nil { + return fmt.Errorf("Error deleting Account Login Profile: %s", err) + } + + return nil +} + +func deleteAwsIamUserAccessKeys(svc *iam.IAM, username string) error { + var accessKeys []string + var err error + listAccessKeys := &iam.ListAccessKeysInput{ + UserName: aws.String(username), + } + pageOfAccessKeys := func(page *iam.ListAccessKeysOutput, lastPage bool) (shouldContinue bool) { + for _, k := range page.AccessKeyMetadata { + accessKeys = append(accessKeys, *k.AccessKeyId) + } + return !lastPage + } + err = svc.ListAccessKeysPages(listAccessKeys, pageOfAccessKeys) + if err != nil { + return fmt.Errorf("Error removing access keys of user %s: %s", username, err) + } + for _, k := range accessKeys { + _, err := svc.DeleteAccessKey(&iam.DeleteAccessKeyInput{ + UserName: aws.String(username), + AccessKeyId: aws.String(k), + }) + if err != nil { + return fmt.Errorf("Error deleting access key %s: %s", k, err) + } + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_group_membership.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_group_membership.go index 83ef39df1f..e5333a3847 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_group_membership.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_group_membership.go @@ -86,7 +86,7 @@ func resourceAwsIamUserGroupMembershipRead(d *schema.ResourceData, meta interfac } if err := d.Set("groups", gl); err != nil { - return fmt.Errorf("[WARN] Error setting group list from IAM (%s), error: %s", user, err) + return fmt.Errorf("Error setting group list from IAM (%s), error: %s", user, err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_login_profile.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_login_profile.go index 98c0ac4e8f..2d680acc01 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_login_profile.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_login_profile.go @@ -10,7 +10,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/iam" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/encryption" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" @@ -71,7 +70,7 @@ func generateIAMPassword(length int) string { result := make([]byte, length) charsetSize := big.NewInt(int64(len(charset))) - // rather than trying to artifically add specific characters from each + // rather than trying to artificially add specific characters from each // class to the password to match the policy, we generate passwords // randomly and reject those that don't match. // @@ -166,7 +165,7 @@ func resourceAwsIamUserLoginProfileCreate(d *schema.ResourceData, meta interface d.Set("encrypted_password", "") return nil } - return errwrap.Wrapf(fmt.Sprintf("Error creating IAM User Login Profile for %q: {{err}}", username), err) + return fmt.Errorf("Error creating IAM User Login Profile for %q: %s", username, err) } d.SetId(*createResp.LoginProfile.UserName) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_policy_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_policy_attachment.go index e0b52c09a4..45bf9b4fe8 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_policy_attachment.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iam_user_policy_attachment.go @@ -40,7 +40,7 @@ func resourceAwsIamUserPolicyAttachmentCreate(d *schema.ResourceData, meta inter err := attachPolicyToUser(conn, user, arn) if err != nil { - return fmt.Errorf("[WARN] Error attaching policy %s to IAM User %s: %v", arn, user, err) + return fmt.Errorf("Error attaching policy %s to IAM User %s: %v", arn, user, err) } d.SetId(resource.PrefixedUniqueId(fmt.Sprintf("%s-", user))) @@ -95,7 +95,7 @@ func resourceAwsIamUserPolicyAttachmentDelete(d *schema.ResourceData, meta inter err := detachPolicyFromUser(conn, user, arn) if err != nil { - return fmt.Errorf("[WARN] Error removing policy %s from IAM User %s: %v", arn, user, err) + return fmt.Errorf("Error removing policy %s from IAM User %s: %v", arn, user, err) } return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_instance.go index 65637d7a05..e8e44f4d64 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_instance.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_instance.go @@ -18,6 +18,7 @@ import ( "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsInstance() *schema.Resource { @@ -142,7 +143,7 @@ func resourceAwsInstance() *schema.Resource { return "" } }, - ValidateFunc: validateMaxLength(16384), + ValidateFunc: validation.StringLenBetween(0, 16384), }, "user_data_base64": { @@ -478,7 +479,21 @@ func resourceAwsInstance() *schema.Resource { "cpu_credits": { Type: schema.TypeString, Optional: true, - Default: "standard", + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + // Only work with existing instances + if d.Id() == "" { + return false + } + // Only work with missing configurations + if new != "" { + return false + } + // Only work when already set in Terraform state + if old == "" { + return false + } + return true + }, }, }, }, @@ -988,7 +1003,7 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error { // Because we're calling Update prior to Read, and the default value of `source_dest_check` is `true`, // HasChange() thinks there is a diff between what is set on the instance and what is set in state. We need to ensure that - // if a diff has occured, it's not because it's a new instance. + // if a diff has occurred, it's not because it's a new instance. if d.HasChange("source_dest_check") && !d.IsNewResource() || d.IsNewResource() && !sourceDestCheck { // SourceDestCheck can only be set on VPC instances // AWS will return an error of InvalidParameterCombination if we attempt @@ -1064,6 +1079,9 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error { _, err := conn.StopInstances(&ec2.StopInstancesInput{ InstanceIds: []*string{aws.String(d.Id())}, }) + if err != nil { + return fmt.Errorf("error stopping instance (%s): %s", d.Id(), err) + } stateConf := &resource.StateChangeConf{ Pending: []string{"pending", "running", "shutting-down", "stopped", "stopping"}, @@ -1095,6 +1113,9 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error { _, err = conn.StartInstances(&ec2.StartInstancesInput{ InstanceIds: []*string{aws.String(d.Id())}, }) + if err != nil { + return fmt.Errorf("error starting instance (%s): %s", d.Id(), err) + } stateConf = &resource.StateChangeConf{ Pending: []string{"pending", "stopped"}, @@ -1152,7 +1173,7 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error { }) } if mErr != nil { - return fmt.Errorf("[WARN] Error updating Instance monitoring: %s", mErr) + return fmt.Errorf("Error updating Instance monitoring: %s", mErr) } } @@ -1169,7 +1190,7 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error { }, }) if err != nil { - return fmt.Errorf("[WARN] Error updating Instance credit specification: %s", err) + return fmt.Errorf("Error updating Instance credit specification: %s", err) } } } @@ -1185,7 +1206,7 @@ func resourceAwsInstanceUpdate(d *schema.ResourceData, meta interface{}) error { func resourceAwsInstanceDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn - if err := awsTerminateInstance(conn, d.Id(), d); err != nil { + if err := awsTerminateInstance(conn, d.Id(), d.Timeout(schema.TimeoutDelete)); err != nil { return err } @@ -1391,7 +1412,7 @@ func fetchRootDeviceName(ami string, conn *ec2.EC2) (*string, error) { } if rootDeviceName == nil { - return nil, fmt.Errorf("[WARN] Error finding Root Device Name for AMI (%s)", ami) + return nil, fmt.Errorf("Error finding Root Device Name for AMI (%s)", ami) } return rootDeviceName, nil @@ -1741,15 +1762,22 @@ func buildAwsInstanceOpts( InstanceType: aws.String(instanceType), } + // Set default cpu_credits as Unlimited for T3 instance type + if strings.HasPrefix(instanceType, "t3") { + opts.CreditSpecification = &ec2.CreditSpecificationRequest{ + CpuCredits: aws.String("unlimited"), + } + } + if v, ok := d.GetOk("credit_specification"); ok { - // Only T2 instances support T2 Unlimited - if strings.HasPrefix(instanceType, "t2") { + // Only T2 and T3 are burstable performance instance types and supports Unlimited + if strings.HasPrefix(instanceType, "t2") || strings.HasPrefix(instanceType, "t3") { cs := v.([]interface{})[0].(map[string]interface{}) opts.CreditSpecification = &ec2.CreditSpecificationRequest{ CpuCredits: aws.String(cs["cpu_credits"].(string)), } } else { - log.Print("[WARN] credit_specification is defined but instance type is not T2. Ignoring...") + log.Print("[WARN] credit_specification is defined but instance type is not T2/T3. Ignoring...") } } @@ -1880,7 +1908,7 @@ func buildAwsInstanceOpts( return opts, nil } -func awsTerminateInstance(conn *ec2.EC2, id string, d *schema.ResourceData) error { +func awsTerminateInstance(conn *ec2.EC2, id string, timeout time.Duration) error { log.Printf("[INFO] Terminating instance: %s", id) req := &ec2.TerminateInstancesInput{ InstanceIds: []*string{aws.String(id)}, @@ -1895,7 +1923,7 @@ func awsTerminateInstance(conn *ec2.EC2, id string, d *schema.ResourceData) erro Pending: []string{"pending", "running", "shutting-down", "stopped", "stopping"}, Target: []string{"terminated"}, Refresh: InstanceStateRefreshFunc(conn, id, []string{}), - Timeout: d.Timeout(schema.TimeoutDelete), + Timeout: timeout, Delay: 10 * time.Second, MinTimeout: 3 * time.Second, } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_internet_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_internet_gateway.go index 43c776004a..7f87e92040 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_internet_gateway.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_internet_gateway.go @@ -8,7 +8,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -62,7 +61,7 @@ func resourceAwsInternetGatewayCreate(d *schema.ResourceData, meta interface{}) }) if err != nil { - return errwrap.Wrapf("{{err}}", err) + return fmt.Errorf("%s", err) } err = setTags(conn, d) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_policy_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_policy_attachment.go new file mode 100644 index 0000000000..eba80e6fec --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_policy_attachment.go @@ -0,0 +1,137 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/iot" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsIotPolicyAttachment() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsIotPolicyAttachmentCreate, + Read: resourceAwsIotPolicyAttachmentRead, + Delete: resourceAwsIotPolicyAttachmentDelete, + Schema: map[string]*schema.Schema{ + "policy": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "target": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + }, + } +} + +func resourceAwsIotPolicyAttachmentCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iotconn + + policyName := d.Get("policy").(string) + target := d.Get("target").(string) + + _, err := conn.AttachPolicy(&iot.AttachPolicyInput{ + PolicyName: aws.String(policyName), + Target: aws.String(target), + }) + + if err != nil { + return fmt.Errorf("error attaching policy %s to target %s: %s", policyName, target, err) + } + + d.SetId(fmt.Sprintf("%s|%s", policyName, target)) + return resourceAwsIotPolicyAttachmentRead(d, meta) +} + +func listIotPolicyAttachmentPages(conn *iot.IoT, input *iot.ListAttachedPoliciesInput, + fn func(out *iot.ListAttachedPoliciesOutput, lastPage bool) bool) error { + for { + page, err := conn.ListAttachedPolicies(input) + if err != nil { + return err + } + lastPage := page.NextMarker == nil + + shouldContinue := fn(page, lastPage) + if !shouldContinue || lastPage { + break + } + input.Marker = page.NextMarker + } + return nil +} + +func getIotPolicyAttachment(conn *iot.IoT, target, policyName string) (*iot.Policy, error) { + var policy *iot.Policy + + input := &iot.ListAttachedPoliciesInput{ + PageSize: aws.Int64(250), + Recursive: aws.Bool(false), + Target: aws.String(target), + } + + err := listIotPolicyAttachmentPages(conn, input, func(out *iot.ListAttachedPoliciesOutput, lastPage bool) bool { + for _, att := range out.Policies { + if policyName == aws.StringValue(att.PolicyName) { + policy = att + return false + } + } + return true + }) + + return policy, err +} + +func resourceAwsIotPolicyAttachmentRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iotconn + + policyName := d.Get("policy").(string) + target := d.Get("target").(string) + + var policy *iot.Policy + + policy, err := getIotPolicyAttachment(conn, target, policyName) + + if err != nil { + return fmt.Errorf("error listing policy attachments for target %s: %s", target, err) + } + + if policy == nil { + log.Printf("[WARN] IOT Policy Attachment (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + return nil +} + +func resourceAwsIotPolicyAttachmentDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iotconn + + policyName := d.Get("policy").(string) + target := d.Get("target").(string) + + _, err := conn.DetachPolicy(&iot.DetachPolicyInput{ + PolicyName: aws.String(policyName), + Target: aws.String(target), + }) + + // DetachPolicy doesn't return an error if the policy doesn't exist, + // but it returns an error if the Target is not found. + if isAWSErr(err, iot.ErrCodeInvalidRequestException, "Invalid Target") { + log.Printf("[WARN] IOT target (%s) not found, removing attachment to policy (%s) from state", target, policyName) + return nil + } + + if err != nil { + return fmt.Errorf("error detaching policy %s from target %s: %s", policyName, target, err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_thing_principal_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_thing_principal_attachment.go new file mode 100644 index 0000000000..4cc9e93952 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_thing_principal_attachment.go @@ -0,0 +1,109 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/iot" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsIotThingPrincipalAttachment() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsIotThingPrincipalAttachmentCreate, + Read: resourceAwsIotThingPrincipalAttachmentRead, + Delete: resourceAwsIotThingPrincipalAttachmentDelete, + + Schema: map[string]*schema.Schema{ + "principal": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "thing": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + }, + } +} + +func resourceAwsIotThingPrincipalAttachmentCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iotconn + + principal := d.Get("principal").(string) + thing := d.Get("thing").(string) + + _, err := conn.AttachThingPrincipal(&iot.AttachThingPrincipalInput{ + Principal: aws.String(principal), + ThingName: aws.String(thing), + }) + + if err != nil { + return fmt.Errorf("error attaching principal %s to thing %s: %s", principal, thing, err) + } + + d.SetId(fmt.Sprintf("%s|%s", thing, principal)) + return resourceAwsIotThingPrincipalAttachmentRead(d, meta) +} + +func getIoTThingPricipalAttachment(conn *iot.IoT, thing, principal string) (bool, error) { + out, err := conn.ListThingPrincipals(&iot.ListThingPrincipalsInput{ + ThingName: aws.String(thing), + }) + if isAWSErr(err, iot.ErrCodeResourceNotFoundException, "") { + return false, nil + } else if err != nil { + return false, err + } + found := false + for _, name := range out.Principals { + if principal == aws.StringValue(name) { + found = true + break + } + } + return found, nil +} + +func resourceAwsIotThingPrincipalAttachmentRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iotconn + + principal := d.Get("principal").(string) + thing := d.Get("thing").(string) + + found, err := getIoTThingPricipalAttachment(conn, thing, principal) + + if err != nil { + return fmt.Errorf("error listing principals for thing %s: %s", thing, err) + } + + if !found { + log.Printf("[WARN] IoT Thing Principal Attachment (%s) not found, removing from state", d.Id()) + d.SetId("") + } + + return nil +} + +func resourceAwsIotThingPrincipalAttachmentDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).iotconn + + principal := d.Get("principal").(string) + thing := d.Get("thing").(string) + + _, err := conn.DetachThingPrincipal(&iot.DetachThingPrincipalInput{ + Principal: aws.String(principal), + ThingName: aws.String(thing), + }) + + if isAWSErr(err, iot.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] IoT Principal %s or Thing %s not found, removing from state", principal, thing) + } else if err != nil { + return fmt.Errorf("error detaching principal %s from thing %s: %s", principal, thing, err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_topic_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_topic_rule.go index 0017db710d..36500a6d43 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_topic_rule.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_iot_topic_rule.go @@ -190,6 +190,11 @@ func resourceAwsIotTopicRule() *schema.Resource { Required: true, ValidateFunc: validateArn, }, + "separator": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateIoTTopicRuleFirehoseSeparator, + }, }, }, }, @@ -413,12 +418,16 @@ func createTopicRulePayload(d *schema.ResourceData) *iot.TopicRulePayload { for _, a := range firehoseActions { raw := a.(map[string]interface{}) - actions[i] = &iot.Action{ + act := &iot.Action{ Firehose: &iot.FirehoseAction{ DeliveryStreamName: aws.String(raw["delivery_stream_name"].(string)), RoleArn: aws.String(raw["role_arn"].(string)), }, } + if v, ok := raw["separator"].(string); ok && v != "" { + act.Firehose.Separator = aws.String(raw["separator"].(string)) + } + actions[i] = act i++ } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_key_pair.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_key_pair.go index 971c817379..48f954b9cc 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_key_pair.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_key_pair.go @@ -6,6 +6,7 @@ import ( "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" @@ -32,14 +33,14 @@ func resourceAwsKeyPair() *schema.Resource { Computed: true, ForceNew: true, ConflictsWith: []string{"key_name_prefix"}, - ValidateFunc: validateMaxLength(255), + ValidateFunc: validation.StringLenBetween(0, 255), }, "key_name_prefix": { Type: schema.TypeString, Optional: true, ForceNew: true, ConflictsWith: []string{"key_name"}, - ValidateFunc: validateMaxLength(255 - resource.UniqueIDSuffixLength), + ValidateFunc: validation.StringLenBetween(0, 255-resource.UniqueIDSuffixLength), }, "public_key": { Type: schema.TypeString, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_analytics_application.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_analytics_application.go new file mode 100644 index 0000000000..2aaaf3556a --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_analytics_application.go @@ -0,0 +1,1558 @@ +package aws + +import ( + "fmt" + "log" + "reflect" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/kinesisanalytics" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsKinesisAnalyticsApplication() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsKinesisAnalyticsApplicationCreate, + Read: resourceAwsKinesisAnalyticsApplicationRead, + Update: resourceAwsKinesisAnalyticsApplicationUpdate, + Delete: resourceAwsKinesisAnalyticsApplicationDelete, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + + "arn": { + Type: schema.TypeString, + Computed: true, + }, + + "code": { + Type: schema.TypeString, + Optional: true, + }, + + "create_timestamp": { + Type: schema.TypeString, + Computed: true, + }, + + "description": { + Type: schema.TypeString, + Optional: true, + }, + + "last_update_timestamp": { + Type: schema.TypeString, + Computed: true, + }, + + "status": { + Type: schema.TypeString, + Computed: true, + }, + + "version": { + Type: schema.TypeInt, + Computed: true, + }, + + "cloudwatch_logging_options": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Computed: true, + }, + + "log_stream_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + + "role_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + }, + }, + }, + + "inputs": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Computed: true, + }, + + "kinesis_firehose": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "resource_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + + "role_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + }, + }, + }, + + "kinesis_stream": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "resource_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + + "role_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + }, + }, + }, + + "name_prefix": { + Type: schema.TypeString, + Required: true, + }, + + "parallelism": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "count": { + Type: schema.TypeInt, + Required: true, + }, + }, + }, + }, + + "processing_configuration": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "lambda": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "resource_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + + "role_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + }, + }, + }, + }, + }, + }, + + "schema": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "record_columns": { + Type: schema.TypeList, + Required: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "mapping": { + Type: schema.TypeString, + Optional: true, + }, + + "name": { + Type: schema.TypeString, + Required: true, + }, + + "sql_type": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + + "record_encoding": { + Type: schema.TypeString, + Optional: true, + }, + + "record_format": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "mapping_parameters": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "csv": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "record_column_delimiter": { + Type: schema.TypeString, + Required: true, + }, + + "record_row_delimiter": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + + "json": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "record_row_path": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + }, + }, + }, + + "record_format_type": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + }, + }, + + "starting_position_configuration": { + Type: schema.TypeList, + Computed: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "starting_position": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + + "stream_names": { + Type: schema.TypeSet, + Computed: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + }, + }, + + "outputs": { + Type: schema.TypeList, + Optional: true, + MaxItems: 3, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Computed: true, + }, + + "kinesis_firehose": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "resource_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + + "role_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + }, + }, + }, + + "kinesis_stream": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "resource_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + + "role_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + }, + }, + }, + + "lambda": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "resource_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + + "role_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + }, + }, + }, + + "name": { + Type: schema.TypeString, + Required: true, + }, + + "schema": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "record_format_type": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{ + kinesisanalytics.RecordFormatTypeCsv, + kinesisanalytics.RecordFormatTypeJson, + }, false), + }, + }, + }, + }, + }, + }, + }, + + "reference_data_sources": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "id": { + Type: schema.TypeString, + Computed: true, + }, + + "s3": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "bucket_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + + "file_key": { + Type: schema.TypeString, + Required: true, + }, + + "role_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + }, + }, + }, + + "schema": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "record_columns": { + Type: schema.TypeList, + Required: true, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "mapping": { + Type: schema.TypeString, + Optional: true, + }, + + "name": { + Type: schema.TypeString, + Required: true, + }, + + "sql_type": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + + "record_encoding": { + Type: schema.TypeString, + Optional: true, + }, + + "record_format": { + Type: schema.TypeList, + Required: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "mapping_parameters": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "csv": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "record_column_delimiter": { + Type: schema.TypeString, + Required: true, + }, + + "record_row_delimiter": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + + "json": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "record_row_path": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + }, + }, + }, + + "record_format_type": { + Type: schema.TypeString, + Computed: true, + }, + }, + }, + }, + }, + }, + }, + + "table_name": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + }, + } +} + +func resourceAwsKinesisAnalyticsApplicationCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).kinesisanalyticsconn + name := d.Get("name").(string) + createOpts := &kinesisanalytics.CreateApplicationInput{ + ApplicationName: aws.String(name), + } + + if v, ok := d.GetOk("code"); ok && v.(string) != "" { + createOpts.ApplicationCode = aws.String(v.(string)) + } + + if v, ok := d.GetOk("cloudwatch_logging_options"); ok { + clo := v.([]interface{})[0].(map[string]interface{}) + cloudwatchLoggingOption := expandKinesisAnalyticsCloudwatchLoggingOption(clo) + createOpts.CloudWatchLoggingOptions = []*kinesisanalytics.CloudWatchLoggingOption{cloudwatchLoggingOption} + } + + if v, ok := d.GetOk("inputs"); ok { + i := v.([]interface{})[0].(map[string]interface{}) + inputs := expandKinesisAnalyticsInputs(i) + createOpts.Inputs = []*kinesisanalytics.Input{inputs} + } + + if v, ok := d.GetOk("outputs"); ok { + o := v.([]interface{})[0].(map[string]interface{}) + outputs := expandKinesisAnalyticsOutputs(o) + createOpts.Outputs = []*kinesisanalytics.Output{outputs} + } + + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + output, err := conn.CreateApplication(createOpts) + if err != nil { + if isAWSErr(err, kinesisanalytics.ErrCodeInvalidArgumentException, "Kinesis Analytics service doesn't have sufficient privileges") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + d.SetId(aws.StringValue(output.ApplicationSummary.ApplicationARN)) + return nil + }) + if err != nil { + return fmt.Errorf("Unable to create Kinesis Analytics application: %s", err) + } + + return resourceAwsKinesisAnalyticsApplicationUpdate(d, meta) +} + +func resourceAwsKinesisAnalyticsApplicationRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).kinesisanalyticsconn + name := d.Get("name").(string) + + describeOpts := &kinesisanalytics.DescribeApplicationInput{ + ApplicationName: aws.String(name), + } + resp, err := conn.DescribeApplication(describeOpts) + if isAWSErr(err, kinesisanalytics.ErrCodeResourceNotFoundException, "") { + log.Printf("[WARN] Kinesis Analytics Application (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + if err != nil { + return fmt.Errorf("error reading Kinesis Analytics Application (%s): %s", d.Id(), err) + } + + d.Set("name", aws.StringValue(resp.ApplicationDetail.ApplicationName)) + d.Set("arn", aws.StringValue(resp.ApplicationDetail.ApplicationARN)) + d.Set("code", aws.StringValue(resp.ApplicationDetail.ApplicationCode)) + d.Set("create_timestamp", aws.TimeValue(resp.ApplicationDetail.CreateTimestamp).Format(time.RFC3339)) + d.Set("description", aws.StringValue(resp.ApplicationDetail.ApplicationDescription)) + d.Set("last_update_timestamp", aws.TimeValue(resp.ApplicationDetail.LastUpdateTimestamp).Format(time.RFC3339)) + d.Set("status", aws.StringValue(resp.ApplicationDetail.ApplicationStatus)) + d.Set("version", int(aws.Int64Value(resp.ApplicationDetail.ApplicationVersionId))) + + if err := d.Set("cloudwatch_logging_options", flattenKinesisAnalyticsCloudwatchLoggingOptions(resp.ApplicationDetail.CloudWatchLoggingOptionDescriptions)); err != nil { + return fmt.Errorf("error setting cloudwatch_logging_options: %s", err) + } + + if err := d.Set("inputs", flattenKinesisAnalyticsInputs(resp.ApplicationDetail.InputDescriptions)); err != nil { + return fmt.Errorf("error setting inputs: %s", err) + } + + if err := d.Set("outputs", flattenKinesisAnalyticsOutputs(resp.ApplicationDetail.OutputDescriptions)); err != nil { + return fmt.Errorf("error setting outputs: %s", err) + } + + if err := d.Set("reference_data_sources", flattenKinesisAnalyticsReferenceDataSources(resp.ApplicationDetail.ReferenceDataSourceDescriptions)); err != nil { + return fmt.Errorf("error setting reference_data_sources: %s", err) + } + + return nil +} + +func resourceAwsKinesisAnalyticsApplicationUpdate(d *schema.ResourceData, meta interface{}) error { + var version int + conn := meta.(*AWSClient).kinesisanalyticsconn + name := d.Get("name").(string) + + if v, ok := d.GetOk("version"); ok { + version = v.(int) + } else { + version = 1 + } + + if !d.IsNewResource() { + updateApplicationOpts := &kinesisanalytics.UpdateApplicationInput{ + ApplicationName: aws.String(name), + CurrentApplicationVersionId: aws.Int64(int64(version)), + } + + applicationUpdate, err := createApplicationUpdateOpts(d) + if err != nil { + return err + } + + if !reflect.DeepEqual(applicationUpdate, &kinesisanalytics.ApplicationUpdate{}) { + updateApplicationOpts.SetApplicationUpdate(applicationUpdate) + _, updateErr := conn.UpdateApplication(updateApplicationOpts) + if updateErr != nil { + return updateErr + } + version = version + 1 + } + + oldLoggingOptions, newLoggingOptions := d.GetChange("cloudwatch_logging_options") + if len(oldLoggingOptions.([]interface{})) == 0 && len(newLoggingOptions.([]interface{})) > 0 { + if v, ok := d.GetOk("cloudwatch_logging_options"); ok { + clo := v.([]interface{})[0].(map[string]interface{}) + cloudwatchLoggingOption := expandKinesisAnalyticsCloudwatchLoggingOption(clo) + addOpts := &kinesisanalytics.AddApplicationCloudWatchLoggingOptionInput{ + ApplicationName: aws.String(name), + CurrentApplicationVersionId: aws.Int64(int64(version)), + CloudWatchLoggingOption: cloudwatchLoggingOption, + } + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err := conn.AddApplicationCloudWatchLoggingOption(addOpts) + if err != nil { + if isAWSErr(err, kinesisanalytics.ErrCodeInvalidArgumentException, "Kinesis Analytics service doesn't have sufficient privileges") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("Unable to add CloudWatch logging options: %s", err) + } + version = version + 1 + } + } + + oldInputs, newInputs := d.GetChange("inputs") + if len(oldInputs.([]interface{})) == 0 && len(newInputs.([]interface{})) > 0 { + if v, ok := d.GetOk("inputs"); ok { + i := v.([]interface{})[0].(map[string]interface{}) + input := expandKinesisAnalyticsInputs(i) + addOpts := &kinesisanalytics.AddApplicationInputInput{ + ApplicationName: aws.String(name), + CurrentApplicationVersionId: aws.Int64(int64(version)), + Input: input, + } + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err := conn.AddApplicationInput(addOpts) + if err != nil { + if isAWSErr(err, kinesisanalytics.ErrCodeInvalidArgumentException, "Kinesis Analytics service doesn't have sufficient privileges") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("Unable to add application inputs: %s", err) + } + version = version + 1 + } + } + + oldOutputs, newOutputs := d.GetChange("outputs") + if len(oldOutputs.([]interface{})) == 0 && len(newOutputs.([]interface{})) > 0 { + if v, ok := d.GetOk("outputs"); ok { + o := v.([]interface{})[0].(map[string]interface{}) + output := expandKinesisAnalyticsOutputs(o) + addOpts := &kinesisanalytics.AddApplicationOutputInput{ + ApplicationName: aws.String(name), + CurrentApplicationVersionId: aws.Int64(int64(version)), + Output: output, + } + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err := conn.AddApplicationOutput(addOpts) + if err != nil { + if isAWSErr(err, kinesisanalytics.ErrCodeInvalidArgumentException, "Kinesis Analytics service doesn't have sufficient privileges") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("Unable to add application outputs: %s", err) + } + version = version + 1 + } + } + } + + oldReferenceData, newReferenceData := d.GetChange("reference_data_sources") + if len(oldReferenceData.([]interface{})) == 0 && len(newReferenceData.([]interface{})) > 0 { + if v := d.Get("reference_data_sources").([]interface{}); len(v) > 0 { + for _, r := range v { + rd := r.(map[string]interface{}) + referenceData := expandKinesisAnalyticsReferenceData(rd) + addOpts := &kinesisanalytics.AddApplicationReferenceDataSourceInput{ + ApplicationName: aws.String(name), + CurrentApplicationVersionId: aws.Int64(int64(version)), + ReferenceDataSource: referenceData, + } + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + _, err := conn.AddApplicationReferenceDataSource(addOpts) + if err != nil { + if isAWSErr(err, kinesisanalytics.ErrCodeInvalidArgumentException, "Kinesis Analytics service doesn't have sufficient privileges") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil + }) + if err != nil { + return fmt.Errorf("Unable to add application reference data source: %s", err) + } + version = version + 1 + } + } + } + + return resourceAwsKinesisAnalyticsApplicationRead(d, meta) +} + +func resourceAwsKinesisAnalyticsApplicationDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).kinesisanalyticsconn + name := d.Get("name").(string) + createTimestamp, parseErr := time.Parse(time.RFC3339, d.Get("create_timestamp").(string)) + if parseErr != nil { + return parseErr + } + + log.Printf("[DEBUG] Kinesis Analytics Application destroy: %v", d.Id()) + deleteOpts := &kinesisanalytics.DeleteApplicationInput{ + ApplicationName: aws.String(name), + CreateTimestamp: aws.Time(createTimestamp), + } + _, deleteErr := conn.DeleteApplication(deleteOpts) + if isAWSErr(deleteErr, kinesisanalytics.ErrCodeResourceNotFoundException, "") { + return nil + } + deleteErr = waitForDeleteKinesisAnalyticsApplication(conn, d.Id(), d.Timeout(schema.TimeoutDelete)) + if deleteErr != nil { + return fmt.Errorf("error waiting for deletion of Kinesis Analytics Application (%s): %s", d.Id(), deleteErr) + } + + log.Printf("[DEBUG] Kinesis Analytics Application deleted: %v", d.Id()) + return nil +} + +func expandKinesisAnalyticsCloudwatchLoggingOption(clo map[string]interface{}) *kinesisanalytics.CloudWatchLoggingOption { + cloudwatchLoggingOption := &kinesisanalytics.CloudWatchLoggingOption{ + LogStreamARN: aws.String(clo["log_stream_arn"].(string)), + RoleARN: aws.String(clo["role_arn"].(string)), + } + return cloudwatchLoggingOption +} + +func expandKinesisAnalyticsInputs(i map[string]interface{}) *kinesisanalytics.Input { + input := &kinesisanalytics.Input{ + NamePrefix: aws.String(i["name_prefix"].(string)), + } + + if v := i["kinesis_firehose"].([]interface{}); len(v) > 0 { + kf := v[0].(map[string]interface{}) + kfi := &kinesisanalytics.KinesisFirehoseInput{ + ResourceARN: aws.String(kf["resource_arn"].(string)), + RoleARN: aws.String(kf["role_arn"].(string)), + } + input.KinesisFirehoseInput = kfi + } + + if v := i["kinesis_stream"].([]interface{}); len(v) > 0 { + ks := v[0].(map[string]interface{}) + ksi := &kinesisanalytics.KinesisStreamsInput{ + ResourceARN: aws.String(ks["resource_arn"].(string)), + RoleARN: aws.String(ks["role_arn"].(string)), + } + input.KinesisStreamsInput = ksi + } + + if v := i["parallelism"].([]interface{}); len(v) > 0 { + p := v[0].(map[string]interface{}) + + if c, ok := p["count"]; ok { + ip := &kinesisanalytics.InputParallelism{ + Count: aws.Int64(int64(c.(int))), + } + input.InputParallelism = ip + } + } + + if v := i["processing_configuration"].([]interface{}); len(v) > 0 { + pc := v[0].(map[string]interface{}) + + if l := pc["lambda"].([]interface{}); len(l) > 0 { + lp := l[0].(map[string]interface{}) + ipc := &kinesisanalytics.InputProcessingConfiguration{ + InputLambdaProcessor: &kinesisanalytics.InputLambdaProcessor{ + ResourceARN: aws.String(lp["resource_arn"].(string)), + RoleARN: aws.String(lp["role_arn"].(string)), + }, + } + input.InputProcessingConfiguration = ipc + } + } + + if v := i["schema"].([]interface{}); len(v) > 0 { + vL := v[0].(map[string]interface{}) + ss := expandKinesisAnalyticsSourceSchema(vL) + input.InputSchema = ss + } + + return input +} + +func expandKinesisAnalyticsSourceSchema(vL map[string]interface{}) *kinesisanalytics.SourceSchema { + ss := &kinesisanalytics.SourceSchema{} + if v := vL["record_columns"].([]interface{}); len(v) > 0 { + var rcs []*kinesisanalytics.RecordColumn + + for _, rc := range v { + rcD := rc.(map[string]interface{}) + rc := &kinesisanalytics.RecordColumn{ + Name: aws.String(rcD["name"].(string)), + SqlType: aws.String(rcD["sql_type"].(string)), + } + + if v, ok := rcD["mapping"]; ok { + rc.Mapping = aws.String(v.(string)) + } + + rcs = append(rcs, rc) + } + + ss.RecordColumns = rcs + } + + if v, ok := vL["record_encoding"]; ok && v.(string) != "" { + ss.RecordEncoding = aws.String(v.(string)) + } + + if v := vL["record_format"].([]interface{}); len(v) > 0 { + vL := v[0].(map[string]interface{}) + rf := &kinesisanalytics.RecordFormat{} + + if v := vL["mapping_parameters"].([]interface{}); len(v) > 0 { + vL := v[0].(map[string]interface{}) + mp := &kinesisanalytics.MappingParameters{} + + if v := vL["csv"].([]interface{}); len(v) > 0 { + cL := v[0].(map[string]interface{}) + cmp := &kinesisanalytics.CSVMappingParameters{ + RecordColumnDelimiter: aws.String(cL["record_column_delimiter"].(string)), + RecordRowDelimiter: aws.String(cL["record_row_delimiter"].(string)), + } + mp.CSVMappingParameters = cmp + rf.RecordFormatType = aws.String("CSV") + } + + if v := vL["json"].([]interface{}); len(v) > 0 { + jL := v[0].(map[string]interface{}) + jmp := &kinesisanalytics.JSONMappingParameters{ + RecordRowPath: aws.String(jL["record_row_path"].(string)), + } + mp.JSONMappingParameters = jmp + rf.RecordFormatType = aws.String("JSON") + } + rf.MappingParameters = mp + } + + ss.RecordFormat = rf + } + return ss +} + +func expandKinesisAnalyticsOutputs(o map[string]interface{}) *kinesisanalytics.Output { + output := &kinesisanalytics.Output{ + Name: aws.String(o["name"].(string)), + } + + if v := o["kinesis_firehose"].([]interface{}); len(v) > 0 { + kf := v[0].(map[string]interface{}) + kfo := &kinesisanalytics.KinesisFirehoseOutput{ + ResourceARN: aws.String(kf["resource_arn"].(string)), + RoleARN: aws.String(kf["role_arn"].(string)), + } + output.KinesisFirehoseOutput = kfo + } + + if v := o["kinesis_stream"].([]interface{}); len(v) > 0 { + ks := v[0].(map[string]interface{}) + kso := &kinesisanalytics.KinesisStreamsOutput{ + ResourceARN: aws.String(ks["resource_arn"].(string)), + RoleARN: aws.String(ks["role_arn"].(string)), + } + output.KinesisStreamsOutput = kso + } + + if v := o["lambda"].([]interface{}); len(v) > 0 { + l := v[0].(map[string]interface{}) + lo := &kinesisanalytics.LambdaOutput{ + ResourceARN: aws.String(l["resource_arn"].(string)), + RoleARN: aws.String(l["role_arn"].(string)), + } + output.LambdaOutput = lo + } + + if v := o["schema"].([]interface{}); len(v) > 0 { + ds := v[0].(map[string]interface{}) + dso := &kinesisanalytics.DestinationSchema{ + RecordFormatType: aws.String(ds["record_format_type"].(string)), + } + output.DestinationSchema = dso + } + + return output +} + +func expandKinesisAnalyticsReferenceData(rd map[string]interface{}) *kinesisanalytics.ReferenceDataSource { + referenceData := &kinesisanalytics.ReferenceDataSource{ + TableName: aws.String(rd["table_name"].(string)), + } + + if v := rd["s3"].([]interface{}); len(v) > 0 { + s3 := v[0].(map[string]interface{}) + s3rds := &kinesisanalytics.S3ReferenceDataSource{ + BucketARN: aws.String(s3["bucket_arn"].(string)), + FileKey: aws.String(s3["file_key"].(string)), + ReferenceRoleARN: aws.String(s3["role_arn"].(string)), + } + referenceData.S3ReferenceDataSource = s3rds + } + + if v := rd["schema"].([]interface{}); len(v) > 0 { + ss := expandKinesisAnalyticsSourceSchema(v[0].(map[string]interface{})) + referenceData.ReferenceSchema = ss + } + + return referenceData +} + +func createApplicationUpdateOpts(d *schema.ResourceData) (*kinesisanalytics.ApplicationUpdate, error) { + applicationUpdate := &kinesisanalytics.ApplicationUpdate{} + + if d.HasChange("code") { + if v, ok := d.GetOk("code"); ok && v.(string) != "" { + applicationUpdate.ApplicationCodeUpdate = aws.String(v.(string)) + } + } + + oldLoggingOptions, newLoggingOptions := d.GetChange("cloudwatch_logging_options") + if len(oldLoggingOptions.([]interface{})) > 0 && len(newLoggingOptions.([]interface{})) > 0 { + if v, ok := d.GetOk("cloudwatch_logging_options"); ok { + clo := v.([]interface{})[0].(map[string]interface{}) + cloudwatchLoggingOption := expandKinesisAnalyticsCloudwatchLoggingOptionUpdate(clo) + applicationUpdate.CloudWatchLoggingOptionUpdates = []*kinesisanalytics.CloudWatchLoggingOptionUpdate{cloudwatchLoggingOption} + } + } + + oldInputs, newInputs := d.GetChange("inputs") + if len(oldInputs.([]interface{})) > 0 && len(newInputs.([]interface{})) > 0 { + if v, ok := d.GetOk("inputs"); ok { + vL := v.([]interface{})[0].(map[string]interface{}) + inputUpdate := expandKinesisAnalyticsInputUpdate(vL) + applicationUpdate.InputUpdates = []*kinesisanalytics.InputUpdate{inputUpdate} + } + } + + oldOutputs, newOutputs := d.GetChange("outputs") + if len(oldOutputs.([]interface{})) > 0 && len(newOutputs.([]interface{})) > 0 { + if v, ok := d.GetOk("outputs"); ok { + vL := v.([]interface{})[0].(map[string]interface{}) + outputUpdate := expandKinesisAnalyticsOutputUpdate(vL) + applicationUpdate.OutputUpdates = []*kinesisanalytics.OutputUpdate{outputUpdate} + } + } + + oldReferenceData, newReferenceData := d.GetChange("reference_data_sources") + if len(oldReferenceData.([]interface{})) > 0 && len(newReferenceData.([]interface{})) > 0 { + if v := d.Get("reference_data_sources").([]interface{}); len(v) > 0 { + var rdsus []*kinesisanalytics.ReferenceDataSourceUpdate + for _, rd := range v { + rdL := rd.(map[string]interface{}) + rdsu := &kinesisanalytics.ReferenceDataSourceUpdate{ + ReferenceId: aws.String(rdL["id"].(string)), + TableNameUpdate: aws.String(rdL["table_name"].(string)), + } + + if v := rdL["s3"].([]interface{}); len(v) > 0 { + vL := v[0].(map[string]interface{}) + s3rdsu := &kinesisanalytics.S3ReferenceDataSourceUpdate{ + BucketARNUpdate: aws.String(vL["bucket_arn"].(string)), + FileKeyUpdate: aws.String(vL["file_key"].(string)), + ReferenceRoleARNUpdate: aws.String(vL["role_arn"].(string)), + } + rdsu.S3ReferenceDataSourceUpdate = s3rdsu + } + + if v := rdL["schema"].([]interface{}); len(v) > 0 { + vL := v[0].(map[string]interface{}) + ss := expandKinesisAnalyticsSourceSchema(vL) + rdsu.ReferenceSchemaUpdate = ss + } + + rdsus = append(rdsus, rdsu) + } + applicationUpdate.ReferenceDataSourceUpdates = rdsus + } + } + + return applicationUpdate, nil +} + +func expandKinesisAnalyticsInputUpdate(vL map[string]interface{}) *kinesisanalytics.InputUpdate { + inputUpdate := &kinesisanalytics.InputUpdate{ + InputId: aws.String(vL["id"].(string)), + NamePrefixUpdate: aws.String(vL["name_prefix"].(string)), + } + + if v := vL["kinesis_firehose"].([]interface{}); len(v) > 0 { + kf := v[0].(map[string]interface{}) + kfiu := &kinesisanalytics.KinesisFirehoseInputUpdate{ + ResourceARNUpdate: aws.String(kf["resource_arn"].(string)), + RoleARNUpdate: aws.String(kf["role_arn"].(string)), + } + inputUpdate.KinesisFirehoseInputUpdate = kfiu + } + + if v := vL["kinesis_stream"].([]interface{}); len(v) > 0 { + ks := v[0].(map[string]interface{}) + ksiu := &kinesisanalytics.KinesisStreamsInputUpdate{ + ResourceARNUpdate: aws.String(ks["resource_arn"].(string)), + RoleARNUpdate: aws.String(ks["role_arn"].(string)), + } + inputUpdate.KinesisStreamsInputUpdate = ksiu + } + + if v := vL["parallelism"].([]interface{}); len(v) > 0 { + p := v[0].(map[string]interface{}) + + if c, ok := p["count"]; ok { + ipu := &kinesisanalytics.InputParallelismUpdate{ + CountUpdate: aws.Int64(int64(c.(int))), + } + inputUpdate.InputParallelismUpdate = ipu + } + } + + if v := vL["processing_configuration"].([]interface{}); len(v) > 0 { + pc := v[0].(map[string]interface{}) + + if l := pc["lambda"].([]interface{}); len(l) > 0 { + lp := l[0].(map[string]interface{}) + ipc := &kinesisanalytics.InputProcessingConfigurationUpdate{ + InputLambdaProcessorUpdate: &kinesisanalytics.InputLambdaProcessorUpdate{ + ResourceARNUpdate: aws.String(lp["resource_arn"].(string)), + RoleARNUpdate: aws.String(lp["role_arn"].(string)), + }, + } + inputUpdate.InputProcessingConfigurationUpdate = ipc + } + } + + if v := vL["schema"].([]interface{}); len(v) > 0 { + ss := &kinesisanalytics.InputSchemaUpdate{} + vL := v[0].(map[string]interface{}) + + if v := vL["record_columns"].([]interface{}); len(v) > 0 { + var rcs []*kinesisanalytics.RecordColumn + + for _, rc := range v { + rcD := rc.(map[string]interface{}) + rc := &kinesisanalytics.RecordColumn{ + Name: aws.String(rcD["name"].(string)), + SqlType: aws.String(rcD["sql_type"].(string)), + } + + if v, ok := rcD["mapping"]; ok { + rc.Mapping = aws.String(v.(string)) + } + + rcs = append(rcs, rc) + } + + ss.RecordColumnUpdates = rcs + } + + if v, ok := vL["record_encoding"]; ok && v.(string) != "" { + ss.RecordEncodingUpdate = aws.String(v.(string)) + } + + if v := vL["record_format"].([]interface{}); len(v) > 0 { + vL := v[0].(map[string]interface{}) + rf := &kinesisanalytics.RecordFormat{} + + if v := vL["mapping_parameters"].([]interface{}); len(v) > 0 { + vL := v[0].(map[string]interface{}) + mp := &kinesisanalytics.MappingParameters{} + + if v := vL["csv"].([]interface{}); len(v) > 0 { + cL := v[0].(map[string]interface{}) + cmp := &kinesisanalytics.CSVMappingParameters{ + RecordColumnDelimiter: aws.String(cL["record_column_delimiter"].(string)), + RecordRowDelimiter: aws.String(cL["record_row_delimiter"].(string)), + } + mp.CSVMappingParameters = cmp + rf.RecordFormatType = aws.String("CSV") + } + + if v := vL["json"].([]interface{}); len(v) > 0 { + jL := v[0].(map[string]interface{}) + jmp := &kinesisanalytics.JSONMappingParameters{ + RecordRowPath: aws.String(jL["record_row_path"].(string)), + } + mp.JSONMappingParameters = jmp + rf.RecordFormatType = aws.String("JSON") + } + rf.MappingParameters = mp + } + ss.RecordFormatUpdate = rf + } + inputUpdate.InputSchemaUpdate = ss + } + + return inputUpdate +} + +func expandKinesisAnalyticsOutputUpdate(vL map[string]interface{}) *kinesisanalytics.OutputUpdate { + outputUpdate := &kinesisanalytics.OutputUpdate{ + OutputId: aws.String(vL["id"].(string)), + NameUpdate: aws.String(vL["name"].(string)), + } + + if v := vL["kinesis_firehose"].([]interface{}); len(v) > 0 { + kf := v[0].(map[string]interface{}) + kfou := &kinesisanalytics.KinesisFirehoseOutputUpdate{ + ResourceARNUpdate: aws.String(kf["resource_arn"].(string)), + RoleARNUpdate: aws.String(kf["role_arn"].(string)), + } + outputUpdate.KinesisFirehoseOutputUpdate = kfou + } + + if v := vL["kinesis_stream"].([]interface{}); len(v) > 0 { + ks := v[0].(map[string]interface{}) + ksou := &kinesisanalytics.KinesisStreamsOutputUpdate{ + ResourceARNUpdate: aws.String(ks["resource_arn"].(string)), + RoleARNUpdate: aws.String(ks["role_arn"].(string)), + } + outputUpdate.KinesisStreamsOutputUpdate = ksou + } + + if v := vL["lambda"].([]interface{}); len(v) > 0 { + l := v[0].(map[string]interface{}) + lou := &kinesisanalytics.LambdaOutputUpdate{ + ResourceARNUpdate: aws.String(l["resource_arn"].(string)), + RoleARNUpdate: aws.String(l["role_arn"].(string)), + } + outputUpdate.LambdaOutputUpdate = lou + } + + if v := vL["schema"].([]interface{}); len(v) > 0 { + ds := v[0].(map[string]interface{}) + dsu := &kinesisanalytics.DestinationSchema{ + RecordFormatType: aws.String(ds["record_format_type"].(string)), + } + outputUpdate.DestinationSchemaUpdate = dsu + } + + return outputUpdate +} + +func expandKinesisAnalyticsCloudwatchLoggingOptionUpdate(clo map[string]interface{}) *kinesisanalytics.CloudWatchLoggingOptionUpdate { + cloudwatchLoggingOption := &kinesisanalytics.CloudWatchLoggingOptionUpdate{ + CloudWatchLoggingOptionId: aws.String(clo["id"].(string)), + LogStreamARNUpdate: aws.String(clo["log_stream_arn"].(string)), + RoleARNUpdate: aws.String(clo["role_arn"].(string)), + } + return cloudwatchLoggingOption +} + +func flattenKinesisAnalyticsCloudwatchLoggingOptions(options []*kinesisanalytics.CloudWatchLoggingOptionDescription) []interface{} { + s := []interface{}{} + for _, v := range options { + option := map[string]interface{}{ + "id": aws.StringValue(v.CloudWatchLoggingOptionId), + "log_stream_arn": aws.StringValue(v.LogStreamARN), + "role_arn": aws.StringValue(v.RoleARN), + } + s = append(s, option) + } + return s +} + +func flattenKinesisAnalyticsInputs(inputs []*kinesisanalytics.InputDescription) []interface{} { + s := []interface{}{} + + if len(inputs) > 0 { + id := inputs[0] + + input := map[string]interface{}{ + "id": aws.StringValue(id.InputId), + "name_prefix": aws.StringValue(id.NamePrefix), + } + + list := schema.NewSet(schema.HashString, nil) + for _, sn := range id.InAppStreamNames { + list.Add(aws.StringValue(sn)) + } + input["stream_names"] = list + + if id.InputParallelism != nil { + input["parallelism"] = []interface{}{ + map[string]interface{}{ + "count": int(aws.Int64Value(id.InputParallelism.Count)), + }, + } + } + + if id.InputProcessingConfigurationDescription != nil { + ipcd := id.InputProcessingConfigurationDescription + + if ipcd.InputLambdaProcessorDescription != nil { + input["processing_configuration"] = []interface{}{ + map[string]interface{}{ + "lambda": []interface{}{ + map[string]interface{}{ + "resource_arn": aws.StringValue(ipcd.InputLambdaProcessorDescription.ResourceARN), + "role_arn": aws.StringValue(ipcd.InputLambdaProcessorDescription.RoleARN), + }, + }, + }, + } + } + } + + if id.InputSchema != nil { + inputSchema := id.InputSchema + is := []interface{}{} + rcs := []interface{}{} + ss := map[string]interface{}{ + "record_encoding": aws.StringValue(inputSchema.RecordEncoding), + } + + for _, rc := range inputSchema.RecordColumns { + rcM := map[string]interface{}{ + "mapping": aws.StringValue(rc.Mapping), + "name": aws.StringValue(rc.Name), + "sql_type": aws.StringValue(rc.SqlType), + } + rcs = append(rcs, rcM) + } + ss["record_columns"] = rcs + + if inputSchema.RecordFormat != nil { + rf := inputSchema.RecordFormat + rfM := map[string]interface{}{ + "record_format_type": aws.StringValue(rf.RecordFormatType), + } + + if rf.MappingParameters != nil { + mps := []interface{}{} + if rf.MappingParameters.CSVMappingParameters != nil { + cmp := map[string]interface{}{ + "csv": []interface{}{ + map[string]interface{}{ + "record_column_delimiter": aws.StringValue(rf.MappingParameters.CSVMappingParameters.RecordColumnDelimiter), + "record_row_delimiter": aws.StringValue(rf.MappingParameters.CSVMappingParameters.RecordRowDelimiter), + }, + }, + } + mps = append(mps, cmp) + } + + if rf.MappingParameters.JSONMappingParameters != nil { + jmp := map[string]interface{}{ + "json": []interface{}{ + map[string]interface{}{ + "record_row_path": aws.StringValue(rf.MappingParameters.JSONMappingParameters.RecordRowPath), + }, + }, + } + mps = append(mps, jmp) + } + + rfM["mapping_parameters"] = mps + } + ss["record_format"] = []interface{}{rfM} + } + + is = append(is, ss) + input["schema"] = is + } + + if id.InputStartingPositionConfiguration != nil && id.InputStartingPositionConfiguration.InputStartingPosition != nil { + input["starting_position_configuration"] = []interface{}{ + map[string]interface{}{ + "starting_position": aws.StringValue(id.InputStartingPositionConfiguration.InputStartingPosition), + }, + } + } + + if id.KinesisFirehoseInputDescription != nil { + input["kinesis_firehose"] = []interface{}{ + map[string]interface{}{ + "resource_arn": aws.StringValue(id.KinesisFirehoseInputDescription.ResourceARN), + "role_arn": aws.StringValue(id.KinesisFirehoseInputDescription.RoleARN), + }, + } + } + + if id.KinesisStreamsInputDescription != nil { + input["kinesis_stream"] = []interface{}{ + map[string]interface{}{ + "resource_arn": aws.StringValue(id.KinesisStreamsInputDescription.ResourceARN), + "role_arn": aws.StringValue(id.KinesisStreamsInputDescription.RoleARN), + }, + } + } + + s = append(s, input) + } + return s +} + +func flattenKinesisAnalyticsOutputs(outputs []*kinesisanalytics.OutputDescription) []interface{} { + s := []interface{}{} + + if len(outputs) > 0 { + id := outputs[0] + + output := map[string]interface{}{ + "id": aws.StringValue(id.OutputId), + "name": aws.StringValue(id.Name), + } + + if id.KinesisFirehoseOutputDescription != nil { + output["kinesis_firehose"] = []interface{}{ + map[string]interface{}{ + "resource_arn": aws.StringValue(id.KinesisFirehoseOutputDescription.ResourceARN), + "role_arn": aws.StringValue(id.KinesisFirehoseOutputDescription.RoleARN), + }, + } + } + + if id.KinesisStreamsOutputDescription != nil { + output["kinesis_stream"] = []interface{}{ + map[string]interface{}{ + "resource_arn": aws.StringValue(id.KinesisStreamsOutputDescription.ResourceARN), + "role_arn": aws.StringValue(id.KinesisStreamsOutputDescription.RoleARN), + }, + } + } + + if id.LambdaOutputDescription != nil { + output["lambda"] = []interface{}{ + map[string]interface{}{ + "resource_arn": aws.StringValue(id.LambdaOutputDescription.ResourceARN), + "role_arn": aws.StringValue(id.LambdaOutputDescription.RoleARN), + }, + } + } + + if id.DestinationSchema != nil { + output["schema"] = []interface{}{ + map[string]interface{}{ + "record_format_type": aws.StringValue(id.DestinationSchema.RecordFormatType), + }, + } + } + + s = append(s, output) + } + + return s +} + +func flattenKinesisAnalyticsReferenceDataSources(dataSources []*kinesisanalytics.ReferenceDataSourceDescription) []interface{} { + s := []interface{}{} + + if len(dataSources) > 0 { + for _, ds := range dataSources { + dataSource := map[string]interface{}{ + "id": aws.StringValue(ds.ReferenceId), + "table_name": aws.StringValue(ds.TableName), + } + + if ds.S3ReferenceDataSourceDescription != nil { + dataSource["s3"] = []interface{}{ + map[string]interface{}{ + "bucket_arn": aws.StringValue(ds.S3ReferenceDataSourceDescription.BucketARN), + "file_key": aws.StringValue(ds.S3ReferenceDataSourceDescription.FileKey), + "role_arn": aws.StringValue(ds.S3ReferenceDataSourceDescription.ReferenceRoleARN), + }, + } + } + + if ds.ReferenceSchema != nil { + rs := ds.ReferenceSchema + rcs := []interface{}{} + ss := map[string]interface{}{ + "record_encoding": aws.StringValue(rs.RecordEncoding), + } + + for _, rc := range rs.RecordColumns { + rcM := map[string]interface{}{ + "mapping": aws.StringValue(rc.Mapping), + "name": aws.StringValue(rc.Name), + "sql_type": aws.StringValue(rc.SqlType), + } + rcs = append(rcs, rcM) + } + ss["record_columns"] = rcs + + if rs.RecordFormat != nil { + rf := rs.RecordFormat + rfM := map[string]interface{}{ + "record_format_type": aws.StringValue(rf.RecordFormatType), + } + + if rf.MappingParameters != nil { + mps := []interface{}{} + if rf.MappingParameters.CSVMappingParameters != nil { + cmp := map[string]interface{}{ + "csv": []interface{}{ + map[string]interface{}{ + "record_column_delimiter": aws.StringValue(rf.MappingParameters.CSVMappingParameters.RecordColumnDelimiter), + "record_row_delimiter": aws.StringValue(rf.MappingParameters.CSVMappingParameters.RecordRowDelimiter), + }, + }, + } + mps = append(mps, cmp) + } + + if rf.MappingParameters.JSONMappingParameters != nil { + jmp := map[string]interface{}{ + "json": []interface{}{ + map[string]interface{}{ + "record_row_path": aws.StringValue(rf.MappingParameters.JSONMappingParameters.RecordRowPath), + }, + }, + } + mps = append(mps, jmp) + } + + rfM["mapping_parameters"] = mps + } + ss["record_format"] = []interface{}{rfM} + } + + dataSource["schema"] = []interface{}{ss} + } + + s = append(s, dataSource) + } + } + + return s +} + +func waitForDeleteKinesisAnalyticsApplication(conn *kinesisanalytics.KinesisAnalytics, applicationId string, timeout time.Duration) error { + stateConf := resource.StateChangeConf{ + Pending: []string{ + kinesisanalytics.ApplicationStatusRunning, + kinesisanalytics.ApplicationStatusDeleting, + }, + Target: []string{""}, + Timeout: timeout, + Refresh: refreshKinesisAnalyticsApplicationStatus(conn, applicationId), + } + application, err := stateConf.WaitForState() + if err != nil { + if isAWSErr(err, kinesisanalytics.ErrCodeResourceNotFoundException, "") { + return nil + } + } + if application == nil { + return nil + } + return err +} + +func refreshKinesisAnalyticsApplicationStatus(conn *kinesisanalytics.KinesisAnalytics, applicationId string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + output, err := conn.DescribeApplication(&kinesisanalytics.DescribeApplicationInput{ + ApplicationName: aws.String(applicationId), + }) + if err != nil { + return nil, "", err + } + application := output.ApplicationDetail + if application == nil { + return application, "", fmt.Errorf("Kinesis Analytics Application (%s) could not be found.", applicationId) + } + return application, aws.StringValue(application.ApplicationStatus), nil + } +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go index d570bb62b6..e7a3561688 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_firehose_delivery_stream.go @@ -663,6 +663,8 @@ func resourceAwsKinesisFirehoseDeliveryStream() *schema.Resource { }, }, + "tags": tagsSchema(), + "kinesis_source_configuration": { Type: schema.TypeList, ForceNew: true, @@ -1192,6 +1194,7 @@ func resourceAwsKinesisFirehoseDeliveryStream() *schema.Resource { "s3_backup_mode": { Type: schema.TypeString, + ForceNew: true, Optional: true, Default: "FailedDocumentsOnly", ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { @@ -1234,7 +1237,7 @@ func resourceAwsKinesisFirehoseDeliveryStream() *schema.Resource { Type: schema.TypeInt, Optional: true, Default: 180, - ValidateFunc: validateIntegerInRange(180, 600), + ValidateFunc: validation.IntBetween(180, 600), }, "hec_endpoint": { @@ -1279,7 +1282,7 @@ func resourceAwsKinesisFirehoseDeliveryStream() *schema.Resource { Type: schema.TypeInt, Optional: true, Default: 3600, - ValidateFunc: validateIntegerInRange(0, 7200), + ValidateFunc: validation.IntBetween(0, 7200), }, "cloudwatch_logging_options": cloudWatchLoggingOptionsSchema(), @@ -1754,7 +1757,7 @@ func extractPrefixConfiguration(s3 map[string]interface{}) *string { func createRedshiftConfig(d *schema.ResourceData, s3Config *firehose.S3DestinationConfiguration) (*firehose.RedshiftDestinationConfiguration, error) { redshiftRaw, ok := d.GetOk("redshift_configuration") if !ok { - return nil, fmt.Errorf("[ERR] Error loading Redshift Configuration for Kinesis Firehose: redshift_configuration not found") + return nil, fmt.Errorf("Error loading Redshift Configuration for Kinesis Firehose: redshift_configuration not found") } rl := redshiftRaw.([]interface{}) @@ -1787,7 +1790,7 @@ func createRedshiftConfig(d *schema.ResourceData, s3Config *firehose.S3Destinati func updateRedshiftConfig(d *schema.ResourceData, s3Update *firehose.S3DestinationUpdate) (*firehose.RedshiftDestinationUpdate, error) { redshiftRaw, ok := d.GetOk("redshift_configuration") if !ok { - return nil, fmt.Errorf("[ERR] Error loading Redshift Configuration for Kinesis Firehose: redshift_configuration not found") + return nil, fmt.Errorf("Error loading Redshift Configuration for Kinesis Firehose: redshift_configuration not found") } rl := redshiftRaw.([]interface{}) @@ -1820,7 +1823,7 @@ func updateRedshiftConfig(d *schema.ResourceData, s3Update *firehose.S3Destinati func createElasticsearchConfig(d *schema.ResourceData, s3Config *firehose.S3DestinationConfiguration) (*firehose.ElasticsearchDestinationConfiguration, error) { esConfig, ok := d.GetOk("elasticsearch_configuration") if !ok { - return nil, fmt.Errorf("[ERR] Error loading Elasticsearch Configuration for Kinesis Firehose: elasticsearch_configuration not found") + return nil, fmt.Errorf("Error loading Elasticsearch Configuration for Kinesis Firehose: elasticsearch_configuration not found") } esList := esConfig.([]interface{}) @@ -1857,7 +1860,7 @@ func createElasticsearchConfig(d *schema.ResourceData, s3Config *firehose.S3Dest func updateElasticsearchConfig(d *schema.ResourceData, s3Update *firehose.S3DestinationUpdate) (*firehose.ElasticsearchDestinationUpdate, error) { esConfig, ok := d.GetOk("elasticsearch_configuration") if !ok { - return nil, fmt.Errorf("[ERR] Error loading Elasticsearch Configuration for Kinesis Firehose: elasticsearch_configuration not found") + return nil, fmt.Errorf("Error loading Elasticsearch Configuration for Kinesis Firehose: elasticsearch_configuration not found") } esList := esConfig.([]interface{}) @@ -1891,7 +1894,7 @@ func updateElasticsearchConfig(d *schema.ResourceData, s3Update *firehose.S3Dest func createSplunkConfig(d *schema.ResourceData, s3Config *firehose.S3DestinationConfiguration) (*firehose.SplunkDestinationConfiguration, error) { splunkRaw, ok := d.GetOk("splunk_configuration") if !ok { - return nil, fmt.Errorf("[ERR] Error loading Splunk Configuration for Kinesis Firehose: splunk_configuration not found") + return nil, fmt.Errorf("Error loading Splunk Configuration for Kinesis Firehose: splunk_configuration not found") } sl := splunkRaw.([]interface{}) @@ -1923,7 +1926,7 @@ func createSplunkConfig(d *schema.ResourceData, s3Config *firehose.S3Destination func updateSplunkConfig(d *schema.ResourceData, s3Update *firehose.S3DestinationUpdate) (*firehose.SplunkDestinationUpdate, error) { splunkRaw, ok := d.GetOk("splunk_configuration") if !ok { - return nil, fmt.Errorf("[ERR] Error loading Splunk Configuration for Kinesis Firehose: splunk_configuration not found") + return nil, fmt.Errorf("Error loading Splunk Configuration for Kinesis Firehose: splunk_configuration not found") } sl := splunkRaw.([]interface{}) @@ -2110,6 +2113,12 @@ func resourceAwsKinesisFirehoseDeliveryStreamCreate(d *schema.ResourceData, meta d.SetId(*s.DeliveryStreamARN) d.Set("arn", s.DeliveryStreamARN) + if err := setTagsKinesisFirehose(conn, d, sn); err != nil { + return fmt.Errorf( + "Error setting for Kinesis Stream (%s) tags: %s", + sn, err) + } + return resourceAwsKinesisFirehoseDeliveryStreamRead(d, meta) } @@ -2154,7 +2163,6 @@ func resourceAwsKinesisFirehoseDeliveryStreamUpdate(d *schema.ResourceData, meta conn := meta.(*AWSClient).firehoseconn sn := d.Get("name").(string) - updateInput := &firehose.UpdateDestinationInput{ DeliveryStreamName: aws.String(sn), CurrentDeliveryStreamVersionId: aws.String(d.Get("version_id").(string)), @@ -2222,19 +2230,26 @@ func resourceAwsKinesisFirehoseDeliveryStreamUpdate(d *schema.ResourceData, meta sn, err) } + if err := setTagsKinesisFirehose(conn, d, sn); err != nil { + return fmt.Errorf( + "Error Updating Kinesis Firehose Delivery Stream tags: \"%s\"\n%s", + sn, err) + } + return resourceAwsKinesisFirehoseDeliveryStreamRead(d, meta) } func resourceAwsKinesisFirehoseDeliveryStreamRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).firehoseconn + sn := d.Get("name").(string) resp, err := conn.DescribeDeliveryStream(&firehose.DescribeDeliveryStreamInput{ - DeliveryStreamName: aws.String(d.Get("name").(string)), + DeliveryStreamName: aws.String(sn), }) if err != nil { if isAWSErr(err, firehose.ErrCodeResourceNotFoundException, "") { - log.Printf("[WARN] Kinesis Firehose Delivery Stream (%s) not found, removing from state", d.Get("name").(string)) + log.Printf("[WARN] Kinesis Firehose Delivery Stream (%s) not found, removing from state", sn) d.SetId("") return nil } @@ -2247,6 +2262,10 @@ func resourceAwsKinesisFirehoseDeliveryStreamRead(d *schema.ResourceData, meta i return err } + if err := getTagsKinesisFirehose(conn, d, sn); err != nil { + return err + } + return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_stream.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_stream.go index dede2bd9e6..0294dbfe58 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_stream.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kinesis_stream.go @@ -171,7 +171,7 @@ func resourceAwsKinesisStreamRead(d *schema.ResourceData, meta interface{}) erro d.SetId("") return nil } - return fmt.Errorf("[WARN] Error reading Kinesis Stream: \"%s\", code: \"%s\"", awsErr.Message(), awsErr.Code()) + return fmt.Errorf("Error reading Kinesis Stream: \"%s\", code: \"%s\"", awsErr.Message(), awsErr.Code()) } return err diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_grant.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_grant.go index c2a29d7b4f..53054d961f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_grant.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_grant.go @@ -132,7 +132,7 @@ func resourceAwsKmsGrantCreate(d *schema.ResourceData, meta interface{}) error { } if v, ok := d.GetOk("constraints"); ok { if !kmsGrantConstraintsIsValid(v.(*schema.Set)) { - return fmt.Errorf("[ERROR] A grant constraint can't have both encryption_context_equals and encryption_context_subset set") + return fmt.Errorf("A grant constraint can't have both encryption_context_equals and encryption_context_subset set") } input.Constraints = expandKmsGrantConstraints(v.(*schema.Set)) } @@ -160,10 +160,10 @@ func resourceAwsKmsGrantCreate(d *schema.ResourceData, meta interface{}) error { isAWSErr(err, kms.ErrCodeInternalException, "") || isAWSErr(err, kms.ErrCodeInvalidArnException, "") { return resource.RetryableError( - fmt.Errorf("[WARN] Error adding new KMS Grant for key: %s, retrying %s", + fmt.Errorf("Error adding new KMS Grant for key: %s, retrying %s", *input.KeyId, err)) } - log.Printf("[ERROR] An error occured creating new AWS KMS Grant: %s", err) + log.Printf("[ERROR] An error occurred creating new AWS KMS Grant: %s", err) return resource.NonRetryableError(err) } return nil @@ -355,7 +355,7 @@ func waitForKmsGrantToBeRevoked(conn *kms.KMS, keyId string, grantId string) err if grant != nil { // Force a retry if the grant still exists return resource.RetryableError( - fmt.Errorf("[DEBUG] Grant still exists while expected to be revoked, retyring revocation check: %s", *grant.GrantId)) + fmt.Errorf("Grant still exists while expected to be revoked, retyring revocation check: %s", *grant.GrantId)) } return resource.NonRetryableError(err) @@ -468,13 +468,13 @@ func sortStringMapKeys(m map[string]*string) []string { // NB: For the constraint hash to be deterministic the order in which // print the keys and values of the encryption context maps needs to be // determistic, so sort them. -func sortedConcatStringMap(m map[string]*string, sep string) string { +func sortedConcatStringMap(m map[string]*string) string { var strList []string mapKeys := sortStringMapKeys(m) for _, key := range mapKeys { strList = append(strList, key, *m[key]) } - return strings.Join(strList, sep) + return strings.Join(strList, "-") } // The hash needs to encapsulate what type of constraint it is @@ -488,12 +488,12 @@ func resourceKmsGrantConstraintsHash(v interface{}) int { if v, ok := m["encryption_context_equals"]; ok { if len(v.(map[string]interface{})) > 0 { - buf.WriteString(fmt.Sprintf("encryption_context_equals-%s-", sortedConcatStringMap(stringMapToPointers(v.(map[string]interface{})), "-"))) + buf.WriteString(fmt.Sprintf("encryption_context_equals-%s-", sortedConcatStringMap(stringMapToPointers(v.(map[string]interface{}))))) } } if v, ok := m["encryption_context_subset"]; ok { if len(v.(map[string]interface{})) > 0 { - buf.WriteString(fmt.Sprintf("encryption_context_subset-%s-", sortedConcatStringMap(stringMapToPointers(v.(map[string]interface{})), "-"))) + buf.WriteString(fmt.Sprintf("encryption_context_subset-%s-", sortedConcatStringMap(stringMapToPointers(v.(map[string]interface{}))))) } } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_key.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_key.go index 893eeb3d89..477ac628ca 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_key.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_kms_key.go @@ -8,7 +8,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/kms" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/structure" @@ -55,7 +54,7 @@ func resourceAwsKmsKey() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, "is_enabled": { @@ -169,7 +168,7 @@ func resourceAwsKmsKeyRead(d *schema.ResourceData, meta interface{}) error { p := pOut.(*kms.GetKeyPolicyOutput) policy, err := structure.NormalizeJsonString(*p.Policy) if err != nil { - return errwrap.Wrapf("policy contains an invalid JSON: {{err}}", err) + return fmt.Errorf("policy contains an invalid JSON: %s", err) } d.Set("policy", policy) @@ -260,7 +259,7 @@ func resourceAwsKmsKeyDescriptionUpdate(conn *kms.KMS, d *schema.ResourceData) e func resourceAwsKmsKeyPolicyUpdate(conn *kms.KMS, d *schema.ResourceData) error { policy, err := structure.NormalizeJsonString(d.Get("policy").(string)) if err != nil { - return errwrap.Wrapf("policy contains an invalid JSON: {{err}}", err) + return fmt.Errorf("policy contains an invalid JSON: %s", err) } keyId := d.Get("key_id").(string) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_event_source_mapping.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_event_source_mapping.go index 4012b5f1e4..8cc414923b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_event_source_mapping.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_event_source_mapping.go @@ -15,6 +15,7 @@ import ( "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsLambdaEventSourceMapping() *schema.Resource { @@ -48,6 +49,17 @@ func resourceAwsLambdaEventSourceMapping() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + lambda.EventSourcePositionAtTimestamp, + lambda.EventSourcePositionLatest, + lambda.EventSourcePositionTrimHorizon, + }, false), + }, + "starting_position_timestamp": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.ValidateRFC3339TimeString, }, "batch_size": { Type: schema.TypeInt, @@ -136,6 +148,11 @@ func resourceAwsLambdaEventSourceMappingCreate(d *schema.ResourceData, meta inte params.StartingPosition = aws.String(startingPosition.(string)) } + if startingPositionTimestamp, ok := d.GetOk("starting_position_timestamp"); ok { + t, _ := time.Parse(time.RFC3339, startingPositionTimestamp.(string)) + params.StartingPositionTimestamp = aws.Time(t) + } + // IAM profiles and roles can take some time to propagate in AWS: // http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#launch-instance-with-role-console // Error creating Lambda function: InvalidParameterValueException: The diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_function.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_function.go index 88377ab154..42c4e01ab1 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_function.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_function.go @@ -27,6 +27,9 @@ func resourceAwsLambdaFunction() *schema.Resource { Read: resourceAwsLambdaFunctionRead, Update: resourceAwsLambdaFunctionUpdate, Delete: resourceAwsLambdaFunctionDelete, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(10 * time.Minute), + }, Importer: &schema.ResourceImporter{ State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { @@ -382,17 +385,21 @@ func resourceAwsLambdaFunctionCreate(d *schema.ResourceData, meta interface{}) e log.Printf("[DEBUG] Received %s, retrying CreateFunction", err) return resource.RetryableError(err) } + if isAWSErr(err, "InvalidParameterValueException", "Lambda was unable to configure access to your environment variables because the KMS key is invalid for CreateGrant") { + log.Printf("[DEBUG] Received %s, retrying CreateFunction", err) + return resource.RetryableError(err) + } return resource.NonRetryableError(err) } return nil }) if err != nil { - if !isAWSErr(err, "InvalidParameterValueException", "Your request has been throttled by EC2") { + if !isResourceTimeoutError(err) && !isAWSErr(err, "InvalidParameterValueException", "Your request has been throttled by EC2") { return fmt.Errorf("Error creating Lambda function: %s", err) } - // Allow 9 more minutes for EC2 throttling - err := resource.Retry(9*time.Minute, func() *resource.RetryError { + // Allow additional time for slower uploads or EC2 throttling + err := resource.Retry(d.Timeout(schema.TimeoutCreate), func() *resource.RetryError { _, err := conn.CreateFunction(params) if err != nil { log.Printf("[DEBUG] Error creating Lambda Function: %s", err) @@ -501,7 +508,7 @@ func resourceAwsLambdaFunctionRead(d *schema.ResourceData, meta interface{}) err config := flattenLambdaVpcConfigResponse(function.VpcConfig) log.Printf("[INFO] Setting Lambda %s VPC config %#v from API", d.Id(), config) if err := d.Set("vpc_config", config); err != nil { - return fmt.Errorf("[ERR] Error setting vpc_config for Lambda Function (%s): %s", d.Id(), err) + return fmt.Errorf("Error setting vpc_config for Lambda Function (%s): %s", d.Id(), err) } environment := flattenLambdaEnvironment(function.Environment) @@ -741,6 +748,11 @@ func resourceAwsLambdaFunctionUpdate(d *schema.ResourceData, meta interface{}) e log.Printf("[DEBUG] Received %s, retrying UpdateFunctionConfiguration", err) return resource.RetryableError(err) } + if isAWSErr(err, "InvalidParameterValueException", "Lambda was unable to configure access to your environment variables because the KMS key is invalid for CreateGrant") { + log.Printf("[DEBUG] Received %s, retrying CreateFunction", err) + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_permission.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_permission.go index 0ab996fc35..11308e53be 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_permission.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lambda_permission.go @@ -135,7 +135,7 @@ func resourceAwsLambdaPermissionCreate(d *schema.ResourceData, meta interface{}) // IAM is eventually consistent :/ if awsErr.Code() == "ResourceConflictException" { return resource.RetryableError( - fmt.Errorf("[WARN] Error adding new Lambda Permission for %s, retrying: %s", + fmt.Errorf("Error adding new Lambda Permission for %s, retrying: %s", *input.FunctionName, err)) } } @@ -162,12 +162,12 @@ func resourceAwsLambdaPermissionCreate(d *schema.ResourceData, meta interface{}) if err != nil { if strings.HasPrefix(err.Error(), "Error reading Lambda policy: ResourceNotFoundException") { return resource.RetryableError( - fmt.Errorf("[WARN] Error reading newly created Lambda Permission for %s, retrying: %s", + fmt.Errorf("Error reading newly created Lambda Permission for %s, retrying: %s", *input.FunctionName, err)) } if strings.HasPrefix(err.Error(), "Failed to find statement \""+d.Id()) { return resource.RetryableError( - fmt.Errorf("[WARN] Error reading newly created Lambda Permission statement for %s, retrying: %s", + fmt.Errorf("Error reading newly created Lambda Permission statement for %s, retrying: %s", *input.FunctionName, err)) } @@ -257,7 +257,7 @@ func resourceAwsLambdaPermissionRead(d *schema.ResourceData, meta interface{}) e } d.Set("action", statement.Action) - // Check if the pricipal is a cross-account IAM role + // Check if the principal is a cross-account IAM role if _, ok := statement.Principal["AWS"]; ok { d.Set("principal", statement.Principal["AWS"]) } else { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_launch_template.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_launch_template.go index 1ab156c58a..4a118269fd 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_launch_template.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_launch_template.go @@ -139,6 +139,37 @@ func resourceAwsLaunchTemplate() *schema.Resource { }, }, + "capacity_reservation_specification": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "capacity_reservation_preference": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{ + ec2.CapacityReservationPreferenceOpen, + ec2.CapacityReservationPreferenceNone, + }, false), + }, + "capacity_reservation_target": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "capacity_reservation_id": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + }, + }, + }, + "credit_specification": { Type: schema.TypeList, Optional: true, @@ -159,8 +190,14 @@ func resourceAwsLaunchTemplate() *schema.Resource { }, "ebs_optimized": { - Type: schema.TypeBool, - Optional: true, + // Use TypeString to allow an "unspecified" value, + // since TypeBool only has true/false with false default. + // The conversion from bare true/false values in + // configurations to TypeString value is currently safe. + Type: schema.TypeString, + Optional: true, + DiffSuppressFunc: suppressEquivalentTypeStringBoolean, + ValidateFunc: validateTypeStringNullableBoolean, }, "elastic_gpu_specifications": { @@ -313,7 +350,7 @@ func resourceAwsLaunchTemplate() *schema.Resource { }, "ipv6_address_count": { Type: schema.TypeInt, - Computed: true, + Optional: true, }, "ipv6_addresses": { Type: schema.TypeSet, @@ -335,7 +372,7 @@ func resourceAwsLaunchTemplate() *schema.Resource { }, "ipv4_address_count": { Type: schema.TypeInt, - Computed: true, + Optional: true, }, "subnet_id": { Type: schema.TypeString, @@ -457,7 +494,7 @@ func resourceAwsLaunchTemplateCreate(d *schema.ResourceData, meta interface{}) e ltName = resource.UniqueId() } - launchTemplateData, err := buildLaunchTemplateData(d, meta) + launchTemplateData, err := buildLaunchTemplateData(d) if err != nil { return err } @@ -490,19 +527,30 @@ func resourceAwsLaunchTemplateRead(d *schema.ResourceData, meta interface{}) err dlt, err := conn.DescribeLaunchTemplates(&ec2.DescribeLaunchTemplatesInput{ LaunchTemplateIds: []*string{aws.String(d.Id())}, }) + + if isAWSErr(err, ec2.LaunchTemplateErrorCodeLaunchTemplateIdDoesNotExist, "") { + log.Printf("[WARN] launch template (%s) not found - removing from state", d.Id()) + d.SetId("") + return nil + } + + // AWS SDK constant above is currently incorrect + if isAWSErr(err, "InvalidLaunchTemplateId.NotFound", "") { + log.Printf("[WARN] launch template (%s) not found - removing from state", d.Id()) + d.SetId("") + return nil + } + if err != nil { - if isAWSErr(err, ec2.LaunchTemplateErrorCodeLaunchTemplateIdDoesNotExist, "") { - log.Printf("[WARN] launch template (%s) not found - removing from state", d.Id()) - d.SetId("") - return nil - } return fmt.Errorf("Error getting launch template: %s", err) } - if len(dlt.LaunchTemplates) == 0 { + + if dlt == nil || len(dlt.LaunchTemplates) == 0 { log.Printf("[WARN] launch template (%s) not found - removing from state", d.Id()) d.SetId("") return nil } + if *dlt.LaunchTemplates[0].LaunchTemplateId != d.Id() { return fmt.Errorf("Unable to find launch template: %#v", dlt.LaunchTemplates) } @@ -538,7 +586,6 @@ func resourceAwsLaunchTemplateRead(d *schema.ResourceData, meta interface{}) err ltData := dltv.LaunchTemplateVersions[0].LaunchTemplateData d.Set("disable_api_termination", ltData.DisableApiTermination) - d.Set("ebs_optimized", ltData.EbsOptimized) d.Set("image_id", ltData.ImageId) d.Set("instance_initiated_shutdown_behavior", ltData.InstanceInitiatedShutdownBehavior) d.Set("instance_type", ltData.InstanceType) @@ -548,12 +595,21 @@ func resourceAwsLaunchTemplateRead(d *schema.ResourceData, meta interface{}) err d.Set("security_group_names", aws.StringValueSlice(ltData.SecurityGroups)) d.Set("user_data", ltData.UserData) d.Set("vpc_security_group_ids", aws.StringValueSlice(ltData.SecurityGroupIds)) + d.Set("ebs_optimized", "") + + if ltData.EbsOptimized != nil { + d.Set("ebs_optimized", strconv.FormatBool(aws.BoolValue(ltData.EbsOptimized))) + } if err := d.Set("block_device_mappings", getBlockDeviceMappings(ltData.BlockDeviceMappings)); err != nil { return err } - if strings.HasPrefix(aws.StringValue(ltData.InstanceType), "t2") { + if err := d.Set("capacity_reservation_specification", getCapacityReservationSpecification(ltData.CapacityReservationSpecification)); err != nil { + return err + } + + if strings.HasPrefix(aws.StringValue(ltData.InstanceType), "t2") || strings.HasPrefix(aws.StringValue(ltData.InstanceType), "t3") { if err := d.Set("credit_specification", getCreditSpecification(ltData.CreditSpecification)); err != nil { return err } @@ -594,7 +650,7 @@ func resourceAwsLaunchTemplateUpdate(d *schema.ResourceData, meta interface{}) e conn := meta.(*AWSClient).ec2conn if !d.IsNewResource() { - launchTemplateData, err := buildLaunchTemplateData(d, meta) + launchTemplateData, err := buildLaunchTemplateData(d) if err != nil { return err } @@ -631,10 +687,15 @@ func resourceAwsLaunchTemplateDelete(d *schema.ResourceData, meta interface{}) e _, err := conn.DeleteLaunchTemplate(&ec2.DeleteLaunchTemplateInput{ LaunchTemplateId: aws.String(d.Id()), }) + + if isAWSErr(err, ec2.LaunchTemplateErrorCodeLaunchTemplateIdDoesNotExist, "") { + return nil + } + // AWS SDK constant above is currently incorrect + if isAWSErr(err, "InvalidLaunchTemplateId.NotFound", "") { + return nil + } if err != nil { - if isAWSErr(err, ec2.LaunchTemplateErrorCodeLaunchTemplateIdDoesNotExist, "") { - return nil - } return err } @@ -680,6 +741,27 @@ func getBlockDeviceMappings(m []*ec2.LaunchTemplateBlockDeviceMapping) []interfa return s } +func getCapacityReservationSpecification(crs *ec2.LaunchTemplateCapacityReservationSpecificationResponse) []interface{} { + s := []interface{}{} + if crs != nil { + s = append(s, map[string]interface{}{ + "capacity_reservation_preference": aws.StringValue(crs.CapacityReservationPreference), + "capacity_reservation_target": getCapacityReservationTarget(crs.CapacityReservationTarget), + }) + } + return s +} + +func getCapacityReservationTarget(crt *ec2.CapacityReservationTargetResponse) []interface{} { + s := []interface{}{} + if crt != nil { + s = append(s, map[string]interface{}{ + "capacity_reservation_id": aws.StringValue(crt.CapacityReservationId), + }) + } + return s +} + func getCreditSpecification(cs *ec2.CreditSpecification) []interface{} { s := []interface{}{} if cs != nil { @@ -717,17 +799,31 @@ func getInstanceMarketOptions(m *ec2.LaunchTemplateInstanceMarketOptions) []inte mo := map[string]interface{}{ "market_type": aws.StringValue(m.MarketType), } - spot := []interface{}{} so := m.SpotOptions if so != nil { - spot = append(spot, map[string]interface{}{ - "block_duration_minutes": aws.Int64Value(so.BlockDurationMinutes), - "instance_interruption_behavior": aws.StringValue(so.InstanceInterruptionBehavior), - "max_price": aws.StringValue(so.MaxPrice), - "spot_instance_type": aws.StringValue(so.SpotInstanceType), - "valid_until": aws.TimeValue(so.ValidUntil).Format(time.RFC3339), - }) - mo["spot_options"] = spot + spotOptions := map[string]interface{}{} + + if so.BlockDurationMinutes != nil { + spotOptions["block_duration_minutes"] = aws.Int64Value(so.BlockDurationMinutes) + } + + if so.InstanceInterruptionBehavior != nil { + spotOptions["instance_interruption_behavior"] = aws.StringValue(so.InstanceInterruptionBehavior) + } + + if so.MaxPrice != nil { + spotOptions["max_price"] = aws.StringValue(so.MaxPrice) + } + + if so.SpotInstanceType != nil { + spotOptions["spot_instance_type"] = aws.StringValue(so.SpotInstanceType) + } + + if so.ValidUntil != nil { + spotOptions["valid_until"] = aws.TimeValue(so.ValidUntil).Format(time.RFC3339) + } + + mo["spot_options"] = []interface{}{spotOptions} } s = append(s, mo) } @@ -748,7 +844,6 @@ func getMonitoring(m *ec2.LaunchTemplatesMonitoring) []interface{} { func getNetworkInterfaces(n []*ec2.LaunchTemplateInstanceNetworkInterfaceSpecification) []interface{} { s := []interface{}{} for _, v := range n { - var ipv6Addresses []string var ipv4Addresses []string networkInterface := map[string]interface{}{ @@ -763,11 +858,19 @@ func getNetworkInterfaces(n []*ec2.LaunchTemplateInstanceNetworkInterfaceSpecifi "subnet_id": aws.StringValue(v.SubnetId), } - for _, address := range v.Ipv6Addresses { - ipv6Addresses = append(ipv6Addresses, aws.StringValue(address.Ipv6Address)) - } - if len(ipv6Addresses) > 0 { - networkInterface["ipv6_addresses"] = ipv6Addresses + if len(v.Ipv6Addresses) > 0 { + raw, ok := networkInterface["ipv6_addresses"] + if !ok { + raw = schema.NewSet(schema.HashString, nil) + } + + list := raw.(*schema.Set) + + for _, address := range v.Ipv6Addresses { + list.Add(aws.StringValue(address.Ipv6Address)) + } + + networkInterface["ipv6_addresses"] = list } for _, address := range v.PrivateIpAddresses { @@ -822,7 +925,7 @@ func getTagSpecifications(t []*ec2.LaunchTemplateTagSpecification) []interface{} return s } -func buildLaunchTemplateData(d *schema.ResourceData, meta interface{}) (*ec2.RequestLaunchTemplateData, error) { +func buildLaunchTemplateData(d *schema.ResourceData) (*ec2.RequestLaunchTemplateData, error) { opts := &ec2.RequestLaunchTemplateData{ UserData: aws.String(d.Get("user_data").(string)), } @@ -856,8 +959,12 @@ func buildLaunchTemplateData(d *schema.ResourceData, meta interface{}) (*ec2.Req opts.DisableApiTermination = aws.Bool(v.(bool)) } - if v, ok := d.GetOk("ebs_optimized"); ok { - opts.EbsOptimized = aws.Bool(v.(bool)) + if v, ok := d.GetOk("ebs_optimized"); ok && v.(string) != "" { + vBool, err := strconv.ParseBool(v.(string)) + if err != nil { + return nil, fmt.Errorf("error converting ebs_optimized %q from string to boolean: %s", v.(string), err) + } + opts.EbsOptimized = aws.Bool(vBool) } if v, ok := d.GetOk("security_group_names"); ok { @@ -882,7 +989,15 @@ func buildLaunchTemplateData(d *schema.ResourceData, meta interface{}) (*ec2.Req opts.BlockDeviceMappings = blockDeviceMappings } - if v, ok := d.GetOk("credit_specification"); ok && strings.HasPrefix(instanceType, "t2") { + if v, ok := d.GetOk("capacity_reservation_specification"); ok { + crs := v.([]interface{}) + + if len(crs) > 0 { + opts.CapacityReservationSpecification = readCapacityReservationSpecificationFromConfig(crs[0].(map[string]interface{})) + } + } + + if v, ok := d.GetOk("credit_specification"); ok && (strings.HasPrefix(instanceType, "t2") || strings.HasPrefix(instanceType, "t3")) { cs := v.([]interface{}) if len(cs) > 0 { @@ -1093,18 +1208,17 @@ func readNetworkInterfacesFromConfig(ni map[string]interface{}) *ec2.LaunchTempl networkInterface.Ipv6AddressCount = aws.Int64(int64(v)) } - ipv4AddressList := ni["ipv4_addresses"].(*schema.Set).List() - for _, address := range ipv4AddressList { - privateIp := &ec2.PrivateIpAddressSpecification{ - Primary: aws.Bool(address.(string) == privateIpAddress), - PrivateIpAddress: aws.String(address.(string)), - } - ipv4Addresses = append(ipv4Addresses, privateIp) - } - networkInterface.PrivateIpAddresses = ipv4Addresses - if v := ni["ipv4_address_count"].(int); v > 0 { networkInterface.SecondaryPrivateIpAddressCount = aws.Int64(int64(v)) + } else if v := ni["ipv4_addresses"].(*schema.Set); v.Len() > 0 { + for _, address := range v.List() { + privateIp := &ec2.PrivateIpAddressSpecification{ + Primary: aws.Bool(address.(string) == privateIpAddress), + PrivateIpAddress: aws.String(address.(string)), + } + ipv4Addresses = append(ipv4Addresses, privateIp) + } + networkInterface.PrivateIpAddresses = ipv4Addresses } return networkInterface @@ -1124,6 +1238,34 @@ func readIamInstanceProfileFromConfig(iip map[string]interface{}) *ec2.LaunchTem return iamInstanceProfile } +func readCapacityReservationSpecificationFromConfig(crs map[string]interface{}) *ec2.LaunchTemplateCapacityReservationSpecificationRequest { + capacityReservationSpecification := &ec2.LaunchTemplateCapacityReservationSpecificationRequest{} + + if v, ok := crs["capacity_reservation_preference"].(string); ok && v != "" { + capacityReservationSpecification.CapacityReservationPreference = aws.String(v) + } + + if v, ok := crs["capacity_reservation_target"]; ok { + crt := v.([]interface{}) + + if len(crt) > 0 { + capacityReservationSpecification.CapacityReservationTarget = readCapacityReservationTargetFromConfig(crt[0].(map[string]interface{})) + } + } + + return capacityReservationSpecification +} + +func readCapacityReservationTargetFromConfig(crt map[string]interface{}) *ec2.CapacityReservationTarget { + capacityReservationTarget := &ec2.CapacityReservationTarget{} + + if v, ok := crt["capacity_reservation_id"].(string); ok && v != "" { + capacityReservationTarget.CapacityReservationId = aws.String(v) + } + + return capacityReservationTarget +} + func readCreditSpecificationFromConfig(cs map[string]interface{}) *ec2.CreditSpecificationRequest { creditSpecification := &ec2.CreditSpecificationRequest{} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener.go index 928b2a5cb8..605ddd98cd 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener.go @@ -5,6 +5,8 @@ import ( "fmt" "log" "regexp" + "sort" + "strconv" "strings" "time" @@ -25,6 +27,10 @@ func resourceAwsLbListener() *schema.Resource { State: schema.ImportStatePassthrough, }, + Timeouts: &schema.ResourceTimeout{ + Read: schema.DefaultTimeout(10 * time.Minute), + }, + Schema: map[string]*schema.Schema{ "arn": { Type: schema.TypeString, @@ -71,18 +77,25 @@ func resourceAwsLbListener() *schema.Resource { "default_action": { Type: schema.TypeList, Required: true, - MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "type": { Type: schema.TypeString, Required: true, ValidateFunc: validation.StringInSlice([]string{ + elbv2.ActionTypeEnumAuthenticateCognito, + elbv2.ActionTypeEnumAuthenticateOidc, elbv2.ActionTypeEnumFixedResponse, elbv2.ActionTypeEnumForward, elbv2.ActionTypeEnumRedirect, }, true), }, + "order": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + ValidateFunc: validation.IntBetween(1, 50000), + }, "target_group_arn": { Type: schema.TypeString, @@ -177,6 +190,123 @@ func resourceAwsLbListener() *schema.Resource { }, }, }, + + "authenticate_cognito": { + Type: schema.TypeList, + Optional: true, + DiffSuppressFunc: suppressIfDefaultActionTypeNot("authenticate-cognito"), + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "authentication_request_extra_params": { + Type: schema.TypeMap, + Optional: true, + }, + "on_unauthenticated_request": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{ + elbv2.AuthenticateCognitoActionConditionalBehaviorEnumDeny, + elbv2.AuthenticateCognitoActionConditionalBehaviorEnumAllow, + elbv2.AuthenticateCognitoActionConditionalBehaviorEnumAuthenticate, + }, true), + }, + "scope": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "session_cookie_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "session_timeout": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, + "user_pool_arn": { + Type: schema.TypeString, + Required: true, + }, + "user_pool_client_id": { + Type: schema.TypeString, + Required: true, + }, + "user_pool_domain": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + + "authenticate_oidc": { + Type: schema.TypeList, + Optional: true, + DiffSuppressFunc: suppressIfDefaultActionTypeNot("authenticate-oidc"), + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "authentication_request_extra_params": { + Type: schema.TypeMap, + Optional: true, + }, + "authorization_endpoint": { + Type: schema.TypeString, + Required: true, + }, + "client_id": { + Type: schema.TypeString, + Required: true, + }, + "client_secret": { + Type: schema.TypeString, + Required: true, + Sensitive: true, + }, + "issuer": { + Type: schema.TypeString, + Required: true, + }, + "on_unauthenticated_request": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{ + elbv2.AuthenticateOidcActionConditionalBehaviorEnumDeny, + elbv2.AuthenticateOidcActionConditionalBehaviorEnumAllow, + elbv2.AuthenticateOidcActionConditionalBehaviorEnumAuthenticate, + }, true), + }, + "scope": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "session_cookie_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "session_timeout": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, + "token_endpoint": { + Type: schema.TypeString, + Required: true, + }, + "user_info_endpoint": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, }, }, }, @@ -221,56 +351,130 @@ func resourceAwsLbListenerCreate(d *schema.ResourceData, meta interface{}) error } } - if defaultActions := d.Get("default_action").([]interface{}); len(defaultActions) == 1 { - params.DefaultActions = make([]*elbv2.Action, len(defaultActions)) + defaultActions := d.Get("default_action").([]interface{}) + params.DefaultActions = make([]*elbv2.Action, len(defaultActions)) + for i, defaultAction := range defaultActions { + defaultActionMap := defaultAction.(map[string]interface{}) - for i, defaultAction := range defaultActions { - defaultActionMap := defaultAction.(map[string]interface{}) + action := &elbv2.Action{ + Order: aws.Int64(int64(i + 1)), + Type: aws.String(defaultActionMap["type"].(string)), + } - action := &elbv2.Action{ - Type: aws.String(defaultActionMap["type"].(string)), - } + if order, ok := defaultActionMap["order"]; ok && order.(int) != 0 { + action.Order = aws.Int64(int64(order.(int))) + } - switch defaultActionMap["type"].(string) { - case "forward": - action.TargetGroupArn = aws.String(defaultActionMap["target_group_arn"].(string)) + switch defaultActionMap["type"].(string) { + case "forward": + action.TargetGroupArn = aws.String(defaultActionMap["target_group_arn"].(string)) - case "redirect": - redirectList := defaultActionMap["redirect"].([]interface{}) + case "redirect": + redirectList := defaultActionMap["redirect"].([]interface{}) - if len(redirectList) == 1 { - redirectMap := redirectList[0].(map[string]interface{}) + if len(redirectList) == 1 { + redirectMap := redirectList[0].(map[string]interface{}) - action.RedirectConfig = &elbv2.RedirectActionConfig{ - Host: aws.String(redirectMap["host"].(string)), - Path: aws.String(redirectMap["path"].(string)), - Port: aws.String(redirectMap["port"].(string)), - Protocol: aws.String(redirectMap["protocol"].(string)), - Query: aws.String(redirectMap["query"].(string)), - StatusCode: aws.String(redirectMap["status_code"].(string)), - } - } else { - return errors.New("for actions of type 'redirect', you must specify a 'redirect' block") + action.RedirectConfig = &elbv2.RedirectActionConfig{ + Host: aws.String(redirectMap["host"].(string)), + Path: aws.String(redirectMap["path"].(string)), + Port: aws.String(redirectMap["port"].(string)), + Protocol: aws.String(redirectMap["protocol"].(string)), + Query: aws.String(redirectMap["query"].(string)), + StatusCode: aws.String(redirectMap["status_code"].(string)), } + } else { + return errors.New("for actions of type 'redirect', you must specify a 'redirect' block") + } - case "fixed-response": - fixedResponseList := defaultActionMap["fixed_response"].([]interface{}) + case "fixed-response": + fixedResponseList := defaultActionMap["fixed_response"].([]interface{}) - if len(fixedResponseList) == 1 { - fixedResponseMap := fixedResponseList[0].(map[string]interface{}) + if len(fixedResponseList) == 1 { + fixedResponseMap := fixedResponseList[0].(map[string]interface{}) - action.FixedResponseConfig = &elbv2.FixedResponseActionConfig{ - ContentType: aws.String(fixedResponseMap["content_type"].(string)), - MessageBody: aws.String(fixedResponseMap["message_body"].(string)), - StatusCode: aws.String(fixedResponseMap["status_code"].(string)), - } - } else { - return errors.New("for actions of type 'fixed-response', you must specify a 'fixed_response' block") + action.FixedResponseConfig = &elbv2.FixedResponseActionConfig{ + ContentType: aws.String(fixedResponseMap["content_type"].(string)), + MessageBody: aws.String(fixedResponseMap["message_body"].(string)), + StatusCode: aws.String(fixedResponseMap["status_code"].(string)), } + } else { + return errors.New("for actions of type 'fixed-response', you must specify a 'fixed_response' block") } - params.DefaultActions[i] = action + case elbv2.ActionTypeEnumAuthenticateCognito: + authenticateCognitoList := defaultActionMap["authenticate_cognito"].([]interface{}) + + if len(authenticateCognitoList) == 1 { + authenticateCognitoMap := authenticateCognitoList[0].(map[string]interface{}) + + authenticationRequestExtraParams := make(map[string]*string) + for key, value := range authenticateCognitoMap["authentication_request_extra_params"].(map[string]interface{}) { + authenticationRequestExtraParams[key] = aws.String(value.(string)) + } + + action.AuthenticateCognitoConfig = &elbv2.AuthenticateCognitoActionConfig{ + AuthenticationRequestExtraParams: authenticationRequestExtraParams, + UserPoolArn: aws.String(authenticateCognitoMap["user_pool_arn"].(string)), + UserPoolClientId: aws.String(authenticateCognitoMap["user_pool_client_id"].(string)), + UserPoolDomain: aws.String(authenticateCognitoMap["user_pool_domain"].(string)), + } + + if onUnauthenticatedRequest, ok := authenticateCognitoMap["on_unauthenticated_request"]; ok && onUnauthenticatedRequest != "" { + action.AuthenticateCognitoConfig.OnUnauthenticatedRequest = aws.String(onUnauthenticatedRequest.(string)) + } + if scope, ok := authenticateCognitoMap["scope"]; ok && scope != "" { + action.AuthenticateCognitoConfig.Scope = aws.String(scope.(string)) + } + if sessionCookieName, ok := authenticateCognitoMap["session_cookie_name"]; ok && sessionCookieName != "" { + action.AuthenticateCognitoConfig.SessionCookieName = aws.String(sessionCookieName.(string)) + } + if sessionTimeout, ok := authenticateCognitoMap["session_timeout"]; ok && sessionTimeout != 0 { + action.AuthenticateCognitoConfig.SessionTimeout = aws.Int64(int64(sessionTimeout.(int))) + } + } else { + return errors.New("for actions of type 'authenticate-cognito', you must specify a 'authenticate_cognito' block") + } + + case elbv2.ActionTypeEnumAuthenticateOidc: + authenticateOidcList := defaultActionMap["authenticate_oidc"].([]interface{}) + + if len(authenticateOidcList) == 1 { + authenticateOidcMap := authenticateOidcList[0].(map[string]interface{}) + + authenticationRequestExtraParams := make(map[string]*string) + for key, value := range authenticateOidcMap["authentication_request_extra_params"].(map[string]interface{}) { + authenticationRequestExtraParams[key] = aws.String(value.(string)) + } + + action.AuthenticateOidcConfig = &elbv2.AuthenticateOidcActionConfig{ + AuthenticationRequestExtraParams: authenticationRequestExtraParams, + AuthorizationEndpoint: aws.String(authenticateOidcMap["authorization_endpoint"].(string)), + ClientId: aws.String(authenticateOidcMap["client_id"].(string)), + ClientSecret: aws.String(authenticateOidcMap["client_secret"].(string)), + Issuer: aws.String(authenticateOidcMap["issuer"].(string)), + TokenEndpoint: aws.String(authenticateOidcMap["token_endpoint"].(string)), + UserInfoEndpoint: aws.String(authenticateOidcMap["user_info_endpoint"].(string)), + } + + if onUnauthenticatedRequest, ok := authenticateOidcMap["on_unauthenticated_request"]; ok && onUnauthenticatedRequest != "" { + action.AuthenticateOidcConfig.OnUnauthenticatedRequest = aws.String(onUnauthenticatedRequest.(string)) + } + if scope, ok := authenticateOidcMap["scope"]; ok && scope != "" { + action.AuthenticateOidcConfig.Scope = aws.String(scope.(string)) + } + if sessionCookieName, ok := authenticateOidcMap["session_cookie_name"]; ok && sessionCookieName != "" { + action.AuthenticateOidcConfig.SessionCookieName = aws.String(sessionCookieName.(string)) + } + if sessionTimeout, ok := authenticateOidcMap["session_timeout"]; ok && sessionTimeout != 0 { + action.AuthenticateOidcConfig.SessionTimeout = aws.Int64(int64(sessionTimeout.(int))) + } + } else { + return errors.New("for actions of type 'authenticate-oidc', you must specify a 'authenticate_oidc' block") + } } + + params.DefaultActions[i] = action } var resp *elbv2.CreateListenerOutput @@ -304,15 +508,30 @@ func resourceAwsLbListenerCreate(d *schema.ResourceData, meta interface{}) error func resourceAwsLbListenerRead(d *schema.ResourceData, meta interface{}) error { elbconn := meta.(*AWSClient).elbv2conn - resp, err := elbconn.DescribeListeners(&elbv2.DescribeListenersInput{ + var resp *elbv2.DescribeListenersOutput + var request = &elbv2.DescribeListenersInput{ ListenerArns: []*string{aws.String(d.Id())}, + } + + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + resp, err = elbconn.DescribeListeners(request) + if d.IsNewResource() && isAWSErr(err, elbv2.ErrCodeListenerNotFoundException, "") { + return resource.RetryableError(err) + } + if err != nil { + return resource.NonRetryableError(err) + } + return nil }) + + if isAWSErr(err, elbv2.ErrCodeListenerNotFoundException, "") { + log.Printf("[WARN] ELBv2 Listener (%s) not found - removing from state", d.Id()) + d.SetId("") + return nil + } + if err != nil { - if isAWSErr(err, elbv2.ErrCodeListenerNotFoundException, "") { - log.Printf("[WARN] DescribeListeners - removing %s from state", d.Id()) - d.SetId("") - return nil - } return fmt.Errorf("Error retrieving Listener: %s", err) } @@ -332,40 +551,86 @@ func resourceAwsLbListenerRead(d *schema.ResourceData, meta interface{}) error { d.Set("certificate_arn", listener.Certificates[0].CertificateArn) } - defaultActions := make([]map[string]interface{}, 0) - if listener.DefaultActions != nil && len(listener.DefaultActions) > 0 { - for _, defaultAction := range listener.DefaultActions { - defaultActionMap := make(map[string]interface{}) - defaultActionMap["type"] = aws.StringValue(defaultAction.Type) + sort.Slice(listener.DefaultActions, func(i, j int) bool { + return aws.Int64Value(listener.DefaultActions[i].Order) < aws.Int64Value(listener.DefaultActions[j].Order) + }) + defaultActions := make([]interface{}, len(listener.DefaultActions)) + for i, defaultAction := range listener.DefaultActions { + defaultActionMap := make(map[string]interface{}) + defaultActionMap["type"] = aws.StringValue(defaultAction.Type) + defaultActionMap["order"] = aws.Int64Value(defaultAction.Order) + + switch aws.StringValue(defaultAction.Type) { + case "forward": + defaultActionMap["target_group_arn"] = aws.StringValue(defaultAction.TargetGroupArn) + + case "redirect": + defaultActionMap["redirect"] = []map[string]interface{}{ + { + "host": aws.StringValue(defaultAction.RedirectConfig.Host), + "path": aws.StringValue(defaultAction.RedirectConfig.Path), + "port": aws.StringValue(defaultAction.RedirectConfig.Port), + "protocol": aws.StringValue(defaultAction.RedirectConfig.Protocol), + "query": aws.StringValue(defaultAction.RedirectConfig.Query), + "status_code": aws.StringValue(defaultAction.RedirectConfig.StatusCode), + }, + } - switch aws.StringValue(defaultAction.Type) { - case "forward": - defaultActionMap["target_group_arn"] = aws.StringValue(defaultAction.TargetGroupArn) + case "fixed-response": + defaultActionMap["fixed_response"] = []map[string]interface{}{ + { + "content_type": aws.StringValue(defaultAction.FixedResponseConfig.ContentType), + "message_body": aws.StringValue(defaultAction.FixedResponseConfig.MessageBody), + "status_code": aws.StringValue(defaultAction.FixedResponseConfig.StatusCode), + }, + } - case "redirect": - defaultActionMap["redirect"] = []map[string]interface{}{ - { - "host": aws.StringValue(defaultAction.RedirectConfig.Host), - "path": aws.StringValue(defaultAction.RedirectConfig.Path), - "port": aws.StringValue(defaultAction.RedirectConfig.Port), - "protocol": aws.StringValue(defaultAction.RedirectConfig.Protocol), - "query": aws.StringValue(defaultAction.RedirectConfig.Query), - "status_code": aws.StringValue(defaultAction.RedirectConfig.StatusCode), - }, - } + case "authenticate-cognito": + authenticationRequestExtraParams := make(map[string]interface{}) + for key, value := range defaultAction.AuthenticateCognitoConfig.AuthenticationRequestExtraParams { + authenticationRequestExtraParams[key] = aws.StringValue(value) + } + defaultActionMap["authenticate_cognito"] = []map[string]interface{}{ + { + "authentication_request_extra_params": authenticationRequestExtraParams, + "on_unauthenticated_request": aws.StringValue(defaultAction.AuthenticateCognitoConfig.OnUnauthenticatedRequest), + "scope": aws.StringValue(defaultAction.AuthenticateCognitoConfig.Scope), + "session_cookie_name": aws.StringValue(defaultAction.AuthenticateCognitoConfig.SessionCookieName), + "session_timeout": aws.Int64Value(defaultAction.AuthenticateCognitoConfig.SessionTimeout), + "user_pool_arn": aws.StringValue(defaultAction.AuthenticateCognitoConfig.UserPoolArn), + "user_pool_client_id": aws.StringValue(defaultAction.AuthenticateCognitoConfig.UserPoolClientId), + "user_pool_domain": aws.StringValue(defaultAction.AuthenticateCognitoConfig.UserPoolDomain), + }, + } - case "fixed-response": - defaultActionMap["fixed_response"] = []map[string]interface{}{ - { - "content_type": aws.StringValue(defaultAction.FixedResponseConfig.ContentType), - "message_body": aws.StringValue(defaultAction.FixedResponseConfig.MessageBody), - "status_code": aws.StringValue(defaultAction.FixedResponseConfig.StatusCode), - }, - } + case "authenticate-oidc": + authenticationRequestExtraParams := make(map[string]interface{}) + for key, value := range defaultAction.AuthenticateOidcConfig.AuthenticationRequestExtraParams { + authenticationRequestExtraParams[key] = aws.StringValue(value) } - defaultActions = append(defaultActions, defaultActionMap) + // The LB API currently provides no way to read the ClientSecret + // Instead we passthrough the configuration value into the state + clientSecret := d.Get("default_action." + strconv.Itoa(i) + ".authenticate_oidc.0.client_secret").(string) + + defaultActionMap["authenticate_oidc"] = []map[string]interface{}{ + { + "authentication_request_extra_params": authenticationRequestExtraParams, + "authorization_endpoint": aws.StringValue(defaultAction.AuthenticateOidcConfig.AuthorizationEndpoint), + "client_id": aws.StringValue(defaultAction.AuthenticateOidcConfig.ClientId), + "client_secret": clientSecret, + "issuer": aws.StringValue(defaultAction.AuthenticateOidcConfig.Issuer), + "on_unauthenticated_request": aws.StringValue(defaultAction.AuthenticateOidcConfig.OnUnauthenticatedRequest), + "scope": aws.StringValue(defaultAction.AuthenticateOidcConfig.Scope), + "session_cookie_name": aws.StringValue(defaultAction.AuthenticateOidcConfig.SessionCookieName), + "session_timeout": aws.Int64Value(defaultAction.AuthenticateOidcConfig.SessionTimeout), + "token_endpoint": aws.StringValue(defaultAction.AuthenticateOidcConfig.TokenEndpoint), + "user_info_endpoint": aws.StringValue(defaultAction.AuthenticateOidcConfig.UserInfoEndpoint), + }, + } } + + defaultActions[i] = defaultActionMap } d.Set("default_action", defaultActions) @@ -392,14 +657,21 @@ func resourceAwsLbListenerUpdate(d *schema.ResourceData, meta interface{}) error } } - if defaultActions := d.Get("default_action").([]interface{}); len(defaultActions) == 1 { + if d.HasChange("default_action") { + defaultActions := d.Get("default_action").([]interface{}) params.DefaultActions = make([]*elbv2.Action, len(defaultActions)) for i, defaultAction := range defaultActions { defaultActionMap := defaultAction.(map[string]interface{}) - action := &elbv2.Action{} - action.Type = aws.String(defaultActionMap["type"].(string)) + action := &elbv2.Action{ + Order: aws.Int64(int64(i + 1)), + Type: aws.String(defaultActionMap["type"].(string)), + } + + if order, ok := defaultActionMap["order"]; ok && order.(int) != 0 { + action.Order = aws.Int64(int64(order.(int))) + } switch defaultActionMap["type"].(string) { case "forward": @@ -437,6 +709,77 @@ func resourceAwsLbListenerUpdate(d *schema.ResourceData, meta interface{}) error } else { return errors.New("for actions of type 'fixed-response', you must specify a 'fixed_response' block") } + + case "authenticate-cognito": + authenticateCognitoList := defaultActionMap["authenticate_cognito"].([]interface{}) + + if len(authenticateCognitoList) == 1 { + authenticateCognitoMap := authenticateCognitoList[0].(map[string]interface{}) + + authenticationRequestExtraParams := make(map[string]*string) + for key, value := range authenticateCognitoMap["authentication_request_extra_params"].(map[string]interface{}) { + authenticationRequestExtraParams[key] = aws.String(value.(string)) + } + + action.AuthenticateCognitoConfig = &elbv2.AuthenticateCognitoActionConfig{ + AuthenticationRequestExtraParams: authenticationRequestExtraParams, + UserPoolArn: aws.String(authenticateCognitoMap["user_pool_arn"].(string)), + UserPoolClientId: aws.String(authenticateCognitoMap["user_pool_client_id"].(string)), + UserPoolDomain: aws.String(authenticateCognitoMap["user_pool_domain"].(string)), + } + + if onUnauthenticatedRequest, ok := authenticateCognitoMap["on_unauthenticated_request"]; ok && onUnauthenticatedRequest != "" { + action.AuthenticateCognitoConfig.OnUnauthenticatedRequest = aws.String(onUnauthenticatedRequest.(string)) + } + if scope, ok := authenticateCognitoMap["scope"]; ok && scope != "" { + action.AuthenticateCognitoConfig.Scope = aws.String(scope.(string)) + } + if sessionCookieName, ok := authenticateCognitoMap["session_cookie_name"]; ok && sessionCookieName != "" { + action.AuthenticateCognitoConfig.SessionCookieName = aws.String(sessionCookieName.(string)) + } + if sessionTimeout, ok := authenticateCognitoMap["session_timeout"]; ok && sessionTimeout != 0 { + action.AuthenticateCognitoConfig.SessionTimeout = aws.Int64(int64(sessionTimeout.(int))) + } + } else { + return errors.New("for actions of type 'authenticate-cognito', you must specify a 'authenticate_cognito' block") + } + + case "authenticate-oidc": + authenticateOidcList := defaultActionMap["authenticate_oidc"].([]interface{}) + + if len(authenticateOidcList) == 1 { + authenticateOidcMap := authenticateOidcList[0].(map[string]interface{}) + + authenticationRequestExtraParams := make(map[string]*string) + for key, value := range authenticateOidcMap["authentication_request_extra_params"].(map[string]interface{}) { + authenticationRequestExtraParams[key] = aws.String(value.(string)) + } + + action.AuthenticateOidcConfig = &elbv2.AuthenticateOidcActionConfig{ + AuthenticationRequestExtraParams: authenticationRequestExtraParams, + AuthorizationEndpoint: aws.String(authenticateOidcMap["authorization_endpoint"].(string)), + ClientId: aws.String(authenticateOidcMap["client_id"].(string)), + ClientSecret: aws.String(authenticateOidcMap["client_secret"].(string)), + Issuer: aws.String(authenticateOidcMap["issuer"].(string)), + TokenEndpoint: aws.String(authenticateOidcMap["token_endpoint"].(string)), + UserInfoEndpoint: aws.String(authenticateOidcMap["user_info_endpoint"].(string)), + } + + if onUnauthenticatedRequest, ok := authenticateOidcMap["on_unauthenticated_request"]; ok && onUnauthenticatedRequest != "" { + action.AuthenticateOidcConfig.OnUnauthenticatedRequest = aws.String(onUnauthenticatedRequest.(string)) + } + if scope, ok := authenticateOidcMap["scope"]; ok && scope != "" { + action.AuthenticateOidcConfig.Scope = aws.String(scope.(string)) + } + if sessionCookieName, ok := authenticateOidcMap["session_cookie_name"]; ok && sessionCookieName != "" { + action.AuthenticateOidcConfig.SessionCookieName = aws.String(sessionCookieName.(string)) + } + if sessionTimeout, ok := authenticateOidcMap["session_timeout"]; ok && sessionTimeout != 0 { + action.AuthenticateOidcConfig.SessionTimeout = aws.Int64(int64(sessionTimeout.(int))) + } + } else { + return errors.New("for actions of type 'authenticate-oidc', you must specify a 'authenticate_oidc' block") + } } params.DefaultActions[i] = action diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener_rule.go index 96b1d7ba36..a6edf22937 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener_rule.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_listener_rule.go @@ -53,11 +53,19 @@ func resourceAwsLbbListenerRule() *schema.Resource { Type: schema.TypeString, Required: true, ValidateFunc: validation.StringInSlice([]string{ + elbv2.ActionTypeEnumAuthenticateCognito, + elbv2.ActionTypeEnumAuthenticateOidc, elbv2.ActionTypeEnumFixedResponse, elbv2.ActionTypeEnumForward, elbv2.ActionTypeEnumRedirect, }, true), }, + "order": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + ValidateFunc: validation.IntBetween(1, 50000), + }, "target_group_arn": { Type: schema.TypeString, @@ -152,6 +160,123 @@ func resourceAwsLbbListenerRule() *schema.Resource { }, }, }, + + "authenticate_cognito": { + Type: schema.TypeList, + Optional: true, + DiffSuppressFunc: suppressIfDefaultActionTypeNot(elbv2.ActionTypeEnumAuthenticateCognito), + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "authentication_request_extra_params": { + Type: schema.TypeMap, + Optional: true, + }, + "on_unauthenticated_request": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{ + elbv2.AuthenticateCognitoActionConditionalBehaviorEnumDeny, + elbv2.AuthenticateCognitoActionConditionalBehaviorEnumAllow, + elbv2.AuthenticateCognitoActionConditionalBehaviorEnumAuthenticate, + }, true), + }, + "scope": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "session_cookie_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "session_timeout": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, + "user_pool_arn": { + Type: schema.TypeString, + Required: true, + }, + "user_pool_client_id": { + Type: schema.TypeString, + Required: true, + }, + "user_pool_domain": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, + + "authenticate_oidc": { + Type: schema.TypeList, + Optional: true, + DiffSuppressFunc: suppressIfDefaultActionTypeNot(elbv2.ActionTypeEnumAuthenticateOidc), + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "authentication_request_extra_params": { + Type: schema.TypeMap, + Optional: true, + }, + "authorization_endpoint": { + Type: schema.TypeString, + Required: true, + }, + "client_id": { + Type: schema.TypeString, + Required: true, + }, + "client_secret": { + Type: schema.TypeString, + Required: true, + Sensitive: true, + }, + "issuer": { + Type: schema.TypeString, + Required: true, + }, + "on_unauthenticated_request": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{ + elbv2.AuthenticateOidcActionConditionalBehaviorEnumDeny, + elbv2.AuthenticateOidcActionConditionalBehaviorEnumAllow, + elbv2.AuthenticateOidcActionConditionalBehaviorEnumAuthenticate, + }, true), + }, + "scope": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "session_cookie_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + "session_timeout": { + Type: schema.TypeInt, + Optional: true, + Computed: true, + }, + "token_endpoint": { + Type: schema.TypeString, + Required: true, + }, + "user_info_endpoint": { + Type: schema.TypeString, + Required: true, + }, + }, + }, + }, }, }, }, @@ -163,7 +288,7 @@ func resourceAwsLbbListenerRule() *schema.Resource { "field": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateMaxLength(64), + ValidateFunc: validation.StringLenBetween(0, 64), }, "values": { Type: schema.TypeList, @@ -206,8 +331,14 @@ func resourceAwsLbListenerRuleCreate(d *schema.ResourceData, meta interface{}) e for i, action := range actions { actionMap := action.(map[string]interface{}) - action := &elbv2.Action{} - action.Type = aws.String(actionMap["type"].(string)) + action := &elbv2.Action{ + Order: aws.Int64(int64(i + 1)), + Type: aws.String(actionMap["type"].(string)), + } + + if order, ok := actionMap["order"]; ok && order.(int) != 0 { + action.Order = aws.Int64(int64(order.(int))) + } switch actionMap["type"].(string) { case "forward": @@ -245,6 +376,77 @@ func resourceAwsLbListenerRuleCreate(d *schema.ResourceData, meta interface{}) e } else { return errors.New("for actions of type 'fixed-response', you must specify a 'fixed_response' block") } + + case "authenticate-cognito": + authenticateCognitoList := actionMap["authenticate_cognito"].([]interface{}) + + if len(authenticateCognitoList) == 1 { + authenticateCognitoMap := authenticateCognitoList[0].(map[string]interface{}) + + authenticationRequestExtraParams := make(map[string]*string) + for key, value := range authenticateCognitoMap["authentication_request_extra_params"].(map[string]interface{}) { + authenticationRequestExtraParams[key] = aws.String(value.(string)) + } + + action.AuthenticateCognitoConfig = &elbv2.AuthenticateCognitoActionConfig{ + AuthenticationRequestExtraParams: authenticationRequestExtraParams, + UserPoolArn: aws.String(authenticateCognitoMap["user_pool_arn"].(string)), + UserPoolClientId: aws.String(authenticateCognitoMap["user_pool_client_id"].(string)), + UserPoolDomain: aws.String(authenticateCognitoMap["user_pool_domain"].(string)), + } + + if onUnauthenticatedRequest, ok := authenticateCognitoMap["on_unauthenticated_request"]; ok && onUnauthenticatedRequest != "" { + action.AuthenticateCognitoConfig.OnUnauthenticatedRequest = aws.String(onUnauthenticatedRequest.(string)) + } + if scope, ok := authenticateCognitoMap["scope"]; ok && scope != "" { + action.AuthenticateCognitoConfig.Scope = aws.String(scope.(string)) + } + if sessionCookieName, ok := authenticateCognitoMap["session_cookie_name"]; ok && sessionCookieName != "" { + action.AuthenticateCognitoConfig.SessionCookieName = aws.String(sessionCookieName.(string)) + } + if sessionTimeout, ok := authenticateCognitoMap["session_timeout"]; ok && sessionTimeout != 0 { + action.AuthenticateCognitoConfig.SessionTimeout = aws.Int64(int64(sessionTimeout.(int))) + } + } else { + return errors.New("for actions of type 'authenticate-cognito', you must specify a 'authenticate_cognito' block") + } + + case "authenticate-oidc": + authenticateOidcList := actionMap["authenticate_oidc"].([]interface{}) + + if len(authenticateOidcList) == 1 { + authenticateOidcMap := authenticateOidcList[0].(map[string]interface{}) + + authenticationRequestExtraParams := make(map[string]*string) + for key, value := range authenticateOidcMap["authentication_request_extra_params"].(map[string]interface{}) { + authenticationRequestExtraParams[key] = aws.String(value.(string)) + } + + action.AuthenticateOidcConfig = &elbv2.AuthenticateOidcActionConfig{ + AuthenticationRequestExtraParams: authenticationRequestExtraParams, + AuthorizationEndpoint: aws.String(authenticateOidcMap["authorization_endpoint"].(string)), + ClientId: aws.String(authenticateOidcMap["client_id"].(string)), + ClientSecret: aws.String(authenticateOidcMap["client_secret"].(string)), + Issuer: aws.String(authenticateOidcMap["issuer"].(string)), + TokenEndpoint: aws.String(authenticateOidcMap["token_endpoint"].(string)), + UserInfoEndpoint: aws.String(authenticateOidcMap["user_info_endpoint"].(string)), + } + + if onUnauthenticatedRequest, ok := authenticateOidcMap["on_unauthenticated_request"]; ok && onUnauthenticatedRequest != "" { + action.AuthenticateOidcConfig.OnUnauthenticatedRequest = aws.String(onUnauthenticatedRequest.(string)) + } + if scope, ok := authenticateOidcMap["scope"]; ok && scope != "" { + action.AuthenticateOidcConfig.Scope = aws.String(scope.(string)) + } + if sessionCookieName, ok := authenticateOidcMap["session_cookie_name"]; ok && sessionCookieName != "" { + action.AuthenticateOidcConfig.SessionCookieName = aws.String(sessionCookieName.(string)) + } + if sessionTimeout, ok := authenticateOidcMap["session_timeout"]; ok && sessionTimeout != 0 { + action.AuthenticateOidcConfig.SessionTimeout = aws.Int64(int64(sessionTimeout.(int))) + } + } else { + return errors.New("for actions of type 'authenticate-oidc', you must specify a 'authenticate_oidc' block") + } } params.Actions[i] = action @@ -306,9 +508,24 @@ func resourceAwsLbListenerRuleCreate(d *schema.ResourceData, meta interface{}) e func resourceAwsLbListenerRuleRead(d *schema.ResourceData, meta interface{}) error { elbconn := meta.(*AWSClient).elbv2conn - resp, err := elbconn.DescribeRules(&elbv2.DescribeRulesInput{ + var resp *elbv2.DescribeRulesOutput + var req = &elbv2.DescribeRulesInput{ RuleArns: []*string{aws.String(d.Id())}, + } + + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + var err error + resp, err = elbconn.DescribeRules(req) + if err != nil { + if d.IsNewResource() && isAWSErr(err, elbv2.ErrCodeRuleNotFoundException, "") { + return resource.RetryableError(err) + } else { + return resource.NonRetryableError(err) + } + } + return nil }) + if err != nil { if isAWSErr(err, elbv2.ErrCodeRuleNotFoundException, "") { log.Printf("[WARN] DescribeRules - removing %s from state", d.Id()) @@ -340,10 +557,14 @@ func resourceAwsLbListenerRuleRead(d *schema.ResourceData, meta interface{}) err } } + sort.Slice(rule.Actions, func(i, j int) bool { + return aws.Int64Value(rule.Actions[i].Order) < aws.Int64Value(rule.Actions[j].Order) + }) actions := make([]interface{}, len(rule.Actions)) for i, action := range rule.Actions { actionMap := make(map[string]interface{}) actionMap["type"] = aws.StringValue(action.Type) + actionMap["order"] = aws.Int64Value(action.Order) switch actionMap["type"] { case "forward": @@ -369,6 +590,51 @@ func resourceAwsLbListenerRuleRead(d *schema.ResourceData, meta interface{}) err "status_code": aws.StringValue(action.FixedResponseConfig.StatusCode), }, } + + case "authenticate-cognito": + authenticationRequestExtraParams := make(map[string]interface{}) + for key, value := range action.AuthenticateCognitoConfig.AuthenticationRequestExtraParams { + authenticationRequestExtraParams[key] = aws.StringValue(value) + } + + actionMap["authenticate_cognito"] = []map[string]interface{}{ + { + "authentication_request_extra_params": authenticationRequestExtraParams, + "on_unauthenticated_request": aws.StringValue(action.AuthenticateCognitoConfig.OnUnauthenticatedRequest), + "scope": aws.StringValue(action.AuthenticateCognitoConfig.Scope), + "session_cookie_name": aws.StringValue(action.AuthenticateCognitoConfig.SessionCookieName), + "session_timeout": aws.Int64Value(action.AuthenticateCognitoConfig.SessionTimeout), + "user_pool_arn": aws.StringValue(action.AuthenticateCognitoConfig.UserPoolArn), + "user_pool_client_id": aws.StringValue(action.AuthenticateCognitoConfig.UserPoolClientId), + "user_pool_domain": aws.StringValue(action.AuthenticateCognitoConfig.UserPoolDomain), + }, + } + + case "authenticate-oidc": + authenticationRequestExtraParams := make(map[string]interface{}) + for key, value := range action.AuthenticateOidcConfig.AuthenticationRequestExtraParams { + authenticationRequestExtraParams[key] = aws.StringValue(value) + } + + // The LB API currently provides no way to read the ClientSecret + // Instead we passthrough the configuration value into the state + clientSecret := d.Get("action." + strconv.Itoa(i) + ".authenticate_oidc.0.client_secret").(string) + + actionMap["authenticate_oidc"] = []map[string]interface{}{ + { + "authentication_request_extra_params": authenticationRequestExtraParams, + "authorization_endpoint": aws.StringValue(action.AuthenticateOidcConfig.AuthorizationEndpoint), + "client_id": aws.StringValue(action.AuthenticateOidcConfig.ClientId), + "client_secret": clientSecret, + "issuer": aws.StringValue(action.AuthenticateOidcConfig.Issuer), + "on_unauthenticated_request": aws.StringValue(action.AuthenticateOidcConfig.OnUnauthenticatedRequest), + "scope": aws.StringValue(action.AuthenticateOidcConfig.Scope), + "session_cookie_name": aws.StringValue(action.AuthenticateOidcConfig.SessionCookieName), + "session_timeout": aws.Int64Value(action.AuthenticateOidcConfig.SessionTimeout), + "token_endpoint": aws.StringValue(action.AuthenticateOidcConfig.TokenEndpoint), + "user_info_endpoint": aws.StringValue(action.AuthenticateOidcConfig.UserInfoEndpoint), + }, + } } actions[i] = actionMap @@ -425,8 +691,14 @@ func resourceAwsLbListenerRuleUpdate(d *schema.ResourceData, meta interface{}) e for i, action := range actions { actionMap := action.(map[string]interface{}) - action := &elbv2.Action{} - action.Type = aws.String(actionMap["type"].(string)) + action := &elbv2.Action{ + Order: aws.Int64(int64(i + 1)), + Type: aws.String(actionMap["type"].(string)), + } + + if order, ok := actionMap["order"]; ok && order.(int) != 0 { + action.Order = aws.Int64(int64(order.(int))) + } switch actionMap["type"].(string) { case "forward": @@ -464,6 +736,77 @@ func resourceAwsLbListenerRuleUpdate(d *schema.ResourceData, meta interface{}) e } else { return errors.New("for actions of type 'fixed-response', you must specify a 'fixed_response' block") } + + case "authenticate-cognito": + authenticateCognitoList := actionMap["authenticate_cognito"].([]interface{}) + + if len(authenticateCognitoList) == 1 { + authenticateCognitoMap := authenticateCognitoList[0].(map[string]interface{}) + + authenticationRequestExtraParams := make(map[string]*string) + for key, value := range authenticateCognitoMap["authentication_request_extra_params"].(map[string]interface{}) { + authenticationRequestExtraParams[key] = aws.String(value.(string)) + } + + action.AuthenticateCognitoConfig = &elbv2.AuthenticateCognitoActionConfig{ + AuthenticationRequestExtraParams: authenticationRequestExtraParams, + UserPoolArn: aws.String(authenticateCognitoMap["user_pool_arn"].(string)), + UserPoolClientId: aws.String(authenticateCognitoMap["user_pool_client_id"].(string)), + UserPoolDomain: aws.String(authenticateCognitoMap["user_pool_domain"].(string)), + } + + if onUnauthenticatedRequest, ok := authenticateCognitoMap["on_unauthenticated_request"]; ok && onUnauthenticatedRequest != "" { + action.AuthenticateCognitoConfig.OnUnauthenticatedRequest = aws.String(onUnauthenticatedRequest.(string)) + } + if scope, ok := authenticateCognitoMap["scope"]; ok && scope != "" { + action.AuthenticateCognitoConfig.Scope = aws.String(scope.(string)) + } + if sessionCookieName, ok := authenticateCognitoMap["session_cookie_name"]; ok && sessionCookieName != "" { + action.AuthenticateCognitoConfig.SessionCookieName = aws.String(sessionCookieName.(string)) + } + if sessionTimeout, ok := authenticateCognitoMap["session_timeout"]; ok && sessionTimeout != 0 { + action.AuthenticateCognitoConfig.SessionTimeout = aws.Int64(int64(sessionTimeout.(int))) + } + } else { + return errors.New("for actions of type 'authenticate-cognito', you must specify a 'authenticate_cognito' block") + } + + case "authenticate-oidc": + authenticateOidcList := actionMap["authenticate_oidc"].([]interface{}) + + if len(authenticateOidcList) == 1 { + authenticateOidcMap := authenticateOidcList[0].(map[string]interface{}) + + authenticationRequestExtraParams := make(map[string]*string) + for key, value := range authenticateOidcMap["authentication_request_extra_params"].(map[string]interface{}) { + authenticationRequestExtraParams[key] = aws.String(value.(string)) + } + + action.AuthenticateOidcConfig = &elbv2.AuthenticateOidcActionConfig{ + AuthenticationRequestExtraParams: authenticationRequestExtraParams, + AuthorizationEndpoint: aws.String(authenticateOidcMap["authorization_endpoint"].(string)), + ClientId: aws.String(authenticateOidcMap["client_id"].(string)), + ClientSecret: aws.String(authenticateOidcMap["client_secret"].(string)), + Issuer: aws.String(authenticateOidcMap["issuer"].(string)), + TokenEndpoint: aws.String(authenticateOidcMap["token_endpoint"].(string)), + UserInfoEndpoint: aws.String(authenticateOidcMap["user_info_endpoint"].(string)), + } + + if onUnauthenticatedRequest, ok := authenticateOidcMap["on_unauthenticated_request"]; ok && onUnauthenticatedRequest != "" { + action.AuthenticateOidcConfig.OnUnauthenticatedRequest = aws.String(onUnauthenticatedRequest.(string)) + } + if scope, ok := authenticateOidcMap["scope"]; ok && scope != "" { + action.AuthenticateOidcConfig.Scope = aws.String(scope.(string)) + } + if sessionCookieName, ok := authenticateOidcMap["session_cookie_name"]; ok && sessionCookieName != "" { + action.AuthenticateOidcConfig.SessionCookieName = aws.String(sessionCookieName.(string)) + } + if sessionTimeout, ok := authenticateOidcMap["session_timeout"]; ok && sessionTimeout != 0 { + action.AuthenticateOidcConfig.SessionTimeout = aws.Int64(int64(sessionTimeout.(int))) + } + } else { + return errors.New("for actions of type 'authenticate-oidc', you must specify a 'authenticate_oidc' block") + } } params.Actions[i] = action diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group.go index 47798903d6..0130949d86 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lb_target_group.go @@ -45,14 +45,14 @@ func resourceAwsLbTargetGroup() *schema.Resource { Computed: true, ForceNew: true, ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validateMaxLength(32), + ValidateFunc: validateLbTargetGroupName, }, "name_prefix": { Type: schema.TypeString, Optional: true, ForceNew: true, ConflictsWith: []string{"name"}, - ValidateFunc: validateMaxLength(32 - resource.UniqueIDSuffixLength), + ValidateFunc: validateLbTargetGroupNamePrefix, }, "port": { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_instance.go index 6876b10b7c..17fdf90e60 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_instance.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_instance.go @@ -132,7 +132,7 @@ func resourceAwsLightsailInstanceCreate(d *schema.ResourceData, meta interface{} } if len(resp.Operations) == 0 { - return fmt.Errorf("[ERR] No operations found for CreateInstance request") + return fmt.Errorf("No operations found for CreateInstance request") } op := resp.Operations[0] @@ -149,7 +149,7 @@ func resourceAwsLightsailInstanceCreate(d *schema.ResourceData, meta interface{} _, err = stateConf.WaitForState() if err != nil { - // We don't return an error here because the Create call succeded + // We don't return an error here because the Create call succeeded log.Printf("[ERR] Error waiting for instance (%s) to become ready: %s", d.Id(), err) } @@ -254,7 +254,7 @@ func resourceAwsLightsailOperationRefreshFunc( } if o.Operation == nil { - return nil, "Failed", fmt.Errorf("[ERR] Error retrieving Operation info for operation (%s)", *oid) + return nil, "Failed", fmt.Errorf("Error retrieving Operation info for operation (%s)", *oid) } log.Printf("[DEBUG] Lightsail Operation (%s) is currently %q", *oid, *o.Operation.Status) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_key_pair.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_key_pair.go index 1d4ac55173..892ed298f3 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_key_pair.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_lightsail_key_pair.go @@ -103,10 +103,10 @@ func resourceAwsLightsailKeyPairCreate(d *schema.ResourceData, meta interface{}) return err } if resp.Operation == nil { - return fmt.Errorf("[ERR] No operation found for CreateKeyPair response") + return fmt.Errorf("No operation found for CreateKeyPair response") } if resp.KeyPair == nil { - return fmt.Errorf("[ERR] No KeyPair information found for CreateKeyPair response") + return fmt.Errorf("No KeyPair information found for CreateKeyPair response") } d.SetId(kName) @@ -160,7 +160,7 @@ func resourceAwsLightsailKeyPairCreate(d *schema.ResourceData, meta interface{}) _, err := stateConf.WaitForState() if err != nil { - // We don't return an error here because the Create call succeded + // We don't return an error here because the Create call succeeded log.Printf("[ERR] Error waiting for KeyPair (%s) to become ready: %s", d.Id(), err) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_policy.go index dfeea39f0a..703ba85cd6 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_load_balancer_policy.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "log" "strings" "github.com/aws/aws-sdk-go/aws" @@ -100,11 +101,20 @@ func resourceAwsLoadBalancerPolicyRead(d *schema.ResourceData, meta interface{}) } getResp, err := elbconn.DescribeLoadBalancerPolicies(request) + + if isAWSErr(err, "LoadBalancerNotFound", "") { + log.Printf("[WARN] Load Balancer Policy (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if isAWSErr(err, elb.ErrCodePolicyNotFoundException, "") { + log.Printf("[WARN] Load Balancer Policy (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "PolicyNotFound" { - d.SetId("") - return nil - } return fmt.Errorf("Error retrieving policy: %s", err) } @@ -163,6 +173,9 @@ func resourceAwsLoadBalancerPolicyUpdate(d *schema.ResourceData, meta interface{ } err = resourceAwsLoadBalancerPolicyCreate(d, meta) + if err != nil { + return err + } for _, listenerAssignment := range reassignments.listenerPolicies { if _, err := elbconn.SetLoadBalancerPoliciesOfListener(listenerAssignment); err != nil { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_mq_broker.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_mq_broker.go index cb0705b250..d493579ba1 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_mq_broker.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_mq_broker.go @@ -80,6 +80,32 @@ func resourceAwsMqBroker() *schema.Resource { Required: true, ForceNew: true, }, + "logs": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + // Ignore missing configuration block + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if old == "1" && new == "0" { + return true + } + return false + }, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "general": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + "audit": { + Type: schema.TypeBool, + Optional: true, + Default: false, + }, + }, + }, + }, "maintenance_window_start_time": { Type: schema.TypeList, MaxItems: 1, @@ -165,6 +191,10 @@ func resourceAwsMqBroker() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "ip_address": { + Type: schema.TypeString, + Computed: true, + }, "endpoints": { Type: schema.TypeList, Computed: true, @@ -192,6 +222,7 @@ func resourceAwsMqBrokerCreate(d *schema.ResourceData, meta interface{}) error { PubliclyAccessible: aws.Bool(d.Get("publicly_accessible").(bool)), SecurityGroups: expandStringSet(d.Get("security_groups").(*schema.Set)), Users: expandMqUsers(d.Get("user").(*schema.Set).List()), + Logs: expandMqLogs(d.Get("logs").([]interface{})), } if v, ok := d.GetOk("configuration"); ok { @@ -280,6 +311,10 @@ func resourceAwsMqBrokerRead(d *schema.ResourceData, meta interface{}) error { d.Set("security_groups", aws.StringValueSlice(out.SecurityGroups)) d.Set("subnet_ids", aws.StringValueSlice(out.SubnetIds)) + if err := d.Set("logs", flattenMqLogs(out.Logs)); err != nil { + return fmt.Errorf("error setting logs: %s", err) + } + err = d.Set("configuration", flattenMqConfigurationId(out.Configurations.Current)) if err != nil { return err @@ -314,10 +349,11 @@ func resourceAwsMqBrokerRead(d *schema.ResourceData, meta interface{}) error { func resourceAwsMqBrokerUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).mqconn - if d.HasChange("configuration") { + if d.HasChange("configuration") || d.HasChange("logs") { _, err := conn.UpdateBroker(&mq.UpdateBrokerRequest{ BrokerId: aws.String(d.Id()), Configuration: expandMqConfigurationId(d.Get("configuration").([]interface{})), + Logs: expandMqLogs(d.Get("logs").([]interface{})), }) if err != nil { return err diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_nat_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_nat_gateway.go index 52f7f45716..d227ca2f91 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_nat_gateway.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_nat_gateway.go @@ -38,19 +38,16 @@ func resourceAwsNatGateway() *schema.Resource { "network_interface_id": { Type: schema.TypeString, - Optional: true, Computed: true, }, "private_ip": { Type: schema.TypeString, - Optional: true, Computed: true, }, "public_ip": { Type: schema.TypeString, - Optional: true, Computed: true, }, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster.go index 94d4a77c6b..3ced18b515 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster.go @@ -652,7 +652,7 @@ func resourceAwsNeptuneClusterDelete(d *schema.ResourceData, meta interface{}) e // Wait, catching any errors _, err = stateConf.WaitForState() if err != nil { - return fmt.Errorf("[WARN] Error deleting Neptune Cluster (%s): %s", d.Id(), err) + return fmt.Errorf("Error deleting Neptune Cluster (%s): %s", d.Id(), err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster_parameter_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster_parameter_group.go index 7a879889d5..3f31f345a1 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster_parameter_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_cluster_parameter_group.go @@ -206,7 +206,7 @@ func resourceAwsNeptuneClusterParameterGroupUpdate(d *schema.ResourceData, meta // We can only modify 20 parameters at a time, so walk them until // we've got them all. for parameters != nil { - paramsToModify := make([]*neptune.Parameter, 0) + var paramsToModify []*neptune.Parameter if len(parameters) <= neptuneClusterParameterGroupMaxParamsBulkEdit { paramsToModify, parameters = parameters[:], nil } else { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_parameter_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_parameter_group.go index 4c20ee231c..05bc64b556 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_parameter_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_neptune_parameter_group.go @@ -207,7 +207,7 @@ func resourceAwsNeptuneParameterGroupUpdate(d *schema.ResourceData, meta interfa log.Printf("[DEBUG] Parameters to add: %#v", toAdd) for len(toRemove) > 0 { - paramsToModify := make([]*neptune.Parameter, 0) + var paramsToModify []*neptune.Parameter if len(toRemove) <= maxParams { paramsToModify, toRemove = toRemove[:], nil } else { @@ -235,7 +235,7 @@ func resourceAwsNeptuneParameterGroupUpdate(d *schema.ResourceData, meta interfa } for len(toAdd) > 0 { - paramsToModify := make([]*neptune.Parameter, 0) + var paramsToModify []*neptune.Parameter if len(toAdd) <= maxParams { paramsToModify, toAdd = toAdd[:], nil } else { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl.go index 2e1ce235e5..3776cc2c0d 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl.go @@ -538,7 +538,7 @@ func resourceAwsNetworkAclDelete(d *schema.ResourceData, meta interface{}) error }) if retryErr != nil { - return fmt.Errorf("[ERR] Error destroying Network ACL (%s): %s", d.Id(), retryErr) + return fmt.Errorf("Error destroying Network ACL (%s): %s", d.Id(), retryErr) } return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl_rule.go index 99157218bd..6fe843ca70 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl_rule.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_acl_rule.go @@ -42,10 +42,15 @@ func resourceAwsNetworkAclRule() *schema.Resource { Required: true, ForceNew: true, DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { - if old == "all" && new == "-1" || old == "-1" && new == "all" { - return true + pi := protocolIntegers() + if val, ok := pi[old]; ok { + old = strconv.Itoa(val) } - return false + if val, ok := pi[new]; ok { + new = strconv.Itoa(val) + } + + return old == new }, }, "rule_action": { @@ -134,7 +139,7 @@ func resourceAwsNetworkAclRuleCreate(d *schema.ResourceData, meta interface{}) e // Specify additional required fields for ICMP. For the list // of ICMP codes and types, see: https://www.iana.org/assignments/icmp-parameters/icmp-parameters.xhtml - if p == 1 { + if p == 1 || p == 58 { params.IcmpTypeCode = &ec2.IcmpTypeCode{} if v, ok := d.GetOk("icmp_type"); ok { icmpType, err := strconv.Atoi(v.(string)) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_interface_sg_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_interface_sg_attachment.go index bc0c33b4b1..1ac6476975 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_interface_sg_attachment.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_network_interface_sg_attachment.go @@ -81,6 +81,13 @@ func resourceAwsNetworkInterfaceSGAttachmentRead(d *schema.ResourceData, meta in conn := meta.(*AWSClient).ec2conn iface, err := fetchNetworkInterface(conn, interfaceID) + + if isAWSErr(err, "InvalidNetworkInterfaceID.NotFound", "") { + log.Printf("[WARN] EC2 Network Interface (%s) not found, removing from state", interfaceID) + d.SetId("") + return nil + } + if err != nil { return err } @@ -108,15 +115,16 @@ func resourceAwsNetworkInterfaceSGAttachmentDelete(d *schema.ResourceData, meta conn := meta.(*AWSClient).ec2conn iface, err := fetchNetworkInterface(conn, interfaceID) - if err != nil { - return err + + if isAWSErr(err, "InvalidNetworkInterfaceID.NotFound", "") { + return nil } - if err := delSGFromENI(conn, sgID, iface); err != nil { + if err != nil { return err } - return nil + return delSGFromENI(conn, sgID, iface) } // fetchNetworkInterface is a utility function used by Read and Delete to fetch @@ -154,6 +162,11 @@ func delSGFromENI(conn *ec2.EC2, sgID string, iface *ec2.NetworkInterface) error } _, err := conn.ModifyNetworkInterfaceAttribute(params) + + if isAWSErr(err, "InvalidNetworkInterfaceID.NotFound", "") { + return nil + } + return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_application.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_application.go index 939d2fef49..e0ef1a2652 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_application.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_application.go @@ -30,6 +30,7 @@ func resourceAwsOpsworksApplication() *schema.Resource { Type: schema.TypeString, Computed: true, Optional: true, + ForceNew: true, }, "type": { Type: schema.TypeString, @@ -415,7 +416,7 @@ func resourceAwsOpsworksSetApplicationEnvironmentVariable(d *schema.ResourceData } if config.Secure != nil { - if bool(*config.Secure) { + if aws.BoolValue(config.Secure) { data["secure"] = &opsworksTrueString } else { data["secure"] = &opsworksFalseString diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_instance.go index e876b834f0..ccbddadce1 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_instance.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_instance.go @@ -531,12 +531,12 @@ func resourceAwsOpsworksInstanceRead(d *schema.ResourceData, meta interface{}) e for _, v := range instance.LayerIds { layerIds = append(layerIds, *v) } - layerIds, err = sortListBasedonTFFile(layerIds, d, "layer_ids") + layerIds, err = sortListBasedonTFFile(layerIds, d) if err != nil { - return fmt.Errorf("[DEBUG] Error sorting layer_ids attribute: %#v", err) + return fmt.Errorf("Error sorting layer_ids attribute: %#v", err) } if err := d.Set("layer_ids", layerIds); err != nil { - return fmt.Errorf("[DEBUG] Error setting layer_ids attribute: %#v, error: %#v", layerIds, err) + return fmt.Errorf("Error setting layer_ids attribute: %#v, error: %#v", layerIds, err) } d.Set("os", instance.Os) d.Set("platform", instance.Platform) @@ -561,7 +561,7 @@ func resourceAwsOpsworksInstanceRead(d *schema.ResourceData, meta interface{}) e d.Set("virtualization_type", instance.VirtualizationType) // Read BlockDeviceMapping - ibds, err := readOpsworksBlockDevices(d, instance, meta) + ibds, err := readOpsworksBlockDevices(instance) if err != nil { return err } @@ -825,7 +825,7 @@ func resourceAwsOpsworksInstanceUpdate(d *schema.ResourceData, meta interface{}) } } else { if status != "stopped" && status != "stopping" && status != "shutting_down" { - err := stopOpsworksInstance(d, meta, true, d.Timeout(schema.TimeoutUpdate)) + err := stopOpsworksInstance(d, meta, d.Timeout(schema.TimeoutUpdate)) if err != nil { return err } @@ -840,7 +840,7 @@ func resourceAwsOpsworksInstanceDelete(d *schema.ResourceData, meta interface{}) client := meta.(*AWSClient).opsworksconn if v, ok := d.GetOk("status"); ok && v.(string) != "stopped" { - err := stopOpsworksInstance(d, meta, true, d.Timeout(schema.TimeoutDelete)) + err := stopOpsworksInstance(d, meta, d.Timeout(schema.TimeoutDelete)) if err != nil { return err } @@ -910,7 +910,7 @@ func startOpsworksInstance(d *schema.ResourceData, meta interface{}, wait bool, return nil } -func stopOpsworksInstance(d *schema.ResourceData, meta interface{}, wait bool, timeout time.Duration) error { +func stopOpsworksInstance(d *schema.ResourceData, meta interface{}, timeout time.Duration) error { client := meta.(*AWSClient).opsworksconn instanceId := d.Id() @@ -927,29 +927,26 @@ func stopOpsworksInstance(d *schema.ResourceData, meta interface{}, wait bool, t return err } - if wait { - log.Printf("[DEBUG] Waiting for instance (%s) to become stopped", instanceId) + log.Printf("[DEBUG] Waiting for instance (%s) to become stopped", instanceId) - stateConf := &resource.StateChangeConf{ - Pending: []string{"stopping", "terminating", "shutting_down", "terminated"}, - Target: []string{"stopped"}, - Refresh: OpsworksInstanceStateRefreshFunc(client, instanceId), - Timeout: timeout, - Delay: 10 * time.Second, - MinTimeout: 3 * time.Second, - } - _, err = stateConf.WaitForState() - if err != nil { - return fmt.Errorf("Error waiting for instance (%s) to become stopped: %s", - instanceId, err) - } + stateConf := &resource.StateChangeConf{ + Pending: []string{"stopping", "terminating", "shutting_down", "terminated"}, + Target: []string{"stopped"}, + Refresh: OpsworksInstanceStateRefreshFunc(client, instanceId), + Timeout: timeout, + Delay: 10 * time.Second, + MinTimeout: 3 * time.Second, + } + _, err = stateConf.WaitForState() + if err != nil { + return fmt.Errorf("Error waiting for instance (%s) to become stopped: %s", + instanceId, err) } return nil } -func readOpsworksBlockDevices(d *schema.ResourceData, instance *opsworks.Instance, meta interface{}) ( - map[string]interface{}, error) { +func readOpsworksBlockDevices(instance *opsworks.Instance) (map[string]interface{}, error) { blockDevices := make(map[string]interface{}) blockDevices["ebs"] = make([]map[string]interface{}, 0) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_rds_db_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_rds_db_instance.go index ef0d61f70f..352dc08244 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_rds_db_instance.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_rds_db_instance.go @@ -135,7 +135,7 @@ func resourceAwsOpsworksRdsDbInstanceRead(d *schema.ResourceData, meta interface StackId: aws.String(d.Get("stack_id").(string)), } - log.Printf("[DEBUG] Reading OpsWorks registerd rds db instances for stack: %s", d.Get("stack_id")) + log.Printf("[DEBUG] Reading OpsWorks registered rds db instances for stack: %s", d.Get("stack_id")) resp, err := client.DescribeRdsDbInstances(req) if err != nil { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_stack.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_stack.go index a173da10a7..dbb0887be9 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_stack.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_opsworks_stack.go @@ -7,7 +7,6 @@ import ( "strings" "time" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -385,7 +384,7 @@ func opsworksConnForRegion(region string, meta interface{}) (*opsworks.OpsWorks, // Set up base session sess, err := session.NewSession(&originalConn.Config) if err != nil { - return nil, errwrap.Wrapf("Error creating AWS session: {{err}}", err) + return nil, fmt.Errorf("Error creating AWS session: %s", err) } sess.Handlers.Build.PushBackNamed(addTerraformVersionToUserAgent) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_organizations_organization.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_organizations_organization.go index 7b4fb8311e..0e45120b02 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_organizations_organization.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_organizations_organization.go @@ -14,6 +14,7 @@ func resourceAwsOrganizationsOrganization() *schema.Resource { return &schema.Resource{ Create: resourceAwsOrganizationsOrganizationCreate, Read: resourceAwsOrganizationsOrganizationRead, + Update: resourceAwsOrganizationsOrganizationUpdate, Delete: resourceAwsOrganizationsOrganizationDelete, Importer: &schema.ResourceImporter{ State: schema.ImportStatePassthrough, @@ -36,6 +37,11 @@ func resourceAwsOrganizationsOrganization() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "aws_service_access_principals": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, "feature_set": { Type: schema.TypeString, Optional: true, @@ -66,6 +72,21 @@ func resourceAwsOrganizationsOrganizationCreate(d *schema.ResourceData, meta int org := resp.Organization d.SetId(*org.Id) + awsServiceAccessPrincipals := d.Get("aws_service_access_principals").(*schema.Set).List() + for _, principalRaw := range awsServiceAccessPrincipals { + principal := principalRaw.(string) + input := &organizations.EnableAWSServiceAccessInput{ + ServicePrincipal: aws.String(principal), + } + + log.Printf("[DEBUG] Enabling AWS Service Access in Organization: %s", input) + _, err := conn.EnableAWSServiceAccess(input) + + if err != nil { + return fmt.Errorf("error enabling AWS Service Access (%s) in Organization: %s", principal, err) + } + } + return resourceAwsOrganizationsOrganizationRead(d, meta) } @@ -74,13 +95,15 @@ func resourceAwsOrganizationsOrganizationRead(d *schema.ResourceData, meta inter log.Printf("[INFO] Reading Organization: %s", d.Id()) org, err := conn.DescribeOrganization(&organizations.DescribeOrganizationInput{}) + + if isAWSErr(err, organizations.ErrCodeAWSOrganizationsNotInUseException, "") { + log.Printf("[WARN] Organization does not exist, removing from state: %s", d.Id()) + d.SetId("") + return nil + } + if err != nil { - if isAWSErr(err, organizations.ErrCodeAWSOrganizationsNotInUseException, "") { - log.Printf("[WARN] Organization does not exist, removing from state: %s", d.Id()) - d.SetId("") - return nil - } - return err + return fmt.Errorf("error describing Organization: %s", err) } d.Set("arn", org.Organization.Arn) @@ -88,9 +111,70 @@ func resourceAwsOrganizationsOrganizationRead(d *schema.ResourceData, meta inter d.Set("master_account_arn", org.Organization.MasterAccountArn) d.Set("master_account_email", org.Organization.MasterAccountEmail) d.Set("master_account_id", org.Organization.MasterAccountId) + + awsServiceAccessPrincipals := make([]string, 0) + + // ConstraintViolationException: The request failed because the organization does not have all features enabled. Please enable all features in your organization and then retry. + if aws.StringValue(org.Organization.FeatureSet) == organizations.OrganizationFeatureSetAll { + err = conn.ListAWSServiceAccessForOrganizationPages(&organizations.ListAWSServiceAccessForOrganizationInput{}, func(page *organizations.ListAWSServiceAccessForOrganizationOutput, lastPage bool) bool { + for _, enabledServicePrincipal := range page.EnabledServicePrincipals { + awsServiceAccessPrincipals = append(awsServiceAccessPrincipals, aws.StringValue(enabledServicePrincipal.ServicePrincipal)) + } + return !lastPage + }) + + if err != nil { + return fmt.Errorf("error listing AWS Service Access for Organization (%s): %s", d.Id(), err) + } + } + + if err := d.Set("aws_service_access_principals", awsServiceAccessPrincipals); err != nil { + return fmt.Errorf("error setting aws_service_access_principals: %s", err) + } + return nil } +func resourceAwsOrganizationsOrganizationUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).organizationsconn + + if d.HasChange("aws_service_access_principals") { + oldRaw, newRaw := d.GetChange("aws_service_access_principals") + oldSet := oldRaw.(*schema.Set) + newSet := newRaw.(*schema.Set) + + for _, disablePrincipalRaw := range oldSet.Difference(newSet).List() { + principal := disablePrincipalRaw.(string) + input := &organizations.DisableAWSServiceAccessInput{ + ServicePrincipal: aws.String(principal), + } + + log.Printf("[DEBUG] Disabling AWS Service Access in Organization: %s", input) + _, err := conn.DisableAWSServiceAccess(input) + + if err != nil { + return fmt.Errorf("error disabling AWS Service Access (%s) in Organization: %s", principal, err) + } + } + + for _, enablePrincipalRaw := range newSet.Difference(oldSet).List() { + principal := enablePrincipalRaw.(string) + input := &organizations.EnableAWSServiceAccessInput{ + ServicePrincipal: aws.String(principal), + } + + log.Printf("[DEBUG] Enabling AWS Service Access in Organization: %s", input) + _, err := conn.EnableAWSServiceAccess(input) + + if err != nil { + return fmt.Errorf("error enabling AWS Service Access (%s) in Organization: %s", principal, err) + } + } + } + + return resourceAwsOrganizationsOrganizationRead(d, meta) +} + func resourceAwsOrganizationsOrganizationDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).organizationsconn diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_organizations_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_organizations_policy.go index dcad1d3784..715e6bf93b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_organizations_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_organizations_policy.go @@ -31,7 +31,7 @@ func resourceAwsOrganizationsPolicy() *schema.Resource { Type: schema.TypeString, Required: true, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, }, "description": { Type: schema.TypeString, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_adm_channel.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_adm_channel.go new file mode 100644 index 0000000000..71373a98bb --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_adm_channel.go @@ -0,0 +1,114 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/pinpoint" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsPinpointADMChannel() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsPinpointADMChannelUpsert, + Read: resourceAwsPinpointADMChannelRead, + Update: resourceAwsPinpointADMChannelUpsert, + Delete: resourceAwsPinpointADMChannelDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "application_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "client_id": { + Type: schema.TypeString, + Required: true, + Sensitive: true, + }, + "client_secret": { + Type: schema.TypeString, + Required: true, + Sensitive: true, + }, + "enabled": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + }, + } +} + +func resourceAwsPinpointADMChannelUpsert(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + applicationId := d.Get("application_id").(string) + + params := &pinpoint.ADMChannelRequest{} + + params.ClientId = aws.String(d.Get("client_id").(string)) + params.ClientSecret = aws.String(d.Get("client_secret").(string)) + params.Enabled = aws.Bool(d.Get("enabled").(bool)) + + req := pinpoint.UpdateAdmChannelInput{ + ApplicationId: aws.String(applicationId), + ADMChannelRequest: params, + } + + _, err := conn.UpdateAdmChannel(&req) + if err != nil { + return err + } + + d.SetId(applicationId) + + return resourceAwsPinpointADMChannelRead(d, meta) +} + +func resourceAwsPinpointADMChannelRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[INFO] Reading Pinpoint ADM Channel for application %s", d.Id()) + + channel, err := conn.GetAdmChannel(&pinpoint.GetAdmChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + log.Printf("[WARN] Pinpoint ADM Channel for application %s not found, error code (404)", d.Id()) + d.SetId("") + return nil + } + + return fmt.Errorf("error getting Pinpoint ADM Channel for application %s: %s", d.Id(), err) + } + + d.Set("application_id", channel.ADMChannelResponse.ApplicationId) + d.Set("enabled", channel.ADMChannelResponse.Enabled) + // client_id and client_secret are never returned + + return nil +} + +func resourceAwsPinpointADMChannelDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[DEBUG] Pinpoint Delete ADM Channel: %s", d.Id()) + _, err := conn.DeleteAdmChannel(&pinpoint.DeleteAdmChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting Pinpoint ADM Channel for application %s: %s", d.Id(), err) + } + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_apns_channel.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_apns_channel.go new file mode 100644 index 0000000000..95949cb14e --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_apns_channel.go @@ -0,0 +1,159 @@ +package aws + +import ( + "errors" + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/pinpoint" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsPinpointAPNSChannel() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsPinpointAPNSChannelUpsert, + Read: resourceAwsPinpointAPNSChannelRead, + Update: resourceAwsPinpointAPNSChannelUpsert, + Delete: resourceAwsPinpointAPNSChannelDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "application_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "bundle_id": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "certificate": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "default_authentication_method": { + Type: schema.TypeString, + Optional: true, + }, + "enabled": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "private_key": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "team_id": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "token_key": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "token_key_id": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + }, + } +} + +func resourceAwsPinpointAPNSChannelUpsert(d *schema.ResourceData, meta interface{}) error { + certificate, certificateOk := d.GetOk("certificate") + privateKey, privateKeyOk := d.GetOk("private_key") + + bundleId, bundleIdOk := d.GetOk("bundle_id") + teamId, teamIdOk := d.GetOk("team_id") + tokenKey, tokenKeyOk := d.GetOk("token_key") + tokenKeyId, tokenKeyIdOk := d.GetOk("token_key_id") + + if !(certificateOk && privateKeyOk) && !(bundleIdOk && teamIdOk && tokenKeyOk && tokenKeyIdOk) { + return errors.New("At least one set of credentials is required; either [certificate, private_key] or [bundle_id, team_id, token_key, token_key_id]") + } + + conn := meta.(*AWSClient).pinpointconn + + applicationId := d.Get("application_id").(string) + + params := &pinpoint.APNSChannelRequest{} + + params.DefaultAuthenticationMethod = aws.String(d.Get("default_authentication_method").(string)) + params.Enabled = aws.Bool(d.Get("enabled").(bool)) + + params.Certificate = aws.String(certificate.(string)) + params.PrivateKey = aws.String(privateKey.(string)) + + params.BundleId = aws.String(bundleId.(string)) + params.TeamId = aws.String(teamId.(string)) + params.TokenKey = aws.String(tokenKey.(string)) + params.TokenKeyId = aws.String(tokenKeyId.(string)) + + req := pinpoint.UpdateApnsChannelInput{ + ApplicationId: aws.String(applicationId), + APNSChannelRequest: params, + } + + _, err := conn.UpdateApnsChannel(&req) + if err != nil { + return fmt.Errorf("error updating Pinpoint APNs Channel for Application %s: %s", applicationId, err) + } + + d.SetId(applicationId) + + return resourceAwsPinpointAPNSChannelRead(d, meta) +} + +func resourceAwsPinpointAPNSChannelRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[INFO] Reading Pinpoint APNs Channel for Application %s", d.Id()) + + output, err := conn.GetApnsChannel(&pinpoint.GetApnsChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + log.Printf("[WARN] Pinpoint APNs Channel for application %s not found, error code (404)", d.Id()) + d.SetId("") + return nil + } + + return fmt.Errorf("error getting Pinpoint APNs Channel for application %s: %s", d.Id(), err) + } + + d.Set("application_id", output.APNSChannelResponse.ApplicationId) + d.Set("default_authentication_method", output.APNSChannelResponse.DefaultAuthenticationMethod) + d.Set("enabled", output.APNSChannelResponse.Enabled) + // Sensitive params are not returned + + return nil +} + +func resourceAwsPinpointAPNSChannelDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[DEBUG] Deleting Pinpoint APNs Channel: %s", d.Id()) + _, err := conn.DeleteApnsChannel(&pinpoint.DeleteApnsChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting Pinpoint APNs Channel for Application %s: %s", d.Id(), err) + } + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_apns_sandbox_channel.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_apns_sandbox_channel.go new file mode 100644 index 0000000000..e20a9a6328 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_apns_sandbox_channel.go @@ -0,0 +1,159 @@ +package aws + +import ( + "errors" + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/pinpoint" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsPinpointAPNSSandboxChannel() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsPinpointAPNSSandboxChannelUpsert, + Read: resourceAwsPinpointAPNSSandboxChannelRead, + Update: resourceAwsPinpointAPNSSandboxChannelUpsert, + Delete: resourceAwsPinpointAPNSSandboxChannelDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "application_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "bundle_id": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "certificate": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "default_authentication_method": { + Type: schema.TypeString, + Optional: true, + }, + "enabled": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "private_key": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "team_id": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "token_key": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "token_key_id": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + }, + } +} + +func resourceAwsPinpointAPNSSandboxChannelUpsert(d *schema.ResourceData, meta interface{}) error { + certificate, certificateOk := d.GetOk("certificate") + privateKey, privateKeyOk := d.GetOk("private_key") + + bundleId, bundleIdOk := d.GetOk("bundle_id") + teamId, teamIdOk := d.GetOk("team_id") + tokenKey, tokenKeyOk := d.GetOk("token_key") + tokenKeyId, tokenKeyIdOk := d.GetOk("token_key_id") + + if !(certificateOk && privateKeyOk) && !(bundleIdOk && teamIdOk && tokenKeyOk && tokenKeyIdOk) { + return errors.New("At least one set of credentials is required; either [certificate, private_key] or [bundle_id, team_id, token_key, token_key_id]") + } + + conn := meta.(*AWSClient).pinpointconn + + applicationId := d.Get("application_id").(string) + + params := &pinpoint.APNSSandboxChannelRequest{} + + params.DefaultAuthenticationMethod = aws.String(d.Get("default_authentication_method").(string)) + params.Enabled = aws.Bool(d.Get("enabled").(bool)) + + params.Certificate = aws.String(certificate.(string)) + params.PrivateKey = aws.String(privateKey.(string)) + + params.BundleId = aws.String(bundleId.(string)) + params.TeamId = aws.String(teamId.(string)) + params.TokenKey = aws.String(tokenKey.(string)) + params.TokenKeyId = aws.String(tokenKeyId.(string)) + + req := pinpoint.UpdateApnsSandboxChannelInput{ + ApplicationId: aws.String(applicationId), + APNSSandboxChannelRequest: params, + } + + _, err := conn.UpdateApnsSandboxChannel(&req) + if err != nil { + return fmt.Errorf("error updating Pinpoint APNs Sandbox Channel for Application %s: %s", applicationId, err) + } + + d.SetId(applicationId) + + return resourceAwsPinpointAPNSSandboxChannelRead(d, meta) +} + +func resourceAwsPinpointAPNSSandboxChannelRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[INFO] Reading Pinpoint APNs Channel for Application %s", d.Id()) + + output, err := conn.GetApnsSandboxChannel(&pinpoint.GetApnsSandboxChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + log.Printf("[WARN] Pinpoint APNs Sandbox Channel for application %s not found, error code (404)", d.Id()) + d.SetId("") + return nil + } + + return fmt.Errorf("error getting Pinpoint APNs Sandbox Channel for application %s: %s", d.Id(), err) + } + + d.Set("application_id", output.APNSSandboxChannelResponse.ApplicationId) + d.Set("default_authentication_method", output.APNSSandboxChannelResponse.DefaultAuthenticationMethod) + d.Set("enabled", output.APNSSandboxChannelResponse.Enabled) + // Sensitive params are not returned + + return nil +} + +func resourceAwsPinpointAPNSSandboxChannelDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[DEBUG] Deleting Pinpoint APNs Sandbox Channel: %s", d.Id()) + _, err := conn.DeleteApnsSandboxChannel(&pinpoint.DeleteApnsSandboxChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting Pinpoint APNs Sandbox Channel for Application %s: %s", d.Id(), err) + } + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_apns_voip_channel.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_apns_voip_channel.go new file mode 100644 index 0000000000..0663b95be7 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_apns_voip_channel.go @@ -0,0 +1,159 @@ +package aws + +import ( + "errors" + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/pinpoint" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsPinpointAPNSVoipChannel() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsPinpointAPNSVoipChannelUpsert, + Read: resourceAwsPinpointAPNSVoipChannelRead, + Update: resourceAwsPinpointAPNSVoipChannelUpsert, + Delete: resourceAwsPinpointAPNSVoipChannelDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "application_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "bundle_id": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "certificate": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "default_authentication_method": { + Type: schema.TypeString, + Optional: true, + }, + "enabled": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "private_key": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "team_id": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "token_key": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "token_key_id": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + }, + } +} + +func resourceAwsPinpointAPNSVoipChannelUpsert(d *schema.ResourceData, meta interface{}) error { + certificate, certificateOk := d.GetOk("certificate") + privateKey, privateKeyOk := d.GetOk("private_key") + + bundleId, bundleIdOk := d.GetOk("bundle_id") + teamId, teamIdOk := d.GetOk("team_id") + tokenKey, tokenKeyOk := d.GetOk("token_key") + tokenKeyId, tokenKeyIdOk := d.GetOk("token_key_id") + + if !(certificateOk && privateKeyOk) && !(bundleIdOk && teamIdOk && tokenKeyOk && tokenKeyIdOk) { + return errors.New("At least one set of credentials is required; either [certificate, private_key] or [bundle_id, team_id, token_key, token_key_id]") + } + + conn := meta.(*AWSClient).pinpointconn + + applicationId := d.Get("application_id").(string) + + params := &pinpoint.APNSVoipChannelRequest{} + + params.DefaultAuthenticationMethod = aws.String(d.Get("default_authentication_method").(string)) + params.Enabled = aws.Bool(d.Get("enabled").(bool)) + + params.Certificate = aws.String(certificate.(string)) + params.PrivateKey = aws.String(privateKey.(string)) + + params.BundleId = aws.String(bundleId.(string)) + params.TeamId = aws.String(teamId.(string)) + params.TokenKey = aws.String(tokenKey.(string)) + params.TokenKeyId = aws.String(tokenKeyId.(string)) + + req := pinpoint.UpdateApnsVoipChannelInput{ + ApplicationId: aws.String(applicationId), + APNSVoipChannelRequest: params, + } + + _, err := conn.UpdateApnsVoipChannel(&req) + if err != nil { + return fmt.Errorf("error updating Pinpoint APNs Voip Channel for Application %s: %s", applicationId, err) + } + + d.SetId(applicationId) + + return resourceAwsPinpointAPNSVoipChannelRead(d, meta) +} + +func resourceAwsPinpointAPNSVoipChannelRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[INFO] Reading Pinpoint APNs Voip Channel for Application %s", d.Id()) + + output, err := conn.GetApnsVoipChannel(&pinpoint.GetApnsVoipChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + log.Printf("[WARN] Pinpoint APNs Voip Channel for application %s not found, error code (404)", d.Id()) + d.SetId("") + return nil + } + + return fmt.Errorf("error getting Pinpoint APNs Voip Channel for application %s: %s", d.Id(), err) + } + + d.Set("application_id", output.APNSVoipChannelResponse.ApplicationId) + d.Set("default_authentication_method", output.APNSVoipChannelResponse.DefaultAuthenticationMethod) + d.Set("enabled", output.APNSVoipChannelResponse.Enabled) + // Sensitive params are not returned + + return nil +} + +func resourceAwsPinpointAPNSVoipChannelDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[DEBUG] Deleting Pinpoint APNs Voip Channel: %s", d.Id()) + _, err := conn.DeleteApnsVoipChannel(&pinpoint.DeleteApnsVoipChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting Pinpoint APNs Voip Channel for Application %s: %s", d.Id(), err) + } + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_apns_voip_sandbox_channel.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_apns_voip_sandbox_channel.go new file mode 100644 index 0000000000..44a7203a90 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_apns_voip_sandbox_channel.go @@ -0,0 +1,159 @@ +package aws + +import ( + "errors" + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/pinpoint" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsPinpointAPNSVoipSandboxChannel() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsPinpointAPNSVoipSandboxChannelUpsert, + Read: resourceAwsPinpointAPNSVoipSandboxChannelRead, + Update: resourceAwsPinpointAPNSVoipSandboxChannelUpsert, + Delete: resourceAwsPinpointAPNSVoipSandboxChannelDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "application_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "bundle_id": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "certificate": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "default_authentication_method": { + Type: schema.TypeString, + Optional: true, + }, + "enabled": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "private_key": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "team_id": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "token_key": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + "token_key_id": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + }, + }, + } +} + +func resourceAwsPinpointAPNSVoipSandboxChannelUpsert(d *schema.ResourceData, meta interface{}) error { + certificate, certificateOk := d.GetOk("certificate") + privateKey, privateKeyOk := d.GetOk("private_key") + + bundleId, bundleIdOk := d.GetOk("bundle_id") + teamId, teamIdOk := d.GetOk("team_id") + tokenKey, tokenKeyOk := d.GetOk("token_key") + tokenKeyId, tokenKeyIdOk := d.GetOk("token_key_id") + + if !(certificateOk && privateKeyOk) && !(bundleIdOk && teamIdOk && tokenKeyOk && tokenKeyIdOk) { + return errors.New("At least one set of credentials is required; either [certificate, private_key] or [bundle_id, team_id, token_key, token_key_id]") + } + + conn := meta.(*AWSClient).pinpointconn + + applicationId := d.Get("application_id").(string) + + params := &pinpoint.APNSVoipSandboxChannelRequest{} + + params.DefaultAuthenticationMethod = aws.String(d.Get("default_authentication_method").(string)) + params.Enabled = aws.Bool(d.Get("enabled").(bool)) + + params.Certificate = aws.String(certificate.(string)) + params.PrivateKey = aws.String(privateKey.(string)) + + params.BundleId = aws.String(bundleId.(string)) + params.TeamId = aws.String(teamId.(string)) + params.TokenKey = aws.String(tokenKey.(string)) + params.TokenKeyId = aws.String(tokenKeyId.(string)) + + req := pinpoint.UpdateApnsVoipSandboxChannelInput{ + ApplicationId: aws.String(applicationId), + APNSVoipSandboxChannelRequest: params, + } + + _, err := conn.UpdateApnsVoipSandboxChannel(&req) + if err != nil { + return fmt.Errorf("error updating Pinpoint APNs Voip Sandbox Channel for Application %s: %s", applicationId, err) + } + + d.SetId(applicationId) + + return resourceAwsPinpointAPNSVoipSandboxChannelRead(d, meta) +} + +func resourceAwsPinpointAPNSVoipSandboxChannelRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[INFO] Reading Pinpoint APNs Voip Sandbox Channel for Application %s", d.Id()) + + output, err := conn.GetApnsVoipSandboxChannel(&pinpoint.GetApnsVoipSandboxChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + log.Printf("[WARN] Pinpoint APNs Voip Sandbox Channel for application %s not found, error code (404)", d.Id()) + d.SetId("") + return nil + } + + return fmt.Errorf("error getting Pinpoint APNs Voip Sandbox Channel for application %s: %s", d.Id(), err) + } + + d.Set("application_id", output.APNSVoipSandboxChannelResponse.ApplicationId) + d.Set("default_authentication_method", output.APNSVoipSandboxChannelResponse.DefaultAuthenticationMethod) + d.Set("enabled", output.APNSVoipSandboxChannelResponse.Enabled) + // Sensitive params are not returned + + return nil +} + +func resourceAwsPinpointAPNSVoipSandboxChannelDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[DEBUG] Deleting Pinpoint APNs Voip Sandbox Channel: %s", d.Id()) + _, err := conn.DeleteApnsVoipSandboxChannel(&pinpoint.DeleteApnsVoipSandboxChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting Pinpoint APNs Voip Sandbox Channel for Application %s: %s", d.Id(), err) + } + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_app.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_app.go new file mode 100644 index 0000000000..d5bb938d96 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_app.go @@ -0,0 +1,376 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/pinpoint" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceAwsPinpointApp() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsPinpointAppCreate, + Read: resourceAwsPinpointAppRead, + Update: resourceAwsPinpointAppUpdate, + Delete: resourceAwsPinpointAppDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name_prefix"}, + }, + "name_prefix": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "application_id": { + Type: schema.TypeString, + Computed: true, + }, + //"cloudwatch_metrics_enabled": { + // Type: schema.TypeBool, + // Optional: true, + // Default: false, + //}, + "campaign_hook": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if old == "1" && new == "0" { + return true + } + return false + }, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "lambda_function_name": { + Type: schema.TypeString, + Optional: true, + }, + "mode": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{ + pinpoint.ModeDelivery, + pinpoint.ModeFilter, + }, false), + }, + "web_url": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + "limits": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if old == "1" && new == "0" { + return true + } + return false + }, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "daily": { + Type: schema.TypeInt, + Optional: true, + }, + "maximum_duration": { + Type: schema.TypeInt, + Optional: true, + }, + "messages_per_second": { + Type: schema.TypeInt, + Optional: true, + }, + "total": { + Type: schema.TypeInt, + Optional: true, + }, + }, + }, + }, + "quiet_time": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if old == "1" && new == "0" { + return true + } + return false + }, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "end": { + Type: schema.TypeString, + Optional: true, + }, + "start": { + Type: schema.TypeString, + Optional: true, + }, + }, + }, + }, + }, + } +} + +func resourceAwsPinpointAppCreate(d *schema.ResourceData, meta interface{}) error { + pinpointconn := meta.(*AWSClient).pinpointconn + + var name string + if v, ok := d.GetOk("name"); ok { + name = v.(string) + } else if v, ok := d.GetOk("name_prefix"); ok { + name = resource.PrefixedUniqueId(v.(string)) + } else { + name = resource.UniqueId() + } + + log.Printf("[DEBUG] Pinpoint create app: %s", name) + + req := &pinpoint.CreateAppInput{ + CreateApplicationRequest: &pinpoint.CreateApplicationRequest{ + Name: aws.String(name), + }, + } + + output, err := pinpointconn.CreateApp(req) + if err != nil { + return fmt.Errorf("error creating Pinpoint app: %s", err) + } + + d.SetId(*output.ApplicationResponse.Id) + + return resourceAwsPinpointAppUpdate(d, meta) +} + +func resourceAwsPinpointAppUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + appSettings := &pinpoint.WriteApplicationSettingsRequest{} + + //if d.HasChange("cloudwatch_metrics_enabled") { + // appSettings.CloudWatchMetricsEnabled = aws.Bool(d.Get("cloudwatch_metrics_enabled").(bool)); + //} + + if d.HasChange("campaign_hook") { + appSettings.CampaignHook = expandPinpointCampaignHook(d.Get("campaign_hook").([]interface{})) + } + + if d.HasChange("limits") { + appSettings.Limits = expandPinpointCampaignLimits(d.Get("limits").([]interface{})) + } + + if d.HasChange("quiet_time") { + appSettings.QuietTime = expandPinpointQuietTime(d.Get("quiet_time").([]interface{})) + } + + req := pinpoint.UpdateApplicationSettingsInput{ + ApplicationId: aws.String(d.Id()), + WriteApplicationSettingsRequest: appSettings, + } + + _, err := conn.UpdateApplicationSettings(&req) + if err != nil { + return err + } + + return resourceAwsPinpointAppRead(d, meta) +} + +func resourceAwsPinpointAppRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[INFO] Reading Pinpoint App Attributes for %s", d.Id()) + + app, err := conn.GetApp(&pinpoint.GetAppInput{ + ApplicationId: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + log.Printf("[WARN] Pinpoint App (%s) not found, error code (404)", d.Id()) + d.SetId("") + return nil + } + + return err + } + + settings, err := conn.GetApplicationSettings(&pinpoint.GetApplicationSettingsInput{ + ApplicationId: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + log.Printf("[WARN] Pinpoint App (%s) not found, error code (404)", d.Id()) + d.SetId("") + return nil + } + + return err + } + + d.Set("name", app.ApplicationResponse.Name) + d.Set("application_id", app.ApplicationResponse.Id) + + if err := d.Set("campaign_hook", flattenPinpointCampaignHook(settings.ApplicationSettingsResource.CampaignHook)); err != nil { + return fmt.Errorf("error setting campaign_hook: %s", err) + } + if err := d.Set("limits", flattenPinpointCampaignLimits(settings.ApplicationSettingsResource.Limits)); err != nil { + return fmt.Errorf("error setting limits: %s", err) + } + if err := d.Set("quiet_time", flattenPinpointQuietTime(settings.ApplicationSettingsResource.QuietTime)); err != nil { + return fmt.Errorf("error setting quiet_time: %s", err) + } + + return nil +} + +func resourceAwsPinpointAppDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[DEBUG] Pinpoint Delete App: %s", d.Id()) + _, err := conn.DeleteApp(&pinpoint.DeleteAppInput{ + ApplicationId: aws.String(d.Id()), + }) + + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + return nil + } + + if err != nil { + return err + } + return nil +} + +func expandPinpointCampaignHook(configs []interface{}) *pinpoint.CampaignHook { + if configs == nil || len(configs) == 0 { + return nil + } + + m := configs[0].(map[string]interface{}) + + ch := &pinpoint.CampaignHook{} + + if v, ok := m["lambda_function_name"]; ok { + ch.LambdaFunctionName = aws.String(v.(string)) + } + + if v, ok := m["mode"]; ok { + ch.Mode = aws.String(v.(string)) + } + + if v, ok := m["web_url"]; ok { + ch.WebUrl = aws.String(v.(string)) + } + + return ch +} + +func flattenPinpointCampaignHook(ch *pinpoint.CampaignHook) []interface{} { + l := make([]interface{}, 0) + + m := map[string]interface{}{} + + m["lambda_function_name"] = aws.StringValue(ch.LambdaFunctionName) + m["mode"] = aws.StringValue(ch.Mode) + m["web_url"] = aws.StringValue(ch.WebUrl) + + l = append(l, m) + + return l +} + +func expandPinpointCampaignLimits(configs []interface{}) *pinpoint.CampaignLimits { + if configs == nil || len(configs) == 0 { + return nil + } + + m := configs[0].(map[string]interface{}) + + cl := pinpoint.CampaignLimits{} + + if v, ok := m["daily"]; ok { + cl.Daily = aws.Int64(int64(v.(int))) + } + + if v, ok := m["maximum_duration"]; ok { + cl.MaximumDuration = aws.Int64(int64(v.(int))) + } + + if v, ok := m["messages_per_second"]; ok { + cl.MessagesPerSecond = aws.Int64(int64(v.(int))) + } + + if v, ok := m["total"]; ok { + cl.Total = aws.Int64(int64(v.(int))) + } + + return &cl +} + +func flattenPinpointCampaignLimits(cl *pinpoint.CampaignLimits) []interface{} { + l := make([]interface{}, 0) + + m := map[string]interface{}{} + + m["daily"] = aws.Int64Value(cl.Daily) + m["maximum_duration"] = aws.Int64Value(cl.MaximumDuration) + m["messages_per_second"] = aws.Int64Value(cl.MessagesPerSecond) + m["total"] = aws.Int64Value(cl.Total) + + l = append(l, m) + + return l +} + +func expandPinpointQuietTime(configs []interface{}) *pinpoint.QuietTime { + if configs == nil || len(configs) == 0 { + return nil + } + + m := configs[0].(map[string]interface{}) + + qt := pinpoint.QuietTime{} + + if v, ok := m["end"]; ok { + qt.End = aws.String(v.(string)) + } + + if v, ok := m["start"]; ok { + qt.Start = aws.String(v.(string)) + } + + return &qt +} + +func flattenPinpointQuietTime(qt *pinpoint.QuietTime) []interface{} { + l := make([]interface{}, 0) + + m := map[string]interface{}{} + + m["end"] = aws.StringValue(qt.End) + m["start"] = aws.StringValue(qt.Start) + + l = append(l, m) + + return l +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_baidu_channel.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_baidu_channel.go new file mode 100644 index 0000000000..595696b7a4 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_baidu_channel.go @@ -0,0 +1,114 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/pinpoint" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsPinpointBaiduChannel() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsPinpointBaiduChannelUpsert, + Read: resourceAwsPinpointBaiduChannelRead, + Update: resourceAwsPinpointBaiduChannelUpsert, + Delete: resourceAwsPinpointBaiduChannelDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "application_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "enabled": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "api_key": { + Type: schema.TypeString, + Required: true, + Sensitive: true, + }, + "secret_key": { + Type: schema.TypeString, + Required: true, + Sensitive: true, + }, + }, + } +} + +func resourceAwsPinpointBaiduChannelUpsert(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + applicationId := d.Get("application_id").(string) + + params := &pinpoint.BaiduChannelRequest{} + + params.Enabled = aws.Bool(d.Get("enabled").(bool)) + params.ApiKey = aws.String(d.Get("api_key").(string)) + params.SecretKey = aws.String(d.Get("secret_key").(string)) + + req := pinpoint.UpdateBaiduChannelInput{ + ApplicationId: aws.String(applicationId), + BaiduChannelRequest: params, + } + + _, err := conn.UpdateBaiduChannel(&req) + if err != nil { + return fmt.Errorf("error updating Pinpoint Baidu Channel for application %s: %s", applicationId, err) + } + + d.SetId(applicationId) + + return resourceAwsPinpointBaiduChannelRead(d, meta) +} + +func resourceAwsPinpointBaiduChannelRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[INFO] Reading Pinpoint Baidu Channel for application %s", d.Id()) + + output, err := conn.GetBaiduChannel(&pinpoint.GetBaiduChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + log.Printf("[WARN] Pinpoint Baidu Channel for application %s not found, error code (404)", d.Id()) + d.SetId("") + return nil + } + + return fmt.Errorf("error getting Pinpoint Baidu Channel for application %s: %s", d.Id(), err) + } + + d.Set("application_id", output.BaiduChannelResponse.ApplicationId) + d.Set("enabled", output.BaiduChannelResponse.Enabled) + // ApiKey and SecretKey are never returned + + return nil +} + +func resourceAwsPinpointBaiduChannelDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[DEBUG] Deleting Pinpoint Baidu Channel for application %s", d.Id()) + _, err := conn.DeleteBaiduChannel(&pinpoint.DeleteBaiduChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting Pinpoint Baidu Channel for application %s: %s", d.Id(), err) + } + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_email_channel.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_email_channel.go new file mode 100644 index 0000000000..9809556e48 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_email_channel.go @@ -0,0 +1,123 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/pinpoint" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsPinpointEmailChannel() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsPinpointEmailChannelUpsert, + Read: resourceAwsPinpointEmailChannelRead, + Update: resourceAwsPinpointEmailChannelUpsert, + Delete: resourceAwsPinpointEmailChannelDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "application_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "enabled": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "from_address": { + Type: schema.TypeString, + Required: true, + }, + "identity": { + Type: schema.TypeString, + Required: true, + }, + "role_arn": { + Type: schema.TypeString, + Required: true, + }, + "messages_per_second": { + Type: schema.TypeInt, + Computed: true, + }, + }, + } +} + +func resourceAwsPinpointEmailChannelUpsert(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + applicationId := d.Get("application_id").(string) + + params := &pinpoint.EmailChannelRequest{} + + params.Enabled = aws.Bool(d.Get("enabled").(bool)) + params.FromAddress = aws.String(d.Get("from_address").(string)) + params.Identity = aws.String(d.Get("identity").(string)) + params.RoleArn = aws.String(d.Get("role_arn").(string)) + + req := pinpoint.UpdateEmailChannelInput{ + ApplicationId: aws.String(applicationId), + EmailChannelRequest: params, + } + + _, err := conn.UpdateEmailChannel(&req) + if err != nil { + return fmt.Errorf("error updating Pinpoint Email Channel for application %s: %s", applicationId, err) + } + + d.SetId(applicationId) + + return resourceAwsPinpointEmailChannelRead(d, meta) +} + +func resourceAwsPinpointEmailChannelRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[INFO] Reading Pinpoint Email Channel for application %s", d.Id()) + + output, err := conn.GetEmailChannel(&pinpoint.GetEmailChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + log.Printf("[WARN] Pinpoint Email Channel for application %s not found, error code (404)", d.Id()) + d.SetId("") + return nil + } + + return fmt.Errorf("error getting Pinpoint Email Channel for application %s: %s", d.Id(), err) + } + + d.Set("application_id", output.EmailChannelResponse.ApplicationId) + d.Set("enabled", output.EmailChannelResponse.Enabled) + d.Set("from_address", output.EmailChannelResponse.FromAddress) + d.Set("identity", output.EmailChannelResponse.Identity) + d.Set("role_arn", output.EmailChannelResponse.RoleArn) + d.Set("messages_per_second", aws.Int64Value(output.EmailChannelResponse.MessagesPerSecond)) + return nil +} + +func resourceAwsPinpointEmailChannelDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[DEBUG] Deleting Pinpoint Email Channel for application %s", d.Id()) + _, err := conn.DeleteEmailChannel(&pinpoint.DeleteEmailChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting Pinpoint Email Channel for application %s: %s", d.Id(), err) + } + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_event_stream.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_event_stream.go new file mode 100644 index 0000000000..f5fa4f33a0 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_event_stream.go @@ -0,0 +1,106 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/pinpoint" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsPinpointEventStream() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsPinpointEventStreamUpsert, + Read: resourceAwsPinpointEventStreamRead, + Update: resourceAwsPinpointEventStreamUpsert, + Delete: resourceAwsPinpointEventStreamDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "application_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "destination_stream_arn": { + Type: schema.TypeString, + Required: true, + }, + "role_arn": { + Type: schema.TypeString, + Required: true, + }, + }, + } +} + +func resourceAwsPinpointEventStreamUpsert(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + applicationId := d.Get("application_id").(string) + + params := &pinpoint.WriteEventStream{} + + params.DestinationStreamArn = aws.String(d.Get("destination_stream_arn").(string)) + params.RoleArn = aws.String(d.Get("role_arn").(string)) + + req := pinpoint.PutEventStreamInput{ + ApplicationId: aws.String(applicationId), + WriteEventStream: params, + } + + _, err := conn.PutEventStream(&req) + if err != nil { + return fmt.Errorf("error putting Pinpoint Event Stream for application %s: %s", applicationId, err) + } + + d.SetId(applicationId) + + return resourceAwsPinpointEventStreamRead(d, meta) +} + +func resourceAwsPinpointEventStreamRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[INFO] Reading Pinpoint Event Stream for application %s", d.Id()) + + output, err := conn.GetEventStream(&pinpoint.GetEventStreamInput{ + ApplicationId: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + log.Printf("[WARN] Pinpoint Event Stream for application %s not found, error code (404)", d.Id()) + d.SetId("") + return nil + } + + return fmt.Errorf("error getting Pinpoint Event Stream for application %s: %s", d.Id(), err) + } + + d.Set("application_id", output.EventStream.ApplicationId) + d.Set("destination_stream_arn", output.EventStream.DestinationStreamArn) + d.Set("role_arn", output.EventStream.RoleArn) + + return nil +} + +func resourceAwsPinpointEventStreamDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[DEBUG] Pinpoint Delete Event Stream: %s", d.Id()) + _, err := conn.DeleteEventStream(&pinpoint.DeleteEventStreamInput{ + ApplicationId: aws.String(d.Id()), + }) + + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting Pinpoint Event Stream for application %s: %s", d.Id(), err) + } + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_gcm_channel.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_gcm_channel.go new file mode 100644 index 0000000000..4b7232600f --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_gcm_channel.go @@ -0,0 +1,108 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/pinpoint" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsPinpointGCMChannel() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsPinpointGCMChannelUpsert, + Read: resourceAwsPinpointGCMChannelRead, + Update: resourceAwsPinpointGCMChannelUpsert, + Delete: resourceAwsPinpointGCMChannelDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "application_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "api_key": { + Type: schema.TypeString, + Required: true, + Sensitive: true, + }, + "enabled": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + }, + } +} + +func resourceAwsPinpointGCMChannelUpsert(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + applicationId := d.Get("application_id").(string) + + params := &pinpoint.GCMChannelRequest{} + + params.ApiKey = aws.String(d.Get("api_key").(string)) + params.Enabled = aws.Bool(d.Get("enabled").(bool)) + + req := pinpoint.UpdateGcmChannelInput{ + ApplicationId: aws.String(applicationId), + GCMChannelRequest: params, + } + + _, err := conn.UpdateGcmChannel(&req) + if err != nil { + return fmt.Errorf("error putting Pinpoint GCM Channel for application %s: %s", applicationId, err) + } + + d.SetId(applicationId) + + return resourceAwsPinpointGCMChannelRead(d, meta) +} + +func resourceAwsPinpointGCMChannelRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[INFO] Reading Pinpoint GCM Channel for application %s", d.Id()) + + output, err := conn.GetGcmChannel(&pinpoint.GetGcmChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + log.Printf("[WARN] Pinpoint GCM Channel for application %s not found, error code (404)", d.Id()) + d.SetId("") + return nil + } + + return fmt.Errorf("error getting Pinpoint GCM Channel for application %s: %s", d.Id(), err) + } + + d.Set("application_id", output.GCMChannelResponse.ApplicationId) + d.Set("enabled", output.GCMChannelResponse.Enabled) + // api_key is never returned + + return nil +} + +func resourceAwsPinpointGCMChannelDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[DEBUG] Deleting Pinpoint GCM Channel for application %s", d.Id()) + _, err := conn.DeleteGcmChannel(&pinpoint.DeleteGcmChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting Pinpoint GCM Channel for application %s: %s", d.Id(), err) + } + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_sms_channel.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_sms_channel.go new file mode 100644 index 0000000000..659d852cb3 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_pinpoint_sms_channel.go @@ -0,0 +1,128 @@ +package aws + +import ( + "fmt" + "log" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/pinpoint" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsPinpointSMSChannel() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsPinpointSMSChannelUpsert, + Read: resourceAwsPinpointSMSChannelRead, + Update: resourceAwsPinpointSMSChannelUpsert, + Delete: resourceAwsPinpointSMSChannelDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "application_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "enabled": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "sender_id": { + Type: schema.TypeString, + Optional: true, + }, + "short_code": { + Type: schema.TypeString, + Optional: true, + }, + "promotional_messages_per_second": { + Type: schema.TypeInt, + Computed: true, + }, + "transactional_messages_per_second": { + Type: schema.TypeInt, + Computed: true, + }, + }, + } +} + +func resourceAwsPinpointSMSChannelUpsert(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + applicationId := d.Get("application_id").(string) + + params := &pinpoint.SMSChannelRequest{} + + params.Enabled = aws.Bool(d.Get("enabled").(bool)) + + if d.HasChange("sender_id") { + params.SenderId = aws.String(d.Get("sender_id").(string)) + } + + if d.HasChange("short_code") { + params.ShortCode = aws.String(d.Get("short_code").(string)) + } + + req := pinpoint.UpdateSmsChannelInput{ + ApplicationId: aws.String(applicationId), + SMSChannelRequest: params, + } + + _, err := conn.UpdateSmsChannel(&req) + if err != nil { + return fmt.Errorf("error putting Pinpoint SMS Channel for application %s: %s", applicationId, err) + } + + d.SetId(applicationId) + + return resourceAwsPinpointSMSChannelRead(d, meta) +} + +func resourceAwsPinpointSMSChannelRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[INFO] Reading Pinpoint SMS Channel for application %s", d.Id()) + + output, err := conn.GetSmsChannel(&pinpoint.GetSmsChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + if err != nil { + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + log.Printf("[WARN] Pinpoint SMS Channel for application %s not found, error code (404)", d.Id()) + d.SetId("") + return nil + } + + return fmt.Errorf("error getting Pinpoint SMS Channel for application %s: %s", d.Id(), err) + } + + d.Set("application_id", output.SMSChannelResponse.ApplicationId) + d.Set("enabled", output.SMSChannelResponse.Enabled) + d.Set("sender_id", output.SMSChannelResponse.SenderId) + d.Set("short_code", output.SMSChannelResponse.ShortCode) + d.Set("promotional_messages_per_second", aws.Int64Value(output.SMSChannelResponse.PromotionalMessagesPerSecond)) + d.Set("transactional_messages_per_second", aws.Int64Value(output.SMSChannelResponse.TransactionalMessagesPerSecond)) + return nil +} + +func resourceAwsPinpointSMSChannelDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).pinpointconn + + log.Printf("[DEBUG] Deleting Pinpoint SMS Channel for application %s", d.Id()) + _, err := conn.DeleteSmsChannel(&pinpoint.DeleteSmsChannelInput{ + ApplicationId: aws.String(d.Id()), + }) + + if isAWSErr(err, pinpoint.ErrCodeNotFoundException, "") { + return nil + } + + if err != nil { + return fmt.Errorf("error deleting Pinpoint SMS Channel for application %s: %s", d.Id(), err) + } + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_proxy_protocol_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_proxy_protocol_policy.go index 5f14be6953..094bfbc5b1 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_proxy_protocol_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_proxy_protocol_policy.go @@ -117,7 +117,7 @@ func resourceAwsProxyProtocolPolicyUpdate(d *schema.ResourceData, meta interface } backends := flattenBackendPolicies(resp.LoadBalancerDescriptions[0].BackendServerDescriptions) - _, policyName := resourceAwsProxyProtocolPolicyParseId(d.Id()) + policyName := resourceAwsProxyProtocolPolicyParseId(d.Id()) d.Partial(true) if d.HasChange("instance_ports") { @@ -173,7 +173,7 @@ func resourceAwsProxyProtocolPolicyDelete(d *schema.ResourceData, meta interface backends := flattenBackendPolicies(resp.LoadBalancerDescriptions[0].BackendServerDescriptions) ports := d.Get("instance_ports").(*schema.Set).List() - _, policyName := resourceAwsProxyProtocolPolicyParseId(d.Id()) + policyName := resourceAwsProxyProtocolPolicyParseId(d.Id()) inputs, err := resourceAwsProxyProtocolPolicyRemove(policyName, ports, backends) if err != nil { @@ -259,7 +259,8 @@ func resourceAwsProxyProtocolPolicyAdd(policyName string, ports []interface{}, b // resourceAwsProxyProtocolPolicyParseId takes an ID and parses it into // it's constituent parts. You need two axes (LB name, policy name) // to create or identify a proxy protocol policy in AWS's API. -func resourceAwsProxyProtocolPolicyParseId(id string) (string, string) { +func resourceAwsProxyProtocolPolicyParseId(id string) string { parts := strings.SplitN(id, ":", 2) - return parts[0], parts[1] + // We currently omit the ELB name as it is not currently used anywhere + return parts[1] } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster.go index 81f5f0db4f..2f46a87272 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster.go @@ -8,7 +8,6 @@ import ( "time" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/rds" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -97,6 +96,11 @@ func resourceAwsRDSCluster() *schema.Resource { Computed: true, }, + "deletion_protection": { + Type: schema.TypeBool, + Optional: true, + }, + "endpoint": { Type: schema.TypeString, Computed: true, @@ -126,6 +130,7 @@ func resourceAwsRDSCluster() *schema.Resource { ForceNew: true, Default: "provisioned", ValidateFunc: validation.StringInSlice([]string{ + "parallelquery", "provisioned", "serverless", }, false), @@ -134,7 +139,6 @@ func resourceAwsRDSCluster() *schema.Resource { "engine_version": { Type: schema.TypeString, Optional: true, - ForceNew: true, Computed: true, }, @@ -396,22 +400,29 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error conn := meta.(*AWSClient).rdsconn tags := tagsFromMapRDS(d.Get("tags").(map[string]interface{})) + // Some API calls (e.g. RestoreDBClusterFromSnapshot do not support all + // parameters to correctly apply all settings in one pass. For missing + // parameters or unsupported configurations, we may need to call + // ModifyDBInstance afterwards to prevent Terraform operators from API + // errors or needing to double apply. + var requiresModifyDbCluster bool + modifyDbClusterInput := &rds.ModifyDBClusterInput{ + ApplyImmediately: aws.Bool(true), + } + var identifier string if v, ok := d.GetOk("cluster_identifier"); ok { identifier = v.(string) + } else if v, ok := d.GetOk("cluster_identifier_prefix"); ok { + identifier = resource.PrefixedUniqueId(v.(string)) } else { - if v, ok := d.GetOk("cluster_identifier_prefix"); ok { - identifier = resource.PrefixedUniqueId(v.(string)) - } else { - identifier = resource.PrefixedUniqueId("tf-") - } - - d.Set("cluster_identifier", identifier) + identifier = resource.PrefixedUniqueId("tf-") } if _, ok := d.GetOk("snapshot_identifier"); ok { opts := rds.RestoreDBClusterFromSnapshotInput{ - DBClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)), + DBClusterIdentifier: aws.String(identifier), + DeletionProtection: aws.Bool(d.Get("deletion_protection").(bool)), Engine: aws.String(d.Get("engine").(string)), EngineMode: aws.String(d.Get("engine_mode").(string)), ScalingConfiguration: expandRdsScalingConfiguration(d.Get("scaling_configuration").([]interface{})), @@ -419,26 +430,43 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error Tags: tags, } + if attr := d.Get("availability_zones").(*schema.Set); attr.Len() > 0 { + opts.AvailabilityZones = expandStringList(attr.List()) + } + // Need to check value > 0 due to: // InvalidParameterValue: Backtrack is not enabled for the aurora-postgresql engine. if v, ok := d.GetOk("backtrack_window"); ok && v.(int) > 0 { opts.BacktrackWindow = aws.Int64(int64(v.(int))) } - if attr, ok := d.GetOk("engine_version"); ok { - opts.EngineVersion = aws.String(attr.(string)) + if attr, ok := d.GetOk("backup_retention_period"); ok { + modifyDbClusterInput.BackupRetentionPeriod = aws.Int64(int64(attr.(int))) + requiresModifyDbCluster = true } - if attr := d.Get("availability_zones").(*schema.Set); attr.Len() > 0 { - opts.AvailabilityZones = expandStringList(attr.List()) + if attr, ok := d.GetOk("database_name"); ok { + opts.DatabaseName = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("db_cluster_parameter_group_name"); ok { + opts.DBClusterParameterGroupName = aws.String(attr.(string)) } if attr, ok := d.GetOk("db_subnet_group_name"); ok { opts.DBSubnetGroupName = aws.String(attr.(string)) } - if attr, ok := d.GetOk("database_name"); ok { - opts.DatabaseName = aws.String(attr.(string)) + if attr, ok := d.GetOk("enabled_cloudwatch_logs_exports"); ok && len(attr.([]interface{})) > 0 { + opts.EnableCloudwatchLogsExports = expandStringList(attr.([]interface{})) + } + + if attr, ok := d.GetOk("engine_version"); ok { + opts.EngineVersion = aws.String(attr.(string)) + } + + if attr, ok := d.GetOk("kms_key_id"); ok { + opts.KmsKeyId = aws.String(attr.(string)) } if attr, ok := d.GetOk("option_group_name"); ok { @@ -449,23 +477,18 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error opts.Port = aws.Int64(int64(attr.(int))) } - if attr, ok := d.GetOk("enabled_cloudwatch_logs_exports"); ok && len(attr.([]interface{})) > 0 { - opts.EnableCloudwatchLogsExports = expandStringList(attr.([]interface{})) - } - - // Check if any of the parameters that require a cluster modification after creation are set - var clusterUpdate bool - if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { - clusterUpdate = true - opts.VpcSecurityGroupIds = expandStringList(attr.List()) + if attr, ok := d.GetOk("preferred_backup_window"); ok { + modifyDbClusterInput.PreferredBackupWindow = aws.String(attr.(string)) + requiresModifyDbCluster = true } - if _, ok := d.GetOk("db_cluster_parameter_group_name"); ok { - clusterUpdate = true + if attr, ok := d.GetOk("preferred_maintenance_window"); ok { + modifyDbClusterInput.PreferredMaintenanceWindow = aws.String(attr.(string)) + requiresModifyDbCluster = true } - if _, ok := d.GetOk("backup_retention_period"); ok { - clusterUpdate = true + if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { + opts.VpcSecurityGroupIds = expandStringList(attr.List()) } log.Printf("[DEBUG] RDS Cluster restore from snapshot configuration: %s", opts) @@ -482,40 +505,10 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error if err != nil { return fmt.Errorf("Error creating RDS Cluster: %s", err) } - - if clusterUpdate { - log.Printf("[INFO] RDS Cluster is restoring from snapshot with default db_cluster_parameter_group_name, backup_retention_period and vpc_security_group_ids" + - "but custom values should be set, will now update after snapshot is restored!") - - d.SetId(d.Get("cluster_identifier").(string)) - - log.Printf("[INFO] RDS Cluster ID: %s", d.Id()) - - log.Println("[INFO] Waiting for RDS Cluster to be available") - - stateConf := &resource.StateChangeConf{ - Pending: resourceAwsRdsClusterCreatePendingStates, - Target: []string{"available"}, - Refresh: resourceAwsRDSClusterStateRefreshFunc(d, meta), - Timeout: d.Timeout(schema.TimeoutCreate), - MinTimeout: 10 * time.Second, - Delay: 30 * time.Second, - } - - // Wait, catching any errors - _, err := stateConf.WaitForState() - if err != nil { - return err - } - - err = resourceAwsRDSClusterUpdate(d, meta) - if err != nil { - return err - } - } } else if _, ok := d.GetOk("replication_source_identifier"); ok { createOpts := &rds.CreateDBClusterInput{ - DBClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)), + DBClusterIdentifier: aws.String(identifier), + DeletionProtection: aws.Bool(d.Get("deletion_protection").(bool)), Engine: aws.String(d.Get("engine").(string)), EngineMode: aws.String(d.Get("engine_mode").(string)), ReplicationSourceIdentifier: aws.String(d.Get("replication_source_identifier").(string)), @@ -609,7 +602,8 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error } s3_bucket := v.([]interface{})[0].(map[string]interface{}) createOpts := &rds.RestoreDBClusterFromS3Input{ - DBClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)), + DBClusterIdentifier: aws.String(identifier), + DeletionProtection: aws.Bool(d.Get("deletion_protection").(bool)), Engine: aws.String(d.Get("engine").(string)), MasterUsername: aws.String(d.Get("master_username").(string)), MasterUserPassword: aws.String(d.Get("master_password").(string)), @@ -720,7 +714,8 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error } createOpts := &rds.CreateDBClusterInput{ - DBClusterIdentifier: aws.String(d.Get("cluster_identifier").(string)), + DBClusterIdentifier: aws.String(identifier), + DeletionProtection: aws.Bool(d.Get("deletion_protection").(bool)), Engine: aws.String(d.Get("engine").(string)), EngineMode: aws.String(d.Get("engine_mode").(string)), MasterUserPassword: aws.String(d.Get("master_password").(string)), @@ -815,7 +810,7 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error log.Printf("[DEBUG]: RDS Cluster create response: %s", resp) } - d.SetId(d.Get("cluster_identifier").(string)) + d.SetId(identifier) log.Printf("[INFO] RDS Cluster ID: %s", d.Id()) @@ -825,7 +820,7 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error stateConf := &resource.StateChangeConf{ Pending: resourceAwsRdsClusterCreatePendingStates, Target: []string{"available"}, - Refresh: resourceAwsRDSClusterStateRefreshFunc(d, meta), + Refresh: resourceAwsRDSClusterStateRefreshFunc(conn, d.Id()), Timeout: d.Timeout(schema.TimeoutCreate), MinTimeout: 10 * time.Second, Delay: 30 * time.Second, @@ -834,7 +829,7 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error // Wait, catching any errors _, err := stateConf.WaitForState() if err != nil { - return fmt.Errorf("[WARN] Error waiting for RDS Cluster state to be \"available\": %s", err) + return fmt.Errorf("Error waiting for RDS Cluster state to be \"available\": %s", err) } if v, ok := d.GetOk("iam_roles"); ok { @@ -846,6 +841,22 @@ func resourceAwsRDSClusterCreate(d *schema.ResourceData, meta interface{}) error } } + if requiresModifyDbCluster { + modifyDbClusterInput.DBClusterIdentifier = aws.String(d.Id()) + + log.Printf("[INFO] RDS Cluster (%s) configuration requires ModifyDBCluster: %s", d.Id(), modifyDbClusterInput) + _, err := conn.ModifyDBCluster(modifyDbClusterInput) + if err != nil { + return fmt.Errorf("error modifying RDS Cluster (%s): %s", d.Id(), err) + } + + log.Printf("[INFO] Waiting for RDS Cluster (%s) to be available", d.Id()) + err = waitForRDSClusterUpdate(conn, d.Id(), d.Timeout(schema.TimeoutCreate)) + if err != nil { + return fmt.Errorf("error waiting for RDS Cluster (%s) to be available: %s", d.Id(), err) + } + } + return resourceAwsRDSClusterRead(d, meta) } @@ -916,6 +927,7 @@ func resourceAwsRDSClusterRead(d *schema.ResourceData, meta interface{}) error { d.Set("db_cluster_parameter_group_name", dbc.DBClusterParameterGroup) d.Set("db_subnet_group_name", dbc.DBSubnetGroup) + d.Set("deletion_protection", dbc.DeletionProtection) if err := d.Set("enabled_cloudwatch_logs_exports", aws.StringValueSlice(dbc.EnabledCloudwatchLogsExports)); err != nil { return fmt.Errorf("error setting enabled_cloudwatch_logs_exports: %s", err) @@ -985,6 +997,11 @@ func resourceAwsRDSClusterUpdate(d *schema.ResourceData, meta interface{}) error requestUpdate = true } + if d.HasChange("engine_version") { + req.EngineVersion = aws.String(d.Get("engine_version").(string)) + requestUpdate = true + } + if d.HasChange("vpc_security_group_ids") { if attr := d.Get("vpc_security_group_ids").(*schema.Set); attr.Len() > 0 { req.VpcSecurityGroupIds = expandStringList(attr.List()) @@ -1015,18 +1032,23 @@ func resourceAwsRDSClusterUpdate(d *schema.ResourceData, meta interface{}) error requestUpdate = true } + if d.HasChange("deletion_protection") { + req.DeletionProtection = aws.Bool(d.Get("deletion_protection").(bool)) + requestUpdate = true + } + if d.HasChange("iam_database_authentication_enabled") { req.EnableIAMDatabaseAuthentication = aws.Bool(d.Get("iam_database_authentication_enabled").(bool)) requestUpdate = true } - if d.HasChange("enabled_cloudwatch_logs_exports") && !d.IsNewResource() { + if d.HasChange("enabled_cloudwatch_logs_exports") { d.SetPartial("enabled_cloudwatch_logs_exports") req.CloudwatchLogsExportConfiguration = buildCloudwatchLogsExportConfiguration(d) requestUpdate = true } - if d.HasChange("scaling_configuration") && !d.IsNewResource() { + if d.HasChange("scaling_configuration") { d.SetPartial("scaling_configuration") req.ScalingConfiguration = expandRdsScalingConfiguration(d.Get("scaling_configuration").([]interface{})) requestUpdate = true @@ -1039,6 +1061,11 @@ func resourceAwsRDSClusterUpdate(d *schema.ResourceData, meta interface{}) error if isAWSErr(err, "InvalidParameterValue", "IAM role ARN value is invalid or does not include the required permissions") { return resource.RetryableError(err) } + + if isAWSErr(err, rds.ErrCodeInvalidDBClusterStateFault, "Cannot modify engine version without a primary instance in DB cluster") { + return resource.NonRetryableError(err) + } + if isAWSErr(err, rds.ErrCodeInvalidDBClusterStateFault, "") { return resource.RetryableError(err) } @@ -1050,19 +1077,10 @@ func resourceAwsRDSClusterUpdate(d *schema.ResourceData, meta interface{}) error return fmt.Errorf("Failed to modify RDS Cluster (%s): %s", d.Id(), err) } - stateConf := &resource.StateChangeConf{ - Pending: resourceAwsRdsClusterUpdatePendingStates, - Target: []string{"available"}, - Refresh: resourceAwsRDSClusterStateRefreshFunc(d, meta), - Timeout: d.Timeout(schema.TimeoutUpdate), - MinTimeout: 10 * time.Second, - Delay: 10 * time.Second, - } - - log.Printf("[INFO] Waiting for RDS Cluster (%s) to modify", d.Id()) - _, err = stateConf.WaitForState() + log.Printf("[INFO] Waiting for RDS Cluster (%s) to be available", d.Id()) + err = waitForRDSClusterUpdate(conn, d.Id(), d.Timeout(schema.TimeoutUpdate)) if err != nil { - return fmt.Errorf("error waiting for RDS Cluster (%s) to modify: %s", d.Id(), err) + return fmt.Errorf("error waiting for RDS Cluster (%s) to be available: %s", d.Id(), err) } } @@ -1095,8 +1113,7 @@ func resourceAwsRDSClusterUpdate(d *schema.ResourceData, meta interface{}) error } } - // Tags are set on creation - if !d.IsNewResource() && d.HasChange("tags") { + if d.HasChange("tags") { if err := setTagsRDS(conn, d, d.Get("arn").(string)); err != nil { return err } else { @@ -1148,7 +1165,7 @@ func resourceAwsRDSClusterDelete(d *schema.ResourceData, meta interface{}) error stateConf := &resource.StateChangeConf{ Pending: resourceAwsRdsClusterDeletePendingStates, Target: []string{"destroyed"}, - Refresh: resourceAwsRDSClusterStateRefreshFunc(d, meta), + Refresh: resourceAwsRDSClusterStateRefreshFunc(conn, d.Id()), Timeout: d.Timeout(schema.TimeoutDelete), MinTimeout: 10 * time.Second, Delay: 30 * time.Second, @@ -1157,35 +1174,30 @@ func resourceAwsRDSClusterDelete(d *schema.ResourceData, meta interface{}) error // Wait, catching any errors _, err = stateConf.WaitForState() if err != nil { - return fmt.Errorf("[WARN] Error deleting RDS Cluster (%s): %s", d.Id(), err) + return fmt.Errorf("Error deleting RDS Cluster (%s): %s", d.Id(), err) } return nil } -func resourceAwsRDSClusterStateRefreshFunc( - d *schema.ResourceData, meta interface{}) resource.StateRefreshFunc { +func resourceAwsRDSClusterStateRefreshFunc(conn *rds.RDS, dbClusterIdentifier string) resource.StateRefreshFunc { return func() (interface{}, string, error) { - conn := meta.(*AWSClient).rdsconn - resp, err := conn.DescribeDBClusters(&rds.DescribeDBClustersInput{ - DBClusterIdentifier: aws.String(d.Id()), + DBClusterIdentifier: aws.String(dbClusterIdentifier), }) + if isAWSErr(err, rds.ErrCodeDBClusterNotFoundFault, "") { + return 42, "destroyed", nil + } + if err != nil { - if awsErr, ok := err.(awserr.Error); ok { - if "DBClusterNotFoundFault" == awsErr.Code() { - return 42, "destroyed", nil - } - } - log.Printf("[WARN] Error on retrieving DB Cluster (%s) when waiting: %s", d.Id(), err) return nil, "", err } var dbc *rds.DBCluster for _, c := range resp.DBClusters { - if *c.DBClusterIdentifier == d.Id() { + if *c.DBClusterIdentifier == dbClusterIdentifier { dbc = c } } @@ -1195,10 +1207,10 @@ func resourceAwsRDSClusterStateRefreshFunc( } if dbc.Status != nil { - log.Printf("[DEBUG] DB Cluster status (%s): %s", d.Id(), *dbc.Status) + log.Printf("[DEBUG] DB Cluster status (%s): %s", dbClusterIdentifier, *dbc.Status) } - return dbc, *dbc.Status, nil + return dbc, aws.StringValue(dbc.Status), nil } } @@ -1248,4 +1260,18 @@ var resourceAwsRdsClusterUpdatePendingStates = []string{ "backing-up", "modifying", "resetting-master-credentials", + "upgrading", +} + +func waitForRDSClusterUpdate(conn *rds.RDS, id string, timeout time.Duration) error { + stateConf := &resource.StateChangeConf{ + Pending: resourceAwsRdsClusterUpdatePendingStates, + Target: []string{"available"}, + Refresh: resourceAwsRDSClusterStateRefreshFunc(conn, id), + Timeout: timeout, + MinTimeout: 10 * time.Second, + Delay: 30 * time.Second, // Wait 30 secs before starting + } + _, err := stateConf.WaitForState() + return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_instance.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_instance.go index 70ad3d3daf..d39581effb 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_instance.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_instance.go @@ -313,7 +313,7 @@ func resourceAwsRDSClusterInstanceRead(d *schema.ResourceData, meta interface{}) db, err := resourceAwsDbInstanceRetrieve(d.Id(), meta.(*AWSClient).rdsconn) // Errors from this helper are always reportable if err != nil { - return fmt.Errorf("[WARN] Error on retrieving RDS Cluster Instance (%s): %s", d.Id(), err) + return fmt.Errorf("Error on retrieving RDS Cluster Instance (%s): %s", d.Id(), err) } // A nil response means "not found" if db == nil { @@ -340,7 +340,7 @@ func resourceAwsRDSClusterInstanceRead(d *schema.ResourceData, meta interface{}) } if dbc == nil { - return fmt.Errorf("[WARN] Error finding RDS Cluster (%s) for Cluster Instance (%s): %s", + return fmt.Errorf("Error finding RDS Cluster (%s) for Cluster Instance (%s): %s", *db.DBClusterIdentifier, *db.DBInstanceIdentifier, err) } @@ -467,6 +467,12 @@ func resourceAwsRDSClusterInstanceUpdate(d *schema.ResourceData, meta interface{ requestUpdate = true } + if d.HasChange("publicly_accessible") { + d.SetPartial("publicly_accessible") + req.PubliclyAccessible = aws.Bool(d.Get("publicly_accessible").(bool)) + requestUpdate = true + } + log.Printf("[DEBUG] Send DB Instance Modification request: %#v", requestUpdate) if requestUpdate { log.Printf("[DEBUG] DB Instance Modification request: %#v", req) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_parameter_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_parameter_group.go index 577a5b6f4b..358abc5e0b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_parameter_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_rds_cluster_parameter_group.go @@ -75,14 +75,6 @@ func resourceAwsRDSClusterParameterGroup() *schema.Resource { Type: schema.TypeString, Optional: true, Default: "immediate", - // this parameter is not actually state, but a - // meta-parameter describing how the RDS API call - // to modify the parameter group should be made. - // Future reads of the resource from AWS don't tell - // us what we used for apply_method previously, so - // by squashing state to an empty string we avoid - // needing to do an update for every future run. - StateFunc: func(interface{}) string { return "" }, }, }, }, @@ -214,7 +206,7 @@ func resourceAwsRDSClusterParameterGroupUpdate(d *schema.ResourceData, meta inte // We can only modify 20 parameters at a time, so walk them until // we've got them all. for parameters != nil { - paramsToModify := make([]*rds.Parameter, 0) + var paramsToModify []*rds.Parameter if len(parameters) <= rdsClusterParameterGroupMaxParamsBulkEdit { paramsToModify, parameters = parameters[:], nil } else { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_cluster.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_cluster.go index 54123514d8..285849cc25 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_cluster.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_cluster.go @@ -491,7 +491,7 @@ func resourceAwsRedshiftClusterCreate(d *schema.ResourceData, meta interface{}) _, err := stateConf.WaitForState() if err != nil { - return fmt.Errorf("[WARN] Error waiting for Redshift Cluster state to be \"available\": %s", err) + return fmt.Errorf("Error waiting for Redshift Cluster state to be \"available\": %s", err) } if v, ok := d.GetOk("snapshot_copy"); ok { @@ -591,7 +591,7 @@ func resourceAwsRedshiftClusterRead(d *schema.ResourceData, meta interface{}) er vpcg = append(vpcg, *g.VpcSecurityGroupId) } if err := d.Set("vpc_security_group_ids", vpcg); err != nil { - return fmt.Errorf("[DEBUG] Error saving VPC Security Group IDs to state for Redshift Cluster (%s): %s", d.Id(), err) + return fmt.Errorf("Error saving VPC Security Group IDs to state for Redshift Cluster (%s): %s", d.Id(), err) } var csg []string @@ -599,7 +599,7 @@ func resourceAwsRedshiftClusterRead(d *schema.ResourceData, meta interface{}) er csg = append(csg, *g.ClusterSecurityGroupName) } if err := d.Set("cluster_security_groups", csg); err != nil { - return fmt.Errorf("[DEBUG] Error saving Cluster Security Group Names to state for Redshift Cluster (%s): %s", d.Id(), err) + return fmt.Errorf("Error saving Cluster Security Group Names to state for Redshift Cluster (%s): %s", d.Id(), err) } var iamRoles []string @@ -607,7 +607,7 @@ func resourceAwsRedshiftClusterRead(d *schema.ResourceData, meta interface{}) er iamRoles = append(iamRoles, *i.IamRoleArn) } if err := d.Set("iam_roles", iamRoles); err != nil { - return fmt.Errorf("[DEBUG] Error saving IAM Roles to state for Redshift Cluster (%s): %s", d.Id(), err) + return fmt.Errorf("Error saving IAM Roles to state for Redshift Cluster (%s): %s", d.Id(), err) } d.Set("cluster_public_key", rsc.ClusterPublicKey) @@ -718,7 +718,7 @@ func resourceAwsRedshiftClusterUpdate(d *schema.ResourceData, meta interface{}) log.Printf("[DEBUG] Redshift Cluster Modify options: %s", req) _, err := conn.ModifyCluster(req) if err != nil { - return fmt.Errorf("[WARN] Error modifying Redshift Cluster (%s): %s", d.Id(), err) + return fmt.Errorf("Error modifying Redshift Cluster (%s): %s", d.Id(), err) } } @@ -748,7 +748,7 @@ func resourceAwsRedshiftClusterUpdate(d *schema.ResourceData, meta interface{}) log.Printf("[DEBUG] Redshift Cluster Modify IAM Role options: %s", req) _, err := conn.ModifyClusterIamRoles(req) if err != nil { - return fmt.Errorf("[WARN] Error modifying Redshift Cluster IAM Roles (%s): %s", d.Id(), err) + return fmt.Errorf("Error modifying Redshift Cluster IAM Roles (%s): %s", d.Id(), err) } d.SetPartial("iam_roles") @@ -767,7 +767,7 @@ func resourceAwsRedshiftClusterUpdate(d *schema.ResourceData, meta interface{}) // Wait, catching any errors _, err := stateConf.WaitForState() if err != nil { - return fmt.Errorf("[WARN] Error Modifying Redshift Cluster (%s): %s", d.Id(), err) + return fmt.Errorf("Error Modifying Redshift Cluster (%s): %s", d.Id(), err) } } @@ -787,31 +787,38 @@ func resourceAwsRedshiftClusterUpdate(d *schema.ResourceData, meta interface{}) } } - deprecatedHasChange := (d.HasChange("enable_logging") || d.HasChange("bucket_name") || d.HasChange("s3_key_prefix")) - if d.HasChange("logging") || deprecatedHasChange { - var loggingErr error - - logging, ok := d.GetOk("logging.0.enable") - _, deprecatedOk := d.GetOk("enable_logging") - - if (ok && logging.(bool)) || deprecatedOk { + if d.HasChange("logging") { + if loggingEnabled, ok := d.GetOk("logging.0.enable"); ok && loggingEnabled.(bool) { log.Printf("[INFO] Enabling Logging for Redshift Cluster %q", d.Id()) - loggingErr = enableRedshiftClusterLogging(d, conn) - if loggingErr != nil { - return loggingErr + err := enableRedshiftClusterLogging(d, conn) + if err != nil { + return err } } else { log.Printf("[INFO] Disabling Logging for Redshift Cluster %q", d.Id()) - _, loggingErr = conn.DisableLogging(&redshift.DisableLoggingInput{ + _, err := conn.DisableLogging(&redshift.DisableLoggingInput{ ClusterIdentifier: aws.String(d.Id()), }) - if loggingErr != nil { - return loggingErr + if err != nil { + return err + } + } + } else if d.HasChange("enable_logging") || d.HasChange("bucket_name") || d.HasChange("s3_key_prefix") { + if enableLogging, ok := d.GetOk("enable_logging"); ok && enableLogging.(bool) { + log.Printf("[INFO] Enabling Logging for Redshift Cluster %q", d.Id()) + err := enableRedshiftClusterLogging(d, conn) + if err != nil { + return err + } + } else { + log.Printf("[INFO] Disabling Logging for Redshift Cluster %q", d.Id()) + _, err := conn.DisableLogging(&redshift.DisableLoggingInput{ + ClusterIdentifier: aws.String(d.Id()), + }) + if err != nil { + return err } } - - d.SetPartial("enable_logging") - d.SetPartial("logging") } d.Partial(false) @@ -895,7 +902,7 @@ func resourceAwsRedshiftClusterDelete(d *schema.ResourceData, meta interface{}) } log.Printf("[DEBUG] Deleting Redshift Cluster: %s", deleteOpts) - _, err := deleteAwsRedshiftCluster(&deleteOpts, conn) + err := deleteAwsRedshiftCluster(&deleteOpts, conn) if err != nil { return err } @@ -905,7 +912,7 @@ func resourceAwsRedshiftClusterDelete(d *schema.ResourceData, meta interface{}) return nil } -func deleteAwsRedshiftCluster(opts *redshift.DeleteClusterInput, conn *redshift.Redshift) (interface{}, error) { +func deleteAwsRedshiftCluster(opts *redshift.DeleteClusterInput, conn *redshift.Redshift) error { id := *opts.ClusterIdentifier log.Printf("[INFO] Deleting Redshift Cluster %q", id) err := resource.Retry(15*time.Minute, func() *resource.RetryError { @@ -917,8 +924,7 @@ func deleteAwsRedshiftCluster(opts *redshift.DeleteClusterInput, conn *redshift. return resource.NonRetryableError(err) }) if err != nil { - return nil, fmt.Errorf("[ERROR] Error deleting Redshift Cluster (%s): %s", - id, err) + return fmt.Errorf("Error deleting Redshift Cluster (%s): %s", id, err) } stateConf := &resource.StateChangeConf{ @@ -929,7 +935,9 @@ func deleteAwsRedshiftCluster(opts *redshift.DeleteClusterInput, conn *redshift. MinTimeout: 5 * time.Second, } - return stateConf.WaitForState() + _, err = stateConf.WaitForState() + + return err } func resourceAwsRedshiftClusterStateRefreshFunc(id string, conn *redshift.Redshift) resource.StateRefreshFunc { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_event_subscription.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_event_subscription.go new file mode 100644 index 0000000000..8704ba6fb8 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_event_subscription.go @@ -0,0 +1,211 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/redshift" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsRedshiftEventSubscription() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsRedshiftEventSubscriptionCreate, + Read: resourceAwsRedshiftEventSubscriptionRead, + Update: resourceAwsRedshiftEventSubscriptionUpdate, + Delete: resourceAwsRedshiftEventSubscriptionDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(40 * time.Minute), + Delete: schema.DefaultTimeout(40 * time.Minute), + Update: schema.DefaultTimeout(40 * time.Minute), + }, + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "sns_topic_arn": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validateArn, + }, + "status": { + Type: schema.TypeString, + Computed: true, + }, + "event_categories": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + "source_ids": { + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + Set: schema.HashString, + }, + "source_type": { + Type: schema.TypeString, + Optional: true, + }, + "enabled": { + Type: schema.TypeBool, + Optional: true, + Default: true, + }, + "severity": { + Type: schema.TypeString, + Optional: true, + }, + "customer_aws_id": { + Type: schema.TypeString, + Computed: true, + }, + "tags": { + Type: schema.TypeMap, + Optional: true, + ForceNew: true, + }, + }, + } +} + +func resourceAwsRedshiftEventSubscriptionCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).redshiftconn + + request := &redshift.CreateEventSubscriptionInput{ + SubscriptionName: aws.String(d.Get("name").(string)), + SnsTopicArn: aws.String(d.Get("sns_topic_arn").(string)), + Enabled: aws.Bool(d.Get("enabled").(bool)), + SourceIds: expandStringSet(d.Get("source_ids").(*schema.Set)), + SourceType: aws.String(d.Get("source_type").(string)), + Severity: aws.String(d.Get("severity").(string)), + EventCategories: expandStringSet(d.Get("event_categories").(*schema.Set)), + Tags: tagsFromMapRedshift(d.Get("tags").(map[string]interface{})), + } + + log.Println("[DEBUG] Create Redshift Event Subscription:", request) + + output, err := conn.CreateEventSubscription(request) + if err != nil || output.EventSubscription == nil { + return fmt.Errorf("Error creating Redshift Event Subscription %s: %s", d.Get("name").(string), err) + } + + d.SetId(aws.StringValue(output.EventSubscription.CustSubscriptionId)) + + return resourceAwsRedshiftEventSubscriptionRead(d, meta) +} + +func resourceAwsRedshiftEventSubscriptionRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).redshiftconn + + sub, err := resourceAwsRedshiftEventSubscriptionRetrieve(d.Id(), conn) + if err != nil { + return fmt.Errorf("Error retrieving Redshift Event Subscription %s: %s", d.Id(), err) + } + if sub == nil { + log.Printf("[WARN] Redshift Event Subscription (%s) not found - removing from state", d.Id()) + d.SetId("") + return nil + } + + if err := d.Set("name", sub.CustSubscriptionId); err != nil { + return err + } + if err := d.Set("sns_topic_arn", sub.SnsTopicArn); err != nil { + return err + } + if err := d.Set("status", sub.Status); err != nil { + return err + } + if err := d.Set("source_type", sub.SourceType); err != nil { + return err + } + if err := d.Set("severity", sub.Severity); err != nil { + return err + } + if err := d.Set("enabled", sub.Enabled); err != nil { + return err + } + if err := d.Set("source_ids", flattenStringList(sub.SourceIdsList)); err != nil { + return err + } + if err := d.Set("event_categories", flattenStringList(sub.EventCategoriesList)); err != nil { + return err + } + if err := d.Set("customer_aws_id", sub.CustomerAwsId); err != nil { + return err + } + if err := d.Set("tags", tagsToMapRedshift(sub.Tags)); err != nil { + return err + } + + return nil +} + +func resourceAwsRedshiftEventSubscriptionRetrieve(name string, conn *redshift.Redshift) (*redshift.EventSubscription, error) { + + request := &redshift.DescribeEventSubscriptionsInput{ + SubscriptionName: aws.String(name), + } + + describeResp, err := conn.DescribeEventSubscriptions(request) + if err != nil { + if isAWSErr(err, redshift.ErrCodeSubscriptionNotFoundFault, "") { + log.Printf("[WARN] No Redshift Event Subscription by name (%s) found", name) + return nil, nil + } + return nil, fmt.Errorf("Error reading Redshift Event Subscription %s: %s", name, err) + } + + if len(describeResp.EventSubscriptionsList) != 1 { + return nil, fmt.Errorf("Unable to find Redshift Event Subscription: %#v", describeResp.EventSubscriptionsList) + } + + return describeResp.EventSubscriptionsList[0], nil +} + +func resourceAwsRedshiftEventSubscriptionUpdate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).redshiftconn + + req := &redshift.ModifyEventSubscriptionInput{ + SubscriptionName: aws.String(d.Id()), + SnsTopicArn: aws.String(d.Get("sns_topic_arn").(string)), + Enabled: aws.Bool(d.Get("enabled").(bool)), + SourceIds: expandStringSet(d.Get("source_ids").(*schema.Set)), + SourceType: aws.String(d.Get("source_type").(string)), + Severity: aws.String(d.Get("severity").(string)), + EventCategories: expandStringSet(d.Get("event_categories").(*schema.Set)), + } + + log.Printf("[DEBUG] Redshift Event Subscription modification request: %#v", req) + _, err := conn.ModifyEventSubscription(req) + if err != nil { + return fmt.Errorf("Modifying Redshift Event Subscription %s failed: %s", d.Id(), err) + } + + return nil +} + +func resourceAwsRedshiftEventSubscriptionDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).redshiftconn + deleteOpts := redshift.DeleteEventSubscriptionInput{ + SubscriptionName: aws.String(d.Id()), + } + + if _, err := conn.DeleteEventSubscription(&deleteOpts); err != nil { + if isAWSErr(err, redshift.ErrCodeSubscriptionNotFoundFault, "") { + return nil + } + return fmt.Errorf("Error deleting Redshift Event Subscription %s: %s", d.Id(), err) + } + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_snapshot_copy_grant.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_snapshot_copy_grant.go new file mode 100644 index 0000000000..0e0b750c08 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_snapshot_copy_grant.go @@ -0,0 +1,255 @@ +package aws + +import ( + "fmt" + "log" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/redshift" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceAwsRedshiftSnapshotCopyGrant() *schema.Resource { + return &schema.Resource{ + // There is no API for updating/modifying grants, hence no Update + // Instead changes to most fields will force a new resource + Create: resourceAwsRedshiftSnapshotCopyGrantCreate, + Read: resourceAwsRedshiftSnapshotCopyGrantRead, + Delete: resourceAwsRedshiftSnapshotCopyGrantDelete, + Exists: resourceAwsRedshiftSnapshotCopyGrantExists, + + Schema: map[string]*schema.Schema{ + "snapshot_copy_grant_name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "kms_key_id": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Computed: true, + }, + "tags": { + Type: schema.TypeMap, + Optional: true, + ForceNew: true, + }, + }, + } +} + +func resourceAwsRedshiftSnapshotCopyGrantCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).redshiftconn + + grantName := d.Get("snapshot_copy_grant_name").(string) + + input := redshift.CreateSnapshotCopyGrantInput{ + SnapshotCopyGrantName: aws.String(grantName), + } + + if v, ok := d.GetOk("kms_key_id"); ok { + input.KmsKeyId = aws.String(v.(string)) + } + + input.Tags = tagsFromMapRedshift(d.Get("tags").(map[string]interface{})) + + log.Printf("[DEBUG]: Adding new Redshift SnapshotCopyGrant: %s", input) + + var out *redshift.CreateSnapshotCopyGrantOutput + var err error + + out, err = conn.CreateSnapshotCopyGrant(&input) + + if err != nil { + return fmt.Errorf("error creating Redshift Snapshot Copy Grant (%s): %s", grantName, err) + } + + log.Printf("[DEBUG] Created new Redshift SnapshotCopyGrant: %s", *out.SnapshotCopyGrant.SnapshotCopyGrantName) + d.SetId(grantName) + + return resourceAwsRedshiftSnapshotCopyGrantRead(d, meta) +} + +func resourceAwsRedshiftSnapshotCopyGrantRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).redshiftconn + + grantName := d.Id() + log.Printf("[DEBUG] Looking for grant: %s", grantName) + grant, err := findAwsRedshiftSnapshotCopyGrantWithRetry(conn, grantName) + + if err != nil { + return err + } + + if grant == nil { + log.Printf("[WARN] %s Redshift snapshot copy grant not found, removing from state file", grantName) + d.SetId("") + return nil + } + + d.Set("kms_key_id", grant.KmsKeyId) + d.Set("snapshot_copy_grant_name", grant.SnapshotCopyGrantName) + if err := d.Set("tags", tagsToMapRedshift(grant.Tags)); err != nil { + return fmt.Errorf("Error setting Redshift Snapshot Copy Grant Tags: %#v", err) + } + + return nil +} + +func resourceAwsRedshiftSnapshotCopyGrantDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).redshiftconn + + grantName := d.Id() + + deleteInput := redshift.DeleteSnapshotCopyGrantInput{ + SnapshotCopyGrantName: aws.String(grantName), + } + + log.Printf("[DEBUG] Deleting snapshot copy grant: %s", grantName) + _, err := conn.DeleteSnapshotCopyGrant(&deleteInput) + + if err != nil { + if isAWSErr(err, redshift.ErrCodeSnapshotCopyGrantNotFoundFault, "") { + return nil + } + return err + } + + log.Printf("[DEBUG] Checking if grant is deleted: %s", grantName) + err = waitForAwsRedshiftSnapshotCopyGrantToBeDeleted(conn, grantName) + + if err != nil { + return err + } + + return nil +} + +func resourceAwsRedshiftSnapshotCopyGrantExists(d *schema.ResourceData, meta interface{}) (bool, error) { + conn := meta.(*AWSClient).redshiftconn + + grantName := d.Id() + + log.Printf("[DEBUG] Looking for Grant: %s", grantName) + grant, err := findAwsRedshiftSnapshotCopyGrantWithRetry(conn, grantName) + + if err != nil { + return false, err + } + if grant != nil { + return true, err + } + + return false, nil +} + +func getAwsRedshiftSnapshotCopyGrant(grants []*redshift.SnapshotCopyGrant, grantName string) *redshift.SnapshotCopyGrant { + for _, grant := range grants { + if *grant.SnapshotCopyGrantName == grantName { + return grant + } + } + + return nil +} + +/* +In the functions below it is not possible to use retryOnAwsCodes function, as there +is no get grant call, so an error has to be created if the grant is or isn't returned +by the describe grants call when expected. +*/ + +// NB: This function only retries the grant not being returned and some edge cases, while AWS Errors +// are handled by the findAwsRedshiftSnapshotCopyGrant function +func findAwsRedshiftSnapshotCopyGrantWithRetry(conn *redshift.Redshift, grantName string) (*redshift.SnapshotCopyGrant, error) { + var grant *redshift.SnapshotCopyGrant + err := resource.Retry(3*time.Minute, func() *resource.RetryError { + var err error + grant, err = findAwsRedshiftSnapshotCopyGrant(conn, grantName, nil) + + if err != nil { + if serr, ok := err.(*resource.NotFoundError); ok { + // Force a retry if the grant should exist + return resource.RetryableError(serr) + } + + return resource.NonRetryableError(err) + } + + return nil + }) + + return grant, err +} + +// Used by the tests as well +func waitForAwsRedshiftSnapshotCopyGrantToBeDeleted(conn *redshift.Redshift, grantName string) error { + err := resource.Retry(3*time.Minute, func() *resource.RetryError { + grant, err := findAwsRedshiftSnapshotCopyGrant(conn, grantName, nil) + if err != nil { + if isAWSErr(err, redshift.ErrCodeSnapshotCopyGrantNotFoundFault, "") { + return nil + } + } + + if grant != nil { + // Force a retry if the grant still exists + return resource.RetryableError( + fmt.Errorf("[DEBUG] Grant still exists while expected to be deleted: %s", *grant.SnapshotCopyGrantName)) + } + + return resource.NonRetryableError(err) + }) + + return err +} + +// The DescribeSnapshotCopyGrants API defaults to listing only 100 grants +// Use a marker to iterate over all grants in "pages" +// NB: This function only retries on AWS Errors +func findAwsRedshiftSnapshotCopyGrant(conn *redshift.Redshift, grantName string, marker *string) (*redshift.SnapshotCopyGrant, error) { + + input := redshift.DescribeSnapshotCopyGrantsInput{ + MaxRecords: aws.Int64(int64(100)), + } + + // marker and grant name are mutually exclusive + if marker != nil { + input.Marker = marker + } else { + input.SnapshotCopyGrantName = aws.String(grantName) + } + + var out *redshift.DescribeSnapshotCopyGrantsOutput + var err error + var grant *redshift.SnapshotCopyGrant + + err = resource.Retry(3*time.Minute, func() *resource.RetryError { + out, err = conn.DescribeSnapshotCopyGrants(&input) + + if err != nil { + return resource.NonRetryableError(err) + } + + return nil + }) + if err != nil { + return nil, err + } + + grant = getAwsRedshiftSnapshotCopyGrant(out.SnapshotCopyGrants, grantName) + if grant != nil { + return grant, nil + } else if out.Marker != nil { + log.Printf("[DEBUG] Snapshot copy grant not found but marker returned, getting next page via marker: %s", aws.StringValue(out.Marker)) + return findAwsRedshiftSnapshotCopyGrant(conn, grantName, out.Marker) + } + + return nil, &resource.NotFoundError{ + Message: fmt.Sprintf("[DEBUG] Grant %s not found", grantName), + LastRequest: input, + } +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_subnet_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_subnet_group.go index d0c6265e89..e503108ece 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_subnet_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_redshift_subnet_group.go @@ -100,7 +100,7 @@ func resourceAwsRedshiftSubnetGroupRead(d *schema.ResourceData, meta interface{} d.Set("description", describeResp.ClusterSubnetGroups[0].Description) d.Set("subnet_ids", subnetIdsToSlice(describeResp.ClusterSubnetGroups[0].Subnets)) if err := d.Set("tags", tagsToMapRedshift(describeResp.ClusterSubnetGroups[0].Tags)); err != nil { - return fmt.Errorf("[DEBUG] Error setting Redshift Subnet Group Tags: %#v", err) + return fmt.Errorf("Error setting Redshift Subnet Group Tags: %#v", err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route.go index ff1dc7e7cf..bbd8a58e5a 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route.go @@ -339,7 +339,7 @@ func resourceAwsRouteUpdate(d *schema.ResourceData, meta interface{}) error { } switch setTarget { - //instance_id is a special case due to the fact that AWS will "discover" the network_interace_id + //instance_id is a special case due to the fact that AWS will "discover" the network_interface_id //when it creates the route and return that data. In the case of an update, we should ignore the //existing network_interface_id case "instance_id": diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_health_check.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_health_check.go index ce9e8843df..98f0d15b73 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_health_check.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_health_check.go @@ -32,6 +32,15 @@ func resourceAwsRoute53HealthCheck() *schema.Resource { StateFunc: func(val interface{}) string { return strings.ToUpper(val.(string)) }, + ValidateFunc: validation.StringInSlice([]string{ + route53.HealthCheckTypeCalculated, + route53.HealthCheckTypeCloudwatchMetric, + route53.HealthCheckTypeHttp, + route53.HealthCheckTypeHttpStrMatch, + route53.HealthCheckTypeHttps, + route53.HealthCheckTypeHttpsStrMatch, + route53.HealthCheckTypeTcp, + }, true), }, "failure_threshold": { Type: schema.TypeInt, @@ -333,7 +342,11 @@ func resourceAwsRoute53HealthCheckRead(d *schema.ResourceData, meta interface{}) d.Set("resource_path", updated.ResourcePath) d.Set("measure_latency", updated.MeasureLatency) d.Set("invert_healthcheck", updated.Inverted) - d.Set("child_healthchecks", updated.ChildHealthChecks) + + if err := d.Set("child_healthchecks", flattenStringList(updated.ChildHealthChecks)); err != nil { + return fmt.Errorf("error setting child_healthchecks: %s", err) + } + d.Set("child_health_threshold", updated.HealthThreshold) d.Set("insufficient_data_health_status", updated.InsufficientDataHealthStatus) d.Set("enable_sni", updated.EnableSNI) @@ -379,12 +392,3 @@ func resourceAwsRoute53HealthCheckDelete(d *schema.ResourceData, meta interface{ return nil } - -func createChildHealthCheckList(s *schema.Set) (nl []*string) { - l := s.List() - for _, n := range l { - nl = append(nl, aws.String(n.(string))) - } - - return nl -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_record.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_record.go index 92c10adb30..3a47ec9cdb 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_record.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_record.go @@ -10,7 +10,6 @@ import ( "strings" "time" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -279,7 +278,7 @@ func resourceAwsRoute53RecordUpdate(d *schema.ResourceData, meta interface{}) er return err } if zoneRecord.HostedZone == nil { - return fmt.Errorf("[WARN] No Route53 Zone found for id (%s)", zone) + return fmt.Errorf("No Route53 Zone found for id (%s)", zone) } // Build the to be deleted record @@ -353,7 +352,7 @@ func resourceAwsRoute53RecordUpdate(d *schema.ResourceData, meta interface{}) er respRaw, err := changeRoute53RecordSet(conn, req) if err != nil { - return errwrap.Wrapf("[ERR]: Error building changeset: {{err}}", err) + return fmt.Errorf("[ERR]: Error building changeset: %s", err) } changeInfo := respRaw.(*route53.ChangeResourceRecordSetsOutput).ChangeInfo @@ -389,7 +388,7 @@ func resourceAwsRoute53RecordCreate(d *schema.ResourceData, meta interface{}) er return err } if zoneRecord.HostedZone == nil { - return fmt.Errorf("[WARN] No Route53 Zone found for id (%s)", zone) + return fmt.Errorf("No Route53 Zone found for id (%s)", zone) } // Build the record @@ -431,7 +430,7 @@ func resourceAwsRoute53RecordCreate(d *schema.ResourceData, meta interface{}) er respRaw, err := changeRoute53RecordSet(conn, req) if err != nil { - return errwrap.Wrapf("[ERR]: Error building changeset: {{err}}", err) + return fmt.Errorf("[ERR]: Error building changeset: %s", err) } changeInfo := respRaw.(*route53.ChangeResourceRecordSetsOutput).ChangeInfo @@ -534,7 +533,7 @@ func resourceAwsRoute53RecordRead(d *schema.ResourceData, meta interface{}) erro err = d.Set("records", flattenResourceRecords(record.ResourceRecords, *record.Type)) if err != nil { - return fmt.Errorf("[DEBUG] Error setting records for: %s, error: %#v", d.Id(), err) + return fmt.Errorf("Error setting records for: %s, error: %#v", d.Id(), err) } if alias := record.AliasTarget; alias != nil { @@ -555,7 +554,7 @@ func resourceAwsRoute53RecordRead(d *schema.ResourceData, meta interface{}) erro "type": aws.StringValue(record.Failover), }} if err := d.Set("failover_routing_policy", v); err != nil { - return fmt.Errorf("[DEBUG] Error setting failover records for: %s, error: %#v", d.Id(), err) + return fmt.Errorf("Error setting failover records for: %s, error: %#v", d.Id(), err) } } @@ -566,7 +565,7 @@ func resourceAwsRoute53RecordRead(d *schema.ResourceData, meta interface{}) erro "subdivision": aws.StringValue(record.GeoLocation.SubdivisionCode), }} if err := d.Set("geolocation_routing_policy", v); err != nil { - return fmt.Errorf("[DEBUG] Error setting gelocation records for: %s, error: %#v", d.Id(), err) + return fmt.Errorf("Error setting gelocation records for: %s, error: %#v", d.Id(), err) } } @@ -575,7 +574,7 @@ func resourceAwsRoute53RecordRead(d *schema.ResourceData, meta interface{}) erro "region": aws.StringValue(record.Region), }} if err := d.Set("latency_routing_policy", v); err != nil { - return fmt.Errorf("[DEBUG] Error setting latency records for: %s, error: %#v", d.Id(), err) + return fmt.Errorf("Error setting latency records for: %s, error: %#v", d.Id(), err) } } @@ -584,13 +583,13 @@ func resourceAwsRoute53RecordRead(d *schema.ResourceData, meta interface{}) erro "weight": aws.Int64Value((record.Weight)), }} if err := d.Set("weighted_routing_policy", v); err != nil { - return fmt.Errorf("[DEBUG] Error setting weighted records for: %s, error: %#v", d.Id(), err) + return fmt.Errorf("Error setting weighted records for: %s, error: %#v", d.Id(), err) } } if record.MultiValueAnswer != nil { if err := d.Set("multivalue_answer_routing_policy", *record.MultiValueAnswer); err != nil { - return fmt.Errorf("[DEBUG] Error setting multivalue answer records for: %s, error: %#v", d.Id(), err) + return fmt.Errorf("Error setting multivalue answer records for: %s, error: %#v", d.Id(), err) } } @@ -727,7 +726,7 @@ func resourceAwsRoute53RecordDelete(d *schema.ResourceData, meta interface{}) er respRaw, err := deleteRoute53RecordSet(conn, req) if err != nil { - return errwrap.Wrapf("[ERR]: Error building changeset: {{err}}", err) + return fmt.Errorf("[ERR]: Error building changeset: %s", err) } changeInfo := respRaw.(*route53.ChangeResourceRecordSetsOutput).ChangeInfo diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_zone.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_zone.go index f24743f543..8e60d8ce0f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_zone.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_route53_zone.go @@ -1,19 +1,19 @@ package aws import ( + "bytes" "fmt" "log" "sort" "strings" "time" - "github.com/hashicorp/errwrap" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/route53" + "github.com/hashicorp/terraform/helper/hashcode" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsRoute53Zone() *schema.Resource { @@ -40,18 +40,46 @@ func resourceAwsRoute53Zone() *schema.Resource { Default: "Managed by Terraform", }, + "vpc": { + Type: schema.TypeSet, + Optional: true, + // Deprecated: Remove Computed: true in next major version of the provider + Computed: true, + MinItems: 1, + ConflictsWith: []string{"delegation_set_id", "vpc_id", "vpc_region"}, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "vpc_id": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.NoZeroValues, + }, + "vpc_region": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, + }, + }, + Set: route53HostedZoneVPCHash, + }, + "vpc_id": { Type: schema.TypeString, Optional: true, ForceNew: true, - ConflictsWith: []string{"delegation_set_id"}, + Computed: true, + ConflictsWith: []string{"delegation_set_id", "vpc"}, + Deprecated: "use 'vpc' attribute instead", }, "vpc_region": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Computed: true, + ConflictsWith: []string{"delegation_set_id", "vpc"}, + Deprecated: "use 'vpc' attribute instead", }, "zone_id": { @@ -84,141 +112,171 @@ func resourceAwsRoute53Zone() *schema.Resource { } func resourceAwsRoute53ZoneCreate(d *schema.ResourceData, meta interface{}) error { - r53 := meta.(*AWSClient).r53conn + conn := meta.(*AWSClient).r53conn + region := meta.(*AWSClient).region - req := &route53.CreateHostedZoneInput{ - Name: aws.String(d.Get("name").(string)), - HostedZoneConfig: &route53.HostedZoneConfig{Comment: aws.String(d.Get("comment").(string))}, - CallerReference: aws.String(resource.UniqueId()), + input := &route53.CreateHostedZoneInput{ + CallerReference: aws.String(resource.UniqueId()), + Name: aws.String(d.Get("name").(string)), + HostedZoneConfig: &route53.HostedZoneConfig{ + Comment: aws.String(d.Get("comment").(string)), + }, } - if v := d.Get("vpc_id"); v != "" { - req.VPC = &route53.VPC{ - VPCId: aws.String(v.(string)), - VPCRegion: aws.String(meta.(*AWSClient).region), + + if v, ok := d.GetOk("delegation_set_id"); ok { + input.DelegationSetId = aws.String(v.(string)) + } + + // Private Route53 Hosted Zones can only be created with their first VPC association, + // however we need to associate the remaining after creation. + var vpcs []*route53.VPC + vpcs = expandRoute53VPCs(d.Get("vpc").(*schema.Set).List(), region) + + // Backwards compatibility + if vpcID, ok := d.GetOk("vpc_id"); ok { + vpc := &route53.VPC{ + VPCId: aws.String(vpcID.(string)), + VPCRegion: aws.String(region), } - if w := d.Get("vpc_region"); w != "" { - req.VPC.VPCRegion = aws.String(w.(string)) + + if vpcRegion, ok := d.GetOk("vpc_region"); ok { + vpc.VPCRegion = aws.String(vpcRegion.(string)) } - d.Set("vpc_region", req.VPC.VPCRegion) + + vpcs = []*route53.VPC{vpc} } - if v, ok := d.GetOk("delegation_set_id"); ok { - req.DelegationSetId = aws.String(v.(string)) + if len(vpcs) > 0 { + input.VPC = vpcs[0] } - log.Printf("[DEBUG] Creating Route53 hosted zone: %s", *req.Name) - var err error - resp, err := r53.CreateHostedZone(req) + log.Printf("[DEBUG] Creating Route53 hosted zone: %s", input) + output, err := conn.CreateHostedZone(input) + if err != nil { - return err + return fmt.Errorf("error creating Route53 Hosted Zone: %s", err) } - // Store the zone_id - zone := cleanZoneID(*resp.HostedZone.Id) - d.Set("zone_id", zone) - d.SetId(zone) + d.SetId(cleanZoneID(aws.StringValue(output.HostedZone.Id))) - // Wait until we are done initializing - wait := resource.StateChangeConf{ - Delay: 30 * time.Second, - Pending: []string{"PENDING"}, - Target: []string{"INSYNC"}, - Timeout: 15 * time.Minute, - MinTimeout: 2 * time.Second, - Refresh: func() (result interface{}, state string, err error) { - changeRequest := &route53.GetChangeInput{ - Id: aws.String(cleanChangeID(*resp.ChangeInfo.Id)), - } - return resourceAwsGoRoute53Wait(r53, changeRequest) - }, + if err := route53WaitForChangeSynchronization(conn, cleanChangeID(aws.StringValue(output.ChangeInfo.Id))); err != nil { + return fmt.Errorf("error waiting for Route53 Hosted Zone (%s) creation: %s", d.Id(), err) } - _, err = wait.WaitForState() - if err != nil { - return err + + if err := setTagsR53(conn, d, route53.TagResourceTypeHostedzone); err != nil { + return fmt.Errorf("error setting tags for Route53 Hosted Zone (%s): %s", d.Id(), err) + } + + // Associate additional VPCs beyond the first + if len(vpcs) > 1 { + for _, vpc := range vpcs[1:] { + err := route53HostedZoneVPCAssociate(conn, d.Id(), vpc) + + if err != nil { + return err + } + } } - return resourceAwsRoute53ZoneUpdate(d, meta) + + return resourceAwsRoute53ZoneRead(d, meta) } func resourceAwsRoute53ZoneRead(d *schema.ResourceData, meta interface{}) error { - r53 := meta.(*AWSClient).r53conn - zone, err := r53.GetHostedZone(&route53.GetHostedZoneInput{Id: aws.String(d.Id())}) + conn := meta.(*AWSClient).r53conn + + input := &route53.GetHostedZoneInput{ + Id: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Getting Route53 Hosted Zone: %s", input) + output, err := conn.GetHostedZone(input) + + if isAWSErr(err, route53.ErrCodeNoSuchHostedZone, "") { + log.Printf("[WARN] Route53 Hosted Zone (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + if err != nil { - // Handle a deleted zone - if r53err, ok := err.(awserr.Error); ok && r53err.Code() == "NoSuchHostedZone" { - d.SetId("") - return nil - } - return err + return fmt.Errorf("error getting Route53 Hosted Zone (%s): %s", d.Id(), err) } - // In the import case this will be empty - if _, ok := d.GetOk("zone_id"); !ok { - d.Set("zone_id", d.Id()) + if output == nil || output.HostedZone == nil { + log.Printf("[WARN] Route53 Hosted Zone (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil } - if _, ok := d.GetOk("name"); !ok { - d.Set("name", zone.HostedZone.Name) + + d.Set("comment", "") + d.Set("delegation_set_id", "") + d.Set("name", output.HostedZone.Name) + d.Set("zone_id", cleanZoneID(aws.StringValue(output.HostedZone.Id))) + + var nameServers []string + + if output.DelegationSet != nil { + d.Set("delegation_set_id", cleanDelegationSetId(aws.StringValue(output.DelegationSet.Id))) + + nameServers = aws.StringValueSlice(output.DelegationSet.NameServers) } - if !*zone.HostedZone.Config.PrivateZone { - ns := make([]string, len(zone.DelegationSet.NameServers)) - for i := range zone.DelegationSet.NameServers { - ns[i] = *zone.DelegationSet.NameServers[i] - } - sort.Strings(ns) - if err := d.Set("name_servers", ns); err != nil { - return fmt.Errorf("[DEBUG] Error setting name servers for: %s, error: %#v", d.Id(), err) - } - } else { - ns, err := getNameServers(d.Id(), d.Get("name").(string), r53) - if err != nil { - return err - } - if err := d.Set("name_servers", ns); err != nil { - return fmt.Errorf("[DEBUG] Error setting name servers for: %s, error: %#v", d.Id(), err) - } + if output.HostedZone.Config != nil { + d.Set("comment", output.HostedZone.Config.Comment) - // In the import case we just associate it with the first VPC - if _, ok := d.GetOk("vpc_id"); !ok { - if len(zone.VPCs) > 1 { - return fmt.Errorf( - "Can't import a route53_zone with more than one VPC attachment") - } + if aws.BoolValue(output.HostedZone.Config.PrivateZone) { + var err error + nameServers, err = getNameServers(d.Id(), d.Get("name").(string), conn) - if len(zone.VPCs) > 0 { - d.Set("vpc_id", zone.VPCs[0].VPCId) - d.Set("vpc_region", zone.VPCs[0].VPCRegion) + if err != nil { + return fmt.Errorf("error getting Route53 Hosted Zone (%s) name servers: %s", d.Id(), err) } } + } - var associatedVPC *route53.VPC - for _, vpc := range zone.VPCs { - if *vpc.VPCId == d.Get("vpc_id") { - associatedVPC = vpc - break - } - } - if associatedVPC == nil { - return fmt.Errorf("[DEBUG] VPC: %v is not associated with Zone: %v", d.Get("vpc_id"), d.Id()) - } + sort.Strings(nameServers) + if err := d.Set("name_servers", nameServers); err != nil { + return fmt.Errorf("error setting name_servers: %s", err) } - if zone.DelegationSet != nil && zone.DelegationSet.Id != nil { - d.Set("delegation_set_id", cleanDelegationSetId(*zone.DelegationSet.Id)) + // Backwards compatibility: only set vpc_id/vpc_region if either is true: + // * Previously configured + // * Only one VPC association + existingVpcID := d.Get("vpc_id").(string) + + // Detect drift in configuration + d.Set("vpc_id", "") + d.Set("vpc_region", "") + + if len(output.VPCs) == 1 && output.VPCs[0] != nil { + d.Set("vpc_id", output.VPCs[0].VPCId) + d.Set("vpc_region", output.VPCs[0].VPCRegion) + } else if len(output.VPCs) > 1 { + for _, vpc := range output.VPCs { + if vpc == nil { + continue + } + if aws.StringValue(vpc.VPCId) == existingVpcID { + d.Set("vpc_id", vpc.VPCId) + d.Set("vpc_region", vpc.VPCRegion) + } + } } - if zone.HostedZone != nil && zone.HostedZone.Config != nil && zone.HostedZone.Config.Comment != nil { - d.Set("comment", zone.HostedZone.Config.Comment) + if err := d.Set("vpc", flattenRoute53VPCs(output.VPCs)); err != nil { + return fmt.Errorf("error setting vpc: %s", err) } // get tags req := &route53.ListTagsForResourceInput{ ResourceId: aws.String(d.Id()), - ResourceType: aws.String("hostedzone"), + ResourceType: aws.String(route53.TagResourceTypeHostedzone), } - resp, err := r53.ListTagsForResource(req) + log.Printf("[DEBUG] Listing tags for Route53 Hosted Zone: %s", req) + resp, err := conn.ListTagsForResource(req) + if err != nil { - return err + return fmt.Errorf("error listing tags for Route53 Hosted Zone (%s): %s", d.Id(), err) } var tags []*route53.Tag @@ -235,51 +293,95 @@ func resourceAwsRoute53ZoneRead(d *schema.ResourceData, meta interface{}) error func resourceAwsRoute53ZoneUpdate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).r53conn + region := meta.(*AWSClient).region d.Partial(true) if d.HasChange("comment") { - zoneInput := route53.UpdateHostedZoneCommentInput{ + input := route53.UpdateHostedZoneCommentInput{ Id: aws.String(d.Id()), Comment: aws.String(d.Get("comment").(string)), } - _, err := conn.UpdateHostedZoneComment(&zoneInput) + _, err := conn.UpdateHostedZoneComment(&input) + if err != nil { - return err - } else { - d.SetPartial("comment") + return fmt.Errorf("error updating Route53 Hosted Zone (%s) comment: %s", d.Id(), err) } + + d.SetPartial("comment") } - if err := setTagsR53(conn, d, "hostedzone"); err != nil { - return err - } else { + if d.HasChange("tags") { + if err := setTagsR53(conn, d, route53.TagResourceTypeHostedzone); err != nil { + return err + } + d.SetPartial("tags") } + if d.HasChange("vpc") { + o, n := d.GetChange("vpc") + oldVPCs := o.(*schema.Set) + newVPCs := n.(*schema.Set) + + // VPCs cannot be empty, so add first and then remove + for _, vpcRaw := range newVPCs.Difference(oldVPCs).List() { + if vpcRaw == nil { + continue + } + + vpc := expandRoute53VPC(vpcRaw.(map[string]interface{}), region) + err := route53HostedZoneVPCAssociate(conn, d.Id(), vpc) + + if err != nil { + return err + } + } + + for _, vpcRaw := range oldVPCs.Difference(newVPCs).List() { + if vpcRaw == nil { + continue + } + + vpc := expandRoute53VPC(vpcRaw.(map[string]interface{}), region) + err := route53HostedZoneVPCDisassociate(conn, d.Id(), vpc) + + if err != nil { + return err + } + } + + d.SetPartial("vpc") + } + d.Partial(false) return resourceAwsRoute53ZoneRead(d, meta) } func resourceAwsRoute53ZoneDelete(d *schema.ResourceData, meta interface{}) error { - r53 := meta.(*AWSClient).r53conn + conn := meta.(*AWSClient).r53conn if d.Get("force_destroy").(bool) { - if err := deleteAllRecordsInHostedZoneId(d.Id(), d.Get("name").(string), r53); err != nil { - return errwrap.Wrapf("{{err}}", err) + if err := deleteAllRecordsInHostedZoneId(d.Id(), d.Get("name").(string), conn); err != nil { + return fmt.Errorf("error deleting records in Route53 Hosted Zone (%s): %s", d.Id(), err) } } - log.Printf("[DEBUG] Deleting Route53 hosted zone: %s (ID: %s)", - d.Get("name").(string), d.Id()) - _, err := r53.DeleteHostedZone(&route53.DeleteHostedZoneInput{Id: aws.String(d.Id())}) + input := &route53.DeleteHostedZoneInput{ + Id: aws.String(d.Id()), + } + + log.Printf("[DEBUG] Deleting Route53 Hosted Zone: %s", input) + _, err := conn.DeleteHostedZone(input) + + if isAWSErr(err, route53.ErrCodeNoSuchHostedZone, "") { + return nil + } + if err != nil { - if r53err, ok := err.(awserr.Error); ok && r53err.Code() == "NoSuchHostedZone" { - return nil - } - return err + return fmt.Errorf("error deleting Route53 Hosted Zone (%s): %s", d.Id(), err) } return nil @@ -388,3 +490,129 @@ func getNameServers(zoneId string, zoneName string, r53 *route53.Route53) ([]str sort.Strings(ns) return ns, nil } + +func expandRoute53VPCs(l []interface{}, currentRegion string) []*route53.VPC { + vpcs := []*route53.VPC{} + + for _, mRaw := range l { + if mRaw == nil { + continue + } + + vpcs = append(vpcs, expandRoute53VPC(mRaw.(map[string]interface{}), currentRegion)) + } + + return vpcs +} + +func expandRoute53VPC(m map[string]interface{}, currentRegion string) *route53.VPC { + vpc := &route53.VPC{ + VPCId: aws.String(m["vpc_id"].(string)), + VPCRegion: aws.String(currentRegion), + } + + if v, ok := m["vpc_region"]; ok && v.(string) != "" { + vpc.VPCRegion = aws.String(v.(string)) + } + + return vpc +} + +func flattenRoute53VPCs(vpcs []*route53.VPC) []interface{} { + l := []interface{}{} + + for _, vpc := range vpcs { + if vpc == nil { + continue + } + + m := map[string]interface{}{ + "vpc_id": aws.StringValue(vpc.VPCId), + "vpc_region": aws.StringValue(vpc.VPCRegion), + } + + l = append(l, m) + } + + return l +} + +func route53HostedZoneVPCAssociate(conn *route53.Route53, zoneID string, vpc *route53.VPC) error { + input := &route53.AssociateVPCWithHostedZoneInput{ + HostedZoneId: aws.String(zoneID), + VPC: vpc, + } + + log.Printf("[DEBUG] Associating Route53 Hosted Zone with VPC: %s", input) + output, err := conn.AssociateVPCWithHostedZone(input) + + if err != nil { + return fmt.Errorf("error associating Route53 Hosted Zone (%s) to VPC (%s): %s", zoneID, aws.StringValue(vpc.VPCId), err) + } + + if err := route53WaitForChangeSynchronization(conn, cleanChangeID(aws.StringValue(output.ChangeInfo.Id))); err != nil { + return fmt.Errorf("error waiting for Route53 Hosted Zone (%s) association to VPC (%s): %s", zoneID, aws.StringValue(vpc.VPCId), err) + } + + return nil +} + +func route53HostedZoneVPCDisassociate(conn *route53.Route53, zoneID string, vpc *route53.VPC) error { + input := &route53.DisassociateVPCFromHostedZoneInput{ + HostedZoneId: aws.String(zoneID), + VPC: vpc, + } + + log.Printf("[DEBUG] Disassociating Route53 Hosted Zone with VPC: %s", input) + output, err := conn.DisassociateVPCFromHostedZone(input) + + if err != nil { + return fmt.Errorf("error disassociating Route53 Hosted Zone (%s) from VPC (%s): %s", zoneID, aws.StringValue(vpc.VPCId), err) + } + + if err := route53WaitForChangeSynchronization(conn, cleanChangeID(aws.StringValue(output.ChangeInfo.Id))); err != nil { + return fmt.Errorf("error waiting for Route53 Hosted Zone (%s) disassociation from VPC (%s): %s", zoneID, aws.StringValue(vpc.VPCId), err) + } + + return nil +} + +func route53HostedZoneVPCHash(v interface{}) int { + var buf bytes.Buffer + m := v.(map[string]interface{}) + buf.WriteString(fmt.Sprintf("%s-", m["vpc_id"].(string))) + + return hashcode.String(buf.String()) +} + +func route53WaitForChangeSynchronization(conn *route53.Route53, changeID string) error { + conf := resource.StateChangeConf{ + Delay: 30 * time.Second, + Pending: []string{route53.ChangeStatusPending}, + Target: []string{route53.ChangeStatusInsync}, + Timeout: 15 * time.Minute, + MinTimeout: 2 * time.Second, + Refresh: func() (result interface{}, state string, err error) { + input := &route53.GetChangeInput{ + Id: aws.String(changeID), + } + + log.Printf("[DEBUG] Getting Route53 Change status: %s", input) + output, err := conn.GetChange(input) + + if err != nil { + return nil, "UNKNOWN", err + } + + if output == nil || output.ChangeInfo == nil { + return nil, "UNKNOWN", fmt.Errorf("Route53 GetChange response empty for ID: %s", changeID) + } + + return true, aws.StringValue(output.ChangeInfo.Status), nil + }, + } + + _, err := conf.WaitForState() + + return err +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket.go index e304cd614e..d7ee14d00d 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket.go @@ -15,7 +15,6 @@ import ( "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/endpoints" "github.com/aws/aws-sdk-go/service/s3" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -73,7 +72,7 @@ func resourceAwsS3Bucket() *schema.Resource { "policy": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, @@ -113,6 +112,7 @@ func resourceAwsS3Bucket() *schema.Resource { "website": { Type: schema.TypeList, Optional: true, + MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "index_document": { @@ -138,7 +138,7 @@ func resourceAwsS3Bucket() *schema.Resource { "routing_rules": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) return json @@ -224,7 +224,7 @@ func resourceAwsS3Bucket() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ValidateFunc: validateMaxLength(255), + ValidateFunc: validation.StringLenBetween(0, 255), }, "prefix": { Type: schema.TypeString, @@ -368,7 +368,7 @@ func resourceAwsS3Bucket() *schema.Resource { "id": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateMaxLength(255), + ValidateFunc: validation.StringLenBetween(0, 255), }, "destination": { Type: schema.TypeSet, @@ -378,6 +378,11 @@ func resourceAwsS3Bucket() *schema.Resource { Set: destinationHash, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ + "account_id": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validateAwsAccountId, + }, "bucket": { Type: schema.TypeString, Required: true, @@ -397,6 +402,23 @@ func resourceAwsS3Bucket() *schema.Resource { Type: schema.TypeString, Optional: true, }, + "access_control_translation": { + Type: schema.TypeList, + Optional: true, + MinItems: 1, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "owner": { + Type: schema.TypeString, + Required: true, + ValidateFunc: validation.StringInSlice([]string{ + s3.OwnerOverrideDestination, + }, false), + }, + }, + }, + }, }, }, }, @@ -428,8 +450,8 @@ func resourceAwsS3Bucket() *schema.Resource { }, "prefix": { Type: schema.TypeString, - Required: true, - ValidateFunc: validateMaxLength(1024), + Optional: true, + ValidateFunc: validation.StringLenBetween(0, 1024), }, "status": { Type: schema.TypeString, @@ -439,6 +461,26 @@ func resourceAwsS3Bucket() *schema.Resource { s3.ReplicationRuleStatusDisabled, }, false), }, + "priority": { + Type: schema.TypeInt, + Optional: true, + }, + "filter": { + Type: schema.TypeList, + Optional: true, + MinItems: 1, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "prefix": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringLenBetween(0, 1024), + }, + "tags": tagsSchema(), + }, + }, + }, }, }, }, @@ -540,7 +582,7 @@ func resourceAwsS3BucketCreate(d *schema.ResourceData, meta interface{}) error { if awsErr.Code() == "OperationAborted" { log.Printf("[WARN] Got an error while trying to create S3 bucket %s: %s", bucket, err) return resource.RetryableError( - fmt.Errorf("[WARN] Error creating S3 bucket %s, retrying: %s", + fmt.Errorf("Error creating S3 bucket %s, retrying: %s", bucket, err)) } } @@ -649,11 +691,8 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { log.Printf("[WARN] S3 Bucket (%s) not found, error code (404)", d.Id()) d.SetId("") return nil - } else { - // some of the AWS SDK's errors can be empty strings, so let's add - // some additional context. - return fmt.Errorf("error reading S3 bucket \"%s\": %s", d.Id(), err) } + return fmt.Errorf("error reading S3 Bucket (%s): %s", d.Id(), err) } // In the import case, we won't have this @@ -684,7 +723,7 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { } else { policy, err := structure.NormalizeJsonString(*v) if err != nil { - return errwrap.Wrapf("policy contains an invalid JSON: {{err}}", err) + return fmt.Errorf("policy contains an invalid JSON: %s", err) } d.Set("policy", policy) } @@ -697,21 +736,13 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { Bucket: aws.String(d.Id()), }) }) - if err != nil { - // An S3 Bucket might not have CORS configuration set. - if awsErr, ok := err.(awserr.Error); ok { - if awsErr.Code() != "NoSuchCORSConfiguration" { - return err - } - log.Printf("[WARN] S3 bucket: %s, no CORS configuration could be found.", d.Id()) - } else { - return err - } + if err != nil && !isAWSErr(err, "NoSuchCORSConfiguration", "") { + return fmt.Errorf("error getting S3 Bucket CORS configuration: %s", err) } - cors := corsResponse.(*s3.GetBucketCorsOutput) - log.Printf("[DEBUG] S3 bucket: %s, read CORS: %v", d.Id(), cors) - if cors.CORSRules != nil { - rules := make([]map[string]interface{}, 0, len(cors.CORSRules)) + + corsRules := make([]map[string]interface{}, 0) + if cors, ok := corsResponse.(*s3.GetBucketCorsOutput); ok && len(cors.CORSRules) > 0 { + corsRules = make([]map[string]interface{}, 0, len(cors.CORSRules)) for _, ruleObject := range cors.CORSRules { rule := make(map[string]interface{}) rule["allowed_headers"] = flattenStringList(ruleObject.AllowedHeaders) @@ -724,17 +755,12 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { if ruleObject.MaxAgeSeconds != nil { rule["max_age_seconds"] = int(*ruleObject.MaxAgeSeconds) } - rules = append(rules, rule) - } - if err := d.Set("cors_rule", rules); err != nil { - return err - } - } else { - log.Printf("[DEBUG] S3 bucket: %s, read CORS: %v", d.Id(), cors) - if err := d.Set("cors_rule", make([]map[string]interface{}, 0)); err != nil { - return err + corsRules = append(corsRules, rule) } } + if err := d.Set("cors_rule", corsRules); err != nil { + return fmt.Errorf("error setting cors_rule: %s", err) + } // Read the website configuration wsResponse, err := retryOnAwsCode("NoSuchBucket", func() (interface{}, error) { @@ -742,9 +768,12 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { Bucket: aws.String(d.Id()), }) }) - ws := wsResponse.(*s3.GetBucketWebsiteOutput) - var websites []map[string]interface{} - if err == nil { + if err != nil && !isAWSErr(err, "NotImplemented", "") && !isAWSErr(err, "NoSuchWebsiteConfiguration", "") { + return fmt.Errorf("error getting S3 Bucket website configuration: %s", err) + } + + websites := make([]map[string]interface{}, 0, 1) + if ws, ok := wsResponse.(*s3.GetBucketWebsiteOutput); ok { w := make(map[string]interface{}) if v := ws.IndexDocument; v != nil { @@ -789,10 +818,14 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { w["routing_rules"] = rr } - websites = append(websites, w) + // We have special handling for the website configuration, + // so only add the configuration if there is any + if len(w) > 0 { + websites = append(websites, w) + } } if err := d.Set("website", websites); err != nil { - return err + return fmt.Errorf("error setting website: %s", err) } // Read the versioning configuration @@ -802,13 +835,12 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { Bucket: aws.String(d.Id()), }) }) - versioning := versioningResponse.(*s3.GetBucketVersioningOutput) if err != nil { return err } - log.Printf("[DEBUG] S3 Bucket: %s, versioning: %v", d.Id(), versioning) - if versioning != nil { - vcl := make([]map[string]interface{}, 0, 1) + + vcl := make([]map[string]interface{}, 0, 1) + if versioning, ok := versioningResponse.(*s3.GetBucketVersioningOutput); ok { vc := make(map[string]interface{}) if versioning.Status != nil && *versioning.Status == s3.BucketVersioningStatusEnabled { vc["enabled"] = true @@ -822,9 +854,9 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { vc["mfa_delete"] = false } vcl = append(vcl, vc) - if err := d.Set("versioning", vcl); err != nil { - return err - } + } + if err := d.Set("versioning", vcl); err != nil { + return fmt.Errorf("error setting versioning: %s", err) } // Read the acceleration status @@ -834,25 +866,12 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { Bucket: aws.String(d.Id()), }) }) - accelerate := accelerateResponse.(*s3.GetBucketAccelerateConfigurationOutput) - if err != nil { - // Amazon S3 Transfer Acceleration might not be supported in the - // given region, for example, China (Beijing) and the Government - // Cloud does not support this feature at the moment. - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() != "UnsupportedArgument" { - return err - } - - var awsRegion string - if region, ok := d.GetOk("region"); ok { - awsRegion = region.(string) - } else { - awsRegion = meta.(*AWSClient).region - } - log.Printf("[WARN] S3 bucket: %s, the S3 Transfer Acceleration is not supported in the region: %s", d.Id(), awsRegion) - } else { - log.Printf("[DEBUG] S3 bucket: %s, read Acceleration: %v", d.Id(), accelerate) + // Amazon S3 Transfer Acceleration might not be supported in the region + if err != nil && !isAWSErr(err, "UnsupportedArgument", "") { + return fmt.Errorf("error getting S3 Bucket acceleration configuration: %s", err) + } + if accelerate, ok := accelerateResponse.(*s3.GetBucketAccelerateConfigurationOutput); ok { d.Set("acceleration_status", accelerate.Status) } @@ -863,15 +882,13 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { Bucket: aws.String(d.Id()), }) }) - payer := payerResponse.(*s3.GetBucketRequestPaymentOutput) + if err != nil { - return err + return fmt.Errorf("error getting S3 Bucket request payment: %s", err) } - log.Printf("[DEBUG] S3 Bucket: %s, read request payer: %v", d.Id(), payer) - if payer.Payer != nil { - if err := d.Set("request_payer", *payer.Payer); err != nil { - return err - } + + if payer, ok := payerResponse.(*s3.GetBucketRequestPaymentOutput); ok { + d.Set("request_payer", payer.Payer) } // Read the logging configuration @@ -880,14 +897,14 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { Bucket: aws.String(d.Id()), }) }) - logging := loggingResponse.(*s3.GetBucketLoggingOutput) + if err != nil { - return err + return fmt.Errorf("error getting S3 Bucket logging: %s", err) } - log.Printf("[DEBUG] S3 Bucket: %s, logging: %v", d.Id(), logging) lcl := make([]map[string]interface{}, 0, 1) - if v := logging.LoggingEnabled; v != nil { + if logging, ok := loggingResponse.(*s3.GetBucketLoggingOutput); ok && logging.LoggingEnabled != nil { + v := logging.LoggingEnabled lc := make(map[string]interface{}) if *v.TargetBucket != "" { lc["target_bucket"] = *v.TargetBucket @@ -898,7 +915,7 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { lcl = append(lcl, lc) } if err := d.Set("logging", lcl); err != nil { - return err + return fmt.Errorf("error setting logging: %s", err) } // Read the lifecycle configuration @@ -908,14 +925,13 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { Bucket: aws.String(d.Id()), }) }) - if err != nil { - if awsError, ok := err.(awserr.RequestFailure); ok && awsError.StatusCode() != 404 { - return err - } + if err != nil && !isAWSErr(err, "NoSuchLifecycleConfiguration", "") { + return err } + + lifecycleRules := make([]map[string]interface{}, 0) if lifecycle, ok := lifecycleResponse.(*s3.GetBucketLifecycleConfigurationOutput); ok && len(lifecycle.Rules) > 0 { - log.Printf("[DEBUG] S3 Bucket: %s, lifecycle: %v", d.Id(), lifecycle) - rules := make([]map[string]interface{}, 0, len(lifecycle.Rules)) + lifecycleRules = make([]map[string]interface{}, 0, len(lifecycle.Rules)) for _, lifecycleRule := range lifecycle.Rules { rule := make(map[string]interface{}) @@ -1019,13 +1035,12 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { rule["noncurrent_version_transition"] = schema.NewSet(transitionHash, transitions) } - rules = append(rules, rule) - } - - if err := d.Set("lifecycle_rule", rules); err != nil { - return err + lifecycleRules = append(lifecycleRules, rule) } } + if err := d.Set("lifecycle_rule", lifecycleRules); err != nil { + return fmt.Errorf("error setting lifecycle_rule: %s", err) + } // Read the bucket replication configuration @@ -1034,17 +1049,16 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { Bucket: aws.String(d.Id()), }) }) - if err != nil { - if awsError, ok := err.(awserr.RequestFailure); ok && awsError.StatusCode() != 404 { - return err - } + if err != nil && !isAWSErr(err, "ReplicationConfigurationNotFoundError", "") { + return fmt.Errorf("error getting S3 Bucket replication: %s", err) } - replication := replicationResponse.(*s3.GetBucketReplicationOutput) - log.Printf("[DEBUG] S3 Bucket: %s, read replication configuration: %v", d.Id(), replication) - if err := d.Set("replication_configuration", flattenAwsS3BucketReplicationConfiguration(replication.ReplicationConfiguration)); err != nil { - log.Printf("[DEBUG] Error setting replication configuration: %s", err) - return err + replicationConfiguration := make([]map[string]interface{}, 0) + if replication, ok := replicationResponse.(*s3.GetBucketReplicationOutput); ok { + replicationConfiguration = flattenAwsS3BucketReplicationConfiguration(replication.ReplicationConfiguration) + } + if err := d.Set("replication_configuration", replicationConfiguration); err != nil { + return fmt.Errorf("error setting replication_configuration: %s", err) } // Read the bucket server side encryption configuration @@ -1054,22 +1068,16 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { Bucket: aws.String(d.Id()), }) }) - if err != nil { - if isAWSErr(err, "ServerSideEncryptionConfigurationNotFoundError", "encryption configuration was not found") { - log.Printf("[DEBUG] Default encryption is not enabled for %s", d.Id()) - d.Set("server_side_encryption_configuration", []map[string]interface{}{}) - } else { - return err - } - } else { - encryption := encryptionResponse.(*s3.GetBucketEncryptionOutput) - log.Printf("[DEBUG] S3 Bucket: %s, read encryption configuration: %v", d.Id(), encryption) - if c := encryption.ServerSideEncryptionConfiguration; c != nil { - if err := d.Set("server_side_encryption_configuration", flattenAwsS3ServerSideEncryptionConfiguration(c)); err != nil { - log.Printf("[DEBUG] Error setting server side encryption configuration: %s", err) - return err - } - } + if err != nil && !isAWSErr(err, "ServerSideEncryptionConfigurationNotFoundError", "encryption configuration was not found") { + return fmt.Errorf("error getting S3 Bucket encryption: %s", err) + } + + serverSideEncryptionConfiguration := make([]map[string]interface{}, 0) + if encryption, ok := encryptionResponse.(*s3.GetBucketEncryptionOutput); ok && encryption.ServerSideEncryptionConfiguration != nil { + serverSideEncryptionConfiguration = flattenAwsS3ServerSideEncryptionConfiguration(encryption.ServerSideEncryptionConfiguration) + } + if err := d.Set("server_side_encryption_configuration", serverSideEncryptionConfiguration); err != nil { + return fmt.Errorf("error setting server_side_encryption_configuration: %s", err) } // Add the region as an attribute @@ -1082,11 +1090,11 @@ func resourceAwsS3BucketRead(d *schema.ResourceData, meta interface{}) error { ) }) if err != nil { - return err + return fmt.Errorf("error getting S3 Bucket location: %s", err) } - location := locationResponse.(*s3.GetBucketLocationOutput) + var region string - if location.LocationConstraint != nil { + if location, ok := locationResponse.(*s3.GetBucketLocationOutput); ok && location.LocationConstraint != nil { region = *location.LocationConstraint } region = normalizeRegion(region) @@ -1149,64 +1157,70 @@ func resourceAwsS3BucketDelete(d *schema.ResourceData, meta interface{}) error { _, err := s3conn.DeleteBucket(&s3.DeleteBucketInput{ Bucket: aws.String(d.Id()), }) - if err != nil { - ec2err, ok := err.(awserr.Error) - if ok && ec2err.Code() == "BucketNotEmpty" { - if d.Get("force_destroy").(bool) { - // bucket may have things delete them - log.Printf("[DEBUG] S3 Bucket attempting to forceDestroy %+v", err) - - bucket := d.Get("bucket").(string) - resp, err := s3conn.ListObjectVersions( - &s3.ListObjectVersionsInput{ - Bucket: aws.String(bucket), - }, - ) - if err != nil { - return fmt.Errorf("Error S3 Bucket list Object Versions err: %s", err) - } + if isAWSErr(err, s3.ErrCodeNoSuchBucket, "") { + return nil + } - objectsToDelete := make([]*s3.ObjectIdentifier, 0) + if isAWSErr(err, "BucketNotEmpty", "") { + if d.Get("force_destroy").(bool) { + // bucket may have things delete them + log.Printf("[DEBUG] S3 Bucket attempting to forceDestroy %+v", err) - if len(resp.DeleteMarkers) != 0 { + bucket := d.Get("bucket").(string) + resp, err := s3conn.ListObjectVersions( + &s3.ListObjectVersionsInput{ + Bucket: aws.String(bucket), + }, + ) - for _, v := range resp.DeleteMarkers { - objectsToDelete = append(objectsToDelete, &s3.ObjectIdentifier{ - Key: v.Key, - VersionId: v.VersionId, - }) - } - } + if err != nil { + return fmt.Errorf("Error S3 Bucket list Object Versions err: %s", err) + } - if len(resp.Versions) != 0 { - for _, v := range resp.Versions { - objectsToDelete = append(objectsToDelete, &s3.ObjectIdentifier{ - Key: v.Key, - VersionId: v.VersionId, - }) - } + objectsToDelete := make([]*s3.ObjectIdentifier, 0) + + if len(resp.DeleteMarkers) != 0 { + + for _, v := range resp.DeleteMarkers { + objectsToDelete = append(objectsToDelete, &s3.ObjectIdentifier{ + Key: v.Key, + VersionId: v.VersionId, + }) } + } - params := &s3.DeleteObjectsInput{ - Bucket: aws.String(bucket), - Delete: &s3.Delete{ - Objects: objectsToDelete, - }, + if len(resp.Versions) != 0 { + for _, v := range resp.Versions { + objectsToDelete = append(objectsToDelete, &s3.ObjectIdentifier{ + Key: v.Key, + VersionId: v.VersionId, + }) } + } - _, err = s3conn.DeleteObjects(params) + params := &s3.DeleteObjectsInput{ + Bucket: aws.String(bucket), + Delete: &s3.Delete{ + Objects: objectsToDelete, + }, + } - if err != nil { - return fmt.Errorf("Error S3 Bucket force_destroy error deleting: %s", err) - } + _, err = s3conn.DeleteObjects(params) - // this line recurses until all objects are deleted or an error is returned - return resourceAwsS3BucketDelete(d, meta) + if err != nil { + return fmt.Errorf("Error S3 Bucket force_destroy error deleting: %s", err) } + + // this line recurses until all objects are deleted or an error is returned + return resourceAwsS3BucketDelete(d, meta) } - return fmt.Errorf("Error deleting S3 Bucket: %s %q", err, d.Get("bucket").(string)) } + + if err != nil { + return fmt.Errorf("error deleting S3 Bucket (%s): %s", d.Id(), err) + } + return nil } @@ -1322,19 +1336,17 @@ func resourceAwsS3BucketCorsUpdate(s3conn *s3.S3, d *schema.ResourceData) error func resourceAwsS3BucketWebsiteUpdate(s3conn *s3.S3, d *schema.ResourceData) error { ws := d.Get("website").([]interface{}) - if len(ws) == 1 { - var w map[string]interface{} - if ws[0] != nil { - w = ws[0].(map[string]interface{}) - } else { - w = make(map[string]interface{}) - } - return resourceAwsS3BucketWebsitePut(s3conn, d, w) - } else if len(ws) == 0 { + if len(ws) == 0 { return resourceAwsS3BucketWebsiteDelete(s3conn, d) + } + + var w map[string]interface{} + if ws[0] != nil { + w = ws[0].(map[string]interface{}) } else { - return fmt.Errorf("Cannot specify more than one website.") + w = make(map[string]interface{}) } + return resourceAwsS3BucketWebsitePut(s3conn, d, w) } func resourceAwsS3BucketWebsitePut(s3conn *s3.S3, d *schema.ResourceData, website map[string]interface{}) error { @@ -1761,12 +1773,14 @@ func resourceAwsS3BucketReplicationConfigurationUpdate(s3conn *s3.S3, d *schema. rules := []*s3.ReplicationRule{} for _, v := range rcRules { rr := v.(map[string]interface{}) - rcRule := &s3.ReplicationRule{ - Prefix: aws.String(rr["prefix"].(string)), - Status: aws.String(rr["status"].(string)), + rcRule := &s3.ReplicationRule{} + if status, ok := rr["status"]; ok && status != "" { + rcRule.Status = aws.String(status.(string)) + } else { + continue } - if rrid, ok := rr["id"]; ok { + if rrid, ok := rr["id"]; ok && rrid != "" { rcRule.ID = aws.String(rrid.(string)) } @@ -1784,6 +1798,18 @@ func resourceAwsS3BucketReplicationConfigurationUpdate(s3conn *s3.S3, d *schema. ReplicaKmsKeyID: aws.String(replicaKmsKeyId.(string)), } } + + if account, ok := bd["account_id"]; ok && account != "" { + ruleDestination.Account = aws.String(account.(string)) + } + + if aclTranslation, ok := bd["access_control_translation"].([]interface{}); ok && len(aclTranslation) > 0 { + aclTranslationValues := aclTranslation[0].(map[string]interface{}) + ruleAclTranslation := &s3.AccessControlTranslation{} + ruleAclTranslation.Owner = aws.String(aclTranslationValues["owner"].(string)) + ruleDestination.AccessControlTranslation = ruleAclTranslation + } + } rcRule.Destination = ruleDestination @@ -1802,6 +1828,29 @@ func resourceAwsS3BucketReplicationConfigurationUpdate(s3conn *s3.S3, d *schema. } rcRule.SourceSelectionCriteria = ruleSsc } + + if f, ok := rr["filter"].([]interface{}); ok && len(f) > 0 { + // XML schema V2. + rcRule.Priority = aws.Int64(int64(rr["priority"].(int))) + rcRule.Filter = &s3.ReplicationRuleFilter{} + filter := f[0].(map[string]interface{}) + tags := filter["tags"].(map[string]interface{}) + if len(tags) > 0 { + rcRule.Filter.And = &s3.ReplicationRuleAndOperator{ + Prefix: aws.String(filter["prefix"].(string)), + Tags: tagsFromMapS3(tags), + } + } else { + rcRule.Filter.Prefix = aws.String(filter["prefix"].(string)) + } + rcRule.DeleteMarkerReplication = &s3.DeleteMarkerReplication{ + Status: aws.String(s3.DeleteMarkerReplicationStatusDisabled), + } + } else { + // XML schema V1. + rcRule.Prefix = aws.String(rr["prefix"].(string)) + } + rules = append(rules, rcRule) } @@ -1812,8 +1861,15 @@ func resourceAwsS3BucketReplicationConfigurationUpdate(s3conn *s3.S3, d *schema. } log.Printf("[DEBUG] S3 put bucket replication configuration: %#v", i) - _, err := retryOnAwsCode("NoSuchBucket", func() (interface{}, error) { - return s3conn.PutBucketReplication(i) + err := resource.Retry(1*time.Minute, func() *resource.RetryError { + if _, err := s3conn.PutBucketReplication(i); err != nil { + if isAWSErr(err, s3.ErrCodeNoSuchBucket, "") || + isAWSErr(err, "InvalidRequest", "Versioning must be 'Enabled' on the bucket") { + return resource.RetryableError(err) + } + return resource.NonRetryableError(err) + } + return nil }) if err != nil { return fmt.Errorf("Error putting S3 replication configuration: %s", err) @@ -2029,6 +2085,15 @@ func flattenAwsS3BucketReplicationConfiguration(r *s3.ReplicationConfiguration) rd["replica_kms_key_id"] = *v.Destination.EncryptionConfiguration.ReplicaKmsKeyID } } + if v.Destination.Account != nil { + rd["account_id"] = *v.Destination.Account + } + if v.Destination.AccessControlTranslation != nil { + rdt := map[string]interface{}{ + "owner": aws.StringValue(v.Destination.AccessControlTranslation.Owner), + } + rd["access_control_translation"] = []interface{}{rdt} + } t["destination"] = schema.NewSet(destinationHash, []interface{}{rd}) } @@ -2054,6 +2119,26 @@ func flattenAwsS3BucketReplicationConfiguration(r *s3.ReplicationConfiguration) } t["source_selection_criteria"] = schema.NewSet(sourceSelectionCriteriaHash, []interface{}{tssc}) } + + if v.Priority != nil { + t["priority"] = int(aws.Int64Value(v.Priority)) + } + + if f := v.Filter; f != nil { + m := map[string]interface{}{} + if f.Prefix != nil { + m["prefix"] = aws.StringValue(f.Prefix) + } + if t := f.Tag; t != nil { + m["tags"] = tagsMapToRaw(tagsToMapS3([]*s3.Tag{t})) + } + if a := f.And; a != nil { + m["prefix"] = aws.StringValue(a.Prefix) + m["tags"] = tagsMapToRaw(tagsToMapS3(a.Tags)) + } + t["filter"] = []interface{}{m} + } + rules = append(rules, t) } m["rules"] = schema.NewSet(rulesHash, rules) @@ -2199,6 +2284,24 @@ func rulesHash(v interface{}) int { if v, ok := m["source_selection_criteria"].(*schema.Set); ok && v.Len() > 0 && v.List()[0] != nil { buf.WriteString(fmt.Sprintf("%d-", sourceSelectionCriteriaHash(v.List()[0]))) } + if v, ok := m["priority"]; ok { + buf.WriteString(fmt.Sprintf("%d-", v.(int))) + } + if v, ok := m["filter"].([]interface{}); ok && len(v) > 0 && v[0] != nil { + buf.WriteString(fmt.Sprintf("%d-", replicationRuleFilterHash(v[0]))) + } + return hashcode.String(buf.String()) +} + +func replicationRuleFilterHash(v interface{}) int { + var buf bytes.Buffer + m := v.(map[string]interface{}) + if v, ok := m["prefix"]; ok { + buf.WriteString(fmt.Sprintf("%s-", v.(string))) + } + if v, ok := m["tags"]; ok { + buf.WriteString(fmt.Sprintf("%d-", tagsMapToHash(v.(map[string]interface{})))) + } return hashcode.String(buf.String()) } @@ -2215,6 +2318,26 @@ func destinationHash(v interface{}) int { if v, ok := m["replica_kms_key_id"]; ok { buf.WriteString(fmt.Sprintf("%s-", v.(string))) } + if v, ok := m["account"]; ok { + buf.WriteString(fmt.Sprintf("%s-", v.(string))) + } + if v, ok := m["access_control_translation"].([]interface{}); ok && len(v) > 0 && v[0] != nil { + buf.WriteString(fmt.Sprintf("%d-", accessControlTranslationHash(v[0]))) + } + return hashcode.String(buf.String()) +} + +func accessControlTranslationHash(v interface{}) int { + // v is nil if empty access_control_translation is given. + if v == nil { + return 0 + } + var buf bytes.Buffer + m := v.(map[string]interface{}) + + if v, ok := m["owner"]; ok { + buf.WriteString(fmt.Sprintf("%s-", v.(string))) + } return hashcode.String(buf.String()) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_inventory.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_inventory.go index 71b8f7eb0d..7b4bd5bb4b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_inventory.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_inventory.go @@ -1,7 +1,6 @@ package aws import ( - "errors" "fmt" "log" "strings" @@ -34,7 +33,7 @@ func resourceAwsS3BucketInventory() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: validateMaxLength(64), + ValidateFunc: validation.StringLenBetween(0, 64), }, "enabled": { Type: schema.TypeBool, @@ -303,6 +302,9 @@ func resourceAwsS3BucketInventoryRead(d *schema.ResourceData, meta interface{}) } return nil }) + if err != nil { + return fmt.Errorf("error getting S3 Bucket Inventory (%s): %s", d.Id(), err) + } if output == nil || output.InventoryConfiguration == nil { log.Printf("[WARN] %s S3 bucket inventory configuration not found, removing from state.", d.Id()) @@ -326,14 +328,6 @@ func resourceAwsS3BucketInventoryRead(d *schema.ResourceData, meta interface{}) } if output.InventoryConfiguration.Destination != nil { - // Flag the existence of SSE-S3 encryption because it cannot be marshaled when updating a resource. - // Allowing import would risk disabling encryption inadvertently when applying updates. - if output.InventoryConfiguration.Destination.S3BucketDestination.Encryption != nil { - if output.InventoryConfiguration.Destination.S3BucketDestination.Encryption.SSES3 != nil { - return errors.New("sse_s3 encryption is unsupported") - } - } - destination := map[string]interface{}{ "bucket": flattenS3InventoryS3BucketDestination(output.InventoryConfiguration.Destination.S3BucketDestination), } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_object.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_object.go index 63a3e7d832..d67623bdee 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_object.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_object.go @@ -27,6 +27,8 @@ func resourceAwsS3BucketObject() *schema.Resource { Update: resourceAwsS3BucketObjectPut, Delete: resourceAwsS3BucketObjectDelete, + CustomizeDiff: updateComputedAttributes, + Schema: map[string]*schema.Schema{ "bucket": { Type: schema.TypeString, @@ -152,6 +154,13 @@ func resourceAwsS3BucketObject() *schema.Resource { } } +func updateComputedAttributes(d *schema.ResourceDiff, meta interface{}) error { + if d.HasChange("etag") { + d.SetNewComputed("version_id") + } + return nil +} + func resourceAwsS3BucketObjectPut(d *schema.ResourceData, meta interface{}) error { s3conn := meta.(*AWSClient).s3conn diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_policy.go index b7f7fed8f4..ea41b6b7bc 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_s3_bucket_policy.go @@ -10,6 +10,7 @@ import ( "github.com/aws/aws-sdk-go/service/s3" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsS3BucketPolicy() *schema.Resource { @@ -18,6 +19,9 @@ func resourceAwsS3BucketPolicy() *schema.Resource { Read: resourceAwsS3BucketPolicyRead, Update: resourceAwsS3BucketPolicyPut, Delete: resourceAwsS3BucketPolicyDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "bucket": { @@ -29,7 +33,7 @@ func resourceAwsS3BucketPolicy() *schema.Resource { "policy": { Type: schema.TypeString, Required: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, }, @@ -85,6 +89,9 @@ func resourceAwsS3BucketPolicyRead(d *schema.ResourceData, meta interface{}) err if err := d.Set("policy", v); err != nil { return err } + if err := d.Set("bucket", d.Id()); err != nil { + return err + } return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_secretsmanager_secret.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_secretsmanager_secret.go index 1d7c153b8a..edb1268703 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_secretsmanager_secret.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_secretsmanager_secret.go @@ -10,6 +10,7 @@ import ( "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/structure" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsSecretsManagerSecret() *schema.Resource { @@ -36,14 +37,25 @@ func resourceAwsSecretsManagerSecret() *schema.Resource { Optional: true, }, "name": { - Type: schema.TypeString, - Required: true, - ForceNew: true, + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name_prefix"}, + ValidateFunc: validateSecretManagerSecretName, + }, + "name_prefix": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + ConflictsWith: []string{"name"}, + ValidateFunc: validateSecretManagerSecretNamePrefix, }, "policy": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, "recovery_window_in_days": { @@ -91,9 +103,18 @@ func resourceAwsSecretsManagerSecret() *schema.Resource { func resourceAwsSecretsManagerSecretCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).secretsmanagerconn + var secretName string + if v, ok := d.GetOk("name"); ok { + secretName = v.(string) + } else if v, ok := d.GetOk("name_prefix"); ok { + secretName = resource.PrefixedUniqueId(v.(string)) + } else { + secretName = resource.UniqueId() + } + input := &secretsmanager.CreateSecretInput{ Description: aws.String(d.Get("description").(string)), - Name: aws.String(d.Get("name").(string)), + Name: aws.String(secretName), } if v, ok := d.GetOk("kms_key_id"); ok && v.(string) != "" { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_secretsmanager_secret_version.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_secretsmanager_secret_version.go index ac50964269..e90384f906 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_secretsmanager_secret_version.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_secretsmanager_secret_version.go @@ -5,6 +5,8 @@ import ( "log" "strings" + "encoding/base64" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/secretsmanager" "github.com/hashicorp/terraform/helper/schema" @@ -31,10 +33,18 @@ func resourceAwsSecretsManagerSecretVersion() *schema.Resource { ForceNew: true, }, "secret_string": { - Type: schema.TypeString, - Required: true, - ForceNew: true, - Sensitive: true, + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Sensitive: true, + ConflictsWith: []string{"secret_binary"}, + }, + "secret_binary": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Sensitive: true, + ConflictsWith: []string{"secret_string"}, }, "version_id": { Type: schema.TypeString, @@ -55,8 +65,26 @@ func resourceAwsSecretsManagerSecretVersionCreate(d *schema.ResourceData, meta i secretID := d.Get("secret_id").(string) input := &secretsmanager.PutSecretValueInput{ - SecretId: aws.String(secretID), - SecretString: aws.String(d.Get("secret_string").(string)), + SecretId: aws.String(secretID), + } + + if v, ok := d.GetOk("secret_string"); ok { + input.SecretString = aws.String(v.(string)) + } + + if v, ok := d.GetOk("secret_binary"); ok { + vs := []byte(v.(string)) + + if !isBase64Encoded(vs) { + return fmt.Errorf("expected base64 in secret_binary") + } + + var err error + input.SecretBinary, err = base64.StdEncoding.DecodeString(v.(string)) + + if err != nil { + return fmt.Errorf("error decoding secret binary value: %s", err) + } } if v, ok := d.GetOk("version_stages"); ok { @@ -105,6 +133,7 @@ func resourceAwsSecretsManagerSecretVersionRead(d *schema.ResourceData, meta int d.Set("secret_id", secretID) d.Set("secret_string", output.SecretString) + d.Set("secret_binary", base64Encode(output.SecretBinary)) d.Set("version_id", output.VersionId) d.Set("arn", output.ARN) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group.go index 3b5da9805e..4db73d56ca 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group.go @@ -16,6 +16,7 @@ import ( "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsSecurityGroup() *schema.Resource { @@ -43,7 +44,7 @@ func resourceAwsSecurityGroup() *schema.Resource { Computed: true, ForceNew: true, ConflictsWith: []string{"name_prefix"}, - ValidateFunc: validateMaxLength(255), + ValidateFunc: validation.StringLenBetween(0, 255), }, "name_prefix": { @@ -51,7 +52,7 @@ func resourceAwsSecurityGroup() *schema.Resource { Optional: true, ForceNew: true, ConflictsWith: []string{"name"}, - ValidateFunc: validateMaxLength(100), + ValidateFunc: validation.StringLenBetween(0, 100), }, "description": { @@ -59,7 +60,7 @@ func resourceAwsSecurityGroup() *schema.Resource { Optional: true, ForceNew: true, Default: "Managed by Terraform", - ValidateFunc: validateMaxLength(255), + ValidateFunc: validation.StringLenBetween(0, 255), }, "vpc_id": { @@ -109,6 +110,12 @@ func resourceAwsSecurityGroup() *schema.Resource { }, }, + "prefix_list_ids": { + Type: schema.TypeList, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "security_groups": { Type: schema.TypeSet, Optional: true, @@ -439,7 +446,7 @@ func resourceAwsSecurityGroupDelete(d *schema.ResourceData, meta interface{}) er log.Printf("[DEBUG] Security Group destroy: %v", d.Id()) - if err := deleteLingeringLambdaENIs(conn, d); err != nil { + if err := deleteLingeringLambdaENIs(conn, d, "group-id"); err != nil { return fmt.Errorf("Failed to delete Lambda ENIs: %s", err) } @@ -1381,24 +1388,22 @@ func protocolForValue(v string) string { // Similar to protocolIntegers() used by Network ACLs, but explicitly only // supports "tcp", "udp", "icmp", and "all" func sgProtocolIntegers() map[string]int { - var protocolIntegers = make(map[string]int) - protocolIntegers = map[string]int{ + return map[string]int{ "udp": 17, "tcp": 6, "icmp": 1, "all": -1, } - return protocolIntegers } // The AWS Lambda service creates ENIs behind the scenes and keeps these around for a while // which would prevent SGs attached to such ENIs from being destroyed -func deleteLingeringLambdaENIs(conn *ec2.EC2, d *schema.ResourceData) error { +func deleteLingeringLambdaENIs(conn *ec2.EC2, d *schema.ResourceData, filterName string) error { // Here we carefully find the offenders params := &ec2.DescribeNetworkInterfacesInput{ Filters: []*ec2.Filter{ { - Name: aws.String("group-id"), + Name: aws.String(filterName), Values: []*string{aws.String(d.Id())}, }, { @@ -1408,6 +1413,11 @@ func deleteLingeringLambdaENIs(conn *ec2.EC2, d *schema.ResourceData) error { }, } networkInterfaceResp, err := conn.DescribeNetworkInterfaces(params) + + if isAWSErr(err, "InvalidNetworkInterfaceID.NotFound", "") { + return nil + } + if err != nil { return err } @@ -1421,6 +1431,10 @@ func deleteLingeringLambdaENIs(conn *ec2.EC2, d *schema.ResourceData) error { } _, detachNetworkInterfaceErr := conn.DetachNetworkInterface(detachNetworkInterfaceParams) + if isAWSErr(detachNetworkInterfaceErr, "InvalidNetworkInterfaceID.NotFound", "") { + return nil + } + if detachNetworkInterfaceErr != nil { return detachNetworkInterfaceErr } @@ -1443,6 +1457,10 @@ func deleteLingeringLambdaENIs(conn *ec2.EC2, d *schema.ResourceData) error { } _, deleteNetworkInterfaceErr := conn.DeleteNetworkInterface(deleteNetworkInterfaceParams) + if isAWSErr(deleteNetworkInterfaceErr, "InvalidNetworkInterfaceID.NotFound", "") { + return nil + } + if deleteNetworkInterfaceErr != nil { return deleteNetworkInterfaceErr } @@ -1459,8 +1477,11 @@ func networkInterfaceAttachedRefreshFunc(conn *ec2.EC2, id string) resource.Stat } describeResp, err := conn.DescribeNetworkInterfaces(describe_network_interfaces_request) + if isAWSErr(err, "InvalidNetworkInterfaceID.NotFound", "") { + return 42, "false", nil + } + if err != nil { - log.Printf("[ERROR] Could not find network interface %s. %s", id, err) return nil, "", err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_rule.go index d711d31ae3..025f364f61 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_rule.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_rule.go @@ -5,13 +5,13 @@ import ( "fmt" "log" "sort" + "strconv" "strings" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -24,6 +24,18 @@ func resourceAwsSecurityGroupRule() *schema.Resource { Read: resourceAwsSecurityGroupRuleRead, Update: resourceAwsSecurityGroupRuleUpdate, Delete: resourceAwsSecurityGroupRuleDelete, + Importer: &schema.ResourceImporter{ + State: func(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + importParts, err := validateSecurityGroupRuleImportString(d.Id()) + if err != nil { + return nil, err + } + if err := populateSecurityGroupRuleFromImport(d, importParts); err != nil { + return nil, err + } + return []*schema.ResourceData{d}, nil + }, + }, SchemaVersion: 2, MigrateState: resourceAwsSecurityGroupRuleMigrateState, @@ -44,12 +56,28 @@ func resourceAwsSecurityGroupRule() *schema.Resource { Type: schema.TypeInt, Required: true, ForceNew: true, + // Support existing configurations that have non-zero from_port and to_port defined with all protocols + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + protocol := protocolForValue(d.Get("protocol").(string)) + if protocol == "-1" && old == "0" { + return true + } + return false + }, }, "to_port": { Type: schema.TypeInt, Required: true, ForceNew: true, + // Support existing configurations that have non-zero from_port and to_port defined with all protocols + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + protocol := protocolForValue(d.Get("protocol").(string)) + if protocol == "-1" && old == "0" { + return true + } + return false + }, }, "protocol": { @@ -257,6 +285,7 @@ func resourceAwsSecurityGroupRuleRead(d *schema.ResourceData, meta interface{}) default: rules = sg.IpPermissionsEgress } + log.Printf("[DEBUG] Rules %v", rules) p, err := expandIPPerm(d, sg) if err != nil { @@ -283,11 +312,17 @@ func resourceAwsSecurityGroupRuleRead(d *schema.ResourceData, meta interface{}) d.Set("type", ruleType) if err := setFromIPPerm(d, sg, p); err != nil { - return errwrap.Wrapf("Error setting IP Permission for Security Group Rule: {{err}}", err) + return fmt.Errorf("Error setting IP Permission for Security Group Rule: %s", err) } d.Set("description", descriptionFromIPPerm(d, rule)) + if strings.Contains(d.Id(), "_") { + // import so fix the id + id := ipPermissionIDHash(sg_id, ruleType, p) + d.SetId(id) + } + return nil } @@ -411,21 +446,24 @@ func (b ByGroupPair) Less(i, j int) bool { func findRuleMatch(p *ec2.IpPermission, rules []*ec2.IpPermission, isVPC bool) *ec2.IpPermission { var rule *ec2.IpPermission for _, r := range rules { - if r.ToPort != nil && *p.ToPort != *r.ToPort { + if p.ToPort != nil && r.ToPort != nil && *p.ToPort != *r.ToPort { continue } - if r.FromPort != nil && *p.FromPort != *r.FromPort { + if p.FromPort != nil && r.FromPort != nil && *p.FromPort != *r.FromPort { continue } - if r.IpProtocol != nil && *p.IpProtocol != *r.IpProtocol { + if p.IpProtocol != nil && r.IpProtocol != nil && *p.IpProtocol != *r.IpProtocol { continue } remaining := len(p.IpRanges) for _, ip := range p.IpRanges { for _, rip := range r.IpRanges { + if ip.CidrIp == nil || rip.CidrIp == nil { + continue + } if *ip.CidrIp == *rip.CidrIp { remaining-- } @@ -439,6 +477,9 @@ func findRuleMatch(p *ec2.IpPermission, rules []*ec2.IpPermission, isVPC bool) * remaining = len(p.Ipv6Ranges) for _, ipv6 := range p.Ipv6Ranges { for _, ipv6ip := range r.Ipv6Ranges { + if ipv6.CidrIpv6 == nil || ipv6ip.CidrIpv6 == nil { + continue + } if *ipv6.CidrIpv6 == *ipv6ip.CidrIpv6 { remaining-- } @@ -452,6 +493,9 @@ func findRuleMatch(p *ec2.IpPermission, rules []*ec2.IpPermission, isVPC bool) * remaining = len(p.PrefixListIds) for _, pl := range p.PrefixListIds { for _, rpl := range r.PrefixListIds { + if pl.PrefixListId == nil || rpl.PrefixListId == nil { + continue + } if *pl.PrefixListId == *rpl.PrefixListId { remaining-- } @@ -466,10 +510,16 @@ func findRuleMatch(p *ec2.IpPermission, rules []*ec2.IpPermission, isVPC bool) * for _, ip := range p.UserIdGroupPairs { for _, rip := range r.UserIdGroupPairs { if isVPC { + if ip.GroupId == nil || rip.GroupId == nil { + continue + } if *ip.GroupId == *rip.GroupId { remaining-- } } else { + if ip.GroupName == nil || rip.GroupName == nil { + continue + } if *ip.GroupName == *rip.GroupName { remaining-- } @@ -558,11 +608,15 @@ func ipPermissionIDHash(sg_id, ruleType string, ip *ec2.IpPermission) string { func expandIPPerm(d *schema.ResourceData, sg *ec2.SecurityGroup) (*ec2.IpPermission, error) { var perm ec2.IpPermission - perm.FromPort = aws.Int64(int64(d.Get("from_port").(int))) - perm.ToPort = aws.Int64(int64(d.Get("to_port").(int))) protocol := protocolForValue(d.Get("protocol").(string)) perm.IpProtocol = aws.String(protocol) + // InvalidParameterValue: When protocol is ALL, you cannot specify from-port. + if protocol != "-1" { + perm.FromPort = aws.Int64(int64(d.Get("from_port").(int))) + perm.ToPort = aws.Int64(int64(d.Get("to_port").(int))) + } + // build a group map that behaves like a set groups := make(map[string]bool) if raw, ok := d.GetOk("source_security_group_id"); ok { @@ -846,3 +900,104 @@ func resourceSecurityGroupRuleDescriptionUpdate(conn *ec2.EC2, d *schema.Resourc return nil } + +// validateSecurityGroupRuleImportString does minimal validation of import string without going to AWS +func validateSecurityGroupRuleImportString(importStr string) ([]string, error) { + // example: sg-09a093729ef9382a6_ingress_tcp_8000_8000_10.0.3.0/24 + // example: sg-09a093729ef9382a6_ingress_92_0_65536_10.0.3.0/24_10.0.4.0/24 + // example: sg-09a093729ef9382a6_egress_tcp_8000_8000_10.0.3.0/24 + // example: sg-09a093729ef9382a6_egress_tcp_8000_8000_pl-34800000 + // example: sg-09a093729ef9382a6_ingress_all_0_65536_sg-08123412342323 + // example: sg-09a093729ef9382a6_ingress_tcp_100_121_10.1.0.0/16_2001:db8::/48_10.2.0.0/16_2002:db8::/48 + + log.Printf("[DEBUG] Validating import string %s", importStr) + + importParts := strings.Split(strings.ToLower(importStr), "_") + errStr := "unexpected format of import string (%q), expected SECURITYGROUPID_TYPE_PROTOCOL_FROMPORT_TOPORT_SOURCE[_SOURCE]*: %s" + if len(importParts) < 6 { + return nil, fmt.Errorf(errStr, importStr, "too few parts") + } + + sgID := importParts[0] + ruleType := importParts[1] + protocol := importParts[2] + fromPort := importParts[3] + toPort := importParts[4] + sources := importParts[5:] + + if !strings.HasPrefix(sgID, "sg-") { + return nil, fmt.Errorf(errStr, importStr, "invalid security group ID") + } + + if ruleType != "ingress" && ruleType != "egress" { + return nil, fmt.Errorf(errStr, importStr, "expecting 'ingress' or 'egress'") + } + + if _, ok := sgProtocolIntegers()[protocol]; !ok { + if _, err := strconv.Atoi(protocol); err != nil { + return nil, fmt.Errorf(errStr, importStr, "protocol must be tcp/udp/icmp/all or a number") + } + } + + if p1, err := strconv.Atoi(fromPort); err != nil { + return nil, fmt.Errorf(errStr, importStr, "invalid port") + } else if p2, err := strconv.Atoi(toPort); err != nil || p2 < p1 { + return nil, fmt.Errorf(errStr, importStr, "invalid port") + } + + for _, source := range sources { + // will be properly validated later + if source != "self" && !strings.Contains(source, "sg-") && !strings.Contains(source, "pl-") && !strings.Contains(source, ":") && !strings.Contains(source, ".") { + return nil, fmt.Errorf(errStr, importStr, "source must be cidr, ipv6cidr, prefix list, 'self', or a sg ID") + } + } + + log.Printf("[DEBUG] Validated import string %s", importStr) + return importParts, nil +} + +func populateSecurityGroupRuleFromImport(d *schema.ResourceData, importParts []string) error { + log.Printf("[DEBUG] Populating resource data on import: %v", importParts) + + sgID := importParts[0] + ruleType := importParts[1] + protocol := importParts[2] + fromPort, _ := strconv.Atoi(importParts[3]) + toPort, _ := strconv.Atoi(importParts[4]) + sources := importParts[5:] + + d.Set("security_group_id", sgID) + + if ruleType == "ingress" { + d.Set("type", ruleType) + } else { + d.Set("type", "egress") + } + + d.Set("protocol", protocolForValue(protocol)) + d.Set("from_port", fromPort) + d.Set("to_port", toPort) + + d.Set("self", false) + var cidrs []string + var prefixList []string + var ipv6cidrs []string + for _, source := range sources { + if source == "self" { + d.Set("self", true) + } else if strings.Contains(source, "sg-") { + d.Set("source_security_group_id", source) + } else if strings.Contains(source, "pl-") { + prefixList = append(prefixList, source) + } else if strings.Contains(source, ":") { + ipv6cidrs = append(ipv6cidrs, source) + } else { + cidrs = append(cidrs, source) + } + } + d.Set("ipv6_cidr_blocks", ipv6cidrs) + d.Set("cidr_blocks", cidrs) + d.Set("prefix_list_ids", prefixList) + + return nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_rule_migrate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_rule_migrate.go index 5caadfa8a3..1b2cb21f8d 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_rule_migrate.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_security_group_rule_migrate.go @@ -37,7 +37,7 @@ func migrateSGRuleStateV0toV1(is *terraform.InstanceState) (*terraform.InstanceS perm, err := migrateExpandIPPerm(is.Attributes) if err != nil { - return nil, fmt.Errorf("[WARN] Error making new IP Permission in Security Group migration") + return nil, fmt.Errorf("Error making new IP Permission in Security Group migration") } log.Printf("[DEBUG] Attributes before migration: %#v", is.Attributes) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_service.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_service.go index 25a8553e5e..efaeacef4b 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_service.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_service.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/service/servicediscovery" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsServiceDiscoveryService() *schema.Resource { @@ -55,12 +56,12 @@ func resourceAwsServiceDiscoveryService() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: validateStringIn( + ValidateFunc: validation.StringInSlice([]string{ servicediscovery.RecordTypeSrv, servicediscovery.RecordTypeA, servicediscovery.RecordTypeAaaa, servicediscovery.RecordTypeCname, - ), + }, false), }, }, }, @@ -70,10 +71,10 @@ func resourceAwsServiceDiscoveryService() *schema.Resource { Optional: true, ForceNew: true, Default: servicediscovery.RoutingPolicyMultivalue, - ValidateFunc: validateStringIn( + ValidateFunc: validation.StringInSlice([]string{ servicediscovery.RoutingPolicyMultivalue, servicediscovery.RoutingPolicyWeighted, - ), + }, false), }, }, }, @@ -96,11 +97,11 @@ func resourceAwsServiceDiscoveryService() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validateStringIn( + ValidateFunc: validation.StringInSlice([]string{ servicediscovery.HealthCheckTypeHttp, servicediscovery.HealthCheckTypeHttps, servicediscovery.HealthCheckTypeTcp, - ), + }, false), }, }, }, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_service_migrate.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_service_migrate.go deleted file mode 100644 index d0fd571f7c..0000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_service_discovery_service_migrate.go +++ /dev/null @@ -1,36 +0,0 @@ -package aws - -import ( - "fmt" - "log" - - "github.com/aws/aws-sdk-go/service/servicediscovery" - "github.com/hashicorp/terraform/terraform" -) - -func resourceAwsServiceDiscoveryServiceMigrateState( - v int, is *terraform.InstanceState, meta interface{}) (*terraform.InstanceState, error) { - switch v { - case 0: - log.Println("[INFO] Found AWS ServiceDiscovery Service State v0; migrating to v1") - return migrateServiceDiscoveryServiceStateV0toV1(is) - default: - return is, fmt.Errorf("Unexpected schema version: %d", v) - } -} - -func migrateServiceDiscoveryServiceStateV0toV1(is *terraform.InstanceState) (*terraform.InstanceState, error) { - if is.Empty() { - log.Println("[DEBUG] Empty InstanceState; nothing to migrate.") - return is, nil - } - - log.Printf("[DEBUG] Attributes before migration: %#v", is.Attributes) - - if v, ok := is.Attributes["dns_config.0.routing_policy"]; !ok && v == "" { - is.Attributes["dns_config.0.routing_policy"] = servicediscovery.RoutingPolicyMultivalue - } - - log.Printf("[DEBUG] Attributes after migration: %#v", is.Attributes) - return is, nil -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_servicecatalog_portfolio.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_servicecatalog_portfolio.go index 161550ccc4..1fe7129725 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_servicecatalog_portfolio.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_servicecatalog_portfolio.go @@ -47,7 +47,7 @@ func resourceAwsServiceCatalogPortfolio() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ValidateFunc: validateMaxLength(2000), + ValidateFunc: validation.StringLenBetween(0, 2000), }, "provider_name": { Type: schema.TypeString, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_receipt_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_receipt_rule.go index 383ab5b4ef..ba28eadb71 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_receipt_rule.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_receipt_rule.go @@ -5,6 +5,7 @@ import ( "fmt" "log" "sort" + "strings" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" @@ -20,6 +21,9 @@ func resourceAwsSesReceiptRule() *schema.Resource { Update: resourceAwsSesReceiptRuleUpdate, Read: resourceAwsSesReceiptRuleRead, Delete: resourceAwsSesReceiptRuleDelete, + Importer: &schema.ResourceImporter{ + State: resourceAwsSesReceiptRuleImport, + }, Schema: map[string]*schema.Schema{ "name": { @@ -356,11 +360,27 @@ func resourceAwsSesReceiptRule() *schema.Resource { } } +func resourceAwsSesReceiptRuleImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { + idParts := strings.Split(d.Id(), ":") + if len(idParts) != 2 || idParts[0] == "" || idParts[1] == "" { + return nil, fmt.Errorf("unexpected format of ID (%q), expected :", d.Id()) + } + + ruleSetName := idParts[0] + ruleName := idParts[1] + + d.Set("rule_set_name", ruleSetName) + d.Set("name", ruleName) + d.SetId(ruleName) + + return []*schema.ResourceData{d}, nil +} + func resourceAwsSesReceiptRuleCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).sesConn createOpts := &ses.CreateReceiptRuleInput{ - Rule: buildReceiptRule(d, meta), + Rule: buildReceiptRule(d), RuleSetName: aws.String(d.Get("rule_set_name").(string)), } @@ -382,7 +402,7 @@ func resourceAwsSesReceiptRuleUpdate(d *schema.ResourceData, meta interface{}) e conn := meta.(*AWSClient).sesConn updateOpts := &ses.UpdateReceiptRuleInput{ - Rule: buildReceiptRule(d, meta), + Rule: buildReceiptRule(d), RuleSetName: aws.String(d.Get("rule_set_name").(string)), } @@ -598,7 +618,7 @@ func resourceAwsSesReceiptRuleDelete(d *schema.ResourceData, meta interface{}) e return nil } -func buildReceiptRule(d *schema.ResourceData, meta interface{}) *ses.ReceiptRule { +func buildReceiptRule(d *schema.ResourceData) *ses.ReceiptRule { receiptRule := &ses.ReceiptRule{ Name: aws.String(d.Get("name").(string)), } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_template.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_template.go index cecf7c28a8..326a6d0a3c 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_template.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ses_template.go @@ -31,7 +31,7 @@ func resourceAwsSesTemplate() *schema.Resource { "html": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateMaxLength(512000), + ValidateFunc: validation.StringLenBetween(0, 512000), }, "subject": { Type: schema.TypeString, @@ -40,7 +40,7 @@ func resourceAwsSesTemplate() *schema.Resource { "text": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateMaxLength(512000), + ValidateFunc: validation.StringLenBetween(0, 512000), }, }, } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sfn_activity.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sfn_activity.go index 9a5e49d830..9fac361656 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sfn_activity.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sfn_activity.go @@ -10,6 +10,7 @@ import ( "github.com/aws/aws-sdk-go/service/sfn" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsSfnActivity() *schema.Resource { @@ -26,7 +27,7 @@ func resourceAwsSfnActivity() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: validateMaxLength(80), + ValidateFunc: validation.StringLenBetween(0, 80), }, "creation_date": { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sfn_state_machine.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sfn_state_machine.go index 70d8fd08cc..388cfa5629 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sfn_state_machine.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sfn_state_machine.go @@ -8,9 +8,9 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/sfn" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsSfnStateMachine() *schema.Resource { @@ -27,7 +27,7 @@ func resourceAwsSfnStateMachine() *schema.Resource { "definition": { Type: schema.TypeString, Required: true, - ValidateFunc: validateMaxLength(1024 * 1024), // 1048576 + ValidateFunc: validation.StringLenBetween(0, 1024*1024), // 1048576 }, "name": { @@ -87,7 +87,7 @@ func resourceAwsSfnStateMachineCreate(d *schema.ResourceData, meta interface{}) }) if err != nil { - return errwrap.Wrapf("Error creating Step Function State Machine: {{err}}", err) + return fmt.Errorf("Error creating Step Function State Machine: %s", err) } d.SetId(*activity.StateMachineArn) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_platform_application.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_platform_application.go index c425c458ec..c684e06cf8 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_platform_application.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_platform_application.go @@ -203,6 +203,11 @@ func resourceAwsSnsPlatformApplicationRead(d *schema.ResourceData, meta interfac }) if err != nil { + if isAWSErr(err, sns.ErrCodeNotFoundException, "") { + log.Printf("[WARN] SNS Platform Application (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } return err } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic.go index be5d2bfcc8..93284520e1 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic.go @@ -24,6 +24,7 @@ var SNSAttributeMap = map[string]string{ "http_failure_feedback_role_arn": "HTTPFailureFeedbackRoleArn", "http_success_feedback_role_arn": "HTTPSuccessFeedbackRoleArn", "http_success_feedback_sample_rate": "HTTPSuccessFeedbackSampleRate", + "kms_master_key_id": "KmsMasterKeyId", "lambda_failure_feedback_role_arn": "LambdaFailureFeedbackRoleArn", "lambda_success_feedback_role_arn": "LambdaSuccessFeedbackRoleArn", "lambda_success_feedback_sample_rate": "LambdaSuccessFeedbackSampleRate", @@ -65,7 +66,7 @@ func resourceAwsSnsTopic() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) @@ -76,7 +77,7 @@ func resourceAwsSnsTopic() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: false, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentJsonDiffs, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) @@ -109,6 +110,10 @@ func resourceAwsSnsTopic() *schema.Resource { Type: schema.TypeString, Optional: true, }, + "kms_master_key_id": { + Type: schema.TypeString, + Optional: true, + }, "lambda_success_feedback_role_arn": { Type: schema.TypeString, Optional: true, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic_policy.go index 5f8241b006..f2c6ee54e1 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic_policy.go @@ -6,6 +6,7 @@ import ( "regexp" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" @@ -28,7 +29,7 @@ func resourceAwsSnsTopicPolicy() *schema.Resource { "policy": { Type: schema.TypeString, Required: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, }, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic_subscription.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic_subscription.go index 377284f4dd..2607007f7d 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic_subscription.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sns_topic_subscription.go @@ -1,6 +1,8 @@ package aws import ( + "bytes" + "encoding/json" "fmt" "log" "net/url" @@ -13,7 +15,7 @@ import ( "github.com/hashicorp/terraform/helper/validation" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/service/sns" ) @@ -21,14 +23,6 @@ const awsSNSPendingConfirmationMessage = "pending confirmation" const awsSNSPendingConfirmationMessageWithoutSpaces = "pendingconfirmation" const awsSNSPasswordObfuscationPattern = "****" -var SNSSubscriptionAttributeMap = map[string]string{ - "topic_arn": "TopicArn", - "endpoint": "Endpoint", - "protocol": "Protocol", - "raw_message_delivery": "RawMessageDelivery", - "filter_policy": "FilterPolicy", -} - func resourceAwsSnsTopicSubscription() *schema.Resource { return &schema.Resource{ Create: resourceAwsSnsTopicSubscriptionCreate, @@ -75,8 +69,10 @@ func resourceAwsSnsTopicSubscription() *schema.Resource { ForceNew: true, }, "delivery_policy": { - Type: schema.TypeString, - Optional: true, + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.ValidateJsonString, + DiffSuppressFunc: suppressEquivalentSnsTopicSubscriptionDeliveryPolicy, }, "raw_message_delivery": { Type: schema.TypeBool, @@ -90,7 +86,7 @@ func resourceAwsSnsTopicSubscription() *schema.Resource { "filter_policy": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentJsonDiffs, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) @@ -128,42 +124,30 @@ func resourceAwsSnsTopicSubscriptionUpdate(d *schema.ResourceData, meta interfac snsconn := meta.(*AWSClient).snsconn if d.HasChange("raw_message_delivery") { - _, n := d.GetChange("raw_message_delivery") - - attrValue := "false" - - if n.(bool) { - attrValue = "true" - } - - req := &sns.SetSubscriptionAttributesInput{ - SubscriptionArn: aws.String(d.Id()), - AttributeName: aws.String("RawMessageDelivery"), - AttributeValue: aws.String(attrValue), - } - _, err := snsconn.SetSubscriptionAttributes(req) - - if err != nil { - return fmt.Errorf("Unable to set raw message delivery attribute on subscription") + if err := snsSubscriptionAttributeUpdate(snsconn, d.Id(), "RawMessageDelivery", fmt.Sprintf("%t", d.Get("raw_message_delivery").(bool))); err != nil { + return err } } if d.HasChange("filter_policy") { - _, n := d.GetChange("filter_policy") + filterPolicy := d.Get("filter_policy").(string) - attrValue := n.(string) + // https://docs.aws.amazon.com/sns/latest/dg/message-filtering.html#message-filtering-policy-remove + if filterPolicy == "" { + filterPolicy = "{}" + } - req := &sns.SetSubscriptionAttributesInput{ - SubscriptionArn: aws.String(d.Id()), - AttributeName: aws.String("FilterPolicy"), - AttributeValue: aws.String(attrValue), + if err := snsSubscriptionAttributeUpdate(snsconn, d.Id(), "FilterPolicy", filterPolicy); err != nil { + return err } - _, err := snsconn.SetSubscriptionAttributes(req) + } - if err != nil { - return fmt.Errorf("Unable to set filter policy attribute on subscription: %s", err) + if d.HasChange("delivery_policy") { + if err := snsSubscriptionAttributeUpdate(snsconn, d.Id(), "DeliveryPolicy", d.Get("delivery_policy").(string)); err != nil { + return err } } + return resourceAwsSnsTopicSubscriptionRead(d, meta) } @@ -175,34 +159,34 @@ func resourceAwsSnsTopicSubscriptionRead(d *schema.ResourceData, meta interface{ attributeOutput, err := snsconn.GetSubscriptionAttributes(&sns.GetSubscriptionAttributesInput{ SubscriptionArn: aws.String(d.Id()), }) - if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "NotFound" { - log.Printf("[WARN] SNS Topic Subscription (%s) not found, error code (404)", d.Id()) - d.SetId("") - return nil - } - return err + if isAWSErr(err, sns.ErrCodeNotFoundException, "") { + log.Printf("[WARN] SNS Topic Subscription (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + + if err != nil { + return fmt.Errorf("error reading SNS Topic Subscription (%s) attributes: %s", d.Id(), err) } - if attributeOutput.Attributes != nil && len(attributeOutput.Attributes) > 0 { - attrHash := attributeOutput.Attributes - resource := *resourceAwsSnsTopicSubscription() + if attributeOutput == nil || len(attributeOutput.Attributes) == 0 { + return fmt.Errorf("error reading SNS Topic Subscription (%s) attributes: no attributes found", d.Id()) + } - for iKey, oKey := range SNSSubscriptionAttributeMap { - log.Printf("[DEBUG] Reading %s => %s", iKey, oKey) + d.Set("arn", attributeOutput.Attributes["SubscriptionArn"]) + d.Set("delivery_policy", attributeOutput.Attributes["DeliveryPolicy"]) + d.Set("endpoint", attributeOutput.Attributes["Endpoint"]) + d.Set("filter_policy", attributeOutput.Attributes["FilterPolicy"]) + d.Set("protocol", attributeOutput.Attributes["Protocol"]) - if attrHash[oKey] != nil { - if resource.Schema[iKey] != nil { - var value string - value = *attrHash[oKey] - log.Printf("[DEBUG] Reading %s => %s -> %s", iKey, oKey, value) - d.Set(iKey, value) - } - } - } + d.Set("raw_message_delivery", false) + if v, ok := attributeOutput.Attributes["RawMessageDelivery"]; ok && aws.StringValue(v) == "true" { + d.Set("raw_message_delivery", true) } + d.Set("topic_arn", attributeOutput.Attributes["TopicArn"]) + return nil } @@ -337,3 +321,108 @@ func obfuscateEndpoint(endpoint string) string { } return obfuscatedEndpoint } + +func snsSubscriptionAttributeUpdate(snsconn *sns.SNS, subscriptionArn, attributeName, attributeValue string) error { + req := &sns.SetSubscriptionAttributesInput{ + SubscriptionArn: aws.String(subscriptionArn), + AttributeName: aws.String(attributeName), + AttributeValue: aws.String(attributeValue), + } + _, err := snsconn.SetSubscriptionAttributes(req) + + if err != nil { + return fmt.Errorf("error setting subscription (%s) attribute (%s): %s", subscriptionArn, attributeName, err) + } + return nil +} + +type snsTopicSubscriptionDeliveryPolicy struct { + Guaranteed bool `json:"guaranteed,omitempty"` + HealthyRetryPolicy *snsTopicSubscriptionDeliveryPolicyHealthyRetryPolicy `json:"healthyRetryPolicy,omitempty"` + SicklyRetryPolicy *snsTopicSubscriptionDeliveryPolicySicklyRetryPolicy `json:"sicklyRetryPolicy,omitempty"` + ThrottlePolicy *snsTopicSubscriptionDeliveryPolicyThrottlePolicy `json:"throttlePolicy,omitempty"` +} + +func (s snsTopicSubscriptionDeliveryPolicy) String() string { + return awsutil.Prettify(s) +} + +func (s snsTopicSubscriptionDeliveryPolicy) GoString() string { + return s.String() +} + +type snsTopicSubscriptionDeliveryPolicyHealthyRetryPolicy struct { + BackoffFunction string `json:"backoffFunction,omitempty"` + MaxDelayTarget int `json:"maxDelayTarget,omitempty"` + MinDelayTarget int `json:"minDelayTarget,omitempty"` + NumMaxDelayRetries int `json:"numMaxDelayRetries,omitempty"` + NumMinDelayRetries int `json:"numMinDelayRetries,omitempty"` + NumNoDelayRetries int `json:"numNoDelayRetries,omitempty"` + NumRetries int `json:"numRetries,omitempty"` +} + +func (s snsTopicSubscriptionDeliveryPolicyHealthyRetryPolicy) String() string { + return awsutil.Prettify(s) +} + +func (s snsTopicSubscriptionDeliveryPolicyHealthyRetryPolicy) GoString() string { + return s.String() +} + +type snsTopicSubscriptionDeliveryPolicySicklyRetryPolicy struct { + BackoffFunction string `json:"backoffFunction,omitempty"` + MaxDelayTarget int `json:"maxDelayTarget,omitempty"` + MinDelayTarget int `json:"minDelayTarget,omitempty"` + NumMaxDelayRetries int `json:"numMaxDelayRetries,omitempty"` + NumMinDelayRetries int `json:"numMinDelayRetries,omitempty"` + NumNoDelayRetries int `json:"numNoDelayRetries,omitempty"` + NumRetries int `json:"numRetries,omitempty"` +} + +func (s snsTopicSubscriptionDeliveryPolicySicklyRetryPolicy) String() string { + return awsutil.Prettify(s) +} + +func (s snsTopicSubscriptionDeliveryPolicySicklyRetryPolicy) GoString() string { + return s.String() +} + +type snsTopicSubscriptionDeliveryPolicyThrottlePolicy struct { + MaxReceivesPerSecond int `json:"maxReceivesPerSecond,omitempty"` +} + +func (s snsTopicSubscriptionDeliveryPolicyThrottlePolicy) String() string { + return awsutil.Prettify(s) +} + +func (s snsTopicSubscriptionDeliveryPolicyThrottlePolicy) GoString() string { + return s.String() +} + +func suppressEquivalentSnsTopicSubscriptionDeliveryPolicy(k, old, new string, d *schema.ResourceData) bool { + var deliveryPolicy snsTopicSubscriptionDeliveryPolicy + + if err := json.Unmarshal([]byte(old), &deliveryPolicy); err != nil { + log.Printf("[WARN] Unable to unmarshal SNS Topic Subscription delivery policy JSON: %s", err) + return false + } + + normalizedDeliveryPolicy, err := json.Marshal(deliveryPolicy) + + if err != nil { + log.Printf("[WARN] Unable to marshal SNS Topic Subscription delivery policy back to JSON: %s", err) + return false + } + + ob := bytes.NewBufferString("") + if err := json.Compact(ob, normalizedDeliveryPolicy); err != nil { + return false + } + + nb := bytes.NewBufferString("") + if err := json.Compact(nb, []byte(new)); err != nil { + return false + } + + return jsonBytesEqual(ob.Bytes(), nb.Bytes()) +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_datafeed_subscription.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_datafeed_subscription.go index 25e9f51eca..5051e17603 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_datafeed_subscription.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_datafeed_subscription.go @@ -1,12 +1,12 @@ package aws import ( + "fmt" "log" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/schema" ) @@ -48,7 +48,7 @@ func resourceAwsSpotDataFeedSubscriptionCreate(d *schema.ResourceData, meta inte log.Printf("[INFO] Creating Spot Datafeed Subscription") _, err := conn.CreateSpotDatafeedSubscription(params) if err != nil { - return errwrap.Wrapf("Error Creating Spot Datafeed Subscription: {{err}}", err) + return fmt.Errorf("Error Creating Spot Datafeed Subscription: %s", err) } d.SetId("spot-datafeed-subscription") @@ -66,7 +66,7 @@ func resourceAwsSpotDataFeedSubscriptionRead(d *schema.ResourceData, meta interf d.SetId("") return nil } - return errwrap.Wrapf("Error Describing Spot Datafeed Subscription: {{err}}", err) + return fmt.Errorf("Error Describing Spot Datafeed Subscription: %s", err) } if resp == nil { @@ -87,7 +87,7 @@ func resourceAwsSpotDataFeedSubscriptionDelete(d *schema.ResourceData, meta inte log.Printf("[INFO] Deleting Spot Datafeed Subscription") _, err := conn.DeleteSpotDatafeedSubscription(&ec2.DeleteSpotDatafeedSubscriptionInput{}) if err != nil { - return errwrap.Wrapf("Error deleting Spot Datafeed Subscription: {{err}}", err) + return fmt.Errorf("Error deleting Spot Datafeed Subscription: %s", err) } return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_fleet_request.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_fleet_request.go index 15fcb4c01e..4dbd1e6e27 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_fleet_request.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_fleet_request.go @@ -285,6 +285,12 @@ func resourceAwsSpotFleetRequest() *schema.Resource { Default: "lowestPrice", ForceNew: true, }, + "instance_pools_to_use_count": { + Type: schema.TypeInt, + Optional: true, + Default: 1, + ForceNew: true, + }, "excess_capacity_termination_policy": { Type: schema.TypeString, Optional: true, @@ -311,13 +317,13 @@ func resourceAwsSpotFleetRequest() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validateRFC3339TimeString, + ValidateFunc: validation.ValidateRFC3339TimeString, }, "valid_until": { Type: schema.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validateRFC3339TimeString, + ValidateFunc: validation.ValidateRFC3339TimeString, }, "fleet_type": { Type: schema.TypeString, @@ -623,6 +629,10 @@ func resourceAwsSpotFleetRequestCreate(d *schema.ResourceData, meta interface{}) spotFleetConfig.AllocationStrategy = aws.String("lowestPrice") } + if v, ok := d.GetOk("instance_pools_to_use_count"); ok && v.(int) != 1 { + spotFleetConfig.InstancePoolsToUseCount = aws.Int64(int64(v.(int))) + } + if v, ok := d.GetOk("spot_price"); ok && v.(string) != "" { spotFleetConfig.SpotPrice = aws.String(v.(string)) } @@ -696,7 +706,7 @@ func resourceAwsSpotFleetRequestCreate(d *schema.ResourceData, meta interface{}) // IAM is eventually consistent :/ if awsErr.Code() == "InvalidSpotFleetRequestConfig" { return resource.RetryableError( - fmt.Errorf("[WARN] Error creating Spot fleet request, retrying: %s", err)) + fmt.Errorf("Error creating Spot fleet request, retrying: %s", err)) } } return resource.NonRetryableError(err) @@ -879,6 +889,10 @@ func resourceAwsSpotFleetRequestRead(d *schema.ResourceData, meta interface{}) e d.Set("allocation_strategy", aws.StringValue(config.AllocationStrategy)) } + if config.InstancePoolsToUseCount != nil { + d.Set("instance_pools_to_use_count", aws.Int64Value(config.InstancePoolsToUseCount)) + } + if config.ClientToken != nil { d.Set("client_token", aws.StringValue(config.ClientToken)) } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_instance_request.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_instance_request.go index 5460b0790c..5ac18f65c8 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_instance_request.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_spot_instance_request.go @@ -94,14 +94,14 @@ func resourceAwsSpotInstanceRequest() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validateRFC3339TimeString, + ValidateFunc: validation.ValidateRFC3339TimeString, Computed: true, } s["valid_until"] = &schema.Schema{ Type: schema.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validateRFC3339TimeString, + ValidateFunc: validation.ValidateRFC3339TimeString, Computed: true, } return s @@ -267,7 +267,7 @@ func resourceAwsSpotInstanceRequestRead(d *schema.ResourceData, meta interface{} d.Set("spot_instance_id", *request.InstanceId) // Read the instance data, setting up connection information if err := readInstance(d, meta); err != nil { - return fmt.Errorf("[ERR] Error reading Spot Instance Data: %s", err) + return fmt.Errorf("Error reading Spot Instance Data: %s", err) } } @@ -396,7 +396,7 @@ func resourceAwsSpotInstanceRequestDelete(d *schema.ResourceData, meta interface if instanceId := d.Get("spot_instance_id").(string); instanceId != "" { log.Printf("[INFO] Terminating instance: %s", instanceId) - if err := awsTerminateInstance(conn, instanceId, d); err != nil { + if err := awsTerminateInstance(conn, instanceId, d.Timeout(schema.TimeoutDelete)); err != nil { return fmt.Errorf("Error terminating spot instance: %s", err) } } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue.go index 69bb12d1c6..58b6a9d238 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue.go @@ -5,17 +5,16 @@ import ( "log" "net/url" "strconv" - "time" - - "github.com/hashicorp/terraform/helper/schema" - "strings" + "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/sqs" "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/structure" + "github.com/hashicorp/terraform/helper/validation" ) var sqsQueueAttributeMap = map[string]string{ @@ -90,13 +89,13 @@ func resourceAwsSqsQueue() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, "redrive_policy": { Type: schema.TypeString, Optional: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) return json @@ -152,11 +151,11 @@ func resourceAwsSqsQueueCreate(d *schema.ResourceData, meta interface{}) error { cbd := d.Get("content_based_deduplication").(bool) if fq { - if errors := validateSQSFifoQueueName(name, "name"); len(errors) > 0 { + if errors := validateSQSFifoQueueName(name); len(errors) > 0 { return fmt.Errorf("Error validating the FIFO queue name: %v", errors) } } else { - if errors := validateSQSNonFifoQueueName(name, "name"); len(errors) > 0 { + if errors := validateSQSNonFifoQueueName(name); len(errors) > 0 { return fmt.Errorf("Error validating SQS queue name: %v", errors) } } @@ -250,7 +249,7 @@ func resourceAwsSqsQueueUpdate(d *schema.ResourceData, meta interface{}) error { Attributes: attributes, } if _, err := sqsconn.SetQueueAttributes(req); err != nil { - return fmt.Errorf("[ERR] Error updating SQS attributes: %s", err) + return fmt.Errorf("Error updating SQS attributes: %s", err) } } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue_policy.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue_policy.go index 277afc2e78..0459e7c209 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue_policy.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_sqs_queue_policy.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/service/sqs" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" "github.com/jen20/awspolicyequivalence" ) @@ -34,7 +35,7 @@ func resourceAwsSqsQueuePolicy() *schema.Resource { "policy": { Type: schema.TypeString, Required: true, - ValidateFunc: validateJsonString, + ValidateFunc: validation.ValidateJsonString, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, }, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_activation.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_activation.go index 8fb58671d0..95ed6d41ff 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_activation.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_activation.go @@ -7,9 +7,9 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ssm" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsSsmActivation() *schema.Resource { @@ -37,7 +37,7 @@ func resourceAwsSsmActivation() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validateRFC3339TimeString, + ValidateFunc: validation.ValidateRFC3339TimeString, }, "iam_role": { Type: schema.TypeString, @@ -106,11 +106,11 @@ func resourceAwsSsmActivationCreate(d *schema.ResourceData, meta interface{}) er }) if err != nil { - return errwrap.Wrapf("[ERROR] Error creating SSM activation: {{err}}", err) + return fmt.Errorf("Error creating SSM activation: %s", err) } if resp.ActivationId == nil { - return fmt.Errorf("[ERROR] ActivationId was nil") + return fmt.Errorf("ActivationId was nil") } d.SetId(*resp.ActivationId) d.Set("activation_code", resp.ActivationCode) @@ -138,10 +138,10 @@ func resourceAwsSsmActivationRead(d *schema.ResourceData, meta interface{}) erro resp, err := ssmconn.DescribeActivations(params) if err != nil { - return errwrap.Wrapf("[ERROR] Error reading SSM activation: {{err}}", err) + return fmt.Errorf("Error reading SSM activation: %s", err) } if resp.ActivationList == nil || len(resp.ActivationList) == 0 { - return fmt.Errorf("[ERROR] ActivationList was nil or empty") + return fmt.Errorf("ActivationList was nil or empty") } activation := resp.ActivationList[0] // Only 1 result as MaxResults is 1 above @@ -168,7 +168,7 @@ func resourceAwsSsmActivationDelete(d *schema.ResourceData, meta interface{}) er _, err := ssmconn.DeleteActivation(params) if err != nil { - return errwrap.Wrapf("[ERROR] Error deleting SSM activation: {{err}}", err) + return fmt.Errorf("Error deleting SSM activation: %s", err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_association.go index b5dbed3963..7a93f96a88 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_association.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_association.go @@ -131,11 +131,11 @@ func resourceAwsSsmAssociationCreate(d *schema.ResourceData, meta interface{}) e resp, err := ssmconn.CreateAssociation(associationInput) if err != nil { - return fmt.Errorf("[ERROR] Error creating SSM association: %s", err) + return fmt.Errorf("Error creating SSM association: %s", err) } if resp.AssociationDescription == nil { - return fmt.Errorf("[ERROR] AssociationDescription was nil") + return fmt.Errorf("AssociationDescription was nil") } d.SetId(*resp.AssociationDescription.AssociationId) @@ -160,10 +160,10 @@ func resourceAwsSsmAssociationRead(d *schema.ResourceData, meta interface{}) err d.SetId("") return nil } - return fmt.Errorf("[ERROR] Error reading SSM association: %s", err) + return fmt.Errorf("Error reading SSM association: %s", err) } if resp.AssociationDescription == nil { - return fmt.Errorf("[ERROR] AssociationDescription was nil") + return fmt.Errorf("AssociationDescription was nil") } association := resp.AssociationDescription @@ -176,11 +176,11 @@ func resourceAwsSsmAssociationRead(d *schema.ResourceData, meta interface{}) err d.Set("document_version", association.DocumentVersion) if err := d.Set("targets", flattenAwsSsmTargets(association.Targets)); err != nil { - return fmt.Errorf("[DEBUG] Error setting targets error: %#v", err) + return fmt.Errorf("Error setting targets error: %#v", err) } if err := d.Set("output_location", flattenAwsSsmAssociationOutoutLocation(association.OutputLocation)); err != nil { - return fmt.Errorf("[DEBUG] Error setting output_location error: %#v", err) + return fmt.Errorf("Error setting output_location error: %#v", err) } return nil @@ -222,7 +222,7 @@ func resourceAwsSsmAssociationUpdate(d *schema.ResourceData, meta interface{}) e _, err := ssmconn.UpdateAssociation(associationInput) if err != nil { - return fmt.Errorf("[ERROR] Error updating SSM association: %s", err) + return fmt.Errorf("Error updating SSM association: %s", err) } return resourceAwsSsmAssociationRead(d, meta) @@ -240,7 +240,7 @@ func resourceAwsSsmAssociationDelete(d *schema.ResourceData, meta interface{}) e _, err := ssmconn.DeleteAssociation(params) if err != nil { - return fmt.Errorf("[ERROR] Error deleting SSM association: %s", err) + return fmt.Errorf("Error deleting SSM association: %s", err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_document.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_document.go index 685e8964a0..55d81f44f9 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_document.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_document.go @@ -11,7 +11,6 @@ import ( "github.com/aws/aws-sdk-go/aws/arn" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ssm" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/validation" @@ -58,6 +57,7 @@ func resourceAwsSsmDocument() *schema.Resource { ssm.DocumentTypeCommand, ssm.DocumentTypePolicy, ssm.DocumentTypeAutomation, + ssm.DocumentTypeSession, }, false), }, "schema_version": { @@ -171,7 +171,7 @@ func resourceAwsSsmDocumentCreate(d *schema.ResourceData, meta interface{}) erro }) if err != nil { - return errwrap.Wrapf("[ERROR] Error creating SSM document: {{err}}", err) + return fmt.Errorf("Error creating SSM document: %s", err) } if v, ok := d.GetOk("permissions"); ok && v != nil { @@ -205,7 +205,7 @@ func resourceAwsSsmDocumentRead(d *schema.ResourceData, meta interface{}) error d.SetId("") return nil } - return errwrap.Wrapf("[ERROR] Error describing SSM document: {{err}}", err) + return fmt.Errorf("Error describing SSM document: %s", err) } doc := resp.Document @@ -234,7 +234,7 @@ func resourceAwsSsmDocumentRead(d *schema.ResourceData, meta interface{}) error Resource: fmt.Sprintf("document/%s", *doc.Name), }.String() if err := d.Set("arn", arn); err != nil { - return fmt.Errorf("[DEBUG] Error setting arn error: %#v", err) + return fmt.Errorf("Error setting arn error: %#v", err) } d.Set("status", doc.Status) @@ -242,7 +242,7 @@ func resourceAwsSsmDocumentRead(d *schema.ResourceData, meta interface{}) error gp, err := getDocumentPermissions(d, meta) if err != nil { - return errwrap.Wrapf("[ERROR] Error reading SSM document permissions: {{err}}", err) + return fmt.Errorf("Error reading SSM document permissions: %s", err) } d.Set("permissions", gp) @@ -446,7 +446,7 @@ func getDocumentPermissions(d *schema.ResourceData, meta interface{}) (map[strin resp, err := ssmconn.DescribeDocumentPermission(permInput) if err != nil { - return nil, errwrap.Wrapf("[ERROR] Error setting permissions for SSM document: {{err}}", err) + return nil, fmt.Errorf("Error setting permissions for SSM document: %s", err) } var account_ids = make([]string, len(resp.AccountIds)) @@ -454,13 +454,11 @@ func getDocumentPermissions(d *schema.ResourceData, meta interface{}) (map[strin account_ids[i] = *resp.AccountIds[i] } - var ids = "" + ids := "" if len(account_ids) == 1 { ids = account_ids[0] } else if len(account_ids) > 1 { ids = strings.Join(account_ids, ",") - } else { - ids = "" } if ids == "" { @@ -497,7 +495,7 @@ func deleteDocumentPermissions(d *schema.ResourceData, meta interface{}) error { _, err := ssmconn.ModifyDocumentPermission(permInput) if err != nil { - return errwrap.Wrapf("[ERROR] Error removing permissions for SSM document: {{err}}", err) + return fmt.Errorf("Error removing permissions for SSM document: %s", err) } return nil @@ -526,7 +524,7 @@ func updateAwsSSMDocument(d *schema.ResourceData, meta interface{}) error { newDefaultVersion = d.Get("latest_version").(string) } else if err != nil { - return errwrap.Wrapf("Error updating SSM document: {{err}}", err) + return fmt.Errorf("Error updating SSM document: %s", err) } else { log.Printf("[INFO] Updating the default version to the new version %s: %s", newDefaultVersion, d.Id()) newDefaultVersion = *updated.DocumentDescription.DocumentVersion @@ -540,7 +538,7 @@ func updateAwsSSMDocument(d *schema.ResourceData, meta interface{}) error { _, err = ssmconn.UpdateDocumentDefaultVersion(updateDefaultInput) if err != nil { - return errwrap.Wrapf("Error updating the default document version to that of the updated document: {{err}}", err) + return fmt.Errorf("Error updating the default document version to that of the updated document: %s", err) } return nil } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window_target.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window_target.go index 868323835a..140aa855bb 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window_target.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window_target.go @@ -109,7 +109,7 @@ func resourceAwsSsmMaintenanceWindowTargetRead(d *schema.ResourceData, meta inte d.Set("resource_type", t.ResourceType) if err := d.Set("targets", flattenAwsSsmTargets(t.Targets)); err != nil { - return fmt.Errorf("[DEBUG] Error setting targets error: %#v", err) + return fmt.Errorf("Error setting targets error: %#v", err) } } } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window_task.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window_task.go index 072b5877c8..f9da3fd9ee 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window_task.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window_task.go @@ -2,6 +2,7 @@ package aws import ( "fmt" + "github.com/hashicorp/terraform/helper/validation" "log" "github.com/aws/aws-sdk-go/aws" @@ -73,6 +74,20 @@ func resourceAwsSsmMaintenanceWindowTask() *schema.Resource { }, }, + "name": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validateAwsSSMMaintenanceWindowTaskName, + }, + + "description": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + ValidateFunc: validation.StringLenBetween(3, 128), + }, + "priority": { Type: schema.TypeInt, Optional: true, @@ -191,6 +206,8 @@ func resourceAwsSsmMaintenanceWindowTaskCreate(d *schema.ResourceData, meta inte TaskType: aws.String(d.Get("task_type").(string)), ServiceRoleArn: aws.String(d.Get("service_role_arn").(string)), TaskArn: aws.String(d.Get("task_arn").(string)), + Name: aws.String(d.Get("name").(string)), + Description: aws.String(d.Get("description").(string)), Targets: expandAwsSsmTargets(d.Get("targets").([]interface{})), } @@ -240,21 +257,23 @@ func resourceAwsSsmMaintenanceWindowTaskRead(d *schema.ResourceData, meta interf d.Set("service_role_arn", t.ServiceRoleArn) d.Set("task_arn", t.TaskArn) d.Set("priority", t.Priority) + d.Set("name", t.Name) + d.Set("description", t.Description) if t.LoggingInfo != nil { if err := d.Set("logging_info", flattenAwsSsmMaintenanceWindowLoggingInfo(t.LoggingInfo)); err != nil { - return fmt.Errorf("[DEBUG] Error setting logging_info error: %#v", err) + return fmt.Errorf("Error setting logging_info error: %#v", err) } } if t.TaskParameters != nil { if err := d.Set("task_parameters", flattenAwsSsmTaskParameters(t.TaskParameters)); err != nil { - return fmt.Errorf("[DEBUG] Error setting task_parameters error: %#v", err) + return fmt.Errorf("Error setting task_parameters error: %#v", err) } } if err := d.Set("targets", flattenAwsSsmTargets(t.Targets)); err != nil { - return fmt.Errorf("[DEBUG] Error setting targets error: %#v", err) + return fmt.Errorf("Error setting targets error: %#v", err) } } } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_patch_baseline.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_patch_baseline.go index 7183190f2a..40f97147f5 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_patch_baseline.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_patch_baseline.go @@ -253,11 +253,11 @@ func resourceAwsSsmPatchBaselineRead(d *schema.ResourceData, meta interface{}) e d.Set("rejected_patches", flattenStringList(resp.RejectedPatches)) if err := d.Set("global_filter", flattenAwsSsmPatchFilterGroup(resp.GlobalFilters)); err != nil { - return fmt.Errorf("[DEBUG] Error setting global filters error: %#v", err) + return fmt.Errorf("Error setting global filters error: %#v", err) } if err := d.Set("approval_rule", flattenAwsSsmPatchRuleGroup(resp.ApprovalRules)); err != nil { - return fmt.Errorf("[DEBUG] Error setting approval rules error: %#v", err) + return fmt.Errorf("Error setting approval rules error: %#v", err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_subnet.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_subnet.go index b356d31b69..f1b7eabaeb 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_subnet.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_subnet.go @@ -23,6 +23,11 @@ func resourceAwsSubnet() *schema.Resource { State: schema.ImportStatePassthrough, }, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(10 * time.Minute), + Delete: schema.DefaultTimeout(10 * time.Minute), + }, + SchemaVersion: 1, MigrateState: resourceAwsSubnetMigrateState, @@ -150,14 +155,16 @@ func resourceAwsSubnetRead(d *schema.ResourceData, meta interface{}) error { d.Set("cidr_block", subnet.CidrBlock) d.Set("map_public_ip_on_launch", subnet.MapPublicIpOnLaunch) d.Set("assign_ipv6_address_on_creation", subnet.AssignIpv6AddressOnCreation) + + // Make sure those values are set, if an IPv6 block exists it'll be set in the loop + d.Set("ipv6_cidr_block_association_id", "") + d.Set("ipv6_cidr_block", "") + for _, a := range subnet.Ipv6CidrBlockAssociationSet { if *a.Ipv6CidrBlockState.State == "associated" { //we can only ever have 1 IPv6 block associated at once d.Set("ipv6_cidr_block_association_id", a.AssociationId) d.Set("ipv6_cidr_block", a.Ipv6CidrBlock) break - } else { - d.Set("ipv6_cidr_block_association_id", "") // we blank these out to remove old entries - d.Set("ipv6_cidr_block", "") } } @@ -303,6 +310,11 @@ func resourceAwsSubnetDelete(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).ec2conn log.Printf("[INFO] Deleting subnet: %s", d.Id()) + + if err := deleteLingeringLambdaENIs(conn, d, "subnet-id"); err != nil { + return fmt.Errorf("Failed to delete Lambda ENIs: %s", err) + } + req := &ec2.DeleteSubnetInput{ SubnetId: aws.String(d.Id()), } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_volume_attachment.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_volume_attachment.go index 392991ee0e..cd4ee44c1a 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_volume_attachment.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_volume_attachment.go @@ -106,7 +106,7 @@ func resourceAwsVolumeAttachmentCreate(d *schema.ResourceData, meta interface{}) _, err := conn.AttachVolume(opts) if err != nil { if awsErr, ok := err.(awserr.Error); ok { - return fmt.Errorf("[WARN] Error attaching volume (%s) to instance (%s), message: \"%s\", code: \"%s\"", + return fmt.Errorf("Error attaching volume (%s) to instance (%s), message: \"%s\", code: \"%s\"", vID, iID, awsErr.Message(), awsErr.Code()) } return err diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc.go index f6f0b4dff7..9b9d3ff769 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc.go @@ -33,7 +33,7 @@ func resourceAwsVpc() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: validateCIDRNetworkAddress, + ValidateFunc: validation.CIDRNetwork(16, 28), }, "instance_tenancy": { @@ -159,6 +159,13 @@ func resourceAwsVpcCreate(d *schema.ResourceData, meta interface{}) error { d.Id(), err) } + if len(vpc.Ipv6CidrBlockAssociationSet) > 0 && vpc.Ipv6CidrBlockAssociationSet[0] != nil { + log.Printf("[DEBUG] Waiting for EC2 VPC (%s) IPv6 CIDR to become associated", d.Id()) + if err := waitForEc2VpcIpv6CidrBlockAssociationCreate(conn, d.Id(), aws.StringValue(vpcResp.Vpc.Ipv6CidrBlockAssociationSet[0].AssociationId)); err != nil { + return fmt.Errorf("error waiting for EC2 VPC (%s) IPv6 CIDR to become associated: %s", d.Id(), err) + } + } + // Update our attributes and return return resourceAwsVpcUpdate(d, meta) } @@ -196,15 +203,16 @@ func resourceAwsVpcRead(d *schema.ResourceData, meta interface{}) error { // Tags d.Set("tags", tagsToMap(vpc.Tags)) + // Make sure those values are set, if an IPv6 block exists it'll be set in the loop + d.Set("assign_generated_ipv6_cidr_block", false) + d.Set("ipv6_association_id", "") + d.Set("ipv6_cidr_block", "") + for _, a := range vpc.Ipv6CidrBlockAssociationSet { - if *a.Ipv6CidrBlockState.State == "associated" { //we can only ever have 1 IPv6 block associated at once + if aws.StringValue(a.Ipv6CidrBlockState.State) == ec2.VpcCidrBlockStateCodeAssociated { //we can only ever have 1 IPv6 block associated at once d.Set("assign_generated_ipv6_cidr_block", true) d.Set("ipv6_association_id", a.AssociationId) d.Set("ipv6_cidr_block", a.Ipv6CidrBlock) - } else { - d.Set("assign_generated_ipv6_cidr_block", false) - d.Set("ipv6_association_id", "") // we blank these out to remove old entries - d.Set("ipv6_cidr_block", "") } } @@ -270,26 +278,11 @@ func resourceAwsVpcRead(d *schema.ResourceData, meta interface{}) error { d.Set("enable_classiclink_dns_support", classiclinkdns_enabled) } - // Get the main routing table for this VPC - // Really Ugly need to make this better - rmenn - filter1 := &ec2.Filter{ - Name: aws.String("association.main"), - Values: []*string{aws.String("true")}, - } - filter2 := &ec2.Filter{ - Name: aws.String("vpc-id"), - Values: []*string{aws.String(d.Id())}, - } - describeRouteOpts := &ec2.DescribeRouteTablesInput{ - Filters: []*ec2.Filter{filter1, filter2}, - } - routeResp, err := conn.DescribeRouteTables(describeRouteOpts) + routeTableId, err := resourceAwsVpcSetMainRouteTable(conn, vpcid) if err != nil { - return err - } - if v := routeResp.RouteTables; len(v) > 0 { - d.Set("main_route_table_id", *v[0].RouteTableId) + log.Printf("[WARN] Unable to set Main Route Table: %s", err) } + d.Set("main_route_table_id", routeTableId) if err := resourceAwsVpcSetDefaultNetworkAcl(conn, d); err != nil { log.Printf("[WARN] Unable to set Default Network ACL: %s", err) @@ -421,24 +414,14 @@ func resourceAwsVpcUpdate(d *schema.ResourceData, meta interface{}) error { return err } - // Wait for the CIDR to become available - log.Printf( - "[DEBUG] Waiting for IPv6 CIDR (%s) to become associated", - d.Id()) - stateConf := &resource.StateChangeConf{ - Pending: []string{"associating", "disassociated"}, - Target: []string{"associated"}, - Refresh: Ipv6CidrStateRefreshFunc(conn, d.Id(), *resp.Ipv6CidrBlockAssociation.AssociationId), - Timeout: 1 * time.Minute, - } - if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf( - "Error waiting for IPv6 CIDR (%s) to become associated: %s", - d.Id(), err) + log.Printf("[DEBUG] Waiting for EC2 VPC (%s) IPv6 CIDR to become associated", d.Id()) + if err := waitForEc2VpcIpv6CidrBlockAssociationCreate(conn, d.Id(), aws.StringValue(resp.Ipv6CidrBlockAssociation.AssociationId)); err != nil { + return fmt.Errorf("error waiting for EC2 VPC (%s) IPv6 CIDR to become associated: %s", d.Id(), err) } } else { + associationID := d.Get("ipv6_association_id").(string) modifyOpts := &ec2.DisassociateVpcCidrBlockInput{ - AssociationId: aws.String(d.Get("ipv6_association_id").(string)), + AssociationId: aws.String(associationID), } log.Printf("[INFO] Disabling assign_generated_ipv6_cidr_block vpc attribute for %s: %#v", d.Id(), modifyOpts) @@ -446,20 +429,9 @@ func resourceAwsVpcUpdate(d *schema.ResourceData, meta interface{}) error { return err } - // Wait for the CIDR to become available - log.Printf( - "[DEBUG] Waiting for IPv6 CIDR (%s) to become disassociated", - d.Id()) - stateConf := &resource.StateChangeConf{ - Pending: []string{"disassociating", "associated"}, - Target: []string{"disassociated"}, - Refresh: Ipv6CidrStateRefreshFunc(conn, d.Id(), d.Get("ipv6_association_id").(string)), - Timeout: 1 * time.Minute, - } - if _, err := stateConf.WaitForState(); err != nil { - return fmt.Errorf( - "Error waiting for IPv6 CIDR (%s) to become disassociated: %s", - d.Id(), err) + log.Printf("[DEBUG] Waiting for EC2 VPC (%s) IPv6 CIDR to become disassociated", d.Id()) + if err := waitForEc2VpcIpv6CidrBlockAssociationDelete(conn, d.Id(), associationID); err != nil { + return fmt.Errorf("error waiting for EC2 VPC (%s) IPv6 CIDR to become disassociated: %s", d.Id(), err) } } @@ -566,28 +538,24 @@ func Ipv6CidrStateRefreshFunc(conn *ec2.EC2, id string, associationId string) re VpcIds: []*string{aws.String(id)}, } resp, err := conn.DescribeVpcs(describeVpcOpts) + + if isAWSErr(err, "InvalidVpcID.NotFound", "") { + return nil, "", nil + } + if err != nil { - if ec2err, ok := err.(awserr.Error); ok && ec2err.Code() == "InvalidVpcID.NotFound" { - resp = nil - } else { - log.Printf("Error on VPCStateRefresh: %s", err) - return nil, "", err - } + return nil, "", err } - if resp == nil { + if resp == nil || len(resp.Vpcs) == 0 || resp.Vpcs[0] == nil || resp.Vpcs[0].Ipv6CidrBlockAssociationSet == nil { // Sometimes AWS just has consistency issues and doesn't see // our instance yet. Return an empty state. return nil, "", nil } - if resp.Vpcs[0].Ipv6CidrBlockAssociationSet == nil { - return nil, "", nil - } - for _, association := range resp.Vpcs[0].Ipv6CidrBlockAssociationSet { - if *association.AssociationId == associationId { - return association, *association.Ipv6CidrBlockState.State, nil + if aws.StringValue(association.AssociationId) == associationId { + return association, aws.StringValue(association.Ipv6CidrBlockState.State), nil } } @@ -672,6 +640,33 @@ func resourceAwsVpcSetDefaultRouteTable(conn *ec2.EC2, d *schema.ResourceData) e return nil } +func resourceAwsVpcSetMainRouteTable(conn *ec2.EC2, vpcid string) (string, error) { + filter1 := &ec2.Filter{ + Name: aws.String("association.main"), + Values: []*string{aws.String("true")}, + } + filter2 := &ec2.Filter{ + Name: aws.String("vpc-id"), + Values: []*string{aws.String(vpcid)}, + } + + findOpts := &ec2.DescribeRouteTablesInput{ + Filters: []*ec2.Filter{filter1, filter2}, + } + + resp, err := conn.DescribeRouteTables(findOpts) + if err != nil { + return "", err + } + + if len(resp.RouteTables) < 1 || resp.RouteTables[0] == nil { + return "", fmt.Errorf("Main Route table not found") + } + + // There Can Be Only 1 Main Route Table for a VPC + return aws.StringValue(resp.RouteTables[0].RouteTableId), nil +} + func resourceAwsVpcInstanceImport( d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) { d.Set("assign_generated_ipv6_cidr_block", false) @@ -720,3 +715,34 @@ func vpcDescribe(conn *ec2.EC2, vpcId string) (*ec2.Vpc, error) { return nil, fmt.Errorf("Found %d VPCs for %s, expected 1", n, vpcId) } } + +func waitForEc2VpcIpv6CidrBlockAssociationCreate(conn *ec2.EC2, vpcID, associationID string) error { + stateConf := &resource.StateChangeConf{ + Pending: []string{ + ec2.VpcCidrBlockStateCodeAssociating, + ec2.VpcCidrBlockStateCodeDisassociated, + }, + Target: []string{ec2.VpcCidrBlockStateCodeAssociated}, + Refresh: Ipv6CidrStateRefreshFunc(conn, vpcID, associationID), + Timeout: 1 * time.Minute, + } + _, err := stateConf.WaitForState() + + return err +} + +func waitForEc2VpcIpv6CidrBlockAssociationDelete(conn *ec2.EC2, vpcID, associationID string) error { + stateConf := &resource.StateChangeConf{ + Pending: []string{ + ec2.VpcCidrBlockStateCodeAssociated, + ec2.VpcCidrBlockStateCodeDisassociating, + }, + Target: []string{ec2.VpcCidrBlockStateCodeDisassociated}, + Refresh: Ipv6CidrStateRefreshFunc(conn, vpcID, associationID), + Timeout: 1 * time.Minute, + NotFoundChecks: 1, + } + _, err := stateConf.WaitForState() + + return err +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint.go index 96b072f845..45ebf5236a 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpc_endpoint.go @@ -8,7 +8,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" "github.com/hashicorp/terraform/helper/structure" @@ -149,7 +148,7 @@ func resourceAwsVpcEndpointCreate(d *schema.ResourceData, meta interface{}) erro if v, ok := d.GetOk("policy"); ok { policy, err := structure.NormalizeJsonString(v) if err != nil { - return errwrap.Wrapf("policy contains an invalid JSON: {{err}}", err) + return fmt.Errorf("policy contains an invalid JSON: %s", err) } req.PolicyDocument = aws.String(policy) } @@ -220,7 +219,7 @@ func resourceAwsVpcEndpointUpdate(d *schema.ResourceData, meta interface{}) erro if d.HasChange("policy") { policy, err := structure.NormalizeJsonString(d.Get("policy")) if err != nil { - return errwrap.Wrapf("policy contains an invalid JSON: {{err}}", err) + return fmt.Errorf("policy contains an invalid JSON: %s", err) } if policy == "" { @@ -375,7 +374,7 @@ func vpcEndpointAttributes(d *schema.ResourceData, vpce *ec2.VpcEndpoint, conn * policy, err := structure.NormalizeJsonString(aws.StringValue(vpce.PolicyDocument)) if err != nil { - return errwrap.Wrapf("policy contains an invalid JSON: {{err}}", err) + return fmt.Errorf("policy contains an invalid JSON: %s", err) } d.Set("policy", policy) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_connection.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_connection.go index 8f8ea74d02..9a5073c6e8 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_connection.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_connection.go @@ -15,7 +15,6 @@ import ( "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ec2" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" @@ -383,7 +382,7 @@ func resourceAwsVpnConnectionRead(d *schema.ResourceData, meta interface{}) erro } if len(resp.VpnConnections) != 1 { - return fmt.Errorf("[ERROR] Error finding VPN connection: %s", d.Id()) + return fmt.Errorf("Error finding VPN connection: %s", d.Id()) } vpnConnection := resp.VpnConnections[0] @@ -532,7 +531,7 @@ func telemetryToMapList(telemetry []*ec2.VgwTelemetry) []map[string]interface{} func xmlConfigToTunnelInfo(xmlConfig string) (*TunnelInfo, error) { var vpnConfig XmlVpnConnectionConfig if err := xml.Unmarshal([]byte(xmlConfig), &vpnConfig); err != nil { - return nil, errwrap.Wrapf("Error Unmarshalling XML: {{err}}", err) + return nil, fmt.Errorf("Error Unmarshalling XML: %s", err) } // don't expect consistent ordering from the XML diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_gateway.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_gateway.go index 0a1ef95989..ae9a5bba64 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_gateway.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_vpn_gateway.go @@ -35,7 +35,7 @@ func resourceAwsVpnGateway() *schema.Resource { Optional: true, ForceNew: true, Computed: true, - ValidateFunc: validateVpnGatewayAmazonSideAsn, + ValidateFunc: validateAmazonSideAsn, }, "vpc_id": { @@ -218,7 +218,7 @@ func resourceAwsVpnGatewayAttach(d *schema.ResourceData, meta interface{}) error stateConf := &resource.StateChangeConf{ Pending: []string{"detached", "attaching"}, Target: []string{"attached"}, - Refresh: vpnGatewayAttachStateRefreshFunc(conn, d.Id(), "available"), + Refresh: vpnGatewayAttachStateRefreshFunc(conn, d.Id()), Timeout: 10 * time.Minute, } if _, err := stateConf.WaitForState(); err != nil { @@ -279,7 +279,7 @@ func resourceAwsVpnGatewayDetach(d *schema.ResourceData, meta interface{}) error stateConf := &resource.StateChangeConf{ Pending: []string{"attached", "detaching", "available"}, Target: []string{"detached"}, - Refresh: vpnGatewayAttachStateRefreshFunc(conn, d.Id(), "detached"), + Refresh: vpnGatewayAttachStateRefreshFunc(conn, d.Id()), Timeout: 10 * time.Minute, } if _, err := stateConf.WaitForState(); err != nil { @@ -293,7 +293,7 @@ func resourceAwsVpnGatewayDetach(d *schema.ResourceData, meta interface{}) error // vpnGatewayAttachStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch // the state of a VPN gateway's attachment -func vpnGatewayAttachStateRefreshFunc(conn *ec2.EC2, id string, expected string) resource.StateRefreshFunc { +func vpnGatewayAttachStateRefreshFunc(conn *ec2.EC2, id string) resource.StateRefreshFunc { var start time.Time return func() (interface{}, string, error) { if start.IsZero() { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_byte_match_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_byte_match_set.go index 6a2a7bdc64..9c62800d60 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_byte_match_set.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_byte_match_set.go @@ -7,7 +7,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/waf" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/schema" ) @@ -70,7 +69,7 @@ func resourceAwsWafByteMatchSetCreate(d *schema.ResourceData, meta interface{}) log.Printf("[INFO] Creating ByteMatchSet: %s", d.Get("name").(string)) - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { params := &waf.CreateByteMatchSetInput{ ChangeToken: token, @@ -79,7 +78,7 @@ func resourceAwsWafByteMatchSetCreate(d *schema.ResourceData, meta interface{}) return conn.CreateByteMatchSet(params) }) if err != nil { - return errwrap.Wrapf("[ERROR] Error creating ByteMatchSet: {{err}}", err) + return fmt.Errorf("Error creating ByteMatchSet: %s", err) } resp := out.(*waf.CreateByteMatchSetOutput) @@ -122,7 +121,7 @@ func resourceAwsWafByteMatchSetUpdate(d *schema.ResourceData, meta interface{}) oldT, newT := o.(*schema.Set).List(), n.(*schema.Set).List() err := updateByteMatchSetResource(d.Id(), oldT, newT, conn) if err != nil { - return errwrap.Wrapf("[ERROR] Error updating ByteMatchSet: {{err}}", err) + return fmt.Errorf("Error updating ByteMatchSet: %s", err) } } @@ -141,7 +140,7 @@ func resourceAwsWafByteMatchSetDelete(d *schema.ResourceData, meta interface{}) } } - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.DeleteByteMatchSetInput{ ChangeToken: token, @@ -151,14 +150,14 @@ func resourceAwsWafByteMatchSetDelete(d *schema.ResourceData, meta interface{}) return conn.DeleteByteMatchSet(req) }) if err != nil { - return errwrap.Wrapf("[ERROR] Error deleting ByteMatchSet: {{err}}", err) + return fmt.Errorf("Error deleting ByteMatchSet: %s", err) } return nil } func updateByteMatchSetResource(id string, oldT, newT []interface{}, conn *waf.WAF) error { - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateByteMatchSetInput{ ChangeToken: token, @@ -169,14 +168,14 @@ func updateByteMatchSetResource(id string, oldT, newT []interface{}, conn *waf.W return conn.UpdateByteMatchSet(req) }) if err != nil { - return errwrap.Wrapf("[ERROR] Error updating ByteMatchSet: {{err}}", err) + return fmt.Errorf("Error updating ByteMatchSet: %s", err) } return nil } func flattenWafByteMatchTuples(bmt []*waf.ByteMatchTuple) []interface{} { - out := make([]interface{}, len(bmt), len(bmt)) + out := make([]interface{}, len(bmt)) for i, t := range bmt { m := make(map[string]interface{}) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_geo_match_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_geo_match_set.go index 3eddb1d0c3..dc5295b842 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_geo_match_set.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_geo_match_set.go @@ -6,7 +6,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/waf" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/schema" ) @@ -48,7 +47,7 @@ func resourceAwsWafGeoMatchSetCreate(d *schema.ResourceData, meta interface{}) e log.Printf("[INFO] Creating GeoMatchSet: %s", d.Get("name").(string)) - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { params := &waf.CreateGeoMatchSetInput{ ChangeToken: token, @@ -58,7 +57,7 @@ func resourceAwsWafGeoMatchSetCreate(d *schema.ResourceData, meta interface{}) e return conn.CreateGeoMatchSet(params) }) if err != nil { - return errwrap.Wrapf("[ERROR] Error creating GeoMatchSet: {{err}}", err) + return fmt.Errorf("Error creating GeoMatchSet: %s", err) } resp := out.(*waf.CreateGeoMatchSetOutput) @@ -102,7 +101,7 @@ func resourceAwsWafGeoMatchSetUpdate(d *schema.ResourceData, meta interface{}) e err := updateGeoMatchSetResource(d.Id(), oldT, newT, conn) if err != nil { - return errwrap.Wrapf("[ERROR] Error updating GeoMatchSet: {{err}}", err) + return fmt.Errorf("Error updating GeoMatchSet: %s", err) } } @@ -121,7 +120,7 @@ func resourceAwsWafGeoMatchSetDelete(d *schema.ResourceData, meta interface{}) e } } - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.DeleteGeoMatchSetInput{ ChangeToken: token, @@ -131,14 +130,14 @@ func resourceAwsWafGeoMatchSetDelete(d *schema.ResourceData, meta interface{}) e return conn.DeleteGeoMatchSet(req) }) if err != nil { - return errwrap.Wrapf("[ERROR] Error deleting GeoMatchSet: {{err}}", err) + return fmt.Errorf("Error deleting GeoMatchSet: %s", err) } return nil } func updateGeoMatchSetResource(id string, oldT, newT []interface{}, conn *waf.WAF) error { - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateGeoMatchSetInput{ ChangeToken: token, @@ -150,7 +149,7 @@ func updateGeoMatchSetResource(id string, oldT, newT []interface{}, conn *waf.WA return conn.UpdateGeoMatchSet(req) }) if err != nil { - return errwrap.Wrapf("[ERROR] Error updating GeoMatchSet: {{err}}", err) + return fmt.Errorf("Error updating GeoMatchSet: %s", err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_ipset.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_ipset.go index 4eebe1fd99..9c4e1b4777 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_ipset.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_ipset.go @@ -57,7 +57,7 @@ func resourceAwsWafIPSet() *schema.Resource { func resourceAwsWafIPSetCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).wafconn - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { params := &waf.CreateIPSetInput{ ChangeToken: token, @@ -145,7 +145,7 @@ func resourceAwsWafIPSetDelete(d *schema.ResourceData, meta interface{}) error { } } - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.DeleteIPSetInput{ ChangeToken: token, @@ -163,7 +163,7 @@ func resourceAwsWafIPSetDelete(d *schema.ResourceData, meta interface{}) error { func updateWafIpSetDescriptors(id string, oldD, newD []interface{}, conn *waf.WAF) error { for _, ipSetUpdates := range diffWafIpSetDescriptors(oldD, newD) { - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateIPSetInput{ ChangeToken: token, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_rate_based_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_rate_based_rule.go index 9757fb1adb..2d3f5f5dad 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_rate_based_rule.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_rate_based_rule.go @@ -42,7 +42,7 @@ func resourceAwsWafRateBasedRule() *schema.Resource { "data_id": { Type: schema.TypeString, Required: true, - ValidateFunc: validateMaxLength(128), + ValidateFunc: validation.StringLenBetween(0, 128), }, "type": { Type: schema.TypeString, @@ -68,7 +68,7 @@ func resourceAwsWafRateBasedRule() *schema.Resource { func resourceAwsWafRateBasedRuleCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).wafconn - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { params := &waf.CreateRateBasedRuleInput{ ChangeToken: token, @@ -157,7 +157,7 @@ func resourceAwsWafRateBasedRuleDelete(d *schema.ResourceData, meta interface{}) } } - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.DeleteRateBasedRuleInput{ ChangeToken: token, @@ -174,7 +174,7 @@ func resourceAwsWafRateBasedRuleDelete(d *schema.ResourceData, meta interface{}) } func updateWafRateBasedRuleResource(id string, oldP, newP []interface{}, rateLimit interface{}, conn *waf.WAF) error { - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateRateBasedRuleInput{ ChangeToken: token, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_regex_match_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_regex_match_set.go index ed19133fa8..9bfbee72be 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_regex_match_set.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_regex_match_set.go @@ -69,7 +69,7 @@ func resourceAwsWafRegexMatchSetCreate(d *schema.ResourceData, meta interface{}) log.Printf("[INFO] Creating WAF Regex Match Set: %s", d.Get("name").(string)) - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { params := &waf.CreateRegexMatchSetInput{ ChangeToken: token, @@ -140,7 +140,7 @@ func resourceAwsWafRegexMatchSetDelete(d *schema.ResourceData, meta interface{}) } } - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.DeleteRegexMatchSetInput{ ChangeToken: token, @@ -157,7 +157,7 @@ func resourceAwsWafRegexMatchSetDelete(d *schema.ResourceData, meta interface{}) } func updateRegexMatchSetResource(id string, oldT, newT []interface{}, conn *waf.WAF) error { - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateRegexMatchSetInput{ ChangeToken: token, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_regex_pattern_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_regex_pattern_set.go index 1ebbc58f69..a09ba6ffcc 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_regex_pattern_set.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_regex_pattern_set.go @@ -36,7 +36,7 @@ func resourceAwsWafRegexPatternSetCreate(d *schema.ResourceData, meta interface{ log.Printf("[INFO] Creating WAF Regex Pattern Set: %s", d.Get("name").(string)) - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { params := &waf.CreateRegexPatternSetInput{ ChangeToken: token, @@ -109,7 +109,7 @@ func resourceAwsWafRegexPatternSetDelete(d *schema.ResourceData, meta interface{ } } - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.DeleteRegexPatternSetInput{ ChangeToken: token, @@ -126,7 +126,7 @@ func resourceAwsWafRegexPatternSetDelete(d *schema.ResourceData, meta interface{ } func updateWafRegexPatternSetPatternStrings(id string, oldPatterns, newPatterns []interface{}, conn *waf.WAF) error { - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateRegexPatternSetInput{ ChangeToken: token, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_rule.go index b3d7e3c357..fae17269a5 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_rule.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_rule.go @@ -8,6 +8,7 @@ import ( "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/waf" "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" ) func resourceAwsWafRule() *schema.Resource { @@ -16,6 +17,9 @@ func resourceAwsWafRule() *schema.Resource { Read: resourceAwsWafRuleRead, Update: resourceAwsWafRuleUpdate, Delete: resourceAwsWafRuleDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "name": { @@ -41,7 +45,7 @@ func resourceAwsWafRule() *schema.Resource { "data_id": { Type: schema.TypeString, Required: true, - ValidateFunc: validateMaxLength(128), + ValidateFunc: validation.StringLenBetween(0, 128), }, "type": { Type: schema.TypeString, @@ -58,7 +62,7 @@ func resourceAwsWafRule() *schema.Resource { func resourceAwsWafRuleCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).wafconn - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { params := &waf.CreateRuleInput{ ChangeToken: token, @@ -140,7 +144,7 @@ func resourceAwsWafRuleDelete(d *schema.ResourceData, meta interface{}) error { } } - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.DeleteRuleInput{ ChangeToken: token, @@ -157,7 +161,7 @@ func resourceAwsWafRuleDelete(d *schema.ResourceData, meta interface{}) error { } func updateWafRuleResource(id string, oldP, newP []interface{}, conn *waf.WAF) error { - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateRuleInput{ ChangeToken: token, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_rule_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_rule_group.go index 16c6e74f70..803d6ea07a 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_rule_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_rule_group.go @@ -69,7 +69,7 @@ func resourceAwsWafRuleGroup() *schema.Resource { func resourceAwsWafRuleGroupCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).wafconn - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { params := &waf.CreateRuleGroupInput{ ChangeToken: token, @@ -108,6 +108,9 @@ func resourceAwsWafRuleGroupRead(d *schema.ResourceData, meta interface{}) error rResp, err := conn.ListActivatedRulesInRuleGroup(&waf.ListActivatedRulesInRuleGroupInput{ RuleGroupId: aws.String(d.Id()), }) + if err != nil { + return fmt.Errorf("error listing activated rules in WAF Rule Group (%s): %s", d.Id(), err) + } d.Set("activated_rule", flattenWafActivatedRules(rResp.ActivatedRules)) d.Set("name", resp.RuleGroup.Name) @@ -137,11 +140,8 @@ func resourceAwsWafRuleGroupDelete(d *schema.ResourceData, meta interface{}) err oldRules := d.Get("activated_rule").(*schema.Set).List() err := deleteWafRuleGroup(d.Id(), oldRules, conn) - if err != nil { - return err - } - return nil + return err } func deleteWafRuleGroup(id string, oldRules []interface{}, conn *waf.WAF) error { @@ -153,7 +153,7 @@ func deleteWafRuleGroup(id string, oldRules []interface{}, conn *waf.WAF) error } } - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.DeleteRuleGroupInput{ ChangeToken: token, @@ -169,7 +169,7 @@ func deleteWafRuleGroup(id string, oldRules []interface{}, conn *waf.WAF) error } func updateWafRuleGroupResource(id string, oldRules, newRules []interface{}, conn *waf.WAF) error { - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateRuleGroupInput{ ChangeToken: token, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_size_constraint_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_size_constraint_set.go index cc62285493..8757524733 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_size_constraint_set.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_size_constraint_set.go @@ -1,12 +1,12 @@ package aws import ( + "fmt" "log" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/waf" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/schema" ) @@ -26,7 +26,7 @@ func resourceAwsWafSizeConstraintSetCreate(d *schema.ResourceData, meta interfac log.Printf("[INFO] Creating SizeConstraintSet: %s", d.Get("name").(string)) - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { params := &waf.CreateSizeConstraintSetInput{ ChangeToken: token, @@ -36,7 +36,7 @@ func resourceAwsWafSizeConstraintSetCreate(d *schema.ResourceData, meta interfac return conn.CreateSizeConstraintSet(params) }) if err != nil { - return errwrap.Wrapf("[ERROR] Error creating SizeConstraintSet: {{err}}", err) + return fmt.Errorf("Error creating SizeConstraintSet: %s", err) } resp := out.(*waf.CreateSizeConstraintSetOutput) @@ -78,7 +78,7 @@ func resourceAwsWafSizeConstraintSetUpdate(d *schema.ResourceData, meta interfac err := updateSizeConstraintSetResource(d.Id(), oldConstraints, newConstraints, conn) if err != nil { - return errwrap.Wrapf("[ERROR] Error updating SizeConstraintSet: {{err}}", err) + return fmt.Errorf("Error updating SizeConstraintSet: %s", err) } } @@ -94,11 +94,11 @@ func resourceAwsWafSizeConstraintSetDelete(d *schema.ResourceData, meta interfac noConstraints := []interface{}{} err := updateSizeConstraintSetResource(d.Id(), oldConstraints, noConstraints, conn) if err != nil { - return errwrap.Wrapf("[ERROR] Error deleting SizeConstraintSet: {{err}}", err) + return fmt.Errorf("Error deleting SizeConstraintSet: %s", err) } } - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.DeleteSizeConstraintSetInput{ ChangeToken: token, @@ -107,14 +107,14 @@ func resourceAwsWafSizeConstraintSetDelete(d *schema.ResourceData, meta interfac return conn.DeleteSizeConstraintSet(req) }) if err != nil { - return errwrap.Wrapf("[ERROR] Error deleting SizeConstraintSet: {{err}}", err) + return fmt.Errorf("Error deleting SizeConstraintSet: %s", err) } return nil } func updateSizeConstraintSetResource(id string, oldS, newS []interface{}, conn *waf.WAF) error { - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateSizeConstraintSetInput{ ChangeToken: token, @@ -126,7 +126,7 @@ func updateSizeConstraintSetResource(id string, oldS, newS []interface{}, conn * return conn.UpdateSizeConstraintSet(req) }) if err != nil { - return errwrap.Wrapf("[ERROR] Error updating SizeConstraintSet: {{err}}", err) + return fmt.Errorf("Error updating SizeConstraintSet: %s", err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_sql_injection_match_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_sql_injection_match_set.go index 019b99bbe5..ff9bb4d6eb 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_sql_injection_match_set.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_sql_injection_match_set.go @@ -1,12 +1,12 @@ package aws import ( + "fmt" "log" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/waf" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/schema" ) @@ -61,7 +61,7 @@ func resourceAwsWafSqlInjectionMatchSetCreate(d *schema.ResourceData, meta inter log.Printf("[INFO] Creating SqlInjectionMatchSet: %s", d.Get("name").(string)) - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { params := &waf.CreateSqlInjectionMatchSetInput{ ChangeToken: token, @@ -71,7 +71,7 @@ func resourceAwsWafSqlInjectionMatchSetCreate(d *schema.ResourceData, meta inter return conn.CreateSqlInjectionMatchSet(params) }) if err != nil { - return errwrap.Wrapf("[ERROR] Error creating SqlInjectionMatchSet: {{err}}", err) + return fmt.Errorf("Error creating SqlInjectionMatchSet: %s", err) } resp := out.(*waf.CreateSqlInjectionMatchSetOutput) d.SetId(*resp.SqlInjectionMatchSet.SqlInjectionMatchSetId) @@ -112,7 +112,7 @@ func resourceAwsWafSqlInjectionMatchSetUpdate(d *schema.ResourceData, meta inter err := updateSqlInjectionMatchSetResource(d.Id(), oldT, newT, conn) if err != nil { - return errwrap.Wrapf("[ERROR] Error updating SqlInjectionMatchSet: {{err}}", err) + return fmt.Errorf("Error updating SqlInjectionMatchSet: %s", err) } } @@ -128,11 +128,11 @@ func resourceAwsWafSqlInjectionMatchSetDelete(d *schema.ResourceData, meta inter noTuples := []interface{}{} err := updateSqlInjectionMatchSetResource(d.Id(), oldTuples, noTuples, conn) if err != nil { - return errwrap.Wrapf("[ERROR] Error deleting SqlInjectionMatchSet: {{err}}", err) + return fmt.Errorf("Error deleting SqlInjectionMatchSet: %s", err) } } - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.DeleteSqlInjectionMatchSetInput{ ChangeToken: token, @@ -142,14 +142,14 @@ func resourceAwsWafSqlInjectionMatchSetDelete(d *schema.ResourceData, meta inter return conn.DeleteSqlInjectionMatchSet(req) }) if err != nil { - return errwrap.Wrapf("[ERROR] Error deleting SqlInjectionMatchSet: {{err}}", err) + return fmt.Errorf("Error deleting SqlInjectionMatchSet: %s", err) } return nil } func updateSqlInjectionMatchSetResource(id string, oldT, newT []interface{}, conn *waf.WAF) error { - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateSqlInjectionMatchSetInput{ ChangeToken: token, @@ -161,14 +161,14 @@ func updateSqlInjectionMatchSetResource(id string, oldT, newT []interface{}, con return conn.UpdateSqlInjectionMatchSet(req) }) if err != nil { - return errwrap.Wrapf("[ERROR] Error updating SqlInjectionMatchSet: {{err}}", err) + return fmt.Errorf("Error updating SqlInjectionMatchSet: %s", err) } return nil } func flattenWafSqlInjectionMatchTuples(ts []*waf.SqlInjectionMatchTuple) []interface{} { - out := make([]interface{}, len(ts), len(ts)) + out := make([]interface{}, len(ts)) for i, t := range ts { m := make(map[string]interface{}) m["text_transformation"] = *t.TextTransformation diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_web_acl.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_web_acl.go index a4c130bd13..0301623860 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_web_acl.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_web_acl.go @@ -104,7 +104,7 @@ func resourceAwsWafWebAcl() *schema.Resource { func resourceAwsWafWebAclCreate(d *schema.ResourceData, meta interface{}) error { conn := meta.(*AWSClient).wafconn - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { params := &waf.CreateWebACLInput{ ChangeToken: token, @@ -165,7 +165,7 @@ func resourceAwsWafWebAclUpdate(d *schema.ResourceData, meta interface{}) error o, n := d.GetChange("rules") oldR, newR := o.(*schema.Set).List(), n.(*schema.Set).List() - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateWebACLInput{ ChangeToken: token, @@ -189,7 +189,7 @@ func resourceAwsWafWebAclDelete(d *schema.ResourceData, meta interface{}) error // First, need to delete all rules rules := d.Get("rules").(*schema.Set).List() if len(rules) > 0 { - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateWebACLInput{ ChangeToken: token, @@ -204,7 +204,7 @@ func resourceAwsWafWebAclDelete(d *schema.ResourceData, meta interface{}) error } } - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.DeleteWebACLInput{ ChangeToken: token, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_xss_match_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_xss_match_set.go index f74eab1237..56dff11917 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_xss_match_set.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_waf_xss_match_set.go @@ -7,7 +7,6 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/waf" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/schema" ) @@ -62,7 +61,7 @@ func resourceAwsWafXssMatchSetCreate(d *schema.ResourceData, meta interface{}) e log.Printf("[INFO] Creating XssMatchSet: %s", d.Get("name").(string)) - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) out, err := wr.RetryWithToken(func(token *string) (interface{}, error) { params := &waf.CreateXssMatchSetInput{ ChangeToken: token, @@ -72,7 +71,7 @@ func resourceAwsWafXssMatchSetCreate(d *schema.ResourceData, meta interface{}) e return conn.CreateXssMatchSet(params) }) if err != nil { - return errwrap.Wrapf("[ERROR] Error creating XssMatchSet: {{err}}", err) + return fmt.Errorf("Error creating XssMatchSet: %s", err) } resp := out.(*waf.CreateXssMatchSetOutput) @@ -114,7 +113,7 @@ func resourceAwsWafXssMatchSetUpdate(d *schema.ResourceData, meta interface{}) e err := updateXssMatchSetResource(d.Id(), oldT, newT, conn) if err != nil { - return errwrap.Wrapf("[ERROR] Error updating XssMatchSet: {{err}}", err) + return fmt.Errorf("Error updating XssMatchSet: %s", err) } } @@ -133,7 +132,7 @@ func resourceAwsWafXssMatchSetDelete(d *schema.ResourceData, meta interface{}) e } } - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.DeleteXssMatchSetInput{ ChangeToken: token, @@ -143,14 +142,14 @@ func resourceAwsWafXssMatchSetDelete(d *schema.ResourceData, meta interface{}) e return conn.DeleteXssMatchSet(req) }) if err != nil { - return errwrap.Wrapf("[ERROR] Error deleting XssMatchSet: {{err}}", err) + return fmt.Errorf("Error deleting XssMatchSet: %s", err) } return nil } func updateXssMatchSetResource(id string, oldT, newT []interface{}, conn *waf.WAF) error { - wr := newWafRetryer(conn, "global") + wr := newWafRetryer(conn) _, err := wr.RetryWithToken(func(token *string) (interface{}, error) { req := &waf.UpdateXssMatchSetInput{ ChangeToken: token, @@ -162,14 +161,14 @@ func updateXssMatchSetResource(id string, oldT, newT []interface{}, conn *waf.WA return conn.UpdateXssMatchSet(req) }) if err != nil { - return errwrap.Wrapf("[ERROR] Error updating XssMatchSet: {{err}}", err) + return fmt.Errorf("Error updating XssMatchSet: %s", err) } return nil } func flattenWafXssMatchTuples(ts []*waf.XssMatchTuple) []interface{} { - out := make([]interface{}, len(ts), len(ts)) + out := make([]interface{}, len(ts)) for i, t := range ts { m := make(map[string]interface{}) m["field_to_match"] = flattenFieldToMatch(t.FieldToMatch) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_byte_match_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_byte_match_set.go index a7e621f5d4..f2578764ab 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_byte_match_set.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_byte_match_set.go @@ -1,13 +1,12 @@ package aws import ( + "fmt" "log" "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/wafregional" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/schema" ) @@ -32,7 +31,7 @@ func resourceAwsWafRegionalByteMatchSet() *schema.Resource { Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "field_to_match": { - Type: schema.TypeSet, + Type: schema.TypeList, Required: true, MaxItems: 1, Elem: &schema.Resource{ @@ -69,7 +68,7 @@ func resourceAwsWafRegionalByteMatchSet() *schema.Resource { Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "field_to_match": { - Type: schema.TypeSet, + Type: schema.TypeList, Required: true, MaxItems: 1, Elem: &schema.Resource{ @@ -120,7 +119,7 @@ func resourceAwsWafRegionalByteMatchSetCreate(d *schema.ResourceData, meta inter }) if err != nil { - return errwrap.Wrapf("[ERROR] Error creating ByteMatchSet: {{err}}", err) + return fmt.Errorf("Error creating ByteMatchSet: %s", err) } resp := out.(*waf.CreateByteMatchSetOutput) @@ -139,20 +138,31 @@ func resourceAwsWafRegionalByteMatchSetRead(d *schema.ResourceData, meta interfa } resp, err := conn.GetByteMatchSet(params) + + if isAWSErr(err, waf.ErrCodeNonexistentItemException, "") { + log.Printf("[WARN] WAF Regional Byte Set Match (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil + } + if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "WAFNonexistentItemException" { - log.Printf("[WARN] WAF IPSet (%s) not found, removing from state", d.Id()) - d.SetId("") - return nil - } + return fmt.Errorf("error getting WAF Regional Byte Match Set (%s): %s", d.Id(), err) + } - return err + if resp == nil || resp.ByteMatchSet == nil { + log.Printf("[WARN] WAF Regional Byte Set Match (%s) not found, removing from state", d.Id()) + d.SetId("") + return nil } if _, ok := d.GetOk("byte_match_tuple"); ok { - d.Set("byte_match_tuple", flattenWafByteMatchTuplesWR(resp.ByteMatchSet.ByteMatchTuples)) + if err := d.Set("byte_match_tuple", flattenWafByteMatchTuplesWR(resp.ByteMatchSet.ByteMatchTuples)); err != nil { + return fmt.Errorf("error setting byte_match_tuple: %s", err) + } } else { - d.Set("byte_match_tuples", flattenWafByteMatchTuplesWR(resp.ByteMatchSet.ByteMatchTuples)) + if err := d.Set("byte_match_tuples", flattenWafByteMatchTuplesWR(resp.ByteMatchSet.ByteMatchTuples)); err != nil { + return fmt.Errorf("error setting byte_match_tuples: %s", err) + } } d.Set("name", resp.ByteMatchSet.Name) @@ -160,30 +170,21 @@ func resourceAwsWafRegionalByteMatchSetRead(d *schema.ResourceData, meta interfa } func flattenWafByteMatchTuplesWR(in []*waf.ByteMatchTuple) []interface{} { - tuples := make([]interface{}, len(in), len(in)) + tuples := make([]interface{}, len(in)) for i, tuple := range in { - field_to_match := tuple.FieldToMatch - m := map[string]interface{}{ - "type": *field_to_match.Type, - } - - if field_to_match.Data == nil { - m["data"] = "" - } else { - m["data"] = *field_to_match.Data + fieldToMatchMap := map[string]interface{}{ + "data": aws.StringValue(tuple.FieldToMatch.Data), + "type": aws.StringValue(tuple.FieldToMatch.Type), } - var ms []map[string]interface{} - ms = append(ms, m) - - tuple := map[string]interface{}{ - "field_to_match": ms, - "positional_constraint": *tuple.PositionalConstraint, - "target_string": tuple.TargetString, - "text_transformation": *tuple.TextTransformation, + m := map[string]interface{}{ + "field_to_match": []map[string]interface{}{fieldToMatchMap}, + "positional_constraint": aws.StringValue(tuple.PositionalConstraint), + "target_string": string(tuple.TargetString), + "text_transformation": aws.StringValue(tuple.TextTransformation), } - tuples[i] = tuple + tuples[i] = m } return tuples @@ -200,7 +201,7 @@ func resourceAwsWafRegionalByteMatchSetUpdate(d *schema.ResourceData, meta inter err := updateByteMatchSetResourceWR(d, oldT, newT, conn, region) if err != nil { - return errwrap.Wrapf("[ERROR] Error updating ByteMatchSet: {{err}}", err) + return fmt.Errorf("Error updating ByteMatchSet: %s", err) } } else if d.HasChange("byte_match_tuples") { o, n := d.GetChange("byte_match_tuples") @@ -208,7 +209,7 @@ func resourceAwsWafRegionalByteMatchSetUpdate(d *schema.ResourceData, meta inter err := updateByteMatchSetResourceWR(d, oldT, newT, conn, region) if err != nil { - return errwrap.Wrapf("[ERROR] Error updating ByteMatchSet: {{err}}", err) + return fmt.Errorf("Error updating ByteMatchSet: %s", err) } } return resourceAwsWafRegionalByteMatchSetRead(d, meta) @@ -232,7 +233,7 @@ func resourceAwsWafRegionalByteMatchSetDelete(d *schema.ResourceData, meta inter err := updateByteMatchSetResourceWR(d, oldT, newT, conn, region) if err != nil { - return errwrap.Wrapf("[ERROR] Error deleting ByteMatchSet: {{err}}", err) + return fmt.Errorf("Error deleting ByteMatchSet: %s", err) } } @@ -245,7 +246,7 @@ func resourceAwsWafRegionalByteMatchSetDelete(d *schema.ResourceData, meta inter return conn.DeleteByteMatchSet(req) }) if err != nil { - return errwrap.Wrapf("[ERROR] Error deleting ByteMatchSet: {{err}}", err) + return fmt.Errorf("Error deleting ByteMatchSet: %s", err) } return nil @@ -263,7 +264,7 @@ func updateByteMatchSetResourceWR(d *schema.ResourceData, oldT, newT []interface return conn.UpdateByteMatchSet(req) }) if err != nil { - return errwrap.Wrapf("[ERROR] Error updating ByteMatchSet: {{err}}", err) + return fmt.Errorf("Error updating ByteMatchSet: %s", err) } return nil @@ -283,7 +284,7 @@ func diffByteMatchSetTuple(oldT, newT []interface{}) []*waf.ByteMatchSetUpdate { updates = append(updates, &waf.ByteMatchSetUpdate{ Action: aws.String(waf.ChangeActionDelete), ByteMatchTuple: &waf.ByteMatchTuple{ - FieldToMatch: expandFieldToMatch(tuple["field_to_match"].(*schema.Set).List()[0].(map[string]interface{})), + FieldToMatch: expandFieldToMatch(tuple["field_to_match"].([]interface{})[0].(map[string]interface{})), PositionalConstraint: aws.String(tuple["positional_constraint"].(string)), TargetString: []byte(tuple["target_string"].(string)), TextTransformation: aws.String(tuple["text_transformation"].(string)), @@ -297,7 +298,7 @@ func diffByteMatchSetTuple(oldT, newT []interface{}) []*waf.ByteMatchSetUpdate { updates = append(updates, &waf.ByteMatchSetUpdate{ Action: aws.String(waf.ChangeActionInsert), ByteMatchTuple: &waf.ByteMatchTuple{ - FieldToMatch: expandFieldToMatch(tuple["field_to_match"].(*schema.Set).List()[0].(map[string]interface{})), + FieldToMatch: expandFieldToMatch(tuple["field_to_match"].([]interface{})[0].(map[string]interface{})), PositionalConstraint: aws.String(tuple["positional_constraint"].(string)), TargetString: []byte(tuple["target_string"].(string)), TextTransformation: aws.String(tuple["text_transformation"].(string)), diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_ipset.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_ipset.go index 3ef2f56c10..b5cd3828f9 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_ipset.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_ipset.go @@ -103,7 +103,7 @@ func resourceAwsWafRegionalIPSetRead(d *schema.ResourceData, meta interface{}) e } func flattenWafIpSetDescriptorWR(in []*waf.IPSetDescriptor) []interface{} { - descriptors := make([]interface{}, len(in), len(in)) + descriptors := make([]interface{}, len(in)) for i, descriptor := range in { d := map[string]interface{}{ diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_rate_based_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_rate_based_rule.go index de7c9c072d..5cfc40f114 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_rate_based_rule.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_rate_based_rule.go @@ -42,7 +42,7 @@ func resourceAwsWafRegionalRateBasedRule() *schema.Resource { "data_id": { Type: schema.TypeString, Required: true, - ValidateFunc: validateMaxLength(128), + ValidateFunc: validation.StringLenBetween(0, 128), }, "type": { Type: schema.TypeString, diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_rule.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_rule.go index f478a94824..25cc935a86 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_rule.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_rule.go @@ -168,7 +168,7 @@ func updateWafRegionalRuleResource(id string, oldP, newP []interface{}, meta int } func flattenWafPredicates(ts []*waf.Predicate) []interface{} { - out := make([]interface{}, len(ts), len(ts)) + out := make([]interface{}, len(ts)) for i, p := range ts { m := make(map[string]interface{}) m["negated"] = *p.Negated diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_rule_group.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_rule_group.go index c170f3ac9d..e82e09798f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_rule_group.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_rule_group.go @@ -110,6 +110,9 @@ func resourceAwsWafRegionalRuleGroupRead(d *schema.ResourceData, meta interface{ rResp, err := conn.ListActivatedRulesInRuleGroup(&waf.ListActivatedRulesInRuleGroupInput{ RuleGroupId: aws.String(d.Id()), }) + if err != nil { + return fmt.Errorf("error listing activated rules in WAF Regional Rule Group (%s): %s", d.Id(), err) + } d.Set("activated_rule", flattenWafActivatedRules(rResp.ActivatedRules)) d.Set("name", resp.RuleGroup.Name) @@ -141,11 +144,8 @@ func resourceAwsWafRegionalRuleGroupDelete(d *schema.ResourceData, meta interfac oldRules := d.Get("activated_rule").(*schema.Set).List() err := deleteWafRegionalRuleGroup(d.Id(), oldRules, conn, region) - if err != nil { - return err - } - return nil + return err } func deleteWafRegionalRuleGroup(id string, oldRules []interface{}, conn *wafregional.WAFRegional, region string) error { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_size_constraint_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_size_constraint_set.go index 6298666db3..904547d181 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_size_constraint_set.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_size_constraint_set.go @@ -39,7 +39,7 @@ func resourceAwsWafRegionalSizeConstraintSetCreate(d *schema.ResourceData, meta return conn.CreateSizeConstraintSet(params) }) if err != nil { - return fmt.Errorf("[ERROR] Error creating WAF Regional SizeConstraintSet: %s", err) + return fmt.Errorf("Error creating WAF Regional SizeConstraintSet: %s", err) } resp := out.(*waf.CreateSizeConstraintSetOutput) @@ -80,7 +80,7 @@ func resourceAwsWafRegionalSizeConstraintSetUpdate(d *schema.ResourceData, meta oldConstraints, newConstraints := o.(*schema.Set).List(), n.(*schema.Set).List() if err := updateRegionalSizeConstraintSetResource(d.Id(), oldConstraints, newConstraints, client.wafregionalconn, client.region); err != nil { - return fmt.Errorf("[ERROR] Error updating WAF Regional SizeConstraintSet: %s", err) + return fmt.Errorf("Error updating WAF Regional SizeConstraintSet: %s", err) } } @@ -96,7 +96,7 @@ func resourceAwsWafRegionalSizeConstraintSetDelete(d *schema.ResourceData, meta if len(oldConstraints) > 0 { noConstraints := []interface{}{} if err := updateRegionalSizeConstraintSetResource(d.Id(), oldConstraints, noConstraints, conn, region); err != nil { - return fmt.Errorf("[ERROR] Error deleting WAF Regional SizeConstraintSet: %s", err) + return fmt.Errorf("Error deleting WAF Regional SizeConstraintSet: %s", err) } } @@ -109,7 +109,7 @@ func resourceAwsWafRegionalSizeConstraintSetDelete(d *schema.ResourceData, meta return conn.DeleteSizeConstraintSet(req) }) if err != nil { - return fmt.Errorf("[ERROR] Error deleting WAF Regional SizeConstraintSet: %s", err) + return fmt.Errorf("Error deleting WAF Regional SizeConstraintSet: %s", err) } return nil @@ -128,7 +128,7 @@ func updateRegionalSizeConstraintSetResource(id string, oldConstraints, newConst return conn.UpdateSizeConstraintSet(req) }) if err != nil { - return fmt.Errorf("[ERROR] Error updating WAF Regional SizeConstraintSet: %s", err) + return fmt.Errorf("Error updating WAF Regional SizeConstraintSet: %s", err) } return nil diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_sql_injection_match_set.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_sql_injection_match_set.go index f7d23c9c2a..43e4554e75 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_sql_injection_match_set.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_sql_injection_match_set.go @@ -122,7 +122,7 @@ func resourceAwsWafRegionalSqlInjectionMatchSetUpdate(d *schema.ResourceData, me err := updateSqlInjectionMatchSetResourceWR(d.Id(), oldT, newT, conn, region) if err != nil { - return fmt.Errorf("[ERROR] Error updating Regional WAF SQL Injection Match Set: %s", err) + return fmt.Errorf("Error updating Regional WAF SQL Injection Match Set: %s", err) } } @@ -139,7 +139,7 @@ func resourceAwsWafRegionalSqlInjectionMatchSetDelete(d *schema.ResourceData, me noTuples := []interface{}{} err := updateSqlInjectionMatchSetResourceWR(d.Id(), oldTuples, noTuples, conn, region) if err != nil { - return fmt.Errorf("[ERROR] Error deleting Regional WAF SQL Injection Match Set: %s", err) + return fmt.Errorf("Error deleting Regional WAF SQL Injection Match Set: %s", err) } } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_web_acl_association.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_web_acl_association.go index f076daebcb..eb3a9128a2 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_web_acl_association.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_wafregional_web_acl_association.go @@ -113,11 +113,7 @@ func resourceAwsWafRegionalWebAclAssociationDelete(d *schema.ResourceData, meta // If action successful HTTP 200 response with an empty body _, err := conn.DisassociateWebACL(params) - if err != nil { - return err - } - - return nil + return err } func resourceAwsWafRegionalWebAclAssociationParseId(id string) (webAclId, resourceArn string) { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/s3_tags.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/s3_tags.go index 8de14fa3f5..2712fb155c 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/s3_tags.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/s3_tags.go @@ -22,7 +22,7 @@ func setTagsS3(conn *s3.S3, d *schema.ResourceData) error { // Set tags if len(remove) > 0 { log.Printf("[DEBUG] Removing tags: %#v", remove) - _, err := retryOnAwsCodes([]string{"NoSuchBucket", "OperationAborted"}, func() (interface{}, error) { + _, err := RetryOnAwsCodes([]string{"NoSuchBucket", "OperationAborted"}, func() (interface{}, error) { return conn.DeleteBucketTagging(&s3.DeleteBucketTaggingInput{ Bucket: aws.String(d.Get("bucket").(string)), }) @@ -40,7 +40,7 @@ func setTagsS3(conn *s3.S3, d *schema.ResourceData) error { }, } - _, err := retryOnAwsCodes([]string{"NoSuchBucket", "OperationAborted"}, func() (interface{}, error) { + _, err := RetryOnAwsCodes([]string{"NoSuchBucket", "OperationAborted"}, func() (interface{}, error) { return conn.PutBucketTagging(req) }) if err != nil { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/sort.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/sort.go deleted file mode 100644 index 0d90458ebf..0000000000 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/sort.go +++ /dev/null @@ -1,53 +0,0 @@ -package aws - -import ( - "sort" - "time" - - "github.com/aws/aws-sdk-go/service/ec2" -) - -type imageSort []*ec2.Image -type snapshotSort []*ec2.Snapshot - -func (a imageSort) Len() int { - return len(a) -} - -func (a imageSort) Swap(i, j int) { - a[i], a[j] = a[j], a[i] -} - -func (a imageSort) Less(i, j int) bool { - itime, _ := time.Parse(time.RFC3339, *a[i].CreationDate) - jtime, _ := time.Parse(time.RFC3339, *a[j].CreationDate) - return itime.Unix() < jtime.Unix() -} - -// Sort images by creation date, in descending order. -func sortImages(images []*ec2.Image) []*ec2.Image { - sortedImages := images - sort.Sort(sort.Reverse(imageSort(sortedImages))) - return sortedImages -} - -func (a snapshotSort) Len() int { - return len(a) -} - -func (a snapshotSort) Swap(i, j int) { - a[i], a[j] = a[j], a[i] -} - -func (a snapshotSort) Less(i, j int) bool { - itime := *a[i].StartTime - jtime := *a[j].StartTime - return itime.Unix() < jtime.Unix() -} - -// Sort snapshots by creation date, in descending order. -func sortSnapshots(snapshots []*ec2.Snapshot) []*ec2.Snapshot { - sortedSnapshots := snapshots - sort.Sort(sort.Reverse(snapshotSort(sortedSnapshots))) - return sortedSnapshots -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/structure.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/structure.go index 924da6b901..e322158966 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/structure.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/structure.go @@ -85,7 +85,7 @@ func expandListeners(configured []interface{}) ([]*elb.Listener, error) { if valid { listeners = append(listeners, l) } else { - return nil, fmt.Errorf("[ERR] ELB Listener: ssl_certificate_id may be set only when protocol is 'https' or 'ssl'") + return nil, fmt.Errorf("ELB Listener: ssl_certificate_id may be set only when protocol is 'https' or 'ssl'") } } @@ -113,6 +113,35 @@ func expandEcsVolumes(configured []interface{}) ([]*ecs.Volume, error) { } } + configList, ok := data["docker_volume_configuration"].([]interface{}) + if ok && len(configList) > 0 { + config := configList[0].(map[string]interface{}) + l.DockerVolumeConfiguration = &ecs.DockerVolumeConfiguration{} + + if v, ok := config["scope"].(string); ok && v != "" { + l.DockerVolumeConfiguration.Scope = aws.String(v) + } + + if v, ok := config["autoprovision"]; ok && v != "" { + scope := l.DockerVolumeConfiguration.Scope + if scope == nil || *scope != ecs.ScopeTask || v.(bool) { + l.DockerVolumeConfiguration.Autoprovision = aws.Bool(v.(bool)) + } + } + + if v, ok := config["driver"].(string); ok && v != "" { + l.DockerVolumeConfiguration.Driver = aws.String(v) + } + + if v, ok := config["driver_opts"].(map[string]interface{}); ok && len(v) > 0 { + l.DockerVolumeConfiguration.DriverOpts = stringMapToPointers(v) + } + + if v, ok := config["labels"].(map[string]interface{}); ok && len(v) > 0 { + l.DockerVolumeConfiguration.Labels = stringMapToPointers(v) + } + } + volumes = append(volumes, l) } @@ -621,15 +650,47 @@ func flattenEcsVolumes(list []*ecs.Volume) []map[string]interface{} { "name": *volume.Name, } - if volume.Host.SourcePath != nil { + if volume.Host != nil && volume.Host.SourcePath != nil { l["host_path"] = *volume.Host.SourcePath } + if volume.DockerVolumeConfiguration != nil { + l["docker_volume_configuration"] = flattenDockerVolumeConfiguration(volume.DockerVolumeConfiguration) + } + result = append(result, l) } return result } +func flattenDockerVolumeConfiguration(config *ecs.DockerVolumeConfiguration) []interface{} { + var items []interface{} + m := make(map[string]interface{}) + + if config.Scope != nil { + m["scope"] = aws.StringValue(config.Scope) + } + + if config.Autoprovision != nil { + m["autoprovision"] = aws.BoolValue(config.Autoprovision) + } + + if config.Driver != nil { + m["driver"] = aws.StringValue(config.Driver) + } + + if config.DriverOpts != nil { + m["driver_opts"] = pointersMapToStringList(config.DriverOpts) + } + + if config.Labels != nil { + m["labels"] = pointersMapToStringList(config.Labels) + } + + items = append(items, m) + return items +} + // Flattens an array of ECS LoadBalancers into a []map[string]interface{} func flattenEcsLoadBalancers(list []*ecs.LoadBalancer) []map[string]interface{} { result := make([]map[string]interface{}, 0, len(list)) @@ -1287,7 +1348,7 @@ func flattenConfigRecordingGroup(g *configservice.RecordingGroup) []map[string]i } func flattenConfigSnapshotDeliveryProperties(p *configservice.ConfigSnapshotDeliveryProperties) []map[string]interface{} { - m := make(map[string]interface{}, 0) + m := make(map[string]interface{}) if p.DeliveryFrequency != nil { m["delivery_frequency"] = *p.DeliveryFrequency @@ -1314,7 +1375,7 @@ func stringMapToPointers(m map[string]interface{}) map[string]*string { func flattenDSVpcSettings( s *directoryservice.DirectoryVpcSettingsDescription) []map[string]interface{} { - settings := make(map[string]interface{}, 0) + settings := make(map[string]interface{}) if s == nil { return nil @@ -1345,7 +1406,7 @@ func flattenLambdaEnvironment(lambdaEnv *lambda.EnvironmentResponse) []interface } func flattenLambdaVpcConfigResponse(s *lambda.VpcConfigResponse) []map[string]interface{} { - settings := make(map[string]interface{}, 0) + settings := make(map[string]interface{}) if s == nil { return nil @@ -1387,7 +1448,7 @@ func flattenDSConnectSettings( return nil } - settings := make(map[string]interface{}, 0) + settings := make(map[string]interface{}) settings["customer_dns_ips"] = schema.NewSet(schema.HashString, flattenStringList(customerDnsIps)) settings["connect_ips"] = schema.NewSet(schema.HashString, flattenStringList(s.ConnectIps)) @@ -1719,29 +1780,32 @@ func expandApiGatewayStageKeyOperations(d *schema.ResourceData) []*apigateway.Pa return operations } -func expandCloudWachLogMetricTransformations(m map[string]interface{}) ([]*cloudwatchlogs.MetricTransformation, error) { +func expandCloudWatchLogMetricTransformations(m map[string]interface{}) []*cloudwatchlogs.MetricTransformation { transformation := cloudwatchlogs.MetricTransformation{ MetricName: aws.String(m["name"].(string)), MetricNamespace: aws.String(m["namespace"].(string)), MetricValue: aws.String(m["value"].(string)), } - if m["default_value"] != "" { - transformation.DefaultValue = aws.Float64(m["default_value"].(float64)) + if m["default_value"].(string) != "" { + value, _ := strconv.ParseFloat(m["default_value"].(string), 64) + transformation.DefaultValue = aws.Float64(value) } - return []*cloudwatchlogs.MetricTransformation{&transformation}, nil + return []*cloudwatchlogs.MetricTransformation{&transformation} } -func flattenCloudWachLogMetricTransformations(ts []*cloudwatchlogs.MetricTransformation) []interface{} { +func flattenCloudWatchLogMetricTransformations(ts []*cloudwatchlogs.MetricTransformation) []interface{} { mts := make([]interface{}, 0) - m := make(map[string]interface{}, 0) + m := make(map[string]interface{}) m["name"] = *ts[0].MetricName m["namespace"] = *ts[0].MetricNamespace m["value"] = *ts[0].MetricValue - if ts[0].DefaultValue != nil { + if ts[0].DefaultValue == nil { + m["default_value"] = "" + } else { m["default_value"] = *ts[0].DefaultValue } @@ -1811,7 +1875,7 @@ func flattenBeanstalkTrigger(list []*elasticbeanstalk.Trigger) []string { } // There are several parts of the AWS API that will sort lists of strings, -// causing diffs inbetween resources that use lists. This avoids a bit of +// causing diffs between resources that use lists. This avoids a bit of // code duplication for pre-sorts that can be used for things like hash // functions, etc. func sortInterfaceSlice(in []interface{}) []interface{} { @@ -1831,7 +1895,8 @@ func sortInterfaceSlice(in []interface{}) []interface{} { } // This function sorts List A to look like a list found in the tf file. -func sortListBasedonTFFile(in []string, d *schema.ResourceData, listName string) ([]string, error) { +func sortListBasedonTFFile(in []string, d *schema.ResourceData) ([]string, error) { + listName := "layer_ids" if attributeCount, ok := d.Get(listName + ".#").(int); ok { for i := 0; i < attributeCount; i++ { currAttributeId := d.Get(listName + "." + strconv.Itoa(i)) @@ -1902,22 +1967,6 @@ func getStringPtr(m interface{}, key string) *string { return nil } -// getStringPtrList returns a []*string version of the map value. If the key -// isn't present, getNilStringList returns nil. -func getStringPtrList(m map[string]interface{}, key string) []*string { - if v, ok := m[key]; ok { - var stringList []*string - for _, i := range v.([]interface{}) { - s := i.(string) - stringList = append(stringList, &s) - } - - return stringList - } - - return nil -} - // a convenience wrapper type for the schema.Set map[string]interface{} // Set operations only alter the underlying map if the value is not nil type setMap map[string]interface{} @@ -2201,7 +2250,11 @@ func flattenConfigRuleScope(scope *configservice.Scope) []interface{} { return items } -func expandConfigRuleScope(configured map[string]interface{}) *configservice.Scope { +func expandConfigRuleScope(l []interface{}) *configservice.Scope { + if len(l) == 0 || l[0] == nil { + return nil + } + configured := l[0].(map[string]interface{}) scope := &configservice.Scope{} if v, ok := configured["compliance_resource_id"].(string); ok && v != "" { @@ -2236,11 +2289,8 @@ func checkYamlString(yamlString interface{}) (string, error) { s := yamlString.(string) err := yaml.Unmarshal([]byte(s), &y) - if err != nil { - return s, err - } - return s, nil + return s, err } func normalizeCloudFormationTemplate(templateString interface{}) (string, error) { @@ -2251,14 +2301,6 @@ func normalizeCloudFormationTemplate(templateString interface{}) (string, error) return checkYamlString(templateString) } -func flattenInspectorTags(cfTags []*cloudformation.Tag) map[string]string { - tags := make(map[string]string, len(cfTags)) - for _, t := range cfTags { - tags[*t.Key] = *t.Value - } - return tags -} - func flattenApiGatewayUsageApiStages(s []*apigateway.ApiStage) []map[string]interface{} { stages := make([]map[string]interface{}, 0) @@ -2280,7 +2322,7 @@ func flattenApiGatewayUsageApiStages(s []*apigateway.ApiStage) []map[string]inte } func flattenApiGatewayUsagePlanThrottling(s *apigateway.ThrottleSettings) []map[string]interface{} { - settings := make(map[string]interface{}, 0) + settings := make(map[string]interface{}) if s == nil { return nil @@ -2298,7 +2340,7 @@ func flattenApiGatewayUsagePlanThrottling(s *apigateway.ThrottleSettings) []map[ } func flattenApiGatewayUsagePlanQuota(s *apigateway.QuotaSettings) []map[string]interface{} { - settings := make(map[string]interface{}, 0) + settings := make(map[string]interface{}) if s == nil { return nil @@ -2396,7 +2438,7 @@ func flattenCognitoIdentityProviders(ips []*cognitoidentity.Provider) []map[stri } func flattenCognitoUserPoolEmailConfiguration(s *cognitoidentityprovider.EmailConfigurationType) []map[string]interface{} { - m := make(map[string]interface{}, 0) + m := make(map[string]interface{}) if s == nil { return nil @@ -2752,8 +2794,9 @@ func flattenIoTRuleFirehoseActions(actions []*iot.Action) []map[string]interface result := make(map[string]interface{}) v := a.Firehose if v != nil { - result["role_arn"] = *v.RoleArn - result["delivery_stream_name"] = *v.DeliveryStreamName + result["role_arn"] = aws.StringValue(v.RoleArn) + result["delivery_stream_name"] = aws.StringValue(v.DeliveryStreamName) + result["separator"] = aws.StringValue(v.Separator) results = append(results, result) } @@ -2905,7 +2948,7 @@ func flattenCognitoUserPoolPasswordPolicy(s *cognitoidentityprovider.PasswordPol } func expandCognitoResourceServerScope(inputs []interface{}) []*cognitoidentityprovider.ResourceServerScopeType { - configs := make([]*cognitoidentityprovider.ResourceServerScopeType, len(inputs), len(inputs)) + configs := make([]*cognitoidentityprovider.ResourceServerScopeType, len(inputs)) for i, input := range inputs { param := input.(map[string]interface{}) config := &cognitoidentityprovider.ResourceServerScopeType{} @@ -2941,7 +2984,7 @@ func flattenCognitoResourceServerScope(inputs []*cognitoidentityprovider.Resourc } func expandCognitoUserPoolSchema(inputs []interface{}) []*cognitoidentityprovider.SchemaAttributeType { - configs := make([]*cognitoidentityprovider.SchemaAttributeType, len(inputs), len(inputs)) + configs := make([]*cognitoidentityprovider.SchemaAttributeType, len(inputs)) for i, input := range inputs { param := input.(map[string]interface{}) @@ -3255,13 +3298,13 @@ func flattenCognitoUserPoolSchema(configuredAttributes, inputs []*cognitoidentit // https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html#cognito-user-pools-standard-attributes // Ignore setting them in state if they are unconfigured to prevent a huge and unexpected diff configured := false - if configuredAttributes != nil { - for _, configuredAttribute := range configuredAttributes { - if reflect.DeepEqual(input, configuredAttribute) { - configured = true - } + + for _, configuredAttribute := range configuredAttributes { + if reflect.DeepEqual(input, configuredAttribute) { + configured = true } } + if !configured { if cognitoUserPoolSchemaAttributeMatchesStandardAttribute(input) { continue @@ -3531,7 +3574,7 @@ func expandWafWebAclUpdate(updateAction string, aclRule map[string]interface{}) } func expandWafAction(l []interface{}) *waf.WafAction { - if l == nil || len(l) == 0 || l[0] == nil { + if len(l) == 0 || l[0] == nil { return nil } @@ -3543,7 +3586,7 @@ func expandWafAction(l []interface{}) *waf.WafAction { } func expandWafOverrideAction(l []interface{}) *waf.WafOverrideAction { - if l == nil || len(l) == 0 || l[0] == nil { + if len(l) == 0 || l[0] == nil { return nil } @@ -3566,7 +3609,7 @@ func flattenWafAction(n *waf.WafAction) []map[string]interface{} { } func flattenWafWebAclRules(ts []*waf.ActivatedRule) []map[string]interface{} { - out := make([]map[string]interface{}, len(ts), len(ts)) + out := make([]map[string]interface{}, len(ts)) for i, r := range ts { m := make(map[string]interface{}) @@ -3628,7 +3671,7 @@ func flattenCognitoIdentityPoolRoles(config map[string]*string) map[string]strin } func expandCognitoIdentityPoolRoleMappingsAttachment(rms []interface{}) map[string]*cognitoidentity.RoleMapping { - values := make(map[string]*cognitoidentity.RoleMapping, 0) + values := make(map[string]*cognitoidentity.RoleMapping) if len(rms) == 0 { return values @@ -3726,7 +3769,7 @@ func flattenRedshiftLogging(ls *redshift.LoggingStatus) []interface{} { return []interface{}{} } - cfg := make(map[string]interface{}, 0) + cfg := make(map[string]interface{}) cfg["enabled"] = *ls.LoggingEnabled if ls.BucketName != nil { cfg["bucket_name"] = *ls.BucketName @@ -3742,7 +3785,7 @@ func flattenRedshiftSnapshotCopy(scs *redshift.ClusterSnapshotCopyStatus) []inte return []interface{}{} } - cfg := make(map[string]interface{}, 0) + cfg := make(map[string]interface{}) if scs.DestinationRegion != nil { cfg["destination_region"] = *scs.DestinationRegion } @@ -3776,7 +3819,7 @@ func canonicalXML(s string) (string, error) { } func expandMqUsers(cfg []interface{}) []*mq.User { - users := make([]*mq.User, len(cfg), len(cfg)) + users := make([]*mq.User, len(cfg)) for i, m := range cfg { u := m.(map[string]interface{}) user := mq.User{ @@ -3796,7 +3839,7 @@ func expandMqUsers(cfg []interface{}) []*mq.User { // We use cfgdUsers to get & set the password func flattenMqUsers(users []*mq.User, cfgUsers []interface{}) *schema.Set { - existingPairs := make(map[string]string, 0) + existingPairs := make(map[string]string) for _, u := range cfgUsers { user := u.(map[string]interface{}) username := user["username"].(string) @@ -3843,7 +3886,7 @@ func flattenMqWeeklyStartTime(wst *mq.WeeklyStartTime) []interface{} { if wst == nil { return []interface{}{} } - m := make(map[string]interface{}, 0) + m := make(map[string]interface{}) if wst.DayOfWeek != nil { m["day_of_week"] = *wst.DayOfWeek } @@ -3876,7 +3919,7 @@ func flattenMqConfigurationId(cid *mq.ConfigurationId) []interface{} { if cid == nil { return []interface{}{} } - m := make(map[string]interface{}, 0) + m := make(map[string]interface{}) if cid.Id != nil { m["id"] = *cid.Id } @@ -3890,21 +3933,52 @@ func flattenMqBrokerInstances(instances []*mq.BrokerInstance) []interface{} { if len(instances) == 0 { return []interface{}{} } - l := make([]interface{}, len(instances), len(instances)) + l := make([]interface{}, len(instances)) for i, instance := range instances { - m := make(map[string]interface{}, 0) + m := make(map[string]interface{}) if instance.ConsoleURL != nil { m["console_url"] = *instance.ConsoleURL } if len(instance.Endpoints) > 0 { m["endpoints"] = aws.StringValueSlice(instance.Endpoints) } + if instance.IpAddress != nil { + m["ip_address"] = *instance.IpAddress + } l[i] = m } return l } +func flattenMqLogs(logs *mq.LogsSummary) []interface{} { + if logs == nil { + return []interface{}{} + } + + m := map[string]interface{}{ + "general": aws.BoolValue(logs.General), + "audit": aws.BoolValue(logs.Audit), + } + + return []interface{}{m} +} + +func expandMqLogs(l []interface{}) *mq.Logs { + if len(l) == 0 || l[0] == nil { + return nil + } + + m := l[0].(map[string]interface{}) + + logs := &mq.Logs{ + Audit: aws.Bool(m["audit"].(bool)), + General: aws.Bool(m["general"].(bool)), + } + + return logs +} + func flattenResourceLifecycleConfig(rlc *elasticbeanstalk.ApplicationResourceLifecycleConfig) []map[string]interface{} { result := make([]map[string]interface{}, 0, 1) @@ -4194,7 +4268,7 @@ func flattenAwsDynamoDbTableResource(d *schema.ResourceData, table *dynamodb.Tab } func expandDynamoDbAttributes(cfg []interface{}) []*dynamodb.AttributeDefinition { - attributes := make([]*dynamodb.AttributeDefinition, len(cfg), len(cfg)) + attributes := make([]*dynamodb.AttributeDefinition, len(cfg)) for i, attribute := range cfg { attr := attribute.(map[string]interface{}) attributes[i] = &dynamodb.AttributeDefinition{ @@ -4205,11 +4279,11 @@ func expandDynamoDbAttributes(cfg []interface{}) []*dynamodb.AttributeDefinition return attributes } -// TODO: Get rid of keySchemaM - the user should just explicitely define +// TODO: Get rid of keySchemaM - the user should just explicitly define // this in the config, we shouldn't magically be setting it like this. // Removal will however require config change, hence BC. :/ func expandDynamoDbLocalSecondaryIndexes(cfg []interface{}, keySchemaM map[string]interface{}) []*dynamodb.LocalSecondaryIndex { - indexes := make([]*dynamodb.LocalSecondaryIndex, len(cfg), len(cfg)) + indexes := make([]*dynamodb.LocalSecondaryIndex, len(cfg)) for i, lsi := range cfg { m := lsi.(map[string]interface{}) idxName := m["name"].(string) @@ -4458,7 +4532,7 @@ func expandVpcPeeringConnectionOptions(m map[string]interface{}) *ec2.PeeringCon } func expandDxRouteFilterPrefixes(cfg []interface{}) []*directconnect.RouteFilterPrefix { - prefixes := make([]*directconnect.RouteFilterPrefix, len(cfg), len(cfg)) + prefixes := make([]*directconnect.RouteFilterPrefix, len(cfg)) for i, p := range cfg { prefix := &directconnect.RouteFilterPrefix{ Cidr: aws.String(p.(string)), diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags.go index 7a4bfdef17..f716b5c0d7 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tags.go @@ -1,6 +1,7 @@ package aws import ( + "fmt" "log" "regexp" "strings" @@ -11,6 +12,7 @@ import ( "github.com/aws/aws-sdk-go/service/dynamodb" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/elbv2" + "github.com/hashicorp/terraform/helper/hashcode" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" ) @@ -98,7 +100,19 @@ func setVolumeTags(conn *ec2.EC2, d *schema.ResourceData) error { return nil }) if err != nil { - return err + // Retry without time bounds for EC2 throttling + if isResourceTimeoutError(err) { + log.Printf("[DEBUG] Removing volume tags: %#v from %s", remove, d.Id()) + _, err := conn.DeleteTags(&ec2.DeleteTagsInput{ + Resources: volumeIds, + Tags: remove, + }) + if err != nil { + return err + } + } else { + return err + } } } if len(create) > 0 { @@ -118,7 +132,19 @@ func setVolumeTags(conn *ec2.EC2, d *schema.ResourceData) error { return nil }) if err != nil { - return err + // Retry without time bounds for EC2 throttling + if isResourceTimeoutError(err) { + log.Printf("[DEBUG] Creating vol tags: %s for %s", create, d.Id()) + _, err := conn.CreateTags(&ec2.CreateTagsInput{ + Resources: volumeIds, + Tags: create, + }) + if err != nil { + return err + } + } else { + return err + } } } } @@ -153,7 +179,19 @@ func setTags(conn *ec2.EC2, d *schema.ResourceData) error { return nil }) if err != nil { - return err + // Retry without time bounds for EC2 throttling + if isResourceTimeoutError(err) { + log.Printf("[DEBUG] Removing tags: %#v from %s", remove, d.Id()) + _, err := conn.DeleteTags(&ec2.DeleteTagsInput{ + Resources: []*string{aws.String(d.Id())}, + Tags: remove, + }) + if err != nil { + return err + } + } else { + return err + } } } if len(create) > 0 { @@ -173,7 +211,19 @@ func setTags(conn *ec2.EC2, d *schema.ResourceData) error { return nil }) if err != nil { - return err + // Retry without time bounds for EC2 throttling + if isResourceTimeoutError(err) { + log.Printf("[DEBUG] Creating tags: %s for %s", create, d.Id()) + _, err := conn.CreateTags(&ec2.CreateTagsInput{ + Resources: []*string{aws.String(d.Id())}, + Tags: create, + }) + if err != nil { + return err + } + } else { + return err + } } } } @@ -188,15 +238,18 @@ func diffTags(oldTags, newTags []*ec2.Tag) ([]*ec2.Tag, []*ec2.Tag) { // First, we're creating everything we have create := make(map[string]interface{}) for _, t := range newTags { - create[*t.Key] = *t.Value + create[aws.StringValue(t.Key)] = aws.StringValue(t.Value) } // Build the list of what to remove var remove []*ec2.Tag for _, t := range oldTags { - old, ok := create[*t.Key] - if !ok || old != *t.Value { + old, ok := create[aws.StringValue(t.Key)] + if !ok || old != aws.StringValue(t.Value) { remove = append(remove, t) + } else if ok { + // already present so remove from new + delete(create, aws.StringValue(t.Key)) } } @@ -401,3 +454,23 @@ func diffTagsDynamoDb(oldTags, newTags []*dynamodb.Tag) ([]*dynamodb.Tag, []*str } return tagsFromMapDynamoDb(create), remove } + +// tagsMapToHash returns a stable hash value for a raw tags map. +// The returned value map be negative (i.e. not suitable for a 'Set' function). +func tagsMapToHash(tags map[string]interface{}) int { + total := 0 + for k, v := range tags { + total = total ^ hashcode.String(fmt.Sprintf("%s-%s", k, v)) + } + return total +} + +// tagsMapToRaw converts a tags map to its "raw" type. +func tagsMapToRaw(m map[string]string) map[string]interface{} { + raw := make(map[string]interface{}) + for k, v := range m { + raw[k] = v + } + + return raw +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsACM.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsACM.go index 5f8a88fa90..7f38ff3a43 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsACM.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsACM.go @@ -2,7 +2,6 @@ package aws import ( "log" - "regexp" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/acm" @@ -87,17 +86,3 @@ func tagsToMapACM(ts []*acm.Tag) map[string]string { return result } - -// compare a tag against a list of strings and checks if it should -// be ignored or not -func tagIgnoredACM(t *acm.Tag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - if r, _ := regexp.MatchString(v, *t.Key); r == true { - log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) - return true - } - } - return false -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsACMPCA.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsACMPCA.go index 3b72390ff6..f497f3aee5 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsACMPCA.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsACMPCA.go @@ -1,9 +1,6 @@ package aws import ( - "log" - "regexp" - "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/acmpca" ) @@ -51,17 +48,3 @@ func tagsToMapACMPCA(ts []*acmpca.Tag) map[string]string { return result } - -// compare a tag against a list of strings and checks if it should -// be ignored or not -func tagIgnoredACMPCA(t *acmpca.Tag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, aws.StringValue(t.Key)) - if r, _ := regexp.MatchString(v, aws.StringValue(t.Key)); r == true { - log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", aws.StringValue(t.Key), aws.StringValue(t.Value)) - return true - } - } - return false -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsCodeBuild.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsCodeBuild.go index 3302d74263..0a30069723 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsCodeBuild.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsCodeBuild.go @@ -1,36 +1,10 @@ package aws import ( - "log" - "regexp" - "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/codebuild" ) -// diffTags takes our tags locally and the ones remotely and returns -// the set of tags that must be created, and the set of tags that must -// be destroyed. -func diffTagsCodeBuild(oldTags, newTags []*codebuild.Tag) ([]*codebuild.Tag, []*codebuild.Tag) { - // First, we're creating everything we have - create := make(map[string]interface{}) - for _, t := range newTags { - create[*t.Key] = *t.Value - } - - // Build the list of what to remove - var remove []*codebuild.Tag - for _, t := range oldTags { - old, ok := create[*t.Key] - if !ok || old != *t.Value { - // Delete it! - remove = append(remove, t) - } - } - - return tagsFromMapCodeBuild(create), remove -} - func tagsFromMapCodeBuild(m map[string]interface{}) []*codebuild.Tag { result := []*codebuild.Tag{} for k, v := range m { @@ -51,17 +25,3 @@ func tagsToMapCodeBuild(ts []*codebuild.Tag) map[string]string { return result } - -// compare a tag against a list of strings and checks if it should -// be ignored or not -func tagIgnoredCodeBuild(t *codebuild.Tag) bool { - filter := []string{"^aws:"} - for _, v := range filter { - log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) - if r, _ := regexp.MatchString(v, *t.Key); r == true { - log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) - return true - } - } - return false -} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsECS.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsECS.go new file mode 100644 index 0000000000..9a9854288d --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsECS.go @@ -0,0 +1,77 @@ +package aws + +import ( + "log" + "regexp" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/ecs" +) + +// diffTags takes our tags locally and the ones remotely and returns +// the set of tags that must be created, and the set of tags that must +// be destroyed. +func diffTagsECS(oldTags, newTags []*ecs.Tag) ([]*ecs.Tag, []*ecs.Tag) { + // First, we're creating everything we have + create := make(map[string]interface{}) + for _, t := range newTags { + create[aws.StringValue(t.Key)] = aws.StringValue(t.Value) + } + + // Build the list of what to remove + var remove []*ecs.Tag + for _, t := range oldTags { + old, ok := create[aws.StringValue(t.Key)] + if !ok || old != aws.StringValue(t.Value) { + // Delete it! + remove = append(remove, t) + } else if ok { + // already present so remove from new + delete(create, aws.StringValue(t.Key)) + } + } + + return tagsFromMapECS(create), remove +} + +// tagsFromMap returns the tags for the given map of data. +func tagsFromMapECS(tagMap map[string]interface{}) []*ecs.Tag { + tags := make([]*ecs.Tag, 0, len(tagMap)) + for tagKey, tagValueRaw := range tagMap { + tag := &ecs.Tag{ + Key: aws.String(tagKey), + Value: aws.String(tagValueRaw.(string)), + } + if !tagIgnoredECS(tag) { + tags = append(tags, tag) + } + } + + return tags +} + +// tagsToMap turns the list of tags into a map. +func tagsToMapECS(tags []*ecs.Tag) map[string]string { + tagMap := make(map[string]string) + for _, tag := range tags { + if !tagIgnoredECS(tag) { + tagMap[aws.StringValue(tag.Key)] = aws.StringValue(tag.Value) + } + } + + return tagMap +} + +// compare a tag against a list of strings and checks if it should +// be ignored or not +func tagIgnoredECS(t *ecs.Tag) bool { + filter := []string{"^aws:"} + for _, v := range filter { + log.Printf("[DEBUG] Matching %v with %v\n", v, aws.StringValue(t.Key)) + if r, _ := regexp.MatchString(v, aws.StringValue(t.Key)); r == true { + log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", aws.StringValue(t.Key), aws.StringValue(t.Value)) + return true + } + } + return false +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsIAM.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsIAM.go new file mode 100644 index 0000000000..17a547c542 --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsIAM.go @@ -0,0 +1,85 @@ +package aws + +import ( + "log" + "regexp" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/iam" +) + +// diffTags takes our tags locally and the ones remotely and returns +// the set of tags that must be created, and the set of tags that must +// be destroyed. +func diffTagsIAM(oldTags, newTags []*iam.Tag) ([]*iam.Tag, []*iam.Tag) { + // First, we're creating everything we have + create := make(map[string]interface{}) + for _, t := range newTags { + create[aws.StringValue(t.Key)] = aws.StringValue(t.Value) + } + + // Build the list of what to remove + var remove []*iam.Tag + for _, t := range oldTags { + old, ok := create[aws.StringValue(t.Key)] + if !ok || old != aws.StringValue(t.Value) { + // Delete it! + remove = append(remove, t) + } else if ok { + delete(create, aws.StringValue(t.Key)) + } + } + + return tagsFromMapIAM(create), remove +} + +// tagsFromMapIAM returns the tags for the given map of data for IAM. +func tagsFromMapIAM(m map[string]interface{}) []*iam.Tag { + result := make([]*iam.Tag, 0, len(m)) + for k, v := range m { + t := &iam.Tag{ + Key: aws.String(k), + Value: aws.String(v.(string)), + } + if !tagIgnoredIAM(t) { + result = append(result, t) + } + } + + return result +} + +// tagsToMapIAM turns the list of IAM tags into a map. +func tagsToMapIAM(ts []*iam.Tag) map[string]string { + result := make(map[string]string) + for _, t := range ts { + if !tagIgnoredIAM(t) { + result[aws.StringValue(t.Key)] = aws.StringValue(t.Value) + } + } + + return result +} + +// compare a tag against a list of strings and checks if it should +// be ignored or not +func tagIgnoredIAM(t *iam.Tag) bool { + filter := []string{"^aws:"} + for _, v := range filter { + log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) + if r, _ := regexp.MatchString(v, *t.Key); r == true { + log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) + return true + } + } + return false +} + +// tagKeysIam returns the keys for the list of IAM tags +func tagKeysIam(ts []*iam.Tag) []*string { + result := make([]*string, 0, len(ts)) + for _, t := range ts { + result = append(result, t.Key) + } + return result +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsInspector.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsInspector.go index ef18f33c2e..68539f738f 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsInspector.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsInspector.go @@ -8,29 +8,6 @@ import ( "github.com/aws/aws-sdk-go/service/inspector" ) -// diffTags takes our tags locally and the ones remotely and returns -// the set of tags that must be created, and the set of tags that must -// be destroyed. -func diffTagsInspector(oldTags, newTags []*inspector.ResourceGroupTag) ([]*inspector.ResourceGroupTag, []*inspector.ResourceGroupTag) { - // First, we're creating everything we have - create := make(map[string]interface{}) - for _, t := range newTags { - create[*t.Key] = *t.Value - } - - // Build the list of what to remove - var remove []*inspector.ResourceGroupTag - for _, t := range oldTags { - old, ok := create[*t.Key] - if !ok || old != *t.Value { - // Delete it! - remove = append(remove, t) - } - } - - return tagsFromMapInspector(create), remove -} - // tagsFromMap returns the tags for the given map of data. func tagsFromMapInspector(m map[string]interface{}) []*inspector.ResourceGroupTag { var result []*inspector.ResourceGroupTag @@ -47,18 +24,6 @@ func tagsFromMapInspector(m map[string]interface{}) []*inspector.ResourceGroupTa return result } -// tagsToMap turns the list of tags into a map. -func tagsToMapInspector(ts []*inspector.ResourceGroupTag) map[string]string { - result := make(map[string]string) - for _, t := range ts { - if !tagIgnoredInspector(t) { - result[*t.Key] = *t.Value - } - } - - return result -} - // compare a tag against a list of strings and checks if it should // be ignored or not func tagIgnoredInspector(t *inspector.ResourceGroupTag) bool { diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsKinesisFirehose.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsKinesisFirehose.go new file mode 100644 index 0000000000..f513bab92c --- /dev/null +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsKinesisFirehose.go @@ -0,0 +1,153 @@ +package aws + +import ( + "log" + "regexp" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/firehose" + "github.com/hashicorp/terraform/helper/schema" +) + +// getTags is a helper to get the tags for a resource. It expects the +// tags field to be named "tags" +func getTagsKinesisFirehose(conn *firehose.Firehose, d *schema.ResourceData, sn string) error { + tags := make([]*firehose.Tag, 0) + var exclusiveStartTagKey string + for { + req := &firehose.ListTagsForDeliveryStreamInput{ + DeliveryStreamName: aws.String(sn), + } + if exclusiveStartTagKey != "" { + req.ExclusiveStartTagKey = aws.String(exclusiveStartTagKey) + } + + resp, err := conn.ListTagsForDeliveryStream(req) + if err != nil { + return err + } + + for _, tag := range resp.Tags { + tags = append(tags, tag) + } + + // If HasMoreTags is true in the response, more tags are available. + // To list the remaining tags, set ExclusiveStartTagKey to the key + // of the last tag returned and call ListTagsForDeliveryStream again. + if !aws.BoolValue(resp.HasMoreTags) { + break + } + exclusiveStartTagKey = aws.StringValue(tags[len(tags)-1].Key) + } + + if err := d.Set("tags", tagsToMapKinesisFirehose(tags)); err != nil { + return err + } + + return nil +} + +// setTags is a helper to set the tags for a resource. It expects the +// tags field to be named "tags" +func setTagsKinesisFirehose(conn *firehose.Firehose, d *schema.ResourceData, sn string) error { + if d.HasChange("tags") { + oraw, nraw := d.GetChange("tags") + o := oraw.(map[string]interface{}) + n := nraw.(map[string]interface{}) + create, remove := diffTagsKinesisFirehose(tagsFromMapKinesisFirehose(o), tagsFromMapKinesisFirehose(n)) + + // Set tags + if len(remove) > 0 { + log.Printf("[DEBUG] Removing tags: %#v", remove) + k := make([]*string, len(remove), len(remove)) + for i, t := range remove { + k[i] = t.Key + } + + _, err := conn.UntagDeliveryStream(&firehose.UntagDeliveryStreamInput{ + DeliveryStreamName: aws.String(sn), + TagKeys: k, + }) + if err != nil { + return err + } + } + if len(create) > 0 { + log.Printf("[DEBUG] Creating tags: %#v", create) + _, err := conn.TagDeliveryStream(&firehose.TagDeliveryStreamInput{ + DeliveryStreamName: aws.String(sn), + Tags: create, + }) + if err != nil { + return err + } + } + } + + return nil +} + +// diffTags takes our tags locally and the ones remotely and returns +// the set of tags that must be created, and the set of tags that must +// be destroyed. +func diffTagsKinesisFirehose(oldTags, newTags []*firehose.Tag) ([]*firehose.Tag, []*firehose.Tag) { + // First, we're creating everything we have + create := make(map[string]interface{}) + for _, t := range newTags { + create[aws.StringValue(t.Key)] = aws.StringValue(t.Value) + } + + // Build the list of what to remove + var remove []*firehose.Tag + for _, t := range oldTags { + old, ok := create[aws.StringValue(t.Key)] + if !ok || old != aws.StringValue(t.Value) { + // Delete it! + remove = append(remove, t) + } + } + + return tagsFromMapKinesisFirehose(create), remove +} + +// tagsFromMap returns the tags for the given map of data. +func tagsFromMapKinesisFirehose(m map[string]interface{}) []*firehose.Tag { + result := make([]*firehose.Tag, 0, len(m)) + for k, v := range m { + t := &firehose.Tag{ + Key: aws.String(k), + Value: aws.String(v.(string)), + } + if !tagIgnoredKinesisFirehose(t) { + result = append(result, t) + } + } + + return result +} + +// tagsToMap turns the list of tags into a map. +func tagsToMapKinesisFirehose(ts []*firehose.Tag) map[string]string { + result := make(map[string]string) + for _, t := range ts { + if !tagIgnoredKinesisFirehose(t) { + result[aws.StringValue(t.Key)] = aws.StringValue(t.Value) + } + } + + return result +} + +// compare a tag against a list of strings and checks if it should +// be ignored or not +func tagIgnoredKinesisFirehose(t *firehose.Tag) bool { + filter := []string{"^aws:"} + for _, v := range filter { + log.Printf("[DEBUG] Matching %v with %v\n", v, *t.Key) + if r, _ := regexp.MatchString(v, *t.Key); r == true { + log.Printf("[DEBUG] Found AWS specific tag %s (val: %s), ignoring.\n", *t.Key, *t.Value) + return true + } + } + return false +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsNeptune.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsNeptune.go index 3c54716c9f..8f47bb3d83 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsNeptune.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsNeptune.go @@ -121,7 +121,7 @@ func saveTagsNeptune(conn *neptune.Neptune, d *schema.ResourceData, arn string) }) if err != nil { - return fmt.Errorf("[DEBUG] Error retreiving tags for ARN: %s", arn) + return fmt.Errorf("Error retreiving tags for ARN: %s", arn) } var dt []*neptune.Tag diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsRDS.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsRDS.go index 2d64113482..ef7a869d38 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsRDS.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/tagsRDS.go @@ -107,7 +107,7 @@ func saveTagsRDS(conn *rds.RDS, d *schema.ResourceData, arn string) error { }) if err != nil { - return fmt.Errorf("[DEBUG] Error retreiving tags for ARN: %s", arn) + return fmt.Errorf("Error retreiving tags for ARN: %s", arn) } var dt []*rds.Tag diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/utils.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/utils.go index 21c3aab7ef..b701ddbead 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/utils.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/utils.go @@ -47,3 +47,8 @@ func isResourceNotFoundError(err error) bool { _, ok := err.(*resource.NotFoundError) return ok } + +func isResourceTimeoutError(err error) bool { + timeoutErr, ok := err.(*resource.TimeoutError) + return ok && timeoutErr.LastError == nil +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/validators.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/validators.go index 51a8d434a8..84e48ff7ad 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/validators.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/validators.go @@ -12,9 +12,7 @@ import ( "github.com/aws/aws-sdk-go/service/apigateway" "github.com/aws/aws-sdk-go/service/cognitoidentity" - "github.com/aws/aws-sdk-go/service/cognitoidentityprovider" "github.com/aws/aws-sdk-go/service/configservice" - "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/s3" "github.com/aws/aws-sdk-go/service/waf" "github.com/hashicorp/terraform/helper/resource" @@ -23,13 +21,23 @@ import ( "github.com/hashicorp/terraform/helper/validation" ) -// When released, replace all usage with upstream validation function: -// https://github.com/hashicorp/terraform/pull/17484 -func validateRFC3339TimeString(v interface{}, k string) (ws []string, errors []error) { - if _, err := time.Parse(time.RFC3339, v.(string)); err != nil { - errors = append(errors, fmt.Errorf("%q: %s", k, err)) +// validateAny returns a SchemaValidateFunc which tests if the provided value +// passes any of the provided SchemaValidateFunc +// Temporarily added into AWS provider, but will be submitted upstream into provider SDK +func validateAny(validators ...schema.SchemaValidateFunc) schema.SchemaValidateFunc { + return func(i interface{}, k string) ([]string, []error) { + var allErrors []error + var allWarnings []string + for _, validator := range validators { + validatorWarnings, validatorErrors := validator(i, k) + if len(validatorWarnings) == 0 && len(validatorErrors) == 0 { + return []string{}, []error{} + } + allWarnings = append(allWarnings, validatorWarnings...) + allErrors = append(allErrors, validatorErrors...) + } + return allWarnings, allErrors } - return } // validateTypeStringNullableBoolean provides custom error messaging for TypeString booleans @@ -44,7 +52,7 @@ func validateTypeStringNullableBoolean(v interface{}, k string) (ws []string, es return } - for _, str := range []string{"", "0", "1"} { + for _, str := range []string{"", "0", "1", "false", "true"} { if value == str { return } @@ -54,6 +62,26 @@ func validateTypeStringNullableBoolean(v interface{}, k string) (ws []string, es return } +// validateTypeStringNullableFloat provides custom error messaging for TypeString floats +// Some arguments require a floating point value or an unspecified, empty field. +func validateTypeStringNullableFloat(v interface{}, k string) (ws []string, es []error) { + value, ok := v.(string) + if !ok { + es = append(es, fmt.Errorf("expected type of %s to be string", k)) + return + } + + if value == "" { + return + } + + if _, err := strconv.ParseFloat(value, 64); err != nil { + es = append(es, fmt.Errorf("%s: cannot parse '%s' as float: %s", k, value, err)) + } + + return +} + func validateRdsIdentifier(v interface{}, k string) (ws []string, errors []error) { value := v.(string) if !regexp.MustCompile(`^[0-9a-z-]+$`).MatchString(value) { @@ -280,28 +308,6 @@ func validateElbNamePrefix(v interface{}, k string) (ws []string, errors []error return } -func validateEcrRepositoryName(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if len(value) < 2 { - errors = append(errors, fmt.Errorf( - "%q must be at least 2 characters long: %q", k, value)) - } - if len(value) > 256 { - errors = append(errors, fmt.Errorf( - "%q cannot be longer than 256 characters: %q", k, value)) - } - - // http://docs.aws.amazon.com/AmazonECR/latest/APIReference/API_CreateRepository.html - pattern := `^(?:[a-z0-9]+(?:[._-][a-z0-9]+)*/)*[a-z0-9]+(?:[._-][a-z0-9]+)*$` - if !regexp.MustCompile(pattern).MatchString(value) { - errors = append(errors, fmt.Errorf( - "%q doesn't comply with restrictions (%q): %q", - k, pattern, value)) - } - - return -} - func validateCloudWatchDashboardName(v interface{}, k string) (ws []string, errors []error) { value := v.(string) if len(value) > 255 { @@ -350,21 +356,19 @@ func validateCloudWatchLogResourcePolicyDocument(v interface{}, k string) (ws [] return } -func validateMaxLength(length int) schema.SchemaValidateFunc { - return validation.StringLenBetween(0, length) -} - -func validateIntegerInRange(min, max int) schema.SchemaValidateFunc { - return func(v interface{}, k string) (ws []string, errors []error) { - value := v.(int) - if value < min { - errors = append(errors, fmt.Errorf( - "%q cannot be lower than %d: %d", k, min, value)) +func validateIntegerInSlice(valid []int) schema.SchemaValidateFunc { + return func(i interface{}, k string) (s []string, es []error) { + v, ok := i.(int) + if !ok { + es = append(es, fmt.Errorf("expected type of %s to be int", k)) + return } - if value > max { - errors = append(errors, fmt.Errorf( - "%q cannot be higher than %d: %d", k, max, value)) + for _, in := range valid { + if v == in { + return + } } + es = append(es, fmt.Errorf("expected %s to be one of %v, got %d", k, valid, v)) return } } @@ -485,6 +489,20 @@ func validateArn(v interface{}, k string) (ws []string, errors []error) { return } +func validateEC2AutomateARN(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + + // https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutMetricAlarm.html + pattern := `^arn:[\w-]+:automate:[\w-]+:ec2:(reboot|recover|stop|terminate)$` + if !regexp.MustCompile(pattern).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q does not match EC2 automation ARN (%q): %q", + k, pattern, value)) + } + + return +} + func validatePolicyStatementId(v interface{}, k string) (ws []string, errors []error) { value := v.(string) @@ -647,13 +665,6 @@ func validateDbEventSubscriptionName(v interface{}, k string) (ws []string, erro return } -func validateJsonString(v interface{}, k string) (ws []string, errors []error) { - if _, err := structure.NormalizeJsonString(v); err != nil { - errors = append(errors, fmt.Errorf("%q contains an invalid JSON: %s", k, err)) - } - return -} - func validateIAMPolicyJson(v interface{}, k string) (ws []string, errors []error) { // IAM Policy documents need to be valid JSON, and pass legacy parsing value := v.(string) @@ -703,7 +714,8 @@ func validateSQSQueueName(v interface{}, k string) (ws []string, errors []error) return } -func validateSQSNonFifoQueueName(v interface{}, k string) (errors []error) { +func validateSQSNonFifoQueueName(v interface{}) (errors []error) { + k := "name" value := v.(string) if len(value) > 80 { errors = append(errors, fmt.Errorf("%q cannot be longer than 80 characters", k)) @@ -715,7 +727,8 @@ func validateSQSNonFifoQueueName(v interface{}, k string) (errors []error) { return } -func validateSQSFifoQueueName(v interface{}, k string) (errors []error) { +func validateSQSFifoQueueName(v interface{}) (errors []error) { + k := "name" value := v.(string) if len(value) > 80 { @@ -731,7 +744,7 @@ func validateSQSFifoQueueName(v interface{}, k string) (errors []error) { } if !regexp.MustCompile(`\.fifo$`).MatchString(value) { - errors = append(errors, fmt.Errorf("FIFO queue name should ends with \".fifo\": %v", value)) + errors = append(errors, fmt.Errorf("FIFO queue name should end with \".fifo\": %v", value)) } return @@ -798,8 +811,11 @@ func validateAwsDynamoDbGlobalTableName(v interface{}, k string) (ws []string, e func validateAwsEcsPlacementStrategy(stratType, stratField string) error { switch stratType { case "random": - // random does not need the field attribute set, could error, but it isn't read at the API level - return nil + // random requires the field attribute to be unset. + if stratField != "" { + return fmt.Errorf("Random type requires the field attribute to be unset. Got: %s", + stratField) + } case "spread": // For the spread placement strategy, valid values are instanceId // (or host, which has the same effect), or any platform or custom attribute @@ -980,8 +996,8 @@ func validateIamRolePolicyName(v interface{}, k string) (ws []string, errors []e errors = append(errors, fmt.Errorf( "%q cannot be longer than 128 characters", k)) } - if !regexp.MustCompile("^[\\w+=,.@-]+$").MatchString(value) { - errors = append(errors, fmt.Errorf("%q must match [\\w+=,.@-]", k)) + if !regexp.MustCompile(`^[\w+=,.@-]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf(`%q must match [\w+=,.@-]`, k)) } return } @@ -992,8 +1008,8 @@ func validateIamRolePolicyNamePrefix(v interface{}, k string) (ws []string, erro errors = append(errors, fmt.Errorf( "%q cannot be longer than 100 characters", k)) } - if !regexp.MustCompile("^[\\w+=,.@-]+$").MatchString(value) { - errors = append(errors, fmt.Errorf("%q must match [\\w+=,.@-]", k)) + if !regexp.MustCompile(`^[\w+=,.@-]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf(`%q must match [\w+=,.@-]`, k)) } return } @@ -1165,7 +1181,7 @@ func validateAwsKmsGrantName(v interface{}, k string) (ws []string, es []error) func validateCognitoIdentityPoolName(v interface{}, k string) (ws []string, errors []error) { val := v.(string) - if !regexp.MustCompile("^[\\w _]+$").MatchString(val) { + if !regexp.MustCompile(`^[\w _]+$`).MatchString(val) { errors = append(errors, fmt.Errorf("%q must contain only alphanumeric characters and spaces", k)) } @@ -1178,7 +1194,7 @@ func validateCognitoProviderDeveloperName(v interface{}, k string) (ws []string, errors = append(errors, fmt.Errorf("%q cannot be longer than 100 characters", k)) } - if !regexp.MustCompile("^[\\w._-]+$").MatchString(value) { + if !regexp.MustCompile(`^[\w._-]+$`).MatchString(value) { errors = append(errors, fmt.Errorf("%q must contain only alphanumeric characters, dots, underscores and hyphens", k)) } @@ -1195,7 +1211,7 @@ func validateCognitoSupportedLoginProviders(v interface{}, k string) (ws []strin errors = append(errors, fmt.Errorf("%q cannot be longer than 128 characters", k)) } - if !regexp.MustCompile("^[\\w.;_/-]+$").MatchString(value) { + if !regexp.MustCompile(`^[\w.;_/-]+$`).MatchString(value) { errors = append(errors, fmt.Errorf("%q must contain only alphanumeric characters, dots, semicolons, underscores, slashes and hyphens", k)) } @@ -1212,7 +1228,7 @@ func validateCognitoIdentityProvidersClientId(v interface{}, k string) (ws []str errors = append(errors, fmt.Errorf("%q cannot be longer than 128 characters", k)) } - if !regexp.MustCompile("^[\\w_]+$").MatchString(value) { + if !regexp.MustCompile(`^[\w_]+$`).MatchString(value) { errors = append(errors, fmt.Errorf("%q must contain only alphanumeric characters and underscores", k)) } @@ -1229,7 +1245,7 @@ func validateCognitoIdentityProvidersProviderName(v interface{}, k string) (ws [ errors = append(errors, fmt.Errorf("%q cannot be longer than 128 characters", k)) } - if !regexp.MustCompile("^[\\w._:/-]+$").MatchString(value) { + if !regexp.MustCompile(`^[\w._:/-]+$`).MatchString(value) { errors = append(errors, fmt.Errorf("%q must contain only alphanumeric characters, dots, underscores, colons, slashes and hyphens", k)) } @@ -1247,7 +1263,7 @@ func validateCognitoUserGroupName(v interface{}, k string) (ws []string, es []er } if !regexp.MustCompile(`[\p{L}\p{M}\p{S}\p{N}\p{P}]+`).MatchString(value) { - es = append(es, fmt.Errorf("%q must satisfy regular expression pattern: [\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+", k)) + es = append(es, fmt.Errorf(`%q must satisfy regular expression pattern: [\p{L}\p{M}\p{S}\p{N}\p{P}]+`, k)) } return } @@ -1324,23 +1340,6 @@ func validateCognitoUserPoolSmsVerificationMessage(v interface{}, k string) (ws return } -func validateCognitoUserPoolClientAuthFlows(v interface{}, k string) (ws []string, es []error) { - validValues := []string{ - cognitoidentityprovider.AuthFlowTypeAdminNoSrpAuth, - cognitoidentityprovider.AuthFlowTypeCustomAuth, - } - period := v.(string) - for _, f := range validValues { - if period == f { - return - } - } - es = append(es, fmt.Errorf( - "%q contains an invalid auth flow %q. Valid auth flows are %q.", - k, period, validValues)) - return -} - func validateCognitoUserPoolTemplateEmailMessage(v interface{}, k string) (ws []string, es []error) { value := v.(string) if len(value) < 6 { @@ -1368,7 +1367,7 @@ func validateCognitoUserPoolTemplateEmailMessageByLink(v interface{}, k string) } if !regexp.MustCompile(`[\p{L}\p{M}\p{S}\p{N}\p{P}\s*]*\{##[\p{L}\p{M}\p{S}\p{N}\p{P}\s*]*##\}[\p{L}\p{M}\p{S}\p{N}\p{P}\s*]*`).MatchString(value) { - es = append(es, fmt.Errorf("%q must satisfy regular expression pattern: [\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s*]*\\{##[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s*]*##\\}[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s*]*", k)) + es = append(es, fmt.Errorf(`%q must satisfy regular expression pattern: [\p{L}\p{M}\p{S}\p{N}\p{P}\s*]*\{##[\p{L}\p{M}\p{S}\p{N}\p{P}\s*]*##\}[\p{L}\p{M}\p{S}\p{N}\p{P}\s*]*`, k)) } return } @@ -1384,7 +1383,7 @@ func validateCognitoUserPoolTemplateEmailSubject(v interface{}, k string) (ws [] } if !regexp.MustCompile(`[\p{L}\p{M}\p{S}\p{N}\p{P}\s]+`).MatchString(value) { - es = append(es, fmt.Errorf("%q must satisfy regular expression pattern: [\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s]+", k)) + es = append(es, fmt.Errorf(`%q must satisfy regular expression pattern: [\p{L}\p{M}\p{S}\p{N}\p{P}\s]+`, k)) } return } @@ -1400,7 +1399,7 @@ func validateCognitoUserPoolTemplateEmailSubjectByLink(v interface{}, k string) } if !regexp.MustCompile(`[\p{L}\p{M}\p{S}\p{N}\p{P}\s]+`).MatchString(value) { - es = append(es, fmt.Errorf("%q must satisfy regular expression pattern: [\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}\\s]+", k)) + es = append(es, fmt.Errorf(`%q must satisfy regular expression pattern: [\p{L}\p{M}\p{S}\p{N}\p{P}\s]+`, k)) } return } @@ -1466,7 +1465,7 @@ func validateCognitoUserPoolReplyEmailAddress(v interface{}, k string) (ws []str if !regexp.MustCompile(`[\p{L}\p{M}\p{S}\p{N}\p{P}]+@[\p{L}\p{M}\p{S}\p{N}\p{P}]+`).MatchString(value) { errors = append(errors, fmt.Errorf( - "%q must satisfy regular expression pattern: [\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+@[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+", k)) + `%q must satisfy regular expression pattern: [\p{L}\p{M}\p{S}\p{N}\p{P}]+@[\p{L}\p{M}\p{S}\p{N}\p{P}]+`, k)) } return } @@ -1482,7 +1481,7 @@ func validateCognitoUserPoolSchemaName(v interface{}, k string) (ws []string, es } if !regexp.MustCompile(`[\p{L}\p{M}\p{S}\p{N}\p{P}]+`).MatchString(value) { - es = append(es, fmt.Errorf("%q must satisfy regular expression pattern: [\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+", k)) + es = append(es, fmt.Errorf(`%q must satisfy regular expression pattern: [\p{L}\p{M}\p{S}\p{N}\p{P}]+`, k)) } return } @@ -1498,7 +1497,7 @@ func validateCognitoUserPoolClientURL(v interface{}, k string) (ws []string, es } if !regexp.MustCompile(`[\p{L}\p{M}\p{S}\p{N}\p{P}]+`).MatchString(value) { - es = append(es, fmt.Errorf("%q must satisfy regular expression pattern: [\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+", k)) + es = append(es, fmt.Errorf(`%q must satisfy regular expression pattern: [\p{L}\p{M}\p{S}\p{N}\p{P}]+`, k)) } return } @@ -1513,7 +1512,7 @@ func validateCognitoResourceServerScopeName(v interface{}, k string) (ws []strin errors = append(errors, fmt.Errorf("%q cannot be longer than 256 character", k)) } if !regexp.MustCompile(`[\x21\x23-\x2E\x30-\x5B\x5D-\x7E]+`).MatchString(value) { - errors = append(errors, fmt.Errorf("%q must satisfy regular expression pattern: [\\x21\\x23-\\x2E\\x30-\\x5B\\x5D-\\x7E]+", k)) + errors = append(errors, fmt.Errorf(`%q must satisfy regular expression pattern: [\x21\x23-\x2E\x30-\x5B\x5D-\x7E]+`, k)) } return } @@ -1549,7 +1548,7 @@ func validateIamRoleDescription(v interface{}, k string) (ws []string, errors [] if !regexp.MustCompile(`[\p{L}\p{M}\p{Z}\p{S}\p{N}\p{P}]*`).MatchString(value) { errors = append(errors, fmt.Errorf( - "Only alphanumeric & accented characters allowed in %q: %q (Must satisfy regular expression pattern: [\\p{L}\\p{M}\\p{Z}\\p{S}\\p{N}\\p{P}]*)", + `Only alphanumeric & accented characters allowed in %q: %q (Must satisfy regular expression pattern: [\p{L}\p{M}\p{Z}\p{S}\p{N}\p{P}]*)`, k, value)) } return @@ -1559,6 +1558,19 @@ func validateAwsSSMName(v interface{}, k string) (ws []string, errors []error) { // http://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateDocument.html#EC2-CreateDocument-request-Name value := v.(string) + if !regexp.MustCompile(`^[a-zA-Z0-9_\-.]{3,128}$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + `Only alphanumeric characters, hyphens, dots & underscores allowed in %q: %q (Must satisfy regular expression pattern: ^[a-zA-Z0-9_\-.]{3,128}$)`, + k, value)) + } + + return +} + +func validateAwsSSMMaintenanceWindowTaskName(v interface{}, k string) (ws []string, errors []error) { + // https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_RegisterTaskWithMaintenanceWindow.html#systemsmanager-RegisterTaskWithMaintenanceWindow-request-Name + value := v.(string) + if !regexp.MustCompile(`^[a-zA-Z0-9_\-.]{3,128}$`).MatchString(value) { errors = append(errors, fmt.Errorf( "Only alphanumeric characters, hyphens, dots & underscores allowed in %q: %q (Must satisfy regular expression pattern: ^[a-zA-Z0-9_\\-.]{3,128}$)", @@ -1647,12 +1659,25 @@ func validateIoTTopicRuleElasticSearchEndpoint(v interface{}, k string) (ws []st return } +func validateIoTTopicRuleFirehoseSeparator(v interface{}, s string) ([]string, []error) { + switch v.(string) { + case + ",", + "\t", + "\n", + "\r\n": + return nil, nil + } + + return nil, []error{fmt.Errorf(`Separator must be one of ',' (comma), '\t' (tab) '\n' (newline) or '\r\n' (Windows newline)`)} +} + func validateCognitoRoleMappingsAmbiguousRoleResolutionAgainstType(v map[string]interface{}) (errors []error) { t := v["type"].(string) isRequired := t == cognitoidentity.RoleMappingTypeToken || t == cognitoidentity.RoleMappingTypeRules if value, ok := v["ambiguous_role_resolution"]; (!ok || value == "") && isRequired { - errors = append(errors, fmt.Errorf("Ambiguous Role Resolution must be defined when \"type\" equals \"Token\" or \"Rules\"")) + errors = append(errors, fmt.Errorf(`Ambiguous Role Resolution must be defined when "type" equals "Token" or "Rules"`)) } return @@ -1679,7 +1704,7 @@ func validateCognitoRoleMappingsRulesConfiguration(v map[string]interface{}) (er func validateCognitoRoleMappingsRulesClaim(v interface{}, k string) (ws []string, errors []error) { value := v.(string) - if !regexp.MustCompile("^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$").MatchString(value) { + if !regexp.MustCompile(`^[\p{L}\p{M}\p{S}\p{N}\p{P}]+$`).MatchString(value) { errors = append(errors, fmt.Errorf("%q must contain only alphanumeric characters, dots, underscores, colons, slashes and hyphens", k)) } @@ -1687,7 +1712,8 @@ func validateCognitoRoleMappingsRulesClaim(v interface{}, k string) (ws []string } // Validates that either authenticated or unauthenticated is defined -func validateCognitoRoles(v map[string]interface{}, k string) (errors []error) { +func validateCognitoRoles(v map[string]interface{}) (errors []error) { + k := "roles" _, hasAuthenticated := v["authenticated"].(string) _, hasUnauthenticated := v["unauthenticated"].(string) @@ -1698,17 +1724,16 @@ func validateCognitoRoles(v map[string]interface{}, k string) (errors []error) { return } -func validateCognitoUserPoolDomain(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - if !regexp.MustCompile(`^[a-z0-9](?:[a-z0-9\-]{0,61}[a-z0-9])?$`).MatchString(value) { - errors = append(errors, fmt.Errorf( - "only lowercase alphanumeric characters and hyphens (max length 63 chars) allowed in %q", k)) - } - return -} - func validateDxConnectionBandWidth() schema.SchemaValidateFunc { - return validation.StringInSlice([]string{"1Gbps", "10Gbps"}, false) + return validation.StringInSlice([]string{ + "1Gbps", + "10Gbps", + "50Mbps", + "100Mbps", + "200Mbps", + "300Mbps", + "400Mbps", + "500Mbps"}, false) } func validateKmsKey(v interface{}, k string) (ws []string, errors []error) { @@ -1755,26 +1780,7 @@ func validateDynamoDbStreamSpec(d *schema.ResourceDiff) error { return nil } -func validateVpcEndpointType(v interface{}, k string) (ws []string, errors []error) { - return validateStringIn(ec2.VpcEndpointTypeGateway, ec2.VpcEndpointTypeInterface)(v, k) -} - -func validateStringIn(validValues ...string) schema.SchemaValidateFunc { - return func(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - for _, s := range validValues { - if value == s { - return - } - } - errors = append(errors, fmt.Errorf( - "%q contains an invalid value %q. Valid values are %q.", - k, value, validValues)) - return - } -} - -func validateVpnGatewayAmazonSideAsn(v interface{}, k string) (ws []string, errors []error) { +func validateAmazonSideAsn(v interface{}, k string) (ws []string, errors []error) { value := v.(string) // http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVpnGateway.html @@ -1795,22 +1801,6 @@ func validateVpnGatewayAmazonSideAsn(v interface{}, k string) (ws []string, erro return } -func validateDxGatewayAmazonSideAsn(v interface{}, k string) (ws []string, errors []error) { - value := v.(string) - - // https://docs.aws.amazon.com/directconnect/latest/APIReference/API_CreateDirectConnectGateway.html - asn, err := strconv.ParseInt(value, 10, 64) - if err != nil { - errors = append(errors, fmt.Errorf("%q (%q) must be a 64-bit integer", k, v)) - return - } - - if (asn < 64512) || (asn > 65534 && asn < 4200000000) || (asn > 4294967294) { - errors = append(errors, fmt.Errorf("%q (%q) must be in the range 64512 to 65534 or 4200000000 to 4294967294", k, v)) - } - return -} - func validateIotThingTypeName(v interface{}, k string) (ws []string, errors []error) { value := v.(string) if !regexp.MustCompile(`[a-zA-Z0-9:_-]+`).MatchString(value) { @@ -1828,7 +1818,7 @@ func validateIotThingTypeDescription(v interface{}, k string) (ws []string, erro } if !regexp.MustCompile(`[\\p{Graph}\\x20]*`).MatchString(value) { errors = append(errors, fmt.Errorf( - "%q must match pattern [\\p{Graph}\\x20]*", k)) + `%q must match pattern [\p{Graph}\x20]*`, k)) } return } @@ -1996,3 +1986,96 @@ func validateNeptuneEventSubscriptionNamePrefix(v interface{}, k string) (ws []s } return } + +func validateCloudFrontPublicKeyName(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if !regexp.MustCompile(`^[0-9A-Za-z_-]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "only alphanumeric characters, underscores and hyphens allowed in %q", k)) + } + if len(value) > 128 { + errors = append(errors, fmt.Errorf( + "%q cannot be greater than 128 characters", k)) + } + return +} + +func validateCloudFrontPublicKeyNamePrefix(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if !regexp.MustCompile(`^[0-9A-Za-z_-]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "only alphanumeric characters, underscores and hyphens allowed in %q", k)) + } + prefixMaxLength := 128 - resource.UniqueIDSuffixLength + if len(value) > prefixMaxLength { + errors = append(errors, fmt.Errorf( + "%q cannot be greater than %d characters", k, prefixMaxLength)) + } + return +} + +func validateLbTargetGroupName(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if len(value) > 32 { + errors = append(errors, fmt.Errorf( + "%q cannot be longer than 32 characters", k)) + } + if !regexp.MustCompile(`^[0-9A-Za-z-]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "only alphanumeric characters and hyphens allowed in %q", k)) + } + if regexp.MustCompile(`^-`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q cannot begin with a hyphen", k)) + } + if regexp.MustCompile(`-$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q cannot end with a hyphen", k)) + } + return +} + +func validateSecretManagerSecretName(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if !regexp.MustCompile(`^[0-9A-Za-z/_+=.@-]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "only alphanumeric characters and /_+=.@- special characters are allowed in %q", k)) + } + if len(value) > 512 { + errors = append(errors, fmt.Errorf( + "%q cannot be greater than 512 characters", k)) + } + return +} + +func validateLbTargetGroupNamePrefix(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + prefixMaxLength := 32 - resource.UniqueIDSuffixLength + if len(value) > prefixMaxLength { + errors = append(errors, fmt.Errorf( + "%q cannot be longer than %d characters", k, prefixMaxLength)) + } + if !regexp.MustCompile(`^[0-9A-Za-z-]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "only alphanumeric characters and hyphens allowed in %q", k)) + } + if regexp.MustCompile(`^-`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "%q cannot begin with a hyphen", k)) + } + return +} + +func validateSecretManagerSecretNamePrefix(v interface{}, k string) (ws []string, errors []error) { + value := v.(string) + if !regexp.MustCompile(`^[0-9A-Za-z/_+=.@-]+$`).MatchString(value) { + errors = append(errors, fmt.Errorf( + "only alphanumeric characters and /_+=.@- special characters are allowed in %q", k)) + } + prefixMaxLength := 512 - resource.UniqueIDSuffixLength + if len(value) > prefixMaxLength { + errors = append(errors, fmt.Errorf( + "%q cannot be greater than %d characters", k, prefixMaxLength)) + } + return +} diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/waf_helpers.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/waf_helpers.go index 52d7f0d0b2..b9e6403ce3 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/waf_helpers.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/waf_helpers.go @@ -98,7 +98,7 @@ func diffWafSizeConstraints(oldS, newS []interface{}) []*waf.SizeConstraintSetUp } func flattenWafSizeConstraints(sc []*waf.SizeConstraint) []interface{} { - out := make([]interface{}, len(sc), len(sc)) + out := make([]interface{}, len(sc)) for i, c := range sc { m := make(map[string]interface{}) m["comparison_operator"] = *c.ComparisonOperator @@ -113,7 +113,7 @@ func flattenWafSizeConstraints(sc []*waf.SizeConstraint) []interface{} { } func flattenWafGeoMatchConstraint(ts []*waf.GeoMatchConstraint) []interface{} { - out := make([]interface{}, len(ts), len(ts)) + out := make([]interface{}, len(ts)) for i, t := range ts { m := make(map[string]interface{}) m["type"] = *t.Type @@ -256,7 +256,7 @@ func diffWafRuleGroupActivatedRules(oldRules, newRules []interface{}) []*waf.Rul } func flattenWafActivatedRules(activatedRules []*waf.ActivatedRule) []interface{} { - out := make([]interface{}, len(activatedRules), len(activatedRules)) + out := make([]interface{}, len(activatedRules)) for i, ar := range activatedRules { rule := map[string]interface{}{ "priority": int(*ar.Priority), @@ -292,7 +292,7 @@ func expandWafActivatedRule(rule map[string]interface{}) *waf.ActivatedRule { } func flattenWafRegexMatchTuples(tuples []*waf.RegexMatchTuple) []interface{} { - out := make([]interface{}, len(tuples), len(tuples)) + out := make([]interface{}, len(tuples)) for i, t := range tuples { m := make(map[string]interface{}) diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/waf_token_handlers.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/waf_token_handlers.go index ac99f09507..3de972aa25 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/waf_token_handlers.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/waf_token_handlers.go @@ -1,24 +1,23 @@ package aws import ( + "fmt" "time" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/waf" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" ) type WafRetryer struct { Connection *waf.WAF - Region string } type withTokenFunc func(token *string) (interface{}, error) func (t *WafRetryer) RetryWithToken(f withTokenFunc) (interface{}, error) { - awsMutexKV.Lock(t.Region) - defer awsMutexKV.Unlock(t.Region) + awsMutexKV.Lock("WafRetryer") + defer awsMutexKV.Unlock("WafRetryer") var out interface{} err := resource.Retry(15*time.Minute, func() *resource.RetryError { @@ -27,7 +26,7 @@ func (t *WafRetryer) RetryWithToken(f withTokenFunc) (interface{}, error) { tokenOut, err = t.Connection.GetChangeToken(&waf.GetChangeTokenInput{}) if err != nil { - return resource.NonRetryableError(errwrap.Wrapf("Failed to acquire change token: {{err}}", err)) + return resource.NonRetryableError(fmt.Errorf("Failed to acquire change token: %s", err)) } out, err = f(tokenOut.ChangeToken) @@ -44,6 +43,6 @@ func (t *WafRetryer) RetryWithToken(f withTokenFunc) (interface{}, error) { return out, err } -func newWafRetryer(conn *waf.WAF, region string) *WafRetryer { - return &WafRetryer{Connection: conn, Region: region} +func newWafRetryer(conn *waf.WAF) *WafRetryer { + return &WafRetryer{Connection: conn} } diff --git a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/wafregionl_token_handlers.go b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/wafregionl_token_handlers.go index da3d8b58f7..17c69c0f96 100644 --- a/vendor/github.com/terraform-providers/terraform-provider-aws/aws/wafregionl_token_handlers.go +++ b/vendor/github.com/terraform-providers/terraform-provider-aws/aws/wafregionl_token_handlers.go @@ -1,12 +1,12 @@ package aws import ( + "fmt" "time" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/waf" "github.com/aws/aws-sdk-go/service/wafregional" - "github.com/hashicorp/errwrap" "github.com/hashicorp/terraform/helper/resource" ) @@ -28,7 +28,7 @@ func (t *WafRegionalRetryer) RetryWithToken(f withRegionalTokenFunc) (interface{ tokenOut, err = t.Connection.GetChangeToken(&waf.GetChangeTokenInput{}) if err != nil { - return resource.NonRetryableError(errwrap.Wrapf("Failed to acquire change token: {{err}}", err)) + return resource.NonRetryableError(fmt.Errorf("Failed to acquire change token: %s", err)) } out, err = f(tokenOut.ChangeToken)